From b6a517f80bc6efbba68c8b5461d3d87e22ef98bb Mon Sep 17 00:00:00 2001 From: Daniele Cinti Date: Thu, 8 Sep 2016 12:43:01 +0200 Subject: [PATCH] Built motion from commit af64c7d.|0.0.141 --- package.json | 2 + public/app/037c0eef.vendor.js | 114 + public/app/275d68ed.vendor.css | 68 + public/app/2b840924.app.js | 87 + public/app/ac0a0d8b.vendor.js | 113 - public/app/bd6c13b6.vendor.css | 72 - public/app/d6eca5e4.app.js | 87 - public/assets/css/pricing-tables.css | 250 +- public/assets/fonts/FontAwesome.otf | Bin 123112 -> 124988 bytes public/assets/fonts/fontawesome-webfont.eot | Bin 75220 -> 76518 bytes public/assets/fonts/fontawesome-webfont.svg | 16 +- public/assets/fonts/fontawesome-webfont.ttf | Bin 150920 -> 152796 bytes public/assets/fonts/fontawesome-webfont.woff | Bin 89076 -> 90412 bytes public/assets/fonts/fontawesome-webfont.woff2 | Bin 70728 -> 71896 bytes public/assets/plugins/jscripty/js/Actions.js | 635 +- public/assets/plugins/jscripty/js/Dialogs.js | 1195 ++- public/assets/plugins/jscripty/js/Editor.js | 889 +- public/assets/plugins/jscripty/js/EditorUi.js | 1346 ++- public/assets/plugins/jscripty/js/Graph.js | 645 +- public/assets/plugins/jscripty/js/Menus.js | 717 +- public/assets/plugins/jscripty/js/Shapes.js | 1235 ++- public/assets/plugins/jscripty/js/Sidebar.js | 794 +- public/assets/plugins/jscripty/js/Toolbar.js | 408 +- public/assets/plugins/jscripty/js/custom.js | 284 +- public/assets/plugins/mxgraph/js/mxClient.js |18738 +++++++++++++++++++- public/assets/plugins/square/js/Actions.js | 639 +- public/assets/plugins/square/js/Dialogs.js | 1277 ++- public/assets/plugins/square/js/Editor.js | 889 +- public/assets/plugins/square/js/EditorUi.js | 1624 ++- public/assets/plugins/square/js/Graph.js | 645 +- public/assets/plugins/square/js/Menus.js | 717 +- public/assets/plugins/square/js/Shapes.js | 1235 ++- public/assets/plugins/square/js/Sidebar.js | 933 +- public/assets/plugins/square/js/Toolbar.js | 408 +- public/assets/plugins/square/js/custom.js | 308 +- .../adf-structures-base/adf-structures-base.js | 4 +- .../angucomplete-alt/angucomplete-alt.js | 9 +- .../angular-animate/angular-animate.js | 638 +- .../angular-audio/angular.audio.js | 91 +- .../bootstrap-colorpicker-module.js | 105 +- .../angular-bootstrap-colorpicker/colorpicker.css | 3 + .../angular-bootstrap-contextmenu/contextMenu.js | 236 +- .../angular-bootstrap-slider/slider.js | 11 + .../angular-chart.js/angular-chart.js | 11 +- .../angular-clipboard/angular-clipboard.js | 10 +- .../angular-cookies/angular-cookies.js | 15 +- .../angular-file-saver.bundle.js | 2 +- .../angular-local-storage/angular-local-storage.js | 761 +- .../angular-object-diff/angular-object-diff.js | 16 +- .../angular-permission/angular-permission.js | 15 +- .../angular-resource/angular-resource.js | 24 +- .../angular-sanitize/angular-sanitize.js | 2 +- .../angular-scenario/angular-scenario.js | 4182 ++++-- .../angular-smart-table/smart-table.js | 17 +- .../angular-spinner/angular-spinner.js | 5 +- .../angular-timer/angular-timer.js | 28 +- .../angular-touch/angular-touch.js | 5 +- .../pagination/less/pagination.less | 32 +- .../bower_components/angular-ui-grid/ui-grid.css | 46 +- .../bower_components/angular-ui-grid/ui-grid.eot | Bin 8728 -> 8728 bytes public/bower_components/angular-ui-grid/ui-grid.js | 413 +- .../bower_components/angular-ui-grid/ui-grid.svg | 2 +- .../bower_components/angular-ui-grid/ui-grid.ttf | Bin 8564 -> 8564 bytes .../bower_components/angular-ui-grid/ui-grid.woff | Bin 4792 -> 4792 bytes .../angular-ui-router/angular-ui-router.js | 551 +- .../angular-xeditable/xeditable.css | 121 +- .../angular-xeditable/xeditable.js | 221 +- public/bower_components/angular/angular.js | 10 +- public/bower_components/avatar/avatar.js | 197 - public/bower_components/avatar/md5.js | 168 - .../ckeditor-freeparams-plugin/.bower.json | 3 +- public/bower_components/es5-shim/es5-shim.js | 2 +- .../font-awesome/font-awesome.less | 2 +- .../font-awesome/font-awesome.scss | 2 +- public/bower_components/jquery-migrate/.bower.json | 2 +- .../bower_components/jquery-slimscroll/.bower.json | 2 +- .../jquery.actual/jquery.actual.js | 2 +- public/bower_components/lodash/.bower.json | 13 +- .../lodash/.github/CONTRIBUTING.md | 35 +- public/bower_components/lodash/.gitignore | 2 + public/bower_components/lodash/.jscsrc | 1 + .../lodash/.markdown-doctest-setup.js | 44 + public/bower_components/lodash/.travis.yml | 31 +- public/bower_components/lodash/CODE_OF_CONDUCT.md | 49 - public/bower_components/lodash/LICENSE | 64 +- public/bower_components/lodash/README.md | 36 +- public/bower_components/lodash/dist/lodash.core.js | 1099 +- .../lodash/dist/lodash.core.min.js | 51 +- public/bower_components/lodash/dist/lodash.fp.js | 539 +- .../bower_components/lodash/dist/lodash.fp.min.js | 27 +- public/bower_components/lodash/dist/lodash.js | 4763 ++++-- public/bower_components/lodash/dist/lodash.min.js | 239 +- public/bower_components/lodash/dist/mapping.fp.js | 134 +- public/bower_components/lodash/doc/README.md | 3221 +++-- public/bower_components/lodash/fp/_baseConvert.js | 388 +- .../bower_components/lodash/fp/_convertBrowser.js | 5 +- public/bower_components/lodash/fp/_mapping.js | 134 +- public/bower_components/lodash/fp/placeholder.js | 6 + public/bower_components/lodash/lib/common/file.js | 71 + .../bower_components/lodash/lib/common/mapping.js | 9 + .../bower_components/lodash/lib/common/minify.js | 13 + .../lodash/lib/common/uglify.options.js | 9 +- public/bower_components/lodash/lib/common/util.js | 43 +- .../bower_components/lodash/lib/fp/build-dist.js | 4 +- public/bower_components/lodash/lib/fp/build-doc.js | 19 +- .../lodash/lib/fp/build-modules.js | 26 +- .../lodash/lib/fp/template/doc/wiki.jst | 226 +- .../lib/fp/template/modules/_falseOptions.jst | 7 + .../lodash/lib/fp/template/modules/_util.jst | 1 + .../lodash/lib/fp/template/modules/convert.jst | 3 +- .../lodash/lib/fp/template/modules/module.jst | 7 +- .../lodash/lib/fp/template/modules/thru.jst | 6 +- .../bower_components/lodash/lib/main/build-dist.js | 9 +- .../bower_components/lodash/lib/main/build-doc.js | 9 +- .../lodash/lib/main/build-modules.js | 4 +- public/bower_components/lodash/lodash.js | 4762 ++++-- public/bower_components/lodash/package.json | 66 +- public/bower_components/lodash/perf/perf.js | 14 +- .../bower_components/lodash/test/asset/worker.js | 5 +- public/bower_components/lodash/test/index.html | 9 + public/bower_components/lodash/test/saucelabs.js | 37 +- public/bower_components/lodash/test/test-fp.js | 586 +- public/bower_components/lodash/test/test.js | 5049 ++++-- .../bower_components/lodash/test/underscore.html | 8 +- .../lodash/vendor/backbone/backbone.js | 27 +- .../lodash/vendor/backbone/test/collection.js | 21 +- .../lodash/vendor/backbone/test/events.js | 25 + .../lodash/vendor/backbone/test/model.js | 37 +- .../lodash/vendor/backbone/test/view.js | 5 + .../lodash/vendor/underscore/test/functions.js | 12 +- .../lodash/vendor/underscore/test/objects.js | 102 + .../lodash/vendor/underscore/underscore.js | 27 +- public/bower_components/momentjs/moment.js | 237 +- .../ng-scrollbars/scrollbars.min.js | 2 +- .../bower_components/rangy/rangy-classapplier.js | 1103 -- public/bower_components/rangy/rangy-core.js | 3845 ---- public/bower_components/rangy/rangy-highlighter.js | 620 - .../rangy/rangy-selectionsaverestore.js | 252 - public/bower_components/rangy/rangy-serializer.js | 314 - public/bower_components/rangy/rangy-textrange.js | 1930 -- public/bower_components/requirejs/require.js | 2129 --- public/bower_components/select2/select2.js | 40 +- .../simple-line-icons/Simple-Line-Icons.eot | Bin 53572 -> 0 bytes .../simple-line-icons/Simple-Line-Icons.svg | 211 - .../simple-line-icons/Simple-Line-Icons.ttf | Bin 53368 -> 0 bytes .../simple-line-icons/Simple-Line-Icons.woff | Bin 53444 -> 0 bytes .../simple-line-icons/Simple-Line-Icons.woff2 | Bin 26384 -> 0 bytes .../simple-line-icons/simple-line-icons.css | 16 +- .../simple-line-icons/simple-line-icons.less | 10 +- .../simple-line-icons/simple-line-icons.scss | 10 +- .../textAngular/textAngular-sanitize.js | 783 - .../bower_components/textAngular/textAngular.css | 193 - public/bower_components/textAngular/textAngular.js | 3068 ---- .../textAngular/textAngularSetup.js | 834 - public/bower_components/ui-iconpicker/.bower.json | 43 - public/bower_components/ui-iconpicker/.bowerrc | 3 - public/bower_components/ui-iconpicker/.gitignore | 10 - public/bower_components/ui-iconpicker/LICENSE | 20 - public/bower_components/ui-iconpicker/README.md | 89 - public/bower_components/ui-iconpicker/bower.json | 32 - .../ui-iconpicker/dist/scripts/ui-iconpicker.js | 277 - .../dist/scripts/ui-iconpicker.min.js | 6 - .../ui-iconpicker/dist/styles/ui-iconpicker.css | 247 - .../dist/styles/ui-iconpicker.min.css | 6 - .../ui-iconpicker/gruntfile.coffee | 289 - public/bower_components/ui-iconpicker/package.json | 39 - .../ui-iconpicker/src/scripts/config.coffee | 32 - .../src/scripts/directives/ui-iconpicker.coffee | 71 - .../scripts/services/IconGroupCollection.coffee | 83 - .../src/scripts/templates/iconpicker.coffee | 61 - .../ui-iconpicker/src/scripts/ui-iconpicker.coffee | 42 - .../src/scripts/values/icon-groups-map.coffee | 658 - .../ui-iconpicker/src/styles/_variables.scss | 46 - .../ui-iconpicker/src/styles/ui-iconpicker.scss | 133 - public/bower_components/ui-select/select.css | 267 - public/bower_components/ui-select/select.js | 2089 --- .../webcomponentsjs/webcomponents.js | 27 +- public/index.html | 6 +- release-notes/changelog_0.0.141.txt | 15 +- server/api/_apidoc.js | 22 +- server/api/action/action.controller.js | 89 +- server/api/action/action.events.js | 37 +- server/api/action/action.socket.js | 33 +- server/api/action/index.js | 14 +- server/api/agent/agent.controller.js | 1145 ++- server/api/agent/agent.events.js | 37 +- server/api/agent/agent.socket.js | 52 +- server/api/agent/index.js | 313 +- server/api/ami/ami.ami.js | 37 +- server/api/ami/ami.controller.js | 38 +- server/api/ami/ami.events.js | 37 +- server/api/ami/ami.socket.js | 33 +- server/api/ami/index.js | 13 +- server/api/automation/automation.controller.js | 206 +- server/api/automation/automation.events.js | 37 +- server/api/automation/automation.socket.js | 29 +- server/api/automation/index.js | 17 +- .../api/canned_answer/canned_answer.controller.js | 132 +- server/api/canned_answer/canned_answer.events.js | 37 +- server/api/canned_answer/canned_answer.socket.js | 29 +- server/api/canned_answer/index.js | 17 +- server/api/chanspy/chanspy.controller.js | 108 +- server/api/chanspy/chanspy.events.js | 37 +- server/api/chanspy/chanspy.socket.js | 29 +- server/api/chanspy/index.js | 17 +- .../chat_application.controller.js | 98 +- .../chat_application/chat_application.events.js | 37 +- .../chat_application/chat_application.socket.js | 29 +- server/api/chat_application/index.js | 18 +- .../chat_disposition.controller.js | 112 +- .../chat_disposition/chat_disposition.events.js | 37 +- .../chat_disposition/chat_disposition.socket.js | 33 +- server/api/chat_disposition/index.js | 19 +- server/api/chat_enquiry/enquiry.controller.js | 124 +- server/api/chat_enquiry/enquiry.events.js | 37 +- server/api/chat_enquiry/enquiry.socket.js | 29 +- server/api/chat_enquiry/index.js | 20 +- server/api/chat_message/chat_message.controller.js | 107 +- server/api/chat_message/chat_message.events.js | 37 +- server/api/chat_message/chat_message.socket.js | 63 +- server/api/chat_message/index.js | 19 +- .../chat_proactive_action.controller.js | 113 +- .../chat_proactive_action.events.js | 37 +- .../chat_proactive_action.socket.js | 29 +- server/api/chat_proactive_action/index.js | 18 +- server/api/chat_queue/chat_queue.controller.js | 238 +- server/api/chat_queue/chat_queue.events.js | 37 +- server/api/chat_queue/chat_queue.socket.js | 29 +- server/api/chat_queue/index.js | 24 +- server/api/chat_room/chat_room.controller.js | 656 +- server/api/chat_room/chat_room.events.js | 37 +- server/api/chat_room/chat_room.socket.js | 29 +- server/api/chat_room/index.js | 33 +- server/api/chat_visitor/chat_visitor.controller.js | 105 +- server/api/chat_visitor/chat_visitor.events.js | 37 +- server/api/chat_visitor/chat_visitor.socket.js | 29 +- server/api/chat_visitor/index.js | 18 +- server/api/chat_website/chat_website.controller.js | 576 +- server/api/chat_website/chat_website.events.js | 37 +- server/api/chat_website/chat_website.socket.js | 29 +- server/api/chat_website/index.js | 41 +- .../chat_websites_field.controller.js | 113 +- .../chat_websites_field.events.js | 37 +- .../chat_websites_field.socket.js | 29 +- server/api/chat_websites_field/index.js | 19 +- server/api/company/company.controller.js | 147 +- server/api/company/company.events.js | 37 +- server/api/company/company.socket.js | 29 +- server/api/company/index.js | 19 +- .../contact_manager/contact_manager.controller.js | 709 +- .../api/contact_manager/contact_manager.events.js | 37 +- .../api/contact_manager/contact_manager.socket.js | 29 +- server/api/contact_manager/index.js | 24 +- .../api/custom_report/custom_report.controller.js | 570 +- server/api/custom_report/custom_report.events.js | 37 +- server/api/custom_report/custom_report.socket.js | 29 +- server/api/custom_report/index.js | 25 +- server/api/dashboard/dashboard.controller.js | 321 +- server/api/dashboard/dashboard.events.js | 37 +- server/api/dashboard/dashboard.socket.js | 29 +- server/api/dashboard/index.js | 20 +- .../default_metric/default_metric.controller.js | 159 +- server/api/default_metric/index.js | 20 +- .../default_report/default_report.controller.js | 405 +- server/api/default_report/default_report.events.js | 37 +- server/api/default_report/default_report.socket.js | 29 +- server/api/default_report/index.js | 22 +- server/api/desk_account/desk_account.controller.js | 256 +- server/api/desk_account/desk_account.events.js | 37 +- server/api/desk_account/desk_account.socket.js | 29 +- server/api/desk_account/index.js | 19 +- .../desk_configuration.controller.js | 146 +- .../desk_configuration.events.js | 37 +- .../desk_configuration.socket.js | 29 +- server/api/desk_configuration/index.js | 19 +- server/api/desk_field/desk_field.controller.js | 105 +- server/api/desk_field/desk_field.events.js | 37 +- server/api/desk_field/desk_field.socket.js | 29 +- server/api/desk_field/index.js | 17 +- .../extracted_report.controller.js | 208 +- .../extracted_report/extracted_report.events.js | 37 +- .../extracted_report/extracted_report.socket.js | 29 +- server/api/extracted_report/index.js | 18 +- server/api/fax_account/fax_account.controller.js | 471 +- server/api/fax_account/fax_account.events.js | 37 +- server/api/fax_account/fax_account.socket.js | 29 +- server/api/fax_account/index.js | 32 +- .../fax_application/fax_application.controller.js | 95 +- .../api/fax_application/fax_application.events.js | 37 +- .../api/fax_application/fax_application.socket.js | 29 +- server/api/fax_application/index.js | 16 +- .../fax_attachment/fax_attachment.controller.js | 141 +- server/api/fax_attachment/fax_attachment.events.js | 37 +- server/api/fax_attachment/fax_attachment.socket.js | 29 +- server/api/fax_attachment/index.js | 17 +- .../fax_disposition/fax_disposition.controller.js | 113 +- .../api/fax_disposition/fax_disposition.events.js | 37 +- .../api/fax_disposition/fax_disposition.socket.js | 29 +- server/api/fax_disposition/index.js | 17 +- server/api/fax_message/fax_message.ami.js | 65 +- server/api/fax_message/fax_message.controller.js | 176 +- server/api/fax_message/fax_message.events.js | 37 +- server/api/fax_message/fax_message.socket.js | 29 +- server/api/fax_message/index.js | 31 +- server/api/fax_queue/fax_queue.controller.js | 214 +- server/api/fax_queue/fax_queue.events.js | 37 +- server/api/fax_queue/fax_queue.socket.js | 29 +- server/api/fax_queue/index.js | 21 +- server/api/fax_room/fax_room.controller.js | 475 +- server/api/fax_room/fax_room.events.js | 37 +- server/api/fax_room/fax_room.socket.js | 70 +- server/api/fax_room/index.js | 32 +- .../freshdesk_account.controller.js | 240 +- .../freshdesk_account/freshdesk_account.events.js | 37 +- .../freshdesk_account/freshdesk_account.socket.js | 29 +- server/api/freshdesk_account/index.js | 22 +- .../freshdesk_configuration.controller.js | 147 +- .../freshdesk_configuration.events.js | 37 +- .../freshdesk_configuration.socket.js | 29 +- server/api/freshdesk_configuration/index.js | 20 +- .../freshdesk_field/freshdesk_field.controller.js | 105 +- .../api/freshdesk_field/freshdesk_field.events.js | 37 +- .../api/freshdesk_field/freshdesk_field.socket.js | 29 +- server/api/freshdesk_field/index.js | 19 +- server/api/integration/index.js | 16 +- server/api/integration/integration.controller.js | 169 +- server/api/integration/integration.events.js | 37 +- server/api/integration/integration.socket.js | 29 +- server/api/interval/index.js | 202 +- server/api/interval/interval.controller.js | 196 +- server/api/interval/interval.events.js | 37 +- server/api/interval/interval.socket.js | 29 +- server/api/jscripty_project/index.js | 34 +- .../jscripty_project.controller.js | 1027 ++- .../jscripty_project/jscripty_project.events.js | 37 +- .../jscripty_project/jscripty_project.socket.js | 29 +- server/api/license/index.js | 13 +- server/api/license/license.controller.js | 136 +- server/api/list/index.js | 29 +- server/api/list/list.controller.js | 464 +- server/api/list/list.events.js | 37 +- server/api/list/list.socket.js | 29 +- server/api/mail_account/index.js | 30 +- server/api/mail_account/mail_account.controller.js | 488 +- server/api/mail_account/mail_account.events.js | 37 +- server/api/mail_account/mail_account.socket.js | 29 +- server/api/mail_application/index.js | 18 +- .../mail_application.controller.js | 103 +- .../mail_application/mail_application.events.js | 37 +- .../mail_application/mail_application.socket.js | 29 +- server/api/mail_attachment/index.js | 18 +- .../mail_attachment/mail_attachment.controller.js | 98 +- .../api/mail_attachment/mail_attachment.events.js | 37 +- .../api/mail_attachment/mail_attachment.socket.js | 29 +- server/api/mail_disposition/index.js | 19 +- .../mail_disposition.controller.js | 112 +- .../mail_disposition/mail_disposition.events.js | 37 +- .../mail_disposition/mail_disposition.socket.js | 29 +- server/api/mail_message/index.js | 22 +- server/api/mail_message/mail_message.controller.js | 208 +- server/api/mail_message/mail_message.events.js | 37 +- server/api/mail_message/mail_message.socket.js | 29 +- server/api/mail_queue/index.js | 22 +- server/api/mail_queue/mail_queue.controller.js | 236 +- server/api/mail_queue/mail_queue.events.js | 37 +- server/api/mail_queue/mail_queue.socket.js | 29 +- server/api/mail_room/index.js | 33 +- server/api/mail_room/mail_room.controller.js | 480 +- server/api/mail_room/mail_room.events.js | 37 +- server/api/mail_room/mail_room.socket.js | 29 +- server/api/mail_server_in/index.js | 18 +- .../mail_server_in/mail_server_in.controller.js | 97 +- server/api/mail_server_in/mail_server_in.events.js | 37 +- server/api/mail_server_in/mail_server_in.socket.js | 43 +- server/api/mail_server_out/index.js | 20 +- .../mail_server_out/mail_server_out.controller.js | 158 +- .../api/mail_server_out/mail_server_out.events.js | 37 +- .../api/mail_server_out/mail_server_out.socket.js | 43 +- server/api/metric/index.js | 19 +- server/api/metric/metric.controller.js | 136 +- server/api/metric/metric.events.js | 37 +- server/api/metric/metric.socket.js | 55 +- server/api/module/index.js | 12 +- server/api/module/module.controller.js | 29 +- server/api/module/module.events.js | 37 +- server/api/module/module.socket.js | 29 +- server/api/motionbar/index.js | 12 +- server/api/motionbar/motionbar.controller.js | 33 +- server/api/motionbar/motionbar.events.js | 37 +- server/api/motionbar/motionbar.socket.js | 31 +- server/api/network_externip/index.js | 17 +- .../network_externip.controller.js | 132 +- .../network_externip/network_externip.events.js | 37 +- .../network_externip/network_externip.socket.js | 29 +- server/api/network_localnet/index.js | 17 +- .../network_localnet.controller.js | 129 +- .../network_localnet/network_localnet.events.js | 37 +- .../network_localnet/network_localnet.socket.js | 29 +- server/api/openchannel_account/index.js | 30 +- .../openchannel_account.controller.js | 524 +- .../openchannel_account.events.js | 37 +- .../openchannel_account.socket.js | 33 +- server/api/openchannel_application/index.js | 16 +- .../openchannel_application.controller.js | 130 +- .../openchannel_application.events.js | 37 +- .../openchannel_application.socket.js | 33 +- server/api/openchannel_disposition/index.js | 17 +- .../openchannel_disposition.controller.js | 111 +- .../openchannel_disposition.events.js | 37 +- .../openchannel_disposition.socket.js | 33 +- server/api/openchannel_message/index.js | 19 +- .../openchannel_message.controller.js | 171 +- .../openchannel_message.events.js | 37 +- .../openchannel_message.socket.js | 48 +- server/api/openchannel_queue/index.js | 23 +- .../openchannel_queue.controller.js | 247 +- .../openchannel_queue/openchannel_queue.events.js | 37 +- .../openchannel_queue/openchannel_queue.socket.js | 33 +- server/api/openchannel_room/index.js | 26 +- .../openchannel_room.controller.js | 400 +- .../openchannel_room/openchannel_room.events.js | 37 +- .../openchannel_room/openchannel_room.socket.js | 34 +- server/api/pause/index.js | 163 +- server/api/pause/pause.controller.js | 151 +- server/api/pause/pause.events.js | 37 +- server/api/pause/pause.socket.js | 29 +- server/api/report_agent/index.js | 14 +- server/api/report_agent/report_agent.controller.js | 108 +- server/api/report_agent/report_agent.events.js | 37 +- server/api/report_agent/report_agent.socket.js | 31 +- server/api/report_call/index.js | 20 +- server/api/report_call/report_call.controller.js | 177 +- server/api/report_call/report_call.events.js | 37 +- server/api/report_call/report_call.socket.js | 29 +- server/api/report_chat/index.js | 15 +- server/api/report_chat/report_chat.controller.js | 164 +- server/api/report_chat/report_chat.events.js | 37 +- server/api/report_chat/report_chat.socket.js | 43 +- server/api/report_chat_session/index.js | 20 +- .../report_chat_session.controller.js | 226 +- .../report_chat_session.events.js | 37 +- .../report_chat_session.socket.js | 103 +- server/api/report_dial/index.js | 15 +- server/api/report_dial/report_dial.controller.js | 117 +- server/api/report_dial/report_dial.events.js | 37 +- server/api/report_dial/report_dial.socket.js | 31 +- server/api/report_fax/index.js | 14 +- server/api/report_fax/report_fax.controller.js | 128 +- server/api/report_fax/report_fax.events.js | 37 +- server/api/report_fax/report_fax.socket.js | 45 +- server/api/report_fax_session/index.js | 16 +- .../report_fax_session.controller.js | 239 +- .../report_fax_session.events.js | 37 +- .../report_fax_session.socket.js | 105 +- server/api/report_integration/index.js | 14 +- .../report_integration.controller.js | 47 +- .../report_integration.events.js | 35 +- .../report_integration.socket.js | 42 +- server/api/report_mail/index.js | 15 +- server/api/report_mail/report_mail.controller.js | 114 +- server/api/report_mail/report_mail.events.js | 37 +- server/api/report_mail/report_mail.socket.js | 47 +- server/api/report_mail_session/index.js | 17 +- .../report_mail_session.controller.js | 156 +- .../report_mail_session.events.js | 37 +- .../report_mail_session.socket.js | 105 +- server/api/report_member/index.js | 13 +- .../api/report_member/report_member.controller.js | 35 +- server/api/report_member/report_member.events.js | 37 +- server/api/report_member/report_member.socket.js | 46 +- server/api/report_openchannel/index.js | 15 +- .../report_openchannel.controller.js | 118 +- .../report_openchannel.events.js | 37 +- .../report_openchannel.socket.js | 46 +- server/api/report_openchannel_session/index.js | 17 +- .../report_openchannel_session.controller.js | 156 +- .../report_openchannel_session.events.js | 37 +- .../report_openchannel_session.socket.js | 91 +- server/api/report_queue/index.js | 28 +- server/api/report_queue/report_queue.controller.js | 627 +- server/api/report_queue/report_queue.events.js | 37 +- server/api/report_queue/report_queue.socket.js | 94 +- server/api/report_sms/index.js | 17 +- server/api/report_sms/report_sms.controller.js | 180 +- server/api/report_sms/report_sms.events.js | 37 +- server/api/report_sms/report_sms.socket.js | 47 +- server/api/report_sms_session/index.js | 17 +- .../report_sms_session.controller.js | 156 +- .../report_sms_session.events.js | 37 +- .../report_sms_session.socket.js | 105 +- server/api/report_square/index.js | 15 +- .../api/report_square/report_square.controller.js | 73 +- server/api/report_square/report_square.events.js | 37 +- server/api/report_square/report_square.socket.js | 45 +- server/api/report_square_detail/index.js | 14 +- .../report_square_detail.controller.js | 45 +- .../report_square_detail.events.js | 37 +- .../report_square_detail.socket.js | 46 +- server/api/report_tree/index.js | 13 +- server/api/report_tree/report_tree.controller.js | 44 +- server/api/report_tree/report_tree.events.js | 37 +- server/api/report_tree/report_tree.socket.js | 33 +- server/api/salesforce_account/index.js | 29 +- .../salesforce_account.controller.js | 520 +- .../salesforce_account.events.js | 37 +- .../salesforce_account.socket.js | 33 +- server/api/salesforce_configuration/index.js | 18 +- .../salesforce_configuration.controller.js | 148 +- .../salesforce_configuration.events.js | 37 +- .../salesforce_configuration.socket.js | 33 +- server/api/salesforce_field/index.js | 18 +- .../salesforce_field.controller.js | 105 +- .../salesforce_field/salesforce_field.events.js | 37 +- .../salesforce_field/salesforce_field.socket.js | 33 +- server/api/scheduler/index.js | 20 +- server/api/scheduler/scheduler.controller.js | 131 +- server/api/scheduler/scheduler.events.js | 37 +- server/api/scheduler/scheduler.socket.js | 33 +- server/api/setting/index.js | 29 +- server/api/setting/setting.controller.js | 423 +- server/api/setting/setting.events.js | 37 +- server/api/setting/setting.socket.js | 33 +- server/api/sms_account/index.js | 32 +- server/api/sms_account/sms_account.controller.js | 675 +- server/api/sms_account/sms_account.events.js | 37 +- server/api/sms_account/sms_account.socket.js | 33 +- server/api/sms_application/index.js | 16 +- .../sms_application/sms_application.controller.js | 131 +- .../api/sms_application/sms_application.events.js | 37 +- .../api/sms_application/sms_application.socket.js | 33 +- server/api/sms_disposition/index.js | 17 +- .../sms_disposition/sms_disposition.controller.js | 96 +- .../api/sms_disposition/sms_disposition.events.js | 37 +- .../api/sms_disposition/sms_disposition.socket.js | 33 +- server/api/sms_message/index.js | 19 +- server/api/sms_message/sms_message.controller.js | 171 +- server/api/sms_message/sms_message.events.js | 37 +- server/api/sms_message/sms_message.socket.js | 48 +- server/api/sms_queue/index.js | 22 +- server/api/sms_queue/sms_queue.controller.js | 243 +- server/api/sms_queue/sms_queue.events.js | 37 +- server/api/sms_queue/sms_queue.socket.js | 33 +- server/api/sms_room/index.js | 27 +- server/api/sms_room/sms_room.controller.js | 400 +- server/api/sms_room/sms_room.events.js | 37 +- server/api/sms_room/sms_room.socket.js | 34 +- server/api/sound/index.js | 18 +- server/api/sound/sound.controller.js | 279 +- server/api/sound/sound.events.js | 37 +- server/api/sound/sound.socket.js | 33 +- server/api/square_odbc/index.js | 18 +- server/api/square_odbc/square_odbc.controller.js | 136 +- server/api/square_odbc/square_odbc.events.js | 37 +- server/api/square_odbc/square_odbc.socket.js | 33 +- server/api/square_project/index.js | 18 +- .../square_project/square_project.controller.js | 134 +- server/api/square_project/square_project.events.js | 37 +- server/api/square_project/square_project.socket.js | 33 +- server/api/square_recording/index.js | 18 +- .../square_recording.controller.js | 173 +- .../square_recording/square_recording.events.js | 37 +- .../square_recording/square_recording.socket.js | 33 +- server/api/sugarcrm_account/index.js | 21 +- .../sugarcrm_account.controller.js | 203 +- .../sugarcrm_account/sugarcrm_account.events.js | 37 +- .../sugarcrm_account/sugarcrm_account.socket.js | 33 +- server/api/sugarcrm_configuration/index.js | 18 +- .../sugarcrm_configuration.controller.js | 146 +- .../sugarcrm_configuration.events.js | 37 +- .../sugarcrm_configuration.socket.js | 33 +- server/api/sugarcrm_field/index.js | 18 +- .../sugarcrm_field/sugarcrm_field.controller.js | 105 +- server/api/sugarcrm_field/sugarcrm_field.events.js | 37 +- server/api/sugarcrm_field/sugarcrm_field.socket.js | 33 +- server/api/tag/index.js | 172 +- server/api/tag/tag.controller.js | 210 +- server/api/tag/tag.events.js | 37 +- server/api/tag/tag.socket.js | 33 +- server/api/team/index.js | 248 +- server/api/team/team.controller.js | 253 +- server/api/team/team.events.js | 37 +- server/api/team/team.socket.js | 33 +- server/api/telephone/index.js | 175 +- server/api/telephone/telephone.controller.js | 158 +- server/api/telephone/telephone.events.js | 37 +- server/api/telephone/telephone.socket.js | 33 +- server/api/template/index.js | 183 +- server/api/template/template.controller.js | 109 +- server/api/template/template.events.js | 37 +- server/api/template/template.socket.js | 33 +- server/api/trigger/index.js | 262 +- server/api/trigger/trigger.controller.js | 206 +- server/api/trigger/trigger.events.js | 37 +- server/api/trigger/trigger.socket.js | 33 +- server/api/trunk/index.js | 227 +- server/api/trunk/trunk.controller.js | 112 +- server/api/trunk/trunk.events.js | 37 +- server/api/trunk/trunk.socket.js | 48 +- server/api/update/index.js | 14 +- server/api/update/update.controller.js | 49 +- server/api/user/index.js | 262 +- server/api/user/user.controller.js | 735 +- server/api/user/user.events.js | 37 +- server/api/user/user.socket.js | 35 +- server/api/user_has_chat_queue/index.js | 16 +- .../user_has_chat_queue.controller.js | 104 +- .../user_has_chat_queue.events.js | 37 +- .../user_has_chat_queue.socket.js | 33 +- .../user_has_chat_queue_permit.events.js | 36 +- .../user_has_chat_queue_permit.socket.js | 35 +- server/api/user_has_chat_room/index.js | 17 +- .../user_has_chat_room.controller.js | 97 +- .../user_has_chat_room.events.js | 37 +- .../user_has_chat_room.socket.js | 61 +- server/api/user_has_fax_queue/index.js | 16 +- .../user_has_fax_queue.controller.js | 104 +- .../user_has_fax_queue.events.js | 37 +- .../user_has_fax_queue.socket.js | 33 +- .../user_has_fax_queue_permit.events.js | 36 +- .../user_has_fax_queue_permit.socket.js | 35 +- server/api/user_has_list/index.js | 16 +- .../api/user_has_list/user_has_list.controller.js | 99 +- server/api/user_has_list/user_has_list.events.js | 37 +- server/api/user_has_list/user_has_list.socket.js | 33 +- server/api/user_has_mail_queue/index.js | 16 +- .../user_has_mail_queue.controller.js | 96 +- .../user_has_mail_queue.events.js | 37 +- .../user_has_mail_queue.socket.js | 33 +- .../user_has_mail_queue_permit.events.js | 36 +- .../user_has_mail_queue_permit.socket.js | 35 +- server/api/user_has_openchannel_queue/index.js | 17 +- .../user_has_openchannel_queue.controller.js | 110 +- .../user_has_openchannel_queue.events.js | 37 +- .../user_has_openchannel_queue.socket.js | 33 +- .../user_has_openchannel_queue_permit.events.js | 36 +- .../user_has_openchannel_queue_permit.socket.js | 35 +- server/api/user_has_sms_queue/index.js | 16 +- .../user_has_sms_queue.controller.js | 104 +- .../user_has_sms_queue.events.js | 37 +- .../user_has_sms_queue.socket.js | 33 +- .../user_has_sms_queue_permit.events.js | 36 +- .../user_has_sms_queue_permit.socket.js | 35 +- server/api/user_has_team/index.js | 16 +- .../api/user_has_team/user_has_team.controller.js | 97 +- server/api/user_has_team/user_has_team.events.js | 37 +- server/api/user_has_team/user_has_team.socket.js | 33 +- server/api/user_has_voice_queue/index.js | 16 +- .../user_has_voice_queue.controller.js | 99 +- .../user_has_voice_queue.events.js | 37 +- .../user_has_voice_queue.socket.js | 59 +- .../user_has_voice_queue_permit.events.js | 36 +- .../user_has_voice_queue_permit.socket.js | 35 +- server/api/variable/index.js | 167 +- server/api/variable/variable.controller.js | 118 +- server/api/variable/variable.events.js | 37 +- server/api/variable/variable.socket.js | 33 +- server/api/voice_context/index.js | 17 +- .../api/voice_context/voice_context.controller.js | 228 +- server/api/voice_context/voice_context.events.js | 37 +- server/api/voice_context/voice_context.socket.js | 33 +- server/api/voice_disposition/index.js | 19 +- .../voice_disposition.controller.js | 113 +- .../voice_disposition/voice_disposition.events.js | 37 +- .../voice_disposition/voice_disposition.socket.js | 33 +- server/api/voice_extension/index.js | 17 +- .../voice_extension/voice_extension.controller.js | 149 +- .../api/voice_extension/voice_extension.events.js | 37 +- .../api/voice_extension/voice_extension.socket.js | 33 +- server/api/voice_musiconhold/index.js | 22 +- .../voice_musiconhold.controller.js | 291 +- .../voice_musiconhold/voice_musiconhold.events.js | 37 +- .../voice_musiconhold/voice_musiconhold.socket.js | 33 +- server/api/voice_queue/index.js | 21 +- server/api/voice_queue/voice_queue.controller.js | 305 +- server/api/voice_queue/voice_queue.events.js | 37 +- server/api/voice_queue/voice_queue.socket.js | 87 +- server/api/voice_recording/index.js | 20 +- .../voice_recording/voice_recording.controller.js | 216 +- .../api/voice_recording/voice_recording.events.js | 37 +- .../api/voice_recording/voice_recording.socket.js | 33 +- server/api/voice_voicemail/index.js | 18 +- .../voice_voicemail/voice_voicemail.controller.js | 191 +- .../api/voice_voicemail/voice_voicemail.events.js | 37 +- .../api/voice_voicemail/voice_voicemail.socket.js | 33 +- server/api/voice_voicemail_messages/index.js | 16 +- .../voice_voicemail_messages.controller.js | 107 +- .../voice_voicemail_messages.events.js | 37 +- .../voice_voicemail_messages.socket.js | 33 +- server/api/widget/index.js | 14 +- server/api/widget/widget.controller.js | 148 +- server/api/xchatty/index.js | 29 +- server/api/xchatty/xchatty.controller.js | 1127 ++- server/api/zendesk_account/index.js | 29 +- .../zendesk_account/zendesk_account.controller.js | 516 +- .../api/zendesk_account/zendesk_account.events.js | 37 +- .../api/zendesk_account/zendesk_account.socket.js | 33 +- server/api/zendesk_configuration/index.js | 17 +- .../zendesk_configuration.controller.js | 182 +- .../zendesk_configuration.events.js | 37 +- .../zendesk_configuration.socket.js | 33 +- server/api/zendesk_field/index.js | 15 +- .../api/zendesk_field/zendesk_field.controller.js | 94 +- server/api/zendesk_field/zendesk_field.events.js | 37 +- server/api/zendesk_field/zendesk_field.socket.js | 33 +- server/app.js | 114 +- server/auth/auth.service.js | 151 +- server/auth/facebook/index.js | 22 +- server/auth/facebook/passport.js | 38 +- server/auth/google/index.js | 25 +- server/auth/google/passport.js | 34 +- server/auth/index.js | 23 +- server/auth/local/index.js | 214 +- server/auth/local/local.ami.js | 52 +- server/auth/local/passport.js | 43 +- server/auth/twitter/index.js | 21 +- server/auth/twitter/passport.js | 36 +- server/config/agi/agi.js | 1960 ++- server/config/agi/index.js | 128 +- server/config/ami/action.js | 725 +- server/config/ami/acw.js | 153 +- server/config/ami/agent.js | 98 +- server/config/ami/call.js | 61 +- server/config/ami/cleaner.js | 111 +- server/config/ami/dial.js | 85 +- server/config/ami/fax.js | 583 +- server/config/ami/index.js | 332 +- server/config/ami/member.js | 99 +- server/config/ami/network.js | 85 +- server/config/ami/queue_caller.js | 74 +- server/config/ami/queue_member.js | 56 +- server/config/ami/recording.js | 59 +- server/config/ami/socket.js | 20 +- server/config/ami/transfer.js | 55 +- server/config/ami/trunk.js | 175 +- server/config/ami/user.js | 63 +- server/config/ami/voice_context.js | 101 +- server/config/analytics.js | 1 - server/config/autodialer/index.js | 126 +- server/config/autodialer/process.js | 27 +- server/config/automations/chat.js | 175 +- server/config/automations/fax.js | 179 +- server/config/automations/mail.js | 178 +- server/config/chat.js | 110 +- server/config/express.js | 81 +- server/config/fax.js | 241 +- server/config/history/history.js | 132 +- server/config/history/reportMove.js | 51 +- server/config/imap/imap.js | 106 +- server/config/imap/index.js | 601 +- server/config/integration.js | 25 +- server/config/integrations/index.js | 88 +- server/config/integrations/motionbar.js | 102 +- server/config/integrations/salesforce.js | 584 +- server/config/integrations/zendesk.js | 638 +- server/config/license/hardware.js | 60 +- server/config/license/index.js | 88 +- server/config/license/license.service.js | 366 +- server/config/local.env.sample.js | 24 +- server/config/logger.js | 121 +- server/config/openchannel/custom.js | 275 +- server/config/openchannel/index.js | 24 +- server/config/routing/agent.js | 119 +- server/config/routing/fidelity.js | 106 +- server/config/routing/queue.js | 302 +- server/config/routing/replyMail.js | 87 +- server/config/routing/scheduler.js | 476 +- server/config/routing/sendMail.js | 87 +- server/config/routing/sendSms.js | 55 +- server/config/routing/structure.js | 128 +- server/config/scheduler/index.js | 104 +- server/config/scheduler/reports.js | 229 +- server/config/seed.js | 3958 +++++- server/config/seedp.js | 5820 ++++++- server/config/sms/index.js | 24 +- server/config/sms/skebby.js | 111 +- server/config/sms/sms.js | 285 +- server/config/sms/twilio.js | 23 +- server/config/smtp/index.js | 131 +- server/config/smtp/smtp.js | 385 +- server/config/socketio.js | 287 +- server/config/tools/channelSpy.js | 110 +- server/config/tools/chatRoom.js | 105 +- server/config/tools/dashboard.js | 1249 ++- server/config/tools/faxAccount.js | 258 +- server/config/tools/faxRoom.js | 36 +- server/config/tools/index.js | 27 +- server/config/tools/interval.js | 75 +- server/config/tools/mailAccount.js | 41 +- server/config/tools/mailRoom.js | 36 +- server/config/tools/openchannelRoom.js | 27 +- server/config/tools/queueParameters.js | 385 +- server/config/tools/smsRoom.js | 27 +- server/config/tools/system.js | 61 +- server/config/tools/user.js | 220 +- server/config/triggers/chat.js | 157 +- server/config/triggers/cm.js | 26 +- server/config/triggers/index.js | 374 +- server/config/triggers/jscripty.js | 22 +- server/config/triggers/mail.js | 185 +- server/config/triggers/sms.js | 125 +- server/config/triggers/urlForward.js | 51 +- server/config/triggers/util.js | 118 +- server/config/triggers/voice.js | 8 +- server/config/util/error.js | 25 +- server/config/util/index.js | 622 +- server/files/images/GFaRDyYiCsV7eNHw.jpg | Bin 0 -> 10337 bytes server/files/images/cuMNy1WdtP37327F.png | Bin 0 -> 33156 bytes .../reports/report_Pippo_dCPRPfdeVvaixjks63nh.csv | 5 - .../reports/report_Prova_FgpIOapfEnLcjrgVEvXz.csv | 4 + .../reports/report_Prova_H7rtxarQ7NFEguy2syyW.csv | 3 + .../reports/report_Prova_LfTHdNiXeXtwLPt7UTYV.csv | 4 + .../reports/report_Prova_ku1CULYjGIxckD9PES5f.csv | 3 + .../reports/report_Prova_um7RdOOmVreyIlmXP7QG.csv | 3 + .../reports/report_Prova_vbQu5m4AmnrKrffFHPEY.csv | 3 + .../reports/report_Prova_zUmaublsfQVYnmqsmFM1.csv | 4 + .../20160801125118-placeholder.js | 24 +- server/routes.js | 170 +- server/services/dashboard/hooks/index.js | 12 + server/services/dashboard/hooks/voice.js | 85 + server/services/dashboard/index.js | 20 + server/services/dashboard/workers/index.js | 188 + server/services/dashboard/workers/voice.js | 216 + server/utils/report_build.js | 509 +- server/utils/report_extraction.js | 296 +- server/utils/voice_extension.js | 291 +- 825 files changed, 127805 insertions(+), 31590 deletions(-) create mode 100644 public/app/037c0eef.vendor.js create mode 100644 public/app/275d68ed.vendor.css create mode 100644 public/app/2b840924.app.js delete mode 100644 public/app/ac0a0d8b.vendor.js delete mode 100644 public/app/bd6c13b6.vendor.css delete mode 100644 public/app/d6eca5e4.app.js delete mode 100644 public/bower_components/avatar/avatar.js delete mode 100644 public/bower_components/avatar/md5.js create mode 100644 public/bower_components/lodash/.markdown-doctest-setup.js delete mode 100644 public/bower_components/lodash/CODE_OF_CONDUCT.md create mode 100644 public/bower_components/lodash/fp/placeholder.js create mode 100644 public/bower_components/lodash/lib/common/file.js create mode 100644 public/bower_components/lodash/lib/common/mapping.js create mode 100644 public/bower_components/lodash/lib/fp/template/modules/_falseOptions.jst delete mode 100644 public/bower_components/rangy/rangy-classapplier.js delete mode 100644 public/bower_components/rangy/rangy-core.js delete mode 100644 public/bower_components/rangy/rangy-highlighter.js delete mode 100644 public/bower_components/rangy/rangy-selectionsaverestore.js delete mode 100644 public/bower_components/rangy/rangy-serializer.js delete mode 100644 public/bower_components/rangy/rangy-textrange.js delete mode 100644 public/bower_components/requirejs/require.js delete mode 100644 public/bower_components/simple-line-icons/Simple-Line-Icons.eot delete mode 100644 public/bower_components/simple-line-icons/Simple-Line-Icons.svg delete mode 100644 public/bower_components/simple-line-icons/Simple-Line-Icons.ttf delete mode 100644 public/bower_components/simple-line-icons/Simple-Line-Icons.woff delete mode 100644 public/bower_components/simple-line-icons/Simple-Line-Icons.woff2 delete mode 100644 public/bower_components/textAngular/textAngular-sanitize.js delete mode 100644 public/bower_components/textAngular/textAngular.css delete mode 100644 public/bower_components/textAngular/textAngular.js delete mode 100644 public/bower_components/textAngular/textAngularSetup.js delete mode 100644 public/bower_components/ui-iconpicker/.bower.json delete mode 100644 public/bower_components/ui-iconpicker/.bowerrc delete mode 100644 public/bower_components/ui-iconpicker/.gitignore delete mode 100644 public/bower_components/ui-iconpicker/LICENSE delete mode 100644 public/bower_components/ui-iconpicker/README.md delete mode 100644 public/bower_components/ui-iconpicker/bower.json delete mode 100644 public/bower_components/ui-iconpicker/dist/scripts/ui-iconpicker.js delete mode 100644 public/bower_components/ui-iconpicker/dist/scripts/ui-iconpicker.min.js delete mode 100644 public/bower_components/ui-iconpicker/dist/styles/ui-iconpicker.css delete mode 100644 public/bower_components/ui-iconpicker/dist/styles/ui-iconpicker.min.css delete mode 100644 public/bower_components/ui-iconpicker/gruntfile.coffee delete mode 100644 public/bower_components/ui-iconpicker/package.json delete mode 100644 public/bower_components/ui-iconpicker/src/scripts/config.coffee delete mode 100644 public/bower_components/ui-iconpicker/src/scripts/directives/ui-iconpicker.coffee delete mode 100644 public/bower_components/ui-iconpicker/src/scripts/services/IconGroupCollection.coffee delete mode 100644 public/bower_components/ui-iconpicker/src/scripts/templates/iconpicker.coffee delete mode 100644 public/bower_components/ui-iconpicker/src/scripts/ui-iconpicker.coffee delete mode 100644 public/bower_components/ui-iconpicker/src/scripts/values/icon-groups-map.coffee delete mode 100644 public/bower_components/ui-iconpicker/src/styles/_variables.scss delete mode 100644 public/bower_components/ui-iconpicker/src/styles/ui-iconpicker.scss delete mode 100644 public/bower_components/ui-select/select.css delete mode 100644 public/bower_components/ui-select/select.js create mode 100644 server/files/images/GFaRDyYiCsV7eNHw.jpg create mode 100644 server/files/images/cuMNy1WdtP37327F.png delete mode 100644 server/files/reports/report_Pippo_dCPRPfdeVvaixjks63nh.csv create mode 100644 server/files/reports/report_Prova_FgpIOapfEnLcjrgVEvXz.csv create mode 100644 server/files/reports/report_Prova_H7rtxarQ7NFEguy2syyW.csv create mode 100644 server/files/reports/report_Prova_LfTHdNiXeXtwLPt7UTYV.csv create mode 100644 server/files/reports/report_Prova_ku1CULYjGIxckD9PES5f.csv create mode 100644 server/files/reports/report_Prova_um7RdOOmVreyIlmXP7QG.csv create mode 100644 server/files/reports/report_Prova_vbQu5m4AmnrKrffFHPEY.csv create mode 100644 server/files/reports/report_Prova_zUmaublsfQVYnmqsmFM1.csv create mode 100644 server/services/dashboard/hooks/index.js create mode 100644 server/services/dashboard/hooks/voice.js create mode 100644 server/services/dashboard/index.js create mode 100644 server/services/dashboard/workers/index.js create mode 100644 server/services/dashboard/workers/voice.js diff --git a/package.json b/package.json index 3cafa60..30d4ea3 100644 --- a/package.json +++ b/package.json @@ -73,6 +73,8 @@ "simple-random": "^1.0.3", "socket.io": "^1.4.5", "socket.io-client": "^1.4.5", + "socket.io-emitter": "^1.0.0", + "socket.io-redis": "^1.0.0", "socketio-jwt": "^4.3.3", "sox": "github:gcareri/node-sox", "string-to-json": "^0.1.0", diff --git a/public/app/037c0eef.vendor.js b/public/app/037c0eef.vendor.js new file mode 100644 index 0000000..ae8f85b --- /dev/null +++ b/public/app/037c0eef.vendor.js @@ -0,0 +1,114 @@ +function $notificationProvider(){function a(a,c,d){function e(c,d){function f(){d=angular.extend({focusWindowOnClick:!0},b.options||{},d);try{g.baseNotification=new a.Notification(c,d)}catch(e){return}d.delay&&setTimeout(angular.bind(g,g.close),d.delay),d.focusWindowOnClick&&g.$on("click",function(){a.focus()}),g._events.forEach(function(a){g.$on.apply(g,a)}),g._events=[]}if(!a.Notification)return!1;d=d||{};var g=this;return this._events=[],"granted"===a.Notification.permission?f():void("denied"!==a.Notification.permission&&e.requestPermission().then(f))}function f(a,b){return new e(a,b)}return e.prototype.$on=function(a,b){function d(){var a=arguments;c.$apply(function(){b.apply(e,a)})}var e=this;return this.baseNotification?(this.baseNotification.addEventListener(a,d),function(){this.baseNotification.removeListener(event,d)}):this._events.push([a,b])},e.prototype.close=function(){this.baseNotification&&this.baseNotification.close()},e.requestPermission=function(){return d(function(b,c){return a.Notification?void a.Notification.requestPermission(function(c){a.Notification.permission=a.Notification.permission||c,b(a.Notification.permission)}):c()})},f.requestPermission=e.requestPermission,f}var b=this;this.$get=["$window","$rootScope","$q",a],this.setOptions=function(a){this.options=a}}function wizardButtonDirective(a){angular.module("mgo-angular-wizard").directive(a,function(){return{restrict:"A",replace:!1,require:"^wizard",link:function(b,c,d,e){c.on("click",function(c){c.preventDefault(),b.$apply(function(){b.$eval(d[a]),e[a.replace("wz","").toLowerCase()]()})})}}})}function _typeof(a){return a&&"undefined"!=typeof Symbol&&a.constructor===Symbol?"symbol":typeof a}function getRandomColors(){for(var a="0123456789ABCDEF".split(""),b="#",c=0;6>c;c++)b+=a[Math.floor(16*Math.random())];return b}function getFirstAndLastName(a){var b=a.split(" ");if(b&&b.length>=2){var c=b[0],d=b[1];if(c&&d){var e=c.substr(0,1)+d.substr(0,1);return e}return a.substr(0,2)}}function getImgTag(a,b,c){var d=angular.element("").attr({xmlns:"http://www.w3.org/2000/svg","pointer-events":"none",width:a,height:b}).css({"background-color":c,width:a+"px",height:b+"px"});return d}function getCharacterObject(a,b,c,d,e){var f=angular.element('').attr({y:"50%",x:"50%",dy:"0.35em","pointer-events":"auto",fill:b,"font-family":c}).html(a).css({"font-weight":d,"font-size":e+"px"});return f}if(function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b="length"in a&&a.length,c=_.type(a);return"function"===c||_.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(_.isFunction(b))return _.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return _.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(ha.test(b))return _.filter(b,a,c);b=_.filter(b,a)}return _.grep(a,function(a){return U.call(b,a)>=0!==c})}function e(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function f(a){var b=oa[a]={};return _.each(a.match(na)||[],function(a,c){b[c]=!0}),b}function g(){Z.removeEventListener("DOMContentLoaded",g,!1),a.removeEventListener("load",g,!1),_.ready()}function h(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=_.expando+h.uid++}function i(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(ua,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:ta.test(c)?_.parseJSON(c):c}catch(e){}sa.set(a,b,c)}else c=void 0;return c}function j(){return!0}function k(){return!1}function l(){try{return Z.activeElement}catch(a){}}function m(a,b){return _.nodeName(a,"table")&&_.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function n(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function o(a){var b=Ka.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function p(a,b){for(var c=0,d=a.length;d>c;c++)ra.set(a[c],"globalEval",!b||ra.get(b[c],"globalEval"))}function q(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(ra.hasData(a)&&(f=ra.access(a),g=ra.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)_.event.add(b,e,j[e][c])}sa.hasData(a)&&(h=sa.access(a),i=_.extend({},h),sa.set(b,i))}}function r(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&_.nodeName(a,b)?_.merge([a],c):c}function s(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ya.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function t(b,c){var d,e=_(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:_.css(e[0],"display");return e.detach(),f}function u(a){var b=Z,c=Oa[a];return c||(c=t(a,b),"none"!==c&&c||(Na=(Na||_("':''),v=a(d.theme?'':''),d.theme&&q?(x='"):d.theme?(x='"):x=q?'':'',w=a(x),r&&(d.theme?(w.css(p),w.addClass("ui-widget-content")):w.css(f)),d.theme||v.css(d.overlayCSS),v.css("position",q?"fixed":"absolute"),(k||d.forceIframe)&&u.css("opacity",0);var z=[u,v,w],A=a(q?"body":b);a.each(z,function(){this.appendTo(A)}),d.theme&&d.draggable&&a.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var B=m&&(!a.support.boxModel||a("object,embed",q?null:b).length>0);if(l||B){if(q&&d.allowBodyStretch&&a.support.boxModel&&a("html,body").css("height","100%"),(l||!a.support.boxModel)&&!q)var C=i(b,"borderTopWidth"),D=i(b,"borderLeftWidth"),E=C?"(0 - "+C+")":0,F=D?"(0 - "+D+")":0;a.each(z,function(a,b){var c=b[0].style;if(c.position="absolute",2>a)q?c.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+d.quirksmodeOffsetHack+') + "px"'):c.setExpression("height",'this.parentNode.offsetHeight + "px"'),q?c.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):c.setExpression("width",'this.parentNode.offsetWidth + "px"'),F&&c.setExpression("left",F),E&&c.setExpression("top",E);else if(d.centerY)q&&c.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),c.marginTop=0;else if(!d.centerY&&q){var e=d.css&&d.css.top?parseInt(d.css.top,10):0,f="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+e+') + "px"';c.setExpression("top",f)}})}if(r&&(d.theme?w.find(".ui-widget-content").append(r):w.append(r),(r.jquery||r.nodeType)&&a(r).show()),(k||d.forceIframe)&&d.showOverlay&&u.show(),d.fadeIn){var G=d.onBlock?d.onBlock:j,H=d.showOverlay&&!r?G:j,I=r?G:j;d.showOverlay&&v._fadeIn(d.fadeIn,H),r&&w._fadeIn(d.fadeIn,I)}else d.showOverlay&&v.show(),r&&w.show(),d.onBlock&&d.onBlock.bind(w)();if(e(1,b,d),q?(n=w[0],o=a(d.focusableElements,n),d.focusInput&&setTimeout(g,20)):h(w[0],d.centerX,d.centerY),d.timeout){var J=setTimeout(function(){q?a.unblockUI(d):a(b).unblock(d)},d.timeout);a(b).data("blockUI.timeout",J)}}}function c(b,c){var f,g=b==window,h=a(b),i=h.data("blockUI.history"),j=h.data("blockUI.timeout");j&&(clearTimeout(j),h.removeData("blockUI.timeout")),c=a.extend({},a.blockUI.defaults,c||{}),e(0,b,c),null===c.onUnblock&&(c.onUnblock=h.data("blockUI.onUnblock"),h.removeData("blockUI.onUnblock"));var k;k=g?a("body").children().filter(".blockUI").add("body > .blockUI"):h.find(">.blockUI"),c.cursorReset&&(k.length>1&&(k[1].style.cursor=c.cursorReset),k.length>2&&(k[2].style.cursor=c.cursorReset)),g&&(n=o=null),c.fadeOut?(f=k.length,k.stop().fadeOut(c.fadeOut,function(){0===--f&&d(k,i,c,b)})):d(k,i,c,b)}function d(b,c,d,e){var f=a(e);if(!f.data("blockUI.isBlocked")){b.each(function(a,b){this.parentNode&&this.parentNode.removeChild(this)}),c&&c.el&&(c.el.style.display=c.display,c.el.style.position=c.position,c.el.style.cursor="default",c.parent&&c.parent.appendChild(c.el),f.removeData("blockUI.history")),f.data("blockUI.static")&&f.css("position","static"),"function"==typeof d.onUnblock&&d.onUnblock(e,d);var g=a(document.body),h=g.width(),i=g[0].style.width;g.width(h-1).width(h),g[0].style.width=i}}function e(b,c,d){var e=c==window,g=a(c);if((b||(!e||n)&&(e||g.data("blockUI.isBlocked")))&&(g.data("blockUI.isBlocked",b),e&&d.bindEvents&&(!b||d.showOverlay))){var h="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";b?a(document).bind(h,d,f):a(document).unbind(h,f)}}function f(b){if("keydown"===b.type&&b.keyCode&&9==b.keyCode&&n&&b.data.constrainTabKey){var c=o,d=!b.shiftKey&&b.target===c[c.length-1],e=b.shiftKey&&b.target===c[0];if(d||e)return setTimeout(function(){g(e)},10),!1}var f=b.data,h=a(b.target);return h.hasClass("blockOverlay")&&f.onOverlayClick&&f.onOverlayClick(b),h.parents("div."+f.blockMsgClass).length>0?!0:0===h.parents().children().filter("div.blockUI").length}function g(a){if(o){var b=o[a===!0?o.length-1:0];b&&b.focus()}}function h(a,b,c){var d=a.parentNode,e=a.style,f=(d.offsetWidth-a.offsetWidth)/2-i(d,"borderLeftWidth"),g=(d.offsetHeight-a.offsetHeight)/2-i(d,"borderTopWidth");b&&(e.left=f>0?f+"px":"0"),c&&(e.top=g>0?g+"px":"0")}function i(b,c){return parseInt(a.css(b,c),10)||0}a.fn._fadeIn=a.fn.fadeIn;var j=a.noop||function(){},k=/MSIE/.test(navigator.userAgent),l=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),m=(document.documentMode||0,a.isFunction(document.createElement("div").style.setExpression));a.blockUI=function(a){b(window,a)},a.unblockUI=function(a){c(window,a)},a.growlUI=function(b,c,d,e){var f=a('
');b&&f.append("

"+b+"

"),c&&f.append("

"+c+"

"),void 0===d&&(d=3e3);var g=function(b){b=b||{},a.blockUI({message:f,fadeIn:"undefined"!=typeof b.fadeIn?b.fadeIn:700,fadeOut:"undefined"!=typeof b.fadeOut?b.fadeOut:1e3,timeout:"undefined"!=typeof b.timeout?b.timeout:d,centerY:!1,showOverlay:!1,onUnblock:e,css:a.blockUI.defaults.growlCSS})};g();f.css("opacity");f.mouseover(function(){g({fadeIn:0,timeout:3e4});var b=a(".blockMsg");b.stop(),b.fadeTo(300,1)}).mouseout(function(){a(".blockMsg").fadeOut(1e3)})},a.fn.block=function(c){if(this[0]===window)return a.blockUI(c),this;var d=a.extend({},a.blockUI.defaults,c||{});return this.each(function(){var b=a(this);d.ignoreIfBlocked&&b.data("blockUI.isBlocked")||b.unblock({fadeOut:0})}),this.each(function(){"static"==a.css(this,"position")&&(this.style.position="relative",a(this).data("blockUI.static",!0)),this.style.zoom=1,b(this,c)})},a.fn.unblock=function(b){return this[0]===window?(a.unblockUI(b),this):this.each(function(){c(this,b)})},a.blockUI.version=2.7,a.blockUI.defaults={message:"

Please wait...

",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var n=null,o=[]}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],a):a(jQuery)}(),function(a,b,c){var d=a();a.fn.dropdownHover=function(c){return"ontouchstart"in document?this:(d=d.add(this.parent()),this.each(function(){function e(a){b.clearTimeout(f),b.clearTimeout(g),g=b.setTimeout(function(){d.find(":focus").blur(),n.instantlyCloseOthers===!0&&d.removeClass("open"),b.clearTimeout(g),h.attr("aria-expanded","true"),i.addClass("open"),h.trigger(l)},n.hoverDelay)}var f,g,h=a(this),i=h.parent(),j={delay:500,hoverDelay:0,instantlyCloseOthers:!0},k={delay:a(this).data("delay"),hoverDelay:a(this).data("hover-delay"),instantlyCloseOthers:a(this).data("close-others")},l="show.bs.dropdown",m="hide.bs.dropdown",n=a.extend(!0,{},j,c,k);i.hover(function(a){return i.hasClass("open")||h.is(a.target)?void e(a):!0},function(){b.clearTimeout(g),f=b.setTimeout(function(){h.attr("aria-expanded","false"),i.removeClass("open"),h.trigger(m)},n.delay)}),h.hover(function(a){return i.hasClass("open")||i.is(a.target)?void e(a):!0}),i.find(".dropdown-submenu").each(function(){var c,d=a(this);d.hover(function(){b.clearTimeout(c),d.children(".dropdown-menu").show(),d.siblings().children(".dropdown-menu").hide()},function(){var a=d.children(".dropdown-menu");c=b.setTimeout(function(){a.hide()},n.delay)})})}))},a(document).ready(function(){a('[data-hover="dropdown"]').dropdownHover()})}(jQuery,window),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){"use strict";function b(b){var c=[{re:/[\xC0-\xC6]/g,ch:"A"},{re:/[\xE0-\xE6]/g,ch:"a"},{re:/[\xC8-\xCB]/g,ch:"E"},{re:/[\xE8-\xEB]/g,ch:"e"},{re:/[\xCC-\xCF]/g,ch:"I"},{re:/[\xEC-\xEF]/g,ch:"i"},{re:/[\xD2-\xD6]/g,ch:"O"},{re:/[\xF2-\xF6]/g,ch:"o"},{re:/[\xD9-\xDC]/g,ch:"U"},{re:/[\xF9-\xFC]/g,ch:"u"},{re:/[\xC7-\xE7]/g,ch:"c"},{re:/[\xD1]/g,ch:"N"},{re:/[\xF1]/g,ch:"n"}];return a.each(c,function(){b=b.replace(this.re,this.ch)}),b}function c(a){var b={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},c="(?:"+Object.keys(b).join("|")+")",d=new RegExp(c),e=new RegExp(c,"g"),f=null==a?"":""+a;return d.test(f)?f.replace(e,function(a){return b[a]}):f}function d(b,c){var d=arguments,f=b,g=c;[].shift.apply(d);var h,i=this.each(function(){var b=a(this);if(b.is("select")){var c=b.data("selectpicker"),i="object"==typeof f&&f;if(c){if(i)for(var j in i)i.hasOwnProperty(j)&&(c.options[j]=i[j])}else{var k=a.extend({},e.DEFAULTS,a.fn.selectpicker.defaults||{},b.data(),i);k.template=a.extend({},e.DEFAULTS.template,a.fn.selectpicker.defaults?a.fn.selectpicker.defaults.template:{},b.data().template,i.template),b.data("selectpicker",c=new e(this,k,g))}"string"==typeof f&&(h=c[f]instanceof Function?c[f].apply(c,d):c.options[f])}});return"undefined"!=typeof h?h:i}String.prototype.includes||!function(){var a={}.toString,b=function(){try{var a={},b=Object.defineProperty,c=b(a,a,a)&&b}catch(d){}return c}(),c="".indexOf,d=function(b){if(null==this)throw new TypeError;var d=String(this);if(b&&"[object RegExp]"==a.call(b))throw new TypeError;var e=d.length,f=String(b),g=f.length,h=arguments.length>1?arguments[1]:void 0,i=h?Number(h):0;i!=i&&(i=0);var j=Math.min(Math.max(i,0),e);return g+j>e?!1:-1!=c.call(d,f,i)};b?b(String.prototype,"includes",{value:d,configurable:!0,writable:!0}):String.prototype.includes=d}(),String.prototype.startsWith||!function(){var a=function(){try{var a={},b=Object.defineProperty,c=b(a,a,a)&&b}catch(d){}return c}(),b={}.toString,c=function(a){if(null==this)throw new TypeError;var c=String(this);if(a&&"[object RegExp]"==b.call(a))throw new TypeError;var d=c.length,e=String(a),f=e.length,g=arguments.length>1?arguments[1]:void 0,h=g?Number(g):0;h!=h&&(h=0);var i=Math.min(Math.max(h,0),d);if(f+i>d)return!1;for(var j=-1;++j'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1},e.prototype={constructor:e,init:function(){var b=this,c=this.$element.attr("id");this.$element.addClass("bs-select-hidden"),this.liObj={},this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$newElement=this.createView(),this.$element.after(this.$newElement),this.$button=this.$newElement.children("button"),this.$menu=this.$newElement.children(".dropdown-menu"),this.$menuInner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.options.dropdownAlignRight&&this.$menu.addClass("dropdown-menu-right"),"undefined"!=typeof c&&(this.$button.attr("data-id",c),a('label[for="'+c+'"]').click(function(a){a.preventDefault(),b.$button.focus()})),this.checkDisabled(),this.clickListener(),this.options.liveSearch&&this.liveSearchListener(),this.render(),this.setStyle(),this.setWidth(),this.options.container&&this.selectPosition(),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile(),this.$newElement.on({"hide.bs.dropdown":function(a){b.$element.trigger("hide.bs.select",a)},"hidden.bs.dropdown":function(a){b.$element.trigger("hidden.bs.select",a)},"show.bs.dropdown":function(a){b.$element.trigger("show.bs.select",a)},"shown.bs.dropdown":function(a){b.$element.trigger("shown.bs.select",a)}}),setTimeout(function(){b.$element.trigger("loaded.bs.select")})},createDropdown:function(){var b=this.multiple?" show-tick":"",d=this.$element.parent().hasClass("input-group")?" input-group-btn":"",e=this.autofocus?" autofocus":"",f=this.options.header?'
'+this.options.header+"
":"",g=this.options.liveSearch?'":"",h=this.multiple&&this.options.actionsBox?'
":"",i=this.multiple&&this.options.doneButton?'
":"",j='
";return a(j)},createView:function(){var a=this.createDropdown(),b=this.createLi();return a.find("ul")[0].innerHTML=b,a},reloadLi:function(){this.destroyLi();var a=this.createLi();this.$menuInner[0].innerHTML=a},destroyLi:function(){this.$menu.find("li").remove()},createLi:function(){var d=this,e=[],f=0,g=document.createElement("option"),h=-1,i=function(a,b,c,d){return""+a+""},j=function(a,e,f,g){return'"+a+''};if(this.options.title&&!this.multiple&&(h--,!this.$element.find(".bs-title-option").length)){var k=this.$element[0];g.className="bs-title-option",g.appendChild(document.createTextNode(this.options.title)),g.value="",k.insertBefore(g,k.firstChild),void 0===a(k.options[k.selectedIndex]).attr("selected")&&(g.selected=!0)}return this.$element.find("option").each(function(b){var c=a(this);if(h++,!c.hasClass("bs-title-option")){var g=this.className||"",k=this.style.cssText,l=c.data("content")?c.data("content"):c.html(),m=c.data("tokens")?c.data("tokens"):null,n="undefined"!=typeof c.data("subtext")?''+c.data("subtext")+"":"",o="undefined"!=typeof c.data("icon")?' ':"",p=this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled;if(""!==o&&p&&(o=""+o+""),d.options.hideDisabled&&p)return void h--;if(c.data("content")||(l=o+''+l+n+""),"OPTGROUP"===this.parentNode.tagName&&c.data("divider")!==!0){var q=" "+this.parentNode.className||"";if(0===c.index()){f+=1;var r=this.parentNode.label,s="undefined"!=typeof c.parent().data("subtext")?''+c.parent().data("subtext")+"":"",t=c.parent().data("icon")?' ':"";r=t+''+r+s+"",0!==b&&e.length>0&&(h++,e.push(i("",null,"divider",f+"div"))), +h++,e.push(i(r,null,"dropdown-header"+q,f))}e.push(i(j(l,"opt "+g+q,k,m),b,"",f))}else c.data("divider")===!0?e.push(i("",b,"divider")):c.data("hidden")===!0?e.push(i(j(l,g,k,m),b,"hidden is-hidden")):(this.previousElementSibling&&"OPTGROUP"===this.previousElementSibling.tagName&&(h++,e.push(i("",null,"divider",f+"div"))),e.push(i(j(l,g,k,m),b)));d.liObj[b]=h}}),this.multiple||0!==this.$element.find("option:selected").length||this.options.title||this.$element.find("option").eq(0).prop("selected",!0).attr("selected","selected"),e.join("")},findLis:function(){return null==this.$lis&&(this.$lis=this.$menu.find("li")),this.$lis},render:function(b){var c,d=this;b!==!1&&this.$element.find("option").each(function(a){var b=d.findLis().eq(d.liObj[a]);d.setDisabled(a,this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled,b),d.setSelected(a,this.selected,b)}),this.tabIndex();var e=this.$element.find("option").map(function(){if(this.selected){if(d.options.hideDisabled&&(this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled))return;var b,c=a(this),e=c.data("icon")&&d.options.showIcon?' ':"";return b=d.options.showSubtext&&c.data("subtext")&&!d.multiple?' '+c.data("subtext")+"":"","undefined"!=typeof c.attr("title")?c.attr("title"):c.data("content")&&d.options.showContent?c.data("content"):e+c.html()+b}}).toArray(),f=this.multiple?e.join(this.options.multipleSeparator):e[0];if(this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1){var g=this.options.selectedTextFormat.split(">");if(g.length>1&&e.length>g[1]||1==g.length&&e.length>=2){c=this.options.hideDisabled?", [disabled]":"";var h=this.$element.find("option").not('[data-divider="true"], [data-hidden="true"]'+c).length,i="function"==typeof this.options.countSelectedText?this.options.countSelectedText(e.length,h):this.options.countSelectedText;f=i.replace("{0}",e.length.toString()).replace("{1}",h.toString())}}void 0==this.options.title&&(this.options.title=this.$element.attr("title")),"static"==this.options.selectedTextFormat&&(f=this.options.title),f||(f="undefined"!=typeof this.options.title?this.options.title:this.options.noneSelectedText),this.$button.attr("title",a.trim(f.replace(/<[^>]*>?/g,""))),this.$button.children(".filter-option").html(f),this.$element.trigger("rendered.bs.select")},setStyle:function(a,b){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""));var c=a?a:this.options.style;"add"==b?this.$button.addClass(c):"remove"==b?this.$button.removeClass(c):(this.$button.removeClass(this.options.style),this.$button.addClass(c))},liHeight:function(b){if(b||this.options.size!==!1&&!this.sizeInfo){var c=document.createElement("div"),d=document.createElement("div"),e=document.createElement("ul"),f=document.createElement("li"),g=document.createElement("li"),h=document.createElement("a"),i=document.createElement("span"),j=this.options.header&&this.$menu.find(".popover-title").length>0?this.$menu.find(".popover-title")[0].cloneNode(!0):null,k=this.options.liveSearch?document.createElement("div"):null,l=this.options.actionsBox&&this.multiple&&this.$menu.find(".bs-actionsbox").length>0?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,m=this.options.doneButton&&this.multiple&&this.$menu.find(".bs-donebutton").length>0?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null;if(i.className="text",c.className=this.$menu[0].parentNode.className+" open",d.className="dropdown-menu open",e.className="dropdown-menu inner",f.className="divider",i.appendChild(document.createTextNode("Inner text")),h.appendChild(i),g.appendChild(h),e.appendChild(g),e.appendChild(f),j&&d.appendChild(j),k){var n=document.createElement("span");k.className="bs-searchbox",n.className="form-control",k.appendChild(n),d.appendChild(k)}l&&d.appendChild(l),d.appendChild(e),m&&d.appendChild(m),c.appendChild(d),document.body.appendChild(c);var o=h.offsetHeight,p=j?j.offsetHeight:0,q=k?k.offsetHeight:0,r=l?l.offsetHeight:0,s=m?m.offsetHeight:0,t=a(f).outerHeight(!0),u="function"==typeof getComputedStyle?getComputedStyle(d):!1,v=u?null:a(d),w=parseInt(u?u.paddingTop:v.css("paddingTop"))+parseInt(u?u.paddingBottom:v.css("paddingBottom"))+parseInt(u?u.borderTopWidth:v.css("borderTopWidth"))+parseInt(u?u.borderBottomWidth:v.css("borderBottomWidth")),x=w+parseInt(u?u.marginTop:v.css("marginTop"))+parseInt(u?u.marginBottom:v.css("marginBottom"))+2;document.body.removeChild(c),this.sizeInfo={liHeight:o,headerHeight:p,searchHeight:q,actionsHeight:r,doneButtonHeight:s,dividerHeight:t,menuPadding:w,menuExtras:x}}},setSize:function(){if(this.findLis(),this.liHeight(),this.options.header&&this.$menu.css("padding-top",0),this.options.size!==!1){var b,c,d,e,f=this,g=this.$menu,h=this.$menuInner,i=a(window),j=this.$newElement[0].offsetHeight,k=this.sizeInfo.liHeight,l=this.sizeInfo.headerHeight,m=this.sizeInfo.searchHeight,n=this.sizeInfo.actionsHeight,o=this.sizeInfo.doneButtonHeight,p=this.sizeInfo.dividerHeight,q=this.sizeInfo.menuPadding,r=this.sizeInfo.menuExtras,s=this.options.hideDisabled?".disabled":"",t=function(){d=f.$newElement.offset().top-i.scrollTop(),e=i.height()-d-j};if(t(),"auto"===this.options.size){var u=function(){var i,j=function(b,c){return function(d){return c?d.classList?d.classList.contains(b):a(d).hasClass(b):!(d.classList?d.classList.contains(b):a(d).hasClass(b))}},p=f.$menuInner[0].getElementsByTagName("li"),s=Array.prototype.filter?Array.prototype.filter.call(p,j("hidden",!1)):f.$lis.not(".hidden"),u=Array.prototype.filter?Array.prototype.filter.call(s,j("dropdown-header",!0)):s.filter(".dropdown-header");t(),b=e-r,f.options.container?(g.data("height")||g.data("height",g.height()),c=g.data("height")):c=g.height(),f.options.dropupAuto&&f.$newElement.toggleClass("dropup",d>e&&c>b-r),f.$newElement.hasClass("dropup")&&(b=d-r),i=s.length+u.length>3?3*k+r-2:0,g.css({"max-height":b+"px",overflow:"hidden","min-height":i+l+m+n+o+"px"}),h.css({"max-height":b-l-m-n-o-q+"px","overflow-y":"auto","min-height":Math.max(i-q,0)+"px"})};u(),this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize",u),i.off("resize.getSize scroll.getSize").on("resize.getSize scroll.getSize",u)}else if(this.options.size&&"auto"!=this.options.size&&this.$lis.not(s).length>this.options.size){var v=this.$lis.not(".divider").not(s).children().slice(0,this.options.size).last().parent().index(),w=this.$lis.slice(0,v+1).filter(".divider").length;b=k*this.options.size+w*p+q,f.options.container?(g.data("height")||g.data("height",g.height()),c=g.data("height")):c=g.height(),f.options.dropupAuto&&this.$newElement.toggleClass("dropup",d>e&&c>b-r),g.css({"max-height":b+l+m+n+o+"px",overflow:"hidden","min-height":""}),h.css({"max-height":b-q+"px","overflow-y":"auto","min-height":""})}}},setWidth:function(){if("auto"===this.options.width){this.$menu.css("min-width","0");var a=this.$menu.parent().clone().appendTo("body"),b=this.options.container?this.$newElement.clone().appendTo("body"):a,c=a.children(".dropdown-menu").outerWidth(),d=b.css("width","auto").children("button").outerWidth();a.remove(),b.remove(),this.$newElement.css("width",Math.max(c,d)+"px")}else"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width",""));this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement.removeClass("fit-width")},selectPosition:function(){this.$bsContainer=a('
');var b,c,d=this,e=function(a){d.$bsContainer.addClass(a.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass("dropup",a.hasClass("dropup")),b=a.offset(),c=a.hasClass("dropup")?0:a[0].offsetHeight,d.$bsContainer.css({top:b.top+c,left:b.left,width:a[0].offsetWidth})};this.$newElement.on("click",function(){var b=a(this);d.isDisabled()||(e(b),d.$bsContainer.appendTo(d.options.container).toggleClass("open",!b.hasClass("open")).append(d.$menu))}),a(window).on("resize scroll",function(){e(d.$newElement)}),this.$element.on("hide.bs.select",function(){d.$menu.data("height",d.$menu.height()),d.$bsContainer.detach()})},setSelected:function(a,b,c){c||(c=this.findLis().eq(this.liObj[a])),c.toggleClass("selected",b)},setDisabled:function(a,b,c){c||(c=this.findLis().eq(this.liObj[a])),b?c.addClass("disabled").children("a").attr("href","#").attr("tabindex",-1):c.removeClass("disabled").children("a").removeAttr("href").attr("tabindex",0)},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){var a=this;this.isDisabled()?(this.$newElement.addClass("disabled"),this.$button.addClass("disabled").attr("tabindex",-1)):(this.$button.hasClass("disabled")&&(this.$newElement.removeClass("disabled"),this.$button.removeClass("disabled")),-1!=this.$button.attr("tabindex")||this.$element.data("tabindex")||this.$button.removeAttr("tabindex")),this.$button.click(function(){return!a.isDisabled()})},tabIndex:function(){this.$element.is("[tabindex]")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex")))},clickListener:function(){var b=this,c=a(document);this.$newElement.on("touchstart.dropdown",".dropdown-menu",function(a){a.stopPropagation()}),c.data("spaceSelect",!1),this.$button.on("keyup",function(a){/(32)/.test(a.keyCode.toString(10))&&c.data("spaceSelect")&&(a.preventDefault(),c.data("spaceSelect",!1))}),this.$newElement.on("click",function(){b.setSize(),b.$element.on("shown.bs.select",function(){if(b.options.liveSearch||b.multiple){if(!b.multiple){var a=b.liObj[b.$element[0].selectedIndex];if("number"!=typeof a||b.options.size===!1)return;var c=b.$lis.eq(a)[0].offsetTop-b.$menuInner[0].offsetTop;c=c-b.$menuInner[0].offsetHeight/2+b.sizeInfo.liHeight/2,b.$menuInner[0].scrollTop=c}}else b.$menuInner.find(".selected a").focus()})}),this.$menuInner.on("click","li a",function(c){var d=a(this),e=d.parent().data("originalIndex"),f=b.$element.val(),g=b.$element.prop("selectedIndex");if(b.multiple&&c.stopPropagation(),c.preventDefault(),!b.isDisabled()&&!d.parent().hasClass("disabled")){var h=b.$element.find("option"),i=h.eq(e),j=i.prop("selected"),k=i.parent("optgroup"),l=b.options.maxOptions,m=k.data("maxOptions")||!1;if(b.multiple){if(i.prop("selected",!j),b.setSelected(e,!j),d.blur(),l!==!1||m!==!1){var n=l
');q[2]&&(r=r.replace("{var}",q[2][l>1?0:1]),s=s.replace("{var}",q[2][m>1?0:1])),i.prop("selected",!1),b.$menu.append(t),l&&n&&(t.append(a("
"+r+"
")),b.$element.trigger("maxReached.bs.select")),m&&o&&(t.append(a("
"+s+"
")),b.$element.trigger("maxReachedGrp.bs.select")),setTimeout(function(){b.setSelected(e,!1)},10),t.delay(750).fadeOut(300,function(){a(this).remove()})}}}else h.prop("selected",!1),i.prop("selected",!0),b.$menuInner.find(".selected").removeClass("selected"),b.setSelected(e,!0);b.multiple?b.options.liveSearch&&b.$searchbox.focus():b.$button.focus(),(f!=b.$element.val()&&b.multiple||g!=b.$element.prop("selectedIndex")&&!b.multiple)&&(b.$element.triggerNative("change"),b.$element.trigger("changed.bs.select",[e,i.prop("selected"),j]))}}),this.$menu.on("click","li.disabled a, .popover-title, .popover-title :not(.close)",function(c){c.currentTarget==this&&(c.preventDefault(),c.stopPropagation(),b.options.liveSearch&&!a(c.target).hasClass("close")?b.$searchbox.focus():b.$button.focus())}),this.$menuInner.on("click",".divider, .dropdown-header",function(a){a.preventDefault(),a.stopPropagation(),b.options.liveSearch?b.$searchbox.focus():b.$button.focus()}),this.$menu.on("click",".popover-title .close",function(){b.$button.click()}),this.$searchbox.on("click",function(a){a.stopPropagation()}),this.$menu.on("click",".actions-btn",function(c){b.options.liveSearch?b.$searchbox.focus():b.$button.focus(),c.preventDefault(),c.stopPropagation(),a(this).hasClass("bs-select-all")?b.selectAll():b.deselectAll(),b.$element.triggerNative("change")}),this.$element.change(function(){b.render(!1)})},liveSearchListener:function(){var d=this,e=a('
  • ');this.$newElement.on("click.dropdown.data-api touchstart.dropdown.data-api",function(){d.$menuInner.find(".active").removeClass("active"),d.$searchbox.val()&&(d.$searchbox.val(""),d.$lis.not(".is-hidden").removeClass("hidden"),e.parent().length&&e.remove()),d.multiple||d.$menuInner.find(".selected").addClass("active"),setTimeout(function(){d.$searchbox.focus()},10)}),this.$searchbox.on("click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api",function(a){a.stopPropagation()}),this.$searchbox.on("input propertychange",function(){if(d.$searchbox.val()){var f=d.$lis.not(".is-hidden").removeClass("hidden").children("a");f=d.options.liveSearchNormalize?f.not(":a"+d._searchStyle()+'("'+b(d.$searchbox.val())+'")'):f.not(":"+d._searchStyle()+'("'+d.$searchbox.val()+'")'),f.parent().addClass("hidden"),d.$lis.filter(".dropdown-header").each(function(){var b=a(this),c=b.data("optgroup");0===d.$lis.filter("[data-optgroup="+c+"]").not(b).not(".hidden").length&&(b.addClass("hidden"),d.$lis.filter("[data-optgroup="+c+"div]").addClass("hidden"))});var g=d.$lis.not(".hidden");g.each(function(b){var c=a(this);c.hasClass("divider")&&(c.index()===g.first().index()||c.index()===g.last().index()||g.eq(b+1).hasClass("divider"))&&c.addClass("hidden")}),d.$lis.not(".hidden, .no-results").length?e.parent().length&&e.remove():(e.parent().length&&e.remove(),e.html(d.options.noneResultsText.replace("{0}",'"'+c(d.$searchbox.val())+'"')).show(),d.$menuInner.append(e))}else d.$lis.not(".is-hidden").removeClass("hidden"),e.parent().length&&e.remove();d.$lis.filter(".active").removeClass("active"),d.$searchbox.val()&&d.$lis.not(".hidden, .divider, .dropdown-header").eq(0).addClass("active").children("a").focus(),a(this).focus()})},_searchStyle:function(){var a={begins:"ibegins",startsWith:"ibegins"};return a[this.options.liveSearchStyle]||"icontains"},val:function(a){return"undefined"!=typeof a?(this.$element.val(a),this.render(),this.$element):this.$element.val()},changeAll:function(b){"undefined"==typeof b&&(b=!0),this.findLis();for(var c=this.$element.find("option"),d=this.$lis.not(".divider, .dropdown-header, .disabled, .hidden").toggleClass("selected",b),e=d.length,f=[],g=0;e>g;g++){var h=d[g].getAttribute("data-original-index");f[f.length]=c.eq(h)[0]}a(f).prop("selected",b),this.render(!1)},selectAll:function(){return this.changeAll(!0)},deselectAll:function(){return this.changeAll(!1)},keydown:function(c){var d,e,f,g,h,i,j,k,l,m=a(this),n=m.is("input")?m.parent().parent():m.parent(),o=n.data("this"),p=":not(.disabled, .hidden, .dropdown-header, .divider)",q={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};if(o.options.liveSearch&&(n=m.parent().parent()),o.options.container&&(n=o.$menu),d=a("[role=menu] li",n),l=o.$menu.parent().hasClass("open"),!l&&(c.keyCode>=48&&c.keyCode<=57||c.keyCode>=96&&c.keyCode<=105||c.keyCode>=65&&c.keyCode<=90)&&(o.options.container?o.$newElement.trigger("click"):(o.setSize(),o.$menu.parent().addClass("open"),l=!0),o.$searchbox.focus()),o.options.liveSearch&&(/(^9$|27)/.test(c.keyCode.toString(10))&&l&&0===o.$menu.find(".active").length&&(c.preventDefault(),o.$menu.parent().removeClass("open"),o.options.container&&o.$newElement.removeClass("open"),o.$button.focus()),d=a("[role=menu] li"+p,n),m.val()||/(38|40)/.test(c.keyCode.toString(10))||0===d.filter(".active").length&&(d=o.$menuInner.find("li"),d=o.options.liveSearchNormalize?d.filter(":a"+o._searchStyle()+"("+b(q[c.keyCode])+")"):d.filter(":"+o._searchStyle()+"("+q[c.keyCode]+")"))),d.length){if(/(38|40)/.test(c.keyCode.toString(10)))e=d.index(d.find("a").filter(":focus").parent()),g=d.filter(p).first().index(),h=d.filter(p).last().index(),f=d.eq(e).nextAll(p).eq(0).index(),i=d.eq(e).prevAll(p).eq(0).index(),j=d.eq(f).prevAll(p).eq(0).index(),o.options.liveSearch&&(d.each(function(b){a(this).hasClass("disabled")||a(this).data("index",b)}),e=d.index(d.filter(".active")),g=d.first().data("index"),h=d.last().data("index"),f=d.eq(e).nextAll().eq(0).data("index"),i=d.eq(e).prevAll().eq(0).data("index"),j=d.eq(f).prevAll().eq(0).data("index")),k=m.data("prevIndex"),38==c.keyCode?(o.options.liveSearch&&e--,e!=j&&e>i&&(e=i),g>e&&(e=g),e==k&&(e=h)):40==c.keyCode&&(o.options.liveSearch&&e++,-1==e&&(e=0),e!=j&&f>e&&(e=f),e>h&&(e=h),e==k&&(e=g)),m.data("prevIndex",e),o.options.liveSearch?(c.preventDefault(),m.hasClass("dropdown-toggle")||(d.removeClass("active").eq(e).addClass("active").children("a").focus(),m.focus())):d.eq(e).children("a").focus();else if(!m.is("input")){var r,s,t=[];d.each(function(){a(this).hasClass("disabled")||a.trim(a(this).children("a").text().toLowerCase()).substring(0,1)==q[c.keyCode]&&t.push(a(this).index())}),r=a(document).data("keycount"),r++,a(document).data("keycount",r),s=a.trim(a(":focus").text().toLowerCase()).substring(0,1),s!=q[c.keyCode]?(r=1,a(document).data("keycount",r)):r>=t.length&&(a(document).data("keycount",0),r>t.length&&(r=1)),d.eq(t[r-1]).children("a").focus()}if((/(13|32)/.test(c.keyCode.toString(10))||/(^9$)/.test(c.keyCode.toString(10))&&o.options.selectOnTab)&&l){if(/(32)/.test(c.keyCode.toString(10))||c.preventDefault(),o.options.liveSearch)/(32)/.test(c.keyCode.toString(10))||(o.$menuInner.find(".active a").click(),m.focus());else{var u=a(":focus");u.click(),u.focus(),c.preventDefault(),a(document).data("spaceSelect",!0)}a(document).data("keycount",0)}(/(^9$|27)/.test(c.keyCode.toString(10))&&l&&(o.multiple||o.options.liveSearch)||/(27)/.test(c.keyCode.toString(10))&&!l)&&(o.$menu.parent().removeClass("open"),o.options.container&&o.$newElement.removeClass("open"),o.$button.focus())}},mobile:function(){this.$element.addClass("mobile-device").appendTo(this.$newElement),this.options.container&&this.$menu.hide()},refresh:function(){this.$lis=null,this.liObj={},this.reloadLi(),this.render(),this.checkDisabled(),this.liHeight(!0),this.setStyle(),this.setWidth(),this.$lis&&this.$searchbox.trigger("propertychange"),this.$element.trigger("refreshed.bs.select")},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()},destroy:function(){this.$newElement.remove(),this.$bsContainer?this.$bsContainer.remove():this.$menu.remove(),this.$element.off(".bs.select").removeData("selectpicker").removeClass("bs-select-hidden selectpicker")}};var f=a.fn.selectpicker;a.fn.selectpicker=d,a.fn.selectpicker.Constructor=e,a.fn.selectpicker.noConflict=function(){return a.fn.selectpicker=f,this},a(document).data("keycount",0).on("keydown.bs.select",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input',e.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input',function(a){a.stopPropagation()}),a(window).on("load.bs.select.data-api",function(){a(".selectpicker").each(function(){var b=a(this);d.call(b,b.data())})})}(a)}),angular.module("checklist-model",[]).directive("checklistModel",["$parse","$compile",function(a,b){function c(a,b,c){if(angular.isArray(a))for(var d=a.length;d--;)if(c(a[d],b))return!0;return!1}function d(a,b,d){return a=angular.isArray(a)?a:[],c(a,b,d)||a.push(b),a}function e(a,b,c){if(angular.isArray(a))for(var d=a.length;d--;)if(c(a[d],b)){a.splice(d,1);break}return a}function f(f,g,h){function i(a,b){f[h.ngModel]=c(a,n,o)}var j=h.checklistModel;h.$set("checklistModel",null),b(g)(f),h.$set("checklistModel",j);var k=a(j),l=k.assign,m=a(h.checklistChange),n=h.checklistValue?a(h.checklistValue)(f.$parent):h.value,o=angular.equals;if(h.hasOwnProperty("checklistComparator"))if("."==h.checklistComparator[0]){var p=h.checklistComparator.substring(1);o=function(a,b){return a[p]===b[p]}}else o=a(h.checklistComparator)(f.$parent);f.$watch(h.ngModel,function(a,b){if(a!==b){var c=k(f.$parent);angular.isFunction(l)&&(a===!0?l(f.$parent,d(c,n,o)):l(f.$parent,e(c,n,o))),m&&m(f)}}),angular.isFunction(f.$parent.$watchCollection)?f.$parent.$watchCollection(j,i):f.$parent.$watch(j,i,!0)}return{restrict:"A",priority:1e3,terminal:!0,scope:!0,compile:function(a,b){if(("INPUT"!==a[0].tagName||"checkbox"!==b.type)&&"MD-CHECKBOX"!==a[0].tagName&&!b.btnCheckbox)throw'checklist-model should be applied to `input[type="checkbox"]` or `md-checkbox`.';if(!b.checklistValue&&!b.value)throw"You should provide `value` or `checklist-value`.";return b.ngModel||b.$set("ngModel","checked"),f}}}]),function(a,b,c){"use strict";a.fn.backstretch=function(d,f){return(d===c||0===d.length)&&a.error("No images were supplied for Backstretch"),0===a(b).scrollTop()&&b.scrollTo(0,0),this.each(function(){var b=a(this),c=b.data("backstretch");if(c){if("string"==typeof d&&"function"==typeof c[d])return void c[d](f);f=a.extend(c.options,f),c.destroy(!0)}c=new e(this,d,f),b.data("backstretch",c)})},a.backstretch=function(b,c){return a("body").backstretch(b,c).data("backstretch")},a.expr[":"].backstretch=function(b){return a(b).data("backstretch")!==c},a.fn.backstretch.defaults={centeredX:!0,centeredY:!0,duration:5e3,fade:0};var d={wrap:{left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},img:{position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxHeight:"none",maxWidth:"none",zIndex:-999999}},e=function(c,e,g){this.options=a.extend({},a.fn.backstretch.defaults,g||{}),this.images=a.isArray(e)?e:[e],a.each(this.images,function(){a("")[0].src=this}),this.isBody=c===document.body,this.$container=a(c),this.$root=this.isBody?a(f?b:document):this.$container;var h=this.$container.children(".backstretch").first();if(this.$wrap=h.length?h:a('
    ').css(d.wrap).appendTo(this.$container),!this.isBody){var i=this.$container.css("position"),j=this.$container.css("zIndex");this.$container.css({position:"static"===i?"relative":i,zIndex:"auto"===j?0:j,background:"none"}),this.$wrap.css({zIndex:-999998})}this.$wrap.css({position:this.isBody&&f?"fixed":"absolute"}),this.index=0,this.show(this.index),a(b).on("resize.backstretch",a.proxy(this.resize,this)).on("orientationchange.backstretch",a.proxy(function(){this.isBody&&0===b.pageYOffset&&(b.scrollTo(0,1),this.resize())},this))};e.prototype={resize:function(){try{var a,c={left:0,top:0},d=this.isBody?this.$root.width():this.$root.innerWidth(),e=d,f=this.isBody?b.innerHeight?b.innerHeight:this.$root.height():this.$root.innerHeight(),g=e/this.$img.data("ratio");g>=f?(a=(g-f)/2,this.options.centeredY&&(c.top="-"+a+"px")):(g=f,e=g*this.$img.data("ratio"),a=(e-d)/2,this.options.centeredX&&(c.left="-"+a+"px")),this.$wrap.css({width:d,height:f}).find("img:not(.deleteable)").css({width:e,height:g}).css(c)}catch(h){}return this},show:function(b){if(!(Math.abs(b)>this.images.length-1)){var c=this,e=c.$wrap.find("img").addClass("deleteable"),f={relatedTarget:c.$container[0]};return c.$container.trigger(a.Event("backstretch.before",f),[c,b]),this.index=b,clearInterval(c.interval),c.$img=a("").css(d.img).bind("load",function(d){var g=this.width||a(d.target).width(),h=this.height||a(d.target).height();a(this).data("ratio",g/h),a(this).fadeIn(c.options.speed||c.options.fade,function(){e.remove(),c.paused||c.cycle(),a(["after","show"]).each(function(){c.$container.trigger(a.Event("backstretch."+this,f),[c,b])})}),c.resize()}).appendTo(c.$wrap),c.$img.attr("src",c.images[b]),c}},next:function(){return this.show(this.index1&&(clearInterval(this.interval),this.interval=setInterval(a.proxy(function(){this.paused||this.next()},this),this.options.duration)),this},destroy:function(c){a(b).off("resize.backstretch orientationchange.backstretch"),clearInterval(this.interval),c||this.$wrap.remove(),this.$container.removeData("backstretch")}};var f=function(){var a=navigator.userAgent,c=navigator.platform,d=a.match(/AppleWebKit\/([0-9]+)/),e=!!d&&d[1],f=a.match(/Fennec\/([0-9]+)/),g=!!f&&f[1],h=a.match(/Opera Mobi\/([0-9]+)/),i=!!h&&h[1],j=a.match(/MSIE ([0-9]+)/),k=!!j&&j[1];return!((c.indexOf("iPhone")>-1||c.indexOf("iPad")>-1||c.indexOf("iPod")>-1)&&e&&534>e||b.operamini&&"[object OperaMini]"==={}.toString.call(b.operamini)||h&&7458>i||a.indexOf("Android")>-1&&e&&533>e||g&&6>g||"palmGetResource"in b&&e&&534>e||a.indexOf("MeeGo")>-1&&a.indexOf("NokiaBrowser/8.5.0")>-1||k&&6>=k)}()}(jQuery,window),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}}),function(a,b,c){function d(c){var d=b.console;f[c]||(f[c]=!0,a.migrateWarnings.push(c),d&&d.warn&&!a.migrateMute&&(d.warn("JQMIGRATE: "+c),a.migrateTrace&&d.trace&&d.trace()))}function e(b,c,e,f){if(Object.defineProperty)try{return void Object.defineProperty(b,c,{configurable:!0,enumerable:!0,get:function(){return d(f),e},set:function(a){d(f),e=a}})}catch(g){}a._definePropertyBroken=!0,b[c]=e}var f={};a.migrateWarnings=[],!a.migrateMute&&b.console&&b.console.log&&b.console.log("JQMIGRATE: Logging is active"),a.migrateTrace===c&&(a.migrateTrace=!0),a.migrateReset=function(){f={},a.migrateWarnings.length=0},"BackCompat"===document.compatMode&&d("jQuery is not compatible with Quirks Mode");var g=a("",{size:1}).attr("size")&&a.attrFn,h=a.attr,i=a.attrHooks.value&&a.attrHooks.value.get||function(){return null},j=a.attrHooks.value&&a.attrHooks.value.set||function(){return c},k=/^(?:input|button)$/i,l=/^[238]$/,m=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,n=/^(?:checked|selected)$/i;e(a,"attrFn",g||{},"jQuery.attrFn is deprecated"),a.attr=function(b,e,f,i){var j=e.toLowerCase(),o=b&&b.nodeType;return i&&(h.length<4&&d("jQuery.fn.attr( props, pass ) is deprecated"),b&&!l.test(o)&&(g?e in g:a.isFunction(a.fn[e])))?a(b)[e](f):("type"===e&&f!==c&&k.test(b.nodeName)&&b.parentNode&&d("Can't change the 'type' of an input or button in IE 6/7/8"),!a.attrHooks[j]&&m.test(j)&&(a.attrHooks[j]={get:function(b,d){var e,f=a.prop(b,d);return f===!0||"boolean"!=typeof f&&(e=b.getAttributeNode(d))&&e.nodeValue!==!1?d.toLowerCase():c},set:function(b,c,d){var e;return c===!1?a.removeAttr(b,d):(e=a.propFix[d]||d,e in b&&(b[e]=!0),b.setAttribute(d,d.toLowerCase())),d}},n.test(j)&&d("jQuery.fn.attr('"+j+"') may use property instead of attribute")),h.call(a,b,e,f))},a.attrHooks.value={get:function(a,b){var c=(a.nodeName||"").toLowerCase();return"button"===c?i.apply(this,arguments):("input"!==c&&"option"!==c&&d("jQuery.fn.attr('value') no longer gets properties"),b in a?a.value:null)},set:function(a,b){var c=(a.nodeName||"").toLowerCase();return"button"===c?j.apply(this,arguments):("input"!==c&&"option"!==c&&d("jQuery.fn.attr('value', val) no longer sets properties"),void(a.value=b))}};var o,p,q=a.fn.init,r=a.parseJSON,s=/^([^<]*)(<[\w\W]+>)([^>]*)$/;a.fn.init=function(b,c,e){var f;return b&&"string"==typeof b&&!a.isPlainObject(c)&&(f=s.exec(a.trim(b)))&&f[0]&&("<"!==b.charAt(0)&&d("$(html) HTML strings must start with '<' character"),f[3]&&d("$(html) HTML text after last tag is ignored"),"#"===f[0].charAt(0)&&(d("HTML string cannot start with a '#' character"),a.error("JQMIGRATE: Invalid selector string (XSS)")),c&&c.context&&(c=c.context),a.parseHTML)?q.call(this,a.parseHTML(f[2],c,!0),c,e):q.apply(this,arguments)},a.fn.init.prototype=a.fn,a.parseJSON=function(a){return a||null===a?r.apply(this,arguments):(d("jQuery.parseJSON requires a valid JSON string"),null)},a.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a.browser||(o=a.uaMatch(navigator.userAgent),p={},o.browser&&(p[o.browser]=!0,p.version=o.version),p.chrome?p.webkit=!0:p.webkit&&(p.safari=!0),a.browser=p),e(a,"browser",a.browser,"jQuery.browser is deprecated"),a.sub=function(){function b(a,c){return new b.fn.init(a,c)}a.extend(!0,b,this),b.superclass=this,b.fn=b.prototype=this(),b.fn.constructor=b,b.sub=this.sub,b.fn.init=function(d,e){return e&&e instanceof a&&!(e instanceof b)&&(e=b(e)),a.fn.init.call(this,d,e,c)},b.fn.init.prototype=b.fn;var c=b(document);return d("jQuery.sub() is deprecated"),b},a.ajaxSetup({converters:{"text json":a.parseJSON}});var t=a.fn.data;a.fn.data=function(b){var e,f,g=this[0];return!g||"events"!==b||1!==arguments.length||(e=a.data(g,b),f=a._data(g,b),e!==c&&e!==f||f===c)?t.apply(this,arguments):(d("Use of jQuery.fn.data('events') is deprecated"),f)};var u=/\/(java|ecma)script/i,v=a.fn.andSelf||a.fn.addBack;a.fn.andSelf=function(){return d("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),v.apply(this,arguments)},a.clean||(a.clean=function(b,c,e,f){c=c||document,c=!c.nodeType&&c[0]||c,c=c.ownerDocument||c,d("jQuery.clean() is deprecated");var g,h,i,j,k=[];if(a.merge(k,a.buildFragment(b,c).childNodes),e)for(i=function(a){return!a.type||u.test(a.type)?f?f.push(a.parentNode?a.parentNode.removeChild(a):a):e.appendChild(a):void 0},g=0;null!=(h=k[g]);g++)a.nodeName(h,"script")&&i(h)||(e.appendChild(h),"undefined"!=typeof h.getElementsByTagName&&(j=a.grep(a.merge([],h.getElementsByTagName("script")),i),k.splice.apply(k,[g+1,0].concat(j)),g+=j.length));return k});var w=a.event.add,x=a.event.remove,y=a.event.trigger,z=a.fn.toggle,A=a.fn.live,B=a.fn.die,C="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",D=new RegExp("\\b(?:"+C+")\\b"),E=/(?:^|\s)hover(\.\S+|)\b/,F=function(b){ +return"string"!=typeof b||a.event.special.hover?b:(E.test(b)&&d("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),b&&b.replace(E,"mouseenter$1 mouseleave$1"))};a.event.props&&"attrChange"!==a.event.props[0]&&a.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),a.event.dispatch&&e(a.event,"handle",a.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),a.event.add=function(a,b,c,e,f){a!==document&&D.test(b)&&d("AJAX events should be attached to document: "+b),w.call(this,a,F(b||""),c,e,f)},a.event.remove=function(a,b,c,d,e){x.call(this,a,F(b)||"",c,d,e)},a.fn.error=function(){var a=Array.prototype.slice.call(arguments,0);return d("jQuery.fn.error() is deprecated"),a.splice(0,0,"error"),arguments.length?this.bind.apply(this,a):(this.triggerHandler.apply(this,a),this)},a.fn.toggle=function(b,c){if(!a.isFunction(b)||!a.isFunction(c))return z.apply(this,arguments);d("jQuery.fn.toggle(handler, handler...) is deprecated");var e=arguments,f=b.guid||a.guid++,g=0,h=function(c){var d=(a._data(this,"lastToggle"+b.guid)||0)%g;return a._data(this,"lastToggle"+b.guid,d+1),c.preventDefault(),e[d].apply(this,arguments)||!1};for(h.guid=f;g").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,d=d.concat(c.errorList)}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b===this.lastElement)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors();var b,c=this.elements().removeData("previousValue").removeAttr("aria-invalid");if(this.settings.unhighlight)for(b=0;c[b];b++)this.settings.unhighlight.call(this,c[b],this.settings.errorClass,"");else c.removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?this.findByName(b.name).filter(":checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+"")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\]|\$)/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.off(".validate-equalTo").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})}),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.fn.addBack=a.fn.addBack||a.fn.andSelf,a.fn.extend({actual:function(b,c){if(!this[b])throw'$.actual => The jQuery method "'+b+'" you called does not exist';var d,e,f={absolute:!1,clone:!1,includeMargin:!1,display:"block"},g=a.extend(f,c),h=this.eq(0);if(g.clone===!0)d=function(){var a="position: absolute !important; top: -1000 !important; ";h=h.clone().attr("style",a).appendTo("body")},e=function(){h.remove()};else{var i,j=[],k="";d=function(){i=h.parents().addBack().filter(":hidden"),k+="visibility: hidden !important; display: "+g.display+" !important; ",g.absolute===!0&&(k+="position: absolute !important; "),i.each(function(){var b=a(this),c=b.attr("style");j.push(c),b.attr("style",c?c+";"+k:k)})},e=function(){i.each(function(b){var c=a(this),d=j[b];void 0===d?c.removeAttr("style"):c.attr("style",d)})}}d();var l=/(outer)/.test(b)?h[b](g.includeMargin):h[b]();return e(),l}})}),function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.moment=b()}(this,function(){"use strict";function a(){return Hc.apply(null,arguments)}function b(a){Hc=a}function c(a){return"[object Array]"===Object.prototype.toString.call(a)}function d(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function e(a,b){var c,d=[];for(c=0;c0)for(c in Jc)d=Jc[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function n(b){m(this,b),this._d=new Date(null!=b._d?b._d.getTime():NaN),Kc===!1&&(Kc=!0,a.updateOffset(this),Kc=!1)}function o(a){return a instanceof n||null!=a&&null!=a._isAMomentObject}function p(a){return 0>a?Math.ceil(a):Math.floor(a)}function q(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=p(b)),c}function r(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&q(a[d])!==q(b[d]))&&g++;return g+f}function s(){}function t(a){return a?a.toLowerCase().replace("_","-"):a}function u(a){for(var b,c,d,e,f=0;f0;){if(d=v(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&r(e,c,!0)>=b-1)break;b--}f++}return null}function v(a){var b=null;if(!Lc[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=Ic._abbr,require("./locale/"+a),w(b)}catch(c){}return Lc[a]}function w(a,b){var c;return a&&(c="undefined"==typeof b?y(a):x(a,b),c&&(Ic=c)),Ic._abbr}function x(a,b){return null!==b?(b.abbr=a,Lc[a]=Lc[a]||new s,Lc[a].set(b),w(a),Lc[a]):(delete Lc[a],null)}function y(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return Ic;if(!c(a)){if(b=v(a))return b;a=[a]}return u(a)}function z(a,b){var c=a.toLowerCase();Mc[c]=Mc[c+"s"]=Mc[b]=a}function A(a){return"string"==typeof a?Mc[a]||Mc[a.toLowerCase()]:void 0}function B(a){var b,c,d={};for(c in a)f(a,c)&&(b=A(c),b&&(d[b]=a[c]));return d}function C(b,c){return function(d){return null!=d?(E(this,b,d),a.updateOffset(this,c),this):D(this,b)}}function D(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function E(a,b,c){return a._d["set"+(a._isUTC?"UTC":"")+b](c)}function F(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else if(a=A(a),"function"==typeof this[a])return this[a](b);return this}function G(a,b,c){var d=""+Math.abs(a),e=b-d.length,f=a>=0;return(f?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d}function H(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(Qc[a]=e),b&&(Qc[b[0]]=function(){return G(e.apply(this,arguments),b[1],b[2])}),c&&(Qc[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function I(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function J(a){var b,c,d=a.match(Nc);for(b=0,c=d.length;c>b;b++)Qc[d[b]]?d[b]=Qc[d[b]]:d[b]=I(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function K(a,b){return a.isValid()?(b=L(b,a.localeData()),Pc[b]=Pc[b]||J(b),Pc[b](a)):a.localeData().invalidDate()}function L(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Oc.lastIndex=0;d>=0&&Oc.test(a);)a=a.replace(Oc,c),Oc.lastIndex=0,d-=1;return a}function M(a){return"function"==typeof a&&"[object Function]"===Object.prototype.toString.call(a)}function N(a,b,c){dd[a]=M(b)?b:function(a){return a&&c?c:b}}function O(a,b){return f(dd,a)?dd[a](b._strict,b._locale):new RegExp(P(a))}function P(a){return a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Q(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),"number"==typeof b&&(d=function(a,c){c[b]=q(a)}),c=0;cd;d++){if(e=h([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}}function X(a,b){var c;return"string"==typeof b&&(b=a.localeData().monthsParse(b),"number"!=typeof b)?a:(c=Math.min(a.date(),T(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a)}function Y(b){return null!=b?(X(this,b),a.updateOffset(this,!0),this):D(this,"Month")}function Z(){return T(this.year(),this.month())}function $(a){var b,c=a._a;return c&&-2===j(a).overflow&&(b=c[gd]<0||c[gd]>11?gd:c[hd]<1||c[hd]>T(c[fd],c[gd])?hd:c[id]<0||c[id]>24||24===c[id]&&(0!==c[jd]||0!==c[kd]||0!==c[ld])?id:c[jd]<0||c[jd]>59?jd:c[kd]<0||c[kd]>59?kd:c[ld]<0||c[ld]>999?ld:-1,j(a)._overflowDayOfYear&&(fd>b||b>hd)&&(b=hd),j(a).overflow=b),a}function _(b){a.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function aa(a,b){var c=!0;return g(function(){return c&&(_(a+"\n"+(new Error).stack),c=!1),b.apply(this,arguments)},b)}function ba(a,b){od[a]||(_(b),od[a]=!0)}function ca(a){var b,c,d=a._i,e=pd.exec(d);if(e){for(j(a).iso=!0,b=0,c=qd.length;c>b;b++)if(qd[b][1].exec(d)){a._f=qd[b][0];break}for(b=0,c=rd.length;c>b;b++)if(rd[b][1].exec(d)){a._f+=(e[6]||" ")+rd[b][0];break}d.match(ad)&&(a._f+="Z"),va(a)}else a._isValid=!1}function da(b){var c=sd.exec(b._i);return null!==c?void(b._d=new Date(+c[1])):(ca(b),void(b._isValid===!1&&(delete b._isValid,a.createFromInputFallback(b))))}function ea(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function fa(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function ga(a){return ha(a)?366:365}function ha(a){return a%4===0&&a%100!==0||a%400===0}function ia(){return ha(this.year())}function ja(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=Da(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function ka(a){return ja(a,this._week.dow,this._week.doy).week}function la(){return this._week.dow}function ma(){return this._week.doy; +}function na(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function oa(a){var b=ja(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}function pa(a,b,c,d,e){var f,g=6+e-d,h=fa(a,0,1+g),i=h.getUTCDay();return e>i&&(i+=7),c=null!=c?1*c:e,f=1+g+7*(b-1)-i+c,{year:f>0?a:a-1,dayOfYear:f>0?f:ga(a-1)+f}}function qa(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function ra(a,b,c){return null!=a?a:null!=b?b:c}function sa(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function ta(a){var b,c,d,e,f=[];if(!a._d){for(d=sa(a),a._w&&null==a._a[hd]&&null==a._a[gd]&&ua(a),a._dayOfYear&&(e=ra(a._a[fd],d[fd]),a._dayOfYear>ga(e)&&(j(a)._overflowDayOfYear=!0),c=fa(e,0,a._dayOfYear),a._a[gd]=c.getUTCMonth(),a._a[hd]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=f[b]=d[b];for(;7>b;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];24===a._a[id]&&0===a._a[jd]&&0===a._a[kd]&&0===a._a[ld]&&(a._nextDay=!0,a._a[id]=0),a._d=(a._useUTC?fa:ea).apply(null,f),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[id]=24)}}function ua(a){var b,c,d,e,f,g,h;b=a._w,null!=b.GG||null!=b.W||null!=b.E?(f=1,g=4,c=ra(b.GG,a._a[fd],ja(Da(),1,4).year),d=ra(b.W,1),e=ra(b.E,1)):(f=a._locale._week.dow,g=a._locale._week.doy,c=ra(b.gg,a._a[fd],ja(Da(),f,g).year),d=ra(b.w,1),null!=b.d?(e=b.d,f>e&&++d):e=null!=b.e?b.e+f:f),h=pa(c,d,e,g,f),a._a[fd]=h.year,a._dayOfYear=h.dayOfYear}function va(b){if(b._f===a.ISO_8601)return void ca(b);b._a=[],j(b).empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,k=0;for(e=L(b._f,b._locale).match(Nc)||[],c=0;c0&&j(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),k+=d.length),Qc[f]?(d?j(b).empty=!1:j(b).unusedTokens.push(f),S(f,d,b)):b._strict&&!d&&j(b).unusedTokens.push(f);j(b).charsLeftOver=i-k,h.length>0&&j(b).unusedInput.push(h),j(b).bigHour===!0&&b._a[id]<=12&&b._a[id]>0&&(j(b).bigHour=void 0),b._a[id]=wa(b._locale,b._a[id],b._meridiem),ta(b),$(b)}function wa(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function xa(a){var b,c,d,e,f;if(0===a._f.length)return j(a).invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;ef)&&(d=f,c=b));g(a,c||b)}function ya(a){if(!a._d){var b=B(a._i);a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],ta(a)}}function za(a){var b=new n($(Aa(a)));return b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b}function Aa(a){var b=a._i,e=a._f;return a._locale=a._locale||y(a._l),null===b||void 0===e&&""===b?l({nullInput:!0}):("string"==typeof b&&(a._i=b=a._locale.preparse(b)),o(b)?new n($(b)):(c(e)?xa(a):e?va(a):d(b)?a._d=b:Ba(a),a))}function Ba(b){var f=b._i;void 0===f?b._d=new Date:d(f)?b._d=new Date(+f):"string"==typeof f?da(b):c(f)?(b._a=e(f.slice(0),function(a){return parseInt(a,10)}),ta(b)):"object"==typeof f?ya(b):"number"==typeof f?b._d=new Date(f):a.createFromInputFallback(b)}function Ca(a,b,c,d,e){var f={};return"boolean"==typeof c&&(d=c,c=void 0),f._isAMomentObject=!0,f._useUTC=f._isUTC=e,f._l=c,f._i=a,f._f=b,f._strict=d,za(f)}function Da(a,b,c,d){return Ca(a,b,c,d,!1)}function Ea(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return Da();for(d=b[0],e=1;ea&&(a=-a,c="-"),c+G(~~(a/60),2)+b+G(~~a%60,2)})}function Ka(a){var b=(a||"").match(ad)||[],c=b[b.length-1]||[],d=(c+"").match(xd)||["-",0,0],e=+(60*d[1])+q(d[2]);return"+"===d[0]?e:-e}function La(b,c){var e,f;return c._isUTC?(e=c.clone(),f=(o(b)||d(b)?+b:+Da(b))-+e,e._d.setTime(+e._d+f),a.updateOffset(e,!1),e):Da(b).local()}function Ma(a){return 15*-Math.round(a._d.getTimezoneOffset()/15)}function Na(b,c){var d,e=this._offset||0;return null!=b?("string"==typeof b&&(b=Ka(b)),Math.abs(b)<16&&(b=60*b),!this._isUTC&&c&&(d=Ma(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,"m"),e!==b&&(!c||this._changeInProgress?bb(this,Ya(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Ma(this)}function Oa(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Pa(a){return this.utcOffset(0,a)}function Qa(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Ma(this),"m")),this}function Ra(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ka(this._i)),this}function Sa(a){return a=a?Da(a).utcOffset():0,(this.utcOffset()-a)%60===0}function Ta(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ua(){if("undefined"!=typeof this._isDSTShifted)return this._isDSTShifted;var a={};if(m(a,this),a=Aa(a),a._a){var b=a._isUTC?h(a._a):Da(a._a);this._isDSTShifted=this.isValid()&&r(a._a,b.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Va(){return!this._isUTC}function Wa(){return this._isUTC}function Xa(){return this._isUTC&&0===this._offset}function Ya(a,b){var c,d,e,g=a,h=null;return Ia(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(g={},b?g[b]=a:g.milliseconds=a):(h=yd.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:q(h[hd])*c,h:q(h[id])*c,m:q(h[jd])*c,s:q(h[kd])*c,ms:q(h[ld])*c}):(h=zd.exec(a))?(c="-"===h[1]?-1:1,g={y:Za(h[2],c),M:Za(h[3],c),d:Za(h[4],c),h:Za(h[5],c),m:Za(h[6],c),s:Za(h[7],c),w:Za(h[8],c)}):null==g?g={}:"object"==typeof g&&("from"in g||"to"in g)&&(e=_a(Da(g.from),Da(g.to)),g={},g.ms=e.milliseconds,g.M=e.months),d=new Ha(g),Ia(a)&&f(a,"_locale")&&(d._locale=a._locale),d}function Za(a,b){var c=a&&parseFloat(a.replace(",","."));return(isNaN(c)?0:c)*b}function $a(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function _a(a,b){var c;return b=La(b,a),a.isBefore(b)?c=$a(a,b):(c=$a(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c}function ab(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(ba(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=Ya(c,d),bb(this,e,a),this}}function bb(b,c,d,e){var f=c._milliseconds,g=c._days,h=c._months;e=null==e?!0:e,f&&b._d.setTime(+b._d+f*d),g&&E(b,"Date",D(b,"Date")+g*d),h&&X(b,D(b,"Month")+h*d),e&&a.updateOffset(b,g||h)}function cb(a,b){var c=a||Da(),d=La(c,this).startOf("day"),e=this.diff(d,"days",!0),f=-6>e?"sameElse":-1>e?"lastWeek":0>e?"lastDay":1>e?"sameDay":2>e?"nextDay":7>e?"nextWeek":"sameElse";return this.format(b&&b[f]||this.localeData().calendar(f,this,Da(c)))}function db(){return new n(this)}function eb(a,b){var c;return b=A("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=o(a)?a:Da(a),+this>+a):(c=o(a)?+a:+Da(a),c<+this.clone().startOf(b))}function fb(a,b){var c;return b=A("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=o(a)?a:Da(a),+a>+this):(c=o(a)?+a:+Da(a),+this.clone().endOf(b)b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)}function kb(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function lb(){var a=this.clone().utc();return 0b;b++)if(this._weekdaysParse[b]||(c=Da([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b}function Pb(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=Kb(a,this.localeData()),this.add(a-b,"d")):b}function Qb(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function Rb(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)}function Sb(a,b){H(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function Tb(a,b){return b._meridiemParse}function Ub(a){return"p"===(a+"").toLowerCase().charAt(0)}function Vb(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function Wb(a,b){b[ld]=q(1e3*("0."+a))}function Xb(){return this._isUTC?"UTC":""}function Yb(){return this._isUTC?"Coordinated Universal Time":""}function Zb(a){return Da(1e3*a)}function $b(){return Da.apply(null,arguments).parseZone()}function _b(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.call(b,c):d}function ac(a){var b=this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];return b||!c?b:(this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a])}function bc(){return this._invalidDate}function cc(a){return this._ordinal.replace("%d",a)}function dc(a){return a}function ec(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)}function fc(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)}function gc(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function hc(a,b,c,d){var e=y(),f=h().set(d,b);return e[c](f,a)}function ic(a,b,c,d,e){if("number"==typeof a&&(b=a,a=void 0),a=a||"",null!=b)return hc(a,b,c,e);var f,g=[];for(f=0;d>f;f++)g[f]=hc(a,f,c,e);return g}function jc(a,b){return ic(a,b,"months",12,"month")}function kc(a,b){return ic(a,b,"monthsShort",12,"month")}function lc(a,b){return ic(a,b,"weekdays",7,"day")}function mc(a,b){return ic(a,b,"weekdaysShort",7,"day")}function nc(a,b){return ic(a,b,"weekdaysMin",7,"day")}function oc(){var a=this._data;return this._milliseconds=Wd(this._milliseconds),this._days=Wd(this._days),this._months=Wd(this._months),a.milliseconds=Wd(a.milliseconds),a.seconds=Wd(a.seconds),a.minutes=Wd(a.minutes),a.hours=Wd(a.hours),a.months=Wd(a.months),a.years=Wd(a.years),this}function pc(a,b,c,d){var e=Ya(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()}function qc(a,b){return pc(this,a,b,1)}function rc(a,b){return pc(this,a,b,-1)}function sc(a){return 0>a?Math.floor(a):Math.ceil(a)}function tc(){var a,b,c,d,e,f=this._milliseconds,g=this._days,h=this._months,i=this._data;return f>=0&&g>=0&&h>=0||0>=f&&0>=g&&0>=h||(f+=864e5*sc(vc(h)+g),g=0,h=0),i.milliseconds=f%1e3,a=p(f/1e3),i.seconds=a%60,b=p(a/60),i.minutes=b%60,c=p(b/60),i.hours=c%24,g+=p(c/24),e=p(uc(g)),h+=e,g-=sc(vc(e)),d=p(h/12),h%=12,i.days=g,i.months=h,i.years=d,this}function uc(a){return 4800*a/146097}function vc(a){return 146097*a/4800}function wc(a){var b,c,d=this._milliseconds;if(a=A(a),"month"===a||"year"===a)return b=this._days+d/864e5,c=this._months+uc(b),"month"===a?c:c/12;switch(b=this._days+Math.round(vc(this._months)),a){case"week":return b/7+d/6048e5;case"day":return b+d/864e5;case"hour":return 24*b+d/36e5;case"minute":return 1440*b+d/6e4;case"second":return 86400*b+d/1e3;case"millisecond":return Math.floor(864e5*b)+d;default:throw new Error("Unknown unit "+a)}}function xc(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*q(this._months/12)}function yc(a){return function(){return this.as(a)}}function zc(a){return a=A(a),this[a+"s"]()}function Ac(a){return function(){return this._data[a]}}function Bc(){return p(this.days()/7)}function Cc(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function Dc(a,b,c){var d=Ya(a).abs(),e=ke(d.as("s")),f=ke(d.as("m")),g=ke(d.as("h")),h=ke(d.as("d")),i=ke(d.as("M")),j=ke(d.as("y")),k=e0,k[4]=c,Cc.apply(null,k)}function Ec(a,b){return void 0===le[a]?!1:void 0===b?le[a]:(le[a]=b,!0)}function Fc(a){var b=this.localeData(),c=Dc(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function Gc(){var a,b,c,d=me(this._milliseconds)/1e3,e=me(this._days),f=me(this._months);a=p(d/60),b=p(a/60),d%=60,a%=60,c=p(f/12),f%=12;var g=c,h=f,i=e,j=b,k=a,l=d,m=this.asSeconds();return m?(0>m?"-":"")+"P"+(g?g+"Y":"")+(h?h+"M":"")+(i?i+"D":"")+(j||k||l?"T":"")+(j?j+"H":"")+(k?k+"M":"")+(l?l+"S":""):"P0D"}var Hc,Ic,Jc=a.momentProperties=[],Kc=!1,Lc={},Mc={},Nc=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Oc=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Pc={},Qc={},Rc=/\d/,Sc=/\d\d/,Tc=/\d{3}/,Uc=/\d{4}/,Vc=/[+-]?\d{6}/,Wc=/\d\d?/,Xc=/\d{1,3}/,Yc=/\d{1,4}/,Zc=/[+-]?\d{1,6}/,$c=/\d+/,_c=/[+-]?\d+/,ad=/Z|[+-]\d\d:?\d\d/gi,bd=/[+-]?\d+(\.\d{1,3})?/,cd=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,dd={},ed={},fd=0,gd=1,hd=2,id=3,jd=4,kd=5,ld=6;H("M",["MM",2],"Mo",function(){return this.month()+1}),H("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)}),H("MMMM",0,0,function(a){return this.localeData().months(this,a)}),z("month","M"),N("M",Wc),N("MM",Wc,Sc),N("MMM",cd),N("MMMM",cd),Q(["M","MM"],function(a,b){b[gd]=q(a)-1}),Q(["MMM","MMMM"],function(a,b,c,d){var e=c._locale.monthsParse(a,d,c._strict);null!=e?b[gd]=e:j(c).invalidMonth=a});var md="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),nd="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),od={};a.suppressDeprecationWarnings=!1;var pd=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,qd=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],rd=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],sd=/^\/?Date\((\-?\d+)/i;a.createFromInputFallback=aa("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),H(0,["YY",2],0,function(){return this.year()%100}),H(0,["YYYY",4],0,"year"),H(0,["YYYYY",5],0,"year"),H(0,["YYYYYY",6,!0],0,"year"),z("year","y"),N("Y",_c),N("YY",Wc,Sc),N("YYYY",Yc,Uc),N("YYYYY",Zc,Vc),N("YYYYYY",Zc,Vc),Q(["YYYYY","YYYYYY"],fd),Q("YYYY",function(b,c){c[fd]=2===b.length?a.parseTwoDigitYear(b):q(b)}),Q("YY",function(b,c){c[fd]=a.parseTwoDigitYear(b)}),a.parseTwoDigitYear=function(a){return q(a)+(q(a)>68?1900:2e3)};var td=C("FullYear",!1);H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),z("week","w"),z("isoWeek","W"),N("w",Wc),N("ww",Wc,Sc),N("W",Wc),N("WW",Wc,Sc),R(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=q(a)});var ud={dow:0,doy:6};H("DDD",["DDDD",3],"DDDo","dayOfYear"),z("dayOfYear","DDD"),N("DDD",Xc),N("DDDD",Tc),Q(["DDD","DDDD"],function(a,b,c){c._dayOfYear=q(a)}),a.ISO_8601=function(){};var vd=aa("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var a=Da.apply(null,arguments);return this>a?this:a}),wd=aa("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var a=Da.apply(null,arguments);return a>this?this:a});Ja("Z",":"),Ja("ZZ",""),N("Z",ad),N("ZZ",ad),Q(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=Ka(a)});var xd=/([\+\-]|\d\d)/gi;a.updateOffset=function(){};var yd=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,zd=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;Ya.fn=Ha.prototype;var Ad=ab(1,"add"),Bd=ab(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var Cd=aa("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});H(0,["gg",2],0,function(){return this.weekYear()%100}),H(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Db("gggg","weekYear"),Db("ggggg","weekYear"),Db("GGGG","isoWeekYear"),Db("GGGGG","isoWeekYear"),z("weekYear","gg"),z("isoWeekYear","GG"),N("G",_c),N("g",_c),N("GG",Wc,Sc),N("gg",Wc,Sc),N("GGGG",Yc,Uc),N("gggg",Yc,Uc),N("GGGGG",Zc,Vc),N("ggggg",Zc,Vc),R(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=q(a)}),R(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}),H("Q",0,0,"quarter"),z("quarter","Q"),N("Q",Rc),Q("Q",function(a,b){b[gd]=3*(q(a)-1)}),H("D",["DD",2],"Do","date"),z("date","D"),N("D",Wc),N("DD",Wc,Sc),N("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient}),Q(["D","DD"],hd),Q("Do",function(a,b){b[hd]=q(a.match(Wc)[0],10)});var Dd=C("Date",!0);H("d",0,"do","day"),H("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),H("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),H("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),z("day","d"),z("weekday","e"),z("isoWeekday","E"),N("d",Wc),N("e",Wc),N("E",Wc),N("dd",cd),N("ddd",cd),N("dddd",cd),R(["dd","ddd","dddd"],function(a,b,c){var d=c._locale.weekdaysParse(a);null!=d?b.d=d:j(c).invalidWeekday=a}),R(["d","e","E"],function(a,b,c,d){b[d]=q(a)});var Ed="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Fd="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Gd="Su_Mo_Tu_We_Th_Fr_Sa".split("_");H("H",["HH",2],0,"hour"),H("h",["hh",2],0,function(){return this.hours()%12||12}),Sb("a",!0),Sb("A",!1),z("hour","h"),N("a",Tb),N("A",Tb),N("H",Wc),N("h",Wc),N("HH",Wc,Sc),N("hh",Wc,Sc),Q(["H","HH"],id),Q(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),Q(["h","hh"],function(a,b,c){b[id]=q(a),j(c).bigHour=!0});var Hd=/[ap]\.?m?\.?/i,Id=C("Hours",!0);H("m",["mm",2],0,"minute"),z("minute","m"),N("m",Wc),N("mm",Wc,Sc),Q(["m","mm"],jd);var Jd=C("Minutes",!1);H("s",["ss",2],0,"second"),z("second","s"),N("s",Wc),N("ss",Wc,Sc),Q(["s","ss"],kd);var Kd=C("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)}),H(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,function(){return 10*this.millisecond()}),H(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),H(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),H(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),H(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),H(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),z("millisecond","ms"),N("S",Xc,Rc),N("SS",Xc,Sc),N("SSS",Xc,Tc);var Ld;for(Ld="SSSS";Ld.length<=9;Ld+="S")N(Ld,$c);for(Ld="S";Ld.length<=9;Ld+="S")Q(Ld,Wb);var Md=C("Milliseconds",!1);H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");var Nd=n.prototype;Nd.add=Ad,Nd.calendar=cb,Nd.clone=db,Nd.diff=ib,Nd.endOf=ub,Nd.format=mb,Nd.from=nb,Nd.fromNow=ob,Nd.to=pb,Nd.toNow=qb,Nd.get=F,Nd.invalidAt=Cb,Nd.isAfter=eb,Nd.isBefore=fb,Nd.isBetween=gb,Nd.isSame=hb,Nd.isValid=Ab,Nd.lang=Cd,Nd.locale=rb,Nd.localeData=sb,Nd.max=wd,Nd.min=vd,Nd.parsingFlags=Bb,Nd.set=F,Nd.startOf=tb,Nd.subtract=Bd,Nd.toArray=yb,Nd.toObject=zb,Nd.toDate=xb,Nd.toISOString=lb,Nd.toJSON=lb,Nd.toString=kb,Nd.unix=wb,Nd.valueOf=vb,Nd.year=td,Nd.isLeapYear=ia,Nd.weekYear=Fb,Nd.isoWeekYear=Gb,Nd.quarter=Nd.quarters=Jb,Nd.month=Y,Nd.daysInMonth=Z,Nd.week=Nd.weeks=na,Nd.isoWeek=Nd.isoWeeks=oa,Nd.weeksInYear=Ib,Nd.isoWeeksInYear=Hb,Nd.date=Dd,Nd.day=Nd.days=Pb,Nd.weekday=Qb,Nd.isoWeekday=Rb,Nd.dayOfYear=qa,Nd.hour=Nd.hours=Id,Nd.minute=Nd.minutes=Jd,Nd.second=Nd.seconds=Kd,Nd.millisecond=Nd.milliseconds=Md,Nd.utcOffset=Na,Nd.utc=Pa,Nd.local=Qa,Nd.parseZone=Ra,Nd.hasAlignedHourOffset=Sa,Nd.isDST=Ta,Nd.isDSTShifted=Ua,Nd.isLocal=Va,Nd.isUtcOffset=Wa,Nd.isUtc=Xa,Nd.isUTC=Xa,Nd.zoneAbbr=Xb,Nd.zoneName=Yb,Nd.dates=aa("dates accessor is deprecated. Use date instead.",Dd),Nd.months=aa("months accessor is deprecated. Use month instead",Y),Nd.years=aa("years accessor is deprecated. Use year instead",td),Nd.zone=aa("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Oa);var Od=Nd,Pd={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Qd={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Rd="Invalid date",Sd="%d",Td=/\d{1,2}/,Ud={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Vd=s.prototype;Vd._calendar=Pd,Vd.calendar=_b,Vd._longDateFormat=Qd,Vd.longDateFormat=ac,Vd._invalidDate=Rd,Vd.invalidDate=bc,Vd._ordinal=Sd,Vd.ordinal=cc,Vd._ordinalParse=Td,Vd.preparse=dc,Vd.postformat=dc,Vd._relativeTime=Ud,Vd.relativeTime=ec,Vd.pastFuture=fc,Vd.set=gc,Vd.months=U,Vd._months=md,Vd.monthsShort=V,Vd._monthsShort=nd,Vd.monthsParse=W,Vd.week=ka,Vd._week=ud,Vd.firstDayOfYear=ma,Vd.firstDayOfWeek=la,Vd.weekdays=Lb,Vd._weekdays=Ed,Vd.weekdaysMin=Nb,Vd._weekdaysMin=Gd,Vd.weekdaysShort=Mb,Vd._weekdaysShort=Fd,Vd.weekdaysParse=Ob,Vd.isPM=Ub,Vd._meridiemParse=Hd,Vd.meridiem=Vb,w("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===q(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),a.lang=aa("moment.lang is deprecated. Use moment.locale instead.",w),a.langData=aa("moment.langData is deprecated. Use moment.localeData instead.",y);var Wd=Math.abs,Xd=yc("ms"),Yd=yc("s"),Zd=yc("m"),$d=yc("h"),_d=yc("d"),ae=yc("w"),be=yc("M"),ce=yc("y"),de=Ac("milliseconds"),ee=Ac("seconds"),fe=Ac("minutes"),ge=Ac("hours"),he=Ac("days"),ie=Ac("months"),je=Ac("years"),ke=Math.round,le={s:45,m:45,h:22,d:26,M:11},me=Math.abs,ne=Ha.prototype;ne.abs=oc,ne.add=qc,ne.subtract=rc,ne.as=wc,ne.asMilliseconds=Xd,ne.asSeconds=Yd,ne.asMinutes=Zd,ne.asHours=$d,ne.asDays=_d,ne.asWeeks=ae,ne.asMonths=be,ne.asYears=ce,ne.valueOf=xc,ne._bubble=tc,ne.get=zc,ne.milliseconds=de,ne.seconds=ee,ne.minutes=fe,ne.hours=ge,ne.days=he,ne.weeks=Bc,ne.months=ie,ne.years=je,ne.humanize=Fc,ne.toISOString=Gc,ne.toString=Gc,ne.toJSON=Gc,ne.locale=rb,ne.localeData=sb,ne.toIsoString=aa("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Gc),ne.lang=Cd,H("X",0,0,"unix"),H("x",0,0,"valueOf"),N("x",_c),N("X",bd),Q("X",function(a,b,c){c._d=new Date(1e3*parseFloat(a,10))}),Q("x",function(a,b,c){c._d=new Date(q(a))}),a.version="2.10.6",b(Da),a.fn=Od,a.min=Fa,a.max=Ga,a.utc=h,a.unix=Zb,a.months=jc,a.isDate=d,a.locale=w,a.invalid=l,a.duration=Ya,a.isMoment=o,a.weekdays=lc,a.parseZone=$b,a.localeData=y,a.isDuration=Ia,a.monthsShort=kc,a.weekdaysMin=nc,a.defineLocale=x,a.weekdaysShort=mc,a.normalizeUnits=A,a.relativeTimeThreshold=Ec;var oe=a;return oe}),!function(a){angular.module("ngCsv.config",[]).value("ngCsv.config",{debug:!0}).config(["$compileProvider",function(a){angular.isDefined(a.urlSanitizationWhitelist)?a.urlSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|data):/):a.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|data):/)}]),angular.module("ngCsv.directives",["ngCsv.services"]),angular.module("ngCsv.services",[]),angular.module("ngCsv",["ngCsv.config","ngCsv.services","ngCsv.directives","ngSanitize"]),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ngCsv"),angular.module("ngCsv.services").service("CSV",["$q",function(a){var b="\r\n",c="\ufeff",d={"\\t":" ","\\b":"\b","\\v":"\x0B","\\f":"\f","\\r":"\r"};this.stringifyField=function(a,b){return"locale"===b.decimalSep&&this.isFloat(a)?a.toLocaleString():"."!==b.decimalSep&&this.isFloat(a)?a.toString().replace(".",b.decimalSep):"string"==typeof a?(a=a.replace(/"/g,'""'),(b.quoteStrings||a.indexOf(",")>-1||a.indexOf("\n")>-1||a.indexOf("\r")>-1)&&(a=b.txtDelim+a+b.txtDelim),a):"boolean"==typeof a?a?"TRUE":"FALSE":a},this.isFloat=function(a){return+a===a&&(!isFinite(a)||Boolean(a%1))},this.stringify=function(d,e){var f=a.defer(),g=this,h="",i="",j=a.when(d).then(function(a){if(angular.isDefined(e.header)&&e.header){var d,j;d=[],angular.forEach(e.header,function(a){this.push(g.stringifyField(a,e))},d),j=d.join(e.fieldSep?e.fieldSep:","),i+=j+b}var k=[];if(angular.isArray(a)?k=a:angular.isFunction(a)&&(k=a()),angular.isDefined(e.label)&&e.label&&"boolean"==typeof e.label){var l,m;l=[],angular.forEach(k[0],function(a,b){this.push(g.stringifyField(b,e))},l),m=l.join(e.fieldSep?e.fieldSep:","),i+=m+b}angular.forEach(k,function(a,c){var d,f,h=angular.copy(k[c]);f=[];var j=e.columnOrder?e.columnOrder:h;angular.forEach(j,function(a){var b=e.columnOrder?h[a]:a;this.push(g.stringifyField(b,e))},f),d=f.join(e.fieldSep?e.fieldSep:","),i+=c'),h=angular.element(g.children()[0]);h.attr("href",a.URL.createObjectURL(d)),h.attr("download",b.getFilename()),h.attr("target","_blank"),e.find("body").append(g),f(function(){h[0].click(),h.remove()},null)}}c.bind("click",function(){b.buildCSV().then(function(){d()}),b.$apply()})}}}])}(window,document),function(angular){"use strict";if(!angular)throw"Missing something? Please add angular.js to your project or move this script below the angular.js reference";var directiveId="ngRemoteValidate",remoteValidate=function($http,$timeout,$q){return{restrict:"A",require:["^form","ngModel"],scope:{ngRemoteInterceptors:"=?"},link:function(scope,el,attrs,ctrls){var cache={},handleChange,setValidation,addToCache,request,shouldProcess,ngForm=ctrls[0],ngModel=ctrls[1],options={ngRemoteThrottle:400,ngRemoteMethod:"POST"};angular.extend(options,attrs),"["===options.ngRemoteValidate.charAt(0)?options.urls=eval(options.ngRemoteValidate):"{"===options.ngRemoteValidate.charAt(0)?(options.keys=eval("("+options.ngRemoteValidate+")"), +options.urls=Object.keys(options.keys)):options.urls=[options.ngRemoteValidate],addToCache=function(a){var b=a[0].data.value;return cache[b]?cache[b]:void(cache[b]=a)},shouldProcess=function(a){var b=!1;for(var c in ngModel.$error){var d=!options.hasOwnProperty("keys")||!Object.keys(options.keys).filter(function(a){return options.keys[a]===c})[0];if(ngModel.$error[c]&&c!=directiveId&&d){b=!0;break}}return!(ngModel.$pristine||b)},setValidation=function(a,b){for(var c=0,d=a.length,e=options.hasOwnProperty("keys"),f=!0;d>c&&(scope.ngRemoteInterceptors&&scope.ngRemoteInterceptors.response&&(a[c]=scope.ngRemoteInterceptors.response(a[c])),a[c].data.isValid||(f=!1,e));c++){var g=e&&a[c].hasOwnProperty("config")&&options.keys[a[c].config.url];if(g){var h=options.keys[a[c].config.url];ngModel.$setValidity(h,a[c].data.isValid)}}b||addToCache(a),ngModel.$setValidity(directiveId,f),ngModel.$processing=ngModel.$pending=ngForm.$pending=!1},handleChange=function(a){return"undefined"==typeof a||""===a?void ngModel.$setPristine():shouldProcess(a)?cache[a]?setValidation(cache[a],!0):(ngModel.$pending||(ngModel.$processing=ngModel.$pending=ngForm.$pending=!0),request&&$timeout.cancel(request),request=$timeout(function(){var b=[],c=0,d=options.urls.length,e={value:a},f={method:options.ngRemoteMethod};for(scope[el[0].name+"SetArgs"]&&(e=scope[el[0].name+"SetArgs"](a,el,attrs,ngModel)),"POST"==options.ngRemoteMethod?f.data=e:f.params=e;d>c;c++)f.url=options.urls[c],scope.ngRemoteInterceptors&&scope.ngRemoteInterceptors.request&&(f=scope.ngRemoteInterceptors.request(f)),b.push($http(f));$q.all(b).then(setValidation)},options.ngRemoteThrottle),!0):setValidation([{data:{isValid:!0,value:a}}],!0)},scope.$watch(function(){return ngModel.$viewValue},handleChange)}}};angular.module("remoteValidation",[]).constant("MODULE_VERSION","0.6.1").directive(directiveId,["$http","$timeout","$q",remoteValidate])}(this.angular),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),function(a){"undefined"!=typeof module&&module.exports?module.exports=a:a(jQuery,window,document)}(function(a){!function(b){var c="function"==typeof define&&define.amd,d="undefined"!=typeof module&&module.exports,e="https:"==document.location.protocol?"https:":"http:",f="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";c||(d?require("jquery-mousewheel")(a):a.event.special.mousewheel||a("head").append(decodeURI("%3Cscript src="+e+"//"+f+"%3E%3C/script%3E"))),b()}(function(){var b,c="mCustomScrollbar",d="mCS",e=".mCustomScrollbar",f={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},g=0,h={},i=window.attachEvent&&!window.addEventListener?1:0,j=!1,k=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],l={init:function(b){var b=a.extend(!0,{},f,b),c=m.call(this);if(b.live){var i=b.liveSelector||this.selector||e,j=a(i);if("off"===b.live)return void o(i);h[i]=setTimeout(function(){j.mCustomScrollbar(b),"once"===b.live&&j.length&&o(i)},500)}else o(i);return b.setWidth=b.set_width?b.set_width:b.setWidth,b.setHeight=b.set_height?b.set_height:b.setHeight,b.axis=b.horizontalScroll?"x":p(b.axis),b.scrollInertia=b.scrollInertia>0&&b.scrollInertia<17?17:b.scrollInertia,"object"!=typeof b.mouseWheel&&1==b.mouseWheel&&(b.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),b.mouseWheel.scrollAmount=b.mouseWheelPixels?b.mouseWheelPixels:b.mouseWheel.scrollAmount,b.mouseWheel.normalizeDelta=b.advanced.normalizeMouseWheelDelta?b.advanced.normalizeMouseWheelDelta:b.mouseWheel.normalizeDelta,b.scrollButtons.scrollType=q(b.scrollButtons.scrollType),n(b),a(c).each(function(){var c=a(this);if(!c.data(d)){c.data(d,{idx:++g,opt:b,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:c.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var e=c.data(d),f=e.opt,h=c.data("mcs-axis"),i=c.data("mcs-scrollbar-position"),j=c.data("mcs-theme");h&&(f.axis=h),i&&(f.scrollbarPosition=i),j&&(f.theme=j,n(f)),r.call(this),e&&f.callbacks.onCreate&&"function"==typeof f.callbacks.onCreate&&f.callbacks.onCreate.call(this),a("#mCSB_"+e.idx+"_container img:not(."+k[2]+")").addClass(k[2]),l.update.call(null,c)}})},update:function(b,c){var e=b||m.call(this);return a(e).each(function(){var b=a(this);if(b.data(d)){var e=b.data(d),f=e.opt,g=a("#mCSB_"+e.idx+"_container"),h=a("#mCSB_"+e.idx),i=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];if(!g.length)return;e.tweenRunning&&U(b),c&&e&&f.callbacks.onBeforeUpdate&&"function"==typeof f.callbacks.onBeforeUpdate&&f.callbacks.onBeforeUpdate.call(this),b.hasClass(k[3])&&b.removeClass(k[3]),b.hasClass(k[4])&&b.removeClass(k[4]),h.css("max-height","none"),h.height()!==b.height()&&h.css("max-height",b.height()),t.call(this),"y"===f.axis||f.advanced.autoExpandHorizontalScroll||g.css("width",s(g)),e.overflowed=y.call(this),C.call(this),f.autoDraggerLength&&v.call(this),w.call(this),A.call(this);var j=[Math.abs(g[0].offsetTop),Math.abs(g[0].offsetLeft)];"x"!==f.axis&&(e.overflowed[0]?i[0].height()>i[0].parent().height()?z.call(this):(V(b,j[0].toString(),{dir:"y",dur:0,overwrite:"none"}),e.contentReset.y=null):(z.call(this),"y"===f.axis?B.call(this):"yx"===f.axis&&e.overflowed[1]&&V(b,j[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==f.axis&&(e.overflowed[1]?i[1].width()>i[1].parent().width()?z.call(this):(V(b,j[1].toString(),{dir:"x",dur:0,overwrite:"none"}),e.contentReset.x=null):(z.call(this),"x"===f.axis?B.call(this):"yx"===f.axis&&e.overflowed[0]&&V(b,j[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),c&&e&&(2===c&&f.callbacks.onImageLoad&&"function"==typeof f.callbacks.onImageLoad?f.callbacks.onImageLoad.call(this):3===c&&f.callbacks.onSelectorChange&&"function"==typeof f.callbacks.onSelectorChange?f.callbacks.onSelectorChange.call(this):f.callbacks.onUpdate&&"function"==typeof f.callbacks.onUpdate&&f.callbacks.onUpdate.call(this)),S.call(this)}})},scrollTo:function(b,c){if("undefined"!=typeof b&&null!=b){var e=m.call(this);return a(e).each(function(){var e=a(this);if(e.data(d)){var f=e.data(d),g=f.opt,h={trigger:"external",scrollInertia:g.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},i=a.extend(!0,{},h,c),j=Q.call(this,b),k=i.scrollInertia>0&&i.scrollInertia<17?17:i.scrollInertia;j[0]=R.call(this,j[0],"y"),j[1]=R.call(this,j[1],"x"),i.moveDragger&&(j[0]*=f.scrollRatio.y,j[1]*=f.scrollRatio.x),i.dur=ca()?0:k,setTimeout(function(){null!==j[0]&&"undefined"!=typeof j[0]&&"x"!==g.axis&&f.overflowed[0]&&(i.dir="y",i.overwrite="all",V(e,j[0].toString(),i)),null!==j[1]&&"undefined"!=typeof j[1]&&"y"!==g.axis&&f.overflowed[1]&&(i.dir="x",i.overwrite="none",V(e,j[1].toString(),i))},i.timeout)}})}},stop:function(){var b=m.call(this);return a(b).each(function(){var b=a(this);b.data(d)&&U(b)})},disable:function(b){var c=m.call(this);return a(c).each(function(){var c=a(this);if(c.data(d)){c.data(d);S.call(this,"remove"),B.call(this),b&&z.call(this),C.call(this,!0),c.addClass(k[3])}})},destroy:function(){var b=m.call(this);return a(b).each(function(){var e=a(this);if(e.data(d)){var f=e.data(d),g=f.opt,h=a("#mCSB_"+f.idx),i=a("#mCSB_"+f.idx+"_container"),j=a(".mCSB_"+f.idx+"_scrollbar");g.live&&o(g.liveSelector||a(b).selector),S.call(this,"remove"),B.call(this),z.call(this),e.removeData(d),Z(this,"mcs"),j.remove(),i.find("img."+k[2]).removeClass(k[2]),h.replaceWith(i.contents()),e.removeClass(c+" _"+d+"_"+f.idx+" "+k[6]+" "+k[7]+" "+k[5]+" "+k[3]).addClass(k[4])}})}},m=function(){return"object"!=typeof a(this)||a(this).length<1?e:this},n=function(b){var c=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],d=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],e=["minimal","minimal-dark"],f=["minimal","minimal-dark"],g=["minimal","minimal-dark"];b.autoDraggerLength=a.inArray(b.theme,c)>-1?!1:b.autoDraggerLength,b.autoExpandScrollbar=a.inArray(b.theme,d)>-1?!1:b.autoExpandScrollbar,b.scrollButtons.enable=a.inArray(b.theme,e)>-1?!1:b.scrollButtons.enable,b.autoHideScrollbar=a.inArray(b.theme,f)>-1?!0:b.autoHideScrollbar,b.scrollbarPosition=a.inArray(b.theme,g)>-1?"outside":b.scrollbarPosition},o=function(a){h[a]&&(clearTimeout(h[a]),Z(h,a))},p=function(a){return"yx"===a||"xy"===a||"auto"===a?"yx":"x"===a||"horizontal"===a?"x":"y"},q=function(a){return"stepped"===a||"pixels"===a||"step"===a||"click"===a?"stepped":"stepless"},r=function(){var b=a(this),e=b.data(d),f=e.opt,g=f.autoExpandScrollbar?" "+k[1]+"_expand":"",h=["
    ","
    "],i="yx"===f.axis?"mCSB_vertical_horizontal":"x"===f.axis?"mCSB_horizontal":"mCSB_vertical",j="yx"===f.axis?h[0]+h[1]:"x"===f.axis?h[1]:h[0],l="yx"===f.axis?"
    ":"",m=f.autoHideScrollbar?" "+k[6]:"",n="x"!==f.axis&&"rtl"===e.langDir?" "+k[7]:"";f.setWidth&&b.css("width",f.setWidth),f.setHeight&&b.css("height",f.setHeight),f.setLeft="y"!==f.axis&&"rtl"===e.langDir?"989999px":f.setLeft,b.addClass(c+" _"+d+"_"+e.idx+m+n).wrapInner("
    ");var o=a("#mCSB_"+e.idx),p=a("#mCSB_"+e.idx+"_container");"y"===f.axis||f.advanced.autoExpandHorizontalScroll||p.css("width",s(p)),"outside"===f.scrollbarPosition?("static"===b.css("position")&&b.css("position","relative"),b.css("overflow","visible"),o.addClass("mCSB_outside").after(j)):(o.addClass("mCSB_inside").append(j),p.wrap(l)),u.call(this);var q=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];q[0].css("min-height",q[0].height()),q[1].css("min-width",q[1].width())},s=function(b){var c=[b[0].scrollWidth,Math.max.apply(Math,b.children().map(function(){return a(this).outerWidth(!0)}).get())],d=b.parent().width();return c[0]>d?c[0]:c[1]>d?c[1]:"100%"},t=function(){var b=a(this),c=b.data(d),e=c.opt,f=a("#mCSB_"+c.idx+"_container");if(e.advanced.autoExpandHorizontalScroll&&"y"!==e.axis){f.css({width:"auto","min-width":0,"overflow-x":"scroll"});var g=Math.ceil(f[0].scrollWidth);3===e.advanced.autoExpandHorizontalScroll||2!==e.advanced.autoExpandHorizontalScroll&&g>f.parent().width()?f.css({width:g,"min-width":"100%","overflow-x":"inherit"}):f.css({"overflow-x":"inherit",position:"absolute"}).wrap("
    ").css({width:Math.ceil(f[0].getBoundingClientRect().right+.4)-Math.floor(f[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},u=function(){var b=a(this),c=b.data(d),e=c.opt,f=a(".mCSB_"+c.idx+"_scrollbar:first"),g=aa(e.scrollButtons.tabindex)?"tabindex='"+e.scrollButtons.tabindex+"'":"",h=["","","",""],i=["x"===e.axis?h[2]:h[0],"x"===e.axis?h[3]:h[1],h[2],h[3]];e.scrollButtons.enable&&f.prepend(i[0]).append(i[1]).next(".mCSB_scrollTools").prepend(i[2]).append(i[3])},v=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=a("#mCSB_"+c.idx+"_container"),g=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")],h=[e.height()/f.outerHeight(!1),e.width()/f.outerWidth(!1)],j=[parseInt(g[0].css("min-height")),Math.round(h[0]*g[0].parent().height()),parseInt(g[1].css("min-width")),Math.round(h[1]*g[1].parent().width())],k=i&&j[1]g&&(g=i),j>h&&(h=j),[g>e.height(),h>e.width()]},z=function(){var b=a(this),c=b.data(d),e=c.opt,f=a("#mCSB_"+c.idx),g=a("#mCSB_"+c.idx+"_container"),h=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")];if(U(b),("x"!==e.axis&&!c.overflowed[0]||"y"===e.axis&&c.overflowed[0])&&(h[0].add(g).css("top",0),V(b,"_resetY")),"y"!==e.axis&&!c.overflowed[1]||"x"===e.axis&&c.overflowed[1]){var i=dx=0;"rtl"===c.langDir&&(i=f.width()-g.outerWidth(!1),dx=Math.abs(i/c.scrollRatio.x)),g.css("left",i),h[1].css("left",dx),V(b,"_resetX")}},A=function(){function b(){g=setTimeout(function(){a.event.special.mousewheel?(clearTimeout(g),H.call(c[0])):b()},100)}var c=a(this),e=c.data(d),f=e.opt;if(!e.bindEvents){if(E.call(this),f.contentTouchScroll&&F.call(this),G.call(this),f.mouseWheel.enable){var g;b()}K.call(this),M.call(this),f.advanced.autoScrollOnFocus&&L.call(this),f.scrollButtons.enable&&N.call(this),f.keyboard.enable&&O.call(this),e.bindEvents=!0}},B=function(){var b=a(this),c=b.data(d),e=c.opt,f=d+"_"+c.idx,g=".mCSB_"+c.idx+"_scrollbar",h=a("#mCSB_"+c.idx+",#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,"+g+" ."+k[12]+",#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal,"+g+">a"),i=a("#mCSB_"+c.idx+"_container");e.advanced.releaseDraggableSelectors&&h.add(a(e.advanced.releaseDraggableSelectors)),e.advanced.extraDraggableSelectors&&h.add(a(e.advanced.extraDraggableSelectors)),c.bindEvents&&(a(document).add(a(!I()||top.document)).unbind("."+f),h.each(function(){a(this).unbind("."+f)}),clearTimeout(b[0]._focusTimeout),Z(b[0],"_focusTimeout"),clearTimeout(c.sequential.step),Z(c.sequential,"step"),clearTimeout(i[0].onCompleteTimeout),Z(i[0],"onCompleteTimeout"),c.bindEvents=!1)},C=function(b){var c=a(this),e=c.data(d),f=e.opt,g=a("#mCSB_"+e.idx+"_container_wrapper"),h=g.length?g:a("#mCSB_"+e.idx+"_container"),i=[a("#mCSB_"+e.idx+"_scrollbar_vertical"),a("#mCSB_"+e.idx+"_scrollbar_horizontal")],j=[i[0].find(".mCSB_dragger"),i[1].find(".mCSB_dragger")];"x"!==f.axis&&(e.overflowed[0]&&!b?(i[0].add(j[0]).add(i[0].children("a")).css("display","block"),h.removeClass(k[8]+" "+k[10])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[0].css("display","none"),h.removeClass(k[10])):(i[0].css("display","none"),h.addClass(k[10])),h.addClass(k[8]))),"y"!==f.axis&&(e.overflowed[1]&&!b?(i[1].add(j[1]).add(i[1].children("a")).css("display","block"),h.removeClass(k[9]+" "+k[11])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[1].css("display","none"),h.removeClass(k[11])):(i[1].css("display","none"),h.addClass(k[11])),h.addClass(k[9]))),e.overflowed[0]||e.overflowed[1]?c.removeClass(k[5]):c.addClass(k[5])},D=function(b){var c=b.type,d=b.target.ownerDocument!==document?[a(frameElement).offset().top,a(frameElement).offset().left]:null,e=I()&&b.target.ownerDocument!==top.document?[a(b.view.frameElement).offset().top,a(b.view.frameElement).offset().left]:[0,0];switch(c){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return d?[b.originalEvent.pageY-d[0]+e[0],b.originalEvent.pageX-d[1]+e[1],!1]:[b.originalEvent.pageY,b.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var f=b.originalEvent.touches[0]||b.originalEvent.changedTouches[0],g=b.originalEvent.touches.length||b.originalEvent.changedTouches.length;return b.target.ownerDocument!==document?[f.screenY,f.screenX,g>1]:[f.pageY,f.pageX,g>1];default:return d?[b.pageY-d[0]+e[0],b.pageX-d[1]+e[1],!1]:[b.pageY,b.pageX,!1]}},E=function(){function b(a){var b=o.find("iframe");if(b.length){var c=a?"auto":"none";b.css("pointer-events",c)}}function c(a,b,c,d){if(o[0].idleTimer=l.scrollInertia<233?250:0,e.attr("id")===n[1])var f="x",g=(e[0].offsetLeft-b+d)*k.scrollRatio.x;else var f="y",g=(e[0].offsetTop-a+c)*k.scrollRatio.y;V(h,g.toString(),{dir:f,drag:!0})}var e,f,g,h=a(this),k=h.data(d),l=k.opt,m=d+"_"+k.idx,n=["mCSB_"+k.idx+"_dragger_vertical","mCSB_"+k.idx+"_dragger_horizontal"],o=a("#mCSB_"+k.idx+"_container"),p=a("#"+n[0]+",#"+n[1]),q=l.advanced.releaseDraggableSelectors?p.add(a(l.advanced.releaseDraggableSelectors)):p,r=l.advanced.extraDraggableSelectors?a(!I()||top.document).add(a(l.advanced.extraDraggableSelectors)):a(!I()||top.document);p.bind("mousedown."+m+" touchstart."+m+" pointerdown."+m+" MSPointerDown."+m,function(c){if(c.stopImmediatePropagation(),c.preventDefault(),$(c)){j=!0,i&&(document.onselectstart=function(){return!1}),b(!1),U(h),e=a(this);var d=e.offset(),k=D(c)[0]-d.top,m=D(c)[1]-d.left,n=e.height()+d.top,o=e.width()+d.left;n>k&&k>0&&o>m&&m>0&&(f=k,g=m),x(e,"active",l.autoExpandScrollbar)}}).bind("touchmove."+m,function(a){a.stopImmediatePropagation(),a.preventDefault();var b=e.offset(),d=D(a)[0]-b.top,h=D(a)[1]-b.left;c(f,g,d,h)}),a(document).add(r).bind("mousemove."+m+" pointermove."+m+" MSPointerMove."+m,function(a){if(e){var b=e.offset(),d=D(a)[0]-b.top,h=D(a)[1]-b.left;if(f===d&&g===h)return;c(f,g,d,h)}}).add(q).bind("mouseup."+m+" touchend."+m+" pointerup."+m+" MSPointerUp."+m,function(a){e&&(x(e,"active",l.autoExpandScrollbar),e=null),j=!1,i&&(document.onselectstart=null),b(!0)})},F=function(){function c(a){if(!_(a)||j||D(a)[2])return void(b=0);b=1,w=0,x=0,k=1,y.removeClass("mCS_touch_action");var c=E.offset();l=D(a)[0]-c.top,m=D(a)[1]-c.left,L=[D(a)[0],D(a)[1]]}function e(a){if(_(a)&&!j&&!D(a)[2]&&(A.documentTouchScroll||a.preventDefault(),a.stopImmediatePropagation(),(!x||w)&&k)){q=X();var b=C.offset(),c=D(a)[0]-b.top,d=D(a)[1]-b.left,e="mcsLinearOut";if(G.push(c),H.push(d),L[2]=Math.abs(D(a)[0]-L[0]),L[3]=Math.abs(D(a)[1]-L[1]),z.overflowed[0])var f=F[0].parent().height()-F[0].height(),g=l-c>0&&c-l>-(f*z.scrollRatio.y)&&(2*L[3]0&&d-m>-(h*z.scrollRatio.x)&&(2*L[2]30)){t=1e3/(r-p);var e="mcsEaseOut",f=2.5>t,g=f?[G[G.length-2],H[H.length-2]]:[0,0];s=f?[c-g[0],d-g[1]]:[c-n,d-o];var l=[Math.abs(s[0]),Math.abs(s[1])];t=f?[Math.abs(s[0]/4),Math.abs(s[1]/4)]:[t,t];var m=[Math.abs(E[0].offsetTop)-s[0]*h(l[0]/t[0],t[0]),Math.abs(E[0].offsetLeft)-s[1]*h(l[1]/t[1],t[1])];u="yx"===A.axis?[m[0],m[1]]:"x"===A.axis?[null,m[1]]:[m[0],null],v=[4*l[0]+A.scrollInertia,4*l[1]+A.scrollInertia];var y=parseInt(A.contentTouchScroll)||0;u[0]=l[0]>y?u[0]:0,u[1]=l[1]>y?u[1]:0,z.overflowed[0]&&i(u[0],v[0],e,"y",K,!1),z.overflowed[1]&&i(u[1],v[1],e,"x",K,!1)}}}function h(a,b){var c=[1.5*b,2*b,b/1.5,b/2];return a>90?b>4?c[0]:c[3]:a>60?b>3?c[3]:c[2]:a>30?b>8?c[1]:b>6?c[0]:b>4?b:c[2]:b>8?b:c[3]}function i(a,b,c,d,e,f){a&&V(y,a.toString(),{dur:b,scrollEasing:c,dir:d,overwrite:e,drag:f})}var k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=a(this),z=y.data(d),A=z.opt,B=d+"_"+z.idx,C=a("#mCSB_"+z.idx),E=a("#mCSB_"+z.idx+"_container"),F=[a("#mCSB_"+z.idx+"_dragger_vertical"),a("#mCSB_"+z.idx+"_dragger_horizontal")],G=[],H=[],J=0,K="yx"===A.axis?"none":"all",L=[],M=E.find("iframe"),N=["touchstart."+B+" pointerdown."+B+" MSPointerDown."+B,"touchmove."+B+" pointermove."+B+" MSPointerMove."+B,"touchend."+B+" pointerup."+B+" MSPointerUp."+B],O=void 0!==document.body.style.touchAction;E.bind(N[0],function(a){c(a)}).bind(N[1],function(a){e(a)}),C.bind(N[0],function(a){f(a)}).bind(N[2],function(a){g(a)}),M.length&&M.each(function(){a(this).load(function(){I(this)&&a(this.contentDocument||this.contentWindow.document).bind(N[0],function(a){c(a),f(a)}).bind(N[1],function(a){e(a)}).bind(N[2],function(a){g(a)})})})},G=function(){function c(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function e(a,b,c){k.type=c&&f?"stepped":"stepless",k.scrollAmount=10,P(g,a,b,"mcsLinearOut",c?60:null)}var f,g=a(this),h=g.data(d),i=h.opt,k=h.sequential,l=d+"_"+h.idx,m=a("#mCSB_"+h.idx+"_container"),n=m.parent();m.bind("mousedown."+l,function(a){b||f||(f=1,j=!0)}).add(document).bind("mousemove."+l,function(a){if(!b&&f&&c()){var d=m.offset(),g=D(a)[0]-d.top+m[0].offsetTop,j=D(a)[1]-d.left+m[0].offsetLeft;g>0&&g0&&jg?e("on",38):g>n.height()&&e("on",40)),"y"!==i.axis&&h.overflowed[1]&&(0>j?e("on",37):j>n.width()&&e("on",39)))}}).bind("mouseup."+l+" dragend."+l,function(a){b||(f&&(f=0,e("off",null)),j=!1)})},H=function(){function b(b,d){if(U(c),!J(c,b.target)){var g="auto"!==f.mouseWheel.deltaFactor?parseInt(f.mouseWheel.deltaFactor):i&&b.deltaFactor<100?100:b.deltaFactor||100,k=f.scrollInertia;if("x"===f.axis||"x"===f.mouseWheel.axis)var l="x",m=[Math.round(g*e.scrollRatio.x),parseInt(f.mouseWheel.scrollAmount)],n="auto"!==f.mouseWheel.scrollAmount?m[1]:m[0]>=h.width()?.9*h.width():m[0],o=Math.abs(a("#mCSB_"+e.idx+"_container")[0].offsetLeft),p=j[1][0].offsetLeft,q=j[1].parent().width()-j[1].width(),r=b.deltaX||b.deltaY||d;else var l="y",m=[Math.round(g*e.scrollRatio.y),parseInt(f.mouseWheel.scrollAmount)],n="auto"!==f.mouseWheel.scrollAmount?m[1]:m[0]>=h.height()?.9*h.height():m[0],o=Math.abs(a("#mCSB_"+e.idx+"_container")[0].offsetTop),p=j[0][0].offsetTop,q=j[0].parent().height()-j[0].height(),r=b.deltaY||d;"y"===l&&!e.overflowed[0]||"x"===l&&!e.overflowed[1]||((f.mouseWheel.invert||b.webkitDirectionInvertedFromDevice)&&(r=-r),f.mouseWheel.normalizeDelta&&(r=0>r?-1:1),(r>0&&0!==p||0>r&&p!==q||f.mouseWheel.preventDefault)&&(b.stopImmediatePropagation(),b.preventDefault()),b.deltaFactor<2&&!f.mouseWheel.normalizeDelta&&(n=b.deltaFactor,k=17),V(c,(o-r*n).toString(),{dir:l,dur:k}))}}if(a(this).data(d)){var c=a(this),e=c.data(d),f=e.opt,g=d+"_"+e.idx,h=a("#mCSB_"+e.idx),j=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")],k=a("#mCSB_"+e.idx+"_container").find("iframe");k.length&&k.each(function(){a(this).load(function(){I(this)&&a(this.contentDocument||this.contentWindow.document).bind("mousewheel."+g,function(a,c){b(a,c)})})}),h.bind("mousewheel."+g,function(a,c){b(a,c)})}},I=function(a){var b=null;if(a){try{var c=a.contentDocument||a.contentWindow.document;b=c.body.innerHTML}catch(d){}return null!==b}try{var c=top.document;b=c.body.innerHTML}catch(d){}return null!==b},J=function(b,c){var e=c.nodeName.toLowerCase(),f=b.data(d).opt.mouseWheel.disableOver,g=["select","textarea"];return a.inArray(e,f)>-1&&!(a.inArray(e,g)>-1&&!a(c).is(":focus"))},K=function(){var b,c=a(this),e=c.data(d),f=d+"_"+e.idx,g=a("#mCSB_"+e.idx+"_container"),h=g.parent(),i=a(".mCSB_"+e.idx+"_scrollbar ."+k[12]);i.bind("mousedown."+f+" touchstart."+f+" pointerdown."+f+" MSPointerDown."+f,function(c){j=!0,a(c.target).hasClass("mCSB_dragger")||(b=1)}).bind("touchend."+f+" pointerup."+f+" MSPointerUp."+f,function(a){j=!1}).bind("click."+f,function(d){if(b&&(b=0,a(d.target).hasClass(k[12])||a(d.target).hasClass("mCSB_draggerRail"))){U(c);var f=a(this),i=f.find(".mCSB_dragger");if(f.parent(".mCSB_scrollTools_horizontal").length>0){if(!e.overflowed[1])return;var j="x",l=d.pageX>i.offset().left?-1:1,m=Math.abs(g[0].offsetLeft)-l*(.9*h.width())}else{if(!e.overflowed[0])return;var j="y",l=d.pageY>i.offset().top?-1:1,m=Math.abs(g[0].offsetTop)-l*(.9*h.height())}V(c,m.toString(),{dir:j,scrollEasing:"mcsEaseInOut"})}})},L=function(){var b=a(this),c=b.data(d),e=c.opt,f=d+"_"+c.idx,g=a("#mCSB_"+c.idx+"_container"),h=g.parent();g.bind("focusin."+f,function(c){var d=a(document.activeElement),f=g.find(".mCustomScrollBox").length,i=0;d.is(e.advanced.autoScrollOnFocus)&&(U(b),clearTimeout(b[0]._focusTimeout),b[0]._focusTimer=f?(i+17)*f:0,b[0]._focusTimeout=setTimeout(function(){var a=[ba(d)[0],ba(d)[1]],c=[g[0].offsetTop,g[0].offsetLeft],f=[c[0]+a[0]>=0&&c[0]+a[0]=0&&c[0]+a[1]a");i.bind("mousedown."+g+" touchstart."+g+" pointerdown."+g+" MSPointerDown."+g+" mouseup."+g+" touchend."+g+" pointerup."+g+" MSPointerUp."+g+" mouseout."+g+" pointerout."+g+" MSPointerOut."+g+" click."+g,function(d){function g(a,c){f.scrollAmount=e.scrollButtons.scrollAmount,P(b,a,c)}if(d.preventDefault(),$(d)){var h=a(this).attr("class");switch(f.type=e.scrollButtons.scrollType,d.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===f.type)return;j=!0,c.tweenRunning=!1,g("on",h);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===f.type)return;j=!1,f.dir&&g("off",h);break;case"click":if("stepped"!==f.type||c.tweenRunning)return;g("on",h)}}})},O=function(){function b(b){function d(a,b){g.type=f.keyboard.scrollType,g.scrollAmount=f.keyboard.scrollAmount,"stepped"===g.type&&e.tweenRunning||P(c,a,b)}switch(b.type){case"blur":e.tweenRunning&&g.dir&&d("off",null);break;case"keydown":case"keyup":var h=b.keyCode?b.keyCode:b.which,i="on";if("x"!==f.axis&&(38===h||40===h)||"y"!==f.axis&&(37===h||39===h)){if((38===h||40===h)&&!e.overflowed[0]||(37===h||39===h)&&!e.overflowed[1])return;"keyup"===b.type&&(i="off"),a(document.activeElement).is(l)||(b.preventDefault(),b.stopImmediatePropagation(),d(i,h))}else if(33===h||34===h){if((e.overflowed[0]||e.overflowed[1])&&(b.preventDefault(),b.stopImmediatePropagation()),"keyup"===b.type){U(c);var m=34===h?-1:1;if("x"===f.axis||"yx"===f.axis&&e.overflowed[1]&&!e.overflowed[0])var n="x",o=Math.abs(j[0].offsetLeft)-m*(.9*k.width());else var n="y",o=Math.abs(j[0].offsetTop)-m*(.9*k.height());V(c,o.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}else if((35===h||36===h)&&!a(document.activeElement).is(l)&&((e.overflowed[0]||e.overflowed[1])&&(b.preventDefault(),b.stopImmediatePropagation()),"keyup"===b.type)){if("x"===f.axis||"yx"===f.axis&&e.overflowed[1]&&!e.overflowed[0])var n="x",o=35===h?Math.abs(k.width()-j.outerWidth(!1)):0;else var n="y",o=35===h?Math.abs(k.height()-j.outerHeight(!1)):0; +V(c,o.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}}var c=a(this),e=c.data(d),f=e.opt,g=e.sequential,h=d+"_"+e.idx,i=a("#mCSB_"+e.idx),j=a("#mCSB_"+e.idx+"_container"),k=j.parent(),l="input,textarea,select,datalist,keygen,[contenteditable='true']",m=j.find("iframe"),n=["blur."+h+" keydown."+h+" keyup."+h];m.length&&m.each(function(){a(this).load(function(){I(this)&&a(this.contentDocument||this.contentWindow.document).bind(n[0],function(a){b(a)})})}),i.attr("tabindex","0").bind(n[0],function(a){b(a)})},P=function(b,c,e,f,g){function h(a){l.snapAmount&&(m.scrollAmount=l.snapAmount instanceof Array?"x"===m.dir[0]?l.snapAmount[1]:l.snapAmount[0]:l.snapAmount);var c="stepped"!==m.type,d=g?g:a?c?p/1.5:q:1e3/60,e=a?c?7.5:40:2.5,i=[Math.abs(n[0].offsetTop),Math.abs(n[0].offsetLeft)],k=[j.scrollRatio.y>10?10:j.scrollRatio.y,j.scrollRatio.x>10?10:j.scrollRatio.x],o="x"===m.dir[0]?i[1]+m.dir[1]*(k[1]*e):i[0]+m.dir[1]*(k[0]*e),r="x"===m.dir[0]?i[1]+m.dir[1]*parseInt(m.scrollAmount):i[0]+m.dir[1]*parseInt(m.scrollAmount),s="auto"!==m.scrollAmount?r:o,t=f?f:a?c?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",u=a?!0:!1;return a&&17>d&&(s="x"===m.dir[0]?i[1]:i[0]),V(b,s.toString(),{dir:m.dir[0],scrollEasing:t,dur:d,onComplete:u}),a?void(m.dir=!1):(clearTimeout(m.step),void(m.step=setTimeout(function(){h()},d)))}function i(){clearTimeout(m.step),Z(m,"step"),U(b)}var j=b.data(d),l=j.opt,m=j.sequential,n=a("#mCSB_"+j.idx+"_container"),o="stepped"===m.type?!0:!1,p=l.scrollInertia<26?26:l.scrollInertia,q=l.scrollInertia<1?17:l.scrollInertia;switch(c){case"on":if(m.dir=[e===k[16]||e===k[15]||39===e||37===e?"x":"y",e===k[13]||e===k[15]||38===e||37===e?-1:1],U(b),aa(e)&&"stepped"===m.type)return;h(o);break;case"off":i(),(o||j.tweenRunning&&m.dir)&&h(!0)}},Q=function(b){var c=a(this).data(d).opt,e=[];return"function"==typeof b&&(b=b()),b instanceof Array?e=b.length>1?[b[0],b[1]]:"x"===c.axis?[null,b[0]]:[b[0],null]:(e[0]=b.y?b.y:b.x||"x"===c.axis?null:b,e[1]=b.x?b.x:b.y||"y"===c.axis?null:b),"function"==typeof e[0]&&(e[0]=e[0]()),"function"==typeof e[1]&&(e[1]=e[1]()),e},R=function(b,c){if(null!=b&&"undefined"!=typeof b){var e=a(this),f=e.data(d),g=f.opt,h=a("#mCSB_"+f.idx+"_container"),i=h.parent(),j=typeof b;c||(c="x"===g.axis?"x":"y");var k="x"===c?h.outerWidth(!1):h.outerHeight(!1),m="x"===c?h[0].offsetLeft:h[0].offsetTop,n="x"===c?"left":"top";switch(j){case"function":return b();case"object":var o=b.jquery?b:a(b);if(!o.length)return;return"x"===c?ba(o)[1]:ba(o)[0];case"string":case"number":if(aa(b))return Math.abs(b);if(-1!==b.indexOf("%"))return Math.abs(k*parseInt(b)/100);if(-1!==b.indexOf("-="))return Math.abs(m-parseInt(b.split("-=")[1]));if(-1!==b.indexOf("+=")){var p=m+parseInt(b.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==b.indexOf("px")&&aa(b.split("px")[0]))return Math.abs(b.split("px")[0]);if("top"===b||"left"===b)return 0;if("bottom"===b)return Math.abs(i.height()-h.outerHeight(!1));if("right"===b)return Math.abs(i.width()-h.outerWidth(!1));if("first"===b||"last"===b){var o=h.find(":"+b);return"x"===c?ba(o)[1]:ba(o)[0]}return a(b).length?"x"===c?ba(a(b))[1]:ba(a(b))[0]:(h.css(n,b),void l.update.call(null,e[0]))}}},S=function(b){function c(){return clearTimeout(m[0].autoUpdate),0===h.parents("html").length?void(h=null):void(m[0].autoUpdate=setTimeout(function(){return j.advanced.updateOnSelectorChange&&(i.poll.change.n=f(),i.poll.change.n!==i.poll.change.o)?(i.poll.change.o=i.poll.change.n,void g(3)):j.advanced.updateOnContentResize&&(i.poll.size.n=h[0].scrollHeight+h[0].scrollWidth+m[0].offsetHeight+h[0].offsetHeight+h[0].offsetWidth,i.poll.size.n!==i.poll.size.o)?(i.poll.size.o=i.poll.size.n,void g(1)):!j.advanced.updateOnImageLoad||"auto"===j.advanced.updateOnImageLoad&&"y"===j.axis||(i.poll.img.n=m.find("img").length,i.poll.img.n===i.poll.img.o)?void((j.advanced.updateOnSelectorChange||j.advanced.updateOnContentResize||j.advanced.updateOnImageLoad)&&c()):(i.poll.img.o=i.poll.img.n,void m.find("img").each(function(){e(this)}))},j.advanced.autoUpdateTimeout))}function e(b){function c(a,b){return function(){return b.apply(a,arguments)}}function d(){this.onload=null,a(b).addClass(k[2]),g(2)}if(a(b).hasClass(k[2]))return void g();var e=new Image;e.onload=c(e,d),e.src=b.src}function f(){j.advanced.updateOnSelectorChange===!0&&(j.advanced.updateOnSelectorChange="*");var a=0,b=m.find(j.advanced.updateOnSelectorChange);return j.advanced.updateOnSelectorChange&&b.length>0&&b.each(function(){a+=this.offsetHeight+this.offsetWidth}),a}function g(a){clearTimeout(m[0].autoUpdate),l.update.call(null,h[0],a)}var h=a(this),i=h.data(d),j=i.opt,m=a("#mCSB_"+i.idx+"_container");return b?(clearTimeout(m[0].autoUpdate),void Z(m[0],"autoUpdate")):void c()},T=function(a,b,c){return Math.round(a/b)*b-c},U=function(b){var c=b.data(d),e=a("#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal");e.each(function(){Y.call(this)})},V=function(b,c,e){function f(a){return i&&j.callbacks[a]&&"function"==typeof j.callbacks[a]}function g(){return[j.callbacks.alwaysTriggerOffsets||u>=v[0]+y,j.callbacks.alwaysTriggerOffsets||-z>=u]}function h(){var a=[n[0].offsetTop,n[0].offsetLeft],c=[s[0].offsetTop,s[0].offsetLeft],d=[n.outerHeight(!1),n.outerWidth(!1)],f=[m.height(),m.width()];b[0].mcs={content:n,top:a[0],left:a[1],draggerTop:c[0],draggerLeft:c[1],topPct:Math.round(100*Math.abs(a[0])/(Math.abs(d[0])-f[0])),leftPct:Math.round(100*Math.abs(a[1])/(Math.abs(d[1])-f[1])),direction:e.dir}}var i=b.data(d),j=i.opt,k={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:j.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},e=a.extend(k,e),l=[e.dur,e.drag?0:e.dur],m=a("#mCSB_"+i.idx),n=a("#mCSB_"+i.idx+"_container"),o=n.parent(),p=j.callbacks.onTotalScrollOffset?Q.call(b,j.callbacks.onTotalScrollOffset):[0,0],q=j.callbacks.onTotalScrollBackOffset?Q.call(b,j.callbacks.onTotalScrollBackOffset):[0,0];if(i.trigger=e.trigger,(0!==o.scrollTop()||0!==o.scrollLeft())&&(a(".mCSB_"+i.idx+"_scrollbar").css("visibility","visible"),o.scrollTop(0).scrollLeft(0)),"_resetY"!==c||i.contentReset.y||(f("onOverflowYNone")&&j.callbacks.onOverflowYNone.call(b[0]),i.contentReset.y=1),"_resetX"!==c||i.contentReset.x||(f("onOverflowXNone")&&j.callbacks.onOverflowXNone.call(b[0]),i.contentReset.x=1),"_resetY"!==c&&"_resetX"!==c){if(!i.contentReset.y&&b[0].mcs||!i.overflowed[0]||(f("onOverflowY")&&j.callbacks.onOverflowY.call(b[0]),i.contentReset.x=null),!i.contentReset.x&&b[0].mcs||!i.overflowed[1]||(f("onOverflowX")&&j.callbacks.onOverflowX.call(b[0]),i.contentReset.x=null),j.snapAmount){var r=j.snapAmount instanceof Array?"x"===e.dir?j.snapAmount[1]:j.snapAmount[0]:j.snapAmount;c=T(c,r,j.snapOffset)}switch(e.dir){case"x":var s=a("#mCSB_"+i.idx+"_dragger_horizontal"),t="left",u=n[0].offsetLeft,v=[m.width()-n.outerWidth(!1),s.parent().width()-s.width()],w=[c,0===c?0:c/i.scrollRatio.x],y=p[1],z=q[1],A=y>0?y/i.scrollRatio.x:0,B=z>0?z/i.scrollRatio.x:0;break;case"y":var s=a("#mCSB_"+i.idx+"_dragger_vertical"),t="top",u=n[0].offsetTop,v=[m.height()-n.outerHeight(!1),s.parent().height()-s.height()],w=[c,0===c?0:c/i.scrollRatio.y],y=p[0],z=q[0],A=y>0?y/i.scrollRatio.y:0,B=z>0?z/i.scrollRatio.y:0}w[1]<0||0===w[0]&&0===w[1]?w=[0,0]:w[1]>=v[1]?w=[v[0],v[1]]:w[0]=-w[0],b[0].mcs||(h(),f("onInit")&&j.callbacks.onInit.call(b[0])),clearTimeout(n[0].onCompleteTimeout),W(s[0],t,Math.round(w[1]),l[1],e.scrollEasing),(i.tweenRunning||!(0===u&&w[0]>=0||u===v[0]&&w[0]<=v[0]))&&W(n[0],t,Math.round(w[0]),l[0],e.scrollEasing,e.overwrite,{onStart:function(){e.callbacks&&e.onStart&&!i.tweenRunning&&(f("onScrollStart")&&(h(),j.callbacks.onScrollStart.call(b[0])),i.tweenRunning=!0,x(s),i.cbOffsets=g())},onUpdate:function(){e.callbacks&&e.onUpdate&&f("whileScrolling")&&(h(),j.callbacks.whileScrolling.call(b[0]))},onComplete:function(){if(e.callbacks&&e.onComplete){"yx"===j.axis&&clearTimeout(n[0].onCompleteTimeout);var a=n[0].idleTimer||0;n[0].onCompleteTimeout=setTimeout(function(){f("onScroll")&&(h(),j.callbacks.onScroll.call(b[0])),f("onTotalScroll")&&w[1]>=v[1]-A&&i.cbOffsets[0]&&(h(),j.callbacks.onTotalScroll.call(b[0])),f("onTotalScrollBack")&&w[1]<=B&&i.cbOffsets[1]&&(h(),j.callbacks.onTotalScrollBack.call(b[0])),i.tweenRunning=!1,n[0].idleTimer=0,x(s,"hide")},a)}}})}},W=function(a,b,c,d,e,f,g){function h(){v.stop||(s||o.call(),s=X()-r,i(),s>=v.time&&(v.time=s>v.time?s+m-(s-v.time):s+m-1,v.time0?(v.currVal=l(v.time,t,w,d,e),u[b]=Math.round(v.currVal)+"px"):u[b]=c+"px",p.call()}function j(){m=1e3/60,v.time=s+m,n=window.requestAnimationFrame?window.requestAnimationFrame:function(a){return i(),setTimeout(a,.01)},v.id=n(h)}function k(){null!=v.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(v.id):clearTimeout(v.id),v.id=null)}function l(a,b,c,d,e){switch(e){case"linear":case"mcsLinear":return c*a/d+b;case"mcsLinearOut":return a/=d,a--,c*Math.sqrt(1-a*a)+b;case"easeInOutSmooth":return a/=d/2,1>a?c/2*a*a+b:(a--,-c/2*(a*(a-2)-1)+b);case"easeInOutStrong":return a/=d/2,1>a?c/2*Math.pow(2,10*(a-1))+b:(a--,c/2*(-Math.pow(2,-10*a)+2)+b);case"easeInOut":case"mcsEaseInOut":return a/=d/2,1>a?c/2*a*a*a+b:(a-=2,c/2*(a*a*a+2)+b);case"easeOutSmooth":return a/=d,a--,-c*(a*a*a*a-1)+b;case"easeOutStrong":return c*(-Math.pow(2,-10*a/d)+1)+b;case"easeOut":case"mcsEaseOut":default:var f=(a/=d)*a,g=f*a;return b+c*(.499999999999997*g*f+-2.5*f*f+5.5*g+-6.5*f+4*a)}}a._mTween||(a._mTween={top:{},left:{}});var m,n,g=g||{},o=g.onStart||function(){},p=g.onUpdate||function(){},q=g.onComplete||function(){},r=X(),s=0,t=a.offsetTop,u=a.style,v=a._mTween[b];"left"===b&&(t=a.offsetLeft);var w=c-t;v.stop=0,"none"!==f&&k(),j()},X=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},Y=function(){var a=this;a._mTween||(a._mTween={top:{},left:{}});for(var b=["top","left"],c=0;c=0&&d[0]+ba(e)[0]=0&&d[1]+ba(e)[1]
    ":"
    "},c=function(b,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q;return h=d.duration||1,q=d.timingFunction||"ease-in-out",i=c.scope(),j=d.emitOnClose,n=d.onClose,m=void 0!==d.lazyRender,g=null,o=null,k=function(a){var b,d,e,f,g;for(e=0,d=c.children(),f=0,g=d.length;g>f;f++)b=d[f],e+=b.clientHeight;return""+e+"px"},p=function(){return g&&a.cancel(g),m&&(b.lazyRender=!0),a(function(){return o&&a.cancel(o),c.css({overflow:"hidden",transitionProperty:"height",transitionDuration:""+h+"s",transitionTimingFunction:q,height:k()}),o=a(function(){return c.css({overflow:"visible",transition:"none",height:"auto"})},1e3*h)})},l=function(){return o&&a.cancel(o),c.css({overflow:"hidden",transitionProperty:"height",transitionDuration:""+h+"s",transitionTimingFunction:q,height:"0px"}),j||n||m?g=a(function(){return j&&b.$emit(j,{}),n&&i.$eval(n),m?b.lazyRender=!1:void 0},1e3*h):void 0},b.$watch("expanded",function(b,d){return b?a(p):(null!=b&&(c.css({height:k()}),c[0].clientHeight),a(l))})},{restrict:"A",scope:{expanded:"=ngSlideDown"},transclude:!0,link:c,template:function(a,c){return b(a,c)}}}])}.call(this),angular.module("ngMap",[]),function(){"use strict";function camelCase(a){return a.replace(SPECIAL_CHARS_REGEXP,function(a,b,c,d){return d?c.toUpperCase():c}).replace(MOZ_HACK_REGEXP,"Moz$1")}function JSONize(a){try{return JSON.parse(a),a}catch(b){return a.replace(/([\$\w]+)\s*:/g,function(a,b){return'"'+b+'":'}).replace(/'([^']+)'/g,function(a,b){return'"'+b+'"'})}}var SPECIAL_CHARS_REGEXP=/([\:\-\_]+(.))/g,MOZ_HACK_REGEXP=/^moz([A-Z])/,Attr2Options=function($parse,$timeout,$log,NavigatorGeolocation,GeoCoder){var orgAttributes=function(a){a.length>0&&(a=a[0]);for(var b={},c=0;c-1&&b.splice(c,1),this.el.className=b.join(" ")},d.prototype.onAdd=function(){this.getPanes().overlayMouseTarget.appendChild(this.el)},d.prototype.draw=function(){this.setPosition(),this.setZIndex(this.zIndex),this.setVisible(this.visible)},d.prototype.onRemove=function(){this.el.parentNode.removeChild(this.el),this.el=null}},f=function(c,e){return function(f,g,h,i){var j=(a.orgAttributes(g),a.filter(h)),k=a.getOptions(j,f),l=a.getEvents(f,j),m=g[0].parentElement.removeChild(g[0]),n=new d(k);b(function(){f.$watch("["+e.join(",")+"]",function(a){n.setContent(c,f)}),n.setContent(m.innerHTML,f);var a=m.firstElementChild.className;n.addClass("custom-marker"),n.addClass(a),k.position instanceof google.maps.LatLng||i.getGeoLocation(k.position).then(function(a){n.setPosition(a)})});for(var o in l)google.maps.event.addDomListener(n.el,o,l[o]);i.addObject("customMarkers",n),g.bind("$destroy",function(){i.deleteObject("customMarkers",n)})}},g=function(d,g,h){return a=d,b=g,c=h,e(),{restrict:"E",require:"^map",compile:function(a){var b=a.html(),c=b.match(/{{([^}]+)}}/g),d=[];return(c||[]).forEach(function(a){var b=a.replace("{{","").replace("}}","");-1==a.indexOf("::")&&-1==a.indexOf("this.")&&-1==d.indexOf(b)&&d.push(a.replace("{{","").replace("}}",""))}),f(b,d)}}};g.$inject=["Attr2Options","$timeout","$compile"],angular.module("ngMap").directive("customMarker",g)}(),function(){"use strict";var a=function(a,b){a.panel&&(a.panel=document.getElementById(a.panel)||document.querySelector(a.panel));var c=new google.maps.DirectionsRenderer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c},b=function(b,c,d){var e=b,f=new google.maps.DirectionsService,g=function(a,b){var e=b;e.travelMode=e.travelMode||"DRIVING";var g=["origin","destination","travelMode","transitOptions","unitSystem","durationInTraffic","waypoints","optimizeWaypoints","provideRouteAlternatives","avoidHighways","avoidTolls","region"];for(var h in e)-1===g.indexOf(h)&&delete e[h];e.waypoints&&("[]"==e.waypoints||""==e.waypoints)&&delete e.waypoints;var i=function(b){f.route(b,function(b,d){d==google.maps.DirectionsStatus.OK&&c(function(){a.setDirections(b)})})};e.origin&&e.destination&&("current-location"==e.origin?d.getCurrentPosition().then(function(a){e.origin=new google.maps.LatLng(a.coords.latitude,a.coords.longitude),i(e)}):"current-location"==e.destination?d.getCurrentPosition().then(function(a){e.destination=new google.maps.LatLng(a.coords.latitude,a.coords.longitude),i(e)}):i(e))},h=function(b,d,f,h){var i=e.orgAttributes(d),j=e.filter(f),k=e.getOptions(j),l=e.getEvents(b,j),m=e.getAttrsToObserve(i),n=a(k,l);h.addObject("directionsRenderers",n),m.forEach(function(a){!function(a){f.$observe(a,function(b){if("panel"==a)c(function(){var a=document.getElementById(b)||document.querySelector(b);a&&n.setPanel(a)});else if(k[a]!==b){var d=e.toOptionValue(b,{key:a});k[a]=d,g(n,k)}})}(a)}),b.$on("mapInitialized",function(a,b){g(n,k)}),b.$on("$destroy",function(a,b){h.deleteObject("directionsRenderers",n)})};return{restrict:"E",require:"^map",link:h}};b.$inject=["Attr2Options","$timeout","NavigatorGeolocation"],angular.module("ngMap").directive("directions",b)}(),function(){"use strict";angular.module("ngMap").directive("drawingManager",["Attr2Options",function(a){var b=a;return{restrict:"E",require:"^map",link:function(a,c,d,e){var f=(b.orgAttributes(c),b.filter(d)),g=b.getOptions(f),h=b.getControlOptions(f),i=b.getEvents(a,f),j=new google.maps.drawing.DrawingManager({drawingMode:g.drawingmode,drawingControl:g.drawingcontrol,drawingControlOptions:h.drawingControlOptions,circleOptions:g.circleoptions,markerOptions:g.markeroptions,polygonOptions:g.polygonoptions,polylineOptions:g.polylineoptions,rectangleOptions:g.rectangleoptions}),i=b.getEvents(a,f);for(var k in i)google.maps.event.addListener(j,k,i[k]);e.addObject("mapDrawingManager",j)}}}])}(),function(){"use strict";angular.module("ngMap").directive("dynamicMapsEngineLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.visualization.DynamicMapsEngineLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.filter(e),h=b.getOptions(g),i=b.getEvents(a,g,i),j=c(h,i);f.addObject("mapsEngineLayers",j)}}}])}(),function(){"use strict";angular.module("ngMap").directive("fusionTablesLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.FusionTablesLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.filter(e),h=b.getOptions(g),i=b.getEvents(a,g,i),j=c(h,i);f.addObject("fusionTablesLayers",j)}}}])}(),function(){"use strict";angular.module("ngMap").directive("heatmapLayer",["Attr2Options","$window",function(a,b){var c=a;return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=c.filter(e),h=c.getOptions(g);if(h.data=b[e.data]||a[e.data],!(h.data instanceof Array))throw"invalid heatmap data";h.data=new google.maps.MVCArray(h.data);var i=new google.maps.visualization.HeatmapLayer(h);c.getEvents(a,g);f.addObject("heatmapLayers",i)}}}])}(),function(){"use strict";var a=function(a,b,c,d){var e=a,f=function(a,d,e){var f;!a.position||a.position instanceof google.maps.LatLng||delete a.position,f=new google.maps.InfoWindow(a),Object.keys(d).length>0;for(var g in d)g&&google.maps.event.addListener(f,g,d[g]);var h=e.html().trim();if(1!=angular.element(h).length)throw"info-window working as a template must have a container";return f.__template=h.replace(/\s?ng-non-bindable[='"]+/,""),f.__compile=function(a,c){c&&(a["this"]=c);var d=b(f.__template)(a);f.setContent(d[0]),a.$apply()},f.__open=function(a,b,d){c(function(){f.__compile(b,d),d&&d.getPosition?f.open(a,d):d&&d instanceof google.maps.LatLng?(f.open(a),f.setPosition(d)):f.open(a)})},f},g=function(a,b,c,g){b.css("display","none");var h,i=e.orgAttributes(b),j=e.filter(c),k=e.getOptions(j,a),l=e.getEvents(a,j);!k.position||k.position instanceof google.maps.LatLng||(h=k.position);var m=f(k,l,b);h&&g.getGeoLocation(h).then(function(b){m.setPosition(b),m.__open(g.map,a,b);var e=c.geoCallback;e&&d(e)(a)}),g.addObject("infoWindows",m),g.observeAttrSetObj(i,c,m),a.$on("mapInitialized",function(b,c){if(m.visible&&m.__open(c,a),m.visibleOnMarker){var d=m.visibleOnMarker;m.__open(c,a,c.markers[d])}}),a.showInfoWindow=function(b,c,d){var e=g.map.infoWindows[c],f=d?d:this.getPosition?this:null;e.__open(g.map,a,f),g.singleInfoWindow&&(g.lastInfoWindow&&a.hideInfoWindow(b,g.lastInfoWindow),g.lastInfoWindow=c)},a.hideInfoWindow=a.hideInfoWindow||function(a,b){var c=g.map.infoWindows[b];c.close()}};return{restrict:"E",require:"^map",link:g}};a.$inject=["Attr2Options","$compile","$timeout","$parse"],angular.module("ngMap").directive("infoWindow",a)}(),function(){"use strict";angular.module("ngMap").directive("kmlLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.KmlLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.orgAttributes(d),h=b.filter(e),i=b.getOptions(h),j=b.getEvents(a,h),k=c(i,j);f.addObject("kmlLayers",k),f.observeAttrSetObj(g,e,k),d.bind("$destroy",function(){f.deleteObject("kmlLayers",k)})}}}])}(),function(){"use strict";angular.module("ngMap").directive("mapData",["Attr2Options",function(a){var b=a;return{restrict:"E",require:"^map",link:function(a,c,d,e){var f=b.filter(d),g=b.getOptions(f),h=b.getEvents(a,f,h);a.$on("mapInitialized",function(b,c){for(var d in g)if(d){var e=g[d];"function"==typeof a[e]?c.data[d](a[e]):c.data[d](e)}for(var f in h)h[f]&&c.data.addListener(f,h[f])})}}}])}(),function(){"use strict";var a,b,c,d,e=function(c,e,f){var g=f.mapLazyLoadParams||f.mapLazyLoad;if(window.lazyLoadCallback=function(){a(function(){e.html(d),b(e.contents())(c)},100)},void 0===window.google||void 0===window.google.maps){var h=document.createElement("script");h.src=g+(g.indexOf("?")>-1?"&":"?")+"callback=lazyLoadCallback",document.body.appendChild(h)}else e.html(d),b(e.contents())(c)},f=function(a,b){return!b.mapLazyLoad&&void 0,d=a.html(),c=b.mapLazyLoad,document.querySelector('script[src="'+c+(c.indexOf("?")>-1?"&":"?")+'callback=lazyLoadCallback"]')?!1:(a.html(""),{pre:e})},g=function(c,d){return b=c,a=d,{compile:f}};g.$inject=["$compile","$timeout"],angular.module("ngMap").directive("mapLazyLoad",g)}(),function(){"use strict";angular.module("ngMap").directive("mapType",["Attr2Options","$window",function(a,b){return{restrict:"E",require:"^map",link:function(a,c,d,e){var f,g=d.name;if(!g)throw"invalid map-type name";if(d.object){var h=a[d.object]?a:b;f=h[d.object],"function"==typeof f&&(f=new f)}if(!f)throw"invalid map-type object";a.$on("mapInitialized",function(a,b){b.mapTypes.set(g,f)}),e.addObject("mapTypes",f)}}}])}(),function(){"use strict";function a(a,b){var c;return a.currentStyle?c=a.currentStyle[b]:window.getComputedStyle&&(c=document.defaultView.getComputedStyle(a,null).getPropertyValue(b)),c}var b=function(b,c,d){var e=b,f=function(b,f,g,h){var i=e.orgAttributes(f);b.google=google;var j=document.createElement("div"); +j.style.width="100%",j.style.height="100%",f.prepend(j),"false"!==g.defaultStyle&&("block"!=a(f[0],"display")&&f.css("display","block"),a(f[0],"height").match(/^(0|auto)/)&&f.css("height","300px")),f[0].addEventListener("dragstart",function(a){return a.preventDefault(),!1});var k=function(a,e){var f=new google.maps.Map(j,{});f.markers={},f.shapes={},c(function(){google.maps.event.trigger(f,"resize")}),a.zoom=a.zoom||15;var k=a.center;k?k instanceof google.maps.LatLng||(delete a.center,h.getGeoLocation(k,m.geoLocationOptions).then(function(a){f.setCenter(a);var c=g.geoCallback;c&&d(c)(b)},function(a){f.setCenter(m.geoFallbackCenter)})):a.center=new google.maps.LatLng(0,0),f.setOptions(a),h.singleInfoWindow=a.singleInfoWindow;for(var l in e)l&&google.maps.event.addListener(f,l,e[l]);h.observeAttrSetObj(i,g,f),h.map=f,h.addObjects(h._objects),b.map=f,b.map.scope=b,google.maps.event.addListenerOnce(f,"idle",function(){b.$emit("mapInitialized",f),g.zoomToIncludeMarkers&&(h.zoomToIncludeMarkers(),"auto"==g.zoomToIncludeMarkers&&b.$on("objectChanged",function(a,b){"markers"==b[0]&&h.zoomToIncludeMarkers()}))})},l=e.filter(g),m=e.getOptions(l,b),n=e.getControlOptions(l),o=angular.extend(m,n),p=e.getEvents(b,l);g.initEvent?b.$on(g.initEvent,function(){!h.map&&k(o,p)}):k(o,p)};return{restrict:"AE",controller:"MapController",link:f}};angular.module("ngMap").directive("map",["Attr2Options","$timeout","$parse",b])}(),function(){"use strict";var a=function(a,b,c,d,e){var f=e,g=this,h=function(a,b,c){a.$observe(b,function(a){if(a){var d=f.camelCase("set-"+b),e=f.toOptionValue(a,{key:b});c[d]&&(b.match(/center|position/)&&"string"==typeof e?g.getGeoLocation(e).then(function(a){c[d](a)}):c[d](e))}})};this.map=null,this._objects=[],this.addObject=function(b,c){if(this.map){this.map[b]=this.map[b]||{};var d=Object.keys(this.map[b]).length;this.map[b][c.id||d]=c,"infoWindows"!=b&&c.setMap&&c.setMap&&c.setMap(this.map),c.centered&&c.position&&this.map.setCenter(c.position),a.$emit("objectChanged",[b,this.map[b]])}else c.groupName=b,this._objects.push(c)},this.deleteObject=function(b,c){if(c.map){var d=c.map[b];for(var e in d)d[e]===c&&delete d[e];c.map&&c.setMap&&c.setMap(null),a.$emit("objectChanged",[b,this.map[b]])}},this.addObjects=function(a){for(var b=0;b0;for(var d in b)d&&google.maps.event.addListener(c,d,b[d]);return c},b=function(b,c){var d=b,e=function(b,e,f,g){var h,i=d.orgAttributes(e),j=d.filter(f),k=d.getOptions(j,b),l=d.getEvents(b,j);k.position instanceof google.maps.LatLng||(h=k.position);var m=a(k,l);g.addObject("markers",m),h&&g.getGeoLocation(h).then(function(a){m.setPosition(a),k.centered&&m.map.setCenter(a);var d=f.geoCallback;d&&c(d)(b)}),k.noWatcher||g.observeAttrSetObj(i,f,m),e.bind("$destroy",function(){g.deleteObject("markers",m)})};return{restrict:"E",require:"^map",link:e}};b.$inject=["Attr2Options","$parse"],angular.module("ngMap").directive("marker",b)}(),function(){"use strict";angular.module("ngMap").directive("overlayMapType",["Attr2Options","$window",function(a,b){return{restrict:"E",require:"^map",link:function(a,c,d,e){var f,g=d.initMethod||"insertAt";if(d.object){var h=a[d.object]?a:b;f=h[d.object],"function"==typeof f&&(f=new f)}if(!f)throw"invalid map-type object";a.$on("mapInitialized",function(a,b){if("insertAt"==g){var c=parseInt(d.index,10);b.overlayMapTypes.insertAt(c,f)}else"push"==g&&b.overlayMapTypes.push(f)}),e.addObject("overlayMapTypes",f)}}}])}(),function(){"use strict";var a=function(a,b){var c=a,d=function(a,d,e,f){if("false"===e.placesAutoComplete)return!1;var g=c.filter(e),h=c.getOptions(g),i=c.getEvents(a,g),j=new google.maps.places.Autocomplete(d[0],h);for(var k in i)google.maps.event.addListener(j,k,i[k]);var l=function(){b(function(){f&&f.$setViewValue(d.val())},100)};google.maps.event.addListener(j,"place_changed",l),d[0].addEventListener("change",l),e.$observe("types",function(a){if(a){var b=c.toOptionValue(a,{key:"types"});j.setTypes(b)}})};return{restrict:"A",require:"?ngModel",link:d}};a.$inject=["Attr2Options","$timeout"],angular.module("ngMap").directive("placesAutoComplete",a)}(),function(){"use strict";var a=function(a,b){var c,d=a.name;switch(delete a.name,d){case"circle":a.center instanceof google.maps.LatLng||(a.center=new google.maps.LatLng(0,0)),c=new google.maps.Circle(a);break;case"polygon":c=new google.maps.Polygon(a);break;case"polyline":c=new google.maps.Polyline(a);break;case"rectangle":c=new google.maps.Rectangle(a);break;case"groundOverlay":case"image":var e=a.url,f={opacity:a.opacity,clickable:a.clickable,id:a.id};c=new google.maps.GroundOverlay(e,a.bounds,f)}for(var g in b)b[g]&&google.maps.event.addListener(c,g,b[g]);return c},b=function(b,c){var d=b,e=function(b,e,f,g){var h,i,j=d.orgAttributes(e),k=d.filter(f),l=d.getOptions(k),m=d.getEvents(b,k);i=l.name,l.center instanceof google.maps.LatLng||(h=l.center);var n=a(l,m);g.addObject("shapes",n),h&&"circle"==i&&g.getGeoLocation(h).then(function(a){n.setCenter(a),n.centered&&n.map.setCenter(a);var d=f.geoCallback;d&&c(d)(b)}),g.observeAttrSetObj(j,f,n),e.bind("$destroy",function(){g.deleteObject("shapes",n)})};return{restrict:"E",require:"^map",link:e}};b.$inject=["Attr2Options","$parse"],angular.module("ngMap").directive("shape",b)}(),function(){"use strict";var a=function(a){var b=a,c=function(a,b,c){var d,e;b.container&&(e=document.getElementById(b.container),e=e||document.querySelector(b.container)),e?d=new google.maps.StreetViewPanorama(e,b):(d=a.getStreetView(),d.setOptions(b));for(var f in c)f&&google.maps.event.addListener(d,f,c[f]);return d},d=function(a,d,e,f){var g=(b.orgAttributes(d),b.filter(e)),h=b.getOptions(g),i=b.getControlOptions(g),j=angular.extend(h,i),k=b.getEvents(a,g);a.$on("mapInitialized",function(a,b){var d=c(b,j,k);b.setStreetView(d),!d.getPosition()&&d.setPosition(b.getCenter()),google.maps.event.addListener(d,"position_changed",function(){d.getPosition()!==b.getCenter()&&b.setCenter(d.getPosition())});var e=google.maps.event.addListener(b,"center_changed",function(){d.setPosition(b.getCenter()),google.maps.event.removeListener(e)})})};return{restrict:"E",require:"^map",link:d}};a.$inject=["Attr2Options"],angular.module("ngMap").directive("streetViewPanorama",a)}(),function(){"use strict";angular.module("ngMap").directive("trafficLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.TrafficLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.orgAttributes(d),h=b.filter(e),i=b.getOptions(h),j=b.getEvents(a,h),k=c(i,j);f.addObject("trafficLayers",k),f.observeAttrSetObj(g,e,k),d.bind("$destroy",function(){f.deleteObject("trafficLayers",k)})}}}])}(),function(){"use strict";angular.module("ngMap").directive("transitLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.TransitLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.orgAttributes(d),h=b.filter(e),i=b.getOptions(h),j=b.getEvents(a,h),k=c(i,j);f.addObject("transitLayers",k),f.observeAttrSetObj(g,e,k),d.bind("$destroy",function(){f.deleteObject("transitLayers",k)})}}}])}(),function(){"use strict";angular.module("ngMap").directive("weatherLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.weather.WeatherLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.orgAttributes(d),h=b.filter(e),i=b.getOptions(h),j=b.getEvents(a,h),k=c(i,j);f.addObject("weatherLayers",k),f.observeAttrSetObj(g,e,k),d.bind("$destroy",function(){f.deleteObject("weatherLayers",k)})}}}])}(),function(a,b){"use strict";var c=["ng","oc.lazyLoad"],d={},e=[],f=[],g=[],h=[],i=a.noop,j={},k=[],l=a.module("oc.lazyLoad",["ng"]);l.provider("$ocLazyLoad",["$controllerProvider","$provide","$compileProvider","$filterProvider","$injector","$animateProvider",function(l,m,p,q,r,s){function t(b,d,e){if(d){var f,h,l,m=[];for(f=d.length-1;f>=0;f--)if(h=d[f],a.isString(h)||(h=w(h)),h&&-1===k.indexOf(h)&&(!y[h]||-1!==g.indexOf(h))){var n=-1===c.indexOf(h);if(l=o(h),n&&(c.push(h),t(b,l.requires,e)),l._runBlocks.length>0)for(j[h]=[];l._runBlocks.length>0;)j[h].push(l._runBlocks.shift());a.isDefined(j[h])&&(n||e.rerun)&&(m=m.concat(j[h])),v(b,l._invokeQueue,h,e.reconfig),v(b,l._configBlocks,h,e.reconfig),i(n?"ocLazyLoad.moduleLoaded":"ocLazyLoad.moduleReloaded",h),d.pop(),k.push(h)}var p=b.getInstanceInjector();a.forEach(m,function(a){p.invoke(a)})}}function u(b,c){function e(b,c){var d,e=!0;return c.length&&(d=f(b),a.forEach(c,function(a){e=e&&f(a)!==d})),e}function f(b){return a.isArray(b)?F(b.toString()):a.isObject(b)?F(E(b)):a.isDefined(b)&&null!==b?F(b.toString()):b}var g=b[2][0],h=b[1],j=!1;a.isUndefined(d[c])&&(d[c]={}),a.isUndefined(d[c][h])&&(d[c][h]={});var k=function(a,b){d[c][h].hasOwnProperty(a)||(d[c][h][a]=[]),e(b,d[c][h][a])&&(j=!0,d[c][h][a].push(b),i("ocLazyLoad.componentLoaded",[c,h,a]))};if(a.isString(g))k(g,b[2][1]);else{if(!a.isObject(g))return!1;a.forEach(g,function(b,c){a.isString(b)?k(b,g[1]):k(c,b)})}return j}function v(b,c,d,f){if(c){var g,h,i,j;for(g=0,h=c.length;h>g;g++)if(i=c[g],a.isArray(i)){if(null!==b){if(!b.hasOwnProperty(i[0]))throw new Error("unsupported provider "+i[0]);j=b[i[0]]}var k=u(i,d);if("invoke"!==i[1])k&&a.isDefined(j)&&j[i[1]].apply(j,i[2]);else{var l=function(b){var c=e.indexOf(d+"-"+b);(-1===c||f)&&(-1===c&&e.push(d+"-"+b),a.isDefined(j)&&j[i[1]].apply(j,i[2]))};if(a.isFunction(i[2][0]))l(i[2][0]);else if(a.isArray(i[2][0]))for(var m=0,n=i[2][0].length;n>m;m++)a.isFunction(i[2][0][m])&&l(i[2][0][m])}}}}function w(b){var c=null;return a.isString(b)?c=b:a.isObject(b)&&b.hasOwnProperty("name")&&a.isString(b.name)&&(c=b.name),c}function x(b){if(!a.isString(b))return!1;try{return o(b)}catch(c){if(/No module/.test(c)||c.message.indexOf("$injector:nomod")>-1)return!1}}var y={},z={$controllerProvider:l,$compileProvider:p,$filterProvider:q,$provide:m,$injector:r,$animateProvider:s},A=!1,B=!1,C=[],D={};C.push=function(a){-1===this.indexOf(a)&&Array.prototype.push.apply(this,arguments)},this.config=function(b){a.isDefined(b.modules)&&(a.isArray(b.modules)?a.forEach(b.modules,function(a){y[a.name]=a}):y[b.modules.name]=b.modules),a.isDefined(b.debug)&&(A=b.debug),a.isDefined(b.events)&&(B=b.events)},this._init=function(d){if(0===f.length){var e=[d],g=["ng:app","ng-app","x-ng-app","data-ng-app"],i=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/,j=function(a){return a&&e.push(a)};a.forEach(g,function(b){g[b]=!0,j(document.getElementById(b)),b=b.replace(":","\\:"),"undefined"!=typeof d[0]&&d[0].querySelectorAll&&(a.forEach(d[0].querySelectorAll("."+b),j),a.forEach(d[0].querySelectorAll("."+b+"\\:"),j),a.forEach(d[0].querySelectorAll("["+b+"]"),j))}),a.forEach(e,function(b){if(0===f.length){var c=" "+d.className+" ",e=i.exec(c);e?f.push((e[2]||"").replace(/\s+/g,",")):a.forEach(b.attributes,function(a){0===f.length&&g[a.name]&&f.push(a.value)})}})}0!==f.length||(b.jasmine||b.mocha)&&a.isDefined(a.mock)||console.error("No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.");var k=function l(b){if(-1===c.indexOf(b)){c.push(b);var d=a.module(b);v(null,d._invokeQueue,b),v(null,d._configBlocks,b),a.forEach(d.requires,l)}};a.forEach(f,function(a){k(a)}),f=[],h.pop()};var E=function(b){try{return JSON.stringify(b)}catch(c){var d=[];return JSON.stringify(b,function(b,c){if(a.isObject(c)&&null!==c){if(-1!==d.indexOf(c))return;d.push(c)}return c})}},F=function(a){var b,c,d,e=0;if(0==a.length)return e;for(b=0,d=a.length;d>b;b++)c=a.charCodeAt(b),e=(e<<5)-e+c,e|=0;return e};this.$get=["$log","$rootElement","$rootScope","$cacheFactory","$q",function(b,e,g,j,l){function m(a){var c=l.defer();return b.error(a.message),c.reject(a),c.promise}var p,q=j("ocLazyLoad");return A||(b={},b.error=a.noop,b.warn=a.noop,b.info=a.noop),z.getInstanceInjector=function(){return p?p:p=e.data("$injector")||a.injector()},i=function(a,c){B&&g.$broadcast(a,c),A&&b.info(a,c)},{_broadcast:i,_$log:b,_getFilesCache:function(){return q},toggleWatch:function(a){a?h.push(!0):h.pop()},getModuleConfig:function(b){if(!a.isString(b))throw new Error("You need to give the name of the module to get");return y[b]?a.copy(y[b]):null},setModuleConfig:function(b){if(!a.isObject(b))throw new Error("You need to give the module config object to set");return y[b.name]=b,b},getModules:function(){return c},isLoaded:function(b){var d=function(a){var b=c.indexOf(a)>-1;return b||(b=!!x(a)),b};if(a.isString(b)&&(b=[b]),a.isArray(b)){var e,f;for(e=0,f=b.length;f>e;e++)if(!d(b[e]))return!1;return!0}throw new Error("You need to define the module(s) name(s)")},_getModuleName:w,_getModule:function(a){try{return o(a)}catch(b){throw(/No module/.test(b)||b.message.indexOf("$injector:nomod")>-1)&&(b.message='The module "'+E(a)+'" that you are trying to load does not exist. '+b.message),b}},moduleExists:x,_loadDependencies:function(b,c){var d,e,f,g=[],h=this;if(b=h._getModuleName(b),null===b)return l.when();try{d=h._getModule(b)}catch(i){return m(i)}return e=h.getRequires(d),a.forEach(e,function(d){if(a.isString(d)){var e=h.getModuleConfig(d);if(null===e)return void C.push(d);d=e,e.name=void 0}if(h.moduleExists(d.name))return f=d.files.filter(function(a){return h.getModuleConfig(d.name).files.indexOf(a)<0}),0!==f.length&&h._$log.warn('Module "',b,'" attempted to redefine configuration for dependency. "',d.name,'"\n Additional Files Loaded:',f),a.isDefined(h.filesLoader)?void g.push(h.filesLoader(d,c).then(function(){return h._loadDependencies(d)})):m(new Error("Error: New dependencies need to be loaded from external files ("+d.files+"), but no loader has been defined."));if(a.isArray(d)){var i=[];a.forEach(d,function(a){var b=h.getModuleConfig(a);null===b?i.push(a):b.files&&(i=i.concat(b.files))}),i.length>0&&(d={files:i})}else a.isObject(d)&&d.hasOwnProperty("name")&&d.name&&(h.setModuleConfig(d),C.push(d.name));if(a.isDefined(d.files)&&0!==d.files.length){if(!a.isDefined(h.filesLoader))return m(new Error('Error: the module "'+d.name+'" is defined in external files ('+d.files+"), but no loader has been defined."));g.push(h.filesLoader(d,c).then(function(){return h._loadDependencies(d)}))}}),l.all(g)},inject:function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],d=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],e=this,g=l.defer();if(a.isDefined(b)&&null!==b){if(a.isArray(b)){var h=[];return a.forEach(b,function(a){h.push(e.inject(a,c,d))}),l.all(h)}e._addToLoadList(e._getModuleName(b),!0,d)}if(f.length>0){var i=f.slice(),j=function m(a){C.push(a),D[a]=g.promise,e._loadDependencies(a,c).then(function(){try{k=[],t(z,C,c)}catch(a){return e._$log.error(a.message),void g.reject(a)}f.length>0?m(f.shift()):g.resolve(i)},function(a){g.reject(a)})};j(f.shift())}else{if(c&&c.name&&D[c.name])return D[c.name];g.resolve()}return g.promise},getRequires:function(b){var d=[];return a.forEach(b.requires,function(a){-1===c.indexOf(a)&&d.push(a)}),d},_invokeQueue:v,_registerInvokeList:u,_register:t,_addToLoadList:n,_unregister:function(b){a.isDefined(b)&&a.isArray(b)&&a.forEach(b,function(a){d[a]=void 0})}}}],this._init(a.element(b.document))}]);var m=a.bootstrap;a.bootstrap=function(b,c,d){return a.forEach(c.slice(),function(a){n(a,!0,!0)}),m(b,c,d)};var n=function(b,c,d){(h.length>0||c)&&a.isString(b)&&-1===f.indexOf(b)&&(f.push(b),d&&g.push(b))},o=a.module;a.module=function(a,b,c){return n(a,!1,!0),o(a,b,c)},"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="oc.lazyLoad")}(angular,window),function(a){"use strict";a.module("oc.lazyLoad").directive("ocLazyLoad",["$ocLazyLoad","$compile","$animate","$parse","$timeout",function(b,c,d,e,f){return{restrict:"A",terminal:!0,priority:1e3,compile:function(f,g){var h=f[0].innerHTML;return f.html(""),function(f,g,i){var j=e(i.ocLazyLoad);f.$watch(function(){return j(f)||i.ocLazyLoad},function(e){a.isDefined(e)&&b.load(e).then(function(){d.enter(h,g),c(g.contents())(f)})},!0)}}}}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(b){b.decorator("$ocLazyLoad",["$delegate","$q","$window","$interval",function(b,c,d,e){var f=!1,g=!1,h=d.document.getElementsByTagName("head")[0]||d.document.getElementsByTagName("body")[0];return b.buildElement=function(i,j,k){var l,m,n=c.defer(),o=b._getFilesCache(),p=function(a){var b=(new Date).getTime();return a.indexOf("?")>=0?"&"===a.substring(0,a.length-1)?a+"_dc="+b:a+"&_dc="+b:a+"?_dc="+b};switch(a.isUndefined(o.get(j))&&o.put(j,n.promise),i){case"css":l=d.document.createElement("link"),l.type="text/css",l.rel="stylesheet",l.href=k.cache===!1?p(j):j;break;case"js":l=d.document.createElement("script"),l.src=k.cache===!1?p(j):j;break;default:o.remove(j),n.reject(new Error('Requested type "'+i+'" is not known. Could not inject "'+j+'"'))}l.onload=l.onreadystatechange=function(a){l.readyState&&!/^c|loade/.test(l.readyState)||m||(l.onload=l.onreadystatechange=null,m=1,b._broadcast("ocLazyLoad.fileLoaded",j),n.resolve())},l.onerror=function(){o.remove(j),n.reject(new Error("Unable to load "+j))},l.async=k.serie?0:1;var q=h.lastChild;if(k.insertBefore){var r=a.element(a.isDefined(window.jQuery)?k.insertBefore:document.querySelector(k.insertBefore));r&&r.length>0&&(q=r[0])}if(q.parentNode.insertBefore(l,q),"css"==i){if(!f){var s=d.navigator.userAgent.toLowerCase();if(/iP(hone|od|ad)/.test(d.navigator.platform)){var t=d.navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),u=parseFloat([parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3]||0,10)].join("."));g=6>u}else if(s.indexOf("android")>-1){var v=parseFloat(s.slice(s.indexOf("android")+8));g=4.4>v}else if(s.indexOf("safari")>-1){var w=s.match(/version\/([\.\d]+)/i);g=w&&w[1]&&parseFloat(w[1])<6}}if(g)var x=1e3,y=e(function(){try{l.sheet.cssRules,e.cancel(y),l.onload()}catch(a){--x<=0&&l.onerror()}},20)}return n.promise},b}])}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(b){b.decorator("$ocLazyLoad",["$delegate","$q",function(b,c){return b.filesLoader=function(d){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],f=[],g=[],h=[],i=[],j=null,k=b._getFilesCache();b.toggleWatch(!0),a.extend(e,d);var l=function(c){var d,l=null;if(a.isObject(c)&&(l=c.type,c=c.path),j=k.get(c),a.isUndefined(j)||e.cache===!1){if(null!==(d=/^(css|less|html|htm|js)?(?=!)/.exec(c))&&(l=d[1],c=c.substr(d[1].length+1,c.length)),!l)if(null!==(d=/[.](css|less|html|htm|js)?((\?|#).*)?$/.exec(c)))l=d[1];else{if(b.jsLoader.hasOwnProperty("ocLazyLoadLoader")||!b.jsLoader.hasOwnProperty("requirejs"))return void b._$log.error("File type could not be determined. "+c);l="js"}"css"!==l&&"less"!==l||-1!==f.indexOf(c)?"html"!==l&&"htm"!==l||-1!==g.indexOf(c)?"js"===l||-1===h.indexOf(c)?h.push(c):b._$log.error("File type is not valid. "+c):g.push(c):f.push(c)}else j&&i.push(j)};if(e.serie?l(e.files.shift()):a.forEach(e.files,function(a){l(a)}),f.length>0){var m=c.defer();b.cssLoader(f,function(c){a.isDefined(c)&&b.cssLoader.hasOwnProperty("ocLazyLoadLoader")?(b._$log.error(c),m.reject(c)):m.resolve()},e),i.push(m.promise)}if(g.length>0){var n=c.defer();b.templatesLoader(g,function(c){a.isDefined(c)&&b.templatesLoader.hasOwnProperty("ocLazyLoadLoader")?(b._$log.error(c),n.reject(c)):n.resolve()},e),i.push(n.promise)}if(h.length>0){var o=c.defer();b.jsLoader(h,function(c){a.isDefined(c)&&(b.jsLoader.hasOwnProperty("ocLazyLoadLoader")||b.jsLoader.hasOwnProperty("requirejs"))?(b._$log.error(c),o.reject(c)):o.resolve()},e),i.push(o.promise)}if(0===i.length){var p=c.defer(),q="Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'.";return b._$log.error(q),p.reject(q),p.promise}return e.serie&&e.files.length>0?c.all(i).then(function(){return b.filesLoader(d,e)}):c.all(i)["finally"](function(a){return b.toggleWatch(!1),a})},b.load=function(d){var e,f=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],g=this,h=null,i=[],j=c.defer(),k=a.copy(d),l=a.copy(f);if(a.isArray(k))return a.forEach(k,function(a){i.push(g.load(a,l))}),c.all(i).then(function(a){j.resolve(a)},function(a){j.reject(a)}),j.promise;if(a.isString(k)?(h=g.getModuleConfig(k),h||(h={files:[k]})):a.isObject(k)&&(h=a.isDefined(k.path)&&a.isDefined(k.type)?{files:[k]}:g.setModuleConfig(k)),null===h){var m=g._getModuleName(k);return e='Module "'+(m||"unknown")+'" is not configured, cannot load.',b._$log.error(e),j.reject(new Error(e)),j.promise}a.isDefined(h.template)&&(a.isUndefined(h.files)&&(h.files=[]),a.isString(h.template)?h.files.push(h.template):a.isArray(h.template)&&h.files.concat(h.template));var n=a.extend({},l,h);return a.isUndefined(h.files)&&a.isDefined(h.name)&&b.moduleExists(h.name)?b.inject(h.name,n,!0):(b.filesLoader(h,n).then(function(){b.inject(null,n).then(function(a){j.resolve(a)},function(a){j.reject(a)})},function(a){j.reject(a)}),j.promise)},b}])}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(b){b.decorator("$ocLazyLoad",["$delegate","$q",function(b,c){return b.cssLoader=function(d,e,f){var g=[];a.forEach(d,function(a){g.push(b.buildElement("css",a,f))}),c.all(g).then(function(){e()},function(a){e(a)})},b.cssLoader.ocLazyLoadLoader=!0,b}])}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(b){b.decorator("$ocLazyLoad",["$delegate","$q",function(b,c){return b.jsLoader=function(d,e,f){var g=[];a.forEach(d,function(a){g.push(b.buildElement("js",a,f))}),c.all(g).then(function(){e()},function(a){e(a)})},b.jsLoader.ocLazyLoadLoader=!0,b}])}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(b){b.decorator("$ocLazyLoad",["$delegate","$templateCache","$q","$http",function(b,c,d,e){return b.templatesLoader=function(f,g,h){var i=[],j=b._getFilesCache();return a.forEach(f,function(b){var f=d.defer();i.push(f.promise),e.get(b,h).success(function(d){a.isString(d)&&d.length>0&&a.forEach(a.element(d),function(a){"SCRIPT"===a.nodeName&&"text/ng-template"===a.type&&c.put(a.id,a.innerHTML)}),a.isUndefined(j.get(b))&&j.put(b,!0),f.resolve()}).error(function(a){f.reject(new Error('Unable to load template file "'+b+'": '+a))})}),d.all(i).then(function(){g()},function(a){g(a)})},b.templatesLoader.ocLazyLoadLoader=!0,b}])}])}(angular),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;var f=+b||0;if(Math.abs(f)===1/0&&(f=0),f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);e>c;){if(c in d&&d[c]===a)return c;c++}return-1}),"undefined"==typeof PDFJS&&(("undefined"!=typeof window?window:this).PDFJS={}),PDFJS.version="1.1.551",PDFJS.build="2a5616c",function(){"use strict";function a(a){PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.infos&&console.log("Info: "+a)}function b(a){PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.warnings&&console.log("Warning: "+a)}function c(a){b("Deprecated API usage: "+a)}function d(a){throw PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.errors&&(console.log("Error: "+a),console.log(e())),I.notify(H.unknown),new Error(a)}function e(){try{throw new Error}catch(a){return a.stack?a.stack.split("\n").slice(2).join("\n"):""}}function f(a,b){a||d(b)}function g(a,b){if(!b)return a;if(/^[a-z][a-z0-9+\-.]*:/i.test(b))return b;var c;if("/"===b.charAt(0))return c=a.indexOf("://"),"/"===b.charAt(1)?++c:c=a.indexOf("/",c+3),a.substring(0,c)+b;var d=a.length;c=a.lastIndexOf("#"),d=c>=0?c:d,c=a.lastIndexOf("?",d),d=c>=0?c:d;var e=a.lastIndexOf("/",d);return a.substring(0,e+1)+b}function h(a,b){if(!a)return!1;var c=/^[a-z][a-z0-9+\-.]*(?=:)/i.exec(a);if(!c)return b;switch(c=c[0].toLowerCase()){case"http":case"https":case"ftp":case"mailto":case"tel":return!0;default:return!1}}function i(a,b,c){return Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!1}),c}function j(){switch(PDFJS.openExternalLinksInNewWindow&&(b("PDFJS.openExternalLinksInNewWindow is deprecated, use PDFJS.externalLinkTarget instead."),PDFJS.externalLinkTarget===J.NONE&&(PDFJS.externalLinkTarget=J.BLANK),PDFJS.openExternalLinksInNewWindow=!1),PDFJS.externalLinkTarget){case J.NONE:return!1;case J.SELF:case J.BLANK:case J.PARENT:case J.TOP:return!0}return b("PDFJS.externalLinkTarget is invalid: "+PDFJS.externalLinkTarget),PDFJS.externalLinkTarget=J.NONE,!1}function k(a){f(null!==a&&"object"==typeof a&&void 0!==a.length,"Invalid argument for bytesToString");var b=a.length,c=8192;if(c>b)return String.fromCharCode.apply(null,a);for(var d=[],e=0;b>e;e+=c){var g=Math.min(e+c,b),h=a.subarray(e,g);d.push(String.fromCharCode.apply(null,h))}return d.join("")}function l(a){f("string"==typeof a,"Invalid argument for stringToBytes");for(var b=a.length,c=new Uint8Array(b),d=0;b>d;++d)c[d]=255&a.charCodeAt(d);return c}function m(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,255&a)}function n(){var a=new Uint8Array(2);a[0]=1;var b=new Uint16Array(a.buffer);return 1===b[0]}function o(){var a=document.createElement("canvas");a.width=a.height=1;var b=a.getContext("2d"),c=b.createImageData(1,1);return"undefined"!=typeof c.data.buffer}function p(a){return"number"==typeof a}function q(a){return a instanceof Array}function r(a){return"object"==typeof a&&null!==a&&void 0!==a.byteLength}function s(){var a={};return a.promise=new Promise(function(b,c){a.resolve=b,a.reject=c}),a}function t(a,b){this.name=a,this.comObj=b,this.callbackIndex=1,this.postMessageTransfers=!0;var c=this.callbacksCapabilities={},e=this.actionHandler={};e.console_log=[function(a){console.log.apply(console,a)}],e.console_error=[function(a){console.error.apply(console,a)}],e._unsupported_feature=[function(a){I.notify(a)}],b.onmessage=function(a){var f=a.data;if(f.isReply){var g=f.callbackId;if(f.callbackId in c){var h=c[g];delete c[g],"error"in f?h.reject(f.error):h.resolve(f.data)}else d("Cannot resolve callback "+g)}else if(f.action in e){var i=e[f.action];f.callbackId?Promise.resolve().then(function(){return i[0].call(i[1],f.data)}).then(function(a){b.postMessage({isReply:!0,callbackId:f.callbackId,data:a})},function(a){a instanceof Error&&(a+=""),b.postMessage({isReply:!0,callbackId:f.callbackId,error:a})}):i[0].call(i[1],f.data)}else d("Unknown action from worker: "+f.action)}}function u(a,c,d){var e=new Image;e.onload=function(){d.resolve(a,e)},e.onerror=function(){d.resolve(a,null),b("Error during JPEG image loading")},e.src=c}function v(a,b){var c=document.createElement("canvas");return c.width=a,c.height=b,c}function w(a){a.mozCurrentTransform||(a._originalSave=a.save,a._originalRestore=a.restore,a._originalRotate=a.rotate,a._originalScale=a.scale,a._originalTranslate=a.translate,a._originalTransform=a.transform,a._originalSetTransform=a.setTransform,a._transformMatrix=a._transformMatrix||[1,0,0,1,0,0],a._transformStack=[],Object.defineProperty(a,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(a,"mozCurrentTransformInverse",{get:function(){var a=this._transformMatrix,b=a[0],c=a[1],d=a[2],e=a[3],f=a[4],g=a[5],h=b*e-c*d,i=c*d-b*e;return[e/h,c/i,d/i,b/h,(e*f-d*g)/i,(c*f-b*g)/h]}}),a.save=function(){var a=this._transformMatrix;this._transformStack.push(a),this._transformMatrix=a.slice(0,6),this._originalSave()},a.restore=function(){var a=this._transformStack.pop();a&&(this._transformMatrix=a,this._originalRestore())},a.translate=function(a,b){var c=this._transformMatrix;c[4]=c[0]*a+c[2]*b+c[4],c[5]=c[1]*a+c[3]*b+c[5],this._originalTranslate(a,b)},a.scale=function(a,b){var c=this._transformMatrix;c[0]=c[0]*a,c[1]=c[1]*a,c[2]=c[2]*b,c[3]=c[3]*b,this._originalScale(a,b)},a.transform=function(b,c,d,e,f,g){var h=this._transformMatrix;this._transformMatrix=[h[0]*b+h[2]*c,h[1]*b+h[3]*c,h[0]*d+h[2]*e,h[1]*d+h[3]*e,h[0]*f+h[2]*g+h[4],h[1]*f+h[3]*g+h[5]],a._originalTransform(b,c,d,e,f,g)},a.setTransform=function(b,c,d,e,f,g){this._transformMatrix=[b,c,d,e,f,g],a._originalSetTransform(b,c,d,e,f,g)},a.rotate=function(a){var b=Math.cos(a),c=Math.sin(a),d=this._transformMatrix;this._transformMatrix=[d[0]*b+d[2]*c,d[1]*b+d[3]*c,d[0]*-c+d[2]*b,d[1]*-c+d[3]*b,d[4],d[5]],this._originalRotate(a)})}function x(a){var b,c,d,e,f=1e3,g=a.width,h=a.height,i=g+1,j=new Uint8Array(i*(h+1)),k=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),l=g+7&-8,m=a.data,n=new Uint8Array(l*h),o=0;for(b=0,e=m.length;e>b;b++)for(var p=128,q=m[b];p>0;)n[o++]=q&p?0:255,p>>=1;var r=0;for(o=0,0!==n[o]&&(j[0]=1,++r),c=1;g>c;c++)n[o]!==n[o+1]&&(j[c]=n[o]?2:1,++r),o++;for(0!==n[o]&&(j[c]=2,++r),b=1;h>b;b++){o=b*l,d=b*i,n[o-l]!==n[o]&&(j[d]=n[o]?1:8,++r);var s=(n[o]?4:0)+(n[o-l]?8:0);for(c=1;g>c;c++)s=(s>>2)+(n[o+1]?4:0)+(n[o-l+1]?8:0),k[s]&&(j[d+c]=k[s],++r),o++;if(n[o-l]!==n[o]&&(j[d+c]=n[o]?2:4,++r),r>f)return null}for(o=l*(h-1),d=b*i,0!==n[o]&&(j[d]=8,++r),c=1;g>c;c++)n[o]!==n[o+1]&&(j[d+c]=n[o]?4:8,++r),o++;if(0!==n[o]&&(j[d+c]=4,++r),r>f)return null;var t=new Int32Array([0,i,-1,0,-i,0,0,0,1]),u=[];for(b=0;r&&h>=b;b++){for(var v=b*i,w=v+g;w>v&&!j[v];)v++;if(v!==w){var x,y=[v%i,b],z=j[v],A=v;do{var B=t[z];do v+=B;while(!j[v]);x=j[v],5!==x&&10!==x?(z=x,j[v]=0):(z=x&51*z>>4,j[v]&=z>>2|z<<2),y.push(v%i),y.push(v/i|0),--r}while(A!==v);u.push(y),--b}}var C=function(a){a.save(),a.scale(1/g,-1/h),a.translate(0,-h),a.beginPath();for(var b=0,c=u.length;c>b;b++){var d=u[b];a.moveTo(d[0],d[1]);for(var e=2,f=d.length;f>e;e+=2)a.lineTo(d[e],d[e+1])}a.fill(),a.beginPath(),a.restore()};return C}function y(a){var b=ma[a[0]];return b||d("Unknown IR type: "+a[0]),b.fromIR(a)}var z="undefined"==typeof window?this:window,A="undefined"==typeof window,B=[.001,0,0,.001,0,0],C={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},D={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},E={WIDGET:1,TEXT:2,LINK:3},F={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};z.PDFJS||(z.PDFJS={}),z.PDFJS.pdfBug=!1,PDFJS.VERBOSITY_LEVELS={errors:0,warnings:1,infos:5};var G=PDFJS.OPS={ +dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},H=PDFJS.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"},I=PDFJS.UnsupportedManager=function(){var a=[];return{listen:function(b){a.push(b)},notify:function(c){b('Unsupported feature "'+c+'"');for(var d=0,e=a.length;e>d;d++)a[d](c)}}}();PDFJS.isValidUrl=h,PDFJS.shadow=i;var J=PDFJS.LinkTarget={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4},K=["","_self","_blank","_parent","_top"];PDFJS.isExternalLinkTargetSet=j;var L=PDFJS.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},M=function(){function a(a,b){this.name="PasswordException",this.message=a,this.code=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.PasswordException=M;var N=function(){function a(a,b){this.name="UnknownErrorException",this.message=a,this.details=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.UnknownErrorException=N;var O=function(){function a(a){this.name="InvalidPDFException",this.message=a}return a.prototype=new Error,a.constructor=a,a}();PDFJS.InvalidPDFException=O;var P=function(){function a(a){this.name="MissingPDFException",this.message=a}return a.prototype=new Error,a.constructor=a,a}();PDFJS.MissingPDFException=P;var Q=function(){function a(a,b){this.name="UnexpectedResponseException",this.message=a,this.status=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.UnexpectedResponseException=Q;(function(){function a(a){this.message=a}return a.prototype=new Error,a.prototype.name="NotImplementedException",a.constructor=a,a})(),function(){function a(a,b){this.begin=a,this.end=b,this.message="Missing data ["+a+", "+b+")"}return a.prototype=new Error,a.prototype.name="MissingDataException",a.constructor=a,a}(),function(){function a(a){this.message=a}return a.prototype=new Error,a.prototype.name="XRefParseException",a.constructor=a,a}();Object.defineProperty(PDFJS,"isLittleEndian",{configurable:!0,get:function(){return i(PDFJS,"isLittleEndian",n())}}),Object.defineProperty(PDFJS,"hasCanvasTypedArrays",{configurable:!0,get:function(){return i(PDFJS,"hasCanvasTypedArrays",o())}});var R=function(){function a(a,b){this.buffer=a,this.byteLength=a.length,this.length=void 0===b?this.byteLength>>2:b,c(this.length)}function b(a){return{get:function(){var b=this.buffer,c=a<<2;return(b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24)>>>0},set:function(b){var c=this.buffer,d=a<<2;c[d]=255&b,c[d+1]=b>>8&255,c[d+2]=b>>16&255,c[d+3]=b>>>24&255}}}function c(c){for(;c>d;)Object.defineProperty(a.prototype,d,b(d)),d++}a.prototype=Object.create(null);var d=0;return a}(),S=[1,0,0,1,0,0],T=PDFJS.Util=function(){function a(){}var b=["rgb(",0,",",0,",",0,")"];return a.makeCssRgb=function(a,c,d){return b[1]=a,b[3]=c,b[5]=d,b.join("")},a.transform=function(a,b){return[a[0]*b[0]+a[2]*b[1],a[1]*b[0]+a[3]*b[1],a[0]*b[2]+a[2]*b[3],a[1]*b[2]+a[3]*b[3],a[0]*b[4]+a[2]*b[5]+a[4],a[1]*b[4]+a[3]*b[5]+a[5]]},a.applyTransform=function(a,b){var c=a[0]*b[0]+a[1]*b[2]+b[4],d=a[0]*b[1]+a[1]*b[3]+b[5];return[c,d]},a.applyInverseTransform=function(a,b){var c=b[0]*b[3]-b[1]*b[2],d=(a[0]*b[3]-a[1]*b[2]+b[2]*b[5]-b[4]*b[3])/c,e=(-a[0]*b[1]+a[1]*b[0]+b[4]*b[1]-b[5]*b[0])/c;return[d,e]},a.getAxialAlignedBoundingBox=function(b,c){var d=a.applyTransform(b,c),e=a.applyTransform(b.slice(2,4),c),f=a.applyTransform([b[0],b[3]],c),g=a.applyTransform([b[2],b[1]],c);return[Math.min(d[0],e[0],f[0],g[0]),Math.min(d[1],e[1],f[1],g[1]),Math.max(d[0],e[0],f[0],g[0]),Math.max(d[1],e[1],f[1],g[1])]},a.inverseTransform=function(a){var b=a[0]*a[3]-a[1]*a[2];return[a[3]/b,-a[1]/b,-a[2]/b,a[0]/b,(a[2]*a[5]-a[4]*a[3])/b,(a[4]*a[1]-a[5]*a[0])/b]},a.apply3dTransform=function(a,b){return[a[0]*b[0]+a[1]*b[1]+a[2]*b[2],a[3]*b[0]+a[4]*b[1]+a[5]*b[2],a[6]*b[0]+a[7]*b[1]+a[8]*b[2]]},a.singularValueDecompose2dScale=function(a){var b=[a[0],a[2],a[1],a[3]],c=a[0]*b[0]+a[1]*b[2],d=a[0]*b[1]+a[1]*b[3],e=a[2]*b[0]+a[3]*b[2],f=a[2]*b[1]+a[3]*b[3],g=(c+f)/2,h=Math.sqrt((c+f)*(c+f)-4*(c*f-e*d))/2,i=g+h||1,j=g-h||1;return[Math.sqrt(i),Math.sqrt(j)]},a.normalizeRect=function(a){var b=a.slice(0);return a[0]>a[2]&&(b[0]=a[2],b[2]=a[0]),a[1]>a[3]&&(b[1]=a[3],b[3]=a[1]),b},a.intersect=function(b,c){function d(a,b){return a-b}var e=[b[0],b[2],c[0],c[2]].sort(d),f=[b[1],b[3],c[1],c[3]].sort(d),g=[];return b=a.normalizeRect(b),c=a.normalizeRect(c),e[0]===b[0]&&e[1]===c[0]||e[0]===c[0]&&e[1]===b[0]?(g[0]=e[1],g[2]=e[2],f[0]===b[1]&&f[1]===c[1]||f[0]===c[1]&&f[1]===b[1]?(g[1]=f[1],g[3]=f[2],g):!1):!1},a.sign=function(a){return 0>a?-1:1},a.appendToArray=function(a,b){Array.prototype.push.apply(a,b)},a.prependToArray=function(a,b){Array.prototype.unshift.apply(a,b)},a.extendObj=function(a,b){for(var c in b)a[c]=b[c]},a.getInheritableProperty=function(a,b){for(;a&&!a.has(b);)a=a.get("Parent");return a?a.get(b):null},a.inherit=function(a,b,c){a.prototype=Object.create(b.prototype),a.prototype.constructor=a;for(var d in c)a.prototype[d]=c[d]},a.loadScript=function(a,b){var c=document.createElement("script"),d=!1;c.setAttribute("src",a),b&&(c.onload=function(){d||b(),d=!0}),document.getElementsByTagName("head")[0].appendChild(c)},a}();PDFJS.PageViewport=function(){function a(a,b,c,d,e,f){this.viewBox=a,this.scale=b,this.rotation=c,this.offsetX=d,this.offsetY=e;var g,h,i,j,k=(a[2]+a[0])/2,l=(a[3]+a[1])/2;switch(c%=360,c=0>c?c+360:c){case 180:g=-1,h=0,i=0,j=1;break;case 90:g=0,h=1,i=1,j=0;break;case 270:g=0,h=-1,i=-1,j=0;break;default:g=1,h=0,i=0,j=-1}f&&(i=-i,j=-j);var m,n,o,p;0===g?(m=Math.abs(l-a[1])*b+d,n=Math.abs(k-a[0])*b+e,o=Math.abs(a[3]-a[1])*b,p=Math.abs(a[2]-a[0])*b):(m=Math.abs(k-a[0])*b+d,n=Math.abs(l-a[1])*b+e,o=Math.abs(a[2]-a[0])*b,p=Math.abs(a[3]-a[1])*b),this.transform=[g*b,h*b,i*b,j*b,m-g*b*k-i*b*l,n-h*b*k-j*b*l],this.width=o,this.height=p,this.fontScale=b}return a.prototype={clone:function(b){b=b||{};var c="scale"in b?b.scale:this.scale,d="rotation"in b?b.rotation:this.rotation;return new a(this.viewBox.slice(),c,d,this.offsetX,this.offsetY,b.dontFlip)},convertToViewportPoint:function(a,b){return T.applyTransform([a,b],this.transform)},convertToViewportRectangle:function(a){var b=T.applyTransform([a[0],a[1]],this.transform),c=T.applyTransform([a[2],a[3]],this.transform);return[b[0],b[1],c[0],c[1]]},convertToPdfPoint:function(a,b){return T.applyInverseTransform([a,b],this.transform)}},a}();PDFJS.createPromiseCapability=s,function(){function a(a){this._status=c,this._handlers=[];try{a.call(this,this._resolve.bind(this),this._reject.bind(this))}catch(b){this._reject(b)}}if(z.Promise)return"function"!=typeof z.Promise.all&&(z.Promise.all=function(a){var b,c,d=0,e=[],f=new z.Promise(function(a,d){b=a,c=d});return a.forEach(function(a,f){d++,a.then(function(a){e[f]=a,d--,0===d&&b(e)},c)}),0===d&&b(e),f}),"function"!=typeof z.Promise.resolve&&(z.Promise.resolve=function(a){return new z.Promise(function(b){b(a)})}),"function"!=typeof z.Promise.reject&&(z.Promise.reject=function(a){return new z.Promise(function(b,c){c(a)})}),void("function"!=typeof z.Promise.prototype["catch"]&&(z.Promise.prototype["catch"]=function(a){return z.Promise.prototype.then(void 0,a)}));var c=0,d=1,e=2,f=500,g={handlers:[],running:!1,unhandledRejections:[],pendingRejectionCheck:!1,scheduleHandlers:function(a){a._status!==c&&(this.handlers=this.handlers.concat(a._handlers),a._handlers=[],this.running||(this.running=!0,setTimeout(this.runHandlers.bind(this),0)))},runHandlers:function(){for(var a=1,b=Date.now()+a;this.handlers.length>0;){var c=this.handlers.shift(),f=c.thisPromise._status,g=c.thisPromise._value;try{f===d?"function"==typeof c.onResolve&&(g=c.onResolve(g)):"function"==typeof c.onReject&&(g=c.onReject(g),f=d,c.thisPromise._unhandledRejection&&this.removeUnhandeledRejection(c.thisPromise))}catch(h){f=e,g=h}if(c.nextPromise._updateStatus(f,g),Date.now()>=b)break}return this.handlers.length>0?void setTimeout(this.runHandlers.bind(this),0):void(this.running=!1)},addUnhandledRejection:function(a){this.unhandledRejections.push({promise:a,time:Date.now()}),this.scheduleRejectionCheck()},removeUnhandeledRejection:function(a){a._unhandledRejection=!1;for(var b=0;bf){var d=this.unhandledRejections[c].promise._value,e="Unhandled rejection: "+d;d.stack&&(e+="\n"+d.stack),b(e),this.unhandledRejections.splice(c),c--}this.unhandledRejections.length&&this.scheduleRejectionCheck()}.bind(this),f))}};a.all=function(b){function c(a){g._status!==e&&(i=[],f(a))}var d,f,g=new a(function(a,b){d=a,f=b}),h=b.length,i=[];if(0===h)return d(i),g;for(var j=0,k=b.length;k>j;++j){var l=b[j],m=function(a){return function(b){g._status!==e&&(i[a]=b,h--,0===h&&d(i))}}(j);a.isPromise(l)?l.then(m,c):m(l)}return g},a.isPromise=function(a){return a&&"function"==typeof a.then},a.resolve=function(b){return new a(function(a){a(b)})},a.reject=function(b){return new a(function(a,c){c(b)})},a.prototype={_status:null,_value:null,_handlers:null,_unhandledRejection:null,_updateStatus:function(b,c){if(this._status!==d&&this._status!==e){if(b===d&&a.isPromise(c))return void c.then(this._updateStatus.bind(this,d),this._updateStatus.bind(this,e));this._status=b,this._value=c,b===e&&0===this._handlers.length&&(this._unhandledRejection=!0,g.addUnhandledRejection(this)),g.scheduleHandlers(this)}},_resolve:function(a){this._updateStatus(d,a)},_reject:function(a){this._updateStatus(e,a)},then:function(b,c){var d=new a(function(a,b){this.resolve=a,this.reject=b});return this._handlers.push({thisPromise:this,onResolve:b,onReject:c,nextPromise:d}),g.scheduleHandlers(this),d},"catch":function(a){return this.then(void 0,a)}},z.Promise=a}();var U=function(){function a(a,b,c){for(;a.lengthb;++b){var g=d[b].name;g.length>f&&(f=g.length)}for(b=0,c=d.length;c>b;++b){var h=d[b],i=h.end-h.start;e+=a(h.name," ",f)+" "+i+"ms\n"}return e}},c}();PDFJS.createBlob=function(a,b){if("undefined"!=typeof Blob)return new Blob([a],{type:b});var c=new MozBlobBuilder;return c.append(a),c.getBlob(b)},PDFJS.createObjectURL=function(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(b,c){if(!PDFJS.disableCreateObjectURL&&"undefined"!=typeof URL&&URL.createObjectURL){var d=PDFJS.createBlob(b,c);return URL.createObjectURL(d)}for(var e="data:"+c+";base64,",f=0,g=b.length;g>f;f+=3){var h=255&b[f],i=255&b[f+1],j=255&b[f+2],k=h>>2,l=(3&h)<<4|i>>4,m=g>f+1?(15&i)<<2|j>>6:64,n=g>f+2?63&j:64;e+=a[k]+a[l]+a[m]+a[n]}return e}}(),t.prototype={on:function(a,b,c){var e=this.actionHandler;e[a]&&d('There is already an actionName called "'+a+'"'),e[a]=[b,c]},send:function(a,b,c){var d={action:a,data:b};this.postMessage(d,c)},sendWithPromise:function(a,b,c){var d=this.callbackIndex++,e={action:a,data:b,callbackId:d},f=s();this.callbacksCapabilities[d]=f;try{this.postMessage(e,c)}catch(g){f.reject(g)}return f.promise},postMessage:function(a,b){b&&this.postMessageTransfers?this.comObj.postMessage(a,b):this.comObj.postMessage(a)}},PDFJS.maxImageSize=void 0===PDFJS.maxImageSize?-1:PDFJS.maxImageSize,PDFJS.cMapUrl=void 0===PDFJS.cMapUrl?null:PDFJS.cMapUrl,PDFJS.cMapPacked=void 0===PDFJS.cMapPacked?!1:PDFJS.cMapPacked,PDFJS.disableFontFace=void 0===PDFJS.disableFontFace?!1:PDFJS.disableFontFace,PDFJS.imageResourcesPath=void 0===PDFJS.imageResourcesPath?"":PDFJS.imageResourcesPath,PDFJS.disableWorker=void 0===PDFJS.disableWorker?!1:PDFJS.disableWorker,PDFJS.workerSrc=void 0===PDFJS.workerSrc?null:PDFJS.workerSrc,PDFJS.disableRange=void 0===PDFJS.disableRange?!1:PDFJS.disableRange,PDFJS.disableStream=void 0===PDFJS.disableStream?!1:PDFJS.disableStream,PDFJS.disableAutoFetch=void 0===PDFJS.disableAutoFetch?!1:PDFJS.disableAutoFetch,PDFJS.pdfBug=void 0===PDFJS.pdfBug?!1:PDFJS.pdfBug,PDFJS.postMessageTransfers=void 0===PDFJS.postMessageTransfers?!0:PDFJS.postMessageTransfers,PDFJS.disableCreateObjectURL=void 0===PDFJS.disableCreateObjectURL?!1:PDFJS.disableCreateObjectURL,PDFJS.disableWebGL=void 0===PDFJS.disableWebGL?!0:PDFJS.disableWebGL,PDFJS.disableFullscreen=void 0===PDFJS.disableFullscreen?!1:PDFJS.disableFullscreen,PDFJS.useOnlyCssZoom=void 0===PDFJS.useOnlyCssZoom?!1:PDFJS.useOnlyCssZoom,PDFJS.verbosity=void 0===PDFJS.verbosity?PDFJS.VERBOSITY_LEVELS.warnings:PDFJS.verbosity,PDFJS.maxCanvasPixels=void 0===PDFJS.maxCanvasPixels?16777216:PDFJS.maxCanvasPixels,PDFJS.openExternalLinksInNewWindow=void 0===PDFJS.openExternalLinksInNewWindow?!1:PDFJS.openExternalLinksInNewWindow,PDFJS.externalLinkTarget=void 0===PDFJS.externalLinkTarget?PDFJS.LinkTarget.NONE:PDFJS.externalLinkTarget,PDFJS.isEvalSupported=void 0===PDFJS.isEvalSupported?!0:PDFJS.isEvalSupported,PDFJS.getDocument=function(a,b,e,f){var h=new V;arguments.length>1&&c("getDocument is called with pdfDataRangeTransport, passwordCallback or progressCallback argument"),b&&(b instanceof W||(b=Object.create(b),b.length=a.length,b.initialData=a.initialData,b.abort||(b.abort=function(){})),a=Object.create(a),a.range=b),h.onPassword=e||null,h.onProgress=f||null;var i,j,k;"string"==typeof a?k={url:a}:r(a)?k={data:a}:a instanceof W?k={range:a}:("object"!=typeof a&&d("Invalid parameter in getDocument, need either Uint8Array, string or a parameter object"),a.url||a.data||a.range||d("Invalid parameter object: need either .data, .range or .url"),k=a);var m={};for(var n in k)if("url"!==n||"undefined"==typeof window){if("range"!==n)if("data"!==n||k[n]instanceof Uint8Array)m[n]=k[n];else{var o=k[n];"string"==typeof o?m[n]=l(o):"object"!=typeof o||null===o||isNaN(o.length)?r(o)?m[n]=new Uint8Array(o):d("Invalid PDF binary data: either typed array, string or array-like object is expected in the data property."):m[n]=new Uint8Array(o)}}else m[n]=g(window.location.href,k[n]);return i=s(),j=new Z(i,k.range),i.promise.then(function(){j.fetchDocument(h,m)}),h._transport=j,h};var V=function(){function a(){this._capability=s(),this._transport=null,this.onPassword=null,this.onProgress=null}return a.prototype={get promise(){return this._capability.promise},destroy:function(){return this._transport.destroy()},then:function(a,b){return this.promise.then.apply(this.promise,arguments)}},a}(),W=function(){function a(a,b){this.length=a,this.initialData=b,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._readyCapability=s()}return a.prototype={addRangeListener:function(a){this._rangeListeners.push(a)},addProgressListener:function(a){this._progressListeners.push(a)},addProgressiveReadListener:function(a){this._progressiveReadListeners.push(a)},onDataRange:function(a,b){for(var c=this._rangeListeners,d=0,e=c.length;e>d;++d)c[d](a,b)},onDataProgress:function(a){this._readyCapability.promise.then(function(){for(var b=this._progressListeners,c=0,d=b.length;d>c;++c)b[c](a)}.bind(this))},onDataProgressiveRead:function(a){this._readyCapability.promise.then(function(){for(var b=this._progressiveReadListeners,c=0,d=b.length;d>c;++c)b[c](a)}.bind(this))},transportReady:function(){this._readyCapability.resolve()},requestDataRange:function(a,b){throw new Error("Abstract method PDFDataRangeTransport.requestDataRange")},abort:function(){}},a}();PDFJS.PDFDataRangeTransport=W;var X=function(){function a(a,b,c){this.pdfInfo=a,this.transport=b,this.loadingTask=c}return a.prototype={get numPages(){return this.pdfInfo.numPages},get fingerprint(){return this.pdfInfo.fingerprint},getPage:function(a){return this.transport.getPage(a)},getPageIndex:function(a){return this.transport.getPageIndex(a)},getDestinations:function(){return this.transport.getDestinations()},getDestination:function(a){return this.transport.getDestination(a)},getAttachments:function(){return this.transport.getAttachments()},getJavaScript:function(){return this.transport.getJavaScript()},getOutline:function(){return this.transport.getOutline()},getMetadata:function(){return this.transport.getMetadata()},getData:function(){return this.transport.getData()},getDownloadInfo:function(){return this.transport.downloadInfoCapability.promise},getStats:function(){return this.transport.getStats()},cleanup:function(){this.transport.startCleanup()},destroy:function(){return this.transport.destroy()}},a}(),Y=function(){function a(a,b,c){this.pageIndex=a,this.pageInfo=b,this.transport=c,this.stats=new U,this.stats.enabled=!!z.PDFJS.enableStats,this.commonObjs=c.commonObjs,this.objs=new $,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this.intentStates={},this.destroyed=!1}return a.prototype={get pageNumber(){return this.pageIndex+1},get rotate(){return this.pageInfo.rotate},get ref(){return this.pageInfo.ref},get view(){return this.pageInfo.view},getViewport:function(a,b){return arguments.length<2&&(b=this.rotate),new PDFJS.PageViewport(this.view,a,b,0,0)},getAnnotations:function(){return this.annotationsPromise||(this.annotationsPromise=this.transport.getAnnotations(this.pageIndex)),this.annotationsPromise},render:function(a){function b(a){var b=f.renderTasks.indexOf(g);b>=0&&f.renderTasks.splice(b,1),i.cleanupAfterRender&&(i.pendingCleanup=!0),i._tryCleanup(),a?g.capability.reject(a):g.capability.resolve(),d.timeEnd("Rendering"),d.timeEnd("Overall")}var d=this.stats;d.time("Overall"),this.pendingCleanup=!1;var e="print"===a.intent?"print":"display";this.intentStates[e]||(this.intentStates[e]={});var f=this.intentStates[e];f.displayReadyCapability||(f.receivingOperatorList=!0,f.displayReadyCapability=s(),f.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this.stats.time("Page Request"),this.transport.messageHandler.send("RenderPageRequest",{pageIndex:this.pageNumber-1,intent:e}));var g=new aa(b,a,this.objs,this.commonObjs,f.operatorList,this.pageNumber);g.useRequestAnimationFrame="print"!==e,f.renderTasks||(f.renderTasks=[]),f.renderTasks.push(g);var h=g.task;a.continueCallback&&(c("render is used with continueCallback parameter"),h.onContinue=a.continueCallback);var i=this;return f.displayReadyCapability.promise.then(function(a){return i.pendingCleanup?void b():(d.time("Rendering"),g.initalizeGraphics(a),void g.operatorListChanged())},function(a){b(a)}),h},getOperatorList:function(){function a(){c.operatorList.lastChunk&&c.opListReadCapability.resolve(c.operatorList)}var b="oplist";this.intentStates[b]||(this.intentStates[b]={});var c=this.intentStates[b];if(!c.opListReadCapability){var d={};d.operatorListChanged=a,c.receivingOperatorList=!0,c.opListReadCapability=s(),c.renderTasks=[],c.renderTasks.push(d),c.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this.transport.messageHandler.send("RenderPageRequest",{pageIndex:this.pageIndex,intent:b})}return c.opListReadCapability.promise},getTextContent:function(){return this.transport.messageHandler.sendWithPromise("GetTextContent",{pageIndex:this.pageNumber-1})},_destroy:function(){this.destroyed=!0,this.transport.pageCache[this.pageIndex]=null;var a=[];return Object.keys(this.intentStates).forEach(function(b){var c=this.intentStates[b];c.renderTasks.forEach(function(b){var c=b.capability.promise["catch"](function(){});a.push(c),b.cancel()})},this),this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1,Promise.all(a)},destroy:function(){c("page destroy method, use cleanup() instead"),this.cleanup()},cleanup:function(){this.pendingCleanup=!0,this._tryCleanup()},_tryCleanup:function(){this.pendingCleanup&&!Object.keys(this.intentStates).some(function(a){var b=this.intentStates[a];return 0!==b.renderTasks.length||b.receivingOperatorList},this)&&(Object.keys(this.intentStates).forEach(function(a){delete this.intentStates[a]},this),this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1)},_startRenderPage:function(a,b){var c=this.intentStates[b];c.displayReadyCapability&&c.displayReadyCapability.resolve(a)},_renderPageChunk:function(a,b){var c,d,e=this.intentStates[b];for(c=0,d=a.length;d>c;c++)e.operatorList.fnArray.push(a.fnArray[c]),e.operatorList.argsArray.push(a.argsArray[c]);for(e.operatorList.lastChunk=a.lastChunk,c=0;ch&&(g.cleanupAfterRender=!0);break;default:d("Got unknown object type "+f)}},this),a.on("DocProgress",function(a){var b=this.loadingTask;b.onProgress&&b.onProgress({loaded:a.loaded,total:a.total})},this),a.on("PageError",function(a){var b=this.pageCache[a.pageNum-1],c=b.intentStates[a.intent];c.displayReadyCapability?c.displayReadyCapability.reject(a.error):d(a.error)},this),a.on("JpegDecode",function(a){var b=a[0],c=a[1];return 3!==c&&1!==c?Promise.reject(new Error("Only 3 components or 1 component can be returned")):new Promise(function(a,d){var e=new Image;e.onload=function(){var b=e.width,d=e.height,f=b*d,g=4*f,h=new Uint8Array(f*c),i=v(b,d),j=i.getContext("2d");j.drawImage(e,0,0);var k,l,m=j.getImageData(0,0,b,d).data;if(3===c)for(k=0,l=0;g>k;k+=4,l+=3)h[l]=m[k],h[l+1]=m[k+1],h[l+2]=m[k+2];else if(1===c)for(k=0,l=0;g>k;k+=4,l++)h[l]=m[k];a({data:h,width:b,height:d})},e.onerror=function(){d(new Error("JpegDecode failed to load image"))},e.src=b})})},fetchDocument:function(a,b){return this.destroyed?(a._capability.reject(new Error("Loading aborted")),void this.destroyCapability.resolve()):(this.loadingTask=a,b.disableAutoFetch=PDFJS.disableAutoFetch,b.disableStream=PDFJS.disableStream,b.chunkedViewerLoading=!!this.pdfDataRangeTransport,this.pdfDataRangeTransport&&(b.length=this.pdfDataRangeTransport.length,b.initialData=this.pdfDataRangeTransport.initialData),void this.messageHandler.send("GetDocRequest",{source:b,disableRange:PDFJS.disableRange,maxImageSize:PDFJS.maxImageSize,cMapUrl:PDFJS.cMapUrl,cMapPacked:PDFJS.cMapPacked,disableFontFace:PDFJS.disableFontFace,disableCreateObjectURL:PDFJS.disableCreateObjectURL,verbosity:PDFJS.verbosity}))},getData:function(){return this.messageHandler.sendWithPromise("GetData",null)},getPage:function(a,b){if(0>=a||a>this.numPages||(0|a)!==a)return Promise.reject(new Error("Invalid page request"));var c=a-1;if(c in this.pagePromises)return this.pagePromises[c];var d=this.messageHandler.sendWithPromise("GetPage",{pageIndex:c}).then(function(a){if(this.destroyed)throw new Error("Transport destroyed");var b=new Y(c,a,this);return this.pageCache[c]=b,b}.bind(this));return this.pagePromises[c]=d,d},getPageIndex:function(a){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:a})},getAnnotations:function(a){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:a})},getDestinations:function(){return this.messageHandler.sendWithPromise("GetDestinations",null)},getDestination:function(a){return this.messageHandler.sendWithPromise("GetDestination",{id:a})},getAttachments:function(){return this.messageHandler.sendWithPromise("GetAttachments",null)},getJavaScript:function(){return this.messageHandler.sendWithPromise("GetJavaScript",null)},getOutline:function(){return this.messageHandler.sendWithPromise("GetOutline",null)},getMetadata:function(){return this.messageHandler.sendWithPromise("GetMetadata",null).then(function(a){return{info:a[0],metadata:a[1]?new PDFJS.Metadata(a[1]):null}})},getStats:function(){return this.messageHandler.sendWithPromise("GetStats",null)},startCleanup:function(){this.messageHandler.sendWithPromise("Cleanup",null).then(function(){for(var a=0,b=this.pageCache.length;b>a;a++){var c=this.pageCache[a];c&&c.cleanup()}this.commonObjs.clear(),pa.clear()}.bind(this))}},c}(),$=function(){function a(){this.objs={}}return a.prototype={ensureObj:function(a){if(this.objs[a])return this.objs[a];var b={capability:s(),data:null,resolved:!1};return this.objs[a]=b,b},get:function(a,b){if(b)return this.ensureObj(a).capability.promise.then(b),null;var c=this.objs[a];return c&&c.resolved||d("Requesting object that isn't resolved yet "+a),c.data},resolve:function(a,b){var c=this.ensureObj(a);c.resolved=!0,c.data=b,c.capability.resolve(b)},isResolved:function(a){var b=this.objs;return b[a]?b[a].resolved:!1},hasData:function(a){return this.isResolved(a)},getData:function(a){var b=this.objs;return b[a]&&b[a].resolved?b[a].data:null},clear:function(){this.objs={}}},a}(),_=function(){function a(a){this._internalRenderTask=a,this.onContinue=null}return a.prototype={get promise(){return this._internalRenderTask.capability.promise},cancel:function(){this._internalRenderTask.cancel()},then:function(a,b){return this.promise.then.apply(this.promise,arguments)}},a}(),aa=function(){function a(a,b,c,d,e,f){this.callback=a,this.params=b,this.objs=c,this.commonObjs=d,this.operatorListIdx=null,this.operatorList=e,this.pageNumber=f,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this.useRequestAnimationFrame=!1,this.cancelled=!1,this.capability=s(),this.task=new _(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this)}return a.prototype={initalizeGraphics:function(a){if(!this.cancelled){PDFJS.pdfBug&&"StepperManager"in z&&z.StepperManager.enabled&&(this.stepper=z.StepperManager.create(this.pageNumber-1),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var b=this.params;this.gfx=new ka(b.canvasContext,this.commonObjs,this.objs,b.imageLayer),this.gfx.beginDrawing(b.viewport,a),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback(); +}},cancel:function(){this.running=!1,this.cancelled=!0,this.callback("cancelled")},operatorListChanged:function(){return this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),void(this.running||this._continue())):void(this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound))},_continue:function(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue.call(this.task,this._scheduleNextBound):this._scheduleNext())},_scheduleNext:function(){this.useRequestAnimationFrame?window.requestAnimationFrame(this._nextBound):Promise.resolve(void 0).then(this._nextBound)},_next:function(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this.callback())))}},a}(),ba=(PDFJS.Metadata=function(){function a(a){return a.replace(/>\\376\\377([^<]+)/g,function(a,b){for(var c=b.replace(/\\([0-3])([0-7])([0-7])/g,function(a,b,c,d){return String.fromCharCode(64*b+8*c+1*d)}),d="",e=0;e"+d})}function b(b){if("string"==typeof b){b=a(b);var c=new DOMParser;b=c.parseFromString(b,"application/xml")}else b instanceof Document||d("Metadata: Invalid metadata object");this.metaDocument=b,this.metadata={},this.parse()}return b.prototype={parse:function(){var a=this.metaDocument,b=a.documentElement;if("rdf:rdf"!==b.nodeName.toLowerCase())for(b=b.firstChild;b&&"rdf:rdf"!==b.nodeName.toLowerCase();)b=b.nextSibling;var c=b?b.nodeName.toLowerCase():null;if(b&&"rdf:rdf"===c&&b.hasChildNodes()){var d,e,f,g,h,i,j,k=b.childNodes;for(g=0,i=k.length;i>g;g++)if(d=k[g],"rdf:description"===d.nodeName.toLowerCase())for(h=0,j=d.childNodes.length;j>h;h++)"#text"!==d.childNodes[h].nodeName.toLowerCase()&&(e=d.childNodes[h],f=e.nodeName.toLowerCase(),this.metadata[f]=e.textContent.trim())}},get:function(a){return this.metadata[a]||null},has:function(a){return"undefined"!=typeof this.metadata[a]}},b}(),16),ca=100,da=4096,ea=.65,fa=!0,ga=1e3,ha=16,ia=function(){var a={};return{getCanvas:function(b,c,d,e){var f;if(void 0!==a[b])f=a[b],f.canvas.width=c,f.canvas.height=d,f.context.setTransform(1,0,0,1,0,0);else{var g=v(c,d),h=g.getContext("2d");e&&w(h),a[b]=f={canvas:g,context:h}}return f},clear:function(){for(var b in a){var c=a[b];c.canvas.width=0,c.canvas.height=0,delete a[b]}}}}(),ja=function(){function a(a){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=S,this.textMatrixScale=1,this.fontMatrix=B,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=C.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.old=a}return a.prototype={clone:function(){return Object.create(this)},setCurrentPoint:function(a,b){this.x=a,this.y=b}},a}(),ka=function(){function c(a,b,c,d){this.ctx=a,this.current=new ja,this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=b,this.objs=c,this.imageLayer=d,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,a&&w(a),this.cachedGetSinglePixelWidth=null}function e(a,b){if("undefined"!=typeof ImageData&&b instanceof ImageData)return void a.putImageData(b,0,0);var c,e,f,g,h,i=b.height,j=b.width,k=i%ha,l=(i-k)/ha,m=0===k?l:l+1,n=a.createImageData(j,ha),o=0,p=b.data,q=n.data;if(b.kind===D.GRAYSCALE_1BPP){var r=p.byteLength,s=PDFJS.hasCanvasTypedArrays?new Uint32Array(q.buffer):new R(q),t=s.length,u=j+7>>3,v=4294967295,w=PDFJS.isLittleEndian||!PDFJS.hasCanvasTypedArrays?4278190080:255;for(e=0;m>e;e++){for(g=l>e?ha:k,c=0,f=0;g>f;f++){for(var x=r-o,y=0,z=x>u?j:8*x-7,A=-8&z,B=0,C=0;A>y;y+=8)C=p[o++],s[c++]=128&C?v:w,s[c++]=64&C?v:w,s[c++]=32&C?v:w,s[c++]=16&C?v:w,s[c++]=8&C?v:w,s[c++]=4&C?v:w,s[c++]=2&C?v:w,s[c++]=1&C?v:w;for(;z>y;y++)0===B&&(C=p[o++],B=128),s[c++]=C&B?v:w,B>>=1}for(;t>c;)s[c++]=0;a.putImageData(n,0,e*ha)}}else if(b.kind===D.RGBA_32BPP){for(f=0,h=j*ha*4,e=0;l>e;e++)q.set(p.subarray(o,o+h)),o+=h,a.putImageData(n,0,f),f+=ha;m>e&&(h=j*k*4,q.set(p.subarray(o,o+h)),a.putImageData(n,0,f))}else if(b.kind===D.RGB_24BPP)for(g=ha,h=j*g,e=0;m>e;e++){for(e>=l&&(g=k,h=j*g),c=0,f=h;f--;)q[c++]=p[o++],q[c++]=p[o++],q[c++]=p[o++],q[c++]=255;a.putImageData(n,0,e*ha)}else d("bad image kind: "+b.kind)}function g(a,b){for(var c=b.height,d=b.width,e=c%ha,f=(c-e)/ha,g=0===e?f:f+1,h=a.createImageData(d,ha),i=0,j=b.data,k=h.data,l=0;g>l;l++){for(var m=f>l?ha:e,n=3,o=0;m>o;o++)for(var p=0,q=0;d>q;q++){if(!p){var r=j[i++];p=128}k[n]=r&p?0:255,n+=4,p>>=1}a.putImageData(h,0,l*ha)}}function h(a,b){for(var c=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],d=0,e=c.length;e>d;d++){var f=c[d];void 0!==a[f]&&(b[f]=a[f])}void 0!==a.setLineDash?(b.setLineDash(a.getLineDash()),b.lineDashOffset=a.lineDashOffset):void 0!==a.mozDashOffset&&(b.mozDash=a.mozDash,b.mozDashOffset=a.mozDashOffset)}function j(a,b,c,d){for(var e=a.length,f=3;e>f;f+=4){var g=a[f];if(0===g)a[f-3]=b,a[f-2]=c,a[f-1]=d;else if(255>g){var h=255-g;a[f-3]=a[f-3]*g+b*h>>8,a[f-2]=a[f-2]*g+c*h>>8,a[f-1]=a[f-1]*g+d*h>>8}}}function k(a,b){for(var c=a.length,d=1/255,e=3;c>e;e+=4){var f=a[e];b[e]=b[e]*f*d|0}}function l(a,b){for(var c=a.length,d=3;c>d;d+=4){var e=77*a[d-3]+152*a[d-2]+28*a[d-1];b[d]=b[d]*e>>16}}function m(a,b,c,d,e,f){var g,h=!!f,i=h?f[0]:0,m=h?f[1]:0,n=h?f[2]:0;g="Luminosity"===e?l:k;for(var o=1048576,p=Math.min(d,Math.ceil(o/c)),q=0;d>q;q+=p){var r=Math.min(p,d-q),s=a.getImageData(0,q,c,r),t=b.getImageData(0,q,c,r);h&&j(s.data,i,m,n),g(s.data,t.data),a.putImageData(t,0,q)}}function n(a,b,c){var d=b.canvas,e=b.context;a.setTransform(b.scaleX,0,0,b.scaleY,b.offsetX,b.offsetY);var f=b.backdrop||null;if(la.isEnabled){var g=la.composeSMask(c.canvas,d,{subtype:b.subtype,backdrop:f});return a.setTransform(1,0,0,1,0,0),void a.drawImage(g,b.offsetX,b.offsetY)}m(e,c,d.width,d.height,b.subtype,f),a.drawImage(d,0,0)}var o=15,r=10,s=["butt","round","square"],t=["miter","round","bevel"],u={},v={};c.prototype={beginDrawing:function(a,b){var c=this.ctx.canvas.width,d=this.ctx.canvas.height;b?this.ctx.clearRect(0,0,c,d):(this.ctx.mozOpaque=!0,this.ctx.save(),this.ctx.fillStyle="rgb(255, 255, 255)",this.ctx.fillRect(0,0,c,d),this.ctx.restore());var e=a.transform;this.ctx.save(),this.ctx.transform.apply(this.ctx,e),this.baseTransform=this.ctx.mozCurrentTransform.slice(),this.imageLayer&&this.imageLayer.beginLayout()},executeOperatorList:function(a,b,c,d){var e=a.argsArray,f=a.fnArray,g=b||0,h=e.length;if(h===g)return g;for(var i,j=h-g>r&&"function"==typeof c,k=j?Date.now()+o:0,l=0,m=this.commonObjs,n=this.objs;;){if(void 0!==d&&g===d.nextBreakPoint)return d.breakIt(g,c),g;if(i=f[g],i!==G.dependency)this[i].apply(this,e[g]);else for(var p=e[g],q=0,s=p.length;s>q;q++){var t=p[q],u="g"===t[0]&&"_"===t[1],v=u?m:n;if(!v.isResolved(t))return v.get(t,c),g}if(g++,g===h)return g;if(j&&++l>r){if(Date.now()>k)return c(),g;l=0}}},endDrawing:function(){this.ctx.restore(),ia.clear(),la.clear(),this.imageLayer&&this.imageLayer.endLayout()},setLineWidth:function(a){this.current.lineWidth=a,this.ctx.lineWidth=a},setLineCap:function(a){this.ctx.lineCap=s[a]},setLineJoin:function(a){this.ctx.lineJoin=t[a]},setMiterLimit:function(a){this.ctx.miterLimit=a},setDash:function(a,b){var c=this.ctx;void 0!==c.setLineDash?(c.setLineDash(a),c.lineDashOffset=b):(c.mozDash=a,c.mozDashOffset=b)},setRenderingIntent:function(a){},setFlatness:function(a){},setGState:function(a){for(var c=0,d=a.length;d>c;c++){var e=a[c],f=e[0],g=e[1];switch(f){case"LW":this.setLineWidth(g);break;case"LC":this.setLineCap(g);break;case"LJ":this.setLineJoin(g);break;case"ML":this.setMiterLimit(g);break;case"D":this.setDash(g[0],g[1]);break;case"RI":this.setRenderingIntent(g);break;case"FL":this.setFlatness(g);break;case"Font":this.setFont(g[0],g[1]);break;case"CA":this.current.strokeAlpha=e[1];break;case"ca":this.current.fillAlpha=e[1],this.ctx.globalAlpha=e[1];break;case"BM":if(g&&g.name&&"Normal"!==g.name){var h=g.name.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()}).substring(1);this.ctx.globalCompositeOperation=h,this.ctx.globalCompositeOperation!==h&&b('globalCompositeOperation "'+h+'" is not supported')}else this.ctx.globalCompositeOperation="source-over";break;case"SMask":this.current.activeSMask&&this.endSMaskGroup(),this.current.activeSMask=g?this.tempSMask:null,this.current.activeSMask&&this.beginSMaskGroup(),this.tempSMask=null}}},beginSMaskGroup:function(){var a=this.current.activeSMask,b=a.canvas.width,c=a.canvas.height,d="smaskGroupAt"+this.groupLevel,e=ia.getCanvas(d,b,c,!0),f=this.ctx,g=f.mozCurrentTransform;this.ctx.save();var i=e.context;i.scale(1/a.scaleX,1/a.scaleY),i.translate(-a.offsetX,-a.offsetY),i.transform.apply(i,g),h(f,i),this.ctx=i,this.setGState([["BM","Normal"],["ca",1],["CA",1]]),this.groupStack.push(f),this.groupLevel++},endSMaskGroup:function(){var a=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),n(this.ctx,this.current.activeSMask,a),this.ctx.restore()},save:function(){this.ctx.save();var a=this.current;this.stateStack.push(a),this.current=a.clone(),this.current.activeSMask=null},restore:function(){0!==this.stateStack.length&&(null!==this.current.activeSMask&&this.endSMaskGroup(),this.current=this.stateStack.pop(),this.ctx.restore(),this.pendingClip=null,this.cachedGetSinglePixelWidth=null)},transform:function(a,b,c,d,e,f){this.ctx.transform(a,b,c,d,e,f),this.cachedGetSinglePixelWidth=null},constructPath:function(a,b){for(var c=this.ctx,d=this.current,e=d.x,f=d.y,g=0,h=0,i=a.length;i>g;g++)switch(0|a[g]){case G.rectangle:e=b[h++],f=b[h++];var j=b[h++],k=b[h++];0===j&&(j=this.getSinglePixelWidth()),0===k&&(k=this.getSinglePixelWidth());var l=e+j,m=f+k;this.ctx.moveTo(e,f),this.ctx.lineTo(l,f),this.ctx.lineTo(l,m),this.ctx.lineTo(e,m),this.ctx.lineTo(e,f),this.ctx.closePath();break;case G.moveTo:e=b[h++],f=b[h++],c.moveTo(e,f);break;case G.lineTo:e=b[h++],f=b[h++],c.lineTo(e,f);break;case G.curveTo:e=b[h+4],f=b[h+5],c.bezierCurveTo(b[h],b[h+1],b[h+2],b[h+3],e,f),h+=6;break;case G.curveTo2:c.bezierCurveTo(e,f,b[h],b[h+1],b[h+2],b[h+3]),e=b[h+2],f=b[h+3],h+=4;break;case G.curveTo3:e=b[h+2],f=b[h+3],c.bezierCurveTo(b[h],b[h+1],e,f,e,f),h+=4;break;case G.closePath:c.closePath()}d.setCurrentPoint(e,f)},closePath:function(){this.ctx.closePath()},stroke:function(a){a="undefined"!=typeof a?a:!0;var b=this.ctx,c=this.current.strokeColor;b.lineWidth=Math.max(this.getSinglePixelWidth()*ea,this.current.lineWidth),b.globalAlpha=this.current.strokeAlpha,c&&c.hasOwnProperty("type")&&"Pattern"===c.type?(b.save(),b.strokeStyle=c.getPattern(b,this),b.stroke(),b.restore()):b.stroke(),a&&this.consumePath(),b.globalAlpha=this.current.fillAlpha},closeStroke:function(){this.closePath(),this.stroke()},fill:function(a){a="undefined"!=typeof a?a:!0;var b=this.ctx,c=this.current.fillColor,d=this.current.patternFill,e=!1;d&&(b.save(),b.fillStyle=c.getPattern(b,this),e=!0),this.pendingEOFill?(void 0!==b.mozFillRule?(b.mozFillRule="evenodd",b.fill(),b.mozFillRule="nonzero"):b.fill("evenodd"),this.pendingEOFill=!1):b.fill(),e&&b.restore(),a&&this.consumePath()},eoFill:function(){this.pendingEOFill=!0,this.fill()},fillStroke:function(){this.fill(!1),this.stroke(!1),this.consumePath()},eoFillStroke:function(){this.pendingEOFill=!0,this.fillStroke()},closeFillStroke:function(){this.closePath(),this.fillStroke()},closeEOFillStroke:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()},endPath:function(){this.consumePath()},clip:function(){this.pendingClip=u},eoClip:function(){this.pendingClip=v},beginText:function(){this.current.textMatrix=S,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},endText:function(){var a=this.pendingTextPaths,b=this.ctx;if(void 0===a)return void b.beginPath();b.save(),b.beginPath();for(var c=0;cc?(c=-c,f.fontDirection=-1):f.fontDirection=1,this.current.font=e,this.current.fontSize=c,!e.isType3Font){var g=e.loadedName||"sans-serif",h=e.black?e.bold?"900":"bold":e.bold?"bold":"normal",i=e.italic?"italic":"normal",j='"'+g+'", '+e.fallbackName,k=ba>c?ba:c>ca?ca:c;this.current.fontSizeScale=c/k;var l=i+" "+h+" "+k+"px "+j;this.ctx.font=l}},setTextRenderingMode:function(a){this.current.textRenderingMode=a},setTextRise:function(a){this.current.textRise=a},moveText:function(a,b){this.current.x=this.current.lineX+=a,this.current.y=this.current.lineY+=b},setLeadingMoveText:function(a,b){this.setLeading(-b),this.moveText(a,b)},setTextMatrix:function(a,b,c,d,e,f){this.current.textMatrix=[a,b,c,d,e,f],this.current.textMatrixScale=Math.sqrt(a*a+b*b),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},nextLine:function(){this.moveText(0,this.current.leading)},paintChar:function(a,b,c){var d,e=this.ctx,f=this.current,g=f.font,h=f.textRenderingMode,i=f.fontSize/f.fontSizeScale,j=h&C.FILL_STROKE_MASK,k=!!(h&C.ADD_TO_PATH_FLAG);if((g.disableFontFace||k)&&(d=g.getPathGenerator(this.commonObjs,a)),g.disableFontFace?(e.save(),e.translate(b,c),e.beginPath(),d(e,i),(j===C.FILL||j===C.FILL_STROKE)&&e.fill(),(j===C.STROKE||j===C.FILL_STROKE)&&e.stroke(),e.restore()):((j===C.FILL||j===C.FILL_STROKE)&&e.fillText(a,b,c),(j===C.STROKE||j===C.FILL_STROKE)&&e.strokeText(a,b,c)),k){var l=this.pendingTextPaths||(this.pendingTextPaths=[]);l.push({transform:e.mozCurrentTransform,x:b,y:c,fontSize:i,addToPath:d})}},get isFontSubpixelAAEnabled(){var a=document.createElement("canvas").getContext("2d");a.scale(1.5,1),a.fillText("I",0,10);for(var b=a.getImageData(0,0,10,10).data,c=!1,d=3;d0&&b[d]<255){c=!0;break}return i(this,"isFontSubpixelAAEnabled",c)},showText:function(a){var b=this.current,c=b.font;if(c.isType3Font)return this.showType3Text(a);var d=b.fontSize;if(0!==d){var e=this.ctx,f=b.fontSizeScale,g=b.charSpacing,h=b.wordSpacing,i=b.fontDirection,j=b.textHScale*i,k=a.length,l=c.vertical,m=l?1:-1,n=c.defaultVMetrics,o=d*b.fontMatrix[0],q=b.textRenderingMode===C.FILL&&!c.disableFontFace;e.save(),e.transform.apply(e,b.textMatrix),e.translate(b.x,b.y+b.textRise),i>0?e.scale(j,-1):e.scale(j,1);var r=b.lineWidth,s=b.textMatrixScale;if(0===s||0===r){var t=b.textRenderingMode&C.FILL_STROKE_MASK;(t===C.STROKE||t===C.FILL_STROKE)&&(this.cachedGetSinglePixelWidth=null,r=this.getSinglePixelWidth()*ea)}else r/=s;1!==f&&(e.scale(f,f),r/=f),e.lineWidth=r;var u,v=0;for(u=0;k>u;++u){var w=a[u];if(null!==w)if(p(w))v+=m*w*d/1e3;else{var x,y,z,A,B=!1,D=w.fontChar,E=w.accent,F=w.width;if(l){var G,H,I;G=w.vmetric||n,H=w.vmetric?G[1]:.5*F,H=-H*o,I=G[2]*o,F=G?-G[0]:F,x=H/f,y=(v+I)/f}else x=v/f,y=0;if(c.remeasure&&F>0&&this.isFontSubpixelAAEnabled){var J=1e3*e.measureText(D).width/d*f,K=F/J;B=!0,e.save(),e.scale(K,1),x/=K}q&&!E?e.fillText(D,x,y):(this.paintChar(D,x,y),E&&(z=x+E.offset.x/f,A=y-E.offset.y/f,this.paintChar(E.fontChar,z,A)));var L=F*o+g*i;v+=L,B&&e.restore()}else v+=i*h}l?b.y-=v*j:b.x+=v*j,e.restore()}},showType3Text:function(a){var c,d,e,f,g=this.ctx,h=this.current,i=h.font,j=h.fontSize,k=h.fontDirection,l=i.vertical?1:-1,m=h.charSpacing,n=h.wordSpacing,o=h.textHScale*k,q=h.fontMatrix||B,r=a.length,s=h.textRenderingMode===C.INVISIBLE;if(!s&&0!==j){for(this.cachedGetSinglePixelWidth=null,g.save(),g.transform.apply(g,h.textMatrix),g.translate(h.x,h.y),g.scale(o,k),c=0;r>c;++c)if(d=a[c],null!==d)if(p(d))f=l*d*j/1e3,this.ctx.translate(f,0),h.x+=f*o;else{var t=i.charProcOperatorList[d.operatorListId];if(t){this.processingType3=d,this.save(),g.scale(j,j),g.transform.apply(g,q),this.executeOperatorList(t),this.restore();var u=T.applyTransform([d.width,0],q);e=u[0]*j+m,g.translate(e,0),h.x+=e*o}else b('Type3 character "'+d.operatorListId+'" is not available')}else this.ctx.translate(n,0),h.x+=n*o;g.restore(),this.processingType3=null}},setCharWidth:function(a,b){},setCharWidthAndBounds:function(a,b,c,d,e,f){this.ctx.rect(c,d,e-c,f-d),this.clip(),this.endPath()},getColorN_Pattern:function(a){var b;if("TilingPattern"===a[0]){var c=a[1],d=this.baseTransform||this.ctx.mozCurrentTransform.slice();b=new oa(a,c,this.ctx,this.objs,this.commonObjs,d)}else b=y(a);return b},setStrokeColorN:function(){this.current.strokeColor=this.getColorN_Pattern(arguments)},setFillColorN:function(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0},setStrokeRGBColor:function(a,b,c){var d=T.makeCssRgb(a,b,c);this.ctx.strokeStyle=d,this.current.strokeColor=d},setFillRGBColor:function(a,b,c){var d=T.makeCssRgb(a,b,c);this.ctx.fillStyle=d,this.current.fillColor=d,this.current.patternFill=!1},shadingFill:function(a){var b=this.ctx;this.save();var c=y(a);b.fillStyle=c.getPattern(b,this,!0);var d=b.mozCurrentTransformInverse;if(d){var e=b.canvas,f=e.width,g=e.height,h=T.applyTransform([0,0],d),i=T.applyTransform([0,g],d),j=T.applyTransform([f,0],d),k=T.applyTransform([f,g],d),l=Math.min(h[0],i[0],j[0],k[0]),m=Math.min(h[1],i[1],j[1],k[1]),n=Math.max(h[0],i[0],j[0],k[0]),o=Math.max(h[1],i[1],j[1],k[1]);this.ctx.fillRect(l,m,n-l,o-m)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.restore()},beginInlineImage:function(){d("Should not call beginInlineImage")},beginImageData:function(){d("Should not call beginImageData")},paintFormXObjectBegin:function(a,b){if(this.save(),this.baseTransformStack.push(this.baseTransform),q(a)&&6===a.length&&this.transform.apply(this,a),this.baseTransform=this.ctx.mozCurrentTransform,q(b)&&4===b.length){var c=b[2]-b[0],d=b[3]-b[1];this.ctx.rect(b[0],b[1],c,d),this.clip(),this.endPath()}},paintFormXObjectEnd:function(){this.restore(),this.baseTransform=this.baseTransformStack.pop()},beginGroup:function(c){this.save();var d=this.ctx;c.isolated||a("TODO: Support non-isolated groups."),c.knockout&&b("Knockout groups not supported.");var e=d.mozCurrentTransform;c.matrix&&d.transform.apply(d,c.matrix),f(c.bbox,"Bounding box is required.");var g=T.getAxialAlignedBoundingBox(c.bbox,d.mozCurrentTransform),i=[0,0,d.canvas.width,d.canvas.height];g=T.intersect(g,i)||[0,0,0,0];var j=Math.floor(g[0]),k=Math.floor(g[1]),l=Math.max(Math.ceil(g[2])-j,1),m=Math.max(Math.ceil(g[3])-k,1),n=1,o=1;l>da&&(n=l/da,l=da),m>da&&(o=m/da,m=da);var p="groupAt"+this.groupLevel;c.smask&&(p+="_smask_"+this.smaskCounter++%2);var q=ia.getCanvas(p,l,m,!0),r=q.context;r.scale(1/n,1/o),r.translate(-j,-k),r.transform.apply(r,e),c.smask?this.smaskStack.push({canvas:q.canvas,context:r,offsetX:j,offsetY:k,scaleX:n,scaleY:o,subtype:c.smask.subtype,backdrop:c.smask.backdrop}):(d.setTransform(1,0,0,1,0,0),d.translate(j,k),d.scale(n,o)),h(d,r),this.ctx=r,this.setGState([["BM","Normal"],["ca",1],["CA",1]]),this.groupStack.push(d),this.groupLevel++},endGroup:function(a){this.groupLevel--;var b=this.ctx;this.ctx=this.groupStack.pop(),void 0!==this.ctx.imageSmoothingEnabled?this.ctx.imageSmoothingEnabled=!1:this.ctx.mozImageSmoothingEnabled=!1,a.smask?this.tempSMask=this.smaskStack.pop():this.ctx.drawImage(b.canvas,0,0),this.restore()},beginAnnotations:function(){this.save(),this.current=new ja},endAnnotations:function(){this.restore()},beginAnnotation:function(a,b,c){if(this.save(),q(a)&&4===a.length){var d=a[2]-a[0],e=a[3]-a[1];this.ctx.rect(a[0],a[1],d,e),this.clip(),this.endPath()}this.transform.apply(this,b),this.transform.apply(this,c)},endAnnotation:function(){this.restore()},paintJpegXObject:function(a,c,d){var e=this.objs.get(a);if(!e)return void b("Dependent image isn't ready yet");this.save();var f=this.ctx;if(f.scale(1/c,-1/d),f.drawImage(e,0,0,e.width,e.height,0,-d,c,d),this.imageLayer){var g=f.mozCurrentTransformInverse,h=this.getCanvasPosition(0,0);this.imageLayer.appendImage({objId:a,left:h[0],top:h[1],width:c/g[0],height:d/g[3]})}this.restore()},paintImageMaskXObject:function(a){var b=this.ctx,c=a.width,d=a.height,e=this.current.fillColor,f=this.current.patternFill,h=this.processingType3;if(fa&&h&&void 0===h.compiled&&(ga>=c&&ga>=d?h.compiled=x({data:a.data,width:c,height:d}):h.compiled=null),h&&h.compiled)return void h.compiled(b);var i=ia.getCanvas("maskCanvas",c,d),j=i.context;j.save(),g(j,a),j.globalCompositeOperation="source-in",j.fillStyle=f?e.getPattern(j,this):e,j.fillRect(0,0,c,d),j.restore(),this.paintInlineImageXObject(i.canvas)},paintImageMaskXObjectRepeat:function(a,b,c,d){var e=a.width,f=a.height,h=this.current.fillColor,i=this.current.patternFill,j=ia.getCanvas("maskCanvas",e,f),k=j.context;k.save(),g(k,a),k.globalCompositeOperation="source-in",k.fillStyle=i?h.getPattern(k,this):h,k.fillRect(0,0,e,f),k.restore();for(var l=this.ctx,m=0,n=d.length;n>m;m+=2)l.save(),l.transform(b,0,0,c,d[m],d[m+1]),l.scale(1,-1),l.drawImage(j.canvas,0,0,e,f,0,-1,1,1),l.restore()},paintImageMaskXObjectGroup:function(a){for(var b=this.ctx,c=this.current.fillColor,d=this.current.patternFill,e=0,f=a.length;f>e;e++){var h=a[e],i=h.width,j=h.height,k=ia.getCanvas("maskCanvas",i,j),l=k.context;l.save(),g(l,h),l.globalCompositeOperation="source-in",l.fillStyle=d?c.getPattern(l,this):c,l.fillRect(0,0,i,j),l.restore(),b.save(),b.transform.apply(b,h.transform),b.scale(1,-1),b.drawImage(k.canvas,0,0,i,j,0,-1,1,1),b.restore()}},paintImageXObject:function(a){var c=this.objs.get(a);return c?void this.paintInlineImageXObject(c):void b("Dependent image isn't ready yet")},paintImageXObjectRepeat:function(a,c,d,e){var f=this.objs.get(a);if(!f)return void b("Dependent image isn't ready yet");for(var g=f.width,h=f.height,i=[],j=0,k=e.length;k>j;j+=2)i.push({transform:[c,0,0,d,e[j],e[j+1]],x:0,y:0,w:g,h:h});this.paintInlineImageXObjectGroup(f,i)},paintInlineImageXObject:function(a){var b=a.width,c=a.height,d=this.ctx;this.save(),d.scale(1/b,-1/c);var f,g,h=d.mozCurrentTransformInverse,i=h[0],j=h[1],k=Math.max(Math.sqrt(i*i+j*j),1),l=h[2],m=h[3],n=Math.max(Math.sqrt(l*l+m*m),1);if(a instanceof HTMLElement||!a.data)f=a;else{g=ia.getCanvas("inlineImage",b,c);var o=g.context;e(o,a),f=g.canvas}for(var p=b,q=c,r="prescale1";k>2&&p>1||n>2&&q>1;){var s=p,t=q;k>2&&p>1&&(s=Math.ceil(p/2),k/=p/s),n>2&&q>1&&(t=Math.ceil(q/2),n/=q/t),g=ia.getCanvas(r,s,t),o=g.context,o.clearRect(0,0,s,t),o.drawImage(f,0,0,p,q,0,0,s,t),f=g.canvas,p=s,q=t,r="prescale1"===r?"prescale2":"prescale1"}if(d.drawImage(f,0,0,p,q,0,-c,b,c),this.imageLayer){var u=this.getCanvasPosition(0,-c);this.imageLayer.appendImage({imgData:a,left:u[0],top:u[1],width:b/h[0],height:c/h[3]})}this.restore()},paintInlineImageXObjectGroup:function(a,b){var c=this.ctx,d=a.width,f=a.height,g=ia.getCanvas("inlineImage",d,f),h=g.context;e(h,a);for(var i=0,j=b.length;j>i;i++){var k=b[i];if(c.save(),c.transform.apply(c,k.transform),c.scale(1,-1),c.drawImage(g.canvas,k.x,k.y,k.w,k.h,0,-1,1,1),this.imageLayer){var l=this.getCanvasPosition(k.x,k.y);this.imageLayer.appendImage({imgData:a,left:l[0],top:l[1],width:d,height:f})}c.restore()}},paintSolidColorImageMask:function(){this.ctx.fillRect(0,0,1,1)},paintXObject:function(){I.notify(H.unknown),b("Unsupported 'paintXObject' command.")},markPoint:function(a){},markPointProps:function(a,b){},beginMarkedContent:function(a){},beginMarkedContentProps:function(a,b){},endMarkedContent:function(){},beginCompat:function(){},endCompat:function(){},consumePath:function(){var a=this.ctx;this.pendingClip&&(this.pendingClip===v?void 0!==a.mozFillRule?(a.mozFillRule="evenodd",a.clip(),a.mozFillRule="nonzero"):a.clip("evenodd"):a.clip(),this.pendingClip=null),a.beginPath()},getSinglePixelWidth:function(a){if(null===this.cachedGetSinglePixelWidth){var b=this.ctx.mozCurrentTransformInverse;this.cachedGetSinglePixelWidth=Math.sqrt(Math.max(b[0]*b[0]+b[1]*b[1],b[2]*b[2]+b[3]*b[3]))}return this.cachedGetSinglePixelWidth},getCanvasPosition:function(a,b){var c=this.ctx.mozCurrentTransform;return[c[0]*a+c[2]*b+c[4],c[1]*a+c[3]*b+c[5]]}};for(var z in G)c.prototype[G[z]]=c.prototype[z];return c}(),la=function(){function a(a,b,c){var d=a.createShader(c);a.shaderSource(d,b),a.compileShader(d);var e=a.getShaderParameter(d,a.COMPILE_STATUS);if(!e){var f=a.getShaderInfoLog(d);throw new Error("Error during shader compilation: "+f)}return d}function b(b,c){return a(b,c,b.VERTEX_SHADER)}function c(b,c){return a(b,c,b.FRAGMENT_SHADER)}function d(a,b){for(var c=a.createProgram(),d=0,e=b.length;e>d;++d)a.attachShader(c,b[d]);a.linkProgram(c);var f=a.getProgramParameter(c,a.LINK_STATUS);if(!f){var g=a.getProgramInfoLog(c);throw new Error("Error during program linking: "+g)}return c}function e(a,b,c){a.activeTexture(c);var d=a.createTexture();return a.bindTexture(a.TEXTURE_2D,d),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.NEAREST),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.NEAREST),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,b),d}function f(){m||(n=document.createElement("canvas"),m=n.getContext("webgl",{premultipliedalpha:!1}))}function g(){var a,e;f(),a=n,n=null,e=m,m=null;var g=b(e,o),h=c(e,p),i=d(e,[g,h]);e.useProgram(i);var j={};j.gl=e,j.canvas=a,j.resolutionLocation=e.getUniformLocation(i,"u_resolution"),j.positionLocation=e.getAttribLocation(i,"a_position"),j.backdropLocation=e.getUniformLocation(i,"u_backdrop"),j.subtypeLocation=e.getUniformLocation(i,"u_subtype");var k=e.getAttribLocation(i,"a_texCoord"),l=e.getUniformLocation(i,"u_image"),r=e.getUniformLocation(i,"u_mask"),s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),e.STATIC_DRAW),e.enableVertexAttribArray(k),e.vertexAttribPointer(k,2,e.FLOAT,!1,0,0),e.uniform1i(l,0),e.uniform1i(r,1),q=j}function h(a,b,c){var d=a.width,f=a.height;q||g();var h=q,i=h.canvas,j=h.gl;i.width=d,i.height=f,j.viewport(0,0,j.drawingBufferWidth,j.drawingBufferHeight),j.uniform2f(h.resolutionLocation,d,f),c.backdrop?j.uniform4f(h.resolutionLocation,c.backdrop[0],c.backdrop[1],c.backdrop[2],1):j.uniform4f(h.resolutionLocation,0,0,0,0),j.uniform1i(h.subtypeLocation,"Luminosity"===c.subtype?1:0);var k=e(j,a,j.TEXTURE0),l=e(j,b,j.TEXTURE1),m=j.createBuffer();return j.bindBuffer(j.ARRAY_BUFFER,m),j.bufferData(j.ARRAY_BUFFER,new Float32Array([0,0,d,0,0,f,0,f,d,0,d,f]),j.STATIC_DRAW),j.enableVertexAttribArray(h.positionLocation),j.vertexAttribPointer(h.positionLocation,2,j.FLOAT,!1,0,0),j.clearColor(0,0,0,0),j.enable(j.BLEND),j.blendFunc(j.ONE,j.ONE_MINUS_SRC_ALPHA),j.clear(j.COLOR_BUFFER_BIT),j.drawArrays(j.TRIANGLES,0,6),j.flush(),j.deleteTexture(k),j.deleteTexture(l),j.deleteBuffer(m),i}function j(){var a,e;f(),a=n,n=null,e=m,m=null;var g=b(e,r),h=c(e,s),i=d(e,[g,h]);e.useProgram(i);var j={};j.gl=e,j.canvas=a,j.resolutionLocation=e.getUniformLocation(i,"u_resolution"),j.scaleLocation=e.getUniformLocation(i,"u_scale"),j.offsetLocation=e.getUniformLocation(i,"u_offset"),j.positionLocation=e.getAttribLocation(i,"a_position"),j.colorLocation=e.getAttribLocation(i,"a_color"),t=j}function k(a,b,c,d,e){t||j();var f=t,g=f.canvas,h=f.gl;g.width=a,g.height=b,h.viewport(0,0,h.drawingBufferWidth,h.drawingBufferHeight),h.uniform2f(f.resolutionLocation,a,b);var i,k,l,m=0;for(i=0,k=d.length;k>i;i++)switch(d[i].type){case"lattice":l=d[i].coords.length/d[i].verticesPerRow|0,m+=(l-1)*(d[i].verticesPerRow-1)*6;break;case"triangles":m+=d[i].coords.length}var n=new Float32Array(2*m),o=new Uint8Array(3*m),p=e.coords,q=e.colors,r=0,s=0;for(i=0,k=d.length;k>i;i++){var u=d[i],v=u.coords,w=u.colors;switch(u.type){case"lattice":var x=u.verticesPerRow;l=v.length/x|0;for(var y=1;l>y;y++)for(var z=y*x+1,A=1;x>A;A++,z++)n[r]=p[v[z-x-1]],n[r+1]=p[v[z-x-1]+1],n[r+2]=p[v[z-x]],n[r+3]=p[v[z-x]+1],n[r+4]=p[v[z-1]],n[r+5]=p[v[z-1]+1],o[s]=q[w[z-x-1]],o[s+1]=q[w[z-x-1]+1],o[s+2]=q[w[z-x-1]+2],o[s+3]=q[w[z-x]],o[s+4]=q[w[z-x]+1],o[s+5]=q[w[z-x]+2],o[s+6]=q[w[z-1]],o[s+7]=q[w[z-1]+1],o[s+8]=q[w[z-1]+2],n[r+6]=n[r+2],n[r+7]=n[r+3],n[r+8]=n[r+4],n[r+9]=n[r+5],n[r+10]=p[v[z]],n[r+11]=p[v[z]+1],o[s+9]=o[s+3],o[s+10]=o[s+4],o[s+11]=o[s+5],o[s+12]=o[s+6],o[s+13]=o[s+7],o[s+14]=o[s+8],o[s+15]=q[w[z]],o[s+16]=q[w[z]+1],o[s+17]=q[w[z]+2],r+=12,s+=18;break;case"triangles":for(var B=0,C=v.length;C>B;B++)n[r]=p[v[B]],n[r+1]=p[v[B]+1],o[s]=q[w[B]],o[s+1]=q[w[B]+1],o[s+2]=q[w[B]+2],r+=2,s+=3}}c?h.clearColor(c[0]/255,c[1]/255,c[2]/255,1):h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT);var D=h.createBuffer();h.bindBuffer(h.ARRAY_BUFFER,D),h.bufferData(h.ARRAY_BUFFER,n,h.STATIC_DRAW),h.enableVertexAttribArray(f.positionLocation),h.vertexAttribPointer(f.positionLocation,2,h.FLOAT,!1,0,0);var E=h.createBuffer();return h.bindBuffer(h.ARRAY_BUFFER,E),h.bufferData(h.ARRAY_BUFFER,o,h.STATIC_DRAW),h.enableVertexAttribArray(f.colorLocation),h.vertexAttribPointer(f.colorLocation,3,h.UNSIGNED_BYTE,!1,0,0),h.uniform2f(f.scaleLocation,e.scaleX,e.scaleY),h.uniform2f(f.offsetLocation,e.offsetX,e.offsetY),h.drawArrays(h.TRIANGLES,0,m),h.flush(),h.deleteBuffer(D),h.deleteBuffer(E),g}function l(){q&&q.canvas&&(q.canvas.width=0,q.canvas.height=0),t&&t.canvas&&(t.canvas.width=0,t.canvas.height=0),q=null,t=null}var m,n,o=" attribute vec2 a_position; attribute vec2 a_texCoord; uniform vec2 u_resolution; varying vec2 v_texCoord; void main() { vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_texCoord = a_texCoord; } ",p=" precision mediump float; uniform vec4 u_backdrop; uniform int u_subtype; uniform sampler2D u_image; uniform sampler2D u_mask; varying vec2 v_texCoord; void main() { vec4 imageColor = texture2D(u_image, v_texCoord); vec4 maskColor = texture2D(u_mask, v_texCoord); if (u_backdrop.a > 0.0) { maskColor.rgb = maskColor.rgb * maskColor.a + u_backdrop.rgb * (1.0 - maskColor.a); } float lum; if (u_subtype == 0) { lum = maskColor.a; } else { lum = maskColor.r * 0.3 + maskColor.g * 0.59 + maskColor.b * 0.11; } imageColor.a *= lum; imageColor.rgb *= imageColor.a; gl_FragColor = imageColor; } ",q=null,r=" attribute vec2 a_position; attribute vec3 a_color; uniform vec2 u_resolution; uniform vec2 u_scale; uniform vec2 u_offset; varying vec4 v_color; void main() { vec2 position = (a_position + u_offset) * u_scale; vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_color = vec4(a_color / 255.0, 1.0); } ",s=" precision mediump float; varying vec4 v_color; void main() { gl_FragColor = v_color; } ",t=null; +return{get isEnabled(){if(PDFJS.disableWebGL)return!1;var a=!1;try{f(),a=!!m}catch(b){}return i(this,"isEnabled",a)},composeSMask:h,drawFigures:k,clear:l}}(),ma={};ma.RadialAxial={fromIR:function(a){var b=a[1],c=a[2],d=a[3],e=a[4],f=a[5],g=a[6];return{type:"Pattern",getPattern:function(a){var h;"axial"===b?h=a.createLinearGradient(d[0],d[1],e[0],e[1]):"radial"===b&&(h=a.createRadialGradient(d[0],d[1],f,e[0],e[1],g));for(var i=0,j=c.length;j>i;++i){var k=c[i];h.addColorStop(k[0],k[1])}return h}}}};var na=function(){function a(a,b,c,d,e,f,g,h){var i,j=b.coords,k=b.colors,l=a.data,m=4*a.width;j[c+1]>j[d+1]&&(i=c,c=d,d=i,i=f,f=g,g=i),j[d+1]>j[e+1]&&(i=d,d=e,e=i,i=g,g=h,h=i),j[c+1]>j[d+1]&&(i=c,c=d,d=i,i=f,f=g,g=i);var n=(j[c]+b.offsetX)*b.scaleX,o=(j[c+1]+b.offsetY)*b.scaleY,p=(j[d]+b.offsetX)*b.scaleX,q=(j[d+1]+b.offsetY)*b.scaleY,r=(j[e]+b.offsetX)*b.scaleX,s=(j[e+1]+b.offsetY)*b.scaleY;if(!(o>=s))for(var t,u,v,w,x,y,z,A,B,C=k[f],D=k[f+1],E=k[f+2],F=k[g],G=k[g+1],H=k[g+2],I=k[h],J=k[h+1],K=k[h+2],L=Math.round(o),M=Math.round(s),N=L;M>=N;N++){q>N?(B=o>N?0:o===q?1:(o-N)/(o-q),t=n-(n-p)*B,u=C-(C-F)*B,v=D-(D-G)*B,w=E-(E-H)*B):(B=N>s?1:q===s?0:(q-N)/(q-s),t=p-(p-r)*B,u=F-(F-I)*B,v=G-(G-J)*B,w=H-(H-K)*B),B=o>N?0:N>s?1:(o-N)/(o-s),x=n-(n-r)*B,y=C-(C-I)*B,z=D-(D-J)*B,A=E-(E-K)*B;for(var O=Math.round(Math.min(t,x)),P=Math.round(Math.max(t,x)),Q=m*N+4*O,R=O;P>=R;R++)B=(t-R)/(t-x),B=0>B?0:B>1?1:B,l[Q++]=u-(u-y)*B|0,l[Q++]=v-(v-z)*B|0,l[Q++]=w-(w-A)*B|0,l[Q++]=255}}function b(b,c,e){var f,g,h=c.coords,i=c.colors;switch(c.type){case"lattice":var j=c.verticesPerRow,k=Math.floor(h.length/j)-1,l=j-1;for(f=0;k>f;f++)for(var m=f*j,n=0;l>n;n++,m++)a(b,e,h[m],h[m+1],h[m+j],i[m],i[m+1],i[m+j]),a(b,e,h[m+j+1],h[m+1],h[m+j],i[m+j+1],i[m+1],i[m+j]);break;case"triangles":for(f=0,g=h.length;g>f;f+=3)a(b,e,h[f],h[f+1],h[f+2],i[f],i[f+1],i[f+2]);break;default:d("illigal figure")}}function c(a,c,d,e,f,g){var h,i,j,k,l=1.1,m=3e3,n=Math.floor(a[0]),o=Math.floor(a[1]),p=Math.ceil(a[2])-n,q=Math.ceil(a[3])-o,r=Math.min(Math.ceil(Math.abs(p*c[0]*l)),m),s=Math.min(Math.ceil(Math.abs(q*c[1]*l)),m),t=p/r,u=q/s,v={coords:d,colors:e,offsetX:-n,offsetY:-o,scaleX:1/t,scaleY:1/u};if(la.isEnabled)h=la.drawFigures(r,s,g,f,v),i=ia.getCanvas("mesh",r,s,!1),i.context.drawImage(h,0,0),h=i.canvas;else{i=ia.getCanvas("mesh",r,s,!1);var w=i.context,x=w.createImageData(r,s);if(g){var y=x.data;for(j=0,k=y.length;k>j;j+=4)y[j]=g[0],y[j+1]=g[1],y[j+2]=g[2],y[j+3]=255}for(j=0;j=14?!0:"node"===a?!0:!1}(),nativeFontFaces:[],isFontLoadingAPISupported:!A&&"undefined"!=typeof document&&!!document.fonts,addNativeFontFace:function(a){this.nativeFontFaces.push(a),document.fonts.add(a)},bind:function(a,c){f(!A,"bind() shall be called from main thread");for(var d=[],e=[],g=[],h=function(a){return a.loaded["catch"](function(c){b('Failed to load font "'+a.family+'": '+c)})},i=0,j=a.length;j>i;i++){var k=a[i];if(!k.attached&&k.loading!==!1)if(k.attached=!0,this.isFontLoadingAPISupported){var l=k.createNativeFontFace();l&&g.push(h(l))}else{var m=k.bindDOM();m&&(d.push(m),e.push(k))}}var n=pa.queueLoadingCallback(c);this.isFontLoadingAPISupported?Promise.all(g).then(function(){n.complete()}):d.length>0&&!this.isSyncFontLoadingSupported?pa.prepareFontLoadEvent(d,e,n):n.complete()},queueLoadingCallback:function(a){function b(){for(f(!e.end,"completeRequest() cannot be called twice"),e.end=Date.now();c.requests.length>0&&c.requests[0].end;){var a=c.requests.shift();setTimeout(a.callback,0)}}var c=pa.loadingContext,d="pdfjs-font-loading-"+c.nextRequestId++,e={id:d,complete:b,callback:a,started:Date.now()};return c.requests.push(e),e},prepareFontLoadEvent:function(a,c,d){function e(a,b){return a.charCodeAt(b)<<24|a.charCodeAt(b+1)<<16|a.charCodeAt(b+2)<<8|255&a.charCodeAt(b+3)}function f(a,b,c,d){var e=a.substr(0,b),f=a.substr(b+c);return e+d+f}function g(a,c){if(l++,l>30)return b("Load test font never loaded."),void c();k.font="30px "+a,k.fillText(".",0,20);var d=k.getImageData(0,0,1,1);return d.data[3]>0?void c():void setTimeout(g.bind(null,a,c))}var h,i,j=document.createElement("canvas");j.width=1,j.height=1;var k=j.getContext("2d"),l=0,n="lt"+Date.now()+this.loadTestFontId++,o=this.loadTestFont,p=976;o=f(o,p,n.length,n);var q=16,r=1482184792,s=e(o,q);for(h=0,i=n.length-3;i>h;h+=4)s=s-r+e(n,h)|0;hh;h++)v.push(c[h].loadedName);v.push(n);var w=document.createElement("div");for(w.setAttribute("style","visibility: hidden;width: 10px; height: 10px;position: absolute; top: 0px; left: 0px;"),h=0,i=v.length;i>h;++h){var x=document.createElement("span");x.textContent="Hi",x.style.fontFamily=v[h],w.appendChild(x)}document.body.appendChild(w),g(n,function(){document.body.removeChild(w),d.complete()})}},qa=function(){function a(a,b,c){if(this.compiledGlyphs={},1!==arguments.length);else{var d=arguments[0];for(var e in d)this[e]=d[e]}}return a.prototype={createNativeFontFace:function(){if(!this.data)return null;if(PDFJS.disableFontFace)return this.disableFontFace=!0,null;var a=new FontFace(this.loadedName,this.data,{});return pa.addNativeFontFace(a),PDFJS.pdfBug&&"FontInspector"in z&&z.FontInspector.enabled&&z.FontInspector.fontAdded(this),a},bindDOM:function(){if(!this.data)return null;if(PDFJS.disableFontFace)return this.disableFontFace=!0,null;var a=k(new Uint8Array(this.data)),b=this.loadedName,c="url(data:"+this.mimetype+";base64,"+window.btoa(a)+");",d='@font-face { font-family:"'+b+'";src:'+c+"}";return pa.insertRule(d),PDFJS.pdfBug&&"FontInspector"in z&&z.FontInspector.enabled&&z.FontInspector.fontAdded(this,c),d},getPathGenerator:function(a,b){if(!(b in this.compiledGlyphs)){var c,d,e,f=a.get(this.loadedName+"_path_"+b);if(pa.isEvalSupported){var g,h="";for(d=0,e=f.length;e>d;d++)c=f[d],g=void 0!==c.args?c.args.join(","):"",h+="c."+c.cmd+"("+g+");\n";this.compiledGlyphs[b]=new Function("c","size",h)}else this.compiledGlyphs[b]=function(a,b){for(d=0,e=f.length;e>d;d++)c=f[d],"scale"===c.cmd&&(c.args=[b,-b]),a[c.cmd].apply(a,c.args)}}return this.compiledGlyphs[b]}},a}(),ra=10,sa=function(){function a(a,b,c){var d=a.style;if(d.fontSize=b.fontSize+"px",d.direction=b.fontDirection<0?"rtl":"ltr",c){d.fontWeight=c.black?c.bold?"bolder":"bold":c.bold?"bold":"normal",d.fontStyle=c.italic?"italic":"normal";var e=c.loadedName,f=e?'"'+e+'", ':"",g=c.fallbackName||"Helvetica, sans-serif";d.fontFamily=f+g}}function c(a){var c=document.createElement("section"),d=c.style,e=a.rect[2]-a.rect[0],f=a.rect[3]-a.rect[1];if(a.borderStyle.width>0){c.style.borderWidth=a.borderStyle.width+"px",a.borderStyle.style!==F.UNDERLINE&&(e-=2*a.borderStyle.width,f-=2*a.borderStyle.width);var g=a.borderStyle.horizontalCornerRadius,h=a.borderStyle.verticalCornerRadius;if(g>0||h>0){var i=g+"px / "+h+"px";CustomStyle.setProp("borderRadius",c,i)}switch(a.borderStyle.style){case F.SOLID:c.style.borderStyle="solid";break;case F.DASHED:c.style.borderStyle="dashed";break;case F.BEVELED:b("Unimplemented border style: beveled");break;case F.INSET:b("Unimplemented border style: inset");break;case F.UNDERLINE:c.style.borderBottomStyle="solid"}a.color?c.style.borderColor=T.makeCssRgb(0|a.color[0],0|a.color[1],0|a.color[2]):c.style.borderWidth=0}return d.width=e+"px",d.height=f+"px",c}function d(b,c){var d=document.createElement("div"),e=b.rect[2]-b.rect[0],f=b.rect[3]-b.rect[1];d.style.width=e+"px",d.style.height=f+"px",d.style.display="table";var g=document.createElement("div");g.textContent=b.fieldValue;var h=b.textAlignment;g.style.textAlign=["left","center","right"][h],g.style.verticalAlign="middle",g.style.display="table-cell";var i=b.fontRefName?c.getData(b.fontRefName):null;return a(g,b,i),d.appendChild(g),d}function e(a){var b=a.rect;b[3]-b[1]i;++i){var t=s[i];r.appendChild(document.createTextNode(t)),j-1>i&&r.appendChild(document.createElement("br"))}q.appendChild(r);var u=!1,v=function(a){a&&(u=!0),h.hasAttribute("hidden")&&(d.style.zIndex+=1,h.removeAttribute("hidden"))},w=function(a){a&&(u=!1),h.hasAttribute("hidden")||u||(d.style.zIndex-=1,h.setAttribute("hidden",!0))},x=function(){u?w(!0):v(!0)};e.addEventListener("click",function(){x()},!1),e.addEventListener("mouseover",function(){v()},!1),e.addEventListener("mouseout",function(){w()},!1),h.addEventListener("click",function(){w(!0)},!1)}else h.setAttribute("hidden",!0);return h.appendChild(p),h.appendChild(q),g.appendChild(h),d.appendChild(e),d.appendChild(g),d}function f(a){var b=c(a);b.className="annotLink";var d=document.createElement("a");return d.href=d.title=a.url||"",a.url&&j()&&(d.target=K[PDFJS.externalLinkTarget]),b.appendChild(d),b}function g(a,b){switch(a.annotationType){case E.WIDGET:return d(a,b);case E.TEXT:return e(a);case E.LINK:return f(a);default:throw new Error("Unsupported annotationType: "+a.annotationType)}}return{getHtmlElement:g}}();PDFJS.AnnotationUtils=sa;var ta={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},ua=function(){function a(a,b,c){for(var d=-1,e=b;c>e;e++){var f=255&(d^a[e]),h=g[f];d=d>>>8^h}return-1^d}function b(b,c,d,e){var f=e,g=c.length;d[f]=g>>24&255,d[f+1]=g>>16&255,d[f+2]=g>>8&255,d[f+3]=255&g,f+=4,d[f]=255&b.charCodeAt(0),d[f+1]=255&b.charCodeAt(1),d[f+2]=255&b.charCodeAt(2),d[f+3]=255&b.charCodeAt(3),f+=4,d.set(c,f),f+=c.length;var h=a(d,e+4,f);d[f]=h>>24&255,d[f+1]=h>>16&255,d[f+2]=h>>8&255,d[f+3]=255&h}function c(a,b,c){for(var d=1,e=0,f=b;c>f;++f)d=(d+(255&a[f]))%65521,e=(e+d)%65521;return e<<16|d}function d(a,d){var g,h,i,j=a.width,k=a.height,l=a.data;switch(d){case D.GRAYSCALE_1BPP:h=0,g=1,i=j+7>>3;break;case D.RGB_24BPP:h=2,g=8,i=3*j;break;case D.RGBA_32BPP:h=6,g=8,i=4*j;break;default:throw new Error("invalid format")}var m,n,o=new Uint8Array((1+i)*k),p=0,q=0;for(m=0;k>m;++m)o[p++]=0,o.set(l.subarray(q,q+i),p),q+=i,p+=i;if(d===D.GRAYSCALE_1BPP)for(p=0,m=0;k>m;m++)for(p++,n=0;i>n;n++)o[p++]^=255;var r=new Uint8Array([j>>24&255,j>>16&255,j>>8&255,255&j,k>>24&255,k>>16&255,k>>8&255,255&k,g,h,0,0,0]),s=o.length,t=65535,u=Math.ceil(s/t),v=new Uint8Array(2+s+5*u+4),w=0;v[w++]=120,v[w++]=156;for(var x=0;s>t;)v[w++]=0,v[w++]=255,v[w++]=255,v[w++]=0,v[w++]=0,v.set(o.subarray(x,x+t),w),w+=t,x+=t,s-=t;v[w++]=1,v[w++]=255&s,v[w++]=s>>8&255,v[w++]=65535&~s&255,v[w++]=(65535&~s)>>8&255,v.set(o.subarray(x),w),w+=o.length-x;var y=c(o,0,o.length);v[w++]=y>>24&255,v[w++]=y>>16&255,v[w++]=y>>8&255,v[w++]=255&y;var z=e.length+3*f+r.length+v.length,A=new Uint8Array(z),B=0;return A.set(e,B),B+=e.length,b("IHDR",r,A,B),B+=f+r.length,b("IDATA",v,A,B),B+=f+v.length,b("IEND",new Uint8Array(0),A,B),PDFJS.createObjectURL(A,"image/png")}for(var e=new Uint8Array([137,80,78,71,13,10,26,10]),f=12,g=new Int32Array(256),h=0;256>h;h++){for(var i=h,j=0;8>j;j++)i=1&i?3988292384^i>>1&2147483647:i>>1&2147483647;g[h]=i}return function(a){var b=void 0===a.kind?D.GRAYSCALE_1BPP:a.kind;return d(a,b)}}(),va=function(){function a(){this.fontSizeScale=1,this.fontWeight=ta.fontWeight,this.fontSize=0,this.textMatrix=S,this.fontMatrix=B,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=ta.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.clipId="",this.pendingClip=!1,this.maskId=""}return a.prototype={clone:function(){return Object.create(this)},setCurrentPoint:function(a,b){this.x=a,this.y=b}},a}(),wa=function(){function a(a,b){var c="http://www.w3.org/2000/svg",d=document.createElementNS(c,"svg:svg");return d.setAttributeNS(null,"version","1.1"),d.setAttributeNS(null,"width",a+"px"),d.setAttributeNS(null,"height",b+"px"),d.setAttributeNS(null,"viewBox","0 0 "+a+" "+b),d}function c(a){for(var b=[],c=[],d=a.length,e=0;d>e;e++)"save"!==a[e].fn?"restore"===a[e].fn?b=c.pop():b.push(a[e]):(b.push({fnId:92,fn:"group",items:[]}),c.push(b),b=b[b.length-1].items);return b}function d(a){if(a===(0|a))return a.toString();var b=a.toFixed(10),c=b.length-1;if("0"!==b[c])return b;do c--;while("0"===b[c]);return b.substr(0,"."===b[c]?c:c+1)}function e(a){if(0===a[4]&&0===a[5]){if(0===a[1]&&0===a[2])return 1===a[0]&&1===a[3]?"":"scale("+d(a[0])+" "+d(a[3])+")";if(a[0]===a[3]&&a[1]===-a[2]){var b=180*Math.acos(a[0])/Math.PI;return"rotate("+d(b)+")"}}else if(1===a[0]&&0===a[1]&&0===a[2]&&1===a[3])return"translate("+d(a[4])+" "+d(a[5])+")";return"matrix("+d(a[0])+" "+d(a[1])+" "+d(a[2])+" "+d(a[3])+" "+d(a[4])+" "+d(a[5])+")"}function f(a,b){this.current=new va,this.transformMatrix=S,this.transformStack=[],this.extraStack=[],this.commonObjs=a,this.objs=b,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts={},this.cssStyle=null}var g="http://www.w3.org/2000/svg",h="http://www.w3.org/XML/1998/namespace",i="http://www.w3.org/1999/xlink",j=["butt","round","square"],k=["miter","round","bevel"],l=0,m=0;return f.prototype={save:function(){this.transformStack.push(this.transformMatrix);var a=this.current;this.extraStack.push(a),this.current=a.clone()},restore:function(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.tgrp=document.createElementNS(g,"svg:g"),this.tgrp.setAttributeNS(null,"transform",e(this.transformMatrix)),this.pgrp.appendChild(this.tgrp)},group:function(a){this.save(),this.executeOpTree(a),this.restore()},loadDependencies:function(a){for(var b=a.fnArray,c=b.length,d=a.argsArray,e=this,f=0;c>f;f++)if(G.dependency===b[f])for(var g=d[f],h=0,i=g.length;i>h;h++){var j,k=g[h],l="g_"===k.substring(0,2);j=l?new Promise(function(a){e.commonObjs.get(k,a)}):new Promise(function(a){e.objs.get(k,a)}),this.current.dependencies.push(j)}return Promise.all(this.current.dependencies)},transform:function(a,b,c,d,f,h){var i=[a,b,c,d,f,h];this.transformMatrix=PDFJS.Util.transform(this.transformMatrix,i),this.tgrp=document.createElementNS(g,"svg:g"),this.tgrp.setAttributeNS(null,"transform",e(this.transformMatrix))},getSVG:function(b,c){return this.svg=a(c.width,c.height),this.viewport=c,this.loadDependencies(b).then(function(){this.transformMatrix=S,this.pgrp=document.createElementNS(g,"svg:g"),this.pgrp.setAttributeNS(null,"transform",e(c.transform)),this.tgrp=document.createElementNS(g,"svg:g"),this.tgrp.setAttributeNS(null,"transform",e(this.transformMatrix)),this.defs=document.createElementNS(g,"svg:defs"),this.pgrp.appendChild(this.defs),this.pgrp.appendChild(this.tgrp),this.svg.appendChild(this.pgrp);var a=this.convertOpList(b);return this.executeOpTree(a),this.svg}.bind(this))},convertOpList:function(a){var b=a.argsArray,d=a.fnArray,e=d.length,f=[],g=[];for(var h in G)f[G[h]]=h;for(var i=0;e>i;i++){var j=d[i];g.push({fnId:j,fn:f[j],args:b[i]})}return c(g)},executeOpTree:function(a){for(var c=a.length,d=0;c>d;d++){var e=a[d].fn,f=a[d].fnId,g=a[d].args;switch(0|f){case G.beginText:this.beginText();break;case G.setLeading:this.setLeading(g);break;case G.setLeadingMoveText:this.setLeadingMoveText(g[0],g[1]);break;case G.setFont:this.setFont(g);break;case G.showText:this.showText(g[0]);break;case G.showSpacedText:this.showText(g[0]);break;case G.endText:this.endText();break;case G.moveText:this.moveText(g[0],g[1]);break;case G.setCharSpacing:this.setCharSpacing(g[0]);break;case G.setWordSpacing:this.setWordSpacing(g[0]);break;case G.setHScale:this.setHScale(g[0]);break;case G.setTextMatrix:this.setTextMatrix(g[0],g[1],g[2],g[3],g[4],g[5]);break;case G.setLineWidth:this.setLineWidth(g[0]);break;case G.setLineJoin:this.setLineJoin(g[0]);break;case G.setLineCap:this.setLineCap(g[0]);break;case G.setMiterLimit:this.setMiterLimit(g[0]);break;case G.setFillRGBColor:this.setFillRGBColor(g[0],g[1],g[2]);break;case G.setStrokeRGBColor:this.setStrokeRGBColor(g[0],g[1],g[2]);break;case G.setDash:this.setDash(g[0],g[1]);break;case G.setGState:this.setGState(g[0]);break;case G.fill:this.fill();break;case G.eoFill:this.eoFill();break;case G.stroke:this.stroke();break;case G.fillStroke:this.fillStroke();break;case G.eoFillStroke:this.eoFillStroke();break;case G.clip:this.clip("nonzero");break;case G.eoClip:this.clip("evenodd");break;case G.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case G.paintJpegXObject:this.paintJpegXObject(g[0],g[1],g[2]);break;case G.paintImageXObject:this.paintImageXObject(g[0]);break;case G.paintInlineImageXObject:this.paintInlineImageXObject(g[0]);break;case G.paintImageMaskXObject:this.paintImageMaskXObject(g[0]);break;case G.paintFormXObjectBegin:this.paintFormXObjectBegin(g[0],g[1]);break;case G.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case G.closePath:this.closePath();break;case G.closeStroke:this.closeStroke();break;case G.closeFillStroke:this.closeFillStroke();break;case G.nextLine:this.nextLine();break;case G.transform:this.transform(g[0],g[1],g[2],g[3],g[4],g[5]);break;case G.constructPath:this.constructPath(g[0],g[1]);break;case G.endPath:this.endPath();break;case 92:this.group(a[d].items);break;default:b("Unimplemented method "+e)}}},setWordSpacing:function(a){this.current.wordSpacing=a},setCharSpacing:function(a){this.current.charSpacing=a},nextLine:function(){this.moveText(0,this.current.leading)},setTextMatrix:function(a,b,c,e,f,h){var i=this.current;this.current.textMatrix=this.current.lineMatrix=[a,b,c,e,f,h],this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0,i.xcoords=[],i.tspan=document.createElementNS(g,"svg:tspan"),i.tspan.setAttributeNS(null,"font-family",i.fontFamily),i.tspan.setAttributeNS(null,"font-size",d(i.fontSize)+"px"),i.tspan.setAttributeNS(null,"y",d(-i.y)),i.txtElement=document.createElementNS(g,"svg:text"),i.txtElement.appendChild(i.tspan)},beginText:function(){this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0,this.current.textMatrix=S,this.current.lineMatrix=S,this.current.tspan=document.createElementNS(g,"svg:tspan"),this.current.txtElement=document.createElementNS(g,"svg:text"),this.current.txtgrp=document.createElementNS(g,"svg:g"),this.current.xcoords=[]},moveText:function(a,b){var c=this.current;this.current.x=this.current.lineX+=a,this.current.y=this.current.lineY+=b,c.xcoords=[],c.tspan=document.createElementNS(g,"svg:tspan"),c.tspan.setAttributeNS(null,"font-family",c.fontFamily),c.tspan.setAttributeNS(null,"font-size",d(c.fontSize)+"px"),c.tspan.setAttributeNS(null,"y",d(-c.y))},showText:function(a){var b=this.current,c=b.font,f=b.fontSize;if(0!==f){var g,i=b.charSpacing,j=b.wordSpacing,k=b.fontDirection,l=b.textHScale*k,m=a.length,n=c.vertical,o=f*b.fontMatrix[0],q=0;for(g=0;m>g;++g){var r=a[g];if(null!==r)if(p(r))q+=-r*f*.001;else{b.xcoords.push(b.x+q*l);var s=r.width,t=r.fontChar,u=s*o+i*k;q+=u,b.tspan.textContent+=t}else q+=k*j}n?b.y-=q*l:b.x+=q*l,b.tspan.setAttributeNS(null,"x",b.xcoords.map(d).join(" ")),b.tspan.setAttributeNS(null,"y",d(-b.y)),b.tspan.setAttributeNS(null,"font-family",b.fontFamily),b.tspan.setAttributeNS(null,"font-size",d(b.fontSize)+"px"),b.fontStyle!==ta.fontStyle&&b.tspan.setAttributeNS(null,"font-style",b.fontStyle),b.fontWeight!==ta.fontWeight&&b.tspan.setAttributeNS(null,"font-weight",b.fontWeight),b.fillColor!==ta.fillColor&&b.tspan.setAttributeNS(null,"fill",b.fillColor),b.txtElement.setAttributeNS(null,"transform",e(b.textMatrix)+" scale(1, -1)"),b.txtElement.setAttributeNS(h,"xml:space","preserve"),b.txtElement.appendChild(b.tspan),b.txtgrp.appendChild(b.txtElement),this.tgrp.appendChild(b.txtElement)}},setLeadingMoveText:function(a,b){this.setLeading(-b),this.moveText(a,b)},addFontStyle:function(a){this.cssStyle||(this.cssStyle=document.createElementNS(g,"svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.appendChild(this.cssStyle));var b=PDFJS.createObjectURL(a.data,a.mimetype);this.cssStyle.textContent+='@font-face { font-family: "'+a.loadedName+'"; src: url('+b+"); }\n"},setFont:function(a){var b=this.current,c=this.commonObjs.get(a[0]),e=a[1];this.current.font=c,this.embedFonts&&c.data&&!this.embeddedFonts[c.loadedName]&&(this.addFontStyle(c),this.embeddedFonts[c.loadedName]=c),b.fontMatrix=c.fontMatrix?c.fontMatrix:B;var f=c.black?c.bold?"bolder":"bold":c.bold?"bold":"normal",h=c.italic?"italic":"normal";0>e?(e=-e,b.fontDirection=-1):b.fontDirection=1,b.fontSize=e,b.fontFamily=c.loadedName,b.fontWeight=f,b.fontStyle=h,b.tspan=document.createElementNS(g,"svg:tspan"),b.tspan.setAttributeNS(null,"y",d(-b.y)),b.xcoords=[]},endText:function(){this.current.pendingClip?(this.cgrp.appendChild(this.tgrp),this.pgrp.appendChild(this.cgrp)):this.pgrp.appendChild(this.tgrp),this.tgrp=document.createElementNS(g,"svg:g"),this.tgrp.setAttributeNS(null,"transform",e(this.transformMatrix))},setLineWidth:function(a){this.current.lineWidth=a},setLineCap:function(a){this.current.lineCap=j[a]},setLineJoin:function(a){this.current.lineJoin=k[a]},setMiterLimit:function(a){this.current.miterLimit=a},setStrokeRGBColor:function(a,b,c){var d=T.makeCssRgb(a,b,c);this.current.strokeColor=d},setFillRGBColor:function(a,b,c){var d=T.makeCssRgb(a,b,c);this.current.fillColor=d,this.current.tspan=document.createElementNS(g,"svg:tspan"),this.current.xcoords=[]},setDash:function(a,b){this.current.dashArray=a,this.current.dashPhase=b},constructPath:function(a,b){var c=this.current,e=c.x,f=c.y;c.path=document.createElementNS(g,"svg:path");for(var h=[],i=a.length,j=0,k=0;i>j;j++)switch(0|a[j]){case G.rectangle:e=b[k++],f=b[k++];var l=b[k++],m=b[k++],n=e+l,o=f+m;h.push("M",d(e),d(f),"L",d(n),d(f),"L",d(n),d(o),"L",d(e),d(o),"Z");break;case G.moveTo:e=b[k++],f=b[k++],h.push("M",d(e),d(f));break;case G.lineTo:e=b[k++],f=b[k++],h.push("L",d(e),d(f));break;case G.curveTo:e=b[k+4],f=b[k+5],h.push("C",d(b[k]),d(b[k+1]),d(b[k+2]),d(b[k+3]),d(e),d(f)),k+=6;break;case G.curveTo2:e=b[k+2],f=b[k+3],h.push("C",d(e),d(f),d(b[k]),d(b[k+1]),d(b[k+2]),d(b[k+3])),k+=4;break;case G.curveTo3:e=b[k+2],f=b[k+3],h.push("C",d(b[k]),d(b[k+1]),d(e),d(f),d(e),d(f)),k+=4;break;case G.closePath:h.push("Z")}c.path.setAttributeNS(null,"d",h.join(" ")),c.path.setAttributeNS(null,"stroke-miterlimit",d(c.miterLimit)),c.path.setAttributeNS(null,"stroke-linecap",c.lineCap),c.path.setAttributeNS(null,"stroke-linejoin",c.lineJoin),c.path.setAttributeNS(null,"stroke-width",d(c.lineWidth)+"px"),c.path.setAttributeNS(null,"stroke-dasharray",c.dashArray.map(d).join(" ")),c.path.setAttributeNS(null,"stroke-dashoffset",d(c.dashPhase)+"px"),c.path.setAttributeNS(null,"fill","none"),this.tgrp.appendChild(c.path),c.pendingClip?(this.cgrp.appendChild(this.tgrp),this.pgrp.appendChild(this.cgrp)):this.pgrp.appendChild(this.tgrp),c.element=c.path,c.setCurrentPoint(e,f)},endPath:function(){var a=this.current;a.pendingClip?(this.cgrp.appendChild(this.tgrp),this.pgrp.appendChild(this.cgrp)):this.pgrp.appendChild(this.tgrp),this.tgrp=document.createElementNS(g,"svg:g"),this.tgrp.setAttributeNS(null,"transform",e(this.transformMatrix))},clip:function(a){var b=this.current;b.clipId="clippath"+l,l++,this.clippath=document.createElementNS(g,"svg:clipPath"),this.clippath.setAttributeNS(null,"id",b.clipId);var c=b.element.cloneNode();"evenodd"===a?c.setAttributeNS(null,"clip-rule","evenodd"):c.setAttributeNS(null,"clip-rule","nonzero"),this.clippath.setAttributeNS(null,"transform",e(this.transformMatrix)),this.clippath.appendChild(c),this.defs.appendChild(this.clippath),b.pendingClip=!0,this.cgrp=document.createElementNS(g,"svg:g"),this.cgrp.setAttributeNS(null,"clip-path","url(#"+b.clipId+")"),this.pgrp.appendChild(this.cgrp)},closePath:function(){var a=this.current,b=a.path.getAttributeNS(null,"d");b+="Z",a.path.setAttributeNS(null,"d",b)},setLeading:function(a){this.current.leading=-a},setTextRise:function(a){this.current.textRise=a},setHScale:function(a){this.current.textHScale=a/100},setGState:function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b],e=d[0],f=d[1];switch(e){case"LW":this.setLineWidth(f);break;case"LC":this.setLineCap(f);break;case"LJ":this.setLineJoin(f);break;case"ML":this.setMiterLimit(f);break;case"D":this.setDash(f[0],f[1]);break;case"RI":break;case"FL":break;case"Font":this.setFont(f);break;case"CA":break;case"ca":break;case"BM":break;case"SMask":}}},fill:function(){var a=this.current;a.element.setAttributeNS(null,"fill",a.fillColor)},stroke:function(){var a=this.current;a.element.setAttributeNS(null,"stroke",a.strokeColor),a.element.setAttributeNS(null,"fill","none")},eoFill:function(){var a=this.current;a.element.setAttributeNS(null,"fill",a.fillColor),a.element.setAttributeNS(null,"fill-rule","evenodd")},fillStroke:function(){this.stroke(),this.fill()},eoFillStroke:function(){this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()},closeStroke:function(){this.closePath(),this.stroke()},closeFillStroke:function(){this.closePath(),this.fillStroke()},paintSolidColorImageMask:function(){var a=this.current,b=document.createElementNS(g,"svg:rect");b.setAttributeNS(null,"x","0"),b.setAttributeNS(null,"y","0"),b.setAttributeNS(null,"width","1px"),b.setAttributeNS(null,"height","1px"),b.setAttributeNS(null,"fill",a.fillColor),this.tgrp.appendChild(b)},paintJpegXObject:function(a,b,c){var e=this.current,f=this.objs.get(a),h=document.createElementNS(g,"svg:image");h.setAttributeNS(i,"xlink:href",f.src),h.setAttributeNS(null,"width",f.width+"px"),h.setAttributeNS(null,"height",f.height+"px"),h.setAttributeNS(null,"x","0"),h.setAttributeNS(null,"y",d(-c)),h.setAttributeNS(null,"transform","scale("+d(1/b)+" "+d(-1/c)+")"),this.tgrp.appendChild(h),e.pendingClip?(this.cgrp.appendChild(this.tgrp),this.pgrp.appendChild(this.cgrp)):this.pgrp.appendChild(this.tgrp)},paintImageXObject:function(a){var c=this.objs.get(a);return c?void this.paintInlineImageXObject(c):void b("Dependent image isn't ready yet")},paintInlineImageXObject:function(a,b){var c=this.current,e=a.width,f=a.height,h=ua(a),j=document.createElementNS(g,"svg:rect"); +j.setAttributeNS(null,"x","0"),j.setAttributeNS(null,"y","0"),j.setAttributeNS(null,"width",d(e)),j.setAttributeNS(null,"height",d(f)),c.element=j,this.clip("nonzero");var k=document.createElementNS(g,"svg:image");k.setAttributeNS(i,"xlink:href",h),k.setAttributeNS(null,"x","0"),k.setAttributeNS(null,"y",d(-f)),k.setAttributeNS(null,"width",d(e)+"px"),k.setAttributeNS(null,"height",d(f)+"px"),k.setAttributeNS(null,"transform","scale("+d(1/e)+" "+d(-1/f)+")"),b?b.appendChild(k):this.tgrp.appendChild(k),c.pendingClip?(this.cgrp.appendChild(this.tgrp),this.pgrp.appendChild(this.cgrp)):this.pgrp.appendChild(this.tgrp)},paintImageMaskXObject:function(a){var b=this.current,c=a.width,e=a.height,f=b.fillColor;b.maskId="mask"+m++;var h=document.createElementNS(g,"svg:mask");h.setAttributeNS(null,"id",b.maskId);var i=document.createElementNS(g,"svg:rect");i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y","0"),i.setAttributeNS(null,"width",d(c)),i.setAttributeNS(null,"height",d(e)),i.setAttributeNS(null,"fill",f),i.setAttributeNS(null,"mask","url(#"+b.maskId+")"),this.defs.appendChild(h),this.tgrp.appendChild(i),this.paintInlineImageXObject(a,h)},paintFormXObjectBegin:function(a,b){if(this.save(),q(a)&&6===a.length&&this.transform(a[0],a[1],a[2],a[3],a[4],a[5]),q(b)&&4===b.length){var c=b[2]-b[0],e=b[3]-b[1],f=document.createElementNS(g,"svg:rect");f.setAttributeNS(null,"x",b[0]),f.setAttributeNS(null,"y",b[1]),f.setAttributeNS(null,"width",d(c)),f.setAttributeNS(null,"height",d(e)),this.current.element=f,this.clip("nonzero"),this.endPath()}},paintFormXObjectEnd:function(){this.restore()}},f}();PDFJS.SVGGraphics=wa}.call("undefined"==typeof window?this:window),PDFJS.workerSrc||"undefined"==typeof document||(PDFJS.workerSrc=function(){"use strict";var a=document.body||document.getElementsByTagName("head")[0],b=a.lastChild.src;return b&&b.replace(/\.js$/i,".worker.js")}()),"undefined"==typeof PDFJS&&(("undefined"!=typeof window?window:this).PDFJS={}),PDFJS.version="1.1.551",PDFJS.build="2a5616c",function(){"use strict";function a(a){PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.infos&&console.log("Info: "+a)}function b(a){PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.warnings&&console.log("Warning: "+a)}function c(a){throw PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.errors&&(console.log("Error: "+a),console.log(d())),aa.notify(_.unknown),new Error(a)}function d(){try{throw new Error}catch(a){return a.stack?a.stack.split("\n").slice(2).join("\n"):""}}function e(a,b){a||c(b)}function f(a,b){if(!a)return!1;var c=/^[a-z][a-z0-9+\-.]*(?=:)/i.exec(a);if(!c)return b;switch(c=c[0].toLowerCase()){case"http":case"https":case"ftp":case"mailto":case"tel":return!0;default:return!1}}function g(a,b,c){return Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!1}),c}function h(){switch(PDFJS.openExternalLinksInNewWindow&&(b("PDFJS.openExternalLinksInNewWindow is deprecated, use PDFJS.externalLinkTarget instead."),PDFJS.externalLinkTarget===ba.NONE&&(PDFJS.externalLinkTarget=ba.BLANK),PDFJS.openExternalLinksInNewWindow=!1),PDFJS.externalLinkTarget){case ba.NONE:return!1;case ba.SELF:case ba.BLANK:case ba.PARENT:case ba.TOP:return!0}return b("PDFJS.externalLinkTarget is invalid: "+PDFJS.externalLinkTarget),PDFJS.externalLinkTarget=ba.NONE,!1}function i(a){e(null!==a&&"object"==typeof a&&void 0!==a.length,"Invalid argument for bytesToString");var b=a.length,c=8192;if(c>b)return String.fromCharCode.apply(null,a);for(var d=[],f=0;b>f;f+=c){var g=Math.min(f+c,b),h=a.subarray(f,g);d.push(String.fromCharCode.apply(null,h))}return d.join("")}function j(a){e("string"==typeof a,"Invalid argument for stringToBytes");for(var b=a.length,c=new Uint8Array(b),d=0;b>d;++d)c[d]=255&a.charCodeAt(d);return c}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,255&a)}function l(a){for(var b=1,c=0;a>b;)b<<=1,c++;return c}function m(a,b){return a[b]<<24>>24}function n(a,b){return a[b]<<8|a[b+1]}function o(a,b){return(a[b]<<24|a[b+1]<<16|a[b+2]<<8|a[b+3])>>>0}function p(){var a=new Uint8Array(2);a[0]=1;var b=new Uint16Array(a.buffer);return 1===b[0]}function q(){var a=document.createElement("canvas");a.width=a.height=1;var b=a.getContext("2d"),c=b.createImageData(1,1);return"undefined"!=typeof c.data.buffer}function r(a){var b,c=a.length,d=[];if("þ"===a[0]&&"ÿ"===a[1])for(b=2;c>b;b+=2)d.push(String.fromCharCode(a.charCodeAt(b)<<8|a.charCodeAt(b+1)));else for(b=0;c>b;++b){var e=oa[a.charCodeAt(b)];d.push(e?String.fromCharCode(e):a.charAt(b))}return d.join("")}function s(a){return decodeURIComponent(escape(a))}function t(a){return unescape(encodeURIComponent(a))}function u(a){for(var b in a)return!1;return!0}function v(a){return"boolean"==typeof a}function w(a){return"number"==typeof a&&(0|a)===a}function x(a){return"number"==typeof a}function y(a){return"string"==typeof a}function z(a){return a instanceof ya}function A(a,b){return a instanceof za&&(void 0===b||a.cmd===b)}function B(a,b){if(!(a instanceof Aa))return!1;if(!b)return!0;var c=a.get("Type");return z(c)&&c.name===b}function C(a){return a instanceof Array}function D(a){return"object"==typeof a&&null!==a&&void 0!==a.getBytes}function E(a){return"object"==typeof a&&null!==a&&void 0!==a.byteLength}function F(a){return a instanceof Ba}function G(){var a={};return a.promise=new Promise(function(b,c){a.resolve=b,a.reject=c}),a}function H(a,b){this.name=a,this.comObj=b,this.callbackIndex=1,this.postMessageTransfers=!0;var d=this.callbacksCapabilities={},e=this.actionHandler={};e.console_log=[function(a){console.log.apply(console,a)}],e.console_error=[function(a){console.error.apply(console,a)}],e._unsupported_feature=[function(a){aa.notify(a)}],b.onmessage=function(a){var f=a.data;if(f.isReply){var g=f.callbackId;if(f.callbackId in d){var h=d[g];delete d[g],"error"in f?h.reject(f.error):h.resolve(f.data)}else c("Cannot resolve callback "+g)}else if(f.action in e){var i=e[f.action];f.callbackId?Promise.resolve().then(function(){return i[0].call(i[1],f.data)}).then(function(a){b.postMessage({isReply:!0,callbackId:f.callbackId,data:a})},function(a){a instanceof Error&&(a+=""),b.postMessage({isReply:!0,callbackId:f.callbackId,error:a})}):i[0].call(i[1],f.data)}else c("Unknown action from worker: "+f.action)}}function I(){}function J(a,b,c){var d=b.get("Matrix"),e=b.get("BBox"),f=b.get("XStep"),g=b.get("YStep"),h=b.get("PaintType"),i=b.get("TilingType");return["TilingPattern",c,a,d,e,f,g,h,i]}function K(a){return a>=65520&&65535>=a?0:a>=62976&&63743>=a?Wb[a]||a:a}function L(a){for(var b=0,c=Xb.length;c>b;b++){var d=Xb[b];if(a>=d.begin&&a=b.begin&&a=b.begin&&a=b||!M(a.charCodeAt(0)))return a;for(var c="",d=b-1;d>=0;d--)c+=a[d];return c}function O(a){if(a.fontMatrix[0]!==T[0]){var b=.001/a.fontMatrix[0],c=a.widths;for(var d in c)c[d]*=b;a.defaultWidth*=b}}function P(a,b){switch(a){case"Type1":return"Type1C"===b?Z.TYPE1C:Z.TYPE1;case"CIDFontType0":return"CIDFontType0C"===b?Z.CIDFONTTYPE0C:Z.CIDFONTTYPE0;case"OpenType":return Z.OPENTYPE;case"TrueType":return Z.TRUETYPE;case"CIDFontType2":return Z.CIDFONTTYPE2;case"MMType1":return Z.MMTYPE1;case"Type0":return Z.TYPE0;default:return Z.UNKNOWN}}function Q(a,b,c){var d,e,f,g=Object.create(null);if(a.baseEncodingName)for(f=Pb[a.baseEncodingName],e=0;e=0?g[e]=d:g[e]=0;else if(a.flags&Ob.Symbolic)for(e in b)g[e]=b[e];else for(f=Pb.StandardEncoding,e=0;e=0?g[e]=d:g[e]=0;var h=a.differences;if(h)for(e in h){var i=h[e];d=c.indexOf(i),d>=0?g[e]=d:g[e]=0}return g}function R(a){return a===Dc}var S="undefined"==typeof window?this:window,T=("undefined"==typeof window,[.001,0,0,.001,0,0]),U={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},V={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},W={WIDGET:1,TEXT:2,LINK:3},X={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},Y={UNKNOWN:0,FLATE:1,LZW:2,DCT:3,JPX:4,JBIG:5,A85:6,AHX:7,CCF:8,RL:9},Z={UNKNOWN:0,TYPE1:1,TYPE1C:2,CIDFONTTYPE0:3,CIDFONTTYPE0C:4,TRUETYPE:5,CIDFONTTYPE2:6,TYPE3:7,OPENTYPE:8,TYPE0:9,MMTYPE1:10};S.PDFJS||(S.PDFJS={}),S.PDFJS.pdfBug=!1,PDFJS.VERBOSITY_LEVELS={errors:0,warnings:1,infos:5};var $=PDFJS.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},_=PDFJS.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"},aa=PDFJS.UnsupportedManager=function(){var a=[];return{listen:function(b){a.push(b)},notify:function(c){b('Unsupported feature "'+c+'"');for(var d=0,e=a.length;e>d;d++)a[d](c)}}}();PDFJS.isValidUrl=f,PDFJS.shadow=g;var ba=PDFJS.LinkTarget={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};PDFJS.isExternalLinkTargetSet=h;var ca=PDFJS.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},da=function(){function a(a,b){this.name="PasswordException",this.message=a,this.code=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.PasswordException=da;var ea=function(){function a(a,b){this.name="UnknownErrorException",this.message=a,this.details=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.UnknownErrorException=ea;var fa=function(){function a(a){this.name="InvalidPDFException",this.message=a}return a.prototype=new Error,a.constructor=a,a}();PDFJS.InvalidPDFException=fa;var ga=function(){function a(a){this.name="MissingPDFException",this.message=a}return a.prototype=new Error,a.constructor=a,a}();PDFJS.MissingPDFException=ga;var ha=function(){function a(a,b){this.name="UnexpectedResponseException",this.message=a,this.status=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.UnexpectedResponseException=ha;var ia=function(){function a(a){this.message=a}return a.prototype=new Error,a.prototype.name="NotImplementedException",a.constructor=a,a}(),ja=function(){function a(a,b){this.begin=a,this.end=b,this.message="Missing data ["+a+", "+b+")"}return a.prototype=new Error,a.prototype.name="MissingDataException",a.constructor=a,a}(),ka=function(){function a(a){this.message=a}return a.prototype=new Error,a.prototype.name="XRefParseException",a.constructor=a,a}();Object.defineProperty(PDFJS,"isLittleEndian",{configurable:!0,get:function(){return g(PDFJS,"isLittleEndian",p())}}),Object.defineProperty(PDFJS,"hasCanvasTypedArrays",{configurable:!0,get:function(){return g(PDFJS,"hasCanvasTypedArrays",q())}});var la=function(){function a(a,b){this.buffer=a,this.byteLength=a.length,this.length=void 0===b?this.byteLength>>2:b,c(this.length)}function b(a){return{get:function(){var b=this.buffer,c=a<<2;return(b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24)>>>0},set:function(b){var c=this.buffer,d=a<<2;c[d]=255&b,c[d+1]=b>>8&255,c[d+2]=b>>16&255,c[d+3]=b>>>24&255}}}function c(c){for(;c>d;)Object.defineProperty(a.prototype,d,b(d)),d++}a.prototype=Object.create(null);var d=0;return a}(),ma=[1,0,0,1,0,0],na=PDFJS.Util=function(){function a(){}var b=["rgb(",0,",",0,",",0,")"];return a.makeCssRgb=function(a,c,d){return b[1]=a,b[3]=c,b[5]=d,b.join("")},a.transform=function(a,b){return[a[0]*b[0]+a[2]*b[1],a[1]*b[0]+a[3]*b[1],a[0]*b[2]+a[2]*b[3],a[1]*b[2]+a[3]*b[3],a[0]*b[4]+a[2]*b[5]+a[4],a[1]*b[4]+a[3]*b[5]+a[5]]},a.applyTransform=function(a,b){var c=a[0]*b[0]+a[1]*b[2]+b[4],d=a[0]*b[1]+a[1]*b[3]+b[5];return[c,d]},a.applyInverseTransform=function(a,b){var c=b[0]*b[3]-b[1]*b[2],d=(a[0]*b[3]-a[1]*b[2]+b[2]*b[5]-b[4]*b[3])/c,e=(-a[0]*b[1]+a[1]*b[0]+b[4]*b[1]-b[5]*b[0])/c;return[d,e]},a.getAxialAlignedBoundingBox=function(b,c){var d=a.applyTransform(b,c),e=a.applyTransform(b.slice(2,4),c),f=a.applyTransform([b[0],b[3]],c),g=a.applyTransform([b[2],b[1]],c);return[Math.min(d[0],e[0],f[0],g[0]),Math.min(d[1],e[1],f[1],g[1]),Math.max(d[0],e[0],f[0],g[0]),Math.max(d[1],e[1],f[1],g[1])]},a.inverseTransform=function(a){var b=a[0]*a[3]-a[1]*a[2];return[a[3]/b,-a[1]/b,-a[2]/b,a[0]/b,(a[2]*a[5]-a[4]*a[3])/b,(a[4]*a[1]-a[5]*a[0])/b]},a.apply3dTransform=function(a,b){return[a[0]*b[0]+a[1]*b[1]+a[2]*b[2],a[3]*b[0]+a[4]*b[1]+a[5]*b[2],a[6]*b[0]+a[7]*b[1]+a[8]*b[2]]},a.singularValueDecompose2dScale=function(a){var b=[a[0],a[2],a[1],a[3]],c=a[0]*b[0]+a[1]*b[2],d=a[0]*b[1]+a[1]*b[3],e=a[2]*b[0]+a[3]*b[2],f=a[2]*b[1]+a[3]*b[3],g=(c+f)/2,h=Math.sqrt((c+f)*(c+f)-4*(c*f-e*d))/2,i=g+h||1,j=g-h||1;return[Math.sqrt(i),Math.sqrt(j)]},a.normalizeRect=function(a){var b=a.slice(0);return a[0]>a[2]&&(b[0]=a[2],b[2]=a[0]),a[1]>a[3]&&(b[1]=a[3],b[3]=a[1]),b},a.intersect=function(b,c){function d(a,b){return a-b}var e=[b[0],b[2],c[0],c[2]].sort(d),f=[b[1],b[3],c[1],c[3]].sort(d),g=[];return b=a.normalizeRect(b),c=a.normalizeRect(c),e[0]===b[0]&&e[1]===c[0]||e[0]===c[0]&&e[1]===b[0]?(g[0]=e[1],g[2]=e[2],f[0]===b[1]&&f[1]===c[1]||f[0]===c[1]&&f[1]===b[1]?(g[1]=f[1],g[3]=f[2],g):!1):!1},a.sign=function(a){return 0>a?-1:1},a.appendToArray=function(a,b){Array.prototype.push.apply(a,b)},a.prependToArray=function(a,b){Array.prototype.unshift.apply(a,b)},a.extendObj=function(a,b){for(var c in b)a[c]=b[c]},a.getInheritableProperty=function(a,b){for(;a&&!a.has(b);)a=a.get("Parent");return a?a.get(b):null},a.inherit=function(a,b,c){a.prototype=Object.create(b.prototype),a.prototype.constructor=a;for(var d in c)a.prototype[d]=c[d]},a.loadScript=function(a,b){var c=document.createElement("script"),d=!1;c.setAttribute("src",a),b&&(c.onload=function(){d||b(),d=!0}),document.getElementsByTagName("head")[0].appendChild(c)},a}(),oa=(PDFJS.PageViewport=function(){function a(a,b,c,d,e,f){this.viewBox=a,this.scale=b,this.rotation=c,this.offsetX=d,this.offsetY=e;var g,h,i,j,k=(a[2]+a[0])/2,l=(a[3]+a[1])/2;switch(c%=360,c=0>c?c+360:c){case 180:g=-1,h=0,i=0,j=1;break;case 90:g=0,h=1,i=1,j=0;break;case 270:g=0,h=-1,i=-1,j=0;break;default:g=1,h=0,i=0,j=-1}f&&(i=-i,j=-j);var m,n,o,p;0===g?(m=Math.abs(l-a[1])*b+d,n=Math.abs(k-a[0])*b+e,o=Math.abs(a[3]-a[1])*b,p=Math.abs(a[2]-a[0])*b):(m=Math.abs(k-a[0])*b+d,n=Math.abs(l-a[1])*b+e,o=Math.abs(a[2]-a[0])*b,p=Math.abs(a[3]-a[1])*b),this.transform=[g*b,h*b,i*b,j*b,m-g*b*k-i*b*l,n-h*b*k-j*b*l],this.width=o,this.height=p,this.fontScale=b}return a.prototype={clone:function(b){b=b||{};var c="scale"in b?b.scale:this.scale,d="rotation"in b?b.rotation:this.rotation;return new a(this.viewBox.slice(),c,d,this.offsetX,this.offsetY,b.dontFlip)},convertToViewportPoint:function(a,b){return na.applyTransform([a,b],this.transform)},convertToViewportRectangle:function(a){var b=na.applyTransform([a[0],a[1]],this.transform),c=na.applyTransform([a[2],a[3]],this.transform);return[b[0],b[1],c[0],c[1]]},convertToPdfPoint:function(a,b){return na.applyInverseTransform([a,b],this.transform)}},a}(),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364]);PDFJS.createPromiseCapability=G,function(){function a(a){this._status=c,this._handlers=[];try{a.call(this,this._resolve.bind(this),this._reject.bind(this))}catch(b){this._reject(b)}}if(S.Promise)return"function"!=typeof S.Promise.all&&(S.Promise.all=function(a){var b,c,d=0,e=[],f=new S.Promise(function(a,d){b=a,c=d});return a.forEach(function(a,f){d++,a.then(function(a){e[f]=a,d--,0===d&&b(e)},c)}),0===d&&b(e),f}),"function"!=typeof S.Promise.resolve&&(S.Promise.resolve=function(a){return new S.Promise(function(b){b(a)})}),"function"!=typeof S.Promise.reject&&(S.Promise.reject=function(a){return new S.Promise(function(b,c){c(a)})}),void("function"!=typeof S.Promise.prototype["catch"]&&(S.Promise.prototype["catch"]=function(a){return S.Promise.prototype.then(void 0,a)}));var c=0,d=1,e=2,f=500,g={handlers:[],running:!1,unhandledRejections:[],pendingRejectionCheck:!1,scheduleHandlers:function(a){a._status!==c&&(this.handlers=this.handlers.concat(a._handlers),a._handlers=[],this.running||(this.running=!0,setTimeout(this.runHandlers.bind(this),0)))},runHandlers:function(){for(var a=1,b=Date.now()+a;this.handlers.length>0;){var c=this.handlers.shift(),f=c.thisPromise._status,g=c.thisPromise._value;try{f===d?"function"==typeof c.onResolve&&(g=c.onResolve(g)):"function"==typeof c.onReject&&(g=c.onReject(g),f=d,c.thisPromise._unhandledRejection&&this.removeUnhandeledRejection(c.thisPromise))}catch(h){f=e,g=h}if(c.nextPromise._updateStatus(f,g),Date.now()>=b)break}return this.handlers.length>0?void setTimeout(this.runHandlers.bind(this),0):void(this.running=!1)},addUnhandledRejection:function(a){this.unhandledRejections.push({promise:a,time:Date.now()}),this.scheduleRejectionCheck()},removeUnhandeledRejection:function(a){a._unhandledRejection=!1;for(var b=0;bf){var d=this.unhandledRejections[c].promise._value,e="Unhandled rejection: "+d;d.stack&&(e+="\n"+d.stack),b(e),this.unhandledRejections.splice(c),c--}this.unhandledRejections.length&&this.scheduleRejectionCheck()}.bind(this),f))}};a.all=function(b){function c(a){g._status!==e&&(i=[],f(a))}var d,f,g=new a(function(a,b){d=a,f=b}),h=b.length,i=[];if(0===h)return d(i),g;for(var j=0,k=b.length;k>j;++j){var l=b[j],m=function(a){return function(b){g._status!==e&&(i[a]=b,h--,0===h&&d(i))}}(j);a.isPromise(l)?l.then(m,c):m(l)}return g},a.isPromise=function(a){return a&&"function"==typeof a.then},a.resolve=function(b){return new a(function(a){a(b)})},a.reject=function(b){return new a(function(a,c){c(b)})},a.prototype={_status:null,_value:null,_handlers:null,_unhandledRejection:null,_updateStatus:function(b,c){if(this._status!==d&&this._status!==e){if(b===d&&a.isPromise(c))return void c.then(this._updateStatus.bind(this,d),this._updateStatus.bind(this,e));this._status=b,this._value=c,b===e&&0===this._handlers.length&&(this._unhandledRejection=!0,g.addUnhandledRejection(this)),g.scheduleHandlers(this)}},_resolve:function(a){this._updateStatus(d,a)},_reject:function(a){this._updateStatus(e,a)},then:function(b,c){var d=new a(function(a,b){this.resolve=a,this.reject=b});return this._handlers.push({thisPromise:this,onResolve:b,onReject:c,nextPromise:d}),g.scheduleHandlers(this),d},"catch":function(a){return this.then(void 0,a)}},S.Promise=a}();(function(){function a(a,b,c){for(;a.lengthb;++b){var g=d[b].name;g.length>f&&(f=g.length)}for(b=0,c=d.length;c>b;++b){var h=d[b],i=h.end-h.start;e+=a(h.name," ",f)+" "+i+"ms\n"}return e}},c})();PDFJS.createBlob=function(a,b){if("undefined"!=typeof Blob)return new Blob([a],{type:b});var c=new MozBlobBuilder;return c.append(a),c.getBlob(b)},PDFJS.createObjectURL=function(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(b,c){if(!PDFJS.disableCreateObjectURL&&"undefined"!=typeof URL&&URL.createObjectURL){var d=PDFJS.createBlob(b,c);return URL.createObjectURL(d)}for(var e="data:"+c+";base64,",f=0,g=b.length;g>f;f+=3){var h=255&b[f],i=255&b[f+1],j=255&b[f+2],k=h>>2,l=(3&h)<<4|i>>4,m=g>f+1?(15&i)<<2|j>>6:64,n=g>f+2?63&j:64;e+=a[k]+a[l]+a[m]+a[n]}return e}}(),H.prototype={on:function(a,b,d){var e=this.actionHandler;e[a]&&c('There is already an actionName called "'+a+'"'),e[a]=[b,d]},send:function(a,b,c){var d={action:a,data:b};this.postMessage(d,c)},sendWithPromise:function(a,b,c){var d=this.callbackIndex++,e={action:a,data:b,callbackId:d},f=G();this.callbacksCapabilities[d]=f;try{this.postMessage(e,c)}catch(g){f.reject(g)}return f.promise},postMessage:function(a,b){b&&this.postMessageTransfers?this.comObj.postMessage(a,b):this.comObj.postMessage(a)}};var pa=function(){function a(a,b){this.url=a,b=b||{},this.isHttp=/^https?:/i.test(a),this.httpHeaders=this.isHttp&&b.httpHeaders||{},this.withCredentials=b.withCredentials||!1,this.getXhr=b.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests={},this.loadedRequests={}}function b(a){var b=a.response;if("string"!=typeof b)return b;for(var c=b.length,d=new Uint8Array(c),e=0;c>e;e++)d[e]=255&b.charCodeAt(e);return d.buffer}var c=200,d=206,e=function(){try{var a=new XMLHttpRequest;return a.open("GET","https://example.com"),a.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===a.responseType}catch(b){return!1}}();return a.prototype={requestRange:function(a,b,c){var d={begin:a,end:b};for(var e in c)d[e]=c[e];return this.request(d)},requestFull:function(a){return this.request(a)},request:function(a){var b=this.getXhr(),c=this.currXhrId++,d=this.pendingRequests[c]={xhr:b};b.open("GET",this.url),b.withCredentials=this.withCredentials;for(var f in this.httpHeaders){var g=this.httpHeaders[f];"undefined"!=typeof g&&b.setRequestHeader(f,g)}if(this.isHttp&&"begin"in a&&"end"in a){var h=a.begin+"-"+(a.end-1);b.setRequestHeader("Range","bytes="+h),d.expectedStatus=206}else d.expectedStatus=200;var i=e&&!!a.onProgressiveData;return i?(b.responseType="moz-chunked-arraybuffer",d.onProgressiveData=a.onProgressiveData,d.mozChunked=!0):b.responseType="arraybuffer",a.onError&&(b.onerror=function(c){a.onError(b.status)}),b.onreadystatechange=this.onStateChange.bind(this,c),b.onprogress=this.onProgress.bind(this,c),d.onHeadersReceived=a.onHeadersReceived,d.onDone=a.onDone,d.onError=a.onError,d.onProgress=a.onProgress,b.send(null),c},onProgress:function(a,c){var d=this.pendingRequests[a];if(d){if(d.mozChunked){var e=b(d.xhr);d.onProgressiveData(e)}var f=d.onProgress;f&&f(c)}},onStateChange:function(a,e){var f=this.pendingRequests[a];if(f){var g=f.xhr;if(g.readyState>=2&&f.onHeadersReceived&&(f.onHeadersReceived(),delete f.onHeadersReceived),4===g.readyState&&a in this.pendingRequests){if(delete this.pendingRequests[a],0===g.status&&this.isHttp)return void(f.onError&&f.onError(g.status));var h=g.status||c,i=h===c&&f.expectedStatus===d;if(!i&&h!==f.expectedStatus)return void(f.onError&&f.onError(g.status));this.loadedRequests[a]=!0;var j=b(g);if(h===d){var k=g.getResponseHeader("Content-Range"),l=/bytes (\d+)-(\d+)\/(\d+)/.exec(k),m=parseInt(l[1],10);f.onDone({begin:m,chunk:j})}else f.onProgressiveData?f.onDone(null):f.onDone({begin:0,chunk:j})}}},hasPendingRequests:function(){for(var a in this.pendingRequests)return!0;return!1},getRequestXhr:function(a){return this.pendingRequests[a].xhr},isStreamingRequest:function(a){return!!this.pendingRequests[a].onProgressiveData},isPendingRequest:function(a){return a in this.pendingRequests},isLoadedRequest:function(a){return a in this.loadedRequests},abortAllRequests:function(){for(var a in this.pendingRequests)this.abortRequest(0|a)},abortRequest:function(a){var b=this.pendingRequests[a].xhr;delete this.pendingRequests[a],b.abort()}},a}(),qa=function(){function a(a,b,c){this.bytes=new Uint8Array(a),this.start=0,this.pos=0,this.end=a,this.chunkSize=b,this.loadedChunks=[],this.numChunksLoaded=0,this.numChunks=Math.ceil(a/b),this.manager=c,this.progressiveDataLength=0,this.lastSuccessfulEnsureByteChunk=-1}return a.prototype={getMissingChunks:function(){for(var a=[],b=0,c=this.numChunks;c>b;++b)this.loadedChunks[b]||a.push(b);return a},getBaseStreams:function(){return[this]},allChunksLoaded:function(){return this.numChunksLoaded===this.numChunks},onReceiveData:function(a,b){var c=a+b.byteLength;e(a%this.chunkSize===0,"Bad begin offset: "+a);var d=this.bytes.length;e(c%this.chunkSize===0||c===d,"Bad end offset: "+c),this.bytes.set(new Uint8Array(b),a);var f,g=this.chunkSize,h=Math.floor(a/g),i=Math.floor((c-1)/g)+1;for(f=h;i>f;++f)this.loadedChunks[f]||(this.loadedChunks[f]=!0,++this.numChunksLoaded)},onReceiveProgressiveData:function(a){var b=this.progressiveDataLength,c=Math.floor(b/this.chunkSize);this.bytes.set(new Uint8Array(a),b),b+=a.byteLength,this.progressiveDataLength=b;var d,e=b>=this.end?this.numChunks:Math.floor(b/this.chunkSize);for(d=c;e>d;++d)this.loadedChunks[d]||(this.loadedChunks[d]=!0,++this.numChunksLoaded)},ensureByte:function(a){var b=Math.floor(a/this.chunkSize);if(b!==this.lastSuccessfulEnsureByteChunk){if(!this.loadedChunks[b])throw new ja(a,a+1);this.lastSuccessfulEnsureByteChunk=b}},ensureRange:function(a,b){if(!(a>=b||b<=this.progressiveDataLength))for(var c=this.chunkSize,d=Math.floor(a/c),e=Math.floor((b-1)/c)+1,f=d;e>f;++f)if(!this.loadedChunks[f])throw new ja(a,b)},nextEmptyChunk:function(a){for(var b,c=this.numChunks,d=0;c>d;++d)if(b=(a+d)%c,!this.loadedChunks[b])return b;return null},hasChunk:function(a){return!!this.loadedChunks[a]},get length(){return this.end-this.start},get isEmpty(){return 0===this.length},getByte:function(){var a=this.pos;return a>=this.end?-1:(this.ensureByte(a),this.bytes[this.pos++])},getUint16:function(){var a=this.getByte(),b=this.getByte();return-1===a||-1===b?-1:(a<<8)+b},getInt32:function(){var a=this.getByte(),b=this.getByte(),c=this.getByte(),d=this.getByte();return(a<<24)+(b<<16)+(c<<8)+d},getBytes:function(a){var b=this.bytes,c=this.pos,d=this.end;if(!a)return this.ensureRange(c,d),b.subarray(c,d);var e=c+a;return e>d&&(e=d),this.ensureRange(c,e),this.pos=e,b.subarray(c,e)},peekByte:function(){var a=this.getByte();return this.pos--,a},peekBytes:function(a){var b=this.getBytes(a);return this.pos-=b.length,b},getByteRange:function(a,b){return this.ensureRange(a,b),this.bytes.subarray(a,b)},skip:function(a){a||(a=1),this.pos+=a},reset:function(){this.pos=this.start},moveStart:function(){this.start=this.pos},makeSubStream:function(a,b,c){function d(){}this.ensureRange(a,a+b),d.prototype=Object.create(this),d.prototype.getMissingChunks=function(){for(var a=this.chunkSize,b=Math.floor(this.start/a),c=Math.floor((this.end-1)/a)+1,d=[],e=b;c>e;++e)this.loadedChunks[e]||d.push(e);return d};var e=new d;return e.pos=e.start=a,e.end=a+b||this.end,e.dict=c,e},isStream:!0},a}(),ra=function(){function a(a,b,c,d){this.stream=new qa(a,b,this),this.length=a,this.chunkSize=b,this.url=c,this.disableAutoFetch=d.disableAutoFetch;var e=this.msgHandler=d.msgHandler;if(d.chunkedViewerLoading)e.on("OnDataRange",this.onReceiveData.bind(this)),e.on("OnDataProgress",this.onProgress.bind(this)),this.sendRequest=function(a,b){e.send("RequestDataRange",{begin:a,end:b})};else{var f=function(){return new XMLHttpRequest};this.networkManager=new pa(this.url,{getXhr:f,httpHeaders:d.httpHeaders,withCredentials:d.withCredentials}),this.sendRequest=function(a,b){this.networkManager.requestRange(a,b,{onDone:this.onReceiveData.bind(this),onProgress:this.onProgress.bind(this)})}}this.currRequestId=0,this.chunksNeededByRequest={},this.requestsByChunk={},this.promisesByRequest={},this.progressiveDataLength=0,this._loadedStreamCapability=G(),d.initialData&&this.onReceiveData({chunk:d.initialData})}return a.prototype={onLoadedStream:function(){return this._loadedStreamCapability.promise},requestAllChunks:function(){var a=this.stream.getMissingChunks();return this._requestChunks(a),this._loadedStreamCapability.promise},_requestChunks:function(a){var b,c,d,e=this.currRequestId++;for(this.chunksNeededByRequest[e]=b={},c=0,d=a.length;d>c;c++)this.stream.hasChunk(a[c])||(b[a[c]]=!0);if(u(b))return Promise.resolve();var f=G();this.promisesByRequest[e]=f;var g=[];for(var h in b)h=0|h,h in this.requestsByChunk||(this.requestsByChunk[h]=[],g.push(h)),this.requestsByChunk[h].push(e);if(!g.length)return f.promise;var i=this.groupChunks(g);for(c=0;cf;++f)e.push(f);return this._requestChunks(e)},requestRanges:function(a){a=a||[];for(var b=[],c=0;cf;++f)b.indexOf(f)<0&&b.push(f);return b.sort(function(a,b){return a-b}),this._requestChunks(b)},groupChunks:function(a){for(var b=[],c=-1,d=-1,e=0;ec&&(c=f),d>=0&&d+1!==f&&(b.push({beginChunk:c,endChunk:d+1}),c=f),e+1===a.length&&b.push({beginChunk:c,endChunk:f+1}),d=f}return b},onProgress:function(a){var b=this.stream.numChunksLoaded*this.chunkSize+a.loaded;this.msgHandler.send("DocProgress",{loaded:b,total:this.length})},onReceiveData:function(a){var b=a.chunk,c=void 0===a.begin,d=c?this.progressiveDataLength:a.begin,e=d+b.byteLength,f=Math.floor(d/this.chunkSize),g=eb;++b){var k=this.requestsByChunk[b]||[];for(delete this.requestsByChunk[b],h=0;hf){b("Page_getInheritedPageProp: maximum loop count exceeded.");break}c=c.get("Parent")}return d?1===d.length||!B(d[0])||e>f?d[0]:Aa.merge(this.xref,d):Aa.empty},get content(){return this.getPageProp("Contents")},get resources(){return g(this,"resources",this.getInheritedPageProp("Resources"))},get mediaBox(){var a=this.getInheritedPageProp("MediaBox");return C(a)&&4===a.length||(a=c),g(this,"mediaBox",a)},get view(){var a=this.mediaBox,b=this.getInheritedPageProp("CropBox");return C(b)&&4===b.length?(b=na.intersect(b,a),b?g(this,"view",b):g(this,"view",a)):g(this,"view",a)},get rotate(){var a=this.getInheritedPageProp("Rotate")||0;return a%90!==0?a=0:a>=360?a%=360:0>a&&(a=(a%360+360)%360),g(this,"rotate",a)},getContentStream:function(){var a,b=this.content;if(C(b)){var c,d=this.xref,e=b.length,f=[];for(c=0;e>c;++c)f.push(d.fetchIfRef(b[c]));a=new Pc(f)}else a=D(b)?b:new _c;return a},loadResources:function(a){return this.resourcesPromise||(this.resourcesPromise=this.pdfManager.ensure(this,"resources")),this.resourcesPromise.then(function(){var b=new Ia(this.resources.map,a,this.xref);return b.load()}.bind(this))},getOperatorList:function(a,b,c){var d=this,e=this.pdfManager,f=e.ensure(this,"getContentStream",[]),g=this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"]),h=new vb(e,this.xref,a,this.pageIndex,"p"+this.pageIndex+"_",this.idCounters,this.fontCache),i=Promise.all([f,g]),j=i.then(function(e){var f=e[0],g=new xb(c,a,d.pageIndex);return a.send("StartRenderPage",{transparency:h.hasBlendModes(d.resources),pageIndex:d.pageIndex,intent:c}),h.getOperatorList(f,b,d.resources,g).then(function(){return g})}),k=e.ensure(this,"annotations");return Promise.all([j,k]).then(function(a){var d=a[0],f=a[1];if(0===f.length)return d.flush(!0),d;var g=Na.appendToOperatorList(f,d,e,h,b,c);return g.then(function(){return d.flush(!0),d})})},extractTextContent:function(a){var b={on:function(){},send:function(){}},c=this,d=this.pdfManager,e=d.ensure(this,"getContentStream",[]),f=this.loadResources(["ExtGState","XObject","Font"]),g=Promise.all([e,f]);return g.then(function(e){var f=e[0],g=new vb(d,c.xref,b,c.pageIndex,"p"+c.pageIndex+"_",c.idCounters,c.fontCache);return g.getTextContent(f,a,c.resources)})},getAnnotationsData:function(){for(var a=this.annotations,b=[],c=0,d=a.length;d>c;++c)b.push(a[c].data);return b},get annotations(){for(var a=[],b=this.getInheritedPageProp("Annots")||[],c=new I,d=0,e=b.length;e>d;++d){var f=b[d],h=c.create(this.xref,f);h&&(h.isViewable()||h.isPrintable())&&a.push(h)}return g(this,"annotations",a)}},a}(),xa=function(){function b(a,b,e){D(b)?d.call(this,a,b,e):E(b)?d.call(this,a,new Mc(b),e):c("PDFDocument: Unknown argument type")}function d(a,b,c){e(b.length>0,"stream must have data"),this.pdfManager=a,this.stream=b;var d=new Fa(this.stream,c,a);this.xref=d}function f(a,b,c,d){var e=a.pos,f=a.end,g=[];e+c>f&&(c=f-e);for(var h=0;c>h;++h)g.push(String.fromCharCode(a.getByte()));var i=g.join("");a.pos=e;var j=d?i.lastIndexOf(b):i.indexOf(b);return-1===j?!1:(a.pos+=j,!0)}var h=1024,i="\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",k={get entries(){return g(this,"entries",{Title:y,Author:y,Subject:y,Keywords:y,Creator:y,Producer:y,CreationDate:y,ModDate:y,Trapped:z})}};return b.prototype={parse:function(b){this.setup(b);var c=this.catalog.catDict.get("Version");z(c)&&(this.pdfFormatVersion=c.name);try{if(this.acroForm=this.catalog.catDict.get("AcroForm"),this.acroForm){this.xfa=this.acroForm.get("XFA");var d=this.acroForm.get("Fields");d&&C(d)&&0!==d.length||this.xfa||(this.acroForm=null)}}catch(e){a("Something wrong with AcroForm entry"),this.acroForm=null}},get linearization(){var b=null;if(this.stream.length)try{b=Hc.create(this.stream)}catch(c){if(c instanceof ja)throw c;a(c)}return g(this,"linearization",b)},get startXRef(){var a=this.stream,b=0,c=this.linearization;if(c)a.reset(),f(a,"endobj",1024)&&(b=a.pos+6);else{for(var d=1024,e=!1,h=a.end;!e&&h>0;)h-=d-"startxref".length,0>h&&(h=0),a.pos=h,e=f(a,"startxref",d,!0);if(e){a.skip(9);var i;do i=a.getByte();while(Gc.isSpace(i));for(var j="";i>=32&&57>=i;)j+=String.fromCharCode(i),i=a.getByte();b=parseInt(j,10),isNaN(b)&&(b=0)}}return g(this,"startXRef",b)},get mainXRefEntriesOffset(){var a=0,b=this.linearization;return b&&(a=b.mainXRefEntriesOffset),g(this,"mainXRefEntriesOffset",a)},checkHeader:function(){var a=this.stream;if(a.reset(),f(a,"%PDF-",1024)){a.moveStart();for(var b,c=12,d="";(b=a.getByte())>32&&!(d.length>=c);)d+=String.fromCharCode(b);return void(this.pdfFormatVersion||(this.pdfFormatVersion=d.substring(5)))}},parseStartXRef:function(){var a=this.startXRef;this.xref.setStartXRef(a)},setup:function(a){this.xref.parse(a),this.catalog=new Ea(this.pdfManager,this.xref)},get numPages(){var a=this.linearization,b=a?a.numPages:this.catalog.numPages;return g(this,"numPages",b)},get documentInfo(){var b,c={PDFFormatVersion:this.pdfFormatVersion,IsAcroFormPresent:!!this.acroForm,IsXFAPresent:!!this.xfa};try{b=this.xref.trailer.get("Info")}catch(d){a("The document information dictionary is invalid.")}if(b){var e=k.entries;for(var f in e)if(b.has(f)){var h=b.get(f);e[f](h)?c[f]="string"!=typeof h?h:r(h):a('Bad value in document info for "'+f+'"')}}return g(this,"documentInfo",c)},get fingerprint(){var a,b=this.xref,c="",d=b.trailer.get("ID");d&&C(d)&&d[0]&&y(d[0])&&d[0]!==i?a=j(d[0]):(this.stream.ensureRange&&this.stream.ensureRange(0,Math.min(h,this.stream.end)),a=gb(this.stream.bytes.subarray(0,h),0,h));for(var e=0,f=a.length;f>e;e++){var k=a[e].toString(16);c+=1===k.length?"0"+k:k}return g(this,"fingerprint",c)},getPage:function(a){return this.catalog.getPage(a)},cleanup:function(){return this.catalog.cleanup()}},b}(),ya=function(){function a(a){this.name=a}a.prototype={};var b={};return a.get=function(c){var d=b[c];return d?d:b[c]=new a(c)},a}(),za=function(){function a(a){this.cmd=a}a.prototype={};var b={};return a.get=function(c){var d=b[c];return d?d:b[c]=new a(c)},a}(),Aa=function(){function a(a){if(!z(a.Type))return!0;var b=a.Type.name;return d[b]===!0}function b(a){this.map=Object.create(null),this.xref=a,this.objId=null,this.__nonSerializable__=c}var c=function(){return c},d={Background:!0,ExtGState:!0,Halftone:!0,Layout:!0,Mask:!0,Pagination:!0,Printing:!0};return b.prototype={assignXref:function(a){this.xref=a},get:function(a,b,c){var d,e=this.xref;return"undefined"!=typeof(d=this.map[a])||a in this.map||"undefined"==typeof b?e?e.fetchIfRef(d):d:"undefined"!=typeof(d=this.map[b])||b in this.map||"undefined"==typeof c?e?e.fetchIfRef(d):d:(d=this.map[c]||null,e?e.fetchIfRef(d):d)},getAsync:function(a,b,c){var d,e=this.xref;return"undefined"!=typeof(d=this.map[a])||a in this.map||"undefined"==typeof b?e?e.fetchIfRefAsync(d):Promise.resolve(d):"undefined"!=typeof(d=this.map[b])||b in this.map||"undefined"==typeof c?e?e.fetchIfRefAsync(d):Promise.resolve(d):(d=this.map[c]||null,e?e.fetchIfRefAsync(d):Promise.resolve(d))},getArray:function(a,b,c){var d=this.get(a,b,c),e=this.xref;if(!C(d)||!e)return d;d=d.slice();for(var f=0,g=d.length;g>f;f++)F(d[f])&&(d[f]=e.fetch(d[f]));return d},getRaw:function(a){return this.map[a]},getAll:function(){var c,d,e=Object.create(null),f=null;for(c in this.map)d=this.get(c),d instanceof b?a(d)?(f||(f=[])).push({target:e,key:c,obj:d}):e[c]=this.getRaw(c):e[c]=d;if(!f)return e;for(var g=Object.create(null);f.length>0;){var h=f.shift(),i=h.obj,j=i.objId;if(j&&j in g)h.target[h.key]=g[j];else{var k=Object.create(null);for(c in i.map)d=i.get(c),d instanceof b?a(d)?f.push({target:k,key:c,obj:d}):k[c]=i.getRaw(c):k[c]=d;j&&(g[j]=k),h.target[h.key]=k}}return e},getKeys:function(){return Object.keys(this.map)},set:function(a,b){this.map[a]=b},has:function(a){return a in this.map},forEach:function(a){for(var b in this.map)a(b,this.get(b))}},b.empty=new b(null),b.merge=function(a,c){for(var d=new b(a),e=0,f=c.length;f>e;e++){var g=c[e];if(B(g))for(var h in g.map)d.map[h]||(d.map[h]=g.map[h])}return d},b}(),Ba=function(){function a(a,b){this.num=a,this.gen=b}return a.prototype={toString:function(){var a=this.num+"R";return 0!==this.gen&&(a+=this.gen),a}},a}(),Ca=function(){function a(){this.dict={}}return a.prototype={has:function(a){return a.toString()in this.dict},put:function(a){this.dict[a.toString()]=!0},remove:function(a){delete this.dict[a.toString()]}},a}(),Da=function(){function a(){this.dict=Object.create(null)}return a.prototype={get:function(a){return this.dict[a.toString()]},has:function(a){return a.toString()in this.dict},put:function(a,b){this.dict[a.toString()]=b},putAlias:function(a,b){this.dict[a.toString()]=this.get(b)},forEach:function(a,b){for(var c in this.dict)a.call(b,this.dict[c])},clear:function(){this.dict=Object.create(null)}},a}(),Ea=function(){function d(a,b){this.pdfManager=a,this.xref=b,this.catDict=b.getCatalogObj(),this.fontCache=new Da,e(B(this.catDict),"catalog object is not a dictionary"),this.pagePromises=[]}return d.prototype={get metadata(){var b=this.catDict.getRaw("Metadata");if(!F(b))return g(this,"metadata",null);var c,d=this.xref.encrypt?this.xref.encrypt.encryptMetadata:!1,e=this.xref.fetch(b,!d);if(e&&B(e.dict)){var f=e.dict.get("Type"),h=e.dict.get("Subtype");if(z(f)&&z(h)&&"Metadata"===f.name&&"XML"===h.name)try{c=s(i(e.getBytes()))}catch(j){a("Skipping invalid metadata.")}}return g(this,"metadata",c)},get toplevelPagesDict(){var a=this.catDict.get("Pages");return e(B(a),"invalid top-level pages dictionary"),g(this,"toplevelPagesDict",a)},get documentOutline(){var a=null;try{a=this.readDocumentOutline()}catch(c){if(c instanceof ja)throw c;b("Unable to read document outline")}return g(this,"documentOutline",a)},readDocumentOutline:function(){var a=this.xref,b=this.catDict.get("Outlines"),d={items:[]};if(B(b)){b=b.getRaw("First");var e=new Ca;if(F(b)){var f=[{obj:b,parent:d}];for(e.put(b);f.length>0;){var g=f.shift(),h=a.fetchIfRef(g.obj);if(null!==h){h.has("Title")||c("Invalid outline item");var i=h.get("A");i?i=i.get("D"):h.has("Dest")&&(i=h.getRaw("Dest"),z(i)&&(i=i.name));var j=h.get("Title"),k={dest:i,title:r(j),color:h.get("C")||[0,0,0],count:h.get("Count"),bold:!!(2&h.get("F")),italic:!!(1&h.get("F")),items:[]};g.parent.items.push(k),b=h.getRaw("First"),F(b)&&!e.has(b)&&(f.push({obj:b,parent:k}),e.put(b)),b=h.getRaw("Next"),F(b)&&!e.has(b)&&(f.push({obj:b,parent:g.parent}),e.put(b))}}}}return d.items.length>0?d.items:null},get numPages(){var a=this.toplevelPagesDict.get("Count");return e(w(a),"page count in top level pages object is not an integer"),g(this,"num",a)},get destinations(){function a(a){return B(a)?a.get("D"):a}var b,c,d=this.xref,e={},f=this.catDict.get("Names");if(f&&f.has("Dests")?b=f.getRaw("Dests"):this.catDict.has("Dests")&&(c=this.catDict.get("Dests")),c&&(f=c,f.forEach(function(b,c){c&&(e[b]=a(c))})),b){var h=new Ga(b,d),i=h.getAll();for(var j in i)i.hasOwnProperty(j)&&(e[j]=a(i[j]))}return g(this,"destinations",e)},getDestination:function(a){function b(a){return B(a)?a.get("D"):a}var c,d,e=this.xref,f=null,g=this.catDict.get("Names");if(g&&g.has("Dests")?c=g.getRaw("Dests"):this.catDict.has("Dests")&&(d=this.catDict.get("Dests")),d){var h=d.get(a);h&&(f=b(h))}if(c){var i=new Ga(c,e);f=b(i.get(a))}return f},get attachments(){var a,b=this.xref,c=null,d=this.catDict.get("Names");if(d&&(a=d.getRaw("EmbeddedFiles")),a){var e=new Ga(a,b),f=e.getAll();for(var h in f)if(f.hasOwnProperty(h)){var i=new Ha(f[h],b);c||(c={}),c[r(h)]=i.serializable}}return g(this,"attachments",c)},get javaScript(){function a(a){var b=a.get("S");if(z(b)&&"JavaScript"===b.name){var c=a.get("JS");if(D(c))c=i(c.getBytes());else if(!y(c))return;d.push(r(c))}}var b=this.xref,c=this.catDict.get("Names"),d=[];if(c&&c.has("JavaScript")){var e=new Ga(c.getRaw("JavaScript"),b),f=e.getAll();for(var h in f)if(f.hasOwnProperty(h)){var j=f[h];B(j)&&a(j)}}var k=this.catDict.get("OpenAction");if(B(k,"Action")){var l=k.get("S");if(z(l)&&"Named"===l.name){var m=k.get("N");z(m)&&"Print"===m.name&&d.push("print({});")}else a(k)}return g(this,"javaScript",d)},cleanup:function(){var a=[];return this.fontCache.forEach(function(b){a.push(b)}),Promise.all(a).then(function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b].dict;delete d.translated}this.fontCache.clear()}.bind(this))},getPage:function(a){return a in this.pagePromises||(this.pagePromises[a]=this.getPageDict(a).then(function(b){var c=b[0],d=b[1];return new wa(this.pdfManager,this.xref,a,c,d,this.fontCache)}.bind(this))),this.pagePromises[a]},getPageDict:function(a){function b(){for(;d.length;){var i=d.pop();if(F(i))return void g.fetchAsync(i).then(function(e){return B(e,"Page")||B(e)&&!e.has("Kids")?void(a===f?c.resolve([e,i]):(f++,b())):(d.push(e),void b())},c.reject);e(B(i),"page dictionary kid reference points to wrong type of object");var j=i.get("Count");if(0===j&&(h=!0),a>=f+j)f+=j;else{var k=i.get("Kids");if(e(C(k),"page dictionary kids object is not an array"),h||j!==k.length)for(var l=k.length-1;l>=0;l--)d.push(k[l]);else d=[k[a-f]],f=a}}c.reject("Page index "+a+" not found.")}var c=G(),d=[this.catDict.getRaw("Pages")],f=0,g=this.xref,h=!1;return b(),c.promise},getPageIndex:function(a){function b(a){var b,d=0;return f.fetchAsync(a).then(function(a){return a?(b=a.getRaw("Parent"),a.getAsync("Parent")):null}).then(function(a){return a?a.getAsync("Kids"):null}).then(function(g){if(!g)return null;for(var h=[],i=!1,j=0;jh;h++){d.streamPos=b.pos,d.entryNum=h,d.parserBuf1=a.buf1,d.parserBuf2=a.buf2;var i={};i.offset=a.getObj(),i.gen=a.getObj();var j=a.getObj();A(j,"f")?i.free=!0:A(j,"n")&&(i.uncompressed=!0),w(i.offset)&&w(i.gen)&&(i.free||i.uncompressed)||c("Invalid entry in XRef subsection: "+f+", "+g),this.entries[h+f]||(this.entries[h+f]=i)}d.entryNum=0,d.streamPos=b.pos,d.parserBuf1=a.buf1,d.parserBuf2=a.buf2,delete d.firstEntryNum,delete d.entryCount}return 1===f&&this.entries[1]&&this.entries[1].free&&this.entries.shift(),this.entries[0]&&!this.entries[0].free&&c("Invalid XRef table: unexpected first object"),e},processXRefStream:function(a){if(!("streamState"in this)){var b=a.dict,c=b.get("W"),d=b.get("Index");d||(d=[0,b.get("Size")]),this.streamState={entryRanges:d,byteWidths:c,entryNum:0,streamPos:a.pos}}return this.readXRefStream(a),delete this.streamState,a.dict},readXRefStream:function(a){var b,d,e=this.streamState;a.pos=e.streamPos;for(var f=e.byteWidths,g=f[0],h=f[1],i=f[2],j=e.entryRanges;j.length>0;){var k=j[0],l=j[1];for(w(k)&&w(l)||c("Invalid XRef range fields: "+k+", "+l),w(g)&&w(h)&&w(i)||c("Invalid XRef entry fields length: "+k+", "+l),b=e.entryNum;l>b;++b){e.entryNum=b,e.streamPos=a.pos;var m=0,n=0,o=0;for(d=0;g>d;++d)m=m<<8|a.getByte();for(0===g&&(m=1),d=0;h>d;++d)n=n<<8|a.getByte();for(d=0;i>d;++d)o=o<<8|a.getByte();var p={};switch(p.offset=n,p.gen=o,m){case 0:p.free=!0;break;case 1:p.uncompressed=!0;break;case 2:break;default:c("Invalid XRef entry type: "+m)}this.entries[k+b]||(this.entries[k+b]=p)}e.entryNum=0,e.streamPos=a.pos,j.splice(0,2)}},indexObjects:function(){function a(a,b){for(var c="",f=a[b];f!==d&&f!==e&&f!==h&&!(++b>=a.length);)c+=String.fromCharCode(f),f=a[b];return c}function b(a,b,c){for(var d=c.length,e=a.length,f=0;e>b;){for(var g=0;d>g&&a[b+g]===c[g];)++g;if(g>=d)break;b++,f++}return f}var c=9,d=10,e=13,f=32,g=37,h=60,i=/^(\d+)\s+(\d+)\s+obj\b/,j=new Uint8Array([116,114,97,105,108,101,114]),k=new Uint8Array([115,116,97,114,116,120,114,101,102]),l=new Uint8Array([101,110,100,111,98,106]),m=new Uint8Array([47,88,82,101,102]);this.entries.length=0;var n=this.stream;n.pos=0;for(var o=n.getBytes(),p=n.start,q=o.length,r=[],s=[];q>p;){var t=o[p];if(t!==c&&t!==d&&t!==e&&t!==f)if(t!==g){var u,v=a(o,p);if(0!==v.indexOf("xref")||4!==v.length&&!/\s/.test(v[4]))if(u=i.exec(v)){"undefined"==typeof this.entries[u[1]]&&(this.entries[u[1]]={offset:p-n.start,gen:0|u[2],uncompressed:!0});var w=b(o,p,l)+7,x=o.subarray(p,p+w),y=b(x,0,m);w>y&&x[y+5]<64&&(s.push(p-n.start),this.xrefstms[p-n.start]=1),p+=w}else 0!==v.indexOf("trailer")||7!==v.length&&!/\s/.test(v[7])?p+=v.length+1:(r.push(p),p+=b(o,p,k));else p+=b(o,p,j),r.push(p),p+=b(o,p,k)}else do{if(++p,p>=q)break;t=o[p]}while(t!==d&&t!==e);else++p}var z,C;for(z=0,C=s.length;C>z;++z)this.startXRefQueue.push(s[z]),this.readXRef(!0);var D;for(z=0,C=r.length;C>z;++z){n.pos=r[z];var E=new Fc(new Gc(n),!0,this),F=E.getObj();if(A(F,"trailer")&&B(D=E.getObj())&&D.has("ID"))return D}if(D)return D;throw new fa("Invalid PDF structure")},readXRef:function(b){var d=this.stream;try{for(;this.startXRefQueue.length;){var e=this.startXRefQueue[0];d.pos=e+d.start;var f,g=new Fc(new Gc(d),!0,this),h=g.getObj();if(A(h,"xref")){if(f=this.processXRefTable(g),this.topDict||(this.topDict=f),h=f.get("XRefStm"),w(h)){var i=h;i in this.xrefstms||(this.xrefstms[i]=1,this.startXRefQueue.push(i))}}else w(h)?(w(g.getObj())&&A(g.getObj(),"obj")&&D(h=g.getObj())||c("Invalid XRef stream"),f=this.processXRefStream(h),this.topDict||(this.topDict=f),f||c("Failed to read XRef stream")):c("Invalid XRef stream header");h=f.get("Prev"),w(h)?this.startXRefQueue.push(h):F(h)&&this.startXRefQueue.push(h.num),this.startXRefQueue.shift()}return this.topDict}catch(j){if(j instanceof ja)throw j;a("(while reading XRef): "+j)}if(!b)throw new ka},getEntry:function(a){var b=this.entries[a];return b&&!b.free&&b.offset?b:null},fetchIfRef:function(a){return F(a)?this.fetch(a):a},fetch:function(a,b){e(F(a),"ref object is not a reference");var c=a.num;if(c in this.cache){var d=this.cache[c];return d}var f=this.getEntry(c);return null===f?this.cache[c]=null:(f=f.uncompressed?this.fetchUncompressed(a,f,b):this.fetchCompressed(f,b),B(f)?f.objId=a.toString():D(f)&&(f.dict.objId=a.toString()),f)},fetchUncompressed:function(a,b,d){var e=a.gen,f=a.num;b.gen!==e&&c("inconsistent generation in XRef");var g=this.stream.makeSubStream(b.offset+this.stream.start),h=new Fc(new Gc(g),!0,this),i=h.getObj(),j=h.getObj(),k=h.getObj();if(w(i)&&parseInt(i,10)===f&&w(j)&&parseInt(j,10)===e&&A(k)||c("bad XRef entry"),!A(k,"obj")){if(0===k.cmd.indexOf("obj")&&(f=parseInt(k.cmd.substring(3),10),!isNaN(f)))return f;c("bad XRef entry")}return b=this.encrypt&&!d?h.getObj(this.encrypt.createCipherTransform(f,e)):h.getObj(),D(b)||(this.cache[f]=b),b},fetchCompressed:function(a,b){var d=a.offset,e=this.fetch(new Ba(d,0));D(e)||c("bad ObjStm stream");var f=e.dict.get("First"),g=e.dict.get("N");w(f)&&w(g)||c("invalid first and n parameters for ObjStm stream");var h=new Fc(new Gc(e),!1,this);h.allowStreams=!0;var i,j,k=[],l=[];for(i=0;g>i;++i){j=h.getObj(),w(j)||c("invalid object number in the ObjStm stream: "+j),l.push(j);var m=h.getObj();w(m)||c("invalid object offset in the ObjStm stream: "+m)}for(i=0;g>i;++i){k.push(h.getObj()),j=l[i];var n=this.entries[j];n&&n.offset===d&&n.gen===i&&(this.cache[j]=k[i])}return a=k[a.gen],void 0===a&&c("bad XRef entry for compressed object"),a},fetchIfRefAsync:function(a){return F(a)?this.fetchAsync(a):Promise.resolve(a)},fetchAsync:function(a,b){var c=this.stream.manager,d=this;return new Promise(function e(f,g){try{f(d.fetch(a,b))}catch(h){if(h instanceof ja)return void c.requestRange(h.begin,h.end).then(function(){e(f,g)},g);g(h)}})},getCatalogObj:function(){return this.root}},d}(),Ga=function(){function a(a,b){this.root=a,this.xref=b}return a.prototype={getAll:function(){var a={};if(!this.root)return a;var b=this.xref,d=new Ca;d.put(this.root);for(var e=[this.root];e.length>0;){var f,g,h=b.fetchIfRef(e.shift());if(B(h))if(h.has("Kids")){var i=h.get("Kids");for(f=0,g=i.length;g>f;f++){var j=i[f];d.has(j)&&c("invalid destinations"),e.push(j),d.put(j)}}else{var k=h.get("Names");if(k)for(f=0,g=k.length;g>f;f+=2)a[b.fetchIfRef(k[f])]=b.fetchIfRef(k[f+1])}}return a},get:function(a){if(!this.root)return null;for(var c,d,e,f=this.xref,g=f.fetchIfRef(this.root),h=0,i=10;g.has("Kids");){if(h++,h>i)return b("Search depth limit for named destionations has been reached."),null;var j=g.get("Kids");if(!C(j))return null;for(c=0,d=j.length-1;d>=c;){e=c+d>>1;var k=f.fetchIfRef(j[e]),l=k.get("Limits");if(af.fetchIfRef(l[1]))){g=f.fetchIfRef(j[e]);break}c=e+1}}if(c>d)return null}var m=g.get("Names");if(C(m))for(c=0,d=m.length-2;d>=c;)if(e=c+d&-2,af.fetchIfRef(m[e])))return f.fetchIfRef(m[e+1]);c=e+2}return null}},a}(),Ha=function(){function a(a,c){a&&B(a)&&(this.xref=c,this.root=a,a.has("FS")&&(this.fs=a.get("FS")),this.description=a.has("Desc")?r(a.get("Desc")):"",a.has("RF")&&b("Related file specifications are not supported"),this.contentAvailable=!0,a.has("EF")||(this.contentAvailable=!1,b("Non-embedded file specifications are not supported")))}function c(a){return a.has("UF")?a.get("UF"):a.has("F")?a.get("F"):a.has("Unix")?a.get("Unix"):a.has("Mac")?a.get("Mac"):a.has("DOS")?a.get("DOS"):null}return a.prototype={get filename(){if(!this._filename&&this.root){var a=c(this.root)||"unnamed";this._filename=r(a).replace(/\\\\/g,"\\").replace(/\\\//g,"/").replace(/\\/g,"/")}return this._filename},get content(){if(!this.contentAvailable)return null;!this.contentRef&&this.root&&(this.contentRef=c(this.root.get("EF")));var a=null;if(this.contentRef){var d=this.xref,e=d.fetchIfRef(this.contentRef);e&&D(e)?a=e.getBytes():b("Embedded file specification points to non-existing/invalid content")}else b("Embedded file specification does not have a content");return a},get serializable(){return{filename:this.filename,content:this.content}}},a}(),Ia=function(){function a(a){return F(a)||B(a)||C(a)||D(a)}function b(b,c){var d;if(B(b)||D(b)){var e;e=B(b)?b.map:b.dict.map;for(var f in e)d=e[f],a(d)&&c.push(d)}else if(C(b))for(var g=0,h=b.length;h>g;g++)d=b[g],a(d)&&c.push(d)}function c(a,b,c){this.obj=a,this.keys=b,this.xref=c,this.refSet=null,this.capability=null}return c.prototype={load:function(){var a=this.keys;if(this.capability=G(),!(this.xref.stream instanceof qa)||0===this.xref.stream.getMissingChunks().length)return this.capability.resolve(),this.capability.promise;this.refSet=new Ca;for(var b=[],c=0;c=3&&(this.borderStyle.setHorizontalCornerRadius(d[0]),this.borderStyle.setVerticalCornerRadius(d[1]),this.borderStyle.setWidth(d[2]),4===d.length&&this.borderStyle.setDashArray(d[3]))}else this.borderStyle.setWidth(0)},isInvisible:function(){var a=this.data;return!!(a&&a.annotationFlags&&1&a.annotationFlags)},isViewable:function(){var a=this.data;return!(this.isInvisible()||!a||a.annotationFlags&&34&a.annotationFlags||!a.rect)},isPrintable:function(){var a=this.data;return!(!(!this.isInvisible()&&a&&a.annotationFlags&&4&a.annotationFlags)||2&a.annotationFlags||!a.rect)},loadResources:function(a){return new Promise(function(b,c){this.appearance.dict.getAsync("Resources").then(function(d){if(!d)return void b();var e=new Ia(d.map,a,d.xref);e.load().then(function(){b(d)},c)},c)}.bind(this))},getOperatorList:function(b,c){if(!this.appearance)return Promise.resolve(new xb);var d=this.data,e=this.appearance.dict,f=this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"]),g=e.get("BBox")||[0,0,1,1],h=e.get("Matrix")||[1,0,0,1,0,0],i=a(d.rect,g,h),j=this;return f.then(function(a){var e=new xb;return e.addOp($.beginAnnotation,[d.rect,i,h]),b.getOperatorList(j.appearance,c,a,e).then(function(){return e.addOp($.endAnnotation,[]),j.appearance.reset(),e})})}},c.appendToOperatorList=function(a,b,c,d,e,f){function g(a){h.reject(a)}for(var h=G(),i=[],j=0,k=a.length;k>j;++j)("display"===f&&a[j].isViewable()||"print"===f&&a[j].isPrintable())&&i.push(a[j].getOperatorList(d,e));return Promise.all(i).then(function(a){b.addOp($.beginAnnotations,[]);for(var c=0,d=a.length;d>c;++c){var e=a[c];b.addOpList(e)}b.addOp($.endAnnotations,[]),h.resolve()},g),h.promise},c}(),Oa=function(){function a(){this.width=1,this.style=X.SOLID,this.dashArray=[3],this.horizontalCornerRadius=0,this.verticalCornerRadius=0}return a.prototype={setWidth:function(a){a===(0|a)&&(this.width=a)},setStyle:function(a){if(a)switch(a.name){case"S":this.style=X.SOLID;break;case"D":this.style=X.DASHED;break;case"B":this.style=X.BEVELED;break;case"I":this.style=X.INSET;break;case"U":this.style=X.UNDERLINE}},setDashArray:function(a){if(C(a)&&a.length>0){for(var b=!0,c=!0,d=0,e=a.length;e>d;d++){var f=a[d],g=+f>=0;if(!g){b=!1;break}f>0&&(c=!1)}b&&!c?this.dashArray=a:this.width=0}else a&&(this.width=0)},setHorizontalCornerRadius:function(a){a===(0|a)&&(this.horizontalCornerRadius=a)},setVerticalCornerRadius:function(a){a===(0|a)&&(this.verticalCornerRadius=a)}},a}(),Pa=function(){function a(a){Na.call(this,a);var b=a.dict,c=this.data;c.fieldValue=r(na.getInheritableProperty(b,"V")||""),c.alternativeText=r(b.get("TU")||""),c.defaultAppearance=na.getInheritableProperty(b,"DA")||"";var d=na.getInheritableProperty(b,"FT");c.fieldType=z(d)?d.name:"",c.fieldFlags=na.getInheritableProperty(b,"Ff")||0,this.fieldResources=na.getInheritableProperty(b,"DR")||Aa.empty;for(var e=[],f=b,g=a.ref;f;){var h=f.get("Parent"),i=f.getRaw("Parent"),j=f.get("T");if(j)e.unshift(r(j));else if(h&&g){var k,l,m=h.get("Kids");for(k=0,l=m.length;l>k;k++){var n=m[k];if(n.num===g.num&&n.gen===g.gen)break}e.unshift("`"+k)}f=h,g=i}c.fullName=e.join(".")}var c=Na.prototype;return na.inherit(a,Na,{isViewable:function(){return"Sig"===this.data.fieldType?(b("unimplemented annotation type: Widget signature"),!1):c.isViewable.call(this)}}),a}(),Qa=function(){function a(a){Pa.call(this,a),this.data.textAlignment=na.getInheritableProperty(a.dict,"Q"),this.data.annotationType=W.WIDGET,this.data.hasHtml=!this.data.hasAppearance&&!!this.data.fieldValue}return na.inherit(a,Pa,{getOperatorList:function(a,b){if(this.appearance)return Na.prototype.getOperatorList.call(this,a,b);var c=new xb,d=this.data;if(!d.defaultAppearance)return Promise.resolve(c);var e=new Mc(j(d.defaultAppearance));return a.getOperatorList(e,b,this.fieldResources,c).then(function(){return c})}}),a}(),Ra=function(){function a(a){Na.call(this,a);var b=a.dict,c=this.data,d=b.get("Contents"),e=b.get("T");c.annotationType=W.TEXT,c.content=r(d||""),c.title=r(e||""),c.hasHtml=!0,c.hasAppearance?c.name="NoIcon":(c.rect[1]=c.rect[3]-Ma,c.rect[2]=c.rect[0]+Ma,c.name=b.has("Name")?b.get("Name").name:"Note"),b.has("C")&&(c.hasBgColor=!0)}return na.inherit(a,Na,{}),a}(),Sa=function(){function a(a){Na.call(this,a);var d=a.dict,e=this.data;e.annotationType=W.LINK,e.hasHtml=!0;var g=d.get("A");if(g&&B(g)){var h=g.get("S").name;if("URI"===h){var i=g.get("URI");z(i)?i="/"+i.name:i&&(i=c(i)),f(i,!1)||(i="");try{e.url=s(i)}catch(j){e.url=i}}else if("GoTo"===h)e.dest=g.get("D");else if("GoToR"===h){var k=g.get("F");B(k)&&(i=k.get("F")||""),f(i,!1)||(i=""),e.url=i,e.dest=g.get("D")}else"Named"===h?e.action=g.get("N").name:b("unrecognized link type: "+h)}else if(d.has("Dest")){var l=d.get("Dest");e.dest=z(l)?l.name:l}}function c(a){return a&&0===a.indexOf("www.")?"http://"+a:a}return na.inherit(a,Na,{}),a}(),Ta=function(){var b=0,d=2,e=3,f=4;return{getSampleArray:function(a,b,c,d){var e,f,g=1;for(e=0,f=a.length;f>e;e++)g*=a[e];g*=b;var h=new Array(g),i=0,j=0,k=1/(Math.pow(2,c)-1),l=d.getBytes((g*c+7)/8),m=0;for(e=0;g>e;e++){for(;c>i;)j<<=8,j|=l[m++],i+=8;i-=c,h[e]=(j>>i)*k,j&=(1<d;d++){var f=a.fetchIfRef(b[d]);c.push(Ta.parse(a,f))}return function(a,b,d,e){for(var f=0,g=c.length;g>f;f++)c[f](a,b,d,e+f)}},constructSampled:function(d,e){function f(a){for(var b=a.length,c=[],d=0,e=0;b>e;e+=2)c[d]=[a[e],a[e+1]],++d;return c}var g=e.get("Domain"),h=e.get("Range");g&&h||c("No domain or range");var i=g.length/2,j=h.length/2;g=f(g),h=f(h);var k=e.get("Size"),l=e.get("BitsPerSample"),m=e.get("Order")||1;1!==m&&a("No support for cubic spline interpolation: "+m);var n=e.get("Encode");if(!n){n=[];for(var o=0;i>o;++o)n.push(0),n.push(k[o]-1)}n=f(n);var p=e.get("Decode");p=p?f(p):h;var q=this.getSampleArray(k,j,l,d);return[b,i,g,n,p,q,k,j,Math.pow(2,l)-1,h]},constructSampledFromIR:function(a){function b(a,b,c,d,e){return d+(a-b)*((e-d)/(c-b))}return function(c,d,e,f){var g,h,i=a[1],j=a[2],k=a[3],l=a[4],m=a[5],n=a[6],o=a[7],p=a[9],q=1<h;h++)r[h]=1;var t=o,u=1;for(g=0;i>g;++g){var v=j[g][0],w=j[g][1],x=Math.min(Math.max(c[d+g],v),w),y=b(x,v,w,k[g][0],k[g][1]),z=n[g];y=Math.min(Math.max(y,0),z-1);var A=z-1>y?Math.floor(y):y-1,B=A+1-y,C=y-A,D=A*t,E=D+t;for(h=0;q>h;h++)h&u?(r[h]*=C,s[h]+=E):(r[h]*=B,s[h]+=D);t*=z,u<<=1}for(h=0;o>h;++h){var F=0;for(g=0;q>g;g++)F+=m[s[g]+h]*r[g];F=b(F,0,1,l[h][0],l[h][1]),e[f+h]=Math.min(Math.max(F,p[h][0]),p[h][1])}}},constructInterpolated:function(a,b){var e=b.get("C0")||[0],f=b.get("C1")||[1],g=b.get("N");C(e)&&C(f)||c("Illegal dictionary for interpolated function");for(var h=e.length,i=[],j=0;h>j;++j)i.push(f[j]-e[j]);return[d,e,i,g]},constructInterpolatedFromIR:function(a){var b=a[1],c=a[2],d=a[3],e=c.length;return function(a,f,g,h){for(var i=1===d?a[f]:Math.pow(a[f],d),j=0;e>j;++j)g[h+j]=b[j]+i*c[j]}},constructStiched:function(a,b,d){var f=b.get("Domain");f||c("No domain");var g=f.length/2;1!==g&&c("Bad domain for stiched function");for(var h=b.get("Functions"),i=[],j=0,k=h.length;k>j;++j)i.push(Ta.getIR(d,d.fetchIfRef(h[j])));var l=b.get("Bounds"),m=b.get("Encode");return[e,f,l,m,i]},constructStichedFromIR:function(a){for(var b=a[1],c=a[2],d=a[3],e=a[4],f=[],g=new Float32Array(1),h=0,i=e.length;i>h;h++)f.push(Ta.fromIR(e[h]));return function(a,e,h,i){for(var j=function(a,b,c){return a>c?a=c:b>a&&(a=b),a},k=j(a[e],b[0],b[1]),l=0,m=c.length;m>l&&!(k0&&(n=c[l-1]);var o=b[1];l>1,h=c.length>>1,i=new Va(e),j={},k=8192,l=k,m=new Float32Array(h);return function(a,b,c,e){var f,k,n="",o=m;for(f=0;h>f;f++)k=a[b+f],o[f]=k,n+=k+"_";var p=j[n];if(void 0!==p)return void c.set(p,e);var q=new Float32Array(g),r=i.execute(o),s=r.length-g;for(f=0;g>f;f++){k=r[s+f];var t=d[2*f];t>k?k=t:(t=d[2*f+1],k>t&&(k=t)),q[f]=k}l>0&&(l--,j[n]=q),c.set(q,e)}}}}(),Ua=function(){function a(a){this.stack=a?Array.prototype.slice.call(a,0):[]}var b=100;return a.prototype={push:function(a){this.stack.length>=b&&c("PostScript function stack overflow."),this.stack.push(a)},pop:function(){return this.stack.length<=0&&c("PostScript function stack underflow."),this.stack.pop()},copy:function(a){this.stack.length+a>=b&&c("PostScript function stack overflow.");for(var d=this.stack,e=d.length-a,f=a-1;f>=0;f--,e++)d.push(d[e])},index:function(a){this.push(this.stack[this.stack.length-a-1])},roll:function(a,b){var c,d,e,f=this.stack,g=f.length-a,h=f.length-1,i=g+(b-Math.floor(b/a)*a);for(c=g,d=h;d>c;c++,d--)e=f[c],f[c]=f[d],f[d]=e;for(c=g,d=i-1;d>c;c++,d--)e=f[c],f[c]=f[d],f[d]=e;for(c=i,d=h;d>c;c++,d--)e=f[c],f[c]=f[d],f[d]=e}},a}(),Va=function(){function a(a){this.operators=a}return a.prototype={execute:function(a){for(var b,d,e,f=new Ua(a),g=0,h=this.operators,i=h.length;i>g;)if(b=h[g++],"number"!=typeof b)switch(b){case"jz":e=f.pop(),d=f.pop(),d||(g=e);break;case"j":d=f.pop(),g=d;break;case"abs":d=f.pop(),f.push(Math.abs(d));break;case"add":e=f.pop(),d=f.pop(),f.push(d+e);break;case"and":e=f.pop(),d=f.pop(),v(d)&&v(e)?f.push(d&&e):f.push(d&e);break;case"atan":d=f.pop(),f.push(Math.atan(d));break;case"bitshift":e=f.pop(),d=f.pop(),d>0?f.push(d<>e);break;case"ceiling":d=f.pop(),f.push(Math.ceil(d));break;case"copy":d=f.pop(),f.copy(d);break;case"cos":d=f.pop(),f.push(Math.cos(d));break;case"cvi":d=0|f.pop(),f.push(d);break;case"cvr":break;case"div":e=f.pop(),d=f.pop(),f.push(d/e);break;case"dup":f.copy(1);break;case"eq":e=f.pop(),d=f.pop(),f.push(d===e);break;case"exch":f.roll(2,1);break;case"exp":e=f.pop(),d=f.pop(),f.push(Math.pow(d,e));break;case"false":f.push(!1);break;case"floor":d=f.pop(),f.push(Math.floor(d));break;case"ge":e=f.pop(),d=f.pop(),f.push(d>=e);break;case"gt":e=f.pop(),d=f.pop(),f.push(d>e);break;case"idiv":e=f.pop(),d=f.pop(),f.push(d/e|0);break;case"index":d=f.pop(),f.index(d);break;case"le":e=f.pop(),d=f.pop(),f.push(e>=d);break;case"ln":d=f.pop(),f.push(Math.log(d));break;case"log":d=f.pop(),f.push(Math.log(d)/Math.LN10);break;case"lt":e=f.pop(),d=f.pop(),f.push(e>d);break;case"mod":e=f.pop(),d=f.pop(),f.push(d%e);break;case"mul":e=f.pop(),d=f.pop(),f.push(d*e);break;case"ne":e=f.pop(),d=f.pop(),f.push(d!==e);break;case"neg":d=f.pop(),f.push(-d);break;case"not":d=f.pop(),v(d)?f.push(!d):f.push(~d);break;case"or":e=f.pop(),d=f.pop(),v(d)&&v(e)?f.push(d||e):f.push(d|e);break;case"pop":f.pop();break;case"roll":e=f.pop(),d=f.pop(),f.roll(d,e);break;case"round":d=f.pop(),f.push(Math.round(d));break;case"sin":d=f.pop(),f.push(Math.sin(d));break;case"sqrt":d=f.pop(),f.push(Math.sqrt(d));break;case"sub":e=f.pop(),d=f.pop(),f.push(d-e);break;case"true":f.push(!0);break;case"truncate":d=f.pop(),d=0>d?Math.ceil(d):Math.floor(d),f.push(d);break;case"xor":e=f.pop(),d=f.pop(),v(d)&&v(e)?f.push(d!==e):f.push(d^e);break;default:c("Unknown operator "+b)}else f.push(b);return f.stack}},a}(),Wa=function(){function a(a){this.type=a}function b(b,c,d){a.call(this,"args"),this.index=b,this.min=c,this.max=d}function c(b){a.call(this,"literal"),this.number=b,this.min=b,this.max=b}function d(b,c,d,e,f){a.call(this,"binary"),this.op=b,this.arg1=c,this.arg2=d,this.min=e,this.max=f}function e(b,c){a.call(this,"max"),this.arg=b,this.min=b.min,this.max=c}function f(b,c,d){a.call(this,"var"),this.index=b,this.min=c,this.max=d}function g(b,c){a.call(this,"definition"),this.variable=b,this.arg=c}function h(){this.parts=[]}function i(a,b){return"literal"===b.type&&0===b.number?a:"literal"===a.type&&0===a.number?b:"literal"===b.type&&"literal"===a.type?new c(a.number+b.number):new d("+",a,b,a.min+b.min,a.max+b.max)}function j(a,b){if("literal"===b.type){if(0===b.number)return new c(0);if(1===b.number)return a;if("literal"===a.type)return new c(a.number*b.number)}if("literal"===a.type){if(0===a.number)return new c(0);if(1===a.number)return b}var e=Math.min(a.min*b.min,a.min*b.max,a.max*b.min,a.max*b.max),f=Math.max(a.min*b.min,a.min*b.max,a.max*b.min,a.max*b.max);return new d("*",a,b,e,f)}function k(a,b){if("literal"===b.type){if(0===b.number)return a;if("literal"===a.type)return new c(a.number-b.number)}return"binary"===b.type&&"-"===b.op&&"literal"===a.type&&1===a.number&&"literal"===b.arg1.type&&1===b.arg1.number?b.arg2:new d("-",a,b,a.min-b.max,a.max-b.min)}function l(a,b){return a.min>=b?new c(b):a.max<=b?a:new e(a,b)}function m(){}return a.prototype.visit=function(a){throw new Error("abstract method")},b.prototype=Object.create(a.prototype),b.prototype.visit=function(a){a.visitArgument(this)},c.prototype=Object.create(a.prototype),c.prototype.visit=function(a){a.visitLiteral(this)},d.prototype=Object.create(a.prototype),d.prototype.visit=function(a){a.visitBinaryOperation(this)},e.prototype=Object.create(a.prototype),e.prototype.visit=function(a){a.visitMin(this)},f.prototype=Object.create(a.prototype),f.prototype.visit=function(a){a.visitVariable(this)},g.prototype=Object.create(a.prototype),g.prototype.visit=function(a){a.visitVariableDefinition(this)},h.prototype={visitArgument:function(a){this.parts.push("Math.max(",a.min,", Math.min(",a.max,", src[srcOffset + ",a.index,"]))")},visitVariable:function(a){this.parts.push("v",a.index)},visitLiteral:function(a){this.parts.push(a.number)},visitBinaryOperation:function(a){this.parts.push("("),a.arg1.visit(this),this.parts.push(" ",a.op," "),a.arg2.visit(this),this.parts.push(")")},visitVariableDefinition:function(a){this.parts.push("var "),a.variable.visit(this),this.parts.push(" = "),a.arg.visit(this),this.parts.push(";")},visitMin:function(a){this.parts.push("Math.min("),a.arg.visit(this),this.parts.push(", ",a.max,")")},toString:function(){return this.parts.join("")}},m.prototype={compile:function(a,d,e){var m,n,o,p,q,r,s,t,u,v,w=[],x=[],y=d.length>>1,z=e.length>>1,A=0;for(m=0;y>m;m++)w.push(new b(m,d[2*m],d[2*m+1]));for(m=0,n=a.length;n>m;m++)if(v=a[m],"number"!=typeof v)switch(v){case"add":if(w.length<2)return null;r=w.pop(),q=w.pop(),w.push(i(q,r));break;case"cvr":if(w.length<1)return null;break;case"mul":if(w.length<2)return null;r=w.pop(),q=w.pop(),w.push(j(q,r));break;case"sub":if(w.length<2)return null;r=w.pop(),q=w.pop(),w.push(k(q,r));break;case"exch":if(w.length<2)return null;s=w.pop(),t=w.pop(),w.push(s,t);break;case"pop":if(w.length<1)return null;w.pop();break;case"index":if(w.length<1)return null;if(q=w.pop(),"literal"!==q.type)return null;if(o=q.number,0>o||(0|o)!==o||w.length=o||(0|o)!==o||(0|p)!==p||w.lengtha.min&&(g.unshift("Math.max(",d,", "),g.push(")")),fn&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){var p,q=8>=g?new Uint8Array(n):new Uint16Array(n);for(j=0;n>j;j++)q[j]=j;var r=new Uint8Array(3*n);this.getRgbBuffer(q,0,n,r,0,g,0);var s,t;if(o)for(m=new Uint8Array(3*l),t=0,j=0;l>j;++j)p=3*h[j],m[t++]=r[p],m[t++]=r[p+1],m[t++]=r[p+2];else for(s=0,j=0;l>j;++j)p=3*h[j],a[s++]=r[p],a[s++]=r[p+1],a[s++]=r[p+2],s+=i}else o?(m=new Uint8Array(3*l),this.getRgbBuffer(h,0,l,m,0,g,0)):this.getRgbBuffer(h,0,d*f,a,0,g,i);if(m)if(o)Bc.resize(m,g,3,b,c,d,e,a,i);else for(t=0,s=0,j=0,k=d*f;k>j;j++)a[s++]=m[t++],a[s++]=m[t++],a[s++]=m[t++],s+=i},usesZeroToOneRange:!0},a.parse=function(b,c,d){var e=a.parseToIR(b,c,d);return e instanceof Ya?e:a.fromIR(e)},a.fromIR=function(b){var d,e,f,g=C(b)?b[0]:b;switch(g){case"DeviceGrayCS":return this.singletons.gray;case"DeviceRgbCS":return this.singletons.rgb;case"DeviceCmykCS":return this.singletons.cmyk;case"CalGrayCS":return d=b[1].WhitePoint,e=b[1].BlackPoint,f=b[1].Gamma,new cb(d,e,f);case"CalRGBCS":d=b[1].WhitePoint,e=b[1].BlackPoint,f=b[1].Gamma;var h=b[1].Matrix;return new db(d,e,f,h);case"PatternCS":var i=b[1];return i&&(i=a.fromIR(i)),new Za(i);case"IndexedCS":var j=b[1],k=b[2],l=b[3];return new $a(a.fromIR(j),k,l);case"AlternateCS":var m=b[1],n=b[2],o=b[3];return new Ya(m,a.fromIR(n),Ta.fromIR(o));case"LabCS":d=b[1].WhitePoint,e=b[1].BlackPoint;var p=b[1].Range;return new eb(d,e,p);default:c("Unknown name "+g)}return null},a.parseToIR=function(d,e,f){if(z(d)){var g=f.get("ColorSpace");if(B(g)){var h=g.get(d.name);h&&(d=h)}}d=e.fetchIfRef(d);var i;if(z(d))switch(i=d.name,this.mode=i,i){case"DeviceGray":case"G":return"DeviceGrayCS";case"DeviceRGB":case"RGB":return"DeviceRgbCS";case"DeviceCMYK":case"CMYK":return"DeviceCmykCS";case"Pattern":return["PatternCS",null];default:c("unrecognized colorspace "+i)}else if(C(d)){i=e.fetchIfRef(d[0]).name,this.mode=i;var j,k,l;switch(i){case"DeviceGray":case"G":return"DeviceGrayCS";case"DeviceRGB":case"RGB":return"DeviceRgbCS";case"DeviceCMYK":case"CMYK":return"DeviceCmykCS";case"CalGray":return k=e.fetchIfRef(d[1]).getAll(),["CalGrayCS",k];case"CalRGB":return k=e.fetchIfRef(d[1]).getAll(),["CalRGBCS",k];case"ICCBased":var m=e.fetchIfRef(d[1]),n=m.dict;if(j=n.get("N"),l=n.get("Alternate")){var o=a.parseToIR(l,e,f),p=a.fromIR(o);if(p.numComps===j)return o;b("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(1===j)return"DeviceGrayCS";if(3===j)return"DeviceRgbCS";if(4===j)return"DeviceCmykCS";break;case"Pattern":var q=d[1]||null;return q&&(q=a.parseToIR(q,e,f)),["PatternCS",q];case"Indexed":case"I":var r=a.parseToIR(d[1],e,f),s=e.fetchIfRef(d[2])+1,t=e.fetchIfRef(d[3]);return D(t)&&(t=t.getBytes()),["IndexedCS",r,s,t];case"Separation":case"DeviceN":var u=e.fetchIfRef(d[1]);j=1,z(u)?j=1:C(u)&&(j=u.length),l=a.parseToIR(d[2],e,f);var v=Ta.getIR(e,e.fetchIfRef(d[3]));return["AlternateCS",j,l,v];case"Lab":return k=e.fetchIfRef(d[1]).getAll(),["LabCS",k];default:c('unimplemented color space object "'+i+'"')}}else c('unrecognized color space object: "'+d+'"');return null},a.isDefaultDecode=function(a,c){if(!C(a))return!0;if(2*c!==a.length)return b("The decode map is not the correct length"),!0;for(var d=0,e=a.length;e>d;d+=2)if(0!==a[d]||1!==a[d+1])return!1;return!0},a.singletons={get gray(){return g(this,"gray",new _a)},get rgb(){return g(this,"rgb",new ab)},get cmyk(){return g(this,"cmyk",new bb)}},a}(),Ya=function(){function a(a,b,c){this.name="Alternate",this.numComps=a,this.defaultColor=new Float32Array(a);for(var d=0;a>d;++d)this.defaultColor[d]=1;this.base=b,this.tintFn=c,this.tmpBuf=new Float32Array(b.numComps)}return a.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){var e=this.tmpBuf;this.tintFn(a,b,e,0),this.base.getRgbItem(e,0,c,d)},getRgbBuffer:function(a,b,c,d,e,f,g){var h,i,j=this.tintFn,k=this.base,l=1/((1<h;h++){for(i=0;r>i;i++)s[i]=a[b++]*l;for(j(s,0,t,0),i=0;m>i;i++)q[p++]=255*t[i]}else for(h=0;c>h;h++){for(i=0;r>i;i++)s[i]=a[b++]*l;j(s,0,t,0),k.getRgbItem(t,0,q,p),p+=m}o||k.getRgbBuffer(q,0,c,d,e,8,g)},getOutputLength:function(a,b){return this.base.getOutputLength(a*this.base.numComps/this.numComps,b)},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},a}(),Za=function(){function a(a){this.name="Pattern",this.base=a}return a.prototype={},a}(),$a=function(){function a(a,b,d){this.name="Indexed",this.numComps=1,this.defaultColor=new Uint8Array([0]),this.base=a,this.highVal=b;var e,f=a.numComps,g=f*b;if(D(d)){e=new Uint8Array(g);var h=d.getBytes(g);e.set(h)}else if(y(d)){e=new Uint8Array(g);for(var i=0;g>i;++i)e[i]=d.charCodeAt(i)}else d instanceof Uint8Array||d instanceof Array?e=d:c("Unrecognized lookup table: "+d);this.lookup=e}return a.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){var e=this.base.numComps,f=a[b]*e;this.base.getRgbItem(this.lookup,f,c,d)},getRgbBuffer:function(a,b,c,d,e,f,g){for(var h=this.base,i=h.numComps,j=h.getOutputLength(i,g),k=this.lookup,l=0;c>l;++l){var m=a[b++]*i;h.getRgbBuffer(k,m,1,d,e,8,g),e+=j}},getOutputLength:function(a,b){return this.base.getOutputLength(a*this.base.numComps,b)},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return!0},usesZeroToOneRange:!0},a}(),_a=function(){function a(){this.name="DeviceGray",this.numComps=1,this.defaultColor=new Float32Array([0])}return a.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){var e=255*a[b]|0;e=0>e?0:e>255?255:e,c[d]=c[d+1]=c[d+2]=e},getRgbBuffer:function(a,b,c,d,e,f,g){for(var h=255/((1<k;++k){var l=h*a[i++]|0;d[j++]=l,d[j++]=l,d[j++]=l,j+=g}},getOutputLength:function(a,b){return a*(3+b)},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},a}(),ab=function(){function a(){this.name="DeviceRGB",this.numComps=3,this.defaultColor=new Float32Array([0,0,0])}return a.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){var e=255*a[b]|0,f=255*a[b+1]|0,g=255*a[b+2]|0;c[d]=0>e?0:e>255?255:e,c[d+1]=0>f?0:f>255?255:f,c[d+2]=0>g?0:g>255?255:g},getRgbBuffer:function(a,b,c,d,e,f,g){if(8===f&&0===g)return void d.set(a.subarray(b,b+3*c),e);for(var h=255/((1<k;++k)d[j++]=h*a[i++]|0,d[j++]=h*a[i++]|0,d[j++]=h*a[i++]|0,j+=g},getOutputLength:function(a,b){return a*(3+b)/3|0},isPassthrough:function(a){return 8===a},fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},a}(),bb=function(){function a(a,b,c,d,e){var f=a[b+0]*c,g=a[b+1]*c,h=a[b+2]*c,i=a[b+3]*c,j=f*(-4.387332384609988*f+54.48615194189176*g+18.82290502165302*h+212.25662451639585*i+-285.2331026137004)+g*(1.7149763477362134*g-5.6096736904047315*h+-17.873870861415444*i-5.497006427196366)+h*(-2.5217340131683033*h-21.248923337353073*i+17.5119270841813)+i*(-21.86122147463605*i-189.48180835922747)+255|0,k=f*(8.841041422036149*f+60.118027045597366*g+6.871425592049007*h+31.159100130055922*i+-79.2970844816548)+g*(-15.310361306967817*g+17.575251261109482*h+131.35250912493976*i-190.9453302588951)+h*(4.444339102852739*h+9.8632861493405*i-24.86741582555878)+i*(-20.737325471181034*i-187.80453709719578)+255|0,l=f*(.8842522430003296*f+8.078677503112928*g+30.89978309703729*h-.23883238689178934*i+-14.183576799673286)+g*(10.49593273432072*g+63.02378494754052*h+50.606957656360734*i-112.23884253719248)+h*(.03296041114873217*h+115.60384449646641*i+-193.58209356861505)+i*(-22.33816807309886*i-180.12613974708367)+255|0;d[e]=j>255?255:0>j?0:j,d[e+1]=k>255?255:0>k?0:k,d[e+2]=l>255?255:0>l?0:l}function b(){this.name="DeviceCMYK",this.numComps=4,this.defaultColor=new Float32Array([0,0,0,1])}return b.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(b,c,d,e){a(b,c,1,d,e)},getRgbBuffer:function(b,c,d,e,f,g,h){for(var i=1/((1<j;j++)a(b,c,i,e,f),c+=4,f+=3+h},getOutputLength:function(a,b){return a/4*(3+b)|0},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},b}(),cb=function(){function d(d,e,f){this.name="CalGray",this.numComps=1,this.defaultColor=new Float32Array([0]),d||c("WhitePoint missing - required for color space CalGray"),e=e||[0,0,0],f=f||1,this.XW=d[0],this.YW=d[1],this.ZW=d[2],this.XB=e[0],this.YB=e[1],this.ZB=e[2],this.G=f,(this.XW<0||this.ZW<0||1!==this.YW)&&c("Invalid WhitePoint components for "+this.name+", no fallback available"),(this.XB<0||this.YB<0||this.ZB<0)&&(a("Invalid BlackPoint for "+this.name+", falling back to default"),this.XB=this.YB=this.ZB=0),(0!==this.XB||0!==this.YB||0!==this.ZB)&&b(this.name+", BlackPoint: XB: "+this.XB+", YB: "+this.YB+", ZB: "+this.ZB+", only default values are supported."),this.G<1&&(a("Invalid Gamma: "+this.G+" for "+this.name+", falling back to default"),this.G=1)}function e(a,b,c,d,e,f){var g=b[c]*f,h=Math.pow(g,a.G),i=a.YW*h,j=0|Math.max(295.8*Math.pow(i,.3333333333333333)-40.8,0);d[e]=j,d[e+1]=j,d[e+2]=j}return d.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){e(this,a,b,c,d,1)},getRgbBuffer:function(a,b,c,d,f,g,h){for(var i=1/((1<j;++j)e(this,a,b,d,f,i),b+=1,f+=3+h},getOutputLength:function(a,b){return a*(3+b)},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},d}(),db=function(){function b(b,d,e,f){this.name="CalRGB",this.numComps=3,this.defaultColor=new Float32Array(3),b||c("WhitePoint missing - required for color space CalRGB"),d=d||new Float32Array(3),e=e||new Float32Array([1,1,1]),f=f||new Float32Array([1,0,0,0,1,0,0,0,1]);var g=b[0],h=b[1],i=b[2];this.whitePoint=b;var j=d[0],k=d[1],l=d[2];this.blackPoint=d,this.GR=e[0],this.GG=e[1],this.GB=e[2],this.MXA=f[0],this.MYA=f[1],this.MZA=f[2],this.MXB=f[3],this.MYB=f[4],this.MZB=f[5],this.MXC=f[6],this.MYC=f[7],this.MZC=f[8],(0>g||0>i||1!==h)&&c("Invalid WhitePoint components for "+this.name+", no fallback available"),(0>j||0>k||0>l)&&(a("Invalid BlackPoint for "+this.name+" ["+j+", "+k+", "+l+"], falling back to default"),this.blackPoint=new Float32Array(3)),(this.GR<0||this.GG<0||this.GB<0)&&(a("Invalid Gamma ["+this.GR+", "+this.GG+", "+this.GB+"] for "+this.name+", falling back to default"),this.GR=this.GG=this.GB=1),(this.MXA<0||this.MYA<0||this.MZA<0||this.MXB<0||this.MYB<0||this.MZB<0||this.MXC<0||this.MYC<0||this.MZC<0)&&(a("Invalid Matrix for "+this.name+" ["+this.MXA+", "+this.MYA+", "+this.MZA+this.MXB+", "+this.MYB+", "+this.MZB+this.MXC+", "+this.MYC+", "+this.MZC+"], falling back to default"),this.MXA=this.MYB=this.MZC=1,this.MXB=this.MYA=this.MZA=this.MXC=this.MYC=this.MZB=0)}function d(a,b,c){c[0]=a[0]*b[0]+a[1]*b[1]+a[2]*b[2],c[1]=a[3]*b[0]+a[4]*b[1]+a[5]*b[2],c[2]=a[6]*b[0]+a[7]*b[1]+a[8]*b[2]}function e(a,b,c){c[0]=1*b[0]/a[0],c[1]=1*b[1]/a[1],c[2]=1*b[2]/a[2]}function f(a,b,c){var d=.95047,e=1,f=1.08883;c[0]=b[0]*d/a[0],c[1]=b[1]*e/a[1],c[2]=b[2]*f/a[2]}function g(a){return.0031308>=a?h(0,1,12.92*a):h(0,1,1.055*Math.pow(a,1/2.4)-.055)}function h(a,b,c){return Math.max(a,Math.min(b,c))}function i(a){return 0>a?-i(-a):a>8?Math.pow((a+16)/116,3):a*u}function j(a,b,c){if(0===a[0]&&0===a[1]&&0===a[2])return c[0]=b[0],c[1]=b[1],void(c[2]=b[2]);var d=i(0),e=d,f=i(a[0]),g=d,h=i(a[1]),j=d,k=i(a[2]),l=(1-e)/(1-f),m=1-l,n=(1-g)/(1-h),o=1-n,p=(1-j)/(1-k),q=1-p;c[0]=b[0]*l+m,c[1]=b[1]*n+o,c[2]=b[2]*p+q}function k(a,b,c){if(1===a[0]&&1===a[2])return c[0]=b[0],c[1]=b[1],void(c[2]=b[2]);var f=c;d(n,b,f);var g=r;e(a,f,g),d(o,g,c)}function l(a,b,c){var e=c;d(n,b,e);var g=r;f(a,e,g),d(o,g,c)}function m(a,b,c,e,f,i){var m=h(0,1,b[c]*i),n=h(0,1,b[c+1]*i),o=h(0,1,b[c+2]*i),r=Math.pow(m,a.GR),u=Math.pow(n,a.GG),v=Math.pow(o,a.GB),w=a.MXA*r+a.MXB*u+a.MXC*v,x=a.MYA*r+a.MYB*u+a.MYC*v,y=a.MZA*r+a.MZB*u+a.MZC*v,z=s;z[0]=w,z[1]=x,z[2]=y;var A=t;k(a.whitePoint,z,A);var B=s;j(a.blackPoint,A,B);var C=t;l(q,B,C);var D=s;d(p,C,D);var E=g(D[0]),F=g(D[1]),G=g(D[2]);e[f]=Math.round(255*E),e[f+1]=Math.round(255*F),e[f+2]=Math.round(255*G)}var n=new Float32Array([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296]),o=new Float32Array([.9869929,-.1470543,.1599627,.4323053,.5183603,.0492912,-.0085287,.0400428,.9684867]),p=new Float32Array([3.2404542,-1.5371385,-.4985314,-.969266,1.8760108,.041556,.0556434,-.2040259,1.0572252]),q=new Float32Array([1,1,1]),r=new Float32Array(3),s=new Float32Array(3),t=new Float32Array(3),u=Math.pow(24/116,3)/8;return b.prototype={getRgb:function(a,b){var c=new Uint8Array(3); +return this.getRgbItem(a,b,c,0),c},getRgbItem:function(a,b,c,d){m(this,a,b,c,d,1)},getRgbBuffer:function(a,b,c,d,e,f,g){for(var h=1/((1<i;++i)m(this,a,b,d,e,h),b+=3,e+=3+g},getOutputLength:function(a,b){return a*(3+b)/3|0},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},b}(),eb=function(){function b(b,d,e){this.name="Lab",this.numComps=3,this.defaultColor=new Float32Array([0,0,0]),b||c("WhitePoint missing - required for color space Lab"),d=d||[0,0,0],e=e||[-100,100,-100,100],this.XW=b[0],this.YW=b[1],this.ZW=b[2],this.amin=e[0],this.amax=e[1],this.bmin=e[2],this.bmax=e[3],this.XB=d[0],this.YB=d[1],this.ZB=d[2],(this.XW<0||this.ZW<0||1!==this.YW)&&c("Invalid WhitePoint components, no fallback available"),(this.XB<0||this.YB<0||this.ZB<0)&&(a("Invalid BlackPoint, falling back to default"),this.XB=this.YB=this.ZB=0),(this.amin>this.amax||this.bmin>this.bmax)&&(a("Invalid Range, falling back to defaults"),this.amin=-100,this.amax=100,this.bmin=-100,this.bmax=100)}function d(a){return a>=6/29?a*a*a:108/841*(a-4/29)}function e(a,b,c,d){return c+a*(d-c)/b}function f(a,b,c,f,g,h){var i=b[c],j=b[c+1],k=b[c+2];f!==!1&&(i=e(i,f,0,100),j=e(j,f,a.amin,a.amax),k=e(k,f,a.bmin,a.bmax)),j=j>a.amax?a.amax:ja.bmax?a.bmax:k=l?0:l>=1?255:255*Math.sqrt(l)|0,g[h+1]=0>=m?0:m>=1?255:255*Math.sqrt(m)|0,g[h+2]=0>=n?0:n>=1?255:255*Math.sqrt(n)|0}return b.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){f(this,a,b,!1,c,d)},getRgbBuffer:function(a,b,c,d,e,g,h){for(var i=(1<j;j++)f(this,a,b,i,d,e),b+=3,e+=3+h},getOutputLength:function(a,b){return a*(3+b)/3|0},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return!0},usesZeroToOneRange:!1},b}(),fb=function(){function a(a){this.a=0,this.b=0;var b,c,d=new Uint8Array(256),e=0,f=a.length;for(b=0;256>b;++b)d[b]=b;for(b=0;256>b;++b)c=d[b],e=e+c+a[b%f]&255,d[b]=d[e],d[e]=c;this.s=d}return a.prototype={encryptBlock:function(a){var b,c,d,e=a.length,f=this.a,g=this.b,h=this.s,i=new Uint8Array(e);for(b=0;e>b;++b)f=f+1&255,c=h[f],g=g+c&255,d=h[g],h[f]=d,h[g]=c,i[b]=a[b]^h[c+d&255];return this.a=f,this.b=g,i}},a.prototype.decryptBlock=a.prototype.encryptBlock,a}(),gb=function(){function a(a,d,e){var f,g,h,i=1732584193,j=-271733879,k=-1732584194,l=271733878,m=e+72&-64,n=new Uint8Array(m);for(f=0;e>f;++f)n[f]=a[d++];for(n[f++]=128,h=m-8;h>f;)n[f++]=0;n[f++]=e<<3&255,n[f++]=e>>5&255,n[f++]=e>>13&255,n[f++]=e>>21&255,n[f++]=e>>>29&255,n[f++]=0,n[f++]=0,n[f++]=0;var o=new Int32Array(16);for(f=0;m>f;){for(g=0;16>g;++g,f+=4)o[g]=n[f]|n[f+1]<<8|n[f+2]<<16|n[f+3]<<24;var p,q,r=i,s=j,t=k,u=l;for(g=0;64>g;++g){16>g?(p=s&t|~s&u,q=g):32>g?(p=u&s|~u&t,q=5*g+1&15):48>g?(p=s^t^u,q=3*g+5&15):(p=t^(s|~u),q=7*g&15);var v=u,w=r+p+c[g]+o[q]|0,x=b[g];u=t,t=s,s=s+(w<>>32-x)|0,r=v}i=i+r|0,j=j+s|0,k=k+t|0,l=l+u|0}return new Uint8Array([255&i,i>>8&255,i>>16&255,i>>>24&255,255&j,j>>8&255,j>>16&255,j>>>24&255,255&k,k>>8&255,k>>16&255,k>>>24&255,255&l,l>>8&255,l>>16&255,l>>>24&255])}var b=new Uint8Array([7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21]),c=new Int32Array([-680876936,-389564586,606105819,-1044525330,-176418897,1200080426,-1473231341,-45705983,1770035416,-1958414417,-42063,-1990404162,1804603682,-40341101,-1502002290,1236535329,-165796510,-1069501632,643717713,-373897302,-701558691,38016083,-660478335,-405537848,568446438,-1019803690,-187363961,1163531501,-1444681467,-51403784,1735328473,-1926607734,-378558,-2022574463,1839030562,-35309556,-1530992060,1272893353,-155497632,-1094730640,681279174,-358537222,-722521979,76029189,-640364487,-421815835,530742520,-995338651,-198630844,1126891415,-1416354905,-57434055,1700485571,-1894986606,-1051523,-2054922799,1873313359,-30611744,-1560198380,1309151649,-145523070,-1120210379,718787259,-343485551]);return a}(),hb=function(){function a(a,b){this.high=0|a,this.low=0|b}return a.prototype={and:function(a){this.high&=a.high,this.low&=a.low},xor:function(a){this.high^=a.high,this.low^=a.low},or:function(a){this.high|=a.high,this.low|=a.low},shiftRight:function(a){a>=32?(this.low=this.high>>>a-32|0,this.high=0):(this.low=this.low>>>a|this.high<<32-a,this.high=this.high>>>a|0)},shiftLeft:function(a){a>=32?(this.high=this.low<>>32-a,this.low=this.low<>>a|c<<32-a,this.high=c>>>a|b<<32-a},not:function(){this.high=~this.high,this.low=~this.low},add:function(a){var b=(this.low>>>0)+(a.low>>>0),c=(this.high>>>0)+(a.high>>>0);b>4294967295&&(c+=1),this.low=0|b,this.high=0|c},copyTo:function(a,b){a[b]=this.high>>>24&255,a[b+1]=this.high>>16&255,a[b+2]=this.high>>8&255,a[b+3]=255&this.high,a[b+4]=this.low>>>24&255,a[b+5]=this.low>>16&255,a[b+6]=this.low>>8&255,a[b+7]=255&this.low},assign:function(a){this.high=a.high,this.low=a.low}},a}(),ib=function(){function a(a,b){return a>>>b|a<<32-b}function b(a,b,c){return a&b^~a&c}function c(a,b,c){return a&b^a&c^b&c}function d(b){return a(b,2)^a(b,13)^a(b,22)}function e(b){return a(b,6)^a(b,11)^a(b,25)}function f(b){return a(b,7)^a(b,18)^b>>>3}function g(b){return a(b,17)^a(b,19)^b>>>10}function h(a,h,j){var k,l,m,n=1779033703,o=3144134277,p=1013904242,q=2773480762,r=1359893119,s=2600822924,t=528734635,u=1541459225,v=64*Math.ceil((j+9)/64),w=new Uint8Array(v);for(k=0;j>k;++k)w[k]=a[h++];for(w[k++]=128,m=v-8;m>k;)w[k++]=0;w[k++]=0,w[k++]=0,w[k++]=0,w[k++]=j>>>29&255,w[k++]=j>>21&255,w[k++]=j>>13&255,w[k++]=j>>5&255,w[k++]=j<<3&255;var x=new Uint32Array(64);for(k=0;v>k;){for(l=0;16>l;++l)x[l]=w[k]<<24|w[k+1]<<16|w[k+2]<<8|w[k+3],k+=4;for(l=16;64>l;++l)x[l]=g(x[l-2])+x[l-7]+f(x[l-15])+x[l-16]|0;var y,z,A=n,B=o,C=p,D=q,E=r,F=s,G=t,H=u;for(l=0;64>l;++l)y=H+e(E)+b(E,F,G)+i[l]+x[l],z=d(A)+c(A,B,C),H=G,G=F,F=E,E=D+y|0,D=C,C=B,B=A,A=y+z|0;n=n+A|0,o=o+B|0,p=p+C|0,q=q+D|0,r=r+E|0,s=s+F|0,t=t+G|0,u=u+H|0}return new Uint8Array([n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,p>>24&255,p>>16&255,p>>8&255,255&p,q>>24&255,q>>16&255,q>>8&255,255&q,r>>24&255,r>>16&255,r>>8&255,255&r,s>>24&255,s>>16&255,s>>8&255,255&s,t>>24&255,t>>16&255,t>>8&255,255&t,u>>24&255,u>>16&255,u>>8&255,255&u])}var i=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];return h}(),jb=function(){function a(a,b,c,d,e){a.assign(b),a.and(c),e.assign(b),e.not(),e.and(d),a.xor(e)}function b(a,b,c,d,e){a.assign(b),a.and(c),e.assign(b),e.and(d),a.xor(e),e.assign(c),e.and(d),a.xor(e)}function c(a,b,c){a.assign(b),a.rotateRight(28),c.assign(b),c.rotateRight(34),a.xor(c),c.assign(b),c.rotateRight(39),a.xor(c)}function d(a,b,c){a.assign(b),a.rotateRight(14),c.assign(b),c.rotateRight(18),a.xor(c),c.assign(b),c.rotateRight(41),a.xor(c)}function e(a,b,c){a.assign(b),a.rotateRight(1),c.assign(b),c.rotateRight(8),a.xor(c),c.assign(b),c.shiftRight(7),a.xor(c)}function f(a,b,c){a.assign(b),a.rotateRight(19),c.assign(b),c.rotateRight(61),a.xor(c),c.assign(b),c.shiftRight(6),a.xor(c)}function g(g,i,j,k){k=!!k;var l,m,n,o,p,q,r,s;k?(l=new hb(3418070365,3238371032),m=new hb(1654270250,914150663),n=new hb(2438529370,812702999),o=new hb(355462360,4144912697),p=new hb(1731405415,4290775857),q=new hb(2394180231,1750603025),r=new hb(3675008525,1694076839),s=new hb(1203062813,3204075428)):(l=new hb(1779033703,4089235720),m=new hb(3144134277,2227873595),n=new hb(1013904242,4271175723),o=new hb(2773480762,1595750129),p=new hb(1359893119,2917565137),q=new hb(2600822924,725511199),r=new hb(528734635,4215389547),s=new hb(1541459225,327033209));var t,u,v,w=128*Math.ceil((j+17)/128),x=new Uint8Array(w);for(t=0;j>t;++t)x[t]=g[i++];for(x[t++]=128,v=w-16;v>t;)x[t++]=0;x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=j>>>29&255,x[t++]=j>>21&255,x[t++]=j>>13&255,x[t++]=j>>5&255,x[t++]=j<<3&255;var y=new Array(80);for(t=0;80>t;t++)y[t]=new hb(0,0);var z,A=new hb(0,0),B=new hb(0,0),C=new hb(0,0),D=new hb(0,0),E=new hb(0,0),F=new hb(0,0),G=new hb(0,0),H=new hb(0,0),I=new hb(0,0),J=new hb(0,0),K=new hb(0,0),L=new hb(0,0);for(t=0;w>t;){for(u=0;16>u;++u)y[u].high=x[t]<<24|x[t+1]<<16|x[t+2]<<8|x[t+3],y[u].low=x[t+4]<<24|x[t+5]<<16|x[t+6]<<8|x[t+7],t+=8;for(u=16;80>u;++u)z=y[u],f(z,y[u-2],L),z.add(y[u-7]),e(K,y[u-15],L),z.add(K),z.add(y[u-16]);for(A.assign(l),B.assign(m),C.assign(n),D.assign(o),E.assign(p),F.assign(q),G.assign(r),H.assign(s),u=0;80>u;++u)I.assign(H),d(K,E,L),I.add(K),a(K,E,F,G,L),I.add(K),I.add(h[u]),I.add(y[u]),c(J,A,L),b(K,A,B,C,L),J.add(K),z=H,H=G,G=F,F=E,D.add(I),E=D,D=C,C=B,B=A,z.assign(I),z.add(J),A=z;l.add(A),m.add(B),n.add(C),o.add(D),p.add(E),q.add(F),r.add(G),s.add(H)}var M;return k?(M=new Uint8Array(48),l.copyTo(M,0),m.copyTo(M,8),n.copyTo(M,16),o.copyTo(M,24),p.copyTo(M,32),q.copyTo(M,40)):(M=new Uint8Array(64),l.copyTo(M,0),m.copyTo(M,8),n.copyTo(M,16),o.copyTo(M,24),p.copyTo(M,32),q.copyTo(M,40),r.copyTo(M,48),s.copyTo(M,56)),M}var h=[new hb(1116352408,3609767458),new hb(1899447441,602891725),new hb(3049323471,3964484399),new hb(3921009573,2173295548),new hb(961987163,4081628472),new hb(1508970993,3053834265),new hb(2453635748,2937671579),new hb(2870763221,3664609560),new hb(3624381080,2734883394),new hb(310598401,1164996542),new hb(607225278,1323610764),new hb(1426881987,3590304994),new hb(1925078388,4068182383),new hb(2162078206,991336113),new hb(2614888103,633803317),new hb(3248222580,3479774868),new hb(3835390401,2666613458),new hb(4022224774,944711139),new hb(264347078,2341262773),new hb(604807628,2007800933),new hb(770255983,1495990901),new hb(1249150122,1856431235),new hb(1555081692,3175218132),new hb(1996064986,2198950837),new hb(2554220882,3999719339),new hb(2821834349,766784016),new hb(2952996808,2566594879),new hb(3210313671,3203337956),new hb(3336571891,1034457026),new hb(3584528711,2466948901),new hb(113926993,3758326383),new hb(338241895,168717936),new hb(666307205,1188179964),new hb(773529912,1546045734),new hb(1294757372,1522805485),new hb(1396182291,2643833823),new hb(1695183700,2343527390),new hb(1986661051,1014477480),new hb(2177026350,1206759142),new hb(2456956037,344077627),new hb(2730485921,1290863460),new hb(2820302411,3158454273),new hb(3259730800,3505952657),new hb(3345764771,106217008),new hb(3516065817,3606008344),new hb(3600352804,1432725776),new hb(4094571909,1467031594),new hb(275423344,851169720),new hb(430227734,3100823752),new hb(506948616,1363258195),new hb(659060556,3750685593),new hb(883997877,3785050280),new hb(958139571,3318307427),new hb(1322822218,3812723403),new hb(1537002063,2003034995),new hb(1747873779,3602036899),new hb(1955562222,1575990012),new hb(2024104815,1125592928),new hb(2227730452,2716904306),new hb(2361852424,442776044),new hb(2428436474,593698344),new hb(2756734187,3733110249),new hb(3204031479,2999351573),new hb(3329325298,3815920427),new hb(3391569614,3928383900),new hb(3515267271,566280711),new hb(3940187606,3454069534),new hb(4118630271,4000239992),new hb(116418474,1914138554),new hb(174292421,2731055270),new hb(289380356,3203993006),new hb(460393269,320620315),new hb(685471733,587496836),new hb(852142971,1086792851),new hb(1017036298,365543100),new hb(1126000580,2618297676),new hb(1288033470,3409855158),new hb(1501505948,4234509866),new hb(1607167915,987167468),new hb(1816402316,1246189591)];return g}(),kb=function(){function a(a,b,c){return jb(a,b,c,!0)}return a}(),lb=function(){function a(){}return a.prototype={decryptBlock:function(a){return a}},a}(),mb=function(){function a(a){var b=176,c=new Uint8Array(b);c.set(a);for(var d=16,e=1;b>d;++e){var h=c[d-3],i=c[d-2],j=c[d-1],k=c[d-4];h=g[h],i=g[i],j=g[j],k=g[k],h^=f[e];for(var l=0;4>l;++l)c[d]=h^=c[d-16],d++,c[d]=i^=c[d-16],d++,c[d]=j^=c[d-16],d++,c[d]=k^=c[d-16],d++}return c}function b(a,b){var c=new Uint8Array(16);c.set(a);var d,e,f,g,i,j;for(e=0,f=160;16>e;++e,++f)c[e]^=b[f];for(d=9;d>=1;--d){for(g=c[13],c[13]=c[9],c[9]=c[5],c[5]=c[1],c[1]=g,g=c[14],i=c[10],c[14]=c[6],c[10]=c[2],c[6]=g,c[2]=i,g=c[15],i=c[11],j=c[7],c[15]=c[3],c[11]=g,c[7]=i,c[3]=j,e=0;16>e;++e)c[e]=h[c[e]];for(e=0,f=16*d;16>e;++e,++f)c[e]^=b[f];for(e=0;16>e;e+=4){var l=k[c[e]],m=k[c[e+1]],n=k[c[e+2]],o=k[c[e+3]];g=l^m>>>8^m<<24^n>>>16^n<<16^o>>>24^o<<8,c[e]=g>>>24&255,c[e+1]=g>>16&255,c[e+2]=g>>8&255,c[e+3]=255&g}}for(g=c[13],c[13]=c[9],c[9]=c[5],c[5]=c[1],c[1]=g,g=c[14],i=c[10],c[14]=c[6],c[10]=c[2],c[6]=g,c[2]=i,g=c[15],i=c[11],j=c[7],c[15]=c[3],c[11]=g,c[7]=i,c[3]=j,e=0;16>e;++e)c[e]=h[c[e]],c[e]^=b[e];return c}function c(a,b){var c,d,e,f,h=new Uint8Array(16);for(h.set(a),k=0;16>k;++k)h[k]^=b[k];for(j=1;10>j;j++){for(k=0;16>k;++k)h[k]=g[h[k]];e=h[1],h[1]=h[5],h[5]=h[9],h[9]=h[13],h[13]=e,e=h[2],d=h[6],h[2]=h[10],h[6]=h[14],h[10]=e,h[14]=d,e=h[3],d=h[7],c=h[11],h[3]=h[15],h[7]=e,h[11]=d,h[15]=c;for(var k=0;16>k;k+=4){var l=h[k+0],m=h[k+1],n=h[k+2],o=h[k+3];c=l^m^n^o,h[k+0]^=c^i[l^m],h[k+1]^=c^i[m^n],h[k+2]^=c^i[n^o],h[k+3]^=c^i[o^l]}for(k=0,f=16*j;16>k;++k,++f)h[k]^=b[f]}for(k=0;16>k;++k)h[k]=g[h[k]];for(e=h[1],h[1]=h[5],h[5]=h[9],h[9]=h[13],h[13]=e,e=h[2],d=h[6],h[2]=h[10],h[6]=h[14],h[10]=e,h[14]=d,e=h[3],d=h[7],c=h[11],h[3]=h[15],h[7]=e,h[11]=d,h[15]=c,k=0,f=160;16>k;++k,++f)h[k]^=b[f];return h}function d(b){this.key=a(b),this.buffer=new Uint8Array(16),this.bufferPosition=0}function e(a,c){var d,e,f,g=a.length,h=this.buffer,i=this.bufferPosition,j=[],k=this.iv;for(d=0;g>d;++d)if(h[i]=a[d],++i,!(16>i)){var l=b(h,this.key);for(e=0;16>e;++e)l[e]^=k[e];k=h,j.push(l),h=new Uint8Array(16),i=0}if(this.buffer=h,this.bufferLength=i,this.iv=k,0===j.length)return new Uint8Array([]);var m=16*j.length;if(c){var n=j[j.length-1],o=n[15];if(16>=o){for(d=15,f=16-o;d>=f;--d)if(n[d]!==o){o=0;break}m-=o,j[j.length-1]=n.subarray(0,16-o)}}var p=new Uint8Array(m);for(d=0,e=0,f=j.length;f>d;++d,e+=16)p.set(j[d],e);return p}for(var f=new Uint8Array([141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141]),g=new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22]),h=new Uint8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]),i=new Uint8Array(256),j=0;256>j;j++)128>j?i[j]=j<<1:i[j]=j<<1^27;var k=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]);return d.prototype={decryptBlock:function(a,b){var c,d=a.length,f=this.buffer,g=this.bufferPosition;for(c=0;16>g&&d>c;++c,++g)f[g]=a[c];return 16>g?(this.bufferLength=g,new Uint8Array([])):(this.iv=f,this.buffer=new Uint8Array(16),this.bufferLength=0,this.decryptBlock=e,this.decryptBlock(a.subarray(16),b))},encrypt:function(a,b){var d,e,f,g=a.length,h=this.buffer,i=this.bufferPosition,j=[];for(b||(b=new Uint8Array(16)),d=0;g>d;++d)if(h[i]=a[d],++i,!(16>i)){for(e=0;16>e;++e)h[e]^=b[e];var k=c(h,this.key);b=k,j.push(k),h=new Uint8Array(16),i=0}if(this.buffer=h,this.bufferLength=i,this.iv=b,0===j.length)return new Uint8Array([]);var l=16*j.length,m=new Uint8Array(l);for(d=0,e=0,f=j.length;f>d;++d,e+=16)m.set(j[d],e);return m}},d}(),nb=function(){function a(a){var b=240,c=new Uint8Array(b),d=1;c.set(a);for(var e=32,g=1;b>e;++g){if(e%32===16)h=f[h],i=f[i],j=f[j],k=f[k];else if(e%32===0){var h=c[e-3],i=c[e-2],j=c[e-1],k=c[e-4];h=f[h],i=f[i],j=f[j],k=f[k],h^=d,(d<<=1)>=256&&(d=255&(27^d))}for(var l=0;4>l;++l)c[e]=h^=c[e-32],e++,c[e]=i^=c[e-32],e++,c[e]=j^=c[e-32],e++,c[e]=k^=c[e-32],e++}return c}function b(a,b){var c=new Uint8Array(16);c.set(a);var d,e,f,h,i,k;for(e=0,f=224;16>e;++e,++f)c[e]^=b[f];for(d=13;d>=1;--d){for(h=c[13],c[13]=c[9],c[9]=c[5],c[5]=c[1],c[1]=h,h=c[14],i=c[10],c[14]=c[6],c[10]=c[2],c[6]=h,c[2]=i,h=c[15],i=c[11],k=c[7],c[15]=c[3],c[11]=h,c[7]=i,c[3]=k,e=0;16>e;++e)c[e]=g[c[e]];for(e=0,f=16*d;16>e;++e,++f)c[e]^=b[f];for(e=0;16>e;e+=4){var l=j[c[e]],m=j[c[e+1]],n=j[c[e+2]],o=j[c[e+3]];h=l^m>>>8^m<<24^n>>>16^n<<16^o>>>24^o<<8,c[e]=h>>>24&255,c[e+1]=h>>16&255,c[e+2]=h>>8&255,c[e+3]=255&h}}for(h=c[13],c[13]=c[9],c[9]=c[5],c[5]=c[1],c[1]=h,h=c[14],i=c[10],c[14]=c[6],c[10]=c[2],c[6]=h,c[2]=i,h=c[15],i=c[11],k=c[7],c[15]=c[3],c[11]=h,c[7]=i,c[3]=k,e=0;16>e;++e)c[e]=g[c[e]],c[e]^=b[e];return c}function c(a,b){var c,d,e,g,j=new Uint8Array(16);for(j.set(a),k=0;16>k;++k)j[k]^=b[k];for(i=1;14>i;i++){for(k=0;16>k;++k)j[k]=f[j[k]];e=j[1],j[1]=j[5],j[5]=j[9],j[9]=j[13],j[13]=e,e=j[2],d=j[6],j[2]=j[10],j[6]=j[14],j[10]=e,j[14]=d,e=j[3],d=j[7],c=j[11],j[3]=j[15],j[7]=e,j[11]=d,j[15]=c;for(var k=0;16>k;k+=4){var l=j[k+0],m=j[k+1],n=j[k+2],o=j[k+3];c=l^m^n^o,j[k+0]^=c^h[l^m],j[k+1]^=c^h[m^n],j[k+2]^=c^h[n^o],j[k+3]^=c^h[o^l]}for(k=0,g=16*i;16>k;++k,++g)j[k]^=b[g]}for(k=0;16>k;++k)j[k]=f[j[k]];for(e=j[1],j[1]=j[5],j[5]=j[9],j[9]=j[13],j[13]=e,e=j[2],d=j[6],j[2]=j[10],j[6]=j[14],j[10]=e,j[14]=d,e=j[3],d=j[7],c=j[11],j[3]=j[15],j[7]=e,j[11]=d,j[15]=c,k=0,g=224;16>k;++k,++g)j[k]^=b[g];return j}function d(b){this.key=a(b),this.buffer=new Uint8Array(16),this.bufferPosition=0}function e(a,c){var d,e,f,g=a.length,h=this.buffer,i=this.bufferPosition,j=[],k=this.iv;for(d=0;g>d;++d)if(h[i]=a[d],++i,!(16>i)){var l=b(h,this.key);for(e=0;16>e;++e)l[e]^=k[e];k=h,j.push(l),h=new Uint8Array(16),i=0}if(this.buffer=h,this.bufferLength=i,this.iv=k,0===j.length)return new Uint8Array([]);var m=16*j.length;if(c){var n=j[j.length-1],o=n[15];if(16>=o){for(d=15,f=16-o;d>=f;--d)if(n[d]!==o){o=0;break}m-=o,j[j.length-1]=n.subarray(0,16-o)}}var p=new Uint8Array(m);for(d=0,e=0,f=j.length;f>d;++d,e+=16)p.set(j[d],e);return p}for(var f=(new Uint8Array([141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141]),new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22])),g=new Uint8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]),h=new Uint8Array(256),i=0;256>i;i++)128>i?h[i]=i<<1:h[i]=i<<1^27;var j=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]);return d.prototype={decryptBlock:function(a,b,c){var d,f=a.length,g=this.buffer,h=this.bufferPosition;if(c)this.iv=c;else{for(d=0;16>h&&f>d;++d,++h)g[h]=a[d];if(16>h)return this.bufferLength=h,new Uint8Array([]);this.iv=g,a=a.subarray(16)}return this.buffer=new Uint8Array(16),this.bufferLength=0,this.decryptBlock=e,this.decryptBlock(a,b)},encrypt:function(a,b){var d,e,f,g=a.length,h=this.buffer,i=this.bufferPosition,j=[];for(b||(b=new Uint8Array(16)),d=0;g>d;++d)if(h[i]=a[d],++i,!(16>i)){for(e=0;16>e;++e)h[e]^=b[e];var k=c(h,this.key);this.iv=k,j.push(k),h=new Uint8Array(16),i=0}if(this.buffer=h,this.bufferLength=i,this.iv=b,0===j.length)return new Uint8Array([]);var l=16*j.length,m=new Uint8Array(l);for(d=0,e=0,f=j.length;f>d;++d,e+=16)m.set(j[d],e);return m}},d}(),ob=function(){function a(a,b){if(a.length!==b.length)return!1;for(var c=0;cg||f[f.length-1]>g-32;){var h=b.length+e.length+d.length,i=new Uint8Array(64*h),j=a(b,e);j=a(j,d);for(var k=0,l=0;64>k;k++,l+=h)i.set(j,l);var m=new mb(e.subarray(0,16));f=m.encrypt(i,e.subarray(16,32));for(var n=0,o=0;16>o;o++)n*=1,n%=3,n+=(f[o]>>>0)%3,n%=3;0===n?e=ib(f,0,f.length):1===n?e=kb(f,0,f.length):2===n&&(e=jb(f,0,f.length)),g++}return e.subarray(0,32)}function c(){}function d(a,b){if(a.length!==b.length)return!1;for(var c=0;cn;++n)m[n]=b[n];for(j=0;32>n;)m[n++]=i[j++];for(j=0,k=c.length;k>j;++j)m[n++]=c[j];for(m[n++]=255&e,m[n++]=e>>8&255,m[n++]=e>>16&255,m[n++]=e>>>24&255,j=0,k=a.length;k>j;++j)m[n++]=a[j];f>=4&&!h&&(m[n++]=255,m[n++]=255,m[n++]=255,m[n++]=255);var o=gb(m,0,n),p=g>>3;if(f>=3)for(j=0;50>j;++j)o=gb(o,0,p);var q,r,s=o.subarray(0,p);if(f>=3){for(n=0;32>n;++n)m[n]=i[n];for(j=0,k=a.length;k>j;++j)m[n++]=a[j];q=new fb(s),r=q.encryptBlock(gb(m,0,n)),k=s.length;var t,u=new Uint8Array(k);for(j=1;19>=j;++j){for(t=0;k>t;++t)u[t]=s[t]^j;q=new fb(u),r=q.encryptBlock(r)}for(j=0,k=r.length;k>j;++j)if(d[j]!==r[j])return null}else for(q=new fb(s),r=q.encryptBlock(i),j=0,k=r.length;k>j;++j)if(d[j]!==r[j])return null;return s}function e(a,b,c,d){var e,f,g=new Uint8Array(32),h=0;for(f=Math.min(32,a.length);f>h;++h)g[h]=a[h];for(e=0;32>h;)g[h++]=i[e++];var j=gb(g,0,h),k=d>>3;if(c>=3)for(e=0;50>e;++e)j=gb(j,0,j.length);var l,m;if(c>=3){m=b;var n,o=new Uint8Array(k);for(e=19;e>=0;e--){for(n=0;k>n;++n)o[n]=j[n]^e;l=new fb(o),m=l.encryptBlock(m)}}else l=new fb(j.subarray(0,k)),m=l.encryptBlock(b);return m}function f(f,g,h){var i=f.get("Filter");z(i)&&"Standard"===i.name||c("unknown encryption method"),this.dict=f;var l=f.get("V");(!w(l)||1!==l&&2!==l&&4!==l&&5!==l)&&c("unsupported encryption algorithm"),this.algorithm=l;var m=f.get("Length")||40;(!w(m)||40>m||m%8!==0)&&c("invalid key length");var n=j(f.get("O")).subarray(0,32),o=j(f.get("U")).subarray(0,32),p=f.get("P"),q=f.get("R"),r=(4===l||5===l)&&f.get("EncryptMetadata")!==!1;this.encryptMetadata=r;var s,u=j(g);if(h){if(6===q)try{h=t(h)}catch(v){b("CipherTransformFactory: Unable to convert UTF8 encoded password.")}s=j(h)}var x;if(5!==l)x=d(u,s,n,o,p,q,m,r);else{var y=j(f.get("O")).subarray(32,40),A=j(f.get("O")).subarray(40,48),B=j(f.get("U")).subarray(0,48),C=j(f.get("U")).subarray(32,40),D=j(f.get("U")).subarray(40,48),E=j(f.get("OE")),F=j(f.get("UE")),G=j(f.get("Perms"));x=a(q,s,n,y,A,B,o,C,D,E,F,G)}if(!x&&!h)throw new da("No password given",ca.NEED_PASSWORD);if(!x&&h){var H=e(s,n,q,m);x=d(u,H,n,o,p,q,m,r)}if(!x)throw new da("Incorrect Password",ca.INCORRECT_PASSWORD);this.encryptionKey=x,l>=4&&(this.cf=f.get("CF"),this.stmf=f.get("StmF")||k,this.strf=f.get("StrF")||k,this.eff=f.get("EFF")||this.stmf)}function g(a,b,c,d){var e,f,g=new Uint8Array(c.length+9);for(e=0,f=c.length;f>e;++e)g[e]=c[e];g[e++]=255&a,g[e++]=a>>8&255,g[e++]=a>>16&255,g[e++]=255&b,g[e++]=b>>8&255,d&&(g[e++]=115,g[e++]=65,g[e++]=108,g[e++]=84);var h=gb(g,0,e);return h.subarray(0,Math.min(c.length+5,16))}function h(a,b,d,e,f){var h,i=a.get(b.name);return null!==i&&void 0!==i&&(h=i.get("CFM")),h&&"None"!==h.name?"V2"===h.name?function(){return new fb(g(d,e,f,!1))}:"AESV2"===h.name?function(){return new mb(g(d,e,f,!0))}:"AESV3"===h.name?function(){return new nb(f)}:void c("Unknown crypto method"):function(){return new lb}}var i=new Uint8Array([40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122]),k=ya.get("Identity");return f.prototype={createCipherTransform:function(a,b){if(4===this.algorithm||5===this.algorithm)return new qb(h(this.cf,this.stmf,a,b,this.encryptionKey),h(this.cf,this.strf,a,b,this.encryptionKey));var c=g(a,b,this.encryptionKey,!1),d=function(){return new fb(c)};return new qb(d,d)}},f}(),sb={FUNCTION_BASED:1,AXIAL:2,RADIAL:3,FREE_FORM_MESH:4,LATTICE_FORM_MESH:5,COONS_PATCH_MESH:6,TENSOR_PATCH_MESH:7},tb=function(){function a(){c("should not call Pattern constructor")}return a.prototype={getPattern:function(a){c("Should not call Pattern.getStyle: "+a)}},a.parseShading=function(a,c,d,e){var f=D(a)?a.dict:a,g=f.get("ShadingType");try{switch(g){case sb.AXIAL:case sb.RADIAL:return new ub.RadialAxial(f,c,d,e);case sb.FREE_FORM_MESH:case sb.LATTICE_FORM_MESH:case sb.COONS_PATCH_MESH:case sb.TENSOR_PATCH_MESH:return new ub.Mesh(a,c,d,e);default:throw new Error("Unsupported ShadingType: "+g)}}catch(h){if(h instanceof ja)throw h;return aa.notify(_.shadingPattern),b(h),new ub.Dummy}},a}(),ub={};ub.SMALL_NUMBER=.01,ub.RadialAxial=function(){function d(c,d,e,f){this.matrix=d,this.coordsArr=c.get("Coords"),this.shadingType=c.get("ShadingType"),this.type="Pattern";var g=c.get("ColorSpace","CS");g=Xa.parse(g,e,f),this.cs=g;var h=0,i=1;if(c.has("Domain")){var j=c.get("Domain");h=j[0],i=j[1]}var k=!1,l=!1;if(c.has("Extend")){var m=c.get("Extend");k=m[0],l=m[1]}if(!(this.shadingType!==sb.RADIAL||k&&l)){var n=this.coordsArr[0],o=this.coordsArr[1],p=this.coordsArr[2],q=this.coordsArr[3],r=this.coordsArr[4],s=this.coordsArr[5],t=Math.sqrt((n-q)*(n-q)+(o-r)*(o-r));s+t>=p&&p+t>=s&&b("Unsupported radial gradient.")}this.extendStart=k,this.extendEnd=l;var u=c.get("Function"),v=Ta.parseArray(e,u),w=i-h,x=w/10,y=this.colorStops=[];if(h>=i||0>=x)return void a("Bad shading domain.");for(var z,A=new Float32Array(g.numComps),B=new Float32Array(1),C=h;i>=C;C+=x){B[0]=C,v(B,0,A,0),z=g.getRgb(A,0);var D=na.makeCssRgb(z[0],z[1],z[2]);y.push([(C-h)/w,D])}var E="transparent";c.has("Background")&&(z=g.getRgb(c.get("Background"),0),E=na.makeCssRgb(z[0],z[1],z[2])),k||(y.unshift([0,E]),y[1][0]+=ub.SMALL_NUMBER),l||(y[y.length-1][0]-=ub.SMALL_NUMBER,y.push([1,E])),this.colorStops=y}return d.prototype={getIR:function(){var a,b,d,e,f,g=this.coordsArr,h=this.shadingType;h===sb.AXIAL?(b=[g[0],g[1]],d=[g[2],g[3]],e=null,f=null,a="axial"):h===sb.RADIAL?(b=[g[0],g[1]],d=[g[3],g[4]],e=g[2],f=g[5],a="radial"):c("getPattern type unknown: "+h);var i=this.matrix;return i&&(b=na.applyTransform(b,i),d=na.applyTransform(d,i)),["RadialAxial",a,this.colorStops,b,d,e,f]}},d}(),ub.Mesh=function(){function a(a,b){this.stream=a,this.context=b,this.buffer=0,this.bufferLength=0;var c=b.numComps;this.tmpCompsBuf=new Float32Array(c);var d=b.colorSpace.numComps;this.tmpCsCompsBuf=b.colorFn?new Float32Array(d):this.tmpCompsBuf}function b(a,b){for(var c=a.coords,d=a.colors,f=[],g=[],h=0;b.hasData;){var i=b.readFlag(),j=b.readCoordinate(),k=b.readComponents();if(0===h){switch(e(i>=0&&2>=i,"Unknown type4 flag"),i){case 0:h=3;break;case 1:g.push(g[g.length-2],g[g.length-1]),h=1;break;case 2:g.push(g[g.length-3],g[g.length-1]),h=1}f.push(i)}g.push(c.length),c.push(j),d.push(k),h--,b.align()}a.figures.push({type:"triangles",coords:new Int32Array(g),colors:new Int32Array(g)})}function d(a,b,c){for(var d=a.coords,e=a.colors,f=[];b.hasData;){var g=b.readCoordinate(),h=b.readComponents();f.push(d.length),d.push(g),e.push(h)}a.figures.push({type:"lattice",coords:new Int32Array(f),colors:new Int32Array(f),verticesPerRow:c})}function f(a,b){var c=a.figures[b];e("patch"===c.type,"Unexpected patch mesh figure");var d=a.coords,f=a.colors,g=c.coords,h=c.colors,i=Math.min(d[g[0]][0],d[g[3]][0],d[g[12]][0],d[g[15]][0]),j=Math.min(d[g[0]][1],d[g[3]][1],d[g[12]][1],d[g[15]][1]),k=Math.max(d[g[0]][0],d[g[3]][0],d[g[12]][0],d[g[15]][0]),p=Math.max(d[g[0]][1],d[g[3]][1],d[g[12]][1],d[g[15]][1]),q=Math.ceil((k-i)*n/(a.bounds[2]-a.bounds[0]));q=Math.max(l,Math.min(m,q));var r=Math.ceil((p-j)*n/(a.bounds[3]-a.bounds[1]));r=Math.max(l,Math.min(m,r));for(var s=q+1,t=new Int32Array((r+1)*s),u=new Int32Array((r+1)*s),v=0,w=new Uint8Array(3),x=new Uint8Array(3),y=f[h[0]],z=f[h[1]],A=f[h[2]],B=f[h[3]],C=o(r),D=o(q),E=0;r>=E;E++){w[0]=(y[0]*(r-E)+A[0]*E)/r|0,w[1]=(y[1]*(r-E)+A[1]*E)/r|0,w[2]=(y[2]*(r-E)+A[2]*E)/r|0,x[0]=(z[0]*(r-E)+B[0]*E)/r|0,x[1]=(z[1]*(r-E)+B[1]*E)/r|0,x[2]=(z[2]*(r-E)+B[2]*E)/r|0;for(var F=0;q>=F;F++,v++)if(0!==E&&E!==r||0!==F&&F!==q){for(var G=0,H=0,I=0,J=0;3>=J;J++)for(var K=0;3>=K;K++,I++){var L=C[E][J]*D[F][K];G+=d[g[I]][0]*L,H+=d[g[I]][1]*L}t[v]=d.length,d.push([G,H]),u[v]=f.length;var M=new Uint8Array(3);M[0]=(w[0]*(q-F)+x[0]*F)/q|0,M[1]=(w[1]*(q-F)+x[1]*F)/q|0,M[2]=(w[2]*(q-F)+x[2]*F)/q|0,f.push(M)}}t[0]=g[0],u[0]=h[0],t[q]=g[3],u[q]=h[1],t[s*r]=g[12],u[s*r]=h[2],t[s*r+q]=g[15],u[s*r+q]=h[3],a.figures[b]={type:"lattice",coords:t,colors:u,verticesPerRow:s}}function g(a,b){for(var c=a.coords,d=a.colors,f=new Int32Array(16),g=new Int32Array(4);b.hasData;){var h=b.readFlag();e(h>=0&&3>=h,"Unknown type6 flag");var i,j,k=c.length;for(i=0,j=0!==h?8:12;j>i;i++)c.push(b.readCoordinate());var l=d.length;for(i=0,j=0!==h?2:4;j>i;i++)d.push(b.readComponents());var m,n,o,p;switch(h){case 0:f[12]=k+3,f[13]=k+4,f[14]=k+5,f[15]=k+6,f[8]=k+2,f[11]=k+7,f[4]=k+1,f[7]=k+8,f[0]=k,f[1]=k+11,f[2]=k+10,f[3]=k+9,g[2]=l+1,g[3]=l+2,g[0]=l,g[1]=l+3;break;case 1:m=f[12],n=f[13],o=f[14],p=f[15],f[12]=p,f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=o,f[11]=k+3,f[4]=n,f[7]=k+4,f[0]=m,f[1]=k+7,f[2]=k+6,f[3]=k+5,m=g[2],n=g[3],g[2]=n,g[3]=l,g[0]=m,g[1]=l+1;break;case 2:m=f[15],n=f[11],f[12]=f[3],f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=f[7],f[11]=k+3,f[4]=n,f[7]=k+4,f[0]=m,f[1]=k+7,f[2]=k+6,f[3]=k+5,m=g[3],g[2]=g[1],g[3]=l,g[0]=m,g[1]=l+1;break;case 3:f[12]=f[0],f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=f[1],f[11]=k+3,f[4]=f[2],f[7]=k+4,f[0]=f[3],f[1]=k+7,f[2]=k+6,f[3]=k+5,g[2]=g[0],g[3]=l,g[0]=g[1],g[1]=l+1}f[5]=c.length,c.push([(-4*c[f[0]][0]-c[f[15]][0]+6*(c[f[4]][0]+c[f[1]][0])-2*(c[f[12]][0]+c[f[3]][0])+3*(c[f[13]][0]+c[f[7]][0]))/9,(-4*c[f[0]][1]-c[f[15]][1]+6*(c[f[4]][1]+c[f[1]][1])-2*(c[f[12]][1]+c[f[3]][1])+3*(c[f[13]][1]+c[f[7]][1]))/9]),f[6]=c.length,c.push([(-4*c[f[3]][0]-c[f[12]][0]+6*(c[f[2]][0]+c[f[7]][0])-2*(c[f[0]][0]+c[f[15]][0])+3*(c[f[4]][0]+c[f[14]][0]))/9,(-4*c[f[3]][1]-c[f[12]][1]+6*(c[f[2]][1]+c[f[7]][1])-2*(c[f[0]][1]+c[f[15]][1])+3*(c[f[4]][1]+c[f[14]][1]))/9]),f[9]=c.length,c.push([(-4*c[f[12]][0]-c[f[3]][0]+6*(c[f[8]][0]+c[f[13]][0])-2*(c[f[0]][0]+c[f[15]][0])+3*(c[f[11]][0]+c[f[1]][0]))/9,(-4*c[f[12]][1]-c[f[3]][1]+6*(c[f[8]][1]+c[f[13]][1])-2*(c[f[0]][1]+c[f[15]][1])+3*(c[f[11]][1]+c[f[1]][1]))/9]),f[10]=c.length,c.push([(-4*c[f[15]][0]-c[f[0]][0]+6*(c[f[11]][0]+c[f[14]][0])-2*(c[f[12]][0]+c[f[3]][0])+3*(c[f[2]][0]+c[f[8]][0]))/9,(-4*c[f[15]][1]-c[f[0]][1]+6*(c[f[11]][1]+c[f[14]][1])-2*(c[f[12]][1]+c[f[3]][1])+3*(c[f[2]][1]+c[f[8]][1]))/9]),a.figures.push({type:"patch",coords:new Int32Array(f),colors:new Int32Array(g)})}}function h(a,b){for(var c=a.coords,d=a.colors,f=new Int32Array(16),g=new Int32Array(4);b.hasData;){var h=b.readFlag();e(h>=0&&3>=h,"Unknown type7 flag");var i,j,k=c.length;for(i=0,j=0!==h?12:16;j>i;i++)c.push(b.readCoordinate());var l=d.length;for(i=0,j=0!==h?2:4;j>i;i++)d.push(b.readComponents());var m,n,o,p;switch(h){case 0:f[12]=k+3,f[13]=k+4,f[14]=k+5,f[15]=k+6,f[8]=k+2,f[9]=k+13,f[10]=k+14,f[11]=k+7,f[4]=k+1,f[5]=k+12,f[6]=k+15,f[7]=k+8,f[0]=k,f[1]=k+11,f[2]=k+10,f[3]=k+9,g[2]=l+1,g[3]=l+2,g[0]=l,g[1]=l+3;break;case 1:m=f[12],n=f[13],o=f[14],p=f[15],f[12]=p,f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=o,f[9]=k+9,f[10]=k+10,f[11]=k+3,f[4]=n,f[5]=k+8,f[6]=k+11,f[7]=k+4,f[0]=m,f[1]=k+7,f[2]=k+6,f[3]=k+5,m=g[2],n=g[3],g[2]=n,g[3]=l,g[0]=m,g[1]=l+1;break;case 2:m=f[15],n=f[11],f[12]=f[3],f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=f[7],f[9]=k+9,f[10]=k+10,f[11]=k+3,f[4]=n,f[5]=k+8,f[6]=k+11,f[7]=k+4,f[0]=m,f[1]=k+7,f[2]=k+6,f[3]=k+5,m=g[3],g[2]=g[1],g[3]=l,g[0]=m,g[1]=l+1;break;case 3:f[12]=f[0],f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=f[1],f[9]=k+9,f[10]=k+10,f[11]=k+3,f[4]=f[2],f[5]=k+8,f[6]=k+11,f[7]=k+4,f[0]=f[3],f[1]=k+7,f[2]=k+6,f[3]=k+5,g[2]=g[0],g[3]=l,g[0]=g[1],g[1]=l+1}a.figures.push({type:"patch",coords:new Int32Array(f),colors:new Int32Array(g)})}}function i(a){for(var b=a.coords[0][0],c=a.coords[0][1],d=b,e=c,f=1,g=a.coords.length;g>f;f++){var h=a.coords[f][0],i=a.coords[f][1];b=b>h?h:b,c=c>i?i:c,d=h>d?h:d,e=i>e?i:e}a.bounds=[b,c,d,e]}function j(a){var b,c,d,e,f=a.coords,g=new Float32Array(2*f.length);for(b=0,d=0,c=f.length;c>b;b++){var h=f[b];g[d++]=h[0],g[d++]=h[1]}a.coords=g;var i=a.colors,j=new Uint8Array(3*i.length);for(b=0,d=0,c=i.length;c>b;b++){var k=i[b];j[d++]=k[0],j[d++]=k[1],j[d++]=k[2]}a.colors=j;var l=a.figures;for(b=0,c=l.length;c>b;b++){var m=l[b],n=m.coords,o=m.colors;for(d=0,e=n.length;e>d;d++)n[d]*=2,o[d]*=3}}function k(k,l,m,n){e(D(k),"Mesh data is not a stream");var o=k.dict;this.matrix=l,this.shadingType=o.get("ShadingType"),this.type="Pattern",this.bbox=o.get("BBox");var p=o.get("ColorSpace","CS");p=Xa.parse(p,m,n),this.cs=p,this.background=o.has("Background")?p.getRgb(o.get("Background"),0):null;var q=o.get("Function"),r=q?Ta.parseArray(m,q):null;this.coords=[],this.colors=[],this.figures=[];var s={bitsPerCoordinate:o.get("BitsPerCoordinate"),bitsPerComponent:o.get("BitsPerComponent"),bitsPerFlag:o.get("BitsPerFlag"),decode:o.get("Decode"),colorFn:r,colorSpace:p,numComps:r?1:p.numComps},t=new a(k,s),u=!1;switch(this.shadingType){case sb.FREE_FORM_MESH:b(this,t);break;case sb.LATTICE_FORM_MESH:var v=0|o.get("VerticesPerRow");e(v>=2,"Invalid VerticesPerRow"),d(this,t,v);break;case sb.COONS_PATCH_MESH:g(this,t),u=!0;break;case sb.TENSOR_PATCH_MESH:h(this,t),u=!0;break;default:c("Unsupported mesh type.")}if(u){i(this);for(var w=0,x=this.figures.length;x>w;w++)f(this,w)}i(this),j(this)}a.prototype={get hasData(){if(this.stream.end)return this.stream.pos0)return!0;var a=this.stream.getByte();return 0>a?!1:(this.buffer=a,this.bufferLength=8,!0)},readBits:function(a){var b=this.buffer,c=this.bufferLength;if(32===a){if(0===c)return(this.stream.getByte()<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte())>>>0;b=b<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte();var d=this.stream.getByte();return this.buffer=d&(1<>c)>>>0}if(8===a&&0===c)return this.stream.getByte();for(;a>c;)b=b<<8|this.stream.getByte(),c+=8;return c-=a,this.bufferLength=c,this.buffer=b&(1<>c},align:function(){this.buffer=0,this.bufferLength=0},readFlag:function(){return this.readBits(this.context.bitsPerFlag)},readCoordinate:function(){var a=this.context.bitsPerCoordinate,b=this.readBits(a),c=this.readBits(a),d=this.context.decode,e=32>a?1/((1<b?1/((1<f;f++,g+=2){var h=this.readBits(b);e[f]=h*c*(d[g+1]-d[g])+d[g]}var i=this.tmpCsCompsBuf;return this.context.colorFn&&this.context.colorFn(e,0,i,0),this.context.colorSpace.getRgb(i,0)}};var l=3,m=20,n=20,o=function(){function a(a){for(var b=[],c=0;a>=c;c++){var d=c/a,e=1-d;b.push(new Float32Array([e*e*e,3*d*e*e,3*d*d*e,d*d*d]))}return b}var b=[];return function(c){return b[c]||(b[c]=a(c)),b[c]}}();return k.prototype={getIR:function(){return["Mesh",this.shadingType,this.coords,this.colors,this.figures,this.bounds,this.matrix,this.bbox,this.background]}},k}(),ub.Dummy=function(){function a(){this.type="Pattern"}return a.prototype={getIR:function(){return["Dummy"]}},a}();var vb=function(){function d(a,b,c,d,e,f,g){this.pdfManager=a,this.xref=b,this.handler=c,this.pageIndex=d,this.uniquePrefix=e,this.idCounters=f,this.fontCache=g}function f(){this.reset()}var g=20,h=100;f.prototype={check:function(){return++this.checkedPDFJS.maxImageSize)return void b("Image exceeded maximum allowed size and was removed.");var l,m,n=i.get("ImageMask","IM")||!1;if(n){var o=i.get("Width","W"),p=i.get("Height","H"),q=o+7>>3,r=c.getBytes(q*p),s=i.get("Decode","D"),t=!!s&&s[0]>0;return l=Bc.createMask(r,o,p,c instanceof Oc,t),l.cached=!0,m=[l],e.addOp($.paintImageMaskXObject,m),void(f&&(g[f]={fn:$.paintImageMaskXObject,args:m}))}var u=i.get("SMask","SM")||!1,v=i.get("Mask")||!1,w=200;if(d&&!u&&!v&&!(c instanceof Sc)&&w>j+k){var y=new Bc(this.xref,a,c,d,null,null);return l=y.createImageData(!0),void e.addOp($.paintInlineImageXObject,[l])}var z=this.uniquePrefix||"",A="img_"+z+ ++this.idCounters.obj;return e.addDependency(A),m=[A,j,k],!u&&!v&&c instanceof Sc&&c.isNativelySupported(this.xref,a)?(e.addOp($.paintJpegXObject,m),void this.handler.send("obj",[A,this.pageIndex,"JpegStream",c.getIR()])):(Bc.buildImage(h.handler,h.xref,a,c,d).then(function(a){var b=a.createImageData(!1);h.handler.send("obj",[A,h.pageIndex,"Image",b],[b.data.buffer])}).then(void 0,function(a){b("Unable to decode image: "+a),h.handler.send("obj",[A,h.pageIndex,"Image",null])}),e.addOp($.paintImageXObject,m),void(f&&(g[f]={fn:$.paintImageXObject,args:m})))},handleSMask:function(a,b,c,d,e){var f=a.get("G"),g={subtype:a.get("S").name,backdrop:a.get("BC")};return this.buildFormXObject(b,f,g,c,d,e.state.clone())},handleTilingType:function(a,b,c,d,e,f,g){var h=new xb,i=[e.get("Resources"),c],j=Aa.merge(this.xref,i);return this.getOperatorList(d,g,j,h).then(function(){f.addDependencies(h.dependencies),f.addOp(a,J({fnArray:h.fnArray,argsArray:h.argsArray},e,b))})},handleSetFont:function(a,b,c,d,e,f){var g;b&&(b=b.slice(),g=b[0].name);var h=this;return this.loadFont(g,c,this.xref,a).then(function(b){return b.font.isType3Font?b.loadType3Data(h,a,d,e).then(function(){return b}):b}).then(function(a){return f.font=a.font,a.send(h.handler),a.loadedName})},handleText:function(a,b){var c=b.font,d=c.charsToGlyphs(a),e=!!(b.textRenderingMode&U.ADD_TO_PATH_FLAG);if(c.data&&(e||PDFJS.disableFontFace))for(var f=function(a){if(!c.renderer.hasBuiltPath(a)){var b=c.renderer.getPathJs(a);this.handler.send("commonobj",[c.loadedName+"_path_"+a,"FontPath",b])}}.bind(this),g=0,h=d.length;h>g;g++){var i=d[g];if(null!==i){f(i.fontChar);var j=i.accent;j&&j.fontChar&&f(j.fontChar)}}return d},setGState:function(c,d,e,f,g,h){var i=[],j=d.map,k=this,l=Promise.resolve();for(var m in j){var n=j[m];switch(m){case"Type":break;case"LW":case"LC":case"LJ":case"ML":case"D":case"RI":case"FL":case"CA":case"ca":i.push([m,n]);break;case"Font":l=l.then(function(){return k.handleSetFont(c,null,n[0],e,f,h.state).then(function(a){e.addDependency(a),i.push([m,[a,n[1]]])})});break;case"BM":i.push([m,n]);break;case"SMask":if(z(n)&&"None"===n.name){i.push([m,!1]);break}var o=g.fetchIfRef(n);B(o)?(l=l.then(function(){return k.handleSMask(o,c,e,f,h)}),i.push([m,!0])):b("Unsupported SMask type");break;case"OP":case"op":case"OPM":case"BG":case"BG2":case"UCR":case"UCR2":case"TR":case"TR2":case"HT":case"SM":case"SA":case"AIS":case"TK":a("graphic state operator "+m);break;default:a("Unknown graphic state operator "+m)}}return l.then(function(){i.length>=0&&e.addOp($.setGState,[i])})},loadFont:function(a,c,d,f){function g(){return Promise.resolve(new wb("g_font_error",new ec("Font "+a+" is not available"),c))}var h;if(c)e(F(c)),h=c;else{var i=f.get("Font");if(!i)return b("fontRes not available"),g();h=i.getRaw(a)}if(!h)return b("fontRef not available"),g();if(this.fontCache.has(h))return this.fontCache.get(h);if(c=d.fetchIfRef(h),!B(c))return g();if(c.translated)return c.translated;var j=G(),k=this.preEvaluateFont(c,d),l=k.descriptor,m=h.num+"_"+h.gen;if(B(l)){l.fontAliases||(l.fontAliases=Object.create(null));var n=l.fontAliases,o=k.hash;if(n[o]){var p=n[o].aliasRef;if(p&&this.fontCache.has(p))return this.fontCache.putAlias(h,p),this.fontCache.get(h)}n[o]||(n[o]={fontID:dc.getFontID()}),n[o].aliasRef=h,m=n[o].fontID}var q=B(h);q||this.fontCache.put(h,j.promise),c.loadedName="g_font_"+(q?a.replace(/\W/g,""):m),c.translated=j.promise;var r;try{r=Promise.resolve(this.translateFont(k,d))}catch(s){r=Promise.reject(s)}return r.then(function(a){if(void 0!==a.fontType){var b=d.stats.fontTypes;b[a.fontType]=!0}j.resolve(new wb(c.loadedName,a,c))},function(a){aa.notify(_.font);try{var b=k.descriptor,e=b&&b.get("FontFile3"),f=e&&e.get("Subtype"),g=P(k.type,f&&f.name),h=d.stats.fontTypes;h[g]=!0}catch(i){}j.resolve(new wb(c.loadedName,new ec(a instanceof Error?a.message:a),c))}),j.promise},buildPath:function(a,b,c){var d=a.length-1;if(c||(c=[]),0>d||a.fnArray[d]!==$.constructPath)a.addOp($.constructPath,[[b],c]);else{var e=a.argsArray[d];e[0].push(b),Array.prototype.push.apply(e[1],c)}},handleColorN:function(a,b,c,d,e,f,g,h){var i,l=c[c.length-1];if(z(l)&&(i=e.get(l.name))){var m=D(i)?i.dict:i,n=m.get("PatternType");if(n===j){var o=d.base?d.base.getRgb(c,0):null;return this.handleTilingType(b,o,f,i,m,a,g)}if(n===k){var p=m.get("Shading"),q=m.get("Matrix");return i=tb.parseShading(p,q,h,f),a.addOp(b,i.getIR()),Promise.resolve()}return Promise.reject("Unknown PatternType: "+n)}return a.addOp(b,c),Promise.resolve()},getOperatorList:function(d,g,h,j,k){var l=this,m=this.xref,n={};e(j),h=h||Aa.empty;var o=h.get("XObject")||Aa.empty,p=h.get("Pattern")||Aa.empty,q=new yb(k||new Ab),r=new Bb(d,m,q),s=new f;return new Promise(function t(d,f){g.ensureNotTerminated(),s.reset();for(var k,u,v,w,A={};!(k=s.check())&&(A.args=null,r.read(A));){var C=A.args,E=A.fn;switch(0|E){case $.paintXObject:if(C[0].code)break;var F=C[0].name;if(!F){b("XObject must be referred to by name.");continue}if(void 0!==n[F]){j.addOp(n[F].fn,n[F].args),C=null;continue}var G=o.get(F);if(G){e(D(G),"XObject should be a stream");var H=G.dict.get("Subtype");if(e(z(H),"XObject should have a Name subtype"),"Form"===H.name)return q.save(),l.buildFormXObject(h,G,null,j,g,q.state.clone()).then(function(){q.restore(),t(d,f)},f);if("Image"===H.name){l.buildPaintImageXObject(h,G,!1,j,F,n),C=null;continue}if("PS"===H.name){a("Ignored XObject subtype PS");continue}c("Unhandled XObject subtype "+H.name)}break;case $.setFont:var I=C[1];return l.handleSetFont(h,C,null,j,g,q.state).then(function(a){j.addDependency(a),j.addOp($.setFont,[a,I]),t(d,f)},f);case $.endInlineImage:var J=C[0].cacheKey;if(J){var K=n[J];if(void 0!==K){j.addOp(K.fn,K.args),C=null;continue}}l.buildPaintImageXObject(h,C[0],!0,j,J,n),C=null;continue;case $.showText:C[0]=l.handleText(C[0],q.state);break;case $.showSpacedText:var L=C[0],M=[],N=L.length,O=q.state;for(u=0;N>u;++u){var P=L[u];y(P)?Array.prototype.push.apply(M,l.handleText(P,O)):x(P)&&M.push(P)}C[0]=M,E=$.showText;break;case $.nextLineShowText:j.addOp($.nextLine),C[0]=l.handleText(C[0],q.state),E=$.showText;break;case $.nextLineSetSpacingShowText:j.addOp($.nextLine),j.addOp($.setWordSpacing,[C.shift()]),j.addOp($.setCharSpacing,[C.shift()]),C[0]=l.handleText(C[0],q.state),E=$.showText;break;case $.setTextRenderingMode:q.state.textRenderingMode=C[0];break;case $.setFillColorSpace:q.state.fillColorSpace=Xa.parse(C[0],m,h);continue;case $.setStrokeColorSpace:q.state.strokeColorSpace=Xa.parse(C[0],m,h);continue;case $.setFillColor:w=q.state.fillColorSpace,C=w.getRgb(C,0),E=$.setFillRGBColor;break;case $.setStrokeColor:w=q.state.strokeColorSpace,C=w.getRgb(C,0),E=$.setStrokeRGBColor;break;case $.setFillGray:q.state.fillColorSpace=Xa.singletons.gray,C=Xa.singletons.gray.getRgb(C,0),E=$.setFillRGBColor;break;case $.setStrokeGray:q.state.strokeColorSpace=Xa.singletons.gray,C=Xa.singletons.gray.getRgb(C,0),E=$.setStrokeRGBColor;break;case $.setFillCMYKColor:q.state.fillColorSpace=Xa.singletons.cmyk,C=Xa.singletons.cmyk.getRgb(C,0),E=$.setFillRGBColor;break;case $.setStrokeCMYKColor:q.state.strokeColorSpace=Xa.singletons.cmyk,C=Xa.singletons.cmyk.getRgb(C,0),E=$.setStrokeRGBColor;break;case $.setFillRGBColor:q.state.fillColorSpace=Xa.singletons.rgb,C=Xa.singletons.rgb.getRgb(C,0);break;case $.setStrokeRGBColor:q.state.strokeColorSpace=Xa.singletons.rgb,C=Xa.singletons.rgb.getRgb(C,0);break;case $.setFillColorN:if(w=q.state.fillColorSpace,"Pattern"===w.name)return l.handleColorN(j,$.setFillColorN,C,w,p,h,g,m).then(function(){t(d,f)},f);C=w.getRgb(C,0),E=$.setFillRGBColor;break;case $.setStrokeColorN:if(w=q.state.strokeColorSpace,"Pattern"===w.name)return l.handleColorN(j,$.setStrokeColorN,C,w,p,h,g,m).then(function(){t(d,f)},f);C=w.getRgb(C,0),E=$.setStrokeRGBColor;break;case $.shadingFill:var Q=h.get("Shading");Q||c("No shading resource found");var R=Q.get(C[0].name);R||c("No shading object found");var S=tb.parseShading(R,null,m,h),T=S.getIR();C=[T],E=$.shadingFill;break;case $.setGState:var U=C[0],V=h.get("ExtGState");if(!B(V)||!V.has(U.name))break;var W=V.get(U.name);return l.setGState(h,W,j,g,m,q).then(function(){t(d,f)},f);case $.moveTo:case $.lineTo:case $.curveTo:case $.curveTo2:case $.curveTo3:case $.closePath:l.buildPath(j,E,C);continue;case $.rectangle:l.buildPath(j,E,C);continue;case $.markPoint:case $.markPointProps:case $.beginMarkedContent:case $.beginMarkedContentProps:case $.endMarkedContent:case $.beginCompat:case $.endCompat:continue}j.addOp(E,C)}if(k)return void i.then(function(){t(d,f)},f);for(u=0,v=r.savedStatesDepth;v>u;u++)j.addOp($.restore,[]);d()})},getTextContent:function(a,b,c,d){function g(){var a=r.font;return a.loadedName in l.styles||(l.styles[a.loadedName]={fontFamily:a.fallbackName,ascent:a.ascent,descent:a.descent,vertical:a.vertical}),{str:[],dir:null,width:0,height:0,transform:null,fontName:a.loadedName}}function h(a){var b=a.str.join(""),c=PDFJS.bidi(b,-1,r.font.vertical);return a.str=c.str,a.dir=c.dir,a}function j(a,b){return p.loadFont(a,b,q,c).then(function(a){r.font=a.font,r.fontMatrix=a.font.fontMatrix||T})}function k(a,b){var c=r.font;if(b=b||g(),!b.transform){var d=[r.fontSize*r.textHScale,0,0,r.fontSize,0,r.textRise];if(c.isType3Font&&r.fontMatrix!==T&&1===r.fontSize){var e=c.bbox[3]-c.bbox[1];e>0&&(e*=r.fontMatrix[3],d[3]*=e)}var f=b.transform=na.transform(r.ctm,na.transform(r.textMatrix,d));c.vertical?b.width=Math.sqrt(f[0]*f[0]+f[1]*f[1]):b.height=Math.sqrt(f[2]*f[2]+f[3]*f[3])}for(var h=0,i=0,j=c.charsToGlyphs(a),k=c.defaultVMetrics,l=0;l0&&(s=r.charSpacing);var t=0,u=0;if(c.vertical){var v=p*r.fontMatrix[0];u=v*r.fontSize+s,i+=u}else{var w=p*r.fontMatrix[0];t=(w*r.fontSize+s)*r.textHScale,h+=t}r.translateTextMatrix(t,u),b.str.push(q)}else h+=r.wordSpacing*r.textHScale}var x=r.textLineMatrix[0],y=r.textLineMatrix[1],z=Math.sqrt(x*x+y*y);x=r.ctm[0],y=r.ctm[1];var A=Math.sqrt(x*x+y*y);return c.vertical?b.height+=Math.abs(i*A*z):b.width+=h*A*z,b}d=d||new yb(new zb);var l={items:[],styles:Object.create(null)},m=l.items,n=.3,o=1.5,p=this,q=this.xref;c=q.fetchIfRef(c)||Aa.empty;var r,s=null,t={},u=new Bb(a,q,d),v=new f;return new Promise(function w(a,f){b.ensureNotTerminated(),v.reset();for(var q,x={},y=[];!(q=v.check())&&(y.length=0,x.args=y,u.read(x));){r=d.state;var A=x.fn;switch(y=x.args,0|A){case $.setFont:return r.fontSize=y[1],j(y[0].name).then(function(){w(a,f)},f);case $.setTextRise:r.textRise=y[0];break;case $.setHScale:r.textHScale=y[0]/100;break;case $.setLeading:r.leading=y[0];break;case $.moveText:r.translateTextLineMatrix(y[0],y[1]),r.textMatrix=r.textLineMatrix.slice();break;case $.setLeadingMoveText:r.leading=-y[1],r.translateTextLineMatrix(y[0],y[1]),r.textMatrix=r.textLineMatrix.slice();break;case $.nextLine:r.carriageReturn();break;case $.setTextMatrix:r.setTextMatrix(y[0],y[1],y[2],y[3],y[4],y[5]),r.setTextLineMatrix(y[0],y[1],y[2],y[3],y[4],y[5]);break;case $.setCharSpacing:r.charSpacing=y[0];break;case $.setWordSpacing:r.wordSpacing=y[0];break;case $.beginText:r.textMatrix=ma.slice(),r.textLineMatrix=ma.slice();break;case $.showSpacedText:for(var E,F=y[0],G=g(),H=0,I=F.length;I>H;H++)if("string"==typeof F[H])k(F[H],G);else{var J=F[H]*r.fontSize/1e3;if(r.font.vertical?(E=J*r.textMatrix[3],r.translateTextMatrix(0,E),G.height+=E):(E=J*r.textHScale*r.textMatrix[0],r.translateTextMatrix(E,0),G.width-=E),F[H]<0&&r.font.spaceWidth>0){var K=-F[H]/r.font.spaceWidth;if(K>o)for(K=Math.round(K);K--;)G.str.push(" ");else K>n&&G.str.push(" ")}}m.push(h(G));break;case $.showText:m.push(h(k(y[0])));break;case $.nextLineShowText:r.carriageReturn(),m.push(h(k(y[0])));break;case $.nextLineSetSpacingShowText:r.wordSpacing=y[0],r.charSpacing=y[1],r.carriageReturn(),m.push(h(k(y[2])));break;case $.paintXObject:if(y[0].code)break;s||(s=c.get("XObject")||Aa.empty);var L=y[0].name;if(t.key===L){t.texts&&(na.appendToArray(m,t.texts.items),na.extendObj(l.styles,t.texts.styles));break}var M=s.get(L);if(!M)break;e(D(M),"XObject should be a stream");var N=M.dict.get("Subtype");if(e(z(N),"XObject should have a Name subtype"),"Form"!==N.name){t.key=L,t.texts=null;break}d.save();var O=M.dict.get("Matrix");return C(O)&&6===O.length&&d.transform(O),p.getTextContent(M,b,M.dict.get("Resources")||c,d).then(function(b){na.appendToArray(m,b.items),na.extendObj(l.styles,b.styles),d.restore(),t.key=L,t.texts=b,w(a,f)},f);case $.setGState:var P=y[0],Q=c.get("ExtGState");if(!B(Q)||!Q.has(P.name))break;var R=Q.get(P.name),S=null;for(var T in R)"Font"===T&&(e(!S),S=R[T]);if(S)return r.fontSize=S[1],j(S[0]).then(function(){w(a,f)},f)}}return q?void i.then(function(){w(a,f)},f):void a(l)})},extractDataStructures:function(a,b,d,e){var f=a.get("ToUnicode")||b.get("ToUnicode");if(f&&(e.toUnicode=this.readToUnicode(f)),e.composite){var g=a.get("CIDSystemInfo");B(g)&&(e.cidSystemInfo={registry:g.get("Registry"),ordering:g.get("Ordering"),supplement:g.get("Supplement")});var h=a.get("CIDToGIDMap");D(h)&&(e.cidToGidMap=this.readCidToGidMap(h))}var i,j=[],k=null;if(a.has("Encoding")){if(i=a.get("Encoding"),B(i)){if(k=i.get("BaseEncoding"),k=z(k)?k.name:null,i.has("Differences"))for(var l=i.get("Differences"),m=0,n=0,o=l.length;o>n;n++){var p=l[n];if(x(p))m=p;else if(z(p))j[m++]=p.name;else{if(F(p)){l[n--]=d.fetch(p);continue}c("Invalid entry in 'Differences' array: "+p)}}}else z(i)?k=i.name:c("Encoding is not a Name nor a Dict");"MacRomanEncoding"!==k&&"MacExpertEncoding"!==k&&"WinAnsiEncoding"!==k&&(k=null)}k?e.defaultEncoding=Pb[k].slice():(i="TrueType"===e.type?Pb.WinAnsiEncoding:Pb.StandardEncoding, +e.flags&Ob.Symbolic&&(i=Pb.MacRomanEncoding,e.file||(/Symbol/i.test(e.name)?i=Pb.SymbolSetEncoding:/Dingbats/i.test(e.name)&&(i=Pb.ZapfDingbatsEncoding))),e.defaultEncoding=i),e.differences=j,e.baseEncodingName=k,e.dict=a},readToUnicode:function(a){var b,c=a;if(z(c))return b=Hb.create(c,{url:PDFJS.cMapUrl,packed:PDFJS.cMapPacked},null),b instanceof Fb?new ac(0,65535):new _b(b.getMap());if(D(c)){if(b=Hb.create(c,{url:PDFJS.cMapUrl,packed:PDFJS.cMapPacked},null),b instanceof Fb)return new ac(0,65535);var d=new Array(b.length);return b.forEach(function(a,b){for(var c=[],e=0;ed;d++){var f=b[d++]<<8|b[d];if(0!==f){var g=d>>1;c[g]=f}}return c},extractWidths:function(a,b,c,d){var e,f,g,h,i,j,k,l,m=[],n=0,o=[];if(d.composite){if(n=a.get("DW")||1e3,l=a.get("W"))for(f=0,g=l.length;g>f;f++)if(j=l[f++],k=b.fetchIfRef(l[f]),C(k))for(h=0,i=k.length;i>h;h++)m[j++]=k[h];else{var p=l[++f];for(h=j;k>=h;h++)m[h]=p}if(d.vertical){var q=a.get("DW2")||[880,-1e3];if(e=[q[1],.5*n,q[0]],q=a.get("W2"))for(f=0,g=q.length;g>f;f++)if(j=q[f++],k=b.fetchIfRef(q[f]),C(k))for(h=0,i=k.length;i>h;h++)o[j++]=[k[h++],k[h++],k[h]];else{var r=[q[++f],q[++f],q[++f]];for(h=j;k>=h;h++)o[h]=r}}}else{var s=d.firstChar;if(l=a.get("Widths")){for(h=s,f=0,g=l.length;g>f;f++)m[h++]=l[f];n=parseFloat(c.get("MissingWidth"))||0}else{var t=a.get("BaseFont");if(z(t)){var u=this.getBaseFontMetrics(t.name);m=this.buildCharCodeToWidth(u.widths,d),n=u.defaultWidth}}}var v=!0,w=n;for(var x in m){var y=m[x];if(y)if(w){if(w!==y){v=!1;break}}else w=y}v&&(d.flags|=Ob.FixedPitch),d.defaultWidth=n,d.widths=m,d.defaultVMetrics=e,d.vmetrics=o},isSerifFont:function(a){var b=a.split("-")[0];return b in Sb||-1!==b.search(/serif/gi)},getBaseFontMetrics:function(a){var b=0,c=[],d=!1,e=Qb[a]||a;e in Cc||(e=this.isSerifFont(a)?"Times-Roman":"Helvetica");var f=Cc[e];return x(f)?(b=f,d=!0):c=f,{defaultWidth:b,monospace:d,widths:c}},buildCharCodeToWidth:function(a,b){for(var c=Object.create(null),d=b.differences,e=b.defaultEncoding,f=0;256>f;f++)f in d&&a[d[f]]?c[f]=a[d[f]]:f in e&&a[e[f]]&&(c[f]=a[e[f]]);return c},preEvaluateFont:function(a,b){var d=a,f=a.get("Subtype");e(z(f),"invalid font Subtype");var g,h=!1;if("Type0"===f.name){var i=a.get("DescendantFonts");i||c("Descendant fonts are not specified"),a=C(i)?b.fetchIfRef(i[0]):i,f=a.get("Subtype"),e(z(f),"invalid font Subtype"),h=!0}var j=a.get("FontDescriptor");if(j){var k=new jd,l=d.getRaw("Encoding");if(z(l))k.update(l.name);else if(F(l))k.update(l.num+"_"+l.gen);else if(B(l))for(var m=l.getKeys(),n=0,o=m.length;o>n;n++){var p=l.getRaw(m[n]);z(p)?k.update(p.name):F(p)?k.update(p.num+"_"+p.gen):C(p)&&k.update(p.length.toString())}var q=a.get("ToUnicode")||d.get("ToUnicode");if(D(q)){var r=q.str||q;g=r.buffer?new Uint8Array(r.buffer.buffer,0,r.bufferLength):new Uint8Array(r.bytes.buffer,r.start,r.end-r.start),k.update(g)}else z(q)&&k.update(q.name);var s=a.get("Widths")||d.get("Widths");s&&(g=new Uint8Array(new Uint32Array(s).buffer),k.update(g))}return{descriptor:j,dict:a,baseDict:d,composite:h,type:f.name,hash:k?k.hexdigest():""}},translateFont:function(b,d){var f,g=b.baseDict,h=b.dict,i=b.composite,j=b.descriptor,k=b.type,l=i?65535:255;if(!j){if("Type3"!==k){var m=h.get("BaseFont");z(m)||c("Base font is not specified"),m=m.name.replace(/[,_]/g,"-");var n=this.getBaseFontMetrics(m),o=m.split("-")[0],p=(this.isSerifFont(o)?Ob.Serif:0)|(n.monospace?Ob.FixedPitch:0)|(Tb[o]?Ob.Symbolic:Ob.Nonsymbolic);return f={type:k,name:m,widths:n.widths,defaultWidth:n.defaultWidth,flags:p,firstChar:0,lastChar:l},this.extractDataStructures(h,h,d,f),f.widths=this.buildCharCodeToWidth(n.widths,f),new dc(m,null,f)}j=new Aa(null),j.set("FontName",ya.get(k)),j.set("FontBBox",h.get("FontBBox"))}var q=h.get("FirstChar")||0,r=h.get("LastChar")||l,s=j.get("FontName"),t=h.get("BaseFont");if(y(s)&&(s=ya.get(s)),y(t)&&(t=ya.get(t)),"Type3"!==k){var u=s&&s.name,v=t&&t.name;u!==v&&(a("The FontDescriptor's FontName is \""+u+'" but should be the same as the Font\'s BaseFont "'+v+'"'),u&&v&&0===v.indexOf(u)&&(s=t))}s=s||t,e(z(s),"invalid font name");var w=j.get("FontFile","FontFile2","FontFile3");if(w&&w.dict){var x=w.dict.get("Subtype");x&&(x=x.name);var A=w.dict.get("Length1"),B=w.dict.get("Length2")}if(f={type:k,name:s.name,subtype:x,file:w,length1:A,length2:B,loadedName:g.loadedName,composite:i,wideChars:i,fixedPitch:!1,fontMatrix:h.get("FontMatrix")||T,firstChar:q||0,lastChar:r||l,bbox:j.get("FontBBox"),ascent:j.get("Ascent"),descent:j.get("Descent"),xHeight:j.get("XHeight"),capHeight:j.get("CapHeight"),flags:j.get("Flags"),italicAngle:j.get("ItalicAngle"),coded:!1},i){var C=g.get("Encoding");z(C)&&(f.cidEncoding=C.name),f.cMap=Hb.create(C,{url:PDFJS.cMapUrl,packed:PDFJS.cMapPacked},null),f.vertical=f.cMap.vertical}return this.extractDataStructures(h,g,d,f),this.extractWidths(h,d,j,f),"Type3"===k&&(f.isType3Font=!0),new dc(s.name,w,f)}},d}(),wb=function(){function a(a,b,c){this.loadedName=a,this.font=b,this.dict=c,this.type3Loaded=null,this.sent=!1}return a.prototype={send:function(a){if(!this.sent){var b=this.font.exportData();a.send("commonobj",[this.loadedName,"Font",b]),this.sent=!0}},loadType3Data:function(a,c,d,f){if(e(this.font.isType3Font),this.type3Loaded)return this.type3Loaded;for(var g=this.font,h=Promise.resolve(),i=this.dict.get("CharProcs").getAll(),j=this.dict.get("Resources")||c,k=Object.keys(i),l={},m=0,n=k.length;n>m;++m)h=h.then(function(c){var e=i[c],g=new xb;return a.getOperatorList(e,f,j,g).then(function(){l[c]=g.getIR(),d.addDependencies(g.dependencies)},function(a){b('Type3 font resource "'+c+'" is not available');var d=new xb;l[c]=d.getIR()})}.bind(this,k[m]));return this.type3Loaded=h.then(function(){g.charProcOperatorList=l}),this.type3Loaded}},a}(),xb=function(){function a(a){for(var b=[],c=a.fnArray,d=a.argsArray,e=0,f=a.length;f>e;e++)switch(c[e]){case $.paintInlineImageXObject:case $.paintInlineImageXObjectGroup:case $.paintImageMaskXObject:var g=d[e][0];g.cached||b.push(g.data.buffer)}return b}function b(a,b,c){this.messageHandler=b,this.fnArray=[],this.argsArray=[],this.dependencies={},this.pageIndex=c,this.intent=a}var c=1e3,d=c-5;return b.prototype={get length(){return this.argsArray.length},addOp:function(a,b){this.fnArray.push(a),this.argsArray.push(b),this.messageHandler&&(this.fnArray.length>=c?this.flush():this.fnArray.length>=d&&(a===$.restore||a===$.endText)&&this.flush())},addDependency:function(a){a in this.dependencies||(this.dependencies[a]=!0,this.addOp($.dependency,[a]))},addDependencies:function(a){for(var b in a)this.addDependency(b)},addOpList:function(a){na.extendObj(this.dependencies,a.dependencies);for(var b=0,c=a.length;c>b;b++)this.addOp(a.fnArray[b],a.argsArray[b])},getIR:function(){return{fnArray:this.fnArray,argsArray:this.argsArray,length:this.length}},flush:function(b){"oplist"!==this.intent&&(new Cb).optimize(this);var c=a(this);this.messageHandler.send("RenderPageChunk",{operatorList:{fnArray:this.fnArray,argsArray:this.argsArray,lastChunk:b,length:this.length},pageIndex:this.pageIndex,intent:this.intent},c),this.dependencies={},this.fnArray.length=0,this.argsArray.length=0}},b}(),yb=function(){function a(a){this.state=a,this.stateStack=[]}return a.prototype={save:function(){var a=this.state;this.stateStack.push(this.state),this.state=a.clone()},restore:function(){var a=this.stateStack.pop();a&&(this.state=a)},transform:function(a){this.state.ctm=na.transform(this.state.ctm,a)}},a}(),zb=function(){function a(){this.ctm=new Float32Array(ma),this.fontSize=0,this.font=null,this.fontMatrix=T,this.textMatrix=ma.slice(),this.textLineMatrix=ma.slice(),this.charSpacing=0,this.wordSpacing=0,this.leading=0,this.textHScale=1,this.textRise=0}return a.prototype={setTextMatrix:function(a,b,c,d,e,f){var g=this.textMatrix;g[0]=a,g[1]=b,g[2]=c,g[3]=d,g[4]=e,g[5]=f},setTextLineMatrix:function(a,b,c,d,e,f){var g=this.textLineMatrix;g[0]=a,g[1]=b,g[2]=c,g[3]=d,g[4]=e,g[5]=f},translateTextMatrix:function(a,b){var c=this.textMatrix;c[4]=c[0]*a+c[2]*b+c[4],c[5]=c[1]*a+c[3]*b+c[5]},translateTextLineMatrix:function(a,b){var c=this.textLineMatrix;c[4]=c[0]*a+c[2]*b+c[4],c[5]=c[1]*a+c[3]*b+c[5]},calcRenderMatrix:function(a){var b=[this.fontSize*this.textHScale,0,0,this.fontSize,0,this.textRise];return na.transform(a,na.transform(this.textMatrix,b))},carriageReturn:function(){this.translateTextLineMatrix(0,-this.leading),this.textMatrix=this.textLineMatrix.slice()},clone:function(){var a=Object.create(this);return a.textMatrix=this.textMatrix.slice(),a.textLineMatrix=this.textLineMatrix.slice(),a.fontMatrix=this.fontMatrix.slice(),a}},a}(),Ab=function(){function a(){this.ctm=new Float32Array(ma),this.font=null,this.textRenderingMode=U.FILL,this.fillColorSpace=Xa.singletons.gray,this.strokeColorSpace=Xa.singletons.gray}return a.prototype={clone:function(){return Object.create(this)}},a}(),Bb=function(){function c(a,b,c){this.parser=new Fc(new Gc(a,d),!1,b),this.stateManager=c,this.nonProcessedArgs=[]}var d={w:{id:$.setLineWidth,numArgs:1,variableArgs:!1},J:{id:$.setLineCap,numArgs:1,variableArgs:!1},j:{id:$.setLineJoin,numArgs:1,variableArgs:!1},M:{id:$.setMiterLimit,numArgs:1,variableArgs:!1},d:{id:$.setDash,numArgs:2,variableArgs:!1},ri:{id:$.setRenderingIntent,numArgs:1,variableArgs:!1},i:{id:$.setFlatness,numArgs:1,variableArgs:!1},gs:{id:$.setGState,numArgs:1,variableArgs:!1},q:{id:$.save,numArgs:0,variableArgs:!1},Q:{id:$.restore,numArgs:0,variableArgs:!1},cm:{id:$.transform,numArgs:6,variableArgs:!1},m:{id:$.moveTo,numArgs:2,variableArgs:!1},l:{id:$.lineTo,numArgs:2,variableArgs:!1},c:{id:$.curveTo,numArgs:6,variableArgs:!1},v:{id:$.curveTo2,numArgs:4,variableArgs:!1},y:{id:$.curveTo3,numArgs:4,variableArgs:!1},h:{id:$.closePath,numArgs:0,variableArgs:!1},re:{id:$.rectangle,numArgs:4,variableArgs:!1},S:{id:$.stroke,numArgs:0,variableArgs:!1},s:{id:$.closeStroke,numArgs:0,variableArgs:!1},f:{id:$.fill,numArgs:0,variableArgs:!1},F:{id:$.fill,numArgs:0,variableArgs:!1},"f*":{id:$.eoFill,numArgs:0,variableArgs:!1},B:{id:$.fillStroke,numArgs:0,variableArgs:!1},"B*":{id:$.eoFillStroke,numArgs:0,variableArgs:!1},b:{id:$.closeFillStroke,numArgs:0,variableArgs:!1},"b*":{id:$.closeEOFillStroke,numArgs:0,variableArgs:!1},n:{id:$.endPath,numArgs:0,variableArgs:!1},W:{id:$.clip,numArgs:0,variableArgs:!1},"W*":{id:$.eoClip,numArgs:0,variableArgs:!1},BT:{id:$.beginText,numArgs:0,variableArgs:!1},ET:{id:$.endText,numArgs:0,variableArgs:!1},Tc:{id:$.setCharSpacing,numArgs:1,variableArgs:!1},Tw:{id:$.setWordSpacing,numArgs:1,variableArgs:!1},Tz:{id:$.setHScale,numArgs:1,variableArgs:!1},TL:{id:$.setLeading,numArgs:1,variableArgs:!1},Tf:{id:$.setFont,numArgs:2,variableArgs:!1},Tr:{id:$.setTextRenderingMode,numArgs:1,variableArgs:!1},Ts:{id:$.setTextRise,numArgs:1,variableArgs:!1},Td:{id:$.moveText,numArgs:2,variableArgs:!1},TD:{id:$.setLeadingMoveText,numArgs:2,variableArgs:!1},Tm:{id:$.setTextMatrix,numArgs:6,variableArgs:!1},"T*":{id:$.nextLine,numArgs:0,variableArgs:!1},Tj:{id:$.showText,numArgs:1,variableArgs:!1},TJ:{id:$.showSpacedText,numArgs:1,variableArgs:!1},"'":{id:$.nextLineShowText,numArgs:1,variableArgs:!1},'"':{id:$.nextLineSetSpacingShowText,numArgs:3,variableArgs:!1},d0:{id:$.setCharWidth,numArgs:2,variableArgs:!1},d1:{id:$.setCharWidthAndBounds,numArgs:6,variableArgs:!1},CS:{id:$.setStrokeColorSpace,numArgs:1,variableArgs:!1},cs:{id:$.setFillColorSpace,numArgs:1,variableArgs:!1},SC:{id:$.setStrokeColor,numArgs:4,variableArgs:!0},SCN:{id:$.setStrokeColorN,numArgs:33,variableArgs:!0},sc:{id:$.setFillColor,numArgs:4,variableArgs:!0},scn:{id:$.setFillColorN,numArgs:33,variableArgs:!0},G:{id:$.setStrokeGray,numArgs:1,variableArgs:!1},g:{id:$.setFillGray,numArgs:1,variableArgs:!1},RG:{id:$.setStrokeRGBColor,numArgs:3,variableArgs:!1},rg:{id:$.setFillRGBColor,numArgs:3,variableArgs:!1},K:{id:$.setStrokeCMYKColor,numArgs:4,variableArgs:!1},k:{id:$.setFillCMYKColor,numArgs:4,variableArgs:!1},sh:{id:$.shadingFill,numArgs:1,variableArgs:!1},BI:{id:$.beginInlineImage,numArgs:0,variableArgs:!1},ID:{id:$.beginImageData,numArgs:0,variableArgs:!1},EI:{id:$.endInlineImage,numArgs:1,variableArgs:!1},Do:{id:$.paintXObject,numArgs:1,variableArgs:!1},MP:{id:$.markPoint,numArgs:1,variableArgs:!1},DP:{id:$.markPointProps,numArgs:2,variableArgs:!1},BMC:{id:$.beginMarkedContent,numArgs:1,variableArgs:!1},BDC:{id:$.beginMarkedContentProps,numArgs:2,variableArgs:!1},EMC:{id:$.endMarkedContent,numArgs:0,variableArgs:!1},BX:{id:$.beginCompat,numArgs:0,variableArgs:!1},EX:{id:$.endCompat,numArgs:0,variableArgs:!1},BM:null,BD:null,"true":null,fa:null,fal:null,fals:null,"false":null,nu:null,nul:null,"null":null};return c.prototype={get savedStatesDepth(){return this.stateManager.stateStack.length},read:function(c){for(var f=c.args;;){var g=this.parser.getObj();if(A(g)){var h=g.cmd,i=d[h];if(!i){b('Unknown command "'+h+'"');continue}var j=i.id,k=i.numArgs,l=null!==f?f.length:0;if(i.variableArgs)l>k&&a("Command "+j+": expected [0,"+k+"] args, but received "+l+" args");else{if(l!==k){for(var m=this.nonProcessedArgs;l>k;)m.push(f.shift()),l--;for(;k>l&&0!==m.length;)f||(f=[]),f.unshift(m.pop()),l++}if(k>l){a("Command "+j+": because expected "+k+" args, but received "+l+" args; skipping"),f=null;continue}}return this.preprocessCommand(j,f),c.fn=j,c.args=f,!0}if(R(g))return!1;null!==g&&(f||(f=[]),f.push(g instanceof Aa?g.getAll():g),e(f.length<=33,"Too many arguments"))}},preprocessCommand:function(a,b){switch(0|a){case $.save:this.stateManager.save();break;case $.restore:this.stateManager.restore();break;case $.transform:this.stateManager.transform(b)}}},c}(),Cb=function(){function a(a,b,c){for(var d=a,e=0,f=b.length-1;f>e;e++){var g=b[e];d=d[g]||(d[g]=[])}d[b[b.length-1]]=c}function b(a,b,c,d){for(var e=a+2,f=0;b>f;f++){var g=d[e+4*f],h=1===g.length&&g[0];if(!h||1!==h.width||1!==h.height||h.data.length&&(1!==h.data.length||0!==h.data[0]))break;c[e+4*f]=$.paintSolidColorImageMask}return b-f}function c(){}var d=[];return a(d,[$.save,$.transform,$.paintInlineImageXObject,$.restore],function(a){for(var b=10,c=200,d=1e3,e=1,f=a.fnArray,g=a.argsArray,h=a.iCurr,i=h-3,j=h-2,k=h-1,l=i+4,m=f.length;m>l+3&&f[l]===$.save&&f[l+1]===$.transform&&f[l+2]===$.paintInlineImageXObject&&f[l+3]===$.restore;)l+=4;var n=Math.min((l-i)/4,c);if(b>n)return l;var o,p=0,q=[],r=0,s=e,t=e;for(o=0;n>o;o++){var u=g[j+(o<<2)],v=g[k+(o<<2)][0];s+v.width>d&&(p=Math.max(p,s),t+=r+2*e,s=0,r=0),q.push({transform:u,x:s,y:t,w:v.width,h:v.height}),s+=v.width+2*e,r=Math.max(r,v.height)}var w=Math.max(p,s)+e,x=t+r+e,y=new Uint8Array(w*x*4),z=w<<2;for(o=0;n>o;o++){var A=g[k+(o<<2)][0].data,B=q[o].w<<2,C=0,D=q[o].x+q[o].y*w<<2;y.set(A.subarray(0,B),D-z);for(var E=0,F=q[o].h;F>E;E++)y.set(A.subarray(C,C+B),D),C+=B,D+=z;for(y.set(A.subarray(C-B,C),D);D>=0;)A[D-4]=A[D],A[D-3]=A[D+1],A[D-2]=A[D+2],A[D-1]=A[D+3],A[D+B]=A[D+B-4],A[D+B+1]=A[D+B-3],A[D+B+2]=A[D+B-2],A[D+B+3]=A[D+B-1],D-=z}return f.splice(i,4*n,$.paintInlineImageXObjectGroup),g.splice(i,4*n,[{width:w,height:x,kind:V.RGBA_32BPP,data:y},q]),i+1}),a(d,[$.save,$.transform,$.paintImageMaskXObject,$.restore],function(a){for(var c=10,d=100,e=1e3,f=a.fnArray,g=a.argsArray,h=a.iCurr,i=h-3,j=h-2,k=h-1,l=i+4,m=f.length;m>l+3&&f[l]===$.save&&f[l+1]===$.transform&&f[l+2]===$.paintImageMaskXObject&&f[l+3]===$.restore;)l+=4;var n=(l-i)/4;if(n=b(i,n,f,g),c>n)return l;var o,p,q,r=!1,s=g[k][0];if(0===g[j][1]&&0===g[j][2]){r=!0;var t=g[j][0],u=g[j][3];p=j+4;var v=k+4;for(o=1;n>o;o++,p+=4,v+=4)if(q=g[p],g[v][0]!==s||q[0]!==t||0!==q[1]||0!==q[2]||q[3]!==u){c>o?r=!1:n=o;break}}if(r){n=Math.min(n,e);var w=new Float32Array(2*n);for(p=j,o=0;n>o;o++,p+=4)q=g[p],w[o<<1]=q[4],w[(o<<1)+1]=q[5];f.splice(i,4*n,$.paintImageMaskXObjectRepeat),g.splice(i,4*n,[s,t,u,w])}else{n=Math.min(n,d);var x=[];for(o=0;n>o;o++){q=g[j+(o<<2)];var y=g[k+(o<<2)][0];x.push({data:y.data,width:y.width,height:y.height,transform:q})}f.splice(i,4*n,$.paintImageMaskXObjectGroup),g.splice(i,4*n,[x])}return i+1}),a(d,[$.save,$.transform,$.paintImageXObject,$.restore],function(a){var b=3,c=1e3,d=a.fnArray,e=a.argsArray,f=a.iCurr,g=f-3,h=f-2,i=f-1,j=f;if(0!==e[h][1]||0!==e[h][2])return j+1;for(var k=e[i][0],l=e[h][0],m=e[h][3],n=g+4,o=d.length;o>n+3&&d[n]===$.save&&d[n+1]===$.transform&&d[n+2]===$.paintImageXObject&&d[n+3]===$.restore&&e[n+1][0]===l&&0===e[n+1][1]&&0===e[n+1][2]&&e[n+1][3]===m&&e[n+2][0]===k;)n+=4;var p=Math.min((n-g)/4,c);if(b>p)return n;for(var q=new Float32Array(2*p),r=h,s=0;p>s;s++,r+=4){var t=e[r];q[s<<1]=t[4],q[(s<<1)+1]=t[5]}var u=[k,l,m,q];return d.splice(g,4*p,$.paintImageXObjectRepeat),e.splice(g,4*p,u),g+1}),a(d,[$.beginText,$.setFont,$.setTextMatrix,$.showText,$.endText],function(a){for(var b=3,c=1e3,d=a.fnArray,e=a.argsArray,f=a.iCurr,g=f-4,h=f-3,i=f-2,j=f-1,k=f,l=e[h][0],m=e[h][1],n=g+5,o=d.length;o>n+4&&d[n]===$.beginText&&d[n+1]===$.setFont&&d[n+2]===$.setTextMatrix&&d[n+3]===$.showText&&d[n+4]===$.endText&&e[n+1][0]===l&&e[n+1][1]===m;)n+=5;var p=Math.min((n-g)/5,c);if(b>p)return n;var q=g;g>=4&&d[g-4]===d[h]&&d[g-3]===d[i]&&d[g-2]===d[j]&&d[g-1]===d[k]&&e[g-4][0]===l&&e[g-4][1]===m&&(p++,q-=5);for(var r=q+4,s=1;p>s;s++)d.splice(r,3),e.splice(r,3),r+=2;return r+1}),c.prototype={optimize:function(a){for(var b,c=a.fnArray,e=a.argsArray,f={iCurr:0,fnArray:c,argsArray:e},g=0,h=c.length;h>g;)b=(b||d)[c[g]],"function"==typeof b?(f.iCurr=g,g=b(f),b=void 0,h=f.fnArray.length):g++}},c}(),Db=["Adobe-GB1-UCS2","Adobe-CNS1-UCS2","Adobe-Japan1-UCS2","Adobe-Korea1-UCS2","78-EUC-H","78-EUC-V","78-H","78-RKSJ-H","78-RKSJ-V","78-V","78ms-RKSJ-H","78ms-RKSJ-V","83pv-RKSJ-H","90ms-RKSJ-H","90ms-RKSJ-V","90msp-RKSJ-H","90msp-RKSJ-V","90pv-RKSJ-H","90pv-RKSJ-V","Add-H","Add-RKSJ-H","Add-RKSJ-V","Add-V","Adobe-CNS1-0","Adobe-CNS1-1","Adobe-CNS1-2","Adobe-CNS1-3","Adobe-CNS1-4","Adobe-CNS1-5","Adobe-CNS1-6","Adobe-GB1-0","Adobe-GB1-1","Adobe-GB1-2","Adobe-GB1-3","Adobe-GB1-4","Adobe-GB1-5","Adobe-Japan1-0","Adobe-Japan1-1","Adobe-Japan1-2","Adobe-Japan1-3","Adobe-Japan1-4","Adobe-Japan1-5","Adobe-Japan1-6","Adobe-Korea1-0","Adobe-Korea1-1","Adobe-Korea1-2","B5-H","B5-V","B5pc-H","B5pc-V","CNS-EUC-H","CNS-EUC-V","CNS1-H","CNS1-V","CNS2-H","CNS2-V","ETHK-B5-H","ETHK-B5-V","ETen-B5-H","ETen-B5-V","ETenms-B5-H","ETenms-B5-V","EUC-H","EUC-V","Ext-H","Ext-RKSJ-H","Ext-RKSJ-V","Ext-V","GB-EUC-H","GB-EUC-V","GB-H","GB-V","GBK-EUC-H","GBK-EUC-V","GBK2K-H","GBK2K-V","GBKp-EUC-H","GBKp-EUC-V","GBT-EUC-H","GBT-EUC-V","GBT-H","GBT-V","GBTpc-EUC-H","GBTpc-EUC-V","GBpc-EUC-H","GBpc-EUC-V","H","HKdla-B5-H","HKdla-B5-V","HKdlb-B5-H","HKdlb-B5-V","HKgccs-B5-H","HKgccs-B5-V","HKm314-B5-H","HKm314-B5-V","HKm471-B5-H","HKm471-B5-V","HKscs-B5-H","HKscs-B5-V","Hankaku","Hiragana","KSC-EUC-H","KSC-EUC-V","KSC-H","KSC-Johab-H","KSC-Johab-V","KSC-V","KSCms-UHC-H","KSCms-UHC-HW-H","KSCms-UHC-HW-V","KSCms-UHC-V","KSCpc-EUC-H","KSCpc-EUC-V","Katakana","NWP-H","NWP-V","RKSJ-H","RKSJ-V","Roman","UniCNS-UCS2-H","UniCNS-UCS2-V","UniCNS-UTF16-H","UniCNS-UTF16-V","UniCNS-UTF32-H","UniCNS-UTF32-V","UniCNS-UTF8-H","UniCNS-UTF8-V","UniGB-UCS2-H","UniGB-UCS2-V","UniGB-UTF16-H","UniGB-UTF16-V","UniGB-UTF32-H","UniGB-UTF32-V","UniGB-UTF8-H","UniGB-UTF8-V","UniJIS-UCS2-H","UniJIS-UCS2-HW-H","UniJIS-UCS2-HW-V","UniJIS-UCS2-V","UniJIS-UTF16-H","UniJIS-UTF16-V","UniJIS-UTF32-H","UniJIS-UTF32-V","UniJIS-UTF8-H","UniJIS-UTF8-V","UniJIS2004-UTF16-H","UniJIS2004-UTF16-V","UniJIS2004-UTF32-H","UniJIS2004-UTF32-V","UniJIS2004-UTF8-H","UniJIS2004-UTF8-V","UniJISPro-UCS2-HW-V","UniJISPro-UCS2-V","UniJISPro-UTF8-V","UniJISX0213-UTF32-H","UniJISX0213-UTF32-V","UniJISX02132004-UTF32-H","UniJISX02132004-UTF32-V","UniKS-UCS2-H","UniKS-UCS2-V","UniKS-UTF16-H","UniKS-UTF16-V","UniKS-UTF32-H","UniKS-UTF32-V","UniKS-UTF8-H","UniKS-UTF8-V","V","WP-Symbol"],Eb=function(){function a(a){this.codespaceRanges=[[],[],[],[]],this.numCodespaceRanges=0,this._map=[],this.name="",this.vertical=!1,this.useCMap=null,this.builtInCMap=a}return a.prototype={addCodespaceRange:function(a,b,c){this.codespaceRanges[a-1].push(b,c),this.numCodespaceRanges++},mapCidRange:function(a,b,c){for(;b>=a;)this._map[a++]=c++},mapBfRange:function(a,b,c){for(var d=c.length-1;b>=a;)this._map[a++]=c,c=c.substr(0,d)+String.fromCharCode(c.charCodeAt(d)+1)},mapBfRangeToArray:function(a,b,c){for(var d=0,e=c.length;b>=a&&e>d;)this._map[a]=c[d++],++a},mapOne:function(a,b){this._map[a]=b},lookup:function(a){return this._map[a]},contains:function(a){return void 0!==this._map[a]},forEach:function(a){var b,c=this._map,d=c.length;if(65536>=d)for(b=0;d>b;b++)void 0!==c[b]&&a(b,c[b]);else for(b in this._map)a(b,c[b])},charCodeOf:function(a){return this._map.indexOf(a)},getMap:function(){return this._map},readCharCode:function(a,b,c){for(var d=0,e=this.codespaceRanges,f=this.codespaceRanges.length,g=0;f>g;g++){d=(d<<8|a.charCodeAt(b+g))>>>0;for(var h=e[g],i=0,j=h.length;j>i;){var k=h[i++],l=h[i++];if(d>=k&&l>=d)return c.charcode=d,void(c.length=g+1)}}c.charcode=0,c.length=1},get length(){return this._map.length},get isIdentityCMap(){if("Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(var a=0;65536>a;a++)if(this._map[a]!==a)return!1;return!0}},a}(),Fb=function(){function a(a,b){Eb.call(this),this.vertical=a,this.addCodespaceRange(b,0,65535)}return na.inherit(a,Eb,{}),a.prototype={addCodespaceRange:Eb.prototype.addCodespaceRange,mapCidRange:function(a,b,d){c("should not call mapCidRange")},mapBfRange:function(a,b,d){c("should not call mapBfRange")},mapBfRangeToArray:function(a,b,d){c("should not call mapBfRangeToArray")},mapOne:function(a,b){c("should not call mapCidOne")},lookup:function(a){return w(a)&&65535>=a?a:void 0},contains:function(a){return w(a)&&65535>=a},forEach:function(a){for(var b=0;65535>=b;b++)a(b,b)},charCodeOf:function(a){return w(a)&&65535>=a?a:-1},getMap:function(){for(var a=new Array(65536),b=0;65535>=b;b++)a[b]=b;return a},readCharCode:Eb.prototype.readCharCode,get length(){return 65536},get isIdentityCMap(){c("should not access .isIdentityCMap")}},a}(),Gb=function(){function a(a){var b=PDFJS.disableWorker,d=new XMLHttpRequest;if(d.open("GET",a,!1),!b)try{d.responseType="arraybuffer",b="arraybuffer"!==d.responseType}catch(e){b=!0}if(b&&d.overrideMimeType&&d.overrideMimeType("text/plain; charset=x-user-defined"),d.send(null),(b?d.responseText:d.response)||c("Unable to get binary cMap at: "+a),b){var f=Array.prototype.map.call(d.responseText,function(a){return 255&a.charCodeAt(0)});return new Uint8Array(f)}return new Uint8Array(d.response)}function b(a,b){for(var c=0,d=0;b>=d;d++)c=c<<8|a[d];return c>>>0}function d(a,b){return 1===b?String.fromCharCode(a[0],a[1]):3===b?String.fromCharCode(a[0],a[1],a[2],a[3]):String.fromCharCode.apply(null,a.subarray(0,b+1))}function f(a,b,c){for(var d=0,e=c;e>=0;e--)d+=a[e]+b[e],a[e]=255&d,d>>=8}function g(a,b){for(var c=1,d=b;d>=0&&c>0;d--)c+=a[d],a[d]=255&c,c>>=8}function h(a){this.buffer=a,this.pos=0,this.end=a.length,this.tmpBuf=new Uint8Array(l)}function i(i,j,l){var m=a(i),n=new h(m),o=n.readByte();j.vertical=!!(1&o);for(var p,q,r=null,s=new Uint8Array(k),t=new Uint8Array(k),u=new Uint8Array(k),v=new Uint8Array(k),w=new Uint8Array(k);(q=n.readByte())>=0;){var x=q>>5;if(7!==x){var y=!!(16&q),z=15&q;e(k>=z+1);var A,B=1,C=n.readNumber();switch(x){case 0:for(n.readHex(s,z),n.readHexNumber(t,z),f(t,s,z),j.addCodespaceRange(z+1,b(s,z),b(t,z)),A=1;C>A;A++)g(t,z),n.readHexNumber(s,z),f(s,t,z),n.readHexNumber(t,z),f(t,s,z),j.addCodespaceRange(z+1,b(s,z),b(t,z));break;case 1:for(n.readHex(s,z),n.readHexNumber(t,z),f(t,s,z),p=n.readNumber(),A=1;C>A;A++)g(t,z),n.readHexNumber(s,z),f(s,t,z),n.readHexNumber(t,z),f(t,s,z),p=n.readNumber();break;case 2:for(n.readHex(u,z),p=n.readNumber(),j.mapOne(b(u,z),p),A=1;C>A;A++)g(u,z),y||(n.readHexNumber(w,z),f(u,w,z)),p=n.readSigned()+(p+1),j.mapOne(b(u,z),p);break;case 3:for(n.readHex(s,z),n.readHexNumber(t,z),f(t,s,z),p=n.readNumber(),j.mapCidRange(b(s,z),b(t,z),p),A=1;C>A;A++)g(t,z),y?s.set(t):(n.readHexNumber(s,z),f(s,t,z)),n.readHexNumber(t,z),f(t,s,z),p=n.readNumber(),j.mapCidRange(b(s,z),b(t,z),p);break;case 4:for(n.readHex(u,B),n.readHex(v,z),j.mapOne(b(u,B),d(v,z)),A=1;C>A;A++)g(u,B),y||(n.readHexNumber(w,B),f(u,w,B)),g(v,z),n.readHexSigned(w,z),f(v,w,z),j.mapOne(b(u,B),d(v,z));break;case 5:for(n.readHex(s,B),n.readHexNumber(t,B),f(t,s,B),n.readHex(v,z),j.mapBfRange(b(s,B),b(t,B),d(v,z)),A=1;C>A;A++)g(t,B),y?s.set(t):(n.readHexNumber(s,B),f(s,t,B)),n.readHexNumber(t,B),f(t,s,B),n.readHex(v,z),j.mapBfRange(b(s,B),b(t,B),d(v,z));break;default:c("Unknown type: "+x)}}else switch(31&q){case 0:n.readString();break;case 1:r=n.readString()}}return r&&l(r),j}function j(){}var k=16,l=19;return h.prototype={readByte:function(){return this.pos>=this.end?-1:this.buffer[this.pos++]},readNumber:function(){var a,b=0;do{var d=this.readByte();0>d&&c("unexpected EOF in bcmap"),a=!(128&d),b=b<<7|127&d}while(!a);return b},readSigned:function(){var a=this.readNumber();return 1&a?~(a>>>1):a>>>1},readHex:function(a,b){a.set(this.buffer.subarray(this.pos,this.pos+b+1)),this.pos+=b+1},readHexNumber:function(a,b){var d,e=this.tmpBuf,f=0;do{var g=this.readByte();0>g&&c("unexpected EOF in bcmap"),d=!(128&g),e[f++]=127&g}while(!d);for(var h=b,i=0,j=0;h>=0;){for(;8>j&&e.length>0;)i=e[--f]<>=8,j-=8}},readHexSigned:function(a,b){this.readHexNumber(a,b);for(var c=1&a[b]?255:0,d=0,e=0;b>=e;e++)d=(1&d)<<8|a[e],a[e]=d>>1^c},readString:function(){for(var a=this.readNumber(),b="",c=0;a>c;c++)b+=String.fromCharCode(this.readNumber());return b}},j.prototype={read:i},j}(),Hb=function(){function a(a){for(var b=0,c=0;c>>0}function d(a){y(a)||c("Malformed CMap: expected string.")}function f(a){w(a)||c("Malformed CMap: expected int.")}function g(b,c){for(;;){var e=c.getObj();if(R(e))break;if(A(e,"endbfchar"))return;d(e);var f=a(e);e=c.getObj(),d(e);var g=e;b.mapOne(f,g)}}function h(b,e){for(;;){var f=e.getObj();if(R(f))break;if(A(f,"endbfrange"))return;d(f);var g=a(f);f=e.getObj(),d(f);var h=a(f);if(f=e.getObj(),w(f)||y(f)){var i=w(f)?String.fromCharCode(f):f;b.mapBfRange(g,h,i)}else{if(!A(f,"["))break;f=e.getObj();for(var j=[];!A(f,"]")&&!R(f);)j.push(f),f=e.getObj();b.mapBfRangeToArray(g,h,j)}}c("Invalid bf range.")}function i(b,c){for(;;){var e=c.getObj();if(R(e))break;if(A(e,"endcidchar"))return;d(e);var g=a(e);e=c.getObj(),f(e);var h=e;b.mapOne(g,h)}}function j(b,c){for(;;){var e=c.getObj();if(R(e))break;if(A(e,"endcidrange"))return;d(e);var g=a(e);e=c.getObj(),d(e);var h=a(e);e=c.getObj(),f(e);var i=e;b.mapCidRange(g,h,i)}}function k(b,d){for(;;){var e=d.getObj();if(R(e))break;if(A(e,"endcodespacerange"))return;if(!y(e))break;var f=a(e);if(e=d.getObj(),!y(e))break;var g=a(e);b.addCodespaceRange(e.length,f,g)}c("Invalid codespace range.")}function l(a,b){var c=b.getObj();w(c)&&(a.vertical=!!c)}function m(a,b){var c=b.getObj();z(c)&&y(c.name)&&(a.name=c.name)}function n(a,b,c,d){var e,f;a:for(;;){var n=b.getObj();if(R(n))break;if(z(n))"WMode"===n.name?l(a,b):"CMapName"===n.name&&m(a,b),e=n;else if(A(n))switch(n.cmd){case"endcmap":break a;case"usecmap":z(e)&&(f=e.name);break;case"begincodespacerange":k(a,b);break;case"beginbfchar":g(a,b);break;case"begincidchar":i(a,b);break;case"beginbfrange":h(a,b);break;case"begincidrange":j(a,b)}}!d&&f&&(d=f),d&&o(a,c,d)}function o(a,b,c){if(a.useCMap=q(c,b),0===a.numCodespaceRanges){for(var d=a.useCMap.codespaceRanges,e=0;e=b;b++)a(b,b)},has:function(a){return this.firstChar<=a&&a<=this.lastChar},get:function(a){return this.firstChar<=a&&a<=this.lastChar?String.fromCharCode(a):void 0},charCodeOf:function(a){c("should not call .charCodeOf")}},a}(),bc=function(){function a(a,b,c){a[b]=c>>8&255,a[b+1]=255&c}function b(a,b,c){a[b]=c>>24&255,a[b+1]=c>>16&255,a[b+2]=c>>8&255,a[b+3]=255&c}function c(a,b,c){var d,e;if(c instanceof Uint8Array)a.set(c,b);else if("string"==typeof c)for(d=0,e=c.length;e>d;d++)a[b++]=255&c.charCodeAt(d);else for(d=0,e=c.length;e>d;d++)a[b++]=255&c[d]}function d(a){this.sfnt=a,this.tables=Object.create(null)}d.getSearchParams=function(a,b){for(var c=1,d=0;(c^a)>c;)c<<=1,d++;var e=c*b;return{range:e,entry:d,rangeShift:b*a-e}};var e=12,f=16;return d.prototype={toArray:function(){var g=this.sfnt,h=this.tables,i=Object.keys(h);i.sort();var j,l,m,n,o,p=i.length,q=e+p*f,r=[q];for(j=0;p>j;j++){n=h[i[j]];var s=(n.length+3&-4)>>>0;q+=s,r.push(q)}var t=new Uint8Array(q);for(j=0;p>j;j++)n=h[i[j]],c(t,r[j],n);"true"===g&&(g=k(65536)),t[0]=255&g.charCodeAt(0),t[1]=255&g.charCodeAt(1),t[2]=255&g.charCodeAt(2),t[3]=255&g.charCodeAt(3),a(t,4,p);var u=d.getSearchParams(p,16);for(a(t,6,u.range),a(t,8,u.entry),a(t,10,u.rangeShift),q=e,j=0;p>j;j++){o=i[j],t[q]=255&o.charCodeAt(0),t[q+1]=255&o.charCodeAt(1),t[q+2]=255&o.charCodeAt(2),t[q+3]=255&o.charCodeAt(3);var v=0;for(l=r[j],m=r[j+1];m>l;l+=4){var w=(t[l]<<24)+(t[l+1]<<16)+(t[l+2]<<8)+t[l+3];v=v+w|0}b(t,q+4,v),b(t,q+8,r[j]),b(t,q+12,h[o].length),q+=f}return t},addTable:function(a,b){if(a in this.tables)throw new Error("Table "+a+" already exists");this.tables[a]=b}},d}(),cc=new Int32Array([0,32,127,161,173,174,1536,1920,2208,4256,6016,6144,8192,8208,8209,8210,8232,8240,8287,8304,9676,9677,43616,43648,65520,65536]),dc=function(){function d(d,e,f){var g,h,i;this.name=d,this.loadedName=f.loadedName,this.isType3Font=f.isType3Font,this.sizes=[],this.glyphCache={};var j=d.split("+");j=j.length>1?j[1]:j[0],j=j.split(/[-,_]/g)[0],this.isSerifFont=!!(f.flags&Ob.Serif),this.isSymbolicFont=!!(f.flags&Ob.Symbolic),this.isMonospace=!!(f.flags&Ob.FixedPitch);var k=f.type,l=f.subtype;if(this.type=k,this.fallbackName=this.isMonospace?"monospace":this.isSerifFont?"serif":"sans-serif",this.differences=f.differences,this.widths=f.widths,this.defaultWidth=f.defaultWidth,this.composite=f.composite,this.wideChars=f.wideChars,this.cMap=f.cMap,this.ascent=f.ascent/Lb,this.descent=f.descent/Lb,this.fontMatrix=f.fontMatrix,this.bbox=f.bbox,this.toUnicode=f.toUnicode=this.buildToUnicode(f),this.toFontChar=[],"Type3"===f.type){for(g=0;256>g;g++)this.toFontChar[g]=this.differences[g]||f.defaultEncoding[g];return void(this.fontType=Z.TYPE3)}if(this.cidEncoding=f.cidEncoding,this.vertical=f.vertical,this.vertical&&(this.vmetrics=f.vmetrics,this.defaultVMetrics=f.defaultVMetrics),!e||e.isEmpty){e&&b('Font file is empty in "'+d+'" ('+this.loadedName+")"),this.missingFile=!0;var o=d.replace(/[,_]/g,"-"),p=!!Qb[o]||!(!Rb[o]||!Qb[Rb[o]]);if(o=Qb[o]||Rb[o]||o,this.bold=-1!==o.search(/bold/gi),this.italic=-1!==o.search(/oblique/gi)||-1!==o.search(/italic/gi),this.black=-1!==d.search(/Black/g),this.remeasure=Object.keys(this.widths).length>0,p&&"CIDFontType2"===k&&0===f.cidEncoding.indexOf("Identity-")){var q=[];for(g in Ub)q[+g]=Ub[g];if(/ArialBlack/i.test(d))for(g in Vb)q[+g]=Vb[g];var r=this.toUnicode instanceof ac;r||this.toUnicode.forEach(function(a,b){q[+a]=b}),this.toFontChar=q,this.toUnicode=new _b(q)}else if(/Symbol/i.test(o)){var s=Pb.SymbolSetEncoding;for(g in s)i=zc[s[g]],i&&(this.toFontChar[g]=i);for(g in f.differences)i=zc[f.differences[g]],i&&(this.toFontChar[g]=i)}else if(/Dingbats/i.test(o)){/Wingdings/i.test(d)&&b("Wingdings font without embedded font file, falling back to the ZapfDingbats encoding.");var t=Pb.ZapfDingbatsEncoding;for(g in t)i=Ac[t[g]],i&&(this.toFontChar[g]=i);for(g in f.differences)i=Ac[f.differences[g]],i&&(this.toFontChar[g]=i)}else if(p){this.toFontChar=[];for(g in f.defaultEncoding)h=f.differences[g]||f.defaultEncoding[g],this.toFontChar[g]=zc[h]}else{var u=-1===k.indexOf("CIDFontType");this.toUnicode.forEach(function(a,b){u&&(h=f.differences[a]||f.defaultEncoding[a],b=zc[h]||b),this.toFontChar[a]=b}.bind(this))}return this.loadedName=o.split("-")[0],this.loading=!1,void(this.fontType=P(k,l))}"Type1C"===l&&"Type1"!==k&&"MMType1"!==k&&(m(e)?l="TrueType":k="Type1"),"CIDFontType0C"===l&&"CIDFontType0"!==k&&(k="CIDFontType0"),"OpenType"===l&&(k="OpenType"),"CIDFontType0"===k&&(l=n(e)?"CIDFontType0":"CIDFontType0C");var v;switch(k){case"MMType1":a("MMType1 font ("+d+"), falling back to Type1.");case"Type1":case"CIDFontType0":this.mimetype="font/opentype";var w="Type1C"===l||"CIDFontType0C"===l?new jc(e,f):new ic(d,e,f);O(f),v=this.convert(d,w,f);break;case"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype",v=this.checkAndRepair(d,e,f),this.isOpenType&&(k="OpenType");break;default:c("Font "+k+" is not supported")}this.data=v,this.fontType=P(k,l),this.fontMatrix=f.fontMatrix,this.widths=f.widths,this.defaultWidth=f.defaultWidth,this.encoding=f.baseEncoding,this.seacMap=f.seacMap,this.loading=!0}function f(a,b){return(a<<8)+b}function h(a,b,c,d){return(a<<24)+(b<<16)+(c<<8)+d}function j(a){return String.fromCharCode(a>>8&255,255&a)}function l(a){return a=a>32767?32767:-32768>a?-32768:a,String.fromCharCode(a>>8&255,255&a)}function m(a){var b=a.peekBytes(4);return 65536===o(b,0)}function n(a){var b=a.peekBytes(2);return 37===b[0]&&33===b[1]?!0:128===b[0]&&1===b[1]?!0:!1}function p(a){for(var b=0,c=cc.length-1;c>b;){var d=b+c+1>>1;a=i)do l=i++,Kb&&61440===l&&(l=61472,i=l+1);while(void 0!==h[l]&&Jb>=i);f[l]=k,g[j]=l,h[l]=!0}return{toFontChar:g,charCodeToGlyphId:f,nextAvailableFontCharCode:i}}function r(a){var b=[];for(var c in a)b.push({fontCharCode:0|c,glyphId:a[c]});b.sort(function(a,b){return a.fontCharCode-b.fontCharCode});for(var d=[],e=b.length,f=0;e>f;){var g=b[f].fontCharCode,h=[b[f].glyphId];++f;for(var i=g;e>f&&i+1===b[f].fontCharCode&&(h.push(b[f].glyphId),++i,++f,65535!==i););d.push([g,i,h])}return d}function s(a){var b,c,d,e,f=r(a),g=f[f.length-1][1]>65535?2:1,h="\x00\x00"+j(g)+"\x00\x00"+k(4+8*g);for(b=f.length-1;b>=0&&!(f[b][0]<=65535);--b);var i=b+1;f[b][0]<65535&&65535===f[b][1]&&(f[b][1]=65534);var l,m,n,o,p=f[b][1]<65535?1:0,q=i+p,s=bc.getSearchParams(q,2),t="",u="",v="",w="",x="",y=0;for(b=0,c=i;c>b;b++){l=f[b],m=l[0],n=l[1],t+=j(m),u+=j(n),o=l[2];var z=!0;for(d=1,e=o.length;e>d;++d)if(o[d]!==o[d-1]+1){z=!1;break}if(z){var A=o[0];v+=j(A-m&65535),w+=j(0)}else{var B=2*(q-b)+2*y;for(y+=n-m+1,v+=j(0),w+=j(B),d=0,e=o.length;e>d;++d)x+=j(o[d])}}p>0&&(u+="ÿÿ",t+="ÿÿ",v+="\x00",w+="\x00\x00");var C="\x00\x00"+j(2*q)+j(s.range)+j(s.entry)+j(s.rangeShift)+u+"\x00\x00"+t+v+w+x,D="",E="";if(g>1){for(h+="\x00\x00\n"+k(4+8*g+4+C.length),D="",b=0,c=f.length;c>b;b++){l=f[b],m=l[0],o=l[2];var F=o[0];for(d=1,e=o.length;e>d;++d)o[d]!==o[d-1]+1&&(n=l[0]+d-1,D+=k(m)+k(n)+k(F),m=n+1,F=o[d]);D+=k(m)+k(l[1])+k(F)}E="\x00\f\x00\x00"+k(D.length+16)+"\x00\x00\x00\x00"+k(D.length/12)}return h+"\x00"+j(C.length+4)+C+E+D}function t(a){var b=new Mc(a.data),c=b.getUint16();b.getBytes(60);var d=b.getUint16();if(4>c&&768&d)return!1;var e=b.getUint16(),f=b.getUint16();if(e>f)return!1;b.getBytes(6);var g=b.getUint16();return 0===g?!1:(a.data[8]=a.data[9]=0,!0)}function u(a,b,d){d=d||{unitsPerEm:0,yMax:0,yMin:0,ascent:0,descent:0};var e=0,f=0,g=0,h=0,i=null,l=0;if(b)for(var m in b){m|=0,(i>m||!i)&&(i=m),m>l&&(l=m);var n=L(m);32>n?e|=1<n?f|=1<n?g|=1<n?h|=1< 123 are reserved for internal usage")}else i=0,l=255;var o=a.bbox||[0,0,0,0],p=d.unitsPerEm||1/(a.fontMatrix||T)[0],q=a.ascentScaled?1:p/Lb,r=d.ascent||Math.round(q*(a.ascent||o[3])),s=d.descent||Math.round(q*(a.descent||o[1]));s>0&&a.descent>0&&o[1]<0&&(s=-s);var t=d.yMax||r,u=-d.yMin||-s;return"\x00$ô\x00\x00\x00Š»\x00\x00\x00ŒŠ»\x00\x00ß\x001\x00\x00\x00\x00"+String.fromCharCode(a.fixedPitch?9:0)+"\x00\x00\x00\x00\x00\x00"+k(e)+k(f)+k(g)+k(h)+"*21*"+j(a.italicAngle?1:0)+j(i||a.firstChar)+j(l||a.lastChar)+j(r)+j(s)+"\x00d"+j(t)+j(u)+"\x00\x00\x00\x00\x00\x00\x00\x00"+j(a.xHeight)+j(a.capHeight)+j(0)+j(i||a.firstChar)+"\x00"}function v(a){var b=Math.floor(a.italicAngle*Math.pow(2,16));return"\x00\x00\x00"+k(b)+"\x00\x00\x00\x00"+k(a.fixedPitch)+"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"}function w(a,b){b||(b=[[],[]]);var c,d,e,f,g,h=[b[0][0]||"Original licence",b[0][1]||a,b[0][2]||"Unknown",b[0][3]||"uniqueID",b[0][4]||a,b[0][5]||"Version 0.11",b[0][6]||"",b[0][7]||"Unknown",b[0][8]||"Unknown",b[0][9]||"Unknown"],i=[];for(c=0,d=h.length;d>c;c++){g=b[1][c]||h[c];var k=[];for(e=0,f=g.length;f>e;e++)k.push(j(g.charCodeAt(e)));i.push(k.join(""))}var l=[h,i],m=["\x00","\x00"],n=["\x00\x00","\x00"],o=["\x00\x00"," "],p=h.length*m.length,q="\x00\x00"+j(p)+j(12*p+6),r=0;for(c=0,d=m.length;d>c;c++){var s=l[c];for(e=0,f=s.length;f>e;e++){g=s[e];var t=m[c]+n[c]+o[c]+j(e)+j(g.length)+j(r);q+=t,r+=g.length}}return q+=h.join("")+i.join("")}return d.getFontID=function(){var a=1;return function(){return String(a++)}}(),d.prototype={name:null,font:null,mimetype:null,encoding:null,get renderer(){var a=yc.create(this);return g(this,"renderer",a)},exportData:function(){var a={};for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},checkAndRepair:function(d,g,j){function k(a){var b=i(a.getBytes(4)),c=a.getInt32(),d=a.getInt32()>>>0,e=a.getInt32()>>>0,f=a.pos;a.pos=a.start?a.start:0,a.skip(d);var g=a.getBytes(e);return a.pos=f,"head"===b&&(g[8]=g[9]=g[10]=g[11]=0,g[17]|=32),{tag:b,checksum:c,length:e,offset:d,data:g}}function l(a){return{version:i(a.getBytes(4)),numTables:a.getUint16(),searchRange:a.getUint16(),entrySelector:a.getUint16(),rangeShift:a.getUint16()}}function m(a,c,d,e){var f,g=(c.start?c.start:0)+a.offset;c.pos=g;for(var h,i=(c.getUint16(),c.getUint16()),j=!1,k=0;i>k;k++){var l=c.getUint16(),m=c.getUint16(),n=c.getInt32()>>>0,o=!1;if(0===l&&0===m?o=!0:1===l&&0===m?o=!0:3!==l||1!==m||(d||!e)&&h?d&&3===l&&0===m&&(o=!0,j=!0):(o=!0,d||(j=!0)),o&&(h={platformId:l,encodingId:m,offset:n}),j)break}if(h&&(c.pos=g+h.offset),!h||-1===c.peekByte())return b("Could not find a preferred cmap table."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};var p,q,r=c.getUint16(),s=(c.getUint16(),c.getUint16(),!1),t=[];if(0===r){for(p=0;256>p;p++){var u=c.getByte();u&&t.push({charCode:p,glyphId:u})}s=!0}else if(4===r){var v=c.getUint16()>>1;c.getBytes(6);var w,x=[];for(w=0;v>w;w++)x.push({end:c.getUint16()});for(c.getUint16(),w=0;v>w;w++)x[w].start=c.getUint16();for(w=0;v>w;w++)x[w].delta=c.getUint16();var y=0;for(w=0;v>w;w++){f=x[w];var z=c.getUint16();if(z){var A=(z>>1)-(v-w);f.offsetIndex=A,y=Math.max(y,A+f.end-f.start+1)}else f.offsetIndex=-1}var B=[];for(p=0;y>p;p++)B.push(c.getUint16());for(w=0;v>w;w++){f=x[w],g=f.start;var C=f.end,D=f.delta;for(A=f.offsetIndex,p=g;C>=p;p++)65535!==p&&(q=0>A?p:B[A+p-g],q=q+D&65535,0!==q&&t.push({charCode:p,glyphId:q}))}}else{if(6!==r)return b("cmap table has unsupported format: "+r),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};var E=c.getUint16(),F=c.getUint16();for(p=0;F>p;p++){q=c.getUint16();var G=E+p;t.push({charCode:G,glyphId:q})}}for(t.sort(function(a,b){return a.charCode-b.charCode}),k=1;ke&&(a("The numOfMetrics ("+f+") should not be greater than the numGlyphs ("+e+")"),f=e,c.data[34]=(65280&f)>>8,c.data[35]=255&f);var g=e-f,h=g-(d.length-4*f>>1);if(h>0){var i=new Uint8Array(d.length+2*h);i.set(d.data),d.data=i}}function o(a,b,c,d,e,f){if(12>=c-b)return 0;var g=a.subarray(b,c),h=g[0]<<8|g[1];if(32768&h)return d.set(g,e),g.length;var i,j=10,k=0;for(i=0;h>i;i++){var l=g[j]<<8|g[j+1];k=l+1,j+=2}var m=j,n=g[j]<<8|g[j+1];j+=2+n;var o=j,p=0;for(i=0;k>i;i++){var q=g[j++];192&q&&(g[j-1]=63&q);var r=(2&q?1:16&q?0:2)+(4&q?1:32&q?0:2);if(p+=r,8&q){var s=g[j++];i+=s,p+=s*r}}if(0===p)return 0;var t=j+p;return t>g.length?0:!f&&n>0?(d.set(g.subarray(0,m),e),d.set([0,0],e+m),d.set(g.subarray(o,t),e+m+2),t-=n,g.length-t>3&&(t=t+3&-4),t):g.length-t>3?(t=t+3&-4,d.set(g.subarray(0,t),e),t):(d.set(g,e),g.length)}function p(c,d,e){var g=c.data,i=h(g[0],g[1],g[2],g[3]);i>>16!==1&&(a("Attempting to fix invalid version in head table: "+i),g[0]=0,g[1]=1,g[2]=0,g[3]=0);var j=f(g[50],g[51]);if(0>j||j>1){a("Attempting to fix invalid indexToLocFormat in head table: "+j);var k=d+1;e===k<<1?(g[50]=0,g[51]=0):e===k<<2?(g[50]=0,g[51]=1):b("Could not fix indexToLocFormat: "+j)}}function r(a,b,c,d,e,f){var g,h,i;d?(g=4,h=function(a,b){return a[b]<<24|a[b+1]<<16|a[b+2]<<8|a[b+3]},i=function(a,b,c){a[b]=c>>>24&255,a[b+1]=c>>16&255,a[b+2]=c>>8&255,a[b+3]=255&c}):(g=2,h=function(a,b){return a[b]<<9|a[b+1]<<1},i=function(a,b,c){a[b]=c>>9&255,a[b+1]=c>>1&255});var j=a.data,k=g*(1+c);j.length!==k&&(j=new Uint8Array(k),j.set(a.data.subarray(0,k)),a.data=j);var l=b.data,m=l.length,n=new Uint8Array(m),p=h(j,0),q=0,r={};i(j,0,q);var s,t;for(s=0,t=g;c>s;s++,t+=g){var u=h(j,t);if(u>m&&(m+3&-4)===u&&(u=m),u>m)i(j,t,q),p=u;else{p===u&&(r[s]=!0);var v=o(l,p,u,n,q,e);q+=v,i(j,t,q),p=u}}if(0===q){var w=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(s=0,t=g;c>s;s++,t+=g)i(j,t,w.length);return b.data=w,r}if(f){var x=h(j,g);n.length>x+q?b.data=n.subarray(0,x+q):(b.data=new Uint8Array(x+q),b.data.set(n.subarray(0,q))),b.data.set(n.subarray(0,x),q),i(a.data,j.length-g,q+x)}else b.data=n.subarray(0,q);return r}function y(a,c,d){var e=(g.start?g.start:0)+a.offset;g.pos=e;var f=a.length,h=e+f,i=g.getInt32();g.getBytes(28);var j,k,l=!0;switch(i){case 65536:j=Yb;break;case 131072:var m=g.getUint16();if(m!==d){l=!1;break}var n=[];for(k=0;m>k;++k){var o=g.getUint16();if(o>=32768){l=!1;break}n.push(o)}if(!l)break;for(var p=[],q=[];g.posk;++k)q[k]=String.fromCharCode(g.getByte());p.push(q.join(""))}for(j=[],k=0;m>k;++k){var s=n[k];258>s?j.push(Yb[s]):j.push(p[s-258])}break;case 196608:break;default:b("Unknown/unsupported post table version "+i),l=!1,c.defaultEncoding&&(j=c.defaultEncoding)}return c.glyphNames=j,l}function z(a){var b=(g.start?g.start:0)+a.offset;g.pos=b;var c=[[],[]],d=a.length,e=b+d,f=g.getUint16(),h=6;if(0!==f||h>d)return c;var j,k,l=g.getUint16(),m=g.getUint16(),n=[],o=12;for(j=0;l>j&&g.pos+o<=e;j++){var p={platform:g.getUint16(),encoding:g.getUint16(),language:g.getUint16(),name:g.getUint16(),length:g.getUint16(),offset:g.getUint16()};(1===p.platform&&0===p.encoding&&0===p.language||3===p.platform&&1===p.encoding&&1033===p.language)&&n.push(p)}for(j=0,k=n.length;k>j;j++){var q=n[j],r=b+m+q.offset;if(!(r+q.length>e)){g.pos=r;var s=q.name;if(q.encoding){for(var t="",u=0,v=q.length;v>u;u+=2)t+=String.fromCharCode(g.getUint16());c[1][s]=t}else c[0][s]=i(g.getBytes(q.length))}}return c}function A(a,c){for(var d,e,f,g,h,i=a.data,j=0,k=0,l=0,m=[],n=[],o=[],p=c.tooComplexToFollowFunctions,q=!1,r=0,s=0,t=i.length;t>j;){var u=i[j++];if(64===u)if(e=i[j++],q||s)j+=e;else for(d=0;e>d;d++)m.push(i[j++]);else if(65===u)if(e=i[j++],q||s)j+=2*e;else for(d=0;e>d;d++)f=i[j++],m.push(f<<8|i[j++]);else if(176===(248&u))if(e=u-176+1,q||s)j+=e;else for(d=0;e>d;d++)m.push(i[j++]);else if(184===(248&u))if(e=u-184+1,q||s)j+=2*e;else for(d=0;e>d;d++)f=i[j++],m.push(f<<8|i[j++]);else if(43!==u||p)if(44!==u||p){if(45===u)if(q)q=!1,k=j;else{if(h=n.pop(),!h)return b("TT: ENDF bad stack"),void(c.hintsValid=!1);g=o.pop(),i=h.data,j=h.i,c.functionsStackDeltas[g]=m.length-h.stackTop}else if(137===u)(q||s)&&(b("TT: nested IDEFs not allowed"),p=!0),q=!0,l=j;else if(88===u)++r;else if(27===u)s=r;else if(89===u)s===r&&(s=0),--r;else if(28===u&&!q&&!s){var v=m[m.length-1];v>0&&(j+=v-1)}}else(q||s)&&(b("TT: nested FDEFs not allowed"),p=!0),q=!0,l=j,g=m.pop(),c.functionsDefined[g]={data:i,i:j};else if(!q&&!s)if(g=m[m.length-1],c.functionsUsed[g]=!0,g in c.functionsStackDeltas)m.length+=c.functionsStackDeltas[g];else if(g in c.functionsDefined&&o.indexOf(g)<0){if(n.push({data:i,i:j,stackTop:m.length-1}),o.push(g),h=c.functionsDefined[g],!h)return b("TT: CALL non-existent function"),void(c.hintsValid=!1);i=h.data,j=h.i}if(!q&&!s){var w=142>=u?F[u]:u>=192&&223>=u?-1:u>=224?-2:0;for(u>=113&&117>=u&&(e=m.pop(),e===e&&(w=2*-e));0>w&&m.length>0;)m.pop(),w++;for(;w>0;)m.push(NaN),w--}}c.tooComplexToFollowFunctions=p;var x=[i];j>i.length&&x.push(new Uint8Array(j-i.length)),l>k&&(b("TT: complementing a missing function tail"),x.push(new Uint8Array([34,45]))),C(a,x)}function B(a,c){if(!a.tooComplexToFollowFunctions){if(a.functionsDefined.length>c)return b("TT: more functions defined than expected"),void(a.hintsValid=!1);for(var d=0,e=a.functionsUsed.length;e>d;d++){if(d>c)return b("TT: invalid function id: "+d),void(a.hintsValid=!1);if(a.functionsUsed[d]&&!a.functionsDefined[d])return b("TT: undefined function: "+d),void(a.hintsValid=!1)}}}function C(a,b){if(b.length>1){var c,d,e=0;for(c=0,d=b.length;d>c;c++)e+=b[c].length;e=e+3&-4;var f=new Uint8Array(e),g=0;for(c=0,d=b.length;d>c;c++)f.set(b[c],g),g+=b[c].length;a.data=f,a.length=e}}function D(a,b,c){var d={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};if(a&&A(a,d),b&&A(b,d),a&&B(d,R),c&&1&c.length){var e=new Uint8Array(c.length+1);e.set(c.data),c.data=e}return d.hintsValid}function E(a,b,c){return V[a]?!aa&&b>=0&&$.has(b)?!0:_&&c>=0&&x(_[c])?!0:!1:!0}var F=[0,0,0,0,0,0,0,0,-2,-2,-2,-2,0,0,-2,-5,-1,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,-1,-1,1,-1,-999,0,1,0,-1,-2,0,-1,-2,-1,-1,0,-1,-1,0,0,-999,-999,-1,-1,-1,-1,-2,-999,-2,-2,-999,0,-2,-2,0,0,-2,0,-2,0,0,0,-2,-1,-1,1,1,0,0,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,0,-999,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,-2,-999,-999,-999,-999,-999,-1,-1,-2,-2,0,0,0,0,-1,-1,-999,-2,-2,0,0,-1,-2,-2,0,0,0,-1,-1,-1,-2];g=new Mc(new Uint8Array(g.getBytes()));for(var G,H,I,J=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "],K=l(g),L=K.numTables,M={"OS/2":null,cmap:null,head:null,hhea:null,hmtx:null,maxp:null,name:null,post:null},N=0;L>N;N++)I=k(g),J.indexOf(I.tag)<0||0!==I.length&&(M[I.tag]=I);var O=!M["CFF "];if(O)M.glyf&&M.loca||c('Required "glyf" or "loca" tables are not found'),this.isOpenType=!1;else{if("OTTO"===K.version&&"CIDFontType2"!==j.type||!M.head||!M.hhea||!M.maxp||!M.post)return H=new Mc(M["CFF "].data),G=new jc(H,j),this.convert(d,G,j);delete M.glyf,delete M.loca,delete M.fpgm,delete M.prep,delete M["cvt "],this.isOpenType=!0}M.maxp||c('Required "maxp" table is not found'),g.pos=(g.start||0)+M.maxp.offset;var P=g.getInt32(),Q=g.getUint16(),R=0;if(P>=65536&&M.maxp.length>=22){g.pos+=8;var S=g.getUint16();S>2&&(M.maxp.data[14]=0,M.maxp.data[15]=2),g.pos+=4,R=g.getUint16()}var T=!1;"CIDFontType2"===j.type&&j.toUnicode&&j.toUnicode.get(0)>"\x00"&&(T=!0,Q++,M.maxp.data[4]=Q>>8,M.maxp.data[5]=255&Q);var U=D(M.fpgm,M.prep,M["cvt "],R);U||(delete M.fpgm,delete M.prep,delete M["cvt "]),n(g,M.hhea,M.hmtx,Q),M.head||c('Required "head" table is not found'),p(M.head,Q,O?M.loca.length:0);var V={};if(O){var W=f(M.head.data[50],M.head.data[51]);V=r(M.loca,M.glyf,Q,W,U,T)}if(M.hhea||c('Required "hhea" table is not found'),0===M.hhea.data[10]&&0===M.hhea.data[11]&&(M.hhea.data[10]=255,M.hhea.data[11]=255),M.post){var X=y(M.post,j,Q);X||(M.post=null)}var Y,Z=[],$=j.toUnicode,_=j.widths,aa=$ instanceof ac||65536===$.length;if("CIDFontType2"===j.type){var ba=j.cidToGidMap||[],ca=0===ba.length;j.cMap.forEach(function(a,b){e(65535>=b,"Max size of CID is 65,535");var c=-1;ca?c=a:void 0!==ba[b]&&(c=ba[b]),c>=0&&Q>c&&E(c,a,b)&&(Z[a]=c)}),T&&(Z[0]=Q-1)}else{var da=j.differences.length>0||!!j.baseEncodingName,ea=m(M.cmap,g,this.isSymbolicFont,da),fa=ea.platformId,ga=ea.encodingId,ha=ea.mappings,ia=ha.length;if(da&&(3===fa&&1===ga||1===fa&&0===ga)||-1===fa&&-1===ga&&Pb[j.baseEncodingName]){var ja=[];for(("MacRomanEncoding"===j.baseEncodingName||"WinAnsiEncoding"===j.baseEncodingName)&&(ja=Pb[j.baseEncodingName]),Y=0;256>Y;Y++){var ka;if(ka=this.differences&&Y in this.differences?this.differences[Y]:Y in ja&&""!==ja[Y]?ja[Y]:Pb.StandardEncoding[Y]){var la,ma=!1;3===fa&&1===ga?(la=zc[ka],ma=!0):1===fa&&0===ga&&(la=Pb.MacRomanEncoding.indexOf(ka));var na=!1;for(N=0;ia>N;++N)if(ha[N].charCode===la){var oa=ma?Y:la;if(E(ha[N].glyphId,oa,-1)){Z[Y]=ha[N].glyphId,na=!0;break}}if(!na&&j.glyphNames){var pa=j.glyphNames.indexOf(ka);pa>0&&E(pa,-1,-1)?Z[Y]=pa:Z[Y]=0}}}}else if(0===fa&&0===ga)for(N=0;ia>N;++N)Z[ha[N].charCode]=ha[N].glyphId;else for(N=0;ia>N;++N)Y=255&ha[N].charCode,Z[Y]=ha[N].glyphId}0===Z.length&&(Z[0]=0);var qa=q(Z,j);if(this.toFontChar=qa.toFontChar,M.cmap={tag:"cmap",data:s(qa.charCodeToGlyphId)},!M["OS/2"]||!t(M["OS/2"])){var ra={unitsPerEm:f(M.head.data[18],M.head.data[19]),yMax:f(M.head.data[42],M.head.data[43]),yMin:f(M.head.data[38],M.head.data[39])-65536,ascent:f(M.hhea.data[4],M.hhea.data[5]),descent:f(M.hhea.data[6],M.hhea.data[7])-65536};M["OS/2"]={tag:"OS/2",data:u(j,qa.charCodeToGlyphId,ra)}}if(M.post||(M.post={tag:"post",data:v(j)}),!O)try{H=new Mc(M["CFF "].data);var sa=new kc(H,j);G=sa.parse();var ta=new xc(G);M["CFF "].data=ta.compile()}catch(ua){b("Failed to compile font "+j.loadedName)}if(M.name){var va=z(M.name);M.name.data=w(d,va)}else M.name={tag:"name",data:w(this.name)};var wa=new bc(K.version);for(var xa in M)wa.addTable(xa,M[xa].data);return wa.toArray()},convert:function(a,b,c){function d(a,b){var c=null;for(var d in a)b===a[d]&&(c||(c=[]),c.push(0|d));return c}function e(a,b){for(var c in a)if(b===a[c])return 0|c;return g.charCodeToGlyphId[g.nextAvailableFontCharCode]=b,g.nextAvailableFontCharCode++}c.fixedPitch=!1;var f=b.getGlyphMapping(c),g=q(f,c);this.toFontChar=g.toFontChar;var h=b.numGlyphs,i=b.seacs;if(Nb&&i&&i.length){var k=c.fontMatrix||T,m=b.getCharset(),n=Object.create(null);for(var o in i){o|=0;var p=i[o],r=Pb.StandardEncoding[p[2]],t=Pb.StandardEncoding[p[3]],x=m.indexOf(r),y=m.indexOf(t);if(!(0>x||0>y)){var z={x:p[0]*k[0]+p[1]*k[2]+k[4],y:p[0]*k[1]+p[1]*k[3]+k[5]},A=d(f,o);if(A)for(var B=0,C=A.length;C>B;B++){var D=A[B],E=g.charCodeToGlyphId,F=e(E,x),G=e(E,y);n[D]={baseFontCharCode:F,accentFontCharCode:G,accentOffset:z}}}}c.seacMap=n}var H=1/(c.fontMatrix||T)[0],I=new bc("OTTO");return I.addTable("CFF ",b.data),I.addTable("OS/2",u(c,g.charCodeToGlyphId)),I.addTable("cmap",s(g.charCodeToGlyphId)),I.addTable("head","\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00_<õ\x00\x00"+l(H)+"\x00\x00\x00\x00ž\x0B~'\x00\x00\x00\x00ž\x0B~'\x00\x00"+l(c.descent)+"ÿ"+l(c.ascent)+j(c.italicAngle?2:0)+"\x00\x00\x00\x00\x00\x00\x00"),I.addTable("hhea","\x00\x00\x00"+l(c.ascent)+l(c.descent)+"\x00\x00ÿÿ\x00\x00\x00\x00\x00\x00"+l(c.capHeight)+l(Math.tan(c.italicAngle)*c.xHeight)+"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"+j(h)),I.addTable("hmtx",function(){for(var a=b.charstrings,c=b.cff?b.cff.widths:null,d="\x00\x00\x00\x00",e=1,f=h;f>e;e++){var g=0;if(a){var i=a[e-1];g="width"in i?i.width:0}else c&&(g=Math.ceil(c[e]||0));d+=j(g)+j(0)}return d}()),I.addTable("maxp","\x00\x00P\x00"+j(h)),I.addTable("name",w(a)),I.addTable("post",v(c)),I.toArray()},buildToUnicode:function(a){if(a.toUnicode&&0!==a.toUnicode.length)return a.toUnicode;var b,c;if(!a.composite){b=[];var d=a.defaultEncoding.slice(),f=a.baseEncodingName,g=a.differences;for(c in g)d[c]=g[c];for(c in d){var h=d[c];if(""!==h)if(void 0!==zc[h])b[c]=String.fromCharCode(zc[h]);else{var i=0;switch(h[0]){case"G":3===h.length&&(i=parseInt(h.substr(1),16));break;case"g":5===h.length&&(i=parseInt(h.substr(1),16));break;case"C":case"c":h.length>=3&&(i=+h.substr(1))}if(i){if(f&&i===+c){var j=Pb[f];if(j&&(h=j[c])){b[c]=String.fromCharCode(zc[h]);continue}}b[c]=String.fromCharCode(i)}}}return new _b(b)}if(a.composite&&(a.cMap.builtInCMap&&!(a.cMap instanceof Fb)||"Adobe"===a.cidSystemInfo.registry&&("GB1"===a.cidSystemInfo.ordering||"CNS1"===a.cidSystemInfo.ordering||"Japan1"===a.cidSystemInfo.ordering||"Korea1"===a.cidSystemInfo.ordering))){var k=a.cidSystemInfo.registry,l=a.cidSystemInfo.ordering,m=new ya(k+"-"+l+"-UCS2"),n=Hb.create(m,{url:PDFJS.cMapUrl,packed:PDFJS.cMapPacked},null),o=a.cMap;return b=[],o.forEach(function(a,c){e(65535>=c,"Max size of CID is 65,535");var d=n.lookup(c);d&&(b[a]=String.fromCharCode((d.charCodeAt(0)<<8)+d.charCodeAt(1)))}),new _b(b)}return new ac(a.firstChar,a.lastChar)},get spaceWidth(){if("_shadowWidth"in this)return this._shadowWidth;for(var a,b=["space","minus","one","i"],c=0,d=b.length;d>c;c++){var e=b[c];if(e in this.widths){a=this.widths[e];break}var f=zc[e],g=0;if(this.composite&&this.cMap.contains(f)&&(g=this.cMap.lookup(f)),!g&&"toUnicode"in this&&(g=this.toUnicode.charCodeOf(f)),0>=g&&(g=f),a=this.widths[g])break}return a=a||this.defaultWidth,this._shadowWidth=a,a},charToGlyph:function(a){var b,c,d,e=a;this.cMap&&this.cMap.contains(a)&&(e=this.cMap.lookup(a)),c=this.widths[e],c=x(c)?c:this.defaultWidth;var f=this.vmetrics&&this.vmetrics[e],g=this.toUnicode.get(a)||a;"number"==typeof g&&(g=String.fromCharCode(g)),b=this.toFontChar[a]||a,this.missingFile&&(b=K(b)),this.isType3Font&&(d=b);var h=null;if(this.seacMap&&this.seacMap[a]){var i=this.seacMap[a];b=i.baseFontCharCode,h={fontChar:String.fromCharCode(i.accentFontCharCode),offset:i.accentOffset}}var j=String.fromCharCode(b),k=this.glyphCache[a];return k&&k.matchesForCache(j,g,h,c,f,d)||(k=new $b(j,g,h,c,f,d),this.glyphCache[a]=k),k},charsToGlyphs:function(a){var b,c,d,e=this.charsCache;if(e&&(b=e[a]))return b;e||(e=this.charsCache=Object.create(null)),b=[];var f,g=a,h=0;if(this.cMap)for(var i={};hh;++h)d=a.charCodeAt(h),c=this.charToGlyph(d),b.push(c),32===d&&b.push(null);return e[g]=b}},d}(),ec=function(){function a(a){this.error=a,this.loadedName="g_font_error",this.loading=!1}return a.prototype={charsToGlyphs:function(){return[]},exportData:function(){return{error:this.error}}},a}(),fc=function(){function a(){this.width=0,this.lsb=0,this.flexing=!1,this.output=[],this.stack=[]}var c={hstem:[1],vstem:[3],vmoveto:[4],rlineto:[5],hlineto:[6],vlineto:[7],rrcurveto:[8],callsubr:[10],flex:[12,35],drop:[12,18],endchar:[14],rmoveto:[21],hmoveto:[22],vhcurveto:[30],hvcurveto:[31]};return a.prototype={convert:function(a,d){for(var e,f,g,h=a.length,i=!1,j=0;h>j;j++){var k=a[j];if(32>k){switch(12===k&&(k=(k<<8)+a[++j]),k){case 1:if(!Mb){this.stack=[];break}i=this.executeCommand(2,c.hstem);break;case 3:if(!Mb){this.stack=[];break}i=this.executeCommand(2,c.vstem);break;case 4:if(this.flexing){if(this.stack.length<1){i=!0;break}var l=this.stack.pop();this.stack.push(0,l);break}i=this.executeCommand(1,c.vmoveto);break;case 5:i=this.executeCommand(2,c.rlineto);break;case 6:i=this.executeCommand(1,c.hlineto);break;case 7:i=this.executeCommand(1,c.vlineto);break;case 8:i=this.executeCommand(6,c.rrcurveto);break;case 9:this.stack=[];break;case 10:if(this.stack.length<1){i=!0;break}g=this.stack.pop(),i=this.convert(d[g],d);break;case 11:return i;case 13:if(this.stack.length<2){i=!0;break}e=this.stack.pop(),f=this.stack.pop(),this.lsb=f,this.width=e,this.stack.push(e,f),i=this.executeCommand(2,c.hmoveto);break;case 14:this.output.push(c.endchar[0]);break;case 21:if(this.flexing)break; +i=this.executeCommand(2,c.rmoveto);break;case 22:if(this.flexing){this.stack.push(0);break}i=this.executeCommand(1,c.hmoveto);break;case 30:i=this.executeCommand(4,c.vhcurveto);break;case 31:i=this.executeCommand(4,c.hvcurveto);break;case 3072:this.stack=[];break;case 3073:if(!Mb){this.stack=[];break}i=this.executeCommand(2,c.vstem);break;case 3074:if(!Mb){this.stack=[];break}i=this.executeCommand(2,c.hstem);break;case 3078:Nb?(this.seac=this.stack.splice(-4,4),i=this.executeCommand(0,c.endchar)):i=this.executeCommand(4,c.endchar);break;case 3079:if(this.stack.length<4){i=!0;break}this.stack.pop();e=this.stack.pop();var m=this.stack.pop();f=this.stack.pop(),this.lsb=f,this.width=e,this.stack.push(e,f,m),i=this.executeCommand(3,c.rmoveto);break;case 3084:if(this.stack.length<2){i=!0;break}var n=this.stack.pop(),o=this.stack.pop();this.stack.push(o/n);break;case 3088:if(this.stack.length<2){i=!0;break}g=this.stack.pop();var p=this.stack.pop();if(0===g&&3===p){var q=this.stack.splice(this.stack.length-17,17);this.stack.push(q[2]+q[0],q[3]+q[1],q[4],q[5],q[6],q[7],q[8],q[9],q[10],q[11],q[12],q[13],q[14]),i=this.executeCommand(13,c.flex,!0),this.flexing=!1,this.stack.push(q[15],q[16])}else 1===g&&0===p&&(this.flexing=!0);break;case 3089:break;case 3105:this.stack=[];break;default:b('Unknown type 1 charstring command of "'+k+'"')}if(i)break}else 246>=k?k-=139:k=250>=k?256*(k-247)+a[++j]+108:254>=k?-(256*(k-251))-a[++j]-108:(255&a[++j])<<24|(255&a[++j])<<16|(255&a[++j])<<8|(255&a[++j])<<0,this.stack.push(k)}return i},executeCommand:function(a,b,c){var d=this.stack.length;if(a>d)return!0;for(var e=d-a,f=e;d>f;f++){var g=this.stack[f];g===(0|g)?this.output.push(28,g>>8&255,255&g):(g=65536*g|0,this.output.push(255,g>>24&255,g>>16&255,g>>8&255,255&g))}return this.output.push.apply(this.output,b),c?this.stack.splice(e,a):this.stack.length=0,!1}},a}(),gc=function(){function a(a){return a>=48&&57>=a||a>=65&&70>=a||a>=97&&102>=a}function b(a,b,c){for(var d=0|b,e=52845,f=22719,g=a.length,h=new Uint8Array(g),i=0;g>i;i++){var j=a[i];h[i]=j^d>>8,d=(j+d)*e+f&65535}return Array.prototype.slice.call(h,c)}function c(b,c,d){var e,f,g=0|c,h=52845,i=22719,j=b.length,k=j>>>1,l=new Uint8Array(k);for(e=0,f=0;j>e;e++){var m=b[e];if(a(m)){e++;for(var n;j>e&&!a(n=b[e]);)e++;if(j>e){var o=parseInt(String.fromCharCode(m,n),16);l[f++]=o^g>>8,g=(o+g)*h+i&65535}}}return Array.prototype.slice.call(l,d,f)}function d(a){return 47===a||91===a||93===a||123===a||125===a||40===a||41===a}function e(d,e){if(e){var g=d.getBytes(),h=!(a(g[0])&&a(g[1])&&a(g[2])&&a(g[3]));d=new Mc(h?b(g,f,4):c(g,f,4))}this.stream=d,this.nextChar()}var f=55665,g=4330;return e.prototype={readNumberArray:function(){this.getToken();for(var a=[];;){var b=this.getToken();if(null===b||"]"===b||"}"===b)break;a.push(parseFloat(b||0))}return a},readNumber:function(){var a=this.getToken();return parseFloat(a||0)},readInt:function(){var a=this.getToken();return 0|parseInt(a||0,10)},readBoolean:function(){var a=this.getToken();return"true"===a?1:0},nextChar:function(){return this.currentChar=this.stream.getByte()},getToken:function(){for(var a=!1,b=this.currentChar;;){if(-1===b)return null;if(a)(10===b||13===b)&&(a=!1);else if(37===b)a=!0;else if(!Gc.isSpace(b))break;b=this.nextChar()}if(d(b))return this.nextChar(),String.fromCharCode(b);var c="";do c+=String.fromCharCode(b),b=this.nextChar();while(b>=0&&!Gc.isSpace(b)&&!d(b));return c},extractFontProgram:function(){for(var a,c,d,e,f,h=this.stream,i=[],j=[],k={subrs:[],charstrings:[],properties:{privateData:{lenIV:4}}};null!==(a=this.getToken());)if("/"===a)switch(a=this.getToken()){case"CharStrings":for(this.getToken(),this.getToken(),this.getToken(),this.getToken();;){if(a=this.getToken(),null===a||"end"===a)break;if("/"===a){var l=this.getToken();c=this.readInt(),this.getToken(),d=h.makeSubStream(h.pos,c),e=k.properties.privateData.lenIV,f=b(d.getBytes(),g,e),h.skip(c),this.nextChar(),a=this.getToken(),"noaccess"===a&&this.getToken(),j.push({glyph:l,encoded:f})}}break;case"Subrs":this.readInt();for(this.getToken();"dup"===(a=this.getToken());){var m=this.readInt();c=this.readInt(),this.getToken(),d=h.makeSubStream(h.pos,c),e=k.properties.privateData.lenIV,f=b(d.getBytes(),g,e),h.skip(c),this.nextChar(),a=this.getToken(),"noaccess"===a&&this.getToken(),i[m]=f}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":var n=this.readNumberArray();n.length>0&&n.length%2===0&&Mb&&(k.properties.privateData[a]=n);break;case"StemSnapH":case"StemSnapV":k.properties.privateData[a]=this.readNumberArray();break;case"StdHW":case"StdVW":k.properties.privateData[a]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":case"ExpansionFactor":k.properties.privateData[a]=this.readNumber();break;case"ForceBold":k.properties.privateData[a]=this.readBoolean()}for(var o=0;og;g++){for(b=this.getToken();"dup"!==b&&"def"!==b;)if(b=this.getToken(),null===b)return;if("def"===b)break;var h=this.readInt();this.getToken();var i=this.getToken();d[h]=i,this.getToken()}}else d=Pb[e];a.builtInEncoding=d;break;case"FontBBox":var j=this.readNumberArray();a.ascent=j[3],a.descent=j[1],a.ascentScaled=!0}}},e}(),hc=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],ic=function(a,b,c){var d=6,e=c.length1,f=c.length2,g=b.peekBytes(d),h=128===g[0]&&1===g[1];h&&(b.skip(d),e=g[5]<<24|g[4]<<16|g[3]<<8|g[2]);var i=new Mc(b.getBytes(e)),j=new gc(i);j.extractFontHeader(c),h&&(g=b.getBytes(d),f=g[5]<<24|g[4]<<16|g[3]<<8|g[2]);var k=new Mc(b.getBytes(f)),l=new gc(k,!0),m=l.extractFontProgram();for(var n in m.properties)c[n]=m.properties[n];var o=m.charstrings,p=this.getType2Charstrings(o),q=this.getType2Subrs(m.subrs);this.charstrings=o,this.data=this.wrap(a,p,this.charstrings,q,c),this.seacs=this.getSeacs(m.charstrings)};ic.prototype={get numGlyphs(){return this.charstrings.length+1},getCharset:function(){for(var a=[".notdef"],b=this.charstrings,c=0;c=0&&(f[g]=b)}return Q(a,f,d)},getSeacs:function(a){var b,c,d=[];for(b=0,c=a.length;c>b;b++){var e=a[b];e.seac&&(d[b+1]=e.seac)}return d},getType2Charstrings:function(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c].charstring);return b},getType2Subrs:function(a){var b=0,c=a.length;b=1133>c?107:33769>c?1131:32768;var d,e=[];for(d=0;b>d;d++)e.push([11]);for(d=0;c>d;d++)e.push(a[d]);return e},wrap:function(a,b,c,d,e){var f=new lc;f.header=new mc(1,0,4,4),f.names=[a];var g=new qc;g.setByName("version",391),g.setByName("Notice",392),g.setByName("FullName",393),g.setByName("FamilyName",394),g.setByName("Weight",395),g.setByName("Encoding",null),g.setByName("FontMatrix",e.fontMatrix),g.setByName("FontBBox",e.bbox),g.setByName("charset",null),g.setByName("CharStrings",null),g.setByName("Private",null),f.topDict=g;var h=new nc;h.add("Version 0.11"),h.add("See original notice"),h.add(a),h.add(a),h.add("Medium"),f.strings=h,f.globalSubrIndex=new oc;var i,j,k=b.length,l=[0];for(i=0;k>i;i++){var m=hc.indexOf(c[i].glyphName);-1===m&&(m=0),l.push(m>>8&255,255&m)}f.charset=new tc(!1,0,[],l);var n=new oc;for(n.add([139,14]),i=0;k>i;i++)n.add(b[i]);f.charStrings=n;var o=new rc;o.setByName("Subrs",null);var p=["BlueValues","OtherBlues","FamilyBlues","FamilyOtherBlues","StemSnapH","StemSnapV","BlueShift","BlueFuzz","BlueScale","LanguageGroup","ExpansionFactor","ForceBold","StdHW","StdVW"];for(i=0,j=p.length;j>i;i++){var q=p[i];if(e.privateData.hasOwnProperty(q)){var r=e.privateData[q];if(C(r))for(var s=r.length-1;s>0;s--)r[s]-=r[s-1];o.setByName(q,r)}}f.topDict.privateDict=o;var t=new oc;for(i=0,j=d.length;j>i;i++)t.add(d[i]);o.subrsIndex=t;var u=new xc(f);return u.compile()}};var jc=function(){function a(a,c){this.properties=c;var d=new kc(a,c);this.cff=d.parse();var e=new xc(this.cff);this.seacs=this.cff.seacs;try{this.data=e.compile()}catch(f){b("Failed to compile font "+c.loadedName),this.data=a}}return a.prototype={get numGlyphs(){return this.cff.charStrings.count},getCharset:function(){return this.cff.charset.charset},getGlyphMapping:function(){var a,b,c=this.cff,d=this.properties,e=c.charset.charset;if(d.composite){if(a=Object.create(null),c.isCIDFont)for(b=0;bq;++q){var s=p.get(q),t=this.createDict(qc,this.parseDict(s),b.strings);this.parsePrivateDict(t),b.fdArray.push(t)}o=null,n=this.parseCharsets(i.getByName("charset"),b.charStrings.count,b.strings,!0),b.fdSelect=this.parseFDSelect(i.getByName("FDSelect"),b.charStrings.count)}else n=this.parseCharsets(i.getByName("charset"),b.charStrings.count,b.strings,!1),o=this.parseEncoding(i.getByName("Encoding"),a,b.strings,n.charset);return b.charset=n,b.encoding=o,b},parseHeader:function(){for(var b=this.bytes,d=b.length,e=0;d>e&&1!==b[e];)++e;e>=d?c("Invalid CFF header"):0!==e&&(a("cff data is shifted"),b=b.subarray(e),this.bytes=b);var f=b[0],g=b[1],h=b[2],i=b[3],j=new mc(f,g,h,i);return{obj:j,endPos:h}},parseDict:function(a){function b(){var b=a[e++];return 30===b?d(e):28===b?(b=a[e++],b=(b<<24|a[e++]<<16)>>16):29===b?(b=a[e++],b=b<<8|a[e++],b=b<<8|a[e++],b=b<<8|a[e++]):b>=32&&246>=b?b-139:b>=247&&250>=b?256*(b-247)+a[e++]+108:b>=251&&254>=b?-(256*(b-251))-a[e++]-108:(c("255 is not a valid DICT command"),-1)}function d(){for(var b="",c=15,d=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],f=a.length;f>e;){var g=a[e++],h=g>>4,i=15&g;if(h===c)break;if(b+=d[h],i===c)break;b+=d[i]}return parseFloat(b)}var e=0,f=[],g=[];e=0;for(var h=a.length;h>e;){var i=a[e];21>=i?(12===i&&(i=i<<8|a[++e]),g.push([i,f]),f=[],++e):f.push(b())}return g},parseIndex:function(a){var b,c,d=new oc,e=this.bytes,f=e[a++]<<8|e[a++],g=[],h=a;if(0!==f){var i=e[a++],j=a+(f+1)*i-1;for(b=0,c=f+1;c>b;++b){for(var k=0,l=0;i>l;++l)k<<=8,k+=e[a++];g.push(j+k)}h=g[f]}for(b=0,c=g.length-1;c>b;++b){var m=g[b],n=g[b+1];d.add(e.subarray(m,n))}return{obj:d,endPos:h}},parseNameIndex:function(a){for(var b=[],c=0,d=a.count;d>c;++c){for(var e=a.get(c),f=Math.min(e.length,127),g=[],h=0;f>h;++h){var j=e[h];(0!==h||0!==j)&&(33>j||j>126||91===j||93===j||40===j||41===j||123===j||125===j||60===j||62===j||47===j||37===j||35===j)?g[h]=95:g[h]=j}b.push(i(g))}return b},parseStringIndex:function(a){for(var b=new nc,c=0,d=a.count;d>c;++c){var e=a.get(c);b.add(i(e))}return b},createDict:function(a,b,c){for(var d=new a(c),e=0,f=b.length;f>e;++e){var g=b[e],h=g[0],i=g[1];d.setByKey(h,i)}return d},parseCharStrings:function(a){for(var c=this.parseIndex(a).obj,d=[],g=[],h=c.count,i=0;h>i;i++){for(var j=c.get(i),k=0,l=[],m=!0,n=0,o=!0,p=j,q=p.length,r=!0,s=0;q>s;){var t=p[s++],u=null;if(12===t){var v=p[s++];0===v?(p[s-2]=139,p[s-1]=22,k=0):u=f[v]}else 28===t?(l[k]=(p[s]<<24|p[s+1]<<16)>>16,s+=2,k++):14===t?(k>=4&&(k-=4,Nb&&(d[i]=l.slice(k,k+4),o=!1)),u=e[t]):t>=32&&246>=t?(l[k]=t-139,k++):t>=247&&254>=t?(l[k]=251>t?(t-247<<8)+p[s]+108:-(t-251<<8)-p[s]-108,s++,k++):255===t?(l[k]=(p[s]<<24|p[s+1]<<16|p[s+2]<<8|p[s+3])/65536,s+=4,k++):19===t||20===t?(n+=k>>1,s+=n+7>>3,k%=2,u=e[t]):u=e[t];if(u){if(u.stem&&(n+=k>>1),"min"in u&&!m&&k=2&&u.stem?k%=2:k>1&&b("Found too many parameters for stack-clearing command"),k>0&&l[k-1]>=0&&(g[i]=l[k-1])),"stackDelta"in u?("stackFn"in u&&u.stackFn(l,k),k+=u.stackDelta):u.stackClearing?k=0:u.resetStack?(k=0,m=!1):u.undefStack&&(k=0,m=!0,r=!1)}}o||c.set(i,new Uint8Array([14]))}return{charStrings:c,seacs:d,widths:g}},emptyPrivateDictionary:function(a){var b=this.createDict(rc,[],a.strings);a.setByKey(18,[0,0]),a.privateDict=b},parsePrivateDict:function(a){if(!a.hasName("Private"))return void this.emptyPrivateDictionary(a);var b=a.getByName("Private");if(!C(b)||2!==b.length)return void a.removeByName("Private");var c=b[0],d=b[1];if(0===c||d>=this.bytes.length)return void this.emptyPrivateDictionary(a);var e=d+c,f=this.bytes.subarray(d,e),g=this.parseDict(f),h=this.createDict(rc,g,a.strings);if(a.privateDict=h,h.getByName("Subrs")){var i=h.getByName("Subrs"),j=d+i;if(0===i||j>=this.bytes.length)return void this.emptyPrivateDictionary(a);var k=this.parseIndex(j);h.subrsIndex=k.obj}},parseCharsets:function(a,b,d,e){if(0===a)return new tc(!0,sc.ISO_ADOBE,Ja);if(1===a)return new tc(!0,sc.EXPERT,Ka);if(2===a)return new tc(!0,sc.EXPERT_SUBSET,La);var f,g,h,i=this.bytes,j=a,k=i[a++],l=[".notdef"];switch(b-=1,k){case 0:for(h=0;b>h;h++)f=i[a++]<<8|i[a++],l.push(e?f:d.get(f));break;case 1:for(;l.length<=b;)for(f=i[a++]<<8|i[a++],g=i[a++],h=0;g>=h;h++)l.push(e?f++:d.get(f++));break;case 2:for(;l.length<=b;)for(f=i[a++]<<8|i[a++],g=i[a++]<<8|i[a++],h=0;g>=h;h++)l.push(e?f++:d.get(f++));break;default:c("Unknown charset format")}var m=a,n=i.subarray(j,m);return new tc(!1,k,l,n)},parseEncoding:function(a,b,d,e){function f(){var b=k[a++];for(h=0;b>h;h++){var c=k[a++],f=(k[a++]<<8)+(255&k[a++]);j[c]=e.indexOf(d.get(f))}}var g,h,i,j={},k=this.bytes,l=!1,m=!1,n=null;if(0===a||1===a){l=!0,g=a;var o=a?Pb.ExpertEncoding:Pb.StandardEncoding;for(h=0,i=e.length;i>h;h++){var p=o.indexOf(e[h]);-1!==p&&(j[p]=h)}}else{var q=a;switch(g=k[a++],127&g){case 0:var r=k[a++];for(h=1;r>=h;h++)j[k[a++]]=h;break;case 1:var s=k[a++],t=1;for(h=0;s>h;h++)for(var u=k[a++],v=k[a++],w=u;u+v>=w;w++)j[w]=t++;break;default:c("Unknow encoding format: "+g+" in CFF")}var x=a;128&g&&(k[q]&=127,f(),m=!0),n=k.subarray(q,x)}return g=127&g,new uc(l,g,j,n)},parseFDSelect:function(a,b){var d,e=a,f=this.bytes,g=f[a++],h=[];switch(g){case 0:for(d=0;b>d;++d){var i=f[a++];h.push(i)}break;case 3:var j=f[a++]<<8|f[a++];for(d=0;j>d;++d)for(var k=f[a++]<<8|f[a++],l=f[a++],m=f[a]<<8|f[a+1],n=k;m>n;++n)h.push(l);a+=2;break;default:c("Unknown fdselect format "+g)}var o=a;return new vc(h,f.subarray(e,o))}},d}(),lc=function(){function a(){this.header=null,this.names=[],this.topDict=null,this.strings=new nc,this.globalSubrIndex=null,this.encoding=null,this.charset=null,this.charStrings=null,this.fdArray=[],this.fdSelect=null,this.isCIDFont=!1}return a}(),mc=function(){function a(a,b,c,d){this.major=a,this.minor=b,this.hdrSize=c,this.offSize=d}return a}(),nc=function(){function a(){this.strings=[]}return a.prototype={get:function(a){return a>=0&&390>=a?hc[a]:a-391<=this.strings.length?this.strings[a-391]:hc[0]},add:function(a){this.strings.push(a)},get count(){return this.strings.length}},a}(),oc=function(){function a(){this.objects=[],this.length=0}return a.prototype={add:function(a){this.length+=a.length,this.objects.push(a)},set:function(a,b){this.length+=b.length-this.objects[a].length,this.objects[a]=b},get:function(a){return this.objects[a]},get count(){return this.objects.length}},a}(),pc=function(){function a(a,b){this.keyToNameMap=a.keyToNameMap,this.nameToKeyMap=a.nameToKeyMap,this.defaults=a.defaults,this.types=a.types,this.opcodes=a.opcodes,this.order=a.order,this.strings=b,this.values={}}return a.prototype={setByKey:function(a,b){if(!(a in this.keyToNameMap))return!1;if(0===b.length)return!0;var c=this.types[a];return("num"===c||"sid"===c||"offset"===c)&&(b=b[0]),this.values[a]=b,!0},setByName:function(a,b){a in this.nameToKeyMap||c('Invalid dictionary name "'+a+'"'),this.values[this.nameToKeyMap[a]]=b},hasName:function(a){return this.nameToKeyMap[a]in this.values},getByName:function(a){a in this.nameToKeyMap||c('Invalid dictionary name "'+a+'"');var b=this.nameToKeyMap[a];return b in this.values?this.values[b]:this.defaults[b]},removeByName:function(a){delete this.values[this.nameToKeyMap[a]]}},a.createTables=function(a){for(var b={keyToNameMap:{},nameToKeyMap:{},defaults:{},types:{},opcodes:{},order:[]},c=0,d=a.length;d>c;++c){var e=a[c],f=C(e[0])?(e[0][0]<<8)+e[0][1]:e[0];b.keyToNameMap[f]=e[1],b.nameToKeyMap[e[1]]=f,b.types[f]=e[2],b.defaults[f]=e[3],b.opcodes[f]=C(e[0])?e[0]:[e[0]],b.order.push(f)}return b},a}(),qc=function(){function a(a){null===c&&(c=pc.createTables(b)),pc.call(this,c,a),this.privateDict=null}var b=[[[12,30],"ROS",["sid","sid","num"],null],[[12,20],"SyntheticBase","num",null],[0,"version","sid",null],[1,"Notice","sid",null],[[12,0],"Copyright","sid",null],[2,"FullName","sid",null],[3,"FamilyName","sid",null],[4,"Weight","sid",null],[[12,1],"isFixedPitch","num",0],[[12,2],"ItalicAngle","num",0],[[12,3],"UnderlinePosition","num",-100],[[12,4],"UnderlineThickness","num",50],[[12,5],"PaintType","num",0],[[12,6],"CharstringType","num",2],[[12,7],"FontMatrix",["num","num","num","num","num","num"],[.001,0,0,.001,0,0]],[13,"UniqueID","num",null],[5,"FontBBox",["num","num","num","num"],[0,0,0,0]],[[12,8],"StrokeWidth","num",0],[14,"XUID","array",null],[15,"charset","offset",0],[16,"Encoding","offset",0],[17,"CharStrings","offset",0],[18,"Private",["offset","offset"],null],[[12,21],"PostScript","sid",null],[[12,22],"BaseFontName","sid",null],[[12,23],"BaseFontBlend","delta",null],[[12,31],"CIDFontVersion","num",0],[[12,32],"CIDFontRevision","num",0],[[12,33],"CIDFontType","num",0],[[12,34],"CIDCount","num",8720],[[12,35],"UIDBase","num",null],[[12,37],"FDSelect","offset",null],[[12,36],"FDArray","offset",null],[[12,38],"FontName","sid",null]],c=null;return a.prototype=Object.create(pc.prototype),a}(),rc=function(){function a(a){null===c&&(c=pc.createTables(b)),pc.call(this,c,a),this.subrsIndex=null}var b=[[6,"BlueValues","delta",null],[7,"OtherBlues","delta",null],[8,"FamilyBlues","delta",null],[9,"FamilyOtherBlues","delta",null],[[12,9],"BlueScale","num",.039625],[[12,10],"BlueShift","num",7],[[12,11],"BlueFuzz","num",1],[10,"StdHW","num",null],[11,"StdVW","num",null],[[12,12],"StemSnapH","delta",null],[[12,13],"StemSnapV","delta",null],[[12,14],"ForceBold","num",0],[[12,17],"LanguageGroup","num",0],[[12,18],"ExpansionFactor","num",.06],[[12,19],"initialRandomSeed","num",0],[20,"defaultWidthX","num",0],[21,"nominalWidthX","num",0],[19,"Subrs","offset",null]],c=null;return a.prototype=Object.create(pc.prototype),a}(),sc={ISO_ADOBE:0,EXPERT:1,EXPERT_SUBSET:2},tc=function(){function a(a,b,c,d){this.predefined=a,this.format=b,this.charset=c,this.raw=d}return a}(),uc=function(){function a(a,b,c,d){this.predefined=a,this.format=b,this.encoding=c,this.raw=d}return a}(),vc=function(){function a(a,b){this.fdSelect=a,this.raw=b}return a}(),wc=function(){function a(){this.offsets={}}return a.prototype={isTracking:function(a){return a in this.offsets},track:function(a,b){a in this.offsets&&c("Already tracking location of "+a),this.offsets[a]=b},offset:function(a){for(var b in this.offsets)this.offsets[b]+=a},setEntryLocation:function(a,b,d){a in this.offsets||c("Not tracking location of "+a);for(var e=d.data,f=this.offsets[a],g=5,h=0,i=b.length;i>h;++h){var j=h*g+f,k=j+1,l=j+2,m=j+3,n=j+4;(29!==e[j]||0!==e[k]||0!==e[l]||0!==e[m]||0!==e[n])&&c("writing to an offset that is not empty");var o=b[h];e[j]=29,e[k]=o>>24&255,e[l]=o>>16&255,e[m]=o>>8&255,e[n]=255&o}}},a}(),xc=function(){function a(a){this.cff=a}return a.prototype={compile:function(){var a=this.cff,b={data:[],length:0,add:function(a){this.data=this.data.concat(a),this.length=this.data.length}},c=this.compileHeader(a.header);b.add(c);var d=this.compileNameIndex(a.names);if(b.add(d),a.isCIDFont&&a.topDict.hasName("FontMatrix")){var e=a.topDict.getByName("FontMatrix");a.topDict.removeByName("FontMatrix");for(var f=0,g=a.fdArray.length;g>f;f++){var h=a.fdArray[f],i=e.slice(0);h.hasName("FontMatrix")&&(i=na.transform(i,h.getByName("FontMatrix"))),h.setByName("FontMatrix",i)}}var j=this.compileTopDicts([a.topDict],b.length,a.isCIDFont);b.add(j.output);var k=j.trackers[0],l=this.compileStringIndex(a.strings.strings);b.add(l);var m=this.compileIndex(a.globalSubrIndex);if(b.add(m),a.encoding&&a.topDict.hasName("Encoding"))if(a.encoding.predefined)k.setEntryLocation("Encoding",[a.encoding.format],b);else{var n=this.compileEncoding(a.encoding);k.setEntryLocation("Encoding",[b.length],b),b.add(n)}if(a.charset&&a.topDict.hasName("charset"))if(a.charset.predefined)k.setEntryLocation("charset",[a.charset.format],b);else{var o=this.compileCharset(a.charset);k.setEntryLocation("charset",[b.length],b),b.add(o)}var p=this.compileCharStrings(a.charStrings);if(k.setEntryLocation("CharStrings",[b.length],b),b.add(p),a.isCIDFont){k.setEntryLocation("FDSelect",[b.length],b);var q=this.compileFDSelect(a.fdSelect.raw);b.add(q),j=this.compileTopDicts(a.fdArray,b.length,!0),k.setEntryLocation("FDArray",[b.length],b),b.add(j.output);var r=j.trackers;this.compilePrivateDicts(a.fdArray,r,b)}return this.compilePrivateDicts([a.topDict],[k],b),b.add([0]),b.data},encodeNumber:function(a){return parseFloat(a)!==parseInt(a,10)||isNaN(a)?this.encodeFloat(a):this.encodeInteger(a)},encodeFloat:function(a){var b=a.toString(),c=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(b);if(c){var d=parseFloat("1e"+((c[2]?+c[2]:0)+c[1].length));b=(Math.round(a*d)/d).toString()}var e,f,g="";for(e=0,f=b.length;f>e;++e){var h=b[e];g+="e"===h?"-"===b[++e]?"c":"b":"."===h?"a":"-"===h?"e":h}g+=1&g.length?"f":"ff";var i=[30];for(e=0,f=g.length;f>e;e+=2)i.push(parseInt(g.substr(e,2),16));return i},encodeInteger:function(a){var b;return a>=-107&&107>=a?b=[a+139]:a>=108&&1131>=a?(a=[a-108],b=[(a>>8)+247,255&a]):a>=-1131&&-108>=a?(a=-a-108,b=[(a>>8)+251,255&a]):b=a>=-32768&&32767>=a?[28,a>>8&255,255&a]:[29,a>>24&255,a>>16&255,a>>8&255,255&a],b},compileHeader:function(a){return[a.major,a.minor,a.hdrSize,a.offSize]},compileNameIndex:function(a){for(var b=new oc,c=0,d=a.length;d>c;++c)b.add(j(a[c]));return this.compileIndex(b)},compileTopDicts:function(a,b,c){for(var d=[],e=new oc,f=0,g=a.length;g>f;++f){var h=a[f];c&&(h.removeByName("CIDFontVersion"),h.removeByName("CIDFontRevision"),h.removeByName("CIDFontType"),h.removeByName("CIDCount"),h.removeByName("UIDBase"));var i=new wc,j=this.compileDict(h,i);d.push(i),e.add(j),i.offset(b)}return e=this.compileIndex(e,d),{trackers:d,output:e}},compilePrivateDicts:function(a,b,c){for(var d=0,f=a.length;f>d;++d){var g=a[d];e(g.privateDict&&g.hasName("Private"),"There must be an private dictionary.");var h=g.privateDict,i=new wc,j=this.compileDict(h,i),k=c.length;if(i.offset(k),j.length||(k=0),b[d].setEntryLocation("Private",[j.length,k],c),c.add(j),h.subrsIndex&&h.hasName("Subrs")){var l=this.compileIndex(h.subrsIndex);i.setEntryLocation("Subrs",[j.length],c),c.add(l)}}},compileDict:function(a,b){for(var d=[],e=a.order,f=0;fj;++j){var l=i[j],m=h[j];switch(l){case"num":case"sid":d=d.concat(this.encodeNumber(m));break;case"offset":var n=a.keyToNameMap[g];b.isTracking(n)||b.track(n,d.length),d=d.concat([29,0,0,0,0]);break;case"array":case"delta":d=d.concat(this.encodeNumber(m));for(var o=1,p=h.length;p>o;++o)d=d.concat(this.encodeNumber(h[o]));break;default:c("Unknown data type of "+l)}}d=d.concat(a.opcodes[g])}}}return d},compileStringIndex:function(a){for(var b=new oc,c=0,d=a.length;d>c;++c)b.add(j(a[c]));return this.compileIndex(b)},compileGlobalSubrIndex:function(){var a=this.cff.globalSubrIndex;this.out.writeByteArray(this.compileIndex(a))},compileCharStrings:function(a){return this.compileIndex(a)},compileCharset:function(a){return this.compileTypedArray(a.raw)},compileEncoding:function(a){return this.compileTypedArray(a.raw)},compileFDSelect:function(a){return this.compileTypedArray(a)},compileTypedArray:function(a){for(var b=[],c=0,d=a.length;d>c;++c)b[c]=a[c];return b},compileIndex:function(a,b){b=b||[];var c=a.objects,d=c.length;if(0===d)return[0,0,0];var e,f=[d>>8&255,255&d],g=1;for(e=0;d>e;++e)g+=c[e].length;var h;h=256>g?1:65536>g?2:16777216>g?3:4,f.push(h);var i=1;for(e=0;d+1>e;e++)1===h?f.push(255&i):2===h?f.push(i>>8&255,255&i):3===h?f.push(i>>16&255,i>>8&255,255&i):f.push(i>>>24&255,i>>16&255,i>>8&255,255&i),c[e]&&(i+=c[e].length);for(e=0;d>e;e++){b[e]&&b[e].offset(f.length);for(var j=0,k=c[e].length;k>j;j++)f.push(c[e][j])}return f}},a}();!function(){/Windows/.test(navigator.userAgent)&&(Nb=!0)}(),function(){/Windows.*Chrome/.test(navigator.userAgent)&&(Kb=!0)}();var yc=function(){function a(a,b){return a[b]<<24|a[b+1]<<16|a[b+2]<<8|a[b+3]}function b(a,b){return a[b]<<8|a[b+1]; +}function d(d,e,f){var g,h,i,j,k=1===b(d,e+2)?a(d,e+8):a(d,e+16),l=b(d,e+k);if(4===l){g=b(d,e+k+2);var m=b(d,e+k+6)>>1;for(i=e+k+14,h=[],j=0;m>j;j++,i+=2)h[j]={end:b(d,i)};for(i+=2,j=0;m>j;j++,i+=2)h[j].start=b(d,i);for(j=0;m>j;j++,i+=2)h[j].idDelta=b(d,i);for(j=0;m>j;j++,i+=2){var n=b(d,i);if(0!==n){h[j].ids=[];for(var o=0,p=h[j].end-h[j].start+1;p>o;o++)h[j].ids[o]=b(d,i+n),n+=2}}return h}if(12===l){g=a(d,e+k+4);var q=a(d,e+k+12);for(i=e+k+16,h=[],j=0;q>j;j++)h.push({start:a(d,i),end:a(d,i+4),idDelta:a(d,i+8)-a(d,i)}),i+=12;return h}c("not supported cmap: "+l)}function e(a,b,c){var d={},e=new kc(new Mc(a,b,c-b),d),f=e.parse();return{glyphs:f.charStrings.objects,subrs:f.topDict.privateDict&&f.topDict.privateDict.subrsIndex&&f.topDict.privateDict.subrsIndex.objects,gsubrs:f.globalSubrIndex&&f.globalSubrIndex.objects}}function f(a,b,c){var d,e;c?(d=4,e=function(a,b){return a[b]<<24|a[b+1]<<16|a[b+2]<<8|a[b+3]}):(d=2,e=function(a,b){return a[b]<<9|a[b+1]<<1});for(var f=[],g=e(b,0),h=d;hd;){var f=d+e+1>>1;c>16,k=0,l=0;if(i+=10,0>j){do{g=a[i]<<8|a[i+1];var m=a[i+2]<<8|a[i+3];i+=4;var n,o;1&g?(n=(a[i]<<24|a[i+1]<<16)>>16,o=(a[i+2]<<24|a[i+3]<<16)>>16,i+=4):(n=a[i++],o=a[i++]),2&g?(k=n,l=o):(k=0,l=0);var p=1,q=1,r=0,s=0;8&g?(p=q=(a[i]<<24|a[i+1]<<16)/1073741824,i+=2):64&g?(p=(a[i]<<24|a[i+1]<<16)/1073741824,q=(a[i+2]<<24|a[i+3]<<16)/1073741824,i+=4):128&g&&(p=(a[i]<<24|a[i+1]<<16)/1073741824,r=(a[i+2]<<24|a[i+3]<<16)/1073741824,s=(a[i+4]<<24|a[i+5]<<16)/1073741824,q=(a[i+6]<<24|a[i+7]<<16)/1073741824,i+=8);var t=c.glyphs[m];t&&(b.push({cmd:"save"}),b.push({cmd:"transform",args:[p,r,s,q,k,l]}),h(t,b,c),b.push({cmd:"restore"}))}while(32&g)}else{var u,v,w=[];for(u=0;j>u;u++)w.push(a[i]<<8|a[i+1]),i+=2;var x=a[i]<<8|a[i+1];i+=2+x;for(var y=w[w.length-1]+1,z=[];z.length0;)z.push({flags:g})}for(u=0;y>u;u++){switch(18&z[u].flags){case 0:k+=(a[i]<<24|a[i+1]<<16)>>16,i+=2;break;case 2:k-=a[i++];break;case 18:k+=a[i++]}z[u].x=k}for(u=0;y>u;u++){switch(36&z[u].flags){case 0:l+=(a[i]<<24|a[i+1]<<16)>>16,i+=2;break;case 4:l-=a[i++];break;case 36:l+=a[i++]}z[u].y=l}var B=0;for(i=0;j>i;i++){var C=w[i],D=z.slice(B,C+1);if(1&D[0].flags)D.push(D[0]);else if(1&D[D.length-1].flags)D.unshift(D[D.length-1]);else{var E={flags:1,x:(D[0].x+D[D.length-1].x)/2,y:(D[0].y+D[D.length-1].y)/2};D.unshift(E),D.push(E)}for(d(D[0].x,D[0].y),u=1,v=D.length;v>u;u++)1&D[u].flags?e(D[u].x,D[u].y):1&D[u+1].flags?(f(D[u].x,D[u].y,D[u+1].x,D[u+1].y),u++):f(D[u].x,D[u].y,(D[u].x+D[u+1].x)/2,(D[u].y+D[u+1].y)/2);B=C+1}}}function j(a,b,d){function e(a,c){b.push({cmd:"moveTo",args:[a,c]})}function f(a,c){b.push({cmd:"lineTo",args:[a,c]})}function h(a,c,d,e,f,g){b.push({cmd:"bezierCurveTo",args:[a,c,d,e,f,g]})}function i(a){for(var o=0;o>1,y=!0;break;case 3:n+=k.length>>1,y=!0;break;case 4:m+=k.pop(),e(l,m),y=!0;break;case 5:for(;k.length>0;)l+=k.shift(),m+=k.shift(),f(l,m);break;case 6:for(;k.length>0&&(l+=k.shift(),f(l,m),0!==k.length);)m+=k.shift(),f(l,m);break;case 7:for(;k.length>0&&(m+=k.shift(),f(l,m),0!==k.length);)l+=k.shift(),f(l,m);break;case 8:for(;k.length>0;)p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m);break;case 10:w=k.pop()+d.subrsBias,x=d.subrs[w],x&&i(x);break;case 11:return;case 12:switch(z=a[o++]){case 34:p=l+k.shift(),q=p+k.shift(),t=m+k.shift(),l=q+k.shift(),h(p,m,q,t,l,t),p=l+k.shift(),q=p+k.shift(),l=q+k.shift(),h(p,t,q,m,l,m);break;case 35:p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m),p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m),k.pop();break;case 36:p=l+k.shift(),t=m+k.shift(),q=p+k.shift(),u=t+k.shift(),l=q+k.shift(),h(p,t,q,u,l,u),p=l+k.shift(),q=p+k.shift(),v=u+k.shift(),l=q+k.shift(),h(p,u,q,v,l,m);break;case 37:var A=l,B=m;p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m),p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q,m=s,Math.abs(l-A)>Math.abs(m-B)?l+=k.shift():m+=k.shift(),h(p,r,q,s,l,m);break;default:c("unknown operator: 12 "+z)}break;case 14:if(k.length>=4){var C=k.pop(),D=k.pop();m=k.pop(),l=k.pop(),b.push({cmd:"save"}),b.push({cmd:"translate",args:[l,m]});var E=g(d.cmap,String.fromCharCode(d.glyphNameMap[Pb.StandardEncoding[C]]));j(d.glyphs[E],b,d),b.push({cmd:"restore"}),E=g(d.cmap,String.fromCharCode(d.glyphNameMap[Pb.StandardEncoding[D]])),j(d.glyphs[E],b,d)}return;case 18:n+=k.length>>1,y=!0;break;case 19:n+=k.length>>1,o+=n+7>>3,y=!0;break;case 20:n+=k.length>>1,o+=n+7>>3,y=!0;break;case 21:m+=k.pop(),l+=k.pop(),e(l,m),y=!0;break;case 22:l+=k.pop(),e(l,m),y=!0;break;case 23:n+=k.length>>1,y=!0;break;case 24:for(;k.length>2;)p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m);l+=k.shift(),m+=k.shift(),f(l,m);break;case 25:for(;k.length>6;)l+=k.shift(),m+=k.shift(),f(l,m);p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m);break;case 26:for(k.length%2&&(l+=k.shift());k.length>0;)p=l,r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q,m=s+k.shift(),h(p,r,q,s,l,m);break;case 27:for(k.length%2&&(m+=k.shift());k.length>0;)p=l+k.shift(),r=m,q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s,h(p,r,q,s,l,m);break;case 28:k.push((a[o]<<24|a[o+1]<<16)>>16),o+=2;break;case 29:w=k.pop()+d.gsubrsBias,x=d.gsubrs[w],x&&i(x);break;case 30:for(;k.length>0&&(p=l,r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+(1===k.length?k.shift():0),h(p,r,q,s,l,m),0!==k.length);)p=l+k.shift(),r=m,q=p+k.shift(),s=r+k.shift(),m=s+k.shift(),l=q+(1===k.length?k.shift():0),h(p,r,q,s,l,m);break;case 31:for(;k.length>0&&(p=l+k.shift(),r=m,q=p+k.shift(),s=r+k.shift(),m=s+k.shift(),l=q+(1===k.length?k.shift():0),h(p,r,q,s,l,m),0!==k.length);)p=l,r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+(1===k.length?k.shift():0),h(p,r,q,s,l,m);break;default:32>z&&c("unknown operator: "+z),247>z?k.push(z-139):251>z?k.push(256*(z-247)+a[o++]+108):255>z?k.push(256*-(z-251)-a[o++]-108):(k.push((a[o]<<24|a[o+1]<<16|a[o+2]<<8|a[o+3])/65536),o+=4)}y&&(k.length=0)}}var k=[],l=0,m=0,n=0;i(a)}function k(a){this.compiledGlyphs={},this.fontMatrix=a}function l(a,b,c){c=c||[488e-6,0,0,488e-6,0,0],k.call(this,c),this.glyphs=a,this.cmap=b,this.compiledGlyphs=[]}function m(a,b,c,d){c=c||[.001,0,0,.001,0,0],k.call(this,c),this.glyphs=a.glyphs,this.gsubrs=a.gsubrs||[],this.subrs=a.subrs||[],this.cmap=b,this.glyphNameMap=d||zc,this.compiledGlyphs=[],this.gsubrsBias=this.gsubrs.length<1240?107:this.gsubrs.length<33900?1131:32768,this.subrsBias=this.subrs.length<1240?107:this.subrs.length<33900?1131:32768}var n="";return k.prototype={getPathJs:function(a){var b=g(this.cmap,a),c=this.compiledGlyphs[b];return c||(this.compiledGlyphs[b]=c=this.compileGlyph(this.glyphs[b])),c},compileGlyph:function(a){if(!a||0===a.length||14===a[0])return n;var b=[];return b.push({cmd:"save"}),b.push({cmd:"transform",args:this.fontMatrix.slice()}),b.push({cmd:"scale",args:["size","-size"]}),this.compileGlyphImpl(a,b),b.push({cmd:"restore"}),b},compileGlyphImpl:function(){c("Children classes should implement this.")},hasBuiltPath:function(a){var b=g(this.cmap,a);return b in this.compiledGlyphs}},na.inherit(l,k,{compileGlyphImpl:function(a,b){h(a,b,this)}}),na.inherit(m,k,{compileGlyphImpl:function(a,b){j(a,b,this)}}),{create:function(c){for(var g,h,j,k,n,o,p=new Uint8Array(c.data),q=b(p,4),r=0,s=12;q>r;r++,s+=16){var t=i(p.subarray(s,s+4)),u=a(p,s+8),v=a(p,s+12);switch(t){case"cmap":g=d(p,u,u+v);break;case"glyf":h=p.subarray(u,u+v);break;case"loca":j=p.subarray(u,u+v);break;case"head":o=b(p,u+18),n=b(p,u+50);break;case"CFF ":k=e(p,u,u+v)}}if(h){var w=o?[1/o,0,0,1/o,0,0]:c.fontMatrix;return new l(f(h,j,n),g,w)}return new m(k,g,c.fontMatrix,c.glyphNameMap)}}}(),zc={A:65,AE:198,AEacute:508,AEmacron:482,AEsmall:63462,Aacute:193,Aacutesmall:63457,Abreve:258,Abreveacute:7854,Abrevecyrillic:1232,Abrevedotbelow:7862,Abrevegrave:7856,Abrevehookabove:7858,Abrevetilde:7860,Acaron:461,Acircle:9398,Acircumflex:194,Acircumflexacute:7844,Acircumflexdotbelow:7852,Acircumflexgrave:7846,Acircumflexhookabove:7848,Acircumflexsmall:63458,Acircumflextilde:7850,Acute:63177,Acutesmall:63412,Acyrillic:1040,Adblgrave:512,Adieresis:196,Adieresiscyrillic:1234,Adieresismacron:478,Adieresissmall:63460,Adotbelow:7840,Adotmacron:480,Agrave:192,Agravesmall:63456,Ahookabove:7842,Aiecyrillic:1236,Ainvertedbreve:514,Alpha:913,Alphatonos:902,Amacron:256,Amonospace:65313,Aogonek:260,Aring:197,Aringacute:506,Aringbelow:7680,Aringsmall:63461,Asmall:63329,Atilde:195,Atildesmall:63459,Aybarmenian:1329,B:66,Bcircle:9399,Bdotaccent:7682,Bdotbelow:7684,Becyrillic:1041,Benarmenian:1330,Beta:914,Bhook:385,Blinebelow:7686,Bmonospace:65314,Brevesmall:63220,Bsmall:63330,Btopbar:386,C:67,Caarmenian:1342,Cacute:262,Caron:63178,Caronsmall:63221,Ccaron:268,Ccedilla:199,Ccedillaacute:7688,Ccedillasmall:63463,Ccircle:9400,Ccircumflex:264,Cdot:266,Cdotaccent:266,Cedillasmall:63416,Chaarmenian:1353,Cheabkhasiancyrillic:1212,Checyrillic:1063,Chedescenderabkhasiancyrillic:1214,Chedescendercyrillic:1206,Chedieresiscyrillic:1268,Cheharmenian:1347,Chekhakassiancyrillic:1227,Cheverticalstrokecyrillic:1208,Chi:935,Chook:391,Circumflexsmall:63222,Cmonospace:65315,Coarmenian:1361,Csmall:63331,D:68,DZ:497,DZcaron:452,Daarmenian:1332,Dafrican:393,Dcaron:270,Dcedilla:7696,Dcircle:9401,Dcircumflexbelow:7698,Dcroat:272,Ddotaccent:7690,Ddotbelow:7692,Decyrillic:1044,Deicoptic:1006,Delta:8710,Deltagreek:916,Dhook:394,Dieresis:63179,DieresisAcute:63180,DieresisGrave:63181,Dieresissmall:63400,Digammagreek:988,Djecyrillic:1026,Dlinebelow:7694,Dmonospace:65316,Dotaccentsmall:63223,Dslash:272,Dsmall:63332,Dtopbar:395,Dz:498,Dzcaron:453,Dzeabkhasiancyrillic:1248,Dzecyrillic:1029,Dzhecyrillic:1039,E:69,Eacute:201,Eacutesmall:63465,Ebreve:276,Ecaron:282,Ecedillabreve:7708,Echarmenian:1333,Ecircle:9402,Ecircumflex:202,Ecircumflexacute:7870,Ecircumflexbelow:7704,Ecircumflexdotbelow:7878,Ecircumflexgrave:7872,Ecircumflexhookabove:7874,Ecircumflexsmall:63466,Ecircumflextilde:7876,Ecyrillic:1028,Edblgrave:516,Edieresis:203,Edieresissmall:63467,Edot:278,Edotaccent:278,Edotbelow:7864,Efcyrillic:1060,Egrave:200,Egravesmall:63464,Eharmenian:1335,Ehookabove:7866,Eightroman:8551,Einvertedbreve:518,Eiotifiedcyrillic:1124,Elcyrillic:1051,Elevenroman:8554,Emacron:274,Emacronacute:7702,Emacrongrave:7700,Emcyrillic:1052,Emonospace:65317,Encyrillic:1053,Endescendercyrillic:1186,Eng:330,Enghecyrillic:1188,Enhookcyrillic:1223,Eogonek:280,Eopen:400,Epsilon:917,Epsilontonos:904,Ercyrillic:1056,Ereversed:398,Ereversedcyrillic:1069,Escyrillic:1057,Esdescendercyrillic:1194,Esh:425,Esmall:63333,Eta:919,Etarmenian:1336,Etatonos:905,Eth:208,Ethsmall:63472,Etilde:7868,Etildebelow:7706,Euro:8364,Ezh:439,Ezhcaron:494,Ezhreversed:440,F:70,Fcircle:9403,Fdotaccent:7710,Feharmenian:1366,Feicoptic:996,Fhook:401,Fitacyrillic:1138,Fiveroman:8548,Fmonospace:65318,Fourroman:8547,Fsmall:63334,G:71,GBsquare:13191,Gacute:500,Gamma:915,Gammaafrican:404,Gangiacoptic:1002,Gbreve:286,Gcaron:486,Gcedilla:290,Gcircle:9404,Gcircumflex:284,Gcommaaccent:290,Gdot:288,Gdotaccent:288,Gecyrillic:1043,Ghadarmenian:1346,Ghemiddlehookcyrillic:1172,Ghestrokecyrillic:1170,Gheupturncyrillic:1168,Ghook:403,Gimarmenian:1331,Gjecyrillic:1027,Gmacron:7712,Gmonospace:65319,Grave:63182,Gravesmall:63328,Gsmall:63335,Gsmallhook:667,Gstroke:484,H:72,H18533:9679,H18543:9642,H18551:9643,H22073:9633,HPsquare:13259,Haabkhasiancyrillic:1192,Hadescendercyrillic:1202,Hardsigncyrillic:1066,Hbar:294,Hbrevebelow:7722,Hcedilla:7720,Hcircle:9405,Hcircumflex:292,Hdieresis:7718,Hdotaccent:7714,Hdotbelow:7716,Hmonospace:65320,Hoarmenian:1344,Horicoptic:1e3,Hsmall:63336,Hungarumlaut:63183,Hungarumlautsmall:63224,Hzsquare:13200,I:73,IAcyrillic:1071,IJ:306,IUcyrillic:1070,Iacute:205,Iacutesmall:63469,Ibreve:300,Icaron:463,Icircle:9406,Icircumflex:206,Icircumflexsmall:63470,Icyrillic:1030,Idblgrave:520,Idieresis:207,Idieresisacute:7726,Idieresiscyrillic:1252,Idieresissmall:63471,Idot:304,Idotaccent:304,Idotbelow:7882,Iebrevecyrillic:1238,Iecyrillic:1045,Ifraktur:8465,Igrave:204,Igravesmall:63468,Ihookabove:7880,Iicyrillic:1048,Iinvertedbreve:522,Iishortcyrillic:1049,Imacron:298,Imacroncyrillic:1250,Imonospace:65321,Iniarmenian:1339,Iocyrillic:1025,Iogonek:302,Iota:921,Iotaafrican:406,Iotadieresis:938,Iotatonos:906,Ismall:63337,Istroke:407,Itilde:296,Itildebelow:7724,Izhitsacyrillic:1140,Izhitsadblgravecyrillic:1142,J:74,Jaarmenian:1345,Jcircle:9407,Jcircumflex:308,Jecyrillic:1032,Jheharmenian:1355,Jmonospace:65322,Jsmall:63338,K:75,KBsquare:13189,KKsquare:13261,Kabashkircyrillic:1184,Kacute:7728,Kacyrillic:1050,Kadescendercyrillic:1178,Kahookcyrillic:1219,Kappa:922,Kastrokecyrillic:1182,Kaverticalstrokecyrillic:1180,Kcaron:488,Kcedilla:310,Kcircle:9408,Kcommaaccent:310,Kdotbelow:7730,Keharmenian:1364,Kenarmenian:1343,Khacyrillic:1061,Kheicoptic:998,Khook:408,Kjecyrillic:1036,Klinebelow:7732,Kmonospace:65323,Koppacyrillic:1152,Koppagreek:990,Ksicyrillic:1134,Ksmall:63339,L:76,LJ:455,LL:63167,Lacute:313,Lambda:923,Lcaron:317,Lcedilla:315,Lcircle:9409,Lcircumflexbelow:7740,Lcommaaccent:315,Ldot:319,Ldotaccent:319,Ldotbelow:7734,Ldotbelowmacron:7736,Liwnarmenian:1340,Lj:456,Ljecyrillic:1033,Llinebelow:7738,Lmonospace:65324,Lslash:321,Lslashsmall:63225,Lsmall:63340,M:77,MBsquare:13190,Macron:63184,Macronsmall:63407,Macute:7742,Mcircle:9410,Mdotaccent:7744,Mdotbelow:7746,Menarmenian:1348,Mmonospace:65325,Msmall:63341,Mturned:412,Mu:924,N:78,NJ:458,Nacute:323,Ncaron:327,Ncedilla:325,Ncircle:9411,Ncircumflexbelow:7754,Ncommaaccent:325,Ndotaccent:7748,Ndotbelow:7750,Nhookleft:413,Nineroman:8552,Nj:459,Njecyrillic:1034,Nlinebelow:7752,Nmonospace:65326,Nowarmenian:1350,Nsmall:63342,Ntilde:209,Ntildesmall:63473,Nu:925,O:79,OE:338,OEsmall:63226,Oacute:211,Oacutesmall:63475,Obarredcyrillic:1256,Obarreddieresiscyrillic:1258,Obreve:334,Ocaron:465,Ocenteredtilde:415,Ocircle:9412,Ocircumflex:212,Ocircumflexacute:7888,Ocircumflexdotbelow:7896,Ocircumflexgrave:7890,Ocircumflexhookabove:7892,Ocircumflexsmall:63476,Ocircumflextilde:7894,Ocyrillic:1054,Odblacute:336,Odblgrave:524,Odieresis:214,Odieresiscyrillic:1254,Odieresissmall:63478,Odotbelow:7884,Ogoneksmall:63227,Ograve:210,Ogravesmall:63474,Oharmenian:1365,Ohm:8486,Ohookabove:7886,Ohorn:416,Ohornacute:7898,Ohorndotbelow:7906,Ohorngrave:7900,Ohornhookabove:7902,Ohorntilde:7904,Ohungarumlaut:336,Oi:418,Oinvertedbreve:526,Omacron:332,Omacronacute:7762,Omacrongrave:7760,Omega:8486,Omegacyrillic:1120,Omegagreek:937,Omegaroundcyrillic:1146,Omegatitlocyrillic:1148,Omegatonos:911,Omicron:927,Omicrontonos:908,Omonospace:65327,Oneroman:8544,Oogonek:490,Oogonekmacron:492,Oopen:390,Oslash:216,Oslashacute:510,Oslashsmall:63480,Osmall:63343,Ostrokeacute:510,Otcyrillic:1150,Otilde:213,Otildeacute:7756,Otildedieresis:7758,Otildesmall:63477,P:80,Pacute:7764,Pcircle:9413,Pdotaccent:7766,Pecyrillic:1055,Peharmenian:1354,Pemiddlehookcyrillic:1190,Phi:934,Phook:420,Pi:928,Piwrarmenian:1363,Pmonospace:65328,Psi:936,Psicyrillic:1136,Psmall:63344,Q:81,Qcircle:9414,Qmonospace:65329,Qsmall:63345,R:82,Raarmenian:1356,Racute:340,Rcaron:344,Rcedilla:342,Rcircle:9415,Rcommaaccent:342,Rdblgrave:528,Rdotaccent:7768,Rdotbelow:7770,Rdotbelowmacron:7772,Reharmenian:1360,Rfraktur:8476,Rho:929,Ringsmall:63228,Rinvertedbreve:530,Rlinebelow:7774,Rmonospace:65330,Rsmall:63346,Rsmallinverted:641,Rsmallinvertedsuperior:694,S:83,SF010000:9484,SF020000:9492,SF030000:9488,SF040000:9496,SF050000:9532,SF060000:9516,SF070000:9524,SF080000:9500,SF090000:9508,SF100000:9472,SF110000:9474,SF190000:9569,SF200000:9570,SF210000:9558,SF220000:9557,SF230000:9571,SF240000:9553,SF250000:9559,SF260000:9565,SF270000:9564,SF280000:9563,SF360000:9566,SF370000:9567,SF380000:9562,SF390000:9556,SF400000:9577,SF410000:9574,SF420000:9568,SF430000:9552,SF440000:9580,SF450000:9575,SF460000:9576,SF470000:9572,SF480000:9573,SF490000:9561,SF500000:9560,SF510000:9554,SF520000:9555,SF530000:9579,SF540000:9578,Sacute:346,Sacutedotaccent:7780,Sampigreek:992,Scaron:352,Scarondotaccent:7782,Scaronsmall:63229,Scedilla:350,Schwa:399,Schwacyrillic:1240,Schwadieresiscyrillic:1242,Scircle:9416,Scircumflex:348,Scommaaccent:536,Sdotaccent:7776,Sdotbelow:7778,Sdotbelowdotaccent:7784,Seharmenian:1357,Sevenroman:8550,Shaarmenian:1351,Shacyrillic:1064,Shchacyrillic:1065,Sheicoptic:994,Shhacyrillic:1210,Shimacoptic:1004,Sigma:931,Sixroman:8549,Smonospace:65331,Softsigncyrillic:1068,Ssmall:63347,Stigmagreek:986,T:84,Tau:932,Tbar:358,Tcaron:356,Tcedilla:354,Tcircle:9417,Tcircumflexbelow:7792,Tcommaaccent:354,Tdotaccent:7786,Tdotbelow:7788,Tecyrillic:1058,Tedescendercyrillic:1196,Tenroman:8553,Tetsecyrillic:1204,Theta:920,Thook:428,Thorn:222,Thornsmall:63486,Threeroman:8546,Tildesmall:63230,Tiwnarmenian:1359,Tlinebelow:7790,Tmonospace:65332,Toarmenian:1337,Tonefive:444,Tonesix:388,Tonetwo:423,Tretroflexhook:430,Tsecyrillic:1062,Tshecyrillic:1035,Tsmall:63348,Twelveroman:8555,Tworoman:8545,U:85,Uacute:218,Uacutesmall:63482,Ubreve:364,Ucaron:467,Ucircle:9418,Ucircumflex:219,Ucircumflexbelow:7798,Ucircumflexsmall:63483,Ucyrillic:1059,Udblacute:368,Udblgrave:532,Udieresis:220,Udieresisacute:471,Udieresisbelow:7794,Udieresiscaron:473,Udieresiscyrillic:1264,Udieresisgrave:475,Udieresismacron:469,Udieresissmall:63484,Udotbelow:7908,Ugrave:217,Ugravesmall:63481,Uhookabove:7910,Uhorn:431,Uhornacute:7912,Uhorndotbelow:7920,Uhorngrave:7914,Uhornhookabove:7916,Uhorntilde:7918,Uhungarumlaut:368,Uhungarumlautcyrillic:1266,Uinvertedbreve:534,Ukcyrillic:1144,Umacron:362,Umacroncyrillic:1262,Umacrondieresis:7802,Umonospace:65333,Uogonek:370,Upsilon:933,Upsilon1:978,Upsilonacutehooksymbolgreek:979,Upsilonafrican:433,Upsilondieresis:939,Upsilondieresishooksymbolgreek:980,Upsilonhooksymbol:978,Upsilontonos:910,Uring:366,Ushortcyrillic:1038,Usmall:63349,Ustraightcyrillic:1198,Ustraightstrokecyrillic:1200,Utilde:360,Utildeacute:7800,Utildebelow:7796,V:86,Vcircle:9419,Vdotbelow:7806,Vecyrillic:1042,Vewarmenian:1358,Vhook:434,Vmonospace:65334,Voarmenian:1352,Vsmall:63350,Vtilde:7804,W:87,Wacute:7810,Wcircle:9420,Wcircumflex:372,Wdieresis:7812,Wdotaccent:7814,Wdotbelow:7816,Wgrave:7808,Wmonospace:65335,Wsmall:63351,X:88,Xcircle:9421,Xdieresis:7820,Xdotaccent:7818,Xeharmenian:1341,Xi:926,Xmonospace:65336,Xsmall:63352,Y:89,Yacute:221,Yacutesmall:63485,Yatcyrillic:1122,Ycircle:9422,Ycircumflex:374,Ydieresis:376,Ydieresissmall:63487,Ydotaccent:7822,Ydotbelow:7924,Yericyrillic:1067,Yerudieresiscyrillic:1272,Ygrave:7922,Yhook:435,Yhookabove:7926,Yiarmenian:1349,Yicyrillic:1031,Yiwnarmenian:1362,Ymonospace:65337,Ysmall:63353,Ytilde:7928,Yusbigcyrillic:1130,Yusbigiotifiedcyrillic:1132,Yuslittlecyrillic:1126,Yuslittleiotifiedcyrillic:1128,Z:90,Zaarmenian:1334,Zacute:377,Zcaron:381,Zcaronsmall:63231,Zcircle:9423,Zcircumflex:7824,Zdot:379,Zdotaccent:379,Zdotbelow:7826,Zecyrillic:1047,Zedescendercyrillic:1176,Zedieresiscyrillic:1246,Zeta:918,Zhearmenian:1338,Zhebrevecyrillic:1217,Zhecyrillic:1046,Zhedescendercyrillic:1174,Zhedieresiscyrillic:1244,Zlinebelow:7828,Zmonospace:65338,Zsmall:63354,Zstroke:437,a:97,aabengali:2438,aacute:225,aadeva:2310,aagujarati:2694,aagurmukhi:2566,aamatragurmukhi:2622,aarusquare:13059,aavowelsignbengali:2494,aavowelsigndeva:2366,aavowelsigngujarati:2750,abbreviationmarkarmenian:1375,abbreviationsigndeva:2416,abengali:2437,abopomofo:12570,abreve:259,abreveacute:7855,abrevecyrillic:1233,abrevedotbelow:7863,abrevegrave:7857,abrevehookabove:7859,abrevetilde:7861,acaron:462,acircle:9424,acircumflex:226,acircumflexacute:7845,acircumflexdotbelow:7853,acircumflexgrave:7847,acircumflexhookabove:7849,acircumflextilde:7851,acute:180,acutebelowcmb:791,acutecmb:769,acutecomb:769,acutedeva:2388,acutelowmod:719,acutetonecmb:833,acyrillic:1072,adblgrave:513,addakgurmukhi:2673,adeva:2309,adieresis:228,adieresiscyrillic:1235,adieresismacron:479,adotbelow:7841,adotmacron:481,ae:230,aeacute:509,aekorean:12624,aemacron:483,afii00208:8213,afii08941:8356,afii10017:1040,afii10018:1041,afii10019:1042,afii10020:1043,afii10021:1044,afii10022:1045,afii10023:1025,afii10024:1046,afii10025:1047,afii10026:1048,afii10027:1049,afii10028:1050,afii10029:1051,afii10030:1052,afii10031:1053,afii10032:1054,afii10033:1055,afii10034:1056,afii10035:1057,afii10036:1058,afii10037:1059,afii10038:1060,afii10039:1061,afii10040:1062,afii10041:1063,afii10042:1064,afii10043:1065,afii10044:1066,afii10045:1067,afii10046:1068,afii10047:1069,afii10048:1070,afii10049:1071,afii10050:1168,afii10051:1026,afii10052:1027,afii10053:1028,afii10054:1029,afii10055:1030,afii10056:1031,afii10057:1032,afii10058:1033,afii10059:1034,afii10060:1035,afii10061:1036,afii10062:1038,afii10063:63172,afii10064:63173,afii10065:1072,afii10066:1073,afii10067:1074,afii10068:1075,afii10069:1076,afii10070:1077,afii10071:1105,afii10072:1078,afii10073:1079,afii10074:1080,afii10075:1081,afii10076:1082,afii10077:1083,afii10078:1084,afii10079:1085,afii10080:1086,afii10081:1087,afii10082:1088,afii10083:1089,afii10084:1090,afii10085:1091,afii10086:1092,afii10087:1093,afii10088:1094,afii10089:1095,afii10090:1096,afii10091:1097,afii10092:1098,afii10093:1099,afii10094:1100,afii10095:1101,afii10096:1102,afii10097:1103,afii10098:1169,afii10099:1106,afii10100:1107,afii10101:1108,afii10102:1109,afii10103:1110,afii10104:1111,afii10105:1112,afii10106:1113,afii10107:1114,afii10108:1115,afii10109:1116,afii10110:1118,afii10145:1039,afii10146:1122,afii10147:1138,afii10148:1140,afii10192:63174,afii10193:1119,afii10194:1123,afii10195:1139,afii10196:1141,afii10831:63175,afii10832:63176,afii10846:1241,afii299:8206,afii300:8207,afii301:8205,afii57381:1642,afii57388:1548,afii57392:1632,afii57393:1633,afii57394:1634,afii57395:1635,afii57396:1636,afii57397:1637,afii57398:1638,afii57399:1639,afii57400:1640,afii57401:1641,afii57403:1563,afii57407:1567,afii57409:1569,afii57410:1570,afii57411:1571,afii57412:1572,afii57413:1573,afii57414:1574,afii57415:1575,afii57416:1576,afii57417:1577,afii57418:1578,afii57419:1579,afii57420:1580,afii57421:1581,afii57422:1582,afii57423:1583,afii57424:1584,afii57425:1585,afii57426:1586,afii57427:1587,afii57428:1588,afii57429:1589,afii57430:1590,afii57431:1591,afii57432:1592,afii57433:1593,afii57434:1594,afii57440:1600,afii57441:1601,afii57442:1602,afii57443:1603,afii57444:1604,afii57445:1605,afii57446:1606,afii57448:1608,afii57449:1609,afii57450:1610,afii57451:1611,afii57452:1612,afii57453:1613,afii57454:1614,afii57455:1615,afii57456:1616,afii57457:1617,afii57458:1618,afii57470:1607,afii57505:1700,afii57506:1662,afii57507:1670,afii57508:1688,afii57509:1711,afii57511:1657,afii57512:1672,afii57513:1681,afii57514:1722,afii57519:1746,afii57534:1749,afii57636:8362,afii57645:1470,afii57658:1475,afii57664:1488,afii57665:1489,afii57666:1490,afii57667:1491,afii57668:1492,afii57669:1493,afii57670:1494,afii57671:1495,afii57672:1496,afii57673:1497,afii57674:1498,afii57675:1499,afii57676:1500,afii57677:1501,afii57678:1502,afii57679:1503,afii57680:1504,afii57681:1505,afii57682:1506,afii57683:1507,afii57684:1508,afii57685:1509,afii57686:1510,afii57687:1511,afii57688:1512,afii57689:1513,afii57690:1514,afii57694:64298,afii57695:64299,afii57700:64331,afii57705:64287,afii57716:1520,afii57717:1521,afii57718:1522,afii57723:64309,afii57793:1460,afii57794:1461,afii57795:1462,afii57796:1467,afii57797:1464,afii57798:1463,afii57799:1456,afii57800:1458,afii57801:1457,afii57802:1459,afii57803:1474,afii57804:1473,afii57806:1465,afii57807:1468,afii57839:1469,afii57841:1471,afii57842:1472,afii57929:700,afii61248:8453,afii61289:8467,afii61352:8470,afii61573:8236,afii61574:8237,afii61575:8238,afii61664:8204,afii63167:1645,afii64937:701,agrave:224,agujarati:2693,agurmukhi:2565,ahiragana:12354,ahookabove:7843,aibengali:2448,aibopomofo:12574,aideva:2320,aiecyrillic:1237,aigujarati:2704,aigurmukhi:2576,aimatragurmukhi:2632,ainarabic:1593,ainfinalarabic:65226,aininitialarabic:65227,ainmedialarabic:65228,ainvertedbreve:515,aivowelsignbengali:2504,aivowelsigndeva:2376,aivowelsigngujarati:2760,akatakana:12450,akatakanahalfwidth:65393,akorean:12623,alef:1488,alefarabic:1575,alefdageshhebrew:64304,aleffinalarabic:65166,alefhamzaabovearabic:1571,alefhamzaabovefinalarabic:65156,alefhamzabelowarabic:1573,alefhamzabelowfinalarabic:65160,alefhebrew:1488,aleflamedhebrew:64335,alefmaddaabovearabic:1570,alefmaddaabovefinalarabic:65154,alefmaksuraarabic:1609,alefmaksurafinalarabic:65264,alefmaksurainitialarabic:65267,alefmaksuramedialarabic:65268,alefpatahhebrew:64302,alefqamatshebrew:64303,aleph:8501,allequal:8780,alpha:945,alphatonos:940,amacron:257,amonospace:65345,ampersand:38,ampersandmonospace:65286,ampersandsmall:63270,amsquare:13250,anbopomofo:12578,angbopomofo:12580,angbracketleft:12296,angbracketright:12297,angkhankhuthai:3674,angle:8736,anglebracketleft:12296,anglebracketleftvertical:65087,anglebracketright:12297,anglebracketrightvertical:65088,angleleft:9001,angleright:9002,angstrom:8491,anoteleia:903,anudattadeva:2386,anusvarabengali:2434,anusvaradeva:2306,anusvaragujarati:2690,aogonek:261,apaatosquare:13056,aparen:9372,apostrophearmenian:1370,apostrophemod:700,apple:63743,approaches:8784,approxequal:8776,approxequalorimage:8786,approximatelyequal:8773,araeaekorean:12686,araeakorean:12685,arc:8978,arighthalfring:7834,aring:229,aringacute:507,aringbelow:7681,arrowboth:8596,arrowdashdown:8675,arrowdashleft:8672,arrowdashright:8674,arrowdashup:8673,arrowdblboth:8660,arrowdbldown:8659,arrowdblleft:8656,arrowdblright:8658,arrowdblup:8657,arrowdown:8595,arrowdownleft:8601,arrowdownright:8600,arrowdownwhite:8681,arrowheaddownmod:709,arrowheadleftmod:706,arrowheadrightmod:707,arrowheadupmod:708,arrowhorizex:63719,arrowleft:8592,arrowleftdbl:8656,arrowleftdblstroke:8653,arrowleftoverright:8646,arrowleftwhite:8678,arrowright:8594,arrowrightdblstroke:8655,arrowrightheavy:10142,arrowrightoverleft:8644,arrowrightwhite:8680,arrowtableft:8676,arrowtabright:8677,arrowup:8593,arrowupdn:8597,arrowupdnbse:8616,arrowupdownbase:8616,arrowupleft:8598,arrowupleftofdown:8645,arrowupright:8599,arrowupwhite:8679,arrowvertex:63718,asciicircum:94,asciicircummonospace:65342,asciitilde:126,asciitildemonospace:65374,ascript:593,ascriptturned:594,asmallhiragana:12353,asmallkatakana:12449,asmallkatakanahalfwidth:65383,asterisk:42,asteriskaltonearabic:1645,asteriskarabic:1645,asteriskmath:8727,asteriskmonospace:65290,asterisksmall:65121,asterism:8258,asuperior:63209,asymptoticallyequal:8771,at:64,atilde:227,atmonospace:65312,atsmall:65131,aturned:592,aubengali:2452,aubopomofo:12576,audeva:2324,augujarati:2708,augurmukhi:2580,aulengthmarkbengali:2519,aumatragurmukhi:2636,auvowelsignbengali:2508,auvowelsigndeva:2380,auvowelsigngujarati:2764,avagrahadeva:2365,aybarmenian:1377,ayin:1506,ayinaltonehebrew:64288,ayinhebrew:1506,b:98,babengali:2476,backslash:92,backslashmonospace:65340,badeva:2348,bagujarati:2732,bagurmukhi:2604,bahiragana:12400,bahtthai:3647,bakatakana:12496,bar:124,barmonospace:65372,bbopomofo:12549,bcircle:9425,bdotaccent:7683,bdotbelow:7685,beamedsixteenthnotes:9836,because:8757,becyrillic:1073,beharabic:1576,behfinalarabic:65168,behinitialarabic:65169,behiragana:12409,behmedialarabic:65170,behmeeminitialarabic:64671,behmeemisolatedarabic:64520,behnoonfinalarabic:64621,bekatakana:12505,benarmenian:1378,bet:1489,beta:946,betasymbolgreek:976,betdagesh:64305,betdageshhebrew:64305,bethebrew:1489,betrafehebrew:64332,bhabengali:2477,bhadeva:2349,bhagujarati:2733,bhagurmukhi:2605,bhook:595,bihiragana:12403,bikatakana:12499,bilabialclick:664,bindigurmukhi:2562,birusquare:13105,blackcircle:9679,blackdiamond:9670,blackdownpointingtriangle:9660,blackleftpointingpointer:9668,blackleftpointingtriangle:9664,blacklenticularbracketleft:12304,blacklenticularbracketleftvertical:65083,blacklenticularbracketright:12305,blacklenticularbracketrightvertical:65084,blacklowerlefttriangle:9699,blacklowerrighttriangle:9698,blackrectangle:9644,blackrightpointingpointer:9658,blackrightpointingtriangle:9654,blacksmallsquare:9642,blacksmilingface:9787,blacksquare:9632,blackstar:9733,blackupperlefttriangle:9700,blackupperrighttriangle:9701,blackuppointingsmalltriangle:9652,blackuppointingtriangle:9650,blank:9251,blinebelow:7687,block:9608,bmonospace:65346,bobaimaithai:3610,bohiragana:12412,bokatakana:12508,bparen:9373,bqsquare:13251,braceex:63732,braceleft:123,braceleftbt:63731,braceleftmid:63730,braceleftmonospace:65371,braceleftsmall:65115,bracelefttp:63729,braceleftvertical:65079,braceright:125,bracerightbt:63742,bracerightmid:63741,bracerightmonospace:65373,bracerightsmall:65116,bracerighttp:63740,bracerightvertical:65080,bracketleft:91,bracketleftbt:63728,bracketleftex:63727,bracketleftmonospace:65339,bracketlefttp:63726,bracketright:93,bracketrightbt:63739,bracketrightex:63738,bracketrightmonospace:65341,bracketrighttp:63737,breve:728,brevebelowcmb:814,brevecmb:774,breveinvertedbelowcmb:815,breveinvertedcmb:785,breveinverteddoublecmb:865,bridgebelowcmb:810,bridgeinvertedbelowcmb:826,brokenbar:166,bstroke:384,bsuperior:63210,btopbar:387,buhiragana:12406,bukatakana:12502,bullet:8226,bulletinverse:9688,bulletoperator:8729,bullseye:9678,c:99,caarmenian:1390,cabengali:2458,cacute:263,cadeva:2330,cagujarati:2714,cagurmukhi:2586,calsquare:13192,candrabindubengali:2433,candrabinducmb:784,candrabindudeva:2305,candrabindugujarati:2689,capslock:8682,careof:8453,caron:711,caronbelowcmb:812,caroncmb:780,carriagereturn:8629,cbopomofo:12568,ccaron:269,ccedilla:231,ccedillaacute:7689,ccircle:9426,ccircumflex:265,ccurl:597,cdot:267,cdotaccent:267,cdsquare:13253,cedilla:184,cedillacmb:807,cent:162,centigrade:8451,centinferior:63199,centmonospace:65504,centoldstyle:63394,centsuperior:63200,chaarmenian:1401,chabengali:2459,chadeva:2331,chagujarati:2715,chagurmukhi:2587,chbopomofo:12564,cheabkhasiancyrillic:1213,checkmark:10003,checyrillic:1095,chedescenderabkhasiancyrillic:1215,chedescendercyrillic:1207,chedieresiscyrillic:1269,cheharmenian:1395,chekhakassiancyrillic:1228,cheverticalstrokecyrillic:1209,chi:967,chieuchacirclekorean:12919,chieuchaparenkorean:12823,chieuchcirclekorean:12905,chieuchkorean:12618,chieuchparenkorean:12809,chochangthai:3594,chochanthai:3592,chochingthai:3593,chochoethai:3596,chook:392,cieucacirclekorean:12918,cieucaparenkorean:12822,cieuccirclekorean:12904,cieuckorean:12616,cieucparenkorean:12808,cieucuparenkorean:12828,circle:9675,circlecopyrt:169,circlemultiply:8855,circleot:8857,circleplus:8853,circlepostalmark:12342,circlewithlefthalfblack:9680,circlewithrighthalfblack:9681,circumflex:710,circumflexbelowcmb:813,circumflexcmb:770,clear:8999,clickalveolar:450,clickdental:448,clicklateral:449,clickretroflex:451,club:9827,clubsuitblack:9827,clubsuitwhite:9831,cmcubedsquare:13220,cmonospace:65347,cmsquaredsquare:13216,coarmenian:1409,colon:58,colonmonetary:8353,colonmonospace:65306,colonsign:8353,colonsmall:65109,colontriangularhalfmod:721,colontriangularmod:720,comma:44,commaabovecmb:787,commaaboverightcmb:789,commaaccent:63171,commaarabic:1548,commaarmenian:1373,commainferior:63201,commamonospace:65292,commareversedabovecmb:788,commareversedmod:701,commasmall:65104,commasuperior:63202,commaturnedabovecmb:786,commaturnedmod:699,compass:9788,congruent:8773,contourintegral:8750,control:8963,controlACK:6,controlBEL:7,controlBS:8,controlCAN:24,controlCR:13,controlDC1:17,controlDC2:18,controlDC3:19,controlDC4:20,controlDEL:127,controlDLE:16,controlEM:25,controlENQ:5,controlEOT:4,controlESC:27, +controlETB:23,controlETX:3,controlFF:12,controlFS:28,controlGS:29,controlHT:9,controlLF:10,controlNAK:21,controlRS:30,controlSI:15,controlSO:14,controlSOT:2,controlSTX:1,controlSUB:26,controlSYN:22,controlUS:31,controlVT:11,copyright:169,copyrightsans:63721,copyrightserif:63193,cornerbracketleft:12300,cornerbracketlefthalfwidth:65378,cornerbracketleftvertical:65089,cornerbracketright:12301,cornerbracketrighthalfwidth:65379,cornerbracketrightvertical:65090,corporationsquare:13183,cosquare:13255,coverkgsquare:13254,cparen:9374,cruzeiro:8354,cstretched:663,curlyand:8911,curlyor:8910,currency:164,cyrBreve:63185,cyrFlex:63186,cyrbreve:63188,cyrflex:63189,d:100,daarmenian:1380,dabengali:2470,dadarabic:1590,dadeva:2342,dadfinalarabic:65214,dadinitialarabic:65215,dadmedialarabic:65216,dagesh:1468,dageshhebrew:1468,dagger:8224,daggerdbl:8225,dagujarati:2726,dagurmukhi:2598,dahiragana:12384,dakatakana:12480,dalarabic:1583,dalet:1491,daletdagesh:64307,daletdageshhebrew:64307,dalethebrew:1491,dalfinalarabic:65194,dammaarabic:1615,dammalowarabic:1615,dammatanaltonearabic:1612,dammatanarabic:1612,danda:2404,dargahebrew:1447,dargalefthebrew:1447,dasiapneumatacyrilliccmb:1157,dblGrave:63187,dblanglebracketleft:12298,dblanglebracketleftvertical:65085,dblanglebracketright:12299,dblanglebracketrightvertical:65086,dblarchinvertedbelowcmb:811,dblarrowleft:8660,dblarrowright:8658,dbldanda:2405,dblgrave:63190,dblgravecmb:783,dblintegral:8748,dbllowline:8215,dbllowlinecmb:819,dbloverlinecmb:831,dblprimemod:698,dblverticalbar:8214,dblverticallineabovecmb:782,dbopomofo:12553,dbsquare:13256,dcaron:271,dcedilla:7697,dcircle:9427,dcircumflexbelow:7699,dcroat:273,ddabengali:2465,ddadeva:2337,ddagujarati:2721,ddagurmukhi:2593,ddalarabic:1672,ddalfinalarabic:64393,dddhadeva:2396,ddhabengali:2466,ddhadeva:2338,ddhagujarati:2722,ddhagurmukhi:2594,ddotaccent:7691,ddotbelow:7693,decimalseparatorarabic:1643,decimalseparatorpersian:1643,decyrillic:1076,degree:176,dehihebrew:1453,dehiragana:12391,deicoptic:1007,dekatakana:12487,deleteleft:9003,deleteright:8998,delta:948,deltaturned:397,denominatorminusonenumeratorbengali:2552,dezh:676,dhabengali:2471,dhadeva:2343,dhagujarati:2727,dhagurmukhi:2599,dhook:599,dialytikatonos:901,dialytikatonoscmb:836,diamond:9830,diamondsuitwhite:9826,dieresis:168,dieresisacute:63191,dieresisbelowcmb:804,dieresiscmb:776,dieresisgrave:63192,dieresistonos:901,dihiragana:12386,dikatakana:12482,dittomark:12291,divide:247,divides:8739,divisionslash:8725,djecyrillic:1106,dkshade:9619,dlinebelow:7695,dlsquare:13207,dmacron:273,dmonospace:65348,dnblock:9604,dochadathai:3598,dodekthai:3604,dohiragana:12393,dokatakana:12489,dollar:36,dollarinferior:63203,dollarmonospace:65284,dollaroldstyle:63268,dollarsmall:65129,dollarsuperior:63204,dong:8363,dorusquare:13094,dotaccent:729,dotaccentcmb:775,dotbelowcmb:803,dotbelowcomb:803,dotkatakana:12539,dotlessi:305,dotlessj:63166,dotlessjstrokehook:644,dotmath:8901,dottedcircle:9676,doubleyodpatah:64287,doubleyodpatahhebrew:64287,downtackbelowcmb:798,downtackmod:725,dparen:9375,dsuperior:63211,dtail:598,dtopbar:396,duhiragana:12389,dukatakana:12485,dz:499,dzaltone:675,dzcaron:454,dzcurl:677,dzeabkhasiancyrillic:1249,dzecyrillic:1109,dzhecyrillic:1119,e:101,eacute:233,earth:9793,ebengali:2447,ebopomofo:12572,ebreve:277,ecandradeva:2317,ecandragujarati:2701,ecandravowelsigndeva:2373,ecandravowelsigngujarati:2757,ecaron:283,ecedillabreve:7709,echarmenian:1381,echyiwnarmenian:1415,ecircle:9428,ecircumflex:234,ecircumflexacute:7871,ecircumflexbelow:7705,ecircumflexdotbelow:7879,ecircumflexgrave:7873,ecircumflexhookabove:7875,ecircumflextilde:7877,ecyrillic:1108,edblgrave:517,edeva:2319,edieresis:235,edot:279,edotaccent:279,edotbelow:7865,eegurmukhi:2575,eematragurmukhi:2631,efcyrillic:1092,egrave:232,egujarati:2703,eharmenian:1383,ehbopomofo:12573,ehiragana:12360,ehookabove:7867,eibopomofo:12575,eight:56,eightarabic:1640,eightbengali:2542,eightcircle:9319,eightcircleinversesansserif:10129,eightdeva:2414,eighteencircle:9329,eighteenparen:9349,eighteenperiod:9369,eightgujarati:2798,eightgurmukhi:2670,eighthackarabic:1640,eighthangzhou:12328,eighthnotebeamed:9835,eightideographicparen:12839,eightinferior:8328,eightmonospace:65304,eightoldstyle:63288,eightparen:9339,eightperiod:9359,eightpersian:1784,eightroman:8567,eightsuperior:8312,eightthai:3672,einvertedbreve:519,eiotifiedcyrillic:1125,ekatakana:12456,ekatakanahalfwidth:65396,ekonkargurmukhi:2676,ekorean:12628,elcyrillic:1083,element:8712,elevencircle:9322,elevenparen:9342,elevenperiod:9362,elevenroman:8570,ellipsis:8230,ellipsisvertical:8942,emacron:275,emacronacute:7703,emacrongrave:7701,emcyrillic:1084,emdash:8212,emdashvertical:65073,emonospace:65349,emphasismarkarmenian:1371,emptyset:8709,enbopomofo:12579,encyrillic:1085,endash:8211,endashvertical:65074,endescendercyrillic:1187,eng:331,engbopomofo:12581,enghecyrillic:1189,enhookcyrillic:1224,enspace:8194,eogonek:281,eokorean:12627,eopen:603,eopenclosed:666,eopenreversed:604,eopenreversedclosed:606,eopenreversedhook:605,eparen:9376,epsilon:949,epsilontonos:941,equal:61,equalmonospace:65309,equalsmall:65126,equalsuperior:8316,equivalence:8801,erbopomofo:12582,ercyrillic:1088,ereversed:600,ereversedcyrillic:1101,escyrillic:1089,esdescendercyrillic:1195,esh:643,eshcurl:646,eshortdeva:2318,eshortvowelsigndeva:2374,eshreversedloop:426,eshsquatreversed:645,esmallhiragana:12359,esmallkatakana:12455,esmallkatakanahalfwidth:65386,estimated:8494,esuperior:63212,eta:951,etarmenian:1384,etatonos:942,eth:240,etilde:7869,etildebelow:7707,etnahtafoukhhebrew:1425,etnahtafoukhlefthebrew:1425,etnahtahebrew:1425,etnahtalefthebrew:1425,eturned:477,eukorean:12641,euro:8364,evowelsignbengali:2503,evowelsigndeva:2375,evowelsigngujarati:2759,exclam:33,exclamarmenian:1372,exclamdbl:8252,exclamdown:161,exclamdownsmall:63393,exclammonospace:65281,exclamsmall:63265,existential:8707,ezh:658,ezhcaron:495,ezhcurl:659,ezhreversed:441,ezhtail:442,f:102,fadeva:2398,fagurmukhi:2654,fahrenheit:8457,fathaarabic:1614,fathalowarabic:1614,fathatanarabic:1611,fbopomofo:12552,fcircle:9429,fdotaccent:7711,feharabic:1601,feharmenian:1414,fehfinalarabic:65234,fehinitialarabic:65235,fehmedialarabic:65236,feicoptic:997,female:9792,ff:64256,ffi:64259,ffl:64260,fi:64257,fifteencircle:9326,fifteenparen:9346,fifteenperiod:9366,figuredash:8210,filledbox:9632,filledrect:9644,finalkaf:1498,finalkafdagesh:64314,finalkafdageshhebrew:64314,finalkafhebrew:1498,finalmem:1501,finalmemhebrew:1501,finalnun:1503,finalnunhebrew:1503,finalpe:1507,finalpehebrew:1507,finaltsadi:1509,finaltsadihebrew:1509,firsttonechinese:713,fisheye:9673,fitacyrillic:1139,five:53,fivearabic:1637,fivebengali:2539,fivecircle:9316,fivecircleinversesansserif:10126,fivedeva:2411,fiveeighths:8541,fivegujarati:2795,fivegurmukhi:2667,fivehackarabic:1637,fivehangzhou:12325,fiveideographicparen:12836,fiveinferior:8325,fivemonospace:65301,fiveoldstyle:63285,fiveparen:9336,fiveperiod:9356,fivepersian:1781,fiveroman:8564,fivesuperior:8309,fivethai:3669,fl:64258,florin:402,fmonospace:65350,fmsquare:13209,fofanthai:3615,fofathai:3613,fongmanthai:3663,forall:8704,four:52,fourarabic:1636,fourbengali:2538,fourcircle:9315,fourcircleinversesansserif:10125,fourdeva:2410,fourgujarati:2794,fourgurmukhi:2666,fourhackarabic:1636,fourhangzhou:12324,fourideographicparen:12835,fourinferior:8324,fourmonospace:65300,fournumeratorbengali:2551,fouroldstyle:63284,fourparen:9335,fourperiod:9355,fourpersian:1780,fourroman:8563,foursuperior:8308,fourteencircle:9325,fourteenparen:9345,fourteenperiod:9365,fourthai:3668,fourthtonechinese:715,fparen:9377,fraction:8260,franc:8355,g:103,gabengali:2455,gacute:501,gadeva:2327,gafarabic:1711,gaffinalarabic:64403,gafinitialarabic:64404,gafmedialarabic:64405,gagujarati:2711,gagurmukhi:2583,gahiragana:12364,gakatakana:12460,gamma:947,gammalatinsmall:611,gammasuperior:736,gangiacoptic:1003,gbopomofo:12557,gbreve:287,gcaron:487,gcedilla:291,gcircle:9430,gcircumflex:285,gcommaaccent:291,gdot:289,gdotaccent:289,gecyrillic:1075,gehiragana:12370,gekatakana:12466,geometricallyequal:8785,gereshaccenthebrew:1436,gereshhebrew:1523,gereshmuqdamhebrew:1437,germandbls:223,gershayimaccenthebrew:1438,gershayimhebrew:1524,getamark:12307,ghabengali:2456,ghadarmenian:1394,ghadeva:2328,ghagujarati:2712,ghagurmukhi:2584,ghainarabic:1594,ghainfinalarabic:65230,ghaininitialarabic:65231,ghainmedialarabic:65232,ghemiddlehookcyrillic:1173,ghestrokecyrillic:1171,gheupturncyrillic:1169,ghhadeva:2394,ghhagurmukhi:2650,ghook:608,ghzsquare:13203,gihiragana:12366,gikatakana:12462,gimarmenian:1379,gimel:1490,gimeldagesh:64306,gimeldageshhebrew:64306,gimelhebrew:1490,gjecyrillic:1107,glottalinvertedstroke:446,glottalstop:660,glottalstopinverted:662,glottalstopmod:704,glottalstopreversed:661,glottalstopreversedmod:705,glottalstopreversedsuperior:740,glottalstopstroke:673,glottalstopstrokereversed:674,gmacron:7713,gmonospace:65351,gohiragana:12372,gokatakana:12468,gparen:9378,gpasquare:13228,gradient:8711,grave:96,gravebelowcmb:790,gravecmb:768,gravecomb:768,gravedeva:2387,gravelowmod:718,gravemonospace:65344,gravetonecmb:832,greater:62,greaterequal:8805,greaterequalorless:8923,greatermonospace:65310,greaterorequivalent:8819,greaterorless:8823,greateroverequal:8807,greatersmall:65125,gscript:609,gstroke:485,guhiragana:12368,guillemotleft:171,guillemotright:187,guilsinglleft:8249,guilsinglright:8250,gukatakana:12464,guramusquare:13080,gysquare:13257,h:104,haabkhasiancyrillic:1193,haaltonearabic:1729,habengali:2489,hadescendercyrillic:1203,hadeva:2361,hagujarati:2745,hagurmukhi:2617,haharabic:1581,hahfinalarabic:65186,hahinitialarabic:65187,hahiragana:12399,hahmedialarabic:65188,haitusquare:13098,hakatakana:12495,hakatakanahalfwidth:65418,halantgurmukhi:2637,hamzaarabic:1569,hamzalowarabic:1569,hangulfiller:12644,hardsigncyrillic:1098,harpoonleftbarbup:8636,harpoonrightbarbup:8640,hasquare:13258,hatafpatah:1458,hatafpatah16:1458,hatafpatah23:1458,hatafpatah2f:1458,hatafpatahhebrew:1458,hatafpatahnarrowhebrew:1458,hatafpatahquarterhebrew:1458,hatafpatahwidehebrew:1458,hatafqamats:1459,hatafqamats1b:1459,hatafqamats28:1459,hatafqamats34:1459,hatafqamatshebrew:1459,hatafqamatsnarrowhebrew:1459,hatafqamatsquarterhebrew:1459,hatafqamatswidehebrew:1459,hatafsegol:1457,hatafsegol17:1457,hatafsegol24:1457,hatafsegol30:1457,hatafsegolhebrew:1457,hatafsegolnarrowhebrew:1457,hatafsegolquarterhebrew:1457,hatafsegolwidehebrew:1457,hbar:295,hbopomofo:12559,hbrevebelow:7723,hcedilla:7721,hcircle:9431,hcircumflex:293,hdieresis:7719,hdotaccent:7715,hdotbelow:7717,he:1492,heart:9829,heartsuitblack:9829,heartsuitwhite:9825,hedagesh:64308,hedageshhebrew:64308,hehaltonearabic:1729,heharabic:1607,hehebrew:1492,hehfinalaltonearabic:64423,hehfinalalttwoarabic:65258,hehfinalarabic:65258,hehhamzaabovefinalarabic:64421,hehhamzaaboveisolatedarabic:64420,hehinitialaltonearabic:64424,hehinitialarabic:65259,hehiragana:12408,hehmedialaltonearabic:64425,hehmedialarabic:65260,heiseierasquare:13179,hekatakana:12504,hekatakanahalfwidth:65421,hekutaarusquare:13110,henghook:615,herutusquare:13113,het:1495,hethebrew:1495,hhook:614,hhooksuperior:689,hieuhacirclekorean:12923,hieuhaparenkorean:12827,hieuhcirclekorean:12909,hieuhkorean:12622,hieuhparenkorean:12813,hihiragana:12402,hikatakana:12498,hikatakanahalfwidth:65419,hiriq:1460,hiriq14:1460,hiriq21:1460,hiriq2d:1460,hiriqhebrew:1460,hiriqnarrowhebrew:1460,hiriqquarterhebrew:1460,hiriqwidehebrew:1460,hlinebelow:7830,hmonospace:65352,hoarmenian:1392,hohipthai:3627,hohiragana:12411,hokatakana:12507,hokatakanahalfwidth:65422,holam:1465,holam19:1465,holam26:1465,holam32:1465,holamhebrew:1465,holamnarrowhebrew:1465,holamquarterhebrew:1465,holamwidehebrew:1465,honokhukthai:3630,hookabovecomb:777,hookcmb:777,hookpalatalizedbelowcmb:801,hookretroflexbelowcmb:802,hoonsquare:13122,horicoptic:1001,horizontalbar:8213,horncmb:795,hotsprings:9832,house:8962,hparen:9379,hsuperior:688,hturned:613,huhiragana:12405,huiitosquare:13107,hukatakana:12501,hukatakanahalfwidth:65420,hungarumlaut:733,hungarumlautcmb:779,hv:405,hyphen:45,hypheninferior:63205,hyphenmonospace:65293,hyphensmall:65123,hyphensuperior:63206,hyphentwo:8208,i:105,iacute:237,iacyrillic:1103,ibengali:2439,ibopomofo:12583,ibreve:301,icaron:464,icircle:9432,icircumflex:238,icyrillic:1110,idblgrave:521,ideographearthcircle:12943,ideographfirecircle:12939,ideographicallianceparen:12863,ideographiccallparen:12858,ideographiccentrecircle:12965,ideographicclose:12294,ideographiccomma:12289,ideographiccommaleft:65380,ideographiccongratulationparen:12855,ideographiccorrectcircle:12963,ideographicearthparen:12847,ideographicenterpriseparen:12861,ideographicexcellentcircle:12957,ideographicfestivalparen:12864,ideographicfinancialcircle:12950,ideographicfinancialparen:12854,ideographicfireparen:12843,ideographichaveparen:12850,ideographichighcircle:12964,ideographiciterationmark:12293,ideographiclaborcircle:12952,ideographiclaborparen:12856,ideographicleftcircle:12967,ideographiclowcircle:12966,ideographicmedicinecircle:12969,ideographicmetalparen:12846,ideographicmoonparen:12842,ideographicnameparen:12852,ideographicperiod:12290,ideographicprintcircle:12958,ideographicreachparen:12867,ideographicrepresentparen:12857,ideographicresourceparen:12862,ideographicrightcircle:12968,ideographicsecretcircle:12953,ideographicselfparen:12866,ideographicsocietyparen:12851,ideographicspace:12288,ideographicspecialparen:12853,ideographicstockparen:12849,ideographicstudyparen:12859,ideographicsunparen:12848,ideographicsuperviseparen:12860,ideographicwaterparen:12844,ideographicwoodparen:12845,ideographiczero:12295,ideographmetalcircle:12942,ideographmooncircle:12938,ideographnamecircle:12948,ideographsuncircle:12944,ideographwatercircle:12940,ideographwoodcircle:12941,ideva:2311,idieresis:239,idieresisacute:7727,idieresiscyrillic:1253,idotbelow:7883,iebrevecyrillic:1239,iecyrillic:1077,ieungacirclekorean:12917,ieungaparenkorean:12821,ieungcirclekorean:12903,ieungkorean:12615,ieungparenkorean:12807,igrave:236,igujarati:2695,igurmukhi:2567,ihiragana:12356,ihookabove:7881,iibengali:2440,iicyrillic:1080,iideva:2312,iigujarati:2696,iigurmukhi:2568,iimatragurmukhi:2624,iinvertedbreve:523,iishortcyrillic:1081,iivowelsignbengali:2496,iivowelsigndeva:2368,iivowelsigngujarati:2752,ij:307,ikatakana:12452,ikatakanahalfwidth:65394,ikorean:12643,ilde:732,iluyhebrew:1452,imacron:299,imacroncyrillic:1251,imageorapproximatelyequal:8787,imatragurmukhi:2623,imonospace:65353,increment:8710,infinity:8734,iniarmenian:1387,integral:8747,integralbottom:8993,integralbt:8993,integralex:63733,integraltop:8992,integraltp:8992,intersection:8745,intisquare:13061,invbullet:9688,invcircle:9689,invsmileface:9787,iocyrillic:1105,iogonek:303,iota:953,iotadieresis:970,iotadieresistonos:912,iotalatin:617,iotatonos:943,iparen:9380,irigurmukhi:2674,ismallhiragana:12355,ismallkatakana:12451,ismallkatakanahalfwidth:65384,issharbengali:2554,istroke:616,isuperior:63213,iterationhiragana:12445,iterationkatakana:12541,itilde:297,itildebelow:7725,iubopomofo:12585,iucyrillic:1102,ivowelsignbengali:2495,ivowelsigndeva:2367,ivowelsigngujarati:2751,izhitsacyrillic:1141,izhitsadblgravecyrillic:1143,j:106,jaarmenian:1393,jabengali:2460,jadeva:2332,jagujarati:2716,jagurmukhi:2588,jbopomofo:12560,jcaron:496,jcircle:9433,jcircumflex:309,jcrossedtail:669,jdotlessstroke:607,jecyrillic:1112,jeemarabic:1580,jeemfinalarabic:65182,jeeminitialarabic:65183,jeemmedialarabic:65184,jeharabic:1688,jehfinalarabic:64395,jhabengali:2461,jhadeva:2333,jhagujarati:2717,jhagurmukhi:2589,jheharmenian:1403,jis:12292,jmonospace:65354,jparen:9381,jsuperior:690,k:107,kabashkircyrillic:1185,kabengali:2453,kacute:7729,kacyrillic:1082,kadescendercyrillic:1179,kadeva:2325,kaf:1499,kafarabic:1603,kafdagesh:64315,kafdageshhebrew:64315,kaffinalarabic:65242,kafhebrew:1499,kafinitialarabic:65243,kafmedialarabic:65244,kafrafehebrew:64333,kagujarati:2709,kagurmukhi:2581,kahiragana:12363,kahookcyrillic:1220,kakatakana:12459,kakatakanahalfwidth:65398,kappa:954,kappasymbolgreek:1008,kapyeounmieumkorean:12657,kapyeounphieuphkorean:12676,kapyeounpieupkorean:12664,kapyeounssangpieupkorean:12665,karoriisquare:13069,kashidaautoarabic:1600,kashidaautonosidebearingarabic:1600,kasmallkatakana:12533,kasquare:13188,kasraarabic:1616,kasratanarabic:1613,kastrokecyrillic:1183,katahiraprolongmarkhalfwidth:65392,kaverticalstrokecyrillic:1181,kbopomofo:12558,kcalsquare:13193,kcaron:489,kcedilla:311,kcircle:9434,kcommaaccent:311,kdotbelow:7731,keharmenian:1412,kehiragana:12369,kekatakana:12465,kekatakanahalfwidth:65401,kenarmenian:1391,kesmallkatakana:12534,kgreenlandic:312,khabengali:2454,khacyrillic:1093,khadeva:2326,khagujarati:2710,khagurmukhi:2582,khaharabic:1582,khahfinalarabic:65190,khahinitialarabic:65191,khahmedialarabic:65192,kheicoptic:999,khhadeva:2393,khhagurmukhi:2649,khieukhacirclekorean:12920,khieukhaparenkorean:12824,khieukhcirclekorean:12906,khieukhkorean:12619,khieukhparenkorean:12810,khokhaithai:3586,khokhonthai:3589,khokhuatthai:3587,khokhwaithai:3588,khomutthai:3675,khook:409,khorakhangthai:3590,khzsquare:13201,kihiragana:12365,kikatakana:12461,kikatakanahalfwidth:65399,kiroguramusquare:13077,kiromeetorusquare:13078,kirosquare:13076,kiyeokacirclekorean:12910,kiyeokaparenkorean:12814,kiyeokcirclekorean:12896,kiyeokkorean:12593,kiyeokparenkorean:12800,kiyeoksioskorean:12595,kjecyrillic:1116,klinebelow:7733,klsquare:13208,kmcubedsquare:13222,kmonospace:65355,kmsquaredsquare:13218,kohiragana:12371,kohmsquare:13248,kokaithai:3585,kokatakana:12467,kokatakanahalfwidth:65402,kooposquare:13086,koppacyrillic:1153,koreanstandardsymbol:12927,koroniscmb:835,kparen:9382,kpasquare:13226,ksicyrillic:1135,ktsquare:13263,kturned:670,kuhiragana:12367,kukatakana:12463,kukatakanahalfwidth:65400,kvsquare:13240,kwsquare:13246,l:108,labengali:2482,lacute:314,ladeva:2354,lagujarati:2738,lagurmukhi:2610,lakkhangyaothai:3653,lamaleffinalarabic:65276,lamalefhamzaabovefinalarabic:65272,lamalefhamzaaboveisolatedarabic:65271,lamalefhamzabelowfinalarabic:65274,lamalefhamzabelowisolatedarabic:65273,lamalefisolatedarabic:65275,lamalefmaddaabovefinalarabic:65270,lamalefmaddaaboveisolatedarabic:65269,lamarabic:1604,lambda:955,lambdastroke:411,lamed:1500,lameddagesh:64316,lameddageshhebrew:64316,lamedhebrew:1500,lamfinalarabic:65246,lamhahinitialarabic:64714,laminitialarabic:65247,lamjeeminitialarabic:64713,lamkhahinitialarabic:64715,lamlamhehisolatedarabic:65010,lammedialarabic:65248,lammeemhahinitialarabic:64904,lammeeminitialarabic:64716,largecircle:9711,lbar:410,lbelt:620,lbopomofo:12556,lcaron:318,lcedilla:316,lcircle:9435,lcircumflexbelow:7741,lcommaaccent:316,ldot:320,ldotaccent:320,ldotbelow:7735,ldotbelowmacron:7737,leftangleabovecmb:794,lefttackbelowcmb:792,less:60,lessequal:8804,lessequalorgreater:8922,lessmonospace:65308,lessorequivalent:8818,lessorgreater:8822,lessoverequal:8806,lesssmall:65124,lezh:622,lfblock:9612,lhookretroflex:621,lira:8356,liwnarmenian:1388,lj:457,ljecyrillic:1113,ll:63168,lladeva:2355,llagujarati:2739,llinebelow:7739,llladeva:2356,llvocalicbengali:2529,llvocalicdeva:2401,llvocalicvowelsignbengali:2531,llvocalicvowelsigndeva:2403,lmiddletilde:619,lmonospace:65356,lmsquare:13264,lochulathai:3628,logicaland:8743,logicalnot:172,logicalnotreversed:8976,logicalor:8744,lolingthai:3621,longs:383,lowlinecenterline:65102,lowlinecmb:818,lowlinedashed:65101,lozenge:9674,lparen:9383,lslash:322,lsquare:8467,lsuperior:63214,ltshade:9617,luthai:3622,lvocalicbengali:2444,lvocalicdeva:2316,lvocalicvowelsignbengali:2530,lvocalicvowelsigndeva:2402,lxsquare:13267,m:109,mabengali:2478,macron:175,macronbelowcmb:817,macroncmb:772,macronlowmod:717,macronmonospace:65507,macute:7743,madeva:2350,magujarati:2734,magurmukhi:2606,mahapakhhebrew:1444,mahapakhlefthebrew:1444,mahiragana:12414,maichattawalowleftthai:63637,maichattawalowrightthai:63636,maichattawathai:3659,maichattawaupperleftthai:63635,maieklowleftthai:63628,maieklowrightthai:63627,maiekthai:3656,maiekupperleftthai:63626,maihanakatleftthai:63620,maihanakatthai:3633,maitaikhuleftthai:63625,maitaikhuthai:3655,maitholowleftthai:63631,maitholowrightthai:63630,maithothai:3657,maithoupperleftthai:63629,maitrilowleftthai:63634,maitrilowrightthai:63633,maitrithai:3658,maitriupperleftthai:63632,maiyamokthai:3654,makatakana:12510,makatakanahalfwidth:65423,male:9794,mansyonsquare:13127,maqafhebrew:1470,mars:9794,masoracirclehebrew:1455,masquare:13187,mbopomofo:12551,mbsquare:13268,mcircle:9436,mcubedsquare:13221,mdotaccent:7745,mdotbelow:7747,meemarabic:1605,meemfinalarabic:65250,meeminitialarabic:65251,meemmedialarabic:65252,meemmeeminitialarabic:64721,meemmeemisolatedarabic:64584,meetorusquare:13133,mehiragana:12417,meizierasquare:13182,mekatakana:12513,mekatakanahalfwidth:65426,mem:1502,memdagesh:64318,memdageshhebrew:64318,memhebrew:1502,menarmenian:1396,merkhahebrew:1445,merkhakefulahebrew:1446,merkhakefulalefthebrew:1446,merkhalefthebrew:1445,mhook:625,mhzsquare:13202,middledotkatakanahalfwidth:65381,middot:183,mieumacirclekorean:12914,mieumaparenkorean:12818,mieumcirclekorean:12900,mieumkorean:12609,mieumpansioskorean:12656,mieumparenkorean:12804,mieumpieupkorean:12654,mieumsioskorean:12655,mihiragana:12415,mikatakana:12511,mikatakanahalfwidth:65424,minus:8722,minusbelowcmb:800,minuscircle:8854,minusmod:727,minusplus:8723,minute:8242,miribaarusquare:13130,mirisquare:13129,mlonglegturned:624,mlsquare:13206,mmcubedsquare:13219,mmonospace:65357,mmsquaredsquare:13215,mohiragana:12418,mohmsquare:13249,mokatakana:12514,mokatakanahalfwidth:65427,molsquare:13270,momathai:3617,moverssquare:13223,moverssquaredsquare:13224,mparen:9384,mpasquare:13227,mssquare:13235,msuperior:63215,mturned:623,mu:181,mu1:181,muasquare:13186,muchgreater:8811,muchless:8810,mufsquare:13196,mugreek:956,mugsquare:13197,muhiragana:12416,mukatakana:12512,mukatakanahalfwidth:65425,mulsquare:13205,multiply:215,mumsquare:13211,munahhebrew:1443,munahlefthebrew:1443,musicalnote:9834,musicalnotedbl:9835,musicflatsign:9837,musicsharpsign:9839,mussquare:13234,muvsquare:13238,muwsquare:13244,mvmegasquare:13241,mvsquare:13239,mwmegasquare:13247,mwsquare:13245,n:110,nabengali:2472,nabla:8711,nacute:324,nadeva:2344,nagujarati:2728,nagurmukhi:2600,nahiragana:12394,nakatakana:12490,nakatakanahalfwidth:65413,napostrophe:329,nasquare:13185,nbopomofo:12555,nbspace:160,ncaron:328,ncedilla:326,ncircle:9437,ncircumflexbelow:7755,ncommaaccent:326,ndotaccent:7749,ndotbelow:7751,nehiragana:12397,nekatakana:12493,nekatakanahalfwidth:65416,newsheqelsign:8362,nfsquare:13195,ngabengali:2457,ngadeva:2329,ngagujarati:2713,ngagurmukhi:2585,ngonguthai:3591,nhiragana:12435,nhookleft:626,nhookretroflex:627,nieunacirclekorean:12911,nieunaparenkorean:12815,nieuncieuckorean:12597,nieuncirclekorean:12897,nieunhieuhkorean:12598,nieunkorean:12596,nieunpansioskorean:12648,nieunparenkorean:12801,nieunsioskorean:12647,nieuntikeutkorean:12646,nihiragana:12395,nikatakana:12491,nikatakanahalfwidth:65414,nikhahitleftthai:63641,nikhahitthai:3661,nine:57,ninearabic:1641,ninebengali:2543,ninecircle:9320,ninecircleinversesansserif:10130,ninedeva:2415,ninegujarati:2799,ninegurmukhi:2671,ninehackarabic:1641,ninehangzhou:12329,nineideographicparen:12840,nineinferior:8329,ninemonospace:65305,nineoldstyle:63289,nineparen:9340,nineperiod:9360,ninepersian:1785,nineroman:8568,ninesuperior:8313,nineteencircle:9330,nineteenparen:9350,nineteenperiod:9370,ninethai:3673,nj:460,njecyrillic:1114,nkatakana:12531,nkatakanahalfwidth:65437,nlegrightlong:414,nlinebelow:7753,nmonospace:65358,nmsquare:13210,nnabengali:2467,nnadeva:2339,nnagujarati:2723,nnagurmukhi:2595,nnnadeva:2345,nohiragana:12398,nokatakana:12494,nokatakanahalfwidth:65417,nonbreakingspace:160,nonenthai:3603,nonuthai:3609,noonarabic:1606,noonfinalarabic:65254,noonghunnaarabic:1722,noonghunnafinalarabic:64415,nooninitialarabic:65255,noonjeeminitialarabic:64722,noonjeemisolatedarabic:64587,noonmedialarabic:65256,noonmeeminitialarabic:64725,noonmeemisolatedarabic:64590,noonnoonfinalarabic:64653,notcontains:8716,notelement:8713,notelementof:8713,notequal:8800,notgreater:8815,notgreaternorequal:8817,notgreaternorless:8825,notidentical:8802,notless:8814,notlessnorequal:8816,notparallel:8742,notprecedes:8832,notsubset:8836,notsucceeds:8833,notsuperset:8837,nowarmenian:1398,nparen:9385,nssquare:13233,nsuperior:8319,ntilde:241,nu:957,nuhiragana:12396,nukatakana:12492,nukatakanahalfwidth:65415,nuktabengali:2492,nuktadeva:2364,nuktagujarati:2748,nuktagurmukhi:2620,numbersign:35,numbersignmonospace:65283,numbersignsmall:65119,numeralsigngreek:884,numeralsignlowergreek:885,numero:8470,nun:1504,nundagesh:64320,nundageshhebrew:64320,nunhebrew:1504,nvsquare:13237,nwsquare:13243,nyabengali:2462,nyadeva:2334,nyagujarati:2718,nyagurmukhi:2590,o:111,oacute:243,oangthai:3629,obarred:629,obarredcyrillic:1257,obarreddieresiscyrillic:1259,obengali:2451,obopomofo:12571,obreve:335,ocandradeva:2321,ocandragujarati:2705,ocandravowelsigndeva:2377,ocandravowelsigngujarati:2761,ocaron:466,ocircle:9438,ocircumflex:244,ocircumflexacute:7889,ocircumflexdotbelow:7897,ocircumflexgrave:7891,ocircumflexhookabove:7893,ocircumflextilde:7895,ocyrillic:1086,odblacute:337,odblgrave:525,odeva:2323,odieresis:246,odieresiscyrillic:1255,odotbelow:7885,oe:339,oekorean:12634,ogonek:731,ogonekcmb:808,ograve:242,ogujarati:2707,oharmenian:1413,ohiragana:12362,ohookabove:7887,ohorn:417,ohornacute:7899,ohorndotbelow:7907,ohorngrave:7901,ohornhookabove:7903,ohorntilde:7905,ohungarumlaut:337,oi:419,oinvertedbreve:527,okatakana:12458,okatakanahalfwidth:65397,okorean:12631,olehebrew:1451,omacron:333,omacronacute:7763,omacrongrave:7761,omdeva:2384,omega:969,omega1:982,omegacyrillic:1121,omegalatinclosed:631,omegaroundcyrillic:1147,omegatitlocyrillic:1149,omegatonos:974,omgujarati:2768,omicron:959,omicrontonos:972,omonospace:65359,one:49,onearabic:1633,onebengali:2535,onecircle:9312,onecircleinversesansserif:10122,onedeva:2407,onedotenleader:8228,oneeighth:8539,onefitted:63196,onegujarati:2791,onegurmukhi:2663,onehackarabic:1633,onehalf:189,onehangzhou:12321,oneideographicparen:12832,oneinferior:8321,onemonospace:65297,onenumeratorbengali:2548,oneoldstyle:63281,oneparen:9332,oneperiod:9352,onepersian:1777,onequarter:188,oneroman:8560,onesuperior:185,onethai:3665,onethird:8531,oogonek:491,oogonekmacron:493,oogurmukhi:2579,oomatragurmukhi:2635,oopen:596,oparen:9386,openbullet:9702,option:8997,ordfeminine:170,ordmasculine:186,orthogonal:8735,oshortdeva:2322,oshortvowelsigndeva:2378,oslash:248,oslashacute:511,osmallhiragana:12361,osmallkatakana:12457,osmallkatakanahalfwidth:65387,ostrokeacute:511,osuperior:63216,otcyrillic:1151,otilde:245,otildeacute:7757,otildedieresis:7759,oubopomofo:12577,overline:8254,overlinecenterline:65098,overlinecmb:773,overlinedashed:65097,overlinedblwavy:65100,overlinewavy:65099,overscore:175,ovowelsignbengali:2507,ovowelsigndeva:2379,ovowelsigngujarati:2763,p:112,paampssquare:13184,paasentosquare:13099,pabengali:2474,pacute:7765,padeva:2346,pagedown:8671,pageup:8670,pagujarati:2730,pagurmukhi:2602,pahiragana:12401,paiyannoithai:3631,pakatakana:12497,palatalizationcyrilliccmb:1156,palochkacyrillic:1216,pansioskorean:12671,paragraph:182,parallel:8741,parenleft:40,parenleftaltonearabic:64830,parenleftbt:63725,parenleftex:63724,parenleftinferior:8333,parenleftmonospace:65288,parenleftsmall:65113,parenleftsuperior:8317,parenlefttp:63723,parenleftvertical:65077,parenright:41,parenrightaltonearabic:64831,parenrightbt:63736,parenrightex:63735,parenrightinferior:8334,parenrightmonospace:65289,parenrightsmall:65114,parenrightsuperior:8318,parenrighttp:63734,parenrightvertical:65078,partialdiff:8706,paseqhebrew:1472,pashtahebrew:1433,pasquare:13225,patah:1463,patah11:1463,patah1d:1463,patah2a:1463,patahhebrew:1463,patahnarrowhebrew:1463,patahquarterhebrew:1463,patahwidehebrew:1463,pazerhebrew:1441,pbopomofo:12550,pcircle:9439,pdotaccent:7767,pe:1508,pecyrillic:1087,pedagesh:64324,pedageshhebrew:64324,peezisquare:13115,pefinaldageshhebrew:64323,peharabic:1662,peharmenian:1402,pehebrew:1508,pehfinalarabic:64343,pehinitialarabic:64344,pehiragana:12410,pehmedialarabic:64345,pekatakana:12506,pemiddlehookcyrillic:1191,perafehebrew:64334,percent:37,percentarabic:1642,percentmonospace:65285,percentsmall:65130,period:46,periodarmenian:1417,periodcentered:183,periodhalfwidth:65377,periodinferior:63207,periodmonospace:65294,periodsmall:65106,periodsuperior:63208,perispomenigreekcmb:834,perpendicular:8869,perthousand:8240,peseta:8359,pfsquare:13194,phabengali:2475,phadeva:2347,phagujarati:2731,phagurmukhi:2603,phi:966,phi1:981,phieuphacirclekorean:12922,phieuphaparenkorean:12826,phieuphcirclekorean:12908,phieuphkorean:12621,phieuphparenkorean:12812,philatin:632,phinthuthai:3642,phisymbolgreek:981,phook:421,phophanthai:3614,phophungthai:3612,phosamphaothai:3616,pi:960,pieupacirclekorean:12915,pieupaparenkorean:12819,pieupcieuckorean:12662,pieupcirclekorean:12901,pieupkiyeokkorean:12658,pieupkorean:12610,pieupparenkorean:12805,pieupsioskiyeokkorean:12660,pieupsioskorean:12612,pieupsiostikeutkorean:12661,pieupthieuthkorean:12663,pieuptikeutkorean:12659,pihiragana:12404,pikatakana:12500,pisymbolgreek:982,piwrarmenian:1411,plus:43,plusbelowcmb:799,pluscircle:8853,plusminus:177,plusmod:726,plusmonospace:65291,plussmall:65122,plussuperior:8314,pmonospace:65360,pmsquare:13272,pohiragana:12413,pointingindexdownwhite:9759,pointingindexleftwhite:9756,pointingindexrightwhite:9758,pointingindexupwhite:9757,pokatakana:12509,poplathai:3611,postalmark:12306,postalmarkface:12320,pparen:9387,precedes:8826,prescription:8478,primemod:697,primereversed:8245,product:8719,projective:8965,prolongedkana:12540,propellor:8984,propersubset:8834,propersuperset:8835,proportion:8759,proportional:8733,psi:968,psicyrillic:1137,psilipneumatacyrilliccmb:1158,pssquare:13232,puhiragana:12407,pukatakana:12503,pvsquare:13236,pwsquare:13242,q:113,qadeva:2392,qadmahebrew:1448,qafarabic:1602,qaffinalarabic:65238,qafinitialarabic:65239,qafmedialarabic:65240,qamats:1464,qamats10:1464,qamats1a:1464,qamats1c:1464,qamats27:1464,qamats29:1464,qamats33:1464,qamatsde:1464,qamatshebrew:1464,qamatsnarrowhebrew:1464,qamatsqatanhebrew:1464,qamatsqatannarrowhebrew:1464,qamatsqatanquarterhebrew:1464,qamatsqatanwidehebrew:1464,qamatsquarterhebrew:1464,qamatswidehebrew:1464,qarneyparahebrew:1439,qbopomofo:12561,qcircle:9440,qhook:672,qmonospace:65361,qof:1511,qofdagesh:64327,qofdageshhebrew:64327,qofhebrew:1511,qparen:9388,quarternote:9833,qubuts:1467,qubuts18:1467,qubuts25:1467,qubuts31:1467,qubutshebrew:1467,qubutsnarrowhebrew:1467,qubutsquarterhebrew:1467,qubutswidehebrew:1467,question:63,questionarabic:1567,questionarmenian:1374,questiondown:191,questiondownsmall:63423,questiongreek:894,questionmonospace:65311,questionsmall:63295,quotedbl:34,quotedblbase:8222,quotedblleft:8220,quotedblmonospace:65282,quotedblprime:12318,quotedblprimereversed:12317,quotedblright:8221,quoteleft:8216,quoteleftreversed:8219,quotereversed:8219,quoteright:8217,quoterightn:329,quotesinglbase:8218,quotesingle:39,quotesinglemonospace:65287,r:114,raarmenian:1404,rabengali:2480,racute:341,radeva:2352,radical:8730,radicalex:63717,radoverssquare:13230,radoverssquaredsquare:13231,radsquare:13229,rafe:1471,rafehebrew:1471,ragujarati:2736,ragurmukhi:2608,rahiragana:12425,rakatakana:12521,rakatakanahalfwidth:65431,ralowerdiagonalbengali:2545,ramiddlediagonalbengali:2544,ramshorn:612,ratio:8758,rbopomofo:12566,rcaron:345,rcedilla:343,rcircle:9441,rcommaaccent:343,rdblgrave:529,rdotaccent:7769,rdotbelow:7771,rdotbelowmacron:7773,referencemark:8251,reflexsubset:8838,reflexsuperset:8839,registered:174,registersans:63720,registerserif:63194,reharabic:1585,reharmenian:1408,rehfinalarabic:65198,rehiragana:12428,rekatakana:12524,rekatakanahalfwidth:65434,resh:1512,reshdageshhebrew:64328,reshhebrew:1512,reversedtilde:8765,reviahebrew:1431,reviamugrashhebrew:1431,revlogicalnot:8976,rfishhook:638,rfishhookreversed:639,rhabengali:2525,rhadeva:2397,rho:961,rhook:637,rhookturned:635,rhookturnedsuperior:693, +rhosymbolgreek:1009,rhotichookmod:734,rieulacirclekorean:12913,rieulaparenkorean:12817,rieulcirclekorean:12899,rieulhieuhkorean:12608,rieulkiyeokkorean:12602,rieulkiyeoksioskorean:12649,rieulkorean:12601,rieulmieumkorean:12603,rieulpansioskorean:12652,rieulparenkorean:12803,rieulphieuphkorean:12607,rieulpieupkorean:12604,rieulpieupsioskorean:12651,rieulsioskorean:12605,rieulthieuthkorean:12606,rieultikeutkorean:12650,rieulyeorinhieuhkorean:12653,rightangle:8735,righttackbelowcmb:793,righttriangle:8895,rihiragana:12426,rikatakana:12522,rikatakanahalfwidth:65432,ring:730,ringbelowcmb:805,ringcmb:778,ringhalfleft:703,ringhalfleftarmenian:1369,ringhalfleftbelowcmb:796,ringhalfleftcentered:723,ringhalfright:702,ringhalfrightbelowcmb:825,ringhalfrightcentered:722,rinvertedbreve:531,rittorusquare:13137,rlinebelow:7775,rlongleg:636,rlonglegturned:634,rmonospace:65362,rohiragana:12429,rokatakana:12525,rokatakanahalfwidth:65435,roruathai:3619,rparen:9389,rrabengali:2524,rradeva:2353,rragurmukhi:2652,rreharabic:1681,rrehfinalarabic:64397,rrvocalicbengali:2528,rrvocalicdeva:2400,rrvocalicgujarati:2784,rrvocalicvowelsignbengali:2500,rrvocalicvowelsigndeva:2372,rrvocalicvowelsigngujarati:2756,rsuperior:63217,rtblock:9616,rturned:633,rturnedsuperior:692,ruhiragana:12427,rukatakana:12523,rukatakanahalfwidth:65433,rupeemarkbengali:2546,rupeesignbengali:2547,rupiah:63197,ruthai:3620,rvocalicbengali:2443,rvocalicdeva:2315,rvocalicgujarati:2699,rvocalicvowelsignbengali:2499,rvocalicvowelsigndeva:2371,rvocalicvowelsigngujarati:2755,s:115,sabengali:2488,sacute:347,sacutedotaccent:7781,sadarabic:1589,sadeva:2360,sadfinalarabic:65210,sadinitialarabic:65211,sadmedialarabic:65212,sagujarati:2744,sagurmukhi:2616,sahiragana:12373,sakatakana:12469,sakatakanahalfwidth:65403,sallallahoualayhewasallamarabic:65018,samekh:1505,samekhdagesh:64321,samekhdageshhebrew:64321,samekhhebrew:1505,saraaathai:3634,saraaethai:3649,saraaimaimalaithai:3652,saraaimaimuanthai:3651,saraamthai:3635,saraathai:3632,saraethai:3648,saraiileftthai:63622,saraiithai:3637,saraileftthai:63621,saraithai:3636,saraothai:3650,saraueeleftthai:63624,saraueethai:3639,saraueleftthai:63623,sarauethai:3638,sarauthai:3640,sarauuthai:3641,sbopomofo:12569,scaron:353,scarondotaccent:7783,scedilla:351,schwa:601,schwacyrillic:1241,schwadieresiscyrillic:1243,schwahook:602,scircle:9442,scircumflex:349,scommaaccent:537,sdotaccent:7777,sdotbelow:7779,sdotbelowdotaccent:7785,seagullbelowcmb:828,second:8243,secondtonechinese:714,section:167,seenarabic:1587,seenfinalarabic:65202,seeninitialarabic:65203,seenmedialarabic:65204,segol:1462,segol13:1462,segol1f:1462,segol2c:1462,segolhebrew:1462,segolnarrowhebrew:1462,segolquarterhebrew:1462,segoltahebrew:1426,segolwidehebrew:1462,seharmenian:1405,sehiragana:12379,sekatakana:12475,sekatakanahalfwidth:65406,semicolon:59,semicolonarabic:1563,semicolonmonospace:65307,semicolonsmall:65108,semivoicedmarkkana:12444,semivoicedmarkkanahalfwidth:65439,sentisquare:13090,sentosquare:13091,seven:55,sevenarabic:1639,sevenbengali:2541,sevencircle:9318,sevencircleinversesansserif:10128,sevendeva:2413,seveneighths:8542,sevengujarati:2797,sevengurmukhi:2669,sevenhackarabic:1639,sevenhangzhou:12327,sevenideographicparen:12838,seveninferior:8327,sevenmonospace:65303,sevenoldstyle:63287,sevenparen:9338,sevenperiod:9358,sevenpersian:1783,sevenroman:8566,sevensuperior:8311,seventeencircle:9328,seventeenparen:9348,seventeenperiod:9368,seventhai:3671,sfthyphen:173,shaarmenian:1399,shabengali:2486,shacyrillic:1096,shaddaarabic:1617,shaddadammaarabic:64609,shaddadammatanarabic:64606,shaddafathaarabic:64608,shaddakasraarabic:64610,shaddakasratanarabic:64607,shade:9618,shadedark:9619,shadelight:9617,shademedium:9618,shadeva:2358,shagujarati:2742,shagurmukhi:2614,shalshelethebrew:1427,shbopomofo:12565,shchacyrillic:1097,sheenarabic:1588,sheenfinalarabic:65206,sheeninitialarabic:65207,sheenmedialarabic:65208,sheicoptic:995,sheqel:8362,sheqelhebrew:8362,sheva:1456,sheva115:1456,sheva15:1456,sheva22:1456,sheva2e:1456,shevahebrew:1456,shevanarrowhebrew:1456,shevaquarterhebrew:1456,shevawidehebrew:1456,shhacyrillic:1211,shimacoptic:1005,shin:1513,shindagesh:64329,shindageshhebrew:64329,shindageshshindot:64300,shindageshshindothebrew:64300,shindageshsindot:64301,shindageshsindothebrew:64301,shindothebrew:1473,shinhebrew:1513,shinshindot:64298,shinshindothebrew:64298,shinsindot:64299,shinsindothebrew:64299,shook:642,sigma:963,sigma1:962,sigmafinal:962,sigmalunatesymbolgreek:1010,sihiragana:12375,sikatakana:12471,sikatakanahalfwidth:65404,siluqhebrew:1469,siluqlefthebrew:1469,similar:8764,sindothebrew:1474,siosacirclekorean:12916,siosaparenkorean:12820,sioscieuckorean:12670,sioscirclekorean:12902,sioskiyeokkorean:12666,sioskorean:12613,siosnieunkorean:12667,siosparenkorean:12806,siospieupkorean:12669,siostikeutkorean:12668,six:54,sixarabic:1638,sixbengali:2540,sixcircle:9317,sixcircleinversesansserif:10127,sixdeva:2412,sixgujarati:2796,sixgurmukhi:2668,sixhackarabic:1638,sixhangzhou:12326,sixideographicparen:12837,sixinferior:8326,sixmonospace:65302,sixoldstyle:63286,sixparen:9337,sixperiod:9357,sixpersian:1782,sixroman:8565,sixsuperior:8310,sixteencircle:9327,sixteencurrencydenominatorbengali:2553,sixteenparen:9347,sixteenperiod:9367,sixthai:3670,slash:47,slashmonospace:65295,slong:383,slongdotaccent:7835,smileface:9786,smonospace:65363,sofpasuqhebrew:1475,softhyphen:173,softsigncyrillic:1100,sohiragana:12381,sokatakana:12477,sokatakanahalfwidth:65407,soliduslongoverlaycmb:824,solidusshortoverlaycmb:823,sorusithai:3625,sosalathai:3624,sosothai:3595,sosuathai:3626,space:32,spacehackarabic:32,spade:9824,spadesuitblack:9824,spadesuitwhite:9828,sparen:9390,squarebelowcmb:827,squarecc:13252,squarecm:13213,squarediagonalcrosshatchfill:9641,squarehorizontalfill:9636,squarekg:13199,squarekm:13214,squarekmcapital:13262,squareln:13265,squarelog:13266,squaremg:13198,squaremil:13269,squaremm:13212,squaremsquared:13217,squareorthogonalcrosshatchfill:9638,squareupperlefttolowerrightfill:9639,squareupperrighttolowerleftfill:9640,squareverticalfill:9637,squarewhitewithsmallblack:9635,srsquare:13275,ssabengali:2487,ssadeva:2359,ssagujarati:2743,ssangcieuckorean:12617,ssanghieuhkorean:12677,ssangieungkorean:12672,ssangkiyeokkorean:12594,ssangnieunkorean:12645,ssangpieupkorean:12611,ssangsioskorean:12614,ssangtikeutkorean:12600,ssuperior:63218,sterling:163,sterlingmonospace:65505,strokelongoverlaycmb:822,strokeshortoverlaycmb:821,subset:8834,subsetnotequal:8842,subsetorequal:8838,succeeds:8827,suchthat:8715,suhiragana:12377,sukatakana:12473,sukatakanahalfwidth:65405,sukunarabic:1618,summation:8721,sun:9788,superset:8835,supersetnotequal:8843,supersetorequal:8839,svsquare:13276,syouwaerasquare:13180,t:116,tabengali:2468,tackdown:8868,tackleft:8867,tadeva:2340,tagujarati:2724,tagurmukhi:2596,taharabic:1591,tahfinalarabic:65218,tahinitialarabic:65219,tahiragana:12383,tahmedialarabic:65220,taisyouerasquare:13181,takatakana:12479,takatakanahalfwidth:65408,tatweelarabic:1600,tau:964,tav:1514,tavdages:64330,tavdagesh:64330,tavdageshhebrew:64330,tavhebrew:1514,tbar:359,tbopomofo:12554,tcaron:357,tccurl:680,tcedilla:355,tcheharabic:1670,tchehfinalarabic:64379,tchehinitialarabic:64380,tchehmedialarabic:64381,tcircle:9443,tcircumflexbelow:7793,tcommaaccent:355,tdieresis:7831,tdotaccent:7787,tdotbelow:7789,tecyrillic:1090,tedescendercyrillic:1197,teharabic:1578,tehfinalarabic:65174,tehhahinitialarabic:64674,tehhahisolatedarabic:64524,tehinitialarabic:65175,tehiragana:12390,tehjeeminitialarabic:64673,tehjeemisolatedarabic:64523,tehmarbutaarabic:1577,tehmarbutafinalarabic:65172,tehmedialarabic:65176,tehmeeminitialarabic:64676,tehmeemisolatedarabic:64526,tehnoonfinalarabic:64627,tekatakana:12486,tekatakanahalfwidth:65411,telephone:8481,telephoneblack:9742,telishagedolahebrew:1440,telishaqetanahebrew:1449,tencircle:9321,tenideographicparen:12841,tenparen:9341,tenperiod:9361,tenroman:8569,tesh:679,tet:1496,tetdagesh:64312,tetdageshhebrew:64312,tethebrew:1496,tetsecyrillic:1205,tevirhebrew:1435,tevirlefthebrew:1435,thabengali:2469,thadeva:2341,thagujarati:2725,thagurmukhi:2597,thalarabic:1584,thalfinalarabic:65196,thanthakhatlowleftthai:63640,thanthakhatlowrightthai:63639,thanthakhatthai:3660,thanthakhatupperleftthai:63638,theharabic:1579,thehfinalarabic:65178,thehinitialarabic:65179,thehmedialarabic:65180,thereexists:8707,therefore:8756,theta:952,theta1:977,thetasymbolgreek:977,thieuthacirclekorean:12921,thieuthaparenkorean:12825,thieuthcirclekorean:12907,thieuthkorean:12620,thieuthparenkorean:12811,thirteencircle:9324,thirteenparen:9344,thirteenperiod:9364,thonangmonthothai:3601,thook:429,thophuthaothai:3602,thorn:254,thothahanthai:3607,thothanthai:3600,thothongthai:3608,thothungthai:3606,thousandcyrillic:1154,thousandsseparatorarabic:1644,thousandsseparatorpersian:1644,three:51,threearabic:1635,threebengali:2537,threecircle:9314,threecircleinversesansserif:10124,threedeva:2409,threeeighths:8540,threegujarati:2793,threegurmukhi:2665,threehackarabic:1635,threehangzhou:12323,threeideographicparen:12834,threeinferior:8323,threemonospace:65299,threenumeratorbengali:2550,threeoldstyle:63283,threeparen:9334,threeperiod:9354,threepersian:1779,threequarters:190,threequartersemdash:63198,threeroman:8562,threesuperior:179,threethai:3667,thzsquare:13204,tihiragana:12385,tikatakana:12481,tikatakanahalfwidth:65409,tikeutacirclekorean:12912,tikeutaparenkorean:12816,tikeutcirclekorean:12898,tikeutkorean:12599,tikeutparenkorean:12802,tilde:732,tildebelowcmb:816,tildecmb:771,tildecomb:771,tildedoublecmb:864,tildeoperator:8764,tildeoverlaycmb:820,tildeverticalcmb:830,timescircle:8855,tipehahebrew:1430,tipehalefthebrew:1430,tippigurmukhi:2672,titlocyrilliccmb:1155,tiwnarmenian:1407,tlinebelow:7791,tmonospace:65364,toarmenian:1385,tohiragana:12392,tokatakana:12488,tokatakanahalfwidth:65412,tonebarextrahighmod:741,tonebarextralowmod:745,tonebarhighmod:742,tonebarlowmod:744,tonebarmidmod:743,tonefive:445,tonesix:389,tonetwo:424,tonos:900,tonsquare:13095,topatakthai:3599,tortoiseshellbracketleft:12308,tortoiseshellbracketleftsmall:65117,tortoiseshellbracketleftvertical:65081,tortoiseshellbracketright:12309,tortoiseshellbracketrightsmall:65118,tortoiseshellbracketrightvertical:65082,totaothai:3605,tpalatalhook:427,tparen:9391,trademark:8482,trademarksans:63722,trademarkserif:63195,tretroflexhook:648,triagdn:9660,triaglf:9668,triagrt:9658,triagup:9650,ts:678,tsadi:1510,tsadidagesh:64326,tsadidageshhebrew:64326,tsadihebrew:1510,tsecyrillic:1094,tsere:1461,tsere12:1461,tsere1e:1461,tsere2b:1461,tserehebrew:1461,tserenarrowhebrew:1461,tserequarterhebrew:1461,tserewidehebrew:1461,tshecyrillic:1115,tsuperior:63219,ttabengali:2463,ttadeva:2335,ttagujarati:2719,ttagurmukhi:2591,tteharabic:1657,ttehfinalarabic:64359,ttehinitialarabic:64360,ttehmedialarabic:64361,tthabengali:2464,tthadeva:2336,tthagujarati:2720,tthagurmukhi:2592,tturned:647,tuhiragana:12388,tukatakana:12484,tukatakanahalfwidth:65410,tusmallhiragana:12387,tusmallkatakana:12483,tusmallkatakanahalfwidth:65391,twelvecircle:9323,twelveparen:9343,twelveperiod:9363,twelveroman:8571,twentycircle:9331,twentyhangzhou:21316,twentyparen:9351,twentyperiod:9371,two:50,twoarabic:1634,twobengali:2536,twocircle:9313,twocircleinversesansserif:10123,twodeva:2408,twodotenleader:8229,twodotleader:8229,twodotleadervertical:65072,twogujarati:2792,twogurmukhi:2664,twohackarabic:1634,twohangzhou:12322,twoideographicparen:12833,twoinferior:8322,twomonospace:65298,twonumeratorbengali:2549,twooldstyle:63282,twoparen:9333,twoperiod:9353,twopersian:1778,tworoman:8561,twostroke:443,twosuperior:178,twothai:3666,twothirds:8532,u:117,uacute:250,ubar:649,ubengali:2441,ubopomofo:12584,ubreve:365,ucaron:468,ucircle:9444,ucircumflex:251,ucircumflexbelow:7799,ucyrillic:1091,udattadeva:2385,udblacute:369,udblgrave:533,udeva:2313,udieresis:252,udieresisacute:472,udieresisbelow:7795,udieresiscaron:474,udieresiscyrillic:1265,udieresisgrave:476,udieresismacron:470,udotbelow:7909,ugrave:249,ugujarati:2697,ugurmukhi:2569,uhiragana:12358,uhookabove:7911,uhorn:432,uhornacute:7913,uhorndotbelow:7921,uhorngrave:7915,uhornhookabove:7917,uhorntilde:7919,uhungarumlaut:369,uhungarumlautcyrillic:1267,uinvertedbreve:535,ukatakana:12454,ukatakanahalfwidth:65395,ukcyrillic:1145,ukorean:12636,umacron:363,umacroncyrillic:1263,umacrondieresis:7803,umatragurmukhi:2625,umonospace:65365,underscore:95,underscoredbl:8215,underscoremonospace:65343,underscorevertical:65075,underscorewavy:65103,union:8746,universal:8704,uogonek:371,uparen:9392,upblock:9600,upperdothebrew:1476,upsilon:965,upsilondieresis:971,upsilondieresistonos:944,upsilonlatin:650,upsilontonos:973,uptackbelowcmb:797,uptackmod:724,uragurmukhi:2675,uring:367,ushortcyrillic:1118,usmallhiragana:12357,usmallkatakana:12453,usmallkatakanahalfwidth:65385,ustraightcyrillic:1199,ustraightstrokecyrillic:1201,utilde:361,utildeacute:7801,utildebelow:7797,uubengali:2442,uudeva:2314,uugujarati:2698,uugurmukhi:2570,uumatragurmukhi:2626,uuvowelsignbengali:2498,uuvowelsigndeva:2370,uuvowelsigngujarati:2754,uvowelsignbengali:2497,uvowelsigndeva:2369,uvowelsigngujarati:2753,v:118,vadeva:2357,vagujarati:2741,vagurmukhi:2613,vakatakana:12535,vav:1493,vavdagesh:64309,vavdagesh65:64309,vavdageshhebrew:64309,vavhebrew:1493,vavholam:64331,vavholamhebrew:64331,vavvavhebrew:1520,vavyodhebrew:1521,vcircle:9445,vdotbelow:7807,vecyrillic:1074,veharabic:1700,vehfinalarabic:64363,vehinitialarabic:64364,vehmedialarabic:64365,vekatakana:12537,venus:9792,verticalbar:124,verticallineabovecmb:781,verticallinebelowcmb:809,verticallinelowmod:716,verticallinemod:712,vewarmenian:1406,vhook:651,vikatakana:12536,viramabengali:2509,viramadeva:2381,viramagujarati:2765,visargabengali:2435,visargadeva:2307,visargagujarati:2691,vmonospace:65366,voarmenian:1400,voicediterationhiragana:12446,voicediterationkatakana:12542,voicedmarkkana:12443,voicedmarkkanahalfwidth:65438,vokatakana:12538,vparen:9393,vtilde:7805,vturned:652,vuhiragana:12436,vukatakana:12532,w:119,wacute:7811,waekorean:12633,wahiragana:12431,wakatakana:12527,wakatakanahalfwidth:65436,wakorean:12632,wasmallhiragana:12430,wasmallkatakana:12526,wattosquare:13143,wavedash:12316,wavyunderscorevertical:65076,wawarabic:1608,wawfinalarabic:65262,wawhamzaabovearabic:1572,wawhamzaabovefinalarabic:65158,wbsquare:13277,wcircle:9446,wcircumflex:373,wdieresis:7813,wdotaccent:7815,wdotbelow:7817,wehiragana:12433,weierstrass:8472,wekatakana:12529,wekorean:12638,weokorean:12637,wgrave:7809,whitebullet:9702,whitecircle:9675,whitecircleinverse:9689,whitecornerbracketleft:12302,whitecornerbracketleftvertical:65091,whitecornerbracketright:12303,whitecornerbracketrightvertical:65092,whitediamond:9671,whitediamondcontainingblacksmalldiamond:9672,whitedownpointingsmalltriangle:9663,whitedownpointingtriangle:9661,whiteleftpointingsmalltriangle:9667,whiteleftpointingtriangle:9665,whitelenticularbracketleft:12310,whitelenticularbracketright:12311,whiterightpointingsmalltriangle:9657,whiterightpointingtriangle:9655,whitesmallsquare:9643,whitesmilingface:9786,whitesquare:9633,whitestar:9734,whitetelephone:9743,whitetortoiseshellbracketleft:12312,whitetortoiseshellbracketright:12313,whiteuppointingsmalltriangle:9653,whiteuppointingtriangle:9651,wihiragana:12432,wikatakana:12528,wikorean:12639,wmonospace:65367,wohiragana:12434,wokatakana:12530,wokatakanahalfwidth:65382,won:8361,wonmonospace:65510,wowaenthai:3623,wparen:9394,wring:7832,wsuperior:695,wturned:653,wynn:447,x:120,xabovecmb:829,xbopomofo:12562,xcircle:9447,xdieresis:7821,xdotaccent:7819,xeharmenian:1389,xi:958,xmonospace:65368,xparen:9395,xsuperior:739,y:121,yaadosquare:13134,yabengali:2479,yacute:253,yadeva:2351,yaekorean:12626,yagujarati:2735,yagurmukhi:2607,yahiragana:12420,yakatakana:12516,yakatakanahalfwidth:65428,yakorean:12625,yamakkanthai:3662,yasmallhiragana:12419,yasmallkatakana:12515,yasmallkatakanahalfwidth:65388,yatcyrillic:1123,ycircle:9448,ycircumflex:375,ydieresis:255,ydotaccent:7823,ydotbelow:7925,yeharabic:1610,yehbarreearabic:1746,yehbarreefinalarabic:64431,yehfinalarabic:65266,yehhamzaabovearabic:1574,yehhamzaabovefinalarabic:65162,yehhamzaaboveinitialarabic:65163,yehhamzaabovemedialarabic:65164,yehinitialarabic:65267,yehmedialarabic:65268,yehmeeminitialarabic:64733,yehmeemisolatedarabic:64600,yehnoonfinalarabic:64660,yehthreedotsbelowarabic:1745,yekorean:12630,yen:165,yenmonospace:65509,yeokorean:12629,yeorinhieuhkorean:12678,yerahbenyomohebrew:1450,yerahbenyomolefthebrew:1450,yericyrillic:1099,yerudieresiscyrillic:1273,yesieungkorean:12673,yesieungpansioskorean:12675,yesieungsioskorean:12674,yetivhebrew:1434,ygrave:7923,yhook:436,yhookabove:7927,yiarmenian:1397,yicyrillic:1111,yikorean:12642,yinyang:9775,yiwnarmenian:1410,ymonospace:65369,yod:1497,yoddagesh:64313,yoddageshhebrew:64313,yodhebrew:1497,yodyodhebrew:1522,yodyodpatahhebrew:64287,yohiragana:12424,yoikorean:12681,yokatakana:12520,yokatakanahalfwidth:65430,yokorean:12635,yosmallhiragana:12423,yosmallkatakana:12519,yosmallkatakanahalfwidth:65390,yotgreek:1011,yoyaekorean:12680,yoyakorean:12679,yoyakthai:3618,yoyingthai:3597,yparen:9396,ypogegrammeni:890,ypogegrammenigreekcmb:837,yr:422,yring:7833,ysuperior:696,ytilde:7929,yturned:654,yuhiragana:12422,yuikorean:12684,yukatakana:12518,yukatakanahalfwidth:65429,yukorean:12640,yusbigcyrillic:1131,yusbigiotifiedcyrillic:1133,yuslittlecyrillic:1127,yuslittleiotifiedcyrillic:1129,yusmallhiragana:12421,yusmallkatakana:12517,yusmallkatakanahalfwidth:65389,yuyekorean:12683,yuyeokorean:12682,yyabengali:2527,yyadeva:2399,z:122,zaarmenian:1382,zacute:378,zadeva:2395,zagurmukhi:2651,zaharabic:1592,zahfinalarabic:65222,zahinitialarabic:65223,zahiragana:12374,zahmedialarabic:65224,zainarabic:1586,zainfinalarabic:65200,zakatakana:12470,zaqefgadolhebrew:1429,zaqefqatanhebrew:1428,zarqahebrew:1432,zayin:1494,zayindagesh:64310,zayindageshhebrew:64310,zayinhebrew:1494,zbopomofo:12567,zcaron:382,zcircle:9449,zcircumflex:7825,zcurl:657,zdot:380,zdotaccent:380,zdotbelow:7827,zecyrillic:1079,zedescendercyrillic:1177,zedieresiscyrillic:1247,zehiragana:12380,zekatakana:12476,zero:48,zeroarabic:1632,zerobengali:2534,zerodeva:2406,zerogujarati:2790,zerogurmukhi:2662,zerohackarabic:1632,zeroinferior:8320,zeromonospace:65296,zerooldstyle:63280,zeropersian:1776,zerosuperior:8304,zerothai:3664,zerowidthjoiner:65279,zerowidthnonjoiner:8204,zerowidthspace:8203,zeta:950,zhbopomofo:12563,zhearmenian:1386,zhebrevecyrillic:1218,zhecyrillic:1078,zhedescendercyrillic:1175,zhedieresiscyrillic:1245,zihiragana:12376,zikatakana:12472,zinorhebrew:1454,zlinebelow:7829,zmonospace:65370,zohiragana:12382,zokatakana:12478,zparen:9397,zretroflexhook:656,zstroke:438,zuhiragana:12378,zukatakana:12474,".notdef":0},Ac={space:32,a1:9985,a2:9986,a202:9987,a3:9988,a4:9742,a5:9990,a119:9991,a118:9992,a117:9993,a11:9755,a12:9758,a13:9996,a14:9997,a15:9998,a16:9999,a105:1e4,a17:10001,a18:10002,a19:10003,a20:10004,a21:10005,a22:10006,a23:10007,a24:10008,a25:10009,a26:10010,a27:10011,a28:10012,a6:10013,a7:10014,a8:10015,a9:10016,a10:10017,a29:10018,a30:10019,a31:10020,a32:10021,a33:10022,a34:10023,a35:9733,a36:10025,a37:10026,a38:10027,a39:10028,a40:10029,a41:10030,a42:10031,a43:10032,a44:10033,a45:10034,a46:10035,a47:10036,a48:10037,a49:10038,a50:10039,a51:10040,a52:10041,a53:10042,a54:10043,a55:10044,a56:10045,a57:10046,a58:10047,a59:10048,a60:10049,a61:10050,a62:10051,a63:10052,a64:10053,a65:10054,a66:10055,a67:10056,a68:10057,a69:10058,a70:10059,a71:9679,a72:10061,a73:9632,a74:10063,a203:10064,a75:10065,a204:10066,a76:9650,a77:9660,a78:9670,a79:10070,a81:9687,a82:10072,a83:10073,a84:10074,a97:10075,a98:10076,a99:10077,a100:10078,a101:10081,a102:10082,a103:10083,a104:10084,a106:10085,a107:10086,a108:10087,a112:9827,a111:9830,a110:9829,a109:9824,a120:9312,a121:9313,a122:9314,a123:9315,a124:9316,a125:9317,a126:9318,a127:9319,a128:9320,a129:9321,a130:10102,a131:10103,a132:10104,a133:10105,a134:10106,a135:10107,a136:10108,a137:10109,a138:10110,a139:10111,a140:10112,a141:10113,a142:10114,a143:10115,a144:10116,a145:10117,a146:10118,a147:10119,a148:10120,a149:10121,a150:10122,a151:10123,a152:10124,a153:10125,a154:10126,a155:10127,a156:10128,a157:10129,a158:10130,a159:10131,a160:10132,a161:8594,a163:8596,a164:8597,a196:10136,a165:10137,a192:10138,a166:10139,a167:10140,a168:10141,a169:10142,a170:10143,a171:10144,a172:10145,a173:10146,a162:10147,a174:10148,a175:10149,a176:10150,a177:10151,a178:10152,a179:10153,a193:10154,a180:10155,a199:10156,a181:10157,a200:10158,a182:10159,a201:10161,a183:10162,a184:10163,a197:10164,a185:10165,a194:10166,a198:10167,a186:10168,a195:10169,a187:10170,a188:10171,a189:10172,a190:10173,a191:10174,a89:10088,a90:10089,a93:10090,a94:10091,a91:10092,a92:10093,a205:10094,a85:10095,a206:10096,a86:10097,a87:10098,a88:10099,a95:10100,a96:10101,".notdef":0},Bc=function(){function d(a,b,c,d){if(d instanceof Sc&&d.isNativelyDecodable(b,c)){var e=d.dict,f=e.get("ColorSpace","CS");f=Xa.parse(f,b,c);var g=f.numComps,h=a.sendWithPromise("JpegDecode",[d.getIR(),g]);return h.then(function(a){var b=a.data;return new Mc(b,0,b.length,d.dict)})}return Promise.resolve(d)}function f(a,b,c,d){return a=b+a*c,0>a?0:a>d?d:a}function g(b,d,e,f,h,i,j){this.image=e;var k=e.dict;if(k.has("Filter")){var l=k.get("Filter").name;if("JPXDecode"===l){var m=new hd;m.parseImageProperties(e.stream),e.stream.reset(),e.bitsPerComponent=m.bitsPerComponent,e.numComps=m.componentsCount}else"JBIG2Decode"===l&&(e.bitsPerComponent=1,e.numComps=1)}this.width=k.get("Width","W"),this.height=k.get("Height","H"),(this.width<1||this.height<1)&&c("Invalid image width: "+this.width+" or height: "+this.height),this.interpolate=k.get("Interpolate","I")||!1,this.imageMask=k.get("ImageMask","IM")||!1,this.matte=k.get("Matte")||!1;var n=e.bitsPerComponent;if(n||(n=k.get("BitsPerComponent","BPC"),n||(this.imageMask?n=1:c("Bits per component missing in image: "+this.imageMask))),this.bpc=n,!this.imageMask){var o=k.get("ColorSpace","CS");if(!o)switch(a("JPX images (which do not require color spaces)"),e.numComps){case 1:o=ya.get("DeviceGray");break;case 3:o=ya.get("DeviceRGB");break;case 4:o=ya.get("DeviceCMYK");break;default:c("JPX images with "+this.numComps+" color components not supported.")}this.colorSpace=Xa.parse(o,b,d),this.numComps=this.colorSpace.numComps}if(this.decode=k.get("Decode","D"),this.needsDecode=!1,this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode)||j&&!Xa.isDefaultDecode(this.decode,1))){this.needsDecode=!0;var p=(1<=b?new Uint8Array(o):16>=b?new Uint16Array(o):new Uint32Array(o),q=e/g,r=f/h,s=0,t=new Uint16Array(g),u=e*d;for(1!==j&&(j=0),l=0;g>l;l++)t[l]=Math.floor(l*q)*d;if(1===d)for(k=0;h>k;k++)for(m=Math.floor(k*r)*u,l=0;g>l;l++)n=m+t[l],p[s++]=a[n];else if(3===d)for(k=0;h>k;k++)for(m=Math.floor(k*r)*u,l=0;g>l;l++)n=m+t[l],p[s++]=a[n++],p[s++]=a[n++],p[s++]=a[n++],s+=j;return p},g.createMask=function(a,b,c,d,e){var f,g,h=(b+7>>3)*c,i=a.byteLength,j=h===i;if(!d||e&&!j)if(e)for(f=new Uint8Array(h),f.set(a),g=i;h>g;g++)f[g]=255;else f=new Uint8Array(i),f.set(a);else f=a;if(e)for(g=0;i>g;g++)f[g]=~f[g];return{data:f,width:b,height:c}},g.prototype={get drawWidth(){return Math.max(this.width,this.smask&&this.smask.width||0,this.mask&&this.mask.width||0)},get drawHeight(){return Math.max(this.height,this.smask&&this.smask.height||0,this.mask&&this.mask.height||0)},decodeBuffer:function(a){var b,c,d=this.bpc,e=this.numComps,g=this.decodeAddends,h=this.decodeCoefficients,i=(1<b;b++)for(var k=0;e>k;k++)a[j]=f(a[j],g[k],h[k],i),j++}else for(b=0,c=a.length;c>b;b++)a[b]=+!a[b]},getComponents:function(a){var b=this.bpc;if(8===b)return a;var c,d,e=this.width,f=this.height,g=this.numComps,h=e*f*g,i=0,j=8>=b?new Uint8Array(h):16>=b?new Uint16Array(h):new Uint32Array(h),k=e*g,l=(1<q;q++){for(o=m+(-8&k),p=m+k;o>m;)d=a[i++],j[m]=d>>7&1,j[m+1]=d>>6&1,j[m+2]=d>>5&1,j[m+3]=d>>4&1,j[m+4]=d>>3&1,j[m+5]=d>>2&1,j[m+6]=d>>1&1,j[m+7]=1&d,m+=8;if(p>m)for(d=a[i++],n=128;p>m;)j[m++]=+!!(d&n),n>>=1}else{var r=0;for(d=0,m=0,c=h;c>m;++m){for(m%k===0&&(d=0,r=0);b>r;)d=d<<8|a[i++],r+=8;var s=r-b,t=d>>s;j[m]=0>t?0:t>l?l:t,d&=(1<k;++k)h[k]=255-h[k];(i!==b||j!==d)&&(h=g.resize(h,o.bpc,1,i,j,b,d))}else if(C(o)){h=new Uint8Array(b*d);var p=this.numComps;for(k=0,l=b*d;l>k;++k){var q=0,r=k*p;for(m=0;p>m;++m){var s=f[r+m],t=2*m;if(so[t+1]){q=255;break}}h[k]=q}}else c("Unknown mask format.");if(h)for(k=0,m=3,l=b*e;l>k;++k,m+=4)a[m]=h[k];else for(k=0,m=3,l=b*e;l>k;++k,m+=4)a[m]=255},undoPreblend:function(a,b,c){var d=this.smask&&this.smask.matte;if(d)for(var e,f,g,h=this.colorSpace.getRgb(d,0),i=h[0],j=h[1],k=h[2],l=b*c*4,m=0;l>m;m+=4){var n=a[m+3];if(0!==n){var o=255/n;e=(a[m]-i)*o+i,f=(a[m+1]-j)*o+j,g=(a[m+2]-k)*o+k,a[m]=0>=e?0:e>=255?255:0|e,a[m+1]=0>=f?0:f>=255?255:0|f,a[m+2]=0>=g?0:g>=255?255:0|g}else a[m]=255,a[m+1]=255,a[m+2]=255}},createImageData:function(a){var b,c=this.drawWidth,d=this.drawHeight,f={width:c,height:d},g=this.numComps,h=this.width,i=this.height,j=this.bpc,k=h*g*j+7>>3;if(!a){var l;if("DeviceGray"===this.colorSpace.name&&1===j?l=V.GRAYSCALE_1BPP:"DeviceRGB"!==this.colorSpace.name||8!==j||this.needsDecode||(l=V.RGB_24BPP),l&&!this.smask&&!this.mask&&c===h&&d===i){if(f.kind=l,b=this.getImageBytes(i*k),this.image instanceof Oc)f.data=b;else{var m=new Uint8Array(b.length);m.set(b),f.data=m}if(this.needsDecode){e(l===V.GRAYSCALE_1BPP);for(var n=f.data,o=0,p=n.length;p>o;o++)n[o]^=255}return f}if(this.image instanceof Sc&&!this.smask&&!this.mask&&("DeviceGray"===this.colorSpace.name||"DeviceRGB"===this.colorSpace.name||"DeviceCMYK"===this.colorSpace.name))return f.kind=V.RGB_24BPP,f.data=this.getImageBytes(i*k,c,d,!0),f}b=this.getImageBytes(i*k);var q,r,s=0|b.length/k*d/i,t=this.getComponents(b);return a||this.smask||this.mask?(f.kind=V.RGBA_32BPP,f.data=new Uint8Array(c*d*4),q=1,r=!0,this.fillOpacity(f.data,c,d,s,t)):(f.kind=V.RGB_24BPP,f.data=new Uint8Array(c*d*3),q=0,r=!1),this.needsDecode&&this.decodeBuffer(t),this.colorSpace.fillRgb(f.data,h,i,c,d,s,j,t,q),r&&this.undoPreblend(f.data,c,s),f},fillGrayBuffer:function(a){var b=this.numComps;1!==b&&c("Reading gray scale from a color image: "+b);var d,e,f=this.width,g=this.height,h=this.bpc,i=f*b*h+7>>3,j=this.getImageBytes(g*i),k=this.getComponents(j);if(1!==h){this.needsDecode&&this.decodeBuffer(k),e=f*g;var l=255/((1<d;++d)a[d]=l*k[d]|0}else if(e=f*g,this.needsDecode)for(d=0;e>d;++d)a[d]=k[d]-1&255;else for(d=0;e>d;++d)a[d]=255&-k[d]},getImageBytes:function(a,b,c,d){return this.image.reset(),this.image.drawWidth=b||this.width,this.image.drawHeight=c||this.height,this.image.forceRGB=!!d,this.image.getBytes(a)}},g}(),Cc={Courier:600,"Courier-Bold":600,"Courier-BoldOblique":600,"Courier-Oblique":600,Helvetica:{space:278,exclam:278,quotedbl:355,numbersign:556,dollar:556,percent:889,ampersand:667,quoteright:222,parenleft:333,parenright:333,asterisk:389,plus:584,comma:278,hyphen:333,period:278,slash:278,zero:556,one:556,two:556,three:556,four:556,five:556,six:556,seven:556,eight:556,nine:556,colon:278,semicolon:278,less:584,equal:584,greater:584,question:556,at:1015,A:667,B:667,C:722,D:722,E:667,F:611,G:778,H:722,I:278,J:500,K:667,L:556,M:833,N:722,O:778,P:667,Q:778,R:722,S:667,T:611,U:722,V:667,W:944,X:667,Y:667,Z:611,bracketleft:278,backslash:278,bracketright:278,asciicircum:469,underscore:556,quoteleft:222,a:556,b:556,c:500,d:556,e:556,f:278,g:556,h:556,i:222,j:222,k:500,l:222,m:833,n:556,o:556,p:556,q:556,r:333,s:500,t:278,u:556,v:500,w:722,x:500,y:500,z:500,braceleft:334,bar:260,braceright:334,asciitilde:584,exclamdown:333,cent:556,sterling:556,fraction:167,yen:556,florin:556,section:556,currency:556,quotesingle:191,quotedblleft:333,guillemotleft:556,guilsinglleft:333,guilsinglright:333,fi:500,fl:500,endash:556,dagger:556,daggerdbl:556,periodcentered:278,paragraph:537,bullet:350,quotesinglbase:222,quotedblbase:333,quotedblright:333,guillemotright:556,ellipsis:1e3,perthousand:1e3,questiondown:611,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:1e3,ordfeminine:370,Lslash:556,Oslash:778,OE:1e3,ordmasculine:365,ae:889,dotlessi:278,lslash:222,oslash:611,oe:944,germandbls:611,Idieresis:278,eacute:556,abreve:556,uhungarumlaut:556,ecaron:556,Ydieresis:667,divide:584,Yacute:667,Acircumflex:667,aacute:556,Ucircumflex:722,yacute:500,scommaaccent:500,ecircumflex:556,Uring:722,Udieresis:722,aogonek:556,Uacute:722,uogonek:556,Edieresis:667,Dcroat:722,commaaccent:250,copyright:737,Emacron:667,ccaron:500,aring:556,Ncommaaccent:722,lacute:222,agrave:556,Tcommaaccent:611,Cacute:722,atilde:556,Edotaccent:667,scaron:500,scedilla:500,iacute:278,lozenge:471,Rcaron:722,Gcommaaccent:778,ucircumflex:556,acircumflex:556,Amacron:667,rcaron:333,ccedilla:500,Zdotaccent:611,Thorn:667,Omacron:778,Racute:722,Sacute:667,dcaron:643,Umacron:722,uring:556,threesuperior:333,Ograve:778,Agrave:667,Abreve:667,multiply:584,uacute:556,Tcaron:611,partialdiff:476,ydieresis:500,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:556,edieresis:556,cacute:500,nacute:556,umacron:556,Ncaron:722,Iacute:278,plusminus:584,brokenbar:260,registered:737,Gbreve:778,Idotaccent:278,summation:600,Egrave:667,racute:333,omacron:556,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:722,lcommaaccent:222,tcaron:317,eogonek:556,Uogonek:722,Aacute:667,Adieresis:667,egrave:556,zacute:500,iogonek:222,Oacute:778,oacute:556,amacron:556,sacute:500,idieresis:278,Ocircumflex:778,Ugrave:722,Delta:612,thorn:556,twosuperior:333,Odieresis:778,mu:556,igrave:278,ohungarumlaut:556,Eogonek:667,dcroat:556,threequarters:834,Scedilla:667,lcaron:299,Kcommaaccent:667,Lacute:556,trademark:1e3,edotaccent:556,Igrave:278,Imacron:278,Lcaron:556,onehalf:834,lessequal:549,ocircumflex:556,ntilde:556,Uhungarumlaut:722,Eacute:667,emacron:556,gbreve:556,onequarter:834,Scaron:667,Scommaaccent:667,Ohungarumlaut:778,degree:400,ograve:556,Ccaron:722,ugrave:556,radical:453,Dcaron:722,rcommaaccent:333,Ntilde:722,otilde:556,Rcommaaccent:722,Lcommaaccent:556,Atilde:667,Aogonek:667,Aring:667,Otilde:778,zdotaccent:500,Ecaron:667,Iogonek:278,kcommaaccent:500,minus:584,Icircumflex:278,ncaron:556,tcommaaccent:278,logicalnot:584,odieresis:556,udieresis:556,notequal:549,gcommaaccent:556,eth:556,zcaron:500,ncommaaccent:556,onesuperior:333,imacron:278,Euro:556},"Helvetica-Bold":{space:278,exclam:333,quotedbl:474,numbersign:556,dollar:556,percent:889,ampersand:722,quoteright:278,parenleft:333,parenright:333,asterisk:389,plus:584,comma:278,hyphen:333,period:278,slash:278,zero:556,one:556,two:556,three:556,four:556,five:556,six:556,seven:556,eight:556,nine:556,colon:333,semicolon:333,less:584,equal:584,greater:584,question:611,at:975,A:722,B:722,C:722,D:722, +E:667,F:611,G:778,H:722,I:278,J:556,K:722,L:611,M:833,N:722,O:778,P:667,Q:778,R:722,S:667,T:611,U:722,V:667,W:944,X:667,Y:667,Z:611,bracketleft:333,backslash:278,bracketright:333,asciicircum:584,underscore:556,quoteleft:278,a:556,b:611,c:556,d:611,e:556,f:333,g:611,h:611,i:278,j:278,k:556,l:278,m:889,n:611,o:611,p:611,q:611,r:389,s:556,t:333,u:611,v:556,w:778,x:556,y:556,z:500,braceleft:389,bar:280,braceright:389,asciitilde:584,exclamdown:333,cent:556,sterling:556,fraction:167,yen:556,florin:556,section:556,currency:556,quotesingle:238,quotedblleft:500,guillemotleft:556,guilsinglleft:333,guilsinglright:333,fi:611,fl:611,endash:556,dagger:556,daggerdbl:556,periodcentered:278,paragraph:556,bullet:350,quotesinglbase:278,quotedblbase:500,quotedblright:500,guillemotright:556,ellipsis:1e3,perthousand:1e3,questiondown:611,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:1e3,ordfeminine:370,Lslash:611,Oslash:778,OE:1e3,ordmasculine:365,ae:889,dotlessi:278,lslash:278,oslash:611,oe:944,germandbls:611,Idieresis:278,eacute:556,abreve:556,uhungarumlaut:611,ecaron:556,Ydieresis:667,divide:584,Yacute:667,Acircumflex:722,aacute:556,Ucircumflex:722,yacute:556,scommaaccent:556,ecircumflex:556,Uring:722,Udieresis:722,aogonek:556,Uacute:722,uogonek:611,Edieresis:667,Dcroat:722,commaaccent:250,copyright:737,Emacron:667,ccaron:556,aring:556,Ncommaaccent:722,lacute:278,agrave:556,Tcommaaccent:611,Cacute:722,atilde:556,Edotaccent:667,scaron:556,scedilla:556,iacute:278,lozenge:494,Rcaron:722,Gcommaaccent:778,ucircumflex:611,acircumflex:556,Amacron:722,rcaron:389,ccedilla:556,Zdotaccent:611,Thorn:667,Omacron:778,Racute:722,Sacute:667,dcaron:743,Umacron:722,uring:611,threesuperior:333,Ograve:778,Agrave:722,Abreve:722,multiply:584,uacute:611,Tcaron:611,partialdiff:494,ydieresis:556,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:556,edieresis:556,cacute:556,nacute:611,umacron:611,Ncaron:722,Iacute:278,plusminus:584,brokenbar:280,registered:737,Gbreve:778,Idotaccent:278,summation:600,Egrave:667,racute:389,omacron:611,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:722,lcommaaccent:278,tcaron:389,eogonek:556,Uogonek:722,Aacute:722,Adieresis:722,egrave:556,zacute:500,iogonek:278,Oacute:778,oacute:611,amacron:556,sacute:556,idieresis:278,Ocircumflex:778,Ugrave:722,Delta:612,thorn:611,twosuperior:333,Odieresis:778,mu:611,igrave:278,ohungarumlaut:611,Eogonek:667,dcroat:611,threequarters:834,Scedilla:667,lcaron:400,Kcommaaccent:722,Lacute:611,trademark:1e3,edotaccent:556,Igrave:278,Imacron:278,Lcaron:611,onehalf:834,lessequal:549,ocircumflex:611,ntilde:611,Uhungarumlaut:722,Eacute:667,emacron:556,gbreve:611,onequarter:834,Scaron:667,Scommaaccent:667,Ohungarumlaut:778,degree:400,ograve:611,Ccaron:722,ugrave:611,radical:549,Dcaron:722,rcommaaccent:389,Ntilde:722,otilde:611,Rcommaaccent:722,Lcommaaccent:611,Atilde:722,Aogonek:722,Aring:722,Otilde:778,zdotaccent:500,Ecaron:667,Iogonek:278,kcommaaccent:556,minus:584,Icircumflex:278,ncaron:611,tcommaaccent:333,logicalnot:584,odieresis:611,udieresis:611,notequal:549,gcommaaccent:611,eth:611,zcaron:500,ncommaaccent:611,onesuperior:333,imacron:278,Euro:556},"Helvetica-BoldOblique":{space:278,exclam:333,quotedbl:474,numbersign:556,dollar:556,percent:889,ampersand:722,quoteright:278,parenleft:333,parenright:333,asterisk:389,plus:584,comma:278,hyphen:333,period:278,slash:278,zero:556,one:556,two:556,three:556,four:556,five:556,six:556,seven:556,eight:556,nine:556,colon:333,semicolon:333,less:584,equal:584,greater:584,question:611,at:975,A:722,B:722,C:722,D:722,E:667,F:611,G:778,H:722,I:278,J:556,K:722,L:611,M:833,N:722,O:778,P:667,Q:778,R:722,S:667,T:611,U:722,V:667,W:944,X:667,Y:667,Z:611,bracketleft:333,backslash:278,bracketright:333,asciicircum:584,underscore:556,quoteleft:278,a:556,b:611,c:556,d:611,e:556,f:333,g:611,h:611,i:278,j:278,k:556,l:278,m:889,n:611,o:611,p:611,q:611,r:389,s:556,t:333,u:611,v:556,w:778,x:556,y:556,z:500,braceleft:389,bar:280,braceright:389,asciitilde:584,exclamdown:333,cent:556,sterling:556,fraction:167,yen:556,florin:556,section:556,currency:556,quotesingle:238,quotedblleft:500,guillemotleft:556,guilsinglleft:333,guilsinglright:333,fi:611,fl:611,endash:556,dagger:556,daggerdbl:556,periodcentered:278,paragraph:556,bullet:350,quotesinglbase:278,quotedblbase:500,quotedblright:500,guillemotright:556,ellipsis:1e3,perthousand:1e3,questiondown:611,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:1e3,ordfeminine:370,Lslash:611,Oslash:778,OE:1e3,ordmasculine:365,ae:889,dotlessi:278,lslash:278,oslash:611,oe:944,germandbls:611,Idieresis:278,eacute:556,abreve:556,uhungarumlaut:611,ecaron:556,Ydieresis:667,divide:584,Yacute:667,Acircumflex:722,aacute:556,Ucircumflex:722,yacute:556,scommaaccent:556,ecircumflex:556,Uring:722,Udieresis:722,aogonek:556,Uacute:722,uogonek:611,Edieresis:667,Dcroat:722,commaaccent:250,copyright:737,Emacron:667,ccaron:556,aring:556,Ncommaaccent:722,lacute:278,agrave:556,Tcommaaccent:611,Cacute:722,atilde:556,Edotaccent:667,scaron:556,scedilla:556,iacute:278,lozenge:494,Rcaron:722,Gcommaaccent:778,ucircumflex:611,acircumflex:556,Amacron:722,rcaron:389,ccedilla:556,Zdotaccent:611,Thorn:667,Omacron:778,Racute:722,Sacute:667,dcaron:743,Umacron:722,uring:611,threesuperior:333,Ograve:778,Agrave:722,Abreve:722,multiply:584,uacute:611,Tcaron:611,partialdiff:494,ydieresis:556,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:556,edieresis:556,cacute:556,nacute:611,umacron:611,Ncaron:722,Iacute:278,plusminus:584,brokenbar:280,registered:737,Gbreve:778,Idotaccent:278,summation:600,Egrave:667,racute:389,omacron:611,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:722,lcommaaccent:278,tcaron:389,eogonek:556,Uogonek:722,Aacute:722,Adieresis:722,egrave:556,zacute:500,iogonek:278,Oacute:778,oacute:611,amacron:556,sacute:556,idieresis:278,Ocircumflex:778,Ugrave:722,Delta:612,thorn:611,twosuperior:333,Odieresis:778,mu:611,igrave:278,ohungarumlaut:611,Eogonek:667,dcroat:611,threequarters:834,Scedilla:667,lcaron:400,Kcommaaccent:722,Lacute:611,trademark:1e3,edotaccent:556,Igrave:278,Imacron:278,Lcaron:611,onehalf:834,lessequal:549,ocircumflex:611,ntilde:611,Uhungarumlaut:722,Eacute:667,emacron:556,gbreve:611,onequarter:834,Scaron:667,Scommaaccent:667,Ohungarumlaut:778,degree:400,ograve:611,Ccaron:722,ugrave:611,radical:549,Dcaron:722,rcommaaccent:389,Ntilde:722,otilde:611,Rcommaaccent:722,Lcommaaccent:611,Atilde:722,Aogonek:722,Aring:722,Otilde:778,zdotaccent:500,Ecaron:667,Iogonek:278,kcommaaccent:556,minus:584,Icircumflex:278,ncaron:611,tcommaaccent:333,logicalnot:584,odieresis:611,udieresis:611,notequal:549,gcommaaccent:611,eth:611,zcaron:500,ncommaaccent:611,onesuperior:333,imacron:278,Euro:556},"Helvetica-Oblique":{space:278,exclam:278,quotedbl:355,numbersign:556,dollar:556,percent:889,ampersand:667,quoteright:222,parenleft:333,parenright:333,asterisk:389,plus:584,comma:278,hyphen:333,period:278,slash:278,zero:556,one:556,two:556,three:556,four:556,five:556,six:556,seven:556,eight:556,nine:556,colon:278,semicolon:278,less:584,equal:584,greater:584,question:556,at:1015,A:667,B:667,C:722,D:722,E:667,F:611,G:778,H:722,I:278,J:500,K:667,L:556,M:833,N:722,O:778,P:667,Q:778,R:722,S:667,T:611,U:722,V:667,W:944,X:667,Y:667,Z:611,bracketleft:278,backslash:278,bracketright:278,asciicircum:469,underscore:556,quoteleft:222,a:556,b:556,c:500,d:556,e:556,f:278,g:556,h:556,i:222,j:222,k:500,l:222,m:833,n:556,o:556,p:556,q:556,r:333,s:500,t:278,u:556,v:500,w:722,x:500,y:500,z:500,braceleft:334,bar:260,braceright:334,asciitilde:584,exclamdown:333,cent:556,sterling:556,fraction:167,yen:556,florin:556,section:556,currency:556,quotesingle:191,quotedblleft:333,guillemotleft:556,guilsinglleft:333,guilsinglright:333,fi:500,fl:500,endash:556,dagger:556,daggerdbl:556,periodcentered:278,paragraph:537,bullet:350,quotesinglbase:222,quotedblbase:333,quotedblright:333,guillemotright:556,ellipsis:1e3,perthousand:1e3,questiondown:611,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:1e3,ordfeminine:370,Lslash:556,Oslash:778,OE:1e3,ordmasculine:365,ae:889,dotlessi:278,lslash:222,oslash:611,oe:944,germandbls:611,Idieresis:278,eacute:556,abreve:556,uhungarumlaut:556,ecaron:556,Ydieresis:667,divide:584,Yacute:667,Acircumflex:667,aacute:556,Ucircumflex:722,yacute:500,scommaaccent:500,ecircumflex:556,Uring:722,Udieresis:722,aogonek:556,Uacute:722,uogonek:556,Edieresis:667,Dcroat:722,commaaccent:250,copyright:737,Emacron:667,ccaron:500,aring:556,Ncommaaccent:722,lacute:222,agrave:556,Tcommaaccent:611,Cacute:722,atilde:556,Edotaccent:667,scaron:500,scedilla:500,iacute:278,lozenge:471,Rcaron:722,Gcommaaccent:778,ucircumflex:556,acircumflex:556,Amacron:667,rcaron:333,ccedilla:500,Zdotaccent:611,Thorn:667,Omacron:778,Racute:722,Sacute:667,dcaron:643,Umacron:722,uring:556,threesuperior:333,Ograve:778,Agrave:667,Abreve:667,multiply:584,uacute:556,Tcaron:611,partialdiff:476,ydieresis:500,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:556,edieresis:556,cacute:500,nacute:556,umacron:556,Ncaron:722,Iacute:278,plusminus:584,brokenbar:260,registered:737,Gbreve:778,Idotaccent:278,summation:600,Egrave:667,racute:333,omacron:556,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:722,lcommaaccent:222,tcaron:317,eogonek:556,Uogonek:722,Aacute:667,Adieresis:667,egrave:556,zacute:500,iogonek:222,Oacute:778,oacute:556,amacron:556,sacute:500,idieresis:278,Ocircumflex:778,Ugrave:722,Delta:612,thorn:556,twosuperior:333,Odieresis:778,mu:556,igrave:278,ohungarumlaut:556,Eogonek:667,dcroat:556,threequarters:834,Scedilla:667,lcaron:299,Kcommaaccent:667,Lacute:556,trademark:1e3,edotaccent:556,Igrave:278,Imacron:278,Lcaron:556,onehalf:834,lessequal:549,ocircumflex:556,ntilde:556,Uhungarumlaut:722,Eacute:667,emacron:556,gbreve:556,onequarter:834,Scaron:667,Scommaaccent:667,Ohungarumlaut:778,degree:400,ograve:556,Ccaron:722,ugrave:556,radical:453,Dcaron:722,rcommaaccent:333,Ntilde:722,otilde:556,Rcommaaccent:722,Lcommaaccent:556,Atilde:667,Aogonek:667,Aring:667,Otilde:778,zdotaccent:500,Ecaron:667,Iogonek:278,kcommaaccent:500,minus:584,Icircumflex:278,ncaron:556,tcommaaccent:278,logicalnot:584,odieresis:556,udieresis:556,notequal:549,gcommaaccent:556,eth:556,zcaron:500,ncommaaccent:556,onesuperior:333,imacron:278,Euro:556},Symbol:{space:250,exclam:333,universal:713,numbersign:500,existential:549,percent:833,ampersand:778,suchthat:439,parenleft:333,parenright:333,asteriskmath:500,plus:549,comma:250,minus:549,period:250,slash:278,zero:500,one:500,two:500,three:500,four:500,five:500,six:500,seven:500,eight:500,nine:500,colon:278,semicolon:278,less:549,equal:549,greater:549,question:444,congruent:549,Alpha:722,Beta:667,Chi:722,Delta:612,Epsilon:611,Phi:763,Gamma:603,Eta:722,Iota:333,theta1:631,Kappa:722,Lambda:686,Mu:889,Nu:722,Omicron:722,Pi:768,Theta:741,Rho:556,Sigma:592,Tau:611,Upsilon:690,sigma1:439,Omega:768,Xi:645,Psi:795,Zeta:611,bracketleft:333,therefore:863,bracketright:333,perpendicular:658,underscore:500,radicalex:500,alpha:631,beta:549,chi:549,delta:494,epsilon:439,phi:521,gamma:411,eta:603,iota:329,phi1:603,kappa:549,lambda:549,mu:576,nu:521,omicron:549,pi:549,theta:521,rho:549,sigma:603,tau:439,upsilon:576,omega1:713,omega:686,xi:493,psi:686,zeta:494,braceleft:480,bar:200,braceright:480,similar:549,Euro:750,Upsilon1:620,minute:247,lessequal:549,fraction:167,infinity:713,florin:500,club:753,diamond:753,heart:753,spade:753,arrowboth:1042,arrowleft:987,arrowup:603,arrowright:987,arrowdown:603,degree:400,plusminus:549,second:411,greaterequal:549,multiply:549,proportional:713,partialdiff:494,bullet:460,divide:549,notequal:549,equivalence:549,approxequal:549,ellipsis:1e3,arrowvertex:603,arrowhorizex:1e3,carriagereturn:658,aleph:823,Ifraktur:686,Rfraktur:795,weierstrass:987,circlemultiply:768,circleplus:768,emptyset:823,intersection:768,union:768,propersuperset:713,reflexsuperset:713,notsubset:713,propersubset:713,reflexsubset:713,element:713,notelement:713,angle:768,gradient:713,registerserif:790,copyrightserif:790,trademarkserif:890,product:823,radical:549,dotmath:250,logicalnot:713,logicaland:603,logicalor:603,arrowdblboth:1042,arrowdblleft:987,arrowdblup:603,arrowdblright:987,arrowdbldown:603,lozenge:494,angleleft:329,registersans:790,copyrightsans:790,trademarksans:786,summation:713,parenlefttp:384,parenleftex:384,parenleftbt:384,bracketlefttp:384,bracketleftex:384,bracketleftbt:384,bracelefttp:494,braceleftmid:494,braceleftbt:494,braceex:494,angleright:329,integral:274,integraltp:686,integralex:686,integralbt:686,parenrighttp:384,parenrightex:384,parenrightbt:384,bracketrighttp:384,bracketrightex:384,bracketrightbt:384,bracerighttp:494,bracerightmid:494,bracerightbt:494,apple:790},"Times-Roman":{space:250,exclam:333,quotedbl:408,numbersign:500,dollar:500,percent:833,ampersand:778,quoteright:333,parenleft:333,parenright:333,asterisk:500,plus:564,comma:250,hyphen:333,period:250,slash:278,zero:500,one:500,two:500,three:500,four:500,five:500,six:500,seven:500,eight:500,nine:500,colon:278,semicolon:278,less:564,equal:564,greater:564,question:444,at:921,A:722,B:667,C:667,D:722,E:611,F:556,G:722,H:722,I:333,J:389,K:722,L:611,M:889,N:722,O:722,P:556,Q:722,R:667,S:556,T:611,U:722,V:722,W:944,X:722,Y:722,Z:611,bracketleft:333,backslash:278,bracketright:333,asciicircum:469,underscore:500,quoteleft:333,a:444,b:500,c:444,d:500,e:444,f:333,g:500,h:500,i:278,j:278,k:500,l:278,m:778,n:500,o:500,p:500,q:500,r:333,s:389,t:278,u:500,v:500,w:722,x:500,y:500,z:444,braceleft:480,bar:200,braceright:480,asciitilde:541,exclamdown:333,cent:500,sterling:500,fraction:167,yen:500,florin:500,section:500,currency:500,quotesingle:180,quotedblleft:444,guillemotleft:500,guilsinglleft:333,guilsinglright:333,fi:556,fl:556,endash:500,dagger:500,daggerdbl:500,periodcentered:250,paragraph:453,bullet:350,quotesinglbase:333,quotedblbase:444,quotedblright:444,guillemotright:500,ellipsis:1e3,perthousand:1e3,questiondown:444,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:889,ordfeminine:276,Lslash:611,Oslash:722,OE:889,ordmasculine:310,ae:667,dotlessi:278,lslash:278,oslash:500,oe:722,germandbls:500,Idieresis:333,eacute:444,abreve:444,uhungarumlaut:500,ecaron:444,Ydieresis:722,divide:564,Yacute:722,Acircumflex:722,aacute:444,Ucircumflex:722,yacute:500,scommaaccent:389,ecircumflex:444,Uring:722,Udieresis:722,aogonek:444,Uacute:722,uogonek:500,Edieresis:611,Dcroat:722,commaaccent:250,copyright:760,Emacron:611,ccaron:444,aring:444,Ncommaaccent:722,lacute:278,agrave:444,Tcommaaccent:611,Cacute:667,atilde:444,Edotaccent:611,scaron:389,scedilla:389,iacute:278,lozenge:471,Rcaron:667,Gcommaaccent:722,ucircumflex:500,acircumflex:444,Amacron:722,rcaron:333,ccedilla:444,Zdotaccent:611,Thorn:556,Omacron:722,Racute:667,Sacute:556,dcaron:588,Umacron:722,uring:500,threesuperior:300,Ograve:722,Agrave:722,Abreve:722,multiply:564,uacute:500,Tcaron:611,partialdiff:476,ydieresis:500,Nacute:722,icircumflex:278,Ecircumflex:611,adieresis:444,edieresis:444,cacute:444,nacute:500,umacron:500,Ncaron:722,Iacute:333,plusminus:564,brokenbar:200,registered:760,Gbreve:722,Idotaccent:333,summation:600,Egrave:611,racute:333,omacron:500,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:667,lcommaaccent:278,tcaron:326,eogonek:444,Uogonek:722,Aacute:722,Adieresis:722,egrave:444,zacute:444,iogonek:278,Oacute:722,oacute:500,amacron:444,sacute:389,idieresis:278,Ocircumflex:722,Ugrave:722,Delta:612,thorn:500,twosuperior:300,Odieresis:722,mu:500,igrave:278,ohungarumlaut:500,Eogonek:611,dcroat:500,threequarters:750,Scedilla:556,lcaron:344,Kcommaaccent:722,Lacute:611,trademark:980,edotaccent:444,Igrave:333,Imacron:333,Lcaron:611,onehalf:750,lessequal:549,ocircumflex:500,ntilde:500,Uhungarumlaut:722,Eacute:611,emacron:444,gbreve:500,onequarter:750,Scaron:556,Scommaaccent:556,Ohungarumlaut:722,degree:400,ograve:500,Ccaron:667,ugrave:500,radical:453,Dcaron:722,rcommaaccent:333,Ntilde:722,otilde:500,Rcommaaccent:667,Lcommaaccent:611,Atilde:722,Aogonek:722,Aring:722,Otilde:722,zdotaccent:444,Ecaron:611,Iogonek:333,kcommaaccent:500,minus:564,Icircumflex:333,ncaron:500,tcommaaccent:278,logicalnot:564,odieresis:500,udieresis:500,notequal:549,gcommaaccent:500,eth:500,zcaron:444,ncommaaccent:500,onesuperior:300,imacron:278,Euro:500},"Times-Bold":{space:250,exclam:333,quotedbl:555,numbersign:500,dollar:500,percent:1e3,ampersand:833,quoteright:333,parenleft:333,parenright:333,asterisk:500,plus:570,comma:250,hyphen:333,period:250,slash:278,zero:500,one:500,two:500,three:500,four:500,five:500,six:500,seven:500,eight:500,nine:500,colon:333,semicolon:333,less:570,equal:570,greater:570,question:500,at:930,A:722,B:667,C:722,D:722,E:667,F:611,G:778,H:778,I:389,J:500,K:778,L:667,M:944,N:722,O:778,P:611,Q:778,R:722,S:556,T:667,U:722,V:722,W:1e3,X:722,Y:722,Z:667,bracketleft:333,backslash:278,bracketright:333,asciicircum:581,underscore:500,quoteleft:333,a:500,b:556,c:444,d:556,e:444,f:333,g:500,h:556,i:278,j:333,k:556,l:278,m:833,n:556,o:500,p:556,q:556,r:444,s:389,t:333,u:556,v:500,w:722,x:500,y:500,z:444,braceleft:394,bar:220,braceright:394,asciitilde:520,exclamdown:333,cent:500,sterling:500,fraction:167,yen:500,florin:500,section:500,currency:500,quotesingle:278,quotedblleft:500,guillemotleft:500,guilsinglleft:333,guilsinglright:333,fi:556,fl:556,endash:500,dagger:500,daggerdbl:500,periodcentered:250,paragraph:540,bullet:350,quotesinglbase:333,quotedblbase:500,quotedblright:500,guillemotright:500,ellipsis:1e3,perthousand:1e3,questiondown:500,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:1e3,ordfeminine:300,Lslash:667,Oslash:778,OE:1e3,ordmasculine:330,ae:722,dotlessi:278,lslash:278,oslash:500,oe:722,germandbls:556,Idieresis:389,eacute:444,abreve:500,uhungarumlaut:556,ecaron:444,Ydieresis:722,divide:570,Yacute:722,Acircumflex:722,aacute:500,Ucircumflex:722,yacute:500,scommaaccent:389,ecircumflex:444,Uring:722,Udieresis:722,aogonek:500,Uacute:722,uogonek:556,Edieresis:667,Dcroat:722,commaaccent:250,copyright:747,Emacron:667,ccaron:444,aring:500,Ncommaaccent:722,lacute:278,agrave:500,Tcommaaccent:667,Cacute:722,atilde:500,Edotaccent:667,scaron:389,scedilla:389,iacute:278,lozenge:494,Rcaron:722,Gcommaaccent:778,ucircumflex:556,acircumflex:500,Amacron:722,rcaron:444,ccedilla:444,Zdotaccent:667,Thorn:611,Omacron:778,Racute:722,Sacute:556,dcaron:672,Umacron:722,uring:556,threesuperior:300,Ograve:778,Agrave:722,Abreve:722,multiply:570,uacute:556,Tcaron:667,partialdiff:494,ydieresis:500,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:500,edieresis:444,cacute:444,nacute:556,umacron:556,Ncaron:722,Iacute:389,plusminus:570,brokenbar:220,registered:747,Gbreve:778,Idotaccent:389,summation:600,Egrave:667,racute:444,omacron:500,Zacute:667,Zcaron:667,greaterequal:549,Eth:722,Ccedilla:722,lcommaaccent:278,tcaron:416,eogonek:444,Uogonek:722,Aacute:722,Adieresis:722,egrave:444,zacute:444,iogonek:278,Oacute:778,oacute:500,amacron:500,sacute:389,idieresis:278,Ocircumflex:778,Ugrave:722,Delta:612,thorn:556,twosuperior:300,Odieresis:778,mu:556,igrave:278,ohungarumlaut:500,Eogonek:667,dcroat:556,threequarters:750,Scedilla:556,lcaron:394,Kcommaaccent:778,Lacute:667,trademark:1e3,edotaccent:444,Igrave:389,Imacron:389,Lcaron:667,onehalf:750,lessequal:549,ocircumflex:500,ntilde:556,Uhungarumlaut:722,Eacute:667,emacron:444,gbreve:500,onequarter:750,Scaron:556,Scommaaccent:556,Ohungarumlaut:778,degree:400,ograve:500,Ccaron:722,ugrave:556,radical:549,Dcaron:722,rcommaaccent:444,Ntilde:722,otilde:500,Rcommaaccent:722,Lcommaaccent:667,Atilde:722,Aogonek:722,Aring:722,Otilde:778,zdotaccent:444,Ecaron:667,Iogonek:389,kcommaaccent:556,minus:570,Icircumflex:389,ncaron:556,tcommaaccent:333,logicalnot:570,odieresis:500,udieresis:556,notequal:549,gcommaaccent:500,eth:500,zcaron:444,ncommaaccent:556,onesuperior:300,imacron:278,Euro:500},"Times-BoldItalic":{space:250,exclam:389,quotedbl:555,numbersign:500,dollar:500,percent:833,ampersand:778,quoteright:333,parenleft:333,parenright:333,asterisk:500,plus:570,comma:250,hyphen:333,period:250,slash:278,zero:500,one:500,two:500,three:500,four:500,five:500,six:500,seven:500,eight:500,nine:500,colon:333,semicolon:333,less:570,equal:570,greater:570,question:500,at:832,A:667,B:667,C:667,D:722,E:667,F:667,G:722,H:778,I:389,J:500,K:667,L:611,M:889,N:722,O:722,P:611,Q:722,R:667,S:556,T:611,U:722,V:667,W:889,X:667,Y:611,Z:611,bracketleft:333,backslash:278,bracketright:333,asciicircum:570,underscore:500,quoteleft:333,a:500,b:500,c:444,d:500,e:444,f:333,g:500,h:556,i:278,j:278,k:500,l:278,m:778,n:556,o:500,p:500,q:500,r:389,s:389,t:278,u:556,v:444,w:667,x:500,y:444,z:389,braceleft:348,bar:220,braceright:348,asciitilde:570,exclamdown:389,cent:500,sterling:500,fraction:167,yen:500,florin:500,section:500,currency:500,quotesingle:278,quotedblleft:500,guillemotleft:500,guilsinglleft:333,guilsinglright:333,fi:556,fl:556,endash:500,dagger:500,daggerdbl:500,periodcentered:250,paragraph:500,bullet:350,quotesinglbase:333,quotedblbase:500,quotedblright:500,guillemotright:500,ellipsis:1e3,perthousand:1e3,questiondown:500,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:944,ordfeminine:266,Lslash:611,Oslash:722,OE:944,ordmasculine:300,ae:722,dotlessi:278,lslash:278,oslash:500,oe:722,germandbls:500,Idieresis:389,eacute:444,abreve:500,uhungarumlaut:556,ecaron:444,Ydieresis:611,divide:570,Yacute:611,Acircumflex:667,aacute:500,Ucircumflex:722,yacute:444,scommaaccent:389,ecircumflex:444,Uring:722,Udieresis:722,aogonek:500,Uacute:722,uogonek:556,Edieresis:667,Dcroat:722,commaaccent:250,copyright:747,Emacron:667,ccaron:444,aring:500,Ncommaaccent:722,lacute:278,agrave:500,Tcommaaccent:611,Cacute:667,atilde:500,Edotaccent:667,scaron:389,scedilla:389,iacute:278,lozenge:494,Rcaron:667,Gcommaaccent:722,ucircumflex:556,acircumflex:500,Amacron:667,rcaron:389,ccedilla:444,Zdotaccent:611,Thorn:611,Omacron:722,Racute:667,Sacute:556,dcaron:608,Umacron:722,uring:556,threesuperior:300,Ograve:722,Agrave:667,Abreve:667,multiply:570,uacute:556,Tcaron:611,partialdiff:494,ydieresis:444,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:500,edieresis:444,cacute:444,nacute:556,umacron:556,Ncaron:722,Iacute:389,plusminus:570,brokenbar:220,registered:747,Gbreve:722,Idotaccent:389,summation:600,Egrave:667,racute:389,omacron:500,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:667,lcommaaccent:278,tcaron:366,eogonek:444,Uogonek:722,Aacute:667,Adieresis:667,egrave:444,zacute:389,iogonek:278,Oacute:722,oacute:500,amacron:500,sacute:389,idieresis:278,Ocircumflex:722,Ugrave:722,Delta:612,thorn:500,twosuperior:300,Odieresis:722,mu:576,igrave:278,ohungarumlaut:500,Eogonek:667,dcroat:500,threequarters:750,Scedilla:556,lcaron:382,Kcommaaccent:667,Lacute:611,trademark:1e3,edotaccent:444,Igrave:389,Imacron:389,Lcaron:611,onehalf:750,lessequal:549,ocircumflex:500,ntilde:556,Uhungarumlaut:722,Eacute:667,emacron:444,gbreve:500,onequarter:750,Scaron:556,Scommaaccent:556,Ohungarumlaut:722,degree:400,ograve:500,Ccaron:667,ugrave:556,radical:549,Dcaron:722,rcommaaccent:389,Ntilde:722,otilde:500,Rcommaaccent:667,Lcommaaccent:611,Atilde:667,Aogonek:667,Aring:667,Otilde:722,zdotaccent:389,Ecaron:667,Iogonek:389,kcommaaccent:500,minus:606,Icircumflex:389,ncaron:556,tcommaaccent:278,logicalnot:606,odieresis:500,udieresis:556,notequal:549,gcommaaccent:500,eth:500,zcaron:389,ncommaaccent:556,onesuperior:300,imacron:278,Euro:500},"Times-Italic":{space:250,exclam:333,quotedbl:420,numbersign:500,dollar:500,percent:833,ampersand:778,quoteright:333,parenleft:333,parenright:333,asterisk:500,plus:675,comma:250,hyphen:333,period:250,slash:278,zero:500,one:500,two:500,three:500,four:500,five:500,six:500,seven:500,eight:500,nine:500,colon:333,semicolon:333,less:675,equal:675,greater:675,question:500,at:920,A:611,B:611,C:667,D:722,E:611,F:611,G:722,H:722,I:333,J:444,K:667,L:556,M:833,N:667,O:722,P:611,Q:722,R:611,S:500,T:556,U:722,V:611,W:833,X:611,Y:556,Z:556,bracketleft:389,backslash:278,bracketright:389,asciicircum:422,underscore:500,quoteleft:333,a:500,b:500,c:444,d:500,e:444,f:278,g:500,h:500,i:278,j:278,k:444,l:278,m:722,n:500,o:500,p:500,q:500,r:389,s:389,t:278,u:500,v:444,w:667,x:444,y:444,z:389,braceleft:400,bar:275,braceright:400,asciitilde:541,exclamdown:389,cent:500,sterling:500,fraction:167,yen:500,florin:500,section:500,currency:500,quotesingle:214,quotedblleft:556,guillemotleft:500,guilsinglleft:333,guilsinglright:333,fi:500,fl:500,endash:500,dagger:500,daggerdbl:500,periodcentered:250,paragraph:523,bullet:350,quotesinglbase:333,quotedblbase:556,quotedblright:556,guillemotright:500,ellipsis:889,perthousand:1e3,questiondown:500,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:889,AE:889,ordfeminine:276,Lslash:556,Oslash:722,OE:944,ordmasculine:310,ae:667,dotlessi:278,lslash:278,oslash:500,oe:667,germandbls:500,Idieresis:333,eacute:444,abreve:500,uhungarumlaut:500,ecaron:444,Ydieresis:556,divide:675,Yacute:556,Acircumflex:611,aacute:500,Ucircumflex:722,yacute:444,scommaaccent:389,ecircumflex:444,Uring:722,Udieresis:722,aogonek:500,Uacute:722,uogonek:500,Edieresis:611,Dcroat:722,commaaccent:250,copyright:760,Emacron:611,ccaron:444,aring:500,Ncommaaccent:667,lacute:278,agrave:500,Tcommaaccent:556,Cacute:667,atilde:500,Edotaccent:611,scaron:389,scedilla:389,iacute:278,lozenge:471,Rcaron:611,Gcommaaccent:722,ucircumflex:500,acircumflex:500,Amacron:611,rcaron:389,ccedilla:444,Zdotaccent:556,Thorn:611,Omacron:722,Racute:611,Sacute:500,dcaron:544,Umacron:722,uring:500,threesuperior:300,Ograve:722,Agrave:611,Abreve:611,multiply:675,uacute:500,Tcaron:556,partialdiff:476,ydieresis:444,Nacute:667,icircumflex:278,Ecircumflex:611,adieresis:500,edieresis:444,cacute:444,nacute:500,umacron:500,Ncaron:667,Iacute:333,plusminus:675,brokenbar:275,registered:760,Gbreve:722,Idotaccent:333,summation:600,Egrave:611,racute:389,omacron:500,Zacute:556,Zcaron:556,greaterequal:549,Eth:722,Ccedilla:667,lcommaaccent:278,tcaron:300,eogonek:444,Uogonek:722,Aacute:611,Adieresis:611,egrave:444,zacute:389,iogonek:278,Oacute:722,oacute:500,amacron:500,sacute:389,idieresis:278,Ocircumflex:722,Ugrave:722,Delta:612,thorn:500,twosuperior:300,Odieresis:722,mu:500,igrave:278,ohungarumlaut:500,Eogonek:611,dcroat:500,threequarters:750,Scedilla:500,lcaron:300,Kcommaaccent:667,Lacute:556,trademark:980,edotaccent:444,Igrave:333,Imacron:333,Lcaron:611,onehalf:750,lessequal:549,ocircumflex:500,ntilde:500,Uhungarumlaut:722,Eacute:611,emacron:444,gbreve:500,onequarter:750,Scaron:500,Scommaaccent:500,Ohungarumlaut:722,degree:400,ograve:500,Ccaron:667,ugrave:500,radical:453,Dcaron:722,rcommaaccent:389,Ntilde:667,otilde:500,Rcommaaccent:611,Lcommaaccent:556,Atilde:611,Aogonek:611,Aring:611,Otilde:722,zdotaccent:389,Ecaron:611,Iogonek:333,kcommaaccent:444,minus:675,Icircumflex:333,ncaron:500,tcommaaccent:278,logicalnot:675,odieresis:500,udieresis:500,notequal:549,gcommaaccent:500,eth:500,zcaron:389,ncommaaccent:500,onesuperior:300,imacron:278,Euro:500},ZapfDingbats:{space:278,a1:974,a2:961,a202:974,a3:980,a4:719,a5:789,a119:790,a118:791,a117:690,a11:960,a12:939,a13:549,a14:855,a15:911,a16:933,a105:911,a17:945,a18:974,a19:755,a20:846,a21:762,a22:761,a23:571,a24:677,a25:763,a26:760,a27:759,a28:754,a6:494,a7:552,a8:537,a9:577,a10:692,a29:786,a30:788,a31:788,a32:790,a33:793,a34:794,a35:816,a36:823,a37:789,a38:841,a39:823,a40:833,a41:816,a42:831,a43:923,a44:744,a45:723,a46:749,a47:790,a48:792,a49:695,a50:776,a51:768,a52:792,a53:759,a54:707,a55:708,a56:682,a57:701,a58:826,a59:815,a60:789,a61:789,a62:707,a63:687,a64:696,a65:689,a66:786,a67:787,a68:713,a69:791,a70:785,a71:791,a72:873,a73:761,a74:762,a203:762,a75:759,a204:759,a76:892,a77:892,a78:788,a79:784,a81:438,a82:138,a83:277,a84:415,a97:392,a98:392,a99:668,a100:668,a89:390,a90:390,a93:317,a94:317,a91:276,a92:276,a205:509,a85:509,a206:410,a86:410,a87:234,a88:234,a95:334,a96:334,a101:732,a102:544,a103:544,a104:910,a106:667,a107:760,a108:760,a112:776,a111:595,a110:694,a109:626,a120:788,a121:788,a122:788,a123:788,a124:788,a125:788,a126:788,a127:788,a128:788,a129:788,a130:788,a131:788,a132:788,a133:788,a134:788,a135:788,a136:788,a137:788,a138:788,a139:788,a140:788,a141:788,a142:788,a143:788,a144:788,a145:788,a146:788,a147:788,a148:788,a149:788,a150:788,a151:788,a152:788,a153:788,a154:788,a155:788,a156:788,a157:788,a158:788,a159:788,a160:894,a161:838,a163:1016,a164:458,a196:748,a165:924,a192:748,a166:918,a167:927,a168:928,a169:928,a170:834,a171:873,a172:828,a173:924,a162:924,a174:917,a175:930,a176:931,a177:463,a178:883,a179:836,a193:836,a180:867,a199:867,a181:696,a200:696,a182:874,a201:874,a183:760,a184:946,a197:771,a185:865,a194:771,a198:888,a186:967,a195:888,a187:831,a188:873,a189:927,a190:970,a191:918}},Dc={},Ec=1e3,Fc=function(){function d(a,b,c){this.lexer=a,this.allowStreams=b,this.xref=c,this.imageCache={},this.refill()}return d.prototype={refill:function(){this.buf1=this.lexer.getObj(),this.buf2=this.lexer.getObj()},shift:function(){A(this.buf2,"ID")?(this.buf1=this.buf2,this.buf2=null):(this.buf1=this.buf2,this.buf2=this.lexer.getObj())},tryShift:function(){try{return this.shift(),!0}catch(a){if(a instanceof ja)throw a;return!1}},getObj:function(b){var d=this.buf1;if(this.shift(),d instanceof za)switch(d.cmd){case"BI":return this.makeInlineImage(b);case"[":for(var e=[];!A(this.buf1,"]")&&!R(this.buf1);)e.push(this.getObj(b));return R(this.buf1)&&c("End of file inside array"),this.shift(),e;case"<<":for(var f=new Aa(this.xref);!A(this.buf1,">>")&&!R(this.buf1);)if(z(this.buf1)){var g=this.buf1.name;if(this.shift(),R(this.buf1))break;f.set(g,this.getObj(b))}else a("Malformed dictionary: key must be a name object"),this.shift();return R(this.buf1)&&c("End of file inside dictionary"),A(this.buf2,"stream")?this.allowStreams?this.makeStream(f,b):f:(this.shift(),f);default:return d}if(w(d)){var h=d;if(w(this.buf1)&&A(this.buf2,"R")){var i=new Ba(h,this.buf1);return this.shift(),this.shift(),i}return h}if(y(d)){var j=d;return b&&(j=b.decryptString(j)),j}return d},findDefaultInlineStreamEnd:function(a){for(var b,c,d,f,g=69,h=73,i=32,j=10,k=13,l=a.pos,m=0;-1!==(b=a.getByte());)if(0===m)m=b===g?1:0;else if(1===m)m=b===h?2:0;else if(e(2===m),b===i||b===j||b===k){for(d=5,f=a.peekBytes(d),c=0;d>c;c++)if(b=f[c],b!==j&&b!==k&&(i>b||b>127)){m=0;break}if(2===m)break}else m=0;return a.pos-4-l},findDCTDecodeInlineStreamEnd:function(a){for(var c,d,e,f=a.pos,g=!1;-1!==(c=a.getByte());)if(255===c){switch(a.getByte()){case 0:break;case 255:a.skip(-1);break;case 217:g=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:d=a.getUint16(),d>2?a.skip(d-2):a.skip(-2)}if(g)break}return e=a.pos-f,-1===c?(b("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead."),a.skip(-e),this.findDefaultInlineStreamEnd(a)):(this.inlineStreamSkipEI(a),e)},findASCII85DecodeInlineStreamEnd:function(a){for(var c,d,e=126,f=62,g=a.pos;-1!==(c=a.getByte());)if(c===e&&a.peekByte()===f){a.skip();break}return d=a.pos-g,-1===c?(b("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead."),a.skip(-d),this.findDefaultInlineStreamEnd(a)):(this.inlineStreamSkipEI(a), +d)},findASCIIHexDecodeInlineStreamEnd:function(a){for(var c,d,e=62,f=a.pos;-1!==(c=a.getByte())&&c!==e;);return d=a.pos-f,-1===c?(b("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead."),a.skip(-d),this.findDefaultInlineStreamEnd(a)):(this.inlineStreamSkipEI(a),d)},inlineStreamSkipEI:function(a){for(var b,c=69,d=73,e=0;-1!==(b=a.getByte());)if(0===e)e=b===c?1:0;else if(1===e)e=b===d?2:0;else if(2===e)break},makeInlineImage:function(a){for(var b=this.lexer,d=b.stream,e=new Aa(this.xref);!A(this.buf1,"ID")&&!R(this.buf1);){z(this.buf1)||c("Dictionary key must be a name object");var f=this.buf1.name;if(this.shift(),R(this.buf1))break;e.set(f,this.getObj(a))}var g,h=e.get("Filter","F");z(h)?g=h.name:C(h)&&z(h[0])&&(g=h[0].name);var i,j,k,l=d.pos;i="DCTDecode"===g||"DCT"===g?this.findDCTDecodeInlineStreamEnd(d):"ASCII85Decide"===g||"A85"===g?this.findASCII85DecodeInlineStreamEnd(d):"ASCIIHexDecode"===g||"AHx"===g?this.findASCIIHexDecodeInlineStreamEnd(d):this.findDefaultInlineStreamEnd(d);var m,n=d.makeSubStream(l,i,e);if(Ec>i){var o=n.getBytes();n.reset();var p=1,q=0;for(j=0,k=o.length;k>j;++j)p+=255&o[j],q+=p;if(m=q%65521<<16|p%65521,this.imageCache.adler32===m)return this.buf2=za.get("EI"),this.shift(),this.imageCache[m].reset(),this.imageCache[m]}return a&&(n=a.createStream(n,i)),n=this.filter(n,e,i),n.dict=e,void 0!==m&&(n.cacheKey="inline_"+i+"_"+m,this.imageCache[m]=n),this.buf2=za.get("EI"),this.shift(),n},makeStream:function(b,d){var e=this.lexer,f=e.stream;e.skipToNextLine();var g=f.pos-1,h=b.get("Length");if(w(h)||(a("Bad "+h+" attribute in stream"),h=0),f.pos=g+h,e.nextChar(),this.tryShift()&&A(this.buf2,"endstream"))this.shift();else{f.pos=g;for(var i,j,k=2048,l=9,m=[101,110,100,115,116,114,101,97,109],n=0,o=!1;f.pos=q)break;for(o=!1,i=0,j=0;q>i;i++){var r=p[i];if(r!==m[j])i-=j,j=0;else if(j++,j>=l){i++,o=!0;break}}if(o){n+=i-l,f.pos+=i-l;break}n+=q,f.pos+=q}o||c("Missing endstream"),h=n,e.nextChar(),this.shift(),this.shift()}return this.shift(),f=f.makeSubStream(g,h,b),d&&(f=d.createStream(f,h)),f=this.filter(f,b,h),f.dict=b,f},filter:function(a,b,d){var e=b.get("Filter","F"),f=b.get("DecodeParms","DP");if(z(e))return this.makeFilter(a,e.name,d,f);var g=d;if(C(e))for(var h=e,i=f,j=0,k=h.length;k>j;++j)e=h[j],z(e)||c("Bad filter name: "+e),f=null,C(i)&&j in i&&(f=i[j]),a=this.makeFilter(a,e.name,g,f),g=null;return a},makeFilter:function(a,c,d,e){if(0===a.dict.get("Length")&&!d)return b('Empty "'+c+'" stream.'),new _c(a);try{e&&this.xref&&(e=this.xref.fetchIfRef(e));var f=this.xref.stats.streamTypes;if("FlateDecode"===c||"Fl"===c)return f[Y.FLATE]=!0,e?new Rc(new Qc(a,d),d,e):new Qc(a,d);if("LZWDecode"===c||"LZW"===c){f[Y.LZW]=!0;var g=1;return e?(e.has("EarlyChange")&&(g=e.get("EarlyChange")),new Rc(new $c(a,d,g),d,e)):new $c(a,d,g)}return"DCTDecode"===c||"DCT"===c?(f[Y.DCT]=!0,new Sc(a,d,a.dict,this.xref)):"JPXDecode"===c||"JPX"===c?(f[Y.JPX]=!0,new Tc(a,d,a.dict)):"ASCII85Decode"===c||"A85"===c?(f[Y.A85]=!0,new Wc(a,d)):"ASCIIHexDecode"===c||"AHx"===c?(f[Y.AHX]=!0,new Xc(a,d)):"CCITTFaxDecode"===c||"CCF"===c?(f[Y.CCF]=!0,new Zc(a,d,e)):"RunLengthDecode"===c||"RL"===c?(f[Y.RL]=!0,new Yc(a,d)):"JBIG2Decode"===c?(f[Y.JBIG]=!0,new Uc(a,d,a.dict)):(b('filter "'+c+'" not supported yet'),a)}catch(h){if(h instanceof ja)throw h;return b('Invalid stream: "'+h+'"'),new _c(a)}}},d}(),Gc=function(){function a(a,b){this.stream=a,this.nextChar(),this.strBuf=[],this.knownCommands=b}function d(a){return a>=48&&57>=a?15&a:a>=65&&70>=a||a>=97&&102>=a?(15&a)+9:-1}a.isSpace=function(a){return 32===a||9===a||13===a||10===a};var e=[1,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,2,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];return a.prototype={nextChar:function(){return this.currentChar=this.stream.getByte()},peekChar:function(){return this.stream.peekByte()},getNumber:function(){var a=this.currentChar,d=!1,e=0,f=1;if(45===a?(f=-1,a=this.nextChar(),45===a&&(a=this.nextChar())):43===a&&(a=this.nextChar()),46===a&&(e=10,a=this.nextChar()),48>a||a>57)return c("Invalid number: "+String.fromCharCode(a)),0;for(var g=a-48,h=0,i=1;(a=this.nextChar())>=0;)if(a>=48&&57>=a){var j=a-48;d?h=10*h+j:(0!==e&&(e*=10),g=10*g+j)}else if(46===a){if(0!==e)break;e=1}else if(45===a)b("Badly formated number");else{if(69!==a&&101!==a)break;if(a=this.peekChar(),43===a||45===a)i=45===a?-1:1,this.nextChar();else if(48>a||a>57)break;d=!0}return 0!==e&&(g/=e),d&&(g*=Math.pow(10,i*h)),f*g},getString:function(){var a=1,c=!1,d=this.strBuf;d.length=0;for(var e=this.nextChar();;){var f=!1;switch(0|e){case-1:b("Unterminated string"),c=!0;break;case 40:++a,d.push("(");break;case 41:0===--a?(this.nextChar(),c=!0):d.push(")");break;case 92:switch(e=this.nextChar()){case-1:b("Unterminated string"),c=!0;break;case 110:d.push("\n");break;case 114:d.push("\r");break;case 116:d.push(" ");break;case 98:d.push("\b");break;case 102:d.push("\f");break;case 92:case 40:case 41:d.push(String.fromCharCode(e));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:var g=15&e;e=this.nextChar(),f=!0,e>=48&&55>=e&&(g=(g<<3)+(15&e),e=this.nextChar(),e>=48&&55>=e&&(f=!1,g=(g<<3)+(15&e))),d.push(String.fromCharCode(g));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:d.push(String.fromCharCode(e))}break;default:d.push(String.fromCharCode(e))}if(c)break;f||(e=this.nextChar())}return d.join("")},getName:function(){var a,f=this.strBuf;for(f.length=0;(a=this.nextChar())>=0&&!e[a];)if(35===a){a=this.nextChar();var g=d(a);if(-1!==g){var h=d(this.nextChar());-1===h&&c("Illegal digit in hex char in name: "+h),f.push(String.fromCharCode(g<<4|h))}else f.push("#",String.fromCharCode(a))}else f.push(String.fromCharCode(a));return f.length>127&&b("name token is longer than allowed by the spec: "+f.length),ya.get(f.join(""))},getHexString:function(){var a=this.strBuf;a.length=0;for(var c,f,g=this.currentChar,h=!0;;){if(0>g){b("Unterminated hex string");break}if(62===g){this.nextChar();break}if(1!==e[g]){if(h){if(c=d(g),-1===c){b('Ignoring invalid character "'+g+'" in hex string'),g=this.nextChar();continue}}else{if(f=d(g),-1===f){b('Ignoring invalid character "'+g+'" in hex string'),g=this.nextChar();continue}a.push(String.fromCharCode(c<<4|f))}h=!h,g=this.nextChar()}else g=this.nextChar()}return a.join("")},getObj:function(){for(var a=!1,b=this.currentChar;;){if(0>b)return Dc;if(a)(10===b||13===b)&&(a=!1);else if(37===b)a=!0;else if(1!==e[b])break;b=this.nextChar()}switch(0|b){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:return this.nextChar(),za.get("[");case 93:return this.nextChar(),za.get("]");case 60:return b=this.nextChar(),60===b?(this.nextChar(),za.get("<<")):this.getHexString();case 62:return b=this.nextChar(),62===b?(this.nextChar(),za.get(">>")):za.get(">");case 123:return this.nextChar(),za.get("{");case 125:return this.nextChar(),za.get("}");case 41:c("Illegal character: "+b)}for(var d=String.fromCharCode(b),f=this.knownCommands,g=f&&void 0!==f[d];(b=this.nextChar())>=0&&!e[b];){var h=d+String.fromCharCode(b);if(g&&void 0===f[h])break;128===d.length&&c("Command token too long: "+d.length),d=h,g=f&&void 0!==f[d]}return"true"===d?!0:"false"===d?!1:"null"===d?null:za.get(d)},skipToNextLine:function(){for(var a=this.currentChar;a>=0;){if(13===a){a=this.nextChar(),10===a&&this.nextChar();break}if(10===a){this.nextChar();break}a=this.nextChar()}}},a}(),Hc={create:function(a){function b(a,b){var c=j.get(a);if(w(c)&&(b?c>=0:c>0))return c;throw new Error('The "'+a+'" parameter in the linearization dictionary is invalid.')}function c(){var a,b,c=j.get("H");if(C(c)&&(2===(a=c.length)||4===a)){for(var d=0;a>d;d++)if(!(w(b=c[d])&&b>0))throw new Error("Hint ("+d+") in the linearization dictionary is invalid.");return c}throw new Error("Hint array in the linearization dictionary is invalid.")}var d,e,f=new Fc(new Gc(a),!1,null),g=f.getObj(),h=f.getObj(),i=f.getObj(),j=f.getObj();if(!(w(g)&&w(h)&&A(i,"obj")&&B(j)&&x(d=j.get("Linearized"))&&d>0))return null;if((e=b("L"))!==a.length)throw new Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:e,hints:c(),objectNumberFirst:b("O"),endFirst:b("E"),numPages:b("N"),mainXRefEntriesOffset:b("T"),pageFirst:j.has("P")?b("P",!0):0}}},Ic=function(){function a(a){this.lexer=a,this.operators=[],this.token=null,this.prev=null}return a.prototype={nextToken:function(){this.prev=this.token,this.token=this.lexer.getToken()},accept:function(a){return this.token.type===a?(this.nextToken(),!0):!1},expect:function(a){return this.accept(a)?!0:void c("Unexpected symbol: found "+this.token.type+" expected "+a+".")},parse:function(){return this.nextToken(),this.expect(Jc.LBRACE),this.parseBlock(),this.expect(Jc.RBRACE),this.operators},parseBlock:function(){for(;;)if(this.accept(Jc.NUMBER))this.operators.push(this.prev.value);else if(this.accept(Jc.OPERATOR))this.operators.push(this.prev.value);else{if(!this.accept(Jc.LBRACE))return;this.parseCondition()}},parseCondition:function(){var a=this.operators.length;if(this.operators.push(null,null),this.parseBlock(),this.expect(Jc.RBRACE),this.accept(Jc.IF))this.operators[a]=this.operators.length,this.operators[a+1]="jz";else if(this.accept(Jc.LBRACE)){var b=this.operators.length;this.operators.push(null,null);var d=this.operators.length;this.parseBlock(),this.expect(Jc.RBRACE),this.expect(Jc.IFELSE),this.operators[b]=this.operators.length,this.operators[b+1]="j",this.operators[a]=d,this.operators[a+1]="jz"}else c("PS Function: error parsing conditional.")}},a}(),Jc={LBRACE:0,RBRACE:1,NUMBER:2,OPERATOR:3,IF:4,IFELSE:5},Kc=function(){function a(a,b){this.type=a,this.value=b}var b={};return a.getOperator=function(c){var d=b[c];return d?d:b[c]=new a(Jc.OPERATOR,c)},a.LBRACE=new a(Jc.LBRACE,"{"),a.RBRACE=new a(Jc.RBRACE,"}"),a.IF=new a(Jc.IF,"IF"),a.IFELSE=new a(Jc.IFELSE,"IFELSE"),a}(),Lc=function(){function a(a){this.stream=a,this.nextChar(),this.strBuf=[]}return a.prototype={nextChar:function(){return this.currentChar=this.stream.getByte()},getToken:function(){for(var a=!1,b=this.currentChar;;){if(0>b)return Dc;if(a)(10===b||13===b)&&(a=!1);else if(37===b)a=!0;else if(!Gc.isSpace(b))break;b=this.nextChar()}switch(0|b){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return new Kc(Jc.NUMBER,this.getNumber());case 123:return this.nextChar(),Kc.LBRACE;case 125:return this.nextChar(),Kc.RBRACE}var c=this.strBuf;for(c.length=0,c[0]=String.fromCharCode(b);(b=this.nextChar())>=0&&(b>=65&&90>=b||b>=97&&122>=b);)c.push(String.fromCharCode(b));var d=c.join("");switch(d.toLowerCase()){case"if":return Kc.IF;case"ifelse":return Kc.IFELSE;default:return Kc.getOperator(d)}},getNumber:function(){var a=this.currentChar,b=this.strBuf;for(b.length=0,b[0]=String.fromCharCode(a);(a=this.nextChar())>=0&&(a>=48&&57>=a||45===a||46===a);)b.push(String.fromCharCode(a));var d=parseFloat(b.join(""));return isNaN(d)&&c("Invalid floating point number: "+d),d}},a}(),Mc=function(){function a(a,b,c,d){this.bytes=a instanceof Uint8Array?a:new Uint8Array(a),this.start=b||0,this.pos=this.start,this.end=b+c||this.bytes.length,this.dict=d}return a.prototype={get length(){return this.end-this.start},get isEmpty(){return 0===this.length},getByte:function(){return this.pos>=this.end?-1:this.bytes[this.pos++]},getUint16:function(){var a=this.getByte(),b=this.getByte();return-1===a||-1===b?-1:(a<<8)+b},getInt32:function(){var a=this.getByte(),b=this.getByte(),c=this.getByte(),d=this.getByte();return(a<<24)+(b<<16)+(c<<8)+d},getBytes:function(a){var b=this.bytes,c=this.pos,d=this.end;if(!a)return b.subarray(c,d);var e=c+a;return e>d&&(e=d),this.pos=e,b.subarray(c,e)},peekByte:function(){var a=this.getByte();return this.pos--,a},peekBytes:function(a){var b=this.getBytes(a);return this.pos-=b.length,b},skip:function(a){a||(a=1),this.pos+=a},reset:function(){this.pos=this.start},moveStart:function(){this.start=this.pos},makeSubStream:function(b,c,d){return new a(this.bytes.buffer,b,c,d)},isStream:!0},a}(),Nc=function(){function a(a){for(var b=a.length,c=new Uint8Array(b),d=0;b>d;++d)c[d]=a.charCodeAt(d);Mc.call(this,c)}return a.prototype=Mc.prototype,a}(),Oc=function(){function a(a){if(this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=b,this.minBufferLength=512,a)for(;this.minBufferLengthc;)c*=2;var d=new Uint8Array(c);return d.set(b),this.buffer=d},getByte:function(){for(var a=this.pos;this.bufferLength<=a;){if(this.eof)return-1;this.readBlock()}return this.buffer[this.pos++]},getUint16:function(){var a=this.getByte(),b=this.getByte();return-1===a||-1===b?-1:(a<<8)+b},getInt32:function(){var a=this.getByte(),b=this.getByte(),c=this.getByte(),d=this.getByte();return(a<<24)+(b<<16)+(c<<8)+d},getBytes:function(a){var b,c=this.pos;if(a){for(this.ensureBuffer(c+a),b=c+a;!this.eof&&this.bufferLengthd&&(b=d)}else{for(;!this.eof;)this.readBlock();b=this.bufferLength}return this.pos=b,this.buffer.subarray(c,b)},peekByte:function(){var a=this.getByte();return this.pos--,a},peekBytes:function(a){var b=this.getBytes(a);return this.pos-=b.length,b},makeSubStream:function(a,b,c){for(var d=a+b;this.bufferLength<=d&&!this.eof;)this.readBlock();return new Mc(this.buffer,a,b,c)},skip:function(a){a||(a=1),this.pos+=a},reset:function(){this.pos=0},getBaseStreams:function(){return this.str&&this.str.getBaseStreams?this.str.getBaseStreams():[]}},a}(),Pc=function(){function a(a){this.streams=a,Oc.call(this,null)}return a.prototype=Object.create(Oc.prototype),a.prototype.readBlock=function(){var a=this.streams;if(0===a.length)return void(this.eof=!0);var b=a.shift(),c=b.getBytes(),d=this.bufferLength,e=d+c.length,f=this.ensureBuffer(e);f.set(c,d),this.bufferLength=e},a.prototype.getBaseStreams=function(){for(var a=[],b=0,c=this.streams.length;c>b;b++){var d=this.streams[b];d.getBaseStreams&&na.appendToArray(a,d.getBaseStreams())}return a},a}(),Qc=function(){function a(a,b){this.str=a,this.dict=a.dict;var d=a.getByte(),e=a.getByte();(-1===d||-1===e)&&c("Invalid header in flate stream: "+d+", "+e),8!==(15&d)&&c("Unknown compression method in flate stream: "+d+", "+e),((d<<8)+e)%31!==0&&c("Bad FCHECK in flate stream: "+d+", "+e),32&e&&c("FDICT bit set in flate stream: "+d+", "+e),this.codeSize=0,this.codeBuf=0,Oc.call(this,b)}var b=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),e=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),f=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],g=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];return a.prototype=Object.create(Oc.prototype),a.prototype.getBits=function(a){for(var b,d=this.str,e=this.codeSize,f=this.codeBuf;a>e;)-1===(b=d.getByte())&&c("Bad encoding in flate stream"),f|=b<>a,this.codeSize=e-=a,b},a.prototype.getCode=function(a){for(var b,d=this.str,e=a[0],f=a[1],g=this.codeSize,h=this.codeBuf;f>g&&-1!==(b=d.getByte());)h|=b<>16,k=65535&i;return(1>j||j>g)&&c("Bad encoding in flate stream"),this.codeBuf=h>>j,this.codeSize=g-j,k},a.prototype.generateHuffmanTable=function(a){var b,c=a.length,d=0;for(b=0;c>b;++b)a[b]>d&&(d=a[b]);for(var e=1<=g;++g,h<<=1,i<<=1)for(var j=0;c>j;++j)if(a[j]===g){var k=0,l=h;for(b=0;g>b;++b)k=k<<1|1&l,l>>=1;for(b=k;e>b;b+=i)f[b]=g<<16|j;++h}return[f,d]},a.prototype.readBlock=function(){var a,h,i=this.str,j=this.getBits(3);if(1&j&&(this.eof=!0),j>>=1,0!==j){var k,l;if(1===j)k=f,l=g;else if(2===j){var m,n=this.getBits(5)+257,o=this.getBits(5)+1,p=this.getBits(4)+4,q=new Uint8Array(b.length);for(m=0;p>m;++m)q[b[m]]=this.getBits(3);var r=this.generateHuffmanTable(q);h=0,m=0;for(var s,t,u,v=n+o,w=new Uint8Array(v);v>m;){var x=this.getCode(r);if(16===x)s=2,t=3,u=h;else if(17===x)s=3,t=3,u=h=0;else{if(18!==x){w[m++]=h=x;continue}s=7,t=11,u=h=0}for(var y=this.getBits(s)+t;y-- >0;)w[m++]=u}k=this.generateHuffmanTable(w.subarray(0,n)),l=this.generateHuffmanTable(w.subarray(n,v))}else c("Unknown block type in flate stream");a=this.buffer;for(var z=a?a.length:0,A=this.bufferLength;;){var B=this.getCode(k);if(256>B)A+1>=z&&(a=this.ensureBuffer(A+1),z=a.length),a[A++]=B;else{if(256===B)return void(this.bufferLength=A);B-=257,B=d[B];var C=B>>16;C>0&&(C=this.getBits(C)),h=(65535&B)+C,B=this.getCode(l),B=e[B],C=B>>16,C>0&&(C=this.getBits(C));var D=(65535&B)+C;A+h>=z&&(a=this.ensureBuffer(A+h),z=a.length);for(var E=0;h>E;++E,++A)a[A]=a[A-D]}}}else{var F;-1===(F=i.getByte())&&c("Bad block header in flate stream");var G=F;-1===(F=i.getByte())&&c("Bad block header in flate stream"),G|=F<<8,-1===(F=i.getByte())&&c("Bad block header in flate stream");var H=F;-1===(F=i.getByte())&&c("Bad block header in flate stream"),H|=F<<8,H===(65535&~G)||0===G&&0===H||c("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var I=this.bufferLength;a=this.ensureBuffer(I+G);var J=I+G;if(this.bufferLength=J,0===G)-1===i.peekByte()&&(this.eof=!0);else for(var K=I;J>K;++K){if(-1===(F=i.getByte())){this.eof=!0;break}a[K]=F}}},a}(),Rc=function(){function a(a,b,d){var e=this.predictor=d.get("Predictor")||1;if(1>=e)return a;2!==e&&(10>e||e>15)&&c("Unsupported predictor: "+e),2===e?this.readBlock=this.readBlockTiff:this.readBlock=this.readBlockPng,this.str=a,this.dict=a.dict;var f=this.colors=d.get("Colors")||1,g=this.bits=d.get("BitsPerComponent")||8,h=this.columns=d.get("Columns")||1;return this.pixBytes=f*g+7>>3,this.rowBytes=h*f*g+7>>3,Oc.call(this,b),this}return a.prototype=Object.create(Oc.prototype),a.prototype.readBlockTiff=function(){var a=this.rowBytes,b=this.bufferLength,c=this.ensureBuffer(b+a),d=this.bits,e=this.colors,f=this.str.getBytes(a);if(this.eof=!f.length,!this.eof){var g,h=0,i=0,j=0,k=0,l=b;if(1===d)for(g=0;a>g;++g){var m=f[g];h=h<<8|m,c[l++]=255&(m^h>>e),h&=65535}else if(8===d){for(g=0;e>g;++g)c[l++]=f[g];for(;a>g;++g)c[l]=c[l-e]+f[g],l++}else{var n=new Uint8Array(e+1),o=(1<g;++g)for(var s=0;e>s;++s)d>j&&(h=h<<8|255&f[p++],j+=8),n[s]=n[s]+(h>>j-d)&o,j-=d,i=i<=8&&(c[q++]=i>>k-8&255,k-=8);k>0&&(c[q++]=(i<<8-k)+(h&(1<<8-k)-1))}this.bufferLength+=a}},a.prototype.readBlockPng=function(){var a=this.rowBytes,b=this.pixBytes,d=this.str.getByte(),e=this.str.getBytes(a);if(this.eof=!e.length,!this.eof){var f=this.bufferLength,g=this.ensureBuffer(f+a),h=g.subarray(f-a,f);0===h.length&&(h=new Uint8Array(a));var i,j,k,l=f;switch(d){case 0:for(i=0;a>i;++i)g[l++]=e[i];break;case 1:for(i=0;b>i;++i)g[l++]=e[i];for(;a>i;++i)g[l]=g[l-b]+e[i]&255,l++;break;case 2:for(i=0;a>i;++i)g[l++]=h[i]+e[i]&255;break;case 3:for(i=0;b>i;++i)g[l++]=(h[i]>>1)+e[i];for(;a>i;++i)g[l]=(h[i]+g[l-b]>>1)+e[i]&255,l++;break;case 4:for(i=0;b>i;++i)j=h[i],k=e[i],g[l++]=j+k;for(;a>i;++i){j=h[i];var m=h[i-b],n=g[l-b],o=n+j-m,p=o-n;0>p&&(p=-p);var q=o-j;0>q&&(q=-q);var r=o-m;0>r&&(r=-r),k=e[i],q>=p&&r>=p?g[l++]=n+k:r>=q?g[l++]=j+k:g[l++]=m+k}break;default:c("Unsupported predictor: "+d)}this.bufferLength+=a}},a}(),Sc=function(){function a(a,b,c,d){for(var e;-1!==(e=a.getByte());)if(255===e){a.skip(-1);break}this.stream=a,this.maybeLength=b,this.dict=c,Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),Object.defineProperty(a.prototype,"bytes",{get:function(){return g(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),a.prototype.ensureBuffer=function(a){if(!this.bufferLength)try{var b=new gd;if(this.forceRGB&&this.dict&&C(this.dict.get("Decode"))){for(var d=this.dict.get("Decode"),e=this.dict.get("BitsPerComponent")||8,f=d.length,g=new Int32Array(f),h=!1,i=(1<j;j+=2)g[j]=256*(d[j+1]-d[j])|0,g[j+1]=d[j]*i|0,(256!==g[j]||0!==g[j+1])&&(h=!0);h&&(b.decodeTransform=g)}b.parse(this.bytes);var k=b.getData(this.drawWidth,this.drawHeight,this.forceRGB);this.buffer=k,this.bufferLength=k.length,this.eof=!0}catch(l){c("JPEG error: "+l)}},a.prototype.getBytes=function(a){return this.ensureBuffer(),this.buffer},a.prototype.getIR=function(){return PDFJS.createObjectURL(this.bytes,"image/jpeg")},a.prototype.isNativelySupported=function(a,b){var c=Xa.parse(this.dict.get("ColorSpace","CS"),a,b);return("DeviceGray"===c.name||"DeviceRGB"===c.name)&&c.isDefaultDecode(this.dict.get("Decode","D"))},a.prototype.isNativelyDecodable=function(a,b){var c=Xa.parse(this.dict.get("ColorSpace","CS"),a,b);return(1===c.numComps||3===c.numComps)&&c.isDefaultDecode(this.dict.get("Decode","D"))},a}(),Tc=function(){function a(a,b,c){this.stream=a,this.maybeLength=b,this.dict=c,Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),Object.defineProperty(a.prototype,"bytes",{get:function(){return g(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),a.prototype.ensureBuffer=function(a){if(!this.bufferLength){var b=new hd;b.parse(this.bytes);var c=b.width,d=b.height,e=b.componentsCount,f=b.tiles.length;if(1===f)this.buffer=b.tiles[0].items;else{for(var g=new Uint8Array(c*d*e),h=0;f>h;h++)for(var i=b.tiles[h],j=i.width,k=i.height,l=i.left,m=i.top,n=i.items,o=0,p=(c*m+l)*e,q=c*e,r=j*e,s=0;k>s;s++){var t=n.subarray(o,o+r);g.set(t,p),o+=r,p+=q}this.buffer=g}this.bufferLength=this.buffer.length,this.eof=!0}},a}(),Uc=function(){function a(a,b,c){this.stream=a,this.maybeLength=b,this.dict=c,Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),Object.defineProperty(a.prototype,"bytes",{get:function(){return g(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),a.prototype.ensureBuffer=function(a){if(!this.bufferLength){var c=new id,d=[],e=this.dict.xref,f=e.fetchIfRef(this.dict.get("DecodeParms"));if(C(f)&&(f.length>1&&b("JBIG2 - 'DecodeParms' array with multiple elements not supported."),f=e.fetchIfRef(f[0])),f&&f.has("JBIG2Globals")){var g=f.get("JBIG2Globals"),h=g.getBytes();d.push({data:h,start:0,end:h.length})}d.push({data:this.bytes,start:0,end:this.bytes.length});for(var i=c.parseChunks(d),j=i.length,k=0;j>k;k++)i[k]^=255;this.buffer=i,this.bufferLength=j,this.eof=!0}},a}(),Vc=function(){function a(a,b,c){this.str=a,this.dict=a.dict,this.decrypt=c,this.nextChunk=null,this.initialized=!1,Oc.call(this,b)}var b=512;return a.prototype=Object.create(Oc.prototype),a.prototype.readBlock=function(){var a;if(this.initialized?a=this.nextChunk:(a=this.str.getBytes(b),this.initialized=!0),!a||0===a.length)return void(this.eof=!0);this.nextChunk=this.str.getBytes(b);var c=this.nextChunk&&this.nextChunk.length>0,d=this.decrypt;a=d(a,!c);var e,f=this.bufferLength,g=a.length,h=this.ensureBuffer(f+g);for(e=0;g>e;e++)h[f++]=a[e];this.bufferLength=f},a}(),Wc=function(){function a(a,b){this.str=a,this.dict=a.dict,this.input=new Uint8Array(5),b&&(b=.8*b),Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),a.prototype.readBlock=function(){for(var a=126,b=122,c=-1,d=this.str,e=d.getByte();Gc.isSpace(e);)e=d.getByte();if(e===c||e===a)return void(this.eof=!0);var f,g,h=this.bufferLength;if(e===b){for(f=this.ensureBuffer(h+4),g=0;4>g;++g)f[h+g]=0;this.bufferLength+=4}else{var i=this.input;for(i[0]=e,g=1;5>g;++g){for(e=d.getByte();Gc.isSpace(e);)e=d.getByte();if(i[g]=e,e===c||e===a)break}if(f=this.ensureBuffer(h+g-1),this.bufferLength+=g-1,5>g){for(;5>g;++g)i[g]=117;this.eof=!0}var j=0;for(g=0;5>g;++g)j=85*j+(i[g]-33);for(g=3;g>=0;--g)f[h+g]=255&j,j>>=8}},a}(),Xc=function(){function a(a,b){this.str=a,this.dict=a.dict,this.firstDigit=-1,b&&(b=.5*b),Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),a.prototype.readBlock=function(){var a=8e3,b=this.str.getBytes(a);if(!b.length)return void(this.eof=!0);for(var c=b.length+1>>1,d=this.ensureBuffer(this.bufferLength+c),e=this.bufferLength,f=this.firstDigit,g=0,h=b.length;h>g;g++){var i,j=b[g];if(j>=48&&57>=j)i=15&j;else{if(!(j>=65&&70>=j||j>=97&&102>=j)){if(62===j){this.eof=!0;break}continue}i=(15&j)+9}0>f?f=i:(d[e++]=f<<4|i,f=-1)}f>=0&&this.eof&&(d[e++]=f<<4,f=-1),this.firstDigit=f,this.bufferLength=e},a}(),Yc=function(){function a(a,b){this.str=a,this.dict=a.dict,Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),a.prototype.readBlock=function(){var a=this.str.getBytes(2);if(!a||a.length<2||128===a[0])return void(this.eof=!0);var b,c=this.bufferLength,d=a[0];if(128>d){if(b=this.ensureBuffer(c+d+1),b[c++]=a[1],d>0){var e=this.str.getBytes(d);b.set(e,c),c+=d}}else{d=257-d;var f=a[1];b=this.ensureBuffer(c+d+1);for(var g=0;d>g;g++)b[c++]=f}this.bufferLength=c},a}(),Zc=function(){function b(a,b,c){this.str=a,this.dict=a.dict,c=c||Aa.empty,this.encoding=c.get("K")||0,this.eoline=c.get("EndOfLine")||!1,this.byteAlign=c.get("EncodedByteAlign")||!1,this.columns=c.get("Columns")||1728,this.rows=c.get("Rows")||0;var d=c.get("EndOfBlock");(null===d||void 0===d)&&(d=!0),this.eoblock=d,this.black=c.get("BlackIs1")||!1,this.codingLine=new Uint32Array(this.columns+1),this.refLine=new Uint32Array(this.columns+2),this.codingLine[0]=this.columns,this.codingPos=0,this.row=0,this.nextLine2D=this.encoding<0,this.inputBits=0,this.inputBuf=0,this.outputBits=0;for(var e;0===(e=this.lookBits(12));)this.eatBits(1);1===e&&this.eatBits(12),this.encoding>0&&(this.nextLine2D=!this.lookBits(1),this.eatBits(1)),Oc.call(this,b)}var c=-2,d=0,e=1,f=2,g=3,h=4,i=5,j=6,k=7,l=8,m=[[-1,-1],[-1,-1],[7,l],[7,k],[6,j],[6,j],[6,i],[6,i],[4,d],[4,d],[4,d],[4,d],[4,d],[4,d],[4,d],[4,d],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f]],n=[[-1,-1],[12,c],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],o=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,21],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,24],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7]],p=[[-1,-1],[-1,-1],[12,c],[12,c],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],[11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[12,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],q=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[11,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],r=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]]; +return b.prototype=Object.create(Oc.prototype),b.prototype.readBlock=function(){for(;!this.eof;){var a=this.lookChar();this.ensureBuffer(this.bufferLength+1),this.buffer[this.bufferLength++]=a}},b.prototype.addPixels=function(b,c){var d=this.codingLine,e=this.codingPos;b>d[e]&&(b>this.columns&&(a("row is wrong length"),this.err=!0,b=this.columns),1&e^c&&++e,d[e]=b),this.codingPos=e},b.prototype.addPixelsNeg=function(b,c){var d=this.codingLine,e=this.codingPos;if(b>d[e])b>this.columns&&(a("row is wrong length"),this.err=!0,b=this.columns),1&e^c&&++e,d[e]=b;else if(bb&&(a("invalid code"),this.err=!0,b=0);e>0&&b=64);do s+=t=this.getWhiteCode();while(t>=64)}else{do r+=t=this.getWhiteCode();while(t>=64);do s+=t=this.getBlackCode();while(t>=64)}for(this.addPixels(p[this.codingPos]+r,c),p[this.codingPos]0?--b:++b;o[b]<=p[this.codingPos]&&o[b]0?--b:++b;o[b]<=p[this.codingPos]&&o[b]0?--b:++b;o[b]<=p[this.codingPos]&&o[b]=64)}else do r+=t=this.getWhiteCode();while(t>=64);this.addPixels(p[this.codingPos]+r,c),c^=1}var u=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(r=this.lookBits(12),this.eoline)for(;r!==Dc&&1!==r;)this.eatBits(1),r=this.lookBits(12);else for(;0===r;)this.eatBits(1),r=this.lookBits(12);1===r?(this.eatBits(12),u=!0):r===Dc&&(this.eof=!0)}else this.eof=!0;if(!this.eof&&this.encoding>0&&(this.nextLine2D=!this.lookBits(1),this.eatBits(1)),this.eoblock&&u&&this.byteAlign){if(r=this.lookBits(12),1===r){if(this.eatBits(12),this.encoding>0&&(this.lookBits(1),this.eatBits(1)),this.encoding>=0)for(n=0;4>n;++n)r=this.lookBits(12),1!==r&&a("bad rtc code: "+r),this.eatBits(12),this.encoding>0&&(this.lookBits(1),this.eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){for(;;){if(r=this.lookBits(13),r===Dc)return this.eof=!0,null;if(r>>1===1)break;this.eatBits(1)}this.eatBits(12),this.encoding>0&&(this.eatBits(1),this.nextLine2D=!(1&r))}p[0]>0?this.outputBits=p[this.codingPos=0]:this.outputBits=p[this.codingPos=1],this.row++}var v;if(this.outputBits>=8)v=1&this.codingPos?0:255,this.outputBits-=8,0===this.outputBits&&p[this.codingPos]m?(v<<=m,1&this.codingPos||(v|=255>>8-m),this.outputBits-=m,m=0):(v<<=this.outputBits,1&this.codingPos||(v|=255>>8-this.outputBits),m-=this.outputBits,this.outputBits=0,p[this.codingPos]0&&(v<<=m,m=0));while(m)}return this.black&&(v^=255),v},b.prototype.findTableCode=function(a,b,c,d){for(var e=d||0,f=a;b>=f;++f){var g=this.lookBits(f);if(g===Dc)return[!0,1,!1];if(b>f&&(g<<=b-f),!e||g>=e){var h=c[g-e];if(h[0]===f)return this.eatBits(f),[!0,h[1],!0]}}return[!1,0,!1]},b.prototype.getTwoDimCode=function(){var b,c=0;if(this.eoblock){if(c=this.lookBits(7),b=m[c],b&&b[0]>0)return this.eatBits(b[0]),b[1]}else{var d=this.findTableCode(1,7,m);if(d[0]&&d[2])return d[1]}return a("Bad two dim code"),Dc},b.prototype.getWhiteCode=function(){var b,c=0;if(this.eoblock){if(c=this.lookBits(12),c===Dc)return 1;if(b=c>>5===0?n[c]:o[c>>3],b[0]>0)return this.eatBits(b[0]),b[1]}else{var d=this.findTableCode(1,9,o);if(d[0])return d[1];if(d=this.findTableCode(11,12,n),d[0])return d[1]}return a("bad white code"),this.eatBits(1),1},b.prototype.getBlackCode=function(){var b,c;if(this.eoblock){if(b=this.lookBits(13),b===Dc)return 1;if(c=b>>7===0?p[b]:b>>9===0&&b>>7!==0?q[(b>>1)-64]:r[b>>7],c[0]>0)return this.eatBits(c[0]),c[1]}else{var d=this.findTableCode(2,6,r);if(d[0])return d[1];if(d=this.findTableCode(7,12,q,64),d[0])return d[1];if(d=this.findTableCode(10,13,p),d[0])return d[1]}return a("bad black code"),this.eatBits(1),1},b.prototype.lookBits=function(a){for(var b;this.inputBits>16-a;this.inputBuf=(this.inputBuf<<8)+b,this.inputBits+=8}return this.inputBuf>>this.inputBits-a&65535>>16-a},b.prototype.eatBits=function(a){(this.inputBits-=a)<0&&(this.inputBits=0)},b}(),$c=function(){function a(a,b,c){this.str=a,this.dict=a.dict,this.cachedData=0,this.bitsCached=0;for(var d=4096,e={earlyChange:c,codeLength:9,nextCode:258,dictionaryValues:new Uint8Array(d),dictionaryLengths:new Uint16Array(d),dictionaryPrevCodes:new Uint16Array(d),currentSequence:new Uint8Array(d),currentSequenceLength:0},f=0;256>f;++f)e.dictionaryValues[f]=f,e.dictionaryLengths[f]=1;this.lzwState=e,Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),a.prototype.readBits=function(a){for(var b=this.bitsCached,c=this.cachedData;a>b;){var d=this.str.getByte();if(-1===d)return this.eof=!0,null;c=c<<8|d,b+=8}return this.bitsCached=b-=a,this.cachedData=c,this.lastCode=null,c>>>b&(1<a;a++){var t=this.readBits(m),u=p>0;if(256>t)o[0]=t,p=1;else{if(!(t>=258)){if(256===t){m=9,i=258,p=0;continue}this.eof=!0,delete this.lzwState;break}if(i>t)for(p=k[t],b=p-1,c=t;b>=0;b--)o[b]=j[c],c=l[c];else o[p++]=o[0]}if(u&&(l[i]=n,k[i]=k[n]+1,j[i]=o[0],i++,m=i+h&i+h-1?m:0|Math.min(Math.log(i+h)/.6931471805599453+1,12)),n=t,q+=p,q>e){do e+=f;while(q>e);s=this.ensureBuffer(this.bufferLength+e)}for(b=0;p>b;b++)s[r++]=o[b]}g.nextCode=i,g.codeLength=m,g.prevCode=n,g.currentSequenceLength=p,this.bufferLength=r}},a}(),_c=function(){function a(){Mc.call(this,new Uint8Array(0))}return a.prototype=Mc.prototype,a}(),ad=function(){function a(a){this.name=a,this.terminated=!1,this._capability=G()}return a.prototype={get finished(){return this._capability.promise},finish:function(){this._capability.resolve()},terminate:function(){this.terminated=!0},ensureNotTerminated:function(){if(this.terminated)throw new Error("Worker task was terminated")}},a}(),bd=PDFJS.WorkerMessageHandler={setup:function(c){function d(){if(j)throw new Error("Worker was terminated")}function e(a){l.push(a)}function f(a){a.finish();var b=l.indexOf(a);l.splice(b,1)}function g(a){var b=G(),c=function(){var a=i.ensureDoc("numPages"),c=i.ensureDoc("fingerprint"),e=i.ensureXRef("encrypt");Promise.all([a,c,e]).then(function(a){var c={numPages:a[0],fingerprint:a[1],encrypted:!!a[2]};b.resolve(c)},d)},d=function(a){b.reject(a)};return i.ensureDoc("checkHeader",[]).then(function(){i.ensureDoc("parseStartXRef",[]).then(function(){i.ensureDoc("parse",[a]).then(c,d)},d)},d),b.promise}function h(a){var d,e=G(),f=a.source,g=a.disableRange;if(f.data){try{d=new ua(f.data,f.password),e.resolve(d)}catch(h){e.reject(h)}return e.promise}if(f.chunkedViewerLoading){try{d=new va(f,c),e.resolve(d)}catch(h){e.reject(h)}return e.promise}var i=new pa(f.url,{httpHeaders:f.httpHeaders,withCredentials:f.withCredentials}),j=[],l=i.requestFull({onHeadersReceived:function(){if(!g){var a=i.getRequestXhr(l);if("bytes"===a.getResponseHeader("Accept-Ranges")){var b=a.getResponseHeader("Content-Encoding")||"identity";if("identity"===b){var h=a.getResponseHeader("Content-Length");if(h=parseInt(h,10),w(h)&&(f.length=h,!(2*sa>=h))){i.isStreamingRequest(l)?f.disableAutoFetch=!0:i.abortRequest(l);try{d=new va(f,c),e.resolve(d)}catch(j){e.reject(j)}k=null}}}}},onProgressiveData:f.disableStream?null:function(a){return d?void d.sendProgressiveData(a):void j.push(a)},onDone:function(a){if(!d){var c;if(null===a){var g=0,h=0;j.forEach(function(a){g+=a.byteLength}),f.length&&g!==f.length&&b("reported HTTP length is different from actual");var i=new Uint8Array(g);j.forEach(function(a){i.set(new Uint8Array(a),h),h+=a.byteLength}),c=i.buffer}else c=a.chunk;try{d=new ua(c,f.password),e.resolve(d)}catch(l){e.reject(l)}k=null}},onError:function(a){var b;404===a?(b=new ga('Missing PDF "'+f.url+'".'),c.send("MissingPDF",b)):(b=new ha("Unexpected server response ("+a+') while retrieving PDF "'+f.url+'".',a),c.send("UnexpectedResponse",b)),k=null},onProgress:function(a){c.send("DocProgress",{loaded:a.loaded,total:a.lengthComputable?a.total:f.length})}});return k=function(){i.abortRequest(l)},e.promise}var i,j=!1,k=null,l=[];c.on("test",function(a){if(!(a instanceof Uint8Array))return void c.send("test",!1);var b=255===a[0];c.postMessageTransfers=b;var d=new XMLHttpRequest,e="response"in d;try{d.responseType}catch(f){e=!1}return e?void c.send("test",{supportTypedArray:!0,supportTransfers:b}):void c.send("test",!1)}),c.on("GetDocRequest",function(a){var b=function(a){d(),c.send("GetDoc",{pdfInfo:a})},e=function(a){a instanceof da?a.code===ca.NEED_PASSWORD?c.send("NeedPassword",a):a.code===ca.INCORRECT_PASSWORD&&c.send("IncorrectPassword",a):a instanceof fa?c.send("InvalidPDF",a):a instanceof ga?c.send("MissingPDF",a):a instanceof ha?c.send("UnexpectedResponse",a):c.send("UnknownError",new ea(a.message,a.toString()))};d(),PDFJS.maxImageSize=void 0===a.maxImageSize?-1:a.maxImageSize,PDFJS.disableFontFace=a.disableFontFace,PDFJS.disableCreateObjectURL=a.disableCreateObjectURL,PDFJS.verbosity=a.verbosity,PDFJS.cMapUrl=void 0===a.cMapUrl?null:a.cMapUrl,PDFJS.cMapPacked=a.cMapPacked===!0,h(a).then(function(a){if(j)throw a.terminate(),new Error("Worker was terminated");i=a,c.send("PDFManagerReady",null),i.onLoadedStream().then(function(a){c.send("DataLoaded",{length:a.bytes.byteLength})})}).then(function f(){d(),g(!1).then(b,function(a){return d(),a instanceof ka?(i.requestLoadedStream(),void i.onLoadedStream().then(function(){d(),g(!0).then(b,e)})):(a instanceof da&&i.passwordChanged().then(f),void e(a))},e)},e)}),c.on("GetPage",function(a){return i.getPage(a.pageIndex).then(function(a){var b=i.ensure(a,"rotate"),c=i.ensure(a,"ref"),d=i.ensure(a,"view");return Promise.all([b,c,d]).then(function(a){return{rotate:a[0],ref:a[1],view:a[2]}})})}),c.on("GetPageIndex",function(a){var b=new Ba(a.ref.num,a.ref.gen),c=i.pdfDocument.catalog;return c.getPageIndex(b)}),c.on("GetDestinations",function(a){return i.ensureCatalog("destinations")}),c.on("GetDestination",function(a){return i.ensureCatalog("getDestination",[a.id])}),c.on("GetAttachments",function(a){return i.ensureCatalog("attachments")}),c.on("GetJavaScript",function(a){return i.ensureCatalog("javaScript")}),c.on("GetOutline",function(a){return i.ensureCatalog("documentOutline")}),c.on("GetMetadata",function(a){return Promise.all([i.ensureDoc("documentInfo"),i.ensureCatalog("metadata")])}),c.on("GetData",function(a){return i.requestLoadedStream(),i.onLoadedStream().then(function(a){return a.bytes})}),c.on("GetStats",function(a){return i.pdfDocument.xref.stats}),c.on("UpdatePassword",function(a){i.updatePassword(a)}),c.on("GetAnnotations",function(a){return i.getPage(a.pageIndex).then(function(a){return i.ensure(a,"getAnnotationsData",[])})}),c.on("RenderPageRequest",function(b){var d=b.pageIndex;i.getPage(d).then(function(g){var h=new ad("RenderPageRequest: page "+d);e(h);var i=d+1,j=Date.now();g.getOperatorList(c,h,b.intent).then(function(b){f(h),a("page="+i+" - getOperatorList: time="+(Date.now()-j)+"ms, len="+b.fnArray.length)},function(a){if(f(h),!h.terminated){var d,e="worker.js: while trying to getPage() and getOperatorList()";d="string"==typeof a?{message:a,stack:e}:"object"==typeof a?{message:a.message||a.toString(),stack:a.stack||e}:{message:"Unknown exception type: "+typeof a,stack:e},c.send("PageError",{pageNum:i,error:d,intent:b.intent})}})})},this),c.on("GetTextContent",function(b){var c=b.pageIndex;return i.getPage(c).then(function(b){var d=new ad("GetTextContent: page "+c);e(d);var g=c+1,h=Date.now();return b.extractTextContent(d).then(function(b){return f(d),a("text indexing: page="+g+" - time="+(Date.now()-h)+"ms"),b},function(a){if(f(d),!d.terminated)throw a})})}),c.on("Cleanup",function(a){return i.cleanup()}),c.on("Terminate",function(a){j=!0,i&&(i.terminate(),i=null),k&&k();var b=[];return l.forEach(function(a){b.push(a.finished),a.terminate()}),Promise.all(b).then(function(){})})}},cd={},dd={log:function(){var a=Array.prototype.slice.call(arguments);S.postMessage({action:"console_log",data:a})},error:function(){var a=Array.prototype.slice.call(arguments);throw S.postMessage({action:"console_error",data:a}),"pdf.js execution error"},time:function(a){cd[a]=Date.now()},timeEnd:function(a){var b=cd[a];b||c("Unknown timer name "+a),this.log("Timer:",a,Date.now()-b)}};if("undefined"==typeof window){"console"in S||(S.console=dd),PDFJS.UnsupportedManager.listen(function(a){S.postMessage({action:"_unsupported_feature",data:a})});var ed=new H("worker_processor",this);bd.setup(ed)}var fd=function(){function a(a,b,c){this.data=a,this.bp=b,this.dataEnd=c,this.chigh=a[b],this.clow=0,this.byteIn(),this.chigh=this.chigh<<7&65535|this.clow>>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}var b=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];return a.prototype={byteIn:function(){var a=this.data,b=this.bp;if(255===a[b]){var c=a[b+1];c>143?(this.clow+=65280,this.ct=8):(b++,this.clow+=a[b]<<9,this.ct=7,this.bp=b)}else b++,this.clow+=b65535&&(this.chigh+=this.clow>>16,this.clow&=65535)},readBit:function(a,c){var d,e=a[c]>>1,f=1&a[c],g=b[e],h=g.qe,i=this.a-h;if(this.chighi?(i=h,d=f,e=g.nmps):(i=h,d=1^f,1===g.switchFlag&&(f=d),e=g.nlps);else{if(this.chigh-=h,0!==(32768&i))return this.a=i,f;h>i?(d=1^f,1===g.switchFlag&&(f=d),e=g.nlps):(d=f,e=g.nmps)}do 0===this.ct&&this.byteIn(),i<<=1,this.chigh=this.chigh<<1&65535|this.clow>>15&1,this.clow=this.clow<<1&65535,this.ct--;while(0===(32768&i));return this.a=i,a[c]=e<<1|f,d}},a}(),gd=function(){function a(){}function b(a,b){for(var c,d,e=0,f=[],g=16;g>0&&!a[g-1];)g--;f.push({children:[],index:0});var h,i=f[0];for(c=0;g>c;c++){for(d=0;d0;)i=f.pop();for(i.index++,f.push(i);f.length<=c;)f.push(h={children:[],index:0}),i.children[i.index]=h.children,i=h;e++}g>c+1&&(f.push(h={children:[],index:0}),i.children[i.index]=h.children,i=h)}return f[0].children}function c(a,b,c){return 64*((a.blocksPerLine+1)*b+c)}function d(a,b,d,e,f,g,i,j,k){function l(){if(H>0)return H--,G>>H&1;if(G=a[b++],255===G){var c=a[b++];if(c)throw"unexpected marker: "+(G<<8|c).toString(16)}return H=7,G>>>7}function m(a){for(var b=a;;){if(b=b[l()],"number"==typeof b)return b;if("object"!=typeof b)throw"invalid huffman sequence"}}function n(a){for(var b=0;a>0;)b=b<<1|l(),a--;return b}function o(a){if(1===a)return 1===l()?1:-1;var b=n(a);return b>=1<e;){var f=m(a.huffmanTableAC),g=15&f,i=f>>4;if(0!==g){e+=i;var j=h[e];a.blockData[b+j]=o(g),e++}else{if(15>i)break;e+=16}}}function q(a,b){var c=m(a.huffmanTableDC),d=0===c?0:o(c)<0)return void I--;for(var c=g,d=i;d>=c;){var e=m(a.huffmanTableAC),f=15&e,j=e>>4;if(0!==f){c+=j;var l=h[c];a.blockData[b+l]=o(f)*(1<j){I=n(j)+(1<=e;){var p=h[e];switch(J){case 0:if(d=m(a.huffmanTableAC),c=15&d,j=d>>4,0===c)15>j?(I=n(j)+(1<N;){for(y=0;K>y;y++)e[y].pred=0;if(I=0,1===K)for(x=e[0],B=0;f>B;B++)v(x,C,N),N++;else for(B=0;f>B;B++){for(y=0;K>y;y++)for(x=e[y],O=x.h,P=x.v,z=0;P>z;z++)for(A=0;O>A;A++)u(x,C,N,z,A);N++}if(H=0,L=a[b]<<8|a[b+1],65280>=L)throw"marker was not found";if(!(L>=65488&&65495>=L))break;b+=2}return b-F}function e(a,b,c){for(var d,e,f,g,h,q,r,s,t,u,v,w,x,y,z,A,B,C=a.quantizationTable,D=a.blockData,E=0;64>E;E+=8)t=D[b+E],u=D[b+E+1],v=D[b+E+2],w=D[b+E+3],x=D[b+E+4],y=D[b+E+5],z=D[b+E+6],A=D[b+E+7],t*=C[E],0!==(u|v|w|x|y|z|A)?(u*=C[E+1],v*=C[E+2],w*=C[E+3],x*=C[E+4],y*=C[E+5],z*=C[E+6],A*=C[E+7],d=o*t+128>>8,e=o*x+128>>8,f=v,g=z,h=p*(u-A)+128>>8,s=p*(u+A)+128>>8,q=w<<4,r=y<<4,d=d+e+1>>1,e=d-e,B=f*n+g*m+128>>8,f=f*m-g*n+128>>8,g=B,h=h+r+1>>1,r=h-r,s=s+q+1>>1,q=s-q,d=d+g+1>>1,g=d-g,e=e+f+1>>1,f=e-f,B=h*l+s*k+2048>>12,h=h*k-s*l+2048>>12,s=B,B=q*j+r*i+2048>>12,q=q*i-r*j+2048>>12,r=B,c[E]=d+s,c[E+7]=d-s,c[E+1]=e+r,c[E+6]=e-r,c[E+2]=f+q,c[E+5]=f-q,c[E+3]=g+h,c[E+4]=g-h):(B=o*t+512>>10,c[E]=B,c[E+1]=B,c[E+2]=B,c[E+3]=B,c[E+4]=B,c[E+5]=B,c[E+6]=B,c[E+7]=B);for(var F=0;8>F;++F)t=c[F],u=c[F+8],v=c[F+16],w=c[F+24],x=c[F+32],y=c[F+40],z=c[F+48],A=c[F+56],0!==(u|v|w|x|y|z|A)?(d=o*t+2048>>12,e=o*x+2048>>12,f=v,g=z,h=p*(u-A)+2048>>12,s=p*(u+A)+2048>>12,q=w,r=y,d=(d+e+1>>1)+4112,e=d-e,B=f*n+g*m+2048>>12,f=f*m-g*n+2048>>12,g=B,h=h+r+1>>1,r=h-r,s=s+q+1>>1,q=s-q,d=d+g+1>>1,g=d-g,e=e+f+1>>1,f=e-f,B=h*l+s*k+2048>>12,h=h*k-s*l+2048>>12,s=B,B=q*j+r*i+2048>>12,q=q*i-r*j+2048>>12,r=B,t=d+s,A=d-s,u=e+r,z=e-r,v=f+q,y=f-q,w=g+h,x=g-h,t=16>t?0:t>=4080?255:t>>4,u=16>u?0:u>=4080?255:u>>4,v=16>v?0:v>=4080?255:v>>4,w=16>w?0:w>=4080?255:w>>4,x=16>x?0:x>=4080?255:x>>4,y=16>y?0:y>=4080?255:y>>4,z=16>z?0:z>=4080?255:z>>4,A=16>A?0:A>=4080?255:A>>4,D[b+F]=t,D[b+F+8]=u,D[b+F+16]=v,D[b+F+24]=w,D[b+F+32]=x,D[b+F+40]=y,D[b+F+48]=z,D[b+F+56]=A):(B=o*t+8192>>14,B=-2040>B?0:B>=2024?255:B+2056>>4,D[b+F]=B,D[b+F+8]=B,D[b+F+16]=B,D[b+F+24]=B,D[b+F+32]=B,D[b+F+40]=B,D[b+F+48]=B,D[b+F+56]=B)}function f(a,b){for(var d=b.blocksPerLine,f=b.blocksPerColumn,g=new Int16Array(64),h=0;f>h;h++)for(var i=0;d>i;i++){var j=c(b,h,i);e(b,j,g)}return b.blockData}function g(a){return 0>=a?0:a>=255?255:a}var h=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),i=4017,j=799,k=3406,l=2276,m=1567,n=3784,o=5793,p=2896;return a.prototype={parse:function(a){function c(){var b=a[k]<<8|a[k+1];return k+=2,b}function e(){var b=c(),d=a.subarray(k,k+b-2);return k+=d.length,d}function g(a){for(var b=Math.ceil(a.samplesPerLine/8/a.maxH),c=Math.ceil(a.scanLines/8/a.maxV),d=0;dk;){var y=a[k++],z=new Uint16Array(64);if(y>>4===0)for(s=0;64>s;s++)v=h[s],z[v]=a[k++];else{if(y>>4!==1)throw"DQT: invalid table spec";for(s=0;64>s;s++)v=h[s],z[v]=c()}n[15&y]=z}break;case 65472:case 65473:case 65474:if(i)throw"Only single frame JPEGs supported";c(),i={},i.extended=65473===q,i.progressive=65474===q,i.precision=a[k++],i.scanLines=c(),i.samplesPerLine=c(),i.components=[],i.componentIds={};var A,B=a[k++],C=0,D=0;for(r=0;B>r;r++){A=a[k];var E=a[k+1]>>4,F=15&a[k+1];E>C&&(C=E),F>D&&(D=F);var G=a[k+2];t=i.components.push({h:E,v:F,quantizationTable:n[G]}),i.componentIds[A]=t-1,k+=3}i.maxH=C,i.maxV=D,g(i);break;case 65476:var H=c();for(r=2;H>r;){var I=a[k++],J=new Uint8Array(16),K=0;for(s=0;16>s;s++,k++)K+=J[s]=a[k];var L=new Uint8Array(K);for(s=0;K>s;s++,k++)L[s]=a[k];r+=17+K,(I>>4===0?p:o)[15&I]=b(J,L)}break;case 65501:c(),j=c();break;case 65498:var M,N=(c(),a[k++]),O=[];for(r=0;N>r;r++){var P=i.componentIds[a[k++]];M=i.components[P];var Q=a[k++];M.huffmanTableDC=p[Q>>4],M.huffmanTableAC=o[15&Q],O.push(M)}var R=a[k++],S=a[k++],T=a[k++],U=d(a,k,i,O,j,R,S,T>>4,15&T);k+=U;break;case 65535:255!==a[k]&&k--;break;default:if(255===a[k-3]&&a[k-2]>=192&&a[k-2]<=254){k-=3;break}throw"unknown JPEG marker "+q.toString(16)}q=c()}for(this.width=i.samplesPerLine,this.height=i.scanLines,this.jfif=l,this.adobe=m,this.components=[],r=0;ri;i++){for(c=this.components[i],d=c.scaleX*n,e=c.scaleY*o,p=i,m=c.output,f=c.blocksPerLine+1<<3,g=0;a>g;g++)j=0|g*d,t[g]=(j&u)<<3|7&j;for(h=0;b>h;h++)for(j=0|h*e,l=f*(j&u)|(7&j)<<3,g=0;a>g;g++)s[p]=m[l+t[g]],p+=q}var v=this.decodeTransform;if(v)for(i=0;r>i;)for(j=0,k=0;q>j;j++,i++,k+=2)s[i]=(s[i]*v[k]>>8)+v[k+1];return s},_isColorConversionNeeded:function(){return this.adobe&&this.adobe.transformCode?!0:3===this.numComponents?!0:!1},_convertYccToRgb:function(a){for(var b,c,d,e=0,f=a.length;f>e;e+=3)b=a[e],c=a[e+1],d=a[e+2],a[e]=g(b-179.456+1.402*d),a[e+1]=g(b+135.459-.344*c-.714*d),a[e+2]=g(b-226.816+1.772*c);return a},_convertYcckToRgb:function(a){for(var b,c,d,e,f=0,h=0,i=a.length;i>h;h+=4){b=a[h],c=a[h+1],d=a[h+2],e=a[h+3];var j=-122.67195406894+c*(-660635669420364e-19*c+.000437130475926232*d-54080610064599e-18*b+.00048449797120281*e-.154362151871126)+d*(-.000957964378445773*d+.000817076911346625*b-.00477271405408747*e+1.53380253221734)+b*(.000961250184130688*b-.00266257332283933*e+.48357088451265)+e*(-.000336197177618394*e+.484791561490776),k=107.268039397724+c*(219927104525741e-19*c-.000640992018297945*d+.000659397001245577*b+.000426105652938837*e-.176491792462875)+d*(-.000778269941513683*d+.00130872261408275*b+.000770482631801132*e-.151051492775562)+b*(.00126935368114843*b-.00265090189010898*e+.25802910206845)+e*(-.000318913117588328*e-.213742400323665),l=-20.810012546947+c*(-.000570115196973677*c-263409051004589e-19*d+.0020741088115012*b-.00288260236853442*e+.814272968359295)+d*(-153496057440975e-19*d-.000132689043961446*b+.000560833691242812*e-.195152027534049)+b*(.00174418132927582*b-.00255243321439347*e+.116935020465145)+e*(-.000343531996510555*e+.24165260232407);a[f++]=g(j),a[f++]=g(k),a[f++]=g(l)}return a},_convertYcckToCmyk:function(a){for(var b,c,d,e=0,f=a.length;f>e;e+=4)b=a[e],c=a[e+1],d=a[e+2],a[e]=g(434.456-b-1.402*d),a[e+1]=g(119.541-b+.344*c+.714*d),a[e+2]=g(481.816-b-1.772*c);return a},_convertCmykToRgb:function(a){for(var b,c,d,e,f=0,g=-16581375,h=1/255/255,i=0,j=a.length;j>i;i+=4){b=a[i],c=a[i+1],d=a[i+2],e=a[i+3];var k=b*(-4.387332384609988*b+54.48615194189176*c+18.82290502165302*d+212.25662451639585*e-72734.4411664936)+c*(1.7149763477362134*c-5.6096736904047315*d-17.873870861415444*e-1401.7366389350734)+d*(-2.5217340131683033*d-21.248923337353073*e+4465.541406466231)-e*(21.86122147463605*e+48317.86113160301),l=b*(8.841041422036149*b+60.118027045597366*c+6.871425592049007*d+31.159100130055922*e-20220.756542821975)+c*(-15.310361306967817*c+17.575251261109482*d+131.35250912493976*e-48691.05921601825)+d*(4.444339102852739*d+9.8632861493405*e-6341.191035517494)-e*(20.737325471181034*e+47890.15695978492),m=b*(.8842522430003296*b+8.078677503112928*c+30.89978309703729*d-.23883238689178934*e-3616.812083916688)+c*(10.49593273432072*c+63.02378494754052*d+50.606957656360734*e-28620.90484698408)+d*(.03296041114873217*d+115.60384449646641*e-49363.43385999684)-e*(22.33816807309886*e+45932.16563550634);a[f++]=k>=0?255:g>=k?0:255+k*h|0,a[f++]=l>=0?255:g>=l?0:255+l*h|0,a[f++]=m>=0?255:g>=m?0:255+m*h|0}return a},getData:function(a,b,c){if(this.numComponents>4)throw"Unsupported color mode";var d=this._getLinearizedBlockData(a,b);if(3===this.numComponents)return this._convertYccToRgb(d);if(4===this.numComponents){if(this._isColorConversionNeeded())return c?this._convertYcckToRgb(d):this._convertYcckToCmyk(d);if(c)return this._convertCmykToRgb(d)}return d}},a}(),hd=function(){function c(){this.failOnCorruptedImage=!1}function d(a,b){a.x0=Math.ceil(b.XOsiz/a.XRsiz),a.x1=Math.ceil(b.Xsiz/a.XRsiz),a.y0=Math.ceil(b.YOsiz/a.YRsiz),a.y1=Math.ceil(b.Ysiz/a.YRsiz),a.width=a.x1-a.x0,a.height=a.y1-a.y0}function e(a,b){for(var c,d=a.SIZ,e=[],f=Math.ceil((d.Xsiz-d.XTOsiz)/d.XTsiz),g=Math.ceil((d.Ysiz-d.YTOsiz)/d.YTsiz),h=0;g>h;h++)for(var i=0;f>i;i++)c={},c.tx0=Math.max(d.XTOsiz+i*d.XTsiz,d.XOsiz),c.ty0=Math.max(d.YTOsiz+h*d.YTsiz,d.YOsiz),c.tx1=Math.min(d.XTOsiz+(i+1)*d.XTsiz,d.Xsiz),c.ty1=Math.min(d.YTOsiz+(h+1)*d.YTsiz,d.Ysiz),c.width=c.tx1-c.tx0,c.height=c.ty1-c.ty0,c.components=[],e.push(c);a.tiles=e;for(var j=d.Csiz,k=0,l=j;l>k;k++)for(var m=b[k],n=0,o=e.length;o>n;n++){var p={};c=e[n],p.tcx0=Math.ceil(c.tx0/m.XRsiz),p.tcy0=Math.ceil(c.ty0/m.YRsiz),p.tcx1=Math.ceil(c.tx1/m.XRsiz),p.tcy1=Math.ceil(c.ty1/m.YRsiz),p.width=p.tcx1-p.tcx0,p.height=p.tcy1-p.tcy0,c.components[k]=p}}function f(a,b,c){var d=b.codingStyleParameters,e={};return d.entropyCoderWithCustomPrecincts?(e.PPx=d.precinctsSizes[c].PPx,e.PPy=d.precinctsSizes[c].PPy):(e.PPx=15,e.PPy=15),e.xcb_=c>0?Math.min(d.xcb,e.PPx-1):Math.min(d.xcb,e.PPx),e.ycb_=c>0?Math.min(d.ycb,e.PPy-1):Math.min(d.ycb,e.PPy),e}function g(a,b,c){var d=1<b.trx0?Math.ceil(b.trx1/d)-Math.floor(b.trx0/d):0,j=b.try1>b.try0?Math.ceil(b.try1/e)-Math.floor(b.try0/e):0,k=i*j;b.precinctParameters={precinctWidth:d,precinctHeight:e,numprecinctswide:i,numprecinctshigh:j,numprecincts:k,precinctWidthInSubband:g,precinctHeightInSubband:h}}function h(a,b,c){var d,e,f,g,h=c.xcb_,i=c.ycb_,j=1<>h,m=b.tby0>>i,n=b.tbx1+j-1>>h,o=b.tby1+k-1>>i,p=b.resolution.precinctParameters,q=[],r=[];for(e=m;o>e;e++)for(d=l;n>d;d++){f={cbx:d,cby:e,tbx0:j*d,tby0:k*e,tbx1:j*(d+1),tby1:k*(e+1)},f.tbx0_=Math.max(b.tbx0,f.tbx0),f.tby0_=Math.max(b.tby0,f.tby0),f.tbx1_=Math.min(b.tbx1,f.tbx1),f.tby1_=Math.min(b.tby1,f.tby1);var s=Math.floor((f.tbx0_-b.tbx0)/p.precinctWidthInSubband),t=Math.floor((f.tby0_-b.tby0)/p.precinctHeightInSubband);if(g=s+t*p.numprecinctswide,f.precinctNumber=g,f.subbandType=b.type,f.Lblock=3,!(f.tbx1_<=f.tbx0_||f.tby1_<=f.tby0_)){q.push(f);var u=r[g];void 0!==u?(du.cbxMax&&(u.cbxMax=d),eu.cbyMax&&(u.cbyMax=e)):r[g]=u={cbxMin:d,cbyMin:e,cbxMax:d,cbyMax:e},f.precinct=u}}b.codeblockParameters={codeblockWidth:h,codeblockHeight:i,numcodeblockwide:n-l+1,numcodeblockhigh:o-m+1},b.codeblocks=q,b.precincts=r}function i(a,b,c){for(var d=[],e=a.subbands,f=0,g=e.length;g>f;f++)for(var h=e[f],i=h.codeblocks,j=0,k=i.length;k>j;j++){var l=i[j];l.precinctNumber===b&&d.push(l)}return{layerNumber:c,codeblocks:d}}function j(a){for(var b=a.SIZ,c=a.currentTile.index,d=a.tiles[c],e=d.codingStyleDefaultParameters.layersCount,f=b.Csiz,g=0,h=0;f>h;h++)g=Math.max(g,d.components[h].codingStyleParameters.decompositionLevelsCount);var j=0,k=0,l=0,m=0;this.nextPacket=function(){for(;e>j;j++){for(;g>=k;k++){for(;f>l;l++){var a=d.components[l];if(!(k>a.codingStyleParameters.decompositionLevelsCount)){for(var b=a.resolutions[k],c=b.precinctParameters.numprecincts;c>m;){var h=i(b,m,j);return m++,h}m=0}}l=0}k=0}throw new Error("JPX Error: Out of packets")}}function k(a){for(var b=a.SIZ,c=a.currentTile.index,d=a.tiles[c],e=d.codingStyleDefaultParameters.layersCount,f=b.Csiz,g=0,h=0;f>h;h++)g=Math.max(g,d.components[h].codingStyleParameters.decompositionLevelsCount);var j=0,k=0,l=0,m=0;this.nextPacket=function(){for(;g>=j;j++){for(;e>k;k++){for(;f>l;l++){var a=d.components[l];if(!(j>a.codingStyleParameters.decompositionLevelsCount)){for(var b=a.resolutions[j],c=b.precinctParameters.numprecincts;c>m;){var h=i(b,m,k);return m++, +h}m=0}}l=0}k=0}throw new Error("JPX Error: Out of packets")}}function m(a){var b,c,d,e,f=a.SIZ,g=a.currentTile.index,h=a.tiles[g],j=h.codingStyleDefaultParameters.layersCount,k=f.Csiz,l=0;for(d=0;k>d;d++){var m=h.components[d];l=Math.max(l,m.codingStyleParameters.decompositionLevelsCount)}var n=new Int32Array(l+1);for(c=0;l>=c;++c){var o=0;for(d=0;k>d;++d){var p=h.components[d].resolutions;c=c;c++){for(;ed;d++){var a=h.components[d];if(!(c>a.codingStyleParameters.decompositionLevelsCount)){var f=a.resolutions[c],g=f.precinctParameters.numprecincts;if(!(e>=g)){for(;j>b;){var m=i(f,e,b);return b++,m}b=0}}}d=0}e=0}throw new Error("JPX Error: Out of packets")}}function p(a){var b=a.SIZ,c=a.currentTile.index,d=a.tiles[c],e=d.codingStyleDefaultParameters.layersCount,f=b.Csiz,g=s(d),h=g,j=0,k=0,l=0,m=0,n=0;this.nextPacket=function(){for(;nl;l++){for(var a=d.components[l],b=a.codingStyleParameters.decompositionLevelsCount;b>=k;k++){var c=a.resolutions[k],o=g.components[l].resolutions[k],p=r(m,n,o,h,c);if(null!==p){for(;e>j;){var q=i(c,p,j);return j++,q}j=0}}k=0}l=0}m=0}throw new Error("JPX Error: Out of packets")}}function q(a){var b=a.SIZ,c=a.currentTile.index,d=a.tiles[c],e=d.codingStyleDefaultParameters.layersCount,f=b.Csiz,g=s(d),h=0,j=0,k=0,l=0,m=0;this.nextPacket=function(){for(;f>k;++k){for(var a=d.components[k],b=g.components[k],c=a.codingStyleParameters.decompositionLevelsCount;m=j;j++){var n=a.resolutions[j],o=b.resolutions[j],p=r(l,m,o,b,n);if(null!==p){for(;e>h;){var q=i(n,p,h);return h++,q}h=0}}j=0}l=0}m=0}throw new Error("JPX Error: Out of packets")}}function r(a,b,c,d,e){var f=a*d.minWidth,g=b*d.minHeight;if(f%c.width!==0||g%c.height!==0)return null;var h=g/c.width*e.precinctParameters.numprecinctswide;return f/c.height+h}function s(a){for(var b=a.components.length,c=Number.MAX_VALUE,d=Number.MAX_VALUE,e=0,f=0,g=new Array(b),h=0;b>h;h++){for(var i=a.components[h],j=i.codingStyleParameters.decompositionLevelsCount,k=new Array(j+1),l=Number.MAX_VALUE,m=Number.MAX_VALUE,n=0,o=0,p=1,q=j;q>=0;--q){var r=i.resolutions[q],s=p*r.precinctParameters.precinctWidth,t=p*r.precinctParameters.precinctHeight;l=Math.min(l,s),m=Math.min(m,t),n=Math.max(n,r.precinctParameters.numprecinctswide),o=Math.max(o,r.precinctParameters.numprecinctshigh),k[q]={width:s,height:t},p<<=1}c=Math.min(c,l),d=Math.min(d,m),e=Math.max(e,n),f=Math.max(f,o),g[h]={resolutions:k,minWidth:l,minHeight:m,maxNumWide:n,maxNumHigh:o}}return{components:g,minWidth:c,minHeight:d,maxNumWide:e,maxNumHigh:f}}function t(a){for(var b=a.SIZ,c=a.currentTile.index,d=a.tiles[c],e=b.Csiz,i=0;e>i;i++){for(var l=d.components[i],n=l.codingStyleParameters.decompositionLevelsCount,o=[],r=[],s=0;n>=s;s++){var t=f(a,l,s),u={},v=1<m;){var d=b[c+k];k++,n?(j=j<<7|d,m+=7,n=!1):(j=j<<8|d,m+=8),255===d&&(n=!0)}return m-=a,j>>>m&(1<a?a+3:(a=e(5),31>a?a+6:(a=e(7),a+37))}for(var j,k=0,m=0,n=!1,o=a.currentTile.index,p=a.tiles[o],q=a.COD.sopMarkerUsed,r=a.COD.ephMarkerUsed,s=p.packetsIterator;d>k;){h(),q&&f(145)&&g(4);var t=s.nextPacket();if(e(1)){for(var u,v=t.layerNumber,w=[],x=0,y=t.codeblocks.length;y>x;x++){u=t.codeblocks[x];var z,C=u.precinct,D=u.cbx-C.cbxMin,E=u.cby-C.cbyMin,F=!1,G=!1;if(void 0!==u.included)F=!!e(1);else{C=u.precinct;var H,I;if(void 0!==C.inclusionTree)H=C.inclusionTree;else{var J=C.cbxMax-C.cbxMin+1,K=C.cbyMax-C.cbyMin+1;H=new B(J,K,v),I=new A(J,K),C.inclusionTree=H,C.zeroBitPlanesTree=I}if(H.reset(D,E,v))for(;;){if(!e(1)){H.incrementValue(v);break}if(z=!H.nextLevel()){u.included=!0,F=G=!0;break}}}if(F){if(G){for(I=C.zeroBitPlanesTree,I.reset(D,E);;)if(e(1)){if(z=!I.nextLevel())break}else I.incrementValue();u.zeroBitPlanes=I.value}for(var L=i();e(1);)u.Lblock++;var M=l(L),N=(1<L?M-1:M)+u.Lblock,O=e(N);w.push({codeblock:u,codingpasses:L,dataLength:O})}}for(h(),r&&f(146);w.length>0;){var P=w.shift();u=P.codeblock,void 0===u.data&&(u.data=[]),u.data.push({data:b,start:c+k,end:c+k+P.dataLength,codingpasses:P.codingpasses}),k+=P.dataLength}}}return k}function v(a,b,c,d,e,f,g,h){for(var i=d.tbx0,j=d.tby0,k=d.tbx1-d.tbx0,l=d.codeblocks,m="H"===d.type.charAt(0)?1:0,n="H"===d.type.charAt(1)?b:0,o=0,p=l.length;p>o;++o){var q=l[o],r=q.tbx1_-q.tbx0_,s=q.tby1_-q.tby0_;if(0!==r&&0!==s&&void 0!==q.data){var t,u;t=new C(r,s,q.subbandType,q.zeroBitPlanes,f),u=2;var v,w,x,y=q.data,z=0,A=0;for(v=0,w=y.length;w>v;v++)x=y[v],z+=x.end-x.start,A+=x.codingpasses;var B=new Uint8Array(z),D=0;for(v=0,w=y.length;w>v;v++){x=y[v];var E=x.data.subarray(x.start,x.end);B.set(E,D),D+=E.length}var F=new fd(B,0,z);for(t.setDecoder(F),v=0;A>v;v++){switch(u){case 0:t.runSignificancePropogationPass();break;case 1:t.runMagnitudeRefinementPass();break;case 2:t.runCleanupPass(),h&&t.checkSegmentationSymbol()}u=(u+1)%3}var G,H,I,J=q.tbx0_-i+(q.tby0_-j)*k,K=t.coefficentsSign,L=t.coefficentsMagnitude,M=t.bitsDecoded,N=g?0:.5;D=0;var O="LL"!==d.type;for(v=0;s>v;v++){var P=J/k|0,Q=2*P*(b-k)+m+n;for(G=0;r>G;G++){if(H=L[D],0!==H){H=(H+N)*e,0!==K[D]&&(H=-H),I=M[D];var R=O?Q+(J<<1):J;g&&I>=f?a[R]=H:a[R]=H*(1<=q;q++){for(var r=d.resolutions[q],s=r.trx1-r.trx0,t=r.try1-r.try0,u=new Float32Array(s*t),w=0,x=r.subbands.length;x>w;w++){var y,A;i?(y=h[p].mu,A=h[p].epsilon,p++):(y=h[0].mu,A=h[0].epsilon+(q>0?1-q:0));var B=r.subbands[w],C=z[B.type],D=m?1:Math.pow(2,l+C-A)*(1+y/2048),G=j+A-1;v(u,s,t,B,D,G,m,k)}o.push({width:s,height:t,items:u})}var H=n.calculate(o,d.tcx0,d.tcy0);return{left:d.tcx0,top:d.tcy0,width:H.width,height:H.height,items:H.items}}function x(a){for(var b=a.SIZ,c=a.components,d=b.Csiz,e=[],f=0,g=a.tiles.length;g>f;f++){var h,i=a.tiles[f],j=[];for(h=0;d>h;h++)j[h]=w(a,i,h);var k,l,m,n,o,p,q,r,s,t,u,v,x,y,z,A=j[0],B=new Uint8Array(A.items.length*d),C={left:A.left,top:A.top,width:A.width,height:A.height,items:B},D=0;if(i.codingStyleDefaultParameters.multipleComponentTransform){var E=4===d,F=j[0].items,G=j[1].items,H=j[2].items,I=E?j[3].items:null;k=c[0].precision-8,l=(128<p;p++,D+=K)r=F[p]+l,s=G[p],t=H[p],v=r-(t+s>>2),u=v+t,x=v+s,B[D++]=0>=u?0:u>=m?255:u>>k,B[D++]=0>=v?0:v>=m?255:v>>k,B[D++]=0>=x?0:x>=m?255:x>>k;else for(p=0;q>p;p++,D+=K)r=F[p]+l,s=G[p],t=H[p],u=r+1.402*t,v=r-.34413*s-.71414*t,x=r+1.772*s,B[D++]=0>=u?0:u>=m?255:u>>k,B[D++]=0>=v?0:v>=m?255:v>>k,B[D++]=0>=x?0:x>=m?255:x>>k;if(E)for(p=0,D=3;q>p;p++,D+=4)y=I[p],B[D]=n>=y?0:y>=o?255:y+l>>k}else for(h=0;d>h;h++){var L=j[h].items;for(k=c[h].precision-8,l=(128<p;p++)z=L[p],B[D]=n>=z?0:z>=m?255:z+l>>k,D+=d}e.push(C)}return e}function y(a,b){for(var c=a.SIZ,d=c.Csiz,e=a.tiles[b],f=0;d>f;f++){var g=e.components[f],h=void 0!==a.currentTile.QCC[f]?a.currentTile.QCC[f]:a.currentTile.QCD;g.quantizationParameters=h;var i=void 0!==a.currentTile.COC[f]?a.currentTile.COC[f]:a.currentTile.COD;g.codingStyleParameters=i}e.codingStyleDefaultParameters=a.currentTile.COD}var z={LL:0,LH:1,HL:1,HH:2};c.prototype={parse:function(c){var d=n(c,0);if(65359===d)return void this.parseCodestream(c,0,c.length);for(var e=0,f=c.length;f>e;){var g=8,h=o(c,e),i=o(c,e+4);if(e+=g,1===h&&(h=4294967296*o(c,e)+o(c,e+4),e+=8,g+=8),0===h&&(h=f-e+g),g>h)throw new Error("JPX Error: Invalid box field size");var j=h-g,k=!0;switch(i){case 1785737832:k=!1;break;case 1668246642:var l=c[e];c[e+1],c[e+2];if(1===l){var m=o(c,e+3);switch(m){case 16:case 17:case 18:break;default:b("Unknown colorspace "+m)}}else 2===l&&a("ICC profile not supported");break;case 1785737827:this.parseCodestream(c,e,e+j);break;case 1783636e3:218793738!==o(c,e)&&b("Invalid JP2 signature");break;case 1783634458:case 1718909296:case 1920099697:case 1919251232:case 1768449138:break;default:var p=String.fromCharCode(i>>24&255,i>>16&255,i>>8&255,255&i);b("Unsupported header type "+i+" ("+p+")")}k&&(e+=j)}},parseImageProperties:function(a){for(var b=a.getByte();b>=0;){var c=b;b=a.getByte();var d=c<<8|b;if(65361===d){a.skip(4);var e=a.getInt32()>>>0,f=a.getInt32()>>>0,g=a.getInt32()>>>0,h=a.getInt32()>>>0;a.skip(16);var i=a.getUint16();return this.width=e-g,this.height=f-h,this.componentsCount=i,void(this.bitsPerComponent=8)}}throw new Error("JPX Error: No size marker found in JPX stream")},parseCodestream:function(a,c,f){var g={};try{for(var h=!1,i=c;f>i+1;){var j=n(a,i);i+=2;var k,l,m,p,q,r,s=0;switch(j){case 65359:g.mainHeader=!0;break;case 65497:break;case 65361:s=n(a,i);var v={};v.Xsiz=o(a,i+4),v.Ysiz=o(a,i+8),v.XOsiz=o(a,i+12),v.YOsiz=o(a,i+16),v.XTsiz=o(a,i+20),v.YTsiz=o(a,i+24),v.XTOsiz=o(a,i+28),v.YTOsiz=o(a,i+32);var w=n(a,i+36);v.Csiz=w;var z=[];k=i+38;for(var A=0;w>A;A++){var B={precision:(127&a[k])+1,isSigned:!!(128&a[k]),XRsiz:a[k+1],YRsiz:a[k+1]};d(B,v),z.push(B)}g.SIZ=v,g.components=z,e(g,z),g.QCC=[],g.COC=[];break;case 65372:s=n(a,i);var C={};switch(k=i+2,l=a[k++],31&l){case 0:p=8,q=!0;break;case 1:p=16,q=!1;break;case 2:p=16,q=!0;break;default:throw new Error("JPX Error: Invalid SQcd value "+l)}for(C.noQuantization=8===p,C.scalarExpounded=q,C.guardBits=l>>5,m=[];s+i>k;){var D={};8===p?(D.epsilon=a[k++]>>3,D.mu=0):(D.epsilon=a[k]>>3,D.mu=(7&a[k])<<8|a[k+1],k+=2),m.push(D)}C.SPqcds=m,g.mainHeader?g.QCD=C:(g.currentTile.QCD=C,g.currentTile.QCC=[]);break;case 65373:s=n(a,i);var E={};k=i+2;var F;switch(g.SIZ.Csiz<257?F=a[k++]:(F=n(a,k),k+=2),l=a[k++],31&l){case 0:p=8,q=!0;break;case 1:p=16,q=!1;break;case 2:p=16,q=!0;break;default:throw new Error("JPX Error: Invalid SQcd value "+l)}for(E.noQuantization=8===p,E.scalarExpounded=q,E.guardBits=l>>5,m=[];s+i>k;)D={},8===p?(D.epsilon=a[k++]>>3,D.mu=0):(D.epsilon=a[k]>>3,D.mu=(7&a[k])<<8|a[k+1],k+=2),m.push(D);E.SPqcds=m,g.mainHeader?g.QCC[F]=E:g.currentTile.QCC[F]=E;break;case 65362:s=n(a,i);var G={};k=i+2;var H=a[k++];G.entropyCoderWithCustomPrecincts=!!(1&H),G.sopMarkerUsed=!!(2&H),G.ephMarkerUsed=!!(4&H),G.progressionOrder=a[k++],G.layersCount=n(a,k),k+=2,G.multipleComponentTransform=a[k++],G.decompositionLevelsCount=a[k++],G.xcb=(15&a[k++])+2,G.ycb=(15&a[k++])+2;var I=a[k++];if(G.selectiveArithmeticCodingBypass=!!(1&I),G.resetContextProbabilities=!!(2&I),G.terminationOnEachCodingPass=!!(4&I),G.verticalyStripe=!!(8&I),G.predictableTermination=!!(16&I),G.segmentationSymbolUsed=!!(32&I),G.reversibleTransformation=a[k++],G.entropyCoderWithCustomPrecincts){for(var J=[];s+i>k;){var K=a[k++];J.push({PPx:15&K,PPy:K>>4})}G.precinctsSizes=J}var L=[];if(G.selectiveArithmeticCodingBypass&&L.push("selectiveArithmeticCodingBypass"),G.resetContextProbabilities&&L.push("resetContextProbabilities"),G.terminationOnEachCodingPass&&L.push("terminationOnEachCodingPass"),G.verticalyStripe&&L.push("verticalyStripe"),G.predictableTermination&&L.push("predictableTermination"),L.length>0)throw h=!0,new Error("JPX Error: Unsupported COD options ("+L.join(", ")+")");g.mainHeader?g.COD=G:(g.currentTile.COD=G,g.currentTile.COC=[]);break;case 65424:s=n(a,i),r={},r.index=n(a,i+2),r.length=o(a,i+4),r.dataEnd=r.length+i-2,r.partIndex=a[i+8],r.partsCount=a[i+9],g.mainHeader=!1,0===r.partIndex&&(r.COD=g.COD,r.COC=g.COC.slice(0),r.QCD=g.QCD,r.QCC=g.QCC.slice(0)),g.currentTile=r;break;case 65427:r=g.currentTile,0===r.partIndex&&(y(g,r.index),t(g)),s=r.dataEnd-i,u(g,a,i,s);break;case 65365:case 65367:case 65368:case 65380:s=n(a,i);break;case 65363:throw new Error("JPX Error: Codestream code 0xFF53 (COC) is not implemented");default:throw new Error("JPX Error: Unknown codestream code: "+j.toString(16))}i+=s}}catch(M){if(h||this.failOnCorruptedImage)throw M;b("Trying to recover from "+M.message)}this.tiles=x(g),this.width=g.SIZ.Xsiz-g.SIZ.XOsiz,this.height=g.SIZ.Ysiz-g.SIZ.YOsiz,this.componentsCount=g.SIZ.Csiz}};var A=function(){function a(a,b){var c=l(Math.max(a,b))+1;this.levels=[];for(var d=0;c>d;d++){var e={width:a,height:b,items:[]};this.levels.push(e),a=Math.ceil(a/2),b=Math.ceil(b/2)}}return a.prototype={reset:function(a,b){for(var c,d=0,e=0;d>=1,b>>=1,d++}d--,c=this.levels[d],c.items[c.index]=e,this.currentLevel=d,delete this.value},incrementValue:function(){var a=this.levels[this.currentLevel];a.items[a.index]++},nextLevel:function(){var a=this.currentLevel,b=this.levels[a],c=b.items[b.index];return a--,0>a?(this.value=c,!1):(this.currentLevel=a,b=this.levels[a],b.items[b.index]=c,!0)}},a}(),B=function(){function a(a,b,c){var d=l(Math.max(a,b))+1;this.levels=[];for(var e=0;d>e;e++){for(var f=new Uint8Array(a*b),g=0,h=f.length;h>g;g++)f[g]=c;var i={width:a,height:b,items:f};this.levels.push(i),a=Math.ceil(a/2),b=Math.ceil(b/2)}}return a.prototype={reset:function(a,b,c){for(var d=0;dc)return this.currentLevel=d,this.propagateValues(),!1;a>>=1,b>>=1,d++}return this.currentLevel=d-1,!0},incrementValue:function(a){var b=this.levels[this.currentLevel];b.items[b.index]=a+1,this.propagateValues()},propagateValues:function(){for(var a=this.currentLevel,b=this.levels[a],c=b.items[b.index];--a>=0;)b=this.levels[a],b.items[b.index]=c},nextLevel:function(){var a=this.currentLevel,b=this.levels[a],c=b.items[b.index];return b.items[b.index]=255,a--,0>a?!1:(this.currentLevel=a,b=this.levels[a],b.items[b.index]=c,!0)}},a}(),C=function(){function a(a,b,c,g,h){this.width=a,this.height=b,this.contextLabelTable="HH"===c?f:"HL"===c?e:d;var i=a*b;this.neighborsSignificance=new Uint8Array(i),this.coefficentsSign=new Uint8Array(i),this.coefficentsMagnitude=h>14?new Uint32Array(i):h>6?new Uint16Array(i):new Uint8Array(i),this.processingFlags=new Uint8Array(i);var j=new Uint8Array(i);if(0!==g)for(var k=0;i>k;k++)j[k]=g;this.bitsDecoded=j,this.reset()}var b=17,c=18,d=new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8]),e=new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8]),f=new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]);return a.prototype={setDecoder:function(a){this.decoder=a},reset:function(){this.contexts=new Int8Array(19),this.contexts[0]=8,this.contexts[b]=92,this.contexts[c]=6},setNeighborsSignificance:function(a,b,c){var d,e=this.neighborsSignificance,f=this.width,g=this.height,h=b>0,i=f>b+1;a>0&&(d=c-f,h&&(e[d-1]+=16),i&&(e[d+1]+=16),e[d]+=4),g>a+1&&(d=c+f,h&&(e[d-1]+=16),i&&(e[d+1]+=16),e[d]+=4),h&&(e[c-1]+=1),i&&(e[c+1]+=1),e[c]|=128},runSignificancePropogationPass:function(){for(var a=this.decoder,b=this.width,c=this.height,d=this.coefficentsMagnitude,e=this.coefficentsSign,f=this.neighborsSignificance,g=this.processingFlags,h=this.contexts,i=this.contextLabelTable,j=this.bitsDecoded,k=-2,l=1,m=2,n=0;c>n;n+=4)for(var o=0;b>o;o++)for(var p=n*b+o,q=0;4>q;q++,p+=b){var r=n+q;if(r>=c)break;if(g[p]&=k,!d[p]&&f[p]){var s=i[f[p]],t=a.readBit(h,s);if(t){var u=this.decodeSignBit(r,o,p);e[p]=u,d[p]=1,this.setNeighborsSignificance(r,o,p),g[p]|=m}j[p]++,g[p]|=l}}},decodeSignBit:function(a,b,c){var d,e,f,g,h,i,j=this.width,k=this.height,l=this.coefficentsMagnitude,m=this.coefficentsSign;g=b>0&&0!==l[c-1],j>b+1&&0!==l[c+1]?(f=m[c+1],g?(e=m[c-1],d=1-f-e):d=1-f-f):g?(e=m[c-1],d=1-e-e):d=0;var n=3*d;return g=a>0&&0!==l[c-j],k>a+1&&0!==l[c+j]?(f=m[c+j],g?(e=m[c-j],d=1-f-e+n):d=1-f-f+n):g?(e=m[c-j],d=1-e-e+n):d=n,d>=0?(h=9+d,i=this.decoder.readBit(this.contexts,h)):(h=9-d,i=1^this.decoder.readBit(this.contexts,h)),i},runMagnitudeRefinementPass:function(){for(var a,b=this.decoder,c=this.width,d=this.height,e=this.coefficentsMagnitude,f=this.neighborsSignificance,g=this.contexts,h=this.bitsDecoded,i=this.processingFlags,j=1,k=2,l=c*d,m=4*c,n=0;l>n;n=a){a=Math.min(l,n+m);for(var o=0;c>o;o++)for(var p=n+o;a>p;p+=c)if(e[p]&&0===(i[p]&j)){var q=16;if(0!==(i[p]&k)){i[p]^=k;var r=127&f[p];q=0===r?15:14}var s=b.readBit(g,q);e[p]=e[p]<<1|s,h[p]++,i[p]|=j}}},runCleanupPass:function(){for(var a,d=this.decoder,e=this.width,f=this.height,g=this.neighborsSignificance,h=this.coefficentsMagnitude,i=this.coefficentsSign,j=this.contexts,k=this.contextLabelTable,l=this.bitsDecoded,m=this.processingFlags,n=1,o=2,p=e,q=2*e,r=3*e,s=0;f>s;s=a){a=Math.min(s+4,f);for(var t=s*e,u=f>s+3,v=0;e>v;v++){var w,x=t+v,y=u&&0===m[x]&&0===m[x+p]&&0===m[x+q]&&0===m[x+r]&&0===g[x]&&0===g[x+p]&&0===g[x+q]&&0===g[x+r],z=0,A=x,B=s;if(y){var C=d.readBit(j,c);if(!C){l[x]++,l[x+p]++,l[x+q]++,l[x+r]++;continue}z=d.readBit(j,b)<<1|d.readBit(j,b),0!==z&&(B=s+z,A+=z*e),w=this.decodeSignBit(B,v,A),i[A]=w,h[A]=1,this.setNeighborsSignificance(B,v,A),m[A]|=o,A=x;for(var D=s;B>=D;D++,A+=e)l[A]++;z++}for(B=s+z;a>B;B++,A+=e)if(!h[A]&&0===(m[A]&n)){var E=k[g[A]],F=d.readBit(j,E);1===F&&(w=this.decodeSignBit(B,v,A),i[A]=w,h[A]=1,this.setNeighborsSignificance(B,v,A),m[A]|=o),l[A]++}}}},checkSegmentationSymbol:function(){var a=this.decoder,c=this.contexts,d=a.readBit(c,b)<<3|a.readBit(c,b)<<2|a.readBit(c,b)<<1|a.readBit(c,b);if(10!==d)throw new Error("JPX Error: Invalid segmentation symbol")}},a}(),D=function(){function a(){}return a.prototype.calculate=function(a,b,c){for(var d=a[0],e=1,f=a.length;f>e;e++)d=this.iterate(d,a[e],b,c);return d},a.prototype.extend=function(a,b,c){var d=b-1,e=b+1,f=b+c-2,g=b+c;a[d--]=a[e++],a[g++]=a[f--],a[d--]=a[e++],a[g++]=a[f--],a[d--]=a[e++],a[g++]=a[f--],a[d]=a[e],a[g]=a[f]},a.prototype.iterate=function(a,b,c,d){var e,f,g,h,i,j,k=a.width,l=a.height,m=a.items,n=b.width,o=b.height,p=b.items;for(g=0,e=0;l>e;e++)for(h=2*e*n,f=0;k>f;f++,g++,h+=2)p[h]=m[g];m=a.items=null;var q=4,r=new Float32Array(n+2*q);if(1===n){if(0!==(1&c))for(j=0,g=0;o>j;j++,g+=n)p[g]*=.5}else for(j=0,g=0;o>j;j++,g+=n)r.set(p.subarray(g,g+n),q),this.extend(r,q,n),this.filter(r,q,n),p.set(r.subarray(q,q+n),g);var s=16,t=[];for(e=0;s>e;e++)t.push(new Float32Array(o+2*q));var u,v=0;if(a=q+o,1===o){if(0!==(1&d))for(i=0;n>i;i++)p[i]*=.5}else for(i=0;n>i;i++){if(0===v){for(s=Math.min(n-i,s),g=i,h=q;a>h;g+=n,h++)for(u=0;s>u;u++)t[u][h]=p[g+u];v=s}v--;var w=t[v];if(this.extend(w,q,o),this.filter(w,q,o),0===v)for(g=i-s+1,h=q;a>h;g+=n,h++)for(u=0;s>u;u++)p[g+u]=t[u][h]}return{width:n,height:o,items:p}},a}(),E=function(){function a(){D.call(this)}return a.prototype=Object.create(D.prototype),a.prototype.filter=function(a,b,c){var d=c>>1;b=0|b;var e,f,g,h,i=-1.586134342059924,j=-.052980118572961,k=.882911075530934,l=.443506852043971,m=1.230174104914001,n=1/m;for(e=b-3,f=d+4;f--;e+=2)a[e]*=n;for(e=b-2,g=l*a[e-1],f=d+3;f--&&(h=l*a[e+1],a[e]=m*a[e]-g-h,f--);e+=2)e+=2,g=l*a[e+1],a[e]=m*a[e]-g-h;for(e=b-1,g=k*a[e-1],f=d+2;f--&&(h=k*a[e+1],a[e]-=g+h,f--);e+=2)e+=2,g=k*a[e+1],a[e]-=g+h;for(e=b,g=j*a[e-1],f=d+1;f--&&(h=j*a[e+1],a[e]-=g+h,f--);e+=2)e+=2,g=j*a[e+1],a[e]-=g+h;if(0!==d)for(e=b+1,g=i*a[e-1],f=d;f--&&(h=i*a[e+1],a[e]-=g+h,f--);e+=2)e+=2,g=i*a[e+1],a[e]-=g+h},a}(),F=function(){function a(){D.call(this)}return a.prototype=Object.create(D.prototype),a.prototype.filter=function(a,b,c){var d=c>>1;b=0|b;var e,f;for(e=b,f=d+1;f--;e+=2)a[e]-=a[e-1]+a[e+1]+2>>2;for(e=b+1,f=d;f--;e+=2)a[e]+=a[e-1]+a[e+1]>>1},a}();return c}(),id=function(){function a(){}function b(a,b,c){this.data=a,this.start=b,this.end=c}function d(a,b,c){function d(a){for(var b=0,d=0;a>d;d++){var g=c.readBit(e,f);f=256>f?f<<1|g:511&(f<<1|g)|256,b=b<<1|g}return b>>>0}var e=a.getContexts(b),f=1,g=d(1),h=d(1)?d(1)?d(1)?d(1)?d(1)?d(32)+4436:d(12)+340:d(8)+84:d(6)+20:d(4)+4:d(2);return 0===g?h:h>0?-h:null}function e(a,b,c){for(var d=a.getContexts("IAID"),e=1,f=0;c>f;f++){var g=b.readBit(d,e);e=e<<1|g}return 31>c?e&(1<e;e++)for(h=m[e]=new Uint8Array(a),i=1>e?h:m[e-1],j=2>e?h:m[e-2],d=j[0]<<13|j[1]<<12|j[2]<<11|i[0]<<7|i[1]<<6|i[2]<<5|i[3]<<4,f=0;a>f;f++)h[f]=g=k.readBit(l,d),d=(d&n)<<1|(a>f+3?j[f+3]<<11:0)|(a>f+4?i[f+4]<<4:0)|g;return m}function h(a,b,d,e,g,h,i,j){if(a&&c("JBIG2 error: MMR encoding is not supported"),0===e&&!h&&!g&&4===i.length&&3===i[0].x&&-1===i[0].y&&-3===i[1].x&&-1===i[1].y&&2===i[2].x&&-2===i[2].y&&-2===i[3].x&&-2===i[3].y)return f(b,d,j);var k=!!h,l=y[e].concat(i);l.sort(function(a,b){return a.y-b.y||a.x-b.x});var m,n,o=l.length,p=new Int8Array(o),q=new Int8Array(o),r=[],s=0,t=0,u=0,v=0;for(n=0;o>n;n++)p[n]=l[n].x,q[n]=l[n].y,t=Math.min(t,l[n].x),u=Math.max(u,l[n].x),v=Math.min(v,l[n].y),o-1>n&&l[n].y===l[n+1].y&&l[n].x===l[n+1].x-1?s|=1<m;m++)n=r[m],x[m]=l[n].x,z[m]=l[n].y,B[m]=1<R;R++){if(g){var S=N.readBit(O,K);if(P^=S){M.push(L);continue}}for(L=new Uint8Array(L),M.push(L),C=0;b>C;C++)if(k&&h[R][C])L[C]=0;else{if(C>=H&&J>C&&R>=I)for(Q=Q<<1&s,n=0;w>n;n++)D=R+z[n],E=C+x[n],F=M[D][E],F&&(F=B[n],Q|=F);else for(Q=0,G=o-1,n=0;o>n;n++,G--)E=C+p[n],E>=0&&b>E&&(D=R+q[n],D>=0&&(F=M[D][E],F&&(Q|=F<l;l++)n[l]=k[l].x,o[l]=k[l].y;var p=z[d].reference;0===d&&(p=p.concat([i[1]]));var q=p.length,r=new Int32Array(q),s=new Int32Array(q);for(l=0;q>l;l++)r[l]=p[l].x,s[l]=p[l].y;for(var t=e[0].length,u=e.length,v=B[d],w=[],x=j.decoder,y=j.contextCache.getContexts("GR"),A=0,C=0;b>C;C++){if(h){var D=x.readBit(y,v);A^=D,A&&c("JBIG2 error: prediction is not supported")}var E=new Uint8Array(a);w.push(E);for(var F=0;a>F;F++){var G,H,I=0;for(l=0;m>l;l++)G=C+o[l],H=F+n[l],0>G||0>H||H>=a?I<<=1:I=I<<1|w[G][H];for(l=0;q>l;l++)G=C+s[l]+g,H=F+r[l]+f,0>G||G>=u||0>H||H>=t?I<<=1:I=I<<1|e[G][H];var J=x.readBit(y,I);E[F]=J}}return w}function j(a,b,f,g,j,m,n,o,p,q,r){a&&c("JBIG2 error: huffman is not supported");for(var s=[],t=0,u=l(f.length+g),v=r.decoder,w=r.contextCache;s.length1)B=k(a,b,y,t,0,C,1,f.concat(s),u,0,0,1,0,m,p,q,r);else{var D=e(w,v,u),E=d(w,"IARDX",v),F=d(w,"IARDY",v),G=DM;M++)I[M]&&H.push(f[M]);for(var O=0;g>O;M++,O++)I[M]&&H.push(s[O]);return H}function k(a,b,f,g,h,j,k,l,m,n,o,p,q,r,s,t,u){a&&c("JBIG2 error: huffman is not supported");var v,w,x=[];for(v=0;g>v;v++){if(w=new Uint8Array(f),h)for(var y=0;f>y;y++)w[y]=h;x.push(w)}var z=u.decoder,A=u.contextCache,B=-d(A,"IADT",z),C=0;for(v=0;j>v;){var D=d(A,"IADT",z);B+=D;var E=d(A,"IAFS",z);C+=E;for(var F=C;;){var G=1===k?0:d(A,"IAIT",z),H=k*B+G,I=e(A,z,m),J=b&&d(A,"IARI",z),K=l[I],L=K[0].length,M=K.length;if(J){var N=d(A,"IARDW",z),O=d(A,"IARDH",z),P=d(A,"IARDX",z),Q=d(A,"IARDY",z);L+=N,M+=O,K=i(L,M,s,K,(N>>1)+P,(O>>1)+Q,!1,t,u)}var R,S,T,U=H-(1&p?0:M),V=F-(2&p?L:0);if(n){for(R=0;M>R;R++)if(w=x[V+R]){T=K[R];var W=Math.min(f-U,L);switch(q){case 0:for(S=0;W>S;S++)w[U+S]|=T[S];break;case 2:for(S=0;W>S;S++)w[U+S]^=T[S];break;default:c("JBIG2 error: operator "+q+" is not supported")}}F+=M-1}else{for(S=0;M>S;S++)if(w=x[U+S])switch(T=K[S],q){case 0:for(R=0;L>R;R++)w[V+R]|=T[R];break;case 2:for(R=0;L>R;R++)w[V+R]^=T[R];break;default:c("JBIG2 error: operator "+q+" is not supported")}F+=L-1}v++;var X=d(A,"IADS",z);if(null===X)break;F+=X+o}}return x}function p(a,b){var d={};d.number=o(a,b);var e=a[b+4],f=63&e;x[f]||c("JBIG2 error: invalid segment type: "+f),d.type=f,d.typeName=x[f],d.deferredNonRetain=!!(128&e);var g=!!(64&e),h=a[b+5],i=h>>5&7,j=[31&h],k=b+6;if(7===h){i=536870911&o(a,k-1),k+=3;var l=i+7>>3;for(j[0]=a[k++];--l>0;)j.push(a[k++])}else(5===h||6===h)&&c("JBIG2 error: invalid referred-to flags");d.retainBits=j;var m,p,q=d.number<=256?1:d.number<=65536?2:4,s=[];for(m=0;i>m;m++){var t=1===q?a[k]:2===q?n(a,k):o(a,k);s.push(t),k+=q}if(d.referredTo=s,g?(d.pageAssociation=o(a,k),k+=4):d.pageAssociation=a[k++],d.length=o(a,k),k+=4,4294967295===d.length)if(38===f){var u=r(a,k),v=a[k+C],w=!!(1&v),y=6,z=new Uint8Array(y);for(w||(z[0]=255,z[1]=172),z[2]=u.height>>>24&255,z[3]=u.height>>16&255,z[4]=u.height>>8&255,z[5]=255&u.height,m=k,p=a.length;p>m;m++){for(var A=0;y>A&&z[A]===a[m+A];)A++;if(A===y){d.length=m+y;break}}4294967295===d.length&&c("JBIG2 error: segment end was not found")}else c("JBIG2 error: invalid unknown segment length");return d.headerEnd=k,d}function q(a,b,c,d){for(var e=[],f=c;d>f;){var g=p(b,f);f=g.headerEnd;var h={header:g,data:b};if(a.randomAccess||(h.start=f,f+=g.length,h.end=f),e.push(h),51===g.type)break}if(a.randomAccess)for(var i=0,j=e.length;j>i;i++)e[i].start=f,f+=e[i].header.length,e[i].end=f;return e}function r(a,b){return{width:o(a,b),height:o(a,b+4),x:o(a,b+8),y:o(a,b+12),combinationOperator:7&a[b+16]}}function s(a,b){var d,e,f,g,h=a.header,i=a.data,j=a.start,k=a.end;switch(h.type){case 0:var l={},p=n(i,j);if(l.huffman=!!(1&p),l.refinement=!!(2&p),l.huffmanDHSelector=p>>2&3,l.huffmanDWSelector=p>>4&3,l.bitmapSizeSelector=p>>6&1,l.aggregationInstancesSelector=p>>7&1,l.bitmapCodingContextUsed=!!(256&p),l.bitmapCodingContextRetained=!!(512&p),l.template=p>>10&3,l.refinementTemplate=p>>12&1,j+=2,!l.huffman){for(g=0===l.template?4:1,e=[],f=0;g>f;f++)e.push({x:m(i,j),y:m(i,j+1)}),j+=2;l.at=e}if(l.refinement&&!l.refinementTemplate){for(e=[],f=0;2>f;f++)e.push({x:m(i,j),y:m(i,j+1)}),j+=2;l.refinementAt=e}l.numberOfExportedSymbols=o(i,j),j+=4,l.numberOfNewSymbols=o(i,j),j+=4,d=[l,h.number,h.referredTo,i,j,k];break;case 6:case 7:var q={};q.info=r(i,j),j+=C;var s=n(i,j);if(j+=2,q.huffman=!!(1&s),q.refinement=!!(2&s),q.stripSize=1<<(s>>2&3),q.referenceCorner=s>>4&3,q.transposed=!!(64&s),q.combinationOperator=s>>7&3,q.defaultPixelValue=s>>9&1,q.dsOffset=s<<17>>27,q.refinementTemplate=s>>15&1,q.huffman){var t=n(i,j);j+=2,q.huffmanFS=3&t,q.huffmanDS=t>>2&3,q.huffmanDT=t>>4&3,q.huffmanRefinementDW=t>>6&3,q.huffmanRefinementDH=t>>8&3,q.huffmanRefinementDX=t>>10&3,q.huffmanRefinementDY=t>>12&3,q.huffmanRefinementSizeSelector=!!(14&t)}if(q.refinement&&!q.refinementTemplate){for(e=[],f=0;2>f;f++)e.push({x:m(i,j),y:m(i,j+1)}),j+=2;q.refinementAt=e}q.numberOfSymbolInstances=o(i,j),j+=4,q.huffman&&c("JBIG2 error: huffman is not supported"),d=[q,h.referredTo,i,j,k];break;case 38:case 39:var u={};u.info=r(i,j),j+=C;var v=i[j++];if(u.mmr=!!(1&v),u.template=v>>1&3,u.prediction=!!(8&v),!u.mmr){for(g=0===u.template?4:1,e=[],f=0;g>f;f++)e.push({x:m(i,j),y:m(i,j+1)}),j+=2;u.at=e}d=[u,i,j,k];break;case 48:var w={width:o(i,j),height:o(i,j+4),resolutionX:o(i,j+8),resolutionY:o(i,j+12)};4294967295===w.height&&delete w.height;var x=i[j+16];n(i,j+17);w.lossless=!!(1&x),w.refinement=!!(2&x),w.defaultPixelValue=x>>2&1,w.combinationOperator=x>>3&3,w.requiresBuffer=!!(32&x),w.combinationOperatorOverride=!!(64&x),d=[w];break;case 49:break;case 50:break;case 51:break;case 62:break;default:c("JBIG2 error: segment type "+h.typeName+"("+h.type+") is not implemented")}var y="on"+h.typeName;y in b&&b[y].apply(b,d)}function t(a,b){for(var c=0,d=a.length;d>c;c++)s(a[c],b)}function u(a){for(var b=new v,c=0,d=a.length;d>c;c++){var e=a[c],f=q({},e.data,e.start,e.end);t(f,b)}return b.buffer}function v(){}function w(){}a.prototype={getContexts:function(a){return a in this?this[a]:this[a]=new Int8Array(65536)}},b.prototype={get decoder(){var a=new fd(this.data,this.start,this.end);return g(this,"decoder",a)},get contextCache(){var b=new a;return g(this,"contextCache",b)}};var x=["SymbolDictionary",null,null,null,"IntermediateTextRegion",null,"ImmediateTextRegion","ImmediateLosslessTextRegion",null,null,null,null,null,null,null,null,"patternDictionary",null,null,null,"IntermediateHalftoneRegion",null,"ImmediateHalftoneRegion","ImmediateLosslessHalftoneRegion",null,null,null,null,null,null,null,null,null,null,null,null,"IntermediateGenericRegion",null,"ImmediateGenericRegion","ImmediateLosslessGenericRegion","IntermediateGenericRefinementRegion",null,"ImmediateGenericRefinementRegion","ImmediateLosslessGenericRefinementRegion",null,null,null,null,"PageInformation","EndOfPage","EndOfStripe","EndOfFile","Profiles","Tables",null,null,null,null,null,null,null,null,"Extension"],y=[[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:2,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-2,y:0},{x:-1,y:0}],[{x:-3,y:-1},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}]],z=[{coding:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:-1,y:1},{x:0,y:1},{x:1,y:1}]},{coding:[{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:0,y:1},{x:1,y:1}]}],A=[39717,1941,229,405],B=[32,8],C=17;return v.prototype={onPageInformation:function(a){this.currentPageInfo=a;var b=a.width+7>>3,c=new Uint8Array(b*a.height);if(a.defaultPixelValue)for(var d=0,e=c.length;e>d;d++)c[d]=255;this.buffer=c},drawBitmap:function(a,b){var d,e,f,g,h=this.currentPageInfo,i=a.width,j=a.height,k=h.width+7>>3,l=h.combinationOperatorOverride?a.combinationOperator:h.combinationOperator,m=this.buffer,n=128>>(7&a.x),o=a.y*k+(a.x>>3);switch(l){case 0:for(d=0;j>d;d++){for(f=n,g=o,e=0;i>e;e++)b[d][e]&&(m[g]|=f),f>>=1,f||(f=128,g++);o+=k}break;case 2:for(d=0;j>d;d++){for(f=n,g=o,e=0;i>e;e++)b[d][e]&&(m[g]^=f), +f>>=1,f||(f=128,g++);o+=k}break;default:c("JBIG2 error: operator "+l+" is not supported")}},onImmediateGenericRegion:function(a,c,d,e){var f=a.info,g=new b(c,d,e),i=h(a.mmr,f.width,f.height,a.template,a.prediction,null,a.at,g);this.drawBitmap(f,i)},onImmediateLosslessGenericRegion:function(){this.onImmediateGenericRegion.apply(this,arguments)},onSymbolDictionary:function(a,d,e,f,g,h){var i;a.huffman&&c("JBIG2 error: huffman is not supported");var k=this.symbols;k||(this.symbols=k={});for(var l=[],m=0,n=e.length;n>m;m++)l=l.concat(k[e[m]]);var o=new b(f,g,h);k[d]=j(a.huffman,a.refinement,l,a.numberOfNewSymbols,a.numberOfExportedSymbols,i,a.template,a.at,a.refinementTemplate,a.refinementAt,o)},onImmediateTextRegion:function(a,c,d,e,f){for(var g,h=a.info,i=this.symbols,j=[],m=0,n=c.length;n>m;m++)j=j.concat(i[c[m]]);var o=l(j.length),p=new b(d,e,f),q=k(a.huffman,a.refinement,h.width,h.height,a.defaultPixelValue,a.numberOfSymbolInstances,a.stripSize,j,o,a.transposed,a.dsOffset,a.referenceCorner,a.combinationOperator,g,a.refinementTemplate,a.refinementAt,p);this.drawBitmap(h,q)},onImmediateLosslessTextRegion:function(){this.onImmediateTextRegion.apply(this,arguments)}},w.prototype={parseChunks:function(a){return u(a)}},w}(),jd=(PDFJS.bidi=function(){function a(a){return 0!==(1&a)}function b(a){return 0===(1&a)}function c(a,b,c){for(var d=b,e=a.length;e>d;++d)if(a[d]!==c)return d;return d}function d(a,b,c,d){for(var e=b;c>e;++e)a[e]=d}function e(a,b,c){for(var d=b,e=c-1;e>d;++d,--e){var f=a[d];a[d]=a[e],a[e]=f}}function f(a,b,c){return{str:a,dir:c?"ttb":b?"ltr":"rtl"}}function g(g,l,m){var n=!0,o=g.length;if(0===o||m)return f(g,n,m);j.length=o,k.length=o;var p,q,r=0;for(p=0;o>p;++p){j[p]=g.charAt(p);var s=g.charCodeAt(p),t="L";255>=s?t=h[s]:s>=1424&&1524>=s?t="R":s>=1536&&1791>=s?t=i[255&s]:s>=1792&&2220>=s&&(t="AL"),("R"===t||"AL"===t||"AN"===t)&&r++,k[p]=t}if(0===r)return n=!0,f(g,n);-1===l&&(.3>o/r?(n=!0,l=0):(n=!1,l=1));var u=[];for(p=0;o>p;++p)u[p]=l;var v=a(l)?"R":"L",w=v,x=w,y=w;for(p=0;o>p;++p)"NSM"===k[p]?k[p]=y:y=k[p];y=w;var z;for(p=0;o>p;++p)z=k[p],"EN"===z?k[p]="AL"===y?"AN":"EN":("R"===z||"L"===z||"AL"===z)&&(y=z);for(p=0;o>p;++p)z=k[p],"AL"===z&&(k[p]="R");for(p=1;o-1>p;++p)"ES"===k[p]&&"EN"===k[p-1]&&"EN"===k[p+1]&&(k[p]="EN"),"CS"!==k[p]||"EN"!==k[p-1]&&"AN"!==k[p-1]||k[p+1]!==k[p-1]||(k[p]=k[p-1]);for(p=0;o>p;++p)if("EN"===k[p]){var A;for(A=p-1;A>=0&&"ET"===k[A];--A)k[A]="EN";for(A=p+1;o>A&&"ET"===k[A];--A)k[A]="EN"}for(p=0;o>p;++p)z=k[p],("WS"===z||"ES"===z||"ET"===z||"CS"===z)&&(k[p]="ON");for(y=w,p=0;o>p;++p)z=k[p],"EN"===z?k[p]="L"===y?"L":"EN":("R"===z||"L"===z)&&(y=z);for(p=0;o>p;++p)if("ON"===k[p]){var B=c(k,p+1,"ON"),C=w;p>0&&(C=k[p-1]);var D=x;o>B+1&&(D=k[B+1]),"L"!==C&&(C="R"),"L"!==D&&(D="R"),C===D&&d(k,p,B,C),p=B-1}for(p=0;o>p;++p)"ON"===k[p]&&(k[p]=v);for(p=0;o>p;++p)z=k[p],b(u[p])?"R"===z?u[p]+=1:("AN"===z||"EN"===z)&&(u[p]+=2):("L"===z||"AN"===z||"EN"===z)&&(u[p]+=1);var E,F=-1,G=99;for(p=0,q=u.length;q>p;++p)E=u[p],E>F&&(F=E),G>E&&a(E)&&(G=E);for(E=F;E>=G;--E){var H=-1;for(p=0,q=u.length;q>p;++p)u[p]=0&&(e(j,H,p),H=-1):0>H&&(H=p);H>=0&&e(j,H,u.length)}for(p=0,q=j.length;q>p;++p){var I=j[p];("<"===I||">"===I)&&(j[p]="")}return f(j.join(""),n)}var h=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ON","CS","ON","CS","ON","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ON","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","ON","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],i=["AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","CS","AL","ON","ON","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","ON","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL"],j=[],k=[];return g}(),function(a){function b(a){var b=3285377520;this.h1=a?4294967295&a:b,this.h2=a?4294967295&a:b}var c=4294901760,d=65535,e=!1;try{new Uint32Array(new Uint8Array(5).buffer,0,1)}catch(f){e=!0}return b.prototype={update:function(a){var b,f=e;if("string"==typeof a){var g=new Uint8Array(2*a.length),h=0;for(b=0;b=i?g[h++]=i:(g[h++]=i>>>8,g[h++]=255&i)}}else if(a instanceof Uint8Array)g=a,h=g.length;else{if(!("object"==typeof a&&"length"in a))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");g=a,h=g.length,f=!0}var j=h>>2,k=h-4*j,l=f?new la(g,j):new Uint32Array(g.buffer,0,j),m=0,n=0,o=this.h1,p=this.h2,q=3432918353,r=461845907,s=q&d,t=r&d;for(b=0;j>b;b++)1&b?(m=l[b],m=m*q&c|m*s&d,m=m<<15|m>>>17,m=m*r&c|m*t&d,o^=m,o=o<<13|o>>>19,o=5*o+3864292196):(n=l[b],n=n*q&c|n*s&d,n=n<<15|n>>>17,n=n*r&c|n*t&d,p^=n,p=p<<13|p>>>19,p=5*p+3864292196);switch(m=0,k){case 3:m^=g[4*j+2]<<16;case 2:m^=g[4*j+1]<<8;case 1:m^=g[4*j],m=m*q&c|m*s&d,m=m<<15|m>>>17,m=m*r&c|m*t&d,1&j?o^=m:p^=m}return this.h1=o,this.h2=p,this},hexdigest:function(){var a=this.h1,b=this.h2;a^=b>>>1,a=3981806797*a&c|36045*a&d,b=4283543511*b&c|(2950163797*(b<<16|a>>>16)&c)>>>16,a^=b>>>1,a=444984403*a&c|60499*a&d,b=3301882366*b&c|(3120437893*(b<<16|a>>>16)&c)>>>16,a^=b>>>1;for(var e=0,f=[a,b],g="";e>>0).toString(16);h.length<8;)h="0"+h;g+=h}return g}},b}())}.call("undefined"==typeof window?this:window),PDFJS.workerSrc||"undefined"==typeof document||(PDFJS.workerSrc=function(){"use strict";var a=document.body||document.getElementsByTagName("head")[0],b=a.lastChild.src;return b&&b.replace(/\.js$/i,".worker.js")}()),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;hc;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('
      ');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('
    • '),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")});var f=e.filter("[aria-selected=true]");f.length>0?f.first().trigger("mouseenter"):e.first().trigger("mouseenter")})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&d.setClasses()}),b.on("unselect",function(){b.isOpen()&&d.setClasses()}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html(''),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('
        '),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('
      • ×
      • ');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e0||0===c.length)){var d=a('×');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ç ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ç¢":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","ï¼¢":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","ï¼£":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","È»":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","ï¼¥":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E", +"Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ç´":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ä ":"G","Ǧ":"G","Ä¢":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","â±µ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","Ä°":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Ä®":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ä´":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ä¿":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ä»":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","â±¢":"L","â± ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","ï¼­":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","â±®":"M","Ɯ":"M","Ⓝ":"N","ï¼®":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","È ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","È®":"O","È°":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Æ ":"O","Ờ":"O","Ớ":"O","á» ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Æ¢":"OI","Ꝏ":"OO","È¢":"OU","Ⓟ":"P","ï¼°":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","â±£":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","ï¼±":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","ï¼²":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","ï¼³":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","á¹ ":"S","Å ":"S","Ṧ":"S","á¹¢":"S","Ṩ":"S","Ș":"S","Ş":"S","â±¾":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","ï¼´":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Å¢":"T","á¹°":"T","á¹®":"T","Ŧ":"T","Ƭ":"T","Æ®":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","ï¼µ":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Å®":"U","Å°":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","á»®":"U","Ử":"U","á»°":"U","Ụ":"U","á¹²":"U","Ų":"U","Ṷ":"U","á¹´":"U","Ʉ":"U","Ⓥ":"V","V":"V","á¹¼":"V","á¹¾":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","ï¼·":"W","Ẁ":"W","Ẃ":"W","Å´":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","â±²":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","ï¼¹":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","á»´":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Å»":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","Ç¡":"a","ä":"a","ǟ":"a","ả":"a","Ã¥":"a","Ç»":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","â±¥":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","Ç£":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","È©":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","Ä¡":"g","ǧ":"g","Ä£":"g","Ç¥":"g","É ":"g","ꞡ":"g","áµ¹":"g","ꝿ":"g","ⓗ":"h","h":"h","Ä¥":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","É¥":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","Ä©":"i","Ä«":"i","Ä­":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","Ç°":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","Ç©":"k","ḳ":"k","Ä·":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","Å¿":"l","ł":"l","ƚ":"l","É«":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","È­":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","È«":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","Æ¡":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","Ç«":"o","Ç­":"o","ø":"o","Ç¿":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","Æ£":"oi","È£":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","Æ¥":"p","áµ½":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","á¹¥":"s","ŝ":"s","ṡ":"s","Å¡":"s","ṧ":"s","á¹£":"s","ṩ":"s","ș":"s","ş":"s","È¿":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","Å¥":"t","á¹­":"t","ț":"t","Å£":"t","á¹±":"t","ṯ":"t","ŧ":"t","Æ­":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","Å©":"u","á¹¹":"u","Å«":"u","á¹»":"u","Å­":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","Æ°":"u","ừ":"u","ứ":"u","ữ":"u","á»­":"u","á»±":"u","ụ":"u","á¹³":"u","ų":"u","á¹·":"u","á¹µ":"u","ʉ":"u","ⓥ":"v","v":"v","á¹½":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","â±³":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","Å·":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","á»·":"y","ẙ":"y","ỵ":"y","Æ´":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","È¥":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Î¥","Ϋ":"Î¥","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&""!==a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('
      • '),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a(""),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.topf.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element"); +}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this._sync=c.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._sync)}),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1})):this.$element[0].addEventListener&&this.$element[0].addEventListener("DOMAttrModified",b._sync,!1)},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&this.$element[0].removeEventListener("DOMAttrModified",this._sync,!1),this._sync=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d;return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2.");var e=Array.prototype.slice.call(arguments,1);d=c[b].apply(c,e)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c}),angular.module("sprintf",[]).filter("sprintf",function(){return function(){return sprintf.apply(null,arguments)}}).filter("fmt",["$filter",function(a){return a("sprintf")}]).filter("vsprintf",function(){return function(a,b){return vsprintf(a,b)}}).filter("vfmt",["$filter",function(a){return a("vsprintf")}]),angular.module("ui.navbar",["ui.bootstrap","template/navbar-ul.html","template/navbar-li.html"]).directive("tree",function(){return{restrict:"E",replace:!0,scope:{tree:"="},templateUrl:"template/navbar-ul.html"}}).directive("leaf",["$compile",function(a){return{restrict:"E",replace:!0,scope:{leaf:"="},templateUrl:"template/navbar-li.html",link:function(b,c,d){if(angular.isArray(b.leaf.subtree)){c.append('');for(var e=c.parent(),f=!1;e.length>0&&!f;)e.hasClass("navbar-right")&&(f=!0),e=e.parent();f?c.addClass("dropdown-submenu-right"):c.addClass("dropdown-submenu"),a(c.contents())(b)}}}}]),angular.module("template/navbar-li.html",[]).run(["$templateCache",function(a){a.put("template/navbar-li.html",'
      • \n {{leaf.name}}\n
      • ')}]),angular.module("template/navbar-ul.html",[]).run(["$templateCache",function(a){a.put("template/navbar-ul.html","")}]),angular.module("ngAudio",[]).directive("ngAudio",["$compile","$q","ngAudio",function(a,b,c){return{restrict:"AEC",scope:{volume:"=",start:"=",currentTime:"=",loop:"=",clickPlay:"=",disablePreload:"="},controller:["$scope","$attrs","$element","$timeout",function(a,b,d,e){function f(){g=c.load(b.ngAudio,a),a.$audio=g,g.unbind()}var g;a.disablePreload||f(),d.on("click",function(){a.clickPlay!==!1&&(a.disablePreload&&f(),g.audio.play(),g.volume=a.volume||g.volume,g.loop=a.loop,g.currentTime=a.start||0,e(function(){g.play()},5))}),d.on("$destroy",function(){g.destroy()})}]}}]).directive("ngAudioHover",["$compile","$q","ngAudio",function(a,b,c){return{restrict:"AEC",controller:["$scope","$attrs","$element","$timeout",function(a,b,d,e){var f=c.load(b.ngAudioHover,a);d.on("mouseover rollover hover",function(){f.audio.play(),f.volume=b.volumeHover||f.volume,f.loop=b.loop,f.currentTime=b.startHover||0}),d.on("$destroy",function(){f.destroy()})}]}}]).service("localAudioFindingService",["$q",function(a){this.find=function(b){var c=a.defer(),d=document.getElementById(b);return d?c.resolve(d):c.reject(b),c.promise}}]).service("remoteAudioFindingService",["$q",function(a){this.find=function(b){var c=a.defer(),d=new Audio;return d.addEventListener("error",function(){c.reject()}),d.addEventListener("loadstart",function(){c.resolve(d)}),setTimeout(function(){d.src=b},1),c.promise}}]).service("cleverAudioFindingService",["$q","localAudioFindingService","remoteAudioFindingService",function(a,b,c){this.find=function(d){var e=a.defer();return d=d.replace("|","/"),b.find(d).then(e.resolve,function(){return c.find(d)}).then(e.resolve,e.reject),e.promise}}]).value("ngAudioGlobals",{muting:!1,performance:25,unlock:!0,volume:1}).factory("NgAudioObject",["cleverAudioFindingService","$rootScope","$interval","$timeout","ngAudioGlobals",function(a,b,c,d,e){return function(d,f){function g(){o.play(),o.pause(),window.removeEventListener("click",g)}function h(){w||(A&&c.cancel(A),l&&l(),k&&k(),w=!0)}function i(){w||(k=x.$watch(function(){return{volume:y.volume,currentTime:y.currentTime,progress:y.progress,muting:y.muting,loop:y.loop,playbackRate:y.playbackRate,globalVolume:e.volume}},function(a,b){a.currentTime!==b.currentTime&&y.setCurrentTime(a.currentTime),a.progress!==b.progress&&y.setProgress(a.progress),a.volume!==b.volume&&y.setVolume(a.volume),a.playbackRate!==b.playbackRate&&y.setPlaybackRate(a.playbackRate),a.globalVolume!==b.globalVolume&&(0===a.globalVolume?y.setMuting(!0):(y.setMuting(!1),y.setVolume(a.globalVolume))),n=a.loop,a.muting!==b.muting&&y.setMuting(a.muting)},!0))}function j(){if(k&&k(),o){if(u||e.muting?o.volume=0:o.volume=void 0!==y.volume?y.volume:1,p&&(o.play(),p=!1),r&&(o.src="about:blank",r=!1),q&&(o.pause(),q=!1),s&&(o.playbackRate=t,s=!1),m&&(o.volume=m,m=void 0),v){y.currentTime=o.currentTime,y.duration=o.duration,y.remaining=o.duration-o.currentTime,y.progress=0,y.paused=o.paused,y.src=o.src;var a=o.currentTime/o.duration;a>0&&(y.progress=a),y.currentTime>=y.duration&&z.forEach(function(a){a(y)}),n&&y.currentTime>=y.duration&&(n!==!0&&(n--,y.loop--),y.setCurrentTime(0),y.play())}u||e.muting||(y.volume=o.volume),y.audio=o}i()}var k,l,m,n,o,p=!1,q=!1,r=!1,s=!1,t=!1,u=!1,v=!0,w=!1,x=f||b,y=this;this.id=d,this.safeId=d.replace("/","|"),this.loop=0,this.unbind=function(){v=!1},this.play=function(){return p=!0,this};var z=[];this.complete=function(a){z.push(a)},this.pause=function(){q=!0},this.restart=function(){r=!0},this.stop=function(){this.restart()},this.setVolume=function(a){m=a},this.setPlaybackRate=function(a){t=a,s=!0},this.setMuting=function(a){u=a},this.setProgress=function(a){o&&o.duration&&isFinite(a)&&(o.currentTime=o.duration*a)},this.setCurrentTime=function(a){o&&o.duration&&(o.currentTime=a)},this.destroy=h,x.$on("$destroy",function(){h()}),a.find(d).then(function(a){o=a,e.unlock&&(window.addEventListener("click",g),o.addEventListener("playing",function(){window.removeEventListener("click",g)})),o.addEventListener("canplay",function(){y.canPlay=!0})},function(a){y.error=!0,console.warn(a)});var A=c(j,e.performance);l=x.$watch(function(){return e.performance},function(){c.cancel(A),A=c(j,e.performance)})}}]).service("ngAudio",["NgAudioObject","ngAudioGlobals",function(a,b){this.play=function(b,c){var d=new a(b,c);return d.play(),d},this.load=function(b,c){return new a(b,c)},this.mute=function(){b.muting=!0},this.unmute=function(){b.muting=!1},this.toggleMute=function(){b.muting=!b.muting},this.setUnlock=function(a){b.unlock=a},this.setGlobalVolume=function(a){b.volume=a}}]).filter("trackTime",function(){return function(a){var b=Math.floor(0|a),c="",d=0,e=0,f=0;return b>3599?(d=Math.floor(b/3600),e=Math.floor((b-3600*d)/60),f=b-(60*e+3600*d),1==d.toString().length&&(d="0"+Math.floor(b/3600).toString()),1==e.toString().length&&(e="0"+Math.floor((b-3600*d)/60).toString()),1==f.toString().length&&(f="0"+(b-(60*e+3600*d)).toString()),c=d+":"+e+":"+f):b>59?(e=Math.floor(b/60),f=b-60*e,1==e.toString().length&&(e="0"+Math.floor(b/60).toString()),1==f.toString().length&&(f="0"+(b-60*e).toString()),c=e+":"+f):(f=b,1==f.toString().length&&(f="0"+b.toString()),c=b+"s"),"function"==typeof Number.isNaN&&Number.isNaN(c),c}}),function(){"use strict";angular.module("ngEmoticons",["ngSanitize"]).filter("emoticons",["$sce",function(a){var b=[{text:":)","class":"smiley",code:"e60a"},{text:":D","class":"happy",code:"e608"},{text:":d","class":"happy",code:"e608"},{text:":(","class":"sad",code:"e60e"},{text:":/","class":"wondering",code:"e620"},{text:":P","class":"tongue",code:"e60c"},{text:":p","class":"tongue",code:"e60c"},{text:"3:)","class":"evil",code:"e618"},{text:"(^)","class":"thumbsup2",code:"e607"},{text:";)","class":"wink",code:"e610"},{text:":o","class":"shocked",code:"e61a"},{text:"-_-","class":"neutral",code:"e61e"},{text:"(y)","class":"thumbs-up",code:"e606"},{text:":*","class":"heart",code:"e604"},{text:"<3","class":"heart",code:"e604"},{text:"<3","class":"heart",code:"e604"},{text:"</3","class":"heart-broken",code:"e605"},{text:"&#x'+a.code+"")}),c.join(" ")}function h(a){var b=/((href|src)=["']|)(\b(https?|ftp|file):\/\/[-A-Z0-9+()&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,c=a.replace(b,function(a){return''+a+""});return c}function i(a){var b=new RegExp(":("+c.join("|")+"):","g");return a.replace(b,function(a,b){return""})}var j={link:!0,linkTarget:"_self"};return f(j,e),void 0!==d&&null!==d?"object"==typeof d?d:(d=g(d),d=i(d),j.link&&(d=h(d)),a.trustAsHtml(d)):void 0}}]).directive("ngEmoticons",["$filter","$sce","$http","$timeout","$templateCache",function(a,b,c,d,e){var f="",g='
        {{video.description}}
        {{video.views}} {{video.likes}}
        ';return e.put(f,g),{restrict:"AE",scope:!0,templateUrl:function(a,b){return b.emoticonsTemplateUrl||f},link:function(e,f,g){function h(a){return angular.forEach(arguments,function(b){b!==a&&angular.forEach(b,function(b,c){a[c]&&a[c].constructor&&a[c].constructor===Object?h(a[c],b):a[c]=b})}),a}var i=e.$eval(g.emoticonsData),j=e.$eval(g.emoticonsOptions);e.video={},e.image={},e.pdf={},e.audio={};var k={link:!0,linkTarget:"_self",pdf:{embed:!0},image:{embed:!1},audio:{embed:!0},code:{highlight:!0,lineNumbers:!1},basicVideo:!1,video:{embed:!1,width:null,height:null,ytTheme:"dark",details:!1,thumbnailQuality:"medium",ytAuthKey:null}};h(k,j),String.prototype.trunc=function(a,b){var c=this.length>a,d=c?this.substr(0,a-1):this;return d=b&&c?d.substr(0,d.lastIndexOf(" ")):d,c?d+"...":d};var l={calcDimensions:function(a){var b={width:null,height:null};return b.width=a.video.width,b.height=a.video.height,a.video.height&&a.video.width?b:a.video.height?(b.width=a.video.height/390*640,b):a.video.width?(b.height=b.width/640*390,b):(b.width=640,b.height=390,b)},embed:function(a,d){var f=/https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com(?:\/embed\/|\/v\/|\/watch\?v=|\/ytscreeningroom\?v=|\/feeds\/api\/videos\/|\/user\S*[^\w\-\s]|\S*[^\w\-\s]))([\w\-]{11})[?=&+%\w-]*/gi;if(a.match(f)){var g=this.calcDimensions(d);return e.video.id=RegExp.$1,d.video.details?c.get("https://www.googleapis.com/youtube/v3/videos?id="+RegExp.$1+"&key="+d.video.ytAuthKey+"&part=snippet,statistics").success(function(a){var c=a.items[0];e.video.host="youtube",e.video.title=c.snippet.title,e.video.thumbnail=c.snippet.thumbnails.medium.url,e.video.description=c.snippet.description.trunc(250,!0).replace(/\n/g," ").replace(/ /g," "),e.video.rawDescription=c.snippet.description,e.video.views=c.statistics.viewCount,e.video.likes=c.statistics.likeCount,e.video.uploader=c.snippet.channelTitle,e.video.uploaderPage="https://www.youtube.com/channel/"+c.snippet.channelId,e.video.uploadDate=c.snippet.publishedAt,e.video.url=b.trustAsResourceUrl("https://www.youtube.com/watch?v="+c.id),e.video.embedSrc=b.trustAsResourceUrl("https://www.youtube.com/embed/"+e.video.id+"?autoplay=1"),e.video.width=g.width,e.video.height=g.height}):(e.video.width=g.width,e.video.height=g.height,e.video.host="youtube",e.video.embedSrc=b.trustAsResourceUrl("https://www.youtube.com/embed/"+RegExp.$1+"?autoplay=0")),a}var h=/https?:\/\/(?:www\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|)(\d+)(?:$|\/|\?)*/gi;if(a.match(h)){var i=this.calcDimensions(d);e.video.id=RegExp.$3,d.video.details?c.get("https://vimeo.com/api/v2/video/"+RegExp.$3+".json").success(function(a){e.video.host="vimeo",e.video.title=a[0].title,e.video.rawDescription=a[0].description.replace(/\n/g,"
        ").replace(/ /g,"
        "),e.video.description=a[0].description.replace(/((<|<)br\s*\/*(>|>)\r\n)/g," ").trunc(250,!0),e.video.thumbnail=a[0].thumbnail_medium,e.video.views=a[0].stats_number_of_plays,e.video.likes=a[0].stats_number_of_likes,e.video.uploader=a[0].user_name,e.video.uploaderPage=a[0].user_url,e.video.uploadDate=a[0].uploadDate,e.video.url=a[0].url,e.video.embedSrc=b.trustAsResourceUrl("//player.vimeo.com/video/"+a[0].id+"?title=0&byline=0&portrait=0&autoplay=1"),e.video.width=i.width,e.video.height=i.height}):(e.video.width=i.width,e.video.height=i.height,e.video.host="vimeo",e.video.embedSrc=b.trustAsResourceUrl("//player.vimeo.com/video/"+RegExp.$3+"?title=0&byline=0&portrait=0&autoplay=0")); +}return a},embedBasic:function(a){var c=/((?:https?):\/\/\S*\.(?:ogv|webm|mp4))/gi;return a.match(c)&&(e.video.basic=b.trustAsResourceUrl(RegExp.$1)),a}},m={embed:function(a){var c=/((?:https?):\/\/\S*\.(?:wav|mp3|ogg))/gi;return a.match(c)&&(e.audio.url=b.trustAsResourceUrl(RegExp.$1)),a}},n={embed:function(a){var b=/((?:https?):\/\/\S*\.(?:gif|jpg|jpeg|tiff|png|svg|webp))/gi;return a.match(b)&&(e.image.url=RegExp.$1),a}},o={encodeCode:function(a){return a=a.replace(/\&/gm,"&"),a=a.replace(//gm,">")},getCode:function(a){var b=this;return a=a.replace(/(`+)(\s|[a-z]+)\s*([\s\S]*?[^`])\s*\1(?!`)/gm,function(a,c,d,e){var f=e;return f=f.replace(/^([ \t]*)/g,""),f=f.replace(/[ \t]*$/g,""),f=b.encodeCode(f),f=f.replace(/:\/\//g,"~P"),'
        '+f+"
        "})}},p={embed:function(a){var c=/((?:https?):\/\/\S*\.(?:pdf|PDF))/gi;return a.match(c)&&(e.pdf.url=b.trustAsResourceUrl(RegExp.$1)),a}};if(k.code.highlight){if(!window.hljs)throw"hlsj (Highlight JS is not defined.";i=o.getCode(i),d(function(){hljs.initHighlighting(),k.code.lineNumbers&&angular.element(".ne-code").each(function(){var a=1,b=$(this).text().split("\n").length,c=$("
          ").addClass("pre-numbering");for(angular.element(this).addClass("has-numbering").parent().append(c),a;b>=a;a++)c.append(angular.element("
        • ").text(a))})},0)}var q=a("emoticons")(i,k).$$unwrapTrustedValue();if(k.video.embed){if(!k.video.ytAuthKey)throw"Youtube authentication key is required to get data from youtube.";q=l.embed(q,k)}k.basicVideo&&(q=l.embedBasic(q)),k.audio.embed&&(q=m.embed(q)),k.image.embed&&(q=n.embed(q)),k.pdf.embed&&(q=p.embed(q)),e.neText=b.trustAsHtml(q)}}}]).directive("neHljs",["$timeout",function(a){return{restrict:"AE",link:function(b,c){a(function(){c.find(".ne-code").each(function(){hljs.highlightBlock(this)})},0)}}}])}(),function(a){"undefined"!=typeof exports?a(exports):(window.hljs=a({}),"function"==typeof define&&define.amd&&define("hljs",[],function(){return window.hljs}))}(function(a){function b(a){return a.replace(/&/gm,"&").replace(//gm,">")}function c(a){return a.nodeName.toLowerCase()}function d(a,b){var c=a&&a.exec(b);return c&&0==c.index}function e(a){return/^(no-?highlight|plain|text)$/i.test(a)}function f(a){var b,c,d,f=a.className+" ";if(f+=a.parentNode?a.parentNode.className:"",c=/\blang(?:uage)?-([\w-]+)\b/i.exec(f))return u(c[1])?c[1]:"no-highlight";for(f=f.split(/\s+/),b=0,d=f.length;d>b;b++)if(u(f[b])||e(f[b]))return f[b]}function g(a,b){var c,d={};for(c in a)d[c]=a[c];if(b)for(c in b)d[c]=b[c];return d}function h(a){var b=[];return function d(a,e){for(var f=a.firstChild;f;f=f.nextSibling)3==f.nodeType?e+=f.nodeValue.length:1==f.nodeType&&(b.push({event:"start",offset:e,node:f}),e=d(f,e),c(f).match(/br|hr|img|input/)||b.push({event:"stop",offset:e,node:f}));return e}(a,0),b}function i(a,d,e){function f(){return a.length&&d.length?a[0].offset!=d[0].offset?a[0].offset"}function h(a){k+=""}function i(a){("start"==a.event?g:h)(a.node)}for(var j=0,k="",l=[];a.length||d.length;){var m=f();if(k+=b(e.substr(j,m[0].offset-j)),j=m[0].offset,m==a){l.reverse().forEach(h);do i(m.splice(0,1)[0]),m=f();while(m==a&&m.length&&m[0].offset==j);l.reverse().forEach(g)}else"start"==m[0].event?l.push(m[0].node):l.pop(),i(m.splice(0,1)[0])}return k+b(e.substr(j))}function j(a){function b(a){return a&&a.source||a}function c(c,d){return new RegExp(b(c),"m"+(a.case_insensitive?"i":"")+(d?"g":""))}function d(e,f){if(!e.compiled){if(e.compiled=!0,e.keywords=e.keywords||e.beginKeywords,e.keywords){var h={},i=function(b,c){a.case_insensitive&&(c=c.toLowerCase()),c.split(" ").forEach(function(a){var c=a.split("|");h[c[0]]=[b,c[1]?Number(c[1]):1]})};"string"==typeof e.keywords?i("keyword",e.keywords):Object.keys(e.keywords).forEach(function(a){i(a,e.keywords[a])}),e.keywords=h}e.lexemesRe=c(e.lexemes||/\b\w+\b/,!0),f&&(e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")\\b"),e.begin||(e.begin=/\B|\b/),e.beginRe=c(e.begin),e.end||e.endsWithParent||(e.end=/\B|\b/),e.end&&(e.endRe=c(e.end)),e.terminator_end=b(e.end)||"",e.endsWithParent&&f.terminator_end&&(e.terminator_end+=(e.end?"|":"")+f.terminator_end)),e.illegal&&(e.illegalRe=c(e.illegal)),void 0===e.relevance&&(e.relevance=1),e.contains||(e.contains=[]);var j=[];e.contains.forEach(function(a){a.variants?a.variants.forEach(function(b){j.push(g(a,b))}):j.push("self"==a?e:a)}),e.contains=j,e.contains.forEach(function(a){d(a,e)}),e.starts&&d(e.starts,f);var k=e.contains.map(function(a){return a.beginKeywords?"\\.?("+a.begin+")\\.?":a.begin}).concat([e.terminator_end,e.illegal]).map(b).filter(Boolean);e.terminators=k.length?c(k.join("|"),!0):{exec:function(){return null}}}}d(a)}function k(a,c,e,f){function g(a,b){for(var c=0;c";return f+=a+'">',f+b+g}function o(){if(!y.keywords)return b(B);var a="",c=0;y.lexemesRe.lastIndex=0;for(var d=y.lexemesRe.exec(B);d;){a+=b(B.substr(c,d.index-c));var e=m(y,d);e?(C+=e[1],a+=n(e[0],b(d[0]))):a+=b(d[0]),c=y.lexemesRe.lastIndex,d=y.lexemesRe.exec(B)}return a+b(B.substr(c))}function p(){var a="string"==typeof y.subLanguage;if(a&&!w[y.subLanguage])return b(B);var c=a?k(y.subLanguage,B,!0,z[y.subLanguage]):l(B,y.subLanguage.length?y.subLanguage:void 0);return y.relevance>0&&(C+=c.relevance),a&&(z[y.subLanguage]=c.top),n(c.language,c.value,!1,!0)}function q(){return void 0!==y.subLanguage?p():o()}function r(a,c){var d=a.className?n(a.className,"",!0):"";a.returnBegin?(A+=d,B=""):a.excludeBegin?(A+=b(c)+d,B=""):(A+=d,B=c),y=Object.create(a,{parent:{value:y}})}function s(a,c){if(B+=a,void 0===c)return A+=q(),0;var d=g(c,y);if(d)return A+=q(),r(d,c),d.returnBegin?0:c.length;var e=h(y,c);if(e){var f=y;f.returnEnd||f.excludeEnd||(B+=c),A+=q();do y.className&&(A+=""),C+=y.relevance,y=y.parent;while(y!=e.parent);return f.excludeEnd&&(A+=b(c)),B="",e.starts&&r(e.starts,""),f.returnEnd?0:c.length}if(i(c,y))throw new Error('Illegal lexeme "'+c+'" for mode "'+(y.className||"")+'"');return B+=c,c.length||1}var t=u(a);if(!t)throw new Error('Unknown language: "'+a+'"');j(t);var x,y=f||t,z={},A="";for(x=y;x!=t;x=x.parent)x.className&&(A=n(x.className,"",!0)+A);var B="",C=0;try{for(var D,E,F=0;;){if(y.terminators.lastIndex=F,D=y.terminators.exec(c),!D)break;E=s(c.substr(F,D.index-F),D[0]),F=D.index+E}for(s(c.substr(F)),x=y;x.parent;x=x.parent)x.className&&(A+="");return{relevance:C,value:A,language:a,top:y}}catch(G){if(-1!=G.message.indexOf("Illegal"))return{relevance:0,value:b(c)};throw G}}function l(a,c){c=c||v.languages||Object.keys(w);var d={relevance:0,value:b(a)},e=d;return c.forEach(function(b){if(u(b)){var c=k(b,a,!1);c.language=b,c.relevance>e.relevance&&(e=c),c.relevance>d.relevance&&(e=d,d=c)}}),e.language&&(d.second_best=e),d}function m(a){return v.tabReplace&&(a=a.replace(/^((<[^>]+>|\t)+)/gm,function(a,b){return b.replace(/\t/g,v.tabReplace)})),v.useBR&&(a=a.replace(/\n/g,"
          ")),a}function n(a,b,c){var d=b?x[b]:c,e=[a.trim()];return a.match(/\bhljs\b/)||e.push("hljs"),-1===a.indexOf(d)&&e.push(d),e.join(" ").trim()}function o(a){var b=f(a);if(!e(b)){var c;v.useBR?(c=document.createElementNS("http://www.w3.org/1999/xhtml","div"),c.innerHTML=a.innerHTML.replace(/\n/g,"").replace(//g,"\n")):c=a;var d=c.textContent,g=b?k(b,d,!0):l(d),j=h(c);if(j.length){var o=document.createElementNS("http://www.w3.org/1999/xhtml","div");o.innerHTML=g.value,g.value=i(j,h(o),d)}g.value=m(g.value),a.innerHTML=g.value,a.className=n(a.className,b,g.language),a.result={language:g.language,re:g.relevance},g.second_best&&(a.second_best={language:g.second_best.language,re:g.second_best.relevance})}}function p(a){v=g(v,a)}function q(){if(!q.called){q.called=!0;var a=document.querySelectorAll("pre code");Array.prototype.forEach.call(a,o)}}function r(){addEventListener("DOMContentLoaded",q,!1),addEventListener("load",q,!1)}function s(b,c){var d=w[b]=c(a);d.aliases&&d.aliases.forEach(function(a){x[a]=b})}function t(){return Object.keys(w)}function u(a){return a=(a||"").toLowerCase(),w[a]||w[x[a]]}var v={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},w={},x={};return a.highlight=k,a.highlightAuto=l,a.fixMarkup=m,a.highlightBlock=o,a.configure=p,a.initHighlighting=q,a.initHighlightingOnLoad=r,a.registerLanguage=s,a.listLanguages=t,a.getLanguage=u,a.inherit=g,a.IDENT_RE="[a-zA-Z]\\w*",a.UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",a.NUMBER_RE="\\b\\d+(\\.\\d+)?",a.C_NUMBER_RE="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",a.BINARY_NUMBER_RE="\\b(0b[01]+)",a.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",a.BACKSLASH_ESCAPE={begin:"\\\\[\\s\\S]",relevance:0},a.APOS_STRING_MODE={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[a.BACKSLASH_ESCAPE]},a.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[a.BACKSLASH_ESCAPE]},a.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},a.COMMENT=function(b,c,d){var e=a.inherit({className:"comment",begin:b,end:c,contains:[]},d||{});return e.contains.push(a.PHRASAL_WORDS_MODE),e.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|XXX):",relevance:0}),e},a.C_LINE_COMMENT_MODE=a.COMMENT("//","$"),a.C_BLOCK_COMMENT_MODE=a.COMMENT("/\\*","\\*/"),a.HASH_COMMENT_MODE=a.COMMENT("#","$"),a.NUMBER_MODE={className:"number",begin:a.NUMBER_RE,relevance:0},a.C_NUMBER_MODE={className:"number",begin:a.C_NUMBER_RE,relevance:0},a.BINARY_NUMBER_MODE={className:"number",begin:a.BINARY_NUMBER_RE,relevance:0},a.CSS_NUMBER_MODE={className:"number",begin:a.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},a.REGEXP_MODE={className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[a.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[a.BACKSLASH_ESCAPE]}]},a.TITLE_MODE={className:"title",begin:a.IDENT_RE,relevance:0},a.UNDERSCORE_TITLE_MODE={className:"title",begin:a.UNDERSCORE_IDENT_RE,relevance:0},a.registerLanguage("1c",function(a){var b="[a-zA-Zа-яА-Я][a-zA-Z0-9_а-яА-Я]*",c="возврат дата для если и или иначе иначеесли исключение конецесли конецпопытки конецпроцедуры конецфункции конеццикла константа не перейти перем перечисление по пока попытка прервать продолжить процедура строка тогда фс функция цикл число экспорт",d="ansitooem oemtoansi ввестивидсубконто ввестидату ввестизначение ввестиперечисление ввестипериод ввестиплансчетов ввестистроку ввестичисло вопрос восстановитьзначение врег выбранныйплансчетов вызватьисключение датагод датамесяц датачисло добавитьмесяц завершитьработусистемы заголовоксистемы записьжурналарегистрации запуститьприложение зафиксироватьтранзакцию значениевстроку значениевстрокувнутр значениевфайл значениеизстроки значениеизстрокивнутр значениеизфайла имякомпьютера имяпользователя каталогвременныхфайлов каталогиб каталогпользователя каталогпрограммы кодсимв командасистемы конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лев лог лог10 макс максимальноеколичествосубконто мин монопольныйрежим названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найти найтипомеченныенаудаление найтиссылки началопериодаби началостандартногоинтервала начатьтранзакцию начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода нрег обработкаожидания окр описаниеошибки основнойжурналрасчетов основнойплансчетов основнойязык открытьформу открытьформумодально отменитьтранзакцию очиститьокносообщений периодстр полноеимяпользователя получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта прав праводоступа предупреждение префиксавтонумерации пустаястрока пустоезначение рабочаядаттьпустоезначение рабочаядата разделительстраниц разделительстрок разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо сигнал симв символтабуляции создатьобъект сокрл сокрлп сокрп сообщить состояние сохранитьзначение сред статусвозврата стрдлина стрзаменить стрколичествострок стрполучитьстроку стрчисловхождений сформироватьпозициюдокумента счетпокоду текущаядата текущеевремя типзначения типзначениястр удалитьобъекты установитьтана установитьтапо фиксшаблон формат цел шаблон",e={className:"dquote",begin:'""'},f={className:"string",begin:'"',end:'"|$',contains:[e]},g={className:"string",begin:"\\|",end:'"|$',contains:[e]};return{case_insensitive:!0,lexemes:b,keywords:{keyword:c,built_in:d},contains:[a.C_LINE_COMMENT_MODE,a.NUMBER_MODE,f,g,{className:"function",begin:"(процедура|функция)",end:"$",lexemes:b,keywords:"процедура функция",contains:[a.inherit(a.TITLE_MODE,{begin:b}),{className:"tail",endsWithParent:!0,contains:[{className:"params",begin:"\\(",end:"\\)",lexemes:b,keywords:"знач",contains:[f,g]},{className:"export",begin:"экспорт",endsWithParent:!0,lexemes:b,keywords:"экспорт",contains:[a.C_LINE_COMMENT_MODE]}]},a.C_LINE_COMMENT_MODE]},{className:"preprocessor",begin:"#",end:"$"},{className:"date",begin:"'\\d{2}\\.\\d{2}\\.(\\d{2}|\\d{4})'"}]}}),a.registerLanguage("accesslog",function(a){return{contains:[{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+\\b",relevance:0},{className:"string",begin:'"(GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|PATCH|TRACE)',end:'"',keywords:"GET POST HEAD PUT DELETE CONNECT OPTIONS PATCH TRACE",illegal:"\\n",relevance:10},{className:"string",begin:/\[/,end:/\]/,illegal:"\\n"},{className:"string",begin:'"',end:'"',illegal:"\\n"}]}}),a.registerLanguage("actionscript",function(a){var b="[a-zA-Z_$][a-zA-Z0-9_$]*",c="([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)",d={className:"rest_arg",begin:"[.]{3}",end:b,relevance:10};return{aliases:["as"],keywords:{keyword:"as break case catch class const continue default delete do dynamic each else extends final finally for function get if implements import in include instanceof interface internal is namespace native new override package private protected public return set static super switch this throw try typeof use var void while with",literal:"true false null undefined"},contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.C_NUMBER_MODE,{className:"package",beginKeywords:"package",end:"{",contains:[a.TITLE_MODE]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},a.TITLE_MODE]},{className:"preprocessor",beginKeywords:"import include",end:";"},{className:"function",beginKeywords:"function",end:"[{;]",excludeEnd:!0,illegal:"\\S",contains:[a.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,d]},{className:"type",begin:":",end:c,relevance:10}]}],illegal:/#/}}),a.registerLanguage("apache",function(a){var b={className:"number",begin:"[\\$%]\\d+"};return{aliases:["apacheconf"],case_insensitive:!0,contains:[a.HASH_COMMENT_MODE,{className:"tag",begin:""},{className:"keyword",begin:/\w+/,relevance:0,keywords:{common:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{end:/$/,relevance:0,keywords:{literal:"on off all"},contains:[{className:"sqbracket",begin:"\\s\\[",end:"\\]$"},{className:"cbracket",begin:"[\\$%]\\{",end:"\\}",contains:["self",b]},b,a.QUOTE_STRING_MODE]}}],illegal:/\S/}}),a.registerLanguage("applescript",function(a){var b=a.inherit(a.QUOTE_STRING_MODE,{illegal:""}),c={className:"params",begin:"\\(",end:"\\)",contains:["self",a.C_NUMBER_MODE,b]},d=a.COMMENT("--","$"),e=a.COMMENT("\\(\\*","\\*\\)",{contains:["self",d]}),f=[d,e,a.HASH_COMMENT_MODE];return{aliases:["osascript"],keywords:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the|0 then third through thru timeout times to transaction try until where while whose with without",constant:"AppleScript false linefeed return pi quote result space tab true",type:"alias application boolean class constant date file integer list number real record string text",command:"activate beep count delay launch log offset read round run say summarize write",property:"character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year"},contains:[b,a.C_NUMBER_MODE,{className:"type",begin:"\\bPOSIX file\\b"},{className:"command",begin:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"},{className:"constant",begin:"\\b(text item delimiters|current application|missing value)\\b"},{className:"keyword",begin:"\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference))\\b"},{className:"property",begin:"\\b(POSIX path|(date|time) string|quoted form)\\b"},{className:"function_start",beginKeywords:"on",illegal:"[${=;\\n]",contains:[a.UNDERSCORE_TITLE_MODE,c]}].concat(f),illegal:"//|->|=>|\\[\\["}}),a.registerLanguage("armasm",function(a){return{case_insensitive:!0,aliases:["arm"],lexemes:"\\.?"+a.IDENT_RE,keywords:{literal:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 ",preprocessor:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"{PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @ "},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?",end:"\\s"},a.COMMENT("[;@]","$",{relevance:0}),a.C_BLOCK_COMMENT_MODE,a.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"[#$=]?0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"label",variants:[{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"[=#]\\w+"}],relevance:0}]}}),a.registerLanguage("xml",function(a){var b="[A-Za-z0-9\\._:-]+",c={begin:/<\?(php)?(?!\w)/,end:/\?>/,subLanguage:"php"},d={endsWithParent:!0,illegal:/]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],case_insensitive:!0,contains:[{className:"doctype",begin:"",relevance:10,contains:[{begin:"\\[",end:"\\]"}]},a.COMMENT("",{relevance:10}),{className:"cdata",begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},{className:"tag",begin:"|$)",end:">",keywords:{title:"style"},contains:[d],starts:{end:"",returnEnd:!0,subLanguage:"css"}},{className:"tag",begin:"|$)",end:">",keywords:{title:"script"},contains:[d],starts:{end:"",returnEnd:!0,subLanguage:["actionscript","javascript","handlebars"]}},c,{className:"pi",begin:/<\?\w+/,end:/\?>/,relevance:10},{className:"tag",begin:"",contains:[{className:"title",begin:/[^ \/><\n\t]+/,relevance:0},d]}]}}),a.registerLanguage("asciidoc",function(a){return{aliases:["adoc"],contains:[a.COMMENT("^/{4,}\\n","\\n/{4,}$",{relevance:10}),a.COMMENT("^//","$",{relevance:0}),{className:"title",begin:"^\\.\\w.*$"},{begin:"^[=\\*]{4,}\\n",end:"\\n^[=\\*]{4,}$",relevance:10},{className:"header",begin:"^(={1,5}) .+?( \\1)?$",relevance:10},{className:"header",begin:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$",relevance:10},{className:"attribute",begin:"^:.+?:",end:"\\s",excludeEnd:!0,relevance:10},{className:"attribute",begin:"^\\[.+?\\]$",relevance:0},{className:"blockquote",begin:"^_{4,}\\n",end:"\\n_{4,}$",relevance:10},{className:"code",begin:"^[\\-\\.]{4,}\\n",end:"\\n[\\-\\.]{4,}$",relevance:10},{begin:"^\\+{4,}\\n",end:"\\n\\+{4,}$",contains:[{begin:"<",end:">",subLanguage:"xml",relevance:0}],relevance:10},{className:"bullet",begin:"^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+"},{className:"label",begin:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",relevance:10},{className:"strong",begin:"\\B\\*(?![\\*\\s])",end:"(\\n{2}|\\*)",contains:[{begin:"\\\\*\\w",relevance:0}]},{className:"emphasis",begin:"\\B'(?!['\\s])",end:"(\\n{2}|')",contains:[{begin:"\\\\'\\w",relevance:0}],relevance:0},{className:"emphasis",begin:"_(?![_\\s])",end:"(\\n{2}|_)",relevance:0},{className:"smartquote",variants:[{begin:"``.+?''"},{begin:"`.+?'"}]},{className:"code",begin:"(`.+?`|\\+.+?\\+)",relevance:0},{className:"code",begin:"^[ \\t]",end:"$",relevance:0},{className:"horizontal_rule",begin:"^'{3,}[ \\t]*$",relevance:10},{begin:"(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]",returnBegin:!0,contains:[{begin:"(link|image:?):",relevance:0},{className:"link_url",begin:"\\w",end:"[^\\[]+",relevance:0},{className:"link_label",begin:"\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0,relevance:0}],relevance:10}]}}),a.registerLanguage("aspectj",function(a){var b="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else extends implements break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws privileged aspectOf adviceexecution proceed cflowbelow cflow initialization preinitialization staticinitialization withincode target within execution getWithinTypeName handler thisJoinPoint thisJoinPointStaticPart thisEnclosingJoinPointStaticPart declare parents warning error soft precedence thisAspectInstance",c="get set args call";return{keywords:b,illegal:/<\/|#/,contains:[a.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{className:"aspect",beginKeywords:"aspect",end:/[{;=]/,excludeEnd:!0,illegal:/[:;"\[\]]/,contains:[{beginKeywords:"extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton"},a.UNDERSCORE_TITLE_MODE,{begin:/\([^\)]*/,end:/[)]+/,keywords:b+" "+c,excludeEnd:!1}]},{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,relevance:0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]},{beginKeywords:"pointcut after before around throwing returning",end:/[)]/,excludeEnd:!1,illegal:/["\[\]]/,contains:[{begin:a.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,contains:[a.UNDERSCORE_TITLE_MODE]}]},{begin:/[:]/,returnBegin:!0,end:/[{;]/,relevance:0,excludeEnd:!1,keywords:b,illegal:/["\[\]]/,contains:[{begin:a.UNDERSCORE_IDENT_RE+"\\s*\\(",keywords:b+" "+c},a.QUOTE_STRING_MODE]},{beginKeywords:"new throw",relevance:0},{className:"function",begin:/\w+ +\w+(\.)?\w+\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/,returnBegin:!0,end:/[{;=]/,keywords:b,excludeEnd:!0,contains:[{begin:a.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[a.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,relevance:0,keywords:b,contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,a.C_BLOCK_COMMENT_MODE]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},a.C_NUMBER_MODE,{className:"annotation",begin:"@[A-Za-z]+"}]}}),a.registerLanguage("autohotkey",function(a){var b={className:"escape",begin:"`[\\s\\S]"},c=a.COMMENT(";","$",{relevance:0}),d=[{className:"built_in",begin:"A_[a-zA-Z0-9]+"},{className:"built_in",beginKeywords:"ComSpec Clipboard ClipboardAll ErrorLevel"}];return{case_insensitive:!0,keywords:{keyword:"Break Continue Else Gosub If Loop Return While",literal:"A true false NOT AND OR"},contains:d.concat([b,a.inherit(a.QUOTE_STRING_MODE,{contains:[b]}),c,{className:"number",begin:a.NUMBER_RE,relevance:0},{className:"var_expand",begin:"%",end:"%",illegal:"\\n",contains:[b]},{className:"label",contains:[b],variants:[{begin:'^[^\\n";]+::(?!=)'},{begin:'^[^\\n";]+:(?!=)',relevance:0}]},{begin:",\\s*,",relevance:10}])}}),a.registerLanguage("autoit",function(a){var b="ByRef Case Const ContinueCase ContinueLoop Default Dim Do Else ElseIf EndFunc EndIf EndSelect EndSwitch EndWith Enum Exit ExitLoop For Func Global If In Local Next ReDim Return Select Static Step Switch Then To Until Volatile WEnd While With",c="True False And Null Not Or",d="Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Opt Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown TCPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent TrayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend UDPShutdown UDPStartup VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait WinWaitActive WinWaitClose WinWaitNotActive Array1DToHistogram ArrayAdd ArrayBinarySearch ArrayColDelete ArrayColInsert ArrayCombinations ArrayConcatenate ArrayDelete ArrayDisplay ArrayExtract ArrayFindAll ArrayInsert ArrayMax ArrayMaxIndex ArrayMin ArrayMinIndex ArrayPermute ArrayPop ArrayPush ArrayReverse ArraySearch ArrayShuffle ArraySort ArraySwap ArrayToClip ArrayToString ArrayTranspose ArrayTrim ArrayUnique Assert ChooseColor ChooseFont ClipBoard_ChangeChain ClipBoard_Close ClipBoard_CountFormats ClipBoard_Empty ClipBoard_EnumFormats ClipBoard_FormatStr ClipBoard_GetData ClipBoard_GetDataEx ClipBoard_GetFormatName ClipBoard_GetOpenWindow ClipBoard_GetOwner ClipBoard_GetPriorityFormat ClipBoard_GetSequenceNumber ClipBoard_GetViewer ClipBoard_IsFormatAvailable ClipBoard_Open ClipBoard_RegisterFormat ClipBoard_SetData ClipBoard_SetDataEx ClipBoard_SetViewer ClipPutFile ColorConvertHSLtoRGB ColorConvertRGBtoHSL ColorGetBlue ColorGetCOLORREF ColorGetGreen ColorGetRed ColorGetRGB ColorSetCOLORREF ColorSetRGB Crypt_DecryptData Crypt_DecryptFile Crypt_DeriveKey Crypt_DestroyKey Crypt_EncryptData Crypt_EncryptFile Crypt_GenRandom Crypt_HashData Crypt_HashFile Crypt_Shutdown Crypt_Startup DateAdd DateDayOfWeek DateDaysInMonth DateDiff DateIsLeapYear DateIsValid DateTimeFormat DateTimeSplit DateToDayOfWeek DateToDayOfWeekISO DateToDayValue DateToMonth Date_Time_CompareFileTime Date_Time_DOSDateTimeToArray Date_Time_DOSDateTimeToFileTime Date_Time_DOSDateTimeToStr Date_Time_DOSDateToArray Date_Time_DOSDateToStr Date_Time_DOSTimeToArray Date_Time_DOSTimeToStr Date_Time_EncodeFileTime Date_Time_EncodeSystemTime Date_Time_FileTimeToArray Date_Time_FileTimeToDOSDateTime Date_Time_FileTimeToLocalFileTime Date_Time_FileTimeToStr Date_Time_FileTimeToSystemTime Date_Time_GetFileTime Date_Time_GetLocalTime Date_Time_GetSystemTime Date_Time_GetSystemTimeAdjustment Date_Time_GetSystemTimeAsFileTime Date_Time_GetSystemTimes Date_Time_GetTickCount Date_Time_GetTimeZoneInformation Date_Time_LocalFileTimeToFileTime Date_Time_SetFileTime Date_Time_SetLocalTime Date_Time_SetSystemTime Date_Time_SetSystemTimeAdjustment Date_Time_SetTimeZoneInformation Date_Time_SystemTimeToArray Date_Time_SystemTimeToDateStr Date_Time_SystemTimeToDateTimeStr Date_Time_SystemTimeToFileTime Date_Time_SystemTimeToTimeStr Date_Time_SystemTimeToTzSpecificLocalTime Date_Time_TzSpecificLocalTimeToSystemTime DayValueToDate DebugBugReportEnv DebugCOMError DebugOut DebugReport DebugReportEx DebugReportVar DebugSetup Degree EventLog__Backup EventLog__Clear EventLog__Close EventLog__Count EventLog__DeregisterSource EventLog__Full EventLog__Notify EventLog__Oldest EventLog__Open EventLog__OpenBackup EventLog__Read EventLog__RegisterSource EventLog__Report Excel_BookAttach Excel_BookClose Excel_BookList Excel_BookNew Excel_BookOpen Excel_BookOpenText Excel_BookSave Excel_BookSaveAs Excel_Close Excel_ColumnToLetter Excel_ColumnToNumber Excel_ConvertFormula Excel_Export Excel_FilterGet Excel_FilterSet Excel_Open Excel_PictureAdd Excel_Print Excel_RangeCopyPaste Excel_RangeDelete Excel_RangeFind Excel_RangeInsert Excel_RangeLinkAddRemove Excel_RangeRead Excel_RangeReplace Excel_RangeSort Excel_RangeValidate Excel_RangeWrite Excel_SheetAdd Excel_SheetCopyMove Excel_SheetDelete Excel_SheetList FileCountLines FileCreate FileListToArray FileListToArrayRec FilePrint FileReadToArray FileWriteFromArray FileWriteLog FileWriteToLine FTP_Close FTP_Command FTP_Connect FTP_DecodeInternetStatus FTP_DirCreate FTP_DirDelete FTP_DirGetCurrent FTP_DirPutContents FTP_DirSetCurrent FTP_FileClose FTP_FileDelete FTP_FileGet FTP_FileGetSize FTP_FileOpen FTP_FilePut FTP_FileRead FTP_FileRename FTP_FileTimeLoHiToStr FTP_FindFileClose FTP_FindFileFirst FTP_FindFileNext FTP_GetLastResponseInfo FTP_ListToArray FTP_ListToArray2D FTP_ListToArrayEx FTP_Open FTP_ProgressDownload FTP_ProgressUpload FTP_SetStatusCallback GDIPlus_ArrowCapCreate GDIPlus_ArrowCapDispose GDIPlus_ArrowCapGetFillState GDIPlus_ArrowCapGetHeight GDIPlus_ArrowCapGetMiddleInset GDIPlus_ArrowCapGetWidth GDIPlus_ArrowCapSetFillState GDIPlus_ArrowCapSetHeight GDIPlus_ArrowCapSetMiddleInset GDIPlus_ArrowCapSetWidth GDIPlus_BitmapApplyEffect GDIPlus_BitmapApplyEffectEx GDIPlus_BitmapCloneArea GDIPlus_BitmapConvertFormat GDIPlus_BitmapCreateApplyEffect GDIPlus_BitmapCreateApplyEffectEx GDIPlus_BitmapCreateDIBFromBitmap GDIPlus_BitmapCreateFromFile GDIPlus_BitmapCreateFromGraphics GDIPlus_BitmapCreateFromHBITMAP GDIPlus_BitmapCreateFromHICON GDIPlus_BitmapCreateFromHICON32 GDIPlus_BitmapCreateFromMemory GDIPlus_BitmapCreateFromResource GDIPlus_BitmapCreateFromScan0 GDIPlus_BitmapCreateFromStream GDIPlus_BitmapCreateHBITMAPFromBitmap GDIPlus_BitmapDispose GDIPlus_BitmapGetHistogram GDIPlus_BitmapGetHistogramEx GDIPlus_BitmapGetHistogramSize GDIPlus_BitmapGetPixel GDIPlus_BitmapLockBits GDIPlus_BitmapSetPixel GDIPlus_BitmapUnlockBits GDIPlus_BrushClone GDIPlus_BrushCreateSolid GDIPlus_BrushDispose GDIPlus_BrushGetSolidColor GDIPlus_BrushGetType GDIPlus_BrushSetSolidColor GDIPlus_ColorMatrixCreate GDIPlus_ColorMatrixCreateGrayScale GDIPlus_ColorMatrixCreateNegative GDIPlus_ColorMatrixCreateSaturation GDIPlus_ColorMatrixCreateScale GDIPlus_ColorMatrixCreateTranslate GDIPlus_CustomLineCapClone GDIPlus_CustomLineCapCreate GDIPlus_CustomLineCapDispose GDIPlus_CustomLineCapGetStrokeCaps GDIPlus_CustomLineCapSetStrokeCaps GDIPlus_Decoders GDIPlus_DecodersGetCount GDIPlus_DecodersGetSize GDIPlus_DrawImageFX GDIPlus_DrawImageFXEx GDIPlus_DrawImagePoints GDIPlus_EffectCreate GDIPlus_EffectCreateBlur GDIPlus_EffectCreateBrightnessContrast GDIPlus_EffectCreateColorBalance GDIPlus_EffectCreateColorCurve GDIPlus_EffectCreateColorLUT GDIPlus_EffectCreateColorMatrix GDIPlus_EffectCreateHueSaturationLightness GDIPlus_EffectCreateLevels GDIPlus_EffectCreateRedEyeCorrection GDIPlus_EffectCreateSharpen GDIPlus_EffectCreateTint GDIPlus_EffectDispose GDIPlus_EffectGetParameters GDIPlus_EffectSetParameters GDIPlus_Encoders GDIPlus_EncodersGetCLSID GDIPlus_EncodersGetCount GDIPlus_EncodersGetParamList GDIPlus_EncodersGetParamListSize GDIPlus_EncodersGetSize GDIPlus_FontCreate GDIPlus_FontDispose GDIPlus_FontFamilyCreate GDIPlus_FontFamilyCreateFromCollection GDIPlus_FontFamilyDispose GDIPlus_FontFamilyGetCellAscent GDIPlus_FontFamilyGetCellDescent GDIPlus_FontFamilyGetEmHeight GDIPlus_FontFamilyGetLineSpacing GDIPlus_FontGetHeight GDIPlus_FontPrivateAddFont GDIPlus_FontPrivateAddMemoryFont GDIPlus_FontPrivateCollectionDispose GDIPlus_FontPrivateCreateCollection GDIPlus_GraphicsClear GDIPlus_GraphicsCreateFromHDC GDIPlus_GraphicsCreateFromHWND GDIPlus_GraphicsDispose GDIPlus_GraphicsDrawArc GDIPlus_GraphicsDrawBezier GDIPlus_GraphicsDrawClosedCurve GDIPlus_GraphicsDrawClosedCurve2 GDIPlus_GraphicsDrawCurve GDIPlus_GraphicsDrawCurve2 GDIPlus_GraphicsDrawEllipse GDIPlus_GraphicsDrawImage GDIPlus_GraphicsDrawImagePointsRect GDIPlus_GraphicsDrawImageRect GDIPlus_GraphicsDrawImageRectRect GDIPlus_GraphicsDrawLine GDIPlus_GraphicsDrawPath GDIPlus_GraphicsDrawPie GDIPlus_GraphicsDrawPolygon GDIPlus_GraphicsDrawRect GDIPlus_GraphicsDrawString GDIPlus_GraphicsDrawStringEx GDIPlus_GraphicsFillClosedCurve GDIPlus_GraphicsFillClosedCurve2 GDIPlus_GraphicsFillEllipse GDIPlus_GraphicsFillPath GDIPlus_GraphicsFillPie GDIPlus_GraphicsFillPolygon GDIPlus_GraphicsFillRect GDIPlus_GraphicsFillRegion GDIPlus_GraphicsGetCompositingMode GDIPlus_GraphicsGetCompositingQuality GDIPlus_GraphicsGetDC GDIPlus_GraphicsGetInterpolationMode GDIPlus_GraphicsGetSmoothingMode GDIPlus_GraphicsGetTransform GDIPlus_GraphicsMeasureCharacterRanges GDIPlus_GraphicsMeasureString GDIPlus_GraphicsReleaseDC GDIPlus_GraphicsResetClip GDIPlus_GraphicsResetTransform GDIPlus_GraphicsRestore GDIPlus_GraphicsRotateTransform GDIPlus_GraphicsSave GDIPlus_GraphicsScaleTransform GDIPlus_GraphicsSetClipPath GDIPlus_GraphicsSetClipRect GDIPlus_GraphicsSetClipRegion GDIPlus_GraphicsSetCompositingMode GDIPlus_GraphicsSetCompositingQuality GDIPlus_GraphicsSetInterpolationMode GDIPlus_GraphicsSetPixelOffsetMode GDIPlus_GraphicsSetSmoothingMode GDIPlus_GraphicsSetTextRenderingHint GDIPlus_GraphicsSetTransform GDIPlus_GraphicsTransformPoints GDIPlus_GraphicsTranslateTransform GDIPlus_HatchBrushCreate GDIPlus_HICONCreateFromBitmap GDIPlus_ImageAttributesCreate GDIPlus_ImageAttributesDispose GDIPlus_ImageAttributesSetColorKeys GDIPlus_ImageAttributesSetColorMatrix GDIPlus_ImageDispose GDIPlus_ImageGetDimension GDIPlus_ImageGetFlags GDIPlus_ImageGetGraphicsContext GDIPlus_ImageGetHeight GDIPlus_ImageGetHorizontalResolution GDIPlus_ImageGetPixelFormat GDIPlus_ImageGetRawFormat GDIPlus_ImageGetThumbnail GDIPlus_ImageGetType GDIPlus_ImageGetVerticalResolution GDIPlus_ImageGetWidth GDIPlus_ImageLoadFromFile GDIPlus_ImageLoadFromStream GDIPlus_ImageResize GDIPlus_ImageRotateFlip GDIPlus_ImageSaveToFile GDIPlus_ImageSaveToFileEx GDIPlus_ImageSaveToStream GDIPlus_ImageScale GDIPlus_LineBrushCreate GDIPlus_LineBrushCreateFromRect GDIPlus_LineBrushCreateFromRectWithAngle GDIPlus_LineBrushGetColors GDIPlus_LineBrushGetRect GDIPlus_LineBrushMultiplyTransform GDIPlus_LineBrushResetTransform GDIPlus_LineBrushSetBlend GDIPlus_LineBrushSetColors GDIPlus_LineBrushSetGammaCorrection GDIPlus_LineBrushSetLinearBlend GDIPlus_LineBrushSetPresetBlend GDIPlus_LineBrushSetSigmaBlend GDIPlus_LineBrushSetTransform GDIPlus_MatrixClone GDIPlus_MatrixCreate GDIPlus_MatrixDispose GDIPlus_MatrixGetElements GDIPlus_MatrixInvert GDIPlus_MatrixMultiply GDIPlus_MatrixRotate GDIPlus_MatrixScale GDIPlus_MatrixSetElements GDIPlus_MatrixShear GDIPlus_MatrixTransformPoints GDIPlus_MatrixTranslate GDIPlus_PaletteInitialize GDIPlus_ParamAdd GDIPlus_ParamInit GDIPlus_ParamSize GDIPlus_PathAddArc GDIPlus_PathAddBezier GDIPlus_PathAddClosedCurve GDIPlus_PathAddClosedCurve2 GDIPlus_PathAddCurve GDIPlus_PathAddCurve2 GDIPlus_PathAddCurve3 GDIPlus_PathAddEllipse GDIPlus_PathAddLine GDIPlus_PathAddLine2 GDIPlus_PathAddPath GDIPlus_PathAddPie GDIPlus_PathAddPolygon GDIPlus_PathAddRectangle GDIPlus_PathAddString GDIPlus_PathBrushCreate GDIPlus_PathBrushCreateFromPath GDIPlus_PathBrushGetCenterPoint GDIPlus_PathBrushGetFocusScales GDIPlus_PathBrushGetPointCount GDIPlus_PathBrushGetRect GDIPlus_PathBrushGetWrapMode GDIPlus_PathBrushMultiplyTransform GDIPlus_PathBrushResetTransform GDIPlus_PathBrushSetBlend GDIPlus_PathBrushSetCenterColor GDIPlus_PathBrushSetCenterPoint GDIPlus_PathBrushSetFocusScales GDIPlus_PathBrushSetGammaCorrection GDIPlus_PathBrushSetLinearBlend GDIPlus_PathBrushSetPresetBlend GDIPlus_PathBrushSetSigmaBlend GDIPlus_PathBrushSetSurroundColor GDIPlus_PathBrushSetSurroundColorsWithCount GDIPlus_PathBrushSetTransform GDIPlus_PathBrushSetWrapMode GDIPlus_PathClone GDIPlus_PathCloseFigure GDIPlus_PathCreate GDIPlus_PathCreate2 GDIPlus_PathDispose GDIPlus_PathFlatten GDIPlus_PathGetData GDIPlus_PathGetFillMode GDIPlus_PathGetLastPoint GDIPlus_PathGetPointCount GDIPlus_PathGetPoints GDIPlus_PathGetWorldBounds GDIPlus_PathIsOutlineVisiblePoint GDIPlus_PathIsVisiblePoint GDIPlus_PathIterCreate GDIPlus_PathIterDispose GDIPlus_PathIterGetSubpathCount GDIPlus_PathIterNextMarkerPath GDIPlus_PathIterNextSubpathPath GDIPlus_PathIterRewind GDIPlus_PathReset GDIPlus_PathReverse GDIPlus_PathSetFillMode GDIPlus_PathSetMarker GDIPlus_PathStartFigure GDIPlus_PathTransform GDIPlus_PathWarp GDIPlus_PathWiden GDIPlus_PathWindingModeOutline GDIPlus_PenCreate GDIPlus_PenCreate2 GDIPlus_PenDispose GDIPlus_PenGetAlignment GDIPlus_PenGetColor GDIPlus_PenGetCustomEndCap GDIPlus_PenGetDashCap GDIPlus_PenGetDashStyle GDIPlus_PenGetEndCap GDIPlus_PenGetMiterLimit GDIPlus_PenGetWidth GDIPlus_PenSetAlignment GDIPlus_PenSetColor GDIPlus_PenSetCustomEndCap GDIPlus_PenSetDashCap GDIPlus_PenSetDashStyle GDIPlus_PenSetEndCap GDIPlus_PenSetLineCap GDIPlus_PenSetLineJoin GDIPlus_PenSetMiterLimit GDIPlus_PenSetStartCap GDIPlus_PenSetWidth GDIPlus_RectFCreate GDIPlus_RegionClone GDIPlus_RegionCombinePath GDIPlus_RegionCombineRect GDIPlus_RegionCombineRegion GDIPlus_RegionCreate GDIPlus_RegionCreateFromPath GDIPlus_RegionCreateFromRect GDIPlus_RegionDispose GDIPlus_RegionGetBounds GDIPlus_RegionGetHRgn GDIPlus_RegionTransform GDIPlus_RegionTranslate GDIPlus_Shutdown GDIPlus_Startup GDIPlus_StringFormatCreate GDIPlus_StringFormatDispose GDIPlus_StringFormatGetMeasurableCharacterRangeCount GDIPlus_StringFormatSetAlign GDIPlus_StringFormatSetLineAlign GDIPlus_StringFormatSetMeasurableCharacterRanges GDIPlus_TextureCreate GDIPlus_TextureCreate2 GDIPlus_TextureCreateIA GetIP GUICtrlAVI_Close GUICtrlAVI_Create GUICtrlAVI_Destroy GUICtrlAVI_IsPlaying GUICtrlAVI_Open GUICtrlAVI_OpenEx GUICtrlAVI_Play GUICtrlAVI_Seek GUICtrlAVI_Show GUICtrlAVI_Stop GUICtrlButton_Click GUICtrlButton_Create GUICtrlButton_Destroy GUICtrlButton_Enable GUICtrlButton_GetCheck GUICtrlButton_GetFocus GUICtrlButton_GetIdealSize GUICtrlButton_GetImage GUICtrlButton_GetImageList GUICtrlButton_GetNote GUICtrlButton_GetNoteLength GUICtrlButton_GetSplitInfo GUICtrlButton_GetState GUICtrlButton_GetText GUICtrlButton_GetTextMargin GUICtrlButton_SetCheck GUICtrlButton_SetDontClick GUICtrlButton_SetFocus GUICtrlButton_SetImage GUICtrlButton_SetImageList GUICtrlButton_SetNote GUICtrlButton_SetShield GUICtrlButton_SetSize GUICtrlButton_SetSplitInfo GUICtrlButton_SetState GUICtrlButton_SetStyle GUICtrlButton_SetText GUICtrlButton_SetTextMargin GUICtrlButton_Show GUICtrlComboBoxEx_AddDir GUICtrlComboBoxEx_AddString GUICtrlComboBoxEx_BeginUpdate GUICtrlComboBoxEx_Create GUICtrlComboBoxEx_CreateSolidBitMap GUICtrlComboBoxEx_DeleteString GUICtrlComboBoxEx_Destroy GUICtrlComboBoxEx_EndUpdate GUICtrlComboBoxEx_FindStringExact GUICtrlComboBoxEx_GetComboBoxInfo GUICtrlComboBoxEx_GetComboControl GUICtrlComboBoxEx_GetCount GUICtrlComboBoxEx_GetCurSel GUICtrlComboBoxEx_GetDroppedControlRect GUICtrlComboBoxEx_GetDroppedControlRectEx GUICtrlComboBoxEx_GetDroppedState GUICtrlComboBoxEx_GetDroppedWidth GUICtrlComboBoxEx_GetEditControl GUICtrlComboBoxEx_GetEditSel GUICtrlComboBoxEx_GetEditText GUICtrlComboBoxEx_GetExtendedStyle GUICtrlComboBoxEx_GetExtendedUI GUICtrlComboBoxEx_GetImageList GUICtrlComboBoxEx_GetItem GUICtrlComboBoxEx_GetItemEx GUICtrlComboBoxEx_GetItemHeight GUICtrlComboBoxEx_GetItemImage GUICtrlComboBoxEx_GetItemIndent GUICtrlComboBoxEx_GetItemOverlayImage GUICtrlComboBoxEx_GetItemParam GUICtrlComboBoxEx_GetItemSelectedImage GUICtrlComboBoxEx_GetItemText GUICtrlComboBoxEx_GetItemTextLen GUICtrlComboBoxEx_GetList GUICtrlComboBoxEx_GetListArray GUICtrlComboBoxEx_GetLocale GUICtrlComboBoxEx_GetLocaleCountry GUICtrlComboBoxEx_GetLocaleLang GUICtrlComboBoxEx_GetLocalePrimLang GUICtrlComboBoxEx_GetLocaleSubLang GUICtrlComboBoxEx_GetMinVisible GUICtrlComboBoxEx_GetTopIndex GUICtrlComboBoxEx_GetUnicode GUICtrlComboBoxEx_InitStorage GUICtrlComboBoxEx_InsertString GUICtrlComboBoxEx_LimitText GUICtrlComboBoxEx_ReplaceEditSel GUICtrlComboBoxEx_ResetContent GUICtrlComboBoxEx_SetCurSel GUICtrlComboBoxEx_SetDroppedWidth GUICtrlComboBoxEx_SetEditSel GUICtrlComboBoxEx_SetEditText GUICtrlComboBoxEx_SetExtendedStyle GUICtrlComboBoxEx_SetExtendedUI GUICtrlComboBoxEx_SetImageList GUICtrlComboBoxEx_SetItem GUICtrlComboBoxEx_SetItemEx GUICtrlComboBoxEx_SetItemHeight GUICtrlComboBoxEx_SetItemImage GUICtrlComboBoxEx_SetItemIndent GUICtrlComboBoxEx_SetItemOverlayImage GUICtrlComboBoxEx_SetItemParam GUICtrlComboBoxEx_SetItemSelectedImage GUICtrlComboBoxEx_SetMinVisible GUICtrlComboBoxEx_SetTopIndex GUICtrlComboBoxEx_SetUnicode GUICtrlComboBoxEx_ShowDropDown GUICtrlComboBox_AddDir GUICtrlComboBox_AddString GUICtrlComboBox_AutoComplete GUICtrlComboBox_BeginUpdate GUICtrlComboBox_Create GUICtrlComboBox_DeleteString GUICtrlComboBox_Destroy GUICtrlComboBox_EndUpdate GUICtrlComboBox_FindString GUICtrlComboBox_FindStringExact GUICtrlComboBox_GetComboBoxInfo GUICtrlComboBox_GetCount GUICtrlComboBox_GetCueBanner GUICtrlComboBox_GetCurSel GUICtrlComboBox_GetDroppedControlRect GUICtrlComboBox_GetDroppedControlRectEx GUICtrlComboBox_GetDroppedState GUICtrlComboBox_GetDroppedWidth GUICtrlComboBox_GetEditSel GUICtrlComboBox_GetEditText GUICtrlComboBox_GetExtendedUI GUICtrlComboBox_GetHorizontalExtent GUICtrlComboBox_GetItemHeight GUICtrlComboBox_GetLBText GUICtrlComboBox_GetLBTextLen GUICtrlComboBox_GetList GUICtrlComboBox_GetListArray GUICtrlComboBox_GetLocale GUICtrlComboBox_GetLocaleCountry GUICtrlComboBox_GetLocaleLang GUICtrlComboBox_GetLocalePrimLang GUICtrlComboBox_GetLocaleSubLang GUICtrlComboBox_GetMinVisible GUICtrlComboBox_GetTopIndex GUICtrlComboBox_InitStorage GUICtrlComboBox_InsertString GUICtrlComboBox_LimitText GUICtrlComboBox_ReplaceEditSel GUICtrlComboBox_ResetContent GUICtrlComboBox_SelectString GUICtrlComboBox_SetCueBanner GUICtrlComboBox_SetCurSel GUICtrlComboBox_SetDroppedWidth GUICtrlComboBox_SetEditSel GUICtrlComboBox_SetEditText GUICtrlComboBox_SetExtendedUI GUICtrlComboBox_SetHorizontalExtent GUICtrlComboBox_SetItemHeight GUICtrlComboBox_SetMinVisible GUICtrlComboBox_SetTopIndex GUICtrlComboBox_ShowDropDown GUICtrlDTP_Create GUICtrlDTP_Destroy GUICtrlDTP_GetMCColor GUICtrlDTP_GetMCFont GUICtrlDTP_GetMonthCal GUICtrlDTP_GetRange GUICtrlDTP_GetRangeEx GUICtrlDTP_GetSystemTime GUICtrlDTP_GetSystemTimeEx GUICtrlDTP_SetFormat GUICtrlDTP_SetMCColor GUICtrlDTP_SetMCFont GUICtrlDTP_SetRange GUICtrlDTP_SetRangeEx GUICtrlDTP_SetSystemTime GUICtrlDTP_SetSystemTimeEx GUICtrlEdit_AppendText GUICtrlEdit_BeginUpdate GUICtrlEdit_CanUndo GUICtrlEdit_CharFromPos GUICtrlEdit_Create GUICtrlEdit_Destroy GUICtrlEdit_EmptyUndoBuffer GUICtrlEdit_EndUpdate GUICtrlEdit_Find GUICtrlEdit_FmtLines GUICtrlEdit_GetCueBanner GUICtrlEdit_GetFirstVisibleLine GUICtrlEdit_GetLimitText GUICtrlEdit_GetLine GUICtrlEdit_GetLineCount GUICtrlEdit_GetMargins GUICtrlEdit_GetModify GUICtrlEdit_GetPasswordChar GUICtrlEdit_GetRECT GUICtrlEdit_GetRECTEx GUICtrlEdit_GetSel GUICtrlEdit_GetText GUICtrlEdit_GetTextLen GUICtrlEdit_HideBalloonTip GUICtrlEdit_InsertText GUICtrlEdit_LineFromChar GUICtrlEdit_LineIndex GUICtrlEdit_LineLength GUICtrlEdit_LineScroll GUICtrlEdit_PosFromChar GUICtrlEdit_ReplaceSel GUICtrlEdit_Scroll GUICtrlEdit_SetCueBanner GUICtrlEdit_SetLimitText GUICtrlEdit_SetMargins GUICtrlEdit_SetModify GUICtrlEdit_SetPasswordChar GUICtrlEdit_SetReadOnly GUICtrlEdit_SetRECT GUICtrlEdit_SetRECTEx GUICtrlEdit_SetRECTNP GUICtrlEdit_SetRectNPEx GUICtrlEdit_SetSel GUICtrlEdit_SetTabStops GUICtrlEdit_SetText GUICtrlEdit_ShowBalloonTip GUICtrlEdit_Undo GUICtrlHeader_AddItem GUICtrlHeader_ClearFilter GUICtrlHeader_ClearFilterAll GUICtrlHeader_Create GUICtrlHeader_CreateDragImage GUICtrlHeader_DeleteItem GUICtrlHeader_Destroy GUICtrlHeader_EditFilter GUICtrlHeader_GetBitmapMargin GUICtrlHeader_GetImageList GUICtrlHeader_GetItem GUICtrlHeader_GetItemAlign GUICtrlHeader_GetItemBitmap GUICtrlHeader_GetItemCount GUICtrlHeader_GetItemDisplay GUICtrlHeader_GetItemFlags GUICtrlHeader_GetItemFormat GUICtrlHeader_GetItemImage GUICtrlHeader_GetItemOrder GUICtrlHeader_GetItemParam GUICtrlHeader_GetItemRect GUICtrlHeader_GetItemRectEx GUICtrlHeader_GetItemText GUICtrlHeader_GetItemWidth GUICtrlHeader_GetOrderArray GUICtrlHeader_GetUnicodeFormat GUICtrlHeader_HitTest GUICtrlHeader_InsertItem GUICtrlHeader_Layout GUICtrlHeader_OrderToIndex GUICtrlHeader_SetBitmapMargin GUICtrlHeader_SetFilterChangeTimeout GUICtrlHeader_SetHotDivider GUICtrlHeader_SetImageList GUICtrlHeader_SetItem GUICtrlHeader_SetItemAlign GUICtrlHeader_SetItemBitmap GUICtrlHeader_SetItemDisplay GUICtrlHeader_SetItemFlags GUICtrlHeader_SetItemFormat GUICtrlHeader_SetItemImage GUICtrlHeader_SetItemOrder GUICtrlHeader_SetItemParam GUICtrlHeader_SetItemText GUICtrlHeader_SetItemWidth GUICtrlHeader_SetOrderArray GUICtrlHeader_SetUnicodeFormat GUICtrlIpAddress_ClearAddress GUICtrlIpAddress_Create GUICtrlIpAddress_Destroy GUICtrlIpAddress_Get GUICtrlIpAddress_GetArray GUICtrlIpAddress_GetEx GUICtrlIpAddress_IsBlank GUICtrlIpAddress_Set GUICtrlIpAddress_SetArray GUICtrlIpAddress_SetEx GUICtrlIpAddress_SetFocus GUICtrlIpAddress_SetFont GUICtrlIpAddress_SetRange GUICtrlIpAddress_ShowHide GUICtrlListBox_AddFile GUICtrlListBox_AddString GUICtrlListBox_BeginUpdate GUICtrlListBox_ClickItem GUICtrlListBox_Create GUICtrlListBox_DeleteString GUICtrlListBox_Destroy GUICtrlListBox_Dir GUICtrlListBox_EndUpdate GUICtrlListBox_FindInText GUICtrlListBox_FindString GUICtrlListBox_GetAnchorIndex GUICtrlListBox_GetCaretIndex GUICtrlListBox_GetCount GUICtrlListBox_GetCurSel GUICtrlListBox_GetHorizontalExtent GUICtrlListBox_GetItemData GUICtrlListBox_GetItemHeight GUICtrlListBox_GetItemRect GUICtrlListBox_GetItemRectEx GUICtrlListBox_GetListBoxInfo GUICtrlListBox_GetLocale GUICtrlListBox_GetLocaleCountry GUICtrlListBox_GetLocaleLang GUICtrlListBox_GetLocalePrimLang GUICtrlListBox_GetLocaleSubLang GUICtrlListBox_GetSel GUICtrlListBox_GetSelCount GUICtrlListBox_GetSelItems GUICtrlListBox_GetSelItemsText GUICtrlListBox_GetText GUICtrlListBox_GetTextLen GUICtrlListBox_GetTopIndex GUICtrlListBox_InitStorage GUICtrlListBox_InsertString GUICtrlListBox_ItemFromPoint GUICtrlListBox_ReplaceString GUICtrlListBox_ResetContent GUICtrlListBox_SelectString GUICtrlListBox_SelItemRange GUICtrlListBox_SelItemRangeEx GUICtrlListBox_SetAnchorIndex GUICtrlListBox_SetCaretIndex GUICtrlListBox_SetColumnWidth GUICtrlListBox_SetCurSel GUICtrlListBox_SetHorizontalExtent GUICtrlListBox_SetItemData GUICtrlListBox_SetItemHeight GUICtrlListBox_SetLocale GUICtrlListBox_SetSel GUICtrlListBox_SetTabStops GUICtrlListBox_SetTopIndex GUICtrlListBox_Sort GUICtrlListBox_SwapString GUICtrlListBox_UpdateHScroll GUICtrlListView_AddArray GUICtrlListView_AddColumn GUICtrlListView_AddItem GUICtrlListView_AddSubItem GUICtrlListView_ApproximateViewHeight GUICtrlListView_ApproximateViewRect GUICtrlListView_ApproximateViewWidth GUICtrlListView_Arrange GUICtrlListView_BeginUpdate GUICtrlListView_CancelEditLabel GUICtrlListView_ClickItem GUICtrlListView_CopyItems GUICtrlListView_Create GUICtrlListView_CreateDragImage GUICtrlListView_CreateSolidBitMap GUICtrlListView_DeleteAllItems GUICtrlListView_DeleteColumn GUICtrlListView_DeleteItem GUICtrlListView_DeleteItemsSelected GUICtrlListView_Destroy GUICtrlListView_DrawDragImage GUICtrlListView_EditLabel GUICtrlListView_EnableGroupView GUICtrlListView_EndUpdate GUICtrlListView_EnsureVisible GUICtrlListView_FindInText GUICtrlListView_FindItem GUICtrlListView_FindNearest GUICtrlListView_FindParam GUICtrlListView_FindText GUICtrlListView_GetBkColor GUICtrlListView_GetBkImage GUICtrlListView_GetCallbackMask GUICtrlListView_GetColumn GUICtrlListView_GetColumnCount GUICtrlListView_GetColumnOrder GUICtrlListView_GetColumnOrderArray GUICtrlListView_GetColumnWidth GUICtrlListView_GetCounterPage GUICtrlListView_GetEditControl GUICtrlListView_GetExtendedListViewStyle GUICtrlListView_GetFocusedGroup GUICtrlListView_GetGroupCount GUICtrlListView_GetGroupInfo GUICtrlListView_GetGroupInfoByIndex GUICtrlListView_GetGroupRect GUICtrlListView_GetGroupViewEnabled GUICtrlListView_GetHeader GUICtrlListView_GetHotCursor GUICtrlListView_GetHotItem GUICtrlListView_GetHoverTime GUICtrlListView_GetImageList GUICtrlListView_GetISearchString GUICtrlListView_GetItem GUICtrlListView_GetItemChecked GUICtrlListView_GetItemCount GUICtrlListView_GetItemCut GUICtrlListView_GetItemDropHilited GUICtrlListView_GetItemEx GUICtrlListView_GetItemFocused GUICtrlListView_GetItemGroupID GUICtrlListView_GetItemImage GUICtrlListView_GetItemIndent GUICtrlListView_GetItemParam GUICtrlListView_GetItemPosition GUICtrlListView_GetItemPositionX GUICtrlListView_GetItemPositionY GUICtrlListView_GetItemRect GUICtrlListView_GetItemRectEx GUICtrlListView_GetItemSelected GUICtrlListView_GetItemSpacing GUICtrlListView_GetItemSpacingX GUICtrlListView_GetItemSpacingY GUICtrlListView_GetItemState GUICtrlListView_GetItemStateImage GUICtrlListView_GetItemText GUICtrlListView_GetItemTextArray GUICtrlListView_GetItemTextString GUICtrlListView_GetNextItem GUICtrlListView_GetNumberOfWorkAreas GUICtrlListView_GetOrigin GUICtrlListView_GetOriginX GUICtrlListView_GetOriginY GUICtrlListView_GetOutlineColor GUICtrlListView_GetSelectedColumn GUICtrlListView_GetSelectedCount GUICtrlListView_GetSelectedIndices GUICtrlListView_GetSelectionMark GUICtrlListView_GetStringWidth GUICtrlListView_GetSubItemRect GUICtrlListView_GetTextBkColor GUICtrlListView_GetTextColor GUICtrlListView_GetToolTips GUICtrlListView_GetTopIndex GUICtrlListView_GetUnicodeFormat GUICtrlListView_GetView GUICtrlListView_GetViewDetails GUICtrlListView_GetViewLarge GUICtrlListView_GetViewList GUICtrlListView_GetViewRect GUICtrlListView_GetViewSmall GUICtrlListView_GetViewTile GUICtrlListView_HideColumn GUICtrlListView_HitTest GUICtrlListView_InsertColumn GUICtrlListView_InsertGroup GUICtrlListView_InsertItem GUICtrlListView_JustifyColumn GUICtrlListView_MapIDToIndex GUICtrlListView_MapIndexToID GUICtrlListView_RedrawItems GUICtrlListView_RegisterSortCallBack GUICtrlListView_RemoveAllGroups GUICtrlListView_RemoveGroup GUICtrlListView_Scroll GUICtrlListView_SetBkColor GUICtrlListView_SetBkImage GUICtrlListView_SetCallBackMask GUICtrlListView_SetColumn GUICtrlListView_SetColumnOrder GUICtrlListView_SetColumnOrderArray GUICtrlListView_SetColumnWidth GUICtrlListView_SetExtendedListViewStyle GUICtrlListView_SetGroupInfo GUICtrlListView_SetHotItem GUICtrlListView_SetHoverTime GUICtrlListView_SetIconSpacing GUICtrlListView_SetImageList GUICtrlListView_SetItem GUICtrlListView_SetItemChecked GUICtrlListView_SetItemCount GUICtrlListView_SetItemCut GUICtrlListView_SetItemDropHilited GUICtrlListView_SetItemEx GUICtrlListView_SetItemFocused GUICtrlListView_SetItemGroupID GUICtrlListView_SetItemImage GUICtrlListView_SetItemIndent GUICtrlListView_SetItemParam GUICtrlListView_SetItemPosition GUICtrlListView_SetItemPosition32 GUICtrlListView_SetItemSelected GUICtrlListView_SetItemState GUICtrlListView_SetItemStateImage GUICtrlListView_SetItemText GUICtrlListView_SetOutlineColor GUICtrlListView_SetSelectedColumn GUICtrlListView_SetSelectionMark GUICtrlListView_SetTextBkColor GUICtrlListView_SetTextColor GUICtrlListView_SetToolTips GUICtrlListView_SetUnicodeFormat GUICtrlListView_SetView GUICtrlListView_SetWorkAreas GUICtrlListView_SimpleSort GUICtrlListView_SortItems GUICtrlListView_SubItemHitTest GUICtrlListView_UnRegisterSortCallBack GUICtrlMenu_AddMenuItem GUICtrlMenu_AppendMenu GUICtrlMenu_CalculatePopupWindowPosition GUICtrlMenu_CheckMenuItem GUICtrlMenu_CheckRadioItem GUICtrlMenu_CreateMenu GUICtrlMenu_CreatePopup GUICtrlMenu_DeleteMenu GUICtrlMenu_DestroyMenu GUICtrlMenu_DrawMenuBar GUICtrlMenu_EnableMenuItem GUICtrlMenu_FindItem GUICtrlMenu_FindParent GUICtrlMenu_GetItemBmp GUICtrlMenu_GetItemBmpChecked GUICtrlMenu_GetItemBmpUnchecked GUICtrlMenu_GetItemChecked GUICtrlMenu_GetItemCount GUICtrlMenu_GetItemData GUICtrlMenu_GetItemDefault GUICtrlMenu_GetItemDisabled GUICtrlMenu_GetItemEnabled GUICtrlMenu_GetItemGrayed GUICtrlMenu_GetItemHighlighted GUICtrlMenu_GetItemID GUICtrlMenu_GetItemInfo GUICtrlMenu_GetItemRect GUICtrlMenu_GetItemRectEx GUICtrlMenu_GetItemState GUICtrlMenu_GetItemStateEx GUICtrlMenu_GetItemSubMenu GUICtrlMenu_GetItemText GUICtrlMenu_GetItemType GUICtrlMenu_GetMenu GUICtrlMenu_GetMenuBackground GUICtrlMenu_GetMenuBarInfo GUICtrlMenu_GetMenuContextHelpID GUICtrlMenu_GetMenuData GUICtrlMenu_GetMenuDefaultItem GUICtrlMenu_GetMenuHeight GUICtrlMenu_GetMenuInfo GUICtrlMenu_GetMenuStyle GUICtrlMenu_GetSystemMenu GUICtrlMenu_InsertMenuItem GUICtrlMenu_InsertMenuItemEx GUICtrlMenu_IsMenu GUICtrlMenu_LoadMenu GUICtrlMenu_MapAccelerator GUICtrlMenu_MenuItemFromPoint GUICtrlMenu_RemoveMenu GUICtrlMenu_SetItemBitmaps GUICtrlMenu_SetItemBmp GUICtrlMenu_SetItemBmpChecked GUICtrlMenu_SetItemBmpUnchecked GUICtrlMenu_SetItemChecked GUICtrlMenu_SetItemData GUICtrlMenu_SetItemDefault GUICtrlMenu_SetItemDisabled GUICtrlMenu_SetItemEnabled GUICtrlMenu_SetItemGrayed GUICtrlMenu_SetItemHighlighted GUICtrlMenu_SetItemID GUICtrlMenu_SetItemInfo GUICtrlMenu_SetItemState GUICtrlMenu_SetItemSubMenu GUICtrlMenu_SetItemText GUICtrlMenu_SetItemType GUICtrlMenu_SetMenu GUICtrlMenu_SetMenuBackground GUICtrlMenu_SetMenuContextHelpID GUICtrlMenu_SetMenuData GUICtrlMenu_SetMenuDefaultItem GUICtrlMenu_SetMenuHeight GUICtrlMenu_SetMenuInfo GUICtrlMenu_SetMenuStyle GUICtrlMenu_TrackPopupMenu GUICtrlMonthCal_Create GUICtrlMonthCal_Destroy GUICtrlMonthCal_GetCalendarBorder GUICtrlMonthCal_GetCalendarCount GUICtrlMonthCal_GetColor GUICtrlMonthCal_GetColorArray GUICtrlMonthCal_GetCurSel GUICtrlMonthCal_GetCurSelStr GUICtrlMonthCal_GetFirstDOW GUICtrlMonthCal_GetFirstDOWStr GUICtrlMonthCal_GetMaxSelCount GUICtrlMonthCal_GetMaxTodayWidth GUICtrlMonthCal_GetMinReqHeight GUICtrlMonthCal_GetMinReqRect GUICtrlMonthCal_GetMinReqRectArray GUICtrlMonthCal_GetMinReqWidth GUICtrlMonthCal_GetMonthDelta GUICtrlMonthCal_GetMonthRange GUICtrlMonthCal_GetMonthRangeMax GUICtrlMonthCal_GetMonthRangeMaxStr GUICtrlMonthCal_GetMonthRangeMin GUICtrlMonthCal_GetMonthRangeMinStr GUICtrlMonthCal_GetMonthRangeSpan GUICtrlMonthCal_GetRange GUICtrlMonthCal_GetRangeMax GUICtrlMonthCal_GetRangeMaxStr GUICtrlMonthCal_GetRangeMin GUICtrlMonthCal_GetRangeMinStr GUICtrlMonthCal_GetSelRange GUICtrlMonthCal_GetSelRangeMax GUICtrlMonthCal_GetSelRangeMaxStr GUICtrlMonthCal_GetSelRangeMin GUICtrlMonthCal_GetSelRangeMinStr GUICtrlMonthCal_GetToday GUICtrlMonthCal_GetTodayStr GUICtrlMonthCal_GetUnicodeFormat GUICtrlMonthCal_HitTest GUICtrlMonthCal_SetCalendarBorder GUICtrlMonthCal_SetColor GUICtrlMonthCal_SetCurSel GUICtrlMonthCal_SetDayState GUICtrlMonthCal_SetFirstDOW GUICtrlMonthCal_SetMaxSelCount GUICtrlMonthCal_SetMonthDelta GUICtrlMonthCal_SetRange GUICtrlMonthCal_SetSelRange GUICtrlMonthCal_SetToday GUICtrlMonthCal_SetUnicodeFormat GUICtrlRebar_AddBand GUICtrlRebar_AddToolBarBand GUICtrlRebar_BeginDrag GUICtrlRebar_Create GUICtrlRebar_DeleteBand GUICtrlRebar_Destroy GUICtrlRebar_DragMove GUICtrlRebar_EndDrag GUICtrlRebar_GetBandBackColor GUICtrlRebar_GetBandBorders GUICtrlRebar_GetBandBordersEx GUICtrlRebar_GetBandChildHandle GUICtrlRebar_GetBandChildSize GUICtrlRebar_GetBandCount GUICtrlRebar_GetBandForeColor GUICtrlRebar_GetBandHeaderSize GUICtrlRebar_GetBandID GUICtrlRebar_GetBandIdealSize GUICtrlRebar_GetBandLength GUICtrlRebar_GetBandLParam GUICtrlRebar_GetBandMargins GUICtrlRebar_GetBandMarginsEx GUICtrlRebar_GetBandRect GUICtrlRebar_GetBandRectEx GUICtrlRebar_GetBandStyle GUICtrlRebar_GetBandStyleBreak GUICtrlRebar_GetBandStyleChildEdge GUICtrlRebar_GetBandStyleFixedBMP GUICtrlRebar_GetBandStyleFixedSize GUICtrlRebar_GetBandStyleGripperAlways GUICtrlRebar_GetBandStyleHidden GUICtrlRebar_GetBandStyleHideTitle GUICtrlRebar_GetBandStyleNoGripper GUICtrlRebar_GetBandStyleTopAlign GUICtrlRebar_GetBandStyleUseChevron GUICtrlRebar_GetBandStyleVariableHeight GUICtrlRebar_GetBandText GUICtrlRebar_GetBarHeight GUICtrlRebar_GetBarInfo GUICtrlRebar_GetBKColor GUICtrlRebar_GetColorScheme GUICtrlRebar_GetRowCount GUICtrlRebar_GetRowHeight GUICtrlRebar_GetTextColor GUICtrlRebar_GetToolTips GUICtrlRebar_GetUnicodeFormat GUICtrlRebar_HitTest GUICtrlRebar_IDToIndex GUICtrlRebar_MaximizeBand GUICtrlRebar_MinimizeBand GUICtrlRebar_MoveBand GUICtrlRebar_SetBandBackColor GUICtrlRebar_SetBandForeColor GUICtrlRebar_SetBandHeaderSize GUICtrlRebar_SetBandID GUICtrlRebar_SetBandIdealSize GUICtrlRebar_SetBandLength GUICtrlRebar_SetBandLParam GUICtrlRebar_SetBandStyle GUICtrlRebar_SetBandStyleBreak GUICtrlRebar_SetBandStyleChildEdge GUICtrlRebar_SetBandStyleFixedBMP GUICtrlRebar_SetBandStyleFixedSize GUICtrlRebar_SetBandStyleGripperAlways GUICtrlRebar_SetBandStyleHidden GUICtrlRebar_SetBandStyleHideTitle GUICtrlRebar_SetBandStyleNoGripper GUICtrlRebar_SetBandStyleTopAlign GUICtrlRebar_SetBandStyleUseChevron GUICtrlRebar_SetBandStyleVariableHeight GUICtrlRebar_SetBandText GUICtrlRebar_SetBarInfo GUICtrlRebar_SetBKColor GUICtrlRebar_SetColorScheme GUICtrlRebar_SetTextColor GUICtrlRebar_SetToolTips GUICtrlRebar_SetUnicodeFormat GUICtrlRebar_ShowBand GUICtrlRichEdit_AppendText GUICtrlRichEdit_AutoDetectURL GUICtrlRichEdit_CanPaste GUICtrlRichEdit_CanPasteSpecial GUICtrlRichEdit_CanRedo GUICtrlRichEdit_CanUndo GUICtrlRichEdit_ChangeFontSize GUICtrlRichEdit_Copy GUICtrlRichEdit_Create GUICtrlRichEdit_Cut GUICtrlRichEdit_Deselect GUICtrlRichEdit_Destroy GUICtrlRichEdit_EmptyUndoBuffer GUICtrlRichEdit_FindText GUICtrlRichEdit_FindTextInRange GUICtrlRichEdit_GetBkColor GUICtrlRichEdit_GetCharAttributes GUICtrlRichEdit_GetCharBkColor GUICtrlRichEdit_GetCharColor GUICtrlRichEdit_GetCharPosFromXY GUICtrlRichEdit_GetCharPosOfNextWord GUICtrlRichEdit_GetCharPosOfPreviousWord GUICtrlRichEdit_GetCharWordBreakInfo GUICtrlRichEdit_GetFirstCharPosOnLine GUICtrlRichEdit_GetFont GUICtrlRichEdit_GetLineCount GUICtrlRichEdit_GetLineLength GUICtrlRichEdit_GetLineNumberFromCharPos GUICtrlRichEdit_GetNextRedo GUICtrlRichEdit_GetNextUndo GUICtrlRichEdit_GetNumberOfFirstVisibleLine GUICtrlRichEdit_GetParaAlignment GUICtrlRichEdit_GetParaAttributes GUICtrlRichEdit_GetParaBorder GUICtrlRichEdit_GetParaIndents GUICtrlRichEdit_GetParaNumbering GUICtrlRichEdit_GetParaShading GUICtrlRichEdit_GetParaSpacing GUICtrlRichEdit_GetParaTabStops GUICtrlRichEdit_GetPasswordChar GUICtrlRichEdit_GetRECT GUICtrlRichEdit_GetScrollPos GUICtrlRichEdit_GetSel GUICtrlRichEdit_GetSelAA GUICtrlRichEdit_GetSelText GUICtrlRichEdit_GetSpaceUnit GUICtrlRichEdit_GetText GUICtrlRichEdit_GetTextInLine GUICtrlRichEdit_GetTextInRange GUICtrlRichEdit_GetTextLength GUICtrlRichEdit_GetVersion GUICtrlRichEdit_GetXYFromCharPos GUICtrlRichEdit_GetZoom GUICtrlRichEdit_GotoCharPos GUICtrlRichEdit_HideSelection GUICtrlRichEdit_InsertText GUICtrlRichEdit_IsModified GUICtrlRichEdit_IsTextSelected GUICtrlRichEdit_Paste GUICtrlRichEdit_PasteSpecial GUICtrlRichEdit_PauseRedraw GUICtrlRichEdit_Redo GUICtrlRichEdit_ReplaceText GUICtrlRichEdit_ResumeRedraw GUICtrlRichEdit_ScrollLineOrPage GUICtrlRichEdit_ScrollLines GUICtrlRichEdit_ScrollToCaret GUICtrlRichEdit_SetBkColor GUICtrlRichEdit_SetCharAttributes GUICtrlRichEdit_SetCharBkColor GUICtrlRichEdit_SetCharColor GUICtrlRichEdit_SetEventMask GUICtrlRichEdit_SetFont GUICtrlRichEdit_SetLimitOnText GUICtrlRichEdit_SetModified GUICtrlRichEdit_SetParaAlignment GUICtrlRichEdit_SetParaAttributes GUICtrlRichEdit_SetParaBorder GUICtrlRichEdit_SetParaIndents GUICtrlRichEdit_SetParaNumbering GUICtrlRichEdit_SetParaShading GUICtrlRichEdit_SetParaSpacing GUICtrlRichEdit_SetParaTabStops GUICtrlRichEdit_SetPasswordChar GUICtrlRichEdit_SetReadOnly GUICtrlRichEdit_SetRECT GUICtrlRichEdit_SetScrollPos GUICtrlRichEdit_SetSel GUICtrlRichEdit_SetSpaceUnit GUICtrlRichEdit_SetTabStops GUICtrlRichEdit_SetText GUICtrlRichEdit_SetUndoLimit GUICtrlRichEdit_SetZoom GUICtrlRichEdit_StreamFromFile GUICtrlRichEdit_StreamFromVar GUICtrlRichEdit_StreamToFile GUICtrlRichEdit_StreamToVar GUICtrlRichEdit_Undo GUICtrlSlider_ClearSel GUICtrlSlider_ClearTics GUICtrlSlider_Create GUICtrlSlider_Destroy GUICtrlSlider_GetBuddy GUICtrlSlider_GetChannelRect GUICtrlSlider_GetChannelRectEx GUICtrlSlider_GetLineSize GUICtrlSlider_GetLogicalTics GUICtrlSlider_GetNumTics GUICtrlSlider_GetPageSize GUICtrlSlider_GetPos GUICtrlSlider_GetRange GUICtrlSlider_GetRangeMax GUICtrlSlider_GetRangeMin GUICtrlSlider_GetSel GUICtrlSlider_GetSelEnd GUICtrlSlider_GetSelStart GUICtrlSlider_GetThumbLength GUICtrlSlider_GetThumbRect GUICtrlSlider_GetThumbRectEx GUICtrlSlider_GetTic GUICtrlSlider_GetTicPos GUICtrlSlider_GetToolTips GUICtrlSlider_GetUnicodeFormat GUICtrlSlider_SetBuddy GUICtrlSlider_SetLineSize GUICtrlSlider_SetPageSize GUICtrlSlider_SetPos GUICtrlSlider_SetRange GUICtrlSlider_SetRangeMax GUICtrlSlider_SetRangeMin GUICtrlSlider_SetSel GUICtrlSlider_SetSelEnd GUICtrlSlider_SetSelStart GUICtrlSlider_SetThumbLength GUICtrlSlider_SetTic GUICtrlSlider_SetTicFreq GUICtrlSlider_SetTipSide GUICtrlSlider_SetToolTips GUICtrlSlider_SetUnicodeFormat GUICtrlStatusBar_Create GUICtrlStatusBar_Destroy GUICtrlStatusBar_EmbedControl GUICtrlStatusBar_GetBorders GUICtrlStatusBar_GetBordersHorz GUICtrlStatusBar_GetBordersRect GUICtrlStatusBar_GetBordersVert GUICtrlStatusBar_GetCount GUICtrlStatusBar_GetHeight GUICtrlStatusBar_GetIcon GUICtrlStatusBar_GetParts GUICtrlStatusBar_GetRect GUICtrlStatusBar_GetRectEx GUICtrlStatusBar_GetText GUICtrlStatusBar_GetTextFlags GUICtrlStatusBar_GetTextLength GUICtrlStatusBar_GetTextLengthEx GUICtrlStatusBar_GetTipText GUICtrlStatusBar_GetUnicodeFormat GUICtrlStatusBar_GetWidth GUICtrlStatusBar_IsSimple GUICtrlStatusBar_Resize GUICtrlStatusBar_SetBkColor GUICtrlStatusBar_SetIcon GUICtrlStatusBar_SetMinHeight GUICtrlStatusBar_SetParts GUICtrlStatusBar_SetSimple GUICtrlStatusBar_SetText GUICtrlStatusBar_SetTipText GUICtrlStatusBar_SetUnicodeFormat GUICtrlStatusBar_ShowHide GUICtrlTab_ActivateTab GUICtrlTab_ClickTab GUICtrlTab_Create GUICtrlTab_DeleteAllItems GUICtrlTab_DeleteItem GUICtrlTab_DeselectAll GUICtrlTab_Destroy GUICtrlTab_FindTab GUICtrlTab_GetCurFocus GUICtrlTab_GetCurSel GUICtrlTab_GetDisplayRect GUICtrlTab_GetDisplayRectEx GUICtrlTab_GetExtendedStyle GUICtrlTab_GetImageList GUICtrlTab_GetItem GUICtrlTab_GetItemCount GUICtrlTab_GetItemImage GUICtrlTab_GetItemParam GUICtrlTab_GetItemRect GUICtrlTab_GetItemRectEx GUICtrlTab_GetItemState GUICtrlTab_GetItemText GUICtrlTab_GetRowCount GUICtrlTab_GetToolTips GUICtrlTab_GetUnicodeFormat GUICtrlTab_HighlightItem GUICtrlTab_HitTest GUICtrlTab_InsertItem GUICtrlTab_RemoveImage GUICtrlTab_SetCurFocus GUICtrlTab_SetCurSel GUICtrlTab_SetExtendedStyle GUICtrlTab_SetImageList GUICtrlTab_SetItem GUICtrlTab_SetItemImage GUICtrlTab_SetItemParam GUICtrlTab_SetItemSize GUICtrlTab_SetItemState GUICtrlTab_SetItemText GUICtrlTab_SetMinTabWidth GUICtrlTab_SetPadding GUICtrlTab_SetToolTips GUICtrlTab_SetUnicodeFormat GUICtrlToolbar_AddBitmap GUICtrlToolbar_AddButton GUICtrlToolbar_AddButtonSep GUICtrlToolbar_AddString GUICtrlToolbar_ButtonCount GUICtrlToolbar_CheckButton GUICtrlToolbar_ClickAccel GUICtrlToolbar_ClickButton GUICtrlToolbar_ClickIndex GUICtrlToolbar_CommandToIndex GUICtrlToolbar_Create GUICtrlToolbar_Customize GUICtrlToolbar_DeleteButton GUICtrlToolbar_Destroy GUICtrlToolbar_EnableButton GUICtrlToolbar_FindToolbar GUICtrlToolbar_GetAnchorHighlight GUICtrlToolbar_GetBitmapFlags GUICtrlToolbar_GetButtonBitmap GUICtrlToolbar_GetButtonInfo GUICtrlToolbar_GetButtonInfoEx GUICtrlToolbar_GetButtonParam GUICtrlToolbar_GetButtonRect GUICtrlToolbar_GetButtonRectEx GUICtrlToolbar_GetButtonSize GUICtrlToolbar_GetButtonState GUICtrlToolbar_GetButtonStyle GUICtrlToolbar_GetButtonText GUICtrlToolbar_GetColorScheme GUICtrlToolbar_GetDisabledImageList GUICtrlToolbar_GetExtendedStyle GUICtrlToolbar_GetHotImageList GUICtrlToolbar_GetHotItem GUICtrlToolbar_GetImageList GUICtrlToolbar_GetInsertMark GUICtrlToolbar_GetInsertMarkColor GUICtrlToolbar_GetMaxSize GUICtrlToolbar_GetMetrics GUICtrlToolbar_GetPadding GUICtrlToolbar_GetRows GUICtrlToolbar_GetString GUICtrlToolbar_GetStyle GUICtrlToolbar_GetStyleAltDrag GUICtrlToolbar_GetStyleCustomErase GUICtrlToolbar_GetStyleFlat GUICtrlToolbar_GetStyleList GUICtrlToolbar_GetStyleRegisterDrop GUICtrlToolbar_GetStyleToolTips GUICtrlToolbar_GetStyleTransparent GUICtrlToolbar_GetStyleWrapable GUICtrlToolbar_GetTextRows GUICtrlToolbar_GetToolTips GUICtrlToolbar_GetUnicodeFormat GUICtrlToolbar_HideButton GUICtrlToolbar_HighlightButton GUICtrlToolbar_HitTest GUICtrlToolbar_IndexToCommand GUICtrlToolbar_InsertButton GUICtrlToolbar_InsertMarkHitTest GUICtrlToolbar_IsButtonChecked GUICtrlToolbar_IsButtonEnabled GUICtrlToolbar_IsButtonHidden GUICtrlToolbar_IsButtonHighlighted GUICtrlToolbar_IsButtonIndeterminate GUICtrlToolbar_IsButtonPressed GUICtrlToolbar_LoadBitmap GUICtrlToolbar_LoadImages GUICtrlToolbar_MapAccelerator GUICtrlToolbar_MoveButton GUICtrlToolbar_PressButton GUICtrlToolbar_SetAnchorHighlight GUICtrlToolbar_SetBitmapSize GUICtrlToolbar_SetButtonBitMap GUICtrlToolbar_SetButtonInfo GUICtrlToolbar_SetButtonInfoEx GUICtrlToolbar_SetButtonParam GUICtrlToolbar_SetButtonSize GUICtrlToolbar_SetButtonState GUICtrlToolbar_SetButtonStyle GUICtrlToolbar_SetButtonText GUICtrlToolbar_SetButtonWidth GUICtrlToolbar_SetCmdID GUICtrlToolbar_SetColorScheme GUICtrlToolbar_SetDisabledImageList GUICtrlToolbar_SetDrawTextFlags GUICtrlToolbar_SetExtendedStyle GUICtrlToolbar_SetHotImageList GUICtrlToolbar_SetHotItem GUICtrlToolbar_SetImageList GUICtrlToolbar_SetIndent GUICtrlToolbar_SetIndeterminate GUICtrlToolbar_SetInsertMark GUICtrlToolbar_SetInsertMarkColor GUICtrlToolbar_SetMaxTextRows GUICtrlToolbar_SetMetrics GUICtrlToolbar_SetPadding GUICtrlToolbar_SetParent GUICtrlToolbar_SetRows GUICtrlToolbar_SetStyle GUICtrlToolbar_SetStyleAltDrag GUICtrlToolbar_SetStyleCustomErase GUICtrlToolbar_SetStyleFlat GUICtrlToolbar_SetStyleList GUICtrlToolbar_SetStyleRegisterDrop GUICtrlToolbar_SetStyleToolTips GUICtrlToolbar_SetStyleTransparent GUICtrlToolbar_SetStyleWrapable GUICtrlToolbar_SetToolTips GUICtrlToolbar_SetUnicodeFormat GUICtrlToolbar_SetWindowTheme GUICtrlTreeView_Add GUICtrlTreeView_AddChild GUICtrlTreeView_AddChildFirst GUICtrlTreeView_AddFirst GUICtrlTreeView_BeginUpdate GUICtrlTreeView_ClickItem GUICtrlTreeView_Create GUICtrlTreeView_CreateDragImage GUICtrlTreeView_CreateSolidBitMap GUICtrlTreeView_Delete GUICtrlTreeView_DeleteAll GUICtrlTreeView_DeleteChildren GUICtrlTreeView_Destroy GUICtrlTreeView_DisplayRect GUICtrlTreeView_DisplayRectEx GUICtrlTreeView_EditText GUICtrlTreeView_EndEdit GUICtrlTreeView_EndUpdate GUICtrlTreeView_EnsureVisible GUICtrlTreeView_Expand GUICtrlTreeView_ExpandedOnce GUICtrlTreeView_FindItem GUICtrlTreeView_FindItemEx GUICtrlTreeView_GetBkColor GUICtrlTreeView_GetBold GUICtrlTreeView_GetChecked GUICtrlTreeView_GetChildCount GUICtrlTreeView_GetChildren GUICtrlTreeView_GetCount GUICtrlTreeView_GetCut GUICtrlTreeView_GetDropTarget GUICtrlTreeView_GetEditControl GUICtrlTreeView_GetExpanded GUICtrlTreeView_GetFirstChild GUICtrlTreeView_GetFirstItem GUICtrlTreeView_GetFirstVisible GUICtrlTreeView_GetFocused GUICtrlTreeView_GetHeight GUICtrlTreeView_GetImageIndex GUICtrlTreeView_GetImageListIconHandle GUICtrlTreeView_GetIndent GUICtrlTreeView_GetInsertMarkColor GUICtrlTreeView_GetISearchString GUICtrlTreeView_GetItemByIndex GUICtrlTreeView_GetItemHandle GUICtrlTreeView_GetItemParam GUICtrlTreeView_GetLastChild GUICtrlTreeView_GetLineColor GUICtrlTreeView_GetNext GUICtrlTreeView_GetNextChild GUICtrlTreeView_GetNextSibling GUICtrlTreeView_GetNextVisible GUICtrlTreeView_GetNormalImageList GUICtrlTreeView_GetParentHandle GUICtrlTreeView_GetParentParam GUICtrlTreeView_GetPrev GUICtrlTreeView_GetPrevChild GUICtrlTreeView_GetPrevSibling GUICtrlTreeView_GetPrevVisible GUICtrlTreeView_GetScrollTime GUICtrlTreeView_GetSelected GUICtrlTreeView_GetSelectedImageIndex GUICtrlTreeView_GetSelection GUICtrlTreeView_GetSiblingCount GUICtrlTreeView_GetState GUICtrlTreeView_GetStateImageIndex GUICtrlTreeView_GetStateImageList GUICtrlTreeView_GetText GUICtrlTreeView_GetTextColor GUICtrlTreeView_GetToolTips GUICtrlTreeView_GetTree GUICtrlTreeView_GetUnicodeFormat GUICtrlTreeView_GetVisible GUICtrlTreeView_GetVisibleCount GUICtrlTreeView_HitTest GUICtrlTreeView_HitTestEx GUICtrlTreeView_HitTestItem GUICtrlTreeView_Index GUICtrlTreeView_InsertItem GUICtrlTreeView_IsFirstItem GUICtrlTreeView_IsParent GUICtrlTreeView_Level GUICtrlTreeView_SelectItem GUICtrlTreeView_SelectItemByIndex GUICtrlTreeView_SetBkColor GUICtrlTreeView_SetBold GUICtrlTreeView_SetChecked GUICtrlTreeView_SetCheckedByIndex GUICtrlTreeView_SetChildren GUICtrlTreeView_SetCut GUICtrlTreeView_SetDropTarget GUICtrlTreeView_SetFocused GUICtrlTreeView_SetHeight GUICtrlTreeView_SetIcon GUICtrlTreeView_SetImageIndex GUICtrlTreeView_SetIndent GUICtrlTreeView_SetInsertMark GUICtrlTreeView_SetInsertMarkColor GUICtrlTreeView_SetItemHeight GUICtrlTreeView_SetItemParam GUICtrlTreeView_SetLineColor GUICtrlTreeView_SetNormalImageList GUICtrlTreeView_SetScrollTime GUICtrlTreeView_SetSelected GUICtrlTreeView_SetSelectedImageIndex GUICtrlTreeView_SetState GUICtrlTreeView_SetStateImageIndex GUICtrlTreeView_SetStateImageList GUICtrlTreeView_SetText GUICtrlTreeView_SetTextColor GUICtrlTreeView_SetToolTips GUICtrlTreeView_SetUnicodeFormat GUICtrlTreeView_Sort GUIImageList_Add GUIImageList_AddBitmap GUIImageList_AddIcon GUIImageList_AddMasked GUIImageList_BeginDrag GUIImageList_Copy GUIImageList_Create GUIImageList_Destroy GUIImageList_DestroyIcon GUIImageList_DragEnter GUIImageList_DragLeave GUIImageList_DragMove GUIImageList_Draw GUIImageList_DrawEx GUIImageList_Duplicate GUIImageList_EndDrag GUIImageList_GetBkColor GUIImageList_GetIcon GUIImageList_GetIconHeight GUIImageList_GetIconSize GUIImageList_GetIconSizeEx GUIImageList_GetIconWidth GUIImageList_GetImageCount GUIImageList_GetImageInfoEx GUIImageList_Remove GUIImageList_ReplaceIcon GUIImageList_SetBkColor GUIImageList_SetIconSize GUIImageList_SetImageCount GUIImageList_Swap GUIScrollBars_EnableScrollBar GUIScrollBars_GetScrollBarInfoEx GUIScrollBars_GetScrollBarRect GUIScrollBars_GetScrollBarRGState GUIScrollBars_GetScrollBarXYLineButton GUIScrollBars_GetScrollBarXYThumbBottom GUIScrollBars_GetScrollBarXYThumbTop GUIScrollBars_GetScrollInfo GUIScrollBars_GetScrollInfoEx GUIScrollBars_GetScrollInfoMax GUIScrollBars_GetScrollInfoMin GUIScrollBars_GetScrollInfoPage GUIScrollBars_GetScrollInfoPos GUIScrollBars_GetScrollInfoTrackPos GUIScrollBars_GetScrollPos GUIScrollBars_GetScrollRange GUIScrollBars_Init GUIScrollBars_ScrollWindow GUIScrollBars_SetScrollInfo GUIScrollBars_SetScrollInfoMax GUIScrollBars_SetScrollInfoMin GUIScrollBars_SetScrollInfoPage GUIScrollBars_SetScrollInfoPos GUIScrollBars_SetScrollRange GUIScrollBars_ShowScrollBar GUIToolTip_Activate GUIToolTip_AddTool GUIToolTip_AdjustRect GUIToolTip_BitsToTTF GUIToolTip_Create GUIToolTip_Deactivate GUIToolTip_DelTool GUIToolTip_Destroy GUIToolTip_EnumTools GUIToolTip_GetBubbleHeight GUIToolTip_GetBubbleSize GUIToolTip_GetBubbleWidth GUIToolTip_GetCurrentTool GUIToolTip_GetDelayTime GUIToolTip_GetMargin GUIToolTip_GetMarginEx GUIToolTip_GetMaxTipWidth GUIToolTip_GetText GUIToolTip_GetTipBkColor GUIToolTip_GetTipTextColor GUIToolTip_GetTitleBitMap GUIToolTip_GetTitleText GUIToolTip_GetToolCount GUIToolTip_GetToolInfo GUIToolTip_HitTest GUIToolTip_NewToolRect GUIToolTip_Pop GUIToolTip_PopUp GUIToolTip_SetDelayTime GUIToolTip_SetMargin GUIToolTip_SetMaxTipWidth GUIToolTip_SetTipBkColor GUIToolTip_SetTipTextColor GUIToolTip_SetTitle GUIToolTip_SetToolInfo GUIToolTip_SetWindowTheme GUIToolTip_ToolExists GUIToolTip_ToolToArray GUIToolTip_TrackActivate GUIToolTip_TrackPosition GUIToolTip_Update GUIToolTip_UpdateTipText HexToString IEAction IEAttach IEBodyReadHTML IEBodyReadText IEBodyWriteHTML IECreate IECreateEmbedded IEDocGetObj IEDocInsertHTML IEDocInsertText IEDocReadHTML IEDocWriteHTML IEErrorNotify IEFormElementCheckBoxSelect IEFormElementGetCollection IEFormElementGetObjByName IEFormElementGetValue IEFormElementOptionSelect IEFormElementRadioSelect IEFormElementSetValue IEFormGetCollection IEFormGetObjByName IEFormImageClick IEFormReset IEFormSubmit IEFrameGetCollection IEFrameGetObjByName IEGetObjById IEGetObjByName IEHeadInsertEventScript IEImgClick IEImgGetCollection IEIsFrameSet IELinkClickByIndex IELinkClickByText IELinkGetCollection IELoadWait IELoadWaitTimeout IENavigate IEPropertyGet IEPropertySet IEQuit IETableGetCollection IETableWriteToArray IETagNameAllGetCollection IETagNameGetCollection IE_Example IE_Introduction IE_VersionInfo INetExplorerCapable INetGetSource INetMail INetSmtpMail IsPressed MathCheckDiv Max MemGlobalAlloc MemGlobalFree MemGlobalLock MemGlobalSize MemGlobalUnlock MemMoveMemory MemVirtualAlloc MemVirtualAllocEx MemVirtualFree MemVirtualFreeEx Min MouseTrap NamedPipes_CallNamedPipe NamedPipes_ConnectNamedPipe NamedPipes_CreateNamedPipe NamedPipes_CreatePipe NamedPipes_DisconnectNamedPipe NamedPipes_GetNamedPipeHandleState NamedPipes_GetNamedPipeInfo NamedPipes_PeekNamedPipe NamedPipes_SetNamedPipeHandleState NamedPipes_TransactNamedPipe NamedPipes_WaitNamedPipe Net_Share_ConnectionEnum Net_Share_FileClose Net_Share_FileEnum Net_Share_FileGetInfo Net_Share_PermStr Net_Share_ResourceStr Net_Share_SessionDel Net_Share_SessionEnum Net_Share_SessionGetInfo Net_Share_ShareAdd Net_Share_ShareCheck Net_Share_ShareDel Net_Share_ShareEnum Net_Share_ShareGetInfo Net_Share_ShareSetInfo Net_Share_StatisticsGetSvr Net_Share_StatisticsGetWrk Now NowCalc NowCalcDate NowDate NowTime PathFull PathGetRelative PathMake PathSplit ProcessGetName ProcessGetPriority Radian ReplaceStringInFile RunDos ScreenCapture_Capture ScreenCapture_CaptureWnd ScreenCapture_SaveImage ScreenCapture_SetBMPFormat ScreenCapture_SetJPGQuality ScreenCapture_SetTIFColorDepth ScreenCapture_SetTIFCompression Security__AdjustTokenPrivileges Security__CreateProcessWithToken Security__DuplicateTokenEx Security__GetAccountSid Security__GetLengthSid Security__GetTokenInformation Security__ImpersonateSelf Security__IsValidSid Security__LookupAccountName Security__LookupAccountSid Security__LookupPrivilegeValue Security__OpenProcessToken Security__OpenThreadToken Security__OpenThreadTokenEx Security__SetPrivilege Security__SetTokenInformation Security__SidToStringSid Security__SidTypeStr Security__StringSidToSid SendMessage SendMessageA SetDate SetTime Singleton SoundClose SoundLength SoundOpen SoundPause SoundPlay SoundPos SoundResume SoundSeek SoundStatus SoundStop SQLite_Changes SQLite_Close SQLite_Display2DResult SQLite_Encode SQLite_ErrCode SQLite_ErrMsg SQLite_Escape SQLite_Exec SQLite_FastEncode SQLite_FastEscape SQLite_FetchData SQLite_FetchNames SQLite_GetTable SQLite_GetTable2d SQLite_LastInsertRowID SQLite_LibVersion SQLite_Open SQLite_Query SQLite_QueryFinalize SQLite_QueryReset SQLite_QuerySingleRow SQLite_SafeMode SQLite_SetTimeout SQLite_Shutdown SQLite_SQLiteExe SQLite_Startup SQLite_TotalChanges StringBetween StringExplode StringInsert StringProper StringRepeat StringTitleCase StringToHex TCPIpToName TempFile TicksToTime Timer_Diff Timer_GetIdleTime Timer_GetTimerID Timer_Init Timer_KillAllTimers Timer_KillTimer Timer_SetTimer TimeToTicks VersionCompare viClose viExecCommand viFindGpib viGpibBusReset viGTL viInteractiveControl viOpen viSetAttribute viSetTimeout WeekNumberISO WinAPI_AbortPath WinAPI_ActivateKeyboardLayout WinAPI_AddClipboardFormatListener WinAPI_AddFontMemResourceEx WinAPI_AddFontResourceEx WinAPI_AddIconOverlay WinAPI_AddIconTransparency WinAPI_AddMRUString WinAPI_AdjustBitmap WinAPI_AdjustTokenPrivileges WinAPI_AdjustWindowRectEx WinAPI_AlphaBlend WinAPI_AngleArc WinAPI_AnimateWindow WinAPI_Arc WinAPI_ArcTo WinAPI_ArrayToStruct WinAPI_AssignProcessToJobObject WinAPI_AssocGetPerceivedType WinAPI_AssocQueryString WinAPI_AttachConsole WinAPI_AttachThreadInput WinAPI_BackupRead WinAPI_BackupReadAbort WinAPI_BackupSeek WinAPI_BackupWrite WinAPI_BackupWriteAbort WinAPI_Beep WinAPI_BeginBufferedPaint WinAPI_BeginDeferWindowPos WinAPI_BeginPaint WinAPI_BeginPath WinAPI_BeginUpdateResource WinAPI_BitBlt WinAPI_BringWindowToTop WinAPI_BroadcastSystemMessage WinAPI_BrowseForFolderDlg WinAPI_BufferedPaintClear WinAPI_BufferedPaintInit WinAPI_BufferedPaintSetAlpha WinAPI_BufferedPaintUnInit WinAPI_CallNextHookEx WinAPI_CallWindowProc WinAPI_CallWindowProcW WinAPI_CascadeWindows WinAPI_ChangeWindowMessageFilterEx WinAPI_CharToOem WinAPI_ChildWindowFromPointEx WinAPI_ClientToScreen WinAPI_ClipCursor WinAPI_CloseDesktop WinAPI_CloseEnhMetaFile WinAPI_CloseFigure WinAPI_CloseHandle WinAPI_CloseThemeData WinAPI_CloseWindow WinAPI_CloseWindowStation WinAPI_CLSIDFromProgID WinAPI_CoInitialize WinAPI_ColorAdjustLuma WinAPI_ColorHLSToRGB WinAPI_ColorRGBToHLS WinAPI_CombineRgn WinAPI_CombineTransform WinAPI_CommandLineToArgv WinAPI_CommDlgExtendedError WinAPI_CommDlgExtendedErrorEx WinAPI_CompareString WinAPI_CompressBitmapBits WinAPI_CompressBuffer WinAPI_ComputeCrc32 WinAPI_ConfirmCredentials WinAPI_CopyBitmap WinAPI_CopyCursor WinAPI_CopyEnhMetaFile WinAPI_CopyFileEx WinAPI_CopyIcon WinAPI_CopyImage WinAPI_CopyRect WinAPI_CopyStruct WinAPI_CoTaskMemAlloc WinAPI_CoTaskMemFree WinAPI_CoTaskMemRealloc WinAPI_CoUninitialize WinAPI_Create32BitHBITMAP WinAPI_Create32BitHICON WinAPI_CreateANDBitmap WinAPI_CreateBitmap WinAPI_CreateBitmapIndirect WinAPI_CreateBrushIndirect WinAPI_CreateBuffer WinAPI_CreateBufferFromStruct WinAPI_CreateCaret WinAPI_CreateColorAdjustment WinAPI_CreateCompatibleBitmap WinAPI_CreateCompatibleBitmapEx WinAPI_CreateCompatibleDC WinAPI_CreateDesktop WinAPI_CreateDIB WinAPI_CreateDIBColorTable WinAPI_CreateDIBitmap WinAPI_CreateDIBSection WinAPI_CreateDirectory WinAPI_CreateDirectoryEx WinAPI_CreateEllipticRgn WinAPI_CreateEmptyIcon WinAPI_CreateEnhMetaFile WinAPI_CreateEvent WinAPI_CreateFile WinAPI_CreateFileEx WinAPI_CreateFileMapping WinAPI_CreateFont WinAPI_CreateFontEx WinAPI_CreateFontIndirect WinAPI_CreateGUID WinAPI_CreateHardLink WinAPI_CreateIcon WinAPI_CreateIconFromResourceEx WinAPI_CreateIconIndirect WinAPI_CreateJobObject WinAPI_CreateMargins WinAPI_CreateMRUList WinAPI_CreateMutex WinAPI_CreateNullRgn WinAPI_CreateNumberFormatInfo WinAPI_CreateObjectID WinAPI_CreatePen WinAPI_CreatePoint WinAPI_CreatePolygonRgn WinAPI_CreateProcess WinAPI_CreateProcessWithToken WinAPI_CreateRect WinAPI_CreateRectEx WinAPI_CreateRectRgn WinAPI_CreateRectRgnIndirect WinAPI_CreateRoundRectRgn WinAPI_CreateSemaphore WinAPI_CreateSize WinAPI_CreateSolidBitmap WinAPI_CreateSolidBrush WinAPI_CreateStreamOnHGlobal WinAPI_CreateString WinAPI_CreateSymbolicLink WinAPI_CreateTransform WinAPI_CreateWindowEx WinAPI_CreateWindowStation WinAPI_DecompressBuffer WinAPI_DecryptFile WinAPI_DeferWindowPos WinAPI_DefineDosDevice WinAPI_DefRawInputProc WinAPI_DefSubclassProc WinAPI_DefWindowProc WinAPI_DefWindowProcW WinAPI_DeleteDC WinAPI_DeleteEnhMetaFile WinAPI_DeleteFile WinAPI_DeleteObject WinAPI_DeleteObjectID WinAPI_DeleteVolumeMountPoint WinAPI_DeregisterShellHookWindow WinAPI_DestroyCaret WinAPI_DestroyCursor WinAPI_DestroyIcon WinAPI_DestroyWindow WinAPI_DeviceIoControl WinAPI_DisplayStruct WinAPI_DllGetVersion WinAPI_DllInstall WinAPI_DllUninstall WinAPI_DPtoLP WinAPI_DragAcceptFiles WinAPI_DragFinish WinAPI_DragQueryFileEx WinAPI_DragQueryPoint WinAPI_DrawAnimatedRects WinAPI_DrawBitmap WinAPI_DrawEdge WinAPI_DrawFocusRect WinAPI_DrawFrameControl WinAPI_DrawIcon WinAPI_DrawIconEx WinAPI_DrawLine WinAPI_DrawShadowText WinAPI_DrawText WinAPI_DrawThemeBackground WinAPI_DrawThemeEdge WinAPI_DrawThemeIcon WinAPI_DrawThemeParentBackground WinAPI_DrawThemeText WinAPI_DrawThemeTextEx WinAPI_DuplicateEncryptionInfoFile WinAPI_DuplicateHandle WinAPI_DuplicateTokenEx WinAPI_DwmDefWindowProc WinAPI_DwmEnableBlurBehindWindow WinAPI_DwmEnableComposition WinAPI_DwmExtendFrameIntoClientArea WinAPI_DwmGetColorizationColor WinAPI_DwmGetColorizationParameters WinAPI_DwmGetWindowAttribute WinAPI_DwmInvalidateIconicBitmaps WinAPI_DwmIsCompositionEnabled WinAPI_DwmQueryThumbnailSourceSize WinAPI_DwmRegisterThumbnail WinAPI_DwmSetColorizationParameters WinAPI_DwmSetIconicLivePreviewBitmap WinAPI_DwmSetIconicThumbnail WinAPI_DwmSetWindowAttribute WinAPI_DwmUnregisterThumbnail WinAPI_DwmUpdateThumbnailProperties WinAPI_DWordToFloat WinAPI_DWordToInt WinAPI_EjectMedia WinAPI_Ellipse WinAPI_EmptyWorkingSet WinAPI_EnableWindow WinAPI_EncryptFile WinAPI_EncryptionDisable WinAPI_EndBufferedPaint WinAPI_EndDeferWindowPos WinAPI_EndPaint WinAPI_EndPath WinAPI_EndUpdateResource WinAPI_EnumChildProcess WinAPI_EnumChildWindows WinAPI_EnumDesktops WinAPI_EnumDesktopWindows WinAPI_EnumDeviceDrivers WinAPI_EnumDisplayDevices WinAPI_EnumDisplayMonitors WinAPI_EnumDisplaySettings WinAPI_EnumDllProc WinAPI_EnumFiles WinAPI_EnumFileStreams WinAPI_EnumFontFamilies WinAPI_EnumHardLinks WinAPI_EnumMRUList WinAPI_EnumPageFiles WinAPI_EnumProcessHandles WinAPI_EnumProcessModules WinAPI_EnumProcessThreads WinAPI_EnumProcessWindows WinAPI_EnumRawInputDevices WinAPI_EnumResourceLanguages WinAPI_EnumResourceNames WinAPI_EnumResourceTypes WinAPI_EnumSystemGeoID WinAPI_EnumSystemLocales WinAPI_EnumUILanguages WinAPI_EnumWindows WinAPI_EnumWindowsPopup WinAPI_EnumWindowStations WinAPI_EnumWindowsTop WinAPI_EqualMemory WinAPI_EqualRect WinAPI_EqualRgn WinAPI_ExcludeClipRect WinAPI_ExpandEnvironmentStrings WinAPI_ExtCreatePen WinAPI_ExtCreateRegion WinAPI_ExtFloodFill WinAPI_ExtractIcon WinAPI_ExtractIconEx WinAPI_ExtSelectClipRgn WinAPI_FatalAppExit WinAPI_FatalExit WinAPI_FileEncryptionStatus WinAPI_FileExists WinAPI_FileIconInit WinAPI_FileInUse WinAPI_FillMemory WinAPI_FillPath WinAPI_FillRect WinAPI_FillRgn WinAPI_FindClose WinAPI_FindCloseChangeNotification WinAPI_FindExecutable WinAPI_FindFirstChangeNotification WinAPI_FindFirstFile WinAPI_FindFirstFileName WinAPI_FindFirstStream WinAPI_FindNextChangeNotification WinAPI_FindNextFile WinAPI_FindNextFileName WinAPI_FindNextStream WinAPI_FindResource WinAPI_FindResourceEx WinAPI_FindTextDlg WinAPI_FindWindow WinAPI_FlashWindow WinAPI_FlashWindowEx WinAPI_FlattenPath WinAPI_FloatToDWord WinAPI_FloatToInt WinAPI_FlushFileBuffers WinAPI_FlushFRBuffer WinAPI_FlushViewOfFile WinAPI_FormatDriveDlg WinAPI_FormatMessage WinAPI_FrameRect WinAPI_FrameRgn WinAPI_FreeLibrary WinAPI_FreeMemory WinAPI_FreeMRUList WinAPI_FreeResource WinAPI_GdiComment WinAPI_GetActiveWindow WinAPI_GetAllUsersProfileDirectory WinAPI_GetAncestor WinAPI_GetApplicationRestartSettings WinAPI_GetArcDirection WinAPI_GetAsyncKeyState WinAPI_GetBinaryType WinAPI_GetBitmapBits WinAPI_GetBitmapDimension WinAPI_GetBitmapDimensionEx WinAPI_GetBkColor WinAPI_GetBkMode WinAPI_GetBoundsRect WinAPI_GetBrushOrg WinAPI_GetBufferedPaintBits WinAPI_GetBufferedPaintDC WinAPI_GetBufferedPaintTargetDC WinAPI_GetBufferedPaintTargetRect WinAPI_GetBValue WinAPI_GetCaretBlinkTime WinAPI_GetCaretPos WinAPI_GetCDType WinAPI_GetClassInfoEx WinAPI_GetClassLongEx WinAPI_GetClassName WinAPI_GetClientHeight WinAPI_GetClientRect WinAPI_GetClientWidth WinAPI_GetClipboardSequenceNumber WinAPI_GetClipBox WinAPI_GetClipCursor WinAPI_GetClipRgn WinAPI_GetColorAdjustment WinAPI_GetCompressedFileSize WinAPI_GetCompression WinAPI_GetConnectedDlg WinAPI_GetCurrentDirectory WinAPI_GetCurrentHwProfile WinAPI_GetCurrentObject WinAPI_GetCurrentPosition WinAPI_GetCurrentProcess WinAPI_GetCurrentProcessExplicitAppUserModelID WinAPI_GetCurrentProcessID WinAPI_GetCurrentThemeName WinAPI_GetCurrentThread WinAPI_GetCurrentThreadId WinAPI_GetCursor WinAPI_GetCursorInfo WinAPI_GetDateFormat WinAPI_GetDC WinAPI_GetDCEx WinAPI_GetDefaultPrinter WinAPI_GetDefaultUserProfileDirectory WinAPI_GetDesktopWindow WinAPI_GetDeviceCaps WinAPI_GetDeviceDriverBaseName WinAPI_GetDeviceDriverFileName WinAPI_GetDeviceGammaRamp WinAPI_GetDIBColorTable WinAPI_GetDIBits WinAPI_GetDiskFreeSpaceEx WinAPI_GetDlgCtrlID WinAPI_GetDlgItem WinAPI_GetDllDirectory WinAPI_GetDriveBusType WinAPI_GetDriveGeometryEx WinAPI_GetDriveNumber WinAPI_GetDriveType WinAPI_GetDurationFormat WinAPI_GetEffectiveClientRect WinAPI_GetEnhMetaFile WinAPI_GetEnhMetaFileBits WinAPI_GetEnhMetaFileDescription WinAPI_GetEnhMetaFileDimension WinAPI_GetEnhMetaFileHeader WinAPI_GetErrorMessage WinAPI_GetErrorMode WinAPI_GetExitCodeProcess WinAPI_GetExtended WinAPI_GetFileAttributes WinAPI_GetFileID WinAPI_GetFileInformationByHandle WinAPI_GetFileInformationByHandleEx WinAPI_GetFilePointerEx WinAPI_GetFileSizeEx WinAPI_GetFileSizeOnDisk WinAPI_GetFileTitle WinAPI_GetFileType WinAPI_GetFileVersionInfo WinAPI_GetFinalPathNameByHandle WinAPI_GetFinalPathNameByHandleEx WinAPI_GetFocus WinAPI_GetFontMemoryResourceInfo WinAPI_GetFontName WinAPI_GetFontResourceInfo WinAPI_GetForegroundWindow WinAPI_GetFRBuffer WinAPI_GetFullPathName WinAPI_GetGeoInfo WinAPI_GetGlyphOutline WinAPI_GetGraphicsMode WinAPI_GetGuiResources WinAPI_GetGUIThreadInfo WinAPI_GetGValue WinAPI_GetHandleInformation WinAPI_GetHGlobalFromStream WinAPI_GetIconDimension WinAPI_GetIconInfo WinAPI_GetIconInfoEx WinAPI_GetIdleTime WinAPI_GetKeyboardLayout WinAPI_GetKeyboardLayoutList WinAPI_GetKeyboardState WinAPI_GetKeyboardType WinAPI_GetKeyNameText WinAPI_GetKeyState WinAPI_GetLastActivePopup WinAPI_GetLastError WinAPI_GetLastErrorMessage WinAPI_GetLayeredWindowAttributes WinAPI_GetLocaleInfo WinAPI_GetLogicalDrives WinAPI_GetMapMode WinAPI_GetMemorySize WinAPI_GetMessageExtraInfo WinAPI_GetModuleFileNameEx WinAPI_GetModuleHandle WinAPI_GetModuleHandleEx WinAPI_GetModuleInformation WinAPI_GetMonitorInfo WinAPI_GetMousePos WinAPI_GetMousePosX WinAPI_GetMousePosY WinAPI_GetMUILanguage WinAPI_GetNumberFormat WinAPI_GetObject WinAPI_GetObjectID WinAPI_GetObjectInfoByHandle WinAPI_GetObjectNameByHandle WinAPI_GetObjectType WinAPI_GetOpenFileName WinAPI_GetOutlineTextMetrics WinAPI_GetOverlappedResult WinAPI_GetParent WinAPI_GetParentProcess WinAPI_GetPerformanceInfo WinAPI_GetPEType WinAPI_GetPhysicallyInstalledSystemMemory WinAPI_GetPixel WinAPI_GetPolyFillMode WinAPI_GetPosFromRect WinAPI_GetPriorityClass WinAPI_GetProcAddress WinAPI_GetProcessAffinityMask WinAPI_GetProcessCommandLine WinAPI_GetProcessFileName WinAPI_GetProcessHandleCount WinAPI_GetProcessID WinAPI_GetProcessIoCounters WinAPI_GetProcessMemoryInfo WinAPI_GetProcessName WinAPI_GetProcessShutdownParameters WinAPI_GetProcessTimes WinAPI_GetProcessUser WinAPI_GetProcessWindowStation WinAPI_GetProcessWorkingDirectory WinAPI_GetProfilesDirectory WinAPI_GetPwrCapabilities WinAPI_GetRawInputBuffer WinAPI_GetRawInputBufferLength WinAPI_GetRawInputData WinAPI_GetRawInputDeviceInfo WinAPI_GetRegionData WinAPI_GetRegisteredRawInputDevices WinAPI_GetRegKeyNameByHandle WinAPI_GetRgnBox WinAPI_GetROP2 WinAPI_GetRValue WinAPI_GetSaveFileName WinAPI_GetShellWindow WinAPI_GetStartupInfo WinAPI_GetStdHandle WinAPI_GetStockObject WinAPI_GetStretchBltMode WinAPI_GetString WinAPI_GetSysColor WinAPI_GetSysColorBrush WinAPI_GetSystemDefaultLangID WinAPI_GetSystemDefaultLCID WinAPI_GetSystemDefaultUILanguage WinAPI_GetSystemDEPPolicy WinAPI_GetSystemInfo WinAPI_GetSystemMetrics WinAPI_GetSystemPowerStatus WinAPI_GetSystemTimes WinAPI_GetSystemWow64Directory WinAPI_GetTabbedTextExtent WinAPI_GetTempFileName WinAPI_GetTextAlign WinAPI_GetTextCharacterExtra WinAPI_GetTextColor WinAPI_GetTextExtentPoint32 WinAPI_GetTextFace WinAPI_GetTextMetrics WinAPI_GetThemeAppProperties WinAPI_GetThemeBackgroundContentRect WinAPI_GetThemeBackgroundExtent WinAPI_GetThemeBackgroundRegion WinAPI_GetThemeBitmap WinAPI_GetThemeBool WinAPI_GetThemeColor WinAPI_GetThemeDocumentationProperty WinAPI_GetThemeEnumValue WinAPI_GetThemeFilename WinAPI_GetThemeFont WinAPI_GetThemeInt WinAPI_GetThemeMargins WinAPI_GetThemeMetric WinAPI_GetThemePartSize WinAPI_GetThemePosition WinAPI_GetThemePropertyOrigin WinAPI_GetThemeRect WinAPI_GetThemeString WinAPI_GetThemeSysBool WinAPI_GetThemeSysColor WinAPI_GetThemeSysColorBrush WinAPI_GetThemeSysFont WinAPI_GetThemeSysInt WinAPI_GetThemeSysSize WinAPI_GetThemeSysString WinAPI_GetThemeTextExtent WinAPI_GetThemeTextMetrics WinAPI_GetThemeTransitionDuration WinAPI_GetThreadDesktop WinAPI_GetThreadErrorMode WinAPI_GetThreadLocale WinAPI_GetThreadUILanguage WinAPI_GetTickCount WinAPI_GetTickCount64 WinAPI_GetTimeFormat WinAPI_GetTopWindow WinAPI_GetUDFColorMode WinAPI_GetUpdateRect WinAPI_GetUpdateRgn WinAPI_GetUserDefaultLangID WinAPI_GetUserDefaultLCID WinAPI_GetUserDefaultUILanguage WinAPI_GetUserGeoID WinAPI_GetUserObjectInformation WinAPI_GetVersion WinAPI_GetVersionEx WinAPI_GetVolumeInformation WinAPI_GetVolumeInformationByHandle WinAPI_GetVolumeNameForVolumeMountPoint WinAPI_GetWindow WinAPI_GetWindowDC WinAPI_GetWindowDisplayAffinity WinAPI_GetWindowExt WinAPI_GetWindowFileName WinAPI_GetWindowHeight WinAPI_GetWindowInfo WinAPI_GetWindowLong WinAPI_GetWindowOrg WinAPI_GetWindowPlacement WinAPI_GetWindowRect WinAPI_GetWindowRgn WinAPI_GetWindowRgnBox WinAPI_GetWindowSubclass WinAPI_GetWindowText WinAPI_GetWindowTheme WinAPI_GetWindowThreadProcessId WinAPI_GetWindowWidth WinAPI_GetWorkArea WinAPI_GetWorldTransform WinAPI_GetXYFromPoint WinAPI_GlobalMemoryStatus WinAPI_GradientFill WinAPI_GUIDFromString WinAPI_GUIDFromStringEx WinAPI_HashData WinAPI_HashString WinAPI_HiByte WinAPI_HideCaret WinAPI_HiDWord WinAPI_HiWord WinAPI_InflateRect WinAPI_InitMUILanguage WinAPI_InProcess WinAPI_IntersectClipRect WinAPI_IntersectRect WinAPI_IntToDWord WinAPI_IntToFloat WinAPI_InvalidateRect WinAPI_InvalidateRgn WinAPI_InvertANDBitmap WinAPI_InvertColor WinAPI_InvertRect WinAPI_InvertRgn WinAPI_IOCTL WinAPI_IsAlphaBitmap WinAPI_IsBadCodePtr WinAPI_IsBadReadPtr WinAPI_IsBadStringPtr WinAPI_IsBadWritePtr WinAPI_IsChild WinAPI_IsClassName WinAPI_IsDoorOpen WinAPI_IsElevated WinAPI_IsHungAppWindow WinAPI_IsIconic WinAPI_IsInternetConnected WinAPI_IsLoadKBLayout WinAPI_IsMemory WinAPI_IsNameInExpression WinAPI_IsNetworkAlive WinAPI_IsPathShared WinAPI_IsProcessInJob WinAPI_IsProcessorFeaturePresent WinAPI_IsRectEmpty WinAPI_IsThemeActive WinAPI_IsThemeBackgroundPartiallyTransparent WinAPI_IsThemePartDefined WinAPI_IsValidLocale WinAPI_IsWindow WinAPI_IsWindowEnabled WinAPI_IsWindowUnicode WinAPI_IsWindowVisible WinAPI_IsWow64Process WinAPI_IsWritable WinAPI_IsZoomed WinAPI_Keybd_Event WinAPI_KillTimer WinAPI_LineDDA WinAPI_LineTo WinAPI_LoadBitmap WinAPI_LoadCursor WinAPI_LoadCursorFromFile WinAPI_LoadIcon WinAPI_LoadIconMetric WinAPI_LoadIconWithScaleDown WinAPI_LoadImage WinAPI_LoadIndirectString WinAPI_LoadKeyboardLayout WinAPI_LoadLibrary WinAPI_LoadLibraryEx WinAPI_LoadMedia WinAPI_LoadResource WinAPI_LoadShell32Icon WinAPI_LoadString WinAPI_LoadStringEx WinAPI_LoByte WinAPI_LocalFree WinAPI_LockDevice WinAPI_LockFile WinAPI_LockResource WinAPI_LockWindowUpdate WinAPI_LockWorkStation WinAPI_LoDWord WinAPI_LongMid WinAPI_LookupIconIdFromDirectoryEx WinAPI_LoWord WinAPI_LPtoDP WinAPI_MAKELANGID WinAPI_MAKELCID WinAPI_MakeLong WinAPI_MakeQWord WinAPI_MakeWord WinAPI_MapViewOfFile WinAPI_MapVirtualKey WinAPI_MaskBlt WinAPI_MessageBeep WinAPI_MessageBoxCheck WinAPI_MessageBoxIndirect WinAPI_MirrorIcon WinAPI_ModifyWorldTransform WinAPI_MonitorFromPoint WinAPI_MonitorFromRect WinAPI_MonitorFromWindow WinAPI_Mouse_Event WinAPI_MoveFileEx WinAPI_MoveMemory WinAPI_MoveTo WinAPI_MoveToEx WinAPI_MoveWindow WinAPI_MsgBox WinAPI_MulDiv WinAPI_MultiByteToWideChar WinAPI_MultiByteToWideCharEx WinAPI_NtStatusToDosError WinAPI_OemToChar WinAPI_OffsetClipRgn WinAPI_OffsetPoints WinAPI_OffsetRect WinAPI_OffsetRgn WinAPI_OffsetWindowOrg WinAPI_OpenDesktop WinAPI_OpenFileById WinAPI_OpenFileDlg WinAPI_OpenFileMapping WinAPI_OpenIcon WinAPI_OpenInputDesktop WinAPI_OpenJobObject WinAPI_OpenMutex WinAPI_OpenProcess WinAPI_OpenProcessToken WinAPI_OpenSemaphore WinAPI_OpenThemeData WinAPI_OpenWindowStation WinAPI_PageSetupDlg WinAPI_PaintDesktop WinAPI_PaintRgn WinAPI_ParseURL WinAPI_ParseUserName WinAPI_PatBlt WinAPI_PathAddBackslash WinAPI_PathAddExtension WinAPI_PathAppend WinAPI_PathBuildRoot WinAPI_PathCanonicalize WinAPI_PathCommonPrefix WinAPI_PathCompactPath WinAPI_PathCompactPathEx WinAPI_PathCreateFromUrl WinAPI_PathFindExtension WinAPI_PathFindFileName WinAPI_PathFindNextComponent WinAPI_PathFindOnPath WinAPI_PathGetArgs WinAPI_PathGetCharType WinAPI_PathGetDriveNumber WinAPI_PathIsContentType WinAPI_PathIsDirectory WinAPI_PathIsDirectoryEmpty WinAPI_PathIsExe WinAPI_PathIsFileSpec WinAPI_PathIsLFNFileSpec WinAPI_PathIsRelative WinAPI_PathIsRoot WinAPI_PathIsSameRoot WinAPI_PathIsSystemFolder WinAPI_PathIsUNC WinAPI_PathIsUNCServer WinAPI_PathIsUNCServerShare WinAPI_PathMakeSystemFolder WinAPI_PathMatchSpec WinAPI_PathParseIconLocation WinAPI_PathRelativePathTo WinAPI_PathRemoveArgs WinAPI_PathRemoveBackslash WinAPI_PathRemoveExtension WinAPI_PathRemoveFileSpec WinAPI_PathRenameExtension WinAPI_PathSearchAndQualify WinAPI_PathSkipRoot WinAPI_PathStripPath WinAPI_PathStripToRoot WinAPI_PathToRegion WinAPI_PathUndecorate WinAPI_PathUnExpandEnvStrings WinAPI_PathUnmakeSystemFolder WinAPI_PathUnquoteSpaces WinAPI_PathYetAnotherMakeUniqueName WinAPI_PickIconDlg WinAPI_PlayEnhMetaFile WinAPI_PlaySound WinAPI_PlgBlt WinAPI_PointFromRect WinAPI_PolyBezier WinAPI_PolyBezierTo WinAPI_PolyDraw WinAPI_Polygon WinAPI_PostMessage WinAPI_PrimaryLangId WinAPI_PrintDlg WinAPI_PrintDlgEx WinAPI_PrintWindow WinAPI_ProgIDFromCLSID WinAPI_PtInRect WinAPI_PtInRectEx WinAPI_PtInRegion WinAPI_PtVisible WinAPI_QueryDosDevice WinAPI_QueryInformationJobObject WinAPI_QueryPerformanceCounter WinAPI_QueryPerformanceFrequency WinAPI_RadialGradientFill WinAPI_ReadDirectoryChanges WinAPI_ReadFile WinAPI_ReadProcessMemory WinAPI_Rectangle WinAPI_RectInRegion WinAPI_RectIsEmpty WinAPI_RectVisible WinAPI_RedrawWindow WinAPI_RegCloseKey WinAPI_RegConnectRegistry WinAPI_RegCopyTree WinAPI_RegCopyTreeEx WinAPI_RegCreateKey WinAPI_RegDeleteEmptyKey WinAPI_RegDeleteKey WinAPI_RegDeleteKeyValue WinAPI_RegDeleteTree WinAPI_RegDeleteTreeEx WinAPI_RegDeleteValue WinAPI_RegDisableReflectionKey WinAPI_RegDuplicateHKey WinAPI_RegEnableReflectionKey WinAPI_RegEnumKey WinAPI_RegEnumValue WinAPI_RegFlushKey WinAPI_RegisterApplicationRestart WinAPI_RegisterClass WinAPI_RegisterClassEx WinAPI_RegisterHotKey WinAPI_RegisterPowerSettingNotification WinAPI_RegisterRawInputDevices WinAPI_RegisterShellHookWindow WinAPI_RegisterWindowMessage WinAPI_RegLoadMUIString WinAPI_RegNotifyChangeKeyValue WinAPI_RegOpenKey WinAPI_RegQueryInfoKey WinAPI_RegQueryLastWriteTime WinAPI_RegQueryMultipleValues WinAPI_RegQueryReflectionKey WinAPI_RegQueryValue WinAPI_RegRestoreKey WinAPI_RegSaveKey WinAPI_RegSetValue WinAPI_ReleaseCapture WinAPI_ReleaseDC WinAPI_ReleaseMutex WinAPI_ReleaseSemaphore WinAPI_ReleaseStream WinAPI_RemoveClipboardFormatListener WinAPI_RemoveDirectory WinAPI_RemoveFontMemResourceEx WinAPI_RemoveFontResourceEx WinAPI_RemoveWindowSubclass WinAPI_ReOpenFile WinAPI_ReplaceFile WinAPI_ReplaceTextDlg WinAPI_ResetEvent WinAPI_RestartDlg WinAPI_RestoreDC WinAPI_RGB WinAPI_RotatePoints WinAPI_RoundRect WinAPI_SaveDC WinAPI_SaveFileDlg WinAPI_SaveHBITMAPToFile WinAPI_SaveHICONToFile WinAPI_ScaleWindowExt WinAPI_ScreenToClient WinAPI_SearchPath WinAPI_SelectClipPath WinAPI_SelectClipRgn WinAPI_SelectObject WinAPI_SendMessageTimeout WinAPI_SetActiveWindow WinAPI_SetArcDirection WinAPI_SetBitmapBits WinAPI_SetBitmapDimensionEx WinAPI_SetBkColor WinAPI_SetBkMode WinAPI_SetBoundsRect WinAPI_SetBrushOrg WinAPI_SetCapture WinAPI_SetCaretBlinkTime WinAPI_SetCaretPos WinAPI_SetClassLongEx WinAPI_SetColorAdjustment WinAPI_SetCompression WinAPI_SetCurrentDirectory WinAPI_SetCurrentProcessExplicitAppUserModelID WinAPI_SetCursor WinAPI_SetDCBrushColor WinAPI_SetDCPenColor WinAPI_SetDefaultPrinter WinAPI_SetDeviceGammaRamp WinAPI_SetDIBColorTable WinAPI_SetDIBits WinAPI_SetDIBitsToDevice WinAPI_SetDllDirectory WinAPI_SetEndOfFile WinAPI_SetEnhMetaFileBits WinAPI_SetErrorMode WinAPI_SetEvent WinAPI_SetFileAttributes WinAPI_SetFileInformationByHandleEx WinAPI_SetFilePointer WinAPI_SetFilePointerEx WinAPI_SetFileShortName WinAPI_SetFileValidData WinAPI_SetFocus WinAPI_SetFont WinAPI_SetForegroundWindow WinAPI_SetFRBuffer WinAPI_SetGraphicsMode WinAPI_SetHandleInformation WinAPI_SetInformationJobObject WinAPI_SetKeyboardLayout WinAPI_SetKeyboardState WinAPI_SetLastError WinAPI_SetLayeredWindowAttributes WinAPI_SetLocaleInfo WinAPI_SetMapMode WinAPI_SetMessageExtraInfo WinAPI_SetParent WinAPI_SetPixel WinAPI_SetPolyFillMode WinAPI_SetPriorityClass WinAPI_SetProcessAffinityMask WinAPI_SetProcessShutdownParameters WinAPI_SetProcessWindowStation WinAPI_SetRectRgn WinAPI_SetROP2 WinAPI_SetSearchPathMode WinAPI_SetStretchBltMode WinAPI_SetSysColors WinAPI_SetSystemCursor WinAPI_SetTextAlign WinAPI_SetTextCharacterExtra WinAPI_SetTextColor WinAPI_SetTextJustification WinAPI_SetThemeAppProperties WinAPI_SetThreadDesktop WinAPI_SetThreadErrorMode WinAPI_SetThreadExecutionState WinAPI_SetThreadLocale WinAPI_SetThreadUILanguage WinAPI_SetTimer WinAPI_SetUDFColorMode WinAPI_SetUserGeoID WinAPI_SetUserObjectInformation WinAPI_SetVolumeMountPoint WinAPI_SetWindowDisplayAffinity WinAPI_SetWindowExt WinAPI_SetWindowLong WinAPI_SetWindowOrg WinAPI_SetWindowPlacement WinAPI_SetWindowPos WinAPI_SetWindowRgn WinAPI_SetWindowsHookEx WinAPI_SetWindowSubclass WinAPI_SetWindowText WinAPI_SetWindowTheme WinAPI_SetWinEventHook WinAPI_SetWorldTransform WinAPI_SfcIsFileProtected WinAPI_SfcIsKeyProtected WinAPI_ShellAboutDlg WinAPI_ShellAddToRecentDocs WinAPI_ShellChangeNotify WinAPI_ShellChangeNotifyDeregister WinAPI_ShellChangeNotifyRegister WinAPI_ShellCreateDirectory WinAPI_ShellEmptyRecycleBin WinAPI_ShellExecute WinAPI_ShellExecuteEx WinAPI_ShellExtractAssociatedIcon WinAPI_ShellExtractIcon WinAPI_ShellFileOperation WinAPI_ShellFlushSFCache WinAPI_ShellGetFileInfo WinAPI_ShellGetIconOverlayIndex WinAPI_ShellGetImageList WinAPI_ShellGetKnownFolderIDList WinAPI_ShellGetKnownFolderPath WinAPI_ShellGetLocalizedName WinAPI_ShellGetPathFromIDList WinAPI_ShellGetSetFolderCustomSettings WinAPI_ShellGetSettings WinAPI_ShellGetSpecialFolderLocation WinAPI_ShellGetSpecialFolderPath WinAPI_ShellGetStockIconInfo WinAPI_ShellILCreateFromPath WinAPI_ShellNotifyIcon WinAPI_ShellNotifyIconGetRect WinAPI_ShellObjectProperties WinAPI_ShellOpenFolderAndSelectItems WinAPI_ShellOpenWithDlg WinAPI_ShellQueryRecycleBin WinAPI_ShellQueryUserNotificationState WinAPI_ShellRemoveLocalizedName WinAPI_ShellRestricted WinAPI_ShellSetKnownFolderPath WinAPI_ShellSetLocalizedName WinAPI_ShellSetSettings WinAPI_ShellStartNetConnectionDlg WinAPI_ShellUpdateImage WinAPI_ShellUserAuthenticationDlg WinAPI_ShellUserAuthenticationDlgEx WinAPI_ShortToWord WinAPI_ShowCaret WinAPI_ShowCursor WinAPI_ShowError WinAPI_ShowLastError WinAPI_ShowMsg WinAPI_ShowOwnedPopups WinAPI_ShowWindow WinAPI_ShutdownBlockReasonCreate WinAPI_ShutdownBlockReasonDestroy WinAPI_ShutdownBlockReasonQuery WinAPI_SizeOfResource WinAPI_StretchBlt WinAPI_StretchDIBits WinAPI_StrFormatByteSize WinAPI_StrFormatByteSizeEx WinAPI_StrFormatKBSize WinAPI_StrFromTimeInterval WinAPI_StringFromGUID WinAPI_StringLenA WinAPI_StringLenW WinAPI_StrLen WinAPI_StrokeAndFillPath WinAPI_StrokePath WinAPI_StructToArray WinAPI_SubLangId WinAPI_SubtractRect WinAPI_SwapDWord WinAPI_SwapQWord WinAPI_SwapWord WinAPI_SwitchColor WinAPI_SwitchDesktop WinAPI_SwitchToThisWindow WinAPI_SystemParametersInfo WinAPI_TabbedTextOut WinAPI_TerminateJobObject WinAPI_TerminateProcess WinAPI_TextOut WinAPI_TileWindows WinAPI_TrackMouseEvent WinAPI_TransparentBlt WinAPI_TwipsPerPixelX WinAPI_TwipsPerPixelY WinAPI_UnhookWindowsHookEx WinAPI_UnhookWinEvent WinAPI_UnionRect WinAPI_UnionStruct WinAPI_UniqueHardwareID WinAPI_UnloadKeyboardLayout WinAPI_UnlockFile WinAPI_UnmapViewOfFile WinAPI_UnregisterApplicationRestart WinAPI_UnregisterClass WinAPI_UnregisterHotKey WinAPI_UnregisterPowerSettingNotification WinAPI_UpdateLayeredWindow WinAPI_UpdateLayeredWindowEx WinAPI_UpdateLayeredWindowIndirect WinAPI_UpdateResource WinAPI_UpdateWindow WinAPI_UrlApplyScheme WinAPI_UrlCanonicalize WinAPI_UrlCombine WinAPI_UrlCompare WinAPI_UrlCreateFromPath WinAPI_UrlFixup WinAPI_UrlGetPart WinAPI_UrlHash WinAPI_UrlIs WinAPI_UserHandleGrantAccess WinAPI_ValidateRect WinAPI_ValidateRgn WinAPI_VerQueryRoot WinAPI_VerQueryValue WinAPI_VerQueryValueEx WinAPI_WaitForInputIdle WinAPI_WaitForMultipleObjects WinAPI_WaitForSingleObject WinAPI_WideCharToMultiByte WinAPI_WidenPath WinAPI_WindowFromDC WinAPI_WindowFromPoint WinAPI_WordToShort WinAPI_Wow64EnableWow64FsRedirection WinAPI_WriteConsole WinAPI_WriteFile WinAPI_WriteProcessMemory WinAPI_ZeroMemory WinNet_AddConnection WinNet_AddConnection2 WinNet_AddConnection3 WinNet_CancelConnection WinNet_CancelConnection2 WinNet_CloseEnum WinNet_ConnectionDialog WinNet_ConnectionDialog1 WinNet_DisconnectDialog WinNet_DisconnectDialog1 WinNet_EnumResource WinNet_GetConnection WinNet_GetConnectionPerformance WinNet_GetLastError WinNet_GetNetworkInformation WinNet_GetProviderName WinNet_GetResourceInformation WinNet_GetResourceParent WinNet_GetUniversalName WinNet_GetUser WinNet_OpenEnum WinNet_RestoreConnection WinNet_UseConnection Word_Create Word_DocAdd Word_DocAttach Word_DocClose Word_DocExport Word_DocFind Word_DocFindReplace Word_DocGet Word_DocLinkAdd Word_DocLinkGet Word_DocOpen Word_DocPictureAdd Word_DocPrint Word_DocRangeSet Word_DocSave Word_DocSaveAs Word_DocTableRead Word_DocTableWrite Word_Quit",e={ +variants:[a.COMMENT(";","$",{relevance:0}),a.COMMENT("#cs","#ce"),a.COMMENT("#comments-start","#comments-end")]},f={className:"variable",begin:"\\$[A-z0-9_]+"},g={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},h={variants:[a.BINARY_NUMBER_MODE,a.C_NUMBER_MODE]},i={className:"preprocessor",begin:"#",end:"$",keywords:"include include-once NoTrayIcon OnAutoItStartRegister RequireAdmin pragma Au3Stripper_Ignore_Funcs Au3Stripper_Ignore_Variables Au3Stripper_Off Au3Stripper_On Au3Stripper_Parameters AutoIt3Wrapper_Add_Constants AutoIt3Wrapper_Au3Check_Parameters AutoIt3Wrapper_Au3Check_Stop_OnWarning AutoIt3Wrapper_Aut2Exe AutoIt3Wrapper_AutoIt3 AutoIt3Wrapper_AutoIt3Dir AutoIt3Wrapper_Change2CUI AutoIt3Wrapper_Compile_Both AutoIt3Wrapper_Compression AutoIt3Wrapper_EndIf AutoIt3Wrapper_Icon AutoIt3Wrapper_If_Compile AutoIt3Wrapper_If_Run AutoIt3Wrapper_Jump_To_First_Error AutoIt3Wrapper_OutFile AutoIt3Wrapper_OutFile_Type AutoIt3Wrapper_OutFile_X64 AutoIt3Wrapper_PlugIn_Funcs AutoIt3Wrapper_Res_Comment Autoit3Wrapper_Res_Compatibility AutoIt3Wrapper_Res_Description AutoIt3Wrapper_Res_Field AutoIt3Wrapper_Res_File_Add AutoIt3Wrapper_Res_FileVersion AutoIt3Wrapper_Res_FileVersion_AutoIncrement AutoIt3Wrapper_Res_Icon_Add AutoIt3Wrapper_Res_Language AutoIt3Wrapper_Res_LegalCopyright AutoIt3Wrapper_Res_ProductVersion AutoIt3Wrapper_Res_requestedExecutionLevel AutoIt3Wrapper_Res_SaveSource AutoIt3Wrapper_Run_After AutoIt3Wrapper_Run_Au3Check AutoIt3Wrapper_Run_Au3Stripper AutoIt3Wrapper_Run_Before AutoIt3Wrapper_Run_Debug_Mode AutoIt3Wrapper_Run_SciTE_Minimized AutoIt3Wrapper_Run_SciTE_OutputPane_Minimized AutoIt3Wrapper_Run_Tidy AutoIt3Wrapper_ShowProgress AutoIt3Wrapper_Testing AutoIt3Wrapper_Tidy_Stop_OnError AutoIt3Wrapper_UPX_Parameters AutoIt3Wrapper_UseUPX AutoIt3Wrapper_UseX64 AutoIt3Wrapper_Version AutoIt3Wrapper_Versioning AutoIt3Wrapper_Versioning_Parameters Tidy_Off Tidy_On Tidy_Parameters EndRegion Region",contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",contains:[g,{className:"string",variants:[{begin:"<",end:">"},{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]}]},g,e]},j={className:"constant",begin:"@[A-z0-9_]+"},k={className:"function",beginKeywords:"Func",end:"$",excludeEnd:!0,illegal:"\\$|\\[|%",contains:[a.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[f,g,h]}]};return{case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:b,built_in:d,literal:c},contains:[e,f,g,h,i,j,k]}}),a.registerLanguage("avrasm",function(a){return{case_insensitive:!0,lexemes:"\\.?"+a.IDENT_RE,keywords:{keyword:"adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub subi swap tst wdr",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf",preprocessor:".byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list .listmac .macro .nolist .org .set"},contains:[a.C_BLOCK_COMMENT_MODE,a.COMMENT(";","$",{relevance:0}),a.C_NUMBER_MODE,a.BINARY_NUMBER_MODE,{className:"number",begin:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},a.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",illegal:"[^\\\\][^']"},{className:"label",begin:"^[A-Za-z0-9_.$]+:"},{className:"preprocessor",begin:"#",end:"$"},{className:"localvars",begin:"@[0-9]+"}]}}),a.registerLanguage("axapta",function(a){return{keywords:"false int abstract private char boolean static null if for true while long throw finally protected final return void enum else break new catch byte super case short default double public try this switch continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count order group by asc desc index hint like dispaly edit client server ttsbegin ttscommit str real date container anytype common div mod",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,{className:"preprocessor",begin:"#",end:"$"},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:":",contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]}]}}),a.registerLanguage("bash",function(a){var b={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)}/}]},c={className:"string",begin:/"/,end:/"/,contains:[a.BACKSLASH_ESCAPE,b,{className:"variable",begin:/\$\(/,end:/\)/,contains:[a.BACKSLASH_ESCAPE]}]},d={className:"string",begin:/'/,end:/'/};return{aliases:["sh","zsh"],lexemes:/-?[a-z\.]+/,keywords:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},contains:[{className:"shebang",begin:/^#![^\n]+sh\s*$/,relevance:10},{className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[a.inherit(a.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},a.HASH_COMMENT_MODE,a.NUMBER_MODE,c,d,b]}}),a.registerLanguage("brainfuck",function(a){var b={className:"literal",begin:"[\\+\\-]",relevance:0};return{aliases:["bf"],contains:[a.COMMENT("[^\\[\\]\\.,\\+\\-<> \r\n]","[\\[\\]\\.,\\+\\-<> \r\n]",{returnEnd:!0,relevance:0}),{className:"title",begin:"[\\[\\]]",relevance:0},{className:"string",begin:"[\\.,]",relevance:0},{begin:/\+\+|\-\-/,returnBegin:!0,contains:[b]},b]}}),a.registerLanguage("cal",function(a){var b="div mod in and or not xor asserterror begin case do downto else end exit for if of repeat then to until while with var",c="false true",d=[a.C_LINE_COMMENT_MODE,a.COMMENT(/\{/,/\}/,{relevance:0}),a.COMMENT(/\(\*/,/\*\)/,{relevance:10})],e={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},f={className:"string",begin:/(#\d+)+/},g={className:"date",begin:"\\b\\d+(\\.\\d+)?(DT|D|T)",relevance:0},h={className:"variable",begin:'"',end:'"'},i={className:"function",beginKeywords:"procedure",end:/[:;]/,keywords:"procedure|10",contains:[a.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:b,contains:[e,f]}].concat(d)},j={className:"class",begin:"OBJECT (Table|Form|Report|Dataport|Codeunit|XMLport|MenuSuite|Page|Query) (\\d+) ([^\\r\\n]+)",returnBegin:!0,contains:[a.TITLE_MODE,i]};return{case_insensitive:!0,keywords:{keyword:b,literal:c},illegal:/\/\*/,contains:[e,f,g,h,a.NUMBER_MODE,j,i]}}),a.registerLanguage("capnproto",function(a){return{aliases:["capnp"],keywords:{keyword:"struct enum interface union group import using const annotation extends in of on as with from fixed",built_in:"Void Bool Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float32 Float64 Text Data AnyPointer AnyStruct Capability List",literal:"true false"},contains:[a.QUOTE_STRING_MODE,a.NUMBER_MODE,a.HASH_COMMENT_MODE,{className:"shebang",begin:/@0x[\w\d]{16};/,illegal:/\n/},{className:"number",begin:/@\d+\b/},{className:"class",beginKeywords:"struct enum",end:/\{/,illegal:/\n/,contains:[a.inherit(a.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{className:"class",beginKeywords:"interface",end:/\{/,illegal:/\n/,contains:[a.inherit(a.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]}]}}),a.registerLanguage("ceylon",function(a){var b="assembly module package import alias class interface object given value assign void function new of extends satisfies abstracts in out return break continue throw assert dynamic if else switch case for while try catch finally then let this outer super is exists nonempty",c="shared abstract formal default actual variable late native deprecatedfinal sealed annotation suppressWarnings small",d="doc by license see throws tagged",e=c+" "+d,f={className:"subst",excludeBegin:!0,excludeEnd:!0,begin:/``/,end:/``/,keywords:b,relevance:10},g=[{className:"string",begin:'"""',end:'"""',relevance:10},{className:"string",begin:'"',end:'"',contains:[f]},{className:"string",begin:"'",end:"'"},{className:"number",begin:"#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]?\\d+)?)?[kMGTPmunpf]?",relevance:0}];return f.contains=g,{keywords:{keyword:b,annotation:e},illegal:"\\$[^01]|#[^0-9a-fA-F]",contains:[a.C_LINE_COMMENT_MODE,a.COMMENT("/\\*","\\*/",{contains:["self"]}),{className:"annotation",begin:'@[a-z]\\w*(?:\\:"[^"]*")?'}].concat(g)}}),a.registerLanguage("clojure",function(a){var b={built_in:"def defonce cond apply if-not if-let if not not= = < > <= >= == + / * - rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},c="a-zA-Z_\\-!.?+*=<>&#'",d="["+c+"]["+c+"0-9/;:]*",e="[-+]?\\d+(\\.\\d+)?",f={begin:d,relevance:0},g={className:"number",begin:e,relevance:0},h=a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),i=a.COMMENT(";","$",{relevance:0}),j={className:"literal",begin:/\b(true|false|nil)\b/},k={className:"collection",begin:"[\\[\\{]",end:"[\\]\\}]"},l={className:"comment",begin:"\\^"+d},m=a.COMMENT("\\^\\{","\\}"),n={className:"attribute",begin:"[:]"+d},o={className:"list",begin:"\\(",end:"\\)"},p={endsWithParent:!0,relevance:0},q={keywords:b,lexemes:d,className:"keyword",begin:d,starts:p},r=[o,h,l,m,i,n,k,g,j,f];return o.contains=[a.COMMENT("comment",""),q,p],p.contains=r,k.contains=r,{aliases:["clj"],illegal:/\S/,contains:[o,h,l,m,i,n,k,g,j]}}),a.registerLanguage("clojure-repl",function(a){return{contains:[{className:"prompt",begin:/^([\w.-]+|\s*#_)=>/,starts:{end:/$/,subLanguage:"clojure"}}]}}),a.registerLanguage("cmake",function(a){return{aliases:["cmake.in"],case_insensitive:!0,keywords:{keyword:"add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory break build_command cmake_minimum_required cmake_policy configure_file create_test_sourcelist define_property else elseif enable_language enable_testing endforeach endfunction endif endmacro endwhile execute_process export find_file find_library find_package find_path find_program fltk_wrap_ui foreach function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property if include include_directories include_external_msproject include_regular_expression install link_directories load_cache load_command macro mark_as_advanced message option output_required_files project qt_wrap_cpp qt_wrap_ui remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string target_link_libraries try_compile try_run unset variable_watch while build_name exec_program export_library_dependencies install_files install_programs install_targets link_libraries make_directory remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or",operator:"equal less greater strless strgreater strequal matches"},contains:[{className:"envvar",begin:"\\${",end:"}"},a.HASH_COMMENT_MODE,a.QUOTE_STRING_MODE,a.NUMBER_MODE]}}),a.registerLanguage("coffeescript",function(a){var b={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},c="[A-Za-z$_][0-9A-Za-z$_]*",d={className:"subst",begin:/#\{/,end:/}/,keywords:b},e=[a.BINARY_NUMBER_MODE,a.inherit(a.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[a.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[a.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[a.BACKSLASH_ESCAPE,d]},{begin:/"/,end:/"/,contains:[a.BACKSLASH_ESCAPE,d]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[d,a.HASH_COMMENT_MODE]},{begin:"//[gim]*",relevance:0},{begin:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{className:"property",begin:"@"+c},{begin:"`",end:"`",excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"}];d.contains=e;var f=a.inherit(a.TITLE_MODE,{begin:c}),g="(\\(.*\\))?\\s*\\B[-=]>",h={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:b,contains:["self"].concat(e)}]};return{aliases:["coffee","cson","iced"],keywords:b,illegal:/\/\*/,contains:e.concat([a.COMMENT("###","###"),a.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+c+"\\s*=\\s*"+g,end:"[-=]>",returnBegin:!0,contains:[f,h]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:g,end:"[-=]>",returnBegin:!0,contains:[h]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[f]},f]},{className:"attribute",begin:c+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}),a.registerLanguage("cpp",function(a){var b={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[a.inherit(a.QUOTE_STRING_MODE,{begin:'((u8?|U)|L)?"'}),{begin:'(u8?|U)?R"',end:'"',contains:[a.BACKSLASH_ESCAPE]},{begin:"'\\\\?.",end:"'",illegal:"."}]},d={className:"number",variants:[{begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{begin:a.C_NUMBER_RE}]},e={className:"preprocessor",begin:"#",end:"$",keywords:"if else elif endif define undef warning error line pragma ifdef ifndef",contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",contains:[c,{className:"string",begin:"<",end:">",illegal:"\\n"}]},c,d,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},f=a.IDENT_RE+"\\s*\\(",g={keyword:"int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf",literal:"true false nullptr NULL"};return{aliases:["c","cc","h","c++","h++","hpp"],keywords:g,illegal:"",keywords:g,contains:["self",b]},{begin:a.IDENT_RE+"::",keywords:g},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"("+a.IDENT_RE+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:g,illegal:/[^\w\s\*&]/,contains:[{begin:f,returnBegin:!0,contains:[a.TITLE_MODE],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,c,d]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,e]}]}}),a.registerLanguage("crmsh",function(a){var b="primitive rsc_template",c="group clone ms master location colocation order fencing_topology rsc_ticket acl_target acl_group user role tag xml",d="property rsc_defaults op_defaults",e="params meta operations op rule attributes utilization",f="read write deny defined not_defined in_range date spec in ref reference attribute type xpath version and or lt gt tag lte gte eq ne \\",g="number string",h="Master Started Slave Stopped start promote demote stop monitor true false";return{aliases:["crm","pcmk"],case_insensitive:!0,keywords:{keyword:e,operator:f,type:g,literal:h},contains:[a.HASH_COMMENT_MODE,{beginKeywords:"node",starts:{className:"identifier",end:"\\s*([\\w_-]+:)?",starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*"}}},{beginKeywords:b,starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*",starts:{className:"pragma",end:"\\s*@?[\\w_][\\w_\\.:-]*"}}},{begin:"\\b("+c.split(" ").join("|")+")\\s+",keywords:c,starts:{className:"title",end:"[\\$\\w_][\\w_-]*"}},{beginKeywords:d,starts:{className:"title",end:"\\s*([\\w_-]+:)?"}},a.QUOTE_STRING_MODE,{className:"pragma",begin:"(ocf|systemd|service|lsb):[\\w_:-]+",relevance:0},{className:"number",begin:"\\b\\d+(\\.\\d+)?(ms|s|h|m)?",relevance:0},{className:"number",begin:"[-]?(infinity|inf)",relevance:0},{className:"variable",begin:/([A-Za-z\$_\#][\w_-]+)=/,relevance:0},{className:"tag",begin:"",relevance:0}]}}),a.registerLanguage("crystal",function(a){function b(a,b){var c=[{begin:a,end:b}];return c[0].contains=c,c}var c="(_[uif](8|16|32|64))?",d="[a-zA-Z_]\\w*[!?=]?",e="!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",f="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\][=?]?",g={keyword:"abstract alias as asm begin break case class def do else elsif end ensure enum extend for fun if ifdef include instance_sizeof is_a? lib macro module next of out pointerof private protected rescue responds_to? return require self sizeof struct super then type typeof union unless until when while with yield __DIR__ __FILE__ __LINE__",literal:"false nil true"},h={className:"subst",begin:"#{",end:"}",keywords:g},i={className:"expansion",variants:[{begin:"\\{\\{",end:"\\}\\}"},{begin:"\\{%",end:"%\\}"}],keywords:g,relevance:10},j={className:"string",contains:[a.BACKSLASH_ESCAPE,h],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%w?\\(",end:"\\)",contains:b("\\(","\\)")},{begin:"%w?\\[",end:"\\]",contains:b("\\[","\\]")},{begin:"%w?{",end:"}",contains:b("{","}")},{begin:"%w?<",end:">",contains:b("<",">")},{begin:"%w?/",end:"/"},{begin:"%w?%",end:"%"},{begin:"%w?-",end:"-"},{begin:"%w?\\|",end:"\\|"}],relevance:0},k={begin:"("+e+")\\s*",contains:[{className:"regexp",contains:[a.BACKSLASH_ESCAPE,h],variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r\\(",end:"\\)",contains:b("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:b("\\[","\\]")},{begin:"%r{",end:"}",contains:b("{","}")},{begin:"%r<",end:">",contains:b("<",">")},{begin:"%r/",end:"/"},{begin:"%r%",end:"%"},{begin:"%r-",end:"-"},{begin:"%r\\|",end:"\\|"}]}],relevance:0},l={className:"regexp",contains:[a.BACKSLASH_ESCAPE,h],variants:[{begin:"%r\\(",end:"\\)",contains:b("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:b("\\[","\\]")},{begin:"%r{",end:"}",contains:b("{","}")},{begin:"%r<",end:">",contains:b("<",">")},{begin:"%r/",end:"/"},{begin:"%r%",end:"%"},{begin:"%r-",end:"-"},{begin:"%r\\|",end:"\\|"}],relevance:0},m={className:"annotation",begin:"@\\[",end:"\\]",relevance:5},n=[i,j,k,l,m,a.HASH_COMMENT_MODE,{className:"class",beginKeywords:"class module struct",end:"$|;",illegal:/=/,contains:[a.HASH_COMMENT_MODE,a.inherit(a.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{className:"inheritance",begin:"<\\s*",contains:[{className:"parent",begin:"("+a.IDENT_RE+"::)?"+a.IDENT_RE}]}]},{className:"class",beginKeywords:"lib enum union",end:"$|;",illegal:/=/,contains:[a.HASH_COMMENT_MODE,a.inherit(a.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"})],relevance:10},{className:"function",beginKeywords:"def",end:/\B\b/,contains:[a.inherit(a.TITLE_MODE,{begin:f,endsParent:!0})]},{className:"function",beginKeywords:"fun macro",end:/\B\b/,contains:[a.inherit(a.TITLE_MODE,{begin:f,endsParent:!0})],relevance:5},{className:"constant",begin:"(::)?(\\b[A-Z]\\w*(::)?)+",relevance:0},{className:"symbol",begin:a.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[j,{begin:f}],relevance:0},{className:"number",variants:[{begin:"\\b0b([01_]*[01])"+c},{begin:"\\b0o([0-7_]*[0-7])"+c},{begin:"\\b0x([A-Fa-f0-9_]*[A-Fa-f0-9])"+c},{begin:"\\b(([0-9][0-9_]*[0-9]|[0-9])(\\.[0-9_]*[0-9])?([eE][+-]?[0-9_]*[0-9])?)"+c}],relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|\\@\\@?|%)(\\w+))"}];return h.contains=n,m.contains=n,i.contains=n.slice(1),{aliases:["cr"],lexemes:d,keywords:g,contains:n}}),a.registerLanguage("cs",function(a){var b="abstract as base bool break byte case catch char checked const continue decimal dynamic default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long null when object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async protected public private internal ascending descending from get group into join let orderby partial select set value var where yield",c=a.IDENT_RE+"(<"+a.IDENT_RE+">)?";return{aliases:["csharp"],keywords:b,illegal:/::/,contains:[a.COMMENT("///","$",{returnBegin:!0,contains:[{className:"xmlDocTag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"preprocessor",begin:"#",end:"$",keywords:"if else elif endif define undef warning error line region endregion pragma checksum"},{className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,{beginKeywords:"class interface",end:/[{;=]/,illegal:/[^\s:]/,contains:[a.TITLE_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",end:/[{;=]/,illegal:/[^\s:]/,contains:[{className:"title",begin:"[a-zA-Z](\\.?\\w)*",relevance:0},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new return throw await",relevance:0},{className:"function",begin:"("+c+"\\s+)+"+a.IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:b,contains:[{begin:a.IDENT_RE+"\\s*\\(",returnBegin:!0,contains:[a.TITLE_MODE],relevance:0},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:b,relevance:0,contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,a.C_BLOCK_COMMENT_MODE]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]}]}}),a.registerLanguage("css",function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*",c={className:"function",begin:b+"\\(",returnBegin:!0,excludeEnd:!0,end:"\\("},d={className:"rule",begin:/[A-Z\_\.\-]+\s*:/,returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",excludeEnd:!0,starts:{className:"value",endsWithParent:!0,excludeEnd:!0,contains:[c,a.CSS_NUMBER_MODE,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,a.C_BLOCK_COMMENT_MODE,{className:"hexcolor",begin:"#[0-9A-Fa-f]+"},{className:"important",begin:"!important"}]}}]};return{case_insensitive:!0,illegal:/[=\/|'\$]/,contains:[a.C_BLOCK_COMMENT_MODE,{className:"id",begin:/\#[A-Za-z0-9_-]+/},{className:"class",begin:/\.[A-Za-z0-9_-]+/},{className:"attr_selector",begin:/\[/,end:/\]/,illegal:"$"},{className:"pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"']+/},{className:"at_rule",begin:"@(font-face|page)",lexemes:"[a-z-]+",keywords:"font-face page"},{className:"at_rule",begin:"@",end:"[{;]",contains:[{className:"keyword",begin:/\S+/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,contains:[c,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.CSS_NUMBER_MODE]}]},{className:"tag",begin:b,relevance:0},{className:"rules",begin:"{",end:"}",illegal:/\S/,contains:[a.C_BLOCK_COMMENT_MODE,d]}]}}),a.registerLanguage("d",function(a){var b={keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},c="(0|[1-9][\\d_]*)",d="(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)",e="0[bB][01_]+",f="([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)",g="0[xX]"+f,h="([eE][+-]?"+d+")",i="("+d+"(\\.\\d*|"+h+")|\\d+\\."+d+d+"|\\."+c+h+"?)",j="(0[xX]("+f+"\\."+f+"|\\.?"+f+")[pP][+-]?"+d+")",k="("+c+"|"+e+"|"+g+")",l="("+j+"|"+i+")",m="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};",n={className:"number",begin:"\\b"+k+"(L|u|U|Lu|LU|uL|UL)?",relevance:0},o={className:"number",begin:"\\b("+l+"([fF]|L|i|[fF]i|Li)?|"+k+"(i|[fF]i|Li))",relevance:0},p={className:"string",begin:"'("+m+"|.)",end:"'",illegal:"."},q={begin:m,relevance:0},r={className:"string",begin:'"',contains:[q],end:'"[cwd]?'},s={className:"string",begin:'[rq]"',end:'"[cwd]?',relevance:5},t={className:"string",begin:"`",end:"`[cwd]?"},u={className:"string",begin:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',relevance:10},v={className:"string",begin:'q"\\{',end:'\\}"'},w={className:"shebang",begin:"^#!",end:"$",relevance:5},x={className:"preprocessor",begin:"#(line)",end:"$",relevance:5},y={className:"keyword",begin:"@[a-zA-Z_][a-zA-Z_\\d]*"},z=a.COMMENT("\\/\\+","\\+\\/",{contains:["self"],relevance:10});return{lexemes:a.UNDERSCORE_IDENT_RE,keywords:b,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,z,u,r,s,t,v,o,n,p,w,x,y]}}),a.registerLanguage("markdown",function(a){return{aliases:["md","mkdown","mkd"],contains:[{className:"header",variants:[{begin:"^#{1,6}",end:"$"},{begin:"^.+?\\n[=-]{2,}$"}]},{begin:"<",end:">",subLanguage:"xml",relevance:0},{className:"bullet",begin:"^([*+-]|(\\d+\\.))\\s+"},{className:"strong",begin:"[*_]{2}.+?[*_]{2}"},{className:"emphasis",variants:[{begin:"\\*.+?\\*"},{begin:"_.+?_",relevance:0}]},{className:"blockquote",begin:"^>\\s+",end:"$"},{className:"code",variants:[{begin:"`.+?`"},{begin:"^( {4}| )",end:"$",relevance:0}]},{className:"horizontal_rule",begin:"^[-\\*]{3,}",end:"$"},{begin:"\\[.+?\\][\\(\\[].*?[\\)\\]]",returnBegin:!0,contains:[{className:"link_label",begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0,relevance:0},{className:"link_url",begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"link_reference",begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}],relevance:10},{begin:"^\\[.+\\]:",returnBegin:!0,contains:[{className:"link_reference",begin:"\\[",end:"\\]:",excludeBegin:!0,excludeEnd:!0,starts:{className:"link_url",end:"$"}}]}]}}),a.registerLanguage("dart",function(a){var b={className:"subst",begin:"\\$\\{",end:"}",keywords:"true false null this is new super"},c={className:"string",variants:[{begin:"r'''",end:"'''"},{begin:'r"""',end:'"""'},{begin:"r'",end:"'",illegal:"\\n"},{ +begin:'r"',end:'"',illegal:"\\n"},{begin:"'''",end:"'''",contains:[a.BACKSLASH_ESCAPE,b]},{begin:'"""',end:'"""',contains:[a.BACKSLASH_ESCAPE,b]},{begin:"'",end:"'",illegal:"\\n",contains:[a.BACKSLASH_ESCAPE,b]},{begin:'"',end:'"',illegal:"\\n",contains:[a.BACKSLASH_ESCAPE,b]}]};b.contains=[a.C_NUMBER_MODE,c];var d={keyword:"assert break case catch class const continue default do else enum extends false final finally for if in is new null rethrow return super switch this throw true try var void while with",literal:"abstract as dynamic export external factory get implements import library operator part set static typedef",built_in:"print Comparable DateTime Duration Function Iterable Iterator List Map Match Null Object Pattern RegExp Set Stopwatch String StringBuffer StringSink Symbol Type Uri bool double int num document window querySelector querySelectorAll Element ElementList"};return{keywords:d,contains:[c,a.COMMENT("/\\*\\*","\\*/",{subLanguage:"markdown"}),a.COMMENT("///","$",{subLanguage:"markdown"}),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]},a.C_NUMBER_MODE,{className:"annotation",begin:"@[A-Za-z]+"},{begin:"=>"}]}}),a.registerLanguage("delphi",function(a){var b="exports register file shl array record property for mod while set ally label uses raise not stored class safecall var interface or private static exit index inherited to else stdcall override shr asm far resourcestring finalization packed virtual out and protected library do xorwrite goto near function end div overload object unit begin string on inline repeat until destructor write message program with read initialization except default nil if case cdecl in downto threadvar of try pascal const external constructor type public then implementation finally published procedure",c=[a.C_LINE_COMMENT_MODE,a.COMMENT(/\{/,/\}/,{relevance:0}),a.COMMENT(/\(\*/,/\*\)/,{relevance:10})],d={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},e={className:"string",begin:/(#\d+)+/},f={begin:a.IDENT_RE+"\\s*=\\s*class\\s*\\(",returnBegin:!0,contains:[a.TITLE_MODE]},g={className:"function",beginKeywords:"function constructor destructor procedure",end:/[:;]/,keywords:"function constructor|10 destructor|10 procedure|10",contains:[a.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:b,contains:[d,e]}].concat(c)};return{case_insensitive:!0,keywords:b,illegal:/"|\$[G-Zg-z]|\/\*|<\/|\|/,contains:[d,e,a.NUMBER_MODE,f,g].concat(c)}}),a.registerLanguage("diff",function(a){return{aliases:["patch"],contains:[{className:"chunk",relevance:10,variants:[{begin:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{begin:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{className:"header",variants:[{begin:/Index: /,end:/$/},{begin:/=====/,end:/=====$/},{begin:/^\-\-\-/,end:/$/},{begin:/^\*{3} /,end:/$/},{begin:/^\+\+\+/,end:/$/},{begin:/\*{5}/,end:/\*{5}$/}]},{className:"addition",begin:"^\\+",end:"$"},{className:"deletion",begin:"^\\-",end:"$"},{className:"change",begin:"^\\!",end:"$"}]}}),a.registerLanguage("django",function(a){var b={className:"filter",begin:/\|[A-Za-z]+:?/,keywords:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone",contains:[{className:"argument",begin:/"/,end:/"/},{className:"argument",begin:/'/,end:/'/}]};return{aliases:["jinja"],case_insensitive:!0,subLanguage:"xml",contains:[a.COMMENT(/\{%\s*comment\s*%}/,/\{%\s*endcomment\s*%}/),a.COMMENT(/\{#/,/#}/),{className:"template_tag",begin:/\{%/,end:/%}/,keywords:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor in ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup by as ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim",contains:[b]},{className:"variable",begin:/\{\{/,end:/}}/,contains:[b]}]}}),a.registerLanguage("dns",function(a){return{aliases:["bind","zone"],keywords:{keyword:"IN A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME DHCID DLV DNAME DNSKEY DS HIP IPSECKEY KEY KX LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RRSIG RP SIG SOA SRV SSHFP TA TKEY TLSA TSIG TXT"},contains:[a.COMMENT(";","$"),{className:"operator",beginKeywords:"$TTL $GENERATE $INCLUDE $ORIGIN"},{className:"number",begin:"((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))"},{className:"number",begin:"((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])"}]}}),a.registerLanguage("dockerfile",function(a){return{aliases:["docker"],case_insensitive:!0,keywords:{built_ins:"from maintainer cmd expose add copy entrypoint volume user workdir onbuild run env label"},contains:[a.HASH_COMMENT_MODE,{keywords:{built_in:"run cmd entrypoint volume add copy workdir onbuild label"},begin:/^ *(onbuild +)?(run|cmd|entrypoint|volume|add|copy|workdir|label) +/,starts:{end:/[^\\]\n/,subLanguage:"bash"}},{keywords:{built_in:"from maintainer expose env user onbuild"},begin:/^ *(onbuild +)?(from|maintainer|expose|env|user|onbuild) +/,end:/[^\\]\n/,contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.NUMBER_MODE,a.HASH_COMMENT_MODE]}]}}),a.registerLanguage("dos",function(a){var b=a.COMMENT(/@?rem\b/,/$/,{relevance:10}),c={className:"label",begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)",relevance:0};return{aliases:["bat","cmd"],case_insensitive:!0,illegal:/\/\*/,keywords:{flow:"if else goto for in do call exit not exist errorlevel defined",operator:"equ neq lss leq gtr geq",keyword:"shift cd dir echo setlocal endlocal set pause copy",stream:"prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux",winutils:"ping net ipconfig taskkill xcopy ren del",built_in:"append assoc at attrib break cacls cd chcp chdir chkdsk chkntfs cls cmd color comp compact convert date dir diskcomp diskcopy doskey erase fs find findstr format ftype graftabl help keyb label md mkdir mode more move path pause print popd pushd promt rd recover rem rename replace restore rmdir shiftsort start subst time title tree type ver verify vol"},contains:[{className:"envvar",begin:/%%[^ ]|%[^ ]+?%|![^ ]+?!/},{className:"function",begin:c.begin,end:"goto:eof",contains:[a.inherit(a.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),b]},{className:"number",begin:"\\b\\d+",relevance:0},b]}}),a.registerLanguage("dust",function(a){var b="if eq ne lt lte gt gte select default math sep";return{aliases:["dst"],case_insensitive:!0,subLanguage:"xml",contains:[{className:"expression",begin:"{",end:"}",relevance:0,contains:[{className:"begin-block",begin:"#[a-zA-Z- .]+",keywords:b},{className:"string",begin:'"',end:'"'},{className:"end-block",begin:"\\/[a-zA-Z- .]+",keywords:b},{className:"variable",begin:"[a-zA-Z-.]+",keywords:b,relevance:0}]}]}}),a.registerLanguage("elixir",function(a){var b="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?",c="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",d="and false then defined module in return redo retry end for true self when next until do begin unless nil break not case cond alias while ensure or include use alias fn quote",e={className:"subst",begin:"#\\{",end:"}",lexemes:b,keywords:d},f={className:"string",contains:[a.BACKSLASH_ESCAPE,e],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},g={className:"function",beginKeywords:"def defp defmacro",end:/\B\b/,contains:[a.inherit(a.TITLE_MODE,{begin:b,endsParent:!0})]},h=a.inherit(g,{className:"class",beginKeywords:"defmodule defrecord",end:/\bdo\b|$|;/}),i=[f,a.HASH_COMMENT_MODE,h,g,{className:"constant",begin:"(\\b[A-Z_]\\w*(.)?)+",relevance:0},{className:"symbol",begin:":",contains:[f,{begin:c}],relevance:0},{className:"symbol",begin:b+":",relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{begin:"->"},{begin:"("+a.RE_STARTERS_RE+")\\s*",contains:[a.HASH_COMMENT_MODE,{className:"regexp",illegal:"\\n",contains:[a.BACKSLASH_ESCAPE,e],variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}],relevance:0}];return e.contains=i,{lexemes:b,keywords:d,contains:i}}),a.registerLanguage("elm",function(a){var b=[a.COMMENT("--","$"),a.COMMENT("{-","-}",{contains:["self"]})],c={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},d={className:"container",begin:"\\(",end:"\\)",illegal:'"',contains:[{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"}].concat(b)},e={className:"container",begin:"{",end:"}",contains:d.contains};return{keywords:"let in if then else case of where module import exposing type alias as infix infixl infixr port",contains:[{className:"module",begin:"\\bmodule\\b",end:"where",keywords:"module where",contains:[d].concat(b),illegal:"\\W\\.|;"},{className:"import",begin:"\\bimport\\b",end:"$",keywords:"import|0 as exposing",contains:[d].concat(b),illegal:"\\W\\.|;"},{className:"typedef",begin:"\\btype\\b",end:"$",keywords:"type alias",contains:[c,d,e].concat(b)},{className:"infix",beginKeywords:"infix infixl infixr",end:"$",contains:[a.C_NUMBER_MODE].concat(b)},{className:"foreign",begin:"\\bport\\b",end:"$",keywords:"port",contains:b},a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,c,a.inherit(a.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),{begin:"->|<-"}].concat(b)}}),a.registerLanguage("ruby",function(a){var b="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",c="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",d={className:"doctag",begin:"@[A-Za-z]+"},e={className:"value",begin:"#<",end:">"},f=[a.COMMENT("#","$",{contains:[d]}),a.COMMENT("^\\=begin","^\\=end",{contains:[d],relevance:10}),a.COMMENT("^__END__","\\n$")],g={className:"subst",begin:"#\\{",end:"}",keywords:c},h={className:"string",contains:[a.BACKSLASH_ESCAPE,g],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[qQwWx]?\\(",end:"\\)"},{begin:"%[qQwWx]?\\[",end:"\\]"},{begin:"%[qQwWx]?{",end:"}"},{begin:"%[qQwWx]?<",end:">"},{begin:"%[qQwWx]?/",end:"/"},{begin:"%[qQwWx]?%",end:"%"},{begin:"%[qQwWx]?-",end:"-"},{begin:"%[qQwWx]?\\|",end:"\\|"},{begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]},i={className:"params",begin:"\\(",end:"\\)",keywords:c},j=[h,e,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[a.inherit(a.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{className:"inheritance",begin:"<\\s*",contains:[{className:"parent",begin:"("+a.IDENT_RE+"::)?"+a.IDENT_RE}]}].concat(f)},{className:"function",beginKeywords:"def",end:"$|;",contains:[a.inherit(a.TITLE_MODE,{begin:b}),i].concat(f)},{className:"constant",begin:"(::)?(\\b[A-Z]\\w*(::)?)+",relevance:0},{className:"symbol",begin:a.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[h,{begin:b}],relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{begin:"("+a.RE_STARTERS_RE+")\\s*",contains:[e,{className:"regexp",contains:[a.BACKSLASH_ESCAPE,g],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r{",end:"}[a-z]*"},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(f),relevance:0}].concat(f);g.contains=j,i.contains=j;var k="[>?]>",l="[\\w#]+\\(\\w+\\):\\d+:\\d+>",m="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",n=[{begin:/^\s*=>/,className:"status",starts:{end:"$",contains:j}},{className:"prompt",begin:"^("+k+"|"+l+"|"+m+")",starts:{end:"$",contains:j}}];return{aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:f.concat(n).concat(j)}}),a.registerLanguage("erb",function(a){return{subLanguage:"xml",contains:[a.COMMENT("<%#","%>"),{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}),a.registerLanguage("erlang-repl",function(a){return{keywords:{special_functions:"spawn spawn_link self",reserved:"after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse|10 query receive rem try when xor"},contains:[{className:"prompt",begin:"^[0-9]+> ",relevance:10},a.COMMENT("%","$"),{className:"number",begin:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",relevance:0},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{className:"constant",begin:"\\?(::)?([A-Z]\\w*(::)?)+"},{className:"arrow",begin:"->"},{className:"ok",begin:"ok"},{className:"exclamation_mark",begin:"!"},{className:"function_or_atom",begin:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",relevance:0},{className:"variable",begin:"[A-Z][a-zA-Z0-9_']*",relevance:0}]}}),a.registerLanguage("erlang",function(a){var b="[a-z'][a-zA-Z0-9_']*",c="("+b+":"+b+"|"+b+")",d={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",literal:"false true"},e=a.COMMENT("%","$"),f={className:"number",begin:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",relevance:0},g={begin:"fun\\s+"+b+"/\\d+"},h={begin:c+"\\(",end:"\\)",returnBegin:!0,relevance:0,contains:[{className:"function_name",begin:c,relevance:0},{begin:"\\(",end:"\\)",endsWithParent:!0,returnEnd:!0,relevance:0}]},i={className:"tuple",begin:"{",end:"}",relevance:0},j={className:"variable",begin:"\\b_([A-Z][A-Za-z0-9_]*)?",relevance:0},k={className:"variable",begin:"[A-Z][a-zA-Z0-9_]*",relevance:0},l={begin:"#"+a.UNDERSCORE_IDENT_RE,relevance:0,returnBegin:!0,contains:[{className:"record_name",begin:"#"+a.UNDERSCORE_IDENT_RE,relevance:0},{begin:"{",end:"}",relevance:0}]},m={beginKeywords:"fun receive if try case",end:"end",keywords:d};m.contains=[e,g,a.inherit(a.APOS_STRING_MODE,{className:""}),m,h,a.QUOTE_STRING_MODE,f,i,j,k,l];var n=[e,g,m,h,a.QUOTE_STRING_MODE,f,i,j,k,l];h.contains[1].contains=n,i.contains=n,l.contains[1].contains=n;var o={className:"params",begin:"\\(",end:"\\)",contains:n};return{aliases:["erl"],keywords:d,illegal:"(",returnBegin:!0,illegal:"\\(|#|//|/\\*|\\\\|:|;",contains:[o,a.inherit(a.TITLE_MODE,{begin:b})],starts:{end:";|\\.",keywords:d,contains:n}},e,{className:"pp",begin:"^-",end:"\\.",relevance:0,excludeEnd:!0,returnBegin:!0,lexemes:"-"+a.IDENT_RE,keywords:"-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn -import -include -include_lib -compile -define -else -endif -file -behaviour -behavior -spec",contains:[o]},f,a.QUOTE_STRING_MODE,l,j,k,i,{begin:/\.$/}]}}),a.registerLanguage("fix",function(a){return{contains:[{begin:/[^\u2401\u0001]+/,end:/[\u2401\u0001]/,excludeEnd:!0,returnBegin:!0,returnEnd:!1,contains:[{begin:/([^\u2401\u0001=]+)/,end:/=([^\u2401\u0001=]+)/,returnEnd:!0,returnBegin:!1,className:"attribute"},{begin:/=/,end:/([\u2401\u0001])/,excludeEnd:!0,excludeBegin:!0,className:"string"}]}],case_insensitive:!0}}),a.registerLanguage("fortran",function(a){var b={className:"params",begin:"\\(",end:"\\)"},c={constant:".False. .True.",type:"integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_ofacosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image"};return{case_insensitive:!0,aliases:["f90","f95"],keywords:c,illegal:/\/\*/,contains:[a.inherit(a.APOS_STRING_MODE,{className:"string",relevance:0}),a.inherit(a.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[a.UNDERSCORE_TITLE_MODE,b]},a.COMMENT("!","$",{relevance:0}),{className:"number",begin:"(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?",relevance:0}]}}),a.registerLanguage("fsharp",function(a){var b={begin:"<",end:">",contains:[a.inherit(a.TITLE_MODE,{begin:/'[a-zA-Z0-9_]+/})]};return{aliases:["fs"],keywords:"abstract and as assert base begin class default delegate do done downcast downto elif else end exception extern false finally for fun function global if in inherit inline interface internal lazy let match member module mutable namespace new null of open or override private public rec return sig static struct then to true try type upcast use val void when while with yield",illegal:/\/\*/,contains:[{className:"keyword",begin:/\b(yield|return|let|do)!/},{className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},{className:"string",begin:'"""',end:'"""'},a.COMMENT("\\(\\*","\\*\\)"),{className:"class",beginKeywords:"type",end:"\\(|=|$",excludeEnd:!0,contains:[a.UNDERSCORE_TITLE_MODE,b]},{className:"annotation",begin:"\\[<",end:">\\]",relevance:10},{className:"attribute",begin:"\\B('[A-Za-z])\\b",contains:[a.BACKSLASH_ESCAPE]},a.C_LINE_COMMENT_MODE,a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),a.C_NUMBER_MODE]}}),a.registerLanguage("gams",function(a){var b="abort acronym acronyms alias all and assign binary card diag display else1 eps eq equation equations file files for1 free ge gt if inf integer le loop lt maximizing minimizing model models na ne negative no not option options or ord parameter parameters positive prod putpage puttl repeat sameas scalar scalars semicont semiint set1 sets smax smin solve sos1 sos2 sum system table then until using variable variables while1 xor yes";return{aliases:["gms"],case_insensitive:!0,keywords:b,contains:[{className:"section",beginKeywords:"sets parameters variables equations",end:";",contains:[{begin:"/",end:"/",contains:[a.NUMBER_MODE]}]},{className:"string",begin:"\\*{3}",end:"\\*{3}"},a.NUMBER_MODE,{className:"number",begin:"\\$[a-zA-Z0-9]+"}]}}),a.registerLanguage("gcode",function(a){var b="[A-Z_][A-Z0-9_.]*",c="\\%",d={literal:"",built_in:"",keyword:"IF DO WHILE ENDWHILE CALL ENDIF SUB ENDSUB GOTO REPEAT ENDREPEAT EQ LT GT NE GE LE OR XOR"},e={className:"preprocessor",begin:"([O])([0-9]+)"},f=[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.COMMENT(/\(/,/\)/),a.inherit(a.C_NUMBER_MODE,{begin:"([-+]?([0-9]*\\.?[0-9]+\\.?))|"+a.C_NUMBER_RE}),a.inherit(a.APOS_STRING_MODE,{illegal:null}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),{className:"keyword",begin:"([G])([0-9]+\\.?[0-9]?)"},{className:"title",begin:"([M])([0-9]+\\.?[0-9]?)"},{className:"title",begin:"(VC|VS|#)",end:"(\\d+)"},{className:"title",begin:"(VZOFX|VZOFY|VZOFZ)"},{className:"built_in",begin:"(ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN)(\\[)",end:"([-+]?([0-9]*\\.?[0-9]+\\.?))(\\])"},{className:"label",variants:[{begin:"N",end:"\\d+",illegal:"\\W"}]}];return{aliases:["nc"],case_insensitive:!0,lexemes:b,keywords:d,contains:[{className:"preprocessor",begin:c},e].concat(f)}}),a.registerLanguage("gherkin",function(a){return{aliases:["feature"],keywords:"Feature Background Ability Business Need Scenario Scenarios Scenario Outline Scenario Template Examples Given And Then But When",contains:[{className:"keyword",begin:"\\*"},a.COMMENT("@[^@\r\n ]+","$"),{begin:"\\|",end:"\\|\\w*$",contains:[{className:"string",begin:"[^|]+"}]},{className:"variable",begin:"<",end:">"},a.HASH_COMMENT_MODE,{className:"string",begin:'"""',end:'"""'},a.QUOTE_STRING_MODE]}}),a.registerLanguage("glsl",function(a){return{keywords:{keyword:"atomic_uint attribute bool break bvec2 bvec3 bvec4 case centroid coherent const continue default discard dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 do double dvec2 dvec3 dvec4 else flat float for highp if iimage1D iimage1DArray iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer iimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect image3D imageBuffer imageCube imageCubeArray in inout int invariant isampler1D isampler1DArray isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 layout lowp mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 mediump noperspective out patch precision readonly restrict return sample sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow smooth struct subroutine switch uimage1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint uniform usampler1D usampler1DArray usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D usamplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 varying vec2 vec3 vec4 void volatile while writeonly",built_in:"gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_InstanceID gl_InvocationID gl_Layer gl_LightModel gl_LightSource gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffsetgl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_PerVertex gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin asinh atan atanh atomicCounter atomicCounterDecrement atomicCounterIncrement barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan greaterThanEqual imageAtomicAdd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memoryBarrier min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod textureProjLodOffset textureProjOffset textureQueryLod textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow gl_TextureMatrix gl_TextureMatrixInverse",literal:"true false"},illegal:'"',contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.C_NUMBER_MODE,{className:"preprocessor",begin:"#",end:"$"}]}}),a.registerLanguage("go",function(a){var b={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer", +constant:"true false iota nil",typename:"bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{aliases:["golang"],keywords:b,illegal:"",end:",\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"symbol",begin:":\\w+"},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]},{begin:"\\(\\s*",end:"\\s*\\)",excludeEnd:!0,contains:[{begin:"\\w+\\s*=",end:"\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attribute",begin:"\\w+",relevance:0},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]}]},{className:"bullet",begin:"^\\s*[=~]\\s*",relevance:0},{begin:"#{",starts:{end:"}",subLanguage:"ruby"}}]}}),a.registerLanguage("handlebars",function(a){var b="each in with if else unless bindattr action collection debugger log outlet template unbound view yield";return{aliases:["hbs","html.hbs","html.handlebars"],case_insensitive:!0,subLanguage:"xml",contains:[{className:"expression",begin:"{{",end:"}}",contains:[{className:"begin-block",begin:"#[a-zA-Z- .]+",keywords:b},{className:"string",begin:'"',end:'"'},{className:"end-block",begin:"\\/[a-zA-Z- .]+",keywords:b},{className:"variable",begin:"[a-zA-Z-.]+",keywords:b}]}]}}),a.registerLanguage("haskell",function(a){var b=[a.COMMENT("--","$"),a.COMMENT("{-","-}",{contains:["self"]})],c={className:"pragma",begin:"{-#",end:"#-}"},d={className:"preprocessor",begin:"^#",end:"$"},e={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},f={className:"container",begin:"\\(",end:"\\)",illegal:'"',contains:[c,d,{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},a.inherit(a.TITLE_MODE,{begin:"[_a-z][\\w']*"})].concat(b)},g={className:"container",begin:"{",end:"}",contains:f.contains};return{aliases:["hs"],keywords:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",contains:[{className:"module",begin:"\\bmodule\\b",end:"where",keywords:"module where",contains:[f].concat(b),illegal:"\\W\\.|;"},{className:"import",begin:"\\bimport\\b",end:"$",keywords:"import|0 qualified as hiding",contains:[f].concat(b),illegal:"\\W\\.|;"},{className:"class",begin:"^(\\s*)?(class|instance)\\b",end:"where",keywords:"class family instance where",contains:[e,f].concat(b)},{className:"typedef",begin:"\\b(data|(new)?type)\\b",end:"$",keywords:"data family type newtype deriving",contains:[c,e,f,g].concat(b)},{className:"default",beginKeywords:"default",end:"$",contains:[e,f].concat(b)},{className:"infix",beginKeywords:"infix infixl infixr",end:"$",contains:[a.C_NUMBER_MODE].concat(b)},{className:"foreign",begin:"\\bforeign\\b",end:"$",keywords:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",contains:[e,a.QUOTE_STRING_MODE].concat(b)},{className:"shebang",begin:"#!\\/usr\\/bin\\/env runhaskell",end:"$"},c,d,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,e,a.inherit(a.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),{begin:"->|<-"}].concat(b)}}),a.registerLanguage("haxe",function(a){var b="([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)";return{aliases:["hx"],keywords:{keyword:"break callback case cast catch class continue default do dynamic else enum extends extern for function here if implements import in inline interface never new override package private public return static super switch this throw trace try typedef untyped using var while",literal:"true false null"},contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.C_NUMBER_MODE,{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},a.TITLE_MODE]},{className:"preprocessor",begin:"#",end:"$",keywords:"if else elseif end error"},{className:"function",beginKeywords:"function",end:"[{;]",excludeEnd:!0,illegal:"\\S",contains:[a.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{className:"type",begin:":",end:b,relevance:10}]}]}}),a.registerLanguage("http",function(a){return{aliases:["https"],illegal:"\\S",contains:[{className:"status",begin:"^HTTP/[0-9\\.]+",end:"$",contains:[{className:"number",begin:"\\b\\d{3}\\b"}]},{className:"request",begin:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",returnBegin:!0,end:"$",contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0}]},{className:"attribute",begin:"^\\w",end:": ",excludeEnd:!0,illegal:"\\n|\\s|=",starts:{className:"string",end:"$"}},{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}]}}),a.registerLanguage("inform7",function(a){var b="\\[",c="\\]";return{aliases:["i7"],case_insensitive:!0,keywords:{keyword:"thing room person man woman animal container supporter backdrop door scenery open closed locked inside gender is are say understand kind of rule"},contains:[{className:"string",begin:'"',end:'"',relevance:0,contains:[{className:"subst",begin:b,end:c}]},{className:"title",begin:/^(Volume|Book|Part|Chapter|Section|Table)\b/,end:"$"},{begin:/^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/,end:":",contains:[{begin:"\\b\\(This",end:"\\)"}]},{className:"comment",begin:b,end:c,contains:["self"]}]}}),a.registerLanguage("ini",function(a){var b={className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]};return{aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[a.COMMENT(";","$"),a.HASH_COMMENT_MODE,{className:"title",begin:/^\s*\[+/,end:/\]+/},{className:"setting",begin:/^[a-z0-9\[\]_-]+\s*=\s*/,end:"$",contains:[{className:"value",endsWithParent:!0,keywords:"on off true false yes no",contains:[{className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)}/}]},b,{className:"number",begin:/([\+\-]+)?[\d]+_[\d_]+/},a.NUMBER_MODE],relevance:0}]}]}}),a.registerLanguage("irpf90",function(a){var b={className:"params",begin:"\\(",end:"\\)"},c={constant:".False. .True.",type:"integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure begin_provider &begin_provider end_provider begin_shell end_shell begin_template end_template subst assert touch soft_touch provide no_dep free irp_if irp_else irp_endif irp_write irp_read",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_ofacosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image IRP_ALIGN irp_here"};return{case_insensitive:!0,keywords:c,illegal:/\/\*/,contains:[a.inherit(a.APOS_STRING_MODE,{className:"string",relevance:0}),a.inherit(a.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[a.UNDERSCORE_TITLE_MODE,b]},a.COMMENT("!","$",{relevance:0}),a.COMMENT("begin_doc","end_doc",{relevance:10}),{className:"number",begin:"(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?",relevance:0}]}}),a.registerLanguage("java",function(a){var b=a.UNDERSCORE_IDENT_RE+"(<"+a.UNDERSCORE_IDENT_RE+">)?",c="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",d="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",e={className:"number",begin:d,relevance:0};return{aliases:["jsp"],keywords:c,illegal:/<\/|#/,contains:[a.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"("+b+"\\s+)+"+a.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:c,contains:[{begin:a.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[a.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,keywords:c,relevance:0,contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,a.C_BLOCK_COMMENT_MODE]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},e,{className:"annotation",begin:"@[A-Za-z]+"}]}}),a.registerLanguage("javascript",function(a){return{aliases:["js"],keywords:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},contains:[{className:"pi",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[a.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"}]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:a.C_NUMBER_RE}],relevance:0},{begin:"("+a.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.REGEXP_MODE,{begin:/\s*[);\]]/,relevance:0,subLanguage:"xml"}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[a.inherit(a.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]}],illegal:/\[|%/},{begin:/\$[(.]/},{begin:"\\."+a.IDENT_RE,relevance:0},{beginKeywords:"import",end:"[;$]",keywords:"import from as",contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE]},{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends"},a.UNDERSCORE_TITLE_MODE]}],illegal:/#/}}),a.registerLanguage("json",function(a){var b={literal:"true false null"},c=[a.QUOTE_STRING_MODE,a.C_NUMBER_MODE],d={className:"value",end:",",endsWithParent:!0,excludeEnd:!0,contains:c,keywords:b},e={begin:"{",end:"}",contains:[{className:"attribute",begin:'\\s*"',end:'"\\s*:\\s*',excludeBegin:!0,excludeEnd:!0,contains:[a.BACKSLASH_ESCAPE],illegal:"\\n",starts:d}],illegal:"\\S"},f={begin:"\\[",end:"\\]",contains:[a.inherit(d,{className:null})],illegal:"\\S"};return c.splice(c.length,0,e,f),{contains:c,keywords:b,illegal:"\\S"}}),a.registerLanguage("julia",function(a){var b={keyword:"in abstract baremodule begin bitstype break catch ccall const continue do else elseif end export finally for function global if immutable import importall let local macro module quote return try type typealias using while",literal:"true false ANY ARGS CPU_CORES C_NULL DL_LOAD_PATH DevNull ENDIAN_BOM ENV I|0 Inf Inf16 Inf32 InsertionSort JULIA_HOME LOAD_PATH MS_ASYNC MS_INVALIDATE MS_SYNC MergeSort NaN NaN16 NaN32 OS_NAME QuickSort RTLD_DEEPBIND RTLD_FIRST RTLD_GLOBAL RTLD_LAZY RTLD_LOCAL RTLD_NODELETE RTLD_NOLOAD RTLD_NOW RoundDown RoundFromZero RoundNearest RoundToZero RoundUp STDERR STDIN STDOUT VERSION WORD_SIZE catalan cglobal e|0 eu|0 eulergamma golden im nothing pi γ π φ",built_in:"ASCIIString AbstractArray AbstractRNG AbstractSparseArray Any ArgumentError Array Associative Base64Pipe Bidiagonal BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError Box CFILE Cchar Cdouble Cfloat Char CharString Cint Clong Clonglong ClusterManager Cmd Coff_t Colon Complex Complex128 Complex32 Complex64 Condition Cptrdiff_t Cshort Csize_t Cssize_t Cuchar Cuint Culong Culonglong Cushort Cwchar_t DArray DataType DenseArray Diagonal Dict DimensionMismatch DirectIndexString Display DivideError DomainError EOFError EachLine Enumerate ErrorException Exception Expr Factorization FileMonitor FileOffset Filter Float16 Float32 Float64 FloatRange FloatingPoint Function GetfieldNode GotoNode Hermitian IO IOBuffer IOStream IPv4 IPv6 InexactError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException IntrinsicFunction KeyError LabelNode LambdaStaticData LineNumberNode LoadError LocalProcess MIME MathConst MemoryError MersenneTwister Method MethodError MethodTable Module NTuple NewvarNode Nothing Number ObjectIdDict OrdinalRange OverflowError ParseError PollingFileWatcher ProcessExitedException ProcessGroup Ptr QuoteNode Range Range1 Ranges Rational RawFD Real Regex RegexMatch RemoteRef RepString RevString RopeString RoundingMode Set SharedArray Signed SparseMatrixCSC StackOverflowError Stat StatStruct StepRange String SubArray SubString SymTridiagonal Symbol SymbolNode Symmetric SystemError Task TextDisplay Timer TmStruct TopNode Triangular Tridiagonal Type TypeConstructor TypeError TypeName TypeVar UTF16String UTF32String UTF8String UdpSocket Uint Uint128 Uint16 Uint32 Uint64 Uint8 UndefRefError UndefVarError UniformScaling UnionType UnitRange Unsigned Vararg VersionNumber WString WeakKeyDict WeakRef Woodbury Zip"},c="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",d={lexemes:c,keywords:b},e={className:"type-annotation",begin:/::/},f={className:"subtype",begin:/<:/},g={className:"number",begin:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,relevance:0},h={className:"char",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},i={className:"subst",begin:/\$\(/,end:/\)/,keywords:b},j={className:"variable",begin:"\\$"+c},k={className:"string",contains:[a.BACKSLASH_ESCAPE,i,j],variants:[{begin:/\w*"/,end:/"\w*/},{begin:/\w*"""/,end:/"""\w*/}]},l={className:"string",contains:[a.BACKSLASH_ESCAPE,i,j],begin:"`",end:"`"},m={className:"macrocall",begin:"@"+c},n={className:"comment",variants:[{begin:"#=",end:"=#",relevance:10},{begin:"#",end:"$"}]};return d.contains=[g,h,e,f,k,l,m,n,a.HASH_COMMENT_MODE],i.contains=d.contains,d}),a.registerLanguage("kotlin",function(a){var b="val var get set class trait object public open private protected final enum if else do while for when break continue throw try catch finally import package is as in return fun override default companion reified inline volatile transient native";return{keywords:{typename:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null",keyword:b},contains:[a.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"type",begin://,returnBegin:!0,excludeEnd:!1,relevance:0},{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:b,illegal:/fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,relevance:5,contains:[{begin:a.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[a.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,illegal:/\([^\(,\s:]+,/,contains:[{className:"typename",begin:/:\s*/,end:/\s*[=\)]/,excludeBegin:!0,returnEnd:!0,relevance:0}]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{className:"class",beginKeywords:"class trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[a.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"typename",begin:/[,:]\s*/,end:/[<\(,]|$/,excludeBegin:!0,returnEnd:!0}]},{className:"variable",beginKeywords:"var val",end:/\s*[=:$]/,excludeEnd:!0},a.QUOTE_STRING_MODE,{className:"shebang",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},a.C_NUMBER_MODE]}}),a.registerLanguage("lasso",function(a){var b="[a-zA-Z_][a-zA-Z0-9_.]*",c="<\\?(lasso(script)?|=)",d="\\]|\\?>",e={literal:"true false none minimal full all void bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"error_code error_msg error_pop error_push error_reset cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},f=a.COMMENT("",{relevance:0}),g={className:"preprocessor",begin:"\\[noprocess\\]",starts:{className:"markup",end:"\\[/noprocess\\]",returnEnd:!0,contains:[f]}},h={className:"preprocessor",begin:"\\[/noprocess|"+c},i={className:"variable",begin:"'"+b+"'"},j=[a.COMMENT("/\\*\\*!","\\*/"),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.inherit(a.C_NUMBER_MODE,{begin:a.C_NUMBER_RE+"|(infinity|nan)\\b"}),a.inherit(a.APOS_STRING_MODE,{illegal:null}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"`",end:"`"},{className:"variable",variants:[{begin:"[#$]"+b},{begin:"#",end:"\\d+",illegal:"\\W"}]},{className:"tag",begin:"::\\s*",end:b,illegal:"\\W"},{className:"attribute",variants:[{begin:"-(?!infinity)"+a.UNDERSCORE_IDENT_RE,relevance:0},{begin:"(\\.\\.\\.)"}]},{className:"subst",variants:[{begin:"->\\s*",contains:[i]},{begin:"->|\\\\|&&?|\\|\\||!(?!=|>)|(and|or|not)\\b",relevance:0}]},{className:"built_in",begin:"\\.\\.?\\s*",relevance:0,contains:[i]},{className:"class",beginKeywords:"define",returnEnd:!0,end:"\\(|=>",contains:[a.inherit(a.TITLE_MODE,{begin:a.UNDERSCORE_IDENT_RE+"(=(?!>))?"})]}];return{aliases:["ls","lassoscript"],case_insensitive:!0,lexemes:b+"|&[lg]t;",keywords:e,contains:[{className:"preprocessor",begin:d,relevance:0,starts:{className:"markup",end:"\\[|"+c,returnEnd:!0,relevance:0,contains:[f]}},g,h,{className:"preprocessor",begin:"\\[no_square_brackets",starts:{end:"\\[/no_square_brackets\\]",lexemes:b+"|&[lg]t;",keywords:e,contains:[{className:"preprocessor",begin:d,relevance:0,starts:{className:"markup",end:"\\[noprocess\\]|"+c,returnEnd:!0,contains:[f]}},g,h].concat(j)}},{className:"preprocessor",begin:"\\[",relevance:0},{className:"shebang",begin:"^#!.+lasso9\\b",relevance:10}].concat(j)}}),a.registerLanguage("less",function(a){var b="[\\w-]+",c="("+b+"|@{"+b+"})",d=[],e=[],f=function(a){return{className:"string",begin:"~?"+a+".*?"+a}},g=function(a,b,c){return{className:a,begin:b,relevance:c}},h=function(b,c,d){return a.inherit({className:b,begin:c+"\\(",end:"\\(",returnBegin:!0,excludeEnd:!0,relevance:0},d)},i={begin:"\\(",end:"\\)",contains:e,relevance:0};e.push(a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,f("'"),f('"'),a.CSS_NUMBER_MODE,g("hexcolor","#[0-9A-Fa-f]+\\b"),h("function","(url|data-uri)",{starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}}),h("function",b),i,g("variable","@@?"+b,10),g("variable","@{"+b+"}"),g("built_in","~?`[^`]*?`"),{className:"attribute",begin:b+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0});var j=e.concat({begin:"{",end:"}",contains:d}),k={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(e)},l={className:"attribute",begin:c,end:":",excludeEnd:!0,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE],illegal:/\S/,starts:{end:"[;}]",returnEnd:!0,contains:e,illegal:"[<=$]"}},m={className:"at_rule",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",returnEnd:!0,contains:e,relevance:0}},n={className:"variable",variants:[{begin:"@"+b+"\\s*:",relevance:15},{begin:"@"+b}],starts:{end:"[;}]",returnEnd:!0,contains:j}},o={variants:[{begin:"[\\.#:&\\[]",end:"[;{}]"},{begin:c+"[^;]*{",end:"{"}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,k,g("keyword","all\\b"),g("variable","@{"+b+"}"),g("tag",c+"%?",0),g("id","#"+c),g("class","\\."+c,0),g("keyword","&",0),h("pseudo",":not"),h("keyword",":extend"),g("pseudo","::?"+c),{className:"attr_selector",begin:"\\[",end:"\\]"},{begin:"\\(",end:"\\)",contains:j},{begin:"!important"}]};return d.push(a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,m,n,o,l),{case_insensitive:!0,illegal:"[=>'/<($\"]",contains:d}}),a.registerLanguage("lisp",function(a){var b="[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*",c="\\|[^]*?\\|",d="(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|\\-)?\\d+)?",e={className:"shebang",begin:"^#!",end:"$"},f={className:"literal",begin:"\\b(t{1}|nil)\\b"},g={className:"number",variants:[{begin:d,relevance:0},{begin:"#(b|B)[0-1]+(/[0-1]+)?"},{begin:"#(o|O)[0-7]+(/[0-7]+)?"},{begin:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{begin:"#(c|C)\\("+d+" +"+d,end:"\\)"}]},h=a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),i=a.COMMENT(";","$",{relevance:0}),j={className:"variable",begin:"\\*",end:"\\*"},k={className:"keyword",begin:"[:&]"+b},l={begin:b,relevance:0},m={begin:c},n={begin:"\\(",end:"\\)",contains:["self",f,h,g,l]},o={className:"quoted",contains:[g,h,j,k,n,l],variants:[{begin:"['`]\\(",end:"\\)"},{begin:"\\(quote ",end:"\\)",keywords:"quote"},{begin:"'"+c}]},p={className:"quoted",variants:[{begin:"'"+b},{begin:"#'"+b+"(::"+b+")*"}]},q={className:"list",begin:"\\(\\s*",end:"\\)"},r={endsWithParent:!0,relevance:0};return q.contains=[{className:"keyword",variants:[{begin:b},{begin:c}]},r],r.contains=[o,p,q,f,g,h,i,j,k,m,l],{illegal:/\S/,contains:[g,e,f,h,i,o,p,q,l]}}),a.registerLanguage("livecodeserver",function(a){var b={className:"variable",begin:"\\b[gtps][A-Z]+[A-Za-z0-9_\\-]*\\b|\\$_[A-Z]+",relevance:0},c=[a.C_BLOCK_COMMENT_MODE,a.HASH_COMMENT_MODE,a.COMMENT("--","$"),a.COMMENT("[^:]//","$")],d=a.inherit(a.TITLE_MODE,{variants:[{begin:"\\b_*rig[A-Z]+[A-Za-z0-9_\\-]*"},{begin:"\\b_[a-z0-9\\-]+"}]}),e=a.inherit(a.TITLE_MODE,{begin:"\\b([A-Za-z0-9_\\-]+)\\b"});return{case_insensitive:!1,keywords:{keyword:"$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER codepoint codepoints segment segments codeunit codeunits sentence sentences trueWord trueWords paragraph after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word words fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat end repeat URL in try into switch to words https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if", +constant:"SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five quote empty one true return cr linefeed right backslash null seven tab three two RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK",operator:"div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within contains ends with begins the keys of keys",built_in:"put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg avgDev base64Decode base64Encode baseConvert binaryDecode binaryEncode byteOffset byteToNum cachedURL cachedURLs charToNum cipherNames codepointOffset codepointProperty codepointToNum codeunitOffset commandNames compound compress constantNames cos date dateFormat decompress directories diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames geometricMean global globals hasMemory harmonicMean hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge millisec millisecs millisecond milliseconds min monthNames nativeCharToNum normalizeText num number numToByte numToChar numToCodepoint numToNativeChar offset open openfiles openProcesses openProcessIDs openSockets paragraphOffset paramCount param params peerAddress pendingMessages platform popStdDev populationStandardDeviation populationVariance popVariance processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLCreateTreeFromFileWithNamespaces revXMLCreateTreeWithNamespaces revXMLDataFromXPathQuery revXMLEvaluateXPath revXMLFirstChild revXMLMatchingNode revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_Execute revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sampVariance sec secs seconds sentenceOffset sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound stdDev sum sysError systemVersion tan tempName textDecode textEncode tick ticks time to tokenOffset toLower toUpper transpose truewordOffset trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus uuid value variableNames variance version waitDepth weekdayNames wordOffset xsltApplyStylesheet xsltApplyStylesheetFromFile xsltLoadStylesheet xsltLoadStylesheetFromFile add breakpoint cancel clear local variable file word line folder directory URL close socket process combine constant convert create new alias folder directory decrypt delete variable word line folder directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime libURLSetStatusCallback load multiply socket prepare process post seek rel relative read from process rename replace require resetAll resolve revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split start stop subtract union unload wait write"},contains:[b,{className:"keyword",begin:"\\bend\\sif\\b"},{className:"function",beginKeywords:"function",end:"$",contains:[b,e,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.BINARY_NUMBER_MODE,a.C_NUMBER_MODE,d]},{className:"function",begin:"\\bend\\s+",end:"$",keywords:"end",contains:[e,d]},{className:"command",beginKeywords:"command on",end:"$",contains:[b,e,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.BINARY_NUMBER_MODE,a.C_NUMBER_MODE,d]},{className:"preprocessor",variants:[{begin:"<\\?(rev|lc|livecode)",relevance:10},{begin:"<\\?"},{begin:"\\?>"}]},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.BINARY_NUMBER_MODE,a.C_NUMBER_MODE,d].concat(c),illegal:";$|^\\[|^="}}),a.registerLanguage("livescript",function(a){var b={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger case default function var with then unless until loop of by when and or is isnt not it that otherwise from to til fallthrough super case default function var void const let enum export import native __hasProp __extends __slice __bind __indexOf",literal:"true false null undefined yes no on off it that void",built_in:"npm require console print module global window document"},c="[A-Za-z$_](?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*",d=a.inherit(a.TITLE_MODE,{begin:c}),e={className:"subst",begin:/#\{/,end:/}/,keywords:b},f={className:"subst",begin:/#[A-Za-z$_]/,end:/(?:\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,keywords:b},g=[a.BINARY_NUMBER_MODE,{className:"number",begin:"(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*)",relevance:0,starts:{end:"(\\s*/)?",relevance:0}},{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[a.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[a.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[a.BACKSLASH_ESCAPE,e,f]},{begin:/"/,end:/"/,contains:[a.BACKSLASH_ESCAPE,e,f]},{begin:/\\/,end:/(\s|$)/,excludeEnd:!0}]},{className:"pi",variants:[{begin:"//",end:"//[gim]*",contains:[e,a.HASH_COMMENT_MODE]},{begin:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{className:"property",begin:"@"+c},{begin:"``",end:"``",excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"}];e.contains=g;var h={className:"params",begin:"\\(",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:b,contains:["self"].concat(g)}]};return{aliases:["ls"],keywords:b,illegal:/\/\*/,contains:g.concat([a.COMMENT("\\/\\*","\\*\\/"),a.HASH_COMMENT_MODE,{className:"function",contains:[d,h],returnBegin:!0,variants:[{begin:"("+c+"\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B\\->\\*?",end:"\\->\\*?"},{begin:"("+c+"\\s*(?:=|:=)\\s*)?!?(\\(.*\\))?\\s*\\B[-~]{1,2}>\\*?",end:"[-~]{1,2}>\\*?"},{begin:"("+c+"\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B!?[-~]{1,2}>\\*?",end:"!?[-~]{1,2}>\\*?"}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[d]},d]},{className:"attribute",begin:c+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}),a.registerLanguage("lua",function(a){var b="\\[=*\\[",c="\\]=*\\]",d={begin:b,end:c,contains:["self"]},e=[a.COMMENT("--(?!"+b+")","$"),a.COMMENT("--"+b,c,{contains:[d],relevance:10})];return{lexemes:a.UNDERSCORE_IDENT_RE,keywords:{keyword:"and break do else elseif end false for if in local nil not or repeat return then true until while",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},contains:e.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[a.inherit(a.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:e}].concat(e)},a.C_NUMBER_MODE,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{className:"string",begin:b,end:c,contains:[d],relevance:5}])}}),a.registerLanguage("makefile",function(a){var b={className:"variable",begin:/\$\(/,end:/\)/,contains:[a.BACKSLASH_ESCAPE]};return{aliases:["mk","mak"],contains:[a.HASH_COMMENT_MODE,{begin:/^\w+\s*\W*=/,returnBegin:!0,relevance:0,starts:{className:"constant",end:/\s*\W*=/,excludeEnd:!0,starts:{end:/$/,relevance:0,contains:[b]}}},{className:"title",begin:/^[\w]+:\s*$/},{className:"phony",begin:/^\.PHONY:/,end:/$/,keywords:".PHONY",lexemes:/[\.\w]+/},{begin:/^\t+/,end:/$/,relevance:0,contains:[a.QUOTE_STRING_MODE,b]}]}}),a.registerLanguage("mathematica",function(a){return{aliases:["mma"],lexemes:"(\\$|\\b)"+a.IDENT_RE+"\\b",keywords:"AbelianGroup Abort AbortKernels AbortProtect Above Abs Absolute AbsoluteCorrelation AbsoluteCorrelationFunction AbsoluteCurrentValue AbsoluteDashing AbsoluteFileName AbsoluteOptions AbsolutePointSize AbsoluteThickness AbsoluteTime AbsoluteTiming AccountingForm Accumulate Accuracy AccuracyGoal ActionDelay ActionMenu ActionMenuBox ActionMenuBoxOptions Active ActiveItem ActiveStyle AcyclicGraphQ AddOnHelpPath AddTo AdjacencyGraph AdjacencyList AdjacencyMatrix AdjustmentBox AdjustmentBoxOptions AdjustTimeSeriesForecast AffineTransform After AiryAi AiryAiPrime AiryAiZero AiryBi AiryBiPrime AiryBiZero AlgebraicIntegerQ AlgebraicNumber AlgebraicNumberDenominator AlgebraicNumberNorm AlgebraicNumberPolynomial AlgebraicNumberTrace AlgebraicRules AlgebraicRulesData Algebraics AlgebraicUnitQ Alignment AlignmentMarker AlignmentPoint All AllowedDimensions AllowGroupClose AllowInlineCells AllowKernelInitialization AllowReverseGroupClose AllowScriptLevelChange AlphaChannel AlternatingGroup AlternativeHypothesis Alternatives AmbientLight Analytic AnchoredSearch And AndersonDarlingTest AngerJ AngleBracket AngularGauge Animate AnimationCycleOffset AnimationCycleRepetitions AnimationDirection AnimationDisplayTime AnimationRate AnimationRepetitions AnimationRunning Animator AnimatorBox AnimatorBoxOptions AnimatorElements Annotation Annuity AnnuityDue Antialiasing Antisymmetric Apart ApartSquareFree Appearance AppearanceElements AppellF1 Append AppendTo Apply ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcSec ArcSech ArcSin ArcSinDistribution ArcSinh ArcTan ArcTanh Arg ArgMax ArgMin ArgumentCountQ ARIMAProcess ArithmeticGeometricMean ARMAProcess ARProcess Array ArrayComponents ArrayDepth ArrayFlatten ArrayPad ArrayPlot ArrayQ ArrayReshape ArrayRules Arrays Arrow Arrow3DBox ArrowBox Arrowheads AspectRatio AspectRatioFixed Assert Assuming Assumptions AstronomicalData Asynchronous AsynchronousTaskObject AsynchronousTasks AtomQ Attributes AugmentedSymmetricPolynomial AutoAction AutoDelete AutoEvaluateEvents AutoGeneratedPackage AutoIndent AutoIndentSpacings AutoItalicWords AutoloadPath AutoMatch Automatic AutomaticImageSize AutoMultiplicationSymbol AutoNumberFormatting AutoOpenNotebooks AutoOpenPalettes AutorunSequencing AutoScaling AutoScroll AutoSpacing AutoStyleOptions AutoStyleWords Axes AxesEdge AxesLabel AxesOrigin AxesStyle Axis BabyMonsterGroupB Back Background BackgroundTasksSettings Backslash Backsubstitution Backward Band BandpassFilter BandstopFilter BarabasiAlbertGraphDistribution BarChart BarChart3D BarLegend BarlowProschanImportance BarnesG BarOrigin BarSpacing BartlettHannWindow BartlettWindow BaseForm Baseline BaselinePosition BaseStyle BatesDistribution BattleLemarieWavelet Because BeckmannDistribution Beep Before Begin BeginDialogPacket BeginFrontEndInteractionPacket BeginPackage BellB BellY Below BenfordDistribution BeniniDistribution BenktanderGibratDistribution BenktanderWeibullDistribution BernoulliB BernoulliDistribution BernoulliGraphDistribution BernoulliProcess BernsteinBasis BesselFilterModel BesselI BesselJ BesselJZero BesselK BesselY BesselYZero Beta BetaBinomialDistribution BetaDistribution BetaNegativeBinomialDistribution BetaPrimeDistribution BetaRegularized BetweennessCentrality BezierCurve BezierCurve3DBox BezierCurve3DBoxOptions BezierCurveBox BezierCurveBoxOptions BezierFunction BilateralFilter Binarize BinaryFormat BinaryImageQ BinaryRead BinaryReadList BinaryWrite BinCounts BinLists Binomial BinomialDistribution BinomialProcess BinormalDistribution BiorthogonalSplineWavelet BipartiteGraphQ BirnbaumImportance BirnbaumSaundersDistribution BitAnd BitClear BitGet BitLength BitNot BitOr BitSet BitShiftLeft BitShiftRight BitXor Black BlackmanHarrisWindow BlackmanNuttallWindow BlackmanWindow Blank BlankForm BlankNullSequence BlankSequence Blend Block BlockRandom BlomqvistBeta BlomqvistBetaTest Blue Blur BodePlot BohmanWindow Bold Bookmarks Boole BooleanConsecutiveFunction BooleanConvert BooleanCountingFunction BooleanFunction BooleanGraph BooleanMaxterms BooleanMinimize BooleanMinterms Booleans BooleanTable BooleanVariables BorderDimensions BorelTannerDistribution Bottom BottomHatTransform BoundaryStyle Bounds Box BoxBaselineShift BoxData BoxDimensions Boxed Boxes BoxForm BoxFormFormatTypes BoxFrame BoxID BoxMargins BoxMatrix BoxRatios BoxRotation BoxRotationPoint BoxStyle BoxWhiskerChart Bra BracketingBar BraKet BrayCurtisDistance BreadthFirstScan Break Brown BrownForsytheTest BrownianBridgeProcess BrowserCategory BSplineBasis BSplineCurve BSplineCurve3DBox BSplineCurveBox BSplineCurveBoxOptions BSplineFunction BSplineSurface BSplineSurface3DBox BubbleChart BubbleChart3D BubbleScale BubbleSizes BulletGauge BusinessDayQ ButterflyGraph ButterworthFilterModel Button ButtonBar ButtonBox ButtonBoxOptions ButtonCell ButtonContents ButtonData ButtonEvaluator ButtonExpandable ButtonFrame ButtonFunction ButtonMargins ButtonMinHeight ButtonNote ButtonNotebook ButtonSource ButtonStyle ButtonStyleMenuListing Byte ByteCount ByteOrdering C CachedValue CacheGraphics CalendarData CalendarType CallPacket CanberraDistance Cancel CancelButton CandlestickChart Cap CapForm CapitalDifferentialD CardinalBSplineBasis CarmichaelLambda Cases Cashflow Casoratian Catalan CatalanNumber Catch CauchyDistribution CauchyWindow CayleyGraph CDF CDFDeploy CDFInformation CDFWavelet Ceiling Cell CellAutoOverwrite CellBaseline CellBoundingBox CellBracketOptions CellChangeTimes CellContents CellContext CellDingbat CellDynamicExpression CellEditDuplicate CellElementsBoundingBox CellElementSpacings CellEpilog CellEvaluationDuplicate CellEvaluationFunction CellEventActions CellFrame CellFrameColor CellFrameLabelMargins CellFrameLabels CellFrameMargins CellGroup CellGroupData CellGrouping CellGroupingRules CellHorizontalScrolling CellID CellLabel CellLabelAutoDelete CellLabelMargins CellLabelPositioning CellMargins CellObject CellOpen CellPrint CellProlog Cells CellSize CellStyle CellTags CellularAutomaton CensoredDistribution Censoring Center CenterDot CentralMoment CentralMomentGeneratingFunction CForm ChampernowneNumber ChanVeseBinarize Character CharacterEncoding CharacterEncodingsPath CharacteristicFunction CharacteristicPolynomial CharacterRange Characters ChartBaseStyle ChartElementData ChartElementDataFunction ChartElementFunction ChartElements ChartLabels ChartLayout ChartLegends ChartStyle Chebyshev1FilterModel Chebyshev2FilterModel ChebyshevDistance ChebyshevT ChebyshevU Check CheckAbort CheckAll Checkbox CheckboxBar CheckboxBox CheckboxBoxOptions ChemicalData ChessboardDistance ChiDistribution ChineseRemainder ChiSquareDistribution ChoiceButtons ChoiceDialog CholeskyDecomposition Chop Circle CircleBox CircleDot CircleMinus CirclePlus CircleTimes CirculantGraph CityData Clear ClearAll ClearAttributes ClearSystemCache ClebschGordan ClickPane Clip ClipboardNotebook ClipFill ClippingStyle ClipPlanes ClipRange Clock ClockGauge ClockwiseContourIntegral Close Closed CloseKernels ClosenessCentrality Closing ClosingAutoSave ClosingEvent ClusteringComponents CMYKColor Coarse Coefficient CoefficientArrays CoefficientDomain CoefficientList CoefficientRules CoifletWavelet Collect Colon ColonForm ColorCombine ColorConvert ColorData ColorDataFunction ColorFunction ColorFunctionScaling Colorize ColorNegate ColorOutput ColorProfileData ColorQuantize ColorReplace ColorRules ColorSelectorSettings ColorSeparate ColorSetter ColorSetterBox ColorSetterBoxOptions ColorSlider ColorSpace Column ColumnAlignments ColumnBackgrounds ColumnForm ColumnLines ColumnsEqual ColumnSpacings ColumnWidths CommonDefaultFormatTypes Commonest CommonestFilter CommonUnits CommunityBoundaryStyle CommunityGraphPlot CommunityLabels CommunityRegionStyle CompatibleUnitQ CompilationOptions CompilationTarget Compile Compiled CompiledFunction Complement CompleteGraph CompleteGraphQ CompleteKaryTree CompletionsListPacket Complex Complexes ComplexExpand ComplexInfinity ComplexityFunction ComponentMeasurements ComponentwiseContextMenu Compose ComposeList ComposeSeries Composition CompoundExpression CompoundPoissonDistribution CompoundPoissonProcess CompoundRenewalProcess Compress CompressedData Condition ConditionalExpression Conditioned Cone ConeBox ConfidenceLevel ConfidenceRange ConfidenceTransform ConfigurationPath Congruent Conjugate ConjugateTranspose Conjunction Connect ConnectedComponents ConnectedGraphQ ConnesWindow ConoverTest ConsoleMessage ConsoleMessagePacket ConsolePrint Constant ConstantArray Constants ConstrainedMax ConstrainedMin ContentPadding ContentsBoundingBox ContentSelectable ContentSize Context ContextMenu Contexts ContextToFilename ContextToFileName Continuation Continue ContinuedFraction ContinuedFractionK ContinuousAction ContinuousMarkovProcess ContinuousTimeModelQ ContinuousWaveletData ContinuousWaveletTransform ContourDetect ContourGraphics ContourIntegral ContourLabels ContourLines ContourPlot ContourPlot3D Contours ContourShading ContourSmoothing ContourStyle ContraharmonicMean Control ControlActive ControlAlignment ControllabilityGramian ControllabilityMatrix ControllableDecomposition ControllableModelQ ControllerDuration ControllerInformation ControllerInformationData ControllerLinking ControllerManipulate ControllerMethod ControllerPath ControllerState ControlPlacement ControlsRendering ControlType Convergents ConversionOptions ConversionRules ConvertToBitmapPacket ConvertToPostScript ConvertToPostScriptPacket Convolve ConwayGroupCo1 ConwayGroupCo2 ConwayGroupCo3 CoordinateChartData CoordinatesToolOptions CoordinateTransform CoordinateTransformData CoprimeQ Coproduct CopulaDistribution Copyable CopyDirectory CopyFile CopyTag CopyToClipboard CornerFilter CornerNeighbors Correlation CorrelationDistance CorrelationFunction CorrelationTest Cos Cosh CoshIntegral CosineDistance CosineWindow CosIntegral Cot Coth Count CounterAssignments CounterBox CounterBoxOptions CounterClockwiseContourIntegral CounterEvaluator CounterFunction CounterIncrements CounterStyle CounterStyleMenuListing CountRoots CountryData Covariance CovarianceEstimatorFunction CovarianceFunction CoxianDistribution CoxIngersollRossProcess CoxModel CoxModelFit CramerVonMisesTest CreateArchive CreateDialog CreateDirectory CreateDocument CreateIntermediateDirectories CreatePalette CreatePalettePacket CreateScheduledTask CreateTemporary CreateWindow CriticalityFailureImportance CriticalitySuccessImportance CriticalSection Cross CrossingDetect CrossMatrix Csc Csch CubeRoot Cubics Cuboid CuboidBox Cumulant CumulantGeneratingFunction Cup CupCap Curl CurlyDoubleQuote CurlyQuote CurrentImage CurrentlySpeakingPacket CurrentValue CurvatureFlowFilter CurveClosed Cyan CycleGraph CycleIndexPolynomial Cycles CyclicGroup Cyclotomic Cylinder CylinderBox CylindricalDecomposition D DagumDistribution DamerauLevenshteinDistance DampingFactor Darker Dashed Dashing DataCompression DataDistribution DataRange DataReversed Date DateDelimiters DateDifference DateFunction DateList DateListLogPlot DateListPlot DatePattern DatePlus DateRange DateString DateTicksFormat DaubechiesWavelet DavisDistribution DawsonF DayCount DayCountConvention DayMatchQ DayName DayPlus DayRange DayRound DeBruijnGraph Debug DebugTag Decimal DeclareKnownSymbols DeclarePackage Decompose Decrement DedekindEta Default DefaultAxesStyle DefaultBaseStyle DefaultBoxStyle DefaultButton DefaultColor DefaultControlPlacement DefaultDuplicateCellStyle DefaultDuration DefaultElement DefaultFaceGridsStyle DefaultFieldHintStyle DefaultFont DefaultFontProperties DefaultFormatType DefaultFormatTypeForStyle DefaultFrameStyle DefaultFrameTicksStyle DefaultGridLinesStyle DefaultInlineFormatType DefaultInputFormatType DefaultLabelStyle DefaultMenuStyle DefaultNaturalLanguage DefaultNewCellStyle DefaultNewInlineCellStyle DefaultNotebook DefaultOptions DefaultOutputFormatType DefaultStyle DefaultStyleDefinitions DefaultTextFormatType DefaultTextInlineFormatType DefaultTicksStyle DefaultTooltipStyle DefaultValues Defer DefineExternal DefineInputStreamMethod DefineOutputStreamMethod Definition Degree DegreeCentrality DegreeGraphDistribution DegreeLexicographic DegreeReverseLexicographic Deinitialization Del Deletable Delete DeleteBorderComponents DeleteCases DeleteContents DeleteDirectory DeleteDuplicates DeleteFile DeleteSmallComponents DeleteWithContents DeletionWarning Delimiter DelimiterFlashTime DelimiterMatching Delimiters Denominator DensityGraphics DensityHistogram DensityPlot DependentVariables Deploy Deployed Depth DepthFirstScan Derivative DerivativeFilter DescriptorStateSpace DesignMatrix Det DGaussianWavelet DiacriticalPositioning Diagonal DiagonalMatrix Dialog DialogIndent DialogInput DialogLevel DialogNotebook DialogProlog DialogReturn DialogSymbols Diamond DiamondMatrix DiceDissimilarity DictionaryLookup DifferenceDelta DifferenceOrder DifferenceRoot DifferenceRootReduce Differences DifferentialD DifferentialRoot DifferentialRootReduce DifferentiatorFilter DigitBlock DigitBlockMinimum DigitCharacter DigitCount DigitQ DihedralGroup Dilation Dimensions DiracComb DiracDelta DirectedEdge DirectedEdges DirectedGraph DirectedGraphQ DirectedInfinity Direction Directive Directory DirectoryName DirectoryQ DirectoryStack DirichletCharacter DirichletConvolve DirichletDistribution DirichletL DirichletTransform DirichletWindow DisableConsolePrintPacket DiscreteChirpZTransform DiscreteConvolve DiscreteDelta DiscreteHadamardTransform DiscreteIndicator DiscreteLQEstimatorGains DiscreteLQRegulatorGains DiscreteLyapunovSolve DiscreteMarkovProcess DiscretePlot DiscretePlot3D DiscreteRatio DiscreteRiccatiSolve DiscreteShift DiscreteTimeModelQ DiscreteUniformDistribution DiscreteVariables DiscreteWaveletData DiscreteWaveletPacketTransform DiscreteWaveletTransform Discriminant Disjunction Disk DiskBox DiskMatrix Dispatch DispersionEstimatorFunction Display DisplayAllSteps DisplayEndPacket DisplayFlushImagePacket DisplayForm DisplayFunction DisplayPacket DisplayRules DisplaySetSizePacket DisplayString DisplayTemporary DisplayWith DisplayWithRef DisplayWithVariable DistanceFunction DistanceTransform Distribute Distributed DistributedContexts DistributeDefinitions DistributionChart DistributionDomain DistributionFitTest DistributionParameterAssumptions DistributionParameterQ Dithering Div Divergence Divide DivideBy Dividers Divisible Divisors DivisorSigma DivisorSum DMSList DMSString Do DockedCells DocumentNotebook DominantColors DOSTextFormat Dot DotDashed DotEqual Dotted DoubleBracketingBar DoubleContourIntegral DoubleDownArrow DoubleLeftArrow DoubleLeftRightArrow DoubleLeftTee DoubleLongLeftArrow DoubleLongLeftRightArrow DoubleLongRightArrow DoubleRightArrow DoubleRightTee DoubleUpArrow DoubleUpDownArrow DoubleVerticalBar DoublyInfinite Down DownArrow DownArrowBar DownArrowUpArrow DownLeftRightVector DownLeftTeeVector DownLeftVector DownLeftVectorBar DownRightTeeVector DownRightVector DownRightVectorBar Downsample DownTee DownTeeArrow DownValues DragAndDrop DrawEdges DrawFrontFaces DrawHighlighted Drop DSolve Dt DualLinearProgramming DualSystemsModel DumpGet DumpSave DuplicateFreeQ Dynamic DynamicBox DynamicBoxOptions DynamicEvaluationTimeout DynamicLocation DynamicModule DynamicModuleBox DynamicModuleBoxOptions DynamicModuleParent DynamicModuleValues DynamicName DynamicNamespace DynamicReference DynamicSetting DynamicUpdating DynamicWrapper DynamicWrapperBox DynamicWrapperBoxOptions E EccentricityCentrality EdgeAdd EdgeBetweennessCentrality EdgeCapacity EdgeCapForm EdgeColor EdgeConnectivity EdgeCost EdgeCount EdgeCoverQ EdgeDashing EdgeDelete EdgeDetect EdgeForm EdgeIndex EdgeJoinForm EdgeLabeling EdgeLabels EdgeLabelStyle EdgeList EdgeOpacity EdgeQ EdgeRenderingFunction EdgeRules EdgeShapeFunction EdgeStyle EdgeThickness EdgeWeight Editable EditButtonSettings EditCellTagsSettings EditDistance EffectiveInterest Eigensystem Eigenvalues EigenvectorCentrality Eigenvectors Element ElementData Eliminate EliminationOrder EllipticE EllipticExp EllipticExpPrime EllipticF EllipticFilterModel EllipticK EllipticLog EllipticNomeQ EllipticPi EllipticReducedHalfPeriods EllipticTheta EllipticThetaPrime EmitSound EmphasizeSyntaxErrors EmpiricalDistribution Empty EmptyGraphQ EnableConsolePrintPacket Enabled Encode End EndAdd EndDialogPacket EndFrontEndInteractionPacket EndOfFile EndOfLine EndOfString EndPackage EngineeringForm Enter EnterExpressionPacket EnterTextPacket Entropy EntropyFilter Environment Epilog Equal EqualColumns EqualRows EqualTilde EquatedTo Equilibrium EquirippleFilterKernel Equivalent Erf Erfc Erfi ErlangB ErlangC ErlangDistribution Erosion ErrorBox ErrorBoxOptions ErrorNorm ErrorPacket ErrorsDialogSettings EstimatedDistribution EstimatedProcess EstimatorGains EstimatorRegulator EuclideanDistance EulerE EulerGamma EulerianGraphQ EulerPhi Evaluatable Evaluate Evaluated EvaluatePacket EvaluationCell EvaluationCompletionAction EvaluationElements EvaluationMode EvaluationMonitor EvaluationNotebook EvaluationObject EvaluationOrder Evaluator EvaluatorNames EvenQ EventData EventEvaluator EventHandler EventHandlerTag EventLabels ExactBlackmanWindow ExactNumberQ ExactRootIsolation ExampleData Except ExcludedForms ExcludePods Exclusions ExclusionsStyle Exists Exit ExitDialog Exp Expand ExpandAll ExpandDenominator ExpandFileName ExpandNumerator Expectation ExpectationE ExpectedValue ExpGammaDistribution ExpIntegralE ExpIntegralEi Exponent ExponentFunction ExponentialDistribution ExponentialFamily ExponentialGeneratingFunction ExponentialMovingAverage ExponentialPowerDistribution ExponentPosition ExponentStep Export ExportAutoReplacements ExportPacket ExportString Expression ExpressionCell ExpressionPacket ExpToTrig ExtendedGCD Extension ExtentElementFunction ExtentMarkers ExtentSize ExternalCall ExternalDataCharacterEncoding Extract ExtractArchive ExtremeValueDistribution FaceForm FaceGrids FaceGridsStyle Factor FactorComplete Factorial Factorial2 FactorialMoment FactorialMomentGeneratingFunction FactorialPower FactorInteger FactorList FactorSquareFree FactorSquareFreeList FactorTerms FactorTermsList Fail FailureDistribution False FARIMAProcess FEDisableConsolePrintPacket FeedbackSector FeedbackSectorStyle FeedbackType FEEnableConsolePrintPacket Fibonacci FieldHint FieldHintStyle FieldMasked FieldSize File FileBaseName FileByteCount FileDate FileExistsQ FileExtension FileFormat FileHash FileInformation FileName FileNameDepth FileNameDialogSettings FileNameDrop FileNameJoin FileNames FileNameSetter FileNameSplit FileNameTake FilePrint FileType FilledCurve FilledCurveBox Filling FillingStyle FillingTransform FilterRules FinancialBond FinancialData FinancialDerivative FinancialIndicator Find FindArgMax FindArgMin FindClique FindClusters FindCurvePath FindDistributionParameters FindDivisions FindEdgeCover FindEdgeCut FindEulerianCycle FindFaces FindFile FindFit FindGeneratingFunction FindGeoLocation FindGeometricTransform FindGraphCommunities FindGraphIsomorphism FindGraphPartition FindHamiltonianCycle FindIndependentEdgeSet FindIndependentVertexSet FindInstance FindIntegerNullVector FindKClan FindKClique FindKClub FindKPlex FindLibrary FindLinearRecurrence FindList FindMaximum FindMaximumFlow FindMaxValue FindMinimum FindMinimumCostFlow FindMinimumCut FindMinValue FindPermutation FindPostmanTour FindProcessParameters FindRoot FindSequenceFunction FindSettings FindShortestPath FindShortestTour FindThreshold FindVertexCover FindVertexCut Fine FinishDynamic FiniteAbelianGroupCount FiniteGroupCount FiniteGroupData First FirstPassageTimeDistribution FischerGroupFi22 FischerGroupFi23 FischerGroupFi24Prime FisherHypergeometricDistribution FisherRatioTest FisherZDistribution Fit FitAll FittedModel FixedPoint FixedPointList FlashSelection Flat Flatten FlattenAt FlatTopWindow FlipView Floor FlushPrintOutputPacket Fold FoldList Font FontColor FontFamily FontForm FontName FontOpacity FontPostScriptName FontProperties FontReencoding FontSize FontSlant FontSubstitutions FontTracking FontVariations FontWeight For ForAll Format FormatRules FormatType FormatTypeAutoConvert FormatValues FormBox FormBoxOptions FortranForm Forward ForwardBackward Fourier FourierCoefficient FourierCosCoefficient FourierCosSeries FourierCosTransform FourierDCT FourierDCTFilter FourierDCTMatrix FourierDST FourierDSTMatrix FourierMatrix FourierParameters FourierSequenceTransform FourierSeries FourierSinCoefficient FourierSinSeries FourierSinTransform FourierTransform FourierTrigSeries FractionalBrownianMotionProcess FractionalPart FractionBox FractionBoxOptions FractionLine Frame FrameBox FrameBoxOptions Framed FrameInset FrameLabel Frameless FrameMargins FrameStyle FrameTicks FrameTicksStyle FRatioDistribution FrechetDistribution FreeQ FrequencySamplingFilterKernel FresnelC FresnelS Friday FrobeniusNumber FrobeniusSolve FromCharacterCode FromCoefficientRules FromContinuedFraction FromDate FromDigits FromDMS Front FrontEndDynamicExpression FrontEndEventActions FrontEndExecute FrontEndObject FrontEndResource FrontEndResourceString FrontEndStackSize FrontEndToken FrontEndTokenExecute FrontEndValueCache FrontEndVersion FrontFaceColor FrontFaceOpacity Full FullAxes FullDefinition FullForm FullGraphics FullOptions FullSimplify Function FunctionExpand FunctionInterpolation FunctionSpace FussellVeselyImportance GaborFilter GaborMatrix GaborWavelet GainMargins GainPhaseMargins Gamma GammaDistribution GammaRegularized GapPenalty Gather GatherBy GaugeFaceElementFunction GaugeFaceStyle GaugeFrameElementFunction GaugeFrameSize GaugeFrameStyle GaugeLabels GaugeMarkers GaugeStyle GaussianFilter GaussianIntegers GaussianMatrix GaussianWindow GCD GegenbauerC General GeneralizedLinearModelFit GenerateConditions GeneratedCell GeneratedParameters GeneratingFunction Generic GenericCylindricalDecomposition GenomeData GenomeLookup GeodesicClosing GeodesicDilation GeodesicErosion GeodesicOpening GeoDestination GeodesyData GeoDirection GeoDistance GeoGridPosition GeometricBrownianMotionProcess GeometricDistribution GeometricMean GeometricMeanFilter GeometricTransformation GeometricTransformation3DBox GeometricTransformation3DBoxOptions GeometricTransformationBox GeometricTransformationBoxOptions GeoPosition GeoPositionENU GeoPositionXYZ GeoProjectionData GestureHandler GestureHandlerTag Get GetBoundingBoxSizePacket GetContext GetEnvironment GetFileName GetFrontEndOptionsDataPacket GetLinebreakInformationPacket GetMenusPacket GetPageBreakInformationPacket Glaisher GlobalClusteringCoefficient GlobalPreferences GlobalSession Glow GoldenRatio GompertzMakehamDistribution GoodmanKruskalGamma GoodmanKruskalGammaTest Goto Grad Gradient GradientFilter GradientOrientationFilter Graph GraphAssortativity GraphCenter GraphComplement GraphData GraphDensity GraphDiameter GraphDifference GraphDisjointUnion GraphDistance GraphDistanceMatrix GraphElementData GraphEmbedding GraphHighlight GraphHighlightStyle GraphHub Graphics Graphics3D Graphics3DBox Graphics3DBoxOptions GraphicsArray GraphicsBaseline GraphicsBox GraphicsBoxOptions GraphicsColor GraphicsColumn GraphicsComplex GraphicsComplex3DBox GraphicsComplex3DBoxOptions GraphicsComplexBox GraphicsComplexBoxOptions GraphicsContents GraphicsData GraphicsGrid GraphicsGridBox GraphicsGroup GraphicsGroup3DBox GraphicsGroup3DBoxOptions GraphicsGroupBox GraphicsGroupBoxOptions GraphicsGrouping GraphicsHighlightColor GraphicsRow GraphicsSpacing GraphicsStyle GraphIntersection GraphLayout GraphLinkEfficiency GraphPeriphery GraphPlot GraphPlot3D GraphPower GraphPropertyDistribution GraphQ GraphRadius GraphReciprocity GraphRoot GraphStyle GraphUnion Gray GrayLevel GreatCircleDistance Greater GreaterEqual GreaterEqualLess GreaterFullEqual GreaterGreater GreaterLess GreaterSlantEqual GreaterTilde Green Grid GridBaseline GridBox GridBoxAlignment GridBoxBackground GridBoxDividers GridBoxFrame GridBoxItemSize GridBoxItemStyle GridBoxOptions GridBoxSpacings GridCreationSettings GridDefaultElement GridElementStyleOptions GridFrame GridFrameMargins GridGraph GridLines GridLinesStyle GroebnerBasis GroupActionBase GroupCentralizer GroupElementFromWord GroupElementPosition GroupElementQ GroupElements GroupElementToWord GroupGenerators GroupMultiplicationTable GroupOrbits GroupOrder GroupPageBreakWithin GroupSetwiseStabilizer GroupStabilizer GroupStabilizerChain Gudermannian GumbelDistribution HaarWavelet HadamardMatrix HalfNormalDistribution HamiltonianGraphQ HammingDistance HammingWindow HankelH1 HankelH2 HankelMatrix HannPoissonWindow HannWindow HaradaNortonGroupHN HararyGraph HarmonicMean HarmonicMeanFilter HarmonicNumber Hash HashTable Haversine HazardFunction Head HeadCompose Heads HeavisideLambda HeavisidePi HeavisideTheta HeldGroupHe HeldPart HelpBrowserLookup HelpBrowserNotebook HelpBrowserSettings HermiteDecomposition HermiteH HermitianMatrixQ HessenbergDecomposition Hessian HexadecimalCharacter Hexahedron HexahedronBox HexahedronBoxOptions HiddenSurface HighlightGraph HighlightImage HighpassFilter HigmanSimsGroupHS HilbertFilter HilbertMatrix Histogram Histogram3D HistogramDistribution HistogramList HistogramTransform HistogramTransformInterpolation HitMissTransform HITSCentrality HodgeDual HoeffdingD HoeffdingDTest Hold HoldAll HoldAllComplete HoldComplete HoldFirst HoldForm HoldPattern HoldRest HolidayCalendar HomeDirectory HomePage Horizontal HorizontalForm HorizontalGauge HorizontalScrollPosition HornerForm HotellingTSquareDistribution HoytDistribution HTMLSave Hue HumpDownHump HumpEqual HurwitzLerchPhi HurwitzZeta HyperbolicDistribution HypercubeGraph HyperexponentialDistribution Hyperfactorial Hypergeometric0F1 Hypergeometric0F1Regularized Hypergeometric1F1 Hypergeometric1F1Regularized Hypergeometric2F1 Hypergeometric2F1Regularized HypergeometricDistribution HypergeometricPFQ HypergeometricPFQRegularized HypergeometricU Hyperlink HyperlinkCreationSettings Hyphenation HyphenationOptions HypoexponentialDistribution HypothesisTestData I Identity IdentityMatrix If IgnoreCase Im Image Image3D Image3DSlices ImageAccumulate ImageAdd ImageAdjust ImageAlign ImageApply ImageAspectRatio ImageAssemble ImageCache ImageCacheValid ImageCapture ImageChannels ImageClip ImageColorSpace ImageCompose ImageConvolve ImageCooccurrence ImageCorners ImageCorrelate ImageCorrespondingPoints ImageCrop ImageData ImageDataPacket ImageDeconvolve ImageDemosaic ImageDifference ImageDimensions ImageDistance ImageEffect ImageFeatureTrack ImageFileApply ImageFileFilter ImageFileScan ImageFilter ImageForestingComponents ImageForwardTransformation ImageHistogram ImageKeypoints ImageLevels ImageLines ImageMargins ImageMarkers ImageMeasurements ImageMultiply ImageOffset ImagePad ImagePadding ImagePartition ImagePeriodogram ImagePerspectiveTransformation ImageQ ImageRangeCache ImageReflect ImageRegion ImageResize ImageResolution ImageRotate ImageRotated ImageScaled ImageScan ImageSize ImageSizeAction ImageSizeCache ImageSizeMultipliers ImageSizeRaw ImageSubtract ImageTake ImageTransformation ImageTrim ImageType ImageValue ImageValuePositions Implies Import ImportAutoReplacements ImportString ImprovementImportance In IncidenceGraph IncidenceList IncidenceMatrix IncludeConstantBasis IncludeFileExtension IncludePods IncludeSingularTerm Increment Indent IndentingNewlineSpacings IndentMaxFraction IndependenceTest IndependentEdgeSetQ IndependentUnit IndependentVertexSetQ Indeterminate IndexCreationOptions Indexed IndexGraph IndexTag Inequality InexactNumberQ InexactNumbers Infinity Infix Information Inherited InheritScope Initialization InitializationCell InitializationCellEvaluation InitializationCellWarning InlineCounterAssignments InlineCounterIncrements InlineRules Inner Inpaint Input InputAliases InputAssumptions InputAutoReplacements InputField InputFieldBox InputFieldBoxOptions InputForm InputGrouping InputNamePacket InputNotebook InputPacket InputSettings InputStream InputString InputStringPacket InputToBoxFormPacket Insert InsertionPointObject InsertResults Inset Inset3DBox Inset3DBoxOptions InsetBox InsetBoxOptions Install InstallService InString Integer IntegerDigits IntegerExponent IntegerLength IntegerPart IntegerPartitions IntegerQ Integers IntegerString Integral Integrate Interactive InteractiveTradingChart Interlaced Interleaving InternallyBalancedDecomposition InterpolatingFunction InterpolatingPolynomial Interpolation InterpolationOrder InterpolationPoints InterpolationPrecision Interpretation InterpretationBox InterpretationBoxOptions InterpretationFunction InterpretTemplate InterquartileRange Interrupt InterruptSettings Intersection Interval IntervalIntersection IntervalMemberQ IntervalUnion Inverse InverseBetaRegularized InverseCDF InverseChiSquareDistribution InverseContinuousWaveletTransform InverseDistanceTransform InverseEllipticNomeQ InverseErf InverseErfc InverseFourier InverseFourierCosTransform InverseFourierSequenceTransform InverseFourierSinTransform InverseFourierTransform InverseFunction InverseFunctions InverseGammaDistribution InverseGammaRegularized InverseGaussianDistribution InverseGudermannian InverseHaversine InverseJacobiCD InverseJacobiCN InverseJacobiCS InverseJacobiDC InverseJacobiDN InverseJacobiDS InverseJacobiNC InverseJacobiND InverseJacobiNS InverseJacobiSC InverseJacobiSD InverseJacobiSN InverseLaplaceTransform InversePermutation InverseRadon InverseSeries InverseSurvivalFunction InverseWaveletTransform InverseWeierstrassP InverseZTransform Invisible InvisibleApplication InvisibleTimes IrreduciblePolynomialQ IsolatingInterval IsomorphicGraphQ IsotopeData Italic Item ItemBox ItemBoxOptions ItemSize ItemStyle ItoProcess JaccardDissimilarity JacobiAmplitude Jacobian JacobiCD JacobiCN JacobiCS JacobiDC JacobiDN JacobiDS JacobiNC JacobiND JacobiNS JacobiP JacobiSC JacobiSD JacobiSN JacobiSymbol JacobiZeta JankoGroupJ1 JankoGroupJ2 JankoGroupJ3 JankoGroupJ4 JarqueBeraALMTest JohnsonDistribution Join Joined JoinedCurve JoinedCurveBox JoinForm JordanDecomposition JordanModelDecomposition K KagiChart KaiserBesselWindow KaiserWindow KalmanEstimator KalmanFilter KarhunenLoeveDecomposition KaryTree KatzCentrality KCoreComponents KDistribution KelvinBei KelvinBer KelvinKei KelvinKer KendallTau KendallTauTest KernelExecute KernelMixtureDistribution KernelObject Kernels Ket Khinchin KirchhoffGraph KirchhoffMatrix KleinInvariantJ KnightTourGraph KnotData KnownUnitQ KolmogorovSmirnovTest KroneckerDelta KroneckerModelDecomposition KroneckerProduct KroneckerSymbol KuiperTest KumaraswamyDistribution Kurtosis KuwaharaFilter Label Labeled LabeledSlider LabelingFunction LabelStyle LaguerreL LambdaComponents LambertW LanczosWindow LandauDistribution Language LanguageCategory LaplaceDistribution LaplaceTransform Laplacian LaplacianFilter LaplacianGaussianFilter Large Larger Last Latitude LatitudeLongitude LatticeData LatticeReduce Launch LaunchKernels LayeredGraphPlot LayerSizeFunction LayoutInformation LCM LeafCount LeapYearQ LeastSquares LeastSquaresFilterKernel Left LeftArrow LeftArrowBar LeftArrowRightArrow LeftDownTeeVector LeftDownVector LeftDownVectorBar LeftRightArrow LeftRightVector LeftTee LeftTeeArrow LeftTeeVector LeftTriangle LeftTriangleBar LeftTriangleEqual LeftUpDownVector LeftUpTeeVector LeftUpVector LeftUpVectorBar LeftVector LeftVectorBar LegendAppearance Legended LegendFunction LegendLabel LegendLayout LegendMargins LegendMarkers LegendMarkerSize LegendreP LegendreQ LegendreType Length LengthWhile LerchPhi Less LessEqual LessEqualGreater LessFullEqual LessGreater LessLess LessSlantEqual LessTilde LetterCharacter LetterQ Level LeveneTest LeviCivitaTensor LevyDistribution Lexicographic LibraryFunction LibraryFunctionError LibraryFunctionInformation LibraryFunctionLoad LibraryFunctionUnload LibraryLoad LibraryUnload LicenseID LiftingFilterData LiftingWaveletTransform LightBlue LightBrown LightCyan Lighter LightGray LightGreen Lighting LightingAngle LightMagenta LightOrange LightPink LightPurple LightRed LightSources LightYellow Likelihood Limit LimitsPositioning LimitsPositioningTokens LindleyDistribution Line Line3DBox LinearFilter LinearFractionalTransform LinearModelFit LinearOffsetFunction LinearProgramming LinearRecurrence LinearSolve LinearSolveFunction LineBox LineBreak LinebreakAdjustments LineBreakChart LineBreakWithin LineColor LineForm LineGraph LineIndent LineIndentMaxFraction LineIntegralConvolutionPlot LineIntegralConvolutionScale LineLegend LineOpacity LineSpacing LineWrapParts LinkActivate LinkClose LinkConnect LinkConnectedQ LinkCreate LinkError LinkFlush LinkFunction LinkHost LinkInterrupt LinkLaunch LinkMode LinkObject LinkOpen LinkOptions LinkPatterns LinkProtocol LinkRead LinkReadHeld LinkReadyQ Links LinkWrite LinkWriteHeld LiouvilleLambda List Listable ListAnimate ListContourPlot ListContourPlot3D ListConvolve ListCorrelate ListCurvePathPlot ListDeconvolve ListDensityPlot Listen ListFourierSequenceTransform ListInterpolation ListLineIntegralConvolutionPlot ListLinePlot ListLogLinearPlot ListLogLogPlot ListLogPlot ListPicker ListPickerBox ListPickerBoxBackground ListPickerBoxOptions ListPlay ListPlot ListPlot3D ListPointPlot3D ListPolarPlot ListQ ListStreamDensityPlot ListStreamPlot ListSurfacePlot3D ListVectorDensityPlot ListVectorPlot ListVectorPlot3D ListZTransform Literal LiteralSearch LocalClusteringCoefficient LocalizeVariables LocationEquivalenceTest LocationTest Locator LocatorAutoCreate LocatorBox LocatorBoxOptions LocatorCentering LocatorPane LocatorPaneBox LocatorPaneBoxOptions LocatorRegion Locked Log Log10 Log2 LogBarnesG LogGamma LogGammaDistribution LogicalExpand LogIntegral LogisticDistribution LogitModelFit LogLikelihood LogLinearPlot LogLogisticDistribution LogLogPlot LogMultinormalDistribution LogNormalDistribution LogPlot LogRankTest LogSeriesDistribution LongEqual Longest LongestAscendingSequence LongestCommonSequence LongestCommonSequencePositions LongestCommonSubsequence LongestCommonSubsequencePositions LongestMatch LongForm Longitude LongLeftArrow LongLeftRightArrow LongRightArrow Loopback LoopFreeGraphQ LowerCaseQ LowerLeftArrow LowerRightArrow LowerTriangularize LowpassFilter LQEstimatorGains LQGRegulator LQOutputRegulatorGains LQRegulatorGains LUBackSubstitution LucasL LuccioSamiComponents LUDecomposition LyapunovSolve LyonsGroupLy MachineID MachineName MachineNumberQ MachinePrecision MacintoshSystemPageSetup Magenta Magnification Magnify MainSolve MaintainDynamicCaches Majority MakeBoxes MakeExpression MakeRules MangoldtLambda ManhattanDistance Manipulate Manipulator MannWhitneyTest MantissaExponent Manual Map MapAll MapAt MapIndexed MAProcess MapThread MarcumQ MardiaCombinedTest MardiaKurtosisTest MardiaSkewnessTest MarginalDistribution MarkovProcessProperties Masking MatchingDissimilarity MatchLocalNameQ MatchLocalNames MatchQ Material MathematicaNotation MathieuC MathieuCharacteristicA MathieuCharacteristicB MathieuCharacteristicExponent MathieuCPrime MathieuGroupM11 MathieuGroupM12 MathieuGroupM22 MathieuGroupM23 MathieuGroupM24 MathieuS MathieuSPrime MathMLForm MathMLText Matrices MatrixExp MatrixForm MatrixFunction MatrixLog MatrixPlot MatrixPower MatrixQ MatrixRank Max MaxBend MaxDetect MaxExtraBandwidths MaxExtraConditions MaxFeatures MaxFilter Maximize MaxIterations MaxMemoryUsed MaxMixtureKernels MaxPlotPoints MaxPoints MaxRecursion MaxStableDistribution MaxStepFraction MaxSteps MaxStepSize MaxValue MaxwellDistribution McLaughlinGroupMcL Mean MeanClusteringCoefficient MeanDegreeConnectivity MeanDeviation MeanFilter MeanGraphDistance MeanNeighborDegree MeanShift MeanShiftFilter Median MedianDeviation MedianFilter Medium MeijerG MeixnerDistribution MemberQ MemoryConstrained MemoryInUse Menu MenuAppearance MenuCommandKey MenuEvaluator MenuItem MenuPacket MenuSortingValue MenuStyle MenuView MergeDifferences Mesh MeshFunctions MeshRange MeshShading MeshStyle Message MessageDialog MessageList MessageName MessageOptions MessagePacket Messages MessagesNotebook MetaCharacters MetaInformation Method MethodOptions MexicanHatWavelet MeyerWavelet Min MinDetect MinFilter MinimalPolynomial MinimalStateSpaceModel Minimize Minors MinRecursion MinSize MinStableDistribution Minus MinusPlus MinValue Missing MissingDataMethod MittagLefflerE MixedRadix MixedRadixQuantity MixtureDistribution Mod Modal Mode Modular ModularLambda Module Modulus MoebiusMu Moment Momentary MomentConvert MomentEvaluate MomentGeneratingFunction Monday Monitor MonomialList MonomialOrder MonsterGroupM MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform Most MouseAnnotation MouseAppearance MouseAppearanceTag MouseButtons Mouseover MousePointerNote MousePosition MovingAverage MovingMedian MoyalDistribution MultiedgeStyle MultilaunchWarning MultiLetterItalics MultiLetterStyle MultilineFunction Multinomial MultinomialDistribution MultinormalDistribution MultiplicativeOrder Multiplicity Multiselection MultivariateHypergeometricDistribution MultivariatePoissonDistribution MultivariateTDistribution N NakagamiDistribution NameQ Names NamespaceBox Nand NArgMax NArgMin NBernoulliB NCache NDSolve NDSolveValue Nearest NearestFunction NeedCurrentFrontEndPackagePacket NeedCurrentFrontEndSymbolsPacket NeedlemanWunschSimilarity Needs Negative NegativeBinomialDistribution NegativeMultinomialDistribution NeighborhoodGraph Nest NestedGreaterGreater NestedLessLess NestedScriptRules NestList NestWhile NestWhileList NevilleThetaC NevilleThetaD NevilleThetaN NevilleThetaS NewPrimitiveStyle NExpectation Next NextPrime NHoldAll NHoldFirst NHoldRest NicholsGridLines NicholsPlot NIntegrate NMaximize NMaxValue NMinimize NMinValue NominalVariables NonAssociative NoncentralBetaDistribution NoncentralChiSquareDistribution NoncentralFRatioDistribution NoncentralStudentTDistribution NonCommutativeMultiply NonConstants None NonlinearModelFit NonlocalMeansFilter NonNegative NonPositive Nor NorlundB Norm Normal NormalDistribution NormalGrouping Normalize NormalizedSquaredEuclideanDistance NormalsFunction NormFunction Not NotCongruent NotCupCap NotDoubleVerticalBar Notebook NotebookApply NotebookAutoSave NotebookClose NotebookConvertSettings NotebookCreate NotebookCreateReturnObject NotebookDefault NotebookDelete NotebookDirectory NotebookDynamicExpression NotebookEvaluate NotebookEventActions NotebookFileName NotebookFind NotebookFindReturnObject NotebookGet NotebookGetLayoutInformationPacket NotebookGetMisspellingsPacket NotebookInformation NotebookInterfaceObject NotebookLocate NotebookObject NotebookOpen NotebookOpenReturnObject NotebookPath NotebookPrint NotebookPut NotebookPutReturnObject NotebookRead NotebookResetGeneratedCells Notebooks NotebookSave NotebookSaveAs NotebookSelection NotebookSetupLayoutInformationPacket NotebooksMenu NotebookWrite NotElement NotEqualTilde NotExists NotGreater NotGreaterEqual NotGreaterFullEqual NotGreaterGreater NotGreaterLess NotGreaterSlantEqual NotGreaterTilde NotHumpDownHump NotHumpEqual NotLeftTriangle NotLeftTriangleBar NotLeftTriangleEqual NotLess NotLessEqual NotLessFullEqual NotLessGreater NotLessLess NotLessSlantEqual NotLessTilde NotNestedGreaterGreater NotNestedLessLess NotPrecedes NotPrecedesEqual NotPrecedesSlantEqual NotPrecedesTilde NotReverseElement NotRightTriangle NotRightTriangleBar NotRightTriangleEqual NotSquareSubset NotSquareSubsetEqual NotSquareSuperset NotSquareSupersetEqual NotSubset NotSubsetEqual NotSucceeds NotSucceedsEqual NotSucceedsSlantEqual NotSucceedsTilde NotSuperset NotSupersetEqual NotTilde NotTildeEqual NotTildeFullEqual NotTildeTilde NotVerticalBar NProbability NProduct NProductFactors NRoots NSolve NSum NSumTerms Null NullRecords NullSpace NullWords Number NumberFieldClassNumber NumberFieldDiscriminant NumberFieldFundamentalUnits NumberFieldIntegralBasis NumberFieldNormRepresentatives NumberFieldRegulator NumberFieldRootsOfUnity NumberFieldSignature NumberForm NumberFormat NumberMarks NumberMultiplier NumberPadding NumberPoint NumberQ NumberSeparator NumberSigns NumberString Numerator NumericFunction NumericQ NuttallWindow NValues NyquistGridLines NyquistPlot O ObservabilityGramian ObservabilityMatrix ObservableDecomposition ObservableModelQ OddQ Off Offset OLEData On ONanGroupON OneIdentity Opacity Open OpenAppend Opener OpenerBox OpenerBoxOptions OpenerView OpenFunctionInspectorPacket Opening OpenRead OpenSpecialOptions OpenTemporary OpenWrite Operate OperatingSystem OptimumFlowData Optional OptionInspectorSettings OptionQ Options OptionsPacket OptionsPattern OptionValue OptionValueBox OptionValueBoxOptions Or Orange Order OrderDistribution OrderedQ Ordering Orderless OrnsteinUhlenbeckProcess Orthogonalize Out Outer OutputAutoOverwrite OutputControllabilityMatrix OutputControllableModelQ OutputForm OutputFormData OutputGrouping OutputMathEditExpression OutputNamePacket OutputResponse OutputSizeLimit OutputStream Over OverBar OverDot Overflow OverHat Overlaps Overlay OverlayBox OverlayBoxOptions Overscript OverscriptBox OverscriptBoxOptions OverTilde OverVector OwenT OwnValues PackingMethod PaddedForm Padding PadeApproximant PadLeft PadRight PageBreakAbove PageBreakBelow PageBreakWithin PageFooterLines PageFooters PageHeaderLines PageHeaders PageHeight PageRankCentrality PageWidth PairedBarChart PairedHistogram PairedSmoothHistogram PairedTTest PairedZTest PaletteNotebook PalettePath Pane PaneBox PaneBoxOptions Panel PanelBox PanelBoxOptions Paneled PaneSelector PaneSelectorBox PaneSelectorBoxOptions PaperWidth ParabolicCylinderD ParagraphIndent ParagraphSpacing ParallelArray ParallelCombine ParallelDo ParallelEvaluate Parallelization Parallelize ParallelMap ParallelNeeds ParallelProduct ParallelSubmit ParallelSum ParallelTable ParallelTry Parameter ParameterEstimator ParameterMixtureDistribution ParameterVariables ParametricFunction ParametricNDSolve ParametricNDSolveValue ParametricPlot ParametricPlot3D ParentConnect ParentDirectory ParentForm Parenthesize ParentList ParetoDistribution Part PartialCorrelationFunction PartialD ParticleData Partition PartitionsP PartitionsQ ParzenWindow PascalDistribution PassEventsDown PassEventsUp Paste PasteBoxFormInlineCells PasteButton Path PathGraph PathGraphQ Pattern PatternSequence PatternTest PauliMatrix PaulWavelet Pause PausedTime PDF PearsonChiSquareTest PearsonCorrelationTest PearsonDistribution PerformanceGoal PeriodicInterpolation Periodogram PeriodogramArray PermutationCycles PermutationCyclesQ PermutationGroup PermutationLength PermutationList PermutationListQ PermutationMax PermutationMin PermutationOrder PermutationPower PermutationProduct PermutationReplace Permutations PermutationSupport Permute PeronaMalikFilter Perpendicular PERTDistribution PetersenGraph PhaseMargins Pi Pick PIDData PIDDerivativeFilter PIDFeedforward PIDTune Piecewise PiecewiseExpand PieChart PieChart3D PillaiTrace PillaiTraceTest Pink Pivoting PixelConstrained PixelValue PixelValuePositions Placed Placeholder PlaceholderReplace Plain PlanarGraphQ Play PlayRange Plot Plot3D Plot3Matrix PlotDivision PlotJoined PlotLabel PlotLayout PlotLegends PlotMarkers PlotPoints PlotRange PlotRangeClipping PlotRangePadding PlotRegion PlotStyle Plus PlusMinus Pochhammer PodStates PodWidth Point Point3DBox PointBox PointFigureChart PointForm PointLegend PointSize PoissonConsulDistribution PoissonDistribution PoissonProcess PoissonWindow PolarAxes PolarAxesOrigin PolarGridLines PolarPlot PolarTicks PoleZeroMarkers PolyaAeppliDistribution PolyGamma Polygon Polygon3DBox Polygon3DBoxOptions PolygonBox PolygonBoxOptions PolygonHoleScale PolygonIntersections PolygonScale PolyhedronData PolyLog PolynomialExtendedGCD PolynomialForm PolynomialGCD PolynomialLCM PolynomialMod PolynomialQ PolynomialQuotient PolynomialQuotientRemainder PolynomialReduce PolynomialRemainder Polynomials PopupMenu PopupMenuBox PopupMenuBoxOptions PopupView PopupWindow Position Positive PositiveDefiniteMatrixQ PossibleZeroQ Postfix PostScript Power PowerDistribution PowerExpand PowerMod PowerModList PowerSpectralDensity PowersRepresentations PowerSymmetricPolynomial Precedence PrecedenceForm Precedes PrecedesEqual PrecedesSlantEqual PrecedesTilde Precision PrecisionGoal PreDecrement PredictionRoot PreemptProtect PreferencesPath Prefix PreIncrement Prepend PrependTo PreserveImageOptions Previous PriceGraphDistribution PrimaryPlaceholder Prime PrimeNu PrimeOmega PrimePi PrimePowerQ PrimeQ Primes PrimeZetaP PrimitiveRoot PrincipalComponents PrincipalValue Print PrintAction PrintForm PrintingCopies PrintingOptions PrintingPageRange PrintingStartingPageNumber PrintingStyleEnvironment PrintPrecision PrintTemporary Prism PrismBox PrismBoxOptions PrivateCellOptions PrivateEvaluationOptions PrivateFontOptions PrivateFrontEndOptions PrivateNotebookOptions PrivatePaths Probability ProbabilityDistribution ProbabilityPlot ProbabilityPr ProbabilityScalePlot ProbitModelFit ProcessEstimator ProcessParameterAssumptions ProcessParameterQ ProcessStateDomain ProcessTimeDomain Product ProductDistribution ProductLog ProgressIndicator ProgressIndicatorBox ProgressIndicatorBoxOptions Projection Prolog PromptForm Properties Property PropertyList PropertyValue Proportion Proportional Protect Protected ProteinData Pruning PseudoInverse Purple Put PutAppend Pyramid PyramidBox PyramidBoxOptions QBinomial QFactorial QGamma QHypergeometricPFQ QPochhammer QPolyGamma QRDecomposition QuadraticIrrationalQ Quantile QuantilePlot Quantity QuantityForm QuantityMagnitude QuantityQ QuantityUnit Quartics QuartileDeviation Quartiles QuartileSkewness QueueingNetworkProcess QueueingProcess QueueProperties Quiet Quit Quotient QuotientRemainder RadialityCentrality RadicalBox RadicalBoxOptions RadioButton RadioButtonBar RadioButtonBox RadioButtonBoxOptions Radon RamanujanTau RamanujanTauL RamanujanTauTheta RamanujanTauZ Random RandomChoice RandomComplex RandomFunction RandomGraph RandomImage RandomInteger RandomPermutation RandomPrime RandomReal RandomSample RandomSeed RandomVariate RandomWalkProcess Range RangeFilter RangeSpecification RankedMax RankedMin Raster Raster3D Raster3DBox Raster3DBoxOptions RasterArray RasterBox RasterBoxOptions Rasterize RasterSize Rational RationalFunctions Rationalize Rationals Ratios Raw RawArray RawBoxes RawData RawMedium RayleighDistribution Re Read ReadList ReadProtected Real RealBlockDiagonalForm RealDigits RealExponent Reals Reap Record RecordLists RecordSeparators Rectangle RectangleBox RectangleBoxOptions RectangleChart RectangleChart3D RecurrenceFilter RecurrenceTable RecurringDigitsForm Red Reduce RefBox ReferenceLineStyle ReferenceMarkers ReferenceMarkerStyle Refine ReflectionMatrix ReflectionTransform Refresh RefreshRate RegionBinarize RegionFunction RegionPlot RegionPlot3D RegularExpression Regularization Reinstall Release ReleaseHold ReliabilityDistribution ReliefImage ReliefPlot Remove RemoveAlphaChannel RemoveAsynchronousTask Removed RemoveInputStreamMethod RemoveOutputStreamMethod RemoveProperty RemoveScheduledTask RenameDirectory RenameFile RenderAll RenderingOptions RenewalProcess RenkoChart Repeated RepeatedNull RepeatedString Replace ReplaceAll ReplaceHeldPart ReplaceImageValue ReplaceList ReplacePart ReplacePixelValue ReplaceRepeated Resampling Rescale RescalingTransform ResetDirectory ResetMenusPacket ResetScheduledTask Residue Resolve Rest Resultant ResumePacket Return ReturnExpressionPacket ReturnInputFormPacket ReturnPacket ReturnTextPacket Reverse ReverseBiorthogonalSplineWavelet ReverseElement ReverseEquilibrium ReverseGraph ReverseUpEquilibrium RevolutionAxis RevolutionPlot3D RGBColor RiccatiSolve RiceDistribution RidgeFilter RiemannR RiemannSiegelTheta RiemannSiegelZ Riffle Right RightArrow RightArrowBar RightArrowLeftArrow RightCosetRepresentative RightDownTeeVector RightDownVector RightDownVectorBar RightTee RightTeeArrow RightTeeVector RightTriangle RightTriangleBar RightTriangleEqual RightUpDownVector RightUpTeeVector RightUpVector RightUpVectorBar RightVector RightVectorBar RiskAchievementImportance RiskReductionImportance RogersTanimotoDissimilarity Root RootApproximant RootIntervals RootLocusPlot RootMeanSquare RootOfUnityQ RootReduce Roots RootSum Rotate RotateLabel RotateLeft RotateRight RotationAction RotationBox RotationBoxOptions RotationMatrix RotationTransform Round RoundImplies RoundingRadius Row RowAlignments RowBackgrounds RowBox RowHeights RowLines RowMinHeight RowReduce RowsEqual RowSpacings RSolve RudvalisGroupRu Rule RuleCondition RuleDelayed RuleForm RulerUnits Run RunScheduledTask RunThrough RuntimeAttributes RuntimeOptions RussellRaoDissimilarity SameQ SameTest SampleDepth SampledSoundFunction SampledSoundList SampleRate SamplingPeriod SARIMAProcess SARMAProcess SatisfiabilityCount SatisfiabilityInstances SatisfiableQ Saturday Save Saveable SaveAutoDelete SaveDefinitions SawtoothWave Scale Scaled ScaleDivisions ScaledMousePosition ScaleOrigin ScalePadding ScaleRanges ScaleRangeStyle ScalingFunctions ScalingMatrix ScalingTransform Scan ScheduledTaskActiveQ ScheduledTaskData ScheduledTaskObject ScheduledTasks SchurDecomposition ScientificForm ScreenRectangle ScreenStyleEnvironment ScriptBaselineShifts ScriptLevel ScriptMinSize ScriptRules ScriptSizeMultipliers Scrollbars ScrollingOptions ScrollPosition Sec Sech SechDistribution SectionGrouping SectorChart SectorChart3D SectorOrigin SectorSpacing SeedRandom Select Selectable SelectComponents SelectedCells SelectedNotebook Selection SelectionAnimate SelectionCell SelectionCellCreateCell SelectionCellDefaultStyle SelectionCellParentStyle SelectionCreateCell SelectionDebuggerTag SelectionDuplicateCell SelectionEvaluate SelectionEvaluateCreateCell SelectionMove SelectionPlaceholder SelectionSetStyle SelectWithContents SelfLoops SelfLoopStyle SemialgebraicComponentInstances SendMail Sequence SequenceAlignment SequenceForm SequenceHold SequenceLimit Series SeriesCoefficient SeriesData SessionTime Set SetAccuracy SetAlphaChannel SetAttributes Setbacks SetBoxFormNamesPacket SetDelayed SetDirectory SetEnvironment SetEvaluationNotebook SetFileDate SetFileLoadingContext SetNotebookStatusLine SetOptions SetOptionsPacket SetPrecision SetProperty SetSelectedNotebook SetSharedFunction SetSharedVariable SetSpeechParametersPacket SetStreamPosition SetSystemOptions Setter SetterBar SetterBox SetterBoxOptions Setting SetValue Shading Shallow ShannonWavelet ShapiroWilkTest Share Sharpen ShearingMatrix ShearingTransform ShenCastanMatrix Short ShortDownArrow Shortest ShortestMatch ShortestPathFunction ShortLeftArrow ShortRightArrow ShortUpArrow Show ShowAutoStyles ShowCellBracket ShowCellLabel ShowCellTags ShowClosedCellArea ShowContents ShowControls ShowCursorTracker ShowGroupOpenCloseIcon ShowGroupOpener ShowInvisibleCharacters ShowPageBreaks ShowPredictiveInterface ShowSelection ShowShortBoxForm ShowSpecialCharacters ShowStringCharacters ShowSyntaxStyles ShrinkingDelay ShrinkWrapBoundingBox SiegelTheta SiegelTukeyTest Sign Signature SignedRankTest SignificanceLevel SignPadding SignTest SimilarityRules SimpleGraph SimpleGraphQ Simplify Sin Sinc SinghMaddalaDistribution SingleEvaluation SingleLetterItalics SingleLetterStyle SingularValueDecomposition SingularValueList SingularValuePlot SingularValues Sinh SinhIntegral SinIntegral SixJSymbol Skeleton SkeletonTransform SkellamDistribution Skewness SkewNormalDistribution Skip SliceDistribution Slider Slider2D Slider2DBox Slider2DBoxOptions SliderBox SliderBoxOptions SlideView Slot SlotSequence Small SmallCircle Smaller SmithDelayCompensator SmithWatermanSimilarity SmoothDensityHistogram SmoothHistogram SmoothHistogram3D SmoothKernelDistribution SocialMediaData Socket SokalSneathDissimilarity Solve SolveAlways SolveDelayed Sort SortBy Sound SoundAndGraphics SoundNote SoundVolume Sow Space SpaceForm Spacer Spacings Span SpanAdjustments SpanCharacterRounding SpanFromAbove SpanFromBoth SpanFromLeft SpanLineThickness SpanMaxSize SpanMinSize SpanningCharacters SpanSymmetric SparseArray SpatialGraphDistribution Speak SpeakTextPacket SpearmanRankTest SpearmanRho Spectrogram SpectrogramArray Specularity SpellingCorrection SpellingDictionaries SpellingDictionariesPath SpellingOptions SpellingSuggestionsPacket Sphere SphereBox SphericalBesselJ SphericalBesselY SphericalHankelH1 SphericalHankelH2 SphericalHarmonicY SphericalPlot3D SphericalRegion SpheroidalEigenvalue SpheroidalJoiningFactor SpheroidalPS SpheroidalPSPrime SpheroidalQS SpheroidalQSPrime SpheroidalRadialFactor SpheroidalS1 SpheroidalS1Prime SpheroidalS2 SpheroidalS2Prime Splice SplicedDistribution SplineClosed SplineDegree SplineKnots SplineWeights Split SplitBy SpokenString Sqrt SqrtBox SqrtBoxOptions Square SquaredEuclideanDistance SquareFreeQ SquareIntersection SquaresR SquareSubset SquareSubsetEqual SquareSuperset SquareSupersetEqual SquareUnion SquareWave StabilityMargins StabilityMarginsStyle StableDistribution Stack StackBegin StackComplete StackInhibit StandardDeviation StandardDeviationFilter StandardForm Standardize StandbyDistribution Star StarGraph StartAsynchronousTask StartingStepSize StartOfLine StartOfString StartScheduledTask StartupSound StateDimensions StateFeedbackGains StateOutputEstimator StateResponse StateSpaceModel StateSpaceRealization StateSpaceTransform StationaryDistribution StationaryWaveletPacketTransform StationaryWaveletTransform StatusArea StatusCentrality StepMonitor StieltjesGamma StirlingS1 StirlingS2 StopAsynchronousTask StopScheduledTask StrataVariables StratonovichProcess StreamColorFunction StreamColorFunctionScaling StreamDensityPlot StreamPlot StreamPoints StreamPosition Streams StreamScale StreamStyle String StringBreak StringByteCount StringCases StringCount StringDrop StringExpression StringForm StringFormat StringFreeQ StringInsert StringJoin StringLength StringMatchQ StringPosition StringQ StringReplace StringReplaceList StringReplacePart StringReverse StringRotateLeft StringRotateRight StringSkeleton StringSplit StringTake StringToStream StringTrim StripBoxes StripOnInput StripWrapperBoxes StrokeForm StructuralImportance StructuredArray StructuredSelection StruveH StruveL Stub StudentTDistribution Style StyleBox StyleBoxAutoDelete StyleBoxOptions StyleData StyleDefinitions StyleForm StyleKeyMapping StyleMenuListing StyleNameDialogSettings StyleNames StylePrint StyleSheetPath Subfactorial Subgraph SubMinus SubPlus SubresultantPolynomialRemainders SubresultantPolynomials Subresultants Subscript SubscriptBox SubscriptBoxOptions Subscripted Subset SubsetEqual Subsets SubStar Subsuperscript SubsuperscriptBox SubsuperscriptBoxOptions Subtract SubtractFrom SubValues Succeeds SucceedsEqual SucceedsSlantEqual SucceedsTilde SuchThat Sum SumConvergence Sunday SuperDagger SuperMinus SuperPlus Superscript SuperscriptBox SuperscriptBoxOptions Superset SupersetEqual SuperStar Surd SurdForm SurfaceColor SurfaceGraphics SurvivalDistribution SurvivalFunction SurvivalModel SurvivalModelFit SuspendPacket SuzukiDistribution SuzukiGroupSuz SwatchLegend Switch Symbol SymbolName SymletWavelet Symmetric SymmetricGroup SymmetricMatrixQ SymmetricPolynomial SymmetricReduction Symmetrize SymmetrizedArray SymmetrizedArrayRules SymmetrizedDependentComponents SymmetrizedIndependentComponents SymmetrizedReplacePart SynchronousInitialization SynchronousUpdating Syntax SyntaxForm SyntaxInformation SyntaxLength SyntaxPacket SyntaxQ SystemDialogInput SystemException SystemHelpPath SystemInformation SystemInformationData SystemOpen SystemOptions SystemsModelDelay SystemsModelDelayApproximate SystemsModelDelete SystemsModelDimensions SystemsModelExtract SystemsModelFeedbackConnect SystemsModelLabels SystemsModelOrder SystemsModelParallelConnect SystemsModelSeriesConnect SystemsModelStateFeedbackConnect SystemStub Tab TabFilling Table TableAlignments TableDepth TableDirections TableForm TableHeadings TableSpacing TableView TableViewBox TabSpacings TabView TabViewBox TabViewBoxOptions TagBox TagBoxNote TagBoxOptions TaggingRules TagSet TagSetDelayed TagStyle TagUnset Take TakeWhile Tally Tan Tanh TargetFunctions TargetUnits TautologyQ TelegraphProcess TemplateBox TemplateBoxOptions TemplateSlotSequence TemporalData Temporary TemporaryVariable TensorContract TensorDimensions TensorExpand TensorProduct TensorQ TensorRank TensorReduce TensorSymmetry TensorTranspose TensorWedge Tetrahedron TetrahedronBox TetrahedronBoxOptions TeXForm TeXSave Text Text3DBox Text3DBoxOptions TextAlignment TextBand TextBoundingBox TextBox TextCell TextClipboardType TextData TextForm TextJustification TextLine TextPacket TextParagraph TextRecognize TextRendering TextStyle Texture TextureCoordinateFunction TextureCoordinateScaling Therefore ThermometerGauge Thick Thickness Thin Thinning ThisLink ThompsonGroupTh Thread ThreeJSymbol Threshold Through Throw Thumbnail Thursday Ticks TicksStyle Tilde TildeEqual TildeFullEqual TildeTilde TimeConstrained TimeConstraint Times TimesBy TimeSeriesForecast TimeSeriesInvertibility TimeUsed TimeValue TimeZone Timing Tiny TitleGrouping TitsGroupT ToBoxes ToCharacterCode ToColor ToContinuousTimeModel ToDate ToDiscreteTimeModel ToeplitzMatrix ToExpression ToFileName Together Toggle ToggleFalse Toggler TogglerBar TogglerBox TogglerBoxOptions ToHeldExpression ToInvertibleTimeSeries TokenWords Tolerance ToLowerCase ToNumberField TooBig Tooltip TooltipBox TooltipBoxOptions TooltipDelay TooltipStyle Top TopHatTransform TopologicalSort ToRadicals ToRules ToString Total TotalHeight TotalVariationFilter TotalWidth TouchscreenAutoZoom TouchscreenControlPlacement ToUpperCase Tr Trace TraceAbove TraceAction TraceBackward TraceDepth TraceDialog TraceForward TraceInternal TraceLevel TraceOff TraceOn TraceOriginal TracePrint TraceScan TrackedSymbols TradingChart TraditionalForm TraditionalFunctionNotation TraditionalNotation TraditionalOrder TransferFunctionCancel TransferFunctionExpand TransferFunctionFactor TransferFunctionModel TransferFunctionPoles TransferFunctionTransform TransferFunctionZeros TransformationFunction TransformationFunctions TransformationMatrix TransformedDistribution TransformedField Translate TranslationTransform TransparentColor Transpose TreeForm TreeGraph TreeGraphQ TreePlot TrendStyle TriangleWave TriangularDistribution Trig TrigExpand TrigFactor TrigFactorList Trigger TrigReduce TrigToExp TrimmedMean True TrueQ TruncatedDistribution TsallisQExponentialDistribution TsallisQGaussianDistribution TTest Tube TubeBezierCurveBox TubeBezierCurveBoxOptions TubeBox TubeBSplineCurveBox TubeBSplineCurveBoxOptions Tuesday TukeyLambdaDistribution TukeyWindow Tuples TuranGraph TuringMachine Transparent UnateQ Uncompress Undefined UnderBar Underflow Underlined Underoverscript UnderoverscriptBox UnderoverscriptBoxOptions Underscript UnderscriptBox UnderscriptBoxOptions UndirectedEdge UndirectedGraph UndirectedGraphQ UndocumentedTestFEParserPacket UndocumentedTestGetSelectionPacket Unequal Unevaluated UniformDistribution UniformGraphDistribution UniformSumDistribution Uninstall Union UnionPlus Unique UnitBox UnitConvert UnitDimensions Unitize UnitRootTest UnitSimplify UnitStep UnitTriangle UnitVector Unprotect UnsameQ UnsavedVariables Unset UnsetShared UntrackedVariables Up UpArrow UpArrowBar UpArrowDownArrow Update UpdateDynamicObjects UpdateDynamicObjectsSynchronous UpdateInterval UpDownArrow UpEquilibrium UpperCaseQ UpperLeftArrow UpperRightArrow UpperTriangularize Upsample UpSet UpSetDelayed UpTee UpTeeArrow UpValues URL URLFetch URLFetchAsynchronous URLSave URLSaveAsynchronous UseGraphicsRange Using UsingFrontEnd V2Get ValidationLength Value ValueBox ValueBoxOptions ValueForm ValueQ ValuesData Variables Variance VarianceEquivalenceTest VarianceEstimatorFunction VarianceGammaDistribution VarianceTest VectorAngle VectorColorFunction VectorColorFunctionScaling VectorDensityPlot VectorGlyphData VectorPlot VectorPlot3D VectorPoints VectorQ Vectors VectorScale VectorStyle Vee Verbatim Verbose VerboseConvertToPostScriptPacket VerifyConvergence VerifySolutions VerifyTestAssumptions Version VersionNumber VertexAdd VertexCapacity VertexColors VertexComponent VertexConnectivity VertexCoordinateRules VertexCoordinates VertexCorrelationSimilarity VertexCosineSimilarity VertexCount VertexCoverQ VertexDataCoordinates VertexDegree VertexDelete VertexDiceSimilarity VertexEccentricity VertexInComponent VertexInDegree VertexIndex VertexJaccardSimilarity VertexLabeling VertexLabels VertexLabelStyle VertexList VertexNormals VertexOutComponent VertexOutDegree VertexQ VertexRenderingFunction VertexReplace VertexShape VertexShapeFunction VertexSize VertexStyle VertexTextureCoordinates VertexWeight Vertical VerticalBar VerticalForm VerticalGauge VerticalSeparator VerticalSlider VerticalTilde ViewAngle ViewCenter ViewMatrix ViewPoint ViewPointSelectorSettings ViewPort ViewRange ViewVector ViewVertical VirtualGroupData Visible VisibleCell VoigtDistribution VonMisesDistribution WaitAll WaitAsynchronousTask WaitNext WaitUntil WakebyDistribution WalleniusHypergeometricDistribution WaringYuleDistribution WatershedComponents WatsonUSquareTest WattsStrogatzGraphDistribution WaveletBestBasis WaveletFilterCoefficients WaveletImagePlot WaveletListPlot WaveletMapIndexed WaveletMatrixPlot WaveletPhi WaveletPsi WaveletScale WaveletScalogram WaveletThreshold WeaklyConnectedComponents WeaklyConnectedGraphQ WeakStationarity WeatherData WeberE Wedge Wednesday WeibullDistribution WeierstrassHalfPeriods WeierstrassInvariants WeierstrassP WeierstrassPPrime WeierstrassSigma WeierstrassZeta WeightedAdjacencyGraph WeightedAdjacencyMatrix WeightedData WeightedGraphQ Weights WelchWindow WheelGraph WhenEvent Which While White Whitespace WhitespaceCharacter WhittakerM WhittakerW WienerFilter WienerProcess WignerD WignerSemicircleDistribution WilksW WilksWTest WindowClickSelect WindowElements WindowFloating WindowFrame WindowFrameElements WindowMargins WindowMovable WindowOpacity WindowSelected WindowSize WindowStatusArea WindowTitle WindowToolbars WindowWidth With WolframAlpha WolframAlphaDate WolframAlphaQuantity WolframAlphaResult Word WordBoundary WordCharacter WordData WordSearch WordSeparators WorkingPrecision Write WriteString Wronskian XMLElement XMLObject Xnor Xor Yellow YuleDissimilarity ZernikeR ZeroSymmetric ZeroTest ZeroWidthTimes Zeta ZetaZero ZipfDistribution ZTest ZTransform $Aborted $ActivationGroupID $ActivationKey $ActivationUserRegistered $AddOnsDirectory $AssertFunction $Assumptions $AsynchronousTask $BaseDirectory $BatchInput $BatchOutput $BoxForms $ByteOrdering $Canceled $CharacterEncoding $CharacterEncodings $CommandLine $CompilationTarget $ConditionHold $ConfiguredKernels $Context $ContextPath $ControlActiveSetting $CreationDate $CurrentLink $DateStringFormat $DefaultFont $DefaultFrontEnd $DefaultImagingDevice $DefaultPath $Display $DisplayFunction $DistributedContexts $DynamicEvaluation $Echo $Epilog $ExportFormats $Failed $FinancialDataSource $FormatType $FrontEnd $FrontEndSession $GeoLocation $HistoryLength $HomeDirectory $HTTPCookies $IgnoreEOF $ImagingDevices $ImportFormats $InitialDirectory $Input $InputFileName $InputStreamMethods $Inspector $InstallationDate $InstallationDirectory $InterfaceEnvironment $IterationLimit $KernelCount $KernelID $Language $LaunchDirectory $LibraryPath $LicenseExpirationDate $LicenseID $LicenseProcesses $LicenseServer $LicenseSubprocesses $LicenseType $Line $Linked $LinkSupported $LoadedFiles $MachineAddresses $MachineDomain $MachineDomains $MachineEpsilon $MachineID $MachineName $MachinePrecision $MachineType $MaxExtraPrecision $MaxLicenseProcesses $MaxLicenseSubprocesses $MaxMachineNumber $MaxNumber $MaxPiecewiseCases $MaxPrecision $MaxRootDegree $MessageGroups $MessageList $MessagePrePrint $Messages $MinMachineNumber $MinNumber $MinorReleaseNumber $MinPrecision $ModuleNumber $NetworkLicense $NewMessage $NewSymbol $Notebooks $NumberMarks $Off $OperatingSystem $Output $OutputForms $OutputSizeLimit $OutputStreamMethods $Packages $ParentLink $ParentProcessID $PasswordFile $PatchLevelID $Path $PathnameSeparator $PerformanceGoal $PipeSupported $Post $Pre $PreferencesDirectory $PrePrint $PreRead $PrintForms $PrintLiteral $ProcessID $ProcessorCount $ProcessorType $ProductInformation $ProgramName $RandomState $RecursionLimit $ReleaseNumber $RootDirectory $ScheduledTask $ScriptCommandLine $SessionID $SetParentLink $SharedFunctions $SharedVariables $SoundDisplay $SoundDisplayFunction $SuppressInputFormHeads $SynchronousEvaluation $SyntaxHandler $System $SystemCharacterEncoding $SystemID $SystemWordLength $TemporaryDirectory $TemporaryPrefix $TextStyle $TimedOut $TimeUnit $TimeZone $TopDirectory $TraceOff $TraceOn $TracePattern $TracePostAction $TracePreAction $Urgent $UserAddOnsDirectory $UserBaseDirectory $UserDocumentsDirectory $UserName $Version $VersionNumber", +contains:[{className:"comment",begin:/\(\*/,end:/\*\)/},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,{className:"list",begin:/\{/,end:/\}/,illegal:/:/}]}}),a.registerLanguage("matlab",function(a){var b=[a.C_NUMBER_MODE,{className:"string",begin:"'",end:"'",contains:[a.BACKSLASH_ESCAPE,{begin:"''"}]}],c={relevance:0,contains:[{className:"operator",begin:/'['\.]*/}]};return{keywords:{keyword:"break case catch classdef continue else elseif end enumerated events for function global if methods otherwise parfor persistent properties return spmd switch try while",built_in:"sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson"},illegal:'(//|"|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[a.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"},{className:"params",begin:"\\[",end:"\\]"}]},{begin:/[a-zA-Z_][a-zA-Z_0-9]*'['\.]*/,returnBegin:!0,relevance:0,contains:[{begin:/[a-zA-Z_][a-zA-Z_0-9]*/,relevance:0},c.contains[0]]},{className:"matrix",begin:"\\[",end:"\\]",contains:b,relevance:0,starts:c},{className:"cell",begin:"\\{",end:/}/,contains:b,relevance:0,starts:c},{begin:/\)/,relevance:0,starts:c},a.COMMENT("^\\s*\\%\\{\\s*$","^\\s*\\%\\}\\s*$"),a.COMMENT("\\%","$")].concat(b)}}),a.registerLanguage("mel",function(a){return{keywords:"int float string vector matrix if else switch case default while do for in break continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor animDisplay animView annotate appendStringArray applicationName applyAttrPreset applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem componentEditor compositingInterop computePolysetVolume condition cone confirmDialog connectAttr connectControl connectDynamic connectJoint connectionInfo constrain constrainValue constructionHistory container containsMultibyte contextInfo control convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected displayColor displayCull displayLevelOfDetail displayPref displayRGBColor displaySmoothness displayStats displayString displaySurface distanceDimContext distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor editorTemplate effector emit emitter enableDevice encodeString endString endsWith env equivalent equivalentTol erf error eval evalDeferred evalEcho event exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo filetest filletCurve filter filterCurve filterExpand filterStudioImport findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss geometryConstraint getApplicationVersionAsFloat getAttr getClassification getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation listNodeTypes listPanelCategories listRelatives listSets listTransforms listUnselected listerEditor loadFluid loadNewShelf loadPlugin loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration panelHistory paramDimContext paramDimension paramLocator parent parentConstraint particle particleExists particleInstancer particleRenderInfo partition pasteKey pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE registerPluginResource rehash reloadImage removeJoint removeMultiInstance removePanelCategory rename renameAttr renameSelectionList renameUI render renderGlobalsNode renderInfo renderLayerButton renderLayerParent renderLayerPostProcess renderLayerUnparent renderManip renderPartition renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor renderWindowSelectContext renderer reorder reorderDeformers requires reroot resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType selectedNodes selectionConnection separator setAttr setAttrEnumResource setAttrMapping setAttrNiceNameResource setConstraintRestPosition setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField shortNameOf showHelp showHidden showManipCtx showSelectionInTitle showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString stringToStringArray strip stripPrefixFromName stroke subdAutoProjection subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList textToShelf textureDisplacePlane textureHairColor texturePlacementContext textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper trace track trackCtx transferAttributes transformCompare transformLimits translator trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform",illegal:""},{begin:"<=",relevance:0},{begin:"=>",relevance:0},{begin:"/\\\\"},{begin:"\\\\/"}]},k={className:"built_in",variants:[{begin:":-\\|-->"},{begin:"=",relevance:0}]};return{aliases:["m","moo"],keywords:b,contains:[j,k,d,e,f,a.NUMBER_MODE,g,h,{begin:/:-/}]}}),a.registerLanguage("mizar",function(a){return{keywords:"environ vocabularies notations constructors definitions registrations theorems schemes requirements begin end definition registration cluster existence pred func defpred deffunc theorem proof let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from be being by means equals implies iff redefine define now not or attr is mode suppose per cases set thesis contradiction scheme reserve struct correctness compatibility coherence symmetry assymetry reflexivity irreflexivity connectedness uniqueness commutativity idempotence involutiveness projectivity",contains:[a.COMMENT("::","$")]}}),a.registerLanguage("perl",function(a){var b="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",c={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:b},d={begin:"->{",end:"}"},e={className:"variable",variants:[{begin:/\$\d/},{begin:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{begin:/[\$%@][^\s\w{]/,relevance:0}]},f=[a.BACKSLASH_ESCAPE,c,e],g=[e,a.HASH_COMMENT_MODE,a.COMMENT("^\\=\\w","\\=cut",{endsWithParent:!0}),d,{className:"string",contains:f,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*\\<",end:"\\>",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[a.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[a.BACKSLASH_ESCAPE]},{begin:"{\\w+}",contains:[],relevance:0},{begin:"-?\\w+\\s*\\=\\>",contains:[],relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+a.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[a.HASH_COMMENT_MODE,{className:"regexp",begin:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",relevance:10},{className:"regexp",begin:"(m|qr)?/",end:"/[a-z]*",contains:[a.BACKSLASH_ESCAPE],relevance:0}]},{className:"sub",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",relevance:5},{className:"operator",begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return c.contains=g,d.contains=g,{aliases:["pl"],keywords:b,contains:g}}),a.registerLanguage("mojolicious",function(a){return{subLanguage:"xml",contains:[{className:"preprocessor",begin:"^__(END|DATA)__$"},{begin:"^\\s*%{1,2}={0,2}",end:"$",subLanguage:"perl"},{begin:"<%{1,2}={0,2}",end:"={0,1}%>",subLanguage:"perl",excludeBegin:!0,excludeEnd:!0}]}}),a.registerLanguage("monkey",function(a){var b={className:"number",relevance:0,variants:[{begin:"[$][a-fA-F0-9]+"},a.NUMBER_MODE]};return{case_insensitive:!0,keywords:{keyword:"public private property continue exit extern new try catch eachin not abstract final select case default const local global field end if then else elseif endif while wend repeat until forever for to step next return module inline throw",built_in:"DebugLog DebugStop Error Print ACos ACosr ASin ASinr ATan ATan2 ATan2r ATanr Abs Abs Ceil Clamp Clamp Cos Cosr Exp Floor Log Max Max Min Min Pow Sgn Sgn Sin Sinr Sqrt Tan Tanr Seed PI HALFPI TWOPI",literal:"true false null and or shl shr mod"},illegal:/\/\*/,contains:[a.COMMENT("#rem","#end"),a.COMMENT("'","$",{relevance:0}),{className:"function",beginKeywords:"function method",end:"[(=:]|$",illegal:/\n/,contains:[a.UNDERSCORE_TITLE_MODE]},{className:"class",beginKeywords:"class interface",end:"$",contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]},{className:"variable",begin:"\\b(self|super)\\b"},{className:"preprocessor",beginKeywords:"import",end:"$"},{className:"preprocessor",begin:"\\s*#",end:"$",keywords:"if else elseif endif end then"},{className:"pi",begin:"^\\s*strict\\b"},{beginKeywords:"alias",end:"=",contains:[a.UNDERSCORE_TITLE_MODE]},a.QUOTE_STRING_MODE,b]}}),a.registerLanguage("nginx",function(a){var b={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{/,end:/}/},{begin:"[\\$\\@]"+a.UNDERSCORE_IDENT_RE}]},c={endsWithParent:!0,lexemes:"[a-z/_]+",keywords:{built_in:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},relevance:0,illegal:"=>",contains:[a.HASH_COMMENT_MODE,{className:"string",contains:[a.BACKSLASH_ESCAPE,b],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{className:"url",begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[b]},{className:"regexp",contains:[a.BACKSLASH_ESCAPE,b],variants:[{begin:"\\s\\^",end:"\\s|{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]*\\b",relevance:0},b]};return{aliases:["nginxconf"],contains:[a.HASH_COMMENT_MODE,{begin:a.UNDERSCORE_IDENT_RE+"\\s",end:";|{",returnBegin:!0,contains:[{className:"title",begin:a.UNDERSCORE_IDENT_RE,starts:c}],relevance:0}],illegal:"[^\\s\\}]"}}),a.registerLanguage("nimrod",function(a){return{aliases:["nim"],keywords:{keyword:"addr and as asm bind block break|0 case|0 cast const|0 continue|0 converter discard distinct|10 div do elif else|0 end|0 enum|0 except export finally for from generic if|0 import|0 in include|0 interface is isnot|10 iterator|10 let|0 macro method|10 mixin mod nil not notin|10 object|0 of or out proc|10 ptr raise ref|10 return shl shr static template try|0 tuple type|0 using|0 var|0 when while|0 with without xor yield",literal:"shared guarded stdin stdout stderr result|10 true false"},contains:[{className:"decorator",begin:/{\./,end:/\.}/,relevance:10},{className:"string",begin:/[a-zA-Z]\w*"/,end:/"/,contains:[{begin:/""/}]},{className:"string",begin:/([a-zA-Z]\w*)?"""/,end:/"""/},a.QUOTE_STRING_MODE,{className:"type",begin:/\b[A-Z]\w+\b/,relevance:0},{className:"type",begin:/\b(int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|float|float32|float64|bool|char|string|cstring|pointer|expr|stmt|void|auto|any|range|array|openarray|varargs|seq|set|clong|culong|cchar|cschar|cshort|cint|csize|clonglong|cfloat|cdouble|clongdouble|cuchar|cushort|cuint|culonglong|cstringarray|semistatic)\b/},{className:"number",begin:/\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/,relevance:0},{className:"number",begin:/\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/,relevance:0},{className:"number",begin:/\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/,relevance:0},{className:"number",begin:/\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/,relevance:0},a.HASH_COMMENT_MODE]}}),a.registerLanguage("nix",function(a){var b={keyword:"rec with let in inherit assert if else then",constant:"true false or and null",built_in:"import abort baseNameOf dirOf isNull builtins map removeAttrs throw toString derivation"},c={className:"subst",begin:/\$\{/,end:/}/,keywords:b},d={className:"variable",begin:/[a-zA-Z0-9-_]+(\s*=)/,relevance:0},e={className:"string",begin:"''",end:"''",contains:[c]},f={className:"string",begin:'"',end:'"',contains:[c]},g=[a.NUMBER_MODE,a.HASH_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,e,f,d];return c.contains=g,{aliases:["nixos"],keywords:b,contains:g}}),a.registerLanguage("nsis",function(a){var b={className:"symbol",begin:"\\$(ADMINTOOLS|APPDATA|CDBURN_AREA|CMDLINE|COMMONFILES32|COMMONFILES64|COMMONFILES|COOKIES|DESKTOP|DOCUMENTS|EXEDIR|EXEFILE|EXEPATH|FAVORITES|FONTS|HISTORY|HWNDPARENT|INSTDIR|INTERNET_CACHE|LANGUAGE|LOCALAPPDATA|MUSIC|NETHOOD|OUTDIR|PICTURES|PLUGINSDIR|PRINTHOOD|PROFILE|PROGRAMFILES32|PROGRAMFILES64|PROGRAMFILES|QUICKLAUNCH|RECENT|RESOURCES_LOCALIZED|RESOURCES|SENDTO|SMPROGRAMS|SMSTARTUP|STARTMENU|SYSDIR|TEMP|TEMPLATES|VIDEOS|WINDIR)"},c={className:"constant",begin:"\\$+{[a-zA-Z0-9_]+}"},d={className:"variable",begin:"\\$+[a-zA-Z0-9_]+",illegal:"\\(\\){}"},e={className:"constant",begin:"\\$+\\([a-zA-Z0-9_]+\\)"},f={className:"params",begin:"(ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)"},g={className:"constant",begin:"\\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversionsystem|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|makensis|packhdr|searchparse|searchreplace|tempfile|undef|verbose|warning)"};return{case_insensitive:!1,keywords:{keyword:"Abort AddBrandingImage AddSize AllowRootDirInstall AllowSkipFiles AutoCloseWindow BGFont BGGradient BrandingText BringToFront Call CallInstDLL Caption ChangeUI CheckBitmap ClearErrors CompletedText ComponentText CopyFiles CRCCheck CreateDirectory CreateFont CreateShortCut Delete DeleteINISec DeleteINIStr DeleteRegKey DeleteRegValue DetailPrint DetailsButtonText DirText DirVar DirVerify EnableWindow EnumRegKey EnumRegValue Exch Exec ExecShell ExecWait ExpandEnvStrings File FileBufSize FileClose FileErrorText FileOpen FileRead FileReadByte FileReadUTF16LE FileReadWord FileSeek FileWrite FileWriteByte FileWriteUTF16LE FileWriteWord FindClose FindFirst FindNext FindWindow FlushINI FunctionEnd GetCurInstType GetCurrentAddress GetDlgItem GetDLLVersion GetDLLVersionLocal GetErrorLevel GetFileTime GetFileTimeLocal GetFullPathName GetFunctionAddress GetInstDirError GetLabelAddress GetTempFileName Goto HideWindow Icon IfAbort IfErrors IfFileExists IfRebootFlag IfSilent InitPluginsDir InstallButtonText InstallColors InstallDir InstallDirRegKey InstProgressFlags InstType InstTypeGetText InstTypeSetText IntCmp IntCmpU IntFmt IntOp IsWindow LangString LicenseBkColor LicenseData LicenseForceSelection LicenseLangString LicenseText LoadLanguageFile LockWindow LogSet LogText ManifestDPIAware ManifestSupportedOS MessageBox MiscButtonText Name Nop OutFile Page PageCallbacks PageExEnd Pop Push Quit ReadEnvStr ReadINIStr ReadRegDWORD ReadRegStr Reboot RegDLL Rename RequestExecutionLevel ReserveFile Return RMDir SearchPath SectionEnd SectionGetFlags SectionGetInstTypes SectionGetSize SectionGetText SectionGroupEnd SectionIn SectionSetFlags SectionSetInstTypes SectionSetSize SectionSetText SendMessage SetAutoClose SetBrandingImage SetCompress SetCompressor SetCompressorDictSize SetCtlColors SetCurInstType SetDatablockOptimize SetDateSave SetDetailsPrint SetDetailsView SetErrorLevel SetErrors SetFileAttributes SetFont SetOutPath SetOverwrite SetPluginUnload SetRebootFlag SetRegView SetShellVarContext SetSilent ShowInstDetails ShowUninstDetails ShowWindow SilentInstall SilentUnInstall Sleep SpaceTexts StrCmp StrCmpS StrCpy StrLen SubCaption SubSectionEnd Unicode UninstallButtonText UninstallCaption UninstallIcon UninstallSubCaption UninstallText UninstPage UnRegDLL Var VIAddVersionKey VIFileVersion VIProductVersion WindowIcon WriteINIStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegStr WriteUninstaller XPStyle", +literal:"admin all auto both colored current false force hide highest lastused leave listonly none normal notset off on open print show silent silentlog smooth textonly true user "},contains:[a.HASH_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"',end:'"',illegal:"\\n",contains:[{className:"symbol",begin:"\\$(\\\\(n|r|t)|\\$)"},b,c,d,e]},a.COMMENT(";","$",{relevance:0}),{className:"function",beginKeywords:"Function PageEx Section SectionGroup SubSection",end:"$"},g,c,d,e,f,a.NUMBER_MODE,{className:"literal",begin:a.IDENT_RE+"::"+a.IDENT_RE}]}}),a.registerLanguage("objectivec",function(a){var b={className:"built_in",begin:"(AV|CA|CF|CG|CI|MK|MP|NS|UI)\\w+"},c={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},d=/[a-zA-Z@][a-zA-Z0-9_]*/,e="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],keywords:c,lexemes:d,illegal:""}]}]},{className:"class",begin:"("+e.split(" ").join("|")+")\\b",end:"({|$)",excludeEnd:!0,keywords:e,lexemes:d,contains:[a.UNDERSCORE_TITLE_MODE]},{className:"variable",begin:"\\."+a.UNDERSCORE_IDENT_RE,relevance:0}]}}),a.registerLanguage("ocaml",function(a){return{aliases:["ml"],keywords:{keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref",literal:"true false"},illegal:/\/\/|>>/,lexemes:"[a-z_]\\w*!?",contains:[{className:"literal",begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},a.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"tag",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},a.inherit(a.APOS_STRING_MODE,{className:"char",relevance:0}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}),a.registerLanguage("openscad",function(a){var b={className:"keyword",begin:"\\$(f[asn]|t|vp[rtd]|children)"},c={className:"literal",begin:"false|true|PI|undef"},d={className:"number",begin:"\\b\\d+(\\.\\d+)?(e-?\\d+)?",relevance:0},e=a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),f={className:"preprocessor",keywords:"include use",begin:"include|use <",end:">"},g={className:"params",begin:"\\(",end:"\\)",contains:["self",d,e,b,c]},h={className:"built_in",begin:"[*!#%]",relevance:0},i={className:"function",beginKeywords:"module function",end:"\\=|\\{",contains:[g,a.UNDERSCORE_TITLE_MODE]};return{aliases:["scad"],keywords:{keyword:"function module include use for intersection_for if else \\%",literal:"false true PI undef",built_in:"circle square polygon text sphere cube cylinder polyhedron translate rotate scale resize mirror multmatrix color offset hull minkowski union difference intersection abs sign sin cos tan acos asin atan atan2 floor round ceil ln log pow sqrt exp rands min max concat lookup str chr search version version_num norm cross parent_module echo import import_dxf dxf_linear_extrude linear_extrude rotate_extrude surface projection render children dxf_cross dxf_dim let assign"},contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,d,f,e,b,h,i]}}),a.registerLanguage("oxygene",function(a){var b="abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained",c=a.COMMENT("{","}",{relevance:0}),d=a.COMMENT("\\(\\*","\\*\\)",{relevance:10}),e={className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},f={className:"string",begin:"(#\\d+)+"},g={className:"function",beginKeywords:"function constructor destructor procedure method",end:"[:;]",keywords:"function constructor|10 destructor|10 procedure|10 method|10",contains:[a.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",keywords:b,contains:[e,f]},c,d]};return{case_insensitive:!0,keywords:b,illegal:'("|\\$[G-Zg-z]|\\/\\*||->)',contains:[c,d,a.C_LINE_COMMENT_MODE,e,f,a.NUMBER_MODE,g,{className:"class",begin:"=\\bclass\\b",end:"end;",keywords:b,contains:[e,f,c,d,a.C_LINE_COMMENT_MODE,g]}]}}),a.registerLanguage("parser3",function(a){var b=a.COMMENT("{","}",{contains:["self"]});return{subLanguage:"xml",relevance:0,contains:[a.COMMENT("^#","$"),a.COMMENT("\\^rem{","}",{relevance:10,contains:[b]}),{className:"preprocessor",begin:"^@(?:BASE|USE|CLASS|OPTIONS)$",relevance:10},{className:"title",begin:"@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$"},{className:"variable",begin:"\\$\\{?[\\w\\-\\.\\:]+\\}?"},{className:"keyword",begin:"\\^[\\w\\-\\.\\:]+"},{className:"number",begin:"\\^#[0-9a-fA-F]+"},a.C_NUMBER_MODE]}}),a.registerLanguage("pf",function(a){var b={className:"variable",begin:/\$[\w\d#@][\w\d_]*/},c={className:"variable",begin://};return{aliases:["pf.conf"],lexemes:/[a-z0-9_<>-]+/,keywords:{built_in:"block match pass load anchor|5 antispoof|10 set table",keyword:"in out log quick on rdomain inet inet6 proto from port os to routeallow-opts divert-packet divert-reply divert-to flags group icmp-typeicmp6-type label once probability recieved-on rtable prio queuetos tag tagged user keep fragment for os dropaf-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robinsource-hash static-portdup-to reply-to route-toparent bandwidth default min max qlimitblock-policy debug fingerprints hostid limit loginterface optimizationreassemble ruleset-optimization basic none profile skip state-defaultsstate-policy timeoutconst counters persistno modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppysource-track global rule max-src-nodes max-src-states max-src-connmax-src-conn-rate overload flushscrub|5 max-mss min-ttl no-df|10 random-id",literal:"all any no-route self urpf-failed egress|5 unknown"},contains:[a.HASH_COMMENT_MODE,a.NUMBER_MODE,a.QUOTE_STRING_MODE,b,c]}}),a.registerLanguage("php",function(a){var b={className:"variable",begin:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},c={className:"preprocessor",begin:/<\?(php)?|\?>/},d={className:"string",contains:[a.BACKSLASH_ESCAPE,c],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},a.inherit(a.APOS_STRING_MODE,{illegal:null}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null})]},e={variants:[a.BINARY_NUMBER_MODE,a.C_NUMBER_MODE]};return{aliases:["php3","php4","php5","php6"],case_insensitive:!0,keywords:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",contains:[a.C_LINE_COMMENT_MODE,a.HASH_COMMENT_MODE,a.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"},c]}),a.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler",lexemes:a.UNDERSCORE_IDENT_RE}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;?$/,contains:[a.BACKSLASH_ESCAPE,{className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]}]},c,b,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function",end:/[;{]/,excludeEnd:!0,illegal:"\\$|\\[|%",contains:[a.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:["self",b,a.C_BLOCK_COMMENT_MODE,d,e]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[a.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[a.UNDERSCORE_TITLE_MODE]},{begin:"=>"},d,e]}}),a.registerLanguage("powershell",function(a){var b={begin:"`[\\s\\S]",relevance:0},c={className:"variable",variants:[{begin:/\$[\w\d][\w\d_:]*/}]},d={className:"string",begin:/"/,end:/"/,contains:[b,c,{className:"variable",begin:/\$[A-z]/,end:/[^A-z]/}]},e={className:"string",begin:/'/,end:/'/};return{aliases:["ps"],lexemes:/-?[A-z\.\-]+/,case_insensitive:!0,keywords:{keyword:"if else foreach return function do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch",literal:"$null $true $false",built_in:"Add-Content Add-History Add-Member Add-PSSnapin Clear-Content Clear-Item Clear-Item Property Clear-Variable Compare-Object ConvertFrom-SecureString Convert-Path ConvertTo-Html ConvertTo-SecureString Copy-Item Copy-ItemProperty Export-Alias Export-Clixml Export-Console Export-Csv ForEach-Object Format-Custom Format-List Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command Get-Content Get-Credential Get-Culture Get-Date Get-EventLog Get-ExecutionPolicy Get-Help Get-History Get-Host Get-Item Get-ItemProperty Get-Location Get-Member Get-PfxCertificate Get-Process Get-PSDrive Get-PSProvider Get-PSSnapin Get-Service Get-TraceSource Get-UICulture Get-Unique Get-Variable Get-WmiObject Group-Object Import-Alias Import-Clixml Import-Csv Invoke-Expression Invoke-History Invoke-Item Join-Path Measure-Command Measure-Object Move-Item Move-ItemProperty New-Alias New-Item New-ItemProperty New-Object New-PSDrive New-Service New-TimeSpan New-Variable Out-Default Out-File Out-Host Out-Null Out-Printer Out-String Pop-Location Push-Location Read-Host Remove-Item Remove-ItemProperty Remove-PSDrive Remove-PSSnapin Remove-Variable Rename-Item Rename-ItemProperty Resolve-Path Restart-Service Resume-Service Select-Object Select-String Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-Location Set-PSDebug Set-Service Set-TraceSource Set-Variable Sort-Object Split-Path Start-Service Start-Sleep Start-Transcript Stop-Process Stop-Service Stop-Transcript Suspend-Service Tee-Object Test-Path Trace-Command Update-FormatData Update-TypeData Where-Object Write-Debug Write-Error Write-Host Write-Output Write-Progress Write-Verbose Write-Warning",operator:"-ne -eq -lt -gt -ge -le -not -like -notlike -match -notmatch -contains -notcontains -in -notin -replace"},contains:[a.HASH_COMMENT_MODE,a.NUMBER_MODE,d,e,c]}}),a.registerLanguage("processing",function(a){return{keywords:{keyword:"BufferedReader PVector PFont PImage PGraphics HashMap boolean byte char color double float int long String Array FloatDict FloatList IntDict IntList JSONArray JSONObject Object StringDict StringList Table TableRow XML false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",constant:"P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI",variable:"displayHeight displayWidth mouseY mouseX mousePressed pmouseX pmouseY key keyCode pixels focused frameCount frameRate height width",title:"setup draw",built_in:"size createGraphics beginDraw createShape loadShape PShape arc ellipse line point quad rect triangle bezier bezierDetail bezierPoint bezierTangent curve curveDetail curvePoint curveTangent curveTightness shape shapeMode beginContour beginShape bezierVertex curveVertex endContour endShape quadraticVertex vertex ellipseMode noSmooth rectMode smooth strokeCap strokeJoin strokeWeight mouseClicked mouseDragged mouseMoved mousePressed mouseReleased mouseWheel keyPressed keyPressedkeyReleased keyTyped print println save saveFrame day hour millis minute month second year background clear colorMode fill noFill noStroke stroke alpha blue brightness color green hue lerpColor red saturation modelX modelY modelZ screenX screenY screenZ ambient emissive shininess specular add createImage beginCamera camera endCamera frustum ortho perspective printCamera printProjection cursor frameRate noCursor exit loop noLoop popStyle pushStyle redraw binary boolean byte char float hex int str unbinary unhex join match matchAll nf nfc nfp nfs split splitTokens trim append arrayCopy concat expand reverse shorten sort splice subset box sphere sphereDetail createInput createReader loadBytes loadJSONArray loadJSONObject loadStrings loadTable loadXML open parseXML saveTable selectFolder selectInput beginRaw beginRecord createOutput createWriter endRaw endRecord PrintWritersaveBytes saveJSONArray saveJSONObject saveStream saveStrings saveXML selectOutput popMatrix printMatrix pushMatrix resetMatrix rotate rotateX rotateY rotateZ scale shearX shearY translate ambientLight directionalLight lightFalloff lights lightSpecular noLights normal pointLight spotLight image imageMode loadImage noTint requestImage tint texture textureMode textureWrap blend copy filter get loadPixels set updatePixels blendMode loadShader PShaderresetShader shader createFont loadFont text textFont textAlign textLeading textMode textSize textWidth textAscent textDescent abs ceil constrain dist exp floor lerp log mag map max min norm pow round sq sqrt acos asin atan atan2 cos degrees radians sin tan noise noiseDetail noiseSeed random randomGaussian randomSeed"},contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE]}}),a.registerLanguage("profile",function(a){return{contains:[a.C_NUMBER_MODE,{className:"built_in",begin:"{",end:"}$",excludeBegin:!0,excludeEnd:!0,contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE],relevance:0},{className:"filename",begin:"[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}",end:":",excludeEnd:!0},{className:"header",begin:"(ncalls|tottime|cumtime)",end:"$",keywords:"ncalls tottime|10 cumtime|10 filename",relevance:10},{className:"summary",begin:"function calls",end:"$",contains:[a.C_NUMBER_MODE],relevance:10},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{className:"function",begin:"\\(",end:"\\)$",contains:[a.UNDERSCORE_TITLE_MODE],relevance:0}]}}),a.registerLanguage("prolog",function(a){var b={className:"atom",begin:/[a-z][A-Za-z0-9_]*/,relevance:0},c={className:"name",variants:[{begin:/[A-Z][a-zA-Z0-9_]*/},{begin:/_[A-Za-z0-9_]*/}],relevance:0},d={begin:/\(/,end:/\)/,relevance:0},e={begin:/\[/,end:/\]/},f={className:"comment",begin:/%/,end:/$/,contains:[a.PHRASAL_WORDS_MODE]},g={className:"string",begin:/`/,end:/`/,contains:[a.BACKSLASH_ESCAPE]},h={className:"string",begin:/0\'(\\\'|.)/},i={className:"string",begin:/0\'\\s/},j={begin:/:-/},k=[b,c,d,j,e,f,a.C_BLOCK_COMMENT_MODE,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,g,h,i,a.C_NUMBER_MODE];return d.contains=k,e.contains=k,{contains:k.concat([{begin:/\.$/}])}}),a.registerLanguage("protobuf",function(a){return{keywords:{keyword:"package import option optional required repeated group",built_in:"double float int32 int64 uint32 uint64 sint32 sint64 fixed32 fixed64 sfixed32 sfixed64 bool string bytes",literal:"true false"},contains:[a.QUOTE_STRING_MODE,a.NUMBER_MODE,a.C_LINE_COMMENT_MODE,{className:"class",beginKeywords:"message enum service",end:/\{/,illegal:/\n/,contains:[a.inherit(a.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{className:"function",beginKeywords:"rpc",end:/;/,excludeEnd:!0,keywords:"rpc returns"},{className:"constant",begin:/^\s*[A-Z_]+/,end:/\s*=/,excludeEnd:!0}]}}),a.registerLanguage("puppet",function(a){var b={keyword:"and case default else elsif false if in import enherits node or true undef unless main settings $string ",literal:"alias audit before loglevel noop require subscribe tag owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check en_address ip_address realname command environment hour monute month monthday special target weekday creates cwd ogoutput refresh refreshonly tries try_sleep umask backup checksum content ctime force ignore links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel native_vlan speed principals allow_root auth_class auth_type authenticate_user k_of_n mechanisms rule session_owner shared options device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running start stop allowdupe auths expiry gid groups home iterations key_membership keys managehome membership password password_max_age password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert sslclientcert sslclientkey sslverify mounted",built_in:"architecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdistrelease lsbminordistrelease lsbrelease macaddress macaddress_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode selinux_current_mode selinux_enforced selinux_policyversion serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version"},c=a.COMMENT("#","$"),d="([A-Za-z_]|::)(\\w|::)*",e=a.inherit(a.TITLE_MODE,{begin:d}),f={className:"variable",begin:"\\$"+d},g={className:"string",contains:[a.BACKSLASH_ESCAPE,f],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]};return{aliases:["pp"],contains:[c,f,g,{beginKeywords:"class",end:"\\{|;",illegal:/=/,contains:[e,c]},{beginKeywords:"define",end:/\{/,contains:[{className:"title",begin:a.IDENT_RE,endsParent:!0}]},{begin:a.IDENT_RE+"\\s+\\{",returnBegin:!0,end:/\S/,contains:[{className:"name",begin:a.IDENT_RE},{begin:/\{/,end:/\}/,keywords:b,relevance:0,contains:[g,c,{begin:"[a-zA-Z_]+\\s*=>"},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},f]}],relevance:0}]}}),a.registerLanguage("python",function(a){var b={className:"prompt",begin:/^(>>>|\.\.\.) /},c={className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,contains:[b],relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,contains:[b],relevance:10},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE]},d={className:"number",relevance:0,variants:[{begin:a.BINARY_NUMBER_RE+"[lLjJ]?"},{begin:"\\b(0o[0-7]+)[lLjJ]?"},{begin:a.C_NUMBER_RE+"[lLjJ]?"}]},e={className:"params",begin:/\(/,end:/\)/,contains:["self",b,d,c]};return{aliases:["py","gyp"],keywords:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},illegal:/(<\/|->|\?)/,contains:[b,d,c,a.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def",relevance:10},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[a.UNDERSCORE_TITLE_MODE,e]},{className:"decorator",begin:/^[\t ]*@/,end:/$/},{begin:/\b(print|exec)\(/}]}}),a.registerLanguage("q",function(a){var b={keyword:"do while select delete by update from",constant:"0b 1b",built_in:"neg not null string reciprocal floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas ratios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tables views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg wsum sin cos tan sum",typename:"`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid"};return{aliases:["k","kdb"],keywords:b,lexemes:/\b(`?)[A-Za-z0-9_]+\b/,contains:[a.C_LINE_COMMENT_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE]}}),a.registerLanguage("r",function(a){var b="([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";return{contains:[a.HASH_COMMENT_MODE,{begin:b,lexemes:b,keywords:{keyword:"function if in break next repeat else for return switch while try tryCatch stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...",literal:"NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10"},relevance:0},{className:"number",begin:"0[xX][0-9a-fA-F]+[Li]?\\b",relevance:0},{className:"number",begin:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",relevance:0},{className:"number",begin:"\\d+\\.(?!\\d)(?:i\\b)?",relevance:0},{className:"number",begin:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{className:"number",begin:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{begin:"`",end:"`",relevance:0},{className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[{begin:'"',end:'"'},{begin:"'",end:"'"}]}]}}),a.registerLanguage("rib",function(a){return{keywords:"ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail DetailRange Disk Displacement Display End ErrorHandler Exposure Exterior Format FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry Hider Hyperboloid Identity Illuminate Imager Interior LightSource MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection Quantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd TransformPoints Translate TrimCurve WorldBegin WorldEnd",illegal:""}]}}),a.registerLanguage("scala",function(a){var b={className:"annotation",begin:"@[A-Za-z]+"},c={className:"string",begin:'u?r?"""',end:'"""',relevance:10},d={className:"symbol",begin:"'\\w[\\w\\d_]*(?!')"},e={className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},f={className:"title",begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,relevance:0},g={className:"class",beginKeywords:"class object trait type",end:/[:={\[(\n;]/,contains:[{className:"keyword",beginKeywords:"extends with",relevance:10},f]},h={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,contains:[f]};return{keywords:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"},contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,c,a.QUOTE_STRING_MODE,d,e,h,g,a.C_NUMBER_MODE,b]}}),a.registerLanguage("scheme",function(a){var b="[^\\(\\)\\[\\]\\{\\}\",'`;#|\\\\\\s]+",c="(\\-|\\+)?\\d+([./]\\d+)?",d=c+"[+\\-]"+c+"i",e={built_in:"case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules ' * + , ,@ - ... / ; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string symbol? tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"},f={className:"shebang",begin:"^#!",end:"$"},g={className:"literal",begin:"(#t|#f|#\\\\"+b+"|#\\\\.)"},h={className:"number",variants:[{begin:c,relevance:0},{begin:d,relevance:0},{begin:"#b[0-1]+(/[0-1]+)?"},{begin:"#o[0-7]+(/[0-7]+)?"},{begin:"#x[0-9a-f]+(/[0-9a-f]+)?"}]},i=a.QUOTE_STRING_MODE,j=[a.COMMENT(";","$",{relevance:0}),a.COMMENT("#\\|","\\|#")],k={begin:b,relevance:0},l={className:"variable",begin:"'"+b},m={endsWithParent:!0,relevance:0},n={className:"list",variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}],contains:[{className:"keyword",begin:b,lexemes:b,keywords:e},m]};return m.contains=[g,h,i,k,l,n].concat(j),{illegal:/\S/,contains:[f,h,i,l,n].concat(j)}}),a.registerLanguage("scilab",function(a){var b=[a.C_NUMBER_MODE,{className:"string",begin:"'|\"",end:"'|\"",contains:[a.BACKSLASH_ESCAPE,{begin:"''"}]}];return{aliases:["sci"],keywords:{keyword:"abort break case clear catch continue do elseif else endfunction end for functionglobal if pause return resume select try then while%f %F %t %T %pi %eps %inf %nan %e %i %z %s",built_in:"abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp errorexec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isemptyisinfisnan isvector lasterror length load linspace list listfiles log10 log2 logmax min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand realround sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tantype typename warning zeros matrix"},illegal:'("|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function endfunction",end:"$",keywords:"function endfunction|10",contains:[a.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},{className:"transposed_variable",begin:"[a-zA-Z_][a-zA-Z_0-9]*('+[\\.']*|[\\.']+)",end:"",relevance:0},{className:"matrix",begin:"\\[",end:"\\]'*[\\.']*",relevance:0,contains:b},a.COMMENT("//","$")].concat(b)}}),a.registerLanguage("scss",function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*",c={className:"variable",begin:"(\\$"+b+")\\b"},d={className:"function",begin:b+"\\(",returnBegin:!0,excludeEnd:!0,end:"\\("},e={className:"hexcolor",begin:"#[0-9A-Fa-f]+"};({className:"attribute",begin:"[A-Z\\_\\.\\-]+",end:":",excludeEnd:!0,illegal:"[^\\s]",starts:{className:"value",endsWithParent:!0,excludeEnd:!0,contains:[d,e,a.CSS_NUMBER_MODE,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,a.C_BLOCK_COMMENT_MODE,{className:"important",begin:"!important"}]}});return{case_insensitive:!0,illegal:"[=/|']",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,d,{className:"id",begin:"\\#[A-Za-z0-9_-]+",relevance:0},{className:"class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{className:"attr_selector",begin:"\\[",end:"\\]",illegal:"$"},{className:"tag",begin:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",relevance:0},{className:"pseudo",begin:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{className:"pseudo",begin:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},c,{className:"attribute",begin:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",illegal:"[^\\s]"},{className:"value",begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{className:"value",begin:":",end:";",contains:[d,c,e,a.CSS_NUMBER_MODE,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,{className:"important",begin:"!important"}]},{className:"at_rule",begin:"@",end:"[{;]",keywords:"mixin include extend for if else each while charset import debug media page content font-face namespace warn",contains:[d,c,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,e,a.CSS_NUMBER_MODE,{className:"preprocessor",begin:"\\s[A-Za-z0-9_.-]+",relevance:0}]}]}}),a.registerLanguage("smali",function(a){var b=["add","and","cmp","cmpg","cmpl","const","div","double","float","goto","if","int","long","move","mul","neg","new","nop","not","or","rem","return","shl","shr","sput","sub","throw","ushr","xor"],c=["aget","aput","array","check","execute","fill","filled","goto/16","goto/32","iget","instance","invoke","iput","monitor","packed","sget","sparse"],d=["transient","constructor","abstract","final","synthetic","public","private","protected","static","bridge","system"];return{aliases:["smali"],contains:[{className:"string",begin:'"',end:'"',relevance:0},a.COMMENT("#","$",{relevance:0}),{className:"keyword",begin:"\\s*\\.end\\s[a-zA-Z0-9]*",relevance:1},{className:"keyword",begin:"^[ ]*\\.[a-zA-Z]*",relevance:0},{className:"keyword",begin:"\\s:[a-zA-Z_0-9]*",relevance:0},{className:"keyword",begin:"\\s("+d.join("|")+")",relevance:1},{className:"keyword",begin:"\\[",relevance:0},{className:"instruction",begin:"\\s("+b.join("|")+")\\s",relevance:1},{className:"instruction",begin:"\\s("+b.join("|")+")((\\-|/)[a-zA-Z0-9]+)+\\s",relevance:10},{className:"instruction",begin:"\\s("+c.join("|")+")((\\-|/)[a-zA-Z0-9]+)*\\s",relevance:10},{className:"class",begin:"L[^(;:\n]*;",relevance:0},{className:"function",begin:'( |->)[^(\n ;"]*\\(',relevance:0},{className:"function",begin:"\\)",relevance:0},{className:"variable",begin:"[vp][0-9]+",relevance:0}]}}),a.registerLanguage("smalltalk",function(a){var b="[a-z][a-zA-Z0-9_]*",c={className:"char",begin:"\\$.{1}"},d={className:"symbol",begin:"#"+a.UNDERSCORE_IDENT_RE};return{aliases:["st"],keywords:"self super nil true false thisContext",contains:[a.COMMENT('"','"'),a.APOS_STRING_MODE,{className:"class",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{className:"method",begin:b+":",relevance:0},a.C_NUMBER_MODE,d,c,{className:"localvars",begin:"\\|[ ]*"+b+"([ ]+"+b+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+b}]},{className:"array",begin:"\\#\\(",end:"\\)",contains:[a.APOS_STRING_MODE,c,a.C_NUMBER_MODE,d]}]}}),a.registerLanguage("sml",function(a){return{aliases:["ml"],keywords:{keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,lexemes:"[a-z_]\\w*!?",contains:[{className:"literal",begin:"\\[(\\|\\|)?\\]|\\(\\)"},a.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"tag",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},a.inherit(a.APOS_STRING_MODE,{className:"char",relevance:0}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}),a.registerLanguage("sqf",function(a){var b=["!","-","+","!=","%","&&","*","/","=","==",">",">=","<","<=","or","plus","^",":",">>","abs","accTime","acos","action","actionKeys","actionKeysImages","actionKeysNames","actionKeysNamesArray","actionName","activateAddons","activatedAddons","activateKey","addAction","addBackpack","addBackpackCargo","addBackpackCargoGlobal","addBackpackGlobal","addCamShake","addCuratorAddons","addCuratorCameraArea","addCuratorEditableObjects","addCuratorEditingArea","addCuratorPoints","addEditorObject","addEventHandler","addGoggles","addGroupIcon","addHandgunItem","addHeadgear","addItem","addItemCargo","addItemCargoGlobal","addItemPool","addItemToBackpack","addItemToUniform","addItemToVest","addLiveStats","addMagazine","addMagazine array","addMagazineAmmoCargo","addMagazineCargo","addMagazineCargoGlobal","addMagazineGlobal","addMagazinePool","addMagazines","addMagazineTurret","addMenu","addMenuItem","addMissionEventHandler","addMPEventHandler","addMusicEventHandler","addPrimaryWeaponItem","addPublicVariableEventHandler","addRating","addResources","addScore","addScoreSide","addSecondaryWeaponItem","addSwitchableUnit","addTeamMember","addToRemainsCollector","addUniform","addVehicle","addVest","addWaypoint","addWeapon","addWeaponCargo","addWeaponCargoGlobal","addWeaponGlobal","addWeaponPool","addWeaponTurret","agent","agents","AGLToASL","aimedAtTarget","aimPos","airDensityRTD","airportSide","AISFinishHeal","alive","allControls","allCurators","allDead","allDeadMen","allDisplays","allGroups","allMapMarkers","allMines","allMissionObjects","allow3DMode","allowCrewInImmobile","allowCuratorLogicIgnoreAreas","allowDamage","allowDammage","allowFileOperations","allowFleeing","allowGetIn","allPlayers","allSites","allTurrets","allUnits","allUnitsUAV","allVariables","ammo","and","animate","animateDoor","animationPhase","animationState","append","armoryPoints","arrayIntersect","asin","ASLToAGL","ASLToATL","assert","assignAsCargo","assignAsCargoIndex","assignAsCommander","assignAsDriver","assignAsGunner","assignAsTurret","assignCurator","assignedCargo","assignedCommander","assignedDriver","assignedGunner","assignedItems","assignedTarget","assignedTeam","assignedVehicle","assignedVehicleRole","assignItem","assignTeam","assignToAirport","atan","atan2","atg","ATLToASL","attachedObject","attachedObjects","attachedTo","attachObject","attachTo","attackEnabled","backpack","backpackCargo","backpackContainer","backpackItems","backpackMagazines","backpackSpaceFor","behaviour","benchmark","binocular","blufor","boundingBox","boundingBoxReal","boundingCenter","breakOut","breakTo","briefingName","buildingExit","buildingPos","buttonAction","buttonSetAction","cadetMode","call","callExtension","camCommand","camCommit","camCommitPrepared","camCommitted","camConstuctionSetParams","camCreate","camDestroy","cameraEffect","cameraEffectEnableHUD","cameraInterest","cameraOn","cameraView","campaignConfigFile","camPreload","camPreloaded","camPrepareBank","camPrepareDir","camPrepareDive","camPrepareFocus","camPrepareFov","camPrepareFovRange","camPreparePos","camPrepareRelPos","camPrepareTarget","camSetBank","camSetDir","camSetDive","camSetFocus","camSetFov","camSetFovRange","camSetPos","camSetRelPos","camSetTarget","camTarget","camUseNVG","canAdd","canAddItemToBackpack","canAddItemToUniform","canAddItemToVest","cancelSimpleTaskDestination","canFire","canMove","canSlingLoad","canStand","canUnloadInCombat","captive","captiveNum","case","catch","cbChecked","cbSetChecked","ceil","cheatsEnabled","checkAIFeature","civilian","className","clearAllItemsFromBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearGroupIcons","clearItemCargo","clearItemCargoGlobal","clearItemPool","clearMagazineCargo","clearMagazineCargoGlobal","clearMagazinePool","clearOverlay","clearRadio","clearWeaponCargo","clearWeaponCargoGlobal","clearWeaponPool","closeDialog","closeDisplay","closeOverlay","collapseObjectTree","combatMode","commandArtilleryFire","commandChat","commander","commandFire","commandFollow","commandFSM","commandGetOut","commandingMenu","commandMove","commandRadio","commandStop","commandTarget","commandWatch","comment","commitOverlay","compile","compileFinal","completedFSM","composeText","configClasses","configFile","configHierarchy","configName","configProperties","configSourceMod","configSourceModList","connectTerminalToUAV","controlNull","controlsGroupCtrl","copyFromClipboard","copyToClipboard","copyWaypoints","cos","count","countEnemy","countFriendly","countSide","countType","countUnknown","createAgent","createCenter","createDialog","createDiaryLink","createDiaryRecord","createDiarySubject","createDisplay","createGearDialog","createGroup","createGuardedPoint","createLocation","createMarker","createMarkerLocal","createMenu","createMine","createMissionDisplay","createSimpleTask","createSite","createSoundSource","createTask","createTeam","createTrigger","createUnit","createUnit array","createVehicle","createVehicle array","createVehicleCrew","createVehicleLocal","crew","ctrlActivate","ctrlAddEventHandler","ctrlAutoScrollDelay","ctrlAutoScrollRewind","ctrlAutoScrollSpeed","ctrlChecked","ctrlClassName","ctrlCommit","ctrlCommitted","ctrlCreate","ctrlDelete","ctrlEnable","ctrlEnabled","ctrlFade","ctrlHTMLLoaded","ctrlIDC","ctrlIDD","ctrlMapAnimAdd","ctrlMapAnimClear","ctrlMapAnimCommit","ctrlMapAnimDone","ctrlMapCursor","ctrlMapMouseOver","ctrlMapScale","ctrlMapScreenToWorld","ctrlMapWorldToScreen","ctrlModel","ctrlModelDirAndUp","ctrlModelScale","ctrlParent","ctrlPosition","ctrlRemoveAllEventHandlers","ctrlRemoveEventHandler","ctrlScale","ctrlSetActiveColor","ctrlSetAutoScrollDelay","ctrlSetAutoScrollRewind","ctrlSetAutoScrollSpeed","ctrlSetBackgroundColor","ctrlSetChecked","ctrlSetEventHandler","ctrlSetFade","ctrlSetFocus","ctrlSetFont","ctrlSetFontH1","ctrlSetFontH1B","ctrlSetFontH2","ctrlSetFontH2B","ctrlSetFontH3","ctrlSetFontH3B","ctrlSetFontH4","ctrlSetFontH4B","ctrlSetFontH5","ctrlSetFontH5B","ctrlSetFontH6","ctrlSetFontH6B","ctrlSetFontHeight","ctrlSetFontHeightH1","ctrlSetFontHeightH2","ctrlSetFontHeightH3","ctrlSetFontHeightH4","ctrlSetFontHeightH5","ctrlSetFontHeightH6","ctrlSetFontP","ctrlSetFontPB","ctrlSetForegroundColor","ctrlSetModel","ctrlSetModelDirAndUp","ctrlSetModelScale","ctrlSetPosition","ctrlSetScale","ctrlSetStructuredText","ctrlSetText","ctrlSetTextColor","ctrlSetTooltip","ctrlSetTooltipColorBox","ctrlSetTooltipColorShade","ctrlSetTooltipColorText","ctrlShow","ctrlShown","ctrlText","ctrlTextHeight","ctrlType","ctrlVisible","curatorAddons","curatorCamera","curatorCameraArea","curatorCameraAreaCeiling","curatorCoef","curatorEditableObjects","curatorEditingArea","curatorEditingAreaType","curatorMouseOver","curatorPoints","curatorRegisteredObjects","curatorSelected","curatorWaypointCost","currentChannel","currentCommand","currentMagazine","currentMagazineDetail","currentMagazineDetailTurret","currentMagazineTurret","currentMuzzle","currentNamespace","currentTask","currentTasks","currentThrowable","currentVisionMode","currentWaypoint","currentWeapon","currentWeaponMode","currentWeaponTurret","currentZeroing","cursorTarget","customChat","customRadio","cutFadeOut","cutObj","cutRsc","cutText","damage","date","dateToNumber","daytime","deActivateKey","debriefingText","debugFSM","debugLog","default","deg","deleteAt","deleteCenter","deleteCollection","deleteEditorObject","deleteGroup","deleteIdentity","deleteLocation","deleteMarker","deleteMarkerLocal","deleteRange","deleteResources","deleteSite","deleteStatus","deleteTeam","deleteVehicle","deleteVehicleCrew","deleteWaypoint","detach","detectedMines","diag activeMissionFSMs","diag activeSQFScripts","diag activeSQSScripts","diag captureFrame","diag captureSlowFrame","diag fps","diag fpsMin","diag frameNo","diag log","diag logSlowFrame","diag tickTime","dialog","diarySubjectExists","didJIP","didJIPOwner","difficulty","difficultyEnabled","difficultyEnabledRTD","direction","directSay","disableAI","disableCollisionWith","disableConversation","disableDebriefingStats","disableSerialization","disableTIEquipment","disableUAVConnectability","disableUserInput","displayAddEventHandler","displayCtrl","displayNull","displayRemoveAllEventHandlers","displayRemoveEventHandler","displaySetEventHandler","dissolveTeam","distance","distance2D","distanceSqr","distributionRegion","do","doArtilleryFire","doFire","doFollow","doFSM","doGetOut","doMove","doorPhase","doStop","doTarget","doWatch","drawArrow","drawEllipse","drawIcon","drawIcon3D","drawLine","drawLine3D","drawLink","drawLocation","drawRectangle","driver","drop","east","echo","editObject","editorSetEventHandler","effectiveCommander","else","emptyPositions","enableAI","enableAIFeature","enableAttack","enableCamShake","enableCaustics","enableCollisionWith","enableCopilot","enableDebriefingStats","enableDiagLegend","enableEndDialog","enableEngineArtillery","enableEnvironment","enableFatigue","enableGunLights","enableIRLasers","enableMimics","enablePersonTurret","enableRadio","enableReload","enableRopeAttach","enableSatNormalOnDetail","enableSaving","enableSentences","enableSimulation","enableSimulationGlobal","enableTeamSwitch","enableUAVConnectability","enableUAVWaypoints","endLoadingScreen","endMission","engineOn","enginesIsOnRTD","enginesRpmRTD","enginesTorqueRTD","entities","estimatedEndServerTime","estimatedTimeLeft","evalObjectArgument","everyBackpack","everyContainer","exec","execEditorScript","execFSM","execVM","exit","exitWith","exp","expectedDestination","eyeDirection","eyePos","face","faction","fadeMusic","fadeRadio","fadeSound","fadeSpeech","failMission","false","fillWeaponsFromPool","find","findCover","findDisplay","findEditorObject","findEmptyPosition","findEmptyPositionReady","findNearestEnemy","finishMissionInit","finite","fire","fireAtTarget","firstBackpack","flag","flagOwner","fleeing","floor","flyInHeight","fog","fogForecast","fogParams","for","forceAddUniform","forceEnd","forceMap","forceRespawn","forceSpeed","forceWalk","forceWeaponFire","forceWeatherChange","forEach","forEachMember","forEachMemberAgent","forEachMemberTeam","format","formation","formationDirection","formationLeader","formationMembers","formationPosition","formationTask","formatText","formLeader","freeLook","from","fromEditor","fuel","fullCrew","gearSlotAmmoCount","gearSlotData","getAllHitPointsDamage","getAmmoCargo","getArray","getArtilleryAmmo","getArtilleryComputerSettings","getArtilleryETA","getAssignedCuratorLogic","getAssignedCuratorUnit","getBackpackCargo","getBleedingRemaining","getBurningValue","getCargoIndex","getCenterOfMass","getClientState","getConnectedUAV","getDammage","getDescription","getDir","getDirVisual","getDLCs","getEditorCamera","getEditorMode","getEditorObjectScope","getElevationOffset","getFatigue","getFriend","getFSMVariable","getFuelCargo","getGroupIcon","getGroupIconParams","getGroupIcons","getHideFrom","getHit","getHitIndex","getHitPointDamage","getItemCargo","getMagazineCargo","getMarkerColor","getMarkerPos","getMarkerSize","getMarkerType","getMass","getModelInfo","getNumber","getObjectArgument","getObjectChildren","getObjectDLC","getObjectMaterials","getObjectProxy","getObjectTextures","getObjectType","getObjectViewDistance","getOxygenRemaining","getPersonUsedDLCs","getPlayerChannel","getPlayerUID","getPos","getPosASL","getPosASLVisual","getPosASLW","getPosATL","getPosATLVisual","getPosVisual","getPosWorld","getRepairCargo","getResolution","getShadowDistance","getSlingLoad","getSpeed","getSuppression","getTerrainHeightASL","getText","getVariable","getWeaponCargo","getWPPos","glanceAt","globalChat","globalRadio","goggles","goto","group","groupChat","groupFromNetId","groupIconSelectable","groupIconsVisible","groupId","groupOwner","groupRadio","groupSelectedUnits","groupSelectUnit","grpNull","gunner","gusts","halt","handgunItems","handgunMagazine","handgunWeapon","handsHit","hasInterface","hasWeapon","hcAllGroups","hcGroupParams","hcLeader","hcRemoveAllGroups","hcRemoveGroup","hcSelected","hcSelectGroup","hcSetGroup","hcShowBar","hcShownBar","headgear","hideBody","hideObject","hideObjectGlobal","hint","hintC","hintCadet","hintSilent","hmd","hostMission","htmlLoad","HUDMovementLevels","humidity","if","image","importAllGroups","importance","in","incapacitatedState","independent","inflame","inflamed","inGameUISetEventHandler","inheritsFrom","initAmbientLife","inputAction","inRangeOfArtillery","insertEditorObject","intersect","isAbleToBreathe","isAgent","isArray","isAutoHoverOn","isAutonomous","isAutotest","isBleeding","isBurning","isClass","isCollisionLightOn","isCopilotEnabled","isDedicated","isDLCAvailable","isEngineOn","isEqualTo","isFlashlightOn","isFlatEmpty","isForcedWalk","isFormationLeader","isHidden","isInRemainsCollector","isInstructorFigureEnabled","isIRLaserOn","isKeyActive","isKindOf","isLightOn","isLocalized","isManualFire","isMarkedForCollection","isMultiplayer","isNil","isNull","isNumber","isObjectHidden","isObjectRTD","isOnRoad","isPipEnabled","isPlayer","isRealTime","isServer","isShowing3DIcons","isSteamMission","isStreamFriendlyUIEnabled","isText","isTouchingGround","isTurnedOut","isTutHintsEnabled","isUAVConnectable","isUAVConnected","isUniformAllowed","isWalking","isWeaponDeployed","isWeaponRested","itemCargo","items","itemsWithMagazines","join","joinAs","joinAsSilent","joinSilent","joinString","kbAddDatabase","kbAddDatabaseTargets","kbAddTopic","kbHasTopic","kbReact","kbRemoveTopic","kbTell","kbWasSaid","keyImage","keyName","knowsAbout","land","landAt","landResult","language","laserTarget","lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbSelection","lbSetColor","lbSetCurSel","lbSetData","lbSetPicture","lbSetPictureColor","lbSetPictureColorDisabled","lbSetPictureColorSelected","lbSetSelectColor","lbSetSelectColorRight","lbSetSelected","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortByValue","lbText","lbValue","leader","leaderboardDeInit","leaderboardGetRows","leaderboardInit","leaveVehicle","libraryCredits","libraryDisclaimers","lifeState","lightAttachObject","lightDetachObject","lightIsOn","lightnings","limitSpeed","linearConversion","lineBreak","lineIntersects","lineIntersectsObjs","lineIntersectsSurfaces","lineIntersectsWith","linkItem","list","listObjects","ln","lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbText","lnbValue","load","loadAbs","loadBackpack","loadFile","loadGame","loadIdentity","loadMagazine","loadOverlay","loadStatus","loadUniform","loadVest","local","localize","locationNull","locationPosition","lock","lockCameraTo","lockCargo","lockDriver","locked","lockedCargo","lockedDriver","lockedTurret","lockTurret","lockWP","log","logEntities","lookAt","lookAtPos","magazineCargo","magazines","magazinesAllTurrets","magazinesAmmo","magazinesAmmoCargo","magazinesAmmoFull","magazinesDetail","magazinesDetailBackpack","magazinesDetailUniform","magazinesDetailVest","magazinesTurret","magazineTurretAmmo","mapAnimAdd","mapAnimClear","mapAnimCommit","mapAnimDone","mapCenterOnCamera","mapGridPosition","markAsFinishedOnSteam","markerAlpha","markerBrush","markerColor","markerDir","markerPos","markerShape","markerSize","markerText","markerType","max","members","min","mineActive","mineDetectedBy","missionConfigFile","missionName","missionNamespace","missionStart","mod","modelToWorld","modelToWorldVisual","moonIntensity","morale","move","moveInAny","moveInCargo","moveInCommander","moveInDriver","moveInGunner","moveInTurret","moveObjectToEnd","moveOut","moveTime","moveTo","moveToCompleted","moveToFailed","musicVolume","name","name location","nameSound","nearEntities","nearestBuilding","nearestLocation","nearestLocations","nearestLocationWithDubbing","nearestObject","nearestObjects","nearObjects","nearObjectsReady","nearRoads","nearSupplies","nearTargets","needReload","netId","netObjNull","newOverlay","nextMenuItemIndex","nextWeatherChange","nil","nMenuItems","not","numberToDate","objectCurators","objectFromNetId","objectParent","objNull","objStatus","onBriefingGroup","onBriefingNotes","onBriefingPlan","onBriefingTeamSwitch","onCommandModeChanged","onDoubleClick","onEachFrame","onGroupIconClick","onGroupIconOverEnter","onGroupIconOverLeave","onHCGroupSelectionChanged","onMapSingleClick","onPlayerConnected","onPlayerDisconnected","onPreloadFinished","onPreloadStarted","onShowNewObject","onTeamSwitch","openCuratorInterface","openMap","openYoutubeVideo","opfor","or","orderGetIn","overcast","overcastForecast","owner","param","params","parseNumber","parseText","parsingNamespace","particlesQuality","pi","pickWeaponPool","pitch","playableSlotsNumber","playableUnits","playAction","playActionNow","player","playerRespawnTime","playerSide","playersNumber","playGesture","playMission","playMove","playMoveNow","playMusic","playScriptedMission","playSound","playSound3D","position","positionCameraToWorld","posScreenToWorld","posWorldToScreen","ppEffectAdjust","ppEffectCommit","ppEffectCommitted","ppEffectCreate","ppEffectDestroy","ppEffectEnable","ppEffectForceInNVG","precision","preloadCamera","preloadObject","preloadSound","preloadTitleObj","preloadTitleRsc","preprocessFile","preprocessFileLineNumbers","primaryWeapon","primaryWeaponItems","primaryWeaponMagazine","priority","private","processDiaryLink","productVersion","profileName","profileNamespace","profileNameSteam","progressLoadingScreen","progressPosition","progressSetPosition","publicVariable","publicVariableClient","publicVariableServer","pushBack","putWeaponPool","queryItemsPool","queryMagazinePool","queryWeaponPool","rad","radioChannelAdd","radioChannelCreate","radioChannelRemove","radioChannelSetCallSign","radioChannelSetLabel","radioVolume","rain","rainbow","random","rank","rankId","rating","rectangular","registeredTasks","registerTask","reload","reloadEnabled","remoteControl","remoteExec","remoteExecCall","removeAction","removeAllActions","removeAllAssignedItems","removeAllContainers","removeAllCuratorAddons","removeAllCuratorCameraAreas","removeAllCuratorEditingAreas","removeAllEventHandlers","removeAllHandgunItems","removeAllItems","removeAllItemsWithMagazines","removeAllMissionEventHandlers","removeAllMPEventHandlers","removeAllMusicEventHandlers","removeAllPrimaryWeaponItems","removeAllWeapons","removeBackpack","removeBackpackGlobal","removeCuratorAddons","removeCuratorCameraArea","removeCuratorEditableObjects","removeCuratorEditingArea","removeDrawIcon","removeDrawLinks","removeEventHandler","removeFromRemainsCollector","removeGoggles","removeGroupIcon","removeHandgunItem","removeHeadgear","removeItem","removeItemFromBackpack","removeItemFromUniform","removeItemFromVest","removeItems","removeMagazine","removeMagazineGlobal","removeMagazines","removeMagazinesTurret","removeMagazineTurret","removeMenuItem","removeMissionEventHandler","removeMPEventHandler","removeMusicEventHandler","removePrimaryWeaponItem","removeSecondaryWeaponItem","removeSimpleTask","removeSwitchableUnit","removeTeamMember","removeUniform","removeVest","removeWeapon","removeWeaponGlobal","removeWeaponTurret","requiredVersion","resetCamShake","resetSubgroupDirection","resistance","resize","resources","respawnVehicle","restartEditorCamera","reveal","revealMine","reverse","reversedMouseY","roadsConnectedTo","roleDescription","ropeAttachedObjects","ropeAttachedTo","ropeAttachEnabled","ropeAttachTo","ropeCreate","ropeCut","ropeEndPosition","ropeLength","ropes","ropeUnwind","ropeUnwound","rotorsForcesRTD","rotorsRpmRTD","round","runInitScript","safeZoneH","safeZoneW","safeZoneWAbs","safeZoneX","safeZoneXAbs","safeZoneY","saveGame","saveIdentity","saveJoysticks","saveOverlay","saveProfileNamespace","saveStatus","saveVar","savingEnabled","say","say2D","say3D","scopeName","score","scoreSide","screenToWorld","scriptDone","scriptName","scriptNull","scudState","secondaryWeapon","secondaryWeaponItems","secondaryWeaponMagazine","select","selectBestPlaces","selectDiarySubject","selectedEditorObjects","selectEditorObject","selectionPosition","selectLeader","selectNoPlayer","selectPlayer","selectWeapon","selectWeaponTurret","sendAUMessage","sendSimpleCommand","sendTask","sendTaskResult","sendUDPMessage","serverCommand","serverCommandAvailable","serverCommandExecutable","serverName","serverTime","set","setAccTime","setAirportSide","setAmmo","setAmmoCargo","setAperture","setApertureNew","setArmoryPoints","setAttributes","setAutonomous","setBehaviour","setBleedingRemaining","setCameraInterest","setCamShakeDefParams","setCamShakeParams","setCamUseTi","setCaptive","setCenterOfMass","setCollisionLight","setCombatMode","setCompassOscillation","setCuratorCameraAreaCeiling","setCuratorCoef","setCuratorEditingAreaType","setCuratorWaypointCost","setCurrentChannel","setCurrentTask","setCurrentWaypoint","setDamage","setDammage","setDate","setDebriefingText","setDefaultCamera","setDestination","setDetailMapBlendPars","setDir","setDirection","setDrawIcon","setDropInterval","setEditorMode","setEditorObjectScope","setEffectCondition","setFace","setFaceAnimation","setFatigue","setFlagOwner","setFlagSide","setFlagTexture","setFog","setFog array","setFormation","setFormationTask","setFormDir","setFriend","setFromEditor","setFSMVariable","setFuel","setFuelCargo","setGroupIcon","setGroupIconParams","setGroupIconsSelectable","setGroupIconsVisible","setGroupId","setGroupIdGlobal","setGroupOwner","setGusts","setHideBehind","setHit","setHitIndex","setHitPointDamage","setHorizonParallaxCoef","setHUDMovementLevels","setIdentity","setImportance","setLeader","setLightAmbient","setLightAttenuation","setLightBrightness","setLightColor","setLightDayLight","setLightFlareMaxDistance","setLightFlareSize","setLightIntensity","setLightnings","setLightUseFlare","setLocalWindParams","setMagazineTurretAmmo","setMarkerAlpha","setMarkerAlphaLocal","setMarkerBrush","setMarkerBrushLocal","setMarkerColor","setMarkerColorLocal","setMarkerDir","setMarkerDirLocal","setMarkerPos","setMarkerPosLocal","setMarkerShape","setMarkerShapeLocal","setMarkerSize","setMarkerSizeLocal","setMarkerText","setMarkerTextLocal","setMarkerType","setMarkerTypeLocal","setMass","setMimic","setMousePosition","setMusicEffect","setMusicEventHandler","setName","setNameSound","setObjectArguments","setObjectMaterial","setObjectProxy","setObjectTexture","setObjectTextureGlobal","setObjectViewDistance","setOvercast","setOwner","setOxygenRemaining","setParticleCircle","setParticleClass","setParticleFire","setParticleParams","setParticleRandom","setPilotLight","setPiPEffect","setPitch","setPlayable","setPlayerRespawnTime","setPos","setPosASL","setPosASL2","setPosASLW","setPosATL","setPosition","setPosWorld","setRadioMsg","setRain","setRainbow","setRandomLip","setRank","setRectangular","setRepairCargo","setShadowDistance","setSide","setSimpleTaskDescription","setSimpleTaskDestination","setSimpleTaskTarget","setSimulWeatherLayers","setSize","setSkill","setSkill array","setSlingLoad","setSoundEffect","setSpeaker","setSpeech","setSpeedMode","setStatValue","setSuppression","setSystemOfUnits","setTargetAge","setTaskResult","setTaskState","setTerrainGrid","setText","setTimeMultiplier","setTitleEffect","setTriggerActivation","setTriggerArea","setTriggerStatements","setTriggerText","setTriggerTimeout","setTriggerType","setType","setUnconscious","setUnitAbility","setUnitPos","setUnitPosWeak","setUnitRank","setUnitRecoilCoefficient","setUnloadInCombat","setUserActionText","setVariable","setVectorDir","setVectorDirAndUp","setVectorUp","setVehicleAmmo","setVehicleAmmoDef","setVehicleArmor","setVehicleId","setVehicleLock","setVehiclePosition","setVehicleTiPars","setVehicleVarName","setVelocity","setVelocityTransformation","setViewDistance","setVisibleIfTreeCollapsed","setWaves","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointLoiterRadius","setWaypointLoiterType","setWaypointName","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","setWeaponReloadingTime","setWind","setWindDir","setWindForce","setWindStr","setWPPos","show3DIcons","showChat","showCinemaBorder","showCommandingMenu","showCompass","showCuratorCompass","showGPS","showHUD","showLegend","showMap","shownArtilleryComputer","shownChat","shownCompass","shownCuratorCompass","showNewEditorObject","shownGPS","shownHUD","shownMap","shownPad","shownRadio","shownUAVFeed","shownWarrant","shownWatch","showPad","showRadio","showSubtitles","showUAVFeed","showWarrant","showWatch","showWaypoint","side","sideChat","sideEnemy","sideFriendly","sideLogic","sideRadio","sideUnknown","simpleTasks","simulationEnabled","simulCloudDensity","simulCloudOcclusion","simulInClouds","simulWeatherSync","sin","size","sizeOf","skill","skillFinal","skipTime","sleep","sliderPosition","sliderRange","sliderSetPosition","sliderSetRange","sliderSetSpeed","sliderSpeed","slingLoadAssistantShown","soldierMagazines","someAmmo","sort","soundVolume","spawn","speaker","speed","speedMode","splitString","sqrt","squadParams","stance","startLoadingScreen","step","stop","stopped","str","sunOrMoon","supportInfo","suppressFor","surfaceIsWater","surfaceNormal","surfaceType","swimInDepth","switch","switchableUnits","switchAction","switchCamera","switchGesture","switchLight","switchMove","synchronizedObjects","synchronizedTriggers","synchronizedWaypoints","synchronizeObjectsAdd","synchronizeObjectsRemove","synchronizeTrigger","synchronizeWaypoint","synchronizeWaypoint trigger","systemChat","systemOfUnits","tan","targetKnowledge","targetsAggregate","targetsQuery","taskChildren","taskCompleted","taskDescription","taskDestination","taskHint","taskNull","taskParent","taskResult","taskState","teamMember","teamMemberNull","teamName","teams","teamSwitch","teamSwitchEnabled","teamType","terminate","terrainIntersect","terrainIntersectASL","text","text location","textLog","textLogFormat","tg","then","throw","time","timeMultiplier","titleCut","titleFadeOut","titleObj","titleRsc","titleText","to","toArray","toLower","toString","toUpper","triggerActivated","triggerActivation","triggerArea","triggerAttachedVehicle","triggerAttachObject","triggerAttachVehicle","triggerStatements","triggerText","triggerTimeout","triggerTimeoutCurrent","triggerType","true","try","turretLocal","turretOwner","turretUnit","tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetPicture","tvSetPictureColor","tvSetTooltip","tvSetValue","tvSort","tvSortByValue","tvText","tvValue","type","typeName","typeOf","UAVControl","uiNamespace","uiSleep","unassignCurator","unassignItem","unassignTeam","unassignVehicle","underwater","uniform","uniformContainer","uniformItems","uniformMagazines","unitAddons","unitBackpack","unitPos","unitReady","unitRecoilCoefficient","units","unitsBelowHeight","unlinkItem","unlockAchievement","unregisterTask","updateDrawIcon","updateMenuItem","updateObjectTree","useAudioTimeForMoves","vectorAdd","vectorCos","vectorCrossProduct","vectorDiff","vectorDir","vectorDirVisual","vectorDistance","vectorDistanceSqr","vectorDotProduct","vectorFromTo","vectorMagnitude","vectorMagnitudeSqr","vectorMultiply","vectorNormalized","vectorUp","vectorUpVisual","vehicle","vehicleChat","vehicleRadio","vehicles","vehicleVarName","velocity","velocityModelSpace","verifySignature","vest","vestContainer","vestItems","vestMagazines","viewDistance","visibleCompass","visibleGPS","visibleMap","visiblePosition","visiblePositionASL","visibleWatch","waitUntil","waves","waypointAttachedObject","waypointAttachedVehicle","waypointAttachObject","waypointAttachVehicle","waypointBehaviour","waypointCombatMode","waypointCompletionRadius","waypointDescription","waypointFormation","waypointHousePosition","waypointLoiterRadius","waypointLoiterType","waypointName","waypointPosition","waypoints","waypointScript","waypointsEnabledUAV","waypointShow","waypointSpeed","waypointStatements","waypointTimeout","waypointTimeoutCurrent","waypointType","waypointVisible","weaponAccessories","weaponCargo","weaponDirection","weaponLowered","weapons","weaponsItems","weaponsItemsCargo","weaponState","weaponsTurret","weightRTD","west","WFSideText","while","wind","windDir","windStr","wingsForcesRTD","with","worldName","worldSize","worldToModel","worldToModelVisual","worldToScreen"],c=["case","catch","default","do","else","exit","exitWith|5","for","forEach","from","if","switch","then","throw","to","try","while","with"],d=["!","-","+","!=","%","&&","*","/","=","==",">",">=","<","<=","^",":",">>"],e=["_forEachIndex|10","_this|10","_x|10"],f=["true","false","nil"],g=b.filter(function(a){ +return-1==c.indexOf(a)&&-1==f.indexOf(a)&&-1==d.indexOf(a)});g=g.concat(e);var h={className:"string",relevance:0,variants:[{begin:'"',end:'"',contains:[{begin:'""'}]},{begin:"'",end:"'",contains:[{begin:"''"}]}]},i={className:"number",begin:a.NUMBER_RE,relevance:0},j={className:"string",variants:[a.QUOTE_STRING_MODE,{begin:"'\\\\?.",end:"'",illegal:"."}]},k={className:"preprocessor",begin:"#",end:"$",keywords:"if else elif endif define undef warning error line pragma ifdef ifndef",contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",contains:[j,{className:"string",begin:"<",end:">",illegal:"\\n"}]},j,i,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]};return{aliases:["sqf"],case_insensitive:!0,keywords:{keyword:c.join(" "),built_in:g.join(" "),literal:f.join(" ")},contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,i,h,k]}}),a.registerLanguage("sql",function(a){var b=a.COMMENT("--","$");return{case_insensitive:!0,illegal:/[<>{}*]/,contains:[{className:"operator",beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke",end:/;/,endsWithParent:!0,keywords:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes c cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle d data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration e each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract f failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function g general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http i id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists k keep keep_duplicates key keys kill l language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim m main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex n name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding p package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime t table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},contains:[{className:"string",begin:"'",end:"'",contains:[a.BACKSLASH_ESCAPE,{begin:"''"}]},{className:"string",begin:'"',end:'"',contains:[a.BACKSLASH_ESCAPE,{begin:'""'}]},{className:"string",begin:"`",end:"`",contains:[a.BACKSLASH_ESCAPE]},a.C_NUMBER_MODE,a.C_BLOCK_COMMENT_MODE,b]},a.C_BLOCK_COMMENT_MODE,b]}}),a.registerLanguage("stata",function(a){return{aliases:["do","ado"],case_insensitive:!0,keywords:"if else in foreach for forv forva forval forvalu forvalue forvalues by bys bysort xi quietly qui capture about ac ac_7 acprplot acprplot_7 adjust ado adopath adoupdate alpha ameans an ano anov anova anova_estat anova_terms anovadef aorder ap app appe appen append arch arch_dr arch_estat arch_p archlm areg areg_p args arima arima_dr arima_estat arima_p as asmprobit asmprobit_estat asmprobit_lf asmprobit_mfx__dlg asmprobit_p ass asse asser assert avplot avplot_7 avplots avplots_7 bcskew0 bgodfrey binreg bip0_lf biplot bipp_lf bipr_lf bipr_p biprobit bitest bitesti bitowt blogit bmemsize boot bootsamp bootstrap bootstrap_8 boxco_l boxco_p boxcox boxcox_6 boxcox_p bprobit br break brier bro brow brows browse brr brrstat bs bs_7 bsampl_w bsample bsample_7 bsqreg bstat bstat_7 bstat_8 bstrap bstrap_7 ca ca_estat ca_p cabiplot camat canon canon_8 canon_8_p canon_estat canon_p cap caprojection capt captu captur capture cat cc cchart cchart_7 cci cd censobs_table centile cf char chdir checkdlgfiles checkestimationsample checkhlpfiles checksum chelp ci cii cl class classutil clear cli clis clist clo clog clog_lf clog_p clogi clogi_sw clogit clogit_lf clogit_p clogitp clogl_sw cloglog clonevar clslistarray cluster cluster_measures cluster_stop cluster_tree cluster_tree_8 clustermat cmdlog cnr cnre cnreg cnreg_p cnreg_sw cnsreg codebook collaps4 collapse colormult_nb colormult_nw compare compress conf confi confir confirm conren cons const constr constra constrai constrain constraint continue contract copy copyright copysource cor corc corr corr2data corr_anti corr_kmo corr_smc corre correl correla correlat correlate corrgram cou coun count cox cox_p cox_sw coxbase coxhaz coxvar cprplot cprplot_7 crc cret cretu cretur creturn cross cs cscript cscript_log csi ct ct_is ctset ctst_5 ctst_st cttost cumsp cumsp_7 cumul cusum cusum_7 cutil d datasig datasign datasigna datasignat datasignatu datasignatur datasignature datetof db dbeta de dec deco decod decode deff des desc descr descri describ describe destring dfbeta dfgls dfuller di di_g dir dirstats dis discard disp disp_res disp_s displ displa display distinct do doe doed doedi doedit dotplot dotplot_7 dprobit drawnorm drop ds ds_util dstdize duplicates durbina dwstat dydx e ed edi edit egen eivreg emdef en enc enco encod encode eq erase ereg ereg_lf ereg_p ereg_sw ereghet ereghet_glf ereghet_glf_sh ereghet_gp ereghet_ilf ereghet_ilf_sh ereghet_ip eret eretu eretur ereturn err erro error est est_cfexist est_cfname est_clickable est_expand est_hold est_table est_unhold est_unholdok estat estat_default estat_summ estat_vce_only esti estimates etodow etof etomdy ex exi exit expand expandcl fac fact facto factor factor_estat factor_p factor_pca_rotated factor_rotate factormat fcast fcast_compute fcast_graph fdades fdadesc fdadescr fdadescri fdadescrib fdadescribe fdasav fdasave fdause fh_st file open file read file close file filefilter fillin find_hlp_file findfile findit findit_7 fit fl fli flis flist for5_0 form forma format fpredict frac_154 frac_adj frac_chk frac_cox frac_ddp frac_dis frac_dv frac_in frac_mun frac_pp frac_pq frac_pv frac_wgt frac_xo fracgen fracplot fracplot_7 fracpoly fracpred fron_ex fron_hn fron_p fron_tn fron_tn2 frontier ftodate ftoe ftomdy ftowdate g gamhet_glf gamhet_gp gamhet_ilf gamhet_ip gamma gamma_d2 gamma_p gamma_sw gammahet gdi_hexagon gdi_spokes ge gen gene gener genera generat generate genrank genstd genvmean gettoken gl gladder gladder_7 glim_l01 glim_l02 glim_l03 glim_l04 glim_l05 glim_l06 glim_l07 glim_l08 glim_l09 glim_l10 glim_l11 glim_l12 glim_lf glim_mu glim_nw1 glim_nw2 glim_nw3 glim_p glim_v1 glim_v2 glim_v3 glim_v4 glim_v5 glim_v6 glim_v7 glm glm_6 glm_p glm_sw glmpred glo glob globa global glogit glogit_8 glogit_p gmeans gnbre_lf gnbreg gnbreg_5 gnbreg_p gomp_lf gompe_sw gomper_p gompertz gompertzhet gomphet_glf gomphet_glf_sh gomphet_gp gomphet_ilf gomphet_ilf_sh gomphet_ip gphdot gphpen gphprint gprefs gprobi_p gprobit gprobit_8 gr gr7 gr_copy gr_current gr_db gr_describe gr_dir gr_draw gr_draw_replay gr_drop gr_edit gr_editviewopts gr_example gr_example2 gr_export gr_print gr_qscheme gr_query gr_read gr_rename gr_replay gr_save gr_set gr_setscheme gr_table gr_undo gr_use graph graph7 grebar greigen greigen_7 greigen_8 grmeanby grmeanby_7 gs_fileinfo gs_filetype gs_graphinfo gs_stat gsort gwood h hadimvo hareg hausman haver he heck_d2 heckma_p heckman heckp_lf heckpr_p heckprob hel help hereg hetpr_lf hetpr_p hetprob hettest hexdump hilite hist hist_7 histogram hlogit hlu hmeans hotel hotelling hprobit hreg hsearch icd9 icd9_ff icd9p iis impute imtest inbase include inf infi infil infile infix inp inpu input ins insheet insp inspe inspec inspect integ inten intreg intreg_7 intreg_p intrg2_ll intrg_ll intrg_ll2 ipolate iqreg ir irf irf_create irfm iri is_svy is_svysum isid istdize ivprob_1_lf ivprob_lf ivprobit ivprobit_p ivreg ivreg_footnote ivtob_1_lf ivtob_lf ivtobit ivtobit_p jackknife jacknife jknife jknife_6 jknife_8 jkstat joinby kalarma1 kap kap_3 kapmeier kappa kapwgt kdensity kdensity_7 keep ksm ksmirnov ktau kwallis l la lab labe label labelbook ladder levels levelsof leverage lfit lfit_p li lincom line linktest lis list lloghet_glf lloghet_glf_sh lloghet_gp lloghet_ilf lloghet_ilf_sh lloghet_ip llogi_sw llogis_p llogist llogistic llogistichet lnorm_lf lnorm_sw lnorma_p lnormal lnormalhet lnormhet_glf lnormhet_glf_sh lnormhet_gp lnormhet_ilf lnormhet_ilf_sh lnormhet_ip lnskew0 loadingplot loc loca local log logi logis_lf logistic logistic_p logit logit_estat logit_p loglogs logrank loneway lookfor lookup lowess lowess_7 lpredict lrecomp lroc lroc_7 lrtest ls lsens lsens_7 lsens_x lstat ltable ltable_7 ltriang lv lvr2plot lvr2plot_7 m ma mac macr macro makecns man manova manova_estat manova_p manovatest mantel mark markin markout marksample mat mat_capp mat_order mat_put_rr mat_rapp mata mata_clear mata_describe mata_drop mata_matdescribe mata_matsave mata_matuse mata_memory mata_mlib mata_mosave mata_rename mata_which matalabel matcproc matlist matname matr matri matrix matrix_input__dlg matstrik mcc mcci md0_ md1_ md1debug_ md2_ md2debug_ mds mds_estat mds_p mdsconfig mdslong mdsmat mdsshepard mdytoe mdytof me_derd mean means median memory memsize meqparse mer merg merge mfp mfx mhelp mhodds minbound mixed_ll mixed_ll_reparm mkassert mkdir mkmat mkspline ml ml_5 ml_adjs ml_bhhhs ml_c_d ml_check ml_clear ml_cnt ml_debug ml_defd ml_e0 ml_e0_bfgs ml_e0_cycle ml_e0_dfp ml_e0i ml_e1 ml_e1_bfgs ml_e1_bhhh ml_e1_cycle ml_e1_dfp ml_e2 ml_e2_cycle ml_ebfg0 ml_ebfr0 ml_ebfr1 ml_ebh0q ml_ebhh0 ml_ebhr0 ml_ebr0i ml_ecr0i ml_edfp0 ml_edfr0 ml_edfr1 ml_edr0i ml_eds ml_eer0i ml_egr0i ml_elf ml_elf_bfgs ml_elf_bhhh ml_elf_cycle ml_elf_dfp ml_elfi ml_elfs ml_enr0i ml_enrr0 ml_erdu0 ml_erdu0_bfgs ml_erdu0_bhhh ml_erdu0_bhhhq ml_erdu0_cycle ml_erdu0_dfp ml_erdu0_nrbfgs ml_exde ml_footnote ml_geqnr ml_grad0 ml_graph ml_hbhhh ml_hd0 ml_hold ml_init ml_inv ml_log ml_max ml_mlout ml_mlout_8 ml_model ml_nb0 ml_opt ml_p ml_plot ml_query ml_rdgrd ml_repor ml_s_e ml_score ml_searc ml_technique ml_unhold mleval mlf_ mlmatbysum mlmatsum mlog mlogi mlogit mlogit_footnote mlogit_p mlopts mlsum mlvecsum mnl0_ mor more mov move mprobit mprobit_lf mprobit_p mrdu0_ mrdu1_ mvdecode mvencode mvreg mvreg_estat n nbreg nbreg_al nbreg_lf nbreg_p nbreg_sw nestreg net newey newey_7 newey_p news nl nl_7 nl_9 nl_9_p nl_p nl_p_7 nlcom nlcom_p nlexp2 nlexp2_7 nlexp2a nlexp2a_7 nlexp3 nlexp3_7 nlgom3 nlgom3_7 nlgom4 nlgom4_7 nlinit nllog3 nllog3_7 nllog4 nllog4_7 nlog_rd nlogit nlogit_p nlogitgen nlogittree nlpred no nobreak noi nois noisi noisil noisily note notes notes_dlg nptrend numlabel numlist odbc old_ver olo olog ologi ologi_sw ologit ologit_p ologitp on one onew onewa oneway op_colnm op_comp op_diff op_inv op_str opr opro oprob oprob_sw oprobi oprobi_p oprobit oprobitp opts_exclusive order orthog orthpoly ou out outf outfi outfil outfile outs outsh outshe outshee outsheet ovtest pac pac_7 palette parse parse_dissim pause pca pca_8 pca_display pca_estat pca_p pca_rotate pcamat pchart pchart_7 pchi pchi_7 pcorr pctile pentium pergram pergram_7 permute permute_8 personal peto_st pkcollapse pkcross pkequiv pkexamine pkexamine_7 pkshape pksumm pksumm_7 pl plo plot plugin pnorm pnorm_7 poisgof poiss_lf poiss_sw poisso_p poisson poisson_estat post postclose postfile postutil pperron pr prais prais_e prais_e2 prais_p predict predictnl preserve print pro prob probi probit probit_estat probit_p proc_time procoverlay procrustes procrustes_estat procrustes_p profiler prog progr progra program prop proportion prtest prtesti pwcorr pwd q\\s qby qbys qchi qchi_7 qladder qladder_7 qnorm qnorm_7 qqplot qqplot_7 qreg qreg_c qreg_p qreg_sw qu quadchk quantile quantile_7 que quer query range ranksum ratio rchart rchart_7 rcof recast reclink recode reg reg3 reg3_p regdw regr regre regre_p2 regres regres_p regress regress_estat regriv_p remap ren rena renam rename renpfix repeat replace report reshape restore ret retu retur return rm rmdir robvar roccomp roccomp_7 roccomp_8 rocf_lf rocfit rocfit_8 rocgold rocplot rocplot_7 roctab roctab_7 rolling rologit rologit_p rot rota rotat rotate rotatemat rreg rreg_p ru run runtest rvfplot rvfplot_7 rvpplot rvpplot_7 sa safesum sample sampsi sav save savedresults saveold sc sca scal scala scalar scatter scm_mine sco scob_lf scob_p scobi_sw scobit scor score scoreplot scoreplot_help scree screeplot screeplot_help sdtest sdtesti se search separate seperate serrbar serrbar_7 serset set set_defaults sfrancia sh she shel shell shewhart shewhart_7 signestimationsample signrank signtest simul simul_7 simulate simulate_8 sktest sleep slogit slogit_d2 slogit_p smooth snapspan so sor sort spearman spikeplot spikeplot_7 spikeplt spline_x split sqreg sqreg_p sret sretu sretur sreturn ssc st st_ct st_hc st_hcd st_hcd_sh st_is st_issys st_note st_promo st_set st_show st_smpl st_subid stack statsby statsby_8 stbase stci stci_7 stcox stcox_estat stcox_fr stcox_fr_ll stcox_p stcox_sw stcoxkm stcoxkm_7 stcstat stcurv stcurve stcurve_7 stdes stem stepwise stereg stfill stgen stir stjoin stmc stmh stphplot stphplot_7 stphtest stphtest_7 stptime strate strate_7 streg streg_sw streset sts sts_7 stset stsplit stsum sttocc sttoct stvary stweib su suest suest_8 sum summ summa summar summari summariz summarize sunflower sureg survcurv survsum svar svar_p svmat svy svy_disp svy_dreg svy_est svy_est_7 svy_estat svy_get svy_gnbreg_p svy_head svy_header svy_heckman_p svy_heckprob_p svy_intreg_p svy_ivreg_p svy_logistic_p svy_logit_p svy_mlogit_p svy_nbreg_p svy_ologit_p svy_oprobit_p svy_poisson_p svy_probit_p svy_regress_p svy_sub svy_sub_7 svy_x svy_x_7 svy_x_p svydes svydes_8 svygen svygnbreg svyheckman svyheckprob svyintreg svyintreg_7 svyintrg svyivreg svylc svylog_p svylogit svymarkout svymarkout_8 svymean svymlog svymlogit svynbreg svyolog svyologit svyoprob svyoprobit svyopts svypois svypois_7 svypoisson svyprobit svyprobt svyprop svyprop_7 svyratio svyreg svyreg_p svyregress svyset svyset_7 svyset_8 svytab svytab_7 svytest svytotal sw sw_8 swcnreg swcox swereg swilk swlogis swlogit swologit swoprbt swpois swprobit swqreg swtobit swweib symmetry symmi symplot symplot_7 syntax sysdescribe sysdir sysuse szroeter ta tab tab1 tab2 tab_or tabd tabdi tabdis tabdisp tabi table tabodds tabodds_7 tabstat tabu tabul tabula tabulat tabulate te tempfile tempname tempvar tes test testnl testparm teststd tetrachoric time_it timer tis tob tobi tobit tobit_p tobit_sw token tokeni tokeniz tokenize tostring total translate translator transmap treat_ll treatr_p treatreg trim trnb_cons trnb_mean trpoiss_d2 trunc_ll truncr_p truncreg tsappend tset tsfill tsline tsline_ex tsreport tsrevar tsrline tsset tssmooth tsunab ttest ttesti tut_chk tut_wait tutorial tw tware_st two twoway twoway__fpfit_serset twoway__function_gen twoway__histogram_gen twoway__ipoint_serset twoway__ipoints_serset twoway__kdensity_gen twoway__lfit_serset twoway__normgen_gen twoway__pci_serset twoway__qfit_serset twoway__scatteri_serset twoway__sunflower_gen twoway_ksm_serset ty typ type typeof u unab unabbrev unabcmd update us use uselabel var var_mkcompanion var_p varbasic varfcast vargranger varirf varirf_add varirf_cgraph varirf_create varirf_ctable varirf_describe varirf_dir varirf_drop varirf_erase varirf_graph varirf_ograph varirf_rename varirf_set varirf_table varlist varlmar varnorm varsoc varstable varstable_w varstable_w2 varwle vce vec vec_fevd vec_mkphi vec_p vec_p_w vecirf_create veclmar veclmar_w vecnorm vecnorm_w vecrank vecstable verinst vers versi versio version view viewsource vif vwls wdatetof webdescribe webseek webuse weib1_lf weib2_lf weib_lf weib_lf0 weibhet_glf weibhet_glf_sh weibhet_glfa weibhet_glfa_sh weibhet_gp weibhet_ilf weibhet_ilf_sh weibhet_ilfa weibhet_ilfa_sh weibhet_ip weibu_sw weibul_p weibull weibull_c weibull_s weibullhet wh whelp whi which whil while wilc_st wilcoxon win wind windo window winexec wntestb wntestb_7 wntestq xchart xchart_7 xcorr xcorr_7 xi xi_6 xmlsav xmlsave xmluse xpose xsh xshe xshel xshell xt_iis xt_tis xtab_p xtabond xtbin_p xtclog xtcloglog xtcloglog_8 xtcloglog_d2 xtcloglog_pa_p xtcloglog_re_p xtcnt_p xtcorr xtdata xtdes xtfront_p xtfrontier xtgee xtgee_elink xtgee_estat xtgee_makeivar xtgee_p xtgee_plink xtgls xtgls_p xthaus xthausman xtht_p xthtaylor xtile xtint_p xtintreg xtintreg_8 xtintreg_d2 xtintreg_p xtivp_1 xtivp_2 xtivreg xtline xtline_ex xtlogit xtlogit_8 xtlogit_d2 xtlogit_fe_p xtlogit_pa_p xtlogit_re_p xtmixed xtmixed_estat xtmixed_p xtnb_fe xtnb_lf xtnbreg xtnbreg_pa_p xtnbreg_refe_p xtpcse xtpcse_p xtpois xtpoisson xtpoisson_d2 xtpoisson_pa_p xtpoisson_refe_p xtpred xtprobit xtprobit_8 xtprobit_d2 xtprobit_re_p xtps_fe xtps_lf xtps_ren xtps_ren_8 xtrar_p xtrc xtrc_p xtrchh xtrefe_p xtreg xtreg_be xtreg_fe xtreg_ml xtreg_pa_p xtreg_re xtregar xtrere_p xtset xtsf_ll xtsf_llti xtsum xttab xttest0 xttobit xttobit_8 xttobit_p xttrans yx yxview__barlike_draw yxview_area_draw yxview_bar_draw yxview_dot_draw yxview_dropline_draw yxview_function_draw yxview_iarrow_draw yxview_ilabels_draw yxview_normal_draw yxview_pcarrow_draw yxview_pcbarrow_draw yxview_pccapsym_draw yxview_pcscatter_draw yxview_pcspike_draw yxview_rarea_draw yxview_rbar_draw yxview_rbarm_draw yxview_rcap_draw yxview_rcapsym_draw yxview_rconnected_draw yxview_rline_draw yxview_rscatter_draw yxview_rspike_draw yxview_spike_draw yxview_sunflower_draw zap_s zinb zinb_llf zinb_plf zip zip_llf zip_p zip_plf zt_ct_5 zt_hc_5 zt_hcd_5 zt_is_5 zt_iss_5 zt_sho_5 zt_smp_5 ztbase_5 ztcox_5 ztdes_5 ztereg_5 ztfill_5 ztgen_5 ztir_5 ztjoin_5 ztnb ztnb_p ztp ztp_p zts_5 ztset_5 ztspli_5 ztsum_5 zttoct_5 ztvary_5 ztweib_5",contains:[{className:"label",variants:[{begin:"\\$\\{?[a-zA-Z0-9_]+\\}?"},{begin:"`[a-zA-Z0-9_]+'"}]},{className:"string",variants:[{begin:'`"[^\r\n]*?"\''},{begin:'"[^\r\n"]*"'}]},{className:"literal",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\(|$)"}]},a.COMMENT("^[ ]*\\*.*$",!1),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]}}),a.registerLanguage("step21",function(a){var b="[A-Z_][A-Z0-9_.]*",c="END-ISO-10303-21;",d={literal:"",built_in:"",keyword:"HEADER ENDSEC DATA"},e={className:"preprocessor",begin:"ISO-10303-21;",relevance:10},f=[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.COMMENT("/\\*\\*!","\\*/"),a.C_NUMBER_MODE,a.inherit(a.APOS_STRING_MODE,{illegal:null}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"label",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}];return{aliases:["p21","step","stp"],case_insensitive:!0,lexemes:b,keywords:d,contains:[{className:"preprocessor",begin:c,relevance:10},e].concat(f)}}),a.registerLanguage("stylus",function(a){var b={className:"variable",begin:"\\$"+a.IDENT_RE},c={className:"hexcolor",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})",relevance:10},d=["charset","css","debug","extend","font-face","for","import","include","media","mixin","page","warn","while"],e=["after","before","first-letter","first-line","active","first-child","focus","hover","lang","link","visited"],f=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],g="[\\.\\s\\n\\[\\:,]",h=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-variant-ligatures","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"],i=["\\{","\\}","\\?","(\\bReturn\\b)","(\\bEnd\\b)","(\\bend\\b)",";","#\\s","\\*\\s","===\\s","\\|","%"]; +return{aliases:["styl"],case_insensitive:!1,illegal:"("+i.join("|")+")",keywords:"if else for in",contains:[a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,c,{begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"+g,returnBegin:!0,contains:[{className:"class",begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"}]},{begin:"\\#[a-zA-Z][a-zA-Z0-9_-]*"+g,returnBegin:!0,contains:[{className:"id",begin:"\\#[a-zA-Z][a-zA-Z0-9_-]*"}]},{begin:"\\b("+f.join("|")+")"+g,returnBegin:!0,contains:[{className:"tag",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"}]},{className:"pseudo",begin:"&?:?:\\b("+e.join("|")+")"+g},{className:"at_rule",begin:"@("+d.join("|")+")\\b"},b,a.CSS_NUMBER_MODE,a.NUMBER_MODE,{className:"function",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*\\(.*\\)",illegal:"[\\n]",returnBegin:!0,contains:[{className:"title",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"},{className:"params",begin:/\(/,end:/\)/,contains:[c,b,a.APOS_STRING_MODE,a.CSS_NUMBER_MODE,a.NUMBER_MODE,a.QUOTE_STRING_MODE]}]},{className:"attribute",begin:"\\b("+h.reverse().join("|")+")\\b"}]}}),a.registerLanguage("swift",function(a){var b={keyword:"__COLUMN__ __FILE__ __FUNCTION__ __LINE__ as as! as? associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},c={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},d=a.COMMENT("/\\*","\\*/",{contains:["self"]}),e={className:"subst",begin:/\\\(/,end:"\\)",keywords:b,contains:[]},f={className:"number",begin:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",relevance:0},g=a.inherit(a.QUOTE_STRING_MODE,{contains:[e,a.BACKSLASH_ESCAPE]});return e.contains=[f],{keywords:b,contains:[g,a.C_LINE_COMMENT_MODE,d,c,f,{className:"func",beginKeywords:"func",end:"{",excludeEnd:!0,contains:[a.inherit(a.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/,illegal:/\(/}),{className:"generics",begin://,illegal:/>/},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:b,contains:["self",f,g,a.C_BLOCK_COMMENT_MODE,{begin:":"}],illegal:/["']/}],illegal:/\[|%/},{className:"class",beginKeywords:"struct protocol class extension enum",keywords:b,end:"\\{",excludeEnd:!0,contains:[a.inherit(a.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/})]},{className:"preprocessor",begin:"(@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain)"},{beginKeywords:"import",end:/$/,contains:[a.C_LINE_COMMENT_MODE,d]}]}}),a.registerLanguage("tcl",function(a){return{aliases:["tk"],keywords:"after append apply array auto_execok auto_import auto_load auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd chan clock close concat continue dde dict encoding eof error eval exec exit expr fblocked fconfigure fcopy file fileevent filename flush for foreach format gets glob global history http if incr info interp join lappend|10 lassign|10 lindex|10 linsert|10 list llength|10 load lrange|10 lrepeat|10 lreplace|10 lreverse|10 lsearch|10 lset|10 lsort|10 mathfunc mathop memory msgcat namespace open package parray pid pkg::create pkg_mkIndex platform platform::shell proc puts pwd read refchan regexp registry regsub|10 rename return safe scan seek set socket source split string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord tcl_startOfPreviousWord tcl_wordBreakAfter tcl_wordBreakBefore tcltest tclvars tell time tm trace unknown unload unset update uplevel upvar variable vwait while",contains:[a.COMMENT(";[ \\t]*#","$"),a.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"symbol",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",excludeEnd:!0,variants:[{begin:"\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*\\(([a-zA-Z0-9_])*\\)",end:"[^a-zA-Z0-9_\\}\\$]"},{begin:"\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"(\\))?[^a-zA-Z0-9_\\}\\$]"}]},{className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[a.inherit(a.APOS_STRING_MODE,{illegal:null}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null})]},{className:"number",variants:[a.BINARY_NUMBER_MODE,a.C_NUMBER_MODE]}]}}),a.registerLanguage("tex",function(a){var b={className:"command",begin:"\\\\[a-zA-Zа-яА-я]+[\\*]?"},c={className:"command",begin:"\\\\[^a-zA-Zа-яА-я0-9]"},d={className:"special",begin:"[{}\\[\\]\\&#~]",relevance:0};return{contains:[{begin:"\\\\[a-zA-Zа-яА-я]+[\\*]? *= *-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",returnBegin:!0,contains:[b,c,{className:"number",begin:" *=",end:"-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",excludeBegin:!0}],relevance:10},b,c,d,{className:"formula",begin:"\\$\\$",end:"\\$\\$",contains:[b,c,d],relevance:0},{className:"formula",begin:"\\$",end:"\\$",contains:[b,c,d],relevance:0},a.COMMENT("%","$",{relevance:0})]}}),a.registerLanguage("thrift",function(a){var b="bool byte i16 i32 i64 double string binary";return{keywords:{keyword:"namespace const typedef struct enum service exception void oneway set list map required optional",built_in:b,literal:"true false"},contains:[a.QUOTE_STRING_MODE,a.NUMBER_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[a.inherit(a.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",end:">",keywords:b,contains:["self"]}]}}),a.registerLanguage("tp",function(a){var b={className:"number",begin:"[1-9][0-9]*",relevance:0},c={className:"comment",begin:":[^\\]]+"},d={className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER| TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",b,c]},e={className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",b,a.QUOTE_STRING_MODE,c]};return{keywords:{keyword:"ABORT ACC ADJUST AND AP_LD BREAK CALL CNT COL CONDITION CONFIG DA DB DIV DETECT ELSE END ENDFOR ERR_NUM ERROR_PROG FINE FOR GP GUARD INC IF JMP LINEAR_MAX_SPEED LOCK MOD MONITOR OFFSET Offset OR OVERRIDE PAUSE PREG PTH RT_LD RUN SELECT SKIP Skip TA TB TO TOOL_OFFSET Tool_Offset UF UT UFRAME_NUM UTOOL_NUM UNLOCK WAIT X Y Z W P R STRLEN SUBSTR FINDSTR VOFFSET",constant:"ON OFF max_speed LPOS JPOS ENABLE DISABLE START STOP RESET"},contains:[d,e,{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},a.COMMENT("//","[;$]"),a.COMMENT("!","[;$]"),a.COMMENT("--eg:","$"),a.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"'"},a.C_NUMBER_MODE,{className:"variable",begin:"\\$[A-Za-z0-9_]+"}]}}),a.registerLanguage("twig",function(a){var b={className:"params",begin:"\\(",end:"\\)"},c="attribute block constant cycle date dump include max min parent random range source template_from_string",d={className:"function",beginKeywords:c,relevance:0,contains:[b]},e={className:"filter",begin:/\|[A-Za-z_]+:?/,keywords:"abs batch capitalize convert_encoding date date_modify default escape first format join json_encode keys last length lower merge nl2br number_format raw replace reverse round slice sort split striptags title trim upper url_encode",contains:[d]},f="autoescape block do embed extends filter flush for if import include macro sandbox set spaceless use verbatim";return f=f+" "+f.split(" ").map(function(a){return"end"+a}).join(" "),{aliases:["craftcms"],case_insensitive:!0,subLanguage:"xml",contains:[a.COMMENT(/\{#/,/#}/),{className:"template_tag",begin:/\{%/,end:/%}/,keywords:f,contains:[e,d]},{className:"variable",begin:/\{\{/,end:/}}/,contains:[e,d]}]}}),a.registerLanguage("typescript",function(a){var b={keyword:"in if for while finally var new function|0 do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class public private protected get set super static implements enum export import declare type namespace abstract",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document any number boolean string void"};return{aliases:["ts"],keywords:b,contains:[{className:"pi",begin:/^\s*['"]use strict['"]/,relevance:0},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:a.C_NUMBER_RE}],relevance:0},{begin:"("+a.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.REGEXP_MODE],relevance:0},{className:"function",begin:"function",end:/[\{;]/,excludeEnd:!0,keywords:b,contains:["self",a.inherit(a.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:b,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE],illegal:/["'\(]/}],illegal:/\[|%/,relevance:0},{className:"constructor",beginKeywords:"constructor",end:/\{/,excludeEnd:!0,relevance:10},{className:"module",beginKeywords:"module",end:/\{/,excludeEnd:!0},{className:"interface",beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},{begin:/\$[(.]/},{begin:"\\."+a.IDENT_RE,relevance:0}]}}),a.registerLanguage("vala",function(a){return{keywords:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib CCode Gee Object",literal:"false true null"},contains:[{className:"class",beginKeywords:"class interface delegate namespace",end:"{",excludeEnd:!0,illegal:"[^,:\\n\\s\\.]",contains:[a.UNDERSCORE_TITLE_MODE]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""',relevance:5},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,{className:"preprocessor",begin:"^#",end:"$",relevance:2},{className:"constant",begin:" [A-Z_]+ ",relevance:0}]}}),a.registerLanguage("vbnet",function(a){return{aliases:["vb"],case_insensitive:!0,keywords:{keyword:"addhandler addressof alias and andalso aggregate ansi as assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass namespace narrowing new next not notinheritable notoverridable of off on operator option optional or order orelse overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim rem removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly xor",built_in:"boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype date decimal directcast double gettype getxmlnamespace iif integer long object sbyte short single string trycast typeof uinteger ulong ushort",literal:"true false nothing"},illegal:"//|{|}|endif|gosub|variant|wend",contains:[a.inherit(a.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),a.COMMENT("'","$",{returnBegin:!0,contains:[{className:"xmlDocTag",begin:"'''|",contains:[a.PHRASAL_WORDS_MODE]},{className:"xmlDocTag",begin:"",contains:[a.PHRASAL_WORDS_MODE]}]}),a.C_NUMBER_MODE,{className:"preprocessor",begin:"#",end:"$",keywords:"if else elseif end region externalsource"}]}}),a.registerLanguage("vbscript",function(a){return{aliases:["vbs"],case_insensitive:!0,keywords:{keyword:"call class const dim do loop erase execute executeglobal exit for each next function if then else on error option explicit new private property let get public randomize redim rem select case set stop sub while wend with end to elseif is or xor and not class_initialize class_terminate default preserve in me byval byref step resume goto",built_in:"lcase month vartype instrrev ubound setlocale getobject rgb getref string weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency conversions csng timevalue second year space abs clng timeserial fixs len asc isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion scriptengine split scriptengineminorversion cint sin datepart ltrim sqr scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw chrw regexp server response request cstr err",literal:"true false null nothing empty"},illegal:"//",contains:[a.inherit(a.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),a.COMMENT(/'/,/$/,{relevance:0}),a.C_NUMBER_MODE]}}),a.registerLanguage("vbscript-html",function(a){return{subLanguage:"xml",contains:[{begin:"<%",end:"%>",subLanguage:"vbscript"}]}}),a.registerLanguage("verilog",function(a){return{aliases:["v"],case_insensitive:!0,keywords:{keyword:"always and assign begin buf bufif0 bufif1 case casex casez cmos deassign default defparam disable edge else end endcase endfunction endmodule endprimitive endspecify endtable endtask event for force forever fork function if ifnone initial inout input join macromodule module nand negedge nmos nor not notif0 notif1 or output parameter pmos posedge primitive pulldown pullup rcmos release repeat rnmos rpmos rtran rtranif0 rtranif1 specify specparam table task timescale tran tranif0 tranif1 wait while xnor xor",typename:"highz0 highz1 integer large medium pull0 pull1 real realtime reg scalared signed small strong0 strong1 supply0 supply0 supply1 supply1 time tri tri0 tri1 triand trior trireg vectored wand weak0 weak1 wire wor"},contains:[a.C_BLOCK_COMMENT_MODE,a.C_LINE_COMMENT_MODE,a.QUOTE_STRING_MODE,{className:"number",begin:"\\b(\\d+'(b|h|o|d|B|H|O|D))?[0-9xzXZ]+",contains:[a.BACKSLASH_ESCAPE],relevance:0},{className:"typename",begin:"\\.\\w+",relevance:0},{className:"value",begin:"#\\((?!parameter).+\\)"},{className:"keyword",begin:"\\+|-|\\*|/|%|<|>|=|#|`|\\!|&|\\||@|:|\\^|~|\\{|\\}",relevance:0}]}}),a.registerLanguage("vhdl",function(a){var b="\\d(_|\\d)*",c="[eE][-+]?"+b,d=b+"(\\."+b+")?("+c+")?",e="\\w+",f=b+"#"+e+"(\\."+e+")?#("+c+")?",g="\\b("+f+"|"+d+")";return{case_insensitive:!0,keywords:{keyword:"abs access after alias all and architecture array assert attribute begin block body buffer bus case component configuration constant context cover disconnect downto default else elsif end entity exit fairness file for force function generate generic group guarded if impure in inertial inout is label library linkage literal loop map mod nand new next nor not null of on open or others out package port postponed procedure process property protected pure range record register reject release rem report restrict restrict_guarantee return rol ror select sequence severity shared signal sla sll sra srl strong subtype then to transport type unaffected units until use variable vmode vprop vunit wait when while with xnor xor",typename:"boolean bit character severity_level integer time delay_length natural positive string bit_vector file_open_kind file_open_status std_ulogic std_ulogic_vector std_logic std_logic_vector unsigned signed boolean_vector integer_vector real_vector time_vector"},illegal:"{",contains:[a.C_BLOCK_COMMENT_MODE,a.COMMENT("--","$"),a.QUOTE_STRING_MODE,{className:"number",begin:g,relevance:0},{className:"literal",begin:"'(U|X|0|1|Z|W|L|H|-)'",contains:[a.BACKSLASH_ESCAPE]},{className:"attribute",begin:"'[A-Za-z](_?[A-Za-z0-9])*",contains:[a.BACKSLASH_ESCAPE]}]}}),a.registerLanguage("vim",function(a){return{lexemes:/[!#@\w]+/,keywords:{keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw d|0 delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu g|0 go gr grepa gu gv ha h|0 helpf helpg helpt hi hid his i|0 ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs n|0 new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf q|0 quita qa r|0 rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv s|0 sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync t|0 tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up v|0 ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"abs acos add and append argc argidx argv asin atan atan2 browse browsedir bufexists buflisted bufloaded bufname bufnr bufwinnr byte2line byteidx call ceil changenr char2nr cindent clearmatches col complete complete_add complete_check confirm copy cos cosh count cscope_connection cursor deepcopy delete did_filetype diff_filler diff_hlID empty escape eval eventhandler executable exists exp expand extend feedkeys filereadable filewritable filter finddir findfile float2nr floor fmod fnameescape fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreground function garbagecollect get getbufline getbufvar getchar getcharmod getcmdline getcmdpos getcmdtype getcwd getfontname getfperm getfsize getftime getftype getline getloclist getmatches getpid getpos getqflist getreg getregtype gettabvar gettabwinvar getwinposx getwinposy getwinvar glob globpath has has_key haslocaldir hasmapto histadd histdel histget histnr hlexists hlID hostname iconv indent index input inputdialog inputlist inputrestore inputsave inputsecret insert invert isdirectory islocked items join keys len libcall libcallnr line line2byte lispindent localtime log log10 luaeval map maparg mapcheck match matchadd matcharg matchdelete matchend matchlist matchstr max min mkdir mode mzeval nextnonblank nr2char or pathshorten pow prevnonblank printf pumvisible py3eval pyeval range readfile reltime reltimestr remote_expr remote_foreground remote_peek remote_read remote_send remove rename repeat resolve reverse round screenattr screenchar screencol screenrow search searchdecl searchpair searchpairpos searchpos server2client serverlist setbufvar setcmdpos setline setloclist setmatches setpos setqflist setreg settabvar settabwinvar setwinvar sha256 shellescape shiftwidth simplify sin sinh sort soundfold spellbadword spellsuggest split sqrt str2float str2nr strchars strdisplaywidth strftime stridx string strlen strpart strridx strtrans strwidth submatch substitute synconcealed synID synIDattr synIDtrans synstack system tabpagebuflist tabpagenr tabpagewinnr tagfiles taglist tan tanh tempname tolower toupper tr trunc type undofile undotree values virtcol visualmode wildmenumode winbufnr wincol winheight winline winnr winrestcmd winrestview winsaveview winwidth writefile xor"},illegal:/[{:]/,contains:[a.NUMBER_MODE,a.APOS_STRING_MODE,{className:"string",begin:/"((\\")|[^"\n])*("|\n)/},{className:"variable",begin:/[bwtglsav]:[\w\d_]*/},{className:"function",beginKeywords:"function function!",end:"$",relevance:0,contains:[a.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]}]}}),a.registerLanguage("x86asm",function(a){return{case_insensitive:!0,lexemes:"\\.?"+a.IDENT_RE,keywords:{keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63", +literal:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l",pseudo:"db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times",preprocessor:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr __FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public ",built_in:"bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[a.COMMENT(";","$",{relevance:0}),{className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*\\.?[0-9_]*(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},a.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"[^\\\\]`"},{begin:"\\.[A-Za-z0-9]+"}],relevance:0},{className:"label",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"argument",begin:"%[0-9]+",relevance:0},{className:"built_in",begin:"%!S+",relevance:0}]}}),a.registerLanguage("xl",function(a){var b="ObjectLoader Animate MovieCredits Slides Filters Shading Materials LensFlare Mapping VLCAudioVideo StereoDecoder PointCloud NetworkAccess RemoteControl RegExp ChromaKey Snowfall NodeJS Speech Charts",c={keyword:"if then else do while until for loop import with is as where when by data constant",literal:"true false nil",type:"integer real text name boolean symbol infix prefix postfix block tree",built_in:"in mod rem and or xor not abs sign floor ceil sqrt sin cos tan asin acos atan exp expm1 log log2 log10 log1p pi at",module:b,id:"text_length text_range text_find text_replace contains page slide basic_slide title_slide title subtitle fade_in fade_out fade_at clear_color color line_color line_width texture_wrap texture_transform texture scale_?x scale_?y scale_?z? translate_?x translate_?y translate_?z? rotate_?x rotate_?y rotate_?z? rectangle circle ellipse sphere path line_to move_to quad_to curve_to theme background contents locally time mouse_?x mouse_?y mouse_buttons"},d={className:"constant",begin:"[A-Z][A-Z_0-9]+",relevance:0},e={className:"variable",begin:"([A-Z][a-z_0-9]+)+",relevance:0},f={className:"id",begin:"[a-z][a-z_0-9]+",relevance:0},g={className:"string",begin:'"',end:'"',illegal:"\\n"},h={className:"string",begin:"'",end:"'",illegal:"\\n"},i={className:"string",begin:"<<",end:">>"},j={className:"number",begin:"[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?",relevance:10},k={className:"import",beginKeywords:"import",end:"$",keywords:{keyword:"import",module:b},relevance:0,contains:[g]},l={className:"function",begin:"[a-z].*->"};return{aliases:["tao"],lexemes:/[a-zA-Z][a-zA-Z0-9_?]*/,keywords:c,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,g,h,i,l,k,d,e,f,j,a.NUMBER_MODE]}}),a.registerLanguage("xquery",function(a){var b="for let if while then else return where group by xquery encoding versionmodule namespace boundary-space preserve strip default collation base-uri orderingcopy-namespaces order declare import schema namespace function option in allowing emptyat tumbling window sliding window start when only end when previous next stable ascendingdescending empty greatest least some every satisfies switch case typeswitch try catch andor to union intersect instance of treat as castable cast map array delete insert intoreplace value rename copy modify update",c="false true xs:string xs:integer element item xs:date xs:datetime xs:float xs:double xs:decimal QName xs:anyURI xs:long xs:int xs:short xs:byte attribute",d={className:"variable",begin:/\$[a-zA-Z0-9\-]+/,relevance:5},e={className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},f={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},g={className:"decorator",begin:"%\\w+"},h={className:"comment",begin:"\\(:",end:":\\)",relevance:10,contains:[{className:"doc",begin:"@\\w+"}]},i={begin:"{",end:"}"},j=[d,f,e,h,g,i];return i.contains=j,{aliases:["xpath","xq"],case_insensitive:!1,lexemes:/[a-zA-Z\$][a-zA-Z0-9_:\-]*/,illegal:/(proc)|(abstract)|(extends)|(until)|(#)/,keywords:{keyword:b,literal:c},contains:j}}),a.registerLanguage("zephir",function(a){var b={className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},a.inherit(a.APOS_STRING_MODE,{illegal:null}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null})]},c={variants:[a.BINARY_NUMBER_MODE,a.C_NUMBER_MODE]};return{aliases:["zep"],case_insensitive:!0,keywords:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var let while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally int uint long ulong char uchar double float bool boolean stringlikely unlikely",contains:[a.C_LINE_COMMENT_MODE,a.HASH_COMMENT_MODE,a.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),a.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler",lexemes:a.UNDERSCORE_IDENT_RE}),{className:"string",begin:"<<<['\"]?\\w+['\"]?$",end:"^\\w+;",contains:[a.BACKSLASH_ESCAPE]},{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function",end:/[;{]/,excludeEnd:!0,illegal:"\\$|\\[|%",contains:[a.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:["self",a.C_BLOCK_COMMENT_MODE,b,c]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[a.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[a.UNDERSCORE_TITLE_MODE]},{begin:"=>"},b,c]}}),a}),function(a){"use strict";function b(b,c){if(c=c||{},c.worker&&y.WORKERS_SUPPORTED){var d=k();return d.userStep=c.step,d.userChunk=c.chunk,d.userComplete=c.complete,d.userError=c.error,c.step=r(c.step),c.chunk=r(c.chunk),c.complete=r(c.complete),c.error=r(c.error),delete c.worker,void d.postMessage({input:b,config:c,workerId:d.id})}var h=null;return"string"==typeof b?h=c.download?new e(c):new g(c):(a.File&&b instanceof File||b instanceof Object)&&(h=new f(c)),h.stream(b)}function c(a,b){function c(){"object"==typeof b&&("string"==typeof b.delimiter&&1==b.delimiter.length&&-1==y.BAD_DELIMITERS.indexOf(b.delimiter)&&(i=b.delimiter),("boolean"==typeof b.quotes||b.quotes instanceof Array)&&(h=b.quotes),"string"==typeof b.newline&&(j=b.newline))}function d(a){if("object"!=typeof a)return[];var b=[];for(var c in a)b.push(c);return b}function e(a,b){var c="";"string"==typeof a&&(a=JSON.parse(a)),"string"==typeof b&&(b=JSON.parse(b));var d=a instanceof Array&&a.length>0,e=!(b[0]instanceof Array);if(d){for(var g=0;g0&&(c+=i),c+=f(a[g],g);b.length>0&&(c+=j)}for(var h=0;hl;l++){l>0&&(c+=i);var m=d&&e?a[l]:l;c+=f(b[h][m],l)}h-1||" "==a.charAt(0)||" "==a.charAt(a.length-1);return c?'"'+a+'"':a}function g(a,b){for(var c=0;c-1)return!0;return!1}var h=!1,i=",",j="\r\n";if(c(),"string"==typeof a&&(a=JSON.parse(a)),a instanceof Array){if(!a.length||a[0]instanceof Array)return e(null,a);if("object"==typeof a[0])return e(d(a[0]),a)}else if("object"==typeof a)return"string"==typeof a.data&&(a.data=JSON.parse(a.data)),a.data instanceof Array&&(a.fields||(a.fields=a.data[0]instanceof Array?a.fields:d(a.data[0])),a.data[0]instanceof Array||"object"==typeof a.data[0]||(a.data=[a.data])),e(a.fields||[],a.data||[]);throw"exception: Unable to serialize unrecognized input"}function d(b){function c(a){var b=p(a);b.chunkSize=parseInt(b.chunkSize),a.step||a.chunk||(b.chunkSize=null),this._handle=new h(b),this._handle.streamer=this,this._config=b}this._handle=null,this._paused=!1,this._finished=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},c.call(this,b),this.parseChunk=function(b){if(this.isFirstChunk&&r(this._config.beforeFirstChunk)){var c=this._config.beforeFirstChunk(b);void 0!==c&&(b=c)}this.isFirstChunk=!1;var d=this._partialLine+b;this._partialLine="";var e=this._handle.parse(d,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var f=e.meta.cursor;this._finished||(this._partialLine=d.substring(f-this._baseIndex),this._baseIndex=f),e&&e.data&&(this._rowCount+=e.data.length);var g=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(u)a.postMessage({results:e,workerId:y.WORKER_ID,finished:g});else if(r(this._config.chunk)){if(this._config.chunk(e,this._handle),this._paused)return;e=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(e.data),this._completeResults.errors=this._completeResults.errors.concat(e.errors),this._completeResults.meta=e.meta),!g||!r(this._config.complete)||e&&e.meta.aborted||this._config.complete(this._completeResults),g||e&&e.meta.paused||this._nextChunk(),e}},this._sendError=function(b){r(this._config.error)?this._config.error(b):u&&this._config.error&&a.postMessage({workerId:y.WORKER_ID,error:b,finished:!1})}}function e(a){function b(a){var b=a.getResponseHeader("Content-Range");return parseInt(b.substr(b.lastIndexOf("/")+1))}a=a||{},a.chunkSize||(a.chunkSize=y.RemoteChunkSize),d.call(this,a);var c;t?this._nextChunk=function(){this._readChunk(),this._chunkLoaded()}:this._nextChunk=function(){this._readChunk()},this.stream=function(a){this._input=a,this._nextChunk()},this._readChunk=function(){if(this._finished)return void this._chunkLoaded();if(c=new XMLHttpRequest,t||(c.onload=q(this._chunkLoaded,this),c.onerror=q(this._chunkError,this)),c.open("GET",this._input,!t),this._config.chunkSize){var a=this._start+this._config.chunkSize-1;c.setRequestHeader("Range","bytes="+this._start+"-"+a),c.setRequestHeader("If-None-Match","webkit-no-cache")}try{c.send()}catch(b){this._chunkError(b.message)}t&&0==c.status?this._chunkError():this._start+=this._config.chunkSize},this._chunkLoaded=function(){if(4==c.readyState){if(c.status<200||c.status>=400)return void this._chunkError();this._finished=!this._config.chunkSize||this._start>b(c),this.parseChunk(c.responseText)}},this._chunkError=function(a){var b=c.statusText||a;this._sendError(b)}}function f(a){a=a||{},a.chunkSize||(a.chunkSize=y.LocalChunkSize),d.call(this,a);var b,c,e="undefined"!=typeof FileReader;this.stream=function(a){this._input=a,c=a.slice||a.webkitSlice||a.mozSlice,e?(b=new FileReader,b.onload=q(this._chunkLoaded,this),b.onerror=q(this._chunkError,this)):b=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(a.target.result)},this._chunkError=function(){this._sendError(b.error)}}function g(a){a=a||{},d.call(this,a);var b,c;this.stream=function(a){return b=a,c=a,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var a=this._config.chunkSize,b=a?c.substr(0,a):c;return c=a?c.substr(a):"",this._finished=!c,this.parseChunk(b)}}}function h(a){function b(){if(v&&m&&(j("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+y.DefaultDelimiter+"'"),m=!1),a.skipEmptyLines)for(var b=0;b=u.length?(c.__parsed_extra||(c.__parsed_extra=[]),c.__parsed_extra.push(v.data[b][d])):c[u[d]]=v.data[b][d])}a.header&&(v.data[b]=c,d>u.length?j("FieldMismatch","TooManyFields","Too many fields: expected "+u.length+" fields but parsed "+d,b):d1&&(j+=Math.abs(n-e),e=n):e=n}l.data.length>0&&(k/=l.data.length),("undefined"==typeof d||d>j)&&k>1.99&&(d=j,c=h)}return a.delimiter=c,{successful:!!c,bestDelimiter:c}}function g(a){a=a.substr(0,1048576);var b=a.split("\r");if(1==b.length)return"\n";for(var c=0,d=0;d=b.length/2?"\r\n":"\r"}function h(a){var b=n.test(a);return b?parseFloat(a):a}function j(a,b,c,d){v.errors.push({type:a,code:b,message:c,row:d})}var k,l,m,n=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,o=this,q=0,s=!1,t=!1,u=[],v={data:[],errors:[],meta:{}};if(r(a.step)){var w=a.step;a.step=function(d){if(v=d,c())b();else{if(b(),0==v.data.length)return;q+=d.data.length,a.preview&&q>a.preview?l.abort():w(v,o)}}}this.parse=function(c,d,e){if(a.newline||(a.newline=g(c)),m=!1,!a.delimiter){var h=f(c);h.successful?a.delimiter=h.bestDelimiter:(m=!0,a.delimiter=y.DefaultDelimiter),v.meta.delimiter=a.delimiter}var j=p(a);return a.preview&&a.header&&j.preview++,k=c,l=new i(j),v=l.parse(k,d,e),b(),s?{meta:{paused:!0}}:v||{meta:{paused:!1}}},this.paused=function(){return s},this.pause=function(){s=!0,l.abort(),k=k.substr(l.getCharIndex())},this.resume=function(){s=!1,o.streamer.parseChunk(k)},this.aborted=function(){return t},this.abort=function(){t=!0,l.abort(),v.meta.aborted=!0,r(a.complete)&&a.complete(v),k=""}}function i(a){a=a||{};var b=a.delimiter,c=a.newline,d=a.comments,e=a.step,f=a.preview,g=a.fastMode;if(("string"!=typeof b||y.BAD_DELIMITERS.indexOf(b)>-1)&&(b=","),d===b)throw"Comment character same as delimiter";d===!0?d="#":("string"!=typeof d||y.BAD_DELIMITERS.indexOf(d)>-1)&&(d=!1),"\n"!=c&&"\r"!=c&&"\r\n"!=c&&(c="\n");var h=0,i=!1;this.parse=function(a,j,k){function l(a){v.push(a),y=h}function m(b){return k?o():("undefined"==typeof b&&(b=a.substr(h)),x.push(b),h=q,l(x),u&&p(),o())}function n(b){h=b,l(x),x=[],C=a.indexOf(c,h)}function o(a){return{data:v,errors:w,meta:{delimiter:b,linebreak:c,aborted:i,truncated:!!a,cursor:y+(j||0)}}}function p(){e(o()),v=[],w=[]}if("string"!=typeof a)throw"Input must be a string";var q=a.length,r=b.length,s=c.length,t=d.length,u="function"==typeof e;h=0;var v=[],w=[],x=[],y=0;if(!a)return o();if(g||g!==!1&&-1===a.indexOf('"')){for(var z=a.split(c),A=0;A=f)return v=v.slice(0,f),o(!0)}}return o()}for(var B=a.indexOf(b,h),C=a.indexOf(c,h);;)if('"'!=a[h])if(d&&0===x.length&&a.substr(h,t)===d){if(-1==C)return o();h=C+s,C=a.indexOf(c,h),B=a.indexOf(b,h)}else if(-1!==B&&(C>B||-1===C))x.push(a.substring(h,B)),h=B+r,B=a.indexOf(b,h);else{if(-1===C)break;if(x.push(a.substring(h,C)),n(C+s),u&&(p(),i))return o();if(f&&v.length>=f)return o(!0)}else{var D=h;for(h++;;){var D=a.indexOf('"',D+1);if(-1===D)return k||w.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:v.length,index:h}),m();if(D===q-1){var E=a.substring(h,D).replace(/""/g,'"');return m(E)}if('"'!=a[D+1]){if(a[D+1]==b){x.push(a.substring(h,D).replace(/""/g,'"')),h=D+1+r,B=a.indexOf(b,h),C=a.indexOf(c,h);break}if(a.substr(D+1,s)===c){if(x.push(a.substring(h,D).replace(/""/g,'"')),n(D+1+s),B=a.indexOf(b,h),u&&(p(),i))return o();if(f&&v.length>=f)return o(!0);break}}else D++}}return m()},this.abort=function(){i=!0},this.getCharIndex=function(){return h}}function j(){var a=document.getElementsByTagName("script");return a.length?a[a.length-1].src:""}function k(){if(!y.WORKERS_SUPPORTED)return!1;if(!v&&null===y.SCRIPT_PATH)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");var b=y.SCRIPT_PATH||s;b+=(-1!==b.indexOf("?")?"&":"?")+"papaworker";var c=new a.Worker(b);return c.onmessage=l,c.id=x++,w[c.id]=c,c}function l(a){var b=a.data,c=w[b.workerId],d=!1;if(b.error)c.userError(b.error,b.file);else if(b.results&&b.results.data){var e=function(){d=!0,m(b.workerId,{data:[],errors:[],meta:{aborted:!0}})},f={abort:e,pause:n,resume:n};if(r(c.userStep)){for(var g=0;gi;i++)e+=String.fromCharCode(f[i]);c.push(e)}else if("Blob"===b(a)||"File"===b(a)){if(!g)throw new h("NOT_READABLE_ERR");var k=new g;c.push(k.readAsBinaryString(a))}else a instanceof d?"base64"===a.encoding&&p?c.push(p(a.data)):"URI"===a.encoding?c.push(decodeURIComponent(a.data)):"raw"===a.encoding&&c.push(a.data):("string"!=typeof a&&(a+=""),c.push(unescape(encodeURIComponent(a))))},e.getBlob=function(a){return arguments.length||(a=null),new d(this.data.join(""),a,"raw")},e.toString=function(){return"[object BlobBuilder]"},f.slice=function(a,b,c){var e=arguments.length;return 3>e&&(c=null),new d(this.data.slice(a,e>1?b:this.data.length),c,this.encoding)},f.toString=function(){return"[object Blob]"},f.close=function(){this.size=0,delete this.data},c}(a);a.Blob=function(a,b){var d=b?b.type||"":"",e=new c;if(a)for(var f=0,g=a.length;g>f;f++)Uint8Array&&a[f]instanceof Uint8Array?e.append(a[f].buffer):e.append(a[f]);var h=e.getBlob(d);return!h.slice&&h.webkitSlice&&(h.slice=h.webkitSlice),h};var d=Object.getPrototypeOf||function(a){return a.__proto__};a.Blob.prototype=d(new a.Blob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this);var saveAs=saveAs||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},p=function(b,i){b=o(b);var l,p,q,r=this,s=b.type,t=!1,u=function(){n(r,"writestart progress write writeend".split(" "))},v=function(){if((t||!l)&&(l=c().createObjectURL(b)),p)p.location.href=l;else{var d=a.open(l,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=l)}r.readyState=r.DONE,u(),m(l)},w=function(a){return function(){return r.readyState!==r.DONE?a.apply(this,arguments):void 0}},x={create:!0,exclusive:!1};return r.readyState=r.INIT,i||(i="download"),e?(l=c().createObjectURL(b),d.href=l,d.download=i,f(d),r.readyState=r.DONE,u(),void m(l)):(a.chrome&&s&&s!==j&&(q=b.slice||b.webkitSlice,b=q.call(b,0,b.size,j),t=!0),g&&"download"!==i&&(i+=".download"),(s===j||g)&&(p=a),h?(k+=b.size,void h(a.TEMPORARY,k,w(function(a){a.root.getDirectory("saved",x,w(function(a){var c=function(){a.getFile(i,x,w(function(a){a.createWriter(w(function(c){c.onwriteend=function(b){p.location.href=a.toURL(),r.readyState=r.DONE,n(r,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&v()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=r["on"+a]}),c.write(b),r.abort=function(){c.abort(),r.readyState=r.DONE},r.readyState=r.WRITING}),v)}),v)};a.getFile(i,{create:!1},w(function(a){a.remove(),c()}),w(function(a){a.code===a.NOT_FOUND_ERR?c():v()}))}),v)}),v)):void v())},q=p.prototype,r=function(a,b){return new p(a,b)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(a,b){return navigator.msSaveOrOpenBlob(o(a),b)}:(q.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},q.readyState=q.INIT=0,q.WRITING=1,q.DONE=2,q.error=q.onwritestart=q.onprogress=q.onwrite=q.onabort=q.onerror=q.onwriteend=null,r)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!=typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs}),function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gi;i++)e+=String.fromCharCode(f[i]);c.push(e)}else if("Blob"===b(a)||"File"===b(a)){if(!g)throw new h("NOT_READABLE_ERR");var k=new g;c.push(k.readAsBinaryString(a))}else a instanceof d?"base64"===a.encoding&&p?c.push(p(a.data)):"URI"===a.encoding?c.push(decodeURIComponent(a.data)):"raw"===a.encoding&&c.push(a.data):("string"!=typeof a&&(a+=""),c.push(unescape(encodeURIComponent(a))))},e.getBlob=function(a){return arguments.length||(a=null),new d(this.data.join(""),a,"raw")},e.toString=function(){return"[object BlobBuilder]"},f.slice=function(a,b,c){var e=arguments.length;return 3>e&&(c=null),new d(this.data.slice(a,e>1?b:this.data.length),c,this.encoding)},f.toString=function(){return"[object Blob]"},f.close=function(){this.size=0,delete this.data},c}(a);a.Blob=function(a,b){var d=b?b.type||"":"",e=new c;if(a)for(var f=0,g=a.length;g>f;f++)Uint8Array&&a[f]instanceof Uint8Array?e.append(a[f].buffer):e.append(a[f]);var h=e.getBlob(d);return!h.slice&&h.webkitSlice&&(h.slice=h.webkitSlice),h};var d=Object.getPrototypeOf||function(a){return a.__proto__};a.Blob.prototype=d(new a.Blob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this); +},{}],2:[function(a,b,c){var d=d||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(a){var b=new MouseEvent("click");a.dispatchEvent(b)},g=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),h=a.webkitRequestFileSystem,i=a.requestFileSystem||h||a.mozRequestFileSystem,j=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},k="application/octet-stream",l=0,m=500,n=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,m)},o=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){j(f)}}},p=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},q=function(b,j,m){m||(b=p(b));var q,r,s,t=this,u=b.type,v=!1,w=function(){o(t,"writestart progress write writeend".split(" "))},x=function(){if(r&&g&&"undefined"!=typeof FileReader){var d=new FileReader;return d.onloadend=function(){var a=d.result;r.location.href="data:attachment/file"+a.slice(a.search(/[,;]/)),t.readyState=t.DONE,w()},d.readAsDataURL(b),void(t.readyState=t.INIT)}if((v||!q)&&(q=c().createObjectURL(b)),r)r.location.href=q;else{var e=a.open(q,"_blank");void 0==e&&g&&(a.location.href=q)}t.readyState=t.DONE,w(),n(q)},y=function(a){return function(){return t.readyState!==t.DONE?a.apply(this,arguments):void 0}},z={create:!0,exclusive:!1};return t.readyState=t.INIT,j||(j="download"),e?(q=c().createObjectURL(b),void setTimeout(function(){d.href=q,d.download=j,f(d),w(),n(q),t.readyState=t.DONE})):(a.chrome&&u&&u!==k&&(s=b.slice||b.webkitSlice,b=s.call(b,0,b.size,k),v=!0),h&&"download"!==j&&(j+=".download"),(u===k||h)&&(r=a),i?(l+=b.size,void i(a.TEMPORARY,l,y(function(a){a.root.getDirectory("saved",z,y(function(a){var c=function(){a.getFile(j,z,y(function(a){a.createWriter(y(function(c){c.onwriteend=function(b){r.location.href=a.toURL(),t.readyState=t.DONE,o(t,"writeend",b),n(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&x()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=t["on"+a]}),c.write(b),t.abort=function(){c.abort(),t.readyState=t.DONE},t.readyState=t.WRITING}),x)}),x)};a.getFile(j,{create:!1},y(function(a){a.remove(),c()}),y(function(a){a.code===a.NOT_FOUND_ERR?c():x()}))}),x)}),x)):void x())},r=q.prototype,s=function(a,b,c){return new q(a,b,c)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(a,b,c){return c||(a=p(a)),navigator.msSaveOrOpenBlob(a,b||"download")}:(r.abort=function(){var a=this;a.readyState=a.DONE,o(a,"abort")},r.readyState=r.INIT=0,r.WRITING=1,r.DONE=2,r.error=r.onwritestart=r.onprogress=r.onwrite=r.onabort=r.onerror=r.onwriteend=null,s)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof b&&b.exports?b.exports.saveAs=d:"undefined"!=typeof define&&null!==define&&null!=define.amd&&define([],function(){return d})},{}],3:[function(a,b,c){"use strict";b.exports="ngFileSaver",angular.module("ngFileSaver",[]).factory("FileSaver",["Blob","SaveAs","FileSaverUtils",a("./angular-file-saver.service")]).factory("FileSaverUtils",[a("./utils/utils.service.js")]).factory("Blob",["$window",a("./dependencies/blob-bundle.service.js")]).factory("SaveAs",[a("./dependencies/file-saver-bundle.service.js")])},{"./angular-file-saver.service":4,"./dependencies/blob-bundle.service.js":5,"./dependencies/file-saver-bundle.service.js":6,"./utils/utils.service.js":7}],4:[function(a,b,c){"use strict";b.exports=function(a,b,c){function d(a,d,e){try{b(a,d,e)}catch(f){c.handleErrors(f.message)}}return{saveAs:function(a,b,e){return c.isBlobInstance(a)||c.handleErrors("Data argument should be a blob instance"),c.isString(b)||c.handleErrors("Filename argument should be a string"),d(a,b,e)}}}},{}],5:[function(a,b,c){"use strict";a("Blob.js"),b.exports=function(a){return a.Blob}},{"Blob.js":1}],6:[function(a,b,c){"use strict";b.exports=function(){return a("FileSaver.js").saveAs||function(){}}},{"FileSaver.js":2}],7:[function(a,b,c){"use strict";b.exports=function(){return{handleErrors:function(a){throw new Error(a)},isString:function(a){return"string"==typeof a||a instanceof String},isUndefined:function(a){return"undefined"==typeof a},isBlobInstance:function(a){return a instanceof Blob}}}},{}]},{},[3]),function(a){function b(a,b,c){switch(arguments.length){case 2:return null!=a?a:b;case 3:return null!=a?a:null!=b?b:c;default:throw new Error("Implement me")}}function c(a,b){return za.call(a,b)}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function e(a){ta.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function f(a,b){var c=!0;return m(function(){return c&&(e(a),c=!1),b.apply(this,arguments)},b)}function g(a,b){qb[a]||(e(b),qb[a]=!0)}function h(a,b){return function(c){return p(a.call(this,c),b)}}function i(a,b){return function(c){return this.localeData().ordinal(a.call(this,c),b)}}function j(){}function k(a,b){b!==!1&&F(a),n(this,a),this._d=new Date(+a._d)}function l(a){var b=y(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=ta.localeData(),this._bubble()}function m(a,b){for(var d in b)c(b,d)&&(a[d]=b[d]);return c(b,"toString")&&(a.toString=b.toString),c(b,"valueOf")&&(a.valueOf=b.valueOf),a}function n(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tzm=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=b._pf),"undefined"!=typeof b._locale&&(a._locale=b._locale),Ia.length>0)for(c in Ia)d=Ia[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function o(a){return 0>a?Math.ceil(a):Math.floor(a)}function p(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.lengthd;d++)(c&&a[d]!==b[d]||!c&&A(a[d])!==A(b[d]))&&g++;return g+f}function x(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=jb[a]||kb[b]||b}return a}function y(a){var b,d,e={};for(d in a)c(a,d)&&(b=x(d),b&&(e[b]=a[d]));return e}function z(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}ta[b]=function(e,f){var g,h,i=ta._locale[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=ta().utc().set(d,a);return i.call(ta._locale,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function A(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function B(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function C(a,b,c){return ha(ta([a,11,31+b-c]),b,c).week}function D(a){return E(a)?366:365}function E(a){return a%4===0&&a%100!==0||a%400===0}function F(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[Ba]<0||a._a[Ba]>11?Ba:a._a[Ca]<1||a._a[Ca]>B(a._a[Aa],a._a[Ba])?Ca:a._a[Da]<0||a._a[Da]>24||24===a._a[Da]&&(0!==a._a[Ea]||0!==a._a[Fa]||0!==a._a[Ga])?Da:a._a[Ea]<0||a._a[Ea]>59?Ea:a._a[Fa]<0||a._a[Fa]>59?Fa:a._a[Ga]<0||a._a[Ga]>999?Ga:-1,a._pf._overflowDayOfYear&&(Aa>b||b>Ca)&&(b=Ca),a._pf.overflow=b)}function G(b){return null==b._isValid&&(b._isValid=!isNaN(b._d.getTime())&&b._pf.overflow<0&&!b._pf.empty&&!b._pf.invalidMonth&&!b._pf.nullInput&&!b._pf.invalidFormat&&!b._pf.userInvalidated,b._strict&&(b._isValid=b._isValid&&0===b._pf.charsLeftOver&&0===b._pf.unusedTokens.length&&b._pf.bigHour===a)),b._isValid}function H(a){return a?a.toLowerCase().replace("_","-"):a}function I(a){for(var b,c,d,e,f=0;f0;){if(d=J(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&w(e,c,!0)>=b-1)break;b--}f++}return null}function J(a){var b=null;if(!Ha[a]&&Ja)try{b=ta.locale(),require("./locale/"+a),ta.locale(b)}catch(c){}return Ha[a]}function K(a,b){var c,d;return b._isUTC?(c=b.clone(),d=(ta.isMoment(a)||v(a)?+a:+ta(a))-+c,c._d.setTime(+c._d+d),ta.updateOffset(c,!1),c):ta(a).local()}function L(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function M(a){var b,c,d=a.match(Na);for(b=0,c=d.length;c>b;b++)pb[d[b]]?d[b]=pb[d[b]]:d[b]=L(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function N(a,b){return a.isValid()?(b=O(b,a.localeData()),lb[b]||(lb[b]=M(b)),lb[b](a)):a.localeData().invalidDate()}function O(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Oa.lastIndex=0;d>=0&&Oa.test(a);)a=a.replace(Oa,c),Oa.lastIndex=0,d-=1;return a}function P(a,b){var c,d=b._strict;switch(a){case"Q":return Za;case"DDDD":return _a;case"YYYY":case"GGGG":case"gggg":return d?ab:Ra;case"Y":case"G":case"g":return cb;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?bb:Sa;case"S":if(d)return Za;case"SS":if(d)return $a;case"SSS":if(d)return _a;case"DDD":return Qa;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Ua;case"a":case"A":return b._locale._meridiemParse;case"x":return Xa;case"X":return Ya;case"Z":case"ZZ":return Va;case"T":return Wa;case"SSSS":return Ta;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?$a:Pa;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Pa;case"Do":return d?b._locale._ordinalParse:b._locale._ordinalParseLenient;default:return c=new RegExp(Y(X(a.replace("\\","")),"i"))}}function Q(a){a=a||"";var b=a.match(Va)||[],c=b[b.length-1]||[],d=(c+"").match(hb)||["-",0,0],e=+(60*d[1])+A(d[2]);return"+"===d[0]?-e:e}function R(a,b,c){var d,e=c._a;switch(a){case"Q":null!=b&&(e[Ba]=3*(A(b)-1));break;case"M":case"MM":null!=b&&(e[Ba]=A(b)-1);break;case"MMM":case"MMMM":d=c._locale.monthsParse(b,a,c._strict),null!=d?e[Ba]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[Ca]=A(b));break;case"Do":null!=b&&(e[Ca]=A(parseInt(b.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=A(b));break;case"YY":e[Aa]=ta.parseTwoDigitYear(b);break;case"YYYY":case"YYYYY":case"YYYYYY":e[Aa]=A(b);break;case"a":case"A":c._isPm=c._locale.isPM(b);break;case"h":case"hh":c._pf.bigHour=!0;case"H":case"HH":e[Da]=A(b);break;case"m":case"mm":e[Ea]=A(b);break;case"s":case"ss":e[Fa]=A(b);break;case"S":case"SS":case"SSS":case"SSSS":e[Ga]=A(1e3*("0."+b));break;case"x":c._d=new Date(A(b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=Q(b);break;case"dd":case"ddd":case"dddd":d=c._locale.weekdaysParse(b),null!=d?(c._w=c._w||{},c._w.d=d):c._pf.invalidWeekday=b;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=A(b));break;case"gg":case"GG":c._w=c._w||{},c._w[a]=ta.parseTwoDigitYear(b)}}function S(a){var c,d,e,f,g,h,i;c=a._w,null!=c.GG||null!=c.W||null!=c.E?(g=1,h=4,d=b(c.GG,a._a[Aa],ha(ta(),1,4).year),e=b(c.W,1),f=b(c.E,1)):(g=a._locale._week.dow,h=a._locale._week.doy,d=b(c.gg,a._a[Aa],ha(ta(),g,h).year),e=b(c.w,1),null!=c.d?(f=c.d,g>f&&++e):f=null!=c.e?c.e+g:g),i=ia(d,e,f,h,g),a._a[Aa]=i.year,a._dayOfYear=i.dayOfYear}function T(a){var c,d,e,f,g=[];if(!a._d){for(e=V(a),a._w&&null==a._a[Ca]&&null==a._a[Ba]&&S(a),a._dayOfYear&&(f=b(a._a[Aa],e[Aa]),a._dayOfYear>D(f)&&(a._pf._overflowDayOfYear=!0),d=da(f,0,a._dayOfYear),a._a[Ba]=d.getUTCMonth(),a._a[Ca]=d.getUTCDate()),c=0;3>c&&null==a._a[c];++c)a._a[c]=g[c]=e[c];for(;7>c;c++)a._a[c]=g[c]=null==a._a[c]?2===c?1:0:a._a[c];24===a._a[Da]&&0===a._a[Ea]&&0===a._a[Fa]&&0===a._a[Ga]&&(a._nextDay=!0,a._a[Da]=0),a._d=(a._useUTC?da:ca).apply(null,g),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()+a._tzm),a._nextDay&&(a._a[Da]=24)}}function U(a){var b;a._d||(b=y(a._i),a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],T(a))}function V(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function W(b){if(b._f===ta.ISO_8601)return void $(b);b._a=[],b._pf.empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=O(b._f,b._locale).match(Na)||[],c=0;c0&&b._pf.unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length),pb[f]?(d?b._pf.empty=!1:b._pf.unusedTokens.push(f),R(f,d,b)):b._strict&&!d&&b._pf.unusedTokens.push(f);b._pf.charsLeftOver=i-j,h.length>0&&b._pf.unusedInput.push(h),b._pf.bigHour===!0&&b._a[Da]<=12&&(b._pf.bigHour=a),b._isPm&&b._a[Da]<12&&(b._a[Da]+=12),b._isPm===!1&&12===b._a[Da]&&(b._a[Da]=0),T(b),F(b)}function X(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function Y(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Z(a){var b,c,e,f,g;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(NaN));for(f=0;fg)&&(e=g,c=b));m(a,c||b)}function $(a){var b,c,d=a._i,e=db.exec(d);if(e){for(a._pf.iso=!0,b=0,c=fb.length;c>b;b++)if(fb[b][1].exec(d)){a._f=fb[b][0]+(e[6]||" ");break}for(b=0,c=gb.length;c>b;b++)if(gb[b][1].exec(d)){a._f+=gb[b][0];break}d.match(Va)&&(a._f+="Z"),W(a)}else a._isValid=!1}function _(a){$(a),a._isValid===!1&&(delete a._isValid,ta.createFromInputFallback(a))}function aa(a,b){var c,d=[];for(c=0;ca&&h.setFullYear(a),h}function da(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function ea(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function fa(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function ga(a,b,c){var d=ta.duration(a).abs(),e=ya(d.as("s")),f=ya(d.as("m")),g=ya(d.as("h")),h=ya(d.as("d")),i=ya(d.as("M")),j=ya(d.as("y")),k=e0,k[4]=c,fa.apply({},k)}function ha(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=ta(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function ia(a,b,c,d,e){var f,g,h=da(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:D(a-1)+g}}function ja(b){var c,d=b._i,e=b._f;return b._locale=b._locale||ta.localeData(b._l),null===d||e===a&&""===d?ta.invalid({nullInput:!0}):("string"==typeof d&&(b._i=d=b._locale.preparse(d)),ta.isMoment(d)?new k(d,!0):(e?u(e)?Z(b):W(b):ba(b),c=new k(b),c._nextDay&&(c.add(1,"d"),c._nextDay=a),c))}function ka(a,b){var c,d;if(1===b.length&&u(b[0])&&(b=b[0]),!b.length)return ta();for(c=b[0],d=1;d=0?"+":"-";return b+p(Math.abs(a),6)},gg:function(){return p(this.weekYear()%100,2)},gggg:function(){return p(this.weekYear(),4)},ggggg:function(){return p(this.weekYear(),5)},GG:function(){return p(this.isoWeekYear()%100,2)},GGGG:function(){return p(this.isoWeekYear(),4)},GGGGG:function(){return p(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return A(this.milliseconds()/100)},SS:function(){return p(A(this.milliseconds()/10),2)},SSS:function(){return p(this.milliseconds(),3)},SSSS:function(){return p(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+p(A(a/60),2)+":"+p(A(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+p(A(a/60),2)+p(A(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},qb={},rb=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];nb.length;)va=nb.pop(),pb[va+"o"]=i(pb[va],va);for(;ob.length;)va=ob.pop(),pb[va+va]=h(pb[va],2);pb.DDDD=h(pb.DDD,3),m(j.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a,b,c){var d,e,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){if(e=ta.utc([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=ta([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.apply(b,[c]):d},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(a){return a},postformat:function(a){return a},week:function(a){return ha(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),ta=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=b,g._f=c,g._l=e,g._strict=f,g._isUTC=!1,g._pf=d(),ja(g)},ta.suppressDeprecationWarnings=!1,ta.createFromInputFallback=f("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),ta.min=function(){var a=[].slice.call(arguments,0);return ka("isBefore",a)},ta.max=function(){var a=[].slice.call(arguments,0);return ka("isAfter",a)},ta.utc=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=b,g._f=c,g._strict=f,g._pf=d(),ja(g).utc()},ta.unix=function(a){return ta(1e3*a)},ta.duration=function(a,b){var d,e,f,g,h=a,i=null;return ta.isDuration(a)?h={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(h={},b?h[b]=a:h.milliseconds=a):(i=La.exec(a))?(d="-"===i[1]?-1:1,h={y:0,d:A(i[Ca])*d,h:A(i[Da])*d,m:A(i[Ea])*d,s:A(i[Fa])*d,ms:A(i[Ga])*d}):(i=Ma.exec(a))?(d="-"===i[1]?-1:1,f=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*d},h={y:f(i[2]),M:f(i[3]),d:f(i[4]),h:f(i[5]),m:f(i[6]),s:f(i[7]),w:f(i[8])}):"object"==typeof h&&("from"in h||"to"in h)&&(g=r(ta(h.from),ta(h.to)),h={},h.ms=g.milliseconds,h.M=g.months),e=new l(h),ta.isDuration(a)&&c(a,"_locale")&&(e._locale=a._locale),e},ta.version=wa,ta.defaultFormat=eb,ta.ISO_8601=function(){},ta.momentProperties=Ia,ta.updateOffset=function(){},ta.relativeTimeThreshold=function(b,c){return mb[b]===a?!1:c===a?mb[b]:(mb[b]=c,!0)},ta.lang=f("moment.lang is deprecated. Use moment.locale instead.",function(a,b){return ta.locale(a,b)}),ta.locale=function(a,b){var c;return a&&(c="undefined"!=typeof b?ta.defineLocale(a,b):ta.localeData(a),c&&(ta.duration._locale=ta._locale=c)),ta._locale._abbr},ta.defineLocale=function(a,b){return null!==b?(b.abbr=a,Ha[a]||(Ha[a]=new j),Ha[a].set(b),ta.locale(a),Ha[a]):(delete Ha[a],null)},ta.langData=f("moment.langData is deprecated. Use moment.localeData instead.",function(a){return ta.localeData(a)}),ta.localeData=function(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return ta._locale;if(!u(a)){if(b=J(a))return b;a=[a]}return I(a)},ta.isMoment=function(a){return a instanceof k||null!=a&&c(a,"_isAMomentObject")},ta.isDuration=function(a){return a instanceof l};for(va=rb.length-1;va>=0;--va)z(rb[va]);ta.normalizeUnits=function(a){return x(a)},ta.invalid=function(a){var b=ta.utc(NaN);return null!=a?m(b._pf,a):b._pf.userInvalidated=!0,b},ta.parseZone=function(){return ta.apply(null,arguments).parseZone()},ta.parseTwoDigitYear=function(a){return A(a)+(A(a)>68?1900:2e3)},m(ta.fn=k.prototype,{clone:function(){return ta(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=ta(this).utc();return 00:!1},parsingFlags:function(){return m({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(a){return this.zone(0,a)},local:function(a){return this._isUTC&&(this.zone(0,a),this._isUTC=!1,a&&this.add(this._dateTzOffset(),"m")),this},format:function(a){var b=N(this,a||ta.defaultFormat);return this.localeData().postformat(b)},add:s(1,"add"),subtract:s(-1,"subtract"),diff:function(a,b,c){var d,e,f,g=K(a,this),h=6e4*(this.zone()-g.zone());return b=x(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+g.daysInMonth()),e=12*(this.year()-g.year())+(this.month()-g.month()),f=this-ta(this).startOf("month")-(g-ta(g).startOf("month")),f-=6e4*(this.zone()-ta(this).startOf("month").zone()-(g.zone()-ta(g).startOf("month").zone())),e+=f/d,"year"===b&&(e/=12)):(d=this-g,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-h)/864e5:"week"===b?(d-h)/6048e5:d),c?e:o(e)},from:function(a,b){return ta.duration({to:this,from:a}).locale(this.locale()).humanize(!b)},fromNow:function(a){return this.from(ta(),a)},calendar:function(a){var b=a||ta(),c=K(b,this).startOf("day"),d=this.diff(c,"days",!0),e=-6>d?"sameElse":-1>d?"lastWeek":0>d?"lastDay":1>d?"sameDay":2>d?"nextDay":7>d?"nextWeek":"sameElse";return this.format(this.localeData().calendar(e,this,ta(b)))},isLeapYear:function(){return E(this.year())},isDST:function(){return this.zone()+a):(c=ta.isMoment(a)?+a:+ta(a),c<+this.clone().startOf(b))},isBefore:function(a,b){var c;return b=x("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=ta.isMoment(a)?a:ta(a),+a>+this):(c=ta.isMoment(a)?+a:+ta(a),+this.clone().endOf(b)a?this:a}),max:f("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){return a=ta.apply(null,arguments),a>this?this:a}),zone:function(a,b){var c,d=this._offset||0;return null==a?this._isUTC?d:this._dateTzOffset():("string"==typeof a&&(a=Q(a)), +Math.abs(a)<16&&(a=60*a),!this._isUTC&&b&&(c=this._dateTzOffset()),this._offset=a,this._isUTC=!0,null!=c&&this.subtract(c,"m"),d!==a&&(!b||this._changeInProgress?t(this,ta.duration(d-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ta.updateOffset(this,!0),this._changeInProgress=null)),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(a){return a=a?ta(a).zone():0,(this.zone()-a)%60===0},daysInMonth:function(){return B(this.year(),this.month())},dayOfYear:function(a){var b=ya((ta(this).startOf("day")-ta(this).startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")},quarter:function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)},weekYear:function(a){var b=ha(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=ha(this,1,4).year;return null==a?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")},isoWeek:function(a){var b=ha(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return C(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return C(this.year(),a.dow,a.doy)},get:function(a){return a=x(a),this[a]()},set:function(a,b){return a=x(a),"function"==typeof this[a]&&this[a](b),this},locale:function(b){var c;return b===a?this._locale._abbr:(c=ta.localeData(b),null!=c&&(this._locale=c),this)},lang:f("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(b){return b===a?this.localeData():this.locale(b)}),localeData:function(){return this._locale},_dateTzOffset:function(){return 15*Math.round(this._d.getTimezoneOffset()/15)}}),ta.fn.millisecond=ta.fn.milliseconds=oa("Milliseconds",!1),ta.fn.second=ta.fn.seconds=oa("Seconds",!1),ta.fn.minute=ta.fn.minutes=oa("Minutes",!1),ta.fn.hour=ta.fn.hours=oa("Hours",!0),ta.fn.date=oa("Date",!0),ta.fn.dates=f("dates accessor is deprecated. Use date instead.",oa("Date",!0)),ta.fn.year=oa("FullYear",!0),ta.fn.years=f("years accessor is deprecated. Use year instead.",oa("FullYear",!0)),ta.fn.days=ta.fn.day,ta.fn.months=ta.fn.month,ta.fn.weeks=ta.fn.week,ta.fn.isoWeeks=ta.fn.isoWeek,ta.fn.quarters=ta.fn.quarter,ta.fn.toJSON=ta.fn.toISOString,m(ta.duration.fn=l.prototype,{_bubble:function(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;g.milliseconds=d%1e3,a=o(d/1e3),g.seconds=a%60,b=o(a/60),g.minutes=b%60,c=o(b/60),g.hours=c%24,e+=o(c/24),h=o(pa(e)),e-=o(qa(h)),f+=o(e/30),e%=30,h+=o(f/12),f%=12,g.days=e,g.months=f,g.years=h},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return o(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*A(this._months/12)},humanize:function(a){var b=ga(this,!a,this.localeData());return a&&(b=this.localeData().pastFuture(+this,b)),this.localeData().postformat(b)},add:function(a,b){var c=ta.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=ta.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=x(a),this[a.toLowerCase()+"s"]()},as:function(a){var b,c;if(a=x(a),"month"===a||"year"===a)return b=this._days+this._milliseconds/864e5,c=this._months+12*pa(b),"month"===a?c:c/12;switch(b=this._days+Math.round(qa(this._months/12)),a){case"week":return b/7+this._milliseconds/6048e5;case"day":return b+this._milliseconds/864e5;case"hour":return 24*b+this._milliseconds/36e5;case"minute":return 24*b*60+this._milliseconds/6e4;case"second":return 24*b*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*b*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+a)}},lang:ta.fn.lang,locale:ta.fn.locale,toIsoString:f("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"},localeData:function(){return this._locale}}),ta.duration.fn.toString=ta.duration.fn.toISOString;for(va in ib)c(ib,va)&&ra(va.toLowerCase());ta.duration.fn.asMilliseconds=function(){return this.as("ms")},ta.duration.fn.asSeconds=function(){return this.as("s")},ta.duration.fn.asMinutes=function(){return this.as("m")},ta.duration.fn.asHours=function(){return this.as("h")},ta.duration.fn.asDays=function(){return this.as("d")},ta.duration.fn.asWeeks=function(){return this.as("weeks")},ta.duration.fn.asMonths=function(){return this.as("M")},ta.duration.fn.asYears=function(){return this.as("y")},ta.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===A(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),Ja?module.exports=ta:"function"==typeof define&&define.amd?(define("moment",function(a,b,c){return c.config&&c.config()&&c.config().noGlobal===!0&&(xa.moment=ua),ta}),sa(!0)):sa()}.call(this),function(a,b){if("function"==typeof define&&define.amd)define(["moment","jquery","exports"],function(c,d,e){a.daterangepicker=b(a,e,c,d)});else if("undefined"!=typeof exports){var c,d=require("moment");try{c=require("jquery")}catch(e){if(c=window.jQuery,!c)throw new Error("jQuery dependency not found")}b(a,exports,d,c)}else a.daterangepicker=b(a,{},a.moment,a.jQuery||a.Zepto||a.ender||a.$)}(this,function(a,b,c,d){var e=function(a,b,c){this.parentEl="body",this.element=d(a),this.isShowing=!1;var e='';("object"!=typeof b||null===b)&&(b={}),this.parentEl=d("object"==typeof b&&b.parentEl&&d(b.parentEl).length?b.parentEl:this.parentEl),this.container=d(e).appendTo(this.parentEl),this.setOptions(b,c);var f=this.container;d.each(this.buttonClasses,function(a,b){f.find("button").addClass(b)}),this.container.find(".daterangepicker_start_input label").html(this.locale.fromLabel),this.container.find(".daterangepicker_end_input label").html(this.locale.toLabel),this.applyClass.length&&this.container.find(".applyBtn").addClass(this.applyClass),this.cancelClass.length&&this.container.find(".cancelBtn").addClass(this.cancelClass),this.container.find(".applyBtn").html(this.locale.applyLabel),this.container.find(".cancelBtn").html(this.locale.cancelLabel),this.container.find(".calendar").on("click.daterangepicker",".prev",d.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",d.proxy(this.clickNext,this)).on("click.daterangepicker","td.available",d.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",d.proxy(this.hoverDate,this)).on("mouseleave.daterangepicker","td.available",d.proxy(this.updateFormInputs,this)).on("change.daterangepicker","select.yearselect",d.proxy(this.updateMonthYear,this)).on("change.daterangepicker","select.monthselect",d.proxy(this.updateMonthYear,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.secondselect,select.ampmselect",d.proxy(this.updateTime,this)),this.container.find(".ranges").on("click.daterangepicker","button.applyBtn",d.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",d.proxy(this.clickCancel,this)).on("click.daterangepicker",".daterangepicker_start_input,.daterangepicker_end_input",d.proxy(this.showCalendars,this)).on("change.daterangepicker",".daterangepicker_start_input,.daterangepicker_end_input",d.proxy(this.inputsChanged,this)).on("keydown.daterangepicker",".daterangepicker_start_input,.daterangepicker_end_input",d.proxy(this.inputsKeydown,this)).on("click.daterangepicker","li",d.proxy(this.clickRange,this)).on("mouseenter.daterangepicker","li",d.proxy(this.enterRange,this)).on("mouseleave.daterangepicker","li",d.proxy(this.updateFormInputs,this)),this.element.is("input")?this.element.on({"click.daterangepicker":d.proxy(this.show,this),"focus.daterangepicker":d.proxy(this.show,this),"keyup.daterangepicker":d.proxy(this.updateFromControl,this)}):this.element.on("click.daterangepicker",d.proxy(this.toggle,this))};e.prototype={constructor:e,setOptions:function(a,b){if(this.startDate=c().startOf("day"),this.endDate=c().endOf("day"),this.timeZone=c().zone(),this.minDate=!1,this.maxDate=!1,this.dateLimit=!1,this.showDropdowns=!1,this.showWeekNumbers=!1,this.timePicker=!1,this.timePickerSeconds=!1,this.timePickerIncrement=30,this.timePicker12Hour=!0,this.singleDatePicker=!1,this.ranges={},this.opens="right",this.element.hasClass("pull-right")&&(this.opens="left"),this.buttonClasses=["btn","btn-small btn-sm"],this.applyClass="btn-success",this.cancelClass="btn-default",this.format="MM/DD/YYYY",this.separator=" - ",this.locale={applyLabel:"Apply",cancelLabel:"Cancel",fromLabel:"From",toLabel:"To",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:c.weekdaysMin(),monthNames:c.monthsShort(),firstDay:c.localeData()._week.dow},this.cb=function(){},"string"==typeof a.format&&(this.format=a.format),"string"==typeof a.separator&&(this.separator=a.separator),"string"==typeof a.startDate&&(this.startDate=c(a.startDate,this.format)),"string"==typeof a.endDate&&(this.endDate=c(a.endDate,this.format)),"string"==typeof a.minDate&&(this.minDate=c(a.minDate,this.format)),"string"==typeof a.maxDate&&(this.maxDate=c(a.maxDate,this.format)),"object"==typeof a.startDate&&(this.startDate=c(a.startDate)),"object"==typeof a.endDate&&(this.endDate=c(a.endDate)),"object"==typeof a.minDate&&(this.minDate=c(a.minDate)),"object"==typeof a.maxDate&&(this.maxDate=c(a.maxDate)),"string"==typeof a.applyClass&&(this.applyClass=a.applyClass),"string"==typeof a.cancelClass&&(this.cancelClass=a.cancelClass),"object"==typeof a.dateLimit&&(this.dateLimit=a.dateLimit),"object"==typeof a.locale&&("object"==typeof a.locale.daysOfWeek&&(this.locale.daysOfWeek=a.locale.daysOfWeek.slice()),"object"==typeof a.locale.monthNames&&(this.locale.monthNames=a.locale.monthNames.slice()),"number"==typeof a.locale.firstDay&&(this.locale.firstDay=a.locale.firstDay),"string"==typeof a.locale.applyLabel&&(this.locale.applyLabel=a.locale.applyLabel),"string"==typeof a.locale.cancelLabel&&(this.locale.cancelLabel=a.locale.cancelLabel),"string"==typeof a.locale.fromLabel&&(this.locale.fromLabel=a.locale.fromLabel),"string"==typeof a.locale.toLabel&&(this.locale.toLabel=a.locale.toLabel),"string"==typeof a.locale.weekLabel&&(this.locale.weekLabel=a.locale.weekLabel),"string"==typeof a.locale.customRangeLabel&&(this.locale.customRangeLabel=a.locale.customRangeLabel)),"string"==typeof a.opens&&(this.opens=a.opens),"boolean"==typeof a.showWeekNumbers&&(this.showWeekNumbers=a.showWeekNumbers),"string"==typeof a.buttonClasses&&(this.buttonClasses=[a.buttonClasses]),"object"==typeof a.buttonClasses&&(this.buttonClasses=a.buttonClasses),"boolean"==typeof a.showDropdowns&&(this.showDropdowns=a.showDropdowns),"boolean"==typeof a.singleDatePicker&&(this.singleDatePicker=a.singleDatePicker,this.singleDatePicker&&(this.endDate=this.startDate.clone())),"boolean"==typeof a.timePicker&&(this.timePicker=a.timePicker),"boolean"==typeof a.timePickerSeconds&&(this.timePickerSeconds=a.timePickerSeconds),"number"==typeof a.timePickerIncrement&&(this.timePickerIncrement=a.timePickerIncrement),"boolean"==typeof a.timePicker12Hour&&(this.timePicker12Hour=a.timePicker12Hour),0!=this.locale.firstDay)for(var e=this.locale.firstDay;e>0;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()),e--;var f,g,h;if("undefined"==typeof a.startDate&&"undefined"==typeof a.endDate&&d(this.element).is("input[type=text]")){var i=d(this.element).val(),j=i.split(this.separator);f=g=null,2==j.length?(f=c(j[0],this.format),g=c(j[1],this.format)):this.singleDatePicker&&""!==i&&(f=c(i,this.format),g=c(i,this.format)),null!==f&&null!==g&&(this.startDate=f,this.endDate=g)}if("string"==typeof a.timeZone||"number"==typeof a.timeZone?(this.timeZone=a.timeZone,this.startDate.zone(this.timeZone),this.endDate.zone(this.timeZone)):this.timeZone=c(this.startDate).zone(),"object"==typeof a.ranges){for(h in a.ranges)f="string"==typeof a.ranges[h][0]?c(a.ranges[h][0],this.format):c(a.ranges[h][0]),g="string"==typeof a.ranges[h][1]?c(a.ranges[h][1],this.format):c(a.ranges[h][1]),this.minDate&&f.isBefore(this.minDate)&&(f=c(this.minDate)),this.maxDate&&g.isAfter(this.maxDate)&&(g=c(this.maxDate)),this.minDate&&g.isBefore(this.minDate)||this.maxDate&&f.isAfter(this.maxDate)||(this.ranges[h]=[f,g]);var k="
            ";for(h in this.ranges)k+="
          • "+h+"
          • ";k+="
          • "+this.locale.customRangeLabel+"
          • ",k+="
          ",this.container.find(".ranges ul").remove(),this.container.find(".ranges").prepend(k)}if("function"==typeof b&&(this.cb=b),this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day")),this.singleDatePicker?(this.opens="right",this.container.addClass("single"),this.container.find(".calendar.right").show(),this.container.find(".calendar.left").hide(),this.timePicker?this.container.find(".ranges .daterangepicker_start_input, .ranges .daterangepicker_end_input").hide():this.container.find(".ranges").hide(),this.container.find(".calendar.right").hasClass("single")||this.container.find(".calendar.right").addClass("single")):(this.container.removeClass("single"),this.container.find(".calendar.right").removeClass("single"),this.container.find(".ranges").show()),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.oldChosenLabel=this.chosenLabel,this.leftCalendar={month:c([this.startDate.year(),this.startDate.month(),1,this.startDate.hour(),this.startDate.minute(),this.startDate.second()]),calendar:[]},this.rightCalendar={month:c([this.endDate.year(),this.endDate.month(),1,this.endDate.hour(),this.endDate.minute(),this.endDate.second()]),calendar:[]},"right"==this.opens||"center"==this.opens){var l=this.container.find(".calendar.first"),m=this.container.find(".calendar.second");m.hasClass("single")&&(m.removeClass("single"),l.addClass("single")),l.removeClass("left").addClass("right"),m.removeClass("right").addClass("left"),this.singleDatePicker&&(l.show(),m.hide())}"undefined"!=typeof a.ranges||this.singleDatePicker||this.container.addClass("show-calendar"),this.container.addClass("opens"+this.opens),this.updateView(),this.updateCalendars()},setStartDate:function(a){"string"==typeof a&&(this.startDate=c(a,this.format).zone(this.timeZone)),"object"==typeof a&&(this.startDate=c(a)),this.timePicker||(this.startDate=this.startDate.startOf("day")),this.oldStartDate=this.startDate.clone(),this.updateView(),this.updateCalendars(),this.updateInputText()},setEndDate:function(a){"string"==typeof a&&(this.endDate=c(a,this.format).zone(this.timeZone)),"object"==typeof a&&(this.endDate=c(a)),this.timePicker||(this.endDate=this.endDate.endOf("day")),this.oldEndDate=this.endDate.clone(),this.updateView(),this.updateCalendars(),this.updateInputText()},updateView:function(){this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()).hour(this.startDate.hour()).minute(this.startDate.minute()),this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()).hour(this.endDate.hour()).minute(this.endDate.minute()),this.updateFormInputs()},updateFormInputs:function(){this.container.find("input[name=daterangepicker_start]").val(this.startDate.format(this.format)),this.container.find("input[name=daterangepicker_end]").val(this.endDate.format(this.format)),this.startDate.isSame(this.endDate)||this.startDate.isBefore(this.endDate)?this.container.find("button.applyBtn").removeAttr("disabled"):this.container.find("button.applyBtn").attr("disabled","disabled")},updateFromControl:function(){if(this.element.is("input")&&this.element.val().length){var a=this.element.val().split(this.separator),b=null,d=null;2===a.length&&(b=c(a[0],this.format).zone(this.timeZone),d=c(a[1],this.format).zone(this.timeZone)),(this.singleDatePicker||null===b||null===d)&&(b=c(this.element.val(),this.format).zone(this.timeZone),d=b),d.isBefore(b)||(this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.startDate=b,this.endDate=d,this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.notify(),this.updateCalendars())}},notify:function(){this.updateView(),this.cb(this.startDate,this.endDate,this.chosenLabel)},move:function(){var a={top:0,left:0},b=d(window).width();this.parentEl.is("body")||(a={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()},b=this.parentEl[0].clientWidth+this.parentEl.offset().left),"left"==this.opens?(this.container.css({top:this.element.offset().top+this.element.outerHeight()-a.top,right:b-this.element.offset().left-this.element.outerWidth(),left:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):"center"==this.opens?(this.container.css({top:this.element.offset().top+this.element.outerHeight()-a.top,left:this.element.offset().left-a.left+this.element.outerWidth()/2-this.container.outerWidth()/2,right:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):(this.container.css({top:this.element.offset().top+this.element.outerHeight()-a.top,left:this.element.offset().left-a.left,right:"auto"}),this.container.offset().left+this.container.outerWidth()>d(window).width()&&this.container.css({left:"auto",right:0}))},toggle:function(a){this.element.hasClass("active")?this.hide():this.show()},show:function(a){this.isShowing||(this.element.addClass("active"),this.container.show(),this.move(),this._outsideClickProxy=d.proxy(function(a){this.outsideClick(a)},this),d(document).on("mousedown.daterangepicker",this._outsideClickProxy).on("touchend.daterangepicker",this._outsideClickProxy).on("click.daterangepicker","[data-toggle=dropdown]",this._outsideClickProxy).on("focusin.daterangepicker",this._outsideClickProxy),this.isShowing=!0,this.element.trigger("show.daterangepicker",this))},outsideClick:function(a){var b=d(a.target);"focusin"==a.type||b.closest(this.element).length||b.closest(this.container).length||b.closest(".calendar-date").length||this.hide()},hide:function(a){this.isShowing&&(d(document).off(".daterangepicker"),this.element.removeClass("active"),this.container.hide(),this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.notify(),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.isShowing=!1,this.element.trigger("hide.daterangepicker",this))},enterRange:function(a){var b=a.target.innerHTML;if(b==this.locale.customRangeLabel)this.updateView();else{var c=this.ranges[b];this.container.find("input[name=daterangepicker_start]").val(c[0].format(this.format)),this.container.find("input[name=daterangepicker_end]").val(c[1].format(this.format))}},showCalendars:function(){this.container.addClass("show-calendar"),this.move(),this.element.trigger("showCalendar.daterangepicker",this)},hideCalendars:function(){this.container.removeClass("show-calendar"),this.element.trigger("hideCalendar.daterangepicker",this)},inputsChanged:function(a){var b=d(a.target),e=c(b.val(),this.format);if(e.isValid()){var f,g;"daterangepicker_start"===b.attr("name")?(f=e,g=this.endDate):(f=this.startDate,g=e),this.setCustomDates(f,g)}},inputsKeydown:function(a){13===a.keyCode&&(this.inputsChanged(a),this.notify())},updateInputText:function(){this.element.is("input")&&!this.singleDatePicker?this.element.val(this.startDate.format(this.format)+this.separator+this.endDate.format(this.format)):this.element.is("input")&&this.element.val(this.endDate.format(this.format))},clickRange:function(a){var b=a.target.innerHTML;if(this.chosenLabel=b,b==this.locale.customRangeLabel)this.showCalendars();else{var c=this.ranges[b];this.startDate=c[0],this.endDate=c[1],this.timePicker||(this.startDate.startOf("day"),this.endDate.endOf("day")),this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()).hour(this.startDate.hour()).minute(this.startDate.minute()),this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()).hour(this.endDate.hour()).minute(this.endDate.minute()),this.updateCalendars(),this.updateInputText(),this.hideCalendars(),this.hide(),this.element.trigger("apply.daterangepicker",this)}},clickPrev:function(a){var b=d(a.target).parents(".calendar");b.hasClass("left")?this.leftCalendar.month.subtract(1,"month"):this.rightCalendar.month.subtract(1,"month"),this.updateCalendars()},clickNext:function(a){var b=d(a.target).parents(".calendar");b.hasClass("left")?this.leftCalendar.month.add(1,"month"):this.rightCalendar.month.add(1,"month"),this.updateCalendars()},hoverDate:function(a){var b=d(a.target).attr("data-title"),c=b.substr(1,1),e=b.substr(3,1),f=d(a.target).parents(".calendar");f.hasClass("left")?this.container.find("input[name=daterangepicker_start]").val(this.leftCalendar.calendar[c][e].format(this.format)):this.container.find("input[name=daterangepicker_end]").val(this.rightCalendar.calendar[c][e].format(this.format))},setCustomDates:function(a,b){if(this.chosenLabel=this.locale.customRangeLabel,a.isAfter(b)){var d=this.endDate.diff(this.startDate);b=c(a).add(d,"ms")}this.startDate=a,this.endDate=b,this.updateView(),this.updateCalendars()},clickDate:function(a){var b,e,f=d(a.target).attr("data-title"),g=f.substr(1,1),h=f.substr(3,1),i=d(a.target).parents(".calendar");if(i.hasClass("left")){if(b=this.leftCalendar.calendar[g][h],e=this.endDate,"object"==typeof this.dateLimit){var j=c(b).add(this.dateLimit).startOf("day");e.isAfter(j)&&(e=j)}}else if(b=this.startDate,e=this.rightCalendar.calendar[g][h],"object"==typeof this.dateLimit){var k=c(e).subtract(this.dateLimit).startOf("day");b.isBefore(k)&&(b=k)}this.singleDatePicker&&i.hasClass("left")?e=b.clone():this.singleDatePicker&&i.hasClass("right")&&(b=e.clone()),i.find("td").removeClass("active"),d(a.target).addClass("active"),this.setCustomDates(b,e),this.timePicker||e.endOf("day"),this.singleDatePicker&&!this.timePicker&&this.clickApply()},clickApply:function(a){this.updateInputText(),this.hide(),this.element.trigger("apply.daterangepicker",this)},clickCancel:function(a){this.startDate=this.oldStartDate,this.endDate=this.oldEndDate,this.chosenLabel=this.oldChosenLabel,this.updateView(),this.updateCalendars(),this.hide(),this.element.trigger("cancel.daterangepicker",this)},updateMonthYear:function(a){var b=d(a.target).closest(".calendar").hasClass("left"),c=b?"left":"right",e=this.container.find(".calendar."+c),f=parseInt(e.find(".monthselect").val(),10),g=e.find(".yearselect").val();this[c+"Calendar"].month.month(f).year(g),this.updateCalendars()},updateTime:function(a){var b=d(a.target).closest(".calendar"),c=b.hasClass("left"),e=parseInt(b.find(".hourselect").val(),10),f=parseInt(b.find(".minuteselect").val(),10),g=0;if(this.timePickerSeconds&&(g=parseInt(b.find(".secondselect").val(),10)),this.timePicker12Hour){var h=b.find(".ampmselect").val();"PM"===h&&12>e&&(e+=12),"AM"===h&&12===e&&(e=0)}if(c){var i=this.startDate.clone();i.hour(e),i.minute(f),i.second(g),this.startDate=i,this.leftCalendar.month.hour(e).minute(f).second(g),this.singleDatePicker&&(this.endDate=i.clone())}else{var j=this.endDate.clone();j.hour(e),j.minute(f),j.second(g),this.endDate=j,this.singleDatePicker&&(this.startDate=j.clone()),this.rightCalendar.month.hour(e).minute(f).second(g)}this.updateView(),this.updateCalendars()},updateCalendars:function(){this.leftCalendar.calendar=this.buildCalendar(this.leftCalendar.month.month(),this.leftCalendar.month.year(),this.leftCalendar.month.hour(),this.leftCalendar.month.minute(),this.leftCalendar.month.second(),"left"),this.rightCalendar.calendar=this.buildCalendar(this.rightCalendar.month.month(),this.rightCalendar.month.year(),this.rightCalendar.month.hour(),this.rightCalendar.month.minute(),this.rightCalendar.month.second(),"right"),this.container.find(".calendar.left").empty().html(this.renderCalendar(this.leftCalendar.calendar,this.startDate,this.minDate,this.maxDate,"left")),this.container.find(".calendar.right").empty().html(this.renderCalendar(this.rightCalendar.calendar,this.endDate,this.singleDatePicker?this.minDate:this.startDate,this.maxDate,"right")),this.container.find(".ranges li").removeClass("active");var a=!0,b=0;for(var c in this.ranges)this.timePicker?this.startDate.isSame(this.ranges[c][0])&&this.endDate.isSame(this.ranges[c][1])&&(a=!1,this.chosenLabel=this.container.find(".ranges li:eq("+b+")").addClass("active").html()):this.startDate.format("YYYY-MM-DD")==this.ranges[c][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")==this.ranges[c][1].format("YYYY-MM-DD")&&(a=!1,this.chosenLabel=this.container.find(".ranges li:eq("+b+")").addClass("active").html()),b++;a&&(this.chosenLabel=this.container.find(".ranges li:last").addClass("active").html(),this.showCalendars())},buildCalendar:function(a,b,d,e,f,g){var h,i=c([b,a]).daysInMonth(),j=c([b,a,1]),k=c([b,a,i]),l=c(j).subtract(1,"month").month(),m=c(j).subtract(1,"month").year(),n=c([m,l]).daysInMonth(),o=j.day(),p=[];for(p.firstDay=j,p.lastDay=k,h=0;6>h;h++)p[h]=[];var q=n-o+this.locale.firstDay+1;q>n&&(q-=7),o==this.locale.firstDay&&(q=n-6);var r,s,t=c([m,l,q,12,e,f]).zone(this.timeZone);for(h=0,r=0,s=0;42>h;h++,r++,t=c(t).add(24,"hour"))h>0&&r%7===0&&(r=0,s++),p[s][r]=t.clone().hour(d),t.hour(12),this.minDate&&p[s][r].format("YYYY-MM-DD")==this.minDate.format("YYYY-MM-DD")&&p[s][r].isBefore(this.minDate)&&"left"==g&&(p[s][r]=this.minDate.clone()),this.maxDate&&p[s][r].format("YYYY-MM-DD")==this.maxDate.format("YYYY-MM-DD")&&p[s][r].isAfter(this.maxDate)&&"right"==g&&(p[s][r]=this.maxDate.clone());return p},renderDropdowns:function(a,b,c){for(var d=a.month(),e=a.year(),f=c&&c.year()||e+5,g=b&&b.year()||e-50,h='";for(var l='",h+l},renderCalendar:function(a,b,c,e,f){var g='
          ';g+='',g+="",g+="",this.showWeekNumbers&&(g+=""),g+=!c||c.isBefore(a.firstDay)?'':"";var h=this.locale.monthNames[a[1][1].month()]+a[1][1].format(" YYYY");this.showDropdowns&&(h=this.renderDropdowns(a[1][1],c,e)),g+='",g+=!e||e.isAfter(a.lastDay)?'':"",g+="",g+="",this.showWeekNumbers&&(g+='"),d.each(this.locale.daysOfWeek,function(a,b){g+=""}),g+="",g+="",g+="";for(var i=0;6>i;i++){g+="",this.showWeekNumbers&&(g+='");for(var j=0;7>j;j++){var k="available ";k+=a[i][j].month()==a[1][1].month()?"":"off",c&&a[i][j].isBefore(c,"day")||e&&a[i][j].isAfter(e,"day")?k=" off disabled ":a[i][j].format("YYYY-MM-DD")==b.format("YYYY-MM-DD")?(k+=" active ",a[i][j].format("YYYY-MM-DD")==this.startDate.format("YYYY-MM-DD")&&(k+=" start-date "),a[i][j].format("YYYY-MM-DD")==this.endDate.format("YYYY-MM-DD")&&(k+=" end-date ")):a[i][j]>=this.startDate&&a[i][j]<=this.endDate&&(k+=" in-range ",a[i][j].isSame(this.startDate)&&(k+=" start-date "),a[i][j].isSame(this.endDate)&&(k+=" end-date "));var l="r"+i+"c"+j;g+='"}g+=""}g+="",g+="
          '+h+"
          '+this.locale.weekLabel+""+b+"
          '+a[i][0].week()+"'+a[i][j].date()+"
          ",g+="
          ";var m;if(this.timePicker){g+='
          ',g+=' : ",g+=' ",this.timePickerSeconds){for(g+=': "}if(this.timePicker12Hour){g+='"}g+="
          "}return g},remove:function(){this.container.remove(),this.element.off(".daterangepicker"),this.element.removeData("daterangepicker")}},d.fn.daterangepicker=function(a,b){ +return this.each(function(){var c=d(this);c.data("daterangepicker")&&c.data("daterangepicker").remove(),c.data("daterangepicker",new e(c,a,b))}),this}}),function(a){"use strict";a.module("ngBootstrap",[]).directive("input",["$compile","$parse","$filter",function(b,c,d){return{restrict:"E",require:"?ngModel",link:function(b,e,f,g){function h(a){return moment.isMoment(a)?a.toDate():a}function i(a){return moment.isMoment(a)?a:moment(a)}function j(a){return d("date")(h(a),l.format.replace(/Y/g,"y").replace(/D/g,"d"))}function k(a){return[j(a.startDate),j(a.endDate)].join(l.separator)}if("daterange"===f.type&&null!==g){var l={};l.format=f.format||"YYYY-MM-DD",l.separator=f.separator||" - ",l.minDate=f.minDate&&moment(f.minDate),l.maxDate=f.maxDate&&moment(f.maxDate),l.dateLimit=f.limit&&moment.duration.apply(this,f.limit.split(" ").map(function(a,b){return 0===b&&parseInt(a,10)||a})),l.ranges=f.ranges&&c(f.ranges)(b),l.locale=f.locale&&c(f.locale)(b),l.opens=f.opens||c(f.opens)(b),f.enabletimepicker&&(l.timePicker=!0,a.extend(l,c(f.enabletimepicker)(b))),g.$render=function(){g.$viewValue&&g.$viewValue.startDate&&e.val(k(g.$viewValue))},b.$watch(function(){return f.ngModel},function(a,c){return b[a]&&b[a].startDate?void(c===a&&(e.data("daterangepicker").startDate=i(b[a].startDate),e.data("daterangepicker").endDate=i(b[a].endDate),e.data("daterangepicker").updateView(),e.data("daterangepicker").updateCalendars(),e.data("daterangepicker").updateInputText())):void g.$setViewValue({startDate:moment().startOf("day"),endDate:moment().startOf("day")})}),e.daterangepicker(l,function(c,d,e){var f=g.$viewValue;a.equals(c,f.startDate)&&a.equals(d,f.endDate)||b.$apply(function(){g.$setViewValue({startDate:moment.isMoment(f.startDate)?c:c.toDate(),endDate:moment.isMoment(f.endDate)?d:d.toDate()}),g.$render()})})}}}}])}(angular),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/popup.html","uib/template/datepicker/year.html","uib/template/modal/backdrop.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$injector",function(a,b){var c=b.has("$animateCss")?b.get("$animateCss"):null;return{link:function(b,d,e){function f(){d.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),c?c(d,{addClass:"in",easing:"ease",to:{height:d[0].scrollHeight+"px"}}).start()["finally"](g):a.addClass(d,"in",{to:{height:d[0].scrollHeight+"px"}}).then(g)}function g(){d.removeClass("collapsing").addClass("collapse").css({height:"auto"})}function h(){return d.hasClass("collapse")||d.hasClass("in")?(d.css({height:d[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),void(c?c(d,{removeClass:"in",to:{height:"0"}}).start()["finally"](i):a.removeClass(d,"in",{to:{height:"0"}}).then(i))):i()}function i(){d.css({height:"0"}),d.removeClass("collapsing").addClass("collapse")}b.$eval(e.uibCollapse)||d.addClass("in").addClass("collapse").css({height:"auto"}),b.$watch(e.uibCollapse,function(a){a?h():f()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)}}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.uibAccordionTransclude]},function(a){a&&(b.find("span").html(""),b.find("span").append(a))})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function(a,b,c,d){a.closeable=!!b.close;var e=angular.isDefined(b.dismissOnTimeout)?c(b.dismissOnTimeout)(a.$parent):null;e&&d(function(){a.close()},parseInt(e,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);(!a||angular.isDefined(d.uncheckable))&&b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":null)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(){for(;s.length;)s.shift()}function g(a){if(angular.isUndefined(p[a].index))return p[a];for(var b=0,c=p.length;c>b;++b)if(p[b].index===a)return p[b]}function h(c,d,g){t||(angular.extend(c,{direction:g,active:!0}),angular.extend(o.currentSlide||{},{direction:g,active:!1}),e.enabled(b)&&!a.$currentTransition&&c.$element&&o.slides.length>1&&(c.$element.data(q,c.direction),o.currentSlide&&o.currentSlide.$element&&o.currentSlide.$element.data(q,c.direction),a.$currentTransition=!0,e.on("addClass",c.$element,function(b,c){if("close"===c&&(a.$currentTransition=null,e.off("addClass",b),s.length)){var d=s.pop(),g=a.indexOfSlide(d),i=g>o.getCurrentIndex()?"next":"prev";f(),h(d,g,i)}})),o.currentSlide=c,r=d,k())}function i(){m&&(c.cancel(m),m=null)}function j(b){b.length||(a.$currentTransition=null,f())}function k(){i();var b=+a.interval;!isNaN(b)&&b>0&&(m=c(l,b))}function l(){var b=+a.interval;n&&!isNaN(b)&&b>0&&p.length?a.next():a.pause()}var m,n,o=this,p=o.slides=a.slides=[],q="uib-slideDirection",r=-1,s=[];o.currentSlide=null;var t=!1;o.addSlide=function(b,c){b.$element=c,p.push(b),1===p.length||b.active?(a.$currentTransition&&(a.$currentTransition=null),o.select(p[p.length-1]),1===p.length&&a.play()):b.active=!1},o.getCurrentIndex=function(){return o.currentSlide&&angular.isDefined(o.currentSlide.index)?+o.currentSlide.index:r},o.next=a.next=function(){var b=(o.getCurrentIndex()+1)%p.length;return 0===b&&a.noWrap()?void a.pause():o.select(g(b),"next")},o.prev=a.prev=function(){var b=o.getCurrentIndex()-1<0?p.length-1:o.getCurrentIndex()-1;return a.noWrap()&&b===p.length-1?void a.pause():o.select(g(b),"prev")},o.removeSlide=function(a){angular.isDefined(a.index)&&p.sort(function(a,b){return+a.index>+b.index});var b=s.indexOf(a);-1!==b&&s.splice(b,1);var c=p.indexOf(a);p.splice(c,1),d(function(){p.length>0&&a.active?c>=p.length?o.select(p[c-1]):o.select(p[c]):r>c&&r--}),0===p.length&&(o.currentSlide=null,f())},o.select=a.select=function(b,c){var d=a.indexOfSlide(b);void 0===c&&(c=d>o.getCurrentIndex()?"next":"prev"),b&&b!==o.currentSlide&&!a.$currentTransition?h(b,d,c):b&&b!==o.currentSlide&&a.$currentTransition&&(s.push(b),b.active=!1)},a.indexOfSlide=function(a){return angular.isDefined(a.index)?+a.index:p.indexOf(a)},a.isActive=function(a){return o.currentSlide===a},a.pause=function(){a.noPause||(n=!1,i())},a.play=function(){n||(n=!0,k())},a.$on("$destroy",function(){t=!0,i()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",k),a.$watchCollection("slides",j)}]).directive("uibCarousel",function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",function(){return{require:"^uibCarousel",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)}),a.$watch("active",function(b){b&&d.select(a)})}}}).animation(".item",["$animateCss",function(a){function b(a,b,c){a.removeClass(b),c&&c()}var c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i+" "+h,f);return d.addClass(h),a(d,{addClass:i}).start().done(j),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i,f);return a(d,{addClass:i}).start().done(j),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","orderByFilter",function(a,b,c){function d(a){var b=[],d=a.split(""),e=a.indexOf("'");if(e>-1){var f=!1;a=a.split("");for(var g=e;g-1){a=a.split(""),d[e]="("+c.regex+")",a[e]="$";for(var f=e+1,g=e+c.key.length;g>f;f++)d[f]="",a[f]="$";a=a.join(""),b.push({index:e,apply:c.apply,matcher:c.regex})}}),{regex:new RegExp("^"+d.join("")+"$"),map:c(b,"index")}}function e(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function f(a){return parseInt(a,10)}function g(a,b){return a&&b?k(a,b):a}function h(a,b){return a&&b?k(a,b,!0):a}function i(a,b){var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function j(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function k(a,b,c){c=c?-1:1;var d=i(b,a.getTimezoneOffset());return j(a,c*(d-a.getTimezoneOffset()))}var l,m,n=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){l=b.id,this.parsers={},m=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a}},{key:"yy",regex:"\\d{2}",apply:function(a){this.year=+a+2e3}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|")},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|")},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=f(c+d),this.minutes+=f(c+e)}},{key:"ww",regex:"[0-4][0-9]|5[0-3]"},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]"},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s")},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|")},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|")},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|")}]},this.init(),this.parse=function(c,f,g){if(!angular.isString(c)||!f)return c;f=b.DATETIME_FORMATS[f]||f,f=f.replace(n,"\\$&"),b.id!==l&&this.init(),this.parsers[f]||(this.parsers[f]=d(f));var h=this.parsers[f],i=h.regex,j=h.map,k=c.match(i),m=!1;if(k&&k.length){var o,p;angular.isDate(g)&&!isNaN(g.getTime())?o={year:g.getFullYear(),month:g.getMonth(),date:g.getDate(),hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()}:(g&&a.warn("dateparser:","baseDate is not a valid date"),o={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var q=1,r=k.length;r>q;q++){var s=j[q-1];"Z"===s.matcher&&(m=!0),s.apply&&s.apply.call(o,k[q])}var t=m?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=m?Date.prototype.setUTCHours:Date.prototype.setHours;return e(o.year,o.month,o.date)&&(!angular.isDate(g)||isNaN(g.getTime())||m?(p=new Date(0),t.call(p,o.year,o.month,o.date),u.call(p,o.hours||0,o.minutes||0,o.seconds||0,o.milliseconds||0)):(p=new Date(g),t.call(p,o.year,o.month,o.date),u.call(p,o.hours,o.minutes,o.seconds,o.milliseconds))),p}},this.toTimezone=g,this.fromTimezone=h,this.timezoneToOffset=i,this.addDateMinutes=j,this.convertTimezoneToLocal=k}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},e={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/};return{getRawNode:function(a){return a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(){if(angular.isUndefined(c)){var b=angular.element('
          ');a.find("body").append(b),c=b[0].offsetWidth-b[0].clientWidth,c=isFinite(c)?c:0,b.remove()}return c},scrollParent:function(c,e){c=this.getRawNode(c);var f=e?d.hidden:d.normal,g=a[0].documentElement,h=b.getComputedStyle(c),i="absolute"===h.position,j=c.parentElement||g;if(j===g||"fixed"===h.position)return g;for(;j.parentElement&&j!==g;){var k=b.getComputedStyle(j);if(i&&"static"!==k.position&&(i=!1),!i&&f.test(k.overflow+k.overflowY+k.overflowX))break;j=j.parentElement}return j},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1?!0:!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=e.auto.test(a);return b&&(a=a.replace(e.auto,"")),a=a.split("-"),a[0]=a[0]||"top",e.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",e.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,f){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=f?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(e.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":e.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},positionArrow:function(a,c){a=this.getRawNode(a);var d=!0,f=a.querySelector(".tooltip-inner");if(f||(d=!1,f=a.querySelector(".popover-inner")),f){var g=d?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css({top:"",bottom:"",right:"",left:"",margin:""});var h="border-"+c[0]+"-width",i=b.getComputedStyle(g)[h],j="border-";j+=e.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],j+="-radius";var k=b.getComputedStyle(d?f:a)[j],l={top:"auto",bottom:"auto",left:"auto",right:"auto",margin:0};switch(c[0]){case"top":l.bottom=d?"0":"-"+i;break;case"bottom":l.top=d?"0":"-"+i;break;case"left":l.right=d?"0":"-"+i;break;case"right":l.left=d?"0":"-"+i}l[c[1]]=k,angular.element(g).css(l)}}}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position"]).value("$datepickerSuppressError",!1).constant("uibDatepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRows:4,yearColumns:5,minDate:null,maxDate:null,shortcutPropagation:!1,ngModelOptions:{}}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i){var j=this,k={$setViewValue:angular.noop},l={};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle"],function(c){j[c]=angular.isDefined(b[c])?d(b[c])(a.$parent):g[c]}),angular.forEach(["showWeeks","startingDay","yearRows","yearColumns","shortcutPropagation"],function(c){j[c]=angular.isDefined(b[c])?a.$parent.$eval(b[c]):g[c]}),angular.forEach(["minDate","maxDate"],function(c){b[c]?a.$parent.$watch(b[c],function(a){j[c]=a?angular.isDate(a)?i.fromTimezone(new Date(a),l.timezone):new Date(f(a,"medium")):null,j.refreshView()}):j[c]=g[c]?i.fromTimezone(new Date(g[c]),l.timezone):null}),angular.forEach(["minMode","maxMode"],function(c){b[c]?a.$parent.$watch(b[c],function(d){j[c]=a[c]=angular.isDefined(d)?d:b[c],("minMode"===c&&j.modes.indexOf(a.datepickerMode)j.modes.indexOf(j[c]))&&(a.datepickerMode=j[c])}):j[c]=a[c]=g[c]||null}),a.datepickerMode=a.datepickerMode||g.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),angular.isDefined(b.initDate)?(this.activeDate=i.fromTimezone(a.$parent.$eval(b.initDate),l.timezone)||new Date,a.$parent.$watch(b.initDate,function(a){a&&(k.$isEmpty(k.$modelValue)||k.$invalid)&&(j.activeDate=i.fromTimezone(a,l.timezone),j.refreshView())})):this.activeDate=new Date,a.disabled=angular.isDefined(b.disabled)||!1,angular.isDefined(b.ngDisabled)&&a.$parent.$watch(b.ngDisabled,function(b){a.disabled=b,j.refreshView()}),a.isActive=function(b){return 0===j.compare(b.date,j.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){k=a,l=a.$options||g.ngModelOptions,k.$modelValue&&(this.activeDate=k.$modelValue),k.$render=function(){j.render()}},this.render=function(){if(k.$viewValue){var a=new Date(k.$viewValue),b=!isNaN(a);b?this.activeDate=i.fromTimezone(a,l.timezone):h||e.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=k.$viewValue?new Date(k.$viewValue):null;b=i.fromTimezone(b,l.timezone),k.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=k.$viewValue?new Date(k.$viewValue):null;d=i.fromTimezone(d,l.timezone);var e={date:b,label:f(b,c.replace(/d!/,"dd")).replace(/M!/,"MM"),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),current:0===this.compare(b,new Date),customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=e),j.activeDate&&0===this.compare(e.date,j.activeDate)&&(a.activeDt=e),e},this.isDisabled=function(c){return a.disabled||this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===j.minMode){var c=k.$viewValue?i.fromTimezone(new Date(k.$viewValue),l.timezone):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=i.toTimezone(c,l.timezone),k.$setViewValue(c),k.$render()}else j.activeDate=b,a.datepickerMode=j.modes[j.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=j.activeDate.getFullYear()+a*(j.step.years||0),c=j.activeDate.getMonth()+a*(j.step.months||0);j.activeDate.setFullYear(b,c,1),j.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===j.maxMode&&1===b||a.datepickerMode===j.minMode&&-1===b||(a.datepickerMode=j.modes[j.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var m=function(){j.element[0].focus()};a.$on("uib:datepicker.focus",m),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),j.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(j.isDisabled(j.activeDate))return;a.select(j.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(j.handleKeyDown(c,b),j.refreshView()):a.toggleMode("up"===c?1:-1)}}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,3)},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=3;else if("right"===a)c+=1;else if("down"===a)c+=3;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1; +}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}).constant("uibDatepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepicker/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0,onOpenFocus:!0,altInputFormats:[]}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$parse","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function o(b){var c=j.parse(b,t,a.date);if(isNaN(c))for(var d=0;d
        "),a.ngModelOptions=angular.copy(C),a.ngModelOptions.timezone=null,z.attr({"ng-model":"date","ng-model-options":"ngModelOptions","ng-change":"dateSelection(date)","template-url":x}),A=angular.element(z.children()[0]),A.attr("template-url",y),G&&"month"===c.type&&(A.attr("datepicker-mode",'"month"'),A.attr("min-mode","month")),c.datepickerOptions){var l=a.$parent.$eval(c.datepickerOptions);l&&l.initDate&&(a.initDate=j.fromTimezone(l.initDate,C.timezone),A.attr("init-date","initDate"),delete l.initDate),angular.forEach(l,function(a,b){A.attr(n(b),a)})}angular.forEach(["minMode","maxMode"],function(b){c[b]&&(a.$parent.$watch(function(){return c[b]},function(c){a.watchData[b]=c}),A.attr(n(b),"watchData."+b))}),angular.forEach(["datepickerMode","shortcutPropagation"],function(b){if(c[b]){var d=e(c[b]),f={get:function(){return d(a.$parent)}};if(A.attr(n(b),"watchData."+b),"datepickerMode"===b){var g=d.assign;f.set=function(b){g(a.$parent,b)}}Object.defineProperty(a.watchData,b,f)}}),angular.forEach(["minDate","maxDate","initDate"],function(b){if(c[b]){var d=e(c[b]);a.$parent.$watch(d,function(c){("minDate"===b||"maxDate"===b)&&(F[b]=angular.isDate(c)?j.fromTimezone(new Date(c),C.timezone):new Date(i(c,"medium"))),a.watchData[b]=F[b]||j.fromTimezone(new Date(c),C.timezone)}),A.attr(n(b),"watchData."+b)}}),c.dateDisabled&&A.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRows","yearColumns"],function(a){angular.isDefined(c[a])&&A.attr(n(a),c[a])}),c.customClass&&A.attr("custom-class","customClass({ date: date, mode: mode })"),G?B.$formatters.push(function(b){return a.date=j.fromTimezone(b,C.timezone),b}):(B.$$parserName="date",B.$validators.date=q,B.$parsers.unshift(p),B.$formatters.push(function(b){return B.$isEmpty(b)?(a.date=b,b):(a.date=j.fromTimezone(b,C.timezone),t=t.replace(/M!/,"MM").replace(/d!/,"dd"),i(a.date,t))})),B.$viewChangeListeners.push(function(){a.date=o(B.$viewValue)}),b.bind("keydown",s),D=d(z)(a),z.remove(),v?f.find("body").append(D):b.after(D),a.$on("$destroy",function(){a.isOpen===!0&&(g.$$phase||a.$apply(function(){a.isOpen=!1})),D.remove(),b.unbind("keydown",s),f.unbind("click",r)})},a.getText=function(b){return a[b+"Text"]||k[b+"Text"]},a.isDisabled=function(b){return"today"===b&&(b=new Date),a.watchData.minDate&&a.compare(b,F.minDate)<0||a.watchData.maxDate&&a.compare(b,F.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?i(a.date,t):null;b.val(d),B.$setViewValue(d),u&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b){if("today"===b){var c=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(c.getFullYear(),c.getMonth(),c.getDate())):b=new Date(c.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(){a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&a.$parent.$watch(e(c.ngDisabled),function(b){a.disabled=b}),a.$watch("isOpen",function(c){c?a.disabled?a.isOpen=!1:(a.position=v?h.offset(b):h.position(b),a.position.top=a.position.top+b.prop("offsetHeight"),l(function(){w&&a.$broadcast("uib:datepicker.focus"),f.bind("click",r)},0,!1)):f.unbind("click",r)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b){c||(a.on("click",d),a.on("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b){c===b&&(c=null,a.off("click",d),a.off("keydown",e))};var d=function(a){if(c&&!(a&&"disabled"===c.getAutoClose()||a&&3===a.which)){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(c.focusToggleElement(),d()):c.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.appendToOpenClass,q=e.openClass,r=angular.noop,s=c.onToggle?d(c.onToggle):angular.noop,t=!1,u=null,v=!1,w=i.find("body");b.addClass("dropdown"),this.init=function(){if(c.isOpen&&(m=d(c.isOpen),r=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),angular.isDefined(c.dropdownAppendTo)){var e=d(c.dropdownAppendTo)(o);e&&(u=angular.element(e))}t=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.keyboardNav),t&&!u&&(u=w),u&&n.dropdownMenu&&(u.append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return v},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(u&&n.dropdownMenu){var e,i,m=h.positionElements(b,n.dropdownMenu,"bottom-left",!0);if(e={top:m.top+"px",display:c?"block":"none"},i=n.dropdownMenu.hasClass("dropdown-menu-right"),i?(e.left="auto",e.right=window.innerWidth-(m.left+b.prop("offsetWidth"))+"px"):(e.left=m.left+"px",e.right="auto"),!t){var v=h.offset(u);e.top=m.top-v.top+"px",i?e.right=window.innerWidth-(m.left-v.left+b.prop("offsetWidth"))+"px":e.left=m.left-v.left+"px"}n.dropdownMenu.css(e)}var w=u?u:b;if(g[c?"addClass":"removeClass"](w,u?p:q).then(function(){angular.isDefined(c)&&c!==d&&s(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var x=angular.element('');n.dropdownMenu.replaceWith(x),n.dropdownMenu=x}f.close(o),n.selectedOption=null}angular.isFunction(r)&&r(a,c)}),a.$on("$locationChangeSuccess",function(){"disabled"!==o.getAutoClose()&&(o.isOpen=!1)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c0&&(b=t.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function l(){if(p&&-1===i()){var a=q;m(p,q,function(){a=null}),p=void 0,q=void 0}}function m(a,c,d,e){function g(){g.done||(g.done=!0,b(a,{event:"leave"}).start().then(function(){a.remove(),e&&e.resolve()}),c.$destroy(),d&&d())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(v.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function n(a){if(a.isDefaultPrevented())return a;var b=t.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){v.dismiss(b.key,"escape key press")}));break;case 9:v.loadFocusElementList(b);var c=!1;a.shiftKey?v.isFocusInFirstItem(a)&&(c=v.focusLastFocusableElement()):v.isFocusInLastItem(a)&&(c=v.focusFirstFocusableElement()),c&&(a.preventDefault(),a.stopPropagation())}}function o(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var p,q,r,s="modal-open",t=h.createNew(),u=g.createNew(),v={NOW_CLOSING_EVENT:"modal.stack.now-closing"},w=0,x="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(i,function(a){q&&(q.index=a)}),c.on("keydown",n),e.$on("$destroy",function(){c.off("keydown",n)}),v.open=function(b,f){var g=c[0].activeElement,h=f.openedClass||s;k(!1),t.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),u.put(h,b);var j=f.appendTo,l=i();if(!j.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");l>=0&&!p&&(q=e.$new(!0),q.modalOptions=f,q.index=l,p=angular.element('
        '),p.attr("backdrop-class",f.backdropClass),f.animation&&p.attr("modal-animation","true"),d(p)(q),a.enter(p,j));var m=angular.element('
        ');m.attr({"template-url":f.windowTemplateUrl,"window-class":f.windowClass,"window-top-class":f.windowTopClass,size:f.size,index:t.length()-1,animate:"animate"}).html(f.content),f.animation&&m.attr("modal-animation","true"),a.enter(m,j).then(function(){d(m)(f.scope),a.addClass(j,h)}),t.top().value.modalDomEl=m,t.top().value.modalOpener=g,v.clearFocusListCache()},v.close=function(a,b){var c=t.get(a);return c&&o(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),j(a,c.value.modalOpener),!0):!c},v.dismiss=function(a,b){var c=t.get(a);return c&&o(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),j(a,c.value.modalOpener),!0):!c},v.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},v.getTop=function(){return t.top()},v.modalRendered=function(a){var b=t.get(a);b&&b.value.renderDeferred.resolve()},v.focusFirstFocusableElement=function(){return r.length>0?(r[0].focus(),!0):!1},v.focusLastFocusableElement=function(){return r.length>0?(r[r.length-1].focus(),!0):!1},v.isFocusInFirstItem=function(a){return r.length>0?(a.target||a.srcElement)===r[0]:!1},v.isFocusInLastItem=function(a){return r.length>0?(a.target||a.srcElement)===r[r.length-1]:!1},v.clearFocusListCache=function(){r=[],w=0},v.loadFocusElementList=function(a){if((void 0===r||!r.length)&&a){var b=a.value.modalDomEl;b&&b.length&&(r=b[0].querySelectorAll(x))}},v}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return r}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=c.all([i(e),g.resolve(e.resolve,{},null,null)]);return q=k=c.all([k]).then(j,j).then(function(a){var c=e.scope||b,d=c.$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var g,i={};e.controller&&(i.$scope=d,i.$uibModalInstance=p,angular.forEach(a[1],function(a,b){i[b]=a}),g=f(e.controller,i),e.controllerAs&&(e.bindToController&&(g.$close=d.$close,g.$dismiss=d.$dismiss,angular.extend(g,c)),d[e.controllerAs]=g)),h.open(p,{scope:d,deferred:l,renderDeferred:o,closedDeferred:n,content:a[0],animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo}),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===q&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b.init=function(e,f){b.ngModelCtrl=e,b.config=f,e.$render=function(){b.render()},d.itemsPerPage?c.$parent.$watch(a(d.itemsPerPage),function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()}):b.itemsPerPage=f.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()}}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var m=f(h,h,h===a);c.push(m)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var n=f(d-1,"...",!1);c.unshift(n)}if(l){if(3===d){var o=f(2,"2",!1);c.unshift(o)}var p=f(1,"1",!1);c.unshift(p)}}if(b>e){if(!l||b-2>e){var q=f(e+1,"...",!1);c.push(q)}if(l){if(e===b-2){var r=f(b-1,b-1,!1);c.push(r)}var s=f(b,b,!1);c.push(s)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,d.create(this,a,b),b.maxSize&&a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()});var m=this.render;this.render=function(){m(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},replace:!0,link:function(a,c,d,e){var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),o.removeTop(),b=null)}}var o=m.createNew();return h.on("keypress",n),k.$on("$destroy",function(){h.off("keypress",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="
        ';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){M.isOpen?q():m()}function m(){(!L||a.$eval(d[k+"Enable"]))&&(u(),x(),M.popupDelay?G||(G=g(r,M.popupDelay,!1)):r())}function q(){s(),M.popupCloseDelay?H||(H=g(t,M.popupCloseDelay,!1)):t()}function r(){return s(),u(),M.content?(v(),void M.$evalAsync(function(){M.isOpen=!0,y(!0),R()})):angular.noop}function s(){G&&(g.cancel(G),G=null),I&&(g.cancel(I),I=null)}function t(){M&&M.$evalAsync(function(){M.isOpen=!1,y(!1),M.animation?F||(F=g(w,150,!1)):w()})}function u(){H&&(g.cancel(H),H=null),F&&(g.cancel(F),F=null)}function v(){D||(E=M.$new(),D=c(E,function(a){J?h.find("body").append(a):b.after(a)}),z())}function w(){s(),u(),A(),D&&(D.remove(),D=null),E&&(E.$destroy(),E=null)}function x(){M.title=d[k+"Title"],P?M.content=P(a):M.content=d[e],M.popupClass=d[k+"Class"],M.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=parseInt(d[k+"PopupDelay"],10),c=parseInt(d[k+"PopupCloseDelay"],10);M.popupDelay=isNaN(b)?n.popupDelay:b,M.popupCloseDelay=isNaN(c)?n.popupCloseDelay:c}function y(b){O&&angular.isFunction(O.assign)&&O.assign(a,b)}function z(){Q.length=0,P?(Q.push(a.$watch(P,function(a){M.content=a,!a&&M.isOpen&&t()})),Q.push(E.$watch(function(){N||(N=!0,E.$$postDigest(function(){N=!1,M&&M.isOpen&&R()}))}))):Q.push(d.$observe(e,function(a){M.content=a,!a&&M.isOpen?t():R()})),Q.push(d.$observe(k+"Title",function(a){M.title=a,M.isOpen&&R()})),Q.push(d.$observe(k+"Placement",function(a){M.placement=a?a:n.placement,M.isOpen&&R()}))}function A(){Q.length&&(angular.forEach(Q,function(a){a()}),Q.length=0)}function B(a){M&&M.isOpen&&D&&(b[0].contains(a.target)||D[0].contains(a.target)||q())}function C(){var a=d[k+"Trigger"];S(),K=p(a),"none"!==K.show&&K.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===K.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(K.hide[c],q)),b.on("keypress",function(a){27===a.which&&q()})})}var D,E,F,G,H,I,J=angular.isDefined(n.appendToBody)?n.appendToBody:!1,K=p(void 0),L=angular.isDefined(d[k+"Enable"]),M=a.$new(!0),N=!1,O=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,P=n.useContentExp?l(d[e]):!1,Q=[],R=function(){D&&D.html()&&(I||(I=g(function(){D.css({top:0,left:0});var a=i.positionElements(b,D,M.placement,J);D.css({top:a.top+"px",left:a.left+"px",visibility:"visible"}),n.placementClassPrefix&&D.removeClass("top bottom left right"),D.removeClass(n.placementClassPrefix+"top "+n.placementClassPrefix+"top-left "+n.placementClassPrefix+"top-right "+n.placementClassPrefix+"bottom "+n.placementClassPrefix+"bottom-left "+n.placementClassPrefix+"bottom-right "+n.placementClassPrefix+"left "+n.placementClassPrefix+"left-top "+n.placementClassPrefix+"left-bottom "+n.placementClassPrefix+"right "+n.placementClassPrefix+"right-top "+n.placementClassPrefix+"right-bottom");var c=a.placement.split("-");D.addClass(c[0],n.placementClassPrefix+a.placement),i.positionArrow(D,a.placement),I=null},0,!1)))};M.origScope=a,M.isOpen=!1,o.add(M,{close:t}),M.contentExp=function(){return M.content},d.$observe("disabled",function(a){a&&s(),a&&M.isOpen&&t()}),O&&a.$watch(O,function(a){M&&!a===M.isOpen&&j()});var S=function(){K.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j))}),K.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};C();var T=a.$eval(d[k+"Animation"]);M.animation=angular.isDefined(T)?!!T:n.animation;var U,V=k+"AppendToBody";U=V in d&&void 0===d[V]?!0:a.$eval(d[V]), +J=angular.isDefined(U)?U:J,J&&a.$on("$locationChangeSuccess",function(){M.isOpen&&t()}),a.$on("$destroy",function(){S(),w(),o.remove(M),M=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}else c.addClass("top");b.popupClass&&c.addClass(b.popupClass),b.animation()&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){var d=this,e=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(a.max)?a.max:c.max,this.addBar=function(b,c,f){e||c.css({transition:"none"}),this.bars.push(b),b.max=a.max,b.title=f&&angular.isDefined(f.title)?f.title:"progressbar",b.$watch("value",function(a){b.recalculatePercentage()}),b.recalculatePercentage=function(){var a=d.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);a>100&&(b.percent-=a-100)},b.$on("$destroy",function(){c=null,d.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("max",function(b){d.bars.forEach(function(b){b.max=a.max,b.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{max:"=?"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop};this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(d.$viewValue===b?0:b),d.$render())},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){var b=this,c=b.tabs=a.tabs=[];b.select=function(a){angular.forEach(c,function(b){b.active&&b!==a&&(b.active=!1,b.onDeselect(),a.selectCalled=!1)}),a.active=!0,a.selectCalled||(a.onSelect(),a.selectCalled=!0)},b.addTab=function(a){c.push(a),1===c.length&&a.active!==!1?a.active=!0:a.active?b.select(a):a.active=!1},b.removeTab=function(a){var e=c.indexOf(a);if(a.active&&c.length>1&&!d){var f=e===c.length-1?e-1:e+1;b.select(c[f])}c.splice(e,1)};var d;a.$on("$destroy",function(){d=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{type:"@"},controller:"UibTabsetController",templateUrl:"uib/template/tabs/tabset.html",link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:"uib/template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(b,c,d,e,f){b.$watch("active",function(a){a&&e.select(b)}),b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),b.select=function(){b.disabled||(b.active=!0)},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=+a.hours,c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c?(a.showMeridian&&(12===b&&(b=0),a.meridian===t[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes;return b>=0&&60>b?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a){return null===a?"":angular.isDefined(a)&&a.toString().length<2?"0"+a:a.toString()}function l(a){m(),s.$setViewValue(new Date(r)),n(a)}function m(){s.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(s.$modelValue){var c=r.getHours(),d=r.getMinutes(),e=r.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c),"m"!==b&&(a.minutes=k(d)),a.meridian=r.getHours()<12?t[0]:t[1],"s"!==b&&(a.seconds=k(e)),a.meridian=r.getHours()<12?t[0]:t[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=t[0]}function o(a){r=q(r,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}var r=new Date,s={$setViewValue:angular.noop},t=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){s=b,s.$render=this.render,s.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2),i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var u=g.hourStep;c.hourStep&&a.$parent.$watch(d(c.hourStep),function(a){u=+a});var v=g.minuteStep;c.minuteStep&&a.$parent.$watch(d(c.minuteStep),function(a){v=+a});var w;a.$parent.$watch(d(c.min),function(a){var b=new Date(a);w=isNaN(b)?void 0:b});var x;a.$parent.$watch(d(c.max),function(a){var b=new Date(a);x=isNaN(b)?void 0:b});var y=!1;c.ngDisabled&&a.$parent.$watch(d(c.ngDisabled),function(a){y=a}),a.noIncrementHours=function(){var a=p(r,60*u);return y||a>x||r>a&&w>a},a.noDecrementHours=function(){var a=p(r,60*-u);return y||w>a||a>r&&a>x},a.noIncrementMinutes=function(){var a=p(r,v);return y||a>x||r>a&&w>a},a.noDecrementMinutes=function(){var a=p(r,-v);return y||w>a||a>r&&a>x},a.noIncrementSeconds=function(){var a=q(r,z);return y||a>x||r>a&&w>a},a.noDecrementSeconds=function(){var a=q(r,-z);return y||w>a||a>r&&a>x},a.noToggleMeridian=function(){return r.getHours()<12?y||p(r,720)>x:y||p(r,-720)0};b.bind("mousewheel wheel",function(b){y||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){y||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.bind("mousewheel wheel",function(b){y||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.bind("keydown",function(b){y||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.bind("keydown",function(b){y||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.bind("keydown",function(b){y||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){s.$setViewValue(null),s.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c),angular.isDefined(d)&&(a.invalidSeconds=d)};a.updateHours=function(){var a=h(),b=i();s.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(a),r.setMinutes(b),w>r||r>x?e(!0):l("h")):e(!0)},b.bind("blur",function(b){s.$setTouched(),null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours)})}),a.updateMinutes=function(){var a=i(),b=h();s.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(b),r.setMinutes(a),w>r||r>x?e(void 0,!0):l("m")):e(void 0,!0)},c.bind("blur",function(b){s.$setTouched(),null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();s.$setDirty(),angular.isDefined(a)?(r.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.bind("blur",function(b){!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=s.$viewValue;isNaN(b)?(s.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(r=b),w>r||r>x?(s.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*u*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-u*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*v)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-v)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(z)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-z)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(r.getHours()<12?60:-60)):a.meridian=a.meridian===t[0]?t[1]:t[0])},a.blur=function(){s.$setTouched()}}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),Y()}function o(){N.position=D?l.offset(b):l.position(b),N.position.top+=b.prop("offsetHeight")}var p,q,r=[9,13,27,38,40],s=200,t=a.$eval(c.typeaheadMinLength);t||0===t||(t=1);var u=a.$eval(c.typeaheadWaitMs)||0,v=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){v=a!==!1});var w,x,y=e(c.typeaheadLoading).assign||angular.noop,z=e(c.typeaheadOnSelect),A=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,B=e(c.typeaheadNoResults).assign||angular.noop,C=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,D=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,E=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,F=a.$eval(c.typeaheadFocusFirst)!==!1,G=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,H=e(c.typeaheadIsOpen).assign||angular.noop,I=a.$eval(c.typeaheadShowHint)||!1,J=e(c.ngModel),K=e(c.ngModel+"($$$p)"),L=function(b,c){return angular.isFunction(J(a))&&q&&q.$options&&q.$options.getterSetter?K(b,{$$$p:c}):J.assign(b,c)},M=m.parse(c.uibTypeahead),N=a.$new(),O=a.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q,R;I&&(Q=angular.element("
        "),Q.css("position","relative"),b.after(Q),R=b.clone(),R.attr("placeholder",""),R.val(""),R.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),Q.append(R),R.after(b));var S=angular.element("
        ");S.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&S.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&S.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var T=function(){I&&R.val("")},U=function(){N.matches=[],N.activeIdx=-1,b.attr("aria-expanded",!1),T()},V=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",V(a))});var W=function(a,b){return N.matches.length>b&&a?a.toUpperCase()===N.matches[b].label.toUpperCase():!1},X=function(c,d){var e={$viewValue:c};y(a,!0),B(a,!1),f.when(M.source(a,e)).then(function(f){var g=c===p.$viewValue;if(g&&w)if(f&&f.length>0){N.activeIdx=F?0:-1,B(a,!1),N.matches.length=0;for(var h=0;h0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?R.val(c+i.slice(c.length)):R.val("")}}else U(),B(a,!0);g&&y(a,!1)},function(){U(),y(a,!1),B(a,!0)})};D&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var Y=k(function(){N.matches.length&&o(),N.moveInProgress=!1},s);N.moveInProgress=!1,N.query=void 0;var Z,$=function(a){Z=g(function(){X(a)},u)},_=function(){Z&&g.cancel(Z)};U(),N.assignIsOpen=function(b){H(a,b)},N.select=function(d,e){var f,h,i={};x=!0,i[M.itemName]=h=N.matches[d].model,f=M.modelMapper(a,i),L(a,f),p.$setValidity("editable",!0),p.$setValidity("parse",!0),z(a,{$item:h,$model:f,$label:M.viewMapper(a,i),$event:e}),U(),N.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(a){if(0!==N.matches.length&&-1!==r.indexOf(a.which)){if(-1===N.activeIdx&&(9===a.which||13===a.which))return U(),void N.$digest();a.preventDefault();var b;switch(a.which){case 9:case 13:N.$apply(function(){angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(N.activeIdx,a)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(N.activeIdx,a)});break;case 27:a.stopPropagation(),U(),N.$digest();break;case 38:N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop;break;case 40:N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop}}}),b.bind("focus",function(a){w=!0,0!==t||p.$viewValue||g(function(){X(p.$viewValue,a)},0)}),b.bind("blur",function(a){A&&N.matches.length&&-1!==N.activeIdx&&!x&&(x=!0,N.$apply(function(){angular.isObject(N.debounceUpdate)&&angular.isNumber(N.debounceUpdate.blur)?k(function(){N.select(N.activeIdx,a)},N.debounceUpdate.blur):N.select(N.activeIdx,a)})),!v&&p.$error.editable&&(p.$viewValue="",b.val("")),w=!1,x=!1});var aa=function(a){b[0]!==a.target&&3!==a.which&&0!==N.matches.length&&(U(),j.$$phase||N.$digest())};h.on("click",aa),a.$on("$destroy",function(){h.off("click",aa),(D||E)&&ba.remove(),D&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),S.remove(),I&&Q.remove()});var ba=d(S)(N);D?h.find("body").append(ba):E?angular.element(E).eq(0).append(ba):b.after(ba),this.init=function(b,c){p=b,q=c,N.debounceUpdate=p.$options&&e(p.$options.debounce)(a),p.$parsers.unshift(function(b){return w=!0,0===t||b&&b.length>=t?u>0?(_(),$(b)):X(b):(y(a,!1),_(),U()),v?b:b?void p.$setValidity("editable",!1):(p.$setValidity("editable",!0),null)}),p.$formatters.push(function(b){var c,d,e={};return v||p.$setValidity("editable",!0),C?(e.$model=b,C(a,e)):(e[M.itemName]=b,c=M.viewMapper(a,e),e[M.itemName]=void 0,d=M.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"$&"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'
        \n
        \n

        \n
        {{heading}}
        \n

        \n
        \n
        \n
        \n
        \n
        \n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion.html",'
        ')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/carousel.html",'')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'
        \n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'
        \n \n \n \n
        ')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
        {{::label.abbr}}
        {{ weekNumbers[$index] }}\n \n
        \n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
        \n \n
        \n')}]),angular.module("uib/template/datepicker/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/popup.html",'\n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){ +a.put("uib/template/datepicker/year.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
        \n \n
        \n')}]),angular.module("uib/template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/backdrop.html",'\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html",'\n')}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'
        \n
        \n
        \n
        \n')}]),angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-html-unsafe-popup.html",'
        \n
        \n
        \n
        \n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'
        \n
        \n
        \n
        \n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'
        \n
        \n
        \n
        \n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'
        \n
        \n\n
        \n

        \n
        \n
        \n
        \n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'
        \n
        \n\n
        \n

        \n
        \n
        \n
        \n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'
        \n
        \n\n
        \n

        \n
        \n
        \n
        \n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'
        \n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'
        ')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'
        \n
        \n
        \n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'\n ({{ $index < value ? \'*\' : \' \' }})\n \n\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'
      • \n
        {{heading}}
        \n
      • \n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'
        \n \n
        \n
        \n
        \n
        \n
        \n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'\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')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.tabs").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),function(a){"use strict";"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=a():"undefined"!=typeof Package?Sortable=a():window.Sortable=a()}(function(){"use strict";function a(a,b){if(!a||!a.nodeType||1!==a.nodeType)throw"Sortable: `el` must be HTMLElement, and not "+{}.toString.call(a);this.el=a,this.options=b=r({},b),a[L]=this;var c={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(a.nodeName)?"li":">*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",ignore:"a, img",filter:null,animation:0,setData:function(a,b){a.setData("Text",b.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1};for(var d in c)!(d in b)&&(b[d]=c[d]);V(b);for(var f in this)"_"===f.charAt(0)&&(this[f]=this[f].bind(this));this.nativeDraggable=b.forceFallback?!1:P,e(a,"mousedown",this._onTapStart),e(a,"touchstart",this._onTapStart),this.nativeDraggable&&(e(a,"dragover",this),e(a,"dragenter",this)),T.push(this._onDragOver),b.store&&this.sort(b.store.get(this))}function b(a){v&&v.state!==a&&(h(v,"display",a?"none":""),!a&&v.state&&w.insertBefore(v,s),v.state=a)}function c(a,b,c){if(a){c=c||N,b=b.split(".");var d=b.shift().toUpperCase(),e=new RegExp("\\s("+b.join("|")+")(?=\\s)","g");do if(">*"===d&&a.parentNode===c||(""===d||a.nodeName.toUpperCase()==d)&&(!b.length||((" "+a.className+" ").match(e)||[]).length==b.length))return a;while(a!==c&&(a=a.parentNode))}return null}function d(a){a.dataTransfer&&(a.dataTransfer.dropEffect="move"),a.preventDefault()}function e(a,b,c){a.addEventListener(b,c,!1)}function f(a,b,c){a.removeEventListener(b,c,!1)}function g(a,b,c){if(a)if(a.classList)a.classList[c?"add":"remove"](b);else{var d=(" "+a.className+" ").replace(K," ").replace(" "+b+" "," ");a.className=(d+(c?" "+b:"")).replace(K," ")}}function h(a,b,c){var d=a&&a.style;if(d){if(void 0===c)return N.defaultView&&N.defaultView.getComputedStyle?c=N.defaultView.getComputedStyle(a,""):a.currentStyle&&(c=a.currentStyle),void 0===b?c:c[b];b in d||(b="-webkit-"+b),d[b]=c+("string"==typeof c?"":"px")}}function i(a,b,c){if(a){var d=a.getElementsByTagName(b),e=0,f=d.length;if(c)for(;f>e;e++)c(d[e],e);return d}return[]}function j(a,b,c,d,e,f,g){var h=N.createEvent("Event"),i=(a||b[L]).options,j="on"+c.charAt(0).toUpperCase()+c.substr(1);h.initEvent(c,!0,!0),h.to=b,h.from=e||b,h.item=d||b,h.clone=v,h.oldIndex=f,h.newIndex=g,b.dispatchEvent(h),i[j]&&i[j].call(a,h)}function k(a,b,c,d,e,f){var g,h,i=a[L],j=i.options.onMove;return g=N.createEvent("Event"),g.initEvent("move",!0,!0),g.to=b,g.from=a,g.dragged=c,g.draggedRect=d,g.related=e||b,g.relatedRect=f||b.getBoundingClientRect(),a.dispatchEvent(g),j&&(h=j.call(i,g)),h}function l(a){a.draggable=!1}function m(){R=!1}function n(a,b){var c=a.lastElementChild,d=c.getBoundingClientRect();return(b.clientY-(d.top+d.height)>5||b.clientX-(d.right+d.width)>5)&&c}function o(a){for(var b=a.tagName+a.className+a.src+a.href+a.textContent,c=b.length,d=0;c--;)d+=b.charCodeAt(c);return d.toString(36)}function p(a){var b=0;if(!a||!a.parentNode)return-1;for(;a&&(a=a.previousElementSibling);)"TEMPLATE"!==a.nodeName.toUpperCase()&&b++;return b}function q(a,b){var c,d;return function(){void 0===c&&(c=arguments,d=this,setTimeout(function(){1===c.length?a.call(d,c[0]):a.apply(d,c),c=void 0},b))}}function r(a,b){if(a&&b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}var s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J={},K=/\s+/g,L="Sortable"+(new Date).getTime(),M=window,N=M.document,O=M.parseInt,P=!!("draggable"in N.createElement("div")),Q=function(a){return a=N.createElement("x"),a.style.cssText="pointer-events:auto","auto"===a.style.pointerEvents}(),R=!1,S=Math.abs,T=([].slice,[]),U=q(function(a,b,c){if(c&&b.scroll){var d,e,f,g,h=b.scrollSensitivity,i=b.scrollSpeed,j=a.clientX,k=a.clientY,l=window.innerWidth,m=window.innerHeight;if(z!==c&&(y=b.scroll,z=c,y===!0)){y=c;do if(y.offsetWidth=l-j)-(h>=j),g=(h>=m-k)-(h>=k),(f||g)&&(d=M)),(J.vx!==f||J.vy!==g||J.el!==d)&&(J.el=d,J.vx=f,J.vy=g,clearInterval(J.pid),d&&(J.pid=setInterval(function(){d===M?M.scrollTo(M.pageXOffset+f*i,M.pageYOffset+g*i):(g&&(d.scrollTop+=g*i),f&&(d.scrollLeft+=f*i))},24)))}},30),V=function(a){var b=a.group;b&&"object"==typeof b||(b=a.group={name:b}),["pull","put"].forEach(function(a){a in b||(b[a]=!0)}),a.groups=" "+b.name+(b.put.join?" "+b.put.join(" "):"")+" "};return a.prototype={constructor:a,_onTapStart:function(a){var b=this,d=this.el,e=this.options,f=a.type,g=a.touches&&a.touches[0],h=(g||a).target,i=h,k=e.filter;if(!("mousedown"===f&&0!==a.button||e.disabled)&&(h=c(h,e.draggable,d))){if(D=p(h),"function"==typeof k){if(k.call(this,a,h,this))return j(b,i,"filter",h,d,D),void a.preventDefault()}else if(k&&(k=k.split(",").some(function(a){return a=c(i,a.trim(),d),a?(j(b,a,"filter",h,d,D),!0):void 0})))return void a.preventDefault();(!e.handle||c(i,e.handle,d))&&this._prepareDragStart(a,g,h)}},_prepareDragStart:function(a,b,c){var d,f=this,h=f.el,j=f.options,k=h.ownerDocument;c&&!s&&c.parentNode===h&&(G=a,w=h,s=c,t=s.parentNode,x=s.nextSibling,F=j.group,d=function(){f._disableDelayedDrag(),s.draggable=!0,g(s,f.options.chosenClass,!0),f._triggerDragStart(b)},j.ignore.split(",").forEach(function(a){i(s,a.trim(),l)}),e(k,"mouseup",f._onDrop),e(k,"touchend",f._onDrop),e(k,"touchcancel",f._onDrop),j.delay?(e(k,"mouseup",f._disableDelayedDrag),e(k,"touchend",f._disableDelayedDrag),e(k,"touchcancel",f._disableDelayedDrag),e(k,"mousemove",f._disableDelayedDrag),e(k,"touchmove",f._disableDelayedDrag),f._dragStartTimer=setTimeout(d,j.delay)):d())},_disableDelayedDrag:function(){var a=this.el.ownerDocument;clearTimeout(this._dragStartTimer),f(a,"mouseup",this._disableDelayedDrag),f(a,"touchend",this._disableDelayedDrag),f(a,"touchcancel",this._disableDelayedDrag),f(a,"mousemove",this._disableDelayedDrag),f(a,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(a){a?(G={target:s,clientX:a.clientX,clientY:a.clientY},this._onDragStart(G,"touch")):this.nativeDraggable?(e(s,"dragend",this),e(w,"dragstart",this._onDragStart)):this._onDragStart(G,!0);try{N.selection?N.selection.empty():window.getSelection().removeAllRanges()}catch(b){}},_dragStarted:function(){w&&s&&(g(s,this.options.ghostClass,!0),a.active=this,j(this,w,"start",s,w,D))},_emulateDragOver:function(){if(H){if(this._lastX===H.clientX&&this._lastY===H.clientY)return;this._lastX=H.clientX,this._lastY=H.clientY,Q||h(u,"display","none");var a=N.elementFromPoint(H.clientX,H.clientY),b=a,c=" "+this.options.group.name,d=T.length;if(b)do{if(b[L]&&b[L].options.groups.indexOf(c)>-1){for(;d--;)T[d]({clientX:H.clientX,clientY:H.clientY,target:a,rootEl:b});break}a=b}while(b=b.parentNode);Q||h(u,"display","")}},_onTouchMove:function(b){if(G){a.active||this._dragStarted(),this._appendGhost();var c=b.touches?b.touches[0]:b,d=c.clientX-G.clientX,e=c.clientY-G.clientY,f=b.touches?"translate3d("+d+"px,"+e+"px,0)":"translate("+d+"px,"+e+"px)";I=!0,H=c,h(u,"webkitTransform",f),h(u,"mozTransform",f),h(u,"msTransform",f),h(u,"transform",f),b.preventDefault()}},_appendGhost:function(){if(!u){var a,b=s.getBoundingClientRect(),c=h(s),d=this.options;u=s.cloneNode(!0),g(u,d.ghostClass,!1),g(u,d.fallbackClass,!0),h(u,"top",b.top-O(c.marginTop,10)),h(u,"left",b.left-O(c.marginLeft,10)),h(u,"width",b.width),h(u,"height",b.height),h(u,"opacity","0.8"),h(u,"position","fixed"),h(u,"zIndex","100000"),h(u,"pointerEvents","none"),d.fallbackOnBody&&N.body.appendChild(u)||w.appendChild(u),a=u.getBoundingClientRect(),h(u,"width",2*b.width-a.width),h(u,"height",2*b.height-a.height)}},_onDragStart:function(a,b){var c=a.dataTransfer,d=this.options;this._offUpEvents(),"clone"==F.pull&&(v=s.cloneNode(!0),h(v,"display","none"),w.insertBefore(v,s)),b?("touch"===b?(e(N,"touchmove",this._onTouchMove),e(N,"touchend",this._onDrop),e(N,"touchcancel",this._onDrop)):(e(N,"mousemove",this._onTouchMove),e(N,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,50)):(c&&(c.effectAllowed="move",d.setData&&d.setData.call(this,c,s)),e(N,"drop",this),setTimeout(this._dragStarted,0))},_onDragOver:function(a){var d,e,f,g=this.el,i=this.options,j=i.group,l=j.put,o=F===j,p=i.sort;if(void 0!==a.preventDefault&&(a.preventDefault(),!i.dragoverBubble&&a.stopPropagation()),I=!0,F&&!i.disabled&&(o?p||(f=!w.contains(s)):F.pull&&l&&(F.name===j.name||l.indexOf&&~l.indexOf(F.name)))&&(void 0===a.rootEl||a.rootEl===this.el)){if(U(a,i,this.el),R)return;if(d=c(a.target,i.draggable,g),e=s.getBoundingClientRect(),f)return b(!0),void(v||x?w.insertBefore(s,v||x):p||w.appendChild(s));if(0===g.children.length||g.children[0]===u||g===a.target&&(d=n(g,a))){if(d){if(d.animated)return;r=d.getBoundingClientRect()}b(o),k(w,g,s,e,d,r)!==!1&&(s.contains(g)||(g.appendChild(s),t=g),this._animate(e,s),d&&this._animate(r,d))}else if(d&&!d.animated&&d!==s&&void 0!==d.parentNode[L]){A!==d&&(A=d,B=h(d),C=h(d.parentNode));var q,r=d.getBoundingClientRect(),y=r.right-r.left,z=r.bottom-r.top,D=/left|right|inline/.test(B.cssFloat+B.display)||"flex"==C.display&&0===C["flex-direction"].indexOf("row"),E=d.offsetWidth>s.offsetWidth,G=d.offsetHeight>s.offsetHeight,H=(D?(a.clientX-r.left)/y:(a.clientY-r.top)/z)>.5,J=d.nextElementSibling,K=k(w,g,s,e,d,r);if(K!==!1){if(R=!0,setTimeout(m,30),b(o),1===K||-1===K)q=1===K;else if(D){var M=s.offsetTop,N=d.offsetTop;q=M===N?d.previousElementSibling===s&&!E||H&&E:N>M}else q=J!==s&&!G||H&&G;s.contains(g)||(q&&!J?g.appendChild(s):d.parentNode.insertBefore(s,q?J:d)),t=s.parentNode,this._animate(e,s),this._animate(r,d)}}}},_animate:function(a,b){var c=this.options.animation;if(c){var d=b.getBoundingClientRect();h(b,"transition","none"),h(b,"transform","translate3d("+(a.left-d.left)+"px,"+(a.top-d.top)+"px,0)"),b.offsetWidth,h(b,"transition","all "+c+"ms"),h(b,"transform","translate3d(0,0,0)"),clearTimeout(b.animated),b.animated=setTimeout(function(){h(b,"transition",""),h(b,"transform",""),b.animated=!1},c)}},_offUpEvents:function(){var a=this.el.ownerDocument;f(N,"touchmove",this._onTouchMove),f(a,"mouseup",this._onDrop),f(a,"touchend",this._onDrop),f(a,"touchcancel",this._onDrop)},_onDrop:function(b){var c=this.el,d=this.options;clearInterval(this._loopId),clearInterval(J.pid),clearTimeout(this._dragStartTimer),f(N,"mousemove",this._onTouchMove),this.nativeDraggable&&(f(N,"drop",this),f(c,"dragstart",this._onDragStart)),this._offUpEvents(),b&&(I&&(b.preventDefault(),!d.dropBubble&&b.stopPropagation()),u&&u.parentNode.removeChild(u),s&&(this.nativeDraggable&&f(s,"dragend",this),l(s),g(s,this.options.ghostClass,!1),g(s,this.options.chosenClass,!1),w!==t?(E=p(s),E>=0&&(j(null,t,"sort",s,w,D,E),j(this,w,"sort",s,w,D,E),j(null,t,"add",s,w,D,E),j(this,w,"remove",s,w,D,E))):(v&&v.parentNode.removeChild(v),s.nextSibling!==x&&(E=p(s),E>=0&&(j(this,w,"update",s,w,D,E),j(this,w,"sort",s,w,D,E)))),a.active&&((null===E||-1===E)&&(E=D),j(this,w,"end",s,w,D,E),this.save())),w=s=t=u=x=v=y=z=G=H=I=E=A=B=F=a.active=null)},handleEvent:function(a){var b=a.type;"dragover"===b||"dragenter"===b?s&&(this._onDragOver(a),d(a)):("drop"===b||"dragend"===b)&&this._onDrop(a)},toArray:function(){for(var a,b=[],d=this.el.children,e=0,f=d.length,g=this.options;f>e;e++)a=d[e],c(a,g.draggable,this.el)&&b.push(a.getAttribute(g.dataIdAttr)||o(a));return b},sort:function(a){var b={},d=this.el;this.toArray().forEach(function(a,e){var f=d.children[e];c(f,this.options.draggable,d)&&(b[a]=f)},this),a.forEach(function(a){b[a]&&(d.removeChild(b[a]),d.appendChild(b[a]))})},save:function(){var a=this.options.store;a&&a.set(this)},closest:function(a,b){return c(a,b||this.options.draggable,this.el)},option:function(a,b){var c=this.options;return void 0===b?c[a]:(c[a]=b,void("group"===a&&V(c)))},destroy:function(){var a=this.el;a[L]=null,f(a,"mousedown",this._onTapStart),f(a,"touchstart",this._onTapStart),this.nativeDraggable&&(f(a,"dragover",this),f(a,"dragenter",this)),Array.prototype.forEach.call(a.querySelectorAll("[draggable]"),function(a){a.removeAttribute("draggable")}),T.splice(T.indexOf(this._onDragOver),1),this._onDrop(),this.el=a=null}},a.utils={on:e,off:f,css:h,find:i,is:function(a,b){return!!c(a,b,a)},extend:r,throttle:q,closest:c,toggleClass:g,index:p},a.create=function(b,c){return new a(b,c)},a.version="1.4.2",a}),function(a){"use strict";"function"==typeof define&&define.amd?define(["angular","./Sortable"],a):"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?(require("angular"),a(angular,require("./Sortable")),module.exports="ng-sortable"):window.angular&&window.Sortable&&a(angular,Sortable)}(function(a,b){"use strict";var c="Sortable:ng-sortable";a.module("ng-sortable",[]).constant("ngSortableVersion","0.4.0").constant("ngSortableConfig",{}).directive("ngSortable",["$parse","ngSortableConfig",function(d,e){var f,g,h=function(a,b){var c=[].filter.call(a.childNodes,function(a){return 8===a.nodeType&&-1!==a.nodeValue.indexOf("ngRepeat:")})[0];if(!c)return function(){return null};c=c.nodeValue.match(/ngRepeat:\s*(?:\(.*?,\s*)?([^\s)]+)[\s)]+in\s+([^\s|]+)/);var e=d(c[2]);return function(){return e(b.$parent)||[]}};return{restrict:"AC",scope:{ngSortable:"=?"},link:function(d,i){function j(a,b){var c="on"+a.type.charAt(0).toUpperCase()+a.type.substr(1),d=p();n[c]&&n[c]({model:b||d[a.newIndex],models:d,oldIndex:a.oldIndex,newIndex:a.newIndex})}function k(e){var h=p();if(h){var i=e.oldIndex,j=e.newIndex;if(m!==e.from){var k=e.from[c]();f=k[i],e.clone?(f=a.copy(f),k.splice(b.utils.index(e.clone),0,k.splice(i,1)[0]),e.from.removeChild(e.clone)):k.splice(i,1),h.splice(j,0,f),e.from.insertBefore(e.item,g)}else h.splice(j,0,h.splice(i,1)[0]);d.$apply()}}var l,m=i[0],n=a.extend(d.ngSortable||{},e),o=[],p=h(m,d);m[c]=p,l=b.create(m,Object.keys(n).reduce(function(a,b){return a[b]=a[b]||n[b],a},{onStart:function(a){g=a.item.nextSibling,j(a),d.$apply()},onEnd:function(a){j(a,f),d.$apply()},onAdd:function(a){k(a),j(a,f),d.$apply()},onUpdate:function(a){k(a),j(a)},onRemove:function(a){j(a,f)},onSort:function(a){j(a)}})),i.on("$destroy",function(){a.forEach(o,function(a){a()}),l.destroy(),m[c]=null,m=null,o=null,l=null,g=null}),a.forEach(["sort","disabled","draggable","handle","animation","group","ghostClass","filter","onStart","onEnd","onAdd","onUpdate","onRemove","onSort"],function(a){o.push(d.$watch("ngSortable."+a,function(b){void 0!==b&&(n[a]=b,/^on[A-Z]/.test(a)||l.option(a,b))}))})}}}])}),function(a){"use strict";"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=a(require("./Sortable")):"function"==typeof define&&define.amd?define(["./Sortable"],a):window.SortableMixin=a(Sortable)}(function(a){"use strict";function b(a){return a.sortableOptions&&a.sortableOptions.model||g.model}function c(a){var c=b(a),d=a.state&&a.state[c]||a.props[c];return d.slice()}function d(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}var e,f,g={ref:"list",model:"items",animation:100,onStart:"handleStart",onEnd:"handleEnd",onAdd:"handleAdd",onUpdate:"handleUpdate",onRemove:"handleRemove",onSort:"handleSort",onFilter:"handleFilter",onMove:"handleMove"},h={sortableMixinVersion:"0.1.1",_sortableInstance:null,componentDidMount:function(){var h,i=d(d({},g),this.sortableOptions||{}),j=d({},i),k=function(a,b){var c=this[i[a]];c&&c.call(this,b,this._sortableInstance)}.bind(this);"onStart onEnd onAdd onSort onUpdate onRemove onFilter onMove".split(" ").forEach(function(a){j[a]=function(d){if("onStart"===a)e=d.item.nextElementSibling,f=this;else if("onAdd"===a||"onUpdate"===a){d.from.insertBefore(d.item,e);var g,h,i={},l={},m=d.oldIndex,n=d.newIndex,o=c(this);"onAdd"===a?(g=c(f),h=g.splice(m,1)[0],o.splice(n,0,h),l[b(f)]=g):o.splice(n,0,o.splice(m,1)[0]),i[b(this)]=o,j.stateHandler?this[j.stateHandler](i):this.setState(i),this!==f&&f.setState(l)}setTimeout(function(){k(a,d)},0)}.bind(this)},this),h=this.getDOMNode()?(this.refs[i.ref]||this).getDOMNode():this.refs[i.ref]||this,this._sortableInstance=a.create(h,j)},componentWillReceiveProps:function(a){var c={},d=b(this),e=a[d]; +e&&(c[d]=e,this.setState(c))},componentWillUnmount:function(){this._sortableInstance.destroy(),this._sortableInstance=null}};return h}),function(a,b){"use strict";angular.module("adf",["adf.provider","ui.bootstrap"]).value("adfTemplatePath","../src/templates/").value("rowTemplate",'').value("columnTemplate",'').value("adfVersion","0.11.0"),angular.module("adf").directive("adfDashboardColumn",["$log","$compile","$rootScope","adfTemplatePath","rowTemplate","dashboard",function(a,b,c,d,e,f){function g(a,b,d){var e=b.widgets;a.$apply(function(){e.splice(d.newIndex,0,e.splice(d.oldIndex,1)[0]),c.$broadcast("adfWidgetMovedInColumn")})}function h(a,b){for(var c=null,d=0;d0)for(var c=a.widgets.shift();c;)b.widgets.push(c),c=a.widgets.shift()}function i(a,b,c){return c=c||0,angular.isDefined(a.rows)&&angular.forEach(a.rows,function(a){angular.forEach(a.columns,function(a){a.widgets||(a.widgets=[]),angular.isDefined(b[c])&&(angular.isDefined(a.rows)||(h(b[c],a),c++)),c=i(a,b,c)})}),c}function j(a,b){return b=b||[],angular.isDefined(a.rows)&&angular.forEach(a.rows,function(a){angular.forEach(a.columns,function(a){b.push(a),j(a,b)})}),b}function k(a,b){var c=j(a),d=0;for(a.rows=angular.copy(b.rows);d{}
        ',e='
        \n
        \n loading ...\n
        \n
        ',f=function(){return!0};this.widget=function(b,c){var d=angular.extend({reload:!1,frameless:!1},c);if(d.edit){var e={reload:!0,immediate:!1,apply:f};angular.extend(e,d.edit),d.edit=e}return a[b]=d,this},this.widgetsPath=function(a){return b=a,this},this.structure=function(a,b){return c[a]=b,this},this.messageTemplate=function(a){return d=a,this},this.loadingTemplate=function(a){return e=a,this},this.$get=function(){var f=0;return{widgets:a,widgetsPath:b,structures:c,messageTemplate:d,loadingTemplate:e,id:function(){return(new Date).getTime()+"-"+ ++f},idEquals:function(a,b){return a&&b&&a.toString()===b.toString()}}}}),angular.module("adf").directive("adfDashboardRow",["$compile","adfTemplatePath","columnTemplate",function(a,b,c){return{restrict:"E",replace:!0,scope:{row:"=",adfModel:"=",editMode:"=",continuousEditMode:"=",options:"="},templateUrl:b+"dashboard-row.html",link:function(b,d){angular.isDefined(b.row.columns)&&angular.isArray(b.row.columns)&&a(c)(b,function(a){d.append(a)})}}}]),angular.module("adf").directive("adfWidgetContent",["$log","$q","$sce","$http","$templateCache","$compile","$controller","$injector","dashboard",function(a,b,c,d,e,f,g,h,i){function j(a){var b=a;return a.indexOf("{widgetsPath}")>=0&&(b=a.replace("{widgetsPath}",i.widgetsPath).replace("//","/"),0===b.indexOf("/")&&(b=b.substring(1))),b}function k(a){var f=b.defer();if(a.template)f.resolve(a.template);else if(a.templateUrl){var g=e.get(a.templateUrl);if(g)f.resolve(g);else{var h=c.getTrustedResourceUrl(j(a.templateUrl));d.get(h).success(function(b){e.put(a.templateUrl,b),f.resolve(b)}).error(function(){f.reject("could not load template")})}}return f.promise}function l(c,d,e){var j=c.model,l=c.content;d.html(i.loadingTemplate);var m=c.$new();j.config||(j.config={}),m.config=j.config;var n={$scope:m,widget:j,config:j.config},o={};return o.$tpl=k(l),l.resolve&&angular.forEach(l.resolve,function(a,b){angular.isString(a)?o[b]=h.get(a):o[b]=h.invoke(a,a,n)}),b.all(o).then(function(a){angular.extend(a,n);var b=a.$tpl;if(d.html(b),l.controller){var c=g(l.controller,a);l.controllerAs&&(m[l.controllerAs]=c),d.children().data("$ngControllerController",c)}f(d.contents())(m)},function(b){var c="Could not resolve all promises";b&&(c+=": "+b),a.warn(c),d.html(i.messageTemplate.replace(/{}/g,c))}),e&&e.$destroy(),m}return{replace:!0,restrict:"EA",transclude:!1,scope:{model:"=",content:"="},link:function(a,b){var c=l(a,b,null);a.$on("widgetConfigChanged",function(){c=l(a,b,c)}),a.$on("widgetReload",function(){c=l(a,b,c)})}}}]),angular.module("adf").directive("adfWidget",["$injector","$q","$log","$uibModal","$rootScope","dashboard","adfTemplatePath",function(a,b,c,d,e,f,g){function h(a){var b=a.definition;if(b){var d=f.widgets[b.type];if(d){b.title||(b.title=d.title),b.titleTemplateUrl||(b.titleTemplateUrl=g+"widget-title.html",d.titleTemplateUrl&&(b.titleTemplateUrl=d.titleTemplateUrl)),b.titleTemplateUrl||(b.frameless=d.frameless),b.styleClass||(b.styleClass=d.styleClass),b.wid||(b.wid=f.id()),a.widget=angular.copy(d);var e=b.config;e?angular.isString(e)&&(e=angular.fromJson(e)):e={},a.config=e,a.widgetState||(a.widgetState={},a.widgetState.isCollapsed=d.collapsed===!0?d.collapsed:!1)}else c.warn("could not find widget "+b.type)}else c.debug("definition not specified, widget was probably removed")}function i(f,h){var i=f.definition;if(i){var j=function(){var a=f.col;if(a){var b=a.widgets.indexOf(i);b>=0&&a.widgets.splice(b,1)}h.remove(),e.$broadcast("adfWidgetRemovedFromColumn")};f.remove=function(){if(f.options.enableConfirmDelete){var a=f.$new(),b=g+"widget-delete.html";i.deleteTemplateUrl&&(b=i.deleteTemplateUrl);var c={scope:a,templateUrl:b,backdrop:"static"},e=d.open(c);a.closeDialog=function(){e.close(),a.$destroy()},a.deleteDialog=function(){j(),a.closeDialog()}}else j()},f.reload=function(){f.$broadcast("widgetReload")},f.edit=function(){function c(a){var c;if("boolean"==typeof a){var d=b.defer();a?d.resolve():d.reject(),c=d.promise}else c=b.when(a);return c}var e=f.$new();e.definition=angular.copy(i);var h=g+"widget-edit.html";i.editTemplateUrl&&(h=i.editTemplateUrl);var j={scope:e,templateUrl:h,backdrop:"static"},k=d.open(j);e.closeDialog=function(){k.close(),e.$destroy()},e.saveDialog=function(){e.validationError=null;var b=f.widget,d=b.edit.apply,g={widget:b,definition:e.definition,config:e.definition.config},h=a.invoke(d,d,g);c(h).then(function(){i.title=e.definition.title,angular.extend(i.config,e.definition.config),b.edit&&b.edit.reload&&f.$broadcast("widgetConfigChanged"),e.closeDialog()},function(a){a?e.validationError=a:e.validationError="Validation durring apply failed"})}}}else c.debug("widget not found")}return{replace:!0,restrict:"EA",transclude:!1,templateUrl:g+"widget.html",scope:{definition:"=",col:"=column",editMode:"=",options:"=",widgetState:"="},controller:["$scope",function(a){a.$on("adfDashboardCollapseExpand",function(b,c){a.widgetState.isCollapsed=c.collapseExpandStatus}),a.$on("adfWidgetEnterEditMode",function(b,c){f.idEquals(a.definition.wid,c.wid)&&a.edit()}),a.widgetClasses=function(b,c){var d=c.styleClass||"";return(!b.frameless||a.editMode)&&(d+=" panel panel-default"),d},a.openFullScreen=function(){var b=a.definition,c=a.$new(),e={scope:c,templateUrl:g+"widget-fullscreen.html",size:b.modalSize||"lg",backdrop:"static",windowClass:b.fullScreen?"dashboard-modal widget-fullscreen":"dashboard-modal"},f=d.open(e);c.closeDialog=function(){f.close(),c.$destroy()}}}],compile:function(){return{pre:h,post:i}}}}]),angular.module("adf").run(["$templateCache",function(a){a.put("../src/templates/dashboard-column.html",'
        '),a.put("../src/templates/dashboard-edit.html",' '),a.put("../src/templates/dashboard-row.html","
        "),a.put("../src/templates/dashboard-title.html",'

        {{model.title}}

        '),a.put("../src/templates/dashboard.html",'
        '),a.put("../src/templates/widget-add.html",' '),a.put("../src/templates/widget-delete.html",' '),a.put("../src/templates/widget-edit.html",'
        '),a.put("../src/templates/widget-fullscreen.html",' '),a.put("../src/templates/widget-title.html",'

        {{definition.title}}

        '),a.put("../src/templates/widget.html",'
        ')}])}(window),angular.module("adf.structures.base",["adf"]).config(["dashboardProvider",function(a){a.structure("6-6",{rows:[{columns:[{styleClass:"col-md-6"},{styleClass:"col-md-6"}]}]}).structure("4-8",{rows:[{columns:[{styleClass:"col-md-4",widgets:[]},{styleClass:"col-md-8",widgets:[]}]}]}).structure("12/4-4-4",{rows:[{columns:[{styleClass:"col-md-12"}]},{columns:[{styleClass:"col-md-4"},{styleClass:"col-md-4"},{styleClass:"col-md-4"}]}]}).structure("12/6-6",{rows:[{columns:[{styleClass:"col-md-12"}]},{columns:[{styleClass:"col-md-6"},{styleClass:"col-md-6"}]}]}).structure("12/6-6/12",{rows:[{columns:[{styleClass:"col-md-12"}]},{columns:[{styleClass:"col-md-6"},{styleClass:"col-md-6"}]},{columns:[{styleClass:"col-md-12"}]}]}).structure("3-9 (12/6-6)",{rows:[{columns:[{styleClass:"col-md-3"},{styleClass:"col-md-9",rows:[{columns:[{styleClass:"col-md-12"}]},{columns:[{styleClass:"col-md-6"},{styleClass:"col-md-6"}]}]}]}]})}]),function(a,b){"use strict";angular.module("adf.widget.clock",["adf.provider"]).config(["dashboardProvider",function(a){a.widget("clock",{title:"Clock",description:"Displays date and time",templateUrl:"{widgetsPath}/clock/src/view.html",controller:"clockController",controllerAs:"clock",config:{timePattern:"HH:mm:ss",datePattern:"YYYY-MM-DD"},edit:{templateUrl:"{widgetsPath}/clock/src/edit.html"}})}]).controller("clockController",["$scope","$interval","config",function(a,b,c){function d(){var a=new moment;e.time=a.format(c.timePattern),e.date=a.format(c.datePattern)}var e=this;d();var f=b(d,1e3);a.$on("$destroy",function(){b.cancel(f)})}]),angular.module("adf.widget.clock").run(["$templateCache",function(a){a.put("{widgetsPath}/clock/src/edit.html",'

        For the list of possible patterns, please have a look at moment.js documentation

        '),a.put("{widgetsPath}/clock/src/view.html","
        {{clock.time}}
        {{clock.date}}
        ")}])}(window),function(a,b){"use strict";angular.module("adf.widget.iframe",["adf.provider"]).config(["dashboardProvider",function(a){a.widget("iframe",{title:"iframe",description:"Embed an external page into the dashboard",templateUrl:"{widgetsPath}/iframe/src/view.html",controller:"iframeController",controllerAs:"iframe",edit:{templateUrl:"{widgetsPath}/iframe/src/edit.html"},config:{height:"420px"}})}]).controller("iframeController",["$sce","config",function(a,b){b.url&&(this.url=a.trustAsResourceUrl(b.url))}]),angular.module("adf.widget.iframe").run(["$templateCache",function(a){a.put("{widgetsPath}/iframe/src/edit.html","
        "),a.put("{widgetsPath}/iframe/src/view.html",'
        Please insert a url in the widget configuration
        ')}])}(window),function(){"use strict";angular.module("ui.grid.i18n",[]),angular.module("ui.grid",["ui.grid.i18n"])}(),function(){"use strict";angular.module("ui.grid").constant("uiGridConstants",{LOG_DEBUG_MESSAGES:!0,LOG_WARN_MESSAGES:!0,LOG_ERROR_MESSAGES:!0,CUSTOM_FILTERS:/CUSTOM_FILTERS/g,COL_FIELD:/COL_FIELD/g,MODEL_COL_FIELD:/MODEL_COL_FIELD/g,TOOLTIP:/title=\"TOOLTIP\"/g,DISPLAY_CELL_TEMPLATE:/DISPLAY_CELL_TEMPLATE/g,TEMPLATE_REGEXP:/<.+>/,FUNC_REGEXP:/(\([^)]*\))?$/,DOT_REGEXP:/\./g,APOS_REGEXP:/'/g,BRACKET_REGEXP:/^(.*)((?:\s*\[\s*\d+\s*\]\s*)|(?:\s*\[\s*"(?:[^"\\]|\\.)*"\s*\]\s*)|(?:\s*\[\s*'(?:[^'\\]|\\.)*'\s*\]\s*))(.*)$/,COL_CLASS_PREFIX:"ui-grid-col",events:{GRID_SCROLL:"uiGridScroll",COLUMN_MENU_SHOWN:"uiGridColMenuShown",ITEM_DRAGGING:"uiGridItemDragStart",COLUMN_HEADER_CLICK:"uiGridColumnHeaderClick"},keymap:{TAB:9,STRG:17,CAPSLOCK:20,CTRL:17,CTRLRIGHT:18,CTRLR:18,SHIFT:16,RETURN:13,ENTER:13,BACKSPACE:8,BCKSP:8,ALT:18,ALTR:17,ALTRIGHT:17,SPACE:32,WIN:91,MAC:91,FN:null,PG_UP:33,PG_DOWN:34,UP:38,DOWN:40,LEFT:37,RIGHT:39,ESC:27,DEL:46,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123},ASC:"asc",DESC:"desc",filter:{STARTS_WITH:2,ENDS_WITH:4,EXACT:8,CONTAINS:16,GREATER_THAN:32,GREATER_THAN_OR_EQUAL:64,LESS_THAN:128,LESS_THAN_OR_EQUAL:256,NOT_EQUAL:512,SELECT:"select",INPUT:"input"},aggregationTypes:{sum:2,count:4,avg:8,min:16,max:32},CURRENCY_SYMBOLS:["ƒ","$","£","$","¤","¥","៛","₩","₱","฿","₫"],scrollDirection:{UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",NONE:"none"},dataChange:{ALL:"all",EDIT:"edit",ROW:"row",COLUMN:"column",OPTIONS:"options"},scrollbars:{NEVER:0,ALWAYS:1}})}(),angular.module("ui.grid").directive("uiGridCell",["$compile","$parse","gridUtil","uiGridConstants",function(a,b,c,d){var e={priority:0,scope:!1,require:"?^uiGrid",compile:function(){return{pre:function(b,e,f,g){function h(){var a=b.col.compiledElementFn;a(b,function(a,b){e.append(a)})}if(g&&b.col.compiledElementFn)h();else if(g&&!b.col.compiledElementFn)b.col.getCompiledElementFn().then(function(a){a(b,function(a,b){e.append(a)})});else{var i=b.col.cellTemplate.replace(d.MODEL_COL_FIELD,"row.entity."+c.preEval(b.col.field)).replace(d.COL_FIELD,"grid.getCellValue(row, col)"),j=a(i)(b);e.append(j)}},post:function(a,b,c,e){var f=a.col.getColClass(!1);b.addClass(f);var g,h=function(c){var d=b;g&&(d.removeClass(g),g=null),g=angular.isFunction(a.col.cellClass)?a.col.cellClass(a.grid,a.row,a.col,a.rowRenderIndex,a.colRenderIndex):a.col.cellClass,d.addClass(g)};a.col.cellClass&&h();var i=a.grid.registerDataChangeCallback(h,[d.dataChange.COLUMN,d.dataChange.EDIT]),j=function(c,d){if(c!==d){(g||a.col.cellClass)&&h();var e=a.col.getColClass(!1);e!==f&&(b.removeClass(f),b.addClass(e),f=e)}},k=a.$watch("row",j),l=function(){i(),k()};a.$on("$destroy",l),b.on("$destroy",l)}}}};return e}]),function(){angular.module("ui.grid").service("uiGridColumnMenuService",["i18nService","uiGridConstants","gridUtil",function(a,b,c){var d={initialize:function(a,b){a.grid=b.grid,b.columnMenuScope=a,a.menuShown=!1},setColMenuItemWatch:function(a){var b=a.$watch("col.menuItems",function(b){"undefined"!=typeof b&&b&&angular.isArray(b)?(b.forEach(function(b){"undefined"!=typeof b.context&&b.context||(b.context={}),b.context.col=a.col}),a.menuItems=a.defaultMenuItems.concat(b)):a.menuItems=a.defaultMenuItems});a.$on("$destroy",b)},sortable:function(a){return a.grid.options.enableSorting&&"undefined"!=typeof a.col&&a.col&&a.col.enableSorting?!0:!1},isActiveSort:function(a,b){return"undefined"!=typeof a.col&&"undefined"!=typeof a.col.sort&&"undefined"!=typeof a.col.sort.direction&&a.col.sort.direction===b},suppressRemoveSort:function(a){return a.col&&a.col.suppressRemoveSort?!0:!1},hideable:function(a){return"undefined"!=typeof a.col&&a.col&&a.col.colDef&&a.col.colDef.enableHiding===!1?!1:!0},getDefaultMenuItems:function(c){return[{title:a.getSafeText("sort.ascending"),icon:"ui-grid-icon-sort-alt-up",action:function(a){a.stopPropagation(),c.sortColumn(a,b.ASC)},shown:function(){return d.sortable(c)},active:function(){return d.isActiveSort(c,b.ASC)}},{title:a.getSafeText("sort.descending"),icon:"ui-grid-icon-sort-alt-down",action:function(a){a.stopPropagation(),c.sortColumn(a,b.DESC)},shown:function(){return d.sortable(c)},active:function(){return d.isActiveSort(c,b.DESC)}},{title:a.getSafeText("sort.remove"),icon:"ui-grid-icon-cancel",action:function(a){a.stopPropagation(),c.unsortColumn()},shown:function(){return d.sortable(c)&&"undefined"!=typeof c.col&&"undefined"!=typeof c.col.sort&&"undefined"!=typeof c.col.sort.direction&&null!==c.col.sort.direction&&!d.suppressRemoveSort(c)}},{title:a.getSafeText("column.hide"),icon:"ui-grid-icon-cancel",shown:function(){return d.hideable(c)},action:function(a){a.stopPropagation(),c.hideColumn()}}]},getColumnElementPosition:function(a,b,d){var e={};return e.left=d[0].offsetLeft,e.top=d[0].offsetTop,e.parentLeft=d[0].offsetParent.offsetLeft,e.offset=0,b.grid.options.offsetLeft&&(e.offset=b.grid.options.offsetLeft),e.height=c.elementHeight(d,!0),e.width=c.elementWidth(d,!0),e},repositionMenu:function(a,b,d,e,f){var g=e[0].querySelectorAll(".ui-grid-menu"),h=c.closestElm(f,".ui-grid-render-container"),i=h.getBoundingClientRect().left-a.grid.element[0].getBoundingClientRect().left,j=h.querySelectorAll(".ui-grid-viewport")[0].scrollLeft,k=b.lastMenuWidth?b.lastMenuWidth:a.lastMenuWidth?a.lastMenuWidth:170,l=b.lastMenuPaddingRight?b.lastMenuPaddingRight:a.lastMenuPaddingRight?a.lastMenuPaddingRight:10;if(0!==g.length){var m=g[0].querySelectorAll(".ui-grid-menu-mid");0===m.length||angular.element(m).hasClass("ng-hide")||(k=c.elementWidth(g,!0),a.lastMenuWidth=k,b.lastMenuWidth=k,l=parseInt(c.getStyles(angular.element(g)[0]).paddingRight,10),a.lastMenuPaddingRight=l,b.lastMenuPaddingRight=l)}var n=d.left+i-j+d.parentLeft+d.width-k+l;nc)d=b;else{if(c>a&&!d)return d=b,!0;if(c>a&&d)return!0}}),d){var g=d.getColClass();b.focus.bySelector(e,".ui-grid-header-cell."+g+" .ui-grid-header-cell-primary-focus",!0).then(angular.noop,function(a){return"canceled"!==a?c():void 0})}else c()})};f.hideColumn=function(){f.col.colDef.visible=!1,f.col.visible=!1,f.grid.queueGridRefresh(),f.hideMenu(),f.grid.api.core.notifyDataChange(c.dataChange.COLUMN),f.grid.api.core.raise.columnVisibilityChanged(f.col),j()}},controller:["$scope",function(a){var b=this;a.$watch("menuItems",function(a){b.menuItems=a})}]};return f}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFilter",["$compile","$templateCache","i18nService","gridUtil",function(a,b,c,d){return{compile:function(){return{pre:function(b,c,d,e){b.col.updateFilters=function(d){if(c.children().remove(),d){var e=b.col.filterHeaderTemplate;c.append(a(e)(b))}},b.$on("$destroy",function(){delete b.col.updateFilters})},post:function(a,b,e,f){a.aria=c.getSafeText("headerCell.aria"),a.removeFilter=function(a,c){a.term=null,d.focus.bySelector(b,".ui-grid-filter-input-"+c)}}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFooterCell",["$timeout","gridUtil","uiGridConstants","$compile",function(a,b,c,d){var e={priority:0,scope:{col:"=",row:"=",renderIndex:"="},replace:!0,require:"^uiGrid",compile:function(a,b,e){return{pre:function(a,b,c,e){var f=d(a.col.footerCellTemplate)(a);b.append(f)},post:function(a,b,d,e){a.grid=e.grid;var f=a.col.getColClass(!1);b.addClass(f);var g,h=function(c){var d=b;g&&(d.removeClass(g),g=null),g=angular.isFunction(a.col.footerCellClass)?a.col.footerCellClass(a.grid,a.row,a.col,a.rowRenderIndex,a.colRenderIndex):a.col.footerCellClass,d.addClass(g)};a.col.footerCellClass&&h(),a.col.updateAggregationValue();var i=a.grid.registerDataChangeCallback(h,[c.dataChange.COLUMN]);a.grid.api.core.on.rowsRendered(a,a.col.updateAggregationValue),a.grid.api.core.on.rowsRendered(a,h),a.$on("$destroy",i)}}}};return e}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFooter",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout",function(a,b,c,d,e){ +return{restrict:"EA",replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:!0,compile:function(a,c){return{pre:function(a,c,e,f){var g=f[0],h=f[1];a.grid=g.grid,a.colContainer=h.colContainer,h.footer=c;var i=a.grid.options.footerTemplate;d.getTemplate(i).then(function(d){var e=angular.element(d),f=b(e)(a);if(c.append(f),h){var g=c[0].getElementsByClassName("ui-grid-footer-viewport")[0];g&&(h.footerViewport=g)}})},post:function(a,b,c,e){var f=e[0],g=e[1];f.grid;d.disableAnimations(b),g.footer=b;var h=b[0].getElementsByClassName("ui-grid-footer-viewport")[0];h&&(g.footerViewport=h)}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridGridFooter",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout",function(a,b,c,d,e){return{restrict:"EA",replace:!0,require:"^uiGrid",scope:!0,compile:function(a,c){return{pre:function(a,c,e,f){a.grid=f.grid;var g=a.grid.options.gridFooterTemplate;d.getTemplate(g).then(function(d){var e=angular.element(d),f=b(e)(a);c.append(f)})},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridGroupPanel",["$compile","uiGridConstants","gridUtil",function(a,b,c){var d="ui-grid/ui-grid-group-panel";return{restrict:"EA",replace:!0,require:"?^uiGrid",scope:!1,compile:function(b,e){return{pre:function(b,e,f,g){var h=b.grid.options.groupPanelTemplate||d;c.getTemplate(h).then(function(c){var d=angular.element(c),f=a(d)(b);e.append(f)})},post:function(a,b,c,d){b.bind("$destroy",function(){})}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridHeaderCell",["$compile","$timeout","$window","$document","gridUtil","uiGridConstants","ScrollEvent","i18nService",function(a,b,c,d,e,f,g,h){var i=500,j=500,k={priority:0,scope:{col:"=",row:"=",renderIndex:"="},require:["^uiGrid","^uiGridRenderContainer"],replace:!0,compile:function(){return{pre:function(b,c,d){var e=a(b.col.headerCellTemplate)(b);c.append(e)},post:function(a,c,e,g){var k=g[0],l=g[1];a.i18n={headerCell:h.getSafeText("headerCell"),sort:h.getSafeText("sort")},a.isSortPriorityVisible=function(){return angular.isNumber(a.col.sort.priority)&&a.grid.columns.some(function(b,c){return angular.isNumber(b.sort.priority)&&b!==a.col})},a.getSortDirectionAriaLabel=function(){var b=a.col,c=b.sort.direction===f.ASC?a.i18n.sort.ascending:b.sort.direction===f.DESC?a.i18n.sort.descending:a.i18n.sort.none,d=c;return a.isSortPriorityVisible()&&(d=d+". "+a.i18n.headerCell.priority+" "+b.sort.priority),d},a.grid=k.grid,a.renderContainer=k.grid.renderContainers[l.containerId];var m=a.col.getColClass(!1);c.addClass(m),a.menuShown=!1,a.asc=f.ASC,a.desc=f.DESC;var n,o,p=(angular.element(c[0].querySelectorAll(".ui-grid-header-cell-menu")),angular.element(c[0].querySelectorAll(".ui-grid-cell-contents"))),q=[];a.downFn=function(e){e.stopPropagation(),"undefined"!=typeof e.originalEvent&&void 0!==e.originalEvent&&(e=e.originalEvent),e.button&&0!==e.button||(o=e.pageX,a.mousedownStartTime=(new Date).getTime(),a.mousedownTimeout=b(function(){},i),a.mousedownTimeout.then(function(){a.colMenu&&k.columnMenuScope.showMenu(a.col,c,e)}),k.fireEvent(f.events.COLUMN_HEADER_CLICK,{event:e,columnName:a.col.colDef.name}),a.offAllEvents(),"touchstart"===e.type?(d.on("touchend",a.upFn),d.on("touchmove",a.moveFn)):"mousedown"===e.type&&(d.on("mouseup",a.upFn),d.on("mousemove",a.moveFn)))},a.upFn=function(c){c.stopPropagation(),b.cancel(a.mousedownTimeout),a.offAllEvents(),a.onDownEvents(c.type);var d=(new Date).getTime(),e=d-a.mousedownStartTime;e>i||a.sortable&&a.handleClick(c)},a.moveFn=function(c){var d=c.pageX-o;0!==d&&(b.cancel(a.mousedownTimeout),a.offAllEvents(),a.onDownEvents(c.type))},a.clickFn=function(b){b.stopPropagation(),p.off("click",a.clickFn)},a.offAllEvents=function(){p.off("touchstart",a.downFn),p.off("mousedown",a.downFn),d.off("touchend",a.upFn),d.off("mouseup",a.upFn),d.off("touchmove",a.moveFn),d.off("mousemove",a.moveFn),p.off("click",a.clickFn)},a.onDownEvents=function(c){switch(c){case"touchmove":case"touchend":p.on("click",a.clickFn),p.on("touchstart",a.downFn),b(function(){p.on("mousedown",a.downFn)},j);break;case"mousemove":case"mouseup":p.on("click",a.clickFn),p.on("mousedown",a.downFn),b(function(){p.on("touchstart",a.downFn)},j);break;default:p.on("click",a.clickFn),p.on("touchstart",a.downFn),p.on("mousedown",a.downFn)}};var r=function(d){var e=c;n&&(e.removeClass(n),n=null),n=angular.isFunction(a.col.headerCellClass)?a.col.headerCellClass(a.grid,a.row,a.col,a.rowRenderIndex,a.colRenderIndex):a.col.headerCellClass,e.addClass(n),b(function(){var b=a.grid.renderContainers.right?a.grid.renderContainers.right:a.grid.renderContainers.body;a.isLastCol=a.col===b.visibleColumnCache[b.visibleColumnCache.length-1]}),k.grid.options.enableSorting&&a.col.enableSorting?a.sortable=!0:a.sortable=!1;var g=a.filterable;k.grid.options.enableFiltering&&a.col.enableFiltering?a.filterable=!0:a.filterable=!1,g!==a.filterable&&("undefined"!=typeof a.col.updateFilters&&a.col.updateFilters(a.filterable),a.filterable?(a.col.filters.forEach(function(b,c){q.push(a.$watch("col.filters["+c+"].term",function(a,b){a!==b&&(k.grid.api.core.raise.filterChanged(),k.grid.api.core.notifyDataChange(f.dataChange.COLUMN),k.grid.queueGridRefresh())}))}),a.$on("$destroy",function(){q.forEach(function(a){a()})})):q.forEach(function(a){a()})),a.col.grid.options&&a.col.grid.options.enableColumnMenus!==!1&&a.col.colDef&&a.col.colDef.enableColumnMenu!==!1?a.colMenu=!0:a.colMenu=!1,a.offAllEvents(),(a.sortable||a.colMenu)&&(a.onDownEvents(),a.$on("$destroy",function(){a.offAllEvents()}))};r();var s=a.grid.registerDataChangeCallback(r,[f.dataChange.COLUMN]);a.$on("$destroy",s),a.handleClick=function(b){var c=!1;b.shiftKey&&(c=!0),k.grid.sortColumn(a.col,c).then(function(){k.columnMenuScope&&k.columnMenuScope.hideMenu(),k.grid.refresh()})},a.toggleMenu=function(b){b.stopPropagation(),k.columnMenuScope.menuShown&&k.columnMenuScope.col===a.col?k.columnMenuScope.hideMenu():k.columnMenuScope.showMenu(a.col,c)}}}}};return k}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridHeader",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout","ScrollEvent",function(a,b,c,d,e,f){var g="ui-grid/ui-grid-header",h="ui-grid/ui-grid-no-header";return{restrict:"EA",replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:!0,compile:function(a,c){return{pre:function(a,c,e,i){function j(){m.header=m.colContainer.header=c;var a=c[0].getElementsByClassName("ui-grid-header-canvas");a.length>0?m.headerCanvas=m.colContainer.headerCanvas=a[0]:m.headerCanvas=null}function k(a){if(!l.grid.isScrollingHorizontally){var b=d.normalizeScrollLeft(m.headerViewport,l.grid),c=m.colContainer.scrollHorizontal(b),e=new f(l.grid,null,m.colContainer,f.Sources.ViewPortScroll);e.newScrollLeft=b,c>-1&&(e.x={percentage:c}),l.grid.scrollContainers(null,e)}}var l=i[0],m=i[1];a.grid=l.grid,a.colContainer=m.colContainer,j();var n;n=a.grid.options.showHeader?a.grid.options.headerTemplate?a.grid.options.headerTemplate:g:h,d.getTemplate(n).then(function(d){var e=angular.element(d),f=b(e)(a);if(c.replaceWith(f),c=f,j(),m){var g=c[0].getElementsByClassName("ui-grid-header-viewport")[0];g&&(m.headerViewport=g,angular.element(g).on("scroll",k),a.$on("$destroy",function(){angular.element(g).off("scroll",k)}))}a.grid.queueRefresh()})},post:function(a,b,c,e){function f(){var a=h.colContainer.visibleColumnCache,b="",c=0;return a.forEach(function(a){b+=a.getColClassDefinition(),c+=a.drawnWidth}),h.colContainer.canvasWidth=c,b}var g=e[0],h=e[1];g.grid;d.disableAnimations(b),h.header=b;var i=b[0].getElementsByClassName("ui-grid-header-viewport")[0];i&&(h.headerViewport=i),g&&g.grid.registerStyleComputation({priority:15,func:f})}}}}}])}(),function(){angular.module("ui.grid").service("uiGridGridMenuService",["gridUtil","i18nService","uiGridConstants",function(a,b,c){var d={initialize:function(a,b){b.gridMenuScope=a,a.grid=b,a.registeredMenuItems=[],a.$on("$destroy",function(){a.grid&&a.grid.gridMenuScope&&(a.grid.gridMenuScope=null),a.grid&&(a.grid=null),a.registeredMenuItems&&(a.registeredMenuItems=null)}),a.registeredMenuItems=[],b.api.registerMethod("core","addToGridMenu",d.addToGridMenu),b.api.registerMethod("core","removeFromGridMenu",d.removeFromGridMenu)},addToGridMenu:function(b,c){angular.isArray(c)?b.gridMenuScope?(b.gridMenuScope.registeredMenuItems=b.gridMenuScope.registeredMenuItems?b.gridMenuScope.registeredMenuItems:[],b.gridMenuScope.registeredMenuItems=b.gridMenuScope.registeredMenuItems.concat(c)):a.logError("Asked to addToGridMenu, but gridMenuScope not present. Timing issue? Please log issue with ui-grid"):a.logError("addToGridMenu: menuItems must be an array, and is not, not adding any items")},removeFromGridMenu:function(b,c){var d=-1;b&&b.gridMenuScope&&b.gridMenuScope.registeredMenuItems.forEach(function(b,e){b.id===c&&(d>-1?a.logError("removeFromGridMenu: found multiple items with the same id, removing only the last"):d=e)}),d>-1&&b.gridMenuScope.registeredMenuItems.splice(d,1)},getMenuItems:function(c){var e=[];c.grid.options.gridMenuCustomItems&&(angular.isArray(c.grid.options.gridMenuCustomItems)?e=e.concat(c.grid.options.gridMenuCustomItems):a.logError("gridOptions.gridMenuCustomItems must be an array, and is not"));var f=[{title:b.getSafeText("gridMenu.clearAllFilters"),action:function(a){c.grid.clearAllFilters(void 0,!0,void 0)},shown:function(){return c.grid.options.enableFiltering},order:100}];return e=e.concat(f),e=e.concat(c.registeredMenuItems),c.grid.options.gridMenuShowHideColumns!==!1&&(e=e.concat(d.showHideColumns(c))),e.sort(function(a,b){return a.order-b.order}),e},showHideColumns:function(a){var c=[];return a.grid.options.columnDefs&&0!==a.grid.options.columnDefs.length&&0!==a.grid.columns.length?(c.push({title:b.getSafeText("gridMenu.columns"),order:300}),a.grid.options.gridMenuTitleFilter=a.grid.options.gridMenuTitleFilter?a.grid.options.gridMenuTitleFilter:function(a){return a},a.grid.options.columnDefs.forEach(function(b,e){if(b.enableHiding!==!1){var f={icon:"ui-grid-icon-ok",action:function(a){a.stopPropagation(),d.toggleColumnVisibility(this.context.gridCol)},shown:function(){return this.context.gridCol.colDef.visible===!0||void 0===this.context.gridCol.colDef.visible},context:{gridCol:a.grid.getColumn(b.name||b.field)},leaveOpen:!0,order:301+2*e};d.setMenuItemTitle(f,b,a.grid),c.push(f),f={icon:"ui-grid-icon-cancel",action:function(a){a.stopPropagation(),d.toggleColumnVisibility(this.context.gridCol)},shown:function(){return!(this.context.gridCol.colDef.visible===!0||void 0===this.context.gridCol.colDef.visible)},context:{gridCol:a.grid.getColumn(b.name||b.field)},leaveOpen:!0,order:301+2*e+1},d.setMenuItemTitle(f,b,a.grid),c.push(f)}}),c):c},setMenuItemTitle:function(b,c,d){var e=d.options.gridMenuTitleFilter(c.displayName||a.readableColumnName(c.name)||c.field);"string"==typeof e?b.title=e:e.then?(b.title="",e.then(function(a){b.title=a},function(a){b.title=a})):(a.logError("Expected gridMenuTitleFilter to return a string or a promise, it has returned neither, bad config"),b.title="badconfig")},toggleColumnVisibility:function(a){a.colDef.visible=!(a.colDef.visible===!0||void 0===a.colDef.visible),a.grid.refresh(),a.grid.api.core.notifyDataChange(c.dataChange.COLUMN),a.grid.api.core.raise.columnVisibilityChanged(a)}};return d}]).directive("uiGridMenuButton",["gridUtil","uiGridConstants","uiGridGridMenuService","i18nService",function(a,b,c,d){return{priority:0,scope:!0,require:["^uiGrid"],templateUrl:"ui-grid/ui-grid-menu-button",replace:!0,link:function(b,e,f,g){var h=g[0];b.i18n={aria:d.getSafeText("gridMenu.aria")},c.initialize(b,h.grid),b.shown=!1,b.toggleMenu=function(){b.shown?(b.$broadcast("hide-menu"),b.shown=!1):(b.menuItems=c.getMenuItems(b),b.$broadcast("show-menu"),b.shown=!0)},b.$on("menu-hidden",function(){b.shown=!1,a.focus.bySelector(e,".ui-grid-icon-container")})}}}])}(),function(){angular.module("ui.grid").directive("uiGridMenu",["$compile","$timeout","$window","$document","gridUtil","uiGridConstants","i18nService",function(a,b,c,d,e,f,g){var h={priority:0,scope:{menuItems:"=",autoHide:"=?"},require:"?^uiGrid",templateUrl:"ui-grid/uiGridMenu",replace:!1,link:function(a,d,h,i){var j;a.dynamicStyles="",i&&(j=i.grid.gridHeight-30,a.dynamicStyles=[".grid"+i.grid.id+" .ui-grid-menu-mid {","max-height: "+j+"px;","}"].join(" ")),a.i18n={close:g.getSafeText("columnMenu.close")},a.showMenu=function(c,f){a.shown?a.shownMid||(a.shownMid=!0,a.$emit("menu-shown")):(a.shown=!0,b(function(){a.shownMid=!0,a.$emit("menu-shown")}));var g="click";f&&f.originalEvent&&f.originalEvent.type&&"touchstart"===f.originalEvent.type&&(g=f.originalEvent.type),angular.element(document).off("click touchstart",k),d.off("keyup",l),d.off("keydown",m),b(function(){angular.element(document).on(g,k),d.on("keyup",l),d.on("keydown",m)}),e.focus.bySelector(d,"button[type=button]",!0)},a.hideMenu=function(c){a.shown&&(a.shownMid=!1,b(function(){a.shownMid||(a.shown=!1,a.$emit("menu-hidden"))},200)),angular.element(document).off("click touchstart",k),d.off("keyup",l),d.off("keydown",m)},a.$on("hide-menu",function(b,c){a.hideMenu(b,c)}),a.$on("show-menu",function(b,c){a.showMenu(b,c)});var k=function(){a.shown&&a.$apply(function(){a.hideMenu()})},l=function(b){27===b.keyCode&&a.hideMenu()},m=function(a){var b=function(b){return b.focus(),a.preventDefault(),!1};if(9===a.keyCode){var c,e,f=d[0].querySelectorAll("button:not(.ng-hide)");f.length>0&&(c=f[0],e=f[f.length-1],a.target!==e||a.shiftKey?a.target===c&&a.shiftKey&&b(e):b(c))}};("undefined"==typeof a.autoHide||void 0===a.autoHide)&&(a.autoHide=!0),a.autoHide&&angular.element(c).on("resize",k),a.$on("$destroy",function(){angular.element(document).off("click touchstart",k)}),a.$on("$destroy",function(){angular.element(c).off("resize",k)}),i&&a.$on("$destroy",i.grid.api.core.on.scrollBegin(a,k)),a.$on("$destroy",a.$on(f.events.ITEM_DRAGGING,k))}};return h}]).directive("uiGridMenuItem",["gridUtil","$compile","i18nService",function(a,b,c){var d={priority:0,scope:{name:"=",active:"=",action:"=",icon:"=",shown:"=",context:"=",templateUrl:"=",leaveOpen:"=",screenReaderOnly:"="},require:["?^uiGrid"],templateUrl:"ui-grid/uiGridMenuItem",replace:!1,compile:function(){return{pre:function(c,d){c.templateUrl&&a.getTemplate(c.templateUrl).then(function(a){var e=angular.element(a),f=b(e)(c);d.replaceWith(f)})},post:function(b,d,e,f){var g=f[0];("undefined"==typeof b.shown||null===b.shown)&&(b.shown=function(){return!0}),b.itemShown=function(){var a={};return b.context&&(a.context=b.context),"undefined"!=typeof g&&g&&(a.grid=g.grid),b.shown.call(a)},b.itemAction=function(c,e){if(a.logDebug("itemAction"),c.stopPropagation(),"function"==typeof b.action){var f={};b.context&&(f.context=b.context),"undefined"!=typeof g&&g&&(f.grid=g.grid),b.action.call(f,c,e),b.leaveOpen?a.focus.bySelector(angular.element(a.closestElm(d,".ui-grid-menu-items")),"button[type=button]",!0):b.$emit("hide-menu")}},b.i18n=c.get()}}}};return d}])}(),function(){"use strict";var a=angular.module("ui.grid");angular.forEach([{tag:"Src",method:"attr"},{tag:"Text",method:"text"},{tag:"Href",method:"attr"},{tag:"Class",method:"addClass"},{tag:"Html",method:"html"},{tag:"Alt",method:"attr"},{tag:"Style",method:"css"},{tag:"Value",method:"attr"},{tag:"Id",method:"attr"},{tag:"Id",directiveName:"IdGrid",method:"attr",appendGridId:!0},{tag:"Title",method:"attr"},{tag:"Label",method:"attr",aria:!0},{tag:"Labelledby",method:"attr",aria:!0},{tag:"Labelledby",directiveName:"LabelledbyGrid",appendGridId:!0,method:"attr",aria:!0},{tag:"Describedby",method:"attr",aria:!0},{tag:"Describedby",directiveName:"DescribedbyGrid",appendGridId:!0,method:"attr",aria:!0}],function(b){var c="uiGridOneBind",d=(b.aria?c+"Aria":c)+(b.directiveName?b.directiveName:b.tag);a.directive(d,["gridUtil",function(a){return{restrict:"A",require:["?uiGrid","?^uiGrid"],link:function(c,e,f,g){var h=function(b){var e;if(c.grid)e=c.grid;else if(c.col&&c.col.grid)e=c.col.grid;else if(!g.some(function(a){return a&&a.grid?(e=a.grid,!0):void 0}))throw a.logError("["+d+"] A valid grid could not be found to bind id. Are you using this directive within the correct scope? Trying to generate id: [gridID]-"+b),new Error("No valid grid could be found");if(e){var f=new RegExp(e.id.toString());f.test(b)||(b=e.id.toString()+"-"+b)}return b},i=c.$watch(f[d],function(a){if(a){if(b.appendGridId){var c=null;angular.forEach(a.split(" "),function(a){c=(c?c+" ":"")+h(a)}),a=c}switch(b.method){case"attr":b.aria?e[b.method]("aria-"+b.tag.toLowerCase(),a):e[b.method](b.tag.toLowerCase(),a);break;case"addClass":if(angular.isObject(a)&&!angular.isArray(a)){var d=[],f=!1;if(angular.forEach(a,function(a,b){null!==a&&"undefined"!=typeof a&&(f=!0,a&&d.push(b))}),!f)return;a=d}if(!a)return;e.addClass(angular.isArray(a)?a.join(" "):a);break;default:e[b.method](a)}i()}},!0)}}}])})}(),function(){"use strict";var a=angular.module("ui.grid");a.directive("uiGridRenderContainer",["$timeout","$document","uiGridConstants","gridUtil","ScrollEvent",function(a,b,c,d,e){return{replace:!0,transclude:!0,templateUrl:"ui-grid/uiGridRenderContainer",require:["^uiGrid","uiGridRenderContainer"],scope:{containerId:"=",rowContainerName:"=",colContainerName:"=",bindScrollHorizontal:"=",bindScrollVertical:"=",enableVerticalScrollbar:"=",enableHorizontalScrollbar:"="},controller:"uiGridRenderContainer as RenderContainer",compile:function(){return{pre:function(a,b,c,d){var e=d[0],f=d[1],g=a.grid=e.grid;if(!a.rowContainerName)throw"No row render container name specified";if(!a.colContainerName)throw"No column render container name specified";if(!g.renderContainers[a.rowContainerName])throw"Row render container '"+a.rowContainerName+"' is not registered.";if(!g.renderContainers[a.colContainerName])throw"Column render container '"+a.colContainerName+"' is not registered.";var h=a.rowContainer=g.renderContainers[a.rowContainerName],i=a.colContainer=g.renderContainers[a.colContainerName];f.containerId=a.containerId,f.rowContainer=h,f.colContainer=i},post:function(a,b,c,f){function g(){var b="",c=l.canvasWidth,d=l.getViewportWidth(),e=k.getCanvasHeight(),f=k.getViewportHeight();l.needsHScrollbarPlaceholder()&&(f-=j.scrollbarHeight);var g,i;return g=i=l.getHeaderViewportWidth(),b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-canvas { width: "+c+"px; height: "+e+"px; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-canvas { width: "+(c+j.scrollbarWidth)+"px; }",b+=o.explicitHeaderCanvasHeight?"\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-canvas { height: "+o.explicitHeaderCanvasHeight+"px; }":"\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-canvas { height: inherit; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-viewport { width: "+d+"px; height: "+f+"px; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-viewport { width: "+g+"px; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-footer-canvas { width: "+(c+j.scrollbarWidth)+"px; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-footer-viewport { width: "+i+"px; }"}var h=f[0],i=f[1],j=h.grid,k=i.rowContainer,l=i.colContainer,m=null,n=null,o=j.renderContainers[a.containerId];b.addClass("ui-grid-render-container-"+a.containerId),d.on.mousewheel(b,function(a){var b=new e(j,k,l,e.Sources.RenderContainerMouseWheel);if(0!==a.deltaY){var c=-1*a.deltaY*a.deltaFactor;m=i.viewport[0].scrollTop,b.verticalScrollLength=k.getVerticalScrollLength();var f=(m+c)/b.verticalScrollLength;f>=1&&mf?f=0:f>1&&(f=1),b.y={percentage:f,pixels:c}}if(0!==a.deltaX){var g=a.deltaX*a.deltaFactor;n=d.normalizeScrollLeft(i.viewport,j),b.horizontalScrollLength=l.getCanvasWidth()-l.getViewportWidth();var h=(n+g)/b.horizontalScrollLength;0>h?h=0:h>1&&(h=1),b.x={percentage:h,pixels:g}}0!==a.deltaY&&(b.atTop(m)||b.atBottom(m))||0!==a.deltaX&&(b.atLeft(n)||b.atRight(n))||(a.preventDefault(),a.stopPropagation(),b.fireThrottledScrollingEvent("",b))}),b.bind("$destroy",function(){b.unbind("keydown"),["touchstart","touchmove","touchend","keydown","wheel","mousewheel","DomMouseScroll","MozMousePixelScroll"].forEach(function(a){b.unbind(a)})}),h.grid.registerStyleComputation({priority:6,func:g})}}}}}]),a.controller("uiGridRenderContainer",["$scope","gridUtil",function(a,b){}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridRow",["gridUtil",function(a){return{replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:{row:"=uiGridRow",rowRenderIndex:"="},compile:function(){return{pre:function(a,b,c,d){function e(){a.row.getRowTemplateFn.then(function(c){var d=a.$new();c(d,function(a,c){h&&(h.remove(),i.$destroy()),b.empty().append(a),h=a,i=d})})}var f=d[0],g=d[1];f.grid;a.grid=f.grid,a.colContainer=g.colContainer;var h,i;e(),a.$watch("row.getRowTemplateFn",function(a,b){a!==b&&e()})},post:function(a,b,c,d){}}}}}])}(),function(){angular.module("ui.grid").directive("uiGridStyle",["gridUtil","$interpolate",function(a,b){return{link:function(a,c,d,e){var f=b(c.text(),!0);f&&a.$watch(f,function(a){c.text(a)})}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridViewport",["gridUtil","ScrollEvent","uiGridConstants","$log",function(a,b,c,d){return{replace:!0,scope:{},controllerAs:"Viewport",templateUrl:"ui-grid/uiGridViewport",require:["^uiGrid","^uiGridRenderContainer"],link:function(c,d,e,f){function g(e){var f=d[0].scrollTop,g=a.normalizeScrollLeft(d,p),h=n.scrollVertical(f),i=o.scrollHorizontal(g),j=new b(p,n,o,b.Sources.ViewPortScroll);j.newScrollLeft=g,j.newScrollTop=f,i>-1&&(j.x={percentage:i}),h>-1&&(j.y={percentage:h}),p.scrollContainers(c.$parent.containerId,j)}function h(a){m.prevScrollArgs=a;var b=a.getNewScrollTop(n,m.viewport);d[0].scrollTop=b}function i(b){m.prevScrollArgs=b;var c=b.getNewScrollLeft(o,m.viewport);d[0].scrollLeft=a.denormalizeScrollLeft(m.viewport,c,p)}function j(b){var c=b.getNewScrollLeft(o,m.viewport);m.headerViewport&&(m.headerViewport.scrollLeft=a.denormalizeScrollLeft(m.viewport,c,p))}function k(b){var c=b.getNewScrollLeft(o,m.viewport);m.footerViewport&&(m.footerViewport.scrollLeft=a.denormalizeScrollLeft(m.viewport,c,p))}var l=f[0],m=f[1];c.containerCtrl=m;var n=m.rowContainer,o=m.colContainer,p=l.grid;c.grid=l.grid,c.rowContainer=m.rowContainer,c.colContainer=m.colContainer,m.viewport=d,d.on("scroll",g);c.$parent.bindScrollVertical&&p.addVerticalScrollSync(c.$parent.containerId,h),c.$parent.bindScrollHorizontal&&(p.addHorizontalScrollSync(c.$parent.containerId,i),p.addHorizontalScrollSync(c.$parent.containerId+"header",j),p.addHorizontalScrollSync(c.$parent.containerId+"footer",k))},controller:["$scope",function(a){this.rowStyle=function(b){var c=a.rowContainer,d=a.colContainer,e={};if(0===b&&0!==c.currentTopRow){var f=c.currentTopRow*c.grid.options.rowHeight;e["margin-top"]=f+"px"}return 0!==d.currentFirstColumn&&(d.grid.isRTL()?e["margin-right"]=d.columnOffset+"px":e["margin-left"]=d.columnOffset+"px"),e}}]}}])}(),function(){angular.module("ui.grid").directive("uiGridVisible",function(){return function(a,b,c){a.$watch(c.uiGridVisible,function(a){b[a?"removeClass":"addClass"]("ui-grid-invisible")})}})}(),function(){"use strict";function a(a,b,c,d,e,f){return{templateUrl:"ui-grid/ui-grid",scope:{uiGrid:"="},replace:!0,transclude:!0,controller:"uiGridController",compile:function(){return{post:function(a,b,g,h){function i(){b[0].offsetWidth<=0&&p>q?(setTimeout(i,o),q++):c(k)}function j(){angular.element(d).on("resize",m),b.on("$destroy",function(){angular.element(d).off("resize",m)}),a.$watch(function(){return n.hasLeftContainer()},function(a,b){a!==b&&n.refreshCanvas(!0)}),a.$watch(function(){return n.hasRightContainer()},function(a,b){a!==b&&n.refreshCanvas(!0)})}function k(){n.gridWidth=a.gridWidth=e.elementWidth(b),n.canvasWidth=h.grid.gridWidth,n.gridHeight=a.gridHeight=e.elementHeight(b),n.gridHeight<=n.options.rowHeight&&n.options.enableMinHeightCheck&&l(),n.refreshCanvas(!0)}function l(){var c=n.options.minRowsToShow*n.options.rowHeight,d=n.options.showHeader?n.options.headerRowHeight:0,g=n.calcFooterHeight(),h=0;n.options.enableHorizontalScrollbar===f.scrollbars.ALWAYS&&(h=e.getScrollbarWidth());var i=0;if(angular.forEach(n.options.columnDefs,function(a){a.hasOwnProperty("filter")?1>i&&(i=1):a.hasOwnProperty("filters")&&i(n.grid.rowHeaderColumns?n.grid.rowHeaderColumns.length:0);!g&&!c.uiGridColumns&&0===n.grid.options.columnDefs.length&&b.length>0&&n.grid.buildColumnDefsFromData(b),!g&&(n.grid.options.columnDefs.length>0||b.length>0)&&d.push(n.grid.buildColumns().then(function(){n.grid.preCompileCellTemplates()})),e.all(d).then(function(){n.grid.modifyRows(p).then(function(){n.grid.redrawInPlace(!0),a.$evalAsync(function(){n.grid.refreshCanvas(!0),n.grid.callDataChangeCallbacks(f.dataChange.ROW)})})})}}var n=this;n.grid=h.createGrid(a.uiGrid),n.grid.appScope=n.grid.appScope||a.$parent,b.addClass("grid"+n.grid.id),n.grid.rtl="rtl"===d.getStyles(b[0]).direction,a.grid=n.grid,c.uiGridColumns&&c.$observe("uiGridColumns",function(a){n.grid.options.columnDefs=a,n.grid.buildColumns().then(function(){n.grid.preCompileCellTemplates(),n.grid.refreshCanvas(!0)})});var o=[];n.grid.options.fastWatch?(n.uiGrid=a.uiGrid,angular.isString(a.uiGrid.data)?(o.push(a.$parent.$watch(a.uiGrid.data,m)),o.push(a.$parent.$watch(function(){return n.grid.appScope[a.uiGrid.data]?n.grid.appScope[a.uiGrid.data].length:void 0},m))):(o.push(a.$parent.$watch(function(){return a.uiGrid.data},m)),o.push(a.$parent.$watch(function(){return a.uiGrid.data.length},function(){m(a.uiGrid.data)}))),o.push(a.$parent.$watch(function(){return a.uiGrid.columnDefs},l)),o.push(a.$parent.$watch(function(){return a.uiGrid.columnDefs.length},function(){l(a.uiGrid.columnDefs)}))):(angular.isString(a.uiGrid.data)?o.push(a.$parent.$watchCollection(a.uiGrid.data,m)):o.push(a.$parent.$watchCollection(function(){return a.uiGrid.data},m)),o.push(a.$parent.$watchCollection(function(){return a.uiGrid.columnDefs},l)));var p,q=a.$watch(function(){return n.grid.styleComputations},function(){n.grid.refreshCanvas(!0)});a.$on("$destroy",function(){o.forEach(function(a){a()}),q()}),n.fireEvent=function(b,c){("undefined"==typeof c||void 0===c)&&(c={}),("undefined"==typeof c.grid||void 0===c.grid)&&(c.grid=n.grid),a.$broadcast(b,c)},n.innerCompile=function(b){k(b)(a)}}]),angular.module("ui.grid").directive("uiGrid",a),a.$inject=["$compile","$templateCache","$timeout","$window","gridUtil","uiGridConstants"]}(),function(){"use strict";angular.module("ui.grid").directive("uiGridPinnedContainer",["gridUtil",function(a){return{restrict:"EA",replace:!0,template:'
        ',scope:{side:"=uiGridPinnedContainer"},require:"^uiGrid",compile:function(){return{post:function(a,b,c,d){function e(){var a=this,b=0;a.visibleColumnCache.forEach(function(a){b+=a.drawnWidth});var c=a.getViewportAdjustment();return b+=c.width}function f(){if("left"===a.side||"right"===a.side){for(var b=h.renderContainers[a.side].visibleColumnCache,c=0,d=0;d0?b[0]:null},p.prototype.getColDef=function(a){var b=this.options.columnDefs.filter(function(b){return b.name===a});return b.length>0?b[0]:null},p.prototype.assignTypes=function(){var a=this;a.options.columnDefs.forEach(function(b,c){if(!b.type){var e=new g(b,c,a),f=a.rows.length>0?a.rows[0]:null;f?b.type=d.guessType(a.getCellValue(f,e)):b.type="string"}})},p.prototype.isRowHeaderColumn=function(a){return-1!==this.rowHeaderColumns.indexOf(a)},p.prototype.addRowHeaderColumn=function(a){var b=this,c=new g(a,d.nextUid(),b);c.isRowHeader=!0,b.isRTL()?(b.createRightContainer(),c.renderContainer="right"):(b.createLeftContainer(),c.renderContainer="left"),b.columnBuilders[0](a,c,b.options).then(function(){c.enableFiltering=!1,c.enableSorting=!1,c.enableHiding=!1,b.rowHeaderColumns.push(c),b.buildColumns().then(function(){b.preCompileCellTemplates(),b.queueGridRefresh()})})},p.prototype.getOnlyDataColumns=function(){var a=this,b=[];return a.columns.forEach(function(c){-1===a.rowHeaderColumns.indexOf(c)&&b.push(c)}),b},p.prototype.buildColumns=function(b){var c={orderByColumnDefs:!1};angular.extend(c,b);var e,f=this,h=[],i=f.rowHeaderColumns.length;for(e=0;ee;e++)f.columns[e+i].name!==f.options.columnDefs[e].name?j[e+i]=f.getColumn(f.options.columnDefs[e].name):j[e+i]=f.columns[e+i];f.columns.length=0,Array.prototype.splice.apply(f.columns,[0,0].concat(j))}return a.all(h).then(function(){f.rows.length>0&&f.assignTypes()})},p.prototype.preCompileCellTemplates=function(){var a=this,c=function(c){var d=c.cellTemplate.replace(e.MODEL_COL_FIELD,a.getQualifiedColField(c));d=d.replace(e.COL_FIELD,"grid.getCellValue(row, col)");var f=b(d);c.compiledElementFn=f,c.compiledElementFnDefer&&c.compiledElementFnDefer.resolve(c.compiledElementFn)};this.columns.forEach(function(a){a.cellTemplate?c(a):a.cellTemplatePromise&&a.cellTemplatePromise.then(function(){c(a)})})},p.prototype.getQualifiedColField=function(a){return"row.entity."+d.preEval(a.field)},p.prototype.createLeftContainer=function(){this.hasLeftContainer()||(this.renderContainers.left=new l("left",this,{disableColumnOffset:!0}))},p.prototype.createRightContainer=function(){this.hasRightContainer()||(this.renderContainers.right=new l("right",this,{disableColumnOffset:!0}))},p.prototype.hasLeftContainer=function(){return void 0!==this.renderContainers.left},p.prototype.hasRightContainer=function(){return void 0!==this.renderContainers.right},p.prototype.preprocessColDef=function(a){var b=this;if(!a.field&&!a.name)throw new Error("colDef.name or colDef.field property is required");if(void 0===a.name&&void 0!==a.field){for(var c=a.field,d=2;b.getColumn(c);)c=a.field+d.toString(),d++;a.name=c}},p.prototype.newInN=function(a,b,c,d){for(var e=this,f=[],g=0;g0?d[0]:null},p.prototype.modifyRows=function(b){var c=this,d=c.rows.slice(0),e=c.rowHashMap||c.createRowHashMap();c.rowHashMap=c.createRowHashMap(),c.rows.length=0,b.forEach(function(a,b){var f;f=c.options.enableRowHashing?e.get(a):c.getRow(a,d),f||(f=c.processRowBuilders(new h(a,b,c))),c.rows.push(f),c.rowHashMap.put(a,f)}),c.assignTypes();var f=a.when(c.processRowsProcessors(c.rows)).then(function(a){return c.setVisibleRows(a)}),g=a.when(c.processColumnsProcessors(c.columns)).then(function(a){return c.setVisibleColumns(a)});return a.all([f,g])},p.prototype.addRows=function(a){for(var b=this,c=b.rows.length,d=0;dd)d+=e.drawnWidth,c++;else{for(var g=0,h=f;h>=f-c;h--)g+=a.columns[h].drawnWidth;b>g&&c++}}),c},p.prototype.getBodyHeight=function(){var a=this.getViewportHeight();return a},p.prototype.getViewportHeight=function(){var a=this,b=this.gridHeight-this.headerHeight-this.footerHeight,c=a.getViewportAdjustment();return b+=c.height},p.prototype.getViewportWidth=function(){var a=this,b=this.gridWidth,c=a.getViewportAdjustment();return b+=c.width},p.prototype.getHeaderViewportWidth=function(){var a=this.getViewportWidth();return a},p.prototype.addVerticalScrollSync=function(a,b){this.verticalScrollSyncCallBackFns[a]=b},p.prototype.addHorizontalScrollSync=function(a,b){this.horizontalScrollSyncCallBackFns[a]=b},p.prototype.scrollContainers=function(a,b){if(b.y){var c=["body","left","right"];this.flagScrollingVertically(b),"body"===a?c=["left","right"]:"left"===a?c=["body","right"]:"right"===a&&(c=["body","left"]);for(var d=0;d=b&&(b=a.sort.priority+1)}),b},p.prototype.resetColumnSorting=function(a){var b=this;b.columns.forEach(function(b){b===a||b.suppressRemoveSort||(b.sort={})})},p.prototype.getColumnSorting=function(){var a,b=this,c=[];return a=b.columns.slice(0),a.sort(j.prioritySort).forEach(function(a){a.sort&&"undefined"!=typeof a.sort.direction&&a.sort.direction&&(a.sort.direction===e.ASC||a.sort.direction===e.DESC)&&c.push(a)}),c},p.prototype.sortColumn=function(b,c,d){var e=this,f=null;if("undefined"==typeof b||!b)throw new Error("No column parameter provided");if("boolean"==typeof c?d=c:f=c,d?b.sort.priority||(b.sort.priority=e.getNextColumnSortPriority()):(e.resetColumnSorting(b),b.sort.priority=void 0,b.sort.priority=e.getNextColumnSortPriority()),f)b.sort.direction=f;else{var g=b.sortDirectionCycle.indexOf(b.sort.direction?b.sort.direction:null);g=(g+1)%b.sortDirectionCycle.length,b.colDef&&b.suppressRemoveSort&&!b.sortDirectionCycle[g]&&(g=(g+1)%b.sortDirectionCycle.length),b.sortDirectionCycle[g]?b.sort.direction=b.sortDirectionCycle[g]:b.sort={}}return e.api.core.raise.sortChanged(e,e.getColumnSorting()),a.when(b)},p.prototype.renderingComplete=function(){angular.isFunction(this.options.onRegisterApi)&&this.options.onRegisterApi(this.api),this.api.core.raise.renderingComplete(this.api)},p.prototype.createRowHashMap=function(){var a=this,b=new o;return b.grid=a,b},p.prototype.refresh=function(b){var c=this,d=c.processRowsProcessors(c.rows).then(function(a){c.setVisibleRows(a)}),e=c.processColumnsProcessors(c.columns).then(function(a){c.setVisibleColumns(a)});return a.all([d,e]).then(function(){c.redrawInPlace(b),c.refreshCanvas(!0)})},p.prototype.refreshRows=function(){var a=this;return a.processRowsProcessors(a.rows).then(function(b){a.setVisibleRows(b),a.redrawInPlace(),a.refreshCanvas(!0)})},p.prototype.refreshCanvas=function(b){var c=this;b&&c.buildStyles();var e=a.defer(),f=[];for(var g in c.renderContainers)if(c.renderContainers.hasOwnProperty(g)){var h=c.renderContainers[g];if(null===h.canvasWidth||isNaN(h.canvasWidth))continue;(h.header||h.headerCanvas)&&(h.explicitHeaderHeight=h.explicitHeaderHeight||null,h.explicitHeaderCanvasHeight=h.explicitHeaderCanvasHeight||null,f.push(h))}return f.length>0?(b&&c.buildStyles(),m(function(){var a,g,h=!1,i=0,j=0,k=function(a,b){return a!==b&&(h=!0),b};for(a=0;ao?0:o,g.innerHeaderHeight=o,!g.explicitHeaderHeight&&o>i&&(i=o)}if(g.headerCanvas){var p=g.headerCanvasHeight=k(g.headerCanvasHeight,parseInt(d.outerElementHeight(g.headerCanvas),10));!g.explicitHeaderCanvasHeight&&p>j&&(j=p)}}for(a=0;a0&&"undefined"!=typeof g.headerHeight&&null!==g.headerHeight&&(g.explicitHeaderHeight||g.headerHeight0&&"undefined"!=typeof g.headerCanvasHeight&&null!==g.headerCanvasHeight&&(g.explicitHeaderCanvasHeight||g.headerCanvasHeight0},p.prototype.hasRightContainerColumns=function(){return this.hasRightContainer()&&this.renderContainers.right.renderedColumns.length>0},p.prototype.scrollToIfNecessary=function(b,c){var d=this,e=new n(d,"uiGrid.scrollToIfNecessary"),f=d.renderContainers.body.visibleRowCache,g=d.renderContainers.body.visibleColumnCache,h=d.renderContainers.body.prevScrollTop+d.headerHeight;h=0>h?0:h;var i=d.renderContainers.body.prevScrollLeft,j=d.renderContainers.body.prevScrollTop+d.gridHeight-d.renderContainers.body.headerHeight-d.footerHeight-d.scrollbarWidth,k=d.renderContainers.body.prevScrollLeft+Math.ceil(d.renderContainers.body.getViewportWidth());if(null!==b){var l=f.indexOf(b),m=d.renderContainers.body.getCanvasHeight()-d.renderContainers.body.getViewportHeight(),o=l*d.options.rowHeight+d.headerHeight;o=0>o?0:o;var p,q;h>o?(p=d.renderContainers.body.prevScrollTop-(h-o),q=p/m,e.y={percentage:q}):o>j&&(p=o-j+d.renderContainers.body.prevScrollTop,q=p/m,e.y={percentage:q})}if(null!==c){for(var r=g.indexOf(c),s=d.renderContainers.body.getCanvasWidth()-d.renderContainers.body.getViewportWidth(),t=0,u=0;r>u;u++){var v=g[u];t+=v.drawnWidth}t=0>t?0:t;var w=t+c.drawnWidth;w=0>w?0:w;var x,y;i>t?(x=d.renderContainers.body.prevScrollLeft-(i-t),y=x/s,y=y>1?1:y,e.x={percentage:y}):w>k&&(x=w-k+d.renderContainers.body.prevScrollLeft,y=x/s,y=y>1?1:y,e.x={percentage:y})}var z=a.defer();if(e.y||e.x){e.withDelay=!1,d.scrollContainers("",e);var A=d.api.core.on.scrollEnd(null,function(){z.resolve(e),A()})}else z.resolve();return z.promise},p.prototype.scrollTo=function(a,b){var c=null,d=null;return null!==a&&"undefined"!=typeof a&&(c=this.getRow(a)),null!==b&&"undefined"!=typeof b&&(d=this.getColumn(b.name?b.name:b.field)),this.scrollToIfNecessary(c,d)},p.prototype.clearAllFilters=function(a,b,c){return void 0===a&&(a=!0),void 0===b&&(b=!1),void 0===c&&(c=!1),this.columns.forEach(function(a){a.filters.forEach(function(a){a.term=void 0,b&&(a.condition=void 0),c&&(a.flags=void 0)})}),a?this.refreshRows():void 0},o.prototype={put:function(a,b){this[this.grid.options.rowIdentity(a)]=b},get:function(a){return this[this.grid.options.rowIdentity(a)]},remove:function(a){var b=this[a=this.grid.options.rowIdentity(a)];return delete this[a],b}},p}])}(),function(){angular.module("ui.grid").factory("GridApi",["$q","$rootScope","gridUtil","uiGridConstants","GridRow","uiGridGridMenuService",function(a,b,c,d,e,f){function g(a,c,d,e){return b.$on(a,function(a){var b=Array.prototype.slice.call(arguments);b.splice(0,1),c.apply(e?e:d.api,b)})}var h=function(a){this.grid=a,this.listeners=[],this.registerEvent("core","renderingComplete"),this.registerEvent("core","filterChanged"),this.registerMethod("core","setRowInvisible",e.prototype.setRowInvisible),this.registerMethod("core","clearRowInvisible",e.prototype.clearRowInvisible),this.registerMethod("core","getVisibleRows",this.grid.getVisibleRows),this.registerEvent("core","rowsVisibleChanged"),this.registerEvent("core","rowsRendered"),this.registerEvent("core","scrollBegin"),this.registerEvent("core","scrollEnd"),this.registerEvent("core","canvasHeightChanged")};return h.prototype.suppressEvents=function(a,b){var c=this,d=angular.isArray(a)?a:[a],e=c.listeners.filter(function(a){return d.some(function(b){return a.handler===b})});e.forEach(function(a){a.dereg()}),b(),e.forEach(function(a){a.dereg=g(a.eventId,a.handler,c.grid,a._this)})},h.prototype.registerEvent=function(a,d){var e=this;e[a]||(e[a]={});var f=e[a];f.on||(f.on={},f.raise={});var h=e.grid.id+a+d;f.raise[d]=function(){b.$emit.apply(b,[h].concat(Array.prototype.slice.call(arguments)))},f.on[d]=function(b,f,i){if(null!==b&&"undefined"==typeof b.$on)return void c.logError("asked to listen on "+a+".on."+d+" but scope wasn't passed in the input parameters. It is legitimate to pass null, but you've passed something else, so you probably forgot to provide scope rather than did it deliberately, not registering");var j=g(h,f,e.grid,i),k={handler:f,dereg:j,eventId:h,scope:b,_this:i};e.listeners.push(k);var l=function(){k.dereg();var a=e.listeners.indexOf(k);e.listeners.splice(a,1)};return b&&b.$on("$destroy",function(){l()}),l}},h.prototype.registerEventsFromObject=function(a){var b=this,c=[];angular.forEach(a,function(a,b){var d={name:b,events:[]};angular.forEach(a,function(a,b){d.events.push(b)}),c.push(d)}),c.forEach(function(a){a.events.forEach(function(c){b.registerEvent(a.name,c)})})},h.prototype.registerMethod=function(a,b,d,e){this[a]||(this[a]={});var f=this[a];f[b]=c.createBoundedWrapper(e||this.grid,d)},h.prototype.registerMethodsFromObject=function(a,b){var c=this,d=[];angular.forEach(a,function(a,b){var c={name:b,methods:[]};angular.forEach(a,function(a,b){c.methods.push({name:b,fn:a})}),d.push(c)}),d.forEach(function(a){a.methods.forEach(function(d){c.registerMethod(a.name,d.name,d.fn,b)})})},h}])}(),function(){angular.module("ui.grid").factory("GridColumn",["gridUtil","uiGridConstants","i18nService",function(a,b,c){function d(a,c,d){var e=this;e.grid=d,e.uid=c,e.updateColumnDef(a,!0),e.aggregationValue=void 0,e.updateAggregationValue=function(){if(!e.aggregationType)return void(e.aggregationValue=void 0);var a=0,c=e.grid.getVisibleRows(),d=function(){var a=[];return c.forEach(function(b){var c=e.grid.getCellValue(b,e),d=Number(c);isNaN(d)||a.push(d)}),a};angular.isFunction(e.aggregationType)?e.aggregationValue=e.aggregationType(c,e):e.aggregationType===b.aggregationTypes.count?e.aggregationValue=e.grid.getVisibleRowCount():e.aggregationType===b.aggregationTypes.sum?(d().forEach(function(b){a+=b}),e.aggregationValue=a):e.aggregationType===b.aggregationTypes.avg?(d().forEach(function(b){a+=b}),a/=d().length,e.aggregationValue=a):e.aggregationType===b.aggregationTypes.min?e.aggregationValue=Math.min.apply(null,d()):e.aggregationType===b.aggregationTypes.max?e.aggregationValue=Math.max.apply(null,d()):e.aggregationValue=" "},this.getAggregationValue=function(){return e.aggregationValue}}return d.prototype.hideColumn=function(){this.colDef.visible=!1},d.prototype.setPropertyOrDefault=function(a,b,c){var d=this;"undefined"!=typeof a[b]&&a[b]?d[b]=a[b]:"undefined"!=typeof d[b]?d[b]=d[b]:d[b]=c?c:{}},d.prototype.updateColumnDef=function(c,d){var e=this;if(e.colDef=c,void 0===c.name)throw new Error("colDef.name is required for column at index "+e.grid.options.columnDefs.indexOf(c));if(e.displayName=void 0===c.displayName?a.readableColumnName(c.name):c.displayName,!angular.isNumber(e.width)||!e.hasCustomWidth||c.allowCustomWidthOverride){var f=c.width,g="Cannot parse column width '"+f+"' for column named '"+c.name+"'";if(e.hasCustomWidth=!1,angular.isString(f)||angular.isNumber(f))if(angular.isString(f))if(a.endsWith(f,"%")){var h=f.replace(/%/g,""),i=parseInt(h,10);if(isNaN(i))throw new Error(g);e.width=f}else if(f.match(/^(\d+)$/))e.width=parseInt(f.match(/^(\d+)$/)[1],10);else{if(!f.match(/^\*+$/))throw new Error(g);e.width=f}else e.width=f;else e.width="*"}["minWidth","maxWidth"].forEach(function(a){var b=c[a],d="Cannot parse column "+a+" '"+b+"' for column named '"+c.name+"'";if(angular.isString(b)||angular.isNumber(b))if(angular.isString(b)){if(!b.match(/^(\d+)$/))throw new Error(d);e[a]=parseInt(b.match(/^(\d+)$/)[1],10)}else e[a]=b;else e[a]="minWidth"===a?30:9e3}),e.field=void 0===c.field?c.name:c.field,"string"!=typeof e.field&&a.logError("Field is not a string, this is likely to break the code, Field is: "+e.field),e.name=c.name,e.displayName=void 0===c.displayName?a.readableColumnName(c.name):c.displayName,e.aggregationType=angular.isDefined(c.aggregationType)?c.aggregationType:null,e.footerCellTemplate=angular.isDefined(c.footerCellTemplate)?c.footerCellTemplate:null,"undefined"==typeof c.cellTooltip||c.cellTooltip===!1?e.cellTooltip=!1:c.cellTooltip===!0?e.cellTooltip=function(a,b){return e.grid.getCellValue(a,b)}:"function"==typeof c.cellTooltip?e.cellTooltip=c.cellTooltip:e.cellTooltip=function(a,b){return b.colDef.cellTooltip},"undefined"==typeof c.headerTooltip||c.headerTooltip===!1?e.headerTooltip=!1:c.headerTooltip===!0?e.headerTooltip=function(a){return a.displayName}:"function"==typeof c.headerTooltip?e.headerTooltip=c.headerTooltip:e.headerTooltip=function(a){return a.colDef.headerTooltip},e.footerCellClass=c.footerCellClass,e.cellClass=c.cellClass,e.headerCellClass=c.headerCellClass,e.cellFilter=c.cellFilter?c.cellFilter:"",e.sortCellFiltered=c.sortCellFiltered?!0:!1,e.filterCellFiltered=c.filterCellFiltered?!0:!1,e.headerCellFilter=c.headerCellFilter?c.headerCellFilter:"",e.footerCellFilter=c.footerCellFilter?c.footerCellFilter:"",e.visible=a.isNullOrUndefined(c.visible)||c.visible,e.headerClass=c.headerClass,e.enableSorting="undefined"!=typeof c.enableSorting?c.enableSorting:!0,e.sortingAlgorithm=c.sortingAlgorithm,e.sortDirectionCycle="undefined"!=typeof c.sortDirectionCycle?c.sortDirectionCycle:[null,b.ASC,b.DESC],"undefined"==typeof e.suppressRemoveSort&&(e.suppressRemoveSort="undefined"!=typeof c.suppressRemoveSort?c.suppressRemoveSort:!1),e.enableFiltering="undefined"!=typeof c.enableFiltering?c.enableFiltering:!0,e.setPropertyOrDefault(c,"menuItems",[]),d&&e.setPropertyOrDefault(c,"sort");var j=[];c.filter?j.push(c.filter):c.filters?j=c.filters:j.push({}),d?(e.setPropertyOrDefault(c,"filter"),e.setPropertyOrDefault(c,"filters",j)):e.filters.length===j.length&&e.filters.forEach(function(a,b){"undefined"!=typeof j[b].placeholder&&(a.placeholder=j[b].placeholder),"undefined"!=typeof j[b].ariaLabel&&(a.ariaLabel=j[b].ariaLabel),"undefined"!=typeof j[b].flags&&(a.flags=j[b].flags),"undefined"!=typeof j[b].type&&(a.type=j[b].type),"undefined"!=typeof j[b].selectOptions&&(a.selectOptions=j[b].selectOptions)})},d.prototype.unsort=function(){this.sort={},this.grid.api.core.raise.sortChanged(this.grid,this.grid.getColumnSorting())},d.prototype.getColClass=function(a){var c=b.COL_CLASS_PREFIX+this.uid;return a?"."+c:c},d.prototype.isPinnedLeft=function(){return"left"===this.renderContainer},d.prototype.isPinnedRight=function(){return"right"===this.renderContainer},d.prototype.getColClassDefinition=function(){return" .grid"+this.grid.id+" "+this.getColClass(!0)+" { min-width: "+this.drawnWidth+"px; max-width: "+this.drawnWidth+"px; }"},d.prototype.getRenderContainer=function(){var a=this,b=a.renderContainer;return(null===b||""===b||void 0===b)&&(b="body"),a.grid.renderContainers[b]},d.prototype.showColumn=function(){this.colDef.visible=!0},d.prototype.getAggregationText=function(){var a=this;if(a.colDef.aggregationHideLabel)return"";if(a.colDef.aggregationLabel)return a.colDef.aggregationLabel;switch(a.colDef.aggregationType){case b.aggregationTypes.count:return c.getSafeText("aggregation.count");case b.aggregationTypes.sum:return c.getSafeText("aggregation.sum");case b.aggregationTypes.avg:return c.getSafeText("aggregation.avg");case b.aggregationTypes.min:return c.getSafeText("aggregation.min");case b.aggregationTypes.max:return c.getSafeText("aggregation.max");default:return""}},d.prototype.getCellTemplate=function(){var a=this;return a.cellTemplatePromise},d.prototype.getCompiledElementFn=function(){var a=this;return a.compiledElementFnDefer.promise},d}])}(),function(){angular.module("ui.grid").factory("GridOptions",["gridUtil","uiGridConstants",function(a,b){return{initialize:function(c){return c.onRegisterApi=c.onRegisterApi||angular.noop(),c.data=c.data||[],c.columnDefs=c.columnDefs||[],c.excludeProperties=c.excludeProperties||["$$hashKey"],c.enableRowHashing=c.enableRowHashing!==!1,c.rowIdentity=c.rowIdentity||function(b){return a.hashKey(b)},c.getRowIdentity=c.getRowIdentity||function(a){return a.$$hashKey},c.flatEntityAccess=c.flatEntityAccess===!0,c.showHeader="undefined"!=typeof c.showHeader?c.showHeader:!0,c.showHeader?c.headerRowHeight="undefined"!=typeof c.headerRowHeight?c.headerRowHeight:30:c.headerRowHeight=0,c.rowHeight=c.rowHeight||30,c.minRowsToShow="undefined"!=typeof c.minRowsToShow?c.minRowsToShow:10,c.showGridFooter=c.showGridFooter===!0,c.showColumnFooter=c.showColumnFooter===!0,c.columnFooterHeight="undefined"!=typeof c.columnFooterHeight?c.columnFooterHeight:30,c.gridFooterHeight="undefined"!=typeof c.gridFooterHeight?c.gridFooterHeight:30,c.columnWidth="undefined"!=typeof c.columnWidth?c.columnWidth:50,c.maxVisibleColumnCount="undefined"!=typeof c.maxVisibleColumnCount?c.maxVisibleColumnCount:200,c.virtualizationThreshold="undefined"!=typeof c.virtualizationThreshold?c.virtualizationThreshold:20,c.columnVirtualizationThreshold="undefined"!=typeof c.columnVirtualizationThreshold?c.columnVirtualizationThreshold:10,c.excessRows="undefined"!=typeof c.excessRows?c.excessRows:4,c.scrollThreshold="undefined"!=typeof c.scrollThreshold?c.scrollThreshold:4,c.excessColumns="undefined"!=typeof c.excessColumns?c.excessColumns:4,c.horizontalScrollThreshold="undefined"!=typeof c.horizontalScrollThreshold?c.horizontalScrollThreshold:2,c.aggregationCalcThrottle="undefined"!=typeof c.aggregationCalcThrottle?c.aggregationCalcThrottle:500,c.wheelScrollThrottle="undefined"!=typeof c.wheelScrollThrottle?c.wheelScrollThrottle:70,c.scrollDebounce="undefined"!=typeof c.scrollDebounce?c.scrollDebounce:300,c.enableSorting=c.enableSorting!==!1,c.enableFiltering=c.enableFiltering===!0,c.enableColumnMenus=c.enableColumnMenus!==!1,c.enableVerticalScrollbar="undefined"!=typeof c.enableVerticalScrollbar?c.enableVerticalScrollbar:b.scrollbars.ALWAYS,c.enableHorizontalScrollbar="undefined"!=typeof c.enableHorizontalScrollbar?c.enableHorizontalScrollbar:b.scrollbars.ALWAYS,c.enableMinHeightCheck=c.enableMinHeightCheck!==!1,c.minimumColumnSize="undefined"!=typeof c.minimumColumnSize?c.minimumColumnSize:10,c.rowEquality=c.rowEquality||function(a,b){ +return a===b},c.headerTemplate=c.headerTemplate||null,c.footerTemplate=c.footerTemplate||"ui-grid/ui-grid-footer",c.gridFooterTemplate=c.gridFooterTemplate||"ui-grid/ui-grid-grid-footer",c.rowTemplate=c.rowTemplate||"ui-grid/ui-grid-row",c.appScopeProvider=c.appScopeProvider||null,c}}}])}(),function(){angular.module("ui.grid").factory("GridRenderContainer",["gridUtil","uiGridConstants",function(a,b){function c(a,b,c){var d=this;d.name=a,d.grid=b,d.visibleRowCache=[],d.visibleColumnCache=[],d.renderedRows=[],d.renderedColumns=[],d.prevScrollTop=0,d.prevScrolltopPercentage=0,d.prevRowScrollIndex=0,d.prevScrollLeft=0,d.prevScrollleftPercentage=0,d.prevColumnScrollIndex=0,d.columnStyles="",d.viewportAdjusters=[],d.hasHScrollbar=!1,d.hasVScrollbar=!1,d.canvasHeightShouldUpdate=!0,d.$$canvasHeight=0,c&&angular.isObject(c)&&angular.extend(d,c),b.registerStyleComputation({priority:5,func:function(){return d.updateColumnWidths(),d.columnStyles}})}return c.prototype.reset=function(){this.visibleColumnCache.length=0,this.visibleRowCache.length=0,this.renderedRows.length=0,this.renderedColumns.length=0},c.prototype.containsColumn=function(a){return-1!==this.visibleColumnCache.indexOf(a)},c.prototype.minRowsToRender=function(){for(var a=this,b=0,c=0,d=a.getViewportHeight(),e=a.visibleRowCache.length-1;d>c&&e>=0;e--)c+=a.visibleRowCache[e].height,b++;return b},c.prototype.minColumnsToRender=function(){for(var a=this,b=this.getViewportWidth(),c=0,d=0,e=0;ed)d+=f.drawnWidth?f.drawnWidth:0,c++;else{for(var g=0,h=e;h>=e-c;h--)g+=a.visibleColumnCache[h].drawnWidth?a.visibleColumnCache[h].drawnWidth:0;b>g&&c++}}return c},c.prototype.getVisibleRowCount=function(){return this.visibleRowCache.length},c.prototype.registerViewportAdjuster=function(a){this.viewportAdjusters.push(a)},c.prototype.removeViewportAdjuster=function(a){var b=this.viewportAdjusters.indexOf(a);b>-1&&this.viewportAdjusters.splice(b,1)},c.prototype.getViewportAdjustment=function(){var a=this,b={height:0,width:0};return a.viewportAdjusters.forEach(function(a){b=a.call(this,b)}),b},c.prototype.getMargin=function(a){var b=this,c=0;return b.viewportAdjusters.forEach(function(b){var d=b.call(this,{height:0,width:0});d.side&&d.side===a&&(c+=-1*d.width)}),c},c.prototype.getViewportHeight=function(){var a=this,b=a.headerHeight?a.headerHeight:a.grid.headerHeight,c=a.grid.gridHeight-b-a.grid.footerHeight,d=a.getViewportAdjustment();return c+=d.height},c.prototype.getViewportWidth=function(){var a=this,b=a.grid.gridWidth,c=a.getViewportAdjustment();return b+=c.width},c.prototype.getHeaderViewportWidth=function(){var a=this.getViewportWidth();return a},c.prototype.getCanvasHeight=function(){var a=this;if(!a.canvasHeightShouldUpdate)return a.$$canvasHeight;var b=a.$$canvasHeight;return a.$$canvasHeight=0,a.visibleRowCache.forEach(function(b){a.$$canvasHeight+=b.height}),a.canvasHeightShouldUpdate=!1,a.grid.api.core.raise.canvasHeightChanged(b,a.$$canvasHeight),a.$$canvasHeight},c.prototype.getVerticalScrollLength=function(){return this.getCanvasHeight()-this.getViewportHeight()+this.grid.scrollbarHeight},c.prototype.getCanvasWidth=function(){var a=this,b=a.canvasWidth;return b},c.prototype.setRenderedRows=function(a){this.renderedRows.length=a.length;for(var b=0;b0&&(this.grid.scrollDirection=b.scrollDirection.DOWN),0>d&&(this.grid.scrollDirection=b.scrollDirection.UP);var e=this.getVerticalScrollLength();return c=a/e,c>1&&(c=1),0>c&&(c=0),this.adjustScrollVertical(a,c),c}},c.prototype.scrollHorizontal=function(a){var c=-1;if(a!==this.prevScrollLeft){var d=a-this.prevScrollLeft;d>0&&(this.grid.scrollDirection=b.scrollDirection.RIGHT),0>d&&(this.grid.scrollDirection=b.scrollDirection.LEFT);var e=this.canvasWidth-this.getViewportWidth();return c=0!==e?a/e:0,this.adjustScrollHorizontal(a,c),c}},c.prototype.adjustScrollVertical=function(a,b,c){(this.prevScrollTop!==a||c)&&(("undefined"==typeof a||void 0===a||null===a)&&(a=(this.getCanvasHeight()-this.getViewportHeight())*b),this.adjustRows(a,b,!1),this.prevScrollTop=a,this.prevScrolltopPercentage=b,this.grid.queueRefresh())},c.prototype.adjustScrollHorizontal=function(a,b,c){(this.prevScrollLeft!==a||c)&&(("undefined"==typeof a||void 0===a||null===a)&&(a=(this.getCanvasWidth()-this.getViewportWidth())*b),this.adjustColumns(a,b),this.prevScrollLeft=a,this.prevScrollleftPercentage=b,this.grid.queueRefresh())},c.prototype.adjustRows=function(a,b,c){var d=this,e=d.minRowsToRender(),f=d.visibleRowCache,g=f.length-e;"undefined"!=typeof b&&null!==b||!a||(b=a/d.getVerticalScrollLength());var h=Math.ceil(Math.min(g,g*b));h>g&&(h=g);var i=[];if(f.length>d.grid.options.virtualizationThreshold){if("undefined"!=typeof a&&null!==a){if(!d.grid.suppressParentScrollDown&&d.prevScrollToph)return;if(!d.grid.suppressParentScrollUp&&d.prevScrollTop>a&&h>d.prevRowScrollIndex-d.grid.options.scrollThreshold&&g>h)return}var j={},k={};j=Math.max(0,h-d.grid.options.excessRows),k=Math.min(f.length,h+e+d.grid.options.excessRows),i=[j,k]}else{var l=d.visibleRowCache.length;i=[0,Math.max(l,e+d.grid.options.excessRows)]}d.updateViewableRowRange(i),d.prevRowScrollIndex=h},c.prototype.adjustColumns=function(a,b){var c=this,d=c.minColumnsToRender(),e=c.visibleColumnCache,f=e.length-d;if(("undefined"==typeof b||null===b)&&a){var g=c.getCanvasWidth()-c.getViewportWidth();b=a/g}var h=Math.ceil(Math.min(f,f*b));h>f&&(h=f);var i=[];if(e.length>c.grid.options.columnVirtualizationThreshold&&c.getCanvasWidth()>c.getViewportWidth()){var j=Math.max(0,h-c.grid.options.excessColumns),k=Math.min(e.length,h+d+c.grid.options.excessColumns);i=[j,k]}else{var l=c.visibleColumnCache.length;i=[0,Math.max(l,d+c.grid.options.excessColumns)]}c.updateViewableColumnRange(i),c.prevColumnScrollIndex=h},c.prototype.updateViewableRowRange=function(a){var b=this.visibleRowCache.slice(a[0],a[1]);this.currentTopRow=a[0],this.setRenderedRows(b)},c.prototype.updateViewableColumnRange=function(a){var b=this.visibleColumnCache.slice(a[0],a[1]);this.currentFirstColumn=a[0],this.setRenderedColumns(b)},c.prototype.headerCellWrapperStyle=function(){var a=this;if(0!==a.currentFirstColumn){var b=a.columnOffset;return a.grid.isRTL()?{"margin-right":b+"px"}:{"margin-left":b+"px"}}return null},c.prototype.updateColumnWidths=function(){var b=this,c=[],d=0,e=0,f="",g=b.grid.getViewportWidth()-b.grid.scrollbarWidth,h=[];angular.forEach(b.grid.renderContainers,function(a,b){h=h.concat(a.visibleColumnCache)}),h.forEach(function(b,f){var h=0;b.visible&&(angular.isNumber(b.width)?(h=parseInt(b.width,10),e+=h,b.drawnWidth=h):a.endsWith(b.width,"%")?(h=parseInt(parseInt(b.width.replace(/%/g,""),10)/100*g),h>b.maxWidth&&(h=b.maxWidth),h0){var j=i/d;c.forEach(function(a){var b=parseInt(a.width.length*j,10);b>a.maxWidth&&(b=a.maxWidth),b0&&(a.drawnWidth++,e++,l--,m=!0)},l=g-e,m=!0;l>0&&m;)m=!1,c.forEach(k);var n=function(a){a.drawnWidth>a.minWidth&&o>0&&(a.drawnWidth--,e--,o--,m=!0)},o=e-g;for(m=!0;o>0&&m;)m=!1,c.forEach(n);var p=0;b.visibleColumnCache.forEach(function(a){a.visible&&(p+=a.drawnWidth)}),h.forEach(function(a){f+=a.getColClassDefinition()}),b.canvasWidth=p,this.columnStyles=f},c.prototype.needsHScrollbarPlaceholder=function(){return this.grid.options.enableHorizontalScrollbar&&!this.hasHScrollbar&&!this.grid.disableScrolling},c.prototype.getViewportStyle=function(){var a=this,c={};return a.hasHScrollbar=!1,a.hasVScrollbar=!1,a.grid.disableScrolling?(c["overflow-x"]="hidden",c["overflow-y"]="hidden",c):("body"===a.name?(a.hasHScrollbar=a.grid.options.enableHorizontalScrollbar!==b.scrollbars.NEVER,a.grid.isRTL()?a.grid.hasLeftContainerColumns()||(a.hasVScrollbar=a.grid.options.enableVerticalScrollbar!==b.scrollbars.NEVER):a.grid.hasRightContainerColumns()||(a.hasVScrollbar=a.grid.options.enableVerticalScrollbar!==b.scrollbars.NEVER)):"left"===a.name?a.hasVScrollbar=a.grid.isRTL()?a.grid.options.enableVerticalScrollbar!==b.scrollbars.NEVER:!1:a.hasVScrollbar=a.grid.isRTL()?!1:a.grid.options.enableVerticalScrollbar!==b.scrollbars.NEVER,c["overflow-x"]=a.hasHScrollbar?"scroll":"hidden",c["overflow-y"]=a.hasVScrollbar?"scroll":"hidden",c)},c}])}(),function(){angular.module("ui.grid").factory("GridRow",["gridUtil",function(a){function b(b,c,d){this.grid=d,this.entity=b,this.uid=a.nextUid(),this.visible=!0,this.$$height=d.options.rowHeight}return Object.defineProperty(b.prototype,"height",{get:function(){return this.$$height},set:function(a){a!==this.$$height&&(this.grid.updateCanvasHeight(),this.$$height=a)}}),b.prototype.getQualifiedColField=function(a){return"row."+this.getEntityQualifiedColField(a)},b.prototype.getEntityQualifiedColField=function(b){return a.preEval("entity."+b.field)},b.prototype.setRowInvisible=function(a){a&&a.setThisRowInvisible&&a.setThisRowInvisible("user")},b.prototype.clearRowInvisible=function(a){a&&a.clearThisRowInvisible&&a.clearThisRowInvisible("user")},b.prototype.setThisRowInvisible=function(a,b){this.invisibleReason||(this.invisibleReason={}),this.invisibleReason[a]=!0,this.evaluateRowVisibility(b)},b.prototype.clearThisRowInvisible=function(a,b){"undefined"!=typeof this.invisibleReason&&delete this.invisibleReason[a],this.evaluateRowVisibility(b)},b.prototype.evaluateRowVisibility=function(a){var b=!0;"undefined"!=typeof this.invisibleReason&&angular.forEach(this.invisibleReason,function(a,c){a&&(b=!1)}),("undefined"==typeof this.visible||this.visible!==b)&&(this.visible=b,a||(this.grid.queueGridRefresh(),this.grid.api.core.raise.rowsVisibleChanged(this)))},b}])}(),function(){"use strict";angular.module("ui.grid").factory("GridRowColumn",["$parse","$filter",function(a,b){var c=function d(a,b){if(!(this instanceof d))throw"Using GridRowColumn as a function insead of as a constructor. Must be called with `new` keyword";this.row=a,this.col=b};return c.prototype.getIntersectionValueRaw=function(){var b=a(this.row.getEntityQualifiedColField(this.col)),c=this.row;return b(c)},c.prototype.getIntersectionValueFiltered=function(){var a=this.getIntersectionValueRaw();if(this.col.cellFilter&&""!==this.col.cellFilter){var c=function(a){try{return b(a)}catch(c){return null}},d=c(this.col.cellFilter);if(d)a=d(a);else{var e,f=/([^:]*):([^:]*):?([\s\S]+)?/;null!==(e=f.exec(this.col.cellFilter))&&(a=b(e[1])(a,e[2],e[3]))}}return a},c}])}(),function(){angular.module("ui.grid").factory("ScrollEvent",["gridUtil",function(a){function b(b,c,d,e){var f=this;if(!b)throw new Error("grid argument is required");f.grid=b,f.source=e,f.withDelay=!0,f.sourceRowContainer=c,f.sourceColContainer=d,f.newScrollLeft=null,f.newScrollTop=null,f.x=null,f.y=null,f.verticalScrollLength=-9999999,f.horizontalScrollLength=-999999,f.fireThrottledScrollingEvent=a.throttle(function(a){f.grid.scrollContainers(a,f)},f.grid.options.wheelScrollThrottle,{trailing:!0})}return b.prototype.getNewScrollLeft=function(b,c){var d=this;if(!d.newScrollLeft){var e,f=b.getCanvasWidth()-b.getViewportWidth(),g=a.normalizeScrollLeft(c,d.grid);if("undefined"!=typeof d.x.percentage&&void 0!==d.x.percentage)e=d.x.percentage;else{if("undefined"==typeof d.x.pixels||void 0===d.x.pixels)throw new Error("No percentage or pixel value provided for scroll event X axis");e=d.x.percentage=(g+d.x.pixels)/f}return Math.max(0,e*f)}return d.newScrollLeft},b.prototype.getNewScrollTop=function(a,b){var c=this;if(!c.newScrollTop){var d,e=a.getVerticalScrollLength(),f=b[0].scrollTop;if("undefined"!=typeof c.y.percentage&&void 0!==c.y.percentage)d=c.y.percentage;else{if("undefined"==typeof c.y.pixels||void 0===c.y.pixels)throw new Error("No percentage or pixel value provided for scroll event Y axis");d=c.y.percentage=(f+c.y.pixels)/e}return Math.max(0,d*e)}return c.newScrollTop},b.prototype.atTop=function(a){return this.y&&(0===this.y.percentage||this.verticalScrollLength<0)&&0===a},b.prototype.atBottom=function(a){return this.y&&(1===this.y.percentage||0===this.verticalScrollLength)&&a>0},b.prototype.atLeft=function(a){return this.x&&(0===this.x.percentage||this.horizontalScrollLength<0)&&0===a},b.prototype.atRight=function(a){return this.x&&(1===this.x.percentage||0===this.horizontalScrollLength)&&a>0},b.Sources={ViewPortScroll:"ViewPortScroll",RenderContainerMouseWheel:"RenderContainerMouseWheel",RenderContainerTouchMove:"RenderContainerTouchMove",Other:99},b}])}(),function(){"use strict";angular.module("ui.grid").service("gridClassFactory",["gridUtil","$q","$compile","$templateCache","uiGridConstants","Grid","GridColumn","GridRow",function(a,b,c,d,e,f,g,h){var i={createGrid:function(d){d="undefined"!=typeof d?d:{},d.id=a.newId();var e=new f(d);if(e.options.rowTemplate){var g=b.defer();e.getRowTemplateFn=g.promise,a.getTemplate(e.options.rowTemplate).then(function(a){var b=c(a);g.resolve(b)},function(a){throw new Error("Couldn't fetch/use row template '"+e.options.rowTemplate+"'")})}return e.registerColumnBuilder(i.defaultColumnBuilder),e.registerRowBuilder(i.rowTemplateAssigner),e.registerRowsProcessor(function(a){return a.forEach(function(a){a.evaluateRowVisibility(!0)},50),a}),e.registerColumnsProcessor(function(a){return a.forEach(function(a){a.visible=!0}),a},50),e.registerColumnsProcessor(function(a){return a.forEach(function(a){a.colDef.visible===!1&&(a.visible=!1)}),a},50),e.registerRowsProcessor(e.searchRows,100),e.options.externalSort&&angular.isFunction(e.options.externalSort)?e.registerRowsProcessor(e.options.externalSort,200):e.registerRowsProcessor(e.sortByColumn,200),e},defaultColumnBuilder:function(c,d,f){var g=[],h=function(b,f,h,i,j){c[b]?d[f]=c[b]:d[f]=h,g.push(a.getTemplate(d[f]).then(function(a){angular.isFunction(a)&&(a=a());var c="cellTooltip"===j?"col.cellTooltip(row,col)":"col.headerTooltip(col)";j&&d[j]===!1?a=a.replace(e.TOOLTIP,""):j&&d[j]&&(a=a.replace(e.TOOLTIP,'title="{{'+c+' CUSTOM_FILTERS }}"')),i?d[b]=a.replace(e.CUSTOM_FILTERS,function(){return d[i]?"|"+d[i]:""}):d[b]=a},function(a){throw new Error("Couldn't fetch/use colDef."+b+" '"+c[b]+"'")}))};return h("cellTemplate","providedCellTemplate","ui-grid/uiGridCell","cellFilter","cellTooltip"),d.cellTemplatePromise=g[0],h("headerCellTemplate","providedHeaderCellTemplate","ui-grid/uiGridHeaderCell","headerCellFilter","headerTooltip"),h("footerCellTemplate","providedFooterCellTemplate","ui-grid/uiGridFooterCell","footerCellFilter"),h("filterHeaderTemplate","providedFilterHeaderTemplate","ui-grid/ui-grid-filter"),d.compiledElementFnDefer=b.defer(),b.all(g)},rowTemplateAssigner:function(d){var e=this;if(d.rowTemplate){var f=b.defer();d.getRowTemplateFn=f.promise,a.getTemplate(d.rowTemplate).then(function(a){var b=c(a);f.resolve(b)},function(a){throw new Error("Couldn't fetch/use row template '"+d.rowTemplate+"'")})}else d.rowTemplate=e.options.rowTemplate,d.getRowTemplateFn=e.getRowTemplateFn;return d.getRowTemplateFn}};return i}])}(),function(){function a(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var b=angular.module("ui.grid");b.service("rowSearcher",["gridUtil","uiGridConstants",function(b,c){var d=c.filter.CONTAINS,e={};return e.getTerm=function(a){if("undefined"==typeof a.term)return a.term;var b=a.term;return"string"==typeof b&&(b=b.trim()),b},e.stripTerm=function(b){var c=e.getTerm(b);return"string"==typeof c?a(c.replace(/(^\*|\*$)/g,"")):c},e.guessCondition=function(a){if("undefined"==typeof a.term||!a.term)return d;var b=e.getTerm(a);if(/\*/.test(b)){var c="";a.flags&&a.flags.caseSensitive||(c+="i");var f=b.replace(/(\\)?\*/g,function(a,b){return b?a:"[\\s\\S]*?"});return new RegExp("^"+f+"$",c)}return d},e.setupFilters=function(a){for(var d=[],f=a.length,g=0;f>g;g++){var h=a[g];if(h.noTerm||!b.isNullOrUndefined(h.term)){var i={},j="";h.flags&&h.flags.caseSensitive||(j+="i"),b.isNullOrUndefined(h.term)||(i.term=e.stripTerm(h)),h.condition?i.condition=h.condition:i.condition=e.guessCondition(h),i.flags=angular.extend({caseSensitive:!1,date:!1},h.flags),i.condition===c.filter.STARTS_WITH&&(i.startswithRE=new RegExp("^"+i.term,j)),i.condition===c.filter.ENDS_WITH&&(i.endswithRE=new RegExp(i.term+"$",j)),i.condition===c.filter.CONTAINS&&(i.containsRE=new RegExp(i.term,j)),i.condition===c.filter.EXACT&&(i.exactRE=new RegExp("^"+i.term+"$",j)),d.push(i)}}return d},e.runColumnFilter=function(a,b,d,e){var f,g=typeof e.condition,h=e.term;if(f=d.filterCellFiltered?a.getCellDisplayValue(b,d):a.getCellValue(b,d),e.condition instanceof RegExp)return e.condition.test(f);if("function"===g)return e.condition(h,f,b,d);if(e.startswithRE)return e.startswithRE.test(f);if(e.endswithRE)return e.endswithRE.test(f);if(e.containsRE)return e.containsRE.test(f);if(e.exactRE)return e.exactRE.test(f);if(e.condition===c.filter.NOT_EQUAL){var i=new RegExp("^"+h+"$");return!i.exec(f)}if("number"==typeof f&&"string"==typeof h){var j=parseFloat(h.replace(/\\\./,".").replace(/\\\-/,"-"));isNaN(j)||(h=j)}return e.flags.date===!0&&(f=new Date(f),h=new Date(h.replace(/\\/g,""))),e.condition===c.filter.GREATER_THAN?f>h:e.condition===c.filter.GREATER_THAN_OR_EQUAL?f>=h:e.condition===c.filter.LESS_THAN?h>f:e.condition===c.filter.LESS_THAN_OR_EQUAL?h>=f:!0},e.searchColumn=function(a,b,c,d){if(a.options.useExternalFiltering)return!0;for(var f=d.length,g=0;f>g;g++){var h=d[g],i=e.runColumnFilter(a,b,c,h);if(!i)return!1}return!0},e.search=function(a,c,d){if(c){if(!a.options.enableFiltering)return c;for(var f=[],g=d.length,h=function(a){var c=!1;return a.forEach(function(a){(!b.isNullOrUndefined(a.term)&&""!==a.term||a.noTerm)&&(c=!0)}),c},i=0;g>i;i++){var j=d[i];"undefined"!=typeof j.filters&&h(j.filters)&&f.push({col:j,filters:e.setupFilters(j.filters)})}if(f.length>0){for(var k=function(a,b,c,d){b.visible&&!e.searchColumn(a,b,c,d)&&(b.visible=!1)},l=function(a,b){for(var d=c.length,e=0;d>e;e++)k(a,c[e],b.col,b.filters)},m=f.length,n=0;m>n;n++)l(a,f[n]);a.api.core.raise.rowsVisibleChanged&&a.api.core.raise.rowsVisibleChanged()}return c}},e}])}(),function(){var a=angular.module("ui.grid");a.service("rowSorter",["$parse","uiGridConstants",function(a,b){var c="("+b.CURRENCY_SYMBOLS.map(function(a){return"\\"+a}).join("|")+")?",d=(new RegExp("^[-+]?"+c+"[\\d,.]+"+c+"%?$"),{colSortFnCache:{}});return d.guessSortFn=function(a){switch(a){case"number":return d.sortNumber;case"numberStr":return d.sortNumberStr;case"boolean":return d.sortBool;case"string":return d.sortAlpha;case"date":return d.sortDate;case"object":return d.basicSort;default:throw new Error("No sorting function found for type:"+a)}},d.handleNulls=function(a,b){if(!a&&0!==a&&a!==!1||!b&&0!==b&&b!==!1){if(!a&&0!==a&&a!==!1&&!b&&0!==b&&b!==!1)return 0;if(!a&&0!==a&&a!==!1)return 1;if(!b&&0!==b&&b!==!1)return-1}return null},d.basicSort=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a===b?0:b>a?-1:1},d.sortNumber=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a-b},d.sortNumberStr=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;var e,f,g=!1,h=!1;return e=parseFloat(a.replace(/[^0-9.-]/g,"")),isNaN(e)&&(g=!0),f=parseFloat(b.replace(/[^0-9.-]/g,"")),isNaN(f)&&(h=!0),g&&h?0:g?1:h?-1:e-f},d.sortAlpha=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;var e=a.toString().toLowerCase(),f=b.toString().toLowerCase();return e===f?0:e.localeCompare(f)},d.sortDate=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;a instanceof Date||(a=new Date(a)),b instanceof Date||(b=new Date(b));var e=a.getTime(),f=b.getTime();return e===f?0:f>e?-1:1},d.sortBool=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a&&b?0:a||b?a?1:-1:0},d.getSortFn=function(a,b,c){var e;return d.colSortFnCache[b.colDef.name]?e=d.colSortFnCache[b.colDef.name]:void 0!==b.sortingAlgorithm?(e=b.sortingAlgorithm,d.colSortFnCache[b.colDef.name]=b.sortingAlgorithm):b.sortCellFiltered&&b.cellFilter?(e=d.sortAlpha,d.colSortFnCache[b.colDef.name]=e):(e=d.guessSortFn(b.colDef.type),e?d.colSortFnCache[b.colDef.name]=e:e=d.sortAlpha),e},d.prioritySort=function(a,b){return void 0!==a.sort.priority&&void 0!==b.sort.priority?a.sort.priorityf;f+=2){var i=h[f];if("margin"===c){var j=parseFloat(e[c+i]);isNaN(j)||(g+=j)}if(d){if("content"===c){var k=parseFloat(e["padding"+i]);isNaN(k)||(g-=k)}if("margin"!==c){var l=parseFloat(e["border"+i+"Width"]);isNaN(l)||(g-=l)}}else{var m=parseFloat(e["padding"+i]);if(isNaN(m)||(g+=m),"padding"!==c){var n=parseFloat(e["border"+i+"Width"]);isNaN(n)||(g+=n)}}}return g}function c(c,d,e){var f,h=!0,i=a(c),j="border-box"===i.boxSizing;if(0>=f||null==f){if(f=i[d],(0>f||null==f)&&(f=c.style[d]),g.test(f))return f;h=j&&!0,f=parseFloat(f)||0}var k=f+b(c,d,e||(j?"border":"content"),h,i);return k}function d(b){b=angular.element(b)[0];var c=b.parentElement;return c||(c=document.getElementsByTagName("body")[0]),parseInt(a(c).fontSize)||parseInt(a(b).fontSize)||16}var e,f=angular.module("ui.grid");"function"!=typeof Function.prototype.bind&&(e=function(){var a=Array.prototype.slice;return function(b){var c=this,d=a.call(arguments,1);return d.length?function(){return arguments.length?c.apply(b,d.concat(a.call(arguments))):c.apply(b,d)}:function(){return arguments.length?c.apply(b,arguments):c.call(b)}}});var g=new RegExp("^("+/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source+")(?!px)[a-z%]+$","i"),h=/^(block|none|table(?!-c[ea]).+)/,i={position:"absolute",visibility:"hidden",display:"block"},j=["0","0","0","0"],k="uiGrid-";f.service("gridUtil",["$log","$window","$document","$http","$templateCache","$timeout","$interval","$injector","$q","$interpolate","uiGridConstants",function(f,g,l,m,n,o,p,q,r,s,t){function u(a,b){var c=angular.element(this),d=0,e=0,f=0,g=0;if(b.originalEvent&&(b=b.originalEvent),"detail"in b&&(f=-1*b.detail),"wheelDelta"in b&&(f=b.wheelDelta),"wheelDeltaY"in b&&(f=b.wheelDeltaY),"wheelDeltaX"in b&&(e=-1*b.wheelDeltaX),"axis"in b&&b.axis===b.HORIZONTAL_AXIS&&(e=-1*f,f=0),d=0===f?e:f,"deltaY"in b&&(f=-1*b.deltaY,d=f),"deltaX"in b&&(e=b.deltaX,0===f&&(d=-1*e)),0!==f||0!==e){if(1===b.deltaMode){var h=c.data("mousewheel-line-height");d*=h,f*=h,e*=h}else if(2===b.deltaMode){var i=c.data("mousewheel-page-height");d*=i,f*=i,e*=i}g=Math.max(Math.abs(f),Math.abs(e)),(!z||z>g)&&(z=g,w(b,g)&&(z/=40)),d=Math[d>=1?"floor":"ceil"](d/z),e=Math[e>=1?"floor":"ceil"](e/z),f=Math[f>=1?"floor":"ceil"](f/z),b.deltaMode=0;var j={originalEvent:b,deltaX:e,deltaY:f,deltaFactor:z,preventDefault:function(){b.preventDefault()},stopPropagation:function(){b.stopPropagation()}};y&&clearTimeout(y),y=setTimeout(v,200),a.call(c[0],j)}}function v(){z=null}function w(a,b){return"mousewheel"===a.type&&b%120===0}var x={augmentWidthOrHeight:b,getStyles:a,createBoundedWrapper:function(a,b){return function(){return b.apply(a,arguments)}},readableColumnName:function(a){return"undefined"==typeof a||void 0===a||null===a?a:("string"!=typeof a&&(a=String(a)),a.replace(/_+/g," ").replace(/^[A-Z]+$/,function(a){return angular.lowercase(angular.uppercase(a.charAt(0))+a.slice(1))}).replace(/([\w\u00C0-\u017F]+)/g,function(a){return angular.uppercase(a.charAt(0))+a.slice(1)}).replace(/(\w+?(?=[A-Z]))/g,"$1 "))},getColumnsFromData:function(a,b){var c=[];if(!a||"undefined"==typeof a[0]||void 0===a[0])return[];angular.isUndefined(b)&&(b=[]);var d=a[0];return angular.forEach(d,function(a,d){-1===b.indexOf(d)&&c.push({name:d})}),c},newId:function(){var a=(new Date).getTime();return function(){return a+=1}}(),getTemplate:function(a){if(n.get(a))return x.postProcessTemplate(n.get(a));if(a.hasOwnProperty("then"))return a.then(x.postProcessTemplate);try{if(angular.element(a).length>0)return r.when(a).then(x.postProcessTemplate)}catch(b){}return x.logDebug("fetching url",a),m({method:"GET",url:a}).then(function(b){var c=b.data.trim();return n.put(a,c),c},function(b){throw new Error("Could not get template "+a+": "+b)}).then(x.postProcessTemplate)},postProcessTemplate:function(a){var b=s.startSymbol(),c=s.endSymbol();return("{{"!==b||"}}"!==c)&&(a=a.replace(/\{\{/g,b),a=a.replace(/\}\}/g,c)),r.when(a)},guessType:function(a){var b=typeof a;switch(b){case"number":case"boolean":case"string":return b;default:return angular.isDate(a)?"date":"object"}},elementWidth:function(a){},elementHeight:function(a){},getScrollbarWidth:function(){var a=document.createElement("div");a.style.visibility="hidden",a.style.width="100px",a.style.msOverflowStyle="scrollbar",document.body.appendChild(a);var b=a.offsetWidth;a.style.overflow="scroll";var c=document.createElement("div");c.style.width="100%",a.appendChild(c);var d=c.offsetWidth;return a.parentNode.removeChild(a),b-d},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},fakeElement:function(a,b,c,d){var e,f,g=angular.element(a).clone()[0];for(f in b)g.style[f]=b[f];return angular.element(document.body).append(g),e=c.call(g,g),angular.element(g).remove(),e},normalizeWheelEvent:function(a){var b,c,d,e=a||window.event,f=([].slice.call(arguments,1),0),g=0,h=0,i=0,j=0;return e.originalEvent&&(e=e.originalEvent),e.wheelDelta&&(f=e.wheelDelta),e.detail&&(f=-1*e.detail),h=f,void 0!==e.axis&&e.axis===e.HORIZONTAL_AXIS&&(h=0,g=-1*f),e.deltaY&&(h=-1*e.deltaY,f=h),e.deltaX&&(g=e.deltaX,f=-1*g),void 0!==e.wheelDeltaY&&(h=e.wheelDeltaY),void 0!==e.wheelDeltaX&&(g=e.wheelDeltaX),i=Math.abs(f),(!b||b>i)&&(b=i),j=Math.max(Math.abs(h),Math.abs(g)),(!c||c>j)&&(c=j),d=f>0?"floor":"ceil",f=Math[d](f/b),g=Math[d](g/c),h=Math[d](h/c),{delta:f,deltaX:g,deltaY:h}},isTouchEnabled:function(){var a;return("ontouchstart"in g||g.DocumentTouch&&l instanceof DocumentTouch)&&(a=!0),a},isNullOrUndefined:function(a){return void 0===a||null===a?!0:!1},endsWith:function(a,b){return a&&b&&"string"==typeof a?-1!==a.indexOf(b,a.length-b.length):!1},arrayContainsObjectWithProperty:function(a,b,c){var d=!1;return angular.forEach(a,function(a){a[b]===c&&(d=!0)}),d},numericAndNullSort:function(a,b){return null===a?1:null===b?-1:null===a&&null===b?0:a-b},disableAnimations:function(a){var b;try{b=q.get("$animate"),angular.version.major>1||1===angular.version.major&&angular.version.minor>=4?b.enabled(a,!1):b.enabled(!1,a)}catch(c){}},enableAnimations:function(a){var b;try{return b=q.get("$animate"),angular.version.major>1||1===angular.version.major&&angular.version.minor>=4?b.enabled(a,!0):b.enabled(!0,a),b}catch(c){}},nextUid:function(){for(var a,b=j.length;b;){if(b--,a=j[b].charCodeAt(0),57===a)return j[b]="A",k+j.join("");if(90!==a)return j[b]=String.fromCharCode(a+1),k+j.join("");j[b]="0"}return j.unshift("0"),k+j.join("")},hashKey:function(a){var b,c=typeof a;return"object"===c&&null!==a?"function"==typeof(b=a.$$hashKey)?b=a.$$hashKey():"undefined"!=typeof a.$$hashKey&&a.$$hashKey?b=a.$$hashKey:void 0===b&&(b=a.$$hashKey=x.nextUid()):b=a,c+":"+b},resetUids:function(){j=["0","0","0"]},logError:function(a){t.LOG_ERROR_MESSAGES&&f.error(a)},logWarn:function(a){t.LOG_WARN_MESSAGES&&f.warn(a)},logDebug:function(){t.LOG_DEBUG_MESSAGES&&f.debug.apply(f,arguments)}};x.focus={queue:[],byId:function(a,b){this._purgeQueue();var c=o(function(){var c=(b&&b.id?b.id+"-":"")+a,d=g.document.getElementById(c);d?d.focus():x.logWarn("[focus.byId] Element id "+c+" was not found.")});return this.queue.push(c),c},byElement:function(a){if(!angular.isElement(a))return x.logWarn("Trying to focus on an element that isn't an element."),r.reject("not-element");a=angular.element(a),this._purgeQueue();var b=o(function(){a&&a[0].focus()});return this.queue.push(b),b},bySelector:function(a,b,c){var d=this;if(!angular.isElement(a))throw new Error("The parent element is not an element.");a=angular.element(a);var e=function(){var c=a[0].querySelector(b);return d.byElement(c)};if(this._purgeQueue(),c){var f=o(e);return this.queue.push(o(e)),f}return e()},_purgeQueue:function(){this.queue.forEach(function(a){o.cancel(a)}),this.queue=[]}},["width","height"].forEach(function(b){var d=angular.uppercase(b.charAt(0))+b.substr(1);x["element"+d]=function(d,e){var f=d;if(f&&"undefined"!=typeof f.length&&f.length&&(f=d[0]),f){var g=a(f);return 0===f.offsetWidth&&h.test(g.display)?x.swap(f,i,function(){return c(f,b,e)}):c(f,b,e)}return null},x["outerElement"+d]=function(a,b){return a?x["element"+d].call(this,a,b?"margin":"border"):null}}),x.closestElm=function(a,b){"undefined"!=typeof a.length&&a.length&&(a=a[0]);var c;["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].some(function(a){return"function"==typeof document.body[a]?(c=a,!0):!1});for(var d;null!==a;){if(d=a.parentElement,null!==d&&d[c](b))return d;a=d}return null},x.type=function(a){var b=Function.prototype.toString.call(a.constructor);return b.match(/function (.*?)\(/)[1]},x.getBorderSize=function(b,c){"undefined"!=typeof b.length&&b.length&&(b=b[0]);var d=a(b);c=c?"border"+c.charAt(0).toUpperCase()+c.slice(1):"border",c+="Width";var e=parseInt(d[c],10);return isNaN(e)?0:e},x.detectBrowser=function(){var a=g.navigator.userAgent,b={chrome:/chrome/i,safari:/safari/i,firefox:/firefox/i,ie:/internet explorer|trident\//i};for(var c in b)if(b[c].test(a))return c;return"unknown"},x.rtlScrollType=function B(){if(B.type)return B.type;var a=angular.element('
        A
        ')[0],b="reverse";return document.body.appendChild(a),a.scrollLeft>0?b="default":(a.scrollLeft=1,0===a.scrollLeft&&(b="negative")),angular.element(a).remove(),B.type=b,b},x.normalizeScrollLeft=function(a,b){"undefined"!=typeof a.length&&a.length&&(a=a[0]);var c=a.scrollLeft;if(b.isRTL())switch(x.rtlScrollType()){case"default":return a.scrollWidth-c-a.clientWidth;case"negative":return Math.abs(c);case"reverse":return c}return c},x.denormalizeScrollLeft=function(a,b,c){if("undefined"!=typeof a.length&&a.length&&(a=a[0]),c.isRTL())switch(x.rtlScrollType()){case"default":var d=a.scrollWidth-a.clientWidth;return d-b;case"negative":return-1*b;case"reverse":return b}return b},x.preEval=function(a){var b=t.BRACKET_REGEXP.exec(a);if(b)return(b[1]?x.preEval(b[1]):b[1])+b[2]+(b[3]?x.preEval(b[3]):b[3]);a=a.replace(t.APOS_REGEXP,"\\'");var c=a.split(t.DOT_REGEXP),d=[c.shift()];return angular.forEach(c,function(a){ +d.push(a.replace(t.FUNC_REGEXP,"']$1"))}),d.join("['")},x.debounce=function(a,b,c){function d(){g=this,f=arguments;var d=function(){e=null,c||(h=a.apply(g,f))},i=c&&!e;return e&&o.cancel(e),e=o(d,b,!1),i&&(h=a.apply(g,f)),h}var e,f,g,h;return d.cancel=function(){o.cancel(e),e=null},d},x.throttle=function(a,b,c){function d(b){g=+new Date,a.apply(e,f),p(function(){h=null},0,1,!1)}c=c||{};var e,f,g=0,h=null;return function(){if(e=this,f=arguments,null===h){var a=+new Date-g;a>b?d():c.trailing&&(h=p(d,b-a,1,!1))}}},x.on={},x.off={},x._events={},x.addOff=function(a){x.off[a]=function(b,c){var d=x._events[a].indexOf(c);d>0&&x._events[a].removeAt(d)}};var y,z,A="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];return x.on.mousewheel=function(a,b){if(a&&b){var c=angular.element(a);c.data("mousewheel-line-height",d(c)),c.data("mousewheel-page-height",x.elementHeight(c)),c.data("mousewheel-callbacks")||c.data("mousewheel-callbacks",{});var f=c.data("mousewheel-callbacks");f[b]=(Function.prototype.bind||e).call(u,c[0],b);for(var g=A.length;g;)c.on(A[--g],f[b])}},x.off.mousewheel=function(a,b){var c=angular.element(a),d=c.data("mousewheel-callbacks"),e=d[b];if(e)for(var f=A.length;f;)c.off(A[--f],e);delete d[b],0===Object.keys(d).length&&(c.removeData("mousewheel-line-height"),c.removeData("mousewheel-page-height"),c.removeData("mousewheel-callbacks"))},x}]),f.filter("px",function(){return function(a){return a.match(/^[\d\.]+$/)?a+"px":a}})}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){var b={aggregate:{label:"položky"},groupPanel:{description:"Přesuňte záhlaví zde pro vytvoření skupiny dle sloupce."},search:{placeholder:"Hledat...",showingItems:"Zobrazuji položky:",selectedItems:"Vybrané položky:",totalItems:"Celkem položek:",size:"Velikost strany:",first:"První strana",next:"Další strana",previous:"Předchozí strana",last:"Poslední strana"},menu:{text:"Vyberte sloupec:"},sort:{ascending:"Seřadit od A-Z",descending:"Seřadit od Z-A",remove:"Odebrat seřazení"},column:{hide:"Schovat sloupec"},aggregation:{count:"celkem řádků: ",sum:"celkem: ",avg:"avg: ",min:"min.: ",max:"max.: "},pinning:{pinLeft:"Zamknout vlevo",pinRight:"Zamknout vpravo",unpin:"Odemknout"},gridMenu:{columns:"Sloupce:",importerTitle:"Importovat soubor",exporterAllAsCsv:"Exportovat všechna data do csv",exporterVisibleAsCsv:"Exportovat viditelná data do csv",exporterSelectedAsCsv:"Exportovat vybraná data do csv",exporterAllAsPdf:"Exportovat všechna data do pdf",exporterVisibleAsPdf:"Exportovat viditelná data do pdf",exporterSelectedAsPdf:"Exportovat vybraná data do pdf",clearAllFilters:"Odstranit všechny filtry"},importer:{noHeaders:"Názvy sloupců se nepodařilo získat, obsahuje soubor záhlaví?",noObjects:"Data se nepodařilo zpracovat, obsahuje soubor řádky mimo záhlaví?",invalidCsv:"Soubor nelze zpracovat, jedná se o CSV?",invalidJson:"Soubor nelze zpracovat, je to JSON?",jsonNotArray:"Soubor musí obsahovat json. Ukončuji.."},pagination:{sizes:"položek na stránku",totalItems:"položek"},grouping:{group:"Seskupit",ungroup:"Odebrat seskupení",aggregate_count:"Agregace: Count",aggregate_sum:"Agregace: Sum",aggregate_max:"Agregace: Max",aggregate_min:"Agregace: Min",aggregate_avg:"Agregace: Avg",aggregate_remove:"Agregace: Odebrat"}};return a.add("cs",b),a.add("cz",b),a.add("cs-cz",b),a.add("cs-CZ",b),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("da",{aggregate:{label:"artikler"},groupPanel:{description:"Grupér rækker udfra en kolonne ved at trække dens overskift hertil."},search:{placeholder:"Søg...",showingItems:"Viste rækker:",selectedItems:"Valgte rækker:",totalItems:"Rækker totalt:",size:"Side størrelse:",first:"Første side",next:"Næste side",previous:"Forrige side",last:"Sidste side"},menu:{text:"Vælg kolonner:"},sort:{ascending:"Sorter stigende",descending:"Sorter faldende",none:"Sorter ingen",remove:"Fjern sortering"},column:{hide:"Skjul kolonne"},aggregation:{count:"antal rækker: ",sum:"sum: ",avg:"gns: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("de",{headerCell:{aria:{defaultFilterLabel:"Filter für Spalte",removeFilter:"Filter löschen",columnMenuButtonLabel:"Spaltenmenü"},priority:"Priorität:",filterLabel:"Filter für Spalte: "},aggregate:{label:"Eintrag"},groupPanel:{description:"Ziehen Sie eine Spaltenüberschrift hierhin, um nach dieser Spalte zu gruppieren."},search:{placeholder:"Suche...",showingItems:"Zeige Einträge:",selectedItems:"Ausgewählte Einträge:",totalItems:"Einträge gesamt:",size:"Einträge pro Seite:",first:"Erste Seite",next:"Nächste Seite",previous:"Vorherige Seite",last:"Letzte Seite"},menu:{text:"Spalten auswählen:"},sort:{ascending:"aufsteigend sortieren",descending:"absteigend sortieren",none:"keine Sortierung",remove:"Sortierung zurücksetzen"},column:{hide:"Spalte ausblenden"},aggregation:{count:"Zeilen insgesamt: ",sum:"gesamt: ",avg:"Durchschnitt: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Links anheften",pinRight:"Rechts anheften",unpin:"Lösen"},columnMenu:{close:"Schließen"},gridMenu:{aria:{buttonLabel:"Tabellenmenü"},columns:"Spalten:",importerTitle:"Datei importieren",exporterAllAsCsv:"Alle Daten als CSV exportieren",exporterVisibleAsCsv:"sichtbare Daten als CSV exportieren",exporterSelectedAsCsv:"markierte Daten als CSV exportieren",exporterAllAsPdf:"Alle Daten als PDF exportieren",exporterVisibleAsPdf:"sichtbare Daten als PDF exportieren",exporterSelectedAsPdf:"markierte Daten als CSV exportieren",clearAllFilters:"Alle Filter zurücksetzen"},importer:{noHeaders:"Es konnten keine Spaltennamen ermittelt werden. Sind in der Datei Spaltendefinitionen enthalten?",noObjects:"Es konnten keine Zeileninformationen gelesen werden, Sind in der Datei außer den Spaltendefinitionen auch Daten enthalten?",invalidCsv:"Die Datei konnte nicht eingelesen werden, ist es eine gültige CSV-Datei?",invalidJson:"Die Datei konnte nicht eingelesen werden. Enthält sie gültiges JSON?",jsonNotArray:"Die importierte JSON-Datei muß ein Array enthalten. Breche Import ab."},pagination:{aria:{pageToFirst:"Zum Anfang",pageBack:"Seite zurück",pageSelected:"Ausgwählte Seite",pageForward:"Seite vor",pageToLast:"Zum Ende"},sizes:"Einträge pro Seite",totalItems:"Einträge",through:"bis",of:"von"},grouping:{group:"Gruppieren",ungroup:"Gruppierung aufheben",aggregate_count:"Agg: Anzahl",aggregate_sum:"Agg: Summe",aggregate_max:"Agg: Maximum",aggregate_min:"Agg: Minimum",aggregate_avg:"Agg: Mittelwert",aggregate_remove:"Aggregation entfernen"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("en",{headerCell:{aria:{defaultFilterLabel:"Filter for column",removeFilter:"Remove Filter",columnMenuButtonLabel:"Column Menu"},priority:"Priority:",filterLabel:"Filter for column: "},aggregate:{label:"items"},groupPanel:{description:"Drag a column header here and drop it to group by that column."},search:{placeholder:"Search...",showingItems:"Showing Items:",selectedItems:"Selected Items:",totalItems:"Total Items:",size:"Page Size:",first:"First Page",next:"Next Page",previous:"Previous Page",last:"Last Page"},menu:{text:"Choose Columns:"},sort:{ascending:"Sort Ascending",descending:"Sort Descending",none:"Sort None",remove:"Remove Sort"},column:{hide:"Hide Column"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Pin Left",pinRight:"Pin Right",unpin:"Unpin"},columnMenu:{close:"Close"},gridMenu:{aria:{buttonLabel:"Grid Menu"},columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."},pagination:{aria:{pageToFirst:"Page to first",pageBack:"Page back",pageSelected:"Selected page",pageForward:"Page forward",pageToLast:"Page to last"},sizes:"items per page",totalItems:"items",through:"through",of:"of"},grouping:{group:"Group",ungroup:"Ungroup",aggregate_count:"Agg: Count",aggregate_sum:"Agg: Sum",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Avg",aggregate_remove:"Agg: Remove"},validate:{error:"Error:",minLength:"Value should be at least THRESHOLD characters long.",maxLength:"Value should be at most THRESHOLD characters long.",required:"A value is needed."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("es",{aggregate:{label:"Artículos"},groupPanel:{description:"Arrastre un encabezado de columna aquí y suéltelo para agrupar por esa columna."},search:{placeholder:"Buscar...",showingItems:"Artículos Mostrados:",selectedItems:"Artículos Seleccionados:",totalItems:"Artículos Totales:",size:"Tamaño de Página:",first:"Primera Página",next:"Página Siguiente",previous:"Página Anterior",last:"Última Página"},menu:{text:"Elegir columnas:"},sort:{ascending:"Orden Ascendente",descending:"Orden Descendente",remove:"Sin Ordenar"},column:{hide:"Ocultar la columna"},aggregation:{count:"filas totales: ",sum:"total: ",avg:"media: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fijar a la Izquierda",pinRight:"Fijar a la Derecha",unpin:"Quitar Fijación"},gridMenu:{columns:"Columnas:",importerTitle:"Importar archivo",exporterAllAsCsv:"Exportar todo como csv",exporterVisibleAsCsv:"Exportar vista como csv",exporterSelectedAsCsv:"Exportar selección como csv",exporterAllAsPdf:"Exportar todo como pdf",exporterVisibleAsPdf:"Exportar vista como pdf",exporterSelectedAsPdf:"Exportar selección como pdf",clearAllFilters:"Limpiar todos los filtros"},importer:{noHeaders:"No fue posible derivar los nombres de las columnas, ¿tiene encabezados el archivo?",noObjects:"No fue posible obtener registros, ¿contiene datos el archivo, aparte de los encabezados?",invalidCsv:"No fue posible procesar el archivo, ¿es un CSV válido?",invalidJson:"No fue posible procesar el archivo, ¿es un Json válido?",jsonNotArray:"El archivo json importado debe contener un array, abortando."},pagination:{sizes:"registros por página",totalItems:"registros",of:"de"},grouping:{group:"Agrupar",ungroup:"Desagrupar",aggregate_count:"Agr: Cont",aggregate_sum:"Agr: Sum",aggregate_max:"Agr: Máx",aggregate_min:"Agr: Min",aggregate_avg:"Agr: Prom",aggregate_remove:"Agr: Quitar"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fa",{aggregate:{label:"قلم"},groupPanel:{description:"عنوان یک ستون را بگیر و به گروهی از آن ستون رها کن."},search:{placeholder:"جستجو...",showingItems:"نمایش اقلام:",selectedItems:"قلم‌های انتخاب شده:",totalItems:"مجموع اقلام:",size:"اندازه‌ی صفحه:",first:"اولین صفحه",next:"صفحه‌ی‌بعدی",previous:"صفحه‌ی‌ قبلی",last:"آخرین صفحه"},menu:{text:"ستون‌های انتخابی:"},sort:{ascending:"ترتیب صعودی",descending:"ترتیب نزولی",remove:"حذف مرتب کردن"},column:{hide:"پنهان‌کردن ستون"},aggregation:{count:"تعداد: ",sum:"مجموع: ",avg:"میانگین: ",min:"کمترین: ",max:"بیشترین: "},pinning:{pinLeft:"پین کردن سمت چپ",pinRight:"پین کردن سمت راست",unpin:"حذف پین"},gridMenu:{columns:"ستون‌ها:",importerTitle:"وارد کردن فایل",exporterAllAsCsv:"خروجی تمام داده‌ها در فایل csv",exporterVisibleAsCsv:"خروجی داده‌های قابل مشاهده در فایل csv",exporterSelectedAsCsv:"خروجی داده‌های انتخاب‌شده در فایل csv",exporterAllAsPdf:"خروجی تمام داده‌ها در فایل pdf",exporterVisibleAsPdf:"خروجی داده‌های قابل مشاهده در فایل pdf",exporterSelectedAsPdf:"خروجی داده‌های انتخاب‌شده در فایل pdf",clearAllFilters:"پاک کردن تمام فیلتر"},importer:{noHeaders:"نام ستون قابل استخراج نیست. آیا فایل عنوان دارد؟",noObjects:"اشیا قابل استخراج نیستند. آیا به جز عنوان‌ها در فایل داده وجود دارد؟",invalidCsv:"فایل قابل پردازش نیست. آیا فرمت csv معتبر است؟",invalidJson:"فایل قابل پردازش نیست. آیا فرمت json معتبر است؟",jsonNotArray:"فایل json وارد شده باید حاوی آرایه باشد. عملیات ساقط شد."},pagination:{sizes:"اقلام در هر صفحه",totalItems:"اقلام",of:"از"},grouping:{group:"گروه‌بندی",ungroup:"حذف گروه‌بندی",aggregate_count:"Agg: تعداد",aggregate_sum:"Agg: جمع",aggregate_max:"Agg: بیشینه",aggregate_min:"Agg: کمینه",aggregate_avg:"Agg: میانگین",aggregate_remove:"Agg: حذف"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fi",{aggregate:{label:"rivit"},groupPanel:{description:"Raahaa ja pudota otsikko tähän ryhmittääksesi sarakkeen mukaan."},search:{placeholder:"Hae...",showingItems:"Näytetään rivejä:",selectedItems:"Valitut rivit:",totalItems:"Rivejä yht.:",size:"Näytä:",first:"Ensimmäinen sivu",next:"Seuraava sivu",previous:"Edellinen sivu",last:"Viimeinen sivu"},menu:{text:"Valitse sarakkeet:"},sort:{ascending:"Järjestä nouseva",descending:"Järjestä laskeva",remove:"Poista järjestys"},column:{hide:"Piilota sarake"},aggregation:{count:"Rivejä yht.: ",sum:"Summa: ",avg:"K.a.: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Lukitse vasemmalle",pinRight:"Lukitse oikealle",unpin:"Poista lukitus"},gridMenu:{columns:"Sarakkeet:",importerTitle:"Tuo tiedosto",exporterAllAsCsv:"Vie tiedot csv-muodossa",exporterVisibleAsCsv:"Vie näkyvä tieto csv-muodossa",exporterSelectedAsCsv:"Vie valittu tieto csv-muodossa",exporterAllAsPdf:"Vie tiedot pdf-muodossa",exporterVisibleAsPdf:"Vie näkyvä tieto pdf-muodossa",exporterSelectedAsPdf:"Vie valittu tieto pdf-muodossa",clearAllFilters:"Puhdista kaikki suodattimet"},importer:{noHeaders:"Sarakkeen nimiä ei voitu päätellä, onko tiedostossa otsikkoriviä?",noObjects:"Tietoja ei voitu lukea, onko tiedostossa muuta kuin otsikkot?",invalidCsv:"Tiedostoa ei voitu käsitellä, oliko se CSV-muodossa?",invalidJson:"Tiedostoa ei voitu käsitellä, oliko se JSON-muodossa?",jsonNotArray:"Tiedosto ei sisältänyt taulukkoa, lopetetaan."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fr",{aggregate:{label:"éléments"},groupPanel:{description:"Faites glisser une en-tête de colonne ici pour créer un groupe de colonnes."},search:{placeholder:"Recherche...",showingItems:"Affichage des éléments :",selectedItems:"Éléments sélectionnés :",totalItems:"Nombre total d'éléments:",size:"Taille de page:",first:"Première page",next:"Page Suivante",previous:"Page précédente",last:"Dernière page"},menu:{text:"Choisir des colonnes :"},sort:{ascending:"Trier par ordre croissant",descending:"Trier par ordre décroissant",remove:"Enlever le tri"},column:{hide:"Cacher la colonne"},aggregation:{count:"lignes totales: ",sum:"total: ",avg:"moy: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Épingler à gauche",pinRight:"Épingler à droite",unpin:"Détacher"},gridMenu:{columns:"Colonnes:",importerTitle:"Importer un fichier",exporterAllAsCsv:"Exporter toutes les données en CSV",exporterVisibleAsCsv:"Exporter les données visibles en CSV",exporterSelectedAsCsv:"Exporter les données sélectionnées en CSV",exporterAllAsPdf:"Exporter toutes les données en PDF",exporterVisibleAsPdf:"Exporter les données visibles en PDF",exporterSelectedAsPdf:"Exporter les données sélectionnées en PDF",clearAllFilters:"Nettoyez tous les filtres"},importer:{noHeaders:"Impossible de déterminer le nom des colonnes, le fichier possède-t-il une en-tête ?",noObjects:"Aucun objet trouvé, le fichier possède-t-il des données autres que l'en-tête ?",invalidCsv:"Le fichier n'a pas pu être traité, le CSV est-il valide ?",invalidJson:"Le fichier n'a pas pu être traité, le JSON est-il valide ?",jsonNotArray:"Le fichier JSON importé doit contenir un tableau, abandon."},pagination:{sizes:"éléments par page",totalItems:"éléments",of:"sur"},grouping:{group:"Grouper",ungroup:"Dégrouper",aggregate_count:"Agg: Compte",aggregate_sum:"Agg: Somme",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Moy",aggregate_remove:"Agg: Retirer"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("he",{aggregate:{label:"items"},groupPanel:{description:"גרור עמודה לכאן ושחרר בכדי לקבץ עמודה זו."},search:{placeholder:"חפש...",showingItems:"מציג:",selectedItems:'סה"כ נבחרו:',totalItems:'סה"כ רשומות:',size:"תוצאות בדף:",first:"דף ראשון",next:"דף הבא",previous:"דף קודם",last:"דף אחרון"},menu:{text:"בחר עמודות:"},sort:{ascending:"סדר עולה",descending:"סדר יורד",remove:"בטל"},column:{hide:"טור הסתר"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clean all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("hy",{aggregate:{label:"տվյալներ"},groupPanel:{description:"Ըստ սյան խմբավորելու համար քաշեք և գցեք վերնագիրն այստեղ։"},search:{placeholder:"Փնտրում...",showingItems:"Ցուցադրված տվյալներ՝",selectedItems:"Ընտրված:",totalItems:"Ընդամենը՝",size:"Տողերի քանակը էջում՝",first:"Առաջին էջ",next:"Հաջորդ էջ",previous:"Նախորդ էջ",last:"Վերջին էջ"},menu:{text:"Ընտրել սյուները:"},sort:{ascending:"Աճման կարգով",descending:"Նվազման կարգով",remove:"Հանել "},column:{hide:"Թաքցնել սյունը"},aggregation:{count:"ընդամենը տող՝ ",sum:"ընդամենը՝ ",avg:"միջին՝ ",min:"մին՝ ",max:"մաքս՝ "},pinning:{pinLeft:"Կպցնել ձախ կողմում",pinRight:"Կպցնել աջ կողմում",unpin:"Արձակել"},gridMenu:{columns:"Սյուներ:",importerTitle:"Ներմուծել ֆայլ",exporterAllAsCsv:"Արտահանել ամբողջը CSV",exporterVisibleAsCsv:"Արտահանել երևացող տվյալները CSV",exporterSelectedAsCsv:"Արտահանել ընտրված տվյալները CSV",exporterAllAsPdf:"Արտահանել PDF",exporterVisibleAsPdf:"Արտահանել երևացող տվյալները PDF",exporterSelectedAsPdf:"Արտահանել ընտրված տվյալները PDF",clearAllFilters:"Մաքրել բոլոր ֆիլտրերը"},importer:{noHeaders:"Հնարավոր չեղավ որոշել սյան վերնագրերը։ Արդյո՞ք ֆայլը ունի վերնագրեր։",noObjects:"Հնարավոր չեղավ կարդալ տվյալները։ Արդյո՞ք ֆայլում կան տվյալներ։",invalidCsv:"Հնարավոր չեղավ մշակել ֆայլը։ Արդյո՞ք այն վավեր CSV է։",invalidJson:"Հնարավոր չեղավ մշակել ֆայլը։ Արդյո՞ք այն վավեր Json է։",jsonNotArray:"Ներմուծված json ֆայլը պետք է պարունակի զանգված, կասեցվում է։"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("it",{aggregate:{label:"elementi"},groupPanel:{description:"Trascina un'intestazione all'interno del gruppo della colonna."},search:{placeholder:"Ricerca...",showingItems:"Mostra:",selectedItems:"Selezionati:",totalItems:"Totali:",size:"Tot Pagine:",first:"Prima",next:"Prossima",previous:"Precedente",last:"Ultima"},menu:{text:"Scegli le colonne:"},sort:{ascending:"Asc.",descending:"Desc.",remove:"Annulla ordinamento"},column:{hide:"Nascondi"},aggregation:{count:"righe totali: ",sum:"tot: ",avg:"media: ",min:"minimo: ",max:"massimo: "},pinning:{pinLeft:"Blocca a sx",pinRight:"Blocca a dx",unpin:"Blocca in alto"},gridMenu:{columns:"Colonne:",importerTitle:"Importa",exporterAllAsCsv:"Esporta tutti i dati in CSV",exporterVisibleAsCsv:"Esporta i dati visibili in CSV",exporterSelectedAsCsv:"Esporta i dati selezionati in CSV",exporterAllAsPdf:"Esporta tutti i dati in PDF",exporterVisibleAsPdf:"Esporta i dati visibili in PDF",exporterSelectedAsPdf:"Esporta i dati selezionati in PDF",clearAllFilters:"Pulire tutti i filtri"},importer:{noHeaders:"Impossibile reperire i nomi delle colonne, sicuro che siano indicati all'interno del file?",noObjects:"Impossibile reperire gli oggetti, sicuro che siano indicati all'interno del file?",invalidCsv:"Impossibile elaborare il file, sicuro che sia un CSV?",invalidJson:"Impossibile elaborare il file, sicuro che sia un JSON valido?",jsonNotArray:"Errore! Il file JSON da importare deve contenere un array."},grouping:{group:"Raggruppa",ungroup:"Separa",aggregate_count:"Agg: N. Elem.",aggregate_sum:"Agg: Somma",aggregate_max:"Agg: Massimo",aggregate_min:"Agg: Minimo",aggregate_avg:"Agg: Media",aggregate_remove:"Agg: Rimuovi"},validate:{error:"Errore:",minLength:"Lunghezza minima pari a THRESHOLD caratteri.",maxLength:"Lunghezza massima pari a THRESHOLD caratteri.",required:"Necessario inserire un valore."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ja",{aggregate:{label:"項目"},groupPanel:{description:"ここに列ヘッダをドラッグアンドドロップして、その列でグループ化します。"},search:{placeholder:"検索...",showingItems:"表示中の項目:",selectedItems:"選択した項目:",totalItems:"項目の総数:",size:"ページサイズ:",first:"最初のページ",next:"次のページ",previous:"前のページ",last:"前のページ"},menu:{text:"列の選択:"},sort:{ascending:"昇順に並べ替え",descending:"降順に並べ替え",remove:"並べ替えの解除"},column:{hide:"列の非表示"},aggregation:{count:"合計行数: ",sum:"合計: ",avg:"平均: ",min:"最小: ",max:"最大: "},pinning:{pinLeft:"左に固定",pinRight:"右に固定",unpin:"固定解除"},gridMenu:{columns:"列:",importerTitle:"ファイルのインポート",exporterAllAsCsv:"すべてのデータをCSV形式でエクスポート",exporterVisibleAsCsv:"表示中のデータをCSV形式でエクスポート",exporterSelectedAsCsv:"選択したデータをCSV形式でエクスポート",exporterAllAsPdf:"すべてのデータをPDF形式でエクスポート",exporterVisibleAsPdf:"表示中のデータをPDF形式でエクスポート",exporterSelectedAsPdf:"選択したデータをPDF形式でエクスポート",clearAllFilters:"すべてのフィルタを清掃してください"},importer:{noHeaders:"列名を取得できません。ファイルにヘッダが含まれていることを確認してください。",noObjects:"オブジェクトを取得できません。ファイルにヘッダ以外のデータが含まれていることを確認してください。",invalidCsv:"ファイルを処理できません。ファイルが有効なCSV形式であることを確認してください。",invalidJson:"ファイルを処理できません。ファイルが有効なJSON形式であることを確認してください。",jsonNotArray:"インポートしたJSONファイルには配列が含まれている必要があります。処理を中止します。"},pagination:{aria:{pageToFirst:"最初のページ",pageBack:"前のページ",pageSelected:"現在のページ",pageForward:"次のページ",pageToLast:"最後のページ"},sizes:"項目/ページ",totalItems:"項目",through:"から",of:"項目/全"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ko",{aggregate:{label:"아이템"},groupPanel:{description:"컬럼으로 그룹핑하기 위해서는 컬럼 헤더를 끌어 떨어뜨려 주세요."},search:{placeholder:"검색...",showingItems:"항목 보여주기:",selectedItems:"선택 항목:",totalItems:"전체 항목:",size:"페이지 크기:",first:"첫번째 페이지",next:"다음 페이지",previous:"이전 페이지",last:"마지막 페이지"},menu:{text:"컬럼을 선택하세요:"},sort:{ascending:"오름차순 정렬",descending:"내림차순 정렬",remove:"소팅 제거"},column:{hide:"컬럼 제거"},aggregation:{count:"전체 갯수: ",sum:"전체: ",avg:"평균: ",min:"최소: ",max:"최대: "},pinning:{pinLeft:"왼쪽 핀",pinRight:"오른쪽 핀",unpin:"핀 제거"},gridMenu:{columns:"컬럼:",importerTitle:"파일 가져오기",exporterAllAsCsv:"csv로 모든 데이터 내보내기",exporterVisibleAsCsv:"csv로 보이는 데이터 내보내기",exporterSelectedAsCsv:"csv로 선택된 데이터 내보내기",exporterAllAsPdf:"pdf로 모든 데이터 내보내기",exporterVisibleAsPdf:"pdf로 보이는 데이터 내보내기",exporterSelectedAsPdf:"pdf로 선택 데이터 내보내기",clearAllFilters:"모든 필터를 청소"},importer:{noHeaders:"컬럼명이 지정되어 있지 않습니다. 파일에 헤더가 명시되어 있는지 확인해 주세요.",noObjects:"데이터가 지정되어 있지 않습니다. 데이터가 파일에 있는지 확인해 주세요.",invalidCsv:"파일을 처리할 수 없습니다. 올바른 csv인지 확인해 주세요.",invalidJson:"파일을 처리할 수 없습니다. 올바른 json인지 확인해 주세요.",jsonNotArray:"json 파일은 배열을 포함해야 합니다."},pagination:{sizes:"페이지당 항목",totalItems:"전체 항목"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("nl",{aggregate:{label:"items"},groupPanel:{description:"Sleep hier een kolomnaam heen om op te groeperen."},search:{placeholder:"Zoeken...",showingItems:"Getoonde items:",selectedItems:"Geselecteerde items:",totalItems:"Totaal aantal items:",size:"Items per pagina:",first:"Eerste pagina",next:"Volgende pagina",previous:"Vorige pagina",last:"Laatste pagina"},menu:{text:"Kies kolommen:"},sort:{ascending:"Sorteer oplopend",descending:"Sorteer aflopend",remove:"Verwijder sortering"},column:{hide:"Verberg kolom"},aggregation:{count:"Aantal rijen: ",sum:"Som: ",avg:"Gemiddelde: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Zet links vast",pinRight:"Zet rechts vast",unpin:"Maak los"},gridMenu:{columns:"Kolommen:",importerTitle:"Importeer bestand",exporterAllAsCsv:"Exporteer alle data als csv",exporterVisibleAsCsv:"Exporteer zichtbare data als csv",exporterSelectedAsCsv:"Exporteer geselecteerde data als csv",exporterAllAsPdf:"Exporteer alle data als pdf",exporterVisibleAsPdf:"Exporteer zichtbare data als pdf",exporterSelectedAsPdf:"Exporteer geselecteerde data als pdf",clearAllFilters:"Reinig alle filters"},importer:{noHeaders:"Kolomnamen kunnen niet worden afgeleid. Heeft het bestand een header?",noObjects:"Objecten kunnen niet worden afgeleid. Bevat het bestand data naast de headers?",invalidCsv:"Het bestand kan niet verwerkt worden. Is het een valide csv bestand?",invalidJson:"Het bestand kan niet verwerkt worden. Is het valide json?",jsonNotArray:"Het json bestand moet een array bevatten. De actie wordt geannuleerd."},pagination:{sizes:"items per pagina",totalItems:"items",of:"van de"},grouping:{group:"Groepeer",ungroup:"Groepering opheffen",aggregate_count:"Agg: Aantal",aggregate_sum:"Agg: Som",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Gem",aggregate_remove:"Agg: Verwijder"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("pl",{headerCell:{aria:{defaultFilterLabel:"Filter dla kolumny",removeFilter:"Usuń filter",columnMenuButtonLabel:"Menu kolumny"},priority:"Prioritet:",filterLabel:"Filtr dla kolumny: "},aggregate:{label:"pozycji"},groupPanel:{description:"Przeciągnij nagłówek kolumny tutaj, aby pogrupować według niej."},search:{placeholder:"Szukaj...",showingItems:"Widoczne pozycje:",selectedItems:"Zaznaczone pozycje:",totalItems:"Wszystkich pozycji:",size:"Rozmiar strony:",first:"Pierwsza strona",next:"Następna strona",previous:"Poprzednia strona",last:"Ostatnia strona"},menu:{text:"Wybierz kolumny:"},sort:{ascending:"Sortuj rosnąco",descending:"Sortuj malejąco",none:"Brak sortowania",remove:"Wyłącz sortowanie"},column:{hide:"Ukryj kolumne"},aggregation:{count:"Razem pozycji: ",sum:"Razem: ",avg:"Średnia: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Przypnij do lewej",pinRight:"Przypnij do prawej",unpin:"Odepnij"},columnMenu:{close:"Zamknij"},gridMenu:{aria:{buttonLabel:"Menu Grida"},columns:"Kolumny:",importerTitle:"Importuj plik",exporterAllAsCsv:"Eksportuj wszystkie dane do csv",exporterVisibleAsCsv:"Eksportuj widoczne dane do csv",exporterSelectedAsCsv:"Eksportuj zaznaczone dane do csv",exporterAllAsPdf:"Eksportuj wszystkie dane do pdf",exporterVisibleAsPdf:"Eksportuj widoczne dane do pdf",exporterSelectedAsPdf:"Eksportuj zaznaczone dane do pdf",clearAllFilters:"Wyczyść filtry"},importer:{noHeaders:"Nie udało się wczytać nazw kolumn. Czy plik posiada nagłówek?",noObjects:"Nie udalo się wczytać pozycji. Czy plik zawiera dane??",invalidCsv:"Nie udało się przetworzyć pliku, jest to prawidlowy plik CSV??",invalidJson:"Nie udało się przetworzyć pliku, jest to prawidlowy plik Json?",jsonNotArray:"Importowany plik json musi zawierać tablicę, importowanie przerwane."},pagination:{aria:{pageToFirst:"Pierwsza strona",pageBack:"Poprzednia strona",pageSelected:"Wybrana strona",pageForward:"Następna strona",pageToLast:"Ostatnia strona"},sizes:"pozycji na stronę",totalItems:"pozycji",through:"do",of:"z"},grouping:{group:"Grupuj",ungroup:"Rozgrupuj",aggregate_count:"Zbiorczo: Razem",aggregate_sum:"Zbiorczo: Suma",aggregate_max:"Zbiorczo: Max",aggregate_min:"Zbiorczo: Min",aggregate_avg:"Zbiorczo: Średnia",aggregate_remove:"Zbiorczo: Usuń"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("pt-br",{headerCell:{aria:{defaultFilterLabel:"Filtro por coluna",removeFilter:"Remover filtro",columnMenuButtonLabel:"Menu coluna"},priority:"Prioridade:",filterLabel:"Filtro por coluna: "},aggregate:{label:"itens"},groupPanel:{description:"Arraste e solte uma coluna aqui para agrupar por essa coluna"},search:{placeholder:"Procurar...",showingItems:"Mostrando os Itens:",selectedItems:"Items Selecionados:",totalItems:"Total de Itens:",size:"Tamanho da Página:",first:"Primeira Página",next:"Próxima Página",previous:"Página Anterior",last:"Última Página"},menu:{text:"Selecione as colunas:"},sort:{ascending:"Ordenar Ascendente",descending:"Ordenar Descendente",none:"Nenhuma Ordem",remove:"Remover Ordenação"},column:{hide:"Esconder coluna"},aggregation:{count:"total de linhas: ",sum:"total: ",avg:"med: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fixar Esquerda",pinRight:"Fixar Direita",unpin:"Desprender"},columnMenu:{close:"Fechar"},gridMenu:{aria:{buttonLabel:"Menu Grid"},columns:"Colunas:",importerTitle:"Importar arquivo",exporterAllAsCsv:"Exportar todos os dados como csv",exporterVisibleAsCsv:"Exportar dados visíveis como csv",exporterSelectedAsCsv:"Exportar dados selecionados como csv",exporterAllAsPdf:"Exportar todos os dados como pdf",exporterVisibleAsPdf:"Exportar dados visíveis como pdf",exporterSelectedAsPdf:"Exportar dados selecionados como pdf",clearAllFilters:"Limpar todos os filtros"},importer:{noHeaders:"Nomes de colunas não puderam ser derivados. O arquivo tem um cabeçalho?",noObjects:"Objetos não puderam ser derivados. Havia dados no arquivo, além dos cabeçalhos?",invalidCsv:"Arquivo não pode ser processado. É um CSV válido?",invalidJson:"Arquivo não pode ser processado. É um Json válido?",jsonNotArray:"Arquivo json importado tem que conter um array. Abortando."},pagination:{aria:{pageToFirst:"Primeira página",pageBack:"Página anterior",pageSelected:"Página Selecionada",pageForward:"Proxima",pageToLast:"Anterior"},sizes:"itens por página",totalItems:"itens",through:"através dos",of:"de"},grouping:{group:"Agrupar",ungroup:"Desagrupar",aggregate_count:"Agr: Contar",aggregate_sum:"Agr: Soma",aggregate_max:"Agr: Max",aggregate_min:"Agr: Min",aggregate_avg:"Agr: Med",aggregate_remove:"Agr: Remover"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){ +a.decorator("i18nService",["$delegate",function(a){return a.add("pt",{headerCell:{aria:{defaultFilterLabel:"Filtro por coluna",removeFilter:"Remover filtro",columnMenuButtonLabel:"Menu coluna"},priority:"Prioridade:",filterLabel:"Filtro por coluna: "},aggregate:{label:"itens"},groupPanel:{description:"Arraste e solte uma coluna aqui para agrupar por essa coluna"},search:{placeholder:"Procurar...",showingItems:"Mostrando os Itens:",selectedItems:"Itens Selecionados:",totalItems:"Total de Itens:",size:"Tamanho da Página:",first:"Primeira Página",next:"Próxima Página",previous:"Página Anterior",last:"Última Página"},menu:{text:"Selecione as colunas:"},sort:{ascending:"Ordenar Ascendente",descending:"Ordenar Descendente",none:"Nenhuma Ordem",remove:"Remover Ordenação"},column:{hide:"Esconder coluna"},aggregation:{count:"total de linhas: ",sum:"total: ",avg:"med: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fixar Esquerda",pinRight:"Fixar Direita",unpin:"Desprender"},columnMenu:{close:"Fechar"},gridMenu:{aria:{buttonLabel:"Menu Grid"},columns:"Colunas:",importerTitle:"Importar ficheiro",exporterAllAsCsv:"Exportar todos os dados como csv",exporterVisibleAsCsv:"Exportar dados visíveis como csv",exporterSelectedAsCsv:"Exportar dados selecionados como csv",exporterAllAsPdf:"Exportar todos os dados como pdf",exporterVisibleAsPdf:"Exportar dados visíveis como pdf",exporterSelectedAsPdf:"Exportar dados selecionados como pdf",clearAllFilters:"Limpar todos os filtros"},importer:{noHeaders:"Nomes de colunas não puderam ser derivados. O ficheiro tem um cabeçalho?",noObjects:"Objetos não puderam ser derivados. Havia dados no ficheiro, além dos cabeçalhos?",invalidCsv:"Ficheiro não pode ser processado. É um CSV válido?",invalidJson:"Ficheiro não pode ser processado. É um Json válido?",jsonNotArray:"Ficheiro json importado tem que conter um array. Interrompendo."},pagination:{aria:{pageToFirst:"Primeira página",pageBack:"Página anterior",pageSelected:"Página Selecionada",pageForward:"Próxima",pageToLast:"Anterior"},sizes:"itens por página",totalItems:"itens",through:"através dos",of:"de"},grouping:{group:"Agrupar",ungroup:"Desagrupar",aggregate_count:"Agr: Contar",aggregate_sum:"Agr: Soma",aggregate_max:"Agr: Max",aggregate_min:"Agr: Min",aggregate_avg:"Agr: Med",aggregate_remove:"Agr: Remover"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ro",{headerCell:{aria:{defaultFilterLabel:"Filtru pentru coloana",removeFilter:"Sterge filtru",columnMenuButtonLabel:"Column Menu"},priority:"Prioritate:",filterLabel:"Filtru pentru coloana:"},aggregate:{label:"Elemente"},groupPanel:{description:"Trage un cap de coloana aici pentru a grupa elementele dupa coloana respectiva"},search:{placeholder:"Cauta...",showingItems:"Arata elementele:",selectedItems:"Elementele selectate:",totalItems:"Total elemente:",size:"Marime pagina:",first:"Prima pagina",next:"Pagina urmatoare",previous:"Pagina anterioara",last:"Ultima pagina"},menu:{text:"Alege coloane:"},sort:{ascending:"Ordoneaza crescator",descending:"Ordoneaza descrescator",none:"Fara ordonare",remove:"Sterge ordonarea"},column:{hide:"Ascunde coloana"},aggregation:{count:"total linii: ",sum:"total: ",avg:"medie: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Pin la stanga",pinRight:"Pin la dreapta",unpin:"Sterge pinul"},columnMenu:{close:"Inchide"},gridMenu:{aria:{buttonLabel:"Grid Menu"},columns:"Coloane:",importerTitle:"Incarca fisier",exporterAllAsCsv:"Exporta toate datele ca csv",exporterVisibleAsCsv:"Exporta datele vizibile ca csv",exporterSelectedAsCsv:"Exporta datele selectate ca csv",exporterAllAsPdf:"Exporta toate datele ca pdf",exporterVisibleAsPdf:"Exporta datele vizibile ca pdf",exporterSelectedAsPdf:"Exporta datele selectate ca csv pdf",clearAllFilters:"Sterge toate filtrele"},importer:{noHeaders:"Numele coloanelor nu a putut fi incarcat, acest fisier are un header?",noObjects:"Datele nu au putut fi incarcate, exista date in fisier in afara numelor de coloane?",invalidCsv:"Fisierul nu a putut fi procesat, ati incarcat un CSV valid ?",invalidJson:"Fisierul nu a putut fi procesat, ati incarcat un Json valid?",jsonNotArray:"Json-ul incarcat trebuie sa contina un array, inchidere."},pagination:{aria:{pageToFirst:"Prima pagina",pageBack:"O pagina inapoi",pageSelected:"Pagina selectata",pageForward:"O pagina inainte",pageToLast:"Ultima pagina"},sizes:"Elemente per pagina",totalItems:"elemente",through:"prin",of:"of"},grouping:{group:"Grupeaza",ungroup:"Opreste gruparea",aggregate_count:"Agg: Count",aggregate_sum:"Agg: Sum",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Avg",aggregate_remove:"Agg: Remove"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ru",{headerCell:{aria:{defaultFilterLabel:"Фильтр столбца",removeFilter:"Удалить фильтр",columnMenuButtonLabel:"Меню столбца"},priority:"Приоритет:",filterLabel:"Фильтр столбца: "},aggregate:{label:"элементы"},groupPanel:{description:"Для группировки по столбцу перетащите сюда его название."},search:{placeholder:"Поиск...",showingItems:"Показать элементы:",selectedItems:"Выбранные элементы:",totalItems:"Всего элементов:",size:"Размер страницы:",first:"Первая страница",next:"Следующая страница",previous:"Предыдущая страница",last:"Последняя страница"},menu:{text:"Выбрать столбцы:"},sort:{ascending:"По возрастанию",descending:"По убыванию",none:"Без сортировки",remove:"Убрать сортировку"},column:{hide:"Спрятать столбец"},aggregation:{count:"всего строк: ",sum:"итого: ",avg:"среднее: ",min:"мин: ",max:"макс: "},pinning:{pinLeft:"Закрепить слева",pinRight:"Закрепить справа",unpin:"Открепить"},columnMenu:{close:"Закрыть"},gridMenu:{aria:{buttonLabel:"Меню"},columns:"Столбцы:",importerTitle:"Импортировать файл",exporterAllAsCsv:"Экспортировать всё в CSV",exporterVisibleAsCsv:"Экспортировать видимые данные в CSV",exporterSelectedAsCsv:"Экспортировать выбранные данные в CSV",exporterAllAsPdf:"Экспортировать всё в PDF",exporterVisibleAsPdf:"Экспортировать видимые данные в PDF",exporterSelectedAsPdf:"Экспортировать выбранные данные в PDF",clearAllFilters:"Очистите все фильтры"},importer:{noHeaders:"Не удалось получить названия столбцов, есть ли в файле заголовок?",noObjects:"Не удалось получить данные, есть ли в файле строки кроме заголовка?",invalidCsv:"Не удалось обработать файл, это правильный CSV-файл?",invalidJson:"Не удалось обработать файл, это правильный JSON?",jsonNotArray:"Импортируемый JSON-файл должен содержать массив, операция отменена."},pagination:{aria:{pageToFirst:"Первая страница",pageBack:"Предыдущая страница",pageSelected:"Выбранная страница",pageForward:"Следующая страница",pageToLast:"Последняя страница"},sizes:"строк на страницу",totalItems:"строк",through:"по",of:"из"},grouping:{group:"Группировать",ungroup:"Разгруппировать",aggregate_count:"Группировать: Count",aggregate_sum:"Для группы: Сумма",aggregate_max:"Для группы: Максимум",aggregate_min:"Для группы: Минимум",aggregate_avg:"Для группы: Среднее",aggregate_remove:"Для группы: Пусто"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("sk",{aggregate:{label:"items"},groupPanel:{description:"Pretiahni sem názov stĺpca pre zoskupenie podľa toho stĺpca."},search:{placeholder:"Hľadaj...",showingItems:"Zobrazujem položky:",selectedItems:"Vybraté položky:",totalItems:"Počet položiek:",size:"Počet:",first:"Prvá strana",next:"Ďalšia strana",previous:"Predchádzajúca strana",last:"Posledná strana"},menu:{text:"Vyberte stĺpce:"},sort:{ascending:"Zotriediť vzostupne",descending:"Zotriediť zostupne",remove:"Vymazať triedenie"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("sv",{aggregate:{label:"Artiklar"},groupPanel:{description:"Dra en kolumnrubrik hit och släpp den för att gruppera efter den kolumnen."},search:{placeholder:"Sök...",showingItems:"Visar artiklar:",selectedItems:"Valda artiklar:",totalItems:"Antal artiklar:",size:"Sidstorlek:",first:"Första sidan",next:"Nästa sida",previous:"Föregående sida",last:"Sista sidan"},menu:{text:"Välj kolumner:"},sort:{ascending:"Sortera stigande",descending:"Sortera fallande",remove:"Inaktivera sortering"},column:{hide:"Göm kolumn"},aggregation:{count:"Antal rader: ",sum:"Summa: ",avg:"Genomsnitt: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Fäst vänster",pinRight:"Fäst höger",unpin:"Lösgör"},gridMenu:{columns:"Kolumner:",importerTitle:"Importera fil",exporterAllAsCsv:"Exportera all data som CSV",exporterVisibleAsCsv:"Exportera synlig data som CSV",exporterSelectedAsCsv:"Exportera markerad data som CSV",exporterAllAsPdf:"Exportera all data som PDF",exporterVisibleAsPdf:"Exportera synlig data som PDF",exporterSelectedAsPdf:"Exportera markerad data som PDF",clearAllFilters:"Rengör alla filter"},importer:{noHeaders:"Kolumnnamn kunde inte härledas. Har filen ett sidhuvud?",noObjects:"Objekt kunde inte härledas. Har filen data undantaget sidhuvud?",invalidCsv:"Filen kunde inte behandlas, är den en giltig CSV?",invalidJson:"Filen kunde inte behandlas, är den en giltig JSON?",jsonNotArray:"Importerad JSON-fil måste innehålla ett fält. Import avbruten."},pagination:{sizes:"Artiklar per sida",totalItems:"Artiklar"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ta",{aggregate:{label:"உருப்படிகள்"},groupPanel:{description:"ஒரு பத்தியை குழுவாக அமைக்க அப்பத்தியின் தலைப்பை இங்கே இழுத்து வரவும் "},search:{placeholder:"தேடல் ...",showingItems:"உருப்படிகளை காண்பித்தல்:",selectedItems:"தேர்ந்தெடுக்கப்பட்ட உருப்படிகள்:",totalItems:"மொத்த உருப்படிகள்:",size:"பக்க அளவு: ",first:"முதல் பக்கம்",next:"அடுத்த பக்கம்",previous:"முந்தைய பக்கம் ",last:"இறுதி பக்கம்"},menu:{text:"பத்திகளை தேர்ந்தெடு:"},sort:{ascending:"மேலிருந்து கீழாக",descending:"கீழிருந்து மேலாக",remove:"வரிசையை நீக்கு"},column:{hide:"பத்தியை மறைத்து வை "},aggregation:{count:"மொத்த வரிகள்:",sum:"மொத்தம்: ",avg:"சராசரி: ",min:"குறைந்தபட்ச: ",max:"அதிகபட்ச: "},pinning:{pinLeft:"இடதுபுறமாக தைக்க ",pinRight:"வலதுபுறமாக தைக்க",unpin:"பிரி"},gridMenu:{columns:"பத்திகள்:",importerTitle:"கோப்பு : படித்தல்",exporterAllAsCsv:"எல்லா தரவுகளையும் கோப்பாக்கு: csv",exporterVisibleAsCsv:"இருக்கும் தரவுகளை கோப்பாக்கு: csv",exporterSelectedAsCsv:"தேர்ந்தெடுத்த தரவுகளை கோப்பாக்கு: csv",exporterAllAsPdf:"எல்லா தரவுகளையும் கோப்பாக்கு: pdf",exporterVisibleAsPdf:"இருக்கும் தரவுகளை கோப்பாக்கு: pdf",exporterSelectedAsPdf:"தேர்ந்தெடுத்த தரவுகளை கோப்பாக்கு: pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"பத்தியின் தலைப்புகளை பெற இயலவில்லை, கோப்பிற்கு தலைப்பு உள்ளதா?",noObjects:"இலக்குகளை உருவாக்க முடியவில்லை, கோப்பில் தலைப்புகளை தவிர தரவு ஏதேனும் உள்ளதா? ",invalidCsv:"சரிவர நடைமுறை படுத்த இயலவில்லை, கோப்பு சரிதானா? - csv",invalidJson:"சரிவர நடைமுறை படுத்த இயலவில்லை, கோப்பு சரிதானா? - json",jsonNotArray:"படித்த கோப்பில் வரிசைகள் உள்ளது, நடைமுறை ரத்து செய் : json"},pagination:{sizes:"உருப்படிகள் / பக்கம்",totalItems:"உருப்படிகள் "},grouping:{group:"குழு",ungroup:"பிரி",aggregate_count:"மதிப்பீட்டு : எண்ணு",aggregate_sum:"மதிப்பீட்டு : கூட்டல்",aggregate_max:"மதிப்பீட்டு : அதிகபட்சம்",aggregate_min:"மதிப்பீட்டு : குறைந்தபட்சம்",aggregate_avg:"மதிப்பீட்டு : சராசரி",aggregate_remove:"மதிப்பீட்டு : நீக்கு"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("tr",{headerCell:{aria:{defaultFilterLabel:"Sütun için filtre",removeFilter:"Filtreyi Kaldır",columnMenuButtonLabel:"Sütun Menüsü"},priority:"Öncelik:",filterLabel:"Sütun için filtre: "},aggregate:{label:"kayıtlar"},groupPanel:{description:"Sütuna göre gruplamak için sütun başlığını buraya sürükleyin ve bırakın."},search:{placeholder:"Arama...",showingItems:"Gösterilen Kayıt:",selectedItems:"Seçili Kayıt:",totalItems:"Toplam Kayıt:",size:"Sayfa Boyutu:",first:"İlk Sayfa",next:"Sonraki Sayfa",previous:"Önceki Sayfa",last:"Son Sayfa"},menu:{text:"Sütunları Seç:"},sort:{ascending:"Artan Sırada Sırala",descending:"Azalan Sırada Sırala",none:"Sıralama Yapma",remove:"Sıralamayı Kaldır"},column:{hide:"Sütunu Gizle"},aggregation:{count:"toplam satır: ",sum:"toplam: ",avg:"ort: ",min:"min: ",max:"maks: "},pinning:{pinLeft:"Sola Sabitle",pinRight:"Sağa Sabitle",unpin:"Sabitlemeyi Kaldır"},columnMenu:{close:"Kapat"},gridMenu:{aria:{buttonLabel:"Tablo Menü"},columns:"Sütunlar:",importerTitle:"Dosya içeri aktar",exporterAllAsCsv:"Bütün veriyi CSV olarak dışarı aktar",exporterVisibleAsCsv:"Görünen veriyi CSV olarak dışarı aktar",exporterSelectedAsCsv:"Seçili veriyi CSV olarak dışarı aktar",exporterAllAsPdf:"Bütün veriyi PDF olarak dışarı aktar",exporterVisibleAsPdf:"Görünen veriyi PDF olarak dışarı aktar",exporterSelectedAsPdf:"Seçili veriyi PDF olarak dışarı aktar",clearAllFilters:"Bütün filtreleri kaldır"},importer:{noHeaders:"Sütun isimleri üretilemiyor, dosyanın bir başlığı var mı?",noObjects:"Nesneler üretilemiyor, dosyada başlıktan başka bir veri var mı?",invalidCsv:"Dosya işlenemedi, geçerli bir CSV dosyası mı?",invalidJson:"Dosya işlenemedi, geçerli bir Json dosyası mı?",jsonNotArray:"Alınan Json dosyasında bir dizi bulunmalıdır, işlem iptal ediliyor."},pagination:{aria:{pageToFirst:"İlk sayfaya",pageBack:"Geri git",pageSelected:"Seçili sayfa",pageForward:"İleri git",pageToLast:"Sona git"},sizes:"Sayfadaki nesne sayısı",totalItems:"kayıtlar",through:"",of:""},grouping:{group:"Grupla",ungroup:"Gruplama",aggregate_count:"Yekun: Sayı",aggregate_sum:"Yekun: Toplam",aggregate_max:"Yekun: Maks",aggregate_min:"Yekun: Min",aggregate_avg:"Yekun: Ort",aggregate_remove:"Yekun: Sil"}}),a}])}])}(),function(){var a=["uiT","uiTranslate"],b=["t","uiTranslate"],c=angular.module("ui.grid.i18n");c.constant("i18nConstants",{MISSING:"[MISSING]",UPDATE_EVENT:"$uiI18n",LOCALE_DIRECTIVE_ALIAS:"uiI18n",DEFAULT_LANG:"en"}),c.service("i18nService",["$log","i18nConstants","$rootScope",function(a,b,c){var d={_langs:{},current:null,get:function(a){return this._langs[a.toLowerCase()]},add:function(a,b){var c=a.toLowerCase();this._langs[c]||(this._langs[c]={}),angular.extend(this._langs[c],b)},getAllLangs:function(){var a=[];if(!this._langs)return a;for(var b in this._langs)a.push(b);return a},setCurrent:function(a){this.current=a.toLowerCase()},getCurrentLang:function(){return this.current}},e={add:function(a,b){"object"==typeof a?angular.forEach(a,function(a){a&&d.add(a,b)}):d.add(a,b)},getAllLangs:function(){return d.getAllLangs()},get:function(a){var b=a?a:e.getCurrentLang();return d.get(b)},getSafeText:function(a,c){var f=c?c:e.getCurrentLang(),g=d.get(f);if(!g)return b.MISSING;for(var h=a.split("."),i=g,j=0;jf?0===g?new d(a,c[h]):new d(e[g-1],c[h]):new d(a,c[h])},f.prototype.getRowColRight=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);-1===f&&(f=0);var h=f===c.length-1?0:f+1;return f>h?g===e.length-1?new d(a,c[h]):new d(e[g+1],c[h]):new d(a,c[h])},f.prototype.getRowColDown=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);return-1===f&&(f=0),g===e.length-1?new d(a,c[f]):new d(e[g+1],c[f])},f.prototype.getRowColPageDown=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);-1===f&&(f=0);var h=this.bodyContainer.minRowsToRender();return g>=e.length-h?new d(e[e.length-1],c[f]):new d(e[g+h],c[f])},f.prototype.getRowColUp=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);return-1===f&&(f=0),0===g?new d(a,c[f]):new d(e[g-1],c[f])},f.prototype.getRowColPageUp=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);-1===f&&(f=0);var h=this.bodyContainer.minRowsToRender();return 0>g-h?new d(e[0],c[f]):new d(e[g-h],c[f])},f}]),a.service("uiGridCellNavService",["gridUtil","uiGridConstants","uiGridCellNavConstants","$q","uiGridCellNavFactory","GridRowColumn","ScrollEvent",function(a,b,c,d,e,f,g){var h={initializeGrid:function(a){a.registerColumnBuilder(h.cellNavColumnBuilder),a.cellNav={},a.cellNav.lastRowCol=null,a.cellNav.focusedCells=[],h.defaultGridOptions(a.options);var b={events:{cellNav:{navigate:function(a,b){},viewPortKeyDown:function(a,b){},viewPortKeyPress:function(a,b){}}},methods:{cellNav:{scrollToFocus:function(b,c){return h.scrollToFocus(a,b,c)},getFocusedCell:function(){return a.cellNav.lastRowCol},getCurrentSelection:function(){return a.cellNav.focusedCells},rowColSelectIndex:function(b){for(var c=-1,d=0;db&&(c+=a.drawnWidth)});var e=0===d?0:(d+1)/a.renderContainers.body.visibleColumnCache.length;return c+=b.drawnWidth*e}};return h}]),a.directive("uiGridCellnav",["gridUtil","uiGridCellNavService","uiGridCellNavConstants","uiGridConstants","GridRowColumn","$timeout","$compile",function(a,b,c,d,e,f,g){return{replace:!0,priority:-150,require:"^uiGrid",scope:!1,controller:function(){},compile:function(){return{pre:function(a,f,g,h){var i=a,j=h.grid;b.initializeGrid(j),h.cellNav={},h.cellNav.makeRowCol=function(a){return a instanceof e||(a=new e(a.row,a.col)),a},h.cellNav.getActiveCell=function(){var a=f[0].getElementsByClassName("ui-grid-cell-focus");return a.length>0?a[0]:void 0},h.cellNav.broadcastCellNav=j.cellNav.broadcastCellNav=function(a,b,d){b=!(void 0===b||!b),a=h.cellNav.makeRowCol(a),h.cellNav.broadcastFocus(a,b,d),i.$broadcast(c.CELL_NAV_EVENT,a,b,d)},h.cellNav.clearFocus=j.cellNav.clearFocus=function(){j.cellNav.focusedCells=[],i.$broadcast(c.CELL_NAV_EVENT)},h.cellNav.broadcastFocus=function(a,b,c){b=!(void 0===b||!b),a=h.cellNav.makeRowCol(a);var d=a.row,f=a.col,g=h.grid.api.cellNav.rowColSelectIndex(a);if(null===j.cellNav.lastRowCol||-1===g){var i=new e(d,f);(null===j.cellNav.lastRowCol||j.cellNav.lastRowCol.row!==i.row||j.cellNav.lastRowCol.col!==i.col)&&(j.api.cellNav.raise.navigate(i,j.cellNav.lastRowCol),j.cellNav.lastRowCol=i),h.grid.options.modifierKeysToMultiSelectCells&&b?j.cellNav.focusedCells.push(a):j.cellNav.focusedCells=[a]}else j.options.modifierKeysToMultiSelectCells&&b&&g>=0&&j.cellNav.focusedCells.splice(g,1)},h.cellNav.handleKeyDown=function(a){var e=b.getDirection(a);if(null===e)return null;var f="body";a.uiGridTargetRenderContainerId&&(f=a.uiGridTargetRenderContainerId);var g=h.grid.api.cellNav.getFocusedCell();if(g){var i=h.grid.renderContainers[f].cellNav.getNextRowCol(e,g.row,g.col),k=h.grid.renderContainers[f].cellNav.getFocusableCols(),l=h.grid.api.cellNav.rowColSelectIndex(i);return e===c.direction.LEFT&&i.col===k[k.length-1]&&i.row===g.row&&a.keyCode===d.keymap.TAB&&a.shiftKey?(j.cellNav.focusedCells.splice(l,1),h.cellNav.clearFocus(),!0):e!==c.direction.RIGHT||i.col!==k[0]||i.row!==g.row||a.keyCode!==d.keymap.TAB||a.shiftKey?(j.scrollToIfNecessary(i.row,i.col).then(function(){h.cellNav.broadcastCellNav(i)}),a.stopPropagation(),a.preventDefault(),!1):(j.cellNav.focusedCells.splice(l,1),h.cellNav.clearFocus(),!0)}}},post:function(a,b,d,e){function f(){var d='
         
        ',e=g(d)(a);b.prepend(e),a.$on(c.CELL_NAV_EVENT,function(a,b,c,d){function f(a){a!==e.text()&&(e[0].style.clip="rect(0px,0px,0px,0px)",e[0].innerHTML="",e[0].style.visibility="hidden",e[0].style.visibility="visible",""!==a&&(e[0].style.clip="auto",e[0].appendChild(document.createTextNode(a+" ")),e[0].style.visibility="hidden",e[0].style.visibility="visible"))}if(!d||"focus"!==d.type){for(var g=[],i=h.api.cellNav.getCurrentSelection(),j=0;j
        ')(b);d.append(o),o.on("focus",function(a){a.uiGridTargetRenderContainerId=m;var b=j.grid.api.cellNav.getFocusedCell();null===b&&(b=j.grid.renderContainers[m].cellNav.getNextRowCol(g.direction.DOWN,null,null),b.row&&b.col&&j.cellNav.broadcastCellNav(b))}),l.setAriaActivedescendant=function(a){d.attr("aria-activedescendant",a)},l.removeAriaActivedescendant=function(a){d.attr("aria-activedescendant")===a&&d.attr("aria-activedescendant","")},j.focus=function(){c.focus.byElement(o[0])};var p=null;o.on("keydown",function(a){a.uiGridTargetRenderContainerId=m;var b=j.grid.api.cellNav.getFocusedCell(),c=j.cellNav.handleKeyDown(a);null===c&&(j.grid.api.cellNav.raise.viewPortKeyDown(a,b),p=b)}),o.on("keypress",function(b){p&&(a(function(){j.grid.api.cellNav.raise.viewPortKeyPress(b,p)},4),p=null)}),b.$on("$destroy",function(){o.off()})}}}}}}}]),a.directive("uiGridViewport",["$timeout","$document","gridUtil","uiGridConstants","uiGridCellNavService","uiGridCellNavConstants","$log","$compile",function(a,b,c,d,e,f,g,h){return{replace:!0,priority:-99999,require:["^uiGrid","^uiGridRenderContainer","?^uiGridCellnav"],scope:!1,compile:function(){return{pre:function(a,b,c,d){},post:function(a,b,c,d){var e=d[0],f=d[1];if(e.grid.api.cellNav){var g=f.containerId;if("body"===g){var h=e.grid;h.api.core.on.scrollBegin(a,function(a){var b=e.grid.api.cellNav.getFocusedCell();null!==b&&f.colContainer.containsColumn(b.col)&&e.cellNav.clearFocus()}),h.api.core.on.scrollEnd(a,function(a){var b=e.grid.api.cellNav.getFocusedCell();null!==b&&f.colContainer.containsColumn(b.col)&&e.cellNav.broadcastCellNav(b)}),h.api.cellNav.on.navigate(a,function(){e.focus()})}}}}}}}]),a.directive("uiGridCell",["$timeout","$document","uiGridCellNavService","gridUtil","uiGridCellNavConstants","uiGridConstants","GridRowColumn",function(a,b,c,d,e,f,g){return{priority:-150,restrict:"A",require:["^uiGrid","?^uiGridCellnav"],scope:!1,link:function(a,b,c,d){function f(a){a.preventDefault()}function h(){if(!a.focused){var c=b.find("div");c.addClass("ui-grid-cell-focus"),b.attr("aria-selected",!0),k.setAriaActivedescendant(b.attr("id")),a.focused=!0}}function i(){if(a.focused){var c=b.find("div");c.removeClass("ui-grid-cell-focus"),b.attr("aria-selected",!1),k.removeAriaActivedescendant(b.attr("id")),a.focused=!1}}var j=d[0],k=d[1];if(j.grid.api.cellNav&&a.col.colDef.allowCellFocus){var l=j.grid;a.focused=!1,b.attr("tabindex",-1),b.find("div").on("click",function(b){j.cellNav.broadcastCellNav(new g(a.row,a.col),b.ctrlKey||b.metaKey,b),b.stopPropagation(),a.$apply()}),b.on("mousedown",f), +j.grid.api.edit&&(j.grid.api.edit.on.beginCellEdit(a,function(){b.off("mousedown",f)}),j.grid.api.edit.on.afterCellEdit(a,function(){b.on("mousedown",f)}),j.grid.api.edit.on.cancelCellEdit(a,function(){b.on("mousedown",f)})),b.on("focus",function(b){j.cellNav.broadcastCellNav(new g(a.row,a.col),!1,b),b.stopPropagation(),a.$apply()}),a.$on(e.CELL_NAV_EVENT,function(b,c,d){var e=l.cellNav.focusedCells.some(function(b,c){return b.row===a.row&&b.col===a.col});e?h():i()}),a.$on("$destroy",function(){b.find("div").off(),b.off()})}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.edit",["ui.grid"]);a.constant("uiGridEditConstants",{EDITABLE_CELL_TEMPLATE:/EDITABLE_CELL_TEMPLATE/g,EDITABLE_CELL_DIRECTIVE:/editable_cell_directive/g,events:{BEGIN_CELL_EDIT:"uiGridEventBeginCellEdit",END_CELL_EDIT:"uiGridEventEndCellEdit",CANCEL_CELL_EDIT:"uiGridEventCancelCellEdit"}}),a.service("uiGridEditService",["$q","uiGridConstants","gridUtil",function(a,b,c){var d={initializeGrid:function(a){d.defaultGridOptions(a.options),a.registerColumnBuilder(d.editColumnBuilder),a.edit={};var b={events:{edit:{afterCellEdit:function(a,b,c,d){},beginCellEdit:function(a,b,c){},cancelCellEdit:function(a,b){}}},methods:{edit:{}}};a.api.registerEventsFromObject(b.events)},defaultGridOptions:function(a){a.cellEditableCondition=void 0===a.cellEditableCondition?!0:a.cellEditableCondition,a.enableCellEditOnFocus=void 0===a.enableCellEditOnFocus?!1:a.enableCellEditOnFocus},editColumnBuilder:function(b,d,e){var f=[];return b.enableCellEdit=void 0===b.enableCellEdit?void 0===e.enableCellEdit?"object"!==b.type:e.enableCellEdit:b.enableCellEdit,b.cellEditableCondition=void 0===b.cellEditableCondition?e.cellEditableCondition:b.cellEditableCondition,b.enableCellEdit&&(b.editableCellTemplate=b.editableCellTemplate||e.editableCellTemplate||"ui-grid/cellEditor",f.push(c.getTemplate(b.editableCellTemplate).then(function(a){d.editableCellTemplate=a},function(a){throw new Error("Couldn't fetch/use colDef.editableCellTemplate '"+b.editableCellTemplate+"'")}))),b.enableCellEditOnFocus=void 0===b.enableCellEditOnFocus?e.enableCellEditOnFocus:b.enableCellEditOnFocus,a.all(f)},isStartEditKey:function(a){return a.metaKey||a.keyCode===b.keymap.ESC||a.keyCode===b.keymap.SHIFT||a.keyCode===b.keymap.CTRL||a.keyCode===b.keymap.ALT||a.keyCode===b.keymap.WIN||a.keyCode===b.keymap.CAPSLOCK||a.keyCode===b.keymap.LEFT||a.keyCode===b.keymap.TAB&&a.shiftKey||a.keyCode===b.keymap.RIGHT||a.keyCode===b.keymap.TAB||a.keyCode===b.keymap.UP||a.keyCode===b.keymap.ENTER&&a.shiftKey||a.keyCode===b.keymap.DOWN||a.keyCode===b.keymap.ENTER?!1:!0}};return d}]),a.directive("uiGridEdit",["gridUtil","uiGridEditService",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(e.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridViewport",["uiGridEditConstants",function(a){return{replace:!0,priority:-99998,require:["^uiGrid","^uiGridRenderContainer"],scope:!1,compile:function(){return{post:function(b,c,d,e){var f=e[0];if(f.grid.api.edit&&f.grid.api.cellNav){var g=e[1].containerId;"body"===g&&(b.$on(a.events.CANCEL_CELL_EDIT,function(){f.focus()}),b.$on(a.events.END_CELL_EDIT,function(){f.focus()}))}}}}}}]),a.directive("uiGridCell",["$compile","$injector","$timeout","uiGridConstants","uiGridEditConstants","gridUtil","$parse","uiGridEditService","$rootScope","$q",function(a,b,c,d,e,f,g,h,i,j){var k=500;if(b.has("uiGridCellNavService")){b.get("uiGridCellNavService")}return{priority:-100,restrict:"A",scope:!1,require:"?^uiGrid",link:function(b,l,m,n){function o(){l.on("dblclick",u),l.on("touchstart",p),n&&n.grid.api.cellNav&&(G=n.grid.api.cellNav.on.viewPortKeyDown(b,function(a,c){null!==c&&(c.row!==b.row||c.col!==b.col||b.col.colDef.enableCellEditOnFocus||s(a))}),F=n.grid.api.cellNav.on.navigate(b,function(a,d){b.col.colDef.enableCellEditOnFocus&&(d&&a.row===d.row&&a.col===d.col||a.row!==b.row||a.col!==b.col||c(function(){u()}))})),b.beginEditEventsWired=!0}function p(a){"undefined"!=typeof a.originalEvent&&void 0!==a.originalEvent&&(a=a.originalEvent),l.on("touchend",q),C=c(function(){},k),C.then(function(){setTimeout(u,0),l.off("touchend",q)})}function q(a){c.cancel(C),l.off("touchend",q)}function r(){l.off("dblclick",u),l.off("keydown",s),l.off("touchstart",p),F(),G(),b.beginEditEventsWired=!1}function s(a){h.isStartEditKey(a)&&u(a)}function t(a,c){return!c.isSaving&&(angular.isFunction(a.colDef.cellEditableCondition)?a.colDef.cellEditableCondition(b):a.colDef.cellEditableCondition)}function u(a){b.grid.api.core.scrollToIfNecessary(b.row,b.col).then(function(){v(a)})}function v(h){if(!E&&t(b.col,b.row)){B=g(b.row.getQualifiedColField(b.col)),A=B(b),z=b.col.editableCellTemplate,z=b.col.colDef.editModelField?z.replace(d.MODEL_COL_FIELD,f.preEval("row.entity."+b.col.colDef.editModelField)):z.replace(d.MODEL_COL_FIELD,b.row.getQualifiedColField(b.col)),z=z.replace(d.COL_FIELD,"grid.getCellValue(row, col)");var k=b.col.colDef.editDropdownFilter?"|"+b.col.colDef.editDropdownFilter:"";z=z.replace(d.CUSTOM_FILTERS,k);var m="text";switch(b.col.colDef.type){case"boolean":m="checkbox";break;case"number":m="number";break;case"date":m="date"}z=z.replace("INPUT_TYPE",m);var n=b.col.colDef.editDropdownOptionsFunction;if(n)j.when(n(b.row.entity,b.col.colDef)).then(function(a){b.editDropdownOptionsArray=a});else{var o=b.col.colDef.editDropdownRowEntityOptionsArrayPath;o?b.editDropdownOptionsArray=y(b.row.entity,o):b.editDropdownOptionsArray=b.col.colDef.editDropdownOptionsArray}b.editDropdownIdLabel=b.col.colDef.editDropdownIdLabel?b.col.colDef.editDropdownIdLabel:"id",b.editDropdownValueLabel=b.col.colDef.editDropdownValueLabel?b.col.colDef.editDropdownValueLabel:"value";var p=function(){E=!0,r();var c=angular.element(z);l.append(c),D=b.$new(),a(c)(D);var d=angular.element(l.children()[0]);d.addClass("ui-grid-cell-contents-hidden")};i.$$phase?p():b.$apply(p);var q=b.col.grid.api.core.on.scrollBegin(b,function(){b.grid.disableScrolling||(w(),b.grid.api.edit.raise.afterCellEdit(b.row.entity,b.col.colDef,B(b),A),q(),s(),u())}),s=b.$on(e.events.END_CELL_EDIT,function(){w(),b.grid.api.edit.raise.afterCellEdit(b.row.entity,b.col.colDef,B(b),A),s(),q(),u()}),u=b.$on(e.events.CANCEL_CELL_EDIT,function(){x(),u(),q(),s()});b.$broadcast(e.events.BEGIN_CELL_EDIT,h),c(function(){b.grid.api.edit.raise.beginCellEdit(b.row.entity,b.col.colDef,h)})}}function w(){if(b.grid.disableScrolling=!1,E){n&&n.grid.api.cellNav&&n.focus();var a=angular.element(l.children()[0]);D.$destroy(),angular.element(l.children()[1]).remove(),a.removeClass("ui-grid-cell-contents-hidden"),E=!1,o(),b.grid.api.core.notifyDataChange(d.dataChange.EDIT)}}function x(){b.grid.disableScrolling=!1,E&&(B.assign(b,A),b.$apply(),b.grid.api.edit.raise.cancelCellEdit(b.row.entity,b.col.colDef),w())}function y(a,b){b=b.replace(/\[(\w+)\]/g,".$1"),b=b.replace(/^\./,"");for(var c=b.split(".");c.length;){var d=c.shift();if(!(d in a))return;a=a[d]}return a}var z,A,B,C,D,E=!1;if(b.col.colDef.enableCellEdit){var F=function(){},G=function(){},H=function(){b.col.colDef.enableCellEdit&&b.row.enableCellEdit!==!1?b.beginEditEventsWired||o():b.beginEditEventsWired&&r()};H();var I=b.$watch("row",function(a,b){a!==b&&H()});b.$on("$destroy",I)}}}}]),a.directive("uiGridEditor",["gridUtil","uiGridConstants","uiGridEditConstants","$timeout","uiGridEditService",function(a,b,c,d,e){return{scope:!0,require:["?^uiGrid","?^uiGridRenderContainer","ngModel"],compile:function(){return{pre:function(a,b,c){},post:function(a,f,g,h){var i,j,k;h[0]&&(i=h[0]),h[1]&&(j=h[1]),h[2]&&(k=h[2]),a.$on(c.events.BEGIN_CELL_EDIT,function(b,c){if(d(function(){if(f[0].focus(),f[0].select&&a.col.colDef.enableCellEditOnFocus||!i||!i.grid.api.cellNav)f[0].select();else try{f[0].setSelectionRange(f[0].value.length,f[0].value.length)}catch(b){}}),i&&i.grid.api.cellNav)var g=i.grid.api.cellNav.on.viewPortKeyPress(a,function(a,b){e.isStartEditKey(a)&&(k.$setViewValue(String.fromCharCode("number"==typeof a.which?a.which:a.keyCode),a),k.$render()),g()});f.on("blur",function(b){a.stopEdit(b)})}),a.deepEdit=!1,a.stopEdit=function(b){a.inputForm&&!a.inputForm.$valid?(b.stopPropagation(),a.$emit(c.events.CANCEL_CELL_EDIT)):a.$emit(c.events.END_CELL_EDIT),a.deepEdit=!1},f.on("click",function(b){"checkbox"!==f[0].type&&(a.deepEdit=!0,d(function(){a.grid.disableScrolling=!0}))}),f.on("keydown",function(d){switch(d.keyCode){case b.keymap.ESC:d.stopPropagation(),a.$emit(c.events.CANCEL_CELL_EDIT)}if(!a.deepEdit||d.keyCode!==b.keymap.LEFT&&d.keyCode!==b.keymap.RIGHT&&d.keyCode!==b.keymap.UP&&d.keyCode!==b.keymap.DOWN)if(i&&i.grid.api.cellNav)d.uiGridTargetRenderContainerId=j.containerId,null!==i.cellNav.handleKeyDown(d)&&a.stopEdit(d);else switch(d.keyCode){case b.keymap.ENTER:case b.keymap.TAB:d.stopPropagation(),d.preventDefault(),a.stopEdit(d)}else d.stopPropagation();return!0})}}}}}]),a.directive("uiGridEditor",["$filter",function(a){function b(a){if("undefined"==typeof a||""===a)return null;var b=a.split("-");if(3!==b.length)return null;var c=parseInt(b[0],10),d=parseInt(b[1],10),e=parseInt(b[2],10);return 1>d||1>c||1>e?null:new Date(c,d-1,e)}return{priority:-100,require:"?ngModel",link:function(c,d,e,f){2===angular.version.minor&&e.type&&"date"===e.type&&f&&(f.$formatters.push(function(b){return f.$setValidity(null,!b||!isNaN(b.getTime())),a("date")(b,"yyyy-MM-dd")}),f.$parsers.push(function(a){if(a&&a.length>0){var c=b(a);return f.$setValidity(null,c&&!isNaN(c.getTime())),c}return f.$setValidity(null,!0),null}))}}}]),a.directive("uiGridEditDropdown",["uiGridConstants","uiGridEditConstants",function(a,b){return{require:["?^uiGrid","?^uiGridRenderContainer"],scope:!0,compile:function(){return{pre:function(a,b,c){},post:function(c,d,e,f){var g=f[0],h=f[1];c.$on(b.events.BEGIN_CELL_EDIT,function(){d[0].focus(),d[0].style.width=d[0].parentElement.offsetWidth-1+"px",d.on("blur",function(a){c.stopEdit(a)})}),c.stopEdit=function(a){c.$emit(b.events.END_CELL_EDIT)},d.on("keydown",function(d){switch(d.keyCode){case a.keymap.ESC:d.stopPropagation(),c.$emit(b.events.CANCEL_CELL_EDIT)}if(g&&g.grid.api.cellNav)d.uiGridTargetRenderContainerId=h.containerId,null!==g.cellNav.handleKeyDown(d)&&c.stopEdit(d);else switch(d.keyCode){case a.keymap.ENTER:case a.keymap.TAB:d.stopPropagation(),d.preventDefault(),c.stopEdit(d)}return!0})}}}}}]),a.directive("uiGridEditFileChooser",["gridUtil","uiGridConstants","uiGridEditConstants","$timeout",function(a,b,c,d){return{scope:!0,require:["?^uiGrid","?^uiGridRenderContainer"],compile:function(){return{pre:function(a,b,c){},post:function(b,d,e,f){var g,h;f[0]&&(g=f[0]),f[1]&&(h=f[1]);var i=(g.grid,function(d){var e=d.srcElement||d.target;e&&e.files&&e.files.length>0?("function"==typeof b.col.colDef.editFileChooserCallback?b.col.colDef.editFileChooserCallback(b.row,b.col,e.files):a.logError("You need to set colDef.editFileChooserCallback to use the file chooser"),e.form.reset(),b.$emit(c.events.END_CELL_EDIT)):b.$emit(c.events.CANCEL_CELL_EDIT)});d[0].addEventListener("change",i,!1),b.$on(c.events.BEGIN_CELL_EDIT,function(){d[0].focus(),d[0].select(),d.on("blur",function(a){b.$emit(c.events.END_CELL_EDIT)})})}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.expandable",["ui.grid"]);a.service("uiGridExpandableService",["gridUtil","$compile",function(a,b){var c={initializeGrid:function(b){b.expandable={},b.expandable.expandedAll=!1,b.options.enableExpandable=b.options.enableExpandable!==!1,b.options.expandableRowHeight=b.options.expandableRowHeight||150,b.options.expandableRowHeaderWidth=b.options.expandableRowHeaderWidth||40,b.options.enableExpandable&&!b.options.expandableRowTemplate&&(a.logError("You have not set the expandableRowTemplate, disabling expandable module"),b.options.enableExpandable=!1);var d={events:{expandable:{rowExpandedBeforeStateChanged:function(a,b){},rowExpandedStateChanged:function(a,b){}}},methods:{expandable:{toggleRowExpansion:function(a){var d=b.getRow(a);null!==d&&c.toggleRowExpansion(b,d)},expandAllRows:function(){c.expandAllRows(b)},collapseAllRows:function(){c.collapseAllRows(b)},toggleAllRows:function(){c.toggleAllRows(b)},expandRow:function(a){var d=b.getRow(a);null===d||d.isExpanded||c.toggleRowExpansion(b,d)},collapseRow:function(a){var d=b.getRow(a);null!==d&&d.isExpanded&&c.toggleRowExpansion(b,d)},getExpandedRows:function(){return c.getExpandedRows(b).map(function(a){return a.entity})}}}};b.api.registerEventsFromObject(d.events),b.api.registerMethodsFromObject(d.methods)},toggleRowExpansion:function(a,b){a.api.expandable.raise.rowExpandedBeforeStateChanged(b),b.isExpanded=!b.isExpanded,angular.isUndefined(b.expandedRowHeight)&&(b.expandedRowHeight=a.options.expandableRowHeight),b.isExpanded?b.height=b.grid.options.rowHeight+b.expandedRowHeight:(b.height=b.grid.options.rowHeight,a.expandable.expandedAll=!1),a.api.expandable.raise.rowExpandedStateChanged(b)},expandAllRows:function(a,b){a.renderContainers.body.visibleRowCache.forEach(function(b){b.isExpanded||c.toggleRowExpansion(a,b)}),a.expandable.expandedAll=!0,a.queueGridRefresh()},collapseAllRows:function(a){a.renderContainers.body.visibleRowCache.forEach(function(b){b.isExpanded&&c.toggleRowExpansion(a,b)}),a.expandable.expandedAll=!1,a.queueGridRefresh()},toggleAllRows:function(a){a.expandable.expandedAll?c.collapseAllRows(a):c.expandAllRows(a)},getExpandedRows:function(a){return a.rows.filter(function(a){return a.isExpanded})}};return c}]),a.directive("uiGridExpandable",["uiGridExpandableService","$templateCache",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(c,d,e,f){if(f.grid.options.enableExpandableRowHeader!==!1){var g={name:"expandableButtons",displayName:"",exporterSuppressExport:!0,enableColumnResizing:!1,enableColumnMenu:!1,width:f.grid.options.expandableRowHeaderWidth||40};g.cellTemplate=b.get("ui-grid/expandableRowHeader"),g.headerCellTemplate=b.get("ui-grid/expandableTopRowHeader"),f.grid.addRowHeaderColumn(g)}a.initializeGrid(f.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGrid",["uiGridExpandableService","$templateCache",function(a,b){return{replace:!0,priority:599,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,b,c,d){d.grid.api.core.on.renderingComplete(a,function(){a.row&&a.row.grid&&a.row.grid.options&&a.row.grid.options.enableExpandable&&(d.grid.parentRow=a.row)})},post:function(a,b,c,d){}}}}}]),a.directive("uiGridExpandableRow",["uiGridExpandableService","$timeout","$compile","uiGridConstants","gridUtil","$interval","$log",function(a,b,c,d,e,f,g){return{replace:!1,priority:0,scope:!1,compile:function(){return{pre:function(a,b,d,f){e.getTemplate(a.grid.options.expandableRowTemplate).then(function(d){if(a.grid.options.expandableRowScope){var e=a.grid.options.expandableRowScope;for(var f in e)e.hasOwnProperty(f)&&(a[f]=e[f])}var g=c(d)(a);b.append(g),a.row.expandedRendered=!0})},post:function(a,b,c,d){a.$on("$destroy",function(){a.row.expandedRendered=!1})}}}}}]),a.directive("uiGridRow",["$compile","gridUtil","$templateCache",function(a,b,c){return{priority:-200,scope:!1,compile:function(a,b){return{pre:function(a,b,c,d){a.expandableRow={},a.expandableRow.shouldRenderExpand=function(){var b="body"===a.colContainer.name&&a.grid.options.enableExpandable!==!1&&a.row.isExpanded&&(!a.grid.isScrollingVertically||a.row.expandedRendered);return b},a.expandableRow.shouldRenderFiller=function(){var b=a.row.isExpanded&&("body"!==a.colContainer.name||a.grid.isScrollingVertically&&!a.row.expandedRendered);return b}},post:function(a,b,c,d){}}}}}]),a.directive("uiGridViewport",["$compile","gridUtil","$templateCache",function(a,b,c){return{priority:-200,scope:!1,compile:function(a,b){var d=angular.element(a.children().children()[0]),e=c.get("ui-grid/expandableScrollFiller"),f=c.get("ui-grid/expandableRow");return d.append(f),d.append(e),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.exporter",["ui.grid"]);a.constant("uiGridExporterConstants",{featureName:"exporter",ALL:"all",VISIBLE:"visible",SELECTED:"selected",CSV_CONTENT:"CSV_CONTENT",BUTTON_LABEL:"BUTTON_LABEL",FILE_NAME:"FILE_NAME"}),a.service("uiGridExporterService",["$q","uiGridExporterConstants","gridUtil","$compile","$interval","i18nService",function(a,b,c,d,e,f){var g={delay:100,initializeGrid:function(a){a.exporter={},this.defaultGridOptions(a.options);var b={events:{exporter:{}},methods:{exporter:{csvExport:function(b,c){g.csvExport(a,b,c)},pdfExport:function(b,c){g.pdfExport(a,b,c)}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods),a.api.core.addToGridMenu?g.addToMenu(a):e(function(){a.api.core.addToGridMenu&&g.addToMenu(a)},this.delay,1)},defaultGridOptions:function(a){a.exporterSuppressMenu=a.exporterSuppressMenu===!0,a.exporterMenuLabel=a.exporterMenuLabel?a.exporterMenuLabel:"Export",a.exporterSuppressColumns=a.exporterSuppressColumns?a.exporterSuppressColumns:[],a.exporterCsvColumnSeparator=a.exporterCsvColumnSeparator?a.exporterCsvColumnSeparator:",",a.exporterCsvFilename=a.exporterCsvFilename?a.exporterCsvFilename:"download.csv",a.exporterPdfFilename=a.exporterPdfFilename?a.exporterPdfFilename:"download.pdf",a.exporterOlderExcelCompatibility=a.exporterOlderExcelCompatibility===!0,a.exporterPdfDefaultStyle=a.exporterPdfDefaultStyle?a.exporterPdfDefaultStyle:{fontSize:11},a.exporterPdfTableStyle=a.exporterPdfTableStyle?a.exporterPdfTableStyle:{margin:[0,5,0,15]},a.exporterPdfTableHeaderStyle=a.exporterPdfTableHeaderStyle?a.exporterPdfTableHeaderStyle:{bold:!0,fontSize:12,color:"black"},a.exporterPdfHeader=a.exporterPdfHeader?a.exporterPdfHeader:null,a.exporterPdfFooter=a.exporterPdfFooter?a.exporterPdfFooter:null,a.exporterPdfOrientation=a.exporterPdfOrientation?a.exporterPdfOrientation:"landscape",a.exporterPdfPageSize=a.exporterPdfPageSize?a.exporterPdfPageSize:"A4",a.exporterPdfMaxGridWidth=a.exporterPdfMaxGridWidth?a.exporterPdfMaxGridWidth:720,a.exporterMenuAllData=void 0!==a.exporterMenuAllData?a.exporterMenuAllData:!0,a.exporterMenuVisibleData=void 0!==a.exporterMenuVisibleData?a.exporterMenuVisibleData:!0,a.exporterMenuSelectedData=void 0!==a.exporterMenuSelectedData?a.exporterMenuSelectedData:!0,a.exporterMenuCsv=void 0!==a.exporterMenuCsv?a.exporterMenuCsv:!0,a.exporterMenuPdf=void 0!==a.exporterMenuPdf?a.exporterMenuPdf:!0,a.exporterPdfCustomFormatter=a.exporterPdfCustomFormatter&&"function"==typeof a.exporterPdfCustomFormatter?a.exporterPdfCustomFormatter:function(a){return a},a.exporterHeaderFilterUseName=a.exporterHeaderFilterUseName===!0,a.exporterFieldCallback=a.exporterFieldCallback?a.exporterFieldCallback:function(a,b,c,d){return d},a.exporterAllDataFn=a.exporterAllDataFn?a.exporterAllDataFn:null,null==a.exporterAllDataFn&&a.exporterAllDataPromise&&(a.exporterAllDataFn=a.exporterAllDataPromise)},addToMenu:function(a){a.api.core.addToGridMenu(a,[{title:f.getSafeText("gridMenu.exporterAllAsCsv"),action:function(a){this.grid.api.exporter.csvExport(b.ALL,b.ALL)},shown:function(){return this.grid.options.exporterMenuCsv&&this.grid.options.exporterMenuAllData},order:200},{title:f.getSafeText("gridMenu.exporterVisibleAsCsv"),action:function(a){this.grid.api.exporter.csvExport(b.VISIBLE,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuCsv&&this.grid.options.exporterMenuVisibleData},order:201},{title:f.getSafeText("gridMenu.exporterSelectedAsCsv"),action:function(a){this.grid.api.exporter.csvExport(b.SELECTED,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuCsv&&this.grid.options.exporterMenuSelectedData&&this.grid.api.selection&&this.grid.api.selection.getSelectedRows().length>0},order:202},{title:f.getSafeText("gridMenu.exporterAllAsPdf"),action:function(a){this.grid.api.exporter.pdfExport(b.ALL,b.ALL)},shown:function(){return this.grid.options.exporterMenuPdf&&this.grid.options.exporterMenuAllData},order:203},{title:f.getSafeText("gridMenu.exporterVisibleAsPdf"),action:function(a){this.grid.api.exporter.pdfExport(b.VISIBLE,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuPdf&&this.grid.options.exporterMenuVisibleData},order:204},{title:f.getSafeText("gridMenu.exporterSelectedAsPdf"),action:function(a){this.grid.api.exporter.pdfExport(b.SELECTED,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuPdf&&this.grid.options.exporterMenuSelectedData&&this.grid.api.selection&&this.grid.api.selection.getSelectedRows().length>0},order:205}])},csvExport:function(a,b,c){var d=this;this.loadAllDataIfNeeded(a,b,c).then(function(){var e=a.options.showHeader?d.getColumnHeaders(a,c):[],f=d.getData(a,b,c),g=d.formatAsCsv(e,f,a.options.exporterCsvColumnSeparator);d.downloadFile(a.options.exporterCsvFilename,g,a.options.exporterOlderExcelCompatibility)})},loadAllDataIfNeeded:function(c,d,e){if(d===b.ALL&&c.rows.length!==c.options.totalItems&&c.options.exporterAllDataFn)return c.options.exporterAllDataFn().then(function(){c.modifyRows(c.options.data)});var f=a.defer();return f.resolve(),f.promise},getColumnHeaders:function(a,c){var d,e=[];if(c===b.ALL)d=a.columns;else{var f=a.renderContainers.left?a.renderContainers.left.visibleColumnCache.filter(function(a){return a.visible}):[],g=a.renderContainers.body?a.renderContainers.body.visibleColumnCache.filter(function(a){return a.visible}):[],h=a.renderContainers.right?a.renderContainers.right.visibleColumnCache.filter(function(a){return a.visible}):[];d=f.concat(g,h)}return d.forEach(function(b,c){b.colDef.exporterSuppressExport!==!0&&-1===a.options.exporterSuppressColumns.indexOf(b.name)&&e.push({name:b.field,displayName:a.options.exporterHeaderFilter?a.options.exporterHeaderFilterUseName?a.options.exporterHeaderFilter(b.name):a.options.exporterHeaderFilter(b.displayName):b.displayName,width:b.drawnWidth?b.drawnWidth:b.width,align:"number"===b.colDef.type?"right":"left"})}),e},getData:function(a,d,e,f){var g,h,i=[];switch(d){case b.ALL:g=a.rows;break;case b.VISIBLE:g=a.getVisibleRows();break;case b.SELECTED:a.api.selection?g=a.api.selection.getSelectedGridRows():c.logError("selection feature must be enabled to allow selected rows to be exported")}if(e===b.ALL)h=a.columns;else{var j=a.renderContainers.left?a.renderContainers.left.visibleColumnCache.filter(function(a){return a.visible}):[],k=a.renderContainers.body?a.renderContainers.body.visibleColumnCache.filter(function(a){return a.visible}):[],l=a.renderContainers.right?a.renderContainers.right.visibleColumnCache.filter(function(a){return a.visible}):[];h=j.concat(k,l)}return g.forEach(function(c,d){if(c.exporterEnableExporting!==!1){var g=[];h.forEach(function(d,h){if((d.visible||e===b.ALL)&&d.colDef.exporterSuppressExport!==!0&&-1===a.options.exporterSuppressColumns.indexOf(d.name)){var i=f?a.getCellDisplayValue(c,d):a.getCellValue(c,d),j={value:a.options.exporterFieldCallback(a,c,d,i)};d.colDef.exporterPdfAlign&&(j.alignment=d.colDef.exporterPdfAlign),g.push(j)}}),i.push(g)}}),i},formatAsCsv:function(a,b,c){var d=this,e=a.map(function(a){return{value:a.displayName}}),f=e.length>0?d.formatRowAsCsv(this,c)(e)+"\n":"";return f+=b.map(this.formatRowAsCsv(this,c)).join("\n")},formatRowAsCsv:function(a,b){return function(c){return c.map(a.formatFieldAsCsv).join(b)}},formatFieldAsCsv:function(a){return null==a.value?"":"number"==typeof a.value?a.value:"boolean"==typeof a.value?a.value?"TRUE":"FALSE":"string"==typeof a.value?'"'+a.value.replace(/"/g,'""')+'"':JSON.stringify(a.value)},isIE:function(){var a=navigator.userAgent.search(/(?:Edge|MSIE|Trident\/.*; rv:)/),b=!1;return-1!==a&&(b=!0),b},downloadFile:function(a,b,c){var d,e,f=document,g=f.createElement("a"),h="application/octet-stream;charset=utf-8";if(e=this.isIE(),e&&10>e){var i=f.createElement("iframe");return document.body.appendChild(i),i.contentWindow.document.open("text/html","replace"),i.contentWindow.document.write("sep=,\r\n"+b),i.contentWindow.document.close(),i.contentWindow.focus(),i.contentWindow.document.execCommand("SaveAs",!0,a),document.body.removeChild(i),!0}if(navigator.msSaveBlob)return navigator.msSaveOrOpenBlob(new Blob([c?"\ufeff":"",b],{type:h}),a);if("download"in g){var j=new Blob([c?"\ufeff":"",b],{type:h});d=URL.createObjectURL(j),g.setAttribute("download",a)}else d="data:"+h+","+encodeURIComponent(b),g.setAttribute("target","_blank");g.href=d,g.setAttribute("style","display:none;"),f.body.appendChild(g),setTimeout(function(){if(g.click)g.click();else if(document.createEvent){var a=document.createEvent("MouseEvents");a.initEvent("click",!0,!0),g.dispatchEvent(a)}f.body.removeChild(g)},this.delay)},pdfExport:function(a,b,c){var d=this;this.loadAllDataIfNeeded(a,b,c).then(function(){var e=d.getColumnHeaders(a,c),f=d.getData(a,b,c),g=d.prepareAsPdf(a,e,f);d.isIE()||-1!==navigator.appVersion.indexOf("Edge")?d.downloadPDF(a.options.exporterPdfFilename,g):pdfMake.createPdf(g).open()})},downloadPDF:function(a,b){var c,d=document;d.createElement("a");c=this.isIE();var e,f=pdfMake.createPdf(b);f.getBuffer(function(b){if(e=new Blob([b]),navigator.msSaveBlob)return navigator.msSaveBlob(e,a);if(c){var f=d.createElement("iframe");return document.body.appendChild(f),f.contentWindow.document.open("text/html","replace"),f.contentWindow.document.write(e),f.contentWindow.document.close(),f.contentWindow.focus(),f.contentWindow.document.execCommand("SaveAs",!0,a),document.body.removeChild(f),!0}})},prepareAsPdf:function(a,b,c){var d=this.calculatePdfHeaderWidths(a,b),e=b.map(function(a){return{text:a.displayName,style:"tableHeader"}}),f=c.map(this.formatRowAsPdf(this)),g=[e].concat(f),h={pageOrientation:a.options.exporterPdfOrientation,pageSize:a.options.exporterPdfPageSize,content:[{style:"tableStyle",table:{headerRows:1,widths:d,body:g}}],styles:{tableStyle:a.options.exporterPdfTableStyle,tableHeader:a.options.exporterPdfTableHeaderStyle},defaultStyle:a.options.exporterPdfDefaultStyle};return a.options.exporterPdfLayout&&(h.layout=a.options.exporterPdfLayout),a.options.exporterPdfHeader&&(h.header=a.options.exporterPdfHeader),a.options.exporterPdfFooter&&(h.footer=a.options.exporterPdfFooter),a.options.exporterPdfCustomFormatter&&(h=a.options.exporterPdfCustomFormatter(h)),h},calculatePdfHeaderWidths:function(a,b){var c=0;b.forEach(function(a){"number"==typeof a.width&&(c+=a.width)});var d=0;b.forEach(function(a){if("*"===a.width&&(d+=100),"string"==typeof a.width&&a.width.match(/(\d)*%/)){var b=parseInt(a.width.match(/(\d)*%/)[0]);a.width=c*b/100,d+=a.width}});var e=c+d;return b.map(function(b){return"*"===b.width?b.width:b.width*a.options.exporterPdfMaxGridWidth/e})},formatRowAsPdf:function(a){return function(b){return b.map(a.formatFieldAsPdfString)}},formatFieldAsPdfString:function(a){var b;return b=null==a.value?"":"number"==typeof a.value?a.value.toString():"boolean"==typeof a.value?a.value?"TRUE":"FALSE":"string"==typeof a.value?a.value.replace(/"/g,'""'):JSON.stringify(a.value).replace(/^"/,"").replace(/"$/,""),a.alignment&&"string"==typeof a.alignment&&(b={text:b,alignment:a.alignment}),b}};return g}]),a.directive("uiGridExporter",["uiGridExporterConstants","uiGridExporterService","gridUtil","$compile",function(a,b,c,d){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,link:function(a,c,d,e){b.initializeGrid(e.grid),e.grid.exporter.$scope=a}}}])}(),function(){"use strict";var a=angular.module("ui.grid.grouping",["ui.grid","ui.grid.treeBase"]);a.constant("uiGridGroupingConstants",{featureName:"grouping",rowHeaderColName:"treeBaseRowHeaderCol",EXPANDED:"expanded",COLLAPSED:"collapsed",aggregation:{COUNT:"count",SUM:"sum",MAX:"max",MIN:"min",AVG:"avg"}}),a.service("uiGridGroupingService",["$q","uiGridGroupingConstants","gridUtil","rowSorter","GridRow","gridClassFactory","i18nService","uiGridConstants","uiGridTreeBaseService",function(a,b,c,d,e,f,g,h,i){var j={initializeGrid:function(a,b){i.initializeGrid(a,b),a.grouping={},a.grouping.groupHeaderCache={},j.defaultGridOptions(a.options),a.registerRowsProcessor(j.groupRows,400),a.registerColumnBuilder(j.groupingColumnBuilder),a.registerColumnsProcessor(j.groupingColumnProcessor,400);var c={events:{grouping:{aggregationChanged:{},groupingChanged:{}}},methods:{grouping:{getGrouping:function(b){var c=j.getGrouping(a);return c.grouping.forEach(function(a){a.colName=a.col.name,delete a.col}),c.aggregations.forEach(function(a){a.colName=a.col.name,delete a.col}),c.aggregations=c.aggregations.filter(function(a){return!a.aggregation.source||"grouping"!==a.aggregation.source}),b&&(c.rowExpandedStates=j.getRowExpandedStates(a.grouping.groupingHeaderCache)),c},setGrouping:function(b){j.setGrouping(a,b)},groupColumn:function(b){var c=a.getColumn(b);j.groupColumn(a,c)},ungroupColumn:function(b){var c=a.getColumn(b);j.ungroupColumn(a,c)},clearGrouping:function(){j.clearGrouping(a)},aggregateColumn:function(b,c,d){var e=a.getColumn(b);j.aggregateColumn(a,e,c,d)}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods),a.api.core.on.sortChanged(b,j.tidyPriorities)},defaultGridOptions:function(a){a.enableGrouping=a.enableGrouping!==!1,a.groupingShowCounts=a.groupingShowCounts!==!1,a.groupingNullLabel="undefined"==typeof a.groupingNullLabel?"Null":a.groupingNullLabel,a.enableGroupHeaderSelection=a.enableGroupHeaderSelection===!0},groupingColumnBuilder:function(a,d,e){if(a.enableGrouping!==!1){"undefined"==typeof d.grouping&&"undefined"!=typeof a.grouping?(d.grouping=angular.copy(a.grouping),"undefined"!=typeof d.grouping.groupPriority&&d.grouping.groupPriority>-1&&(d.treeAggregationFn=i.nativeAggregations()[b.aggregation.COUNT].aggregationFn,d.treeAggregationFinalizerFn=j.groupedFinalizerFn)):"undefined"==typeof d.grouping&&(d.grouping={}),"undefined"!=typeof d.grouping&&"undefined"!=typeof d.grouping.groupPriority&&d.grouping.groupPriority>=0&&(d.suppressRemoveSort=!0);var f={name:"ui.grid.grouping.group",title:g.get().grouping.group,icon:"ui-grid-icon-indent-right",shown:function(){return"undefined"==typeof this.context.col.grouping||"undefined"==typeof this.context.col.grouping.groupPriority||this.context.col.grouping.groupPriority<0},action:function(){j.groupColumn(this.context.col.grid,this.context.col)}},h={name:"ui.grid.grouping.ungroup",title:g.get().grouping.ungroup,icon:"ui-grid-icon-indent-left",shown:function(){return"undefined"!=typeof this.context.col.grouping&&"undefined"!=typeof this.context.col.grouping.groupPriority&&this.context.col.grouping.groupPriority>=0},action:function(){j.ungroupColumn(this.context.col.grid,this.context.col)}},k={name:"ui.grid.grouping.aggregateRemove",title:g.get().grouping.aggregate_remove,shown:function(){return"undefined"!=typeof this.context.col.treeAggregationFn},action:function(){j.aggregateColumn(this.context.col.grid,this.context.col,null)}},l=function(a,b){b=b||g.get().grouping["aggregate_"+a]||a;var e={name:"ui.grid.grouping.aggregate"+a,title:b,shown:function(){return"undefined"==typeof this.context.col.treeAggregation||"undefined"==typeof this.context.col.treeAggregation.type||this.context.col.treeAggregation.type!==a},action:function(){j.aggregateColumn(this.context.col.grid,this.context.col,a)}};c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.aggregate"+a)||d.menuItems.push(e)};d.colDef.groupingShowGroupingMenu!==!1&&(c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.group")||d.menuItems.push(f),c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.ungroup")||d.menuItems.push(h)),d.colDef.groupingShowAggregationMenu!==!1&&(angular.forEach(i.nativeAggregations(),function(a,b){l(b)}),angular.forEach(e.treeCustomAggregations,function(a,b){l(b,a.menuTitle)}),c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.aggregateRemove")||d.menuItems.push(k))}},groupingColumnProcessor:function(a,b){return a=j.moveGroupColumns(this,a,b)},groupedFinalizerFn:function(a){var b=this;"undefined"!=typeof a.groupVal?(a.rendered=a.groupVal, +b.grid.options.groupingShowCounts&&"date"!==b.colDef.type&&(a.rendered+=" ("+a.value+")")):a.rendered=null},moveGroupColumns:function(a,b,c){return a.options.moveGroupColumns===!1?b:(b.forEach(function(a,b){a.groupingPosition=b}),b.sort(function(a,b){var c,d;return c=a.isRowHeader?-1e3:"undefined"==typeof a.grouping||"undefined"==typeof a.grouping.groupPriority||a.grouping.groupPriority<0?null:a.grouping.groupPriority,d=b.isRowHeader?-1e3:"undefined"==typeof b.grouping||"undefined"==typeof b.grouping.groupPriority||b.grouping.groupPriority<0?null:b.grouping.groupPriority,null!==c&&null===d?-1:null!==d&&null===c?1:null!==c&&null!==d?c-d:a.groupingPosition-b.groupingPosition}),b.forEach(function(a,b){delete a.groupingPosition}),b)},groupColumn:function(a,c){"undefined"==typeof c.grouping&&(c.grouping={});var d=j.getGrouping(a);c.grouping.groupPriority=d.grouping.length,c.sort?("undefined"==typeof c.sort.direction||null===c.sort.direction)&&(c.sort.direction=h.ASC):c.sort={direction:h.ASC},c.treeAggregation={type:b.aggregation.COUNT,source:"grouping"},c.treeAggregationFn=i.nativeAggregations()[b.aggregation.COUNT].aggregationFn,c.treeAggregationFinalizerFn=j.groupedFinalizerFn,a.api.grouping.raise.groupingChanged(c),a.api.core.raise.sortChanged(a,a.getColumnSorting()),a.queueGridRefresh()},ungroupColumn:function(a,b){"undefined"!=typeof b.grouping&&(delete b.grouping.groupPriority,delete b.treeAggregation,delete b.customTreeAggregationFinalizer,j.tidyPriorities(a),a.api.grouping.raise.groupingChanged(b),a.queueGridRefresh())},aggregateColumn:function(a,b,c){"undefined"!=typeof b.grouping&&"undefined"!=typeof b.grouping.groupPriority&&b.grouping.groupPriority>=0&&j.ungroupColumn(a,b);var d={};"undefined"!=typeof a.options.treeCustomAggregations[c]?d=a.options.treeCustomAggregations[c]:"undefined"!=typeof i.nativeAggregations()[c]&&(d=i.nativeAggregations()[c]),b.treeAggregation={type:c,label:g.get().aggregation[d.label]||d.label},b.treeAggregationFn=d.aggregationFn,b.treeAggregationFinalizerFn=d.finalizerFn,a.api.grouping.raise.aggregationChanged(b),a.queueGridRefresh()},setGrouping:function(a,b){"undefined"!=typeof b&&(j.clearGrouping(a),b.grouping&&b.grouping.length&&b.grouping.length>0&&b.grouping.forEach(function(b){var c=a.getColumn(b.colName);c&&j.groupColumn(a,c)}),b.aggregations&&b.aggregations.length&&b.aggregations.forEach(function(b){var c=a.getColumn(b.colName);c&&j.aggregateColumn(a,c,b.aggregation.type)}),b.rowExpandedStates&&j.applyRowExpandedStates(a.grouping.groupingHeaderCache,b.rowExpandedStates))},clearGrouping:function(a){var b=j.getGrouping(a);b.grouping.length>0&&b.grouping.forEach(function(b){b.col||(b.col=a.getColumn(b.colName)),j.ungroupColumn(a,b.col)}),b.aggregations.length>0&&b.aggregations.forEach(function(b){b.col||(b.col=a.getColumn(b.colName)),j.aggregateColumn(a,b.col,null)})},tidyPriorities:function(a){"undefined"!=typeof a&&"undefined"==typeof a.grid||"undefined"==typeof this.grid||(a=this.grid);var b=[],c=[];a.columns.forEach(function(a,d){"undefined"!=typeof a.grouping&&"undefined"!=typeof a.grouping.groupPriority&&a.grouping.groupPriority>=0?b.push(a):"undefined"!=typeof a.sort&&"undefined"!=typeof a.sort.priority&&a.sort.priority>=0&&c.push(a)}),b.sort(function(a,b){return a.grouping.groupPriority-b.grouping.groupPriority}),b.forEach(function(a,b){a.grouping.groupPriority=b,a.suppressRemoveSort=!0,"undefined"==typeof a.sort&&(a.sort={}),a.sort.priority=b});var d=b.length;c.sort(function(a,b){return a.sort.priority-b.sort.priority}),c.forEach(function(a,b){a.sort.priority=d,a.suppressRemoveSort=a.colDef.suppressRemoveSort,d++})},groupRows:function(a){if(0===a.length)return a;var b=this;b.grouping.oldGroupingHeaderCache=b.grouping.groupingHeaderCache||{},b.grouping.groupingHeaderCache={};for(var c=j.initialiseProcessingState(b),e=function(e,h){var i=b.getCellValue(g,e.col);e.initialised&&0===d.getSortFn(b,e.col,a)(i,e.currentValue)||(j.insertGroupHeader(b,a,f,c,h),f++)},f=0;f=0&&b.push({field:a.field,col:a,groupPriority:a.grouping.groupPriority,grouping:a.grouping}),a.treeAggregation&&a.treeAggregation.type&&c.push({field:a.field,col:a,aggregation:a.treeAggregation})}),b.sort(function(a,b){return a.groupPriority-b.groupPriority}),b.forEach(function(a,b){a.grouping.groupPriority=b,a.groupPriority=b,delete a.grouping}),{grouping:b,aggregations:c}},insertGroupHeader:function(a,b,c,d,g){var h=(d[g].fieldName,d[g].col),i=a.getCellValue(b[c],h),k=i;("undefined"==typeof i||null===i)&&(k=a.options.groupingNullLabel);for(var l=function(a){return angular.isObject(a)?JSON.stringify(a):a},m=a.grouping.oldGroupingHeaderCache,n=0;g>n;n++)m&&m[l(d[n].currentValue)]&&(m=m[l(d[n].currentValue)].children);var o;for(m&&m[l(i)]?(o=m[l(i)].row,o.entity={}):(o=new e({},null,a),f.rowTemplateAssigner.call(a,o)),o.entity["$$"+d[g].col.uid]={groupVal:k},o.treeLevel=g,o.groupHeader=!0,o.internalRow=!0,o.enableCellEdit=!1,o.enableSelection=a.options.enableGroupHeaderSelection,d[g].initialised=!0,d[g].currentValue=i,d[g].currentRow=o,j.finaliseProcessingState(d,g+1),b.splice(c,0,o),m=a.grouping.groupingHeaderCache,n=0;g>n;n++)m=m[l(d[n].currentValue)].children;m[l(i)]={row:o,children:{}}},finaliseProcessingState:function(a,b){for(var c=b;c 1 or < 1 file choosers within the menu item, error, cannot continue"):h[0].addEventListener("change",g,!1)}}}])}(),function(){"use strict";var a=angular.module("ui.grid.infiniteScroll",["ui.grid"]);a.service("uiGridInfiniteScrollService",["gridUtil","$compile","$timeout","uiGridConstants","ScrollEvent","$q",function(a,b,c,d,e,f){var g={initializeGrid:function(a,b){if(g.defaultGridOptions(a.options),a.options.enableInfiniteScroll){a.infiniteScroll={dataLoading:!1},g.setScrollDirections(a,a.options.infiniteScrollUp,a.options.infiniteScrollDown),a.api.core.on.scrollEnd(b,g.handleScroll);var c={events:{infiniteScroll:{needLoadMoreData:function(a,b){},needLoadMoreDataTop:function(a,b){}}},methods:{infiniteScroll:{dataLoaded:function(b,c){g.setScrollDirections(a,b,c);var d=g.adjustScroll(a).then(function(){a.infiniteScroll.dataLoading=!1});return d},resetScroll:function(b,c){return g.setScrollDirections(a,b,c),g.adjustInfiniteScrollPosition(a,0)},saveScrollPercentage:function(){a.infiniteScroll.prevScrollTop=a.renderContainers.body.prevScrollTop,a.infiniteScroll.previousVisibleRows=a.getVisibleRowCount()},dataRemovedTop:function(b,c){g.dataRemovedTop(a,b,c)},dataRemovedBottom:function(b,c){g.dataRemovedBottom(a,b,c)},setScrollDirections:function(b,c){g.setScrollDirections(a,b,c)}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)}},defaultGridOptions:function(a){a.enableInfiniteScroll=a.enableInfiniteScroll!==!1,a.infiniteScrollRowsFromEnd=a.infiniteScrollRowsFromEnd||20,a.infiniteScrollUp=a.infiniteScrollUp===!0,a.infiniteScrollDown=a.infiniteScrollDown!==!1},setScrollDirections:function(a,b,c){a.infiniteScroll.scrollUp=b===!0,a.suppressParentScrollUp=b===!0,a.infiniteScroll.scrollDown=c!==!1,a.suppressParentScrollDown=c!==!1},handleScroll:function(a){if(!(a.grid.infiniteScroll&&a.grid.infiniteScroll.dataLoading||"ui.grid.adjustInfiniteScrollPosition"===a.source)&&a.y){var b,c=a.grid.options.infiniteScrollRowsFromEnd/a.grid.renderContainers.body.visibleRowCache.length;a.grid.scrollDirection===d.scrollDirection.UP?(b=a.y.percentage,c>=b&&g.loadData(a.grid)):a.grid.scrollDirection===d.scrollDirection.DOWN&&(b=1-a.y.percentage,c>=b&&g.loadData(a.grid))}},loadData:function(a){a.infiniteScroll.previousVisibleRows=a.renderContainers.body.visibleRowCache.length,a.infiniteScroll.direction=a.scrollDirection,delete a.infiniteScroll.prevScrollTop,a.scrollDirection===d.scrollDirection.UP&&a.infiniteScroll.scrollUp?(a.infiniteScroll.dataLoading=!0,a.api.infiniteScroll.raise.needLoadMoreDataTop()):a.scrollDirection===d.scrollDirection.DOWN&&a.infiniteScroll.scrollDown&&(a.infiniteScroll.dataLoading=!0,a.api.infiniteScroll.raise.needLoadMoreData())},adjustScroll:function(a){var b=f.defer();return c(function(){var e,f,h,i,j;e=a.getViewportHeight()+a.headerHeight-a.renderContainers.body.headerHeight-a.scrollbarHeight,f=a.options.rowHeight,void 0===a.infiniteScroll.direction&&g.adjustInfiniteScrollPosition(a,0),h=a.getVisibleRowCount();var k=f*h;a.infiniteScroll.scrollDown&&e>k&&a.api.infiniteScroll.raise.needLoadMoreData(),a.infiniteScroll.direction===d.scrollDirection.UP&&(i=a.infiniteScroll.prevScrollTop||0,j=i+(h-a.infiniteScroll.previousVisibleRows)*f,g.adjustInfiniteScrollPosition(a,j),c(function(){b.resolve()})),a.infiniteScroll.direction===d.scrollDirection.DOWN&&(j=a.infiniteScroll.prevScrollTop||a.infiniteScroll.previousVisibleRows*f-e,g.adjustInfiniteScrollPosition(a,j),c(function(){b.resolve()}))},0),b.promise},adjustInfiniteScrollPosition:function(a,b){var c=new e(a,null,null,"ui.grid.adjustInfiniteScrollPosition"),d=a.getVisibleRowCount(),f=a.getViewportHeight()+a.headerHeight-a.renderContainers.body.headerHeight-a.scrollbarHeight,g=a.options.rowHeight,h=d*g-f;0===b&&a.infiniteScroll.scrollUp?c.y={percentage:1/h}:c.y={percentage:b/h},a.scrollContainers("",c)},dataRemovedTop:function(a,b,c){var d,e,f,h;return g.setScrollDirections(a,b,c),d=a.renderContainers.body.visibleRowCache.length,e=a.infiniteScroll.prevScrollTop,h=a.options.rowHeight,f=e-(a.infiniteScroll.previousVisibleRows-d)*h,g.adjustInfiniteScrollPosition(a,f)},dataRemovedBottom:function(a,b,c){var d;return g.setScrollDirections(a,b,c),d=a.infiniteScroll.prevScrollTop,g.adjustInfiniteScrollPosition(a,d)}};return g}]),a.directive("uiGridInfiniteScroll",["uiGridInfiniteScrollService",function(a){return{priority:-200,scope:!1,require:"^uiGrid",compile:function(b,c,d){return{pre:function(b,c,d,e){a.initializeGrid(e.grid,b)},post:function(a,b,c){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.moveColumns",["ui.grid"]);a.service("uiGridMoveColumnService",["$q","$timeout","$log","ScrollEvent","uiGridConstants","gridUtil",function(a,b,c,d,e,f){var g={initializeGrid:function(a){var b=this;this.registerPublicApi(a),this.defaultGridOptions(a.options),a.moveColumns={orderCache:[]},a.registerColumnBuilder(b.movableColumnBuilder),a.registerDataChangeCallback(b.verifyColumnOrder,[e.dataChange.COLUMN])},registerPublicApi:function(a){var b=this,c={events:{colMovable:{columnPositionChanged:function(a,b,c){}}},methods:{colMovable:{moveColumn:function(c,d){var e=a.columns;if(!angular.isNumber(c)||!angular.isNumber(d))return void f.logError("MoveColumn: Please provide valid values for originalPosition and finalPosition");for(var g=0,h=0;h=e.length-g||d>=e.length-g)return void f.logError("MoveColumn: Invalid values for originalPosition, finalPosition");var i=function(a){for(var b=a,c=0;b>=c;c++)angular.isDefined(e[c])&&(angular.isDefined(e[c].colDef.visible)&&e[c].colDef.visible===!1||e[c].isRowHeader===!0)&&b++;return b};b.redrawColumnAtPosition(a,i(c),i(d))}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.enableColumnMoving=a.enableColumnMoving!==!1},movableColumnBuilder:function(b,c,d){var e=[];return b.enableColumnMoving=void 0===b.enableColumnMoving?d.enableColumnMoving:b.enableColumnMoving,a.all(e)},updateColumnCache:function(a){a.moveColumns.orderCache=a.getOnlyDataColumns()},verifyColumnOrder:function(a){var b,c=a.rowHeaderColumns.length;angular.forEach(a.moveColumns.orderCache,function(d,e){if(b=a.columns.indexOf(d),-1!==b&&b-c!==e){var f=a.columns.splice(b,1)[0];a.columns.splice(e+c,0,f)}})},redrawColumnAtPosition:function(a,c,d){if(c!==d){var f=a.columns,h=f[c];if(h.colDef.enableColumnMoving){if(c>d)for(var i=c;i>d;i--)f[i]=f[i-1];else if(d>c)for(var j=c;d>j;j++)f[j]=f[j+1];f[d]=h,g.updateColumnCache(a),a.queueGridRefresh(),b(function(){a.api.core.notifyDataChange(e.dataChange.COLUMN),a.api.colMovable.raise.columnPositionChanged(h.colDef,c,d)})}}}};return g}]),a.directive("uiGridMoveColumns",["uiGridMoveColumnService",function(a){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(b,c,d,e){a.initializeGrid(e.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridHeaderCell",["$q","gridUtil","uiGridMoveColumnService","$document","$log","uiGridConstants","ScrollEvent",function(a,b,c,d,e,f,g){return{priority:-10,require:"^uiGrid",compile:function(){return{post:function(a,b,e,f){if(a.col.colDef.enableColumnMoving){var h,i,j,k,l,m,n=angular.element(b[0].querySelectorAll(".ui-grid-cell-contents")),o=!1,p=!1,q=function(b){h=a.grid.element[0].getBoundingClientRect().left,a.grid.hasLeftContainer()&&(h+=a.grid.renderContainers.left.header[0].getBoundingClientRect().width),i=b.pageX,j=0,k=h+a.grid.getViewportWidth(),"mousedown"===b.type?(d.on("mousemove",r),d.on("mouseup",s)):"touchstart"===b.type&&(d.on("touchmove",r),d.on("touchend",s))},r=function(a){var b=a.pageX-i;0!==b&&(document.onselectstart=function(){return!1},p=!0,o?o&&(w(b),i=a.pageX):v())},s=function(b){if(document.onselectstart=null,l&&(l.remove(),o=!1),u(),t(),p){for(var d=a.grid.columns,e=0,f=0;fj){var h,i=0;if(a.grid.isRTL()){for(h=e+1;hMath.abs(j))){c.redrawColumnAtPosition(a.grid,e,h-1);break}}else for(h=e-1;h>=0;h--)if((angular.isUndefined(d[h].colDef.visible)||d[h].colDef.visible===!0)&&(i+=d[h].drawnWidth||d[h].width||d[h].colDef.width,i>Math.abs(j))){c.redrawColumnAtPosition(a.grid,e,h+1);break}i0){var k,m=0;if(a.grid.isRTL()){for(k=e-1;k>0;k--)if((angular.isUndefined(d[k].colDef.visible)||d[k].colDef.visible===!0)&&(m+=d[k].drawnWidth||d[k].width||d[k].colDef.width,m>j)){c.redrawColumnAtPosition(a.grid,e,k);break}}else for(k=e+1;kj)){c.redrawColumnAtPosition(a.grid,e,k-1);break}j>m&&(g=d.length-1,a.grid.isRTL()&&(g=0),c.redrawColumnAtPosition(a.grid,e,g))}}},t=function(){n.on("touchstart",q),n.on("mousedown",q)},u=function(){n.off("touchstart",q),n.off("mousedown",q),d.off("mousemove",r),d.off("touchmove",r),d.off("mouseup",s),d.off("touchend",s)};t();var v=function(){o=!0,l=b.clone(),b.parent().append(l),l.addClass("movingColumn");var c={};c.left=b[0].offsetLeft+"px";var d=a.grid.element[0].getBoundingClientRect().right,e=b[0].getBoundingClientRect().right;e>d&&(m=a.col.drawnWidth+(d-e),c.width=m+"px"),l.css(c)},w=function(b){for(var c=a.grid.columns,d=0,e=0;ei?i:k,(n>=h||b>0)&&(k>=o||0>b))l.css({visibility:"visible",left:l[0].offsetLeft+(k>i?b:k-n)+"px"});else if(d>Math.ceil(f.grid.gridWidth)){b*=8;var p=new g(a.col.grid,null,null,"uiGridHeaderCell.moveElement");p.x={pixels:b},p.grid.scrollContainers("",p)}for(var q=0,r=0;r0?a.options.paginationCurrentPage=Math.min(a.options.paginationCurrentPage+1,c.methods.pagination.getTotalPages()):a.options.paginationCurrentPage++)},previousPage:function(){a.options.enablePagination&&(a.options.paginationCurrentPage=Math.max(a.options.paginationCurrentPage-1,1))},seek:function(b){if(a.options.enablePagination){if(!angular.isNumber(b)||1>b)throw"Invalid page number: "+b;a.options.paginationCurrentPage=Math.min(b,c.methods.pagination.getTotalPages())}}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods);var d=function(b){if(a.options.useExternalPagination||!a.options.enablePagination)return b;var c=parseInt(a.options.paginationPageSize,10),d=parseInt(a.options.paginationCurrentPage,10),e=b.filter(function(a){return a.visible});a.options.totalItems=e.length;var f=(d-1)*c;return f>e.length&&(d=a.options.paginationCurrentPage=1,f=(d-1)*c),e.slice(f,f+c)};a.registerRowsProcessor(d,900)},defaultGridOptions:function(b){b.enablePagination=b.enablePagination!==!1,b.enablePaginationControls=b.enablePaginationControls!==!1,b.useExternalPagination=b.useExternalPagination===!0,a.isNullOrUndefined(b.totalItems)&&(b.totalItems=0),a.isNullOrUndefined(b.paginationPageSizes)&&(b.paginationPageSizes=[250,500,1e3]),a.isNullOrUndefined(b.paginationPageSize)&&(b.paginationPageSizes.length>0?b.paginationPageSize=b.paginationPageSizes[0]:b.paginationPageSize=0),a.isNullOrUndefined(b.paginationCurrentPage)&&(b.paginationCurrentPage=1),a.isNullOrUndefined(b.paginationTemplate)&&(b.paginationTemplate="ui-grid/pagination")},onPaginationChanged:function(a,b,c){a.api.pagination.raise.paginationChanged(b,c),a.options.useExternalPagination||a.queueGridRefresh()}};return b}]),a.directive("uiGridPagination",["gridUtil","uiGridPaginationService",function(a,b){return{priority:-200,scope:!1,require:"uiGrid",link:{pre:function(c,d,e,f){b.initializeGrid(f.grid),a.getTemplate(f.grid.options.paginationTemplate).then(function(a){var b=angular.element(a);d.append(b),f.innerCompile(b)})}}}}]),a.directive("uiGridPager",["uiGridPaginationService","uiGridConstants","gridUtil","i18nService",function(a,b,c,d){return{priority:-200,scope:!0,require:"^uiGrid",link:function(e,f,g,h){var i=".ui-grid-pager-control-input";e.aria=d.getSafeText("pagination.aria"),e.paginationApi=h.grid.api.pagination,e.sizesLabel=d.getSafeText("pagination.sizes"),e.totalItemsLabel=d.getSafeText("pagination.totalItems"),e.paginationOf=d.getSafeText("pagination.of"),e.paginationThrough=d.getSafeText("pagination.through");var j=h.grid.options;h.grid.renderContainers.body.registerViewportAdjuster(function(a){return a.height=a.height-c.elementHeight(f,"padding"),a});var k=h.grid.registerDataChangeCallback(function(a){a.options.useExternalPagination||(a.options.totalItems=a.rows.length)},[b.dataChange.ROW]);e.$on("$destroy",k);var l=function(){e.showingLow=(j.paginationCurrentPage-1)*j.paginationPageSize+1,e.showingHigh=Math.min(j.paginationCurrentPage*j.paginationPageSize,j.totalItems)},m=e.$watch("grid.options.totalItems + grid.options.paginationPageSize",l),n=e.$watch("grid.options.paginationCurrentPage + grid.options.paginationPageSize",function(b,c){if(b!==c&&void 0!==c){if(!angular.isNumber(j.paginationCurrentPage)||j.paginationCurrentPage<1)return void(j.paginationCurrentPage=1);if(j.totalItems>0&&j.paginationCurrentPage>e.paginationApi.getTotalPages())return void(j.paginationCurrentPage=e.paginationApi.getTotalPages());l(),a.onPaginationChanged(e.grid,j.paginationCurrentPage,j.paginationPageSize)}});e.$on("$destroy",function(){m(),n()}),e.cantPageForward=function(){return j.totalItems>0?j.paginationCurrentPage>=e.paginationApi.getTotalPages():j.data.length<1},e.cantPageToLast=function(){return j.totalItems>0?e.cantPageForward():!0},e.cantPageBackward=function(){return j.paginationCurrentPage<=1};var o=function(a){a&&c.focus.bySelector(f,i)};e.pageFirstPageClick=function(){e.paginationApi.seek(1),o(e.cantPageBackward())},e.pagePreviousPageClick=function(){e.paginationApi.previousPage(),o(e.cantPageBackward())},e.pageNextPageClick=function(){e.paginationApi.nextPage(),o(e.cantPageForward())},e.pageLastPageClick=function(){e.paginationApi.seek(e.paginationApi.getTotalPages()),o(e.cantPageToLast())}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.pinning",["ui.grid"]);a.constant("uiGridPinningConstants",{container:{LEFT:"left",RIGHT:"right",NONE:""}}),a.service("uiGridPinningService",["gridUtil","GridRenderContainer","i18nService","uiGridPinningConstants",function(a,b,c,d){var e={initializeGrid:function(a){e.defaultGridOptions(a.options),a.registerColumnBuilder(e.pinningColumnBuilder);var b={events:{pinning:{columnPinned:function(a,b){}}},methods:{pinning:{pinColumn:function(b,c){e.pinColumn(a,b,c)}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},defaultGridOptions:function(a){a.enablePinning=a.enablePinning!==!1},pinningColumnBuilder:function(b,f,g){if(b.enablePinning=void 0===b.enablePinning?g.enablePinning:b.enablePinning,b.pinnedLeft?(f.renderContainer="left",f.grid.createLeftContainer()):b.pinnedRight&&(f.renderContainer="right",f.grid.createRightContainer()),b.enablePinning){var h={name:"ui.grid.pinning.pinLeft",title:c.get().pinning.pinLeft,icon:"ui-grid-icon-left-open",shown:function(){return"undefined"==typeof this.context.col.renderContainer||!this.context.col.renderContainer||"left"!==this.context.col.renderContainer},action:function(){e.pinColumn(this.context.col.grid,this.context.col,d.container.LEFT)}},i={name:"ui.grid.pinning.pinRight",title:c.get().pinning.pinRight,icon:"ui-grid-icon-right-open",shown:function(){return"undefined"==typeof this.context.col.renderContainer||!this.context.col.renderContainer||"right"!==this.context.col.renderContainer},action:function(){e.pinColumn(this.context.col.grid,this.context.col,d.container.RIGHT)}},j={name:"ui.grid.pinning.unpin",title:c.get().pinning.unpin,icon:"ui-grid-icon-cancel",shown:function(){return"undefined"!=typeof this.context.col.renderContainer&&null!==this.context.col.renderContainer&&"body"!==this.context.col.renderContainer},action:function(){e.pinColumn(this.context.col.grid,this.context.col,d.container.NONE)}};a.arrayContainsObjectWithProperty(f.menuItems,"name","ui.grid.pinning.pinLeft")||f.menuItems.push(h),a.arrayContainsObjectWithProperty(f.menuItems,"name","ui.grid.pinning.pinRight")||f.menuItems.push(i),a.arrayContainsObjectWithProperty(f.menuItems,"name","ui.grid.pinning.unpin")||f.menuItems.push(j)}},pinColumn:function(a,b,c){c===d.container.NONE?(b.renderContainer=null,b.colDef.pinnedLeft=b.colDef.pinnedRight=!1):(b.renderContainer=c,c===d.container.LEFT?a.createLeftContainer():c===d.container.RIGHT&&a.createRightContainer()),a.refresh().then(function(){a.api.pinning.raise.columnPinned(b.colDef,c)})}};return e}]),a.directive("uiGridPinning",["gridUtil","uiGridPinningService",function(a,b){return{require:"uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(e.grid)},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.resizeColumns",["ui.grid"]);a.service("uiGridResizeColumnsService",["gridUtil","$q","$timeout",function(a,b,c){var d={defaultGridOptions:function(a){a.enableColumnResizing=a.enableColumnResizing!==!1,a.enableColumnResize===!1&&(a.enableColumnResizing=!1)},colResizerColumnBuilder:function(a,c,d){var e=[];return a.enableColumnResizing=void 0===a.enableColumnResizing?d.enableColumnResizing:a.enableColumnResizing,a.enableColumnResize===!1&&(a.enableColumnResizing=!1),b.all(e)},registerPublicApi:function(a){var b={events:{colResizable:{columnSizeChanged:function(a,b){}}}};a.api.registerEventsFromObject(b.events)},fireColumnSizeChanged:function(b,d,e){c(function(){b.api.colResizable?b.api.colResizable.raise.columnSizeChanged(d,e):a.logError("The resizeable api is not registered, this may indicate that you've included the module but not added the 'ui-grid-resize-columns' directive to your grid definition. Cannot raise any events.")})},findTargetCol:function(a,b,c){var d=a.getRenderContainer();if("left"===b){var e=d.visibleColumnCache.indexOf(a);return d.visibleColumnCache[e-1*c]}return a}};return d}]),a.directive("uiGridResizeColumns",["gridUtil","uiGridResizeColumnsService",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.defaultGridOptions(e.grid.options),e.grid.registerColumnBuilder(b.colResizerColumnBuilder),b.registerPublicApi(e.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridHeaderCell",["gridUtil","$templateCache","$compile","$q","uiGridResizeColumnsService","uiGridConstants","$timeout",function(a,b,c,d,e,f,g){return{priority:-10,require:"^uiGrid",compile:function(){return{post:function(a,d,h,i){ +var j=i.grid;if(j.options.enableColumnResizing){var k=b.get("ui-grid/columnResizer"),l=1;j.isRTL()&&(a.position="left",l=-1);var m=function(){for(var b=d[0].getElementsByClassName("ui-grid-column-resizer"),f=0;f
        '),f={priority:0,scope:{col:"=",position:"@",renderIndex:"="},require:"?^uiGrid",link:function(f,g,h,i){function j(a){i.grid.refreshCanvas(!0).then(function(){i.grid.queueGridRefresh()})}function k(a,b){var c=b;return a.minWidth&&ca.maxWidth&&(c=a.maxWidth),c}function l(a,b){a.originalEvent&&(a=a.originalEvent),a.preventDefault(),o=(a.targetTouches?a.targetTouches[0]:a).clientX-p,0>o?o=0:o>i.grid.gridWidth&&(o=i.grid.gridWidth);var g=d.findTargetCol(f.col,f.position,q);if(g.colDef.enableColumnResizing!==!1){i.grid.element.hasClass("column-resizing")||i.grid.element.addClass("column-resizing");var h=o-n,j=parseInt(g.drawnWidth+h*q,10);o+=(k(g,j)-j)*q,e.css({left:o+"px"}),i.fireEvent(c.events.ITEM_DRAGGING)}}function m(a,b){a.originalEvent&&(a=a.originalEvent),a.preventDefault(),i.grid.element.removeClass("column-resizing"),e.remove(),o=(a.changedTouches?a.changedTouches[0]:a).clientX-p;var c=o-n;if(0===c)return t(),void s();var g=d.findTargetCol(f.col,f.position,q);if(g.colDef.enableColumnResizing!==!1){var h=parseInt(g.drawnWidth+c*q,10);g.width=k(g,h),g.hasCustomWidth=!0,j(c),d.fireColumnSizeChanged(i.grid,g.colDef,c),t(),s()}}var n=0,o=0,p=0,q=1;i.grid.isRTL()&&(f.position="left",q=-1),"left"===f.position?g.addClass("left"):"right"===f.position&&g.addClass("right");var r=function(b,c){b.originalEvent&&(b=b.originalEvent),b.stopPropagation(),p=i.grid.element[0].getBoundingClientRect().left,n=(b.targetTouches?b.targetTouches[0]:b).clientX-p,i.grid.element.append(e),e.css({left:n}),"touchstart"===b.type?(a.on("touchend",m),a.on("touchmove",l),g.off("mousedown",r)):(a.on("mouseup",m),a.on("mousemove",l),g.off("touchstart",r))},s=function(){g.on("mousedown",r),g.on("touchstart",r)},t=function(){a.off("mouseup",m),a.off("touchend",m),a.off("mousemove",l),a.off("touchmove",l),g.off("mousedown",r),g.off("touchstart",r)};s();var u=function(a,e){a.stopPropagation();var h=d.findTargetCol(f.col,f.position,q);if(h.colDef.enableColumnResizing!==!1){var l=0,m=0,n=b.closestElm(g,".ui-grid-render-container"),o=n.querySelectorAll("."+c.COL_CLASS_PREFIX+h.uid+" .ui-grid-cell-contents");Array.prototype.forEach.call(o,function(a){var c;angular.element(a).parent().hasClass("ui-grid-header-cell")&&(c=angular.element(a).parent()[0].querySelectorAll(".ui-grid-column-menu-button")),b.fakeElement(a,{},function(a){var d=angular.element(a);d.attr("style","float: left");var e=b.elementWidth(d);if(c){var f=b.elementWidth(c);e+=f}e>l&&(l=e,m=l-e)})}),h.width=k(h,l),h.hasCustomWidth=!0,j(m),d.fireColumnSizeChanged(i.grid,h.colDef,m)}};g.on("dblclick",u),g.on("$destroy",function(){g.off("dblclick",u),t()})}};return f}])}(),function(){"use strict";var a=angular.module("ui.grid.rowEdit",["ui.grid","ui.grid.edit","ui.grid.cellNav"]);a.constant("uiGridRowEditConstants",{}),a.service("uiGridRowEditService",["$interval","$q","uiGridConstants","uiGridRowEditConstants","gridUtil",function(a,b,c,d,e){var f={initializeGrid:function(a,b){b.rowEdit={};var c={events:{rowEdit:{saveRow:function(a){}}},methods:{rowEdit:{setSavePromise:function(a,c){f.setSavePromise(b,a,c)},getDirtyRows:function(){return b.rowEdit.dirtyRows?b.rowEdit.dirtyRows:[]},getErrorRows:function(){return b.rowEdit.errorRows?b.rowEdit.errorRows:[]},flushDirtyRows:function(){return f.flushDirtyRows(b)},setRowsDirty:function(a){f.setRowsDirty(b,a)},setRowsClean:function(a){f.setRowsClean(b,a)}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods),b.api.core.on.renderingComplete(a,function(c){b.api.edit.on.afterCellEdit(a,f.endEditCell),b.api.edit.on.beginCellEdit(a,f.beginEditCell),b.api.edit.on.cancelCellEdit(a,f.cancelEditCell),b.api.cellNav&&b.api.cellNav.on.navigate(a,f.navigate)})},defaultGridOptions:function(a){},saveRow:function(a,b){var c=this;return function(){if(b.isSaving=!0,b.rowEditSavePromise)return b.rowEditSavePromise;var d=a.api.rowEdit.raise.saveRow(b.entity);return b.rowEditSavePromise?b.rowEditSavePromise.then(c.processSuccessPromise(a,b),c.processErrorPromise(a,b)):e.logError("A promise was not returned when saveRow event was raised, either nobody is listening to event, or event handler did not return a promise"),d}},setSavePromise:function(a,b,c){var d=a.getRow(b);d.rowEditSavePromise=c},processSuccessPromise:function(a,b){var c=this;return function(){delete b.isSaving,delete b.isDirty,delete b.isError,delete b.rowEditSaveTimer,delete b.rowEditSavePromise,c.removeRow(a.rowEdit.errorRows,b),c.removeRow(a.rowEdit.dirtyRows,b)}},processErrorPromise:function(a,b){return function(){delete b.isSaving,delete b.rowEditSaveTimer,delete b.rowEditSavePromise,b.isError=!0,a.rowEdit.errorRows||(a.rowEdit.errorRows=[]),f.isRowPresent(a.rowEdit.errorRows,b)||a.rowEdit.errorRows.push(b)}},removeRow:function(a,b){"undefined"!=typeof a&&null!==a&&a.forEach(function(c,d){c.uid===b.uid&&a.splice(d,1)})},isRowPresent:function(a,b){var c=!1;return a.forEach(function(a,d){a.uid===b.uid&&(c=!0)}),c},flushDirtyRows:function(a){var c=[];return a.api.rowEdit.getDirtyRows().forEach(function(b){f.saveRow(a,b)(),c.push(b.rowEditSavePromise)}),b.all(c)},endEditCell:function(a,b,c,d){var g=this.grid,h=g.getRow(a);return h?void((c!==d||h.isDirty)&&(g.rowEdit.dirtyRows||(g.rowEdit.dirtyRows=[]),h.isDirty||(h.isDirty=!0,g.rowEdit.dirtyRows.push(h)),delete h.isError,f.considerSetTimer(g,h))):void e.logError("Unable to find rowEntity in grid data, dirty flag cannot be set")},beginEditCell:function(a,b){var c=this.grid,d=c.getRow(a);return d?void f.cancelTimer(c,d):void e.logError("Unable to find rowEntity in grid data, timer cannot be cancelled")},cancelEditCell:function(a,b){var c=this.grid,d=c.getRow(a);return d?void f.considerSetTimer(c,d):void e.logError("Unable to find rowEntity in grid data, timer cannot be set")},navigate:function(a,b){var c=this.grid;a.row.rowEditSaveTimer&&f.cancelTimer(c,a.row),b&&b.row&&b.row!==a.row&&f.considerSetTimer(c,b.row)},considerSetTimer:function(b,c){if(f.cancelTimer(b,c),c.isDirty&&!c.isSaving&&-1!==b.options.rowEditWaitInterval){var d=b.options.rowEditWaitInterval?b.options.rowEditWaitInterval:2e3;c.rowEditSaveTimer=a(f.saveRow(b,c),d,1)}},cancelTimer:function(b,c){c.rowEditSaveTimer&&!c.isSaving&&(a.cancel(c.rowEditSaveTimer),delete c.rowEditSaveTimer)},setRowsDirty:function(a,b){var c;b.forEach(function(b,d){c=a.getRow(b),c?(a.rowEdit.dirtyRows||(a.rowEdit.dirtyRows=[]),c.isDirty||(c.isDirty=!0,a.rowEdit.dirtyRows.push(c)),delete c.isError,f.considerSetTimer(a,c)):e.logError("requested row not found in rowEdit.setRowsDirty, row was: "+b)})},setRowsClean:function(a,b){var c;b.forEach(function(b,d){c=a.getRow(b),c?(delete c.isDirty,f.removeRow(a.rowEdit.dirtyRows,c),f.cancelTimer(a,c),delete c.isError,f.removeRow(a.rowEdit.errorRows,c)):e.logError("requested row not found in rowEdit.setRowsClean, row was: "+b)})}};return f}]),a.directive("uiGridRowEdit",["gridUtil","uiGridRowEditService","uiGridEditConstants",function(a,b,c){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(a,e.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","gridUtil","$parse",function(a,b,c,d){return{priority:-200,scope:!1,compile:function(a,b){var c=angular.element(a.children().children()[0]),d=c.attr("ng-class"),e="";return e=d?d.slice(0,-1)+", 'ui-grid-row-dirty': row.isDirty, 'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}":"{'ui-grid-row-dirty': row.isDirty, 'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}",c.attr("ng-class",e),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.saveState",["ui.grid","ui.grid.selection","ui.grid.cellNav","ui.grid.grouping","ui.grid.pinning","ui.grid.treeView"]);a.constant("uiGridSaveStateConstants",{featureName:"saveState"}),a.service("uiGridSaveStateService",["$q","uiGridSaveStateConstants","gridUtil","$compile","$interval","uiGridConstants",function(a,b,c,d,e,f){var g={initializeGrid:function(a){a.saveState={},this.defaultGridOptions(a.options);var b={events:{saveState:{}},methods:{saveState:{save:function(){return g.save(a)},restore:function(b,c){g.restore(a,b,c)}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},defaultGridOptions:function(a){a.saveWidths=a.saveWidths!==!1,a.saveOrder=a.saveOrder!==!1,a.saveScroll=a.saveScroll===!0,a.saveFocus=a.saveScroll!==!0&&a.saveFocus!==!1,a.saveVisible=a.saveVisible!==!1,a.saveSort=a.saveSort!==!1,a.saveFilter=a.saveFilter!==!1,a.saveSelection=a.saveSelection!==!1,a.saveGrouping=a.saveGrouping!==!1,a.saveGroupingExpandedStates=a.saveGroupingExpandedStates===!0,a.savePinning=a.savePinning!==!1,a.saveTreeView=a.saveTreeView!==!1},save:function(a){var b={};return b.columns=g.saveColumns(a),b.scrollFocus=g.saveScrollFocus(a),b.selection=g.saveSelection(a),b.grouping=g.saveGrouping(a),b.treeView=g.saveTreeView(a),b.pagination=g.savePagination(a),b},restore:function(a,b,c){c.columns&&g.restoreColumns(a,c.columns),c.scrollFocus&&g.restoreScrollFocus(a,b,c.scrollFocus),c.selection&&g.restoreSelection(a,c.selection),c.grouping&&g.restoreGrouping(a,c.grouping),c.treeView&&g.restoreTreeView(a,c.treeView),c.pagination&&g.restorePagination(a,c.pagination),a.refresh()},saveColumns:function(a){var b=[];return a.getOnlyDataColumns().forEach(function(c){var d={};d.name=c.name,a.options.saveVisible&&(d.visible=c.visible),a.options.saveWidths&&(d.width=c.width),a.options.saveSort&&(d.sort=angular.copy(c.sort)),a.options.saveFilter&&(d.filters=[],c.filters.forEach(function(a){var b={};angular.forEach(a,function(a,c){"condition"!==c&&"$$hashKey"!==c&&"placeholder"!==c&&(b[c]=a)}),d.filters.push(b)})),a.api.pinning&&a.options.savePinning&&(d.pinned=c.renderContainer?c.renderContainer:""),b.push(d)}),b},saveScrollFocus:function(a){if(!a.api.cellNav)return{};var b={};if(a.options.saveFocus){b.focus=!0;var c=a.api.cellNav.getFocusedCell();null!==c&&(null!==c.col&&(b.colName=c.col.colDef.name),null!==c.row&&(b.rowVal=g.getRowVal(a,c.row)))}return(a.options.saveScroll||a.options.saveFocus&&!b.colName&&!b.rowVal)&&(b.focus=!1,a.renderContainers.body.prevRowScrollIndex&&(b.rowVal=g.getRowVal(a,a.renderContainers.body.visibleRowCache[a.renderContainers.body.prevRowScrollIndex])),a.renderContainers.body.prevColScrollIndex&&(b.colName=a.renderContainers.body.visibleColumnCache[a.renderContainers.body.prevColScrollIndex].name)),b},saveSelection:function(a){if(!a.api.selection||!a.options.saveSelection)return[];var b=a.api.selection.getSelectedGridRows().map(function(b){return g.getRowVal(a,b)});return b},saveGrouping:function(a){return a.api.grouping&&a.options.saveGrouping?a.api.grouping.getGrouping(a.options.saveGroupingExpandedStates):{}},savePagination:function(a){return a.api.pagination&&a.options.paginationPageSize?{paginationCurrentPage:a.options.paginationCurrentPage,paginationPageSize:a.options.paginationPageSize}:{}},saveTreeView:function(a){return a.api.treeView&&a.options.saveTreeView?a.api.treeView.getTreeView():{}},getRowVal:function(a,b){if(!b)return null;var c={};return a.options.saveRowIdentity?(c.identity=!0,c.row=a.options.saveRowIdentity(b.entity)):(c.identity=!1,c.row=a.renderContainers.body.visibleRowCache.indexOf(b)),c},restoreColumns:function(a,b){var c=!1;b.forEach(function(b,d){var e=a.getColumn(b.name);if(e&&!a.isRowHeaderColumn(e)){!a.options.saveVisible||e.visible===b.visible&&e.colDef.visible===b.visible||(e.visible=b.visible,e.colDef.visible=b.visible,a.api.core.raise.columnVisibilityChanged(e)),a.options.saveWidths&&e.width!==b.width&&(e.width=b.width,e.hasCustomWidth=!0),!a.options.saveSort||angular.equals(e.sort,b.sort)||void 0===e.sort&&angular.isEmpty(b.sort)||(e.sort=angular.copy(b.sort),c=!0),a.options.saveFilter&&!angular.equals(e.filters,b.filters)&&(b.filters.forEach(function(a,b){angular.extend(e.filters[b],a),("undefined"==typeof a.term||null===a.term)&&delete e.filters[b].term}),a.api.core.raise.filterChanged()),a.api.pinning&&a.options.savePinning&&e.renderContainer!==b.pinned&&a.api.pinning.pinColumn(e,b.pinned);var f=a.getOnlyDataColumns().indexOf(e);if(-1!==f&&a.options.saveOrder&&f!==d){var g=a.columns.splice(f+a.rowHeaderColumns.length,1)[0];a.columns.splice(d+a.rowHeaderColumns.length,0,g)}}}),c&&a.api.core.raise.sortChanged(a,a.getColumnSorting())},restoreScrollFocus:function(a,b,c){if(a.api.cellNav){var d,e;if(c.colName){var f=a.options.columnDefs.filter(function(a){return a.name===c.colName});f.length>0&&(d=f[0])}c.rowVal&&c.rowVal.row&&(e=c.rowVal.identity?g.findRowByIdentity(a,c.rowVal):a.renderContainers.body.visibleRowCache[c.rowVal.row]);var h=e&&e.entity?e.entity:null;(d||h)&&(c.focus?a.api.cellNav.scrollToFocus(h,d):a.scrollTo(h,d))}},restoreSelection:function(a,b){a.api.selection&&(a.api.selection.clearSelectedRows(),b.forEach(function(b){if(b.identity){var c=g.findRowByIdentity(a,b);c&&a.api.selection.selectRow(c.entity)}else a.api.selection.selectRowByVisibleIndex(b.row)}))},restoreGrouping:function(a,b){a.api.grouping&&"undefined"!=typeof b&&null!==b&&!angular.equals(b,{})&&a.api.grouping.setGrouping(b)},restoreTreeView:function(a,b){a.api.treeView&&"undefined"!=typeof b&&null!==b&&!angular.equals(b,{})&&a.api.treeView.setTreeView(b)},restorePagination:function(a,b){a.api.pagination&&a.options.paginationPageSize&&(a.options.paginationCurrentPage=b.paginationCurrentPage,a.options.paginationPageSize=b.paginationPageSize)},findRowByIdentity:function(a,b){if(!a.options.saveRowIdentity)return null;var c=a.rows.filter(function(c){return a.options.saveRowIdentity(c.entity)===b.row?!0:!1});return c.length>0?c[0]:null}};return g}]),a.directive("uiGridSaveState",["uiGridSaveStateConstants","uiGridSaveStateService","gridUtil","$compile",function(a,b,c,d){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,link:function(a,c,d,e){b.initializeGrid(e.grid)}}}])}(),function(){"use strict";var a=angular.module("ui.grid.selection",["ui.grid"]);a.constant("uiGridSelectionConstants",{featureName:"selection",selectionRowHeaderColName:"selectionRowHeaderCol"}),angular.module("ui.grid").config(["$provide",function(a){a.decorator("GridRow",["$delegate",function(a){return a.prototype.setSelected=function(a){this.isSelected=a,a?this.grid.selection.selectedCount++:this.grid.selection.selectedCount--},a}])}]),a.service("uiGridSelectionService",["$q","$templateCache","uiGridSelectionConstants","gridUtil",function(a,b,c,d){var e={initializeGrid:function(a){a.selection={},a.selection.lastSelectedRow=null,a.selection.selectAll=!1,a.selection.selectedCount=0,e.defaultGridOptions(a.options);var b={events:{selection:{rowSelectionChanged:function(a,b,c){},rowSelectionChangedBatch:function(a,b,c){}}},methods:{selection:{toggleRowSelection:function(b,c){var d=a.getRow(b);null!==d&&e.toggleRowSelection(a,d,c,a.options.multiSelect,a.options.noUnselect)},selectRow:function(b,c){var d=a.getRow(b);null===d||d.isSelected||e.toggleRowSelection(a,d,c,a.options.multiSelect,a.options.noUnselect)},selectRowByVisibleIndex:function(b,c){var d=a.renderContainers.body.visibleRowCache[b];null===d||"undefined"==typeof d||d.isSelected||e.toggleRowSelection(a,d,c,a.options.multiSelect,a.options.noUnselect)},unSelectRow:function(b,c){var d=a.getRow(b);null!==d&&d.isSelected&&e.toggleRowSelection(a,d,c,a.options.multiSelect,a.options.noUnselect)},selectAllRows:function(b){if(a.options.multiSelect!==!1){var c=[];a.rows.forEach(function(d){d.isSelected||d.enableSelection===!1||(d.setSelected(!0),e.decideRaiseSelectionEvent(a,d,c,b))}),e.decideRaiseSelectionBatchEvent(a,c,b),a.selection.selectAll=!0}},selectAllVisibleRows:function(b){if(a.options.multiSelect!==!1){var c=[];a.rows.forEach(function(d){d.visible?d.isSelected||d.enableSelection===!1||(d.setSelected(!0),e.decideRaiseSelectionEvent(a,d,c,b)):d.isSelected&&(d.setSelected(!1),e.decideRaiseSelectionEvent(a,d,c,b))}),e.decideRaiseSelectionBatchEvent(a,c,b),a.selection.selectAll=!0}},clearSelectedRows:function(b){e.clearSelectedRows(a,b)},getSelectedRows:function(){return e.getSelectedRows(a).map(function(a){return a.entity})},getSelectedGridRows:function(){return e.getSelectedRows(a)},getSelectedCount:function(){return a.selection.selectedCount},setMultiSelect:function(b){a.options.multiSelect=b},setModifierKeysToMultiSelect:function(b){a.options.modifierKeysToMultiSelect=b},getSelectAllState:function(){return a.selection.selectAll}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},defaultGridOptions:function(a){a.enableRowSelection=a.enableRowSelection!==!1,a.multiSelect=a.multiSelect!==!1,a.noUnselect=a.noUnselect===!0,a.modifierKeysToMultiSelect=a.modifierKeysToMultiSelect===!0,a.enableRowHeaderSelection=a.enableRowHeaderSelection!==!1,"undefined"==typeof a.enableFullRowSelection&&(a.enableFullRowSelection=!a.enableRowHeaderSelection),a.enableSelectAll=a.enableSelectAll!==!1,a.enableSelectionBatchEvent=a.enableSelectionBatchEvent!==!1,a.selectionRowHeaderWidth=angular.isDefined(a.selectionRowHeaderWidth)?a.selectionRowHeaderWidth:30,a.enableFooterTotalSelected=a.enableFooterTotalSelected!==!1,a.isRowSelectable=angular.isDefined(a.isRowSelectable)?a.isRowSelectable:angular.noop},toggleRowSelection:function(a,b,c,d,f){var g=b.isSelected;if(b.enableSelection!==!1||g){var h;d||g?!d&&g&&(h=e.getSelectedRows(a),h.length>1&&(g=!1,e.clearSelectedRows(a,c))):e.clearSelectedRows(a,c),g&&f||(b.setSelected(!g),b.isSelected===!0&&(a.selection.lastSelectedRow=b),h=e.getSelectedRows(a),a.selection.selectAll=a.rows.length===h.length,a.api.selection.raise.rowSelectionChanged(b,c))}},shiftSelect:function(a,b,c,d){if(d){var f=e.getSelectedRows(a),g=f.length>0?a.renderContainers.body.visibleRowCache.indexOf(a.selection.lastSelectedRow):0,h=a.renderContainers.body.visibleRowCache.indexOf(b);if(g>h){var i=g;g=h,h=i}for(var j=[],k=g;h>=k;k++){var l=a.renderContainers.body.visibleRowCache[k];l&&(l.isSelected||l.enableSelection===!1||(l.setSelected(!0),a.selection.lastSelectedRow=l,e.decideRaiseSelectionEvent(a,l,j,c)))}e.decideRaiseSelectionBatchEvent(a,j,c)}},getSelectedRows:function(a){return a.rows.filter(function(a){return a.isSelected})},clearSelectedRows:function(a,b){var c=[];e.getSelectedRows(a).forEach(function(d){d.isSelected&&(d.setSelected(!1),e.decideRaiseSelectionEvent(a,d,c,b))}),e.decideRaiseSelectionBatchEvent(a,c,b),a.selection.selectAll=!1,a.selection.selectedCount=0},decideRaiseSelectionEvent:function(a,b,c,d){a.options.enableSelectionBatchEvent?c.push(b):a.api.selection.raise.rowSelectionChanged(b,d)},decideRaiseSelectionBatchEvent:function(a,b,c){b.length>0&&a.api.selection.raise.rowSelectionChangedBatch(b,c)}};return e}]),a.directive("uiGridSelection",["uiGridSelectionConstants","uiGridSelectionService","$templateCache","uiGridConstants",function(a,b,c,d){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(c,e,f,g){if(b.initializeGrid(g.grid),g.grid.options.enableRowHeaderSelection){var h={name:a.selectionRowHeaderColName,displayName:"",width:g.grid.options.selectionRowHeaderWidth,minWidth:10,cellTemplate:"ui-grid/selectionRowHeader",headerCellTemplate:"ui-grid/selectionHeaderCell",enableColumnResizing:!1,enableColumnMenu:!1,exporterSuppressExport:!0,allowCellFocus:!0};g.grid.addRowHeaderColumn(h)}var i=!1,j=function(a){return a.forEach(function(a){a.enableSelection=g.grid.options.isRowSelectable(a)}),a},k=function(){g.grid.options.isRowSelectable!==angular.noop&&i!==!0&&(g.grid.registerRowsProcessor(j,500),i=!0)};k();var l=g.grid.registerDataChangeCallback(k,[d.dataChange.OPTIONS]);c.$on("$destroy",l)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridSelectionRowHeaderButtons",["$templateCache","uiGridSelectionService","gridUtil",function(a,b,c){return{replace:!0,restrict:"E",template:a.get("ui-grid/selectionRowHeaderButtons"),scope:!0,require:"^uiGrid",link:function(a,d,e,f){function g(a,c){c.stopPropagation(),c.shiftKey?b.shiftSelect(i,a,c,i.options.multiSelect):c.ctrlKey||c.metaKey?b.toggleRowSelection(i,a,c,i.options.multiSelect,i.options.noUnselect):b.toggleRowSelection(i,a,c,i.options.multiSelect&&!i.options.modifierKeysToMultiSelect,i.options.noUnselect)}function h(a){(a.ctrlKey||a.shiftKey)&&(a.target.onselectstart=function(){return!1},window.setTimeout(function(){a.target.onselectstart=null},0))}var i=f.grid;a.selectButtonClick=g,"ie"===c.detectBrowser()&&d.on("mousedown",h)}}}]),a.directive("uiGridSelectionSelectAllButtons",["$templateCache","uiGridSelectionService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/selectionSelectAllButtons"),scope:!1,link:function(a,c,d,e){var f=a.col.grid;a.headerButtonClick=function(a,c){f.selection.selectAll?(b.clearSelectedRows(f,c),f.options.noUnselect&&f.api.selection.selectRowByVisibleIndex(0,c),f.selection.selectAll=!1):f.options.multiSelect&&(f.api.selection.selectAllVisibleRows(c),f.selection.selectAll=!0)}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","uiGridSelectionConstants","gridUtil","$parse","uiGridSelectionService",function(a,b,c,d,e,f){return{priority:-200,scope:!1,compile:function(a,b){var c=angular.element(a.children().children()[0]),d=c.attr("ng-class"),e="";return e=d?d.slice(0,-1)+",'ui-grid-row-selected': row.isSelected}":"{'ui-grid-row-selected': row.isSelected}",c.attr("ng-class",e),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}]),a.directive("uiGridCell",["$compile","uiGridConstants","uiGridSelectionConstants","gridUtil","$parse","uiGridSelectionService","$timeout",function(a,b,c,d,e,f,g){return{priority:-200,restrict:"A",require:"?^uiGrid",scope:!1,link:function(a,c,d,e){function h(){a.grid.options.enableRowSelection&&a.grid.options.enableFullRowSelection&&(c.addClass("ui-grid-disable-selection"),c.on("touchstart",m),c.on("touchend",n),c.on("click",l),a.registered=!0)}function i(){a.registered&&(c.removeClass("ui-grid-disable-selection"),c.off("touchstart",m),c.off("touchend",n),c.off("click",l),a.registered=!1)}var j=0,k=300;e.grid.api.cellNav&&e.grid.api.cellNav.on.viewPortKeyDown(a,function(b,c){null!==c&&c.row===a.row&&c.col===a.col&&32===b.keyCode&&"selectionRowHeaderCol"===a.col.colDef.name&&(f.toggleRowSelection(a.grid,a.row,b,a.grid.options.multiSelect&&!a.grid.options.modifierKeysToMultiSelect,a.grid.options.noUnselect),a.$apply())});var l=function(b){c.off("touchend",n),b.shiftKey?f.shiftSelect(a.grid,a.row,b,a.grid.options.multiSelect):b.ctrlKey||b.metaKey?f.toggleRowSelection(a.grid,a.row,b,a.grid.options.multiSelect,a.grid.options.noUnselect):f.toggleRowSelection(a.grid,a.row,b,a.grid.options.multiSelect&&!a.grid.options.modifierKeysToMultiSelect,a.grid.options.noUnselect),a.$apply(),g(function(){c.on("touchend",n)},k)},m=function(a){j=(new Date).getTime(),c.off("click",l)},n=function(a){var b=(new Date).getTime(),d=b-j;k>d&&l(a),g(function(){c.on("click",l)},k)};h();var o=a.grid.registerDataChangeCallback(function(){a.grid.options.enableRowSelection&&a.grid.options.enableFullRowSelection&&!a.registered?h():a.grid.options.enableRowSelection&&a.grid.options.enableFullRowSelection||!a.registered||i()},[b.dataChange.OPTIONS]);c.on("$destroy",o)}}}]),a.directive("uiGridGridFooter",["$compile","uiGridConstants","gridUtil",function(a,b,c){return{restrict:"EA",replace:!0,priority:-1e3,require:"^uiGrid",scope:!0,compile:function(b,d){return{pre:function(b,d,e,f){f.grid.options.showGridFooter&&c.getTemplate("ui-grid/gridFooterSelectedItems").then(function(c){var e=angular.element(c),f=a(e)(b);angular.element(d[0].getElementsByClassName("ui-grid-grid-footer")[0]).append(f)})},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.treeBase",["ui.grid"]);a.constant("uiGridTreeBaseConstants",{featureName:"treeBase",rowHeaderColName:"treeBaseRowHeaderCol",EXPANDED:"expanded",COLLAPSED:"collapsed",aggregation:{COUNT:"count",SUM:"sum",MAX:"max",MIN:"min",AVG:"avg"}}),a.service("uiGridTreeBaseService",["$q","uiGridTreeBaseConstants","gridUtil","GridRow","gridClassFactory","i18nService","uiGridConstants","rowSorter",function(a,b,c,d,e,f,g,h){var i={initializeGrid:function(a,b){a.treeBase={},a.treeBase.numberLevels=0,a.treeBase.expandAll=!1,a.treeBase.tree=[],i.defaultGridOptions(a.options),a.registerRowsProcessor(i.treeRows,410),a.registerColumnBuilder(i.treeBaseColumnBuilder),i.createRowHeader(a);var c={events:{treeBase:{rowExpanded:{},rowCollapsed:{}}},methods:{treeBase:{expandAllRows:function(){i.expandAllRows(a)},collapseAllRows:function(){i.collapseAllRows(a)},toggleRowTreeState:function(b){i.toggleRowTreeState(a,b)},expandRow:function(b){i.expandRow(a,b)},expandRowChildren:function(b){i.expandRowChildren(a,b)},collapseRow:function(b){i.collapseRow(a,b)},collapseRowChildren:function(b){i.collapseRowChildren(a,b)},getTreeExpandedState:function(){return{expandedState:i.getTreeState(a)}},setTreeState:function(b){i.setTreeState(a,b)},getRowChildren:function(a){return a.treeNode.children.map(function(a){return a.row})}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.treeRowHeaderBaseWidth=a.treeRowHeaderBaseWidth||30,a.treeIndent=a.treeIndent||10,a.showTreeRowHeader=a.showTreeRowHeader!==!1,a.showTreeExpandNoChildren=a.showTreeExpandNoChildren!==!1,a.treeRowHeaderAlwaysVisible=a.treeRowHeaderAlwaysVisible!==!1,a.treeCustomAggregations=a.treeCustomAggregations||{},a.enableExpandAll=a.enableExpandAll!==!1},treeBaseColumnBuilder:function(a,b,c){"undefined"!=typeof a.customTreeAggregationFn&&(b.treeAggregationFn=a.customTreeAggregationFn),"undefined"!=typeof a.treeAggregationType&&(b.treeAggregation={type:a.treeAggregationType},"undefined"!=typeof c.treeCustomAggregations[a.treeAggregationType]?(b.treeAggregationFn=c.treeCustomAggregations[a.treeAggregationType].aggregationFn,b.treeAggregationFinalizerFn=c.treeCustomAggregations[a.treeAggregationType].finalizerFn,b.treeAggregation.label=c.treeCustomAggregations[a.treeAggregationType].label):"undefined"!=typeof i.nativeAggregations()[a.treeAggregationType]&&(b.treeAggregationFn=i.nativeAggregations()[a.treeAggregationType].aggregationFn,b.treeAggregation.label=i.nativeAggregations()[a.treeAggregationType].label)),"undefined"!=typeof a.treeAggregationLabel&&("undefined"==typeof b.treeAggregation&&(b.treeAggregation={}),b.treeAggregation.label=a.treeAggregationLabel),b.treeAggregationUpdateEntity=a.treeAggregationUpdateEntity!==!1,"undefined"==typeof b.customTreeAggregationFinalizerFn&&(b.customTreeAggregationFinalizerFn=a.customTreeAggregationFinalizerFn)},createRowHeader:function(a){var c={name:b.rowHeaderColName,displayName:"",width:a.options.treeRowHeaderBaseWidth,minWidth:10,cellTemplate:"ui-grid/treeBaseRowHeader",headerCellTemplate:"ui-grid/treeBaseHeaderCell",enableColumnResizing:!1,enableColumnMenu:!1,exporterSuppressExport:!0,allowCellFocus:!0};c.visible=a.options.treeRowHeaderAlwaysVisible,a.addRowHeaderColumn(c)},expandAllRows:function(a){a.treeBase.tree.forEach(function(c){i.setAllNodes(a,c,b.EXPANDED)}),a.treeBase.expandAll=!0,a.queueGridRefresh()},collapseAllRows:function(a){a.treeBase.tree.forEach(function(c){i.setAllNodes(a,c,b.COLLAPSED)}),a.treeBase.expandAll=!1,a.queueGridRefresh()},setAllNodes:function(a,c,d){"undefined"!=typeof c.state&&c.state!==d&&(c.state=d,d===b.EXPANDED?a.api.treeBase.raise.rowExpanded(c.row):a.api.treeBase.raise.rowCollapsed(c.row)),c.children&&c.children.forEach(function(b){i.setAllNodes(a,b,d)})},toggleRowTreeState:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||(c.treeNode.state===b.EXPANDED?i.collapseRow(a,c):i.expandRow(a,c),a.queueGridRefresh())},expandRow:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||c.treeNode.state!==b.EXPANDED&&(c.treeNode.state=b.EXPANDED,a.api.treeBase.raise.rowExpanded(c),a.treeBase.expandAll=i.allExpanded(a.treeBase.tree),a.queueGridRefresh())},expandRowChildren:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||(i.setAllNodes(a,c.treeNode,b.EXPANDED),a.treeBase.expandAll=i.allExpanded(a.treeBase.tree),a.queueGridRefresh())},collapseRow:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||c.treeNode.state!==b.COLLAPSED&&(c.treeNode.state=b.COLLAPSED,a.treeBase.expandAll=!1,a.api.treeBase.raise.rowCollapsed(c),a.queueGridRefresh())},collapseRowChildren:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||(i.setAllNodes(a,c.treeNode,b.COLLAPSED),a.treeBase.expandAll=!1,a.queueGridRefresh())},allExpanded:function(a){var b=!0;return a.forEach(function(a){i.allExpandedInternal(a)||(b=!1)}),b},allExpandedInternal:function(a){if(a.children&&a.children.length>0){if(a.state===b.COLLAPSED)return!1;var c=!0;return a.children.forEach(function(a){i.allExpandedInternal(a)||(c=!1)}),c}return!0},treeRows:function(a){if(0===a.length)return a;var c=this;b.EXPANDED;return c.treeBase.tree=i.createTree(c,a),i.updateRowHeaderWidth(c),i.sortTree(c),i.fixFilter(c),i.renderTree(c.treeBase.tree)},updateRowHeaderWidth:function(a){var c=a.getColumn(b.rowHeaderColName),d=a.options.treeRowHeaderBaseWidth+a.options.treeIndent*Math.max(a.treeBase.numberLevels-1,0);c&&d!==c.width&&(c.width=d,a.queueRefresh());var e=!0;a.options.showTreeRowHeader===!1&&(e=!1),a.options.treeRowHeaderAlwaysVisible===!1&&a.treeBase.numberLevels<=0&&(e=!1),c.visible!==e&&(c.visible=e,c.colDef.visible=e,a.queueGridRefresh())},renderTree:function(a){var c=[];return a.forEach(function(a){a.row.visible&&c.push(a.row),a.state===b.EXPANDED&&a.children&&a.children.length>0&&(c=c.concat(i.renderTree(a.children)))}),c},createTree:function(a,c){var d,e=-1,f=[];a.treeBase.tree=[],a.treeBase.numberLevels=0;var g=i.getAggregations(a),h=function(c){if("undefined"!=typeof c.entity.$$treeLevel&&c.treeLevel!==c.entity.$$treeLevel&&(c.treeLevel=c.entity.$$treeLevel),c.treeLevel<=e){for(;c.treeLevel<=e;){var h=f.pop();i.finaliseAggregations(h),e--}d=f.length>0?i.setCurrentState(f):b.EXPANDED}("undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0)&&c.visible&&i.aggregate(a,c,f),i.addOrUseNode(a,c,f,g),"undefined"!=typeof c.treeLevel&&null!==c.treeLevel&&c.treeLevel>=0&&(f.push(c),e++,d=i.setCurrentState(f)),a.treeBase.numberLevels0;){var j=f.pop();i.finaliseAggregations(j)}return a.treeBase.tree},addOrUseNode:function(a,c,d,e){var f=[];e.forEach(function(a){f.push(i.buildAggregationObject(a.col))});var g={state:b.COLLAPSED,row:c,parentRow:null,aggregations:f,children:[]};c.treeNode&&(g.state=c.treeNode.state),d.length>0&&(g.parentRow=d[d.length-1]),c.treeNode=g,0===d.length?a.treeBase.tree.push(g):d[d.length-1].treeNode.children.push(g)},setCurrentState:function(a){var c=b.EXPANDED;return a.forEach(function(a){a.treeNode.state===b.COLLAPSED&&(c=b.COLLAPSED)}),c},sortTree:function(a){a.columns.forEach(function(a){a.sort&&a.sort.ignoreSort&&delete a.sort.ignoreSort; +}),a.treeBase.tree=i.sortInternal(a,a.treeBase.tree)},sortInternal:function(a,c){var d=c.map(function(a){return a.row});d=h.sort(a,d,a.columns);var e=d.map(function(a){return a.treeNode});return e.forEach(function(c){c.state===b.EXPANDED&&c.children&&c.children.length>0&&(c.children=i.sortInternal(a,c.children))}),e},fixFilter:function(a){var b;a.treeBase.tree.forEach(function(a){a.children&&a.children.length>0&&(b=a.row.visible,i.fixFilterInternal(a.children,b))})},fixFilterInternal:function(a,b){return a.forEach(function(a){a.row.visible&&!b&&(i.setParentsVisible(a),b=!0),a.children&&a.children.length>0&&i.fixFilterInternal(a.children,b&&a.row.visible)&&(b=!0)}),b},setParentsVisible:function(a){for(;a.parentRow;)a.parentRow.visible=!0,a=a.parentRow.treeNode},buildAggregationObject:function(a){var b={col:a};return a.treeAggregation&&a.treeAggregation.type&&(b.type=a.treeAggregation.type),a.treeAggregation&&a.treeAggregation.label&&(b.label=a.treeAggregation.label),b},getAggregations:function(a){var b=[];return a.columns.forEach(function(c){"undefined"!=typeof c.treeAggregationFn&&(b.push(i.buildAggregationObject(c)),a.options.showColumnFooter&&"undefined"==typeof c.colDef.aggregationType&&c.treeAggregation&&(c.treeFooterAggregation=i.buildAggregationObject(c),c.aggregationType=i.treeFooterAggregationType))}),b},aggregate:function(a,b,c){0===c.length&&b.treeNode&&b.treeNode.aggregations&&b.treeNode.aggregations.forEach(function(c){if("undefined"!=typeof c.col.treeFooterAggregation){var d=a.getCellValue(b,c.col),e=Number(d);c.col.treeAggregationFn(c.col.treeFooterAggregation,d,e,b)}}),c.forEach(function(c,d){c.treeNode.aggregations&&c.treeNode.aggregations.forEach(function(c){var e=a.getCellValue(b,c.col),f=Number(e);c.col.treeAggregationFn(c,e,f,b),0===d&&"undefined"!=typeof c.col.treeFooterAggregation&&c.col.treeAggregationFn(c.col.treeFooterAggregation,e,f,b)})})},nativeAggregations:function(){var a={count:{label:f.get().aggregation.count,menuTitle:f.get().grouping.aggregate_count,aggregationFn:function(a,b,c){"undefined"==typeof a.value?a.value=1:a.value++}},sum:{label:f.get().aggregation.sum,menuTitle:f.get().grouping.aggregate_sum,aggregationFn:function(a,b,c){isNaN(c)||("undefined"==typeof a.value?a.value=c:a.value+=c)}},min:{label:f.get().aggregation.min,menuTitle:f.get().grouping.aggregate_min,aggregationFn:function(a,b,c){"undefined"==typeof a.value?a.value=b:"undefined"!=typeof b&&null!==b&&(ba.value||null===a.value)&&(a.value=b)}},avg:{label:f.get().aggregation.avg,menuTitle:f.get().grouping.aggregate_avg,aggregationFn:function(a,b,c){"undefined"==typeof a.count?a.count=1:a.count++,isNaN(c)||("undefined"==typeof a.value||"undefined"==typeof a.sum?(a.value=c,a.sum=c):(a.sum+=c,a.value=a.sum/a.count))}}};return a},finaliseAggregation:function(a,b){b.col.treeAggregationUpdateEntity&&"undefined"!=typeof a&&"undefined"!=typeof a.entity["$$"+b.col.uid]&&angular.extend(b,a.entity["$$"+b.col.uid]),"function"==typeof b.col.treeAggregationFinalizerFn&&b.col.treeAggregationFinalizerFn(b),"function"==typeof b.col.customTreeAggregationFinalizerFn&&b.col.customTreeAggregationFinalizerFn(b),"undefined"==typeof b.rendered&&(b.rendered=b.label?b.label+b.value:b.value)},finaliseAggregations:function(a){"undefined"!=typeof a.treeNode.aggregations&&a.treeNode.aggregations.forEach(function(b){if(i.finaliseAggregation(a,b),b.col.treeAggregationUpdateEntity){var c={};angular.forEach(b,function(a,d){b.hasOwnProperty(d)&&"col"!==d&&(c[d]=a)}),a.entity["$$"+b.col.uid]=c}})},treeFooterAggregationType:function(a,b){return i.finaliseAggregation(void 0,b.treeFooterAggregation),"undefined"==typeof b.treeFooterAggregation.value||null===b.treeFooterAggregation.rendered?"":b.treeFooterAggregation.rendered}};return i}]),a.directive("uiGridTreeBaseRowHeaderButtons",["$templateCache","uiGridTreeBaseService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/treeBaseRowHeaderButtons"),scope:!0,require:"^uiGrid",link:function(a,c,d,e){var f=e.grid;a.treeButtonClick=function(a,c){b.toggleRowTreeState(f,a,c)}}}}]),a.directive("uiGridTreeBaseExpandAllButtons",["$templateCache","uiGridTreeBaseService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/treeBaseExpandAllButtons"),scope:!1,link:function(a,c,d,e){var f=a.col.grid;a.headerButtonClick=function(a,c){f.treeBase.expandAll?b.collapseAllRows(f,c):b.expandAllRows(f,c)}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","gridUtil","$parse",function(a,b,c,d){return{priority:-200,scope:!1,compile:function(a,b){var c=angular.element(a.children().children()[0]),d=c.attr("ng-class"),e="";return e=d?d.slice(0,-1)+",'ui-grid-tree-header-row': row.treeLevel > -1}":"{'ui-grid-tree-header-row': row.treeLevel > -1}",c.attr("ng-class",e),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.treeView",["ui.grid","ui.grid.treeBase"]);a.constant("uiGridTreeViewConstants",{featureName:"treeView",rowHeaderColName:"treeBaseRowHeaderCol",EXPANDED:"expanded",COLLAPSED:"collapsed",aggregation:{COUNT:"count",SUM:"sum",MAX:"max",MIN:"min",AVG:"avg"}}),a.service("uiGridTreeViewService",["$q","uiGridTreeViewConstants","uiGridTreeBaseConstants","uiGridTreeBaseService","gridUtil","GridRow","gridClassFactory","i18nService","uiGridConstants",function(a,b,c,d,e,f,g,h,i){var j={initializeGrid:function(a,b){d.initializeGrid(a,b),a.treeView={},a.registerRowsProcessor(j.adjustSorting,60);var c={events:{treeView:{}},methods:{treeView:{}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.enableTreeView=a.enableTreeView!==!1},adjustSorting:function(a){var b=this;return b.columns.forEach(function(a){a.sort&&(a.sort.ignoreSort=!0)}),a}};return j}]),a.directive("uiGridTreeView",["uiGridTreeViewConstants","uiGridTreeViewService","$templateCache",function(a,b,c){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){e.grid.options.enableTreeView!==!1&&b.initializeGrid(e.grid,a)},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.validate",["ui.grid"]);a.service("uiGridValidateService",["$sce","$q","$http","i18nService","uiGridConstants",function(a,b,c,d,e){var f={validatorFactories:{},setExternalFactoryFunction:function(a){f.externalFactoryFunction=a},clearExternalFactory:function(){delete f.externalFactoryFunction},getValidatorFromExternalFactory:function(a,b){return f.externalFactoryFunction(a,b).validatorFactory(b)},getMessageFromExternalFactory:function(a,b){return f.externalFactoryFunction(a,b).messageFunction(b)},setValidator:function(a,b,c){f.validatorFactories[a]={validatorFactory:b,messageFunction:c}},getValidator:function(a,b){if(f.externalFactoryFunction){var c=f.getValidatorFromExternalFactory(a,b);if(c)return c}if(!f.validatorFactories[a])throw"Invalid validator name: "+a;return f.validatorFactories[a].validatorFactory(b)},getMessage:function(a,b){if(f.externalFactoryFunction){var c=f.getMessageFromExternalFactory(a,b);if(c)return c}return f.validatorFactories[a].messageFunction(b)},isInvalid:function(a,b){return a["$$invalid"+b.name]},setInvalid:function(a,b){a["$$invalid"+b.name]=!0},setValid:function(a,b){delete a["$$invalid"+b.name]},setError:function(a,b,c){a["$$errors"+b.name]||(a["$$errors"+b.name]={}),a["$$errors"+b.name][c]=!0},clearError:function(a,b,c){a["$$errors"+b.name]&&c in a["$$errors"+b.name]&&delete a["$$errors"+b.name][c]},getErrorMessages:function(a,b){var c=[];return a["$$errors"+b.name]&&0!==Object.keys(a["$$errors"+b.name]).length?(Object.keys(a["$$errors"+b.name]).sort().forEach(function(a){c.push(f.getMessage(a,b.validators[a]))}),c):c},getFormattedErrors:function(b,c){var e="",g=f.getErrorMessages(b,c);return g.length?(g.forEach(function(a){e+=a+"
        "}),a.trustAsHtml("

        "+d.getSafeText("validate.error")+"

        "+e)):void 0},getTitleFormattedErrors:function(b,c){var e="\n",g="",h=f.getErrorMessages(b,c);return h.length?(h.forEach(function(a){g+=a+e}),a.trustAsHtml(d.getSafeText("validate.error")+e+g)):void 0},runValidators:function(a,c,d,e,g){if(d!==e){if("undefined"==typeof c.name||!c.name)throw new Error("colDef.name is required to perform validation");f.setValid(a,c);var h=function(a,b,c){return function(h){h||(f.setInvalid(a,b),f.setError(a,b,c),g&&g.api.validate.raise.validationFailed(a,b,d,e))}};for(var i in c.validators){f.clearError(a,c,i);var j=f.getValidator(i,c.validators[i]);b.when(j(e,d,a,c)).then(h(a,c,i))}}},createDefaultValidators:function(){f.setValidator("minLength",function(a){return function(b,c,d,e){return void 0===c||null===c||""===c?!0:c.length>=a}},function(a){return d.getSafeText("validate.minLength").replace("THRESHOLD",a)}),f.setValidator("maxLength",function(a){return function(b,c,d,e){return void 0===c||null===c||""===c?!0:c.length<=a}},function(a){return d.getSafeText("validate.maxLength").replace("THRESHOLD",a)}),f.setValidator("required",function(a){return function(b,c,d,e){return a?!(void 0===c||null===c||""===c):!0}},function(a){return d.getSafeText("validate.required")})},initializeGrid:function(a,b){b.validate={isInvalid:f.isInvalid,getFormattedErrors:f.getFormattedErrors,getTitleFormattedErrors:f.getTitleFormattedErrors,runValidators:f.runValidators};var c={events:{validate:{validationFailed:function(a,b,c,d){}}},methods:{validate:{isInvalid:function(a,c){return b.validate.isInvalid(a,c)},getErrorMessages:function(a,c){return b.validate.getErrorMessages(a,c)},getFormattedErrors:function(a,c){return b.validate.getFormattedErrors(a,c)},getTitleFormattedErrors:function(a,c){return b.validate.getTitleFormattedErrors(a,c)}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods),b.edit&&b.api.edit.on.afterCellEdit(a,function(a,c,d,e){b.validate.runValidators(a,c,d,e,b)}),f.createDefaultValidators()}};return f}]),a.directive("uiGridValidate",["gridUtil","uiGridValidateService",function(a,b){return{priority:0,replace:!0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(a,e.grid)},post:function(a,b,c,d){}}}}}])}(),angular.module("ui.grid").run(["$templateCache",function(a){"use strict";a.put("ui-grid/ui-grid-filter",'
         
         
        '),a.put("ui-grid/ui-grid-footer",''),a.put("ui-grid/ui-grid-grid-footer",''),a.put("ui-grid/ui-grid-group-panel",'
        • {{group.displayName}} x
        '),a.put("ui-grid/ui-grid-header",'
        '),a.put("ui-grid/ui-grid-menu-button",'
         
        '),a.put("ui-grid/ui-grid-no-header",'
        '),a.put("ui-grid/ui-grid-row","
        "),a.put("ui-grid/ui-grid",'
        '),a.put("ui-grid/uiGridCell",'
        {{COL_FIELD CUSTOM_FILTERS}}
        '),a.put("ui-grid/uiGridColumnMenu",'
        '),a.put("ui-grid/uiGridFooterCell",'
        {{ col.getAggregationText() + ( col.getAggregationValue() CUSTOM_FILTERS ) }}
        '),a.put("ui-grid/uiGridHeaderCell",'
        {{ col.displayName CUSTOM_FILTERS }} {{col.sort.priority + 1}}
        '),a.put("ui-grid/uiGridMenu",'
        '),a.put("ui-grid/uiGridMenuItem",''),a.put("ui-grid/uiGridRenderContainer","
        "),a.put("ui-grid/uiGridViewport",'
        '),a.put("ui-grid/cellEditor",'
        '),a.put("ui-grid/dropdownEditor",'
        '),a.put("ui-grid/fileChooserEditor",'
        '),a.put("ui-grid/expandableRow",'
        '),a.put("ui-grid/expandableRowHeader",'
        '),a.put("ui-grid/expandableScrollFiller","
        "),a.put("ui-grid/expandableTopRowHeader",'
        '),a.put("ui-grid/csvLink",'LINK_LABEL'),a.put("ui-grid/importerMenuItem",'
      • '),a.put("ui-grid/importerMenuItemContainer","
        "),a.put("ui-grid/pagination",''),a.put("ui-grid/columnResizer",'
        '),a.put("ui-grid/gridFooterSelectedItems",'({{"search.selectedItems" | t}} {{grid.selection.selectedCount}})'),a.put("ui-grid/selectionHeaderCell",'
        '),a.put("ui-grid/selectionRowHeader",'
        '),a.put("ui-grid/selectionRowHeaderButtons",'
         
        '),a.put("ui-grid/selectionSelectAllButtons",'
        '),a.put("ui-grid/treeBaseExpandAllButtons",'
        '),a.put("ui-grid/treeBaseHeaderCell",'
        '),a.put("ui-grid/treeBaseRowHeader",'
        '),a.put("ui-grid/treeBaseRowHeaderButtons","
        -1 }\" ng-click=\"treeButtonClick(row, $event)\"> -1 ) || ( row.treeNode.children && row.treeNode.children.length > 0 ) ) && row.treeNode.state === 'expanded', 'ui-grid-icon-plus-squared': ( ( grid.options.showTreeExpandNoChildren && row.treeLevel > -1 ) || ( row.treeNode.children && row.treeNode.children.length > 0 ) ) && row.treeNode.state === 'collapsed'}\" ng-style=\"{'padding-left': grid.options.treeIndent * row.treeLevel + 'px'}\">  
        "),a.put("ui-grid/cellTitleValidator",'
        {{COL_FIELD CUSTOM_FILTERS}}
        '),a.put("ui-grid/cellTooltipValidator",'
        {{COL_FIELD CUSTOM_FILTERS}}
        ')}]),function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){(function(b){a.exports=b.pdfMake=c(1)}).call(b,function(){return this}())},function(a,b,c){(function(b){"use strict";function d(a,b,c){this.docDefinition=a,this.fonts=b||h,this.vfs=c}var e=c(6),f=c(105),g=f.saveAs,h={Roboto:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-Italic.ttf"}};d.prototype._createDoc=function(a,c){var d=new e(this.fonts);d.fs.bindFS(this.vfs);var f,g=d.createPdfKitDocument(this.docDefinition,a),h=[];g.on("data",function(a){h.push(a)}),g.on("end",function(){f=b.concat(h),c(f,g._pdfMakePages)}),g.end()},d.prototype._getPages=function(a,b){if(!b)throw"getBuffer is an async method and needs a callback argument";this._createDoc(a,function(a,c){b(c)})},d.prototype.open=function(a){var b=window.open("","_blank");try{this.getDataUrl(function(a){b.location.href=a})}catch(c){throw b.close(),c}},d.prototype.print=function(){this.getDataUrl(function(a){var b=document.createElement("iframe");b.style.position="absolute",b.style.left="-99999px",b.src=a,b.onload=function(){function a(){document.body.removeChild(b),document.removeEventListener("click",a)}document.addEventListener("click",a,!1)},document.body.appendChild(b)},{autoPrint:!0})},d.prototype.download=function(a,b){"function"==typeof a&&(b=a,a=null),a=a||"file.pdf",this.getBuffer(function(c){var d;try{d=new Blob([c],{type:"application/pdf" +})}catch(e){if("InvalidStateError"==e.name){var f=new Uint8Array(c);d=new Blob([f.buffer],{type:"application/pdf"})}}if(!d)throw"Could not generate blob";g(d,a),"function"==typeof b&&b()})},d.prototype.getBase64=function(a,b){if(!a)throw"getBase64 is an async method and needs a callback argument";this._createDoc(b,function(b){a(b.toString("base64"))})},d.prototype.getDataUrl=function(a,b){if(!a)throw"getDataUrl is an async method and needs a callback argument";this._createDoc(b,function(b){a("data:application/pdf;base64,"+b.toString("base64"))})},d.prototype.getBuffer=function(a,b){if(!a)throw"getBuffer is an async method and needs a callback argument";this._createDoc(b,function(b){a(b)})},a.exports={createPdf:function(a){return new d(a,window.pdfMake.fonts,window.pdfMake.vfs)}}}).call(b,c(2).Buffer)},function(a,b,c){(function(a,d){function e(){function a(){}try{var b=new Uint8Array(1);return b.foo=function(){return 42},b.constructor=a,42===b.foo()&&b.constructor===a&&"function"==typeof b.subarray&&0===b.subarray(1,1).byteLength}catch(c){return!1}}function f(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(b){return this instanceof a?(this.length=0,this.parent=void 0,"number"==typeof b?g(this,b):"string"==typeof b?h(this,b,arguments.length>1?arguments[1]:"utf8"):i(this,b)):arguments.length>1?new a(b,arguments[1]):new a(b)}function g(b,c){if(b=p(b,0>c?0:0|q(c)),!a.TYPED_ARRAY_SUPPORT)for(var d=0;c>d;d++)b[d]=0;return b}function h(a,b,c){("string"!=typeof c||""===c)&&(c="utf8");var d=0|s(b,c);return a=p(a,d),a.write(b,c),a}function i(b,c){if(a.isBuffer(c))return j(b,c);if(Y(c))return k(b,c);if(null==c)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(c.buffer instanceof ArrayBuffer)return l(b,c);if(c instanceof ArrayBuffer)return m(b,c)}return c.length?n(b,c):o(b,c)}function j(a,b){var c=0|q(b.length);return a=p(a,c),b.copy(a,0,0,c),a}function k(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function l(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function m(b,c){return a.TYPED_ARRAY_SUPPORT?(c.byteLength,b=a._augment(new Uint8Array(c))):b=l(b,new Uint8Array(c)),b}function n(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function o(a,b){var c,d=0;"Buffer"===b.type&&Y(b.data)&&(c=b.data,d=0|q(c.length)),a=p(a,d);for(var e=0;d>e;e+=1)a[e]=255&c[e];return a}function p(b,c){a.TYPED_ARRAY_SUPPORT?(b=a._augment(new Uint8Array(c)),b.__proto__=a.prototype):(b.length=c,b._isBuffer=!0);var d=0!==c&&c<=a.poolSize>>>1;return d&&(b.parent=Z),b}function q(a){if(a>=f())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f().toString(16)+" bytes");return 0|a}function r(b,c){if(!(this instanceof r))return new r(b,c);var d=new a(b,c);return delete d.parent,d}function s(a,b){"string"!=typeof a&&(a=""+a);var c=a.length;if(0===c)return 0;for(var d=!1;;)switch(b){case"ascii":case"binary":case"raw":case"raws":return c;case"utf8":case"utf-8":return R(a).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*c;case"hex":return c>>>1;case"base64":return U(a).length;default:if(d)return R(a).length;b=(""+b).toLowerCase(),d=!0}}function t(a,b,c){var d=!1;if(b=0|b,c=void 0===c||c===1/0?this.length:0|c,a||(a="utf8"),0>b&&(b=0),c>this.length&&(c=this.length),b>=c)return"";for(;;)switch(a){case"hex":return F(this,b,c);case"utf8":case"utf-8":return B(this,b,c);case"ascii":return D(this,b,c);case"binary":return E(this,b,c);case"base64":return A(this,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,b,c);default:if(d)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),d=!0}}function u(a,b,c,d){c=Number(c)||0;var e=a.length-c;d?(d=Number(d),d>e&&(d=e)):d=e;var f=b.length;if(f%2!==0)throw new Error("Invalid hex string");d>f/2&&(d=f/2);for(var g=0;d>g;g++){var h=parseInt(b.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");a[c+g]=h}return g}function v(a,b,c,d){return V(R(b,a.length-c),a,c,d)}function w(a,b,c,d){return V(S(b),a,c,d)}function x(a,b,c,d){return w(a,b,c,d)}function y(a,b,c,d){return V(U(b),a,c,d)}function z(a,b,c,d){return V(T(b,a.length-c),a,c,d)}function A(a,b,c){return 0===b&&c===a.length?W.fromByteArray(a):W.fromByteArray(a.slice(b,c))}function B(a,b,c){c=Math.min(a.length,c);for(var d=[],e=b;c>e;){var f=a[e],g=null,h=f>239?4:f>223?3:f>191?2:1;if(c>=e+h){var i,j,k,l;switch(h){case 1:128>f&&(g=f);break;case 2:i=a[e+1],128===(192&i)&&(l=(31&f)<<6|63&i,l>127&&(g=l));break;case 3:i=a[e+1],j=a[e+2],128===(192&i)&&128===(192&j)&&(l=(15&f)<<12|(63&i)<<6|63&j,l>2047&&(55296>l||l>57343)&&(g=l));break;case 4:i=a[e+1],j=a[e+2],k=a[e+3],128===(192&i)&&128===(192&j)&&128===(192&k)&&(l=(15&f)<<18|(63&i)<<12|(63&j)<<6|63&k,l>65535&&1114112>l&&(g=l))}}null===g?(g=65533,h=1):g>65535&&(g-=65536,d.push(g>>>10&1023|55296),g=56320|1023&g),d.push(g),e+=h}return C(d)}function C(a){var b=a.length;if($>=b)return String.fromCharCode.apply(String,a);for(var c="",d=0;b>d;)c+=String.fromCharCode.apply(String,a.slice(d,d+=$));return c}function D(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(127&a[e]);return d}function E(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(a[e]);return d}function F(a,b,c){var d=a.length;(!b||0>b)&&(b=0),(!c||0>c||c>d)&&(c=d);for(var e="",f=b;c>f;f++)e+=Q(a[f]);return e}function G(a,b,c){for(var d=a.slice(b,c),e="",f=0;fa)throw new RangeError("offset is not uint");if(a+b>c)throw new RangeError("Trying to access beyond buffer length")}function I(b,c,d,e,f,g){if(!a.isBuffer(b))throw new TypeError("buffer must be a Buffer instance");if(c>f||g>c)throw new RangeError("value is out of bounds");if(d+e>b.length)throw new RangeError("index out of range")}function J(a,b,c,d){0>b&&(b=65535+b+1);for(var e=0,f=Math.min(a.length-c,2);f>e;e++)a[c+e]=(b&255<<8*(d?e:1-e))>>>8*(d?e:1-e)}function K(a,b,c,d){0>b&&(b=4294967295+b+1);for(var e=0,f=Math.min(a.length-c,4);f>e;e++)a[c+e]=b>>>8*(d?e:3-e)&255}function L(a,b,c,d,e,f){if(b>e||f>b)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range");if(0>c)throw new RangeError("index out of range")}function M(a,b,c,d,e){return e||L(a,b,c,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(a,b,c,d,23,4),c+4}function N(a,b,c,d,e){return e||L(a,b,c,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(a,b,c,d,52,8),c+8}function O(a){if(a=P(a).replace(aa,""),a.length<2)return"";for(;a.length%4!==0;)a+="=";return a}function P(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function Q(a){return 16>a?"0"+a.toString(16):a.toString(16)}function R(a,b){b=b||1/0;for(var c,d=a.length,e=null,f=[],g=0;d>g;g++){if(c=a.charCodeAt(g),c>55295&&57344>c){if(!e){if(c>56319){(b-=3)>-1&&f.push(239,191,189);continue}if(g+1===d){(b-=3)>-1&&f.push(239,191,189);continue}e=c;continue}if(56320>c){(b-=3)>-1&&f.push(239,191,189),e=c;continue}c=e-55296<<10|c-56320|65536}else e&&(b-=3)>-1&&f.push(239,191,189);if(e=null,128>c){if((b-=1)<0)break;f.push(c)}else if(2048>c){if((b-=2)<0)break;f.push(c>>6|192,63&c|128)}else if(65536>c){if((b-=3)<0)break;f.push(c>>12|224,c>>6&63|128,63&c|128)}else{if(!(1114112>c))throw new Error("Invalid code point");if((b-=4)<0)break;f.push(c>>18|240,c>>12&63|128,c>>6&63|128,63&c|128)}}return f}function S(a){for(var b=[],c=0;c>8,e=c%256,f.push(e),f.push(d);return f}function U(a){return W.toByteArray(O(a))}function V(a,b,c,d){for(var e=0;d>e&&!(e+c>=b.length||e>=a.length);e++)b[e+c]=a[e];return e}var W=c(3),X=c(4),Y=c(5);b.Buffer=a,b.SlowBuffer=r,b.INSPECT_MAX_BYTES=50,a.poolSize=8192;var Z={};a.TYPED_ARRAY_SUPPORT=void 0!==d.TYPED_ARRAY_SUPPORT?d.TYPED_ARRAY_SUPPORT:e(),a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array),a.isBuffer=function(a){return!(null==a||!a._isBuffer)},a.compare=function(b,c){if(!a.isBuffer(b)||!a.isBuffer(c))throw new TypeError("Arguments must be Buffers");if(b===c)return 0;for(var d=b.length,e=c.length,f=0,g=Math.min(d,e);g>f&&b[f]===c[f];)++f;return f!==g&&(d=b[f],e=c[f]),e>d?-1:d>e?1:0},a.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(b,c){if(!Y(b))throw new TypeError("list argument must be an Array of Buffers.");if(0===b.length)return new a(0);var d;if(void 0===c)for(c=0,d=0;d0&&(a=this.toString("hex",0,c).match(/.{2}/g).join(" "),this.length>c&&(a+=" ... ")),""},a.prototype.compare=function(b){if(!a.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b?0:a.compare(this,b)},a.prototype.indexOf=function(b,c){function d(a,b,c){for(var d=-1,e=0;c+e2147483647?c=2147483647:-2147483648>c&&(c=-2147483648),c>>=0,0===this.length)return-1;if(c>=this.length)return-1;if(0>c&&(c=Math.max(this.length+c,0)),"string"==typeof b)return 0===b.length?-1:String.prototype.indexOf.call(this,b,c);if(a.isBuffer(b))return d(this,b,c);if("number"==typeof b)return a.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,b,c):d(this,[b],c);throw new TypeError("val must be string, number or Buffer")},a.prototype.get=function(a){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(a)},a.prototype.set=function(a,b){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(a,b)},a.prototype.write=function(a,b,c,d){if(void 0===b)d="utf8",c=this.length,b=0;else if(void 0===c&&"string"==typeof b)d=b,c=this.length,b=0;else if(isFinite(b))b=0|b,isFinite(c)?(c=0|c,void 0===d&&(d="utf8")):(d=c,c=void 0);else{var e=d;d=b,b=0|c,c=e}var f=this.length-b;if((void 0===c||c>f)&&(c=f),a.length>0&&(0>c||0>b)||b>this.length)throw new RangeError("attempt to write outside buffer bounds");d||(d="utf8");for(var g=!1;;)switch(d){case"hex":return u(this,a,b,c);case"utf8":case"utf-8":return v(this,a,b,c);case"ascii":return w(this,a,b,c);case"binary":return x(this,a,b,c);case"base64":return y(this,a,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,a,b,c);default:if(g)throw new TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase(),g=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;a.prototype.slice=function(b,c){var d=this.length;b=~~b,c=void 0===c?d:~~c,0>b?(b+=d,0>b&&(b=0)):b>d&&(b=d),0>c?(c+=d,0>c&&(c=0)):c>d&&(c=d),b>c&&(c=b);var e;if(a.TYPED_ARRAY_SUPPORT)e=a._augment(this.subarray(b,c));else{var f=c-b;e=new a(f,void 0);for(var g=0;f>g;g++)e[g]=this[g+b]}return e.length&&(e.parent=this.parent||this),e},a.prototype.readUIntLE=function(a,b,c){a=0|a,b=0|b,c||H(a,b,this.length);for(var d=this[a],e=1,f=0;++f0&&(e*=256);)d+=this[a+--b]*e;return d},a.prototype.readUInt8=function(a,b){return b||H(a,1,this.length),this[a]},a.prototype.readUInt16LE=function(a,b){return b||H(a,2,this.length),this[a]|this[a+1]<<8},a.prototype.readUInt16BE=function(a,b){return b||H(a,2,this.length),this[a]<<8|this[a+1]},a.prototype.readUInt32LE=function(a,b){return b||H(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]},a.prototype.readUInt32BE=function(a,b){return b||H(a,4,this.length),16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])},a.prototype.readIntLE=function(a,b,c){a=0|a,b=0|b,c||H(a,b,this.length);for(var d=this[a],e=1,f=0;++f=e&&(d-=Math.pow(2,8*b)),d},a.prototype.readIntBE=function(a,b,c){a=0|a,b=0|b,c||H(a,b,this.length);for(var d=b,e=1,f=this[a+--d];d>0&&(e*=256);)f+=this[a+--d]*e;return e*=128,f>=e&&(f-=Math.pow(2,8*b)),f},a.prototype.readInt8=function(a,b){return b||H(a,1,this.length),128&this[a]?-1*(255-this[a]+1):this[a]},a.prototype.readInt16LE=function(a,b){b||H(a,2,this.length);var c=this[a]|this[a+1]<<8;return 32768&c?4294901760|c:c},a.prototype.readInt16BE=function(a,b){b||H(a,2,this.length);var c=this[a+1]|this[a]<<8;return 32768&c?4294901760|c:c},a.prototype.readInt32LE=function(a,b){return b||H(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},a.prototype.readInt32BE=function(a,b){return b||H(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},a.prototype.readFloatLE=function(a,b){return b||H(a,4,this.length),X.read(this,a,!0,23,4)},a.prototype.readFloatBE=function(a,b){return b||H(a,4,this.length),X.read(this,a,!1,23,4)},a.prototype.readDoubleLE=function(a,b){return b||H(a,8,this.length),X.read(this,a,!0,52,8)},a.prototype.readDoubleBE=function(a,b){return b||H(a,8,this.length),X.read(this,a,!1,52,8)},a.prototype.writeUIntLE=function(a,b,c,d){a=+a,b=0|b,c=0|c,d||I(this,a,b,c,Math.pow(2,8*c),0);var e=1,f=0;for(this[b]=255&a;++f=0&&(f*=256);)this[b+e]=a/f&255;return b+c},a.prototype.writeUInt8=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,1,255,0),a.TYPED_ARRAY_SUPPORT||(b=Math.floor(b)),this[c]=255&b,c+1},a.prototype.writeUInt16LE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[c]=255&b,this[c+1]=b>>>8):J(this,b,c,!0),c+2},a.prototype.writeUInt16BE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[c]=b>>>8,this[c+1]=255&b):J(this,b,c,!1),c+2},a.prototype.writeUInt32LE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[c+3]=b>>>24,this[c+2]=b>>>16,this[c+1]=b>>>8,this[c]=255&b):K(this,b,c,!0),c+4},a.prototype.writeUInt32BE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[c]=b>>>24,this[c+1]=b>>>16,this[c+2]=b>>>8,this[c+3]=255&b):K(this,b,c,!1),c+4},a.prototype.writeIntLE=function(a,b,c,d){if(a=+a,b=0|b,!d){var e=Math.pow(2,8*c-1);I(this,a,b,c,e-1,-e)}var f=0,g=1,h=0>a?1:0;for(this[b]=255&a;++f>0)-h&255;return b+c},a.prototype.writeIntBE=function(a,b,c,d){if(a=+a,b=0|b,!d){var e=Math.pow(2,8*c-1);I(this,a,b,c,e-1,-e)}var f=c-1,g=1,h=0>a?1:0;for(this[b+f]=255&a;--f>=0&&(g*=256);)this[b+f]=(a/g>>0)-h&255;return b+c},a.prototype.writeInt8=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,1,127,-128),a.TYPED_ARRAY_SUPPORT||(b=Math.floor(b)),0>b&&(b=255+b+1),this[c]=255&b,c+1},a.prototype.writeInt16LE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[c]=255&b,this[c+1]=b>>>8):J(this,b,c,!0),c+2},a.prototype.writeInt16BE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[c]=b>>>8,this[c+1]=255&b):J(this,b,c,!1),c+2},a.prototype.writeInt32LE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[c]=255&b,this[c+1]=b>>>8,this[c+2]=b>>>16,this[c+3]=b>>>24):K(this,b,c,!0),c+4},a.prototype.writeInt32BE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,4,2147483647,-2147483648),0>b&&(b=4294967295+b+1),a.TYPED_ARRAY_SUPPORT?(this[c]=b>>>24,this[c+1]=b>>>16,this[c+2]=b>>>8,this[c+3]=255&b):K(this,b,c,!1),c+4},a.prototype.writeFloatLE=function(a,b,c){return M(this,a,b,!0,c)},a.prototype.writeFloatBE=function(a,b,c){return M(this,a,b,!1,c)},a.prototype.writeDoubleLE=function(a,b,c){return N(this,a,b,!0,c)},a.prototype.writeDoubleBE=function(a,b,c){return N(this,a,b,!1,c)},a.prototype.copy=function(b,c,d,e){if(d||(d=0),e||0===e||(e=this.length),c>=b.length&&(c=b.length),c||(c=0),e>0&&d>e&&(e=d),e===d)return 0;if(0===b.length||0===this.length)return 0;if(0>c)throw new RangeError("targetStart out of bounds");if(0>d||d>=this.length)throw new RangeError("sourceStart out of bounds");if(0>e)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length),b.length-cd&&e>c)for(f=g-1;f>=0;f--)b[f+c]=this[f+d];else if(1e3>g||!a.TYPED_ARRAY_SUPPORT)for(f=0;g>f;f++)b[f+c]=this[f+d];else b._set(this.subarray(d,d+g),c);return g},a.prototype.fill=function(a,b,c){if(a||(a=0),b||(b=0),c||(c=this.length),b>c)throw new RangeError("end < start");if(c!==b&&0!==this.length){if(0>b||b>=this.length)throw new RangeError("start out of bounds");if(0>c||c>this.length)throw new RangeError("end out of bounds");var d;if("number"==typeof a)for(d=b;c>d;d++)this[d]=a;else{var e=R(a.toString()),f=e.length;for(d=b;c>d;d++)this[d]=e[d%f]}return this}},a.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(a.TYPED_ARRAY_SUPPORT)return new a(this).buffer;for(var b=new Uint8Array(this.length),c=0,d=b.length;d>c;c+=1)b[c]=this[c];return b.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var _=a.prototype;a._augment=function(b){return b.constructor=a,b._isBuffer=!0,b._set=b.set,b.get=_.get,b.set=_.set,b.write=_.write,b.toString=_.toString,b.toLocaleString=_.toString,b.toJSON=_.toJSON,b.equals=_.equals,b.compare=_.compare,b.indexOf=_.indexOf,b.copy=_.copy,b.slice=_.slice,b.readUIntLE=_.readUIntLE,b.readUIntBE=_.readUIntBE,b.readUInt8=_.readUInt8,b.readUInt16LE=_.readUInt16LE,b.readUInt16BE=_.readUInt16BE,b.readUInt32LE=_.readUInt32LE,b.readUInt32BE=_.readUInt32BE,b.readIntLE=_.readIntLE,b.readIntBE=_.readIntBE,b.readInt8=_.readInt8,b.readInt16LE=_.readInt16LE,b.readInt16BE=_.readInt16BE,b.readInt32LE=_.readInt32LE,b.readInt32BE=_.readInt32BE,b.readFloatLE=_.readFloatLE,b.readFloatBE=_.readFloatBE,b.readDoubleLE=_.readDoubleLE,b.readDoubleBE=_.readDoubleBE,b.writeUInt8=_.writeUInt8,b.writeUIntLE=_.writeUIntLE,b.writeUIntBE=_.writeUIntBE,b.writeUInt16LE=_.writeUInt16LE,b.writeUInt16BE=_.writeUInt16BE,b.writeUInt32LE=_.writeUInt32LE,b.writeUInt32BE=_.writeUInt32BE,b.writeIntLE=_.writeIntLE,b.writeIntBE=_.writeIntBE,b.writeInt8=_.writeInt8,b.writeInt16LE=_.writeInt16LE,b.writeInt16BE=_.writeInt16BE,b.writeInt32LE=_.writeInt32LE,b.writeInt32BE=_.writeInt32BE,b.writeFloatLE=_.writeFloatLE,b.writeFloatBE=_.writeFloatBE,b.writeDoubleLE=_.writeDoubleLE,b.writeDoubleBE=_.writeDoubleBE,b.fill=_.fill,b.inspect=_.inspect,b.toArrayBuffer=_.toArrayBuffer,b};var aa=/[^+\/0-9A-Za-z-_]/g}).call(b,c(2).Buffer,function(){return this}())},function(a,b,c){var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(a){"use strict";function b(a){var b=a.charCodeAt(0);return b===g||b===l?62:b===h||b===m?63:i>b?-1:i+10>b?b-i+26+26:k+26>b?b-k:j+26>b?b-j+26:void 0}function c(a){function c(a){j[l++]=a}var d,e,g,h,i,j;if(a.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=a.length;i="="===a.charAt(k-2)?2:"="===a.charAt(k-1)?1:0,j=new f(3*a.length/4-i),g=i>0?a.length-4:a.length;var l=0;for(d=0,e=0;g>d;d+=4,e+=3)h=b(a.charAt(d))<<18|b(a.charAt(d+1))<<12|b(a.charAt(d+2))<<6|b(a.charAt(d+3)),c((16711680&h)>>16),c((65280&h)>>8),c(255&h);return 2===i?(h=b(a.charAt(d))<<2|b(a.charAt(d+1))>>4,c(255&h)):1===i&&(h=b(a.charAt(d))<<10|b(a.charAt(d+1))<<4|b(a.charAt(d+2))>>2,c(h>>8&255),c(255&h)),j}function e(a){function b(a){return d.charAt(a)}function c(a){return b(a>>18&63)+b(a>>12&63)+b(a>>6&63)+b(63&a)}var e,f,g,h=a.length%3,i="";for(e=0,g=a.length-h;g>e;e+=3)f=(a[e]<<16)+(a[e+1]<<8)+a[e+2],i+=c(f);switch(h){case 1:f=a[a.length-1],i+=b(f>>2),i+=b(f<<4&63),i+="==";break;case 2:f=(a[a.length-2]<<8)+a[a.length-1],i+=b(f>>10),i+=b(f>>4&63),i+=b(f<<2&63),i+="="}return i}var f="undefined"!=typeof Uint8Array?Uint8Array:Array,g="+".charCodeAt(0),h="/".charCodeAt(0),i="0".charCodeAt(0),j="a".charCodeAt(0),k="A".charCodeAt(0),l="-".charCodeAt(0),m="_".charCodeAt(0);a.toByteArray=c,a.fromByteArray=e}(b)},function(a,b){b.read=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<>1,k=-7,l=c?e-1:0,m=c?-1:1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?NaN:(n?-1:1)*(1/0);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},b.write=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?0:f-1,o=d?1:-1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},function(a,b){var c=Array.isArray,d=Object.prototype.toString;a.exports=c||function(a){return!!a&&"[object Array]"==d.call(a)}},function(a,b,c){"use strict";function d(a){this.fontDescriptors=a}function e(a){if(!a)return null;if("number"==typeof a||a instanceof Number)a={left:a,right:a,top:a,bottom:a};else if(a instanceof Array)if(2===a.length)a={left:a[0],top:a[1],right:a[0],bottom:a[1]};else{if(4!==a.length)throw"Invalid pageMargins definition";a={left:a[0],top:a[1],right:a[2],bottom:a[3]}}return a}function f(a){a.registerTableLayouts({noBorders:{hLineWidth:function(a){return 0},vLineWidth:function(a){return 0},paddingLeft:function(a){return a&&4||0},paddingRight:function(a,b){return ab.options.size[1]?"landscape":"portrait";if(a.pageSize.orientation!==c){var d=b.options.size[0],e=b.options.size[1];b.options.size=[e,d]}}function i(a,b,c){c._pdfMakePages=a;for(var d=0;d0&&(h(a[d],c),c.addPage(c.options));for(var e=a[d],f=0,g=e.items.length;g>f;f++){var i=e.items[f];switch(i.type){case"vector":l(i.item,c);break;case"line":j(i.item,i.item.x,i.item.y,c);break;case"image":m(i.item,i.item.x,i.item.y,c)}}e.watermark&&k(e,c),b.setFontRefsToPdfDoc()}}function j(a,b,c,d){b=b||0,c=c||0;var e=a.getHeight(),f=a.getAscenderHeight();s.drawBackground(a,b,c,d);for(var g=0,h=a.inlines.length;h>g;g++){var i=a.inlines[g];d.fill(i.color||"black"),d.save(),d.transform(1,0,0,-1,0,d.page.height);var j=i.font.encode(i.text);d.addContent("BT"),d.addContent(""+(b+i.x)+" "+(d.page.height-c-f)+" Td"),d.addContent("/"+j.fontId+" "+i.fontSize+" Tf"),d.addContent("<"+j.encodedText+"> Tj"),d.addContent("ET"),i.link&&d.link(b+i.x,d.page.height-c-e,i.width,e,i.link),d.restore()}s.drawDecorations(a,b,c,d)}function k(a,b){var c=a.watermark;b.fill("black"),b.opacity(.6),b.save(),b.transform(1,0,0,-1,0,b.page.height);var d=180*Math.atan2(b.page.height,b.page.width)/Math.PI;b.rotate(d,{origin:[b.page.width/2,b.page.height/2]});var e=c.font.encode(c.text);b.addContent("BT"),b.addContent(""+(b.page.width/2-c.size.size.width/2)+" "+(b.page.height/2-c.size.size.height/4)+" Td"),b.addContent("/"+e.fontId+" "+c.size.fontSize+" Tf"),b.addContent("<"+e.encodedText+"> Tj"),b.addContent("ET"),b.restore()}function l(a,b){switch(b.lineWidth(a.lineWidth||1),a.dash?b.dash(a.dash.length,{space:a.dash.space||a.dash.length}):b.undash(),b.fillOpacity(a.fillOpacity||1),b.strokeOpacity(a.strokeOpacity||1),b.lineJoin(a.lineJoin||"miter"),a.type){case"ellipse":b.ellipse(a.x,a.y,a.r1,a.r2);break;case"rect":a.r?b.roundedRect(a.x,a.y,a.w,a.h,a.r):b.rect(a.x,a.y,a.w,a.h);break;case"line":b.moveTo(a.x1,a.y1),b.lineTo(a.x2,a.y2);break;case"polyline":if(0===a.points.length)break;b.moveTo(a.points[0].x,a.points[0].y);for(var c=1,d=a.points.length;d>c;c++)b.lineTo(a.points[c].x,a.points[c].y);if(a.points.length>1){var e=a.points[0],f=a.points[a.points.length-1];(a.closePath||e.x===f.x&&e.y===f.y)&&b.closePath()}}a.color&&a.lineColor?b.fillAndStroke(a.color,a.lineColor):a.color?b.fill(a.color):b.stroke(a.lineColor||"black")}function m(a,b,c,d){d.image(a.image,a.x,a.y,{width:a._width,height:a._height})}var n=(c(7),c(9)),o=c(11),p=c(24),q=(c(46),c(102)),r=c(103),s=c(104),n=c(9);d.prototype.createPdfKitDocument=function(a,b){b=b||{};var c=g(a.pageSize||"a4");if("landscape"===a.pageOrientation&&(c={width:c.height,height:c.width}),c.orientation="landscape"===a.pageOrientation?a.pageOrientation:"portrait",this.pdfKitDoc=new p({size:[c.width,c.height],compress:!1}),this.pdfKitDoc.info.Producer="pdfmake",this.pdfKitDoc.info.Creator="pdfmake",a.info){a.info;this.pdfKitDoc.info.Title=a.info.title?a.info.title:null,this.pdfKitDoc.info.Author=a.info.author?a.info.author:null,this.pdfKitDoc.info.Subject=a.info.subject?a.info.subject:null,this.pdfKitDoc.info.Keywords=a.info.keywords?a.info.keywords:null}this.fontProvider=new n(this.fontDescriptors,this.pdfKitDoc),a.images=a.images||{};var d=new o(c,e(a.pageMargins||40),new r(this.pdfKitDoc,a.images));f(d),b.tableLayouts&&d.registerTableLayouts(b.tableLayouts);var h=d.layoutDocument(a.content,this.fontProvider,a.styles||{},a.defaultStyle||{fontSize:12,font:"Roboto"},a.background,a.header,a.footer,a.images,a.watermark,a.pageBreakBefore);if(i(h,this.fontProvider,this.pdfKitDoc),b.autoPrint){var j=this.pdfKitDoc.ref({Type:"Action",S:"Named",N:"Print"});this.pdfKitDoc._root.data.OpenAction=j,j.end()}return this.pdfKitDoc};a.exports=d,d.prototype.fs=c(44)},function(a,b,c){var d;(function(a,e){(function(){function f(a,b){if(a!==b){var c=null===a,d=a===B,e=a===a,f=null===b,g=b===B,h=b===b;if(a>b&&!f||!e||c&&!g&&h||d&&h)return 1;if(b>a&&!c||!h||f&&!d&&e||g&&e)return-1}return 0}function g(a,b,c){for(var d=a.length,e=c?d:-1;c?e--:++e-1;);return c}function l(a,b){for(var c=a.length;c--&&b.indexOf(a.charAt(c))>-1;);return c}function m(a,b){return f(a.criteria,b.criteria)||a.index-b.index}function n(a,b,c){for(var d=-1,e=a.criteria,g=b.criteria,h=e.length,i=c.length;++d=i)return j;var k=c[d];return j*("asc"===k||k===!0?1:-1)}}return a.index-b.index}function o(a){return Ua[a]}function p(a){return Va[a]}function q(a,b,c){return b?a=Ya[a]:c&&(a=Za[a]),"\\"+a}function r(a){return"\\"+Za[a]}function s(a,b,c){for(var d=a.length,e=b+(c?0:-1);c?e--:++e=a&&a>=9&&13>=a||32==a||160==a||5760==a||6158==a||a>=8192&&(8202>=a||8232==a||8233==a||8239==a||8287==a||12288==a||65279==a)}function v(a,b){for(var c=-1,d=a.length,e=-1,f=[];++cb,e=c?a.length:0,f=Tc(0,e,this.__views__),g=f.start,h=f.end,i=h-g,j=d?h:g-1,k=this.__iteratees__,l=k.length,m=0,n=wg(i,this.__takeCount__);if(!c||Q>e||e==i&&n==i)return cc(d&&c?a.reverse():a,this.__actions__);var o=[];a:for(;i--&&n>m;){j+=b;for(var p=-1,q=a[j];++p=Q?oc(b):null,j=b.length;i&&(f=Za,g=!1,b=i);a:for(;++ec&&(c=-c>e?0:e+c),d=d===B||d>e?e:+d||0,0>d&&(d+=e),e=c>d?0:d>>>0,c>>>=0;e>c;)a[c++]=b;return a}function Bb(a,b){var c=[];return Jg(a,function(a,d,e){b(a,d,e)&&c.push(a)}),c}function Cb(a,b,c,d){var e;return c(a,function(a,c,f){return b(a,c,f)?(e=d?c:a,!1):void 0}),e}function Db(a,b,c,d){d||(d=[]);for(var e=-1,f=a.length;++ed;)a=a[b[d++]];return d&&d==e?a:B}}function Jb(a,b,c,d,e,f){return a===b?!0:null==a||null==b||!He(a)&&!t(b)?a!==a&&b!==b:Kb(a,b,Jb,c,d,e,f)}function Kb(a,b,c,d,e,f,g){var h=Ch(a),i=Ch(b),j=W,k=W;h||(j=cg.call(a),j==V?j=ba:j!=ba&&(h=Qe(a))),i||(k=cg.call(b),k==V?k=ba:k!=ba&&(i=Qe(b)));var l=j==ba,m=k==ba,n=j==k;if(n&&!h&&!l)return Mc(a,b,j);if(!e){var o=l&&ag.call(a,"__wrapped__"),p=m&&ag.call(b,"__wrapped__");if(o||p)return c(o?a.value():a,p?b.value():b,d,e,f,g)}if(!n)return!1;f||(f=[]),g||(g=[]);for(var q=f.length;q--;)if(f[q]==a)return g[q]==b;f.push(a),g.push(b);var r=(h?Lc:Nc)(a,b,c,d,e,f,g);return f.pop(),g.pop(),r}function Lb(a,b,c){var d=b.length,e=d,f=!c;if(null==a)return!e;for(a=kd(a);d--;){var g=b[d];if(f&&g[2]?g[1]!==a[g[0]]:!(g[0]in a))return!1}for(;++db&&(b=-b>e?0:e+b),c=c===B||c>e?e:+c||0,0>c&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Of(e);++d=Q,i=g?oc():null,j=[];i?(d=Za,f=!1):(g=!1,i=b?[]:j);a:for(;++c=e){for(;e>d;){var f=d+e>>>1,g=a[f];(c?b>=g:b>g)&&null!==g?d=f+1:e=f}return e}return ec(a,b,Bf,c)}function ec(a,b,c,d){b=c(b);for(var e=0,f=a?a.length:0,g=b!==b,h=null===b,i=b===B;f>e;){var j=rg((e+f)/2),k=c(a[j]),l=k!==B,m=k===k;if(g)var n=m||d;else n=h?m&&l&&(d||null!=k):i?m&&(d||l):null==k?!1:d?b>=k:b>k;n?e=j+1:f=j}return wg(f,Dg)}function fc(a,b,c){if("function"!=typeof a)return Bf;if(b===B)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)};case 5:return function(c,d,e,f,g){return a.call(b,c,d,e,f,g)}}return function(){return a.apply(b,arguments)}}function gc(a){var b=new fg(a.byteLength),c=new ng(b);return c.set(new ng(a)),b}function hc(a,b,c){for(var d=c.length,e=-1,f=vg(a.length-d,0),g=-1,h=b.length,i=Of(h+f);++g2?c[e-2]:B,g=e>2?c[2]:B,h=e>1?c[e-1]:B;for("function"==typeof f?(f=fc(f,h,5),e-=2):(f="function"==typeof h?h:B,e-=f?1:0),g&&$c(c[0],c[1],g)&&(f=3>e?B:f,e=1);++d-1?c[f]:B}return Cb(c,d,a)}}function vc(a){return function(b,c,d){return b&&b.length?(c=Oc(c,d,3),g(b,c,a)):-1}}function wc(a){return function(b,c,d){return c=Oc(c,d,3),Cb(b,c,a,!0)}}function xc(a){return function(){for(var b,c=arguments.length,e=a?c:-1,f=0,g=Of(c);a?e--:++e=Q)return b.plant(d).value();for(var e=0,f=c?g[e].apply(this,a):d;++es){var y=h?ab(h):B,z=vg(j-s,0),A=o?x:B,C=o?B:x,F=o?u:B,G=o?B:u;b|=o?I:J,b&=~(o?J:I),p||(b&=~(D|E));var H=[a,b,c,F,A,G,C,y,i,z],K=Fc.apply(B,H);return ad(a)&&Qg(K,H),K.placeholder=w,K}}var L=m?c:this,M=n?L[a]:a;return h&&(u=hd(u,h)),l&&i=b||!tg(b))return"";var e=b-d;return c=null==c?" ":c+"",qf(c,pg(e/c.length)).slice(0,e)}function Hc(a,b,c,d){function e(){for(var b=-1,h=arguments.length,i=-1,j=d.length,k=Of(j+h);++ii))return!1;for(;++h-1&&a%1==0&&b>a}function $c(a,b,c){if(!He(c))return!1;var d=typeof b;if("number"==d?Yc(c)&&Zc(b,c.length):"string"==d&&b in c){var e=c[b];return a===a?a===e:e!==e}return!1}function _c(a,b){var c=typeof a;if("string"==c&&Ba.test(a)||"number"==c)return!0;if(Ch(a))return!1;var d=!Aa.test(a);return d||null!=b&&a in kd(b)}function ad(a){var c=Pc(a);if(!(c in e.prototype))return!1;var d=b[c];if(a===d)return!0;var f=Og(d);return!!f&&a===f[0]}function bd(a){return"number"==typeof a&&a>-1&&a%1==0&&Fg>=a}function cd(a){return a===a&&!He(a)}function dd(a,b){var c=a[1],d=b[1],e=c|d,f=K>e,g=d==K&&c==G||d==K&&c==L&&a[7].length<=b[8]||d==(K|L)&&c==G;if(!f&&!g)return a;d&D&&(a[2]=b[2],e|=c&D?0:F);var h=b[3];if(h){var i=a[3];a[3]=i?hc(i,h,b[4]):ab(h),a[4]=i?v(a[3],U):ab(b[4])}return h=b[5],h&&(i=a[5],a[5]=i?ic(i,h,b[6]):ab(h),a[6]=i?v(a[5],U):ab(b[6])),h=b[7],h&&(a[7]=ab(h)),d&K&&(a[8]=null==a[8]?b[8]:wg(a[8],b[8])),null==a[9]&&(a[9]=b[9]),a[0]=b[0],a[1]=e,a}function ed(a,b){return a===B?b:Dh(a,b,ed)}function fd(a,b){a=kd(a);for(var c=-1,d=b.length,e={};++cd;)g[++f]=Wb(a,d,d+=b);return g}function od(a){for(var b=-1,c=a?a.length:0,d=-1,e=[];++bb?0:b)):[]}function qd(a,b,c){var d=a?a.length:0;return d?((c?$c(a,b,c):null==b)&&(b=1),b=d-(+b||0),Wb(a,0,0>b?0:b)):[]}function rd(a,b,c){return a&&a.length?bc(a,Oc(b,c,3),!0,!0):[]}function sd(a,b,c){return a&&a.length?bc(a,Oc(b,c,3),!0):[]}function td(a,b,c,d){var e=a?a.length:0;return e?(c&&"number"!=typeof c&&$c(a,b,c)&&(c=0,d=e),Ab(a,b,c,d)):[]}function ud(a){return a?a[0]:B}function vd(a,b,c){var d=a?a.length:0;return c&&$c(a,b,c)&&(b=!1),d?Db(a,b):[]}function wd(a){var b=a?a.length:0;return b?Db(a,!0):[]}function xd(a,b,c){var d=a?a.length:0;if(!d)return-1;if("number"==typeof c)c=0>c?vg(d+c,0):c;else if(c){var e=dc(a,b);return d>e&&(b===b?b===a[e]:a[e]!==a[e])?e:-1}return h(a,b,c||0)}function yd(a){return qd(a,1)}function zd(a){var b=a?a.length:0;return b?a[b-1]:B}function Ad(a,b,c){var d=a?a.length:0;if(!d)return-1;var e=d;if("number"==typeof c)e=(0>c?vg(d+c,0):wg(c||0,d-1))+1;else if(c){e=dc(a,b,!0)-1;var f=a[e];return(b===b?b===f:f!==f)?e:-1}if(b!==b)return s(a,e,!0);for(;e--;)if(a[e]===b)return e;return-1}function Bd(){var a=arguments,b=a[0];if(!b||!b.length)return b;for(var c=0,d=Qc(),e=a.length;++c-1;)mg.call(b,f,1);return b}function Cd(a,b,c){var d=[];if(!a||!a.length)return d;var e=-1,f=[],g=a.length;for(b=Oc(b,c,3);++eb?0:b)):[]}function Gd(a,b,c){var d=a?a.length:0;return d?((c?$c(a,b,c):null==b)&&(b=1),b=d-(+b||0),Wb(a,0>b?0:b)):[]}function Hd(a,b,c){return a&&a.length?bc(a,Oc(b,c,3),!1,!0):[]}function Id(a,b,c){return a&&a.length?bc(a,Oc(b,c,3)):[]}function Jd(a,b,c,d){var e=a?a.length:0;if(!e)return[];null!=b&&"boolean"!=typeof b&&(d=c,c=$c(a,b,d)?B:b,b=!1);var f=Oc();return(null!=c||f!==ub)&&(c=f(c,d,3)),b&&Qc()==h?w(a,c):_b(a,c)}function Kd(a){if(!a||!a.length)return[];var b=-1,c=0;a=hb(a,function(a){return Yc(a)?(c=vg(a.length,c),!0):void 0});for(var d=Of(c);++bc?vg(e+c,0):c||0,"string"==typeof a||!Ch(a)&&Pe(a)?e>=c&&a.indexOf(b,c)>-1:!!e&&Qc(a,b,c)>-1}function _d(a,b,c){var d=Ch(a)?ib:Mb;return b=Oc(b,c,3),d(a,b)}function ae(a,b){return _d(a,Hf(b))}function be(a,b,c){var d=Ch(a)?hb:Bb;return b=Oc(b,c,3),d(a,function(a,c,d){return!b(a,c,d)})}function ce(a,b,c){if(c?$c(a,b,c):null==b){a=jd(a);var d=a.length;return d>0?a[Ub(0,d-1)]:B}var e=-1,f=Ue(a),d=f.length,g=d-1;for(b=wg(0>b?0:+b||0,d);++e0&&(c=b.apply(this,arguments)),1>=a&&(b=B),c}}function me(a,b,c){function d(){n&&gg(n),j&&gg(j),p=0,j=n=o=B}function e(b,c){c&&gg(c),j=n=o=B,b&&(p=oh(),k=a.apply(m,i),n||j||(i=m=B))}function f(){var a=b-(oh()-l);0>=a||a>b?e(o,j):n=lg(f,a)}function g(){e(r,n)}function h(){if(i=arguments,l=oh(),m=this,o=r&&(n||!s),q===!1)var c=s&&!n;else{j||s||(p=l);var d=q-(l-p),e=0>=d||d>q;e?(j&&(j=gg(j)),p=l,k=a.apply(m,i)):j||(j=lg(g,d))}return e&&n?n=gg(n):n||b===q||(n=lg(f,b)),c&&(e=!0,k=a.apply(m,i)),!e||n||j||(i=m=B),k}var i,j,k,l,m,n,o,p=0,q=!1,r=!0;if("function"!=typeof a)throw new Xf(T);if(b=0>b?0:+b||0,c===!0){var s=!0;r=!1}else He(c)&&(s=!!c.leading,q="maxWait"in c&&vg(+c.maxWait||0,b),r="trailing"in c?!!c.trailing:r);return h.cancel=d,h}function ne(a,b){if("function"!=typeof a||b&&"function"!=typeof b)throw new Xf(T);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g),g};return c.cache=new ne.Cache,c}function oe(a){if("function"!=typeof a)throw new Xf(T);return function(){return!a.apply(this,arguments)}}function pe(a){return le(2,a)}function qe(a,b){if("function"!=typeof a)throw new Xf(T);return b=vg(b===B?a.length-1:+b||0,0),function(){for(var c=arguments,d=-1,e=vg(c.length-b,0),f=Of(e);++db}function xe(a,b){return a>=b}function ye(a){return t(a)&&Yc(a)&&ag.call(a,"callee")&&!jg.call(a,"callee")}function ze(a){return a===!0||a===!1||t(a)&&cg.call(a)==X}function Ae(a){return t(a)&&cg.call(a)==Y}function Be(a){return!!a&&1===a.nodeType&&t(a)&&!Ne(a)}function Ce(a){return null==a?!0:Yc(a)&&(Ch(a)||Pe(a)||ye(a)||t(a)&&Ge(a.splice))?!a.length:!Nh(a).length}function De(a,b,c,d){c="function"==typeof c?fc(c,d,3):B;var e=c?c(a,b):B;return e===B?Jb(a,b,c):!!e}function Ee(a){return t(a)&&"string"==typeof a.message&&cg.call(a)==Z}function Fe(a){return"number"==typeof a&&tg(a)}function Ge(a){return He(a)&&cg.call(a)==$}function He(a){var b=typeof a;return!!a&&("object"==b||"function"==b)}function Ie(a,b,c,d){return c="function"==typeof c?fc(c,d,3):B,Lb(a,Rc(b),c)}function Je(a){return Me(a)&&a!=+a}function Ke(a){return null==a?!1:Ge(a)?eg.test(_f.call(a)):t(a)&&Ka.test(a)}function Le(a){return null===a}function Me(a){return"number"==typeof a||t(a)&&cg.call(a)==aa}function Ne(a){var b;if(!t(a)||cg.call(a)!=ba||ye(a)||!ag.call(a,"constructor")&&(b=a.constructor,"function"==typeof b&&!(b instanceof b)))return!1;var c;return Eb(a,function(a,b){c=b}),c===B||ag.call(a,c)}function Oe(a){return He(a)&&cg.call(a)==ca}function Pe(a){return"string"==typeof a||t(a)&&cg.call(a)==ea}function Qe(a){return t(a)&&bd(a.length)&&!!Sa[cg.call(a)]}function Re(a){return a===B}function Se(a,b){return b>a}function Te(a,b){return b>=a}function Ue(a){var b=a?Pg(a):0;return bd(b)?b?ab(a):[]:ef(a)}function Ve(a){return tb(a,_e(a))}function We(a,b,c){var d=Ig(a);return c&&$c(a,b,c)&&(b=B),b?rb(d,b):d}function Xe(a){return Hb(a,_e(a))}function Ye(a,b,c){var d=null==a?B:Ib(a,ld(b),b+"");return d===B?c:d}function Ze(a,b){if(null==a)return!1;var c=ag.call(a,b);if(!c&&!_c(b)){if(b=ld(b),a=1==b.length?a:Ib(a,Wb(b,0,-1)),null==a)return!1;b=zd(b),c=ag.call(a,b)}return c||bd(a.length)&&Zc(b,a.length)&&(Ch(a)||ye(a))}function $e(a,b,c){c&&$c(a,b,c)&&(b=B);for(var d=-1,e=Nh(a),f=e.length,g={};++d0;++d=wg(b,c)&&ac?0:+c||0,d),c-=b.length,c>=0&&a.indexOf(b,c)==c}function mf(a){return a=j(a),a&&wa.test(a)?a.replace(ua,p):a}function nf(a){return a=j(a),a&&Ea.test(a)?a.replace(Da,q):a||"(?:)"}function of(a,b,c){a=j(a),b=+b;var d=a.length;if(d>=b||!tg(b))return a;var e=(b-d)/2,f=rg(e),g=pg(e);return c=Gc("",g,c),c.slice(0,f)+a+c}function pf(a,b,c){return(c?$c(a,b,c):null==b)?b=0:b&&(b=+b),a=tf(a),yg(a,b||(Ja.test(a)?16:10))}function qf(a,b){var c="";if(a=j(a),b=+b,1>b||!a||!tg(b))return c;do b%2&&(c+=a),b=rg(b/2),a+=a;while(b);return c}function rf(a,b,c){return a=j(a),c=null==c?0:wg(0>c?0:+c||0,a.length),a.lastIndexOf(b,c)==c}function sf(a,c,d){var e=b.templateSettings;d&&$c(a,c,d)&&(c=d=B),a=j(a),c=qb(rb({},d||c),e,pb);var f,g,h=qb(rb({},c.imports),e.imports,pb),i=Nh(h),k=ac(h,i),l=0,m=c.interpolate||Na,n="__p += '",o=Vf((c.escape||Na).source+"|"+m.source+"|"+(m===za?Ha:Na).source+"|"+(c.evaluate||Na).source+"|$","g"),p="//# sourceURL="+("sourceURL"in c?c.sourceURL:"lodash.templateSources["+ ++Ra+"]")+"\n";a.replace(o,function(b,c,d,e,h,i){return d||(d=e),n+=a.slice(l,i).replace(Oa,r),c&&(f=!0,n+="' +\n__e("+c+") +\n'"),h&&(g=!0,n+="';\n"+h+";\n__p += '"),d&&(n+="' +\n((__t = ("+d+")) == null ? '' : __t) +\n'"),l=i+b.length,b}),n+="';\n";var q=c.variable;q||(n="with (obj) {\n"+n+"\n}\n"),n=(g?n.replace(qa,""):n).replace(ra,"$1").replace(sa,"$1;"),n="function("+(q||"obj")+") {\n"+(q?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(f?", __e = _.escape":"")+(g?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+n+"return __p\n}";var s=Yh(function(){return Rf(i,p+"return "+n).apply(B,k)});if(s.source=n,Ee(s))throw s;return s}function tf(a,b,c){var d=a;return(a=j(a))?(c?$c(d,b,c):null==b)?a.slice(x(a),y(a)+1):(b+="",a.slice(k(a,b),l(a,b)+1)):a}function uf(a,b,c){var d=a;return a=j(a),a?(c?$c(d,b,c):null==b)?a.slice(x(a)):a.slice(k(a,b+"")):a}function vf(a,b,c){var d=a;return a=j(a),a?(c?$c(d,b,c):null==b)?a.slice(0,y(a)+1):a.slice(0,l(a,b+"")+1):a}function wf(a,b,c){c&&$c(a,b,c)&&(b=B);var d=M,e=N;if(null!=b)if(He(b)){var f="separator"in b?b.separator:f;d="length"in b?+b.length||0:d,e="omission"in b?j(b.omission):e}else d=+b||0;if(a=j(a),d>=a.length)return a;var g=d-e.length;if(1>g)return e;var h=a.slice(0,g);if(null==f)return h+e;if(Oe(f)){if(a.slice(g).search(f)){var i,k,l=a.slice(0,g);for(f.global||(f=Vf(f.source,(Ia.exec(f)||"")+"g")),f.lastIndex=0;i=f.exec(l);)k=i.index;h=h.slice(0,null==k?g:k)}}else if(a.indexOf(f,g)!=g){var m=h.lastIndexOf(f);m>-1&&(h=h.slice(0,m))}return h+e}function xf(a){return a=j(a),a&&va.test(a)?a.replace(ta,z):a}function yf(a,b,c){return c&&$c(a,b,c)&&(b=B),a=j(a),a.match(b||Pa)||[]}function zf(a,b,c){return c&&$c(a,b,c)&&(b=B),t(a)?Cf(a):ub(a,b)}function Af(a){return function(){return a}}function Bf(a){return a}function Cf(a){return Nb(vb(a,!0))}function Df(a,b){return Ob(a,vb(b,!0))}function Ef(a,b,c){if(null==c){var d=He(b),e=d?Nh(b):B,f=e&&e.length?Hb(b,e):B;(f?f.length:d)||(f=!1,c=b,b=a,a=this)}f||(f=Hb(b,Nh(b)));var g=!0,h=-1,i=Ge(a),j=f.length;c===!1?g=!1:He(c)&&"chain"in c&&(g=c.chain);for(;++ha||!tg(a))return[];var d=-1,e=Of(wg(a,Cg));for(b=fc(b,c,1);++dd?e[d]=b(d):b(d);return e}function Lf(a){var b=++bg;return j(a)+b}function Mf(a,b){return(+a||0)+(+b||0)}function Nf(a,b,c){return c&&$c(a,b,c)&&(b=B),b=Oc(b,c,3),1==b.length?nb(Ch(a)?a:jd(a),b):$b(a,b)}a=a?eb.defaults(db.Object(),a,eb.pick(db,Qa)):db;var Of=a.Array,Pf=a.Date,Qf=a.Error,Rf=a.Function,Sf=a.Math,Tf=a.Number,Uf=a.Object,Vf=a.RegExp,Wf=a.String,Xf=a.TypeError,Yf=Of.prototype,Zf=Uf.prototype,$f=Wf.prototype,_f=Rf.prototype.toString,ag=Zf.hasOwnProperty,bg=0,cg=Zf.toString,dg=db._,eg=Vf("^"+_f.call(ag).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fg=a.ArrayBuffer,gg=a.clearTimeout,hg=a.parseFloat,ig=Sf.pow,jg=Zf.propertyIsEnumerable,kg=Sc(a,"Set"),lg=a.setTimeout,mg=Yf.splice,ng=a.Uint8Array,og=Sc(a,"WeakMap"),pg=Sf.ceil,qg=Sc(Uf,"create"),rg=Sf.floor,sg=Sc(Of,"isArray"),tg=a.isFinite,ug=Sc(Uf,"keys"),vg=Sf.max,wg=Sf.min,xg=Sc(Pf,"now"),yg=a.parseInt,zg=Sf.random,Ag=Tf.NEGATIVE_INFINITY,Bg=Tf.POSITIVE_INFINITY,Cg=4294967295,Dg=Cg-1,Eg=Cg>>>1,Fg=9007199254740991,Gg=og&&new og,Hg={};b.support={};b.templateSettings={escape:xa,evaluate:ya,interpolate:za, +variable:"",imports:{_:b}};var Ig=function(){function a(){}return function(b){if(He(b)){a.prototype=b;var c=new a;a.prototype=B}return c||{}}}(),Jg=lc(Fb),Kg=lc(Gb,!0),Lg=mc(),Mg=mc(!0),Ng=Gg?function(a,b){return Gg.set(a,b),a}:Bf,Og=Gg?function(a){return Gg.get(a)}:Gf,Pg=Rb("length"),Qg=function(){var a=0,b=0;return function(c,d){var e=oh(),f=P-(e-b);if(b=e,f>0){if(++a>=O)return c}else a=0;return Ng(c,d)}}(),Rg=qe(function(a,b){return t(a)&&Yc(a)?xb(a,Db(b,!1,!0)):[]}),Sg=vc(),Tg=vc(!0),Ug=qe(function(a){for(var b=a.length,c=b,d=Of(l),e=Qc(),f=e==h,g=[];c--;){var i=a[c]=Yc(i=a[c])?i:[];d[c]=f&&i.length>=120?oc(c&&i):null}var j=a[0],k=-1,l=j?j.length:0,m=d[0];a:for(;++k2?a[b-2]:B,d=b>1?a[b-1]:B;return b>2&&"function"==typeof c?b-=2:(c=b>1&&"function"==typeof d?(--b,d):B,d=B),a.length=b,Ld(a,c,d)}),ah=qe(function(a){return a=Db(a),this.thru(function(b){return _a(Ch(b)?b:[kd(b)],a)})}),bh=qe(function(a,b){return sb(a,Db(b))}),ch=jc(function(a,b,c){ag.call(a,c)?++a[c]:a[c]=1}),dh=uc(Jg),eh=uc(Kg,!0),fh=yc(bb,Jg),gh=yc(cb,Kg),hh=jc(function(a,b,c){ag.call(a,c)?a[c].push(b):a[c]=[b]}),ih=jc(function(a,b,c){a[c]=b}),jh=qe(function(a,b,c){var d=-1,e="function"==typeof b,f=_c(b),g=Yc(a)?Of(a.length):[];return Jg(a,function(a){var h=e?b:f&&null!=a?a[b]:B;g[++d]=h?h.apply(a,c):Xc(a,b,c)}),g}),kh=jc(function(a,b,c){a[c?0:1].push(b)},function(){return[[],[]]}),lh=Ec(kb,Jg),mh=Ec(lb,Kg),nh=qe(function(a,b){if(null==a)return[];var c=b[2];return c&&$c(b[0],b[1],c)&&(b.length=1),Zb(a,Db(b),[])}),oh=xg||function(){return(new Pf).getTime()},ph=qe(function(a,b,c){var d=D;if(c.length){var e=v(c,ph.placeholder);d|=I}return Kc(a,d,b,c,e)}),qh=qe(function(a,b){b=b.length?Db(b):Xe(a);for(var c=-1,d=b.length;++c0||0>b)?new e(c):(0>a?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==B&&(b=+b||0,c=0>b?c.dropRight(-b):c.take(b-a)),c)},e.prototype.takeRightWhile=function(a,b){return this.reverse().takeWhile(a,b).reverse()},e.prototype.toArray=function(){return this.take(Bg)},Fb(e.prototype,function(a,c){var f=/^(?:filter|map|reject)|While$/.test(c),g=/^(?:first|last)$/.test(c),h=b[g?"take"+("last"==c?"Right":""):c];h&&(b.prototype[c]=function(){var b=g?[1]:arguments,c=this.__chain__,i=this.__wrapped__,j=!!this.__actions__.length,k=i instanceof e,l=b[0],m=k||Ch(i);m&&f&&"function"==typeof l&&1!=l.length&&(k=m=!1);var n=function(a){return g&&c?h(a,1)[0]:h.apply(B,jb([a],b))},o={func:Qd,args:[n],thisArg:B},p=k&&!j;if(g&&!c)return p?(i=i.clone(),i.__actions__.push(o),a.call(i)):h.call(B,this.value())[0];if(!g&&m){i=p?i:new e(this);var q=a.apply(i,b);return q.__actions__.push(o),new d(q,c)}return this.thru(n)})}),bb(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(a){var c=(/^(?:replace|split)$/.test(a)?$f:Yf)[a],d=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",e=/^(?:join|pop|replace|shift)$/.test(a);b.prototype[a]=function(){var a=arguments;return e&&!this.__chain__?c.apply(this.value(),a):this[d](function(b){return c.apply(b,a)})}}),Fb(e.prototype,function(a,c){var d=b[c];if(d){var e=d.name,f=Hg[e]||(Hg[e]=[]);f.push({name:c,func:d})}}),Hg[Fc(B,E).name]=[{name:"wrapper",func:B}],e.prototype.clone=u,e.prototype.reverse=_,e.prototype.value=da,b.prototype.chain=Rd,b.prototype.commit=Sd,b.prototype.concat=ah,b.prototype.plant=Td,b.prototype.reverse=Ud,b.prototype.toString=Vd,b.prototype.run=b.prototype.toJSON=b.prototype.valueOf=b.prototype.value=Wd,b.prototype.collect=b.prototype.map,b.prototype.head=b.prototype.first,b.prototype.select=b.prototype.filter,b.prototype.tail=b.prototype.rest,b}var B,C="3.10.1",D=1,E=2,F=4,G=8,H=16,I=32,J=64,K=128,L=256,M=30,N="...",O=150,P=16,Q=200,R=1,S=2,T="Expected a function",U="__lodash_placeholder__",V="[object Arguments]",W="[object Array]",X="[object Boolean]",Y="[object Date]",Z="[object Error]",$="[object Function]",_="[object Map]",aa="[object Number]",ba="[object Object]",ca="[object RegExp]",da="[object Set]",ea="[object String]",fa="[object WeakMap]",ga="[object ArrayBuffer]",ha="[object Float32Array]",ia="[object Float64Array]",ja="[object Int8Array]",ka="[object Int16Array]",la="[object Int32Array]",ma="[object Uint8Array]",na="[object Uint8ClampedArray]",oa="[object Uint16Array]",pa="[object Uint32Array]",qa=/\b__p \+= '';/g,ra=/\b(__p \+=) '' \+/g,sa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ta=/&(?:amp|lt|gt|quot|#39|#96);/g,ua=/[&<>"'`]/g,va=RegExp(ta.source),wa=RegExp(ua.source),xa=/<%-([\s\S]+?)%>/g,ya=/<%([\s\S]+?)%>/g,za=/<%=([\s\S]+?)%>/g,Aa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,Ba=/^\w*$/,Ca=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Da=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,Ea=RegExp(Da.source),Fa=/[\u0300-\u036f\ufe20-\ufe23]/g,Ga=/\\(\\)?/g,Ha=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ia=/\w*$/,Ja=/^0[xX]/,Ka=/^\[object .+?Constructor\]$/,La=/^\d+$/,Ma=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Na=/($^)/,Oa=/['\n\r\u2028\u2029\\]/g,Pa=function(){var a="[A-Z\\xc0-\\xd6\\xd8-\\xde]",b="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(a+"+(?="+a+b+")|"+a+"?"+b+"|"+a+"+|[0-9]+","g")}(),Qa=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],Ra=-1,Sa={};Sa[ha]=Sa[ia]=Sa[ja]=Sa[ka]=Sa[la]=Sa[ma]=Sa[na]=Sa[oa]=Sa[pa]=!0,Sa[V]=Sa[W]=Sa[ga]=Sa[X]=Sa[Y]=Sa[Z]=Sa[$]=Sa[_]=Sa[aa]=Sa[ba]=Sa[ca]=Sa[da]=Sa[ea]=Sa[fa]=!1;var Ta={};Ta[V]=Ta[W]=Ta[ga]=Ta[X]=Ta[Y]=Ta[ha]=Ta[ia]=Ta[ja]=Ta[ka]=Ta[la]=Ta[aa]=Ta[ba]=Ta[ca]=Ta[ea]=Ta[ma]=Ta[na]=Ta[oa]=Ta[pa]=!0,Ta[Z]=Ta[$]=Ta[_]=Ta[da]=Ta[fa]=!1;var Ua={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Va={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Wa={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Xa={"function":!0,object:!0},Ya={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Za={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$a=Xa[typeof b]&&b&&!b.nodeType&&b,_a=Xa[typeof a]&&a&&!a.nodeType&&a,ab=$a&&_a&&"object"==typeof e&&e&&e.Object&&e,bb=Xa[typeof self]&&self&&self.Object&&self,cb=Xa[typeof window]&&window&&window.Object&&window,db=(_a&&_a.exports===$a&&$a,ab||cb!==(this&&this.window)&&cb||bb||this),eb=A();db._=eb,d=function(){return eb}.call(b,c,b,a),!(d!==B&&(a.exports=d))}).call(this)}).call(b,c(8)(a),function(){return this}())},function(a,b){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children=[],a.webpackPolyfill=1),a}},function(a,b,c){"use strict";function d(a,b){var c="normal";return a&&b?c="bolditalics":a?c="bold":b&&(c="italics"),c}function e(a,b){this.fonts={},this.pdfDoc=b,this.fontWrappers={};for(var c in a)if(a.hasOwnProperty(c)){var d=a[c];this.fonts[c]={normal:d.normal,bold:d.bold,italics:d.italics,bolditalics:d.bolditalics}}}var f=c(7),g=c(10);e.prototype.provideFont=function(a,b,c){var e=d(b,c);if(!this.fonts[a]||!this.fonts[a][e])throw new Error("Font '"+a+"' in style '"+e+"' is not defined in the font section of the document definition.");return this.fontWrappers[a]=this.fontWrappers[a]||{},this.fontWrappers[a][e]||(this.fontWrappers[a][e]=new g(this.pdfDoc,this.fonts[a][e],a+"("+e+")")),this.fontWrappers[a][e]},e.prototype.setFontRefsToPdfDoc=function(){var a=this;f.each(a.fontWrappers,function(b){f.each(b,function(b){f.each(b.pdfFonts,function(b){a.pdfDoc.page.fonts[b.id]||(a.pdfDoc.page.fonts[b.id]=b.ref())})})})},a.exports=e},function(a,b,c){"use strict";function d(a,b,c){this.MAX_CHAR_TYPES=92,this.pdfkitDoc=a,this.path=b,this.pdfFonts=[],this.charCatalogue=[],this.name=c,Object.defineProperty(this,"ascender",{get:function(){var a=this.getFont(0);return a.ascender}}),Object.defineProperty(this,"decender",{get:function(){var a=this.getFont(0);return a.decender}})}var e=c(7);d.prototype.getFont=function(a){if(!this.pdfFonts[a]){var b=this.name+a;this.postscriptName&&delete this.pdfkitDoc._fontFamilies[this.postscriptName],this.pdfFonts[a]=this.pdfkitDoc.font(this.path,b)._font,this.postscriptName||(this.postscriptName=this.pdfFonts[a].name)}return this.pdfFonts[a]},d.prototype.widthOfString=function(){var a=this.getFont(0);return a.widthOfString.apply(a,arguments)},d.prototype.lineHeight=function(){var a=this.getFont(0);return a.lineHeight.apply(a,arguments)},d.prototype.ref=function(){var a=this.getFont(0);return a.ref.apply(a,arguments)};var f=function(a){return a.charCodeAt(0)};d.prototype.encode=function(a){var b=this,c=e.chain(a.split("")).map(f).uniq().value();if(c.length>b.MAX_CHAR_TYPES)throw new Error("Inline has more than "+b.MAX_CHAR_TYPES+": "+a+" different character types and therefore cannot be properly embedded into pdf.");var d=function(a){return e.uniq(a.concat(c)).length<=b.MAX_CHAR_TYPES},g=e.findIndex(b.charCatalogue,d);0>g&&(g=b.charCatalogue.length,b.charCatalogue[g]=[]);var h=b.getFont(g);h.use(a),e.each(c,function(a){e.includes(b.charCatalogue[g],a)||b.charCatalogue[g].push(a)});var i=e.map(h.encode(a),function(a){return a.charCodeAt(0).toString(16)}).join("");return{encodedText:i,fontId:h.id}},a.exports=d},function(a,b,c){"use strict";function d(a,b){g.each(b,function(b){a.push(b)})}function e(a,b,c){this.pageSize=a,this.pageMargins=b,this.tracker=new h,this.imageMeasure=c,this.tableLayouts={}}function f(a){var b=a.x,c=a.y;a.positions=[],g.each(a.canvas,function(a){var b=a.x,c=a.y,d=a.x1,e=a.y1,f=a.x2,g=a.y2;a.resetXY=function(){a.x=b,a.y=c,a.x1=d,a.y1=e,a.x2=f,a.y2=g}}),a.resetXY=function(){a.x=b,a.y=c,g.each(a.canvas,function(a){a.resetXY()})}}var g=c(7),h=c(12),i=c(13),j=c(19),k=c(20),l=c(16),m=c(23),n=c(22),o=c(17).pack,p=c(17).offsetVector,q=c(17).fontStringify,r=c(17).isFunction,s=c(14),t=c(15);e.prototype.registerTableLayouts=function(a){this.tableLayouts=o(this.tableLayouts,a)},e.prototype.layoutDocument=function(a,b,c,d,e,f,h,j,k,l){function m(a,b){return r(l)?(a=g.reject(a,function(a){return g.isEmpty(a.positions)}),g.each(a,function(a){var c=g.pick(a,["id","text","ul","ol","table","image","qr","canvas","columns","headlineLevel","style","pageBreak","pageOrientation","width","height"]);c.startPosition=g.first(a.positions),c.pageNumbers=g.chain(a.positions).map("pageNumber").uniq().value(),c.pages=b.length,c.stack=g.isArray(a.stack),a.nodeInfo=c}),g.any(a,function(a,b,c){if("before"!==a.pageBreak&&!a.pageBreakCalculated){a.pageBreakCalculated=!0;var d=g.first(a.nodeInfo.pageNumbers),e=g.chain(c).drop(b+1).filter(function(a){return g.contains(a.nodeInfo.pageNumbers,d)}).value(),f=g.chain(c).drop(b+1).filter(function(a){return g.contains(a.nodeInfo.pageNumbers,d+1)}).value(),h=g.chain(c).take(b).filter(function(a){return g.contains(a.nodeInfo.pageNumbers,d)}).value();if(l(a.nodeInfo,g.map(e,"nodeInfo"),g.map(f,"nodeInfo"),g.map(h,"nodeInfo")))return a.pageBreak="before",!0}})):!1}function n(a){g.each(a.linearNodeList,function(a){a.resetXY()})}this.docMeasure=new i(b,c,d,this.imageMeasure,this.tableLayouts,j);for(var o=this.tryLayoutDocument(a,b,c,d,e,f,h,j,k);m(o.linearNodeList,o.pages);)n(o),o=this.tryLayoutDocument(a,b,c,d,e,f,h,j,k);return o.pages},e.prototype.tryLayoutDocument=function(a,b,c,d,e,f,g,h,i,l){this.linearNodeList=[],a=this.docMeasure.measureDocument(a),this.writer=new k(new j(this.pageSize,this.pageMargins),this.tracker);var m=this;return this.writer.context().tracker.startTracking("pageAdded",function(){m.addBackground(e)}),this.addBackground(e),this.processNode(a),this.addHeadersAndFooters(f,g),null!=i&&this.addWatermark(i,b),{pages:this.writer.context().pages,linearNodeList:this.linearNodeList}},e.prototype.addBackground=function(a){var b=r(a)?a:function(){return a},c=b(this.writer.context().page+1);if(c){var d=this.writer.context().getCurrentPage().pageSize;this.writer.beginUnbreakableBlock(d.width,d.height),this.processNode(this.docMeasure.measureDocument(c)),this.writer.commitUnbreakableBlock(0,0)}},e.prototype.addStaticRepeatable=function(a,b){this.addDynamicRepeatable(function(){return a},b)},e.prototype.addDynamicRepeatable=function(a,b){for(var c=this.writer.context().pages,d=0,e=c.length;e>d;d++){this.writer.context().page=d;var f=a(d+1,e);if(f){var g=b(this.writer.context().getCurrentPage().pageSize,this.pageMargins);this.writer.beginUnbreakableBlock(g.width,g.height),this.processNode(this.docMeasure.measureDocument(f)),this.writer.commitUnbreakableBlock(g.x,g.y)}}},e.prototype.addHeadersAndFooters=function(a,b){var c=function(a,b){return{x:0,y:0,width:a.width,height:b.top}},d=function(a,b){return{x:0,y:a.height-b.bottom,width:a.width,height:b.bottom}};r(a)?this.addDynamicRepeatable(a,c):a&&this.addStaticRepeatable(a,c),r(b)?this.addDynamicRepeatable(b,d):b&&this.addStaticRepeatable(b,d)},e.prototype.addWatermark=function(a,b){function c(a,b,c){for(var d,e=a.width,f=a.height,g=.8*Math.sqrt(e*e+f*f),h=new s(c),i=new t,j=0,k=1e3,l=(j+k)/2;Math.abs(j-k)>1;)i.push({fontSize:l}),d=h.sizeOfString(b,i),d.width>g?(k=l,l=(j+k)/2):d.widthg;g++)f[g].watermark=e},e.prototype.processNode=function(a){function b(b){var d=a._margin;"before"===a.pageBreak&&c.writer.moveToNextPage(a.pageOrientation),d&&(c.writer.context().moveDown(d[1]),c.writer.context().addMargin(d[0],d[2])),b(),d&&(c.writer.context().addMargin(-d[0],-d[2]),c.writer.context().moveDown(d[3])),"after"===a.pageBreak&&c.writer.moveToNextPage(a.pageOrientation)}var c=this;this.linearNodeList.push(a),f(a),b(function(){var b=a.absolutePosition;if(b&&(c.writer.context().beginDetachedBlock(),c.writer.context().moveTo(b.x||0,b.y||0)),a.stack)c.processVerticalContainer(a);else if(a.columns)c.processColumns(a);else if(a.ul)c.processList(!1,a);else if(a.ol)c.processList(!0,a);else if(a.table)c.processTable(a);else if(void 0!==a.text)c.processLeaf(a);else if(a.image)c.processImage(a);else if(a.canvas)c.processCanvas(a);else if(a.qr)c.processQr(a);else if(!a._span)throw"Unrecognized document structure: "+JSON.stringify(a,q);b&&c.writer.context().endDetachedBlock()})},e.prototype.processVerticalContainer=function(a){var b=this;a.stack.forEach(function(c){b.processNode(c),d(a.positions,c.positions)})},e.prototype.processColumns=function(a){function b(a){if(!a)return null;var b=[];b.push(0);for(var d=c.length-1;d>0;d--)b.push(a);return b}var c=a.columns,e=this.writer.context().availableWidth,f=b(a._gap);f&&(e-=(f.length-1)*a._gap),l.buildColumnWidths(c,e);var g=this.processRow(c,c,f);d(a.positions,g.positions)},e.prototype.processRow=function(a,b,c,e,f){function g(a){for(var b,c=0,d=k.length;d>c;c++){var e=k[c];if(e.prevPage===a.prevPage){b=e;break}}b||(b=a,k.push(b)),b.prevY=Math.max(b.prevY,a.prevY),b.y=Math.min(b.y,a.y)}function h(a){return c&&c.length>a?c[a]:0}function i(a,b){if(a.rowSpan&&a.rowSpan>1){var c=f+a.rowSpan-1;if(c>=e.length)throw"Row span for column "+b+" (with indexes starting from 0) exceeded row count";return e[c][b]}return null}var j=this,k=[],l=[];return this.tracker.auto("pageChanged",g,function(){b=b||a,j.writer.context().beginColumnGroup();for(var e=0,f=a.length;f>e;e++){var g=a[e],k=b[e]._calcWidth,m=h(e);if(g.colSpan&&g.colSpan>1)for(var n=1;nc;c++){b.beginRow(c,this.writer);var f=this.processRow(a.table.body[c],a.table.widths,a._offsets.offsets,a.table.body,c);d(a.positions,f.positions),b.endRow(c,this.writer,f.pageBreaks)}b.endTable(this.writer)},e.prototype.processLeaf=function(a){for(var b=this.buildNextLine(a),c=b?b.getHeight():0,d=a.maxHeight||-1;b&&(-1===d||d>c);){var e=this.writer.addLine(b);a.positions.push(e),b=this.buildNextLine(a),b&&(c+=b.getHeight())}},e.prototype.buildNextLine=function(a){if(!a._inlines||0===a._inlines.length)return null;for(var b=new n(this.writer.context().availableWidth);a._inlines&&a._inlines.length>0&&b.hasEnoughSpaceForInline(a._inlines[0]);)b.addInline(a._inlines.shift());return b.lastLineInParagraph=0===a._inlines.length,b},e.prototype.processImage=function(a){var b=this.writer.addImage(a);a.positions.push(b)},e.prototype.processCanvas=function(a){var b=a._minHeight;this.writer.context().availableHeight=0&&c.splice(d,1)}},c.prototype.emit=function(a){var b=Array.prototype.slice.call(arguments,1),c=this.events[a];c&&c.forEach(function(a){a.apply(this,b)})},c.prototype.auto=function(a,b,c){this.startTracking(a,b),c(),this.stopTracking(a,b)},a.exports=c},function(a,b,c){"use strict";function d(a,b,c,d,g,h){this.textTools=new e(a),this.styleStack=new f(b,c),this.imageMeasure=d,this.tableLayouts=g,this.images=h,this.autoImageIndex=1}var e=c(14),f=c(15),g=c(16),h=c(17).fontStringify,i=c(17).pack,j=c(18);d.prototype.measureDocument=function(a){return this.measureNode(a)},d.prototype.measureNode=function(a){function b(a){var b=a._margin;return b&&(a._minWidth+=b[0]+b[2],a._maxWidth+=b[0]+b[2]),a}function c(){function b(a,b){return a.marginLeft||a.marginTop||a.marginRight||a.marginBottom?[a.marginLeft||b[0]||0,a.marginTop||b[1]||0,a.marginRight||b[2]||0,a.marginBottom||b[3]||0]:b}function c(a){for(var b={},c=a.length-1;c>=0;c--){var e=a[c],f=d.styleStack.styleDictionary[e];for(var g in f)f.hasOwnProperty(g)&&(b[g]=f[g])}return b}function e(a){return"number"==typeof a||a instanceof Number?a=[a,a,a,a]:a instanceof Array&&2===a.length&&(a=[a[0],a[1],a[0],a[1]]),a}var f=[void 0,void 0,void 0,void 0];if(a.style){var g=a.style instanceof Array?a.style:[a.style],h=c(g);h&&(f=b(h,f)),h.margin&&(f=e(h.margin))}return f=b(a,f),a.margin&&(f=e(a.margin)),void 0===f[0]&&void 0===f[1]&&void 0===f[2]&&void 0===f[3]?null:f}a instanceof Array?a={stack:a}:("string"==typeof a||a instanceof String)&&(a={text:a}),0===Object.keys(a).length&&(a={text:""});var d=this;return this.styleStack.auto(a,function(){if(a._margin=c(a),a.columns)return b(d.measureColumns(a));if(a.stack)return b(d.measureVerticalContainer(a));if(a.ul)return b(d.measureList(!1,a));if(a.ol)return b(d.measureList(!0,a));if(a.table)return b(d.measureTable(a));if(void 0!==a.text)return b(d.measureLeaf(a));if(a.image)return b(d.measureImage(a));if(a.canvas)return b(d.measureCanvas(a));if(a.qr)return b(d.measureQr(a));throw"Unrecognized document structure: "+JSON.stringify(a,h)})},d.prototype.convertIfBase64Image=function(a){if(/^data:image\/(jpeg|jpg|png);base64,/.test(a.image)){var b="$$pdfmake$$"+this.autoImageIndex++;this.images[b]=a.image,a.image=b}},d.prototype.measureImage=function(a){this.images&&this.convertIfBase64Image(a);var b=this.imageMeasure.measureImage(a.image);if(a.fit){var c=b.width/b.height>a.fit[0]/a.fit[1]?a.fit[0]/b.width:a.fit[1]/b.height;a._width=a._minWidth=a._maxWidth=b.width*c,a._height=b.height*c}else a._width=a._minWidth=a._maxWidth=a.width||b.width,a._height=a.height||b.height*a._width/b.width;return a._alignment=this.styleStack.getProperty("alignment"),a},d.prototype.measureLeaf=function(a){var b=this.styleStack.clone();b.push(a);var c=this.textTools.buildInlines(a.text,b);return a._inlines=c.items,a._minWidth=c.minWidth,a._maxWidth=c.maxWidth,a},d.prototype.measureVerticalContainer=function(a){var b=a.stack;a._minWidth=0,a._maxWidth=0;for(var c=0,d=b.length;d>c;c++)b[c]=this.measureNode(b[c]),a._minWidth=Math.max(a._minWidth,b[c]._minWidth),a._maxWidth=Math.max(a._maxWidth,b[c]._maxWidth);return a},d.prototype.gapSizeForList=function(a,b){if(a){var c=b.length.toString().replace(/./g,"9");return this.textTools.sizeOfString(c+". ",this.styleStack)}return this.textTools.sizeOfString("9. ",this.styleStack)},d.prototype.buildMarker=function(a,b,c,d){var e;if(a)e={_inlines:this.textTools.buildInlines(b,c).items};else{var f=d.fontSize/6;e={canvas:[{x:f,y:d.height/d.lineHeight+d.decender-d.fontSize/3,r1:f,r2:f,type:"ellipse",color:"black"}]}}return e._minWidth=e._maxWidth=d.width,e._minHeight=e._maxHeight=d.height,e},d.prototype.measureList=function(a,b){var c=this.styleStack.clone(),d=a?b.ol:b.ul;b._gapSize=this.gapSizeForList(a,d),b._minWidth=0,b._maxWidth=0;for(var e=1,f=0,g=d.length;g>f;f++){var h=d[f]=this.measureNode(d[f]),i=e++ +". ";h.ol||h.ul||(h.listMarker=this.buildMarker(a,h.counter||i,c,b._gapSize)),b._minWidth=Math.max(b._minWidth,d[f]._minWidth+b._gapSize.width),b._maxWidth=Math.max(b._maxWidth,d[f]._maxWidth+b._gapSize.width)}return b},d.prototype.measureColumns=function(a){var b=a.columns;a._gap=this.styleStack.getProperty("columnGap")||0;for(var c=0,d=b.length;d>c;c++)b[c]=this.measureNode(b[c]);var e=g.measureMinMax(b);return a._minWidth=e.min+a._gap*(b.length-1),a._maxWidth=e.max+a._gap*(b.length-1),a},d.prototype.measureTable=function(a){function b(a,b){return function(){return null!==b&&"object"==typeof b&&(b.fillColor=a.styleStack.getProperty("fillColor")),a.measureNode(b)}}function c(b){var c=a.layout;("string"==typeof a.layout||a instanceof String)&&(c=b[c]);var d={hLineWidth:function(a,b){return 1},vLineWidth:function(a,b){return 1},hLineColor:function(a,b){return"black"},vLineColor:function(a,b){return"black"},paddingLeft:function(a,b){return 4},paddingRight:function(a,b){return 4},paddingTop:function(a,b){return 2},paddingBottom:function(a,b){return 2}};return i(d,c)}function d(b){for(var c=[],d=0,e=0,f=0,g=a.table.widths.length;g>f;f++){var h=e+b.vLineWidth(f,a)+b.paddingLeft(f,a);c.push(h),d+=h,e=b.paddingRight(f,a)}return d+=e+b.vLineWidth(a.table.widths.length,a),{total:d,offsets:c}}function e(){for(var b,c,d=0,e=p.length;e>d;d++){var g=p[d],h=f(g.col,g.span,a._offsets),i=g.minWidth-h.minWidth,j=g.maxWidth-h.maxWidth;if(i>0)for(b=i/g.span,c=0;c0)for(b=j/g.span,c=0;cf;f++)e.minWidth+=a.table.widths[b+f]._minWidth+(f?d.offsets[b+f]:0),e.maxWidth+=a.table.widths[b+f]._maxWidth+(f?d.offsets[b+f]:0);return e}function h(a,b,c){for(var d=1;c>d;d++)a[b+d]={_span:!0,_minWidth:0,_maxWidth:0,rowSpan:a[b].rowSpan}}function j(a,b,c,d){for(var e=1;d>e;e++)a.body[b+e][c]={_span:!0,_minWidth:0,_maxWidth:0,fillColor:a.body[b][c].fillColor}}function k(a){if(a.table.widths||(a.table.widths="auto"),"string"==typeof a.table.widths||a.table.widths instanceof String)for(a.table.widths=[a.table.widths];a.table.widths.lengthb;b++){var d=a.table.widths[b];("number"==typeof d||d instanceof Number||"string"==typeof d||d instanceof String)&&(a.table.widths[b]={width:d})}}k(a),a._layout=c(this.tableLayouts),a._offsets=d(a._layout);var l,m,n,o,p=[];for(l=0,n=a.table.body[0].length;n>l;l++){var q=a.table.widths[l];for(q._minWidth=0,q._maxWidth=0,m=0,o=a.table.body.length;o>m;m++){var r=a.table.body[m],s=r[l];if(!s._span){s=r[l]=this.styleStack.auto(s,b(this,s)),s.colSpan&&s.colSpan>1?(h(r,l,s.colSpan),p.push({col:l,span:s.colSpan,minWidth:s._minWidth,maxWidth:s._maxWidth})):(q._minWidth=Math.max(q._minWidth,s._minWidth),q._maxWidth=Math.max(q._maxWidth,s._maxWidth))}s.rowSpan&&s.rowSpan>1&&j(a.table,m,l,s.rowSpan)}}e();var t=g.measureMinMax(a.table.widths);return a._minWidth=t.min+a._offsets.total, +a._maxWidth=t.max+a._offsets.total,a},d.prototype.measureCanvas=function(a){for(var b=0,c=0,d=0,e=a.canvas.length;e>d;d++){var f=a.canvas[d];switch(f.type){case"ellipse":b=Math.max(b,f.x+f.r1),c=Math.max(c,f.y+f.r2);break;case"rect":b=Math.max(b,f.x+f.w),c=Math.max(c,f.y+f.h);break;case"line":b=Math.max(b,f.x1,f.x2),c=Math.max(c,f.y1,f.y2);break;case"polyline":for(var g=0,h=f.points.length;h>g;g++)b=Math.max(b,f.points[g].x),c=Math.max(c,f.points[g].y)}}return a._minWidth=a._maxWidth=b,a._minHeight=a._maxHeight=c,a},d.prototype.measureQr=function(a){return a=j.measure(a),a._alignment=this.styleStack.getProperty("alignment"),a},a.exports=d},function(a,b){"use strict";function c(a){this.fontProvider=a}function d(a,b){var c=[];a=a.replace(" "," ");var d;d=b?[a,""]:a.match(j);for(var e=0,f=d.length;f-1>e;e++){var g=d[e],h=0===g.length;if(h){var i=0===c.length||c[c.length-1].lineEnd;i?c.push({text:"",lineEnd:!0}):c[c.length-1].lineEnd=!0}else c.push({text:g})}return c}function e(a,b){b=b||{},a=a||{};for(var c in a)"text"!=c&&a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function f(a){var b=[];("string"==typeof a||a instanceof String)&&(a=[a]);for(var c=0,f=a.length;f>c;c++){var g,h=a[c],i=null;"string"==typeof h||h instanceof String?g=d(h):(g=d(h.text,h.noWrap),i=e(h));for(var j=0,k=g.length;k>j;j++){var l={text:g[j].text};g[j].lineEnd&&(l.lineEnd=!0),e(i,l),b.push(l)}}return b}function g(a){return a.replace(/[^A-Za-z0-9\[\] ]/g,function(a){return m[a]||a})}function h(a,b,c,d){var e;return void 0!==a[c]&&null!==a[c]?a[c]:b?(b.auto(a,function(){e=b.getProperty(c)}),null!==e&&void 0!==e?e:d):d}function i(a,b,c){var d=f(b);return d.forEach(function(b){var d=h(b,c,"font","Roboto"),e=h(b,c,"fontSize",12),f=h(b,c,"bold",!1),i=h(b,c,"italics",!1),j=h(b,c,"color","black"),m=h(b,c,"decoration",null),n=h(b,c,"decorationColor",null),o=h(b,c,"decorationStyle",null),p=h(b,c,"background",null),q=h(b,c,"lineHeight",1),r=a.provideFont(d,f,i);b.width=r.widthOfString(g(b.text),e),b.height=r.lineHeight(e)*q;var s=b.text.match(k),t=b.text.match(l);s?b.leadingCut=r.widthOfString(s[0],e):b.leadingCut=0,t?b.trailingCut=r.widthOfString(t[0],e):b.trailingCut=0,b.alignment=h(b,c,"alignment","left"),b.font=r,b.fontSize=e,b.color=j,b.decoration=m,b.decorationColor=n,b.decorationStyle=o,b.background=p}),d}var j=/([^ ,\/!.?:;\-\n]*[ ,\/!.?:;\-]*)|\n/g,k=/^(\s)+/g,l=/(\s)+$/g;c.prototype.buildInlines=function(a,b){function c(a){return Math.max(0,a.width-a.leadingCut-a.trailingCut)}var d,e=i(this.fontProvider,a,b),f=0,g=0;return e.forEach(function(a){f=Math.max(f,a.width-a.leadingCut-a.trailingCut),d||(d={width:0,leadingCut:a.leadingCut,trailingCut:0}),d.width+=a.width,d.trailingCut=a.trailingCut,g=Math.max(g,c(d)),a.lineEnd&&(d=null)}),h({},b,"noWrap",!1)&&(f=g),{items:e,minWidth:f,maxWidth:g}},c.prototype.sizeOfString=function(a,b){a=a.replace(" "," ");var c=h({},b,"font","Roboto"),d=h({},b,"fontSize",12),e=h({},b,"bold",!1),f=h({},b,"italics",!1),i=h({},b,"lineHeight",1),j=this.fontProvider.provideFont(c,e,f);return{width:j.widthOfString(g(a),d),height:j.lineHeight(d)*i,fontSize:d,lineHeight:i,ascender:j.ascender/1e3*d,decender:j.decender/1e3*d}};var m={"Ą":"A","Ć":"C","Ę":"E","Ł":"L","Ń":"N","Ó":"O","Ś":"S","Ź":"Z","Ż":"Z","ą":"a","ć":"c","ę":"e","ł":"l","ń":"n","ó":"o","ś":"s","ź":"z","ż":"z"};a.exports=c},function(a,b){"use strict";function c(a,b){this.defaultStyle=b||{},this.styleDictionary=a,this.styleOverrides=[]}c.prototype.clone=function(){var a=new c(this.styleDictionary,this.defaultStyle);return this.styleOverrides.forEach(function(b){a.styleOverrides.push(b)}),a},c.prototype.push=function(a){this.styleOverrides.push(a)},c.prototype.pop=function(a){for(a=a||1;a-- >0;)this.styleOverrides.pop()},c.prototype.autopush=function(a){if("string"==typeof a||a instanceof String)return 0;var b=[];a.style&&(b=a.style instanceof Array?a.style:[a.style]);for(var c=0,d=b.length;d>c;c++)this.push(b[c]);var e={},f=!1;return["font","fontSize","bold","italics","alignment","color","columnGap","fillColor","decoration","decorationStyle","decorationColor","background","lineHeight","noWrap"].forEach(function(b){void 0!==a[b]&&null!==a[b]&&(e[b]=a[b],f=!0)}),f&&this.push(e),b.length+(f?1:0)},c.prototype.auto=function(a,b){var c=this.autopush(a),d=b();return c>0&&this.pop(c),d},c.prototype.getProperty=function(a){if(this.styleOverrides)for(var b=this.styleOverrides.length-1;b>=0;b--){var c=this.styleOverrides[b];if("string"==typeof c||c instanceof String){var d=this.styleDictionary[c];if(d&&null!==d[a]&&void 0!==d[a])return d[a]}else if(void 0!==c[a]&&null!==c[a])return c[a]}return this.defaultStyle&&this.defaultStyle[a]},a.exports=c},function(a,b){"use strict";function c(a,b){var c=[],f=0,g=0,h=[],i=0,j=0,k=[],l=b;a.forEach(function(a){d(a)?(c.push(a),f+=a._minWidth,g+=a._maxWidth):e(a)?(h.push(a),i=Math.max(i,a._minWidth),j=Math.max(j,a._maxWidth)):k.push(a)}),k.forEach(function(a){"string"==typeof a.width&&/\d+%/.test(a.width)&&(a.width=parseFloat(a.width)*l/100),a.width=b)c.forEach(function(a){a._calcWidth=a._minWidth}),h.forEach(function(a){a._calcWidth=i});else{if(b>n)c.forEach(function(a){a._calcWidth=a._maxWidth,b-=a._calcWidth});else{var o=b-m,p=n-m;c.forEach(function(a){var c=a._maxWidth-a._minWidth;a._calcWidth=a._minWidth+c*o/p,b-=a._calcWidth})}if(h.length>0){var q=b/h.length;h.forEach(function(a){a._calcWidth=q})}}}function d(a){return"auto"===a.width}function e(a){return null===a.width||void 0===a.width||"*"===a.width||"star"===a.width}function f(a){for(var b={min:0,max:0},c={min:0,max:0},f=0,g=0,h=a.length;h>g;g++){var i=a[g];e(i)?(c.min=Math.max(c.min,i._minWidth),c.max=Math.max(c.max,i._maxWidth),f++):d(i)?(b.min+=i._minWidth,b.max+=i._maxWidth):(b.min+=void 0!==i.width&&i.width||i._minWidth,b.max+=void 0!==i.width&&i.width||i._maxWidth)}return f&&(b.min+=f*c.min,b.max+=f*c.max),b}a.exports={buildColumnWidths:c,measureMinMax:f,isAutoColumn:d,isStarColumn:e}},function(a,b){"use strict";function c(){for(var a={},b=0,c=arguments.length;c>b;b++){var d=arguments[b];if(d)for(var e in d)d.hasOwnProperty(e)&&(a[e]=d[e])}return a}function d(a,b,c){switch(a.type){case"ellipse":case"rect":a.x+=b,a.y+=c;break;case"line":a.x1+=b,a.x2+=b,a.y1+=c,a.y2+=c;break;case"polyline":for(var d=0,e=a.points.length;e>d;d++)a.points[d].x+=b,a.points[d].y+=c}}function e(a,b){return"font"===a?"font":b}function f(a){var b={};return a&&"[object Function]"===b.toString.call(a)}a.exports={pack:c,fontStringify:e,offsetVector:d,isFunction:f}},function(a,b){"use strict";function c(a,b){var c={numeric:h,alphanumeric:i,octet:j},d={L:o,M:p,Q:q,H:r};b=b||{};var e=b.version||-1,f=d[(b.eccLevel||"L").toUpperCase()],g=b.mode?c[b.mode.toLowerCase()]:-1,k="mask"in b?b.mask:-1;if(0>g)g="string"==typeof a?a.match(l)?h:a.match(n)?i:j:j;else if(g!=h&&g!=i&&g!=j)throw"invalid or unsupported mode";if(a=K(g,a),null===a)throw"invalid data format";if(0>f||f>3)throw"invalid ECC level";if(0>e){for(e=1;40>=e&&!(a.length<=J(e,g,f));++e);if(e>40)throw"too large data for the Qr format"}else if(1>e||e>40)throw"invalid Qr version! should be between 1 and 40";if(-1!=k&&(0>k||k>8))throw"invalid mask";return U(a,e,g,f,k)}function d(a,b){var d=[],e=a.background||"#fff",f=a.foreground||"#000",g=c(a,b),h=g.length,i=Math.floor(b.fit?b.fit/h:5),j=h*i;d.push({type:"rect",x:0,y:0,w:j,h:j,lineWidth:0,color:e});for(var k=0;h>k;++k)for(var l=0;h>l;++l)g[k][l]&&d.push({type:"rect",x:i*k,y:i*l,w:i,h:i,lineWidth:0,color:f});return{canvas:d,size:j}}function e(a){var b=d(a.qr,a);return a._canvas=b.canvas,a._width=a._height=a._minWidth=a._maxWidth=a._minHeight=a._maxHeight=b.size,a}for(var f=[null,[[10,7,17,13],[1,1,1,1],[]],[[16,10,28,22],[1,1,1,1],[4,16]],[[26,15,22,18],[1,1,2,2],[4,20]],[[18,20,16,26],[2,1,4,2],[4,24]],[[24,26,22,18],[2,1,4,4],[4,28]],[[16,18,28,24],[4,2,4,4],[4,32]],[[18,20,26,18],[4,2,5,6],[4,20,36]],[[22,24,26,22],[4,2,6,6],[4,22,40]],[[22,30,24,20],[5,2,8,8],[4,24,44]],[[26,18,28,24],[5,4,8,8],[4,26,48]],[[30,20,24,28],[5,4,11,8],[4,28,52]],[[22,24,28,26],[8,4,11,10],[4,30,56]],[[22,26,22,24],[9,4,16,12],[4,32,60]],[[24,30,24,20],[9,4,16,16],[4,24,44,64]],[[24,22,24,30],[10,6,18,12],[4,24,46,68]],[[28,24,30,24],[10,6,16,17],[4,24,48,72]],[[28,28,28,28],[11,6,19,16],[4,28,52,76]],[[26,30,28,28],[13,6,21,18],[4,28,54,80]],[[26,28,26,26],[14,7,25,21],[4,28,56,84]],[[26,28,28,30],[16,8,25,20],[4,32,60,88]],[[26,28,30,28],[17,8,25,23],[4,26,48,70,92]],[[28,28,24,30],[17,9,34,23],[4,24,48,72,96]],[[28,30,30,30],[18,9,30,25],[4,28,52,76,100]],[[28,30,30,30],[20,10,32,27],[4,26,52,78,104]],[[28,26,30,30],[21,12,35,29],[4,30,56,82,108]],[[28,28,30,28],[23,12,37,34],[4,28,56,84,112]],[[28,30,30,30],[25,12,40,34],[4,32,60,88,116]],[[28,30,30,30],[26,13,42,35],[4,24,48,72,96,120]],[[28,30,30,30],[28,14,45,38],[4,28,52,76,100,124]],[[28,30,30,30],[29,15,48,40],[4,24,50,76,102,128]],[[28,30,30,30],[31,16,51,43],[4,28,54,80,106,132]],[[28,30,30,30],[33,17,54,45],[4,32,58,84,110,136]],[[28,30,30,30],[35,18,57,48],[4,28,56,84,112,140]],[[28,30,30,30],[37,19,60,51],[4,32,60,88,116,144]],[[28,30,30,30],[38,19,63,53],[4,28,52,76,100,124,148]],[[28,30,30,30],[40,20,66,56],[4,22,48,74,100,126,152]],[[28,30,30,30],[43,21,70,59],[4,26,52,78,104,130,156]],[[28,30,30,30],[45,22,74,62],[4,30,56,82,108,134,160]],[[28,30,30,30],[47,24,77,65],[4,24,52,80,108,136,164]],[[28,30,30,30],[49,25,81,68],[4,28,56,84,112,140,168]]],g=0,h=1,i=2,j=4,k=8,l=/^\d*$/,m=/^[A-Za-z0-9 $%*+\-.\/:]*$/,n=/^[A-Z0-9 $%*+\-.\/:]*$/,o=1,p=0,q=3,r=2,s=[],t=[-1],u=0,v=1;255>u;++u)s.push(v),t[v]=u,v=2*v^(v>=128?285:0);for(var w=[[]],u=0;30>u;++u){for(var x=w[u],y=[],z=0;u>=z;++z){var A=u>z?s[x[z]]:0,B=s[(u+(x[z-1]||0))%255];y.push(t[A^B])}w.push(y)}for(var C={},u=0;45>u;++u)C["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".charAt(u)]=u;var D=[function(a,b){return(a+b)%2===0},function(a,b){return a%2===0},function(a,b){return b%3===0},function(a,b){return(a+b)%3===0},function(a,b){return((a/2|0)+(b/3|0))%2===0},function(a,b){return a*b%2+a*b%3===0},function(a,b){return(a*b%2+a*b%3)%2===0},function(a,b){return((a+b)%2+a*b%3)%2===0}],E=function(a){return a>6},F=function(a){return 4*a+17},G=function(a){var b=f[a],c=16*a*a+128*a+64;return E(a)&&(c-=36),b[2].length&&(c-=25*b[2].length*b[2].length-10*b[2].length-55),c},H=function(a,b){var c=-8&G(a),d=f[a];return c-=8*d[0][b]*d[1][b]},I=function(a,b){switch(b){case h:return 10>a?10:27>a?12:14;case i:return 10>a?9:27>a?11:13;case j:return 10>a?8:16;case k:return 10>a?8:27>a?10:12}},J=function(a,b,c){var d=H(a,c)-4-I(a,b);switch(b){case h:return 3*(d/10|0)+(4>d%10?0:7>d%10?1:2);case i:return 2*(d/11|0)+(6>d%11?0:1);case j:return d/8|0;case k:return d/13|0}},K=function(a,b){switch(a){case h:return b.match(l)?b:null;case i:return b.match(m)?b.toUpperCase():null;case j:if("string"==typeof b){for(var c=[],d=0;de?c.push(e):2048>e?c.push(192|e>>6,128|63&e):65536>e?c.push(224|e>>12,128|e>>6&63,128|63&e):c.push(240|e>>18,128|e>>12&63,128|e>>6&63,128|63&e)}return c}return b}},L=function(a,b,c,d){var e=[],f=0,k=8,l=c.length,m=function(a,b){if(b>=k){for(e.push(f|a>>(b-=k));b>=8;)e.push(a>>(b-=8)&255);f=0,k=8}b>0&&(f|=(a&(1<o;o+=3)m(parseInt(c.substring(o-2,o+1),10),10);m(parseInt(c.substring(o-2),10),[0,4,7][l%3]);break;case i:for(var o=1;l>o;o+=2)m(45*C[c.charAt(o-1)]+C[c.charAt(o)],11);l%2==1&&m(C[c.charAt(o-1)],6);break;case j:for(var o=0;l>o;++o)m(c[o],8)}for(m(g,4),8>k&&e.push(f);e.length+1f;++f)c.push(0);for(var f=0;d>f;){var g=t[c[f++]];if(g>=0)for(var h=0;e>h;++h)c[f+h]^=s[(g+b[h])%255]}return c.slice(d)},N=function(a,b,c){for(var d=[],e=a.length/b|0,f=0,g=b-a.length%b,h=0;g>h;++h)d.push(f),f+=e;for(var h=g;b>h;++h)d.push(f),f+=e+1;d.push(f);for(var i=[],h=0;b>h;++h)i.push(M(a.slice(d[h],d[h+1]),c));for(var j=[],k=a.length/b|0,h=0;k>h;++h)for(var l=0;b>l;++l)j.push(a[d[l]+h]);for(var l=g;b>l;++l)j.push(a[d[l+1]-1]);for(var h=0;hl;++l)j.push(i[l][h]);return j},O=function(a,b,c,d){for(var e=a<=0;--f)e>>d+f&1&&(e^=c<g;++g)d.push([]),e.push([]);var h=function(a,b,c,f,g){for(var h=0;c>h;++h)for(var i=0;f>i;++i)d[a+h][b+i]=g[h]>>i&1,e[a+h][b+i]=1};h(0,0,9,9,[127,65,93,93,93,65,383,0,64]),h(c-8,0,8,9,[256,127,65,93,93,93,65,127]),h(0,c-8,9,8,[254,130,186,186,186,130,254,0,0]);for(var g=9;c-8>g;++g)d[6][g]=d[g][6]=1&~g,e[6][g]=e[g][6]=1;for(var i=b[2],j=i.length,g=0;j>g;++g)for(var k=0===g||g===j-1?1:0,l=0===g?j-1:j,m=k;l>m;++m)h(i[g],i[m],5,5,[31,17,21,17,31]);if(E(a))for(var n=O(a,6,7973,12),o=0,g=0;6>g;++g)for(var m=0;3>m;++m)d[g][c-11+m]=d[c-11+m][g]=n>>o++&1,e[g][c-11+m]=e[c-11+m][g]=1;return{matrix:d,reserved:e}},Q=function(a,b,c){for(var d=a.length,e=0,f=-1,g=d-1;g>=0;g-=2){6==g&&--g;for(var h=0>f?d-1:0,i=0;d>i;++i){for(var j=g;j>g-2;--j)b[h][j]||(a[h][j]=c[e>>3]>>(7&~e)&1,++e);h+=f}f=-f}return a},R=function(a,b,c){for(var d=D[c],e=a.length,f=0;e>f;++f)for(var g=0;e>g;++g)b[f][g]||(a[f][g]^=d(f,g));return a},S=function(a,b,c,d){for(var e=a.length,f=21522^O(c<<3|d,5,1335,10),g=0;15>g;++g){var h=[0,1,2,3,4,5,7,8,e-7,e-6,e-5,e-4,e-3,e-2,e-1][g],i=[e-1,e-2,e-3,e-4,e-5,e-6,e-7,e-8,7,5,4,3,2,1,0][g];a[h][8]=a[8][i]=f>>g&1}return a},T=function(a){for(var b=3,c=3,d=40,e=10,f=function(a){for(var c=0,e=0;e=5&&(c+=b+(a[e]-5));for(var e=5;e=4*f||a[e+1]>=4*f)&&(c+=d)}return c},g=a.length,h=0,i=0,j=0;g>j;++j){var k,l=a[j];k=[0];for(var m=0;g>m;){var n;for(n=0;g>m&&l[m];++n)++m;for(k.push(n),n=0;g>m&&!l[m];++n)++m;k.push(n)}h+=f(k),k=[0];for(var m=0;g>m;){var n;for(n=0;g>m&&a[m][j];++n)++m;for(k.push(n),n=0;g>m&&!a[m][j];++n)++m;k.push(n)}h+=f(k);var o=a[j+1]||[];i+=l[0];for(var m=1;g>m;++m){var p=l[m];i+=p,l[m-1]==p&&o[m]===p&&o[m-1]===p&&(h+=c)}}return h+=e*(Math.abs(i/g/g-.5)/.05|0)},U=function(a,b,c,d,e){var g=f[b],h=L(b,c,a,H(b,d)>>3);h=N(h,g[1][d],w[g[0][d]]);var i=P(b),j=i.matrix,k=i.reserved;if(Q(j,k,h),0>e){R(j,k,0),S(j,k,d,0);var l=0,m=T(j);for(R(j,k,0),e=1;8>e;++e){R(j,k,e),S(j,k,d,e);var n=T(j);m>n&&(m=n,l=e),R(j,k,e)}e=l}return R(j,k,e),S(j,k,d,e),j};a.exports={measure:e}},function(a,b,c){"use strict";function d(a,b){this.pages=[],this.pageMargins=b,this.x=b.left,this.availableWidth=a.width-b.left-b.right,this.availableHeight=0,this.page=-1,this.snapshots=[],this.endingCell=null,this.tracker=new g,this.addPage(a)}function e(a,b){return void 0===a?b:"landscape"===a?"landscape":"portrait"}function f(a,b){var c;return c=a.page>b.page?a:b.page>a.page?b:a.y>b.y?a:b,{page:c.page,x:c.x,y:c.y,availableHeight:c.availableHeight,availableWidth:c.availableWidth}}var g=c(12);d.prototype.beginColumnGroup=function(){this.snapshots.push({x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,page:this.page,bottomMost:{y:this.y,page:this.page},endingCell:this.endingCell,lastColumnWidth:this.lastColumnWidth}),this.lastColumnWidth=0},d.prototype.beginColumn=function(a,b,c){var d=this.snapshots[this.snapshots.length-1];this.calculateBottomMost(d),this.endingCell=c,this.page=d.page,this.x=this.x+this.lastColumnWidth+(b||0),this.y=d.y,this.availableWidth=a,this.availableHeight=d.availableHeight,this.lastColumnWidth=a},d.prototype.calculateBottomMost=function(a){this.endingCell?(this.saveContextInEndingCell(this.endingCell),this.endingCell=null):a.bottomMost=f(this,a.bottomMost)},d.prototype.markEnding=function(a){this.page=a._columnEndingContext.page,this.x=a._columnEndingContext.x,this.y=a._columnEndingContext.y,this.availableWidth=a._columnEndingContext.availableWidth,this.availableHeight=a._columnEndingContext.availableHeight,this.lastColumnWidth=a._columnEndingContext.lastColumnWidth},d.prototype.saveContextInEndingCell=function(a){a._columnEndingContext={page:this.page,x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,lastColumnWidth:this.lastColumnWidth}},d.prototype.completeColumnGroup=function(){var a=this.snapshots.pop();this.calculateBottomMost(a),this.endingCell=null,this.x=a.x,this.y=a.bottomMost.y,this.page=a.bottomMost.page,this.availableWidth=a.availableWidth,this.availableHeight=a.bottomMost.availableHeight,this.lastColumnWidth=a.lastColumnWidth},d.prototype.addMargin=function(a,b){this.x+=a,this.availableWidth-=a+(b||0)},d.prototype.moveDown=function(a){return this.y+=a,this.availableHeight-=a,this.availableHeight>0},d.prototype.initializePage=function(){this.y=this.pageMargins.top,this.availableHeight=this.getCurrentPage().pageSize.height-this.pageMargins.top-this.pageMargins.bottom,this.pageSnapshot().availableWidth=this.getCurrentPage().pageSize.width-this.pageMargins.left-this.pageMargins.right},d.prototype.pageSnapshot=function(){return this.snapshots[0]?this.snapshots[0]:this},d.prototype.moveTo=function(a,b){void 0!==a&&null!==a&&(this.x=a,this.availableWidth=this.getCurrentPage().pageSize.width-this.x-this.pageMargins.right),void 0!==b&&null!==b&&(this.y=b,this.availableHeight=this.getCurrentPage().pageSize.height-this.y-this.pageMargins.bottom)},d.prototype.beginDetachedBlock=function(){this.snapshots.push({x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,page:this.page,endingCell:this.endingCell,lastColumnWidth:this.lastColumnWidth})},d.prototype.endDetachedBlock=function(){var a=this.snapshots.pop();this.x=a.x,this.y=a.y,this.availableWidth=a.availableWidth,this.availableHeight=a.availableHeight,this.page=a.page,this.endingCell=a.endingCell,this.lastColumnWidth=a.lastColumnWidth};var h=function(a,b){return b=e(b,a.pageSize.orientation),b!==a.pageSize.orientation?{orientation:b,width:a.pageSize.height,height:a.pageSize.width}:{orientation:a.pageSize.orientation,width:a.pageSize.width,height:a.pageSize.height}};d.prototype.moveToNextPage=function(a){var b=this.page+1,c=this.page,d=this.y,e=b>=this.pages.length;return e?this.addPage(h(this.getCurrentPage(),a)):(this.page=b,this.initializePage()),{newPageCreated:e,prevPage:c,prevY:d,y:this.y}},d.prototype.addPage=function(a){var b={items:[],pageSize:a};return this.pages.push(b),this.page=this.pages.length-1,this.initializePage(),this.tracker.emit("pageAdded"),b},d.prototype.getCurrentPage=function(){return this.page<0||this.page>=this.pages.length?null:this.pages[this.page]},d.prototype.getCurrentPosition=function(){var a=this.getCurrentPage().pageSize,b=a.height-this.pageMargins.top-this.pageMargins.bottom,c=a.width-this.pageMargins.left-this.pageMargins.right;return{pageNumber:this.page+1,pageOrientation:a.orientation,pageInnerHeight:b,pageInnerWidth:c,left:this.x,top:this.y,verticalRatio:(this.y-this.pageMargins.top)/b,horizontalRatio:(this.x-this.pageMargins.left)/c}},a.exports=d},function(a,b,c){"use strict";function d(a,b){this.transactionLevel=0,this.repeatables=[],this.tracker=b,this.writer=new f(a,b)}function e(a,b){var c=b(a);return c||(a.moveToNextPage(),c=b(a)),c}var f=c(21);d.prototype.addLine=function(a,b,c){return e(this,function(d){return d.writer.addLine(a,b,c)})},d.prototype.addImage=function(a,b){return e(this,function(c){return c.writer.addImage(a,b)})},d.prototype.addQr=function(a,b){return e(this,function(c){return c.writer.addQr(a,b)})},d.prototype.addVector=function(a,b,c,d){return this.writer.addVector(a,b,c,d)},d.prototype.addFragment=function(a,b,c,d){this.writer.addFragment(a,b,c,d)||(this.moveToNextPage(),this.writer.addFragment(a,b,c,d))},d.prototype.moveToNextPage=function(a){var b=this.writer.context.moveToNextPage(a);b.newPageCreated?this.repeatables.forEach(function(a){this.writer.addFragment(a,!0)},this):this.repeatables.forEach(function(a){this.writer.context.moveDown(a.height)},this),this.writer.tracker.emit("pageChanged",{prevPage:b.prevPage,prevY:b.prevY,y:b.y})},d.prototype.beginUnbreakableBlock=function(a,b){0===this.transactionLevel++&&(this.originalX=this.writer.context.x,this.writer.pushContext(a,b))},d.prototype.commitUnbreakableBlock=function(a,b){if(0===--this.transactionLevel){var c=this.writer.context;this.writer.popContext();var d=c.pages.length;if(d>0){var e=c.pages[0];if(e.xOffset=a,e.yOffset=b,d>1)if(void 0!==a||void 0!==b)e.height=c.getCurrentPage().pageSize.height-c.pageMargins.top-c.pageMargins.bottom;else{e.height=this.writer.context.getCurrentPage().pageSize.height-this.writer.context.pageMargins.top-this.writer.context.pageMargins.bottom;for(var f=0,g=this.repeatables.length;g>f;f++)e.height-=this.repeatables[f].height}else e.height=c.y;void 0!==a||void 0!==b?this.writer.addFragment(e,!0,!0,!0):this.addFragment(e)}}},d.prototype.currentBlockToRepeatable=function(){var a=this.writer.context,b={items:[]};return a.pages[0].items.forEach(function(a){b.items.push(a)}),b.xOffset=this.originalX,b.height=a.y,b},d.prototype.pushToRepeatables=function(a){this.repeatables.push(a)},d.prototype.popFromRepeatables=function(){this.repeatables.pop()},d.prototype.context=function(){return this.writer.context},a.exports=d},function(a,b,c){"use strict";function d(a,b){this.context=a,this.contextStack=[],this.tracker=b}function e(a,b,c){null===c||void 0===c||0>c||c>a.items.length?a.items.push(b):a.items.splice(c,0,b)}function f(a){var b=new g(a.maxWidth);for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}var g=c(22),h=c(17).pack,i=c(17).offsetVector,j=c(19);d.prototype.addLine=function(a,b,c){var d=a.getHeight(),f=this.context,g=f.getCurrentPage(),h=this.getCurrentPositionOnPage();return f.availableHeight0&&a.inlines[0].alignment,e=0;switch(d){case"right":e=b-c;break;case"center":e=(b-c)/2}if(e&&(a.x=(a.x||0)+e),"justify"===d&&!a.newLineForced&&!a.lastLineInParagraph&&a.inlines.length>1)for(var f=(b-c)/(a.inlines.length-1),g=1,h=a.inlines.length;h>g;g++)e=g*f,a.inlines[g].x+=e},d.prototype.addImage=function(a,b){var c=this.context,d=c.getCurrentPage(),f=this.getCurrentPositionOnPage();return c.availableHeightf;f++){var h=a._canvas[f];h.x+=a.x,h.y+=a.y,this.addVector(h,!0,!0,b)}return c.moveDown(a._height),e},d.prototype.alignImage=function(a){var b=this.context.availableWidth,c=a._minWidth,d=0;switch(a._alignment){case"right":d=b-c;break;case"center":d=(b-c)/2}d&&(a.x=(a.x||0)+d)},d.prototype.addVector=function(a,b,c,d){var f=this.context,g=f.getCurrentPage(),h=this.getCurrentPositionOnPage();return g?(i(a,b?0:f.x,c?0:f.y),e(g,{type:"vector",item:a},d),h):void 0},d.prototype.addFragment=function(a,b,c,d){var e=this.context,g=e.getCurrentPage();return!b&&a.height>e.availableHeight?!1:(a.items.forEach(function(d){switch(d.type){case"line":var j=f(d.item);j.x=(j.x||0)+(b?a.xOffset||0:e.x),j.y=(j.y||0)+(c?a.yOffset||0:e.y),g.items.push({type:"line",item:j});break;case"vector":var k=h(d.item);i(k,b?a.xOffset||0:e.x,c?a.yOffset||0:e.y),g.items.push({type:"vector",item:k});break;case"image":var l=h(d.item);l.x=(l.x||0)+(b?a.xOffset||0:e.x),l.y=(l.y||0)+(c?a.yOffset||0:e.y),g.items.push({type:"image",item:l})}}),d||e.moveDown(a.height),!0)},d.prototype.pushContext=function(a,b){void 0===a&&(b=this.context.getCurrentPage().height-this.context.pageMargins.top-this.context.pageMargins.bottom,a=this.context.availableWidth),("number"==typeof a||a instanceof Number)&&(a=new j({width:a,height:b},{left:0,right:0,top:0,bottom:0})),this.contextStack.push(this.context),this.context=a},d.prototype.popContext=function(){this.context=this.contextStack.pop()},d.prototype.getCurrentPositionOnPage=function(){return(this.contextStack[0]||this.context).getCurrentPosition()},a.exports=d},function(a,b){"use strict";function c(a){this.maxWidth=a,this.leadingCut=0,this.trailingCut=0,this.inlineWidths=0,this.inlines=[]}c.prototype.getAscenderHeight=function(){var a=0;return this.inlines.forEach(function(b){a=Math.max(a,b.font.ascender/1e3*b.fontSize)}),a},c.prototype.hasEnoughSpaceForInline=function(a){return 0===this.inlines.length?!0:this.newLineForced?!1:this.inlineWidths+a.width-this.leadingCut-(a.trailingCut||0)<=this.maxWidth},c.prototype.addInline=function(a){0===this.inlines.length&&(this.leadingCut=a.leadingCut||0),this.trailingCut=a.trailingCut||0,a.x=this.inlineWidths-this.leadingCut,this.inlines.push(a),this.inlineWidths+=a.width,a.lineEnd&&(this.newLineForced=!0)},c.prototype.getWidth=function(){return this.inlineWidths-this.leadingCut-this.trailingCut},c.prototype.getHeight=function(){var a=0;return this.inlines.forEach(function(b){a=Math.max(a,b.height||0)}),a},a.exports=c},function(a,b,c){"use strict";function d(a){this.tableNode=a}var e=c(16);d.prototype.beginTable=function(a){function b(){var a=0;return d.table.widths.forEach(function(b){a+=b._calcWidth}),a}function c(){var a=[],b=0,c=0;a.push({left:0,rowSpan:0});for(var d=0,e=g.tableNode.table.body[0].length;e>d;d++){var f=g.layout.paddingLeft(d,g.tableNode)+g.layout.paddingRight(d,g.tableNode),h=g.layout.vLineWidth(d,g.tableNode);c=f+h+g.tableNode.table.widths[d]._calcWidth,a[a.length-1].width=c,b+=c,a.push({left:b,rowSpan:0,width:0})}return a}var d,f,g=this;d=this.tableNode,this.offsets=d._offsets,this.layout=d._layout,f=a.context().availableWidth-this.offsets.total,e.buildColumnWidths(d.table.widths,f),this.tableWidth=d._offsets.total+b(),this.rowSpanData=c(),this.cleanUpRepeatables=!1,this.headerRows=d.table.headerRows||0,this.rowsWithoutPageBreak=this.headerRows+(d.table.keepWithHeaderRows||0),this.dontBreakRows=d.table.dontBreakRows||!1,this.rowsWithoutPageBreak&&a.beginUnbreakableBlock(),this.drawHorizontalLine(0,a)},d.prototype.onRowBreak=function(a,b){var c=this;return function(){var a=c.rowPaddingTop+(c.headerRows?0:c.topLineWidth);b.context().moveDown(a)}},d.prototype.beginRow=function(a,b){this.topLineWidth=this.layout.hLineWidth(a,this.tableNode),this.rowPaddingTop=this.layout.paddingTop(a,this.tableNode),this.bottomLineWidth=this.layout.hLineWidth(a+1,this.tableNode),this.rowPaddingBottom=this.layout.paddingBottom(a,this.tableNode),this.rowCallback=this.onRowBreak(a,b),b.tracker.startTracking("pageChanged",this.rowCallback),this.dontBreakRows&&b.beginUnbreakableBlock(),this.rowTopY=b.context().y,this.reservedAtBottom=this.bottomLineWidth+this.rowPaddingBottom,b.context().availableHeight-=this.reservedAtBottom,b.context().moveDown(this.rowPaddingTop)},d.prototype.drawHorizontalLine=function(a,b,c){var d=this.layout.hLineWidth(a,this.tableNode);if(d){for(var e=d/2,f=null,g=0,h=this.rowSpanData.length;h>g;g++){var i=this.rowSpanData[g],j=!i.rowSpan;!f&&j&&(f={left:i.left,width:0}),j&&(f.width+=i.width||0);var k=(c||0)+e;j&&g!==h-1||f&&(b.addVector({type:"line",x1:f.left,x2:f.left+f.width,y1:k,y2:k,lineWidth:d,lineColor:"function"==typeof this.layout.hLineColor?this.layout.hLineColor(a,this.tableNode):this.layout.hLineColor},!1,c),f=null)}b.context().moveDown(d)}},d.prototype.drawVerticalLine=function(a,b,c,d,e){var f=this.layout.vLineWidth(d,this.tableNode);0!==f&&e.addVector({type:"line",x1:a+f/2,x2:a+f/2,y1:b,y2:c,lineWidth:f,lineColor:"function"==typeof this.layout.vLineColor?this.layout.vLineColor(d,this.tableNode):this.layout.vLineColor},!1,!0)},d.prototype.endTable=function(a){this.cleanUpRepeatables&&a.popFromRepeatables()},d.prototype.endRow=function(a,b,c){function d(){for(var b=[],c=0,d=0,e=g.tableNode.table.body[a].length;e>d;d++){if(!c){b.push({x:g.rowSpanData[d].left,index:d});var f=g.tableNode.table.body[a][d];c=f._colSpan||f.colSpan||0}c>0&&c--}return b.push({x:g.rowSpanData[g.rowSpanData.length-1].left,index:g.rowSpanData.length-1}),b}var e,f,g=this;b.tracker.stopTracking("pageChanged",this.rowCallback),b.context().moveDown(this.layout.paddingBottom(a,this.tableNode)),b.context().availableHeight+=this.reservedAtBottom;var h=b.context().page,i=b.context().y,j=d(),k=[],l=c&&c.length>0;if(k.push({y0:this.rowTopY,page:l?c[0].prevPage:h}),l)for(f=0,e=c.length;e>f;f++){var m=c[f];k[k.length-1].y1=m.prevY,k.push({y0:m.y,page:m.prevPage+1})}k[k.length-1].y1=i;for(var n=k[0].y1-k[0].y0===this.rowPaddingTop,o=n?1:0,p=k.length;p>o;o++){var q=o0&&!this.headerRows,s=r?0:this.topLineWidth,t=k[o].y0,u=k[o].y1;for(q&&(u+=this.rowPaddingBottom),b.context().page!=k[o].page&&(b.context().page=k[o].page,this.reservedAtBottom=0),f=0,e=j.length;e>f;f++)if(this.drawVerticalLine(j[f].x,t-s,u+this.bottomLineWidth,j[f].index,b),e-1>f){var v=j[f].index,w=this.tableNode.table.body[a][v].fillColor;if(w){var x=this.layout.vLineWidth(v,this.tableNode),y=j[f].x+x,z=t-s;b.addVector({type:"rect",x:y,y:z,w:j[f+1].x-y,h:u+this.bottomLineWidth-z,lineWidth:0,color:w},!1,!0,0)}}q&&this.layout.hLineWhenBroken!==!1&&this.drawHorizontalLine(a+1,b,u),r&&this.layout.hLineWhenBroken!==!1&&this.drawHorizontalLine(a,b,t)}b.context().page=h,b.context().y=i;var A=this.tableNode.table.body[a];for(f=0,e=A.length;e>f;f++){if(A[f].rowSpan&&(this.rowSpanData[f].rowSpan=A[f].rowSpan,A[f].colSpan&&A[f].colSpan>1))for(var B=1;B0&&this.rowSpanData[f].rowSpan--}this.drawHorizontalLine(a+1,b),this.headerRows&&a===this.headerRows-1&&(this.headerRepeatable=b.currentBlockToRepeatable()),this.dontBreakRows&&b.tracker.auto("pageChanged",function(){g.drawHorizontalLine(a,b)},function(){b.commitUnbreakableBlock(),g.drawHorizontalLine(a,b)}),!this.headerRepeatable||a!==this.rowsWithoutPageBreak-1&&a!==this.tableNode.table.body.length-1||(b.commitUnbreakableBlock(),b.pushToRepeatables(this.headerRepeatable),this.cleanUpRepeatables=!0,this.headerRepeatable=null)},a.exports=d},function(a,b,c){(function(b){(function(){var d,e,f,g,h,i,j={}.hasOwnProperty,k=function(a,b){function c(){this.constructor=a}for(var d in b)j.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};i=c(25),h=c(44),e=c(45),g=c(46),f=c(64),d=function(a){function d(a){var b,c,e,f;if(this.options=null!=a?a:{},d.__super__.constructor.apply(this,arguments),this.version=1.3,this.compress=null!=(e=this.options.compress)?e:!0,this._pageBuffer=[],this._pageBufferStart=0,this._offsets=[],this._waiting=0,this._ended=!1,this._offset=0,this._root=this.ref({Type:"Catalog",Pages:this.ref({Type:"Pages",Count:0,Kids:[]})}),this.page=null,this.initColor(),this.initVector(),this.initFonts(),this.initText(),this.initImages(),this.info={Producer:"PDFKit",Creator:"PDFKit",CreationDate:new Date},this.options.info){f=this.options.info;for(b in f)c=f[b],this.info[b]=c}this._write("%PDF-"+this.version),this._write("%ÿÿÿÿ"),this.addPage()}var i;return k(d,a),i=function(a){var b,c,e;e=[];for(c in a)b=a[c],e.push(d.prototype[c]=b);return e},i(c(65)),i(c(67)),i(c(69)),i(c(89)),i(c(96)),i(c(101)),d.prototype.addPage=function(a){var b;return null==a&&(a=this.options),this.options.bufferPages||this.flushPages(),this.page=new f(this,a),this._pageBuffer.push(this.page),b=this._root.data.Pages.data,b.Kids.push(this.page.dictionary),b.Count++,this.x=this.page.margins.left,this.y=this.page.margins.top,this._ctm=[1,0,0,1,0,0],this.transform(1,0,0,-1,0,this.page.height),this},d.prototype.bufferedPageRange=function(){return{start:this._pageBufferStart,count:this._pageBuffer.length}},d.prototype.switchToPage=function(a){var b;if(!(b=this._pageBuffer[a-this._pageBufferStart]))throw new Error("switchToPage("+a+") out of bounds, current buffer covers pages "+this._pageBufferStart+" to "+(this._pageBufferStart+this._pageBuffer.length-1)); +return this.page=b},d.prototype.flushPages=function(){var a,b,c,d;for(b=this._pageBuffer,this._pageBuffer=[],this._pageBufferStart+=b.length,c=0,d=b.length;d>c;c++)a=b[c],a.end()},d.prototype.ref=function(a){var b;return b=new g(this,this._offsets.length+1,a),this._offsets.push(null),this._waiting++,b},d.prototype._read=function(){},d.prototype._write=function(a){return b.isBuffer(a)||(a=new b(a+"\n","binary")),this.push(a),this._offset+=a.length},d.prototype.addContent=function(a){return this.page.write(a),this},d.prototype._refEnd=function(a){return this._offsets[a.id-1]=a.offset,0===--this._waiting&&this._ended?(this._finalize(),this._ended=!1):void 0},d.prototype.write=function(a,b){var c;return c=new Error("PDFDocument#write is deprecated, and will be removed in a future version of PDFKit. Please pipe the document into a Node stream."),console.warn(c.stack),this.pipe(h.createWriteStream(a)),this.end(),this.once("end",b)},d.prototype.output=function(a){throw new Error("PDFDocument#output is deprecated, and has been removed from PDFKit. Please pipe the document into a Node stream.")},d.prototype.end=function(){var a,b,c,d,e,f;this.flushPages(),this._info=this.ref(),e=this.info;for(b in e)d=e[b],"string"==typeof d&&(d=new String(d)),this._info.data[b]=d;this._info.end(),f=this._fontFamilies;for(c in f)a=f[c],a.embed();return this._root.end(),this._root.data.Pages.end(),0===this._waiting?this._finalize():this._ended=!0},d.prototype._finalize=function(a){var b,c,d,f,g;for(c=this._offset,this._write("xref"),this._write("0 "+(this._offsets.length+1)),this._write("0000000000 65535 f "),g=this._offsets,d=0,f=g.length;f>d;d++)b=g[d],b=("0000000000"+b).slice(-10),this._write(b+" 00000 n ");return this._write("trailer"),this._write(e.convert({Size:this._offsets.length+1,Root:this._root,Info:this._info})),this._write("startxref"),this._write(""+c),this._write("%%EOF"),this.push(null)},d.prototype.toString=function(){return"[object PDFDocument]"},d}(i.Readable),a.exports=d}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){function d(){e.call(this)}a.exports=d;var e=c(26).EventEmitter,f=c(27);f(d,e),d.Readable=c(28),d.Writable=c(40),d.Duplex=c(41),d.Transform=c(42),d.PassThrough=c(43),d.Stream=d,d.prototype.pipe=function(a,b){function c(b){a.writable&&!1===a.write(b)&&j.pause&&j.pause()}function d(){j.readable&&j.resume&&j.resume()}function f(){k||(k=!0,a.end())}function g(){k||(k=!0,"function"==typeof a.destroy&&a.destroy())}function h(a){if(i(),0===e.listenerCount(this,"error"))throw a}function i(){j.removeListener("data",c),a.removeListener("drain",d),j.removeListener("end",f),j.removeListener("close",g),j.removeListener("error",h),a.removeListener("error",h),j.removeListener("end",i),j.removeListener("close",i),a.removeListener("close",i)}var j=this;j.on("data",c),a.on("drain",d),a._isStdio||b&&b.end===!1||(j.on("end",f),j.on("close",g));var k=!1;return j.on("error",h),a.on("error",h),j.on("end",i),j.on("close",i),a.on("close",i),a.emit("pipe",j),a}},function(a,b){function c(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function d(a){return"function"==typeof a}function e(a){return"number"==typeof a}function f(a){return"object"==typeof a&&null!==a}function g(a){return void 0===a}a.exports=c,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._maxListeners=void 0,c.defaultMaxListeners=10,c.prototype.setMaxListeners=function(a){if(!e(a)||0>a||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},c.prototype.emit=function(a){var b,c,e,h,i,j;if(this._events||(this._events={}),"error"===a&&(!this._events.error||f(this._events.error)&&!this._events.error.length)){if(b=arguments[1],b instanceof Error)throw b;throw TypeError('Uncaught, unspecified "error" event.')}if(c=this._events[a],g(c))return!1;if(d(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:h=Array.prototype.slice.call(arguments,1),c.apply(this,h)}else if(f(c))for(h=Array.prototype.slice.call(arguments,1),j=c.slice(),e=j.length,i=0;e>i;i++)j[i].apply(this,h);return!0},c.prototype.addListener=function(a,b){var e;if(!d(b))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,d(b.listener)?b.listener:b),this._events[a]?f(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,f(this._events[a])&&!this._events[a].warned&&(e=g(this._maxListeners)?c.defaultMaxListeners:this._maxListeners,e&&e>0&&this._events[a].length>e&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),"function"==typeof console.trace&&console.trace())),this},c.prototype.on=c.prototype.addListener,c.prototype.once=function(a,b){function c(){this.removeListener(a,c),e||(e=!0,b.apply(this,arguments))}if(!d(b))throw TypeError("listener must be a function");var e=!1;return c.listener=b,this.on(a,c),this},c.prototype.removeListener=function(a,b){var c,e,g,h;if(!d(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],g=c.length,e=-1,c===b||d(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(f(c)){for(h=g;h-- >0;)if(c[h]===b||c[h].listener&&c[h].listener===b){e=h;break}if(0>e)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(e,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},c.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],d(c))this.removeListener(a,c);else if(c)for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},c.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?d(this._events[a])?[this._events[a]]:this._events[a].slice():[]},c.prototype.listenerCount=function(a){if(this._events){var b=this._events[a];if(d(b))return 1;if(b)return b.length}return 0},c.listenerCount=function(a,b){return a.listenerCount(b)}},function(a,b){"function"==typeof Object.create?a.exports=function(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:a.exports=function(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}},function(a,b,c){b=a.exports=c(29),b.Stream=c(25),b.Readable=b,b.Writable=c(36),b.Duplex=c(35),b.Transform=c(38),b.PassThrough=c(39)},function(a,b,c){(function(b){function d(a,b){var d=c(35);a=a||{};var e=a.highWaterMark,f=a.objectMode?16:16384;this.highWaterMark=e||0===e?e:f,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!a.objectMode,b instanceof d&&(this.objectMode=this.objectMode||!!a.readableObjectMode),this.defaultEncoding=a.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,a.encoding&&(C||(C=c(37).StringDecoder),this.decoder=new C(a.encoding),this.encoding=a.encoding)}function e(a){c(35);return this instanceof e?(this._readableState=new d(a,this),this.readable=!0,void A.call(this)):new e(a)}function f(a,b,c,d,e){var f=j(b,c);if(f)a.emit("error",f);else if(B.isNullOrUndefined(c))b.reading=!1,b.ended||k(a,b);else if(b.objectMode||c&&c.length>0)if(b.ended&&!e){var h=new Error("stream.push() after EOF");a.emit("error",h)}else if(b.endEmitted&&e){var h=new Error("stream.unshift() after end event");a.emit("error",h)}else!b.decoder||e||d||(c=b.decoder.write(c)),e||(b.reading=!1),b.flowing&&0===b.length&&!b.sync?(a.emit("data",c),a.read(0)):(b.length+=b.objectMode?1:c.length,e?b.buffer.unshift(c):b.buffer.push(c),b.needReadable&&l(a)),n(a,b);else e||(b.reading=!1);return g(b)}function g(a){return!a.ended&&(a.needReadable||a.length=E)a=E;else{a--;for(var b=1;32>b;b<<=1)a|=a>>b;a++}return a}function i(a,b){return 0===b.length&&b.ended?0:b.objectMode?0===a?0:1:isNaN(a)||B.isNull(a)?b.flowing&&b.buffer.length?b.buffer[0].length:b.length:0>=a?0:(a>b.highWaterMark&&(b.highWaterMark=h(a)),a>b.length?b.ended?b.length:(b.needReadable=!0,0):a)}function j(a,b){var c=null;return B.isBuffer(b)||B.isString(b)||B.isNullOrUndefined(b)||a.objectMode||(c=new TypeError("Invalid non-string/buffer chunk")),c}function k(a,b){if(b.decoder&&!b.ended){var c=b.decoder.end();c&&c.length&&(b.buffer.push(c),b.length+=b.objectMode?1:c.length)}b.ended=!0,l(a)}function l(a){var c=a._readableState;c.needReadable=!1,c.emittedReadable||(D("emitReadable",c.flowing),c.emittedReadable=!0,c.sync?b.nextTick(function(){m(a)}):m(a))}function m(a){D("emit readable"),a.emit("readable"),s(a)}function n(a,c){c.readingMore||(c.readingMore=!0,b.nextTick(function(){o(a,c)}))}function o(a,b){for(var c=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length=e)c=f?d.join(""):y.concat(d,e),d.length=0;else if(aj&&a>i;j++){var h=d[0],l=Math.min(a-i,h.length);f?c+=h.slice(0,l):h.copy(c,i,0,l),l0)throw new Error("endReadable called on non-empty stream");c.endEmitted||(c.ended=!0,b.nextTick(function(){c.endEmitted||0!==c.length||(c.endEmitted=!0,a.readable=!1,a.emit("end"))}))}function v(a,b){for(var c=0,d=a.length;d>c;c++)b(a[c],c)}function w(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1}a.exports=e;var x=c(31),y=c(2).Buffer;e.ReadableState=d;var z=c(26).EventEmitter;z.listenerCount||(z.listenerCount=function(a,b){return a.listeners(b).length});var A=c(25),B=c(32);B.inherits=c(33);var C,D=c(34);D=D&&D.debuglog?D.debuglog("stream"):function(){},B.inherits(e,A),e.prototype.push=function(a,b){var c=this._readableState;return B.isString(a)&&!c.objectMode&&(b=b||c.defaultEncoding,b!==c.encoding&&(a=new y(a,b),b="")),f(this,c,a,b,!1)},e.prototype.unshift=function(a){var b=this._readableState;return f(this,b,a,"",!0)},e.prototype.setEncoding=function(a){return C||(C=c(37).StringDecoder),this._readableState.decoder=new C(a),this._readableState.encoding=a,this};var E=8388608;e.prototype.read=function(a){D("read",a);var b=this._readableState,c=a;if((!B.isNumber(a)||a>0)&&(b.emittedReadable=!1),0===a&&b.needReadable&&(b.length>=b.highWaterMark||b.ended))return D("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?u(this):l(this),null;if(a=i(a,b),0===a&&b.ended)return 0===b.length&&u(this),null;var d=b.needReadable;D("need readable",d),(0===b.length||b.length-a0?t(a,b):null,B.isNull(e)&&(b.needReadable=!0,a=0),b.length-=a,0!==b.length||b.ended||(b.needReadable=!0),c!==a&&b.ended&&0===b.length&&u(this),B.isNull(e)||this.emit("data",e),e},e.prototype._read=function(a){this.emit("error",new Error("not implemented"))},e.prototype.pipe=function(a,c){function d(a){D("onunpipe"),a===l&&f()}function e(){D("onend"),a.end()}function f(){D("cleanup"),a.removeListener("close",i),a.removeListener("finish",j),a.removeListener("drain",q),a.removeListener("error",h),a.removeListener("unpipe",d),l.removeListener("end",e),l.removeListener("end",f),l.removeListener("data",g),!m.awaitDrain||a._writableState&&!a._writableState.needDrain||q()}function g(b){D("ondata");var c=a.write(b);!1===c&&(D("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,l.pause())}function h(b){D("onerror",b),k(),a.removeListener("error",h),0===z.listenerCount(a,"error")&&a.emit("error",b)}function i(){a.removeListener("finish",j),k()}function j(){D("onfinish"),a.removeListener("close",i),k()}function k(){D("unpipe"),l.unpipe(a)}var l=this,m=this._readableState;switch(m.pipesCount){case 0:m.pipes=a;break;case 1:m.pipes=[m.pipes,a];break;default:m.pipes.push(a)}m.pipesCount+=1,D("pipe count=%d opts=%j",m.pipesCount,c);var n=(!c||c.end!==!1)&&a!==b.stdout&&a!==b.stderr,o=n?e:f;m.endEmitted?b.nextTick(o):l.once("end",o),a.on("unpipe",d);var q=p(l);return a.on("drain",q),l.on("data",g),a._events&&a._events.error?x(a._events.error)?a._events.error.unshift(h):a._events.error=[h,a._events.error]:a.on("error",h),a.once("close",i),a.once("finish",j),a.emit("pipe",l),m.flowing||(D("pipe resume"),l.resume()),a},e.prototype.unpipe=function(a){var b=this._readableState;if(0===b.pipesCount)return this;if(1===b.pipesCount)return a&&a!==b.pipes?this:(a||(a=b.pipes),b.pipes=null,b.pipesCount=0,b.flowing=!1,a&&a.emit("unpipe",this),this);if(!a){var c=b.pipes,d=b.pipesCount;b.pipes=null,b.pipesCount=0,b.flowing=!1;for(var e=0;d>e;e++)c[e].emit("unpipe",this);return this}var e=w(b.pipes,a);return-1===e?this:(b.pipes.splice(e,1),b.pipesCount-=1,1===b.pipesCount&&(b.pipes=b.pipes[0]),a.emit("unpipe",this),this)},e.prototype.on=function(a,c){var d=A.prototype.on.call(this,a,c);if("data"===a&&!1!==this._readableState.flowing&&this.resume(),"readable"===a&&this.readable){var e=this._readableState;if(!e.readableListening)if(e.readableListening=!0,e.emittedReadable=!1,e.needReadable=!0,e.reading)e.length&&l(this,e);else{var f=this;b.nextTick(function(){D("readable nexttick read 0"),f.read(0)})}}return d},e.prototype.addListener=e.prototype.on,e.prototype.resume=function(){var a=this._readableState;return a.flowing||(D("resume"),a.flowing=!0,a.reading||(D("resume read 0"),this.read(0)),q(this,a)),this},e.prototype.pause=function(){return D("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(D("pause"),this._readableState.flowing=!1,this.emit("pause")),this},e.prototype.wrap=function(a){var b=this._readableState,c=!1,d=this;a.on("end",function(){if(D("wrapped end"),b.decoder&&!b.ended){var a=b.decoder.end();a&&a.length&&d.push(a)}d.push(null)}),a.on("data",function(e){if(D("wrapped data"),b.decoder&&(e=b.decoder.write(e)),e&&(b.objectMode||e.length)){var f=d.push(e);f||(c=!0,a.pause())}});for(var e in a)B.isFunction(a[e])&&B.isUndefined(this[e])&&(this[e]=function(b){return function(){return a[b].apply(a,arguments)}}(e));var f=["error","close","destroy","pause","resume"];return v(f,function(b){a.on(b,d.emit.bind(d,b))}),d._read=function(b){D("wrapped _read",b),c&&(c=!1,a.resume())},d},e._fromList=t}).call(b,c(30))},function(a,b){function c(){j=!1,g.length?i=g.concat(i):k=-1,i.length&&d()}function d(){if(!j){var a=setTimeout(c);j=!0;for(var b=i.length;b;){for(g=i,i=[];++k1)for(var c=1;cc;c++)b(a[c],c)}a.exports=d;var g=Object.keys||function(a){var b=[];for(var c in a)b.push(c);return b},h=c(32);h.inherits=c(33);var i=c(29),j=c(36);h.inherits(d,i),f(g(j.prototype),function(a){d.prototype[a]||(d.prototype[a]=j.prototype[a])})}).call(b,c(30))},function(a,b,c){(function(b){function d(a,b,c){this.chunk=a,this.encoding=b,this.callback=c}function e(a,b){var d=c(35);a=a||{};var e=a.highWaterMark,f=a.objectMode?16:16384;this.highWaterMark=e||0===e?e:f,this.objectMode=!!a.objectMode,b instanceof d&&(this.objectMode=this.objectMode||!!a.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var g=a.decodeStrings===!1;this.decodeStrings=!g,this.defaultEncoding=a.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){n(b,a)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function f(a){var b=c(35);return this instanceof f||this instanceof b?(this._writableState=new e(a,this),this.writable=!0,void x.call(this)):new f(a)}function g(a,c,d){var e=new Error("write after end");a.emit("error",e),b.nextTick(function(){d(e)})}function h(a,c,d,e){var f=!0;if(!(w.isBuffer(d)||w.isString(d)||w.isNullOrUndefined(d)||c.objectMode)){var g=new TypeError("Invalid non-string/buffer chunk");a.emit("error",g),b.nextTick(function(){e(g)}),f=!1}return f}function i(a,b,c){return!a.objectMode&&a.decodeStrings!==!1&&w.isString(b)&&(b=new v(b,c)),b}function j(a,b,c,e,f){c=i(b,c,e),w.isBuffer(c)&&(e="buffer");var g=b.objectMode?1:c.length;b.length+=g;var h=b.length1){for(var c=[],d=0;d=this.charLength-this.charReceived?this.charLength-this.charReceived:a.length;if(a.copy(this.charBuffer,this.charReceived,0,c),this.charReceived+=c,this.charReceived=55296&&56319>=d)){if(this.charReceived=this.charLength=0,0===a.length)return b;break}this.charLength+=this.surrogateSize,b=""}this.detectIncompleteChar(a);var e=a.length;this.charLength&&(a.copy(this.charBuffer,0,a.length-this.charReceived,e),e-=this.charReceived),b+=a.toString(this.encoding,0,e);var e=b.length-1,d=b.charCodeAt(e);if(d>=55296&&56319>=d){var f=this.surrogateSize;return this.charLength+=f,this.charReceived+=f,this.charBuffer.copy(this.charBuffer,f,0,f),a.copy(this.charBuffer,0,0,f),b.substring(0,e)}return b},j.prototype.detectIncompleteChar=function(a){for(var b=a.length>=3?3:a.length;b>0;b--){var c=a[a.length-b];if(1==b&&c>>5==6){this.charLength=2;break}if(2>=b&&c>>4==14){this.charLength=3;break}if(3>=b&&c>>3==30){this.charLength=4;break}}this.charReceived=b},j.prototype.end=function(a){var b="";if(a&&a.length&&(b=this.write(a)),this.charReceived){var c=this.charReceived,d=this.charBuffer,e=this.encoding;b+=d.slice(0,c).toString(e)}return b}},function(a,b,c){function d(a,b){this.afterTransform=function(a,c){return e(b,a,c)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function e(a,b,c){var d=a._transformState;d.transforming=!1;var e=d.writecb;if(!e)return a.emit("error",new Error("no writecb in Transform class"));d.writechunk=null,d.writecb=null,i.isNullOrUndefined(c)||a.push(c),e&&e(b);var f=a._readableState;f.reading=!1,(f.needReadable||f.lengthe;c=e+=2)b=a[c],a[c]=a[c+1],a[c+1]=b;return a},a.convert=function(h){var i,j,k,l,m,n,o,p,q,r;if("string"==typeof h)return"/"+h;if(h instanceof String){for(o=h.replace(d,function(a){return c[a]}),k=!1,j=q=0,r=o.length;r>q;j=q+=1)if(o.charCodeAt(j)>127){k=!0;break}return k&&(o=g(new b("\ufeff"+o,"utf16le")).toString("binary")),"("+o+")"}if(b.isBuffer(h))return"<"+h.toString("hex")+">";if(h instanceof e)return h.toString();if(h instanceof Date)return"(D:"+f(h.getUTCFullYear(),4)+f(h.getUTCMonth(),2)+f(h.getUTCDate(),2)+f(h.getUTCHours(),2)+f(h.getUTCMinutes(),2)+f(h.getUTCSeconds(),2)+"Z)";if(Array.isArray(h))return l=function(){var b,c,d;for(d=[],b=0,c=h.length;c>b;b++)i=h[b],d.push(a.convert(i));return d}().join(" "),"["+l+"]";if("[object Object]"==={}.toString.call(h)){n=["<<"];for(m in h)p=h[m],n.push("/"+m+" "+a.convert(p));return n.push(">>"),n.join("\n")}return""+h},a}(),a.exports=d,e=c(46)}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(b){(function(){var d,e,f,g=function(a,b){return function(){return a.apply(b,arguments)}};f=c(47),e=function(){function a(a,b,c){this.document=a,this.id=b,this.data=null!=c?c:{},this.finalize=g(this.finalize,this),this.gen=0,this.deflate=null,this.compress=this.document.compress&&!this.data.Filter,this.uncompressedLength=0,this.chunks=[]}return a.prototype.initDeflate=function(){return this.data.Filter="FlateDecode",this.deflate=f.createDeflate(),this.deflate.on("data",function(a){return function(b){return a.chunks.push(b),a.data.Length+=b.length}}(this)),this.deflate.on("end",this.finalize)},a.prototype.write=function(a){var c;return b.isBuffer(a)||(a=new b(a+"\n","binary")),this.uncompressedLength+=a.length,null==(c=this.data).Length&&(c.Length=0),this.compress?(this.deflate||this.initDeflate(),this.deflate.write(a)):(this.chunks.push(a),this.data.Length+=a.length)},a.prototype.end=function(a){return("string"==typeof a||b.isBuffer(a))&&this.write(a),this.deflate?this.deflate.end():this.finalize()},a.prototype.finalize=function(){var a,b,c,e;if(this.offset=this.document._offset,this.document._write(""+this.id+" "+this.gen+" obj"),this.document._write(d.convert(this.data)),this.chunks.length){for(this.document._write("stream"),e=this.chunks,b=0,c=e.length;c>b;b++)a=e[b],this.document._write(a);this.chunks.length=0,this.document._write("\nendstream")}return this.document._write("endobj"),this.document._refEnd(this)},a.prototype.toString=function(){return""+this.id+" "+this.gen+" R"},a}(),a.exports=e,d=c(45)}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(a,d){function e(b,c,d){function e(){for(var a;null!==(a=b.read());)h.push(a),i+=a.length;b.once("readable",e)}function f(a){b.removeListener("end",g),b.removeListener("readable",e),d(a)}function g(){var c=a.concat(h,i);h=[],d(null,c),b.close()}var h=[],i=0;b.on("error",f),b.on("end",g),b.end(c),e()}function f(b,c){if("string"==typeof c&&(c=new a(c)),!a.isBuffer(c))throw new TypeError("Not a string or buffer");var d=p.Z_FINISH;return b._processChunk(c,d)}function g(a){return this instanceof g?void n.call(this,a,p.DEFLATE):new g(a)}function h(a){return this instanceof h?void n.call(this,a,p.INFLATE):new h(a)}function i(a){return this instanceof i?void n.call(this,a,p.GZIP):new i(a)}function j(a){return this instanceof j?void n.call(this,a,p.GUNZIP):new j(a)}function k(a){return this instanceof k?void n.call(this,a,p.DEFLATERAW):new k(a)}function l(a){return this instanceof l?void n.call(this,a,p.INFLATERAW):new l(a)}function m(a){return this instanceof m?void n.call(this,a,p.UNZIP):new m(a)}function n(c,d){if(this._opts=c=c||{},this._chunkSize=c.chunkSize||b.Z_DEFAULT_CHUNK,o.call(this,c),c.flush&&c.flush!==p.Z_NO_FLUSH&&c.flush!==p.Z_PARTIAL_FLUSH&&c.flush!==p.Z_SYNC_FLUSH&&c.flush!==p.Z_FULL_FLUSH&&c.flush!==p.Z_FINISH&&c.flush!==p.Z_BLOCK)throw new Error("Invalid flush flag: "+c.flush); +if(this._flushFlag=c.flush||p.Z_NO_FLUSH,c.chunkSize&&(c.chunkSizeb.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+c.chunkSize);if(c.windowBits&&(c.windowBitsb.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+c.windowBits);if(c.level&&(c.levelb.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+c.level);if(c.memLevel&&(c.memLevelb.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+c.memLevel);if(c.strategy&&c.strategy!=b.Z_FILTERED&&c.strategy!=b.Z_HUFFMAN_ONLY&&c.strategy!=b.Z_RLE&&c.strategy!=b.Z_FIXED&&c.strategy!=b.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+c.strategy);if(c.dictionary&&!a.isBuffer(c.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new p.Zlib(d);var e=this;this._hadError=!1,this._binding.onerror=function(a,c){e._binding=null,e._hadError=!0;var d=new Error(a);d.errno=c,d.code=b.codes[c],e.emit("error",d)};var f=b.Z_DEFAULT_COMPRESSION;"number"==typeof c.level&&(f=c.level);var g=b.Z_DEFAULT_STRATEGY;"number"==typeof c.strategy&&(g=c.strategy),this._binding.init(c.windowBits||b.Z_DEFAULT_WINDOWBITS,f,c.memLevel||b.Z_DEFAULT_MEMLEVEL,g,c.dictionary),this._buffer=new a(this._chunkSize),this._offset=0,this._closed=!1,this._level=f,this._strategy=g,this.once("end",this.close)}var o=c(42),p=c(48),q=c(60),r=c(63).ok;p.Z_MIN_WINDOWBITS=8,p.Z_MAX_WINDOWBITS=15,p.Z_DEFAULT_WINDOWBITS=15,p.Z_MIN_CHUNK=64,p.Z_MAX_CHUNK=1/0,p.Z_DEFAULT_CHUNK=16384,p.Z_MIN_MEMLEVEL=1,p.Z_MAX_MEMLEVEL=9,p.Z_DEFAULT_MEMLEVEL=8,p.Z_MIN_LEVEL=-1,p.Z_MAX_LEVEL=9,p.Z_DEFAULT_LEVEL=p.Z_DEFAULT_COMPRESSION,Object.keys(p).forEach(function(a){a.match(/^Z/)&&(b[a]=p[a])}),b.codes={Z_OK:p.Z_OK,Z_STREAM_END:p.Z_STREAM_END,Z_NEED_DICT:p.Z_NEED_DICT,Z_ERRNO:p.Z_ERRNO,Z_STREAM_ERROR:p.Z_STREAM_ERROR,Z_DATA_ERROR:p.Z_DATA_ERROR,Z_MEM_ERROR:p.Z_MEM_ERROR,Z_BUF_ERROR:p.Z_BUF_ERROR,Z_VERSION_ERROR:p.Z_VERSION_ERROR},Object.keys(b.codes).forEach(function(a){b.codes[b.codes[a]]=a}),b.Deflate=g,b.Inflate=h,b.Gzip=i,b.Gunzip=j,b.DeflateRaw=k,b.InflateRaw=l,b.Unzip=m,b.createDeflate=function(a){return new g(a)},b.createInflate=function(a){return new h(a)},b.createDeflateRaw=function(a){return new k(a)},b.createInflateRaw=function(a){return new l(a)},b.createGzip=function(a){return new i(a)},b.createGunzip=function(a){return new j(a)},b.createUnzip=function(a){return new m(a)},b.deflate=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new g(b),a,c)},b.deflateSync=function(a,b){return f(new g(b),a)},b.gzip=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new i(b),a,c)},b.gzipSync=function(a,b){return f(new i(b),a)},b.deflateRaw=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new k(b),a,c)},b.deflateRawSync=function(a,b){return f(new k(b),a)},b.unzip=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new m(b),a,c)},b.unzipSync=function(a,b){return f(new m(b),a)},b.inflate=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new h(b),a,c)},b.inflateSync=function(a,b){return f(new h(b),a)},b.gunzip=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new j(b),a,c)},b.gunzipSync=function(a,b){return f(new j(b),a)},b.inflateRaw=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new l(b),a,c)},b.inflateRawSync=function(a,b){return f(new l(b),a)},q.inherits(n,o),n.prototype.params=function(a,c,e){if(ab.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+a);if(c!=b.Z_FILTERED&&c!=b.Z_HUFFMAN_ONLY&&c!=b.Z_RLE&&c!=b.Z_FIXED&&c!=b.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+c);if(this._level!==a||this._strategy!==c){var f=this;this.flush(p.Z_SYNC_FLUSH,function(){f._binding.params(a,c),f._hadError||(f._level=a,f._strategy=c,e&&e())})}else d.nextTick(e)},n.prototype.reset=function(){return this._binding.reset()},n.prototype._flush=function(b){this._transform(new a(0),"",b)},n.prototype.flush=function(b,c){var e=this._writableState;if(("function"==typeof b||void 0===b&&!c)&&(c=b,b=p.Z_FULL_FLUSH),e.ended)c&&d.nextTick(c);else if(e.ending)c&&this.once("end",c);else if(e.needDrain){var f=this;this.once("drain",function(){f.flush(c)})}else this._flushFlag=b,this.write(new a(0),"",c)},n.prototype.close=function(a){if(a&&d.nextTick(a),!this._closed){this._closed=!0,this._binding.close();var b=this;d.nextTick(function(){b.emit("close")})}},n.prototype._transform=function(b,c,d){var e,f=this._writableState,g=f.ending||f.ended,h=g&&(!b||f.length===b.length);if(null===!b&&!a.isBuffer(b))return d(new Error("invalid input"));h?e=p.Z_FINISH:(e=this._flushFlag,b.length>=f.length&&(this._flushFlag=this._opts.flush||p.Z_NO_FLUSH));this._processChunk(b,e,d)},n.prototype._processChunk=function(b,c,d){function e(k,n){if(!i._hadError){var o=g-n;if(r(o>=0,"have should not go down"),o>0){var p=i._buffer.slice(i._offset,i._offset+o);i._offset+=o,j?i.push(p):(l.push(p),m+=p.length)}if((0===n||i._offset>=i._chunkSize)&&(g=i._chunkSize,i._offset=0,i._buffer=new a(i._chunkSize)),0===n){if(h+=f-k,f=k,!j)return!0;var q=i._binding.write(c,b,h,f,i._buffer,i._offset,i._chunkSize);return q.callback=e,void(q.buffer=b)}return j?void d():!1}}var f=b&&b.length,g=this._chunkSize-this._offset,h=0,i=this,j="function"==typeof d;if(!j){var k,l=[],m=0;this.on("error",function(a){k=a});do var n=this._binding.writeSync(c,b,h,f,this._buffer,this._offset,g);while(!this._hadError&&e(n[0],n[1]));if(this._hadError)throw k;var o=a.concat(l,m);return this.close(),o}var p=this._binding.write(c,b,h,f,this._buffer,this._offset,g);p.buffer=b,p.callback=e},q.inherits(g,n),q.inherits(h,n),q.inherits(i,n),q.inherits(j,n),q.inherits(k,n),q.inherits(l,n),q.inherits(m,n)}).call(b,c(2).Buffer,c(30))},function(a,b,c){(function(a,d){function e(a){if(ab.UNZIP)throw new TypeError("Bad argument");this.mode=a,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function f(a,b){for(var c=0;c4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(C.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){D._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,C.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=E(a.adler,b,e,c):2===a.state.wrap&&(a.adler=F(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-ja?a.strstart-(a.w_size-ja):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ia,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&m>f);if(d=ia-(m-f),f=m-ia,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-ja)){C.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=ha)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===H)return sa;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return sa;if(a.strstart-a.block_start>=a.w_size-ja&&(h(a,!1),0===a.strm.avail_out))return sa}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ua:va):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?sa:sa}function o(a,b){for(var c,d;;){if(a.lookahead=ha&&(a.ins_h=(a.ins_h<=ha)if(d=D._tr_tally(a,a.strstart-a.match_start,a.match_length-ha),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=ha){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<=ha&&(a.ins_h=(a.ins_h<4096)&&(a.match_length=ha-1)),a.prev_length>=ha&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-ha,d=D._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-ha),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<=ha&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ia;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&f>e);a.match_length=ia-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=ha?(c=D._tr_tally(a,1,a.match_length-ha),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return sa}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ua:va):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sa:ta}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===H)return sa;break}if(a.match_length=0,c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return sa}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ua:va):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sa:ta}function s(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=B[a.level].max_lazy,a.good_match=B[a.level].good_length,a.nice_match=B[a.level].nice_length,a.max_chain_length=B[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=ha-1,a.match_available=0,a.ins_h=0}function t(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new C.Buf16(2*fa),this.dyn_dtree=new C.Buf16(2*(2*da+1)),this.bl_tree=new C.Buf16(2*(2*ea+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new C.Buf16(ga+1),this.heap=new C.Buf16(2*ca+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new C.Buf16(2*ca+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function u(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=X,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?la:qa,a.adler=2===b.wrap?0:1,b.last_flush=H,D._tr_init(b),M):d(a,O)}function v(a){var b=u(a);return b===M&&s(a.state),b}function w(a,b){return a&&a.state?2!==a.state.wrap?O:(a.state.gzhead=b,M):O}function x(a,b,c,e,f,g){if(!a)return O;var h=1;if(b===R&&(b=6),0>e?(h=0,e=-e):e>15&&(h=2,e-=16),1>f||f>Z||c!==Y||8>e||e>15||0>b||b>9||0>g||g>V)return d(a,O);8===e&&(e=9);var i=new t;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<>1,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,v(a)}function y(a,b){return x(a,b,Y,$,_,W)}function z(a,b){var c,h,k,l;if(!a||!a.state||b>L||0>b)return a?d(a,O):O;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===ra&&b!==K)return d(a,0===a.avail_out?Q:O);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===la)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=F(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=ma):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,wa),h.status=qa);else{var m=Y+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=T||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=ka),m+=31-m%31,h.status=qa,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===ma)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=na)}else h.status=na;if(h.status===na)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindexk&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=oa)}else h.status=oa;if(h.status===oa)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindexk&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=pa)}else h.status=pa;if(h.status===pa&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=qa)):h.status=qa),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,M}else if(0===a.avail_in&&e(b)<=e(c)&&b!==K)return d(a,Q);if(h.status===ra&&0!==a.avail_in)return d(a,Q);if(0!==a.avail_in||0!==h.lookahead||b!==H&&h.status!==ra){var o=h.strategy===T?r(h,b):h.strategy===U?q(h,b):B[h.level].func(h,b);if((o===ua||o===va)&&(h.status=ra),o===sa||o===ua)return 0===a.avail_out&&(h.last_flush=-1),M;if(o===ta&&(b===I?D._tr_align(h):b!==L&&(D._tr_stored_block(h,0,0,!1),b===J&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,M}return b!==K?M:h.wrap<=0?N:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?M:N)}function A(a){var b;return a&&a.state?(b=a.state.status,b!==la&&b!==ma&&b!==na&&b!==oa&&b!==pa&&b!==qa&&b!==ra?d(a,O):(a.state=null,b===qa?d(a,P):M)):O}var B,C=c(52),D=c(53),E=c(54),F=c(55),G=c(49),H=0,I=1,J=3,K=4,L=5,M=0,N=1,O=-2,P=-3,Q=-5,R=-1,S=1,T=2,U=3,V=4,W=0,X=2,Y=8,Z=9,$=15,_=8,aa=29,ba=256,ca=ba+1+aa,da=30,ea=19,fa=2*ca+1,ga=15,ha=3,ia=258,ja=ia+ha+1,ka=32,la=42,ma=69,na=73,oa=91,pa=103,qa=113,ra=666,sa=1,ta=2,ua=3,va=4,wa=3,xa=function(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e};B=[new xa(0,0,0,0,n),new xa(4,4,8,4,o),new xa(4,5,16,8,o),new xa(4,6,32,32,o),new xa(4,4,16,16,p),new xa(8,16,32,32,p),new xa(8,16,128,128,p),new xa(8,32,128,256,p),new xa(32,128,258,1024,p),new xa(32,258,258,4096,p)],b.deflateInit=y,b.deflateInit2=x,b.deflateReset=v,b.deflateResetKeep=u,b.deflateSetHeader=w,b.deflate=z,b.deflateEnd=A,b.deflateInfo="pako deflate (from Nodeca project)"},function(a,b){"use strict";var c="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;b.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},b.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var d={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;c>b;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;c>b;b++)f=a[b],g.set(f,e),e+=f.length;return g}},e={arraySet:function(a,b,c,d,e){for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};b.setTyped=function(a){a?(b.Buf8=Uint8Array,b.Buf16=Uint16Array,b.Buf32=Int32Array,b.assign(b,d)):(b.Buf8=Array,b.Buf16=Array,b.Buf32=Array,b.assign(b,e))},b.setTyped(c)},function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a){return 256>a?ga[a]:ga[256+(a>>>7)]}function f(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function g(a,b,c){a.bi_valid>V-c?(a.bi_buf|=b<>V-a.bi_valid,a.bi_valid+=c-V):(a.bi_buf|=b<>>=1,c<<=1;while(--b>0);return c>>>1}function j(a){16===a.bi_valid?(f(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function k(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;U>=f;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;T>c;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function l(a,b,c){var d,e,f=new Array(U+1),g=0;for(d=1;U>=d;d++)f[d]=g=g+c[d-1]<<1;for(e=0;b>=e;e++){var h=a[2*e+1];0!==h&&(a[2*e]=i(f[h]++,h))}}function m(){var a,b,c,d,e,f=new Array(U+1);for(c=0,d=0;O-1>d;d++)for(ia[d]=c,a=0;a<1<<_[d];a++)ha[c++]=d;for(ha[c-1]=d,e=0,d=0;16>d;d++)for(ja[d]=e,a=0;a<1<>=7;R>d;d++)for(ja[d]=e<<7,a=0;a<1<=b;b++)f[b]=0;for(a=0;143>=a;)ea[2*a+1]=8,a++,f[8]++;for(;255>=a;)ea[2*a+1]=9,a++,f[9]++;for(;279>=a;)ea[2*a+1]=7,a++,f[7]++;for(;287>=a;)ea[2*a+1]=8,a++,f[8]++;for(l(ea,Q+1,f),a=0;R>a;a++)fa[2*a+1]=5,fa[2*a]=i(a,5);ka=new na(ea,_,P+1,Q,U),la=new na(fa,aa,0,R,U),ma=new na(new Array(0),ba,0,S,W)}function n(a){var b;for(b=0;Q>b;b++)a.dyn_ltree[2*b]=0;for(b=0;R>b;b++)a.dyn_dtree[2*b]=0;for(b=0;S>b;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*X]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function o(a){a.bi_valid>8?f(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function p(a,b,c,d){o(a),d&&(f(a,c),f(a,~c)),E.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function q(a,b,c,d){var e=2*b,f=2*c;return a[e]c;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=2>j?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)r(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],r(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,r(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],k(a,b),l(f,j,a.bl_count)}function u(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;c>=d;d++)e=g,g=b[2*(d+1)+1],++hh?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*Y]++):10>=h?a.bl_tree[2*Z]++:a.bl_tree[2*$]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function v(a,b,c){var d,e,f=-1,i=b[1],j=0,k=7,l=4;for(0===i&&(k=138,l=3),d=0;c>=d;d++)if(e=i,i=b[2*(d+1)+1],!(++jj){do h(a,e,a.bl_tree);while(0!==--j)}else 0!==e?(e!==f&&(h(a,e,a.bl_tree),j--),h(a,Y,a.bl_tree),g(a,j-3,2)):10>=j?(h(a,Z,a.bl_tree),g(a,j-3,3)):(h(a,$,a.bl_tree),g(a,j-11,7));j=0,f=e,0===i?(k=138,l=3):e===i?(k=6,l=3):(k=7,l=4)}}function w(a){var b;for(u(a,a.dyn_ltree,a.l_desc.max_code),u(a,a.dyn_dtree,a.d_desc.max_code),t(a,a.bl_desc),b=S-1;b>=3&&0===a.bl_tree[2*ca[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function x(a,b,c,d){var e;for(g(a,b-257,5),g(a,c-1,5),g(a,d-4,4),e=0;d>e;e++)g(a,a.bl_tree[2*ca[e]+1],3);v(a,a.dyn_ltree,b-1),v(a,a.dyn_dtree,c-1)}function y(a){var b,c=4093624447;for(b=0;31>=b;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return G;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return H;for(b=32;P>b;b++)if(0!==a.dyn_ltree[2*b])return H;return G}function z(a){pa||(m(),pa=!0),a.l_desc=new oa(a.dyn_ltree,ka),a.d_desc=new oa(a.dyn_dtree,la),a.bl_desc=new oa(a.bl_tree,ma),a.bi_buf=0,a.bi_valid=0,n(a)}function A(a,b,c,d){g(a,(J<<1)+(d?1:0),3),p(a,b,c,!0)}function B(a){g(a,K<<1,3),h(a,X,ea),j(a)}function C(a,b,c,d){var e,f,h=0;a.level>0?(a.strm.data_type===I&&(a.strm.data_type=y(a)),t(a,a.l_desc),t(a,a.d_desc),h=w(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,e>=f&&(e=f)):e=f=c+5,e>=c+4&&-1!==b?A(a,b,c,d):a.strategy===F||f===e?(g(a,(K<<1)+(d?1:0),3),s(a,ea,fa)):(g(a,(L<<1)+(d?1:0),3),x(a,a.l_desc.max_code+1,a.d_desc.max_code+1,h+1),s(a,a.dyn_ltree,a.dyn_dtree)),n(a),d&&o(a)}function D(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(ha[c]+P+1)]++,a.dyn_dtree[2*e(b)]++),a.last_lit===a.lit_bufsize-1}var E=c(52),F=4,G=0,H=1,I=2,J=0,K=1,L=2,M=3,N=258,O=29,P=256,Q=P+1+O,R=30,S=19,T=2*Q+1,U=15,V=16,W=7,X=256,Y=16,Z=17,$=18,_=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],aa=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ba=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ca=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],da=512,ea=new Array(2*(Q+2));d(ea);var fa=new Array(2*R);d(fa);var ga=new Array(da);d(ga);var ha=new Array(N-M+1);d(ha);var ia=new Array(O);d(ia);var ja=new Array(R);d(ja);var ka,la,ma,na=function(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length},oa=function(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b},pa=!1;b._tr_init=z,b._tr_stored_block=A,b._tr_flush_block=C,b._tr_tally=D,b._tr_align=B},function(a,b){"use strict";function c(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}a.exports=c},function(a,b){"use strict";function c(){for(var a,b=[],c=0;256>c;c++){a=c;for(var d=0;8>d;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function d(a,b,c,d){var f=e,g=d+c;a=-1^a;for(var h=d;g>h;h++)a=a>>>8^f[255&(a^b[h])];return-1^a}var e=c();a.exports=d},function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=K, +b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new r.Buf32(oa),b.distcode=b.distdyn=new r.Buf32(pa),b.sane=1,b.back=-1,C):F}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):F}function h(a,b){var c,d;return a&&a.state?(d=a.state,0>b?(c=0,b=-b):(c=(b>>4)+1,48>b&&(b&=15)),b&&(8>b||b>15)?F:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):F}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==C&&(a.state=null),c):F}function j(a){return i(a,ra)}function k(a){if(sa){var b;for(p=new r.Buf32(512),q=new r.Buf32(32),b=0;144>b;)a.lens[b++]=8;for(;256>b;)a.lens[b++]=9;for(;280>b;)a.lens[b++]=7;for(;288>b;)a.lens[b++]=8;for(v(x,a.lens,0,288,p,0,a.work,{bits:9}),b=0;32>b;)a.lens[b++]=5;v(y,a.lens,0,32,q,0,a.work,{bits:5}),sa=!1}a.lencode=p,a.lenbits=9,a.distcode=q,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<=f.wsize?(r.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),r.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(r.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whaven;){if(0===i)break a;i--,m+=e[g++]<>>8&255,c.check=t(c.check,Ba,2,0),m=0,n=0,c.mode=L;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=la;break}if((15&m)!==J){a.msg="unknown compression method",c.mode=la;break}if(m>>>=4,n-=4,wa=(15&m)+8,0===c.wbits)c.wbits=wa;else if(wa>c.wbits){a.msg="invalid window size",c.mode=la;break}c.dmax=1<n;){if(0===i)break a;i--,m+=e[g++]<>8&1),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0,c.mode=M;case M:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<>>8&255,Ba[2]=m>>>16&255,Ba[3]=m>>>24&255,c.check=t(c.check,Ba,4,0)),m=0,n=0,c.mode=N;case N:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>8),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0,c.mode=O;case O:if(1024&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=P;case P:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wa=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),r.arraySet(c.head.extra,e,g,q,wa)),512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=Q;case Q:if(2048&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.name+=String.fromCharCode(wa));while(wa&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=R;case R:if(4096&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.comment+=String.fromCharCode(wa));while(wa&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.comment=null);c.mode=S;case S:if(512&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=V;break;case T:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<>>=7&n,n-=7&n,c.mode=ia;break}for(;3>n;){if(0===i)break a;i--,m+=e[g++]<>>=1,n-=1,3&m){case 0:c.mode=X;break;case 1:if(k(c),c.mode=ba,b===B){m>>>=2,n-=2;break a}break;case 2:c.mode=$;break;case 3:a.msg="invalid block type",c.mode=la}m>>>=2,n-=2;break;case X:for(m>>>=7&n,n-=7&n;32>n;){if(0===i)break a;i--,m+=e[g++]<>>16^65535)){a.msg="invalid stored block lengths",c.mode=la;break}if(c.length=65535&m,m=0,n=0,c.mode=Y,b===B)break a;case Y:c.mode=Z;case Z:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;r.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=V;break;case $:for(;14>n;){if(0===i)break a;i--,m+=e[g++]<>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=la;break}c.have=0,c.mode=_;case _:for(;c.haven;){if(0===i)break a;i--,m+=e[g++]<>>=3,n-=3}for(;c.have<19;)c.lens[Ca[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ya={bits:c.lenbits},xa=v(w,c.lens,0,19,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid code lengths set",c.mode=la;break}c.have=0,c.mode=aa;case aa:for(;c.have>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<sa)m>>>=qa,n-=qa,c.lens[c.have++]=sa;else{if(16===sa){for(za=qa+2;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=qa,n-=qa,0===c.have){a.msg="invalid bit length repeat",c.mode=la;break}wa=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sa){for(za=qa+3;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=qa,n-=qa,wa=0,q=3+(7&m),m>>>=3,n-=3}else{for(za=qa+7;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=qa,n-=qa,wa=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=la;break}for(;q--;)c.lens[c.have++]=wa}}if(c.mode===la)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=la;break}if(c.lenbits=9,ya={bits:c.lenbits},xa=v(x,c.lens,0,c.nlen,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid literal/lengths set",c.mode=la;break}if(c.distbits=6,c.distcode=c.distdyn,ya={bits:c.distbits},xa=v(y,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ya),c.distbits=ya.bits,xa){a.msg="invalid distances set",c.mode=la;break}if(c.mode=ba,b===B)break a;case ba:c.mode=ca;case ca:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,u(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===V&&(c.back=-1);break}for(c.back=0;Aa=c.lencode[m&(1<>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=ta+qa);){if(0===i)break a;i--,m+=e[g++]<>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,c.length=sa,0===ra){c.mode=ha;break}if(32&ra){c.back=-1,c.mode=V;break}if(64&ra){a.msg="invalid literal/length code",c.mode=la;break}c.extra=15&ra,c.mode=da;case da:if(c.extra){for(za=c.extra;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=ea;case ea:for(;Aa=c.distcode[m&(1<>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=ta+qa);){if(0===i)break a;i--,m+=e[g++]<>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,64&ra){a.msg="invalid distance code",c.mode=la;break}c.offset=sa,c.extra=15&ra,c.mode=fa;case fa:if(c.extra){for(za=c.extra;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=la;break}c.mode=ga;case ga:if(0===j)break a;if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=la;break}q>c.wnext?(q-=c.wnext,oa=c.wsize-q):oa=c.wnext-q,q>c.length&&(q=c.length),pa=c.window}else pa=f,oa=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pa[oa++];while(--q);0===c.length&&(c.mode=ca);break;case ha:if(0===j)break a;f[h++]=c.length,j--,c.mode=ca;break;case ia:if(c.wrap){for(;32>n;){if(0===i)break a;i--,m|=e[g++]<n;){if(0===i)break a;i--,m+=e[g++]<q&&(p+=B[f++]<>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<q&&(p+=B[f++]<>>=w,q-=w),15>q&&(p+=B[f++]<>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<q&&(p+=B[f++]<q&&(p+=B[f++]<k){a.msg="invalid distance too far back",e.mode=c;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&e.sane){a.msg="invalid distance too far back",e.mode=c;break a}if(z=0,A=o,0===n){if(z+=l-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(w>n){if(z+=l+n-w,w-=n,x>w){x-=w;do C[h++]=o[z++];while(--w);if(z=0,x>n){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(g>f&&j>h);x=q>>3,f-=x,q-=x<<3,p&=(1<f?5+(g-f):5-(f-g),a.avail_out=j>h?257+(j-h):257-(h-j),e.hold=p,e.bits=q}},function(a,b,c){"use strict";var d=c(52),e=15,f=852,g=592,h=0,i=1,j=2,k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],n=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];a.exports=function(a,b,c,o,p,q,r,s){var t,u,v,w,x,y,z,A,B,C=s.bits,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=null,O=0,P=new d.Buf16(e+1),Q=new d.Buf16(e+1),R=null,S=0;for(D=0;e>=D;D++)P[D]=0;for(E=0;o>E;E++)P[b[c+E]]++;for(H=C,G=e;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;G>F&&0===P[F];F++);for(F>H&&(H=F),K=1,D=1;e>=D;D++)if(K<<=1,K-=P[D],0>K)return-1;if(K>0&&(a===h||1!==G))return-1;for(Q[1]=0,D=1;e>D;D++)Q[D+1]=Q[D]+P[D];for(E=0;o>E;E++)0!==b[c+E]&&(r[Q[b[c+E]]++]=E);if(a===h?(N=R=r,y=19):a===i?(N=k,O-=257,R=l,S-=257,y=256):(N=m,R=n,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<f||a===j&&L>g)return 1;for(var T=0;;){T++,z=D-J,r[E]y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[c+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<I+J&&(K-=P[I+J],!(0>=K));)I++,K<<=1;if(L+=1<f||a===j&&L>g)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},function(a,b){a.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(a,b,c){(function(a,d){function e(a,c){var d={seen:[],stylize:g};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),p(c)?d.showHidden=c:c&&b._extend(d,c),v(d.showHidden)&&(d.showHidden=!1),v(d.depth)&&(d.depth=2),v(d.colors)&&(d.colors=!1),v(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=f),i(d,a,d.depth)}function f(a,b){var c=e.styles[b];return c?"["+e.colors[c][0]+"m"+a+"["+e.colors[c][1]+"m":a}function g(a,b){return a}function h(a){var b={};return a.forEach(function(a,c){b[a]=!0}),b}function i(a,c,d){if(a.customInspect&&c&&A(c.inspect)&&c.inspect!==b.inspect&&(!c.constructor||c.constructor.prototype!==c)){var e=c.inspect(d,a);return t(e)||(e=i(a,e,d)),e}var f=j(a,c);if(f)return f;var g=Object.keys(c),p=h(g);if(a.showHidden&&(g=Object.getOwnPropertyNames(c)),z(c)&&(g.indexOf("message")>=0||g.indexOf("description")>=0))return k(c);if(0===g.length){if(A(c)){var q=c.name?": "+c.name:"";return a.stylize("[Function"+q+"]","special")}if(w(c))return a.stylize(RegExp.prototype.toString.call(c),"regexp");if(y(c))return a.stylize(Date.prototype.toString.call(c),"date");if(z(c))return k(c)}var r="",s=!1,u=["{","}"];if(o(c)&&(s=!0,u=["[","]"]),A(c)){var v=c.name?": "+c.name:"";r=" [Function"+v+"]"}if(w(c)&&(r=" "+RegExp.prototype.toString.call(c)),y(c)&&(r=" "+Date.prototype.toUTCString.call(c)),z(c)&&(r=" "+k(c)),0===g.length&&(!s||0==c.length))return u[0]+r+u[1];if(0>d)return w(c)?a.stylize(RegExp.prototype.toString.call(c),"regexp"):a.stylize("[Object]","special");a.seen.push(c);var x;return x=s?l(a,c,d,p,g):g.map(function(b){return m(a,c,d,p,b,s)}),a.seen.pop(),n(x,r,u)}function j(a,b){if(v(b))return a.stylize("undefined","undefined");if(t(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return s(b)?a.stylize(""+b,"number"):p(b)?a.stylize(""+b,"boolean"):q(b)?a.stylize("null","null"):void 0}function k(a){return"["+Error.prototype.toString.call(a)+"]"}function l(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)F(b,String(g))?f.push(m(a,b,c,d,String(g),!0)):f.push("");return e.forEach(function(e){e.match(/^\d+$/)||f.push(m(a,b,c,d,e,!0))}),f}function m(a,b,c,d,e,f){var g,h,j;if(j=Object.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?h=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(h=a.stylize("[Setter]","special")),F(d,e)||(g="["+e+"]"),h||(a.seen.indexOf(j.value)<0?(h=q(c)?i(a,j.value,null):i(a,j.value,c-1),h.indexOf("\n")>-1&&(h=f?h.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+h.split("\n").map(function(a){return" "+a}).join("\n"))):h=a.stylize("[Circular]","special")),v(g)){if(f&&e.match(/^\d+$/))return h;g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+h}function n(a,b,c){var d=0,e=a.reduce(function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function o(a){return Array.isArray(a)}function p(a){return"boolean"==typeof a}function q(a){return null===a}function r(a){return null==a}function s(a){return"number"==typeof a}function t(a){return"string"==typeof a}function u(a){return"symbol"==typeof a}function v(a){return void 0===a}function w(a){return x(a)&&"[object RegExp]"===C(a)}function x(a){return"object"==typeof a&&null!==a}function y(a){return x(a)&&"[object Date]"===C(a)}function z(a){return x(a)&&("[object Error]"===C(a)||a instanceof Error)}function A(a){return"function"==typeof a}function B(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function C(a){return Object.prototype.toString.call(a)}function D(a){return 10>a?"0"+a.toString(10):a.toString(10)}function E(){var a=new Date,b=[D(a.getHours()),D(a.getMinutes()),D(a.getSeconds())].join(":");return[a.getDate(),J[a.getMonth()],b].join(" ")}function F(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var G=/%[sdj%]/g;b.format=function(a){if(!t(a)){for(var b=[],c=0;c=f)return a;switch(a){case"%s":return String(d[c++]);case"%d":return Number(d[c++]);case"%j":try{return JSON.stringify(d[c++])}catch(b){return"[Circular]"}default:return a}}),h=d[c];f>c;h=d[++c])g+=q(h)||!x(h)?" "+h:" "+e(h);return g},b.deprecate=function(c,e){function f(){if(!g){if(d.throwDeprecation)throw new Error(e);d.traceDeprecation?console.trace(e):console.error(e),g=!0}return c.apply(this,arguments)}if(v(a.process))return function(){return b.deprecate(c,e).apply(this,arguments)};if(d.noDeprecation===!0)return c;var g=!1;return f};var H,I={};b.debuglog=function(a){if(v(H)&&(H=d.env.NODE_DEBUG||""),a=a.toUpperCase(),!I[a])if(new RegExp("\\b"+a+"\\b","i").test(H)){var c=d.pid;I[a]=function(){var d=b.format.apply(b,arguments);console.error("%s %d: %s",a,c,d)}}else I[a]=function(){};return I[a]},b.inspect=e,e.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},e.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},b.isArray=o,b.isBoolean=p,b.isNull=q,b.isNullOrUndefined=r,b.isNumber=s,b.isString=t,b.isSymbol=u,b.isUndefined=v,b.isRegExp=w,b.isObject=x,b.isDate=y,b.isError=z,b.isFunction=A,b.isPrimitive=B,b.isBuffer=c(61);var J=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];b.log=function(){console.log("%s - %s",E(),b.format.apply(b,arguments))},b.inherits=c(62),b._extend=function(a,b){if(!b||!x(b))return a;for(var c=Object.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}}).call(b,function(){return this}(),c(30))},function(a,b){a.exports=function(a){return a&&"object"==typeof a&&"function"==typeof a.copy&&"function"==typeof a.fill&&"function"==typeof a.readUInt8}},function(a,b){"function"==typeof Object.create?a.exports=function(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:a.exports=function(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}},function(a,b,c){function d(a,b){return n.isUndefined(b)?""+b:n.isNumber(b)&&!isFinite(b)?b.toString():n.isFunction(b)||n.isRegExp(b)?b.toString():b}function e(a,b){return n.isString(a)?a.length=0;f--)if(g[f]!=h[f])return!1;for(f=g.length-1;f>=0;f--)if(e=g[f],!i(a[e],b[e]))return!1;return!0}function l(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b?!0:b.call({},a)===!0?!0:!1:!1}function m(a,b,c,d){var e;n.isString(c)&&(d=c,c=null);try{b()}catch(f){e=f}if(d=(c&&c.name?" ("+c.name+").":".")+(d?" "+d:"."),a&&!e&&g(e,c,"Missing expected exception"+d),!a&&l(e,c)&&g(e,c,"Got unwanted exception"+d),a&&e&&c&&!l(e,c)||!a&&e)throw e}var n=c(60),o=Array.prototype.slice,p=Object.prototype.hasOwnProperty,q=a.exports=h;q.AssertionError=function(a){this.name="AssertionError",this.actual=a.actual,this.expected=a.expected,this.operator=a.operator,a.message?(this.message=a.message,this.generatedMessage=!1):(this.message=f(this),this.generatedMessage=!0);var b=a.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,b);else{var c=new Error;if(c.stack){var d=c.stack,e=b.name,h=d.indexOf("\n"+e);if(h>=0){var i=d.indexOf("\n",h+1);d=d.substring(i+1)}this.stack=d}}},n.inherits(q.AssertionError,Error),q.fail=g,q.ok=h,q.equal=function(a,b,c){a!=b&&g(a,b,c,"==",q.equal)},q.notEqual=function(a,b,c){a==b&&g(a,b,c,"!=",q.notEqual)},q.deepEqual=function(a,b,c){i(a,b)||g(a,b,c,"deepEqual",q.deepEqual)},q.notDeepEqual=function(a,b,c){i(a,b)&&g(a,b,c,"notDeepEqual",q.notDeepEqual)},q.strictEqual=function(a,b,c){a!==b&&g(a,b,c,"===",q.strictEqual)},q.notStrictEqual=function(a,b,c){a===b&&g(a,b,c,"!==",q.notStrictEqual)},q["throws"]=function(a,b,c){m.apply(this,[!0].concat(o.call(arguments)))},q.doesNotThrow=function(a,b){m.apply(this,[!1].concat(o.call(arguments)))},q.ifError=function(a){if(a)throw a};var r=Object.keys||function(a){var b=[];for(var c in a)p.call(a,c)&&b.push(c);return b}},function(a,b){(function(){var b;b=function(){function a(a,d){var e;this.document=a,null==d&&(d={}),this.size=d.size||"letter",this.layout=d.layout||"portrait","number"==typeof d.margin?this.margins={top:d.margin,left:d.margin,bottom:d.margin,right:d.margin}:this.margins=d.margins||b,e=Array.isArray(this.size)?this.size:c[this.size.toUpperCase()],this.width=e["portrait"===this.layout?0:1],this.height=e["portrait"===this.layout?1:0],this.content=this.document.ref(),this.resources=this.document.ref({ProcSet:["PDF","Text","ImageB","ImageC","ImageI"]}),Object.defineProperties(this,{fonts:{get:function(a){return function(){var b;return null!=(b=a.resources.data).Font?b.Font:b.Font={}}}(this)},xobjects:{get:function(a){return function(){var b;return null!=(b=a.resources.data).XObject?b.XObject:b.XObject={}}}(this)},ext_gstates:{get:function(a){return function(){var b;return null!=(b=a.resources.data).ExtGState?b.ExtGState:b.ExtGState={}}}(this)},patterns:{get:function(a){return function(){var b;return null!=(b=a.resources.data).Pattern?b.Pattern:b.Pattern={}}}(this)},annotations:{get:function(a){return function(){var b;return null!=(b=a.dictionary.data).Annots?b.Annots:b.Annots=[]}}(this)}}),this.dictionary=this.document.ref({Type:"Page",Parent:this.document._root.data.Pages,MediaBox:[0,0,this.width,this.height],Contents:this.content,Resources:this.resources})}var b,c;return a.prototype.maxY=function(){return this.height-this.margins.bottom},a.prototype.write=function(a){return this.content.write(a)},a.prototype.end=function(){return this.dictionary.end(),this.resources.end(),this.content.end()},b={top:72,left:72,bottom:72,right:72},c={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]},a}(),a.exports=b}).call(this)},function(a,b,c){(function(){var b,d,e,f,g;g=c(66),b=g.PDFGradient,d=g.PDFLinearGradient,e=g.PDFRadialGradient,a.exports={initColor:function(){return this._opacityRegistry={},this._opacityCount=0,this._gradCount=0},_normalizeColor:function(a){var c,d;return a instanceof b?a:("string"==typeof a&&("#"===a.charAt(0)?(4===a.length&&(a=a.replace(/#([0-9A-F])([0-9A-F])([0-9A-F])/i,"#$1$1$2$2$3$3")),c=parseInt(a.slice(1),16),a=[c>>16,c>>8&255,255&c]):f[a]&&(a=f[a])),Array.isArray(a)?(3===a.length?a=function(){var b,c,e;for(e=[],b=0,c=a.length;c>b;b++)d=a[b],e.push(d/255);return e}():4===a.length&&(a=function(){var b,c,e;for(e=[],b=0,c=a.length;c>b;b++)d=a[b],e.push(d/100);return e}()),a):null)},_setColor:function(a,c){var d,e,f,g;return(a=this._normalizeColor(a))?(this._sMasked&&(d=this.ref({Type:"ExtGState",SMask:"None"}),d.end(),e="Gs"+ ++this._opacityCount,this.page.ext_gstates[e]=d,this.addContent("/"+e+" gs"),this._sMasked=!1),f=c?"SCN":"scn",a instanceof b?(this._setColorSpace("Pattern",c),a.apply(f)):(g=4===a.length?"DeviceCMYK":"DeviceRGB",this._setColorSpace(g,c),a=a.join(" "),this.addContent(""+a+" "+f)),!0):!1},_setColorSpace:function(a,b){var c;return c=b?"CS":"cs",this.addContent("/"+a+" "+c)},fillColor:function(a,b){var c;return null==b&&(b=1),c=this._setColor(a,!1),c&&this.fillOpacity(b),this._fillColor=[a,b],this},strokeColor:function(a,b){var c;return null==b&&(b=1),c=this._setColor(a,!0),c&&this.strokeOpacity(b),this},opacity:function(a){return this._doOpacity(a,a),this},fillOpacity:function(a){return this._doOpacity(a,null),this},strokeOpacity:function(a){return this._doOpacity(null,a),this},_doOpacity:function(a,b){var c,d,e,f,g;if(null!=a||null!=b)return null!=a&&(a=Math.max(0,Math.min(1,a))),null!=b&&(b=Math.max(0,Math.min(1,b))),e=""+a+"_"+b,this._opacityRegistry[e]?(g=this._opacityRegistry[e],c=g[0],f=g[1]):(c={Type:"ExtGState"},null!=a&&(c.ca=a),null!=b&&(c.CA=b),c=this.ref(c),c.end(),d=++this._opacityCount,f="Gs"+d,this._opacityRegistry[e]=[c,f]),this.page.ext_gstates[f]=c,this.addContent("/"+f+" gs")},linearGradient:function(a,b,c,e){return new d(this,a,b,c,e)},radialGradient:function(a,b,c,d,f,g){return new e(this,a,b,c,d,f,g)}},f={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45], +silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}).call(this)},function(a,b){(function(){var b,c,d,e={}.hasOwnProperty,f=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};b=function(){function a(a){this.doc=a,this.stops=[],this.embedded=!1,this.transform=[1,0,0,1,0,0],this._colorSpace="DeviceRGB"}return a.prototype.stop=function(a,b,c){return null==c&&(c=1),c=Math.max(0,Math.min(1,c)),this.stops.push([a,this.doc._normalizeColor(b),c]),this},a.prototype.embed=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J;if(!this.embedded&&0!==this.stops.length){for(this.embedded=!0,k=this.stops[this.stops.length-1],k[0]<1&&this.stops.push([1,k[1],k[2]]),a=[],d=[],C=[],j=E=0,H=this.stops.length-1;H>=0?H>E:E>H;j=H>=0?++E:--E)d.push(0,1),j+2!==this.stops.length&&a.push(this.stops[j+1][0]),e=this.doc.ref({FunctionType:2,Domain:[0,1],C0:this.stops[j+0][1],C1:this.stops[j+1][1],N:1}),C.push(e),e.end();if(1===C.length?e=C[0]:(e=this.doc.ref({FunctionType:3,Domain:[0,1],Functions:C,Bounds:a,Encode:d}),e.end()),this.id="Sh"+ ++this.doc._gradCount,l=this.doc._ctm.slice(),m=l[0],n=l[1],q=l[2],t=l[3],u=l[4],v=l[5],I=this.transform,o=I[0],p=I[1],r=I[2],s=I[3],b=I[4],c=I[5],l[0]=m*o+q*p,l[1]=n*o+t*p,l[2]=m*r+q*s,l[3]=n*r+t*s,l[4]=m*b+q*c+u,l[5]=n*b+t*c+v,A=this.shader(e),A.end(),x=this.doc.ref({Type:"Pattern",PatternType:2,Shading:A,Matrix:function(){var a,b,c;for(c=[],a=0,b=l.length;b>a;a++)D=l[a],c.push(+D.toFixed(5));return c}()}),this.doc.page.patterns[this.id]=x,x.end(),this.stops.some(function(a){return a[2]<1})){for(g=this.opacityGradient(),g._colorSpace="DeviceGray",J=this.stops,F=0,G=J.length;G>F;F++)B=J[F],g.stop(B[0],[B[2]]);g=g.embed(),h=this.doc.ref({Type:"Group",S:"Transparency",CS:"DeviceGray"}),h.end(),y=this.doc.ref({ProcSet:["PDF","Text","ImageB","ImageC","ImageI"],Shading:{Sh1:g.data.Shading}}),y.end(),f=this.doc.ref({Type:"XObject",Subtype:"Form",FormType:1,BBox:[0,0,this.doc.page.width,this.doc.page.height],Group:h,Resources:y}),f.end("/Sh1 sh"),z=this.doc.ref({Type:"Mask",S:"Luminosity",G:f}),z.end(),i=this.doc.ref({Type:"ExtGState",SMask:z}),this.opacity_id=++this.doc._opacityCount,w="Gs"+this.opacity_id,this.doc.page.ext_gstates[w]=i,i.end()}return x}},a.prototype.apply=function(a){return this.embedded||this.embed(),this.doc.addContent("/"+this.id+" "+a),this.opacity_id?(this.doc.addContent("/Gs"+this.opacity_id+" gs"),this.doc._sMasked=!0):void 0},a}(),c=function(a){function b(a,c,d,e,f){this.doc=a,this.x1=c,this.y1=d,this.x2=e,this.y2=f,b.__super__.constructor.apply(this,arguments)}return f(b,a),b.prototype.shader=function(a){return this.doc.ref({ShadingType:2,ColorSpace:this._colorSpace,Coords:[this.x1,this.y1,this.x2,this.y2],Function:a,Extend:[!0,!0]})},b.prototype.opacityGradient=function(){return new b(this.doc,this.x1,this.y1,this.x2,this.y2)},b}(b),d=function(a){function b(a,c,d,e,f,g,h){this.doc=a,this.x1=c,this.y1=d,this.r1=e,this.x2=f,this.y2=g,this.r2=h,b.__super__.constructor.apply(this,arguments)}return f(b,a),b.prototype.shader=function(a){return this.doc.ref({ShadingType:3,ColorSpace:this._colorSpace,Coords:[this.x1,this.y1,this.r1,this.x2,this.y2,this.r2],Function:a,Extend:[!0,!0]})},b.prototype.opacityGradient=function(){return new b(this.doc,this.x1,this.y1,this.r1,this.x2,this.y2,this.r2)},b}(b),a.exports={PDFGradient:b,PDFLinearGradient:c,PDFRadialGradient:d}}).call(this)},function(a,b,c){(function(){var b,d,e=[].slice;d=c(68),b=4*((Math.sqrt(2)-1)/3),a.exports={initVector:function(){return this._ctm=[1,0,0,1,0,0],this._ctmStack=[]},save:function(){return this._ctmStack.push(this._ctm.slice()),this.addContent("q")},restore:function(){return this._ctm=this._ctmStack.pop()||[1,0,0,1,0,0],this.addContent("Q")},closePath:function(){return this.addContent("h")},lineWidth:function(a){return this.addContent(""+a+" w")},_CAP_STYLES:{BUTT:0,ROUND:1,SQUARE:2},lineCap:function(a){return"string"==typeof a&&(a=this._CAP_STYLES[a.toUpperCase()]),this.addContent(""+a+" J")},_JOIN_STYLES:{MITER:0,ROUND:1,BEVEL:2},lineJoin:function(a){return"string"==typeof a&&(a=this._JOIN_STYLES[a.toUpperCase()]),this.addContent(""+a+" j")},miterLimit:function(a){return this.addContent(""+a+" M")},dash:function(a,b){var c,d,e;return null==b&&(b={}),null==a?this:(d=null!=(e=b.space)?e:a,c=b.phase||0,this.addContent("["+a+" "+d+"] "+c+" d"))},undash:function(){return this.addContent("[] 0 d")},moveTo:function(a,b){return this.addContent(""+a+" "+b+" m")},lineTo:function(a,b){return this.addContent(""+a+" "+b+" l")},bezierCurveTo:function(a,b,c,d,e,f){return this.addContent(""+a+" "+b+" "+c+" "+d+" "+e+" "+f+" c")},quadraticCurveTo:function(a,b,c,d){return this.addContent(""+a+" "+b+" "+c+" "+d+" v")},rect:function(a,b,c,d){return this.addContent(""+a+" "+b+" "+c+" "+d+" re")},roundedRect:function(a,b,c,d,e){return null==e&&(e=0),this.moveTo(a+e,b),this.lineTo(a+c-e,b),this.quadraticCurveTo(a+c,b,a+c,b+e),this.lineTo(a+c,b+d-e),this.quadraticCurveTo(a+c,b+d,a+c-e,b+d),this.lineTo(a+e,b+d),this.quadraticCurveTo(a,b+d,a,b+d-e),this.lineTo(a,b+e),this.quadraticCurveTo(a,b,a+e,b)},ellipse:function(a,c,d,e){var f,g,h,i,j,k;return null==e&&(e=d),a-=d,c-=e,f=d*b,g=e*b,h=a+2*d,j=c+2*e,i=a+d,k=c+e,this.moveTo(a,k),this.bezierCurveTo(a,k-g,i-f,c,i,c),this.bezierCurveTo(i+f,c,h,k-g,h,k),this.bezierCurveTo(h,k+g,i+f,j,i,j),this.bezierCurveTo(i-f,j,a,k+g,a,k),this.closePath()},circle:function(a,b,c){return this.ellipse(a,b,c)},polygon:function(){var a,b,c,d;for(b=1<=arguments.length?e.call(arguments,0):[],this.moveTo.apply(this,b.shift()),c=0,d=b.length;d>c;c++)a=b[c],this.lineTo.apply(this,a);return this.closePath()},path:function(a){return d.apply(this,a),this},_windingRule:function(a){return/even-?odd/.test(a)?"*":""},fill:function(a,b){return/(even-?odd)|(non-?zero)/.test(a)&&(b=a,a=null),a&&this.fillColor(a),this.addContent("f"+this._windingRule(b))},stroke:function(a){return a&&this.strokeColor(a),this.addContent("S")},fillAndStroke:function(a,b,c){var d;return null==b&&(b=a),d=/(even-?odd)|(non-?zero)/,d.test(a)&&(c=a,a=null),d.test(b)&&(c=b,b=a),a&&(this.fillColor(a),this.strokeColor(b)),this.addContent("B"+this._windingRule(c))},clip:function(a){return this.addContent("W"+this._windingRule(a)+" n")},transform:function(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o;return g=this._ctm,h=g[0],i=g[1],j=g[2],k=g[3],l=g[4],m=g[5],g[0]=h*a+j*b,g[1]=i*a+k*b,g[2]=h*c+j*d,g[3]=i*c+k*d,g[4]=h*e+j*f+l,g[5]=i*e+k*f+m,o=function(){var g,h,i,j;for(i=[a,b,c,d,e,f],j=[],g=0,h=i.length;h>g;g++)n=i[g],j.push(+n.toFixed(5));return j}().join(" "),this.addContent(""+o+" cm")},translate:function(a,b){return this.transform(1,0,0,1,a,b)},rotate:function(a,b){var c,d,e,f,g,h,i,j;return null==b&&(b={}),d=a*Math.PI/180,c=Math.cos(d),e=Math.sin(d),f=h=0,null!=b.origin&&(j=b.origin,f=j[0],h=j[1],g=f*c-h*e,i=f*e+h*c,f-=g,h-=i),this.transform(c,e,-e,c,f,h)},scale:function(a,b,c){var d,e,f;return null==b&&(b=a),null==c&&(c={}),2===arguments.length&&(b=a,c=b),d=e=0,null!=c.origin&&(f=c.origin,d=f[0],e=f[1],d-=a*d,e-=b*e),this.transform(a,0,0,b,d,e)}}}).call(this)},function(a,b){(function(){var b;b=function(){function a(){}var b,c,d,e,f,g,h,i,j,k,l,m,n;return a.apply=function(a,c){var d;return d=g(c),b(d,a)},f={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0},g=function(a){var b,c,d,e,g,h,i,j,k;for(i=[],b=[],e="",g=!1,h=0,j=0,k=a.length;k>j;j++)if(c=a[j],null!=f[c])h=f[c],d&&(e.length>0&&(b[b.length]=+e),i[i.length]={cmd:d,args:b},b=[],e="",g=!1),d=c;else if(" "===c||","===c||"-"===c&&e.length>0&&"e"!==e[e.length-1]||"."===c&&g){if(0===e.length)continue;b.length===h?(i[i.length]={cmd:d,args:b},b=[+e],"M"===d&&(d="L"),"m"===d&&(d="l")):b[b.length]=+e,g="."===c,e="-"===c||"."===c?c:""}else e+=c,"."===c&&(g=!0);return e.length>0&&(b.length===h?(i[i.length]={cmd:d,args:b},b=[+e],"M"===d&&(d="L"),"m"===d&&(d="l")):b[b.length]=+e),i[i.length]={cmd:d,args:b},i},d=e=h=i=m=n=0,b=function(a,b){var c,f,g,k,l;for(d=e=h=i=m=n=0,f=g=0,k=a.length;k>g;f=++g)c=a[f],"function"==typeof j[l=c.cmd]&&j[l](b,c.args);return d=e=h=i=0},j={M:function(a,b){return d=b[0],e=b[1],h=i=null,m=d,n=e,a.moveTo(d,e)},m:function(a,b){return d+=b[0],e+=b[1],h=i=null,m=d,n=e,a.moveTo(d,e)},C:function(a,b){return d=b[4],e=b[5],h=b[2],i=b[3],a.bezierCurveTo.apply(a,b)},c:function(a,b){return a.bezierCurveTo(b[0]+d,b[1]+e,b[2]+d,b[3]+e,b[4]+d,b[5]+e),h=d+b[2],i=e+b[3],d+=b[4],e+=b[5]},S:function(a,b){return null===h&&(h=d,i=e),a.bezierCurveTo(d-(h-d),e-(i-e),b[0],b[1],b[2],b[3]),h=b[0],i=b[1],d=b[2],e=b[3]},s:function(a,b){return null===h&&(h=d,i=e),a.bezierCurveTo(d-(h-d),e-(i-e),d+b[0],e+b[1],d+b[2],e+b[3]),h=d+b[0],i=e+b[1],d+=b[2],e+=b[3]},Q:function(a,b){return h=b[0],i=b[1],d=b[2],e=b[3],a.quadraticCurveTo(b[0],b[1],d,e)},q:function(a,b){return a.quadraticCurveTo(b[0]+d,b[1]+e,b[2]+d,b[3]+e),h=d+b[0],i=e+b[1],d+=b[2],e+=b[3]},T:function(a,b){return null===h?(h=d,i=e):(h=d-(h-d),i=e-(i-e)),a.quadraticCurveTo(h,i,b[0],b[1]),h=d-(h-d),i=e-(i-e),d=b[0],e=b[1]},t:function(a,b){return null===h?(h=d,i=e):(h=d-(h-d),i=e-(i-e)),a.quadraticCurveTo(h,i,d+b[0],e+b[1]),d+=b[0],e+=b[1]},A:function(a,b){return l(a,d,e,b),d=b[5],e=b[6]},a:function(a,b){return b[5]+=d,b[6]+=e,l(a,d,e,b),d=b[5],e=b[6]},L:function(a,b){return d=b[0],e=b[1],h=i=null,a.lineTo(d,e)},l:function(a,b){return d+=b[0],e+=b[1],h=i=null,a.lineTo(d,e)},H:function(a,b){return d=b[0],h=i=null,a.lineTo(d,e)},h:function(a,b){return d+=b[0],h=i=null,a.lineTo(d,e)},V:function(a,b){return e=b[0],h=i=null,a.lineTo(d,e)},v:function(a,b){return e+=b[0],h=i=null,a.lineTo(d,e)},Z:function(a){return a.closePath(),d=m,e=n},z:function(a){return a.closePath(),d=m,e=n}},l=function(a,b,d,e){var f,g,h,i,j,l,m,n,o,p,q,r,s;for(l=e[0],m=e[1],j=e[2],i=e[3],p=e[4],g=e[5],h=e[6],o=c(g,h,l,m,i,p,j,b,d),s=[],q=0,r=o.length;r>q;q++)n=o[q],f=k.apply(null,n),s.push(a.bezierCurveTo.apply(a,f));return s},c=function(a,b,c,d,e,f,g,j,k){var l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K;for(y=g*(Math.PI/180),x=Math.sin(y),p=Math.cos(y),c=Math.abs(c),d=Math.abs(d),h=p*(j-a)*.5+x*(k-b)*.5,i=p*(k-b)*.5-x*(j-a)*.5,s=h*h/(c*c)+i*i/(d*d),s>1&&(s=Math.sqrt(s),c*=s,d*=s),l=p/c,m=x/c,n=-x/d,o=p/d,E=l*j+m*k,H=n*j+o*k,F=l*a+m*b,I=n*a+o*b,q=(F-E)*(F-E)+(I-H)*(I-H),w=1/q-.25,0>w&&(w=0),v=Math.sqrt(w),f===e&&(v=-v),G=.5*(E+F)-v*(I-H),J=.5*(H+I)+v*(F-E),z=Math.atan2(H-J,E-G),A=Math.atan2(I-J,F-G),D=A-z,0>D&&1===f?D+=2*Math.PI:D>0&&0===f&&(D-=2*Math.PI),u=Math.ceil(Math.abs(D/(.5*Math.PI+.001))),t=[],r=K=0;u>=0?u>K:K>u;r=u>=0?++K:--K)B=z+r*D/u,C=z+(r+1)*D/u,t[r]=[G,J,B,C,c,d,x,p];return t},k=function(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p,q,r,s,t;return i=h*e,j=-g*f,k=g*e,l=h*f,n=.5*(d-c),m=8/3*Math.sin(.5*n)*Math.sin(.5*n)/Math.sin(n),o=a+Math.cos(c)-m*Math.sin(c),r=b+Math.sin(c)+m*Math.cos(c),q=a+Math.cos(d),t=b+Math.sin(d),p=q+m*Math.sin(d),s=t-m*Math.cos(d),[i*o+j*r,k*o+l*r,i*p+j*s,k*p+l*s,i*q+j*t,k*q+l*t]},a}(),a.exports=b}).call(this)},function(a,b,c){(function(){var b;b=c(70),a.exports={initFonts:function(){this._fontFamilies={},this._fontCount=0,this._fontSize=12,this._font=null,this._registeredFonts={}},font:function(a,c,d){var e,f,g,h;return"number"==typeof c&&(d=c,c=null),"string"==typeof a&&this._registeredFonts[a]?(e=a,h=this._registeredFonts[a],a=h.src,c=h.family):(e=c||a,"string"!=typeof e&&(e=null)),null!=d&&this.fontSize(d),(f=this._fontFamilies[e])?(this._font=f,this):(g="F"+ ++this._fontCount,this._font=new b(this,a,c,g),(f=this._fontFamilies[this._font.name])?(this._font=f,this):(e&&(this._fontFamilies[e]=this._font),this._fontFamilies[this._font.name]=this._font,this))},fontSize:function(a){return this._fontSize=a,this},currentLineHeight:function(a){return null==a&&(a=!1),this._font.lineHeight(this._fontSize,a)},registerFont:function(a,b,c){return this._registeredFonts[a]={src:b,family:c},this}}}).call(this)},function(a,b,c){(function(b,d){(function(){var e,f,g,h,i;h=c(71),e=c(87),g=c(88),i=c(44),f=function(){function a(a,d,f,i){if(this.document=a,this.id=i,"string"==typeof d){if(d in c)return this.isAFM=!0,this.font=new e(c[d]()),void this.registerAFM(d);if(/\.(ttf|ttc)$/i.test(d))this.font=h.open(d,f);else{if(!/\.dfont$/i.test(d))throw new Error("Not a supported font format or standard PDF font.");this.font=h.fromDFont(d,f)}}else if(b.isBuffer(d))this.font=h.fromBuffer(d,f);else if(d instanceof Uint8Array)this.font=h.fromBuffer(new b(d),f);else{if(!(d instanceof ArrayBuffer))throw new Error("Not a supported font format or standard PDF font.");this.font=h.fromBuffer(new b(new Uint8Array(d)),f)}this.subset=new g(this.font),this.registerTTF()}var c,f;return c={Courier:function(){return i.readFileSync(d+"/font/data/Courier.afm","utf8")},"Courier-Bold":function(){return i.readFileSync(d+"/font/data/Courier-Bold.afm","utf8")},"Courier-Oblique":function(){return i.readFileSync(d+"/font/data/Courier-Oblique.afm","utf8")},"Courier-BoldOblique":function(){return i.readFileSync(d+"/font/data/Courier-BoldOblique.afm","utf8")},Helvetica:function(){return i.readFileSync(d+"/font/data/Helvetica.afm","utf8")},"Helvetica-Bold":function(){return i.readFileSync(d+"/font/data/Helvetica-Bold.afm","utf8")},"Helvetica-Oblique":function(){return i.readFileSync(d+"/font/data/Helvetica-Oblique.afm","utf8")},"Helvetica-BoldOblique":function(){return i.readFileSync(d+"/font/data/Helvetica-BoldOblique.afm","utf8")},"Times-Roman":function(){return i.readFileSync(d+"/font/data/Times-Roman.afm","utf8")},"Times-Bold":function(){return i.readFileSync(d+"/font/data/Times-Bold.afm","utf8")},"Times-Italic":function(){return i.readFileSync(d+"/font/data/Times-Italic.afm","utf8")},"Times-BoldItalic":function(){return i.readFileSync(d+"/font/data/Times-BoldItalic.afm","utf8")},Symbol:function(){return i.readFileSync(d+"/font/data/Symbol.afm","utf8")},ZapfDingbats:function(){return i.readFileSync(d+"/font/data/ZapfDingbats.afm","utf8")}},a.prototype.use=function(a){var b;return null!=(b=this.subset)?b.use(a):void 0},a.prototype.embed=function(){return this.embedded||null==this.dictionary?void 0:(this.isAFM?this.embedAFM():this.embedTTF(),this.embedded=!0)},a.prototype.encode=function(a){var b;return this.isAFM?this.font.encodeText(a):(null!=(b=this.subset)?b.encodeText(a):void 0)||a},a.prototype.ref=function(){return null!=this.dictionary?this.dictionary:this.dictionary=this.document.ref()},a.prototype.registerTTF=function(){var a,b,c,d,e;if(this.name=this.font.name.postscriptName,this.scaleFactor=1e3/this.font.head.unitsPerEm,this.bbox=function(){var b,c,d,e;for(d=this.font.bbox,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(Math.round(a*this.scaleFactor));return e}.call(this),this.stemV=0,this.font.post.exists?(d=this.font.post.italic_angle,b=d>>16,c=255&d,b&!0&&(b=-((65535^b)+1)),this.italicAngle=+(""+b+"."+c)):this.italicAngle=0,this.ascender=Math.round(this.font.ascender*this.scaleFactor),this.decender=Math.round(this.font.decender*this.scaleFactor),this.lineGap=Math.round(this.font.lineGap*this.scaleFactor),this.capHeight=this.font.os2.exists&&this.font.os2.capHeight||this.ascender,this.xHeight=this.font.os2.exists&&this.font.os2.xHeight||0,this.familyClass=(this.font.os2.exists&&this.font.os2.familyClass||0)>>8,this.isSerif=1===(e=this.familyClass)||2===e||3===e||4===e||5===e||7===e,this.isScript=10===this.familyClass,this.flags=0,this.font.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.font.cmap.unicode)throw new Error("No unicode cmap for font")},a.prototype.embedTTF=function(){var a,b,c,d,e,g,h,i;return d=this.subset.encode(),h=this.document.ref(),h.write(d),h.data.Length1=h.uncompressedLength,h.end(),e=this.document.ref({Type:"FontDescriptor",FontName:this.subset.postscriptName,FontFile2:h,FontBBox:this.bbox,Flags:this.flags,StemV:this.stemV,ItalicAngle:this.italicAngle,Ascent:this.ascender,Descent:this.decender,CapHeight:this.capHeight,XHeight:this.xHeight}),e.end(),g=+Object.keys(this.subset.cmap)[0],a=function(){var a,b;a=this.subset.cmap,b=[];for(c in a)i=a[c],b.push(Math.round(this.font.widthOfGlyph(i)));return b}.call(this),b=this.document.ref(),b.end(f(this.subset.subset)),this.dictionary.data={Type:"Font",BaseFont:this.subset.postscriptName,Subtype:"TrueType",FontDescriptor:e,FirstChar:g,LastChar:g+a.length-1,Widths:a,Encoding:"MacRomanEncoding",ToUnicode:b},this.dictionary.end()},f=function(a){var b,c,d,e,f,g,h;for(f="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<00>\nendcodespacerange",c=Object.keys(a).sort(function(a,b){return a-b}),d=[],g=0,h=c.length;h>g;g++)b=c[g],d.length>=100&&(f+="\n"+d.length+" beginbfchar\n"+d.join("\n")+"\nendbfchar",d=[]),e=("0000"+a[b].toString(16)).slice(-4),b=(+b).toString(16),d.push("<"+b+"><"+e+">");return d.length&&(f+="\n"+d.length+" beginbfchar\n"+d.join("\n")+"\nendbfchar\n"),f+="endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"},a.prototype.registerAFM=function(a){var b;return this.name=a,b=this.font,this.ascender=b.ascender,this.decender=b.decender,this.bbox=b.bbox,this.lineGap=b.lineGap,b},a.prototype.embedAFM=function(){return this.dictionary.data={Type:"Font",BaseFont:this.name,Subtype:"Type1",Encoding:"WinAnsiEncoding"},this.dictionary.end()},a.prototype.widthOfString=function(a,b){var c,d,e,f,g,h;for(a=""+a,f=0,d=g=0,h=a.length;h>=0?h>g:g>h;d=h>=0?++g:--g)c=a.charCodeAt(d),f+=this.font.widthOfGlyph(this.font.characterToGlyph(c))||0;return e=b/1e3,f*e},a.prototype.lineHeight=function(a,b){var c;return null==b&&(b=!1),c=b?this.lineGap:0,(this.ascender+c-this.decender)/1e3*a},a}(),a.exports=f}).call(this)}).call(b,c(2).Buffer,"/")},function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k,l,m,n,o,p,q;q=c(44),e=c(72),d=c(73),f=c(74),m=c(75),h=c(78),b=c(79),j=c(80),i=c(81),l=c(82),o=c(83),n=c(84),k=c(85),g=c(86),p=function(){function a(a,b){var c,d,f,g,h,i,j,k,l;if(this.rawData=a,c=this.contents=new e(this.rawData),"ttcf"===c.readString(4)){if(!b)throw new Error("Must specify a font name for TTC files.");for(i=c.readInt(),f=c.readInt(),h=[],d=j=0;f>=0?f>j:j>f;d=f>=0?++j:--j)h[d]=c.readInt();for(d=k=0,l=h.length;l>k;d=++k)if(g=h[d],c.pos=g,this.parse(),this.name.postscriptName===b)return;throw new Error("Font "+b+" not found in TTC file.")}c.pos=0,this.parse()}return a.open=function(b,c){var d;return d=q.readFileSync(b),new a(d,c)},a.fromDFont=function(b,c){var e;return e=d.open(b),new a(e.getNamedFont(c))},a.fromBuffer=function(b,c){var e,f,g;try{if(g=new a(b,c),!(g.head.exists&&g.name.exists&&g.cmap.exists||(e=new d(b),g=new a(e.getNamedFont(c)),g.head.exists&&g.name.exists&&g.cmap.exists)))throw new Error("Invalid TTF file in DFont");return g}catch(h){throw f=h,new Error("Unknown font format in buffer: "+f.message)}},a.prototype.parse=function(){return this.directory=new f(this.contents),this.head=new h(this),this.name=new m(this),this.cmap=new b(this),this.hhea=new i(this),this.maxp=new l(this),this.hmtx=new j(this),this.post=new o(this),this.os2=new n(this),this.loca=new k(this),this.glyf=new g(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},a.prototype.characterToGlyph=function(a){var b;return(null!=(b=this.cmap.unicode)?b.codeMap[a]:void 0)||0},a.prototype.widthOfGlyph=function(a){var b;return b=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(a).advance*b},a}(),a.exports=p}).call(this)},function(a,b){(function(){var b;b=function(){function a(a){this.data=null!=a?a:[],this.pos=0,this.length=this.data.length}return a.prototype.readByte=function(){return this.data[this.pos++]},a.prototype.writeByte=function(a){return this.data[this.pos++]=a},a.prototype.byteAt=function(a){return this.data[a]},a.prototype.readBool=function(){return!!this.readByte()},a.prototype.writeBool=function(a){return this.writeByte(a?1:0)},a.prototype.readUInt32=function(){var a,b,c,d;return a=16777216*this.readByte(),b=this.readByte()<<16,c=this.readByte()<<8,d=this.readByte(),a+b+c+d},a.prototype.writeUInt32=function(a){return this.writeByte(a>>>24&255),this.writeByte(a>>16&255),this.writeByte(a>>8&255),this.writeByte(255&a)},a.prototype.readInt32=function(){var a;return a=this.readUInt32(),a>=2147483648?a-4294967296:a},a.prototype.writeInt32=function(a){return 0>a&&(a+=4294967296),this.writeUInt32(a)},a.prototype.readUInt16=function(){var a,b;return a=this.readByte()<<8,b=this.readByte(),a|b},a.prototype.writeUInt16=function(a){return this.writeByte(a>>8&255),this.writeByte(255&a)},a.prototype.readInt16=function(){var a;return a=this.readUInt16(),a>=32768?a-65536:a},a.prototype.writeInt16=function(a){return 0>a&&(a+=65536),this.writeUInt16(a)},a.prototype.readString=function(a){var b,c,d;for(c=[],b=d=0;a>=0?a>d:d>a;b=a>=0?++d:--d)c[b]=String.fromCharCode(this.readByte());return c.join("")},a.prototype.writeString=function(a){var b,c,d,e;for(e=[],b=c=0,d=a.length;d>=0?d>c:c>d;b=d>=0?++c:--c)e.push(this.writeByte(a.charCodeAt(b)));return e},a.prototype.stringAt=function(a,b){return this.pos=a,this.readString(b)},a.prototype.readShort=function(){return this.readInt16()},a.prototype.writeShort=function(a){return this.writeInt16(a)},a.prototype.readLongLong=function(){var a,b,c,d,e,f,g,h;return a=this.readByte(),b=this.readByte(),c=this.readByte(),d=this.readByte(),e=this.readByte(),f=this.readByte(),g=this.readByte(),h=this.readByte(),128&a?-1*(72057594037927940*(255^a)+281474976710656*(255^b)+1099511627776*(255^c)+4294967296*(255^d)+16777216*(255^e)+65536*(255^f)+256*(255^g)+(255^h)+1):72057594037927940*a+281474976710656*b+1099511627776*c+4294967296*d+16777216*e+65536*f+256*g+h},a.prototype.writeLongLong=function(a){var b,c;return b=Math.floor(a/4294967296),c=4294967295&a,this.writeByte(b>>24&255),this.writeByte(b>>16&255),this.writeByte(b>>8&255),this.writeByte(255&b),this.writeByte(c>>24&255),this.writeByte(c>>16&255),this.writeByte(c>>8&255),this.writeByte(255&c)},a.prototype.readInt=function(){return this.readInt32()},a.prototype.writeInt=function(a){return this.writeInt32(a)},a.prototype.slice=function(a,b){return this.data.slice(a,b)},a.prototype.read=function(a){var b,c,d;for(b=[],c=d=0;a>=0?a>d:d>a;c=a>=0?++d:--d)b.push(this.readByte());return b},a.prototype.write=function(a){var b,c,d,e;for(e=[],c=0,d=a.length;d>c;c++)b=a[c],e.push(this.writeByte(b));return e},a}(),a.exports=b}).call(this)},function(a,b,c){(function(){var b,d,e,f,g;g=c(44),d=c(72),e=c(74),f=c(75),b=function(){function a(a){this.contents=new d(a),this.parse(this.contents)}return a.open=function(b){var c;return c=g.readFileSync(b),new a(c)},a.prototype.parse=function(a){var b,c,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G;for(j=a.readInt(),u=a.readInt(),i=a.readInt(),t=a.readInt(),this.map={},a.pos=u+24,E=a.readShort()+u,y=a.readShort()+u,a.pos=E,v=a.readShort(),o=F=0;v>=F;o=F+=1){for(D=a.readString(4),w=a.readShort(),C=a.readShort(),this.map[D]={list:[],named:{}},B=a.pos,a.pos=E+C,q=G=0;w>=G;q=G+=1)p=a.readShort(),z=a.readShort(),b=a.readByte(),c=a.readByte()<<16,g=a.readByte()<<8,h=a.readByte(),k=j+(0|c|g|h),n=a.readUInt32(),l={id:p,attributes:b,offset:k,handle:n},A=a.pos,-1!==z&&u+t>y+z?(a.pos=y+z,r=a.readByte(),l.name=a.readString(r)):"sfnt"===D&&(a.pos=l.offset,s=a.readUInt32(),m={},m.contents=new d(a.slice(a.pos,a.pos+s)),m.directory=new e(m.contents),x=new f(m),l.name=x.fontName[0].raw),a.pos=A,this.map[D].list.push(l),l.name&&(this.map[D].named[l.name]=l);a.pos=B}},a.prototype.getNamedFont=function(a){var b,c,d,e,f,g;if(b=this.contents,e=b.pos,c=null!=(g=this.map.sfnt)?g.named[a]:void 0,!c)throw new Error("Font "+a+" not found in DFont file.");return b.pos=c.offset,d=b.readUInt32(),f=b.slice(b.pos,b.pos+d),b.pos=e,f},a}(),a.exports=b}).call(this)},function(a,b,c){(function(b){(function(){var d,e,f=[].slice;d=c(72),e=function(){function a(a){var b,c,d,e;for(this.scalarType=a.readInt(),this.tableCount=a.readShort(),this.searchRange=a.readShort(),this.entrySelector=a.readShort(),this.rangeShift=a.readShort(),this.tables={},c=d=0,e=this.tableCount;e>=0?e>d:d>e;c=e>=0?++d:--d)b={tag:a.readString(4),checksum:a.readInt(),offset:a.readInt(),length:a.readInt()},this.tables[b.tag]=b}var c;return a.prototype.encode=function(a){var e,f,g,h,i,j,k,l,m,n,o,p,q,r;p=Object.keys(a).length,j=Math.log(2),m=16*Math.floor(Math.log(p)/j),h=Math.floor(m/j),l=16*p-m,f=new d,f.writeInt(this.scalarType),f.writeShort(p),f.writeShort(m),f.writeShort(h),f.writeShort(l),g=16*p,k=f.pos+g,i=null,q=[];for(r in a)for(o=a[r],f.writeString(r),f.writeInt(c(o)),f.writeInt(k),f.writeInt(o.length),q=q.concat(o),"head"===r&&(i=k),k+=o.length;k%4;)q.push(0),k++;return f.write(q),n=c(f.data),e=2981146554-n,f.pos=i+8,f.writeUInt32(e),new b(f.data)},c=function(a){var b,c,e,g,h;for(a=f.call(a);a.length%4;)a.push(0);for(e=new d(a),c=0,b=g=0,h=a.length;h>g;b=g+=4)c+=e.readUInt32();return 4294967295&c},a}(),a.exports=e}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(){var b,d,e,f,g,h={}.hasOwnProperty,i=function(a,b){function c(){this.constructor=a}for(var d in b)h.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};f=c(76),b=c(72),g=c(77),e=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}var e;return i(c,a),c.prototype.tag="name",c.prototype.parse=function(a){var b,c,e,f,g,h,i,j,k,l,m,n,o;for(a.pos=this.offset,f=a.readShort(),b=a.readShort(),i=a.readShort(),c=[],g=l=0;b>=0?b>l:l>b;g=b>=0?++l:--l)c.push({platformID:a.readShort(),encodingID:a.readShort(),languageID:a.readShort(),nameID:a.readShort(),length:a.readShort(),offset:this.offset+i+a.readShort()});for(j={},g=m=0,n=c.length;n>m;g=++m)e=c[g],a.pos=e.offset,k=a.readString(e.length),h=new d(k,e),null==j[o=e.nameID]&&(j[o]=[]),j[e.nameID].push(h);return this.strings=j,this.copyright=j[0],this.fontFamily=j[1],this.fontSubfamily=j[2],this.uniqueSubfamily=j[3],this.fontName=j[4],this.version=j[5],this.postscriptName=j[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,""),this.trademark=j[7],this.manufacturer=j[8],this.designer=j[9],this.description=j[10],this.vendorUrl=j[11],this.designerUrl=j[12],this.license=j[13],this.licenseUrl=j[14],this.preferredFamily=j[15],this.preferredSubfamily=j[17],this.compatibleFull=j[18],this.sampleText=j[19]},e="AAAAAA",c.prototype.encode=function(){var a,c,f,h,i,j,k,l,m,n,o,p,q,r;m={},r=this.strings;for(a in r)o=r[a],m[a]=o;i=new d(""+e+"+"+this.postscriptName,{platformID:1,encodingID:0,languageID:0}),m[6]=[i],e=g.successorOf(e),j=0;for(a in m)c=m[a],null!=c&&(j+=c.length);n=new b,k=new b,n.writeShort(0),n.writeShort(j),n.writeShort(6+12*j);for(f in m)if(c=m[f],null!=c)for(p=0,q=c.length;q>p;p++)l=c[p],n.writeShort(l.platformID),n.writeShort(l.encodingID),n.writeShort(l.languageID),n.writeShort(f),n.writeShort(l.length),n.writeShort(k.pos),k.writeString(l.raw);return h={postscriptName:i.raw,table:n.data.concat(k.data)}},c}(f),a.exports=e,d=function(){function a(a,b){this.raw=a,this.length=this.raw.length,this.platformID=b.platformID,this.encodingID=b.encodingID,this.languageID=b.languageID}return a}()}).call(this)},function(a,b){(function(){var b;b=function(){function a(a){var b;this.file=a,b=this.file.directory.tables[this.tag],this.exists=!!b,b&&(this.offset=b.offset,this.length=b.length,this.parse(this.file.contents))}return a.prototype.parse=function(){},a.prototype.encode=function(){},a.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},a}(),a.exports=b}).call(this)},function(a,b){(function(){b.successorOf=function(a){var b,c,d,e,f,g,h,i,j,k;for(c="abcdefghijklmnopqrstuvwxyz",i=c.length,k=a,e=a.length;e>=0;){if(h=a.charAt(--e),isNaN(h)){if(f=c.indexOf(h.toLowerCase()),-1===f)j=h,d=!0;else if(j=c.charAt((f+1)%i),g=h===h.toUpperCase(),g&&(j=j.toUpperCase()),d=f+1>=i,d&&0===e){b=g?"A":"a",k=b+j+k.slice(1);break}}else if(j=+h+1,d=j>9,d&&(j=0),d&&0===e){k="1"+j+k.slice(1);break}if(k=k.slice(0,e)+j+k.slice(e+1),!d)break}return k},b.invert=function(a){var b,c,d;c={};for(b in a)d=a[b],c[d]=b;return c}}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return g(c,a),c.prototype.tag="head",c.prototype.parse=function(a){return a.pos=this.offset,this.version=a.readInt(),this.revision=a.readInt(),this.checkSumAdjustment=a.readInt(),this.magicNumber=a.readInt(),this.flags=a.readShort(),this.unitsPerEm=a.readShort(),this.created=a.readLongLong(),this.modified=a.readLongLong(),this.xMin=a.readShort(),this.yMin=a.readShort(),this.xMax=a.readShort(),this.yMax=a.readShort(),this.macStyle=a.readShort(),this.lowestRecPPEM=a.readShort(),this.fontDirectionHint=a.readShort(),this.indexToLocFormat=a.readShort(),this.glyphDataFormat=a.readShort()},c.prototype.encode=function(a){var c;return c=new b,c.writeInt(this.version),c.writeInt(this.revision),c.writeInt(this.checkSumAdjustment),c.writeInt(this.magicNumber),c.writeShort(this.flags),c.writeShort(this.unitsPerEm),c.writeLongLong(this.created),c.writeLongLong(this.modified),c.writeShort(this.xMin),c.writeShort(this.yMin),c.writeShort(this.xMax),c.writeShort(this.yMax),c.writeShort(this.macStyle),c.writeShort(this.lowestRecPPEM),c.writeShort(this.fontDirectionHint),c.writeShort(a.type),c.writeShort(this.glyphDataFormat),c.data},c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f,g={}.hasOwnProperty,h=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};f=c(76),e=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return h(c,a),c.prototype.tag="cmap",c.prototype.parse=function(a){var c,d,e,f;for(a.pos=this.offset,this.version=a.readUInt16(),e=a.readUInt16(),this.tables=[],this.unicode=null,d=f=0;e>=0?e>f:f>e;d=e>=0?++f:--f)c=new b(a,this.offset),this.tables.push(c),c.isUnicode&&null==this.unicode&&(this.unicode=c);return!0},c.encode=function(a,c){var d,f;return null==c&&(c="macroman"),d=b.encode(a,c),f=new e,f.writeUInt16(0),f.writeUInt16(1),d.table=f.data.concat(d.subtable),d},c}(f),b=function(){function a(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;switch(this.platformID=a.readUInt16(),this.encodingID=a.readShort(),this.offset=b+a.readInt(),l=a.pos,a.pos=this.offset,this.format=a.readUInt16(),this.length=a.readUInt16(),this.language=a.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(h=r=0;256>r;h=++r)this.codeMap[h]=a.readByte();break;case 4:for(n=a.readUInt16(),m=n/2,a.pos+=6,e=function(){var b,c;for(c=[],h=b=0;m>=0?m>b:b>m;h=m>=0?++b:--b)c.push(a.readUInt16());return c}(),a.pos+=2,p=function(){var b,c;for(c=[],h=b=0;m>=0?m>b:b>m;h=m>=0?++b:--b)c.push(a.readUInt16());return c}(),i=function(){var b,c;for(c=[],h=b=0;m>=0?m>b:b>m;h=m>=0?++b:--b)c.push(a.readUInt16());return c}(),j=function(){var b,c;for(c=[],h=b=0;m>=0?m>b:b>m;h=m>=0?++b:--b)c.push(a.readUInt16()); +return c}(),d=(this.length-a.pos+this.offset)/2,g=function(){var b,c;for(c=[],h=b=0;d>=0?d>b:b>d;h=d>=0?++b:--b)c.push(a.readUInt16());return c}(),h=s=0,u=e.length;u>s;h=++s)for(q=e[h],o=p[h],c=t=o;q>=o?q>=t:t>=q;c=q>=o?++t:--t)0===j[h]?f=c+i[h]:(k=j[h]/2+(c-o)-(m-h),f=g[k]||0,0!==f&&(f+=i[h])),this.codeMap[c]=65535&f}a.pos=l}return a.encode=function(a,b){var c,d,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X;switch(F=new e,g=Object.keys(a).sort(function(a,b){return a-b}),b){case"macroman":for(p=0,q=function(){var a,b;for(b=[],o=a=0;256>a;o=++a)b.push(0);return b}(),s={0:0},f={},G=0,K=g.length;K>G;G++)d=g[G],null==s[U=a[d]]&&(s[U]=++p),f[d]={old:a[d],"new":s[a[d]]},q[d]=s[a[d]];return F.writeUInt16(1),F.writeUInt16(0),F.writeUInt32(12),F.writeUInt16(0),F.writeUInt16(262),F.writeUInt16(0),F.write(q),y={charMap:f,subtable:F.data,maxGlyphID:p+1};case"unicode":for(D=[],l=[],t=0,s={},c={},r=j=null,H=0,L=g.length;L>H;H++)d=g[H],v=a[d],null==s[v]&&(s[v]=++t),c[d]={old:v,"new":s[v]},h=s[v]-d,(null==r||h!==j)&&(r&&l.push(r),D.push(d),j=h),r=d;for(r&&l.push(r),l.push(65535),D.push(65535),A=D.length,B=2*A,z=2*Math.pow(Math.log(A)/Math.LN2,2),m=Math.log(z/2)/Math.LN2,x=2*A-z,i=[],w=[],n=[],o=I=0,M=D.length;M>I;o=++I){if(C=D[o],k=l[o],65535===C){i.push(0),w.push(0);break}if(E=c[C]["new"],C-E>=32768)for(i.push(0),w.push(2*(n.length+A-o)),d=J=C;k>=C?k>=J:J>=k;d=k>=C?++J:--J)n.push(c[d]["new"]);else i.push(E-C),w.push(0)}for(F.writeUInt16(3),F.writeUInt16(1),F.writeUInt32(12),F.writeUInt16(4),F.writeUInt16(16+8*A+2*n.length),F.writeUInt16(0),F.writeUInt16(B),F.writeUInt16(z),F.writeUInt16(m),F.writeUInt16(x),S=0,N=l.length;N>S;S++)d=l[S],F.writeUInt16(d);for(F.writeUInt16(0),T=0,O=D.length;O>T;T++)d=D[T],F.writeUInt16(d);for(V=0,P=i.length;P>V;V++)h=i[V],F.writeUInt16(h);for(W=0,Q=w.length;Q>W;W++)u=w[W],F.writeUInt16(u);for(X=0,R=n.length;R>X;X++)p=n[X],F.writeUInt16(p);return y={charMap:c,subtable:F.data,maxGlyphID:t+1}}},a}(),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return g(c,a),c.prototype.tag="hmtx",c.prototype.parse=function(a){var b,c,d,e,f,g,h,i;for(a.pos=this.offset,this.metrics=[],b=f=0,h=this.file.hhea.numberOfMetrics;h>=0?h>f:f>h;b=h>=0?++f:--f)this.metrics.push({advance:a.readUInt16(),lsb:a.readInt16()});for(d=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var c,e;for(e=[],b=c=0;d>=0?d>c:c>d;b=d>=0?++c:--c)e.push(a.readInt16());return e}(),this.widths=function(){var a,b,c,d;for(c=this.metrics,d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(e.advance);return d}.call(this),c=this.widths[this.widths.length-1],i=[],b=g=0;d>=0?d>g:g>d;b=d>=0?++g:--g)i.push(this.widths.push(c));return i},c.prototype.forGlyph=function(a){var b;return a in this.metrics?this.metrics[a]:b={advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[a-this.metrics.length]}},c.prototype.encode=function(a){var c,d,e,f,g;for(e=new b,f=0,g=a.length;g>f;f++)c=a[f],d=this.forGlyph(c),e.writeUInt16(d.advance),e.writeUInt16(d.lsb);return e.data},c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return g(c,a),c.prototype.tag="hhea",c.prototype.parse=function(a){return a.pos=this.offset,this.version=a.readInt(),this.ascender=a.readShort(),this.decender=a.readShort(),this.lineGap=a.readShort(),this.advanceWidthMax=a.readShort(),this.minLeftSideBearing=a.readShort(),this.minRightSideBearing=a.readShort(),this.xMaxExtent=a.readShort(),this.caretSlopeRise=a.readShort(),this.caretSlopeRun=a.readShort(),this.caretOffset=a.readShort(),a.pos+=8,this.metricDataFormat=a.readShort(),this.numberOfMetrics=a.readUInt16()},c.prototype.encode=function(a){var c,d,e,f;for(d=new b,d.writeInt(this.version),d.writeShort(this.ascender),d.writeShort(this.decender),d.writeShort(this.lineGap),d.writeShort(this.advanceWidthMax),d.writeShort(this.minLeftSideBearing),d.writeShort(this.minRightSideBearing),d.writeShort(this.xMaxExtent),d.writeShort(this.caretSlopeRise),d.writeShort(this.caretSlopeRun),d.writeShort(this.caretOffset),c=e=0,f=8;f>=0?f>e:e>f;c=f>=0?++e:--e)d.writeByte(0);return d.writeShort(this.metricDataFormat),d.writeUInt16(a.length),d.data},c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return g(c,a),c.prototype.tag="maxp",c.prototype.parse=function(a){return a.pos=this.offset,this.version=a.readInt(),this.numGlyphs=a.readUInt16(),this.maxPoints=a.readUInt16(),this.maxContours=a.readUInt16(),this.maxCompositePoints=a.readUInt16(),this.maxComponentContours=a.readUInt16(),this.maxZones=a.readUInt16(),this.maxTwilightPoints=a.readUInt16(),this.maxStorage=a.readUInt16(),this.maxFunctionDefs=a.readUInt16(),this.maxInstructionDefs=a.readUInt16(),this.maxStackElements=a.readUInt16(),this.maxSizeOfInstructions=a.readUInt16(),this.maxComponentElements=a.readUInt16(),this.maxComponentDepth=a.readUInt16()},c.prototype.encode=function(a){var c;return c=new b,c.writeInt(this.version),c.writeUInt16(a.length),c.writeUInt16(this.maxPoints),c.writeUInt16(this.maxContours),c.writeUInt16(this.maxCompositePoints),c.writeUInt16(this.maxComponentContours),c.writeUInt16(this.maxZones),c.writeUInt16(this.maxTwilightPoints),c.writeUInt16(this.maxStorage),c.writeUInt16(this.maxFunctionDefs),c.writeUInt16(this.maxInstructionDefs),c.writeUInt16(this.maxStackElements),c.writeUInt16(this.maxSizeOfInstructions),c.writeUInt16(this.maxComponentElements),c.writeUInt16(this.maxComponentDepth),c.data},c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}var d;return g(c,a),c.prototype.tag="post",c.prototype.parse=function(a){var b,c,d,e,f;switch(a.pos=this.offset,this.format=a.readInt(),this.italicAngle=a.readInt(),this.underlinePosition=a.readShort(),this.underlineThickness=a.readShort(),this.isFixedPitch=a.readInt(),this.minMemType42=a.readInt(),this.maxMemType42=a.readInt(),this.minMemType1=a.readInt(),this.maxMemType1=a.readInt(),this.format){case 65536:break;case 131072:for(d=a.readUInt16(),this.glyphNameIndex=[],b=e=0;d>=0?d>e:e>d;b=d>=0?++e:--e)this.glyphNameIndex.push(a.readUInt16());for(this.names=[],f=[];a.pos=0?d>c:c>d;b=d>=0?++c:--c)e.push(a.readUInt32());return e}.call(this)}},c.prototype.glyphFor=function(a){var b;switch(this.format){case 65536:return d[a]||".notdef";case 131072:return b=this.glyphNameIndex[a],257>=b?d[b]:this.names[b-258]||".notdef";case 151552:return d[a+this.offsets[a]]||".notdef";case 196608:return".notdef";case 262144:return this.map[a]||65535}},c.prototype.encode=function(a){var c,e,f,g,h,i,j,k,l,m,n,o,p,q,r;if(!this.exists)return null;if(i=this.raw(),196608===this.format)return i;for(l=new b(i.slice(0,32)),l.writeUInt32(131072),l.pos=32,f=[],k=[],m=0,p=a.length;p>m;m++)c=a[m],h=this.glyphFor(c),g=d.indexOf(h),-1!==g?f.push(g):(f.push(257+k.length),k.push(h));for(l.writeUInt16(Object.keys(a).length),n=0,q=f.length;q>n;n++)e=f[n],l.writeUInt16(e);for(o=0,r=k.length;r>o;o++)j=k[o],l.writeByte(j.length),l.writeString(j);return l.data},d=".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent\nampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash\nzero one two three four five six seven eight nine colon semicolon less equal greater\nquestion at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\nbracketleft backslash bracketright asciicircum underscore grave\na b c d e f g h i j k l m n o p q r s t u v w x y z\nbraceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis\nUdieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave\necircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve\nocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent\nsterling section bullet paragraph germandbls registered copyright trademark acute\ndieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu\npartialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash\nquestiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft\nguillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash\nquotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis\nfraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered\nquotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis\nEgrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute\nUcircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla\nhungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth\neth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior\nonehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla\nCacute cacute Ccaron ccaron dcroat".split(/\s+/g),c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e={}.hasOwnProperty,f=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};d=c(76),b=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return f(b,a),b.prototype.tag="OS/2",b.prototype.parse=function(a){var b;return a.pos=this.offset,this.version=a.readUInt16(),this.averageCharWidth=a.readShort(),this.weightClass=a.readUInt16(),this.widthClass=a.readUInt16(),this.type=a.readShort(),this.ySubscriptXSize=a.readShort(),this.ySubscriptYSize=a.readShort(),this.ySubscriptXOffset=a.readShort(),this.ySubscriptYOffset=a.readShort(),this.ySuperscriptXSize=a.readShort(),this.ySuperscriptYSize=a.readShort(),this.ySuperscriptXOffset=a.readShort(),this.ySuperscriptYOffset=a.readShort(),this.yStrikeoutSize=a.readShort(),this.yStrikeoutPosition=a.readShort(),this.familyClass=a.readShort(),this.panose=function(){var c,d;for(d=[],b=c=0;10>c;b=++c)d.push(a.readByte());return d}(),this.charRange=function(){var c,d;for(d=[],b=c=0;4>c;b=++c)d.push(a.readInt());return d}(),this.vendorID=a.readString(4),this.selection=a.readShort(),this.firstCharIndex=a.readShort(),this.lastCharIndex=a.readShort(),this.version>0&&(this.ascent=a.readShort(),this.descent=a.readShort(),this.lineGap=a.readShort(),this.winAscent=a.readShort(),this.winDescent=a.readShort(),this.codePageRange=function(){var c,d;for(d=[],b=c=0;2>c;b=++c)d.push(a.readInt());return d}(),this.version>1)?(this.xHeight=a.readShort(),this.capHeight=a.readShort(),this.defaultChar=a.readShort(),this.breakChar=a.readShort(),this.maxContext=a.readShort()):void 0},b.prototype.encode=function(){return this.raw()},b}(d),a.exports=b}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return g(c,a),c.prototype.tag="loca",c.prototype.parse=function(a){var b,c;return a.pos=this.offset,b=this.file.head.indexToLocFormat,0===b?this.offsets=function(){var b,d,e;for(e=[],c=b=0,d=this.length;d>b;c=b+=2)e.push(2*a.readUInt16());return e}.call(this):this.offsets=function(){var b,d,e;for(e=[],c=b=0,d=this.length;d>b;c=b+=4)e.push(a.readUInt32());return e}.call(this)},c.prototype.indexOf=function(a){return this.offsets[a]},c.prototype.lengthOf=function(a){return this.offsets[a+1]-this.offsets[a]},c.prototype.encode=function(a){var c,d,e,f,g,h,i,j,k,l,m;for(f=new b,g=0,j=a.length;j>g;g++)if(d=a[g],d>65535){for(m=this.offsets,h=0,k=m.length;k>h;h++)c=m[h],f.writeUInt32(c);return e={format:1,table:f.data}}for(i=0,l=a.length;l>i;i++)c=a[i],f.writeUInt16(c/2);return e={format:0,table:f.data}},c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f,g,h={}.hasOwnProperty,i=function(a,b){function c(){this.constructor=a}for(var d in b)h.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},j=[].slice;g=c(76),d=c(72),e=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return i(c,a),c.prototype.tag="glyf",c.prototype.parse=function(a){return this.cache={}},c.prototype.glyphFor=function(a){var c,e,g,h,i,j,k,l,m,n;return a in this.cache?this.cache[a]:(h=this.file.loca,c=this.file.contents,e=h.indexOf(a),g=h.lengthOf(a),0===g?this.cache[a]=null:(c.pos=this.offset+e,j=new d(c.read(g)),i=j.readShort(),l=j.readShort(),n=j.readShort(),k=j.readShort(),m=j.readShort(),-1===i?this.cache[a]=new b(j,l,n,k,m):this.cache[a]=new f(j,i,l,n,k,m),this.cache[a]))},c.prototype.encode=function(a,b,c){var d,e,f,g,h,i;for(g=[],f=[],h=0,i=b.length;i>h;h++)e=b[h],d=a[e],f.push(g.length),d&&(g=g.concat(d.encode(c)));return f.push(g.length),{table:g,offsets:f}},c}(g),f=function(){function a(a,b,c,d,e,f){this.raw=a,this.numberOfContours=b,this.xMin=c,this.yMin=d,this.xMax=e,this.yMax=f,this.compound=!1}return a.prototype.encode=function(){return this.raw.data},a}(),b=function(){function a(a,d,h,i,j){var k,l;for(this.raw=a,this.xMin=d,this.yMin=h,this.xMax=i,this.yMax=j,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],k=this.raw;;){if(l=k.readShort(),this.glyphOffsets.push(k.pos),this.glyphIDs.push(k.readShort()),!(l&c))break;l&b?k.pos+=4:k.pos+=2,l&g?k.pos+=8:l&e?k.pos+=4:l&f&&(k.pos+=2)}}var b,c,e,f,g,h;return b=1,f=8,c=32,e=64,g=128,h=256,a.prototype.encode=function(a){var b,c,e,f,g,h;for(e=new d(j.call(this.raw.data)),h=this.glyphIDs,b=f=0,g=h.length;g>f;b=++f)c=h[b],e.pos=this.glyphOffsets[b],e.writeShort(a[c]);return e.data},a}(),a.exports=e}).call(this)},function(a,b,c){(function(){var b,d;d=c(44),b=function(){function a(a){var b,d;this.contents=a,this.attributes={},this.glyphWidths={},this.boundingBoxes={},this.parse(),this.charWidths=function(){var a,b;for(b=[],d=a=0;255>=a;d=++a)b.push(this.glyphWidths[c[d]]);return b}.call(this),this.bbox=function(){var a,c,d,e;for(d=this.attributes.FontBBox.split(/\s+/),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(+b);return e}.call(this),this.ascender=+(this.attributes.Ascender||0),this.decender=+(this.attributes.Descender||0),this.lineGap=this.bbox[3]-this.bbox[1]-(this.ascender-this.decender)}var b,c;return a.open=function(b){return new a(d.readFileSync(b,"utf8"))},a.prototype.parse=function(){var a,b,c,d,e,f,g,h,i,j;for(f="",j=this.contents.split("\n"),h=0,i=j.length;i>h;h++)if(c=j[h],d=c.match(/^Start(\w+)/))f=d[1];else if(d=c.match(/^End(\w+)/))f="";else switch(f){case"FontMetrics":d=c.match(/(^\w+)\s+(.*)/),b=d[1],g=d[2],(a=this.attributes[b])?(Array.isArray(a)||(a=this.attributes[b]=[a]),a.push(g)):this.attributes[b]=g;break;case"CharMetrics":if(!/^CH?\s/.test(c))continue;e=c.match(/\bN\s+(\.?\w+)\s*;/)[1],this.glyphWidths[e]=+c.match(/\bWX\s+(\d+)\s*;/)[1]}},b={402:131,8211:150,8212:151,8216:145,8217:146,8218:130,8220:147,8221:148,8222:132,8224:134,8225:135,8226:149,8230:133,8364:128,8240:137,8249:139,8250:155,710:136,8482:153,338:140,339:156,732:152,352:138,353:154,376:159,381:142,382:158},a.prototype.encodeText=function(a){var c,d,e,f,g;for(e="",d=f=0,g=a.length;g>=0?g>f:f>g;d=g>=0?++f:--f)c=a.charCodeAt(d),c=b[c]||c,e+=String.fromCharCode(c);return e},a.prototype.characterToGlyph=function(a){return c[b[a]||a]},a.prototype.widthOfGlyph=function(a){return this.glyphWidths[a]},c=".notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n\nspace exclam quotedbl numbersign\ndollar percent ampersand quotesingle\nparenleft parenright asterisk plus\ncomma hyphen period slash\nzero one two three\nfour five six seven\neight nine colon semicolon\nless equal greater question\n\nat A B C\nD E F G\nH I J K\nL M N O\nP Q R S\nT U V W\nX Y Z bracketleft\nbackslash bracketright asciicircum underscore\n\ngrave a b c\nd e f g\nh i j k\nl m n o\np q r s\nt u v w\nx y z braceleft\nbar braceright asciitilde .notdef\n\nEuro .notdef quotesinglbase florin\nquotedblbase ellipsis dagger daggerdbl\ncircumflex perthousand Scaron guilsinglleft\nOE .notdef Zcaron .notdef\n.notdef quoteleft quoteright quotedblleft\nquotedblright bullet endash emdash\ntilde trademark scaron guilsinglright\noe .notdef zcaron ydieresis\n\nspace exclamdown cent sterling\ncurrency yen brokenbar section\ndieresis copyright ordfeminine guillemotleft\nlogicalnot hyphen registered macron\ndegree plusminus twosuperior threesuperior\nacute mu paragraph periodcentered\ncedilla onesuperior ordmasculine guillemotright\nonequarter onehalf threequarters questiondown\n\nAgrave Aacute Acircumflex Atilde\nAdieresis Aring AE Ccedilla\nEgrave Eacute Ecircumflex Edieresis\nIgrave Iacute Icircumflex Idieresis\nEth Ntilde Ograve Oacute\nOcircumflex Otilde Odieresis multiply\nOslash Ugrave Uacute Ucircumflex\nUdieresis Yacute Thorn germandbls\n\nagrave aacute acircumflex atilde\nadieresis aring ae ccedilla\negrave eacute ecircumflex edieresis\nigrave iacute icircumflex idieresis\neth ntilde ograve oacute\nocircumflex otilde odieresis divide\noslash ugrave uacute ucircumflex\nudieresis yacute thorn ydieresis".split(/\s+/),a}(),a.exports=b}).call(this)},function(a,b,c){(function(){var b,d,e,f=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=c(79),e=c(77),d=function(){function a(a){this.font=a,this.subset={},this.unicodes={},this.next=33}return a.prototype.use=function(a){var b,c,d;{if("string"!=typeof a)return this.unicodes[a]?void 0:(this.subset[this.next]=a,this.unicodes[a]=this.next++);for(b=c=0,d=a.length;d>=0?d>c:c>d;b=d>=0?++c:--c)this.use(a.charCodeAt(b))}},a.prototype.encodeText=function(a){var b,c,d,e,f;for(d="",c=e=0,f=a.length;f>=0?f>e:e>f;c=f>=0?++e:--e)b=this.unicodes[a.charCodeAt(c)],d+=String.fromCharCode(b);return d},a.prototype.generateCmap=function(){var a,b,c,d,e;d=this.font.cmap.tables[0].codeMap,a={},e=this.subset;for(b in e)c=e[b],a[b]=d[c];return a},a.prototype.glyphIDs=function(){var a,b,c,d,e,g;d=this.font.cmap.tables[0].codeMap,a=[0],g=this.subset;for(b in g)c=g[b],e=d[c],null!=e&&f.call(a,e)<0&&a.push(e);return a.sort()},a.prototype.glyphsFor=function(a){var b,c,d,e,f,g,h;for(d={},f=0,g=a.length;g>f;f++)e=a[f],d[e]=this.font.glyf.glyphFor(e);b=[];for(e in d)c=d[e],(null!=c?c.compound:void 0)&&b.push.apply(b,c.glyphIDs);if(b.length>0){h=this.glyphsFor(b);for(e in h)c=h[e],d[e]=c}return d},a.prototype.encode=function(){var a,c,d,f,g,h,i,j,k,l,m,n,o,p,q,r,s;a=b.encode(this.generateCmap(),"unicode"),f=this.glyphsFor(this.glyphIDs()),n={0:0},r=a.charMap;for(c in r)h=r[c],n[h.old]=h["new"];m=a.maxGlyphID;for(o in f)o in n||(n[o]=m++);k=e.invert(n),l=Object.keys(k).sort(function(a,b){return a-b}),p=function(){var a,b,c;for(c=[],a=0,b=l.length;b>a;a++)g=l[a],c.push(k[g]);return c}(),d=this.font.glyf.encode(f,p,n),i=this.font.loca.encode(d.offsets),j=this.font.name.encode(),this.postscriptName=j.postscriptName,this.cmap={},s=a.charMap;for(c in s)h=s[c],this.cmap[c]=h.old;return q={cmap:a.table,glyf:d.table,loca:i.table,hmtx:this.font.hmtx.encode(p),hhea:this.font.hhea.encode(p),maxp:this.font.maxp.encode(p),post:this.font.post.encode(p),name:j.table,head:this.font.head.encode(i)},this.font.os2.exists&&(q["OS/2"]=this.font.os2.raw()),this.font.directory.encode(q)},a}(),a.exports=d}).call(this)},function(a,b,c){(function(){var b;b=c(90),a.exports={initText:function(){return this.x=0,this.y=0,this._lineGap=0},lineGap:function(a){return this._lineGap=a,this},moveDown:function(a){return null==a&&(a=1),this.y+=this.currentLineHeight(!0)*a+this._lineGap,this},moveUp:function(a){return null==a&&(a=1),this.y-=this.currentLineHeight(!0)*a+this._lineGap,this},_text:function(a,c,d,e,f){var g,h,i,j,k;if(e=this._initOptions(c,d,e),a=""+a,e.wordSpacing&&(a=a.replace(/\s{2,}/g," ")),e.width)h=this._wrapper,h||(h=new b(this,e),h.on("line",f)),this._wrapper=e.continued?h:null,this._textOptions=e.continued?e:null,h.wrap(a,e);else for(k=a.split("\n"),i=0,j=k.length;j>i;i++)g=k[i],f(g,e);return this},text:function(a,b,c,d){return this._text(a,b,c,d,this._line.bind(this))},widthOfString:function(a,b){return null==b&&(b={}),this._font.widthOfString(a,this._fontSize)+(b.characterSpacing||0)*(a.length-1)},heightOfString:function(a,b){var c,d,e,f;return null==b&&(b={}),e=this.x,f=this.y,b=this._initOptions(b),b.height=1/0,d=b.lineGap||this._lineGap||0,this._text(a,this.x,this.y,b,function(a){return function(b,c){return a.y+=a.currentLineHeight(!0)+d}}(this)),c=this.y-f,this.x=e,this.y=f,c},list:function(a,c,d,e,f){var g,h,i,j,k,l,m,n;return e=this._initOptions(c,d,e),n=Math.round(this._font.ascender/1e3*this._fontSize/3),i=e.textIndent||5*n,j=e.bulletIndent||8*n,l=1,k=[],m=[],g=function(a){var b,c,d,e,f;for(f=[],b=d=0,e=a.length;e>d;b=++d)c=a[b],Array.isArray(c)?(l++,g(c),f.push(l--)):(k.push(c),f.push(m.push(l)));return f},g(a),f=new b(this,e),f.on("line",this._line.bind(this)),l=1,h=0,f.on("firstLine",function(a){return function(){var b,c;return(c=m[h++])!==l&&(b=j*(c-l),a.x+=b,f.lineWidth-=b,l=c),a.circle(a.x-i+n,a.y+n+n/2,n),a.fill()}}(this)),f.on("sectionStart",function(a){return function(){var b;return b=i+j*(l-1),a.x+=b,f.lineWidth-=b}}(this)),f.on("sectionEnd",function(a){return function(){var b;return b=i+j*(l-1),a.x-=b,f.lineWidth+=b}}(this)),f.wrap(k.join("\n"),e),this},_initOptions:function(a,b,c){var d,e,f,g;if(null==a&&(a={}),null==c&&(c={}),"object"==typeof a&&(c=a,a=null),c=function(){var a,b,d;b={};for(a in c)d=c[a],b[a]=d;return b}(),this._textOptions){g=this._textOptions;for(d in g)f=g[d],"continued"!==d&&null==c[d]&&(c[d]=f)}return null!=a&&(this.x=a),null!=b&&(this.y=b),c.lineBreak!==!1&&(e=this.page.margins,null==c.width&&(c.width=this.page.width-this.x-e.right)),c.columns||(c.columns=0),null==c.columnGap&&(c.columnGap=18),c},_line:function(a,b,c){var d;return null==b&&(b={}),this._fragment(a,this.x,this.y,b),d=b.lineGap||this._lineGap||0,c?this.y+=this.currentLineHeight(!0)+d:this.x+=this.widthOfString(a)},_fragment:function(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;if(a=""+a,0!==a.length){if(e=d.align||"left",r=d.wordSpacing||0,f=d.characterSpacing||0,d.width)switch(e){case"right":p=this.widthOfString(a.replace(/\s+$/,""),d),b+=d.lineWidth-p;break;case"center":b+=d.lineWidth/2-d.textWidth/2;break;case"justify":s=a.trim().split(/\s+/),p=this.widthOfString(a.replace(/\s+/g,""),d),o=this.widthOfString(" ")+f,r=Math.max(0,(d.lineWidth-p)/Math.max(1,s.length-1)-o)}if(n=d.textWidth+r*(d.wordCount-1)+f*(a.length-1),d.link&&this.link(b,c,n,this.currentLineHeight(),d.link),(d.underline||d.strike)&&(this.save(),d.stroke||this.strokeColor.apply(this,this._fillColor),k=this._fontSize<10?.5:Math.floor(this._fontSize/10),this.lineWidth(k),h=d.underline?1:2,l=c+this.currentLineHeight()/h,d.underline&&(l-=k),this.moveTo(b,l),this.lineTo(b+n,l),this.stroke(),this.restore()),this.save(),this.transform(1,0,0,-1,0,this.page.height),c=this.page.height-c-this._font.ascender/1e3*this._fontSize,null==(t=this.page.fonts)[w=this._font.id]&&(t[w]=this._font.ref()),this._font.use(a),this.addContent("BT"),this.addContent(""+b+" "+c+" Td"),this.addContent("/"+this._font.id+" "+this._fontSize+" Tf"),m=d.fill&&d.stroke?2:d.stroke?1:0,m&&this.addContent(""+m+" Tr"),f&&this.addContent(""+f+" Tc"),r){for(s=a.trim().split(/\s+/),r+=this.widthOfString(" ")+f,r*=1e3/this._fontSize,g=[],u=0,v=s.length;v>u;u++)q=s[u],i=this._font.encode(q),i=function(){var a,b,c;for(c=[],j=a=0,b=i.length;b>a;j=a+=1)c.push(i.charCodeAt(j).toString(16));return c}().join(""),g.push("<"+i+"> "+-r);this.addContent("["+g.join(" ")+"] TJ")}else i=this._font.encode(a),i=function(){var a,b,c;for(c=[],j=a=0,b=i.length;b>a;j=a+=1)c.push(i.charCodeAt(j).toString(16));return c}().join(""),this.addContent("<"+i+"> Tj");return this.addContent("ET"),this.restore()}}}}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};b=c(26).EventEmitter,d=c(91),e=function(a){function b(a,b){var c;this.document=a,this.indent=b.indent||0,this.characterSpacing=b.characterSpacing||0,this.wordSpacing=0===b.wordSpacing,this.columns=b.columns||1,this.columnGap=null!=(c=b.columnGap)?c:18,this.lineWidth=(b.width-this.columnGap*(this.columns-1))/this.columns,this.spaceLeft=this.lineWidth,this.startX=this.document.x,this.startY=this.document.y,this.column=1,this.ellipsis=b.ellipsis,this.continuedX=0,null!=b.height?(this.height=b.height,this.maxY=this.startY+b.height):this.maxY=this.document.page.maxY(),this.on("firstLine",function(a){return function(b){var c;return c=a.continuedX||a.indent,a.document.x+=c,a.lineWidth-=c,a.once("line",function(){return a.document.x-=c,a.lineWidth+=c,b.continued&&!a.continuedX&&(a.continuedX=a.indent),b.continued?void 0:a.continuedX=0})}}(this)),this.on("lastLine",function(a){return function(b){var c;return c=b.align,"justify"===c&&(b.align="left"),a.lastLine=!0,a.once("line",function(){return a.document.y+=b.paragraphGap||0,b.align=c,a.lastLine=!1})}}(this))}return g(b,a),b.prototype.wordWidth=function(a){return this.document.widthOfString(a,this)+this.characterSpacing+this.wordSpacing},b.prototype.eachWord=function(a,b){var c,e,f,g,h,i,j,k,l,m;for(e=new d(a),h=null,m={};c=e.nextBreak();){if(l=a.slice((null!=h?h.position:void 0)||0,c.position),k=null!=m[l]?m[l]:m[l]=this.wordWidth(l),k>this.lineWidth+this.continuedX)for(i=h,f={};l.length;){for(g=l.length;k>this.spaceLeft;)k=this.wordWidth(l.slice(0,--g));if(f.required=gthis.maxY||f>this.maxY)&&this.nextSection(),c="",g=0,h=0,e=0,i=this.document.y,d=function(a){return function(){return b.textWidth=g+a.wordSpacing*(h-1),b.wordCount=h,b.lineWidth=a.lineWidth,i=a.document.y,a.emit("line",c,b,a),e++}}(this),this.emit("sectionStart",b,this),this.eachWord(a,function(a){return function(e,f,i,j){var k,l;if((null==j||j.required)&&(a.emit("firstLine",b,a),a.spaceLeft=a.lineWidth),f<=a.spaceLeft&&(c+=e,g+=f,h++),i.required||f>a.spaceLeft){if(i.required&&a.emit("lastLine",b,a),k=a.document.currentLineHeight(!0),null!=a.height&&a.ellipsis&&a.document.y+2*k>a.maxY&&a.column>=a.columns){for(a.ellipsis===!0&&(a.ellipsis="…"),c=c.replace(/\s+$/,""),g=a.wordWidth(c+a.ellipsis);g>a.lineWidth;)c=c.slice(0,-1).replace(/\s+$/,""),g=a.wordWidth(c+a.ellipsis);c+=a.ellipsis}return d(),a.document.y+k>a.maxY&&(l=a.nextSection(),!l)?(h=0,c="",!1):i.required?(f>a.spaceLeft&&(c=e,g=f,h=1,d()),a.spaceLeft=a.lineWidth,c="",g=0,h=0):(a.spaceLeft=a.lineWidth-f,c=e,g=f,h=1)}return a.spaceLeft-=f}}(this)),h>0&&(this.emit("lastLine",b,this),d()),this.emit("sectionEnd",b,this),b.continued===!0?(e>1&&(this.continuedX=0),this.continuedX+=b.textWidth,this.document.y=i):this.document.x=this.startX},b.prototype.nextSection=function(a){var b;if(this.emit("sectionEnd",a,this),++this.column>this.columns){if(null!=this.height)return!1;this.document.addPage(),this.column=1,this.startY=this.document.page.margins.top,this.maxY=this.document.page.maxY(),this.document.x=this.startX,this.document._fillColor&&(b=this.document).fillColor.apply(b,this.document._fillColor),this.emit("pageBreak",a,this)}else this.document.x+=this.lineWidth+this.columnGap,this.document.y=this.startY,this.emit("columnBreak",a,this);return this.emit("sectionStart",a,this),!0},b}(b),a.exports=e}).call(this)},function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D;w=c(92),A=new w(c(93)),C=c(94),f=C.BK,k=C.CR,o=C.LF,q=C.NL,g=C.CB,e=C.BA,v=C.SP,x=C.WJ,v=C.SP,f=C.BK,o=C.LF,q=C.NL,b=C.AI,d=C.AL,t=C.SA,u=C.SG,y=C.XX,i=C.CJ,m=C.ID,r=C.NS,z=C.characterClasses,D=c(95),l=D.DI_BRK,n=D.IN_BRK,h=D.CI_BRK,j=D.CP_BRK,s=D.PR_BRK,B=D.pairTable,p=function(){function a(a){this.string=a,this.pos=0,this.lastPos=0,this.curClass=null,this.nextClass=null}var c,m,p;return a.prototype.nextCodePoint=function(){var a,b;return a=this.string.charCodeAt(this.pos++),b=this.string.charCodeAt(this.pos),a>=55296&&56319>=a&&b>=56320&&57343>=b?(this.pos++,1024*(a-55296)+(b-56320)+65536):a},m=function(a){switch(a){case b:return d;case t:case u:case y:return d;case i:return r;default:return a}},p=function(a){switch(a){case o:case q:return f;case g:return e;case v:return x;default:return a}},a.prototype.nextCharClass=function(a){return null==a&&(a=!1),m(A.get(this.nextCodePoint()))},c=function(){function a(a,b){this.position=a,this.required=null!=b?b:!1}return a}(),a.prototype.nextBreak=function(){ +var a,b,d;for(null==this.curClass&&(this.curClass=p(this.nextCharClass()));this.pos=this.string.length?this.lastPos>n,g=1<>p,k=1024>>p,h=l+k,r=h,q=32,f=r+q,c=1<a||a>1114111?this.errorValue:55296>a||a>56319&&65535>=a?(b=(this.data[a>>p]<=a?(b=(this.data[l+(a-55296>>p)]<>n)],b=this.data[b+(a>>p&i)],b=(b<h?(n=i,j=i/m):(j=g,n=g*m),"center"===f.align?c=c+i/2-n/2:"right"===f.align&&(c=c+i-n),"center"===f.valign?e=e+g/2-j/2:"bottom"===f.valign&&(e=e+g-j)),this.y===e&&(this.y+=j),this.save(),this.transform(n,0,0,-j,c,e+j),this.addContent("/"+l.label+" Do"),this.restore(),this}}}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(b){(function(){var d,e,f,g,h;h=c(44),d=c(72),e=c(98),g=c(99),f=function(){function a(){}return a.open=function(a,c){var d,f;if(b.isBuffer(a))d=a;else if(f=/^data:.+;base64,(.*)$/.exec(a))d=new b(f[1],"base64");else if(d=h.readFileSync(a),!d)return;if(255===d[0]&&216===d[1])return new e(d,c);if(137===d[0]&&"PNG"===d.toString("ascii",1,4))return new g(d,c);throw new Error("Unknown image format.")},a}(),a.exports=f}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(){var b,d,e=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};d=c(44),b=function(){function a(a,c){var d,f,g;if(this.data=a,this.label=c,65496!==this.data.readUInt16BE(0))throw"SOI not found in JPEG";for(g=2;g=0));)g+=this.data.readUInt16BE(g);if(e.call(b,f)<0)throw"Invalid JPEG.";g+=2,this.bits=this.data[g++],this.height=this.data.readUInt16BE(g),g+=2,this.width=this.data.readUInt16BE(g),g+=2,d=this.data[g++],this.colorSpace=function(){switch(d){case 1:return"DeviceGray";case 3:return"DeviceRGB";case 4:return"DeviceCMYK"}}(),this.obj=null}var b;return b=[65472,65473,65474,65475,65477,65478,65479,65480,65481,65482,65483,65484,65485,65486,65487],a.prototype.embed=function(a){return this.obj?void 0:(this.obj=a.ref({Type:"XObject",Subtype:"Image",BitsPerComponent:this.bits,Width:this.width,Height:this.height,ColorSpace:this.colorSpace,Filter:"DCTDecode"}),"DeviceCMYK"===this.colorSpace&&(this.obj.data.Decode=[1,0,1,0,1,0,1,0]),this.obj.end(this.data),this.data=null)},a}(),a.exports=b}).call(this)},function(a,b,c){(function(b){(function(){var d,e,f;f=c(47),d=c(100),e=function(){function a(a,b){this.label=b,this.image=new d(a),this.width=this.image.width,this.height=this.image.height,this.imgData=this.image.imgData,this.obj=null}return a.prototype.embed=function(a){var c,d,e,f,g,h,i,j;if(this.document=a,!this.obj){if(this.obj=a.ref({Type:"XObject",Subtype:"Image",BitsPerComponent:this.image.bits,Width:this.width,Height:this.height,Filter:"FlateDecode"}),this.image.hasAlphaChannel||(e=a.ref({Predictor:15,Colors:this.image.colors,BitsPerComponent:this.image.bits,Columns:this.width}),this.obj.data.DecodeParms=e,e.end()),0===this.image.palette.length?this.obj.data.ColorSpace=this.image.colorSpace:(d=a.ref(),d.end(new b(this.image.palette)),this.obj.data.ColorSpace=["Indexed","DeviceRGB",this.image.palette.length/3-1,d]),this.image.transparency.grayscale)return g=this.image.transparency.greyscale,this.obj.data.Mask=[g,g];if(this.image.transparency.rgb){for(f=this.image.transparency.rgb,c=[],i=0,j=f.length;j>i;i++)h=f[i],c.push(h,h);return this.obj.data.Mask=c}return this.image.transparency.indexed?this.loadIndexedAlphaChannel():this.image.hasAlphaChannel?this.splitAlphaChannel():this.finalize()}},a.prototype.finalize=function(){var a;return this.alphaChannel&&(a=this.document.ref({Type:"XObject",Subtype:"Image",Height:this.height,Width:this.width,BitsPerComponent:8,Filter:"FlateDecode",ColorSpace:"DeviceGray",Decode:[0,1]}),a.end(this.alphaChannel),this.obj.data.SMask=a),this.obj.end(this.imgData),this.image=null,this.imgData=null},a.prototype.splitAlphaChannel=function(){return this.image.decodePixels(function(a){return function(c){var d,e,g,h,i,j,k,l,m;for(g=a.image.colors*a.image.bits/8,m=a.width*a.height,j=new b(m*g),e=new b(m),i=l=d=0,k=c.length;k>i;)j[l++]=c[i++],j[l++]=c[i++],j[l++]=c[i++],e[d++]=c[i++];return h=0,f.deflate(j,function(b,c){if(a.imgData=c,b)throw b;return 2===++h?a.finalize():void 0}),f.deflate(e,function(b,c){if(a.alphaChannel=c,b)throw b;return 2===++h?a.finalize():void 0})}}(this))},a.prototype.loadIndexedAlphaChannel=function(a){var c;return c=this.image.transparency.indexed,this.image.decodePixels(function(a){return function(d){var e,g,h,i,j;for(e=new b(a.width*a.height),g=0,h=i=0,j=d.length;j>i;h=i+=1)e[g++]=c[d[h]];return f.deflate(e,function(b,c){if(a.alphaChannel=c,b)throw b;return a.finalize()})}}(this))},a}(),a.exports=e}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(b){(function(){var d,e,f;e=c(44),f=c(47),a.exports=d=function(){function a(a){var c,d,e,f,g,h,i,j,k,l,m;for(this.data=a,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.text={};;){switch(c=this.readUInt32(),h=function(){var a,b;for(b=[],e=a=0;4>a;e=++a)b.push(String.fromCharCode(this.data[this.pos++]));return b}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"PLTE":this.palette=this.read(c);break;case"IDAT":for(e=k=0;c>k;e=k+=1)this.imgData.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(c),i=255-this.transparency.indexed.length,i>0)for(e=l=0;i>=0?i>l:l>i;e=i>=0?++l:--l)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(c)[0];break;case 2:this.transparency.rgb=this.read(c)}break;case"tEXt":j=this.read(c),f=j.indexOf(0),g=String.fromCharCode.apply(String,j.slice(0,f)),this.text[g]=String.fromCharCode.apply(String,j.slice(f+1));break;case"IEND":return this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(m=this.colorType)||6===m,d=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*d,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new b(this.imgData));default:this.pos+=c}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return a.decode=function(b,c){return e.readFile(b,function(b,d){var e;return e=new a(d),e.decode(function(a){return c(a)})})},a.load=function(b){var c;return c=e.readFileSync(b),new a(c)},a.prototype.read=function(a){var b,c,d;for(d=[],b=c=0;a>=0?a>c:c>a;b=a>=0?++c:--c)d.push(this.data[this.pos++]);return d},a.prototype.readUInt32=function(){var a,b,c,d;return a=this.data[this.pos++]<<24,b=this.data[this.pos++]<<16,c=this.data[this.pos++]<<8,d=this.data[this.pos++],a|b|c|d},a.prototype.readUInt16=function(){var a,b;return a=this.data[this.pos++]<<8,b=this.data[this.pos++],a|b},a.prototype.decodePixels=function(a){var c=this;return f.inflate(this.imgData,function(d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B;if(d)throw d;for(q=c.pixelBitlength/8,u=q*c.width,r=new b(u*c.height),k=e.length,t=0,s=0,g=0;k>s;){switch(e[s++]){case 0:for(i=x=0;u>x;i=x+=1)r[g++]=e[s++];break;case 1:for(i=y=0;u>y;i=y+=1)f=e[s++],j=q>i?0:r[g-q],r[g++]=(f+j)%256;break;case 2:for(i=z=0;u>z;i=z+=1)f=e[s++],h=(i-i%q)/q,v=t&&r[(t-1)*u+h*q+i%q],r[g++]=(v+f)%256;break;case 3:for(i=A=0;u>A;i=A+=1)f=e[s++],h=(i-i%q)/q,j=q>i?0:r[g-q],v=t&&r[(t-1)*u+h*q+i%q],r[g++]=(f+Math.floor((j+v)/2))%256;break;case 4:for(i=B=0;u>B;i=B+=1)f=e[s++],h=(i-i%q)/q,j=q>i?0:r[g-q],0===t?v=w=0:(v=r[(t-1)*u+h*q+i%q],w=h&&r[(t-1)*u+(h-1)*q+i%q]),l=j+v-w,m=Math.abs(l-j),o=Math.abs(l-v),p=Math.abs(l-w),n=o>=m&&p>=m?j:p>=o?v:w,r[g++]=(f+n)%256;break;default:throw new Error("Invalid filter algorithm: "+e[s-1])}t++}return a(r)})},a.prototype.decodePalette=function(){var a,c,d,e,f,g,h,i,j,k;for(e=this.palette,h=this.transparency.indexed||[],g=new b(h.length+e.length),f=0,d=e.length,a=0,c=i=0,j=e.length;j>i;c=i+=3)g[f++]=e[c],g[f++]=e[c+1],g[f++]=e[c+2],g[f++]=null!=(k=h[a++])?k:255;return g},a.prototype.copyToImageData=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;if(d=this.colors,k=null,c=this.hasAlphaChannel,this.palette.length&&(k=null!=(m=this._decodedPalette)?m:this._decodedPalette=this.decodePalette(),d=4,c=!0),e=(null!=a?a.data:void 0)||a,j=e.length,g=k||b,f=h=0,1===d)for(;j>f;)i=k?4*b[f/4]:h,l=g[i++],e[f++]=l,e[f++]=l,e[f++]=l,e[f++]=c?g[i++]:255,h=i;else for(;j>f;)i=k?4*b[f/4]:h,e[f++]=g[i++],e[f++]=g[i++],e[f++]=g[i++],e[f++]=c?g[i++]:255,h=i},a.prototype.decode=function(a){var c,d=this;return c=new b(this.width*this.height*4),this.decodePixels(function(b){return d.copyToImageData(c,b),a(c)})},a}()}).call(this)}).call(b,c(2).Buffer)},function(a,b){(function(){a.exports={annotate:function(a,b,c,d,e){var f,g,h;e.Type="Annot",e.Rect=this._convertRect(a,b,c,d),e.Border=[0,0,0],"Link"!==e.Subtype&&null==e.C&&(e.C=this._normalizeColor(e.color||[0,0,0])),delete e.color,"string"==typeof e.Dest&&(e.Dest=new String(e.Dest));for(f in e)h=e[f],e[f[0].toUpperCase()+f.slice(1)]=h;return g=this.ref(e),this.page.annotations.push(g),g.end(),this},note:function(a,b,c,d,e,f){return null==f&&(f={}),f.Subtype="Text",f.Contents=new String(e),f.Name="Comment",null==f.color&&(f.color=[243,223,92]),this.annotate(a,b,c,d,f)},link:function(a,b,c,d,e,f){return null==f&&(f={}),f.Subtype="Link",f.A=this.ref({S:"URI",URI:new String(e)}),f.A.end(),this.annotate(a,b,c,d,f)},_markup:function(a,b,c,d,e){var f,g,h,i,j;return null==e&&(e={}),j=this._convertRect(a,b,c,d),f=j[0],h=j[1],g=j[2],i=j[3],e.QuadPoints=[f,i,g,i,f,h,g,h],e.Contents=new String,this.annotate(a,b,c,d,e)},highlight:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Highlight",null==e.color&&(e.color=[241,238,148]),this._markup(a,b,c,d,e)},underline:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Underline",this._markup(a,b,c,d,e)},strike:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="StrikeOut",this._markup(a,b,c,d,e)},lineAnnotation:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Line",e.Contents=new String,e.L=[a,this.page.height-b,c,this.page.height-d],this.annotate(a,b,c,d,e)},rectAnnotation:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Square",e.Contents=new String,this.annotate(a,b,c,d,e)},ellipseAnnotation:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Circle",e.Contents=new String,this.annotate(a,b,c,d,e)},textAnnotation:function(a,b,c,d,e,f){return null==f&&(f={}),f.Subtype="FreeText",f.Contents=new String(e),f.DA=new String,this.annotate(a,b,c,d,f)},_convertRect:function(a,b,c,d){var e,f,g,h,i,j,k,l,m;return l=b,b+=d,k=a+c,m=this._ctm,e=m[0],f=m[1],g=m[2],h=m[3],i=m[4],j=m[5],a=e*a+g*b+i,b=f*a+h*b+j,k=e*k+g*l+i,l=f*k+h*l+j,[a,b,k,l]}}}).call(this)},function(a,b){a.exports={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]}},function(a,b,c){(function(b){"use strict";function d(a,b){this.pdfDoc=a,this.imageDictionary=b||{}}var e=(c(24),c(97));d.prototype.measureImage=function(a){function c(a){var c=g.imageDictionary[a];if(!c)return a;var d=c.indexOf("base64,");if(0>d)throw"invalid image format, images dictionary should contain dataURL entries";return new b(c.substring(d+7),"base64")}var d,f,g=this;return this.pdfDoc._imageRegistry[a]?d=this.pdfDoc._imageRegistry[a]:(f="I"+ ++this.pdfDoc._imageCount,d=e.open(c(a),f),d.embed(this.pdfDoc),this.pdfDoc._imageRegistry[a]=d),{width:d.width,height:d.height}},a.exports=d}).call(b,c(2).Buffer)},function(a,b){"use strict";function c(a){for(var b=[],c=null,d=0,e=a.inlines.length;e>d;d++){var f=a.inlines[d],g=f.decoration;if(g){var h=f.decorationColor||f.color||"black",i=f.decorationStyle||"solid";g=Array.isArray(g)?g:[g];for(var j=0,k=g.length;k>j;j++){var l=g[j];c&&l===c.decoration&&i===c.decorationStyle&&h===c.decorationColor&&"lineThrough"!==l?c.inlines.push(f):(c={line:a,decoration:l,decorationColor:h,decorationStyle:i,inlines:[f]},b.push(c))}}else c=null}return b}function d(a,b,c,d){function e(){for(var b=0,c=0,d=a.inlines.length;d>c;c++){var e=a.inlines[c];b=e.fontSize>b?c:b}return a.inlines[b]}function f(){for(var b=0,c=0,d=a.inlines.length;d>c;c++)b+=a.inlines[c].width;return b}var g=a.inlines[0],h=e(),i=f(),j=a.line.getAscenderHeight(),k=h.font.ascender/1e3*h.fontSize,l=h.height,m=l-k,n=.5+.12*Math.floor(Math.max(h.fontSize-8,0)/2);switch(a.decoration){case"underline":c+=j+.45*m;break;case"overline":c+=j-.85*k;break;case"lineThrough":c+=j-.25*k;break;default:throw"Unkown decoration : "+a.decoration}if(d.save(),"double"===a.decorationStyle){var o=Math.max(.5,2*n);d.fillColor(a.decorationColor).rect(b+g.x,c-n/2,i,n/2).fill().rect(b+g.x,c+o-n/2,i,n/2).fill()}else if("dashed"===a.decorationStyle){var p=Math.ceil(i/6.8),q=b+g.x;d.rect(q,c,i,n).clip(),d.fillColor(a.decorationColor);for(var r=0;p>r;r++)d.rect(q,c-n/2,3.96,n).fill(),q+=6.8}else if("dotted"===a.decorationStyle){var s=Math.ceil(i/(3*n)),t=b+g.x;d.rect(t,c,i,n).clip(),d.fillColor(a.decorationColor);for(var u=0;s>u;u++)d.rect(t,c-n/2,n,n).fill(),t+=3*n}else if("wavy"===a.decorationStyle){var v=.7,w=1,x=Math.ceil(i/(2*v))+1,y=b+g.x-1;d.rect(b+g.x,c-w,i,c+w).clip(),d.lineWidth(.24),d.moveTo(y,c);for(var z=0;x>z;z++)d.bezierCurveTo(y+v,c-w,y+2*v,c-w,y+3*v,c).bezierCurveTo(y+4*v,c+w,y+5*v,c+w,y+6*v,c),y+=6*v;d.stroke(a.decorationColor)}else d.fillColor(a.decorationColor).rect(b+g.x,c-n/2,i,n).fill();d.restore()}function e(a,b,e,f){for(var g=c(a),h=0,i=g.length;i>h;h++)d(g[h],b,e,f)}function f(a,b,c,d){for(var e=a.getHeight(),f=0,g=a.inlines.length;g>f;f++){var h=a.inlines[f];h.background&&d.fillColor(h.background).rect(b+h.x,c,h.width,e).fill()}}a.exports={drawBackground:f,drawDecorations:e}},function(a,b,c){var d,e,f=f||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(a){var b=new MouseEvent("click");a.dispatchEvent(b)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},p=function(b,i,l){l||(b=o(b));var p,q,r,s=this,t=b.type,u=!1,v=function(){n(s,"writestart progress write writeend".split(" "))},w=function(){if((u||!p)&&(p=c().createObjectURL(b)),q)q.location.href=p;else{var d=a.open(p,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=p)}s.readyState=s.DONE,v(),m(p)},x=function(a){return function(){return s.readyState!==s.DONE?a.apply(this,arguments):void 0}},y={create:!0,exclusive:!1};return s.readyState=s.INIT,i||(i="download"),e?(p=c().createObjectURL(b),d.href=p,d.download=i,void setTimeout(function(){f(d),v(),m(p),s.readyState=s.DONE})):(a.chrome&&t&&t!==j&&(r=b.slice||b.webkitSlice,b=r.call(b,0,b.size,j),u=!0),g&&"download"!==i&&(i+=".download"),(t===j||g)&&(q=a),h?(k+=b.size,void h(a.TEMPORARY,k,x(function(a){a.root.getDirectory("saved",y,x(function(a){var c=function(){a.getFile(i,y,x(function(a){a.createWriter(x(function(c){c.onwriteend=function(b){q.location.href=a.toURL(),s.readyState=s.DONE,n(s,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&w()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=s["on"+a]}),c.write(b),s.abort=function(){c.abort(),s.readyState=s.DONE},s.readyState=s.WRITING}),w)}),w)};a.getFile(i,{create:!1},x(function(a){a.remove(),c()}),x(function(a){a.code===a.NOT_FOUND_ERR?c():w()}))}),w)}),w)):void w())},q=p.prototype,r=function(a,b,c){return new p(a,b,c)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(a,b,c){return c||(a=o(a)),navigator.msSaveOrOpenBlob(a,b||"download")}:(q.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},q.readyState=q.INIT=0,q.WRITING=1,q.DONE=2,q.error=q.onwritestart=q.onprogress=q.onwrite=q.onabort=q.onerror=q.onwriteend=null,r)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof a&&a.exports?a.exports.saveAs=f:null!==c(106)&&null!=c(107)&&(d=[],e=function(){return f}.apply(b,d),!(void 0!==e&&(a.exports=e)))},function(a,b){a.exports=function(){throw new Error("define cannot be used indirect")}},function(a,b){(function(b){a.exports=b}).call(b,{})}]),window.pdfMake=window.pdfMake||{},window.pdfMake.vfs={"LICENSE.txt":"DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBcGFjaGUgTGljZW5zZQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgVmVyc2lvbiAyLjAsIEphbnVhcnkgMjAwNA0KICAgICAgICAgICAgICAgICAgICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzLw0KDQogICBURVJNUyBBTkQgQ09ORElUSU9OUyBGT1IgVVNFLCBSRVBST0RVQ1RJT04sIEFORCBESVNUUklCVVRJT04NCg0KICAgMS4gRGVmaW5pdGlvbnMuDQoNCiAgICAgICJMaWNlbnNlIiBzaGFsbCBtZWFuIHRoZSB0ZXJtcyBhbmQgY29uZGl0aW9ucyBmb3IgdXNlLCByZXByb2R1Y3Rpb24sDQogICAgICBhbmQgZGlzdHJpYnV0aW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+6QJITdDZ/VsCp5Z3VEj86ATSlbGxAAAAAAEA7AAABQsFsAAPAAABIwMjEyM3MxMhNyEHIQMzA7HLpLWk0x7TQ/5aHgQBHv5aQ8sDNvzKAzaVAU+Wlv6xAAABAAf/7AKkBUEAHwAAAQMzByMHMwcjAwYWMzI2NwcOASMiJjcTIzczNyM3MxMCGjW/HL8m1R7VQBIkKxQzEwIcXSxjYyBAyB7IJo0cjTUFQf75jb6V/r1WOQgFgxEVj5wBQ5W+jQEH////1QAABH8HIgImACMAAAAHAEIBawFd////1QAABMMHHwImACMAAAAHAHMCFwFZ////1QAABI0HRgImACMAAAAHAJoBBgFd////1QAABNQHUQImACMAAAAHAKABJQFg////1QAABMwHDAImACMAAAAHAGgBBwFc////1QAABH8HiAImACMAAAAHAJ4BkgGo////1QAABMYHnwImACMAAAAHAdQBiQEs//8AYv5EBPgFxQAmACUAAAAHAHcBt//3//8AWAAABPIHIgImACcAAAAHAEIBNwFd//8AWAAABPIHHwImACcAAAAHAHMB4wFZ//8AWAAABPIHRgImACcAAAAHAJoA0gFd//8AWAAABPIHDAImACcAAAAHAGgA0wFc//8AYgAAAkQHIgImACsAAAAHAEL//AFd//8AYgAAA1MHHwImACsAAAAHAHMApwFZ//8AYgAAAx4HRgImACsAAAAHAJr/lwFd//8AYgAAA10HDAImACsAAAAHAGj/mAFc//8AWAAABXoHUQImADAAAAAHAKABTgFg//8AXv/rBTYHNwAmADEAAAAHAEIBjAFy//8AXv/rBTYHNAAmADEAAAAHAHMCOAFu//8AXv/rBTYHWwAmADEAAAAHAJoBJwFy//8AXv/rBTYHZgAmADEAAAAHAKABRgF1//8AXv/rBTYHIQAmADEAAAAHAGgBKAFx//8AZ//rBVcHIgImADcAAAAHAEIBdwFd//8AZ//rBVcHHwImADcAAAAHAHMCIwFZ//8AZ//rBVcHRgImADcAAAAHAJoBEgFd//8AZ//rBVcHDAImADcAAAAHAGgBEwFc//8A7gAABVMHHQImADsAAAAHAHMB6QFX//8AOv/sA/cF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MMk9YDwg/OQHIyicHJwEptMerIxP9bBhrh1qXPMdaoCkB2gQTWXEeMxI7YjslJRELeBMZY1o5YywDAwEp7y31ASX++915rcU5MgLMqoYafZkA//8AWAAABPIHRwImACcAAAAHAJsA6AFe//8AR//sA+sGBgImAEcAAAAGAJtCHQAA//8AaP/rBQ8HWwImACkAAAAHAJoBBgFy//8AN/5LBD0GBAImAEkAAAAGAJpWGwAA//8AaP/rBQ8HYQImACkAAAAHAJwBYQGx//8AN/5LBD0GCgImAEkAAAAHAJwAsQBa//8AaP/rBQ8HIgImACkAAAAHAJ0BxwFy//8AN/5LBD0FywImAEkAAAAHAJ0BFwAb//8AaP3lBQ8FxQImACkAAAAHAZEBRv62//8AN/5LBD0GbQImAEkAAAAHAaUBKABW//8AWAAABXkHRgImACoAAAAHAJoBKQFd//8ANQAABBkHRQImAEoAAAAHAJoAYwFc//8AYgAAA2UHUQImACsAAAAHAKD/tgFg//8APgAAAv4F+gImAIoAAAAHAKD/TwAJ//8AYgAAA28G+gImACsAAAAHAG7/twFK//8APgAAAwgFpAImAIoAAAAHAG7/UP/0//8AYgAAA0EHTAImACsAAAAHAJz/8gGc//8APgAAAtoF9QImAIoAAAAGAJyLRQAA////mv5YAjoFsAImACsAAAAGAJ/jCAAA////e/5QAjEGGAImAEsAAAAGAJ/EAAAA//8AYgAAAogHDQImACsAAAAHAJ0AVwFd//8AYv/rBnYFsAAmACsAAAAHACwCJAAA//8ARP5LBCEGGAAmAEsAAAAHAEwB6AAA//8AD//rBSwHOQImACwAAAAHAJoBpQFQ////G/5LAsQF3AImAJgAAAAHAJr/Pf/z//8APv31BTUFsAAmAC0AAAAHAZEBIP7G//8ANv33BCgGGAImAE0AAAAHAZEAxP7I//8AWAAAA60G4AImAC4AAAAHAHMAjwEa//8ARAAAA0MHXAImAE4AAAAHAHMAlwGW//8AWP33A60FsAImAC4AAAAHAZEBGv7I////qP33AjEGGAImAE4AAAAHAZH/wv7I//8AWAAAA9UFsQImAC4AAAAHAZ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+wF8AImAFwAAAAGAJtDBwAA////ngAAB3UHHwImAH8AAAAHAHMDAQFZ//8ABP/rBmAF3gImAIQAAAAHAHMCegAY//8AJv+jBWsHXQImAIEAAAAHAHMCMQGX//8ATP95BDgF3AImAIcAAAAHAHMBUAAW//8ACwAABEkEjQImAakAAAAHAdP/Uv97//8ACwAABEkEjQImAakAAAAHAdP/Uv97//8AvQAABCUEjQImAbgAAAAGAdMo9wAA////1AAAA+gF3wImAaYAAAAHAEIA2QAa////1AAABDEF3AImAaYAAAAHAHMBhQAW////1AAAA/sGAwImAaYAAAAGAJp0GgAA////1AAABEIGDgImAaYAAAAHAKAAkwAd////1AAABDoFyQImAaYAAAAGAGh1GQAA////1AAAA+gGRQImAaYAAAAHAJ4BAABl////1AAABDQGXQImAaYAAAAHAdQA9//q//8ATf5HBEIEnQImAagAAAAHAHcBU//6//8APgAABB0F3wImAaoAAAAHAEIAqgAa//8APgAABB0F3AImAaoAAAAHAHMBVgAW//8APgAABB0GAwImAaoAAAAGAJpFGgAA//8APgAABB0FyQImAaoAAAAGAGhGGQAA//8APgAAAd8F3wImAa4AAAAGAEKXGgAA//8APgAAAu4F3AImAa4AAAAGAHNCFgAA//8APgAAArkGAwImAa4AAAAHAJr/MgAa//8APgAAAvgFyQImAa4AAAAHAGj/MwAZ//8APgAABL4GDgImAbMAAAAHAKAAsQAd//8ATf/vBG8F7wImAbQAAAAHAEIA3QAq//8ATf/vBG8F7AImAbQAAAAHAHMBiQAm//8ATf/vBG8GEwImAbQAAAAGAJp4KgAA//8ATf/vBG8GHgImAbQAAAAHAKAAlwAt//8ATf/vBG8F2QImAbQAAAAGAGh5KQAA//8AWP/vBLwF4AImAbkAAAAHAEIA9QAb//8AWP/vBLwF3QImAbkAAAAHAHMBoQAX//8AWP/vBLwGBAImAbkAAAAHAJoAkAAb//8AWP/vBLwFygImAbkAAAAHAGgAkQAa//8AtQAABIEF2wImAb0AAAAHAHMBWAAV////1AAABEwFtwImAaYAAAAHAG4AlAAH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WMzI2A34YcLPWsSgjAQXD2OkqthyJkmmdERpmu9uwJyX+9czZ/uMwtSO4mmqrAUx3hEJIy8axsuzWi6F0V393R0/Hw7ir1uurgXIA//8AYgAAAjoFsAIGACsAAP//AGIAAANdBwwCJgArAAAABwBo/5gBXP//AA//6wRSBbACBgAsAAD//wA+AAAFNQWwAAYALQAA//8APgAABTUGxwAmAC0AAAAHAHMBxQEB//8Ao//rBUUHTAImANkAAAAHAJwBPgGc////1QAABH8FsAIGACMAAP//AFgAAATQBbACBgAkAAD//wBXAAAEuQWwAgYArAAA//8AWAAABPIFsAIGACcAAP//AFgAAAV6B0wCJgDXAAAABwCcAY4BnP//AFgAAAazBbACBgAvAAD//wBYAAAFeQWwAgYAKgAA//8AXv/rBTYFxQAGADEAAP//AFgAAAV7BbACBgCxAAD//wBYAAAFGAWwAgYAMgAA//8AYv/rBPgFxQAGACUAAP//AOwAAAULBbACBgA2AAD////8AAAFHQWwAgYAOgAA//8AOv/sA/cETgIGAEMAAP//AEf/7APrBE4CBgBHAAD//wBAAAAERwX1AiYA6wAAAAcAnADIAEX//wBG/+wEHAROAgYAUQAA////4v5gBCYETgIGAFIAAAABAEf/7AP7BE4AGwAAJTI2NzMGBCMiAj8BNgAzMhYHIzYmIyIGDwEGFgHxWqAPrBn+8qbXuyUHJwER4a7BGqwQameNpBoHHFWBeFyazwEy6ir1ASfeqmyG4qQqsdYAAP///7z+SwQqBDoCBgBbAAD////pAAAD8QQ6AgYAWgAA//8AR//sA/IFywImAEcAAAAGAGgtGwAA//8APgAAA5UFyAImAOcAAAAHAHMA5wAC//8AO//sA8kETgIGAFUAAP//AEQAAAIxBhgCBgBLAAD//wA+AAAC9gW1AiYAigAAAAcAaP8xAAX///8d/ksCOQYYAgYATAAA//8AQAAABGEFxwImAOwAAAAHAHMBTQAB////vP5LBCoF9QImAFsAAAAGAJx/RQAA//8A7AAABuwHIgImADkAAAAHAEICAQFd//8AsgAABfoFywImAFkAAAAHAEIBegAG//8A7AAABuw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AAJwArBGgAAAAHAGgByAFc//8AQAAABasFtQAmAPkAAAAnAIoD3gAAAAcAaAEjAAX////8/ksFHQWwAiYAOgAAAAcBmgN+AAD////p/ksD8QQ6AiYAWgAAAAcBmgKWAAD//wBE/+sElQYYAgYARgAA////3v5LBXEFsAImANgAAAAHAZoD/AAA////1f5LBEkEOgImAO0AAAAHAZoDHwAA////1f6xBH8FsAImACMAAAAHAKgErAAA//8AOv6xA/cETgImAEMAAAAHAKgEBQAA////1QAABH8HxgImACMAAAAHAKYE5QFT//8AOv/sA/cGhAImAEMAAAAHAKYELQAR////1QAABg4HqAImACMAAAAHAaMA8AEW//8AOv/sBVYGZwImAEMAAAAGAaM41QAA////1QAABLcHpQImACMAAAAHAaIA+gEl//8AOv/sA/8GZAImAEMAAAAGAaJC5AAA////1QAABZ4H2wImACMAAAAHAaEA9QEN//8AOv/sBOYGmgImAEMAAAAGAaE9zAAA////1QAABLYH5QImACMAAAAHAaAA9gET//8AOv/sA/4GpAImAEMAAAAGAaA+0gAA////1f6xBI0HRgImACMAAAAnAJoBBgFdAAcAqASsAAD//wA6/rED9wYEAiYAQwAAACYAmk4bAAcAqAQFAAAAAP///9UAAASqB90CJgAjAAAABwGfASkBVP//ADr/7AP3BpsCJgBDAAAABgGfcRIAAP///9UAAATOB+ACJgAjAAAABwGkAS8BZ///ADr/7AQWBp4CJgBDAAAABgGkdyUAAP///9UAAASVCEsCJgAjAAAABwGeASkBSf//ADr/7AP3BwkCJgBDAAAABgGecQcAAP///9UAAATMCB8CJgAjAAAABwGdASsBUf//ADr/7AQUBt0CJgBDAAAABgGdcw8AAP///9X+sQSwB0wCJgAjAAAAJwCcAWEBnAAHAKgErAAA//8AOv6xA/gGCgImAEMAAAAnAJwAqQBaAAcAqAQFAAD//wBY/rsE8gWwAiYAJwAAAAcAqAR3AAr//wBH/rED6wROAiYARwAAAAcAqARRAAD//wBYAAAE8gfGAiYAJwAAAAcApgSxAVP//wBH/+wD6waFAiYARwAAAAcApgQLABL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wBCAMwAG///AFn/6wYlB7YCJgCUAAAABwCmBPIBQ///AEb/7AUJBoQCJgCVAAAABwCmBEYAEf//AFn/6wYlB0ECJgCUAAAABwCgATIBUP//AEb/7AUJBg8CJgCVAAAABwCgAIYAHv//AFn+sQYlBjYCJgCUAAAABwCoBLEAAP//AEb+qAUJBLACJgCVAAAABwCoBEj/9///AGf+qgVXBbACJgA3AAAABwCoBLL/+f//AFr+sQQ7BDoCJgBXAAAABwCoBAsAAP//AGf/6wVXB8YCJgA3AAAABwCmBPEBU///AFr/7AQ7BnACJgBXAAAABwCmBED//f//AGf/6walBx8CJgCWAAAABwBzAiIBWf//AFr/7AVXBcgCJgCXAAAABwBzAXIAAv//AGf/6walByICJgCWAAAABwBCAXYBXf//AFr/7AVXBcsCJgCXAAAABwBCAMYABv//AGf/6walB8YCJgCWAAAABwCmBPABU///AFr/7AVXBnACJgCXAAAABwCmBED//f//AGf/6walB1ECJgCWAAAABwCgATABYP//AFr/7AVXBfoCJgCXAAAABwCgAIAACf//AGf+qQalBg0CJgCWAAAABwCoBLH/+P//AFr+sQVXBJECJgCXAAAABwCoBAsAAP//AO7+uwVTBbACJgA7AAAABwCoBH0ACv///7z+FAQqBDoCJgBbAAAABwCoBKj/Y///AO4AAAVTB8QCJgA7AAAABwCmBLcBUf///7z+SwQqBnACJgBbAAAABwCmBAP//f//AO4AAAVTB08CJgA7AAAABwCgAPcBXv///7z+SwQqBfoCJgBbAAAABgCgQwkAAAACAET/6wUmBhgAGgAoAAABIwMjNycOASMiAj8BGgEzMhYXEyM3MzczBzMBBhYzMjY3Ey4BIyIGBwUItPedCQM8kFiwri8EOO7BWIcrN+oe6SS1JLX8AyRhiUx1M2Uba1R8nyYE0vsuaAI/QAE06hUBHAEUSEUBEZWxsfyis9FTTwH6RE/ZvQD//wAT/u4FJgYYACYARgAAACcB0wH8AkYABgBBfYMAAP//AD7+mQU1BbAAJgAtAAAABwGcA/QAAP//AED+mQRhBDoCJgDsAAAABwGcAxMAAP//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P//AJ8AAAR1ByECJgAnAAAABwBzAXsBW///AJ8AAAR1B0cCJgAnAAAABwCaAH8BWf//AJ8AAAR1Bw0CJgAnAAAABwBoAFsBXf///8wAAAGgByICJgArAAAABwBC/4IBXP//AK0AAAKEByECJgArAAAABwBzADgBW////9gAAAJ5B0cCJgArAAAABwCa/z0BWf///70AAAKSBw0CJgArAAAABwBo/xkBXf//AJ8AAAUQB2MCJgAwAAAABwCgAO4BbP//AHT/6wUbBzcCJgAxAAAABwBCASMBcf//AHT/6wUbBzYCJgAxAAAABwBzAdoBcP//AHT/6wUbB1wCJgAxAAAABwCaAN4Bbv//AHT/6wUbB3gCJgAxAAAABwCgAOABgf//AHT/6wUbByICJgAxAAAABwBoALoBcv//AIb/6wTxByICJgA3AAAABwBCARcBXP//AIb/6wTxByECJgA3AAAABwBzAc4BW///AIb/6wTxB0cCJgA3AAAABwCaANIBWf//AIb/6wTxBw0CJgA3AAAABwBoAK4BXf//ABMAAATvByECJgA7AAAABwBzAZYBW///AF7/7AQBBeACJgBDAAAABwBCAIEAGv//AF7/7AQBBd8CJgBDAAAABwBzATgAGf//AF7/7AQBBgUCJgBDAAAABgCaPBcAAP//AF7/7AQBBiECJgBDAAAABgCgPioAAP//AF7/7AQBBcsCJgBDAAAABgBoGBsAAP//AF7/7AQBBk0CJgBDAAAABwCeANEAcf//AF7/7AQBBnwCJgBDAAAABwHUANf/5///AFH+PAP3BE4CJgBFAAAABwB3AT7/+///AFn/7AP4BeECJgBHAAAABwBCAIMAG///AFn/7AP4BeACJgBHAAAABwBzAToAGv//AFn/7AP4BgYCJgBHAAAABgCaPhgAAP//AFn/7AP4BcwCJgBHAAAABgBoGhwAAP///68AAAGCBcsCJgCKAAAABwBC/2UABf//AI8AAAJnBcoCJgCKAAAABgBzGwQAAP///7sAAAJcBfACJgCKAAAABwCa/yAAAv///6AAAAJ1BbYCJgCKAAAABwBo/vwABv//AH4AAAQLBiECJgBQAAAABgCgWSoAAP//AFP/7AQ0BeACJgBR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AAAABwBCAMQBXP//AJoAAAULByICJgDXAAAABwBCAS8BXP//AFn/7AP4BeECJgBHAAAABwBCAIMAG///AIYAAAQSBcsCJgDrAAAABwBCAKcABf//AEgAAAVRBbACBgC0AAD//wBP/iIFfgQ6AgYAyAAA//8AEQAABO8HRAImARQAAAAHAKcEOwFW////4wAABBgGMgImARUAAAAHAKcD1wBE//8AU/5LCIQETgAmAFEAAAAHAFsEiAAA//8AdP5LCYsFxQAmADEAAAAHAFsFjwAA//8ASv46BHsFxQImANYAAAAHAZwBkv+g//8ATf47A8QETQImAOoAAAAHAZwBOf+h//8AdP4+BNgFxQImACUAAAAHAZwB0/+k//8AUf4+A/cETgImAEUAAAAHAZwBS/+k//8AEwAABO8FsAIGADsAAP//ACD+XwP1BDoCBgC4AAD//wCtAAABoAWwAgYAKwAA//8AGAAAB4kHXAImANUAAAAHAJwCHAGs//8AFwAABl8GBQImAOkAAAAHAJwBpQBV//8ArQAAAaAFsAIGACsAAP//ABoAAAUoB1wCJgAjAAAABwCcAOoBrP//AF7/7AQBBhoCJgBDAAAABgCcb2oAAP//ABoAAAUoBw0CJgAjAAAABwBoAJMBXf//AF7/7AQBBcsCJgBDAAAABgBoGBsAAP////YAAAdXBbACBgB/AAD//wA0/+sGhAROAgYAhAAA//8AnwAABHUHXAImACcAAAAHAJwAsgGs//8AWf/sA/gGGwImAEcAAAAGAJxxawAA//8AU//qBRsG2gImAUEAAAAHAGgAcwEq//8AWf/sA/gEUAIGAJkAAP//AFn/7AP4BcwCJgCZAAAABgBoGhwAAP//ABgAAAeJBw0CJgDVAAAABwBoAcUBXf//ABcAAAZfBbYCJgDpAAAABwBoAU4ABv//AEr/6wR7ByICJgDWAAAABwBoAFgBcv//AE3/7APEBcoCJgDqAAAABgBoABoAAP//AJoAAAULBvYCJgDXAAAABwBuAOUBRv//AIYAAAQSBaACJgDrAAAABgBuXfAAAP//AJoAAAULBw0CJgDXAAAABwBoAMYBXf//AIYAAAQSBbYCJgDrAAAABgBoPg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CMiJDUzFBYzMjY1NCYrATUCXqSWoqWErrkBGNPyAQ58coGD/t3z1f7VubOUprenqaUDMYN3dJCObrja08topDArqoHM3tTVd52VfIqAlgAAAAABALYAAAT+BbAACwAAATMRIxEjASMRMxEzBEW5uQP9Lbm5AwWw+lAEb/uRBbD7kgABADAAAAT0BbAADwAAAREjESEDCgErATUzMhIbAQT0uv3xEQ677jMojHEMFgWw+lAFGv3r/l3+npUBEQFfAqsAAQBR/+sEyAWwABQAAAEXATMBDgEjIiYnNx4BMzI2PwEBMwJOSwFY1/38PIiaGUEKBgpAEktCKCr+DtAC+8MDePtAhIEGA5ACAkpSVgQ+AAADAFP/xAXjBewAFQAeACcAAAEzIAAREAAhIxUjNSMgABEQACEzNTMDIgYVFBY7AREzETMyNjU0JiMDeBsBAgFO/rL+/hu5Hf79/rQBTAEDHbnWxtHRxh25HcTS0sQFHv69/vv++f67xsYBQwEHAQUBRc7+nenMzucDavyW6c7L6AAAAAABALT+oQWSBbAACwAAEzMRIREzETMDIxEhtLkC17mVEqX72QWw+uUFG/rp/ggBXwABAJcAAATEBbAAEwAAAREjEQ4BIyImNREzERQWMzI2NxEExLlhsHv187qMomm8ZwWw+lACYR0azvIBxv46q38cHAK4AAEAtAAABtIFsAALAAABESERMxEhETMRIREBbgH6uQH4ufniBbD65QUb+uUFG/pQBbAAAAABALT+oQdrBbAADwAAAREhETMRIREzETMDIxEhEQFuAfq5Afi5mRKm+gEFsPrlBRv65QUb+uX+DAFfBbAAAAAAAgARAAAFuAWwAAwAFQAAEyERITIWFRQGIyERIQERITI2NTQmIxECVQFo7vz97f3f/mQCVQFonJSUnAWw/ajhx8joBRv9qP3Sn355mAAAAAADALUAAAY1BbAACgATABcAAAEhMhYVFAYjIREzGQEhMjY1NCYjASMRMwFuAWju/P3t/d+5AWiclJScA1+5uQNY4cfI6AWw/RP90p9+eZj9PQWwAAACAKYAAASxBbAACgATAAABITIWFRQGIyERMxkBITI2NTQmIwFfAWju/P3t/d+5AWiclJSc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3AAAABwCaAOIBXf//AJb/6wTXBwwCJgA3AAAABwBoALwBXP//AB4AAATTBx0CJgA7AAAABwBzAaABV///AHL/7APsBeACJgBDAAAABwBCAJYAG///AHL/7APsBd0CJgBDAAAABwBzAVAAF///AHL/7APsBgQCJgBDAAAABgCaUhsAAP//AHL/7APsBg8CJgBDAAAABgCgTB4AAP//AHL/7APsBcoCJgBDAAAABgBoLBoAAP//AHL/7APsBkYCJgBDAAAABwCeANMAZv//AHL/7APsBl4CJgBDAAAABwHUAOP/6///AGH+RAPyBE4CJgBFAAAABwB3AUX/9///AGL/7APpBeECJgBHAAAABwBCAJsAHP//AGL/7APpBd4CJgBHAAAABwBzAVUAGP//AGL/7APpBgUCJgBHAAAABgCaVxwAAP//AGL/7APpBcsCJgBHAAAABgBoMRsAAP///7UAAAFVBcsCJgCKAAAABwBC/2YABv//AJsAAAI9BcgCJgCKAAAABgBzHwIAAP///8sAAAIoBe8CJgCKAAAABwCa/yIABv///6UAAAJOBbUCJgCKAAAABwBo/vwABf//AJEAAAP4Bg8CJgBQAAAABgCgZR4AAP//AGD/7AQnBeACJgBRAAAABwBCALMAG///AGD/7AQnBd0CJgBRAAAABwBzAW0AF///AGD/7AQnBgQCJgBRAAAABgCabxsAAP//AGD/7AQnBg8CJgBRAAAABgCgaR4AAP//AGD/7AQnBcoCJgBRAAAABgBoSRoAAP//AI3/7AP2BcsCJgBXAAAABwBCALEABv//AI3/7AP2BcgCJgBXAAAABwBzAWsAAv//AI3/7AP2Be8CJgBXAAAABgCabQYAAP//AI3/7AP2BbUCJgBXAAAABgBoRwUAAP//ABv+SwPkBcgCJgBbAAAABwBzASkAAv//ABv+SwPkBbUCJgBbAAAABgBoBQUAAP//ACcAAAUiBvoCJgAjAAAABwBuAM4BSv//AHL/7APsBbgCJgBDAAAABgBuUAgAAP//ACcAAAUiB0wCJgAjAAAABwCcAPsBnP//AHL/7APsBgoCJgBDAAAABgCcfVoAAAACACf+UAUiBbAAGgAdAAABMwEjDgEVF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A////8gAAB1cHHwImAH8AAAAHAHMC0QFZ//8APf/rBnwF3gImAIQAAAAHAHMCggAY//8Ac/+jBP4HXQImAIEAAAAHAHMB4gGX//8AYP95BCcF3AImAIcAAAAHAHMBQAAW////8wAABC0EjQImAakAAAAHAdP/ZP97////8wAABC0EjQImAakAAAAHAdP/ZP97//8ARwAAA88EjQImAbgAAAAGAdMx9wAA//8AKQAABIMF3wImAaYAAAAHAEIAvwAa//8AKQAABIMF3AImAaYAAAAHAHMBeQAW//8AKQAABIMGAwImAaYAAAAGAJp7GgAA//8AKQAABIMGDgImAaYAAAAGAKB1HQAA//8AKQAABIMFyQImAaYAAAAGAGhVGQAA//8AKQAABIMGRQImAaYAAAAHAJ4A/ABl//8AKQAABIMGXQImAaYAAAAHAdQBDP/q//8Acv5HBCQEnQImAagAAAAHAHcBb//6//8AmwAAA8cF3wImAaoAAAAHAEIAjgAa//8AmwAAA8cF3AImAaoAAAAHAHMBSAAW//8AmwAAA8cGAwImAaoAAAAGAJpKGgAA//8AmwAAA8cFyQImAaoAAAAGAGgkGQAA////swAAAVQF3wImAa4AAAAHAEL/ZAAa//8AmwAAAjsF3AImAa4AAAAGAHMdFgAA////yQAAAiYGAwImAa4AAAAHAJr/IAAa////owAAAkwFyQImAa4AAAAHAGj++gAZ//8AmwAABHIGDgImAbMAAAAHAKAAlgAd//8Acv/vBFcF7wImAbQAAAAHAEIAwAAq//8Acv/vBFcF7AImAbQAAAAHAHMBegAm//8Acv/vBFcGEwImAbQAAAAGAJp8KgAA//8Acv/vBFcGHgImAbQAAAAGAKB2LQAA//8Acv/vBFcF2QImAbQAAAAGAGhWKQAA//8AjP/vBHAF4AImAbkAAAAHAEIA4AAb//8AjP/vBHAF3QImAbkAAAAHAHMBmgAX//8AjP/vBHAGBAImAbkAAAAHAJoAnAAb//8AjP/vBHAFygImAbkAAAAGAGh2GgAA//8AIAAABDAF2wImAb0AAAAHAHMBSQAV//8AKQAABIMFtwImAaYAAAAGAG55BwAA//8AKQA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AIGACsAAP//ACcAAAUiB0wCJgAjAAAABwCcAPsBnP//AHL/7APsBgoCJgBDAAAABgCcfVoAAP//ACcAAAUiBwwCJgAjAAAABwBoAKoBXP//AHL/7APsBcoCJgBDAAAABgBoLBoAAP////IAAAdXBbACBgB/AAD//wA9/+sGfAROAgYAhAAA//8AtgAABHUHTAImACcAAAAHAJwAxwGc//8AYv/sA+kGCwImAEcAAAAHAJwAggBb//8AX//rBRAG3gImAUEAAAAHAGgAfQEu//8AYv/sA+kETwIGAJkAAP//AGL/7APpBcsCJgCZAAAABgBoMRsAAP//ABsAAAcoBwwCJgDVAAAABwBoAacBXP//ABUAAAYEBbUCJgDpAAAABwBoATwABf//AFH/6wRnByECJgDWAAAABwBoAGEBcf//AFj/7QOsBckCJgDqAAAABgBoCBkAAP//ALYAAAT+BvoCJgDXAAAABwBuAQQBSv//AJwAAAQBBaQCJgDrAAAABgBudfQAAP//ALYAAAT+BwwCJgDXAAAABwBoAOABXP//AJwAAAQBBbUCJgDrAAAABgBoUQUAAP//AIL/6wUNByECJgAxAAAABwBoAMoBcf//AGD/7AQnBcoCJgBRAAAABgBoSRoAAP//AHP/6wT+BcUCBgESAAD//wBg/+wEJwROAgYBEwAA//8Ac//rBP4HBwImARIAAAAHAGgA0gFX//8AYP/sBCcF5gImARMAAAAGAGgyNgAA//8Asf/sBPYHIgImAOIAAAAHAGgAtwFy//8AZP/rA+AFygImAPoAAAAGAGgmGgAA//8AUf/rBMgG+gImANkAAAAHAG4ArQFK//8AG/5LA+QFpAImAFsAAAAGAG4p9AAA//8AUf/rBMgHDAImANkAAAAHAGgAiQFc//8AG/5LA+QFtQImAFsAAAAGAGgFBQAA//8AUf/rBMgHSwImANkAAAAHAKEBNgFd//8AG/5LA/oF9AImAFsAAAAHAKEAsgAG//8AlwAABMQHDAImANwAAAAHAGgAswFc//8AZwAAA70FtQImAPQAAAAGAGgOBQAA//8AtQAABjUHDAAmAOEPAAAnACsEuQAAAAcAaAF9AVz//wCdAAAFf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vbAAAAAAASW50cmJvb2wAAAAAAEJja2dPYmpjAAAAAQAAAAAAAFJHQkMAAAADAAAAAFJkICBkb3ViQG/gAAAAAAAAAAAAR3JuIGRvdWJAb+AAAAAAAAAAAABCbCAgZG91YkBv4AAAAAAAAAAAAEJyZFRVbnRGI1JsdAAAAAAAAAAAAAAAAEJsZCBVbnRGI1JsdAAAAAAAAAAAAAAAAFJzbHRVbnRGI1B4bEBSAAAAAAAAAAAACnZlY3RvckRhdGFib29sAQAAAABQZ1BzZW51bQAAAABQZ1BzAAAAAFBnUEMAAAAATGVmdFVudEYjUmx0AAAAAAAAAAAAAAAAVG9wIFVudEYjUmx0AAAAAAAAAAAAAAAAU2NsIFVudEYjUHJjQFkAAAAAAAA4QklNA+0AAAAAABAASAAAAAEAAgBIAAAAAQACOEJJTQQmAAAAAAAOAAAAAAAAAAAAAD+AAAA4QklNBA0AAAAAAAQAAAB4OEJJTQQZAAAAAAAEAAAAHjhCSU0D8wAAAAAACQAAAAAAAAAAAQA4QklNJxAAAAAAAAoAAQAAAAAAAAACOEJJTQP1AAAAAABIAC9mZgABAGxmZgAGAAAAAAABAC9mZgABAKGZmgAGAAAAAAABADIAAAABAFoAAAAGAAAAAAABADUAAAABAC0AAAAGAAAAAAABOEJJTQP4AAAAAABwAAD/////////////////////////////A+gAAAAA/////////////////////////////wPoAAAAAP////////////////////////////8D6AAAAAD/////////////////////////////A+gAADhCSU0EAAAAAAAAAgABOEJJTQQCAAAAAAAEAAAAADhCSU0EMAAAAAAAAgEBOEJJTQQtAAAAAAAGAAEAAAACOEJJTQQIAAAAAAAQAAAAAQAAAkAAAAJAAAAAADhCSU0EHgAAAAAABAAAAAA4QklNBBoAAAAAA0sAAAAGAAAAAAAAAAAAAAE2AAACtwAAAAsAQgBlAHoAIABuAGEAegB3AHkALQAxAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAK3AAABNgAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAA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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPD94cGFja2V0IGVuZD0idyI/Pv/iDFhJQ0NfUFJPRklMRQABAQAADEhMaW5vAh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NBLrh72gM8a8qqI1JNAOJ3/l6UyZA6JKnKlx6WzktyUyEV5V22+EZFibWP6ProDx4hPjZtiTTYEUOTUqGnRWIuC1rMGu6EBCCDuTxIJHQfF1yU7pApXZLAzH1pEW55Dn6oJOx2rUdz/wuV7suu7Xo2Zc/VrhlUMQCA/EtyBJ+z9GE2pV7mFeJZrj91yUhCrfaDCgqB0PfAqlCn72UTO3qjjzJrUgMePbuciQxHNq8jt3uSbmYQychRaM3xjoBtTfv/lYYhlNSmjsfUYCat2JCasG5FeO4oBk+it2KxDn8aMhPwCQNQGu/KoC1riyFplai7+sSm2P78bSg8iDsDVqjpTBRZxvoqrzCMGo0ZBoRUUT4eXvg2tMTKlBfWHIR8CA9eRrU7bgDqMQDbA23HwEu+9UcjqFHWoG3XCQjdDKl0ySESemwIIVwzArT4gNulf9jgARu1YgCesBJJQ8lFaA16EkdMK7rrd9a9N+UY5LUL9kclr1O5pkiB3qOJDRtraFlCiR1ZjzrTnUjYA0Aof9jgqPej1ISZvMPq/vkHpAjkFK/F8VNiP+CyYEK5o9SZqLtZ3qeabGIioPTpTpkJBI4lCdL43C/GFkK/FzDGg79skFNqEolChWYNIKVdeVCe9BTbHZiqypKQtXoApKkh6Up0ag6fPAeagd7cf1urFKenQhweXTx33/AONsI5p3f//Z" +},function(){function a(a,b){b=b||"";for(var c=1024,d=window.atob(a),e=[],f=0,g=d.length;g>f;f+=c){for(var h=d.slice(f,f+c),i=new Array(h.length),j=0;j=b.toIndex&&(b.toIndex+=1),e.$apply(function(){d.apply(i(),[b.fromIndex,b.toIndex])}),g.api.draggableRows.raise.rowDropped(b,this),void c.preventDefault())}};h.addEventListener("dragover",j.onDragOverEventListener,!1),h.addEventListener("dragstart",j.onDragStartEventListener,!1),h.addEventListener("dragleave",j.onDragLeaveEventListener,!1),h.addEventListener("dragenter",j.onDragEnterEventListener,!1),h.addEventListener("dragend",j.onDragEndEventListener,!1),h.addEventListener("drop",j.onDropEventListener)}}]).directive("uiGridDraggableRow",["uiGridDraggableRowService",function(a){return{restrict:"ACE",scope:{grid:"="},compile:function(){return{pre:function(b,c){a.prepareDraggableRow(b,c)}}}}}]).directive("uiGridDraggableRows",["uiGridDraggableRowsService",function(a){return{restrict:"A",replace:!0,priority:0,require:"uiGrid",scope:!1,compile:function(){return{pre:function(b,c,d,e){a.initializeGrid(e.grid,b,c)}}}}}])}(),function(a,b){"object"==typeof module&&module.exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return m[e]||(k.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",k.cssRules.length),m[e]=1),e}function d(a,b){var c,d,e=a.style;if(b=b.charAt(0).toUpperCase()+b.slice(1),void 0!==e[b])return b;for(d=0;d',c)}k.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.scale*d.width,left:d.scale*d.radius,top:-d.scale*d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.scale*(d.length+d.width),k=2*d.scale*j,l=-(d.width+d.length)*d.scale*2+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;ka&&(d="-",a=-a),a=""+a;a.lengtha;a++)if(m[a]===d){m.splice(a,1),h(-1,c,"");break}}return!e&&p&&p.then&&p.then(i),d}var t=new i,u=l[0],v=!1;if(u&&u.match(a,f)){if(!u.matchData(g))throw new Error("Expected "+u+" with different data\nEXPECTED: "+r(u.data)+"\nGOT: "+g);if(!u.matchHeaders(j))throw new Error("Expected "+u+" with different headers\nEXPECTED: "+r(u.headers)+"\nGOT: "+r(j));if(l.shift(),u.response)return void m.push(s(u));v=!0}for(var w,x=-1;w=k[++x];)if(w.match(a,f,g,j||{})){if(w.response)(e?e.defer:n)(s(w));else{if(!w.passThrough)throw new Error("No response defined !");d(a,f,g,h,j,p,q)}return}throw v?new Error("No response defined !"):new Error("Unexpected request: "+a+" "+f+"\n"+(u?"Expected "+u:"No more request expected"))}function j(a){b.forEach(["GET","DELETE","JSONP"],function(b){g[a+b]=function(d,e){return g[a](b,d,c,e)}}),b.forEach(["PUT","POST","PATCH"],function(b){g[a+b]=function(c,d,e){return g[a](b,c,d,e)}})}var k=[],l=[],m=[],n=b.bind(m,m.push),o=b.copy;return g.when=function(a,b,c,d){var g=new h(a,b,c,d),i={respond:function(a,b,c,d){g.response=f(a,b,c,d)}};return e&&(i.passThrough=function(){g.passThrough=!0}),k.push(g),i},j("when"),g.expect=function(a,b,c,d){var e=new h(a,b,c,d);return l.push(e),{respond:function(a,b,c,d){e.response=f(a,b,c,d)}}},j("expect"),g.flush=function(c){if(a.$digest(),!m.length)throw new Error("No pending request to flush !");if(b.isDefined(c))for(;c--;){if(!m.length)throw new Error("No more pending request to flush !");m.shift()()}else for(;m.length;)m.shift()();g.verifyNoOutstandingExpectation()},g.verifyNoOutstandingExpectation=function(){if(a.$digest(),l.length)throw new Error("Unsatisfied requests: "+l.join(", "))},g.verifyNoOutstandingRequest=function(){if(m.length)throw new Error("Unflushed requests: "+m.length)},g.resetExpectations=function(){l.length=0,m.length=0},g}function h(a,c,d,e){this.data=d,this.headers=e,this.match=function(c,d,e,f){return a!=c?!1:this.matchUrl(d)?b.isDefined(e)&&!this.matchData(e)?!1:b.isDefined(f)&&!this.matchHeaders(f)?!1:!0:!1},this.matchUrl=function(a){return c?b.isFunction(c.test)?c.test(a):c==a:!0},this.matchHeaders=function(a){return b.isUndefined(e)?!0:b.isFunction(e)?e(a):b.equals(e,a)},this.matchData=function(a){return b.isUndefined(d)?!0:d&&b.isFunction(d.test)?d.test(a):d&&b.isFunction(d)?d(a):d&&!b.isString(d)?b.equals(d,b.fromJson(a)):d==a},this.toString=function(){return a+" "+c}}function i(){i.$$lastInstance=this,this.open=function(a,b,c){this.$$method=a,this.$$url=b,this.$$async=c,this.$$reqHeaders={},this.$$respHeaders={}},this.send=function(a){this.$$data=a},this.setRequestHeader=function(a,b){this.$$reqHeaders[a]=b},this.getResponseHeader=function(a){var d=this.$$respHeaders[a];return d?d:(a=b.lowercase(a),(d=this.$$respHeaders[a])?d:(d=c,b.forEach(this.$$respHeaders,function(c,e){d||b.lowercase(e)!=a||(d=c)}),d))},this.getAllResponseHeaders=function(){var a=[];return b.forEach(this.$$respHeaders,function(b,c){a.push(c+": "+b)}),a.join("\n")},this.abort=b.noop}b.mock={},b.mock.$BrowserProvider=function(){this.$get=function(){return new b.mock.$Browser}},b.mock.$Browser=function(){var a=this;this.isMock=!0,a.$$url="http://server/",a.$$lastUrl=a.$$url,a.pollFns=[],a.$$completeOutstandingRequest=b.noop,a.$$incOutstandingRequestCount=b.noop,a.onUrlChange=function(b){return a.pollFns.push(function(){a.$$lastUrl!=a.$$url&&(a.$$lastUrl=a.$$url,b(a.$$url))}),b},a.cookieHash={},a.lastCookieHash={},a.deferredFns=[],a.deferredNextId=0,a.defer=function(b,c){return c=c||0,a.deferredFns.push({time:a.defer.now+c,fn:b,id:a.deferredNextId}),a.deferredFns.sort(function(a,b){return a.time-b.time}),a.deferredNextId++},a.defer.now=0,a.defer.cancel=function(d){var e;return b.forEach(a.deferredFns,function(a,b){a.id===d&&(e=b)}),e!==c?(a.deferredFns.splice(e,1),!0):!1},a.defer.flush=function(c){if(b.isDefined(c))a.defer.now+=c;else{if(!a.deferredFns.length)throw new Error("No deferred tasks to be flushed");a.defer.now=a.deferredFns[a.deferredFns.length-1].time}for(;a.deferredFns.length&&a.deferredFns[0].time<=a.defer.now;)a.deferredFns.shift().fn()},a.$$baseHref="",a.baseHref=function(){return this.$$baseHref}},b.mock.$Browser.prototype={poll:function(){b.forEach(this.pollFns,function(a){a()})},addPollFn:function(a){return this.pollFns.push(a),a},url:function(a,b){return a?(this.$$url=a,this):this.$$url},cookies:function(a,c){return a?void(b.isUndefined(c)?delete this.cookieHash[a]:b.isString(c)&&c.length<=4096&&(this.cookieHash[a]=c)):(b.equals(this.cookieHash,this.lastCookieHash)||(this.lastCookieHash=b.copy(this.cookieHash),this.cookieHash=b.copy(this.cookieHash)),this.cookieHash)},notifyWhenNoOutstandingRequests:function(a){a()}},b.mock.$ExceptionHandlerProvider=function(){var a;this.mode=function(b){switch(b){case"rethrow":a=function(a){throw a};break;case"log":var c=[];a=function(a){1==arguments.length?c.push(a):c.push([].slice.call(arguments,0))},a.errors=c;break;default:throw new Error("Unknown mode '"+b+"', only 'log'/'rethrow' modes are allowed!")}},this.$get=function(){return a},this.mode("rethrow")},b.mock.$LogProvider=function(){function a(a,b,c){return a.concat(Array.prototype.slice.call(b,c))}var c=!0;this.debugEnabled=function(a){return b.isDefined(a)?(c=a,this):c},this.$get=function(){var d={log:function(){d.log.logs.push(a([],arguments,0))},warn:function(){d.warn.logs.push(a([],arguments,0))},info:function(){d.info.logs.push(a([],arguments,0))},error:function(){d.error.logs.push(a([],arguments,0))},debug:function(){c&&d.debug.logs.push(a([],arguments,0))}};return d.reset=function(){d.log.logs=[],d.info.logs=[],d.warn.logs=[],d.error.logs=[],d.debug.logs=[]},d.assertEmpty=function(){var a=[];if(b.forEach(["error","warn","info","log","debug"],function(c){b.forEach(d[c].logs,function(d){b.forEach(d,function(b){a.push("MOCK $log ("+c+"): "+String(b)+"\n"+(b.stack||""))})})}),a.length)throw a.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or an expected log message was not checked and removed:"),a.push(""),new Error(a.join("\n---------\n"))},d.reset(),d}},b.mock.$IntervalProvider=function(){this.$get=["$rootScope","$q",function(a,d){var e=[],f=0,g=0,h=function(h,i,j,k){function l(){if(m.notify(o++),j>0&&o>=j){var d;m.resolve(o),b.forEach(e,function(a,b){a.id===n.$$intervalId&&(d=b)}),d!==c&&e.splice(d,1)}p||a.$apply()}var m=d.defer(),n=m.promise,o=0,p=b.isDefined(k)&&!k;return j=b.isDefined(j)?j:0,n.then(null,null,h),n.$$intervalId=f,e.push({nextTime:g+i,delay:i,fn:l,id:f,deferred:m}),e.sort(function(a,b){return a.nextTime-b.nextTime}),f++,n};return h.cancel=function(a){if(!a)return!1;var d;return b.forEach(e,function(b,c){b.id===a.$$intervalId&&(d=c)}),d!==c?(e[d].deferred.reject("canceled"),e.splice(d,1),!0):!1},h.flush=function(a){for(g+=a;e.length&&e[0].nextTime<=g;){var b=e[0];b.fn(),b.nextTime+=b.delay,e.sort(function(a,b){return a.nextTime-b.nextTime})}return a},h}]};var j=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;if(b.mock.TzDate=function(a,c){var e=new Date(0);if(b.isString(c)){var g=c;if(e.origDate=d(c),c=e.origDate.getTime(),isNaN(c))throw{name:"Illegal Argument",message:"Arg '"+g+"' passed into TzDate constructor is not a valid date string"}}else e.origDate=new Date(c);var h=new Date(c).getTimezoneOffset();e.offsetDiff=60*h*1e3-1e3*a*60*60,e.date=new Date(c+e.offsetDiff),e.getTime=function(){return e.date.getTime()-e.offsetDiff},e.toLocaleDateString=function(){return e.date.toLocaleDateString()},e.getFullYear=function(){return e.date.getFullYear()},e.getMonth=function(){return e.date.getMonth()},e.getDate=function(){return e.date.getDate()},e.getHours=function(){return e.date.getHours()},e.getMinutes=function(){return e.date.getMinutes()},e.getSeconds=function(){return e.date.getSeconds()},e.getMilliseconds=function(){return e.date.getMilliseconds()},e.getTimezoneOffset=function(){return 60*a},e.getUTCFullYear=function(){return e.origDate.getUTCFullYear()},e.getUTCMonth=function(){return e.origDate.getUTCMonth()},e.getUTCDate=function(){return e.origDate.getUTCDate()},e.getUTCHours=function(){return e.origDate.getUTCHours()},e.getUTCMinutes=function(){return e.origDate.getUTCMinutes()},e.getUTCSeconds=function(){return e.origDate.getUTCSeconds()},e.getUTCMilliseconds=function(){return e.origDate.getUTCMilliseconds()},e.getDay=function(){return e.date.getDay()},e.toISOString&&(e.toISOString=function(){return f(e.origDate.getUTCFullYear(),4)+"-"+f(e.origDate.getUTCMonth()+1,2)+"-"+f(e.origDate.getUTCDate(),2)+"T"+f(e.origDate.getUTCHours(),2)+":"+f(e.origDate.getUTCMinutes(),2)+":"+f(e.origDate.getUTCSeconds(),2)+"."+f(e.origDate.getUTCMilliseconds(),3)+"Z"});var i=["getUTCDay","getYear","setDate","setFullYear","setHours","setMilliseconds","setMinutes","setMonth","setSeconds","setTime","setUTCDate","setUTCFullYear","setUTCHours","setUTCMilliseconds","setUTCMinutes","setUTCMonth","setUTCSeconds","setYear","toDateString","toGMTString","toJSON","toLocaleFormat","toLocaleString","toLocaleTimeString","toSource","toString","toTimeString","toUTCString","valueOf"];return b.forEach(i,function(a){e[a]=function(){throw new Error("Method '"+a+"' is not implemented in the TzDate mock")}}),e},b.mock.TzDate.prototype=Date.prototype,b.mock.animate=b.module("ngAnimateMock",["ng"]).config(["$provide",function(a){var c=[];a.value("$$animateReflow",function(a){var b=c.length;return c.push(a),function(){c.splice(b,1)}}),a.decorator("$animate",["$delegate","$$asyncCallback",function(a,d){var e={queue:[],enabled:a.enabled,triggerCallbacks:function(){d.flush()},triggerReflow:function(){b.forEach(c,function(a){a()}),c=[]}};return b.forEach(["enter","leave","move","addClass","removeClass","setClass"],function(b){e[b]=function(){e.queue.push({event:b,element:arguments[0],args:arguments}),a[b].apply(a,arguments)}}),e}])}]),b.mock.dump=function(a){function c(a){var e;return b.isElement(a)?(a=b.element(a),e=b.element("
        "),b.forEach(a,function(a){e.append(b.element(a).clone())}),e=e.html()):b.isArray(a)?(e=[],b.forEach(a,function(a){e.push(c(a))}),e="[ "+e.join(", ")+" ]"):e=b.isObject(a)?b.isFunction(a.$eval)&&b.isFunction(a.$apply)?d(a):a instanceof Error?a.stack||""+a.name+": "+a.message:b.toJson(a,!0):String(a),e}function d(a,c){c=c||" ";var e=[c+"Scope("+a.$id+"): {"];for(var f in a)Object.prototype.hasOwnProperty.call(a,f)&&!f.match(/^(\$|this)/)&&e.push(" "+f+": "+b.toJson(a[f]));for(var g=a.$$childHead;g;)e.push(d(g,c+" ")),g=g.$$nextSibling;return e.push("}"),e.join("\n"+c)}return c(a)},b.mock.$HttpBackendProvider=function(){this.$get=["$rootScope",g]},b.mock.$TimeoutDecorator=function(a,c){function d(a){var c=[];return b.forEach(a,function(a){c.push("{id: "+a.id+", time: "+a.time+"}")}),c.join(", ")}return a.flush=function(a){c.defer.flush(a)},a.verifyNoPendingTasks=function(){if(c.deferredFns.length)throw new Error("Deferred tasks to flush ("+c.deferredFns.length+"): "+d(c.deferredFns))},a},b.mock.$RAFDecorator=function(a){var b=[],c=function(a){var c=b.length;return b.push(a),function(){b.splice(c,1)}};return c.supported=a.supported,c.flush=function(){if(0===b.length)throw new Error("No rAF callbacks present");for(var a=b.length,c=0;a>c;c++)b[c]();b=[]},c},b.mock.$AsyncCallbackDecorator=function(a){var c=[],d=function(a){c.push(a)};return d.flush=function(){b.forEach(c,function(a){a()}),c=[]},d},b.mock.$RootElementProvider=function(){this.$get=function(){return b.element("
        ")}},b.module("ngMock",["ng"]).provider({$browser:b.mock.$BrowserProvider,$exceptionHandler:b.mock.$ExceptionHandlerProvider,$log:b.mock.$LogProvider,$interval:b.mock.$IntervalProvider,$httpBackend:b.mock.$HttpBackendProvider,$rootElement:b.mock.$RootElementProvider}).config(["$provide",function(a){a.decorator("$timeout",b.mock.$TimeoutDecorator),a.decorator("$$rAF",b.mock.$RAFDecorator),a.decorator("$$asyncCallback",b.mock.$AsyncCallbackDecorator)}]),b.module("ngMockE2E",["ng"]).config(["$provide",function(a){a.decorator("$httpBackend",b.mock.e2e.$httpBackendDecorator)}]),b.mock.e2e={},b.mock.e2e.$httpBackendDecorator=["$rootScope","$delegate","$browser",g],b.mock.clearDataCache=function(){var a,c=b.element.cache;for(a in c)if(Object.prototype.hasOwnProperty.call(c,a)){var d=c[a].handle;d&&b.element(d.elem).off(),delete c[a]}},a.jasmine||a.mocha){var k=null,l=function(){return!!k};(a.beforeEach||a.setup)(function(){k=this}),(a.afterEach||a.teardown)(function(){var a=k.$injector;k.$injector=null,k.$modules=null,k=null,a&&(a.get("$rootElement").off(),a.get("$browser").pollFns.length=0),b.mock.clearDataCache(),b.forEach(b.element.fragments,function(a,c){delete b.element.fragments[c]}),i.$$lastInstance=null,b.forEach(b.callbacks,function(a,c){delete b.callbacks[c]}),b.callbacks.counter=0}),a.module=b.mock.module=function(){function a(){if(k.$injector)throw new Error("Injector already created, can not register a module!");var a=k.$modules||(k.$modules=[]);b.forEach(c,function(c){b.isObject(c)&&!b.isArray(c)?a.push(function(a){b.forEach(c,function(b,c){a.value(c,b)})}):a.push(c)})}var c=Array.prototype.slice.call(arguments,0);return l()?a():a};var m=function(a,b){this.message=a.message,this.name=a.name,a.line&&(this.line=a.line),a.sourceId&&(this.sourceId=a.sourceId),a.stack&&b&&(this.stack=a.stack+"\n"+b.stack),a.stackArray&&(this.stackArray=a.stackArray)};m.prototype.toString=Error.prototype.toString,a.inject=b.mock.inject=function(){function a(){var a=k.$modules||[];a.unshift("ngMock"),a.unshift("ng");var e=k.$injector;e||(e=k.$injector=b.injector(a));for(var f=0,g=c.length;g>f;f++)try{e.invoke(c[f]||b.noop,this)}catch(h){if(h.stack&&d)throw new m(h,d);throw h}finally{d=null}}var c=Array.prototype.slice.call(arguments,0),d=new Error("Declaration Location");return l()?a.call(k):a}}}(window,window.angular),function(){var a;a=function(a,b){var c,d;for(c in a)d=a[c],"$$hashKey"!==c&&(b[c]=d)},angular.module("builder.controller",["builder.provider"]).controller("fbFormObjectEditableController",["$scope","$injector",function(b,c){var d;return d=c.get("$builder"),b.setupScope=function(c){var e;return a(c,b),b.optionsText=c.options.join("\n"),b.$watch("[label, description, placeholder, required, options, validation]",function(){return c.label=b.label,c.description=b.description,c.placeholder=b.placeholder,c.required=b.required,c.options=b.options,c.validation=b.validation},!0),b.$watch("optionsText",function(a){var c;return b.options=function(){var b,d,e,f;for(e=a.split("\n"),f=[],b=0,d=e.length;d>b;b++)c=e[b],c.length>0&&f.push(c);return f}(),b.inputText=b.options[0]}),e=d.components[c.component],b.validationOptions=e.validationOptions},b.data={model:null,backup:function(){return this.model={label:b.label,description:b.description,placeholder:b.placeholder,required:b.required,optionsText:b.optionsText,validation:b.validation}},rollback:function(){return this.model?(b.label=this.model.label,b.description=this.model.description,b.placeholder=this.model.placeholder,b.required=this.model.required,b.optionsText=this.model.optionsText,b.validation=this.model.validation):void 0}}}]).controller("fbComponentsController",["$scope","$injector",function(a,b){var c;return c=b.get("$builder"),a.selectGroup=function(b,d){var e,f,g,h;null!=b&&b.preventDefault(),a.activeGroup=d,a.components=[],g=c.components,h=[];for(f in g)e=g[f],e.group===d&&h.push(a.components.push(e));return h},a.groups=c.groups,a.activeGroup=a.groups[0],a.allComponents=c.components,a.$watch("allComponents",function(){return a.selectGroup(null,a.activeGroup)})}]).controller("fbComponentController",["$scope",function(b){return b.copyObjectToScope=function(c){return a(c,b)}}]).controller("fbFormController",["$scope","$injector",function(a,b){var c,d;return c=b.get("$builder"),d=b.get("$timeout"),null==a.input&&(a.input=[]),a.$watch("form",function(){return a.input.length>a.form.length&&a.input.splice(a.form.length),d(function(){return a.$broadcast(c.broadcastChannel.updateInput)})},!0)}]).controller("fbFormObjectController",["$scope","$injector",function(b,c){var d;return d=c.get("$builder"),b.copyObjectToScope=function(c){return a(c,b)},b.updateInput=function(a){var c;return c={id:b.formObject.id,label:b.formObject.label,value:null!=a?a:""},b.$parent.input.splice(b.$index,1,c)}}])}.call(this),function(){angular.module("builder.directive",["builder.provider","builder.controller","builder.drag","validator"]).directive("fbBuilder",["$injector",function(a){var b,c;return b=a.get("$builder"),c=a.get("$drag"),{restrict:"A",scope:{fbBuilder:"="},template:"
        \n
        \n
        ",link:function(a,d,e){var f,g,h;return a.formName=e.fbBuilder,null==(g=b.forms)[h=a.formName]&&(g[h]=[]),a.formObjects=b.forms[a.formName],f=!0,$(d).addClass("fb-builder"),c.droppable($(d),{move:function(a){var b,c,e,g,h,i,j,k,l,m,n;if(f&&($("div.fb-form-object-editable").popover("hide"),f=!1),e=$(d).find(".fb-form-object-editable:not(.empty,.dragging)"),0===e.length)return void(0===$(d).find(".fb-form-object-editable.empty").length&&$(d).find(">div:first").append($("
        ")));for(j=[],j.push(-1e3),h=k=0,m=e.length;m>k;h=k+=1)c=$(e[h]),i=c.offset(),g=c.height(),j.push(i.top+g/2);for(j.push(j[j.length-1]+1e3),h=l=1,n=j.length;n>l;h=l+=1)if(a.pageY>j[h-1]&&a.pageY<=j[h]){$(d).find(".empty").remove(),b=$("
        "),h-1l&&k--,b.updateFormObjectIndex(a.formName,l,k))):(j=i.object.formObject,j.editable&&b.removeFormObject(e.fbBuilder,j.index)),$(d).find(".empty").remove()):void $(d).find(".empty").remove()}})}}}]).directive("fbFormObjectEditable",["$injector",function(a){var b,c,d,e;return b=a.get("$builder"),d=a.get("$drag"),c=a.get("$compile"),e=a.get("$validator"),{restrict:"A",controller:"fbFormObjectEditableController",scope:{formObject:"=fbFormObjectEditable"},link:function(a,f){var g;return a.inputArray=[],a.$component=b.components[a.formObject.component],a.setupScope(a.formObject),a.$watch("$component.template",function(b){var d;if(b)return d=c(b)(a),$(f).html(d)}),$(f).on("click",function(){return!1}),d.draggable($(f),{object:{formObject:a.formObject}}),a.formObject.editable?(g={},a.$watch("$component.popoverTemplate",function(b){return b?($(f).removeClass(g.id),g={id:"fb-"+Math.random().toString().substr(2),isClickedSave:!1,view:null,html:b},g.html=$(g.html).addClass(g.id),g.view=c(g.html)(a),$(f).addClass(g.id),$(f).popover({html:!0,title:a.$component.label,content:g.view,container:"body"})):void 0}),a.popover={save:function(b){b.preventDefault(),e.validate(a).success(function(){return g.isClickedSave=!0,$(f).popover("hide")})},remove:function(c){c.preventDefault(),b.removeFormObject(a.$parent.formName,a.$parent.$index),$(f).popover("hide")},shown:function(){return a.data.backup(),g.isClickedSave=!1},cancel:function(b){a.data.rollback(),b&&(b.preventDefault(),$(f).popover("hide"))}},$(f).on("show.bs.popover",function(){var a,b,c;return d.isMouseMoved()?!1:($("div.fb-form-object-editable:not(."+g.id+")").popover("hide"),a=$("form."+g.id).closest(".popover"),a.length>0?(b=$(f).offset().top+$(f).height()/2,c=b-a.height()/2,a.css({position:"absolute",top:c}),a.show(),setTimeout(function(){return a.addClass("in"),$(f).triggerHandler("shown.bs.popover")},0),!1):void 0)}),$(f).on("shown.bs.popover",function(){$(".popover ."+g.id+" input:first").select(),a.$apply(function(){return a.popover.shown()})}),$(f).on("hide.bs.popover",function(){var b;return b=$("form."+g.id).closest(".popover"),g.isClickedSave||(a.$$phase||a.$root.$$phase?a.popover.cancel():a.$apply(function(){return a.popover.cancel()})),b.removeClass("in"),setTimeout(function(){return b.hide()},300),!1})):void 0}}}]).directive("fbComponents",function(){return{restrict:"A",template:'\n
        \n
        \n
        ',controller:"fbComponentsController"}}).directive("fbComponent",["$injector",function(a){var b,c,d;return b=a.get("$builder"),d=a.get("$drag"),c=a.get("$compile"),{restrict:"A",scope:{component:"=fbComponent"},controller:"fbComponentController",link:function(a,b){return a.copyObjectToScope(a.component),d.draggable($(b),{ +mode:"mirror",defer:!1,object:{componentName:a.component.name}}),a.$watch("component.template",function(d){var e;if(d)return e=c(d)(a),$(b).html(e)})}}}]).directive("fbForm",["$injector",function(a){return{restrict:"A",require:"ngModel",scope:{formName:"@fbForm",input:"=ngModel","default":"=fbDefault"},template:'
        ',controller:"fbFormController",link:function(b,c,d){var e,f,g;return e=a.get("$builder"),null==(f=e.forms)[g=b.formName]&&(f[g]=[]),b.form=e.forms[b.formName]}}}]).directive("fbFormObject",["$injector",function(a){var b,c,d;return b=a.get("$builder"),c=a.get("$compile"),d=a.get("$parse"),{restrict:"A",controller:"fbFormObjectController",link:function(a,e,f){return a.formObject=d(f.fbFormObject)(a),a.$component=b.components[a.formObject.component],a.$on(b.broadcastChannel.updateInput,function(){return a.updateInput(a.inputText)}),a.$component.arrayToText&&(a.inputArray=[],a.$watch("inputArray",function(b,c){var d,e;if(b!==c){d=[];for(e in a.inputArray)a.inputArray[e]&&d.push(a.options[e]);return a.inputText=d.join(", ")}},!0)),a.$watch("inputText",function(){return a.updateInput(a.inputText)}),a.$watch(f.fbFormObject,function(){return a.copyObjectToScope(a.formObject)},!0),a.$watch("$component.template",function(b){var d,f,g;if(b)return f=$(b),d=f.find("[ng-model='inputText']"),d.attr({validator:"{{validation}}"}),g=c(f)(a),$(e).html(g)}),!a.$component.arrayToText&&a.formObject.options.length>0&&(a.inputText=a.formObject.options[0]),a.$watch("default["+a.formObject.id+"]",function(b){return b?a.$component.arrayToText?a.inputArray=b:a.inputText=b:void 0})}}}])}.call(this),function(){angular.module("builder.drag",[]).provider("$drag",function(){var a,b,c;a=null,b=null,this.data={draggables:{},droppables:{}},this.mouseMoved=!1,this.isMouseMoved=function(a){return function(){return a.mouseMoved}}(this),this.hooks={down:{},move:{},up:{}},this.eventMouseMove=function(){},this.eventMouseUp=function(){},$(function(a){return function(){return $(document).on("mousedown",function(b){var c,d,e;a.mouseMoved=!1,e=a.hooks.down;for(d in e)(c=e[d])(b)}),$(document).on("mousemove",function(b){var c,d,e;a.mouseMoved=!0,e=a.hooks.move;for(d in e)(c=e[d])(b)}),$(document).on("mouseup",function(b){var c,d,e;e=a.hooks.up;for(d in e)(c=e[d])(b)})}}(this)),this.currentId=0,this.getNewId=function(a){return function(){return""+a.currentId++}}(this),this.setupEasing=function(){return jQuery.extend(jQuery.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}})},this.setupProviders=function(c){return a=c,b=a.get("$rootScope")},this.isHover=function(a){return function(a,b){var c,d,e,f,g;return d=a.offset(),e=b.offset(),f={width:a.width(),height:a.height()},g={width:b.width(),height:b.height()},c={x:!1,y:!1},c.x=d.left>e.left&&d.lefte.left&&d.left+f.widthe.top&&d.tope.top&&d.top+f.height$(window).innerHeight()-50))return a.autoScroll.up=!1,a.autoScroll.down=!1;if(a.autoScroll.up=!1,a.autoScroll.down=!0,!a.autoScroll.scrolling)return a.autoScroll.scroll()}}}(this),stop:function(a){return function(){return a.autoScroll.up=!1,a.autoScroll.down=!1}}(this)},this.dragMirrorMode=function(a){return function(b,c,d){var e;return null==c&&(c=!0),e={id:a.getNewId(),mode:"mirror",maternal:b[0],element:null,object:d},b.on("mousedown",function(d){var f;return d.preventDefault(),f=b.clone(),e.element=f[0],f.addClass("fb-draggable form-horizontal prepare-dragging"),a.hooks.move.drag=function(c,d){var g,h,i,j;if(!f.hasClass("prepare-dragging")||(f.css({width:b.width(),height:b.height()}),f.removeClass("prepare-dragging"),f.addClass("dragging"),!d)){f.offset({left:c.pageX-f.width()/2,top:c.pageY-f.height()/2}),a.autoScroll.start(c),i=a.data.droppables,j=[];for(h in i)g=i[h],a.isHover(f,$(g.element))?j.push(g.move(c,e)):j.push(g.out(c,e));return j}},a.hooks.up.drag=function(b){var c,d,g,h;h=a.data.droppables;for(d in h)c=h[d],g=a.isHover(f,$(c.element)),c.up(b,g,e);return delete a.hooks.move.drag,delete a.hooks.up.drag,e.element=null,f.remove(),a.autoScroll.stop()},$("body").append(f),c?void 0:a.hooks.move.drag(d,c)}),e}}(this),this.dragDragMode=function(a){return function(b,c,d){var e;return null==c&&(c=!0),e={id:a.getNewId(),mode:"drag",maternal:null,element:b[0],object:d},b.addClass("fb-draggable"),b.on("mousedown",function(d){return d.preventDefault(),b.hasClass("dragging")?void 0:(b.addClass("prepare-dragging"),a.hooks.move.drag=function(c,d){var f,g,h;if(!b.hasClass("prepare-dragging")||(b.css({width:b.width(),height:b.height()}),b.removeClass("prepare-dragging"),b.addClass("dragging"),!d)){b.offset({left:c.pageX-b.width()/2,top:c.pageY-b.height()/2}),a.autoScroll.start(c),h=a.data.droppables;for(g in h)f=h[g],a.isHover(b,$(f.element))?f.move(c,e):f.out(c,e)}},a.hooks.up.drag=function(c){var d,f,g,h;h=a.data.droppables;for(f in h)d=h[f],g=a.isHover(b,$(d.element)),d.up(c,g,e);return delete a.hooks.move.drag,delete a.hooks.up.drag,b.css({width:"",height:"",left:"",top:""}),b.removeClass("dragging defer-dragging"),a.autoScroll.stop()},c?void 0:a.hooks.move.drag(d,c))}),e}}(this),this.dropMode=function(a){return function(c,d){var e;return e={id:a.getNewId(),element:c[0],move:function(a,c){return b.$apply(function(){return"function"==typeof d.move?d.move(a,c):void 0})},up:function(a,c,e){return b.$apply(function(){return"function"==typeof d.up?d.up(a,c,e):void 0})},out:function(a,c){return b.$apply(function(){return"function"==typeof d.out?d.out(a,c):void 0})}}}}(this),this.draggable=function(a){return function(b,c){var d,e,f,g,h,i,j;if(null==c&&(c={}),f=[],"mirror"===c.mode)for(g=0,i=b.length;i>g;g++)e=b[g],d=a.dragMirrorMode($(e),c.defer,c.object),f.push(d.id),a.data.draggables[d.id]=d;else for(h=0,j=b.length;j>h;h++)e=b[h],d=a.dragDragMode($(e),c.defer,c.object),f.push(d.id),a.data.draggables[d.id]=d;return f}}(this),this.droppable=function(a){return function(b,c){var d,e,f,g,h;for(null==c&&(c={}),f=[],g=0,h=b.length;h>g;g++)e=b[g],d=a.dropMode($(e),c),f.push(d),a.data.droppables[d.id]=d;return f}}(this),this.get=function(a){return this.setupEasing(),this.setupProviders(a),{isMouseMoved:this.isMouseMoved,data:this.data,draggable:this.draggable,droppable:this.droppable}},this.get.$inject=["$injector"],this.$get=this.get})}.call(this),function(){angular.module("builder",["builder.directive"])}.call(this),function(){var a=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};angular.module("builder.provider",[]).provider("$builder",function(){var b,c,d;c=null,b=null,d=null,this.version="0.0.2",this.components={},this.groups=[],this.broadcastChannel={updateInput:"$updateInput"},this.forms={"default":[]},this.formsId={"default":0},this.convertComponent=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;return c={name:a,group:null!=(d=b.group)?d:"Default",label:null!=(e=b.label)?e:"",description:null!=(f=b.description)?f:"",placeholder:null!=(g=b.placeholder)?g:"",editable:null!=(h=b.editable)?h:!0,required:null!=(i=b.required)?i:!1,validation:null!=(j=b.validation)?j:"/.*/",validationOptions:null!=(k=b.validationOptions)?k:[],options:null!=(l=b.options)?l:[],arrayToText:null!=(m=b.arrayToText)?m:!1,template:b.template,templateUrl:b.templateUrl,popoverTemplate:b.popoverTemplate,popoverTemplateUrl:b.popoverTemplateUrl},c.template||c.templateUrl||console.error("The template is empty."),c.popoverTemplate||c.popoverTemplateUrl||console.error("The popoverTemplate is empty."),c},this.convertFormObject=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;if(null==b&&(b={}),c=this.components[b.component],null==c)throw"The component "+b.component+" was not registered.";if(b.id){for(d=!1,i=this.forms[a],g=0,h=i.length;h>g;g++)if(e=i[g],b.id<=e.id){b.id=this.formsId[a]++,d=!0;break}d||(this.formsId[a]=b.id+1)}return f={id:null!=(j=b.id)?j:this.formsId[a]++,component:b.component,editable:null!=(k=b.editable)?k:c.editable,index:null!=(l=b.index)?l:0,label:null!=(m=b.label)?m:c.label,description:null!=(n=b.description)?n:c.description,placeholder:null!=(o=b.placeholder)?o:c.placeholder,options:null!=(p=b.options)?p:c.options,required:null!=(q=b.required)?q:c.required,validation:null!=(r=b.validation)?r:c.validation}},this.reindexFormObject=function(a){return function(b){var c,d,e,f;for(c=a.forms[b],d=e=0,f=c.length;f>e;d=e+=1)c[d].index=d}}(this),this.setupProviders=function(a){return function(a){return c=a,b=c.get("$http"),d=c.get("$templateCache")}}(this),this.loadTemplate=function(a){return null==a.template&&b.get(a.templateUrl,{cache:d}).success(function(b){return a.template=b}),null==a.popoverTemplate?b.get(a.popoverTemplateUrl,{cache:d}).success(function(b){return a.popoverTemplate=b}):void 0},this.registerComponent=function(b){return function(d,e){var f,g;null==e&&(e={}),null==b.components[d]?(f=b.convertComponent(d,e),b.components[d]=f,null!=c&&b.loadTemplate(f),g=f.group,a.call(b.groups,g)<0&&b.groups.push(f.group)):console.error("The component "+d+" was registered.")}}(this),this.addFormObject=function(a){return function(b,c){var d;return null==c&&(c={}),null==(d=a.forms)[b]&&(d[b]=[]),a.insertFormObject(b,a.forms[b].length,c)}}(this),this.insertFormObject=function(a){return function(b,c,d){var e,f;return null==d&&(d={}),null==(e=a.forms)[b]&&(e[b]=[]),null==(f=a.formsId)[b]&&(f[b]=0),c>a.forms[b].length?c=a.forms[b].length:0>c&&(c=0),a.forms[b].splice(c,0,a.convertFormObject(b,d)),a.reindexFormObject(b),a.forms[b][c]}}(this),this.removeFormObject=function(a){return function(b,c){var d;return d=a.forms[b],d.splice(c,1),a.reindexFormObject(b)}}(this),this.updateFormObjectIndex=function(a){return function(b,c,d){var e,f;if(c!==d)return f=a.forms[b],e=f.splice(c,1)[0],f.splice(d,0,e),a.reindexFormObject(b)}}(this),this.$get=["$injector",function(a){return function(b){var c,d,e;a.setupProviders(b),e=a.components;for(d in e)c=e[d],a.loadTemplate(c);return{version:a.version,components:a.components,groups:a.groups,forms:a.forms,broadcastChannel:a.broadcastChannel,registerComponent:a.registerComponent,addFormObject:a.addFormObject,insertFormObject:a.insertFormObject,removeFormObject:a.removeFormObject,updateFormObjectIndex:a.updateFormObjectIndex}}}(this)]})}.call(this),function(){angular.module("builder.components",["builder","validator.rules"]).config(["$builderProvider",function(a){return a.registerComponent("textInput",{group:"Default",label:"Text Input",description:"description",placeholder:"placeholder",required:!1,validationOptions:[{label:"none",rule:"/.*/"},{label:"number",rule:"[number]"},{label:"email",rule:"[email]"},{label:"url",rule:"[url]"}],template:'
        \n \n
        \n \n

        {{description}}

        \n
        \n
        ',popoverTemplate:"
        \n
        \n \n \n
        \n
        \n \n \n
        \n
        \n \n \n
        \n
        \n \n
        \n
        0\">\n \n \n
        \n\n
        \n
        \n \n \n \n
        \n
        "}),a.registerComponent("textArea",{group:"Default",label:"Text Area",description:"description",placeholder:"placeholder",required:!1,template:'
        \n \n
        \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n\n \n
        \n\n'),a.put("app/analytic/metric/list/list.html",'\n
        \n
        \n \n\n \n
        \n
        \n
        \n \n {{ \'APPLICATION_DEFAULT_METRICS\' | translate }} \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_METRICS\' | translate }} \n
        \n
        \n \n
        \n \n
        \n \n
        \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/analytic/metric/list/view.modal.html",'\n\n\n'),a.put("app/analytic/metric/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{metric.name}}\n
        \n \n
        \n \n\n \n \n \n
        \n \n
        \n \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/analytic/metric/view/view.settings.html",'
        \n
        \n
        \n
        \n
        \n \n {{ \'APPLICATION_METRIC\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
        \n \n
        \n\n
        \n
        \n \n
        \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{\'APPLICATION_\'+$select.selected.value.toUpperCase() | translate}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n \n
        \n
        \n \n\n
        \n
        \n
        \n
        \n
        \n'), +a.put("app/analytic/report/list/copy.modal.html",'\n\n\n'),a.put("app/analytic/report/list/create.modal.html",'\n\n\n'),a.put("app/analytic/report/list/deleteNode.modal.html",'\n\n\n'),a.put("app/analytic/report/list/extract.modal.html",'\n\n\n'),a.put("app/analytic/report/list/list.html",'\n
        \n
        \n \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_FOLDERS\' | translate }} \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 {{ \'APPLICATION_REPORTS\' | translate }} - {{selectedNode}}\n
        \n
        \n \n
        \n \n \n {{\'APPLICATION_IMPORT_FROM_JSON\' | translate}}\n \n \n
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n
        \n \n
        \n
        \n
        \n
        \n\n'),a.put("app/analytic/report/list/preview.modal.html",'\n\n\n'),a.put("app/analytic/report/view/view.html",'\n
        \n
        \n \n\n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/analytic/report/view/view.settings.html",'
        \n
        \n
        \n
        \n
        \n \n
        {{ \'APPLICATION_REPORT\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} - {{report.name}}
        \n
        \n \n
        \n\n
        \n\n
        \n\n \n
        \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n\n \n
        \n
        \n \n\n \n
        \n
        \n \n
        \n \n \n {{\'APPLICATION_\'+$select.selected.value.toUpperCase() | translate}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_FIELDS\' | translate}} \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
        {{ \'APPLICATION_FIELD\' | translate }} / {{ \'APPLICATION_METRIC\' | translate }}{{ \'APPLICATION_ALIAS\' | translate }}{{ \'APPLICATION_FUNCTION\' | translate }}{{ \'APPLICATION_FORMAT\' | translate }}{{ \'APPLICATION_GROUP_BY\' | translate }}{{ \'APPLICATION_ORDER_BY\' | translate }}
        \n \n
        \n \n
        \n \n \n \n
        \n
        \n
        \n \n \n \n \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n \n
        \n \n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n \n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n \n
        \n \n
        \n \n \n {{$select.selected.name | translate}}\n \n {{$translate.instant(groupBy.name)}}\n \n \n
        \n \n
        \n \n
        \n \n \n {{$select.selected}}\n \n
        \n
        \n
        \n
        \n \n
        \n \n \n \n
        \n {{ \'MESSAGE_ADD_A_FIELD\' | translate }}\n
        \n \n \n
        \n
        \n
        \n
        \n \n {{ \'APPLICATION_CONDITIONS\' | translate}} \n
        \n
        \n
        \n Output\n
        \n \n
        \n\n \n
        \n \n
        \n
        \n \n\n \n
        \n
        \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n
        \n
        \n \n\n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/chat/offline/list/list.html",'\n\n\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_OFFLINE_MESSAGES\' | translate }} \n
        \n \n
        \n
        \n \n
        \n
        {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/chat/offline/message/message.directive.html",'
        \n
        \n
        \n From: \n [{{message.email}}]\n
        \n
        \n
        \n \n {{message.createdAt | date:\'medium\'}} ()\n \n
        \n
        \n
        {{\'MESSAGE_NO_AVAILABLE_TEXT\' | translate | lowercase}}
        \n
        \n'),a.put("app/channels/chat/offline/view/view.html",'\n
        \n
        \n \n\n \n
        \n
        \n
        \n {{enquiry.ChatWebsite.name}}\n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n \n \n \n \n \n \n {{\'APPLICATION_NAME\' | translate}}:

        {{enquiry.ChatVisitor.fullname}}

        \n {{\'APPLICATION_EMAIL\' | translate}}:

        {{enquiry.ChatVisitor.email}}

        \n {{enquiry.ChatVisitor.labelOfflineData1}}:

        {{enquiry.ChatVisitor.offlineData1}}

        \n {{enquiry.ChatVisitor.labelOfflineData2}}:

        {{enquiry.ChatVisitor.offlineData2}}

        \n {{enquiry.ChatVisitor.labelOfflineData3}}:

        {{enquiry.ChatVisitor.offlineData3}}

        \n {{\'APPLICATION_REMOTE_ADDRESS\' | translate}}:

        {{enquiry.ChatVisitor.remote_address}}

        \n {{\'APPLICATION_BROWSER\' | translate}}:

        {{enquiry.ChatVisitor.browser}}

        \n {{\'APPLICATION_REFERER\' | translate}}:

        {{enquiry.ChatVisitor.referer}} - {{enquiry.ChatWebsite.name}}

        \n {{\'APPLICATION_OS\' | translate}}:

        {{enquiry.ChatVisitor.os}}

        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
          \n
        • \n \n
        • \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n\n'), +a.put("app/channels/chat/online/list/list.html",'\n\n\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_VISITORS\' | translate }} \n
        \n \n
        \n
        \n \n
        \n
        {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/chat/online/view/view.detail.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_DETAIL\' | translate}}\n
        \n
        \n \n
        \n
        \n
        \n'),a.put("app/channels/chat/online/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{chatRoom.ChatVisitor.email}}\n
        \n
        \n {{chatRoom.ChatVisitor.fullname}}\n
        \n
        \n \n \n \n \n
        \n \n
        \n \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/chat/preview/preview.html",'\n
        \n
        \n \n \n \n \n \n \n \n {{statePreview.state == \'online\' ? chatWebsite.header_online : chatWebsite.header_offline}}\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

        {{chatWebsite.rating_message}}

        \n
        \n
        \n \n \n
        \n
        \n \n \n
        \n \n \n
        \n
        \n \n
        \n
        \n'),a.put("app/channels/chat/queue/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/chat/queue/list/list.html",'\n\n\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_QUEUES\' | translate }} \n
        \n \n
        \n
        \n \n
        \n
        {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/chat/queue/view/view.agents.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_AGENTS\' | translate}}\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'),a.put("app/channels/chat/queue/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{queue.name}}\n
        \n
        \n \n\n \n \n \n
        \n \n
        \n \n \n
        \n
        \n \n
        \n
        \n\n'), +a.put("app/channels/chat/queue/view/view.settings.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
        \n
        \n
        \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected | uppercase}}\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'),a.put("app/channels/chat/realtime/view/agent/agent.html",'\n
        \n
        \n \n
        \n \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/chat/realtime/view/agent/agent.modal.info.html",'\n\n\n'),a.put("app/channels/chat/realtime/view/agent/queue.modal.add.html",'\n\n\n'),a.put("app/channels/chat/realtime/view/application/application.html",'\n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/chat/realtime/view/view.html",'\n\n\n'),a.put("app/channels/chat/room/external/list/list.html",'\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 {{$item}}\n \n {{tag}}\n \n \n
        \n
        \n
        \n \n
        \n
        \n \n \n \n\n \n\n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/chat/room/group/list/list.html",'\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 {{$item}}\n \n {{tag}}\n \n \n
        \n
        \n
        \n \n
        \n
        \n \n \n \n\n \n\n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/chat/room/internal/list/list.html",'\n
        \n
        \n \n \n \n\n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/chat/room/room.add.html",'\n\n\n\n\n'),a.put("app/channels/chat/room/room.close.html",'\n\n\n'),a.put("app/channels/chat/room/room.directive.html",'
        \n
        \n
        \n {{chatRoom.status}}\n | \n {{chatRoom.ChatWebsite.name | truncate: 25: \'...\': true}}\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 {{$item}}\n \n {{tag}}\n \n \n
        \n
        \n
        \n \n
        \n
        \n \n \n \n \n \n \n {{\'APPLICATION_ROOM_ID\' | translate}}:

        {{chatRoom.id}}

        \n {{\'APPLICATION_NAME\' | translate}}:

        {{chatRoom.ChatVisitor.fullname}}

        \n {{\'APPLICATION_EMAIL\' | translate}}:

        {{chatRoom.ChatVisitor.email}}

        \n {{chatRoom.ChatVisitor.labelData1}}:

        {{chatRoom.ChatVisitor.data1}}

        \n {{chatRoom.ChatVisitor.labelData2}}:

        {{chatRoom.ChatVisitor.data2}}

        \n {{chatRoom.ChatVisitor.labelData3}}:

        {{chatRoom.ChatVisitor.data3}}

        \n {{\'APPLICATION_REMOTE_ADDRESS\' | translate}}:

        {{chatRoom.ChatVisitor.remote_address}}

        \n {{\'APPLICATION_BROWSER\' | translate}}:

        {{chatRoom.ChatVisitor.browser}}

        \n {{\'APPLICATION_REFERER\' | translate}}:

        {{chatRoom.ChatVisitor.referer}} - {{enquiry.ChatWebsite.name}}

        \n {{\'APPLICATION_OS\' | translate}}:

        {{chatRoom.ChatVisitor.os}}

        \n
        \n
        \n\n \n \n \n \n \n {{\'APPLICATION_NAME\' | translate}}:

        {{user.fullname}}

        \n {{\'APPLICATION_ROLE\' | translate}}:

        {{user.role}}

        \n {{\'APPLICATION_INTERNAL\' | translate}}:

        {{user.internal}}

        \n {{\'APPLICATION_EMAIL\' | translate}}:

        {{user.email}}

        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n

        {{\'MESSAGE_CHAT_ROOM_CLOSED\' | translate}}!

        \n

        \n {{\'MESSAGE_CHAT_ROOM_CLOSED_DETAILS\' | translate}}.\n

        \n
        \n

        \n {{\'APPLICATION_DISPOSITION\' | translate}}: {{chatRoom.disposition}}\n

        \n

        \n {{\'APPLICATION_RATING\' | translate}}: {{chatRoom.rating | ucfirst}}\n

        \n

        \n {{\'APPLICATION_RATING_MESSAGE\' | translate}}: {{chatRoom.ratingMessage}}\n

        \n

        \n {{\'APPLICATION_UPDATED_AT\' | translate}}: {{chatRoom.updatedAt | date:\'medium\'}} ()\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 No Results Found\n
        \n \n'+" {{'APPLICATION_WARNING' | translate}}! {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n \n
        \n
        \n\n
        \n
        \n
        \n
        \n
        \n
        \n"),a.put("app/channels/chat/room/room.html",'\n\n\n'),a.put("app/channels/chat/room/template.html",'
        \n
        \n
        \n
        \n \n \n
        \n
        \n \n
        \n {{video.description}}\n
        \n
        \n {{video.views}}\n {{video.likes}}\n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/chat/room/view.tags.modal.html",'\n\n\n'), +a.put("app/channels/chat/visitor/list/list.html",'\n\n\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_VISITORS\' | translate }} \n
        \n \n
        \n
        \n \n
        \n
        {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/chat/visitor/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{chatVisitor.fullname}}\n
        \n
        \n \n\n \n \n \n
        \n \n
        \n \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/chat/visitor/view/view.profile.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_PROFILE\' | translate}}\n
        \n
        \n \n
        \n
        \n
        \n'),a.put("app/channels/chat/website/list/list.html",'\n\n\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_WEB_SITES\' | translate }} \n
        \n \n
        \n
        \n \n
        \n
        {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/chat/website/view/action/list/list.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
        \n \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n
        \n
        \n'),a.put("app/channels/chat/website/view/action/view/view.html",'\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_ACTION\' | translate }} \n
        \n
        \n
        \n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n
        \n \n
        \n \n \n {{$select.selected.fullname}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n \n
        \n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n
        \n
        \n \n
        \n
        to
        \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
        \n
        \n \n
        \n\n
        \n\n \n
        \n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/chat/website/view/action/wizard/wizard.html",'\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_ACTION\' | translate }} WIZARD \n
        \n
        \n
        \n \n \n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n \n {{$select.selected.fullname}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n\n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n
        \n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n \n
        \n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n
        \n
        \n \n
        \n
        to
        \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
        \n
        \n \n
        \n\n
        \n\n \n
        \n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n\n \n
        \n
        \n \n

        {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

        \n \n \n
        \n
        \n
        \n
        \n \n
        \n
        \n\n'), +a.put("app/channels/chat/website/view/disposition/modal/add.modal.html",'\n\n\n'),a.put("app/channels/chat/website/view/disposition/view/view.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_DISPOSITIONS\' | translate}}\n
        \n
        \n \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n

        Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}

        \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'),a.put("app/channels/chat/website/view/embedding/view/view.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_EMBEDDING\' | translate}}\n
        \n \n
        \n
        \n
        \n
        \n

        {{\'APPLICATION_EMBED_SNIPPET\' | translate}}

        \n

        \n {{\'MESSAGE_EMBED_SNIPPET\' | translate}}\n

        \n
        \n
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/chat/website/view/form/view/view.html",'
        \n
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n {{ \'APPLICATION_FIELDS_SELECTED\' | translate }}\n
        \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n {{ \'APPLICATION_FIELDS_AVAILABLE\' | translate }}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n {{ \'APPLICATION_FIELDS_SELECTED\' | translate }}\n
        \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n {{ \'APPLICATION_FIELDS_AVAILABLE\' | translate }}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/chat/website/view/hooks/view/view.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_HOOKS\' | translate}}\n
        \n \n
        \n
        \n
        \n \n
        \n
        \n \n
        \n
        \n \n \n {{$select.selected.name | uppercase}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n \n \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n \n
        \n
        \n \n \n
        \n
        \n \n
        \n
        \n \n \n {{$select.selected.name | uppercase}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n\n \n \n
        \n
        \n \n \n
        \n
        \n
        \n
        \n \n \n {{$select.selected.name | uppercase}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/chat/website/view/proactive/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/chat/website/view/proactive/list/list.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_PROACTIVE_ACTIONS\' | translate}}\n
        \n \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n
        \n
        \n'),a.put("app/channels/chat/website/view/setting/view/view.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
        \n
        \n
        \n
        \n \n
        \n \n
        \n\n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n\n \n \n \n\n
        \n
        \n \n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/chat/website/view/snippet/view/view.html",'
        \n
        \n
        \n \n
        \n
        \n
        \n
        \n\n \n
        \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{$translate.instant(\'APPLICATION_\' + $select.selected.toUpperCase())}}\n \n
        \n
        \n
        \n
        \n \n\n \n
        \n
        \n \n \n
        \n \n\n
        \n
        \n \n {{\'APPLICATION_WHITE_LABEL\' | translate}}\n
        \n
        \n\n
        \n
        \n \n
        \n \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n
        \n \n {{\'APPLICATION_LOGO\' | translate}}\n
        \n
        \n
        \n\n
        \n
        \n \n
        \n \n
        \n
        \n
        \n \n
        \n
        \n
        \n
        \n \n {{ \'APPLICATION_SELECT_IMAGE\' | translate }} \n
        \n
        \n
        \n

        \n
        {{ \'MESSAGE_SUPPORTED_FORMATS\' | translate }} jpg, png, jpeg.\n

        \n
        \n
        \n
        \n
        \n
        \n \n \n \n \n \n \n \n \n
        \n \n {{ item.file.name }}\n \n \n {{ item.file.size/1024/1024|number:2 }} MB\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

        {{\'APPLICATION_ONLINE_STATE\' | translate}}

        \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

        {{\'APPLICATION_RATING_STATE\' | translate}}

        \n\n \n
        \n \n \n
        \n \n\n \n
        \n \n \n
        \n \n\n \n
        \n \n \n
        \n \n\n

        {{\'APPLICATION_OFFLINE_STATE\' | translate}}

        \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 {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n \n
        \n \n\n \n
        \n
        \n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\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 {{\'MESSAGE_REMEMBER_SMTP_SERVICE_ACCOUNT\' | translate}}.\n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n
        \n \n
        \n
        \n
        \n \n
        \n \n \n \n {{$select.selected}}\n \n
        \n
        \n
        \n
        \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n'), +a.put("app/channels/chat/website/view/view.html",'\n\n\n'),a.put("app/channels/chat/website/wizard/wizard.html",'\n\n\n\n\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_WEB_SITE\' | translate }} WIZARD \n
        \n
        \n
        \n \n \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n \n
        \n
        \n\n \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{$translate.instant(\'APPLICATION_\' + $select.selected.toUpperCase())}}\n \n
        \n
        \n
        \n
        \n \n\n \n
        \n \n \n {{$select.selected ? \'On\' : \'Off\'}}\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 \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 {{$select.selected ? \'On\' : \'Off\'}}\n \n
        \n
        \n
        \n
        \n \n\n \n \n
        \n
        \n\n \n

        {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

        \n \n \n
        \n
        \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/fax/account/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/fax/account/list/list.html",'\n\n\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_ACCOUNTS\' | translate }} \n
        \n
        \n \n
        \n \n \n
        \n
        \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/fax/account/view/action/list/list.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
        \n \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n
        \n
        \n'), +a.put("app/channels/fax/account/view/action/view/view.html",'\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_ACTION\' | translate }} \n
        \n
        \n
        \n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n
        \n \n
        \n \n \n {{$select.selected.fullname}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n \n
        \n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n
        \n
        \n \n
        \n
        to
        \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
        \n
        \n \n
        \n\n
        \n\n \n
        \n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_INTERVALS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_INTERVALS\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/fax/account/view/action/wizard/wizard.html",'\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_ACTION\' | translate }} WIZARD \n
        \n
        \n
        \n \n \n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n \n {{$select.selected.fullname}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n\n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n
        \n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n \n
        \n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n
        \n
        \n \n
        \n
        to
        \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
        \n
        \n \n
        \n\n
        \n\n \n
        \n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_INTERVALS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_INTERVALS\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n\n \n
        \n
        \n \n

        {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

        \n \n \n
        \n
        \n
        \n
        \n \n
        \n
        \n\n'), +a.put("app/channels/fax/account/view/disposition/modal/add.modal.html",'\n\n\n'),a.put("app/channels/fax/account/view/disposition/view/view.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_DISPOSITIONS\' | translate}}\n
        \n
        \n \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n

        Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}

        \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'),a.put("app/channels/fax/account/view/hooks/view/view.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_HOOKS\' | translate}}\n
        \n \n
        \n
        \n
        \n \n
        \n
        \n
        \n
        \n \n \n {{$select.selected.name | uppercase}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n \n
        \n
        \n \n \n
        \n
        \n
        \n
        \n \n \n {{$select.selected.name | uppercase}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n
        \n
        \n \n \n
        \n
        \n
        \n
        \n \n \n {{$select.selected.name | uppercase}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/fax/account/view/setting/view/view.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
        \n \n
        \n
        \n
        \n \n
        \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'DESCRIPTION_HEADERINFO\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_INTERVALS\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'DESCRIPTION_LOCALSTATIONID\' | translate}}.\n \n
        \n \n\n \n
        \n \n
        \n\n \n {{$select.selected.name}}\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 {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\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 {{\'DESCRIPTION_ECM\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected}}\n \n
        \n
        \n
        \n \n {{\'DESCRIPTION_MINRATE\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected}}\n \n
        \n
        \n
        \n \n {{\'DESCRIPTION_MAXRATE\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'DESCRIPTION_MODEM\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n \n
        \n \n \n \n {{\'DESCRIPTION_GATEWAY\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_PATTERN_GATEWAY\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'DESCRIPTION_FAXDETECT\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_PATTERN_FAXDETECT\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'DESCRIPTION_T38TIMEOUT\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_T38TIMEOUT\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n\n \n
        \n
        \n \n\n
        \n
        \n
        \n
        \n
        \n'), +a.put("app/channels/fax/account/view/view.html",'\n
        \n
        \n \n\n\n\n\n \n
        \n \n
        \n \n
        \n \n
        \n \n\n \n
        \n
        \n {{ account.name || account.description }}\n
        \n
        \n {{ account.phone }}\n
        \n
        \n \n\n \n \n \n
        \n
        \n \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/fax/account/wizard/wizard.html",'\n\n\n\n\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD \n
        \n
        \n
        \n \n \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'DESCRIPTION_HEADERINFO\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_INTERVALS\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'DESCRIPTION_LOCALSTATIONID\' | translate}}.\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 {{\'DESCRIPTION_ECM\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected}}\n \n
        \n
        \n
        \n \n {{\'DESCRIPTION_MINRATE\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected}}\n \n
        \n
        \n
        \n \n {{\'DESCRIPTION_MAXRATE\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'DESCRIPTION_MODEM\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'DESCRIPTION_GATEWAY\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_PATTERN_GATEWAY\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'DESCRIPTION_FAXDETECT\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_PATTERN_FAXDETECT\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'DESCRIPTION_T38TIMEOUT\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_T38TIMEOUT\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n \n\n
        \n
        \n\n \n

        {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

        \n \n \n
        \n\n
        \n\n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/fax/inbox/message/info.modal.html",'\n\n\n'),a.put("app/channels/fax/inbox/message/message.directive.html",'
        \n
        \n
        \n From: \n [{{message.from}}]\n
        \n To: \n [{{message.to}}]\n
        \n
        \n \n \n \n {{\'APPLICATION_SENT_BY\' | translate}}: {{message.User.fullname}}\n
        \n
        \n
        \n \n \n {{message.status | uppercase}}\n \n \n {{message.status | uppercase}}\n \n \n {{message.status | uppercase}}\n \n \n \n \n {{message.status | uppercase}}\n \n \n \n \n \n
        \n
        \n {{faxAttachment.name}}\n \n \n \n
        \n
        \n'),a.put("app/channels/fax/inbox/note/note.directive.html",'
        \n
        \n
        \n \n \n \n\n \n
        \n
        \n {{\'APPLICATION_ADD_BY\' | translate}}: {{message.User.fullname}}\n
        \n
        \n
        \n \n
        \n'),a.put("app/channels/fax/inbox/note/note.modal.html",'\n\n\n'),a.put("app/channels/fax/inbox/room/room.directive.html",'\n
        \n
        \n
        \n
        \n \n | \n #{{faxRoom.id}} {{faxRoom.status}}\n | \n {{faxRoom.contact}}\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 {{$item}}\n \n {{tag}}\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

        {{\'MESSAGE_FAX_ROOM_CLOSED\' | translate}}!

        \n

        \n {{\'MESSAGE_FAX_ROOM_CLOSED_DETAILS\' | translate}}.\n

        \n
        \n

        \n {{\'APPLICATION_DISPOSITION\' | translate}}: {{faxRoom.disposition}}\n

        \n

        \n {{\'APPLICATION_UPDATED_AT\' | translate}}: {{faxRoom.updatedAt | date:\'medium\'}} ()\n

        \n
        \n
        \n\n \n
        \n\n \n \n \n From: {{form.from}}, To: {{form.to[0].fax}}\n \n \n \n
        \n
        \n
        \n
        \n \n
        \n
        \n \n {{$select.selected.name}}\n \n
        \n \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n
        \n
        \n \n\n \n
        \n
        \n
        \n
        \n \n
        \n
        \n \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_TO_LIMIT\' | translate}}.\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
        {{ item.file.name | truncate: 5: \'...\': true}}{{ item.file.size/1024/1024|number:2 }} MB\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'), +a.put("app/channels/fax/inbox/status/status.modal.html",'\n\n\n'),a.put("app/channels/fax/inbox/view/account/list/list.html",'\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 {{$item}}\n \n {{tag}}\n \n \n
        \n
        \n
        \n \n
        \n
        \n \n \n \n\n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/fax/inbox/view/view.agents.modal.html",'\n\n\n'),a.put("app/channels/fax/inbox/view/view.html",'\n\n\n
        \n
        \n \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_AVAILABLE_ACCOUNTS\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_ACCOUNTS\' | translate}}\n

        \n
        \n
        \n\n
        \n \n
        \n
        \n
        \n

        Info! {{\'APPLICATION_NO_ACCOUNT_SELECTED\' | translate}}

        \n
        \n
        \n
        \n \n
        \n
        \n'),a.put("app/channels/fax/inbox/view/view.status.modal.html",'\n\n\n'),a.put("app/channels/fax/inbox/view/view.tags.modal.html",'\n\n\n'),a.put("app/channels/fax/queue/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/fax/queue/list/list.html",'\n\n\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_QUEUES\' | translate }} \n
        \n \n
        \n
        \n \n
        \n
        {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/fax/queue/view/view.agents.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_AGENTS\' | translate}}\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'),a.put("app/channels/fax/queue/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{queue.name}}\n
        \n \n
        \n \n\n \n \n \n
        \n \n
        \n \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/fax/queue/view/view.settings.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
        \n
        \n
        \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected | uppercase}}\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'),a.put("app/channels/fax/realtime/view/agent/agent.html",'\n
        \n
        \n \n
        \n \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/fax/realtime/view/agent/agent.modal.info.html",'\n\n\n'),a.put("app/channels/fax/realtime/view/agent/queue.modal.add.html",'\n\n\n'),a.put("app/channels/fax/realtime/view/application/application.html",'\n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/fax/realtime/view/view.html",'\n\n\n'),a.put("app/channels/mail/account/list/list.html",'\n\n\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_ACCOUNTS\' | translate }} \n
        \n \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/mail/account/view/action/list/list.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
        \n \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n
        \n
        \n'), +a.put("app/channels/mail/account/view/action/view/view.html",'\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_ACTION\' | translate }} \n
        \n
        \n
        \n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n
        \n \n
        \n \n \n {{$select.selected.fullname}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_AGENTS\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n\n
        \n \n
        \n \n \n {{$select.selected.key | translate }}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n \n
        \n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n
        \n
        \n \n
        \n
        to
        \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
        \n
        \n \n
        \n\n
        \n\n \n
        \n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/mail/account/view/action/wizard/wizard.html",'\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_ACTION\' | translate }} WIZARD \n
        \n
        \n
        \n \n \n\n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n \n {{$select.selected.fullname}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_AGENTS\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n\n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n
        \n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n
        \n \n
        \n \n \n {{$select.selected.key | translate }}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n\n \n
        \n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n
        \n
        \n \n
        \n
        to
        \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
        \n
        \n \n
        \n\n
        \n\n \n
        \n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n\n \n\n
        \n
        \n \n

        {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

        \n \n \n
        \n
        \n
        \n
        \n \n
        \n
        \n\n'), +a.put("app/channels/mail/account/view/disposition/modal/add.modal.html",'\n\n\n'),a.put("app/channels/mail/account/view/disposition/view/view.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_DISPOSITIONS\' | translate}}\n
        \n
        \n \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n

        Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}

        \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'),a.put("app/channels/mail/account/view/hooks/view/view.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_HOOKS\' | translate}}\n
        \n \n
        \n
        \n
        \n \n
        \n
        \n
        \n
        \n \n \n {{$select.selected.name | uppercase}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n \n \n
        \n
        \n
        \n
        \n \n \n {{$select.selected.name | uppercase}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n
        \n
        \n \n \n
        \n
        \n
        \n
        \n \n \n {{$select.selected.name | uppercase}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/mail/account/view/other/view/view.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_OTHER\' | translate}}\n
        \n \n
        \n
        \n \n \n \n\n
        \n \n
        \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\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'),a.put("app/channels/mail/account/view/setting/view/view.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
        \n \n
        \n
        \n \n \n \n\n
        \n \n
        \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n
        \n\n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n\n \n \n \n\n
        \n
        \n \n\n \n
        \n \n
        \n\n \n {{$select.selected.name}}\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 {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\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

        ERROR

        \n \n
        \n\n
        \n

        CONNECTED

        \n
        \n\n
        \n

        TRYING...

        \n
        \n\n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n\n \n
        \n \n \n {{$select.selected}}\n \n
        \n
        \n
        \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\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

        ERROR

        \n \n
        \n\n
        \n

        CONNECTED

        \n
        \n\n
        \n

        TRYING...

        \n
        \n\n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n
        \n \n
        \n \n\n \n \n
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n'), +a.put("app/channels/mail/account/view/view.html",'\n
        \n \n\n
        \n'),a.put("app/channels/mail/account/wizard/wizard.html",'\n
        \n
        \n \n \n \n\n \n
        \n
        \n
        \n \n {{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD \n
        \n
        \n
        \n \n \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n \n
        \n
        \n\n \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n\n \n
        \n \n \n {{$select.selected}}\n \n
        \n
        \n
        \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\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 {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n
        \n \n
        \n \n \n \n \n
        \n
        \n\n \n

        {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

        \n \n \n
        \n
        \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/mail/inbox/message/info.modal.html",'\n\n\n'),a.put("app/channels/mail/inbox/message/message.directive.html",'
        \n
        \n
        \n From: \n {{message.from[0]}} \n
        \n To: \n {{to}}, \n
        \n Cc: \n {{cc}}, \n
        \n Bcc: \n {{bcc}}, \n
        \n
        \n
        \n {{\'APPLICATION_SENT_BY\' | translate}}: {{message.User.fullname}}\n {{\'APPLICATION_SENT_BY\' | translate}}: Cally ²\n \n \n \n
        \n
        \n
        \n \n \n {{message.status | uppercase}}\n \n \n {{message.status | uppercase}}\n \n \n {{message.status | uppercase}}\n \n \n \n \n {{message.status | uppercase}}\n \n \n \n \n \n
        \n
        \n
        {{\'MESSAGE_NO_AVAILABLE_TEXT\' | translate | lowercase}}
        \n
        \n
        \n {{mailAttachment.name}}\n \n ({{mailAttachment.size | prettyBytes}})\n \n \n \n \n \n \n \n
        \n
        \n'),a.put("app/channels/mail/inbox/note/note.directive.html",'
        \n
        \n
        \n \n \n \n\n \n
        \n
        \n {{\'APPLICATION_ADD_BY\' | translate}}: {{message.User.fullname}}\n
        \n
        \n
        \n \n
        \n'),a.put("app/channels/mail/inbox/note/note.modal.html",'\n\n\n'),a.put("app/channels/mail/inbox/room/room.directive.html",'\n
        \n
        \n
        \n
        \n \n | \n #{{mailRoom.id}} {{mailRoom.status}}\n | \n Ref: #{{mailRoom.ParentId}}\n | \n {{mailRoom.subject || \'No subject\'}}\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 {{$item}}\n \n {{tag}}\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

        {{\'MESSAGE_MAIL_ROOM_CLOSED\' | translate}}!

        \n

        \n {{\'MESSAGE_MAIL_ROOM_CLOSED_DETAILS\' | translate}}.\n

        \n
        \n

        \n {{\'APPLICATION_DISPOSITION\' | translate}}: {{mailRoom.disposition}}\n

        \n

        \n {{\'APPLICATION_UPDATED_AT\' | translate}}: {{mailRoom.updatedAt | date:\'medium\'}} ()\n

        \n
        \n
        \n \n
        \n \n \n \n From: {{form.from[0]}}, To: {{form.to[0].email}} (+{{form.to.length - 1}})\n \n \n \n
        \n
        \n
        \n
        \n \n
        \n
        \n \n {{$select.selected.name}}\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
        \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\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 {{\'APPLICATION_ATTACHMENTS\' | translate}}:\n {{ item.file.name }}{{ item.file.size/1024/1024|number:2 }} MB\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 No Results Found\n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n
        \n
        \n \n\n \n
        \n
        \n
        \n \n'+" {{'APPLICATION_WARNING' | translate}}! {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n \n
        \n
        \n \n\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n\n"), +a.put("app/channels/mail/inbox/status/status.modal.html",'\n\n\n'),a.put("app/channels/mail/inbox/view/account/list/list.html",'\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 {{$item}}\n \n {{tag}}\n \n \n
        \n
        \n
        \n \n
        \n
        \n \n \n \n\n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/mail/inbox/view/view.agents.modal.html",'\n\n\n'),a.put("app/channels/mail/inbox/view/view.html",'\n\n\n
        \n
        \n \n
        \n\n
        \n \n
        \n
        \n
        \n

        Info! {{\'APPLICATION_NO_ACCOUNT_SELECTED\' | translate}}

        \n
        \n
        \n
        \n \n
        \n\n
        \n'),a.put("app/channels/mail/inbox/view/view.tags.modal.html",'\n\n\n'),a.put("app/channels/mail/inbox/view/view.templates.modal.html",'\n\n\n'),a.put("app/channels/mail/queue/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/mail/queue/list/list.html",'\n\n\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_QUEUES\' | translate }} \n
        \n \n
        \n
        \n \n
        \n
        {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/mail/queue/view/view.agents.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_AGENTS\' | translate}}\n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}\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'),a.put("app/channels/mail/queue/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{queue.name}}\n
        \n \n
        \n \n\n \n \n \n
        \n \n
        \n \n \n
        \n
        \n \n
        \n
        \n \n'),a.put("app/channels/mail/queue/view/view.settings.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
        \n
        \n
        \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n\n \n
        \n \n \n
        \n \n\n \n
        \n \n \n {{$select.selected | uppercase}}\n \n
        \n
        \n
        \n
        \n \n\n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/mail/realtime/view/agent/agent.html",'\n
        \n
        \n \n
        \n \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/mail/realtime/view/agent/agent.modal.info.html",'\n\n\n'),a.put("app/channels/mail/realtime/view/agent/queue.modal.add.html",'\n\n\n'),a.put("app/channels/mail/realtime/view/application/application.html",'\n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/mail/realtime/view/view.html",'\n\n\n'),a.put("app/channels/mail/realtime/view/view.queue.html",'\n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/openchannel/account/list/list.html",'\n\n\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_ACCOUNTS\' | translate }} \n
        \n \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/openchannel/account/view/action/list/list.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
        \n \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n
        \n
        \n'), +a.put("app/channels/openchannel/account/view/action/view/view.html",'\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_ACTION\' | translate }} \n
        \n
        \n
        \n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n
        \n \n
        \n \n \n {{$select.selected.fullname}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n \n
        \n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n
        \n
        \n \n
        \n
        to
        \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
        \n
        \n \n
        \n\n
        \n\n \n
        \n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/openchannel/account/view/action/wizard/wizard.html",'\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_ACTION\' | translate }} WIZARD \n
        \n
        \n
        \n \n \n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n
        \n \n
        \n \n \n {{$select.selected.fullname}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n \n
        \n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n
        \n
        \n \n
        \n
        to
        \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
        \n
        \n \n
        \n\n
        \n\n \n
        \n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n\n \n
        \n
        \n \n

        {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

        \n \n \n
        \n
        \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/openchannel/account/view/api/view/view.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_API\' | translate}}\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'),a.put("app/channels/openchannel/account/view/disposition/modal/add.modal.html",'\n\n\n'),a.put("app/channels/openchannel/account/view/disposition/view/view.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_DISPOSITIONS\' | translate}}\n
        \n
        \n \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n

        Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}

        \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'),a.put("app/channels/openchannel/account/view/hooks/view/view.html",'
        \n
        \n
        \n \n
        \n
        \n \n
        \n
        \n
        \n
        \n \n \n {{$select.selected.name | uppercase}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n
        \n
        \n \n\n \n
        \n
        \n
        \n
        \n \n \n {{$select.selected.name | uppercase}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n \n
        \n
        \n \n \n
        \n
        \n
        \n
        \n \n \n {{$select.selected.name | uppercase}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n
        \n
        \n \n \n
        \n
        \n
        \n
        \n \n \n {{$select.selected.name | uppercase}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n'), +a.put("app/channels/openchannel/account/view/setting/view/view.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
        \n \n
        \n
        \n
        \n \n
        \n
        \n \n
        \n \n \n
        \n \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n
        \n\n \n {{$select.selected.name}}\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 {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n\n \n \n \n \n \n \n\n \n
        \n \n \n \n {{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/openchannel/account/view/view.html",'\n
        \n \n\n
        \n'),a.put("app/channels/openchannel/account/wizard/wizard.html",'\n
        \n
        \n \n \n \n\n \n
        \n
        \n
        \n \n {{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD \n
        \n
        \n
        \n \n \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n \n
        \n \n \n \n {{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n
        \n \n

        {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

        \n \n \n
        \n
        \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/openchannel/inbox/message/info.modal.html",'\n\n\n'),a.put("app/channels/openchannel/inbox/message/message.html",'
        \n
        \n
        \n \n
        \n
        \n From: {{Message.from}} \n
        \n
        \n
        \n
        \n To: {{Message.to}} \n
        \n
        \n
        \n
        \n Name: {{Message.name}}\n
        \n
        \n
        \n
        \n Phone: {{Message.phone}}\n
        \n
        \n
        \n
        \n Email: {{Message.email}}\n
        \n
        \n
        \n
        \n {{\'APPLICATION_SENT_BY\' | translate}}: {{Message.User.fullname}}\n
        \n
        \n
        \n \n \n {{Message.status | uppercase}}\n \n \n {{Message.status | uppercase}}\n \n \n {{Message.status | uppercase}}\n \n \n {{Message.status | uppercase}}\n \n \n {{Message.status | uppercase}}\n \n \n {{Message.status | uppercase}}\n \n
        \n
        \n\n \n
        \n
        \n \n \n
        \n'),a.put("app/channels/openchannel/inbox/room/room.directive.html",'\n\n
        \n
        \n
        \n
        \n \n | \n #{{Room.id}} {{Room.status}}\n | \n Ref: #{{Room.ParentId}}\n
        \n
        \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n \n \n \n
        \n
        \n \n {{$item}}\n \n {{tag}}\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

        Info! {{\'MESSAGE_ROOM_CLOSED\' | translate}}

        \n

        \n {{\'MESSAGE_ROOM_CLOSED_DETAILS\' | translate}}.\n

        \n
        \n

        \n {{\'APPLICATION_DISPOSITION\' | translate}}: {{Room.disposition}}\n

        \n

        \n {{\'APPLICATION_UPDATED_AT\' | translate}}: {{Room.updatedAt | date:\'medium\'}} ()\n

        \n
        \n
        \n \n
        \n\n \n
        \n
        \n
        \n
        \n \n
        \n
        \n \n {{$select.selected.name}}\n \n
        \n \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n
        \n
        \n \n \n
        \n\n
        \n
        \n
        \n \n
        \n
        \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n
        \n
        \n \n \n
        \n
        \n
        \n \n \n \n
        \n
        \n \n \n
        \n No Results Found\n
        \n
        \n
        \n\n
        \n \n \n
        \n
        \n \n \n'+" {{'APPLICATION_WARNING' | translate}}! {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n \n
        \n
        \n\n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n\n"),a.put("app/channels/openchannel/inbox/view/account/list/list.html",'\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 {{$item}}\n \n {{tag}}\n \n \n
        \n
        \n
        \n \n
        \n
        \n \n \n \n\n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'), +a.put("app/channels/openchannel/inbox/view/view.agents.modal.html",'\n\n\n'),a.put("app/channels/openchannel/inbox/view/view.html",'\n\n\n\n
        \n
        \n \n
        \n\n
        \n \n
        \n
        \n

        Info! {{\'APPLICATION_NO_ACCOUNT_SELECTED\' | translate}}

        \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/openchannel/inbox/view/view.status.modal.html",'\n\n\n'),a.put("app/channels/openchannel/inbox/view/view.tags.modal.html",'\n\n\n'),a.put("app/channels/openchannel/queue/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/openchannel/queue/list/list.html",'\n\n\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_QUEUES\' | translate }} \n
        \n \n
        \n
        \n \n
        \n
        {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/openchannel/queue/view/view.agents.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_AGENTS\' | translate}}\n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}\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'),a.put("app/channels/openchannel/queue/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{queue.name}}\n
        \n \n
        \n \n\n \n \n \n
        \n \n
        \n \n \n
        \n
        \n \n
        \n
        \n \n'),a.put("app/channels/openchannel/queue/view/view.settings.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
        \n
        \n
        \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n\n \n
        \n \n \n
        \n \n\n \n
        \n \n \n {{$select.selected.toUpperCase()}}\n \n
        \n
        \n
        \n
        \n \n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/openchannel/realtime/view/agent/agent.html",'\n
        \n
        \n \n
        \n \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/openchannel/realtime/view/agent/agent.modal.info.html",'\n\n\n'),a.put("app/channels/openchannel/realtime/view/agent/queue.modal.add.html",'\n\n\n'),a.put("app/channels/openchannel/realtime/view/application/application.html",'\n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/openchannel/realtime/view/view.html",'\n\n\n'),a.put("app/channels/openchannel/realtime/view/view.queue.html",'\n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/realtime/view/agent/agent.html",'\n
        \n
        \n \n
        \n \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/realtime/view/agent/agent.modal.info.html",'\n\n\n'),a.put("app/channels/realtime/view/agent/queue.modal.add.html",'\n\n\n'),a.put("app/channels/realtime/view/view.html",'\n\n\n'),a.put("app/channels/sms/account/list/list.html",'\n\n\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_ACCOUNTS\' | translate }} \n
        \n \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/sms/account/view/action/list/list.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
        \n \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n
        \n
        \n'), +a.put("app/channels/sms/account/view/action/view/view.html",'\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_ACTION\' | translate }} \n
        \n
        \n
        \n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n
        \n \n
        \n \n \n {{$select.selected.fullname}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n
        \n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n\n \n
        \n \n
        \n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n
        \n
        \n \n
        \n
        to
        \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
        \n
        \n \n
        \n\n
        \n\n \n
        \n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/sms/account/view/action/wizard/wizard.html",'\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_ACTION\' | translate }} WIZARD \n
        \n
        \n
        \n \n \n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n \n {{$select.selected.fullname}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_AGENTS\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n\n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n\n
        \n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n\n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n\n \n
        \n \n
        \n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n
        \n
        \n \n
        \n
        to
        \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
        \n
        \n \n
        \n\n
        \n\n \n
        \n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n\n \n
        \n
        \n \n

        {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

        \n \n \n
        \n
        \n
        \n
        \n \n
        \n
        \n\n'), +a.put("app/channels/sms/account/view/api/view/view.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_API\' | translate}}\n
        \n
        \n
        \n
        \n \n
        \n \n
        \n
        \n \n

        \n Copy the following url and insert it into your {{account.type}} account settings to receive SMS.\n Detail\n

        \n
        \n
        \n
        \n
        \n \n
        \n
        \n \n \n
        \n

        \n \n \n
        \n
        \n \n

        \n Copy the following url and insert it into your {{account.type}} account settings to receive delivery report.\n Detail\n

        \n
        \n
        \n
        \n
        \n \n
        \n
        \n \n \n
        \n
        \n \n
        \n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/sms/account/view/disposition/modal/add.modal.html",'\n\n\n'),a.put("app/channels/sms/account/view/disposition/view/view.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_DISPOSITIONS\' | translate}}\n
        \n
        \n \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n

        Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}

        \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'),a.put("app/channels/sms/account/view/hooks/view/view.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_HOOKS\' | translate}}\n
        \n \n
        \n
        \n
        \n \n
        \n
        \n \n
        \n
        \n \n \n {{$select.selected.name | uppercase}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n \n \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n\n \n
        \n
        \n \n \n
        \n
        \n \n
        \n
        \n \n \n {{$select.selected.name | uppercase}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n\n \n \n
        \n
        \n \n \n
        \n
        \n
        \n
        \n \n \n {{$select.selected.name | uppercase}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n \n
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/sms/account/view/setting/view/view.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
        \n \n
        \n
        \n
        \n \n
        \n
        \n \n
        \n \n \n
        \n \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n
        \n\n \n {{$select.selected.name}}\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 {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n \n \n
        \n \n \n {{$select.selected | uppercase}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n \n {{ \'DESCRIPTION_PHONE_NUMBER\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n \n
        \n \n \n \n {{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/sms/account/view/view.html",'\n
        \n \n\n
        \n'), +a.put("app/channels/sms/account/view/view.settings.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
        \n \n
        \n
        \n
        \n \n
        \n
        \n \n
        \n \n \n
        \n \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n
        \n\n \n {{$select.selected.name}}\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 {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n\n \n\n
        \n \n \n\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n\n
        \n \n \n {{$select.selected | uppercase}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n \n {{ \'DESCRIPTION_PHONE_NUMBER\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n
        \n
        \n \n Copy the following url and insert it into your {{account.type}} account settings to receive sms.\n Detail\n \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n \n \n
        \n
        \n \n \n
        \n
        \n
        \n Copy the following url and insert it into your {{account.type}} account settings to receive delivery status.\n Detail\n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n \n \n
        \n
        \n \n \n
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/sms/account/wizard/wizard.html",'\n
        \n
        \n \n \n \n\n \n
        \n
        \n
        \n \n {{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD \n
        \n
        \n
        \n \n \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n \n\n
        \n \n \n {{$select.selected | uppercase}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected | uppercase}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n \n {{ \'DESCRIPTION_PHONE_NUMBER\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n \n {{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n
        \n \n

        {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

        \n \n \n
        \n
        \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/sms/inbox/room/room.directive.html",'\n\n
        \n
        \n
        \n
        \n \n | \n #{{SmsRoom.id}} {{SmsRoom.status}}\n | \n Ref: #{{SmsRoom.ParentId}}\n
        \n
        \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n \n \n \n
        \n
        \n \n {{$item}}\n \n {{tag}}\n \n \n
        \n
        \n
        \n \n
        \n
        \n\n
        \n
          \n
        • \n
          \n \n \n
          \n \n
        • \n
        \n
        \n
        \n
        \n
        \n

        Info! {{\'MESSAGE_SMS_ROOM_CLOSED\' | translate}}

        \n

        \n {{\'MESSAGE_SMS_ROOM_CLOSED_DETAILS\' | translate}}.\n

        \n
        \n

        \n {{\'APPLICATION_DISPOSITION\' | translate}}: {{SmsRoom.disposition}}\n

        \n

        \n {{\'APPLICATION_UPDATED_AT\' | translate}}: {{SmsRoom.updatedAt | date:\'medium\'}} ()\n

        \n
        \n
        \n \n
        \n\n \n
        \n
        \n
        \n
        \n \n
        \n
        \n \n {{$select.selected.name}}\n \n
        \n \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n
        \n
        \n \n \n
        \n\n
        \n
        \n
        \n \n
        \n
        \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n
        \n
        \n
        \n \n \n
        \n
        \n
        \n \n \n \n
        \n
        \n \n \n
        \n No Results Found\n
        \n
        \n
        \n\n
        \n \n \n
        \n
        \n \n \n Max 160 chars\n \n'+" {{'APPLICATION_WARNING' | translate}}! {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n \n
        \n
        \n\n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n\n"), +a.put("app/channels/sms/inbox/sms/info.modal.html",'\n\n\n'),a.put("app/channels/sms/inbox/sms/sms.html",'
        \n
        \n
        \n From: \n [{{smsMessage.from}}]\n
        \n To: \n [{{smsMessage.to}}]\n
        \n
        \n
        \n {{\'APPLICATION_SENT_BY\' | translate}}: {{smsMessage.User.fullname}}\n {{\'APPLICATION_SENT_BY\' | translate}}: Cally ²\n \n \n
        \n
        \n\n
        \n \n \n {{smsMessage.status | uppercase}}\n \n \n {{smsMessage.status | uppercase}}\n \n \n {{smsMessage.status | uppercase}}\n \n \n {{smsMessage.status | uppercase}}\n \n \n {{smsMessage.status | uppercase}}\n \n \n {{smsMessage.status | uppercase}}\n \n
        \n \n
        \n\n \n
        \n
        \n \n\n
        \n'),a.put("app/channels/sms/inbox/view/account/list/list.html",'\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 {{$item}}\n \n {{tag}}\n \n \n
        \n
        \n
        \n \n
        \n
        \n \n \n \n\n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/sms/inbox/view/view.agents.modal.html",'\n\n\n'),a.put("app/channels/sms/inbox/view/view.html",'\n\n\n\n
        \n
        \n \n
        \n\n
        \n \n
        \n
        \n

        Info! {{\'APPLICATION_NO_ACCOUNT_SELECTED\' | translate}}

        \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/sms/inbox/view/view.status.modal.html",'\n\n\n'),a.put("app/channels/sms/inbox/view/view.tags.modal.html",'\n\n\n'),a.put("app/channels/sms/inbox/view/view.templates.modal.html",'\n\n\n'),a.put("app/channels/sms/queue/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/sms/queue/list/list.html",'\n\n\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_QUEUES\' | translate }} \n
        \n \n
        \n
        \n \n
        \n
        {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/sms/queue/view/view.agents.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_AGENTS\' | translate}}\n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}\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'),a.put("app/channels/sms/queue/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{queue.name}}\n
        \n \n
        \n \n\n \n \n \n
        \n \n
        \n \n \n
        \n
        \n \n
        \n
        \n \n'),a.put("app/channels/sms/queue/view/view.settings.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
        \n
        \n
        \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected | uppercase}}\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'),a.put("app/channels/sms/realtime/view/agent/agent.html",'\n
        \n
        \n \n
        \n \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/sms/realtime/view/agent/agent.modal.info.html",'\n\n\n'),a.put("app/channels/sms/realtime/view/agent/queue.modal.add.html",'\n\n\n'),a.put("app/channels/sms/realtime/view/application/application.html",'\n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/sms/realtime/view/view.html",'\n\n\n'), +a.put("app/channels/sms/realtime/view/view.queue.html",'\n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/chanspy/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/voice/chanspy/list/list.html",'\n
        \n
        \n \n\n \n
        \n
        \n
        \n \n {{ \'APPLICATION_CHANSPY\' | translate }} \n
        \n
        \n \n
        \n \n
        \n
        \n
        \n
        \n \n
        \n
        {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/chanspy/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{chanspy.name}}\n
        \n \n
        \n \n\n \n \n \n
        \n \n
        \n \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/chanspy/view/view.settings.html",'
        \n
        \n
        \n
        \n
        \n \n {{ \'APPLICATION_CHANSPY\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
        \n \n
        \n\n
        \n
        \n \n
        \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$item.value}}: {{$item.name | translate}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n
        \n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n \n
        \n
        \n \n\n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/voice/context/list/create.modal.html",'\n\n\n'),a.put("app/channels/voice/context/list/list.html",'\n
        \n
        \n \n\n \n
        \n
        \n
        \n \n {{ \'APPLICATION_CONTEXTS\' | translate }} \n
        \n \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/context/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{context.name}}\n
        \n
        \n \n\n \n \n \n
        \n \n
        \n \n \n
        \n
        \n \n
        \n
        \n \n'),a.put("app/channels/voice/context/view/view.settings.html",'
        \n
        \n
        \n
        \n
        \n \n {{ \'APPLICATION_CONTEXT\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
        \n \n
        \n\n
        \n
        \n \n
        \n
        \n\n \n
        \n \n \n \n {{ \'DESCRIPTION_CANT_EDIT_NAME\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n \n
        \n
        \n \n\n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/voice/disposition/list/list.html",'\n
        \n
        \n \n\n \n
        \n
        \n
        \n \n {{ \'APPLICATION_DISPOSITIONS\' | translate }} \n
        \n
        \n \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n

        Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}

        \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'),a.put("app/channels/voice/disposition/list/modal/add.modal.html",'\n\n\n'),a.put("app/channels/voice/moh/list/create.modal.html",'\n\n\n'),a.put("app/channels/voice/moh/list/list.html",'\n
        \n
        \n \n\n \n
        \n
        \n
        \n \n {{ \'APPLICATION_MOHS\' | translate }} \n
        \n \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'), +a.put("app/channels/voice/moh/view/view.addFiles.html",'\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_MOH\' | translate }} {{ \'APPLICATION_ADD_FILES\' | translate }} \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_SOUNDS\' | translate}}\n

        \n
        \n
        \n\n \n
        \n \n \n {{$item.display_name}}\n \n {{sound.display_name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/moh/view/view.audios.html",'
        \n
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_AUDIOS\' | translate}}\n
        \n \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_FOLDER_DOES_NOT_EXIST\' | translate }}\n

        \n
        \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
        {{ \'APPLICATION_NAME\' | translate }}{{ \'APPLICATION_PREVIEW\' | translate }}{{ \'APPLICATION_ACTIONS\' | translate }}
        {{audiofile}}\n \n \n {{ \'APPLICATION_DELETE\' | translate }}\n \n
        \n {{ \'MESSAGE_NO_AUDIOFILES_AVAILABLE\' | translate }}\n
        \n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/voice/moh/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{moh.name}}\n
        \n
        \n \n\n \n \n \n
        \n \n
        \n \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/moh/view/view.settings.html",'
        \n
        \n
        \n
        \n
        \n \n {{ \'APPLICATION_MOH_CLASS\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
        \n \n
        \n\n
        \n
        \n \n
        \n
        \n\n \n
        \n \n \n
        \n \n\n \n
        \n \n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(sort.name)}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/voice/queue/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/voice/queue/list/list.html",'\n
        \n
        \n \n\n \n
        \n
        \n
        \n \n {{ \'APPLICATION_QUEUES\' | translate }}\n
        \n \n
        \n
        \n \n
        \n
        {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/queue/view/view.agents.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_AGENTS\' | translate}}\n
        \n
        \n
        \n

        Warning!

        {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}

        \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'),a.put("app/channels/voice/queue/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{queue.name}}\n
        \n
        \n \n\n \n \n \n
        \n \n
        \n \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/queue/view/view.settings.html",'
        \n
        \n
        \n
        \n
        \n \n {{ \'APPLICATION_QUEUE_SETTINGS\' | translate}}\n
        \n \n
        \n\n
        \n
        \n \n
        \n
        \n
        \n
        \n \n
        \n \n \n {{$select.selected.toUpperCase()}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_STRATEGY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_VOICE_MOH\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{ \'DESCRIPTION_QUEUE_TIMEOUT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{ \'DESCRIPTION_QUEUE_MAXLEN\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{ \'DESCRIPTION_QUEUE_RETRY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n
        \n \n
        \n \n \n \n {{ \'DESCRIPTION_QUEUE_WRAPUPTIME\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{ \'DESCRIPTION_QUEUE_WEIGHT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$item}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_JOINEMPTY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$item}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_LEAVEWHENEMPTY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.display_name}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_ANNOUNCE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\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 {{$item.display_name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_SOUNDS\' | translate}}\n

        \n
        \n \n {{ \'DESCRIPTION_QUEUE_PERIODIC_ANNOUNCE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n
        \n
        \n

        {{\'APPLICATION_SETTINGS\' | translate}}

        \n \n
        \n \n \n \n {{ \'DESCRIPTION_QUEUE_ANNOUNCE_FREQUENCY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{ \'DESCRIPTION_QUEUE_MIN_ANNOUNCE_FREQUENCY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{ \'DESCRIPTION_QUEUE_PERIODIC_ANNOUNCE_FREQUENCY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected | capitalize}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_RANDOM_PERIODIC_ANNOUNCE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected | capitalize}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_ANNOUNCE_HOLDTIME\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected | capitalize}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_ANNOUNCE_POSITION\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{ \'DESCRIPTION_QUEUE_ANNOUNCE_POSITION_LIMIT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected | capitalize}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_REPORTHOLDTIME\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n
        \n

        {{\'APPLICATION_SOUNDS\' | translate}}

        \n \n
        \n \n \n {{$select.selected.display_name}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_REPORTHOLD\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.display_name}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_YOUARENEXT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.display_name}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_THEREARE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.display_name}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_CALLSWAITING\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.display_name}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_HOLDTIME\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.display_name}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_MINUTES\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.display_name}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_MINUTE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.display_name}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_SECONDS\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.display_name}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_THANKYOU\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n
        \n\n \n
        \n
        \n \n \n
        \n
        \n\n
        \n
        \n\n \n
        \n \n \n {{$select.selected | capitalize}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_AUTOPAUSE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected | capitalize}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_RINGINUSE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{ \'DESCRIPTION_QUEUE_MEMBER_DELAY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n
        \n \n \n {{ \'DESCRIPTION_ACW\' | translate }}\n \n \n {{\'APPLICATION_ACW\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n
        \n \n \n {{ \'DESCRIPTION_SETINTERFACEVAR\' | translate }} wiki)\n \n \n {{\'APPLICATION_SETINTERFACEVAR\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n
        \n \n \n {{ \'DESCRIPTION_SETQUEUEVAR\' | translate }} wiki)\n \n \n {{\'APPLICATION_SETQUEUEVAR\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n
        \n\n \n
        \n \n \n {{$select.selected | capitalize}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_TIMEOUTRESTART\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_MONITOR_FORMAT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_QUEUE_VOICE_CONTEXT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{ \'DESCRIPTION_ACW_TIMEOUT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n
        \n \n \n {{ \'DESCRIPTION_SETQUEUEENTRYVAR\' | translate }} wiki)\n \n \n {{\'APPLICATION_SETQUEUEENTRYVAR\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n
        \n\n \n
        \n
        \n \n\n
        \n
        \n
        \n
        \n
        \n'), +a.put("app/channels/voice/realtime/view/abandoned/abandoned.html",'\n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/realtime/view/agent/agent.html",'\n
        \n
        \n \n
        \n \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/realtime/view/agent/agent.modal.info.html",'\n\n\n'),a.put("app/channels/voice/realtime/view/agent/queue.modal.add.html",'\n\n\n'),a.put("app/channels/voice/realtime/view/outbound/outbound.html",'\n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/realtime/view/parameter/parameter.html",'\n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/realtime/view/queue/queue.html",'\n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/realtime/view/queuecalls/queuecalls.html",'\n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/realtime/view/telephone/telephone.html",'\n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/realtime/view/telephone/telephone.modal.info.html",'\n\n\n'),a.put("app/channels/voice/realtime/view/view.html",'\n\n\n'),a.put("app/channels/voice/recording/list/list.html",'\n
        \n
        \n \n\n \n
        \n
        \n
        \n \n {{ \'APPLICATION_RECORDINGS\' | translate }} \n
        \n \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/route/inbound/list/create.modal.html",'\n\n\n\n'),a.put("app/channels/voice/route/inbound/list/list.html",'\n
        \n
        \n \n\n \n
        \n
        \n
        \n \n {{ \'APPLICATION_INBOUND\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }} \n
        \n \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/route/inbound/view/view.applications.html",'
        \n
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
        \n \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/voice/route/inbound/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{route.exten}}\n
        \n \n
        \n \n\n \n \n \n
        \n \n
        \n \n \n
        \n
        \n \n
        \n
        \n\n"),a.put("app/channels/voice/route/inbound/view/view.settings.html",'
        \n
        \n
        \n
        \n
        \n \n {{ \'APPLICATION_INBOUND\' | translate}} {{ \'APPLICATION_ROUTE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
        \n \n
        \n\n
        \n
        \n \n
        \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n\n \n
        \n
        \n \n\n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/voice/route/internal/list/create.modal.html",'\n\n\n\n'),a.put("app/channels/voice/route/internal/list/list.html",'\n
        \n
        \n \n\n \n
        \n
        \n
        \n \n {{ \'APPLICATION_INTERNAL\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }} \n
        \n \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/route/internal/view/view.applications.html",'
        \n
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
        \n \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/voice/route/internal/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{route.exten}}\n
        \n \n
        \n \n\n \n \n \n
        \n \n
        \n \n \n
        \n
        \n \n \n
        \n
        \n\n"), +a.put("app/channels/voice/route/internal/view/view.settings.html",'
        \n
        \n
        \n
        \n
        \n \n {{ \'APPLICATION_INTERNAL\' | translate}} {{ \'APPLICATION_ROUTE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
        \n \n
        \n\n
        \n
        \n \n
        \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n\n \n
        \n
        \n \n\n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/voice/route/outbound/list/create.modal.html",'\n\n\n\n'),a.put("app/channels/voice/route/outbound/list/list.html",'\n
        \n
        \n \n\n \n
        \n
        \n
        \n \n {{ \'APPLICATION_OUTBOUND\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }} \n
        \n \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/route/outbound/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{route.exten}}\n
        \n \n
        \n \n\n \n \n \n
        \n \n
        \n \n \n
        \n
        \n \n \n
        \n
        \n\n"),a.put("app/channels/voice/route/outbound/view/view.route.html",'
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_NEW_ROUTE\' | translate }} WIZARD \n
        \n
        \n
        \n
        \n {{(main.app.name | translate) || \'Application\'}}\n
        \n \n \n
        \n \n \n
        \n \n \n {{$select.selected.name | translate}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_TRUNKS\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \' placeholder=\'"name" \' class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n \n {{ \'DESCRIPTION_OUTBOUND_CALLERID\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{ \'DESCRIPTION_OUTBOUND_PREFIX\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n \n
        \n
        \n \n
        \n \n \n \n
        \n \n \n {{$select.selected.name | translate}}\n \n {{$translate.instant(intType.name)}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n \n
        \n \n
        \n
        \n
        to
        \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected.name | translate}}\n \n {{weekDay.name | translate}}\n \n \n to\n \n {{$select.selected.name | translate}}\n \n {{weekDay.name | translate}}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}\n \n {{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n \n \n to\n \n {{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}\n \n {{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected.name | translate}}\n \n {{month.name | translate}}\n \n \n to\n \n {{$select.selected.name | translate}}\n \n {{month.name | translate}}\n \n \n
        \n
        \n \n
        \n\n
        \n\n \n
        \n \n \n {{$select.selected.name | translate}}\n \n {{interval.name | translate}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n\n \n \n
        \n
        \n\n \n

        {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

        \n \n \n
        \n
        \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/route/outbound/view/view.routeSettings.html",'
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_APPLICATION_SETTINGS\' | translate }} WIZARD \n
        \n
        \n
        \n \n
        \n {{(main.app.name | translate) || \'Application\'}}\n
        \n \n
        \n \n
        \n\n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_TRUNKS\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \' placeholder=\'"name" \' class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]">\n \n {{ \'DESCRIPTION_OUTBOUND_CALLERID\' | translate }} "name" <number>\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{ \'DESCRIPTION_OUTBOUND_PREFIX\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n \n
        \n
        \n \n
        \n \n \n \n
        \n \n \n {{$select.selected.name | translate}}\n \n {{intType.name | translate}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n \n
        \n \n
        \n
        \n
        to
        \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected.name | translate}}\n \n {{weekDay.name | translate}}\n \n \n to\n \n {{$select.selected.name | translate}}\n \n {{weekDay.name | translate}}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}\n \n {{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n \n \n to\n \n {{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}\n \n {{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected.name | translate}}\n \n {{month.name | translate}}\n \n \n to\n \n {{$select.selected.name | translate}}\n \n {{month.name | translate}}\n \n \n
        \n
        \n \n
        \n\n
        \n\n \n
        \n \n \n {{$select.selected.name | translate}}\n \n {{interval.name | translate}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n \n
        \n
        \n\n \n

        {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

        \n \n \n
        \n
        \n
        \n
        \n \n
        \n
        \n\n'), +a.put("app/channels/voice/route/outbound/view/view.routes.html",'
        \n
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
        \n \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/voice/route/outbound/view/view.settings.html",'
        \n
        \n
        \n
        \n
        \n \n {{ \'APPLICATION_OUTBOUND\' | translate}} {{ \'APPLICATION_ROUTE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
        \n \n
        \n\n
        \n
        \n \n
        \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n \n
        \n \n\n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n
        \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n\n \n
        \n
        \n \n\n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/voice/route/view.application.html",'\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_NEW_APPLICATION\' | translate }} WIZARD \n
        \n
        \n
        \n \n
        \n {{(main.app.name | translate) || \'Application\'}}\n
        \n \n
        \n \n \n\n \n \n
        \n \n \n {{$select.selected.name | translate}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.display_name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_SOUNDS\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n
        \n \n
        \n \n \n {{$select.selected.display_name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_SOUNDS\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{ \'APPLICATION_WARNING\' | translate }}! {{ \'MESSAGE_REQUIRED_FIELD\' | translate }}.\n \n
        \n \n\n \n
        \n \n \n \n {{ \'APPLICATION_WARNING\' | translate }}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n

        \n

        \n {{ \'APPLICATION_GO_TO\' | translate }} {{ \'APPLICATION_TRUNKS\' | translate }}\n

        \n
        \n \n {{ \'APPLICATION_WARNING\' | translate }}! {{ \'MESSAGE_REQUIRED_FIELD\' | translate }}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n \n \n
        \n \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_PROJECTS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_PROJECTS\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n \n
        \n \n \n {{$select.selected.name | translate}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n \n
        \n \n \n {{$select.selected.mailbox}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_VOICEMAILS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_VOICEMAILS\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n \n
        \n
        \n \n
        \n \n \n \n
        \n \n \n {{$select.selected.name | translate}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n \n
        \n \n
        \n
        \n
        to
        \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected.name | translate}}\n \n {{weekDay.name | translate}}\n \n \n to\n \n {{$select.selected.name | translate}}\n \n {{weekDay.name | translate}}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}\n \n {{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n \n \n to\n \n {{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}\n \n {{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected.name | translate}}\n \n {{month.name | translate}}\n \n \n to\n \n {{$select.selected.name | translate}}\n \n {{month.name | translate}}\n \n \n
        \n
        \n \n
        \n\n
        \n\n \n
        \n \n \n {{$select.selected.name | translate}}\n \n {{interval.name | translate}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n \n
        \n
        \n\n \n

        {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

        \n \n \n
        \n
        \n
        \n
        \n \n
        \n
        \n\n'), +a.put("app/channels/voice/route/view.applicationSettings.html",'\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_APPLICATION_SETTINGS\' | translate }} WIZARD \n
        \n
        \n
        \n \n
        \n {{(main.app.name | translate) || \'Application\'}}\n
        \n \n
        \n \n\n \n\n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.display_name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_SOUNDS\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n
        \n \n
        \n \n \n {{$select.selected.display_name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_SOUNDS\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n
        \n\n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_TRUNKS\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n \n \n
        \n \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_PROJECTS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_PROJECTS\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n \n \n\n
        \n
        \n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n \n
        \n \n \n {{$select.selected.name | translate}}\n \n {{hangupCause.name | translate}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n \n
        \n \n \n {{$select.selected.mailbox}}\n \n
        \n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_VOICEMAILS_AVAILABLE\' | translate }}\n

        \n

        \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_VOICEMAILS\' | translate}}\n

        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n \n
        \n
        \n\n
        \n \n \n \n
        \n \n \n {{$select.selected.name | translate}}\n \n {{intType.name | translate}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n \n
        \n \n
        \n
        \n
        to
        \n
        \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected.name | translate}}\n \n {{weekDay.name | translate}}\n \n \n to\n \n {{$select.selected.name | translate}}\n \n {{weekDay.name | translate}}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}\n \n {{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n \n \n to\n \n {{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}\n \n {{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n \n \n
        \n
        \n \n\n \n
        \n \n
        \n \n {{$select.selected.name | translate}}\n \n {{month.name | translate}}\n \n \n to\n \n {{$select.selected.name | translate}}\n \n {{month.name | translate}}\n \n \n
        \n
        \n \n
        \n\n
        \n\n \n
        \n \n \n {{$select.selected.name | translate}}\n \n {{interval.name | translate}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n
        \n \n \n
        \n
        \n\n\n

        {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

        \n \n \n
        \n
        \n
        \n
        \n\n
        \n
        \n\n'), +a.put("app/channels/voice/voicemail/list/list.html",'\n
        \n
        \n \n\n \n
        \n
        \n
        \n \n {{ \'APPLICATION_VOICEMAILS\' | translate }} \n
        \n \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/voicemail/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{voicemail.mailbox}}\n
        \n
        \n \n\n \n \n \n
        \n \n
        \n \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/channels/voice/voicemail/view/view.messages.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_MESSAGES\' | translate}}\n
        \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n
        \n
        \n'),a.put("app/channels/voice/voicemail/view/view.settings.html",'
        \n
        \n
        \n
        \n
        \n \n {{ \'APPLICATION_VOICEMAIL\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
        \n \n
        \n\n
        \n
        \n \n
        \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n \n {{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n
        \n \n \n
        \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\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 {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n
        \n \n\n
        \n
        \n
        \n
        \n
        \n'),a.put("app/channels/voice/voicemail/wizard/wizard.html",'
        \n \n \n \n\n \n
        \n
        \n
        \n \n {{ \'APPLICATION_VOICEMAIL\' | translate }} WIZARD \n
        \n
        \n
        \n \n \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n
        \n\n \n

        {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

        \n \n \n
        \n
        \n
        \n
        \n \n
        \n'),a.put("app/contactmanager/company/list/create.modal.html",'\n\n\n'), +a.put("app/contactmanager/company/list/list.html",'\n
        \n
        \n \n\n \n
        \n
        \n
        \n \n {{ \'APPLICATION_COMPANIES\' | translate }} \n
        \n
        \n \n
        \n \n
        \n \n
        \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/contactmanager/company/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{company.name}}\n
        \n \n
        \n \n\n \n \n \n
        \n \n
        \n \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/contactmanager/company/view/view.settings.html",'
        \n
        \n
        \n
        \n
        \n \n {{ \'APPLICATION_COMPANY\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
        \n \n
        \n\n
        \n
        \n \n
        \n
        \n
        \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n
        \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n
        \n
        \n \n
        \n
        \n \n
        \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n
        \n
        \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/contactmanager/contact/list/copy.modal.html",'\n\n\n'),a.put("app/contactmanager/contact/list/import.modal.html",'\n\n\n'), +a.put("app/contactmanager/contact/list/list.html",'\n
        \n
        \n \n\n \n
        \n
        \n
        \n \n {{ \'APPLICATION_CONTACTS\' | translate }} \n
        \n
        \n \n
        \n \n \n \n {{\'APPLICATION_IMPORT_FROM_CSV\' | translate}}\n \n \n
        \n \n
        \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/contactmanager/list/list/create.modal.html",'\n\n\n'),a.put("app/contactmanager/list/list/list.html",'\n
        \n
        \n \n\n \n
        \n
        \n
        \n \n {{ \'APPLICATION_LISTS\' | translate }} \n
        \n
        \n \n
        \n \n
        \n
        \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/contactmanager/list/view/create.modal.html",'\n\n\n'),a.put("app/contactmanager/list/view/view.agents.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_AGENTS\' | translate}}\n
        \n
        \n
        \n

        Warning!

        \n

        \n {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}\n

        \n
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n
        \n'),a.put("app/contactmanager/list/view/view.customFieldSettings.html",'
        \n
        \n
        \n
        \n
        \n \n {{ \'APPLICATION_CUSTOM_FIELD\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
        \n
        \n\n
        \n \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\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'),a.put("app/contactmanager/list/view/view.customFields.html",'
        \n
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_CUSTOM_FIELDS\' | translate}}\n
        \n
        \n \n
        \n \n
        \n
        \n
        \n
        \n \n
        \n
        {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/contactmanager/list/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{list.name}}\n
        \n \n
        \n \n\n \n \n \n
        \n \n
        \n \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/contactmanager/list/view/view.settings.html",'
        \n
        \n
        \n
        \n
        \n \n {{ \'APPLICATION_LIST\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
        \n \n
        \n\n
        \n
        \n \n
        \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n \n
        \n
        \n \n\n
        \n
        \n
        \n
        \n
        \n'),a.put("app/dashboard/chat/chat.html",'
        \n
        \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n \n  {{ \'APPLICATION_TODAY_STATS\' | translate }}\n \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{waiting || 0}}\n
        \n
        \n {{\'APPLICATION_DASHBOARD_WAITING_NEW\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{open || 0}}\n
        \n
        \n {{\'APPLICATION_DASHBOARD_OPEN\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{unmanaged || 0}}\n
        \n
        \n {{\'APPLICATION_UNMANAGED\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{closed || 0}}\n
        \n
        \n {{\'APPLICATION_DASHBOARD_CLOSED\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{abandoned || 0}}\n
        \n
        \n {{\'APPLICATION_DASHBOARD_ABANDONED\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{new+open+unmanaged+closed+abandoned || 0}}\n
        \n
        \n {{\'APPLICATION_TOTAL\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n \n \n \n
        \n
        \n \n  {{ \'APPLICATION_INTERACTION_STATS\' | translate }}\n \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{timeout || 0}}\n
        \n
        \n {{\'APPLICATION_TIMEOUT\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{waiting || 0}}\n
        \n
        \n {{\'APPLICATION_WAITING\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n\n
        \n
        \n'),a.put("app/dashboard/dashboard.html",'\n\n\n'),a.put("app/dashboard/fax/fax.html",'
        \n
        \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n \n  {{ \'APPLICATION_TODAY_STATS\' | translate }}\n \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{new || 0}}\n
        \n
        \n {{\'APPLICATION_DASHBOARD_NEW\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{open || 0}}\n
        \n
        \n {{\'APPLICATION_DASHBOARD_OPEN\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{pending || 0}}\n
        \n
        \n {{\'APPLICATION_DASHBOARD_PENDING\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{closed || 0}}\n
        \n
        \n {{\'APPLICATION_DASHBOARD_CLOSED\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{new+open+pending+closed || 0}}\n
        \n
        \n {{\'APPLICATION_TOTAL\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n \n \n \n
        \n
        \n \n  {{ \'APPLICATION_INTERACTION_STATS\' | translate }}\n \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{timeout || 0}}\n
        \n
        \n {{\'APPLICATION_TIMEOUT\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{waiting || 0}}\n
        \n
        \n {{\'APPLICATION_WAITING\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n\n
        \n
        \n'), +a.put("app/dashboard/mail/mail.html",'
        \n
        \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n \n  {{ \'APPLICATION_TODAY_STATS\' | translate }}\n \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{new || 0}}\n
        \n
        \n {{\'APPLICATION_DASHBOARD_NEW\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{open || 0}}\n
        \n
        \n {{\'APPLICATION_DASHBOARD_OPEN\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{pending || 0}}\n
        \n
        \n {{\'APPLICATION_DASHBOARD_PENDING\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{closed || 0}}\n
        \n
        \n {{\'APPLICATION_DASHBOARD_CLOSED\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{new+open+pending+closed || 0}}\n
        \n
        \n {{\'APPLICATION_TOTAL\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n \n \n \n
        \n
        \n \n  {{ \'APPLICATION_INTERACTION_STATS\' | translate }}\n \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{timeout || 0}}\n
        \n
        \n {{\'APPLICATION_TIMEOUT\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{waiting || 0}}\n
        \n
        \n {{\'APPLICATION_WAITING\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n\n
        \n
        \n'),a.put("app/dashboard/openchannel/openchannel.html",'
        \n
        \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n \n  {{ \'APPLICATION_TODAY_STATS\' | translate }}\n \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{new || 0}}\n
        \n
        \n {{\'APPLICATION_DASHBOARD_NEW\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{open || 0}}\n
        \n
        \n {{\'APPLICATION_DASHBOARD_OPEN\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{pending || 0}}\n
        \n
        \n {{\'APPLICATION_DASHBOARD_PENDING\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{closed || 0}}\n
        \n
        \n {{\'APPLICATION_DASHBOARD_CLOSED\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{new+open+pending+closed || 0}}\n
        \n
        \n {{\'APPLICATION_TOTAL\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n \n \n \n
        \n
        \n \n  {{ \'APPLICATION_INTERACTION_STATS\' | translate }}\n \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{timeout || 0}}\n
        \n
        \n {{\'APPLICATION_TIMEOUT\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{waiting || 0}}\n
        \n
        \n {{\'APPLICATION_WAITING\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n\n
        \n
        \n'),a.put("app/dashboard/sms/sms.html",'
        \n
        \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n \n  {{ \'APPLICATION_TODAY_STATS\' | translate }}\n \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{new || 0}}\n
        \n
        \n {{\'APPLICATION_DASHBOARD_NEW\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{open || 0}}\n
        \n
        \n {{\'APPLICATION_DASHBOARD_OPEN\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{pending || 0}}\n
        \n
        \n {{\'APPLICATION_DASHBOARD_PENDING\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{closed || 0}}\n
        \n
        \n {{\'APPLICATION_DASHBOARD_CLOSED\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{new+open+pending+closed || 0}}\n
        \n
        \n {{\'APPLICATION_TOTAL\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n \n \n \n
        \n
        \n \n  {{ \'APPLICATION_INTERACTION_STATS\' | translate }}\n \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{timeout || 0}}\n
        \n
        \n {{\'APPLICATION_TIMEOUT\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{waiting || 0}}\n
        \n
        \n {{\'APPLICATION_WAITING\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n\n
        \n
        \n'),a.put("app/dashboard/voice/voice.html",'
        \n
        \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n\n
        \n \n
        \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n \n
        \n
        {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
        \n
        \n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n {{ \'APPLICATION_INBOUND\' | translate }}{{ \'APPLICATION_TODAY_STATS\' | translate }}\n \n\n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{ voice.waiting || 0 }}\n
        \n
        \n {{\'APPLICATION_WAITING\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{ voice.active || 0 }}\n
        \n
        \n {{\'APPLICATION_ACTIVE\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{ voice.complete || 0 }}\n
        \n
        \n {{\'APPLICATION_ANSWERED\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{ voice.abandon || 0 }}\n
        \n
        \n {{\'APPLICATION_ABANDONED\' | translate}}\n
        \n
        \n
        \n
        \n
        \n\n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{ (voice.avgAnswerTime || 0) | secToTime | date:\'HH:mm:ss\' }}\n
        \n
        \n {{\'APPLICATION_AVG_ANSWER_TIME\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{ (voice.avgTalkTime || 0) | secToTime | date:\'HH:mm:ss\' }}\n
        \n
        \n {{\'APPLICATION_AVG_TALK_TIME\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{ (voice.answerRate || 0) | number:2}}\n
        \n
        \n {{\'APPLICATION_ANSWER_RATE\' | translate}} (%)\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{ (voice.abandonRate || 0) | number:2}}\n
        \n
        \n {{\'APPLICATION_ABANDON_RATE\' | translate}} (%)\n
        \n
        \n
        \n
        \n
        \n\n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{ voice.totalOffered || 0}}\n
        \n
        \n {{\'APPLICATION_TOTAL_OFFERED\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{ voice.unmanaged || 0 }}\n
        \n
        \n {{\'APPLICATION_UNMANAGED\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n\n
        \n \n {{ \'APPLICATION_OUTBOUND\' | translate }}{{ \'APPLICATION_TODAY_STATS\' | translate }}\n \n\n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{ voice.outbound.manualOutbound || 0 }}\n
        \n
        \n {{\'APPLICATION_MANUAL_OUTBOUND\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{ (voice.outbound.globalDuration || 0) | secToTime | date:\'HH:mm:ss\' }}\n
        \n
        \n {{\'APPLICATION_GLOBAL_DURATION\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{ voice.outbound.answered || 0 }}\n
        \n
        \n {{\'APPLICATION_ANSWERED\' | translate}}\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{ (voice.outbound.avgDuration || 0) | secToTime | date:\'HH:mm:ss\' }}\n
        \n
        \n {{\'APPLICATION_AVG_DURATION\' | translate}} (%)\n
        \n
        \n
        \n
        \n
        \n\n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n {{ (voice.outbound.answerRate || 0) | number:2 }}\n
        \n
        \n {{\'APPLICATION_ANSWER_RATE\' | translate}} (%)\n
        \n
        \n
        \n
        \n
        \n\n
        \n
        \n
        \n'),a.put("app/desk/list/list.html",'\n
        \n
        \n \n\n \n
        \n
        \n
        \n \n {{ \'APPLICATION_DESK_COM\' | translate }} \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 {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n \n \n \n \n
        \n
        \n
        \n
        {{ \'APPLICATION_NAME\' | translate }}{{ \'APPLICATION_EMAIL\' | translate }}{{ \'APPLICATION_REMOTE_ADDRESS\' | translate }}{{ \'APPLICATION_DESCRIPTION\' | translate }}{{ \'APPLICATION_ACTIONS\' | translate }}
        {{account.name}}{{account.username}}{{account.remoteUri}}{{account.description}}\n \n {{ \'APPLICATION_EDIT\' | translate }}\n \n \n {{ \'APPLICATION_CHECK\' | translate }}\n \n \n {{ \'APPLICATION_DELETE\' | translate }}\n \n
        \n No account available\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'), +a.put("app/desk/view/view.account.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_ACCOUNT\' | translate}}\n
        \n \n
        \n
        \n
        \n \n
        \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected | capitalize}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n
        \n \n\n
        \n
        \n
        \n
        \n
        \n'),a.put("app/desk/view/view.configuration.html",'
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_CONFIGURATION\' | translate }} WIZARD \n
        \n
        \n
        \n \n \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n
        \n \n\n \n
        \n
        \n\n \n

        {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

        \n \n \n
        \n
        \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/desk/view/view.configurationSettings.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}\n
        \n \n
        \n
        \n
        \n \n
        \n
        \n
        \n All following fields will be join by blank space:\n
        \n
        \n \n
        \n
        \n
        \n \n
        \n
        \n \n {{$select.selected | capitalize}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n
        \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n \n
        \n \n \n
        \n
        \n
        \n All following fields will be join by new line:\n
        \n
        \n \n
        \n
        \n
        \n \n
        \n \n
        \n \n {{$select.selected | ucfirst}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n \n
        \n
        \n \n {{$select.selected | capitalize}}\n \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n \n
        \n \n \n
        \n
        \n
        \n Add how to fill the fields present in your account:\n
        \n
        \n \n
        \n
        \n
        \n \n
        \n
        \n \n {{$select.selected.label}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n \n {{$select.selected}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n {{$select.selected | ucfirst}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n
        \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n \n
        \n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/desk/view/view.configurations.html",'
        \n
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_CONFIGURATIONS\' | translate}}\n
        \n \n
        \n
        \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
        {{\'APPLICATION_NAME\' | translate}}{{\'APPLICATION_DESCRIPTION\' | translate}}{{ \'APPLICATION_ACTIONS\' | translate }}
        {{configuration.name}}{{configuration.description}}\n \n {{ \'APPLICATION_SETTINGS\' | translate}}\n \n \n {{ \'APPLICATION_DELETE\' | translate }}\n \n
        \n No configuration available\n
        \n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/desk/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{account.name}}\n
        \n
        \n {{account.remoteUri}}\n
        \n
        \n \n \n \n \n
        \n \n
        \n \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/desk/wizard/wizard.html",'\n\n\n\n\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD \n
        \n
        \n
        \n \n \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n \n
        \n \n\n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_EXIST_DOMAIN\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n {{$select.selected | capitalize}}\n \n
        \n
        \n
        \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n\n
        \n
        \n\n \n

        {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

        \n \n \n
        \n\n
        \n\n
        \n
        \n \n
        \n
        \n\n'), +a.put("app/freshdesk/list/list.html",'\n
        \n
        \n \n\n \n
        \n
        \n
        \n \n {{ \'APPLICATION_FRESHDESK\' | translate }} \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 {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n \n \n \n \n
        \n
        \n
        \n
        {{ \'APPLICATION_NAME\' | translate }}{{ \'APPLICATION_EMAIL\' | translate }}{{ \'APPLICATION_REMOTE_ADDRESS\' | translate }}{{ \'APPLICATION_DESCRIPTION\' | translate }}{{ \'APPLICATION_ACTIONS\' | translate }}
        {{account.name}}{{account.username}}{{account.remoteUri}}{{account.description}}\n \n {{ \'APPLICATION_EDIT\' | translate }}\n \n \n {{ \'APPLICATION_CHECK\' | translate }}\n \n \n {{ \'APPLICATION_DELETE\' | translate }}\n \n
        \n No account available\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'),a.put("app/freshdesk/view/view.account.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_ACCOUNT\' | translate}}\n
        \n \n
        \n
        \n
        \n \n
        \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n
        \n \n\n
        \n
        \n
        \n
        \n
        \n'),a.put("app/freshdesk/view/view.configuration.html",'
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_CONFIGURATION\' | translate }} WIZARD \n
        \n
        \n
        \n \n \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n \n
        \n \n \n
        \n \n\n \n
        \n
        \n\n \n

        {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

        \n \n \n
        \n
        \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/freshdesk/view/view.configurationSettings.html",'
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}\n
        \n \n
        \n
        \n
        \n \n
        \n
        \n
        \n All following fields will be join by blank space:\n
        \n
        \n \n
        \n
        \n
        \n \n
        \n
        \n \n {{$select.selected | capitalize}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n
        \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n \n
        \n \n \n
        \n
        \n
        \n All following fields will be join by new line:\n
        \n
        \n \n
        \n
        \n
        \n \n
        \n \n
        \n \n {{$select.selected | ucfirst}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n \n
        \n
        \n \n {{$select.selected | capitalize}}\n \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n \n
        \n \n \n
        \n
        \n
        \n Add how to fill the fields present in your account:\n
        \n
        \n \n
        \n
        \n
        \n \n
        \n
        \n \n {{$select.selected.label}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n \n {{$select.selected[0]}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n {{$select.selected | ucfirst}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n
        \n \n {{$select.selected.name}}\n \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n \n
        \n
        \n
        \n \n
        \n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/freshdesk/view/view.configurations.html",'
        \n
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_CONFIGURATIONS\' | translate}}\n
        \n \n
        \n
        \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
        {{\'APPLICATION_NAME\' | translate}}{{\'APPLICATION_DESCRIPTION\' | translate}}{{ \'APPLICATION_ACTIONS\' | translate }}
        {{configuration.name}}{{configuration.description}}\n \n {{ \'APPLICATION_SETTINGS\' | translate}}\n \n \n {{ \'APPLICATION_DELETE\' | translate }}\n \n
        \n No configuration available\n
        \n \n
        \n
        \n
        \n
        \n
        \n'),a.put("app/freshdesk/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{account.name}}\n
        \n
        \n {{account.remoteUri}}\n
        \n
        \n \n \n \n \n
        \n \n
        \n \n \n
        \n
        \n \n
        \n
        \n\n'),a.put("app/freshdesk/wizard/wizard.html",'\n\n\n\n\n
        \n
        \n \n
        \n
        \n
        \n \n {{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD \n
        \n
        \n
        \n \n \n
        \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n \n
        \n \n\n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_EXIST_DOMAIN\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n\n
        \n
        \n\n \n

        {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

        \n \n \n
        \n\n
        \n\n
        \n
        \n \n
        \n
        \n\n'), +a.put("app/iframe/view/view.html",'\n
        \n
        \n \n\n \n
        \n \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n {{iframe.title}}\n
        \n
        \n {{ \'APPLICATION_IFRAME\' | translate }}\n
        \n
        \n \n
        \n \n
        \n \n \n
        \n
        \n
        \n
        \n
        \n
        \n \n {{\'APPLICATION_IFRAME\' | translate}}\n
        \n \n
        \n
        \n
        \n \n
        \n
        \n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
        \n \n\n \n
        \n
        \n \n\n
        \n
        \n
        \n
        \n
        \n
        \n \n\n
        \n
        \n ':''),v=a(d.theme?'':''),d.theme&&q?(x='"):d.theme?(x='"):x=q?'':'',w=a(x),r&&(d.theme?(w.css(p),w.addClass("ui-widget-content")):w.css(f)),d.theme||v.css(d.overlayCSS),v.css("position",q?"fixed":"absolute"),(k||d.forceIframe)&&u.css("opacity",0);var z=[u,v,w],A=a(q?"body":b);a.each(z,function(){this.appendTo(A)}),d.theme&&d.draggable&&a.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var B=m&&(!a.support.boxModel||a("object,embed",q?null:b).length>0);if(l||B){if(q&&d.allowBodyStretch&&a.support.boxModel&&a("html,body").css("height","100%"),(l||!a.support.boxModel)&&!q)var C=i(b,"borderTopWidth"),D=i(b,"borderLeftWidth"),E=C?"(0 - "+C+")":0,F=D?"(0 - "+D+")":0;a.each(z,function(a,b){var c=b[0].style;if(c.position="absolute",2>a)q?c.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+d.quirksmodeOffsetHack+') + "px"'):c.setExpression("height",'this.parentNode.offsetHeight + "px"'),q?c.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):c.setExpression("width",'this.parentNode.offsetWidth + "px"'),F&&c.setExpression("left",F),E&&c.setExpression("top",E);else if(d.centerY)q&&c.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),c.marginTop=0;else if(!d.centerY&&q){var e=d.css&&d.css.top?parseInt(d.css.top,10):0,f="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+e+') + "px"';c.setExpression("top",f)}})}if(r&&(d.theme?w.find(".ui-widget-content").append(r):w.append(r),(r.jquery||r.nodeType)&&a(r).show()),(k||d.forceIframe)&&d.showOverlay&&u.show(),d.fadeIn){var G=d.onBlock?d.onBlock:j,H=d.showOverlay&&!r?G:j,I=r?G:j;d.showOverlay&&v._fadeIn(d.fadeIn,H),r&&w._fadeIn(d.fadeIn,I)}else d.showOverlay&&v.show(),r&&w.show(),d.onBlock&&d.onBlock.bind(w)();if(e(1,b,d),q?(n=w[0],o=a(d.focusableElements,n),d.focusInput&&setTimeout(g,20)):h(w[0],d.centerX,d.centerY),d.timeout){var J=setTimeout(function(){q?a.unblockUI(d):a(b).unblock(d)},d.timeout);a(b).data("blockUI.timeout",J)}}}function c(b,c){var f,g=b==window,h=a(b),i=h.data("blockUI.history"),j=h.data("blockUI.timeout");j&&(clearTimeout(j),h.removeData("blockUI.timeout")),c=a.extend({},a.blockUI.defaults,c||{}),e(0,b,c),null===c.onUnblock&&(c.onUnblock=h.data("blockUI.onUnblock"),h.removeData("blockUI.onUnblock"));var k;k=g?a("body").children().filter(".blockUI").add("body > .blockUI"):h.find(">.blockUI"),c.cursorReset&&(k.length>1&&(k[1].style.cursor=c.cursorReset),k.length>2&&(k[2].style.cursor=c.cursorReset)),g&&(n=o=null),c.fadeOut?(f=k.length,k.stop().fadeOut(c.fadeOut,function(){0===--f&&d(k,i,c,b)})):d(k,i,c,b)}function d(b,c,d,e){var f=a(e);if(!f.data("blockUI.isBlocked")){b.each(function(a,b){this.parentNode&&this.parentNode.removeChild(this)}),c&&c.el&&(c.el.style.display=c.display,c.el.style.position=c.position,c.el.style.cursor="default",c.parent&&c.parent.appendChild(c.el),f.removeData("blockUI.history")),f.data("blockUI.static")&&f.css("position","static"),"function"==typeof d.onUnblock&&d.onUnblock(e,d);var g=a(document.body),h=g.width(),i=g[0].style.width;g.width(h-1).width(h),g[0].style.width=i}}function e(b,c,d){var e=c==window,g=a(c);if((b||(!e||n)&&(e||g.data("blockUI.isBlocked")))&&(g.data("blockUI.isBlocked",b),e&&d.bindEvents&&(!b||d.showOverlay))){var h="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";b?a(document).bind(h,d,f):a(document).unbind(h,f)}}function f(b){if("keydown"===b.type&&b.keyCode&&9==b.keyCode&&n&&b.data.constrainTabKey){var c=o,d=!b.shiftKey&&b.target===c[c.length-1],e=b.shiftKey&&b.target===c[0];if(d||e)return setTimeout(function(){g(e)},10),!1}var f=b.data,h=a(b.target);return h.hasClass("blockOverlay")&&f.onOverlayClick&&f.onOverlayClick(b),h.parents("div."+f.blockMsgClass).length>0?!0:0===h.parents().children().filter("div.blockUI").length}function g(a){if(o){var b=o[a===!0?o.length-1:0];b&&b.focus()}}function h(a,b,c){var d=a.parentNode,e=a.style,f=(d.offsetWidth-a.offsetWidth)/2-i(d,"borderLeftWidth"),g=(d.offsetHeight-a.offsetHeight)/2-i(d,"borderTopWidth");b&&(e.left=f>0?f+"px":"0"),c&&(e.top=g>0?g+"px":"0")}function i(b,c){return parseInt(a.css(b,c),10)||0}a.fn._fadeIn=a.fn.fadeIn;var j=a.noop||function(){},k=/MSIE/.test(navigator.userAgent),l=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),m=(document.documentMode||0,a.isFunction(document.createElement("div").style.setExpression));a.blockUI=function(a){b(window,a)},a.unblockUI=function(a){c(window,a)},a.growlUI=function(b,c,d,e){var f=a('
        ');b&&f.append("

        "+b+"

        "),c&&f.append("

        "+c+"

        "),void 0===d&&(d=3e3);var g=function(b){b=b||{},a.blockUI({message:f,fadeIn:"undefined"!=typeof b.fadeIn?b.fadeIn:700,fadeOut:"undefined"!=typeof b.fadeOut?b.fadeOut:1e3,timeout:"undefined"!=typeof b.timeout?b.timeout:d,centerY:!1,showOverlay:!1,onUnblock:e,css:a.blockUI.defaults.growlCSS})};g();f.css("opacity");f.mouseover(function(){g({fadeIn:0,timeout:3e4});var b=a(".blockMsg");b.stop(),b.fadeTo(300,1)}).mouseout(function(){a(".blockMsg").fadeOut(1e3)})},a.fn.block=function(c){if(this[0]===window)return a.blockUI(c),this;var d=a.extend({},a.blockUI.defaults,c||{});return this.each(function(){var b=a(this);d.ignoreIfBlocked&&b.data("blockUI.isBlocked")||b.unblock({fadeOut:0})}),this.each(function(){"static"==a.css(this,"position")&&(this.style.position="relative",a(this).data("blockUI.static",!0)),this.style.zoom=1,b(this,c)})},a.fn.unblock=function(b){return this[0]===window?(a.unblockUI(b),this):this.each(function(){c(this,b)})},a.blockUI.version=2.7,a.blockUI.defaults={message:"

        Please wait...

        ",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var n=null,o=[]}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],a):a(jQuery)}(),function(a,b,c){var d=a();a.fn.dropdownHover=function(c){return"ontouchstart"in document?this:(d=d.add(this.parent()),this.each(function(){function e(a){b.clearTimeout(f),b.clearTimeout(g),g=b.setTimeout(function(){d.find(":focus").blur(),n.instantlyCloseOthers===!0&&d.removeClass("open"),b.clearTimeout(g),h.attr("aria-expanded","true"),i.addClass("open"),h.trigger(l)},n.hoverDelay)}var f,g,h=a(this),i=h.parent(),j={delay:500,hoverDelay:0,instantlyCloseOthers:!0},k={delay:a(this).data("delay"),hoverDelay:a(this).data("hover-delay"),instantlyCloseOthers:a(this).data("close-others")},l="show.bs.dropdown",m="hide.bs.dropdown",n=a.extend(!0,{},j,c,k);i.hover(function(a){return i.hasClass("open")||h.is(a.target)?void e(a):!0},function(){b.clearTimeout(g),f=b.setTimeout(function(){h.attr("aria-expanded","false"),i.removeClass("open"),h.trigger(m)},n.delay)}),h.hover(function(a){return i.hasClass("open")||i.is(a.target)?void e(a):!0}),i.find(".dropdown-submenu").each(function(){var c,d=a(this);d.hover(function(){b.clearTimeout(c),d.children(".dropdown-menu").show(),d.siblings().children(".dropdown-menu").hide()},function(){var a=d.children(".dropdown-menu");c=b.setTimeout(function(){a.hide()},n.delay)})})}))},a(document).ready(function(){a('[data-hover="dropdown"]').dropdownHover()})}(jQuery,window),function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){"use strict";function b(b){var c=[{re:/[\xC0-\xC6]/g,ch:"A"},{re:/[\xE0-\xE6]/g,ch:"a"},{re:/[\xC8-\xCB]/g,ch:"E"},{re:/[\xE8-\xEB]/g,ch:"e"},{re:/[\xCC-\xCF]/g,ch:"I"},{re:/[\xEC-\xEF]/g,ch:"i"},{re:/[\xD2-\xD6]/g,ch:"O"},{re:/[\xF2-\xF6]/g,ch:"o"},{re:/[\xD9-\xDC]/g,ch:"U"},{re:/[\xF9-\xFC]/g,ch:"u"},{re:/[\xC7-\xE7]/g,ch:"c"},{re:/[\xD1]/g,ch:"N"},{re:/[\xF1]/g,ch:"n"}];return a.each(c,function(){b=b.replace(this.re,this.ch)}),b}function c(a){var b={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},c="(?:"+Object.keys(b).join("|")+")",d=new RegExp(c),e=new RegExp(c,"g"),f=null==a?"":""+a;return d.test(f)?f.replace(e,function(a){return b[a]}):f}function d(b,c){var d=arguments,f=b,g=c;[].shift.apply(d);var h,i=this.each(function(){var b=a(this);if(b.is("select")){var c=b.data("selectpicker"),i="object"==typeof f&&f;if(c){if(i)for(var j in i)i.hasOwnProperty(j)&&(c.options[j]=i[j])}else{var k=a.extend({},e.DEFAULTS,a.fn.selectpicker.defaults||{},b.data(),i);k.template=a.extend({},e.DEFAULTS.template,a.fn.selectpicker.defaults?a.fn.selectpicker.defaults.template:{},b.data().template,i.template),b.data("selectpicker",c=new e(this,k,g))}"string"==typeof f&&(h=c[f]instanceof Function?c[f].apply(c,d):c.options[f])}});return"undefined"!=typeof h?h:i}String.prototype.includes||!function(){var a={}.toString,b=function(){try{var a={},b=Object.defineProperty,c=b(a,a,a)&&b}catch(d){}return c}(),c="".indexOf,d=function(b){if(null==this)throw new TypeError;var d=String(this);if(b&&"[object RegExp]"==a.call(b))throw new TypeError;var e=d.length,f=String(b),g=f.length,h=arguments.length>1?arguments[1]:void 0,i=h?Number(h):0;i!=i&&(i=0);var j=Math.min(Math.max(i,0),e);return g+j>e?!1:-1!=c.call(d,f,i)};b?b(String.prototype,"includes",{value:d,configurable:!0,writable:!0}):String.prototype.includes=d}(),String.prototype.startsWith||!function(){var a=function(){try{var a={},b=Object.defineProperty,c=b(a,a,a)&&b}catch(d){}return c}(),b={}.toString,c=function(a){if(null==this)throw new TypeError;var c=String(this);if(a&&"[object RegExp]"==b.call(a))throw new TypeError;var d=c.length,e=String(a),f=e.length,g=arguments.length>1?arguments[1]:void 0,h=g?Number(g):0;h!=h&&(h=0);var i=Math.min(Math.max(h,0),d);if(f+i>d)return!1;for(var j=-1;++j'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1},e.prototype={constructor:e,init:function(){var b=this,c=this.$element.attr("id");this.$element.addClass("bs-select-hidden"),this.liObj={},this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$newElement=this.createView(),this.$element.after(this.$newElement),this.$button=this.$newElement.children("button"),this.$menu=this.$newElement.children(".dropdown-menu"),this.$menuInner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.options.dropdownAlignRight&&this.$menu.addClass("dropdown-menu-right"),"undefined"!=typeof c&&(this.$button.attr("data-id",c),a('label[for="'+c+'"]').click(function(a){a.preventDefault(),b.$button.focus()})),this.checkDisabled(),this.clickListener(),this.options.liveSearch&&this.liveSearchListener(),this.render(),this.setStyle(),this.setWidth(),this.options.container&&this.selectPosition(),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile(),this.$newElement.on({"hide.bs.dropdown":function(a){b.$element.trigger("hide.bs.select",a)},"hidden.bs.dropdown":function(a){b.$element.trigger("hidden.bs.select",a)},"show.bs.dropdown":function(a){b.$element.trigger("show.bs.select",a)},"shown.bs.dropdown":function(a){b.$element.trigger("shown.bs.select",a)}}),setTimeout(function(){b.$element.trigger("loaded.bs.select")})},createDropdown:function(){var b=this.multiple?" show-tick":"",d=this.$element.parent().hasClass("input-group")?" input-group-btn":"",e=this.autofocus?" autofocus":"",f=this.options.header?'
        '+this.options.header+"
        ":"",g=this.options.liveSearch?'":"",h=this.multiple&&this.options.actionsBox?'
        ":"",i=this.multiple&&this.options.doneButton?'
        ":"",j='
        ";return a(j)},createView:function(){var a=this.createDropdown(),b=this.createLi();return a.find("ul")[0].innerHTML=b,a},reloadLi:function(){this.destroyLi();var a=this.createLi();this.$menuInner[0].innerHTML=a},destroyLi:function(){this.$menu.find("li").remove()},createLi:function(){var d=this,e=[],f=0,g=document.createElement("option"),h=-1,i=function(a,b,c,d){return""+a+""},j=function(a,e,f,g){return'"+a+''};if(this.options.title&&!this.multiple&&(h--,!this.$element.find(".bs-title-option").length)){var k=this.$element[0];g.className="bs-title-option",g.appendChild(document.createTextNode(this.options.title)),g.value="",k.insertBefore(g,k.firstChild),void 0===a(k.options[k.selectedIndex]).attr("selected")&&(g.selected=!0)}return this.$element.find("option").each(function(b){var c=a(this);if(h++,!c.hasClass("bs-title-option")){var g=this.className||"",k=this.style.cssText,l=c.data("content")?c.data("content"):c.html(),m=c.data("tokens")?c.data("tokens"):null,n="undefined"!=typeof c.data("subtext")?''+c.data("subtext")+"":"",o="undefined"!=typeof c.data("icon")?' ':"",p=this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled;if(""!==o&&p&&(o=""+o+""),d.options.hideDisabled&&p)return void h--;if(c.data("content")||(l=o+''+l+n+""),"OPTGROUP"===this.parentNode.tagName&&c.data("divider")!==!0){var q=" "+this.parentNode.className||"";if(0===c.index()){f+=1;var r=this.parentNode.label,s="undefined"!=typeof c.parent().data("subtext")?''+c.parent().data("subtext")+"":"",t=c.parent().data("icon")?' ':"";r=t+''+r+s+"",0!==b&&e.length>0&&(h++,e.push(i("",null,"divider",f+"div"))),h++,e.push(i(r,null,"dropdown-header"+q,f))}e.push(i(j(l,"opt "+g+q,k,m),b,"",f))}else c.data("divider")===!0?e.push(i("",b,"divider")):c.data("hidden")===!0?e.push(i(j(l,g,k,m),b,"hidden is-hidden")):(this.previousElementSibling&&"OPTGROUP"===this.previousElementSibling.tagName&&(h++,e.push(i("",null,"divider",f+"div"))),e.push(i(j(l,g,k,m),b)));d.liObj[b]=h}}),this.multiple||0!==this.$element.find("option:selected").length||this.options.title||this.$element.find("option").eq(0).prop("selected",!0).attr("selected","selected"),e.join("")},findLis:function(){return null==this.$lis&&(this.$lis=this.$menu.find("li")),this.$lis},render:function(b){var c,d=this;b!==!1&&this.$element.find("option").each(function(a){var b=d.findLis().eq(d.liObj[a]);d.setDisabled(a,this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled,b),d.setSelected(a,this.selected,b)}),this.tabIndex();var e=this.$element.find("option").map(function(){if(this.selected){if(d.options.hideDisabled&&(this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled))return;var b,c=a(this),e=c.data("icon")&&d.options.showIcon?' ':"";return b=d.options.showSubtext&&c.data("subtext")&&!d.multiple?' '+c.data("subtext")+"":"","undefined"!=typeof c.attr("title")?c.attr("title"):c.data("content")&&d.options.showContent?c.data("content"):e+c.html()+b}}).toArray(),f=this.multiple?e.join(this.options.multipleSeparator):e[0];if(this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1){var g=this.options.selectedTextFormat.split(">");if(g.length>1&&e.length>g[1]||1==g.length&&e.length>=2){c=this.options.hideDisabled?", [disabled]":"";var h=this.$element.find("option").not('[data-divider="true"], [data-hidden="true"]'+c).length,i="function"==typeof this.options.countSelectedText?this.options.countSelectedText(e.length,h):this.options.countSelectedText;f=i.replace("{0}",e.length.toString()).replace("{1}",h.toString())}}void 0==this.options.title&&(this.options.title=this.$element.attr("title")),"static"==this.options.selectedTextFormat&&(f=this.options.title),f||(f="undefined"!=typeof this.options.title?this.options.title:this.options.noneSelectedText),this.$button.attr("title",a.trim(f.replace(/<[^>]*>?/g,""))),this.$button.children(".filter-option").html(f),this.$element.trigger("rendered.bs.select")},setStyle:function(a,b){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""));var c=a?a:this.options.style;"add"==b?this.$button.addClass(c):"remove"==b?this.$button.removeClass(c):(this.$button.removeClass(this.options.style),this.$button.addClass(c))},liHeight:function(b){if(b||this.options.size!==!1&&!this.sizeInfo){var c=document.createElement("div"),d=document.createElement("div"),e=document.createElement("ul"),f=document.createElement("li"),g=document.createElement("li"),h=document.createElement("a"),i=document.createElement("span"),j=this.options.header&&this.$menu.find(".popover-title").length>0?this.$menu.find(".popover-title")[0].cloneNode(!0):null,k=this.options.liveSearch?document.createElement("div"):null,l=this.options.actionsBox&&this.multiple&&this.$menu.find(".bs-actionsbox").length>0?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,m=this.options.doneButton&&this.multiple&&this.$menu.find(".bs-donebutton").length>0?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null;if(i.className="text",c.className=this.$menu[0].parentNode.className+" open",d.className="dropdown-menu open",e.className="dropdown-menu inner",f.className="divider",i.appendChild(document.createTextNode("Inner text")),h.appendChild(i),g.appendChild(h),e.appendChild(g),e.appendChild(f),j&&d.appendChild(j),k){var n=document.createElement("span");k.className="bs-searchbox",n.className="form-control",k.appendChild(n),d.appendChild(k)}l&&d.appendChild(l),d.appendChild(e),m&&d.appendChild(m),c.appendChild(d),document.body.appendChild(c);var o=h.offsetHeight,p=j?j.offsetHeight:0,q=k?k.offsetHeight:0,r=l?l.offsetHeight:0,s=m?m.offsetHeight:0,t=a(f).outerHeight(!0),u="function"==typeof getComputedStyle?getComputedStyle(d):!1,v=u?null:a(d),w=parseInt(u?u.paddingTop:v.css("paddingTop"))+parseInt(u?u.paddingBottom:v.css("paddingBottom"))+parseInt(u?u.borderTopWidth:v.css("borderTopWidth"))+parseInt(u?u.borderBottomWidth:v.css("borderBottomWidth")),x=w+parseInt(u?u.marginTop:v.css("marginTop"))+parseInt(u?u.marginBottom:v.css("marginBottom"))+2;document.body.removeChild(c),this.sizeInfo={liHeight:o,headerHeight:p,searchHeight:q,actionsHeight:r,doneButtonHeight:s,dividerHeight:t,menuPadding:w,menuExtras:x}}},setSize:function(){if(this.findLis(),this.liHeight(),this.options.header&&this.$menu.css("padding-top",0),this.options.size!==!1){var b,c,d,e,f=this,g=this.$menu,h=this.$menuInner,i=a(window),j=this.$newElement[0].offsetHeight,k=this.sizeInfo.liHeight,l=this.sizeInfo.headerHeight,m=this.sizeInfo.searchHeight,n=this.sizeInfo.actionsHeight,o=this.sizeInfo.doneButtonHeight,p=this.sizeInfo.dividerHeight,q=this.sizeInfo.menuPadding,r=this.sizeInfo.menuExtras,s=this.options.hideDisabled?".disabled":"",t=function(){d=f.$newElement.offset().top-i.scrollTop(),e=i.height()-d-j};if(t(),"auto"===this.options.size){var u=function(){var i,j=function(b,c){return function(d){return c?d.classList?d.classList.contains(b):a(d).hasClass(b):!(d.classList?d.classList.contains(b):a(d).hasClass(b))}},p=f.$menuInner[0].getElementsByTagName("li"),s=Array.prototype.filter?Array.prototype.filter.call(p,j("hidden",!1)):f.$lis.not(".hidden"),u=Array.prototype.filter?Array.prototype.filter.call(s,j("dropdown-header",!0)):s.filter(".dropdown-header");t(),b=e-r,f.options.container?(g.data("height")||g.data("height",g.height()),c=g.data("height")):c=g.height(),f.options.dropupAuto&&f.$newElement.toggleClass("dropup",d>e&&c>b-r),f.$newElement.hasClass("dropup")&&(b=d-r),i=s.length+u.length>3?3*k+r-2:0,g.css({"max-height":b+"px",overflow:"hidden","min-height":i+l+m+n+o+"px"}),h.css({"max-height":b-l-m-n-o-q+"px","overflow-y":"auto","min-height":Math.max(i-q,0)+"px"})};u(),this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize",u),i.off("resize.getSize scroll.getSize").on("resize.getSize scroll.getSize",u)}else if(this.options.size&&"auto"!=this.options.size&&this.$lis.not(s).length>this.options.size){var v=this.$lis.not(".divider").not(s).children().slice(0,this.options.size).last().parent().index(),w=this.$lis.slice(0,v+1).filter(".divider").length;b=k*this.options.size+w*p+q,f.options.container?(g.data("height")||g.data("height",g.height()),c=g.data("height")):c=g.height(),f.options.dropupAuto&&this.$newElement.toggleClass("dropup",d>e&&c>b-r),g.css({"max-height":b+l+m+n+o+"px",overflow:"hidden","min-height":""}),h.css({"max-height":b-q+"px","overflow-y":"auto","min-height":""})}}},setWidth:function(){if("auto"===this.options.width){this.$menu.css("min-width","0");var a=this.$menu.parent().clone().appendTo("body"),b=this.options.container?this.$newElement.clone().appendTo("body"):a,c=a.children(".dropdown-menu").outerWidth(),d=b.css("width","auto").children("button").outerWidth();a.remove(),b.remove(),this.$newElement.css("width",Math.max(c,d)+"px")}else"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width",""));this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement.removeClass("fit-width")},selectPosition:function(){this.$bsContainer=a('
        ');var b,c,d=this,e=function(a){d.$bsContainer.addClass(a.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass("dropup",a.hasClass("dropup")),b=a.offset(),c=a.hasClass("dropup")?0:a[0].offsetHeight,d.$bsContainer.css({top:b.top+c,left:b.left,width:a[0].offsetWidth})};this.$newElement.on("click",function(){var b=a(this);d.isDisabled()||(e(b),d.$bsContainer.appendTo(d.options.container).toggleClass("open",!b.hasClass("open")).append(d.$menu))}),a(window).on("resize scroll",function(){e(d.$newElement)}),this.$element.on("hide.bs.select",function(){d.$menu.data("height",d.$menu.height()),d.$bsContainer.detach()})},setSelected:function(a,b,c){c||(c=this.findLis().eq(this.liObj[a])),c.toggleClass("selected",b)},setDisabled:function(a,b,c){c||(c=this.findLis().eq(this.liObj[a])),b?c.addClass("disabled").children("a").attr("href","#").attr("tabindex",-1):c.removeClass("disabled").children("a").removeAttr("href").attr("tabindex",0)},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){var a=this;this.isDisabled()?(this.$newElement.addClass("disabled"),this.$button.addClass("disabled").attr("tabindex",-1)):(this.$button.hasClass("disabled")&&(this.$newElement.removeClass("disabled"),this.$button.removeClass("disabled")),-1!=this.$button.attr("tabindex")||this.$element.data("tabindex")||this.$button.removeAttr("tabindex")),this.$button.click(function(){return!a.isDisabled()})},tabIndex:function(){this.$element.is("[tabindex]")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex")))},clickListener:function(){var b=this,c=a(document);this.$newElement.on("touchstart.dropdown",".dropdown-menu",function(a){a.stopPropagation()}),c.data("spaceSelect",!1),this.$button.on("keyup",function(a){/(32)/.test(a.keyCode.toString(10))&&c.data("spaceSelect")&&(a.preventDefault(), -c.data("spaceSelect",!1))}),this.$newElement.on("click",function(){b.setSize(),b.$element.on("shown.bs.select",function(){if(b.options.liveSearch||b.multiple){if(!b.multiple){var a=b.liObj[b.$element[0].selectedIndex];if("number"!=typeof a||b.options.size===!1)return;var c=b.$lis.eq(a)[0].offsetTop-b.$menuInner[0].offsetTop;c=c-b.$menuInner[0].offsetHeight/2+b.sizeInfo.liHeight/2,b.$menuInner[0].scrollTop=c}}else b.$menuInner.find(".selected a").focus()})}),this.$menuInner.on("click","li a",function(c){var d=a(this),e=d.parent().data("originalIndex"),f=b.$element.val(),g=b.$element.prop("selectedIndex");if(b.multiple&&c.stopPropagation(),c.preventDefault(),!b.isDisabled()&&!d.parent().hasClass("disabled")){var h=b.$element.find("option"),i=h.eq(e),j=i.prop("selected"),k=i.parent("optgroup"),l=b.options.maxOptions,m=k.data("maxOptions")||!1;if(b.multiple){if(i.prop("selected",!j),b.setSelected(e,!j),d.blur(),l!==!1||m!==!1){var n=l
        ');q[2]&&(r=r.replace("{var}",q[2][l>1?0:1]),s=s.replace("{var}",q[2][m>1?0:1])),i.prop("selected",!1),b.$menu.append(t),l&&n&&(t.append(a("
        "+r+"
        ")),b.$element.trigger("maxReached.bs.select")),m&&o&&(t.append(a("
        "+s+"
        ")),b.$element.trigger("maxReachedGrp.bs.select")),setTimeout(function(){b.setSelected(e,!1)},10),t.delay(750).fadeOut(300,function(){a(this).remove()})}}}else h.prop("selected",!1),i.prop("selected",!0),b.$menuInner.find(".selected").removeClass("selected"),b.setSelected(e,!0);b.multiple?b.options.liveSearch&&b.$searchbox.focus():b.$button.focus(),(f!=b.$element.val()&&b.multiple||g!=b.$element.prop("selectedIndex")&&!b.multiple)&&(b.$element.triggerNative("change"),b.$element.trigger("changed.bs.select",[e,i.prop("selected"),j]))}}),this.$menu.on("click","li.disabled a, .popover-title, .popover-title :not(.close)",function(c){c.currentTarget==this&&(c.preventDefault(),c.stopPropagation(),b.options.liveSearch&&!a(c.target).hasClass("close")?b.$searchbox.focus():b.$button.focus())}),this.$menuInner.on("click",".divider, .dropdown-header",function(a){a.preventDefault(),a.stopPropagation(),b.options.liveSearch?b.$searchbox.focus():b.$button.focus()}),this.$menu.on("click",".popover-title .close",function(){b.$button.click()}),this.$searchbox.on("click",function(a){a.stopPropagation()}),this.$menu.on("click",".actions-btn",function(c){b.options.liveSearch?b.$searchbox.focus():b.$button.focus(),c.preventDefault(),c.stopPropagation(),a(this).hasClass("bs-select-all")?b.selectAll():b.deselectAll(),b.$element.triggerNative("change")}),this.$element.change(function(){b.render(!1)})},liveSearchListener:function(){var d=this,e=a('
      • ');this.$newElement.on("click.dropdown.data-api touchstart.dropdown.data-api",function(){d.$menuInner.find(".active").removeClass("active"),d.$searchbox.val()&&(d.$searchbox.val(""),d.$lis.not(".is-hidden").removeClass("hidden"),e.parent().length&&e.remove()),d.multiple||d.$menuInner.find(".selected").addClass("active"),setTimeout(function(){d.$searchbox.focus()},10)}),this.$searchbox.on("click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api",function(a){a.stopPropagation()}),this.$searchbox.on("input propertychange",function(){if(d.$searchbox.val()){var f=d.$lis.not(".is-hidden").removeClass("hidden").children("a");f=d.options.liveSearchNormalize?f.not(":a"+d._searchStyle()+'("'+b(d.$searchbox.val())+'")'):f.not(":"+d._searchStyle()+'("'+d.$searchbox.val()+'")'),f.parent().addClass("hidden"),d.$lis.filter(".dropdown-header").each(function(){var b=a(this),c=b.data("optgroup");0===d.$lis.filter("[data-optgroup="+c+"]").not(b).not(".hidden").length&&(b.addClass("hidden"),d.$lis.filter("[data-optgroup="+c+"div]").addClass("hidden"))});var g=d.$lis.not(".hidden");g.each(function(b){var c=a(this);c.hasClass("divider")&&(c.index()===g.first().index()||c.index()===g.last().index()||g.eq(b+1).hasClass("divider"))&&c.addClass("hidden")}),d.$lis.not(".hidden, .no-results").length?e.parent().length&&e.remove():(e.parent().length&&e.remove(),e.html(d.options.noneResultsText.replace("{0}",'"'+c(d.$searchbox.val())+'"')).show(),d.$menuInner.append(e))}else d.$lis.not(".is-hidden").removeClass("hidden"),e.parent().length&&e.remove();d.$lis.filter(".active").removeClass("active"),d.$searchbox.val()&&d.$lis.not(".hidden, .divider, .dropdown-header").eq(0).addClass("active").children("a").focus(),a(this).focus()})},_searchStyle:function(){var a={begins:"ibegins",startsWith:"ibegins"};return a[this.options.liveSearchStyle]||"icontains"},val:function(a){return"undefined"!=typeof a?(this.$element.val(a),this.render(),this.$element):this.$element.val()},changeAll:function(b){"undefined"==typeof b&&(b=!0),this.findLis();for(var c=this.$element.find("option"),d=this.$lis.not(".divider, .dropdown-header, .disabled, .hidden").toggleClass("selected",b),e=d.length,f=[],g=0;e>g;g++){var h=d[g].getAttribute("data-original-index");f[f.length]=c.eq(h)[0]}a(f).prop("selected",b),this.render(!1)},selectAll:function(){return this.changeAll(!0)},deselectAll:function(){return this.changeAll(!1)},keydown:function(c){var d,e,f,g,h,i,j,k,l,m=a(this),n=m.is("input")?m.parent().parent():m.parent(),o=n.data("this"),p=":not(.disabled, .hidden, .dropdown-header, .divider)",q={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};if(o.options.liveSearch&&(n=m.parent().parent()),o.options.container&&(n=o.$menu),d=a("[role=menu] li",n),l=o.$menu.parent().hasClass("open"),!l&&(c.keyCode>=48&&c.keyCode<=57||c.keyCode>=96&&c.keyCode<=105||c.keyCode>=65&&c.keyCode<=90)&&(o.options.container?o.$newElement.trigger("click"):(o.setSize(),o.$menu.parent().addClass("open"),l=!0),o.$searchbox.focus()),o.options.liveSearch&&(/(^9$|27)/.test(c.keyCode.toString(10))&&l&&0===o.$menu.find(".active").length&&(c.preventDefault(),o.$menu.parent().removeClass("open"),o.options.container&&o.$newElement.removeClass("open"),o.$button.focus()),d=a("[role=menu] li"+p,n),m.val()||/(38|40)/.test(c.keyCode.toString(10))||0===d.filter(".active").length&&(d=o.$menuInner.find("li"),d=o.options.liveSearchNormalize?d.filter(":a"+o._searchStyle()+"("+b(q[c.keyCode])+")"):d.filter(":"+o._searchStyle()+"("+q[c.keyCode]+")"))),d.length){if(/(38|40)/.test(c.keyCode.toString(10)))e=d.index(d.find("a").filter(":focus").parent()),g=d.filter(p).first().index(),h=d.filter(p).last().index(),f=d.eq(e).nextAll(p).eq(0).index(),i=d.eq(e).prevAll(p).eq(0).index(),j=d.eq(f).prevAll(p).eq(0).index(),o.options.liveSearch&&(d.each(function(b){a(this).hasClass("disabled")||a(this).data("index",b)}),e=d.index(d.filter(".active")),g=d.first().data("index"),h=d.last().data("index"),f=d.eq(e).nextAll().eq(0).data("index"),i=d.eq(e).prevAll().eq(0).data("index"),j=d.eq(f).prevAll().eq(0).data("index")),k=m.data("prevIndex"),38==c.keyCode?(o.options.liveSearch&&e--,e!=j&&e>i&&(e=i),g>e&&(e=g),e==k&&(e=h)):40==c.keyCode&&(o.options.liveSearch&&e++,-1==e&&(e=0),e!=j&&f>e&&(e=f),e>h&&(e=h),e==k&&(e=g)),m.data("prevIndex",e),o.options.liveSearch?(c.preventDefault(),m.hasClass("dropdown-toggle")||(d.removeClass("active").eq(e).addClass("active").children("a").focus(),m.focus())):d.eq(e).children("a").focus();else if(!m.is("input")){var r,s,t=[];d.each(function(){a(this).hasClass("disabled")||a.trim(a(this).children("a").text().toLowerCase()).substring(0,1)==q[c.keyCode]&&t.push(a(this).index())}),r=a(document).data("keycount"),r++,a(document).data("keycount",r),s=a.trim(a(":focus").text().toLowerCase()).substring(0,1),s!=q[c.keyCode]?(r=1,a(document).data("keycount",r)):r>=t.length&&(a(document).data("keycount",0),r>t.length&&(r=1)),d.eq(t[r-1]).children("a").focus()}if((/(13|32)/.test(c.keyCode.toString(10))||/(^9$)/.test(c.keyCode.toString(10))&&o.options.selectOnTab)&&l){if(/(32)/.test(c.keyCode.toString(10))||c.preventDefault(),o.options.liveSearch)/(32)/.test(c.keyCode.toString(10))||(o.$menuInner.find(".active a").click(),m.focus());else{var u=a(":focus");u.click(),u.focus(),c.preventDefault(),a(document).data("spaceSelect",!0)}a(document).data("keycount",0)}(/(^9$|27)/.test(c.keyCode.toString(10))&&l&&(o.multiple||o.options.liveSearch)||/(27)/.test(c.keyCode.toString(10))&&!l)&&(o.$menu.parent().removeClass("open"),o.options.container&&o.$newElement.removeClass("open"),o.$button.focus())}},mobile:function(){this.$element.addClass("mobile-device").appendTo(this.$newElement),this.options.container&&this.$menu.hide()},refresh:function(){this.$lis=null,this.liObj={},this.reloadLi(),this.render(),this.checkDisabled(),this.liHeight(!0),this.setStyle(),this.setWidth(),this.$lis&&this.$searchbox.trigger("propertychange"),this.$element.trigger("refreshed.bs.select")},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()},destroy:function(){this.$newElement.remove(),this.$bsContainer?this.$bsContainer.remove():this.$menu.remove(),this.$element.off(".bs.select").removeData("selectpicker").removeClass("bs-select-hidden selectpicker")}};var f=a.fn.selectpicker;a.fn.selectpicker=d,a.fn.selectpicker.Constructor=e,a.fn.selectpicker.noConflict=function(){return a.fn.selectpicker=f,this},a(document).data("keycount",0).on("keydown.bs.select",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input',e.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input',function(a){a.stopPropagation()}),a(window).on("load.bs.select.data-api",function(){a(".selectpicker").each(function(){var b=a(this);d.call(b,b.data())})})}(a)}),angular.module("checklist-model",[]).directive("checklistModel",["$parse","$compile",function(a,b){function c(a,b,c){if(angular.isArray(a))for(var d=a.length;d--;)if(c(a[d],b))return!0;return!1}function d(a,b,d){return a=angular.isArray(a)?a:[],c(a,b,d)||a.push(b),a}function e(a,b,c){if(angular.isArray(a))for(var d=a.length;d--;)if(c(a[d],b)){a.splice(d,1);break}return a}function f(f,g,h){function i(a,b){f[h.ngModel]=c(a,n,o)}var j=h.checklistModel;h.$set("checklistModel",null),b(g)(f),h.$set("checklistModel",j);var k=a(j),l=k.assign,m=a(h.checklistChange),n=h.checklistValue?a(h.checklistValue)(f.$parent):h.value,o=angular.equals;if(h.hasOwnProperty("checklistComparator"))if("."==h.checklistComparator[0]){var p=h.checklistComparator.substring(1);o=function(a,b){return a[p]===b[p]}}else o=a(h.checklistComparator)(f.$parent);f.$watch(h.ngModel,function(a,b){if(a!==b){var c=k(f.$parent);angular.isFunction(l)&&(a===!0?l(f.$parent,d(c,n,o)):l(f.$parent,e(c,n,o))),m&&m(f)}}),angular.isFunction(f.$parent.$watchCollection)?f.$parent.$watchCollection(j,i):f.$parent.$watch(j,i,!0)}return{restrict:"A",priority:1e3,terminal:!0,scope:!0,compile:function(a,b){if(("INPUT"!==a[0].tagName||"checkbox"!==b.type)&&"MD-CHECKBOX"!==a[0].tagName&&!b.btnCheckbox)throw'checklist-model should be applied to `input[type="checkbox"]` or `md-checkbox`.';if(!b.checklistValue&&!b.value)throw"You should provide `value` or `checklist-value`.";return b.ngModel||b.$set("ngModel","checked"),f}}}]),function(a,b,c){"use strict";a.fn.backstretch=function(d,f){return d!==c&&0!==d.length||a.error("No images were supplied for Backstretch"),0===a(b).scrollTop()&&b.scrollTo(0,0),this.each(function(){var b=a(this),c=b.data("backstretch");if(c){if("string"==typeof d&&"function"==typeof c[d])return void c[d](f);f=a.extend(c.options,f),c.destroy(!0)}c=new e(this,d,f),b.data("backstretch",c)})},a.backstretch=function(b,c){return a("body").backstretch(b,c).data("backstretch")},a.expr[":"].backstretch=function(b){return a(b).data("backstretch")!==c},a.fn.backstretch.defaults={centeredX:!0,centeredY:!0,duration:5e3,fade:0};var d={wrap:{left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},img:{position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"auto",height:"auto",maxHeight:"none",maxWidth:"none",zIndex:-999999}},e=function(c,e,g){this.options=a.extend({},a.fn.backstretch.defaults,g||{}),this.images=a.isArray(e)?e:[e],a.each(this.images,function(){a("")[0].src=this}),this.isBody=c===document.body,this.$container=a(c),this.$root=this.isBody?a(f?b:document):this.$container;var h=this.$container.children(".backstretch").first();if(this.$wrap=h.length?h:a('
        ').css(d.wrap).appendTo(this.$container),!this.isBody){var i=this.$container.css("position"),j=this.$container.css("zIndex");this.$container.css({position:"static"===i?"relative":i,zIndex:"auto"===j?0:j,background:"none"}),this.$wrap.css({zIndex:-999998})}this.$wrap.css({position:this.isBody&&f?"fixed":"absolute"}),this.index=0,this.show(this.index),a(b).on("resize.backstretch",a.proxy(this.resize,this)).on("orientationchange.backstretch",a.proxy(function(){this.isBody&&0===b.pageYOffset&&(b.scrollTo(0,1),this.resize())},this))};e.prototype={resize:function(){try{var a,c={left:0,top:0},d=this.isBody?this.$root.width():this.$root.innerWidth(),e=d,f=this.isBody?b.innerHeight?b.innerHeight:this.$root.height():this.$root.innerHeight(),g=e/this.$img.data("ratio");g>=f?(a=(g-f)/2,this.options.centeredY&&(c.top="-"+a+"px")):(g=f,e=g*this.$img.data("ratio"),a=(e-d)/2,this.options.centeredX&&(c.left="-"+a+"px")),this.$wrap.css({width:d,height:f}).find("img:not(.deleteable)").css({width:e,height:g}).css(c)}catch(h){}return this},show:function(b){if(!(Math.abs(b)>this.images.length-1)){var c=this,e=c.$wrap.find("img").addClass("deleteable"),f={relatedTarget:c.$container[0]};return c.$container.trigger(a.Event("backstretch.before",f),[c,b]),this.index=b,clearInterval(c.interval),c.$img=a("").css(d.img).bind("load",function(d){var g=this.width||a(d.target).width(),h=this.height||a(d.target).height();a(this).data("ratio",g/h),a(this).fadeIn(c.options.speed||c.options.fade,function(){e.remove(),c.paused||c.cycle(),a(["after","show"]).each(function(){c.$container.trigger(a.Event("backstretch."+this,f),[c,b])})}),c.resize()}).appendTo(c.$wrap),c.$img.attr("src",c.images[b]),c}},next:function(){return this.show(this.index1&&(clearInterval(this.interval),this.interval=setInterval(a.proxy(function(){this.paused||this.next()},this),this.options.duration)),this},destroy:function(c){a(b).off("resize.backstretch orientationchange.backstretch"),clearInterval(this.interval),c||this.$wrap.remove(),this.$container.removeData("backstretch")}};var f=function(){var a=navigator.userAgent,c=navigator.platform,d=a.match(/AppleWebKit\/([0-9]+)/),e=!!d&&d[1],f=a.match(/Fennec\/([0-9]+)/),g=!!f&&f[1],h=a.match(/Opera Mobi\/([0-9]+)/),i=!!h&&h[1],j=a.match(/MSIE ([0-9]+)/),k=!!j&&j[1];return!((c.indexOf("iPhone")>-1||c.indexOf("iPad")>-1||c.indexOf("iPod")>-1)&&e&&534>e||b.operamini&&"[object OperaMini]"==={}.toString.call(b.operamini)||h&&7458>i||a.indexOf("Android")>-1&&e&&533>e||g&&6>g||"palmGetResource"in b&&e&&534>e||a.indexOf("MeeGo")>-1&&a.indexOf("NokiaBrowser/8.5.0")>-1||k&&6>=k)}()}(jQuery,window),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}}),function(a,b,c){function d(c){var d=b.console;f[c]||(f[c]=!0,a.migrateWarnings.push(c),d&&d.warn&&!a.migrateMute&&(d.warn("JQMIGRATE: "+c),a.migrateTrace&&d.trace&&d.trace()))}function e(b,c,e,f){if(Object.defineProperty)try{return void Object.defineProperty(b,c,{configurable:!0,enumerable:!0,get:function(){return d(f),e},set:function(a){d(f),e=a}})}catch(g){}a._definePropertyBroken=!0,b[c]=e}var f={};a.migrateWarnings=[],!a.migrateMute&&b.console&&b.console.log&&b.console.log("JQMIGRATE: Logging is active"),a.migrateTrace===c&&(a.migrateTrace=!0),a.migrateReset=function(){f={},a.migrateWarnings.length=0},"BackCompat"===document.compatMode&&d("jQuery is not compatible with Quirks Mode");var g=a("",{size:1}).attr("size")&&a.attrFn,h=a.attr,i=a.attrHooks.value&&a.attrHooks.value.get||function(){return null},j=a.attrHooks.value&&a.attrHooks.value.set||function(){return c},k=/^(?:input|button)$/i,l=/^[238]$/,m=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,n=/^(?:checked|selected)$/i;e(a,"attrFn",g||{},"jQuery.attrFn is deprecated"),a.attr=function(b,e,f,i){var j=e.toLowerCase(),o=b&&b.nodeType;return i&&(h.length<4&&d("jQuery.fn.attr( props, pass ) is deprecated"),b&&!l.test(o)&&(g?e in g:a.isFunction(a.fn[e])))?a(b)[e](f):("type"===e&&f!==c&&k.test(b.nodeName)&&b.parentNode&&d("Can't change the 'type' of an input or button in IE 6/7/8"),!a.attrHooks[j]&&m.test(j)&&(a.attrHooks[j]={get:function(b,d){var e,f=a.prop(b,d);return f===!0||"boolean"!=typeof f&&(e=b.getAttributeNode(d))&&e.nodeValue!==!1?d.toLowerCase():c},set:function(b,c,d){var e;return c===!1?a.removeAttr(b,d):(e=a.propFix[d]||d,e in b&&(b[e]=!0),b.setAttribute(d,d.toLowerCase())),d}},n.test(j)&&d("jQuery.fn.attr('"+j+"') may use property instead of attribute")),h.call(a,b,e,f))},a.attrHooks.value={get:function(a,b){var c=(a.nodeName||"").toLowerCase();return"button"===c?i.apply(this,arguments):("input"!==c&&"option"!==c&&d("jQuery.fn.attr('value') no longer gets properties"),b in a?a.value:null)},set:function(a,b){var c=(a.nodeName||"").toLowerCase();return"button"===c?j.apply(this,arguments):("input"!==c&&"option"!==c&&d("jQuery.fn.attr('value', val) no longer sets properties"),void(a.value=b))}};var o,p,q=a.fn.init,r=a.parseJSON,s=/^([^<]*)(<[\w\W]+>)([^>]*)$/;a.fn.init=function(b,c,e){var f;return b&&"string"==typeof b&&!a.isPlainObject(c)&&(f=s.exec(a.trim(b)))&&f[0]&&("<"!==b.charAt(0)&&d("$(html) HTML strings must start with '<' character"),f[3]&&d("$(html) HTML text after last tag is ignored"),"#"===f[0].charAt(0)&&(d("HTML string cannot start with a '#' character"),a.error("JQMIGRATE: Invalid selector string (XSS)")),c&&c.context&&(c=c.context),a.parseHTML)?q.call(this,a.parseHTML(f[2],c,!0),c,e):q.apply(this,arguments)},a.fn.init.prototype=a.fn,a.parseJSON=function(a){return a||null===a?r.apply(this,arguments):(d("jQuery.parseJSON requires a valid JSON string"),null)},a.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a.browser||(o=a.uaMatch(navigator.userAgent),p={},o.browser&&(p[o.browser]=!0,p.version=o.version),p.chrome?p.webkit=!0:p.webkit&&(p.safari=!0),a.browser=p),e(a,"browser",a.browser,"jQuery.browser is deprecated"),a.sub=function(){function b(a,c){return new b.fn.init(a,c)}a.extend(!0,b,this),b.superclass=this,b.fn=b.prototype=this(),b.fn.constructor=b,b.sub=this.sub,b.fn.init=function(d,e){return e&&e instanceof a&&!(e instanceof b)&&(e=b(e)),a.fn.init.call(this,d,e,c)},b.fn.init.prototype=b.fn;var c=b(document);return d("jQuery.sub() is deprecated"),b},a.ajaxSetup({converters:{"text json":a.parseJSON}});var t=a.fn.data;a.fn.data=function(b){var e,f,g=this[0];return!g||"events"!==b||1!==arguments.length||(e=a.data(g,b),f=a._data(g,b),e!==c&&e!==f||f===c)?t.apply(this,arguments):(d("Use of jQuery.fn.data('events') is deprecated"),f)};var u=/\/(java|ecma)script/i,v=a.fn.andSelf||a.fn.addBack;a.fn.andSelf=function(){return d("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),v.apply(this,arguments)},a.clean||(a.clean=function(b,c,e,f){c=c||document,c=!c.nodeType&&c[0]||c,c=c.ownerDocument||c,d("jQuery.clean() is deprecated");var g,h,i,j,k=[];if(a.merge(k,a.buildFragment(b,c).childNodes),e)for(i=function(a){return!a.type||u.test(a.type)?f?f.push(a.parentNode?a.parentNode.removeChild(a):a):e.appendChild(a):void 0},g=0;null!=(h=k[g]);g++)a.nodeName(h,"script")&&i(h)||(e.appendChild(h),"undefined"!=typeof h.getElementsByTagName&&(j=a.grep(a.merge([],h.getElementsByTagName("script")),i),k.splice.apply(k,[g+1,0].concat(j)),g+=j.length));return k});var w=a.event.add,x=a.event.remove,y=a.event.trigger,z=a.fn.toggle,A=a.fn.live,B=a.fn.die,C="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",D=new RegExp("\\b(?:"+C+")\\b"),E=/(?:^|\s)hover(\.\S+|)\b/,F=function(b){return"string"!=typeof b||a.event.special.hover?b:(E.test(b)&&d("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),b&&b.replace(E,"mouseenter$1 mouseleave$1"))};a.event.props&&"attrChange"!==a.event.props[0]&&a.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),a.event.dispatch&&e(a.event,"handle",a.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),a.event.add=function(a,b,c,e,f){a!==document&&D.test(b)&&d("AJAX events should be attached to document: "+b),w.call(this,a,F(b||""),c,e,f)},a.event.remove=function(a,b,c,d,e){x.call(this,a,F(b)||"",c,d,e)},a.fn.error=function(){var a=Array.prototype.slice.call(arguments,0);return d("jQuery.fn.error() is deprecated"),a.splice(0,0,"error"),arguments.length?this.bind.apply(this,a):(this.triggerHandler.apply(this,a),this)},a.fn.toggle=function(b,c){if(!a.isFunction(b)||!a.isFunction(c))return z.apply(this,arguments);d("jQuery.fn.toggle(handler, handler...) is deprecated");var e=arguments,f=b.guid||a.guid++,g=0,h=function(c){var d=(a._data(this,"lastToggle"+b.guid)||0)%g;return a._data(this,"lastToggle"+b.guid,d+1),c.preventDefault(),e[d].apply(this,arguments)||!1};for(h.guid=f;g").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,d=d.concat(c.errorList)}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b===this.lastElement)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors();var b,c=this.elements().removeData("previousValue").removeAttr("aria-invalid"); -if(this.settings.unhighlight)for(b=0;c[b];b++)this.settings.unhighlight.call(this,c[b],this.settings.errorClass,"");else c.removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?this.findByName(b.name).filter(":checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+b.name+"")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\]|\$)/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.off(".validate-equalTo").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})}),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.fn.addBack=a.fn.addBack||a.fn.andSelf,a.fn.extend({actual:function(b,c){if(!this[b])throw'$.actual => The jQuery method "'+b+'" you called does not exist';var d,e,f={absolute:!1,clone:!1,includeMargin:!1,display:"block"},g=a.extend(f,c),h=this.eq(0);if(g.clone===!0)d=function(){var a="position: absolute !important; top: -1000 !important; ";h=h.clone().attr("style",a).appendTo("body")},e=function(){h.remove()};else{var i,j=[],k="";d=function(){i=h.parents().addBack().filter(":hidden"),k+="visibility: hidden !important; display: "+g.display+" !important; ",g.absolute===!0&&(k+="position: absolute !important; "),i.each(function(){var b=a(this),c=b.attr("style");j.push(c),b.attr("style",c?c+";"+k:k)})},e=function(){i.each(function(b){var c=a(this),d=j[b];void 0===d?c.removeAttr("style"):c.attr("style",d)})}}d();var l=/(outer)/.test(b)?h[b](g.includeMargin):h[b]();return e(),l}})}),function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.moment=b()}(this,function(){"use strict";function a(){return Hc.apply(null,arguments)}function b(a){Hc=a}function c(a){return"[object Array]"===Object.prototype.toString.call(a)}function d(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function e(a,b){var c,d=[];for(c=0;c0)for(c in Jc)d=Jc[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function n(b){m(this,b),this._d=new Date(null!=b._d?b._d.getTime():NaN),Kc===!1&&(Kc=!0,a.updateOffset(this),Kc=!1)}function o(a){return a instanceof n||null!=a&&null!=a._isAMomentObject}function p(a){return 0>a?Math.ceil(a):Math.floor(a)}function q(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=p(b)),c}function r(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&q(a[d])!==q(b[d]))&&g++;return g+f}function s(){}function t(a){return a?a.toLowerCase().replace("_","-"):a}function u(a){for(var b,c,d,e,f=0;f0;){if(d=v(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&r(e,c,!0)>=b-1)break;b--}f++}return null}function v(a){var b=null;if(!Lc[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=Ic._abbr,require("./locale/"+a),w(b)}catch(c){}return Lc[a]}function w(a,b){var c;return a&&(c="undefined"==typeof b?y(a):x(a,b),c&&(Ic=c)),Ic._abbr}function x(a,b){return null!==b?(b.abbr=a,Lc[a]=Lc[a]||new s,Lc[a].set(b),w(a),Lc[a]):(delete Lc[a],null)}function y(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return Ic;if(!c(a)){if(b=v(a))return b;a=[a]}return u(a)}function z(a,b){var c=a.toLowerCase();Mc[c]=Mc[c+"s"]=Mc[b]=a}function A(a){return"string"==typeof a?Mc[a]||Mc[a.toLowerCase()]:void 0}function B(a){var b,c,d={};for(c in a)f(a,c)&&(b=A(c),b&&(d[b]=a[c]));return d}function C(b,c){return function(d){return null!=d?(E(this,b,d),a.updateOffset(this,c),this):D(this,b)}}function D(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function E(a,b,c){return a._d["set"+(a._isUTC?"UTC":"")+b](c)}function F(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else if(a=A(a),"function"==typeof this[a])return this[a](b);return this}function G(a,b,c){var d=""+Math.abs(a),e=b-d.length,f=a>=0;return(f?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d}function H(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(Qc[a]=e),b&&(Qc[b[0]]=function(){return G(e.apply(this,arguments),b[1],b[2])}),c&&(Qc[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function I(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function J(a){var b,c,d=a.match(Nc);for(b=0,c=d.length;c>b;b++)Qc[d[b]]?d[b]=Qc[d[b]]:d[b]=I(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function K(a,b){return a.isValid()?(b=L(b,a.localeData()),Pc[b]=Pc[b]||J(b),Pc[b](a)):a.localeData().invalidDate()}function L(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Oc.lastIndex=0;d>=0&&Oc.test(a);)a=a.replace(Oc,c),Oc.lastIndex=0,d-=1;return a}function M(a){return"function"==typeof a&&"[object Function]"===Object.prototype.toString.call(a)}function N(a,b,c){dd[a]=M(b)?b:function(a){return a&&c?c:b}}function O(a,b){return f(dd,a)?dd[a](b._strict,b._locale):new RegExp(P(a))}function P(a){return a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Q(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),"number"==typeof b&&(d=function(a,c){c[b]=q(a)}),c=0;cd;d++){if(e=h([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}}function X(a,b){var c;return"string"==typeof b&&(b=a.localeData().monthsParse(b),"number"!=typeof b)?a:(c=Math.min(a.date(),T(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a)}function Y(b){return null!=b?(X(this,b),a.updateOffset(this,!0),this):D(this,"Month")}function Z(){return T(this.year(),this.month())}function $(a){var b,c=a._a;return c&&-2===j(a).overflow&&(b=c[gd]<0||c[gd]>11?gd:c[hd]<1||c[hd]>T(c[fd],c[gd])?hd:c[id]<0||c[id]>24||24===c[id]&&(0!==c[jd]||0!==c[kd]||0!==c[ld])?id:c[jd]<0||c[jd]>59?jd:c[kd]<0||c[kd]>59?kd:c[ld]<0||c[ld]>999?ld:-1,j(a)._overflowDayOfYear&&(fd>b||b>hd)&&(b=hd),j(a).overflow=b),a}function _(b){a.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function aa(a,b){var c=!0;return g(function(){return c&&(_(a+"\n"+(new Error).stack),c=!1),b.apply(this,arguments)},b)}function ba(a,b){od[a]||(_(b),od[a]=!0)}function ca(a){var b,c,d=a._i,e=pd.exec(d);if(e){for(j(a).iso=!0,b=0,c=qd.length;c>b;b++)if(qd[b][1].exec(d)){a._f=qd[b][0];break}for(b=0,c=rd.length;c>b;b++)if(rd[b][1].exec(d)){a._f+=(e[6]||" ")+rd[b][0];break}d.match(ad)&&(a._f+="Z"),va(a)}else a._isValid=!1}function da(b){var c=sd.exec(b._i);return null!==c?void(b._d=new Date(+c[1])):(ca(b),void(b._isValid===!1&&(delete b._isValid,a.createFromInputFallback(b))))}function ea(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function fa(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function ga(a){return ha(a)?366:365}function ha(a){return a%4===0&&a%100!==0||a%400===0}function ia(){return ha(this.year())}function ja(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=Da(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function ka(a){return ja(a,this._week.dow,this._week.doy).week}function la(){return this._week.dow}function ma(){return this._week.doy}function na(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function oa(a){var b=ja(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}function pa(a,b,c,d,e){var f,g=6+e-d,h=fa(a,0,1+g),i=h.getUTCDay();return e>i&&(i+=7),c=null!=c?1*c:e,f=1+g+7*(b-1)-i+c,{year:f>0?a:a-1,dayOfYear:f>0?f:ga(a-1)+f}}function qa(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function ra(a,b,c){return null!=a?a:null!=b?b:c}function sa(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function ta(a){var b,c,d,e,f=[];if(!a._d){for(d=sa(a),a._w&&null==a._a[hd]&&null==a._a[gd]&&ua(a),a._dayOfYear&&(e=ra(a._a[fd],d[fd]),a._dayOfYear>ga(e)&&(j(a)._overflowDayOfYear=!0),c=fa(e,0,a._dayOfYear),a._a[gd]=c.getUTCMonth(),a._a[hd]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=f[b]=d[b];for(;7>b;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];24===a._a[id]&&0===a._a[jd]&&0===a._a[kd]&&0===a._a[ld]&&(a._nextDay=!0,a._a[id]=0),a._d=(a._useUTC?fa:ea).apply(null,f),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[id]=24)}}function ua(a){var b,c,d,e,f,g,h;b=a._w,null!=b.GG||null!=b.W||null!=b.E?(f=1,g=4,c=ra(b.GG,a._a[fd],ja(Da(),1,4).year),d=ra(b.W,1),e=ra(b.E,1)):(f=a._locale._week.dow,g=a._locale._week.doy,c=ra(b.gg,a._a[fd],ja(Da(),f,g).year),d=ra(b.w,1),null!=b.d?(e=b.d,f>e&&++d):e=null!=b.e?b.e+f:f),h=pa(c,d,e,g,f),a._a[fd]=h.year,a._dayOfYear=h.dayOfYear}function va(b){if(b._f===a.ISO_8601)return void ca(b);b._a=[],j(b).empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,k=0;for(e=L(b._f,b._locale).match(Nc)||[],c=0;c0&&j(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),k+=d.length),Qc[f]?(d?j(b).empty=!1:j(b).unusedTokens.push(f),S(f,d,b)):b._strict&&!d&&j(b).unusedTokens.push(f);j(b).charsLeftOver=i-k,h.length>0&&j(b).unusedInput.push(h),j(b).bigHour===!0&&b._a[id]<=12&&b._a[id]>0&&(j(b).bigHour=void 0),b._a[id]=wa(b._locale,b._a[id],b._meridiem),ta(b),$(b)}function wa(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function xa(a){var b,c,d,e,f;if(0===a._f.length)return j(a).invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;ef)&&(d=f,c=b));g(a,c||b)}function ya(a){if(!a._d){var b=B(a._i);a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],ta(a)}}function za(a){var b=new n($(Aa(a)));return b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b}function Aa(a){var b=a._i,e=a._f;return a._locale=a._locale||y(a._l),null===b||void 0===e&&""===b?l({nullInput:!0}):("string"==typeof b&&(a._i=b=a._locale.preparse(b)),o(b)?new n($(b)):(c(e)?xa(a):e?va(a):d(b)?a._d=b:Ba(a),a))}function Ba(b){var f=b._i;void 0===f?b._d=new Date:d(f)?b._d=new Date(+f):"string"==typeof f?da(b):c(f)?(b._a=e(f.slice(0),function(a){return parseInt(a,10)}),ta(b)):"object"==typeof f?ya(b):"number"==typeof f?b._d=new Date(f):a.createFromInputFallback(b)}function Ca(a,b,c,d,e){var f={};return"boolean"==typeof c&&(d=c,c=void 0),f._isAMomentObject=!0,f._useUTC=f._isUTC=e,f._l=c,f._i=a,f._f=b,f._strict=d,za(f)}function Da(a,b,c,d){return Ca(a,b,c,d,!1)}function Ea(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return Da();for(d=b[0],e=1;ea&&(a=-a,c="-"),c+G(~~(a/60),2)+b+G(~~a%60,2)})}function Ka(a){var b=(a||"").match(ad)||[],c=b[b.length-1]||[],d=(c+"").match(xd)||["-",0,0],e=+(60*d[1])+q(d[2]);return"+"===d[0]?e:-e}function La(b,c){var e,f;return c._isUTC?(e=c.clone(),f=(o(b)||d(b)?+b:+Da(b))-+e,e._d.setTime(+e._d+f),a.updateOffset(e,!1),e):Da(b).local()}function Ma(a){return 15*-Math.round(a._d.getTimezoneOffset()/15)}function Na(b,c){var d,e=this._offset||0;return null!=b?("string"==typeof b&&(b=Ka(b)),Math.abs(b)<16&&(b=60*b),!this._isUTC&&c&&(d=Ma(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,"m"),e!==b&&(!c||this._changeInProgress?bb(this,Ya(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Ma(this)}function Oa(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Pa(a){return this.utcOffset(0,a)}function Qa(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Ma(this),"m")),this}function Ra(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ka(this._i)),this}function Sa(a){return a=a?Da(a).utcOffset():0,(this.utcOffset()-a)%60===0}function Ta(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ua(){if("undefined"!=typeof this._isDSTShifted)return this._isDSTShifted;var a={};if(m(a,this),a=Aa(a),a._a){var b=a._isUTC?h(a._a):Da(a._a);this._isDSTShifted=this.isValid()&&r(a._a,b.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Va(){return!this._isUTC}function Wa(){return this._isUTC}function Xa(){return this._isUTC&&0===this._offset}function Ya(a,b){var c,d,e,g=a,h=null;return Ia(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(g={},b?g[b]=a:g.milliseconds=a):(h=yd.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:q(h[hd])*c,h:q(h[id])*c,m:q(h[jd])*c,s:q(h[kd])*c,ms:q(h[ld])*c}):(h=zd.exec(a))?(c="-"===h[1]?-1:1,g={y:Za(h[2],c),M:Za(h[3],c),d:Za(h[4],c),h:Za(h[5],c),m:Za(h[6],c),s:Za(h[7],c),w:Za(h[8],c)}):null==g?g={}:"object"==typeof g&&("from"in g||"to"in g)&&(e=_a(Da(g.from),Da(g.to)),g={},g.ms=e.milliseconds,g.M=e.months),d=new Ha(g),Ia(a)&&f(a,"_locale")&&(d._locale=a._locale),d}function Za(a,b){var c=a&&parseFloat(a.replace(",","."));return(isNaN(c)?0:c)*b}function $a(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function _a(a,b){var c;return b=La(b,a),a.isBefore(b)?c=$a(a,b):(c=$a(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c}function ab(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(ba(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=Ya(c,d),bb(this,e,a),this}}function bb(b,c,d,e){var f=c._milliseconds,g=c._days,h=c._months;e=null==e?!0:e,f&&b._d.setTime(+b._d+f*d),g&&E(b,"Date",D(b,"Date")+g*d),h&&X(b,D(b,"Month")+h*d),e&&a.updateOffset(b,g||h)}function cb(a,b){var c=a||Da(),d=La(c,this).startOf("day"),e=this.diff(d,"days",!0),f=-6>e?"sameElse":-1>e?"lastWeek":0>e?"lastDay":1>e?"sameDay":2>e?"nextDay":7>e?"nextWeek":"sameElse";return this.format(b&&b[f]||this.localeData().calendar(f,this,Da(c)))}function db(){return new n(this)}function eb(a,b){var c;return b=A("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=o(a)?a:Da(a),+this>+a):(c=o(a)?+a:+Da(a),c<+this.clone().startOf(b))}function fb(a,b){var c;return b=A("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=o(a)?a:Da(a),+a>+this):(c=o(a)?+a:+Da(a),+this.clone().endOf(b)b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)}function kb(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function lb(){var a=this.clone().utc();return 0b;b++)if(this._weekdaysParse[b]||(c=Da([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b}function Pb(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=Kb(a,this.localeData()),this.add(a-b,"d")):b}function Qb(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function Rb(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)}function Sb(a,b){H(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function Tb(a,b){return b._meridiemParse}function Ub(a){return"p"===(a+"").toLowerCase().charAt(0)}function Vb(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function Wb(a,b){b[ld]=q(1e3*("0."+a))}function Xb(){return this._isUTC?"UTC":""}function Yb(){return this._isUTC?"Coordinated Universal Time":""}function Zb(a){return Da(1e3*a)}function $b(){return Da.apply(null,arguments).parseZone()}function _b(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.call(b,c):d}function ac(a){var b=this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];return b||!c?b:(this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a])}function bc(){return this._invalidDate}function cc(a){return this._ordinal.replace("%d",a)}function dc(a){return a}function ec(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)}function fc(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)}function gc(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function hc(a,b,c,d){var e=y(),f=h().set(d,b);return e[c](f,a)}function ic(a,b,c,d,e){if("number"==typeof a&&(b=a,a=void 0),a=a||"",null!=b)return hc(a,b,c,e);var f,g=[];for(f=0;d>f;f++)g[f]=hc(a,f,c,e);return g}function jc(a,b){return ic(a,b,"months",12,"month")}function kc(a,b){return ic(a,b,"monthsShort",12,"month")}function lc(a,b){return ic(a,b,"weekdays",7,"day")}function mc(a,b){return ic(a,b,"weekdaysShort",7,"day")}function nc(a,b){return ic(a,b,"weekdaysMin",7,"day")}function oc(){var a=this._data;return this._milliseconds=Wd(this._milliseconds),this._days=Wd(this._days),this._months=Wd(this._months),a.milliseconds=Wd(a.milliseconds),a.seconds=Wd(a.seconds),a.minutes=Wd(a.minutes),a.hours=Wd(a.hours),a.months=Wd(a.months),a.years=Wd(a.years),this}function pc(a,b,c,d){var e=Ya(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()}function qc(a,b){return pc(this,a,b,1)}function rc(a,b){return pc(this,a,b,-1)}function sc(a){return 0>a?Math.floor(a):Math.ceil(a)}function tc(){var a,b,c,d,e,f=this._milliseconds,g=this._days,h=this._months,i=this._data;return f>=0&&g>=0&&h>=0||0>=f&&0>=g&&0>=h||(f+=864e5*sc(vc(h)+g),g=0,h=0),i.milliseconds=f%1e3,a=p(f/1e3),i.seconds=a%60,b=p(a/60),i.minutes=b%60,c=p(b/60),i.hours=c%24,g+=p(c/24),e=p(uc(g)),h+=e,g-=sc(vc(e)),d=p(h/12),h%=12,i.days=g,i.months=h,i.years=d,this}function uc(a){return 4800*a/146097}function vc(a){return 146097*a/4800}function wc(a){var b,c,d=this._milliseconds;if(a=A(a),"month"===a||"year"===a)return b=this._days+d/864e5,c=this._months+uc(b),"month"===a?c:c/12;switch(b=this._days+Math.round(vc(this._months)),a){case"week":return b/7+d/6048e5;case"day":return b+d/864e5;case"hour":return 24*b+d/36e5;case"minute":return 1440*b+d/6e4;case"second":return 86400*b+d/1e3;case"millisecond":return Math.floor(864e5*b)+d;default:throw new Error("Unknown unit "+a)}}function xc(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*q(this._months/12)}function yc(a){return function(){return this.as(a)}}function zc(a){return a=A(a),this[a+"s"]()}function Ac(a){return function(){return this._data[a]}}function Bc(){return p(this.days()/7)}function Cc(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function Dc(a,b,c){var d=Ya(a).abs(),e=ke(d.as("s")),f=ke(d.as("m")),g=ke(d.as("h")),h=ke(d.as("d")),i=ke(d.as("M")),j=ke(d.as("y")),k=e0,k[4]=c,Cc.apply(null,k)}function Ec(a,b){return void 0===le[a]?!1:void 0===b?le[a]:(le[a]=b,!0)}function Fc(a){var b=this.localeData(),c=Dc(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function Gc(){var a,b,c,d=me(this._milliseconds)/1e3,e=me(this._days),f=me(this._months);a=p(d/60),b=p(a/60),d%=60,a%=60,c=p(f/12),f%=12;var g=c,h=f,i=e,j=b,k=a,l=d,m=this.asSeconds();return m?(0>m?"-":"")+"P"+(g?g+"Y":"")+(h?h+"M":"")+(i?i+"D":"")+(j||k||l?"T":"")+(j?j+"H":"")+(k?k+"M":"")+(l?l+"S":""):"P0D"}var Hc,Ic,Jc=a.momentProperties=[],Kc=!1,Lc={},Mc={},Nc=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Oc=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Pc={},Qc={},Rc=/\d/,Sc=/\d\d/,Tc=/\d{3}/,Uc=/\d{4}/,Vc=/[+-]?\d{6}/,Wc=/\d\d?/,Xc=/\d{1,3}/,Yc=/\d{1,4}/,Zc=/[+-]?\d{1,6}/,$c=/\d+/,_c=/[+-]?\d+/,ad=/Z|[+-]\d\d:?\d\d/gi,bd=/[+-]?\d+(\.\d{1,3})?/,cd=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,dd={},ed={},fd=0,gd=1,hd=2,id=3,jd=4,kd=5,ld=6;H("M",["MM",2],"Mo",function(){return this.month()+1}),H("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)}),H("MMMM",0,0,function(a){return this.localeData().months(this,a)}),z("month","M"),N("M",Wc),N("MM",Wc,Sc),N("MMM",cd),N("MMMM",cd),Q(["M","MM"],function(a,b){b[gd]=q(a)-1}),Q(["MMM","MMMM"],function(a,b,c,d){var e=c._locale.monthsParse(a,d,c._strict);null!=e?b[gd]=e:j(c).invalidMonth=a});var md="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),nd="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),od={};a.suppressDeprecationWarnings=!1;var pd=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,qd=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],rd=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],sd=/^\/?Date\((\-?\d+)/i;a.createFromInputFallback=aa("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),H(0,["YY",2],0,function(){return this.year()%100}),H(0,["YYYY",4],0,"year"),H(0,["YYYYY",5],0,"year"),H(0,["YYYYYY",6,!0],0,"year"),z("year","y"),N("Y",_c),N("YY",Wc,Sc),N("YYYY",Yc,Uc),N("YYYYY",Zc,Vc),N("YYYYYY",Zc,Vc),Q(["YYYYY","YYYYYY"],fd),Q("YYYY",function(b,c){c[fd]=2===b.length?a.parseTwoDigitYear(b):q(b)}),Q("YY",function(b,c){c[fd]=a.parseTwoDigitYear(b)}),a.parseTwoDigitYear=function(a){return q(a)+(q(a)>68?1900:2e3)};var td=C("FullYear",!1);H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),z("week","w"),z("isoWeek","W"),N("w",Wc),N("ww",Wc,Sc),N("W",Wc),N("WW",Wc,Sc),R(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=q(a)});var ud={dow:0,doy:6};H("DDD",["DDDD",3],"DDDo","dayOfYear"),z("dayOfYear","DDD"),N("DDD",Xc),N("DDDD",Tc),Q(["DDD","DDDD"],function(a,b,c){c._dayOfYear=q(a)}),a.ISO_8601=function(){};var vd=aa("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var a=Da.apply(null,arguments);return this>a?this:a}),wd=aa("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var a=Da.apply(null,arguments);return a>this?this:a});Ja("Z",":"),Ja("ZZ",""),N("Z",ad),N("ZZ",ad),Q(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=Ka(a)});var xd=/([\+\-]|\d\d)/gi;a.updateOffset=function(){};var yd=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,zd=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;Ya.fn=Ha.prototype;var Ad=ab(1,"add"),Bd=ab(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var Cd=aa("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});H(0,["gg",2],0,function(){return this.weekYear()%100}),H(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Db("gggg","weekYear"),Db("ggggg","weekYear"),Db("GGGG","isoWeekYear"),Db("GGGGG","isoWeekYear"),z("weekYear","gg"),z("isoWeekYear","GG"),N("G",_c),N("g",_c),N("GG",Wc,Sc),N("gg",Wc,Sc),N("GGGG",Yc,Uc),N("gggg",Yc,Uc),N("GGGGG",Zc,Vc),N("ggggg",Zc,Vc),R(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=q(a)}),R(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}),H("Q",0,0,"quarter"),z("quarter","Q"),N("Q",Rc),Q("Q",function(a,b){b[gd]=3*(q(a)-1)}),H("D",["DD",2],"Do","date"),z("date","D"),N("D",Wc),N("DD",Wc,Sc),N("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient}),Q(["D","DD"],hd),Q("Do",function(a,b){b[hd]=q(a.match(Wc)[0],10)});var Dd=C("Date",!0);H("d",0,"do","day"),H("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),H("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),H("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),z("day","d"),z("weekday","e"),z("isoWeekday","E"),N("d",Wc),N("e",Wc),N("E",Wc),N("dd",cd),N("ddd",cd),N("dddd",cd),R(["dd","ddd","dddd"],function(a,b,c){var d=c._locale.weekdaysParse(a);null!=d?b.d=d:j(c).invalidWeekday=a}),R(["d","e","E"],function(a,b,c,d){b[d]=q(a)});var Ed="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Fd="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Gd="Su_Mo_Tu_We_Th_Fr_Sa".split("_");H("H",["HH",2],0,"hour"),H("h",["hh",2],0,function(){return this.hours()%12||12}),Sb("a",!0),Sb("A",!1),z("hour","h"),N("a",Tb),N("A",Tb),N("H",Wc),N("h",Wc),N("HH",Wc,Sc),N("hh",Wc,Sc),Q(["H","HH"],id),Q(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),Q(["h","hh"],function(a,b,c){b[id]=q(a),j(c).bigHour=!0});var Hd=/[ap]\.?m?\.?/i,Id=C("Hours",!0);H("m",["mm",2],0,"minute"),z("minute","m"),N("m",Wc),N("mm",Wc,Sc),Q(["m","mm"],jd);var Jd=C("Minutes",!1);H("s",["ss",2],0,"second"),z("second","s"),N("s",Wc),N("ss",Wc,Sc),Q(["s","ss"],kd);var Kd=C("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)}),H(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,function(){return 10*this.millisecond()}),H(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),H(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),H(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),H(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),H(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),z("millisecond","ms"),N("S",Xc,Rc),N("SS",Xc,Sc),N("SSS",Xc,Tc);var Ld;for(Ld="SSSS";Ld.length<=9;Ld+="S")N(Ld,$c);for(Ld="S";Ld.length<=9;Ld+="S")Q(Ld,Wb);var Md=C("Milliseconds",!1);H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");var Nd=n.prototype;Nd.add=Ad,Nd.calendar=cb,Nd.clone=db,Nd.diff=ib,Nd.endOf=ub,Nd.format=mb,Nd.from=nb,Nd.fromNow=ob,Nd.to=pb,Nd.toNow=qb,Nd.get=F,Nd.invalidAt=Cb,Nd.isAfter=eb,Nd.isBefore=fb,Nd.isBetween=gb,Nd.isSame=hb,Nd.isValid=Ab,Nd.lang=Cd,Nd.locale=rb,Nd.localeData=sb,Nd.max=wd,Nd.min=vd,Nd.parsingFlags=Bb,Nd.set=F,Nd.startOf=tb,Nd.subtract=Bd,Nd.toArray=yb,Nd.toObject=zb,Nd.toDate=xb,Nd.toISOString=lb,Nd.toJSON=lb,Nd.toString=kb,Nd.unix=wb,Nd.valueOf=vb,Nd.year=td,Nd.isLeapYear=ia,Nd.weekYear=Fb,Nd.isoWeekYear=Gb,Nd.quarter=Nd.quarters=Jb,Nd.month=Y,Nd.daysInMonth=Z,Nd.week=Nd.weeks=na,Nd.isoWeek=Nd.isoWeeks=oa,Nd.weeksInYear=Ib,Nd.isoWeeksInYear=Hb,Nd.date=Dd,Nd.day=Nd.days=Pb,Nd.weekday=Qb,Nd.isoWeekday=Rb,Nd.dayOfYear=qa,Nd.hour=Nd.hours=Id,Nd.minute=Nd.minutes=Jd,Nd.second=Nd.seconds=Kd,Nd.millisecond=Nd.milliseconds=Md,Nd.utcOffset=Na,Nd.utc=Pa,Nd.local=Qa,Nd.parseZone=Ra,Nd.hasAlignedHourOffset=Sa,Nd.isDST=Ta,Nd.isDSTShifted=Ua,Nd.isLocal=Va,Nd.isUtcOffset=Wa,Nd.isUtc=Xa,Nd.isUTC=Xa,Nd.zoneAbbr=Xb,Nd.zoneName=Yb,Nd.dates=aa("dates accessor is deprecated. Use date instead.",Dd),Nd.months=aa("months accessor is deprecated. Use month instead",Y),Nd.years=aa("years accessor is deprecated. Use year instead",td),Nd.zone=aa("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Oa);var Od=Nd,Pd={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Qd={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Rd="Invalid date",Sd="%d",Td=/\d{1,2}/,Ud={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Vd=s.prototype;Vd._calendar=Pd,Vd.calendar=_b,Vd._longDateFormat=Qd,Vd.longDateFormat=ac,Vd._invalidDate=Rd,Vd.invalidDate=bc,Vd._ordinal=Sd,Vd.ordinal=cc,Vd._ordinalParse=Td,Vd.preparse=dc,Vd.postformat=dc,Vd._relativeTime=Ud,Vd.relativeTime=ec,Vd.pastFuture=fc,Vd.set=gc,Vd.months=U,Vd._months=md,Vd.monthsShort=V,Vd._monthsShort=nd,Vd.monthsParse=W,Vd.week=ka,Vd._week=ud,Vd.firstDayOfYear=ma,Vd.firstDayOfWeek=la,Vd.weekdays=Lb,Vd._weekdays=Ed,Vd.weekdaysMin=Nb,Vd._weekdaysMin=Gd,Vd.weekdaysShort=Mb,Vd._weekdaysShort=Fd,Vd.weekdaysParse=Ob,Vd.isPM=Ub,Vd._meridiemParse=Hd,Vd.meridiem=Vb,w("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===q(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),a.lang=aa("moment.lang is deprecated. Use moment.locale instead.",w),a.langData=aa("moment.langData is deprecated. Use moment.localeData instead.",y);var Wd=Math.abs,Xd=yc("ms"),Yd=yc("s"),Zd=yc("m"),$d=yc("h"),_d=yc("d"),ae=yc("w"),be=yc("M"),ce=yc("y"),de=Ac("milliseconds"),ee=Ac("seconds"),fe=Ac("minutes"),ge=Ac("hours"),he=Ac("days"),ie=Ac("months"),je=Ac("years"),ke=Math.round,le={s:45,m:45,h:22,d:26,M:11},me=Math.abs,ne=Ha.prototype;ne.abs=oc,ne.add=qc,ne.subtract=rc,ne.as=wc,ne.asMilliseconds=Xd,ne.asSeconds=Yd,ne.asMinutes=Zd,ne.asHours=$d,ne.asDays=_d,ne.asWeeks=ae,ne.asMonths=be,ne.asYears=ce,ne.valueOf=xc,ne._bubble=tc,ne.get=zc,ne.milliseconds=de,ne.seconds=ee,ne.minutes=fe,ne.hours=ge,ne.days=he,ne.weeks=Bc,ne.months=ie,ne.years=je,ne.humanize=Fc,ne.toISOString=Gc,ne.toString=Gc,ne.toJSON=Gc,ne.locale=rb,ne.localeData=sb,ne.toIsoString=aa("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Gc),ne.lang=Cd,H("X",0,0,"unix"),H("x",0,0,"valueOf"),N("x",_c),N("X",bd),Q("X",function(a,b,c){c._d=new Date(1e3*parseFloat(a,10))}),Q("x",function(a,b,c){c._d=new Date(q(a))}),a.version="2.10.6",b(Da),a.fn=Od,a.min=Fa,a.max=Ga,a.utc=h,a.unix=Zb,a.months=jc,a.isDate=d,a.locale=w,a.invalid=l,a.duration=Ya,a.isMoment=o,a.weekdays=lc,a.parseZone=$b,a.localeData=y,a.isDuration=Ia,a.monthsShort=kc,a.weekdaysMin=nc,a.defineLocale=x,a.weekdaysShort=mc,a.normalizeUnits=A,a.relativeTimeThreshold=Ec;var oe=a;return oe}),!function(a){angular.module("ngCsv.config",[]).value("ngCsv.config",{debug:!0}).config(["$compileProvider",function(a){angular.isDefined(a.urlSanitizationWhitelist)?a.urlSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|data):/):a.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|data):/)}]),angular.module("ngCsv.directives",["ngCsv.services"]),angular.module("ngCsv.services",[]),angular.module("ngCsv",["ngCsv.config","ngCsv.services","ngCsv.directives","ngSanitize"]),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ngCsv"),angular.module("ngCsv.services").service("CSV",["$q",function(a){var b="\r\n",c="\ufeff",d={"\\t":" ","\\b":"\b","\\v":"\x0B","\\f":"\f","\\r":"\r"};this.stringifyField=function(a,b){return"locale"===b.decimalSep&&this.isFloat(a)?a.toLocaleString():"."!==b.decimalSep&&this.isFloat(a)?a.toString().replace(".",b.decimalSep):"string"==typeof a?(a=a.replace(/"/g,'""'),(b.quoteStrings||a.indexOf(",")>-1||a.indexOf("\n")>-1||a.indexOf("\r")>-1)&&(a=b.txtDelim+a+b.txtDelim),a):"boolean"==typeof a?a?"TRUE":"FALSE":a},this.isFloat=function(a){return+a===a&&(!isFinite(a)||Boolean(a%1))},this.stringify=function(d,e){var f=a.defer(),g=this,h="",i="",j=a.when(d).then(function(a){if(angular.isDefined(e.header)&&e.header){var d,j;d=[],angular.forEach(e.header,function(a){this.push(g.stringifyField(a,e))},d),j=d.join(e.fieldSep?e.fieldSep:","),i+=j+b}var k=[];if(angular.isArray(a)?k=a:angular.isFunction(a)&&(k=a()),angular.isDefined(e.label)&&e.label&&"boolean"==typeof e.label){var l,m;l=[],angular.forEach(k[0],function(a,b){this.push(g.stringifyField(b,e))},l),m=l.join(e.fieldSep?e.fieldSep:","),i+=m+b}angular.forEach(k,function(a,c){var d,f,h=angular.copy(k[c]);f=[];var j=e.columnOrder?e.columnOrder:h;angular.forEach(j,function(a){var b=e.columnOrder?h[a]:a;this.push(g.stringifyField(b,e))},f),d=f.join(e.fieldSep?e.fieldSep:","),i+=c
        '),h=angular.element(g.children()[0]);h.attr("href",a.URL.createObjectURL(d)),h.attr("download",b.getFilename()),h.attr("target","_blank"),e.find("body").append(g),f(function(){h[0].click(),h.remove()},null)}}c.bind("click",function(){b.buildCSV().then(function(){d()}),b.$apply()})}}}])}(window,document),function(angular){"use strict";if(!angular)throw"Missing something? Please add angular.js to your project or move this script below the angular.js reference";var directiveId="ngRemoteValidate",remoteValidate=function($http,$timeout,$q){return{restrict:"A",require:["^form","ngModel"],scope:{ngRemoteInterceptors:"=?"},link:function(scope,el,attrs,ctrls){var cache={},handleChange,setValidation,addToCache,request,shouldProcess,ngForm=ctrls[0],ngModel=ctrls[1],options={ngRemoteThrottle:400,ngRemoteMethod:"POST"};angular.extend(options,attrs),"["===options.ngRemoteValidate.charAt(0)?options.urls=eval(options.ngRemoteValidate):"{"===options.ngRemoteValidate.charAt(0)?(options.keys=eval("("+options.ngRemoteValidate+")"),options.urls=Object.keys(options.keys)):options.urls=[options.ngRemoteValidate],addToCache=function(a){var b=a[0].data.value;return cache[b]?cache[b]:void(cache[b]=a)},shouldProcess=function(a){var b=!1;for(var c in ngModel.$error){var d=!options.hasOwnProperty("keys")||!Object.keys(options.keys).filter(function(a){return options.keys[a]===c})[0];if(ngModel.$error[c]&&c!=directiveId&&d){b=!0;break}}return!(ngModel.$pristine||b)},setValidation=function(a,b){for(var c=0,d=a.length,e=options.hasOwnProperty("keys"),f=!0;d>c&&(scope.ngRemoteInterceptors&&scope.ngRemoteInterceptors.response&&(a[c]=scope.ngRemoteInterceptors.response(a[c])),a[c].data.isValid||(f=!1,e));c++){var g=e&&a[c].hasOwnProperty("config")&&options.keys[a[c].config.url];if(g){var h=options.keys[a[c].config.url];ngModel.$setValidity(h,a[c].data.isValid)}}b||addToCache(a),ngModel.$setValidity(directiveId,f),ngModel.$processing=ngModel.$pending=ngForm.$pending=!1},handleChange=function(a){return"undefined"==typeof a||""===a?void ngModel.$setPristine():shouldProcess(a)?cache[a]?setValidation(cache[a],!0):(ngModel.$pending||(ngModel.$processing=ngModel.$pending=ngForm.$pending=!0),request&&$timeout.cancel(request),request=$timeout(function(){var b=[],c=0,d=options.urls.length,e={value:a},f={method:options.ngRemoteMethod};for(scope[el[0].name+"SetArgs"]&&(e=scope[el[0].name+"SetArgs"](a,el,attrs,ngModel)),"POST"==options.ngRemoteMethod?f.data=e:f.params=e;d>c;c++)f.url=options.urls[c],scope.ngRemoteInterceptors&&scope.ngRemoteInterceptors.request&&(f=scope.ngRemoteInterceptors.request(f)),b.push($http(f));$q.all(b).then(setValidation)},options.ngRemoteThrottle),!0):setValidation([{data:{isValid:!0,value:a}}],!0)},scope.$watch(function(){return ngModel.$viewValue},handleChange)}}};angular.module("remoteValidation",[]).constant("MODULE_VERSION","0.6.1").directive(directiveId,["$http","$timeout","$q",remoteValidate])}(this.angular),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),function(a){"undefined"!=typeof module&&module.exports?module.exports=a:a(jQuery,window,document)}(function(a){!function(b){var c="function"==typeof define&&define.amd,d="undefined"!=typeof module&&module.exports,e="https:"==document.location.protocol?"https:":"http:",f="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";c||(d?require("jquery-mousewheel")(a):a.event.special.mousewheel||a("head").append(decodeURI("%3Cscript src="+e+"//"+f+"%3E%3C/script%3E"))),b()}(function(){var b,c="mCustomScrollbar",d="mCS",e=".mCustomScrollbar",f={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},g=0,h={},i=window.attachEvent&&!window.addEventListener?1:0,j=!1,k=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],l={init:function(b){var b=a.extend(!0,{},f,b),c=m.call(this);if(b.live){var i=b.liveSelector||this.selector||e,j=a(i);if("off"===b.live)return void o(i);h[i]=setTimeout(function(){j.mCustomScrollbar(b),"once"===b.live&&j.length&&o(i)},500)}else o(i);return b.setWidth=b.set_width?b.set_width:b.setWidth,b.setHeight=b.set_height?b.set_height:b.setHeight,b.axis=b.horizontalScroll?"x":p(b.axis),b.scrollInertia=b.scrollInertia>0&&b.scrollInertia<17?17:b.scrollInertia,"object"!=typeof b.mouseWheel&&1==b.mouseWheel&&(b.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),b.mouseWheel.scrollAmount=b.mouseWheelPixels?b.mouseWheelPixels:b.mouseWheel.scrollAmount,b.mouseWheel.normalizeDelta=b.advanced.normalizeMouseWheelDelta?b.advanced.normalizeMouseWheelDelta:b.mouseWheel.normalizeDelta,b.scrollButtons.scrollType=q(b.scrollButtons.scrollType),n(b),a(c).each(function(){var c=a(this);if(!c.data(d)){c.data(d,{idx:++g,opt:b,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:c.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var e=c.data(d),f=e.opt,h=c.data("mcs-axis"),i=c.data("mcs-scrollbar-position"),j=c.data("mcs-theme");h&&(f.axis=h),i&&(f.scrollbarPosition=i),j&&(f.theme=j,n(f)),r.call(this),e&&f.callbacks.onCreate&&"function"==typeof f.callbacks.onCreate&&f.callbacks.onCreate.call(this),a("#mCSB_"+e.idx+"_container img:not(."+k[2]+")").addClass(k[2]),l.update.call(null,c)}})},update:function(b,c){var e=b||m.call(this);return a(e).each(function(){var b=a(this);if(b.data(d)){var e=b.data(d),f=e.opt,g=a("#mCSB_"+e.idx+"_container"),h=a("#mCSB_"+e.idx),i=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];if(!g.length)return;e.tweenRunning&&U(b),c&&e&&f.callbacks.onBeforeUpdate&&"function"==typeof f.callbacks.onBeforeUpdate&&f.callbacks.onBeforeUpdate.call(this),b.hasClass(k[3])&&b.removeClass(k[3]),b.hasClass(k[4])&&b.removeClass(k[4]),h.css("max-height","none"),h.height()!==b.height()&&h.css("max-height",b.height()),t.call(this),"y"===f.axis||f.advanced.autoExpandHorizontalScroll||g.css("width",s(g)),e.overflowed=y.call(this),C.call(this),f.autoDraggerLength&&v.call(this),w.call(this),A.call(this);var j=[Math.abs(g[0].offsetTop),Math.abs(g[0].offsetLeft)];"x"!==f.axis&&(e.overflowed[0]?i[0].height()>i[0].parent().height()?z.call(this):(V(b,j[0].toString(),{dir:"y",dur:0,overwrite:"none"}),e.contentReset.y=null):(z.call(this),"y"===f.axis?B.call(this):"yx"===f.axis&&e.overflowed[1]&&V(b,j[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==f.axis&&(e.overflowed[1]?i[1].width()>i[1].parent().width()?z.call(this):(V(b,j[1].toString(),{dir:"x",dur:0,overwrite:"none"}),e.contentReset.x=null):(z.call(this),"x"===f.axis?B.call(this):"yx"===f.axis&&e.overflowed[0]&&V(b,j[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),c&&e&&(2===c&&f.callbacks.onImageLoad&&"function"==typeof f.callbacks.onImageLoad?f.callbacks.onImageLoad.call(this):3===c&&f.callbacks.onSelectorChange&&"function"==typeof f.callbacks.onSelectorChange?f.callbacks.onSelectorChange.call(this):f.callbacks.onUpdate&&"function"==typeof f.callbacks.onUpdate&&f.callbacks.onUpdate.call(this)), -S.call(this)}})},scrollTo:function(b,c){if("undefined"!=typeof b&&null!=b){var e=m.call(this);return a(e).each(function(){var e=a(this);if(e.data(d)){var f=e.data(d),g=f.opt,h={trigger:"external",scrollInertia:g.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},i=a.extend(!0,{},h,c),j=Q.call(this,b),k=i.scrollInertia>0&&i.scrollInertia<17?17:i.scrollInertia;j[0]=R.call(this,j[0],"y"),j[1]=R.call(this,j[1],"x"),i.moveDragger&&(j[0]*=f.scrollRatio.y,j[1]*=f.scrollRatio.x),i.dur=ca()?0:k,setTimeout(function(){null!==j[0]&&"undefined"!=typeof j[0]&&"x"!==g.axis&&f.overflowed[0]&&(i.dir="y",i.overwrite="all",V(e,j[0].toString(),i)),null!==j[1]&&"undefined"!=typeof j[1]&&"y"!==g.axis&&f.overflowed[1]&&(i.dir="x",i.overwrite="none",V(e,j[1].toString(),i))},i.timeout)}})}},stop:function(){var b=m.call(this);return a(b).each(function(){var b=a(this);b.data(d)&&U(b)})},disable:function(b){var c=m.call(this);return a(c).each(function(){var c=a(this);if(c.data(d)){c.data(d);S.call(this,"remove"),B.call(this),b&&z.call(this),C.call(this,!0),c.addClass(k[3])}})},destroy:function(){var b=m.call(this);return a(b).each(function(){var e=a(this);if(e.data(d)){var f=e.data(d),g=f.opt,h=a("#mCSB_"+f.idx),i=a("#mCSB_"+f.idx+"_container"),j=a(".mCSB_"+f.idx+"_scrollbar");g.live&&o(g.liveSelector||a(b).selector),S.call(this,"remove"),B.call(this),z.call(this),e.removeData(d),Z(this,"mcs"),j.remove(),i.find("img."+k[2]).removeClass(k[2]),h.replaceWith(i.contents()),e.removeClass(c+" _"+d+"_"+f.idx+" "+k[6]+" "+k[7]+" "+k[5]+" "+k[3]).addClass(k[4])}})}},m=function(){return"object"!=typeof a(this)||a(this).length<1?e:this},n=function(b){var c=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],d=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],e=["minimal","minimal-dark"],f=["minimal","minimal-dark"],g=["minimal","minimal-dark"];b.autoDraggerLength=a.inArray(b.theme,c)>-1?!1:b.autoDraggerLength,b.autoExpandScrollbar=a.inArray(b.theme,d)>-1?!1:b.autoExpandScrollbar,b.scrollButtons.enable=a.inArray(b.theme,e)>-1?!1:b.scrollButtons.enable,b.autoHideScrollbar=a.inArray(b.theme,f)>-1?!0:b.autoHideScrollbar,b.scrollbarPosition=a.inArray(b.theme,g)>-1?"outside":b.scrollbarPosition},o=function(a){h[a]&&(clearTimeout(h[a]),Z(h,a))},p=function(a){return"yx"===a||"xy"===a||"auto"===a?"yx":"x"===a||"horizontal"===a?"x":"y"},q=function(a){return"stepped"===a||"pixels"===a||"step"===a||"click"===a?"stepped":"stepless"},r=function(){var b=a(this),e=b.data(d),f=e.opt,g=f.autoExpandScrollbar?" "+k[1]+"_expand":"",h=["
        ","
        "],i="yx"===f.axis?"mCSB_vertical_horizontal":"x"===f.axis?"mCSB_horizontal":"mCSB_vertical",j="yx"===f.axis?h[0]+h[1]:"x"===f.axis?h[1]:h[0],l="yx"===f.axis?"
        ":"",m=f.autoHideScrollbar?" "+k[6]:"",n="x"!==f.axis&&"rtl"===e.langDir?" "+k[7]:"";f.setWidth&&b.css("width",f.setWidth),f.setHeight&&b.css("height",f.setHeight),f.setLeft="y"!==f.axis&&"rtl"===e.langDir?"989999px":f.setLeft,b.addClass(c+" _"+d+"_"+e.idx+m+n).wrapInner("
        ");var o=a("#mCSB_"+e.idx),p=a("#mCSB_"+e.idx+"_container");"y"===f.axis||f.advanced.autoExpandHorizontalScroll||p.css("width",s(p)),"outside"===f.scrollbarPosition?("static"===b.css("position")&&b.css("position","relative"),b.css("overflow","visible"),o.addClass("mCSB_outside").after(j)):(o.addClass("mCSB_inside").append(j),p.wrap(l)),u.call(this);var q=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")];q[0].css("min-height",q[0].height()),q[1].css("min-width",q[1].width())},s=function(b){var c=[b[0].scrollWidth,Math.max.apply(Math,b.children().map(function(){return a(this).outerWidth(!0)}).get())],d=b.parent().width();return c[0]>d?c[0]:c[1]>d?c[1]:"100%"},t=function(){var b=a(this),c=b.data(d),e=c.opt,f=a("#mCSB_"+c.idx+"_container");if(e.advanced.autoExpandHorizontalScroll&&"y"!==e.axis){f.css({width:"auto","min-width":0,"overflow-x":"scroll"});var g=Math.ceil(f[0].scrollWidth);3===e.advanced.autoExpandHorizontalScroll||2!==e.advanced.autoExpandHorizontalScroll&&g>f.parent().width()?f.css({width:g,"min-width":"100%","overflow-x":"inherit"}):f.css({"overflow-x":"inherit",position:"absolute"}).wrap("
        ").css({width:Math.ceil(f[0].getBoundingClientRect().right+.4)-Math.floor(f[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},u=function(){var b=a(this),c=b.data(d),e=c.opt,f=a(".mCSB_"+c.idx+"_scrollbar:first"),g=aa(e.scrollButtons.tabindex)?"tabindex='"+e.scrollButtons.tabindex+"'":"",h=["","","",""],i=["x"===e.axis?h[2]:h[0],"x"===e.axis?h[3]:h[1],h[2],h[3]];e.scrollButtons.enable&&f.prepend(i[0]).append(i[1]).next(".mCSB_scrollTools").prepend(i[2]).append(i[3])},v=function(){var b=a(this),c=b.data(d),e=a("#mCSB_"+c.idx),f=a("#mCSB_"+c.idx+"_container"),g=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")],h=[e.height()/f.outerHeight(!1),e.width()/f.outerWidth(!1)],j=[parseInt(g[0].css("min-height")),Math.round(h[0]*g[0].parent().height()),parseInt(g[1].css("min-width")),Math.round(h[1]*g[1].parent().width())],k=i&&j[1]g&&(g=i),j>h&&(h=j),[g>e.height(),h>e.width()]},z=function(){var b=a(this),c=b.data(d),e=c.opt,f=a("#mCSB_"+c.idx),g=a("#mCSB_"+c.idx+"_container"),h=[a("#mCSB_"+c.idx+"_dragger_vertical"),a("#mCSB_"+c.idx+"_dragger_horizontal")];if(U(b),("x"!==e.axis&&!c.overflowed[0]||"y"===e.axis&&c.overflowed[0])&&(h[0].add(g).css("top",0),V(b,"_resetY")),"y"!==e.axis&&!c.overflowed[1]||"x"===e.axis&&c.overflowed[1]){var i=dx=0;"rtl"===c.langDir&&(i=f.width()-g.outerWidth(!1),dx=Math.abs(i/c.scrollRatio.x)),g.css("left",i),h[1].css("left",dx),V(b,"_resetX")}},A=function(){function b(){g=setTimeout(function(){a.event.special.mousewheel?(clearTimeout(g),H.call(c[0])):b()},100)}var c=a(this),e=c.data(d),f=e.opt;if(!e.bindEvents){if(E.call(this),f.contentTouchScroll&&F.call(this),G.call(this),f.mouseWheel.enable){var g;b()}K.call(this),M.call(this),f.advanced.autoScrollOnFocus&&L.call(this),f.scrollButtons.enable&&N.call(this),f.keyboard.enable&&O.call(this),e.bindEvents=!0}},B=function(){var b=a(this),c=b.data(d),e=c.opt,f=d+"_"+c.idx,g=".mCSB_"+c.idx+"_scrollbar",h=a("#mCSB_"+c.idx+",#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,"+g+" ."+k[12]+",#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal,"+g+">a"),i=a("#mCSB_"+c.idx+"_container");e.advanced.releaseDraggableSelectors&&h.add(a(e.advanced.releaseDraggableSelectors)),e.advanced.extraDraggableSelectors&&h.add(a(e.advanced.extraDraggableSelectors)),c.bindEvents&&(a(document).add(a(!I()||top.document)).unbind("."+f),h.each(function(){a(this).unbind("."+f)}),clearTimeout(b[0]._focusTimeout),Z(b[0],"_focusTimeout"),clearTimeout(c.sequential.step),Z(c.sequential,"step"),clearTimeout(i[0].onCompleteTimeout),Z(i[0],"onCompleteTimeout"),c.bindEvents=!1)},C=function(b){var c=a(this),e=c.data(d),f=e.opt,g=a("#mCSB_"+e.idx+"_container_wrapper"),h=g.length?g:a("#mCSB_"+e.idx+"_container"),i=[a("#mCSB_"+e.idx+"_scrollbar_vertical"),a("#mCSB_"+e.idx+"_scrollbar_horizontal")],j=[i[0].find(".mCSB_dragger"),i[1].find(".mCSB_dragger")];"x"!==f.axis&&(e.overflowed[0]&&!b?(i[0].add(j[0]).add(i[0].children("a")).css("display","block"),h.removeClass(k[8]+" "+k[10])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[0].css("display","none"),h.removeClass(k[10])):(i[0].css("display","none"),h.addClass(k[10])),h.addClass(k[8]))),"y"!==f.axis&&(e.overflowed[1]&&!b?(i[1].add(j[1]).add(i[1].children("a")).css("display","block"),h.removeClass(k[9]+" "+k[11])):(f.alwaysShowScrollbar?(2!==f.alwaysShowScrollbar&&j[1].css("display","none"),h.removeClass(k[11])):(i[1].css("display","none"),h.addClass(k[11])),h.addClass(k[9]))),e.overflowed[0]||e.overflowed[1]?c.removeClass(k[5]):c.addClass(k[5])},D=function(b){var c=b.type,d=b.target.ownerDocument!==document?[a(frameElement).offset().top,a(frameElement).offset().left]:null,e=I()&&b.target.ownerDocument!==top.document?[a(b.view.frameElement).offset().top,a(b.view.frameElement).offset().left]:[0,0];switch(c){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return d?[b.originalEvent.pageY-d[0]+e[0],b.originalEvent.pageX-d[1]+e[1],!1]:[b.originalEvent.pageY,b.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var f=b.originalEvent.touches[0]||b.originalEvent.changedTouches[0],g=b.originalEvent.touches.length||b.originalEvent.changedTouches.length;return b.target.ownerDocument!==document?[f.screenY,f.screenX,g>1]:[f.pageY,f.pageX,g>1];default:return d?[b.pageY-d[0]+e[0],b.pageX-d[1]+e[1],!1]:[b.pageY,b.pageX,!1]}},E=function(){function b(a){var b=o.find("iframe");if(b.length){var c=a?"auto":"none";b.css("pointer-events",c)}}function c(a,b,c,d){if(o[0].idleTimer=l.scrollInertia<233?250:0,e.attr("id")===n[1])var f="x",g=(e[0].offsetLeft-b+d)*k.scrollRatio.x;else var f="y",g=(e[0].offsetTop-a+c)*k.scrollRatio.y;V(h,g.toString(),{dir:f,drag:!0})}var e,f,g,h=a(this),k=h.data(d),l=k.opt,m=d+"_"+k.idx,n=["mCSB_"+k.idx+"_dragger_vertical","mCSB_"+k.idx+"_dragger_horizontal"],o=a("#mCSB_"+k.idx+"_container"),p=a("#"+n[0]+",#"+n[1]),q=l.advanced.releaseDraggableSelectors?p.add(a(l.advanced.releaseDraggableSelectors)):p,r=l.advanced.extraDraggableSelectors?a(!I()||top.document).add(a(l.advanced.extraDraggableSelectors)):a(!I()||top.document);p.bind("mousedown."+m+" touchstart."+m+" pointerdown."+m+" MSPointerDown."+m,function(c){if(c.stopImmediatePropagation(),c.preventDefault(),$(c)){j=!0,i&&(document.onselectstart=function(){return!1}),b(!1),U(h),e=a(this);var d=e.offset(),k=D(c)[0]-d.top,m=D(c)[1]-d.left,n=e.height()+d.top,o=e.width()+d.left;n>k&&k>0&&o>m&&m>0&&(f=k,g=m),x(e,"active",l.autoExpandScrollbar)}}).bind("touchmove."+m,function(a){a.stopImmediatePropagation(),a.preventDefault();var b=e.offset(),d=D(a)[0]-b.top,h=D(a)[1]-b.left;c(f,g,d,h)}),a(document).add(r).bind("mousemove."+m+" pointermove."+m+" MSPointerMove."+m,function(a){if(e){var b=e.offset(),d=D(a)[0]-b.top,h=D(a)[1]-b.left;if(f===d&&g===h)return;c(f,g,d,h)}}).add(q).bind("mouseup."+m+" touchend."+m+" pointerup."+m+" MSPointerUp."+m,function(a){e&&(x(e,"active",l.autoExpandScrollbar),e=null),j=!1,i&&(document.onselectstart=null),b(!0)})},F=function(){function c(a){if(!_(a)||j||D(a)[2])return void(b=0);b=1,w=0,x=0,k=1,y.removeClass("mCS_touch_action");var c=E.offset();l=D(a)[0]-c.top,m=D(a)[1]-c.left,L=[D(a)[0],D(a)[1]]}function e(a){if(_(a)&&!j&&!D(a)[2]&&(A.documentTouchScroll||a.preventDefault(),a.stopImmediatePropagation(),(!x||w)&&k)){q=X();var b=C.offset(),c=D(a)[0]-b.top,d=D(a)[1]-b.left,e="mcsLinearOut";if(G.push(c),H.push(d),L[2]=Math.abs(D(a)[0]-L[0]),L[3]=Math.abs(D(a)[1]-L[1]),z.overflowed[0])var f=F[0].parent().height()-F[0].height(),g=l-c>0&&c-l>-(f*z.scrollRatio.y)&&(2*L[3]0&&d-m>-(h*z.scrollRatio.x)&&(2*L[2]30)){t=1e3/(r-p);var e="mcsEaseOut",f=2.5>t,g=f?[G[G.length-2],H[H.length-2]]:[0,0];s=f?[c-g[0],d-g[1]]:[c-n,d-o];var l=[Math.abs(s[0]),Math.abs(s[1])];t=f?[Math.abs(s[0]/4),Math.abs(s[1]/4)]:[t,t];var m=[Math.abs(E[0].offsetTop)-s[0]*h(l[0]/t[0],t[0]),Math.abs(E[0].offsetLeft)-s[1]*h(l[1]/t[1],t[1])];u="yx"===A.axis?[m[0],m[1]]:"x"===A.axis?[null,m[1]]:[m[0],null],v=[4*l[0]+A.scrollInertia,4*l[1]+A.scrollInertia];var y=parseInt(A.contentTouchScroll)||0;u[0]=l[0]>y?u[0]:0,u[1]=l[1]>y?u[1]:0,z.overflowed[0]&&i(u[0],v[0],e,"y",K,!1),z.overflowed[1]&&i(u[1],v[1],e,"x",K,!1)}}}function h(a,b){var c=[1.5*b,2*b,b/1.5,b/2];return a>90?b>4?c[0]:c[3]:a>60?b>3?c[3]:c[2]:a>30?b>8?c[1]:b>6?c[0]:b>4?b:c[2]:b>8?b:c[3]}function i(a,b,c,d,e,f){a&&V(y,a.toString(),{dur:b,scrollEasing:c,dir:d,overwrite:e,drag:f})}var k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=a(this),z=y.data(d),A=z.opt,B=d+"_"+z.idx,C=a("#mCSB_"+z.idx),E=a("#mCSB_"+z.idx+"_container"),F=[a("#mCSB_"+z.idx+"_dragger_vertical"),a("#mCSB_"+z.idx+"_dragger_horizontal")],G=[],H=[],J=0,K="yx"===A.axis?"none":"all",L=[],M=E.find("iframe"),N=["touchstart."+B+" pointerdown."+B+" MSPointerDown."+B,"touchmove."+B+" pointermove."+B+" MSPointerMove."+B,"touchend."+B+" pointerup."+B+" MSPointerUp."+B],O=void 0!==document.body.style.touchAction;E.bind(N[0],function(a){c(a)}).bind(N[1],function(a){e(a)}),C.bind(N[0],function(a){f(a)}).bind(N[2],function(a){g(a)}),M.length&&M.each(function(){a(this).load(function(){I(this)&&a(this.contentDocument||this.contentWindow.document).bind(N[0],function(a){c(a),f(a)}).bind(N[1],function(a){e(a)}).bind(N[2],function(a){g(a)})})})},G=function(){function c(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function e(a,b,c){k.type=c&&f?"stepped":"stepless",k.scrollAmount=10,P(g,a,b,"mcsLinearOut",c?60:null)}var f,g=a(this),h=g.data(d),i=h.opt,k=h.sequential,l=d+"_"+h.idx,m=a("#mCSB_"+h.idx+"_container"),n=m.parent();m.bind("mousedown."+l,function(a){b||f||(f=1,j=!0)}).add(document).bind("mousemove."+l,function(a){if(!b&&f&&c()){var d=m.offset(),g=D(a)[0]-d.top+m[0].offsetTop,j=D(a)[1]-d.left+m[0].offsetLeft;g>0&&g0&&jg?e("on",38):g>n.height()&&e("on",40)),"y"!==i.axis&&h.overflowed[1]&&(0>j?e("on",37):j>n.width()&&e("on",39)))}}).bind("mouseup."+l+" dragend."+l,function(a){b||(f&&(f=0,e("off",null)),j=!1)})},H=function(){function b(b,d){if(U(c),!J(c,b.target)){var g="auto"!==f.mouseWheel.deltaFactor?parseInt(f.mouseWheel.deltaFactor):i&&b.deltaFactor<100?100:b.deltaFactor||100,k=f.scrollInertia;if("x"===f.axis||"x"===f.mouseWheel.axis)var l="x",m=[Math.round(g*e.scrollRatio.x),parseInt(f.mouseWheel.scrollAmount)],n="auto"!==f.mouseWheel.scrollAmount?m[1]:m[0]>=h.width()?.9*h.width():m[0],o=Math.abs(a("#mCSB_"+e.idx+"_container")[0].offsetLeft),p=j[1][0].offsetLeft,q=j[1].parent().width()-j[1].width(),r=b.deltaX||b.deltaY||d;else var l="y",m=[Math.round(g*e.scrollRatio.y),parseInt(f.mouseWheel.scrollAmount)],n="auto"!==f.mouseWheel.scrollAmount?m[1]:m[0]>=h.height()?.9*h.height():m[0],o=Math.abs(a("#mCSB_"+e.idx+"_container")[0].offsetTop),p=j[0][0].offsetTop,q=j[0].parent().height()-j[0].height(),r=b.deltaY||d;"y"===l&&!e.overflowed[0]||"x"===l&&!e.overflowed[1]||((f.mouseWheel.invert||b.webkitDirectionInvertedFromDevice)&&(r=-r),f.mouseWheel.normalizeDelta&&(r=0>r?-1:1),(r>0&&0!==p||0>r&&p!==q||f.mouseWheel.preventDefault)&&(b.stopImmediatePropagation(),b.preventDefault()),b.deltaFactor<2&&!f.mouseWheel.normalizeDelta&&(n=b.deltaFactor,k=17),V(c,(o-r*n).toString(),{dir:l,dur:k}))}}if(a(this).data(d)){var c=a(this),e=c.data(d),f=e.opt,g=d+"_"+e.idx,h=a("#mCSB_"+e.idx),j=[a("#mCSB_"+e.idx+"_dragger_vertical"),a("#mCSB_"+e.idx+"_dragger_horizontal")],k=a("#mCSB_"+e.idx+"_container").find("iframe");k.length&&k.each(function(){a(this).load(function(){I(this)&&a(this.contentDocument||this.contentWindow.document).bind("mousewheel."+g,function(a,c){b(a,c)})})}),h.bind("mousewheel."+g,function(a,c){b(a,c)})}},I=function(a){var b=null;if(a){try{var c=a.contentDocument||a.contentWindow.document;b=c.body.innerHTML}catch(d){}return null!==b}try{var c=top.document;b=c.body.innerHTML}catch(d){}return null!==b},J=function(b,c){var e=c.nodeName.toLowerCase(),f=b.data(d).opt.mouseWheel.disableOver,g=["select","textarea"];return a.inArray(e,f)>-1&&!(a.inArray(e,g)>-1&&!a(c).is(":focus"))},K=function(){var b,c=a(this),e=c.data(d),f=d+"_"+e.idx,g=a("#mCSB_"+e.idx+"_container"),h=g.parent(),i=a(".mCSB_"+e.idx+"_scrollbar ."+k[12]);i.bind("mousedown."+f+" touchstart."+f+" pointerdown."+f+" MSPointerDown."+f,function(c){j=!0,a(c.target).hasClass("mCSB_dragger")||(b=1)}).bind("touchend."+f+" pointerup."+f+" MSPointerUp."+f,function(a){j=!1}).bind("click."+f,function(d){if(b&&(b=0,a(d.target).hasClass(k[12])||a(d.target).hasClass("mCSB_draggerRail"))){U(c);var f=a(this),i=f.find(".mCSB_dragger");if(f.parent(".mCSB_scrollTools_horizontal").length>0){if(!e.overflowed[1])return;var j="x",l=d.pageX>i.offset().left?-1:1,m=Math.abs(g[0].offsetLeft)-l*(.9*h.width())}else{if(!e.overflowed[0])return;var j="y",l=d.pageY>i.offset().top?-1:1,m=Math.abs(g[0].offsetTop)-l*(.9*h.height())}V(c,m.toString(),{dir:j,scrollEasing:"mcsEaseInOut"})}})},L=function(){var b=a(this),c=b.data(d),e=c.opt,f=d+"_"+c.idx,g=a("#mCSB_"+c.idx+"_container"),h=g.parent();g.bind("focusin."+f,function(c){var d=a(document.activeElement),f=g.find(".mCustomScrollBox").length,i=0;d.is(e.advanced.autoScrollOnFocus)&&(U(b),clearTimeout(b[0]._focusTimeout),b[0]._focusTimer=f?(i+17)*f:0,b[0]._focusTimeout=setTimeout(function(){var a=[ba(d)[0],ba(d)[1]],c=[g[0].offsetTop,g[0].offsetLeft],f=[c[0]+a[0]>=0&&c[0]+a[0]=0&&c[0]+a[1]a");i.bind("mousedown."+g+" touchstart."+g+" pointerdown."+g+" MSPointerDown."+g+" mouseup."+g+" touchend."+g+" pointerup."+g+" MSPointerUp."+g+" mouseout."+g+" pointerout."+g+" MSPointerOut."+g+" click."+g,function(d){function g(a,c){f.scrollAmount=e.scrollButtons.scrollAmount,P(b,a,c)}if(d.preventDefault(),$(d)){var h=a(this).attr("class");switch(f.type=e.scrollButtons.scrollType,d.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===f.type)return;j=!0,c.tweenRunning=!1,g("on",h);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===f.type)return;j=!1,f.dir&&g("off",h);break;case"click":if("stepped"!==f.type||c.tweenRunning)return;g("on",h)}}})},O=function(){function b(b){function d(a,b){g.type=f.keyboard.scrollType,g.scrollAmount=f.keyboard.scrollAmount,"stepped"===g.type&&e.tweenRunning||P(c,a,b)}switch(b.type){case"blur":e.tweenRunning&&g.dir&&d("off",null);break;case"keydown":case"keyup":var h=b.keyCode?b.keyCode:b.which,i="on";if("x"!==f.axis&&(38===h||40===h)||"y"!==f.axis&&(37===h||39===h)){if((38===h||40===h)&&!e.overflowed[0]||(37===h||39===h)&&!e.overflowed[1])return;"keyup"===b.type&&(i="off"),a(document.activeElement).is(l)||(b.preventDefault(),b.stopImmediatePropagation(),d(i,h))}else if(33===h||34===h){if((e.overflowed[0]||e.overflowed[1])&&(b.preventDefault(),b.stopImmediatePropagation()),"keyup"===b.type){U(c);var m=34===h?-1:1;if("x"===f.axis||"yx"===f.axis&&e.overflowed[1]&&!e.overflowed[0])var n="x",o=Math.abs(j[0].offsetLeft)-m*(.9*k.width());else var n="y",o=Math.abs(j[0].offsetTop)-m*(.9*k.height());V(c,o.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}else if((35===h||36===h)&&!a(document.activeElement).is(l)&&((e.overflowed[0]||e.overflowed[1])&&(b.preventDefault(),b.stopImmediatePropagation()),"keyup"===b.type)){if("x"===f.axis||"yx"===f.axis&&e.overflowed[1]&&!e.overflowed[0])var n="x",o=35===h?Math.abs(k.width()-j.outerWidth(!1)):0;else var n="y",o=35===h?Math.abs(k.height()-j.outerHeight(!1)):0;V(c,o.toString(),{dir:n,scrollEasing:"mcsEaseInOut"})}}}var c=a(this),e=c.data(d),f=e.opt,g=e.sequential,h=d+"_"+e.idx,i=a("#mCSB_"+e.idx),j=a("#mCSB_"+e.idx+"_container"),k=j.parent(),l="input,textarea,select,datalist,keygen,[contenteditable='true']",m=j.find("iframe"),n=["blur."+h+" keydown."+h+" keyup."+h];m.length&&m.each(function(){a(this).load(function(){I(this)&&a(this.contentDocument||this.contentWindow.document).bind(n[0],function(a){b(a)})})}),i.attr("tabindex","0").bind(n[0],function(a){b(a)})},P=function(b,c,e,f,g){function h(a){l.snapAmount&&(m.scrollAmount=l.snapAmount instanceof Array?"x"===m.dir[0]?l.snapAmount[1]:l.snapAmount[0]:l.snapAmount);var c="stepped"!==m.type,d=g?g:a?c?p/1.5:q:1e3/60,e=a?c?7.5:40:2.5,i=[Math.abs(n[0].offsetTop),Math.abs(n[0].offsetLeft)],k=[j.scrollRatio.y>10?10:j.scrollRatio.y,j.scrollRatio.x>10?10:j.scrollRatio.x],o="x"===m.dir[0]?i[1]+m.dir[1]*(k[1]*e):i[0]+m.dir[1]*(k[0]*e),r="x"===m.dir[0]?i[1]+m.dir[1]*parseInt(m.scrollAmount):i[0]+m.dir[1]*parseInt(m.scrollAmount),s="auto"!==m.scrollAmount?r:o,t=f?f:a?c?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",u=!!a;return a&&17>d&&(s="x"===m.dir[0]?i[1]:i[0]),V(b,s.toString(),{dir:m.dir[0],scrollEasing:t,dur:d,onComplete:u}),a?void(m.dir=!1):(clearTimeout(m.step),void(m.step=setTimeout(function(){h()},d)))}function i(){clearTimeout(m.step),Z(m,"step"),U(b)}var j=b.data(d),l=j.opt,m=j.sequential,n=a("#mCSB_"+j.idx+"_container"),o="stepped"===m.type,p=l.scrollInertia<26?26:l.scrollInertia,q=l.scrollInertia<1?17:l.scrollInertia;switch(c){case"on":if(m.dir=[e===k[16]||e===k[15]||39===e||37===e?"x":"y",e===k[13]||e===k[15]||38===e||37===e?-1:1],U(b),aa(e)&&"stepped"===m.type)return;h(o);break;case"off":i(),(o||j.tweenRunning&&m.dir)&&h(!0)}},Q=function(b){var c=a(this).data(d).opt,e=[];return"function"==typeof b&&(b=b()),b instanceof Array?e=b.length>1?[b[0],b[1]]:"x"===c.axis?[null,b[0]]:[b[0],null]:(e[0]=b.y?b.y:b.x||"x"===c.axis?null:b,e[1]=b.x?b.x:b.y||"y"===c.axis?null:b),"function"==typeof e[0]&&(e[0]=e[0]()),"function"==typeof e[1]&&(e[1]=e[1]()),e},R=function(b,c){if(null!=b&&"undefined"!=typeof b){var e=a(this),f=e.data(d),g=f.opt,h=a("#mCSB_"+f.idx+"_container"),i=h.parent(),j=typeof b;c||(c="x"===g.axis?"x":"y");var k="x"===c?h.outerWidth(!1):h.outerHeight(!1),m="x"===c?h[0].offsetLeft:h[0].offsetTop,n="x"===c?"left":"top";switch(j){case"function":return b();case"object":var o=b.jquery?b:a(b);if(!o.length)return;return"x"===c?ba(o)[1]:ba(o)[0];case"string":case"number":if(aa(b))return Math.abs(b);if(-1!==b.indexOf("%"))return Math.abs(k*parseInt(b)/100);if(-1!==b.indexOf("-="))return Math.abs(m-parseInt(b.split("-=")[1]));if(-1!==b.indexOf("+=")){var p=m+parseInt(b.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==b.indexOf("px")&&aa(b.split("px")[0]))return Math.abs(b.split("px")[0]);if("top"===b||"left"===b)return 0;if("bottom"===b)return Math.abs(i.height()-h.outerHeight(!1));if("right"===b)return Math.abs(i.width()-h.outerWidth(!1));if("first"===b||"last"===b){var o=h.find(":"+b);return"x"===c?ba(o)[1]:ba(o)[0]}return a(b).length?"x"===c?ba(a(b))[1]:ba(a(b))[0]:(h.css(n,b),void l.update.call(null,e[0]))}}},S=function(b){function c(){return clearTimeout(m[0].autoUpdate),0===h.parents("html").length?void(h=null):void(m[0].autoUpdate=setTimeout(function(){return j.advanced.updateOnSelectorChange&&(i.poll.change.n=f(),i.poll.change.n!==i.poll.change.o)?(i.poll.change.o=i.poll.change.n,void g(3)):j.advanced.updateOnContentResize&&(i.poll.size.n=h[0].scrollHeight+h[0].scrollWidth+m[0].offsetHeight+h[0].offsetHeight+h[0].offsetWidth,i.poll.size.n!==i.poll.size.o)?(i.poll.size.o=i.poll.size.n,void g(1)):!j.advanced.updateOnImageLoad||"auto"===j.advanced.updateOnImageLoad&&"y"===j.axis||(i.poll.img.n=m.find("img").length,i.poll.img.n===i.poll.img.o)?void((j.advanced.updateOnSelectorChange||j.advanced.updateOnContentResize||j.advanced.updateOnImageLoad)&&c()):(i.poll.img.o=i.poll.img.n,void m.find("img").each(function(){e(this)}))},j.advanced.autoUpdateTimeout))}function e(b){function c(a,b){return function(){return b.apply(a,arguments)}}function d(){this.onload=null,a(b).addClass(k[2]),g(2)}if(a(b).hasClass(k[2]))return void g();var e=new Image;e.onload=c(e,d),e.src=b.src}function f(){j.advanced.updateOnSelectorChange===!0&&(j.advanced.updateOnSelectorChange="*");var a=0,b=m.find(j.advanced.updateOnSelectorChange);return j.advanced.updateOnSelectorChange&&b.length>0&&b.each(function(){a+=this.offsetHeight+this.offsetWidth}),a}function g(a){clearTimeout(m[0].autoUpdate),l.update.call(null,h[0],a)}var h=a(this),i=h.data(d),j=i.opt,m=a("#mCSB_"+i.idx+"_container");return b?(clearTimeout(m[0].autoUpdate),void Z(m[0],"autoUpdate")):void c()},T=function(a,b,c){return Math.round(a/b)*b-c},U=function(b){var c=b.data(d),e=a("#mCSB_"+c.idx+"_container,#mCSB_"+c.idx+"_container_wrapper,#mCSB_"+c.idx+"_dragger_vertical,#mCSB_"+c.idx+"_dragger_horizontal");e.each(function(){Y.call(this)})},V=function(b,c,e){function f(a){return i&&j.callbacks[a]&&"function"==typeof j.callbacks[a]}function g(){return[j.callbacks.alwaysTriggerOffsets||u>=v[0]+y,j.callbacks.alwaysTriggerOffsets||-z>=u]}function h(){var a=[n[0].offsetTop,n[0].offsetLeft],c=[s[0].offsetTop,s[0].offsetLeft],d=[n.outerHeight(!1),n.outerWidth(!1)],f=[m.height(),m.width()];b[0].mcs={content:n,top:a[0],left:a[1],draggerTop:c[0],draggerLeft:c[1],topPct:Math.round(100*Math.abs(a[0])/(Math.abs(d[0])-f[0])),leftPct:Math.round(100*Math.abs(a[1])/(Math.abs(d[1])-f[1])),direction:e.dir}}var i=b.data(d),j=i.opt,k={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:j.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},e=a.extend(k,e),l=[e.dur,e.drag?0:e.dur],m=a("#mCSB_"+i.idx),n=a("#mCSB_"+i.idx+"_container"),o=n.parent(),p=j.callbacks.onTotalScrollOffset?Q.call(b,j.callbacks.onTotalScrollOffset):[0,0],q=j.callbacks.onTotalScrollBackOffset?Q.call(b,j.callbacks.onTotalScrollBackOffset):[0,0];if(i.trigger=e.trigger,0===o.scrollTop()&&0===o.scrollLeft()||(a(".mCSB_"+i.idx+"_scrollbar").css("visibility","visible"),o.scrollTop(0).scrollLeft(0)),"_resetY"!==c||i.contentReset.y||(f("onOverflowYNone")&&j.callbacks.onOverflowYNone.call(b[0]),i.contentReset.y=1),"_resetX"!==c||i.contentReset.x||(f("onOverflowXNone")&&j.callbacks.onOverflowXNone.call(b[0]),i.contentReset.x=1),"_resetY"!==c&&"_resetX"!==c){if(!i.contentReset.y&&b[0].mcs||!i.overflowed[0]||(f("onOverflowY")&&j.callbacks.onOverflowY.call(b[0]),i.contentReset.x=null),!i.contentReset.x&&b[0].mcs||!i.overflowed[1]||(f("onOverflowX")&&j.callbacks.onOverflowX.call(b[0]),i.contentReset.x=null),j.snapAmount){var r=j.snapAmount instanceof Array?"x"===e.dir?j.snapAmount[1]:j.snapAmount[0]:j.snapAmount;c=T(c,r,j.snapOffset)}switch(e.dir){case"x":var s=a("#mCSB_"+i.idx+"_dragger_horizontal"),t="left",u=n[0].offsetLeft,v=[m.width()-n.outerWidth(!1),s.parent().width()-s.width()],w=[c,0===c?0:c/i.scrollRatio.x],y=p[1],z=q[1],A=y>0?y/i.scrollRatio.x:0,B=z>0?z/i.scrollRatio.x:0;break;case"y":var s=a("#mCSB_"+i.idx+"_dragger_vertical"),t="top",u=n[0].offsetTop,v=[m.height()-n.outerHeight(!1),s.parent().height()-s.height()],w=[c,0===c?0:c/i.scrollRatio.y],y=p[0],z=q[0],A=y>0?y/i.scrollRatio.y:0,B=z>0?z/i.scrollRatio.y:0}w[1]<0||0===w[0]&&0===w[1]?w=[0,0]:w[1]>=v[1]?w=[v[0],v[1]]:w[0]=-w[0],b[0].mcs||(h(),f("onInit")&&j.callbacks.onInit.call(b[0])),clearTimeout(n[0].onCompleteTimeout),W(s[0],t,Math.round(w[1]),l[1],e.scrollEasing),!i.tweenRunning&&(0===u&&w[0]>=0||u===v[0]&&w[0]<=v[0])||W(n[0],t,Math.round(w[0]),l[0],e.scrollEasing,e.overwrite,{onStart:function(){e.callbacks&&e.onStart&&!i.tweenRunning&&(f("onScrollStart")&&(h(),j.callbacks.onScrollStart.call(b[0])),i.tweenRunning=!0,x(s),i.cbOffsets=g())},onUpdate:function(){e.callbacks&&e.onUpdate&&f("whileScrolling")&&(h(),j.callbacks.whileScrolling.call(b[0]))},onComplete:function(){if(e.callbacks&&e.onComplete){"yx"===j.axis&&clearTimeout(n[0].onCompleteTimeout);var a=n[0].idleTimer||0;n[0].onCompleteTimeout=setTimeout(function(){f("onScroll")&&(h(),j.callbacks.onScroll.call(b[0])),f("onTotalScroll")&&w[1]>=v[1]-A&&i.cbOffsets[0]&&(h(),j.callbacks.onTotalScroll.call(b[0])),f("onTotalScrollBack")&&w[1]<=B&&i.cbOffsets[1]&&(h(),j.callbacks.onTotalScrollBack.call(b[0])),i.tweenRunning=!1,n[0].idleTimer=0,x(s,"hide")},a)}}})}},W=function(a,b,c,d,e,f,g){function h(){v.stop||(s||o.call(),s=X()-r,i(),s>=v.time&&(v.time=s>v.time?s+m-(s-v.time):s+m-1,v.time0?(v.currVal=l(v.time,t,w,d,e),u[b]=Math.round(v.currVal)+"px"):u[b]=c+"px",p.call()}function j(){m=1e3/60,v.time=s+m,n=window.requestAnimationFrame?window.requestAnimationFrame:function(a){return i(),setTimeout(a,.01)},v.id=n(h)}function k(){null!=v.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(v.id):clearTimeout(v.id),v.id=null)}function l(a,b,c,d,e){switch(e){case"linear":case"mcsLinear":return c*a/d+b;case"mcsLinearOut":return a/=d,a--,c*Math.sqrt(1-a*a)+b;case"easeInOutSmooth":return a/=d/2,1>a?c/2*a*a+b:(a--,-c/2*(a*(a-2)-1)+b);case"easeInOutStrong":return a/=d/2,1>a?c/2*Math.pow(2,10*(a-1))+b:(a--,c/2*(-Math.pow(2,-10*a)+2)+b);case"easeInOut":case"mcsEaseInOut":return a/=d/2,1>a?c/2*a*a*a+b:(a-=2,c/2*(a*a*a+2)+b);case"easeOutSmooth":return a/=d,a--,-c*(a*a*a*a-1)+b;case"easeOutStrong":return c*(-Math.pow(2,-10*a/d)+1)+b; -case"easeOut":case"mcsEaseOut":default:var f=(a/=d)*a,g=f*a;return b+c*(.499999999999997*g*f+-2.5*f*f+5.5*g+-6.5*f+4*a)}}a._mTween||(a._mTween={top:{},left:{}});var m,n,g=g||{},o=g.onStart||function(){},p=g.onUpdate||function(){},q=g.onComplete||function(){},r=X(),s=0,t=a.offsetTop,u=a.style,v=a._mTween[b];"left"===b&&(t=a.offsetLeft);var w=c-t;v.stop=0,"none"!==f&&k(),j()},X=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},Y=function(){var a=this;a._mTween||(a._mTween={top:{},left:{}});for(var b=["top","left"],c=0;c=0&&d[0]+ba(e)[0]=0&&d[1]+ba(e)[1]
        ":"
        "},c=function(b,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q;return h=d.duration||1,q=d.timingFunction||"ease-in-out",i=c.scope(),j=d.emitOnClose,n=d.onClose,m=void 0!==d.lazyRender,g=null,o=null,k=function(a){var b,d,e,f,g;for(e=0,d=c.children(),f=0,g=d.length;g>f;f++)b=d[f],e+=b.clientHeight;return""+e+"px"},p=function(){return g&&a.cancel(g),m&&(b.lazyRender=!0),a(function(){return o&&a.cancel(o),c.css({overflow:"hidden",transitionProperty:"height",transitionDuration:""+h+"s",transitionTimingFunction:q,height:k()}),o=a(function(){return c.css({overflow:"visible",transition:"none",height:"auto"})},1e3*h)})},l=function(){return o&&a.cancel(o),c.css({overflow:"hidden",transitionProperty:"height",transitionDuration:""+h+"s",transitionTimingFunction:q,height:"0px"}),j||n||m?g=a(function(){return j&&b.$emit(j,{}),n&&i.$eval(n),m?b.lazyRender=!1:void 0},1e3*h):void 0},b.$watch("expanded",function(b,d){return b?a(p):(null!=b&&(c.css({height:k()}),c[0].clientHeight),a(l))})},{restrict:"A",scope:{expanded:"=ngSlideDown"},transclude:!0,link:c,template:function(a,c){return b(a,c)}}}])}.call(this),angular.module("ngMap",[]),function(){"use strict";function camelCase(a){return a.replace(SPECIAL_CHARS_REGEXP,function(a,b,c,d){return d?c.toUpperCase():c}).replace(MOZ_HACK_REGEXP,"Moz$1")}function JSONize(a){try{return JSON.parse(a),a}catch(b){return a.replace(/([\$\w]+)\s*:/g,function(a,b){return'"'+b+'":'}).replace(/'([^']+)'/g,function(a,b){return'"'+b+'"'})}}var SPECIAL_CHARS_REGEXP=/([\:\-\_]+(.))/g,MOZ_HACK_REGEXP=/^moz([A-Z])/,Attr2Options=function($parse,$timeout,$log,NavigatorGeolocation,GeoCoder){var orgAttributes=function(a){a.length>0&&(a=a[0]);for(var b={},c=0;c-1&&b.splice(c,1),this.el.className=b.join(" ")},d.prototype.onAdd=function(){this.getPanes().overlayMouseTarget.appendChild(this.el)},d.prototype.draw=function(){this.setPosition(),this.setZIndex(this.zIndex),this.setVisible(this.visible)},d.prototype.onRemove=function(){this.el.parentNode.removeChild(this.el),this.el=null}},f=function(c,e){return function(f,g,h,i){var j=(a.orgAttributes(g),a.filter(h)),k=a.getOptions(j,f),l=a.getEvents(f,j),m=g[0].parentElement.removeChild(g[0]),n=new d(k);b(function(){f.$watch("["+e.join(",")+"]",function(a){n.setContent(c,f)}),n.setContent(m.innerHTML,f);var a=m.firstElementChild.className;n.addClass("custom-marker"),n.addClass(a),k.position instanceof google.maps.LatLng||i.getGeoLocation(k.position).then(function(a){n.setPosition(a)})});for(var o in l)google.maps.event.addDomListener(n.el,o,l[o]);i.addObject("customMarkers",n),g.bind("$destroy",function(){i.deleteObject("customMarkers",n)})}},g=function(d,g,h){return a=d,b=g,c=h,e(),{restrict:"E",require:"^map",compile:function(a){var b=a.html(),c=b.match(/{{([^}]+)}}/g),d=[];return(c||[]).forEach(function(a){var b=a.replace("{{","").replace("}}","");-1==a.indexOf("::")&&-1==a.indexOf("this.")&&-1==d.indexOf(b)&&d.push(a.replace("{{","").replace("}}",""))}),f(b,d)}}};g.$inject=["Attr2Options","$timeout","$compile"],angular.module("ngMap").directive("customMarker",g)}(),function(){"use strict";var a=function(a,b){a.panel&&(a.panel=document.getElementById(a.panel)||document.querySelector(a.panel));var c=new google.maps.DirectionsRenderer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c},b=function(b,c,d){var e=b,f=new google.maps.DirectionsService,g=function(a,b){var e=b;e.travelMode=e.travelMode||"DRIVING";var g=["origin","destination","travelMode","transitOptions","unitSystem","durationInTraffic","waypoints","optimizeWaypoints","provideRouteAlternatives","avoidHighways","avoidTolls","region"];for(var h in e)-1===g.indexOf(h)&&delete e[h];e.waypoints&&("[]"!=e.waypoints&&""!=e.waypoints||delete e.waypoints);var i=function(b){f.route(b,function(b,d){d==google.maps.DirectionsStatus.OK&&c(function(){a.setDirections(b)})})};e.origin&&e.destination&&("current-location"==e.origin?d.getCurrentPosition().then(function(a){e.origin=new google.maps.LatLng(a.coords.latitude,a.coords.longitude),i(e)}):"current-location"==e.destination?d.getCurrentPosition().then(function(a){e.destination=new google.maps.LatLng(a.coords.latitude,a.coords.longitude),i(e)}):i(e))},h=function(b,d,f,h){var i=e.orgAttributes(d),j=e.filter(f),k=e.getOptions(j),l=e.getEvents(b,j),m=e.getAttrsToObserve(i),n=a(k,l);h.addObject("directionsRenderers",n),m.forEach(function(a){!function(a){f.$observe(a,function(b){if("panel"==a)c(function(){var a=document.getElementById(b)||document.querySelector(b);a&&n.setPanel(a)});else if(k[a]!==b){var d=e.toOptionValue(b,{key:a});k[a]=d,g(n,k)}})}(a)}),b.$on("mapInitialized",function(a,b){g(n,k)}),b.$on("$destroy",function(a,b){h.deleteObject("directionsRenderers",n)})};return{restrict:"E",require:"^map",link:h}};b.$inject=["Attr2Options","$timeout","NavigatorGeolocation"],angular.module("ngMap").directive("directions",b)}(),function(){"use strict";angular.module("ngMap").directive("drawingManager",["Attr2Options",function(a){var b=a;return{restrict:"E",require:"^map",link:function(a,c,d,e){var f=(b.orgAttributes(c),b.filter(d)),g=b.getOptions(f),h=b.getControlOptions(f),i=b.getEvents(a,f),j=new google.maps.drawing.DrawingManager({drawingMode:g.drawingmode,drawingControl:g.drawingcontrol,drawingControlOptions:h.drawingControlOptions,circleOptions:g.circleoptions,markerOptions:g.markeroptions,polygonOptions:g.polygonoptions,polylineOptions:g.polylineoptions,rectangleOptions:g.rectangleoptions}),i=b.getEvents(a,f);for(var k in i)google.maps.event.addListener(j,k,i[k]);e.addObject("mapDrawingManager",j)}}}])}(),function(){"use strict";angular.module("ngMap").directive("dynamicMapsEngineLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.visualization.DynamicMapsEngineLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.filter(e),h=b.getOptions(g),i=b.getEvents(a,g,i),j=c(h,i);f.addObject("mapsEngineLayers",j)}}}])}(),function(){"use strict";angular.module("ngMap").directive("fusionTablesLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.FusionTablesLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.filter(e),h=b.getOptions(g),i=b.getEvents(a,g,i),j=c(h,i);f.addObject("fusionTablesLayers",j)}}}])}(),function(){"use strict";angular.module("ngMap").directive("heatmapLayer",["Attr2Options","$window",function(a,b){var c=a;return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=c.filter(e),h=c.getOptions(g);if(h.data=b[e.data]||a[e.data],!(h.data instanceof Array))throw"invalid heatmap data";h.data=new google.maps.MVCArray(h.data);var i=new google.maps.visualization.HeatmapLayer(h);c.getEvents(a,g);f.addObject("heatmapLayers",i)}}}])}(),function(){"use strict";var a=function(a,b,c,d){var e=a,f=function(a,d,e){var f;!a.position||a.position instanceof google.maps.LatLng||delete a.position,f=new google.maps.InfoWindow(a),Object.keys(d).length>0;for(var g in d)g&&google.maps.event.addListener(f,g,d[g]);var h=e.html().trim();if(1!=angular.element(h).length)throw"info-window working as a template must have a container";return f.__template=h.replace(/\s?ng-non-bindable[='"]+/,""),f.__compile=function(a,c){c&&(a["this"]=c);var d=b(f.__template)(a);f.setContent(d[0]),a.$apply()},f.__open=function(a,b,d){c(function(){f.__compile(b,d),d&&d.getPosition?f.open(a,d):d&&d instanceof google.maps.LatLng?(f.open(a),f.setPosition(d)):f.open(a)})},f},g=function(a,b,c,g){b.css("display","none");var h,i=e.orgAttributes(b),j=e.filter(c),k=e.getOptions(j,a),l=e.getEvents(a,j);!k.position||k.position instanceof google.maps.LatLng||(h=k.position);var m=f(k,l,b);h&&g.getGeoLocation(h).then(function(b){m.setPosition(b),m.__open(g.map,a,b);var e=c.geoCallback;e&&d(e)(a)}),g.addObject("infoWindows",m),g.observeAttrSetObj(i,c,m),a.$on("mapInitialized",function(b,c){if(m.visible&&m.__open(c,a),m.visibleOnMarker){var d=m.visibleOnMarker;m.__open(c,a,c.markers[d])}}),a.showInfoWindow=function(b,c,d){var e=g.map.infoWindows[c],f=d?d:this.getPosition?this:null;e.__open(g.map,a,f),g.singleInfoWindow&&(g.lastInfoWindow&&a.hideInfoWindow(b,g.lastInfoWindow),g.lastInfoWindow=c)},a.hideInfoWindow=a.hideInfoWindow||function(a,b){var c=g.map.infoWindows[b];c.close()}};return{restrict:"E",require:"^map",link:g}};a.$inject=["Attr2Options","$compile","$timeout","$parse"],angular.module("ngMap").directive("infoWindow",a)}(),function(){"use strict";angular.module("ngMap").directive("kmlLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.KmlLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.orgAttributes(d),h=b.filter(e),i=b.getOptions(h),j=b.getEvents(a,h),k=c(i,j);f.addObject("kmlLayers",k),f.observeAttrSetObj(g,e,k),d.bind("$destroy",function(){f.deleteObject("kmlLayers",k)})}}}])}(),function(){"use strict";angular.module("ngMap").directive("mapData",["Attr2Options",function(a){var b=a;return{restrict:"E",require:"^map",link:function(a,c,d,e){var f=b.filter(d),g=b.getOptions(f),h=b.getEvents(a,f,h);a.$on("mapInitialized",function(b,c){for(var d in g)if(d){var e=g[d];"function"==typeof a[e]?c.data[d](a[e]):c.data[d](e)}for(var f in h)h[f]&&c.data.addListener(f,h[f])})}}}])}(),function(){"use strict";var a,b,c,d,e=function(c,e,f){var g=f.mapLazyLoadParams||f.mapLazyLoad;if(window.lazyLoadCallback=function(){a(function(){e.html(d),b(e.contents())(c)},100)},void 0===window.google||void 0===window.google.maps){var h=document.createElement("script");h.src=g+(g.indexOf("?")>-1?"&":"?")+"callback=lazyLoadCallback",document.body.appendChild(h)}else e.html(d),b(e.contents())(c)},f=function(a,b){return!b.mapLazyLoad&&void 0,d=a.html(),c=b.mapLazyLoad,document.querySelector('script[src="'+c+(c.indexOf("?")>-1?"&":"?")+'callback=lazyLoadCallback"]')?!1:(a.html(""),{pre:e})},g=function(c,d){return b=c,a=d,{compile:f}};g.$inject=["$compile","$timeout"],angular.module("ngMap").directive("mapLazyLoad",g)}(),function(){"use strict";angular.module("ngMap").directive("mapType",["Attr2Options","$window",function(a,b){return{restrict:"E",require:"^map",link:function(a,c,d,e){var f,g=d.name;if(!g)throw"invalid map-type name";if(d.object){var h=a[d.object]?a:b;f=h[d.object],"function"==typeof f&&(f=new f)}if(!f)throw"invalid map-type object";a.$on("mapInitialized",function(a,b){b.mapTypes.set(g,f)}),e.addObject("mapTypes",f)}}}])}(),function(){"use strict";function a(a,b){var c;return a.currentStyle?c=a.currentStyle[b]:window.getComputedStyle&&(c=document.defaultView.getComputedStyle(a,null).getPropertyValue(b)),c}var b=function(b,c,d){var e=b,f=function(b,f,g,h){var i=e.orgAttributes(f);b.google=google;var j=document.createElement("div");j.style.width="100%",j.style.height="100%",f.prepend(j),"false"!==g.defaultStyle&&("block"!=a(f[0],"display")&&f.css("display","block"),a(f[0],"height").match(/^(0|auto)/)&&f.css("height","300px")),f[0].addEventListener("dragstart",function(a){return a.preventDefault(),!1});var k=function(a,e){var f=new google.maps.Map(j,{});f.markers={},f.shapes={},c(function(){google.maps.event.trigger(f,"resize")}),a.zoom=a.zoom||15;var k=a.center;k?k instanceof google.maps.LatLng||(delete a.center,h.getGeoLocation(k,m.geoLocationOptions).then(function(a){f.setCenter(a);var c=g.geoCallback;c&&d(c)(b)},function(a){f.setCenter(m.geoFallbackCenter)})):a.center=new google.maps.LatLng(0,0),f.setOptions(a),h.singleInfoWindow=a.singleInfoWindow;for(var l in e)l&&google.maps.event.addListener(f,l,e[l]);h.observeAttrSetObj(i,g,f),h.map=f,h.addObjects(h._objects),b.map=f,b.map.scope=b,google.maps.event.addListenerOnce(f,"idle",function(){b.$emit("mapInitialized",f),g.zoomToIncludeMarkers&&(h.zoomToIncludeMarkers(),"auto"==g.zoomToIncludeMarkers&&b.$on("objectChanged",function(a,b){"markers"==b[0]&&h.zoomToIncludeMarkers()}))})},l=e.filter(g),m=e.getOptions(l,b),n=e.getControlOptions(l),o=angular.extend(m,n),p=e.getEvents(b,l);g.initEvent?b.$on(g.initEvent,function(){!h.map&&k(o,p)}):k(o,p)};return{restrict:"AE",controller:"MapController",link:f}};angular.module("ngMap").directive("map",["Attr2Options","$timeout","$parse",b])}(),function(){"use strict";var a=function(a,b,c,d,e){var f=e,g=this,h=function(a,b,c){a.$observe(b,function(a){if(a){var d=f.camelCase("set-"+b),e=f.toOptionValue(a,{key:b});c[d]&&(b.match(/center|position/)&&"string"==typeof e?g.getGeoLocation(e).then(function(a){c[d](a)}):c[d](e))}})};this.map=null,this._objects=[],this.addObject=function(b,c){if(this.map){this.map[b]=this.map[b]||{};var d=Object.keys(this.map[b]).length;this.map[b][c.id||d]=c,"infoWindows"!=b&&c.setMap&&c.setMap&&c.setMap(this.map),c.centered&&c.position&&this.map.setCenter(c.position),a.$emit("objectChanged",[b,this.map[b]])}else c.groupName=b,this._objects.push(c)},this.deleteObject=function(b,c){if(c.map){var d=c.map[b];for(var e in d)d[e]===c&&delete d[e];c.map&&c.setMap&&c.setMap(null),a.$emit("objectChanged",[b,this.map[b]])}},this.addObjects=function(a){for(var b=0;b0;for(var d in b)d&&google.maps.event.addListener(c,d,b[d]);return c},b=function(b,c){var d=b,e=function(b,e,f,g){var h,i=d.orgAttributes(e),j=d.filter(f),k=d.getOptions(j,b),l=d.getEvents(b,j);k.position instanceof google.maps.LatLng||(h=k.position);var m=a(k,l);g.addObject("markers",m),h&&g.getGeoLocation(h).then(function(a){m.setPosition(a),k.centered&&m.map.setCenter(a);var d=f.geoCallback;d&&c(d)(b)}),k.noWatcher||g.observeAttrSetObj(i,f,m),e.bind("$destroy",function(){g.deleteObject("markers",m)})};return{restrict:"E",require:"^map",link:e}};b.$inject=["Attr2Options","$parse"],angular.module("ngMap").directive("marker",b)}(),function(){"use strict";angular.module("ngMap").directive("overlayMapType",["Attr2Options","$window",function(a,b){return{restrict:"E",require:"^map",link:function(a,c,d,e){var f,g=d.initMethod||"insertAt";if(d.object){var h=a[d.object]?a:b;f=h[d.object],"function"==typeof f&&(f=new f)}if(!f)throw"invalid map-type object";a.$on("mapInitialized",function(a,b){if("insertAt"==g){var c=parseInt(d.index,10);b.overlayMapTypes.insertAt(c,f)}else"push"==g&&b.overlayMapTypes.push(f)}),e.addObject("overlayMapTypes",f)}}}])}(),function(){"use strict";var a=function(a,b){var c=a,d=function(a,d,e,f){if("false"===e.placesAutoComplete)return!1;var g=c.filter(e),h=c.getOptions(g),i=c.getEvents(a,g),j=new google.maps.places.Autocomplete(d[0],h);for(var k in i)google.maps.event.addListener(j,k,i[k]);var l=function(){b(function(){f&&f.$setViewValue(d.val())},100)};google.maps.event.addListener(j,"place_changed",l),d[0].addEventListener("change",l),e.$observe("types",function(a){if(a){var b=c.toOptionValue(a,{key:"types"});j.setTypes(b)}})};return{restrict:"A",require:"?ngModel",link:d}};a.$inject=["Attr2Options","$timeout"],angular.module("ngMap").directive("placesAutoComplete",a)}(),function(){"use strict";var a=function(a,b){var c,d=a.name;switch(delete a.name,d){case"circle":a.center instanceof google.maps.LatLng||(a.center=new google.maps.LatLng(0,0)),c=new google.maps.Circle(a);break;case"polygon":c=new google.maps.Polygon(a);break;case"polyline":c=new google.maps.Polyline(a);break;case"rectangle":c=new google.maps.Rectangle(a);break;case"groundOverlay":case"image":var e=a.url,f={opacity:a.opacity,clickable:a.clickable,id:a.id};c=new google.maps.GroundOverlay(e,a.bounds,f)}for(var g in b)b[g]&&google.maps.event.addListener(c,g,b[g]);return c},b=function(b,c){var d=b,e=function(b,e,f,g){var h,i,j=d.orgAttributes(e),k=d.filter(f),l=d.getOptions(k),m=d.getEvents(b,k);i=l.name,l.center instanceof google.maps.LatLng||(h=l.center);var n=a(l,m);g.addObject("shapes",n),h&&"circle"==i&&g.getGeoLocation(h).then(function(a){n.setCenter(a),n.centered&&n.map.setCenter(a);var d=f.geoCallback;d&&c(d)(b)}),g.observeAttrSetObj(j,f,n),e.bind("$destroy",function(){g.deleteObject("shapes",n)})};return{restrict:"E",require:"^map",link:e}};b.$inject=["Attr2Options","$parse"],angular.module("ngMap").directive("shape",b)}(),function(){"use strict";var a=function(a){var b=a,c=function(a,b,c){var d,e;b.container&&(e=document.getElementById(b.container),e=e||document.querySelector(b.container)),e?d=new google.maps.StreetViewPanorama(e,b):(d=a.getStreetView(),d.setOptions(b));for(var f in c)f&&google.maps.event.addListener(d,f,c[f]);return d},d=function(a,d,e,f){var g=(b.orgAttributes(d),b.filter(e)),h=b.getOptions(g),i=b.getControlOptions(g),j=angular.extend(h,i),k=b.getEvents(a,g);a.$on("mapInitialized",function(a,b){var d=c(b,j,k);b.setStreetView(d),!d.getPosition()&&d.setPosition(b.getCenter()),google.maps.event.addListener(d,"position_changed",function(){d.getPosition()!==b.getCenter()&&b.setCenter(d.getPosition())});var e=google.maps.event.addListener(b,"center_changed",function(){d.setPosition(b.getCenter()),google.maps.event.removeListener(e)})})};return{restrict:"E",require:"^map",link:d}};a.$inject=["Attr2Options"],angular.module("ngMap").directive("streetViewPanorama",a)}(),function(){"use strict";angular.module("ngMap").directive("trafficLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.TrafficLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.orgAttributes(d),h=b.filter(e),i=b.getOptions(h),j=b.getEvents(a,h),k=c(i,j);f.addObject("trafficLayers",k),f.observeAttrSetObj(g,e,k),d.bind("$destroy",function(){f.deleteObject("trafficLayers",k)})}}}])}(),function(){"use strict";angular.module("ngMap").directive("transitLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.TransitLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.orgAttributes(d),h=b.filter(e),i=b.getOptions(h),j=b.getEvents(a,h),k=c(i,j);f.addObject("transitLayers",k),f.observeAttrSetObj(g,e,k),d.bind("$destroy",function(){f.deleteObject("transitLayers",k)})}}}])}(),function(){"use strict";angular.module("ngMap").directive("weatherLayer",["Attr2Options",function(a){var b=a,c=function(a,b){var c=new google.maps.weather.WeatherLayer(a);for(var d in b)google.maps.event.addListener(c,d,b[d]);return c};return{restrict:"E",require:"^map",link:function(a,d,e,f){var g=b.orgAttributes(d),h=b.filter(e),i=b.getOptions(h),j=b.getEvents(a,h),k=c(i,j);f.addObject("weatherLayers",k),f.observeAttrSetObj(g,e,k),d.bind("$destroy",function(){f.deleteObject("weatherLayers",k)})}}}])}(),function(a,b){"use strict";var c=["ng","oc.lazyLoad"],d={},e=[],f=[],g=[],h=[],i=a.noop,j={},k=[],l=a.module("oc.lazyLoad",["ng"]);l.provider("$ocLazyLoad",["$controllerProvider","$provide","$compileProvider","$filterProvider","$injector","$animateProvider",function(l,m,p,q,r,s){ -function t(b,d,e){if(d){var f,h,l,m=[];for(f=d.length-1;f>=0;f--)if(h=d[f],a.isString(h)||(h=w(h)),h&&-1===k.indexOf(h)&&(!y[h]||-1!==g.indexOf(h))){var n=-1===c.indexOf(h);if(l=o(h),n&&(c.push(h),t(b,l.requires,e)),l._runBlocks.length>0)for(j[h]=[];l._runBlocks.length>0;)j[h].push(l._runBlocks.shift());a.isDefined(j[h])&&(n||e.rerun)&&(m=m.concat(j[h])),v(b,l._invokeQueue,h,e.reconfig),v(b,l._configBlocks,h,e.reconfig),i(n?"ocLazyLoad.moduleLoaded":"ocLazyLoad.moduleReloaded",h),d.pop(),k.push(h)}var p=b.getInstanceInjector();a.forEach(m,function(a){p.invoke(a)})}}function u(b,c){function e(b,c){var d,e=!0;return c.length&&(d=f(b),a.forEach(c,function(a){e=e&&f(a)!==d})),e}function f(b){return a.isArray(b)?F(b.toString()):a.isObject(b)?F(E(b)):a.isDefined(b)&&null!==b?F(b.toString()):b}var g=b[2][0],h=b[1],j=!1;a.isUndefined(d[c])&&(d[c]={}),a.isUndefined(d[c][h])&&(d[c][h]={});var k=function(a,b){d[c][h].hasOwnProperty(a)||(d[c][h][a]=[]),e(b,d[c][h][a])&&(j=!0,d[c][h][a].push(b),i("ocLazyLoad.componentLoaded",[c,h,a]))};if(a.isString(g))k(g,b[2][1]);else{if(!a.isObject(g))return!1;a.forEach(g,function(b,c){a.isString(b)?k(b,g[1]):k(c,b)})}return j}function v(b,c,d,f){if(c){var g,h,i,j;for(g=0,h=c.length;h>g;g++)if(i=c[g],a.isArray(i)){if(null!==b){if(!b.hasOwnProperty(i[0]))throw new Error("unsupported provider "+i[0]);j=b[i[0]]}var k=u(i,d);if("invoke"!==i[1])k&&a.isDefined(j)&&j[i[1]].apply(j,i[2]);else{var l=function(b){var c=e.indexOf(d+"-"+b);(-1===c||f)&&(-1===c&&e.push(d+"-"+b),a.isDefined(j)&&j[i[1]].apply(j,i[2]))};if(a.isFunction(i[2][0]))l(i[2][0]);else if(a.isArray(i[2][0]))for(var m=0,n=i[2][0].length;n>m;m++)a.isFunction(i[2][0][m])&&l(i[2][0][m])}}}}function w(b){var c=null;return a.isString(b)?c=b:a.isObject(b)&&b.hasOwnProperty("name")&&a.isString(b.name)&&(c=b.name),c}function x(b){if(!a.isString(b))return!1;try{return o(b)}catch(c){if(/No module/.test(c)||c.message.indexOf("$injector:nomod")>-1)return!1}}var y={},z={$controllerProvider:l,$compileProvider:p,$filterProvider:q,$provide:m,$injector:r,$animateProvider:s},A=!1,B=!1,C=[],D={};C.push=function(a){-1===this.indexOf(a)&&Array.prototype.push.apply(this,arguments)},this.config=function(b){a.isDefined(b.modules)&&(a.isArray(b.modules)?a.forEach(b.modules,function(a){y[a.name]=a}):y[b.modules.name]=b.modules),a.isDefined(b.debug)&&(A=b.debug),a.isDefined(b.events)&&(B=b.events)},this._init=function(d){if(0===f.length){var e=[d],g=["ng:app","ng-app","x-ng-app","data-ng-app"],i=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/,j=function(a){return a&&e.push(a)};a.forEach(g,function(b){g[b]=!0,j(document.getElementById(b)),b=b.replace(":","\\:"),"undefined"!=typeof d[0]&&d[0].querySelectorAll&&(a.forEach(d[0].querySelectorAll("."+b),j),a.forEach(d[0].querySelectorAll("."+b+"\\:"),j),a.forEach(d[0].querySelectorAll("["+b+"]"),j))}),a.forEach(e,function(b){if(0===f.length){var c=" "+d.className+" ",e=i.exec(c);e?f.push((e[2]||"").replace(/\s+/g,",")):a.forEach(b.attributes,function(a){0===f.length&&g[a.name]&&f.push(a.value)})}})}0!==f.length||(b.jasmine||b.mocha)&&a.isDefined(a.mock)||console.error("No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.");var k=function l(b){if(-1===c.indexOf(b)){c.push(b);var d=a.module(b);v(null,d._invokeQueue,b),v(null,d._configBlocks,b),a.forEach(d.requires,l)}};a.forEach(f,function(a){k(a)}),f=[],h.pop()};var E=function(b){try{return JSON.stringify(b)}catch(c){var d=[];return JSON.stringify(b,function(b,c){if(a.isObject(c)&&null!==c){if(-1!==d.indexOf(c))return;d.push(c)}return c})}},F=function(a){var b,c,d,e=0;if(0==a.length)return e;for(b=0,d=a.length;d>b;b++)c=a.charCodeAt(b),e=(e<<5)-e+c,e|=0;return e};this.$get=["$log","$rootElement","$rootScope","$cacheFactory","$q",function(b,e,g,j,l){function m(a){var c=l.defer();return b.error(a.message),c.reject(a),c.promise}var p,q=j("ocLazyLoad");return A||(b={},b.error=a.noop,b.warn=a.noop,b.info=a.noop),z.getInstanceInjector=function(){return p?p:p=e.data("$injector")||a.injector()},i=function(a,c){B&&g.$broadcast(a,c),A&&b.info(a,c)},{_broadcast:i,_$log:b,_getFilesCache:function(){return q},toggleWatch:function(a){a?h.push(!0):h.pop()},getModuleConfig:function(b){if(!a.isString(b))throw new Error("You need to give the name of the module to get");return y[b]?a.copy(y[b]):null},setModuleConfig:function(b){if(!a.isObject(b))throw new Error("You need to give the module config object to set");return y[b.name]=b,b},getModules:function(){return c},isLoaded:function(b){var d=function(a){var b=c.indexOf(a)>-1;return b||(b=!!x(a)),b};if(a.isString(b)&&(b=[b]),a.isArray(b)){var e,f;for(e=0,f=b.length;f>e;e++)if(!d(b[e]))return!1;return!0}throw new Error("You need to define the module(s) name(s)")},_getModuleName:w,_getModule:function(a){try{return o(a)}catch(b){throw(/No module/.test(b)||b.message.indexOf("$injector:nomod")>-1)&&(b.message='The module "'+E(a)+'" that you are trying to load does not exist. '+b.message),b}},moduleExists:x,_loadDependencies:function(b,c){var d,e,f,g=[],h=this;if(b=h._getModuleName(b),null===b)return l.when();try{d=h._getModule(b)}catch(i){return m(i)}return e=h.getRequires(d),a.forEach(e,function(d){if(a.isString(d)){var e=h.getModuleConfig(d);if(null===e)return void C.push(d);d=e,e.name=void 0}if(h.moduleExists(d.name))return f=d.files.filter(function(a){return h.getModuleConfig(d.name).files.indexOf(a)<0}),0!==f.length&&h._$log.warn('Module "',b,'" attempted to redefine configuration for dependency. "',d.name,'"\n Additional Files Loaded:',f),a.isDefined(h.filesLoader)?void g.push(h.filesLoader(d,c).then(function(){return h._loadDependencies(d)})):m(new Error("Error: New dependencies need to be loaded from external files ("+d.files+"), but no loader has been defined."));if(a.isArray(d)){var i=[];a.forEach(d,function(a){var b=h.getModuleConfig(a);null===b?i.push(a):b.files&&(i=i.concat(b.files))}),i.length>0&&(d={files:i})}else a.isObject(d)&&d.hasOwnProperty("name")&&d.name&&(h.setModuleConfig(d),C.push(d.name));if(a.isDefined(d.files)&&0!==d.files.length){if(!a.isDefined(h.filesLoader))return m(new Error('Error: the module "'+d.name+'" is defined in external files ('+d.files+"), but no loader has been defined."));g.push(h.filesLoader(d,c).then(function(){return h._loadDependencies(d)}))}}),l.all(g)},inject:function(b){var c=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],d=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],e=this,g=l.defer();if(a.isDefined(b)&&null!==b){if(a.isArray(b)){var h=[];return a.forEach(b,function(a){h.push(e.inject(a,c,d))}),l.all(h)}e._addToLoadList(e._getModuleName(b),!0,d)}if(f.length>0){var i=f.slice(),j=function m(a){C.push(a),D[a]=g.promise,e._loadDependencies(a,c).then(function(){try{k=[],t(z,C,c)}catch(a){return e._$log.error(a.message),void g.reject(a)}f.length>0?m(f.shift()):g.resolve(i)},function(a){g.reject(a)})};j(f.shift())}else{if(c&&c.name&&D[c.name])return D[c.name];g.resolve()}return g.promise},getRequires:function(b){var d=[];return a.forEach(b.requires,function(a){-1===c.indexOf(a)&&d.push(a)}),d},_invokeQueue:v,_registerInvokeList:u,_register:t,_addToLoadList:n,_unregister:function(b){a.isDefined(b)&&a.isArray(b)&&a.forEach(b,function(a){d[a]=void 0})}}}],this._init(a.element(b.document))}]);var m=a.bootstrap;a.bootstrap=function(b,c,d){return a.forEach(c.slice(),function(a){n(a,!0,!0)}),m(b,c,d)};var n=function(b,c,d){(h.length>0||c)&&a.isString(b)&&-1===f.indexOf(b)&&(f.push(b),d&&g.push(b))},o=a.module;a.module=function(a,b,c){return n(a,!1,!0),o(a,b,c)},"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="oc.lazyLoad")}(angular,window),function(a){"use strict";a.module("oc.lazyLoad").directive("ocLazyLoad",["$ocLazyLoad","$compile","$animate","$parse","$timeout",function(b,c,d,e,f){return{restrict:"A",terminal:!0,priority:1e3,compile:function(f,g){var h=f[0].innerHTML;return f.html(""),function(f,g,i){var j=e(i.ocLazyLoad);f.$watch(function(){return j(f)||i.ocLazyLoad},function(e){a.isDefined(e)&&b.load(e).then(function(){d.enter(h,g),c(g.contents())(f)})},!0)}}}}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(b){b.decorator("$ocLazyLoad",["$delegate","$q","$window","$interval",function(b,c,d,e){var f=!1,g=!1,h=d.document.getElementsByTagName("head")[0]||d.document.getElementsByTagName("body")[0];return b.buildElement=function(i,j,k){var l,m,n=c.defer(),o=b._getFilesCache(),p=function(a){var b=(new Date).getTime();return a.indexOf("?")>=0?"&"===a.substring(0,a.length-1)?a+"_dc="+b:a+"&_dc="+b:a+"?_dc="+b};switch(a.isUndefined(o.get(j))&&o.put(j,n.promise),i){case"css":l=d.document.createElement("link"),l.type="text/css",l.rel="stylesheet",l.href=k.cache===!1?p(j):j;break;case"js":l=d.document.createElement("script"),l.src=k.cache===!1?p(j):j;break;default:o.remove(j),n.reject(new Error('Requested type "'+i+'" is not known. Could not inject "'+j+'"'))}l.onload=l.onreadystatechange=function(a){l.readyState&&!/^c|loade/.test(l.readyState)||m||(l.onload=l.onreadystatechange=null,m=1,b._broadcast("ocLazyLoad.fileLoaded",j),n.resolve())},l.onerror=function(){o.remove(j),n.reject(new Error("Unable to load "+j))},l.async=k.serie?0:1;var q=h.lastChild;if(k.insertBefore){var r=a.element(a.isDefined(window.jQuery)?k.insertBefore:document.querySelector(k.insertBefore));r&&r.length>0&&(q=r[0])}if(q.parentNode.insertBefore(l,q),"css"==i){if(!f){var s=d.navigator.userAgent.toLowerCase();if(/iP(hone|od|ad)/.test(d.navigator.platform)){var t=d.navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),u=parseFloat([parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3]||0,10)].join("."));g=6>u}else if(s.indexOf("android")>-1){var v=parseFloat(s.slice(s.indexOf("android")+8));g=4.4>v}else if(s.indexOf("safari")>-1){var w=s.match(/version\/([\.\d]+)/i);g=w&&w[1]&&parseFloat(w[1])<6}}if(g)var x=1e3,y=e(function(){try{l.sheet.cssRules,e.cancel(y),l.onload()}catch(a){--x<=0&&l.onerror()}},20)}return n.promise},b}])}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(b){b.decorator("$ocLazyLoad",["$delegate","$q",function(b,c){return b.filesLoader=function(d){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],f=[],g=[],h=[],i=[],j=null,k=b._getFilesCache();b.toggleWatch(!0),a.extend(e,d);var l=function(c){var d,l=null;if(a.isObject(c)&&(l=c.type,c=c.path),j=k.get(c),a.isUndefined(j)||e.cache===!1){if(null!==(d=/^(css|less|html|htm|js)?(?=!)/.exec(c))&&(l=d[1],c=c.substr(d[1].length+1,c.length)),!l)if(null!==(d=/[.](css|less|html|htm|js)?((\?|#).*)?$/.exec(c)))l=d[1];else{if(b.jsLoader.hasOwnProperty("ocLazyLoadLoader")||!b.jsLoader.hasOwnProperty("requirejs"))return void b._$log.error("File type could not be determined. "+c);l="js"}"css"!==l&&"less"!==l||-1!==f.indexOf(c)?"html"!==l&&"htm"!==l||-1!==g.indexOf(c)?"js"===l||-1===h.indexOf(c)?h.push(c):b._$log.error("File type is not valid. "+c):g.push(c):f.push(c)}else j&&i.push(j)};if(e.serie?l(e.files.shift()):a.forEach(e.files,function(a){l(a)}),f.length>0){var m=c.defer();b.cssLoader(f,function(c){a.isDefined(c)&&b.cssLoader.hasOwnProperty("ocLazyLoadLoader")?(b._$log.error(c),m.reject(c)):m.resolve()},e),i.push(m.promise)}if(g.length>0){var n=c.defer();b.templatesLoader(g,function(c){a.isDefined(c)&&b.templatesLoader.hasOwnProperty("ocLazyLoadLoader")?(b._$log.error(c),n.reject(c)):n.resolve()},e),i.push(n.promise)}if(h.length>0){var o=c.defer();b.jsLoader(h,function(c){a.isDefined(c)&&(b.jsLoader.hasOwnProperty("ocLazyLoadLoader")||b.jsLoader.hasOwnProperty("requirejs"))?(b._$log.error(c),o.reject(c)):o.resolve()},e),i.push(o.promise)}if(0===i.length){var p=c.defer(),q="Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'.";return b._$log.error(q),p.reject(q),p.promise}return e.serie&&e.files.length>0?c.all(i).then(function(){return b.filesLoader(d,e)}):c.all(i)["finally"](function(a){return b.toggleWatch(!1),a})},b.load=function(d){var e,f=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],g=this,h=null,i=[],j=c.defer(),k=a.copy(d),l=a.copy(f);if(a.isArray(k))return a.forEach(k,function(a){i.push(g.load(a,l))}),c.all(i).then(function(a){j.resolve(a)},function(a){j.reject(a)}),j.promise;if(a.isString(k)?(h=g.getModuleConfig(k),h||(h={files:[k]})):a.isObject(k)&&(h=a.isDefined(k.path)&&a.isDefined(k.type)?{files:[k]}:g.setModuleConfig(k)),null===h){var m=g._getModuleName(k);return e='Module "'+(m||"unknown")+'" is not configured, cannot load.',b._$log.error(e),j.reject(new Error(e)),j.promise}a.isDefined(h.template)&&(a.isUndefined(h.files)&&(h.files=[]),a.isString(h.template)?h.files.push(h.template):a.isArray(h.template)&&h.files.concat(h.template));var n=a.extend({},l,h);return a.isUndefined(h.files)&&a.isDefined(h.name)&&b.moduleExists(h.name)?b.inject(h.name,n,!0):(b.filesLoader(h,n).then(function(){b.inject(null,n).then(function(a){j.resolve(a)},function(a){j.reject(a)})},function(a){j.reject(a)}),j.promise)},b}])}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(b){b.decorator("$ocLazyLoad",["$delegate","$q",function(b,c){return b.cssLoader=function(d,e,f){var g=[];a.forEach(d,function(a){g.push(b.buildElement("css",a,f))}),c.all(g).then(function(){e()},function(a){e(a)})},b.cssLoader.ocLazyLoadLoader=!0,b}])}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(b){b.decorator("$ocLazyLoad",["$delegate","$q",function(b,c){return b.jsLoader=function(d,e,f){var g=[];a.forEach(d,function(a){g.push(b.buildElement("js",a,f))}),c.all(g).then(function(){e()},function(a){e(a)})},b.jsLoader.ocLazyLoadLoader=!0,b}])}])}(angular),function(a){"use strict";a.module("oc.lazyLoad").config(["$provide",function(b){b.decorator("$ocLazyLoad",["$delegate","$templateCache","$q","$http",function(b,c,d,e){return b.templatesLoader=function(f,g,h){var i=[],j=b._getFilesCache();return a.forEach(f,function(b){var f=d.defer();i.push(f.promise),e.get(b,h).success(function(d){a.isString(d)&&d.length>0&&a.forEach(a.element(d),function(a){"SCRIPT"===a.nodeName&&"text/ng-template"===a.type&&c.put(a.id,a.innerHTML)}),a.isUndefined(j.get(b))&&j.put(b,!0),f.resolve()}).error(function(a){f.reject(new Error('Unable to load template file "'+b+'": '+a))})}),d.all(i).then(function(){g()},function(a){g(a)})},b.templatesLoader.ocLazyLoadLoader=!0,b}])}])}(angular),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;var f=+b||0;if(Math.abs(f)===1/0&&(f=0),f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);e>c;){if(c in d&&d[c]===a)return c;c++}return-1}),"undefined"==typeof PDFJS&&(("undefined"!=typeof window?window:this).PDFJS={}),PDFJS.version="1.1.551",PDFJS.build="2a5616c",function(){"use strict";function a(a){PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.infos&&console.log("Info: "+a)}function b(a){PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.warnings&&console.log("Warning: "+a)}function c(a){b("Deprecated API usage: "+a)}function d(a){throw PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.errors&&(console.log("Error: "+a),console.log(e())),I.notify(H.unknown),new Error(a)}function e(){try{throw new Error}catch(a){return a.stack?a.stack.split("\n").slice(2).join("\n"):""}}function f(a,b){a||d(b)}function g(a,b){if(!b)return a;if(/^[a-z][a-z0-9+\-.]*:/i.test(b))return b;var c;if("/"===b.charAt(0))return c=a.indexOf("://"),"/"===b.charAt(1)?++c:c=a.indexOf("/",c+3),a.substring(0,c)+b;var d=a.length;c=a.lastIndexOf("#"),d=c>=0?c:d,c=a.lastIndexOf("?",d),d=c>=0?c:d;var e=a.lastIndexOf("/",d);return a.substring(0,e+1)+b}function h(a,b){if(!a)return!1;var c=/^[a-z][a-z0-9+\-.]*(?=:)/i.exec(a);if(!c)return b;switch(c=c[0].toLowerCase()){case"http":case"https":case"ftp":case"mailto":case"tel":return!0;default:return!1}}function i(a,b,c){return Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!1}),c}function j(){switch(PDFJS.openExternalLinksInNewWindow&&(b("PDFJS.openExternalLinksInNewWindow is deprecated, use PDFJS.externalLinkTarget instead."),PDFJS.externalLinkTarget===J.NONE&&(PDFJS.externalLinkTarget=J.BLANK),PDFJS.openExternalLinksInNewWindow=!1),PDFJS.externalLinkTarget){case J.NONE:return!1;case J.SELF:case J.BLANK:case J.PARENT:case J.TOP:return!0}return b("PDFJS.externalLinkTarget is invalid: "+PDFJS.externalLinkTarget),PDFJS.externalLinkTarget=J.NONE,!1}function k(a){f(null!==a&&"object"==typeof a&&void 0!==a.length,"Invalid argument for bytesToString");var b=a.length,c=8192;if(c>b)return String.fromCharCode.apply(null,a);for(var d=[],e=0;b>e;e+=c){var g=Math.min(e+c,b),h=a.subarray(e,g);d.push(String.fromCharCode.apply(null,h))}return d.join("")}function l(a){f("string"==typeof a,"Invalid argument for stringToBytes");for(var b=a.length,c=new Uint8Array(b),d=0;b>d;++d)c[d]=255&a.charCodeAt(d);return c}function m(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,255&a)}function n(){var a=new Uint8Array(2);a[0]=1;var b=new Uint16Array(a.buffer);return 1===b[0]}function o(){var a=document.createElement("canvas");a.width=a.height=1;var b=a.getContext("2d"),c=b.createImageData(1,1);return"undefined"!=typeof c.data.buffer}function p(a){return"number"==typeof a}function q(a){return a instanceof Array}function r(a){return"object"==typeof a&&null!==a&&void 0!==a.byteLength}function s(){var a={};return a.promise=new Promise(function(b,c){a.resolve=b,a.reject=c}),a}function t(a,b){this.name=a,this.comObj=b,this.callbackIndex=1,this.postMessageTransfers=!0;var c=this.callbacksCapabilities={},e=this.actionHandler={};e.console_log=[function(a){console.log.apply(console,a)}],e.console_error=[function(a){console.error.apply(console,a)}],e._unsupported_feature=[function(a){I.notify(a)}],b.onmessage=function(a){var f=a.data;if(f.isReply){var g=f.callbackId;if(f.callbackId in c){var h=c[g];delete c[g],"error"in f?h.reject(f.error):h.resolve(f.data)}else d("Cannot resolve callback "+g)}else if(f.action in e){var i=e[f.action];f.callbackId?Promise.resolve().then(function(){return i[0].call(i[1],f.data)}).then(function(a){b.postMessage({isReply:!0,callbackId:f.callbackId,data:a})},function(a){a instanceof Error&&(a+=""),b.postMessage({isReply:!0,callbackId:f.callbackId,error:a})}):i[0].call(i[1],f.data)}else d("Unknown action from worker: "+f.action)}}function u(a,c,d){var e=new Image;e.onload=function(){d.resolve(a,e)},e.onerror=function(){d.resolve(a,null),b("Error during JPEG image loading")},e.src=c}function v(a,b){var c=document.createElement("canvas");return c.width=a,c.height=b,c}function w(a){a.mozCurrentTransform||(a._originalSave=a.save,a._originalRestore=a.restore,a._originalRotate=a.rotate,a._originalScale=a.scale,a._originalTranslate=a.translate,a._originalTransform=a.transform,a._originalSetTransform=a.setTransform,a._transformMatrix=a._transformMatrix||[1,0,0,1,0,0],a._transformStack=[],Object.defineProperty(a,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(a,"mozCurrentTransformInverse",{get:function(){var a=this._transformMatrix,b=a[0],c=a[1],d=a[2],e=a[3],f=a[4],g=a[5],h=b*e-c*d,i=c*d-b*e;return[e/h,c/i,d/i,b/h,(e*f-d*g)/i,(c*f-b*g)/h]}}),a.save=function(){var a=this._transformMatrix;this._transformStack.push(a),this._transformMatrix=a.slice(0,6),this._originalSave()},a.restore=function(){var a=this._transformStack.pop();a&&(this._transformMatrix=a,this._originalRestore())},a.translate=function(a,b){var c=this._transformMatrix;c[4]=c[0]*a+c[2]*b+c[4],c[5]=c[1]*a+c[3]*b+c[5],this._originalTranslate(a,b)},a.scale=function(a,b){var c=this._transformMatrix;c[0]=c[0]*a,c[1]=c[1]*a,c[2]=c[2]*b,c[3]=c[3]*b,this._originalScale(a,b)},a.transform=function(b,c,d,e,f,g){var h=this._transformMatrix;this._transformMatrix=[h[0]*b+h[2]*c,h[1]*b+h[3]*c,h[0]*d+h[2]*e,h[1]*d+h[3]*e,h[0]*f+h[2]*g+h[4],h[1]*f+h[3]*g+h[5]],a._originalTransform(b,c,d,e,f,g)},a.setTransform=function(b,c,d,e,f,g){this._transformMatrix=[b,c,d,e,f,g],a._originalSetTransform(b,c,d,e,f,g)},a.rotate=function(a){var b=Math.cos(a),c=Math.sin(a),d=this._transformMatrix;this._transformMatrix=[d[0]*b+d[2]*c,d[1]*b+d[3]*c,d[0]*-c+d[2]*b,d[1]*-c+d[3]*b,d[4],d[5]],this._originalRotate(a)})}function x(a){var b,c,d,e,f=1e3,g=a.width,h=a.height,i=g+1,j=new Uint8Array(i*(h+1)),k=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),l=g+7&-8,m=a.data,n=new Uint8Array(l*h),o=0;for(b=0,e=m.length;e>b;b++)for(var p=128,q=m[b];p>0;)n[o++]=q&p?0:255,p>>=1;var r=0;for(o=0,0!==n[o]&&(j[0]=1,++r),c=1;g>c;c++)n[o]!==n[o+1]&&(j[c]=n[o]?2:1,++r),o++;for(0!==n[o]&&(j[c]=2,++r),b=1;h>b;b++){o=b*l,d=b*i,n[o-l]!==n[o]&&(j[d]=n[o]?1:8,++r);var s=(n[o]?4:0)+(n[o-l]?8:0);for(c=1;g>c;c++)s=(s>>2)+(n[o+1]?4:0)+(n[o-l+1]?8:0),k[s]&&(j[d+c]=k[s],++r),o++;if(n[o-l]!==n[o]&&(j[d+c]=n[o]?2:4,++r),r>f)return null}for(o=l*(h-1),d=b*i,0!==n[o]&&(j[d]=8,++r),c=1;g>c;c++)n[o]!==n[o+1]&&(j[d+c]=n[o]?4:8,++r),o++;if(0!==n[o]&&(j[d+c]=4,++r),r>f)return null;var t=new Int32Array([0,i,-1,0,-i,0,0,0,1]),u=[];for(b=0;r&&h>=b;b++){for(var v=b*i,w=v+g;w>v&&!j[v];)v++;if(v!==w){var x,y=[v%i,b],z=j[v],A=v;do{var B=t[z];do v+=B;while(!j[v]);x=j[v],5!==x&&10!==x?(z=x,j[v]=0):(z=x&51*z>>4,j[v]&=z>>2|z<<2),y.push(v%i),y.push(v/i|0),--r}while(A!==v);u.push(y),--b}}var C=function(a){a.save(),a.scale(1/g,-1/h),a.translate(0,-h),a.beginPath();for(var b=0,c=u.length;c>b;b++){var d=u[b];a.moveTo(d[0],d[1]);for(var e=2,f=d.length;f>e;e+=2)a.lineTo(d[e],d[e+1])}a.fill(),a.beginPath(),a.restore()};return C}function y(a){var b=ma[a[0]];return b||d("Unknown IR type: "+a[0]),b.fromIR(a)}var z="undefined"==typeof window?this:window,A="undefined"==typeof window,B=[.001,0,0,.001,0,0],C={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},D={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},E={WIDGET:1,TEXT:2,LINK:3},F={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};z.PDFJS||(z.PDFJS={}),z.PDFJS.pdfBug=!1,PDFJS.VERBOSITY_LEVELS={errors:0,warnings:1,infos:5};var G=PDFJS.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},H=PDFJS.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"},I=PDFJS.UnsupportedManager=function(){var a=[];return{listen:function(b){a.push(b)},notify:function(c){b('Unsupported feature "'+c+'"');for(var d=0,e=a.length;e>d;d++)a[d](c)}}}();PDFJS.isValidUrl=h,PDFJS.shadow=i;var J=PDFJS.LinkTarget={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4},K=["","_self","_blank","_parent","_top"];PDFJS.isExternalLinkTargetSet=j;var L=PDFJS.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},M=function(){function a(a,b){this.name="PasswordException",this.message=a,this.code=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.PasswordException=M;var N=function(){function a(a,b){this.name="UnknownErrorException",this.message=a,this.details=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.UnknownErrorException=N;var O=function(){function a(a){this.name="InvalidPDFException",this.message=a}return a.prototype=new Error,a.constructor=a,a}();PDFJS.InvalidPDFException=O;var P=function(){function a(a){this.name="MissingPDFException",this.message=a}return a.prototype=new Error,a.constructor=a,a}();PDFJS.MissingPDFException=P;var Q=function(){function a(a,b){this.name="UnexpectedResponseException",this.message=a,this.status=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.UnexpectedResponseException=Q;(function(){function a(a){this.message=a}return a.prototype=new Error,a.prototype.name="NotImplementedException",a.constructor=a,a})(),function(){function a(a,b){this.begin=a,this.end=b,this.message="Missing data ["+a+", "+b+")"}return a.prototype=new Error,a.prototype.name="MissingDataException",a.constructor=a,a}(),function(){function a(a){this.message=a}return a.prototype=new Error,a.prototype.name="XRefParseException",a.constructor=a,a}();Object.defineProperty(PDFJS,"isLittleEndian",{configurable:!0,get:function(){return i(PDFJS,"isLittleEndian",n())}}),Object.defineProperty(PDFJS,"hasCanvasTypedArrays",{configurable:!0,get:function(){return i(PDFJS,"hasCanvasTypedArrays",o())}});var R=function(){function a(a,b){this.buffer=a,this.byteLength=a.length,this.length=void 0===b?this.byteLength>>2:b,c(this.length)}function b(a){return{get:function(){var b=this.buffer,c=a<<2;return(b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24)>>>0},set:function(b){var c=this.buffer,d=a<<2;c[d]=255&b,c[d+1]=b>>8&255,c[d+2]=b>>16&255,c[d+3]=b>>>24&255}}}function c(c){for(;c>d;)Object.defineProperty(a.prototype,d,b(d)),d++}a.prototype=Object.create(null);var d=0;return a}(),S=[1,0,0,1,0,0],T=PDFJS.Util=function(){function a(){}var b=["rgb(",0,",",0,",",0,")"];return a.makeCssRgb=function(a,c,d){return b[1]=a,b[3]=c,b[5]=d,b.join("")},a.transform=function(a,b){return[a[0]*b[0]+a[2]*b[1],a[1]*b[0]+a[3]*b[1],a[0]*b[2]+a[2]*b[3],a[1]*b[2]+a[3]*b[3],a[0]*b[4]+a[2]*b[5]+a[4],a[1]*b[4]+a[3]*b[5]+a[5]]},a.applyTransform=function(a,b){var c=a[0]*b[0]+a[1]*b[2]+b[4],d=a[0]*b[1]+a[1]*b[3]+b[5];return[c,d]},a.applyInverseTransform=function(a,b){var c=b[0]*b[3]-b[1]*b[2],d=(a[0]*b[3]-a[1]*b[2]+b[2]*b[5]-b[4]*b[3])/c,e=(-a[0]*b[1]+a[1]*b[0]+b[4]*b[1]-b[5]*b[0])/c;return[d,e]},a.getAxialAlignedBoundingBox=function(b,c){var d=a.applyTransform(b,c),e=a.applyTransform(b.slice(2,4),c),f=a.applyTransform([b[0],b[3]],c),g=a.applyTransform([b[2],b[1]],c);return[Math.min(d[0],e[0],f[0],g[0]),Math.min(d[1],e[1],f[1],g[1]),Math.max(d[0],e[0],f[0],g[0]),Math.max(d[1],e[1],f[1],g[1])]},a.inverseTransform=function(a){var b=a[0]*a[3]-a[1]*a[2];return[a[3]/b,-a[1]/b,-a[2]/b,a[0]/b,(a[2]*a[5]-a[4]*a[3])/b,(a[4]*a[1]-a[5]*a[0])/b]},a.apply3dTransform=function(a,b){return[a[0]*b[0]+a[1]*b[1]+a[2]*b[2],a[3]*b[0]+a[4]*b[1]+a[5]*b[2],a[6]*b[0]+a[7]*b[1]+a[8]*b[2]]},a.singularValueDecompose2dScale=function(a){var b=[a[0],a[2],a[1],a[3]],c=a[0]*b[0]+a[1]*b[2],d=a[0]*b[1]+a[1]*b[3],e=a[2]*b[0]+a[3]*b[2],f=a[2]*b[1]+a[3]*b[3],g=(c+f)/2,h=Math.sqrt((c+f)*(c+f)-4*(c*f-e*d))/2,i=g+h||1,j=g-h||1;return[Math.sqrt(i),Math.sqrt(j)]},a.normalizeRect=function(a){var b=a.slice(0);return a[0]>a[2]&&(b[0]=a[2],b[2]=a[0]),a[1]>a[3]&&(b[1]=a[3],b[3]=a[1]),b},a.intersect=function(b,c){function d(a,b){return a-b}var e=[b[0],b[2],c[0],c[2]].sort(d),f=[b[1],b[3],c[1],c[3]].sort(d),g=[];return b=a.normalizeRect(b),c=a.normalizeRect(c),e[0]===b[0]&&e[1]===c[0]||e[0]===c[0]&&e[1]===b[0]?(g[0]=e[1],g[2]=e[2],f[0]===b[1]&&f[1]===c[1]||f[0]===c[1]&&f[1]===b[1]?(g[1]=f[1],g[3]=f[2],g):!1):!1},a.sign=function(a){return 0>a?-1:1},a.appendToArray=function(a,b){Array.prototype.push.apply(a,b)},a.prependToArray=function(a,b){Array.prototype.unshift.apply(a,b)},a.extendObj=function(a,b){for(var c in b)a[c]=b[c]},a.getInheritableProperty=function(a,b){for(;a&&!a.has(b);)a=a.get("Parent");return a?a.get(b):null},a.inherit=function(a,b,c){a.prototype=Object.create(b.prototype),a.prototype.constructor=a;for(var d in c)a.prototype[d]=c[d]},a.loadScript=function(a,b){var c=document.createElement("script"),d=!1;c.setAttribute("src",a),b&&(c.onload=function(){d||b(),d=!0}),document.getElementsByTagName("head")[0].appendChild(c)},a}();PDFJS.PageViewport=function(){function a(a,b,c,d,e,f){this.viewBox=a,this.scale=b,this.rotation=c,this.offsetX=d,this.offsetY=e;var g,h,i,j,k=(a[2]+a[0])/2,l=(a[3]+a[1])/2;switch(c%=360,c=0>c?c+360:c){case 180:g=-1,h=0,i=0,j=1;break;case 90:g=0,h=1,i=1,j=0;break;case 270:g=0,h=-1,i=-1,j=0;break;default:g=1,h=0,i=0,j=-1}f&&(i=-i,j=-j);var m,n,o,p;0===g?(m=Math.abs(l-a[1])*b+d,n=Math.abs(k-a[0])*b+e,o=Math.abs(a[3]-a[1])*b,p=Math.abs(a[2]-a[0])*b):(m=Math.abs(k-a[0])*b+d,n=Math.abs(l-a[1])*b+e,o=Math.abs(a[2]-a[0])*b,p=Math.abs(a[3]-a[1])*b),this.transform=[g*b,h*b,i*b,j*b,m-g*b*k-i*b*l,n-h*b*k-j*b*l],this.width=o,this.height=p,this.fontScale=b}return a.prototype={clone:function(b){b=b||{};var c="scale"in b?b.scale:this.scale,d="rotation"in b?b.rotation:this.rotation;return new a(this.viewBox.slice(),c,d,this.offsetX,this.offsetY,b.dontFlip)},convertToViewportPoint:function(a,b){return T.applyTransform([a,b],this.transform)},convertToViewportRectangle:function(a){var b=T.applyTransform([a[0],a[1]],this.transform),c=T.applyTransform([a[2],a[3]],this.transform);return[b[0],b[1],c[0],c[1]]},convertToPdfPoint:function(a,b){return T.applyInverseTransform([a,b],this.transform)}},a}();PDFJS.createPromiseCapability=s,function(){function a(a){this._status=c,this._handlers=[];try{a.call(this,this._resolve.bind(this),this._reject.bind(this))}catch(b){this._reject(b)}}if(z.Promise)return"function"!=typeof z.Promise.all&&(z.Promise.all=function(a){var b,c,d=0,e=[],f=new z.Promise(function(a,d){b=a,c=d});return a.forEach(function(a,f){d++,a.then(function(a){e[f]=a,d--,0===d&&b(e)},c)}),0===d&&b(e),f}),"function"!=typeof z.Promise.resolve&&(z.Promise.resolve=function(a){return new z.Promise(function(b){b(a)})}),"function"!=typeof z.Promise.reject&&(z.Promise.reject=function(a){return new z.Promise(function(b,c){c(a)})}),void("function"!=typeof z.Promise.prototype["catch"]&&(z.Promise.prototype["catch"]=function(a){return z.Promise.prototype.then(void 0,a)}));var c=0,d=1,e=2,f=500,g={handlers:[],running:!1,unhandledRejections:[],pendingRejectionCheck:!1,scheduleHandlers:function(a){a._status!==c&&(this.handlers=this.handlers.concat(a._handlers),a._handlers=[],this.running||(this.running=!0,setTimeout(this.runHandlers.bind(this),0)))},runHandlers:function(){for(var a=1,b=Date.now()+a;this.handlers.length>0;){var c=this.handlers.shift(),f=c.thisPromise._status,g=c.thisPromise._value;try{f===d?"function"==typeof c.onResolve&&(g=c.onResolve(g)):"function"==typeof c.onReject&&(g=c.onReject(g),f=d,c.thisPromise._unhandledRejection&&this.removeUnhandeledRejection(c.thisPromise))}catch(h){f=e,g=h}if(c.nextPromise._updateStatus(f,g),Date.now()>=b)break}return this.handlers.length>0?void setTimeout(this.runHandlers.bind(this),0):void(this.running=!1)},addUnhandledRejection:function(a){this.unhandledRejections.push({promise:a,time:Date.now()}),this.scheduleRejectionCheck()},removeUnhandeledRejection:function(a){a._unhandledRejection=!1;for(var b=0;bf){var d=this.unhandledRejections[c].promise._value,e="Unhandled rejection: "+d;d.stack&&(e+="\n"+d.stack),b(e),this.unhandledRejections.splice(c),c--}this.unhandledRejections.length&&this.scheduleRejectionCheck()}.bind(this),f))}};a.all=function(b){function c(a){g._status!==e&&(i=[],f(a))}var d,f,g=new a(function(a,b){d=a,f=b}),h=b.length,i=[];if(0===h)return d(i),g;for(var j=0,k=b.length;k>j;++j){var l=b[j],m=function(a){return function(b){g._status!==e&&(i[a]=b,h--,0===h&&d(i))}}(j);a.isPromise(l)?l.then(m,c):m(l)}return g},a.isPromise=function(a){return a&&"function"==typeof a.then},a.resolve=function(b){return new a(function(a){a(b)})},a.reject=function(b){return new a(function(a,c){c(b)})},a.prototype={_status:null,_value:null,_handlers:null,_unhandledRejection:null,_updateStatus:function(b,c){if(this._status!==d&&this._status!==e){if(b===d&&a.isPromise(c))return void c.then(this._updateStatus.bind(this,d),this._updateStatus.bind(this,e));this._status=b,this._value=c,b===e&&0===this._handlers.length&&(this._unhandledRejection=!0,g.addUnhandledRejection(this)),g.scheduleHandlers(this)}},_resolve:function(a){this._updateStatus(d,a)},_reject:function(a){this._updateStatus(e,a)},then:function(b,c){var d=new a(function(a,b){this.resolve=a,this.reject=b});return this._handlers.push({thisPromise:this,onResolve:b,onReject:c,nextPromise:d}),g.scheduleHandlers(this),d},"catch":function(a){return this.then(void 0,a)}},z.Promise=a}();var U=function(){function a(a,b,c){for(;a.lengthb;++b){var g=d[b].name;g.length>f&&(f=g.length)}for(b=0,c=d.length;c>b;++b){var h=d[b],i=h.end-h.start;e+=a(h.name," ",f)+" "+i+"ms\n"}return e}},c}();PDFJS.createBlob=function(a,b){if("undefined"!=typeof Blob)return new Blob([a],{type:b});var c=new MozBlobBuilder;return c.append(a),c.getBlob(b)},PDFJS.createObjectURL=function(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(b,c){if(!PDFJS.disableCreateObjectURL&&"undefined"!=typeof URL&&URL.createObjectURL){var d=PDFJS.createBlob(b,c);return URL.createObjectURL(d)}for(var e="data:"+c+";base64,",f=0,g=b.length;g>f;f+=3){var h=255&b[f],i=255&b[f+1],j=255&b[f+2],k=h>>2,l=(3&h)<<4|i>>4,m=g>f+1?(15&i)<<2|j>>6:64,n=g>f+2?63&j:64;e+=a[k]+a[l]+a[m]+a[n]}return e}}(),t.prototype={on:function(a,b,c){var e=this.actionHandler;e[a]&&d('There is already an actionName called "'+a+'"'),e[a]=[b,c]},send:function(a,b,c){var d={action:a,data:b};this.postMessage(d,c)},sendWithPromise:function(a,b,c){var d=this.callbackIndex++,e={action:a,data:b,callbackId:d},f=s();this.callbacksCapabilities[d]=f;try{this.postMessage(e,c)}catch(g){f.reject(g)}return f.promise},postMessage:function(a,b){b&&this.postMessageTransfers?this.comObj.postMessage(a,b):this.comObj.postMessage(a)}},PDFJS.maxImageSize=void 0===PDFJS.maxImageSize?-1:PDFJS.maxImageSize,PDFJS.cMapUrl=void 0===PDFJS.cMapUrl?null:PDFJS.cMapUrl,PDFJS.cMapPacked=void 0===PDFJS.cMapPacked?!1:PDFJS.cMapPacked,PDFJS.disableFontFace=void 0===PDFJS.disableFontFace?!1:PDFJS.disableFontFace,PDFJS.imageResourcesPath=void 0===PDFJS.imageResourcesPath?"":PDFJS.imageResourcesPath,PDFJS.disableWorker=void 0===PDFJS.disableWorker?!1:PDFJS.disableWorker,PDFJS.workerSrc=void 0===PDFJS.workerSrc?null:PDFJS.workerSrc,PDFJS.disableRange=void 0===PDFJS.disableRange?!1:PDFJS.disableRange,PDFJS.disableStream=void 0===PDFJS.disableStream?!1:PDFJS.disableStream,PDFJS.disableAutoFetch=void 0===PDFJS.disableAutoFetch?!1:PDFJS.disableAutoFetch,PDFJS.pdfBug=void 0===PDFJS.pdfBug?!1:PDFJS.pdfBug,PDFJS.postMessageTransfers=void 0===PDFJS.postMessageTransfers?!0:PDFJS.postMessageTransfers,PDFJS.disableCreateObjectURL=void 0===PDFJS.disableCreateObjectURL?!1:PDFJS.disableCreateObjectURL,PDFJS.disableWebGL=void 0===PDFJS.disableWebGL?!0:PDFJS.disableWebGL,PDFJS.disableFullscreen=void 0===PDFJS.disableFullscreen?!1:PDFJS.disableFullscreen,PDFJS.useOnlyCssZoom=void 0===PDFJS.useOnlyCssZoom?!1:PDFJS.useOnlyCssZoom,PDFJS.verbosity=void 0===PDFJS.verbosity?PDFJS.VERBOSITY_LEVELS.warnings:PDFJS.verbosity,PDFJS.maxCanvasPixels=void 0===PDFJS.maxCanvasPixels?16777216:PDFJS.maxCanvasPixels,PDFJS.openExternalLinksInNewWindow=void 0===PDFJS.openExternalLinksInNewWindow?!1:PDFJS.openExternalLinksInNewWindow,PDFJS.externalLinkTarget=void 0===PDFJS.externalLinkTarget?PDFJS.LinkTarget.NONE:PDFJS.externalLinkTarget,PDFJS.isEvalSupported=void 0===PDFJS.isEvalSupported?!0:PDFJS.isEvalSupported,PDFJS.getDocument=function(a,b,e,f){var h=new V;arguments.length>1&&c("getDocument is called with pdfDataRangeTransport, passwordCallback or progressCallback argument"),b&&(b instanceof W||(b=Object.create(b),b.length=a.length,b.initialData=a.initialData,b.abort||(b.abort=function(){})),a=Object.create(a),a.range=b),h.onPassword=e||null,h.onProgress=f||null;var i,j,k;"string"==typeof a?k={url:a}:r(a)?k={data:a}:a instanceof W?k={range:a}:("object"!=typeof a&&d("Invalid parameter in getDocument, need either Uint8Array, string or a parameter object"),a.url||a.data||a.range||d("Invalid parameter object: need either .data, .range or .url"),k=a);var m={};for(var n in k)if("url"!==n||"undefined"==typeof window){if("range"!==n)if("data"!==n||k[n]instanceof Uint8Array)m[n]=k[n];else{var o=k[n];"string"==typeof o?m[n]=l(o):"object"!=typeof o||null===o||isNaN(o.length)?r(o)?m[n]=new Uint8Array(o):d("Invalid PDF binary data: either typed array, string or array-like object is expected in the data property."):m[n]=new Uint8Array(o)}}else m[n]=g(window.location.href,k[n]);return i=s(),j=new Z(i,k.range),i.promise.then(function(){j.fetchDocument(h,m)}),h._transport=j,h};var V=function(){function a(){this._capability=s(),this._transport=null,this.onPassword=null,this.onProgress=null}return a.prototype={get promise(){return this._capability.promise},destroy:function(){return this._transport.destroy()},then:function(a,b){return this.promise.then.apply(this.promise,arguments)}},a}(),W=function(){function a(a,b){this.length=a,this.initialData=b,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._readyCapability=s()}return a.prototype={addRangeListener:function(a){this._rangeListeners.push(a)},addProgressListener:function(a){this._progressListeners.push(a)},addProgressiveReadListener:function(a){this._progressiveReadListeners.push(a)},onDataRange:function(a,b){for(var c=this._rangeListeners,d=0,e=c.length;e>d;++d)c[d](a,b)},onDataProgress:function(a){this._readyCapability.promise.then(function(){for(var b=this._progressListeners,c=0,d=b.length;d>c;++c)b[c](a)}.bind(this))},onDataProgressiveRead:function(a){this._readyCapability.promise.then(function(){for(var b=this._progressiveReadListeners,c=0,d=b.length;d>c;++c)b[c](a)}.bind(this))},transportReady:function(){this._readyCapability.resolve()},requestDataRange:function(a,b){throw new Error("Abstract method PDFDataRangeTransport.requestDataRange")},abort:function(){}},a}();PDFJS.PDFDataRangeTransport=W;var X=function(){function a(a,b,c){this.pdfInfo=a,this.transport=b,this.loadingTask=c}return a.prototype={get numPages(){return this.pdfInfo.numPages},get fingerprint(){return this.pdfInfo.fingerprint},getPage:function(a){return this.transport.getPage(a)},getPageIndex:function(a){return this.transport.getPageIndex(a)},getDestinations:function(){return this.transport.getDestinations()},getDestination:function(a){return this.transport.getDestination(a)},getAttachments:function(){return this.transport.getAttachments()},getJavaScript:function(){return this.transport.getJavaScript()},getOutline:function(){return this.transport.getOutline()},getMetadata:function(){return this.transport.getMetadata()},getData:function(){return this.transport.getData()},getDownloadInfo:function(){return this.transport.downloadInfoCapability.promise},getStats:function(){return this.transport.getStats()},cleanup:function(){this.transport.startCleanup()},destroy:function(){return this.transport.destroy()}},a}(),Y=function(){function a(a,b,c){this.pageIndex=a,this.pageInfo=b,this.transport=c,this.stats=new U,this.stats.enabled=!!z.PDFJS.enableStats,this.commonObjs=c.commonObjs,this.objs=new $,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this.intentStates={},this.destroyed=!1}return a.prototype={get pageNumber(){return this.pageIndex+1},get rotate(){return this.pageInfo.rotate},get ref(){return this.pageInfo.ref},get view(){return this.pageInfo.view},getViewport:function(a,b){return arguments.length<2&&(b=this.rotate),new PDFJS.PageViewport(this.view,a,b,0,0)},getAnnotations:function(){return this.annotationsPromise||(this.annotationsPromise=this.transport.getAnnotations(this.pageIndex)),this.annotationsPromise},render:function(a){function b(a){var b=f.renderTasks.indexOf(g);b>=0&&f.renderTasks.splice(b,1),i.cleanupAfterRender&&(i.pendingCleanup=!0),i._tryCleanup(),a?g.capability.reject(a):g.capability.resolve(),d.timeEnd("Rendering"),d.timeEnd("Overall")}var d=this.stats;d.time("Overall"),this.pendingCleanup=!1;var e="print"===a.intent?"print":"display";this.intentStates[e]||(this.intentStates[e]={});var f=this.intentStates[e];f.displayReadyCapability||(f.receivingOperatorList=!0,f.displayReadyCapability=s(),f.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this.stats.time("Page Request"),this.transport.messageHandler.send("RenderPageRequest",{pageIndex:this.pageNumber-1,intent:e}));var g=new aa(b,a,this.objs,this.commonObjs,f.operatorList,this.pageNumber);g.useRequestAnimationFrame="print"!==e,f.renderTasks||(f.renderTasks=[]),f.renderTasks.push(g);var h=g.task;a.continueCallback&&(c("render is used with continueCallback parameter"),h.onContinue=a.continueCallback);var i=this;return f.displayReadyCapability.promise.then(function(a){return i.pendingCleanup?void b():(d.time("Rendering"),g.initalizeGraphics(a),void g.operatorListChanged())},function(a){b(a)}),h},getOperatorList:function(){function a(){c.operatorList.lastChunk&&c.opListReadCapability.resolve(c.operatorList)}var b="oplist";this.intentStates[b]||(this.intentStates[b]={});var c=this.intentStates[b];if(!c.opListReadCapability){var d={};d.operatorListChanged=a,c.receivingOperatorList=!0,c.opListReadCapability=s(),c.renderTasks=[],c.renderTasks.push(d),c.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this.transport.messageHandler.send("RenderPageRequest",{pageIndex:this.pageIndex,intent:b})}return c.opListReadCapability.promise},getTextContent:function(){return this.transport.messageHandler.sendWithPromise("GetTextContent",{pageIndex:this.pageNumber-1})},_destroy:function(){this.destroyed=!0,this.transport.pageCache[this.pageIndex]=null;var a=[];return Object.keys(this.intentStates).forEach(function(b){var c=this.intentStates[b];c.renderTasks.forEach(function(b){var c=b.capability.promise["catch"](function(){});a.push(c),b.cancel()})},this),this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1,Promise.all(a)},destroy:function(){c("page destroy method, use cleanup() instead"),this.cleanup()},cleanup:function(){this.pendingCleanup=!0,this._tryCleanup()},_tryCleanup:function(){this.pendingCleanup&&!Object.keys(this.intentStates).some(function(a){var b=this.intentStates[a];return 0!==b.renderTasks.length||b.receivingOperatorList},this)&&(Object.keys(this.intentStates).forEach(function(a){delete this.intentStates[a]},this),this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1)},_startRenderPage:function(a,b){var c=this.intentStates[b];c.displayReadyCapability&&c.displayReadyCapability.resolve(a)},_renderPageChunk:function(a,b){var c,d,e=this.intentStates[b];for(c=0,d=a.length;d>c;c++)e.operatorList.fnArray.push(a.fnArray[c]),e.operatorList.argsArray.push(a.argsArray[c]);for(e.operatorList.lastChunk=a.lastChunk,c=0;ch&&(g.cleanupAfterRender=!0);break;default:d("Got unknown object type "+f)}},this),a.on("DocProgress",function(a){var b=this.loadingTask;b.onProgress&&b.onProgress({loaded:a.loaded,total:a.total})},this),a.on("PageError",function(a){var b=this.pageCache[a.pageNum-1],c=b.intentStates[a.intent];c.displayReadyCapability?c.displayReadyCapability.reject(a.error):d(a.error)},this),a.on("JpegDecode",function(a){var b=a[0],c=a[1];return 3!==c&&1!==c?Promise.reject(new Error("Only 3 components or 1 component can be returned")):new Promise(function(a,d){var e=new Image;e.onload=function(){var b=e.width,d=e.height,f=b*d,g=4*f,h=new Uint8Array(f*c),i=v(b,d),j=i.getContext("2d");j.drawImage(e,0,0);var k,l,m=j.getImageData(0,0,b,d).data;if(3===c)for(k=0,l=0;g>k;k+=4,l+=3)h[l]=m[k],h[l+1]=m[k+1],h[l+2]=m[k+2];else if(1===c)for(k=0,l=0;g>k;k+=4,l++)h[l]=m[k];a({data:h,width:b,height:d})},e.onerror=function(){d(new Error("JpegDecode failed to load image"))},e.src=b})})},fetchDocument:function(a,b){return this.destroyed?(a._capability.reject(new Error("Loading aborted")),void this.destroyCapability.resolve()):(this.loadingTask=a,b.disableAutoFetch=PDFJS.disableAutoFetch,b.disableStream=PDFJS.disableStream,b.chunkedViewerLoading=!!this.pdfDataRangeTransport,this.pdfDataRangeTransport&&(b.length=this.pdfDataRangeTransport.length,b.initialData=this.pdfDataRangeTransport.initialData),void this.messageHandler.send("GetDocRequest",{source:b,disableRange:PDFJS.disableRange,maxImageSize:PDFJS.maxImageSize,cMapUrl:PDFJS.cMapUrl,cMapPacked:PDFJS.cMapPacked,disableFontFace:PDFJS.disableFontFace,disableCreateObjectURL:PDFJS.disableCreateObjectURL,verbosity:PDFJS.verbosity}))},getData:function(){return this.messageHandler.sendWithPromise("GetData",null)},getPage:function(a,b){if(0>=a||a>this.numPages||(0|a)!==a)return Promise.reject(new Error("Invalid page request"));var c=a-1;if(c in this.pagePromises)return this.pagePromises[c];var d=this.messageHandler.sendWithPromise("GetPage",{pageIndex:c}).then(function(a){if(this.destroyed)throw new Error("Transport destroyed");var b=new Y(c,a,this);return this.pageCache[c]=b,b}.bind(this));return this.pagePromises[c]=d,d},getPageIndex:function(a){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:a})},getAnnotations:function(a){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:a})},getDestinations:function(){return this.messageHandler.sendWithPromise("GetDestinations",null)},getDestination:function(a){return this.messageHandler.sendWithPromise("GetDestination",{id:a})},getAttachments:function(){return this.messageHandler.sendWithPromise("GetAttachments",null)},getJavaScript:function(){return this.messageHandler.sendWithPromise("GetJavaScript",null)},getOutline:function(){return this.messageHandler.sendWithPromise("GetOutline",null)},getMetadata:function(){return this.messageHandler.sendWithPromise("GetMetadata",null).then(function(a){return{info:a[0],metadata:a[1]?new PDFJS.Metadata(a[1]):null}})},getStats:function(){return this.messageHandler.sendWithPromise("GetStats",null)},startCleanup:function(){this.messageHandler.sendWithPromise("Cleanup",null).then(function(){for(var a=0,b=this.pageCache.length;b>a;a++){var c=this.pageCache[a];c&&c.cleanup()}this.commonObjs.clear(),pa.clear()}.bind(this))}},c}(),$=function(){function a(){this.objs={}}return a.prototype={ensureObj:function(a){if(this.objs[a])return this.objs[a];var b={capability:s(),data:null,resolved:!1};return this.objs[a]=b,b},get:function(a,b){if(b)return this.ensureObj(a).capability.promise.then(b),null;var c=this.objs[a];return c&&c.resolved||d("Requesting object that isn't resolved yet "+a),c.data},resolve:function(a,b){var c=this.ensureObj(a);c.resolved=!0,c.data=b,c.capability.resolve(b)},isResolved:function(a){var b=this.objs;return b[a]?b[a].resolved:!1},hasData:function(a){return this.isResolved(a)},getData:function(a){var b=this.objs;return b[a]&&b[a].resolved?b[a].data:null},clear:function(){this.objs={}}},a}(),_=function(){function a(a){this._internalRenderTask=a,this.onContinue=null}return a.prototype={get promise(){return this._internalRenderTask.capability.promise},cancel:function(){this._internalRenderTask.cancel()},then:function(a,b){return this.promise.then.apply(this.promise,arguments)}},a}(),aa=function(){function a(a,b,c,d,e,f){this.callback=a,this.params=b,this.objs=c,this.commonObjs=d,this.operatorListIdx=null,this.operatorList=e,this.pageNumber=f,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this.useRequestAnimationFrame=!1,this.cancelled=!1,this.capability=s(),this.task=new _(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this)}return a.prototype={initalizeGraphics:function(a){if(!this.cancelled){PDFJS.pdfBug&&"StepperManager"in z&&z.StepperManager.enabled&&(this.stepper=z.StepperManager.create(this.pageNumber-1),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var b=this.params;this.gfx=new ka(b.canvasContext,this.commonObjs,this.objs,b.imageLayer),this.gfx.beginDrawing(b.viewport,a),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}},cancel:function(){this.running=!1,this.cancelled=!0,this.callback("cancelled")},operatorListChanged:function(){return this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),void(this.running||this._continue())):void(this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound))},_continue:function(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue.call(this.task,this._scheduleNextBound):this._scheduleNext())},_scheduleNext:function(){this.useRequestAnimationFrame?window.requestAnimationFrame(this._nextBound):Promise.resolve(void 0).then(this._nextBound)},_next:function(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this.callback())))}},a}(),ba=(PDFJS.Metadata=function(){function a(a){return a.replace(/>\\376\\377([^<]+)/g,function(a,b){for(var c=b.replace(/\\([0-3])([0-7])([0-7])/g,function(a,b,c,d){return String.fromCharCode(64*b+8*c+1*d)}),d="",e=0;e"+d})}function b(b){if("string"==typeof b){b=a(b);var c=new DOMParser;b=c.parseFromString(b,"application/xml")}else b instanceof Document||d("Metadata: Invalid metadata object");this.metaDocument=b,this.metadata={},this.parse()}return b.prototype={parse:function(){var a=this.metaDocument,b=a.documentElement;if("rdf:rdf"!==b.nodeName.toLowerCase())for(b=b.firstChild;b&&"rdf:rdf"!==b.nodeName.toLowerCase();)b=b.nextSibling;var c=b?b.nodeName.toLowerCase():null;if(b&&"rdf:rdf"===c&&b.hasChildNodes()){var d,e,f,g,h,i,j,k=b.childNodes;for(g=0,i=k.length;i>g;g++)if(d=k[g],"rdf:description"===d.nodeName.toLowerCase())for(h=0,j=d.childNodes.length;j>h;h++)"#text"!==d.childNodes[h].nodeName.toLowerCase()&&(e=d.childNodes[h],f=e.nodeName.toLowerCase(),this.metadata[f]=e.textContent.trim())}},get:function(a){return this.metadata[a]||null},has:function(a){return"undefined"!=typeof this.metadata[a]}},b}(),16),ca=100,da=4096,ea=.65,fa=!0,ga=1e3,ha=16,ia=function(){var a={};return{getCanvas:function(b,c,d,e){var f;if(void 0!==a[b])f=a[b],f.canvas.width=c,f.canvas.height=d,f.context.setTransform(1,0,0,1,0,0);else{var g=v(c,d),h=g.getContext("2d");e&&w(h),a[b]=f={canvas:g,context:h}}return f},clear:function(){for(var b in a){var c=a[b];c.canvas.width=0,c.canvas.height=0,delete a[b]}}}}(),ja=function(){function a(a){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=S,this.textMatrixScale=1,this.fontMatrix=B,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=C.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.old=a}return a.prototype={clone:function(){return Object.create(this)},setCurrentPoint:function(a,b){this.x=a,this.y=b}},a}(),ka=function(){function c(a,b,c,d){this.ctx=a,this.current=new ja,this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=b,this.objs=c,this.imageLayer=d,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,a&&w(a),this.cachedGetSinglePixelWidth=null}function e(a,b){if("undefined"!=typeof ImageData&&b instanceof ImageData)return void a.putImageData(b,0,0);var c,e,f,g,h,i=b.height,j=b.width,k=i%ha,l=(i-k)/ha,m=0===k?l:l+1,n=a.createImageData(j,ha),o=0,p=b.data,q=n.data;if(b.kind===D.GRAYSCALE_1BPP){var r=p.byteLength,s=PDFJS.hasCanvasTypedArrays?new Uint32Array(q.buffer):new R(q),t=s.length,u=j+7>>3,v=4294967295,w=PDFJS.isLittleEndian||!PDFJS.hasCanvasTypedArrays?4278190080:255;for(e=0;m>e;e++){for(g=l>e?ha:k,c=0,f=0;g>f;f++){for(var x=r-o,y=0,z=x>u?j:8*x-7,A=-8&z,B=0,C=0;A>y;y+=8)C=p[o++],s[c++]=128&C?v:w,s[c++]=64&C?v:w,s[c++]=32&C?v:w,s[c++]=16&C?v:w,s[c++]=8&C?v:w,s[c++]=4&C?v:w,s[c++]=2&C?v:w,s[c++]=1&C?v:w;for(;z>y;y++)0===B&&(C=p[o++],B=128),s[c++]=C&B?v:w,B>>=1}for(;t>c;)s[c++]=0;a.putImageData(n,0,e*ha)}}else if(b.kind===D.RGBA_32BPP){for(f=0,h=j*ha*4,e=0;l>e;e++)q.set(p.subarray(o,o+h)),o+=h,a.putImageData(n,0,f),f+=ha;m>e&&(h=j*k*4,q.set(p.subarray(o,o+h)),a.putImageData(n,0,f))}else if(b.kind===D.RGB_24BPP)for(g=ha,h=j*g,e=0;m>e;e++){for(e>=l&&(g=k,h=j*g),c=0,f=h;f--;)q[c++]=p[o++],q[c++]=p[o++],q[c++]=p[o++],q[c++]=255;a.putImageData(n,0,e*ha)}else d("bad image kind: "+b.kind)}function g(a,b){for(var c=b.height,d=b.width,e=c%ha,f=(c-e)/ha,g=0===e?f:f+1,h=a.createImageData(d,ha),i=0,j=b.data,k=h.data,l=0;g>l;l++){for(var m=f>l?ha:e,n=3,o=0;m>o;o++)for(var p=0,q=0;d>q;q++){if(!p){var r=j[i++];p=128}k[n]=r&p?0:255,n+=4,p>>=1}a.putImageData(h,0,l*ha)}}function h(a,b){for(var c=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],d=0,e=c.length;e>d;d++){var f=c[d];void 0!==a[f]&&(b[f]=a[f])}void 0!==a.setLineDash?(b.setLineDash(a.getLineDash()),b.lineDashOffset=a.lineDashOffset):void 0!==a.mozDashOffset&&(b.mozDash=a.mozDash,b.mozDashOffset=a.mozDashOffset)}function j(a,b,c,d){for(var e=a.length,f=3;e>f;f+=4){var g=a[f];if(0===g)a[f-3]=b,a[f-2]=c,a[f-1]=d;else if(255>g){var h=255-g;a[f-3]=a[f-3]*g+b*h>>8,a[f-2]=a[f-2]*g+c*h>>8,a[f-1]=a[f-1]*g+d*h>>8}}}function k(a,b){for(var c=a.length,d=1/255,e=3;c>e;e+=4){var f=a[e];b[e]=b[e]*f*d|0}}function l(a,b){for(var c=a.length,d=3;c>d;d+=4){var e=77*a[d-3]+152*a[d-2]+28*a[d-1];b[d]=b[d]*e>>16}}function m(a,b,c,d,e,f){var g,h=!!f,i=h?f[0]:0,m=h?f[1]:0,n=h?f[2]:0;g="Luminosity"===e?l:k;for(var o=1048576,p=Math.min(d,Math.ceil(o/c)),q=0;d>q;q+=p){var r=Math.min(p,d-q),s=a.getImageData(0,q,c,r),t=b.getImageData(0,q,c,r);h&&j(s.data,i,m,n),g(s.data,t.data),a.putImageData(t,0,q)}}function n(a,b,c){var d=b.canvas,e=b.context;a.setTransform(b.scaleX,0,0,b.scaleY,b.offsetX,b.offsetY);var f=b.backdrop||null;if(la.isEnabled){var g=la.composeSMask(c.canvas,d,{subtype:b.subtype,backdrop:f});return a.setTransform(1,0,0,1,0,0),void a.drawImage(g,b.offsetX,b.offsetY)}m(e,c,d.width,d.height,b.subtype,f),a.drawImage(d,0,0)}var o=15,r=10,s=["butt","round","square"],t=["miter","round","bevel"],u={},v={};c.prototype={beginDrawing:function(a,b){var c=this.ctx.canvas.width,d=this.ctx.canvas.height;b?this.ctx.clearRect(0,0,c,d):(this.ctx.mozOpaque=!0,this.ctx.save(),this.ctx.fillStyle="rgb(255, 255, 255)",this.ctx.fillRect(0,0,c,d),this.ctx.restore());var e=a.transform;this.ctx.save(),this.ctx.transform.apply(this.ctx,e),this.baseTransform=this.ctx.mozCurrentTransform.slice(),this.imageLayer&&this.imageLayer.beginLayout()},executeOperatorList:function(a,b,c,d){var e=a.argsArray,f=a.fnArray,g=b||0,h=e.length;if(h===g)return g;for(var i,j=h-g>r&&"function"==typeof c,k=j?Date.now()+o:0,l=0,m=this.commonObjs,n=this.objs;;){if(void 0!==d&&g===d.nextBreakPoint)return d.breakIt(g,c),g;if(i=f[g],i!==G.dependency)this[i].apply(this,e[g]);else for(var p=e[g],q=0,s=p.length;s>q;q++){var t=p[q],u="g"===t[0]&&"_"===t[1],v=u?m:n;if(!v.isResolved(t))return v.get(t,c),g}if(g++,g===h)return g;if(j&&++l>r){if(Date.now()>k)return c(),g;l=0}}},endDrawing:function(){this.ctx.restore(),ia.clear(),la.clear(),this.imageLayer&&this.imageLayer.endLayout()},setLineWidth:function(a){this.current.lineWidth=a,this.ctx.lineWidth=a},setLineCap:function(a){this.ctx.lineCap=s[a]},setLineJoin:function(a){this.ctx.lineJoin=t[a]},setMiterLimit:function(a){this.ctx.miterLimit=a},setDash:function(a,b){var c=this.ctx;void 0!==c.setLineDash?(c.setLineDash(a),c.lineDashOffset=b):(c.mozDash=a,c.mozDashOffset=b)},setRenderingIntent:function(a){},setFlatness:function(a){},setGState:function(a){for(var c=0,d=a.length;d>c;c++){var e=a[c],f=e[0],g=e[1];switch(f){case"LW":this.setLineWidth(g);break;case"LC":this.setLineCap(g);break;case"LJ":this.setLineJoin(g);break;case"ML":this.setMiterLimit(g);break;case"D":this.setDash(g[0],g[1]);break;case"RI":this.setRenderingIntent(g);break;case"FL":this.setFlatness(g);break;case"Font":this.setFont(g[0],g[1]);break;case"CA":this.current.strokeAlpha=e[1];break;case"ca":this.current.fillAlpha=e[1],this.ctx.globalAlpha=e[1];break;case"BM":if(g&&g.name&&"Normal"!==g.name){var h=g.name.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()}).substring(1);this.ctx.globalCompositeOperation=h,this.ctx.globalCompositeOperation!==h&&b('globalCompositeOperation "'+h+'" is not supported')}else this.ctx.globalCompositeOperation="source-over";break;case"SMask":this.current.activeSMask&&this.endSMaskGroup(),this.current.activeSMask=g?this.tempSMask:null,this.current.activeSMask&&this.beginSMaskGroup(),this.tempSMask=null}}},beginSMaskGroup:function(){var a=this.current.activeSMask,b=a.canvas.width,c=a.canvas.height,d="smaskGroupAt"+this.groupLevel,e=ia.getCanvas(d,b,c,!0),f=this.ctx,g=f.mozCurrentTransform;this.ctx.save();var i=e.context;i.scale(1/a.scaleX,1/a.scaleY),i.translate(-a.offsetX,-a.offsetY),i.transform.apply(i,g),h(f,i),this.ctx=i,this.setGState([["BM","Normal"],["ca",1],["CA",1]]),this.groupStack.push(f),this.groupLevel++},endSMaskGroup:function(){var a=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),n(this.ctx,this.current.activeSMask,a),this.ctx.restore()},save:function(){this.ctx.save();var a=this.current;this.stateStack.push(a),this.current=a.clone(),this.current.activeSMask=null},restore:function(){0!==this.stateStack.length&&(null!==this.current.activeSMask&&this.endSMaskGroup(), -this.current=this.stateStack.pop(),this.ctx.restore(),this.pendingClip=null,this.cachedGetSinglePixelWidth=null)},transform:function(a,b,c,d,e,f){this.ctx.transform(a,b,c,d,e,f),this.cachedGetSinglePixelWidth=null},constructPath:function(a,b){for(var c=this.ctx,d=this.current,e=d.x,f=d.y,g=0,h=0,i=a.length;i>g;g++)switch(0|a[g]){case G.rectangle:e=b[h++],f=b[h++];var j=b[h++],k=b[h++];0===j&&(j=this.getSinglePixelWidth()),0===k&&(k=this.getSinglePixelWidth());var l=e+j,m=f+k;this.ctx.moveTo(e,f),this.ctx.lineTo(l,f),this.ctx.lineTo(l,m),this.ctx.lineTo(e,m),this.ctx.lineTo(e,f),this.ctx.closePath();break;case G.moveTo:e=b[h++],f=b[h++],c.moveTo(e,f);break;case G.lineTo:e=b[h++],f=b[h++],c.lineTo(e,f);break;case G.curveTo:e=b[h+4],f=b[h+5],c.bezierCurveTo(b[h],b[h+1],b[h+2],b[h+3],e,f),h+=6;break;case G.curveTo2:c.bezierCurveTo(e,f,b[h],b[h+1],b[h+2],b[h+3]),e=b[h+2],f=b[h+3],h+=4;break;case G.curveTo3:e=b[h+2],f=b[h+3],c.bezierCurveTo(b[h],b[h+1],e,f,e,f),h+=4;break;case G.closePath:c.closePath()}d.setCurrentPoint(e,f)},closePath:function(){this.ctx.closePath()},stroke:function(a){a="undefined"!=typeof a?a:!0;var b=this.ctx,c=this.current.strokeColor;b.lineWidth=Math.max(this.getSinglePixelWidth()*ea,this.current.lineWidth),b.globalAlpha=this.current.strokeAlpha,c&&c.hasOwnProperty("type")&&"Pattern"===c.type?(b.save(),b.strokeStyle=c.getPattern(b,this),b.stroke(),b.restore()):b.stroke(),a&&this.consumePath(),b.globalAlpha=this.current.fillAlpha},closeStroke:function(){this.closePath(),this.stroke()},fill:function(a){a="undefined"!=typeof a?a:!0;var b=this.ctx,c=this.current.fillColor,d=this.current.patternFill,e=!1;d&&(b.save(),b.fillStyle=c.getPattern(b,this),e=!0),this.pendingEOFill?(void 0!==b.mozFillRule?(b.mozFillRule="evenodd",b.fill(),b.mozFillRule="nonzero"):b.fill("evenodd"),this.pendingEOFill=!1):b.fill(),e&&b.restore(),a&&this.consumePath()},eoFill:function(){this.pendingEOFill=!0,this.fill()},fillStroke:function(){this.fill(!1),this.stroke(!1),this.consumePath()},eoFillStroke:function(){this.pendingEOFill=!0,this.fillStroke()},closeFillStroke:function(){this.closePath(),this.fillStroke()},closeEOFillStroke:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()},endPath:function(){this.consumePath()},clip:function(){this.pendingClip=u},eoClip:function(){this.pendingClip=v},beginText:function(){this.current.textMatrix=S,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},endText:function(){var a=this.pendingTextPaths,b=this.ctx;if(void 0===a)return void b.beginPath();b.save(),b.beginPath();for(var c=0;cc?(c=-c,f.fontDirection=-1):f.fontDirection=1,this.current.font=e,this.current.fontSize=c,!e.isType3Font){var g=e.loadedName||"sans-serif",h=e.black?e.bold?"900":"bold":e.bold?"bold":"normal",i=e.italic?"italic":"normal",j='"'+g+'", '+e.fallbackName,k=ba>c?ba:c>ca?ca:c;this.current.fontSizeScale=c/k;var l=i+" "+h+" "+k+"px "+j;this.ctx.font=l}},setTextRenderingMode:function(a){this.current.textRenderingMode=a},setTextRise:function(a){this.current.textRise=a},moveText:function(a,b){this.current.x=this.current.lineX+=a,this.current.y=this.current.lineY+=b},setLeadingMoveText:function(a,b){this.setLeading(-b),this.moveText(a,b)},setTextMatrix:function(a,b,c,d,e,f){this.current.textMatrix=[a,b,c,d,e,f],this.current.textMatrixScale=Math.sqrt(a*a+b*b),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},nextLine:function(){this.moveText(0,this.current.leading)},paintChar:function(a,b,c){var d,e=this.ctx,f=this.current,g=f.font,h=f.textRenderingMode,i=f.fontSize/f.fontSizeScale,j=h&C.FILL_STROKE_MASK,k=!!(h&C.ADD_TO_PATH_FLAG);if((g.disableFontFace||k)&&(d=g.getPathGenerator(this.commonObjs,a)),g.disableFontFace?(e.save(),e.translate(b,c),e.beginPath(),d(e,i),j!==C.FILL&&j!==C.FILL_STROKE||e.fill(),j!==C.STROKE&&j!==C.FILL_STROKE||e.stroke(),e.restore()):(j!==C.FILL&&j!==C.FILL_STROKE||e.fillText(a,b,c),j!==C.STROKE&&j!==C.FILL_STROKE||e.strokeText(a,b,c)),k){var l=this.pendingTextPaths||(this.pendingTextPaths=[]);l.push({transform:e.mozCurrentTransform,x:b,y:c,fontSize:i,addToPath:d})}},get isFontSubpixelAAEnabled(){var a=document.createElement("canvas").getContext("2d");a.scale(1.5,1),a.fillText("I",0,10);for(var b=a.getImageData(0,0,10,10).data,c=!1,d=3;d0&&b[d]<255){c=!0;break}return i(this,"isFontSubpixelAAEnabled",c)},showText:function(a){var b=this.current,c=b.font;if(c.isType3Font)return this.showType3Text(a);var d=b.fontSize;if(0!==d){var e=this.ctx,f=b.fontSizeScale,g=b.charSpacing,h=b.wordSpacing,i=b.fontDirection,j=b.textHScale*i,k=a.length,l=c.vertical,m=l?1:-1,n=c.defaultVMetrics,o=d*b.fontMatrix[0],q=b.textRenderingMode===C.FILL&&!c.disableFontFace;e.save(),e.transform.apply(e,b.textMatrix),e.translate(b.x,b.y+b.textRise),i>0?e.scale(j,-1):e.scale(j,1);var r=b.lineWidth,s=b.textMatrixScale;if(0===s||0===r){var t=b.textRenderingMode&C.FILL_STROKE_MASK;t!==C.STROKE&&t!==C.FILL_STROKE||(this.cachedGetSinglePixelWidth=null,r=this.getSinglePixelWidth()*ea)}else r/=s;1!==f&&(e.scale(f,f),r/=f),e.lineWidth=r;var u,v=0;for(u=0;k>u;++u){var w=a[u];if(null!==w)if(p(w))v+=m*w*d/1e3;else{var x,y,z,A,B=!1,D=w.fontChar,E=w.accent,F=w.width;if(l){var G,H,I;G=w.vmetric||n,H=w.vmetric?G[1]:.5*F,H=-H*o,I=G[2]*o,F=G?-G[0]:F,x=H/f,y=(v+I)/f}else x=v/f,y=0;if(c.remeasure&&F>0&&this.isFontSubpixelAAEnabled){var J=1e3*e.measureText(D).width/d*f,K=F/J;B=!0,e.save(),e.scale(K,1),x/=K}q&&!E?e.fillText(D,x,y):(this.paintChar(D,x,y),E&&(z=x+E.offset.x/f,A=y-E.offset.y/f,this.paintChar(E.fontChar,z,A)));var L=F*o+g*i;v+=L,B&&e.restore()}else v+=i*h}l?b.y-=v*j:b.x+=v*j,e.restore()}},showType3Text:function(a){var c,d,e,f,g=this.ctx,h=this.current,i=h.font,j=h.fontSize,k=h.fontDirection,l=i.vertical?1:-1,m=h.charSpacing,n=h.wordSpacing,o=h.textHScale*k,q=h.fontMatrix||B,r=a.length,s=h.textRenderingMode===C.INVISIBLE;if(!s&&0!==j){for(this.cachedGetSinglePixelWidth=null,g.save(),g.transform.apply(g,h.textMatrix),g.translate(h.x,h.y),g.scale(o,k),c=0;r>c;++c)if(d=a[c],null!==d)if(p(d))f=l*d*j/1e3,this.ctx.translate(f,0),h.x+=f*o;else{var t=i.charProcOperatorList[d.operatorListId];if(t){this.processingType3=d,this.save(),g.scale(j,j),g.transform.apply(g,q),this.executeOperatorList(t),this.restore();var u=T.applyTransform([d.width,0],q);e=u[0]*j+m,g.translate(e,0),h.x+=e*o}else b('Type3 character "'+d.operatorListId+'" is not available')}else this.ctx.translate(n,0),h.x+=n*o;g.restore(),this.processingType3=null}},setCharWidth:function(a,b){},setCharWidthAndBounds:function(a,b,c,d,e,f){this.ctx.rect(c,d,e-c,f-d),this.clip(),this.endPath()},getColorN_Pattern:function(a){var b;if("TilingPattern"===a[0]){var c=a[1],d=this.baseTransform||this.ctx.mozCurrentTransform.slice();b=new oa(a,c,this.ctx,this.objs,this.commonObjs,d)}else b=y(a);return b},setStrokeColorN:function(){this.current.strokeColor=this.getColorN_Pattern(arguments)},setFillColorN:function(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0},setStrokeRGBColor:function(a,b,c){var d=T.makeCssRgb(a,b,c);this.ctx.strokeStyle=d,this.current.strokeColor=d},setFillRGBColor:function(a,b,c){var d=T.makeCssRgb(a,b,c);this.ctx.fillStyle=d,this.current.fillColor=d,this.current.patternFill=!1},shadingFill:function(a){var b=this.ctx;this.save();var c=y(a);b.fillStyle=c.getPattern(b,this,!0);var d=b.mozCurrentTransformInverse;if(d){var e=b.canvas,f=e.width,g=e.height,h=T.applyTransform([0,0],d),i=T.applyTransform([0,g],d),j=T.applyTransform([f,0],d),k=T.applyTransform([f,g],d),l=Math.min(h[0],i[0],j[0],k[0]),m=Math.min(h[1],i[1],j[1],k[1]),n=Math.max(h[0],i[0],j[0],k[0]),o=Math.max(h[1],i[1],j[1],k[1]);this.ctx.fillRect(l,m,n-l,o-m)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.restore()},beginInlineImage:function(){d("Should not call beginInlineImage")},beginImageData:function(){d("Should not call beginImageData")},paintFormXObjectBegin:function(a,b){if(this.save(),this.baseTransformStack.push(this.baseTransform),q(a)&&6===a.length&&this.transform.apply(this,a),this.baseTransform=this.ctx.mozCurrentTransform,q(b)&&4===b.length){var c=b[2]-b[0],d=b[3]-b[1];this.ctx.rect(b[0],b[1],c,d),this.clip(),this.endPath()}},paintFormXObjectEnd:function(){this.restore(),this.baseTransform=this.baseTransformStack.pop()},beginGroup:function(c){this.save();var d=this.ctx;c.isolated||a("TODO: Support non-isolated groups."),c.knockout&&b("Knockout groups not supported.");var e=d.mozCurrentTransform;c.matrix&&d.transform.apply(d,c.matrix),f(c.bbox,"Bounding box is required.");var g=T.getAxialAlignedBoundingBox(c.bbox,d.mozCurrentTransform),i=[0,0,d.canvas.width,d.canvas.height];g=T.intersect(g,i)||[0,0,0,0];var j=Math.floor(g[0]),k=Math.floor(g[1]),l=Math.max(Math.ceil(g[2])-j,1),m=Math.max(Math.ceil(g[3])-k,1),n=1,o=1;l>da&&(n=l/da,l=da),m>da&&(o=m/da,m=da);var p="groupAt"+this.groupLevel;c.smask&&(p+="_smask_"+this.smaskCounter++%2);var q=ia.getCanvas(p,l,m,!0),r=q.context;r.scale(1/n,1/o),r.translate(-j,-k),r.transform.apply(r,e),c.smask?this.smaskStack.push({canvas:q.canvas,context:r,offsetX:j,offsetY:k,scaleX:n,scaleY:o,subtype:c.smask.subtype,backdrop:c.smask.backdrop}):(d.setTransform(1,0,0,1,0,0),d.translate(j,k),d.scale(n,o)),h(d,r),this.ctx=r,this.setGState([["BM","Normal"],["ca",1],["CA",1]]),this.groupStack.push(d),this.groupLevel++},endGroup:function(a){this.groupLevel--;var b=this.ctx;this.ctx=this.groupStack.pop(),void 0!==this.ctx.imageSmoothingEnabled?this.ctx.imageSmoothingEnabled=!1:this.ctx.mozImageSmoothingEnabled=!1,a.smask?this.tempSMask=this.smaskStack.pop():this.ctx.drawImage(b.canvas,0,0),this.restore()},beginAnnotations:function(){this.save(),this.current=new ja},endAnnotations:function(){this.restore()},beginAnnotation:function(a,b,c){if(this.save(),q(a)&&4===a.length){var d=a[2]-a[0],e=a[3]-a[1];this.ctx.rect(a[0],a[1],d,e),this.clip(),this.endPath()}this.transform.apply(this,b),this.transform.apply(this,c)},endAnnotation:function(){this.restore()},paintJpegXObject:function(a,c,d){var e=this.objs.get(a);if(!e)return void b("Dependent image isn't ready yet");this.save();var f=this.ctx;if(f.scale(1/c,-1/d),f.drawImage(e,0,0,e.width,e.height,0,-d,c,d),this.imageLayer){var g=f.mozCurrentTransformInverse,h=this.getCanvasPosition(0,0);this.imageLayer.appendImage({objId:a,left:h[0],top:h[1],width:c/g[0],height:d/g[3]})}this.restore()},paintImageMaskXObject:function(a){var b=this.ctx,c=a.width,d=a.height,e=this.current.fillColor,f=this.current.patternFill,h=this.processingType3;if(fa&&h&&void 0===h.compiled&&(ga>=c&&ga>=d?h.compiled=x({data:a.data,width:c,height:d}):h.compiled=null),h&&h.compiled)return void h.compiled(b);var i=ia.getCanvas("maskCanvas",c,d),j=i.context;j.save(),g(j,a),j.globalCompositeOperation="source-in",j.fillStyle=f?e.getPattern(j,this):e,j.fillRect(0,0,c,d),j.restore(),this.paintInlineImageXObject(i.canvas)},paintImageMaskXObjectRepeat:function(a,b,c,d){var e=a.width,f=a.height,h=this.current.fillColor,i=this.current.patternFill,j=ia.getCanvas("maskCanvas",e,f),k=j.context;k.save(),g(k,a),k.globalCompositeOperation="source-in",k.fillStyle=i?h.getPattern(k,this):h,k.fillRect(0,0,e,f),k.restore();for(var l=this.ctx,m=0,n=d.length;n>m;m+=2)l.save(),l.transform(b,0,0,c,d[m],d[m+1]),l.scale(1,-1),l.drawImage(j.canvas,0,0,e,f,0,-1,1,1),l.restore()},paintImageMaskXObjectGroup:function(a){for(var b=this.ctx,c=this.current.fillColor,d=this.current.patternFill,e=0,f=a.length;f>e;e++){var h=a[e],i=h.width,j=h.height,k=ia.getCanvas("maskCanvas",i,j),l=k.context;l.save(),g(l,h),l.globalCompositeOperation="source-in",l.fillStyle=d?c.getPattern(l,this):c,l.fillRect(0,0,i,j),l.restore(),b.save(),b.transform.apply(b,h.transform),b.scale(1,-1),b.drawImage(k.canvas,0,0,i,j,0,-1,1,1),b.restore()}},paintImageXObject:function(a){var c=this.objs.get(a);return c?void this.paintInlineImageXObject(c):void b("Dependent image isn't ready yet")},paintImageXObjectRepeat:function(a,c,d,e){var f=this.objs.get(a);if(!f)return void b("Dependent image isn't ready yet");for(var g=f.width,h=f.height,i=[],j=0,k=e.length;k>j;j+=2)i.push({transform:[c,0,0,d,e[j],e[j+1]],x:0,y:0,w:g,h:h});this.paintInlineImageXObjectGroup(f,i)},paintInlineImageXObject:function(a){var b=a.width,c=a.height,d=this.ctx;this.save(),d.scale(1/b,-1/c);var f,g,h=d.mozCurrentTransformInverse,i=h[0],j=h[1],k=Math.max(Math.sqrt(i*i+j*j),1),l=h[2],m=h[3],n=Math.max(Math.sqrt(l*l+m*m),1);if(a instanceof HTMLElement||!a.data)f=a;else{g=ia.getCanvas("inlineImage",b,c);var o=g.context;e(o,a),f=g.canvas}for(var p=b,q=c,r="prescale1";k>2&&p>1||n>2&&q>1;){var s=p,t=q;k>2&&p>1&&(s=Math.ceil(p/2),k/=p/s),n>2&&q>1&&(t=Math.ceil(q/2),n/=q/t),g=ia.getCanvas(r,s,t),o=g.context,o.clearRect(0,0,s,t),o.drawImage(f,0,0,p,q,0,0,s,t),f=g.canvas,p=s,q=t,r="prescale1"===r?"prescale2":"prescale1"}if(d.drawImage(f,0,0,p,q,0,-c,b,c),this.imageLayer){var u=this.getCanvasPosition(0,-c);this.imageLayer.appendImage({imgData:a,left:u[0],top:u[1],width:b/h[0],height:c/h[3]})}this.restore()},paintInlineImageXObjectGroup:function(a,b){var c=this.ctx,d=a.width,f=a.height,g=ia.getCanvas("inlineImage",d,f),h=g.context;e(h,a);for(var i=0,j=b.length;j>i;i++){var k=b[i];if(c.save(),c.transform.apply(c,k.transform),c.scale(1,-1),c.drawImage(g.canvas,k.x,k.y,k.w,k.h,0,-1,1,1),this.imageLayer){var l=this.getCanvasPosition(k.x,k.y);this.imageLayer.appendImage({imgData:a,left:l[0],top:l[1],width:d,height:f})}c.restore()}},paintSolidColorImageMask:function(){this.ctx.fillRect(0,0,1,1)},paintXObject:function(){I.notify(H.unknown),b("Unsupported 'paintXObject' command.")},markPoint:function(a){},markPointProps:function(a,b){},beginMarkedContent:function(a){},beginMarkedContentProps:function(a,b){},endMarkedContent:function(){},beginCompat:function(){},endCompat:function(){},consumePath:function(){var a=this.ctx;this.pendingClip&&(this.pendingClip===v?void 0!==a.mozFillRule?(a.mozFillRule="evenodd",a.clip(),a.mozFillRule="nonzero"):a.clip("evenodd"):a.clip(),this.pendingClip=null),a.beginPath()},getSinglePixelWidth:function(a){if(null===this.cachedGetSinglePixelWidth){var b=this.ctx.mozCurrentTransformInverse;this.cachedGetSinglePixelWidth=Math.sqrt(Math.max(b[0]*b[0]+b[1]*b[1],b[2]*b[2]+b[3]*b[3]))}return this.cachedGetSinglePixelWidth},getCanvasPosition:function(a,b){var c=this.ctx.mozCurrentTransform;return[c[0]*a+c[2]*b+c[4],c[1]*a+c[3]*b+c[5]]}};for(var z in G)c.prototype[G[z]]=c.prototype[z];return c}(),la=function(){function a(a,b,c){var d=a.createShader(c);a.shaderSource(d,b),a.compileShader(d);var e=a.getShaderParameter(d,a.COMPILE_STATUS);if(!e){var f=a.getShaderInfoLog(d);throw new Error("Error during shader compilation: "+f)}return d}function b(b,c){return a(b,c,b.VERTEX_SHADER)}function c(b,c){return a(b,c,b.FRAGMENT_SHADER)}function d(a,b){for(var c=a.createProgram(),d=0,e=b.length;e>d;++d)a.attachShader(c,b[d]);a.linkProgram(c);var f=a.getProgramParameter(c,a.LINK_STATUS);if(!f){var g=a.getProgramInfoLog(c);throw new Error("Error during program linking: "+g)}return c}function e(a,b,c){a.activeTexture(c);var d=a.createTexture();return a.bindTexture(a.TEXTURE_2D,d),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.NEAREST),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.NEAREST),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,b),d}function f(){m||(n=document.createElement("canvas"),m=n.getContext("webgl",{premultipliedalpha:!1}))}function g(){var a,e;f(),a=n,n=null,e=m,m=null;var g=b(e,o),h=c(e,p),i=d(e,[g,h]);e.useProgram(i);var j={};j.gl=e,j.canvas=a,j.resolutionLocation=e.getUniformLocation(i,"u_resolution"),j.positionLocation=e.getAttribLocation(i,"a_position"),j.backdropLocation=e.getUniformLocation(i,"u_backdrop"),j.subtypeLocation=e.getUniformLocation(i,"u_subtype");var k=e.getAttribLocation(i,"a_texCoord"),l=e.getUniformLocation(i,"u_image"),r=e.getUniformLocation(i,"u_mask"),s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),e.STATIC_DRAW),e.enableVertexAttribArray(k),e.vertexAttribPointer(k,2,e.FLOAT,!1,0,0),e.uniform1i(l,0),e.uniform1i(r,1),q=j}function h(a,b,c){var d=a.width,f=a.height;q||g();var h=q,i=h.canvas,j=h.gl;i.width=d,i.height=f,j.viewport(0,0,j.drawingBufferWidth,j.drawingBufferHeight),j.uniform2f(h.resolutionLocation,d,f),c.backdrop?j.uniform4f(h.resolutionLocation,c.backdrop[0],c.backdrop[1],c.backdrop[2],1):j.uniform4f(h.resolutionLocation,0,0,0,0),j.uniform1i(h.subtypeLocation,"Luminosity"===c.subtype?1:0);var k=e(j,a,j.TEXTURE0),l=e(j,b,j.TEXTURE1),m=j.createBuffer();return j.bindBuffer(j.ARRAY_BUFFER,m),j.bufferData(j.ARRAY_BUFFER,new Float32Array([0,0,d,0,0,f,0,f,d,0,d,f]),j.STATIC_DRAW),j.enableVertexAttribArray(h.positionLocation),j.vertexAttribPointer(h.positionLocation,2,j.FLOAT,!1,0,0),j.clearColor(0,0,0,0),j.enable(j.BLEND),j.blendFunc(j.ONE,j.ONE_MINUS_SRC_ALPHA),j.clear(j.COLOR_BUFFER_BIT),j.drawArrays(j.TRIANGLES,0,6),j.flush(),j.deleteTexture(k),j.deleteTexture(l),j.deleteBuffer(m),i}function j(){var a,e;f(),a=n,n=null,e=m,m=null;var g=b(e,r),h=c(e,s),i=d(e,[g,h]);e.useProgram(i);var j={};j.gl=e,j.canvas=a,j.resolutionLocation=e.getUniformLocation(i,"u_resolution"),j.scaleLocation=e.getUniformLocation(i,"u_scale"),j.offsetLocation=e.getUniformLocation(i,"u_offset"),j.positionLocation=e.getAttribLocation(i,"a_position"),j.colorLocation=e.getAttribLocation(i,"a_color"),t=j}function k(a,b,c,d,e){t||j();var f=t,g=f.canvas,h=f.gl;g.width=a,g.height=b,h.viewport(0,0,h.drawingBufferWidth,h.drawingBufferHeight),h.uniform2f(f.resolutionLocation,a,b);var i,k,l,m=0;for(i=0,k=d.length;k>i;i++)switch(d[i].type){case"lattice":l=d[i].coords.length/d[i].verticesPerRow|0,m+=(l-1)*(d[i].verticesPerRow-1)*6;break;case"triangles":m+=d[i].coords.length}var n=new Float32Array(2*m),o=new Uint8Array(3*m),p=e.coords,q=e.colors,r=0,s=0;for(i=0,k=d.length;k>i;i++){var u=d[i],v=u.coords,w=u.colors;switch(u.type){case"lattice":var x=u.verticesPerRow;l=v.length/x|0;for(var y=1;l>y;y++)for(var z=y*x+1,A=1;x>A;A++,z++)n[r]=p[v[z-x-1]],n[r+1]=p[v[z-x-1]+1],n[r+2]=p[v[z-x]],n[r+3]=p[v[z-x]+1],n[r+4]=p[v[z-1]],n[r+5]=p[v[z-1]+1],o[s]=q[w[z-x-1]],o[s+1]=q[w[z-x-1]+1],o[s+2]=q[w[z-x-1]+2],o[s+3]=q[w[z-x]],o[s+4]=q[w[z-x]+1],o[s+5]=q[w[z-x]+2],o[s+6]=q[w[z-1]],o[s+7]=q[w[z-1]+1],o[s+8]=q[w[z-1]+2],n[r+6]=n[r+2],n[r+7]=n[r+3],n[r+8]=n[r+4],n[r+9]=n[r+5],n[r+10]=p[v[z]],n[r+11]=p[v[z]+1],o[s+9]=o[s+3],o[s+10]=o[s+4],o[s+11]=o[s+5],o[s+12]=o[s+6],o[s+13]=o[s+7],o[s+14]=o[s+8],o[s+15]=q[w[z]],o[s+16]=q[w[z]+1],o[s+17]=q[w[z]+2],r+=12,s+=18;break;case"triangles":for(var B=0,C=v.length;C>B;B++)n[r]=p[v[B]],n[r+1]=p[v[B]+1],o[s]=q[w[B]],o[s+1]=q[w[B]+1],o[s+2]=q[w[B]+2],r+=2,s+=3}}c?h.clearColor(c[0]/255,c[1]/255,c[2]/255,1):h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT);var D=h.createBuffer();h.bindBuffer(h.ARRAY_BUFFER,D),h.bufferData(h.ARRAY_BUFFER,n,h.STATIC_DRAW),h.enableVertexAttribArray(f.positionLocation),h.vertexAttribPointer(f.positionLocation,2,h.FLOAT,!1,0,0);var E=h.createBuffer();return h.bindBuffer(h.ARRAY_BUFFER,E),h.bufferData(h.ARRAY_BUFFER,o,h.STATIC_DRAW),h.enableVertexAttribArray(f.colorLocation),h.vertexAttribPointer(f.colorLocation,3,h.UNSIGNED_BYTE,!1,0,0),h.uniform2f(f.scaleLocation,e.scaleX,e.scaleY),h.uniform2f(f.offsetLocation,e.offsetX,e.offsetY),h.drawArrays(h.TRIANGLES,0,m),h.flush(),h.deleteBuffer(D),h.deleteBuffer(E),g}function l(){q&&q.canvas&&(q.canvas.width=0,q.canvas.height=0),t&&t.canvas&&(t.canvas.width=0,t.canvas.height=0),q=null,t=null}var m,n,o=" attribute vec2 a_position; attribute vec2 a_texCoord; uniform vec2 u_resolution; varying vec2 v_texCoord; void main() { vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_texCoord = a_texCoord; } ",p=" precision mediump float; uniform vec4 u_backdrop; uniform int u_subtype; uniform sampler2D u_image; uniform sampler2D u_mask; varying vec2 v_texCoord; void main() { vec4 imageColor = texture2D(u_image, v_texCoord); vec4 maskColor = texture2D(u_mask, v_texCoord); if (u_backdrop.a > 0.0) { maskColor.rgb = maskColor.rgb * maskColor.a + u_backdrop.rgb * (1.0 - maskColor.a); } float lum; if (u_subtype == 0) { lum = maskColor.a; } else { lum = maskColor.r * 0.3 + maskColor.g * 0.59 + maskColor.b * 0.11; } imageColor.a *= lum; imageColor.rgb *= imageColor.a; gl_FragColor = imageColor; } ",q=null,r=" attribute vec2 a_position; attribute vec3 a_color; uniform vec2 u_resolution; uniform vec2 u_scale; uniform vec2 u_offset; varying vec4 v_color; void main() { vec2 position = (a_position + u_offset) * u_scale; vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_color = vec4(a_color / 255.0, 1.0); } ",s=" precision mediump float; varying vec4 v_color; void main() { gl_FragColor = v_color; } ",t=null;return{get isEnabled(){if(PDFJS.disableWebGL)return!1;var a=!1;try{f(),a=!!m}catch(b){}return i(this,"isEnabled",a)},composeSMask:h,drawFigures:k,clear:l}}(),ma={};ma.RadialAxial={fromIR:function(a){var b=a[1],c=a[2],d=a[3],e=a[4],f=a[5],g=a[6];return{type:"Pattern",getPattern:function(a){var h;"axial"===b?h=a.createLinearGradient(d[0],d[1],e[0],e[1]):"radial"===b&&(h=a.createRadialGradient(d[0],d[1],f,e[0],e[1],g));for(var i=0,j=c.length;j>i;++i){var k=c[i];h.addColorStop(k[0],k[1])}return h}}}};var na=function(){function a(a,b,c,d,e,f,g,h){var i,j=b.coords,k=b.colors,l=a.data,m=4*a.width;j[c+1]>j[d+1]&&(i=c,c=d,d=i,i=f,f=g,g=i),j[d+1]>j[e+1]&&(i=d,d=e,e=i,i=g,g=h,h=i),j[c+1]>j[d+1]&&(i=c,c=d,d=i,i=f,f=g,g=i);var n=(j[c]+b.offsetX)*b.scaleX,o=(j[c+1]+b.offsetY)*b.scaleY,p=(j[d]+b.offsetX)*b.scaleX,q=(j[d+1]+b.offsetY)*b.scaleY,r=(j[e]+b.offsetX)*b.scaleX,s=(j[e+1]+b.offsetY)*b.scaleY;if(!(o>=s))for(var t,u,v,w,x,y,z,A,B,C=k[f],D=k[f+1],E=k[f+2],F=k[g],G=k[g+1],H=k[g+2],I=k[h],J=k[h+1],K=k[h+2],L=Math.round(o),M=Math.round(s),N=L;M>=N;N++){q>N?(B=o>N?0:o===q?1:(o-N)/(o-q),t=n-(n-p)*B,u=C-(C-F)*B,v=D-(D-G)*B,w=E-(E-H)*B):(B=N>s?1:q===s?0:(q-N)/(q-s),t=p-(p-r)*B,u=F-(F-I)*B,v=G-(G-J)*B,w=H-(H-K)*B),B=o>N?0:N>s?1:(o-N)/(o-s),x=n-(n-r)*B,y=C-(C-I)*B,z=D-(D-J)*B,A=E-(E-K)*B;for(var O=Math.round(Math.min(t,x)),P=Math.round(Math.max(t,x)),Q=m*N+4*O,R=O;P>=R;R++)B=(t-R)/(t-x),B=0>B?0:B>1?1:B,l[Q++]=u-(u-y)*B|0,l[Q++]=v-(v-z)*B|0,l[Q++]=w-(w-A)*B|0,l[Q++]=255}}function b(b,c,e){var f,g,h=c.coords,i=c.colors;switch(c.type){case"lattice":var j=c.verticesPerRow,k=Math.floor(h.length/j)-1,l=j-1;for(f=0;k>f;f++)for(var m=f*j,n=0;l>n;n++,m++)a(b,e,h[m],h[m+1],h[m+j],i[m],i[m+1],i[m+j]),a(b,e,h[m+j+1],h[m+1],h[m+j],i[m+j+1],i[m+1],i[m+j]);break;case"triangles":for(f=0,g=h.length;g>f;f+=3)a(b,e,h[f],h[f+1],h[f+2],i[f],i[f+1],i[f+2]);break;default:d("illigal figure")}}function c(a,c,d,e,f,g){var h,i,j,k,l=1.1,m=3e3,n=Math.floor(a[0]),o=Math.floor(a[1]),p=Math.ceil(a[2])-n,q=Math.ceil(a[3])-o,r=Math.min(Math.ceil(Math.abs(p*c[0]*l)),m),s=Math.min(Math.ceil(Math.abs(q*c[1]*l)),m),t=p/r,u=q/s,v={coords:d,colors:e,offsetX:-n,offsetY:-o,scaleX:1/t,scaleY:1/u};if(la.isEnabled)h=la.drawFigures(r,s,g,f,v),i=ia.getCanvas("mesh",r,s,!1),i.context.drawImage(h,0,0),h=i.canvas;else{i=ia.getCanvas("mesh",r,s,!1);var w=i.context,x=w.createImageData(r,s);if(g){var y=x.data;for(j=0,k=y.length;k>j;j+=4)y[j]=g[0],y[j+1]=g[1],y[j+2]=g[2],y[j+3]=255}for(j=0;j=14?!0:"node"===a}(),nativeFontFaces:[],isFontLoadingAPISupported:!A&&"undefined"!=typeof document&&!!document.fonts,addNativeFontFace:function(a){ -this.nativeFontFaces.push(a),document.fonts.add(a)},bind:function(a,c){f(!A,"bind() shall be called from main thread");for(var d=[],e=[],g=[],h=function(a){return a.loaded["catch"](function(c){b('Failed to load font "'+a.family+'": '+c)})},i=0,j=a.length;j>i;i++){var k=a[i];if(!k.attached&&k.loading!==!1)if(k.attached=!0,this.isFontLoadingAPISupported){var l=k.createNativeFontFace();l&&g.push(h(l))}else{var m=k.bindDOM();m&&(d.push(m),e.push(k))}}var n=pa.queueLoadingCallback(c);this.isFontLoadingAPISupported?Promise.all(g).then(function(){n.complete()}):d.length>0&&!this.isSyncFontLoadingSupported?pa.prepareFontLoadEvent(d,e,n):n.complete()},queueLoadingCallback:function(a){function b(){for(f(!e.end,"completeRequest() cannot be called twice"),e.end=Date.now();c.requests.length>0&&c.requests[0].end;){var a=c.requests.shift();setTimeout(a.callback,0)}}var c=pa.loadingContext,d="pdfjs-font-loading-"+c.nextRequestId++,e={id:d,complete:b,callback:a,started:Date.now()};return c.requests.push(e),e},prepareFontLoadEvent:function(a,c,d){function e(a,b){return a.charCodeAt(b)<<24|a.charCodeAt(b+1)<<16|a.charCodeAt(b+2)<<8|255&a.charCodeAt(b+3)}function f(a,b,c,d){var e=a.substr(0,b),f=a.substr(b+c);return e+d+f}function g(a,c){if(l++,l>30)return b("Load test font never loaded."),void c();k.font="30px "+a,k.fillText(".",0,20);var d=k.getImageData(0,0,1,1);return d.data[3]>0?void c():void setTimeout(g.bind(null,a,c))}var h,i,j=document.createElement("canvas");j.width=1,j.height=1;var k=j.getContext("2d"),l=0,n="lt"+Date.now()+this.loadTestFontId++,o=this.loadTestFont,p=976;o=f(o,p,n.length,n);var q=16,r=1482184792,s=e(o,q);for(h=0,i=n.length-3;i>h;h+=4)s=s-r+e(n,h)|0;hh;h++)v.push(c[h].loadedName);v.push(n);var w=document.createElement("div");for(w.setAttribute("style","visibility: hidden;width: 10px; height: 10px;position: absolute; top: 0px; left: 0px;"),h=0,i=v.length;i>h;++h){var x=document.createElement("span");x.textContent="Hi",x.style.fontFamily=v[h],w.appendChild(x)}document.body.appendChild(w),g(n,function(){document.body.removeChild(w),d.complete()})}},qa=function(){function a(a,b,c){if(this.compiledGlyphs={},1!==arguments.length);else{var d=arguments[0];for(var e in d)this[e]=d[e]}}return a.prototype={createNativeFontFace:function(){if(!this.data)return null;if(PDFJS.disableFontFace)return this.disableFontFace=!0,null;var a=new FontFace(this.loadedName,this.data,{});return pa.addNativeFontFace(a),PDFJS.pdfBug&&"FontInspector"in z&&z.FontInspector.enabled&&z.FontInspector.fontAdded(this),a},bindDOM:function(){if(!this.data)return null;if(PDFJS.disableFontFace)return this.disableFontFace=!0,null;var a=k(new Uint8Array(this.data)),b=this.loadedName,c="url(data:"+this.mimetype+";base64,"+window.btoa(a)+");",d='@font-face { font-family:"'+b+'";src:'+c+"}";return pa.insertRule(d),PDFJS.pdfBug&&"FontInspector"in z&&z.FontInspector.enabled&&z.FontInspector.fontAdded(this,c),d},getPathGenerator:function(a,b){if(!(b in this.compiledGlyphs)){var c,d,e,f=a.get(this.loadedName+"_path_"+b);if(pa.isEvalSupported){var g,h="";for(d=0,e=f.length;e>d;d++)c=f[d],g=void 0!==c.args?c.args.join(","):"",h+="c."+c.cmd+"("+g+");\n";this.compiledGlyphs[b]=new Function("c","size",h)}else this.compiledGlyphs[b]=function(a,b){for(d=0,e=f.length;e>d;d++)c=f[d],"scale"===c.cmd&&(c.args=[b,-b]),a[c.cmd].apply(a,c.args)}}return this.compiledGlyphs[b]}},a}(),ra=10,sa=function(){function a(a,b,c){var d=a.style;if(d.fontSize=b.fontSize+"px",d.direction=b.fontDirection<0?"rtl":"ltr",c){d.fontWeight=c.black?c.bold?"bolder":"bold":c.bold?"bold":"normal",d.fontStyle=c.italic?"italic":"normal";var e=c.loadedName,f=e?'"'+e+'", ':"",g=c.fallbackName||"Helvetica, sans-serif";d.fontFamily=f+g}}function c(a){var c=document.createElement("section"),d=c.style,e=a.rect[2]-a.rect[0],f=a.rect[3]-a.rect[1];if(a.borderStyle.width>0){c.style.borderWidth=a.borderStyle.width+"px",a.borderStyle.style!==F.UNDERLINE&&(e-=2*a.borderStyle.width,f-=2*a.borderStyle.width);var g=a.borderStyle.horizontalCornerRadius,h=a.borderStyle.verticalCornerRadius;if(g>0||h>0){var i=g+"px / "+h+"px";CustomStyle.setProp("borderRadius",c,i)}switch(a.borderStyle.style){case F.SOLID:c.style.borderStyle="solid";break;case F.DASHED:c.style.borderStyle="dashed";break;case F.BEVELED:b("Unimplemented border style: beveled");break;case F.INSET:b("Unimplemented border style: inset");break;case F.UNDERLINE:c.style.borderBottomStyle="solid"}a.color?c.style.borderColor=T.makeCssRgb(0|a.color[0],0|a.color[1],0|a.color[2]):c.style.borderWidth=0}return d.width=e+"px",d.height=f+"px",c}function d(b,c){var d=document.createElement("div"),e=b.rect[2]-b.rect[0],f=b.rect[3]-b.rect[1];d.style.width=e+"px",d.style.height=f+"px",d.style.display="table";var g=document.createElement("div");g.textContent=b.fieldValue;var h=b.textAlignment;g.style.textAlign=["left","center","right"][h],g.style.verticalAlign="middle",g.style.display="table-cell";var i=b.fontRefName?c.getData(b.fontRefName):null;return a(g,b,i),d.appendChild(g),d}function e(a){var b=a.rect;b[3]-b[1]i;++i){var t=s[i];r.appendChild(document.createTextNode(t)),j-1>i&&r.appendChild(document.createElement("br"))}q.appendChild(r);var u=!1,v=function(a){a&&(u=!0),h.hasAttribute("hidden")&&(d.style.zIndex+=1,h.removeAttribute("hidden"))},w=function(a){a&&(u=!1),h.hasAttribute("hidden")||u||(d.style.zIndex-=1,h.setAttribute("hidden",!0))},x=function(){u?w(!0):v(!0)};e.addEventListener("click",function(){x()},!1),e.addEventListener("mouseover",function(){v()},!1),e.addEventListener("mouseout",function(){w()},!1),h.addEventListener("click",function(){w(!0)},!1)}else h.setAttribute("hidden",!0);return h.appendChild(p),h.appendChild(q),g.appendChild(h),d.appendChild(e),d.appendChild(g),d}function f(a){var b=c(a);b.className="annotLink";var d=document.createElement("a");return d.href=d.title=a.url||"",a.url&&j()&&(d.target=K[PDFJS.externalLinkTarget]),b.appendChild(d),b}function g(a,b){switch(a.annotationType){case E.WIDGET:return d(a,b);case E.TEXT:return e(a);case E.LINK:return f(a);default:throw new Error("Unsupported annotationType: "+a.annotationType)}}return{getHtmlElement:g}}();PDFJS.AnnotationUtils=sa;var ta={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},ua=function(){function a(a,b,c){for(var d=-1,e=b;c>e;e++){var f=255&(d^a[e]),h=g[f];d=d>>>8^h}return-1^d}function b(b,c,d,e){var f=e,g=c.length;d[f]=g>>24&255,d[f+1]=g>>16&255,d[f+2]=g>>8&255,d[f+3]=255&g,f+=4,d[f]=255&b.charCodeAt(0),d[f+1]=255&b.charCodeAt(1),d[f+2]=255&b.charCodeAt(2),d[f+3]=255&b.charCodeAt(3),f+=4,d.set(c,f),f+=c.length;var h=a(d,e+4,f);d[f]=h>>24&255,d[f+1]=h>>16&255,d[f+2]=h>>8&255,d[f+3]=255&h}function c(a,b,c){for(var d=1,e=0,f=b;c>f;++f)d=(d+(255&a[f]))%65521,e=(e+d)%65521;return e<<16|d}function d(a,d){var g,h,i,j=a.width,k=a.height,l=a.data;switch(d){case D.GRAYSCALE_1BPP:h=0,g=1,i=j+7>>3;break;case D.RGB_24BPP:h=2,g=8,i=3*j;break;case D.RGBA_32BPP:h=6,g=8,i=4*j;break;default:throw new Error("invalid format")}var m,n,o=new Uint8Array((1+i)*k),p=0,q=0;for(m=0;k>m;++m)o[p++]=0,o.set(l.subarray(q,q+i),p),q+=i,p+=i;if(d===D.GRAYSCALE_1BPP)for(p=0,m=0;k>m;m++)for(p++,n=0;i>n;n++)o[p++]^=255;var r=new Uint8Array([j>>24&255,j>>16&255,j>>8&255,255&j,k>>24&255,k>>16&255,k>>8&255,255&k,g,h,0,0,0]),s=o.length,t=65535,u=Math.ceil(s/t),v=new Uint8Array(2+s+5*u+4),w=0;v[w++]=120,v[w++]=156;for(var x=0;s>t;)v[w++]=0,v[w++]=255,v[w++]=255,v[w++]=0,v[w++]=0,v.set(o.subarray(x,x+t),w),w+=t,x+=t,s-=t;v[w++]=1,v[w++]=255&s,v[w++]=s>>8&255,v[w++]=65535&~s&255,v[w++]=(65535&~s)>>8&255,v.set(o.subarray(x),w),w+=o.length-x;var y=c(o,0,o.length);v[w++]=y>>24&255,v[w++]=y>>16&255,v[w++]=y>>8&255,v[w++]=255&y;var z=e.length+3*f+r.length+v.length,A=new Uint8Array(z),B=0;return A.set(e,B),B+=e.length,b("IHDR",r,A,B),B+=f+r.length,b("IDATA",v,A,B),B+=f+v.length,b("IEND",new Uint8Array(0),A,B),PDFJS.createObjectURL(A,"image/png")}for(var e=new Uint8Array([137,80,78,71,13,10,26,10]),f=12,g=new Int32Array(256),h=0;256>h;h++){for(var i=h,j=0;8>j;j++)i=1&i?3988292384^i>>1&2147483647:i>>1&2147483647;g[h]=i}return function(a){var b=void 0===a.kind?D.GRAYSCALE_1BPP:a.kind;return d(a,b)}}(),va=function(){function a(){this.fontSizeScale=1,this.fontWeight=ta.fontWeight,this.fontSize=0,this.textMatrix=S,this.fontMatrix=B,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=ta.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.clipId="",this.pendingClip=!1,this.maskId=""}return a.prototype={clone:function(){return Object.create(this)},setCurrentPoint:function(a,b){this.x=a,this.y=b}},a}(),wa=function(){function a(a,b){var c="http://www.w3.org/2000/svg",d=document.createElementNS(c,"svg:svg");return d.setAttributeNS(null,"version","1.1"),d.setAttributeNS(null,"width",a+"px"),d.setAttributeNS(null,"height",b+"px"),d.setAttributeNS(null,"viewBox","0 0 "+a+" "+b),d}function c(a){for(var b=[],c=[],d=a.length,e=0;d>e;e++)"save"!==a[e].fn?"restore"===a[e].fn?b=c.pop():b.push(a[e]):(b.push({fnId:92,fn:"group",items:[]}),c.push(b),b=b[b.length-1].items);return b}function d(a){if(a===(0|a))return a.toString();var b=a.toFixed(10),c=b.length-1;if("0"!==b[c])return b;do c--;while("0"===b[c]);return b.substr(0,"."===b[c]?c:c+1)}function e(a){if(0===a[4]&&0===a[5]){if(0===a[1]&&0===a[2])return 1===a[0]&&1===a[3]?"":"scale("+d(a[0])+" "+d(a[3])+")";if(a[0]===a[3]&&a[1]===-a[2]){var b=180*Math.acos(a[0])/Math.PI;return"rotate("+d(b)+")"}}else if(1===a[0]&&0===a[1]&&0===a[2]&&1===a[3])return"translate("+d(a[4])+" "+d(a[5])+")";return"matrix("+d(a[0])+" "+d(a[1])+" "+d(a[2])+" "+d(a[3])+" "+d(a[4])+" "+d(a[5])+")"}function f(a,b){this.current=new va,this.transformMatrix=S,this.transformStack=[],this.extraStack=[],this.commonObjs=a,this.objs=b,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts={},this.cssStyle=null}var g="http://www.w3.org/2000/svg",h="http://www.w3.org/XML/1998/namespace",i="http://www.w3.org/1999/xlink",j=["butt","round","square"],k=["miter","round","bevel"],l=0,m=0;return f.prototype={save:function(){this.transformStack.push(this.transformMatrix);var a=this.current;this.extraStack.push(a),this.current=a.clone()},restore:function(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.tgrp=document.createElementNS(g,"svg:g"),this.tgrp.setAttributeNS(null,"transform",e(this.transformMatrix)),this.pgrp.appendChild(this.tgrp)},group:function(a){this.save(),this.executeOpTree(a),this.restore()},loadDependencies:function(a){for(var b=a.fnArray,c=b.length,d=a.argsArray,e=this,f=0;c>f;f++)if(G.dependency===b[f])for(var g=d[f],h=0,i=g.length;i>h;h++){var j,k=g[h],l="g_"===k.substring(0,2);j=l?new Promise(function(a){e.commonObjs.get(k,a)}):new Promise(function(a){e.objs.get(k,a)}),this.current.dependencies.push(j)}return Promise.all(this.current.dependencies)},transform:function(a,b,c,d,f,h){var i=[a,b,c,d,f,h];this.transformMatrix=PDFJS.Util.transform(this.transformMatrix,i),this.tgrp=document.createElementNS(g,"svg:g"),this.tgrp.setAttributeNS(null,"transform",e(this.transformMatrix))},getSVG:function(b,c){return this.svg=a(c.width,c.height),this.viewport=c,this.loadDependencies(b).then(function(){this.transformMatrix=S,this.pgrp=document.createElementNS(g,"svg:g"),this.pgrp.setAttributeNS(null,"transform",e(c.transform)),this.tgrp=document.createElementNS(g,"svg:g"),this.tgrp.setAttributeNS(null,"transform",e(this.transformMatrix)),this.defs=document.createElementNS(g,"svg:defs"),this.pgrp.appendChild(this.defs),this.pgrp.appendChild(this.tgrp),this.svg.appendChild(this.pgrp);var a=this.convertOpList(b);return this.executeOpTree(a),this.svg}.bind(this))},convertOpList:function(a){var b=a.argsArray,d=a.fnArray,e=d.length,f=[],g=[];for(var h in G)f[G[h]]=h;for(var i=0;e>i;i++){var j=d[i];g.push({fnId:j,fn:f[j],args:b[i]})}return c(g)},executeOpTree:function(a){for(var c=a.length,d=0;c>d;d++){var e=a[d].fn,f=a[d].fnId,g=a[d].args;switch(0|f){case G.beginText:this.beginText();break;case G.setLeading:this.setLeading(g);break;case G.setLeadingMoveText:this.setLeadingMoveText(g[0],g[1]);break;case G.setFont:this.setFont(g);break;case G.showText:this.showText(g[0]);break;case G.showSpacedText:this.showText(g[0]);break;case G.endText:this.endText();break;case G.moveText:this.moveText(g[0],g[1]);break;case G.setCharSpacing:this.setCharSpacing(g[0]);break;case G.setWordSpacing:this.setWordSpacing(g[0]);break;case G.setHScale:this.setHScale(g[0]);break;case G.setTextMatrix:this.setTextMatrix(g[0],g[1],g[2],g[3],g[4],g[5]);break;case G.setLineWidth:this.setLineWidth(g[0]);break;case G.setLineJoin:this.setLineJoin(g[0]);break;case G.setLineCap:this.setLineCap(g[0]);break;case G.setMiterLimit:this.setMiterLimit(g[0]);break;case G.setFillRGBColor:this.setFillRGBColor(g[0],g[1],g[2]);break;case G.setStrokeRGBColor:this.setStrokeRGBColor(g[0],g[1],g[2]);break;case G.setDash:this.setDash(g[0],g[1]);break;case G.setGState:this.setGState(g[0]);break;case G.fill:this.fill();break;case G.eoFill:this.eoFill();break;case G.stroke:this.stroke();break;case G.fillStroke:this.fillStroke();break;case G.eoFillStroke:this.eoFillStroke();break;case G.clip:this.clip("nonzero");break;case G.eoClip:this.clip("evenodd");break;case G.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case G.paintJpegXObject:this.paintJpegXObject(g[0],g[1],g[2]);break;case G.paintImageXObject:this.paintImageXObject(g[0]);break;case G.paintInlineImageXObject:this.paintInlineImageXObject(g[0]);break;case G.paintImageMaskXObject:this.paintImageMaskXObject(g[0]);break;case G.paintFormXObjectBegin:this.paintFormXObjectBegin(g[0],g[1]);break;case G.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case G.closePath:this.closePath();break;case G.closeStroke:this.closeStroke();break;case G.closeFillStroke:this.closeFillStroke();break;case G.nextLine:this.nextLine();break;case G.transform:this.transform(g[0],g[1],g[2],g[3],g[4],g[5]);break;case G.constructPath:this.constructPath(g[0],g[1]);break;case G.endPath:this.endPath();break;case 92:this.group(a[d].items);break;default:b("Unimplemented method "+e)}}},setWordSpacing:function(a){this.current.wordSpacing=a},setCharSpacing:function(a){this.current.charSpacing=a},nextLine:function(){this.moveText(0,this.current.leading)},setTextMatrix:function(a,b,c,e,f,h){var i=this.current;this.current.textMatrix=this.current.lineMatrix=[a,b,c,e,f,h],this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0,i.xcoords=[],i.tspan=document.createElementNS(g,"svg:tspan"),i.tspan.setAttributeNS(null,"font-family",i.fontFamily),i.tspan.setAttributeNS(null,"font-size",d(i.fontSize)+"px"),i.tspan.setAttributeNS(null,"y",d(-i.y)),i.txtElement=document.createElementNS(g,"svg:text"),i.txtElement.appendChild(i.tspan)},beginText:function(){this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0,this.current.textMatrix=S,this.current.lineMatrix=S,this.current.tspan=document.createElementNS(g,"svg:tspan"),this.current.txtElement=document.createElementNS(g,"svg:text"),this.current.txtgrp=document.createElementNS(g,"svg:g"),this.current.xcoords=[]},moveText:function(a,b){var c=this.current;this.current.x=this.current.lineX+=a,this.current.y=this.current.lineY+=b,c.xcoords=[],c.tspan=document.createElementNS(g,"svg:tspan"),c.tspan.setAttributeNS(null,"font-family",c.fontFamily),c.tspan.setAttributeNS(null,"font-size",d(c.fontSize)+"px"),c.tspan.setAttributeNS(null,"y",d(-c.y))},showText:function(a){var b=this.current,c=b.font,f=b.fontSize;if(0!==f){var g,i=b.charSpacing,j=b.wordSpacing,k=b.fontDirection,l=b.textHScale*k,m=a.length,n=c.vertical,o=f*b.fontMatrix[0],q=0;for(g=0;m>g;++g){var r=a[g];if(null!==r)if(p(r))q+=-r*f*.001;else{b.xcoords.push(b.x+q*l);var s=r.width,t=r.fontChar,u=s*o+i*k;q+=u,b.tspan.textContent+=t}else q+=k*j}n?b.y-=q*l:b.x+=q*l,b.tspan.setAttributeNS(null,"x",b.xcoords.map(d).join(" ")),b.tspan.setAttributeNS(null,"y",d(-b.y)),b.tspan.setAttributeNS(null,"font-family",b.fontFamily),b.tspan.setAttributeNS(null,"font-size",d(b.fontSize)+"px"),b.fontStyle!==ta.fontStyle&&b.tspan.setAttributeNS(null,"font-style",b.fontStyle),b.fontWeight!==ta.fontWeight&&b.tspan.setAttributeNS(null,"font-weight",b.fontWeight),b.fillColor!==ta.fillColor&&b.tspan.setAttributeNS(null,"fill",b.fillColor),b.txtElement.setAttributeNS(null,"transform",e(b.textMatrix)+" scale(1, -1)"),b.txtElement.setAttributeNS(h,"xml:space","preserve"),b.txtElement.appendChild(b.tspan),b.txtgrp.appendChild(b.txtElement),this.tgrp.appendChild(b.txtElement)}},setLeadingMoveText:function(a,b){this.setLeading(-b),this.moveText(a,b)},addFontStyle:function(a){this.cssStyle||(this.cssStyle=document.createElementNS(g,"svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.appendChild(this.cssStyle));var b=PDFJS.createObjectURL(a.data,a.mimetype);this.cssStyle.textContent+='@font-face { font-family: "'+a.loadedName+'"; src: url('+b+"); }\n"},setFont:function(a){var b=this.current,c=this.commonObjs.get(a[0]),e=a[1];this.current.font=c,this.embedFonts&&c.data&&!this.embeddedFonts[c.loadedName]&&(this.addFontStyle(c),this.embeddedFonts[c.loadedName]=c),b.fontMatrix=c.fontMatrix?c.fontMatrix:B;var f=c.black?c.bold?"bolder":"bold":c.bold?"bold":"normal",h=c.italic?"italic":"normal";0>e?(e=-e,b.fontDirection=-1):b.fontDirection=1,b.fontSize=e,b.fontFamily=c.loadedName,b.fontWeight=f,b.fontStyle=h,b.tspan=document.createElementNS(g,"svg:tspan"),b.tspan.setAttributeNS(null,"y",d(-b.y)),b.xcoords=[]},endText:function(){this.current.pendingClip?(this.cgrp.appendChild(this.tgrp),this.pgrp.appendChild(this.cgrp)):this.pgrp.appendChild(this.tgrp),this.tgrp=document.createElementNS(g,"svg:g"),this.tgrp.setAttributeNS(null,"transform",e(this.transformMatrix))},setLineWidth:function(a){this.current.lineWidth=a},setLineCap:function(a){this.current.lineCap=j[a]},setLineJoin:function(a){this.current.lineJoin=k[a]},setMiterLimit:function(a){this.current.miterLimit=a},setStrokeRGBColor:function(a,b,c){var d=T.makeCssRgb(a,b,c);this.current.strokeColor=d},setFillRGBColor:function(a,b,c){var d=T.makeCssRgb(a,b,c);this.current.fillColor=d,this.current.tspan=document.createElementNS(g,"svg:tspan"),this.current.xcoords=[]},setDash:function(a,b){this.current.dashArray=a,this.current.dashPhase=b},constructPath:function(a,b){var c=this.current,e=c.x,f=c.y;c.path=document.createElementNS(g,"svg:path");for(var h=[],i=a.length,j=0,k=0;i>j;j++)switch(0|a[j]){case G.rectangle:e=b[k++],f=b[k++];var l=b[k++],m=b[k++],n=e+l,o=f+m;h.push("M",d(e),d(f),"L",d(n),d(f),"L",d(n),d(o),"L",d(e),d(o),"Z");break;case G.moveTo:e=b[k++],f=b[k++],h.push("M",d(e),d(f));break;case G.lineTo:e=b[k++],f=b[k++],h.push("L",d(e),d(f));break;case G.curveTo:e=b[k+4],f=b[k+5],h.push("C",d(b[k]),d(b[k+1]),d(b[k+2]),d(b[k+3]),d(e),d(f)),k+=6;break;case G.curveTo2:e=b[k+2],f=b[k+3],h.push("C",d(e),d(f),d(b[k]),d(b[k+1]),d(b[k+2]),d(b[k+3])),k+=4;break;case G.curveTo3:e=b[k+2],f=b[k+3],h.push("C",d(b[k]),d(b[k+1]),d(e),d(f),d(e),d(f)),k+=4;break;case G.closePath:h.push("Z")}c.path.setAttributeNS(null,"d",h.join(" ")),c.path.setAttributeNS(null,"stroke-miterlimit",d(c.miterLimit)),c.path.setAttributeNS(null,"stroke-linecap",c.lineCap),c.path.setAttributeNS(null,"stroke-linejoin",c.lineJoin),c.path.setAttributeNS(null,"stroke-width",d(c.lineWidth)+"px"),c.path.setAttributeNS(null,"stroke-dasharray",c.dashArray.map(d).join(" ")),c.path.setAttributeNS(null,"stroke-dashoffset",d(c.dashPhase)+"px"),c.path.setAttributeNS(null,"fill","none"),this.tgrp.appendChild(c.path),c.pendingClip?(this.cgrp.appendChild(this.tgrp),this.pgrp.appendChild(this.cgrp)):this.pgrp.appendChild(this.tgrp),c.element=c.path,c.setCurrentPoint(e,f)},endPath:function(){var a=this.current;a.pendingClip?(this.cgrp.appendChild(this.tgrp),this.pgrp.appendChild(this.cgrp)):this.pgrp.appendChild(this.tgrp),this.tgrp=document.createElementNS(g,"svg:g"),this.tgrp.setAttributeNS(null,"transform",e(this.transformMatrix))},clip:function(a){var b=this.current;b.clipId="clippath"+l,l++,this.clippath=document.createElementNS(g,"svg:clipPath"),this.clippath.setAttributeNS(null,"id",b.clipId);var c=b.element.cloneNode();"evenodd"===a?c.setAttributeNS(null,"clip-rule","evenodd"):c.setAttributeNS(null,"clip-rule","nonzero"),this.clippath.setAttributeNS(null,"transform",e(this.transformMatrix)),this.clippath.appendChild(c),this.defs.appendChild(this.clippath),b.pendingClip=!0,this.cgrp=document.createElementNS(g,"svg:g"),this.cgrp.setAttributeNS(null,"clip-path","url(#"+b.clipId+")"),this.pgrp.appendChild(this.cgrp)},closePath:function(){var a=this.current,b=a.path.getAttributeNS(null,"d");b+="Z",a.path.setAttributeNS(null,"d",b)},setLeading:function(a){this.current.leading=-a},setTextRise:function(a){this.current.textRise=a},setHScale:function(a){this.current.textHScale=a/100},setGState:function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b],e=d[0],f=d[1];switch(e){case"LW":this.setLineWidth(f);break;case"LC":this.setLineCap(f);break;case"LJ":this.setLineJoin(f);break;case"ML":this.setMiterLimit(f);break;case"D":this.setDash(f[0],f[1]);break;case"RI":break;case"FL":break;case"Font":this.setFont(f);break;case"CA":break;case"ca":break;case"BM":break;case"SMask":}}},fill:function(){var a=this.current;a.element.setAttributeNS(null,"fill",a.fillColor)},stroke:function(){var a=this.current;a.element.setAttributeNS(null,"stroke",a.strokeColor),a.element.setAttributeNS(null,"fill","none")},eoFill:function(){var a=this.current;a.element.setAttributeNS(null,"fill",a.fillColor),a.element.setAttributeNS(null,"fill-rule","evenodd")},fillStroke:function(){this.stroke(),this.fill()},eoFillStroke:function(){this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()},closeStroke:function(){this.closePath(),this.stroke()},closeFillStroke:function(){this.closePath(),this.fillStroke()},paintSolidColorImageMask:function(){var a=this.current,b=document.createElementNS(g,"svg:rect");b.setAttributeNS(null,"x","0"),b.setAttributeNS(null,"y","0"),b.setAttributeNS(null,"width","1px"),b.setAttributeNS(null,"height","1px"),b.setAttributeNS(null,"fill",a.fillColor),this.tgrp.appendChild(b)},paintJpegXObject:function(a,b,c){var e=this.current,f=this.objs.get(a),h=document.createElementNS(g,"svg:image");h.setAttributeNS(i,"xlink:href",f.src),h.setAttributeNS(null,"width",f.width+"px"),h.setAttributeNS(null,"height",f.height+"px"),h.setAttributeNS(null,"x","0"),h.setAttributeNS(null,"y",d(-c)),h.setAttributeNS(null,"transform","scale("+d(1/b)+" "+d(-1/c)+")"),this.tgrp.appendChild(h),e.pendingClip?(this.cgrp.appendChild(this.tgrp),this.pgrp.appendChild(this.cgrp)):this.pgrp.appendChild(this.tgrp)},paintImageXObject:function(a){var c=this.objs.get(a);return c?void this.paintInlineImageXObject(c):void b("Dependent image isn't ready yet")},paintInlineImageXObject:function(a,b){var c=this.current,e=a.width,f=a.height,h=ua(a),j=document.createElementNS(g,"svg:rect");j.setAttributeNS(null,"x","0"),j.setAttributeNS(null,"y","0"),j.setAttributeNS(null,"width",d(e)),j.setAttributeNS(null,"height",d(f)),c.element=j,this.clip("nonzero");var k=document.createElementNS(g,"svg:image");k.setAttributeNS(i,"xlink:href",h),k.setAttributeNS(null,"x","0"),k.setAttributeNS(null,"y",d(-f)),k.setAttributeNS(null,"width",d(e)+"px"),k.setAttributeNS(null,"height",d(f)+"px"),k.setAttributeNS(null,"transform","scale("+d(1/e)+" "+d(-1/f)+")"),b?b.appendChild(k):this.tgrp.appendChild(k),c.pendingClip?(this.cgrp.appendChild(this.tgrp),this.pgrp.appendChild(this.cgrp)):this.pgrp.appendChild(this.tgrp)},paintImageMaskXObject:function(a){var b=this.current,c=a.width,e=a.height,f=b.fillColor;b.maskId="mask"+m++;var h=document.createElementNS(g,"svg:mask");h.setAttributeNS(null,"id",b.maskId);var i=document.createElementNS(g,"svg:rect");i.setAttributeNS(null,"x","0"),i.setAttributeNS(null,"y","0"),i.setAttributeNS(null,"width",d(c)),i.setAttributeNS(null,"height",d(e)),i.setAttributeNS(null,"fill",f),i.setAttributeNS(null,"mask","url(#"+b.maskId+")"),this.defs.appendChild(h),this.tgrp.appendChild(i),this.paintInlineImageXObject(a,h)},paintFormXObjectBegin:function(a,b){if(this.save(),q(a)&&6===a.length&&this.transform(a[0],a[1],a[2],a[3],a[4],a[5]),q(b)&&4===b.length){var c=b[2]-b[0],e=b[3]-b[1],f=document.createElementNS(g,"svg:rect");f.setAttributeNS(null,"x",b[0]),f.setAttributeNS(null,"y",b[1]),f.setAttributeNS(null,"width",d(c)),f.setAttributeNS(null,"height",d(e)),this.current.element=f,this.clip("nonzero"),this.endPath()}},paintFormXObjectEnd:function(){this.restore()}},f}();PDFJS.SVGGraphics=wa}.call("undefined"==typeof window?this:window),PDFJS.workerSrc||"undefined"==typeof document||(PDFJS.workerSrc=function(){"use strict";var a=document.body||document.getElementsByTagName("head")[0],b=a.lastChild.src;return b&&b.replace(/\.js$/i,".worker.js")}()),"undefined"==typeof PDFJS&&(("undefined"!=typeof window?window:this).PDFJS={}),PDFJS.version="1.1.551",PDFJS.build="2a5616c",function(){"use strict";function a(a){PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.infos&&console.log("Info: "+a)}function b(a){PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.warnings&&console.log("Warning: "+a)}function c(a){throw PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.errors&&(console.log("Error: "+a),console.log(d())),aa.notify(_.unknown),new Error(a)}function d(){try{throw new Error}catch(a){return a.stack?a.stack.split("\n").slice(2).join("\n"):""}}function e(a,b){a||c(b)}function f(a,b){if(!a)return!1;var c=/^[a-z][a-z0-9+\-.]*(?=:)/i.exec(a);if(!c)return b;switch(c=c[0].toLowerCase()){case"http":case"https":case"ftp":case"mailto":case"tel":return!0;default:return!1}}function g(a,b,c){return Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!1}),c}function h(){switch(PDFJS.openExternalLinksInNewWindow&&(b("PDFJS.openExternalLinksInNewWindow is deprecated, use PDFJS.externalLinkTarget instead."),PDFJS.externalLinkTarget===ba.NONE&&(PDFJS.externalLinkTarget=ba.BLANK),PDFJS.openExternalLinksInNewWindow=!1),PDFJS.externalLinkTarget){case ba.NONE:return!1;case ba.SELF:case ba.BLANK:case ba.PARENT:case ba.TOP:return!0}return b("PDFJS.externalLinkTarget is invalid: "+PDFJS.externalLinkTarget),PDFJS.externalLinkTarget=ba.NONE,!1}function i(a){e(null!==a&&"object"==typeof a&&void 0!==a.length,"Invalid argument for bytesToString");var b=a.length,c=8192;if(c>b)return String.fromCharCode.apply(null,a);for(var d=[],f=0;b>f;f+=c){var g=Math.min(f+c,b),h=a.subarray(f,g);d.push(String.fromCharCode.apply(null,h))}return d.join("")}function j(a){e("string"==typeof a,"Invalid argument for stringToBytes");for(var b=a.length,c=new Uint8Array(b),d=0;b>d;++d)c[d]=255&a.charCodeAt(d);return c}function k(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,255&a)}function l(a){for(var b=1,c=0;a>b;)b<<=1,c++;return c}function m(a,b){return a[b]<<24>>24}function n(a,b){return a[b]<<8|a[b+1]}function o(a,b){return(a[b]<<24|a[b+1]<<16|a[b+2]<<8|a[b+3])>>>0}function p(){var a=new Uint8Array(2);a[0]=1;var b=new Uint16Array(a.buffer);return 1===b[0]}function q(){var a=document.createElement("canvas");a.width=a.height=1;var b=a.getContext("2d"),c=b.createImageData(1,1);return"undefined"!=typeof c.data.buffer}function r(a){var b,c=a.length,d=[];if("þ"===a[0]&&"ÿ"===a[1])for(b=2;c>b;b+=2)d.push(String.fromCharCode(a.charCodeAt(b)<<8|a.charCodeAt(b+1)));else for(b=0;c>b;++b){var e=oa[a.charCodeAt(b)];d.push(e?String.fromCharCode(e):a.charAt(b))}return d.join("")}function s(a){return decodeURIComponent(escape(a))}function t(a){return unescape(encodeURIComponent(a))}function u(a){for(var b in a)return!1;return!0}function v(a){return"boolean"==typeof a}function w(a){return"number"==typeof a&&(0|a)===a}function x(a){return"number"==typeof a}function y(a){return"string"==typeof a}function z(a){return a instanceof ya}function A(a,b){return a instanceof za&&(void 0===b||a.cmd===b)}function B(a,b){if(!(a instanceof Aa))return!1;if(!b)return!0;var c=a.get("Type");return z(c)&&c.name===b}function C(a){return a instanceof Array}function D(a){return"object"==typeof a&&null!==a&&void 0!==a.getBytes}function E(a){return"object"==typeof a&&null!==a&&void 0!==a.byteLength}function F(a){return a instanceof Ba}function G(){var a={};return a.promise=new Promise(function(b,c){a.resolve=b,a.reject=c}),a}function H(a,b){this.name=a,this.comObj=b,this.callbackIndex=1,this.postMessageTransfers=!0;var d=this.callbacksCapabilities={},e=this.actionHandler={};e.console_log=[function(a){console.log.apply(console,a)}],e.console_error=[function(a){console.error.apply(console,a)}],e._unsupported_feature=[function(a){aa.notify(a)}],b.onmessage=function(a){var f=a.data;if(f.isReply){var g=f.callbackId;if(f.callbackId in d){var h=d[g];delete d[g],"error"in f?h.reject(f.error):h.resolve(f.data)}else c("Cannot resolve callback "+g)}else if(f.action in e){var i=e[f.action];f.callbackId?Promise.resolve().then(function(){return i[0].call(i[1],f.data)}).then(function(a){b.postMessage({isReply:!0,callbackId:f.callbackId,data:a})},function(a){a instanceof Error&&(a+=""),b.postMessage({isReply:!0,callbackId:f.callbackId,error:a})}):i[0].call(i[1],f.data)}else c("Unknown action from worker: "+f.action)}}function I(){}function J(a,b,c){var d=b.get("Matrix"),e=b.get("BBox"),f=b.get("XStep"),g=b.get("YStep"),h=b.get("PaintType"),i=b.get("TilingType");return["TilingPattern",c,a,d,e,f,g,h,i]}function K(a){return a>=65520&&65535>=a?0:a>=62976&&63743>=a?Wb[a]||a:a}function L(a){for(var b=0,c=Xb.length;c>b;b++){var d=Xb[b];if(a>=d.begin&&a=b.begin&&a=b.begin&&a=b||!M(a.charCodeAt(0)))return a;for(var c="",d=b-1;d>=0;d--)c+=a[d];return c}function O(a){if(a.fontMatrix[0]!==T[0]){var b=.001/a.fontMatrix[0],c=a.widths;for(var d in c)c[d]*=b;a.defaultWidth*=b}}function P(a,b){switch(a){case"Type1":return"Type1C"===b?Z.TYPE1C:Z.TYPE1;case"CIDFontType0":return"CIDFontType0C"===b?Z.CIDFONTTYPE0C:Z.CIDFONTTYPE0;case"OpenType":return Z.OPENTYPE;case"TrueType":return Z.TRUETYPE;case"CIDFontType2":return Z.CIDFONTTYPE2;case"MMType1":return Z.MMTYPE1;case"Type0":return Z.TYPE0;default:return Z.UNKNOWN}}function Q(a,b,c){var d,e,f,g=Object.create(null);if(a.baseEncodingName)for(f=Pb[a.baseEncodingName],e=0;e=0?g[e]=d:g[e]=0;else if(a.flags&Ob.Symbolic)for(e in b)g[e]=b[e];else for(f=Pb.StandardEncoding,e=0;e=0?g[e]=d:g[e]=0;var h=a.differences;if(h)for(e in h){var i=h[e];d=c.indexOf(i),d>=0?g[e]=d:g[e]=0}return g}function R(a){return a===Dc; -}var S="undefined"==typeof window?this:window,T=("undefined"==typeof window,[.001,0,0,.001,0,0]),U={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},V={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},W={WIDGET:1,TEXT:2,LINK:3},X={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},Y={UNKNOWN:0,FLATE:1,LZW:2,DCT:3,JPX:4,JBIG:5,A85:6,AHX:7,CCF:8,RL:9},Z={UNKNOWN:0,TYPE1:1,TYPE1C:2,CIDFONTTYPE0:3,CIDFONTTYPE0C:4,TRUETYPE:5,CIDFONTTYPE2:6,TYPE3:7,OPENTYPE:8,TYPE0:9,MMTYPE1:10};S.PDFJS||(S.PDFJS={}),S.PDFJS.pdfBug=!1,PDFJS.VERBOSITY_LEVELS={errors:0,warnings:1,infos:5};var $=PDFJS.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},_=PDFJS.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"},aa=PDFJS.UnsupportedManager=function(){var a=[];return{listen:function(b){a.push(b)},notify:function(c){b('Unsupported feature "'+c+'"');for(var d=0,e=a.length;e>d;d++)a[d](c)}}}();PDFJS.isValidUrl=f,PDFJS.shadow=g;var ba=PDFJS.LinkTarget={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};PDFJS.isExternalLinkTargetSet=h;var ca=PDFJS.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},da=function(){function a(a,b){this.name="PasswordException",this.message=a,this.code=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.PasswordException=da;var ea=function(){function a(a,b){this.name="UnknownErrorException",this.message=a,this.details=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.UnknownErrorException=ea;var fa=function(){function a(a){this.name="InvalidPDFException",this.message=a}return a.prototype=new Error,a.constructor=a,a}();PDFJS.InvalidPDFException=fa;var ga=function(){function a(a){this.name="MissingPDFException",this.message=a}return a.prototype=new Error,a.constructor=a,a}();PDFJS.MissingPDFException=ga;var ha=function(){function a(a,b){this.name="UnexpectedResponseException",this.message=a,this.status=b}return a.prototype=new Error,a.constructor=a,a}();PDFJS.UnexpectedResponseException=ha;var ia=function(){function a(a){this.message=a}return a.prototype=new Error,a.prototype.name="NotImplementedException",a.constructor=a,a}(),ja=function(){function a(a,b){this.begin=a,this.end=b,this.message="Missing data ["+a+", "+b+")"}return a.prototype=new Error,a.prototype.name="MissingDataException",a.constructor=a,a}(),ka=function(){function a(a){this.message=a}return a.prototype=new Error,a.prototype.name="XRefParseException",a.constructor=a,a}();Object.defineProperty(PDFJS,"isLittleEndian",{configurable:!0,get:function(){return g(PDFJS,"isLittleEndian",p())}}),Object.defineProperty(PDFJS,"hasCanvasTypedArrays",{configurable:!0,get:function(){return g(PDFJS,"hasCanvasTypedArrays",q())}});var la=function(){function a(a,b){this.buffer=a,this.byteLength=a.length,this.length=void 0===b?this.byteLength>>2:b,c(this.length)}function b(a){return{get:function(){var b=this.buffer,c=a<<2;return(b[c]|b[c+1]<<8|b[c+2]<<16|b[c+3]<<24)>>>0},set:function(b){var c=this.buffer,d=a<<2;c[d]=255&b,c[d+1]=b>>8&255,c[d+2]=b>>16&255,c[d+3]=b>>>24&255}}}function c(c){for(;c>d;)Object.defineProperty(a.prototype,d,b(d)),d++}a.prototype=Object.create(null);var d=0;return a}(),ma=[1,0,0,1,0,0],na=PDFJS.Util=function(){function a(){}var b=["rgb(",0,",",0,",",0,")"];return a.makeCssRgb=function(a,c,d){return b[1]=a,b[3]=c,b[5]=d,b.join("")},a.transform=function(a,b){return[a[0]*b[0]+a[2]*b[1],a[1]*b[0]+a[3]*b[1],a[0]*b[2]+a[2]*b[3],a[1]*b[2]+a[3]*b[3],a[0]*b[4]+a[2]*b[5]+a[4],a[1]*b[4]+a[3]*b[5]+a[5]]},a.applyTransform=function(a,b){var c=a[0]*b[0]+a[1]*b[2]+b[4],d=a[0]*b[1]+a[1]*b[3]+b[5];return[c,d]},a.applyInverseTransform=function(a,b){var c=b[0]*b[3]-b[1]*b[2],d=(a[0]*b[3]-a[1]*b[2]+b[2]*b[5]-b[4]*b[3])/c,e=(-a[0]*b[1]+a[1]*b[0]+b[4]*b[1]-b[5]*b[0])/c;return[d,e]},a.getAxialAlignedBoundingBox=function(b,c){var d=a.applyTransform(b,c),e=a.applyTransform(b.slice(2,4),c),f=a.applyTransform([b[0],b[3]],c),g=a.applyTransform([b[2],b[1]],c);return[Math.min(d[0],e[0],f[0],g[0]),Math.min(d[1],e[1],f[1],g[1]),Math.max(d[0],e[0],f[0],g[0]),Math.max(d[1],e[1],f[1],g[1])]},a.inverseTransform=function(a){var b=a[0]*a[3]-a[1]*a[2];return[a[3]/b,-a[1]/b,-a[2]/b,a[0]/b,(a[2]*a[5]-a[4]*a[3])/b,(a[4]*a[1]-a[5]*a[0])/b]},a.apply3dTransform=function(a,b){return[a[0]*b[0]+a[1]*b[1]+a[2]*b[2],a[3]*b[0]+a[4]*b[1]+a[5]*b[2],a[6]*b[0]+a[7]*b[1]+a[8]*b[2]]},a.singularValueDecompose2dScale=function(a){var b=[a[0],a[2],a[1],a[3]],c=a[0]*b[0]+a[1]*b[2],d=a[0]*b[1]+a[1]*b[3],e=a[2]*b[0]+a[3]*b[2],f=a[2]*b[1]+a[3]*b[3],g=(c+f)/2,h=Math.sqrt((c+f)*(c+f)-4*(c*f-e*d))/2,i=g+h||1,j=g-h||1;return[Math.sqrt(i),Math.sqrt(j)]},a.normalizeRect=function(a){var b=a.slice(0);return a[0]>a[2]&&(b[0]=a[2],b[2]=a[0]),a[1]>a[3]&&(b[1]=a[3],b[3]=a[1]),b},a.intersect=function(b,c){function d(a,b){return a-b}var e=[b[0],b[2],c[0],c[2]].sort(d),f=[b[1],b[3],c[1],c[3]].sort(d),g=[];return b=a.normalizeRect(b),c=a.normalizeRect(c),e[0]===b[0]&&e[1]===c[0]||e[0]===c[0]&&e[1]===b[0]?(g[0]=e[1],g[2]=e[2],f[0]===b[1]&&f[1]===c[1]||f[0]===c[1]&&f[1]===b[1]?(g[1]=f[1],g[3]=f[2],g):!1):!1},a.sign=function(a){return 0>a?-1:1},a.appendToArray=function(a,b){Array.prototype.push.apply(a,b)},a.prependToArray=function(a,b){Array.prototype.unshift.apply(a,b)},a.extendObj=function(a,b){for(var c in b)a[c]=b[c]},a.getInheritableProperty=function(a,b){for(;a&&!a.has(b);)a=a.get("Parent");return a?a.get(b):null},a.inherit=function(a,b,c){a.prototype=Object.create(b.prototype),a.prototype.constructor=a;for(var d in c)a.prototype[d]=c[d]},a.loadScript=function(a,b){var c=document.createElement("script"),d=!1;c.setAttribute("src",a),b&&(c.onload=function(){d||b(),d=!0}),document.getElementsByTagName("head")[0].appendChild(c)},a}(),oa=(PDFJS.PageViewport=function(){function a(a,b,c,d,e,f){this.viewBox=a,this.scale=b,this.rotation=c,this.offsetX=d,this.offsetY=e;var g,h,i,j,k=(a[2]+a[0])/2,l=(a[3]+a[1])/2;switch(c%=360,c=0>c?c+360:c){case 180:g=-1,h=0,i=0,j=1;break;case 90:g=0,h=1,i=1,j=0;break;case 270:g=0,h=-1,i=-1,j=0;break;default:g=1,h=0,i=0,j=-1}f&&(i=-i,j=-j);var m,n,o,p;0===g?(m=Math.abs(l-a[1])*b+d,n=Math.abs(k-a[0])*b+e,o=Math.abs(a[3]-a[1])*b,p=Math.abs(a[2]-a[0])*b):(m=Math.abs(k-a[0])*b+d,n=Math.abs(l-a[1])*b+e,o=Math.abs(a[2]-a[0])*b,p=Math.abs(a[3]-a[1])*b),this.transform=[g*b,h*b,i*b,j*b,m-g*b*k-i*b*l,n-h*b*k-j*b*l],this.width=o,this.height=p,this.fontScale=b}return a.prototype={clone:function(b){b=b||{};var c="scale"in b?b.scale:this.scale,d="rotation"in b?b.rotation:this.rotation;return new a(this.viewBox.slice(),c,d,this.offsetX,this.offsetY,b.dontFlip)},convertToViewportPoint:function(a,b){return na.applyTransform([a,b],this.transform)},convertToViewportRectangle:function(a){var b=na.applyTransform([a[0],a[1]],this.transform),c=na.applyTransform([a[2],a[3]],this.transform);return[b[0],b[1],c[0],c[1]]},convertToPdfPoint:function(a,b){return na.applyInverseTransform([a,b],this.transform)}},a}(),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364]);PDFJS.createPromiseCapability=G,function(){function a(a){this._status=c,this._handlers=[];try{a.call(this,this._resolve.bind(this),this._reject.bind(this))}catch(b){this._reject(b)}}if(S.Promise)return"function"!=typeof S.Promise.all&&(S.Promise.all=function(a){var b,c,d=0,e=[],f=new S.Promise(function(a,d){b=a,c=d});return a.forEach(function(a,f){d++,a.then(function(a){e[f]=a,d--,0===d&&b(e)},c)}),0===d&&b(e),f}),"function"!=typeof S.Promise.resolve&&(S.Promise.resolve=function(a){return new S.Promise(function(b){b(a)})}),"function"!=typeof S.Promise.reject&&(S.Promise.reject=function(a){return new S.Promise(function(b,c){c(a)})}),void("function"!=typeof S.Promise.prototype["catch"]&&(S.Promise.prototype["catch"]=function(a){return S.Promise.prototype.then(void 0,a)}));var c=0,d=1,e=2,f=500,g={handlers:[],running:!1,unhandledRejections:[],pendingRejectionCheck:!1,scheduleHandlers:function(a){a._status!==c&&(this.handlers=this.handlers.concat(a._handlers),a._handlers=[],this.running||(this.running=!0,setTimeout(this.runHandlers.bind(this),0)))},runHandlers:function(){for(var a=1,b=Date.now()+a;this.handlers.length>0;){var c=this.handlers.shift(),f=c.thisPromise._status,g=c.thisPromise._value;try{f===d?"function"==typeof c.onResolve&&(g=c.onResolve(g)):"function"==typeof c.onReject&&(g=c.onReject(g),f=d,c.thisPromise._unhandledRejection&&this.removeUnhandeledRejection(c.thisPromise))}catch(h){f=e,g=h}if(c.nextPromise._updateStatus(f,g),Date.now()>=b)break}return this.handlers.length>0?void setTimeout(this.runHandlers.bind(this),0):void(this.running=!1)},addUnhandledRejection:function(a){this.unhandledRejections.push({promise:a,time:Date.now()}),this.scheduleRejectionCheck()},removeUnhandeledRejection:function(a){a._unhandledRejection=!1;for(var b=0;bf){var d=this.unhandledRejections[c].promise._value,e="Unhandled rejection: "+d;d.stack&&(e+="\n"+d.stack),b(e),this.unhandledRejections.splice(c),c--}this.unhandledRejections.length&&this.scheduleRejectionCheck()}.bind(this),f))}};a.all=function(b){function c(a){g._status!==e&&(i=[],f(a))}var d,f,g=new a(function(a,b){d=a,f=b}),h=b.length,i=[];if(0===h)return d(i),g;for(var j=0,k=b.length;k>j;++j){var l=b[j],m=function(a){return function(b){g._status!==e&&(i[a]=b,h--,0===h&&d(i))}}(j);a.isPromise(l)?l.then(m,c):m(l)}return g},a.isPromise=function(a){return a&&"function"==typeof a.then},a.resolve=function(b){return new a(function(a){a(b)})},a.reject=function(b){return new a(function(a,c){c(b)})},a.prototype={_status:null,_value:null,_handlers:null,_unhandledRejection:null,_updateStatus:function(b,c){if(this._status!==d&&this._status!==e){if(b===d&&a.isPromise(c))return void c.then(this._updateStatus.bind(this,d),this._updateStatus.bind(this,e));this._status=b,this._value=c,b===e&&0===this._handlers.length&&(this._unhandledRejection=!0,g.addUnhandledRejection(this)),g.scheduleHandlers(this)}},_resolve:function(a){this._updateStatus(d,a)},_reject:function(a){this._updateStatus(e,a)},then:function(b,c){var d=new a(function(a,b){this.resolve=a,this.reject=b});return this._handlers.push({thisPromise:this,onResolve:b,onReject:c,nextPromise:d}),g.scheduleHandlers(this),d},"catch":function(a){return this.then(void 0,a)}},S.Promise=a}();(function(){function a(a,b,c){for(;a.lengthb;++b){var g=d[b].name;g.length>f&&(f=g.length)}for(b=0,c=d.length;c>b;++b){var h=d[b],i=h.end-h.start;e+=a(h.name," ",f)+" "+i+"ms\n"}return e}},c})();PDFJS.createBlob=function(a,b){if("undefined"!=typeof Blob)return new Blob([a],{type:b});var c=new MozBlobBuilder;return c.append(a),c.getBlob(b)},PDFJS.createObjectURL=function(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(b,c){if(!PDFJS.disableCreateObjectURL&&"undefined"!=typeof URL&&URL.createObjectURL){var d=PDFJS.createBlob(b,c);return URL.createObjectURL(d)}for(var e="data:"+c+";base64,",f=0,g=b.length;g>f;f+=3){var h=255&b[f],i=255&b[f+1],j=255&b[f+2],k=h>>2,l=(3&h)<<4|i>>4,m=g>f+1?(15&i)<<2|j>>6:64,n=g>f+2?63&j:64;e+=a[k]+a[l]+a[m]+a[n]}return e}}(),H.prototype={on:function(a,b,d){var e=this.actionHandler;e[a]&&c('There is already an actionName called "'+a+'"'),e[a]=[b,d]},send:function(a,b,c){var d={action:a,data:b};this.postMessage(d,c)},sendWithPromise:function(a,b,c){var d=this.callbackIndex++,e={action:a,data:b,callbackId:d},f=G();this.callbacksCapabilities[d]=f;try{this.postMessage(e,c)}catch(g){f.reject(g)}return f.promise},postMessage:function(a,b){b&&this.postMessageTransfers?this.comObj.postMessage(a,b):this.comObj.postMessage(a)}};var pa=function(){function a(a,b){this.url=a,b=b||{},this.isHttp=/^https?:/i.test(a),this.httpHeaders=this.isHttp&&b.httpHeaders||{},this.withCredentials=b.withCredentials||!1,this.getXhr=b.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests={},this.loadedRequests={}}function b(a){var b=a.response;if("string"!=typeof b)return b;for(var c=b.length,d=new Uint8Array(c),e=0;c>e;e++)d[e]=255&b.charCodeAt(e);return d.buffer}var c=200,d=206,e=function(){try{var a=new XMLHttpRequest;return a.open("GET","https://example.com"),a.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===a.responseType}catch(b){return!1}}();return a.prototype={requestRange:function(a,b,c){var d={begin:a,end:b};for(var e in c)d[e]=c[e];return this.request(d)},requestFull:function(a){return this.request(a)},request:function(a){var b=this.getXhr(),c=this.currXhrId++,d=this.pendingRequests[c]={xhr:b};b.open("GET",this.url),b.withCredentials=this.withCredentials;for(var f in this.httpHeaders){var g=this.httpHeaders[f];"undefined"!=typeof g&&b.setRequestHeader(f,g)}if(this.isHttp&&"begin"in a&&"end"in a){var h=a.begin+"-"+(a.end-1);b.setRequestHeader("Range","bytes="+h),d.expectedStatus=206}else d.expectedStatus=200;var i=e&&!!a.onProgressiveData;return i?(b.responseType="moz-chunked-arraybuffer",d.onProgressiveData=a.onProgressiveData,d.mozChunked=!0):b.responseType="arraybuffer",a.onError&&(b.onerror=function(c){a.onError(b.status)}),b.onreadystatechange=this.onStateChange.bind(this,c),b.onprogress=this.onProgress.bind(this,c),d.onHeadersReceived=a.onHeadersReceived,d.onDone=a.onDone,d.onError=a.onError,d.onProgress=a.onProgress,b.send(null),c},onProgress:function(a,c){var d=this.pendingRequests[a];if(d){if(d.mozChunked){var e=b(d.xhr);d.onProgressiveData(e)}var f=d.onProgress;f&&f(c)}},onStateChange:function(a,e){var f=this.pendingRequests[a];if(f){var g=f.xhr;if(g.readyState>=2&&f.onHeadersReceived&&(f.onHeadersReceived(),delete f.onHeadersReceived),4===g.readyState&&a in this.pendingRequests){if(delete this.pendingRequests[a],0===g.status&&this.isHttp)return void(f.onError&&f.onError(g.status));var h=g.status||c,i=h===c&&f.expectedStatus===d;if(!i&&h!==f.expectedStatus)return void(f.onError&&f.onError(g.status));this.loadedRequests[a]=!0;var j=b(g);if(h===d){var k=g.getResponseHeader("Content-Range"),l=/bytes (\d+)-(\d+)\/(\d+)/.exec(k),m=parseInt(l[1],10);f.onDone({begin:m,chunk:j})}else f.onProgressiveData?f.onDone(null):f.onDone({begin:0,chunk:j})}}},hasPendingRequests:function(){for(var a in this.pendingRequests)return!0;return!1},getRequestXhr:function(a){return this.pendingRequests[a].xhr},isStreamingRequest:function(a){return!!this.pendingRequests[a].onProgressiveData},isPendingRequest:function(a){return a in this.pendingRequests},isLoadedRequest:function(a){return a in this.loadedRequests},abortAllRequests:function(){for(var a in this.pendingRequests)this.abortRequest(0|a)},abortRequest:function(a){var b=this.pendingRequests[a].xhr;delete this.pendingRequests[a],b.abort()}},a}(),qa=function(){function a(a,b,c){this.bytes=new Uint8Array(a),this.start=0,this.pos=0,this.end=a,this.chunkSize=b,this.loadedChunks=[],this.numChunksLoaded=0,this.numChunks=Math.ceil(a/b),this.manager=c,this.progressiveDataLength=0,this.lastSuccessfulEnsureByteChunk=-1}return a.prototype={getMissingChunks:function(){for(var a=[],b=0,c=this.numChunks;c>b;++b)this.loadedChunks[b]||a.push(b);return a},getBaseStreams:function(){return[this]},allChunksLoaded:function(){return this.numChunksLoaded===this.numChunks},onReceiveData:function(a,b){var c=a+b.byteLength;e(a%this.chunkSize===0,"Bad begin offset: "+a);var d=this.bytes.length;e(c%this.chunkSize===0||c===d,"Bad end offset: "+c),this.bytes.set(new Uint8Array(b),a);var f,g=this.chunkSize,h=Math.floor(a/g),i=Math.floor((c-1)/g)+1;for(f=h;i>f;++f)this.loadedChunks[f]||(this.loadedChunks[f]=!0,++this.numChunksLoaded)},onReceiveProgressiveData:function(a){var b=this.progressiveDataLength,c=Math.floor(b/this.chunkSize);this.bytes.set(new Uint8Array(a),b),b+=a.byteLength,this.progressiveDataLength=b;var d,e=b>=this.end?this.numChunks:Math.floor(b/this.chunkSize);for(d=c;e>d;++d)this.loadedChunks[d]||(this.loadedChunks[d]=!0,++this.numChunksLoaded)},ensureByte:function(a){var b=Math.floor(a/this.chunkSize);if(b!==this.lastSuccessfulEnsureByteChunk){if(!this.loadedChunks[b])throw new ja(a,a+1);this.lastSuccessfulEnsureByteChunk=b}},ensureRange:function(a,b){if(!(a>=b||b<=this.progressiveDataLength))for(var c=this.chunkSize,d=Math.floor(a/c),e=Math.floor((b-1)/c)+1,f=d;e>f;++f)if(!this.loadedChunks[f])throw new ja(a,b)},nextEmptyChunk:function(a){for(var b,c=this.numChunks,d=0;c>d;++d)if(b=(a+d)%c,!this.loadedChunks[b])return b;return null},hasChunk:function(a){return!!this.loadedChunks[a]},get length(){return this.end-this.start},get isEmpty(){return 0===this.length},getByte:function(){var a=this.pos;return a>=this.end?-1:(this.ensureByte(a),this.bytes[this.pos++])},getUint16:function(){var a=this.getByte(),b=this.getByte();return-1===a||-1===b?-1:(a<<8)+b},getInt32:function(){var a=this.getByte(),b=this.getByte(),c=this.getByte(),d=this.getByte();return(a<<24)+(b<<16)+(c<<8)+d},getBytes:function(a){var b=this.bytes,c=this.pos,d=this.end;if(!a)return this.ensureRange(c,d),b.subarray(c,d);var e=c+a;return e>d&&(e=d),this.ensureRange(c,e),this.pos=e,b.subarray(c,e)},peekByte:function(){var a=this.getByte();return this.pos--,a},peekBytes:function(a){var b=this.getBytes(a);return this.pos-=b.length,b},getByteRange:function(a,b){return this.ensureRange(a,b),this.bytes.subarray(a,b)},skip:function(a){a||(a=1),this.pos+=a},reset:function(){this.pos=this.start},moveStart:function(){this.start=this.pos},makeSubStream:function(a,b,c){function d(){}this.ensureRange(a,a+b),d.prototype=Object.create(this),d.prototype.getMissingChunks=function(){for(var a=this.chunkSize,b=Math.floor(this.start/a),c=Math.floor((this.end-1)/a)+1,d=[],e=b;c>e;++e)this.loadedChunks[e]||d.push(e);return d};var e=new d;return e.pos=e.start=a,e.end=a+b||this.end,e.dict=c,e},isStream:!0},a}(),ra=function(){function a(a,b,c,d){this.stream=new qa(a,b,this),this.length=a,this.chunkSize=b,this.url=c,this.disableAutoFetch=d.disableAutoFetch;var e=this.msgHandler=d.msgHandler;if(d.chunkedViewerLoading)e.on("OnDataRange",this.onReceiveData.bind(this)),e.on("OnDataProgress",this.onProgress.bind(this)),this.sendRequest=function(a,b){e.send("RequestDataRange",{begin:a,end:b})};else{var f=function(){return new XMLHttpRequest};this.networkManager=new pa(this.url,{getXhr:f,httpHeaders:d.httpHeaders,withCredentials:d.withCredentials}),this.sendRequest=function(a,b){this.networkManager.requestRange(a,b,{onDone:this.onReceiveData.bind(this),onProgress:this.onProgress.bind(this)})}}this.currRequestId=0,this.chunksNeededByRequest={},this.requestsByChunk={},this.promisesByRequest={},this.progressiveDataLength=0,this._loadedStreamCapability=G(),d.initialData&&this.onReceiveData({chunk:d.initialData})}return a.prototype={onLoadedStream:function(){return this._loadedStreamCapability.promise},requestAllChunks:function(){var a=this.stream.getMissingChunks();return this._requestChunks(a),this._loadedStreamCapability.promise},_requestChunks:function(a){var b,c,d,e=this.currRequestId++;for(this.chunksNeededByRequest[e]=b={},c=0,d=a.length;d>c;c++)this.stream.hasChunk(a[c])||(b[a[c]]=!0);if(u(b))return Promise.resolve();var f=G();this.promisesByRequest[e]=f;var g=[];for(var h in b)h=0|h,h in this.requestsByChunk||(this.requestsByChunk[h]=[],g.push(h)),this.requestsByChunk[h].push(e);if(!g.length)return f.promise;var i=this.groupChunks(g);for(c=0;cf;++f)e.push(f);return this._requestChunks(e)},requestRanges:function(a){a=a||[];for(var b=[],c=0;cf;++f)b.indexOf(f)<0&&b.push(f);return b.sort(function(a,b){return a-b}),this._requestChunks(b)},groupChunks:function(a){for(var b=[],c=-1,d=-1,e=0;ec&&(c=f),d>=0&&d+1!==f&&(b.push({beginChunk:c,endChunk:d+1}),c=f),e+1===a.length&&b.push({beginChunk:c,endChunk:f+1}),d=f}return b},onProgress:function(a){var b=this.stream.numChunksLoaded*this.chunkSize+a.loaded;this.msgHandler.send("DocProgress",{loaded:b,total:this.length})},onReceiveData:function(a){var b=a.chunk,c=void 0===a.begin,d=c?this.progressiveDataLength:a.begin,e=d+b.byteLength,f=Math.floor(d/this.chunkSize),g=eb;++b){var k=this.requestsByChunk[b]||[];for(delete this.requestsByChunk[b],h=0;hf){b("Page_getInheritedPageProp: maximum loop count exceeded.");break}c=c.get("Parent")}return d?1===d.length||!B(d[0])||e>f?d[0]:Aa.merge(this.xref,d):Aa.empty},get content(){return this.getPageProp("Contents")},get resources(){return g(this,"resources",this.getInheritedPageProp("Resources"))},get mediaBox(){var a=this.getInheritedPageProp("MediaBox");return C(a)&&4===a.length||(a=c),g(this,"mediaBox",a)},get view(){var a=this.mediaBox,b=this.getInheritedPageProp("CropBox");return C(b)&&4===b.length?(b=na.intersect(b,a),b?g(this,"view",b):g(this,"view",a)):g(this,"view",a)},get rotate(){var a=this.getInheritedPageProp("Rotate")||0;return a%90!==0?a=0:a>=360?a%=360:0>a&&(a=(a%360+360)%360),g(this,"rotate",a)},getContentStream:function(){var a,b=this.content;if(C(b)){var c,d=this.xref,e=b.length,f=[];for(c=0;e>c;++c)f.push(d.fetchIfRef(b[c]));a=new Pc(f)}else a=D(b)?b:new _c;return a},loadResources:function(a){return this.resourcesPromise||(this.resourcesPromise=this.pdfManager.ensure(this,"resources")),this.resourcesPromise.then(function(){var b=new Ia(this.resources.map,a,this.xref);return b.load()}.bind(this))},getOperatorList:function(a,b,c){var d=this,e=this.pdfManager,f=e.ensure(this,"getContentStream",[]),g=this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"]),h=new vb(e,this.xref,a,this.pageIndex,"p"+this.pageIndex+"_",this.idCounters,this.fontCache),i=Promise.all([f,g]),j=i.then(function(e){var f=e[0],g=new xb(c,a,d.pageIndex);return a.send("StartRenderPage",{transparency:h.hasBlendModes(d.resources),pageIndex:d.pageIndex,intent:c}),h.getOperatorList(f,b,d.resources,g).then(function(){return g})}),k=e.ensure(this,"annotations");return Promise.all([j,k]).then(function(a){var d=a[0],f=a[1];if(0===f.length)return d.flush(!0),d;var g=Na.appendToOperatorList(f,d,e,h,b,c);return g.then(function(){return d.flush(!0),d})})},extractTextContent:function(a){var b={on:function(){},send:function(){}},c=this,d=this.pdfManager,e=d.ensure(this,"getContentStream",[]),f=this.loadResources(["ExtGState","XObject","Font"]),g=Promise.all([e,f]);return g.then(function(e){var f=e[0],g=new vb(d,c.xref,b,c.pageIndex,"p"+c.pageIndex+"_",c.idCounters,c.fontCache);return g.getTextContent(f,a,c.resources)})},getAnnotationsData:function(){for(var a=this.annotations,b=[],c=0,d=a.length;d>c;++c)b.push(a[c].data);return b},get annotations(){for(var a=[],b=this.getInheritedPageProp("Annots")||[],c=new I,d=0,e=b.length;e>d;++d){var f=b[d],h=c.create(this.xref,f);h&&(h.isViewable()||h.isPrintable())&&a.push(h)}return g(this,"annotations",a)}},a}(),xa=function(){function b(a,b,e){D(b)?d.call(this,a,b,e):E(b)?d.call(this,a,new Mc(b),e):c("PDFDocument: Unknown argument type")}function d(a,b,c){e(b.length>0,"stream must have data"),this.pdfManager=a,this.stream=b;var d=new Fa(this.stream,c,a);this.xref=d}function f(a,b,c,d){var e=a.pos,f=a.end,g=[];e+c>f&&(c=f-e);for(var h=0;c>h;++h)g.push(String.fromCharCode(a.getByte()));var i=g.join("");a.pos=e;var j=d?i.lastIndexOf(b):i.indexOf(b);return-1===j?!1:(a.pos+=j,!0)}var h=1024,i="\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",k={get entries(){return g(this,"entries",{Title:y,Author:y,Subject:y,Keywords:y,Creator:y,Producer:y,CreationDate:y,ModDate:y,Trapped:z})}};return b.prototype={parse:function(b){this.setup(b);var c=this.catalog.catDict.get("Version");z(c)&&(this.pdfFormatVersion=c.name);try{if(this.acroForm=this.catalog.catDict.get("AcroForm"),this.acroForm){this.xfa=this.acroForm.get("XFA");var d=this.acroForm.get("Fields");d&&C(d)&&0!==d.length||this.xfa||(this.acroForm=null)}}catch(e){a("Something wrong with AcroForm entry"),this.acroForm=null}},get linearization(){var b=null;if(this.stream.length)try{b=Hc.create(this.stream)}catch(c){if(c instanceof ja)throw c;a(c)}return g(this,"linearization",b)},get startXRef(){var a=this.stream,b=0,c=this.linearization;if(c)a.reset(),f(a,"endobj",1024)&&(b=a.pos+6);else{for(var d=1024,e=!1,h=a.end;!e&&h>0;)h-=d-"startxref".length,0>h&&(h=0),a.pos=h,e=f(a,"startxref",d,!0);if(e){a.skip(9);var i;do i=a.getByte();while(Gc.isSpace(i));for(var j="";i>=32&&57>=i;)j+=String.fromCharCode(i),i=a.getByte();b=parseInt(j,10),isNaN(b)&&(b=0)}}return g(this,"startXRef",b)},get mainXRefEntriesOffset(){var a=0,b=this.linearization;return b&&(a=b.mainXRefEntriesOffset),g(this,"mainXRefEntriesOffset",a)},checkHeader:function(){var a=this.stream;if(a.reset(),f(a,"%PDF-",1024)){a.moveStart();for(var b,c=12,d="";(b=a.getByte())>32&&!(d.length>=c);)d+=String.fromCharCode(b);return void(this.pdfFormatVersion||(this.pdfFormatVersion=d.substring(5))); -}},parseStartXRef:function(){var a=this.startXRef;this.xref.setStartXRef(a)},setup:function(a){this.xref.parse(a),this.catalog=new Ea(this.pdfManager,this.xref)},get numPages(){var a=this.linearization,b=a?a.numPages:this.catalog.numPages;return g(this,"numPages",b)},get documentInfo(){var b,c={PDFFormatVersion:this.pdfFormatVersion,IsAcroFormPresent:!!this.acroForm,IsXFAPresent:!!this.xfa};try{b=this.xref.trailer.get("Info")}catch(d){a("The document information dictionary is invalid.")}if(b){var e=k.entries;for(var f in e)if(b.has(f)){var h=b.get(f);e[f](h)?c[f]="string"!=typeof h?h:r(h):a('Bad value in document info for "'+f+'"')}}return g(this,"documentInfo",c)},get fingerprint(){var a,b=this.xref,c="",d=b.trailer.get("ID");d&&C(d)&&d[0]&&y(d[0])&&d[0]!==i?a=j(d[0]):(this.stream.ensureRange&&this.stream.ensureRange(0,Math.min(h,this.stream.end)),a=gb(this.stream.bytes.subarray(0,h),0,h));for(var e=0,f=a.length;f>e;e++){var k=a[e].toString(16);c+=1===k.length?"0"+k:k}return g(this,"fingerprint",c)},getPage:function(a){return this.catalog.getPage(a)},cleanup:function(){return this.catalog.cleanup()}},b}(),ya=function(){function a(a){this.name=a}a.prototype={};var b={};return a.get=function(c){var d=b[c];return d?d:b[c]=new a(c)},a}(),za=function(){function a(a){this.cmd=a}a.prototype={};var b={};return a.get=function(c){var d=b[c];return d?d:b[c]=new a(c)},a}(),Aa=function(){function a(a){if(!z(a.Type))return!0;var b=a.Type.name;return d[b]===!0}function b(a){this.map=Object.create(null),this.xref=a,this.objId=null,this.__nonSerializable__=c}var c=function(){return c},d={Background:!0,ExtGState:!0,Halftone:!0,Layout:!0,Mask:!0,Pagination:!0,Printing:!0};return b.prototype={assignXref:function(a){this.xref=a},get:function(a,b,c){var d,e=this.xref;return"undefined"!=typeof(d=this.map[a])||a in this.map||"undefined"==typeof b?e?e.fetchIfRef(d):d:"undefined"!=typeof(d=this.map[b])||b in this.map||"undefined"==typeof c?e?e.fetchIfRef(d):d:(d=this.map[c]||null,e?e.fetchIfRef(d):d)},getAsync:function(a,b,c){var d,e=this.xref;return"undefined"!=typeof(d=this.map[a])||a in this.map||"undefined"==typeof b?e?e.fetchIfRefAsync(d):Promise.resolve(d):"undefined"!=typeof(d=this.map[b])||b in this.map||"undefined"==typeof c?e?e.fetchIfRefAsync(d):Promise.resolve(d):(d=this.map[c]||null,e?e.fetchIfRefAsync(d):Promise.resolve(d))},getArray:function(a,b,c){var d=this.get(a,b,c),e=this.xref;if(!C(d)||!e)return d;d=d.slice();for(var f=0,g=d.length;g>f;f++)F(d[f])&&(d[f]=e.fetch(d[f]));return d},getRaw:function(a){return this.map[a]},getAll:function(){var c,d,e=Object.create(null),f=null;for(c in this.map)d=this.get(c),d instanceof b?a(d)?(f||(f=[])).push({target:e,key:c,obj:d}):e[c]=this.getRaw(c):e[c]=d;if(!f)return e;for(var g=Object.create(null);f.length>0;){var h=f.shift(),i=h.obj,j=i.objId;if(j&&j in g)h.target[h.key]=g[j];else{var k=Object.create(null);for(c in i.map)d=i.get(c),d instanceof b?a(d)?f.push({target:k,key:c,obj:d}):k[c]=i.getRaw(c):k[c]=d;j&&(g[j]=k),h.target[h.key]=k}}return e},getKeys:function(){return Object.keys(this.map)},set:function(a,b){this.map[a]=b},has:function(a){return a in this.map},forEach:function(a){for(var b in this.map)a(b,this.get(b))}},b.empty=new b(null),b.merge=function(a,c){for(var d=new b(a),e=0,f=c.length;f>e;e++){var g=c[e];if(B(g))for(var h in g.map)d.map[h]||(d.map[h]=g.map[h])}return d},b}(),Ba=function(){function a(a,b){this.num=a,this.gen=b}return a.prototype={toString:function(){var a=this.num+"R";return 0!==this.gen&&(a+=this.gen),a}},a}(),Ca=function(){function a(){this.dict={}}return a.prototype={has:function(a){return a.toString()in this.dict},put:function(a){this.dict[a.toString()]=!0},remove:function(a){delete this.dict[a.toString()]}},a}(),Da=function(){function a(){this.dict=Object.create(null)}return a.prototype={get:function(a){return this.dict[a.toString()]},has:function(a){return a.toString()in this.dict},put:function(a,b){this.dict[a.toString()]=b},putAlias:function(a,b){this.dict[a.toString()]=this.get(b)},forEach:function(a,b){for(var c in this.dict)a.call(b,this.dict[c])},clear:function(){this.dict=Object.create(null)}},a}(),Ea=function(){function d(a,b){this.pdfManager=a,this.xref=b,this.catDict=b.getCatalogObj(),this.fontCache=new Da,e(B(this.catDict),"catalog object is not a dictionary"),this.pagePromises=[]}return d.prototype={get metadata(){var b=this.catDict.getRaw("Metadata");if(!F(b))return g(this,"metadata",null);var c,d=this.xref.encrypt?this.xref.encrypt.encryptMetadata:!1,e=this.xref.fetch(b,!d);if(e&&B(e.dict)){var f=e.dict.get("Type"),h=e.dict.get("Subtype");if(z(f)&&z(h)&&"Metadata"===f.name&&"XML"===h.name)try{c=s(i(e.getBytes()))}catch(j){a("Skipping invalid metadata.")}}return g(this,"metadata",c)},get toplevelPagesDict(){var a=this.catDict.get("Pages");return e(B(a),"invalid top-level pages dictionary"),g(this,"toplevelPagesDict",a)},get documentOutline(){var a=null;try{a=this.readDocumentOutline()}catch(c){if(c instanceof ja)throw c;b("Unable to read document outline")}return g(this,"documentOutline",a)},readDocumentOutline:function(){var a=this.xref,b=this.catDict.get("Outlines"),d={items:[]};if(B(b)){b=b.getRaw("First");var e=new Ca;if(F(b)){var f=[{obj:b,parent:d}];for(e.put(b);f.length>0;){var g=f.shift(),h=a.fetchIfRef(g.obj);if(null!==h){h.has("Title")||c("Invalid outline item");var i=h.get("A");i?i=i.get("D"):h.has("Dest")&&(i=h.getRaw("Dest"),z(i)&&(i=i.name));var j=h.get("Title"),k={dest:i,title:r(j),color:h.get("C")||[0,0,0],count:h.get("Count"),bold:!!(2&h.get("F")),italic:!!(1&h.get("F")),items:[]};g.parent.items.push(k),b=h.getRaw("First"),F(b)&&!e.has(b)&&(f.push({obj:b,parent:k}),e.put(b)),b=h.getRaw("Next"),F(b)&&!e.has(b)&&(f.push({obj:b,parent:g.parent}),e.put(b))}}}}return d.items.length>0?d.items:null},get numPages(){var a=this.toplevelPagesDict.get("Count");return e(w(a),"page count in top level pages object is not an integer"),g(this,"num",a)},get destinations(){function a(a){return B(a)?a.get("D"):a}var b,c,d=this.xref,e={},f=this.catDict.get("Names");if(f&&f.has("Dests")?b=f.getRaw("Dests"):this.catDict.has("Dests")&&(c=this.catDict.get("Dests")),c&&(f=c,f.forEach(function(b,c){c&&(e[b]=a(c))})),b){var h=new Ga(b,d),i=h.getAll();for(var j in i)i.hasOwnProperty(j)&&(e[j]=a(i[j]))}return g(this,"destinations",e)},getDestination:function(a){function b(a){return B(a)?a.get("D"):a}var c,d,e=this.xref,f=null,g=this.catDict.get("Names");if(g&&g.has("Dests")?c=g.getRaw("Dests"):this.catDict.has("Dests")&&(d=this.catDict.get("Dests")),d){var h=d.get(a);h&&(f=b(h))}if(c){var i=new Ga(c,e);f=b(i.get(a))}return f},get attachments(){var a,b=this.xref,c=null,d=this.catDict.get("Names");if(d&&(a=d.getRaw("EmbeddedFiles")),a){var e=new Ga(a,b),f=e.getAll();for(var h in f)if(f.hasOwnProperty(h)){var i=new Ha(f[h],b);c||(c={}),c[r(h)]=i.serializable}}return g(this,"attachments",c)},get javaScript(){function a(a){var b=a.get("S");if(z(b)&&"JavaScript"===b.name){var c=a.get("JS");if(D(c))c=i(c.getBytes());else if(!y(c))return;d.push(r(c))}}var b=this.xref,c=this.catDict.get("Names"),d=[];if(c&&c.has("JavaScript")){var e=new Ga(c.getRaw("JavaScript"),b),f=e.getAll();for(var h in f)if(f.hasOwnProperty(h)){var j=f[h];B(j)&&a(j)}}var k=this.catDict.get("OpenAction");if(B(k,"Action")){var l=k.get("S");if(z(l)&&"Named"===l.name){var m=k.get("N");z(m)&&"Print"===m.name&&d.push("print({});")}else a(k)}return g(this,"javaScript",d)},cleanup:function(){var a=[];return this.fontCache.forEach(function(b){a.push(b)}),Promise.all(a).then(function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b].dict;delete d.translated}this.fontCache.clear()}.bind(this))},getPage:function(a){return a in this.pagePromises||(this.pagePromises[a]=this.getPageDict(a).then(function(b){var c=b[0],d=b[1];return new wa(this.pdfManager,this.xref,a,c,d,this.fontCache)}.bind(this))),this.pagePromises[a]},getPageDict:function(a){function b(){for(;d.length;){var i=d.pop();if(F(i))return void g.fetchAsync(i).then(function(e){return B(e,"Page")||B(e)&&!e.has("Kids")?void(a===f?c.resolve([e,i]):(f++,b())):(d.push(e),void b())},c.reject);e(B(i),"page dictionary kid reference points to wrong type of object");var j=i.get("Count");if(0===j&&(h=!0),a>=f+j)f+=j;else{var k=i.get("Kids");if(e(C(k),"page dictionary kids object is not an array"),h||j!==k.length)for(var l=k.length-1;l>=0;l--)d.push(k[l]);else d=[k[a-f]],f=a}}c.reject("Page index "+a+" not found.")}var c=G(),d=[this.catDict.getRaw("Pages")],f=0,g=this.xref,h=!1;return b(),c.promise},getPageIndex:function(a){function b(a){var b,d=0;return f.fetchAsync(a).then(function(a){return a?(b=a.getRaw("Parent"),a.getAsync("Parent")):null}).then(function(a){return a?a.getAsync("Kids"):null}).then(function(g){if(!g)return null;for(var h=[],i=!1,j=0;jh;h++){d.streamPos=b.pos,d.entryNum=h,d.parserBuf1=a.buf1,d.parserBuf2=a.buf2;var i={};i.offset=a.getObj(),i.gen=a.getObj();var j=a.getObj();A(j,"f")?i.free=!0:A(j,"n")&&(i.uncompressed=!0),w(i.offset)&&w(i.gen)&&(i.free||i.uncompressed)||c("Invalid entry in XRef subsection: "+f+", "+g),this.entries[h+f]||(this.entries[h+f]=i)}d.entryNum=0,d.streamPos=b.pos,d.parserBuf1=a.buf1,d.parserBuf2=a.buf2,delete d.firstEntryNum,delete d.entryCount}return 1===f&&this.entries[1]&&this.entries[1].free&&this.entries.shift(),this.entries[0]&&!this.entries[0].free&&c("Invalid XRef table: unexpected first object"),e},processXRefStream:function(a){if(!("streamState"in this)){var b=a.dict,c=b.get("W"),d=b.get("Index");d||(d=[0,b.get("Size")]),this.streamState={entryRanges:d,byteWidths:c,entryNum:0,streamPos:a.pos}}return this.readXRefStream(a),delete this.streamState,a.dict},readXRefStream:function(a){var b,d,e=this.streamState;a.pos=e.streamPos;for(var f=e.byteWidths,g=f[0],h=f[1],i=f[2],j=e.entryRanges;j.length>0;){var k=j[0],l=j[1];for(w(k)&&w(l)||c("Invalid XRef range fields: "+k+", "+l),w(g)&&w(h)&&w(i)||c("Invalid XRef entry fields length: "+k+", "+l),b=e.entryNum;l>b;++b){e.entryNum=b,e.streamPos=a.pos;var m=0,n=0,o=0;for(d=0;g>d;++d)m=m<<8|a.getByte();for(0===g&&(m=1),d=0;h>d;++d)n=n<<8|a.getByte();for(d=0;i>d;++d)o=o<<8|a.getByte();var p={};switch(p.offset=n,p.gen=o,m){case 0:p.free=!0;break;case 1:p.uncompressed=!0;break;case 2:break;default:c("Invalid XRef entry type: "+m)}this.entries[k+b]||(this.entries[k+b]=p)}e.entryNum=0,e.streamPos=a.pos,j.splice(0,2)}},indexObjects:function(){function a(a,b){for(var c="",f=a[b];f!==d&&f!==e&&f!==h&&!(++b>=a.length);)c+=String.fromCharCode(f),f=a[b];return c}function b(a,b,c){for(var d=c.length,e=a.length,f=0;e>b;){for(var g=0;d>g&&a[b+g]===c[g];)++g;if(g>=d)break;b++,f++}return f}var c=9,d=10,e=13,f=32,g=37,h=60,i=/^(\d+)\s+(\d+)\s+obj\b/,j=new Uint8Array([116,114,97,105,108,101,114]),k=new Uint8Array([115,116,97,114,116,120,114,101,102]),l=new Uint8Array([101,110,100,111,98,106]),m=new Uint8Array([47,88,82,101,102]);this.entries.length=0;var n=this.stream;n.pos=0;for(var o=n.getBytes(),p=n.start,q=o.length,r=[],s=[];q>p;){var t=o[p];if(t!==c&&t!==d&&t!==e&&t!==f)if(t!==g){var u,v=a(o,p);if(0!==v.indexOf("xref")||4!==v.length&&!/\s/.test(v[4]))if(u=i.exec(v)){"undefined"==typeof this.entries[u[1]]&&(this.entries[u[1]]={offset:p-n.start,gen:0|u[2],uncompressed:!0});var w=b(o,p,l)+7,x=o.subarray(p,p+w),y=b(x,0,m);w>y&&x[y+5]<64&&(s.push(p-n.start),this.xrefstms[p-n.start]=1),p+=w}else 0!==v.indexOf("trailer")||7!==v.length&&!/\s/.test(v[7])?p+=v.length+1:(r.push(p),p+=b(o,p,k));else p+=b(o,p,j),r.push(p),p+=b(o,p,k)}else do{if(++p,p>=q)break;t=o[p]}while(t!==d&&t!==e);else++p}var z,C;for(z=0,C=s.length;C>z;++z)this.startXRefQueue.push(s[z]),this.readXRef(!0);var D;for(z=0,C=r.length;C>z;++z){n.pos=r[z];var E=new Fc(new Gc(n),!0,this),F=E.getObj();if(A(F,"trailer")&&B(D=E.getObj())&&D.has("ID"))return D}if(D)return D;throw new fa("Invalid PDF structure")},readXRef:function(b){var d=this.stream;try{for(;this.startXRefQueue.length;){var e=this.startXRefQueue[0];d.pos=e+d.start;var f,g=new Fc(new Gc(d),!0,this),h=g.getObj();if(A(h,"xref")){if(f=this.processXRefTable(g),this.topDict||(this.topDict=f),h=f.get("XRefStm"),w(h)){var i=h;i in this.xrefstms||(this.xrefstms[i]=1,this.startXRefQueue.push(i))}}else w(h)?(w(g.getObj())&&A(g.getObj(),"obj")&&D(h=g.getObj())||c("Invalid XRef stream"),f=this.processXRefStream(h),this.topDict||(this.topDict=f),f||c("Failed to read XRef stream")):c("Invalid XRef stream header");h=f.get("Prev"),w(h)?this.startXRefQueue.push(h):F(h)&&this.startXRefQueue.push(h.num),this.startXRefQueue.shift()}return this.topDict}catch(j){if(j instanceof ja)throw j;a("(while reading XRef): "+j)}if(!b)throw new ka},getEntry:function(a){var b=this.entries[a];return b&&!b.free&&b.offset?b:null},fetchIfRef:function(a){return F(a)?this.fetch(a):a},fetch:function(a,b){e(F(a),"ref object is not a reference");var c=a.num;if(c in this.cache){var d=this.cache[c];return d}var f=this.getEntry(c);return null===f?this.cache[c]=null:(f=f.uncompressed?this.fetchUncompressed(a,f,b):this.fetchCompressed(f,b),B(f)?f.objId=a.toString():D(f)&&(f.dict.objId=a.toString()),f)},fetchUncompressed:function(a,b,d){var e=a.gen,f=a.num;b.gen!==e&&c("inconsistent generation in XRef");var g=this.stream.makeSubStream(b.offset+this.stream.start),h=new Fc(new Gc(g),!0,this),i=h.getObj(),j=h.getObj(),k=h.getObj();if(w(i)&&parseInt(i,10)===f&&w(j)&&parseInt(j,10)===e&&A(k)||c("bad XRef entry"),!A(k,"obj")){if(0===k.cmd.indexOf("obj")&&(f=parseInt(k.cmd.substring(3),10),!isNaN(f)))return f;c("bad XRef entry")}return b=this.encrypt&&!d?h.getObj(this.encrypt.createCipherTransform(f,e)):h.getObj(),D(b)||(this.cache[f]=b),b},fetchCompressed:function(a,b){var d=a.offset,e=this.fetch(new Ba(d,0));D(e)||c("bad ObjStm stream");var f=e.dict.get("First"),g=e.dict.get("N");w(f)&&w(g)||c("invalid first and n parameters for ObjStm stream");var h=new Fc(new Gc(e),!1,this);h.allowStreams=!0;var i,j,k=[],l=[];for(i=0;g>i;++i){j=h.getObj(),w(j)||c("invalid object number in the ObjStm stream: "+j),l.push(j);var m=h.getObj();w(m)||c("invalid object offset in the ObjStm stream: "+m)}for(i=0;g>i;++i){k.push(h.getObj()),j=l[i];var n=this.entries[j];n&&n.offset===d&&n.gen===i&&(this.cache[j]=k[i])}return a=k[a.gen],void 0===a&&c("bad XRef entry for compressed object"),a},fetchIfRefAsync:function(a){return F(a)?this.fetchAsync(a):Promise.resolve(a)},fetchAsync:function(a,b){var c=this.stream.manager,d=this;return new Promise(function e(f,g){try{f(d.fetch(a,b))}catch(h){if(h instanceof ja)return void c.requestRange(h.begin,h.end).then(function(){e(f,g)},g);g(h)}})},getCatalogObj:function(){return this.root}},d}(),Ga=function(){function a(a,b){this.root=a,this.xref=b}return a.prototype={getAll:function(){var a={};if(!this.root)return a;var b=this.xref,d=new Ca;d.put(this.root);for(var e=[this.root];e.length>0;){var f,g,h=b.fetchIfRef(e.shift());if(B(h))if(h.has("Kids")){var i=h.get("Kids");for(f=0,g=i.length;g>f;f++){var j=i[f];d.has(j)&&c("invalid destinations"),e.push(j),d.put(j)}}else{var k=h.get("Names");if(k)for(f=0,g=k.length;g>f;f+=2)a[b.fetchIfRef(k[f])]=b.fetchIfRef(k[f+1])}}return a},get:function(a){if(!this.root)return null;for(var c,d,e,f=this.xref,g=f.fetchIfRef(this.root),h=0,i=10;g.has("Kids");){if(h++,h>i)return b("Search depth limit for named destionations has been reached."),null;var j=g.get("Kids");if(!C(j))return null;for(c=0,d=j.length-1;d>=c;){e=c+d>>1;var k=f.fetchIfRef(j[e]),l=k.get("Limits");if(af.fetchIfRef(l[1]))){g=f.fetchIfRef(j[e]);break}c=e+1}}if(c>d)return null}var m=g.get("Names");if(C(m))for(c=0,d=m.length-2;d>=c;)if(e=c+d&-2,af.fetchIfRef(m[e])))return f.fetchIfRef(m[e+1]);c=e+2}return null}},a}(),Ha=function(){function a(a,c){a&&B(a)&&(this.xref=c,this.root=a,a.has("FS")&&(this.fs=a.get("FS")),this.description=a.has("Desc")?r(a.get("Desc")):"",a.has("RF")&&b("Related file specifications are not supported"),this.contentAvailable=!0,a.has("EF")||(this.contentAvailable=!1,b("Non-embedded file specifications are not supported")))}function c(a){return a.has("UF")?a.get("UF"):a.has("F")?a.get("F"):a.has("Unix")?a.get("Unix"):a.has("Mac")?a.get("Mac"):a.has("DOS")?a.get("DOS"):null}return a.prototype={get filename(){if(!this._filename&&this.root){var a=c(this.root)||"unnamed";this._filename=r(a).replace(/\\\\/g,"\\").replace(/\\\//g,"/").replace(/\\/g,"/")}return this._filename},get content(){if(!this.contentAvailable)return null;!this.contentRef&&this.root&&(this.contentRef=c(this.root.get("EF")));var a=null;if(this.contentRef){var d=this.xref,e=d.fetchIfRef(this.contentRef);e&&D(e)?a=e.getBytes():b("Embedded file specification points to non-existing/invalid content")}else b("Embedded file specification does not have a content");return a},get serializable(){return{filename:this.filename,content:this.content}}},a}(),Ia=function(){function a(a){return F(a)||B(a)||C(a)||D(a)}function b(b,c){var d;if(B(b)||D(b)){var e;e=B(b)?b.map:b.dict.map;for(var f in e)d=e[f],a(d)&&c.push(d)}else if(C(b))for(var g=0,h=b.length;h>g;g++)d=b[g],a(d)&&c.push(d)}function c(a,b,c){this.obj=a,this.keys=b,this.xref=c,this.refSet=null,this.capability=null}return c.prototype={load:function(){var a=this.keys;if(this.capability=G(),!(this.xref.stream instanceof qa)||0===this.xref.stream.getMissingChunks().length)return this.capability.resolve(),this.capability.promise;this.refSet=new Ca;for(var b=[],c=0;c=3&&(this.borderStyle.setHorizontalCornerRadius(d[0]),this.borderStyle.setVerticalCornerRadius(d[1]),this.borderStyle.setWidth(d[2]),4===d.length&&this.borderStyle.setDashArray(d[3]))}else this.borderStyle.setWidth(0)},isInvisible:function(){var a=this.data;return!!(a&&a.annotationFlags&&1&a.annotationFlags)},isViewable:function(){var a=this.data;return!(this.isInvisible()||!a||a.annotationFlags&&34&a.annotationFlags||!a.rect)},isPrintable:function(){var a=this.data;return!(!(!this.isInvisible()&&a&&a.annotationFlags&&4&a.annotationFlags)||2&a.annotationFlags||!a.rect)},loadResources:function(a){return new Promise(function(b,c){this.appearance.dict.getAsync("Resources").then(function(d){if(!d)return void b();var e=new Ia(d.map,a,d.xref);e.load().then(function(){b(d)},c)},c)}.bind(this))},getOperatorList:function(b,c){if(!this.appearance)return Promise.resolve(new xb);var d=this.data,e=this.appearance.dict,f=this.loadResources(["ExtGState","ColorSpace","Pattern","Shading","XObject","Font"]),g=e.get("BBox")||[0,0,1,1],h=e.get("Matrix")||[1,0,0,1,0,0],i=a(d.rect,g,h),j=this;return f.then(function(a){var e=new xb;return e.addOp($.beginAnnotation,[d.rect,i,h]),b.getOperatorList(j.appearance,c,a,e).then(function(){return e.addOp($.endAnnotation,[]),j.appearance.reset(),e})})}},c.appendToOperatorList=function(a,b,c,d,e,f){function g(a){h.reject(a)}for(var h=G(),i=[],j=0,k=a.length;k>j;++j)("display"===f&&a[j].isViewable()||"print"===f&&a[j].isPrintable())&&i.push(a[j].getOperatorList(d,e));return Promise.all(i).then(function(a){b.addOp($.beginAnnotations,[]);for(var c=0,d=a.length;d>c;++c){var e=a[c];b.addOpList(e)}b.addOp($.endAnnotations,[]),h.resolve()},g),h.promise},c}(),Oa=function(){function a(){this.width=1,this.style=X.SOLID,this.dashArray=[3],this.horizontalCornerRadius=0,this.verticalCornerRadius=0}return a.prototype={setWidth:function(a){a===(0|a)&&(this.width=a)},setStyle:function(a){if(a)switch(a.name){case"S":this.style=X.SOLID;break;case"D":this.style=X.DASHED;break;case"B":this.style=X.BEVELED;break;case"I":this.style=X.INSET;break;case"U":this.style=X.UNDERLINE}},setDashArray:function(a){if(C(a)&&a.length>0){for(var b=!0,c=!0,d=0,e=a.length;e>d;d++){var f=a[d],g=+f>=0;if(!g){b=!1;break}f>0&&(c=!1)}b&&!c?this.dashArray=a:this.width=0}else a&&(this.width=0)},setHorizontalCornerRadius:function(a){a===(0|a)&&(this.horizontalCornerRadius=a)},setVerticalCornerRadius:function(a){a===(0|a)&&(this.verticalCornerRadius=a)}},a}(),Pa=function(){function a(a){Na.call(this,a);var b=a.dict,c=this.data;c.fieldValue=r(na.getInheritableProperty(b,"V")||""),c.alternativeText=r(b.get("TU")||""),c.defaultAppearance=na.getInheritableProperty(b,"DA")||"";var d=na.getInheritableProperty(b,"FT");c.fieldType=z(d)?d.name:"",c.fieldFlags=na.getInheritableProperty(b,"Ff")||0,this.fieldResources=na.getInheritableProperty(b,"DR")||Aa.empty;for(var e=[],f=b,g=a.ref;f;){var h=f.get("Parent"),i=f.getRaw("Parent"),j=f.get("T");if(j)e.unshift(r(j));else if(h&&g){var k,l,m=h.get("Kids");for(k=0,l=m.length;l>k;k++){var n=m[k];if(n.num===g.num&&n.gen===g.gen)break}e.unshift("`"+k)}f=h,g=i}c.fullName=e.join(".")}var c=Na.prototype;return na.inherit(a,Na,{isViewable:function(){return"Sig"===this.data.fieldType?(b("unimplemented annotation type: Widget signature"),!1):c.isViewable.call(this)}}),a}(),Qa=function(){function a(a){Pa.call(this,a),this.data.textAlignment=na.getInheritableProperty(a.dict,"Q"),this.data.annotationType=W.WIDGET,this.data.hasHtml=!this.data.hasAppearance&&!!this.data.fieldValue}return na.inherit(a,Pa,{getOperatorList:function(a,b){if(this.appearance)return Na.prototype.getOperatorList.call(this,a,b);var c=new xb,d=this.data;if(!d.defaultAppearance)return Promise.resolve(c);var e=new Mc(j(d.defaultAppearance));return a.getOperatorList(e,b,this.fieldResources,c).then(function(){return c})}}),a}(),Ra=function(){function a(a){Na.call(this,a);var b=a.dict,c=this.data,d=b.get("Contents"),e=b.get("T");c.annotationType=W.TEXT,c.content=r(d||""),c.title=r(e||""),c.hasHtml=!0,c.hasAppearance?c.name="NoIcon":(c.rect[1]=c.rect[3]-Ma,c.rect[2]=c.rect[0]+Ma,c.name=b.has("Name")?b.get("Name").name:"Note"),b.has("C")&&(c.hasBgColor=!0)}return na.inherit(a,Na,{}),a}(),Sa=function(){function a(a){Na.call(this,a);var d=a.dict,e=this.data;e.annotationType=W.LINK,e.hasHtml=!0;var g=d.get("A");if(g&&B(g)){var h=g.get("S").name;if("URI"===h){var i=g.get("URI");z(i)?i="/"+i.name:i&&(i=c(i)),f(i,!1)||(i="");try{e.url=s(i)}catch(j){e.url=i}}else if("GoTo"===h)e.dest=g.get("D");else if("GoToR"===h){var k=g.get("F");B(k)&&(i=k.get("F")||""),f(i,!1)||(i=""),e.url=i,e.dest=g.get("D")}else"Named"===h?e.action=g.get("N").name:b("unrecognized link type: "+h)}else if(d.has("Dest")){var l=d.get("Dest"); -e.dest=z(l)?l.name:l}}function c(a){return a&&0===a.indexOf("www.")?"http://"+a:a}return na.inherit(a,Na,{}),a}(),Ta=function(){var b=0,d=2,e=3,f=4;return{getSampleArray:function(a,b,c,d){var e,f,g=1;for(e=0,f=a.length;f>e;e++)g*=a[e];g*=b;var h=new Array(g),i=0,j=0,k=1/(Math.pow(2,c)-1),l=d.getBytes((g*c+7)/8),m=0;for(e=0;g>e;e++){for(;c>i;)j<<=8,j|=l[m++],i+=8;i-=c,h[e]=(j>>i)*k,j&=(1<d;d++){var f=a.fetchIfRef(b[d]);c.push(Ta.parse(a,f))}return function(a,b,d,e){for(var f=0,g=c.length;g>f;f++)c[f](a,b,d,e+f)}},constructSampled:function(d,e){function f(a){for(var b=a.length,c=[],d=0,e=0;b>e;e+=2)c[d]=[a[e],a[e+1]],++d;return c}var g=e.get("Domain"),h=e.get("Range");g&&h||c("No domain or range");var i=g.length/2,j=h.length/2;g=f(g),h=f(h);var k=e.get("Size"),l=e.get("BitsPerSample"),m=e.get("Order")||1;1!==m&&a("No support for cubic spline interpolation: "+m);var n=e.get("Encode");if(!n){n=[];for(var o=0;i>o;++o)n.push(0),n.push(k[o]-1)}n=f(n);var p=e.get("Decode");p=p?f(p):h;var q=this.getSampleArray(k,j,l,d);return[b,i,g,n,p,q,k,j,Math.pow(2,l)-1,h]},constructSampledFromIR:function(a){function b(a,b,c,d,e){return d+(a-b)*((e-d)/(c-b))}return function(c,d,e,f){var g,h,i=a[1],j=a[2],k=a[3],l=a[4],m=a[5],n=a[6],o=a[7],p=a[9],q=1<h;h++)r[h]=1;var t=o,u=1;for(g=0;i>g;++g){var v=j[g][0],w=j[g][1],x=Math.min(Math.max(c[d+g],v),w),y=b(x,v,w,k[g][0],k[g][1]),z=n[g];y=Math.min(Math.max(y,0),z-1);var A=z-1>y?Math.floor(y):y-1,B=A+1-y,C=y-A,D=A*t,E=D+t;for(h=0;q>h;h++)h&u?(r[h]*=C,s[h]+=E):(r[h]*=B,s[h]+=D);t*=z,u<<=1}for(h=0;o>h;++h){var F=0;for(g=0;q>g;g++)F+=m[s[g]+h]*r[g];F=b(F,0,1,l[h][0],l[h][1]),e[f+h]=Math.min(Math.max(F,p[h][0]),p[h][1])}}},constructInterpolated:function(a,b){var e=b.get("C0")||[0],f=b.get("C1")||[1],g=b.get("N");C(e)&&C(f)||c("Illegal dictionary for interpolated function");for(var h=e.length,i=[],j=0;h>j;++j)i.push(f[j]-e[j]);return[d,e,i,g]},constructInterpolatedFromIR:function(a){var b=a[1],c=a[2],d=a[3],e=c.length;return function(a,f,g,h){for(var i=1===d?a[f]:Math.pow(a[f],d),j=0;e>j;++j)g[h+j]=b[j]+i*c[j]}},constructStiched:function(a,b,d){var f=b.get("Domain");f||c("No domain");var g=f.length/2;1!==g&&c("Bad domain for stiched function");for(var h=b.get("Functions"),i=[],j=0,k=h.length;k>j;++j)i.push(Ta.getIR(d,d.fetchIfRef(h[j])));var l=b.get("Bounds"),m=b.get("Encode");return[e,f,l,m,i]},constructStichedFromIR:function(a){for(var b=a[1],c=a[2],d=a[3],e=a[4],f=[],g=new Float32Array(1),h=0,i=e.length;i>h;h++)f.push(Ta.fromIR(e[h]));return function(a,e,h,i){for(var j=function(a,b,c){return a>c?a=c:b>a&&(a=b),a},k=j(a[e],b[0],b[1]),l=0,m=c.length;m>l&&!(k0&&(n=c[l-1]);var o=b[1];l>1,h=c.length>>1,i=new Va(e),j={},k=8192,l=k,m=new Float32Array(h);return function(a,b,c,e){var f,k,n="",o=m;for(f=0;h>f;f++)k=a[b+f],o[f]=k,n+=k+"_";var p=j[n];if(void 0!==p)return void c.set(p,e);var q=new Float32Array(g),r=i.execute(o),s=r.length-g;for(f=0;g>f;f++){k=r[s+f];var t=d[2*f];t>k?k=t:(t=d[2*f+1],k>t&&(k=t)),q[f]=k}l>0&&(l--,j[n]=q),c.set(q,e)}}}}(),Ua=function(){function a(a){this.stack=a?Array.prototype.slice.call(a,0):[]}var b=100;return a.prototype={push:function(a){this.stack.length>=b&&c("PostScript function stack overflow."),this.stack.push(a)},pop:function(){return this.stack.length<=0&&c("PostScript function stack underflow."),this.stack.pop()},copy:function(a){this.stack.length+a>=b&&c("PostScript function stack overflow.");for(var d=this.stack,e=d.length-a,f=a-1;f>=0;f--,e++)d.push(d[e])},index:function(a){this.push(this.stack[this.stack.length-a-1])},roll:function(a,b){var c,d,e,f=this.stack,g=f.length-a,h=f.length-1,i=g+(b-Math.floor(b/a)*a);for(c=g,d=h;d>c;c++,d--)e=f[c],f[c]=f[d],f[d]=e;for(c=g,d=i-1;d>c;c++,d--)e=f[c],f[c]=f[d],f[d]=e;for(c=i,d=h;d>c;c++,d--)e=f[c],f[c]=f[d],f[d]=e}},a}(),Va=function(){function a(a){this.operators=a}return a.prototype={execute:function(a){for(var b,d,e,f=new Ua(a),g=0,h=this.operators,i=h.length;i>g;)if(b=h[g++],"number"!=typeof b)switch(b){case"jz":e=f.pop(),d=f.pop(),d||(g=e);break;case"j":d=f.pop(),g=d;break;case"abs":d=f.pop(),f.push(Math.abs(d));break;case"add":e=f.pop(),d=f.pop(),f.push(d+e);break;case"and":e=f.pop(),d=f.pop(),v(d)&&v(e)?f.push(d&&e):f.push(d&e);break;case"atan":d=f.pop(),f.push(Math.atan(d));break;case"bitshift":e=f.pop(),d=f.pop(),d>0?f.push(d<>e);break;case"ceiling":d=f.pop(),f.push(Math.ceil(d));break;case"copy":d=f.pop(),f.copy(d);break;case"cos":d=f.pop(),f.push(Math.cos(d));break;case"cvi":d=0|f.pop(),f.push(d);break;case"cvr":break;case"div":e=f.pop(),d=f.pop(),f.push(d/e);break;case"dup":f.copy(1);break;case"eq":e=f.pop(),d=f.pop(),f.push(d===e);break;case"exch":f.roll(2,1);break;case"exp":e=f.pop(),d=f.pop(),f.push(Math.pow(d,e));break;case"false":f.push(!1);break;case"floor":d=f.pop(),f.push(Math.floor(d));break;case"ge":e=f.pop(),d=f.pop(),f.push(d>=e);break;case"gt":e=f.pop(),d=f.pop(),f.push(d>e);break;case"idiv":e=f.pop(),d=f.pop(),f.push(d/e|0);break;case"index":d=f.pop(),f.index(d);break;case"le":e=f.pop(),d=f.pop(),f.push(e>=d);break;case"ln":d=f.pop(),f.push(Math.log(d));break;case"log":d=f.pop(),f.push(Math.log(d)/Math.LN10);break;case"lt":e=f.pop(),d=f.pop(),f.push(e>d);break;case"mod":e=f.pop(),d=f.pop(),f.push(d%e);break;case"mul":e=f.pop(),d=f.pop(),f.push(d*e);break;case"ne":e=f.pop(),d=f.pop(),f.push(d!==e);break;case"neg":d=f.pop(),f.push(-d);break;case"not":d=f.pop(),v(d)?f.push(!d):f.push(~d);break;case"or":e=f.pop(),d=f.pop(),v(d)&&v(e)?f.push(d||e):f.push(d|e);break;case"pop":f.pop();break;case"roll":e=f.pop(),d=f.pop(),f.roll(d,e);break;case"round":d=f.pop(),f.push(Math.round(d));break;case"sin":d=f.pop(),f.push(Math.sin(d));break;case"sqrt":d=f.pop(),f.push(Math.sqrt(d));break;case"sub":e=f.pop(),d=f.pop(),f.push(d-e);break;case"true":f.push(!0);break;case"truncate":d=f.pop(),d=0>d?Math.ceil(d):Math.floor(d),f.push(d);break;case"xor":e=f.pop(),d=f.pop(),v(d)&&v(e)?f.push(d!==e):f.push(d^e);break;default:c("Unknown operator "+b)}else f.push(b);return f.stack}},a}(),Wa=function(){function a(a){this.type=a}function b(b,c,d){a.call(this,"args"),this.index=b,this.min=c,this.max=d}function c(b){a.call(this,"literal"),this.number=b,this.min=b,this.max=b}function d(b,c,d,e,f){a.call(this,"binary"),this.op=b,this.arg1=c,this.arg2=d,this.min=e,this.max=f}function e(b,c){a.call(this,"max"),this.arg=b,this.min=b.min,this.max=c}function f(b,c,d){a.call(this,"var"),this.index=b,this.min=c,this.max=d}function g(b,c){a.call(this,"definition"),this.variable=b,this.arg=c}function h(){this.parts=[]}function i(a,b){return"literal"===b.type&&0===b.number?a:"literal"===a.type&&0===a.number?b:"literal"===b.type&&"literal"===a.type?new c(a.number+b.number):new d("+",a,b,a.min+b.min,a.max+b.max)}function j(a,b){if("literal"===b.type){if(0===b.number)return new c(0);if(1===b.number)return a;if("literal"===a.type)return new c(a.number*b.number)}if("literal"===a.type){if(0===a.number)return new c(0);if(1===a.number)return b}var e=Math.min(a.min*b.min,a.min*b.max,a.max*b.min,a.max*b.max),f=Math.max(a.min*b.min,a.min*b.max,a.max*b.min,a.max*b.max);return new d("*",a,b,e,f)}function k(a,b){if("literal"===b.type){if(0===b.number)return a;if("literal"===a.type)return new c(a.number-b.number)}return"binary"===b.type&&"-"===b.op&&"literal"===a.type&&1===a.number&&"literal"===b.arg1.type&&1===b.arg1.number?b.arg2:new d("-",a,b,a.min-b.max,a.max-b.min)}function l(a,b){return a.min>=b?new c(b):a.max<=b?a:new e(a,b)}function m(){}return a.prototype.visit=function(a){throw new Error("abstract method")},b.prototype=Object.create(a.prototype),b.prototype.visit=function(a){a.visitArgument(this)},c.prototype=Object.create(a.prototype),c.prototype.visit=function(a){a.visitLiteral(this)},d.prototype=Object.create(a.prototype),d.prototype.visit=function(a){a.visitBinaryOperation(this)},e.prototype=Object.create(a.prototype),e.prototype.visit=function(a){a.visitMin(this)},f.prototype=Object.create(a.prototype),f.prototype.visit=function(a){a.visitVariable(this)},g.prototype=Object.create(a.prototype),g.prototype.visit=function(a){a.visitVariableDefinition(this)},h.prototype={visitArgument:function(a){this.parts.push("Math.max(",a.min,", Math.min(",a.max,", src[srcOffset + ",a.index,"]))")},visitVariable:function(a){this.parts.push("v",a.index)},visitLiteral:function(a){this.parts.push(a.number)},visitBinaryOperation:function(a){this.parts.push("("),a.arg1.visit(this),this.parts.push(" ",a.op," "),a.arg2.visit(this),this.parts.push(")")},visitVariableDefinition:function(a){this.parts.push("var "),a.variable.visit(this),this.parts.push(" = "),a.arg.visit(this),this.parts.push(";")},visitMin:function(a){this.parts.push("Math.min("),a.arg.visit(this),this.parts.push(", ",a.max,")")},toString:function(){return this.parts.join("")}},m.prototype={compile:function(a,d,e){var m,n,o,p,q,r,s,t,u,v,w=[],x=[],y=d.length>>1,z=e.length>>1,A=0;for(m=0;y>m;m++)w.push(new b(m,d[2*m],d[2*m+1]));for(m=0,n=a.length;n>m;m++)if(v=a[m],"number"!=typeof v)switch(v){case"add":if(w.length<2)return null;r=w.pop(),q=w.pop(),w.push(i(q,r));break;case"cvr":if(w.length<1)return null;break;case"mul":if(w.length<2)return null;r=w.pop(),q=w.pop(),w.push(j(q,r));break;case"sub":if(w.length<2)return null;r=w.pop(),q=w.pop(),w.push(k(q,r));break;case"exch":if(w.length<2)return null;s=w.pop(),t=w.pop(),w.push(s,t);break;case"pop":if(w.length<1)return null;w.pop();break;case"index":if(w.length<1)return null;if(q=w.pop(),"literal"!==q.type)return null;if(o=q.number,0>o||(0|o)!==o||w.length=o||(0|o)!==o||(0|p)!==p||w.lengtha.min&&(g.unshift("Math.max(",d,", "),g.push(")")),fn&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){var p,q=8>=g?new Uint8Array(n):new Uint16Array(n);for(j=0;n>j;j++)q[j]=j;var r=new Uint8Array(3*n);this.getRgbBuffer(q,0,n,r,0,g,0);var s,t;if(o)for(m=new Uint8Array(3*l),t=0,j=0;l>j;++j)p=3*h[j],m[t++]=r[p],m[t++]=r[p+1],m[t++]=r[p+2];else for(s=0,j=0;l>j;++j)p=3*h[j],a[s++]=r[p],a[s++]=r[p+1],a[s++]=r[p+2],s+=i}else o?(m=new Uint8Array(3*l),this.getRgbBuffer(h,0,l,m,0,g,0)):this.getRgbBuffer(h,0,d*f,a,0,g,i);if(m)if(o)Bc.resize(m,g,3,b,c,d,e,a,i);else for(t=0,s=0,j=0,k=d*f;k>j;j++)a[s++]=m[t++],a[s++]=m[t++],a[s++]=m[t++],s+=i},usesZeroToOneRange:!0},a.parse=function(b,c,d){var e=a.parseToIR(b,c,d);return e instanceof Ya?e:a.fromIR(e)},a.fromIR=function(b){var d,e,f,g=C(b)?b[0]:b;switch(g){case"DeviceGrayCS":return this.singletons.gray;case"DeviceRgbCS":return this.singletons.rgb;case"DeviceCmykCS":return this.singletons.cmyk;case"CalGrayCS":return d=b[1].WhitePoint,e=b[1].BlackPoint,f=b[1].Gamma,new cb(d,e,f);case"CalRGBCS":d=b[1].WhitePoint,e=b[1].BlackPoint,f=b[1].Gamma;var h=b[1].Matrix;return new db(d,e,f,h);case"PatternCS":var i=b[1];return i&&(i=a.fromIR(i)),new Za(i);case"IndexedCS":var j=b[1],k=b[2],l=b[3];return new $a(a.fromIR(j),k,l);case"AlternateCS":var m=b[1],n=b[2],o=b[3];return new Ya(m,a.fromIR(n),Ta.fromIR(o));case"LabCS":d=b[1].WhitePoint,e=b[1].BlackPoint;var p=b[1].Range;return new eb(d,e,p);default:c("Unknown name "+g)}return null},a.parseToIR=function(d,e,f){if(z(d)){var g=f.get("ColorSpace");if(B(g)){var h=g.get(d.name);h&&(d=h)}}d=e.fetchIfRef(d);var i;if(z(d))switch(i=d.name,this.mode=i,i){case"DeviceGray":case"G":return"DeviceGrayCS";case"DeviceRGB":case"RGB":return"DeviceRgbCS";case"DeviceCMYK":case"CMYK":return"DeviceCmykCS";case"Pattern":return["PatternCS",null];default:c("unrecognized colorspace "+i)}else if(C(d)){i=e.fetchIfRef(d[0]).name,this.mode=i;var j,k,l;switch(i){case"DeviceGray":case"G":return"DeviceGrayCS";case"DeviceRGB":case"RGB":return"DeviceRgbCS";case"DeviceCMYK":case"CMYK":return"DeviceCmykCS";case"CalGray":return k=e.fetchIfRef(d[1]).getAll(),["CalGrayCS",k];case"CalRGB":return k=e.fetchIfRef(d[1]).getAll(),["CalRGBCS",k];case"ICCBased":var m=e.fetchIfRef(d[1]),n=m.dict;if(j=n.get("N"),l=n.get("Alternate")){var o=a.parseToIR(l,e,f),p=a.fromIR(o);if(p.numComps===j)return o;b("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(1===j)return"DeviceGrayCS";if(3===j)return"DeviceRgbCS";if(4===j)return"DeviceCmykCS";break;case"Pattern":var q=d[1]||null;return q&&(q=a.parseToIR(q,e,f)),["PatternCS",q];case"Indexed":case"I":var r=a.parseToIR(d[1],e,f),s=e.fetchIfRef(d[2])+1,t=e.fetchIfRef(d[3]);return D(t)&&(t=t.getBytes()),["IndexedCS",r,s,t];case"Separation":case"DeviceN":var u=e.fetchIfRef(d[1]);j=1,z(u)?j=1:C(u)&&(j=u.length),l=a.parseToIR(d[2],e,f);var v=Ta.getIR(e,e.fetchIfRef(d[3]));return["AlternateCS",j,l,v];case"Lab":return k=e.fetchIfRef(d[1]).getAll(),["LabCS",k];default:c('unimplemented color space object "'+i+'"')}}else c('unrecognized color space object: "'+d+'"');return null},a.isDefaultDecode=function(a,c){if(!C(a))return!0;if(2*c!==a.length)return b("The decode map is not the correct length"),!0;for(var d=0,e=a.length;e>d;d+=2)if(0!==a[d]||1!==a[d+1])return!1;return!0},a.singletons={get gray(){return g(this,"gray",new _a)},get rgb(){return g(this,"rgb",new ab)},get cmyk(){return g(this,"cmyk",new bb)}},a}(),Ya=function(){function a(a,b,c){this.name="Alternate",this.numComps=a,this.defaultColor=new Float32Array(a);for(var d=0;a>d;++d)this.defaultColor[d]=1;this.base=b,this.tintFn=c,this.tmpBuf=new Float32Array(b.numComps)}return a.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){var e=this.tmpBuf;this.tintFn(a,b,e,0),this.base.getRgbItem(e,0,c,d)},getRgbBuffer:function(a,b,c,d,e,f,g){var h,i,j=this.tintFn,k=this.base,l=1/((1<h;h++){for(i=0;r>i;i++)s[i]=a[b++]*l;for(j(s,0,t,0),i=0;m>i;i++)q[p++]=255*t[i]}else for(h=0;c>h;h++){for(i=0;r>i;i++)s[i]=a[b++]*l;j(s,0,t,0),k.getRgbItem(t,0,q,p),p+=m}o||k.getRgbBuffer(q,0,c,d,e,8,g)},getOutputLength:function(a,b){return this.base.getOutputLength(a*this.base.numComps/this.numComps,b)},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},a}(),Za=function(){function a(a){this.name="Pattern",this.base=a}return a.prototype={},a}(),$a=function(){function a(a,b,d){this.name="Indexed",this.numComps=1,this.defaultColor=new Uint8Array([0]),this.base=a,this.highVal=b;var e,f=a.numComps,g=f*b;if(D(d)){e=new Uint8Array(g);var h=d.getBytes(g);e.set(h)}else if(y(d)){e=new Uint8Array(g);for(var i=0;g>i;++i)e[i]=d.charCodeAt(i)}else d instanceof Uint8Array||d instanceof Array?e=d:c("Unrecognized lookup table: "+d);this.lookup=e}return a.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){var e=this.base.numComps,f=a[b]*e;this.base.getRgbItem(this.lookup,f,c,d)},getRgbBuffer:function(a,b,c,d,e,f,g){for(var h=this.base,i=h.numComps,j=h.getOutputLength(i,g),k=this.lookup,l=0;c>l;++l){var m=a[b++]*i;h.getRgbBuffer(k,m,1,d,e,8,g),e+=j}},getOutputLength:function(a,b){return this.base.getOutputLength(a*this.base.numComps,b)},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return!0},usesZeroToOneRange:!0},a}(),_a=function(){function a(){this.name="DeviceGray",this.numComps=1,this.defaultColor=new Float32Array([0])}return a.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){var e=255*a[b]|0;e=0>e?0:e>255?255:e,c[d]=c[d+1]=c[d+2]=e},getRgbBuffer:function(a,b,c,d,e,f,g){for(var h=255/((1<k;++k){var l=h*a[i++]|0;d[j++]=l,d[j++]=l,d[j++]=l,j+=g}},getOutputLength:function(a,b){return a*(3+b)},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},a}(),ab=function(){function a(){this.name="DeviceRGB",this.numComps=3,this.defaultColor=new Float32Array([0,0,0])}return a.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){var e=255*a[b]|0,f=255*a[b+1]|0,g=255*a[b+2]|0;c[d]=0>e?0:e>255?255:e,c[d+1]=0>f?0:f>255?255:f,c[d+2]=0>g?0:g>255?255:g},getRgbBuffer:function(a,b,c,d,e,f,g){if(8===f&&0===g)return void d.set(a.subarray(b,b+3*c),e);for(var h=255/((1<k;++k)d[j++]=h*a[i++]|0,d[j++]=h*a[i++]|0,d[j++]=h*a[i++]|0,j+=g},getOutputLength:function(a,b){return a*(3+b)/3|0},isPassthrough:function(a){return 8===a},fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},a}(),bb=function(){function a(a,b,c,d,e){var f=a[b+0]*c,g=a[b+1]*c,h=a[b+2]*c,i=a[b+3]*c,j=f*(-4.387332384609988*f+54.48615194189176*g+18.82290502165302*h+212.25662451639585*i+-285.2331026137004)+g*(1.7149763477362134*g-5.6096736904047315*h+-17.873870861415444*i-5.497006427196366)+h*(-2.5217340131683033*h-21.248923337353073*i+17.5119270841813)+i*(-21.86122147463605*i-189.48180835922747)+255|0,k=f*(8.841041422036149*f+60.118027045597366*g+6.871425592049007*h+31.159100130055922*i+-79.2970844816548)+g*(-15.310361306967817*g+17.575251261109482*h+131.35250912493976*i-190.9453302588951)+h*(4.444339102852739*h+9.8632861493405*i-24.86741582555878)+i*(-20.737325471181034*i-187.80453709719578)+255|0,l=f*(.8842522430003296*f+8.078677503112928*g+30.89978309703729*h-.23883238689178934*i+-14.183576799673286)+g*(10.49593273432072*g+63.02378494754052*h+50.606957656360734*i-112.23884253719248)+h*(.03296041114873217*h+115.60384449646641*i+-193.58209356861505)+i*(-22.33816807309886*i-180.12613974708367)+255|0;d[e]=j>255?255:0>j?0:j,d[e+1]=k>255?255:0>k?0:k,d[e+2]=l>255?255:0>l?0:l}function b(){this.name="DeviceCMYK",this.numComps=4,this.defaultColor=new Float32Array([0,0,0,1])}return b.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(b,c,d,e){a(b,c,1,d,e)},getRgbBuffer:function(b,c,d,e,f,g,h){for(var i=1/((1<j;j++)a(b,c,i,e,f),c+=4,f+=3+h},getOutputLength:function(a,b){return a/4*(3+b)|0},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},b}(),cb=function(){function d(d,e,f){this.name="CalGray",this.numComps=1,this.defaultColor=new Float32Array([0]),d||c("WhitePoint missing - required for color space CalGray"),e=e||[0,0,0],f=f||1,this.XW=d[0],this.YW=d[1],this.ZW=d[2],this.XB=e[0],this.YB=e[1],this.ZB=e[2],this.G=f,(this.XW<0||this.ZW<0||1!==this.YW)&&c("Invalid WhitePoint components for "+this.name+", no fallback available"),(this.XB<0||this.YB<0||this.ZB<0)&&(a("Invalid BlackPoint for "+this.name+", falling back to default"),this.XB=this.YB=this.ZB=0),0===this.XB&&0===this.YB&&0===this.ZB||b(this.name+", BlackPoint: XB: "+this.XB+", YB: "+this.YB+", ZB: "+this.ZB+", only default values are supported."),this.G<1&&(a("Invalid Gamma: "+this.G+" for "+this.name+", falling back to default"),this.G=1)}function e(a,b,c,d,e,f){var g=b[c]*f,h=Math.pow(g,a.G),i=a.YW*h,j=0|Math.max(295.8*Math.pow(i,.3333333333333333)-40.8,0);d[e]=j,d[e+1]=j,d[e+2]=j}return d.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){e(this,a,b,c,d,1)},getRgbBuffer:function(a,b,c,d,f,g,h){for(var i=1/((1<j;++j)e(this,a,b,d,f,i),b+=1,f+=3+h},getOutputLength:function(a,b){return a*(3+b)},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},d}(),db=function(){function b(b,d,e,f){this.name="CalRGB",this.numComps=3,this.defaultColor=new Float32Array(3),b||c("WhitePoint missing - required for color space CalRGB"),d=d||new Float32Array(3),e=e||new Float32Array([1,1,1]),f=f||new Float32Array([1,0,0,0,1,0,0,0,1]);var g=b[0],h=b[1],i=b[2];this.whitePoint=b;var j=d[0],k=d[1],l=d[2];this.blackPoint=d,this.GR=e[0],this.GG=e[1],this.GB=e[2],this.MXA=f[0],this.MYA=f[1],this.MZA=f[2],this.MXB=f[3],this.MYB=f[4],this.MZB=f[5],this.MXC=f[6],this.MYC=f[7],this.MZC=f[8],(0>g||0>i||1!==h)&&c("Invalid WhitePoint components for "+this.name+", no fallback available"),(0>j||0>k||0>l)&&(a("Invalid BlackPoint for "+this.name+" ["+j+", "+k+", "+l+"], falling back to default"),this.blackPoint=new Float32Array(3)),(this.GR<0||this.GG<0||this.GB<0)&&(a("Invalid Gamma ["+this.GR+", "+this.GG+", "+this.GB+"] for "+this.name+", falling back to default"),this.GR=this.GG=this.GB=1),(this.MXA<0||this.MYA<0||this.MZA<0||this.MXB<0||this.MYB<0||this.MZB<0||this.MXC<0||this.MYC<0||this.MZC<0)&&(a("Invalid Matrix for "+this.name+" ["+this.MXA+", "+this.MYA+", "+this.MZA+this.MXB+", "+this.MYB+", "+this.MZB+this.MXC+", "+this.MYC+", "+this.MZC+"], falling back to default"),this.MXA=this.MYB=this.MZC=1,this.MXB=this.MYA=this.MZA=this.MXC=this.MYC=this.MZB=0)}function d(a,b,c){c[0]=a[0]*b[0]+a[1]*b[1]+a[2]*b[2],c[1]=a[3]*b[0]+a[4]*b[1]+a[5]*b[2],c[2]=a[6]*b[0]+a[7]*b[1]+a[8]*b[2]}function e(a,b,c){c[0]=1*b[0]/a[0],c[1]=1*b[1]/a[1],c[2]=1*b[2]/a[2]}function f(a,b,c){var d=.95047,e=1,f=1.08883;c[0]=b[0]*d/a[0],c[1]=b[1]*e/a[1],c[2]=b[2]*f/a[2]}function g(a){return.0031308>=a?h(0,1,12.92*a):h(0,1,1.055*Math.pow(a,1/2.4)-.055)}function h(a,b,c){return Math.max(a,Math.min(b,c))}function i(a){return 0>a?-i(-a):a>8?Math.pow((a+16)/116,3):a*u}function j(a,b,c){if(0===a[0]&&0===a[1]&&0===a[2])return c[0]=b[0],c[1]=b[1],void(c[2]=b[2]);var d=i(0),e=d,f=i(a[0]),g=d,h=i(a[1]),j=d,k=i(a[2]),l=(1-e)/(1-f),m=1-l,n=(1-g)/(1-h),o=1-n,p=(1-j)/(1-k),q=1-p;c[0]=b[0]*l+m,c[1]=b[1]*n+o,c[2]=b[2]*p+q}function k(a,b,c){if(1===a[0]&&1===a[2])return c[0]=b[0],c[1]=b[1],void(c[2]=b[2]);var f=c;d(n,b,f);var g=r;e(a,f,g),d(o,g,c)}function l(a,b,c){var e=c;d(n,b,e);var g=r;f(a,e,g),d(o,g,c)}function m(a,b,c,e,f,i){var m=h(0,1,b[c]*i),n=h(0,1,b[c+1]*i),o=h(0,1,b[c+2]*i),r=Math.pow(m,a.GR),u=Math.pow(n,a.GG),v=Math.pow(o,a.GB),w=a.MXA*r+a.MXB*u+a.MXC*v,x=a.MYA*r+a.MYB*u+a.MYC*v,y=a.MZA*r+a.MZB*u+a.MZC*v,z=s;z[0]=w,z[1]=x,z[2]=y;var A=t;k(a.whitePoint,z,A);var B=s;j(a.blackPoint,A,B);var C=t;l(q,B,C);var D=s;d(p,C,D);var E=g(D[0]),F=g(D[1]),G=g(D[2]);e[f]=Math.round(255*E),e[f+1]=Math.round(255*F),e[f+2]=Math.round(255*G)}var n=new Float32Array([.8951,.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296]),o=new Float32Array([.9869929,-.1470543,.1599627,.4323053,.5183603,.0492912,-.0085287,.0400428,.9684867]),p=new Float32Array([3.2404542,-1.5371385,-.4985314,-.969266,1.8760108,.041556,.0556434,-.2040259,1.0572252]),q=new Float32Array([1,1,1]),r=new Float32Array(3),s=new Float32Array(3),t=new Float32Array(3),u=Math.pow(24/116,3)/8;return b.prototype={getRgb:function(a,b){var c=new Uint8Array(3);return this.getRgbItem(a,b,c,0),c},getRgbItem:function(a,b,c,d){m(this,a,b,c,d,1)},getRgbBuffer:function(a,b,c,d,e,f,g){for(var h=1/((1<i;++i)m(this,a,b,d,e,h),b+=3,e+=3+g},getOutputLength:function(a,b){return a*(3+b)/3|0},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return Xa.isDefaultDecode(a,this.numComps)},usesZeroToOneRange:!0},b}(),eb=function(){function b(b,d,e){this.name="Lab",this.numComps=3,this.defaultColor=new Float32Array([0,0,0]),b||c("WhitePoint missing - required for color space Lab"),d=d||[0,0,0],e=e||[-100,100,-100,100],this.XW=b[0],this.YW=b[1],this.ZW=b[2],this.amin=e[0],this.amax=e[1],this.bmin=e[2],this.bmax=e[3],this.XB=d[0],this.YB=d[1],this.ZB=d[2],(this.XW<0||this.ZW<0||1!==this.YW)&&c("Invalid WhitePoint components, no fallback available"),(this.XB<0||this.YB<0||this.ZB<0)&&(a("Invalid BlackPoint, falling back to default"),this.XB=this.YB=this.ZB=0),(this.amin>this.amax||this.bmin>this.bmax)&&(a("Invalid Range, falling back to defaults"),this.amin=-100,this.amax=100,this.bmin=-100,this.bmax=100)}function d(a){return a>=6/29?a*a*a:108/841*(a-4/29)}function e(a,b,c,d){return c+a*(d-c)/b}function f(a,b,c,f,g,h){var i=b[c],j=b[c+1],k=b[c+2];f!==!1&&(i=e(i,f,0,100),j=e(j,f,a.amin,a.amax),k=e(k,f,a.bmin,a.bmax)),j=j>a.amax?a.amax:ja.bmax?a.bmax:k=l?0:l>=1?255:255*Math.sqrt(l)|0,g[h+1]=0>=m?0:m>=1?255:255*Math.sqrt(m)|0,g[h+2]=0>=n?0:n>=1?255:255*Math.sqrt(n)|0}return b.prototype={getRgb:Xa.prototype.getRgb,getRgbItem:function(a,b,c,d){f(this,a,b,!1,c,d)},getRgbBuffer:function(a,b,c,d,e,g,h){for(var i=(1<j;j++)f(this,a,b,i,d,e),b+=3,e+=3+h},getOutputLength:function(a,b){return a*(3+b)/3|0},isPassthrough:Xa.prototype.isPassthrough,fillRgb:Xa.prototype.fillRgb,isDefaultDecode:function(a){return!0},usesZeroToOneRange:!1},b}(),fb=function(){function a(a){this.a=0,this.b=0;var b,c,d=new Uint8Array(256),e=0,f=a.length;for(b=0;256>b;++b)d[b]=b;for(b=0;256>b;++b)c=d[b],e=e+c+a[b%f]&255,d[b]=d[e],d[e]=c;this.s=d}return a.prototype={encryptBlock:function(a){var b,c,d,e=a.length,f=this.a,g=this.b,h=this.s,i=new Uint8Array(e);for(b=0;e>b;++b)f=f+1&255,c=h[f],g=g+c&255,d=h[g],h[f]=d,h[g]=c,i[b]=a[b]^h[c+d&255];return this.a=f,this.b=g,i}},a.prototype.decryptBlock=a.prototype.encryptBlock,a}(),gb=function(){function a(a,d,e){var f,g,h,i=1732584193,j=-271733879,k=-1732584194,l=271733878,m=e+72&-64,n=new Uint8Array(m);for(f=0;e>f;++f)n[f]=a[d++];for(n[f++]=128,h=m-8;h>f;)n[f++]=0;n[f++]=e<<3&255,n[f++]=e>>5&255,n[f++]=e>>13&255,n[f++]=e>>21&255,n[f++]=e>>>29&255,n[f++]=0,n[f++]=0,n[f++]=0;var o=new Int32Array(16);for(f=0;m>f;){for(g=0;16>g;++g,f+=4)o[g]=n[f]|n[f+1]<<8|n[f+2]<<16|n[f+3]<<24;var p,q,r=i,s=j,t=k,u=l;for(g=0;64>g;++g){16>g?(p=s&t|~s&u,q=g):32>g?(p=u&s|~u&t,q=5*g+1&15):48>g?(p=s^t^u,q=3*g+5&15):(p=t^(s|~u),q=7*g&15);var v=u,w=r+p+c[g]+o[q]|0,x=b[g];u=t,t=s,s=s+(w<>>32-x)|0,r=v}i=i+r|0,j=j+s|0,k=k+t|0,l=l+u|0}return new Uint8Array([255&i,i>>8&255,i>>16&255,i>>>24&255,255&j,j>>8&255,j>>16&255,j>>>24&255,255&k,k>>8&255,k>>16&255,k>>>24&255,255&l,l>>8&255,l>>16&255,l>>>24&255])}var b=new Uint8Array([7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21]),c=new Int32Array([-680876936,-389564586,606105819,-1044525330,-176418897,1200080426,-1473231341,-45705983,1770035416,-1958414417,-42063,-1990404162,1804603682,-40341101,-1502002290,1236535329,-165796510,-1069501632,643717713,-373897302,-701558691,38016083,-660478335,-405537848,568446438,-1019803690,-187363961,1163531501,-1444681467,-51403784,1735328473,-1926607734,-378558,-2022574463,1839030562,-35309556,-1530992060,1272893353,-155497632,-1094730640,681279174,-358537222,-722521979,76029189,-640364487,-421815835,530742520,-995338651,-198630844,1126891415,-1416354905,-57434055,1700485571,-1894986606,-1051523,-2054922799,1873313359,-30611744,-1560198380,1309151649,-145523070,-1120210379,718787259,-343485551]);return a}(),hb=function(){function a(a,b){this.high=0|a,this.low=0|b}return a.prototype={and:function(a){this.high&=a.high,this.low&=a.low},xor:function(a){this.high^=a.high,this.low^=a.low},or:function(a){this.high|=a.high,this.low|=a.low},shiftRight:function(a){a>=32?(this.low=this.high>>>a-32|0,this.high=0):(this.low=this.low>>>a|this.high<<32-a,this.high=this.high>>>a|0)},shiftLeft:function(a){a>=32?(this.high=this.low<>>32-a,this.low=this.low<>>a|c<<32-a,this.high=c>>>a|b<<32-a},not:function(){this.high=~this.high,this.low=~this.low},add:function(a){var b=(this.low>>>0)+(a.low>>>0),c=(this.high>>>0)+(a.high>>>0);b>4294967295&&(c+=1),this.low=0|b,this.high=0|c},copyTo:function(a,b){a[b]=this.high>>>24&255,a[b+1]=this.high>>16&255,a[b+2]=this.high>>8&255,a[b+3]=255&this.high,a[b+4]=this.low>>>24&255,a[b+5]=this.low>>16&255,a[b+6]=this.low>>8&255,a[b+7]=255&this.low},assign:function(a){this.high=a.high,this.low=a.low}},a}(),ib=function(){function a(a,b){return a>>>b|a<<32-b}function b(a,b,c){return a&b^~a&c}function c(a,b,c){return a&b^a&c^b&c}function d(b){return a(b,2)^a(b,13)^a(b,22)}function e(b){return a(b,6)^a(b,11)^a(b,25)}function f(b){return a(b,7)^a(b,18)^b>>>3}function g(b){return a(b,17)^a(b,19)^b>>>10}function h(a,h,j){var k,l,m,n=1779033703,o=3144134277,p=1013904242,q=2773480762,r=1359893119,s=2600822924,t=528734635,u=1541459225,v=64*Math.ceil((j+9)/64),w=new Uint8Array(v);for(k=0;j>k;++k)w[k]=a[h++];for(w[k++]=128,m=v-8;m>k;)w[k++]=0;w[k++]=0,w[k++]=0,w[k++]=0,w[k++]=j>>>29&255,w[k++]=j>>21&255,w[k++]=j>>13&255,w[k++]=j>>5&255,w[k++]=j<<3&255;var x=new Uint32Array(64);for(k=0;v>k;){for(l=0;16>l;++l)x[l]=w[k]<<24|w[k+1]<<16|w[k+2]<<8|w[k+3],k+=4;for(l=16;64>l;++l)x[l]=g(x[l-2])+x[l-7]+f(x[l-15])+x[l-16]|0;var y,z,A=n,B=o,C=p,D=q,E=r,F=s,G=t,H=u;for(l=0;64>l;++l)y=H+e(E)+b(E,F,G)+i[l]+x[l],z=d(A)+c(A,B,C),H=G,G=F,F=E,E=D+y|0,D=C,C=B,B=A,A=y+z|0;n=n+A|0,o=o+B|0,p=p+C|0,q=q+D|0,r=r+E|0,s=s+F|0,t=t+G|0,u=u+H|0}return new Uint8Array([n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,p>>24&255,p>>16&255,p>>8&255,255&p,q>>24&255,q>>16&255,q>>8&255,255&q,r>>24&255,r>>16&255,r>>8&255,255&r,s>>24&255,s>>16&255,s>>8&255,255&s,t>>24&255,t>>16&255,t>>8&255,255&t,u>>24&255,u>>16&255,u>>8&255,255&u]); -}var i=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];return h}(),jb=function(){function a(a,b,c,d,e){a.assign(b),a.and(c),e.assign(b),e.not(),e.and(d),a.xor(e)}function b(a,b,c,d,e){a.assign(b),a.and(c),e.assign(b),e.and(d),a.xor(e),e.assign(c),e.and(d),a.xor(e)}function c(a,b,c){a.assign(b),a.rotateRight(28),c.assign(b),c.rotateRight(34),a.xor(c),c.assign(b),c.rotateRight(39),a.xor(c)}function d(a,b,c){a.assign(b),a.rotateRight(14),c.assign(b),c.rotateRight(18),a.xor(c),c.assign(b),c.rotateRight(41),a.xor(c)}function e(a,b,c){a.assign(b),a.rotateRight(1),c.assign(b),c.rotateRight(8),a.xor(c),c.assign(b),c.shiftRight(7),a.xor(c)}function f(a,b,c){a.assign(b),a.rotateRight(19),c.assign(b),c.rotateRight(61),a.xor(c),c.assign(b),c.shiftRight(6),a.xor(c)}function g(g,i,j,k){k=!!k;var l,m,n,o,p,q,r,s;k?(l=new hb(3418070365,3238371032),m=new hb(1654270250,914150663),n=new hb(2438529370,812702999),o=new hb(355462360,4144912697),p=new hb(1731405415,4290775857),q=new hb(2394180231,1750603025),r=new hb(3675008525,1694076839),s=new hb(1203062813,3204075428)):(l=new hb(1779033703,4089235720),m=new hb(3144134277,2227873595),n=new hb(1013904242,4271175723),o=new hb(2773480762,1595750129),p=new hb(1359893119,2917565137),q=new hb(2600822924,725511199),r=new hb(528734635,4215389547),s=new hb(1541459225,327033209));var t,u,v,w=128*Math.ceil((j+17)/128),x=new Uint8Array(w);for(t=0;j>t;++t)x[t]=g[i++];for(x[t++]=128,v=w-16;v>t;)x[t++]=0;x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=0,x[t++]=j>>>29&255,x[t++]=j>>21&255,x[t++]=j>>13&255,x[t++]=j>>5&255,x[t++]=j<<3&255;var y=new Array(80);for(t=0;80>t;t++)y[t]=new hb(0,0);var z,A=new hb(0,0),B=new hb(0,0),C=new hb(0,0),D=new hb(0,0),E=new hb(0,0),F=new hb(0,0),G=new hb(0,0),H=new hb(0,0),I=new hb(0,0),J=new hb(0,0),K=new hb(0,0),L=new hb(0,0);for(t=0;w>t;){for(u=0;16>u;++u)y[u].high=x[t]<<24|x[t+1]<<16|x[t+2]<<8|x[t+3],y[u].low=x[t+4]<<24|x[t+5]<<16|x[t+6]<<8|x[t+7],t+=8;for(u=16;80>u;++u)z=y[u],f(z,y[u-2],L),z.add(y[u-7]),e(K,y[u-15],L),z.add(K),z.add(y[u-16]);for(A.assign(l),B.assign(m),C.assign(n),D.assign(o),E.assign(p),F.assign(q),G.assign(r),H.assign(s),u=0;80>u;++u)I.assign(H),d(K,E,L),I.add(K),a(K,E,F,G,L),I.add(K),I.add(h[u]),I.add(y[u]),c(J,A,L),b(K,A,B,C,L),J.add(K),z=H,H=G,G=F,F=E,D.add(I),E=D,D=C,C=B,B=A,z.assign(I),z.add(J),A=z;l.add(A),m.add(B),n.add(C),o.add(D),p.add(E),q.add(F),r.add(G),s.add(H)}var M;return k?(M=new Uint8Array(48),l.copyTo(M,0),m.copyTo(M,8),n.copyTo(M,16),o.copyTo(M,24),p.copyTo(M,32),q.copyTo(M,40)):(M=new Uint8Array(64),l.copyTo(M,0),m.copyTo(M,8),n.copyTo(M,16),o.copyTo(M,24),p.copyTo(M,32),q.copyTo(M,40),r.copyTo(M,48),s.copyTo(M,56)),M}var h=[new hb(1116352408,3609767458),new hb(1899447441,602891725),new hb(3049323471,3964484399),new hb(3921009573,2173295548),new hb(961987163,4081628472),new hb(1508970993,3053834265),new hb(2453635748,2937671579),new hb(2870763221,3664609560),new hb(3624381080,2734883394),new hb(310598401,1164996542),new hb(607225278,1323610764),new hb(1426881987,3590304994),new hb(1925078388,4068182383),new hb(2162078206,991336113),new hb(2614888103,633803317),new hb(3248222580,3479774868),new hb(3835390401,2666613458),new hb(4022224774,944711139),new hb(264347078,2341262773),new hb(604807628,2007800933),new hb(770255983,1495990901),new hb(1249150122,1856431235),new hb(1555081692,3175218132),new hb(1996064986,2198950837),new hb(2554220882,3999719339),new hb(2821834349,766784016),new hb(2952996808,2566594879),new hb(3210313671,3203337956),new hb(3336571891,1034457026),new hb(3584528711,2466948901),new hb(113926993,3758326383),new hb(338241895,168717936),new hb(666307205,1188179964),new hb(773529912,1546045734),new hb(1294757372,1522805485),new hb(1396182291,2643833823),new hb(1695183700,2343527390),new hb(1986661051,1014477480),new hb(2177026350,1206759142),new hb(2456956037,344077627),new hb(2730485921,1290863460),new hb(2820302411,3158454273),new hb(3259730800,3505952657),new hb(3345764771,106217008),new hb(3516065817,3606008344),new hb(3600352804,1432725776),new hb(4094571909,1467031594),new hb(275423344,851169720),new hb(430227734,3100823752),new hb(506948616,1363258195),new hb(659060556,3750685593),new hb(883997877,3785050280),new hb(958139571,3318307427),new hb(1322822218,3812723403),new hb(1537002063,2003034995),new hb(1747873779,3602036899),new hb(1955562222,1575990012),new hb(2024104815,1125592928),new hb(2227730452,2716904306),new hb(2361852424,442776044),new hb(2428436474,593698344),new hb(2756734187,3733110249),new hb(3204031479,2999351573),new hb(3329325298,3815920427),new hb(3391569614,3928383900),new hb(3515267271,566280711),new hb(3940187606,3454069534),new hb(4118630271,4000239992),new hb(116418474,1914138554),new hb(174292421,2731055270),new hb(289380356,3203993006),new hb(460393269,320620315),new hb(685471733,587496836),new hb(852142971,1086792851),new hb(1017036298,365543100),new hb(1126000580,2618297676),new hb(1288033470,3409855158),new hb(1501505948,4234509866),new hb(1607167915,987167468),new hb(1816402316,1246189591)];return g}(),kb=function(){function a(a,b,c){return jb(a,b,c,!0)}return a}(),lb=function(){function a(){}return a.prototype={decryptBlock:function(a){return a}},a}(),mb=function(){function a(a){var b=176,c=new Uint8Array(b);c.set(a);for(var d=16,e=1;b>d;++e){var h=c[d-3],i=c[d-2],j=c[d-1],k=c[d-4];h=g[h],i=g[i],j=g[j],k=g[k],h^=f[e];for(var l=0;4>l;++l)c[d]=h^=c[d-16],d++,c[d]=i^=c[d-16],d++,c[d]=j^=c[d-16],d++,c[d]=k^=c[d-16],d++}return c}function b(a,b){var c=new Uint8Array(16);c.set(a);var d,e,f,g,i,j;for(e=0,f=160;16>e;++e,++f)c[e]^=b[f];for(d=9;d>=1;--d){for(g=c[13],c[13]=c[9],c[9]=c[5],c[5]=c[1],c[1]=g,g=c[14],i=c[10],c[14]=c[6],c[10]=c[2],c[6]=g,c[2]=i,g=c[15],i=c[11],j=c[7],c[15]=c[3],c[11]=g,c[7]=i,c[3]=j,e=0;16>e;++e)c[e]=h[c[e]];for(e=0,f=16*d;16>e;++e,++f)c[e]^=b[f];for(e=0;16>e;e+=4){var l=k[c[e]],m=k[c[e+1]],n=k[c[e+2]],o=k[c[e+3]];g=l^m>>>8^m<<24^n>>>16^n<<16^o>>>24^o<<8,c[e]=g>>>24&255,c[e+1]=g>>16&255,c[e+2]=g>>8&255,c[e+3]=255&g}}for(g=c[13],c[13]=c[9],c[9]=c[5],c[5]=c[1],c[1]=g,g=c[14],i=c[10],c[14]=c[6],c[10]=c[2],c[6]=g,c[2]=i,g=c[15],i=c[11],j=c[7],c[15]=c[3],c[11]=g,c[7]=i,c[3]=j,e=0;16>e;++e)c[e]=h[c[e]],c[e]^=b[e];return c}function c(a,b){var c,d,e,f,h=new Uint8Array(16);for(h.set(a),k=0;16>k;++k)h[k]^=b[k];for(j=1;10>j;j++){for(k=0;16>k;++k)h[k]=g[h[k]];e=h[1],h[1]=h[5],h[5]=h[9],h[9]=h[13],h[13]=e,e=h[2],d=h[6],h[2]=h[10],h[6]=h[14],h[10]=e,h[14]=d,e=h[3],d=h[7],c=h[11],h[3]=h[15],h[7]=e,h[11]=d,h[15]=c;for(var k=0;16>k;k+=4){var l=h[k+0],m=h[k+1],n=h[k+2],o=h[k+3];c=l^m^n^o,h[k+0]^=c^i[l^m],h[k+1]^=c^i[m^n],h[k+2]^=c^i[n^o],h[k+3]^=c^i[o^l]}for(k=0,f=16*j;16>k;++k,++f)h[k]^=b[f]}for(k=0;16>k;++k)h[k]=g[h[k]];for(e=h[1],h[1]=h[5],h[5]=h[9],h[9]=h[13],h[13]=e,e=h[2],d=h[6],h[2]=h[10],h[6]=h[14],h[10]=e,h[14]=d,e=h[3],d=h[7],c=h[11],h[3]=h[15],h[7]=e,h[11]=d,h[15]=c,k=0,f=160;16>k;++k,++f)h[k]^=b[f];return h}function d(b){this.key=a(b),this.buffer=new Uint8Array(16),this.bufferPosition=0}function e(a,c){var d,e,f,g=a.length,h=this.buffer,i=this.bufferPosition,j=[],k=this.iv;for(d=0;g>d;++d)if(h[i]=a[d],++i,!(16>i)){var l=b(h,this.key);for(e=0;16>e;++e)l[e]^=k[e];k=h,j.push(l),h=new Uint8Array(16),i=0}if(this.buffer=h,this.bufferLength=i,this.iv=k,0===j.length)return new Uint8Array([]);var m=16*j.length;if(c){var n=j[j.length-1],o=n[15];if(16>=o){for(d=15,f=16-o;d>=f;--d)if(n[d]!==o){o=0;break}m-=o,j[j.length-1]=n.subarray(0,16-o)}}var p=new Uint8Array(m);for(d=0,e=0,f=j.length;f>d;++d,e+=16)p.set(j[d],e);return p}for(var f=new Uint8Array([141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141]),g=new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22]),h=new Uint8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]),i=new Uint8Array(256),j=0;256>j;j++)128>j?i[j]=j<<1:i[j]=j<<1^27;var k=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]);return d.prototype={decryptBlock:function(a,b){var c,d=a.length,f=this.buffer,g=this.bufferPosition;for(c=0;16>g&&d>c;++c,++g)f[g]=a[c];return 16>g?(this.bufferLength=g,new Uint8Array([])):(this.iv=f,this.buffer=new Uint8Array(16),this.bufferLength=0,this.decryptBlock=e,this.decryptBlock(a.subarray(16),b))},encrypt:function(a,b){var d,e,f,g=a.length,h=this.buffer,i=this.bufferPosition,j=[];for(b||(b=new Uint8Array(16)),d=0;g>d;++d)if(h[i]=a[d],++i,!(16>i)){for(e=0;16>e;++e)h[e]^=b[e];var k=c(h,this.key);b=k,j.push(k),h=new Uint8Array(16),i=0}if(this.buffer=h,this.bufferLength=i,this.iv=b,0===j.length)return new Uint8Array([]);var l=16*j.length,m=new Uint8Array(l);for(d=0,e=0,f=j.length;f>d;++d,e+=16)m.set(j[d],e);return m}},d}(),nb=function(){function a(a){var b=240,c=new Uint8Array(b),d=1;c.set(a);for(var e=32,g=1;b>e;++g){if(e%32===16)h=f[h],i=f[i],j=f[j],k=f[k];else if(e%32===0){var h=c[e-3],i=c[e-2],j=c[e-1],k=c[e-4];h=f[h],i=f[i],j=f[j],k=f[k],h^=d,(d<<=1)>=256&&(d=255&(27^d))}for(var l=0;4>l;++l)c[e]=h^=c[e-32],e++,c[e]=i^=c[e-32],e++,c[e]=j^=c[e-32],e++,c[e]=k^=c[e-32],e++}return c}function b(a,b){var c=new Uint8Array(16);c.set(a);var d,e,f,h,i,k;for(e=0,f=224;16>e;++e,++f)c[e]^=b[f];for(d=13;d>=1;--d){for(h=c[13],c[13]=c[9],c[9]=c[5],c[5]=c[1],c[1]=h,h=c[14],i=c[10],c[14]=c[6],c[10]=c[2],c[6]=h,c[2]=i,h=c[15],i=c[11],k=c[7],c[15]=c[3],c[11]=h,c[7]=i,c[3]=k,e=0;16>e;++e)c[e]=g[c[e]];for(e=0,f=16*d;16>e;++e,++f)c[e]^=b[f];for(e=0;16>e;e+=4){var l=j[c[e]],m=j[c[e+1]],n=j[c[e+2]],o=j[c[e+3]];h=l^m>>>8^m<<24^n>>>16^n<<16^o>>>24^o<<8,c[e]=h>>>24&255,c[e+1]=h>>16&255,c[e+2]=h>>8&255,c[e+3]=255&h}}for(h=c[13],c[13]=c[9],c[9]=c[5],c[5]=c[1],c[1]=h,h=c[14],i=c[10],c[14]=c[6],c[10]=c[2],c[6]=h,c[2]=i,h=c[15],i=c[11],k=c[7],c[15]=c[3],c[11]=h,c[7]=i,c[3]=k,e=0;16>e;++e)c[e]=g[c[e]],c[e]^=b[e];return c}function c(a,b){var c,d,e,g,j=new Uint8Array(16);for(j.set(a),k=0;16>k;++k)j[k]^=b[k];for(i=1;14>i;i++){for(k=0;16>k;++k)j[k]=f[j[k]];e=j[1],j[1]=j[5],j[5]=j[9],j[9]=j[13],j[13]=e,e=j[2],d=j[6],j[2]=j[10],j[6]=j[14],j[10]=e,j[14]=d,e=j[3],d=j[7],c=j[11],j[3]=j[15],j[7]=e,j[11]=d,j[15]=c;for(var k=0;16>k;k+=4){var l=j[k+0],m=j[k+1],n=j[k+2],o=j[k+3];c=l^m^n^o,j[k+0]^=c^h[l^m],j[k+1]^=c^h[m^n],j[k+2]^=c^h[n^o],j[k+3]^=c^h[o^l]}for(k=0,g=16*i;16>k;++k,++g)j[k]^=b[g]}for(k=0;16>k;++k)j[k]=f[j[k]];for(e=j[1],j[1]=j[5],j[5]=j[9],j[9]=j[13],j[13]=e,e=j[2],d=j[6],j[2]=j[10],j[6]=j[14],j[10]=e,j[14]=d,e=j[3],d=j[7],c=j[11],j[3]=j[15],j[7]=e,j[11]=d,j[15]=c,k=0,g=224;16>k;++k,++g)j[k]^=b[g];return j}function d(b){this.key=a(b),this.buffer=new Uint8Array(16),this.bufferPosition=0}function e(a,c){var d,e,f,g=a.length,h=this.buffer,i=this.bufferPosition,j=[],k=this.iv;for(d=0;g>d;++d)if(h[i]=a[d],++i,!(16>i)){var l=b(h,this.key);for(e=0;16>e;++e)l[e]^=k[e];k=h,j.push(l),h=new Uint8Array(16),i=0}if(this.buffer=h,this.bufferLength=i,this.iv=k,0===j.length)return new Uint8Array([]);var m=16*j.length;if(c){var n=j[j.length-1],o=n[15];if(16>=o){for(d=15,f=16-o;d>=f;--d)if(n[d]!==o){o=0;break}m-=o,j[j.length-1]=n.subarray(0,16-o)}}var p=new Uint8Array(m);for(d=0,e=0,f=j.length;f>d;++d,e+=16)p.set(j[d],e);return p}for(var f=(new Uint8Array([141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141]),new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22])),g=new Uint8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]),h=new Uint8Array(256),i=0;256>i;i++)128>i?h[i]=i<<1:h[i]=i<<1^27;var j=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]);return d.prototype={decryptBlock:function(a,b,c){var d,f=a.length,g=this.buffer,h=this.bufferPosition;if(c)this.iv=c;else{for(d=0;16>h&&f>d;++d,++h)g[h]=a[d];if(16>h)return this.bufferLength=h,new Uint8Array([]);this.iv=g,a=a.subarray(16)}return this.buffer=new Uint8Array(16),this.bufferLength=0,this.decryptBlock=e,this.decryptBlock(a,b)},encrypt:function(a,b){var d,e,f,g=a.length,h=this.buffer,i=this.bufferPosition,j=[];for(b||(b=new Uint8Array(16)),d=0;g>d;++d)if(h[i]=a[d],++i,!(16>i)){for(e=0;16>e;++e)h[e]^=b[e];var k=c(h,this.key);this.iv=k,j.push(k),h=new Uint8Array(16),i=0}if(this.buffer=h,this.bufferLength=i,this.iv=b,0===j.length)return new Uint8Array([]);var l=16*j.length,m=new Uint8Array(l);for(d=0,e=0,f=j.length;f>d;++d,e+=16)m.set(j[d],e);return m}},d}(),ob=function(){function a(a,b){if(a.length!==b.length)return!1;for(var c=0;cg||f[f.length-1]>g-32;){var h=b.length+e.length+d.length,i=new Uint8Array(64*h),j=a(b,e);j=a(j,d);for(var k=0,l=0;64>k;k++,l+=h)i.set(j,l);var m=new mb(e.subarray(0,16));f=m.encrypt(i,e.subarray(16,32));for(var n=0,o=0;16>o;o++)n*=1,n%=3,n+=(f[o]>>>0)%3,n%=3;0===n?e=ib(f,0,f.length):1===n?e=kb(f,0,f.length):2===n&&(e=jb(f,0,f.length)),g++}return e.subarray(0,32)}function c(){}function d(a,b){if(a.length!==b.length)return!1;for(var c=0;cn;++n)m[n]=b[n];for(j=0;32>n;)m[n++]=i[j++];for(j=0,k=c.length;k>j;++j)m[n++]=c[j];for(m[n++]=255&e,m[n++]=e>>8&255,m[n++]=e>>16&255,m[n++]=e>>>24&255,j=0,k=a.length;k>j;++j)m[n++]=a[j];f>=4&&!h&&(m[n++]=255,m[n++]=255,m[n++]=255,m[n++]=255);var o=gb(m,0,n),p=g>>3;if(f>=3)for(j=0;50>j;++j)o=gb(o,0,p);var q,r,s=o.subarray(0,p);if(f>=3){for(n=0;32>n;++n)m[n]=i[n];for(j=0,k=a.length;k>j;++j)m[n++]=a[j];q=new fb(s),r=q.encryptBlock(gb(m,0,n)),k=s.length;var t,u=new Uint8Array(k);for(j=1;19>=j;++j){for(t=0;k>t;++t)u[t]=s[t]^j;q=new fb(u),r=q.encryptBlock(r)}for(j=0,k=r.length;k>j;++j)if(d[j]!==r[j])return null}else for(q=new fb(s),r=q.encryptBlock(i),j=0,k=r.length;k>j;++j)if(d[j]!==r[j])return null;return s}function e(a,b,c,d){var e,f,g=new Uint8Array(32),h=0;for(f=Math.min(32,a.length);f>h;++h)g[h]=a[h];for(e=0;32>h;)g[h++]=i[e++];var j=gb(g,0,h),k=d>>3;if(c>=3)for(e=0;50>e;++e)j=gb(j,0,j.length);var l,m;if(c>=3){m=b;var n,o=new Uint8Array(k);for(e=19;e>=0;e--){for(n=0;k>n;++n)o[n]=j[n]^e;l=new fb(o),m=l.encryptBlock(m)}}else l=new fb(j.subarray(0,k)),m=l.encryptBlock(b);return m}function f(f,g,h){var i=f.get("Filter");z(i)&&"Standard"===i.name||c("unknown encryption method"),this.dict=f;var l=f.get("V");(!w(l)||1!==l&&2!==l&&4!==l&&5!==l)&&c("unsupported encryption algorithm"),this.algorithm=l;var m=f.get("Length")||40;(!w(m)||40>m||m%8!==0)&&c("invalid key length");var n=j(f.get("O")).subarray(0,32),o=j(f.get("U")).subarray(0,32),p=f.get("P"),q=f.get("R"),r=(4===l||5===l)&&f.get("EncryptMetadata")!==!1;this.encryptMetadata=r;var s,u=j(g);if(h){if(6===q)try{h=t(h)}catch(v){b("CipherTransformFactory: Unable to convert UTF8 encoded password.")}s=j(h)}var x;if(5!==l)x=d(u,s,n,o,p,q,m,r);else{var y=j(f.get("O")).subarray(32,40),A=j(f.get("O")).subarray(40,48),B=j(f.get("U")).subarray(0,48),C=j(f.get("U")).subarray(32,40),D=j(f.get("U")).subarray(40,48),E=j(f.get("OE")),F=j(f.get("UE")),G=j(f.get("Perms"));x=a(q,s,n,y,A,B,o,C,D,E,F,G)}if(!x&&!h)throw new da("No password given",ca.NEED_PASSWORD);if(!x&&h){var H=e(s,n,q,m);x=d(u,H,n,o,p,q,m,r)}if(!x)throw new da("Incorrect Password",ca.INCORRECT_PASSWORD);this.encryptionKey=x,l>=4&&(this.cf=f.get("CF"),this.stmf=f.get("StmF")||k,this.strf=f.get("StrF")||k,this.eff=f.get("EFF")||this.stmf)}function g(a,b,c,d){var e,f,g=new Uint8Array(c.length+9);for(e=0,f=c.length;f>e;++e)g[e]=c[e];g[e++]=255&a,g[e++]=a>>8&255,g[e++]=a>>16&255,g[e++]=255&b,g[e++]=b>>8&255,d&&(g[e++]=115,g[e++]=65,g[e++]=108,g[e++]=84);var h=gb(g,0,e);return h.subarray(0,Math.min(c.length+5,16))}function h(a,b,d,e,f){var h,i=a.get(b.name);return null!==i&&void 0!==i&&(h=i.get("CFM")),h&&"None"!==h.name?"V2"===h.name?function(){return new fb(g(d,e,f,!1))}:"AESV2"===h.name?function(){return new mb(g(d,e,f,!0))}:"AESV3"===h.name?function(){return new nb(f)}:void c("Unknown crypto method"):function(){return new lb}}var i=new Uint8Array([40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122]),k=ya.get("Identity");return f.prototype={createCipherTransform:function(a,b){if(4===this.algorithm||5===this.algorithm)return new qb(h(this.cf,this.stmf,a,b,this.encryptionKey),h(this.cf,this.strf,a,b,this.encryptionKey));var c=g(a,b,this.encryptionKey,!1),d=function(){return new fb(c)};return new qb(d,d)}},f}(),sb={FUNCTION_BASED:1,AXIAL:2,RADIAL:3,FREE_FORM_MESH:4,LATTICE_FORM_MESH:5,COONS_PATCH_MESH:6,TENSOR_PATCH_MESH:7},tb=function(){function a(){c("should not call Pattern constructor")}return a.prototype={getPattern:function(a){c("Should not call Pattern.getStyle: "+a)}},a.parseShading=function(a,c,d,e){var f=D(a)?a.dict:a,g=f.get("ShadingType");try{switch(g){case sb.AXIAL:case sb.RADIAL:return new ub.RadialAxial(f,c,d,e);case sb.FREE_FORM_MESH:case sb.LATTICE_FORM_MESH:case sb.COONS_PATCH_MESH:case sb.TENSOR_PATCH_MESH:return new ub.Mesh(a,c,d,e);default:throw new Error("Unsupported ShadingType: "+g)}}catch(h){if(h instanceof ja)throw h;return aa.notify(_.shadingPattern),b(h),new ub.Dummy}},a}(),ub={};ub.SMALL_NUMBER=.01,ub.RadialAxial=function(){function d(c,d,e,f){this.matrix=d,this.coordsArr=c.get("Coords"),this.shadingType=c.get("ShadingType"),this.type="Pattern";var g=c.get("ColorSpace","CS");g=Xa.parse(g,e,f),this.cs=g;var h=0,i=1;if(c.has("Domain")){var j=c.get("Domain");h=j[0],i=j[1]}var k=!1,l=!1;if(c.has("Extend")){var m=c.get("Extend");k=m[0],l=m[1]}if(!(this.shadingType!==sb.RADIAL||k&&l)){var n=this.coordsArr[0],o=this.coordsArr[1],p=this.coordsArr[2],q=this.coordsArr[3],r=this.coordsArr[4],s=this.coordsArr[5],t=Math.sqrt((n-q)*(n-q)+(o-r)*(o-r));s+t>=p&&p+t>=s&&b("Unsupported radial gradient.")}this.extendStart=k,this.extendEnd=l;var u=c.get("Function"),v=Ta.parseArray(e,u),w=i-h,x=w/10,y=this.colorStops=[];if(h>=i||0>=x)return void a("Bad shading domain.");for(var z,A=new Float32Array(g.numComps),B=new Float32Array(1),C=h;i>=C;C+=x){B[0]=C,v(B,0,A,0),z=g.getRgb(A,0);var D=na.makeCssRgb(z[0],z[1],z[2]);y.push([(C-h)/w,D])}var E="transparent";c.has("Background")&&(z=g.getRgb(c.get("Background"),0),E=na.makeCssRgb(z[0],z[1],z[2])),k||(y.unshift([0,E]),y[1][0]+=ub.SMALL_NUMBER),l||(y[y.length-1][0]-=ub.SMALL_NUMBER,y.push([1,E])),this.colorStops=y}return d.prototype={getIR:function(){var a,b,d,e,f,g=this.coordsArr,h=this.shadingType;h===sb.AXIAL?(b=[g[0],g[1]],d=[g[2],g[3]],e=null,f=null,a="axial"):h===sb.RADIAL?(b=[g[0],g[1]],d=[g[3],g[4]],e=g[2],f=g[5],a="radial"):c("getPattern type unknown: "+h);var i=this.matrix;return i&&(b=na.applyTransform(b,i),d=na.applyTransform(d,i)),["RadialAxial",a,this.colorStops,b,d,e,f]}},d}(),ub.Mesh=function(){function a(a,b){this.stream=a,this.context=b, -this.buffer=0,this.bufferLength=0;var c=b.numComps;this.tmpCompsBuf=new Float32Array(c);var d=b.colorSpace.numComps;this.tmpCsCompsBuf=b.colorFn?new Float32Array(d):this.tmpCompsBuf}function b(a,b){for(var c=a.coords,d=a.colors,f=[],g=[],h=0;b.hasData;){var i=b.readFlag(),j=b.readCoordinate(),k=b.readComponents();if(0===h){switch(e(i>=0&&2>=i,"Unknown type4 flag"),i){case 0:h=3;break;case 1:g.push(g[g.length-2],g[g.length-1]),h=1;break;case 2:g.push(g[g.length-3],g[g.length-1]),h=1}f.push(i)}g.push(c.length),c.push(j),d.push(k),h--,b.align()}a.figures.push({type:"triangles",coords:new Int32Array(g),colors:new Int32Array(g)})}function d(a,b,c){for(var d=a.coords,e=a.colors,f=[];b.hasData;){var g=b.readCoordinate(),h=b.readComponents();f.push(d.length),d.push(g),e.push(h)}a.figures.push({type:"lattice",coords:new Int32Array(f),colors:new Int32Array(f),verticesPerRow:c})}function f(a,b){var c=a.figures[b];e("patch"===c.type,"Unexpected patch mesh figure");var d=a.coords,f=a.colors,g=c.coords,h=c.colors,i=Math.min(d[g[0]][0],d[g[3]][0],d[g[12]][0],d[g[15]][0]),j=Math.min(d[g[0]][1],d[g[3]][1],d[g[12]][1],d[g[15]][1]),k=Math.max(d[g[0]][0],d[g[3]][0],d[g[12]][0],d[g[15]][0]),p=Math.max(d[g[0]][1],d[g[3]][1],d[g[12]][1],d[g[15]][1]),q=Math.ceil((k-i)*n/(a.bounds[2]-a.bounds[0]));q=Math.max(l,Math.min(m,q));var r=Math.ceil((p-j)*n/(a.bounds[3]-a.bounds[1]));r=Math.max(l,Math.min(m,r));for(var s=q+1,t=new Int32Array((r+1)*s),u=new Int32Array((r+1)*s),v=0,w=new Uint8Array(3),x=new Uint8Array(3),y=f[h[0]],z=f[h[1]],A=f[h[2]],B=f[h[3]],C=o(r),D=o(q),E=0;r>=E;E++){w[0]=(y[0]*(r-E)+A[0]*E)/r|0,w[1]=(y[1]*(r-E)+A[1]*E)/r|0,w[2]=(y[2]*(r-E)+A[2]*E)/r|0,x[0]=(z[0]*(r-E)+B[0]*E)/r|0,x[1]=(z[1]*(r-E)+B[1]*E)/r|0,x[2]=(z[2]*(r-E)+B[2]*E)/r|0;for(var F=0;q>=F;F++,v++)if(0!==E&&E!==r||0!==F&&F!==q){for(var G=0,H=0,I=0,J=0;3>=J;J++)for(var K=0;3>=K;K++,I++){var L=C[E][J]*D[F][K];G+=d[g[I]][0]*L,H+=d[g[I]][1]*L}t[v]=d.length,d.push([G,H]),u[v]=f.length;var M=new Uint8Array(3);M[0]=(w[0]*(q-F)+x[0]*F)/q|0,M[1]=(w[1]*(q-F)+x[1]*F)/q|0,M[2]=(w[2]*(q-F)+x[2]*F)/q|0,f.push(M)}}t[0]=g[0],u[0]=h[0],t[q]=g[3],u[q]=h[1],t[s*r]=g[12],u[s*r]=h[2],t[s*r+q]=g[15],u[s*r+q]=h[3],a.figures[b]={type:"lattice",coords:t,colors:u,verticesPerRow:s}}function g(a,b){for(var c=a.coords,d=a.colors,f=new Int32Array(16),g=new Int32Array(4);b.hasData;){var h=b.readFlag();e(h>=0&&3>=h,"Unknown type6 flag");var i,j,k=c.length;for(i=0,j=0!==h?8:12;j>i;i++)c.push(b.readCoordinate());var l=d.length;for(i=0,j=0!==h?2:4;j>i;i++)d.push(b.readComponents());var m,n,o,p;switch(h){case 0:f[12]=k+3,f[13]=k+4,f[14]=k+5,f[15]=k+6,f[8]=k+2,f[11]=k+7,f[4]=k+1,f[7]=k+8,f[0]=k,f[1]=k+11,f[2]=k+10,f[3]=k+9,g[2]=l+1,g[3]=l+2,g[0]=l,g[1]=l+3;break;case 1:m=f[12],n=f[13],o=f[14],p=f[15],f[12]=p,f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=o,f[11]=k+3,f[4]=n,f[7]=k+4,f[0]=m,f[1]=k+7,f[2]=k+6,f[3]=k+5,m=g[2],n=g[3],g[2]=n,g[3]=l,g[0]=m,g[1]=l+1;break;case 2:m=f[15],n=f[11],f[12]=f[3],f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=f[7],f[11]=k+3,f[4]=n,f[7]=k+4,f[0]=m,f[1]=k+7,f[2]=k+6,f[3]=k+5,m=g[3],g[2]=g[1],g[3]=l,g[0]=m,g[1]=l+1;break;case 3:f[12]=f[0],f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=f[1],f[11]=k+3,f[4]=f[2],f[7]=k+4,f[0]=f[3],f[1]=k+7,f[2]=k+6,f[3]=k+5,g[2]=g[0],g[3]=l,g[0]=g[1],g[1]=l+1}f[5]=c.length,c.push([(-4*c[f[0]][0]-c[f[15]][0]+6*(c[f[4]][0]+c[f[1]][0])-2*(c[f[12]][0]+c[f[3]][0])+3*(c[f[13]][0]+c[f[7]][0]))/9,(-4*c[f[0]][1]-c[f[15]][1]+6*(c[f[4]][1]+c[f[1]][1])-2*(c[f[12]][1]+c[f[3]][1])+3*(c[f[13]][1]+c[f[7]][1]))/9]),f[6]=c.length,c.push([(-4*c[f[3]][0]-c[f[12]][0]+6*(c[f[2]][0]+c[f[7]][0])-2*(c[f[0]][0]+c[f[15]][0])+3*(c[f[4]][0]+c[f[14]][0]))/9,(-4*c[f[3]][1]-c[f[12]][1]+6*(c[f[2]][1]+c[f[7]][1])-2*(c[f[0]][1]+c[f[15]][1])+3*(c[f[4]][1]+c[f[14]][1]))/9]),f[9]=c.length,c.push([(-4*c[f[12]][0]-c[f[3]][0]+6*(c[f[8]][0]+c[f[13]][0])-2*(c[f[0]][0]+c[f[15]][0])+3*(c[f[11]][0]+c[f[1]][0]))/9,(-4*c[f[12]][1]-c[f[3]][1]+6*(c[f[8]][1]+c[f[13]][1])-2*(c[f[0]][1]+c[f[15]][1])+3*(c[f[11]][1]+c[f[1]][1]))/9]),f[10]=c.length,c.push([(-4*c[f[15]][0]-c[f[0]][0]+6*(c[f[11]][0]+c[f[14]][0])-2*(c[f[12]][0]+c[f[3]][0])+3*(c[f[2]][0]+c[f[8]][0]))/9,(-4*c[f[15]][1]-c[f[0]][1]+6*(c[f[11]][1]+c[f[14]][1])-2*(c[f[12]][1]+c[f[3]][1])+3*(c[f[2]][1]+c[f[8]][1]))/9]),a.figures.push({type:"patch",coords:new Int32Array(f),colors:new Int32Array(g)})}}function h(a,b){for(var c=a.coords,d=a.colors,f=new Int32Array(16),g=new Int32Array(4);b.hasData;){var h=b.readFlag();e(h>=0&&3>=h,"Unknown type7 flag");var i,j,k=c.length;for(i=0,j=0!==h?12:16;j>i;i++)c.push(b.readCoordinate());var l=d.length;for(i=0,j=0!==h?2:4;j>i;i++)d.push(b.readComponents());var m,n,o,p;switch(h){case 0:f[12]=k+3,f[13]=k+4,f[14]=k+5,f[15]=k+6,f[8]=k+2,f[9]=k+13,f[10]=k+14,f[11]=k+7,f[4]=k+1,f[5]=k+12,f[6]=k+15,f[7]=k+8,f[0]=k,f[1]=k+11,f[2]=k+10,f[3]=k+9,g[2]=l+1,g[3]=l+2,g[0]=l,g[1]=l+3;break;case 1:m=f[12],n=f[13],o=f[14],p=f[15],f[12]=p,f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=o,f[9]=k+9,f[10]=k+10,f[11]=k+3,f[4]=n,f[5]=k+8,f[6]=k+11,f[7]=k+4,f[0]=m,f[1]=k+7,f[2]=k+6,f[3]=k+5,m=g[2],n=g[3],g[2]=n,g[3]=l,g[0]=m,g[1]=l+1;break;case 2:m=f[15],n=f[11],f[12]=f[3],f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=f[7],f[9]=k+9,f[10]=k+10,f[11]=k+3,f[4]=n,f[5]=k+8,f[6]=k+11,f[7]=k+4,f[0]=m,f[1]=k+7,f[2]=k+6,f[3]=k+5,m=g[3],g[2]=g[1],g[3]=l,g[0]=m,g[1]=l+1;break;case 3:f[12]=f[0],f[13]=k+0,f[14]=k+1,f[15]=k+2,f[8]=f[1],f[9]=k+9,f[10]=k+10,f[11]=k+3,f[4]=f[2],f[5]=k+8,f[6]=k+11,f[7]=k+4,f[0]=f[3],f[1]=k+7,f[2]=k+6,f[3]=k+5,g[2]=g[0],g[3]=l,g[0]=g[1],g[1]=l+1}a.figures.push({type:"patch",coords:new Int32Array(f),colors:new Int32Array(g)})}}function i(a){for(var b=a.coords[0][0],c=a.coords[0][1],d=b,e=c,f=1,g=a.coords.length;g>f;f++){var h=a.coords[f][0],i=a.coords[f][1];b=b>h?h:b,c=c>i?i:c,d=h>d?h:d,e=i>e?i:e}a.bounds=[b,c,d,e]}function j(a){var b,c,d,e,f=a.coords,g=new Float32Array(2*f.length);for(b=0,d=0,c=f.length;c>b;b++){var h=f[b];g[d++]=h[0],g[d++]=h[1]}a.coords=g;var i=a.colors,j=new Uint8Array(3*i.length);for(b=0,d=0,c=i.length;c>b;b++){var k=i[b];j[d++]=k[0],j[d++]=k[1],j[d++]=k[2]}a.colors=j;var l=a.figures;for(b=0,c=l.length;c>b;b++){var m=l[b],n=m.coords,o=m.colors;for(d=0,e=n.length;e>d;d++)n[d]*=2,o[d]*=3}}function k(k,l,m,n){e(D(k),"Mesh data is not a stream");var o=k.dict;this.matrix=l,this.shadingType=o.get("ShadingType"),this.type="Pattern",this.bbox=o.get("BBox");var p=o.get("ColorSpace","CS");p=Xa.parse(p,m,n),this.cs=p,this.background=o.has("Background")?p.getRgb(o.get("Background"),0):null;var q=o.get("Function"),r=q?Ta.parseArray(m,q):null;this.coords=[],this.colors=[],this.figures=[];var s={bitsPerCoordinate:o.get("BitsPerCoordinate"),bitsPerComponent:o.get("BitsPerComponent"),bitsPerFlag:o.get("BitsPerFlag"),decode:o.get("Decode"),colorFn:r,colorSpace:p,numComps:r?1:p.numComps},t=new a(k,s),u=!1;switch(this.shadingType){case sb.FREE_FORM_MESH:b(this,t);break;case sb.LATTICE_FORM_MESH:var v=0|o.get("VerticesPerRow");e(v>=2,"Invalid VerticesPerRow"),d(this,t,v);break;case sb.COONS_PATCH_MESH:g(this,t),u=!0;break;case sb.TENSOR_PATCH_MESH:h(this,t),u=!0;break;default:c("Unsupported mesh type.")}if(u){i(this);for(var w=0,x=this.figures.length;x>w;w++)f(this,w)}i(this),j(this)}a.prototype={get hasData(){if(this.stream.end)return this.stream.pos0)return!0;var a=this.stream.getByte();return 0>a?!1:(this.buffer=a,this.bufferLength=8,!0)},readBits:function(a){var b=this.buffer,c=this.bufferLength;if(32===a){if(0===c)return(this.stream.getByte()<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte())>>>0;b=b<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte();var d=this.stream.getByte();return this.buffer=d&(1<>c)>>>0}if(8===a&&0===c)return this.stream.getByte();for(;a>c;)b=b<<8|this.stream.getByte(),c+=8;return c-=a,this.bufferLength=c,this.buffer=b&(1<>c},align:function(){this.buffer=0,this.bufferLength=0},readFlag:function(){return this.readBits(this.context.bitsPerFlag)},readCoordinate:function(){var a=this.context.bitsPerCoordinate,b=this.readBits(a),c=this.readBits(a),d=this.context.decode,e=32>a?1/((1<b?1/((1<f;f++,g+=2){var h=this.readBits(b);e[f]=h*c*(d[g+1]-d[g])+d[g]}var i=this.tmpCsCompsBuf;return this.context.colorFn&&this.context.colorFn(e,0,i,0),this.context.colorSpace.getRgb(i,0)}};var l=3,m=20,n=20,o=function(){function a(a){for(var b=[],c=0;a>=c;c++){var d=c/a,e=1-d;b.push(new Float32Array([e*e*e,3*d*e*e,3*d*d*e,d*d*d]))}return b}var b=[];return function(c){return b[c]||(b[c]=a(c)),b[c]}}();return k.prototype={getIR:function(){return["Mesh",this.shadingType,this.coords,this.colors,this.figures,this.bounds,this.matrix,this.bbox,this.background]}},k}(),ub.Dummy=function(){function a(){this.type="Pattern"}return a.prototype={getIR:function(){return["Dummy"]}},a}();var vb=function(){function d(a,b,c,d,e,f,g){this.pdfManager=a,this.xref=b,this.handler=c,this.pageIndex=d,this.uniquePrefix=e,this.idCounters=f,this.fontCache=g}function f(){this.reset()}var g=20,h=100;f.prototype={check:function(){return++this.checkedPDFJS.maxImageSize)return void b("Image exceeded maximum allowed size and was removed.");var l,m,n=i.get("ImageMask","IM")||!1;if(n){var o=i.get("Width","W"),p=i.get("Height","H"),q=o+7>>3,r=c.getBytes(q*p),s=i.get("Decode","D"),t=!!s&&s[0]>0;return l=Bc.createMask(r,o,p,c instanceof Oc,t),l.cached=!0,m=[l],e.addOp($.paintImageMaskXObject,m),void(f&&(g[f]={fn:$.paintImageMaskXObject,args:m}))}var u=i.get("SMask","SM")||!1,v=i.get("Mask")||!1,w=200;if(d&&!u&&!v&&!(c instanceof Sc)&&w>j+k){var y=new Bc(this.xref,a,c,d,null,null);return l=y.createImageData(!0),void e.addOp($.paintInlineImageXObject,[l])}var z=this.uniquePrefix||"",A="img_"+z+ ++this.idCounters.obj;return e.addDependency(A),m=[A,j,k],!u&&!v&&c instanceof Sc&&c.isNativelySupported(this.xref,a)?(e.addOp($.paintJpegXObject,m),void this.handler.send("obj",[A,this.pageIndex,"JpegStream",c.getIR()])):(Bc.buildImage(h.handler,h.xref,a,c,d).then(function(a){var b=a.createImageData(!1);h.handler.send("obj",[A,h.pageIndex,"Image",b],[b.data.buffer])}).then(void 0,function(a){b("Unable to decode image: "+a),h.handler.send("obj",[A,h.pageIndex,"Image",null])}),e.addOp($.paintImageXObject,m),void(f&&(g[f]={fn:$.paintImageXObject,args:m})))},handleSMask:function(a,b,c,d,e){var f=a.get("G"),g={subtype:a.get("S").name,backdrop:a.get("BC")};return this.buildFormXObject(b,f,g,c,d,e.state.clone())},handleTilingType:function(a,b,c,d,e,f,g){var h=new xb,i=[e.get("Resources"),c],j=Aa.merge(this.xref,i);return this.getOperatorList(d,g,j,h).then(function(){f.addDependencies(h.dependencies),f.addOp(a,J({fnArray:h.fnArray,argsArray:h.argsArray},e,b))})},handleSetFont:function(a,b,c,d,e,f){var g;b&&(b=b.slice(),g=b[0].name);var h=this;return this.loadFont(g,c,this.xref,a).then(function(b){return b.font.isType3Font?b.loadType3Data(h,a,d,e).then(function(){return b}):b}).then(function(a){return f.font=a.font,a.send(h.handler),a.loadedName})},handleText:function(a,b){var c=b.font,d=c.charsToGlyphs(a),e=!!(b.textRenderingMode&U.ADD_TO_PATH_FLAG);if(c.data&&(e||PDFJS.disableFontFace))for(var f=function(a){if(!c.renderer.hasBuiltPath(a)){var b=c.renderer.getPathJs(a);this.handler.send("commonobj",[c.loadedName+"_path_"+a,"FontPath",b])}}.bind(this),g=0,h=d.length;h>g;g++){var i=d[g];if(null!==i){f(i.fontChar);var j=i.accent;j&&j.fontChar&&f(j.fontChar)}}return d},setGState:function(c,d,e,f,g,h){var i=[],j=d.map,k=this,l=Promise.resolve();for(var m in j){var n=j[m];switch(m){case"Type":break;case"LW":case"LC":case"LJ":case"ML":case"D":case"RI":case"FL":case"CA":case"ca":i.push([m,n]);break;case"Font":l=l.then(function(){return k.handleSetFont(c,null,n[0],e,f,h.state).then(function(a){e.addDependency(a),i.push([m,[a,n[1]]])})});break;case"BM":i.push([m,n]);break;case"SMask":if(z(n)&&"None"===n.name){i.push([m,!1]);break}var o=g.fetchIfRef(n);B(o)?(l=l.then(function(){return k.handleSMask(o,c,e,f,h)}),i.push([m,!0])):b("Unsupported SMask type");break;case"OP":case"op":case"OPM":case"BG":case"BG2":case"UCR":case"UCR2":case"TR":case"TR2":case"HT":case"SM":case"SA":case"AIS":case"TK":a("graphic state operator "+m);break;default:a("Unknown graphic state operator "+m)}}return l.then(function(){i.length>=0&&e.addOp($.setGState,[i])})},loadFont:function(a,c,d,f){function g(){return Promise.resolve(new wb("g_font_error",new ec("Font "+a+" is not available"),c))}var h;if(c)e(F(c)),h=c;else{var i=f.get("Font");if(!i)return b("fontRes not available"),g();h=i.getRaw(a)}if(!h)return b("fontRef not available"),g();if(this.fontCache.has(h))return this.fontCache.get(h);if(c=d.fetchIfRef(h),!B(c))return g();if(c.translated)return c.translated;var j=G(),k=this.preEvaluateFont(c,d),l=k.descriptor,m=h.num+"_"+h.gen;if(B(l)){l.fontAliases||(l.fontAliases=Object.create(null));var n=l.fontAliases,o=k.hash;if(n[o]){var p=n[o].aliasRef;if(p&&this.fontCache.has(p))return this.fontCache.putAlias(h,p),this.fontCache.get(h)}n[o]||(n[o]={fontID:dc.getFontID()}),n[o].aliasRef=h,m=n[o].fontID}var q=B(h);q||this.fontCache.put(h,j.promise),c.loadedName="g_font_"+(q?a.replace(/\W/g,""):m),c.translated=j.promise;var r;try{r=Promise.resolve(this.translateFont(k,d))}catch(s){r=Promise.reject(s)}return r.then(function(a){if(void 0!==a.fontType){var b=d.stats.fontTypes;b[a.fontType]=!0}j.resolve(new wb(c.loadedName,a,c))},function(a){aa.notify(_.font);try{var b=k.descriptor,e=b&&b.get("FontFile3"),f=e&&e.get("Subtype"),g=P(k.type,f&&f.name),h=d.stats.fontTypes;h[g]=!0}catch(i){}j.resolve(new wb(c.loadedName,new ec(a instanceof Error?a.message:a),c))}),j.promise},buildPath:function(a,b,c){var d=a.length-1;if(c||(c=[]),0>d||a.fnArray[d]!==$.constructPath)a.addOp($.constructPath,[[b],c]);else{var e=a.argsArray[d];e[0].push(b),Array.prototype.push.apply(e[1],c)}},handleColorN:function(a,b,c,d,e,f,g,h){var i,l=c[c.length-1];if(z(l)&&(i=e.get(l.name))){var m=D(i)?i.dict:i,n=m.get("PatternType");if(n===j){var o=d.base?d.base.getRgb(c,0):null;return this.handleTilingType(b,o,f,i,m,a,g)}if(n===k){var p=m.get("Shading"),q=m.get("Matrix");return i=tb.parseShading(p,q,h,f),a.addOp(b,i.getIR()),Promise.resolve()}return Promise.reject("Unknown PatternType: "+n)}return a.addOp(b,c),Promise.resolve()},getOperatorList:function(d,g,h,j,k){var l=this,m=this.xref,n={};e(j),h=h||Aa.empty;var o=h.get("XObject")||Aa.empty,p=h.get("Pattern")||Aa.empty,q=new yb(k||new Ab),r=new Bb(d,m,q),s=new f;return new Promise(function t(d,f){g.ensureNotTerminated(),s.reset();for(var k,u,v,w,A={};!(k=s.check())&&(A.args=null,r.read(A));){var C=A.args,E=A.fn;switch(0|E){case $.paintXObject:if(C[0].code)break;var F=C[0].name;if(!F){b("XObject must be referred to by name.");continue}if(void 0!==n[F]){j.addOp(n[F].fn,n[F].args),C=null;continue}var G=o.get(F);if(G){e(D(G),"XObject should be a stream");var H=G.dict.get("Subtype");if(e(z(H),"XObject should have a Name subtype"),"Form"===H.name)return q.save(),l.buildFormXObject(h,G,null,j,g,q.state.clone()).then(function(){q.restore(),t(d,f)},f);if("Image"===H.name){l.buildPaintImageXObject(h,G,!1,j,F,n),C=null;continue}if("PS"===H.name){a("Ignored XObject subtype PS");continue}c("Unhandled XObject subtype "+H.name)}break;case $.setFont:var I=C[1];return l.handleSetFont(h,C,null,j,g,q.state).then(function(a){j.addDependency(a),j.addOp($.setFont,[a,I]),t(d,f)},f);case $.endInlineImage:var J=C[0].cacheKey;if(J){var K=n[J];if(void 0!==K){j.addOp(K.fn,K.args),C=null;continue}}l.buildPaintImageXObject(h,C[0],!0,j,J,n),C=null;continue;case $.showText:C[0]=l.handleText(C[0],q.state);break;case $.showSpacedText:var L=C[0],M=[],N=L.length,O=q.state;for(u=0;N>u;++u){var P=L[u];y(P)?Array.prototype.push.apply(M,l.handleText(P,O)):x(P)&&M.push(P)}C[0]=M,E=$.showText;break;case $.nextLineShowText:j.addOp($.nextLine),C[0]=l.handleText(C[0],q.state),E=$.showText;break;case $.nextLineSetSpacingShowText:j.addOp($.nextLine),j.addOp($.setWordSpacing,[C.shift()]),j.addOp($.setCharSpacing,[C.shift()]),C[0]=l.handleText(C[0],q.state),E=$.showText;break;case $.setTextRenderingMode:q.state.textRenderingMode=C[0];break;case $.setFillColorSpace:q.state.fillColorSpace=Xa.parse(C[0],m,h);continue;case $.setStrokeColorSpace:q.state.strokeColorSpace=Xa.parse(C[0],m,h);continue;case $.setFillColor:w=q.state.fillColorSpace,C=w.getRgb(C,0),E=$.setFillRGBColor;break;case $.setStrokeColor:w=q.state.strokeColorSpace,C=w.getRgb(C,0),E=$.setStrokeRGBColor;break;case $.setFillGray:q.state.fillColorSpace=Xa.singletons.gray,C=Xa.singletons.gray.getRgb(C,0),E=$.setFillRGBColor;break;case $.setStrokeGray:q.state.strokeColorSpace=Xa.singletons.gray,C=Xa.singletons.gray.getRgb(C,0),E=$.setStrokeRGBColor;break;case $.setFillCMYKColor:q.state.fillColorSpace=Xa.singletons.cmyk,C=Xa.singletons.cmyk.getRgb(C,0),E=$.setFillRGBColor;break;case $.setStrokeCMYKColor:q.state.strokeColorSpace=Xa.singletons.cmyk,C=Xa.singletons.cmyk.getRgb(C,0),E=$.setStrokeRGBColor;break;case $.setFillRGBColor:q.state.fillColorSpace=Xa.singletons.rgb,C=Xa.singletons.rgb.getRgb(C,0);break;case $.setStrokeRGBColor:q.state.strokeColorSpace=Xa.singletons.rgb,C=Xa.singletons.rgb.getRgb(C,0);break;case $.setFillColorN:if(w=q.state.fillColorSpace,"Pattern"===w.name)return l.handleColorN(j,$.setFillColorN,C,w,p,h,g,m).then(function(){t(d,f)},f);C=w.getRgb(C,0),E=$.setFillRGBColor;break;case $.setStrokeColorN:if(w=q.state.strokeColorSpace,"Pattern"===w.name)return l.handleColorN(j,$.setStrokeColorN,C,w,p,h,g,m).then(function(){t(d,f)},f);C=w.getRgb(C,0),E=$.setStrokeRGBColor;break;case $.shadingFill:var Q=h.get("Shading");Q||c("No shading resource found");var R=Q.get(C[0].name);R||c("No shading object found");var S=tb.parseShading(R,null,m,h),T=S.getIR();C=[T],E=$.shadingFill;break;case $.setGState:var U=C[0],V=h.get("ExtGState");if(!B(V)||!V.has(U.name))break;var W=V.get(U.name);return l.setGState(h,W,j,g,m,q).then(function(){t(d,f)},f);case $.moveTo:case $.lineTo:case $.curveTo:case $.curveTo2:case $.curveTo3:case $.closePath:l.buildPath(j,E,C);continue;case $.rectangle:l.buildPath(j,E,C);continue;case $.markPoint:case $.markPointProps:case $.beginMarkedContent:case $.beginMarkedContentProps:case $.endMarkedContent:case $.beginCompat:case $.endCompat:continue}j.addOp(E,C)}if(k)return void i.then(function(){t(d,f)},f);for(u=0,v=r.savedStatesDepth;v>u;u++)j.addOp($.restore,[]);d()})},getTextContent:function(a,b,c,d){function g(){var a=r.font;return a.loadedName in l.styles||(l.styles[a.loadedName]={fontFamily:a.fallbackName,ascent:a.ascent,descent:a.descent,vertical:a.vertical}),{str:[],dir:null,width:0,height:0,transform:null,fontName:a.loadedName}}function h(a){var b=a.str.join(""),c=PDFJS.bidi(b,-1,r.font.vertical);return a.str=c.str,a.dir=c.dir,a}function j(a,b){return p.loadFont(a,b,q,c).then(function(a){r.font=a.font,r.fontMatrix=a.font.fontMatrix||T})}function k(a,b){var c=r.font;if(b=b||g(),!b.transform){var d=[r.fontSize*r.textHScale,0,0,r.fontSize,0,r.textRise];if(c.isType3Font&&r.fontMatrix!==T&&1===r.fontSize){var e=c.bbox[3]-c.bbox[1];e>0&&(e*=r.fontMatrix[3],d[3]*=e)}var f=b.transform=na.transform(r.ctm,na.transform(r.textMatrix,d));c.vertical?b.width=Math.sqrt(f[0]*f[0]+f[1]*f[1]):b.height=Math.sqrt(f[2]*f[2]+f[3]*f[3])}for(var h=0,i=0,j=c.charsToGlyphs(a),k=c.defaultVMetrics,l=0;l0&&(s=r.charSpacing);var t=0,u=0;if(c.vertical){var v=p*r.fontMatrix[0];u=v*r.fontSize+s,i+=u}else{var w=p*r.fontMatrix[0];t=(w*r.fontSize+s)*r.textHScale,h+=t}r.translateTextMatrix(t,u),b.str.push(q)}else h+=r.wordSpacing*r.textHScale}var x=r.textLineMatrix[0],y=r.textLineMatrix[1],z=Math.sqrt(x*x+y*y);x=r.ctm[0],y=r.ctm[1];var A=Math.sqrt(x*x+y*y);return c.vertical?b.height+=Math.abs(i*A*z):b.width+=h*A*z,b}d=d||new yb(new zb);var l={items:[],styles:Object.create(null)},m=l.items,n=.3,o=1.5,p=this,q=this.xref;c=q.fetchIfRef(c)||Aa.empty;var r,s=null,t={},u=new Bb(a,q,d),v=new f;return new Promise(function w(a,f){b.ensureNotTerminated(),v.reset();for(var q,x={},y=[];!(q=v.check())&&(y.length=0,x.args=y,u.read(x));){r=d.state;var A=x.fn;switch(y=x.args,0|A){case $.setFont:return r.fontSize=y[1],j(y[0].name).then(function(){w(a,f)},f);case $.setTextRise:r.textRise=y[0];break;case $.setHScale:r.textHScale=y[0]/100;break;case $.setLeading:r.leading=y[0];break;case $.moveText:r.translateTextLineMatrix(y[0],y[1]),r.textMatrix=r.textLineMatrix.slice();break;case $.setLeadingMoveText:r.leading=-y[1],r.translateTextLineMatrix(y[0],y[1]),r.textMatrix=r.textLineMatrix.slice();break;case $.nextLine:r.carriageReturn();break;case $.setTextMatrix:r.setTextMatrix(y[0],y[1],y[2],y[3],y[4],y[5]),r.setTextLineMatrix(y[0],y[1],y[2],y[3],y[4],y[5]);break;case $.setCharSpacing:r.charSpacing=y[0];break;case $.setWordSpacing:r.wordSpacing=y[0];break;case $.beginText:r.textMatrix=ma.slice(),r.textLineMatrix=ma.slice();break;case $.showSpacedText:for(var E,F=y[0],G=g(),H=0,I=F.length;I>H;H++)if("string"==typeof F[H])k(F[H],G);else{var J=F[H]*r.fontSize/1e3;if(r.font.vertical?(E=J*r.textMatrix[3],r.translateTextMatrix(0,E),G.height+=E):(E=J*r.textHScale*r.textMatrix[0],r.translateTextMatrix(E,0),G.width-=E),F[H]<0&&r.font.spaceWidth>0){var K=-F[H]/r.font.spaceWidth;if(K>o)for(K=Math.round(K);K--;)G.str.push(" ");else K>n&&G.str.push(" ")}}m.push(h(G));break;case $.showText:m.push(h(k(y[0])));break;case $.nextLineShowText:r.carriageReturn(),m.push(h(k(y[0])));break;case $.nextLineSetSpacingShowText:r.wordSpacing=y[0],r.charSpacing=y[1],r.carriageReturn(),m.push(h(k(y[2])));break;case $.paintXObject:if(y[0].code)break;s||(s=c.get("XObject")||Aa.empty);var L=y[0].name;if(t.key===L){t.texts&&(na.appendToArray(m,t.texts.items),na.extendObj(l.styles,t.texts.styles));break}var M=s.get(L);if(!M)break;e(D(M),"XObject should be a stream");var N=M.dict.get("Subtype");if(e(z(N),"XObject should have a Name subtype"),"Form"!==N.name){t.key=L,t.texts=null;break}d.save();var O=M.dict.get("Matrix");return C(O)&&6===O.length&&d.transform(O),p.getTextContent(M,b,M.dict.get("Resources")||c,d).then(function(b){na.appendToArray(m,b.items),na.extendObj(l.styles,b.styles),d.restore(),t.key=L,t.texts=b,w(a,f)},f);case $.setGState:var P=y[0],Q=c.get("ExtGState");if(!B(Q)||!Q.has(P.name))break;var R=Q.get(P.name),S=null;for(var T in R)"Font"===T&&(e(!S),S=R[T]);if(S)return r.fontSize=S[1],j(S[0]).then(function(){w(a,f)},f)}}return q?void i.then(function(){w(a,f)},f):void a(l)})},extractDataStructures:function(a,b,d,e){var f=a.get("ToUnicode")||b.get("ToUnicode");if(f&&(e.toUnicode=this.readToUnicode(f)),e.composite){var g=a.get("CIDSystemInfo");B(g)&&(e.cidSystemInfo={registry:g.get("Registry"),ordering:g.get("Ordering"),supplement:g.get("Supplement")});var h=a.get("CIDToGIDMap");D(h)&&(e.cidToGidMap=this.readCidToGidMap(h))}var i,j=[],k=null;if(a.has("Encoding")){if(i=a.get("Encoding"),B(i)){if(k=i.get("BaseEncoding"),k=z(k)?k.name:null,i.has("Differences"))for(var l=i.get("Differences"),m=0,n=0,o=l.length;o>n;n++){var p=l[n];if(x(p))m=p;else if(z(p))j[m++]=p.name;else{if(F(p)){l[n--]=d.fetch(p);continue}c("Invalid entry in 'Differences' array: "+p)}}}else z(i)?k=i.name:c("Encoding is not a Name nor a Dict");"MacRomanEncoding"!==k&&"MacExpertEncoding"!==k&&"WinAnsiEncoding"!==k&&(k=null)}k?e.defaultEncoding=Pb[k].slice():(i="TrueType"===e.type?Pb.WinAnsiEncoding:Pb.StandardEncoding,e.flags&Ob.Symbolic&&(i=Pb.MacRomanEncoding,e.file||(/Symbol/i.test(e.name)?i=Pb.SymbolSetEncoding:/Dingbats/i.test(e.name)&&(i=Pb.ZapfDingbatsEncoding))),e.defaultEncoding=i),e.differences=j,e.baseEncodingName=k,e.dict=a},readToUnicode:function(a){var b,c=a;if(z(c))return b=Hb.create(c,{url:PDFJS.cMapUrl,packed:PDFJS.cMapPacked},null),b instanceof Fb?new ac(0,65535):new _b(b.getMap());if(D(c)){if(b=Hb.create(c,{url:PDFJS.cMapUrl,packed:PDFJS.cMapPacked},null),b instanceof Fb)return new ac(0,65535);var d=new Array(b.length);return b.forEach(function(a,b){for(var c=[],e=0;ed;d++){var f=b[d++]<<8|b[d];if(0!==f){var g=d>>1;c[g]=f}}return c},extractWidths:function(a,b,c,d){var e,f,g,h,i,j,k,l,m=[],n=0,o=[];if(d.composite){if(n=a.get("DW")||1e3,l=a.get("W"))for(f=0,g=l.length;g>f;f++)if(j=l[f++],k=b.fetchIfRef(l[f]),C(k))for(h=0,i=k.length;i>h;h++)m[j++]=k[h];else{var p=l[++f];for(h=j;k>=h;h++)m[h]=p}if(d.vertical){var q=a.get("DW2")||[880,-1e3];if(e=[q[1],.5*n,q[0]],q=a.get("W2"))for(f=0,g=q.length;g>f;f++)if(j=q[f++],k=b.fetchIfRef(q[f]),C(k))for(h=0,i=k.length;i>h;h++)o[j++]=[k[h++],k[h++],k[h]];else{var r=[q[++f],q[++f],q[++f]];for(h=j;k>=h;h++)o[h]=r}}}else{var s=d.firstChar;if(l=a.get("Widths")){for(h=s,f=0,g=l.length;g>f;f++)m[h++]=l[f];n=parseFloat(c.get("MissingWidth"))||0}else{var t=a.get("BaseFont");if(z(t)){var u=this.getBaseFontMetrics(t.name);m=this.buildCharCodeToWidth(u.widths,d),n=u.defaultWidth}}}var v=!0,w=n;for(var x in m){var y=m[x];if(y)if(w){if(w!==y){v=!1;break}}else w=y}v&&(d.flags|=Ob.FixedPitch),d.defaultWidth=n,d.widths=m,d.defaultVMetrics=e,d.vmetrics=o},isSerifFont:function(a){var b=a.split("-")[0];return b in Sb||-1!==b.search(/serif/gi)},getBaseFontMetrics:function(a){var b=0,c=[],d=!1,e=Qb[a]||a;e in Cc||(e=this.isSerifFont(a)?"Times-Roman":"Helvetica");var f=Cc[e];return x(f)?(b=f,d=!0):c=f,{defaultWidth:b,monospace:d,widths:c}},buildCharCodeToWidth:function(a,b){for(var c=Object.create(null),d=b.differences,e=b.defaultEncoding,f=0;256>f;f++)f in d&&a[d[f]]?c[f]=a[d[f]]:f in e&&a[e[f]]&&(c[f]=a[e[f]]);return c},preEvaluateFont:function(a,b){var d=a,f=a.get("Subtype");e(z(f),"invalid font Subtype");var g,h=!1;if("Type0"===f.name){var i=a.get("DescendantFonts");i||c("Descendant fonts are not specified"),a=C(i)?b.fetchIfRef(i[0]):i,f=a.get("Subtype"),e(z(f),"invalid font Subtype"),h=!0}var j=a.get("FontDescriptor");if(j){var k=new jd,l=d.getRaw("Encoding");if(z(l))k.update(l.name);else if(F(l))k.update(l.num+"_"+l.gen);else if(B(l))for(var m=l.getKeys(),n=0,o=m.length;o>n;n++){var p=l.getRaw(m[n]);z(p)?k.update(p.name):F(p)?k.update(p.num+"_"+p.gen):C(p)&&k.update(p.length.toString())}var q=a.get("ToUnicode")||d.get("ToUnicode");if(D(q)){var r=q.str||q;g=r.buffer?new Uint8Array(r.buffer.buffer,0,r.bufferLength):new Uint8Array(r.bytes.buffer,r.start,r.end-r.start),k.update(g)}else z(q)&&k.update(q.name);var s=a.get("Widths")||d.get("Widths");s&&(g=new Uint8Array(new Uint32Array(s).buffer),k.update(g))}return{descriptor:j,dict:a,baseDict:d,composite:h,type:f.name,hash:k?k.hexdigest():""}},translateFont:function(b,d){var f,g=b.baseDict,h=b.dict,i=b.composite,j=b.descriptor,k=b.type,l=i?65535:255;if(!j){if("Type3"!==k){var m=h.get("BaseFont");z(m)||c("Base font is not specified"),m=m.name.replace(/[,_]/g,"-");var n=this.getBaseFontMetrics(m),o=m.split("-")[0],p=(this.isSerifFont(o)?Ob.Serif:0)|(n.monospace?Ob.FixedPitch:0)|(Tb[o]?Ob.Symbolic:Ob.Nonsymbolic);return f={type:k,name:m,widths:n.widths,defaultWidth:n.defaultWidth,flags:p,firstChar:0,lastChar:l},this.extractDataStructures(h,h,d,f),f.widths=this.buildCharCodeToWidth(n.widths,f),new dc(m,null,f)}j=new Aa(null),j.set("FontName",ya.get(k)),j.set("FontBBox",h.get("FontBBox"))}var q=h.get("FirstChar")||0,r=h.get("LastChar")||l,s=j.get("FontName"),t=h.get("BaseFont");if(y(s)&&(s=ya.get(s)),y(t)&&(t=ya.get(t)),"Type3"!==k){var u=s&&s.name,v=t&&t.name;u!==v&&(a("The FontDescriptor's FontName is \""+u+'" but should be the same as the Font\'s BaseFont "'+v+'"'),u&&v&&0===v.indexOf(u)&&(s=t))}s=s||t,e(z(s),"invalid font name");var w=j.get("FontFile","FontFile2","FontFile3");if(w&&w.dict){var x=w.dict.get("Subtype");x&&(x=x.name);var A=w.dict.get("Length1"),B=w.dict.get("Length2")}if(f={type:k,name:s.name,subtype:x,file:w,length1:A,length2:B,loadedName:g.loadedName,composite:i,wideChars:i,fixedPitch:!1,fontMatrix:h.get("FontMatrix")||T,firstChar:q||0,lastChar:r||l,bbox:j.get("FontBBox"),ascent:j.get("Ascent"),descent:j.get("Descent"),xHeight:j.get("XHeight"),capHeight:j.get("CapHeight"),flags:j.get("Flags"),italicAngle:j.get("ItalicAngle"),coded:!1},i){var C=g.get("Encoding");z(C)&&(f.cidEncoding=C.name),f.cMap=Hb.create(C,{url:PDFJS.cMapUrl,packed:PDFJS.cMapPacked},null),f.vertical=f.cMap.vertical}return this.extractDataStructures(h,g,d,f),this.extractWidths(h,d,j,f),"Type3"===k&&(f.isType3Font=!0),new dc(s.name,w,f)}},d}(),wb=function(){function a(a,b,c){this.loadedName=a,this.font=b,this.dict=c,this.type3Loaded=null,this.sent=!1}return a.prototype={send:function(a){if(!this.sent){var b=this.font.exportData();a.send("commonobj",[this.loadedName,"Font",b]),this.sent=!0}},loadType3Data:function(a,c,d,f){if(e(this.font.isType3Font),this.type3Loaded)return this.type3Loaded;for(var g=this.font,h=Promise.resolve(),i=this.dict.get("CharProcs").getAll(),j=this.dict.get("Resources")||c,k=Object.keys(i),l={},m=0,n=k.length;n>m;++m)h=h.then(function(c){var e=i[c],g=new xb;return a.getOperatorList(e,f,j,g).then(function(){l[c]=g.getIR(),d.addDependencies(g.dependencies)},function(a){b('Type3 font resource "'+c+'" is not available');var d=new xb;l[c]=d.getIR()})}.bind(this,k[m]));return this.type3Loaded=h.then(function(){g.charProcOperatorList=l}),this.type3Loaded}},a}(),xb=function(){function a(a){for(var b=[],c=a.fnArray,d=a.argsArray,e=0,f=a.length;f>e;e++)switch(c[e]){case $.paintInlineImageXObject:case $.paintInlineImageXObjectGroup:case $.paintImageMaskXObject:var g=d[e][0];g.cached||b.push(g.data.buffer)}return b}function b(a,b,c){this.messageHandler=b,this.fnArray=[],this.argsArray=[],this.dependencies={},this.pageIndex=c,this.intent=a}var c=1e3,d=c-5;return b.prototype={get length(){return this.argsArray.length},addOp:function(a,b){this.fnArray.push(a),this.argsArray.push(b),this.messageHandler&&(this.fnArray.length>=c?this.flush():this.fnArray.length>=d&&(a===$.restore||a===$.endText)&&this.flush())},addDependency:function(a){ -a in this.dependencies||(this.dependencies[a]=!0,this.addOp($.dependency,[a]))},addDependencies:function(a){for(var b in a)this.addDependency(b)},addOpList:function(a){na.extendObj(this.dependencies,a.dependencies);for(var b=0,c=a.length;c>b;b++)this.addOp(a.fnArray[b],a.argsArray[b])},getIR:function(){return{fnArray:this.fnArray,argsArray:this.argsArray,length:this.length}},flush:function(b){"oplist"!==this.intent&&(new Cb).optimize(this);var c=a(this);this.messageHandler.send("RenderPageChunk",{operatorList:{fnArray:this.fnArray,argsArray:this.argsArray,lastChunk:b,length:this.length},pageIndex:this.pageIndex,intent:this.intent},c),this.dependencies={},this.fnArray.length=0,this.argsArray.length=0}},b}(),yb=function(){function a(a){this.state=a,this.stateStack=[]}return a.prototype={save:function(){var a=this.state;this.stateStack.push(this.state),this.state=a.clone()},restore:function(){var a=this.stateStack.pop();a&&(this.state=a)},transform:function(a){this.state.ctm=na.transform(this.state.ctm,a)}},a}(),zb=function(){function a(){this.ctm=new Float32Array(ma),this.fontSize=0,this.font=null,this.fontMatrix=T,this.textMatrix=ma.slice(),this.textLineMatrix=ma.slice(),this.charSpacing=0,this.wordSpacing=0,this.leading=0,this.textHScale=1,this.textRise=0}return a.prototype={setTextMatrix:function(a,b,c,d,e,f){var g=this.textMatrix;g[0]=a,g[1]=b,g[2]=c,g[3]=d,g[4]=e,g[5]=f},setTextLineMatrix:function(a,b,c,d,e,f){var g=this.textLineMatrix;g[0]=a,g[1]=b,g[2]=c,g[3]=d,g[4]=e,g[5]=f},translateTextMatrix:function(a,b){var c=this.textMatrix;c[4]=c[0]*a+c[2]*b+c[4],c[5]=c[1]*a+c[3]*b+c[5]},translateTextLineMatrix:function(a,b){var c=this.textLineMatrix;c[4]=c[0]*a+c[2]*b+c[4],c[5]=c[1]*a+c[3]*b+c[5]},calcRenderMatrix:function(a){var b=[this.fontSize*this.textHScale,0,0,this.fontSize,0,this.textRise];return na.transform(a,na.transform(this.textMatrix,b))},carriageReturn:function(){this.translateTextLineMatrix(0,-this.leading),this.textMatrix=this.textLineMatrix.slice()},clone:function(){var a=Object.create(this);return a.textMatrix=this.textMatrix.slice(),a.textLineMatrix=this.textLineMatrix.slice(),a.fontMatrix=this.fontMatrix.slice(),a}},a}(),Ab=function(){function a(){this.ctm=new Float32Array(ma),this.font=null,this.textRenderingMode=U.FILL,this.fillColorSpace=Xa.singletons.gray,this.strokeColorSpace=Xa.singletons.gray}return a.prototype={clone:function(){return Object.create(this)}},a}(),Bb=function(){function c(a,b,c){this.parser=new Fc(new Gc(a,d),!1,b),this.stateManager=c,this.nonProcessedArgs=[]}var d={w:{id:$.setLineWidth,numArgs:1,variableArgs:!1},J:{id:$.setLineCap,numArgs:1,variableArgs:!1},j:{id:$.setLineJoin,numArgs:1,variableArgs:!1},M:{id:$.setMiterLimit,numArgs:1,variableArgs:!1},d:{id:$.setDash,numArgs:2,variableArgs:!1},ri:{id:$.setRenderingIntent,numArgs:1,variableArgs:!1},i:{id:$.setFlatness,numArgs:1,variableArgs:!1},gs:{id:$.setGState,numArgs:1,variableArgs:!1},q:{id:$.save,numArgs:0,variableArgs:!1},Q:{id:$.restore,numArgs:0,variableArgs:!1},cm:{id:$.transform,numArgs:6,variableArgs:!1},m:{id:$.moveTo,numArgs:2,variableArgs:!1},l:{id:$.lineTo,numArgs:2,variableArgs:!1},c:{id:$.curveTo,numArgs:6,variableArgs:!1},v:{id:$.curveTo2,numArgs:4,variableArgs:!1},y:{id:$.curveTo3,numArgs:4,variableArgs:!1},h:{id:$.closePath,numArgs:0,variableArgs:!1},re:{id:$.rectangle,numArgs:4,variableArgs:!1},S:{id:$.stroke,numArgs:0,variableArgs:!1},s:{id:$.closeStroke,numArgs:0,variableArgs:!1},f:{id:$.fill,numArgs:0,variableArgs:!1},F:{id:$.fill,numArgs:0,variableArgs:!1},"f*":{id:$.eoFill,numArgs:0,variableArgs:!1},B:{id:$.fillStroke,numArgs:0,variableArgs:!1},"B*":{id:$.eoFillStroke,numArgs:0,variableArgs:!1},b:{id:$.closeFillStroke,numArgs:0,variableArgs:!1},"b*":{id:$.closeEOFillStroke,numArgs:0,variableArgs:!1},n:{id:$.endPath,numArgs:0,variableArgs:!1},W:{id:$.clip,numArgs:0,variableArgs:!1},"W*":{id:$.eoClip,numArgs:0,variableArgs:!1},BT:{id:$.beginText,numArgs:0,variableArgs:!1},ET:{id:$.endText,numArgs:0,variableArgs:!1},Tc:{id:$.setCharSpacing,numArgs:1,variableArgs:!1},Tw:{id:$.setWordSpacing,numArgs:1,variableArgs:!1},Tz:{id:$.setHScale,numArgs:1,variableArgs:!1},TL:{id:$.setLeading,numArgs:1,variableArgs:!1},Tf:{id:$.setFont,numArgs:2,variableArgs:!1},Tr:{id:$.setTextRenderingMode,numArgs:1,variableArgs:!1},Ts:{id:$.setTextRise,numArgs:1,variableArgs:!1},Td:{id:$.moveText,numArgs:2,variableArgs:!1},TD:{id:$.setLeadingMoveText,numArgs:2,variableArgs:!1},Tm:{id:$.setTextMatrix,numArgs:6,variableArgs:!1},"T*":{id:$.nextLine,numArgs:0,variableArgs:!1},Tj:{id:$.showText,numArgs:1,variableArgs:!1},TJ:{id:$.showSpacedText,numArgs:1,variableArgs:!1},"'":{id:$.nextLineShowText,numArgs:1,variableArgs:!1},'"':{id:$.nextLineSetSpacingShowText,numArgs:3,variableArgs:!1},d0:{id:$.setCharWidth,numArgs:2,variableArgs:!1},d1:{id:$.setCharWidthAndBounds,numArgs:6,variableArgs:!1},CS:{id:$.setStrokeColorSpace,numArgs:1,variableArgs:!1},cs:{id:$.setFillColorSpace,numArgs:1,variableArgs:!1},SC:{id:$.setStrokeColor,numArgs:4,variableArgs:!0},SCN:{id:$.setStrokeColorN,numArgs:33,variableArgs:!0},sc:{id:$.setFillColor,numArgs:4,variableArgs:!0},scn:{id:$.setFillColorN,numArgs:33,variableArgs:!0},G:{id:$.setStrokeGray,numArgs:1,variableArgs:!1},g:{id:$.setFillGray,numArgs:1,variableArgs:!1},RG:{id:$.setStrokeRGBColor,numArgs:3,variableArgs:!1},rg:{id:$.setFillRGBColor,numArgs:3,variableArgs:!1},K:{id:$.setStrokeCMYKColor,numArgs:4,variableArgs:!1},k:{id:$.setFillCMYKColor,numArgs:4,variableArgs:!1},sh:{id:$.shadingFill,numArgs:1,variableArgs:!1},BI:{id:$.beginInlineImage,numArgs:0,variableArgs:!1},ID:{id:$.beginImageData,numArgs:0,variableArgs:!1},EI:{id:$.endInlineImage,numArgs:1,variableArgs:!1},Do:{id:$.paintXObject,numArgs:1,variableArgs:!1},MP:{id:$.markPoint,numArgs:1,variableArgs:!1},DP:{id:$.markPointProps,numArgs:2,variableArgs:!1},BMC:{id:$.beginMarkedContent,numArgs:1,variableArgs:!1},BDC:{id:$.beginMarkedContentProps,numArgs:2,variableArgs:!1},EMC:{id:$.endMarkedContent,numArgs:0,variableArgs:!1},BX:{id:$.beginCompat,numArgs:0,variableArgs:!1},EX:{id:$.endCompat,numArgs:0,variableArgs:!1},BM:null,BD:null,"true":null,fa:null,fal:null,fals:null,"false":null,nu:null,nul:null,"null":null};return c.prototype={get savedStatesDepth(){return this.stateManager.stateStack.length},read:function(c){for(var f=c.args;;){var g=this.parser.getObj();if(A(g)){var h=g.cmd,i=d[h];if(!i){b('Unknown command "'+h+'"');continue}var j=i.id,k=i.numArgs,l=null!==f?f.length:0;if(i.variableArgs)l>k&&a("Command "+j+": expected [0,"+k+"] args, but received "+l+" args");else{if(l!==k){for(var m=this.nonProcessedArgs;l>k;)m.push(f.shift()),l--;for(;k>l&&0!==m.length;)f||(f=[]),f.unshift(m.pop()),l++}if(k>l){a("Command "+j+": because expected "+k+" args, but received "+l+" args; skipping"),f=null;continue}}return this.preprocessCommand(j,f),c.fn=j,c.args=f,!0}if(R(g))return!1;null!==g&&(f||(f=[]),f.push(g instanceof Aa?g.getAll():g),e(f.length<=33,"Too many arguments"))}},preprocessCommand:function(a,b){switch(0|a){case $.save:this.stateManager.save();break;case $.restore:this.stateManager.restore();break;case $.transform:this.stateManager.transform(b)}}},c}(),Cb=function(){function a(a,b,c){for(var d=a,e=0,f=b.length-1;f>e;e++){var g=b[e];d=d[g]||(d[g]=[])}d[b[b.length-1]]=c}function b(a,b,c,d){for(var e=a+2,f=0;b>f;f++){var g=d[e+4*f],h=1===g.length&&g[0];if(!h||1!==h.width||1!==h.height||h.data.length&&(1!==h.data.length||0!==h.data[0]))break;c[e+4*f]=$.paintSolidColorImageMask}return b-f}function c(){}var d=[];return a(d,[$.save,$.transform,$.paintInlineImageXObject,$.restore],function(a){for(var b=10,c=200,d=1e3,e=1,f=a.fnArray,g=a.argsArray,h=a.iCurr,i=h-3,j=h-2,k=h-1,l=i+4,m=f.length;m>l+3&&f[l]===$.save&&f[l+1]===$.transform&&f[l+2]===$.paintInlineImageXObject&&f[l+3]===$.restore;)l+=4;var n=Math.min((l-i)/4,c);if(b>n)return l;var o,p=0,q=[],r=0,s=e,t=e;for(o=0;n>o;o++){var u=g[j+(o<<2)],v=g[k+(o<<2)][0];s+v.width>d&&(p=Math.max(p,s),t+=r+2*e,s=0,r=0),q.push({transform:u,x:s,y:t,w:v.width,h:v.height}),s+=v.width+2*e,r=Math.max(r,v.height)}var w=Math.max(p,s)+e,x=t+r+e,y=new Uint8Array(w*x*4),z=w<<2;for(o=0;n>o;o++){var A=g[k+(o<<2)][0].data,B=q[o].w<<2,C=0,D=q[o].x+q[o].y*w<<2;y.set(A.subarray(0,B),D-z);for(var E=0,F=q[o].h;F>E;E++)y.set(A.subarray(C,C+B),D),C+=B,D+=z;for(y.set(A.subarray(C-B,C),D);D>=0;)A[D-4]=A[D],A[D-3]=A[D+1],A[D-2]=A[D+2],A[D-1]=A[D+3],A[D+B]=A[D+B-4],A[D+B+1]=A[D+B-3],A[D+B+2]=A[D+B-2],A[D+B+3]=A[D+B-1],D-=z}return f.splice(i,4*n,$.paintInlineImageXObjectGroup),g.splice(i,4*n,[{width:w,height:x,kind:V.RGBA_32BPP,data:y},q]),i+1}),a(d,[$.save,$.transform,$.paintImageMaskXObject,$.restore],function(a){for(var c=10,d=100,e=1e3,f=a.fnArray,g=a.argsArray,h=a.iCurr,i=h-3,j=h-2,k=h-1,l=i+4,m=f.length;m>l+3&&f[l]===$.save&&f[l+1]===$.transform&&f[l+2]===$.paintImageMaskXObject&&f[l+3]===$.restore;)l+=4;var n=(l-i)/4;if(n=b(i,n,f,g),c>n)return l;var o,p,q,r=!1,s=g[k][0];if(0===g[j][1]&&0===g[j][2]){r=!0;var t=g[j][0],u=g[j][3];p=j+4;var v=k+4;for(o=1;n>o;o++,p+=4,v+=4)if(q=g[p],g[v][0]!==s||q[0]!==t||0!==q[1]||0!==q[2]||q[3]!==u){c>o?r=!1:n=o;break}}if(r){n=Math.min(n,e);var w=new Float32Array(2*n);for(p=j,o=0;n>o;o++,p+=4)q=g[p],w[o<<1]=q[4],w[(o<<1)+1]=q[5];f.splice(i,4*n,$.paintImageMaskXObjectRepeat),g.splice(i,4*n,[s,t,u,w])}else{n=Math.min(n,d);var x=[];for(o=0;n>o;o++){q=g[j+(o<<2)];var y=g[k+(o<<2)][0];x.push({data:y.data,width:y.width,height:y.height,transform:q})}f.splice(i,4*n,$.paintImageMaskXObjectGroup),g.splice(i,4*n,[x])}return i+1}),a(d,[$.save,$.transform,$.paintImageXObject,$.restore],function(a){var b=3,c=1e3,d=a.fnArray,e=a.argsArray,f=a.iCurr,g=f-3,h=f-2,i=f-1,j=f;if(0!==e[h][1]||0!==e[h][2])return j+1;for(var k=e[i][0],l=e[h][0],m=e[h][3],n=g+4,o=d.length;o>n+3&&d[n]===$.save&&d[n+1]===$.transform&&d[n+2]===$.paintImageXObject&&d[n+3]===$.restore&&e[n+1][0]===l&&0===e[n+1][1]&&0===e[n+1][2]&&e[n+1][3]===m&&e[n+2][0]===k;)n+=4;var p=Math.min((n-g)/4,c);if(b>p)return n;for(var q=new Float32Array(2*p),r=h,s=0;p>s;s++,r+=4){var t=e[r];q[s<<1]=t[4],q[(s<<1)+1]=t[5]}var u=[k,l,m,q];return d.splice(g,4*p,$.paintImageXObjectRepeat),e.splice(g,4*p,u),g+1}),a(d,[$.beginText,$.setFont,$.setTextMatrix,$.showText,$.endText],function(a){for(var b=3,c=1e3,d=a.fnArray,e=a.argsArray,f=a.iCurr,g=f-4,h=f-3,i=f-2,j=f-1,k=f,l=e[h][0],m=e[h][1],n=g+5,o=d.length;o>n+4&&d[n]===$.beginText&&d[n+1]===$.setFont&&d[n+2]===$.setTextMatrix&&d[n+3]===$.showText&&d[n+4]===$.endText&&e[n+1][0]===l&&e[n+1][1]===m;)n+=5;var p=Math.min((n-g)/5,c);if(b>p)return n;var q=g;g>=4&&d[g-4]===d[h]&&d[g-3]===d[i]&&d[g-2]===d[j]&&d[g-1]===d[k]&&e[g-4][0]===l&&e[g-4][1]===m&&(p++,q-=5);for(var r=q+4,s=1;p>s;s++)d.splice(r,3),e.splice(r,3),r+=2;return r+1}),c.prototype={optimize:function(a){for(var b,c=a.fnArray,e=a.argsArray,f={iCurr:0,fnArray:c,argsArray:e},g=0,h=c.length;h>g;)b=(b||d)[c[g]],"function"==typeof b?(f.iCurr=g,g=b(f),b=void 0,h=f.fnArray.length):g++}},c}(),Db=["Adobe-GB1-UCS2","Adobe-CNS1-UCS2","Adobe-Japan1-UCS2","Adobe-Korea1-UCS2","78-EUC-H","78-EUC-V","78-H","78-RKSJ-H","78-RKSJ-V","78-V","78ms-RKSJ-H","78ms-RKSJ-V","83pv-RKSJ-H","90ms-RKSJ-H","90ms-RKSJ-V","90msp-RKSJ-H","90msp-RKSJ-V","90pv-RKSJ-H","90pv-RKSJ-V","Add-H","Add-RKSJ-H","Add-RKSJ-V","Add-V","Adobe-CNS1-0","Adobe-CNS1-1","Adobe-CNS1-2","Adobe-CNS1-3","Adobe-CNS1-4","Adobe-CNS1-5","Adobe-CNS1-6","Adobe-GB1-0","Adobe-GB1-1","Adobe-GB1-2","Adobe-GB1-3","Adobe-GB1-4","Adobe-GB1-5","Adobe-Japan1-0","Adobe-Japan1-1","Adobe-Japan1-2","Adobe-Japan1-3","Adobe-Japan1-4","Adobe-Japan1-5","Adobe-Japan1-6","Adobe-Korea1-0","Adobe-Korea1-1","Adobe-Korea1-2","B5-H","B5-V","B5pc-H","B5pc-V","CNS-EUC-H","CNS-EUC-V","CNS1-H","CNS1-V","CNS2-H","CNS2-V","ETHK-B5-H","ETHK-B5-V","ETen-B5-H","ETen-B5-V","ETenms-B5-H","ETenms-B5-V","EUC-H","EUC-V","Ext-H","Ext-RKSJ-H","Ext-RKSJ-V","Ext-V","GB-EUC-H","GB-EUC-V","GB-H","GB-V","GBK-EUC-H","GBK-EUC-V","GBK2K-H","GBK2K-V","GBKp-EUC-H","GBKp-EUC-V","GBT-EUC-H","GBT-EUC-V","GBT-H","GBT-V","GBTpc-EUC-H","GBTpc-EUC-V","GBpc-EUC-H","GBpc-EUC-V","H","HKdla-B5-H","HKdla-B5-V","HKdlb-B5-H","HKdlb-B5-V","HKgccs-B5-H","HKgccs-B5-V","HKm314-B5-H","HKm314-B5-V","HKm471-B5-H","HKm471-B5-V","HKscs-B5-H","HKscs-B5-V","Hankaku","Hiragana","KSC-EUC-H","KSC-EUC-V","KSC-H","KSC-Johab-H","KSC-Johab-V","KSC-V","KSCms-UHC-H","KSCms-UHC-HW-H","KSCms-UHC-HW-V","KSCms-UHC-V","KSCpc-EUC-H","KSCpc-EUC-V","Katakana","NWP-H","NWP-V","RKSJ-H","RKSJ-V","Roman","UniCNS-UCS2-H","UniCNS-UCS2-V","UniCNS-UTF16-H","UniCNS-UTF16-V","UniCNS-UTF32-H","UniCNS-UTF32-V","UniCNS-UTF8-H","UniCNS-UTF8-V","UniGB-UCS2-H","UniGB-UCS2-V","UniGB-UTF16-H","UniGB-UTF16-V","UniGB-UTF32-H","UniGB-UTF32-V","UniGB-UTF8-H","UniGB-UTF8-V","UniJIS-UCS2-H","UniJIS-UCS2-HW-H","UniJIS-UCS2-HW-V","UniJIS-UCS2-V","UniJIS-UTF16-H","UniJIS-UTF16-V","UniJIS-UTF32-H","UniJIS-UTF32-V","UniJIS-UTF8-H","UniJIS-UTF8-V","UniJIS2004-UTF16-H","UniJIS2004-UTF16-V","UniJIS2004-UTF32-H","UniJIS2004-UTF32-V","UniJIS2004-UTF8-H","UniJIS2004-UTF8-V","UniJISPro-UCS2-HW-V","UniJISPro-UCS2-V","UniJISPro-UTF8-V","UniJISX0213-UTF32-H","UniJISX0213-UTF32-V","UniJISX02132004-UTF32-H","UniJISX02132004-UTF32-V","UniKS-UCS2-H","UniKS-UCS2-V","UniKS-UTF16-H","UniKS-UTF16-V","UniKS-UTF32-H","UniKS-UTF32-V","UniKS-UTF8-H","UniKS-UTF8-V","V","WP-Symbol"],Eb=function(){function a(a){this.codespaceRanges=[[],[],[],[]],this.numCodespaceRanges=0,this._map=[],this.name="",this.vertical=!1,this.useCMap=null,this.builtInCMap=a}return a.prototype={addCodespaceRange:function(a,b,c){this.codespaceRanges[a-1].push(b,c),this.numCodespaceRanges++},mapCidRange:function(a,b,c){for(;b>=a;)this._map[a++]=c++},mapBfRange:function(a,b,c){for(var d=c.length-1;b>=a;)this._map[a++]=c,c=c.substr(0,d)+String.fromCharCode(c.charCodeAt(d)+1)},mapBfRangeToArray:function(a,b,c){for(var d=0,e=c.length;b>=a&&e>d;)this._map[a]=c[d++],++a},mapOne:function(a,b){this._map[a]=b},lookup:function(a){return this._map[a]},contains:function(a){return void 0!==this._map[a]},forEach:function(a){var b,c=this._map,d=c.length;if(65536>=d)for(b=0;d>b;b++)void 0!==c[b]&&a(b,c[b]);else for(b in this._map)a(b,c[b])},charCodeOf:function(a){return this._map.indexOf(a)},getMap:function(){return this._map},readCharCode:function(a,b,c){for(var d=0,e=this.codespaceRanges,f=this.codespaceRanges.length,g=0;f>g;g++){d=(d<<8|a.charCodeAt(b+g))>>>0;for(var h=e[g],i=0,j=h.length;j>i;){var k=h[i++],l=h[i++];if(d>=k&&l>=d)return c.charcode=d,void(c.length=g+1)}}c.charcode=0,c.length=1},get length(){return this._map.length},get isIdentityCMap(){if("Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(var a=0;65536>a;a++)if(this._map[a]!==a)return!1;return!0}},a}(),Fb=function(){function a(a,b){Eb.call(this),this.vertical=a,this.addCodespaceRange(b,0,65535)}return na.inherit(a,Eb,{}),a.prototype={addCodespaceRange:Eb.prototype.addCodespaceRange,mapCidRange:function(a,b,d){c("should not call mapCidRange")},mapBfRange:function(a,b,d){c("should not call mapBfRange")},mapBfRangeToArray:function(a,b,d){c("should not call mapBfRangeToArray")},mapOne:function(a,b){c("should not call mapCidOne")},lookup:function(a){return w(a)&&65535>=a?a:void 0},contains:function(a){return w(a)&&65535>=a},forEach:function(a){for(var b=0;65535>=b;b++)a(b,b)},charCodeOf:function(a){return w(a)&&65535>=a?a:-1},getMap:function(){for(var a=new Array(65536),b=0;65535>=b;b++)a[b]=b;return a},readCharCode:Eb.prototype.readCharCode,get length(){return 65536},get isIdentityCMap(){c("should not access .isIdentityCMap")}},a}(),Gb=function(){function a(a){var b=PDFJS.disableWorker,d=new XMLHttpRequest;if(d.open("GET",a,!1),!b)try{d.responseType="arraybuffer",b="arraybuffer"!==d.responseType}catch(e){b=!0}if(b&&d.overrideMimeType&&d.overrideMimeType("text/plain; charset=x-user-defined"),d.send(null),(b?d.responseText:d.response)||c("Unable to get binary cMap at: "+a),b){var f=Array.prototype.map.call(d.responseText,function(a){return 255&a.charCodeAt(0)});return new Uint8Array(f)}return new Uint8Array(d.response)}function b(a,b){for(var c=0,d=0;b>=d;d++)c=c<<8|a[d];return c>>>0}function d(a,b){return 1===b?String.fromCharCode(a[0],a[1]):3===b?String.fromCharCode(a[0],a[1],a[2],a[3]):String.fromCharCode.apply(null,a.subarray(0,b+1))}function f(a,b,c){for(var d=0,e=c;e>=0;e--)d+=a[e]+b[e],a[e]=255&d,d>>=8}function g(a,b){for(var c=1,d=b;d>=0&&c>0;d--)c+=a[d],a[d]=255&c,c>>=8}function h(a){this.buffer=a,this.pos=0,this.end=a.length,this.tmpBuf=new Uint8Array(l)}function i(i,j,l){var m=a(i),n=new h(m),o=n.readByte();j.vertical=!!(1&o);for(var p,q,r=null,s=new Uint8Array(k),t=new Uint8Array(k),u=new Uint8Array(k),v=new Uint8Array(k),w=new Uint8Array(k);(q=n.readByte())>=0;){var x=q>>5;if(7!==x){var y=!!(16&q),z=15&q;e(k>=z+1);var A,B=1,C=n.readNumber();switch(x){case 0:for(n.readHex(s,z),n.readHexNumber(t,z),f(t,s,z),j.addCodespaceRange(z+1,b(s,z),b(t,z)),A=1;C>A;A++)g(t,z),n.readHexNumber(s,z),f(s,t,z),n.readHexNumber(t,z),f(t,s,z),j.addCodespaceRange(z+1,b(s,z),b(t,z));break;case 1:for(n.readHex(s,z),n.readHexNumber(t,z),f(t,s,z),p=n.readNumber(),A=1;C>A;A++)g(t,z),n.readHexNumber(s,z),f(s,t,z),n.readHexNumber(t,z),f(t,s,z),p=n.readNumber();break;case 2:for(n.readHex(u,z),p=n.readNumber(),j.mapOne(b(u,z),p),A=1;C>A;A++)g(u,z),y||(n.readHexNumber(w,z),f(u,w,z)),p=n.readSigned()+(p+1),j.mapOne(b(u,z),p);break;case 3:for(n.readHex(s,z),n.readHexNumber(t,z),f(t,s,z),p=n.readNumber(),j.mapCidRange(b(s,z),b(t,z),p),A=1;C>A;A++)g(t,z),y?s.set(t):(n.readHexNumber(s,z),f(s,t,z)),n.readHexNumber(t,z),f(t,s,z),p=n.readNumber(),j.mapCidRange(b(s,z),b(t,z),p);break;case 4:for(n.readHex(u,B),n.readHex(v,z),j.mapOne(b(u,B),d(v,z)),A=1;C>A;A++)g(u,B),y||(n.readHexNumber(w,B),f(u,w,B)),g(v,z),n.readHexSigned(w,z),f(v,w,z),j.mapOne(b(u,B),d(v,z));break;case 5:for(n.readHex(s,B),n.readHexNumber(t,B),f(t,s,B),n.readHex(v,z),j.mapBfRange(b(s,B),b(t,B),d(v,z)),A=1;C>A;A++)g(t,B),y?s.set(t):(n.readHexNumber(s,B),f(s,t,B)),n.readHexNumber(t,B),f(t,s,B),n.readHex(v,z),j.mapBfRange(b(s,B),b(t,B),d(v,z));break;default:c("Unknown type: "+x)}}else switch(31&q){case 0:n.readString();break;case 1:r=n.readString()}}return r&&l(r),j}function j(){}var k=16,l=19;return h.prototype={readByte:function(){return this.pos>=this.end?-1:this.buffer[this.pos++]},readNumber:function(){var a,b=0;do{var d=this.readByte();0>d&&c("unexpected EOF in bcmap"),a=!(128&d),b=b<<7|127&d}while(!a);return b},readSigned:function(){var a=this.readNumber();return 1&a?~(a>>>1):a>>>1},readHex:function(a,b){a.set(this.buffer.subarray(this.pos,this.pos+b+1)),this.pos+=b+1},readHexNumber:function(a,b){var d,e=this.tmpBuf,f=0;do{var g=this.readByte();0>g&&c("unexpected EOF in bcmap"),d=!(128&g),e[f++]=127&g}while(!d);for(var h=b,i=0,j=0;h>=0;){for(;8>j&&e.length>0;)i=e[--f]<>=8,j-=8}},readHexSigned:function(a,b){this.readHexNumber(a,b);for(var c=1&a[b]?255:0,d=0,e=0;b>=e;e++)d=(1&d)<<8|a[e],a[e]=d>>1^c},readString:function(){for(var a=this.readNumber(),b="",c=0;a>c;c++)b+=String.fromCharCode(this.readNumber());return b}},j.prototype={read:i},j}(),Hb=function(){function a(a){for(var b=0,c=0;c>>0}function d(a){y(a)||c("Malformed CMap: expected string.")}function f(a){w(a)||c("Malformed CMap: expected int.")}function g(b,c){for(;;){var e=c.getObj();if(R(e))break;if(A(e,"endbfchar"))return;d(e);var f=a(e);e=c.getObj(),d(e);var g=e;b.mapOne(f,g)}}function h(b,e){for(;;){var f=e.getObj();if(R(f))break;if(A(f,"endbfrange"))return;d(f);var g=a(f);f=e.getObj(),d(f);var h=a(f);if(f=e.getObj(),w(f)||y(f)){var i=w(f)?String.fromCharCode(f):f;b.mapBfRange(g,h,i)}else{if(!A(f,"["))break;f=e.getObj();for(var j=[];!A(f,"]")&&!R(f);)j.push(f),f=e.getObj();b.mapBfRangeToArray(g,h,j)}}c("Invalid bf range.")}function i(b,c){for(;;){var e=c.getObj();if(R(e))break;if(A(e,"endcidchar"))return;d(e);var g=a(e);e=c.getObj(),f(e);var h=e;b.mapOne(g,h)}}function j(b,c){for(;;){var e=c.getObj();if(R(e))break;if(A(e,"endcidrange"))return;d(e);var g=a(e);e=c.getObj(),d(e);var h=a(e);e=c.getObj(),f(e);var i=e;b.mapCidRange(g,h,i)}}function k(b,d){for(;;){var e=d.getObj();if(R(e))break;if(A(e,"endcodespacerange"))return;if(!y(e))break;var f=a(e);if(e=d.getObj(),!y(e))break;var g=a(e);b.addCodespaceRange(e.length,f,g)}c("Invalid codespace range.")}function l(a,b){var c=b.getObj();w(c)&&(a.vertical=!!c)}function m(a,b){var c=b.getObj();z(c)&&y(c.name)&&(a.name=c.name)}function n(a,b,c,d){var e,f;a:for(;;){var n=b.getObj();if(R(n))break;if(z(n))"WMode"===n.name?l(a,b):"CMapName"===n.name&&m(a,b),e=n;else if(A(n))switch(n.cmd){case"endcmap":break a;case"usecmap":z(e)&&(f=e.name);break;case"begincodespacerange":k(a,b);break;case"beginbfchar":g(a,b);break;case"begincidchar":i(a,b);break;case"beginbfrange":h(a,b);break;case"begincidrange":j(a,b)}}!d&&f&&(d=f),d&&o(a,c,d)}function o(a,b,c){if(a.useCMap=q(c,b),0===a.numCodespaceRanges){for(var d=a.useCMap.codespaceRanges,e=0;e=b;b++)a(b,b)},has:function(a){return this.firstChar<=a&&a<=this.lastChar},get:function(a){return this.firstChar<=a&&a<=this.lastChar?String.fromCharCode(a):void 0},charCodeOf:function(a){c("should not call .charCodeOf")}},a}(),bc=function(){function a(a,b,c){a[b]=c>>8&255,a[b+1]=255&c}function b(a,b,c){a[b]=c>>24&255,a[b+1]=c>>16&255,a[b+2]=c>>8&255,a[b+3]=255&c}function c(a,b,c){var d,e;if(c instanceof Uint8Array)a.set(c,b);else if("string"==typeof c)for(d=0,e=c.length;e>d;d++)a[b++]=255&c.charCodeAt(d);else for(d=0,e=c.length;e>d;d++)a[b++]=255&c[d]}function d(a){this.sfnt=a,this.tables=Object.create(null)}d.getSearchParams=function(a,b){for(var c=1,d=0;(c^a)>c;)c<<=1,d++;var e=c*b;return{range:e,entry:d,rangeShift:b*a-e}};var e=12,f=16;return d.prototype={toArray:function(){var g=this.sfnt,h=this.tables,i=Object.keys(h);i.sort();var j,l,m,n,o,p=i.length,q=e+p*f,r=[q];for(j=0;p>j;j++){n=h[i[j]];var s=(n.length+3&-4)>>>0;q+=s,r.push(q)}var t=new Uint8Array(q);for(j=0;p>j;j++)n=h[i[j]],c(t,r[j],n);"true"===g&&(g=k(65536)),t[0]=255&g.charCodeAt(0),t[1]=255&g.charCodeAt(1),t[2]=255&g.charCodeAt(2),t[3]=255&g.charCodeAt(3),a(t,4,p);var u=d.getSearchParams(p,16);for(a(t,6,u.range),a(t,8,u.entry),a(t,10,u.rangeShift),q=e,j=0;p>j;j++){o=i[j],t[q]=255&o.charCodeAt(0),t[q+1]=255&o.charCodeAt(1),t[q+2]=255&o.charCodeAt(2),t[q+3]=255&o.charCodeAt(3);var v=0;for(l=r[j],m=r[j+1];m>l;l+=4){var w=(t[l]<<24)+(t[l+1]<<16)+(t[l+2]<<8)+t[l+3];v=v+w|0}b(t,q+4,v),b(t,q+8,r[j]),b(t,q+12,h[o].length),q+=f}return t},addTable:function(a,b){if(a in this.tables)throw new Error("Table "+a+" already exists");this.tables[a]=b; -}},d}(),cc=new Int32Array([0,32,127,161,173,174,1536,1920,2208,4256,6016,6144,8192,8208,8209,8210,8232,8240,8287,8304,9676,9677,43616,43648,65520,65536]),dc=function(){function d(d,e,f){var g,h,i;this.name=d,this.loadedName=f.loadedName,this.isType3Font=f.isType3Font,this.sizes=[],this.glyphCache={};var j=d.split("+");j=j.length>1?j[1]:j[0],j=j.split(/[-,_]/g)[0],this.isSerifFont=!!(f.flags&Ob.Serif),this.isSymbolicFont=!!(f.flags&Ob.Symbolic),this.isMonospace=!!(f.flags&Ob.FixedPitch);var k=f.type,l=f.subtype;if(this.type=k,this.fallbackName=this.isMonospace?"monospace":this.isSerifFont?"serif":"sans-serif",this.differences=f.differences,this.widths=f.widths,this.defaultWidth=f.defaultWidth,this.composite=f.composite,this.wideChars=f.wideChars,this.cMap=f.cMap,this.ascent=f.ascent/Lb,this.descent=f.descent/Lb,this.fontMatrix=f.fontMatrix,this.bbox=f.bbox,this.toUnicode=f.toUnicode=this.buildToUnicode(f),this.toFontChar=[],"Type3"===f.type){for(g=0;256>g;g++)this.toFontChar[g]=this.differences[g]||f.defaultEncoding[g];return void(this.fontType=Z.TYPE3)}if(this.cidEncoding=f.cidEncoding,this.vertical=f.vertical,this.vertical&&(this.vmetrics=f.vmetrics,this.defaultVMetrics=f.defaultVMetrics),!e||e.isEmpty){e&&b('Font file is empty in "'+d+'" ('+this.loadedName+")"),this.missingFile=!0;var o=d.replace(/[,_]/g,"-"),p=!!Qb[o]||!(!Rb[o]||!Qb[Rb[o]]);if(o=Qb[o]||Rb[o]||o,this.bold=-1!==o.search(/bold/gi),this.italic=-1!==o.search(/oblique/gi)||-1!==o.search(/italic/gi),this.black=-1!==d.search(/Black/g),this.remeasure=Object.keys(this.widths).length>0,p&&"CIDFontType2"===k&&0===f.cidEncoding.indexOf("Identity-")){var q=[];for(g in Ub)q[+g]=Ub[g];if(/ArialBlack/i.test(d))for(g in Vb)q[+g]=Vb[g];var r=this.toUnicode instanceof ac;r||this.toUnicode.forEach(function(a,b){q[+a]=b}),this.toFontChar=q,this.toUnicode=new _b(q)}else if(/Symbol/i.test(o)){var s=Pb.SymbolSetEncoding;for(g in s)i=zc[s[g]],i&&(this.toFontChar[g]=i);for(g in f.differences)i=zc[f.differences[g]],i&&(this.toFontChar[g]=i)}else if(/Dingbats/i.test(o)){/Wingdings/i.test(d)&&b("Wingdings font without embedded font file, falling back to the ZapfDingbats encoding.");var t=Pb.ZapfDingbatsEncoding;for(g in t)i=Ac[t[g]],i&&(this.toFontChar[g]=i);for(g in f.differences)i=Ac[f.differences[g]],i&&(this.toFontChar[g]=i)}else if(p){this.toFontChar=[];for(g in f.defaultEncoding)h=f.differences[g]||f.defaultEncoding[g],this.toFontChar[g]=zc[h]}else{var u=-1===k.indexOf("CIDFontType");this.toUnicode.forEach(function(a,b){u&&(h=f.differences[a]||f.defaultEncoding[a],b=zc[h]||b),this.toFontChar[a]=b}.bind(this))}return this.loadedName=o.split("-")[0],this.loading=!1,void(this.fontType=P(k,l))}"Type1C"===l&&"Type1"!==k&&"MMType1"!==k&&(m(e)?l="TrueType":k="Type1"),"CIDFontType0C"===l&&"CIDFontType0"!==k&&(k="CIDFontType0"),"OpenType"===l&&(k="OpenType"),"CIDFontType0"===k&&(l=n(e)?"CIDFontType0":"CIDFontType0C");var v;switch(k){case"MMType1":a("MMType1 font ("+d+"), falling back to Type1.");case"Type1":case"CIDFontType0":this.mimetype="font/opentype";var w="Type1C"===l||"CIDFontType0C"===l?new jc(e,f):new ic(d,e,f);O(f),v=this.convert(d,w,f);break;case"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype",v=this.checkAndRepair(d,e,f),this.isOpenType&&(k="OpenType");break;default:c("Font "+k+" is not supported")}this.data=v,this.fontType=P(k,l),this.fontMatrix=f.fontMatrix,this.widths=f.widths,this.defaultWidth=f.defaultWidth,this.encoding=f.baseEncoding,this.seacMap=f.seacMap,this.loading=!0}function f(a,b){return(a<<8)+b}function h(a,b,c,d){return(a<<24)+(b<<16)+(c<<8)+d}function j(a){return String.fromCharCode(a>>8&255,255&a)}function l(a){return a=a>32767?32767:-32768>a?-32768:a,String.fromCharCode(a>>8&255,255&a)}function m(a){var b=a.peekBytes(4);return 65536===o(b,0)}function n(a){var b=a.peekBytes(2);return 37===b[0]&&33===b[1]?!0:128===b[0]&&1===b[1]}function p(a){for(var b=0,c=cc.length-1;c>b;){var d=b+c+1>>1;a=i)do l=i++,Kb&&61440===l&&(l=61472,i=l+1);while(void 0!==h[l]&&Jb>=i);f[l]=k,g[j]=l,h[l]=!0}return{toFontChar:g,charCodeToGlyphId:f,nextAvailableFontCharCode:i}}function r(a){var b=[];for(var c in a)b.push({fontCharCode:0|c,glyphId:a[c]});b.sort(function(a,b){return a.fontCharCode-b.fontCharCode});for(var d=[],e=b.length,f=0;e>f;){var g=b[f].fontCharCode,h=[b[f].glyphId];++f;for(var i=g;e>f&&i+1===b[f].fontCharCode&&(h.push(b[f].glyphId),++i,++f,65535!==i););d.push([g,i,h])}return d}function s(a){var b,c,d,e,f=r(a),g=f[f.length-1][1]>65535?2:1,h="\x00\x00"+j(g)+"\x00\x00"+k(4+8*g);for(b=f.length-1;b>=0&&!(f[b][0]<=65535);--b);var i=b+1;f[b][0]<65535&&65535===f[b][1]&&(f[b][1]=65534);var l,m,n,o,p=f[b][1]<65535?1:0,q=i+p,s=bc.getSearchParams(q,2),t="",u="",v="",w="",x="",y=0;for(b=0,c=i;c>b;b++){l=f[b],m=l[0],n=l[1],t+=j(m),u+=j(n),o=l[2];var z=!0;for(d=1,e=o.length;e>d;++d)if(o[d]!==o[d-1]+1){z=!1;break}if(z){var A=o[0];v+=j(A-m&65535),w+=j(0)}else{var B=2*(q-b)+2*y;for(y+=n-m+1,v+=j(0),w+=j(B),d=0,e=o.length;e>d;++d)x+=j(o[d])}}p>0&&(u+="ÿÿ",t+="ÿÿ",v+="\x00",w+="\x00\x00");var C="\x00\x00"+j(2*q)+j(s.range)+j(s.entry)+j(s.rangeShift)+u+"\x00\x00"+t+v+w+x,D="",E="";if(g>1){for(h+="\x00\x00\n"+k(4+8*g+4+C.length),D="",b=0,c=f.length;c>b;b++){l=f[b],m=l[0],o=l[2];var F=o[0];for(d=1,e=o.length;e>d;++d)o[d]!==o[d-1]+1&&(n=l[0]+d-1,D+=k(m)+k(n)+k(F),m=n+1,F=o[d]);D+=k(m)+k(l[1])+k(F)}E="\x00\f\x00\x00"+k(D.length+16)+"\x00\x00\x00\x00"+k(D.length/12)}return h+"\x00"+j(C.length+4)+C+E+D}function t(a){var b=new Mc(a.data),c=b.getUint16();b.getBytes(60);var d=b.getUint16();if(4>c&&768&d)return!1;var e=b.getUint16(),f=b.getUint16();if(e>f)return!1;b.getBytes(6);var g=b.getUint16();return 0===g?!1:(a.data[8]=a.data[9]=0,!0)}function u(a,b,d){d=d||{unitsPerEm:0,yMax:0,yMin:0,ascent:0,descent:0};var e=0,f=0,g=0,h=0,i=null,l=0;if(b)for(var m in b){m|=0,(i>m||!i)&&(i=m),m>l&&(l=m);var n=L(m);32>n?e|=1<n?f|=1<n?g|=1<n?h|=1< 123 are reserved for internal usage")}else i=0,l=255;var o=a.bbox||[0,0,0,0],p=d.unitsPerEm||1/(a.fontMatrix||T)[0],q=a.ascentScaled?1:p/Lb,r=d.ascent||Math.round(q*(a.ascent||o[3])),s=d.descent||Math.round(q*(a.descent||o[1]));s>0&&a.descent>0&&o[1]<0&&(s=-s);var t=d.yMax||r,u=-d.yMin||-s;return"\x00$ô\x00\x00\x00Š»\x00\x00\x00ŒŠ»\x00\x00ß\x001\x00\x00\x00\x00"+String.fromCharCode(a.fixedPitch?9:0)+"\x00\x00\x00\x00\x00\x00"+k(e)+k(f)+k(g)+k(h)+"*21*"+j(a.italicAngle?1:0)+j(i||a.firstChar)+j(l||a.lastChar)+j(r)+j(s)+"\x00d"+j(t)+j(u)+"\x00\x00\x00\x00\x00\x00\x00\x00"+j(a.xHeight)+j(a.capHeight)+j(0)+j(i||a.firstChar)+"\x00"}function v(a){var b=Math.floor(a.italicAngle*Math.pow(2,16));return"\x00\x00\x00"+k(b)+"\x00\x00\x00\x00"+k(a.fixedPitch)+"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"}function w(a,b){b||(b=[[],[]]);var c,d,e,f,g,h=[b[0][0]||"Original licence",b[0][1]||a,b[0][2]||"Unknown",b[0][3]||"uniqueID",b[0][4]||a,b[0][5]||"Version 0.11",b[0][6]||"",b[0][7]||"Unknown",b[0][8]||"Unknown",b[0][9]||"Unknown"],i=[];for(c=0,d=h.length;d>c;c++){g=b[1][c]||h[c];var k=[];for(e=0,f=g.length;f>e;e++)k.push(j(g.charCodeAt(e)));i.push(k.join(""))}var l=[h,i],m=["\x00","\x00"],n=["\x00\x00","\x00"],o=["\x00\x00"," "],p=h.length*m.length,q="\x00\x00"+j(p)+j(12*p+6),r=0;for(c=0,d=m.length;d>c;c++){var s=l[c];for(e=0,f=s.length;f>e;e++){g=s[e];var t=m[c]+n[c]+o[c]+j(e)+j(g.length)+j(r);q+=t,r+=g.length}}return q+=h.join("")+i.join("")}return d.getFontID=function(){var a=1;return function(){return String(a++)}}(),d.prototype={name:null,font:null,mimetype:null,encoding:null,get renderer(){var a=yc.create(this);return g(this,"renderer",a)},exportData:function(){var a={};for(var b in this)this.hasOwnProperty(b)&&(a[b]=this[b]);return a},checkAndRepair:function(d,g,j){function k(a){var b=i(a.getBytes(4)),c=a.getInt32(),d=a.getInt32()>>>0,e=a.getInt32()>>>0,f=a.pos;a.pos=a.start?a.start:0,a.skip(d);var g=a.getBytes(e);return a.pos=f,"head"===b&&(g[8]=g[9]=g[10]=g[11]=0,g[17]|=32),{tag:b,checksum:c,length:e,offset:d,data:g}}function l(a){return{version:i(a.getBytes(4)),numTables:a.getUint16(),searchRange:a.getUint16(),entrySelector:a.getUint16(),rangeShift:a.getUint16()}}function m(a,c,d,e){var f,g=(c.start?c.start:0)+a.offset;c.pos=g;for(var h,i=(c.getUint16(),c.getUint16()),j=!1,k=0;i>k;k++){var l=c.getUint16(),m=c.getUint16(),n=c.getInt32()>>>0,o=!1;if(0===l&&0===m?o=!0:1===l&&0===m?o=!0:3!==l||1!==m||(d||!e)&&h?d&&3===l&&0===m&&(o=!0,j=!0):(o=!0,d||(j=!0)),o&&(h={platformId:l,encodingId:m,offset:n}),j)break}if(h&&(c.pos=g+h.offset),!h||-1===c.peekByte())return b("Could not find a preferred cmap table."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};var p,q,r=c.getUint16(),s=(c.getUint16(),c.getUint16(),!1),t=[];if(0===r){for(p=0;256>p;p++){var u=c.getByte();u&&t.push({charCode:p,glyphId:u})}s=!0}else if(4===r){var v=c.getUint16()>>1;c.getBytes(6);var w,x=[];for(w=0;v>w;w++)x.push({end:c.getUint16()});for(c.getUint16(),w=0;v>w;w++)x[w].start=c.getUint16();for(w=0;v>w;w++)x[w].delta=c.getUint16();var y=0;for(w=0;v>w;w++){f=x[w];var z=c.getUint16();if(z){var A=(z>>1)-(v-w);f.offsetIndex=A,y=Math.max(y,A+f.end-f.start+1)}else f.offsetIndex=-1}var B=[];for(p=0;y>p;p++)B.push(c.getUint16());for(w=0;v>w;w++){f=x[w],g=f.start;var C=f.end,D=f.delta;for(A=f.offsetIndex,p=g;C>=p;p++)65535!==p&&(q=0>A?p:B[A+p-g],q=q+D&65535,0!==q&&t.push({charCode:p,glyphId:q}))}}else{if(6!==r)return b("cmap table has unsupported format: "+r),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};var E=c.getUint16(),F=c.getUint16();for(p=0;F>p;p++){q=c.getUint16();var G=E+p;t.push({charCode:G,glyphId:q})}}for(t.sort(function(a,b){return a.charCode-b.charCode}),k=1;ke&&(a("The numOfMetrics ("+f+") should not be greater than the numGlyphs ("+e+")"),f=e,c.data[34]=(65280&f)>>8,c.data[35]=255&f);var g=e-f,h=g-(d.length-4*f>>1);if(h>0){var i=new Uint8Array(d.length+2*h);i.set(d.data),d.data=i}}function o(a,b,c,d,e,f){if(12>=c-b)return 0;var g=a.subarray(b,c),h=g[0]<<8|g[1];if(32768&h)return d.set(g,e),g.length;var i,j=10,k=0;for(i=0;h>i;i++){var l=g[j]<<8|g[j+1];k=l+1,j+=2}var m=j,n=g[j]<<8|g[j+1];j+=2+n;var o=j,p=0;for(i=0;k>i;i++){var q=g[j++];192&q&&(g[j-1]=63&q);var r=(2&q?1:16&q?0:2)+(4&q?1:32&q?0:2);if(p+=r,8&q){var s=g[j++];i+=s,p+=s*r}}if(0===p)return 0;var t=j+p;return t>g.length?0:!f&&n>0?(d.set(g.subarray(0,m),e),d.set([0,0],e+m),d.set(g.subarray(o,t),e+m+2),t-=n,g.length-t>3&&(t=t+3&-4),t):g.length-t>3?(t=t+3&-4,d.set(g.subarray(0,t),e),t):(d.set(g,e),g.length)}function p(c,d,e){var g=c.data,i=h(g[0],g[1],g[2],g[3]);i>>16!==1&&(a("Attempting to fix invalid version in head table: "+i),g[0]=0,g[1]=1,g[2]=0,g[3]=0);var j=f(g[50],g[51]);if(0>j||j>1){a("Attempting to fix invalid indexToLocFormat in head table: "+j);var k=d+1;e===k<<1?(g[50]=0,g[51]=0):e===k<<2?(g[50]=0,g[51]=1):b("Could not fix indexToLocFormat: "+j)}}function r(a,b,c,d,e,f){var g,h,i;d?(g=4,h=function(a,b){return a[b]<<24|a[b+1]<<16|a[b+2]<<8|a[b+3]},i=function(a,b,c){a[b]=c>>>24&255,a[b+1]=c>>16&255,a[b+2]=c>>8&255,a[b+3]=255&c}):(g=2,h=function(a,b){return a[b]<<9|a[b+1]<<1},i=function(a,b,c){a[b]=c>>9&255,a[b+1]=c>>1&255});var j=a.data,k=g*(1+c);j.length!==k&&(j=new Uint8Array(k),j.set(a.data.subarray(0,k)),a.data=j);var l=b.data,m=l.length,n=new Uint8Array(m),p=h(j,0),q=0,r={};i(j,0,q);var s,t;for(s=0,t=g;c>s;s++,t+=g){var u=h(j,t);if(u>m&&(m+3&-4)===u&&(u=m),u>m)i(j,t,q),p=u;else{p===u&&(r[s]=!0);var v=o(l,p,u,n,q,e);q+=v,i(j,t,q),p=u}}if(0===q){var w=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(s=0,t=g;c>s;s++,t+=g)i(j,t,w.length);return b.data=w,r}if(f){var x=h(j,g);n.length>x+q?b.data=n.subarray(0,x+q):(b.data=new Uint8Array(x+q),b.data.set(n.subarray(0,q))),b.data.set(n.subarray(0,x),q),i(a.data,j.length-g,q+x)}else b.data=n.subarray(0,q);return r}function y(a,c,d){var e=(g.start?g.start:0)+a.offset;g.pos=e;var f=a.length,h=e+f,i=g.getInt32();g.getBytes(28);var j,k,l=!0;switch(i){case 65536:j=Yb;break;case 131072:var m=g.getUint16();if(m!==d){l=!1;break}var n=[];for(k=0;m>k;++k){var o=g.getUint16();if(o>=32768){l=!1;break}n.push(o)}if(!l)break;for(var p=[],q=[];g.posk;++k)q[k]=String.fromCharCode(g.getByte());p.push(q.join(""))}for(j=[],k=0;m>k;++k){var s=n[k];258>s?j.push(Yb[s]):j.push(p[s-258])}break;case 196608:break;default:b("Unknown/unsupported post table version "+i),l=!1,c.defaultEncoding&&(j=c.defaultEncoding)}return c.glyphNames=j,l}function z(a){var b=(g.start?g.start:0)+a.offset;g.pos=b;var c=[[],[]],d=a.length,e=b+d,f=g.getUint16(),h=6;if(0!==f||h>d)return c;var j,k,l=g.getUint16(),m=g.getUint16(),n=[],o=12;for(j=0;l>j&&g.pos+o<=e;j++){var p={platform:g.getUint16(),encoding:g.getUint16(),language:g.getUint16(),name:g.getUint16(),length:g.getUint16(),offset:g.getUint16()};(1===p.platform&&0===p.encoding&&0===p.language||3===p.platform&&1===p.encoding&&1033===p.language)&&n.push(p)}for(j=0,k=n.length;k>j;j++){var q=n[j],r=b+m+q.offset;if(!(r+q.length>e)){g.pos=r;var s=q.name;if(q.encoding){for(var t="",u=0,v=q.length;v>u;u+=2)t+=String.fromCharCode(g.getUint16());c[1][s]=t}else c[0][s]=i(g.getBytes(q.length))}}return c}function A(a,c){for(var d,e,f,g,h,i=a.data,j=0,k=0,l=0,m=[],n=[],o=[],p=c.tooComplexToFollowFunctions,q=!1,r=0,s=0,t=i.length;t>j;){var u=i[j++];if(64===u)if(e=i[j++],q||s)j+=e;else for(d=0;e>d;d++)m.push(i[j++]);else if(65===u)if(e=i[j++],q||s)j+=2*e;else for(d=0;e>d;d++)f=i[j++],m.push(f<<8|i[j++]);else if(176===(248&u))if(e=u-176+1,q||s)j+=e;else for(d=0;e>d;d++)m.push(i[j++]);else if(184===(248&u))if(e=u-184+1,q||s)j+=2*e;else for(d=0;e>d;d++)f=i[j++],m.push(f<<8|i[j++]);else if(43!==u||p)if(44!==u||p){if(45===u)if(q)q=!1,k=j;else{if(h=n.pop(),!h)return b("TT: ENDF bad stack"),void(c.hintsValid=!1);g=o.pop(),i=h.data,j=h.i,c.functionsStackDeltas[g]=m.length-h.stackTop}else if(137===u)(q||s)&&(b("TT: nested IDEFs not allowed"),p=!0),q=!0,l=j;else if(88===u)++r;else if(27===u)s=r;else if(89===u)s===r&&(s=0),--r;else if(28===u&&!q&&!s){var v=m[m.length-1];v>0&&(j+=v-1)}}else(q||s)&&(b("TT: nested FDEFs not allowed"),p=!0),q=!0,l=j,g=m.pop(),c.functionsDefined[g]={data:i,i:j};else if(!q&&!s)if(g=m[m.length-1],c.functionsUsed[g]=!0,g in c.functionsStackDeltas)m.length+=c.functionsStackDeltas[g];else if(g in c.functionsDefined&&o.indexOf(g)<0){if(n.push({data:i,i:j,stackTop:m.length-1}),o.push(g),h=c.functionsDefined[g],!h)return b("TT: CALL non-existent function"),void(c.hintsValid=!1);i=h.data,j=h.i}if(!q&&!s){var w=142>=u?F[u]:u>=192&&223>=u?-1:u>=224?-2:0;for(u>=113&&117>=u&&(e=m.pop(),e===e&&(w=2*-e));0>w&&m.length>0;)m.pop(),w++;for(;w>0;)m.push(NaN),w--}}c.tooComplexToFollowFunctions=p;var x=[i];j>i.length&&x.push(new Uint8Array(j-i.length)),l>k&&(b("TT: complementing a missing function tail"),x.push(new Uint8Array([34,45]))),C(a,x)}function B(a,c){if(!a.tooComplexToFollowFunctions){if(a.functionsDefined.length>c)return b("TT: more functions defined than expected"),void(a.hintsValid=!1);for(var d=0,e=a.functionsUsed.length;e>d;d++){if(d>c)return b("TT: invalid function id: "+d),void(a.hintsValid=!1);if(a.functionsUsed[d]&&!a.functionsDefined[d])return b("TT: undefined function: "+d),void(a.hintsValid=!1)}}}function C(a,b){if(b.length>1){var c,d,e=0;for(c=0,d=b.length;d>c;c++)e+=b[c].length;e=e+3&-4;var f=new Uint8Array(e),g=0;for(c=0,d=b.length;d>c;c++)f.set(b[c],g),g+=b[c].length;a.data=f,a.length=e}}function D(a,b,c){var d={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};if(a&&A(a,d),b&&A(b,d),a&&B(d,R),c&&1&c.length){var e=new Uint8Array(c.length+1);e.set(c.data),c.data=e}return d.hintsValid}function E(a,b,c){return V[a]?!aa&&b>=0&&$.has(b)?!0:!!(_&&c>=0&&x(_[c])):!0}var F=[0,0,0,0,0,0,0,0,-2,-2,-2,-2,0,0,-2,-5,-1,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,-1,-1,1,-1,-999,0,1,0,-1,-2,0,-1,-2,-1,-1,0,-1,-1,0,0,-999,-999,-1,-1,-1,-1,-2,-999,-2,-2,-999,0,-2,-2,0,0,-2,0,-2,0,0,0,-2,-1,-1,1,1,0,0,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,0,-999,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,-2,-999,-999,-999,-999,-999,-1,-1,-2,-2,0,0,0,0,-1,-1,-999,-2,-2,0,0,-1,-2,-2,0,0,0,-1,-1,-1,-2];g=new Mc(new Uint8Array(g.getBytes()));for(var G,H,I,J=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "],K=l(g),L=K.numTables,M={"OS/2":null,cmap:null,head:null,hhea:null,hmtx:null,maxp:null,name:null,post:null},N=0;L>N;N++)I=k(g),J.indexOf(I.tag)<0||0!==I.length&&(M[I.tag]=I);var O=!M["CFF "];if(O)M.glyf&&M.loca||c('Required "glyf" or "loca" tables are not found'),this.isOpenType=!1;else{if("OTTO"===K.version&&"CIDFontType2"!==j.type||!M.head||!M.hhea||!M.maxp||!M.post)return H=new Mc(M["CFF "].data),G=new jc(H,j),this.convert(d,G,j);delete M.glyf,delete M.loca,delete M.fpgm,delete M.prep,delete M["cvt "],this.isOpenType=!0}M.maxp||c('Required "maxp" table is not found'),g.pos=(g.start||0)+M.maxp.offset;var P=g.getInt32(),Q=g.getUint16(),R=0;if(P>=65536&&M.maxp.length>=22){g.pos+=8;var S=g.getUint16();S>2&&(M.maxp.data[14]=0,M.maxp.data[15]=2),g.pos+=4,R=g.getUint16()}var T=!1;"CIDFontType2"===j.type&&j.toUnicode&&j.toUnicode.get(0)>"\x00"&&(T=!0,Q++,M.maxp.data[4]=Q>>8,M.maxp.data[5]=255&Q);var U=D(M.fpgm,M.prep,M["cvt "],R);U||(delete M.fpgm,delete M.prep,delete M["cvt "]),n(g,M.hhea,M.hmtx,Q),M.head||c('Required "head" table is not found'),p(M.head,Q,O?M.loca.length:0);var V={};if(O){var W=f(M.head.data[50],M.head.data[51]);V=r(M.loca,M.glyf,Q,W,U,T)}if(M.hhea||c('Required "hhea" table is not found'),0===M.hhea.data[10]&&0===M.hhea.data[11]&&(M.hhea.data[10]=255,M.hhea.data[11]=255),M.post){var X=y(M.post,j,Q);X||(M.post=null)}var Y,Z=[],$=j.toUnicode,_=j.widths,aa=$ instanceof ac||65536===$.length;if("CIDFontType2"===j.type){var ba=j.cidToGidMap||[],ca=0===ba.length;j.cMap.forEach(function(a,b){e(65535>=b,"Max size of CID is 65,535");var c=-1;ca?c=a:void 0!==ba[b]&&(c=ba[b]),c>=0&&Q>c&&E(c,a,b)&&(Z[a]=c)}),T&&(Z[0]=Q-1)}else{var da=j.differences.length>0||!!j.baseEncodingName,ea=m(M.cmap,g,this.isSymbolicFont,da),fa=ea.platformId,ga=ea.encodingId,ha=ea.mappings,ia=ha.length;if(da&&(3===fa&&1===ga||1===fa&&0===ga)||-1===fa&&-1===ga&&Pb[j.baseEncodingName]){var ja=[];for("MacRomanEncoding"!==j.baseEncodingName&&"WinAnsiEncoding"!==j.baseEncodingName||(ja=Pb[j.baseEncodingName]),Y=0;256>Y;Y++){var ka;if(ka=this.differences&&Y in this.differences?this.differences[Y]:Y in ja&&""!==ja[Y]?ja[Y]:Pb.StandardEncoding[Y]){var la,ma=!1;3===fa&&1===ga?(la=zc[ka],ma=!0):1===fa&&0===ga&&(la=Pb.MacRomanEncoding.indexOf(ka));var na=!1;for(N=0;ia>N;++N)if(ha[N].charCode===la){var oa=ma?Y:la;if(E(ha[N].glyphId,oa,-1)){Z[Y]=ha[N].glyphId,na=!0;break}}if(!na&&j.glyphNames){var pa=j.glyphNames.indexOf(ka);pa>0&&E(pa,-1,-1)?Z[Y]=pa:Z[Y]=0}}}}else if(0===fa&&0===ga)for(N=0;ia>N;++N)Z[ha[N].charCode]=ha[N].glyphId;else for(N=0;ia>N;++N)Y=255&ha[N].charCode,Z[Y]=ha[N].glyphId}0===Z.length&&(Z[0]=0);var qa=q(Z,j);if(this.toFontChar=qa.toFontChar,M.cmap={tag:"cmap",data:s(qa.charCodeToGlyphId)},!M["OS/2"]||!t(M["OS/2"])){var ra={unitsPerEm:f(M.head.data[18],M.head.data[19]),yMax:f(M.head.data[42],M.head.data[43]),yMin:f(M.head.data[38],M.head.data[39])-65536,ascent:f(M.hhea.data[4],M.hhea.data[5]),descent:f(M.hhea.data[6],M.hhea.data[7])-65536};M["OS/2"]={tag:"OS/2",data:u(j,qa.charCodeToGlyphId,ra)}}if(M.post||(M.post={tag:"post",data:v(j)}),!O)try{H=new Mc(M["CFF "].data);var sa=new kc(H,j);G=sa.parse();var ta=new xc(G);M["CFF "].data=ta.compile()}catch(ua){b("Failed to compile font "+j.loadedName)}if(M.name){var va=z(M.name);M.name.data=w(d,va)}else M.name={tag:"name",data:w(this.name)};var wa=new bc(K.version);for(var xa in M)wa.addTable(xa,M[xa].data);return wa.toArray()},convert:function(a,b,c){function d(a,b){var c=null;for(var d in a)b===a[d]&&(c||(c=[]),c.push(0|d));return c}function e(a,b){for(var c in a)if(b===a[c])return 0|c;return g.charCodeToGlyphId[g.nextAvailableFontCharCode]=b,g.nextAvailableFontCharCode++}c.fixedPitch=!1;var f=b.getGlyphMapping(c),g=q(f,c);this.toFontChar=g.toFontChar;var h=b.numGlyphs,i=b.seacs;if(Nb&&i&&i.length){var k=c.fontMatrix||T,m=b.getCharset(),n=Object.create(null);for(var o in i){o|=0;var p=i[o],r=Pb.StandardEncoding[p[2]],t=Pb.StandardEncoding[p[3]],x=m.indexOf(r),y=m.indexOf(t);if(!(0>x||0>y)){var z={x:p[0]*k[0]+p[1]*k[2]+k[4],y:p[0]*k[1]+p[1]*k[3]+k[5]},A=d(f,o);if(A)for(var B=0,C=A.length;C>B;B++){var D=A[B],E=g.charCodeToGlyphId,F=e(E,x),G=e(E,y);n[D]={baseFontCharCode:F,accentFontCharCode:G,accentOffset:z}}}}c.seacMap=n}var H=1/(c.fontMatrix||T)[0],I=new bc("OTTO");return I.addTable("CFF ",b.data),I.addTable("OS/2",u(c,g.charCodeToGlyphId)),I.addTable("cmap",s(g.charCodeToGlyphId)),I.addTable("head","\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00_<õ\x00\x00"+l(H)+"\x00\x00\x00\x00ž\x0B~'\x00\x00\x00\x00ž\x0B~'\x00\x00"+l(c.descent)+"ÿ"+l(c.ascent)+j(c.italicAngle?2:0)+"\x00\x00\x00\x00\x00\x00\x00"),I.addTable("hhea","\x00\x00\x00"+l(c.ascent)+l(c.descent)+"\x00\x00ÿÿ\x00\x00\x00\x00\x00\x00"+l(c.capHeight)+l(Math.tan(c.italicAngle)*c.xHeight)+"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"+j(h)),I.addTable("hmtx",function(){for(var a=b.charstrings,c=b.cff?b.cff.widths:null,d="\x00\x00\x00\x00",e=1,f=h;f>e;e++){var g=0;if(a){var i=a[e-1];g="width"in i?i.width:0}else c&&(g=Math.ceil(c[e]||0));d+=j(g)+j(0)}return d}()),I.addTable("maxp","\x00\x00P\x00"+j(h)),I.addTable("name",w(a)),I.addTable("post",v(c)),I.toArray()},buildToUnicode:function(a){if(a.toUnicode&&0!==a.toUnicode.length)return a.toUnicode;var b,c;if(!a.composite){b=[];var d=a.defaultEncoding.slice(),f=a.baseEncodingName,g=a.differences;for(c in g)d[c]=g[c];for(c in d){var h=d[c];if(""!==h)if(void 0!==zc[h])b[c]=String.fromCharCode(zc[h]);else{var i=0;switch(h[0]){case"G":3===h.length&&(i=parseInt(h.substr(1),16));break;case"g":5===h.length&&(i=parseInt(h.substr(1),16));break;case"C":case"c":h.length>=3&&(i=+h.substr(1))}if(i){if(f&&i===+c){var j=Pb[f];if(j&&(h=j[c])){b[c]=String.fromCharCode(zc[h]);continue}}b[c]=String.fromCharCode(i)}}}return new _b(b)}if(a.composite&&(a.cMap.builtInCMap&&!(a.cMap instanceof Fb)||"Adobe"===a.cidSystemInfo.registry&&("GB1"===a.cidSystemInfo.ordering||"CNS1"===a.cidSystemInfo.ordering||"Japan1"===a.cidSystemInfo.ordering||"Korea1"===a.cidSystemInfo.ordering))){var k=a.cidSystemInfo.registry,l=a.cidSystemInfo.ordering,m=new ya(k+"-"+l+"-UCS2"),n=Hb.create(m,{url:PDFJS.cMapUrl,packed:PDFJS.cMapPacked},null),o=a.cMap;return b=[],o.forEach(function(a,c){e(65535>=c,"Max size of CID is 65,535");var d=n.lookup(c);d&&(b[a]=String.fromCharCode((d.charCodeAt(0)<<8)+d.charCodeAt(1)))}),new _b(b)}return new ac(a.firstChar,a.lastChar)},get spaceWidth(){if("_shadowWidth"in this)return this._shadowWidth;for(var a,b=["space","minus","one","i"],c=0,d=b.length;d>c;c++){var e=b[c];if(e in this.widths){a=this.widths[e];break}var f=zc[e],g=0;if(this.composite&&this.cMap.contains(f)&&(g=this.cMap.lookup(f)),!g&&"toUnicode"in this&&(g=this.toUnicode.charCodeOf(f)),0>=g&&(g=f),a=this.widths[g])break}return a=a||this.defaultWidth,this._shadowWidth=a,a},charToGlyph:function(a){var b,c,d,e=a;this.cMap&&this.cMap.contains(a)&&(e=this.cMap.lookup(a)),c=this.widths[e],c=x(c)?c:this.defaultWidth;var f=this.vmetrics&&this.vmetrics[e],g=this.toUnicode.get(a)||a;"number"==typeof g&&(g=String.fromCharCode(g)),b=this.toFontChar[a]||a,this.missingFile&&(b=K(b)),this.isType3Font&&(d=b);var h=null;if(this.seacMap&&this.seacMap[a]){var i=this.seacMap[a];b=i.baseFontCharCode,h={fontChar:String.fromCharCode(i.accentFontCharCode),offset:i.accentOffset}}var j=String.fromCharCode(b),k=this.glyphCache[a];return k&&k.matchesForCache(j,g,h,c,f,d)||(k=new $b(j,g,h,c,f,d),this.glyphCache[a]=k),k},charsToGlyphs:function(a){var b,c,d,e=this.charsCache;if(e&&(b=e[a]))return b;e||(e=this.charsCache=Object.create(null)),b=[];var f,g=a,h=0;if(this.cMap)for(var i={};hh;++h)d=a.charCodeAt(h),c=this.charToGlyph(d),b.push(c),32===d&&b.push(null);return e[g]=b}},d}(),ec=function(){function a(a){this.error=a,this.loadedName="g_font_error",this.loading=!1}return a.prototype={charsToGlyphs:function(){return[]},exportData:function(){return{error:this.error}}},a}(),fc=function(){function a(){this.width=0,this.lsb=0,this.flexing=!1,this.output=[],this.stack=[]}var c={hstem:[1],vstem:[3],vmoveto:[4],rlineto:[5],hlineto:[6],vlineto:[7],rrcurveto:[8],callsubr:[10],flex:[12,35],drop:[12,18],endchar:[14],rmoveto:[21],hmoveto:[22],vhcurveto:[30],hvcurveto:[31]};return a.prototype={convert:function(a,d){for(var e,f,g,h=a.length,i=!1,j=0;h>j;j++){var k=a[j];if(32>k){switch(12===k&&(k=(k<<8)+a[++j]),k){case 1:if(!Mb){this.stack=[];break}i=this.executeCommand(2,c.hstem);break;case 3:if(!Mb){this.stack=[];break}i=this.executeCommand(2,c.vstem);break;case 4:if(this.flexing){if(this.stack.length<1){i=!0;break}var l=this.stack.pop();this.stack.push(0,l);break}i=this.executeCommand(1,c.vmoveto);break;case 5:i=this.executeCommand(2,c.rlineto);break;case 6:i=this.executeCommand(1,c.hlineto);break;case 7:i=this.executeCommand(1,c.vlineto);break;case 8:i=this.executeCommand(6,c.rrcurveto);break;case 9:this.stack=[];break;case 10:if(this.stack.length<1){i=!0;break}g=this.stack.pop(),i=this.convert(d[g],d);break;case 11:return i;case 13:if(this.stack.length<2){i=!0;break}e=this.stack.pop(),f=this.stack.pop(),this.lsb=f,this.width=e,this.stack.push(e,f),i=this.executeCommand(2,c.hmoveto);break;case 14:this.output.push(c.endchar[0]);break;case 21:if(this.flexing)break;i=this.executeCommand(2,c.rmoveto);break;case 22:if(this.flexing){this.stack.push(0);break}i=this.executeCommand(1,c.hmoveto);break;case 30:i=this.executeCommand(4,c.vhcurveto);break;case 31:i=this.executeCommand(4,c.hvcurveto);break;case 3072:this.stack=[];break;case 3073:if(!Mb){this.stack=[];break}i=this.executeCommand(2,c.vstem);break;case 3074:if(!Mb){this.stack=[];break}i=this.executeCommand(2,c.hstem);break;case 3078:Nb?(this.seac=this.stack.splice(-4,4),i=this.executeCommand(0,c.endchar)):i=this.executeCommand(4,c.endchar);break;case 3079:if(this.stack.length<4){i=!0;break}this.stack.pop();e=this.stack.pop();var m=this.stack.pop();f=this.stack.pop(),this.lsb=f,this.width=e,this.stack.push(e,f,m),i=this.executeCommand(3,c.rmoveto);break;case 3084:if(this.stack.length<2){i=!0;break}var n=this.stack.pop(),o=this.stack.pop();this.stack.push(o/n);break;case 3088:if(this.stack.length<2){i=!0;break}g=this.stack.pop();var p=this.stack.pop();if(0===g&&3===p){var q=this.stack.splice(this.stack.length-17,17);this.stack.push(q[2]+q[0],q[3]+q[1],q[4],q[5],q[6],q[7],q[8],q[9],q[10],q[11],q[12],q[13],q[14]),i=this.executeCommand(13,c.flex,!0),this.flexing=!1,this.stack.push(q[15],q[16])}else 1===g&&0===p&&(this.flexing=!0);break;case 3089:break;case 3105:this.stack=[];break;default:b('Unknown type 1 charstring command of "'+k+'"')}if(i)break}else 246>=k?k-=139:k=250>=k?256*(k-247)+a[++j]+108:254>=k?-(256*(k-251))-a[++j]-108:(255&a[++j])<<24|(255&a[++j])<<16|(255&a[++j])<<8|(255&a[++j])<<0,this.stack.push(k)}return i},executeCommand:function(a,b,c){var d=this.stack.length;if(a>d)return!0;for(var e=d-a,f=e;d>f;f++){var g=this.stack[f];g===(0|g)?this.output.push(28,g>>8&255,255&g):(g=65536*g|0,this.output.push(255,g>>24&255,g>>16&255,g>>8&255,255&g))}return this.output.push.apply(this.output,b),c?this.stack.splice(e,a):this.stack.length=0,!1}},a}(),gc=function(){function a(a){return a>=48&&57>=a||a>=65&&70>=a||a>=97&&102>=a}function b(a,b,c){for(var d=0|b,e=52845,f=22719,g=a.length,h=new Uint8Array(g),i=0;g>i;i++){var j=a[i];h[i]=j^d>>8,d=(j+d)*e+f&65535}return Array.prototype.slice.call(h,c)}function c(b,c,d){var e,f,g=0|c,h=52845,i=22719,j=b.length,k=j>>>1,l=new Uint8Array(k);for(e=0,f=0;j>e;e++){var m=b[e];if(a(m)){e++;for(var n;j>e&&!a(n=b[e]);)e++;if(j>e){var o=parseInt(String.fromCharCode(m,n),16);l[f++]=o^g>>8,g=(o+g)*h+i&65535}}}return Array.prototype.slice.call(l,d,f)}function d(a){return 47===a||91===a||93===a||123===a||125===a||40===a||41===a}function e(d,e){if(e){var g=d.getBytes(),h=!(a(g[0])&&a(g[1])&&a(g[2])&&a(g[3]));d=new Mc(h?b(g,f,4):c(g,f,4))}this.stream=d,this.nextChar()}var f=55665,g=4330;return e.prototype={readNumberArray:function(){this.getToken();for(var a=[];;){var b=this.getToken();if(null===b||"]"===b||"}"===b)break;a.push(parseFloat(b||0))}return a},readNumber:function(){var a=this.getToken();return parseFloat(a||0)},readInt:function(){var a=this.getToken();return 0|parseInt(a||0,10)},readBoolean:function(){var a=this.getToken();return"true"===a?1:0},nextChar:function(){return this.currentChar=this.stream.getByte()},getToken:function(){for(var a=!1,b=this.currentChar;;){if(-1===b)return null;if(a)10!==b&&13!==b||(a=!1);else if(37===b)a=!0;else if(!Gc.isSpace(b))break;b=this.nextChar()}if(d(b))return this.nextChar(),String.fromCharCode(b);var c="";do c+=String.fromCharCode(b),b=this.nextChar();while(b>=0&&!Gc.isSpace(b)&&!d(b));return c},extractFontProgram:function(){for(var a,c,d,e,f,h=this.stream,i=[],j=[],k={subrs:[],charstrings:[],properties:{privateData:{lenIV:4}}};null!==(a=this.getToken());)if("/"===a)switch(a=this.getToken()){case"CharStrings":for(this.getToken(),this.getToken(),this.getToken(),this.getToken();;){if(a=this.getToken(),null===a||"end"===a)break;if("/"===a){var l=this.getToken();c=this.readInt(),this.getToken(),d=h.makeSubStream(h.pos,c),e=k.properties.privateData.lenIV,f=b(d.getBytes(),g,e),h.skip(c),this.nextChar(),a=this.getToken(),"noaccess"===a&&this.getToken(),j.push({glyph:l,encoded:f})}}break;case"Subrs":this.readInt();for(this.getToken();"dup"===(a=this.getToken());){var m=this.readInt();c=this.readInt(),this.getToken(),d=h.makeSubStream(h.pos,c),e=k.properties.privateData.lenIV,f=b(d.getBytes(),g,e),h.skip(c),this.nextChar(),a=this.getToken(),"noaccess"===a&&this.getToken(),i[m]=f}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":var n=this.readNumberArray();n.length>0&&n.length%2===0&&Mb&&(k.properties.privateData[a]=n);break;case"StemSnapH":case"StemSnapV":k.properties.privateData[a]=this.readNumberArray();break;case"StdHW":case"StdVW":k.properties.privateData[a]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":case"ExpansionFactor":k.properties.privateData[a]=this.readNumber();break;case"ForceBold":k.properties.privateData[a]=this.readBoolean()}for(var o=0;og;g++){for(b=this.getToken();"dup"!==b&&"def"!==b;)if(b=this.getToken(),null===b)return;if("def"===b)break;var h=this.readInt();this.getToken();var i=this.getToken();d[h]=i,this.getToken()}}else d=Pb[e];a.builtInEncoding=d;break;case"FontBBox":var j=this.readNumberArray();a.ascent=j[3],a.descent=j[1],a.ascentScaled=!0}}},e}(),hc=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],ic=function(a,b,c){ -var d=6,e=c.length1,f=c.length2,g=b.peekBytes(d),h=128===g[0]&&1===g[1];h&&(b.skip(d),e=g[5]<<24|g[4]<<16|g[3]<<8|g[2]);var i=new Mc(b.getBytes(e)),j=new gc(i);j.extractFontHeader(c),h&&(g=b.getBytes(d),f=g[5]<<24|g[4]<<16|g[3]<<8|g[2]);var k=new Mc(b.getBytes(f)),l=new gc(k,!0),m=l.extractFontProgram();for(var n in m.properties)c[n]=m.properties[n];var o=m.charstrings,p=this.getType2Charstrings(o),q=this.getType2Subrs(m.subrs);this.charstrings=o,this.data=this.wrap(a,p,this.charstrings,q,c),this.seacs=this.getSeacs(m.charstrings)};ic.prototype={get numGlyphs(){return this.charstrings.length+1},getCharset:function(){for(var a=[".notdef"],b=this.charstrings,c=0;c=0&&(f[g]=b)}return Q(a,f,d)},getSeacs:function(a){var b,c,d=[];for(b=0,c=a.length;c>b;b++){var e=a[b];e.seac&&(d[b+1]=e.seac)}return d},getType2Charstrings:function(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c].charstring);return b},getType2Subrs:function(a){var b=0,c=a.length;b=1133>c?107:33769>c?1131:32768;var d,e=[];for(d=0;b>d;d++)e.push([11]);for(d=0;c>d;d++)e.push(a[d]);return e},wrap:function(a,b,c,d,e){var f=new lc;f.header=new mc(1,0,4,4),f.names=[a];var g=new qc;g.setByName("version",391),g.setByName("Notice",392),g.setByName("FullName",393),g.setByName("FamilyName",394),g.setByName("Weight",395),g.setByName("Encoding",null),g.setByName("FontMatrix",e.fontMatrix),g.setByName("FontBBox",e.bbox),g.setByName("charset",null),g.setByName("CharStrings",null),g.setByName("Private",null),f.topDict=g;var h=new nc;h.add("Version 0.11"),h.add("See original notice"),h.add(a),h.add(a),h.add("Medium"),f.strings=h,f.globalSubrIndex=new oc;var i,j,k=b.length,l=[0];for(i=0;k>i;i++){var m=hc.indexOf(c[i].glyphName);-1===m&&(m=0),l.push(m>>8&255,255&m)}f.charset=new tc(!1,0,[],l);var n=new oc;for(n.add([139,14]),i=0;k>i;i++)n.add(b[i]);f.charStrings=n;var o=new rc;o.setByName("Subrs",null);var p=["BlueValues","OtherBlues","FamilyBlues","FamilyOtherBlues","StemSnapH","StemSnapV","BlueShift","BlueFuzz","BlueScale","LanguageGroup","ExpansionFactor","ForceBold","StdHW","StdVW"];for(i=0,j=p.length;j>i;i++){var q=p[i];if(e.privateData.hasOwnProperty(q)){var r=e.privateData[q];if(C(r))for(var s=r.length-1;s>0;s--)r[s]-=r[s-1];o.setByName(q,r)}}f.topDict.privateDict=o;var t=new oc;for(i=0,j=d.length;j>i;i++)t.add(d[i]);o.subrsIndex=t;var u=new xc(f);return u.compile()}};var jc=function(){function a(a,c){this.properties=c;var d=new kc(a,c);this.cff=d.parse();var e=new xc(this.cff);this.seacs=this.cff.seacs;try{this.data=e.compile()}catch(f){b("Failed to compile font "+c.loadedName),this.data=a}}return a.prototype={get numGlyphs(){return this.cff.charStrings.count},getCharset:function(){return this.cff.charset.charset},getGlyphMapping:function(){var a,b,c=this.cff,d=this.properties,e=c.charset.charset;if(d.composite){if(a=Object.create(null),c.isCIDFont)for(b=0;bq;++q){var s=p.get(q),t=this.createDict(qc,this.parseDict(s),b.strings);this.parsePrivateDict(t),b.fdArray.push(t)}o=null,n=this.parseCharsets(i.getByName("charset"),b.charStrings.count,b.strings,!0),b.fdSelect=this.parseFDSelect(i.getByName("FDSelect"),b.charStrings.count)}else n=this.parseCharsets(i.getByName("charset"),b.charStrings.count,b.strings,!1),o=this.parseEncoding(i.getByName("Encoding"),a,b.strings,n.charset);return b.charset=n,b.encoding=o,b},parseHeader:function(){for(var b=this.bytes,d=b.length,e=0;d>e&&1!==b[e];)++e;e>=d?c("Invalid CFF header"):0!==e&&(a("cff data is shifted"),b=b.subarray(e),this.bytes=b);var f=b[0],g=b[1],h=b[2],i=b[3],j=new mc(f,g,h,i);return{obj:j,endPos:h}},parseDict:function(a){function b(){var b=a[e++];return 30===b?d(e):28===b?(b=a[e++],b=(b<<24|a[e++]<<16)>>16):29===b?(b=a[e++],b=b<<8|a[e++],b=b<<8|a[e++],b=b<<8|a[e++]):b>=32&&246>=b?b-139:b>=247&&250>=b?256*(b-247)+a[e++]+108:b>=251&&254>=b?-(256*(b-251))-a[e++]-108:(c("255 is not a valid DICT command"),-1)}function d(){for(var b="",c=15,d=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],f=a.length;f>e;){var g=a[e++],h=g>>4,i=15&g;if(h===c)break;if(b+=d[h],i===c)break;b+=d[i]}return parseFloat(b)}var e=0,f=[],g=[];e=0;for(var h=a.length;h>e;){var i=a[e];21>=i?(12===i&&(i=i<<8|a[++e]),g.push([i,f]),f=[],++e):f.push(b())}return g},parseIndex:function(a){var b,c,d=new oc,e=this.bytes,f=e[a++]<<8|e[a++],g=[],h=a;if(0!==f){var i=e[a++],j=a+(f+1)*i-1;for(b=0,c=f+1;c>b;++b){for(var k=0,l=0;i>l;++l)k<<=8,k+=e[a++];g.push(j+k)}h=g[f]}for(b=0,c=g.length-1;c>b;++b){var m=g[b],n=g[b+1];d.add(e.subarray(m,n))}return{obj:d,endPos:h}},parseNameIndex:function(a){for(var b=[],c=0,d=a.count;d>c;++c){for(var e=a.get(c),f=Math.min(e.length,127),g=[],h=0;f>h;++h){var j=e[h];(0!==h||0!==j)&&(33>j||j>126||91===j||93===j||40===j||41===j||123===j||125===j||60===j||62===j||47===j||37===j||35===j)?g[h]=95:g[h]=j}b.push(i(g))}return b},parseStringIndex:function(a){for(var b=new nc,c=0,d=a.count;d>c;++c){var e=a.get(c);b.add(i(e))}return b},createDict:function(a,b,c){for(var d=new a(c),e=0,f=b.length;f>e;++e){var g=b[e],h=g[0],i=g[1];d.setByKey(h,i)}return d},parseCharStrings:function(a){for(var c=this.parseIndex(a).obj,d=[],g=[],h=c.count,i=0;h>i;i++){for(var j=c.get(i),k=0,l=[],m=!0,n=0,o=!0,p=j,q=p.length,r=!0,s=0;q>s;){var t=p[s++],u=null;if(12===t){var v=p[s++];0===v?(p[s-2]=139,p[s-1]=22,k=0):u=f[v]}else 28===t?(l[k]=(p[s]<<24|p[s+1]<<16)>>16,s+=2,k++):14===t?(k>=4&&(k-=4,Nb&&(d[i]=l.slice(k,k+4),o=!1)),u=e[t]):t>=32&&246>=t?(l[k]=t-139,k++):t>=247&&254>=t?(l[k]=251>t?(t-247<<8)+p[s]+108:-(t-251<<8)-p[s]-108,s++,k++):255===t?(l[k]=(p[s]<<24|p[s+1]<<16|p[s+2]<<8|p[s+3])/65536,s+=4,k++):19===t||20===t?(n+=k>>1,s+=n+7>>3,k%=2,u=e[t]):u=e[t];if(u){if(u.stem&&(n+=k>>1),"min"in u&&!m&&k=2&&u.stem?k%=2:k>1&&b("Found too many parameters for stack-clearing command"),k>0&&l[k-1]>=0&&(g[i]=l[k-1])),"stackDelta"in u?("stackFn"in u&&u.stackFn(l,k),k+=u.stackDelta):u.stackClearing?k=0:u.resetStack?(k=0,m=!1):u.undefStack&&(k=0,m=!0,r=!1)}}o||c.set(i,new Uint8Array([14]))}return{charStrings:c,seacs:d,widths:g}},emptyPrivateDictionary:function(a){var b=this.createDict(rc,[],a.strings);a.setByKey(18,[0,0]),a.privateDict=b},parsePrivateDict:function(a){if(!a.hasName("Private"))return void this.emptyPrivateDictionary(a);var b=a.getByName("Private");if(!C(b)||2!==b.length)return void a.removeByName("Private");var c=b[0],d=b[1];if(0===c||d>=this.bytes.length)return void this.emptyPrivateDictionary(a);var e=d+c,f=this.bytes.subarray(d,e),g=this.parseDict(f),h=this.createDict(rc,g,a.strings);if(a.privateDict=h,h.getByName("Subrs")){var i=h.getByName("Subrs"),j=d+i;if(0===i||j>=this.bytes.length)return void this.emptyPrivateDictionary(a);var k=this.parseIndex(j);h.subrsIndex=k.obj}},parseCharsets:function(a,b,d,e){if(0===a)return new tc(!0,sc.ISO_ADOBE,Ja);if(1===a)return new tc(!0,sc.EXPERT,Ka);if(2===a)return new tc(!0,sc.EXPERT_SUBSET,La);var f,g,h,i=this.bytes,j=a,k=i[a++],l=[".notdef"];switch(b-=1,k){case 0:for(h=0;b>h;h++)f=i[a++]<<8|i[a++],l.push(e?f:d.get(f));break;case 1:for(;l.length<=b;)for(f=i[a++]<<8|i[a++],g=i[a++],h=0;g>=h;h++)l.push(e?f++:d.get(f++));break;case 2:for(;l.length<=b;)for(f=i[a++]<<8|i[a++],g=i[a++]<<8|i[a++],h=0;g>=h;h++)l.push(e?f++:d.get(f++));break;default:c("Unknown charset format")}var m=a,n=i.subarray(j,m);return new tc(!1,k,l,n)},parseEncoding:function(a,b,d,e){function f(){var b=k[a++];for(h=0;b>h;h++){var c=k[a++],f=(k[a++]<<8)+(255&k[a++]);j[c]=e.indexOf(d.get(f))}}var g,h,i,j={},k=this.bytes,l=!1,m=!1,n=null;if(0===a||1===a){l=!0,g=a;var o=a?Pb.ExpertEncoding:Pb.StandardEncoding;for(h=0,i=e.length;i>h;h++){var p=o.indexOf(e[h]);-1!==p&&(j[p]=h)}}else{var q=a;switch(g=k[a++],127&g){case 0:var r=k[a++];for(h=1;r>=h;h++)j[k[a++]]=h;break;case 1:var s=k[a++],t=1;for(h=0;s>h;h++)for(var u=k[a++],v=k[a++],w=u;u+v>=w;w++)j[w]=t++;break;default:c("Unknow encoding format: "+g+" in CFF")}var x=a;128&g&&(k[q]&=127,f(),m=!0),n=k.subarray(q,x)}return g=127&g,new uc(l,g,j,n)},parseFDSelect:function(a,b){var d,e=a,f=this.bytes,g=f[a++],h=[];switch(g){case 0:for(d=0;b>d;++d){var i=f[a++];h.push(i)}break;case 3:var j=f[a++]<<8|f[a++];for(d=0;j>d;++d)for(var k=f[a++]<<8|f[a++],l=f[a++],m=f[a]<<8|f[a+1],n=k;m>n;++n)h.push(l);a+=2;break;default:c("Unknown fdselect format "+g)}var o=a;return new vc(h,f.subarray(e,o))}},d}(),lc=function(){function a(){this.header=null,this.names=[],this.topDict=null,this.strings=new nc,this.globalSubrIndex=null,this.encoding=null,this.charset=null,this.charStrings=null,this.fdArray=[],this.fdSelect=null,this.isCIDFont=!1}return a}(),mc=function(){function a(a,b,c,d){this.major=a,this.minor=b,this.hdrSize=c,this.offSize=d}return a}(),nc=function(){function a(){this.strings=[]}return a.prototype={get:function(a){return a>=0&&390>=a?hc[a]:a-391<=this.strings.length?this.strings[a-391]:hc[0]},add:function(a){this.strings.push(a)},get count(){return this.strings.length}},a}(),oc=function(){function a(){this.objects=[],this.length=0}return a.prototype={add:function(a){this.length+=a.length,this.objects.push(a)},set:function(a,b){this.length+=b.length-this.objects[a].length,this.objects[a]=b},get:function(a){return this.objects[a]},get count(){return this.objects.length}},a}(),pc=function(){function a(a,b){this.keyToNameMap=a.keyToNameMap,this.nameToKeyMap=a.nameToKeyMap,this.defaults=a.defaults,this.types=a.types,this.opcodes=a.opcodes,this.order=a.order,this.strings=b,this.values={}}return a.prototype={setByKey:function(a,b){if(!(a in this.keyToNameMap))return!1;if(0===b.length)return!0;var c=this.types[a];return"num"!==c&&"sid"!==c&&"offset"!==c||(b=b[0]),this.values[a]=b,!0},setByName:function(a,b){a in this.nameToKeyMap||c('Invalid dictionary name "'+a+'"'),this.values[this.nameToKeyMap[a]]=b},hasName:function(a){return this.nameToKeyMap[a]in this.values},getByName:function(a){a in this.nameToKeyMap||c('Invalid dictionary name "'+a+'"');var b=this.nameToKeyMap[a];return b in this.values?this.values[b]:this.defaults[b]},removeByName:function(a){delete this.values[this.nameToKeyMap[a]]}},a.createTables=function(a){for(var b={keyToNameMap:{},nameToKeyMap:{},defaults:{},types:{},opcodes:{},order:[]},c=0,d=a.length;d>c;++c){var e=a[c],f=C(e[0])?(e[0][0]<<8)+e[0][1]:e[0];b.keyToNameMap[f]=e[1],b.nameToKeyMap[e[1]]=f,b.types[f]=e[2],b.defaults[f]=e[3],b.opcodes[f]=C(e[0])?e[0]:[e[0]],b.order.push(f)}return b},a}(),qc=function(){function a(a){null===c&&(c=pc.createTables(b)),pc.call(this,c,a),this.privateDict=null}var b=[[[12,30],"ROS",["sid","sid","num"],null],[[12,20],"SyntheticBase","num",null],[0,"version","sid",null],[1,"Notice","sid",null],[[12,0],"Copyright","sid",null],[2,"FullName","sid",null],[3,"FamilyName","sid",null],[4,"Weight","sid",null],[[12,1],"isFixedPitch","num",0],[[12,2],"ItalicAngle","num",0],[[12,3],"UnderlinePosition","num",-100],[[12,4],"UnderlineThickness","num",50],[[12,5],"PaintType","num",0],[[12,6],"CharstringType","num",2],[[12,7],"FontMatrix",["num","num","num","num","num","num"],[.001,0,0,.001,0,0]],[13,"UniqueID","num",null],[5,"FontBBox",["num","num","num","num"],[0,0,0,0]],[[12,8],"StrokeWidth","num",0],[14,"XUID","array",null],[15,"charset","offset",0],[16,"Encoding","offset",0],[17,"CharStrings","offset",0],[18,"Private",["offset","offset"],null],[[12,21],"PostScript","sid",null],[[12,22],"BaseFontName","sid",null],[[12,23],"BaseFontBlend","delta",null],[[12,31],"CIDFontVersion","num",0],[[12,32],"CIDFontRevision","num",0],[[12,33],"CIDFontType","num",0],[[12,34],"CIDCount","num",8720],[[12,35],"UIDBase","num",null],[[12,37],"FDSelect","offset",null],[[12,36],"FDArray","offset",null],[[12,38],"FontName","sid",null]],c=null;return a.prototype=Object.create(pc.prototype),a}(),rc=function(){function a(a){null===c&&(c=pc.createTables(b)),pc.call(this,c,a),this.subrsIndex=null}var b=[[6,"BlueValues","delta",null],[7,"OtherBlues","delta",null],[8,"FamilyBlues","delta",null],[9,"FamilyOtherBlues","delta",null],[[12,9],"BlueScale","num",.039625],[[12,10],"BlueShift","num",7],[[12,11],"BlueFuzz","num",1],[10,"StdHW","num",null],[11,"StdVW","num",null],[[12,12],"StemSnapH","delta",null],[[12,13],"StemSnapV","delta",null],[[12,14],"ForceBold","num",0],[[12,17],"LanguageGroup","num",0],[[12,18],"ExpansionFactor","num",.06],[[12,19],"initialRandomSeed","num",0],[20,"defaultWidthX","num",0],[21,"nominalWidthX","num",0],[19,"Subrs","offset",null]],c=null;return a.prototype=Object.create(pc.prototype),a}(),sc={ISO_ADOBE:0,EXPERT:1,EXPERT_SUBSET:2},tc=function(){function a(a,b,c,d){this.predefined=a,this.format=b,this.charset=c,this.raw=d}return a}(),uc=function(){function a(a,b,c,d){this.predefined=a,this.format=b,this.encoding=c,this.raw=d}return a}(),vc=function(){function a(a,b){this.fdSelect=a,this.raw=b}return a}(),wc=function(){function a(){this.offsets={}}return a.prototype={isTracking:function(a){return a in this.offsets},track:function(a,b){a in this.offsets&&c("Already tracking location of "+a),this.offsets[a]=b},offset:function(a){for(var b in this.offsets)this.offsets[b]+=a},setEntryLocation:function(a,b,d){a in this.offsets||c("Not tracking location of "+a);for(var e=d.data,f=this.offsets[a],g=5,h=0,i=b.length;i>h;++h){var j=h*g+f,k=j+1,l=j+2,m=j+3,n=j+4;29===e[j]&&0===e[k]&&0===e[l]&&0===e[m]&&0===e[n]||c("writing to an offset that is not empty");var o=b[h];e[j]=29,e[k]=o>>24&255,e[l]=o>>16&255,e[m]=o>>8&255,e[n]=255&o}}},a}(),xc=function(){function a(a){this.cff=a}return a.prototype={compile:function(){var a=this.cff,b={data:[],length:0,add:function(a){this.data=this.data.concat(a),this.length=this.data.length}},c=this.compileHeader(a.header);b.add(c);var d=this.compileNameIndex(a.names);if(b.add(d),a.isCIDFont&&a.topDict.hasName("FontMatrix")){var e=a.topDict.getByName("FontMatrix");a.topDict.removeByName("FontMatrix");for(var f=0,g=a.fdArray.length;g>f;f++){var h=a.fdArray[f],i=e.slice(0);h.hasName("FontMatrix")&&(i=na.transform(i,h.getByName("FontMatrix"))),h.setByName("FontMatrix",i)}}var j=this.compileTopDicts([a.topDict],b.length,a.isCIDFont);b.add(j.output);var k=j.trackers[0],l=this.compileStringIndex(a.strings.strings);b.add(l);var m=this.compileIndex(a.globalSubrIndex);if(b.add(m),a.encoding&&a.topDict.hasName("Encoding"))if(a.encoding.predefined)k.setEntryLocation("Encoding",[a.encoding.format],b);else{var n=this.compileEncoding(a.encoding);k.setEntryLocation("Encoding",[b.length],b),b.add(n)}if(a.charset&&a.topDict.hasName("charset"))if(a.charset.predefined)k.setEntryLocation("charset",[a.charset.format],b);else{var o=this.compileCharset(a.charset);k.setEntryLocation("charset",[b.length],b),b.add(o)}var p=this.compileCharStrings(a.charStrings);if(k.setEntryLocation("CharStrings",[b.length],b),b.add(p),a.isCIDFont){k.setEntryLocation("FDSelect",[b.length],b);var q=this.compileFDSelect(a.fdSelect.raw);b.add(q),j=this.compileTopDicts(a.fdArray,b.length,!0),k.setEntryLocation("FDArray",[b.length],b),b.add(j.output);var r=j.trackers;this.compilePrivateDicts(a.fdArray,r,b)}return this.compilePrivateDicts([a.topDict],[k],b),b.add([0]),b.data},encodeNumber:function(a){return parseFloat(a)!==parseInt(a,10)||isNaN(a)?this.encodeFloat(a):this.encodeInteger(a)},encodeFloat:function(a){var b=a.toString(),c=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(b);if(c){var d=parseFloat("1e"+((c[2]?+c[2]:0)+c[1].length));b=(Math.round(a*d)/d).toString()}var e,f,g="";for(e=0,f=b.length;f>e;++e){var h=b[e];g+="e"===h?"-"===b[++e]?"c":"b":"."===h?"a":"-"===h?"e":h}g+=1&g.length?"f":"ff";var i=[30];for(e=0,f=g.length;f>e;e+=2)i.push(parseInt(g.substr(e,2),16));return i},encodeInteger:function(a){var b;return a>=-107&&107>=a?b=[a+139]:a>=108&&1131>=a?(a=[a-108],b=[(a>>8)+247,255&a]):a>=-1131&&-108>=a?(a=-a-108,b=[(a>>8)+251,255&a]):b=a>=-32768&&32767>=a?[28,a>>8&255,255&a]:[29,a>>24&255,a>>16&255,a>>8&255,255&a],b},compileHeader:function(a){return[a.major,a.minor,a.hdrSize,a.offSize]},compileNameIndex:function(a){for(var b=new oc,c=0,d=a.length;d>c;++c)b.add(j(a[c]));return this.compileIndex(b)},compileTopDicts:function(a,b,c){for(var d=[],e=new oc,f=0,g=a.length;g>f;++f){var h=a[f];c&&(h.removeByName("CIDFontVersion"),h.removeByName("CIDFontRevision"),h.removeByName("CIDFontType"),h.removeByName("CIDCount"),h.removeByName("UIDBase"));var i=new wc,j=this.compileDict(h,i);d.push(i),e.add(j),i.offset(b)}return e=this.compileIndex(e,d),{trackers:d,output:e}},compilePrivateDicts:function(a,b,c){for(var d=0,f=a.length;f>d;++d){var g=a[d];e(g.privateDict&&g.hasName("Private"),"There must be an private dictionary.");var h=g.privateDict,i=new wc,j=this.compileDict(h,i),k=c.length;if(i.offset(k),j.length||(k=0),b[d].setEntryLocation("Private",[j.length,k],c),c.add(j),h.subrsIndex&&h.hasName("Subrs")){var l=this.compileIndex(h.subrsIndex);i.setEntryLocation("Subrs",[j.length],c),c.add(l)}}},compileDict:function(a,b){for(var d=[],e=a.order,f=0;fj;++j){var l=i[j],m=h[j];switch(l){case"num":case"sid":d=d.concat(this.encodeNumber(m));break;case"offset":var n=a.keyToNameMap[g];b.isTracking(n)||b.track(n,d.length),d=d.concat([29,0,0,0,0]);break;case"array":case"delta":d=d.concat(this.encodeNumber(m));for(var o=1,p=h.length;p>o;++o)d=d.concat(this.encodeNumber(h[o]));break;default:c("Unknown data type of "+l)}}d=d.concat(a.opcodes[g])}}}return d},compileStringIndex:function(a){for(var b=new oc,c=0,d=a.length;d>c;++c)b.add(j(a[c]));return this.compileIndex(b)},compileGlobalSubrIndex:function(){var a=this.cff.globalSubrIndex;this.out.writeByteArray(this.compileIndex(a))},compileCharStrings:function(a){return this.compileIndex(a)},compileCharset:function(a){return this.compileTypedArray(a.raw)},compileEncoding:function(a){return this.compileTypedArray(a.raw)},compileFDSelect:function(a){return this.compileTypedArray(a)},compileTypedArray:function(a){for(var b=[],c=0,d=a.length;d>c;++c)b[c]=a[c];return b},compileIndex:function(a,b){b=b||[];var c=a.objects,d=c.length;if(0===d)return[0,0,0];var e,f=[d>>8&255,255&d],g=1;for(e=0;d>e;++e)g+=c[e].length;var h;h=256>g?1:65536>g?2:16777216>g?3:4,f.push(h);var i=1;for(e=0;d+1>e;e++)1===h?f.push(255&i):2===h?f.push(i>>8&255,255&i):3===h?f.push(i>>16&255,i>>8&255,255&i):f.push(i>>>24&255,i>>16&255,i>>8&255,255&i),c[e]&&(i+=c[e].length);for(e=0;d>e;e++){b[e]&&b[e].offset(f.length);for(var j=0,k=c[e].length;k>j;j++)f.push(c[e][j])}return f}},a}();!function(){/Windows/.test(navigator.userAgent)&&(Nb=!0)}(),function(){/Windows.*Chrome/.test(navigator.userAgent)&&(Kb=!0)}();var yc=function(){function a(a,b){return a[b]<<24|a[b+1]<<16|a[b+2]<<8|a[b+3]}function b(a,b){return a[b]<<8|a[b+1]}function d(d,e,f){var g,h,i,j,k=1===b(d,e+2)?a(d,e+8):a(d,e+16),l=b(d,e+k);if(4===l){g=b(d,e+k+2);var m=b(d,e+k+6)>>1;for(i=e+k+14,h=[],j=0;m>j;j++,i+=2)h[j]={end:b(d,i)};for(i+=2,j=0;m>j;j++,i+=2)h[j].start=b(d,i);for(j=0;m>j;j++,i+=2)h[j].idDelta=b(d,i);for(j=0;m>j;j++,i+=2){var n=b(d,i);if(0!==n){h[j].ids=[];for(var o=0,p=h[j].end-h[j].start+1;p>o;o++)h[j].ids[o]=b(d,i+n),n+=2}}return h}if(12===l){g=a(d,e+k+4);var q=a(d,e+k+12);for(i=e+k+16,h=[],j=0;q>j;j++)h.push({start:a(d,i),end:a(d,i+4),idDelta:a(d,i+8)-a(d,i)}),i+=12;return h}c("not supported cmap: "+l)}function e(a,b,c){var d={},e=new kc(new Mc(a,b,c-b),d),f=e.parse();return{glyphs:f.charStrings.objects,subrs:f.topDict.privateDict&&f.topDict.privateDict.subrsIndex&&f.topDict.privateDict.subrsIndex.objects,gsubrs:f.globalSubrIndex&&f.globalSubrIndex.objects}}function f(a,b,c){var d,e;c?(d=4,e=function(a,b){return a[b]<<24|a[b+1]<<16|a[b+2]<<8|a[b+3]}):(d=2,e=function(a,b){return a[b]<<9|a[b+1]<<1});for(var f=[],g=e(b,0),h=d;hd;){var f=d+e+1>>1;c>16,k=0,l=0;if(i+=10,0>j){do{g=a[i]<<8|a[i+1];var m=a[i+2]<<8|a[i+3];i+=4;var n,o;1&g?(n=(a[i]<<24|a[i+1]<<16)>>16,o=(a[i+2]<<24|a[i+3]<<16)>>16,i+=4):(n=a[i++],o=a[i++]),2&g?(k=n,l=o):(k=0,l=0);var p=1,q=1,r=0,s=0;8&g?(p=q=(a[i]<<24|a[i+1]<<16)/1073741824,i+=2):64&g?(p=(a[i]<<24|a[i+1]<<16)/1073741824,q=(a[i+2]<<24|a[i+3]<<16)/1073741824,i+=4):128&g&&(p=(a[i]<<24|a[i+1]<<16)/1073741824,r=(a[i+2]<<24|a[i+3]<<16)/1073741824,s=(a[i+4]<<24|a[i+5]<<16)/1073741824,q=(a[i+6]<<24|a[i+7]<<16)/1073741824,i+=8);var t=c.glyphs[m];t&&(b.push({cmd:"save"}),b.push({cmd:"transform",args:[p,r,s,q,k,l]}),h(t,b,c),b.push({cmd:"restore"}))}while(32&g)}else{var u,v,w=[];for(u=0;j>u;u++)w.push(a[i]<<8|a[i+1]),i+=2;var x=a[i]<<8|a[i+1];i+=2+x;for(var y=w[w.length-1]+1,z=[];z.length0;)z.push({flags:g})}for(u=0;y>u;u++){switch(18&z[u].flags){case 0:k+=(a[i]<<24|a[i+1]<<16)>>16,i+=2;break;case 2:k-=a[i++];break;case 18:k+=a[i++]}z[u].x=k}for(u=0;y>u;u++){switch(36&z[u].flags){case 0:l+=(a[i]<<24|a[i+1]<<16)>>16,i+=2;break;case 4:l-=a[i++];break;case 36:l+=a[i++]}z[u].y=l}var B=0;for(i=0;j>i;i++){var C=w[i],D=z.slice(B,C+1);if(1&D[0].flags)D.push(D[0]);else if(1&D[D.length-1].flags)D.unshift(D[D.length-1]);else{var E={flags:1,x:(D[0].x+D[D.length-1].x)/2,y:(D[0].y+D[D.length-1].y)/2};D.unshift(E),D.push(E)}for(d(D[0].x,D[0].y),u=1,v=D.length;v>u;u++)1&D[u].flags?e(D[u].x,D[u].y):1&D[u+1].flags?(f(D[u].x,D[u].y,D[u+1].x,D[u+1].y),u++):f(D[u].x,D[u].y,(D[u].x+D[u+1].x)/2,(D[u].y+D[u+1].y)/2);B=C+1}}}function j(a,b,d){function e(a,c){b.push({cmd:"moveTo",args:[a,c]})}function f(a,c){b.push({cmd:"lineTo",args:[a,c]})}function h(a,c,d,e,f,g){b.push({cmd:"bezierCurveTo",args:[a,c,d,e,f,g]})}function i(a){for(var o=0;o>1,y=!0;break;case 3:n+=k.length>>1,y=!0;break;case 4:m+=k.pop(),e(l,m),y=!0;break;case 5:for(;k.length>0;)l+=k.shift(),m+=k.shift(),f(l,m);break;case 6:for(;k.length>0&&(l+=k.shift(),f(l,m),0!==k.length);)m+=k.shift(),f(l,m);break;case 7:for(;k.length>0&&(m+=k.shift(),f(l,m),0!==k.length);)l+=k.shift(),f(l,m);break;case 8:for(;k.length>0;)p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m);break;case 10:w=k.pop()+d.subrsBias,x=d.subrs[w],x&&i(x);break;case 11:return;case 12:switch(z=a[o++]){case 34:p=l+k.shift(),q=p+k.shift(),t=m+k.shift(),l=q+k.shift(),h(p,m,q,t,l,t),p=l+k.shift(),q=p+k.shift(),l=q+k.shift(),h(p,t,q,m,l,m);break;case 35:p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m),p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m),k.pop();break;case 36:p=l+k.shift(),t=m+k.shift(),q=p+k.shift(),u=t+k.shift(),l=q+k.shift(),h(p,t,q,u,l,u),p=l+k.shift(),q=p+k.shift(),v=u+k.shift(),l=q+k.shift(),h(p,u,q,v,l,m);break;case 37:var A=l,B=m;p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m),p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q,m=s,Math.abs(l-A)>Math.abs(m-B)?l+=k.shift():m+=k.shift(),h(p,r,q,s,l,m);break;default:c("unknown operator: 12 "+z)}break;case 14:if(k.length>=4){var C=k.pop(),D=k.pop();m=k.pop(),l=k.pop(),b.push({cmd:"save"}),b.push({cmd:"translate",args:[l,m]});var E=g(d.cmap,String.fromCharCode(d.glyphNameMap[Pb.StandardEncoding[C]]));j(d.glyphs[E],b,d),b.push({cmd:"restore"}),E=g(d.cmap,String.fromCharCode(d.glyphNameMap[Pb.StandardEncoding[D]])),j(d.glyphs[E],b,d)}return;case 18:n+=k.length>>1,y=!0;break;case 19:n+=k.length>>1,o+=n+7>>3,y=!0;break;case 20:n+=k.length>>1,o+=n+7>>3,y=!0;break;case 21:m+=k.pop(),l+=k.pop(),e(l,m),y=!0;break;case 22:l+=k.pop(),e(l,m),y=!0;break;case 23:n+=k.length>>1,y=!0;break;case 24:for(;k.length>2;)p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m);l+=k.shift(),m+=k.shift(),f(l,m);break;case 25:for(;k.length>6;)l+=k.shift(),m+=k.shift(),f(l,m);p=l+k.shift(),r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+k.shift(),h(p,r,q,s,l,m);break;case 26:for(k.length%2&&(l+=k.shift());k.length>0;)p=l,r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q,m=s+k.shift(),h(p,r,q,s,l,m);break;case 27:for(k.length%2&&(m+=k.shift());k.length>0;)p=l+k.shift(),r=m,q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s,h(p,r,q,s,l,m);break;case 28:k.push((a[o]<<24|a[o+1]<<16)>>16),o+=2;break;case 29:w=k.pop()+d.gsubrsBias,x=d.gsubrs[w],x&&i(x);break;case 30:for(;k.length>0&&(p=l,r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+(1===k.length?k.shift():0),h(p,r,q,s,l,m),0!==k.length);)p=l+k.shift(),r=m,q=p+k.shift(),s=r+k.shift(),m=s+k.shift(),l=q+(1===k.length?k.shift():0),h(p,r,q,s,l,m);break;case 31:for(;k.length>0&&(p=l+k.shift(),r=m,q=p+k.shift(),s=r+k.shift(),m=s+k.shift(),l=q+(1===k.length?k.shift():0),h(p,r,q,s,l,m),0!==k.length);)p=l,r=m+k.shift(),q=p+k.shift(),s=r+k.shift(),l=q+k.shift(),m=s+(1===k.length?k.shift():0),h(p,r,q,s,l,m);break;default:32>z&&c("unknown operator: "+z),247>z?k.push(z-139):251>z?k.push(256*(z-247)+a[o++]+108):255>z?k.push(256*-(z-251)-a[o++]-108):(k.push((a[o]<<24|a[o+1]<<16|a[o+2]<<8|a[o+3])/65536),o+=4)}y&&(k.length=0)}}var k=[],l=0,m=0,n=0;i(a)}function k(a){this.compiledGlyphs={},this.fontMatrix=a}function l(a,b,c){c=c||[488e-6,0,0,488e-6,0,0],k.call(this,c),this.glyphs=a,this.cmap=b,this.compiledGlyphs=[]}function m(a,b,c,d){c=c||[.001,0,0,.001,0,0],k.call(this,c),this.glyphs=a.glyphs,this.gsubrs=a.gsubrs||[],this.subrs=a.subrs||[],this.cmap=b,this.glyphNameMap=d||zc,this.compiledGlyphs=[],this.gsubrsBias=this.gsubrs.length<1240?107:this.gsubrs.length<33900?1131:32768,this.subrsBias=this.subrs.length<1240?107:this.subrs.length<33900?1131:32768}var n="";return k.prototype={getPathJs:function(a){var b=g(this.cmap,a),c=this.compiledGlyphs[b];return c||(this.compiledGlyphs[b]=c=this.compileGlyph(this.glyphs[b])),c},compileGlyph:function(a){if(!a||0===a.length||14===a[0])return n;var b=[];return b.push({cmd:"save"}),b.push({cmd:"transform",args:this.fontMatrix.slice()}),b.push({cmd:"scale",args:["size","-size"]}),this.compileGlyphImpl(a,b),b.push({cmd:"restore"}),b},compileGlyphImpl:function(){c("Children classes should implement this.")},hasBuiltPath:function(a){var b=g(this.cmap,a);return b in this.compiledGlyphs}},na.inherit(l,k,{compileGlyphImpl:function(a,b){h(a,b,this)}}),na.inherit(m,k,{compileGlyphImpl:function(a,b){j(a,b,this)}}),{create:function(c){for(var g,h,j,k,n,o,p=new Uint8Array(c.data),q=b(p,4),r=0,s=12;q>r;r++,s+=16){var t=i(p.subarray(s,s+4)),u=a(p,s+8),v=a(p,s+12);switch(t){case"cmap":g=d(p,u,u+v);break;case"glyf":h=p.subarray(u,u+v);break;case"loca":j=p.subarray(u,u+v);break;case"head":o=b(p,u+18),n=b(p,u+50);break;case"CFF ":k=e(p,u,u+v)}}if(h){var w=o?[1/o,0,0,1/o,0,0]:c.fontMatrix;return new l(f(h,j,n),g,w)}return new m(k,g,c.fontMatrix,c.glyphNameMap)}}}(),zc={A:65,AE:198,AEacute:508,AEmacron:482,AEsmall:63462,Aacute:193,Aacutesmall:63457,Abreve:258,Abreveacute:7854,Abrevecyrillic:1232,Abrevedotbelow:7862,Abrevegrave:7856,Abrevehookabove:7858,Abrevetilde:7860,Acaron:461,Acircle:9398,Acircumflex:194,Acircumflexacute:7844,Acircumflexdotbelow:7852,Acircumflexgrave:7846,Acircumflexhookabove:7848,Acircumflexsmall:63458,Acircumflextilde:7850,Acute:63177,Acutesmall:63412,Acyrillic:1040,Adblgrave:512,Adieresis:196,Adieresiscyrillic:1234,Adieresismacron:478,Adieresissmall:63460,Adotbelow:7840,Adotmacron:480,Agrave:192,Agravesmall:63456,Ahookabove:7842,Aiecyrillic:1236,Ainvertedbreve:514,Alpha:913,Alphatonos:902,Amacron:256,Amonospace:65313,Aogonek:260,Aring:197,Aringacute:506,Aringbelow:7680,Aringsmall:63461,Asmall:63329,Atilde:195,Atildesmall:63459,Aybarmenian:1329,B:66,Bcircle:9399,Bdotaccent:7682,Bdotbelow:7684,Becyrillic:1041,Benarmenian:1330,Beta:914,Bhook:385,Blinebelow:7686,Bmonospace:65314,Brevesmall:63220,Bsmall:63330,Btopbar:386,C:67,Caarmenian:1342,Cacute:262,Caron:63178,Caronsmall:63221,Ccaron:268,Ccedilla:199,Ccedillaacute:7688,Ccedillasmall:63463,Ccircle:9400,Ccircumflex:264,Cdot:266,Cdotaccent:266,Cedillasmall:63416,Chaarmenian:1353,Cheabkhasiancyrillic:1212,Checyrillic:1063,Chedescenderabkhasiancyrillic:1214,Chedescendercyrillic:1206,Chedieresiscyrillic:1268,Cheharmenian:1347,Chekhakassiancyrillic:1227,Cheverticalstrokecyrillic:1208,Chi:935,Chook:391,Circumflexsmall:63222,Cmonospace:65315,Coarmenian:1361,Csmall:63331,D:68,DZ:497,DZcaron:452,Daarmenian:1332,Dafrican:393, -Dcaron:270,Dcedilla:7696,Dcircle:9401,Dcircumflexbelow:7698,Dcroat:272,Ddotaccent:7690,Ddotbelow:7692,Decyrillic:1044,Deicoptic:1006,Delta:8710,Deltagreek:916,Dhook:394,Dieresis:63179,DieresisAcute:63180,DieresisGrave:63181,Dieresissmall:63400,Digammagreek:988,Djecyrillic:1026,Dlinebelow:7694,Dmonospace:65316,Dotaccentsmall:63223,Dslash:272,Dsmall:63332,Dtopbar:395,Dz:498,Dzcaron:453,Dzeabkhasiancyrillic:1248,Dzecyrillic:1029,Dzhecyrillic:1039,E:69,Eacute:201,Eacutesmall:63465,Ebreve:276,Ecaron:282,Ecedillabreve:7708,Echarmenian:1333,Ecircle:9402,Ecircumflex:202,Ecircumflexacute:7870,Ecircumflexbelow:7704,Ecircumflexdotbelow:7878,Ecircumflexgrave:7872,Ecircumflexhookabove:7874,Ecircumflexsmall:63466,Ecircumflextilde:7876,Ecyrillic:1028,Edblgrave:516,Edieresis:203,Edieresissmall:63467,Edot:278,Edotaccent:278,Edotbelow:7864,Efcyrillic:1060,Egrave:200,Egravesmall:63464,Eharmenian:1335,Ehookabove:7866,Eightroman:8551,Einvertedbreve:518,Eiotifiedcyrillic:1124,Elcyrillic:1051,Elevenroman:8554,Emacron:274,Emacronacute:7702,Emacrongrave:7700,Emcyrillic:1052,Emonospace:65317,Encyrillic:1053,Endescendercyrillic:1186,Eng:330,Enghecyrillic:1188,Enhookcyrillic:1223,Eogonek:280,Eopen:400,Epsilon:917,Epsilontonos:904,Ercyrillic:1056,Ereversed:398,Ereversedcyrillic:1069,Escyrillic:1057,Esdescendercyrillic:1194,Esh:425,Esmall:63333,Eta:919,Etarmenian:1336,Etatonos:905,Eth:208,Ethsmall:63472,Etilde:7868,Etildebelow:7706,Euro:8364,Ezh:439,Ezhcaron:494,Ezhreversed:440,F:70,Fcircle:9403,Fdotaccent:7710,Feharmenian:1366,Feicoptic:996,Fhook:401,Fitacyrillic:1138,Fiveroman:8548,Fmonospace:65318,Fourroman:8547,Fsmall:63334,G:71,GBsquare:13191,Gacute:500,Gamma:915,Gammaafrican:404,Gangiacoptic:1002,Gbreve:286,Gcaron:486,Gcedilla:290,Gcircle:9404,Gcircumflex:284,Gcommaaccent:290,Gdot:288,Gdotaccent:288,Gecyrillic:1043,Ghadarmenian:1346,Ghemiddlehookcyrillic:1172,Ghestrokecyrillic:1170,Gheupturncyrillic:1168,Ghook:403,Gimarmenian:1331,Gjecyrillic:1027,Gmacron:7712,Gmonospace:65319,Grave:63182,Gravesmall:63328,Gsmall:63335,Gsmallhook:667,Gstroke:484,H:72,H18533:9679,H18543:9642,H18551:9643,H22073:9633,HPsquare:13259,Haabkhasiancyrillic:1192,Hadescendercyrillic:1202,Hardsigncyrillic:1066,Hbar:294,Hbrevebelow:7722,Hcedilla:7720,Hcircle:9405,Hcircumflex:292,Hdieresis:7718,Hdotaccent:7714,Hdotbelow:7716,Hmonospace:65320,Hoarmenian:1344,Horicoptic:1e3,Hsmall:63336,Hungarumlaut:63183,Hungarumlautsmall:63224,Hzsquare:13200,I:73,IAcyrillic:1071,IJ:306,IUcyrillic:1070,Iacute:205,Iacutesmall:63469,Ibreve:300,Icaron:463,Icircle:9406,Icircumflex:206,Icircumflexsmall:63470,Icyrillic:1030,Idblgrave:520,Idieresis:207,Idieresisacute:7726,Idieresiscyrillic:1252,Idieresissmall:63471,Idot:304,Idotaccent:304,Idotbelow:7882,Iebrevecyrillic:1238,Iecyrillic:1045,Ifraktur:8465,Igrave:204,Igravesmall:63468,Ihookabove:7880,Iicyrillic:1048,Iinvertedbreve:522,Iishortcyrillic:1049,Imacron:298,Imacroncyrillic:1250,Imonospace:65321,Iniarmenian:1339,Iocyrillic:1025,Iogonek:302,Iota:921,Iotaafrican:406,Iotadieresis:938,Iotatonos:906,Ismall:63337,Istroke:407,Itilde:296,Itildebelow:7724,Izhitsacyrillic:1140,Izhitsadblgravecyrillic:1142,J:74,Jaarmenian:1345,Jcircle:9407,Jcircumflex:308,Jecyrillic:1032,Jheharmenian:1355,Jmonospace:65322,Jsmall:63338,K:75,KBsquare:13189,KKsquare:13261,Kabashkircyrillic:1184,Kacute:7728,Kacyrillic:1050,Kadescendercyrillic:1178,Kahookcyrillic:1219,Kappa:922,Kastrokecyrillic:1182,Kaverticalstrokecyrillic:1180,Kcaron:488,Kcedilla:310,Kcircle:9408,Kcommaaccent:310,Kdotbelow:7730,Keharmenian:1364,Kenarmenian:1343,Khacyrillic:1061,Kheicoptic:998,Khook:408,Kjecyrillic:1036,Klinebelow:7732,Kmonospace:65323,Koppacyrillic:1152,Koppagreek:990,Ksicyrillic:1134,Ksmall:63339,L:76,LJ:455,LL:63167,Lacute:313,Lambda:923,Lcaron:317,Lcedilla:315,Lcircle:9409,Lcircumflexbelow:7740,Lcommaaccent:315,Ldot:319,Ldotaccent:319,Ldotbelow:7734,Ldotbelowmacron:7736,Liwnarmenian:1340,Lj:456,Ljecyrillic:1033,Llinebelow:7738,Lmonospace:65324,Lslash:321,Lslashsmall:63225,Lsmall:63340,M:77,MBsquare:13190,Macron:63184,Macronsmall:63407,Macute:7742,Mcircle:9410,Mdotaccent:7744,Mdotbelow:7746,Menarmenian:1348,Mmonospace:65325,Msmall:63341,Mturned:412,Mu:924,N:78,NJ:458,Nacute:323,Ncaron:327,Ncedilla:325,Ncircle:9411,Ncircumflexbelow:7754,Ncommaaccent:325,Ndotaccent:7748,Ndotbelow:7750,Nhookleft:413,Nineroman:8552,Nj:459,Njecyrillic:1034,Nlinebelow:7752,Nmonospace:65326,Nowarmenian:1350,Nsmall:63342,Ntilde:209,Ntildesmall:63473,Nu:925,O:79,OE:338,OEsmall:63226,Oacute:211,Oacutesmall:63475,Obarredcyrillic:1256,Obarreddieresiscyrillic:1258,Obreve:334,Ocaron:465,Ocenteredtilde:415,Ocircle:9412,Ocircumflex:212,Ocircumflexacute:7888,Ocircumflexdotbelow:7896,Ocircumflexgrave:7890,Ocircumflexhookabove:7892,Ocircumflexsmall:63476,Ocircumflextilde:7894,Ocyrillic:1054,Odblacute:336,Odblgrave:524,Odieresis:214,Odieresiscyrillic:1254,Odieresissmall:63478,Odotbelow:7884,Ogoneksmall:63227,Ograve:210,Ogravesmall:63474,Oharmenian:1365,Ohm:8486,Ohookabove:7886,Ohorn:416,Ohornacute:7898,Ohorndotbelow:7906,Ohorngrave:7900,Ohornhookabove:7902,Ohorntilde:7904,Ohungarumlaut:336,Oi:418,Oinvertedbreve:526,Omacron:332,Omacronacute:7762,Omacrongrave:7760,Omega:8486,Omegacyrillic:1120,Omegagreek:937,Omegaroundcyrillic:1146,Omegatitlocyrillic:1148,Omegatonos:911,Omicron:927,Omicrontonos:908,Omonospace:65327,Oneroman:8544,Oogonek:490,Oogonekmacron:492,Oopen:390,Oslash:216,Oslashacute:510,Oslashsmall:63480,Osmall:63343,Ostrokeacute:510,Otcyrillic:1150,Otilde:213,Otildeacute:7756,Otildedieresis:7758,Otildesmall:63477,P:80,Pacute:7764,Pcircle:9413,Pdotaccent:7766,Pecyrillic:1055,Peharmenian:1354,Pemiddlehookcyrillic:1190,Phi:934,Phook:420,Pi:928,Piwrarmenian:1363,Pmonospace:65328,Psi:936,Psicyrillic:1136,Psmall:63344,Q:81,Qcircle:9414,Qmonospace:65329,Qsmall:63345,R:82,Raarmenian:1356,Racute:340,Rcaron:344,Rcedilla:342,Rcircle:9415,Rcommaaccent:342,Rdblgrave:528,Rdotaccent:7768,Rdotbelow:7770,Rdotbelowmacron:7772,Reharmenian:1360,Rfraktur:8476,Rho:929,Ringsmall:63228,Rinvertedbreve:530,Rlinebelow:7774,Rmonospace:65330,Rsmall:63346,Rsmallinverted:641,Rsmallinvertedsuperior:694,S:83,SF010000:9484,SF020000:9492,SF030000:9488,SF040000:9496,SF050000:9532,SF060000:9516,SF070000:9524,SF080000:9500,SF090000:9508,SF100000:9472,SF110000:9474,SF190000:9569,SF200000:9570,SF210000:9558,SF220000:9557,SF230000:9571,SF240000:9553,SF250000:9559,SF260000:9565,SF270000:9564,SF280000:9563,SF360000:9566,SF370000:9567,SF380000:9562,SF390000:9556,SF400000:9577,SF410000:9574,SF420000:9568,SF430000:9552,SF440000:9580,SF450000:9575,SF460000:9576,SF470000:9572,SF480000:9573,SF490000:9561,SF500000:9560,SF510000:9554,SF520000:9555,SF530000:9579,SF540000:9578,Sacute:346,Sacutedotaccent:7780,Sampigreek:992,Scaron:352,Scarondotaccent:7782,Scaronsmall:63229,Scedilla:350,Schwa:399,Schwacyrillic:1240,Schwadieresiscyrillic:1242,Scircle:9416,Scircumflex:348,Scommaaccent:536,Sdotaccent:7776,Sdotbelow:7778,Sdotbelowdotaccent:7784,Seharmenian:1357,Sevenroman:8550,Shaarmenian:1351,Shacyrillic:1064,Shchacyrillic:1065,Sheicoptic:994,Shhacyrillic:1210,Shimacoptic:1004,Sigma:931,Sixroman:8549,Smonospace:65331,Softsigncyrillic:1068,Ssmall:63347,Stigmagreek:986,T:84,Tau:932,Tbar:358,Tcaron:356,Tcedilla:354,Tcircle:9417,Tcircumflexbelow:7792,Tcommaaccent:354,Tdotaccent:7786,Tdotbelow:7788,Tecyrillic:1058,Tedescendercyrillic:1196,Tenroman:8553,Tetsecyrillic:1204,Theta:920,Thook:428,Thorn:222,Thornsmall:63486,Threeroman:8546,Tildesmall:63230,Tiwnarmenian:1359,Tlinebelow:7790,Tmonospace:65332,Toarmenian:1337,Tonefive:444,Tonesix:388,Tonetwo:423,Tretroflexhook:430,Tsecyrillic:1062,Tshecyrillic:1035,Tsmall:63348,Twelveroman:8555,Tworoman:8545,U:85,Uacute:218,Uacutesmall:63482,Ubreve:364,Ucaron:467,Ucircle:9418,Ucircumflex:219,Ucircumflexbelow:7798,Ucircumflexsmall:63483,Ucyrillic:1059,Udblacute:368,Udblgrave:532,Udieresis:220,Udieresisacute:471,Udieresisbelow:7794,Udieresiscaron:473,Udieresiscyrillic:1264,Udieresisgrave:475,Udieresismacron:469,Udieresissmall:63484,Udotbelow:7908,Ugrave:217,Ugravesmall:63481,Uhookabove:7910,Uhorn:431,Uhornacute:7912,Uhorndotbelow:7920,Uhorngrave:7914,Uhornhookabove:7916,Uhorntilde:7918,Uhungarumlaut:368,Uhungarumlautcyrillic:1266,Uinvertedbreve:534,Ukcyrillic:1144,Umacron:362,Umacroncyrillic:1262,Umacrondieresis:7802,Umonospace:65333,Uogonek:370,Upsilon:933,Upsilon1:978,Upsilonacutehooksymbolgreek:979,Upsilonafrican:433,Upsilondieresis:939,Upsilondieresishooksymbolgreek:980,Upsilonhooksymbol:978,Upsilontonos:910,Uring:366,Ushortcyrillic:1038,Usmall:63349,Ustraightcyrillic:1198,Ustraightstrokecyrillic:1200,Utilde:360,Utildeacute:7800,Utildebelow:7796,V:86,Vcircle:9419,Vdotbelow:7806,Vecyrillic:1042,Vewarmenian:1358,Vhook:434,Vmonospace:65334,Voarmenian:1352,Vsmall:63350,Vtilde:7804,W:87,Wacute:7810,Wcircle:9420,Wcircumflex:372,Wdieresis:7812,Wdotaccent:7814,Wdotbelow:7816,Wgrave:7808,Wmonospace:65335,Wsmall:63351,X:88,Xcircle:9421,Xdieresis:7820,Xdotaccent:7818,Xeharmenian:1341,Xi:926,Xmonospace:65336,Xsmall:63352,Y:89,Yacute:221,Yacutesmall:63485,Yatcyrillic:1122,Ycircle:9422,Ycircumflex:374,Ydieresis:376,Ydieresissmall:63487,Ydotaccent:7822,Ydotbelow:7924,Yericyrillic:1067,Yerudieresiscyrillic:1272,Ygrave:7922,Yhook:435,Yhookabove:7926,Yiarmenian:1349,Yicyrillic:1031,Yiwnarmenian:1362,Ymonospace:65337,Ysmall:63353,Ytilde:7928,Yusbigcyrillic:1130,Yusbigiotifiedcyrillic:1132,Yuslittlecyrillic:1126,Yuslittleiotifiedcyrillic:1128,Z:90,Zaarmenian:1334,Zacute:377,Zcaron:381,Zcaronsmall:63231,Zcircle:9423,Zcircumflex:7824,Zdot:379,Zdotaccent:379,Zdotbelow:7826,Zecyrillic:1047,Zedescendercyrillic:1176,Zedieresiscyrillic:1246,Zeta:918,Zhearmenian:1338,Zhebrevecyrillic:1217,Zhecyrillic:1046,Zhedescendercyrillic:1174,Zhedieresiscyrillic:1244,Zlinebelow:7828,Zmonospace:65338,Zsmall:63354,Zstroke:437,a:97,aabengali:2438,aacute:225,aadeva:2310,aagujarati:2694,aagurmukhi:2566,aamatragurmukhi:2622,aarusquare:13059,aavowelsignbengali:2494,aavowelsigndeva:2366,aavowelsigngujarati:2750,abbreviationmarkarmenian:1375,abbreviationsigndeva:2416,abengali:2437,abopomofo:12570,abreve:259,abreveacute:7855,abrevecyrillic:1233,abrevedotbelow:7863,abrevegrave:7857,abrevehookabove:7859,abrevetilde:7861,acaron:462,acircle:9424,acircumflex:226,acircumflexacute:7845,acircumflexdotbelow:7853,acircumflexgrave:7847,acircumflexhookabove:7849,acircumflextilde:7851,acute:180,acutebelowcmb:791,acutecmb:769,acutecomb:769,acutedeva:2388,acutelowmod:719,acutetonecmb:833,acyrillic:1072,adblgrave:513,addakgurmukhi:2673,adeva:2309,adieresis:228,adieresiscyrillic:1235,adieresismacron:479,adotbelow:7841,adotmacron:481,ae:230,aeacute:509,aekorean:12624,aemacron:483,afii00208:8213,afii08941:8356,afii10017:1040,afii10018:1041,afii10019:1042,afii10020:1043,afii10021:1044,afii10022:1045,afii10023:1025,afii10024:1046,afii10025:1047,afii10026:1048,afii10027:1049,afii10028:1050,afii10029:1051,afii10030:1052,afii10031:1053,afii10032:1054,afii10033:1055,afii10034:1056,afii10035:1057,afii10036:1058,afii10037:1059,afii10038:1060,afii10039:1061,afii10040:1062,afii10041:1063,afii10042:1064,afii10043:1065,afii10044:1066,afii10045:1067,afii10046:1068,afii10047:1069,afii10048:1070,afii10049:1071,afii10050:1168,afii10051:1026,afii10052:1027,afii10053:1028,afii10054:1029,afii10055:1030,afii10056:1031,afii10057:1032,afii10058:1033,afii10059:1034,afii10060:1035,afii10061:1036,afii10062:1038,afii10063:63172,afii10064:63173,afii10065:1072,afii10066:1073,afii10067:1074,afii10068:1075,afii10069:1076,afii10070:1077,afii10071:1105,afii10072:1078,afii10073:1079,afii10074:1080,afii10075:1081,afii10076:1082,afii10077:1083,afii10078:1084,afii10079:1085,afii10080:1086,afii10081:1087,afii10082:1088,afii10083:1089,afii10084:1090,afii10085:1091,afii10086:1092,afii10087:1093,afii10088:1094,afii10089:1095,afii10090:1096,afii10091:1097,afii10092:1098,afii10093:1099,afii10094:1100,afii10095:1101,afii10096:1102,afii10097:1103,afii10098:1169,afii10099:1106,afii10100:1107,afii10101:1108,afii10102:1109,afii10103:1110,afii10104:1111,afii10105:1112,afii10106:1113,afii10107:1114,afii10108:1115,afii10109:1116,afii10110:1118,afii10145:1039,afii10146:1122,afii10147:1138,afii10148:1140,afii10192:63174,afii10193:1119,afii10194:1123,afii10195:1139,afii10196:1141,afii10831:63175,afii10832:63176,afii10846:1241,afii299:8206,afii300:8207,afii301:8205,afii57381:1642,afii57388:1548,afii57392:1632,afii57393:1633,afii57394:1634,afii57395:1635,afii57396:1636,afii57397:1637,afii57398:1638,afii57399:1639,afii57400:1640,afii57401:1641,afii57403:1563,afii57407:1567,afii57409:1569,afii57410:1570,afii57411:1571,afii57412:1572,afii57413:1573,afii57414:1574,afii57415:1575,afii57416:1576,afii57417:1577,afii57418:1578,afii57419:1579,afii57420:1580,afii57421:1581,afii57422:1582,afii57423:1583,afii57424:1584,afii57425:1585,afii57426:1586,afii57427:1587,afii57428:1588,afii57429:1589,afii57430:1590,afii57431:1591,afii57432:1592,afii57433:1593,afii57434:1594,afii57440:1600,afii57441:1601,afii57442:1602,afii57443:1603,afii57444:1604,afii57445:1605,afii57446:1606,afii57448:1608,afii57449:1609,afii57450:1610,afii57451:1611,afii57452:1612,afii57453:1613,afii57454:1614,afii57455:1615,afii57456:1616,afii57457:1617,afii57458:1618,afii57470:1607,afii57505:1700,afii57506:1662,afii57507:1670,afii57508:1688,afii57509:1711,afii57511:1657,afii57512:1672,afii57513:1681,afii57514:1722,afii57519:1746,afii57534:1749,afii57636:8362,afii57645:1470,afii57658:1475,afii57664:1488,afii57665:1489,afii57666:1490,afii57667:1491,afii57668:1492,afii57669:1493,afii57670:1494,afii57671:1495,afii57672:1496,afii57673:1497,afii57674:1498,afii57675:1499,afii57676:1500,afii57677:1501,afii57678:1502,afii57679:1503,afii57680:1504,afii57681:1505,afii57682:1506,afii57683:1507,afii57684:1508,afii57685:1509,afii57686:1510,afii57687:1511,afii57688:1512,afii57689:1513,afii57690:1514,afii57694:64298,afii57695:64299,afii57700:64331,afii57705:64287,afii57716:1520,afii57717:1521,afii57718:1522,afii57723:64309,afii57793:1460,afii57794:1461,afii57795:1462,afii57796:1467,afii57797:1464,afii57798:1463,afii57799:1456,afii57800:1458,afii57801:1457,afii57802:1459,afii57803:1474,afii57804:1473,afii57806:1465,afii57807:1468,afii57839:1469,afii57841:1471,afii57842:1472,afii57929:700,afii61248:8453,afii61289:8467,afii61352:8470,afii61573:8236,afii61574:8237,afii61575:8238,afii61664:8204,afii63167:1645,afii64937:701,agrave:224,agujarati:2693,agurmukhi:2565,ahiragana:12354,ahookabove:7843,aibengali:2448,aibopomofo:12574,aideva:2320,aiecyrillic:1237,aigujarati:2704,aigurmukhi:2576,aimatragurmukhi:2632,ainarabic:1593,ainfinalarabic:65226,aininitialarabic:65227,ainmedialarabic:65228,ainvertedbreve:515,aivowelsignbengali:2504,aivowelsigndeva:2376,aivowelsigngujarati:2760,akatakana:12450,akatakanahalfwidth:65393,akorean:12623,alef:1488,alefarabic:1575,alefdageshhebrew:64304,aleffinalarabic:65166,alefhamzaabovearabic:1571,alefhamzaabovefinalarabic:65156,alefhamzabelowarabic:1573,alefhamzabelowfinalarabic:65160,alefhebrew:1488,aleflamedhebrew:64335,alefmaddaabovearabic:1570,alefmaddaabovefinalarabic:65154,alefmaksuraarabic:1609,alefmaksurafinalarabic:65264,alefmaksurainitialarabic:65267,alefmaksuramedialarabic:65268,alefpatahhebrew:64302,alefqamatshebrew:64303,aleph:8501,allequal:8780,alpha:945,alphatonos:940,amacron:257,amonospace:65345,ampersand:38,ampersandmonospace:65286,ampersandsmall:63270,amsquare:13250,anbopomofo:12578,angbopomofo:12580,angbracketleft:12296,angbracketright:12297,angkhankhuthai:3674,angle:8736,anglebracketleft:12296,anglebracketleftvertical:65087,anglebracketright:12297,anglebracketrightvertical:65088,angleleft:9001,angleright:9002,angstrom:8491,anoteleia:903,anudattadeva:2386,anusvarabengali:2434,anusvaradeva:2306,anusvaragujarati:2690,aogonek:261,apaatosquare:13056,aparen:9372,apostrophearmenian:1370,apostrophemod:700,apple:63743,approaches:8784,approxequal:8776,approxequalorimage:8786,approximatelyequal:8773,araeaekorean:12686,araeakorean:12685,arc:8978,arighthalfring:7834,aring:229,aringacute:507,aringbelow:7681,arrowboth:8596,arrowdashdown:8675,arrowdashleft:8672,arrowdashright:8674,arrowdashup:8673,arrowdblboth:8660,arrowdbldown:8659,arrowdblleft:8656,arrowdblright:8658,arrowdblup:8657,arrowdown:8595,arrowdownleft:8601,arrowdownright:8600,arrowdownwhite:8681,arrowheaddownmod:709,arrowheadleftmod:706,arrowheadrightmod:707,arrowheadupmod:708,arrowhorizex:63719,arrowleft:8592,arrowleftdbl:8656,arrowleftdblstroke:8653,arrowleftoverright:8646,arrowleftwhite:8678,arrowright:8594,arrowrightdblstroke:8655,arrowrightheavy:10142,arrowrightoverleft:8644,arrowrightwhite:8680,arrowtableft:8676,arrowtabright:8677,arrowup:8593,arrowupdn:8597,arrowupdnbse:8616,arrowupdownbase:8616,arrowupleft:8598,arrowupleftofdown:8645,arrowupright:8599,arrowupwhite:8679,arrowvertex:63718,asciicircum:94,asciicircummonospace:65342,asciitilde:126,asciitildemonospace:65374,ascript:593,ascriptturned:594,asmallhiragana:12353,asmallkatakana:12449,asmallkatakanahalfwidth:65383,asterisk:42,asteriskaltonearabic:1645,asteriskarabic:1645,asteriskmath:8727,asteriskmonospace:65290,asterisksmall:65121,asterism:8258,asuperior:63209,asymptoticallyequal:8771,at:64,atilde:227,atmonospace:65312,atsmall:65131,aturned:592,aubengali:2452,aubopomofo:12576,audeva:2324,augujarati:2708,augurmukhi:2580,aulengthmarkbengali:2519,aumatragurmukhi:2636,auvowelsignbengali:2508,auvowelsigndeva:2380,auvowelsigngujarati:2764,avagrahadeva:2365,aybarmenian:1377,ayin:1506,ayinaltonehebrew:64288,ayinhebrew:1506,b:98,babengali:2476,backslash:92,backslashmonospace:65340,badeva:2348,bagujarati:2732,bagurmukhi:2604,bahiragana:12400,bahtthai:3647,bakatakana:12496,bar:124,barmonospace:65372,bbopomofo:12549,bcircle:9425,bdotaccent:7683,bdotbelow:7685,beamedsixteenthnotes:9836,because:8757,becyrillic:1073,beharabic:1576,behfinalarabic:65168,behinitialarabic:65169,behiragana:12409,behmedialarabic:65170,behmeeminitialarabic:64671,behmeemisolatedarabic:64520,behnoonfinalarabic:64621,bekatakana:12505,benarmenian:1378,bet:1489,beta:946,betasymbolgreek:976,betdagesh:64305,betdageshhebrew:64305,bethebrew:1489,betrafehebrew:64332,bhabengali:2477,bhadeva:2349,bhagujarati:2733,bhagurmukhi:2605,bhook:595,bihiragana:12403,bikatakana:12499,bilabialclick:664,bindigurmukhi:2562,birusquare:13105,blackcircle:9679,blackdiamond:9670,blackdownpointingtriangle:9660,blackleftpointingpointer:9668,blackleftpointingtriangle:9664,blacklenticularbracketleft:12304,blacklenticularbracketleftvertical:65083,blacklenticularbracketright:12305,blacklenticularbracketrightvertical:65084,blacklowerlefttriangle:9699,blacklowerrighttriangle:9698,blackrectangle:9644,blackrightpointingpointer:9658,blackrightpointingtriangle:9654,blacksmallsquare:9642,blacksmilingface:9787,blacksquare:9632,blackstar:9733,blackupperlefttriangle:9700,blackupperrighttriangle:9701,blackuppointingsmalltriangle:9652,blackuppointingtriangle:9650,blank:9251,blinebelow:7687,block:9608,bmonospace:65346,bobaimaithai:3610,bohiragana:12412,bokatakana:12508,bparen:9373,bqsquare:13251,braceex:63732,braceleft:123,braceleftbt:63731,braceleftmid:63730,braceleftmonospace:65371,braceleftsmall:65115,bracelefttp:63729,braceleftvertical:65079,braceright:125,bracerightbt:63742,bracerightmid:63741,bracerightmonospace:65373,bracerightsmall:65116,bracerighttp:63740,bracerightvertical:65080,bracketleft:91,bracketleftbt:63728,bracketleftex:63727,bracketleftmonospace:65339,bracketlefttp:63726,bracketright:93,bracketrightbt:63739,bracketrightex:63738,bracketrightmonospace:65341,bracketrighttp:63737,breve:728,brevebelowcmb:814,brevecmb:774,breveinvertedbelowcmb:815,breveinvertedcmb:785,breveinverteddoublecmb:865,bridgebelowcmb:810,bridgeinvertedbelowcmb:826,brokenbar:166,bstroke:384,bsuperior:63210,btopbar:387,buhiragana:12406,bukatakana:12502,bullet:8226,bulletinverse:9688,bulletoperator:8729,bullseye:9678,c:99,caarmenian:1390,cabengali:2458,cacute:263,cadeva:2330,cagujarati:2714,cagurmukhi:2586,calsquare:13192,candrabindubengali:2433,candrabinducmb:784,candrabindudeva:2305,candrabindugujarati:2689,capslock:8682,careof:8453,caron:711,caronbelowcmb:812,caroncmb:780,carriagereturn:8629,cbopomofo:12568,ccaron:269,ccedilla:231,ccedillaacute:7689,ccircle:9426,ccircumflex:265,ccurl:597,cdot:267,cdotaccent:267,cdsquare:13253,cedilla:184,cedillacmb:807,cent:162,centigrade:8451,centinferior:63199,centmonospace:65504,centoldstyle:63394,centsuperior:63200,chaarmenian:1401,chabengali:2459,chadeva:2331,chagujarati:2715,chagurmukhi:2587,chbopomofo:12564,cheabkhasiancyrillic:1213,checkmark:10003,checyrillic:1095,chedescenderabkhasiancyrillic:1215,chedescendercyrillic:1207,chedieresiscyrillic:1269,cheharmenian:1395,chekhakassiancyrillic:1228,cheverticalstrokecyrillic:1209,chi:967,chieuchacirclekorean:12919,chieuchaparenkorean:12823,chieuchcirclekorean:12905,chieuchkorean:12618,chieuchparenkorean:12809,chochangthai:3594,chochanthai:3592,chochingthai:3593,chochoethai:3596,chook:392,cieucacirclekorean:12918,cieucaparenkorean:12822,cieuccirclekorean:12904,cieuckorean:12616,cieucparenkorean:12808,cieucuparenkorean:12828,circle:9675,circlecopyrt:169,circlemultiply:8855,circleot:8857,circleplus:8853,circlepostalmark:12342,circlewithlefthalfblack:9680,circlewithrighthalfblack:9681,circumflex:710,circumflexbelowcmb:813,circumflexcmb:770,clear:8999,clickalveolar:450,clickdental:448,clicklateral:449,clickretroflex:451,club:9827,clubsuitblack:9827,clubsuitwhite:9831,cmcubedsquare:13220,cmonospace:65347,cmsquaredsquare:13216,coarmenian:1409,colon:58,colonmonetary:8353,colonmonospace:65306,colonsign:8353,colonsmall:65109,colontriangularhalfmod:721,colontriangularmod:720,comma:44,commaabovecmb:787,commaaboverightcmb:789,commaaccent:63171,commaarabic:1548,commaarmenian:1373,commainferior:63201,commamonospace:65292,commareversedabovecmb:788,commareversedmod:701,commasmall:65104,commasuperior:63202,commaturnedabovecmb:786,commaturnedmod:699,compass:9788,congruent:8773,contourintegral:8750,control:8963,controlACK:6,controlBEL:7,controlBS:8,controlCAN:24,controlCR:13,controlDC1:17,controlDC2:18,controlDC3:19,controlDC4:20,controlDEL:127,controlDLE:16,controlEM:25,controlENQ:5,controlEOT:4,controlESC:27,controlETB:23,controlETX:3,controlFF:12,controlFS:28,controlGS:29,controlHT:9,controlLF:10,controlNAK:21,controlRS:30,controlSI:15,controlSO:14,controlSOT:2,controlSTX:1,controlSUB:26,controlSYN:22,controlUS:31,controlVT:11,copyright:169,copyrightsans:63721,copyrightserif:63193,cornerbracketleft:12300,cornerbracketlefthalfwidth:65378,cornerbracketleftvertical:65089,cornerbracketright:12301,cornerbracketrighthalfwidth:65379,cornerbracketrightvertical:65090,corporationsquare:13183,cosquare:13255,coverkgsquare:13254,cparen:9374,cruzeiro:8354,cstretched:663,curlyand:8911,curlyor:8910,currency:164,cyrBreve:63185,cyrFlex:63186,cyrbreve:63188,cyrflex:63189,d:100,daarmenian:1380,dabengali:2470,dadarabic:1590,dadeva:2342,dadfinalarabic:65214,dadinitialarabic:65215,dadmedialarabic:65216,dagesh:1468,dageshhebrew:1468,dagger:8224,daggerdbl:8225,dagujarati:2726,dagurmukhi:2598,dahiragana:12384,dakatakana:12480,dalarabic:1583,dalet:1491,daletdagesh:64307,daletdageshhebrew:64307,dalethebrew:1491,dalfinalarabic:65194,dammaarabic:1615,dammalowarabic:1615,dammatanaltonearabic:1612,dammatanarabic:1612,danda:2404,dargahebrew:1447,dargalefthebrew:1447,dasiapneumatacyrilliccmb:1157,dblGrave:63187,dblanglebracketleft:12298,dblanglebracketleftvertical:65085,dblanglebracketright:12299,dblanglebracketrightvertical:65086,dblarchinvertedbelowcmb:811,dblarrowleft:8660,dblarrowright:8658,dbldanda:2405,dblgrave:63190,dblgravecmb:783,dblintegral:8748,dbllowline:8215,dbllowlinecmb:819,dbloverlinecmb:831,dblprimemod:698,dblverticalbar:8214,dblverticallineabovecmb:782,dbopomofo:12553,dbsquare:13256,dcaron:271,dcedilla:7697,dcircle:9427,dcircumflexbelow:7699,dcroat:273,ddabengali:2465,ddadeva:2337,ddagujarati:2721,ddagurmukhi:2593,ddalarabic:1672,ddalfinalarabic:64393,dddhadeva:2396,ddhabengali:2466,ddhadeva:2338,ddhagujarati:2722,ddhagurmukhi:2594,ddotaccent:7691,ddotbelow:7693,decimalseparatorarabic:1643,decimalseparatorpersian:1643,decyrillic:1076,degree:176,dehihebrew:1453,dehiragana:12391,deicoptic:1007,dekatakana:12487,deleteleft:9003,deleteright:8998,delta:948,deltaturned:397,denominatorminusonenumeratorbengali:2552,dezh:676,dhabengali:2471,dhadeva:2343,dhagujarati:2727,dhagurmukhi:2599,dhook:599,dialytikatonos:901,dialytikatonoscmb:836,diamond:9830,diamondsuitwhite:9826,dieresis:168,dieresisacute:63191,dieresisbelowcmb:804,dieresiscmb:776,dieresisgrave:63192,dieresistonos:901,dihiragana:12386,dikatakana:12482,dittomark:12291,divide:247,divides:8739,divisionslash:8725,djecyrillic:1106,dkshade:9619,dlinebelow:7695,dlsquare:13207,dmacron:273,dmonospace:65348,dnblock:9604,dochadathai:3598,dodekthai:3604,dohiragana:12393,dokatakana:12489,dollar:36,dollarinferior:63203,dollarmonospace:65284,dollaroldstyle:63268,dollarsmall:65129,dollarsuperior:63204,dong:8363,dorusquare:13094,dotaccent:729,dotaccentcmb:775,dotbelowcmb:803,dotbelowcomb:803,dotkatakana:12539,dotlessi:305,dotlessj:63166,dotlessjstrokehook:644,dotmath:8901,dottedcircle:9676,doubleyodpatah:64287,doubleyodpatahhebrew:64287,downtackbelowcmb:798,downtackmod:725,dparen:9375,dsuperior:63211,dtail:598,dtopbar:396,duhiragana:12389,dukatakana:12485,dz:499,dzaltone:675,dzcaron:454,dzcurl:677,dzeabkhasiancyrillic:1249,dzecyrillic:1109,dzhecyrillic:1119,e:101,eacute:233,earth:9793,ebengali:2447,ebopomofo:12572,ebreve:277,ecandradeva:2317,ecandragujarati:2701,ecandravowelsigndeva:2373,ecandravowelsigngujarati:2757,ecaron:283,ecedillabreve:7709,echarmenian:1381,echyiwnarmenian:1415,ecircle:9428,ecircumflex:234,ecircumflexacute:7871,ecircumflexbelow:7705,ecircumflexdotbelow:7879,ecircumflexgrave:7873,ecircumflexhookabove:7875,ecircumflextilde:7877,ecyrillic:1108,edblgrave:517,edeva:2319,edieresis:235,edot:279,edotaccent:279,edotbelow:7865,eegurmukhi:2575,eematragurmukhi:2631,efcyrillic:1092,egrave:232,egujarati:2703,eharmenian:1383,ehbopomofo:12573,ehiragana:12360,ehookabove:7867,eibopomofo:12575,eight:56,eightarabic:1640,eightbengali:2542,eightcircle:9319,eightcircleinversesansserif:10129,eightdeva:2414,eighteencircle:9329,eighteenparen:9349,eighteenperiod:9369,eightgujarati:2798,eightgurmukhi:2670,eighthackarabic:1640,eighthangzhou:12328,eighthnotebeamed:9835,eightideographicparen:12839,eightinferior:8328,eightmonospace:65304,eightoldstyle:63288,eightparen:9339,eightperiod:9359,eightpersian:1784,eightroman:8567,eightsuperior:8312,eightthai:3672,einvertedbreve:519,eiotifiedcyrillic:1125,ekatakana:12456,ekatakanahalfwidth:65396,ekonkargurmukhi:2676,ekorean:12628,elcyrillic:1083,element:8712,elevencircle:9322,elevenparen:9342,elevenperiod:9362,elevenroman:8570,ellipsis:8230,ellipsisvertical:8942,emacron:275,emacronacute:7703,emacrongrave:7701,emcyrillic:1084,emdash:8212,emdashvertical:65073,emonospace:65349,emphasismarkarmenian:1371,emptyset:8709,enbopomofo:12579,encyrillic:1085,endash:8211,endashvertical:65074,endescendercyrillic:1187,eng:331,engbopomofo:12581,enghecyrillic:1189,enhookcyrillic:1224,enspace:8194,eogonek:281,eokorean:12627,eopen:603,eopenclosed:666,eopenreversed:604,eopenreversedclosed:606,eopenreversedhook:605,eparen:9376,epsilon:949,epsilontonos:941,equal:61,equalmonospace:65309,equalsmall:65126,equalsuperior:8316,equivalence:8801,erbopomofo:12582,ercyrillic:1088,ereversed:600,ereversedcyrillic:1101,escyrillic:1089,esdescendercyrillic:1195,esh:643,eshcurl:646,eshortdeva:2318,eshortvowelsigndeva:2374,eshreversedloop:426,eshsquatreversed:645,esmallhiragana:12359,esmallkatakana:12455,esmallkatakanahalfwidth:65386,estimated:8494,esuperior:63212,eta:951,etarmenian:1384,etatonos:942,eth:240,etilde:7869,etildebelow:7707,etnahtafoukhhebrew:1425,etnahtafoukhlefthebrew:1425,etnahtahebrew:1425,etnahtalefthebrew:1425,eturned:477,eukorean:12641,euro:8364,evowelsignbengali:2503,evowelsigndeva:2375,evowelsigngujarati:2759,exclam:33,exclamarmenian:1372,exclamdbl:8252,exclamdown:161,exclamdownsmall:63393,exclammonospace:65281,exclamsmall:63265,existential:8707,ezh:658,ezhcaron:495,ezhcurl:659,ezhreversed:441,ezhtail:442,f:102,fadeva:2398,fagurmukhi:2654,fahrenheit:8457,fathaarabic:1614,fathalowarabic:1614,fathatanarabic:1611,fbopomofo:12552,fcircle:9429,fdotaccent:7711,feharabic:1601,feharmenian:1414,fehfinalarabic:65234,fehinitialarabic:65235,fehmedialarabic:65236,feicoptic:997,female:9792,ff:64256,ffi:64259,ffl:64260,fi:64257,fifteencircle:9326,fifteenparen:9346,fifteenperiod:9366,figuredash:8210,filledbox:9632,filledrect:9644,finalkaf:1498,finalkafdagesh:64314,finalkafdageshhebrew:64314,finalkafhebrew:1498,finalmem:1501,finalmemhebrew:1501,finalnun:1503,finalnunhebrew:1503,finalpe:1507,finalpehebrew:1507,finaltsadi:1509,finaltsadihebrew:1509,firsttonechinese:713,fisheye:9673,fitacyrillic:1139,five:53,fivearabic:1637,fivebengali:2539,fivecircle:9316,fivecircleinversesansserif:10126,fivedeva:2411,fiveeighths:8541,fivegujarati:2795,fivegurmukhi:2667,fivehackarabic:1637,fivehangzhou:12325,fiveideographicparen:12836,fiveinferior:8325,fivemonospace:65301,fiveoldstyle:63285,fiveparen:9336,fiveperiod:9356,fivepersian:1781,fiveroman:8564,fivesuperior:8309,fivethai:3669,fl:64258,florin:402,fmonospace:65350,fmsquare:13209,fofanthai:3615,fofathai:3613,fongmanthai:3663,forall:8704,four:52,fourarabic:1636,fourbengali:2538,fourcircle:9315,fourcircleinversesansserif:10125,fourdeva:2410,fourgujarati:2794,fourgurmukhi:2666,fourhackarabic:1636,fourhangzhou:12324,fourideographicparen:12835,fourinferior:8324,fourmonospace:65300,fournumeratorbengali:2551,fouroldstyle:63284,fourparen:9335,fourperiod:9355,fourpersian:1780,fourroman:8563,foursuperior:8308,fourteencircle:9325,fourteenparen:9345,fourteenperiod:9365,fourthai:3668,fourthtonechinese:715,fparen:9377,fraction:8260,franc:8355,g:103,gabengali:2455,gacute:501,gadeva:2327,gafarabic:1711,gaffinalarabic:64403,gafinitialarabic:64404,gafmedialarabic:64405,gagujarati:2711,gagurmukhi:2583,gahiragana:12364,gakatakana:12460,gamma:947,gammalatinsmall:611,gammasuperior:736,gangiacoptic:1003,gbopomofo:12557,gbreve:287,gcaron:487,gcedilla:291,gcircle:9430,gcircumflex:285,gcommaaccent:291,gdot:289,gdotaccent:289,gecyrillic:1075,gehiragana:12370,gekatakana:12466,geometricallyequal:8785,gereshaccenthebrew:1436,gereshhebrew:1523,gereshmuqdamhebrew:1437,germandbls:223,gershayimaccenthebrew:1438,gershayimhebrew:1524,getamark:12307,ghabengali:2456,ghadarmenian:1394,ghadeva:2328,ghagujarati:2712,ghagurmukhi:2584,ghainarabic:1594,ghainfinalarabic:65230,ghaininitialarabic:65231,ghainmedialarabic:65232,ghemiddlehookcyrillic:1173,ghestrokecyrillic:1171,gheupturncyrillic:1169,ghhadeva:2394,ghhagurmukhi:2650,ghook:608,ghzsquare:13203,gihiragana:12366,gikatakana:12462,gimarmenian:1379,gimel:1490,gimeldagesh:64306,gimeldageshhebrew:64306,gimelhebrew:1490,gjecyrillic:1107,glottalinvertedstroke:446,glottalstop:660,glottalstopinverted:662,glottalstopmod:704,glottalstopreversed:661,glottalstopreversedmod:705,glottalstopreversedsuperior:740,glottalstopstroke:673,glottalstopstrokereversed:674,gmacron:7713,gmonospace:65351,gohiragana:12372,gokatakana:12468,gparen:9378,gpasquare:13228,gradient:8711,grave:96,gravebelowcmb:790,gravecmb:768,gravecomb:768,gravedeva:2387,gravelowmod:718,gravemonospace:65344,gravetonecmb:832,greater:62,greaterequal:8805,greaterequalorless:8923,greatermonospace:65310,greaterorequivalent:8819,greaterorless:8823,greateroverequal:8807,greatersmall:65125,gscript:609,gstroke:485,guhiragana:12368,guillemotleft:171,guillemotright:187,guilsinglleft:8249,guilsinglright:8250,gukatakana:12464,guramusquare:13080,gysquare:13257,h:104,haabkhasiancyrillic:1193,haaltonearabic:1729,habengali:2489,hadescendercyrillic:1203,hadeva:2361,hagujarati:2745,hagurmukhi:2617,haharabic:1581,hahfinalarabic:65186,hahinitialarabic:65187,hahiragana:12399,hahmedialarabic:65188,haitusquare:13098,hakatakana:12495,hakatakanahalfwidth:65418,halantgurmukhi:2637,hamzaarabic:1569,hamzalowarabic:1569,hangulfiller:12644,hardsigncyrillic:1098,harpoonleftbarbup:8636,harpoonrightbarbup:8640,hasquare:13258,hatafpatah:1458,hatafpatah16:1458,hatafpatah23:1458,hatafpatah2f:1458, -hatafpatahhebrew:1458,hatafpatahnarrowhebrew:1458,hatafpatahquarterhebrew:1458,hatafpatahwidehebrew:1458,hatafqamats:1459,hatafqamats1b:1459,hatafqamats28:1459,hatafqamats34:1459,hatafqamatshebrew:1459,hatafqamatsnarrowhebrew:1459,hatafqamatsquarterhebrew:1459,hatafqamatswidehebrew:1459,hatafsegol:1457,hatafsegol17:1457,hatafsegol24:1457,hatafsegol30:1457,hatafsegolhebrew:1457,hatafsegolnarrowhebrew:1457,hatafsegolquarterhebrew:1457,hatafsegolwidehebrew:1457,hbar:295,hbopomofo:12559,hbrevebelow:7723,hcedilla:7721,hcircle:9431,hcircumflex:293,hdieresis:7719,hdotaccent:7715,hdotbelow:7717,he:1492,heart:9829,heartsuitblack:9829,heartsuitwhite:9825,hedagesh:64308,hedageshhebrew:64308,hehaltonearabic:1729,heharabic:1607,hehebrew:1492,hehfinalaltonearabic:64423,hehfinalalttwoarabic:65258,hehfinalarabic:65258,hehhamzaabovefinalarabic:64421,hehhamzaaboveisolatedarabic:64420,hehinitialaltonearabic:64424,hehinitialarabic:65259,hehiragana:12408,hehmedialaltonearabic:64425,hehmedialarabic:65260,heiseierasquare:13179,hekatakana:12504,hekatakanahalfwidth:65421,hekutaarusquare:13110,henghook:615,herutusquare:13113,het:1495,hethebrew:1495,hhook:614,hhooksuperior:689,hieuhacirclekorean:12923,hieuhaparenkorean:12827,hieuhcirclekorean:12909,hieuhkorean:12622,hieuhparenkorean:12813,hihiragana:12402,hikatakana:12498,hikatakanahalfwidth:65419,hiriq:1460,hiriq14:1460,hiriq21:1460,hiriq2d:1460,hiriqhebrew:1460,hiriqnarrowhebrew:1460,hiriqquarterhebrew:1460,hiriqwidehebrew:1460,hlinebelow:7830,hmonospace:65352,hoarmenian:1392,hohipthai:3627,hohiragana:12411,hokatakana:12507,hokatakanahalfwidth:65422,holam:1465,holam19:1465,holam26:1465,holam32:1465,holamhebrew:1465,holamnarrowhebrew:1465,holamquarterhebrew:1465,holamwidehebrew:1465,honokhukthai:3630,hookabovecomb:777,hookcmb:777,hookpalatalizedbelowcmb:801,hookretroflexbelowcmb:802,hoonsquare:13122,horicoptic:1001,horizontalbar:8213,horncmb:795,hotsprings:9832,house:8962,hparen:9379,hsuperior:688,hturned:613,huhiragana:12405,huiitosquare:13107,hukatakana:12501,hukatakanahalfwidth:65420,hungarumlaut:733,hungarumlautcmb:779,hv:405,hyphen:45,hypheninferior:63205,hyphenmonospace:65293,hyphensmall:65123,hyphensuperior:63206,hyphentwo:8208,i:105,iacute:237,iacyrillic:1103,ibengali:2439,ibopomofo:12583,ibreve:301,icaron:464,icircle:9432,icircumflex:238,icyrillic:1110,idblgrave:521,ideographearthcircle:12943,ideographfirecircle:12939,ideographicallianceparen:12863,ideographiccallparen:12858,ideographiccentrecircle:12965,ideographicclose:12294,ideographiccomma:12289,ideographiccommaleft:65380,ideographiccongratulationparen:12855,ideographiccorrectcircle:12963,ideographicearthparen:12847,ideographicenterpriseparen:12861,ideographicexcellentcircle:12957,ideographicfestivalparen:12864,ideographicfinancialcircle:12950,ideographicfinancialparen:12854,ideographicfireparen:12843,ideographichaveparen:12850,ideographichighcircle:12964,ideographiciterationmark:12293,ideographiclaborcircle:12952,ideographiclaborparen:12856,ideographicleftcircle:12967,ideographiclowcircle:12966,ideographicmedicinecircle:12969,ideographicmetalparen:12846,ideographicmoonparen:12842,ideographicnameparen:12852,ideographicperiod:12290,ideographicprintcircle:12958,ideographicreachparen:12867,ideographicrepresentparen:12857,ideographicresourceparen:12862,ideographicrightcircle:12968,ideographicsecretcircle:12953,ideographicselfparen:12866,ideographicsocietyparen:12851,ideographicspace:12288,ideographicspecialparen:12853,ideographicstockparen:12849,ideographicstudyparen:12859,ideographicsunparen:12848,ideographicsuperviseparen:12860,ideographicwaterparen:12844,ideographicwoodparen:12845,ideographiczero:12295,ideographmetalcircle:12942,ideographmooncircle:12938,ideographnamecircle:12948,ideographsuncircle:12944,ideographwatercircle:12940,ideographwoodcircle:12941,ideva:2311,idieresis:239,idieresisacute:7727,idieresiscyrillic:1253,idotbelow:7883,iebrevecyrillic:1239,iecyrillic:1077,ieungacirclekorean:12917,ieungaparenkorean:12821,ieungcirclekorean:12903,ieungkorean:12615,ieungparenkorean:12807,igrave:236,igujarati:2695,igurmukhi:2567,ihiragana:12356,ihookabove:7881,iibengali:2440,iicyrillic:1080,iideva:2312,iigujarati:2696,iigurmukhi:2568,iimatragurmukhi:2624,iinvertedbreve:523,iishortcyrillic:1081,iivowelsignbengali:2496,iivowelsigndeva:2368,iivowelsigngujarati:2752,ij:307,ikatakana:12452,ikatakanahalfwidth:65394,ikorean:12643,ilde:732,iluyhebrew:1452,imacron:299,imacroncyrillic:1251,imageorapproximatelyequal:8787,imatragurmukhi:2623,imonospace:65353,increment:8710,infinity:8734,iniarmenian:1387,integral:8747,integralbottom:8993,integralbt:8993,integralex:63733,integraltop:8992,integraltp:8992,intersection:8745,intisquare:13061,invbullet:9688,invcircle:9689,invsmileface:9787,iocyrillic:1105,iogonek:303,iota:953,iotadieresis:970,iotadieresistonos:912,iotalatin:617,iotatonos:943,iparen:9380,irigurmukhi:2674,ismallhiragana:12355,ismallkatakana:12451,ismallkatakanahalfwidth:65384,issharbengali:2554,istroke:616,isuperior:63213,iterationhiragana:12445,iterationkatakana:12541,itilde:297,itildebelow:7725,iubopomofo:12585,iucyrillic:1102,ivowelsignbengali:2495,ivowelsigndeva:2367,ivowelsigngujarati:2751,izhitsacyrillic:1141,izhitsadblgravecyrillic:1143,j:106,jaarmenian:1393,jabengali:2460,jadeva:2332,jagujarati:2716,jagurmukhi:2588,jbopomofo:12560,jcaron:496,jcircle:9433,jcircumflex:309,jcrossedtail:669,jdotlessstroke:607,jecyrillic:1112,jeemarabic:1580,jeemfinalarabic:65182,jeeminitialarabic:65183,jeemmedialarabic:65184,jeharabic:1688,jehfinalarabic:64395,jhabengali:2461,jhadeva:2333,jhagujarati:2717,jhagurmukhi:2589,jheharmenian:1403,jis:12292,jmonospace:65354,jparen:9381,jsuperior:690,k:107,kabashkircyrillic:1185,kabengali:2453,kacute:7729,kacyrillic:1082,kadescendercyrillic:1179,kadeva:2325,kaf:1499,kafarabic:1603,kafdagesh:64315,kafdageshhebrew:64315,kaffinalarabic:65242,kafhebrew:1499,kafinitialarabic:65243,kafmedialarabic:65244,kafrafehebrew:64333,kagujarati:2709,kagurmukhi:2581,kahiragana:12363,kahookcyrillic:1220,kakatakana:12459,kakatakanahalfwidth:65398,kappa:954,kappasymbolgreek:1008,kapyeounmieumkorean:12657,kapyeounphieuphkorean:12676,kapyeounpieupkorean:12664,kapyeounssangpieupkorean:12665,karoriisquare:13069,kashidaautoarabic:1600,kashidaautonosidebearingarabic:1600,kasmallkatakana:12533,kasquare:13188,kasraarabic:1616,kasratanarabic:1613,kastrokecyrillic:1183,katahiraprolongmarkhalfwidth:65392,kaverticalstrokecyrillic:1181,kbopomofo:12558,kcalsquare:13193,kcaron:489,kcedilla:311,kcircle:9434,kcommaaccent:311,kdotbelow:7731,keharmenian:1412,kehiragana:12369,kekatakana:12465,kekatakanahalfwidth:65401,kenarmenian:1391,kesmallkatakana:12534,kgreenlandic:312,khabengali:2454,khacyrillic:1093,khadeva:2326,khagujarati:2710,khagurmukhi:2582,khaharabic:1582,khahfinalarabic:65190,khahinitialarabic:65191,khahmedialarabic:65192,kheicoptic:999,khhadeva:2393,khhagurmukhi:2649,khieukhacirclekorean:12920,khieukhaparenkorean:12824,khieukhcirclekorean:12906,khieukhkorean:12619,khieukhparenkorean:12810,khokhaithai:3586,khokhonthai:3589,khokhuatthai:3587,khokhwaithai:3588,khomutthai:3675,khook:409,khorakhangthai:3590,khzsquare:13201,kihiragana:12365,kikatakana:12461,kikatakanahalfwidth:65399,kiroguramusquare:13077,kiromeetorusquare:13078,kirosquare:13076,kiyeokacirclekorean:12910,kiyeokaparenkorean:12814,kiyeokcirclekorean:12896,kiyeokkorean:12593,kiyeokparenkorean:12800,kiyeoksioskorean:12595,kjecyrillic:1116,klinebelow:7733,klsquare:13208,kmcubedsquare:13222,kmonospace:65355,kmsquaredsquare:13218,kohiragana:12371,kohmsquare:13248,kokaithai:3585,kokatakana:12467,kokatakanahalfwidth:65402,kooposquare:13086,koppacyrillic:1153,koreanstandardsymbol:12927,koroniscmb:835,kparen:9382,kpasquare:13226,ksicyrillic:1135,ktsquare:13263,kturned:670,kuhiragana:12367,kukatakana:12463,kukatakanahalfwidth:65400,kvsquare:13240,kwsquare:13246,l:108,labengali:2482,lacute:314,ladeva:2354,lagujarati:2738,lagurmukhi:2610,lakkhangyaothai:3653,lamaleffinalarabic:65276,lamalefhamzaabovefinalarabic:65272,lamalefhamzaaboveisolatedarabic:65271,lamalefhamzabelowfinalarabic:65274,lamalefhamzabelowisolatedarabic:65273,lamalefisolatedarabic:65275,lamalefmaddaabovefinalarabic:65270,lamalefmaddaaboveisolatedarabic:65269,lamarabic:1604,lambda:955,lambdastroke:411,lamed:1500,lameddagesh:64316,lameddageshhebrew:64316,lamedhebrew:1500,lamfinalarabic:65246,lamhahinitialarabic:64714,laminitialarabic:65247,lamjeeminitialarabic:64713,lamkhahinitialarabic:64715,lamlamhehisolatedarabic:65010,lammedialarabic:65248,lammeemhahinitialarabic:64904,lammeeminitialarabic:64716,largecircle:9711,lbar:410,lbelt:620,lbopomofo:12556,lcaron:318,lcedilla:316,lcircle:9435,lcircumflexbelow:7741,lcommaaccent:316,ldot:320,ldotaccent:320,ldotbelow:7735,ldotbelowmacron:7737,leftangleabovecmb:794,lefttackbelowcmb:792,less:60,lessequal:8804,lessequalorgreater:8922,lessmonospace:65308,lessorequivalent:8818,lessorgreater:8822,lessoverequal:8806,lesssmall:65124,lezh:622,lfblock:9612,lhookretroflex:621,lira:8356,liwnarmenian:1388,lj:457,ljecyrillic:1113,ll:63168,lladeva:2355,llagujarati:2739,llinebelow:7739,llladeva:2356,llvocalicbengali:2529,llvocalicdeva:2401,llvocalicvowelsignbengali:2531,llvocalicvowelsigndeva:2403,lmiddletilde:619,lmonospace:65356,lmsquare:13264,lochulathai:3628,logicaland:8743,logicalnot:172,logicalnotreversed:8976,logicalor:8744,lolingthai:3621,longs:383,lowlinecenterline:65102,lowlinecmb:818,lowlinedashed:65101,lozenge:9674,lparen:9383,lslash:322,lsquare:8467,lsuperior:63214,ltshade:9617,luthai:3622,lvocalicbengali:2444,lvocalicdeva:2316,lvocalicvowelsignbengali:2530,lvocalicvowelsigndeva:2402,lxsquare:13267,m:109,mabengali:2478,macron:175,macronbelowcmb:817,macroncmb:772,macronlowmod:717,macronmonospace:65507,macute:7743,madeva:2350,magujarati:2734,magurmukhi:2606,mahapakhhebrew:1444,mahapakhlefthebrew:1444,mahiragana:12414,maichattawalowleftthai:63637,maichattawalowrightthai:63636,maichattawathai:3659,maichattawaupperleftthai:63635,maieklowleftthai:63628,maieklowrightthai:63627,maiekthai:3656,maiekupperleftthai:63626,maihanakatleftthai:63620,maihanakatthai:3633,maitaikhuleftthai:63625,maitaikhuthai:3655,maitholowleftthai:63631,maitholowrightthai:63630,maithothai:3657,maithoupperleftthai:63629,maitrilowleftthai:63634,maitrilowrightthai:63633,maitrithai:3658,maitriupperleftthai:63632,maiyamokthai:3654,makatakana:12510,makatakanahalfwidth:65423,male:9794,mansyonsquare:13127,maqafhebrew:1470,mars:9794,masoracirclehebrew:1455,masquare:13187,mbopomofo:12551,mbsquare:13268,mcircle:9436,mcubedsquare:13221,mdotaccent:7745,mdotbelow:7747,meemarabic:1605,meemfinalarabic:65250,meeminitialarabic:65251,meemmedialarabic:65252,meemmeeminitialarabic:64721,meemmeemisolatedarabic:64584,meetorusquare:13133,mehiragana:12417,meizierasquare:13182,mekatakana:12513,mekatakanahalfwidth:65426,mem:1502,memdagesh:64318,memdageshhebrew:64318,memhebrew:1502,menarmenian:1396,merkhahebrew:1445,merkhakefulahebrew:1446,merkhakefulalefthebrew:1446,merkhalefthebrew:1445,mhook:625,mhzsquare:13202,middledotkatakanahalfwidth:65381,middot:183,mieumacirclekorean:12914,mieumaparenkorean:12818,mieumcirclekorean:12900,mieumkorean:12609,mieumpansioskorean:12656,mieumparenkorean:12804,mieumpieupkorean:12654,mieumsioskorean:12655,mihiragana:12415,mikatakana:12511,mikatakanahalfwidth:65424,minus:8722,minusbelowcmb:800,minuscircle:8854,minusmod:727,minusplus:8723,minute:8242,miribaarusquare:13130,mirisquare:13129,mlonglegturned:624,mlsquare:13206,mmcubedsquare:13219,mmonospace:65357,mmsquaredsquare:13215,mohiragana:12418,mohmsquare:13249,mokatakana:12514,mokatakanahalfwidth:65427,molsquare:13270,momathai:3617,moverssquare:13223,moverssquaredsquare:13224,mparen:9384,mpasquare:13227,mssquare:13235,msuperior:63215,mturned:623,mu:181,mu1:181,muasquare:13186,muchgreater:8811,muchless:8810,mufsquare:13196,mugreek:956,mugsquare:13197,muhiragana:12416,mukatakana:12512,mukatakanahalfwidth:65425,mulsquare:13205,multiply:215,mumsquare:13211,munahhebrew:1443,munahlefthebrew:1443,musicalnote:9834,musicalnotedbl:9835,musicflatsign:9837,musicsharpsign:9839,mussquare:13234,muvsquare:13238,muwsquare:13244,mvmegasquare:13241,mvsquare:13239,mwmegasquare:13247,mwsquare:13245,n:110,nabengali:2472,nabla:8711,nacute:324,nadeva:2344,nagujarati:2728,nagurmukhi:2600,nahiragana:12394,nakatakana:12490,nakatakanahalfwidth:65413,napostrophe:329,nasquare:13185,nbopomofo:12555,nbspace:160,ncaron:328,ncedilla:326,ncircle:9437,ncircumflexbelow:7755,ncommaaccent:326,ndotaccent:7749,ndotbelow:7751,nehiragana:12397,nekatakana:12493,nekatakanahalfwidth:65416,newsheqelsign:8362,nfsquare:13195,ngabengali:2457,ngadeva:2329,ngagujarati:2713,ngagurmukhi:2585,ngonguthai:3591,nhiragana:12435,nhookleft:626,nhookretroflex:627,nieunacirclekorean:12911,nieunaparenkorean:12815,nieuncieuckorean:12597,nieuncirclekorean:12897,nieunhieuhkorean:12598,nieunkorean:12596,nieunpansioskorean:12648,nieunparenkorean:12801,nieunsioskorean:12647,nieuntikeutkorean:12646,nihiragana:12395,nikatakana:12491,nikatakanahalfwidth:65414,nikhahitleftthai:63641,nikhahitthai:3661,nine:57,ninearabic:1641,ninebengali:2543,ninecircle:9320,ninecircleinversesansserif:10130,ninedeva:2415,ninegujarati:2799,ninegurmukhi:2671,ninehackarabic:1641,ninehangzhou:12329,nineideographicparen:12840,nineinferior:8329,ninemonospace:65305,nineoldstyle:63289,nineparen:9340,nineperiod:9360,ninepersian:1785,nineroman:8568,ninesuperior:8313,nineteencircle:9330,nineteenparen:9350,nineteenperiod:9370,ninethai:3673,nj:460,njecyrillic:1114,nkatakana:12531,nkatakanahalfwidth:65437,nlegrightlong:414,nlinebelow:7753,nmonospace:65358,nmsquare:13210,nnabengali:2467,nnadeva:2339,nnagujarati:2723,nnagurmukhi:2595,nnnadeva:2345,nohiragana:12398,nokatakana:12494,nokatakanahalfwidth:65417,nonbreakingspace:160,nonenthai:3603,nonuthai:3609,noonarabic:1606,noonfinalarabic:65254,noonghunnaarabic:1722,noonghunnafinalarabic:64415,nooninitialarabic:65255,noonjeeminitialarabic:64722,noonjeemisolatedarabic:64587,noonmedialarabic:65256,noonmeeminitialarabic:64725,noonmeemisolatedarabic:64590,noonnoonfinalarabic:64653,notcontains:8716,notelement:8713,notelementof:8713,notequal:8800,notgreater:8815,notgreaternorequal:8817,notgreaternorless:8825,notidentical:8802,notless:8814,notlessnorequal:8816,notparallel:8742,notprecedes:8832,notsubset:8836,notsucceeds:8833,notsuperset:8837,nowarmenian:1398,nparen:9385,nssquare:13233,nsuperior:8319,ntilde:241,nu:957,nuhiragana:12396,nukatakana:12492,nukatakanahalfwidth:65415,nuktabengali:2492,nuktadeva:2364,nuktagujarati:2748,nuktagurmukhi:2620,numbersign:35,numbersignmonospace:65283,numbersignsmall:65119,numeralsigngreek:884,numeralsignlowergreek:885,numero:8470,nun:1504,nundagesh:64320,nundageshhebrew:64320,nunhebrew:1504,nvsquare:13237,nwsquare:13243,nyabengali:2462,nyadeva:2334,nyagujarati:2718,nyagurmukhi:2590,o:111,oacute:243,oangthai:3629,obarred:629,obarredcyrillic:1257,obarreddieresiscyrillic:1259,obengali:2451,obopomofo:12571,obreve:335,ocandradeva:2321,ocandragujarati:2705,ocandravowelsigndeva:2377,ocandravowelsigngujarati:2761,ocaron:466,ocircle:9438,ocircumflex:244,ocircumflexacute:7889,ocircumflexdotbelow:7897,ocircumflexgrave:7891,ocircumflexhookabove:7893,ocircumflextilde:7895,ocyrillic:1086,odblacute:337,odblgrave:525,odeva:2323,odieresis:246,odieresiscyrillic:1255,odotbelow:7885,oe:339,oekorean:12634,ogonek:731,ogonekcmb:808,ograve:242,ogujarati:2707,oharmenian:1413,ohiragana:12362,ohookabove:7887,ohorn:417,ohornacute:7899,ohorndotbelow:7907,ohorngrave:7901,ohornhookabove:7903,ohorntilde:7905,ohungarumlaut:337,oi:419,oinvertedbreve:527,okatakana:12458,okatakanahalfwidth:65397,okorean:12631,olehebrew:1451,omacron:333,omacronacute:7763,omacrongrave:7761,omdeva:2384,omega:969,omega1:982,omegacyrillic:1121,omegalatinclosed:631,omegaroundcyrillic:1147,omegatitlocyrillic:1149,omegatonos:974,omgujarati:2768,omicron:959,omicrontonos:972,omonospace:65359,one:49,onearabic:1633,onebengali:2535,onecircle:9312,onecircleinversesansserif:10122,onedeva:2407,onedotenleader:8228,oneeighth:8539,onefitted:63196,onegujarati:2791,onegurmukhi:2663,onehackarabic:1633,onehalf:189,onehangzhou:12321,oneideographicparen:12832,oneinferior:8321,onemonospace:65297,onenumeratorbengali:2548,oneoldstyle:63281,oneparen:9332,oneperiod:9352,onepersian:1777,onequarter:188,oneroman:8560,onesuperior:185,onethai:3665,onethird:8531,oogonek:491,oogonekmacron:493,oogurmukhi:2579,oomatragurmukhi:2635,oopen:596,oparen:9386,openbullet:9702,option:8997,ordfeminine:170,ordmasculine:186,orthogonal:8735,oshortdeva:2322,oshortvowelsigndeva:2378,oslash:248,oslashacute:511,osmallhiragana:12361,osmallkatakana:12457,osmallkatakanahalfwidth:65387,ostrokeacute:511,osuperior:63216,otcyrillic:1151,otilde:245,otildeacute:7757,otildedieresis:7759,oubopomofo:12577,overline:8254,overlinecenterline:65098,overlinecmb:773,overlinedashed:65097,overlinedblwavy:65100,overlinewavy:65099,overscore:175,ovowelsignbengali:2507,ovowelsigndeva:2379,ovowelsigngujarati:2763,p:112,paampssquare:13184,paasentosquare:13099,pabengali:2474,pacute:7765,padeva:2346,pagedown:8671,pageup:8670,pagujarati:2730,pagurmukhi:2602,pahiragana:12401,paiyannoithai:3631,pakatakana:12497,palatalizationcyrilliccmb:1156,palochkacyrillic:1216,pansioskorean:12671,paragraph:182,parallel:8741,parenleft:40,parenleftaltonearabic:64830,parenleftbt:63725,parenleftex:63724,parenleftinferior:8333,parenleftmonospace:65288,parenleftsmall:65113,parenleftsuperior:8317,parenlefttp:63723,parenleftvertical:65077,parenright:41,parenrightaltonearabic:64831,parenrightbt:63736,parenrightex:63735,parenrightinferior:8334,parenrightmonospace:65289,parenrightsmall:65114,parenrightsuperior:8318,parenrighttp:63734,parenrightvertical:65078,partialdiff:8706,paseqhebrew:1472,pashtahebrew:1433,pasquare:13225,patah:1463,patah11:1463,patah1d:1463,patah2a:1463,patahhebrew:1463,patahnarrowhebrew:1463,patahquarterhebrew:1463,patahwidehebrew:1463,pazerhebrew:1441,pbopomofo:12550,pcircle:9439,pdotaccent:7767,pe:1508,pecyrillic:1087,pedagesh:64324,pedageshhebrew:64324,peezisquare:13115,pefinaldageshhebrew:64323,peharabic:1662,peharmenian:1402,pehebrew:1508,pehfinalarabic:64343,pehinitialarabic:64344,pehiragana:12410,pehmedialarabic:64345,pekatakana:12506,pemiddlehookcyrillic:1191,perafehebrew:64334,percent:37,percentarabic:1642,percentmonospace:65285,percentsmall:65130,period:46,periodarmenian:1417,periodcentered:183,periodhalfwidth:65377,periodinferior:63207,periodmonospace:65294,periodsmall:65106,periodsuperior:63208,perispomenigreekcmb:834,perpendicular:8869,perthousand:8240,peseta:8359,pfsquare:13194,phabengali:2475,phadeva:2347,phagujarati:2731,phagurmukhi:2603,phi:966,phi1:981,phieuphacirclekorean:12922,phieuphaparenkorean:12826,phieuphcirclekorean:12908,phieuphkorean:12621,phieuphparenkorean:12812,philatin:632,phinthuthai:3642,phisymbolgreek:981,phook:421,phophanthai:3614,phophungthai:3612,phosamphaothai:3616,pi:960,pieupacirclekorean:12915,pieupaparenkorean:12819,pieupcieuckorean:12662,pieupcirclekorean:12901,pieupkiyeokkorean:12658,pieupkorean:12610,pieupparenkorean:12805,pieupsioskiyeokkorean:12660,pieupsioskorean:12612,pieupsiostikeutkorean:12661,pieupthieuthkorean:12663,pieuptikeutkorean:12659,pihiragana:12404,pikatakana:12500,pisymbolgreek:982,piwrarmenian:1411,plus:43,plusbelowcmb:799,pluscircle:8853,plusminus:177,plusmod:726,plusmonospace:65291,plussmall:65122,plussuperior:8314,pmonospace:65360,pmsquare:13272,pohiragana:12413,pointingindexdownwhite:9759,pointingindexleftwhite:9756,pointingindexrightwhite:9758,pointingindexupwhite:9757,pokatakana:12509,poplathai:3611,postalmark:12306,postalmarkface:12320,pparen:9387,precedes:8826,prescription:8478,primemod:697,primereversed:8245,product:8719,projective:8965,prolongedkana:12540,propellor:8984,propersubset:8834,propersuperset:8835,proportion:8759,proportional:8733,psi:968,psicyrillic:1137,psilipneumatacyrilliccmb:1158,pssquare:13232,puhiragana:12407,pukatakana:12503,pvsquare:13236,pwsquare:13242,q:113,qadeva:2392,qadmahebrew:1448,qafarabic:1602,qaffinalarabic:65238,qafinitialarabic:65239,qafmedialarabic:65240,qamats:1464,qamats10:1464,qamats1a:1464,qamats1c:1464,qamats27:1464,qamats29:1464,qamats33:1464,qamatsde:1464,qamatshebrew:1464,qamatsnarrowhebrew:1464,qamatsqatanhebrew:1464,qamatsqatannarrowhebrew:1464,qamatsqatanquarterhebrew:1464,qamatsqatanwidehebrew:1464,qamatsquarterhebrew:1464,qamatswidehebrew:1464,qarneyparahebrew:1439,qbopomofo:12561,qcircle:9440,qhook:672,qmonospace:65361,qof:1511,qofdagesh:64327,qofdageshhebrew:64327,qofhebrew:1511,qparen:9388,quarternote:9833,qubuts:1467,qubuts18:1467,qubuts25:1467,qubuts31:1467,qubutshebrew:1467,qubutsnarrowhebrew:1467,qubutsquarterhebrew:1467,qubutswidehebrew:1467,question:63,questionarabic:1567,questionarmenian:1374,questiondown:191,questiondownsmall:63423,questiongreek:894,questionmonospace:65311,questionsmall:63295,quotedbl:34,quotedblbase:8222,quotedblleft:8220,quotedblmonospace:65282,quotedblprime:12318,quotedblprimereversed:12317,quotedblright:8221,quoteleft:8216,quoteleftreversed:8219,quotereversed:8219,quoteright:8217,quoterightn:329,quotesinglbase:8218,quotesingle:39,quotesinglemonospace:65287,r:114,raarmenian:1404,rabengali:2480,racute:341,radeva:2352,radical:8730,radicalex:63717,radoverssquare:13230,radoverssquaredsquare:13231,radsquare:13229,rafe:1471,rafehebrew:1471,ragujarati:2736,ragurmukhi:2608,rahiragana:12425,rakatakana:12521,rakatakanahalfwidth:65431,ralowerdiagonalbengali:2545,ramiddlediagonalbengali:2544,ramshorn:612,ratio:8758,rbopomofo:12566,rcaron:345,rcedilla:343,rcircle:9441,rcommaaccent:343,rdblgrave:529,rdotaccent:7769,rdotbelow:7771,rdotbelowmacron:7773,referencemark:8251,reflexsubset:8838,reflexsuperset:8839,registered:174,registersans:63720,registerserif:63194,reharabic:1585,reharmenian:1408,rehfinalarabic:65198,rehiragana:12428,rekatakana:12524,rekatakanahalfwidth:65434,resh:1512,reshdageshhebrew:64328,reshhebrew:1512,reversedtilde:8765,reviahebrew:1431,reviamugrashhebrew:1431,revlogicalnot:8976,rfishhook:638,rfishhookreversed:639,rhabengali:2525,rhadeva:2397,rho:961,rhook:637,rhookturned:635,rhookturnedsuperior:693,rhosymbolgreek:1009,rhotichookmod:734,rieulacirclekorean:12913,rieulaparenkorean:12817,rieulcirclekorean:12899,rieulhieuhkorean:12608,rieulkiyeokkorean:12602,rieulkiyeoksioskorean:12649,rieulkorean:12601,rieulmieumkorean:12603,rieulpansioskorean:12652,rieulparenkorean:12803,rieulphieuphkorean:12607,rieulpieupkorean:12604,rieulpieupsioskorean:12651,rieulsioskorean:12605,rieulthieuthkorean:12606,rieultikeutkorean:12650,rieulyeorinhieuhkorean:12653,rightangle:8735,righttackbelowcmb:793,righttriangle:8895,rihiragana:12426,rikatakana:12522,rikatakanahalfwidth:65432,ring:730,ringbelowcmb:805,ringcmb:778,ringhalfleft:703,ringhalfleftarmenian:1369,ringhalfleftbelowcmb:796,ringhalfleftcentered:723,ringhalfright:702,ringhalfrightbelowcmb:825,ringhalfrightcentered:722,rinvertedbreve:531,rittorusquare:13137,rlinebelow:7775,rlongleg:636,rlonglegturned:634,rmonospace:65362,rohiragana:12429,rokatakana:12525,rokatakanahalfwidth:65435,roruathai:3619,rparen:9389,rrabengali:2524,rradeva:2353,rragurmukhi:2652,rreharabic:1681,rrehfinalarabic:64397,rrvocalicbengali:2528,rrvocalicdeva:2400,rrvocalicgujarati:2784,rrvocalicvowelsignbengali:2500,rrvocalicvowelsigndeva:2372,rrvocalicvowelsigngujarati:2756,rsuperior:63217,rtblock:9616,rturned:633,rturnedsuperior:692,ruhiragana:12427,rukatakana:12523,rukatakanahalfwidth:65433,rupeemarkbengali:2546,rupeesignbengali:2547,rupiah:63197,ruthai:3620,rvocalicbengali:2443,rvocalicdeva:2315,rvocalicgujarati:2699,rvocalicvowelsignbengali:2499,rvocalicvowelsigndeva:2371,rvocalicvowelsigngujarati:2755,s:115,sabengali:2488,sacute:347,sacutedotaccent:7781,sadarabic:1589,sadeva:2360,sadfinalarabic:65210,sadinitialarabic:65211,sadmedialarabic:65212,sagujarati:2744,sagurmukhi:2616,sahiragana:12373,sakatakana:12469,sakatakanahalfwidth:65403,sallallahoualayhewasallamarabic:65018,samekh:1505,samekhdagesh:64321,samekhdageshhebrew:64321,samekhhebrew:1505,saraaathai:3634,saraaethai:3649,saraaimaimalaithai:3652,saraaimaimuanthai:3651,saraamthai:3635,saraathai:3632,saraethai:3648,saraiileftthai:63622,saraiithai:3637,saraileftthai:63621,saraithai:3636,saraothai:3650,saraueeleftthai:63624,saraueethai:3639,saraueleftthai:63623,sarauethai:3638,sarauthai:3640,sarauuthai:3641,sbopomofo:12569,scaron:353,scarondotaccent:7783,scedilla:351,schwa:601,schwacyrillic:1241,schwadieresiscyrillic:1243,schwahook:602,scircle:9442,scircumflex:349,scommaaccent:537,sdotaccent:7777,sdotbelow:7779,sdotbelowdotaccent:7785,seagullbelowcmb:828,second:8243,secondtonechinese:714,section:167,seenarabic:1587,seenfinalarabic:65202,seeninitialarabic:65203,seenmedialarabic:65204,segol:1462,segol13:1462,segol1f:1462,segol2c:1462,segolhebrew:1462,segolnarrowhebrew:1462,segolquarterhebrew:1462,segoltahebrew:1426,segolwidehebrew:1462,seharmenian:1405,sehiragana:12379,sekatakana:12475,sekatakanahalfwidth:65406,semicolon:59,semicolonarabic:1563,semicolonmonospace:65307,semicolonsmall:65108,semivoicedmarkkana:12444,semivoicedmarkkanahalfwidth:65439,sentisquare:13090,sentosquare:13091,seven:55,sevenarabic:1639,sevenbengali:2541,sevencircle:9318,sevencircleinversesansserif:10128,sevendeva:2413,seveneighths:8542,sevengujarati:2797,sevengurmukhi:2669,sevenhackarabic:1639,sevenhangzhou:12327,sevenideographicparen:12838,seveninferior:8327,sevenmonospace:65303,sevenoldstyle:63287,sevenparen:9338,sevenperiod:9358,sevenpersian:1783,sevenroman:8566,sevensuperior:8311,seventeencircle:9328,seventeenparen:9348,seventeenperiod:9368,seventhai:3671,sfthyphen:173,shaarmenian:1399,shabengali:2486,shacyrillic:1096,shaddaarabic:1617,shaddadammaarabic:64609,shaddadammatanarabic:64606,shaddafathaarabic:64608,shaddakasraarabic:64610,shaddakasratanarabic:64607,shade:9618,shadedark:9619,shadelight:9617,shademedium:9618,shadeva:2358,shagujarati:2742,shagurmukhi:2614,shalshelethebrew:1427,shbopomofo:12565,shchacyrillic:1097,sheenarabic:1588,sheenfinalarabic:65206,sheeninitialarabic:65207,sheenmedialarabic:65208,sheicoptic:995,sheqel:8362,sheqelhebrew:8362,sheva:1456,sheva115:1456,sheva15:1456,sheva22:1456,sheva2e:1456,shevahebrew:1456,shevanarrowhebrew:1456,shevaquarterhebrew:1456,shevawidehebrew:1456,shhacyrillic:1211,shimacoptic:1005,shin:1513,shindagesh:64329,shindageshhebrew:64329,shindageshshindot:64300,shindageshshindothebrew:64300,shindageshsindot:64301,shindageshsindothebrew:64301,shindothebrew:1473,shinhebrew:1513,shinshindot:64298,shinshindothebrew:64298,shinsindot:64299,shinsindothebrew:64299,shook:642,sigma:963,sigma1:962,sigmafinal:962,sigmalunatesymbolgreek:1010,sihiragana:12375,sikatakana:12471,sikatakanahalfwidth:65404,siluqhebrew:1469,siluqlefthebrew:1469,similar:8764,sindothebrew:1474,siosacirclekorean:12916,siosaparenkorean:12820,sioscieuckorean:12670,sioscirclekorean:12902,sioskiyeokkorean:12666,sioskorean:12613,siosnieunkorean:12667,siosparenkorean:12806,siospieupkorean:12669,siostikeutkorean:12668,six:54,sixarabic:1638,sixbengali:2540,sixcircle:9317,sixcircleinversesansserif:10127,sixdeva:2412,sixgujarati:2796,sixgurmukhi:2668,sixhackarabic:1638,sixhangzhou:12326,sixideographicparen:12837,sixinferior:8326,sixmonospace:65302,sixoldstyle:63286,sixparen:9337,sixperiod:9357,sixpersian:1782,sixroman:8565,sixsuperior:8310,sixteencircle:9327,sixteencurrencydenominatorbengali:2553,sixteenparen:9347,sixteenperiod:9367,sixthai:3670,slash:47,slashmonospace:65295,slong:383,slongdotaccent:7835,smileface:9786,smonospace:65363,sofpasuqhebrew:1475,softhyphen:173,softsigncyrillic:1100,sohiragana:12381,sokatakana:12477,sokatakanahalfwidth:65407,soliduslongoverlaycmb:824,solidusshortoverlaycmb:823,sorusithai:3625,sosalathai:3624,sosothai:3595,sosuathai:3626,space:32,spacehackarabic:32,spade:9824,spadesuitblack:9824,spadesuitwhite:9828,sparen:9390,squarebelowcmb:827,squarecc:13252,squarecm:13213,squarediagonalcrosshatchfill:9641,squarehorizontalfill:9636,squarekg:13199,squarekm:13214,squarekmcapital:13262,squareln:13265,squarelog:13266,squaremg:13198,squaremil:13269,squaremm:13212,squaremsquared:13217,squareorthogonalcrosshatchfill:9638,squareupperlefttolowerrightfill:9639,squareupperrighttolowerleftfill:9640,squareverticalfill:9637,squarewhitewithsmallblack:9635,srsquare:13275,ssabengali:2487,ssadeva:2359,ssagujarati:2743,ssangcieuckorean:12617,ssanghieuhkorean:12677,ssangieungkorean:12672,ssangkiyeokkorean:12594,ssangnieunkorean:12645,ssangpieupkorean:12611,ssangsioskorean:12614,ssangtikeutkorean:12600,ssuperior:63218,sterling:163,sterlingmonospace:65505,strokelongoverlaycmb:822,strokeshortoverlaycmb:821,subset:8834,subsetnotequal:8842,subsetorequal:8838,succeeds:8827,suchthat:8715,suhiragana:12377,sukatakana:12473,sukatakanahalfwidth:65405,sukunarabic:1618,summation:8721,sun:9788,superset:8835,supersetnotequal:8843,supersetorequal:8839,svsquare:13276,syouwaerasquare:13180,t:116,tabengali:2468,tackdown:8868,tackleft:8867,tadeva:2340,tagujarati:2724,tagurmukhi:2596,taharabic:1591,tahfinalarabic:65218,tahinitialarabic:65219,tahiragana:12383,tahmedialarabic:65220,taisyouerasquare:13181,takatakana:12479,takatakanahalfwidth:65408,tatweelarabic:1600,tau:964,tav:1514,tavdages:64330,tavdagesh:64330,tavdageshhebrew:64330,tavhebrew:1514,tbar:359,tbopomofo:12554,tcaron:357,tccurl:680,tcedilla:355,tcheharabic:1670,tchehfinalarabic:64379,tchehinitialarabic:64380,tchehmedialarabic:64381,tcircle:9443,tcircumflexbelow:7793,tcommaaccent:355,tdieresis:7831,tdotaccent:7787,tdotbelow:7789,tecyrillic:1090,tedescendercyrillic:1197,teharabic:1578,tehfinalarabic:65174,tehhahinitialarabic:64674,tehhahisolatedarabic:64524,tehinitialarabic:65175,tehiragana:12390,tehjeeminitialarabic:64673,tehjeemisolatedarabic:64523,tehmarbutaarabic:1577,tehmarbutafinalarabic:65172,tehmedialarabic:65176,tehmeeminitialarabic:64676,tehmeemisolatedarabic:64526,tehnoonfinalarabic:64627,tekatakana:12486,tekatakanahalfwidth:65411,telephone:8481,telephoneblack:9742,telishagedolahebrew:1440,telishaqetanahebrew:1449,tencircle:9321,tenideographicparen:12841,tenparen:9341,tenperiod:9361,tenroman:8569,tesh:679,tet:1496,tetdagesh:64312,tetdageshhebrew:64312,tethebrew:1496,tetsecyrillic:1205,tevirhebrew:1435,tevirlefthebrew:1435,thabengali:2469,thadeva:2341,thagujarati:2725,thagurmukhi:2597,thalarabic:1584,thalfinalarabic:65196,thanthakhatlowleftthai:63640,thanthakhatlowrightthai:63639,thanthakhatthai:3660,thanthakhatupperleftthai:63638,theharabic:1579,thehfinalarabic:65178,thehinitialarabic:65179,thehmedialarabic:65180,thereexists:8707,therefore:8756,theta:952,theta1:977,thetasymbolgreek:977,thieuthacirclekorean:12921,thieuthaparenkorean:12825,thieuthcirclekorean:12907,thieuthkorean:12620,thieuthparenkorean:12811,thirteencircle:9324,thirteenparen:9344,thirteenperiod:9364,thonangmonthothai:3601,thook:429,thophuthaothai:3602,thorn:254,thothahanthai:3607,thothanthai:3600,thothongthai:3608,thothungthai:3606,thousandcyrillic:1154,thousandsseparatorarabic:1644,thousandsseparatorpersian:1644,three:51,threearabic:1635,threebengali:2537,threecircle:9314,threecircleinversesansserif:10124,threedeva:2409,threeeighths:8540,threegujarati:2793,threegurmukhi:2665,threehackarabic:1635,threehangzhou:12323,threeideographicparen:12834,threeinferior:8323,threemonospace:65299,threenumeratorbengali:2550,threeoldstyle:63283,threeparen:9334,threeperiod:9354,threepersian:1779,threequarters:190,threequartersemdash:63198,threeroman:8562,threesuperior:179,threethai:3667,thzsquare:13204,tihiragana:12385,tikatakana:12481,tikatakanahalfwidth:65409,tikeutacirclekorean:12912,tikeutaparenkorean:12816,tikeutcirclekorean:12898,tikeutkorean:12599,tikeutparenkorean:12802,tilde:732,tildebelowcmb:816,tildecmb:771,tildecomb:771,tildedoublecmb:864,tildeoperator:8764,tildeoverlaycmb:820,tildeverticalcmb:830,timescircle:8855,tipehahebrew:1430,tipehalefthebrew:1430,tippigurmukhi:2672,titlocyrilliccmb:1155,tiwnarmenian:1407,tlinebelow:7791,tmonospace:65364,toarmenian:1385,tohiragana:12392,tokatakana:12488,tokatakanahalfwidth:65412,tonebarextrahighmod:741,tonebarextralowmod:745,tonebarhighmod:742,tonebarlowmod:744,tonebarmidmod:743, -tonefive:445,tonesix:389,tonetwo:424,tonos:900,tonsquare:13095,topatakthai:3599,tortoiseshellbracketleft:12308,tortoiseshellbracketleftsmall:65117,tortoiseshellbracketleftvertical:65081,tortoiseshellbracketright:12309,tortoiseshellbracketrightsmall:65118,tortoiseshellbracketrightvertical:65082,totaothai:3605,tpalatalhook:427,tparen:9391,trademark:8482,trademarksans:63722,trademarkserif:63195,tretroflexhook:648,triagdn:9660,triaglf:9668,triagrt:9658,triagup:9650,ts:678,tsadi:1510,tsadidagesh:64326,tsadidageshhebrew:64326,tsadihebrew:1510,tsecyrillic:1094,tsere:1461,tsere12:1461,tsere1e:1461,tsere2b:1461,tserehebrew:1461,tserenarrowhebrew:1461,tserequarterhebrew:1461,tserewidehebrew:1461,tshecyrillic:1115,tsuperior:63219,ttabengali:2463,ttadeva:2335,ttagujarati:2719,ttagurmukhi:2591,tteharabic:1657,ttehfinalarabic:64359,ttehinitialarabic:64360,ttehmedialarabic:64361,tthabengali:2464,tthadeva:2336,tthagujarati:2720,tthagurmukhi:2592,tturned:647,tuhiragana:12388,tukatakana:12484,tukatakanahalfwidth:65410,tusmallhiragana:12387,tusmallkatakana:12483,tusmallkatakanahalfwidth:65391,twelvecircle:9323,twelveparen:9343,twelveperiod:9363,twelveroman:8571,twentycircle:9331,twentyhangzhou:21316,twentyparen:9351,twentyperiod:9371,two:50,twoarabic:1634,twobengali:2536,twocircle:9313,twocircleinversesansserif:10123,twodeva:2408,twodotenleader:8229,twodotleader:8229,twodotleadervertical:65072,twogujarati:2792,twogurmukhi:2664,twohackarabic:1634,twohangzhou:12322,twoideographicparen:12833,twoinferior:8322,twomonospace:65298,twonumeratorbengali:2549,twooldstyle:63282,twoparen:9333,twoperiod:9353,twopersian:1778,tworoman:8561,twostroke:443,twosuperior:178,twothai:3666,twothirds:8532,u:117,uacute:250,ubar:649,ubengali:2441,ubopomofo:12584,ubreve:365,ucaron:468,ucircle:9444,ucircumflex:251,ucircumflexbelow:7799,ucyrillic:1091,udattadeva:2385,udblacute:369,udblgrave:533,udeva:2313,udieresis:252,udieresisacute:472,udieresisbelow:7795,udieresiscaron:474,udieresiscyrillic:1265,udieresisgrave:476,udieresismacron:470,udotbelow:7909,ugrave:249,ugujarati:2697,ugurmukhi:2569,uhiragana:12358,uhookabove:7911,uhorn:432,uhornacute:7913,uhorndotbelow:7921,uhorngrave:7915,uhornhookabove:7917,uhorntilde:7919,uhungarumlaut:369,uhungarumlautcyrillic:1267,uinvertedbreve:535,ukatakana:12454,ukatakanahalfwidth:65395,ukcyrillic:1145,ukorean:12636,umacron:363,umacroncyrillic:1263,umacrondieresis:7803,umatragurmukhi:2625,umonospace:65365,underscore:95,underscoredbl:8215,underscoremonospace:65343,underscorevertical:65075,underscorewavy:65103,union:8746,universal:8704,uogonek:371,uparen:9392,upblock:9600,upperdothebrew:1476,upsilon:965,upsilondieresis:971,upsilondieresistonos:944,upsilonlatin:650,upsilontonos:973,uptackbelowcmb:797,uptackmod:724,uragurmukhi:2675,uring:367,ushortcyrillic:1118,usmallhiragana:12357,usmallkatakana:12453,usmallkatakanahalfwidth:65385,ustraightcyrillic:1199,ustraightstrokecyrillic:1201,utilde:361,utildeacute:7801,utildebelow:7797,uubengali:2442,uudeva:2314,uugujarati:2698,uugurmukhi:2570,uumatragurmukhi:2626,uuvowelsignbengali:2498,uuvowelsigndeva:2370,uuvowelsigngujarati:2754,uvowelsignbengali:2497,uvowelsigndeva:2369,uvowelsigngujarati:2753,v:118,vadeva:2357,vagujarati:2741,vagurmukhi:2613,vakatakana:12535,vav:1493,vavdagesh:64309,vavdagesh65:64309,vavdageshhebrew:64309,vavhebrew:1493,vavholam:64331,vavholamhebrew:64331,vavvavhebrew:1520,vavyodhebrew:1521,vcircle:9445,vdotbelow:7807,vecyrillic:1074,veharabic:1700,vehfinalarabic:64363,vehinitialarabic:64364,vehmedialarabic:64365,vekatakana:12537,venus:9792,verticalbar:124,verticallineabovecmb:781,verticallinebelowcmb:809,verticallinelowmod:716,verticallinemod:712,vewarmenian:1406,vhook:651,vikatakana:12536,viramabengali:2509,viramadeva:2381,viramagujarati:2765,visargabengali:2435,visargadeva:2307,visargagujarati:2691,vmonospace:65366,voarmenian:1400,voicediterationhiragana:12446,voicediterationkatakana:12542,voicedmarkkana:12443,voicedmarkkanahalfwidth:65438,vokatakana:12538,vparen:9393,vtilde:7805,vturned:652,vuhiragana:12436,vukatakana:12532,w:119,wacute:7811,waekorean:12633,wahiragana:12431,wakatakana:12527,wakatakanahalfwidth:65436,wakorean:12632,wasmallhiragana:12430,wasmallkatakana:12526,wattosquare:13143,wavedash:12316,wavyunderscorevertical:65076,wawarabic:1608,wawfinalarabic:65262,wawhamzaabovearabic:1572,wawhamzaabovefinalarabic:65158,wbsquare:13277,wcircle:9446,wcircumflex:373,wdieresis:7813,wdotaccent:7815,wdotbelow:7817,wehiragana:12433,weierstrass:8472,wekatakana:12529,wekorean:12638,weokorean:12637,wgrave:7809,whitebullet:9702,whitecircle:9675,whitecircleinverse:9689,whitecornerbracketleft:12302,whitecornerbracketleftvertical:65091,whitecornerbracketright:12303,whitecornerbracketrightvertical:65092,whitediamond:9671,whitediamondcontainingblacksmalldiamond:9672,whitedownpointingsmalltriangle:9663,whitedownpointingtriangle:9661,whiteleftpointingsmalltriangle:9667,whiteleftpointingtriangle:9665,whitelenticularbracketleft:12310,whitelenticularbracketright:12311,whiterightpointingsmalltriangle:9657,whiterightpointingtriangle:9655,whitesmallsquare:9643,whitesmilingface:9786,whitesquare:9633,whitestar:9734,whitetelephone:9743,whitetortoiseshellbracketleft:12312,whitetortoiseshellbracketright:12313,whiteuppointingsmalltriangle:9653,whiteuppointingtriangle:9651,wihiragana:12432,wikatakana:12528,wikorean:12639,wmonospace:65367,wohiragana:12434,wokatakana:12530,wokatakanahalfwidth:65382,won:8361,wonmonospace:65510,wowaenthai:3623,wparen:9394,wring:7832,wsuperior:695,wturned:653,wynn:447,x:120,xabovecmb:829,xbopomofo:12562,xcircle:9447,xdieresis:7821,xdotaccent:7819,xeharmenian:1389,xi:958,xmonospace:65368,xparen:9395,xsuperior:739,y:121,yaadosquare:13134,yabengali:2479,yacute:253,yadeva:2351,yaekorean:12626,yagujarati:2735,yagurmukhi:2607,yahiragana:12420,yakatakana:12516,yakatakanahalfwidth:65428,yakorean:12625,yamakkanthai:3662,yasmallhiragana:12419,yasmallkatakana:12515,yasmallkatakanahalfwidth:65388,yatcyrillic:1123,ycircle:9448,ycircumflex:375,ydieresis:255,ydotaccent:7823,ydotbelow:7925,yeharabic:1610,yehbarreearabic:1746,yehbarreefinalarabic:64431,yehfinalarabic:65266,yehhamzaabovearabic:1574,yehhamzaabovefinalarabic:65162,yehhamzaaboveinitialarabic:65163,yehhamzaabovemedialarabic:65164,yehinitialarabic:65267,yehmedialarabic:65268,yehmeeminitialarabic:64733,yehmeemisolatedarabic:64600,yehnoonfinalarabic:64660,yehthreedotsbelowarabic:1745,yekorean:12630,yen:165,yenmonospace:65509,yeokorean:12629,yeorinhieuhkorean:12678,yerahbenyomohebrew:1450,yerahbenyomolefthebrew:1450,yericyrillic:1099,yerudieresiscyrillic:1273,yesieungkorean:12673,yesieungpansioskorean:12675,yesieungsioskorean:12674,yetivhebrew:1434,ygrave:7923,yhook:436,yhookabove:7927,yiarmenian:1397,yicyrillic:1111,yikorean:12642,yinyang:9775,yiwnarmenian:1410,ymonospace:65369,yod:1497,yoddagesh:64313,yoddageshhebrew:64313,yodhebrew:1497,yodyodhebrew:1522,yodyodpatahhebrew:64287,yohiragana:12424,yoikorean:12681,yokatakana:12520,yokatakanahalfwidth:65430,yokorean:12635,yosmallhiragana:12423,yosmallkatakana:12519,yosmallkatakanahalfwidth:65390,yotgreek:1011,yoyaekorean:12680,yoyakorean:12679,yoyakthai:3618,yoyingthai:3597,yparen:9396,ypogegrammeni:890,ypogegrammenigreekcmb:837,yr:422,yring:7833,ysuperior:696,ytilde:7929,yturned:654,yuhiragana:12422,yuikorean:12684,yukatakana:12518,yukatakanahalfwidth:65429,yukorean:12640,yusbigcyrillic:1131,yusbigiotifiedcyrillic:1133,yuslittlecyrillic:1127,yuslittleiotifiedcyrillic:1129,yusmallhiragana:12421,yusmallkatakana:12517,yusmallkatakanahalfwidth:65389,yuyekorean:12683,yuyeokorean:12682,yyabengali:2527,yyadeva:2399,z:122,zaarmenian:1382,zacute:378,zadeva:2395,zagurmukhi:2651,zaharabic:1592,zahfinalarabic:65222,zahinitialarabic:65223,zahiragana:12374,zahmedialarabic:65224,zainarabic:1586,zainfinalarabic:65200,zakatakana:12470,zaqefgadolhebrew:1429,zaqefqatanhebrew:1428,zarqahebrew:1432,zayin:1494,zayindagesh:64310,zayindageshhebrew:64310,zayinhebrew:1494,zbopomofo:12567,zcaron:382,zcircle:9449,zcircumflex:7825,zcurl:657,zdot:380,zdotaccent:380,zdotbelow:7827,zecyrillic:1079,zedescendercyrillic:1177,zedieresiscyrillic:1247,zehiragana:12380,zekatakana:12476,zero:48,zeroarabic:1632,zerobengali:2534,zerodeva:2406,zerogujarati:2790,zerogurmukhi:2662,zerohackarabic:1632,zeroinferior:8320,zeromonospace:65296,zerooldstyle:63280,zeropersian:1776,zerosuperior:8304,zerothai:3664,zerowidthjoiner:65279,zerowidthnonjoiner:8204,zerowidthspace:8203,zeta:950,zhbopomofo:12563,zhearmenian:1386,zhebrevecyrillic:1218,zhecyrillic:1078,zhedescendercyrillic:1175,zhedieresiscyrillic:1245,zihiragana:12376,zikatakana:12472,zinorhebrew:1454,zlinebelow:7829,zmonospace:65370,zohiragana:12382,zokatakana:12478,zparen:9397,zretroflexhook:656,zstroke:438,zuhiragana:12378,zukatakana:12474,".notdef":0},Ac={space:32,a1:9985,a2:9986,a202:9987,a3:9988,a4:9742,a5:9990,a119:9991,a118:9992,a117:9993,a11:9755,a12:9758,a13:9996,a14:9997,a15:9998,a16:9999,a105:1e4,a17:10001,a18:10002,a19:10003,a20:10004,a21:10005,a22:10006,a23:10007,a24:10008,a25:10009,a26:10010,a27:10011,a28:10012,a6:10013,a7:10014,a8:10015,a9:10016,a10:10017,a29:10018,a30:10019,a31:10020,a32:10021,a33:10022,a34:10023,a35:9733,a36:10025,a37:10026,a38:10027,a39:10028,a40:10029,a41:10030,a42:10031,a43:10032,a44:10033,a45:10034,a46:10035,a47:10036,a48:10037,a49:10038,a50:10039,a51:10040,a52:10041,a53:10042,a54:10043,a55:10044,a56:10045,a57:10046,a58:10047,a59:10048,a60:10049,a61:10050,a62:10051,a63:10052,a64:10053,a65:10054,a66:10055,a67:10056,a68:10057,a69:10058,a70:10059,a71:9679,a72:10061,a73:9632,a74:10063,a203:10064,a75:10065,a204:10066,a76:9650,a77:9660,a78:9670,a79:10070,a81:9687,a82:10072,a83:10073,a84:10074,a97:10075,a98:10076,a99:10077,a100:10078,a101:10081,a102:10082,a103:10083,a104:10084,a106:10085,a107:10086,a108:10087,a112:9827,a111:9830,a110:9829,a109:9824,a120:9312,a121:9313,a122:9314,a123:9315,a124:9316,a125:9317,a126:9318,a127:9319,a128:9320,a129:9321,a130:10102,a131:10103,a132:10104,a133:10105,a134:10106,a135:10107,a136:10108,a137:10109,a138:10110,a139:10111,a140:10112,a141:10113,a142:10114,a143:10115,a144:10116,a145:10117,a146:10118,a147:10119,a148:10120,a149:10121,a150:10122,a151:10123,a152:10124,a153:10125,a154:10126,a155:10127,a156:10128,a157:10129,a158:10130,a159:10131,a160:10132,a161:8594,a163:8596,a164:8597,a196:10136,a165:10137,a192:10138,a166:10139,a167:10140,a168:10141,a169:10142,a170:10143,a171:10144,a172:10145,a173:10146,a162:10147,a174:10148,a175:10149,a176:10150,a177:10151,a178:10152,a179:10153,a193:10154,a180:10155,a199:10156,a181:10157,a200:10158,a182:10159,a201:10161,a183:10162,a184:10163,a197:10164,a185:10165,a194:10166,a198:10167,a186:10168,a195:10169,a187:10170,a188:10171,a189:10172,a190:10173,a191:10174,a89:10088,a90:10089,a93:10090,a94:10091,a91:10092,a92:10093,a205:10094,a85:10095,a206:10096,a86:10097,a87:10098,a88:10099,a95:10100,a96:10101,".notdef":0},Bc=function(){function d(a,b,c,d){if(d instanceof Sc&&d.isNativelyDecodable(b,c)){var e=d.dict,f=e.get("ColorSpace","CS");f=Xa.parse(f,b,c);var g=f.numComps,h=a.sendWithPromise("JpegDecode",[d.getIR(),g]);return h.then(function(a){var b=a.data;return new Mc(b,0,b.length,d.dict)})}return Promise.resolve(d)}function f(a,b,c,d){return a=b+a*c,0>a?0:a>d?d:a}function g(b,d,e,f,h,i,j){this.image=e;var k=e.dict;if(k.has("Filter")){var l=k.get("Filter").name;if("JPXDecode"===l){var m=new hd;m.parseImageProperties(e.stream),e.stream.reset(),e.bitsPerComponent=m.bitsPerComponent,e.numComps=m.componentsCount}else"JBIG2Decode"===l&&(e.bitsPerComponent=1,e.numComps=1)}this.width=k.get("Width","W"),this.height=k.get("Height","H"),(this.width<1||this.height<1)&&c("Invalid image width: "+this.width+" or height: "+this.height),this.interpolate=k.get("Interpolate","I")||!1,this.imageMask=k.get("ImageMask","IM")||!1,this.matte=k.get("Matte")||!1;var n=e.bitsPerComponent;if(n||(n=k.get("BitsPerComponent","BPC"),n||(this.imageMask?n=1:c("Bits per component missing in image: "+this.imageMask))),this.bpc=n,!this.imageMask){var o=k.get("ColorSpace","CS");if(!o)switch(a("JPX images (which do not require color spaces)"),e.numComps){case 1:o=ya.get("DeviceGray");break;case 3:o=ya.get("DeviceRGB");break;case 4:o=ya.get("DeviceCMYK");break;default:c("JPX images with "+this.numComps+" color components not supported.")}this.colorSpace=Xa.parse(o,b,d),this.numComps=this.colorSpace.numComps}if(this.decode=k.get("Decode","D"),this.needsDecode=!1,this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode)||j&&!Xa.isDefaultDecode(this.decode,1))){this.needsDecode=!0;var p=(1<=b?new Uint8Array(o):16>=b?new Uint16Array(o):new Uint32Array(o),q=e/g,r=f/h,s=0,t=new Uint16Array(g),u=e*d;for(1!==j&&(j=0),l=0;g>l;l++)t[l]=Math.floor(l*q)*d;if(1===d)for(k=0;h>k;k++)for(m=Math.floor(k*r)*u,l=0;g>l;l++)n=m+t[l],p[s++]=a[n];else if(3===d)for(k=0;h>k;k++)for(m=Math.floor(k*r)*u,l=0;g>l;l++)n=m+t[l],p[s++]=a[n++],p[s++]=a[n++],p[s++]=a[n++],s+=j;return p},g.createMask=function(a,b,c,d,e){var f,g,h=(b+7>>3)*c,i=a.byteLength,j=h===i;if(!d||e&&!j)if(e)for(f=new Uint8Array(h),f.set(a),g=i;h>g;g++)f[g]=255;else f=new Uint8Array(i),f.set(a);else f=a;if(e)for(g=0;i>g;g++)f[g]=~f[g];return{data:f,width:b,height:c}},g.prototype={get drawWidth(){return Math.max(this.width,this.smask&&this.smask.width||0,this.mask&&this.mask.width||0)},get drawHeight(){return Math.max(this.height,this.smask&&this.smask.height||0,this.mask&&this.mask.height||0)},decodeBuffer:function(a){var b,c,d=this.bpc,e=this.numComps,g=this.decodeAddends,h=this.decodeCoefficients,i=(1<b;b++)for(var k=0;e>k;k++)a[j]=f(a[j],g[k],h[k],i),j++}else for(b=0,c=a.length;c>b;b++)a[b]=+!a[b]},getComponents:function(a){var b=this.bpc;if(8===b)return a;var c,d,e=this.width,f=this.height,g=this.numComps,h=e*f*g,i=0,j=8>=b?new Uint8Array(h):16>=b?new Uint16Array(h):new Uint32Array(h),k=e*g,l=(1<q;q++){for(o=m+(-8&k),p=m+k;o>m;)d=a[i++],j[m]=d>>7&1,j[m+1]=d>>6&1,j[m+2]=d>>5&1,j[m+3]=d>>4&1,j[m+4]=d>>3&1,j[m+5]=d>>2&1,j[m+6]=d>>1&1,j[m+7]=1&d,m+=8;if(p>m)for(d=a[i++],n=128;p>m;)j[m++]=+!!(d&n),n>>=1}else{var r=0;for(d=0,m=0,c=h;c>m;++m){for(m%k===0&&(d=0,r=0);b>r;)d=d<<8|a[i++],r+=8;var s=r-b,t=d>>s;j[m]=0>t?0:t>l?l:t,d&=(1<k;++k)h[k]=255-h[k];i===b&&j===d||(h=g.resize(h,o.bpc,1,i,j,b,d))}else if(C(o)){h=new Uint8Array(b*d);var p=this.numComps;for(k=0,l=b*d;l>k;++k){var q=0,r=k*p;for(m=0;p>m;++m){var s=f[r+m],t=2*m;if(so[t+1]){q=255;break}}h[k]=q}}else c("Unknown mask format.");if(h)for(k=0,m=3,l=b*e;l>k;++k,m+=4)a[m]=h[k];else for(k=0,m=3,l=b*e;l>k;++k,m+=4)a[m]=255},undoPreblend:function(a,b,c){var d=this.smask&&this.smask.matte;if(d)for(var e,f,g,h=this.colorSpace.getRgb(d,0),i=h[0],j=h[1],k=h[2],l=b*c*4,m=0;l>m;m+=4){var n=a[m+3];if(0!==n){var o=255/n;e=(a[m]-i)*o+i,f=(a[m+1]-j)*o+j,g=(a[m+2]-k)*o+k,a[m]=0>=e?0:e>=255?255:0|e,a[m+1]=0>=f?0:f>=255?255:0|f,a[m+2]=0>=g?0:g>=255?255:0|g}else a[m]=255,a[m+1]=255,a[m+2]=255}},createImageData:function(a){var b,c=this.drawWidth,d=this.drawHeight,f={width:c,height:d},g=this.numComps,h=this.width,i=this.height,j=this.bpc,k=h*g*j+7>>3;if(!a){var l;if("DeviceGray"===this.colorSpace.name&&1===j?l=V.GRAYSCALE_1BPP:"DeviceRGB"!==this.colorSpace.name||8!==j||this.needsDecode||(l=V.RGB_24BPP),l&&!this.smask&&!this.mask&&c===h&&d===i){if(f.kind=l,b=this.getImageBytes(i*k),this.image instanceof Oc)f.data=b;else{var m=new Uint8Array(b.length);m.set(b),f.data=m}if(this.needsDecode){e(l===V.GRAYSCALE_1BPP);for(var n=f.data,o=0,p=n.length;p>o;o++)n[o]^=255}return f}if(this.image instanceof Sc&&!this.smask&&!this.mask&&("DeviceGray"===this.colorSpace.name||"DeviceRGB"===this.colorSpace.name||"DeviceCMYK"===this.colorSpace.name))return f.kind=V.RGB_24BPP,f.data=this.getImageBytes(i*k,c,d,!0),f}b=this.getImageBytes(i*k);var q,r,s=0|b.length/k*d/i,t=this.getComponents(b);return a||this.smask||this.mask?(f.kind=V.RGBA_32BPP,f.data=new Uint8Array(c*d*4),q=1,r=!0,this.fillOpacity(f.data,c,d,s,t)):(f.kind=V.RGB_24BPP,f.data=new Uint8Array(c*d*3),q=0,r=!1),this.needsDecode&&this.decodeBuffer(t),this.colorSpace.fillRgb(f.data,h,i,c,d,s,j,t,q),r&&this.undoPreblend(f.data,c,s),f},fillGrayBuffer:function(a){var b=this.numComps;1!==b&&c("Reading gray scale from a color image: "+b);var d,e,f=this.width,g=this.height,h=this.bpc,i=f*b*h+7>>3,j=this.getImageBytes(g*i),k=this.getComponents(j);if(1!==h){this.needsDecode&&this.decodeBuffer(k),e=f*g;var l=255/((1<d;++d)a[d]=l*k[d]|0}else if(e=f*g,this.needsDecode)for(d=0;e>d;++d)a[d]=k[d]-1&255;else for(d=0;e>d;++d)a[d]=255&-k[d]},getImageBytes:function(a,b,c,d){return this.image.reset(),this.image.drawWidth=b||this.width,this.image.drawHeight=c||this.height,this.image.forceRGB=!!d,this.image.getBytes(a)}},g}(),Cc={Courier:600,"Courier-Bold":600,"Courier-BoldOblique":600,"Courier-Oblique":600,Helvetica:{space:278,exclam:278,quotedbl:355,numbersign:556,dollar:556,percent:889,ampersand:667,quoteright:222,parenleft:333,parenright:333,asterisk:389,plus:584,comma:278,hyphen:333,period:278,slash:278,zero:556,one:556,two:556,three:556,four:556,five:556,six:556,seven:556,eight:556,nine:556,colon:278,semicolon:278,less:584,equal:584,greater:584,question:556,at:1015,A:667,B:667,C:722,D:722,E:667,F:611,G:778,H:722,I:278,J:500,K:667,L:556,M:833,N:722,O:778,P:667,Q:778,R:722,S:667,T:611,U:722,V:667,W:944,X:667,Y:667,Z:611,bracketleft:278,backslash:278,bracketright:278,asciicircum:469,underscore:556,quoteleft:222,a:556,b:556,c:500,d:556,e:556,f:278,g:556,h:556,i:222,j:222,k:500,l:222,m:833,n:556,o:556,p:556,q:556,r:333,s:500,t:278,u:556,v:500,w:722,x:500,y:500,z:500,braceleft:334,bar:260,braceright:334,asciitilde:584,exclamdown:333,cent:556,sterling:556,fraction:167,yen:556,florin:556,section:556,currency:556,quotesingle:191,quotedblleft:333,guillemotleft:556,guilsinglleft:333,guilsinglright:333,fi:500,fl:500,endash:556,dagger:556,daggerdbl:556,periodcentered:278,paragraph:537,bullet:350,quotesinglbase:222,quotedblbase:333,quotedblright:333,guillemotright:556,ellipsis:1e3,perthousand:1e3,questiondown:611,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:1e3,ordfeminine:370,Lslash:556,Oslash:778,OE:1e3,ordmasculine:365,ae:889,dotlessi:278,lslash:222,oslash:611,oe:944,germandbls:611,Idieresis:278,eacute:556,abreve:556,uhungarumlaut:556,ecaron:556,Ydieresis:667,divide:584,Yacute:667,Acircumflex:667,aacute:556,Ucircumflex:722,yacute:500,scommaaccent:500,ecircumflex:556,Uring:722,Udieresis:722,aogonek:556,Uacute:722,uogonek:556,Edieresis:667,Dcroat:722,commaaccent:250,copyright:737,Emacron:667,ccaron:500,aring:556,Ncommaaccent:722,lacute:222,agrave:556,Tcommaaccent:611,Cacute:722,atilde:556,Edotaccent:667,scaron:500,scedilla:500,iacute:278,lozenge:471,Rcaron:722,Gcommaaccent:778,ucircumflex:556,acircumflex:556,Amacron:667,rcaron:333,ccedilla:500,Zdotaccent:611,Thorn:667,Omacron:778,Racute:722,Sacute:667,dcaron:643,Umacron:722,uring:556,threesuperior:333,Ograve:778,Agrave:667,Abreve:667,multiply:584,uacute:556,Tcaron:611,partialdiff:476,ydieresis:500,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:556,edieresis:556,cacute:500,nacute:556,umacron:556,Ncaron:722,Iacute:278,plusminus:584,brokenbar:260,registered:737,Gbreve:778,Idotaccent:278,summation:600,Egrave:667,racute:333,omacron:556,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:722,lcommaaccent:222,tcaron:317,eogonek:556,Uogonek:722,Aacute:667,Adieresis:667,egrave:556,zacute:500,iogonek:222,Oacute:778,oacute:556,amacron:556,sacute:500,idieresis:278,Ocircumflex:778,Ugrave:722,Delta:612,thorn:556,twosuperior:333,Odieresis:778,mu:556,igrave:278,ohungarumlaut:556,Eogonek:667,dcroat:556,threequarters:834,Scedilla:667,lcaron:299,Kcommaaccent:667,Lacute:556,trademark:1e3,edotaccent:556,Igrave:278,Imacron:278,Lcaron:556,onehalf:834,lessequal:549,ocircumflex:556,ntilde:556,Uhungarumlaut:722,Eacute:667,emacron:556,gbreve:556,onequarter:834,Scaron:667,Scommaaccent:667,Ohungarumlaut:778,degree:400,ograve:556,Ccaron:722,ugrave:556,radical:453,Dcaron:722,rcommaaccent:333,Ntilde:722,otilde:556,Rcommaaccent:722,Lcommaaccent:556,Atilde:667,Aogonek:667,Aring:667,Otilde:778,zdotaccent:500,Ecaron:667,Iogonek:278,kcommaaccent:500,minus:584,Icircumflex:278,ncaron:556,tcommaaccent:278,logicalnot:584,odieresis:556,udieresis:556,notequal:549,gcommaaccent:556,eth:556,zcaron:500,ncommaaccent:556,onesuperior:333,imacron:278,Euro:556},"Helvetica-Bold":{space:278,exclam:333,quotedbl:474,numbersign:556,dollar:556,percent:889,ampersand:722,quoteright:278,parenleft:333,parenright:333,asterisk:389,plus:584,comma:278,hyphen:333,period:278,slash:278,zero:556,one:556,two:556,three:556,four:556,five:556,six:556,seven:556,eight:556,nine:556,colon:333,semicolon:333,less:584,equal:584,greater:584,question:611,at:975,A:722,B:722,C:722,D:722,E:667,F:611,G:778,H:722,I:278,J:556,K:722,L:611,M:833,N:722,O:778,P:667,Q:778,R:722,S:667,T:611,U:722,V:667,W:944,X:667,Y:667,Z:611,bracketleft:333,backslash:278,bracketright:333,asciicircum:584,underscore:556,quoteleft:278,a:556,b:611,c:556,d:611,e:556,f:333,g:611,h:611,i:278,j:278,k:556,l:278,m:889,n:611,o:611,p:611,q:611,r:389,s:556,t:333,u:611,v:556,w:778,x:556,y:556,z:500,braceleft:389,bar:280,braceright:389,asciitilde:584,exclamdown:333,cent:556,sterling:556,fraction:167,yen:556,florin:556,section:556,currency:556,quotesingle:238,quotedblleft:500,guillemotleft:556,guilsinglleft:333,guilsinglright:333,fi:611,fl:611,endash:556,dagger:556,daggerdbl:556,periodcentered:278,paragraph:556,bullet:350,quotesinglbase:278,quotedblbase:500,quotedblright:500,guillemotright:556,ellipsis:1e3,perthousand:1e3,questiondown:611,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:1e3,ordfeminine:370,Lslash:611,Oslash:778,OE:1e3,ordmasculine:365,ae:889,dotlessi:278,lslash:278,oslash:611,oe:944,germandbls:611,Idieresis:278,eacute:556,abreve:556,uhungarumlaut:611,ecaron:556,Ydieresis:667,divide:584,Yacute:667,Acircumflex:722,aacute:556,Ucircumflex:722,yacute:556,scommaaccent:556,ecircumflex:556,Uring:722,Udieresis:722,aogonek:556,Uacute:722,uogonek:611,Edieresis:667,Dcroat:722,commaaccent:250,copyright:737,Emacron:667,ccaron:556,aring:556,Ncommaaccent:722,lacute:278,agrave:556,Tcommaaccent:611,Cacute:722,atilde:556,Edotaccent:667,scaron:556,scedilla:556,iacute:278,lozenge:494,Rcaron:722,Gcommaaccent:778,ucircumflex:611,acircumflex:556,Amacron:722,rcaron:389,ccedilla:556,Zdotaccent:611,Thorn:667,Omacron:778,Racute:722,Sacute:667,dcaron:743,Umacron:722,uring:611,threesuperior:333,Ograve:778,Agrave:722,Abreve:722,multiply:584,uacute:611,Tcaron:611,partialdiff:494,ydieresis:556,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:556,edieresis:556,cacute:556,nacute:611,umacron:611,Ncaron:722,Iacute:278,plusminus:584,brokenbar:280,registered:737,Gbreve:778,Idotaccent:278,summation:600,Egrave:667,racute:389,omacron:611,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:722,lcommaaccent:278,tcaron:389,eogonek:556,Uogonek:722,Aacute:722,Adieresis:722,egrave:556,zacute:500,iogonek:278,Oacute:778,oacute:611,amacron:556,sacute:556,idieresis:278,Ocircumflex:778,Ugrave:722,Delta:612,thorn:611,twosuperior:333,Odieresis:778,mu:611,igrave:278,ohungarumlaut:611,Eogonek:667,dcroat:611,threequarters:834,Scedilla:667,lcaron:400,Kcommaaccent:722,Lacute:611,trademark:1e3,edotaccent:556,Igrave:278,Imacron:278,Lcaron:611,onehalf:834,lessequal:549,ocircumflex:611,ntilde:611,Uhungarumlaut:722,Eacute:667,emacron:556,gbreve:611,onequarter:834,Scaron:667,Scommaaccent:667,Ohungarumlaut:778,degree:400,ograve:611,Ccaron:722,ugrave:611,radical:549,Dcaron:722,rcommaaccent:389,Ntilde:722,otilde:611,Rcommaaccent:722,Lcommaaccent:611,Atilde:722,Aogonek:722,Aring:722,Otilde:778,zdotaccent:500,Ecaron:667,Iogonek:278,kcommaaccent:556,minus:584,Icircumflex:278,ncaron:611,tcommaaccent:333,logicalnot:584,odieresis:611,udieresis:611,notequal:549,gcommaaccent:611,eth:611,zcaron:500,ncommaaccent:611,onesuperior:333,imacron:278,Euro:556},"Helvetica-BoldOblique":{space:278,exclam:333,quotedbl:474,numbersign:556,dollar:556,percent:889,ampersand:722,quoteright:278,parenleft:333,parenright:333,asterisk:389,plus:584,comma:278,hyphen:333,period:278,slash:278,zero:556,one:556,two:556,three:556,four:556,five:556,six:556,seven:556,eight:556,nine:556,colon:333,semicolon:333,less:584,equal:584,greater:584,question:611,at:975,A:722,B:722,C:722,D:722,E:667,F:611,G:778,H:722,I:278,J:556,K:722,L:611,M:833,N:722,O:778,P:667,Q:778,R:722,S:667,T:611,U:722,V:667,W:944,X:667,Y:667,Z:611,bracketleft:333,backslash:278,bracketright:333,asciicircum:584,underscore:556,quoteleft:278,a:556,b:611,c:556,d:611,e:556,f:333,g:611,h:611,i:278,j:278,k:556,l:278,m:889,n:611,o:611,p:611,q:611,r:389,s:556,t:333,u:611,v:556,w:778,x:556,y:556,z:500,braceleft:389,bar:280,braceright:389,asciitilde:584,exclamdown:333,cent:556,sterling:556,fraction:167,yen:556,florin:556,section:556,currency:556,quotesingle:238,quotedblleft:500,guillemotleft:556,guilsinglleft:333,guilsinglright:333,fi:611,fl:611,endash:556,dagger:556,daggerdbl:556,periodcentered:278,paragraph:556,bullet:350,quotesinglbase:278,quotedblbase:500,quotedblright:500,guillemotright:556,ellipsis:1e3,perthousand:1e3,questiondown:611,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:1e3,ordfeminine:370,Lslash:611,Oslash:778,OE:1e3,ordmasculine:365,ae:889,dotlessi:278,lslash:278,oslash:611,oe:944,germandbls:611,Idieresis:278,eacute:556,abreve:556,uhungarumlaut:611,ecaron:556,Ydieresis:667,divide:584,Yacute:667,Acircumflex:722,aacute:556,Ucircumflex:722,yacute:556,scommaaccent:556,ecircumflex:556,Uring:722,Udieresis:722,aogonek:556,Uacute:722,uogonek:611,Edieresis:667,Dcroat:722,commaaccent:250,copyright:737,Emacron:667,ccaron:556,aring:556,Ncommaaccent:722,lacute:278,agrave:556,Tcommaaccent:611,Cacute:722,atilde:556,Edotaccent:667,scaron:556,scedilla:556,iacute:278,lozenge:494,Rcaron:722,Gcommaaccent:778,ucircumflex:611,acircumflex:556,Amacron:722,rcaron:389,ccedilla:556,Zdotaccent:611,Thorn:667,Omacron:778,Racute:722,Sacute:667,dcaron:743,Umacron:722,uring:611,threesuperior:333,Ograve:778,Agrave:722,Abreve:722,multiply:584,uacute:611,Tcaron:611,partialdiff:494,ydieresis:556,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:556,edieresis:556,cacute:556,nacute:611,umacron:611,Ncaron:722,Iacute:278,plusminus:584,brokenbar:280,registered:737,Gbreve:778,Idotaccent:278,summation:600,Egrave:667,racute:389,omacron:611,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:722,lcommaaccent:278,tcaron:389,eogonek:556,Uogonek:722,Aacute:722,Adieresis:722,egrave:556,zacute:500,iogonek:278,Oacute:778,oacute:611,amacron:556,sacute:556,idieresis:278,Ocircumflex:778,Ugrave:722,Delta:612,thorn:611,twosuperior:333,Odieresis:778,mu:611,igrave:278,ohungarumlaut:611,Eogonek:667,dcroat:611,threequarters:834,Scedilla:667,lcaron:400,Kcommaaccent:722,Lacute:611,trademark:1e3,edotaccent:556,Igrave:278,Imacron:278,Lcaron:611,onehalf:834,lessequal:549,ocircumflex:611,ntilde:611,Uhungarumlaut:722,Eacute:667,emacron:556,gbreve:611,onequarter:834,Scaron:667,Scommaaccent:667,Ohungarumlaut:778,degree:400,ograve:611,Ccaron:722,ugrave:611,radical:549,Dcaron:722,rcommaaccent:389,Ntilde:722,otilde:611,Rcommaaccent:722,Lcommaaccent:611,Atilde:722,Aogonek:722,Aring:722,Otilde:778,zdotaccent:500,Ecaron:667,Iogonek:278,kcommaaccent:556,minus:584,Icircumflex:278,ncaron:611,tcommaaccent:333,logicalnot:584,odieresis:611,udieresis:611,notequal:549,gcommaaccent:611,eth:611,zcaron:500,ncommaaccent:611,onesuperior:333,imacron:278,Euro:556},"Helvetica-Oblique":{space:278,exclam:278,quotedbl:355,numbersign:556,dollar:556,percent:889,ampersand:667,quoteright:222,parenleft:333,parenright:333,asterisk:389,plus:584,comma:278,hyphen:333,period:278,slash:278,zero:556,one:556,two:556,three:556,four:556,five:556,six:556,seven:556,eight:556,nine:556,colon:278,semicolon:278,less:584,equal:584,greater:584,question:556,at:1015,A:667,B:667,C:722,D:722,E:667,F:611,G:778,H:722,I:278,J:500,K:667,L:556,M:833,N:722,O:778,P:667,Q:778,R:722,S:667,T:611,U:722,V:667,W:944,X:667,Y:667,Z:611,bracketleft:278,backslash:278,bracketright:278,asciicircum:469,underscore:556,quoteleft:222,a:556,b:556,c:500,d:556,e:556,f:278,g:556,h:556,i:222,j:222,k:500,l:222,m:833,n:556,o:556,p:556,q:556,r:333,s:500,t:278,u:556,v:500,w:722,x:500,y:500,z:500,braceleft:334,bar:260,braceright:334,asciitilde:584,exclamdown:333,cent:556,sterling:556,fraction:167,yen:556,florin:556,section:556,currency:556,quotesingle:191,quotedblleft:333,guillemotleft:556,guilsinglleft:333,guilsinglright:333,fi:500,fl:500,endash:556,dagger:556,daggerdbl:556,periodcentered:278,paragraph:537,bullet:350,quotesinglbase:222,quotedblbase:333,quotedblright:333,guillemotright:556,ellipsis:1e3,perthousand:1e3,questiondown:611,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:1e3,ordfeminine:370,Lslash:556,Oslash:778,OE:1e3,ordmasculine:365,ae:889,dotlessi:278,lslash:222,oslash:611,oe:944,germandbls:611,Idieresis:278,eacute:556,abreve:556,uhungarumlaut:556,ecaron:556,Ydieresis:667,divide:584,Yacute:667,Acircumflex:667,aacute:556,Ucircumflex:722,yacute:500,scommaaccent:500,ecircumflex:556,Uring:722,Udieresis:722,aogonek:556,Uacute:722,uogonek:556,Edieresis:667,Dcroat:722,commaaccent:250,copyright:737,Emacron:667,ccaron:500,aring:556,Ncommaaccent:722,lacute:222,agrave:556,Tcommaaccent:611,Cacute:722,atilde:556,Edotaccent:667,scaron:500,scedilla:500,iacute:278,lozenge:471,Rcaron:722,Gcommaaccent:778,ucircumflex:556,acircumflex:556,Amacron:667,rcaron:333,ccedilla:500,Zdotaccent:611,Thorn:667,Omacron:778,Racute:722,Sacute:667,dcaron:643,Umacron:722,uring:556,threesuperior:333,Ograve:778,Agrave:667,Abreve:667,multiply:584,uacute:556,Tcaron:611,partialdiff:476,ydieresis:500,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:556,edieresis:556,cacute:500,nacute:556,umacron:556,Ncaron:722,Iacute:278,plusminus:584,brokenbar:260,registered:737,Gbreve:778,Idotaccent:278,summation:600,Egrave:667,racute:333,omacron:556,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:722,lcommaaccent:222,tcaron:317,eogonek:556,Uogonek:722,Aacute:667,Adieresis:667,egrave:556,zacute:500,iogonek:222,Oacute:778,oacute:556,amacron:556,sacute:500,idieresis:278,Ocircumflex:778,Ugrave:722,Delta:612,thorn:556,twosuperior:333,Odieresis:778,mu:556,igrave:278,ohungarumlaut:556,Eogonek:667,dcroat:556,threequarters:834,Scedilla:667,lcaron:299,Kcommaaccent:667,Lacute:556,trademark:1e3,edotaccent:556,Igrave:278,Imacron:278,Lcaron:556, -onehalf:834,lessequal:549,ocircumflex:556,ntilde:556,Uhungarumlaut:722,Eacute:667,emacron:556,gbreve:556,onequarter:834,Scaron:667,Scommaaccent:667,Ohungarumlaut:778,degree:400,ograve:556,Ccaron:722,ugrave:556,radical:453,Dcaron:722,rcommaaccent:333,Ntilde:722,otilde:556,Rcommaaccent:722,Lcommaaccent:556,Atilde:667,Aogonek:667,Aring:667,Otilde:778,zdotaccent:500,Ecaron:667,Iogonek:278,kcommaaccent:500,minus:584,Icircumflex:278,ncaron:556,tcommaaccent:278,logicalnot:584,odieresis:556,udieresis:556,notequal:549,gcommaaccent:556,eth:556,zcaron:500,ncommaaccent:556,onesuperior:333,imacron:278,Euro:556},Symbol:{space:250,exclam:333,universal:713,numbersign:500,existential:549,percent:833,ampersand:778,suchthat:439,parenleft:333,parenright:333,asteriskmath:500,plus:549,comma:250,minus:549,period:250,slash:278,zero:500,one:500,two:500,three:500,four:500,five:500,six:500,seven:500,eight:500,nine:500,colon:278,semicolon:278,less:549,equal:549,greater:549,question:444,congruent:549,Alpha:722,Beta:667,Chi:722,Delta:612,Epsilon:611,Phi:763,Gamma:603,Eta:722,Iota:333,theta1:631,Kappa:722,Lambda:686,Mu:889,Nu:722,Omicron:722,Pi:768,Theta:741,Rho:556,Sigma:592,Tau:611,Upsilon:690,sigma1:439,Omega:768,Xi:645,Psi:795,Zeta:611,bracketleft:333,therefore:863,bracketright:333,perpendicular:658,underscore:500,radicalex:500,alpha:631,beta:549,chi:549,delta:494,epsilon:439,phi:521,gamma:411,eta:603,iota:329,phi1:603,kappa:549,lambda:549,mu:576,nu:521,omicron:549,pi:549,theta:521,rho:549,sigma:603,tau:439,upsilon:576,omega1:713,omega:686,xi:493,psi:686,zeta:494,braceleft:480,bar:200,braceright:480,similar:549,Euro:750,Upsilon1:620,minute:247,lessequal:549,fraction:167,infinity:713,florin:500,club:753,diamond:753,heart:753,spade:753,arrowboth:1042,arrowleft:987,arrowup:603,arrowright:987,arrowdown:603,degree:400,plusminus:549,second:411,greaterequal:549,multiply:549,proportional:713,partialdiff:494,bullet:460,divide:549,notequal:549,equivalence:549,approxequal:549,ellipsis:1e3,arrowvertex:603,arrowhorizex:1e3,carriagereturn:658,aleph:823,Ifraktur:686,Rfraktur:795,weierstrass:987,circlemultiply:768,circleplus:768,emptyset:823,intersection:768,union:768,propersuperset:713,reflexsuperset:713,notsubset:713,propersubset:713,reflexsubset:713,element:713,notelement:713,angle:768,gradient:713,registerserif:790,copyrightserif:790,trademarkserif:890,product:823,radical:549,dotmath:250,logicalnot:713,logicaland:603,logicalor:603,arrowdblboth:1042,arrowdblleft:987,arrowdblup:603,arrowdblright:987,arrowdbldown:603,lozenge:494,angleleft:329,registersans:790,copyrightsans:790,trademarksans:786,summation:713,parenlefttp:384,parenleftex:384,parenleftbt:384,bracketlefttp:384,bracketleftex:384,bracketleftbt:384,bracelefttp:494,braceleftmid:494,braceleftbt:494,braceex:494,angleright:329,integral:274,integraltp:686,integralex:686,integralbt:686,parenrighttp:384,parenrightex:384,parenrightbt:384,bracketrighttp:384,bracketrightex:384,bracketrightbt:384,bracerighttp:494,bracerightmid:494,bracerightbt:494,apple:790},"Times-Roman":{space:250,exclam:333,quotedbl:408,numbersign:500,dollar:500,percent:833,ampersand:778,quoteright:333,parenleft:333,parenright:333,asterisk:500,plus:564,comma:250,hyphen:333,period:250,slash:278,zero:500,one:500,two:500,three:500,four:500,five:500,six:500,seven:500,eight:500,nine:500,colon:278,semicolon:278,less:564,equal:564,greater:564,question:444,at:921,A:722,B:667,C:667,D:722,E:611,F:556,G:722,H:722,I:333,J:389,K:722,L:611,M:889,N:722,O:722,P:556,Q:722,R:667,S:556,T:611,U:722,V:722,W:944,X:722,Y:722,Z:611,bracketleft:333,backslash:278,bracketright:333,asciicircum:469,underscore:500,quoteleft:333,a:444,b:500,c:444,d:500,e:444,f:333,g:500,h:500,i:278,j:278,k:500,l:278,m:778,n:500,o:500,p:500,q:500,r:333,s:389,t:278,u:500,v:500,w:722,x:500,y:500,z:444,braceleft:480,bar:200,braceright:480,asciitilde:541,exclamdown:333,cent:500,sterling:500,fraction:167,yen:500,florin:500,section:500,currency:500,quotesingle:180,quotedblleft:444,guillemotleft:500,guilsinglleft:333,guilsinglright:333,fi:556,fl:556,endash:500,dagger:500,daggerdbl:500,periodcentered:250,paragraph:453,bullet:350,quotesinglbase:333,quotedblbase:444,quotedblright:444,guillemotright:500,ellipsis:1e3,perthousand:1e3,questiondown:444,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:889,ordfeminine:276,Lslash:611,Oslash:722,OE:889,ordmasculine:310,ae:667,dotlessi:278,lslash:278,oslash:500,oe:722,germandbls:500,Idieresis:333,eacute:444,abreve:444,uhungarumlaut:500,ecaron:444,Ydieresis:722,divide:564,Yacute:722,Acircumflex:722,aacute:444,Ucircumflex:722,yacute:500,scommaaccent:389,ecircumflex:444,Uring:722,Udieresis:722,aogonek:444,Uacute:722,uogonek:500,Edieresis:611,Dcroat:722,commaaccent:250,copyright:760,Emacron:611,ccaron:444,aring:444,Ncommaaccent:722,lacute:278,agrave:444,Tcommaaccent:611,Cacute:667,atilde:444,Edotaccent:611,scaron:389,scedilla:389,iacute:278,lozenge:471,Rcaron:667,Gcommaaccent:722,ucircumflex:500,acircumflex:444,Amacron:722,rcaron:333,ccedilla:444,Zdotaccent:611,Thorn:556,Omacron:722,Racute:667,Sacute:556,dcaron:588,Umacron:722,uring:500,threesuperior:300,Ograve:722,Agrave:722,Abreve:722,multiply:564,uacute:500,Tcaron:611,partialdiff:476,ydieresis:500,Nacute:722,icircumflex:278,Ecircumflex:611,adieresis:444,edieresis:444,cacute:444,nacute:500,umacron:500,Ncaron:722,Iacute:333,plusminus:564,brokenbar:200,registered:760,Gbreve:722,Idotaccent:333,summation:600,Egrave:611,racute:333,omacron:500,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:667,lcommaaccent:278,tcaron:326,eogonek:444,Uogonek:722,Aacute:722,Adieresis:722,egrave:444,zacute:444,iogonek:278,Oacute:722,oacute:500,amacron:444,sacute:389,idieresis:278,Ocircumflex:722,Ugrave:722,Delta:612,thorn:500,twosuperior:300,Odieresis:722,mu:500,igrave:278,ohungarumlaut:500,Eogonek:611,dcroat:500,threequarters:750,Scedilla:556,lcaron:344,Kcommaaccent:722,Lacute:611,trademark:980,edotaccent:444,Igrave:333,Imacron:333,Lcaron:611,onehalf:750,lessequal:549,ocircumflex:500,ntilde:500,Uhungarumlaut:722,Eacute:611,emacron:444,gbreve:500,onequarter:750,Scaron:556,Scommaaccent:556,Ohungarumlaut:722,degree:400,ograve:500,Ccaron:667,ugrave:500,radical:453,Dcaron:722,rcommaaccent:333,Ntilde:722,otilde:500,Rcommaaccent:667,Lcommaaccent:611,Atilde:722,Aogonek:722,Aring:722,Otilde:722,zdotaccent:444,Ecaron:611,Iogonek:333,kcommaaccent:500,minus:564,Icircumflex:333,ncaron:500,tcommaaccent:278,logicalnot:564,odieresis:500,udieresis:500,notequal:549,gcommaaccent:500,eth:500,zcaron:444,ncommaaccent:500,onesuperior:300,imacron:278,Euro:500},"Times-Bold":{space:250,exclam:333,quotedbl:555,numbersign:500,dollar:500,percent:1e3,ampersand:833,quoteright:333,parenleft:333,parenright:333,asterisk:500,plus:570,comma:250,hyphen:333,period:250,slash:278,zero:500,one:500,two:500,three:500,four:500,five:500,six:500,seven:500,eight:500,nine:500,colon:333,semicolon:333,less:570,equal:570,greater:570,question:500,at:930,A:722,B:667,C:722,D:722,E:667,F:611,G:778,H:778,I:389,J:500,K:778,L:667,M:944,N:722,O:778,P:611,Q:778,R:722,S:556,T:667,U:722,V:722,W:1e3,X:722,Y:722,Z:667,bracketleft:333,backslash:278,bracketright:333,asciicircum:581,underscore:500,quoteleft:333,a:500,b:556,c:444,d:556,e:444,f:333,g:500,h:556,i:278,j:333,k:556,l:278,m:833,n:556,o:500,p:556,q:556,r:444,s:389,t:333,u:556,v:500,w:722,x:500,y:500,z:444,braceleft:394,bar:220,braceright:394,asciitilde:520,exclamdown:333,cent:500,sterling:500,fraction:167,yen:500,florin:500,section:500,currency:500,quotesingle:278,quotedblleft:500,guillemotleft:500,guilsinglleft:333,guilsinglright:333,fi:556,fl:556,endash:500,dagger:500,daggerdbl:500,periodcentered:250,paragraph:540,bullet:350,quotesinglbase:333,quotedblbase:500,quotedblright:500,guillemotright:500,ellipsis:1e3,perthousand:1e3,questiondown:500,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:1e3,ordfeminine:300,Lslash:667,Oslash:778,OE:1e3,ordmasculine:330,ae:722,dotlessi:278,lslash:278,oslash:500,oe:722,germandbls:556,Idieresis:389,eacute:444,abreve:500,uhungarumlaut:556,ecaron:444,Ydieresis:722,divide:570,Yacute:722,Acircumflex:722,aacute:500,Ucircumflex:722,yacute:500,scommaaccent:389,ecircumflex:444,Uring:722,Udieresis:722,aogonek:500,Uacute:722,uogonek:556,Edieresis:667,Dcroat:722,commaaccent:250,copyright:747,Emacron:667,ccaron:444,aring:500,Ncommaaccent:722,lacute:278,agrave:500,Tcommaaccent:667,Cacute:722,atilde:500,Edotaccent:667,scaron:389,scedilla:389,iacute:278,lozenge:494,Rcaron:722,Gcommaaccent:778,ucircumflex:556,acircumflex:500,Amacron:722,rcaron:444,ccedilla:444,Zdotaccent:667,Thorn:611,Omacron:778,Racute:722,Sacute:556,dcaron:672,Umacron:722,uring:556,threesuperior:300,Ograve:778,Agrave:722,Abreve:722,multiply:570,uacute:556,Tcaron:667,partialdiff:494,ydieresis:500,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:500,edieresis:444,cacute:444,nacute:556,umacron:556,Ncaron:722,Iacute:389,plusminus:570,brokenbar:220,registered:747,Gbreve:778,Idotaccent:389,summation:600,Egrave:667,racute:444,omacron:500,Zacute:667,Zcaron:667,greaterequal:549,Eth:722,Ccedilla:722,lcommaaccent:278,tcaron:416,eogonek:444,Uogonek:722,Aacute:722,Adieresis:722,egrave:444,zacute:444,iogonek:278,Oacute:778,oacute:500,amacron:500,sacute:389,idieresis:278,Ocircumflex:778,Ugrave:722,Delta:612,thorn:556,twosuperior:300,Odieresis:778,mu:556,igrave:278,ohungarumlaut:500,Eogonek:667,dcroat:556,threequarters:750,Scedilla:556,lcaron:394,Kcommaaccent:778,Lacute:667,trademark:1e3,edotaccent:444,Igrave:389,Imacron:389,Lcaron:667,onehalf:750,lessequal:549,ocircumflex:500,ntilde:556,Uhungarumlaut:722,Eacute:667,emacron:444,gbreve:500,onequarter:750,Scaron:556,Scommaaccent:556,Ohungarumlaut:778,degree:400,ograve:500,Ccaron:722,ugrave:556,radical:549,Dcaron:722,rcommaaccent:444,Ntilde:722,otilde:500,Rcommaaccent:722,Lcommaaccent:667,Atilde:722,Aogonek:722,Aring:722,Otilde:778,zdotaccent:444,Ecaron:667,Iogonek:389,kcommaaccent:556,minus:570,Icircumflex:389,ncaron:556,tcommaaccent:333,logicalnot:570,odieresis:500,udieresis:556,notequal:549,gcommaaccent:500,eth:500,zcaron:444,ncommaaccent:556,onesuperior:300,imacron:278,Euro:500},"Times-BoldItalic":{space:250,exclam:389,quotedbl:555,numbersign:500,dollar:500,percent:833,ampersand:778,quoteright:333,parenleft:333,parenright:333,asterisk:500,plus:570,comma:250,hyphen:333,period:250,slash:278,zero:500,one:500,two:500,three:500,four:500,five:500,six:500,seven:500,eight:500,nine:500,colon:333,semicolon:333,less:570,equal:570,greater:570,question:500,at:832,A:667,B:667,C:667,D:722,E:667,F:667,G:722,H:778,I:389,J:500,K:667,L:611,M:889,N:722,O:722,P:611,Q:722,R:667,S:556,T:611,U:722,V:667,W:889,X:667,Y:611,Z:611,bracketleft:333,backslash:278,bracketright:333,asciicircum:570,underscore:500,quoteleft:333,a:500,b:500,c:444,d:500,e:444,f:333,g:500,h:556,i:278,j:278,k:500,l:278,m:778,n:556,o:500,p:500,q:500,r:389,s:389,t:278,u:556,v:444,w:667,x:500,y:444,z:389,braceleft:348,bar:220,braceright:348,asciitilde:570,exclamdown:389,cent:500,sterling:500,fraction:167,yen:500,florin:500,section:500,currency:500,quotesingle:278,quotedblleft:500,guillemotleft:500,guilsinglleft:333,guilsinglright:333,fi:556,fl:556,endash:500,dagger:500,daggerdbl:500,periodcentered:250,paragraph:500,bullet:350,quotesinglbase:333,quotedblbase:500,quotedblright:500,guillemotright:500,ellipsis:1e3,perthousand:1e3,questiondown:500,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:1e3,AE:944,ordfeminine:266,Lslash:611,Oslash:722,OE:944,ordmasculine:300,ae:722,dotlessi:278,lslash:278,oslash:500,oe:722,germandbls:500,Idieresis:389,eacute:444,abreve:500,uhungarumlaut:556,ecaron:444,Ydieresis:611,divide:570,Yacute:611,Acircumflex:667,aacute:500,Ucircumflex:722,yacute:444,scommaaccent:389,ecircumflex:444,Uring:722,Udieresis:722,aogonek:500,Uacute:722,uogonek:556,Edieresis:667,Dcroat:722,commaaccent:250,copyright:747,Emacron:667,ccaron:444,aring:500,Ncommaaccent:722,lacute:278,agrave:500,Tcommaaccent:611,Cacute:667,atilde:500,Edotaccent:667,scaron:389,scedilla:389,iacute:278,lozenge:494,Rcaron:667,Gcommaaccent:722,ucircumflex:556,acircumflex:500,Amacron:667,rcaron:389,ccedilla:444,Zdotaccent:611,Thorn:611,Omacron:722,Racute:667,Sacute:556,dcaron:608,Umacron:722,uring:556,threesuperior:300,Ograve:722,Agrave:667,Abreve:667,multiply:570,uacute:556,Tcaron:611,partialdiff:494,ydieresis:444,Nacute:722,icircumflex:278,Ecircumflex:667,adieresis:500,edieresis:444,cacute:444,nacute:556,umacron:556,Ncaron:722,Iacute:389,plusminus:570,brokenbar:220,registered:747,Gbreve:722,Idotaccent:389,summation:600,Egrave:667,racute:389,omacron:500,Zacute:611,Zcaron:611,greaterequal:549,Eth:722,Ccedilla:667,lcommaaccent:278,tcaron:366,eogonek:444,Uogonek:722,Aacute:667,Adieresis:667,egrave:444,zacute:389,iogonek:278,Oacute:722,oacute:500,amacron:500,sacute:389,idieresis:278,Ocircumflex:722,Ugrave:722,Delta:612,thorn:500,twosuperior:300,Odieresis:722,mu:576,igrave:278,ohungarumlaut:500,Eogonek:667,dcroat:500,threequarters:750,Scedilla:556,lcaron:382,Kcommaaccent:667,Lacute:611,trademark:1e3,edotaccent:444,Igrave:389,Imacron:389,Lcaron:611,onehalf:750,lessequal:549,ocircumflex:500,ntilde:556,Uhungarumlaut:722,Eacute:667,emacron:444,gbreve:500,onequarter:750,Scaron:556,Scommaaccent:556,Ohungarumlaut:722,degree:400,ograve:500,Ccaron:667,ugrave:556,radical:549,Dcaron:722,rcommaaccent:389,Ntilde:722,otilde:500,Rcommaaccent:667,Lcommaaccent:611,Atilde:667,Aogonek:667,Aring:667,Otilde:722,zdotaccent:389,Ecaron:667,Iogonek:389,kcommaaccent:500,minus:606,Icircumflex:389,ncaron:556,tcommaaccent:278,logicalnot:606,odieresis:500,udieresis:556,notequal:549,gcommaaccent:500,eth:500,zcaron:389,ncommaaccent:556,onesuperior:300,imacron:278,Euro:500},"Times-Italic":{space:250,exclam:333,quotedbl:420,numbersign:500,dollar:500,percent:833,ampersand:778,quoteright:333,parenleft:333,parenright:333,asterisk:500,plus:675,comma:250,hyphen:333,period:250,slash:278,zero:500,one:500,two:500,three:500,four:500,five:500,six:500,seven:500,eight:500,nine:500,colon:333,semicolon:333,less:675,equal:675,greater:675,question:500,at:920,A:611,B:611,C:667,D:722,E:611,F:611,G:722,H:722,I:333,J:444,K:667,L:556,M:833,N:667,O:722,P:611,Q:722,R:611,S:500,T:556,U:722,V:611,W:833,X:611,Y:556,Z:556,bracketleft:389,backslash:278,bracketright:389,asciicircum:422,underscore:500,quoteleft:333,a:500,b:500,c:444,d:500,e:444,f:278,g:500,h:500,i:278,j:278,k:444,l:278,m:722,n:500,o:500,p:500,q:500,r:389,s:389,t:278,u:500,v:444,w:667,x:444,y:444,z:389,braceleft:400,bar:275,braceright:400,asciitilde:541,exclamdown:389,cent:500,sterling:500,fraction:167,yen:500,florin:500,section:500,currency:500,quotesingle:214,quotedblleft:556,guillemotleft:500,guilsinglleft:333,guilsinglright:333,fi:500,fl:500,endash:500,dagger:500,daggerdbl:500,periodcentered:250,paragraph:523,bullet:350,quotesinglbase:333,quotedblbase:556,quotedblright:556,guillemotright:500,ellipsis:889,perthousand:1e3,questiondown:500,grave:333,acute:333,circumflex:333,tilde:333,macron:333,breve:333,dotaccent:333,dieresis:333,ring:333,cedilla:333,hungarumlaut:333,ogonek:333,caron:333,emdash:889,AE:889,ordfeminine:276,Lslash:556,Oslash:722,OE:944,ordmasculine:310,ae:667,dotlessi:278,lslash:278,oslash:500,oe:667,germandbls:500,Idieresis:333,eacute:444,abreve:500,uhungarumlaut:500,ecaron:444,Ydieresis:556,divide:675,Yacute:556,Acircumflex:611,aacute:500,Ucircumflex:722,yacute:444,scommaaccent:389,ecircumflex:444,Uring:722,Udieresis:722,aogonek:500,Uacute:722,uogonek:500,Edieresis:611,Dcroat:722,commaaccent:250,copyright:760,Emacron:611,ccaron:444,aring:500,Ncommaaccent:667,lacute:278,agrave:500,Tcommaaccent:556,Cacute:667,atilde:500,Edotaccent:611,scaron:389,scedilla:389,iacute:278,lozenge:471,Rcaron:611,Gcommaaccent:722,ucircumflex:500,acircumflex:500,Amacron:611,rcaron:389,ccedilla:444,Zdotaccent:556,Thorn:611,Omacron:722,Racute:611,Sacute:500,dcaron:544,Umacron:722,uring:500,threesuperior:300,Ograve:722,Agrave:611,Abreve:611,multiply:675,uacute:500,Tcaron:556,partialdiff:476,ydieresis:444,Nacute:667,icircumflex:278,Ecircumflex:611,adieresis:500,edieresis:444,cacute:444,nacute:500,umacron:500,Ncaron:667,Iacute:333,plusminus:675,brokenbar:275,registered:760,Gbreve:722,Idotaccent:333,summation:600,Egrave:611,racute:389,omacron:500,Zacute:556,Zcaron:556,greaterequal:549,Eth:722,Ccedilla:667,lcommaaccent:278,tcaron:300,eogonek:444,Uogonek:722,Aacute:611,Adieresis:611,egrave:444,zacute:389,iogonek:278,Oacute:722,oacute:500,amacron:500,sacute:389,idieresis:278,Ocircumflex:722,Ugrave:722,Delta:612,thorn:500,twosuperior:300,Odieresis:722,mu:500,igrave:278,ohungarumlaut:500,Eogonek:611,dcroat:500,threequarters:750,Scedilla:500,lcaron:300,Kcommaaccent:667,Lacute:556,trademark:980,edotaccent:444,Igrave:333,Imacron:333,Lcaron:611,onehalf:750,lessequal:549,ocircumflex:500,ntilde:500,Uhungarumlaut:722,Eacute:611,emacron:444,gbreve:500,onequarter:750,Scaron:500,Scommaaccent:500,Ohungarumlaut:722,degree:400,ograve:500,Ccaron:667,ugrave:500,radical:453,Dcaron:722,rcommaaccent:389,Ntilde:667,otilde:500,Rcommaaccent:611,Lcommaaccent:556,Atilde:611,Aogonek:611,Aring:611,Otilde:722,zdotaccent:389,Ecaron:611,Iogonek:333,kcommaaccent:444,minus:675,Icircumflex:333,ncaron:500,tcommaaccent:278,logicalnot:675,odieresis:500,udieresis:500,notequal:549,gcommaaccent:500,eth:500,zcaron:389,ncommaaccent:500,onesuperior:300,imacron:278,Euro:500},ZapfDingbats:{space:278,a1:974,a2:961,a202:974,a3:980,a4:719,a5:789,a119:790,a118:791,a117:690,a11:960,a12:939,a13:549,a14:855,a15:911,a16:933,a105:911,a17:945,a18:974,a19:755,a20:846,a21:762,a22:761,a23:571,a24:677,a25:763,a26:760,a27:759,a28:754,a6:494,a7:552,a8:537,a9:577,a10:692,a29:786,a30:788,a31:788,a32:790,a33:793,a34:794,a35:816,a36:823,a37:789,a38:841,a39:823,a40:833,a41:816,a42:831,a43:923,a44:744,a45:723,a46:749,a47:790,a48:792,a49:695,a50:776,a51:768,a52:792,a53:759,a54:707,a55:708,a56:682,a57:701,a58:826,a59:815,a60:789,a61:789,a62:707,a63:687,a64:696,a65:689,a66:786,a67:787,a68:713,a69:791,a70:785,a71:791,a72:873,a73:761,a74:762,a203:762,a75:759,a204:759,a76:892,a77:892,a78:788,a79:784,a81:438,a82:138,a83:277,a84:415,a97:392,a98:392,a99:668,a100:668,a89:390,a90:390,a93:317,a94:317,a91:276,a92:276,a205:509,a85:509,a206:410,a86:410,a87:234,a88:234,a95:334,a96:334,a101:732,a102:544,a103:544,a104:910,a106:667,a107:760,a108:760,a112:776,a111:595,a110:694,a109:626,a120:788,a121:788,a122:788,a123:788,a124:788,a125:788,a126:788,a127:788,a128:788,a129:788,a130:788,a131:788,a132:788,a133:788,a134:788,a135:788,a136:788,a137:788,a138:788,a139:788,a140:788,a141:788,a142:788,a143:788,a144:788,a145:788,a146:788,a147:788,a148:788,a149:788,a150:788,a151:788,a152:788,a153:788,a154:788,a155:788,a156:788,a157:788,a158:788,a159:788,a160:894,a161:838,a163:1016,a164:458,a196:748,a165:924,a192:748,a166:918,a167:927,a168:928,a169:928,a170:834,a171:873,a172:828,a173:924,a162:924,a174:917,a175:930,a176:931,a177:463,a178:883,a179:836,a193:836,a180:867,a199:867,a181:696,a200:696,a182:874,a201:874,a183:760,a184:946,a197:771,a185:865,a194:771,a198:888,a186:967,a195:888,a187:831,a188:873,a189:927,a190:970,a191:918}},Dc={},Ec=1e3,Fc=function(){function d(a,b,c){this.lexer=a,this.allowStreams=b,this.xref=c,this.imageCache={},this.refill()}return d.prototype={refill:function(){this.buf1=this.lexer.getObj(),this.buf2=this.lexer.getObj()},shift:function(){A(this.buf2,"ID")?(this.buf1=this.buf2,this.buf2=null):(this.buf1=this.buf2,this.buf2=this.lexer.getObj())},tryShift:function(){try{return this.shift(),!0}catch(a){if(a instanceof ja)throw a;return!1}},getObj:function(b){var d=this.buf1;if(this.shift(),d instanceof za)switch(d.cmd){case"BI":return this.makeInlineImage(b);case"[":for(var e=[];!A(this.buf1,"]")&&!R(this.buf1);)e.push(this.getObj(b));return R(this.buf1)&&c("End of file inside array"),this.shift(),e;case"<<":for(var f=new Aa(this.xref);!A(this.buf1,">>")&&!R(this.buf1);)if(z(this.buf1)){var g=this.buf1.name;if(this.shift(),R(this.buf1))break;f.set(g,this.getObj(b))}else a("Malformed dictionary: key must be a name object"),this.shift();return R(this.buf1)&&c("End of file inside dictionary"),A(this.buf2,"stream")?this.allowStreams?this.makeStream(f,b):f:(this.shift(),f);default:return d}if(w(d)){var h=d;if(w(this.buf1)&&A(this.buf2,"R")){var i=new Ba(h,this.buf1);return this.shift(),this.shift(),i}return h}if(y(d)){var j=d;return b&&(j=b.decryptString(j)),j}return d},findDefaultInlineStreamEnd:function(a){for(var b,c,d,f,g=69,h=73,i=32,j=10,k=13,l=a.pos,m=0;-1!==(b=a.getByte());)if(0===m)m=b===g?1:0;else if(1===m)m=b===h?2:0;else if(e(2===m),b===i||b===j||b===k){for(d=5,f=a.peekBytes(d),c=0;d>c;c++)if(b=f[c],b!==j&&b!==k&&(i>b||b>127)){m=0;break}if(2===m)break}else m=0;return a.pos-4-l},findDCTDecodeInlineStreamEnd:function(a){for(var c,d,e,f=a.pos,g=!1;-1!==(c=a.getByte());)if(255===c){switch(a.getByte()){case 0:break;case 255:a.skip(-1);break;case 217:g=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case 219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:d=a.getUint16(),d>2?a.skip(d-2):a.skip(-2)}if(g)break}return e=a.pos-f,-1===c?(b("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead."),a.skip(-e),this.findDefaultInlineStreamEnd(a)):(this.inlineStreamSkipEI(a),e)},findASCII85DecodeInlineStreamEnd:function(a){for(var c,d,e=126,f=62,g=a.pos;-1!==(c=a.getByte());)if(c===e&&a.peekByte()===f){a.skip();break}return d=a.pos-g,-1===c?(b("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead."),a.skip(-d),this.findDefaultInlineStreamEnd(a)):(this.inlineStreamSkipEI(a),d)},findASCIIHexDecodeInlineStreamEnd:function(a){for(var c,d,e=62,f=a.pos;-1!==(c=a.getByte())&&c!==e;);return d=a.pos-f,-1===c?(b("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead."),a.skip(-d),this.findDefaultInlineStreamEnd(a)):(this.inlineStreamSkipEI(a),d)},inlineStreamSkipEI:function(a){for(var b,c=69,d=73,e=0;-1!==(b=a.getByte());)if(0===e)e=b===c?1:0;else if(1===e)e=b===d?2:0;else if(2===e)break},makeInlineImage:function(a){for(var b=this.lexer,d=b.stream,e=new Aa(this.xref);!A(this.buf1,"ID")&&!R(this.buf1);){z(this.buf1)||c("Dictionary key must be a name object");var f=this.buf1.name;if(this.shift(),R(this.buf1))break;e.set(f,this.getObj(a))}var g,h=e.get("Filter","F");z(h)?g=h.name:C(h)&&z(h[0])&&(g=h[0].name);var i,j,k,l=d.pos;i="DCTDecode"===g||"DCT"===g?this.findDCTDecodeInlineStreamEnd(d):"ASCII85Decide"===g||"A85"===g?this.findASCII85DecodeInlineStreamEnd(d):"ASCIIHexDecode"===g||"AHx"===g?this.findASCIIHexDecodeInlineStreamEnd(d):this.findDefaultInlineStreamEnd(d);var m,n=d.makeSubStream(l,i,e);if(Ec>i){var o=n.getBytes();n.reset();var p=1,q=0;for(j=0,k=o.length;k>j;++j)p+=255&o[j],q+=p;if(m=q%65521<<16|p%65521,this.imageCache.adler32===m)return this.buf2=za.get("EI"),this.shift(),this.imageCache[m].reset(),this.imageCache[m]}return a&&(n=a.createStream(n,i)),n=this.filter(n,e,i),n.dict=e,void 0!==m&&(n.cacheKey="inline_"+i+"_"+m,this.imageCache[m]=n),this.buf2=za.get("EI"),this.shift(),n},makeStream:function(b,d){var e=this.lexer,f=e.stream;e.skipToNextLine();var g=f.pos-1,h=b.get("Length");if(w(h)||(a("Bad "+h+" attribute in stream"),h=0),f.pos=g+h,e.nextChar(),this.tryShift()&&A(this.buf2,"endstream"))this.shift();else{f.pos=g;for(var i,j,k=2048,l=9,m=[101,110,100,115,116,114,101,97,109],n=0,o=!1;f.pos=q)break;for(o=!1,i=0,j=0;q>i;i++){var r=p[i];if(r!==m[j])i-=j,j=0;else if(j++,j>=l){i++,o=!0;break}}if(o){n+=i-l,f.pos+=i-l;break}n+=q,f.pos+=q}o||c("Missing endstream"),h=n,e.nextChar(),this.shift(),this.shift()}return this.shift(),f=f.makeSubStream(g,h,b),d&&(f=d.createStream(f,h)),f=this.filter(f,b,h),f.dict=b,f},filter:function(a,b,d){var e=b.get("Filter","F"),f=b.get("DecodeParms","DP");if(z(e))return this.makeFilter(a,e.name,d,f);var g=d;if(C(e))for(var h=e,i=f,j=0,k=h.length;k>j;++j)e=h[j],z(e)||c("Bad filter name: "+e),f=null,C(i)&&j in i&&(f=i[j]),a=this.makeFilter(a,e.name,g,f),g=null;return a},makeFilter:function(a,c,d,e){if(0===a.dict.get("Length")&&!d)return b('Empty "'+c+'" stream.'),new _c(a);try{e&&this.xref&&(e=this.xref.fetchIfRef(e));var f=this.xref.stats.streamTypes;if("FlateDecode"===c||"Fl"===c)return f[Y.FLATE]=!0,e?new Rc(new Qc(a,d),d,e):new Qc(a,d);if("LZWDecode"===c||"LZW"===c){f[Y.LZW]=!0;var g=1;return e?(e.has("EarlyChange")&&(g=e.get("EarlyChange")),new Rc(new $c(a,d,g),d,e)):new $c(a,d,g)}return"DCTDecode"===c||"DCT"===c?(f[Y.DCT]=!0,new Sc(a,d,a.dict,this.xref)):"JPXDecode"===c||"JPX"===c?(f[Y.JPX]=!0,new Tc(a,d,a.dict)):"ASCII85Decode"===c||"A85"===c?(f[Y.A85]=!0,new Wc(a,d)):"ASCIIHexDecode"===c||"AHx"===c?(f[Y.AHX]=!0,new Xc(a,d)):"CCITTFaxDecode"===c||"CCF"===c?(f[Y.CCF]=!0,new Zc(a,d,e)):"RunLengthDecode"===c||"RL"===c?(f[Y.RL]=!0,new Yc(a,d)):"JBIG2Decode"===c?(f[Y.JBIG]=!0,new Uc(a,d,a.dict)):(b('filter "'+c+'" not supported yet'),a)}catch(h){if(h instanceof ja)throw h;return b('Invalid stream: "'+h+'"'),new _c(a)}}},d}(),Gc=function(){function a(a,b){this.stream=a,this.nextChar(),this.strBuf=[],this.knownCommands=b}function d(a){return a>=48&&57>=a?15&a:a>=65&&70>=a||a>=97&&102>=a?(15&a)+9:-1}a.isSpace=function(a){return 32===a||9===a||13===a||10===a};var e=[1,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,2,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];return a.prototype={nextChar:function(){return this.currentChar=this.stream.getByte()},peekChar:function(){return this.stream.peekByte()},getNumber:function(){var a=this.currentChar,d=!1,e=0,f=1;if(45===a?(f=-1,a=this.nextChar(),45===a&&(a=this.nextChar())):43===a&&(a=this.nextChar()),46===a&&(e=10,a=this.nextChar()),48>a||a>57)return c("Invalid number: "+String.fromCharCode(a)),0;for(var g=a-48,h=0,i=1;(a=this.nextChar())>=0;)if(a>=48&&57>=a){var j=a-48;d?h=10*h+j:(0!==e&&(e*=10),g=10*g+j)}else if(46===a){if(0!==e)break;e=1}else if(45===a)b("Badly formated number");else{if(69!==a&&101!==a)break;if(a=this.peekChar(),43===a||45===a)i=45===a?-1:1,this.nextChar();else if(48>a||a>57)break;d=!0}return 0!==e&&(g/=e),d&&(g*=Math.pow(10,i*h)),f*g},getString:function(){var a=1,c=!1,d=this.strBuf;d.length=0;for(var e=this.nextChar();;){var f=!1;switch(0|e){case-1:b("Unterminated string"),c=!0;break;case 40:++a,d.push("(");break;case 41:0===--a?(this.nextChar(),c=!0):d.push(")");break;case 92:switch(e=this.nextChar()){case-1:b("Unterminated string"),c=!0;break;case 110:d.push("\n");break;case 114:d.push("\r");break;case 116:d.push(" ");break;case 98:d.push("\b");break;case 102:d.push("\f");break;case 92:case 40:case 41:d.push(String.fromCharCode(e));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:var g=15&e;e=this.nextChar(),f=!0,e>=48&&55>=e&&(g=(g<<3)+(15&e),e=this.nextChar(),e>=48&&55>=e&&(f=!1,g=(g<<3)+(15&e))),d.push(String.fromCharCode(g));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:d.push(String.fromCharCode(e))}break;default:d.push(String.fromCharCode(e))}if(c)break;f||(e=this.nextChar())}return d.join("")},getName:function(){var a,f=this.strBuf;for(f.length=0;(a=this.nextChar())>=0&&!e[a];)if(35===a){a=this.nextChar();var g=d(a);if(-1!==g){var h=d(this.nextChar());-1===h&&c("Illegal digit in hex char in name: "+h),f.push(String.fromCharCode(g<<4|h))}else f.push("#",String.fromCharCode(a))}else f.push(String.fromCharCode(a));return f.length>127&&b("name token is longer than allowed by the spec: "+f.length),ya.get(f.join(""))},getHexString:function(){var a=this.strBuf;a.length=0;for(var c,f,g=this.currentChar,h=!0;;){if(0>g){b("Unterminated hex string");break}if(62===g){this.nextChar();break}if(1!==e[g]){if(h){if(c=d(g),-1===c){b('Ignoring invalid character "'+g+'" in hex string'),g=this.nextChar();continue}}else{if(f=d(g),-1===f){b('Ignoring invalid character "'+g+'" in hex string'),g=this.nextChar();continue}a.push(String.fromCharCode(c<<4|f))}h=!h,g=this.nextChar()}else g=this.nextChar()}return a.join("")},getObj:function(){for(var a=!1,b=this.currentChar;;){if(0>b)return Dc;if(a)10!==b&&13!==b||(a=!1);else if(37===b)a=!0;else if(1!==e[b])break;b=this.nextChar()}switch(0|b){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:return this.nextChar(),za.get("[");case 93:return this.nextChar(),za.get("]");case 60:return b=this.nextChar(),60===b?(this.nextChar(),za.get("<<")):this.getHexString();case 62:return b=this.nextChar(),62===b?(this.nextChar(),za.get(">>")):za.get(">");case 123:return this.nextChar(),za.get("{");case 125:return this.nextChar(),za.get("}");case 41:c("Illegal character: "+b)}for(var d=String.fromCharCode(b),f=this.knownCommands,g=f&&void 0!==f[d];(b=this.nextChar())>=0&&!e[b];){var h=d+String.fromCharCode(b);if(g&&void 0===f[h])break;128===d.length&&c("Command token too long: "+d.length),d=h,g=f&&void 0!==f[d]}return"true"===d?!0:"false"===d?!1:"null"===d?null:za.get(d)},skipToNextLine:function(){for(var a=this.currentChar;a>=0;){if(13===a){a=this.nextChar(),10===a&&this.nextChar();break}if(10===a){this.nextChar();break}a=this.nextChar()}}},a}(),Hc={create:function(a){function b(a,b){var c=j.get(a);if(w(c)&&(b?c>=0:c>0))return c;throw new Error('The "'+a+'" parameter in the linearization dictionary is invalid.')}function c(){var a,b,c=j.get("H");if(C(c)&&(2===(a=c.length)||4===a)){for(var d=0;a>d;d++)if(!(w(b=c[d])&&b>0))throw new Error("Hint ("+d+") in the linearization dictionary is invalid.");return c}throw new Error("Hint array in the linearization dictionary is invalid.")}var d,e,f=new Fc(new Gc(a),!1,null),g=f.getObj(),h=f.getObj(),i=f.getObj(),j=f.getObj();if(!(w(g)&&w(h)&&A(i,"obj")&&B(j)&&x(d=j.get("Linearized"))&&d>0))return null;if((e=b("L"))!==a.length)throw new Error('The "L" parameter in the linearization dictionary does not equal the stream length.');return{length:e,hints:c(),objectNumberFirst:b("O"),endFirst:b("E"),numPages:b("N"),mainXRefEntriesOffset:b("T"),pageFirst:j.has("P")?b("P",!0):0}}},Ic=function(){function a(a){this.lexer=a,this.operators=[],this.token=null,this.prev=null}return a.prototype={nextToken:function(){this.prev=this.token,this.token=this.lexer.getToken()},accept:function(a){return this.token.type===a?(this.nextToken(),!0):!1},expect:function(a){return this.accept(a)?!0:void c("Unexpected symbol: found "+this.token.type+" expected "+a+".")},parse:function(){return this.nextToken(),this.expect(Jc.LBRACE),this.parseBlock(),this.expect(Jc.RBRACE),this.operators},parseBlock:function(){for(;;)if(this.accept(Jc.NUMBER))this.operators.push(this.prev.value);else if(this.accept(Jc.OPERATOR))this.operators.push(this.prev.value);else{if(!this.accept(Jc.LBRACE))return;this.parseCondition()}},parseCondition:function(){var a=this.operators.length;if(this.operators.push(null,null),this.parseBlock(),this.expect(Jc.RBRACE),this.accept(Jc.IF))this.operators[a]=this.operators.length,this.operators[a+1]="jz";else if(this.accept(Jc.LBRACE)){var b=this.operators.length;this.operators.push(null,null);var d=this.operators.length; -this.parseBlock(),this.expect(Jc.RBRACE),this.expect(Jc.IFELSE),this.operators[b]=this.operators.length,this.operators[b+1]="j",this.operators[a]=d,this.operators[a+1]="jz"}else c("PS Function: error parsing conditional.")}},a}(),Jc={LBRACE:0,RBRACE:1,NUMBER:2,OPERATOR:3,IF:4,IFELSE:5},Kc=function(){function a(a,b){this.type=a,this.value=b}var b={};return a.getOperator=function(c){var d=b[c];return d?d:b[c]=new a(Jc.OPERATOR,c)},a.LBRACE=new a(Jc.LBRACE,"{"),a.RBRACE=new a(Jc.RBRACE,"}"),a.IF=new a(Jc.IF,"IF"),a.IFELSE=new a(Jc.IFELSE,"IFELSE"),a}(),Lc=function(){function a(a){this.stream=a,this.nextChar(),this.strBuf=[]}return a.prototype={nextChar:function(){return this.currentChar=this.stream.getByte()},getToken:function(){for(var a=!1,b=this.currentChar;;){if(0>b)return Dc;if(a)10!==b&&13!==b||(a=!1);else if(37===b)a=!0;else if(!Gc.isSpace(b))break;b=this.nextChar()}switch(0|b){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return new Kc(Jc.NUMBER,this.getNumber());case 123:return this.nextChar(),Kc.LBRACE;case 125:return this.nextChar(),Kc.RBRACE}var c=this.strBuf;for(c.length=0,c[0]=String.fromCharCode(b);(b=this.nextChar())>=0&&(b>=65&&90>=b||b>=97&&122>=b);)c.push(String.fromCharCode(b));var d=c.join("");switch(d.toLowerCase()){case"if":return Kc.IF;case"ifelse":return Kc.IFELSE;default:return Kc.getOperator(d)}},getNumber:function(){var a=this.currentChar,b=this.strBuf;for(b.length=0,b[0]=String.fromCharCode(a);(a=this.nextChar())>=0&&(a>=48&&57>=a||45===a||46===a);)b.push(String.fromCharCode(a));var d=parseFloat(b.join(""));return isNaN(d)&&c("Invalid floating point number: "+d),d}},a}(),Mc=function(){function a(a,b,c,d){this.bytes=a instanceof Uint8Array?a:new Uint8Array(a),this.start=b||0,this.pos=this.start,this.end=b+c||this.bytes.length,this.dict=d}return a.prototype={get length(){return this.end-this.start},get isEmpty(){return 0===this.length},getByte:function(){return this.pos>=this.end?-1:this.bytes[this.pos++]},getUint16:function(){var a=this.getByte(),b=this.getByte();return-1===a||-1===b?-1:(a<<8)+b},getInt32:function(){var a=this.getByte(),b=this.getByte(),c=this.getByte(),d=this.getByte();return(a<<24)+(b<<16)+(c<<8)+d},getBytes:function(a){var b=this.bytes,c=this.pos,d=this.end;if(!a)return b.subarray(c,d);var e=c+a;return e>d&&(e=d),this.pos=e,b.subarray(c,e)},peekByte:function(){var a=this.getByte();return this.pos--,a},peekBytes:function(a){var b=this.getBytes(a);return this.pos-=b.length,b},skip:function(a){a||(a=1),this.pos+=a},reset:function(){this.pos=this.start},moveStart:function(){this.start=this.pos},makeSubStream:function(b,c,d){return new a(this.bytes.buffer,b,c,d)},isStream:!0},a}(),Nc=function(){function a(a){for(var b=a.length,c=new Uint8Array(b),d=0;b>d;++d)c[d]=a.charCodeAt(d);Mc.call(this,c)}return a.prototype=Mc.prototype,a}(),Oc=function(){function a(a){if(this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=b,this.minBufferLength=512,a)for(;this.minBufferLengthc;)c*=2;var d=new Uint8Array(c);return d.set(b),this.buffer=d},getByte:function(){for(var a=this.pos;this.bufferLength<=a;){if(this.eof)return-1;this.readBlock()}return this.buffer[this.pos++]},getUint16:function(){var a=this.getByte(),b=this.getByte();return-1===a||-1===b?-1:(a<<8)+b},getInt32:function(){var a=this.getByte(),b=this.getByte(),c=this.getByte(),d=this.getByte();return(a<<24)+(b<<16)+(c<<8)+d},getBytes:function(a){var b,c=this.pos;if(a){for(this.ensureBuffer(c+a),b=c+a;!this.eof&&this.bufferLengthd&&(b=d)}else{for(;!this.eof;)this.readBlock();b=this.bufferLength}return this.pos=b,this.buffer.subarray(c,b)},peekByte:function(){var a=this.getByte();return this.pos--,a},peekBytes:function(a){var b=this.getBytes(a);return this.pos-=b.length,b},makeSubStream:function(a,b,c){for(var d=a+b;this.bufferLength<=d&&!this.eof;)this.readBlock();return new Mc(this.buffer,a,b,c)},skip:function(a){a||(a=1),this.pos+=a},reset:function(){this.pos=0},getBaseStreams:function(){return this.str&&this.str.getBaseStreams?this.str.getBaseStreams():[]}},a}(),Pc=function(){function a(a){this.streams=a,Oc.call(this,null)}return a.prototype=Object.create(Oc.prototype),a.prototype.readBlock=function(){var a=this.streams;if(0===a.length)return void(this.eof=!0);var b=a.shift(),c=b.getBytes(),d=this.bufferLength,e=d+c.length,f=this.ensureBuffer(e);f.set(c,d),this.bufferLength=e},a.prototype.getBaseStreams=function(){for(var a=[],b=0,c=this.streams.length;c>b;b++){var d=this.streams[b];d.getBaseStreams&&na.appendToArray(a,d.getBaseStreams())}return a},a}(),Qc=function(){function a(a,b){this.str=a,this.dict=a.dict;var d=a.getByte(),e=a.getByte();-1!==d&&-1!==e||c("Invalid header in flate stream: "+d+", "+e),8!==(15&d)&&c("Unknown compression method in flate stream: "+d+", "+e),((d<<8)+e)%31!==0&&c("Bad FCHECK in flate stream: "+d+", "+e),32&e&&c("FDICT bit set in flate stream: "+d+", "+e),this.codeSize=0,this.codeBuf=0,Oc.call(this,b)}var b=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),e=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),f=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],g=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];return a.prototype=Object.create(Oc.prototype),a.prototype.getBits=function(a){for(var b,d=this.str,e=this.codeSize,f=this.codeBuf;a>e;)-1===(b=d.getByte())&&c("Bad encoding in flate stream"),f|=b<>a,this.codeSize=e-=a,b},a.prototype.getCode=function(a){for(var b,d=this.str,e=a[0],f=a[1],g=this.codeSize,h=this.codeBuf;f>g&&-1!==(b=d.getByte());)h|=b<>16,k=65535&i;return(1>j||j>g)&&c("Bad encoding in flate stream"),this.codeBuf=h>>j,this.codeSize=g-j,k},a.prototype.generateHuffmanTable=function(a){var b,c=a.length,d=0;for(b=0;c>b;++b)a[b]>d&&(d=a[b]);for(var e=1<=g;++g,h<<=1,i<<=1)for(var j=0;c>j;++j)if(a[j]===g){var k=0,l=h;for(b=0;g>b;++b)k=k<<1|1&l,l>>=1;for(b=k;e>b;b+=i)f[b]=g<<16|j;++h}return[f,d]},a.prototype.readBlock=function(){var a,h,i=this.str,j=this.getBits(3);if(1&j&&(this.eof=!0),j>>=1,0!==j){var k,l;if(1===j)k=f,l=g;else if(2===j){var m,n=this.getBits(5)+257,o=this.getBits(5)+1,p=this.getBits(4)+4,q=new Uint8Array(b.length);for(m=0;p>m;++m)q[b[m]]=this.getBits(3);var r=this.generateHuffmanTable(q);h=0,m=0;for(var s,t,u,v=n+o,w=new Uint8Array(v);v>m;){var x=this.getCode(r);if(16===x)s=2,t=3,u=h;else if(17===x)s=3,t=3,u=h=0;else{if(18!==x){w[m++]=h=x;continue}s=7,t=11,u=h=0}for(var y=this.getBits(s)+t;y-- >0;)w[m++]=u}k=this.generateHuffmanTable(w.subarray(0,n)),l=this.generateHuffmanTable(w.subarray(n,v))}else c("Unknown block type in flate stream");a=this.buffer;for(var z=a?a.length:0,A=this.bufferLength;;){var B=this.getCode(k);if(256>B)A+1>=z&&(a=this.ensureBuffer(A+1),z=a.length),a[A++]=B;else{if(256===B)return void(this.bufferLength=A);B-=257,B=d[B];var C=B>>16;C>0&&(C=this.getBits(C)),h=(65535&B)+C,B=this.getCode(l),B=e[B],C=B>>16,C>0&&(C=this.getBits(C));var D=(65535&B)+C;A+h>=z&&(a=this.ensureBuffer(A+h),z=a.length);for(var E=0;h>E;++E,++A)a[A]=a[A-D]}}}else{var F;-1===(F=i.getByte())&&c("Bad block header in flate stream");var G=F;-1===(F=i.getByte())&&c("Bad block header in flate stream"),G|=F<<8,-1===(F=i.getByte())&&c("Bad block header in flate stream");var H=F;-1===(F=i.getByte())&&c("Bad block header in flate stream"),H|=F<<8,H===(65535&~G)||0===G&&0===H||c("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var I=this.bufferLength;a=this.ensureBuffer(I+G);var J=I+G;if(this.bufferLength=J,0===G)-1===i.peekByte()&&(this.eof=!0);else for(var K=I;J>K;++K){if(-1===(F=i.getByte())){this.eof=!0;break}a[K]=F}}},a}(),Rc=function(){function a(a,b,d){var e=this.predictor=d.get("Predictor")||1;if(1>=e)return a;2!==e&&(10>e||e>15)&&c("Unsupported predictor: "+e),2===e?this.readBlock=this.readBlockTiff:this.readBlock=this.readBlockPng,this.str=a,this.dict=a.dict;var f=this.colors=d.get("Colors")||1,g=this.bits=d.get("BitsPerComponent")||8,h=this.columns=d.get("Columns")||1;return this.pixBytes=f*g+7>>3,this.rowBytes=h*f*g+7>>3,Oc.call(this,b),this}return a.prototype=Object.create(Oc.prototype),a.prototype.readBlockTiff=function(){var a=this.rowBytes,b=this.bufferLength,c=this.ensureBuffer(b+a),d=this.bits,e=this.colors,f=this.str.getBytes(a);if(this.eof=!f.length,!this.eof){var g,h=0,i=0,j=0,k=0,l=b;if(1===d)for(g=0;a>g;++g){var m=f[g];h=h<<8|m,c[l++]=255&(m^h>>e),h&=65535}else if(8===d){for(g=0;e>g;++g)c[l++]=f[g];for(;a>g;++g)c[l]=c[l-e]+f[g],l++}else{var n=new Uint8Array(e+1),o=(1<g;++g)for(var s=0;e>s;++s)d>j&&(h=h<<8|255&f[p++],j+=8),n[s]=n[s]+(h>>j-d)&o,j-=d,i=i<=8&&(c[q++]=i>>k-8&255,k-=8);k>0&&(c[q++]=(i<<8-k)+(h&(1<<8-k)-1))}this.bufferLength+=a}},a.prototype.readBlockPng=function(){var a=this.rowBytes,b=this.pixBytes,d=this.str.getByte(),e=this.str.getBytes(a);if(this.eof=!e.length,!this.eof){var f=this.bufferLength,g=this.ensureBuffer(f+a),h=g.subarray(f-a,f);0===h.length&&(h=new Uint8Array(a));var i,j,k,l=f;switch(d){case 0:for(i=0;a>i;++i)g[l++]=e[i];break;case 1:for(i=0;b>i;++i)g[l++]=e[i];for(;a>i;++i)g[l]=g[l-b]+e[i]&255,l++;break;case 2:for(i=0;a>i;++i)g[l++]=h[i]+e[i]&255;break;case 3:for(i=0;b>i;++i)g[l++]=(h[i]>>1)+e[i];for(;a>i;++i)g[l]=(h[i]+g[l-b]>>1)+e[i]&255,l++;break;case 4:for(i=0;b>i;++i)j=h[i],k=e[i],g[l++]=j+k;for(;a>i;++i){j=h[i];var m=h[i-b],n=g[l-b],o=n+j-m,p=o-n;0>p&&(p=-p);var q=o-j;0>q&&(q=-q);var r=o-m;0>r&&(r=-r),k=e[i],q>=p&&r>=p?g[l++]=n+k:r>=q?g[l++]=j+k:g[l++]=m+k}break;default:c("Unsupported predictor: "+d)}this.bufferLength+=a}},a}(),Sc=function(){function a(a,b,c,d){for(var e;-1!==(e=a.getByte());)if(255===e){a.skip(-1);break}this.stream=a,this.maybeLength=b,this.dict=c,Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),Object.defineProperty(a.prototype,"bytes",{get:function(){return g(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),a.prototype.ensureBuffer=function(a){if(!this.bufferLength)try{var b=new gd;if(this.forceRGB&&this.dict&&C(this.dict.get("Decode"))){for(var d=this.dict.get("Decode"),e=this.dict.get("BitsPerComponent")||8,f=d.length,g=new Int32Array(f),h=!1,i=(1<j;j+=2)g[j]=256*(d[j+1]-d[j])|0,g[j+1]=d[j]*i|0,256===g[j]&&0===g[j+1]||(h=!0);h&&(b.decodeTransform=g)}b.parse(this.bytes);var k=b.getData(this.drawWidth,this.drawHeight,this.forceRGB);this.buffer=k,this.bufferLength=k.length,this.eof=!0}catch(l){c("JPEG error: "+l)}},a.prototype.getBytes=function(a){return this.ensureBuffer(),this.buffer},a.prototype.getIR=function(){return PDFJS.createObjectURL(this.bytes,"image/jpeg")},a.prototype.isNativelySupported=function(a,b){var c=Xa.parse(this.dict.get("ColorSpace","CS"),a,b);return("DeviceGray"===c.name||"DeviceRGB"===c.name)&&c.isDefaultDecode(this.dict.get("Decode","D"))},a.prototype.isNativelyDecodable=function(a,b){var c=Xa.parse(this.dict.get("ColorSpace","CS"),a,b);return(1===c.numComps||3===c.numComps)&&c.isDefaultDecode(this.dict.get("Decode","D"))},a}(),Tc=function(){function a(a,b,c){this.stream=a,this.maybeLength=b,this.dict=c,Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),Object.defineProperty(a.prototype,"bytes",{get:function(){return g(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),a.prototype.ensureBuffer=function(a){if(!this.bufferLength){var b=new hd;b.parse(this.bytes);var c=b.width,d=b.height,e=b.componentsCount,f=b.tiles.length;if(1===f)this.buffer=b.tiles[0].items;else{for(var g=new Uint8Array(c*d*e),h=0;f>h;h++)for(var i=b.tiles[h],j=i.width,k=i.height,l=i.left,m=i.top,n=i.items,o=0,p=(c*m+l)*e,q=c*e,r=j*e,s=0;k>s;s++){var t=n.subarray(o,o+r);g.set(t,p),o+=r,p+=q}this.buffer=g}this.bufferLength=this.buffer.length,this.eof=!0}},a}(),Uc=function(){function a(a,b,c){this.stream=a,this.maybeLength=b,this.dict=c,Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),Object.defineProperty(a.prototype,"bytes",{get:function(){return g(this,"bytes",this.stream.getBytes(this.maybeLength))},configurable:!0}),a.prototype.ensureBuffer=function(a){if(!this.bufferLength){var c=new id,d=[],e=this.dict.xref,f=e.fetchIfRef(this.dict.get("DecodeParms"));if(C(f)&&(f.length>1&&b("JBIG2 - 'DecodeParms' array with multiple elements not supported."),f=e.fetchIfRef(f[0])),f&&f.has("JBIG2Globals")){var g=f.get("JBIG2Globals"),h=g.getBytes();d.push({data:h,start:0,end:h.length})}d.push({data:this.bytes,start:0,end:this.bytes.length});for(var i=c.parseChunks(d),j=i.length,k=0;j>k;k++)i[k]^=255;this.buffer=i,this.bufferLength=j,this.eof=!0}},a}(),Vc=function(){function a(a,b,c){this.str=a,this.dict=a.dict,this.decrypt=c,this.nextChunk=null,this.initialized=!1,Oc.call(this,b)}var b=512;return a.prototype=Object.create(Oc.prototype),a.prototype.readBlock=function(){var a;if(this.initialized?a=this.nextChunk:(a=this.str.getBytes(b),this.initialized=!0),!a||0===a.length)return void(this.eof=!0);this.nextChunk=this.str.getBytes(b);var c=this.nextChunk&&this.nextChunk.length>0,d=this.decrypt;a=d(a,!c);var e,f=this.bufferLength,g=a.length,h=this.ensureBuffer(f+g);for(e=0;g>e;e++)h[f++]=a[e];this.bufferLength=f},a}(),Wc=function(){function a(a,b){this.str=a,this.dict=a.dict,this.input=new Uint8Array(5),b&&(b=.8*b),Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),a.prototype.readBlock=function(){for(var a=126,b=122,c=-1,d=this.str,e=d.getByte();Gc.isSpace(e);)e=d.getByte();if(e===c||e===a)return void(this.eof=!0);var f,g,h=this.bufferLength;if(e===b){for(f=this.ensureBuffer(h+4),g=0;4>g;++g)f[h+g]=0;this.bufferLength+=4}else{var i=this.input;for(i[0]=e,g=1;5>g;++g){for(e=d.getByte();Gc.isSpace(e);)e=d.getByte();if(i[g]=e,e===c||e===a)break}if(f=this.ensureBuffer(h+g-1),this.bufferLength+=g-1,5>g){for(;5>g;++g)i[g]=117;this.eof=!0}var j=0;for(g=0;5>g;++g)j=85*j+(i[g]-33);for(g=3;g>=0;--g)f[h+g]=255&j,j>>=8}},a}(),Xc=function(){function a(a,b){this.str=a,this.dict=a.dict,this.firstDigit=-1,b&&(b=.5*b),Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),a.prototype.readBlock=function(){var a=8e3,b=this.str.getBytes(a);if(!b.length)return void(this.eof=!0);for(var c=b.length+1>>1,d=this.ensureBuffer(this.bufferLength+c),e=this.bufferLength,f=this.firstDigit,g=0,h=b.length;h>g;g++){var i,j=b[g];if(j>=48&&57>=j)i=15&j;else{if(!(j>=65&&70>=j||j>=97&&102>=j)){if(62===j){this.eof=!0;break}continue}i=(15&j)+9}0>f?f=i:(d[e++]=f<<4|i,f=-1)}f>=0&&this.eof&&(d[e++]=f<<4,f=-1),this.firstDigit=f,this.bufferLength=e},a}(),Yc=function(){function a(a,b){this.str=a,this.dict=a.dict,Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),a.prototype.readBlock=function(){var a=this.str.getBytes(2);if(!a||a.length<2||128===a[0])return void(this.eof=!0);var b,c=this.bufferLength,d=a[0];if(128>d){if(b=this.ensureBuffer(c+d+1),b[c++]=a[1],d>0){var e=this.str.getBytes(d);b.set(e,c),c+=d}}else{d=257-d;var f=a[1];b=this.ensureBuffer(c+d+1);for(var g=0;d>g;g++)b[c++]=f}this.bufferLength=c},a}(),Zc=function(){function b(a,b,c){this.str=a,this.dict=a.dict,c=c||Aa.empty,this.encoding=c.get("K")||0,this.eoline=c.get("EndOfLine")||!1,this.byteAlign=c.get("EncodedByteAlign")||!1,this.columns=c.get("Columns")||1728,this.rows=c.get("Rows")||0;var d=c.get("EndOfBlock");null!==d&&void 0!==d||(d=!0),this.eoblock=d,this.black=c.get("BlackIs1")||!1,this.codingLine=new Uint32Array(this.columns+1),this.refLine=new Uint32Array(this.columns+2),this.codingLine[0]=this.columns,this.codingPos=0,this.row=0,this.nextLine2D=this.encoding<0,this.inputBits=0,this.inputBuf=0,this.outputBits=0;for(var e;0===(e=this.lookBits(12));)this.eatBits(1);1===e&&this.eatBits(12),this.encoding>0&&(this.nextLine2D=!this.lookBits(1),this.eatBits(1)),Oc.call(this,b)}var c=-2,d=0,e=1,f=2,g=3,h=4,i=5,j=6,k=7,l=8,m=[[-1,-1],[-1,-1],[7,l],[7,k],[6,j],[6,j],[6,i],[6,i],[4,d],[4,d],[4,d],[4,d],[4,d],[4,d],[4,d],[4,d],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,e],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,h],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[3,g],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f],[1,f]],n=[[-1,-1],[12,c],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],o=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,21],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,24],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7]],p=[[-1,-1],[-1,-1],[12,c],[12,c],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[-1,-1],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],[11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[12,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],q=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[11,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],r=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]];return b.prototype=Object.create(Oc.prototype),b.prototype.readBlock=function(){for(;!this.eof;){var a=this.lookChar();this.ensureBuffer(this.bufferLength+1),this.buffer[this.bufferLength++]=a}},b.prototype.addPixels=function(b,c){var d=this.codingLine,e=this.codingPos;b>d[e]&&(b>this.columns&&(a("row is wrong length"),this.err=!0,b=this.columns),1&e^c&&++e,d[e]=b),this.codingPos=e},b.prototype.addPixelsNeg=function(b,c){var d=this.codingLine,e=this.codingPos;if(b>d[e])b>this.columns&&(a("row is wrong length"),this.err=!0,b=this.columns),1&e^c&&++e,d[e]=b;else if(bb&&(a("invalid code"),this.err=!0,b=0);e>0&&b=64);do s+=t=this.getWhiteCode();while(t>=64)}else{do r+=t=this.getWhiteCode();while(t>=64);do s+=t=this.getBlackCode();while(t>=64)}for(this.addPixels(p[this.codingPos]+r,c),p[this.codingPos]0?--b:++b;o[b]<=p[this.codingPos]&&o[b]0?--b:++b;o[b]<=p[this.codingPos]&&o[b]0?--b:++b;o[b]<=p[this.codingPos]&&o[b]=64)}else do r+=t=this.getWhiteCode();while(t>=64);this.addPixels(p[this.codingPos]+r,c),c^=1}var u=!1;if(this.byteAlign&&(this.inputBits&=-8),this.eoblock||this.row!==this.rows-1){if(r=this.lookBits(12),this.eoline)for(;r!==Dc&&1!==r;)this.eatBits(1),r=this.lookBits(12);else for(;0===r;)this.eatBits(1),r=this.lookBits(12);1===r?(this.eatBits(12),u=!0):r===Dc&&(this.eof=!0)}else this.eof=!0;if(!this.eof&&this.encoding>0&&(this.nextLine2D=!this.lookBits(1),this.eatBits(1)),this.eoblock&&u&&this.byteAlign){if(r=this.lookBits(12),1===r){if(this.eatBits(12),this.encoding>0&&(this.lookBits(1),this.eatBits(1)),this.encoding>=0)for(n=0;4>n;++n)r=this.lookBits(12),1!==r&&a("bad rtc code: "+r),this.eatBits(12),this.encoding>0&&(this.lookBits(1),this.eatBits(1));this.eof=!0}}else if(this.err&&this.eoline){for(;;){if(r=this.lookBits(13),r===Dc)return this.eof=!0,null;if(r>>1===1)break;this.eatBits(1)}this.eatBits(12),this.encoding>0&&(this.eatBits(1),this.nextLine2D=!(1&r))}p[0]>0?this.outputBits=p[this.codingPos=0]:this.outputBits=p[this.codingPos=1],this.row++}var v;if(this.outputBits>=8)v=1&this.codingPos?0:255,this.outputBits-=8,0===this.outputBits&&p[this.codingPos]m?(v<<=m,1&this.codingPos||(v|=255>>8-m),this.outputBits-=m,m=0):(v<<=this.outputBits,1&this.codingPos||(v|=255>>8-this.outputBits),m-=this.outputBits,this.outputBits=0,p[this.codingPos]0&&(v<<=m,m=0));while(m)}return this.black&&(v^=255),v},b.prototype.findTableCode=function(a,b,c,d){for(var e=d||0,f=a;b>=f;++f){var g=this.lookBits(f);if(g===Dc)return[!0,1,!1];if(b>f&&(g<<=b-f),!e||g>=e){var h=c[g-e];if(h[0]===f)return this.eatBits(f),[!0,h[1],!0]}}return[!1,0,!1]},b.prototype.getTwoDimCode=function(){var b,c=0;if(this.eoblock){if(c=this.lookBits(7),b=m[c],b&&b[0]>0)return this.eatBits(b[0]), -b[1]}else{var d=this.findTableCode(1,7,m);if(d[0]&&d[2])return d[1]}return a("Bad two dim code"),Dc},b.prototype.getWhiteCode=function(){var b,c=0;if(this.eoblock){if(c=this.lookBits(12),c===Dc)return 1;if(b=c>>5===0?n[c]:o[c>>3],b[0]>0)return this.eatBits(b[0]),b[1]}else{var d=this.findTableCode(1,9,o);if(d[0])return d[1];if(d=this.findTableCode(11,12,n),d[0])return d[1]}return a("bad white code"),this.eatBits(1),1},b.prototype.getBlackCode=function(){var b,c;if(this.eoblock){if(b=this.lookBits(13),b===Dc)return 1;if(c=b>>7===0?p[b]:b>>9===0&&b>>7!==0?q[(b>>1)-64]:r[b>>7],c[0]>0)return this.eatBits(c[0]),c[1]}else{var d=this.findTableCode(2,6,r);if(d[0])return d[1];if(d=this.findTableCode(7,12,q,64),d[0])return d[1];if(d=this.findTableCode(10,13,p),d[0])return d[1]}return a("bad black code"),this.eatBits(1),1},b.prototype.lookBits=function(a){for(var b;this.inputBits>16-a;this.inputBuf=(this.inputBuf<<8)+b,this.inputBits+=8}return this.inputBuf>>this.inputBits-a&65535>>16-a},b.prototype.eatBits=function(a){(this.inputBits-=a)<0&&(this.inputBits=0)},b}(),$c=function(){function a(a,b,c){this.str=a,this.dict=a.dict,this.cachedData=0,this.bitsCached=0;for(var d=4096,e={earlyChange:c,codeLength:9,nextCode:258,dictionaryValues:new Uint8Array(d),dictionaryLengths:new Uint16Array(d),dictionaryPrevCodes:new Uint16Array(d),currentSequence:new Uint8Array(d),currentSequenceLength:0},f=0;256>f;++f)e.dictionaryValues[f]=f,e.dictionaryLengths[f]=1;this.lzwState=e,Oc.call(this,b)}return a.prototype=Object.create(Oc.prototype),a.prototype.readBits=function(a){for(var b=this.bitsCached,c=this.cachedData;a>b;){var d=this.str.getByte();if(-1===d)return this.eof=!0,null;c=c<<8|d,b+=8}return this.bitsCached=b-=a,this.cachedData=c,this.lastCode=null,c>>>b&(1<a;a++){var t=this.readBits(m),u=p>0;if(256>t)o[0]=t,p=1;else{if(!(t>=258)){if(256===t){m=9,i=258,p=0;continue}this.eof=!0,delete this.lzwState;break}if(i>t)for(p=k[t],b=p-1,c=t;b>=0;b--)o[b]=j[c],c=l[c];else o[p++]=o[0]}if(u&&(l[i]=n,k[i]=k[n]+1,j[i]=o[0],i++,m=i+h&i+h-1?m:0|Math.min(Math.log(i+h)/.6931471805599453+1,12)),n=t,q+=p,q>e){do e+=f;while(q>e);s=this.ensureBuffer(this.bufferLength+e)}for(b=0;p>b;b++)s[r++]=o[b]}g.nextCode=i,g.codeLength=m,g.prevCode=n,g.currentSequenceLength=p,this.bufferLength=r}},a}(),_c=function(){function a(){Mc.call(this,new Uint8Array(0))}return a.prototype=Mc.prototype,a}(),ad=function(){function a(a){this.name=a,this.terminated=!1,this._capability=G()}return a.prototype={get finished(){return this._capability.promise},finish:function(){this._capability.resolve()},terminate:function(){this.terminated=!0},ensureNotTerminated:function(){if(this.terminated)throw new Error("Worker task was terminated")}},a}(),bd=PDFJS.WorkerMessageHandler={setup:function(c){function d(){if(j)throw new Error("Worker was terminated")}function e(a){l.push(a)}function f(a){a.finish();var b=l.indexOf(a);l.splice(b,1)}function g(a){var b=G(),c=function(){var a=i.ensureDoc("numPages"),c=i.ensureDoc("fingerprint"),e=i.ensureXRef("encrypt");Promise.all([a,c,e]).then(function(a){var c={numPages:a[0],fingerprint:a[1],encrypted:!!a[2]};b.resolve(c)},d)},d=function(a){b.reject(a)};return i.ensureDoc("checkHeader",[]).then(function(){i.ensureDoc("parseStartXRef",[]).then(function(){i.ensureDoc("parse",[a]).then(c,d)},d)},d),b.promise}function h(a){var d,e=G(),f=a.source,g=a.disableRange;if(f.data){try{d=new ua(f.data,f.password),e.resolve(d)}catch(h){e.reject(h)}return e.promise}if(f.chunkedViewerLoading){try{d=new va(f,c),e.resolve(d)}catch(h){e.reject(h)}return e.promise}var i=new pa(f.url,{httpHeaders:f.httpHeaders,withCredentials:f.withCredentials}),j=[],l=i.requestFull({onHeadersReceived:function(){if(!g){var a=i.getRequestXhr(l);if("bytes"===a.getResponseHeader("Accept-Ranges")){var b=a.getResponseHeader("Content-Encoding")||"identity";if("identity"===b){var h=a.getResponseHeader("Content-Length");if(h=parseInt(h,10),w(h)&&(f.length=h,!(2*sa>=h))){i.isStreamingRequest(l)?f.disableAutoFetch=!0:i.abortRequest(l);try{d=new va(f,c),e.resolve(d)}catch(j){e.reject(j)}k=null}}}}},onProgressiveData:f.disableStream?null:function(a){return d?void d.sendProgressiveData(a):void j.push(a)},onDone:function(a){if(!d){var c;if(null===a){var g=0,h=0;j.forEach(function(a){g+=a.byteLength}),f.length&&g!==f.length&&b("reported HTTP length is different from actual");var i=new Uint8Array(g);j.forEach(function(a){i.set(new Uint8Array(a),h),h+=a.byteLength}),c=i.buffer}else c=a.chunk;try{d=new ua(c,f.password),e.resolve(d)}catch(l){e.reject(l)}k=null}},onError:function(a){var b;404===a?(b=new ga('Missing PDF "'+f.url+'".'),c.send("MissingPDF",b)):(b=new ha("Unexpected server response ("+a+') while retrieving PDF "'+f.url+'".',a),c.send("UnexpectedResponse",b)),k=null},onProgress:function(a){c.send("DocProgress",{loaded:a.loaded,total:a.lengthComputable?a.total:f.length})}});return k=function(){i.abortRequest(l)},e.promise}var i,j=!1,k=null,l=[];c.on("test",function(a){if(!(a instanceof Uint8Array))return void c.send("test",!1);var b=255===a[0];c.postMessageTransfers=b;var d=new XMLHttpRequest,e="response"in d;try{d.responseType}catch(f){e=!1}return e?void c.send("test",{supportTypedArray:!0,supportTransfers:b}):void c.send("test",!1)}),c.on("GetDocRequest",function(a){var b=function(a){d(),c.send("GetDoc",{pdfInfo:a})},e=function(a){a instanceof da?a.code===ca.NEED_PASSWORD?c.send("NeedPassword",a):a.code===ca.INCORRECT_PASSWORD&&c.send("IncorrectPassword",a):a instanceof fa?c.send("InvalidPDF",a):a instanceof ga?c.send("MissingPDF",a):a instanceof ha?c.send("UnexpectedResponse",a):c.send("UnknownError",new ea(a.message,a.toString()))};d(),PDFJS.maxImageSize=void 0===a.maxImageSize?-1:a.maxImageSize,PDFJS.disableFontFace=a.disableFontFace,PDFJS.disableCreateObjectURL=a.disableCreateObjectURL,PDFJS.verbosity=a.verbosity,PDFJS.cMapUrl=void 0===a.cMapUrl?null:a.cMapUrl,PDFJS.cMapPacked=a.cMapPacked===!0,h(a).then(function(a){if(j)throw a.terminate(),new Error("Worker was terminated");i=a,c.send("PDFManagerReady",null),i.onLoadedStream().then(function(a){c.send("DataLoaded",{length:a.bytes.byteLength})})}).then(function f(){d(),g(!1).then(b,function(a){return d(),a instanceof ka?(i.requestLoadedStream(),void i.onLoadedStream().then(function(){d(),g(!0).then(b,e)})):(a instanceof da&&i.passwordChanged().then(f),void e(a))},e)},e)}),c.on("GetPage",function(a){return i.getPage(a.pageIndex).then(function(a){var b=i.ensure(a,"rotate"),c=i.ensure(a,"ref"),d=i.ensure(a,"view");return Promise.all([b,c,d]).then(function(a){return{rotate:a[0],ref:a[1],view:a[2]}})})}),c.on("GetPageIndex",function(a){var b=new Ba(a.ref.num,a.ref.gen),c=i.pdfDocument.catalog;return c.getPageIndex(b)}),c.on("GetDestinations",function(a){return i.ensureCatalog("destinations")}),c.on("GetDestination",function(a){return i.ensureCatalog("getDestination",[a.id])}),c.on("GetAttachments",function(a){return i.ensureCatalog("attachments")}),c.on("GetJavaScript",function(a){return i.ensureCatalog("javaScript")}),c.on("GetOutline",function(a){return i.ensureCatalog("documentOutline")}),c.on("GetMetadata",function(a){return Promise.all([i.ensureDoc("documentInfo"),i.ensureCatalog("metadata")])}),c.on("GetData",function(a){return i.requestLoadedStream(),i.onLoadedStream().then(function(a){return a.bytes})}),c.on("GetStats",function(a){return i.pdfDocument.xref.stats}),c.on("UpdatePassword",function(a){i.updatePassword(a)}),c.on("GetAnnotations",function(a){return i.getPage(a.pageIndex).then(function(a){return i.ensure(a,"getAnnotationsData",[])})}),c.on("RenderPageRequest",function(b){var d=b.pageIndex;i.getPage(d).then(function(g){var h=new ad("RenderPageRequest: page "+d);e(h);var i=d+1,j=Date.now();g.getOperatorList(c,h,b.intent).then(function(b){f(h),a("page="+i+" - getOperatorList: time="+(Date.now()-j)+"ms, len="+b.fnArray.length)},function(a){if(f(h),!h.terminated){var d,e="worker.js: while trying to getPage() and getOperatorList()";d="string"==typeof a?{message:a,stack:e}:"object"==typeof a?{message:a.message||a.toString(),stack:a.stack||e}:{message:"Unknown exception type: "+typeof a,stack:e},c.send("PageError",{pageNum:i,error:d,intent:b.intent})}})})},this),c.on("GetTextContent",function(b){var c=b.pageIndex;return i.getPage(c).then(function(b){var d=new ad("GetTextContent: page "+c);e(d);var g=c+1,h=Date.now();return b.extractTextContent(d).then(function(b){return f(d),a("text indexing: page="+g+" - time="+(Date.now()-h)+"ms"),b},function(a){if(f(d),!d.terminated)throw a})})}),c.on("Cleanup",function(a){return i.cleanup()}),c.on("Terminate",function(a){j=!0,i&&(i.terminate(),i=null),k&&k();var b=[];return l.forEach(function(a){b.push(a.finished),a.terminate()}),Promise.all(b).then(function(){})})}},cd={},dd={log:function(){var a=Array.prototype.slice.call(arguments);S.postMessage({action:"console_log",data:a})},error:function(){var a=Array.prototype.slice.call(arguments);throw S.postMessage({action:"console_error",data:a}),"pdf.js execution error"},time:function(a){cd[a]=Date.now()},timeEnd:function(a){var b=cd[a];b||c("Unknown timer name "+a),this.log("Timer:",a,Date.now()-b)}};if("undefined"==typeof window){"console"in S||(S.console=dd),PDFJS.UnsupportedManager.listen(function(a){S.postMessage({action:"_unsupported_feature",data:a})});var ed=new H("worker_processor",this);bd.setup(ed)}var fd=function(){function a(a,b,c){this.data=a,this.bp=b,this.dataEnd=c,this.chigh=a[b],this.clow=0,this.byteIn(),this.chigh=this.chigh<<7&65535|this.clow>>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}var b=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];return a.prototype={byteIn:function(){var a=this.data,b=this.bp;if(255===a[b]){var c=a[b+1];c>143?(this.clow+=65280,this.ct=8):(b++,this.clow+=a[b]<<9,this.ct=7,this.bp=b)}else b++,this.clow+=b65535&&(this.chigh+=this.clow>>16,this.clow&=65535)},readBit:function(a,c){var d,e=a[c]>>1,f=1&a[c],g=b[e],h=g.qe,i=this.a-h;if(this.chighi?(i=h,d=f,e=g.nmps):(i=h,d=1^f,1===g.switchFlag&&(f=d),e=g.nlps);else{if(this.chigh-=h,0!==(32768&i))return this.a=i,f;h>i?(d=1^f,1===g.switchFlag&&(f=d),e=g.nlps):(d=f,e=g.nmps)}do 0===this.ct&&this.byteIn(),i<<=1,this.chigh=this.chigh<<1&65535|this.clow>>15&1,this.clow=this.clow<<1&65535,this.ct--;while(0===(32768&i));return this.a=i,a[c]=e<<1|f,d}},a}(),gd=function(){function a(){}function b(a,b){for(var c,d,e=0,f=[],g=16;g>0&&!a[g-1];)g--;f.push({children:[],index:0});var h,i=f[0];for(c=0;g>c;c++){for(d=0;d0;)i=f.pop();for(i.index++,f.push(i);f.length<=c;)f.push(h={children:[],index:0}),i.children[i.index]=h.children,i=h;e++}g>c+1&&(f.push(h={children:[],index:0}),i.children[i.index]=h.children,i=h)}return f[0].children}function c(a,b,c){return 64*((a.blocksPerLine+1)*b+c)}function d(a,b,d,e,f,g,i,j,k){function l(){if(H>0)return H--,G>>H&1;if(G=a[b++],255===G){var c=a[b++];if(c)throw"unexpected marker: "+(G<<8|c).toString(16)}return H=7,G>>>7}function m(a){for(var b=a;;){if(b=b[l()],"number"==typeof b)return b;if("object"!=typeof b)throw"invalid huffman sequence"}}function n(a){for(var b=0;a>0;)b=b<<1|l(),a--;return b}function o(a){if(1===a)return 1===l()?1:-1;var b=n(a);return b>=1<e;){var f=m(a.huffmanTableAC),g=15&f,i=f>>4;if(0!==g){e+=i;var j=h[e];a.blockData[b+j]=o(g),e++}else{if(15>i)break;e+=16}}}function q(a,b){var c=m(a.huffmanTableDC),d=0===c?0:o(c)<0)return void I--;for(var c=g,d=i;d>=c;){var e=m(a.huffmanTableAC),f=15&e,j=e>>4;if(0!==f){c+=j;var l=h[c];a.blockData[b+l]=o(f)*(1<j){I=n(j)+(1<=e;){var p=h[e];switch(J){case 0:if(d=m(a.huffmanTableAC),c=15&d,j=d>>4,0===c)15>j?(I=n(j)+(1<N;){for(y=0;K>y;y++)e[y].pred=0;if(I=0,1===K)for(x=e[0],B=0;f>B;B++)v(x,C,N),N++;else for(B=0;f>B;B++){for(y=0;K>y;y++)for(x=e[y],O=x.h,P=x.v,z=0;P>z;z++)for(A=0;O>A;A++)u(x,C,N,z,A);N++}if(H=0,L=a[b]<<8|a[b+1],65280>=L)throw"marker was not found";if(!(L>=65488&&65495>=L))break;b+=2}return b-F}function e(a,b,c){for(var d,e,f,g,h,q,r,s,t,u,v,w,x,y,z,A,B,C=a.quantizationTable,D=a.blockData,E=0;64>E;E+=8)t=D[b+E],u=D[b+E+1],v=D[b+E+2],w=D[b+E+3],x=D[b+E+4],y=D[b+E+5],z=D[b+E+6],A=D[b+E+7],t*=C[E],0!==(u|v|w|x|y|z|A)?(u*=C[E+1],v*=C[E+2],w*=C[E+3],x*=C[E+4],y*=C[E+5],z*=C[E+6],A*=C[E+7],d=o*t+128>>8,e=o*x+128>>8,f=v,g=z,h=p*(u-A)+128>>8,s=p*(u+A)+128>>8,q=w<<4,r=y<<4,d=d+e+1>>1,e=d-e,B=f*n+g*m+128>>8,f=f*m-g*n+128>>8,g=B,h=h+r+1>>1,r=h-r,s=s+q+1>>1,q=s-q,d=d+g+1>>1,g=d-g,e=e+f+1>>1,f=e-f,B=h*l+s*k+2048>>12,h=h*k-s*l+2048>>12,s=B,B=q*j+r*i+2048>>12,q=q*i-r*j+2048>>12,r=B,c[E]=d+s,c[E+7]=d-s,c[E+1]=e+r,c[E+6]=e-r,c[E+2]=f+q,c[E+5]=f-q,c[E+3]=g+h,c[E+4]=g-h):(B=o*t+512>>10,c[E]=B,c[E+1]=B,c[E+2]=B,c[E+3]=B,c[E+4]=B,c[E+5]=B,c[E+6]=B,c[E+7]=B);for(var F=0;8>F;++F)t=c[F],u=c[F+8],v=c[F+16],w=c[F+24],x=c[F+32],y=c[F+40],z=c[F+48],A=c[F+56],0!==(u|v|w|x|y|z|A)?(d=o*t+2048>>12,e=o*x+2048>>12,f=v,g=z,h=p*(u-A)+2048>>12,s=p*(u+A)+2048>>12,q=w,r=y,d=(d+e+1>>1)+4112,e=d-e,B=f*n+g*m+2048>>12,f=f*m-g*n+2048>>12,g=B,h=h+r+1>>1,r=h-r,s=s+q+1>>1,q=s-q,d=d+g+1>>1,g=d-g,e=e+f+1>>1,f=e-f,B=h*l+s*k+2048>>12,h=h*k-s*l+2048>>12,s=B,B=q*j+r*i+2048>>12,q=q*i-r*j+2048>>12,r=B,t=d+s,A=d-s,u=e+r,z=e-r,v=f+q,y=f-q,w=g+h,x=g-h,t=16>t?0:t>=4080?255:t>>4,u=16>u?0:u>=4080?255:u>>4,v=16>v?0:v>=4080?255:v>>4,w=16>w?0:w>=4080?255:w>>4,x=16>x?0:x>=4080?255:x>>4,y=16>y?0:y>=4080?255:y>>4,z=16>z?0:z>=4080?255:z>>4,A=16>A?0:A>=4080?255:A>>4,D[b+F]=t,D[b+F+8]=u,D[b+F+16]=v,D[b+F+24]=w,D[b+F+32]=x,D[b+F+40]=y,D[b+F+48]=z,D[b+F+56]=A):(B=o*t+8192>>14,B=-2040>B?0:B>=2024?255:B+2056>>4,D[b+F]=B,D[b+F+8]=B,D[b+F+16]=B,D[b+F+24]=B,D[b+F+32]=B,D[b+F+40]=B,D[b+F+48]=B,D[b+F+56]=B)}function f(a,b){for(var d=b.blocksPerLine,f=b.blocksPerColumn,g=new Int16Array(64),h=0;f>h;h++)for(var i=0;d>i;i++){var j=c(b,h,i);e(b,j,g)}return b.blockData}function g(a){return 0>=a?0:a>=255?255:a}var h=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),i=4017,j=799,k=3406,l=2276,m=1567,n=3784,o=5793,p=2896;return a.prototype={parse:function(a){function c(){var b=a[k]<<8|a[k+1];return k+=2,b}function e(){var b=c(),d=a.subarray(k,k+b-2);return k+=d.length,d}function g(a){for(var b=Math.ceil(a.samplesPerLine/8/a.maxH),c=Math.ceil(a.scanLines/8/a.maxV),d=0;dk;){var y=a[k++],z=new Uint16Array(64);if(y>>4===0)for(s=0;64>s;s++)v=h[s],z[v]=a[k++];else{if(y>>4!==1)throw"DQT: invalid table spec";for(s=0;64>s;s++)v=h[s],z[v]=c()}n[15&y]=z}break;case 65472:case 65473:case 65474:if(i)throw"Only single frame JPEGs supported";c(),i={},i.extended=65473===q,i.progressive=65474===q,i.precision=a[k++],i.scanLines=c(),i.samplesPerLine=c(),i.components=[],i.componentIds={};var A,B=a[k++],C=0,D=0;for(r=0;B>r;r++){A=a[k];var E=a[k+1]>>4,F=15&a[k+1];E>C&&(C=E),F>D&&(D=F);var G=a[k+2];t=i.components.push({h:E,v:F,quantizationTable:n[G]}),i.componentIds[A]=t-1,k+=3}i.maxH=C,i.maxV=D,g(i);break;case 65476:var H=c();for(r=2;H>r;){var I=a[k++],J=new Uint8Array(16),K=0;for(s=0;16>s;s++,k++)K+=J[s]=a[k];var L=new Uint8Array(K);for(s=0;K>s;s++,k++)L[s]=a[k];r+=17+K,(I>>4===0?p:o)[15&I]=b(J,L)}break;case 65501:c(),j=c();break;case 65498:var M,N=(c(),a[k++]),O=[];for(r=0;N>r;r++){var P=i.componentIds[a[k++]];M=i.components[P];var Q=a[k++];M.huffmanTableDC=p[Q>>4],M.huffmanTableAC=o[15&Q],O.push(M)}var R=a[k++],S=a[k++],T=a[k++],U=d(a,k,i,O,j,R,S,T>>4,15&T);k+=U;break;case 65535:255!==a[k]&&k--;break;default:if(255===a[k-3]&&a[k-2]>=192&&a[k-2]<=254){k-=3;break}throw"unknown JPEG marker "+q.toString(16)}q=c()}for(this.width=i.samplesPerLine,this.height=i.scanLines,this.jfif=l,this.adobe=m,this.components=[],r=0;ri;i++){for(c=this.components[i],d=c.scaleX*n,e=c.scaleY*o,p=i,m=c.output,f=c.blocksPerLine+1<<3,g=0;a>g;g++)j=0|g*d,t[g]=(j&u)<<3|7&j;for(h=0;b>h;h++)for(j=0|h*e,l=f*(j&u)|(7&j)<<3,g=0;a>g;g++)s[p]=m[l+t[g]],p+=q}var v=this.decodeTransform;if(v)for(i=0;r>i;)for(j=0,k=0;q>j;j++,i++,k+=2)s[i]=(s[i]*v[k]>>8)+v[k+1];return s},_isColorConversionNeeded:function(){return this.adobe&&this.adobe.transformCode?!0:3===this.numComponents},_convertYccToRgb:function(a){for(var b,c,d,e=0,f=a.length;f>e;e+=3)b=a[e],c=a[e+1],d=a[e+2],a[e]=g(b-179.456+1.402*d),a[e+1]=g(b+135.459-.344*c-.714*d),a[e+2]=g(b-226.816+1.772*c);return a},_convertYcckToRgb:function(a){for(var b,c,d,e,f=0,h=0,i=a.length;i>h;h+=4){b=a[h],c=a[h+1],d=a[h+2],e=a[h+3];var j=-122.67195406894+c*(-660635669420364e-19*c+.000437130475926232*d-54080610064599e-18*b+.00048449797120281*e-.154362151871126)+d*(-.000957964378445773*d+.000817076911346625*b-.00477271405408747*e+1.53380253221734)+b*(.000961250184130688*b-.00266257332283933*e+.48357088451265)+e*(-.000336197177618394*e+.484791561490776),k=107.268039397724+c*(219927104525741e-19*c-.000640992018297945*d+.000659397001245577*b+.000426105652938837*e-.176491792462875)+d*(-.000778269941513683*d+.00130872261408275*b+.000770482631801132*e-.151051492775562)+b*(.00126935368114843*b-.00265090189010898*e+.25802910206845)+e*(-.000318913117588328*e-.213742400323665),l=-20.810012546947+c*(-.000570115196973677*c-263409051004589e-19*d+.0020741088115012*b-.00288260236853442*e+.814272968359295)+d*(-153496057440975e-19*d-.000132689043961446*b+.000560833691242812*e-.195152027534049)+b*(.00174418132927582*b-.00255243321439347*e+.116935020465145)+e*(-.000343531996510555*e+.24165260232407);a[f++]=g(j),a[f++]=g(k),a[f++]=g(l)}return a},_convertYcckToCmyk:function(a){for(var b,c,d,e=0,f=a.length;f>e;e+=4)b=a[e],c=a[e+1],d=a[e+2],a[e]=g(434.456-b-1.402*d),a[e+1]=g(119.541-b+.344*c+.714*d),a[e+2]=g(481.816-b-1.772*c);return a},_convertCmykToRgb:function(a){for(var b,c,d,e,f=0,g=-16581375,h=1/255/255,i=0,j=a.length;j>i;i+=4){b=a[i],c=a[i+1],d=a[i+2],e=a[i+3];var k=b*(-4.387332384609988*b+54.48615194189176*c+18.82290502165302*d+212.25662451639585*e-72734.4411664936)+c*(1.7149763477362134*c-5.6096736904047315*d-17.873870861415444*e-1401.7366389350734)+d*(-2.5217340131683033*d-21.248923337353073*e+4465.541406466231)-e*(21.86122147463605*e+48317.86113160301),l=b*(8.841041422036149*b+60.118027045597366*c+6.871425592049007*d+31.159100130055922*e-20220.756542821975)+c*(-15.310361306967817*c+17.575251261109482*d+131.35250912493976*e-48691.05921601825)+d*(4.444339102852739*d+9.8632861493405*e-6341.191035517494)-e*(20.737325471181034*e+47890.15695978492),m=b*(.8842522430003296*b+8.078677503112928*c+30.89978309703729*d-.23883238689178934*e-3616.812083916688)+c*(10.49593273432072*c+63.02378494754052*d+50.606957656360734*e-28620.90484698408)+d*(.03296041114873217*d+115.60384449646641*e-49363.43385999684)-e*(22.33816807309886*e+45932.16563550634);a[f++]=k>=0?255:g>=k?0:255+k*h|0,a[f++]=l>=0?255:g>=l?0:255+l*h|0,a[f++]=m>=0?255:g>=m?0:255+m*h|0}return a},getData:function(a,b,c){if(this.numComponents>4)throw"Unsupported color mode";var d=this._getLinearizedBlockData(a,b);if(3===this.numComponents)return this._convertYccToRgb(d);if(4===this.numComponents){if(this._isColorConversionNeeded())return c?this._convertYcckToRgb(d):this._convertYcckToCmyk(d);if(c)return this._convertCmykToRgb(d)}return d}},a}(),hd=function(){function c(){this.failOnCorruptedImage=!1}function d(a,b){a.x0=Math.ceil(b.XOsiz/a.XRsiz),a.x1=Math.ceil(b.Xsiz/a.XRsiz),a.y0=Math.ceil(b.YOsiz/a.YRsiz),a.y1=Math.ceil(b.Ysiz/a.YRsiz),a.width=a.x1-a.x0,a.height=a.y1-a.y0}function e(a,b){for(var c,d=a.SIZ,e=[],f=Math.ceil((d.Xsiz-d.XTOsiz)/d.XTsiz),g=Math.ceil((d.Ysiz-d.YTOsiz)/d.YTsiz),h=0;g>h;h++)for(var i=0;f>i;i++)c={},c.tx0=Math.max(d.XTOsiz+i*d.XTsiz,d.XOsiz),c.ty0=Math.max(d.YTOsiz+h*d.YTsiz,d.YOsiz),c.tx1=Math.min(d.XTOsiz+(i+1)*d.XTsiz,d.Xsiz),c.ty1=Math.min(d.YTOsiz+(h+1)*d.YTsiz,d.Ysiz),c.width=c.tx1-c.tx0,c.height=c.ty1-c.ty0,c.components=[],e.push(c);a.tiles=e;for(var j=d.Csiz,k=0,l=j;l>k;k++)for(var m=b[k],n=0,o=e.length;o>n;n++){var p={};c=e[n],p.tcx0=Math.ceil(c.tx0/m.XRsiz),p.tcy0=Math.ceil(c.ty0/m.YRsiz),p.tcx1=Math.ceil(c.tx1/m.XRsiz),p.tcy1=Math.ceil(c.ty1/m.YRsiz),p.width=p.tcx1-p.tcx0,p.height=p.tcy1-p.tcy0,c.components[k]=p}}function f(a,b,c){var d=b.codingStyleParameters,e={};return d.entropyCoderWithCustomPrecincts?(e.PPx=d.precinctsSizes[c].PPx,e.PPy=d.precinctsSizes[c].PPy):(e.PPx=15,e.PPy=15),e.xcb_=c>0?Math.min(d.xcb,e.PPx-1):Math.min(d.xcb,e.PPx),e.ycb_=c>0?Math.min(d.ycb,e.PPy-1):Math.min(d.ycb,e.PPy),e}function g(a,b,c){var d=1<b.trx0?Math.ceil(b.trx1/d)-Math.floor(b.trx0/d):0,j=b.try1>b.try0?Math.ceil(b.try1/e)-Math.floor(b.try0/e):0,k=i*j;b.precinctParameters={precinctWidth:d,precinctHeight:e,numprecinctswide:i,numprecinctshigh:j,numprecincts:k,precinctWidthInSubband:g,precinctHeightInSubband:h}}function h(a,b,c){var d,e,f,g,h=c.xcb_,i=c.ycb_,j=1<>h,m=b.tby0>>i,n=b.tbx1+j-1>>h,o=b.tby1+k-1>>i,p=b.resolution.precinctParameters,q=[],r=[];for(e=m;o>e;e++)for(d=l;n>d;d++){f={cbx:d,cby:e,tbx0:j*d,tby0:k*e,tbx1:j*(d+1),tby1:k*(e+1)},f.tbx0_=Math.max(b.tbx0,f.tbx0),f.tby0_=Math.max(b.tby0,f.tby0),f.tbx1_=Math.min(b.tbx1,f.tbx1),f.tby1_=Math.min(b.tby1,f.tby1);var s=Math.floor((f.tbx0_-b.tbx0)/p.precinctWidthInSubband),t=Math.floor((f.tby0_-b.tby0)/p.precinctHeightInSubband);if(g=s+t*p.numprecinctswide,f.precinctNumber=g,f.subbandType=b.type,f.Lblock=3,!(f.tbx1_<=f.tbx0_||f.tby1_<=f.tby0_)){q.push(f);var u=r[g];void 0!==u?(du.cbxMax&&(u.cbxMax=d),eu.cbyMax&&(u.cbyMax=e)):r[g]=u={cbxMin:d,cbyMin:e,cbxMax:d,cbyMax:e},f.precinct=u}}b.codeblockParameters={codeblockWidth:h,codeblockHeight:i,numcodeblockwide:n-l+1,numcodeblockhigh:o-m+1},b.codeblocks=q,b.precincts=r}function i(a,b,c){for(var d=[],e=a.subbands,f=0,g=e.length;g>f;f++)for(var h=e[f],i=h.codeblocks,j=0,k=i.length;k>j;j++){var l=i[j];l.precinctNumber===b&&d.push(l)}return{layerNumber:c,codeblocks:d}}function j(a){for(var b=a.SIZ,c=a.currentTile.index,d=a.tiles[c],e=d.codingStyleDefaultParameters.layersCount,f=b.Csiz,g=0,h=0;f>h;h++)g=Math.max(g,d.components[h].codingStyleParameters.decompositionLevelsCount);var j=0,k=0,l=0,m=0;this.nextPacket=function(){for(;e>j;j++){for(;g>=k;k++){for(;f>l;l++){var a=d.components[l];if(!(k>a.codingStyleParameters.decompositionLevelsCount)){for(var b=a.resolutions[k],c=b.precinctParameters.numprecincts;c>m;){var h=i(b,m,j);return m++,h}m=0}}l=0}k=0}throw new Error("JPX Error: Out of packets")}}function k(a){for(var b=a.SIZ,c=a.currentTile.index,d=a.tiles[c],e=d.codingStyleDefaultParameters.layersCount,f=b.Csiz,g=0,h=0;f>h;h++)g=Math.max(g,d.components[h].codingStyleParameters.decompositionLevelsCount);var j=0,k=0,l=0,m=0;this.nextPacket=function(){for(;g>=j;j++){for(;e>k;k++){for(;f>l;l++){var a=d.components[l];if(!(j>a.codingStyleParameters.decompositionLevelsCount)){for(var b=a.resolutions[j],c=b.precinctParameters.numprecincts;c>m;){var h=i(b,m,k);return m++,h}m=0}}l=0}k=0}throw new Error("JPX Error: Out of packets")}}function m(a){var b,c,d,e,f=a.SIZ,g=a.currentTile.index,h=a.tiles[g],j=h.codingStyleDefaultParameters.layersCount,k=f.Csiz,l=0;for(d=0;k>d;d++){var m=h.components[d];l=Math.max(l,m.codingStyleParameters.decompositionLevelsCount)}var n=new Int32Array(l+1);for(c=0;l>=c;++c){var o=0;for(d=0;k>d;++d){var p=h.components[d].resolutions;c=c;c++){for(;ed;d++){var a=h.components[d];if(!(c>a.codingStyleParameters.decompositionLevelsCount)){var f=a.resolutions[c],g=f.precinctParameters.numprecincts;if(!(e>=g)){for(;j>b;){var m=i(f,e,b);return b++,m}b=0}}}d=0}e=0}throw new Error("JPX Error: Out of packets")}}function p(a){var b=a.SIZ,c=a.currentTile.index,d=a.tiles[c],e=d.codingStyleDefaultParameters.layersCount,f=b.Csiz,g=s(d),h=g,j=0,k=0,l=0,m=0,n=0;this.nextPacket=function(){for(;nl;l++){for(var a=d.components[l],b=a.codingStyleParameters.decompositionLevelsCount;b>=k;k++){var c=a.resolutions[k],o=g.components[l].resolutions[k],p=r(m,n,o,h,c);if(null!==p){for(;e>j;){var q=i(c,p,j);return j++,q}j=0}}k=0}l=0}m=0}throw new Error("JPX Error: Out of packets")}}function q(a){var b=a.SIZ,c=a.currentTile.index,d=a.tiles[c],e=d.codingStyleDefaultParameters.layersCount,f=b.Csiz,g=s(d),h=0,j=0,k=0,l=0,m=0;this.nextPacket=function(){for(;f>k;++k){for(var a=d.components[k],b=g.components[k],c=a.codingStyleParameters.decompositionLevelsCount;m=j;j++){var n=a.resolutions[j],o=b.resolutions[j],p=r(l,m,o,b,n);if(null!==p){for(;e>h;){var q=i(n,p,h);return h++,q}h=0}}j=0}l=0}m=0}throw new Error("JPX Error: Out of packets")}}function r(a,b,c,d,e){var f=a*d.minWidth,g=b*d.minHeight;if(f%c.width!==0||g%c.height!==0)return null;var h=g/c.width*e.precinctParameters.numprecinctswide;return f/c.height+h}function s(a){for(var b=a.components.length,c=Number.MAX_VALUE,d=Number.MAX_VALUE,e=0,f=0,g=new Array(b),h=0;b>h;h++){for(var i=a.components[h],j=i.codingStyleParameters.decompositionLevelsCount,k=new Array(j+1),l=Number.MAX_VALUE,m=Number.MAX_VALUE,n=0,o=0,p=1,q=j;q>=0;--q){var r=i.resolutions[q],s=p*r.precinctParameters.precinctWidth,t=p*r.precinctParameters.precinctHeight;l=Math.min(l,s),m=Math.min(m,t),n=Math.max(n,r.precinctParameters.numprecinctswide),o=Math.max(o,r.precinctParameters.numprecinctshigh),k[q]={width:s,height:t},p<<=1}c=Math.min(c,l),d=Math.min(d,m),e=Math.max(e,n),f=Math.max(f,o),g[h]={resolutions:k,minWidth:l,minHeight:m,maxNumWide:n,maxNumHigh:o}}return{components:g,minWidth:c,minHeight:d,maxNumWide:e,maxNumHigh:f}}function t(a){for(var b=a.SIZ,c=a.currentTile.index,d=a.tiles[c],e=b.Csiz,i=0;e>i;i++){for(var l=d.components[i],n=l.codingStyleParameters.decompositionLevelsCount,o=[],r=[],s=0;n>=s;s++){var t=f(a,l,s),u={},v=1<m;){var d=b[c+k];k++,n?(j=j<<7|d,m+=7,n=!1):(j=j<<8|d,m+=8),255===d&&(n=!0)}return m-=a,j>>>m&(1<a?a+3:(a=e(5),31>a?a+6:(a=e(7),a+37))}for(var j,k=0,m=0,n=!1,o=a.currentTile.index,p=a.tiles[o],q=a.COD.sopMarkerUsed,r=a.COD.ephMarkerUsed,s=p.packetsIterator;d>k;){h(),q&&f(145)&&g(4);var t=s.nextPacket();if(e(1)){for(var u,v=t.layerNumber,w=[],x=0,y=t.codeblocks.length;y>x;x++){u=t.codeblocks[x];var z,C=u.precinct,D=u.cbx-C.cbxMin,E=u.cby-C.cbyMin,F=!1,G=!1;if(void 0!==u.included)F=!!e(1);else{C=u.precinct;var H,I;if(void 0!==C.inclusionTree)H=C.inclusionTree;else{var J=C.cbxMax-C.cbxMin+1,K=C.cbyMax-C.cbyMin+1;H=new B(J,K,v),I=new A(J,K),C.inclusionTree=H,C.zeroBitPlanesTree=I}if(H.reset(D,E,v))for(;;){if(!e(1)){H.incrementValue(v);break}if(z=!H.nextLevel()){u.included=!0,F=G=!0;break}}}if(F){if(G){for(I=C.zeroBitPlanesTree,I.reset(D,E);;)if(e(1)){if(z=!I.nextLevel())break}else I.incrementValue();u.zeroBitPlanes=I.value}for(var L=i();e(1);)u.Lblock++;var M=l(L),N=(1<L?M-1:M)+u.Lblock,O=e(N);w.push({codeblock:u,codingpasses:L,dataLength:O})}}for(h(),r&&f(146);w.length>0;){var P=w.shift();u=P.codeblock,void 0===u.data&&(u.data=[]),u.data.push({data:b,start:c+k,end:c+k+P.dataLength,codingpasses:P.codingpasses}),k+=P.dataLength}}}return k}function v(a,b,c,d,e,f,g,h){for(var i=d.tbx0,j=d.tby0,k=d.tbx1-d.tbx0,l=d.codeblocks,m="H"===d.type.charAt(0)?1:0,n="H"===d.type.charAt(1)?b:0,o=0,p=l.length;p>o;++o){var q=l[o],r=q.tbx1_-q.tbx0_,s=q.tby1_-q.tby0_;if(0!==r&&0!==s&&void 0!==q.data){var t,u;t=new C(r,s,q.subbandType,q.zeroBitPlanes,f),u=2;var v,w,x,y=q.data,z=0,A=0;for(v=0,w=y.length;w>v;v++)x=y[v],z+=x.end-x.start,A+=x.codingpasses;var B=new Uint8Array(z),D=0;for(v=0,w=y.length;w>v;v++){x=y[v];var E=x.data.subarray(x.start,x.end);B.set(E,D),D+=E.length}var F=new fd(B,0,z);for(t.setDecoder(F),v=0;A>v;v++){switch(u){case 0:t.runSignificancePropogationPass();break;case 1:t.runMagnitudeRefinementPass();break;case 2:t.runCleanupPass(),h&&t.checkSegmentationSymbol()}u=(u+1)%3}var G,H,I,J=q.tbx0_-i+(q.tby0_-j)*k,K=t.coefficentsSign,L=t.coefficentsMagnitude,M=t.bitsDecoded,N=g?0:.5;D=0;var O="LL"!==d.type;for(v=0;s>v;v++){var P=J/k|0,Q=2*P*(b-k)+m+n;for(G=0;r>G;G++){if(H=L[D],0!==H){H=(H+N)*e,0!==K[D]&&(H=-H),I=M[D];var R=O?Q+(J<<1):J;g&&I>=f?a[R]=H:a[R]=H*(1<=q;q++){for(var r=d.resolutions[q],s=r.trx1-r.trx0,t=r.try1-r.try0,u=new Float32Array(s*t),w=0,x=r.subbands.length;x>w;w++){var y,A;i?(y=h[p].mu,A=h[p].epsilon,p++):(y=h[0].mu,A=h[0].epsilon+(q>0?1-q:0));var B=r.subbands[w],C=z[B.type],D=m?1:Math.pow(2,l+C-A)*(1+y/2048),G=j+A-1;v(u,s,t,B,D,G,m,k)}o.push({width:s,height:t,items:u})}var H=n.calculate(o,d.tcx0,d.tcy0);return{left:d.tcx0,top:d.tcy0,width:H.width,height:H.height,items:H.items}}function x(a){for(var b=a.SIZ,c=a.components,d=b.Csiz,e=[],f=0,g=a.tiles.length;g>f;f++){var h,i=a.tiles[f],j=[];for(h=0;d>h;h++)j[h]=w(a,i,h);var k,l,m,n,o,p,q,r,s,t,u,v,x,y,z,A=j[0],B=new Uint8Array(A.items.length*d),C={left:A.left,top:A.top,width:A.width,height:A.height,items:B},D=0;if(i.codingStyleDefaultParameters.multipleComponentTransform){var E=4===d,F=j[0].items,G=j[1].items,H=j[2].items,I=E?j[3].items:null;k=c[0].precision-8,l=(128<p;p++,D+=K)r=F[p]+l,s=G[p],t=H[p],v=r-(t+s>>2),u=v+t,x=v+s,B[D++]=0>=u?0:u>=m?255:u>>k,B[D++]=0>=v?0:v>=m?255:v>>k,B[D++]=0>=x?0:x>=m?255:x>>k;else for(p=0;q>p;p++,D+=K)r=F[p]+l,s=G[p],t=H[p],u=r+1.402*t,v=r-.34413*s-.71414*t,x=r+1.772*s,B[D++]=0>=u?0:u>=m?255:u>>k,B[D++]=0>=v?0:v>=m?255:v>>k,B[D++]=0>=x?0:x>=m?255:x>>k;if(E)for(p=0,D=3;q>p;p++,D+=4)y=I[p],B[D]=n>=y?0:y>=o?255:y+l>>k}else for(h=0;d>h;h++){var L=j[h].items;for(k=c[h].precision-8,l=(128<p;p++)z=L[p],B[D]=n>=z?0:z>=m?255:z+l>>k,D+=d}e.push(C)}return e}function y(a,b){for(var c=a.SIZ,d=c.Csiz,e=a.tiles[b],f=0;d>f;f++){var g=e.components[f],h=void 0!==a.currentTile.QCC[f]?a.currentTile.QCC[f]:a.currentTile.QCD;g.quantizationParameters=h;var i=void 0!==a.currentTile.COC[f]?a.currentTile.COC[f]:a.currentTile.COD;g.codingStyleParameters=i}e.codingStyleDefaultParameters=a.currentTile.COD}var z={LL:0,LH:1,HL:1,HH:2};c.prototype={parse:function(c){var d=n(c,0);if(65359===d)return void this.parseCodestream(c,0,c.length);for(var e=0,f=c.length;f>e;){var g=8,h=o(c,e),i=o(c,e+4);if(e+=g,1===h&&(h=4294967296*o(c,e)+o(c,e+4),e+=8,g+=8),0===h&&(h=f-e+g),g>h)throw new Error("JPX Error: Invalid box field size");var j=h-g,k=!0;switch(i){case 1785737832:k=!1;break;case 1668246642:var l=c[e];c[e+1],c[e+2];if(1===l){var m=o(c,e+3);switch(m){case 16:case 17:case 18:break;default:b("Unknown colorspace "+m)}}else 2===l&&a("ICC profile not supported");break;case 1785737827:this.parseCodestream(c,e,e+j);break;case 1783636e3:218793738!==o(c,e)&&b("Invalid JP2 signature");break;case 1783634458:case 1718909296:case 1920099697:case 1919251232:case 1768449138:break;default:var p=String.fromCharCode(i>>24&255,i>>16&255,i>>8&255,255&i);b("Unsupported header type "+i+" ("+p+")")}k&&(e+=j)}},parseImageProperties:function(a){for(var b=a.getByte();b>=0;){var c=b;b=a.getByte();var d=c<<8|b;if(65361===d){a.skip(4);var e=a.getInt32()>>>0,f=a.getInt32()>>>0,g=a.getInt32()>>>0,h=a.getInt32()>>>0;a.skip(16);var i=a.getUint16();return this.width=e-g,this.height=f-h,this.componentsCount=i,void(this.bitsPerComponent=8)}}throw new Error("JPX Error: No size marker found in JPX stream")},parseCodestream:function(a,c,f){var g={};try{for(var h=!1,i=c;f>i+1;){var j=n(a,i);i+=2;var k,l,m,p,q,r,s=0;switch(j){case 65359:g.mainHeader=!0;break;case 65497:break;case 65361:s=n(a,i);var v={};v.Xsiz=o(a,i+4),v.Ysiz=o(a,i+8),v.XOsiz=o(a,i+12),v.YOsiz=o(a,i+16),v.XTsiz=o(a,i+20),v.YTsiz=o(a,i+24),v.XTOsiz=o(a,i+28),v.YTOsiz=o(a,i+32);var w=n(a,i+36);v.Csiz=w;var z=[];k=i+38;for(var A=0;w>A;A++){var B={precision:(127&a[k])+1,isSigned:!!(128&a[k]),XRsiz:a[k+1],YRsiz:a[k+1]};d(B,v),z.push(B)}g.SIZ=v,g.components=z,e(g,z),g.QCC=[],g.COC=[];break;case 65372:s=n(a,i);var C={};switch(k=i+2,l=a[k++],31&l){case 0:p=8,q=!0;break;case 1:p=16,q=!1;break;case 2:p=16,q=!0;break;default:throw new Error("JPX Error: Invalid SQcd value "+l)}for(C.noQuantization=8===p,C.scalarExpounded=q,C.guardBits=l>>5,m=[];s+i>k;){var D={};8===p?(D.epsilon=a[k++]>>3,D.mu=0):(D.epsilon=a[k]>>3,D.mu=(7&a[k])<<8|a[k+1],k+=2),m.push(D)}C.SPqcds=m,g.mainHeader?g.QCD=C:(g.currentTile.QCD=C,g.currentTile.QCC=[]);break;case 65373:s=n(a,i);var E={};k=i+2;var F;switch(g.SIZ.Csiz<257?F=a[k++]:(F=n(a,k),k+=2),l=a[k++],31&l){case 0:p=8,q=!0;break;case 1:p=16,q=!1;break;case 2:p=16,q=!0;break;default:throw new Error("JPX Error: Invalid SQcd value "+l)}for(E.noQuantization=8===p,E.scalarExpounded=q,E.guardBits=l>>5,m=[];s+i>k;)D={},8===p?(D.epsilon=a[k++]>>3,D.mu=0):(D.epsilon=a[k]>>3,D.mu=(7&a[k])<<8|a[k+1],k+=2),m.push(D);E.SPqcds=m,g.mainHeader?g.QCC[F]=E:g.currentTile.QCC[F]=E;break;case 65362:s=n(a,i);var G={};k=i+2;var H=a[k++];G.entropyCoderWithCustomPrecincts=!!(1&H),G.sopMarkerUsed=!!(2&H),G.ephMarkerUsed=!!(4&H),G.progressionOrder=a[k++],G.layersCount=n(a,k),k+=2,G.multipleComponentTransform=a[k++],G.decompositionLevelsCount=a[k++],G.xcb=(15&a[k++])+2,G.ycb=(15&a[k++])+2;var I=a[k++];if(G.selectiveArithmeticCodingBypass=!!(1&I),G.resetContextProbabilities=!!(2&I),G.terminationOnEachCodingPass=!!(4&I),G.verticalyStripe=!!(8&I),G.predictableTermination=!!(16&I),G.segmentationSymbolUsed=!!(32&I),G.reversibleTransformation=a[k++],G.entropyCoderWithCustomPrecincts){for(var J=[];s+i>k;){var K=a[k++];J.push({PPx:15&K,PPy:K>>4})}G.precinctsSizes=J}var L=[];if(G.selectiveArithmeticCodingBypass&&L.push("selectiveArithmeticCodingBypass"),G.resetContextProbabilities&&L.push("resetContextProbabilities"),G.terminationOnEachCodingPass&&L.push("terminationOnEachCodingPass"),G.verticalyStripe&&L.push("verticalyStripe"),G.predictableTermination&&L.push("predictableTermination"),L.length>0)throw h=!0,new Error("JPX Error: Unsupported COD options ("+L.join(", ")+")");g.mainHeader?g.COD=G:(g.currentTile.COD=G,g.currentTile.COC=[]);break;case 65424:s=n(a,i),r={},r.index=n(a,i+2),r.length=o(a,i+4),r.dataEnd=r.length+i-2,r.partIndex=a[i+8],r.partsCount=a[i+9],g.mainHeader=!1,0===r.partIndex&&(r.COD=g.COD,r.COC=g.COC.slice(0),r.QCD=g.QCD,r.QCC=g.QCC.slice(0)),g.currentTile=r;break;case 65427:r=g.currentTile,0===r.partIndex&&(y(g,r.index),t(g)),s=r.dataEnd-i,u(g,a,i,s);break;case 65365:case 65367:case 65368:case 65380:s=n(a,i);break;case 65363:throw new Error("JPX Error: Codestream code 0xFF53 (COC) is not implemented");default:throw new Error("JPX Error: Unknown codestream code: "+j.toString(16))}i+=s}}catch(M){if(h||this.failOnCorruptedImage)throw M;b("Trying to recover from "+M.message)}this.tiles=x(g),this.width=g.SIZ.Xsiz-g.SIZ.XOsiz,this.height=g.SIZ.Ysiz-g.SIZ.YOsiz,this.componentsCount=g.SIZ.Csiz}};var A=function(){function a(a,b){var c=l(Math.max(a,b))+1;this.levels=[];for(var d=0;c>d;d++){var e={width:a,height:b,items:[]};this.levels.push(e),a=Math.ceil(a/2),b=Math.ceil(b/2)}}return a.prototype={reset:function(a,b){for(var c,d=0,e=0;d>=1,b>>=1,d++}d--,c=this.levels[d],c.items[c.index]=e,this.currentLevel=d,delete this.value},incrementValue:function(){var a=this.levels[this.currentLevel];a.items[a.index]++},nextLevel:function(){var a=this.currentLevel,b=this.levels[a],c=b.items[b.index];return a--,0>a?(this.value=c,!1):(this.currentLevel=a,b=this.levels[a],b.items[b.index]=c,!0)}},a}(),B=function(){function a(a,b,c){var d=l(Math.max(a,b))+1;this.levels=[];for(var e=0;d>e;e++){for(var f=new Uint8Array(a*b),g=0,h=f.length;h>g;g++)f[g]=c;var i={width:a,height:b,items:f};this.levels.push(i),a=Math.ceil(a/2),b=Math.ceil(b/2)}}return a.prototype={reset:function(a,b,c){for(var d=0;dc)return this.currentLevel=d,this.propagateValues(),!1;a>>=1,b>>=1,d++}return this.currentLevel=d-1,!0},incrementValue:function(a){var b=this.levels[this.currentLevel];b.items[b.index]=a+1,this.propagateValues()},propagateValues:function(){for(var a=this.currentLevel,b=this.levels[a],c=b.items[b.index];--a>=0;)b=this.levels[a],b.items[b.index]=c},nextLevel:function(){var a=this.currentLevel,b=this.levels[a],c=b.items[b.index];return b.items[b.index]=255,a--,0>a?!1:(this.currentLevel=a,b=this.levels[a],b.items[b.index]=c,!0)}},a}(),C=function(){function a(a,b,c,g,h){this.width=a,this.height=b,this.contextLabelTable="HH"===c?f:"HL"===c?e:d;var i=a*b;this.neighborsSignificance=new Uint8Array(i),this.coefficentsSign=new Uint8Array(i),this.coefficentsMagnitude=h>14?new Uint32Array(i):h>6?new Uint16Array(i):new Uint8Array(i),this.processingFlags=new Uint8Array(i);var j=new Uint8Array(i);if(0!==g)for(var k=0;i>k;k++)j[k]=g;this.bitsDecoded=j,this.reset()}var b=17,c=18,d=new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8]),e=new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8]),f=new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]);return a.prototype={setDecoder:function(a){this.decoder=a},reset:function(){this.contexts=new Int8Array(19),this.contexts[0]=8,this.contexts[b]=92,this.contexts[c]=6},setNeighborsSignificance:function(a,b,c){var d,e=this.neighborsSignificance,f=this.width,g=this.height,h=b>0,i=f>b+1;a>0&&(d=c-f,h&&(e[d-1]+=16),i&&(e[d+1]+=16),e[d]+=4),g>a+1&&(d=c+f,h&&(e[d-1]+=16),i&&(e[d+1]+=16),e[d]+=4),h&&(e[c-1]+=1),i&&(e[c+1]+=1),e[c]|=128},runSignificancePropogationPass:function(){for(var a=this.decoder,b=this.width,c=this.height,d=this.coefficentsMagnitude,e=this.coefficentsSign,f=this.neighborsSignificance,g=this.processingFlags,h=this.contexts,i=this.contextLabelTable,j=this.bitsDecoded,k=-2,l=1,m=2,n=0;c>n;n+=4)for(var o=0;b>o;o++)for(var p=n*b+o,q=0;4>q;q++,p+=b){var r=n+q;if(r>=c)break;if(g[p]&=k,!d[p]&&f[p]){var s=i[f[p]],t=a.readBit(h,s);if(t){var u=this.decodeSignBit(r,o,p);e[p]=u,d[p]=1,this.setNeighborsSignificance(r,o,p),g[p]|=m}j[p]++,g[p]|=l}}},decodeSignBit:function(a,b,c){var d,e,f,g,h,i,j=this.width,k=this.height,l=this.coefficentsMagnitude,m=this.coefficentsSign;g=b>0&&0!==l[c-1],j>b+1&&0!==l[c+1]?(f=m[c+1],g?(e=m[c-1],d=1-f-e):d=1-f-f):g?(e=m[c-1],d=1-e-e):d=0;var n=3*d;return g=a>0&&0!==l[c-j],k>a+1&&0!==l[c+j]?(f=m[c+j],g?(e=m[c-j],d=1-f-e+n):d=1-f-f+n):g?(e=m[c-j],d=1-e-e+n):d=n,d>=0?(h=9+d,i=this.decoder.readBit(this.contexts,h)):(h=9-d,i=1^this.decoder.readBit(this.contexts,h)),i},runMagnitudeRefinementPass:function(){for(var a,b=this.decoder,c=this.width,d=this.height,e=this.coefficentsMagnitude,f=this.neighborsSignificance,g=this.contexts,h=this.bitsDecoded,i=this.processingFlags,j=1,k=2,l=c*d,m=4*c,n=0;l>n;n=a){a=Math.min(l,n+m);for(var o=0;c>o;o++)for(var p=n+o;a>p;p+=c)if(e[p]&&0===(i[p]&j)){var q=16;if(0!==(i[p]&k)){i[p]^=k;var r=127&f[p];q=0===r?15:14}var s=b.readBit(g,q);e[p]=e[p]<<1|s,h[p]++,i[p]|=j}}},runCleanupPass:function(){for(var a,d=this.decoder,e=this.width,f=this.height,g=this.neighborsSignificance,h=this.coefficentsMagnitude,i=this.coefficentsSign,j=this.contexts,k=this.contextLabelTable,l=this.bitsDecoded,m=this.processingFlags,n=1,o=2,p=e,q=2*e,r=3*e,s=0;f>s;s=a){a=Math.min(s+4,f);for(var t=s*e,u=f>s+3,v=0;e>v;v++){var w,x=t+v,y=u&&0===m[x]&&0===m[x+p]&&0===m[x+q]&&0===m[x+r]&&0===g[x]&&0===g[x+p]&&0===g[x+q]&&0===g[x+r],z=0,A=x,B=s;if(y){var C=d.readBit(j,c);if(!C){l[x]++,l[x+p]++,l[x+q]++,l[x+r]++;continue}z=d.readBit(j,b)<<1|d.readBit(j,b),0!==z&&(B=s+z,A+=z*e),w=this.decodeSignBit(B,v,A),i[A]=w,h[A]=1,this.setNeighborsSignificance(B,v,A),m[A]|=o,A=x;for(var D=s;B>=D;D++,A+=e)l[A]++;z++}for(B=s+z;a>B;B++,A+=e)if(!h[A]&&0===(m[A]&n)){var E=k[g[A]],F=d.readBit(j,E);1===F&&(w=this.decodeSignBit(B,v,A),i[A]=w,h[A]=1,this.setNeighborsSignificance(B,v,A),m[A]|=o),l[A]++}}}},checkSegmentationSymbol:function(){var a=this.decoder,c=this.contexts,d=a.readBit(c,b)<<3|a.readBit(c,b)<<2|a.readBit(c,b)<<1|a.readBit(c,b);if(10!==d)throw new Error("JPX Error: Invalid segmentation symbol")}},a}(),D=function(){function a(){}return a.prototype.calculate=function(a,b,c){for(var d=a[0],e=1,f=a.length;f>e;e++)d=this.iterate(d,a[e],b,c);return d},a.prototype.extend=function(a,b,c){var d=b-1,e=b+1,f=b+c-2,g=b+c;a[d--]=a[e++],a[g++]=a[f--],a[d--]=a[e++],a[g++]=a[f--],a[d--]=a[e++],a[g++]=a[f--],a[d]=a[e],a[g]=a[f]},a.prototype.iterate=function(a,b,c,d){var e,f,g,h,i,j,k=a.width,l=a.height,m=a.items,n=b.width,o=b.height,p=b.items;for(g=0,e=0;l>e;e++)for(h=2*e*n,f=0;k>f;f++,g++,h+=2)p[h]=m[g];m=a.items=null;var q=4,r=new Float32Array(n+2*q);if(1===n){if(0!==(1&c))for(j=0,g=0;o>j;j++,g+=n)p[g]*=.5}else for(j=0,g=0;o>j;j++,g+=n)r.set(p.subarray(g,g+n),q),this.extend(r,q,n),this.filter(r,q,n),p.set(r.subarray(q,q+n),g);var s=16,t=[];for(e=0;s>e;e++)t.push(new Float32Array(o+2*q));var u,v=0;if(a=q+o,1===o){if(0!==(1&d))for(i=0;n>i;i++)p[i]*=.5}else for(i=0;n>i;i++){if(0===v){for(s=Math.min(n-i,s),g=i,h=q;a>h;g+=n,h++)for(u=0;s>u;u++)t[u][h]=p[g+u];v=s}v--;var w=t[v];if(this.extend(w,q,o),this.filter(w,q,o),0===v)for(g=i-s+1,h=q;a>h;g+=n,h++)for(u=0;s>u;u++)p[g+u]=t[u][h]}return{width:n,height:o,items:p}},a}(),E=function(){function a(){D.call(this)}return a.prototype=Object.create(D.prototype),a.prototype.filter=function(a,b,c){var d=c>>1;b=0|b;var e,f,g,h,i=-1.586134342059924,j=-.052980118572961,k=.882911075530934,l=.443506852043971,m=1.230174104914001,n=1/m;for(e=b-3,f=d+4;f--;e+=2)a[e]*=n;for(e=b-2,g=l*a[e-1],f=d+3;f--&&(h=l*a[e+1],a[e]=m*a[e]-g-h,f--);e+=2)e+=2,g=l*a[e+1],a[e]=m*a[e]-g-h;for(e=b-1,g=k*a[e-1],f=d+2;f--&&(h=k*a[e+1],a[e]-=g+h,f--);e+=2)e+=2,g=k*a[e+1],a[e]-=g+h;for(e=b,g=j*a[e-1],f=d+1;f--&&(h=j*a[e+1],a[e]-=g+h,f--);e+=2)e+=2,g=j*a[e+1],a[e]-=g+h;if(0!==d)for(e=b+1,g=i*a[e-1],f=d;f--&&(h=i*a[e+1],a[e]-=g+h,f--);e+=2)e+=2,g=i*a[e+1],a[e]-=g+h},a}(),F=function(){function a(){D.call(this)}return a.prototype=Object.create(D.prototype),a.prototype.filter=function(a,b,c){var d=c>>1;b=0|b;var e,f;for(e=b,f=d+1;f--;e+=2)a[e]-=a[e-1]+a[e+1]+2>>2;for(e=b+1,f=d;f--;e+=2)a[e]+=a[e-1]+a[e+1]>>1},a}();return c}(),id=function(){function a(){}function b(a,b,c){this.data=a,this.start=b,this.end=c}function d(a,b,c){function d(a){for(var b=0,d=0;a>d;d++){var g=c.readBit(e,f);f=256>f?f<<1|g:511&(f<<1|g)|256,b=b<<1|g}return b>>>0}var e=a.getContexts(b),f=1,g=d(1),h=d(1)?d(1)?d(1)?d(1)?d(1)?d(32)+4436:d(12)+340:d(8)+84:d(6)+20:d(4)+4:d(2);return 0===g?h:h>0?-h:null}function e(a,b,c){for(var d=a.getContexts("IAID"),e=1,f=0;c>f;f++){var g=b.readBit(d,e);e=e<<1|g}return 31>c?e&(1<e;e++)for(h=m[e]=new Uint8Array(a),i=1>e?h:m[e-1],j=2>e?h:m[e-2],d=j[0]<<13|j[1]<<12|j[2]<<11|i[0]<<7|i[1]<<6|i[2]<<5|i[3]<<4,f=0;a>f;f++)h[f]=g=k.readBit(l,d),d=(d&n)<<1|(a>f+3?j[f+3]<<11:0)|(a>f+4?i[f+4]<<4:0)|g;return m}function h(a,b,d,e,g,h,i,j){if(a&&c("JBIG2 error: MMR encoding is not supported"),0===e&&!h&&!g&&4===i.length&&3===i[0].x&&-1===i[0].y&&-3===i[1].x&&-1===i[1].y&&2===i[2].x&&-2===i[2].y&&-2===i[3].x&&-2===i[3].y)return f(b,d,j);var k=!!h,l=y[e].concat(i);l.sort(function(a,b){return a.y-b.y||a.x-b.x});var m,n,o=l.length,p=new Int8Array(o),q=new Int8Array(o),r=[],s=0,t=0,u=0,v=0;for(n=0;o>n;n++)p[n]=l[n].x,q[n]=l[n].y,t=Math.min(t,l[n].x),u=Math.max(u,l[n].x),v=Math.min(v,l[n].y),o-1>n&&l[n].y===l[n+1].y&&l[n].x===l[n+1].x-1?s|=1<m;m++)n=r[m],x[m]=l[n].x,z[m]=l[n].y,B[m]=1<R;R++){if(g){var S=N.readBit(O,K);if(P^=S){M.push(L);continue}}for(L=new Uint8Array(L),M.push(L),C=0;b>C;C++)if(k&&h[R][C])L[C]=0;else{if(C>=H&&J>C&&R>=I)for(Q=Q<<1&s,n=0;w>n;n++)D=R+z[n],E=C+x[n],F=M[D][E],F&&(F=B[n],Q|=F);else for(Q=0,G=o-1,n=0;o>n;n++,G--)E=C+p[n],E>=0&&b>E&&(D=R+q[n],D>=0&&(F=M[D][E],F&&(Q|=F<l;l++)n[l]=k[l].x,o[l]=k[l].y;var p=z[d].reference;0===d&&(p=p.concat([i[1]]));var q=p.length,r=new Int32Array(q),s=new Int32Array(q);for(l=0;q>l;l++)r[l]=p[l].x,s[l]=p[l].y;for(var t=e[0].length,u=e.length,v=B[d],w=[],x=j.decoder,y=j.contextCache.getContexts("GR"),A=0,C=0;b>C;C++){if(h){var D=x.readBit(y,v);A^=D,A&&c("JBIG2 error: prediction is not supported")}var E=new Uint8Array(a);w.push(E);for(var F=0;a>F;F++){var G,H,I=0;for(l=0;m>l;l++)G=C+o[l],H=F+n[l],0>G||0>H||H>=a?I<<=1:I=I<<1|w[G][H];for(l=0;q>l;l++)G=C+s[l]+g,H=F+r[l]+f,0>G||G>=u||0>H||H>=t?I<<=1:I=I<<1|e[G][H];var J=x.readBit(y,I);E[F]=J}}return w}function j(a,b,f,g,j,m,n,o,p,q,r){a&&c("JBIG2 error: huffman is not supported");for(var s=[],t=0,u=l(f.length+g),v=r.decoder,w=r.contextCache;s.length1)B=k(a,b,y,t,0,C,1,f.concat(s),u,0,0,1,0,m,p,q,r);else{var D=e(w,v,u),E=d(w,"IARDX",v),F=d(w,"IARDY",v),G=DM;M++)I[M]&&H.push(f[M]);for(var O=0;g>O;M++,O++)I[M]&&H.push(s[O]);return H}function k(a,b,f,g,h,j,k,l,m,n,o,p,q,r,s,t,u){a&&c("JBIG2 error: huffman is not supported");var v,w,x=[];for(v=0;g>v;v++){if(w=new Uint8Array(f),h)for(var y=0;f>y;y++)w[y]=h;x.push(w)}var z=u.decoder,A=u.contextCache,B=-d(A,"IADT",z),C=0;for(v=0;j>v;){var D=d(A,"IADT",z);B+=D;var E=d(A,"IAFS",z);C+=E;for(var F=C;;){var G=1===k?0:d(A,"IAIT",z),H=k*B+G,I=e(A,z,m),J=b&&d(A,"IARI",z),K=l[I],L=K[0].length,M=K.length;if(J){var N=d(A,"IARDW",z),O=d(A,"IARDH",z),P=d(A,"IARDX",z),Q=d(A,"IARDY",z);L+=N,M+=O,K=i(L,M,s,K,(N>>1)+P,(O>>1)+Q,!1,t,u)}var R,S,T,U=H-(1&p?0:M),V=F-(2&p?L:0);if(n){for(R=0;M>R;R++)if(w=x[V+R]){T=K[R];var W=Math.min(f-U,L);switch(q){case 0:for(S=0;W>S;S++)w[U+S]|=T[S];break;case 2:for(S=0;W>S;S++)w[U+S]^=T[S];break;default:c("JBIG2 error: operator "+q+" is not supported")}}F+=M-1}else{for(S=0;M>S;S++)if(w=x[U+S])switch(T=K[S],q){case 0:for(R=0;L>R;R++)w[V+R]|=T[R];break;case 2:for(R=0;L>R;R++)w[V+R]^=T[R];break;default:c("JBIG2 error: operator "+q+" is not supported")}F+=L-1}v++;var X=d(A,"IADS",z);if(null===X)break;F+=X+o}}return x}function p(a,b){var d={};d.number=o(a,b);var e=a[b+4],f=63&e;x[f]||c("JBIG2 error: invalid segment type: "+f),d.type=f,d.typeName=x[f],d.deferredNonRetain=!!(128&e);var g=!!(64&e),h=a[b+5],i=h>>5&7,j=[31&h],k=b+6;if(7===h){i=536870911&o(a,k-1),k+=3;var l=i+7>>3;for(j[0]=a[k++];--l>0;)j.push(a[k++])}else 5!==h&&6!==h||c("JBIG2 error: invalid referred-to flags");d.retainBits=j;var m,p,q=d.number<=256?1:d.number<=65536?2:4,s=[];for(m=0;i>m;m++){var t=1===q?a[k]:2===q?n(a,k):o(a,k);s.push(t),k+=q}if(d.referredTo=s,g?(d.pageAssociation=o(a,k),k+=4):d.pageAssociation=a[k++],d.length=o(a,k),k+=4,4294967295===d.length)if(38===f){var u=r(a,k),v=a[k+C],w=!!(1&v),y=6,z=new Uint8Array(y);for(w||(z[0]=255,z[1]=172),z[2]=u.height>>>24&255,z[3]=u.height>>16&255,z[4]=u.height>>8&255,z[5]=255&u.height,m=k,p=a.length;p>m;m++){for(var A=0;y>A&&z[A]===a[m+A];)A++;if(A===y){d.length=m+y;break}}4294967295===d.length&&c("JBIG2 error: segment end was not found")}else c("JBIG2 error: invalid unknown segment length");return d.headerEnd=k,d}function q(a,b,c,d){for(var e=[],f=c;d>f;){var g=p(b,f);f=g.headerEnd;var h={header:g,data:b};if(a.randomAccess||(h.start=f,f+=g.length,h.end=f),e.push(h),51===g.type)break}if(a.randomAccess)for(var i=0,j=e.length;j>i;i++)e[i].start=f,f+=e[i].header.length,e[i].end=f;return e}function r(a,b){return{width:o(a,b),height:o(a,b+4),x:o(a,b+8),y:o(a,b+12),combinationOperator:7&a[b+16]}}function s(a,b){var d,e,f,g,h=a.header,i=a.data,j=a.start,k=a.end;switch(h.type){case 0:var l={},p=n(i,j);if(l.huffman=!!(1&p),l.refinement=!!(2&p),l.huffmanDHSelector=p>>2&3,l.huffmanDWSelector=p>>4&3,l.bitmapSizeSelector=p>>6&1,l.aggregationInstancesSelector=p>>7&1,l.bitmapCodingContextUsed=!!(256&p),l.bitmapCodingContextRetained=!!(512&p),l.template=p>>10&3,l.refinementTemplate=p>>12&1,j+=2,!l.huffman){for(g=0===l.template?4:1,e=[],f=0;g>f;f++)e.push({x:m(i,j),y:m(i,j+1)}),j+=2;l.at=e}if(l.refinement&&!l.refinementTemplate){for(e=[],f=0;2>f;f++)e.push({x:m(i,j),y:m(i,j+1)}),j+=2;l.refinementAt=e}l.numberOfExportedSymbols=o(i,j),j+=4,l.numberOfNewSymbols=o(i,j),j+=4,d=[l,h.number,h.referredTo,i,j,k];break;case 6:case 7:var q={};q.info=r(i,j),j+=C;var s=n(i,j);if(j+=2,q.huffman=!!(1&s),q.refinement=!!(2&s),q.stripSize=1<<(s>>2&3),q.referenceCorner=s>>4&3,q.transposed=!!(64&s),q.combinationOperator=s>>7&3,q.defaultPixelValue=s>>9&1,q.dsOffset=s<<17>>27,q.refinementTemplate=s>>15&1,q.huffman){var t=n(i,j);j+=2,q.huffmanFS=3&t,q.huffmanDS=t>>2&3,q.huffmanDT=t>>4&3,q.huffmanRefinementDW=t>>6&3,q.huffmanRefinementDH=t>>8&3,q.huffmanRefinementDX=t>>10&3,q.huffmanRefinementDY=t>>12&3,q.huffmanRefinementSizeSelector=!!(14&t)}if(q.refinement&&!q.refinementTemplate){for(e=[],f=0;2>f;f++)e.push({x:m(i,j),y:m(i,j+1)}),j+=2;q.refinementAt=e}q.numberOfSymbolInstances=o(i,j),j+=4,q.huffman&&c("JBIG2 error: huffman is not supported"),d=[q,h.referredTo,i,j,k];break;case 38:case 39:var u={};u.info=r(i,j),j+=C;var v=i[j++];if(u.mmr=!!(1&v),u.template=v>>1&3,u.prediction=!!(8&v),!u.mmr){for(g=0===u.template?4:1,e=[],f=0;g>f;f++)e.push({x:m(i,j),y:m(i,j+1)}),j+=2;u.at=e}d=[u,i,j,k];break;case 48:var w={width:o(i,j),height:o(i,j+4),resolutionX:o(i,j+8),resolutionY:o(i,j+12)};4294967295===w.height&&delete w.height;var x=i[j+16];n(i,j+17);w.lossless=!!(1&x),w.refinement=!!(2&x),w.defaultPixelValue=x>>2&1,w.combinationOperator=x>>3&3,w.requiresBuffer=!!(32&x),w.combinationOperatorOverride=!!(64&x),d=[w];break;case 49:break;case 50:break;case 51:break;case 62:break;default:c("JBIG2 error: segment type "+h.typeName+"("+h.type+") is not implemented")}var y="on"+h.typeName;y in b&&b[y].apply(b,d)}function t(a,b){for(var c=0,d=a.length;d>c;c++)s(a[c],b)}function u(a){for(var b=new v,c=0,d=a.length;d>c;c++){var e=a[c],f=q({},e.data,e.start,e.end);t(f,b)}return b.buffer}function v(){}function w(){}a.prototype={getContexts:function(a){return a in this?this[a]:this[a]=new Int8Array(65536)}},b.prototype={get decoder(){var a=new fd(this.data,this.start,this.end);return g(this,"decoder",a)},get contextCache(){var b=new a;return g(this,"contextCache",b)}};var x=["SymbolDictionary",null,null,null,"IntermediateTextRegion",null,"ImmediateTextRegion","ImmediateLosslessTextRegion",null,null,null,null,null,null,null,null,"patternDictionary",null,null,null,"IntermediateHalftoneRegion",null,"ImmediateHalftoneRegion","ImmediateLosslessHalftoneRegion",null,null,null,null,null,null,null,null,null,null,null,null,"IntermediateGenericRegion",null,"ImmediateGenericRegion","ImmediateLosslessGenericRegion","IntermediateGenericRefinementRegion",null,"ImmediateGenericRefinementRegion","ImmediateLosslessGenericRefinementRegion",null,null,null,null,"PageInformation","EndOfPage","EndOfStripe","EndOfFile","Profiles","Tables",null,null,null,null,null,null,null,null,"Extension"],y=[[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:2,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-2,y:0},{x:-1,y:0}],[{x:-3,y:-1},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}]],z=[{coding:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:-1,y:1},{x:0,y:1},{x:1,y:1}]},{coding:[{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:0,y:1},{x:1,y:1}]}],A=[39717,1941,229,405],B=[32,8],C=17;return v.prototype={onPageInformation:function(a){this.currentPageInfo=a;var b=a.width+7>>3,c=new Uint8Array(b*a.height);if(a.defaultPixelValue)for(var d=0,e=c.length;e>d;d++)c[d]=255;this.buffer=c},drawBitmap:function(a,b){var d,e,f,g,h=this.currentPageInfo,i=a.width,j=a.height,k=h.width+7>>3,l=h.combinationOperatorOverride?a.combinationOperator:h.combinationOperator,m=this.buffer,n=128>>(7&a.x),o=a.y*k+(a.x>>3);switch(l){case 0:for(d=0;j>d;d++){for(f=n,g=o,e=0;i>e;e++)b[d][e]&&(m[g]|=f),f>>=1,f||(f=128,g++);o+=k}break;case 2:for(d=0;j>d;d++){for(f=n,g=o,e=0;i>e;e++)b[d][e]&&(m[g]^=f),f>>=1,f||(f=128,g++);o+=k}break;default:c("JBIG2 error: operator "+l+" is not supported")}},onImmediateGenericRegion:function(a,c,d,e){var f=a.info,g=new b(c,d,e),i=h(a.mmr,f.width,f.height,a.template,a.prediction,null,a.at,g);this.drawBitmap(f,i)},onImmediateLosslessGenericRegion:function(){this.onImmediateGenericRegion.apply(this,arguments)},onSymbolDictionary:function(a,d,e,f,g,h){var i;a.huffman&&c("JBIG2 error: huffman is not supported");var k=this.symbols;k||(this.symbols=k={});for(var l=[],m=0,n=e.length;n>m;m++)l=l.concat(k[e[m]]);var o=new b(f,g,h);k[d]=j(a.huffman,a.refinement,l,a.numberOfNewSymbols,a.numberOfExportedSymbols,i,a.template,a.at,a.refinementTemplate,a.refinementAt,o)},onImmediateTextRegion:function(a,c,d,e,f){for(var g,h=a.info,i=this.symbols,j=[],m=0,n=c.length;n>m;m++)j=j.concat(i[c[m]]);var o=l(j.length),p=new b(d,e,f),q=k(a.huffman,a.refinement,h.width,h.height,a.defaultPixelValue,a.numberOfSymbolInstances,a.stripSize,j,o,a.transposed,a.dsOffset,a.referenceCorner,a.combinationOperator,g,a.refinementTemplate,a.refinementAt,p);this.drawBitmap(h,q)},onImmediateLosslessTextRegion:function(){this.onImmediateTextRegion.apply(this,arguments)}},w.prototype={parseChunks:function(a){return u(a)}},w}(),jd=(PDFJS.bidi=function(){function a(a){return 0!==(1&a)}function b(a){return 0===(1&a)}function c(a,b,c){for(var d=b,e=a.length;e>d;++d)if(a[d]!==c)return d;return d}function d(a,b,c,d){for(var e=b;c>e;++e)a[e]=d}function e(a,b,c){for(var d=b,e=c-1;e>d;++d,--e){var f=a[d];a[d]=a[e],a[e]=f}}function f(a,b,c){return{str:a,dir:c?"ttb":b?"ltr":"rtl"}}function g(g,l,m){var n=!0,o=g.length;if(0===o||m)return f(g,n,m);j.length=o,k.length=o;var p,q,r=0;for(p=0;o>p;++p){j[p]=g.charAt(p);var s=g.charCodeAt(p),t="L";255>=s?t=h[s]:s>=1424&&1524>=s?t="R":s>=1536&&1791>=s?t=i[255&s]:s>=1792&&2220>=s&&(t="AL"),"R"!==t&&"AL"!==t&&"AN"!==t||r++,k[p]=t}if(0===r)return n=!0,f(g,n);-1===l&&(.3>o/r?(n=!0,l=0):(n=!1,l=1));var u=[];for(p=0;o>p;++p)u[p]=l;var v=a(l)?"R":"L",w=v,x=w,y=w;for(p=0;o>p;++p)"NSM"===k[p]?k[p]=y:y=k[p];y=w;var z;for(p=0;o>p;++p)z=k[p],"EN"===z?k[p]="AL"===y?"AN":"EN":"R"!==z&&"L"!==z&&"AL"!==z||(y=z);for(p=0;o>p;++p)z=k[p],"AL"===z&&(k[p]="R");for(p=1;o-1>p;++p)"ES"===k[p]&&"EN"===k[p-1]&&"EN"===k[p+1]&&(k[p]="EN"),"CS"!==k[p]||"EN"!==k[p-1]&&"AN"!==k[p-1]||k[p+1]!==k[p-1]||(k[p]=k[p-1]);for(p=0;o>p;++p)if("EN"===k[p]){var A;for(A=p-1;A>=0&&"ET"===k[A];--A)k[A]="EN";for(A=p+1;o>A&&"ET"===k[A];--A)k[A]="EN"}for(p=0;o>p;++p)z=k[p],"WS"!==z&&"ES"!==z&&"ET"!==z&&"CS"!==z||(k[p]="ON");for(y=w,p=0;o>p;++p)z=k[p],"EN"===z?k[p]="L"===y?"L":"EN":"R"!==z&&"L"!==z||(y=z);for(p=0;o>p;++p)if("ON"===k[p]){var B=c(k,p+1,"ON"),C=w;p>0&&(C=k[p-1]);var D=x;o>B+1&&(D=k[B+1]),"L"!==C&&(C="R"),"L"!==D&&(D="R"),C===D&&d(k,p,B,C),p=B-1}for(p=0;o>p;++p)"ON"===k[p]&&(k[p]=v);for(p=0;o>p;++p)z=k[p],b(u[p])?"R"===z?u[p]+=1:"AN"!==z&&"EN"!==z||(u[p]+=2):"L"!==z&&"AN"!==z&&"EN"!==z||(u[p]+=1);var E,F=-1,G=99;for(p=0,q=u.length;q>p;++p)E=u[p],E>F&&(F=E),G>E&&a(E)&&(G=E);for(E=F;E>=G;--E){var H=-1;for(p=0,q=u.length;q>p;++p)u[p]=0&&(e(j,H,p),H=-1):0>H&&(H=p);H>=0&&e(j,H,u.length)}for(p=0,q=j.length;q>p;++p){var I=j[p];"<"!==I&&">"!==I||(j[p]="")}return f(j.join(""),n)}var h=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ON","CS","ON","CS","ON","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ON","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","ON","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],i=["AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","CS","AL","ON","ON","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","ON","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL"],j=[],k=[]; -return g}(),function(a){function b(a){var b=3285377520;this.h1=a?4294967295&a:b,this.h2=a?4294967295&a:b}var c=4294901760,d=65535,e=!1;try{new Uint32Array(new Uint8Array(5).buffer,0,1)}catch(f){e=!0}return b.prototype={update:function(a){var b,f=e;if("string"==typeof a){var g=new Uint8Array(2*a.length),h=0;for(b=0;b=i?g[h++]=i:(g[h++]=i>>>8,g[h++]=255&i)}}else if(a instanceof Uint8Array)g=a,h=g.length;else{if(!("object"==typeof a&&"length"in a))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");g=a,h=g.length,f=!0}var j=h>>2,k=h-4*j,l=f?new la(g,j):new Uint32Array(g.buffer,0,j),m=0,n=0,o=this.h1,p=this.h2,q=3432918353,r=461845907,s=q&d,t=r&d;for(b=0;j>b;b++)1&b?(m=l[b],m=m*q&c|m*s&d,m=m<<15|m>>>17,m=m*r&c|m*t&d,o^=m,o=o<<13|o>>>19,o=5*o+3864292196):(n=l[b],n=n*q&c|n*s&d,n=n<<15|n>>>17,n=n*r&c|n*t&d,p^=n,p=p<<13|p>>>19,p=5*p+3864292196);switch(m=0,k){case 3:m^=g[4*j+2]<<16;case 2:m^=g[4*j+1]<<8;case 1:m^=g[4*j],m=m*q&c|m*s&d,m=m<<15|m>>>17,m=m*r&c|m*t&d,1&j?o^=m:p^=m}return this.h1=o,this.h2=p,this},hexdigest:function(){var a=this.h1,b=this.h2;a^=b>>>1,a=3981806797*a&c|36045*a&d,b=4283543511*b&c|(2950163797*(b<<16|a>>>16)&c)>>>16,a^=b>>>1,a=444984403*a&c|60499*a&d,b=3301882366*b&c|(3120437893*(b<<16|a>>>16)&c)>>>16,a^=b>>>1;for(var e=0,f=[a,b],g="";e>>0).toString(16);h.length<8;)h="0"+h;g+=h}return g}},b}())}.call("undefined"==typeof window?this:window),PDFJS.workerSrc||"undefined"==typeof document||(PDFJS.workerSrc=function(){"use strict";var a=document.body||document.getElementsByTagName("head")[0],b=a.lastChild.src;return b&&b.replace(/\.js$/i,".worker.js")}()),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;hc;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e":">",'"':""","'":"'","/":"/"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('
          ');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('
        • '),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")});var f=e.filter("[aria-selected=true]");f.length>0?f.first().trigger("mouseenter"):e.first().trigger("mouseenter")})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&d.setClasses()}),b.on("unselect",function(){b.isOpen()&&d.setClasses()}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-d.$results.scrollTop()+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html(''),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('
            '),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('
          • ×
          • ');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e0||0===c.length)){var d=a('×');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ç ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ç¢":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","ï¼¢":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","ï¼£":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","È»":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","ï¼¥":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ç´":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ä ":"G","Ǧ":"G","Ä¢":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","â±µ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","Ä°":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Ä®":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ä´":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ä¿":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ä»":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","â±¢":"L","â± ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","ï¼­":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","â±®":"M","Ɯ":"M","Ⓝ":"N","ï¼®":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","È ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","È®":"O","È°":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Æ ":"O","Ờ":"O","Ớ":"O","á» ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Æ¢":"OI","Ꝏ":"OO","È¢":"OU","Ⓟ":"P","ï¼°":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","â±£":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","ï¼±":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","ï¼²":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","ï¼³":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","á¹ ":"S","Å ":"S","Ṧ":"S","á¹¢":"S","Ṩ":"S","Ș":"S","Ş":"S","â±¾":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","ï¼´":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Å¢":"T","á¹°":"T","á¹®":"T","Ŧ":"T","Ƭ":"T","Æ®":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","ï¼µ":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Å®":"U","Å°":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","á»®":"U","Ử":"U","á»°":"U","Ụ":"U","á¹²":"U","Ų":"U","Ṷ":"U","á¹´":"U","Ʉ":"U","Ⓥ":"V","V":"V","á¹¼":"V","á¹¾":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","ï¼·":"W","Ẁ":"W","Ẃ":"W","Å´":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","â±²":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","ï¼¹":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","á»´":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Å»":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","Ç¡":"a","ä":"a","ǟ":"a","ả":"a","Ã¥":"a","Ç»":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","â±¥":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","Ç£":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","È©":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","Ä¡":"g","ǧ":"g","Ä£":"g","Ç¥":"g","É ":"g","ꞡ":"g","áµ¹":"g","ꝿ":"g","ⓗ":"h","h":"h","Ä¥":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","É¥":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","Ä©":"i","Ä«":"i","Ä­":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","Ç°":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","Ç©":"k","ḳ":"k","Ä·":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","Å¿":"l","ł":"l","ƚ":"l","É«":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","È­":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","È«":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","Æ¡":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","Ç«":"o","Ç­":"o","ø":"o","Ç¿":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","Æ£":"oi","È£":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","Æ¥":"p","áµ½":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","á¹¥":"s","ŝ":"s","ṡ":"s","Å¡":"s","ṧ":"s","á¹£":"s","ṩ":"s","ș":"s","ş":"s","È¿":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","Å¥":"t","á¹­":"t","ț":"t","Å£":"t","á¹±":"t","ṯ":"t","ŧ":"t","Æ­":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","Å©":"u","á¹¹":"u","Å«":"u","á¹»":"u","Å­":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","Æ°":"u","ừ":"u","ứ":"u","ữ":"u","á»­":"u","á»±":"u","ụ":"u","á¹³":"u","ų":"u","á¹·":"u","á¹µ":"u","ʉ":"u","ⓥ":"v","v":"v","á¹½":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","â±³":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","Å·":"y","ỹ":"y","ȳ":"y","ẏ":"y", -"ÿ":"y","á»·":"y","ẙ":"y","ỵ":"y","Æ´":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","È¥":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Î¥","Ϋ":"Î¥","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},l,j),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&""!==a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");if(void 0!==f&&(this.createTag=f),b.call(this,c,d),a.isArray(e))for(var g=0;g0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('
          • '),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a(""),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=(this.$container.position(),this.$container.offset());f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.topf.bottom+h.height,l={left:f.left,top:g.bottom};if("static"!==this.$dropdownParent[0].style.position){var m=this.$dropdownParent.offset();l.top-=m.top,l.left-=m.left}c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),null==l.tokenSeparators&&null==l.tokenizer||(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this._sync=c.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._sync)}),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1})):this.$element[0].addEventListener&&this.$element[0].addEventListener("DOMAttrModified",b._sync,!1)},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=a&&0!==a.length||(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&this.$element[0].removeEventListener("DOMAttrModified",this._sync,!1),this._sync=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a(''); -return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d;return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2.");var e=Array.prototype.slice.call(arguments,1);d=c[b].apply(c,e)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c}),angular.module("sprintf",[]).filter("sprintf",function(){return function(){return sprintf.apply(null,arguments)}}).filter("fmt",["$filter",function(a){return a("sprintf")}]).filter("vsprintf",function(){return function(a,b){return vsprintf(a,b)}}).filter("vfmt",["$filter",function(a){return a("vsprintf")}]),angular.module("ui.navbar",["ui.bootstrap","template/navbar-ul.html","template/navbar-li.html"]).directive("tree",function(){return{restrict:"E",replace:!0,scope:{tree:"="},templateUrl:"template/navbar-ul.html"}}).directive("leaf",["$compile",function(a){return{restrict:"E",replace:!0,scope:{leaf:"="},templateUrl:"template/navbar-li.html",link:function(b,c,d){if(angular.isArray(b.leaf.subtree)){c.append('');for(var e=c.parent(),f=!1;e.length>0&&!f;)e.hasClass("navbar-right")&&(f=!0),e=e.parent();f?c.addClass("dropdown-submenu-right"):c.addClass("dropdown-submenu"),a(c.contents())(b)}}}}]),angular.module("template/navbar-li.html",[]).run(["$templateCache",function(a){a.put("template/navbar-li.html",'
          • \n {{leaf.name}}\n
          • ')}]),angular.module("template/navbar-ul.html",[]).run(["$templateCache",function(a){a.put("template/navbar-ul.html","")}]),angular.module("ngAudio",[]).directive("ngAudio",["$compile","$q","ngAudio",function(a,b,c){return{restrict:"AEC",scope:{volume:"=",start:"=",currentTime:"=",loop:"=",clickPlay:"=",disablePreload:"="},controller:["$scope","$attrs","$element","$timeout",function(a,b,d,e){function f(){g=c.load(b.ngAudio,a),a.$audio=g,g.unbind()}var g;a.disablePreload||f(),d.on("click",function(){a.clickPlay!==!1&&(a.disablePreload&&f(),g.audio.play(),g.volume=a.volume||g.volume,g.loop=a.loop,g.currentTime=a.start||0,e(function(){g.play()},5))}),d.on("$destroy",function(){g.destroy()})}]}}]).directive("ngAudioHover",["$compile","$q","ngAudio",function(a,b,c){return{restrict:"AEC",controller:["$scope","$attrs","$element","$timeout",function(a,b,d,e){var f=c.load(b.ngAudioHover,a);d.on("mouseover rollover hover",function(){f.audio.play(),f.volume=b.volumeHover||f.volume,f.loop=b.loop,f.currentTime=b.startHover||0}),d.on("$destroy",function(){f.destroy()})}]}}]).service("localAudioFindingService",["$q",function(a){this.find=function(b){var c=a.defer(),d=document.getElementById(b);return d?c.resolve(d):c.reject(b),c.promise}}]).service("remoteAudioFindingService",["$q",function(a){this.find=function(b){var c=a.defer(),d=new Audio;return d.addEventListener("error",function(){c.reject()}),d.addEventListener("loadstart",function(){c.resolve(d)}),setTimeout(function(){d.src=b},1),c.promise}}]).service("cleverAudioFindingService",["$q","localAudioFindingService","remoteAudioFindingService",function(a,b,c){this.find=function(d){var e=a.defer();return d=d.replace("|","/"),b.find(d).then(e.resolve,function(){return c.find(d)}).then(e.resolve,e.reject),e.promise}}]).value("ngAudioGlobals",{muting:!1,songmuting:!1,performance:25,unlock:!0}).factory("NgAudioObject",["cleverAudioFindingService","$rootScope","$interval","$timeout","ngAudioGlobals",function(a,b,c,d,e){return function(d,f){function g(){o.play(),o.pause(),window.removeEventListener("click",g)}function h(){w||(A&&c.cancel(A),l&&l(),k&&k(),w=!0)}function i(){w||(k=x.$watch(function(){return{volume:y.volume,currentTime:y.currentTime,progress:y.progress,muting:y.muting,loop:y.loop,playbackRate:y.playbackRate}},function(a,b){a.currentTime!==b.currentTime&&y.setCurrentTime(a.currentTime),a.progress!==b.progress&&y.setProgress(a.progress),a.volume!==b.volume&&y.setVolume(a.volume),a.playbackRate!==b.playbackRate&&y.setPlaybackRate(a.playbackRate),n=a.loop,a.muting!==b.muting&&y.setMuting(a.muting)},!0))}function j(){k&&k(),o&&(u||e.isMuting?o.volume=0:o.volume=void 0!==y.volume?y.volume:1,p&&(o.play(),p=!1),r&&(o.pause(),o.currentTime=0,r=!1),q&&(o.pause(),q=!1),s&&(o.playbackRate=t,s=!1),m&&(o.volume=m,m=void 0),v&&(y.currentTime=o.currentTime,y.duration=o.duration,y.remaining=o.duration-o.currentTime,y.progress=o.currentTime/o.duration,y.paused=o.paused,y.src=o.src,y.currentTime>=y.duration&&z.forEach(function(a){a(y)}),n&&y.currentTime>=y.duration&&(n!==!0&&(n--,y.loop--),y.setCurrentTime(0),y.play())),u||e.isMuting||(y.volume=o.volume),y.audio=o),i()}var k,l,m,n,o,p=!1,q=!1,r=!1,s=!1,t=!1,u=!1,v=!0,w=!1,x=f||b,y=this;this.id=d,this.safeId=d.replace("/","|"),this.loop=0,this.unbind=function(){v=!1},this.play=function(){return p=!0,this};var z=[];this.complete=function(a){z.push(a)},this.pause=function(){q=!0},this.restart=function(){r=!0},this.stop=function(){this.restart()},this.setVolume=function(a){m=a},this.setPlaybackRate=function(a){t=a,s=!0},this.setMuting=function(a){u=a},this.setProgress=function(a){o&&o.duration&&isFinite(a)&&(o.currentTime=o.duration*a)},this.setCurrentTime=function(a){o&&o.duration&&(o.currentTime=a)},this.destroy=h,x.$on("$destroy",function(){h()}),a.find(d).then(function(a){o=a,e.unlock&&(window.addEventListener("click",g),o.addEventListener("playing",function(){window.removeEventListener("click",g)})),o.addEventListener("canplay",function(){y.canPlay=!0})},function(a){y.error=!0,console.warn(a)});var A=c(j,e.performance);l=x.$watch(function(){return e.performance},function(){c.cancel(A),A=c(j,e.performance)})}}]).service("ngAudio",["NgAudioObject","ngAudioGlobals",function(a,b){this.play=function(b,c){var d=new a(b,c);return d.play(),d},this.load=function(b,c){return new a(b,c)},this.mute=function(){b.muting=!0},this.unmute=function(){b.muting=!1},this.toggleMute=function(){b.muting=!b.muting},this.setUnlock=function(a){b.unlock=a}}]).filter("trackTime",function(){return function(a){var b=Math.floor(0|a),c="",d=0,e=0,f=0;return b>3599?(d=Math.floor(b/3600),e=Math.floor((b-3600*d)/60),f=b-(60*e+3600*d),1==d.toString().length&&(d="0"+Math.floor(b/3600).toString()),1==e.toString().length&&(e="0"+Math.floor((b-3600*d)/60).toString()),1==f.toString().length&&(f="0"+(b-(60*e+3600*d)).toString()),c=d+":"+e+":"+f):b>59?(e=Math.floor(b/60),f=b-60*e,1==e.toString().length&&(e="0"+Math.floor(b/60).toString()),1==f.toString().length&&(f="0"+(b-60*e).toString()),c=e+":"+f):(f=b,1==f.toString().length&&(f="0"+b.toString()),c=b+"s"),"function"==typeof Number.isNaN&&Number.isNaN(c),c}}),function(){"use strict";angular.module("ngEmoticons",["ngSanitize"]).filter("emoticons",["$sce",function(a){var b=[{text:":)","class":"smiley",code:"e60a"},{text:":D","class":"happy",code:"e608"},{text:":d","class":"happy",code:"e608"},{text:":(","class":"sad",code:"e60e"},{text:":/","class":"wondering",code:"e620"},{text:":P","class":"tongue",code:"e60c"},{text:":p","class":"tongue",code:"e60c"},{text:"3:)","class":"evil",code:"e618"},{text:"(^)","class":"thumbsup2",code:"e607"},{text:";)","class":"wink",code:"e610"},{text:":o","class":"shocked",code:"e61a"},{text:"-_-","class":"neutral",code:"e61e"},{text:"(y)","class":"thumbs-up",code:"e606"},{text:":*","class":"heart",code:"e604"},{text:"<3","class":"heart",code:"e604"},{text:"<3","class":"heart",code:"e604"},{text:"</3","class":"heart-broken",code:"e605"},{text:"&#x'+a.code+"")}),c.join(" ")}function h(a){var b=/((href|src)=["']|)(\b(https?|ftp|file):\/\/[-A-Z0-9+()&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,c=a.replace(b,function(a){return''+a+""});return c}function i(a){var b=new RegExp(":("+c.join("|")+"):","g");return a.replace(b,function(a,b){return""})}var j={link:!0,linkTarget:"_self"};return f(j,e),void 0!==d&&null!==d?"object"==typeof d?d:(d=g(d),d=i(d),j.link&&(d=h(d)),a.trustAsHtml(d)):void 0}}]).directive("ngEmoticons",["$filter","$sce","$http","$timeout","$templateCache",function(a,b,c,d,e){var f="",g='
            {{video.description}}
            {{video.views}} {{video.likes}}
            ';return e.put(f,g),{restrict:"AE",scope:!0,templateUrl:function(a,b){return b.emoticonsTemplateUrl||f},link:function(e,f,g){function h(a){return angular.forEach(arguments,function(b){b!==a&&angular.forEach(b,function(b,c){a[c]&&a[c].constructor&&a[c].constructor===Object?h(a[c],b):a[c]=b})}),a}var i=e.$eval(g.emoticonsData),j=e.$eval(g.emoticonsOptions);e.video={},e.image={},e.pdf={},e.audio={};var k={link:!0,linkTarget:"_self",pdf:{embed:!0},image:{embed:!1},audio:{embed:!0},code:{highlight:!0,lineNumbers:!1},basicVideo:!1,video:{embed:!1,width:null,height:null,ytTheme:"dark",details:!1,thumbnailQuality:"medium",ytAuthKey:null}};h(k,j),String.prototype.trunc=function(a,b){var c=this.length>a,d=c?this.substr(0,a-1):this;return d=b&&c?d.substr(0,d.lastIndexOf(" ")):d,c?d+"...":d};var l={calcDimensions:function(a){var b={width:null,height:null};return b.width=a.video.width,b.height=a.video.height,a.video.height&&a.video.width?b:a.video.height?(b.width=a.video.height/390*640,b):a.video.width?(b.height=b.width/640*390,b):(b.width=640,b.height=390,b)},embed:function(a,d){var f=/https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com(?:\/embed\/|\/v\/|\/watch\?v=|\/ytscreeningroom\?v=|\/feeds\/api\/videos\/|\/user\S*[^\w\-\s]|\S*[^\w\-\s]))([\w\-]{11})[?=&+%\w-]*/gi;if(a.match(f)){var g=this.calcDimensions(d);return e.video.id=RegExp.$1,d.video.details?c.get("https://www.googleapis.com/youtube/v3/videos?id="+RegExp.$1+"&key="+d.video.ytAuthKey+"&part=snippet,statistics").success(function(a){var c=a.items[0];e.video.host="youtube",e.video.title=c.snippet.title,e.video.thumbnail=c.snippet.thumbnails.medium.url,e.video.description=c.snippet.description.trunc(250,!0).replace(/\n/g," ").replace(/ /g," "),e.video.rawDescription=c.snippet.description,e.video.views=c.statistics.viewCount,e.video.likes=c.statistics.likeCount,e.video.uploader=c.snippet.channelTitle,e.video.uploaderPage="https://www.youtube.com/channel/"+c.snippet.channelId,e.video.uploadDate=c.snippet.publishedAt,e.video.url=b.trustAsResourceUrl("https://www.youtube.com/watch?v="+c.id),e.video.embedSrc=b.trustAsResourceUrl("https://www.youtube.com/embed/"+e.video.id+"?autoplay=1"),e.video.width=g.width,e.video.height=g.height}):(e.video.width=g.width,e.video.height=g.height,e.video.host="youtube",e.video.embedSrc=b.trustAsResourceUrl("https://www.youtube.com/embed/"+RegExp.$1+"?autoplay=0")),a}var h=/https?:\/\/(?:www\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|)(\d+)(?:$|\/|\?)*/gi;if(a.match(h)){var i=this.calcDimensions(d);e.video.id=RegExp.$3,d.video.details?c.get("https://vimeo.com/api/v2/video/"+RegExp.$3+".json").success(function(a){e.video.host="vimeo",e.video.title=a[0].title,e.video.rawDescription=a[0].description.replace(/\n/g,"
            ").replace(/ /g,"
            "),e.video.description=a[0].description.replace(/((<|<)br\s*\/*(>|>)\r\n)/g," ").trunc(250,!0),e.video.thumbnail=a[0].thumbnail_medium,e.video.views=a[0].stats_number_of_plays,e.video.likes=a[0].stats_number_of_likes,e.video.uploader=a[0].user_name,e.video.uploaderPage=a[0].user_url,e.video.uploadDate=a[0].uploadDate,e.video.url=a[0].url,e.video.embedSrc=b.trustAsResourceUrl("//player.vimeo.com/video/"+a[0].id+"?title=0&byline=0&portrait=0&autoplay=1"),e.video.width=i.width,e.video.height=i.height}):(e.video.width=i.width,e.video.height=i.height,e.video.host="vimeo",e.video.embedSrc=b.trustAsResourceUrl("//player.vimeo.com/video/"+RegExp.$3+"?title=0&byline=0&portrait=0&autoplay=0"))}return a},embedBasic:function(a){var c=/((?:https?):\/\/\S*\.(?:ogv|webm|mp4))/gi;return a.match(c)&&(e.video.basic=b.trustAsResourceUrl(RegExp.$1)),a}},m={embed:function(a){var c=/((?:https?):\/\/\S*\.(?:wav|mp3|ogg))/gi;return a.match(c)&&(e.audio.url=b.trustAsResourceUrl(RegExp.$1)),a}},n={embed:function(a){var b=/((?:https?):\/\/\S*\.(?:gif|jpg|jpeg|tiff|png|svg|webp))/gi;return a.match(b)&&(e.image.url=RegExp.$1),a}},o={encodeCode:function(a){return a=a.replace(/\&/gm,"&"),a=a.replace(//gm,">")},getCode:function(a){var b=this;return a=a.replace(/(`+)(\s|[a-z]+)\s*([\s\S]*?[^`])\s*\1(?!`)/gm,function(a,c,d,e){var f=e;return f=f.replace(/^([ \t]*)/g,""),f=f.replace(/[ \t]*$/g,""),f=b.encodeCode(f),f=f.replace(/:\/\//g,"~P"),'
            '+f+"
            "})}},p={embed:function(a){var c=/((?:https?):\/\/\S*\.(?:pdf|PDF))/gi;return a.match(c)&&(e.pdf.url=b.trustAsResourceUrl(RegExp.$1)),a}};if(k.code.highlight){if(!window.hljs)throw"hlsj (Highlight JS is not defined.";i=o.getCode(i),d(function(){hljs.initHighlighting(),k.code.lineNumbers&&angular.element(".ne-code").each(function(){var a=1,b=$(this).text().split("\n").length,c=$("
              ").addClass("pre-numbering");for(angular.element(this).addClass("has-numbering").parent().append(c),a;b>=a;a++)c.append(angular.element("
            • ").text(a))})},0)}var q=a("emoticons")(i,k).$$unwrapTrustedValue();if(k.video.embed){if(!k.video.ytAuthKey)throw"Youtube authentication key is required to get data from youtube.";q=l.embed(q,k)}k.basicVideo&&(q=l.embedBasic(q)),k.audio.embed&&(q=m.embed(q)),k.image.embed&&(q=n.embed(q)),k.pdf.embed&&(q=p.embed(q)),e.neText=b.trustAsHtml(q)}}}]).directive("neHljs",["$timeout",function(a){return{restrict:"AE",link:function(b,c){a(function(){c.find(".ne-code").each(function(){hljs.highlightBlock(this)})},0)}}}])}(),function(a){"undefined"!=typeof exports?a(exports):(window.hljs=a({}),"function"==typeof define&&define.amd&&define("hljs",[],function(){return window.hljs}))}(function(a){function b(a){return a.replace(/&/gm,"&").replace(//gm,">")}function c(a){return a.nodeName.toLowerCase()}function d(a,b){var c=a&&a.exec(b);return c&&0==c.index}function e(a){return/^(no-?highlight|plain|text)$/i.test(a)}function f(a){var b,c,d,f=a.className+" ";if(f+=a.parentNode?a.parentNode.className:"",c=/\blang(?:uage)?-([\w-]+)\b/i.exec(f))return u(c[1])?c[1]:"no-highlight";for(f=f.split(/\s+/),b=0,d=f.length;d>b;b++)if(u(f[b])||e(f[b]))return f[b]}function g(a,b){var c,d={};for(c in a)d[c]=a[c];if(b)for(c in b)d[c]=b[c];return d}function h(a){var b=[];return function d(a,e){for(var f=a.firstChild;f;f=f.nextSibling)3==f.nodeType?e+=f.nodeValue.length:1==f.nodeType&&(b.push({event:"start",offset:e,node:f}),e=d(f,e),c(f).match(/br|hr|img|input/)||b.push({event:"stop",offset:e,node:f}));return e}(a,0),b}function i(a,d,e){function f(){return a.length&&d.length?a[0].offset!=d[0].offset?a[0].offset"}function h(a){k+=""}function i(a){("start"==a.event?g:h)(a.node)}for(var j=0,k="",l=[];a.length||d.length;){var m=f();if(k+=b(e.substr(j,m[0].offset-j)),j=m[0].offset,m==a){l.reverse().forEach(h);do i(m.splice(0,1)[0]),m=f();while(m==a&&m.length&&m[0].offset==j);l.reverse().forEach(g)}else"start"==m[0].event?l.push(m[0].node):l.pop(),i(m.splice(0,1)[0])}return k+b(e.substr(j))}function j(a){function b(a){return a&&a.source||a}function c(c,d){return new RegExp(b(c),"m"+(a.case_insensitive?"i":"")+(d?"g":""))}function d(e,f){if(!e.compiled){if(e.compiled=!0,e.keywords=e.keywords||e.beginKeywords,e.keywords){var h={},i=function(b,c){a.case_insensitive&&(c=c.toLowerCase()),c.split(" ").forEach(function(a){var c=a.split("|");h[c[0]]=[b,c[1]?Number(c[1]):1]})};"string"==typeof e.keywords?i("keyword",e.keywords):Object.keys(e.keywords).forEach(function(a){i(a,e.keywords[a])}),e.keywords=h}e.lexemesRe=c(e.lexemes||/\b\w+\b/,!0),f&&(e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")\\b"),e.begin||(e.begin=/\B|\b/),e.beginRe=c(e.begin),e.end||e.endsWithParent||(e.end=/\B|\b/),e.end&&(e.endRe=c(e.end)),e.terminator_end=b(e.end)||"",e.endsWithParent&&f.terminator_end&&(e.terminator_end+=(e.end?"|":"")+f.terminator_end)),e.illegal&&(e.illegalRe=c(e.illegal)),void 0===e.relevance&&(e.relevance=1),e.contains||(e.contains=[]);var j=[];e.contains.forEach(function(a){a.variants?a.variants.forEach(function(b){j.push(g(a,b))}):j.push("self"==a?e:a)}),e.contains=j,e.contains.forEach(function(a){d(a,e)}),e.starts&&d(e.starts,f);var k=e.contains.map(function(a){return a.beginKeywords?"\\.?("+a.begin+")\\.?":a.begin}).concat([e.terminator_end,e.illegal]).map(b).filter(Boolean);e.terminators=k.length?c(k.join("|"),!0):{exec:function(){return null}}}}d(a)}function k(a,c,e,f){function g(a,b){for(var c=0;c";return f+=a+'">',f+b+g}function o(){if(!y.keywords)return b(B);var a="",c=0;y.lexemesRe.lastIndex=0;for(var d=y.lexemesRe.exec(B);d;){a+=b(B.substr(c,d.index-c));var e=m(y,d);e?(C+=e[1],a+=n(e[0],b(d[0]))):a+=b(d[0]),c=y.lexemesRe.lastIndex,d=y.lexemesRe.exec(B)}return a+b(B.substr(c))}function p(){var a="string"==typeof y.subLanguage;if(a&&!w[y.subLanguage])return b(B);var c=a?k(y.subLanguage,B,!0,z[y.subLanguage]):l(B,y.subLanguage.length?y.subLanguage:void 0);return y.relevance>0&&(C+=c.relevance),a&&(z[y.subLanguage]=c.top),n(c.language,c.value,!1,!0)}function q(){return void 0!==y.subLanguage?p():o(); -}function r(a,c){var d=a.className?n(a.className,"",!0):"";a.returnBegin?(A+=d,B=""):a.excludeBegin?(A+=b(c)+d,B=""):(A+=d,B=c),y=Object.create(a,{parent:{value:y}})}function s(a,c){if(B+=a,void 0===c)return A+=q(),0;var d=g(c,y);if(d)return A+=q(),r(d,c),d.returnBegin?0:c.length;var e=h(y,c);if(e){var f=y;f.returnEnd||f.excludeEnd||(B+=c),A+=q();do y.className&&(A+=""),C+=y.relevance,y=y.parent;while(y!=e.parent);return f.excludeEnd&&(A+=b(c)),B="",e.starts&&r(e.starts,""),f.returnEnd?0:c.length}if(i(c,y))throw new Error('Illegal lexeme "'+c+'" for mode "'+(y.className||"")+'"');return B+=c,c.length||1}var t=u(a);if(!t)throw new Error('Unknown language: "'+a+'"');j(t);var x,y=f||t,z={},A="";for(x=y;x!=t;x=x.parent)x.className&&(A=n(x.className,"",!0)+A);var B="",C=0;try{for(var D,E,F=0;;){if(y.terminators.lastIndex=F,D=y.terminators.exec(c),!D)break;E=s(c.substr(F,D.index-F),D[0]),F=D.index+E}for(s(c.substr(F)),x=y;x.parent;x=x.parent)x.className&&(A+="");return{relevance:C,value:A,language:a,top:y}}catch(G){if(-1!=G.message.indexOf("Illegal"))return{relevance:0,value:b(c)};throw G}}function l(a,c){c=c||v.languages||Object.keys(w);var d={relevance:0,value:b(a)},e=d;return c.forEach(function(b){if(u(b)){var c=k(b,a,!1);c.language=b,c.relevance>e.relevance&&(e=c),c.relevance>d.relevance&&(e=d,d=c)}}),e.language&&(d.second_best=e),d}function m(a){return v.tabReplace&&(a=a.replace(/^((<[^>]+>|\t)+)/gm,function(a,b){return b.replace(/\t/g,v.tabReplace)})),v.useBR&&(a=a.replace(/\n/g,"
              ")),a}function n(a,b,c){var d=b?x[b]:c,e=[a.trim()];return a.match(/\bhljs\b/)||e.push("hljs"),-1===a.indexOf(d)&&e.push(d),e.join(" ").trim()}function o(a){var b=f(a);if(!e(b)){var c;v.useBR?(c=document.createElementNS("http://www.w3.org/1999/xhtml","div"),c.innerHTML=a.innerHTML.replace(/\n/g,"").replace(//g,"\n")):c=a;var d=c.textContent,g=b?k(b,d,!0):l(d),j=h(c);if(j.length){var o=document.createElementNS("http://www.w3.org/1999/xhtml","div");o.innerHTML=g.value,g.value=i(j,h(o),d)}g.value=m(g.value),a.innerHTML=g.value,a.className=n(a.className,b,g.language),a.result={language:g.language,re:g.relevance},g.second_best&&(a.second_best={language:g.second_best.language,re:g.second_best.relevance})}}function p(a){v=g(v,a)}function q(){if(!q.called){q.called=!0;var a=document.querySelectorAll("pre code");Array.prototype.forEach.call(a,o)}}function r(){addEventListener("DOMContentLoaded",q,!1),addEventListener("load",q,!1)}function s(b,c){var d=w[b]=c(a);d.aliases&&d.aliases.forEach(function(a){x[a]=b})}function t(){return Object.keys(w)}function u(a){return a=(a||"").toLowerCase(),w[a]||w[x[a]]}var v={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},w={},x={};return a.highlight=k,a.highlightAuto=l,a.fixMarkup=m,a.highlightBlock=o,a.configure=p,a.initHighlighting=q,a.initHighlightingOnLoad=r,a.registerLanguage=s,a.listLanguages=t,a.getLanguage=u,a.inherit=g,a.IDENT_RE="[a-zA-Z]\\w*",a.UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",a.NUMBER_RE="\\b\\d+(\\.\\d+)?",a.C_NUMBER_RE="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",a.BINARY_NUMBER_RE="\\b(0b[01]+)",a.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",a.BACKSLASH_ESCAPE={begin:"\\\\[\\s\\S]",relevance:0},a.APOS_STRING_MODE={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[a.BACKSLASH_ESCAPE]},a.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[a.BACKSLASH_ESCAPE]},a.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},a.COMMENT=function(b,c,d){var e=a.inherit({className:"comment",begin:b,end:c,contains:[]},d||{});return e.contains.push(a.PHRASAL_WORDS_MODE),e.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|XXX):",relevance:0}),e},a.C_LINE_COMMENT_MODE=a.COMMENT("//","$"),a.C_BLOCK_COMMENT_MODE=a.COMMENT("/\\*","\\*/"),a.HASH_COMMENT_MODE=a.COMMENT("#","$"),a.NUMBER_MODE={className:"number",begin:a.NUMBER_RE,relevance:0},a.C_NUMBER_MODE={className:"number",begin:a.C_NUMBER_RE,relevance:0},a.BINARY_NUMBER_MODE={className:"number",begin:a.BINARY_NUMBER_RE,relevance:0},a.CSS_NUMBER_MODE={className:"number",begin:a.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},a.REGEXP_MODE={className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[a.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[a.BACKSLASH_ESCAPE]}]},a.TITLE_MODE={className:"title",begin:a.IDENT_RE,relevance:0},a.UNDERSCORE_TITLE_MODE={className:"title",begin:a.UNDERSCORE_IDENT_RE,relevance:0},a.registerLanguage("1c",function(a){var b="[a-zA-Zа-яА-Я][a-zA-Z0-9_а-яА-Я]*",c="возврат дата для если и или иначе иначеесли исключение конецесли конецпопытки конецпроцедуры конецфункции конеццикла константа не перейти перем перечисление по пока попытка прервать продолжить процедура строка тогда фс функция цикл число экспорт",d="ansitooem oemtoansi ввестивидсубконто ввестидату ввестизначение ввестиперечисление ввестипериод ввестиплансчетов ввестистроку ввестичисло вопрос восстановитьзначение врег выбранныйплансчетов вызватьисключение датагод датамесяц датачисло добавитьмесяц завершитьработусистемы заголовоксистемы записьжурналарегистрации запуститьприложение зафиксироватьтранзакцию значениевстроку значениевстрокувнутр значениевфайл значениеизстроки значениеизстрокивнутр значениеизфайла имякомпьютера имяпользователя каталогвременныхфайлов каталогиб каталогпользователя каталогпрограммы кодсимв командасистемы конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лев лог лог10 макс максимальноеколичествосубконто мин монопольныйрежим названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найти найтипомеченныенаудаление найтиссылки началопериодаби началостандартногоинтервала начатьтранзакцию начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода нрег обработкаожидания окр описаниеошибки основнойжурналрасчетов основнойплансчетов основнойязык открытьформу открытьформумодально отменитьтранзакцию очиститьокносообщений периодстр полноеимяпользователя получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта прав праводоступа предупреждение префиксавтонумерации пустаястрока пустоезначение рабочаядаттьпустоезначение рабочаядата разделительстраниц разделительстрок разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо сигнал симв символтабуляции создатьобъект сокрл сокрлп сокрп сообщить состояние сохранитьзначение сред статусвозврата стрдлина стрзаменить стрколичествострок стрполучитьстроку стрчисловхождений сформироватьпозициюдокумента счетпокоду текущаядата текущеевремя типзначения типзначениястр удалитьобъекты установитьтана установитьтапо фиксшаблон формат цел шаблон",e={className:"dquote",begin:'""'},f={className:"string",begin:'"',end:'"|$',contains:[e]},g={className:"string",begin:"\\|",end:'"|$',contains:[e]};return{case_insensitive:!0,lexemes:b,keywords:{keyword:c,built_in:d},contains:[a.C_LINE_COMMENT_MODE,a.NUMBER_MODE,f,g,{className:"function",begin:"(процедура|функция)",end:"$",lexemes:b,keywords:"процедура функция",contains:[a.inherit(a.TITLE_MODE,{begin:b}),{className:"tail",endsWithParent:!0,contains:[{className:"params",begin:"\\(",end:"\\)",lexemes:b,keywords:"знач",contains:[f,g]},{className:"export",begin:"экспорт",endsWithParent:!0,lexemes:b,keywords:"экспорт",contains:[a.C_LINE_COMMENT_MODE]}]},a.C_LINE_COMMENT_MODE]},{className:"preprocessor",begin:"#",end:"$"},{className:"date",begin:"'\\d{2}\\.\\d{2}\\.(\\d{2}|\\d{4})'"}]}}),a.registerLanguage("accesslog",function(a){return{contains:[{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+\\b",relevance:0},{className:"string",begin:'"(GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|PATCH|TRACE)',end:'"',keywords:"GET POST HEAD PUT DELETE CONNECT OPTIONS PATCH TRACE",illegal:"\\n",relevance:10},{className:"string",begin:/\[/,end:/\]/,illegal:"\\n"},{className:"string",begin:'"',end:'"',illegal:"\\n"}]}}),a.registerLanguage("actionscript",function(a){var b="[a-zA-Z_$][a-zA-Z0-9_$]*",c="([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)",d={className:"rest_arg",begin:"[.]{3}",end:b,relevance:10};return{aliases:["as"],keywords:{keyword:"as break case catch class const continue default delete do dynamic each else extends final finally for function get if implements import in include instanceof interface internal is namespace native new override package private protected public return set static super switch this throw try typeof use var void while with",literal:"true false null undefined"},contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.C_NUMBER_MODE,{className:"package",beginKeywords:"package",end:"{",contains:[a.TITLE_MODE]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},a.TITLE_MODE]},{className:"preprocessor",beginKeywords:"import include",end:";"},{className:"function",beginKeywords:"function",end:"[{;]",excludeEnd:!0,illegal:"\\S",contains:[a.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,d]},{className:"type",begin:":",end:c,relevance:10}]}],illegal:/#/}}),a.registerLanguage("apache",function(a){var b={className:"number",begin:"[\\$%]\\d+"};return{aliases:["apacheconf"],case_insensitive:!0,contains:[a.HASH_COMMENT_MODE,{className:"tag",begin:""},{className:"keyword",begin:/\w+/,relevance:0,keywords:{common:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{end:/$/,relevance:0,keywords:{literal:"on off all"},contains:[{className:"sqbracket",begin:"\\s\\[",end:"\\]$"},{className:"cbracket",begin:"[\\$%]\\{",end:"\\}",contains:["self",b]},b,a.QUOTE_STRING_MODE]}}],illegal:/\S/}}),a.registerLanguage("applescript",function(a){var b=a.inherit(a.QUOTE_STRING_MODE,{illegal:""}),c={className:"params",begin:"\\(",end:"\\)",contains:["self",a.C_NUMBER_MODE,b]},d=a.COMMENT("--","$"),e=a.COMMENT("\\(\\*","\\*\\)",{contains:["self",d]}),f=[d,e,a.HASH_COMMENT_MODE];return{aliases:["osascript"],keywords:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the|0 then third through thru timeout times to transaction try until where while whose with without",constant:"AppleScript false linefeed return pi quote result space tab true",type:"alias application boolean class constant date file integer list number real record string text",command:"activate beep count delay launch log offset read round run say summarize write",property:"character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year"},contains:[b,a.C_NUMBER_MODE,{className:"type",begin:"\\bPOSIX file\\b"},{className:"command",begin:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"},{className:"constant",begin:"\\b(text item delimiters|current application|missing value)\\b"},{className:"keyword",begin:"\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference))\\b"},{className:"property",begin:"\\b(POSIX path|(date|time) string|quoted form)\\b"},{className:"function_start",beginKeywords:"on",illegal:"[${=;\\n]",contains:[a.UNDERSCORE_TITLE_MODE,c]}].concat(f),illegal:"//|->|=>|\\[\\["}}),a.registerLanguage("armasm",function(a){return{case_insensitive:!0,aliases:["arm"],lexemes:"\\.?"+a.IDENT_RE,keywords:{literal:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 ",preprocessor:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"{PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @ "},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?",end:"\\s"},a.COMMENT("[;@]","$",{relevance:0}),a.C_BLOCK_COMMENT_MODE,a.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"[#$=]?0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"label",variants:[{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"[=#]\\w+"}],relevance:0}]}}),a.registerLanguage("xml",function(a){var b="[A-Za-z0-9\\._:-]+",c={begin:/<\?(php)?(?!\w)/,end:/\?>/,subLanguage:"php"},d={endsWithParent:!0,illegal:/]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],case_insensitive:!0,contains:[{className:"doctype",begin:"",relevance:10,contains:[{begin:"\\[",end:"\\]"}]},a.COMMENT("",{relevance:10}),{className:"cdata",begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},{className:"tag",begin:"|$)",end:">",keywords:{title:"style"},contains:[d],starts:{end:"",returnEnd:!0,subLanguage:"css"}},{className:"tag",begin:"|$)",end:">",keywords:{title:"script"},contains:[d],starts:{end:"",returnEnd:!0,subLanguage:["actionscript","javascript","handlebars"]}},c,{className:"pi",begin:/<\?\w+/,end:/\?>/,relevance:10},{className:"tag",begin:"",contains:[{className:"title",begin:/[^ \/><\n\t]+/,relevance:0},d]}]}}),a.registerLanguage("asciidoc",function(a){return{aliases:["adoc"],contains:[a.COMMENT("^/{4,}\\n","\\n/{4,}$",{relevance:10}),a.COMMENT("^//","$",{relevance:0}),{className:"title",begin:"^\\.\\w.*$"},{begin:"^[=\\*]{4,}\\n",end:"\\n^[=\\*]{4,}$",relevance:10},{className:"header",begin:"^(={1,5}) .+?( \\1)?$",relevance:10},{className:"header",begin:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$",relevance:10},{className:"attribute",begin:"^:.+?:",end:"\\s",excludeEnd:!0,relevance:10},{className:"attribute",begin:"^\\[.+?\\]$",relevance:0},{className:"blockquote",begin:"^_{4,}\\n",end:"\\n_{4,}$",relevance:10},{className:"code",begin:"^[\\-\\.]{4,}\\n",end:"\\n[\\-\\.]{4,}$",relevance:10},{begin:"^\\+{4,}\\n",end:"\\n\\+{4,}$",contains:[{begin:"<",end:">",subLanguage:"xml",relevance:0}],relevance:10},{className:"bullet",begin:"^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+"},{className:"label",begin:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",relevance:10},{className:"strong",begin:"\\B\\*(?![\\*\\s])",end:"(\\n{2}|\\*)",contains:[{begin:"\\\\*\\w",relevance:0}]},{className:"emphasis",begin:"\\B'(?!['\\s])",end:"(\\n{2}|')",contains:[{begin:"\\\\'\\w",relevance:0}],relevance:0},{className:"emphasis",begin:"_(?![_\\s])",end:"(\\n{2}|_)",relevance:0},{className:"smartquote",variants:[{begin:"``.+?''"},{begin:"`.+?'"}]},{className:"code",begin:"(`.+?`|\\+.+?\\+)",relevance:0},{className:"code",begin:"^[ \\t]",end:"$",relevance:0},{className:"horizontal_rule",begin:"^'{3,}[ \\t]*$",relevance:10},{begin:"(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]",returnBegin:!0,contains:[{begin:"(link|image:?):",relevance:0},{className:"link_url",begin:"\\w",end:"[^\\[]+",relevance:0},{className:"link_label",begin:"\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0,relevance:0}],relevance:10}]}}),a.registerLanguage("aspectj",function(a){var b="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else extends implements break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws privileged aspectOf adviceexecution proceed cflowbelow cflow initialization preinitialization staticinitialization withincode target within execution getWithinTypeName handler thisJoinPoint thisJoinPointStaticPart thisEnclosingJoinPointStaticPart declare parents warning error soft precedence thisAspectInstance",c="get set args call";return{keywords:b,illegal:/<\/|#/,contains:[a.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{className:"aspect",beginKeywords:"aspect",end:/[{;=]/,excludeEnd:!0,illegal:/[:;"\[\]]/,contains:[{beginKeywords:"extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton"},a.UNDERSCORE_TITLE_MODE,{begin:/\([^\)]*/,end:/[)]+/,keywords:b+" "+c,excludeEnd:!1}]},{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,relevance:0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]},{beginKeywords:"pointcut after before around throwing returning",end:/[)]/,excludeEnd:!1,illegal:/["\[\]]/,contains:[{begin:a.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,contains:[a.UNDERSCORE_TITLE_MODE]}]},{begin:/[:]/,returnBegin:!0,end:/[{;]/,relevance:0,excludeEnd:!1,keywords:b,illegal:/["\[\]]/,contains:[{begin:a.UNDERSCORE_IDENT_RE+"\\s*\\(",keywords:b+" "+c},a.QUOTE_STRING_MODE]},{beginKeywords:"new throw",relevance:0},{className:"function",begin:/\w+ +\w+(\.)?\w+\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/,returnBegin:!0,end:/[{;=]/,keywords:b,excludeEnd:!0,contains:[{begin:a.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[a.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,relevance:0,keywords:b,contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,a.C_BLOCK_COMMENT_MODE]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},a.C_NUMBER_MODE,{className:"annotation",begin:"@[A-Za-z]+"}]}}),a.registerLanguage("autohotkey",function(a){var b={className:"escape",begin:"`[\\s\\S]"},c=a.COMMENT(";","$",{relevance:0}),d=[{className:"built_in",begin:"A_[a-zA-Z0-9]+"},{className:"built_in",beginKeywords:"ComSpec Clipboard ClipboardAll ErrorLevel"}];return{case_insensitive:!0,keywords:{keyword:"Break Continue Else Gosub If Loop Return While",literal:"A true false NOT AND OR"},contains:d.concat([b,a.inherit(a.QUOTE_STRING_MODE,{contains:[b]}),c,{className:"number",begin:a.NUMBER_RE,relevance:0},{className:"var_expand",begin:"%",end:"%",illegal:"\\n",contains:[b]},{className:"label",contains:[b],variants:[{begin:'^[^\\n";]+::(?!=)'},{begin:'^[^\\n";]+:(?!=)',relevance:0}]},{begin:",\\s*,",relevance:10}])}}),a.registerLanguage("autoit",function(a){var b="ByRef Case Const ContinueCase ContinueLoop Default Dim Do Else ElseIf EndFunc EndIf EndSelect EndSwitch EndWith Enum Exit ExitLoop For Func Global If In Local Next ReDim Return Select Static Step Switch Then To Until Volatile WEnd While With",c="True False And Null Not Or",d="Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Opt Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown TCPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent TrayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend UDPShutdown UDPStartup VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait WinWaitActive WinWaitClose WinWaitNotActive Array1DToHistogram ArrayAdd ArrayBinarySearch ArrayColDelete ArrayColInsert ArrayCombinations ArrayConcatenate ArrayDelete ArrayDisplay ArrayExtract ArrayFindAll ArrayInsert ArrayMax ArrayMaxIndex ArrayMin ArrayMinIndex ArrayPermute ArrayPop ArrayPush ArrayReverse ArraySearch ArrayShuffle ArraySort ArraySwap ArrayToClip ArrayToString ArrayTranspose ArrayTrim ArrayUnique Assert ChooseColor ChooseFont ClipBoard_ChangeChain ClipBoard_Close ClipBoard_CountFormats ClipBoard_Empty ClipBoard_EnumFormats ClipBoard_FormatStr ClipBoard_GetData ClipBoard_GetDataEx ClipBoard_GetFormatName ClipBoard_GetOpenWindow ClipBoard_GetOwner ClipBoard_GetPriorityFormat ClipBoard_GetSequenceNumber ClipBoard_GetViewer ClipBoard_IsFormatAvailable ClipBoard_Open ClipBoard_RegisterFormat ClipBoard_SetData ClipBoard_SetDataEx ClipBoard_SetViewer ClipPutFile ColorConvertHSLtoRGB ColorConvertRGBtoHSL ColorGetBlue ColorGetCOLORREF ColorGetGreen ColorGetRed ColorGetRGB ColorSetCOLORREF ColorSetRGB Crypt_DecryptData Crypt_DecryptFile Crypt_DeriveKey Crypt_DestroyKey Crypt_EncryptData Crypt_EncryptFile Crypt_GenRandom Crypt_HashData Crypt_HashFile Crypt_Shutdown Crypt_Startup DateAdd DateDayOfWeek DateDaysInMonth DateDiff DateIsLeapYear DateIsValid DateTimeFormat DateTimeSplit DateToDayOfWeek DateToDayOfWeekISO DateToDayValue DateToMonth Date_Time_CompareFileTime Date_Time_DOSDateTimeToArray Date_Time_DOSDateTimeToFileTime Date_Time_DOSDateTimeToStr Date_Time_DOSDateToArray Date_Time_DOSDateToStr Date_Time_DOSTimeToArray Date_Time_DOSTimeToStr Date_Time_EncodeFileTime Date_Time_EncodeSystemTime Date_Time_FileTimeToArray Date_Time_FileTimeToDOSDateTime Date_Time_FileTimeToLocalFileTime Date_Time_FileTimeToStr Date_Time_FileTimeToSystemTime Date_Time_GetFileTime Date_Time_GetLocalTime Date_Time_GetSystemTime Date_Time_GetSystemTimeAdjustment Date_Time_GetSystemTimeAsFileTime Date_Time_GetSystemTimes Date_Time_GetTickCount Date_Time_GetTimeZoneInformation Date_Time_LocalFileTimeToFileTime Date_Time_SetFileTime Date_Time_SetLocalTime Date_Time_SetSystemTime Date_Time_SetSystemTimeAdjustment Date_Time_SetTimeZoneInformation Date_Time_SystemTimeToArray Date_Time_SystemTimeToDateStr Date_Time_SystemTimeToDateTimeStr Date_Time_SystemTimeToFileTime Date_Time_SystemTimeToTimeStr Date_Time_SystemTimeToTzSpecificLocalTime Date_Time_TzSpecificLocalTimeToSystemTime DayValueToDate DebugBugReportEnv DebugCOMError DebugOut DebugReport DebugReportEx DebugReportVar DebugSetup Degree EventLog__Backup EventLog__Clear EventLog__Close EventLog__Count EventLog__DeregisterSource EventLog__Full EventLog__Notify EventLog__Oldest EventLog__Open EventLog__OpenBackup EventLog__Read EventLog__RegisterSource EventLog__Report Excel_BookAttach Excel_BookClose Excel_BookList Excel_BookNew Excel_BookOpen Excel_BookOpenText Excel_BookSave Excel_BookSaveAs Excel_Close Excel_ColumnToLetter Excel_ColumnToNumber Excel_ConvertFormula Excel_Export Excel_FilterGet Excel_FilterSet Excel_Open Excel_PictureAdd Excel_Print Excel_RangeCopyPaste Excel_RangeDelete Excel_RangeFind Excel_RangeInsert Excel_RangeLinkAddRemove Excel_RangeRead Excel_RangeReplace Excel_RangeSort Excel_RangeValidate Excel_RangeWrite Excel_SheetAdd Excel_SheetCopyMove Excel_SheetDelete Excel_SheetList FileCountLines FileCreate FileListToArray FileListToArrayRec FilePrint FileReadToArray FileWriteFromArray FileWriteLog FileWriteToLine FTP_Close FTP_Command FTP_Connect FTP_DecodeInternetStatus FTP_DirCreate FTP_DirDelete FTP_DirGetCurrent FTP_DirPutContents FTP_DirSetCurrent FTP_FileClose FTP_FileDelete FTP_FileGet FTP_FileGetSize FTP_FileOpen FTP_FilePut FTP_FileRead FTP_FileRename FTP_FileTimeLoHiToStr FTP_FindFileClose FTP_FindFileFirst FTP_FindFileNext FTP_GetLastResponseInfo FTP_ListToArray FTP_ListToArray2D FTP_ListToArrayEx FTP_Open FTP_ProgressDownload FTP_ProgressUpload FTP_SetStatusCallback GDIPlus_ArrowCapCreate GDIPlus_ArrowCapDispose GDIPlus_ArrowCapGetFillState GDIPlus_ArrowCapGetHeight GDIPlus_ArrowCapGetMiddleInset GDIPlus_ArrowCapGetWidth GDIPlus_ArrowCapSetFillState GDIPlus_ArrowCapSetHeight GDIPlus_ArrowCapSetMiddleInset GDIPlus_ArrowCapSetWidth GDIPlus_BitmapApplyEffect GDIPlus_BitmapApplyEffectEx GDIPlus_BitmapCloneArea GDIPlus_BitmapConvertFormat GDIPlus_BitmapCreateApplyEffect GDIPlus_BitmapCreateApplyEffectEx GDIPlus_BitmapCreateDIBFromBitmap GDIPlus_BitmapCreateFromFile GDIPlus_BitmapCreateFromGraphics GDIPlus_BitmapCreateFromHBITMAP GDIPlus_BitmapCreateFromHICON GDIPlus_BitmapCreateFromHICON32 GDIPlus_BitmapCreateFromMemory GDIPlus_BitmapCreateFromResource GDIPlus_BitmapCreateFromScan0 GDIPlus_BitmapCreateFromStream GDIPlus_BitmapCreateHBITMAPFromBitmap GDIPlus_BitmapDispose GDIPlus_BitmapGetHistogram GDIPlus_BitmapGetHistogramEx GDIPlus_BitmapGetHistogramSize GDIPlus_BitmapGetPixel GDIPlus_BitmapLockBits GDIPlus_BitmapSetPixel GDIPlus_BitmapUnlockBits GDIPlus_BrushClone GDIPlus_BrushCreateSolid GDIPlus_BrushDispose GDIPlus_BrushGetSolidColor GDIPlus_BrushGetType GDIPlus_BrushSetSolidColor GDIPlus_ColorMatrixCreate GDIPlus_ColorMatrixCreateGrayScale GDIPlus_ColorMatrixCreateNegative GDIPlus_ColorMatrixCreateSaturation GDIPlus_ColorMatrixCreateScale GDIPlus_ColorMatrixCreateTranslate GDIPlus_CustomLineCapClone GDIPlus_CustomLineCapCreate GDIPlus_CustomLineCapDispose GDIPlus_CustomLineCapGetStrokeCaps GDIPlus_CustomLineCapSetStrokeCaps GDIPlus_Decoders GDIPlus_DecodersGetCount GDIPlus_DecodersGetSize GDIPlus_DrawImageFX GDIPlus_DrawImageFXEx GDIPlus_DrawImagePoints GDIPlus_EffectCreate GDIPlus_EffectCreateBlur GDIPlus_EffectCreateBrightnessContrast GDIPlus_EffectCreateColorBalance GDIPlus_EffectCreateColorCurve GDIPlus_EffectCreateColorLUT GDIPlus_EffectCreateColorMatrix GDIPlus_EffectCreateHueSaturationLightness GDIPlus_EffectCreateLevels GDIPlus_EffectCreateRedEyeCorrection GDIPlus_EffectCreateSharpen GDIPlus_EffectCreateTint GDIPlus_EffectDispose GDIPlus_EffectGetParameters GDIPlus_EffectSetParameters GDIPlus_Encoders GDIPlus_EncodersGetCLSID GDIPlus_EncodersGetCount GDIPlus_EncodersGetParamList GDIPlus_EncodersGetParamListSize GDIPlus_EncodersGetSize GDIPlus_FontCreate GDIPlus_FontDispose GDIPlus_FontFamilyCreate GDIPlus_FontFamilyCreateFromCollection GDIPlus_FontFamilyDispose GDIPlus_FontFamilyGetCellAscent GDIPlus_FontFamilyGetCellDescent GDIPlus_FontFamilyGetEmHeight GDIPlus_FontFamilyGetLineSpacing GDIPlus_FontGetHeight GDIPlus_FontPrivateAddFont GDIPlus_FontPrivateAddMemoryFont GDIPlus_FontPrivateCollectionDispose GDIPlus_FontPrivateCreateCollection GDIPlus_GraphicsClear GDIPlus_GraphicsCreateFromHDC GDIPlus_GraphicsCreateFromHWND GDIPlus_GraphicsDispose GDIPlus_GraphicsDrawArc GDIPlus_GraphicsDrawBezier GDIPlus_GraphicsDrawClosedCurve GDIPlus_GraphicsDrawClosedCurve2 GDIPlus_GraphicsDrawCurve GDIPlus_GraphicsDrawCurve2 GDIPlus_GraphicsDrawEllipse GDIPlus_GraphicsDrawImage GDIPlus_GraphicsDrawImagePointsRect GDIPlus_GraphicsDrawImageRect GDIPlus_GraphicsDrawImageRectRect GDIPlus_GraphicsDrawLine GDIPlus_GraphicsDrawPath GDIPlus_GraphicsDrawPie GDIPlus_GraphicsDrawPolygon GDIPlus_GraphicsDrawRect GDIPlus_GraphicsDrawString GDIPlus_GraphicsDrawStringEx GDIPlus_GraphicsFillClosedCurve GDIPlus_GraphicsFillClosedCurve2 GDIPlus_GraphicsFillEllipse GDIPlus_GraphicsFillPath GDIPlus_GraphicsFillPie GDIPlus_GraphicsFillPolygon GDIPlus_GraphicsFillRect GDIPlus_GraphicsFillRegion GDIPlus_GraphicsGetCompositingMode GDIPlus_GraphicsGetCompositingQuality GDIPlus_GraphicsGetDC GDIPlus_GraphicsGetInterpolationMode GDIPlus_GraphicsGetSmoothingMode GDIPlus_GraphicsGetTransform GDIPlus_GraphicsMeasureCharacterRanges GDIPlus_GraphicsMeasureString GDIPlus_GraphicsReleaseDC GDIPlus_GraphicsResetClip GDIPlus_GraphicsResetTransform GDIPlus_GraphicsRestore GDIPlus_GraphicsRotateTransform GDIPlus_GraphicsSave GDIPlus_GraphicsScaleTransform GDIPlus_GraphicsSetClipPath GDIPlus_GraphicsSetClipRect GDIPlus_GraphicsSetClipRegion GDIPlus_GraphicsSetCompositingMode GDIPlus_GraphicsSetCompositingQuality GDIPlus_GraphicsSetInterpolationMode GDIPlus_GraphicsSetPixelOffsetMode GDIPlus_GraphicsSetSmoothingMode GDIPlus_GraphicsSetTextRenderingHint GDIPlus_GraphicsSetTransform GDIPlus_GraphicsTransformPoints GDIPlus_GraphicsTranslateTransform GDIPlus_HatchBrushCreate GDIPlus_HICONCreateFromBitmap GDIPlus_ImageAttributesCreate GDIPlus_ImageAttributesDispose GDIPlus_ImageAttributesSetColorKeys GDIPlus_ImageAttributesSetColorMatrix GDIPlus_ImageDispose GDIPlus_ImageGetDimension GDIPlus_ImageGetFlags GDIPlus_ImageGetGraphicsContext GDIPlus_ImageGetHeight GDIPlus_ImageGetHorizontalResolution GDIPlus_ImageGetPixelFormat GDIPlus_ImageGetRawFormat GDIPlus_ImageGetThumbnail GDIPlus_ImageGetType GDIPlus_ImageGetVerticalResolution GDIPlus_ImageGetWidth GDIPlus_ImageLoadFromFile GDIPlus_ImageLoadFromStream GDIPlus_ImageResize GDIPlus_ImageRotateFlip GDIPlus_ImageSaveToFile GDIPlus_ImageSaveToFileEx GDIPlus_ImageSaveToStream GDIPlus_ImageScale GDIPlus_LineBrushCreate GDIPlus_LineBrushCreateFromRect GDIPlus_LineBrushCreateFromRectWithAngle GDIPlus_LineBrushGetColors GDIPlus_LineBrushGetRect GDIPlus_LineBrushMultiplyTransform GDIPlus_LineBrushResetTransform GDIPlus_LineBrushSetBlend GDIPlus_LineBrushSetColors GDIPlus_LineBrushSetGammaCorrection GDIPlus_LineBrushSetLinearBlend GDIPlus_LineBrushSetPresetBlend GDIPlus_LineBrushSetSigmaBlend GDIPlus_LineBrushSetTransform GDIPlus_MatrixClone GDIPlus_MatrixCreate GDIPlus_MatrixDispose GDIPlus_MatrixGetElements GDIPlus_MatrixInvert GDIPlus_MatrixMultiply GDIPlus_MatrixRotate GDIPlus_MatrixScale GDIPlus_MatrixSetElements GDIPlus_MatrixShear GDIPlus_MatrixTransformPoints GDIPlus_MatrixTranslate GDIPlus_PaletteInitialize GDIPlus_ParamAdd GDIPlus_ParamInit GDIPlus_ParamSize GDIPlus_PathAddArc GDIPlus_PathAddBezier GDIPlus_PathAddClosedCurve GDIPlus_PathAddClosedCurve2 GDIPlus_PathAddCurve GDIPlus_PathAddCurve2 GDIPlus_PathAddCurve3 GDIPlus_PathAddEllipse GDIPlus_PathAddLine GDIPlus_PathAddLine2 GDIPlus_PathAddPath GDIPlus_PathAddPie GDIPlus_PathAddPolygon GDIPlus_PathAddRectangle GDIPlus_PathAddString GDIPlus_PathBrushCreate GDIPlus_PathBrushCreateFromPath GDIPlus_PathBrushGetCenterPoint GDIPlus_PathBrushGetFocusScales GDIPlus_PathBrushGetPointCount GDIPlus_PathBrushGetRect GDIPlus_PathBrushGetWrapMode GDIPlus_PathBrushMultiplyTransform GDIPlus_PathBrushResetTransform GDIPlus_PathBrushSetBlend GDIPlus_PathBrushSetCenterColor GDIPlus_PathBrushSetCenterPoint GDIPlus_PathBrushSetFocusScales GDIPlus_PathBrushSetGammaCorrection GDIPlus_PathBrushSetLinearBlend GDIPlus_PathBrushSetPresetBlend GDIPlus_PathBrushSetSigmaBlend GDIPlus_PathBrushSetSurroundColor GDIPlus_PathBrushSetSurroundColorsWithCount GDIPlus_PathBrushSetTransform GDIPlus_PathBrushSetWrapMode GDIPlus_PathClone GDIPlus_PathCloseFigure GDIPlus_PathCreate GDIPlus_PathCreate2 GDIPlus_PathDispose GDIPlus_PathFlatten GDIPlus_PathGetData GDIPlus_PathGetFillMode GDIPlus_PathGetLastPoint GDIPlus_PathGetPointCount GDIPlus_PathGetPoints GDIPlus_PathGetWorldBounds GDIPlus_PathIsOutlineVisiblePoint GDIPlus_PathIsVisiblePoint GDIPlus_PathIterCreate GDIPlus_PathIterDispose GDIPlus_PathIterGetSubpathCount GDIPlus_PathIterNextMarkerPath GDIPlus_PathIterNextSubpathPath GDIPlus_PathIterRewind GDIPlus_PathReset GDIPlus_PathReverse GDIPlus_PathSetFillMode GDIPlus_PathSetMarker GDIPlus_PathStartFigure GDIPlus_PathTransform GDIPlus_PathWarp GDIPlus_PathWiden GDIPlus_PathWindingModeOutline GDIPlus_PenCreate GDIPlus_PenCreate2 GDIPlus_PenDispose GDIPlus_PenGetAlignment GDIPlus_PenGetColor GDIPlus_PenGetCustomEndCap GDIPlus_PenGetDashCap GDIPlus_PenGetDashStyle GDIPlus_PenGetEndCap GDIPlus_PenGetMiterLimit GDIPlus_PenGetWidth GDIPlus_PenSetAlignment GDIPlus_PenSetColor GDIPlus_PenSetCustomEndCap GDIPlus_PenSetDashCap GDIPlus_PenSetDashStyle GDIPlus_PenSetEndCap GDIPlus_PenSetLineCap GDIPlus_PenSetLineJoin GDIPlus_PenSetMiterLimit GDIPlus_PenSetStartCap GDIPlus_PenSetWidth GDIPlus_RectFCreate GDIPlus_RegionClone GDIPlus_RegionCombinePath GDIPlus_RegionCombineRect GDIPlus_RegionCombineRegion GDIPlus_RegionCreate GDIPlus_RegionCreateFromPath GDIPlus_RegionCreateFromRect GDIPlus_RegionDispose GDIPlus_RegionGetBounds GDIPlus_RegionGetHRgn GDIPlus_RegionTransform GDIPlus_RegionTranslate GDIPlus_Shutdown GDIPlus_Startup GDIPlus_StringFormatCreate GDIPlus_StringFormatDispose GDIPlus_StringFormatGetMeasurableCharacterRangeCount GDIPlus_StringFormatSetAlign GDIPlus_StringFormatSetLineAlign GDIPlus_StringFormatSetMeasurableCharacterRanges GDIPlus_TextureCreate GDIPlus_TextureCreate2 GDIPlus_TextureCreateIA GetIP GUICtrlAVI_Close GUICtrlAVI_Create GUICtrlAVI_Destroy GUICtrlAVI_IsPlaying GUICtrlAVI_Open GUICtrlAVI_OpenEx GUICtrlAVI_Play GUICtrlAVI_Seek GUICtrlAVI_Show GUICtrlAVI_Stop GUICtrlButton_Click GUICtrlButton_Create GUICtrlButton_Destroy GUICtrlButton_Enable GUICtrlButton_GetCheck GUICtrlButton_GetFocus GUICtrlButton_GetIdealSize GUICtrlButton_GetImage GUICtrlButton_GetImageList GUICtrlButton_GetNote GUICtrlButton_GetNoteLength GUICtrlButton_GetSplitInfo GUICtrlButton_GetState GUICtrlButton_GetText GUICtrlButton_GetTextMargin GUICtrlButton_SetCheck GUICtrlButton_SetDontClick GUICtrlButton_SetFocus GUICtrlButton_SetImage GUICtrlButton_SetImageList GUICtrlButton_SetNote GUICtrlButton_SetShield GUICtrlButton_SetSize GUICtrlButton_SetSplitInfo GUICtrlButton_SetState GUICtrlButton_SetStyle GUICtrlButton_SetText GUICtrlButton_SetTextMargin GUICtrlButton_Show GUICtrlComboBoxEx_AddDir GUICtrlComboBoxEx_AddString GUICtrlComboBoxEx_BeginUpdate GUICtrlComboBoxEx_Create GUICtrlComboBoxEx_CreateSolidBitMap GUICtrlComboBoxEx_DeleteString GUICtrlComboBoxEx_Destroy GUICtrlComboBoxEx_EndUpdate GUICtrlComboBoxEx_FindStringExact GUICtrlComboBoxEx_GetComboBoxInfo GUICtrlComboBoxEx_GetComboControl GUICtrlComboBoxEx_GetCount GUICtrlComboBoxEx_GetCurSel GUICtrlComboBoxEx_GetDroppedControlRect GUICtrlComboBoxEx_GetDroppedControlRectEx GUICtrlComboBoxEx_GetDroppedState GUICtrlComboBoxEx_GetDroppedWidth GUICtrlComboBoxEx_GetEditControl GUICtrlComboBoxEx_GetEditSel GUICtrlComboBoxEx_GetEditText GUICtrlComboBoxEx_GetExtendedStyle GUICtrlComboBoxEx_GetExtendedUI GUICtrlComboBoxEx_GetImageList GUICtrlComboBoxEx_GetItem GUICtrlComboBoxEx_GetItemEx GUICtrlComboBoxEx_GetItemHeight GUICtrlComboBoxEx_GetItemImage GUICtrlComboBoxEx_GetItemIndent GUICtrlComboBoxEx_GetItemOverlayImage GUICtrlComboBoxEx_GetItemParam GUICtrlComboBoxEx_GetItemSelectedImage GUICtrlComboBoxEx_GetItemText GUICtrlComboBoxEx_GetItemTextLen GUICtrlComboBoxEx_GetList GUICtrlComboBoxEx_GetListArray GUICtrlComboBoxEx_GetLocale GUICtrlComboBoxEx_GetLocaleCountry GUICtrlComboBoxEx_GetLocaleLang GUICtrlComboBoxEx_GetLocalePrimLang GUICtrlComboBoxEx_GetLocaleSubLang GUICtrlComboBoxEx_GetMinVisible GUICtrlComboBoxEx_GetTopIndex GUICtrlComboBoxEx_GetUnicode GUICtrlComboBoxEx_InitStorage GUICtrlComboBoxEx_InsertString GUICtrlComboBoxEx_LimitText GUICtrlComboBoxEx_ReplaceEditSel GUICtrlComboBoxEx_ResetContent GUICtrlComboBoxEx_SetCurSel GUICtrlComboBoxEx_SetDroppedWidth GUICtrlComboBoxEx_SetEditSel GUICtrlComboBoxEx_SetEditText GUICtrlComboBoxEx_SetExtendedStyle GUICtrlComboBoxEx_SetExtendedUI GUICtrlComboBoxEx_SetImageList GUICtrlComboBoxEx_SetItem GUICtrlComboBoxEx_SetItemEx GUICtrlComboBoxEx_SetItemHeight GUICtrlComboBoxEx_SetItemImage GUICtrlComboBoxEx_SetItemIndent GUICtrlComboBoxEx_SetItemOverlayImage GUICtrlComboBoxEx_SetItemParam GUICtrlComboBoxEx_SetItemSelectedImage GUICtrlComboBoxEx_SetMinVisible GUICtrlComboBoxEx_SetTopIndex GUICtrlComboBoxEx_SetUnicode GUICtrlComboBoxEx_ShowDropDown GUICtrlComboBox_AddDir GUICtrlComboBox_AddString GUICtrlComboBox_AutoComplete GUICtrlComboBox_BeginUpdate GUICtrlComboBox_Create GUICtrlComboBox_DeleteString GUICtrlComboBox_Destroy GUICtrlComboBox_EndUpdate GUICtrlComboBox_FindString GUICtrlComboBox_FindStringExact GUICtrlComboBox_GetComboBoxInfo GUICtrlComboBox_GetCount GUICtrlComboBox_GetCueBanner GUICtrlComboBox_GetCurSel GUICtrlComboBox_GetDroppedControlRect GUICtrlComboBox_GetDroppedControlRectEx GUICtrlComboBox_GetDroppedState GUICtrlComboBox_GetDroppedWidth GUICtrlComboBox_GetEditSel GUICtrlComboBox_GetEditText GUICtrlComboBox_GetExtendedUI GUICtrlComboBox_GetHorizontalExtent GUICtrlComboBox_GetItemHeight GUICtrlComboBox_GetLBText GUICtrlComboBox_GetLBTextLen GUICtrlComboBox_GetList GUICtrlComboBox_GetListArray GUICtrlComboBox_GetLocale GUICtrlComboBox_GetLocaleCountry GUICtrlComboBox_GetLocaleLang GUICtrlComboBox_GetLocalePrimLang GUICtrlComboBox_GetLocaleSubLang GUICtrlComboBox_GetMinVisible GUICtrlComboBox_GetTopIndex GUICtrlComboBox_InitStorage GUICtrlComboBox_InsertString GUICtrlComboBox_LimitText GUICtrlComboBox_ReplaceEditSel GUICtrlComboBox_ResetContent GUICtrlComboBox_SelectString GUICtrlComboBox_SetCueBanner GUICtrlComboBox_SetCurSel GUICtrlComboBox_SetDroppedWidth GUICtrlComboBox_SetEditSel GUICtrlComboBox_SetEditText GUICtrlComboBox_SetExtendedUI GUICtrlComboBox_SetHorizontalExtent GUICtrlComboBox_SetItemHeight GUICtrlComboBox_SetMinVisible GUICtrlComboBox_SetTopIndex GUICtrlComboBox_ShowDropDown GUICtrlDTP_Create GUICtrlDTP_Destroy GUICtrlDTP_GetMCColor GUICtrlDTP_GetMCFont GUICtrlDTP_GetMonthCal GUICtrlDTP_GetRange GUICtrlDTP_GetRangeEx GUICtrlDTP_GetSystemTime GUICtrlDTP_GetSystemTimeEx GUICtrlDTP_SetFormat GUICtrlDTP_SetMCColor GUICtrlDTP_SetMCFont GUICtrlDTP_SetRange GUICtrlDTP_SetRangeEx GUICtrlDTP_SetSystemTime GUICtrlDTP_SetSystemTimeEx GUICtrlEdit_AppendText GUICtrlEdit_BeginUpdate GUICtrlEdit_CanUndo GUICtrlEdit_CharFromPos GUICtrlEdit_Create GUICtrlEdit_Destroy GUICtrlEdit_EmptyUndoBuffer GUICtrlEdit_EndUpdate GUICtrlEdit_Find GUICtrlEdit_FmtLines GUICtrlEdit_GetCueBanner GUICtrlEdit_GetFirstVisibleLine GUICtrlEdit_GetLimitText GUICtrlEdit_GetLine GUICtrlEdit_GetLineCount GUICtrlEdit_GetMargins GUICtrlEdit_GetModify GUICtrlEdit_GetPasswordChar GUICtrlEdit_GetRECT GUICtrlEdit_GetRECTEx GUICtrlEdit_GetSel GUICtrlEdit_GetText GUICtrlEdit_GetTextLen GUICtrlEdit_HideBalloonTip GUICtrlEdit_InsertText GUICtrlEdit_LineFromChar GUICtrlEdit_LineIndex GUICtrlEdit_LineLength GUICtrlEdit_LineScroll GUICtrlEdit_PosFromChar GUICtrlEdit_ReplaceSel GUICtrlEdit_Scroll GUICtrlEdit_SetCueBanner GUICtrlEdit_SetLimitText GUICtrlEdit_SetMargins GUICtrlEdit_SetModify GUICtrlEdit_SetPasswordChar GUICtrlEdit_SetReadOnly GUICtrlEdit_SetRECT GUICtrlEdit_SetRECTEx GUICtrlEdit_SetRECTNP GUICtrlEdit_SetRectNPEx GUICtrlEdit_SetSel GUICtrlEdit_SetTabStops GUICtrlEdit_SetText GUICtrlEdit_ShowBalloonTip GUICtrlEdit_Undo GUICtrlHeader_AddItem GUICtrlHeader_ClearFilter GUICtrlHeader_ClearFilterAll GUICtrlHeader_Create GUICtrlHeader_CreateDragImage GUICtrlHeader_DeleteItem GUICtrlHeader_Destroy GUICtrlHeader_EditFilter GUICtrlHeader_GetBitmapMargin GUICtrlHeader_GetImageList GUICtrlHeader_GetItem GUICtrlHeader_GetItemAlign GUICtrlHeader_GetItemBitmap GUICtrlHeader_GetItemCount GUICtrlHeader_GetItemDisplay GUICtrlHeader_GetItemFlags GUICtrlHeader_GetItemFormat GUICtrlHeader_GetItemImage GUICtrlHeader_GetItemOrder GUICtrlHeader_GetItemParam GUICtrlHeader_GetItemRect GUICtrlHeader_GetItemRectEx GUICtrlHeader_GetItemText GUICtrlHeader_GetItemWidth GUICtrlHeader_GetOrderArray GUICtrlHeader_GetUnicodeFormat GUICtrlHeader_HitTest GUICtrlHeader_InsertItem GUICtrlHeader_Layout GUICtrlHeader_OrderToIndex GUICtrlHeader_SetBitmapMargin GUICtrlHeader_SetFilterChangeTimeout GUICtrlHeader_SetHotDivider GUICtrlHeader_SetImageList GUICtrlHeader_SetItem GUICtrlHeader_SetItemAlign GUICtrlHeader_SetItemBitmap GUICtrlHeader_SetItemDisplay GUICtrlHeader_SetItemFlags GUICtrlHeader_SetItemFormat GUICtrlHeader_SetItemImage GUICtrlHeader_SetItemOrder GUICtrlHeader_SetItemParam GUICtrlHeader_SetItemText GUICtrlHeader_SetItemWidth GUICtrlHeader_SetOrderArray GUICtrlHeader_SetUnicodeFormat GUICtrlIpAddress_ClearAddress GUICtrlIpAddress_Create GUICtrlIpAddress_Destroy GUICtrlIpAddress_Get GUICtrlIpAddress_GetArray GUICtrlIpAddress_GetEx GUICtrlIpAddress_IsBlank GUICtrlIpAddress_Set GUICtrlIpAddress_SetArray GUICtrlIpAddress_SetEx GUICtrlIpAddress_SetFocus GUICtrlIpAddress_SetFont GUICtrlIpAddress_SetRange GUICtrlIpAddress_ShowHide GUICtrlListBox_AddFile GUICtrlListBox_AddString GUICtrlListBox_BeginUpdate GUICtrlListBox_ClickItem GUICtrlListBox_Create GUICtrlListBox_DeleteString GUICtrlListBox_Destroy GUICtrlListBox_Dir GUICtrlListBox_EndUpdate GUICtrlListBox_FindInText GUICtrlListBox_FindString GUICtrlListBox_GetAnchorIndex GUICtrlListBox_GetCaretIndex GUICtrlListBox_GetCount GUICtrlListBox_GetCurSel GUICtrlListBox_GetHorizontalExtent GUICtrlListBox_GetItemData GUICtrlListBox_GetItemHeight GUICtrlListBox_GetItemRect GUICtrlListBox_GetItemRectEx GUICtrlListBox_GetListBoxInfo GUICtrlListBox_GetLocale GUICtrlListBox_GetLocaleCountry GUICtrlListBox_GetLocaleLang GUICtrlListBox_GetLocalePrimLang GUICtrlListBox_GetLocaleSubLang GUICtrlListBox_GetSel GUICtrlListBox_GetSelCount GUICtrlListBox_GetSelItems GUICtrlListBox_GetSelItemsText GUICtrlListBox_GetText GUICtrlListBox_GetTextLen GUICtrlListBox_GetTopIndex GUICtrlListBox_InitStorage GUICtrlListBox_InsertString GUICtrlListBox_ItemFromPoint GUICtrlListBox_ReplaceString GUICtrlListBox_ResetContent GUICtrlListBox_SelectString GUICtrlListBox_SelItemRange GUICtrlListBox_SelItemRangeEx GUICtrlListBox_SetAnchorIndex GUICtrlListBox_SetCaretIndex GUICtrlListBox_SetColumnWidth GUICtrlListBox_SetCurSel GUICtrlListBox_SetHorizontalExtent GUICtrlListBox_SetItemData GUICtrlListBox_SetItemHeight GUICtrlListBox_SetLocale GUICtrlListBox_SetSel GUICtrlListBox_SetTabStops GUICtrlListBox_SetTopIndex GUICtrlListBox_Sort GUICtrlListBox_SwapString GUICtrlListBox_UpdateHScroll GUICtrlListView_AddArray GUICtrlListView_AddColumn GUICtrlListView_AddItem GUICtrlListView_AddSubItem GUICtrlListView_ApproximateViewHeight GUICtrlListView_ApproximateViewRect GUICtrlListView_ApproximateViewWidth GUICtrlListView_Arrange GUICtrlListView_BeginUpdate GUICtrlListView_CancelEditLabel GUICtrlListView_ClickItem GUICtrlListView_CopyItems GUICtrlListView_Create GUICtrlListView_CreateDragImage GUICtrlListView_CreateSolidBitMap GUICtrlListView_DeleteAllItems GUICtrlListView_DeleteColumn GUICtrlListView_DeleteItem GUICtrlListView_DeleteItemsSelected GUICtrlListView_Destroy GUICtrlListView_DrawDragImage GUICtrlListView_EditLabel GUICtrlListView_EnableGroupView GUICtrlListView_EndUpdate GUICtrlListView_EnsureVisible GUICtrlListView_FindInText GUICtrlListView_FindItem GUICtrlListView_FindNearest GUICtrlListView_FindParam GUICtrlListView_FindText GUICtrlListView_GetBkColor GUICtrlListView_GetBkImage GUICtrlListView_GetCallbackMask GUICtrlListView_GetColumn GUICtrlListView_GetColumnCount GUICtrlListView_GetColumnOrder GUICtrlListView_GetColumnOrderArray GUICtrlListView_GetColumnWidth GUICtrlListView_GetCounterPage GUICtrlListView_GetEditControl GUICtrlListView_GetExtendedListViewStyle GUICtrlListView_GetFocusedGroup GUICtrlListView_GetGroupCount GUICtrlListView_GetGroupInfo GUICtrlListView_GetGroupInfoByIndex GUICtrlListView_GetGroupRect GUICtrlListView_GetGroupViewEnabled GUICtrlListView_GetHeader GUICtrlListView_GetHotCursor GUICtrlListView_GetHotItem GUICtrlListView_GetHoverTime GUICtrlListView_GetImageList GUICtrlListView_GetISearchString GUICtrlListView_GetItem GUICtrlListView_GetItemChecked GUICtrlListView_GetItemCount GUICtrlListView_GetItemCut GUICtrlListView_GetItemDropHilited GUICtrlListView_GetItemEx GUICtrlListView_GetItemFocused GUICtrlListView_GetItemGroupID GUICtrlListView_GetItemImage GUICtrlListView_GetItemIndent GUICtrlListView_GetItemParam GUICtrlListView_GetItemPosition GUICtrlListView_GetItemPositionX GUICtrlListView_GetItemPositionY GUICtrlListView_GetItemRect GUICtrlListView_GetItemRectEx GUICtrlListView_GetItemSelected GUICtrlListView_GetItemSpacing GUICtrlListView_GetItemSpacingX GUICtrlListView_GetItemSpacingY GUICtrlListView_GetItemState GUICtrlListView_GetItemStateImage GUICtrlListView_GetItemText GUICtrlListView_GetItemTextArray GUICtrlListView_GetItemTextString GUICtrlListView_GetNextItem GUICtrlListView_GetNumberOfWorkAreas GUICtrlListView_GetOrigin GUICtrlListView_GetOriginX GUICtrlListView_GetOriginY GUICtrlListView_GetOutlineColor GUICtrlListView_GetSelectedColumn GUICtrlListView_GetSelectedCount GUICtrlListView_GetSelectedIndices GUICtrlListView_GetSelectionMark GUICtrlListView_GetStringWidth GUICtrlListView_GetSubItemRect GUICtrlListView_GetTextBkColor GUICtrlListView_GetTextColor GUICtrlListView_GetToolTips GUICtrlListView_GetTopIndex GUICtrlListView_GetUnicodeFormat GUICtrlListView_GetView GUICtrlListView_GetViewDetails GUICtrlListView_GetViewLarge GUICtrlListView_GetViewList GUICtrlListView_GetViewRect GUICtrlListView_GetViewSmall GUICtrlListView_GetViewTile GUICtrlListView_HideColumn GUICtrlListView_HitTest GUICtrlListView_InsertColumn GUICtrlListView_InsertGroup GUICtrlListView_InsertItem GUICtrlListView_JustifyColumn GUICtrlListView_MapIDToIndex GUICtrlListView_MapIndexToID GUICtrlListView_RedrawItems GUICtrlListView_RegisterSortCallBack GUICtrlListView_RemoveAllGroups GUICtrlListView_RemoveGroup GUICtrlListView_Scroll GUICtrlListView_SetBkColor GUICtrlListView_SetBkImage GUICtrlListView_SetCallBackMask GUICtrlListView_SetColumn GUICtrlListView_SetColumnOrder GUICtrlListView_SetColumnOrderArray GUICtrlListView_SetColumnWidth GUICtrlListView_SetExtendedListViewStyle GUICtrlListView_SetGroupInfo GUICtrlListView_SetHotItem GUICtrlListView_SetHoverTime GUICtrlListView_SetIconSpacing GUICtrlListView_SetImageList GUICtrlListView_SetItem GUICtrlListView_SetItemChecked GUICtrlListView_SetItemCount GUICtrlListView_SetItemCut GUICtrlListView_SetItemDropHilited GUICtrlListView_SetItemEx GUICtrlListView_SetItemFocused GUICtrlListView_SetItemGroupID GUICtrlListView_SetItemImage GUICtrlListView_SetItemIndent GUICtrlListView_SetItemParam GUICtrlListView_SetItemPosition GUICtrlListView_SetItemPosition32 GUICtrlListView_SetItemSelected GUICtrlListView_SetItemState GUICtrlListView_SetItemStateImage GUICtrlListView_SetItemText GUICtrlListView_SetOutlineColor GUICtrlListView_SetSelectedColumn GUICtrlListView_SetSelectionMark GUICtrlListView_SetTextBkColor GUICtrlListView_SetTextColor GUICtrlListView_SetToolTips GUICtrlListView_SetUnicodeFormat GUICtrlListView_SetView GUICtrlListView_SetWorkAreas GUICtrlListView_SimpleSort GUICtrlListView_SortItems GUICtrlListView_SubItemHitTest GUICtrlListView_UnRegisterSortCallBack GUICtrlMenu_AddMenuItem GUICtrlMenu_AppendMenu GUICtrlMenu_CalculatePopupWindowPosition GUICtrlMenu_CheckMenuItem GUICtrlMenu_CheckRadioItem GUICtrlMenu_CreateMenu GUICtrlMenu_CreatePopup GUICtrlMenu_DeleteMenu GUICtrlMenu_DestroyMenu GUICtrlMenu_DrawMenuBar GUICtrlMenu_EnableMenuItem GUICtrlMenu_FindItem GUICtrlMenu_FindParent GUICtrlMenu_GetItemBmp GUICtrlMenu_GetItemBmpChecked GUICtrlMenu_GetItemBmpUnchecked GUICtrlMenu_GetItemChecked GUICtrlMenu_GetItemCount GUICtrlMenu_GetItemData GUICtrlMenu_GetItemDefault GUICtrlMenu_GetItemDisabled GUICtrlMenu_GetItemEnabled GUICtrlMenu_GetItemGrayed GUICtrlMenu_GetItemHighlighted GUICtrlMenu_GetItemID GUICtrlMenu_GetItemInfo GUICtrlMenu_GetItemRect GUICtrlMenu_GetItemRectEx GUICtrlMenu_GetItemState GUICtrlMenu_GetItemStateEx GUICtrlMenu_GetItemSubMenu GUICtrlMenu_GetItemText GUICtrlMenu_GetItemType GUICtrlMenu_GetMenu GUICtrlMenu_GetMenuBackground GUICtrlMenu_GetMenuBarInfo GUICtrlMenu_GetMenuContextHelpID GUICtrlMenu_GetMenuData GUICtrlMenu_GetMenuDefaultItem GUICtrlMenu_GetMenuHeight GUICtrlMenu_GetMenuInfo GUICtrlMenu_GetMenuStyle GUICtrlMenu_GetSystemMenu GUICtrlMenu_InsertMenuItem GUICtrlMenu_InsertMenuItemEx GUICtrlMenu_IsMenu GUICtrlMenu_LoadMenu GUICtrlMenu_MapAccelerator GUICtrlMenu_MenuItemFromPoint GUICtrlMenu_RemoveMenu GUICtrlMenu_SetItemBitmaps GUICtrlMenu_SetItemBmp GUICtrlMenu_SetItemBmpChecked GUICtrlMenu_SetItemBmpUnchecked GUICtrlMenu_SetItemChecked GUICtrlMenu_SetItemData GUICtrlMenu_SetItemDefault GUICtrlMenu_SetItemDisabled GUICtrlMenu_SetItemEnabled GUICtrlMenu_SetItemGrayed GUICtrlMenu_SetItemHighlighted GUICtrlMenu_SetItemID GUICtrlMenu_SetItemInfo GUICtrlMenu_SetItemState GUICtrlMenu_SetItemSubMenu GUICtrlMenu_SetItemText GUICtrlMenu_SetItemType GUICtrlMenu_SetMenu GUICtrlMenu_SetMenuBackground GUICtrlMenu_SetMenuContextHelpID GUICtrlMenu_SetMenuData GUICtrlMenu_SetMenuDefaultItem GUICtrlMenu_SetMenuHeight GUICtrlMenu_SetMenuInfo GUICtrlMenu_SetMenuStyle GUICtrlMenu_TrackPopupMenu GUICtrlMonthCal_Create GUICtrlMonthCal_Destroy GUICtrlMonthCal_GetCalendarBorder GUICtrlMonthCal_GetCalendarCount GUICtrlMonthCal_GetColor GUICtrlMonthCal_GetColorArray GUICtrlMonthCal_GetCurSel GUICtrlMonthCal_GetCurSelStr GUICtrlMonthCal_GetFirstDOW GUICtrlMonthCal_GetFirstDOWStr GUICtrlMonthCal_GetMaxSelCount GUICtrlMonthCal_GetMaxTodayWidth GUICtrlMonthCal_GetMinReqHeight GUICtrlMonthCal_GetMinReqRect GUICtrlMonthCal_GetMinReqRectArray GUICtrlMonthCal_GetMinReqWidth GUICtrlMonthCal_GetMonthDelta GUICtrlMonthCal_GetMonthRange GUICtrlMonthCal_GetMonthRangeMax GUICtrlMonthCal_GetMonthRangeMaxStr GUICtrlMonthCal_GetMonthRangeMin GUICtrlMonthCal_GetMonthRangeMinStr GUICtrlMonthCal_GetMonthRangeSpan GUICtrlMonthCal_GetRange GUICtrlMonthCal_GetRangeMax GUICtrlMonthCal_GetRangeMaxStr GUICtrlMonthCal_GetRangeMin GUICtrlMonthCal_GetRangeMinStr GUICtrlMonthCal_GetSelRange GUICtrlMonthCal_GetSelRangeMax GUICtrlMonthCal_GetSelRangeMaxStr GUICtrlMonthCal_GetSelRangeMin GUICtrlMonthCal_GetSelRangeMinStr GUICtrlMonthCal_GetToday GUICtrlMonthCal_GetTodayStr GUICtrlMonthCal_GetUnicodeFormat GUICtrlMonthCal_HitTest GUICtrlMonthCal_SetCalendarBorder GUICtrlMonthCal_SetColor GUICtrlMonthCal_SetCurSel GUICtrlMonthCal_SetDayState GUICtrlMonthCal_SetFirstDOW GUICtrlMonthCal_SetMaxSelCount GUICtrlMonthCal_SetMonthDelta GUICtrlMonthCal_SetRange GUICtrlMonthCal_SetSelRange GUICtrlMonthCal_SetToday GUICtrlMonthCal_SetUnicodeFormat GUICtrlRebar_AddBand GUICtrlRebar_AddToolBarBand GUICtrlRebar_BeginDrag GUICtrlRebar_Create GUICtrlRebar_DeleteBand GUICtrlRebar_Destroy GUICtrlRebar_DragMove GUICtrlRebar_EndDrag GUICtrlRebar_GetBandBackColor GUICtrlRebar_GetBandBorders GUICtrlRebar_GetBandBordersEx GUICtrlRebar_GetBandChildHandle GUICtrlRebar_GetBandChildSize GUICtrlRebar_GetBandCount GUICtrlRebar_GetBandForeColor GUICtrlRebar_GetBandHeaderSize GUICtrlRebar_GetBandID GUICtrlRebar_GetBandIdealSize GUICtrlRebar_GetBandLength GUICtrlRebar_GetBandLParam GUICtrlRebar_GetBandMargins GUICtrlRebar_GetBandMarginsEx GUICtrlRebar_GetBandRect GUICtrlRebar_GetBandRectEx GUICtrlRebar_GetBandStyle GUICtrlRebar_GetBandStyleBreak GUICtrlRebar_GetBandStyleChildEdge GUICtrlRebar_GetBandStyleFixedBMP GUICtrlRebar_GetBandStyleFixedSize GUICtrlRebar_GetBandStyleGripperAlways GUICtrlRebar_GetBandStyleHidden GUICtrlRebar_GetBandStyleHideTitle GUICtrlRebar_GetBandStyleNoGripper GUICtrlRebar_GetBandStyleTopAlign GUICtrlRebar_GetBandStyleUseChevron GUICtrlRebar_GetBandStyleVariableHeight GUICtrlRebar_GetBandText GUICtrlRebar_GetBarHeight GUICtrlRebar_GetBarInfo GUICtrlRebar_GetBKColor GUICtrlRebar_GetColorScheme GUICtrlRebar_GetRowCount GUICtrlRebar_GetRowHeight GUICtrlRebar_GetTextColor GUICtrlRebar_GetToolTips GUICtrlRebar_GetUnicodeFormat GUICtrlRebar_HitTest GUICtrlRebar_IDToIndex GUICtrlRebar_MaximizeBand GUICtrlRebar_MinimizeBand GUICtrlRebar_MoveBand GUICtrlRebar_SetBandBackColor GUICtrlRebar_SetBandForeColor GUICtrlRebar_SetBandHeaderSize GUICtrlRebar_SetBandID GUICtrlRebar_SetBandIdealSize GUICtrlRebar_SetBandLength GUICtrlRebar_SetBandLParam GUICtrlRebar_SetBandStyle GUICtrlRebar_SetBandStyleBreak GUICtrlRebar_SetBandStyleChildEdge GUICtrlRebar_SetBandStyleFixedBMP GUICtrlRebar_SetBandStyleFixedSize GUICtrlRebar_SetBandStyleGripperAlways GUICtrlRebar_SetBandStyleHidden GUICtrlRebar_SetBandStyleHideTitle GUICtrlRebar_SetBandStyleNoGripper GUICtrlRebar_SetBandStyleTopAlign GUICtrlRebar_SetBandStyleUseChevron GUICtrlRebar_SetBandStyleVariableHeight GUICtrlRebar_SetBandText GUICtrlRebar_SetBarInfo GUICtrlRebar_SetBKColor GUICtrlRebar_SetColorScheme GUICtrlRebar_SetTextColor GUICtrlRebar_SetToolTips GUICtrlRebar_SetUnicodeFormat GUICtrlRebar_ShowBand GUICtrlRichEdit_AppendText GUICtrlRichEdit_AutoDetectURL GUICtrlRichEdit_CanPaste GUICtrlRichEdit_CanPasteSpecial GUICtrlRichEdit_CanRedo GUICtrlRichEdit_CanUndo GUICtrlRichEdit_ChangeFontSize GUICtrlRichEdit_Copy GUICtrlRichEdit_Create GUICtrlRichEdit_Cut GUICtrlRichEdit_Deselect GUICtrlRichEdit_Destroy GUICtrlRichEdit_EmptyUndoBuffer GUICtrlRichEdit_FindText GUICtrlRichEdit_FindTextInRange GUICtrlRichEdit_GetBkColor GUICtrlRichEdit_GetCharAttributes GUICtrlRichEdit_GetCharBkColor GUICtrlRichEdit_GetCharColor GUICtrlRichEdit_GetCharPosFromXY GUICtrlRichEdit_GetCharPosOfNextWord GUICtrlRichEdit_GetCharPosOfPreviousWord GUICtrlRichEdit_GetCharWordBreakInfo GUICtrlRichEdit_GetFirstCharPosOnLine GUICtrlRichEdit_GetFont GUICtrlRichEdit_GetLineCount GUICtrlRichEdit_GetLineLength GUICtrlRichEdit_GetLineNumberFromCharPos GUICtrlRichEdit_GetNextRedo GUICtrlRichEdit_GetNextUndo GUICtrlRichEdit_GetNumberOfFirstVisibleLine GUICtrlRichEdit_GetParaAlignment GUICtrlRichEdit_GetParaAttributes GUICtrlRichEdit_GetParaBorder GUICtrlRichEdit_GetParaIndents GUICtrlRichEdit_GetParaNumbering GUICtrlRichEdit_GetParaShading GUICtrlRichEdit_GetParaSpacing GUICtrlRichEdit_GetParaTabStops GUICtrlRichEdit_GetPasswordChar GUICtrlRichEdit_GetRECT GUICtrlRichEdit_GetScrollPos GUICtrlRichEdit_GetSel GUICtrlRichEdit_GetSelAA GUICtrlRichEdit_GetSelText GUICtrlRichEdit_GetSpaceUnit GUICtrlRichEdit_GetText GUICtrlRichEdit_GetTextInLine GUICtrlRichEdit_GetTextInRange GUICtrlRichEdit_GetTextLength GUICtrlRichEdit_GetVersion GUICtrlRichEdit_GetXYFromCharPos GUICtrlRichEdit_GetZoom GUICtrlRichEdit_GotoCharPos GUICtrlRichEdit_HideSelection GUICtrlRichEdit_InsertText GUICtrlRichEdit_IsModified GUICtrlRichEdit_IsTextSelected GUICtrlRichEdit_Paste GUICtrlRichEdit_PasteSpecial GUICtrlRichEdit_PauseRedraw GUICtrlRichEdit_Redo GUICtrlRichEdit_ReplaceText GUICtrlRichEdit_ResumeRedraw GUICtrlRichEdit_ScrollLineOrPage GUICtrlRichEdit_ScrollLines GUICtrlRichEdit_ScrollToCaret GUICtrlRichEdit_SetBkColor GUICtrlRichEdit_SetCharAttributes GUICtrlRichEdit_SetCharBkColor GUICtrlRichEdit_SetCharColor GUICtrlRichEdit_SetEventMask GUICtrlRichEdit_SetFont GUICtrlRichEdit_SetLimitOnText GUICtrlRichEdit_SetModified GUICtrlRichEdit_SetParaAlignment GUICtrlRichEdit_SetParaAttributes GUICtrlRichEdit_SetParaBorder GUICtrlRichEdit_SetParaIndents GUICtrlRichEdit_SetParaNumbering GUICtrlRichEdit_SetParaShading GUICtrlRichEdit_SetParaSpacing GUICtrlRichEdit_SetParaTabStops GUICtrlRichEdit_SetPasswordChar GUICtrlRichEdit_SetReadOnly GUICtrlRichEdit_SetRECT GUICtrlRichEdit_SetScrollPos GUICtrlRichEdit_SetSel GUICtrlRichEdit_SetSpaceUnit GUICtrlRichEdit_SetTabStops GUICtrlRichEdit_SetText GUICtrlRichEdit_SetUndoLimit GUICtrlRichEdit_SetZoom GUICtrlRichEdit_StreamFromFile GUICtrlRichEdit_StreamFromVar GUICtrlRichEdit_StreamToFile GUICtrlRichEdit_StreamToVar GUICtrlRichEdit_Undo GUICtrlSlider_ClearSel GUICtrlSlider_ClearTics GUICtrlSlider_Create GUICtrlSlider_Destroy GUICtrlSlider_GetBuddy GUICtrlSlider_GetChannelRect GUICtrlSlider_GetChannelRectEx GUICtrlSlider_GetLineSize GUICtrlSlider_GetLogicalTics GUICtrlSlider_GetNumTics GUICtrlSlider_GetPageSize GUICtrlSlider_GetPos GUICtrlSlider_GetRange GUICtrlSlider_GetRangeMax GUICtrlSlider_GetRangeMin GUICtrlSlider_GetSel GUICtrlSlider_GetSelEnd GUICtrlSlider_GetSelStart GUICtrlSlider_GetThumbLength GUICtrlSlider_GetThumbRect GUICtrlSlider_GetThumbRectEx GUICtrlSlider_GetTic GUICtrlSlider_GetTicPos GUICtrlSlider_GetToolTips GUICtrlSlider_GetUnicodeFormat GUICtrlSlider_SetBuddy GUICtrlSlider_SetLineSize GUICtrlSlider_SetPageSize GUICtrlSlider_SetPos GUICtrlSlider_SetRange GUICtrlSlider_SetRangeMax GUICtrlSlider_SetRangeMin GUICtrlSlider_SetSel GUICtrlSlider_SetSelEnd GUICtrlSlider_SetSelStart GUICtrlSlider_SetThumbLength GUICtrlSlider_SetTic GUICtrlSlider_SetTicFreq GUICtrlSlider_SetTipSide GUICtrlSlider_SetToolTips GUICtrlSlider_SetUnicodeFormat GUICtrlStatusBar_Create GUICtrlStatusBar_Destroy GUICtrlStatusBar_EmbedControl GUICtrlStatusBar_GetBorders GUICtrlStatusBar_GetBordersHorz GUICtrlStatusBar_GetBordersRect GUICtrlStatusBar_GetBordersVert GUICtrlStatusBar_GetCount GUICtrlStatusBar_GetHeight GUICtrlStatusBar_GetIcon GUICtrlStatusBar_GetParts GUICtrlStatusBar_GetRect GUICtrlStatusBar_GetRectEx GUICtrlStatusBar_GetText GUICtrlStatusBar_GetTextFlags GUICtrlStatusBar_GetTextLength GUICtrlStatusBar_GetTextLengthEx GUICtrlStatusBar_GetTipText GUICtrlStatusBar_GetUnicodeFormat GUICtrlStatusBar_GetWidth GUICtrlStatusBar_IsSimple GUICtrlStatusBar_Resize GUICtrlStatusBar_SetBkColor GUICtrlStatusBar_SetIcon GUICtrlStatusBar_SetMinHeight GUICtrlStatusBar_SetParts GUICtrlStatusBar_SetSimple GUICtrlStatusBar_SetText GUICtrlStatusBar_SetTipText GUICtrlStatusBar_SetUnicodeFormat GUICtrlStatusBar_ShowHide GUICtrlTab_ActivateTab GUICtrlTab_ClickTab GUICtrlTab_Create GUICtrlTab_DeleteAllItems GUICtrlTab_DeleteItem GUICtrlTab_DeselectAll GUICtrlTab_Destroy GUICtrlTab_FindTab GUICtrlTab_GetCurFocus GUICtrlTab_GetCurSel GUICtrlTab_GetDisplayRect GUICtrlTab_GetDisplayRectEx GUICtrlTab_GetExtendedStyle GUICtrlTab_GetImageList GUICtrlTab_GetItem GUICtrlTab_GetItemCount GUICtrlTab_GetItemImage GUICtrlTab_GetItemParam GUICtrlTab_GetItemRect GUICtrlTab_GetItemRectEx GUICtrlTab_GetItemState GUICtrlTab_GetItemText GUICtrlTab_GetRowCount GUICtrlTab_GetToolTips GUICtrlTab_GetUnicodeFormat GUICtrlTab_HighlightItem GUICtrlTab_HitTest GUICtrlTab_InsertItem GUICtrlTab_RemoveImage GUICtrlTab_SetCurFocus GUICtrlTab_SetCurSel GUICtrlTab_SetExtendedStyle GUICtrlTab_SetImageList GUICtrlTab_SetItem GUICtrlTab_SetItemImage GUICtrlTab_SetItemParam GUICtrlTab_SetItemSize GUICtrlTab_SetItemState GUICtrlTab_SetItemText GUICtrlTab_SetMinTabWidth GUICtrlTab_SetPadding GUICtrlTab_SetToolTips GUICtrlTab_SetUnicodeFormat GUICtrlToolbar_AddBitmap GUICtrlToolbar_AddButton GUICtrlToolbar_AddButtonSep GUICtrlToolbar_AddString GUICtrlToolbar_ButtonCount GUICtrlToolbar_CheckButton GUICtrlToolbar_ClickAccel GUICtrlToolbar_ClickButton GUICtrlToolbar_ClickIndex GUICtrlToolbar_CommandToIndex GUICtrlToolbar_Create GUICtrlToolbar_Customize GUICtrlToolbar_DeleteButton GUICtrlToolbar_Destroy GUICtrlToolbar_EnableButton GUICtrlToolbar_FindToolbar GUICtrlToolbar_GetAnchorHighlight GUICtrlToolbar_GetBitmapFlags GUICtrlToolbar_GetButtonBitmap GUICtrlToolbar_GetButtonInfo GUICtrlToolbar_GetButtonInfoEx GUICtrlToolbar_GetButtonParam GUICtrlToolbar_GetButtonRect GUICtrlToolbar_GetButtonRectEx GUICtrlToolbar_GetButtonSize GUICtrlToolbar_GetButtonState GUICtrlToolbar_GetButtonStyle GUICtrlToolbar_GetButtonText GUICtrlToolbar_GetColorScheme GUICtrlToolbar_GetDisabledImageList GUICtrlToolbar_GetExtendedStyle GUICtrlToolbar_GetHotImageList GUICtrlToolbar_GetHotItem GUICtrlToolbar_GetImageList GUICtrlToolbar_GetInsertMark GUICtrlToolbar_GetInsertMarkColor GUICtrlToolbar_GetMaxSize GUICtrlToolbar_GetMetrics GUICtrlToolbar_GetPadding GUICtrlToolbar_GetRows GUICtrlToolbar_GetString GUICtrlToolbar_GetStyle GUICtrlToolbar_GetStyleAltDrag GUICtrlToolbar_GetStyleCustomErase GUICtrlToolbar_GetStyleFlat GUICtrlToolbar_GetStyleList GUICtrlToolbar_GetStyleRegisterDrop GUICtrlToolbar_GetStyleToolTips GUICtrlToolbar_GetStyleTransparent GUICtrlToolbar_GetStyleWrapable GUICtrlToolbar_GetTextRows GUICtrlToolbar_GetToolTips GUICtrlToolbar_GetUnicodeFormat GUICtrlToolbar_HideButton GUICtrlToolbar_HighlightButton GUICtrlToolbar_HitTest GUICtrlToolbar_IndexToCommand GUICtrlToolbar_InsertButton GUICtrlToolbar_InsertMarkHitTest GUICtrlToolbar_IsButtonChecked GUICtrlToolbar_IsButtonEnabled GUICtrlToolbar_IsButtonHidden GUICtrlToolbar_IsButtonHighlighted GUICtrlToolbar_IsButtonIndeterminate GUICtrlToolbar_IsButtonPressed GUICtrlToolbar_LoadBitmap GUICtrlToolbar_LoadImages GUICtrlToolbar_MapAccelerator GUICtrlToolbar_MoveButton GUICtrlToolbar_PressButton GUICtrlToolbar_SetAnchorHighlight GUICtrlToolbar_SetBitmapSize GUICtrlToolbar_SetButtonBitMap GUICtrlToolbar_SetButtonInfo GUICtrlToolbar_SetButtonInfoEx GUICtrlToolbar_SetButtonParam GUICtrlToolbar_SetButtonSize GUICtrlToolbar_SetButtonState GUICtrlToolbar_SetButtonStyle GUICtrlToolbar_SetButtonText GUICtrlToolbar_SetButtonWidth GUICtrlToolbar_SetCmdID GUICtrlToolbar_SetColorScheme GUICtrlToolbar_SetDisabledImageList GUICtrlToolbar_SetDrawTextFlags GUICtrlToolbar_SetExtendedStyle GUICtrlToolbar_SetHotImageList GUICtrlToolbar_SetHotItem GUICtrlToolbar_SetImageList GUICtrlToolbar_SetIndent GUICtrlToolbar_SetIndeterminate GUICtrlToolbar_SetInsertMark GUICtrlToolbar_SetInsertMarkColor GUICtrlToolbar_SetMaxTextRows GUICtrlToolbar_SetMetrics GUICtrlToolbar_SetPadding GUICtrlToolbar_SetParent GUICtrlToolbar_SetRows GUICtrlToolbar_SetStyle GUICtrlToolbar_SetStyleAltDrag GUICtrlToolbar_SetStyleCustomErase GUICtrlToolbar_SetStyleFlat GUICtrlToolbar_SetStyleList GUICtrlToolbar_SetStyleRegisterDrop GUICtrlToolbar_SetStyleToolTips GUICtrlToolbar_SetStyleTransparent GUICtrlToolbar_SetStyleWrapable GUICtrlToolbar_SetToolTips GUICtrlToolbar_SetUnicodeFormat GUICtrlToolbar_SetWindowTheme GUICtrlTreeView_Add GUICtrlTreeView_AddChild GUICtrlTreeView_AddChildFirst GUICtrlTreeView_AddFirst GUICtrlTreeView_BeginUpdate GUICtrlTreeView_ClickItem GUICtrlTreeView_Create GUICtrlTreeView_CreateDragImage GUICtrlTreeView_CreateSolidBitMap GUICtrlTreeView_Delete GUICtrlTreeView_DeleteAll GUICtrlTreeView_DeleteChildren GUICtrlTreeView_Destroy GUICtrlTreeView_DisplayRect GUICtrlTreeView_DisplayRectEx GUICtrlTreeView_EditText GUICtrlTreeView_EndEdit GUICtrlTreeView_EndUpdate GUICtrlTreeView_EnsureVisible GUICtrlTreeView_Expand GUICtrlTreeView_ExpandedOnce GUICtrlTreeView_FindItem GUICtrlTreeView_FindItemEx GUICtrlTreeView_GetBkColor GUICtrlTreeView_GetBold GUICtrlTreeView_GetChecked GUICtrlTreeView_GetChildCount GUICtrlTreeView_GetChildren GUICtrlTreeView_GetCount GUICtrlTreeView_GetCut GUICtrlTreeView_GetDropTarget GUICtrlTreeView_GetEditControl GUICtrlTreeView_GetExpanded GUICtrlTreeView_GetFirstChild GUICtrlTreeView_GetFirstItem GUICtrlTreeView_GetFirstVisible GUICtrlTreeView_GetFocused GUICtrlTreeView_GetHeight GUICtrlTreeView_GetImageIndex GUICtrlTreeView_GetImageListIconHandle GUICtrlTreeView_GetIndent GUICtrlTreeView_GetInsertMarkColor GUICtrlTreeView_GetISearchString GUICtrlTreeView_GetItemByIndex GUICtrlTreeView_GetItemHandle GUICtrlTreeView_GetItemParam GUICtrlTreeView_GetLastChild GUICtrlTreeView_GetLineColor GUICtrlTreeView_GetNext GUICtrlTreeView_GetNextChild GUICtrlTreeView_GetNextSibling GUICtrlTreeView_GetNextVisible GUICtrlTreeView_GetNormalImageList GUICtrlTreeView_GetParentHandle GUICtrlTreeView_GetParentParam GUICtrlTreeView_GetPrev GUICtrlTreeView_GetPrevChild GUICtrlTreeView_GetPrevSibling GUICtrlTreeView_GetPrevVisible GUICtrlTreeView_GetScrollTime GUICtrlTreeView_GetSelected GUICtrlTreeView_GetSelectedImageIndex GUICtrlTreeView_GetSelection GUICtrlTreeView_GetSiblingCount GUICtrlTreeView_GetState GUICtrlTreeView_GetStateImageIndex GUICtrlTreeView_GetStateImageList GUICtrlTreeView_GetText GUICtrlTreeView_GetTextColor GUICtrlTreeView_GetToolTips GUICtrlTreeView_GetTree GUICtrlTreeView_GetUnicodeFormat GUICtrlTreeView_GetVisible GUICtrlTreeView_GetVisibleCount GUICtrlTreeView_HitTest GUICtrlTreeView_HitTestEx GUICtrlTreeView_HitTestItem GUICtrlTreeView_Index GUICtrlTreeView_InsertItem GUICtrlTreeView_IsFirstItem GUICtrlTreeView_IsParent GUICtrlTreeView_Level GUICtrlTreeView_SelectItem GUICtrlTreeView_SelectItemByIndex GUICtrlTreeView_SetBkColor GUICtrlTreeView_SetBold GUICtrlTreeView_SetChecked GUICtrlTreeView_SetCheckedByIndex GUICtrlTreeView_SetChildren GUICtrlTreeView_SetCut GUICtrlTreeView_SetDropTarget GUICtrlTreeView_SetFocused GUICtrlTreeView_SetHeight GUICtrlTreeView_SetIcon GUICtrlTreeView_SetImageIndex GUICtrlTreeView_SetIndent GUICtrlTreeView_SetInsertMark GUICtrlTreeView_SetInsertMarkColor GUICtrlTreeView_SetItemHeight GUICtrlTreeView_SetItemParam GUICtrlTreeView_SetLineColor GUICtrlTreeView_SetNormalImageList GUICtrlTreeView_SetScrollTime GUICtrlTreeView_SetSelected GUICtrlTreeView_SetSelectedImageIndex GUICtrlTreeView_SetState GUICtrlTreeView_SetStateImageIndex GUICtrlTreeView_SetStateImageList GUICtrlTreeView_SetText GUICtrlTreeView_SetTextColor GUICtrlTreeView_SetToolTips GUICtrlTreeView_SetUnicodeFormat GUICtrlTreeView_Sort GUIImageList_Add GUIImageList_AddBitmap GUIImageList_AddIcon GUIImageList_AddMasked GUIImageList_BeginDrag GUIImageList_Copy GUIImageList_Create GUIImageList_Destroy GUIImageList_DestroyIcon GUIImageList_DragEnter GUIImageList_DragLeave GUIImageList_DragMove GUIImageList_Draw GUIImageList_DrawEx GUIImageList_Duplicate GUIImageList_EndDrag GUIImageList_GetBkColor GUIImageList_GetIcon GUIImageList_GetIconHeight GUIImageList_GetIconSize GUIImageList_GetIconSizeEx GUIImageList_GetIconWidth GUIImageList_GetImageCount GUIImageList_GetImageInfoEx GUIImageList_Remove GUIImageList_ReplaceIcon GUIImageList_SetBkColor GUIImageList_SetIconSize GUIImageList_SetImageCount GUIImageList_Swap GUIScrollBars_EnableScrollBar GUIScrollBars_GetScrollBarInfoEx GUIScrollBars_GetScrollBarRect GUIScrollBars_GetScrollBarRGState GUIScrollBars_GetScrollBarXYLineButton GUIScrollBars_GetScrollBarXYThumbBottom GUIScrollBars_GetScrollBarXYThumbTop GUIScrollBars_GetScrollInfo GUIScrollBars_GetScrollInfoEx GUIScrollBars_GetScrollInfoMax GUIScrollBars_GetScrollInfoMin GUIScrollBars_GetScrollInfoPage GUIScrollBars_GetScrollInfoPos GUIScrollBars_GetScrollInfoTrackPos GUIScrollBars_GetScrollPos GUIScrollBars_GetScrollRange GUIScrollBars_Init GUIScrollBars_ScrollWindow GUIScrollBars_SetScrollInfo GUIScrollBars_SetScrollInfoMax GUIScrollBars_SetScrollInfoMin GUIScrollBars_SetScrollInfoPage GUIScrollBars_SetScrollInfoPos GUIScrollBars_SetScrollRange GUIScrollBars_ShowScrollBar GUIToolTip_Activate GUIToolTip_AddTool GUIToolTip_AdjustRect GUIToolTip_BitsToTTF GUIToolTip_Create GUIToolTip_Deactivate GUIToolTip_DelTool GUIToolTip_Destroy GUIToolTip_EnumTools GUIToolTip_GetBubbleHeight GUIToolTip_GetBubbleSize GUIToolTip_GetBubbleWidth GUIToolTip_GetCurrentTool GUIToolTip_GetDelayTime GUIToolTip_GetMargin GUIToolTip_GetMarginEx GUIToolTip_GetMaxTipWidth GUIToolTip_GetText GUIToolTip_GetTipBkColor GUIToolTip_GetTipTextColor GUIToolTip_GetTitleBitMap GUIToolTip_GetTitleText GUIToolTip_GetToolCount GUIToolTip_GetToolInfo GUIToolTip_HitTest GUIToolTip_NewToolRect GUIToolTip_Pop GUIToolTip_PopUp GUIToolTip_SetDelayTime GUIToolTip_SetMargin GUIToolTip_SetMaxTipWidth GUIToolTip_SetTipBkColor GUIToolTip_SetTipTextColor GUIToolTip_SetTitle GUIToolTip_SetToolInfo GUIToolTip_SetWindowTheme GUIToolTip_ToolExists GUIToolTip_ToolToArray GUIToolTip_TrackActivate GUIToolTip_TrackPosition GUIToolTip_Update GUIToolTip_UpdateTipText HexToString IEAction IEAttach IEBodyReadHTML IEBodyReadText IEBodyWriteHTML IECreate IECreateEmbedded IEDocGetObj IEDocInsertHTML IEDocInsertText IEDocReadHTML IEDocWriteHTML IEErrorNotify IEFormElementCheckBoxSelect IEFormElementGetCollection IEFormElementGetObjByName IEFormElementGetValue IEFormElementOptionSelect IEFormElementRadioSelect IEFormElementSetValue IEFormGetCollection IEFormGetObjByName IEFormImageClick IEFormReset IEFormSubmit IEFrameGetCollection IEFrameGetObjByName IEGetObjById IEGetObjByName IEHeadInsertEventScript IEImgClick IEImgGetCollection IEIsFrameSet IELinkClickByIndex IELinkClickByText IELinkGetCollection IELoadWait IELoadWaitTimeout IENavigate IEPropertyGet IEPropertySet IEQuit IETableGetCollection IETableWriteToArray IETagNameAllGetCollection IETagNameGetCollection IE_Example IE_Introduction IE_VersionInfo INetExplorerCapable INetGetSource INetMail INetSmtpMail IsPressed MathCheckDiv Max MemGlobalAlloc MemGlobalFree MemGlobalLock MemGlobalSize MemGlobalUnlock MemMoveMemory MemVirtualAlloc MemVirtualAllocEx MemVirtualFree MemVirtualFreeEx Min MouseTrap NamedPipes_CallNamedPipe NamedPipes_ConnectNamedPipe NamedPipes_CreateNamedPipe NamedPipes_CreatePipe NamedPipes_DisconnectNamedPipe NamedPipes_GetNamedPipeHandleState NamedPipes_GetNamedPipeInfo NamedPipes_PeekNamedPipe NamedPipes_SetNamedPipeHandleState NamedPipes_TransactNamedPipe NamedPipes_WaitNamedPipe Net_Share_ConnectionEnum Net_Share_FileClose Net_Share_FileEnum Net_Share_FileGetInfo Net_Share_PermStr Net_Share_ResourceStr Net_Share_SessionDel Net_Share_SessionEnum Net_Share_SessionGetInfo Net_Share_ShareAdd Net_Share_ShareCheck Net_Share_ShareDel Net_Share_ShareEnum Net_Share_ShareGetInfo Net_Share_ShareSetInfo Net_Share_StatisticsGetSvr Net_Share_StatisticsGetWrk Now NowCalc NowCalcDate NowDate NowTime PathFull PathGetRelative PathMake PathSplit ProcessGetName ProcessGetPriority Radian ReplaceStringInFile RunDos ScreenCapture_Capture ScreenCapture_CaptureWnd ScreenCapture_SaveImage ScreenCapture_SetBMPFormat ScreenCapture_SetJPGQuality ScreenCapture_SetTIFColorDepth ScreenCapture_SetTIFCompression Security__AdjustTokenPrivileges Security__CreateProcessWithToken Security__DuplicateTokenEx Security__GetAccountSid Security__GetLengthSid Security__GetTokenInformation Security__ImpersonateSelf Security__IsValidSid Security__LookupAccountName Security__LookupAccountSid Security__LookupPrivilegeValue Security__OpenProcessToken Security__OpenThreadToken Security__OpenThreadTokenEx Security__SetPrivilege Security__SetTokenInformation Security__SidToStringSid Security__SidTypeStr Security__StringSidToSid SendMessage SendMessageA SetDate SetTime Singleton SoundClose SoundLength SoundOpen SoundPause SoundPlay SoundPos SoundResume SoundSeek SoundStatus SoundStop SQLite_Changes SQLite_Close SQLite_Display2DResult SQLite_Encode SQLite_ErrCode SQLite_ErrMsg SQLite_Escape SQLite_Exec SQLite_FastEncode SQLite_FastEscape SQLite_FetchData SQLite_FetchNames SQLite_GetTable SQLite_GetTable2d SQLite_LastInsertRowID SQLite_LibVersion SQLite_Open SQLite_Query SQLite_QueryFinalize SQLite_QueryReset SQLite_QuerySingleRow SQLite_SafeMode SQLite_SetTimeout SQLite_Shutdown SQLite_SQLiteExe SQLite_Startup SQLite_TotalChanges StringBetween StringExplode StringInsert StringProper StringRepeat StringTitleCase StringToHex TCPIpToName TempFile TicksToTime Timer_Diff Timer_GetIdleTime Timer_GetTimerID Timer_Init Timer_KillAllTimers Timer_KillTimer Timer_SetTimer TimeToTicks VersionCompare viClose viExecCommand viFindGpib viGpibBusReset viGTL viInteractiveControl viOpen viSetAttribute viSetTimeout WeekNumberISO WinAPI_AbortPath WinAPI_ActivateKeyboardLayout WinAPI_AddClipboardFormatListener WinAPI_AddFontMemResourceEx WinAPI_AddFontResourceEx WinAPI_AddIconOverlay WinAPI_AddIconTransparency WinAPI_AddMRUString WinAPI_AdjustBitmap WinAPI_AdjustTokenPrivileges WinAPI_AdjustWindowRectEx WinAPI_AlphaBlend WinAPI_AngleArc WinAPI_AnimateWindow WinAPI_Arc WinAPI_ArcTo WinAPI_ArrayToStruct WinAPI_AssignProcessToJobObject WinAPI_AssocGetPerceivedType WinAPI_AssocQueryString WinAPI_AttachConsole WinAPI_AttachThreadInput WinAPI_BackupRead WinAPI_BackupReadAbort WinAPI_BackupSeek WinAPI_BackupWrite WinAPI_BackupWriteAbort WinAPI_Beep WinAPI_BeginBufferedPaint WinAPI_BeginDeferWindowPos WinAPI_BeginPaint WinAPI_BeginPath WinAPI_BeginUpdateResource WinAPI_BitBlt WinAPI_BringWindowToTop WinAPI_BroadcastSystemMessage WinAPI_BrowseForFolderDlg WinAPI_BufferedPaintClear WinAPI_BufferedPaintInit WinAPI_BufferedPaintSetAlpha WinAPI_BufferedPaintUnInit WinAPI_CallNextHookEx WinAPI_CallWindowProc WinAPI_CallWindowProcW WinAPI_CascadeWindows WinAPI_ChangeWindowMessageFilterEx WinAPI_CharToOem WinAPI_ChildWindowFromPointEx WinAPI_ClientToScreen WinAPI_ClipCursor WinAPI_CloseDesktop WinAPI_CloseEnhMetaFile WinAPI_CloseFigure WinAPI_CloseHandle WinAPI_CloseThemeData WinAPI_CloseWindow WinAPI_CloseWindowStation WinAPI_CLSIDFromProgID WinAPI_CoInitialize WinAPI_ColorAdjustLuma WinAPI_ColorHLSToRGB WinAPI_ColorRGBToHLS WinAPI_CombineRgn WinAPI_CombineTransform WinAPI_CommandLineToArgv WinAPI_CommDlgExtendedError WinAPI_CommDlgExtendedErrorEx WinAPI_CompareString WinAPI_CompressBitmapBits WinAPI_CompressBuffer WinAPI_ComputeCrc32 WinAPI_ConfirmCredentials WinAPI_CopyBitmap WinAPI_CopyCursor WinAPI_CopyEnhMetaFile WinAPI_CopyFileEx WinAPI_CopyIcon WinAPI_CopyImage WinAPI_CopyRect WinAPI_CopyStruct WinAPI_CoTaskMemAlloc WinAPI_CoTaskMemFree WinAPI_CoTaskMemRealloc WinAPI_CoUninitialize WinAPI_Create32BitHBITMAP WinAPI_Create32BitHICON WinAPI_CreateANDBitmap WinAPI_CreateBitmap WinAPI_CreateBitmapIndirect WinAPI_CreateBrushIndirect WinAPI_CreateBuffer WinAPI_CreateBufferFromStruct WinAPI_CreateCaret WinAPI_CreateColorAdjustment WinAPI_CreateCompatibleBitmap WinAPI_CreateCompatibleBitmapEx WinAPI_CreateCompatibleDC WinAPI_CreateDesktop WinAPI_CreateDIB WinAPI_CreateDIBColorTable WinAPI_CreateDIBitmap WinAPI_CreateDIBSection WinAPI_CreateDirectory WinAPI_CreateDirectoryEx WinAPI_CreateEllipticRgn WinAPI_CreateEmptyIcon WinAPI_CreateEnhMetaFile WinAPI_CreateEvent WinAPI_CreateFile WinAPI_CreateFileEx WinAPI_CreateFileMapping WinAPI_CreateFont WinAPI_CreateFontEx WinAPI_CreateFontIndirect WinAPI_CreateGUID WinAPI_CreateHardLink WinAPI_CreateIcon WinAPI_CreateIconFromResourceEx WinAPI_CreateIconIndirect WinAPI_CreateJobObject WinAPI_CreateMargins WinAPI_CreateMRUList WinAPI_CreateMutex WinAPI_CreateNullRgn WinAPI_CreateNumberFormatInfo WinAPI_CreateObjectID WinAPI_CreatePen WinAPI_CreatePoint WinAPI_CreatePolygonRgn WinAPI_CreateProcess WinAPI_CreateProcessWithToken WinAPI_CreateRect WinAPI_CreateRectEx WinAPI_CreateRectRgn WinAPI_CreateRectRgnIndirect WinAPI_CreateRoundRectRgn WinAPI_CreateSemaphore WinAPI_CreateSize WinAPI_CreateSolidBitmap WinAPI_CreateSolidBrush WinAPI_CreateStreamOnHGlobal WinAPI_CreateString WinAPI_CreateSymbolicLink WinAPI_CreateTransform WinAPI_CreateWindowEx WinAPI_CreateWindowStation WinAPI_DecompressBuffer WinAPI_DecryptFile WinAPI_DeferWindowPos WinAPI_DefineDosDevice WinAPI_DefRawInputProc WinAPI_DefSubclassProc WinAPI_DefWindowProc WinAPI_DefWindowProcW WinAPI_DeleteDC WinAPI_DeleteEnhMetaFile WinAPI_DeleteFile WinAPI_DeleteObject WinAPI_DeleteObjectID WinAPI_DeleteVolumeMountPoint WinAPI_DeregisterShellHookWindow WinAPI_DestroyCaret WinAPI_DestroyCursor WinAPI_DestroyIcon WinAPI_DestroyWindow WinAPI_DeviceIoControl WinAPI_DisplayStruct WinAPI_DllGetVersion WinAPI_DllInstall WinAPI_DllUninstall WinAPI_DPtoLP WinAPI_DragAcceptFiles WinAPI_DragFinish WinAPI_DragQueryFileEx WinAPI_DragQueryPoint WinAPI_DrawAnimatedRects WinAPI_DrawBitmap WinAPI_DrawEdge WinAPI_DrawFocusRect WinAPI_DrawFrameControl WinAPI_DrawIcon WinAPI_DrawIconEx WinAPI_DrawLine WinAPI_DrawShadowText WinAPI_DrawText WinAPI_DrawThemeBackground WinAPI_DrawThemeEdge WinAPI_DrawThemeIcon WinAPI_DrawThemeParentBackground WinAPI_DrawThemeText WinAPI_DrawThemeTextEx WinAPI_DuplicateEncryptionInfoFile WinAPI_DuplicateHandle WinAPI_DuplicateTokenEx WinAPI_DwmDefWindowProc WinAPI_DwmEnableBlurBehindWindow WinAPI_DwmEnableComposition WinAPI_DwmExtendFrameIntoClientArea WinAPI_DwmGetColorizationColor WinAPI_DwmGetColorizationParameters WinAPI_DwmGetWindowAttribute WinAPI_DwmInvalidateIconicBitmaps WinAPI_DwmIsCompositionEnabled WinAPI_DwmQueryThumbnailSourceSize WinAPI_DwmRegisterThumbnail WinAPI_DwmSetColorizationParameters WinAPI_DwmSetIconicLivePreviewBitmap WinAPI_DwmSetIconicThumbnail WinAPI_DwmSetWindowAttribute WinAPI_DwmUnregisterThumbnail WinAPI_DwmUpdateThumbnailProperties WinAPI_DWordToFloat WinAPI_DWordToInt WinAPI_EjectMedia WinAPI_Ellipse WinAPI_EmptyWorkingSet WinAPI_EnableWindow WinAPI_EncryptFile WinAPI_EncryptionDisable WinAPI_EndBufferedPaint WinAPI_EndDeferWindowPos WinAPI_EndPaint WinAPI_EndPath WinAPI_EndUpdateResource WinAPI_EnumChildProcess WinAPI_EnumChildWindows WinAPI_EnumDesktops WinAPI_EnumDesktopWindows WinAPI_EnumDeviceDrivers WinAPI_EnumDisplayDevices WinAPI_EnumDisplayMonitors WinAPI_EnumDisplaySettings WinAPI_EnumDllProc WinAPI_EnumFiles WinAPI_EnumFileStreams WinAPI_EnumFontFamilies WinAPI_EnumHardLinks WinAPI_EnumMRUList WinAPI_EnumPageFiles WinAPI_EnumProcessHandles WinAPI_EnumProcessModules WinAPI_EnumProcessThreads WinAPI_EnumProcessWindows WinAPI_EnumRawInputDevices WinAPI_EnumResourceLanguages WinAPI_EnumResourceNames WinAPI_EnumResourceTypes WinAPI_EnumSystemGeoID WinAPI_EnumSystemLocales WinAPI_EnumUILanguages WinAPI_EnumWindows WinAPI_EnumWindowsPopup WinAPI_EnumWindowStations WinAPI_EnumWindowsTop WinAPI_EqualMemory WinAPI_EqualRect WinAPI_EqualRgn WinAPI_ExcludeClipRect WinAPI_ExpandEnvironmentStrings WinAPI_ExtCreatePen WinAPI_ExtCreateRegion WinAPI_ExtFloodFill WinAPI_ExtractIcon WinAPI_ExtractIconEx WinAPI_ExtSelectClipRgn WinAPI_FatalAppExit WinAPI_FatalExit WinAPI_FileEncryptionStatus WinAPI_FileExists WinAPI_FileIconInit WinAPI_FileInUse WinAPI_FillMemory WinAPI_FillPath WinAPI_FillRect WinAPI_FillRgn WinAPI_FindClose WinAPI_FindCloseChangeNotification WinAPI_FindExecutable WinAPI_FindFirstChangeNotification WinAPI_FindFirstFile WinAPI_FindFirstFileName WinAPI_FindFirstStream WinAPI_FindNextChangeNotification WinAPI_FindNextFile WinAPI_FindNextFileName WinAPI_FindNextStream WinAPI_FindResource WinAPI_FindResourceEx WinAPI_FindTextDlg WinAPI_FindWindow WinAPI_FlashWindow WinAPI_FlashWindowEx WinAPI_FlattenPath WinAPI_FloatToDWord WinAPI_FloatToInt WinAPI_FlushFileBuffers WinAPI_FlushFRBuffer WinAPI_FlushViewOfFile WinAPI_FormatDriveDlg WinAPI_FormatMessage WinAPI_FrameRect WinAPI_FrameRgn WinAPI_FreeLibrary WinAPI_FreeMemory WinAPI_FreeMRUList WinAPI_FreeResource WinAPI_GdiComment WinAPI_GetActiveWindow WinAPI_GetAllUsersProfileDirectory WinAPI_GetAncestor WinAPI_GetApplicationRestartSettings WinAPI_GetArcDirection WinAPI_GetAsyncKeyState WinAPI_GetBinaryType WinAPI_GetBitmapBits WinAPI_GetBitmapDimension WinAPI_GetBitmapDimensionEx WinAPI_GetBkColor WinAPI_GetBkMode WinAPI_GetBoundsRect WinAPI_GetBrushOrg WinAPI_GetBufferedPaintBits WinAPI_GetBufferedPaintDC WinAPI_GetBufferedPaintTargetDC WinAPI_GetBufferedPaintTargetRect WinAPI_GetBValue WinAPI_GetCaretBlinkTime WinAPI_GetCaretPos WinAPI_GetCDType WinAPI_GetClassInfoEx WinAPI_GetClassLongEx WinAPI_GetClassName WinAPI_GetClientHeight WinAPI_GetClientRect WinAPI_GetClientWidth WinAPI_GetClipboardSequenceNumber WinAPI_GetClipBox WinAPI_GetClipCursor WinAPI_GetClipRgn WinAPI_GetColorAdjustment WinAPI_GetCompressedFileSize WinAPI_GetCompression WinAPI_GetConnectedDlg WinAPI_GetCurrentDirectory WinAPI_GetCurrentHwProfile WinAPI_GetCurrentObject WinAPI_GetCurrentPosition WinAPI_GetCurrentProcess WinAPI_GetCurrentProcessExplicitAppUserModelID WinAPI_GetCurrentProcessID WinAPI_GetCurrentThemeName WinAPI_GetCurrentThread WinAPI_GetCurrentThreadId WinAPI_GetCursor WinAPI_GetCursorInfo WinAPI_GetDateFormat WinAPI_GetDC WinAPI_GetDCEx WinAPI_GetDefaultPrinter WinAPI_GetDefaultUserProfileDirectory WinAPI_GetDesktopWindow WinAPI_GetDeviceCaps WinAPI_GetDeviceDriverBaseName WinAPI_GetDeviceDriverFileName WinAPI_GetDeviceGammaRamp WinAPI_GetDIBColorTable WinAPI_GetDIBits WinAPI_GetDiskFreeSpaceEx WinAPI_GetDlgCtrlID WinAPI_GetDlgItem WinAPI_GetDllDirectory WinAPI_GetDriveBusType WinAPI_GetDriveGeometryEx WinAPI_GetDriveNumber WinAPI_GetDriveType WinAPI_GetDurationFormat WinAPI_GetEffectiveClientRect WinAPI_GetEnhMetaFile WinAPI_GetEnhMetaFileBits WinAPI_GetEnhMetaFileDescription WinAPI_GetEnhMetaFileDimension WinAPI_GetEnhMetaFileHeader WinAPI_GetErrorMessage WinAPI_GetErrorMode WinAPI_GetExitCodeProcess WinAPI_GetExtended WinAPI_GetFileAttributes WinAPI_GetFileID WinAPI_GetFileInformationByHandle WinAPI_GetFileInformationByHandleEx WinAPI_GetFilePointerEx WinAPI_GetFileSizeEx WinAPI_GetFileSizeOnDisk WinAPI_GetFileTitle WinAPI_GetFileType WinAPI_GetFileVersionInfo WinAPI_GetFinalPathNameByHandle WinAPI_GetFinalPathNameByHandleEx WinAPI_GetFocus WinAPI_GetFontMemoryResourceInfo WinAPI_GetFontName WinAPI_GetFontResourceInfo WinAPI_GetForegroundWindow WinAPI_GetFRBuffer WinAPI_GetFullPathName WinAPI_GetGeoInfo WinAPI_GetGlyphOutline WinAPI_GetGraphicsMode WinAPI_GetGuiResources WinAPI_GetGUIThreadInfo WinAPI_GetGValue WinAPI_GetHandleInformation WinAPI_GetHGlobalFromStream WinAPI_GetIconDimension WinAPI_GetIconInfo WinAPI_GetIconInfoEx WinAPI_GetIdleTime WinAPI_GetKeyboardLayout WinAPI_GetKeyboardLayoutList WinAPI_GetKeyboardState WinAPI_GetKeyboardType WinAPI_GetKeyNameText WinAPI_GetKeyState WinAPI_GetLastActivePopup WinAPI_GetLastError WinAPI_GetLastErrorMessage WinAPI_GetLayeredWindowAttributes WinAPI_GetLocaleInfo WinAPI_GetLogicalDrives WinAPI_GetMapMode WinAPI_GetMemorySize WinAPI_GetMessageExtraInfo WinAPI_GetModuleFileNameEx WinAPI_GetModuleHandle WinAPI_GetModuleHandleEx WinAPI_GetModuleInformation WinAPI_GetMonitorInfo WinAPI_GetMousePos WinAPI_GetMousePosX WinAPI_GetMousePosY WinAPI_GetMUILanguage WinAPI_GetNumberFormat WinAPI_GetObject WinAPI_GetObjectID WinAPI_GetObjectInfoByHandle WinAPI_GetObjectNameByHandle WinAPI_GetObjectType WinAPI_GetOpenFileName WinAPI_GetOutlineTextMetrics WinAPI_GetOverlappedResult WinAPI_GetParent WinAPI_GetParentProcess WinAPI_GetPerformanceInfo WinAPI_GetPEType WinAPI_GetPhysicallyInstalledSystemMemory WinAPI_GetPixel WinAPI_GetPolyFillMode WinAPI_GetPosFromRect WinAPI_GetPriorityClass WinAPI_GetProcAddress WinAPI_GetProcessAffinityMask WinAPI_GetProcessCommandLine WinAPI_GetProcessFileName WinAPI_GetProcessHandleCount WinAPI_GetProcessID WinAPI_GetProcessIoCounters WinAPI_GetProcessMemoryInfo WinAPI_GetProcessName WinAPI_GetProcessShutdownParameters WinAPI_GetProcessTimes WinAPI_GetProcessUser WinAPI_GetProcessWindowStation WinAPI_GetProcessWorkingDirectory WinAPI_GetProfilesDirectory WinAPI_GetPwrCapabilities WinAPI_GetRawInputBuffer WinAPI_GetRawInputBufferLength WinAPI_GetRawInputData WinAPI_GetRawInputDeviceInfo WinAPI_GetRegionData WinAPI_GetRegisteredRawInputDevices WinAPI_GetRegKeyNameByHandle WinAPI_GetRgnBox WinAPI_GetROP2 WinAPI_GetRValue WinAPI_GetSaveFileName WinAPI_GetShellWindow WinAPI_GetStartupInfo WinAPI_GetStdHandle WinAPI_GetStockObject WinAPI_GetStretchBltMode WinAPI_GetString WinAPI_GetSysColor WinAPI_GetSysColorBrush WinAPI_GetSystemDefaultLangID WinAPI_GetSystemDefaultLCID WinAPI_GetSystemDefaultUILanguage WinAPI_GetSystemDEPPolicy WinAPI_GetSystemInfo WinAPI_GetSystemMetrics WinAPI_GetSystemPowerStatus WinAPI_GetSystemTimes WinAPI_GetSystemWow64Directory WinAPI_GetTabbedTextExtent WinAPI_GetTempFileName WinAPI_GetTextAlign WinAPI_GetTextCharacterExtra WinAPI_GetTextColor WinAPI_GetTextExtentPoint32 WinAPI_GetTextFace WinAPI_GetTextMetrics WinAPI_GetThemeAppProperties WinAPI_GetThemeBackgroundContentRect WinAPI_GetThemeBackgroundExtent WinAPI_GetThemeBackgroundRegion WinAPI_GetThemeBitmap WinAPI_GetThemeBool WinAPI_GetThemeColor WinAPI_GetThemeDocumentationProperty WinAPI_GetThemeEnumValue WinAPI_GetThemeFilename WinAPI_GetThemeFont WinAPI_GetThemeInt WinAPI_GetThemeMargins WinAPI_GetThemeMetric WinAPI_GetThemePartSize WinAPI_GetThemePosition WinAPI_GetThemePropertyOrigin WinAPI_GetThemeRect WinAPI_GetThemeString WinAPI_GetThemeSysBool WinAPI_GetThemeSysColor WinAPI_GetThemeSysColorBrush WinAPI_GetThemeSysFont WinAPI_GetThemeSysInt WinAPI_GetThemeSysSize WinAPI_GetThemeSysString WinAPI_GetThemeTextExtent WinAPI_GetThemeTextMetrics WinAPI_GetThemeTransitionDuration WinAPI_GetThreadDesktop WinAPI_GetThreadErrorMode WinAPI_GetThreadLocale WinAPI_GetThreadUILanguage WinAPI_GetTickCount WinAPI_GetTickCount64 WinAPI_GetTimeFormat WinAPI_GetTopWindow WinAPI_GetUDFColorMode WinAPI_GetUpdateRect WinAPI_GetUpdateRgn WinAPI_GetUserDefaultLangID WinAPI_GetUserDefaultLCID WinAPI_GetUserDefaultUILanguage WinAPI_GetUserGeoID WinAPI_GetUserObjectInformation WinAPI_GetVersion WinAPI_GetVersionEx WinAPI_GetVolumeInformation WinAPI_GetVolumeInformationByHandle WinAPI_GetVolumeNameForVolumeMountPoint WinAPI_GetWindow WinAPI_GetWindowDC WinAPI_GetWindowDisplayAffinity WinAPI_GetWindowExt WinAPI_GetWindowFileName WinAPI_GetWindowHeight WinAPI_GetWindowInfo WinAPI_GetWindowLong WinAPI_GetWindowOrg WinAPI_GetWindowPlacement WinAPI_GetWindowRect WinAPI_GetWindowRgn WinAPI_GetWindowRgnBox WinAPI_GetWindowSubclass WinAPI_GetWindowText WinAPI_GetWindowTheme WinAPI_GetWindowThreadProcessId WinAPI_GetWindowWidth WinAPI_GetWorkArea WinAPI_GetWorldTransform WinAPI_GetXYFromPoint WinAPI_GlobalMemoryStatus WinAPI_GradientFill WinAPI_GUIDFromString WinAPI_GUIDFromStringEx WinAPI_HashData WinAPI_HashString WinAPI_HiByte WinAPI_HideCaret WinAPI_HiDWord WinAPI_HiWord WinAPI_InflateRect WinAPI_InitMUILanguage WinAPI_InProcess WinAPI_IntersectClipRect WinAPI_IntersectRect WinAPI_IntToDWord WinAPI_IntToFloat WinAPI_InvalidateRect WinAPI_InvalidateRgn WinAPI_InvertANDBitmap WinAPI_InvertColor WinAPI_InvertRect WinAPI_InvertRgn WinAPI_IOCTL WinAPI_IsAlphaBitmap WinAPI_IsBadCodePtr WinAPI_IsBadReadPtr WinAPI_IsBadStringPtr WinAPI_IsBadWritePtr WinAPI_IsChild WinAPI_IsClassName WinAPI_IsDoorOpen WinAPI_IsElevated WinAPI_IsHungAppWindow WinAPI_IsIconic WinAPI_IsInternetConnected WinAPI_IsLoadKBLayout WinAPI_IsMemory WinAPI_IsNameInExpression WinAPI_IsNetworkAlive WinAPI_IsPathShared WinAPI_IsProcessInJob WinAPI_IsProcessorFeaturePresent WinAPI_IsRectEmpty WinAPI_IsThemeActive WinAPI_IsThemeBackgroundPartiallyTransparent WinAPI_IsThemePartDefined WinAPI_IsValidLocale WinAPI_IsWindow WinAPI_IsWindowEnabled WinAPI_IsWindowUnicode WinAPI_IsWindowVisible WinAPI_IsWow64Process WinAPI_IsWritable WinAPI_IsZoomed WinAPI_Keybd_Event WinAPI_KillTimer WinAPI_LineDDA WinAPI_LineTo WinAPI_LoadBitmap WinAPI_LoadCursor WinAPI_LoadCursorFromFile WinAPI_LoadIcon WinAPI_LoadIconMetric WinAPI_LoadIconWithScaleDown WinAPI_LoadImage WinAPI_LoadIndirectString WinAPI_LoadKeyboardLayout WinAPI_LoadLibrary WinAPI_LoadLibraryEx WinAPI_LoadMedia WinAPI_LoadResource WinAPI_LoadShell32Icon WinAPI_LoadString WinAPI_LoadStringEx WinAPI_LoByte WinAPI_LocalFree WinAPI_LockDevice WinAPI_LockFile WinAPI_LockResource WinAPI_LockWindowUpdate WinAPI_LockWorkStation WinAPI_LoDWord WinAPI_LongMid WinAPI_LookupIconIdFromDirectoryEx WinAPI_LoWord WinAPI_LPtoDP WinAPI_MAKELANGID WinAPI_MAKELCID WinAPI_MakeLong WinAPI_MakeQWord WinAPI_MakeWord WinAPI_MapViewOfFile WinAPI_MapVirtualKey WinAPI_MaskBlt WinAPI_MessageBeep WinAPI_MessageBoxCheck WinAPI_MessageBoxIndirect WinAPI_MirrorIcon WinAPI_ModifyWorldTransform WinAPI_MonitorFromPoint WinAPI_MonitorFromRect WinAPI_MonitorFromWindow WinAPI_Mouse_Event WinAPI_MoveFileEx WinAPI_MoveMemory WinAPI_MoveTo WinAPI_MoveToEx WinAPI_MoveWindow WinAPI_MsgBox WinAPI_MulDiv WinAPI_MultiByteToWideChar WinAPI_MultiByteToWideCharEx WinAPI_NtStatusToDosError WinAPI_OemToChar WinAPI_OffsetClipRgn WinAPI_OffsetPoints WinAPI_OffsetRect WinAPI_OffsetRgn WinAPI_OffsetWindowOrg WinAPI_OpenDesktop WinAPI_OpenFileById WinAPI_OpenFileDlg WinAPI_OpenFileMapping WinAPI_OpenIcon WinAPI_OpenInputDesktop WinAPI_OpenJobObject WinAPI_OpenMutex WinAPI_OpenProcess WinAPI_OpenProcessToken WinAPI_OpenSemaphore WinAPI_OpenThemeData WinAPI_OpenWindowStation WinAPI_PageSetupDlg WinAPI_PaintDesktop WinAPI_PaintRgn WinAPI_ParseURL WinAPI_ParseUserName WinAPI_PatBlt WinAPI_PathAddBackslash WinAPI_PathAddExtension WinAPI_PathAppend WinAPI_PathBuildRoot WinAPI_PathCanonicalize WinAPI_PathCommonPrefix WinAPI_PathCompactPath WinAPI_PathCompactPathEx WinAPI_PathCreateFromUrl WinAPI_PathFindExtension WinAPI_PathFindFileName WinAPI_PathFindNextComponent WinAPI_PathFindOnPath WinAPI_PathGetArgs WinAPI_PathGetCharType WinAPI_PathGetDriveNumber WinAPI_PathIsContentType WinAPI_PathIsDirectory WinAPI_PathIsDirectoryEmpty WinAPI_PathIsExe WinAPI_PathIsFileSpec WinAPI_PathIsLFNFileSpec WinAPI_PathIsRelative WinAPI_PathIsRoot WinAPI_PathIsSameRoot WinAPI_PathIsSystemFolder WinAPI_PathIsUNC WinAPI_PathIsUNCServer WinAPI_PathIsUNCServerShare WinAPI_PathMakeSystemFolder WinAPI_PathMatchSpec WinAPI_PathParseIconLocation WinAPI_PathRelativePathTo WinAPI_PathRemoveArgs WinAPI_PathRemoveBackslash WinAPI_PathRemoveExtension WinAPI_PathRemoveFileSpec WinAPI_PathRenameExtension WinAPI_PathSearchAndQualify WinAPI_PathSkipRoot WinAPI_PathStripPath WinAPI_PathStripToRoot WinAPI_PathToRegion WinAPI_PathUndecorate WinAPI_PathUnExpandEnvStrings WinAPI_PathUnmakeSystemFolder WinAPI_PathUnquoteSpaces WinAPI_PathYetAnotherMakeUniqueName WinAPI_PickIconDlg WinAPI_PlayEnhMetaFile WinAPI_PlaySound WinAPI_PlgBlt WinAPI_PointFromRect WinAPI_PolyBezier WinAPI_PolyBezierTo WinAPI_PolyDraw WinAPI_Polygon WinAPI_PostMessage WinAPI_PrimaryLangId WinAPI_PrintDlg WinAPI_PrintDlgEx WinAPI_PrintWindow WinAPI_ProgIDFromCLSID WinAPI_PtInRect WinAPI_PtInRectEx WinAPI_PtInRegion WinAPI_PtVisible WinAPI_QueryDosDevice WinAPI_QueryInformationJobObject WinAPI_QueryPerformanceCounter WinAPI_QueryPerformanceFrequency WinAPI_RadialGradientFill WinAPI_ReadDirectoryChanges WinAPI_ReadFile WinAPI_ReadProcessMemory WinAPI_Rectangle WinAPI_RectInRegion WinAPI_RectIsEmpty WinAPI_RectVisible WinAPI_RedrawWindow WinAPI_RegCloseKey WinAPI_RegConnectRegistry WinAPI_RegCopyTree WinAPI_RegCopyTreeEx WinAPI_RegCreateKey WinAPI_RegDeleteEmptyKey WinAPI_RegDeleteKey WinAPI_RegDeleteKeyValue WinAPI_RegDeleteTree WinAPI_RegDeleteTreeEx WinAPI_RegDeleteValue WinAPI_RegDisableReflectionKey WinAPI_RegDuplicateHKey WinAPI_RegEnableReflectionKey WinAPI_RegEnumKey WinAPI_RegEnumValue WinAPI_RegFlushKey WinAPI_RegisterApplicationRestart WinAPI_RegisterClass WinAPI_RegisterClassEx WinAPI_RegisterHotKey WinAPI_RegisterPowerSettingNotification WinAPI_RegisterRawInputDevices WinAPI_RegisterShellHookWindow WinAPI_RegisterWindowMessage WinAPI_RegLoadMUIString WinAPI_RegNotifyChangeKeyValue WinAPI_RegOpenKey WinAPI_RegQueryInfoKey WinAPI_RegQueryLastWriteTime WinAPI_RegQueryMultipleValues WinAPI_RegQueryReflectionKey WinAPI_RegQueryValue WinAPI_RegRestoreKey WinAPI_RegSaveKey WinAPI_RegSetValue WinAPI_ReleaseCapture WinAPI_ReleaseDC WinAPI_ReleaseMutex WinAPI_ReleaseSemaphore WinAPI_ReleaseStream WinAPI_RemoveClipboardFormatListener WinAPI_RemoveDirectory WinAPI_RemoveFontMemResourceEx WinAPI_RemoveFontResourceEx WinAPI_RemoveWindowSubclass WinAPI_ReOpenFile WinAPI_ReplaceFile WinAPI_ReplaceTextDlg WinAPI_ResetEvent WinAPI_RestartDlg WinAPI_RestoreDC WinAPI_RGB WinAPI_RotatePoints WinAPI_RoundRect WinAPI_SaveDC WinAPI_SaveFileDlg WinAPI_SaveHBITMAPToFile WinAPI_SaveHICONToFile WinAPI_ScaleWindowExt WinAPI_ScreenToClient WinAPI_SearchPath WinAPI_SelectClipPath WinAPI_SelectClipRgn WinAPI_SelectObject WinAPI_SendMessageTimeout WinAPI_SetActiveWindow WinAPI_SetArcDirection WinAPI_SetBitmapBits WinAPI_SetBitmapDimensionEx WinAPI_SetBkColor WinAPI_SetBkMode WinAPI_SetBoundsRect WinAPI_SetBrushOrg WinAPI_SetCapture WinAPI_SetCaretBlinkTime WinAPI_SetCaretPos WinAPI_SetClassLongEx WinAPI_SetColorAdjustment WinAPI_SetCompression WinAPI_SetCurrentDirectory WinAPI_SetCurrentProcessExplicitAppUserModelID WinAPI_SetCursor WinAPI_SetDCBrushColor WinAPI_SetDCPenColor WinAPI_SetDefaultPrinter WinAPI_SetDeviceGammaRamp WinAPI_SetDIBColorTable WinAPI_SetDIBits WinAPI_SetDIBitsToDevice WinAPI_SetDllDirectory WinAPI_SetEndOfFile WinAPI_SetEnhMetaFileBits WinAPI_SetErrorMode WinAPI_SetEvent WinAPI_SetFileAttributes WinAPI_SetFileInformationByHandleEx WinAPI_SetFilePointer WinAPI_SetFilePointerEx WinAPI_SetFileShortName WinAPI_SetFileValidData WinAPI_SetFocus WinAPI_SetFont WinAPI_SetForegroundWindow WinAPI_SetFRBuffer WinAPI_SetGraphicsMode WinAPI_SetHandleInformation WinAPI_SetInformationJobObject WinAPI_SetKeyboardLayout WinAPI_SetKeyboardState WinAPI_SetLastError WinAPI_SetLayeredWindowAttributes WinAPI_SetLocaleInfo WinAPI_SetMapMode WinAPI_SetMessageExtraInfo WinAPI_SetParent WinAPI_SetPixel WinAPI_SetPolyFillMode WinAPI_SetPriorityClass WinAPI_SetProcessAffinityMask WinAPI_SetProcessShutdownParameters WinAPI_SetProcessWindowStation WinAPI_SetRectRgn WinAPI_SetROP2 WinAPI_SetSearchPathMode WinAPI_SetStretchBltMode WinAPI_SetSysColors WinAPI_SetSystemCursor WinAPI_SetTextAlign WinAPI_SetTextCharacterExtra WinAPI_SetTextColor WinAPI_SetTextJustification WinAPI_SetThemeAppProperties WinAPI_SetThreadDesktop WinAPI_SetThreadErrorMode WinAPI_SetThreadExecutionState WinAPI_SetThreadLocale WinAPI_SetThreadUILanguage WinAPI_SetTimer WinAPI_SetUDFColorMode WinAPI_SetUserGeoID WinAPI_SetUserObjectInformation WinAPI_SetVolumeMountPoint WinAPI_SetWindowDisplayAffinity WinAPI_SetWindowExt WinAPI_SetWindowLong WinAPI_SetWindowOrg WinAPI_SetWindowPlacement WinAPI_SetWindowPos WinAPI_SetWindowRgn WinAPI_SetWindowsHookEx WinAPI_SetWindowSubclass WinAPI_SetWindowText WinAPI_SetWindowTheme WinAPI_SetWinEventHook WinAPI_SetWorldTransform WinAPI_SfcIsFileProtected WinAPI_SfcIsKeyProtected WinAPI_ShellAboutDlg WinAPI_ShellAddToRecentDocs WinAPI_ShellChangeNotify WinAPI_ShellChangeNotifyDeregister WinAPI_ShellChangeNotifyRegister WinAPI_ShellCreateDirectory WinAPI_ShellEmptyRecycleBin WinAPI_ShellExecute WinAPI_ShellExecuteEx WinAPI_ShellExtractAssociatedIcon WinAPI_ShellExtractIcon WinAPI_ShellFileOperation WinAPI_ShellFlushSFCache WinAPI_ShellGetFileInfo WinAPI_ShellGetIconOverlayIndex WinAPI_ShellGetImageList WinAPI_ShellGetKnownFolderIDList WinAPI_ShellGetKnownFolderPath WinAPI_ShellGetLocalizedName WinAPI_ShellGetPathFromIDList WinAPI_ShellGetSetFolderCustomSettings WinAPI_ShellGetSettings WinAPI_ShellGetSpecialFolderLocation WinAPI_ShellGetSpecialFolderPath WinAPI_ShellGetStockIconInfo WinAPI_ShellILCreateFromPath WinAPI_ShellNotifyIcon WinAPI_ShellNotifyIconGetRect WinAPI_ShellObjectProperties WinAPI_ShellOpenFolderAndSelectItems WinAPI_ShellOpenWithDlg WinAPI_ShellQueryRecycleBin WinAPI_ShellQueryUserNotificationState WinAPI_ShellRemoveLocalizedName WinAPI_ShellRestricted WinAPI_ShellSetKnownFolderPath WinAPI_ShellSetLocalizedName WinAPI_ShellSetSettings WinAPI_ShellStartNetConnectionDlg WinAPI_ShellUpdateImage WinAPI_ShellUserAuthenticationDlg WinAPI_ShellUserAuthenticationDlgEx WinAPI_ShortToWord WinAPI_ShowCaret WinAPI_ShowCursor WinAPI_ShowError WinAPI_ShowLastError WinAPI_ShowMsg WinAPI_ShowOwnedPopups WinAPI_ShowWindow WinAPI_ShutdownBlockReasonCreate WinAPI_ShutdownBlockReasonDestroy WinAPI_ShutdownBlockReasonQuery WinAPI_SizeOfResource WinAPI_StretchBlt WinAPI_StretchDIBits WinAPI_StrFormatByteSize WinAPI_StrFormatByteSizeEx WinAPI_StrFormatKBSize WinAPI_StrFromTimeInterval WinAPI_StringFromGUID WinAPI_StringLenA WinAPI_StringLenW WinAPI_StrLen WinAPI_StrokeAndFillPath WinAPI_StrokePath WinAPI_StructToArray WinAPI_SubLangId WinAPI_SubtractRect WinAPI_SwapDWord WinAPI_SwapQWord WinAPI_SwapWord WinAPI_SwitchColor WinAPI_SwitchDesktop WinAPI_SwitchToThisWindow WinAPI_SystemParametersInfo WinAPI_TabbedTextOut WinAPI_TerminateJobObject WinAPI_TerminateProcess WinAPI_TextOut WinAPI_TileWindows WinAPI_TrackMouseEvent WinAPI_TransparentBlt WinAPI_TwipsPerPixelX WinAPI_TwipsPerPixelY WinAPI_UnhookWindowsHookEx WinAPI_UnhookWinEvent WinAPI_UnionRect WinAPI_UnionStruct WinAPI_UniqueHardwareID WinAPI_UnloadKeyboardLayout WinAPI_UnlockFile WinAPI_UnmapViewOfFile WinAPI_UnregisterApplicationRestart WinAPI_UnregisterClass WinAPI_UnregisterHotKey WinAPI_UnregisterPowerSettingNotification WinAPI_UpdateLayeredWindow WinAPI_UpdateLayeredWindowEx WinAPI_UpdateLayeredWindowIndirect WinAPI_UpdateResource WinAPI_UpdateWindow WinAPI_UrlApplyScheme WinAPI_UrlCanonicalize WinAPI_UrlCombine WinAPI_UrlCompare WinAPI_UrlCreateFromPath WinAPI_UrlFixup WinAPI_UrlGetPart WinAPI_UrlHash WinAPI_UrlIs WinAPI_UserHandleGrantAccess WinAPI_ValidateRect WinAPI_ValidateRgn WinAPI_VerQueryRoot WinAPI_VerQueryValue WinAPI_VerQueryValueEx WinAPI_WaitForInputIdle WinAPI_WaitForMultipleObjects WinAPI_WaitForSingleObject WinAPI_WideCharToMultiByte WinAPI_WidenPath WinAPI_WindowFromDC WinAPI_WindowFromPoint WinAPI_WordToShort WinAPI_Wow64EnableWow64FsRedirection WinAPI_WriteConsole WinAPI_WriteFile WinAPI_WriteProcessMemory WinAPI_ZeroMemory WinNet_AddConnection WinNet_AddConnection2 WinNet_AddConnection3 WinNet_CancelConnection WinNet_CancelConnection2 WinNet_CloseEnum WinNet_ConnectionDialog WinNet_ConnectionDialog1 WinNet_DisconnectDialog WinNet_DisconnectDialog1 WinNet_EnumResource WinNet_GetConnection WinNet_GetConnectionPerformance WinNet_GetLastError WinNet_GetNetworkInformation WinNet_GetProviderName WinNet_GetResourceInformation WinNet_GetResourceParent WinNet_GetUniversalName WinNet_GetUser WinNet_OpenEnum WinNet_RestoreConnection WinNet_UseConnection Word_Create Word_DocAdd Word_DocAttach Word_DocClose Word_DocExport Word_DocFind Word_DocFindReplace Word_DocGet Word_DocLinkAdd Word_DocLinkGet Word_DocOpen Word_DocPictureAdd Word_DocPrint Word_DocRangeSet Word_DocSave Word_DocSaveAs Word_DocTableRead Word_DocTableWrite Word_Quit",e={ -variants:[a.COMMENT(";","$",{relevance:0}),a.COMMENT("#cs","#ce"),a.COMMENT("#comments-start","#comments-end")]},f={className:"variable",begin:"\\$[A-z0-9_]+"},g={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},h={variants:[a.BINARY_NUMBER_MODE,a.C_NUMBER_MODE]},i={className:"preprocessor",begin:"#",end:"$",keywords:"include include-once NoTrayIcon OnAutoItStartRegister RequireAdmin pragma Au3Stripper_Ignore_Funcs Au3Stripper_Ignore_Variables Au3Stripper_Off Au3Stripper_On Au3Stripper_Parameters AutoIt3Wrapper_Add_Constants AutoIt3Wrapper_Au3Check_Parameters AutoIt3Wrapper_Au3Check_Stop_OnWarning AutoIt3Wrapper_Aut2Exe AutoIt3Wrapper_AutoIt3 AutoIt3Wrapper_AutoIt3Dir AutoIt3Wrapper_Change2CUI AutoIt3Wrapper_Compile_Both AutoIt3Wrapper_Compression AutoIt3Wrapper_EndIf AutoIt3Wrapper_Icon AutoIt3Wrapper_If_Compile AutoIt3Wrapper_If_Run AutoIt3Wrapper_Jump_To_First_Error AutoIt3Wrapper_OutFile AutoIt3Wrapper_OutFile_Type AutoIt3Wrapper_OutFile_X64 AutoIt3Wrapper_PlugIn_Funcs AutoIt3Wrapper_Res_Comment Autoit3Wrapper_Res_Compatibility AutoIt3Wrapper_Res_Description AutoIt3Wrapper_Res_Field AutoIt3Wrapper_Res_File_Add AutoIt3Wrapper_Res_FileVersion AutoIt3Wrapper_Res_FileVersion_AutoIncrement AutoIt3Wrapper_Res_Icon_Add AutoIt3Wrapper_Res_Language AutoIt3Wrapper_Res_LegalCopyright AutoIt3Wrapper_Res_ProductVersion AutoIt3Wrapper_Res_requestedExecutionLevel AutoIt3Wrapper_Res_SaveSource AutoIt3Wrapper_Run_After AutoIt3Wrapper_Run_Au3Check AutoIt3Wrapper_Run_Au3Stripper AutoIt3Wrapper_Run_Before AutoIt3Wrapper_Run_Debug_Mode AutoIt3Wrapper_Run_SciTE_Minimized AutoIt3Wrapper_Run_SciTE_OutputPane_Minimized AutoIt3Wrapper_Run_Tidy AutoIt3Wrapper_ShowProgress AutoIt3Wrapper_Testing AutoIt3Wrapper_Tidy_Stop_OnError AutoIt3Wrapper_UPX_Parameters AutoIt3Wrapper_UseUPX AutoIt3Wrapper_UseX64 AutoIt3Wrapper_Version AutoIt3Wrapper_Versioning AutoIt3Wrapper_Versioning_Parameters Tidy_Off Tidy_On Tidy_Parameters EndRegion Region",contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",contains:[g,{className:"string",variants:[{begin:"<",end:">"},{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]}]},g,e]},j={className:"constant",begin:"@[A-z0-9_]+"},k={className:"function",beginKeywords:"Func",end:"$",excludeEnd:!0,illegal:"\\$|\\[|%",contains:[a.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[f,g,h]}]};return{case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:b,built_in:d,literal:c},contains:[e,f,g,h,i,j,k]}}),a.registerLanguage("avrasm",function(a){return{case_insensitive:!0,lexemes:"\\.?"+a.IDENT_RE,keywords:{keyword:"adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub subi swap tst wdr",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf",preprocessor:".byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list .listmac .macro .nolist .org .set"},contains:[a.C_BLOCK_COMMENT_MODE,a.COMMENT(";","$",{relevance:0}),a.C_NUMBER_MODE,a.BINARY_NUMBER_MODE,{className:"number",begin:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},a.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",illegal:"[^\\\\][^']"},{className:"label",begin:"^[A-Za-z0-9_.$]+:"},{className:"preprocessor",begin:"#",end:"$"},{className:"localvars",begin:"@[0-9]+"}]}}),a.registerLanguage("axapta",function(a){return{keywords:"false int abstract private char boolean static null if for true while long throw finally protected final return void enum else break new catch byte super case short default double public try this switch continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count order group by asc desc index hint like dispaly edit client server ttsbegin ttscommit str real date container anytype common div mod",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,{className:"preprocessor",begin:"#",end:"$"},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:":",contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]}]}}),a.registerLanguage("bash",function(a){var b={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)}/}]},c={className:"string",begin:/"/,end:/"/,contains:[a.BACKSLASH_ESCAPE,b,{className:"variable",begin:/\$\(/,end:/\)/,contains:[a.BACKSLASH_ESCAPE]}]},d={className:"string",begin:/'/,end:/'/};return{aliases:["sh","zsh"],lexemes:/-?[a-z\.]+/,keywords:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},contains:[{className:"shebang",begin:/^#![^\n]+sh\s*$/,relevance:10},{className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[a.inherit(a.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},a.HASH_COMMENT_MODE,a.NUMBER_MODE,c,d,b]}}),a.registerLanguage("brainfuck",function(a){var b={className:"literal",begin:"[\\+\\-]",relevance:0};return{aliases:["bf"],contains:[a.COMMENT("[^\\[\\]\\.,\\+\\-<> \r\n]","[\\[\\]\\.,\\+\\-<> \r\n]",{returnEnd:!0,relevance:0}),{className:"title",begin:"[\\[\\]]",relevance:0},{className:"string",begin:"[\\.,]",relevance:0},{begin:/\+\+|\-\-/,returnBegin:!0,contains:[b]},b]}}),a.registerLanguage("cal",function(a){var b="div mod in and or not xor asserterror begin case do downto else end exit for if of repeat then to until while with var",c="false true",d=[a.C_LINE_COMMENT_MODE,a.COMMENT(/\{/,/\}/,{relevance:0}),a.COMMENT(/\(\*/,/\*\)/,{relevance:10})],e={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},f={className:"string",begin:/(#\d+)+/},g={className:"date",begin:"\\b\\d+(\\.\\d+)?(DT|D|T)",relevance:0},h={className:"variable",begin:'"',end:'"'},i={className:"function",beginKeywords:"procedure",end:/[:;]/,keywords:"procedure|10",contains:[a.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:b,contains:[e,f]}].concat(d)},j={className:"class",begin:"OBJECT (Table|Form|Report|Dataport|Codeunit|XMLport|MenuSuite|Page|Query) (\\d+) ([^\\r\\n]+)",returnBegin:!0,contains:[a.TITLE_MODE,i]};return{case_insensitive:!0,keywords:{keyword:b,literal:c},illegal:/\/\*/,contains:[e,f,g,h,a.NUMBER_MODE,j,i]}}),a.registerLanguage("capnproto",function(a){return{aliases:["capnp"],keywords:{keyword:"struct enum interface union group import using const annotation extends in of on as with from fixed",built_in:"Void Bool Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float32 Float64 Text Data AnyPointer AnyStruct Capability List",literal:"true false"},contains:[a.QUOTE_STRING_MODE,a.NUMBER_MODE,a.HASH_COMMENT_MODE,{className:"shebang",begin:/@0x[\w\d]{16};/,illegal:/\n/},{className:"number",begin:/@\d+\b/},{className:"class",beginKeywords:"struct enum",end:/\{/,illegal:/\n/,contains:[a.inherit(a.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{className:"class",beginKeywords:"interface",end:/\{/,illegal:/\n/,contains:[a.inherit(a.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]}]}}),a.registerLanguage("ceylon",function(a){var b="assembly module package import alias class interface object given value assign void function new of extends satisfies abstracts in out return break continue throw assert dynamic if else switch case for while try catch finally then let this outer super is exists nonempty",c="shared abstract formal default actual variable late native deprecatedfinal sealed annotation suppressWarnings small",d="doc by license see throws tagged",e=c+" "+d,f={className:"subst",excludeBegin:!0,excludeEnd:!0,begin:/``/,end:/``/,keywords:b,relevance:10},g=[{className:"string",begin:'"""',end:'"""',relevance:10},{className:"string",begin:'"',end:'"',contains:[f]},{className:"string",begin:"'",end:"'"},{className:"number",begin:"#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]?\\d+)?)?[kMGTPmunpf]?",relevance:0}];return f.contains=g,{keywords:{keyword:b,annotation:e},illegal:"\\$[^01]|#[^0-9a-fA-F]",contains:[a.C_LINE_COMMENT_MODE,a.COMMENT("/\\*","\\*/",{contains:["self"]}),{className:"annotation",begin:'@[a-z]\\w*(?:\\:"[^"]*")?'}].concat(g)}}),a.registerLanguage("clojure",function(a){var b={built_in:"def defonce cond apply if-not if-let if not not= = < > <= >= == + / * - rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},c="a-zA-Z_\\-!.?+*=<>&#'",d="["+c+"]["+c+"0-9/;:]*",e="[-+]?\\d+(\\.\\d+)?",f={begin:d,relevance:0},g={className:"number",begin:e,relevance:0},h=a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),i=a.COMMENT(";","$",{relevance:0}),j={className:"literal",begin:/\b(true|false|nil)\b/},k={className:"collection",begin:"[\\[\\{]",end:"[\\]\\}]"},l={className:"comment",begin:"\\^"+d},m=a.COMMENT("\\^\\{","\\}"),n={className:"attribute",begin:"[:]"+d},o={className:"list",begin:"\\(",end:"\\)"},p={endsWithParent:!0,relevance:0},q={keywords:b,lexemes:d,className:"keyword",begin:d,starts:p},r=[o,h,l,m,i,n,k,g,j,f];return o.contains=[a.COMMENT("comment",""),q,p],p.contains=r,k.contains=r,{aliases:["clj"],illegal:/\S/,contains:[o,h,l,m,i,n,k,g,j]}}),a.registerLanguage("clojure-repl",function(a){return{contains:[{className:"prompt",begin:/^([\w.-]+|\s*#_)=>/,starts:{end:/$/,subLanguage:"clojure"}}]}}),a.registerLanguage("cmake",function(a){return{aliases:["cmake.in"],case_insensitive:!0,keywords:{keyword:"add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory break build_command cmake_minimum_required cmake_policy configure_file create_test_sourcelist define_property else elseif enable_language enable_testing endforeach endfunction endif endmacro endwhile execute_process export find_file find_library find_package find_path find_program fltk_wrap_ui foreach function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property if include include_directories include_external_msproject include_regular_expression install link_directories load_cache load_command macro mark_as_advanced message option output_required_files project qt_wrap_cpp qt_wrap_ui remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string target_link_libraries try_compile try_run unset variable_watch while build_name exec_program export_library_dependencies install_files install_programs install_targets link_libraries make_directory remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or",operator:"equal less greater strless strgreater strequal matches"},contains:[{className:"envvar",begin:"\\${",end:"}"},a.HASH_COMMENT_MODE,a.QUOTE_STRING_MODE,a.NUMBER_MODE]}}),a.registerLanguage("coffeescript",function(a){var b={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},c="[A-Za-z$_][0-9A-Za-z$_]*",d={className:"subst",begin:/#\{/,end:/}/,keywords:b},e=[a.BINARY_NUMBER_MODE,a.inherit(a.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[a.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[a.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[a.BACKSLASH_ESCAPE,d]},{begin:/"/,end:/"/,contains:[a.BACKSLASH_ESCAPE,d]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[d,a.HASH_COMMENT_MODE]},{begin:"//[gim]*",relevance:0},{begin:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{className:"property",begin:"@"+c},{begin:"`",end:"`",excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"}];d.contains=e;var f=a.inherit(a.TITLE_MODE,{begin:c}),g="(\\(.*\\))?\\s*\\B[-=]>",h={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:b,contains:["self"].concat(e)}]};return{aliases:["coffee","cson","iced"],keywords:b,illegal:/\/\*/,contains:e.concat([a.COMMENT("###","###"),a.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+c+"\\s*=\\s*"+g,end:"[-=]>",returnBegin:!0,contains:[f,h]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:g,end:"[-=]>",returnBegin:!0,contains:[h]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[f]},f]},{className:"attribute",begin:c+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}),a.registerLanguage("cpp",function(a){var b={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},c={className:"string",variants:[a.inherit(a.QUOTE_STRING_MODE,{begin:'((u8?|U)|L)?"'}),{begin:'(u8?|U)?R"',end:'"',contains:[a.BACKSLASH_ESCAPE]},{begin:"'\\\\?.",end:"'",illegal:"."}]},d={className:"number",variants:[{begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{begin:a.C_NUMBER_RE}]},e={className:"preprocessor",begin:"#",end:"$",keywords:"if else elif endif define undef warning error line pragma ifdef ifndef",contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",contains:[c,{className:"string",begin:"<",end:">",illegal:"\\n"}]},c,d,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},f=a.IDENT_RE+"\\s*\\(",g={keyword:"int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf",literal:"true false nullptr NULL"};return{aliases:["c","cc","h","c++","h++","hpp"],keywords:g,illegal:"",keywords:g,contains:["self",b]},{begin:a.IDENT_RE+"::",keywords:g},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"("+a.IDENT_RE+"[\\*&\\s]+)+"+f,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:g,illegal:/[^\w\s\*&]/,contains:[{begin:f,returnBegin:!0,contains:[a.TITLE_MODE],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,c,d]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,e]}]}}),a.registerLanguage("crmsh",function(a){var b="primitive rsc_template",c="group clone ms master location colocation order fencing_topology rsc_ticket acl_target acl_group user role tag xml",d="property rsc_defaults op_defaults",e="params meta operations op rule attributes utilization",f="read write deny defined not_defined in_range date spec in ref reference attribute type xpath version and or lt gt tag lte gte eq ne \\",g="number string",h="Master Started Slave Stopped start promote demote stop monitor true false";return{aliases:["crm","pcmk"],case_insensitive:!0,keywords:{keyword:e,operator:f,type:g,literal:h},contains:[a.HASH_COMMENT_MODE,{beginKeywords:"node",starts:{className:"identifier",end:"\\s*([\\w_-]+:)?",starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*"}}},{beginKeywords:b,starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*",starts:{className:"pragma",end:"\\s*@?[\\w_][\\w_\\.:-]*"}}},{begin:"\\b("+c.split(" ").join("|")+")\\s+",keywords:c,starts:{className:"title",end:"[\\$\\w_][\\w_-]*"}},{beginKeywords:d,starts:{className:"title",end:"\\s*([\\w_-]+:)?"}},a.QUOTE_STRING_MODE,{className:"pragma",begin:"(ocf|systemd|service|lsb):[\\w_:-]+",relevance:0},{className:"number",begin:"\\b\\d+(\\.\\d+)?(ms|s|h|m)?",relevance:0},{className:"number",begin:"[-]?(infinity|inf)",relevance:0},{className:"variable",begin:/([A-Za-z\$_\#][\w_-]+)=/,relevance:0},{className:"tag",begin:"",relevance:0}]}}),a.registerLanguage("crystal",function(a){function b(a,b){var c=[{begin:a,end:b}];return c[0].contains=c,c}var c="(_[uif](8|16|32|64))?",d="[a-zA-Z_]\\w*[!?=]?",e="!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",f="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\][=?]?",g={keyword:"abstract alias as asm begin break case class def do else elsif end ensure enum extend for fun if ifdef include instance_sizeof is_a? lib macro module next of out pointerof private protected rescue responds_to? return require self sizeof struct super then type typeof union unless until when while with yield __DIR__ __FILE__ __LINE__",literal:"false nil true"},h={className:"subst",begin:"#{",end:"}",keywords:g},i={className:"expansion",variants:[{begin:"\\{\\{",end:"\\}\\}"},{begin:"\\{%",end:"%\\}"}],keywords:g,relevance:10},j={className:"string",contains:[a.BACKSLASH_ESCAPE,h],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%w?\\(",end:"\\)",contains:b("\\(","\\)")},{begin:"%w?\\[",end:"\\]",contains:b("\\[","\\]")},{begin:"%w?{",end:"}",contains:b("{","}")},{begin:"%w?<",end:">",contains:b("<",">")},{begin:"%w?/",end:"/"},{begin:"%w?%",end:"%"},{begin:"%w?-",end:"-"},{begin:"%w?\\|",end:"\\|"}],relevance:0},k={begin:"("+e+")\\s*",contains:[{className:"regexp",contains:[a.BACKSLASH_ESCAPE,h],variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r\\(",end:"\\)",contains:b("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:b("\\[","\\]")},{begin:"%r{",end:"}",contains:b("{","}")},{begin:"%r<",end:">",contains:b("<",">")},{begin:"%r/",end:"/"},{begin:"%r%",end:"%"},{begin:"%r-",end:"-"},{begin:"%r\\|",end:"\\|"}]}],relevance:0},l={className:"regexp",contains:[a.BACKSLASH_ESCAPE,h],variants:[{begin:"%r\\(",end:"\\)",contains:b("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:b("\\[","\\]")},{begin:"%r{",end:"}",contains:b("{","}")},{begin:"%r<",end:">",contains:b("<",">")},{begin:"%r/",end:"/"},{begin:"%r%",end:"%"},{begin:"%r-",end:"-"},{begin:"%r\\|",end:"\\|"}],relevance:0},m={className:"annotation",begin:"@\\[",end:"\\]",relevance:5},n=[i,j,k,l,m,a.HASH_COMMENT_MODE,{className:"class",beginKeywords:"class module struct",end:"$|;",illegal:/=/,contains:[a.HASH_COMMENT_MODE,a.inherit(a.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{className:"inheritance",begin:"<\\s*",contains:[{className:"parent",begin:"("+a.IDENT_RE+"::)?"+a.IDENT_RE}]}]},{className:"class",beginKeywords:"lib enum union",end:"$|;",illegal:/=/,contains:[a.HASH_COMMENT_MODE,a.inherit(a.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"})],relevance:10},{className:"function",beginKeywords:"def",end:/\B\b/,contains:[a.inherit(a.TITLE_MODE,{begin:f,endsParent:!0})]},{className:"function",beginKeywords:"fun macro",end:/\B\b/,contains:[a.inherit(a.TITLE_MODE,{begin:f,endsParent:!0})],relevance:5},{className:"constant",begin:"(::)?(\\b[A-Z]\\w*(::)?)+",relevance:0},{className:"symbol",begin:a.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[j,{begin:f}],relevance:0},{className:"number",variants:[{begin:"\\b0b([01_]*[01])"+c},{begin:"\\b0o([0-7_]*[0-7])"+c},{begin:"\\b0x([A-Fa-f0-9_]*[A-Fa-f0-9])"+c},{begin:"\\b(([0-9][0-9_]*[0-9]|[0-9])(\\.[0-9_]*[0-9])?([eE][+-]?[0-9_]*[0-9])?)"+c}],relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|\\@\\@?|%)(\\w+))"}];return h.contains=n,m.contains=n,i.contains=n.slice(1),{aliases:["cr"],lexemes:d,keywords:g,contains:n}}),a.registerLanguage("cs",function(a){var b="abstract as base bool break byte case catch char checked const continue decimal dynamic default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long null when object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async protected public private internal ascending descending from get group into join let orderby partial select set value var where yield",c=a.IDENT_RE+"(<"+a.IDENT_RE+">)?";return{aliases:["csharp"],keywords:b,illegal:/::/,contains:[a.COMMENT("///","$",{returnBegin:!0,contains:[{className:"xmlDocTag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"preprocessor",begin:"#",end:"$",keywords:"if else elif endif define undef warning error line region endregion pragma checksum"},{className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,{beginKeywords:"class interface",end:/[{;=]/,illegal:/[^\s:]/,contains:[a.TITLE_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",end:/[{;=]/,illegal:/[^\s:]/,contains:[{className:"title",begin:"[a-zA-Z](\\.?\\w)*",relevance:0},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new return throw await",relevance:0},{className:"function",begin:"("+c+"\\s+)+"+a.IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:b,contains:[{begin:a.IDENT_RE+"\\s*\\(",returnBegin:!0,contains:[a.TITLE_MODE],relevance:0},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:b,relevance:0,contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,a.C_BLOCK_COMMENT_MODE]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]}]}}),a.registerLanguage("css",function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*",c={className:"function",begin:b+"\\(",returnBegin:!0,excludeEnd:!0,end:"\\("},d={className:"rule",begin:/[A-Z\_\.\-]+\s*:/,returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",excludeEnd:!0,starts:{className:"value",endsWithParent:!0,excludeEnd:!0,contains:[c,a.CSS_NUMBER_MODE,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,a.C_BLOCK_COMMENT_MODE,{className:"hexcolor",begin:"#[0-9A-Fa-f]+"},{className:"important",begin:"!important"}]}}]};return{case_insensitive:!0,illegal:/[=\/|'\$]/,contains:[a.C_BLOCK_COMMENT_MODE,{className:"id",begin:/\#[A-Za-z0-9_-]+/},{className:"class",begin:/\.[A-Za-z0-9_-]+/},{className:"attr_selector",begin:/\[/,end:/\]/,illegal:"$"},{className:"pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"']+/},{className:"at_rule",begin:"@(font-face|page)",lexemes:"[a-z-]+",keywords:"font-face page"},{className:"at_rule",begin:"@",end:"[{;]",contains:[{className:"keyword",begin:/\S+/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,contains:[c,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.CSS_NUMBER_MODE]}]},{className:"tag",begin:b,relevance:0},{className:"rules",begin:"{",end:"}",illegal:/\S/,contains:[a.C_BLOCK_COMMENT_MODE,d]}]}}),a.registerLanguage("d",function(a){var b={keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},c="(0|[1-9][\\d_]*)",d="(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)",e="0[bB][01_]+",f="([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)",g="0[xX]"+f,h="([eE][+-]?"+d+")",i="("+d+"(\\.\\d*|"+h+")|\\d+\\."+d+d+"|\\."+c+h+"?)",j="(0[xX]("+f+"\\."+f+"|\\.?"+f+")[pP][+-]?"+d+")",k="("+c+"|"+e+"|"+g+")",l="("+j+"|"+i+")",m="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};",n={className:"number",begin:"\\b"+k+"(L|u|U|Lu|LU|uL|UL)?",relevance:0},o={className:"number",begin:"\\b("+l+"([fF]|L|i|[fF]i|Li)?|"+k+"(i|[fF]i|Li))",relevance:0},p={className:"string",begin:"'("+m+"|.)",end:"'",illegal:"."},q={begin:m,relevance:0},r={className:"string",begin:'"',contains:[q],end:'"[cwd]?'},s={className:"string",begin:'[rq]"',end:'"[cwd]?',relevance:5},t={className:"string",begin:"`",end:"`[cwd]?"},u={className:"string",begin:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',relevance:10},v={className:"string",begin:'q"\\{',end:'\\}"'},w={className:"shebang",begin:"^#!",end:"$",relevance:5},x={className:"preprocessor",begin:"#(line)",end:"$",relevance:5},y={className:"keyword",begin:"@[a-zA-Z_][a-zA-Z_\\d]*"},z=a.COMMENT("\\/\\+","\\+\\/",{contains:["self"],relevance:10});return{lexemes:a.UNDERSCORE_IDENT_RE,keywords:b,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,z,u,r,s,t,v,o,n,p,w,x,y]}}),a.registerLanguage("markdown",function(a){return{aliases:["md","mkdown","mkd"],contains:[{className:"header",variants:[{begin:"^#{1,6}",end:"$"},{begin:"^.+?\\n[=-]{2,}$"}]},{begin:"<",end:">",subLanguage:"xml",relevance:0},{className:"bullet",begin:"^([*+-]|(\\d+\\.))\\s+"},{className:"strong",begin:"[*_]{2}.+?[*_]{2}"},{className:"emphasis",variants:[{begin:"\\*.+?\\*"},{begin:"_.+?_",relevance:0}]},{className:"blockquote",begin:"^>\\s+",end:"$"},{className:"code",variants:[{begin:"`.+?`"},{begin:"^( {4}| )",end:"$",relevance:0}]},{className:"horizontal_rule",begin:"^[-\\*]{3,}",end:"$"},{begin:"\\[.+?\\][\\(\\[].*?[\\)\\]]",returnBegin:!0,contains:[{className:"link_label",begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0,relevance:0},{className:"link_url",begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"link_reference",begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}],relevance:10},{begin:"^\\[.+\\]:",returnBegin:!0,contains:[{className:"link_reference",begin:"\\[",end:"\\]:",excludeBegin:!0,excludeEnd:!0,starts:{className:"link_url",end:"$"}}]}]}}),a.registerLanguage("dart",function(a){var b={className:"subst",begin:"\\$\\{",end:"}",keywords:"true false null this is new super"},c={className:"string",variants:[{begin:"r'''",end:"'''"},{begin:'r"""',end:'"""'},{begin:"r'",end:"'",illegal:"\\n"},{ -begin:'r"',end:'"',illegal:"\\n"},{begin:"'''",end:"'''",contains:[a.BACKSLASH_ESCAPE,b]},{begin:'"""',end:'"""',contains:[a.BACKSLASH_ESCAPE,b]},{begin:"'",end:"'",illegal:"\\n",contains:[a.BACKSLASH_ESCAPE,b]},{begin:'"',end:'"',illegal:"\\n",contains:[a.BACKSLASH_ESCAPE,b]}]};b.contains=[a.C_NUMBER_MODE,c];var d={keyword:"assert break case catch class const continue default do else enum extends false final finally for if in is new null rethrow return super switch this throw true try var void while with",literal:"abstract as dynamic export external factory get implements import library operator part set static typedef",built_in:"print Comparable DateTime Duration Function Iterable Iterator List Map Match Null Object Pattern RegExp Set Stopwatch String StringBuffer StringSink Symbol Type Uri bool double int num document window querySelector querySelectorAll Element ElementList"};return{keywords:d,contains:[c,a.COMMENT("/\\*\\*","\\*/",{subLanguage:"markdown"}),a.COMMENT("///","$",{subLanguage:"markdown"}),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]},a.C_NUMBER_MODE,{className:"annotation",begin:"@[A-Za-z]+"},{begin:"=>"}]}}),a.registerLanguage("delphi",function(a){var b="exports register file shl array record property for mod while set ally label uses raise not stored class safecall var interface or private static exit index inherited to else stdcall override shr asm far resourcestring finalization packed virtual out and protected library do xorwrite goto near function end div overload object unit begin string on inline repeat until destructor write message program with read initialization except default nil if case cdecl in downto threadvar of try pascal const external constructor type public then implementation finally published procedure",c=[a.C_LINE_COMMENT_MODE,a.COMMENT(/\{/,/\}/,{relevance:0}),a.COMMENT(/\(\*/,/\*\)/,{relevance:10})],d={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},e={className:"string",begin:/(#\d+)+/},f={begin:a.IDENT_RE+"\\s*=\\s*class\\s*\\(",returnBegin:!0,contains:[a.TITLE_MODE]},g={className:"function",beginKeywords:"function constructor destructor procedure",end:/[:;]/,keywords:"function constructor|10 destructor|10 procedure|10",contains:[a.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:b,contains:[d,e]}].concat(c)};return{case_insensitive:!0,keywords:b,illegal:/"|\$[G-Zg-z]|\/\*|<\/|\|/,contains:[d,e,a.NUMBER_MODE,f,g].concat(c)}}),a.registerLanguage("diff",function(a){return{aliases:["patch"],contains:[{className:"chunk",relevance:10,variants:[{begin:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{begin:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{className:"header",variants:[{begin:/Index: /,end:/$/},{begin:/=====/,end:/=====$/},{begin:/^\-\-\-/,end:/$/},{begin:/^\*{3} /,end:/$/},{begin:/^\+\+\+/,end:/$/},{begin:/\*{5}/,end:/\*{5}$/}]},{className:"addition",begin:"^\\+",end:"$"},{className:"deletion",begin:"^\\-",end:"$"},{className:"change",begin:"^\\!",end:"$"}]}}),a.registerLanguage("django",function(a){var b={className:"filter",begin:/\|[A-Za-z]+:?/,keywords:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone",contains:[{className:"argument",begin:/"/,end:/"/},{className:"argument",begin:/'/,end:/'/}]};return{aliases:["jinja"],case_insensitive:!0,subLanguage:"xml",contains:[a.COMMENT(/\{%\s*comment\s*%}/,/\{%\s*endcomment\s*%}/),a.COMMENT(/\{#/,/#}/),{className:"template_tag",begin:/\{%/,end:/%}/,keywords:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor in ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup by as ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim",contains:[b]},{className:"variable",begin:/\{\{/,end:/}}/,contains:[b]}]}}),a.registerLanguage("dns",function(a){return{aliases:["bind","zone"],keywords:{keyword:"IN A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME DHCID DLV DNAME DNSKEY DS HIP IPSECKEY KEY KX LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RRSIG RP SIG SOA SRV SSHFP TA TKEY TLSA TSIG TXT"},contains:[a.COMMENT(";","$"),{className:"operator",beginKeywords:"$TTL $GENERATE $INCLUDE $ORIGIN"},{className:"number",begin:"((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[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,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])"}]}}),a.registerLanguage("dockerfile",function(a){return{aliases:["docker"],case_insensitive:!0,keywords:{built_ins:"from maintainer cmd expose add copy entrypoint volume user workdir onbuild run env label"},contains:[a.HASH_COMMENT_MODE,{keywords:{built_in:"run cmd entrypoint volume add copy workdir onbuild label"},begin:/^ *(onbuild +)?(run|cmd|entrypoint|volume|add|copy|workdir|label) +/,starts:{end:/[^\\]\n/,subLanguage:"bash"}},{keywords:{built_in:"from maintainer expose env user onbuild"},begin:/^ *(onbuild +)?(from|maintainer|expose|env|user|onbuild) +/,end:/[^\\]\n/,contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.NUMBER_MODE,a.HASH_COMMENT_MODE]}]}}),a.registerLanguage("dos",function(a){var b=a.COMMENT(/@?rem\b/,/$/,{relevance:10}),c={className:"label",begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)",relevance:0};return{aliases:["bat","cmd"],case_insensitive:!0,illegal:/\/\*/,keywords:{flow:"if else goto for in do call exit not exist errorlevel defined",operator:"equ neq lss leq gtr geq",keyword:"shift cd dir echo setlocal endlocal set pause copy",stream:"prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux",winutils:"ping net ipconfig taskkill xcopy ren del",built_in:"append assoc at attrib break cacls cd chcp chdir chkdsk chkntfs cls cmd color comp compact convert date dir diskcomp diskcopy doskey erase fs find findstr format ftype graftabl help keyb label md mkdir mode more move path pause print popd pushd promt rd recover rem rename replace restore rmdir shiftsort start subst time title tree type ver verify vol"},contains:[{className:"envvar",begin:/%%[^ ]|%[^ ]+?%|![^ ]+?!/},{className:"function",begin:c.begin,end:"goto:eof",contains:[a.inherit(a.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),b]},{className:"number",begin:"\\b\\d+",relevance:0},b]}}),a.registerLanguage("dust",function(a){var b="if eq ne lt lte gt gte select default math sep";return{aliases:["dst"],case_insensitive:!0,subLanguage:"xml",contains:[{className:"expression",begin:"{",end:"}",relevance:0,contains:[{className:"begin-block",begin:"#[a-zA-Z- .]+",keywords:b},{className:"string",begin:'"',end:'"'},{className:"end-block",begin:"\\/[a-zA-Z- .]+",keywords:b},{className:"variable",begin:"[a-zA-Z-.]+",keywords:b,relevance:0}]}]}}),a.registerLanguage("elixir",function(a){var b="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?",c="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",d="and false then defined module in return redo retry end for true self when next until do begin unless nil break not case cond alias while ensure or include use alias fn quote",e={className:"subst",begin:"#\\{",end:"}",lexemes:b,keywords:d},f={className:"string",contains:[a.BACKSLASH_ESCAPE,e],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},g={className:"function",beginKeywords:"def defp defmacro",end:/\B\b/,contains:[a.inherit(a.TITLE_MODE,{begin:b,endsParent:!0})]},h=a.inherit(g,{className:"class",beginKeywords:"defmodule defrecord",end:/\bdo\b|$|;/}),i=[f,a.HASH_COMMENT_MODE,h,g,{className:"constant",begin:"(\\b[A-Z_]\\w*(.)?)+",relevance:0},{className:"symbol",begin:":",contains:[f,{begin:c}],relevance:0},{className:"symbol",begin:b+":",relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{begin:"->"},{begin:"("+a.RE_STARTERS_RE+")\\s*",contains:[a.HASH_COMMENT_MODE,{className:"regexp",illegal:"\\n",contains:[a.BACKSLASH_ESCAPE,e],variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}],relevance:0}];return e.contains=i,{lexemes:b,keywords:d,contains:i}}),a.registerLanguage("elm",function(a){var b=[a.COMMENT("--","$"),a.COMMENT("{-","-}",{contains:["self"]})],c={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},d={className:"container",begin:"\\(",end:"\\)",illegal:'"',contains:[{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"}].concat(b)},e={className:"container",begin:"{",end:"}",contains:d.contains};return{keywords:"let in if then else case of where module import exposing type alias as infix infixl infixr port",contains:[{className:"module",begin:"\\bmodule\\b",end:"where",keywords:"module where",contains:[d].concat(b),illegal:"\\W\\.|;"},{className:"import",begin:"\\bimport\\b",end:"$",keywords:"import|0 as exposing",contains:[d].concat(b),illegal:"\\W\\.|;"},{className:"typedef",begin:"\\btype\\b",end:"$",keywords:"type alias",contains:[c,d,e].concat(b)},{className:"infix",beginKeywords:"infix infixl infixr",end:"$",contains:[a.C_NUMBER_MODE].concat(b)},{className:"foreign",begin:"\\bport\\b",end:"$",keywords:"port",contains:b},a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,c,a.inherit(a.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),{begin:"->|<-"}].concat(b)}}),a.registerLanguage("ruby",function(a){var b="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",c="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",d={className:"doctag",begin:"@[A-Za-z]+"},e={className:"value",begin:"#<",end:">"},f=[a.COMMENT("#","$",{contains:[d]}),a.COMMENT("^\\=begin","^\\=end",{contains:[d],relevance:10}),a.COMMENT("^__END__","\\n$")],g={className:"subst",begin:"#\\{",end:"}",keywords:c},h={className:"string",contains:[a.BACKSLASH_ESCAPE,g],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[qQwWx]?\\(",end:"\\)"},{begin:"%[qQwWx]?\\[",end:"\\]"},{begin:"%[qQwWx]?{",end:"}"},{begin:"%[qQwWx]?<",end:">"},{begin:"%[qQwWx]?/",end:"/"},{begin:"%[qQwWx]?%",end:"%"},{begin:"%[qQwWx]?-",end:"-"},{begin:"%[qQwWx]?\\|",end:"\\|"},{begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]},i={className:"params",begin:"\\(",end:"\\)",keywords:c},j=[h,e,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[a.inherit(a.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{className:"inheritance",begin:"<\\s*",contains:[{className:"parent",begin:"("+a.IDENT_RE+"::)?"+a.IDENT_RE}]}].concat(f)},{className:"function",beginKeywords:"def",end:"$|;",contains:[a.inherit(a.TITLE_MODE,{begin:b}),i].concat(f)},{className:"constant",begin:"(::)?(\\b[A-Z]\\w*(::)?)+",relevance:0},{className:"symbol",begin:a.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[h,{begin:b}],relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{begin:"("+a.RE_STARTERS_RE+")\\s*",contains:[e,{className:"regexp",contains:[a.BACKSLASH_ESCAPE,g],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r{",end:"}[a-z]*"},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(f),relevance:0}].concat(f);g.contains=j,i.contains=j;var k="[>?]>",l="[\\w#]+\\(\\w+\\):\\d+:\\d+>",m="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",n=[{begin:/^\s*=>/,className:"status",starts:{end:"$",contains:j}},{className:"prompt",begin:"^("+k+"|"+l+"|"+m+")",starts:{end:"$",contains:j}}];return{aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:f.concat(n).concat(j)}}),a.registerLanguage("erb",function(a){return{subLanguage:"xml",contains:[a.COMMENT("<%#","%>"),{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}),a.registerLanguage("erlang-repl",function(a){return{keywords:{special_functions:"spawn spawn_link self",reserved:"after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse|10 query receive rem try when xor"},contains:[{className:"prompt",begin:"^[0-9]+> ",relevance:10},a.COMMENT("%","$"),{className:"number",begin:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",relevance:0},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{className:"constant",begin:"\\?(::)?([A-Z]\\w*(::)?)+"},{className:"arrow",begin:"->"},{className:"ok",begin:"ok"},{className:"exclamation_mark",begin:"!"},{className:"function_or_atom",begin:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",relevance:0},{className:"variable",begin:"[A-Z][a-zA-Z0-9_']*",relevance:0}]}}),a.registerLanguage("erlang",function(a){var b="[a-z'][a-zA-Z0-9_']*",c="("+b+":"+b+"|"+b+")",d={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",literal:"false true"},e=a.COMMENT("%","$"),f={className:"number",begin:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",relevance:0},g={begin:"fun\\s+"+b+"/\\d+"},h={begin:c+"\\(",end:"\\)",returnBegin:!0,relevance:0,contains:[{className:"function_name",begin:c,relevance:0},{begin:"\\(",end:"\\)",endsWithParent:!0,returnEnd:!0,relevance:0}]},i={className:"tuple",begin:"{",end:"}",relevance:0},j={className:"variable",begin:"\\b_([A-Z][A-Za-z0-9_]*)?",relevance:0},k={className:"variable",begin:"[A-Z][a-zA-Z0-9_]*",relevance:0},l={begin:"#"+a.UNDERSCORE_IDENT_RE,relevance:0,returnBegin:!0,contains:[{className:"record_name",begin:"#"+a.UNDERSCORE_IDENT_RE,relevance:0},{begin:"{",end:"}",relevance:0}]},m={beginKeywords:"fun receive if try case",end:"end",keywords:d};m.contains=[e,g,a.inherit(a.APOS_STRING_MODE,{className:""}),m,h,a.QUOTE_STRING_MODE,f,i,j,k,l];var n=[e,g,m,h,a.QUOTE_STRING_MODE,f,i,j,k,l];h.contains[1].contains=n,i.contains=n,l.contains[1].contains=n;var o={className:"params",begin:"\\(",end:"\\)",contains:n};return{aliases:["erl"],keywords:d,illegal:"(",returnBegin:!0,illegal:"\\(|#|//|/\\*|\\\\|:|;",contains:[o,a.inherit(a.TITLE_MODE,{begin:b})],starts:{end:";|\\.",keywords:d,contains:n}},e,{className:"pp",begin:"^-",end:"\\.",relevance:0,excludeEnd:!0,returnBegin:!0,lexemes:"-"+a.IDENT_RE,keywords:"-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn -import -include -include_lib -compile -define -else -endif -file -behaviour -behavior -spec",contains:[o]},f,a.QUOTE_STRING_MODE,l,j,k,i,{begin:/\.$/}]}}),a.registerLanguage("fix",function(a){return{contains:[{begin:/[^\u2401\u0001]+/,end:/[\u2401\u0001]/,excludeEnd:!0,returnBegin:!0,returnEnd:!1,contains:[{begin:/([^\u2401\u0001=]+)/,end:/=([^\u2401\u0001=]+)/,returnEnd:!0,returnBegin:!1,className:"attribute"},{begin:/=/,end:/([\u2401\u0001])/,excludeEnd:!0,excludeBegin:!0,className:"string"}]}],case_insensitive:!0}}),a.registerLanguage("fortran",function(a){var b={className:"params",begin:"\\(",end:"\\)"},c={constant:".False. .True.",type:"integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_ofacosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image"};return{case_insensitive:!0,aliases:["f90","f95"],keywords:c,illegal:/\/\*/,contains:[a.inherit(a.APOS_STRING_MODE,{className:"string",relevance:0}),a.inherit(a.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[a.UNDERSCORE_TITLE_MODE,b]},a.COMMENT("!","$",{relevance:0}),{className:"number",begin:"(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?",relevance:0}]}}),a.registerLanguage("fsharp",function(a){var b={begin:"<",end:">",contains:[a.inherit(a.TITLE_MODE,{begin:/'[a-zA-Z0-9_]+/})]};return{aliases:["fs"],keywords:"abstract and as assert base begin class default delegate do done downcast downto elif else end exception extern false finally for fun function global if in inherit inline interface internal lazy let match member module mutable namespace new null of open or override private public rec return sig static struct then to true try type upcast use val void when while with yield",illegal:/\/\*/,contains:[{className:"keyword",begin:/\b(yield|return|let|do)!/},{className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},{className:"string",begin:'"""',end:'"""'},a.COMMENT("\\(\\*","\\*\\)"),{className:"class",beginKeywords:"type",end:"\\(|=|$",excludeEnd:!0,contains:[a.UNDERSCORE_TITLE_MODE,b]},{className:"annotation",begin:"\\[<",end:">\\]",relevance:10},{className:"attribute",begin:"\\B('[A-Za-z])\\b",contains:[a.BACKSLASH_ESCAPE]},a.C_LINE_COMMENT_MODE,a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),a.C_NUMBER_MODE]}}),a.registerLanguage("gams",function(a){var b="abort acronym acronyms alias all and assign binary card diag display else1 eps eq equation equations file files for1 free ge gt if inf integer le loop lt maximizing minimizing model models na ne negative no not option options or ord parameter parameters positive prod putpage puttl repeat sameas scalar scalars semicont semiint set1 sets smax smin solve sos1 sos2 sum system table then until using variable variables while1 xor yes";return{aliases:["gms"],case_insensitive:!0,keywords:b,contains:[{className:"section",beginKeywords:"sets parameters variables equations",end:";",contains:[{begin:"/",end:"/",contains:[a.NUMBER_MODE]}]},{className:"string",begin:"\\*{3}",end:"\\*{3}"},a.NUMBER_MODE,{className:"number",begin:"\\$[a-zA-Z0-9]+"}]}}),a.registerLanguage("gcode",function(a){var b="[A-Z_][A-Z0-9_.]*",c="\\%",d={literal:"",built_in:"",keyword:"IF DO WHILE ENDWHILE CALL ENDIF SUB ENDSUB GOTO REPEAT ENDREPEAT EQ LT GT NE GE LE OR XOR"},e={className:"preprocessor",begin:"([O])([0-9]+)"},f=[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.COMMENT(/\(/,/\)/),a.inherit(a.C_NUMBER_MODE,{begin:"([-+]?([0-9]*\\.?[0-9]+\\.?))|"+a.C_NUMBER_RE}),a.inherit(a.APOS_STRING_MODE,{illegal:null}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),{className:"keyword",begin:"([G])([0-9]+\\.?[0-9]?)"},{className:"title",begin:"([M])([0-9]+\\.?[0-9]?)"},{className:"title",begin:"(VC|VS|#)",end:"(\\d+)"},{className:"title",begin:"(VZOFX|VZOFY|VZOFZ)"},{className:"built_in",begin:"(ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN)(\\[)",end:"([-+]?([0-9]*\\.?[0-9]+\\.?))(\\])"},{className:"label",variants:[{begin:"N",end:"\\d+",illegal:"\\W"}]}];return{aliases:["nc"],case_insensitive:!0,lexemes:b,keywords:d,contains:[{className:"preprocessor",begin:c},e].concat(f)}}),a.registerLanguage("gherkin",function(a){return{aliases:["feature"],keywords:"Feature Background Ability Business Need Scenario Scenarios Scenario Outline Scenario Template Examples Given And Then But When",contains:[{className:"keyword",begin:"\\*"},a.COMMENT("@[^@\r\n ]+","$"),{begin:"\\|",end:"\\|\\w*$",contains:[{className:"string",begin:"[^|]+"}]},{className:"variable",begin:"<",end:">"},a.HASH_COMMENT_MODE,{className:"string",begin:'"""',end:'"""'},a.QUOTE_STRING_MODE]}}),a.registerLanguage("glsl",function(a){return{keywords:{keyword:"atomic_uint attribute bool break bvec2 bvec3 bvec4 case centroid coherent const continue default discard dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 do double dvec2 dvec3 dvec4 else flat float for highp if iimage1D iimage1DArray iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer iimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect image3D imageBuffer imageCube imageCubeArray in inout int invariant isampler1D isampler1DArray isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 layout lowp mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 mediump noperspective out patch precision readonly restrict return sample sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow smooth struct subroutine switch uimage1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint uniform usampler1D usampler1DArray usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D usamplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 varying vec2 vec3 vec4 void volatile while writeonly",built_in:"gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_InstanceID gl_InvocationID gl_Layer gl_LightModel gl_LightSource gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffsetgl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_PerVertex gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin asinh atan atanh atomicCounter atomicCounterDecrement atomicCounterIncrement barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan greaterThanEqual imageAtomicAdd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memoryBarrier min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod textureProjLodOffset textureProjOffset textureQueryLod textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow gl_TextureMatrix gl_TextureMatrixInverse",literal:"true false"},illegal:'"',contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.C_NUMBER_MODE,{className:"preprocessor",begin:"#",end:"$"}]}}),a.registerLanguage("go",function(a){var b={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer", -constant:"true false iota nil",typename:"bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{aliases:["golang"],keywords:b,illegal:"",end:",\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"symbol",begin:":\\w+"},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]},{begin:"\\(\\s*",end:"\\s*\\)",excludeEnd:!0,contains:[{begin:"\\w+\\s*=",end:"\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attribute",begin:"\\w+",relevance:0},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]}]},{className:"bullet",begin:"^\\s*[=~]\\s*",relevance:0},{begin:"#{",starts:{end:"}",subLanguage:"ruby"}}]}}),a.registerLanguage("handlebars",function(a){var b="each in with if else unless bindattr action collection debugger log outlet template unbound view yield";return{aliases:["hbs","html.hbs","html.handlebars"],case_insensitive:!0,subLanguage:"xml",contains:[{className:"expression",begin:"{{",end:"}}",contains:[{className:"begin-block",begin:"#[a-zA-Z- .]+",keywords:b},{className:"string",begin:'"',end:'"'},{className:"end-block",begin:"\\/[a-zA-Z- .]+",keywords:b},{className:"variable",begin:"[a-zA-Z-.]+",keywords:b}]}]}}),a.registerLanguage("haskell",function(a){var b=[a.COMMENT("--","$"),a.COMMENT("{-","-}",{contains:["self"]})],c={className:"pragma",begin:"{-#",end:"#-}"},d={className:"preprocessor",begin:"^#",end:"$"},e={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},f={className:"container",begin:"\\(",end:"\\)",illegal:'"',contains:[c,d,{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},a.inherit(a.TITLE_MODE,{begin:"[_a-z][\\w']*"})].concat(b)},g={className:"container",begin:"{",end:"}",contains:f.contains};return{aliases:["hs"],keywords:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",contains:[{className:"module",begin:"\\bmodule\\b",end:"where",keywords:"module where",contains:[f].concat(b),illegal:"\\W\\.|;"},{className:"import",begin:"\\bimport\\b",end:"$",keywords:"import|0 qualified as hiding",contains:[f].concat(b),illegal:"\\W\\.|;"},{className:"class",begin:"^(\\s*)?(class|instance)\\b",end:"where",keywords:"class family instance where",contains:[e,f].concat(b)},{className:"typedef",begin:"\\b(data|(new)?type)\\b",end:"$",keywords:"data family type newtype deriving",contains:[c,e,f,g].concat(b)},{className:"default",beginKeywords:"default",end:"$",contains:[e,f].concat(b)},{className:"infix",beginKeywords:"infix infixl infixr",end:"$",contains:[a.C_NUMBER_MODE].concat(b)},{className:"foreign",begin:"\\bforeign\\b",end:"$",keywords:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",contains:[e,a.QUOTE_STRING_MODE].concat(b)},{className:"shebang",begin:"#!\\/usr\\/bin\\/env runhaskell",end:"$"},c,d,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,e,a.inherit(a.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),{begin:"->|<-"}].concat(b)}}),a.registerLanguage("haxe",function(a){var b="([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)";return{aliases:["hx"],keywords:{keyword:"break callback case cast catch class continue default do dynamic else enum extends extern for function here if implements import in inline interface never new override package private public return static super switch this throw trace try typedef untyped using var while",literal:"true false null"},contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.C_NUMBER_MODE,{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},a.TITLE_MODE]},{className:"preprocessor",begin:"#",end:"$",keywords:"if else elseif end error"},{className:"function",beginKeywords:"function",end:"[{;]",excludeEnd:!0,illegal:"\\S",contains:[a.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{className:"type",begin:":",end:b,relevance:10}]}]}}),a.registerLanguage("http",function(a){return{aliases:["https"],illegal:"\\S",contains:[{className:"status",begin:"^HTTP/[0-9\\.]+",end:"$",contains:[{className:"number",begin:"\\b\\d{3}\\b"}]},{className:"request",begin:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",returnBegin:!0,end:"$",contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0}]},{className:"attribute",begin:"^\\w",end:": ",excludeEnd:!0,illegal:"\\n|\\s|=",starts:{className:"string",end:"$"}},{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}]}}),a.registerLanguage("inform7",function(a){var b="\\[",c="\\]";return{aliases:["i7"],case_insensitive:!0,keywords:{keyword:"thing room person man woman animal container supporter backdrop door scenery open closed locked inside gender is are say understand kind of rule"},contains:[{className:"string",begin:'"',end:'"',relevance:0,contains:[{className:"subst",begin:b,end:c}]},{className:"title",begin:/^(Volume|Book|Part|Chapter|Section|Table)\b/,end:"$"},{begin:/^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/,end:":",contains:[{begin:"\\b\\(This",end:"\\)"}]},{className:"comment",begin:b,end:c,contains:["self"]}]}}),a.registerLanguage("ini",function(a){var b={className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]};return{aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[a.COMMENT(";","$"),a.HASH_COMMENT_MODE,{className:"title",begin:/^\s*\[+/,end:/\]+/},{className:"setting",begin:/^[a-z0-9\[\]_-]+\s*=\s*/,end:"$",contains:[{className:"value",endsWithParent:!0,keywords:"on off true false yes no",contains:[{className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)}/}]},b,{className:"number",begin:/([\+\-]+)?[\d]+_[\d_]+/},a.NUMBER_MODE],relevance:0}]}]}}),a.registerLanguage("irpf90",function(a){var b={className:"params",begin:"\\(",end:"\\)"},c={constant:".False. .True.",type:"integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure begin_provider &begin_provider end_provider begin_shell end_shell begin_template end_template subst assert touch soft_touch provide no_dep free irp_if irp_else irp_endif irp_write irp_read",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_ofacosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image IRP_ALIGN irp_here"};return{case_insensitive:!0,keywords:c,illegal:/\/\*/,contains:[a.inherit(a.APOS_STRING_MODE,{className:"string",relevance:0}),a.inherit(a.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[a.UNDERSCORE_TITLE_MODE,b]},a.COMMENT("!","$",{relevance:0}),a.COMMENT("begin_doc","end_doc",{relevance:10}),{className:"number",begin:"(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?",relevance:0}]}}),a.registerLanguage("java",function(a){var b=a.UNDERSCORE_IDENT_RE+"(<"+a.UNDERSCORE_IDENT_RE+">)?",c="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",d="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",e={className:"number",begin:d,relevance:0};return{aliases:["jsp"],keywords:c,illegal:/<\/|#/,contains:[a.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"("+b+"\\s+)+"+a.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:c,contains:[{begin:a.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[a.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,keywords:c,relevance:0,contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,a.C_BLOCK_COMMENT_MODE]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},e,{className:"annotation",begin:"@[A-Za-z]+"}]}}),a.registerLanguage("javascript",function(a){return{aliases:["js"],keywords:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},contains:[{className:"pi",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[a.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"}]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:a.C_NUMBER_RE}],relevance:0},{begin:"("+a.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.REGEXP_MODE,{begin:/\s*[);\]]/,relevance:0,subLanguage:"xml"}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[a.inherit(a.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]}],illegal:/\[|%/},{begin:/\$[(.]/},{begin:"\\."+a.IDENT_RE,relevance:0},{beginKeywords:"import",end:"[;$]",keywords:"import from as",contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE]},{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends"},a.UNDERSCORE_TITLE_MODE]}],illegal:/#/}}),a.registerLanguage("json",function(a){var b={literal:"true false null"},c=[a.QUOTE_STRING_MODE,a.C_NUMBER_MODE],d={className:"value",end:",",endsWithParent:!0,excludeEnd:!0,contains:c,keywords:b},e={begin:"{",end:"}",contains:[{className:"attribute",begin:'\\s*"',end:'"\\s*:\\s*',excludeBegin:!0,excludeEnd:!0,contains:[a.BACKSLASH_ESCAPE],illegal:"\\n",starts:d}],illegal:"\\S"},f={begin:"\\[",end:"\\]",contains:[a.inherit(d,{className:null})],illegal:"\\S"};return c.splice(c.length,0,e,f),{contains:c,keywords:b,illegal:"\\S"}}),a.registerLanguage("julia",function(a){var b={keyword:"in abstract baremodule begin bitstype break catch ccall const continue do else elseif end export finally for function global if immutable import importall let local macro module quote return try type typealias using while",literal:"true false ANY ARGS CPU_CORES C_NULL DL_LOAD_PATH DevNull ENDIAN_BOM ENV I|0 Inf Inf16 Inf32 InsertionSort JULIA_HOME LOAD_PATH MS_ASYNC MS_INVALIDATE MS_SYNC MergeSort NaN NaN16 NaN32 OS_NAME QuickSort RTLD_DEEPBIND RTLD_FIRST RTLD_GLOBAL RTLD_LAZY RTLD_LOCAL RTLD_NODELETE RTLD_NOLOAD RTLD_NOW RoundDown RoundFromZero RoundNearest RoundToZero RoundUp STDERR STDIN STDOUT VERSION WORD_SIZE catalan cglobal e|0 eu|0 eulergamma golden im nothing pi γ π φ",built_in:"ASCIIString AbstractArray AbstractRNG AbstractSparseArray Any ArgumentError Array Associative Base64Pipe Bidiagonal BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError Box CFILE Cchar Cdouble Cfloat Char CharString Cint Clong Clonglong ClusterManager Cmd Coff_t Colon Complex Complex128 Complex32 Complex64 Condition Cptrdiff_t Cshort Csize_t Cssize_t Cuchar Cuint Culong Culonglong Cushort Cwchar_t DArray DataType DenseArray Diagonal Dict DimensionMismatch DirectIndexString Display DivideError DomainError EOFError EachLine Enumerate ErrorException Exception Expr Factorization FileMonitor FileOffset Filter Float16 Float32 Float64 FloatRange FloatingPoint Function GetfieldNode GotoNode Hermitian IO IOBuffer IOStream IPv4 IPv6 InexactError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException IntrinsicFunction KeyError LabelNode LambdaStaticData LineNumberNode LoadError LocalProcess MIME MathConst MemoryError MersenneTwister Method MethodError MethodTable Module NTuple NewvarNode Nothing Number ObjectIdDict OrdinalRange OverflowError ParseError PollingFileWatcher ProcessExitedException ProcessGroup Ptr QuoteNode Range Range1 Ranges Rational RawFD Real Regex RegexMatch RemoteRef RepString RevString RopeString RoundingMode Set SharedArray Signed SparseMatrixCSC StackOverflowError Stat StatStruct StepRange String SubArray SubString SymTridiagonal Symbol SymbolNode Symmetric SystemError Task TextDisplay Timer TmStruct TopNode Triangular Tridiagonal Type TypeConstructor TypeError TypeName TypeVar UTF16String UTF32String UTF8String UdpSocket Uint Uint128 Uint16 Uint32 Uint64 Uint8 UndefRefError UndefVarError UniformScaling UnionType UnitRange Unsigned Vararg VersionNumber WString WeakKeyDict WeakRef Woodbury Zip"},c="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",d={lexemes:c,keywords:b},e={className:"type-annotation",begin:/::/},f={className:"subtype",begin:/<:/},g={className:"number",begin:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,relevance:0},h={className:"char",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},i={className:"subst",begin:/\$\(/,end:/\)/,keywords:b},j={className:"variable",begin:"\\$"+c},k={className:"string",contains:[a.BACKSLASH_ESCAPE,i,j],variants:[{begin:/\w*"/,end:/"\w*/},{begin:/\w*"""/,end:/"""\w*/}]},l={className:"string",contains:[a.BACKSLASH_ESCAPE,i,j],begin:"`",end:"`"},m={className:"macrocall",begin:"@"+c},n={className:"comment",variants:[{begin:"#=",end:"=#",relevance:10},{begin:"#",end:"$"}]};return d.contains=[g,h,e,f,k,l,m,n,a.HASH_COMMENT_MODE],i.contains=d.contains,d}),a.registerLanguage("kotlin",function(a){var b="val var get set class trait object public open private protected final enum if else do while for when break continue throw try catch finally import package is as in return fun override default companion reified inline volatile transient native";return{keywords:{typename:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null",keyword:b},contains:[a.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"type",begin://,returnBegin:!0,excludeEnd:!1,relevance:0},{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:b,illegal:/fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,relevance:5,contains:[{begin:a.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[a.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0,illegal:/\([^\(,\s:]+,/,contains:[{className:"typename",begin:/:\s*/,end:/\s*[=\)]/,excludeBegin:!0,returnEnd:!0,relevance:0}]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{className:"class",beginKeywords:"class trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[a.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"typename",begin:/[,:]\s*/,end:/[<\(,]|$/,excludeBegin:!0,returnEnd:!0}]},{className:"variable",beginKeywords:"var val",end:/\s*[=:$]/,excludeEnd:!0},a.QUOTE_STRING_MODE,{className:"shebang",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},a.C_NUMBER_MODE]}}),a.registerLanguage("lasso",function(a){var b="[a-zA-Z_][a-zA-Z0-9_.]*",c="<\\?(lasso(script)?|=)",d="\\]|\\?>",e={literal:"true false none minimal full all void bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"error_code error_msg error_pop error_push error_reset cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},f=a.COMMENT("",{relevance:0}),g={className:"preprocessor",begin:"\\[noprocess\\]",starts:{className:"markup",end:"\\[/noprocess\\]",returnEnd:!0,contains:[f]}},h={className:"preprocessor",begin:"\\[/noprocess|"+c},i={className:"variable",begin:"'"+b+"'"},j=[a.COMMENT("/\\*\\*!","\\*/"),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.inherit(a.C_NUMBER_MODE,{begin:a.C_NUMBER_RE+"|(infinity|nan)\\b"}),a.inherit(a.APOS_STRING_MODE,{illegal:null}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"`",end:"`"},{className:"variable",variants:[{begin:"[#$]"+b},{begin:"#",end:"\\d+",illegal:"\\W"}]},{className:"tag",begin:"::\\s*",end:b,illegal:"\\W"},{className:"attribute",variants:[{begin:"-(?!infinity)"+a.UNDERSCORE_IDENT_RE,relevance:0},{begin:"(\\.\\.\\.)"}]},{className:"subst",variants:[{begin:"->\\s*",contains:[i]},{begin:"->|\\\\|&&?|\\|\\||!(?!=|>)|(and|or|not)\\b",relevance:0}]},{className:"built_in",begin:"\\.\\.?\\s*",relevance:0,contains:[i]},{className:"class",beginKeywords:"define",returnEnd:!0,end:"\\(|=>",contains:[a.inherit(a.TITLE_MODE,{begin:a.UNDERSCORE_IDENT_RE+"(=(?!>))?"})]}];return{aliases:["ls","lassoscript"],case_insensitive:!0,lexemes:b+"|&[lg]t;",keywords:e,contains:[{className:"preprocessor",begin:d,relevance:0,starts:{className:"markup",end:"\\[|"+c,returnEnd:!0,relevance:0,contains:[f]}},g,h,{className:"preprocessor",begin:"\\[no_square_brackets",starts:{end:"\\[/no_square_brackets\\]",lexemes:b+"|&[lg]t;",keywords:e,contains:[{className:"preprocessor",begin:d,relevance:0,starts:{className:"markup",end:"\\[noprocess\\]|"+c,returnEnd:!0,contains:[f]}},g,h].concat(j)}},{className:"preprocessor",begin:"\\[",relevance:0},{className:"shebang",begin:"^#!.+lasso9\\b",relevance:10}].concat(j)}}),a.registerLanguage("less",function(a){var b="[\\w-]+",c="("+b+"|@{"+b+"})",d=[],e=[],f=function(a){return{className:"string",begin:"~?"+a+".*?"+a}},g=function(a,b,c){return{className:a,begin:b,relevance:c}},h=function(b,c,d){return a.inherit({className:b,begin:c+"\\(",end:"\\(",returnBegin:!0,excludeEnd:!0,relevance:0},d)},i={begin:"\\(",end:"\\)",contains:e,relevance:0};e.push(a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,f("'"),f('"'),a.CSS_NUMBER_MODE,g("hexcolor","#[0-9A-Fa-f]+\\b"),h("function","(url|data-uri)",{starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}}),h("function",b),i,g("variable","@@?"+b,10),g("variable","@{"+b+"}"),g("built_in","~?`[^`]*?`"),{className:"attribute",begin:b+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0});var j=e.concat({begin:"{",end:"}",contains:d}),k={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(e)},l={className:"attribute",begin:c,end:":",excludeEnd:!0,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE],illegal:/\S/,starts:{end:"[;}]",returnEnd:!0,contains:e,illegal:"[<=$]"}},m={className:"at_rule",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",returnEnd:!0,contains:e,relevance:0}},n={className:"variable",variants:[{begin:"@"+b+"\\s*:",relevance:15},{begin:"@"+b}],starts:{end:"[;}]",returnEnd:!0,contains:j}},o={variants:[{begin:"[\\.#:&\\[]",end:"[;{}]"},{begin:c+"[^;]*{",end:"{"}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,k,g("keyword","all\\b"),g("variable","@{"+b+"}"),g("tag",c+"%?",0),g("id","#"+c),g("class","\\."+c,0),g("keyword","&",0),h("pseudo",":not"),h("keyword",":extend"),g("pseudo","::?"+c),{className:"attr_selector",begin:"\\[",end:"\\]"},{begin:"\\(",end:"\\)",contains:j},{begin:"!important"}]};return d.push(a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,m,n,o,l),{case_insensitive:!0,illegal:"[=>'/<($\"]",contains:d}}),a.registerLanguage("lisp",function(a){var b="[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*",c="\\|[^]*?\\|",d="(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|\\-)?\\d+)?",e={className:"shebang",begin:"^#!",end:"$"},f={className:"literal",begin:"\\b(t{1}|nil)\\b"},g={className:"number",variants:[{begin:d,relevance:0},{begin:"#(b|B)[0-1]+(/[0-1]+)?"},{begin:"#(o|O)[0-7]+(/[0-7]+)?"},{begin:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{begin:"#(c|C)\\("+d+" +"+d,end:"\\)"}]},h=a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),i=a.COMMENT(";","$",{relevance:0}),j={className:"variable",begin:"\\*",end:"\\*"},k={className:"keyword",begin:"[:&]"+b},l={begin:b,relevance:0},m={begin:c},n={begin:"\\(",end:"\\)",contains:["self",f,h,g,l]},o={className:"quoted",contains:[g,h,j,k,n,l],variants:[{begin:"['`]\\(",end:"\\)"},{begin:"\\(quote ",end:"\\)",keywords:"quote"},{begin:"'"+c}]},p={className:"quoted",variants:[{begin:"'"+b},{begin:"#'"+b+"(::"+b+")*"}]},q={className:"list",begin:"\\(\\s*",end:"\\)"},r={endsWithParent:!0,relevance:0};return q.contains=[{className:"keyword",variants:[{begin:b},{begin:c}]},r],r.contains=[o,p,q,f,g,h,i,j,k,m,l],{illegal:/\S/,contains:[g,e,f,h,i,o,p,q,l]}}),a.registerLanguage("livecodeserver",function(a){var b={className:"variable",begin:"\\b[gtps][A-Z]+[A-Za-z0-9_\\-]*\\b|\\$_[A-Z]+",relevance:0},c=[a.C_BLOCK_COMMENT_MODE,a.HASH_COMMENT_MODE,a.COMMENT("--","$"),a.COMMENT("[^:]//","$")],d=a.inherit(a.TITLE_MODE,{variants:[{begin:"\\b_*rig[A-Z]+[A-Za-z0-9_\\-]*"},{begin:"\\b_[a-z0-9\\-]+"}]}),e=a.inherit(a.TITLE_MODE,{begin:"\\b([A-Za-z0-9_\\-]+)\\b"});return{case_insensitive:!1,keywords:{keyword:"$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER codepoint codepoints segment segments codeunit codeunits sentence sentences trueWord trueWords paragraph after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word words fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat end repeat URL in try into switch to words https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if", -constant:"SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five quote empty one true return cr linefeed right backslash null seven tab three two RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK",operator:"div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within contains ends with begins the keys of keys",built_in:"put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg avgDev base64Decode base64Encode baseConvert binaryDecode binaryEncode byteOffset byteToNum cachedURL cachedURLs charToNum cipherNames codepointOffset codepointProperty codepointToNum codeunitOffset commandNames compound compress constantNames cos date dateFormat decompress directories diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames geometricMean global globals hasMemory harmonicMean hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge millisec millisecs millisecond milliseconds min monthNames nativeCharToNum normalizeText num number numToByte numToChar numToCodepoint numToNativeChar offset open openfiles openProcesses openProcessIDs openSockets paragraphOffset paramCount param params peerAddress pendingMessages platform popStdDev populationStandardDeviation populationVariance popVariance processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLCreateTreeFromFileWithNamespaces revXMLCreateTreeWithNamespaces revXMLDataFromXPathQuery revXMLEvaluateXPath revXMLFirstChild revXMLMatchingNode revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_Execute revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sampVariance sec secs seconds sentenceOffset sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound stdDev sum sysError systemVersion tan tempName textDecode textEncode tick ticks time to tokenOffset toLower toUpper transpose truewordOffset trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus uuid value variableNames variance version waitDepth weekdayNames wordOffset xsltApplyStylesheet xsltApplyStylesheetFromFile xsltLoadStylesheet xsltLoadStylesheetFromFile add breakpoint cancel clear local variable file word line folder directory URL close socket process combine constant convert create new alias folder directory decrypt delete variable word line folder directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime libURLSetStatusCallback load multiply socket prepare process post seek rel relative read from process rename replace require resetAll resolve revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split start stop subtract union unload wait write"},contains:[b,{className:"keyword",begin:"\\bend\\sif\\b"},{className:"function",beginKeywords:"function",end:"$",contains:[b,e,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.BINARY_NUMBER_MODE,a.C_NUMBER_MODE,d]},{className:"function",begin:"\\bend\\s+",end:"$",keywords:"end",contains:[e,d]},{className:"command",beginKeywords:"command on",end:"$",contains:[b,e,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.BINARY_NUMBER_MODE,a.C_NUMBER_MODE,d]},{className:"preprocessor",variants:[{begin:"<\\?(rev|lc|livecode)",relevance:10},{begin:"<\\?"},{begin:"\\?>"}]},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.BINARY_NUMBER_MODE,a.C_NUMBER_MODE,d].concat(c),illegal:";$|^\\[|^="}}),a.registerLanguage("livescript",function(a){var b={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger case default function var with then unless until loop of by when and or is isnt not it that otherwise from to til fallthrough super case default function var void const let enum export import native __hasProp __extends __slice __bind __indexOf",literal:"true false null undefined yes no on off it that void",built_in:"npm require console print module global window document"},c="[A-Za-z$_](?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*",d=a.inherit(a.TITLE_MODE,{begin:c}),e={className:"subst",begin:/#\{/,end:/}/,keywords:b},f={className:"subst",begin:/#[A-Za-z$_]/,end:/(?:\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,keywords:b},g=[a.BINARY_NUMBER_MODE,{className:"number",begin:"(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*)",relevance:0,starts:{end:"(\\s*/)?",relevance:0}},{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[a.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[a.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[a.BACKSLASH_ESCAPE,e,f]},{begin:/"/,end:/"/,contains:[a.BACKSLASH_ESCAPE,e,f]},{begin:/\\/,end:/(\s|$)/,excludeEnd:!0}]},{className:"pi",variants:[{begin:"//",end:"//[gim]*",contains:[e,a.HASH_COMMENT_MODE]},{begin:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{className:"property",begin:"@"+c},{begin:"``",end:"``",excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"}];e.contains=g;var h={className:"params",begin:"\\(",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:b,contains:["self"].concat(g)}]};return{aliases:["ls"],keywords:b,illegal:/\/\*/,contains:g.concat([a.COMMENT("\\/\\*","\\*\\/"),a.HASH_COMMENT_MODE,{className:"function",contains:[d,h],returnBegin:!0,variants:[{begin:"("+c+"\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B\\->\\*?",end:"\\->\\*?"},{begin:"("+c+"\\s*(?:=|:=)\\s*)?!?(\\(.*\\))?\\s*\\B[-~]{1,2}>\\*?",end:"[-~]{1,2}>\\*?"},{begin:"("+c+"\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B!?[-~]{1,2}>\\*?",end:"!?[-~]{1,2}>\\*?"}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[d]},d]},{className:"attribute",begin:c+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}),a.registerLanguage("lua",function(a){var b="\\[=*\\[",c="\\]=*\\]",d={begin:b,end:c,contains:["self"]},e=[a.COMMENT("--(?!"+b+")","$"),a.COMMENT("--"+b,c,{contains:[d],relevance:10})];return{lexemes:a.UNDERSCORE_IDENT_RE,keywords:{keyword:"and break do else elseif end false for if in local nil not or repeat return then true until while",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},contains:e.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[a.inherit(a.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:e}].concat(e)},a.C_NUMBER_MODE,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{className:"string",begin:b,end:c,contains:[d],relevance:5}])}}),a.registerLanguage("makefile",function(a){var b={className:"variable",begin:/\$\(/,end:/\)/,contains:[a.BACKSLASH_ESCAPE]};return{aliases:["mk","mak"],contains:[a.HASH_COMMENT_MODE,{begin:/^\w+\s*\W*=/,returnBegin:!0,relevance:0,starts:{className:"constant",end:/\s*\W*=/,excludeEnd:!0,starts:{end:/$/,relevance:0,contains:[b]}}},{className:"title",begin:/^[\w]+:\s*$/},{className:"phony",begin:/^\.PHONY:/,end:/$/,keywords:".PHONY",lexemes:/[\.\w]+/},{begin:/^\t+/,end:/$/,relevance:0,contains:[a.QUOTE_STRING_MODE,b]}]}}),a.registerLanguage("mathematica",function(a){return{aliases:["mma"],lexemes:"(\\$|\\b)"+a.IDENT_RE+"\\b",keywords:"AbelianGroup Abort AbortKernels AbortProtect Above Abs Absolute AbsoluteCorrelation AbsoluteCorrelationFunction AbsoluteCurrentValue AbsoluteDashing AbsoluteFileName AbsoluteOptions AbsolutePointSize AbsoluteThickness AbsoluteTime AbsoluteTiming AccountingForm Accumulate Accuracy AccuracyGoal ActionDelay ActionMenu ActionMenuBox ActionMenuBoxOptions Active ActiveItem ActiveStyle AcyclicGraphQ AddOnHelpPath AddTo AdjacencyGraph AdjacencyList AdjacencyMatrix AdjustmentBox AdjustmentBoxOptions AdjustTimeSeriesForecast AffineTransform After AiryAi AiryAiPrime AiryAiZero AiryBi AiryBiPrime AiryBiZero AlgebraicIntegerQ AlgebraicNumber AlgebraicNumberDenominator AlgebraicNumberNorm AlgebraicNumberPolynomial AlgebraicNumberTrace AlgebraicRules AlgebraicRulesData Algebraics AlgebraicUnitQ Alignment AlignmentMarker AlignmentPoint All AllowedDimensions AllowGroupClose AllowInlineCells AllowKernelInitialization AllowReverseGroupClose AllowScriptLevelChange AlphaChannel AlternatingGroup AlternativeHypothesis Alternatives AmbientLight Analytic AnchoredSearch And AndersonDarlingTest AngerJ AngleBracket AngularGauge Animate AnimationCycleOffset AnimationCycleRepetitions AnimationDirection AnimationDisplayTime AnimationRate AnimationRepetitions AnimationRunning Animator AnimatorBox AnimatorBoxOptions AnimatorElements Annotation Annuity AnnuityDue Antialiasing Antisymmetric Apart ApartSquareFree Appearance AppearanceElements AppellF1 Append AppendTo Apply ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcSec ArcSech ArcSin ArcSinDistribution ArcSinh ArcTan ArcTanh Arg ArgMax ArgMin ArgumentCountQ ARIMAProcess ArithmeticGeometricMean ARMAProcess ARProcess Array ArrayComponents ArrayDepth ArrayFlatten ArrayPad ArrayPlot ArrayQ ArrayReshape ArrayRules Arrays Arrow Arrow3DBox ArrowBox Arrowheads AspectRatio AspectRatioFixed Assert Assuming Assumptions AstronomicalData Asynchronous AsynchronousTaskObject AsynchronousTasks AtomQ Attributes AugmentedSymmetricPolynomial AutoAction AutoDelete AutoEvaluateEvents AutoGeneratedPackage AutoIndent AutoIndentSpacings AutoItalicWords AutoloadPath AutoMatch Automatic AutomaticImageSize AutoMultiplicationSymbol AutoNumberFormatting AutoOpenNotebooks AutoOpenPalettes AutorunSequencing AutoScaling AutoScroll AutoSpacing AutoStyleOptions AutoStyleWords Axes AxesEdge AxesLabel AxesOrigin AxesStyle Axis BabyMonsterGroupB Back Background BackgroundTasksSettings Backslash Backsubstitution Backward Band BandpassFilter BandstopFilter BarabasiAlbertGraphDistribution BarChart BarChart3D BarLegend BarlowProschanImportance BarnesG BarOrigin BarSpacing BartlettHannWindow BartlettWindow BaseForm Baseline BaselinePosition BaseStyle BatesDistribution BattleLemarieWavelet Because BeckmannDistribution Beep Before Begin BeginDialogPacket BeginFrontEndInteractionPacket BeginPackage BellB BellY Below BenfordDistribution BeniniDistribution BenktanderGibratDistribution BenktanderWeibullDistribution BernoulliB BernoulliDistribution BernoulliGraphDistribution BernoulliProcess BernsteinBasis BesselFilterModel BesselI BesselJ BesselJZero BesselK BesselY BesselYZero Beta BetaBinomialDistribution BetaDistribution BetaNegativeBinomialDistribution BetaPrimeDistribution BetaRegularized BetweennessCentrality BezierCurve BezierCurve3DBox BezierCurve3DBoxOptions BezierCurveBox BezierCurveBoxOptions BezierFunction BilateralFilter Binarize BinaryFormat BinaryImageQ BinaryRead BinaryReadList BinaryWrite BinCounts BinLists Binomial BinomialDistribution BinomialProcess BinormalDistribution BiorthogonalSplineWavelet BipartiteGraphQ BirnbaumImportance BirnbaumSaundersDistribution BitAnd BitClear BitGet BitLength BitNot BitOr BitSet BitShiftLeft BitShiftRight BitXor Black BlackmanHarrisWindow BlackmanNuttallWindow BlackmanWindow Blank BlankForm BlankNullSequence BlankSequence Blend Block BlockRandom BlomqvistBeta BlomqvistBetaTest Blue Blur BodePlot BohmanWindow Bold Bookmarks Boole BooleanConsecutiveFunction BooleanConvert BooleanCountingFunction BooleanFunction BooleanGraph BooleanMaxterms BooleanMinimize BooleanMinterms Booleans BooleanTable BooleanVariables BorderDimensions BorelTannerDistribution Bottom BottomHatTransform BoundaryStyle Bounds Box BoxBaselineShift BoxData BoxDimensions Boxed Boxes BoxForm BoxFormFormatTypes BoxFrame BoxID BoxMargins BoxMatrix BoxRatios BoxRotation BoxRotationPoint BoxStyle BoxWhiskerChart Bra BracketingBar BraKet BrayCurtisDistance BreadthFirstScan Break Brown BrownForsytheTest BrownianBridgeProcess BrowserCategory BSplineBasis BSplineCurve BSplineCurve3DBox BSplineCurveBox BSplineCurveBoxOptions BSplineFunction BSplineSurface BSplineSurface3DBox BubbleChart BubbleChart3D BubbleScale BubbleSizes BulletGauge BusinessDayQ ButterflyGraph ButterworthFilterModel Button ButtonBar ButtonBox ButtonBoxOptions ButtonCell ButtonContents ButtonData ButtonEvaluator ButtonExpandable ButtonFrame ButtonFunction ButtonMargins ButtonMinHeight ButtonNote ButtonNotebook ButtonSource ButtonStyle ButtonStyleMenuListing Byte ByteCount ByteOrdering C CachedValue CacheGraphics CalendarData CalendarType CallPacket CanberraDistance Cancel CancelButton CandlestickChart Cap CapForm CapitalDifferentialD CardinalBSplineBasis CarmichaelLambda Cases Cashflow Casoratian Catalan CatalanNumber Catch CauchyDistribution CauchyWindow CayleyGraph CDF CDFDeploy CDFInformation CDFWavelet Ceiling Cell CellAutoOverwrite CellBaseline CellBoundingBox CellBracketOptions CellChangeTimes CellContents CellContext CellDingbat CellDynamicExpression CellEditDuplicate CellElementsBoundingBox CellElementSpacings CellEpilog CellEvaluationDuplicate CellEvaluationFunction CellEventActions CellFrame CellFrameColor CellFrameLabelMargins CellFrameLabels CellFrameMargins CellGroup CellGroupData CellGrouping CellGroupingRules CellHorizontalScrolling CellID CellLabel CellLabelAutoDelete CellLabelMargins CellLabelPositioning CellMargins CellObject CellOpen CellPrint CellProlog Cells CellSize CellStyle CellTags CellularAutomaton CensoredDistribution Censoring Center CenterDot CentralMoment CentralMomentGeneratingFunction CForm ChampernowneNumber ChanVeseBinarize Character CharacterEncoding CharacterEncodingsPath CharacteristicFunction CharacteristicPolynomial CharacterRange Characters ChartBaseStyle ChartElementData ChartElementDataFunction ChartElementFunction ChartElements ChartLabels ChartLayout ChartLegends ChartStyle Chebyshev1FilterModel Chebyshev2FilterModel ChebyshevDistance ChebyshevT ChebyshevU Check CheckAbort CheckAll Checkbox CheckboxBar CheckboxBox CheckboxBoxOptions ChemicalData ChessboardDistance ChiDistribution ChineseRemainder ChiSquareDistribution ChoiceButtons ChoiceDialog CholeskyDecomposition Chop Circle CircleBox CircleDot CircleMinus CirclePlus CircleTimes CirculantGraph CityData Clear ClearAll ClearAttributes ClearSystemCache ClebschGordan ClickPane Clip ClipboardNotebook ClipFill ClippingStyle ClipPlanes ClipRange Clock ClockGauge ClockwiseContourIntegral Close Closed CloseKernels ClosenessCentrality Closing ClosingAutoSave ClosingEvent ClusteringComponents CMYKColor Coarse Coefficient CoefficientArrays CoefficientDomain CoefficientList CoefficientRules CoifletWavelet Collect Colon ColonForm ColorCombine ColorConvert ColorData ColorDataFunction ColorFunction ColorFunctionScaling Colorize ColorNegate ColorOutput ColorProfileData ColorQuantize ColorReplace ColorRules ColorSelectorSettings ColorSeparate ColorSetter ColorSetterBox ColorSetterBoxOptions ColorSlider ColorSpace Column ColumnAlignments ColumnBackgrounds ColumnForm ColumnLines ColumnsEqual ColumnSpacings ColumnWidths CommonDefaultFormatTypes Commonest CommonestFilter CommonUnits CommunityBoundaryStyle CommunityGraphPlot CommunityLabels CommunityRegionStyle CompatibleUnitQ CompilationOptions CompilationTarget Compile Compiled CompiledFunction Complement CompleteGraph CompleteGraphQ CompleteKaryTree CompletionsListPacket Complex Complexes ComplexExpand ComplexInfinity ComplexityFunction ComponentMeasurements ComponentwiseContextMenu Compose ComposeList ComposeSeries Composition CompoundExpression CompoundPoissonDistribution CompoundPoissonProcess CompoundRenewalProcess Compress CompressedData Condition ConditionalExpression Conditioned Cone ConeBox ConfidenceLevel ConfidenceRange ConfidenceTransform ConfigurationPath Congruent Conjugate ConjugateTranspose Conjunction Connect ConnectedComponents ConnectedGraphQ ConnesWindow ConoverTest ConsoleMessage ConsoleMessagePacket ConsolePrint Constant ConstantArray Constants ConstrainedMax ConstrainedMin ContentPadding ContentsBoundingBox ContentSelectable ContentSize Context ContextMenu Contexts ContextToFilename ContextToFileName Continuation Continue ContinuedFraction ContinuedFractionK ContinuousAction ContinuousMarkovProcess ContinuousTimeModelQ ContinuousWaveletData ContinuousWaveletTransform ContourDetect ContourGraphics ContourIntegral ContourLabels ContourLines ContourPlot ContourPlot3D Contours ContourShading ContourSmoothing ContourStyle ContraharmonicMean Control ControlActive ControlAlignment ControllabilityGramian ControllabilityMatrix ControllableDecomposition ControllableModelQ ControllerDuration ControllerInformation ControllerInformationData ControllerLinking ControllerManipulate ControllerMethod ControllerPath ControllerState ControlPlacement ControlsRendering ControlType Convergents ConversionOptions ConversionRules ConvertToBitmapPacket ConvertToPostScript ConvertToPostScriptPacket Convolve ConwayGroupCo1 ConwayGroupCo2 ConwayGroupCo3 CoordinateChartData CoordinatesToolOptions CoordinateTransform CoordinateTransformData CoprimeQ Coproduct CopulaDistribution Copyable CopyDirectory CopyFile CopyTag CopyToClipboard CornerFilter CornerNeighbors Correlation CorrelationDistance CorrelationFunction CorrelationTest Cos Cosh CoshIntegral CosineDistance CosineWindow CosIntegral Cot Coth Count CounterAssignments CounterBox CounterBoxOptions CounterClockwiseContourIntegral CounterEvaluator CounterFunction CounterIncrements CounterStyle CounterStyleMenuListing CountRoots CountryData Covariance CovarianceEstimatorFunction CovarianceFunction CoxianDistribution CoxIngersollRossProcess CoxModel CoxModelFit CramerVonMisesTest CreateArchive CreateDialog CreateDirectory CreateDocument CreateIntermediateDirectories CreatePalette CreatePalettePacket CreateScheduledTask CreateTemporary CreateWindow CriticalityFailureImportance CriticalitySuccessImportance CriticalSection Cross CrossingDetect CrossMatrix Csc Csch CubeRoot Cubics Cuboid CuboidBox Cumulant CumulantGeneratingFunction Cup CupCap Curl CurlyDoubleQuote CurlyQuote CurrentImage CurrentlySpeakingPacket CurrentValue CurvatureFlowFilter CurveClosed Cyan CycleGraph CycleIndexPolynomial Cycles CyclicGroup Cyclotomic Cylinder CylinderBox CylindricalDecomposition D DagumDistribution DamerauLevenshteinDistance DampingFactor Darker Dashed Dashing DataCompression DataDistribution DataRange DataReversed Date DateDelimiters DateDifference DateFunction DateList DateListLogPlot DateListPlot DatePattern DatePlus DateRange DateString DateTicksFormat DaubechiesWavelet DavisDistribution DawsonF DayCount DayCountConvention DayMatchQ DayName DayPlus DayRange DayRound DeBruijnGraph Debug DebugTag Decimal DeclareKnownSymbols DeclarePackage Decompose Decrement DedekindEta Default DefaultAxesStyle DefaultBaseStyle DefaultBoxStyle DefaultButton DefaultColor DefaultControlPlacement DefaultDuplicateCellStyle DefaultDuration DefaultElement DefaultFaceGridsStyle DefaultFieldHintStyle DefaultFont DefaultFontProperties DefaultFormatType DefaultFormatTypeForStyle DefaultFrameStyle DefaultFrameTicksStyle DefaultGridLinesStyle DefaultInlineFormatType DefaultInputFormatType DefaultLabelStyle DefaultMenuStyle DefaultNaturalLanguage DefaultNewCellStyle DefaultNewInlineCellStyle DefaultNotebook DefaultOptions DefaultOutputFormatType DefaultStyle DefaultStyleDefinitions DefaultTextFormatType DefaultTextInlineFormatType DefaultTicksStyle DefaultTooltipStyle DefaultValues Defer DefineExternal DefineInputStreamMethod DefineOutputStreamMethod Definition Degree DegreeCentrality DegreeGraphDistribution DegreeLexicographic DegreeReverseLexicographic Deinitialization Del Deletable Delete DeleteBorderComponents DeleteCases DeleteContents DeleteDirectory DeleteDuplicates DeleteFile DeleteSmallComponents DeleteWithContents DeletionWarning Delimiter DelimiterFlashTime DelimiterMatching Delimiters Denominator DensityGraphics DensityHistogram DensityPlot DependentVariables Deploy Deployed Depth DepthFirstScan Derivative DerivativeFilter DescriptorStateSpace DesignMatrix Det DGaussianWavelet DiacriticalPositioning Diagonal DiagonalMatrix Dialog DialogIndent DialogInput DialogLevel DialogNotebook DialogProlog DialogReturn DialogSymbols Diamond DiamondMatrix DiceDissimilarity DictionaryLookup DifferenceDelta DifferenceOrder DifferenceRoot DifferenceRootReduce Differences DifferentialD DifferentialRoot DifferentialRootReduce DifferentiatorFilter DigitBlock DigitBlockMinimum DigitCharacter DigitCount DigitQ DihedralGroup Dilation Dimensions DiracComb DiracDelta DirectedEdge DirectedEdges DirectedGraph DirectedGraphQ DirectedInfinity Direction Directive Directory DirectoryName DirectoryQ DirectoryStack DirichletCharacter DirichletConvolve DirichletDistribution DirichletL DirichletTransform DirichletWindow DisableConsolePrintPacket DiscreteChirpZTransform DiscreteConvolve DiscreteDelta DiscreteHadamardTransform DiscreteIndicator DiscreteLQEstimatorGains DiscreteLQRegulatorGains DiscreteLyapunovSolve DiscreteMarkovProcess DiscretePlot DiscretePlot3D DiscreteRatio DiscreteRiccatiSolve DiscreteShift DiscreteTimeModelQ DiscreteUniformDistribution DiscreteVariables DiscreteWaveletData DiscreteWaveletPacketTransform DiscreteWaveletTransform Discriminant Disjunction Disk DiskBox DiskMatrix Dispatch DispersionEstimatorFunction Display DisplayAllSteps DisplayEndPacket DisplayFlushImagePacket DisplayForm DisplayFunction DisplayPacket DisplayRules DisplaySetSizePacket DisplayString DisplayTemporary DisplayWith DisplayWithRef DisplayWithVariable DistanceFunction DistanceTransform Distribute Distributed DistributedContexts DistributeDefinitions DistributionChart DistributionDomain DistributionFitTest DistributionParameterAssumptions DistributionParameterQ Dithering Div Divergence Divide DivideBy Dividers Divisible Divisors DivisorSigma DivisorSum DMSList DMSString Do DockedCells DocumentNotebook DominantColors DOSTextFormat Dot DotDashed DotEqual Dotted DoubleBracketingBar DoubleContourIntegral DoubleDownArrow DoubleLeftArrow DoubleLeftRightArrow DoubleLeftTee DoubleLongLeftArrow DoubleLongLeftRightArrow DoubleLongRightArrow DoubleRightArrow DoubleRightTee DoubleUpArrow DoubleUpDownArrow DoubleVerticalBar DoublyInfinite Down DownArrow DownArrowBar DownArrowUpArrow DownLeftRightVector DownLeftTeeVector DownLeftVector DownLeftVectorBar DownRightTeeVector DownRightVector DownRightVectorBar Downsample DownTee DownTeeArrow DownValues DragAndDrop DrawEdges DrawFrontFaces DrawHighlighted Drop DSolve Dt DualLinearProgramming DualSystemsModel DumpGet DumpSave DuplicateFreeQ Dynamic DynamicBox DynamicBoxOptions DynamicEvaluationTimeout DynamicLocation DynamicModule DynamicModuleBox DynamicModuleBoxOptions DynamicModuleParent DynamicModuleValues DynamicName DynamicNamespace DynamicReference DynamicSetting DynamicUpdating DynamicWrapper DynamicWrapperBox DynamicWrapperBoxOptions E EccentricityCentrality EdgeAdd EdgeBetweennessCentrality EdgeCapacity EdgeCapForm EdgeColor EdgeConnectivity EdgeCost EdgeCount EdgeCoverQ EdgeDashing EdgeDelete EdgeDetect EdgeForm EdgeIndex EdgeJoinForm EdgeLabeling EdgeLabels EdgeLabelStyle EdgeList EdgeOpacity EdgeQ EdgeRenderingFunction EdgeRules EdgeShapeFunction EdgeStyle EdgeThickness EdgeWeight Editable EditButtonSettings EditCellTagsSettings EditDistance EffectiveInterest Eigensystem Eigenvalues EigenvectorCentrality Eigenvectors Element ElementData Eliminate EliminationOrder EllipticE EllipticExp EllipticExpPrime EllipticF EllipticFilterModel EllipticK EllipticLog EllipticNomeQ EllipticPi EllipticReducedHalfPeriods EllipticTheta EllipticThetaPrime EmitSound EmphasizeSyntaxErrors EmpiricalDistribution Empty EmptyGraphQ EnableConsolePrintPacket Enabled Encode End EndAdd EndDialogPacket EndFrontEndInteractionPacket EndOfFile EndOfLine EndOfString EndPackage EngineeringForm Enter EnterExpressionPacket EnterTextPacket Entropy EntropyFilter Environment Epilog Equal EqualColumns EqualRows EqualTilde EquatedTo Equilibrium EquirippleFilterKernel Equivalent Erf Erfc Erfi ErlangB ErlangC ErlangDistribution Erosion ErrorBox ErrorBoxOptions ErrorNorm ErrorPacket ErrorsDialogSettings EstimatedDistribution EstimatedProcess EstimatorGains EstimatorRegulator EuclideanDistance EulerE EulerGamma EulerianGraphQ EulerPhi Evaluatable Evaluate Evaluated EvaluatePacket EvaluationCell EvaluationCompletionAction EvaluationElements EvaluationMode EvaluationMonitor EvaluationNotebook EvaluationObject EvaluationOrder Evaluator EvaluatorNames EvenQ EventData EventEvaluator EventHandler EventHandlerTag EventLabels ExactBlackmanWindow ExactNumberQ ExactRootIsolation ExampleData Except ExcludedForms ExcludePods Exclusions ExclusionsStyle Exists Exit ExitDialog Exp Expand ExpandAll ExpandDenominator ExpandFileName ExpandNumerator Expectation ExpectationE ExpectedValue ExpGammaDistribution ExpIntegralE ExpIntegralEi Exponent ExponentFunction ExponentialDistribution ExponentialFamily ExponentialGeneratingFunction ExponentialMovingAverage ExponentialPowerDistribution ExponentPosition ExponentStep Export ExportAutoReplacements ExportPacket ExportString Expression ExpressionCell ExpressionPacket ExpToTrig ExtendedGCD Extension ExtentElementFunction ExtentMarkers ExtentSize ExternalCall ExternalDataCharacterEncoding Extract ExtractArchive ExtremeValueDistribution FaceForm FaceGrids FaceGridsStyle Factor FactorComplete Factorial Factorial2 FactorialMoment FactorialMomentGeneratingFunction FactorialPower FactorInteger FactorList FactorSquareFree FactorSquareFreeList FactorTerms FactorTermsList Fail FailureDistribution False FARIMAProcess FEDisableConsolePrintPacket FeedbackSector FeedbackSectorStyle FeedbackType FEEnableConsolePrintPacket Fibonacci FieldHint FieldHintStyle FieldMasked FieldSize File FileBaseName FileByteCount FileDate FileExistsQ FileExtension FileFormat FileHash FileInformation FileName FileNameDepth FileNameDialogSettings FileNameDrop FileNameJoin FileNames FileNameSetter FileNameSplit FileNameTake FilePrint FileType FilledCurve FilledCurveBox Filling FillingStyle FillingTransform FilterRules FinancialBond FinancialData FinancialDerivative FinancialIndicator Find FindArgMax FindArgMin FindClique FindClusters FindCurvePath FindDistributionParameters FindDivisions FindEdgeCover FindEdgeCut FindEulerianCycle FindFaces FindFile FindFit FindGeneratingFunction FindGeoLocation FindGeometricTransform FindGraphCommunities FindGraphIsomorphism FindGraphPartition FindHamiltonianCycle FindIndependentEdgeSet FindIndependentVertexSet FindInstance FindIntegerNullVector FindKClan FindKClique FindKClub FindKPlex FindLibrary FindLinearRecurrence FindList FindMaximum FindMaximumFlow FindMaxValue FindMinimum FindMinimumCostFlow FindMinimumCut FindMinValue FindPermutation FindPostmanTour FindProcessParameters FindRoot FindSequenceFunction FindSettings FindShortestPath FindShortestTour FindThreshold FindVertexCover FindVertexCut Fine FinishDynamic FiniteAbelianGroupCount FiniteGroupCount FiniteGroupData First FirstPassageTimeDistribution FischerGroupFi22 FischerGroupFi23 FischerGroupFi24Prime FisherHypergeometricDistribution FisherRatioTest FisherZDistribution Fit FitAll FittedModel FixedPoint FixedPointList FlashSelection Flat Flatten FlattenAt FlatTopWindow FlipView Floor FlushPrintOutputPacket Fold FoldList Font FontColor FontFamily FontForm FontName FontOpacity FontPostScriptName FontProperties FontReencoding FontSize FontSlant FontSubstitutions FontTracking FontVariations FontWeight For ForAll Format FormatRules FormatType FormatTypeAutoConvert FormatValues FormBox FormBoxOptions FortranForm Forward ForwardBackward Fourier FourierCoefficient FourierCosCoefficient FourierCosSeries FourierCosTransform FourierDCT FourierDCTFilter FourierDCTMatrix FourierDST FourierDSTMatrix FourierMatrix FourierParameters FourierSequenceTransform FourierSeries FourierSinCoefficient FourierSinSeries FourierSinTransform FourierTransform FourierTrigSeries FractionalBrownianMotionProcess FractionalPart FractionBox FractionBoxOptions FractionLine Frame FrameBox FrameBoxOptions Framed FrameInset FrameLabel Frameless FrameMargins FrameStyle FrameTicks FrameTicksStyle FRatioDistribution FrechetDistribution FreeQ FrequencySamplingFilterKernel FresnelC FresnelS Friday FrobeniusNumber FrobeniusSolve FromCharacterCode FromCoefficientRules FromContinuedFraction FromDate FromDigits FromDMS Front FrontEndDynamicExpression FrontEndEventActions FrontEndExecute FrontEndObject FrontEndResource FrontEndResourceString FrontEndStackSize FrontEndToken FrontEndTokenExecute FrontEndValueCache FrontEndVersion FrontFaceColor FrontFaceOpacity Full FullAxes FullDefinition FullForm FullGraphics FullOptions FullSimplify Function FunctionExpand FunctionInterpolation FunctionSpace FussellVeselyImportance GaborFilter GaborMatrix GaborWavelet GainMargins GainPhaseMargins Gamma GammaDistribution GammaRegularized GapPenalty Gather GatherBy GaugeFaceElementFunction GaugeFaceStyle GaugeFrameElementFunction GaugeFrameSize GaugeFrameStyle GaugeLabels GaugeMarkers GaugeStyle GaussianFilter GaussianIntegers GaussianMatrix GaussianWindow GCD GegenbauerC General GeneralizedLinearModelFit GenerateConditions GeneratedCell GeneratedParameters GeneratingFunction Generic GenericCylindricalDecomposition GenomeData GenomeLookup GeodesicClosing GeodesicDilation GeodesicErosion GeodesicOpening GeoDestination GeodesyData GeoDirection GeoDistance GeoGridPosition GeometricBrownianMotionProcess GeometricDistribution GeometricMean GeometricMeanFilter GeometricTransformation GeometricTransformation3DBox GeometricTransformation3DBoxOptions GeometricTransformationBox GeometricTransformationBoxOptions GeoPosition GeoPositionENU GeoPositionXYZ GeoProjectionData GestureHandler GestureHandlerTag Get GetBoundingBoxSizePacket GetContext GetEnvironment GetFileName GetFrontEndOptionsDataPacket GetLinebreakInformationPacket GetMenusPacket GetPageBreakInformationPacket Glaisher GlobalClusteringCoefficient GlobalPreferences GlobalSession Glow GoldenRatio GompertzMakehamDistribution GoodmanKruskalGamma GoodmanKruskalGammaTest Goto Grad Gradient GradientFilter GradientOrientationFilter Graph GraphAssortativity GraphCenter GraphComplement GraphData GraphDensity GraphDiameter GraphDifference GraphDisjointUnion GraphDistance GraphDistanceMatrix GraphElementData GraphEmbedding GraphHighlight GraphHighlightStyle GraphHub Graphics Graphics3D Graphics3DBox Graphics3DBoxOptions GraphicsArray GraphicsBaseline GraphicsBox GraphicsBoxOptions GraphicsColor GraphicsColumn GraphicsComplex GraphicsComplex3DBox GraphicsComplex3DBoxOptions GraphicsComplexBox GraphicsComplexBoxOptions GraphicsContents GraphicsData GraphicsGrid GraphicsGridBox GraphicsGroup GraphicsGroup3DBox GraphicsGroup3DBoxOptions GraphicsGroupBox GraphicsGroupBoxOptions GraphicsGrouping GraphicsHighlightColor GraphicsRow GraphicsSpacing GraphicsStyle GraphIntersection GraphLayout GraphLinkEfficiency GraphPeriphery GraphPlot GraphPlot3D GraphPower GraphPropertyDistribution GraphQ GraphRadius GraphReciprocity GraphRoot GraphStyle GraphUnion Gray GrayLevel GreatCircleDistance Greater GreaterEqual GreaterEqualLess GreaterFullEqual GreaterGreater GreaterLess GreaterSlantEqual GreaterTilde Green Grid GridBaseline GridBox GridBoxAlignment GridBoxBackground GridBoxDividers GridBoxFrame GridBoxItemSize GridBoxItemStyle GridBoxOptions GridBoxSpacings GridCreationSettings GridDefaultElement GridElementStyleOptions GridFrame GridFrameMargins GridGraph GridLines GridLinesStyle GroebnerBasis GroupActionBase GroupCentralizer GroupElementFromWord GroupElementPosition GroupElementQ GroupElements GroupElementToWord GroupGenerators GroupMultiplicationTable GroupOrbits GroupOrder GroupPageBreakWithin GroupSetwiseStabilizer GroupStabilizer GroupStabilizerChain Gudermannian GumbelDistribution HaarWavelet HadamardMatrix HalfNormalDistribution HamiltonianGraphQ HammingDistance HammingWindow HankelH1 HankelH2 HankelMatrix HannPoissonWindow HannWindow HaradaNortonGroupHN HararyGraph HarmonicMean HarmonicMeanFilter HarmonicNumber Hash HashTable Haversine HazardFunction Head HeadCompose Heads HeavisideLambda HeavisidePi HeavisideTheta HeldGroupHe HeldPart HelpBrowserLookup HelpBrowserNotebook HelpBrowserSettings HermiteDecomposition HermiteH HermitianMatrixQ HessenbergDecomposition Hessian HexadecimalCharacter Hexahedron HexahedronBox HexahedronBoxOptions HiddenSurface HighlightGraph HighlightImage HighpassFilter HigmanSimsGroupHS HilbertFilter HilbertMatrix Histogram Histogram3D HistogramDistribution HistogramList HistogramTransform HistogramTransformInterpolation HitMissTransform HITSCentrality HodgeDual HoeffdingD HoeffdingDTest Hold HoldAll HoldAllComplete HoldComplete HoldFirst HoldForm HoldPattern HoldRest HolidayCalendar HomeDirectory HomePage Horizontal HorizontalForm HorizontalGauge HorizontalScrollPosition HornerForm HotellingTSquareDistribution HoytDistribution HTMLSave Hue HumpDownHump HumpEqual HurwitzLerchPhi HurwitzZeta HyperbolicDistribution HypercubeGraph HyperexponentialDistribution Hyperfactorial Hypergeometric0F1 Hypergeometric0F1Regularized Hypergeometric1F1 Hypergeometric1F1Regularized Hypergeometric2F1 Hypergeometric2F1Regularized HypergeometricDistribution HypergeometricPFQ HypergeometricPFQRegularized HypergeometricU Hyperlink HyperlinkCreationSettings Hyphenation HyphenationOptions HypoexponentialDistribution HypothesisTestData I Identity IdentityMatrix If IgnoreCase Im Image Image3D Image3DSlices ImageAccumulate ImageAdd ImageAdjust ImageAlign ImageApply ImageAspectRatio ImageAssemble ImageCache ImageCacheValid ImageCapture ImageChannels ImageClip ImageColorSpace ImageCompose ImageConvolve ImageCooccurrence ImageCorners ImageCorrelate ImageCorrespondingPoints ImageCrop ImageData ImageDataPacket ImageDeconvolve ImageDemosaic ImageDifference ImageDimensions ImageDistance ImageEffect ImageFeatureTrack ImageFileApply ImageFileFilter ImageFileScan ImageFilter ImageForestingComponents ImageForwardTransformation ImageHistogram ImageKeypoints ImageLevels ImageLines ImageMargins ImageMarkers ImageMeasurements ImageMultiply ImageOffset ImagePad ImagePadding ImagePartition ImagePeriodogram ImagePerspectiveTransformation ImageQ ImageRangeCache ImageReflect ImageRegion ImageResize ImageResolution ImageRotate ImageRotated ImageScaled ImageScan ImageSize ImageSizeAction ImageSizeCache ImageSizeMultipliers ImageSizeRaw ImageSubtract ImageTake ImageTransformation ImageTrim ImageType ImageValue ImageValuePositions Implies Import ImportAutoReplacements ImportString ImprovementImportance In IncidenceGraph IncidenceList IncidenceMatrix IncludeConstantBasis IncludeFileExtension IncludePods IncludeSingularTerm Increment Indent IndentingNewlineSpacings IndentMaxFraction IndependenceTest IndependentEdgeSetQ IndependentUnit IndependentVertexSetQ Indeterminate IndexCreationOptions Indexed IndexGraph IndexTag Inequality InexactNumberQ InexactNumbers Infinity Infix Information Inherited InheritScope Initialization InitializationCell InitializationCellEvaluation InitializationCellWarning InlineCounterAssignments InlineCounterIncrements InlineRules Inner Inpaint Input InputAliases InputAssumptions InputAutoReplacements InputField InputFieldBox InputFieldBoxOptions InputForm InputGrouping InputNamePacket InputNotebook InputPacket InputSettings InputStream InputString InputStringPacket InputToBoxFormPacket Insert InsertionPointObject InsertResults Inset Inset3DBox Inset3DBoxOptions InsetBox InsetBoxOptions Install InstallService InString Integer IntegerDigits IntegerExponent IntegerLength IntegerPart IntegerPartitions IntegerQ Integers IntegerString Integral Integrate Interactive InteractiveTradingChart Interlaced Interleaving InternallyBalancedDecomposition InterpolatingFunction InterpolatingPolynomial Interpolation InterpolationOrder InterpolationPoints InterpolationPrecision Interpretation InterpretationBox InterpretationBoxOptions InterpretationFunction InterpretTemplate InterquartileRange Interrupt InterruptSettings Intersection Interval IntervalIntersection IntervalMemberQ IntervalUnion Inverse InverseBetaRegularized InverseCDF InverseChiSquareDistribution InverseContinuousWaveletTransform InverseDistanceTransform InverseEllipticNomeQ InverseErf InverseErfc InverseFourier InverseFourierCosTransform InverseFourierSequenceTransform InverseFourierSinTransform InverseFourierTransform InverseFunction InverseFunctions InverseGammaDistribution InverseGammaRegularized InverseGaussianDistribution InverseGudermannian InverseHaversine InverseJacobiCD InverseJacobiCN InverseJacobiCS InverseJacobiDC InverseJacobiDN InverseJacobiDS InverseJacobiNC InverseJacobiND InverseJacobiNS InverseJacobiSC InverseJacobiSD InverseJacobiSN InverseLaplaceTransform InversePermutation InverseRadon InverseSeries InverseSurvivalFunction InverseWaveletTransform InverseWeierstrassP InverseZTransform Invisible InvisibleApplication InvisibleTimes IrreduciblePolynomialQ IsolatingInterval IsomorphicGraphQ IsotopeData Italic Item ItemBox ItemBoxOptions ItemSize ItemStyle ItoProcess JaccardDissimilarity JacobiAmplitude Jacobian JacobiCD JacobiCN JacobiCS JacobiDC JacobiDN JacobiDS JacobiNC JacobiND JacobiNS JacobiP JacobiSC JacobiSD JacobiSN JacobiSymbol JacobiZeta JankoGroupJ1 JankoGroupJ2 JankoGroupJ3 JankoGroupJ4 JarqueBeraALMTest JohnsonDistribution Join Joined JoinedCurve JoinedCurveBox JoinForm JordanDecomposition JordanModelDecomposition K KagiChart KaiserBesselWindow KaiserWindow KalmanEstimator KalmanFilter KarhunenLoeveDecomposition KaryTree KatzCentrality KCoreComponents KDistribution KelvinBei KelvinBer KelvinKei KelvinKer KendallTau KendallTauTest KernelExecute KernelMixtureDistribution KernelObject Kernels Ket Khinchin KirchhoffGraph KirchhoffMatrix KleinInvariantJ KnightTourGraph KnotData KnownUnitQ KolmogorovSmirnovTest KroneckerDelta KroneckerModelDecomposition KroneckerProduct KroneckerSymbol KuiperTest KumaraswamyDistribution Kurtosis KuwaharaFilter Label Labeled LabeledSlider LabelingFunction LabelStyle LaguerreL LambdaComponents LambertW LanczosWindow LandauDistribution Language LanguageCategory LaplaceDistribution LaplaceTransform Laplacian LaplacianFilter LaplacianGaussianFilter Large Larger Last Latitude LatitudeLongitude LatticeData LatticeReduce Launch LaunchKernels LayeredGraphPlot LayerSizeFunction LayoutInformation LCM LeafCount LeapYearQ LeastSquares LeastSquaresFilterKernel Left LeftArrow LeftArrowBar LeftArrowRightArrow LeftDownTeeVector LeftDownVector LeftDownVectorBar LeftRightArrow LeftRightVector LeftTee LeftTeeArrow LeftTeeVector LeftTriangle LeftTriangleBar LeftTriangleEqual LeftUpDownVector LeftUpTeeVector LeftUpVector LeftUpVectorBar LeftVector LeftVectorBar LegendAppearance Legended LegendFunction LegendLabel LegendLayout LegendMargins LegendMarkers LegendMarkerSize LegendreP LegendreQ LegendreType Length LengthWhile LerchPhi Less LessEqual LessEqualGreater LessFullEqual LessGreater LessLess LessSlantEqual LessTilde LetterCharacter LetterQ Level LeveneTest LeviCivitaTensor LevyDistribution Lexicographic LibraryFunction LibraryFunctionError LibraryFunctionInformation LibraryFunctionLoad LibraryFunctionUnload LibraryLoad LibraryUnload LicenseID LiftingFilterData LiftingWaveletTransform LightBlue LightBrown LightCyan Lighter LightGray LightGreen Lighting LightingAngle LightMagenta LightOrange LightPink LightPurple LightRed LightSources LightYellow Likelihood Limit LimitsPositioning LimitsPositioningTokens LindleyDistribution Line Line3DBox LinearFilter LinearFractionalTransform LinearModelFit LinearOffsetFunction LinearProgramming LinearRecurrence LinearSolve LinearSolveFunction LineBox LineBreak LinebreakAdjustments LineBreakChart LineBreakWithin LineColor LineForm LineGraph LineIndent LineIndentMaxFraction LineIntegralConvolutionPlot LineIntegralConvolutionScale LineLegend LineOpacity LineSpacing LineWrapParts LinkActivate LinkClose LinkConnect LinkConnectedQ LinkCreate LinkError LinkFlush LinkFunction LinkHost LinkInterrupt LinkLaunch LinkMode LinkObject LinkOpen LinkOptions LinkPatterns LinkProtocol LinkRead LinkReadHeld LinkReadyQ Links LinkWrite LinkWriteHeld LiouvilleLambda List Listable ListAnimate ListContourPlot ListContourPlot3D ListConvolve ListCorrelate ListCurvePathPlot ListDeconvolve ListDensityPlot Listen ListFourierSequenceTransform ListInterpolation ListLineIntegralConvolutionPlot ListLinePlot ListLogLinearPlot ListLogLogPlot ListLogPlot ListPicker ListPickerBox ListPickerBoxBackground ListPickerBoxOptions ListPlay ListPlot ListPlot3D ListPointPlot3D ListPolarPlot ListQ ListStreamDensityPlot ListStreamPlot ListSurfacePlot3D ListVectorDensityPlot ListVectorPlot ListVectorPlot3D ListZTransform Literal LiteralSearch LocalClusteringCoefficient LocalizeVariables LocationEquivalenceTest LocationTest Locator LocatorAutoCreate LocatorBox LocatorBoxOptions LocatorCentering LocatorPane LocatorPaneBox LocatorPaneBoxOptions LocatorRegion Locked Log Log10 Log2 LogBarnesG LogGamma LogGammaDistribution LogicalExpand LogIntegral LogisticDistribution LogitModelFit LogLikelihood LogLinearPlot LogLogisticDistribution LogLogPlot LogMultinormalDistribution LogNormalDistribution LogPlot LogRankTest LogSeriesDistribution LongEqual Longest LongestAscendingSequence LongestCommonSequence LongestCommonSequencePositions LongestCommonSubsequence LongestCommonSubsequencePositions LongestMatch LongForm Longitude LongLeftArrow LongLeftRightArrow LongRightArrow Loopback LoopFreeGraphQ LowerCaseQ LowerLeftArrow LowerRightArrow LowerTriangularize LowpassFilter LQEstimatorGains LQGRegulator LQOutputRegulatorGains LQRegulatorGains LUBackSubstitution LucasL LuccioSamiComponents LUDecomposition LyapunovSolve LyonsGroupLy MachineID MachineName MachineNumberQ MachinePrecision MacintoshSystemPageSetup Magenta Magnification Magnify MainSolve MaintainDynamicCaches Majority MakeBoxes MakeExpression MakeRules MangoldtLambda ManhattanDistance Manipulate Manipulator MannWhitneyTest MantissaExponent Manual Map MapAll MapAt MapIndexed MAProcess MapThread MarcumQ MardiaCombinedTest MardiaKurtosisTest MardiaSkewnessTest MarginalDistribution MarkovProcessProperties Masking MatchingDissimilarity MatchLocalNameQ MatchLocalNames MatchQ Material MathematicaNotation MathieuC MathieuCharacteristicA MathieuCharacteristicB MathieuCharacteristicExponent MathieuCPrime MathieuGroupM11 MathieuGroupM12 MathieuGroupM22 MathieuGroupM23 MathieuGroupM24 MathieuS MathieuSPrime MathMLForm MathMLText Matrices MatrixExp MatrixForm MatrixFunction MatrixLog MatrixPlot MatrixPower MatrixQ MatrixRank Max MaxBend MaxDetect MaxExtraBandwidths MaxExtraConditions MaxFeatures MaxFilter Maximize MaxIterations MaxMemoryUsed MaxMixtureKernels MaxPlotPoints MaxPoints MaxRecursion MaxStableDistribution MaxStepFraction MaxSteps MaxStepSize MaxValue MaxwellDistribution McLaughlinGroupMcL Mean MeanClusteringCoefficient MeanDegreeConnectivity MeanDeviation MeanFilter MeanGraphDistance MeanNeighborDegree MeanShift MeanShiftFilter Median MedianDeviation MedianFilter Medium MeijerG MeixnerDistribution MemberQ MemoryConstrained MemoryInUse Menu MenuAppearance MenuCommandKey MenuEvaluator MenuItem MenuPacket MenuSortingValue MenuStyle MenuView MergeDifferences Mesh MeshFunctions MeshRange MeshShading MeshStyle Message MessageDialog MessageList MessageName MessageOptions MessagePacket Messages MessagesNotebook MetaCharacters MetaInformation Method MethodOptions MexicanHatWavelet MeyerWavelet Min MinDetect MinFilter MinimalPolynomial MinimalStateSpaceModel Minimize Minors MinRecursion MinSize MinStableDistribution Minus MinusPlus MinValue Missing MissingDataMethod MittagLefflerE MixedRadix MixedRadixQuantity MixtureDistribution Mod Modal Mode Modular ModularLambda Module Modulus MoebiusMu Moment Momentary MomentConvert MomentEvaluate MomentGeneratingFunction Monday Monitor MonomialList MonomialOrder MonsterGroupM MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform Most MouseAnnotation MouseAppearance MouseAppearanceTag MouseButtons Mouseover MousePointerNote MousePosition MovingAverage MovingMedian MoyalDistribution MultiedgeStyle MultilaunchWarning MultiLetterItalics MultiLetterStyle MultilineFunction Multinomial MultinomialDistribution MultinormalDistribution MultiplicativeOrder Multiplicity Multiselection MultivariateHypergeometricDistribution MultivariatePoissonDistribution MultivariateTDistribution N NakagamiDistribution NameQ Names NamespaceBox Nand NArgMax NArgMin NBernoulliB NCache NDSolve NDSolveValue Nearest NearestFunction NeedCurrentFrontEndPackagePacket NeedCurrentFrontEndSymbolsPacket NeedlemanWunschSimilarity Needs Negative NegativeBinomialDistribution NegativeMultinomialDistribution NeighborhoodGraph Nest NestedGreaterGreater NestedLessLess NestedScriptRules NestList NestWhile NestWhileList NevilleThetaC NevilleThetaD NevilleThetaN NevilleThetaS NewPrimitiveStyle NExpectation Next NextPrime NHoldAll NHoldFirst NHoldRest NicholsGridLines NicholsPlot NIntegrate NMaximize NMaxValue NMinimize NMinValue NominalVariables NonAssociative NoncentralBetaDistribution NoncentralChiSquareDistribution NoncentralFRatioDistribution NoncentralStudentTDistribution NonCommutativeMultiply NonConstants None NonlinearModelFit NonlocalMeansFilter NonNegative NonPositive Nor NorlundB Norm Normal NormalDistribution NormalGrouping Normalize NormalizedSquaredEuclideanDistance NormalsFunction NormFunction Not NotCongruent NotCupCap NotDoubleVerticalBar Notebook NotebookApply NotebookAutoSave NotebookClose NotebookConvertSettings NotebookCreate NotebookCreateReturnObject NotebookDefault NotebookDelete NotebookDirectory NotebookDynamicExpression NotebookEvaluate NotebookEventActions NotebookFileName NotebookFind NotebookFindReturnObject NotebookGet NotebookGetLayoutInformationPacket NotebookGetMisspellingsPacket NotebookInformation NotebookInterfaceObject NotebookLocate NotebookObject NotebookOpen NotebookOpenReturnObject NotebookPath NotebookPrint NotebookPut NotebookPutReturnObject NotebookRead NotebookResetGeneratedCells Notebooks NotebookSave NotebookSaveAs NotebookSelection NotebookSetupLayoutInformationPacket NotebooksMenu NotebookWrite NotElement NotEqualTilde NotExists NotGreater NotGreaterEqual NotGreaterFullEqual NotGreaterGreater NotGreaterLess NotGreaterSlantEqual NotGreaterTilde NotHumpDownHump NotHumpEqual NotLeftTriangle NotLeftTriangleBar NotLeftTriangleEqual NotLess NotLessEqual NotLessFullEqual NotLessGreater NotLessLess NotLessSlantEqual NotLessTilde NotNestedGreaterGreater NotNestedLessLess NotPrecedes NotPrecedesEqual NotPrecedesSlantEqual NotPrecedesTilde NotReverseElement NotRightTriangle NotRightTriangleBar NotRightTriangleEqual NotSquareSubset NotSquareSubsetEqual NotSquareSuperset NotSquareSupersetEqual NotSubset NotSubsetEqual NotSucceeds NotSucceedsEqual NotSucceedsSlantEqual NotSucceedsTilde NotSuperset NotSupersetEqual NotTilde NotTildeEqual NotTildeFullEqual NotTildeTilde NotVerticalBar NProbability NProduct NProductFactors NRoots NSolve NSum NSumTerms Null NullRecords NullSpace NullWords Number NumberFieldClassNumber NumberFieldDiscriminant NumberFieldFundamentalUnits NumberFieldIntegralBasis NumberFieldNormRepresentatives NumberFieldRegulator NumberFieldRootsOfUnity NumberFieldSignature NumberForm NumberFormat NumberMarks NumberMultiplier NumberPadding NumberPoint NumberQ NumberSeparator NumberSigns NumberString Numerator NumericFunction NumericQ NuttallWindow NValues NyquistGridLines NyquistPlot O ObservabilityGramian ObservabilityMatrix ObservableDecomposition ObservableModelQ OddQ Off Offset OLEData On ONanGroupON OneIdentity Opacity Open OpenAppend Opener OpenerBox OpenerBoxOptions OpenerView OpenFunctionInspectorPacket Opening OpenRead OpenSpecialOptions OpenTemporary OpenWrite Operate OperatingSystem OptimumFlowData Optional OptionInspectorSettings OptionQ Options OptionsPacket OptionsPattern OptionValue OptionValueBox OptionValueBoxOptions Or Orange Order OrderDistribution OrderedQ Ordering Orderless OrnsteinUhlenbeckProcess Orthogonalize Out Outer OutputAutoOverwrite OutputControllabilityMatrix OutputControllableModelQ OutputForm OutputFormData OutputGrouping OutputMathEditExpression OutputNamePacket OutputResponse OutputSizeLimit OutputStream Over OverBar OverDot Overflow OverHat Overlaps Overlay OverlayBox OverlayBoxOptions Overscript OverscriptBox OverscriptBoxOptions OverTilde OverVector OwenT OwnValues PackingMethod PaddedForm Padding PadeApproximant PadLeft PadRight PageBreakAbove PageBreakBelow PageBreakWithin PageFooterLines PageFooters PageHeaderLines PageHeaders PageHeight PageRankCentrality PageWidth PairedBarChart PairedHistogram PairedSmoothHistogram PairedTTest PairedZTest PaletteNotebook PalettePath Pane PaneBox PaneBoxOptions Panel PanelBox PanelBoxOptions Paneled PaneSelector PaneSelectorBox PaneSelectorBoxOptions PaperWidth ParabolicCylinderD ParagraphIndent ParagraphSpacing ParallelArray ParallelCombine ParallelDo ParallelEvaluate Parallelization Parallelize ParallelMap ParallelNeeds ParallelProduct ParallelSubmit ParallelSum ParallelTable ParallelTry Parameter ParameterEstimator ParameterMixtureDistribution ParameterVariables ParametricFunction ParametricNDSolve ParametricNDSolveValue ParametricPlot ParametricPlot3D ParentConnect ParentDirectory ParentForm Parenthesize ParentList ParetoDistribution Part PartialCorrelationFunction PartialD ParticleData Partition PartitionsP PartitionsQ ParzenWindow PascalDistribution PassEventsDown PassEventsUp Paste PasteBoxFormInlineCells PasteButton Path PathGraph PathGraphQ Pattern PatternSequence PatternTest PauliMatrix PaulWavelet Pause PausedTime PDF PearsonChiSquareTest PearsonCorrelationTest PearsonDistribution PerformanceGoal PeriodicInterpolation Periodogram PeriodogramArray PermutationCycles PermutationCyclesQ PermutationGroup PermutationLength PermutationList PermutationListQ PermutationMax PermutationMin PermutationOrder PermutationPower PermutationProduct PermutationReplace Permutations PermutationSupport Permute PeronaMalikFilter Perpendicular PERTDistribution PetersenGraph PhaseMargins Pi Pick PIDData PIDDerivativeFilter PIDFeedforward PIDTune Piecewise PiecewiseExpand PieChart PieChart3D PillaiTrace PillaiTraceTest Pink Pivoting PixelConstrained PixelValue PixelValuePositions Placed Placeholder PlaceholderReplace Plain PlanarGraphQ Play PlayRange Plot Plot3D Plot3Matrix PlotDivision PlotJoined PlotLabel PlotLayout PlotLegends PlotMarkers PlotPoints PlotRange PlotRangeClipping PlotRangePadding PlotRegion PlotStyle Plus PlusMinus Pochhammer PodStates PodWidth Point Point3DBox PointBox PointFigureChart PointForm PointLegend PointSize PoissonConsulDistribution PoissonDistribution PoissonProcess PoissonWindow PolarAxes PolarAxesOrigin PolarGridLines PolarPlot PolarTicks PoleZeroMarkers PolyaAeppliDistribution PolyGamma Polygon Polygon3DBox Polygon3DBoxOptions PolygonBox PolygonBoxOptions PolygonHoleScale PolygonIntersections PolygonScale PolyhedronData PolyLog PolynomialExtendedGCD PolynomialForm PolynomialGCD PolynomialLCM PolynomialMod PolynomialQ PolynomialQuotient PolynomialQuotientRemainder PolynomialReduce PolynomialRemainder Polynomials PopupMenu PopupMenuBox PopupMenuBoxOptions PopupView PopupWindow Position Positive PositiveDefiniteMatrixQ PossibleZeroQ Postfix PostScript Power PowerDistribution PowerExpand PowerMod PowerModList PowerSpectralDensity PowersRepresentations PowerSymmetricPolynomial Precedence PrecedenceForm Precedes PrecedesEqual PrecedesSlantEqual PrecedesTilde Precision PrecisionGoal PreDecrement PredictionRoot PreemptProtect PreferencesPath Prefix PreIncrement Prepend PrependTo PreserveImageOptions Previous PriceGraphDistribution PrimaryPlaceholder Prime PrimeNu PrimeOmega PrimePi PrimePowerQ PrimeQ Primes PrimeZetaP PrimitiveRoot PrincipalComponents PrincipalValue Print PrintAction PrintForm PrintingCopies PrintingOptions PrintingPageRange PrintingStartingPageNumber PrintingStyleEnvironment PrintPrecision PrintTemporary Prism PrismBox PrismBoxOptions PrivateCellOptions PrivateEvaluationOptions PrivateFontOptions PrivateFrontEndOptions PrivateNotebookOptions PrivatePaths Probability ProbabilityDistribution ProbabilityPlot ProbabilityPr ProbabilityScalePlot ProbitModelFit ProcessEstimator ProcessParameterAssumptions ProcessParameterQ ProcessStateDomain ProcessTimeDomain Product ProductDistribution ProductLog ProgressIndicator ProgressIndicatorBox ProgressIndicatorBoxOptions Projection Prolog PromptForm Properties Property PropertyList PropertyValue Proportion Proportional Protect Protected ProteinData Pruning PseudoInverse Purple Put PutAppend Pyramid PyramidBox PyramidBoxOptions QBinomial QFactorial QGamma QHypergeometricPFQ QPochhammer QPolyGamma QRDecomposition QuadraticIrrationalQ Quantile QuantilePlot Quantity QuantityForm QuantityMagnitude QuantityQ QuantityUnit Quartics QuartileDeviation Quartiles QuartileSkewness QueueingNetworkProcess QueueingProcess QueueProperties Quiet Quit Quotient QuotientRemainder RadialityCentrality RadicalBox RadicalBoxOptions RadioButton RadioButtonBar RadioButtonBox RadioButtonBoxOptions Radon RamanujanTau RamanujanTauL RamanujanTauTheta RamanujanTauZ Random RandomChoice RandomComplex RandomFunction RandomGraph RandomImage RandomInteger RandomPermutation RandomPrime RandomReal RandomSample RandomSeed RandomVariate RandomWalkProcess Range RangeFilter RangeSpecification RankedMax RankedMin Raster Raster3D Raster3DBox Raster3DBoxOptions RasterArray RasterBox RasterBoxOptions Rasterize RasterSize Rational RationalFunctions Rationalize Rationals Ratios Raw RawArray RawBoxes RawData RawMedium RayleighDistribution Re Read ReadList ReadProtected Real RealBlockDiagonalForm RealDigits RealExponent Reals Reap Record RecordLists RecordSeparators Rectangle RectangleBox RectangleBoxOptions RectangleChart RectangleChart3D RecurrenceFilter RecurrenceTable RecurringDigitsForm Red Reduce RefBox ReferenceLineStyle ReferenceMarkers ReferenceMarkerStyle Refine ReflectionMatrix ReflectionTransform Refresh RefreshRate RegionBinarize RegionFunction RegionPlot RegionPlot3D RegularExpression Regularization Reinstall Release ReleaseHold ReliabilityDistribution ReliefImage ReliefPlot Remove RemoveAlphaChannel RemoveAsynchronousTask Removed RemoveInputStreamMethod RemoveOutputStreamMethod RemoveProperty RemoveScheduledTask RenameDirectory RenameFile RenderAll RenderingOptions RenewalProcess RenkoChart Repeated RepeatedNull RepeatedString Replace ReplaceAll ReplaceHeldPart ReplaceImageValue ReplaceList ReplacePart ReplacePixelValue ReplaceRepeated Resampling Rescale RescalingTransform ResetDirectory ResetMenusPacket ResetScheduledTask Residue Resolve Rest Resultant ResumePacket Return ReturnExpressionPacket ReturnInputFormPacket ReturnPacket ReturnTextPacket Reverse ReverseBiorthogonalSplineWavelet ReverseElement ReverseEquilibrium ReverseGraph ReverseUpEquilibrium RevolutionAxis RevolutionPlot3D RGBColor RiccatiSolve RiceDistribution RidgeFilter RiemannR RiemannSiegelTheta RiemannSiegelZ Riffle Right RightArrow RightArrowBar RightArrowLeftArrow RightCosetRepresentative RightDownTeeVector RightDownVector RightDownVectorBar RightTee RightTeeArrow RightTeeVector RightTriangle RightTriangleBar RightTriangleEqual RightUpDownVector RightUpTeeVector RightUpVector RightUpVectorBar RightVector RightVectorBar RiskAchievementImportance RiskReductionImportance RogersTanimotoDissimilarity Root RootApproximant RootIntervals RootLocusPlot RootMeanSquare RootOfUnityQ RootReduce Roots RootSum Rotate RotateLabel RotateLeft RotateRight RotationAction RotationBox RotationBoxOptions RotationMatrix RotationTransform Round RoundImplies RoundingRadius Row RowAlignments RowBackgrounds RowBox RowHeights RowLines RowMinHeight RowReduce RowsEqual RowSpacings RSolve RudvalisGroupRu Rule RuleCondition RuleDelayed RuleForm RulerUnits Run RunScheduledTask RunThrough RuntimeAttributes RuntimeOptions RussellRaoDissimilarity SameQ SameTest SampleDepth SampledSoundFunction SampledSoundList SampleRate SamplingPeriod SARIMAProcess SARMAProcess SatisfiabilityCount SatisfiabilityInstances SatisfiableQ Saturday Save Saveable SaveAutoDelete SaveDefinitions SawtoothWave Scale Scaled ScaleDivisions ScaledMousePosition ScaleOrigin ScalePadding ScaleRanges ScaleRangeStyle ScalingFunctions ScalingMatrix ScalingTransform Scan ScheduledTaskActiveQ ScheduledTaskData ScheduledTaskObject ScheduledTasks SchurDecomposition ScientificForm ScreenRectangle ScreenStyleEnvironment ScriptBaselineShifts ScriptLevel ScriptMinSize ScriptRules ScriptSizeMultipliers Scrollbars ScrollingOptions ScrollPosition Sec Sech SechDistribution SectionGrouping SectorChart SectorChart3D SectorOrigin SectorSpacing SeedRandom Select Selectable SelectComponents SelectedCells SelectedNotebook Selection SelectionAnimate SelectionCell SelectionCellCreateCell SelectionCellDefaultStyle SelectionCellParentStyle SelectionCreateCell SelectionDebuggerTag SelectionDuplicateCell SelectionEvaluate SelectionEvaluateCreateCell SelectionMove SelectionPlaceholder SelectionSetStyle SelectWithContents SelfLoops SelfLoopStyle SemialgebraicComponentInstances SendMail Sequence SequenceAlignment SequenceForm SequenceHold SequenceLimit Series SeriesCoefficient SeriesData SessionTime Set SetAccuracy SetAlphaChannel SetAttributes Setbacks SetBoxFormNamesPacket SetDelayed SetDirectory SetEnvironment SetEvaluationNotebook SetFileDate SetFileLoadingContext SetNotebookStatusLine SetOptions SetOptionsPacket SetPrecision SetProperty SetSelectedNotebook SetSharedFunction SetSharedVariable SetSpeechParametersPacket SetStreamPosition SetSystemOptions Setter SetterBar SetterBox SetterBoxOptions Setting SetValue Shading Shallow ShannonWavelet ShapiroWilkTest Share Sharpen ShearingMatrix ShearingTransform ShenCastanMatrix Short ShortDownArrow Shortest ShortestMatch ShortestPathFunction ShortLeftArrow ShortRightArrow ShortUpArrow Show ShowAutoStyles ShowCellBracket ShowCellLabel ShowCellTags ShowClosedCellArea ShowContents ShowControls ShowCursorTracker ShowGroupOpenCloseIcon ShowGroupOpener ShowInvisibleCharacters ShowPageBreaks ShowPredictiveInterface ShowSelection ShowShortBoxForm ShowSpecialCharacters ShowStringCharacters ShowSyntaxStyles ShrinkingDelay ShrinkWrapBoundingBox SiegelTheta SiegelTukeyTest Sign Signature SignedRankTest SignificanceLevel SignPadding SignTest SimilarityRules SimpleGraph SimpleGraphQ Simplify Sin Sinc SinghMaddalaDistribution SingleEvaluation SingleLetterItalics SingleLetterStyle SingularValueDecomposition SingularValueList SingularValuePlot SingularValues Sinh SinhIntegral SinIntegral SixJSymbol Skeleton SkeletonTransform SkellamDistribution Skewness SkewNormalDistribution Skip SliceDistribution Slider Slider2D Slider2DBox Slider2DBoxOptions SliderBox SliderBoxOptions SlideView Slot SlotSequence Small SmallCircle Smaller SmithDelayCompensator SmithWatermanSimilarity SmoothDensityHistogram SmoothHistogram SmoothHistogram3D SmoothKernelDistribution SocialMediaData Socket SokalSneathDissimilarity Solve SolveAlways SolveDelayed Sort SortBy Sound SoundAndGraphics SoundNote SoundVolume Sow Space SpaceForm Spacer Spacings Span SpanAdjustments SpanCharacterRounding SpanFromAbove SpanFromBoth SpanFromLeft SpanLineThickness SpanMaxSize SpanMinSize SpanningCharacters SpanSymmetric SparseArray SpatialGraphDistribution Speak SpeakTextPacket SpearmanRankTest SpearmanRho Spectrogram SpectrogramArray Specularity SpellingCorrection SpellingDictionaries SpellingDictionariesPath SpellingOptions SpellingSuggestionsPacket Sphere SphereBox SphericalBesselJ SphericalBesselY SphericalHankelH1 SphericalHankelH2 SphericalHarmonicY SphericalPlot3D SphericalRegion SpheroidalEigenvalue SpheroidalJoiningFactor SpheroidalPS SpheroidalPSPrime SpheroidalQS SpheroidalQSPrime SpheroidalRadialFactor SpheroidalS1 SpheroidalS1Prime SpheroidalS2 SpheroidalS2Prime Splice SplicedDistribution SplineClosed SplineDegree SplineKnots SplineWeights Split SplitBy SpokenString Sqrt SqrtBox SqrtBoxOptions Square SquaredEuclideanDistance SquareFreeQ SquareIntersection SquaresR SquareSubset SquareSubsetEqual SquareSuperset SquareSupersetEqual SquareUnion SquareWave StabilityMargins StabilityMarginsStyle StableDistribution Stack StackBegin StackComplete StackInhibit StandardDeviation StandardDeviationFilter StandardForm Standardize StandbyDistribution Star StarGraph StartAsynchronousTask StartingStepSize StartOfLine StartOfString StartScheduledTask StartupSound StateDimensions StateFeedbackGains StateOutputEstimator StateResponse StateSpaceModel StateSpaceRealization StateSpaceTransform StationaryDistribution StationaryWaveletPacketTransform StationaryWaveletTransform StatusArea StatusCentrality StepMonitor StieltjesGamma StirlingS1 StirlingS2 StopAsynchronousTask StopScheduledTask StrataVariables StratonovichProcess StreamColorFunction StreamColorFunctionScaling StreamDensityPlot StreamPlot StreamPoints StreamPosition Streams StreamScale StreamStyle String StringBreak StringByteCount StringCases StringCount StringDrop StringExpression StringForm StringFormat StringFreeQ StringInsert StringJoin StringLength StringMatchQ StringPosition StringQ StringReplace StringReplaceList StringReplacePart StringReverse StringRotateLeft StringRotateRight StringSkeleton StringSplit StringTake StringToStream StringTrim StripBoxes StripOnInput StripWrapperBoxes StrokeForm StructuralImportance StructuredArray StructuredSelection StruveH StruveL Stub StudentTDistribution Style StyleBox StyleBoxAutoDelete StyleBoxOptions StyleData StyleDefinitions StyleForm StyleKeyMapping StyleMenuListing StyleNameDialogSettings StyleNames StylePrint StyleSheetPath Subfactorial Subgraph SubMinus SubPlus SubresultantPolynomialRemainders SubresultantPolynomials Subresultants Subscript SubscriptBox SubscriptBoxOptions Subscripted Subset SubsetEqual Subsets SubStar Subsuperscript SubsuperscriptBox SubsuperscriptBoxOptions Subtract SubtractFrom SubValues Succeeds SucceedsEqual SucceedsSlantEqual SucceedsTilde SuchThat Sum SumConvergence Sunday SuperDagger SuperMinus SuperPlus Superscript SuperscriptBox SuperscriptBoxOptions Superset SupersetEqual SuperStar Surd SurdForm SurfaceColor SurfaceGraphics SurvivalDistribution SurvivalFunction SurvivalModel SurvivalModelFit SuspendPacket SuzukiDistribution SuzukiGroupSuz SwatchLegend Switch Symbol SymbolName SymletWavelet Symmetric SymmetricGroup SymmetricMatrixQ SymmetricPolynomial SymmetricReduction Symmetrize SymmetrizedArray SymmetrizedArrayRules SymmetrizedDependentComponents SymmetrizedIndependentComponents SymmetrizedReplacePart SynchronousInitialization SynchronousUpdating Syntax SyntaxForm SyntaxInformation SyntaxLength SyntaxPacket SyntaxQ SystemDialogInput SystemException SystemHelpPath SystemInformation SystemInformationData SystemOpen SystemOptions SystemsModelDelay SystemsModelDelayApproximate SystemsModelDelete SystemsModelDimensions SystemsModelExtract SystemsModelFeedbackConnect SystemsModelLabels SystemsModelOrder SystemsModelParallelConnect SystemsModelSeriesConnect SystemsModelStateFeedbackConnect SystemStub Tab TabFilling Table TableAlignments TableDepth TableDirections TableForm TableHeadings TableSpacing TableView TableViewBox TabSpacings TabView TabViewBox TabViewBoxOptions TagBox TagBoxNote TagBoxOptions TaggingRules TagSet TagSetDelayed TagStyle TagUnset Take TakeWhile Tally Tan Tanh TargetFunctions TargetUnits TautologyQ TelegraphProcess TemplateBox TemplateBoxOptions TemplateSlotSequence TemporalData Temporary TemporaryVariable TensorContract TensorDimensions TensorExpand TensorProduct TensorQ TensorRank TensorReduce TensorSymmetry TensorTranspose TensorWedge Tetrahedron TetrahedronBox TetrahedronBoxOptions TeXForm TeXSave Text Text3DBox Text3DBoxOptions TextAlignment TextBand TextBoundingBox TextBox TextCell TextClipboardType TextData TextForm TextJustification TextLine TextPacket TextParagraph TextRecognize TextRendering TextStyle Texture TextureCoordinateFunction TextureCoordinateScaling Therefore ThermometerGauge Thick Thickness Thin Thinning ThisLink ThompsonGroupTh Thread ThreeJSymbol Threshold Through Throw Thumbnail Thursday Ticks TicksStyle Tilde TildeEqual TildeFullEqual TildeTilde TimeConstrained TimeConstraint Times TimesBy TimeSeriesForecast TimeSeriesInvertibility TimeUsed TimeValue TimeZone Timing Tiny TitleGrouping TitsGroupT ToBoxes ToCharacterCode ToColor ToContinuousTimeModel ToDate ToDiscreteTimeModel ToeplitzMatrix ToExpression ToFileName Together Toggle ToggleFalse Toggler TogglerBar TogglerBox TogglerBoxOptions ToHeldExpression ToInvertibleTimeSeries TokenWords Tolerance ToLowerCase ToNumberField TooBig Tooltip TooltipBox TooltipBoxOptions TooltipDelay TooltipStyle Top TopHatTransform TopologicalSort ToRadicals ToRules ToString Total TotalHeight TotalVariationFilter TotalWidth TouchscreenAutoZoom TouchscreenControlPlacement ToUpperCase Tr Trace TraceAbove TraceAction TraceBackward TraceDepth TraceDialog TraceForward TraceInternal TraceLevel TraceOff TraceOn TraceOriginal TracePrint TraceScan TrackedSymbols TradingChart TraditionalForm TraditionalFunctionNotation TraditionalNotation TraditionalOrder TransferFunctionCancel TransferFunctionExpand TransferFunctionFactor TransferFunctionModel TransferFunctionPoles TransferFunctionTransform TransferFunctionZeros TransformationFunction TransformationFunctions TransformationMatrix TransformedDistribution TransformedField Translate TranslationTransform TransparentColor Transpose TreeForm TreeGraph TreeGraphQ TreePlot TrendStyle TriangleWave TriangularDistribution Trig TrigExpand TrigFactor TrigFactorList Trigger TrigReduce TrigToExp TrimmedMean True TrueQ TruncatedDistribution TsallisQExponentialDistribution TsallisQGaussianDistribution TTest Tube TubeBezierCurveBox TubeBezierCurveBoxOptions TubeBox TubeBSplineCurveBox TubeBSplineCurveBoxOptions Tuesday TukeyLambdaDistribution TukeyWindow Tuples TuranGraph TuringMachine Transparent UnateQ Uncompress Undefined UnderBar Underflow Underlined Underoverscript UnderoverscriptBox UnderoverscriptBoxOptions Underscript UnderscriptBox UnderscriptBoxOptions UndirectedEdge UndirectedGraph UndirectedGraphQ UndocumentedTestFEParserPacket UndocumentedTestGetSelectionPacket Unequal Unevaluated UniformDistribution UniformGraphDistribution UniformSumDistribution Uninstall Union UnionPlus Unique UnitBox UnitConvert UnitDimensions Unitize UnitRootTest UnitSimplify UnitStep UnitTriangle UnitVector Unprotect UnsameQ UnsavedVariables Unset UnsetShared UntrackedVariables Up UpArrow UpArrowBar UpArrowDownArrow Update UpdateDynamicObjects UpdateDynamicObjectsSynchronous UpdateInterval UpDownArrow UpEquilibrium UpperCaseQ UpperLeftArrow UpperRightArrow UpperTriangularize Upsample UpSet UpSetDelayed UpTee UpTeeArrow UpValues URL URLFetch URLFetchAsynchronous URLSave URLSaveAsynchronous UseGraphicsRange Using UsingFrontEnd V2Get ValidationLength Value ValueBox ValueBoxOptions ValueForm ValueQ ValuesData Variables Variance VarianceEquivalenceTest VarianceEstimatorFunction VarianceGammaDistribution VarianceTest VectorAngle VectorColorFunction VectorColorFunctionScaling VectorDensityPlot VectorGlyphData VectorPlot VectorPlot3D VectorPoints VectorQ Vectors VectorScale VectorStyle Vee Verbatim Verbose VerboseConvertToPostScriptPacket VerifyConvergence VerifySolutions VerifyTestAssumptions Version VersionNumber VertexAdd VertexCapacity VertexColors VertexComponent VertexConnectivity VertexCoordinateRules VertexCoordinates VertexCorrelationSimilarity VertexCosineSimilarity VertexCount VertexCoverQ VertexDataCoordinates VertexDegree VertexDelete VertexDiceSimilarity VertexEccentricity VertexInComponent VertexInDegree VertexIndex VertexJaccardSimilarity VertexLabeling VertexLabels VertexLabelStyle VertexList VertexNormals VertexOutComponent VertexOutDegree VertexQ VertexRenderingFunction VertexReplace VertexShape VertexShapeFunction VertexSize VertexStyle VertexTextureCoordinates VertexWeight Vertical VerticalBar VerticalForm VerticalGauge VerticalSeparator VerticalSlider VerticalTilde ViewAngle ViewCenter ViewMatrix ViewPoint ViewPointSelectorSettings ViewPort ViewRange ViewVector ViewVertical VirtualGroupData Visible VisibleCell VoigtDistribution VonMisesDistribution WaitAll WaitAsynchronousTask WaitNext WaitUntil WakebyDistribution WalleniusHypergeometricDistribution WaringYuleDistribution WatershedComponents WatsonUSquareTest WattsStrogatzGraphDistribution WaveletBestBasis WaveletFilterCoefficients WaveletImagePlot WaveletListPlot WaveletMapIndexed WaveletMatrixPlot WaveletPhi WaveletPsi WaveletScale WaveletScalogram WaveletThreshold WeaklyConnectedComponents WeaklyConnectedGraphQ WeakStationarity WeatherData WeberE Wedge Wednesday WeibullDistribution WeierstrassHalfPeriods WeierstrassInvariants WeierstrassP WeierstrassPPrime WeierstrassSigma WeierstrassZeta WeightedAdjacencyGraph WeightedAdjacencyMatrix WeightedData WeightedGraphQ Weights WelchWindow WheelGraph WhenEvent Which While White Whitespace WhitespaceCharacter WhittakerM WhittakerW WienerFilter WienerProcess WignerD WignerSemicircleDistribution WilksW WilksWTest WindowClickSelect WindowElements WindowFloating WindowFrame WindowFrameElements WindowMargins WindowMovable WindowOpacity WindowSelected WindowSize WindowStatusArea WindowTitle WindowToolbars WindowWidth With WolframAlpha WolframAlphaDate WolframAlphaQuantity WolframAlphaResult Word WordBoundary WordCharacter WordData WordSearch WordSeparators WorkingPrecision Write WriteString Wronskian XMLElement XMLObject Xnor Xor Yellow YuleDissimilarity ZernikeR ZeroSymmetric ZeroTest ZeroWidthTimes Zeta ZetaZero ZipfDistribution ZTest ZTransform $Aborted $ActivationGroupID $ActivationKey $ActivationUserRegistered $AddOnsDirectory $AssertFunction $Assumptions $AsynchronousTask $BaseDirectory $BatchInput $BatchOutput $BoxForms $ByteOrdering $Canceled $CharacterEncoding $CharacterEncodings $CommandLine $CompilationTarget $ConditionHold $ConfiguredKernels $Context $ContextPath $ControlActiveSetting $CreationDate $CurrentLink $DateStringFormat $DefaultFont $DefaultFrontEnd $DefaultImagingDevice $DefaultPath $Display $DisplayFunction $DistributedContexts $DynamicEvaluation $Echo $Epilog $ExportFormats $Failed $FinancialDataSource $FormatType $FrontEnd $FrontEndSession $GeoLocation $HistoryLength $HomeDirectory $HTTPCookies $IgnoreEOF $ImagingDevices $ImportFormats $InitialDirectory $Input $InputFileName $InputStreamMethods $Inspector $InstallationDate $InstallationDirectory $InterfaceEnvironment $IterationLimit $KernelCount $KernelID $Language $LaunchDirectory $LibraryPath $LicenseExpirationDate $LicenseID $LicenseProcesses $LicenseServer $LicenseSubprocesses $LicenseType $Line $Linked $LinkSupported $LoadedFiles $MachineAddresses $MachineDomain $MachineDomains $MachineEpsilon $MachineID $MachineName $MachinePrecision $MachineType $MaxExtraPrecision $MaxLicenseProcesses $MaxLicenseSubprocesses $MaxMachineNumber $MaxNumber $MaxPiecewiseCases $MaxPrecision $MaxRootDegree $MessageGroups $MessageList $MessagePrePrint $Messages $MinMachineNumber $MinNumber $MinorReleaseNumber $MinPrecision $ModuleNumber $NetworkLicense $NewMessage $NewSymbol $Notebooks $NumberMarks $Off $OperatingSystem $Output $OutputForms $OutputSizeLimit $OutputStreamMethods $Packages $ParentLink $ParentProcessID $PasswordFile $PatchLevelID $Path $PathnameSeparator $PerformanceGoal $PipeSupported $Post $Pre $PreferencesDirectory $PrePrint $PreRead $PrintForms $PrintLiteral $ProcessID $ProcessorCount $ProcessorType $ProductInformation $ProgramName $RandomState $RecursionLimit $ReleaseNumber $RootDirectory $ScheduledTask $ScriptCommandLine $SessionID $SetParentLink $SharedFunctions $SharedVariables $SoundDisplay $SoundDisplayFunction $SuppressInputFormHeads $SynchronousEvaluation $SyntaxHandler $System $SystemCharacterEncoding $SystemID $SystemWordLength $TemporaryDirectory $TemporaryPrefix $TextStyle $TimedOut $TimeUnit $TimeZone $TopDirectory $TraceOff $TraceOn $TracePattern $TracePostAction $TracePreAction $Urgent $UserAddOnsDirectory $UserBaseDirectory $UserDocumentsDirectory $UserName $Version $VersionNumber", -contains:[{className:"comment",begin:/\(\*/,end:/\*\)/},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,{className:"list",begin:/\{/,end:/\}/,illegal:/:/}]}}),a.registerLanguage("matlab",function(a){var b=[a.C_NUMBER_MODE,{className:"string",begin:"'",end:"'",contains:[a.BACKSLASH_ESCAPE,{begin:"''"}]}],c={relevance:0,contains:[{className:"operator",begin:/'['\.]*/}]};return{keywords:{keyword:"break case catch classdef continue else elseif end enumerated events for function global if methods otherwise parfor persistent properties return spmd switch try while",built_in:"sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson"},illegal:'(//|"|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[a.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"},{className:"params",begin:"\\[",end:"\\]"}]},{begin:/[a-zA-Z_][a-zA-Z_0-9]*'['\.]*/,returnBegin:!0,relevance:0,contains:[{begin:/[a-zA-Z_][a-zA-Z_0-9]*/,relevance:0},c.contains[0]]},{className:"matrix",begin:"\\[",end:"\\]",contains:b,relevance:0,starts:c},{className:"cell",begin:"\\{",end:/}/,contains:b,relevance:0,starts:c},{begin:/\)/,relevance:0,starts:c},a.COMMENT("^\\s*\\%\\{\\s*$","^\\s*\\%\\}\\s*$"),a.COMMENT("\\%","$")].concat(b)}}),a.registerLanguage("mel",function(a){return{keywords:"int float string vector matrix if else switch case default while do for in break continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor animDisplay animView annotate appendStringArray applicationName applyAttrPreset applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem componentEditor compositingInterop computePolysetVolume condition cone confirmDialog connectAttr connectControl connectDynamic connectJoint connectionInfo constrain constrainValue constructionHistory container containsMultibyte contextInfo control convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected displayColor displayCull displayLevelOfDetail displayPref displayRGBColor displaySmoothness displayStats displayString displaySurface distanceDimContext distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor editorTemplate effector emit emitter enableDevice encodeString endString endsWith env equivalent equivalentTol erf error eval evalDeferred evalEcho event exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo filetest filletCurve filter filterCurve filterExpand filterStudioImport findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss geometryConstraint getApplicationVersionAsFloat getAttr getClassification getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation listNodeTypes listPanelCategories listRelatives listSets listTransforms listUnselected listerEditor loadFluid loadNewShelf loadPlugin loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration panelHistory paramDimContext paramDimension paramLocator parent parentConstraint particle particleExists particleInstancer particleRenderInfo partition pasteKey pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE registerPluginResource rehash reloadImage removeJoint removeMultiInstance removePanelCategory rename renameAttr renameSelectionList renameUI render renderGlobalsNode renderInfo renderLayerButton renderLayerParent renderLayerPostProcess renderLayerUnparent renderManip renderPartition renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor renderWindowSelectContext renderer reorder reorderDeformers requires reroot resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType selectedNodes selectionConnection separator setAttr setAttrEnumResource setAttrMapping setAttrNiceNameResource setConstraintRestPosition setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField shortNameOf showHelp showHidden showManipCtx showSelectionInTitle showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString stringToStringArray strip stripPrefixFromName stroke subdAutoProjection subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList textToShelf textureDisplacePlane textureHairColor texturePlacementContext textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper trace track trackCtx transferAttributes transformCompare transformLimits translator trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform",illegal:""},{begin:"<=",relevance:0},{begin:"=>",relevance:0},{begin:"/\\\\"},{begin:"\\\\/"}]},k={className:"built_in",variants:[{begin:":-\\|-->"},{begin:"=",relevance:0}]};return{aliases:["m","moo"],keywords:b,contains:[j,k,d,e,f,a.NUMBER_MODE,g,h,{begin:/:-/}]}}),a.registerLanguage("mizar",function(a){return{keywords:"environ vocabularies notations constructors definitions registrations theorems schemes requirements begin end definition registration cluster existence pred func defpred deffunc theorem proof let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from be being by means equals implies iff redefine define now not or attr is mode suppose per cases set thesis contradiction scheme reserve struct correctness compatibility coherence symmetry assymetry reflexivity irreflexivity connectedness uniqueness commutativity idempotence involutiveness projectivity",contains:[a.COMMENT("::","$")]}}),a.registerLanguage("perl",function(a){var b="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",c={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:b},d={begin:"->{",end:"}"},e={className:"variable",variants:[{begin:/\$\d/},{begin:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{begin:/[\$%@][^\s\w{]/,relevance:0}]},f=[a.BACKSLASH_ESCAPE,c,e],g=[e,a.HASH_COMMENT_MODE,a.COMMENT("^\\=\\w","\\=cut",{endsWithParent:!0}),d,{className:"string",contains:f,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*\\<",end:"\\>",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[a.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[a.BACKSLASH_ESCAPE]},{begin:"{\\w+}",contains:[],relevance:0},{begin:"-?\\w+\\s*\\=\\>",contains:[],relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+a.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[a.HASH_COMMENT_MODE,{className:"regexp",begin:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",relevance:10},{className:"regexp",begin:"(m|qr)?/",end:"/[a-z]*",contains:[a.BACKSLASH_ESCAPE],relevance:0}]},{className:"sub",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",relevance:5},{className:"operator",begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return c.contains=g,d.contains=g,{aliases:["pl"],keywords:b,contains:g}}),a.registerLanguage("mojolicious",function(a){return{subLanguage:"xml",contains:[{className:"preprocessor",begin:"^__(END|DATA)__$"},{begin:"^\\s*%{1,2}={0,2}",end:"$",subLanguage:"perl"},{begin:"<%{1,2}={0,2}",end:"={0,1}%>",subLanguage:"perl",excludeBegin:!0,excludeEnd:!0}]}}),a.registerLanguage("monkey",function(a){var b={className:"number",relevance:0,variants:[{begin:"[$][a-fA-F0-9]+"},a.NUMBER_MODE]};return{case_insensitive:!0,keywords:{keyword:"public private property continue exit extern new try catch eachin not abstract final select case default const local global field end if then else elseif endif while wend repeat until forever for to step next return module inline throw",built_in:"DebugLog DebugStop Error Print ACos ACosr ASin ASinr ATan ATan2 ATan2r ATanr Abs Abs Ceil Clamp Clamp Cos Cosr Exp Floor Log Max Max Min Min Pow Sgn Sgn Sin Sinr Sqrt Tan Tanr Seed PI HALFPI TWOPI",literal:"true false null and or shl shr mod"},illegal:/\/\*/,contains:[a.COMMENT("#rem","#end"),a.COMMENT("'","$",{relevance:0}),{className:"function",beginKeywords:"function method",end:"[(=:]|$",illegal:/\n/,contains:[a.UNDERSCORE_TITLE_MODE]},{className:"class",beginKeywords:"class interface",end:"$",contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]},{className:"variable",begin:"\\b(self|super)\\b"},{className:"preprocessor",beginKeywords:"import",end:"$"},{className:"preprocessor",begin:"\\s*#",end:"$",keywords:"if else elseif endif end then"},{className:"pi",begin:"^\\s*strict\\b"},{beginKeywords:"alias",end:"=",contains:[a.UNDERSCORE_TITLE_MODE]},a.QUOTE_STRING_MODE,b]}}),a.registerLanguage("nginx",function(a){var b={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{/,end:/}/},{begin:"[\\$\\@]"+a.UNDERSCORE_IDENT_RE}]},c={endsWithParent:!0,lexemes:"[a-z/_]+",keywords:{built_in:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},relevance:0,illegal:"=>",contains:[a.HASH_COMMENT_MODE,{className:"string",contains:[a.BACKSLASH_ESCAPE,b],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{className:"url",begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[b]},{className:"regexp",contains:[a.BACKSLASH_ESCAPE,b],variants:[{begin:"\\s\\^",end:"\\s|{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]*\\b",relevance:0},b]};return{aliases:["nginxconf"],contains:[a.HASH_COMMENT_MODE,{begin:a.UNDERSCORE_IDENT_RE+"\\s",end:";|{",returnBegin:!0,contains:[{className:"title",begin:a.UNDERSCORE_IDENT_RE,starts:c}],relevance:0}],illegal:"[^\\s\\}]"}}),a.registerLanguage("nimrod",function(a){return{aliases:["nim"],keywords:{keyword:"addr and as asm bind block break|0 case|0 cast const|0 continue|0 converter discard distinct|10 div do elif else|0 end|0 enum|0 except export finally for from generic if|0 import|0 in include|0 interface is isnot|10 iterator|10 let|0 macro method|10 mixin mod nil not notin|10 object|0 of or out proc|10 ptr raise ref|10 return shl shr static template try|0 tuple type|0 using|0 var|0 when while|0 with without xor yield",literal:"shared guarded stdin stdout stderr result|10 true false"},contains:[{className:"decorator",begin:/{\./,end:/\.}/,relevance:10},{className:"string",begin:/[a-zA-Z]\w*"/,end:/"/,contains:[{begin:/""/}]},{className:"string",begin:/([a-zA-Z]\w*)?"""/,end:/"""/},a.QUOTE_STRING_MODE,{className:"type",begin:/\b[A-Z]\w+\b/,relevance:0},{className:"type",begin:/\b(int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|float|float32|float64|bool|char|string|cstring|pointer|expr|stmt|void|auto|any|range|array|openarray|varargs|seq|set|clong|culong|cchar|cschar|cshort|cint|csize|clonglong|cfloat|cdouble|clongdouble|cuchar|cushort|cuint|culonglong|cstringarray|semistatic)\b/},{className:"number",begin:/\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/,relevance:0},{className:"number",begin:/\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/,relevance:0},{className:"number",begin:/\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/,relevance:0},{className:"number",begin:/\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/,relevance:0},a.HASH_COMMENT_MODE]}}),a.registerLanguage("nix",function(a){var b={keyword:"rec with let in inherit assert if else then",constant:"true false or and null",built_in:"import abort baseNameOf dirOf isNull builtins map removeAttrs throw toString derivation"},c={className:"subst",begin:/\$\{/,end:/}/,keywords:b},d={className:"variable",begin:/[a-zA-Z0-9-_]+(\s*=)/,relevance:0},e={className:"string",begin:"''",end:"''",contains:[c]},f={className:"string",begin:'"',end:'"',contains:[c]},g=[a.NUMBER_MODE,a.HASH_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,e,f,d];return c.contains=g,{aliases:["nixos"],keywords:b,contains:g}}),a.registerLanguage("nsis",function(a){var b={className:"symbol",begin:"\\$(ADMINTOOLS|APPDATA|CDBURN_AREA|CMDLINE|COMMONFILES32|COMMONFILES64|COMMONFILES|COOKIES|DESKTOP|DOCUMENTS|EXEDIR|EXEFILE|EXEPATH|FAVORITES|FONTS|HISTORY|HWNDPARENT|INSTDIR|INTERNET_CACHE|LANGUAGE|LOCALAPPDATA|MUSIC|NETHOOD|OUTDIR|PICTURES|PLUGINSDIR|PRINTHOOD|PROFILE|PROGRAMFILES32|PROGRAMFILES64|PROGRAMFILES|QUICKLAUNCH|RECENT|RESOURCES_LOCALIZED|RESOURCES|SENDTO|SMPROGRAMS|SMSTARTUP|STARTMENU|SYSDIR|TEMP|TEMPLATES|VIDEOS|WINDIR)"},c={className:"constant",begin:"\\$+{[a-zA-Z0-9_]+}"},d={className:"variable",begin:"\\$+[a-zA-Z0-9_]+",illegal:"\\(\\){}"},e={className:"constant",begin:"\\$+\\([a-zA-Z0-9_]+\\)"},f={className:"params",begin:"(ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)"},g={className:"constant",begin:"\\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversionsystem|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|makensis|packhdr|searchparse|searchreplace|tempfile|undef|verbose|warning)"};return{case_insensitive:!1,keywords:{keyword:"Abort AddBrandingImage AddSize AllowRootDirInstall AllowSkipFiles AutoCloseWindow BGFont BGGradient BrandingText BringToFront Call CallInstDLL Caption ChangeUI CheckBitmap ClearErrors CompletedText ComponentText CopyFiles CRCCheck CreateDirectory CreateFont CreateShortCut Delete DeleteINISec DeleteINIStr DeleteRegKey DeleteRegValue DetailPrint DetailsButtonText DirText DirVar DirVerify EnableWindow EnumRegKey EnumRegValue Exch Exec ExecShell ExecWait ExpandEnvStrings File FileBufSize FileClose FileErrorText FileOpen FileRead FileReadByte FileReadUTF16LE FileReadWord FileSeek FileWrite FileWriteByte FileWriteUTF16LE FileWriteWord FindClose FindFirst FindNext FindWindow FlushINI FunctionEnd GetCurInstType GetCurrentAddress GetDlgItem GetDLLVersion GetDLLVersionLocal GetErrorLevel GetFileTime GetFileTimeLocal GetFullPathName GetFunctionAddress GetInstDirError GetLabelAddress GetTempFileName Goto HideWindow Icon IfAbort IfErrors IfFileExists IfRebootFlag IfSilent InitPluginsDir InstallButtonText InstallColors InstallDir InstallDirRegKey InstProgressFlags InstType InstTypeGetText InstTypeSetText IntCmp IntCmpU IntFmt IntOp IsWindow LangString LicenseBkColor LicenseData LicenseForceSelection LicenseLangString LicenseText LoadLanguageFile LockWindow LogSet LogText ManifestDPIAware ManifestSupportedOS MessageBox MiscButtonText Name Nop OutFile Page PageCallbacks PageExEnd Pop Push Quit ReadEnvStr ReadINIStr ReadRegDWORD ReadRegStr Reboot RegDLL Rename RequestExecutionLevel ReserveFile Return RMDir SearchPath SectionEnd SectionGetFlags SectionGetInstTypes SectionGetSize SectionGetText SectionGroupEnd SectionIn SectionSetFlags SectionSetInstTypes SectionSetSize SectionSetText SendMessage SetAutoClose SetBrandingImage SetCompress SetCompressor SetCompressorDictSize SetCtlColors SetCurInstType SetDatablockOptimize SetDateSave SetDetailsPrint SetDetailsView SetErrorLevel SetErrors SetFileAttributes SetFont SetOutPath SetOverwrite SetPluginUnload SetRebootFlag SetRegView SetShellVarContext SetSilent ShowInstDetails ShowUninstDetails ShowWindow SilentInstall SilentUnInstall Sleep SpaceTexts StrCmp StrCmpS StrCpy StrLen SubCaption SubSectionEnd Unicode UninstallButtonText UninstallCaption UninstallIcon UninstallSubCaption UninstallText UninstPage UnRegDLL Var VIAddVersionKey VIFileVersion VIProductVersion WindowIcon WriteINIStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegStr WriteUninstaller XPStyle", -literal:"admin all auto both colored current false force hide highest lastused leave listonly none normal notset off on open print show silent silentlog smooth textonly true user "},contains:[a.HASH_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"',end:'"',illegal:"\\n",contains:[{className:"symbol",begin:"\\$(\\\\(n|r|t)|\\$)"},b,c,d,e]},a.COMMENT(";","$",{relevance:0}),{className:"function",beginKeywords:"Function PageEx Section SectionGroup SubSection",end:"$"},g,c,d,e,f,a.NUMBER_MODE,{className:"literal",begin:a.IDENT_RE+"::"+a.IDENT_RE}]}}),a.registerLanguage("objectivec",function(a){var b={className:"built_in",begin:"(AV|CA|CF|CG|CI|MK|MP|NS|UI)\\w+"},c={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},d=/[a-zA-Z@][a-zA-Z0-9_]*/,e="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],keywords:c,lexemes:d,illegal:""}]}]},{className:"class",begin:"("+e.split(" ").join("|")+")\\b",end:"({|$)",excludeEnd:!0,keywords:e,lexemes:d,contains:[a.UNDERSCORE_TITLE_MODE]},{className:"variable",begin:"\\."+a.UNDERSCORE_IDENT_RE,relevance:0}]}}),a.registerLanguage("ocaml",function(a){return{aliases:["ml"],keywords:{keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref",literal:"true false"},illegal:/\/\/|>>/,lexemes:"[a-z_]\\w*!?",contains:[{className:"literal",begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},a.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"tag",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},a.inherit(a.APOS_STRING_MODE,{className:"char",relevance:0}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}),a.registerLanguage("openscad",function(a){var b={className:"keyword",begin:"\\$(f[asn]|t|vp[rtd]|children)"},c={className:"literal",begin:"false|true|PI|undef"},d={className:"number",begin:"\\b\\d+(\\.\\d+)?(e-?\\d+)?",relevance:0},e=a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),f={className:"preprocessor",keywords:"include use",begin:"include|use <",end:">"},g={className:"params",begin:"\\(",end:"\\)",contains:["self",d,e,b,c]},h={className:"built_in",begin:"[*!#%]",relevance:0},i={className:"function",beginKeywords:"module function",end:"\\=|\\{",contains:[g,a.UNDERSCORE_TITLE_MODE]};return{aliases:["scad"],keywords:{keyword:"function module include use for intersection_for if else \\%",literal:"false true PI undef",built_in:"circle square polygon text sphere cube cylinder polyhedron translate rotate scale resize mirror multmatrix color offset hull minkowski union difference intersection abs sign sin cos tan acos asin atan atan2 floor round ceil ln log pow sqrt exp rands min max concat lookup str chr search version version_num norm cross parent_module echo import import_dxf dxf_linear_extrude linear_extrude rotate_extrude surface projection render children dxf_cross dxf_dim let assign"},contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,d,f,e,b,h,i]}}),a.registerLanguage("oxygene",function(a){var b="abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained",c=a.COMMENT("{","}",{relevance:0}),d=a.COMMENT("\\(\\*","\\*\\)",{relevance:10}),e={className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},f={className:"string",begin:"(#\\d+)+"},g={className:"function",beginKeywords:"function constructor destructor procedure method",end:"[:;]",keywords:"function constructor|10 destructor|10 procedure|10 method|10",contains:[a.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",keywords:b,contains:[e,f]},c,d]};return{case_insensitive:!0,keywords:b,illegal:'("|\\$[G-Zg-z]|\\/\\*||->)',contains:[c,d,a.C_LINE_COMMENT_MODE,e,f,a.NUMBER_MODE,g,{className:"class",begin:"=\\bclass\\b",end:"end;",keywords:b,contains:[e,f,c,d,a.C_LINE_COMMENT_MODE,g]}]}}),a.registerLanguage("parser3",function(a){var b=a.COMMENT("{","}",{contains:["self"]});return{subLanguage:"xml",relevance:0,contains:[a.COMMENT("^#","$"),a.COMMENT("\\^rem{","}",{relevance:10,contains:[b]}),{className:"preprocessor",begin:"^@(?:BASE|USE|CLASS|OPTIONS)$",relevance:10},{className:"title",begin:"@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$"},{className:"variable",begin:"\\$\\{?[\\w\\-\\.\\:]+\\}?"},{className:"keyword",begin:"\\^[\\w\\-\\.\\:]+"},{className:"number",begin:"\\^#[0-9a-fA-F]+"},a.C_NUMBER_MODE]}}),a.registerLanguage("pf",function(a){var b={className:"variable",begin:/\$[\w\d#@][\w\d_]*/},c={className:"variable",begin://};return{aliases:["pf.conf"],lexemes:/[a-z0-9_<>-]+/,keywords:{built_in:"block match pass load anchor|5 antispoof|10 set table",keyword:"in out log quick on rdomain inet inet6 proto from port os to routeallow-opts divert-packet divert-reply divert-to flags group icmp-typeicmp6-type label once probability recieved-on rtable prio queuetos tag tagged user keep fragment for os dropaf-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robinsource-hash static-portdup-to reply-to route-toparent bandwidth default min max qlimitblock-policy debug fingerprints hostid limit loginterface optimizationreassemble ruleset-optimization basic none profile skip state-defaultsstate-policy timeoutconst counters persistno modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppysource-track global rule max-src-nodes max-src-states max-src-connmax-src-conn-rate overload flushscrub|5 max-mss min-ttl no-df|10 random-id",literal:"all any no-route self urpf-failed egress|5 unknown"},contains:[a.HASH_COMMENT_MODE,a.NUMBER_MODE,a.QUOTE_STRING_MODE,b,c]}}),a.registerLanguage("php",function(a){var b={className:"variable",begin:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},c={className:"preprocessor",begin:/<\?(php)?|\?>/},d={className:"string",contains:[a.BACKSLASH_ESCAPE,c],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},a.inherit(a.APOS_STRING_MODE,{illegal:null}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null})]},e={variants:[a.BINARY_NUMBER_MODE,a.C_NUMBER_MODE]};return{aliases:["php3","php4","php5","php6"],case_insensitive:!0,keywords:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",contains:[a.C_LINE_COMMENT_MODE,a.HASH_COMMENT_MODE,a.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"},c]}),a.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler",lexemes:a.UNDERSCORE_IDENT_RE}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;?$/,contains:[a.BACKSLASH_ESCAPE,{className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]}]},c,b,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function",end:/[;{]/,excludeEnd:!0,illegal:"\\$|\\[|%",contains:[a.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:["self",b,a.C_BLOCK_COMMENT_MODE,d,e]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[a.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[a.UNDERSCORE_TITLE_MODE]},{begin:"=>"},d,e]}}),a.registerLanguage("powershell",function(a){var b={begin:"`[\\s\\S]",relevance:0},c={className:"variable",variants:[{begin:/\$[\w\d][\w\d_:]*/}]},d={className:"string",begin:/"/,end:/"/,contains:[b,c,{className:"variable",begin:/\$[A-z]/,end:/[^A-z]/}]},e={className:"string",begin:/'/,end:/'/};return{aliases:["ps"],lexemes:/-?[A-z\.\-]+/,case_insensitive:!0,keywords:{keyword:"if else foreach return function do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch",literal:"$null $true $false",built_in:"Add-Content Add-History Add-Member Add-PSSnapin Clear-Content Clear-Item Clear-Item Property Clear-Variable Compare-Object ConvertFrom-SecureString Convert-Path ConvertTo-Html ConvertTo-SecureString Copy-Item Copy-ItemProperty Export-Alias Export-Clixml Export-Console Export-Csv ForEach-Object Format-Custom Format-List Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command Get-Content Get-Credential Get-Culture Get-Date Get-EventLog Get-ExecutionPolicy Get-Help Get-History Get-Host Get-Item Get-ItemProperty Get-Location Get-Member Get-PfxCertificate Get-Process Get-PSDrive Get-PSProvider Get-PSSnapin Get-Service Get-TraceSource Get-UICulture Get-Unique Get-Variable Get-WmiObject Group-Object Import-Alias Import-Clixml Import-Csv Invoke-Expression Invoke-History Invoke-Item Join-Path Measure-Command Measure-Object Move-Item Move-ItemProperty New-Alias New-Item New-ItemProperty New-Object New-PSDrive New-Service New-TimeSpan New-Variable Out-Default Out-File Out-Host Out-Null Out-Printer Out-String Pop-Location Push-Location Read-Host Remove-Item Remove-ItemProperty Remove-PSDrive Remove-PSSnapin Remove-Variable Rename-Item Rename-ItemProperty Resolve-Path Restart-Service Resume-Service Select-Object Select-String Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-Location Set-PSDebug Set-Service Set-TraceSource Set-Variable Sort-Object Split-Path Start-Service Start-Sleep Start-Transcript Stop-Process Stop-Service Stop-Transcript Suspend-Service Tee-Object Test-Path Trace-Command Update-FormatData Update-TypeData Where-Object Write-Debug Write-Error Write-Host Write-Output Write-Progress Write-Verbose Write-Warning",operator:"-ne -eq -lt -gt -ge -le -not -like -notlike -match -notmatch -contains -notcontains -in -notin -replace"},contains:[a.HASH_COMMENT_MODE,a.NUMBER_MODE,d,e,c]}}),a.registerLanguage("processing",function(a){return{keywords:{keyword:"BufferedReader PVector PFont PImage PGraphics HashMap boolean byte char color double float int long String Array FloatDict FloatList IntDict IntList JSONArray JSONObject Object StringDict StringList Table TableRow XML false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",constant:"P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI",variable:"displayHeight displayWidth mouseY mouseX mousePressed pmouseX pmouseY key keyCode pixels focused frameCount frameRate height width",title:"setup draw",built_in:"size createGraphics beginDraw createShape loadShape PShape arc ellipse line point quad rect triangle bezier bezierDetail bezierPoint bezierTangent curve curveDetail curvePoint curveTangent curveTightness shape shapeMode beginContour beginShape bezierVertex curveVertex endContour endShape quadraticVertex vertex ellipseMode noSmooth rectMode smooth strokeCap strokeJoin strokeWeight mouseClicked mouseDragged mouseMoved mousePressed mouseReleased mouseWheel keyPressed keyPressedkeyReleased keyTyped print println save saveFrame day hour millis minute month second year background clear colorMode fill noFill noStroke stroke alpha blue brightness color green hue lerpColor red saturation modelX modelY modelZ screenX screenY screenZ ambient emissive shininess specular add createImage beginCamera camera endCamera frustum ortho perspective printCamera printProjection cursor frameRate noCursor exit loop noLoop popStyle pushStyle redraw binary boolean byte char float hex int str unbinary unhex join match matchAll nf nfc nfp nfs split splitTokens trim append arrayCopy concat expand reverse shorten sort splice subset box sphere sphereDetail createInput createReader loadBytes loadJSONArray loadJSONObject loadStrings loadTable loadXML open parseXML saveTable selectFolder selectInput beginRaw beginRecord createOutput createWriter endRaw endRecord PrintWritersaveBytes saveJSONArray saveJSONObject saveStream saveStrings saveXML selectOutput popMatrix printMatrix pushMatrix resetMatrix rotate rotateX rotateY rotateZ scale shearX shearY translate ambientLight directionalLight lightFalloff lights lightSpecular noLights normal pointLight spotLight image imageMode loadImage noTint requestImage tint texture textureMode textureWrap blend copy filter get loadPixels set updatePixels blendMode loadShader PShaderresetShader shader createFont loadFont text textFont textAlign textLeading textMode textSize textWidth textAscent textDescent abs ceil constrain dist exp floor lerp log mag map max min norm pow round sq sqrt acos asin atan atan2 cos degrees radians sin tan noise noiseDetail noiseSeed random randomGaussian randomSeed"},contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE]}}),a.registerLanguage("profile",function(a){return{contains:[a.C_NUMBER_MODE,{className:"built_in",begin:"{",end:"}$",excludeBegin:!0,excludeEnd:!0,contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE],relevance:0},{className:"filename",begin:"[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}",end:":",excludeEnd:!0},{className:"header",begin:"(ncalls|tottime|cumtime)",end:"$",keywords:"ncalls tottime|10 cumtime|10 filename",relevance:10},{className:"summary",begin:"function calls",end:"$",contains:[a.C_NUMBER_MODE],relevance:10},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{className:"function",begin:"\\(",end:"\\)$",contains:[a.UNDERSCORE_TITLE_MODE],relevance:0}]}}),a.registerLanguage("prolog",function(a){var b={className:"atom",begin:/[a-z][A-Za-z0-9_]*/,relevance:0},c={className:"name",variants:[{begin:/[A-Z][a-zA-Z0-9_]*/},{begin:/_[A-Za-z0-9_]*/}],relevance:0},d={begin:/\(/,end:/\)/,relevance:0},e={begin:/\[/,end:/\]/},f={className:"comment",begin:/%/,end:/$/,contains:[a.PHRASAL_WORDS_MODE]},g={className:"string",begin:/`/,end:/`/,contains:[a.BACKSLASH_ESCAPE]},h={className:"string",begin:/0\'(\\\'|.)/},i={className:"string",begin:/0\'\\s/},j={begin:/:-/},k=[b,c,d,j,e,f,a.C_BLOCK_COMMENT_MODE,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,g,h,i,a.C_NUMBER_MODE];return d.contains=k,e.contains=k,{contains:k.concat([{begin:/\.$/}])}}),a.registerLanguage("protobuf",function(a){return{keywords:{keyword:"package import option optional required repeated group",built_in:"double float int32 int64 uint32 uint64 sint32 sint64 fixed32 fixed64 sfixed32 sfixed64 bool string bytes",literal:"true false"},contains:[a.QUOTE_STRING_MODE,a.NUMBER_MODE,a.C_LINE_COMMENT_MODE,{className:"class",beginKeywords:"message enum service",end:/\{/,illegal:/\n/,contains:[a.inherit(a.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{className:"function",beginKeywords:"rpc",end:/;/,excludeEnd:!0,keywords:"rpc returns"},{className:"constant",begin:/^\s*[A-Z_]+/,end:/\s*=/,excludeEnd:!0}]}}),a.registerLanguage("puppet",function(a){var b={keyword:"and case default else elsif false if in import enherits node or true undef unless main settings $string ",literal:"alias audit before loglevel noop require subscribe tag owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check en_address ip_address realname command environment hour monute month monthday special target weekday creates cwd ogoutput refresh refreshonly tries try_sleep umask backup checksum content ctime force ignore links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel native_vlan speed principals allow_root auth_class auth_type authenticate_user k_of_n mechanisms rule session_owner shared options device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running start stop allowdupe auths expiry gid groups home iterations key_membership keys managehome membership password password_max_age password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert sslclientcert sslclientkey sslverify mounted",built_in:"architecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdistrelease lsbminordistrelease lsbrelease macaddress macaddress_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode selinux_current_mode selinux_enforced selinux_policyversion serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version"},c=a.COMMENT("#","$"),d="([A-Za-z_]|::)(\\w|::)*",e=a.inherit(a.TITLE_MODE,{begin:d}),f={className:"variable",begin:"\\$"+d},g={className:"string",contains:[a.BACKSLASH_ESCAPE,f],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]};return{aliases:["pp"],contains:[c,f,g,{beginKeywords:"class",end:"\\{|;",illegal:/=/,contains:[e,c]},{beginKeywords:"define",end:/\{/,contains:[{className:"title",begin:a.IDENT_RE,endsParent:!0}]},{begin:a.IDENT_RE+"\\s+\\{",returnBegin:!0,end:/\S/,contains:[{className:"name",begin:a.IDENT_RE},{begin:/\{/,end:/\}/,keywords:b,relevance:0,contains:[g,c,{begin:"[a-zA-Z_]+\\s*=>"},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},f]}],relevance:0}]}}),a.registerLanguage("python",function(a){var b={className:"prompt",begin:/^(>>>|\.\.\.) /},c={className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,contains:[b],relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,contains:[b],relevance:10},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE]},d={className:"number",relevance:0,variants:[{begin:a.BINARY_NUMBER_RE+"[lLjJ]?"},{begin:"\\b(0o[0-7]+)[lLjJ]?"},{begin:a.C_NUMBER_RE+"[lLjJ]?"}]},e={className:"params",begin:/\(/,end:/\)/,contains:["self",b,d,c]};return{aliases:["py","gyp"],keywords:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},illegal:/(<\/|->|\?)/,contains:[b,d,c,a.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def",relevance:10},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[a.UNDERSCORE_TITLE_MODE,e]},{className:"decorator",begin:/^[\t ]*@/,end:/$/},{begin:/\b(print|exec)\(/}]}}),a.registerLanguage("q",function(a){var b={keyword:"do while select delete by update from",constant:"0b 1b",built_in:"neg not null string reciprocal floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas ratios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tables views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg wsum sin cos tan sum",typename:"`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid"};return{aliases:["k","kdb"],keywords:b,lexemes:/\b(`?)[A-Za-z0-9_]+\b/,contains:[a.C_LINE_COMMENT_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE]}}),a.registerLanguage("r",function(a){var b="([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";return{contains:[a.HASH_COMMENT_MODE,{begin:b,lexemes:b,keywords:{keyword:"function if in break next repeat else for return switch while try tryCatch stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...",literal:"NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10"},relevance:0},{className:"number",begin:"0[xX][0-9a-fA-F]+[Li]?\\b",relevance:0},{className:"number",begin:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",relevance:0},{className:"number",begin:"\\d+\\.(?!\\d)(?:i\\b)?",relevance:0},{className:"number",begin:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{className:"number",begin:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{begin:"`",end:"`",relevance:0},{className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[{begin:'"',end:'"'},{begin:"'",end:"'"}]}]}}),a.registerLanguage("rib",function(a){return{keywords:"ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail DetailRange Disk Displacement Display End ErrorHandler Exposure Exterior Format FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry Hider Hyperboloid Identity Illuminate Imager Interior LightSource MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection Quantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd TransformPoints Translate TrimCurve WorldBegin WorldEnd",illegal:""}]}}),a.registerLanguage("scala",function(a){var b={className:"annotation",begin:"@[A-Za-z]+"},c={className:"string",begin:'u?r?"""',end:'"""',relevance:10},d={className:"symbol",begin:"'\\w[\\w\\d_]*(?!')"},e={className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},f={className:"title",begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,relevance:0},g={className:"class",beginKeywords:"class object trait type",end:/[:={\[(\n;]/,contains:[{className:"keyword",beginKeywords:"extends with",relevance:10},f]},h={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,contains:[f]};return{keywords:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"},contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,c,a.QUOTE_STRING_MODE,d,e,h,g,a.C_NUMBER_MODE,b]}}),a.registerLanguage("scheme",function(a){var b="[^\\(\\)\\[\\]\\{\\}\",'`;#|\\\\\\s]+",c="(\\-|\\+)?\\d+([./]\\d+)?",d=c+"[+\\-]"+c+"i",e={built_in:"case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules ' * + , ,@ - ... / ; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string symbol? tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"},f={className:"shebang",begin:"^#!",end:"$"},g={className:"literal",begin:"(#t|#f|#\\\\"+b+"|#\\\\.)"},h={className:"number",variants:[{begin:c,relevance:0},{begin:d,relevance:0},{begin:"#b[0-1]+(/[0-1]+)?"},{begin:"#o[0-7]+(/[0-7]+)?"},{begin:"#x[0-9a-f]+(/[0-9a-f]+)?"}]},i=a.QUOTE_STRING_MODE,j=[a.COMMENT(";","$",{relevance:0}),a.COMMENT("#\\|","\\|#")],k={begin:b,relevance:0},l={className:"variable",begin:"'"+b},m={endsWithParent:!0,relevance:0},n={className:"list",variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}],contains:[{className:"keyword",begin:b,lexemes:b,keywords:e},m]};return m.contains=[g,h,i,k,l,n].concat(j),{illegal:/\S/,contains:[f,h,i,l,n].concat(j)}}),a.registerLanguage("scilab",function(a){var b=[a.C_NUMBER_MODE,{className:"string",begin:"'|\"",end:"'|\"",contains:[a.BACKSLASH_ESCAPE,{begin:"''"}]}];return{aliases:["sci"],keywords:{keyword:"abort break case clear catch continue do elseif else endfunction end for functionglobal if pause return resume select try then while%f %F %t %T %pi %eps %inf %nan %e %i %z %s",built_in:"abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp errorexec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isemptyisinfisnan isvector lasterror length load linspace list listfiles log10 log2 logmax min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand realround sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tantype typename warning zeros matrix"},illegal:'("|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function endfunction",end:"$",keywords:"function endfunction|10",contains:[a.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},{className:"transposed_variable",begin:"[a-zA-Z_][a-zA-Z_0-9]*('+[\\.']*|[\\.']+)",end:"",relevance:0},{className:"matrix",begin:"\\[",end:"\\]'*[\\.']*",relevance:0,contains:b},a.COMMENT("//","$")].concat(b)}}),a.registerLanguage("scss",function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*",c={className:"variable",begin:"(\\$"+b+")\\b"},d={className:"function",begin:b+"\\(",returnBegin:!0,excludeEnd:!0,end:"\\("},e={className:"hexcolor",begin:"#[0-9A-Fa-f]+"};({className:"attribute",begin:"[A-Z\\_\\.\\-]+",end:":",excludeEnd:!0,illegal:"[^\\s]",starts:{className:"value",endsWithParent:!0,excludeEnd:!0,contains:[d,e,a.CSS_NUMBER_MODE,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,a.C_BLOCK_COMMENT_MODE,{className:"important",begin:"!important"}]}});return{case_insensitive:!0,illegal:"[=/|']",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,d,{className:"id",begin:"\\#[A-Za-z0-9_-]+",relevance:0},{className:"class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{className:"attr_selector",begin:"\\[",end:"\\]",illegal:"$"},{className:"tag",begin:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",relevance:0},{className:"pseudo",begin:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{className:"pseudo",begin:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},c,{className:"attribute",begin:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",illegal:"[^\\s]"},{className:"value",begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{className:"value",begin:":",end:";",contains:[d,c,e,a.CSS_NUMBER_MODE,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,{className:"important",begin:"!important"}]},{className:"at_rule",begin:"@",end:"[{;]",keywords:"mixin include extend for if else each while charset import debug media page content font-face namespace warn",contains:[d,c,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,e,a.CSS_NUMBER_MODE,{className:"preprocessor",begin:"\\s[A-Za-z0-9_.-]+",relevance:0}]}]}}),a.registerLanguage("smali",function(a){var b=["add","and","cmp","cmpg","cmpl","const","div","double","float","goto","if","int","long","move","mul","neg","new","nop","not","or","rem","return","shl","shr","sput","sub","throw","ushr","xor"],c=["aget","aput","array","check","execute","fill","filled","goto/16","goto/32","iget","instance","invoke","iput","monitor","packed","sget","sparse"],d=["transient","constructor","abstract","final","synthetic","public","private","protected","static","bridge","system"];return{aliases:["smali"],contains:[{className:"string",begin:'"',end:'"',relevance:0},a.COMMENT("#","$",{relevance:0}),{className:"keyword",begin:"\\s*\\.end\\s[a-zA-Z0-9]*",relevance:1},{className:"keyword",begin:"^[ ]*\\.[a-zA-Z]*",relevance:0},{className:"keyword",begin:"\\s:[a-zA-Z_0-9]*",relevance:0},{className:"keyword",begin:"\\s("+d.join("|")+")",relevance:1},{className:"keyword",begin:"\\[",relevance:0},{className:"instruction",begin:"\\s("+b.join("|")+")\\s",relevance:1},{className:"instruction",begin:"\\s("+b.join("|")+")((\\-|/)[a-zA-Z0-9]+)+\\s",relevance:10},{className:"instruction",begin:"\\s("+c.join("|")+")((\\-|/)[a-zA-Z0-9]+)*\\s",relevance:10},{className:"class",begin:"L[^(;:\n]*;",relevance:0},{className:"function",begin:'( |->)[^(\n ;"]*\\(',relevance:0},{className:"function",begin:"\\)",relevance:0},{className:"variable",begin:"[vp][0-9]+",relevance:0}]}}),a.registerLanguage("smalltalk",function(a){var b="[a-z][a-zA-Z0-9_]*",c={className:"char",begin:"\\$.{1}"},d={className:"symbol",begin:"#"+a.UNDERSCORE_IDENT_RE};return{aliases:["st"],keywords:"self super nil true false thisContext",contains:[a.COMMENT('"','"'),a.APOS_STRING_MODE,{className:"class",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{className:"method",begin:b+":",relevance:0},a.C_NUMBER_MODE,d,c,{className:"localvars",begin:"\\|[ ]*"+b+"([ ]+"+b+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+b}]},{className:"array",begin:"\\#\\(",end:"\\)",contains:[a.APOS_STRING_MODE,c,a.C_NUMBER_MODE,d]}]}}),a.registerLanguage("sml",function(a){return{aliases:["ml"],keywords:{keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,lexemes:"[a-z_]\\w*!?",contains:[{className:"literal",begin:"\\[(\\|\\|)?\\]|\\(\\)"},a.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"tag",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},a.inherit(a.APOS_STRING_MODE,{className:"char",relevance:0}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}),a.registerLanguage("sqf",function(a){var b=["!","-","+","!=","%","&&","*","/","=","==",">",">=","<","<=","or","plus","^",":",">>","abs","accTime","acos","action","actionKeys","actionKeysImages","actionKeysNames","actionKeysNamesArray","actionName","activateAddons","activatedAddons","activateKey","addAction","addBackpack","addBackpackCargo","addBackpackCargoGlobal","addBackpackGlobal","addCamShake","addCuratorAddons","addCuratorCameraArea","addCuratorEditableObjects","addCuratorEditingArea","addCuratorPoints","addEditorObject","addEventHandler","addGoggles","addGroupIcon","addHandgunItem","addHeadgear","addItem","addItemCargo","addItemCargoGlobal","addItemPool","addItemToBackpack","addItemToUniform","addItemToVest","addLiveStats","addMagazine","addMagazine array","addMagazineAmmoCargo","addMagazineCargo","addMagazineCargoGlobal","addMagazineGlobal","addMagazinePool","addMagazines","addMagazineTurret","addMenu","addMenuItem","addMissionEventHandler","addMPEventHandler","addMusicEventHandler","addPrimaryWeaponItem","addPublicVariableEventHandler","addRating","addResources","addScore","addScoreSide","addSecondaryWeaponItem","addSwitchableUnit","addTeamMember","addToRemainsCollector","addUniform","addVehicle","addVest","addWaypoint","addWeapon","addWeaponCargo","addWeaponCargoGlobal","addWeaponGlobal","addWeaponPool","addWeaponTurret","agent","agents","AGLToASL","aimedAtTarget","aimPos","airDensityRTD","airportSide","AISFinishHeal","alive","allControls","allCurators","allDead","allDeadMen","allDisplays","allGroups","allMapMarkers","allMines","allMissionObjects","allow3DMode","allowCrewInImmobile","allowCuratorLogicIgnoreAreas","allowDamage","allowDammage","allowFileOperations","allowFleeing","allowGetIn","allPlayers","allSites","allTurrets","allUnits","allUnitsUAV","allVariables","ammo","and","animate","animateDoor","animationPhase","animationState","append","armoryPoints","arrayIntersect","asin","ASLToAGL","ASLToATL","assert","assignAsCargo","assignAsCargoIndex","assignAsCommander","assignAsDriver","assignAsGunner","assignAsTurret","assignCurator","assignedCargo","assignedCommander","assignedDriver","assignedGunner","assignedItems","assignedTarget","assignedTeam","assignedVehicle","assignedVehicleRole","assignItem","assignTeam","assignToAirport","atan","atan2","atg","ATLToASL","attachedObject","attachedObjects","attachedTo","attachObject","attachTo","attackEnabled","backpack","backpackCargo","backpackContainer","backpackItems","backpackMagazines","backpackSpaceFor","behaviour","benchmark","binocular","blufor","boundingBox","boundingBoxReal","boundingCenter","breakOut","breakTo","briefingName","buildingExit","buildingPos","buttonAction","buttonSetAction","cadetMode","call","callExtension","camCommand","camCommit","camCommitPrepared","camCommitted","camConstuctionSetParams","camCreate","camDestroy","cameraEffect","cameraEffectEnableHUD","cameraInterest","cameraOn","cameraView","campaignConfigFile","camPreload","camPreloaded","camPrepareBank","camPrepareDir","camPrepareDive","camPrepareFocus","camPrepareFov","camPrepareFovRange","camPreparePos","camPrepareRelPos","camPrepareTarget","camSetBank","camSetDir","camSetDive","camSetFocus","camSetFov","camSetFovRange","camSetPos","camSetRelPos","camSetTarget","camTarget","camUseNVG","canAdd","canAddItemToBackpack","canAddItemToUniform","canAddItemToVest","cancelSimpleTaskDestination","canFire","canMove","canSlingLoad","canStand","canUnloadInCombat","captive","captiveNum","case","catch","cbChecked","cbSetChecked","ceil","cheatsEnabled","checkAIFeature","civilian","className","clearAllItemsFromBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearGroupIcons","clearItemCargo","clearItemCargoGlobal","clearItemPool","clearMagazineCargo","clearMagazineCargoGlobal","clearMagazinePool","clearOverlay","clearRadio","clearWeaponCargo","clearWeaponCargoGlobal","clearWeaponPool","closeDialog","closeDisplay","closeOverlay","collapseObjectTree","combatMode","commandArtilleryFire","commandChat","commander","commandFire","commandFollow","commandFSM","commandGetOut","commandingMenu","commandMove","commandRadio","commandStop","commandTarget","commandWatch","comment","commitOverlay","compile","compileFinal","completedFSM","composeText","configClasses","configFile","configHierarchy","configName","configProperties","configSourceMod","configSourceModList","connectTerminalToUAV","controlNull","controlsGroupCtrl","copyFromClipboard","copyToClipboard","copyWaypoints","cos","count","countEnemy","countFriendly","countSide","countType","countUnknown","createAgent","createCenter","createDialog","createDiaryLink","createDiaryRecord","createDiarySubject","createDisplay","createGearDialog","createGroup","createGuardedPoint","createLocation","createMarker","createMarkerLocal","createMenu","createMine","createMissionDisplay","createSimpleTask","createSite","createSoundSource","createTask","createTeam","createTrigger","createUnit","createUnit array","createVehicle","createVehicle array","createVehicleCrew","createVehicleLocal","crew","ctrlActivate","ctrlAddEventHandler","ctrlAutoScrollDelay","ctrlAutoScrollRewind","ctrlAutoScrollSpeed","ctrlChecked","ctrlClassName","ctrlCommit","ctrlCommitted","ctrlCreate","ctrlDelete","ctrlEnable","ctrlEnabled","ctrlFade","ctrlHTMLLoaded","ctrlIDC","ctrlIDD","ctrlMapAnimAdd","ctrlMapAnimClear","ctrlMapAnimCommit","ctrlMapAnimDone","ctrlMapCursor","ctrlMapMouseOver","ctrlMapScale","ctrlMapScreenToWorld","ctrlMapWorldToScreen","ctrlModel","ctrlModelDirAndUp","ctrlModelScale","ctrlParent","ctrlPosition","ctrlRemoveAllEventHandlers","ctrlRemoveEventHandler","ctrlScale","ctrlSetActiveColor","ctrlSetAutoScrollDelay","ctrlSetAutoScrollRewind","ctrlSetAutoScrollSpeed","ctrlSetBackgroundColor","ctrlSetChecked","ctrlSetEventHandler","ctrlSetFade","ctrlSetFocus","ctrlSetFont","ctrlSetFontH1","ctrlSetFontH1B","ctrlSetFontH2","ctrlSetFontH2B","ctrlSetFontH3","ctrlSetFontH3B","ctrlSetFontH4","ctrlSetFontH4B","ctrlSetFontH5","ctrlSetFontH5B","ctrlSetFontH6","ctrlSetFontH6B","ctrlSetFontHeight","ctrlSetFontHeightH1","ctrlSetFontHeightH2","ctrlSetFontHeightH3","ctrlSetFontHeightH4","ctrlSetFontHeightH5","ctrlSetFontHeightH6","ctrlSetFontP","ctrlSetFontPB","ctrlSetForegroundColor","ctrlSetModel","ctrlSetModelDirAndUp","ctrlSetModelScale","ctrlSetPosition","ctrlSetScale","ctrlSetStructuredText","ctrlSetText","ctrlSetTextColor","ctrlSetTooltip","ctrlSetTooltipColorBox","ctrlSetTooltipColorShade","ctrlSetTooltipColorText","ctrlShow","ctrlShown","ctrlText","ctrlTextHeight","ctrlType","ctrlVisible","curatorAddons","curatorCamera","curatorCameraArea","curatorCameraAreaCeiling","curatorCoef","curatorEditableObjects","curatorEditingArea","curatorEditingAreaType","curatorMouseOver","curatorPoints","curatorRegisteredObjects","curatorSelected","curatorWaypointCost","currentChannel","currentCommand","currentMagazine","currentMagazineDetail","currentMagazineDetailTurret","currentMagazineTurret","currentMuzzle","currentNamespace","currentTask","currentTasks","currentThrowable","currentVisionMode","currentWaypoint","currentWeapon","currentWeaponMode","currentWeaponTurret","currentZeroing","cursorTarget","customChat","customRadio","cutFadeOut","cutObj","cutRsc","cutText","damage","date","dateToNumber","daytime","deActivateKey","debriefingText","debugFSM","debugLog","default","deg","deleteAt","deleteCenter","deleteCollection","deleteEditorObject","deleteGroup","deleteIdentity","deleteLocation","deleteMarker","deleteMarkerLocal","deleteRange","deleteResources","deleteSite","deleteStatus","deleteTeam","deleteVehicle","deleteVehicleCrew","deleteWaypoint","detach","detectedMines","diag activeMissionFSMs","diag activeSQFScripts","diag activeSQSScripts","diag captureFrame","diag captureSlowFrame","diag fps","diag fpsMin","diag frameNo","diag log","diag logSlowFrame","diag tickTime","dialog","diarySubjectExists","didJIP","didJIPOwner","difficulty","difficultyEnabled","difficultyEnabledRTD","direction","directSay","disableAI","disableCollisionWith","disableConversation","disableDebriefingStats","disableSerialization","disableTIEquipment","disableUAVConnectability","disableUserInput","displayAddEventHandler","displayCtrl","displayNull","displayRemoveAllEventHandlers","displayRemoveEventHandler","displaySetEventHandler","dissolveTeam","distance","distance2D","distanceSqr","distributionRegion","do","doArtilleryFire","doFire","doFollow","doFSM","doGetOut","doMove","doorPhase","doStop","doTarget","doWatch","drawArrow","drawEllipse","drawIcon","drawIcon3D","drawLine","drawLine3D","drawLink","drawLocation","drawRectangle","driver","drop","east","echo","editObject","editorSetEventHandler","effectiveCommander","else","emptyPositions","enableAI","enableAIFeature","enableAttack","enableCamShake","enableCaustics","enableCollisionWith","enableCopilot","enableDebriefingStats","enableDiagLegend","enableEndDialog","enableEngineArtillery","enableEnvironment","enableFatigue","enableGunLights","enableIRLasers","enableMimics","enablePersonTurret","enableRadio","enableReload","enableRopeAttach","enableSatNormalOnDetail","enableSaving","enableSentences","enableSimulation","enableSimulationGlobal","enableTeamSwitch","enableUAVConnectability","enableUAVWaypoints","endLoadingScreen","endMission","engineOn","enginesIsOnRTD","enginesRpmRTD","enginesTorqueRTD","entities","estimatedEndServerTime","estimatedTimeLeft","evalObjectArgument","everyBackpack","everyContainer","exec","execEditorScript","execFSM","execVM","exit","exitWith","exp","expectedDestination","eyeDirection","eyePos","face","faction","fadeMusic","fadeRadio","fadeSound","fadeSpeech","failMission","false","fillWeaponsFromPool","find","findCover","findDisplay","findEditorObject","findEmptyPosition","findEmptyPositionReady","findNearestEnemy","finishMissionInit","finite","fire","fireAtTarget","firstBackpack","flag","flagOwner","fleeing","floor","flyInHeight","fog","fogForecast","fogParams","for","forceAddUniform","forceEnd","forceMap","forceRespawn","forceSpeed","forceWalk","forceWeaponFire","forceWeatherChange","forEach","forEachMember","forEachMemberAgent","forEachMemberTeam","format","formation","formationDirection","formationLeader","formationMembers","formationPosition","formationTask","formatText","formLeader","freeLook","from","fromEditor","fuel","fullCrew","gearSlotAmmoCount","gearSlotData","getAllHitPointsDamage","getAmmoCargo","getArray","getArtilleryAmmo","getArtilleryComputerSettings","getArtilleryETA","getAssignedCuratorLogic","getAssignedCuratorUnit","getBackpackCargo","getBleedingRemaining","getBurningValue","getCargoIndex","getCenterOfMass","getClientState","getConnectedUAV","getDammage","getDescription","getDir","getDirVisual","getDLCs","getEditorCamera","getEditorMode","getEditorObjectScope","getElevationOffset","getFatigue","getFriend","getFSMVariable","getFuelCargo","getGroupIcon","getGroupIconParams","getGroupIcons","getHideFrom","getHit","getHitIndex","getHitPointDamage","getItemCargo","getMagazineCargo","getMarkerColor","getMarkerPos","getMarkerSize","getMarkerType","getMass","getModelInfo","getNumber","getObjectArgument","getObjectChildren","getObjectDLC","getObjectMaterials","getObjectProxy","getObjectTextures","getObjectType","getObjectViewDistance","getOxygenRemaining","getPersonUsedDLCs","getPlayerChannel","getPlayerUID","getPos","getPosASL","getPosASLVisual","getPosASLW","getPosATL","getPosATLVisual","getPosVisual","getPosWorld","getRepairCargo","getResolution","getShadowDistance","getSlingLoad","getSpeed","getSuppression","getTerrainHeightASL","getText","getVariable","getWeaponCargo","getWPPos","glanceAt","globalChat","globalRadio","goggles","goto","group","groupChat","groupFromNetId","groupIconSelectable","groupIconsVisible","groupId","groupOwner","groupRadio","groupSelectedUnits","groupSelectUnit","grpNull","gunner","gusts","halt","handgunItems","handgunMagazine","handgunWeapon","handsHit","hasInterface","hasWeapon","hcAllGroups","hcGroupParams","hcLeader","hcRemoveAllGroups","hcRemoveGroup","hcSelected","hcSelectGroup","hcSetGroup","hcShowBar","hcShownBar","headgear","hideBody","hideObject","hideObjectGlobal","hint","hintC","hintCadet","hintSilent","hmd","hostMission","htmlLoad","HUDMovementLevels","humidity","if","image","importAllGroups","importance","in","incapacitatedState","independent","inflame","inflamed","inGameUISetEventHandler","inheritsFrom","initAmbientLife","inputAction","inRangeOfArtillery","insertEditorObject","intersect","isAbleToBreathe","isAgent","isArray","isAutoHoverOn","isAutonomous","isAutotest","isBleeding","isBurning","isClass","isCollisionLightOn","isCopilotEnabled","isDedicated","isDLCAvailable","isEngineOn","isEqualTo","isFlashlightOn","isFlatEmpty","isForcedWalk","isFormationLeader","isHidden","isInRemainsCollector","isInstructorFigureEnabled","isIRLaserOn","isKeyActive","isKindOf","isLightOn","isLocalized","isManualFire","isMarkedForCollection","isMultiplayer","isNil","isNull","isNumber","isObjectHidden","isObjectRTD","isOnRoad","isPipEnabled","isPlayer","isRealTime","isServer","isShowing3DIcons","isSteamMission","isStreamFriendlyUIEnabled","isText","isTouchingGround","isTurnedOut","isTutHintsEnabled","isUAVConnectable","isUAVConnected","isUniformAllowed","isWalking","isWeaponDeployed","isWeaponRested","itemCargo","items","itemsWithMagazines","join","joinAs","joinAsSilent","joinSilent","joinString","kbAddDatabase","kbAddDatabaseTargets","kbAddTopic","kbHasTopic","kbReact","kbRemoveTopic","kbTell","kbWasSaid","keyImage","keyName","knowsAbout","land","landAt","landResult","language","laserTarget","lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbSelection","lbSetColor","lbSetCurSel","lbSetData","lbSetPicture","lbSetPictureColor","lbSetPictureColorDisabled","lbSetPictureColorSelected","lbSetSelectColor","lbSetSelectColorRight","lbSetSelected","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortByValue","lbText","lbValue","leader","leaderboardDeInit","leaderboardGetRows","leaderboardInit","leaveVehicle","libraryCredits","libraryDisclaimers","lifeState","lightAttachObject","lightDetachObject","lightIsOn","lightnings","limitSpeed","linearConversion","lineBreak","lineIntersects","lineIntersectsObjs","lineIntersectsSurfaces","lineIntersectsWith","linkItem","list","listObjects","ln","lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbText","lnbValue","load","loadAbs","loadBackpack","loadFile","loadGame","loadIdentity","loadMagazine","loadOverlay","loadStatus","loadUniform","loadVest","local","localize","locationNull","locationPosition","lock","lockCameraTo","lockCargo","lockDriver","locked","lockedCargo","lockedDriver","lockedTurret","lockTurret","lockWP","log","logEntities","lookAt","lookAtPos","magazineCargo","magazines","magazinesAllTurrets","magazinesAmmo","magazinesAmmoCargo","magazinesAmmoFull","magazinesDetail","magazinesDetailBackpack","magazinesDetailUniform","magazinesDetailVest","magazinesTurret","magazineTurretAmmo","mapAnimAdd","mapAnimClear","mapAnimCommit","mapAnimDone","mapCenterOnCamera","mapGridPosition","markAsFinishedOnSteam","markerAlpha","markerBrush","markerColor","markerDir","markerPos","markerShape","markerSize","markerText","markerType","max","members","min","mineActive","mineDetectedBy","missionConfigFile","missionName","missionNamespace","missionStart","mod","modelToWorld","modelToWorldVisual","moonIntensity","morale","move","moveInAny","moveInCargo","moveInCommander","moveInDriver","moveInGunner","moveInTurret","moveObjectToEnd","moveOut","moveTime","moveTo","moveToCompleted","moveToFailed","musicVolume","name","name location","nameSound","nearEntities","nearestBuilding","nearestLocation","nearestLocations","nearestLocationWithDubbing","nearestObject","nearestObjects","nearObjects","nearObjectsReady","nearRoads","nearSupplies","nearTargets","needReload","netId","netObjNull","newOverlay","nextMenuItemIndex","nextWeatherChange","nil","nMenuItems","not","numberToDate","objectCurators","objectFromNetId","objectParent","objNull","objStatus","onBriefingGroup","onBriefingNotes","onBriefingPlan","onBriefingTeamSwitch","onCommandModeChanged","onDoubleClick","onEachFrame","onGroupIconClick","onGroupIconOverEnter","onGroupIconOverLeave","onHCGroupSelectionChanged","onMapSingleClick","onPlayerConnected","onPlayerDisconnected","onPreloadFinished","onPreloadStarted","onShowNewObject","onTeamSwitch","openCuratorInterface","openMap","openYoutubeVideo","opfor","or","orderGetIn","overcast","overcastForecast","owner","param","params","parseNumber","parseText","parsingNamespace","particlesQuality","pi","pickWeaponPool","pitch","playableSlotsNumber","playableUnits","playAction","playActionNow","player","playerRespawnTime","playerSide","playersNumber","playGesture","playMission","playMove","playMoveNow","playMusic","playScriptedMission","playSound","playSound3D","position","positionCameraToWorld","posScreenToWorld","posWorldToScreen","ppEffectAdjust","ppEffectCommit","ppEffectCommitted","ppEffectCreate","ppEffectDestroy","ppEffectEnable","ppEffectForceInNVG","precision","preloadCamera","preloadObject","preloadSound","preloadTitleObj","preloadTitleRsc","preprocessFile","preprocessFileLineNumbers","primaryWeapon","primaryWeaponItems","primaryWeaponMagazine","priority","private","processDiaryLink","productVersion","profileName","profileNamespace","profileNameSteam","progressLoadingScreen","progressPosition","progressSetPosition","publicVariable","publicVariableClient","publicVariableServer","pushBack","putWeaponPool","queryItemsPool","queryMagazinePool","queryWeaponPool","rad","radioChannelAdd","radioChannelCreate","radioChannelRemove","radioChannelSetCallSign","radioChannelSetLabel","radioVolume","rain","rainbow","random","rank","rankId","rating","rectangular","registeredTasks","registerTask","reload","reloadEnabled","remoteControl","remoteExec","remoteExecCall","removeAction","removeAllActions","removeAllAssignedItems","removeAllContainers","removeAllCuratorAddons","removeAllCuratorCameraAreas","removeAllCuratorEditingAreas","removeAllEventHandlers","removeAllHandgunItems","removeAllItems","removeAllItemsWithMagazines","removeAllMissionEventHandlers","removeAllMPEventHandlers","removeAllMusicEventHandlers","removeAllPrimaryWeaponItems","removeAllWeapons","removeBackpack","removeBackpackGlobal","removeCuratorAddons","removeCuratorCameraArea","removeCuratorEditableObjects","removeCuratorEditingArea","removeDrawIcon","removeDrawLinks","removeEventHandler","removeFromRemainsCollector","removeGoggles","removeGroupIcon","removeHandgunItem","removeHeadgear","removeItem","removeItemFromBackpack","removeItemFromUniform","removeItemFromVest","removeItems","removeMagazine","removeMagazineGlobal","removeMagazines","removeMagazinesTurret","removeMagazineTurret","removeMenuItem","removeMissionEventHandler","removeMPEventHandler","removeMusicEventHandler","removePrimaryWeaponItem","removeSecondaryWeaponItem","removeSimpleTask","removeSwitchableUnit","removeTeamMember","removeUniform","removeVest","removeWeapon","removeWeaponGlobal","removeWeaponTurret","requiredVersion","resetCamShake","resetSubgroupDirection","resistance","resize","resources","respawnVehicle","restartEditorCamera","reveal","revealMine","reverse","reversedMouseY","roadsConnectedTo","roleDescription","ropeAttachedObjects","ropeAttachedTo","ropeAttachEnabled","ropeAttachTo","ropeCreate","ropeCut","ropeEndPosition","ropeLength","ropes","ropeUnwind","ropeUnwound","rotorsForcesRTD","rotorsRpmRTD","round","runInitScript","safeZoneH","safeZoneW","safeZoneWAbs","safeZoneX","safeZoneXAbs","safeZoneY","saveGame","saveIdentity","saveJoysticks","saveOverlay","saveProfileNamespace","saveStatus","saveVar","savingEnabled","say","say2D","say3D","scopeName","score","scoreSide","screenToWorld","scriptDone","scriptName","scriptNull","scudState","secondaryWeapon","secondaryWeaponItems","secondaryWeaponMagazine","select","selectBestPlaces","selectDiarySubject","selectedEditorObjects","selectEditorObject","selectionPosition","selectLeader","selectNoPlayer","selectPlayer","selectWeapon","selectWeaponTurret","sendAUMessage","sendSimpleCommand","sendTask","sendTaskResult","sendUDPMessage","serverCommand","serverCommandAvailable","serverCommandExecutable","serverName","serverTime","set","setAccTime","setAirportSide","setAmmo","setAmmoCargo","setAperture","setApertureNew","setArmoryPoints","setAttributes","setAutonomous","setBehaviour","setBleedingRemaining","setCameraInterest","setCamShakeDefParams","setCamShakeParams","setCamUseTi","setCaptive","setCenterOfMass","setCollisionLight","setCombatMode","setCompassOscillation","setCuratorCameraAreaCeiling","setCuratorCoef","setCuratorEditingAreaType","setCuratorWaypointCost","setCurrentChannel","setCurrentTask","setCurrentWaypoint","setDamage","setDammage","setDate","setDebriefingText","setDefaultCamera","setDestination","setDetailMapBlendPars","setDir","setDirection","setDrawIcon","setDropInterval","setEditorMode","setEditorObjectScope","setEffectCondition","setFace","setFaceAnimation","setFatigue","setFlagOwner","setFlagSide","setFlagTexture","setFog","setFog array","setFormation","setFormationTask","setFormDir","setFriend","setFromEditor","setFSMVariable","setFuel","setFuelCargo","setGroupIcon","setGroupIconParams","setGroupIconsSelectable","setGroupIconsVisible","setGroupId","setGroupIdGlobal","setGroupOwner","setGusts","setHideBehind","setHit","setHitIndex","setHitPointDamage","setHorizonParallaxCoef","setHUDMovementLevels","setIdentity","setImportance","setLeader","setLightAmbient","setLightAttenuation","setLightBrightness","setLightColor","setLightDayLight","setLightFlareMaxDistance","setLightFlareSize","setLightIntensity","setLightnings","setLightUseFlare","setLocalWindParams","setMagazineTurretAmmo","setMarkerAlpha","setMarkerAlphaLocal","setMarkerBrush","setMarkerBrushLocal","setMarkerColor","setMarkerColorLocal","setMarkerDir","setMarkerDirLocal","setMarkerPos","setMarkerPosLocal","setMarkerShape","setMarkerShapeLocal","setMarkerSize","setMarkerSizeLocal","setMarkerText","setMarkerTextLocal","setMarkerType","setMarkerTypeLocal","setMass","setMimic","setMousePosition","setMusicEffect","setMusicEventHandler","setName","setNameSound","setObjectArguments","setObjectMaterial","setObjectProxy","setObjectTexture","setObjectTextureGlobal","setObjectViewDistance","setOvercast","setOwner","setOxygenRemaining","setParticleCircle","setParticleClass","setParticleFire","setParticleParams","setParticleRandom","setPilotLight","setPiPEffect","setPitch","setPlayable","setPlayerRespawnTime","setPos","setPosASL","setPosASL2","setPosASLW","setPosATL","setPosition","setPosWorld","setRadioMsg","setRain","setRainbow","setRandomLip","setRank","setRectangular","setRepairCargo","setShadowDistance","setSide","setSimpleTaskDescription","setSimpleTaskDestination","setSimpleTaskTarget","setSimulWeatherLayers","setSize","setSkill","setSkill array","setSlingLoad","setSoundEffect","setSpeaker","setSpeech","setSpeedMode","setStatValue","setSuppression","setSystemOfUnits","setTargetAge","setTaskResult","setTaskState","setTerrainGrid","setText","setTimeMultiplier","setTitleEffect","setTriggerActivation","setTriggerArea","setTriggerStatements","setTriggerText","setTriggerTimeout","setTriggerType","setType","setUnconscious","setUnitAbility","setUnitPos","setUnitPosWeak","setUnitRank","setUnitRecoilCoefficient","setUnloadInCombat","setUserActionText","setVariable","setVectorDir","setVectorDirAndUp","setVectorUp","setVehicleAmmo","setVehicleAmmoDef","setVehicleArmor","setVehicleId","setVehicleLock","setVehiclePosition","setVehicleTiPars","setVehicleVarName","setVelocity","setVelocityTransformation","setViewDistance","setVisibleIfTreeCollapsed","setWaves","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointLoiterRadius","setWaypointLoiterType","setWaypointName","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","setWeaponReloadingTime","setWind","setWindDir","setWindForce","setWindStr","setWPPos","show3DIcons","showChat","showCinemaBorder","showCommandingMenu","showCompass","showCuratorCompass","showGPS","showHUD","showLegend","showMap","shownArtilleryComputer","shownChat","shownCompass","shownCuratorCompass","showNewEditorObject","shownGPS","shownHUD","shownMap","shownPad","shownRadio","shownUAVFeed","shownWarrant","shownWatch","showPad","showRadio","showSubtitles","showUAVFeed","showWarrant","showWatch","showWaypoint","side","sideChat","sideEnemy","sideFriendly","sideLogic","sideRadio","sideUnknown","simpleTasks","simulationEnabled","simulCloudDensity","simulCloudOcclusion","simulInClouds","simulWeatherSync","sin","size","sizeOf","skill","skillFinal","skipTime","sleep","sliderPosition","sliderRange","sliderSetPosition","sliderSetRange","sliderSetSpeed","sliderSpeed","slingLoadAssistantShown","soldierMagazines","someAmmo","sort","soundVolume","spawn","speaker","speed","speedMode","splitString","sqrt","squadParams","stance","startLoadingScreen","step","stop","stopped","str","sunOrMoon","supportInfo","suppressFor","surfaceIsWater","surfaceNormal","surfaceType","swimInDepth","switch","switchableUnits","switchAction","switchCamera","switchGesture","switchLight","switchMove","synchronizedObjects","synchronizedTriggers","synchronizedWaypoints","synchronizeObjectsAdd","synchronizeObjectsRemove","synchronizeTrigger","synchronizeWaypoint","synchronizeWaypoint trigger","systemChat","systemOfUnits","tan","targetKnowledge","targetsAggregate","targetsQuery","taskChildren","taskCompleted","taskDescription","taskDestination","taskHint","taskNull","taskParent","taskResult","taskState","teamMember","teamMemberNull","teamName","teams","teamSwitch","teamSwitchEnabled","teamType","terminate","terrainIntersect","terrainIntersectASL","text","text location","textLog","textLogFormat","tg","then","throw","time","timeMultiplier","titleCut","titleFadeOut","titleObj","titleRsc","titleText","to","toArray","toLower","toString","toUpper","triggerActivated","triggerActivation","triggerArea","triggerAttachedVehicle","triggerAttachObject","triggerAttachVehicle","triggerStatements","triggerText","triggerTimeout","triggerTimeoutCurrent","triggerType","true","try","turretLocal","turretOwner","turretUnit","tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetPicture","tvSetPictureColor","tvSetTooltip","tvSetValue","tvSort","tvSortByValue","tvText","tvValue","type","typeName","typeOf","UAVControl","uiNamespace","uiSleep","unassignCurator","unassignItem","unassignTeam","unassignVehicle","underwater","uniform","uniformContainer","uniformItems","uniformMagazines","unitAddons","unitBackpack","unitPos","unitReady","unitRecoilCoefficient","units","unitsBelowHeight","unlinkItem","unlockAchievement","unregisterTask","updateDrawIcon","updateMenuItem","updateObjectTree","useAudioTimeForMoves","vectorAdd","vectorCos","vectorCrossProduct","vectorDiff","vectorDir","vectorDirVisual","vectorDistance","vectorDistanceSqr","vectorDotProduct","vectorFromTo","vectorMagnitude","vectorMagnitudeSqr","vectorMultiply","vectorNormalized","vectorUp","vectorUpVisual","vehicle","vehicleChat","vehicleRadio","vehicles","vehicleVarName","velocity","velocityModelSpace","verifySignature","vest","vestContainer","vestItems","vestMagazines","viewDistance","visibleCompass","visibleGPS","visibleMap","visiblePosition","visiblePositionASL","visibleWatch","waitUntil","waves","waypointAttachedObject","waypointAttachedVehicle","waypointAttachObject","waypointAttachVehicle","waypointBehaviour","waypointCombatMode","waypointCompletionRadius","waypointDescription","waypointFormation","waypointHousePosition","waypointLoiterRadius","waypointLoiterType","waypointName","waypointPosition","waypoints","waypointScript","waypointsEnabledUAV","waypointShow","waypointSpeed","waypointStatements","waypointTimeout","waypointTimeoutCurrent","waypointType","waypointVisible","weaponAccessories","weaponCargo","weaponDirection","weaponLowered","weapons","weaponsItems","weaponsItemsCargo","weaponState","weaponsTurret","weightRTD","west","WFSideText","while","wind","windDir","windStr","wingsForcesRTD","with","worldName","worldSize","worldToModel","worldToModelVisual","worldToScreen"],c=["case","catch","default","do","else","exit","exitWith|5","for","forEach","from","if","switch","then","throw","to","try","while","with"],d=["!","-","+","!=","%","&&","*","/","=","==",">",">=","<","<=","^",":",">>"],e=["_forEachIndex|10","_this|10","_x|10"],f=["true","false","nil"],g=b.filter(function(a){ -return-1==c.indexOf(a)&&-1==f.indexOf(a)&&-1==d.indexOf(a)});g=g.concat(e);var h={className:"string",relevance:0,variants:[{begin:'"',end:'"',contains:[{begin:'""'}]},{begin:"'",end:"'",contains:[{begin:"''"}]}]},i={className:"number",begin:a.NUMBER_RE,relevance:0},j={className:"string",variants:[a.QUOTE_STRING_MODE,{begin:"'\\\\?.",end:"'",illegal:"."}]},k={className:"preprocessor",begin:"#",end:"$",keywords:"if else elif endif define undef warning error line pragma ifdef ifndef",contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",contains:[j,{className:"string",begin:"<",end:">",illegal:"\\n"}]},j,i,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]};return{aliases:["sqf"],case_insensitive:!0,keywords:{keyword:c.join(" "),built_in:g.join(" "),literal:f.join(" ")},contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,i,h,k]}}),a.registerLanguage("sql",function(a){var b=a.COMMENT("--","$");return{case_insensitive:!0,illegal:/[<>{}*]/,contains:[{className:"operator",beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke",end:/;/,endsWithParent:!0,keywords:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes c cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle d data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration e each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract f failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function g general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http i id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists k keep keep_duplicates key keys kill l language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim m main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex n name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding p package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime t table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},contains:[{className:"string",begin:"'",end:"'",contains:[a.BACKSLASH_ESCAPE,{begin:"''"}]},{className:"string",begin:'"',end:'"',contains:[a.BACKSLASH_ESCAPE,{begin:'""'}]},{className:"string",begin:"`",end:"`",contains:[a.BACKSLASH_ESCAPE]},a.C_NUMBER_MODE,a.C_BLOCK_COMMENT_MODE,b]},a.C_BLOCK_COMMENT_MODE,b]}}),a.registerLanguage("stata",function(a){return{aliases:["do","ado"],case_insensitive:!0,keywords:"if else in foreach for forv forva forval forvalu forvalue forvalues by bys bysort xi quietly qui capture about ac ac_7 acprplot acprplot_7 adjust ado adopath adoupdate alpha ameans an ano anov anova anova_estat anova_terms anovadef aorder ap app appe appen append arch arch_dr arch_estat arch_p archlm areg areg_p args arima arima_dr arima_estat arima_p as asmprobit asmprobit_estat asmprobit_lf asmprobit_mfx__dlg asmprobit_p ass asse asser assert avplot avplot_7 avplots avplots_7 bcskew0 bgodfrey binreg bip0_lf biplot bipp_lf bipr_lf bipr_p biprobit bitest bitesti bitowt blogit bmemsize boot bootsamp bootstrap bootstrap_8 boxco_l boxco_p boxcox boxcox_6 boxcox_p bprobit br break brier bro brow brows browse brr brrstat bs bs_7 bsampl_w bsample bsample_7 bsqreg bstat bstat_7 bstat_8 bstrap bstrap_7 ca ca_estat ca_p cabiplot camat canon canon_8 canon_8_p canon_estat canon_p cap caprojection capt captu captur capture cat cc cchart cchart_7 cci cd censobs_table centile cf char chdir checkdlgfiles checkestimationsample checkhlpfiles checksum chelp ci cii cl class classutil clear cli clis clist clo clog clog_lf clog_p clogi clogi_sw clogit clogit_lf clogit_p clogitp clogl_sw cloglog clonevar clslistarray cluster cluster_measures cluster_stop cluster_tree cluster_tree_8 clustermat cmdlog cnr cnre cnreg cnreg_p cnreg_sw cnsreg codebook collaps4 collapse colormult_nb colormult_nw compare compress conf confi confir confirm conren cons const constr constra constrai constrain constraint continue contract copy copyright copysource cor corc corr corr2data corr_anti corr_kmo corr_smc corre correl correla correlat correlate corrgram cou coun count cox cox_p cox_sw coxbase coxhaz coxvar cprplot cprplot_7 crc cret cretu cretur creturn cross cs cscript cscript_log csi ct ct_is ctset ctst_5 ctst_st cttost cumsp cumsp_7 cumul cusum cusum_7 cutil d datasig datasign datasigna datasignat datasignatu datasignatur datasignature datetof db dbeta de dec deco decod decode deff des desc descr descri describ describe destring dfbeta dfgls dfuller di di_g dir dirstats dis discard disp disp_res disp_s displ displa display distinct do doe doed doedi doedit dotplot dotplot_7 dprobit drawnorm drop ds ds_util dstdize duplicates durbina dwstat dydx e ed edi edit egen eivreg emdef en enc enco encod encode eq erase ereg ereg_lf ereg_p ereg_sw ereghet ereghet_glf ereghet_glf_sh ereghet_gp ereghet_ilf ereghet_ilf_sh ereghet_ip eret eretu eretur ereturn err erro error est est_cfexist est_cfname est_clickable est_expand est_hold est_table est_unhold est_unholdok estat estat_default estat_summ estat_vce_only esti estimates etodow etof etomdy ex exi exit expand expandcl fac fact facto factor factor_estat factor_p factor_pca_rotated factor_rotate factormat fcast fcast_compute fcast_graph fdades fdadesc fdadescr fdadescri fdadescrib fdadescribe fdasav fdasave fdause fh_st file open file read file close file filefilter fillin find_hlp_file findfile findit findit_7 fit fl fli flis flist for5_0 form forma format fpredict frac_154 frac_adj frac_chk frac_cox frac_ddp frac_dis frac_dv frac_in frac_mun frac_pp frac_pq frac_pv frac_wgt frac_xo fracgen fracplot fracplot_7 fracpoly fracpred fron_ex fron_hn fron_p fron_tn fron_tn2 frontier ftodate ftoe ftomdy ftowdate g gamhet_glf gamhet_gp gamhet_ilf gamhet_ip gamma gamma_d2 gamma_p gamma_sw gammahet gdi_hexagon gdi_spokes ge gen gene gener genera generat generate genrank genstd genvmean gettoken gl gladder gladder_7 glim_l01 glim_l02 glim_l03 glim_l04 glim_l05 glim_l06 glim_l07 glim_l08 glim_l09 glim_l10 glim_l11 glim_l12 glim_lf glim_mu glim_nw1 glim_nw2 glim_nw3 glim_p glim_v1 glim_v2 glim_v3 glim_v4 glim_v5 glim_v6 glim_v7 glm glm_6 glm_p glm_sw glmpred glo glob globa global glogit glogit_8 glogit_p gmeans gnbre_lf gnbreg gnbreg_5 gnbreg_p gomp_lf gompe_sw gomper_p gompertz gompertzhet gomphet_glf gomphet_glf_sh gomphet_gp gomphet_ilf gomphet_ilf_sh gomphet_ip gphdot gphpen gphprint gprefs gprobi_p gprobit gprobit_8 gr gr7 gr_copy gr_current gr_db gr_describe gr_dir gr_draw gr_draw_replay gr_drop gr_edit gr_editviewopts gr_example gr_example2 gr_export gr_print gr_qscheme gr_query gr_read gr_rename gr_replay gr_save gr_set gr_setscheme gr_table gr_undo gr_use graph graph7 grebar greigen greigen_7 greigen_8 grmeanby grmeanby_7 gs_fileinfo gs_filetype gs_graphinfo gs_stat gsort gwood h hadimvo hareg hausman haver he heck_d2 heckma_p heckman heckp_lf heckpr_p heckprob hel help hereg hetpr_lf hetpr_p hetprob hettest hexdump hilite hist hist_7 histogram hlogit hlu hmeans hotel hotelling hprobit hreg hsearch icd9 icd9_ff icd9p iis impute imtest inbase include inf infi infil infile infix inp inpu input ins insheet insp inspe inspec inspect integ inten intreg intreg_7 intreg_p intrg2_ll intrg_ll intrg_ll2 ipolate iqreg ir irf irf_create irfm iri is_svy is_svysum isid istdize ivprob_1_lf ivprob_lf ivprobit ivprobit_p ivreg ivreg_footnote ivtob_1_lf ivtob_lf ivtobit ivtobit_p jackknife jacknife jknife jknife_6 jknife_8 jkstat joinby kalarma1 kap kap_3 kapmeier kappa kapwgt kdensity kdensity_7 keep ksm ksmirnov ktau kwallis l la lab labe label labelbook ladder levels levelsof leverage lfit lfit_p li lincom line linktest lis list lloghet_glf lloghet_glf_sh lloghet_gp lloghet_ilf lloghet_ilf_sh lloghet_ip llogi_sw llogis_p llogist llogistic llogistichet lnorm_lf lnorm_sw lnorma_p lnormal lnormalhet lnormhet_glf lnormhet_glf_sh lnormhet_gp lnormhet_ilf lnormhet_ilf_sh lnormhet_ip lnskew0 loadingplot loc loca local log logi logis_lf logistic logistic_p logit logit_estat logit_p loglogs logrank loneway lookfor lookup lowess lowess_7 lpredict lrecomp lroc lroc_7 lrtest ls lsens lsens_7 lsens_x lstat ltable ltable_7 ltriang lv lvr2plot lvr2plot_7 m ma mac macr macro makecns man manova manova_estat manova_p manovatest mantel mark markin markout marksample mat mat_capp mat_order mat_put_rr mat_rapp mata mata_clear mata_describe mata_drop mata_matdescribe mata_matsave mata_matuse mata_memory mata_mlib mata_mosave mata_rename mata_which matalabel matcproc matlist matname matr matri matrix matrix_input__dlg matstrik mcc mcci md0_ md1_ md1debug_ md2_ md2debug_ mds mds_estat mds_p mdsconfig mdslong mdsmat mdsshepard mdytoe mdytof me_derd mean means median memory memsize meqparse mer merg merge mfp mfx mhelp mhodds minbound mixed_ll mixed_ll_reparm mkassert mkdir mkmat mkspline ml ml_5 ml_adjs ml_bhhhs ml_c_d ml_check ml_clear ml_cnt ml_debug ml_defd ml_e0 ml_e0_bfgs ml_e0_cycle ml_e0_dfp ml_e0i ml_e1 ml_e1_bfgs ml_e1_bhhh ml_e1_cycle ml_e1_dfp ml_e2 ml_e2_cycle ml_ebfg0 ml_ebfr0 ml_ebfr1 ml_ebh0q ml_ebhh0 ml_ebhr0 ml_ebr0i ml_ecr0i ml_edfp0 ml_edfr0 ml_edfr1 ml_edr0i ml_eds ml_eer0i ml_egr0i ml_elf ml_elf_bfgs ml_elf_bhhh ml_elf_cycle ml_elf_dfp ml_elfi ml_elfs ml_enr0i ml_enrr0 ml_erdu0 ml_erdu0_bfgs ml_erdu0_bhhh ml_erdu0_bhhhq ml_erdu0_cycle ml_erdu0_dfp ml_erdu0_nrbfgs ml_exde ml_footnote ml_geqnr ml_grad0 ml_graph ml_hbhhh ml_hd0 ml_hold ml_init ml_inv ml_log ml_max ml_mlout ml_mlout_8 ml_model ml_nb0 ml_opt ml_p ml_plot ml_query ml_rdgrd ml_repor ml_s_e ml_score ml_searc ml_technique ml_unhold mleval mlf_ mlmatbysum mlmatsum mlog mlogi mlogit mlogit_footnote mlogit_p mlopts mlsum mlvecsum mnl0_ mor more mov move mprobit mprobit_lf mprobit_p mrdu0_ mrdu1_ mvdecode mvencode mvreg mvreg_estat n nbreg nbreg_al nbreg_lf nbreg_p nbreg_sw nestreg net newey newey_7 newey_p news nl nl_7 nl_9 nl_9_p nl_p nl_p_7 nlcom nlcom_p nlexp2 nlexp2_7 nlexp2a nlexp2a_7 nlexp3 nlexp3_7 nlgom3 nlgom3_7 nlgom4 nlgom4_7 nlinit nllog3 nllog3_7 nllog4 nllog4_7 nlog_rd nlogit nlogit_p nlogitgen nlogittree nlpred no nobreak noi nois noisi noisil noisily note notes notes_dlg nptrend numlabel numlist odbc old_ver olo olog ologi ologi_sw ologit ologit_p ologitp on one onew onewa oneway op_colnm op_comp op_diff op_inv op_str opr opro oprob oprob_sw oprobi oprobi_p oprobit oprobitp opts_exclusive order orthog orthpoly ou out outf outfi outfil outfile outs outsh outshe outshee outsheet ovtest pac pac_7 palette parse parse_dissim pause pca pca_8 pca_display pca_estat pca_p pca_rotate pcamat pchart pchart_7 pchi pchi_7 pcorr pctile pentium pergram pergram_7 permute permute_8 personal peto_st pkcollapse pkcross pkequiv pkexamine pkexamine_7 pkshape pksumm pksumm_7 pl plo plot plugin pnorm pnorm_7 poisgof poiss_lf poiss_sw poisso_p poisson poisson_estat post postclose postfile postutil pperron pr prais prais_e prais_e2 prais_p predict predictnl preserve print pro prob probi probit probit_estat probit_p proc_time procoverlay procrustes procrustes_estat procrustes_p profiler prog progr progra program prop proportion prtest prtesti pwcorr pwd q\\s qby qbys qchi qchi_7 qladder qladder_7 qnorm qnorm_7 qqplot qqplot_7 qreg qreg_c qreg_p qreg_sw qu quadchk quantile quantile_7 que quer query range ranksum ratio rchart rchart_7 rcof recast reclink recode reg reg3 reg3_p regdw regr regre regre_p2 regres regres_p regress regress_estat regriv_p remap ren rena renam rename renpfix repeat replace report reshape restore ret retu retur return rm rmdir robvar roccomp roccomp_7 roccomp_8 rocf_lf rocfit rocfit_8 rocgold rocplot rocplot_7 roctab roctab_7 rolling rologit rologit_p rot rota rotat rotate rotatemat rreg rreg_p ru run runtest rvfplot rvfplot_7 rvpplot rvpplot_7 sa safesum sample sampsi sav save savedresults saveold sc sca scal scala scalar scatter scm_mine sco scob_lf scob_p scobi_sw scobit scor score scoreplot scoreplot_help scree screeplot screeplot_help sdtest sdtesti se search separate seperate serrbar serrbar_7 serset set set_defaults sfrancia sh she shel shell shewhart shewhart_7 signestimationsample signrank signtest simul simul_7 simulate simulate_8 sktest sleep slogit slogit_d2 slogit_p smooth snapspan so sor sort spearman spikeplot spikeplot_7 spikeplt spline_x split sqreg sqreg_p sret sretu sretur sreturn ssc st st_ct st_hc st_hcd st_hcd_sh st_is st_issys st_note st_promo st_set st_show st_smpl st_subid stack statsby statsby_8 stbase stci stci_7 stcox stcox_estat stcox_fr stcox_fr_ll stcox_p stcox_sw stcoxkm stcoxkm_7 stcstat stcurv stcurve stcurve_7 stdes stem stepwise stereg stfill stgen stir stjoin stmc stmh stphplot stphplot_7 stphtest stphtest_7 stptime strate strate_7 streg streg_sw streset sts sts_7 stset stsplit stsum sttocc sttoct stvary stweib su suest suest_8 sum summ summa summar summari summariz summarize sunflower sureg survcurv survsum svar svar_p svmat svy svy_disp svy_dreg svy_est svy_est_7 svy_estat svy_get svy_gnbreg_p svy_head svy_header svy_heckman_p svy_heckprob_p svy_intreg_p svy_ivreg_p svy_logistic_p svy_logit_p svy_mlogit_p svy_nbreg_p svy_ologit_p svy_oprobit_p svy_poisson_p svy_probit_p svy_regress_p svy_sub svy_sub_7 svy_x svy_x_7 svy_x_p svydes svydes_8 svygen svygnbreg svyheckman svyheckprob svyintreg svyintreg_7 svyintrg svyivreg svylc svylog_p svylogit svymarkout svymarkout_8 svymean svymlog svymlogit svynbreg svyolog svyologit svyoprob svyoprobit svyopts svypois svypois_7 svypoisson svyprobit svyprobt svyprop svyprop_7 svyratio svyreg svyreg_p svyregress svyset svyset_7 svyset_8 svytab svytab_7 svytest svytotal sw sw_8 swcnreg swcox swereg swilk swlogis swlogit swologit swoprbt swpois swprobit swqreg swtobit swweib symmetry symmi symplot symplot_7 syntax sysdescribe sysdir sysuse szroeter ta tab tab1 tab2 tab_or tabd tabdi tabdis tabdisp tabi table tabodds tabodds_7 tabstat tabu tabul tabula tabulat tabulate te tempfile tempname tempvar tes test testnl testparm teststd tetrachoric time_it timer tis tob tobi tobit tobit_p tobit_sw token tokeni tokeniz tokenize tostring total translate translator transmap treat_ll treatr_p treatreg trim trnb_cons trnb_mean trpoiss_d2 trunc_ll truncr_p truncreg tsappend tset tsfill tsline tsline_ex tsreport tsrevar tsrline tsset tssmooth tsunab ttest ttesti tut_chk tut_wait tutorial tw tware_st two twoway twoway__fpfit_serset twoway__function_gen twoway__histogram_gen twoway__ipoint_serset twoway__ipoints_serset twoway__kdensity_gen twoway__lfit_serset twoway__normgen_gen twoway__pci_serset twoway__qfit_serset twoway__scatteri_serset twoway__sunflower_gen twoway_ksm_serset ty typ type typeof u unab unabbrev unabcmd update us use uselabel var var_mkcompanion var_p varbasic varfcast vargranger varirf varirf_add varirf_cgraph varirf_create varirf_ctable varirf_describe varirf_dir varirf_drop varirf_erase varirf_graph varirf_ograph varirf_rename varirf_set varirf_table varlist varlmar varnorm varsoc varstable varstable_w varstable_w2 varwle vce vec vec_fevd vec_mkphi vec_p vec_p_w vecirf_create veclmar veclmar_w vecnorm vecnorm_w vecrank vecstable verinst vers versi versio version view viewsource vif vwls wdatetof webdescribe webseek webuse weib1_lf weib2_lf weib_lf weib_lf0 weibhet_glf weibhet_glf_sh weibhet_glfa weibhet_glfa_sh weibhet_gp weibhet_ilf weibhet_ilf_sh weibhet_ilfa weibhet_ilfa_sh weibhet_ip weibu_sw weibul_p weibull weibull_c weibull_s weibullhet wh whelp whi which whil while wilc_st wilcoxon win wind windo window winexec wntestb wntestb_7 wntestq xchart xchart_7 xcorr xcorr_7 xi xi_6 xmlsav xmlsave xmluse xpose xsh xshe xshel xshell xt_iis xt_tis xtab_p xtabond xtbin_p xtclog xtcloglog xtcloglog_8 xtcloglog_d2 xtcloglog_pa_p xtcloglog_re_p xtcnt_p xtcorr xtdata xtdes xtfront_p xtfrontier xtgee xtgee_elink xtgee_estat xtgee_makeivar xtgee_p xtgee_plink xtgls xtgls_p xthaus xthausman xtht_p xthtaylor xtile xtint_p xtintreg xtintreg_8 xtintreg_d2 xtintreg_p xtivp_1 xtivp_2 xtivreg xtline xtline_ex xtlogit xtlogit_8 xtlogit_d2 xtlogit_fe_p xtlogit_pa_p xtlogit_re_p xtmixed xtmixed_estat xtmixed_p xtnb_fe xtnb_lf xtnbreg xtnbreg_pa_p xtnbreg_refe_p xtpcse xtpcse_p xtpois xtpoisson xtpoisson_d2 xtpoisson_pa_p xtpoisson_refe_p xtpred xtprobit xtprobit_8 xtprobit_d2 xtprobit_re_p xtps_fe xtps_lf xtps_ren xtps_ren_8 xtrar_p xtrc xtrc_p xtrchh xtrefe_p xtreg xtreg_be xtreg_fe xtreg_ml xtreg_pa_p xtreg_re xtregar xtrere_p xtset xtsf_ll xtsf_llti xtsum xttab xttest0 xttobit xttobit_8 xttobit_p xttrans yx yxview__barlike_draw yxview_area_draw yxview_bar_draw yxview_dot_draw yxview_dropline_draw yxview_function_draw yxview_iarrow_draw yxview_ilabels_draw yxview_normal_draw yxview_pcarrow_draw yxview_pcbarrow_draw yxview_pccapsym_draw yxview_pcscatter_draw yxview_pcspike_draw yxview_rarea_draw yxview_rbar_draw yxview_rbarm_draw yxview_rcap_draw yxview_rcapsym_draw yxview_rconnected_draw yxview_rline_draw yxview_rscatter_draw yxview_rspike_draw yxview_spike_draw yxview_sunflower_draw zap_s zinb zinb_llf zinb_plf zip zip_llf zip_p zip_plf zt_ct_5 zt_hc_5 zt_hcd_5 zt_is_5 zt_iss_5 zt_sho_5 zt_smp_5 ztbase_5 ztcox_5 ztdes_5 ztereg_5 ztfill_5 ztgen_5 ztir_5 ztjoin_5 ztnb ztnb_p ztp ztp_p zts_5 ztset_5 ztspli_5 ztsum_5 zttoct_5 ztvary_5 ztweib_5",contains:[{className:"label",variants:[{begin:"\\$\\{?[a-zA-Z0-9_]+\\}?"},{begin:"`[a-zA-Z0-9_]+'"}]},{className:"string",variants:[{begin:'`"[^\r\n]*?"\''},{begin:'"[^\r\n"]*"'}]},{className:"literal",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\(|$)"}]},a.COMMENT("^[ ]*\\*.*$",!1),a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]}}),a.registerLanguage("step21",function(a){var b="[A-Z_][A-Z0-9_.]*",c="END-ISO-10303-21;",d={literal:"",built_in:"",keyword:"HEADER ENDSEC DATA"},e={className:"preprocessor",begin:"ISO-10303-21;",relevance:10},f=[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.COMMENT("/\\*\\*!","\\*/"),a.C_NUMBER_MODE,a.inherit(a.APOS_STRING_MODE,{illegal:null}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"label",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}];return{aliases:["p21","step","stp"],case_insensitive:!0,lexemes:b,keywords:d,contains:[{className:"preprocessor",begin:c,relevance:10},e].concat(f)}}),a.registerLanguage("stylus",function(a){var b={className:"variable",begin:"\\$"+a.IDENT_RE},c={className:"hexcolor",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})",relevance:10},d=["charset","css","debug","extend","font-face","for","import","include","media","mixin","page","warn","while"],e=["after","before","first-letter","first-line","active","first-child","focus","hover","lang","link","visited"],f=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],g="[\\.\\s\\n\\[\\:,]",h=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-variant-ligatures","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"],i=["\\{","\\}","\\?","(\\bReturn\\b)","(\\bEnd\\b)","(\\bend\\b)",";","#\\s","\\*\\s","===\\s","\\|","%"]; -return{aliases:["styl"],case_insensitive:!1,illegal:"("+i.join("|")+")",keywords:"if else for in",contains:[a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,c,{begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"+g,returnBegin:!0,contains:[{className:"class",begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"}]},{begin:"\\#[a-zA-Z][a-zA-Z0-9_-]*"+g,returnBegin:!0,contains:[{className:"id",begin:"\\#[a-zA-Z][a-zA-Z0-9_-]*"}]},{begin:"\\b("+f.join("|")+")"+g,returnBegin:!0,contains:[{className:"tag",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"}]},{className:"pseudo",begin:"&?:?:\\b("+e.join("|")+")"+g},{className:"at_rule",begin:"@("+d.join("|")+")\\b"},b,a.CSS_NUMBER_MODE,a.NUMBER_MODE,{className:"function",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*\\(.*\\)",illegal:"[\\n]",returnBegin:!0,contains:[{className:"title",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"},{className:"params",begin:/\(/,end:/\)/,contains:[c,b,a.APOS_STRING_MODE,a.CSS_NUMBER_MODE,a.NUMBER_MODE,a.QUOTE_STRING_MODE]}]},{className:"attribute",begin:"\\b("+h.reverse().join("|")+")\\b"}]}}),a.registerLanguage("swift",function(a){var b={keyword:"__COLUMN__ __FILE__ __FUNCTION__ __LINE__ as as! as? associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},c={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},d=a.COMMENT("/\\*","\\*/",{contains:["self"]}),e={className:"subst",begin:/\\\(/,end:"\\)",keywords:b,contains:[]},f={className:"number",begin:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",relevance:0},g=a.inherit(a.QUOTE_STRING_MODE,{contains:[e,a.BACKSLASH_ESCAPE]});return e.contains=[f],{keywords:b,contains:[g,a.C_LINE_COMMENT_MODE,d,c,f,{className:"func",beginKeywords:"func",end:"{",excludeEnd:!0,contains:[a.inherit(a.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/,illegal:/\(/}),{className:"generics",begin://,illegal:/>/},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:b,contains:["self",f,g,a.C_BLOCK_COMMENT_MODE,{begin:":"}],illegal:/["']/}],illegal:/\[|%/},{className:"class",beginKeywords:"struct protocol class extension enum",keywords:b,end:"\\{",excludeEnd:!0,contains:[a.inherit(a.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/})]},{className:"preprocessor",begin:"(@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain)"},{beginKeywords:"import",end:/$/,contains:[a.C_LINE_COMMENT_MODE,d]}]}}),a.registerLanguage("tcl",function(a){return{aliases:["tk"],keywords:"after append apply array auto_execok auto_import auto_load auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd chan clock close concat continue dde dict encoding eof error eval exec exit expr fblocked fconfigure fcopy file fileevent filename flush for foreach format gets glob global history http if incr info interp join lappend|10 lassign|10 lindex|10 linsert|10 list llength|10 load lrange|10 lrepeat|10 lreplace|10 lreverse|10 lsearch|10 lset|10 lsort|10 mathfunc mathop memory msgcat namespace open package parray pid pkg::create pkg_mkIndex platform platform::shell proc puts pwd read refchan regexp registry regsub|10 rename return safe scan seek set socket source split string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord tcl_startOfPreviousWord tcl_wordBreakAfter tcl_wordBreakBefore tcltest tclvars tell time tm trace unknown unload unset update uplevel upvar variable vwait while",contains:[a.COMMENT(";[ \\t]*#","$"),a.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"symbol",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",excludeEnd:!0,variants:[{begin:"\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*\\(([a-zA-Z0-9_])*\\)",end:"[^a-zA-Z0-9_\\}\\$]"},{begin:"\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"(\\))?[^a-zA-Z0-9_\\}\\$]"}]},{className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[a.inherit(a.APOS_STRING_MODE,{illegal:null}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null})]},{className:"number",variants:[a.BINARY_NUMBER_MODE,a.C_NUMBER_MODE]}]}}),a.registerLanguage("tex",function(a){var b={className:"command",begin:"\\\\[a-zA-Zа-яА-я]+[\\*]?"},c={className:"command",begin:"\\\\[^a-zA-Zа-яА-я0-9]"},d={className:"special",begin:"[{}\\[\\]\\&#~]",relevance:0};return{contains:[{begin:"\\\\[a-zA-Zа-яА-я]+[\\*]? *= *-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",returnBegin:!0,contains:[b,c,{className:"number",begin:" *=",end:"-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",excludeBegin:!0}],relevance:10},b,c,d,{className:"formula",begin:"\\$\\$",end:"\\$\\$",contains:[b,c,d],relevance:0},{className:"formula",begin:"\\$",end:"\\$",contains:[b,c,d],relevance:0},a.COMMENT("%","$",{relevance:0})]}}),a.registerLanguage("thrift",function(a){var b="bool byte i16 i32 i64 double string binary";return{keywords:{keyword:"namespace const typedef struct enum service exception void oneway set list map required optional",built_in:b,literal:"true false"},contains:[a.QUOTE_STRING_MODE,a.NUMBER_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[a.inherit(a.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",end:">",keywords:b,contains:["self"]}]}}),a.registerLanguage("tp",function(a){var b={className:"number",begin:"[1-9][0-9]*",relevance:0},c={className:"comment",begin:":[^\\]]+"},d={className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER| TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",b,c]},e={className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",b,a.QUOTE_STRING_MODE,c]};return{keywords:{keyword:"ABORT ACC ADJUST AND AP_LD BREAK CALL CNT COL CONDITION CONFIG DA DB DIV DETECT ELSE END ENDFOR ERR_NUM ERROR_PROG FINE FOR GP GUARD INC IF JMP LINEAR_MAX_SPEED LOCK MOD MONITOR OFFSET Offset OR OVERRIDE PAUSE PREG PTH RT_LD RUN SELECT SKIP Skip TA TB TO TOOL_OFFSET Tool_Offset UF UT UFRAME_NUM UTOOL_NUM UNLOCK WAIT X Y Z W P R STRLEN SUBSTR FINDSTR VOFFSET",constant:"ON OFF max_speed LPOS JPOS ENABLE DISABLE START STOP RESET"},contains:[d,e,{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},a.COMMENT("//","[;$]"),a.COMMENT("!","[;$]"),a.COMMENT("--eg:","$"),a.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"'"},a.C_NUMBER_MODE,{className:"variable",begin:"\\$[A-Za-z0-9_]+"}]}}),a.registerLanguage("twig",function(a){var b={className:"params",begin:"\\(",end:"\\)"},c="attribute block constant cycle date dump include max min parent random range source template_from_string",d={className:"function",beginKeywords:c,relevance:0,contains:[b]},e={className:"filter",begin:/\|[A-Za-z_]+:?/,keywords:"abs batch capitalize convert_encoding date date_modify default escape first format join json_encode keys last length lower merge nl2br number_format raw replace reverse round slice sort split striptags title trim upper url_encode",contains:[d]},f="autoescape block do embed extends filter flush for if import include macro sandbox set spaceless use verbatim";return f=f+" "+f.split(" ").map(function(a){return"end"+a}).join(" "),{aliases:["craftcms"],case_insensitive:!0,subLanguage:"xml",contains:[a.COMMENT(/\{#/,/#}/),{className:"template_tag",begin:/\{%/,end:/%}/,keywords:f,contains:[e,d]},{className:"variable",begin:/\{\{/,end:/}}/,contains:[e,d]}]}}),a.registerLanguage("typescript",function(a){var b={keyword:"in if for while finally var new function|0 do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class public private protected get set super static implements enum export import declare type namespace abstract",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document any number boolean string void"};return{aliases:["ts"],keywords:b,contains:[{className:"pi",begin:/^\s*['"]use strict['"]/,relevance:0},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:a.C_NUMBER_RE}],relevance:0},{begin:"("+a.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,a.REGEXP_MODE],relevance:0},{className:"function",begin:"function",end:/[\{;]/,excludeEnd:!0,keywords:b,contains:["self",a.inherit(a.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:b,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE],illegal:/["'\(]/}],illegal:/\[|%/,relevance:0},{className:"constructor",beginKeywords:"constructor",end:/\{/,excludeEnd:!0,relevance:10},{className:"module",beginKeywords:"module",end:/\{/,excludeEnd:!0},{className:"interface",beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},{begin:/\$[(.]/},{begin:"\\."+a.IDENT_RE,relevance:0}]}}),a.registerLanguage("vala",function(a){return{keywords:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib CCode Gee Object",literal:"false true null"},contains:[{className:"class",beginKeywords:"class interface delegate namespace",end:"{",excludeEnd:!0,illegal:"[^,:\\n\\s\\.]",contains:[a.UNDERSCORE_TITLE_MODE]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""',relevance:5},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,a.C_NUMBER_MODE,{className:"preprocessor",begin:"^#",end:"$",relevance:2},{className:"constant",begin:" [A-Z_]+ ",relevance:0}]}}),a.registerLanguage("vbnet",function(a){return{aliases:["vb"],case_insensitive:!0,keywords:{keyword:"addhandler addressof alias and andalso aggregate ansi as assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass namespace narrowing new next not notinheritable notoverridable of off on operator option optional or order orelse overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim rem removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly xor",built_in:"boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype date decimal directcast double gettype getxmlnamespace iif integer long object sbyte short single string trycast typeof uinteger ulong ushort",literal:"true false nothing"},illegal:"//|{|}|endif|gosub|variant|wend",contains:[a.inherit(a.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),a.COMMENT("'","$",{returnBegin:!0,contains:[{className:"xmlDocTag",begin:"'''|",contains:[a.PHRASAL_WORDS_MODE]},{className:"xmlDocTag",begin:"",contains:[a.PHRASAL_WORDS_MODE]}]}),a.C_NUMBER_MODE,{className:"preprocessor",begin:"#",end:"$",keywords:"if else elseif end region externalsource"}]}}),a.registerLanguage("vbscript",function(a){return{aliases:["vbs"],case_insensitive:!0,keywords:{keyword:"call class const dim do loop erase execute executeglobal exit for each next function if then else on error option explicit new private property let get public randomize redim rem select case set stop sub while wend with end to elseif is or xor and not class_initialize class_terminate default preserve in me byval byref step resume goto",built_in:"lcase month vartype instrrev ubound setlocale getobject rgb getref string weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency conversions csng timevalue second year space abs clng timeserial fixs len asc isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion scriptengine split scriptengineminorversion cint sin datepart ltrim sqr scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw chrw regexp server response request cstr err",literal:"true false null nothing empty"},illegal:"//",contains:[a.inherit(a.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),a.COMMENT(/'/,/$/,{relevance:0}),a.C_NUMBER_MODE]}}),a.registerLanguage("vbscript-html",function(a){return{subLanguage:"xml",contains:[{begin:"<%",end:"%>",subLanguage:"vbscript"}]}}),a.registerLanguage("verilog",function(a){return{aliases:["v"],case_insensitive:!0,keywords:{keyword:"always and assign begin buf bufif0 bufif1 case casex casez cmos deassign default defparam disable edge else end endcase endfunction endmodule endprimitive endspecify endtable endtask event for force forever fork function if ifnone initial inout input join macromodule module nand negedge nmos nor not notif0 notif1 or output parameter pmos posedge primitive pulldown pullup rcmos release repeat rnmos rpmos rtran rtranif0 rtranif1 specify specparam table task timescale tran tranif0 tranif1 wait while xnor xor",typename:"highz0 highz1 integer large medium pull0 pull1 real realtime reg scalared signed small strong0 strong1 supply0 supply0 supply1 supply1 time tri tri0 tri1 triand trior trireg vectored wand weak0 weak1 wire wor"},contains:[a.C_BLOCK_COMMENT_MODE,a.C_LINE_COMMENT_MODE,a.QUOTE_STRING_MODE,{className:"number",begin:"\\b(\\d+'(b|h|o|d|B|H|O|D))?[0-9xzXZ]+",contains:[a.BACKSLASH_ESCAPE],relevance:0},{className:"typename",begin:"\\.\\w+",relevance:0},{className:"value",begin:"#\\((?!parameter).+\\)"},{className:"keyword",begin:"\\+|-|\\*|/|%|<|>|=|#|`|\\!|&|\\||@|:|\\^|~|\\{|\\}",relevance:0}]}}),a.registerLanguage("vhdl",function(a){var b="\\d(_|\\d)*",c="[eE][-+]?"+b,d=b+"(\\."+b+")?("+c+")?",e="\\w+",f=b+"#"+e+"(\\."+e+")?#("+c+")?",g="\\b("+f+"|"+d+")";return{case_insensitive:!0,keywords:{keyword:"abs access after alias all and architecture array assert attribute begin block body buffer bus case component configuration constant context cover disconnect downto default else elsif end entity exit fairness file for force function generate generic group guarded if impure in inertial inout is label library linkage literal loop map mod nand new next nor not null of on open or others out package port postponed procedure process property protected pure range record register reject release rem report restrict restrict_guarantee return rol ror select sequence severity shared signal sla sll sra srl strong subtype then to transport type unaffected units until use variable vmode vprop vunit wait when while with xnor xor",typename:"boolean bit character severity_level integer time delay_length natural positive string bit_vector file_open_kind file_open_status std_ulogic std_ulogic_vector std_logic std_logic_vector unsigned signed boolean_vector integer_vector real_vector time_vector"},illegal:"{",contains:[a.C_BLOCK_COMMENT_MODE,a.COMMENT("--","$"),a.QUOTE_STRING_MODE,{className:"number",begin:g,relevance:0},{className:"literal",begin:"'(U|X|0|1|Z|W|L|H|-)'",contains:[a.BACKSLASH_ESCAPE]},{className:"attribute",begin:"'[A-Za-z](_?[A-Za-z0-9])*",contains:[a.BACKSLASH_ESCAPE]}]}}),a.registerLanguage("vim",function(a){return{lexemes:/[!#@\w]+/,keywords:{keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw d|0 delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu g|0 go gr grepa gu gv ha h|0 helpf helpg helpt hi hid his i|0 ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs n|0 new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf q|0 quita qa r|0 rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv s|0 sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync t|0 tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up v|0 ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"abs acos add and append argc argidx argv asin atan atan2 browse browsedir bufexists buflisted bufloaded bufname bufnr bufwinnr byte2line byteidx call ceil changenr char2nr cindent clearmatches col complete complete_add complete_check confirm copy cos cosh count cscope_connection cursor deepcopy delete did_filetype diff_filler diff_hlID empty escape eval eventhandler executable exists exp expand extend feedkeys filereadable filewritable filter finddir findfile float2nr floor fmod fnameescape fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreground function garbagecollect get getbufline getbufvar getchar getcharmod getcmdline getcmdpos getcmdtype getcwd getfontname getfperm getfsize getftime getftype getline getloclist getmatches getpid getpos getqflist getreg getregtype gettabvar gettabwinvar getwinposx getwinposy getwinvar glob globpath has has_key haslocaldir hasmapto histadd histdel histget histnr hlexists hlID hostname iconv indent index input inputdialog inputlist inputrestore inputsave inputsecret insert invert isdirectory islocked items join keys len libcall libcallnr line line2byte lispindent localtime log log10 luaeval map maparg mapcheck match matchadd matcharg matchdelete matchend matchlist matchstr max min mkdir mode mzeval nextnonblank nr2char or pathshorten pow prevnonblank printf pumvisible py3eval pyeval range readfile reltime reltimestr remote_expr remote_foreground remote_peek remote_read remote_send remove rename repeat resolve reverse round screenattr screenchar screencol screenrow search searchdecl searchpair searchpairpos searchpos server2client serverlist setbufvar setcmdpos setline setloclist setmatches setpos setqflist setreg settabvar settabwinvar setwinvar sha256 shellescape shiftwidth simplify sin sinh sort soundfold spellbadword spellsuggest split sqrt str2float str2nr strchars strdisplaywidth strftime stridx string strlen strpart strridx strtrans strwidth submatch substitute synconcealed synID synIDattr synIDtrans synstack system tabpagebuflist tabpagenr tabpagewinnr tagfiles taglist tan tanh tempname tolower toupper tr trunc type undofile undotree values virtcol visualmode wildmenumode winbufnr wincol winheight winline winnr winrestcmd winrestview winsaveview winwidth writefile xor"},illegal:/[{:]/,contains:[a.NUMBER_MODE,a.APOS_STRING_MODE,{className:"string",begin:/"((\\")|[^"\n])*("|\n)/},{className:"variable",begin:/[bwtglsav]:[\w\d_]*/},{className:"function",beginKeywords:"function function!",end:"$",relevance:0,contains:[a.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]}]}}),a.registerLanguage("x86asm",function(a){return{case_insensitive:!0,lexemes:"\\.?"+a.IDENT_RE,keywords:{keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63", -literal:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l",pseudo:"db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times",preprocessor:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr __FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public ",built_in:"bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[a.COMMENT(";","$",{relevance:0}),{className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*\\.?[0-9_]*(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},a.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"[^\\\\]`"},{begin:"\\.[A-Za-z0-9]+"}],relevance:0},{className:"label",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"argument",begin:"%[0-9]+",relevance:0},{className:"built_in",begin:"%!S+",relevance:0}]}}),a.registerLanguage("xl",function(a){var b="ObjectLoader Animate MovieCredits Slides Filters Shading Materials LensFlare Mapping VLCAudioVideo StereoDecoder PointCloud NetworkAccess RemoteControl RegExp ChromaKey Snowfall NodeJS Speech Charts",c={keyword:"if then else do while until for loop import with is as where when by data constant",literal:"true false nil",type:"integer real text name boolean symbol infix prefix postfix block tree",built_in:"in mod rem and or xor not abs sign floor ceil sqrt sin cos tan asin acos atan exp expm1 log log2 log10 log1p pi at",module:b,id:"text_length text_range text_find text_replace contains page slide basic_slide title_slide title subtitle fade_in fade_out fade_at clear_color color line_color line_width texture_wrap texture_transform texture scale_?x scale_?y scale_?z? translate_?x translate_?y translate_?z? rotate_?x rotate_?y rotate_?z? rectangle circle ellipse sphere path line_to move_to quad_to curve_to theme background contents locally time mouse_?x mouse_?y mouse_buttons"},d={className:"constant",begin:"[A-Z][A-Z_0-9]+",relevance:0},e={className:"variable",begin:"([A-Z][a-z_0-9]+)+",relevance:0},f={className:"id",begin:"[a-z][a-z_0-9]+",relevance:0},g={className:"string",begin:'"',end:'"',illegal:"\\n"},h={className:"string",begin:"'",end:"'",illegal:"\\n"},i={className:"string",begin:"<<",end:">>"},j={className:"number",begin:"[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?",relevance:10},k={className:"import",beginKeywords:"import",end:"$",keywords:{keyword:"import",module:b},relevance:0,contains:[g]},l={className:"function",begin:"[a-z].*->"};return{aliases:["tao"],lexemes:/[a-zA-Z][a-zA-Z0-9_?]*/,keywords:c,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,g,h,i,l,k,d,e,f,j,a.NUMBER_MODE]}}),a.registerLanguage("xquery",function(a){var b="for let if while then else return where group by xquery encoding versionmodule namespace boundary-space preserve strip default collation base-uri orderingcopy-namespaces order declare import schema namespace function option in allowing emptyat tumbling window sliding window start when only end when previous next stable ascendingdescending empty greatest least some every satisfies switch case typeswitch try catch andor to union intersect instance of treat as castable cast map array delete insert intoreplace value rename copy modify update",c="false true xs:string xs:integer element item xs:date xs:datetime xs:float xs:double xs:decimal QName xs:anyURI xs:long xs:int xs:short xs:byte attribute",d={className:"variable",begin:/\$[a-zA-Z0-9\-]+/,relevance:5},e={className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},f={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},g={className:"decorator",begin:"%\\w+"},h={className:"comment",begin:"\\(:",end:":\\)",relevance:10,contains:[{className:"doc",begin:"@\\w+"}]},i={begin:"{",end:"}"},j=[d,f,e,h,g,i];return i.contains=j,{aliases:["xpath","xq"],case_insensitive:!1,lexemes:/[a-zA-Z\$][a-zA-Z0-9_:\-]*/,illegal:/(proc)|(abstract)|(extends)|(until)|(#)/,keywords:{keyword:b,literal:c},contains:j}}),a.registerLanguage("zephir",function(a){var b={className:"string",contains:[a.BACKSLASH_ESCAPE],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},a.inherit(a.APOS_STRING_MODE,{illegal:null}),a.inherit(a.QUOTE_STRING_MODE,{illegal:null})]},c={variants:[a.BINARY_NUMBER_MODE,a.C_NUMBER_MODE]};return{aliases:["zep"],case_insensitive:!0,keywords:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var let while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally int uint long ulong char uchar double float bool boolean stringlikely unlikely",contains:[a.C_LINE_COMMENT_MODE,a.HASH_COMMENT_MODE,a.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),a.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler",lexemes:a.UNDERSCORE_IDENT_RE}),{className:"string",begin:"<<<['\"]?\\w+['\"]?$",end:"^\\w+;",contains:[a.BACKSLASH_ESCAPE]},{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function",end:/[;{]/,excludeEnd:!0,illegal:"\\$|\\[|%",contains:[a.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:["self",a.C_BLOCK_COMMENT_MODE,b,c]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},a.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[a.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[a.UNDERSCORE_TITLE_MODE]},{begin:"=>"},b,c]}}),a}),function(a){"use strict";function b(b,c){if(c=c||{},c.worker&&y.WORKERS_SUPPORTED){var d=k();return d.userStep=c.step,d.userChunk=c.chunk,d.userComplete=c.complete,d.userError=c.error,c.step=r(c.step),c.chunk=r(c.chunk),c.complete=r(c.complete),c.error=r(c.error),delete c.worker,void d.postMessage({input:b,config:c,workerId:d.id})}var h=null;return"string"==typeof b?h=c.download?new e(c):new g(c):(a.File&&b instanceof File||b instanceof Object)&&(h=new f(c)),h.stream(b)}function c(a,b){function c(){"object"==typeof b&&("string"==typeof b.delimiter&&1==b.delimiter.length&&-1==y.BAD_DELIMITERS.indexOf(b.delimiter)&&(i=b.delimiter),("boolean"==typeof b.quotes||b.quotes instanceof Array)&&(h=b.quotes),"string"==typeof b.newline&&(j=b.newline))}function d(a){if("object"!=typeof a)return[];var b=[];for(var c in a)b.push(c);return b}function e(a,b){var c="";"string"==typeof a&&(a=JSON.parse(a)),"string"==typeof b&&(b=JSON.parse(b));var d=a instanceof Array&&a.length>0,e=!(b[0]instanceof Array);if(d){for(var g=0;g0&&(c+=i),c+=f(a[g],g);b.length>0&&(c+=j)}for(var h=0;hl;l++){l>0&&(c+=i);var m=d&&e?a[l]:l;c+=f(b[h][m],l)}h-1||" "==a.charAt(0)||" "==a.charAt(a.length-1);return c?'"'+a+'"':a}function g(a,b){for(var c=0;c-1)return!0;return!1}var h=!1,i=",",j="\r\n";if(c(),"string"==typeof a&&(a=JSON.parse(a)),a instanceof Array){if(!a.length||a[0]instanceof Array)return e(null,a);if("object"==typeof a[0])return e(d(a[0]),a)}else if("object"==typeof a)return"string"==typeof a.data&&(a.data=JSON.parse(a.data)),a.data instanceof Array&&(a.fields||(a.fields=a.data[0]instanceof Array?a.fields:d(a.data[0])),a.data[0]instanceof Array||"object"==typeof a.data[0]||(a.data=[a.data])),e(a.fields||[],a.data||[]);throw"exception: Unable to serialize unrecognized input"}function d(b){function c(a){var b=p(a);b.chunkSize=parseInt(b.chunkSize),a.step||a.chunk||(b.chunkSize=null),this._handle=new h(b),this._handle.streamer=this,this._config=b}this._handle=null,this._paused=!1,this._finished=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},c.call(this,b),this.parseChunk=function(b){if(this.isFirstChunk&&r(this._config.beforeFirstChunk)){var c=this._config.beforeFirstChunk(b);void 0!==c&&(b=c)}this.isFirstChunk=!1;var d=this._partialLine+b;this._partialLine="";var e=this._handle.parse(d,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var f=e.meta.cursor;this._finished||(this._partialLine=d.substring(f-this._baseIndex),this._baseIndex=f),e&&e.data&&(this._rowCount+=e.data.length);var g=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(u)a.postMessage({results:e,workerId:y.WORKER_ID,finished:g});else if(r(this._config.chunk)){if(this._config.chunk(e,this._handle),this._paused)return;e=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(e.data),this._completeResults.errors=this._completeResults.errors.concat(e.errors),this._completeResults.meta=e.meta),!g||!r(this._config.complete)||e&&e.meta.aborted||this._config.complete(this._completeResults),g||e&&e.meta.paused||this._nextChunk(),e}},this._sendError=function(b){r(this._config.error)?this._config.error(b):u&&this._config.error&&a.postMessage({workerId:y.WORKER_ID,error:b,finished:!1})}}function e(a){function b(a){var b=a.getResponseHeader("Content-Range");return parseInt(b.substr(b.lastIndexOf("/")+1))}a=a||{},a.chunkSize||(a.chunkSize=y.RemoteChunkSize),d.call(this,a);var c;t?this._nextChunk=function(){this._readChunk(),this._chunkLoaded()}:this._nextChunk=function(){this._readChunk()},this.stream=function(a){this._input=a,this._nextChunk()},this._readChunk=function(){if(this._finished)return void this._chunkLoaded();if(c=new XMLHttpRequest,t||(c.onload=q(this._chunkLoaded,this),c.onerror=q(this._chunkError,this)),c.open("GET",this._input,!t),this._config.chunkSize){var a=this._start+this._config.chunkSize-1;c.setRequestHeader("Range","bytes="+this._start+"-"+a),c.setRequestHeader("If-None-Match","webkit-no-cache")}try{c.send()}catch(b){this._chunkError(b.message)}t&&0==c.status?this._chunkError():this._start+=this._config.chunkSize},this._chunkLoaded=function(){if(4==c.readyState){if(c.status<200||c.status>=400)return void this._chunkError();this._finished=!this._config.chunkSize||this._start>b(c),this.parseChunk(c.responseText)}},this._chunkError=function(a){var b=c.statusText||a;this._sendError(b)}}function f(a){a=a||{},a.chunkSize||(a.chunkSize=y.LocalChunkSize),d.call(this,a);var b,c,e="undefined"!=typeof FileReader;this.stream=function(a){this._input=a,c=a.slice||a.webkitSlice||a.mozSlice,e?(b=new FileReader,b.onload=q(this._chunkLoaded,this),b.onerror=q(this._chunkError,this)):b=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(a.target.result)},this._chunkError=function(){this._sendError(b.error)}}function g(a){a=a||{},d.call(this,a);var b,c;this.stream=function(a){return b=a,c=a,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var a=this._config.chunkSize,b=a?c.substr(0,a):c;return c=a?c.substr(a):"",this._finished=!c,this.parseChunk(b)}}}function h(a){function b(){if(v&&m&&(j("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+y.DefaultDelimiter+"'"),m=!1),a.skipEmptyLines)for(var b=0;b=u.length?(c.__parsed_extra||(c.__parsed_extra=[]),c.__parsed_extra.push(v.data[b][d])):c[u[d]]=v.data[b][d])}a.header&&(v.data[b]=c,d>u.length?j("FieldMismatch","TooManyFields","Too many fields: expected "+u.length+" fields but parsed "+d,b):d1&&(j+=Math.abs(n-e),e=n):e=n}l.data.length>0&&(k/=l.data.length),("undefined"==typeof d||d>j)&&k>1.99&&(d=j,c=h)}return a.delimiter=c,{successful:!!c,bestDelimiter:c}}function g(a){a=a.substr(0,1048576);var b=a.split("\r");if(1==b.length)return"\n";for(var c=0,d=0;d=b.length/2?"\r\n":"\r"}function h(a){var b=n.test(a);return b?parseFloat(a):a}function j(a,b,c,d){v.errors.push({type:a,code:b,message:c,row:d})}var k,l,m,n=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,o=this,q=0,s=!1,t=!1,u=[],v={data:[],errors:[],meta:{}};if(r(a.step)){var w=a.step;a.step=function(d){if(v=d,c())b();else{if(b(),0==v.data.length)return;q+=d.data.length,a.preview&&q>a.preview?l.abort():w(v,o)}}}this.parse=function(c,d,e){if(a.newline||(a.newline=g(c)),m=!1,!a.delimiter){var h=f(c);h.successful?a.delimiter=h.bestDelimiter:(m=!0,a.delimiter=y.DefaultDelimiter),v.meta.delimiter=a.delimiter}var j=p(a);return a.preview&&a.header&&j.preview++,k=c,l=new i(j),v=l.parse(k,d,e),b(),s?{meta:{paused:!0}}:v||{meta:{paused:!1}}},this.paused=function(){return s},this.pause=function(){s=!0,l.abort(),k=k.substr(l.getCharIndex())},this.resume=function(){s=!1,o.streamer.parseChunk(k)},this.aborted=function(){return t},this.abort=function(){t=!0,l.abort(),v.meta.aborted=!0,r(a.complete)&&a.complete(v),k=""}}function i(a){a=a||{};var b=a.delimiter,c=a.newline,d=a.comments,e=a.step,f=a.preview,g=a.fastMode;if(("string"!=typeof b||y.BAD_DELIMITERS.indexOf(b)>-1)&&(b=","),d===b)throw"Comment character same as delimiter";d===!0?d="#":("string"!=typeof d||y.BAD_DELIMITERS.indexOf(d)>-1)&&(d=!1),"\n"!=c&&"\r"!=c&&"\r\n"!=c&&(c="\n");var h=0,i=!1;this.parse=function(a,j,k){function l(a){v.push(a),y=h}function m(b){return k?o():("undefined"==typeof b&&(b=a.substr(h)),x.push(b),h=q,l(x),u&&p(),o())}function n(b){h=b,l(x),x=[],C=a.indexOf(c,h)}function o(a){return{data:v,errors:w,meta:{delimiter:b,linebreak:c,aborted:i,truncated:!!a,cursor:y+(j||0)}}}function p(){e(o()),v=[],w=[]}if("string"!=typeof a)throw"Input must be a string";var q=a.length,r=b.length,s=c.length,t=d.length,u="function"==typeof e;h=0;var v=[],w=[],x=[],y=0;if(!a)return o();if(g||g!==!1&&-1===a.indexOf('"')){for(var z=a.split(c),A=0;A=f)return v=v.slice(0,f),o(!0)}}return o()}for(var B=a.indexOf(b,h),C=a.indexOf(c,h);;)if('"'!=a[h])if(d&&0===x.length&&a.substr(h,t)===d){if(-1==C)return o();h=C+s,C=a.indexOf(c,h),B=a.indexOf(b,h)}else if(-1!==B&&(C>B||-1===C))x.push(a.substring(h,B)),h=B+r,B=a.indexOf(b,h);else{if(-1===C)break;if(x.push(a.substring(h,C)),n(C+s),u&&(p(),i))return o();if(f&&v.length>=f)return o(!0)}else{var D=h;for(h++;;){var D=a.indexOf('"',D+1);if(-1===D)return k||w.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:v.length,index:h}),m();if(D===q-1){var E=a.substring(h,D).replace(/""/g,'"');return m(E)}if('"'!=a[D+1]){if(a[D+1]==b){x.push(a.substring(h,D).replace(/""/g,'"')),h=D+1+r,B=a.indexOf(b,h),C=a.indexOf(c,h);break}if(a.substr(D+1,s)===c){if(x.push(a.substring(h,D).replace(/""/g,'"')),n(D+1+s),B=a.indexOf(b,h),u&&(p(),i))return o();if(f&&v.length>=f)return o(!0);break}}else D++}}return m()},this.abort=function(){i=!0},this.getCharIndex=function(){return h}}function j(){var a=document.getElementsByTagName("script");return a.length?a[a.length-1].src:""}function k(){if(!y.WORKERS_SUPPORTED)return!1;if(!v&&null===y.SCRIPT_PATH)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");var b=y.SCRIPT_PATH||s;b+=(-1!==b.indexOf("?")?"&":"?")+"papaworker";var c=new a.Worker(b);return c.onmessage=l,c.id=x++,w[c.id]=c,c}function l(a){var b=a.data,c=w[b.workerId],d=!1;if(b.error)c.userError(b.error,b.file);else if(b.results&&b.results.data){var e=function(){d=!0,m(b.workerId,{data:[],errors:[],meta:{aborted:!0}})},f={abort:e,pause:n,resume:n};if(r(c.userStep)){for(var g=0;gi;i++)e+=String.fromCharCode(f[i]);c.push(e)}else if("Blob"===b(a)||"File"===b(a)){if(!g)throw new h("NOT_READABLE_ERR");var k=new g;c.push(k.readAsBinaryString(a))}else a instanceof d?"base64"===a.encoding&&p?c.push(p(a.data)):"URI"===a.encoding?c.push(decodeURIComponent(a.data)):"raw"===a.encoding&&c.push(a.data):("string"!=typeof a&&(a+=""),c.push(unescape(encodeURIComponent(a))))},e.getBlob=function(a){return arguments.length||(a=null),new d(this.data.join(""),a,"raw")},e.toString=function(){return"[object BlobBuilder]"},f.slice=function(a,b,c){var e=arguments.length;return 3>e&&(c=null),new d(this.data.slice(a,e>1?b:this.data.length),c,this.encoding)},f.toString=function(){return"[object Blob]"},f.close=function(){this.size=0,delete this.data},c}(a);a.Blob=function(a,b){var d=b?b.type||"":"",e=new c;if(a)for(var f=0,g=a.length;g>f;f++)Uint8Array&&a[f]instanceof Uint8Array?e.append(a[f].buffer):e.append(a[f]);var h=e.getBlob(d);return!h.slice&&h.webkitSlice&&(h.slice=h.webkitSlice),h};var d=Object.getPrototypeOf||function(a){return a.__proto__};a.Blob.prototype=d(new a.Blob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this);var saveAs=saveAs||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(c){var d=b.createEvent("MouseEvents");d.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null),c.dispatchEvent(d)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},p=function(b,i){b=o(b);var l,p,q,r=this,s=b.type,t=!1,u=function(){n(r,"writestart progress write writeend".split(" "))},v=function(){if(!t&&l||(l=c().createObjectURL(b)),p)p.location.href=l;else{var d=a.open(l,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=l)}r.readyState=r.DONE,u(),m(l)},w=function(a){return function(){return r.readyState!==r.DONE?a.apply(this,arguments):void 0}},x={create:!0,exclusive:!1};return r.readyState=r.INIT,i||(i="download"),e?(l=c().createObjectURL(b),d.href=l,d.download=i,f(d),r.readyState=r.DONE,u(),void m(l)):(a.chrome&&s&&s!==j&&(q=b.slice||b.webkitSlice,b=q.call(b,0,b.size,j),t=!0),g&&"download"!==i&&(i+=".download"),(s===j||g)&&(p=a),h?(k+=b.size,void h(a.TEMPORARY,k,w(function(a){a.root.getDirectory("saved",x,w(function(a){var c=function(){a.getFile(i,x,w(function(a){a.createWriter(w(function(c){c.onwriteend=function(b){p.location.href=a.toURL(),r.readyState=r.DONE,n(r,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&v()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=r["on"+a]}),c.write(b),r.abort=function(){c.abort(),r.readyState=r.DONE},r.readyState=r.WRITING}),v)}),v)};a.getFile(i,{create:!1},w(function(a){a.remove(),c()}),w(function(a){a.code===a.NOT_FOUND_ERR?c():v()}))}),v)}),v)):void v())},q=p.prototype,r=function(a,b){return new p(a,b)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(a,b){return navigator.msSaveOrOpenBlob(o(a),b)}:(q.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},q.readyState=q.INIT=0,q.WRITING=1,q.DONE=2,q.error=q.onwritestart=q.onprogress=q.onwrite=q.onabort=q.onerror=q.onwriteend=null,r)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!=typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs}),function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gi;i++)e+=String.fromCharCode(f[i]);c.push(e)}else if("Blob"===b(a)||"File"===b(a)){if(!g)throw new h("NOT_READABLE_ERR");var k=new g;c.push(k.readAsBinaryString(a))}else a instanceof d?"base64"===a.encoding&&p?c.push(p(a.data)):"URI"===a.encoding?c.push(decodeURIComponent(a.data)):"raw"===a.encoding&&c.push(a.data):("string"!=typeof a&&(a+=""),c.push(unescape(encodeURIComponent(a))))},e.getBlob=function(a){return arguments.length||(a=null),new d(this.data.join(""),a,"raw")},e.toString=function(){return"[object BlobBuilder]"},f.slice=function(a,b,c){var e=arguments.length;return 3>e&&(c=null),new d(this.data.slice(a,e>1?b:this.data.length),c,this.encoding)},f.toString=function(){return"[object Blob]"},f.close=function(){this.size=0,delete this.data},c}(a);a.Blob=function(a,b){var d=b?b.type||"":"",e=new c;if(a)for(var f=0,g=a.length;g>f;f++)Uint8Array&&a[f]instanceof Uint8Array?e.append(a[f].buffer):e.append(a[f]);var h=e.getBlob(d);return!h.slice&&h.webkitSlice&&(h.slice=h.webkitSlice),h};var d=Object.getPrototypeOf||function(a){return a.__proto__};a.Blob.prototype=d(new a.Blob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this); -},{}],2:[function(a,b,c){var d=d||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(a){var b=new MouseEvent("click");a.dispatchEvent(b)},g=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),h=a.webkitRequestFileSystem,i=a.requestFileSystem||h||a.mozRequestFileSystem,j=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},k="application/octet-stream",l=0,m=500,n=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,m)},o=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){j(f)}}},p=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},q=function(b,j,m){m||(b=p(b));var q,r,s,t=this,u=b.type,v=!1,w=function(){o(t,"writestart progress write writeend".split(" "))},x=function(){if(r&&g&&"undefined"!=typeof FileReader){var d=new FileReader;return d.onloadend=function(){var a=d.result;r.location.href="data:attachment/file"+a.slice(a.search(/[,;]/)),t.readyState=t.DONE,w()},d.readAsDataURL(b),void(t.readyState=t.INIT)}if(!v&&q||(q=c().createObjectURL(b)),r)r.location.href=q;else{var e=a.open(q,"_blank");void 0==e&&g&&(a.location.href=q)}t.readyState=t.DONE,w(),n(q)},y=function(a){return function(){return t.readyState!==t.DONE?a.apply(this,arguments):void 0}},z={create:!0,exclusive:!1};return t.readyState=t.INIT,j||(j="download"),e?(q=c().createObjectURL(b),void setTimeout(function(){d.href=q,d.download=j,f(d),w(),n(q),t.readyState=t.DONE})):(a.chrome&&u&&u!==k&&(s=b.slice||b.webkitSlice,b=s.call(b,0,b.size,k),v=!0),h&&"download"!==j&&(j+=".download"),(u===k||h)&&(r=a),i?(l+=b.size,void i(a.TEMPORARY,l,y(function(a){a.root.getDirectory("saved",z,y(function(a){var c=function(){a.getFile(j,z,y(function(a){a.createWriter(y(function(c){c.onwriteend=function(b){r.location.href=a.toURL(),t.readyState=t.DONE,o(t,"writeend",b),n(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&x()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=t["on"+a]}),c.write(b),t.abort=function(){c.abort(),t.readyState=t.DONE},t.readyState=t.WRITING}),x)}),x)};a.getFile(j,{create:!1},y(function(a){a.remove(),c()}),y(function(a){a.code===a.NOT_FOUND_ERR?c():x()}))}),x)}),x)):void x())},r=q.prototype,s=function(a,b,c){return new q(a,b,c)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(a,b,c){return c||(a=p(a)),navigator.msSaveOrOpenBlob(a,b||"download")}:(r.abort=function(){var a=this;a.readyState=a.DONE,o(a,"abort")},r.readyState=r.INIT=0,r.WRITING=1,r.DONE=2,r.error=r.onwritestart=r.onprogress=r.onwrite=r.onabort=r.onerror=r.onwriteend=null,s)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof b&&b.exports?b.exports.saveAs=d:"undefined"!=typeof define&&null!==define&&null!=define.amd&&define([],function(){return d})},{}],3:[function(a,b,c){"use strict";angular.module("ngFileSaver",[]).factory("FileSaver",["Blob","SaveAs","FileSaverUtils",a("./angular-file-saver.service")]).factory("FileSaverUtils",[a("./utils/utils.service.js")]).factory("Blob",["$window",a("./dependencies/blob-bundle.service.js")]).factory("SaveAs",[a("./dependencies/file-saver-bundle.service.js")])},{"./angular-file-saver.service":4,"./dependencies/blob-bundle.service.js":5,"./dependencies/file-saver-bundle.service.js":6,"./utils/utils.service.js":7}],4:[function(a,b,c){"use strict";b.exports=function(a,b,c){function d(a,d,e){try{b(a,d,e)}catch(f){c.handleErrors(f.message)}}return{saveAs:function(a,b,e){return c.isBlobInstance(a)||c.handleErrors("Data argument should be a blob instance"),c.isString(b)||c.handleErrors("Filename argument should be a string"),d(a,b,e)}}}},{}],5:[function(a,b,c){"use strict";a("Blob.js"),b.exports=function(a){return a.Blob}},{"Blob.js":1}],6:[function(a,b,c){"use strict";b.exports=function(){return a("FileSaver.js").saveAs||function(){}}},{"FileSaver.js":2}],7:[function(a,b,c){"use strict";b.exports=function(){return{handleErrors:function(a){throw new Error(a)},isString:function(a){return"string"==typeof a||a instanceof String},isUndefined:function(a){return"undefined"==typeof a},isBlobInstance:function(a){return a instanceof Blob}}}},{}]},{},[3]),function(a){function b(a,b,c){switch(arguments.length){case 2:return null!=a?a:b;case 3:return null!=a?a:null!=b?b:c;default:throw new Error("Implement me")}}function c(a,b){return Ba.call(a,b)}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function e(a){va.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+a)}function f(a,b){var c=!0;return o(function(){return c&&(e(a),c=!1),b.apply(this,arguments)},b)}function g(a,b){sb[a]||(e(b),sb[a]=!0)}function h(a,b){return function(c){return r(a.call(this,c),b)}}function i(a,b){return function(c){return this.localeData().ordinal(a.call(this,c),b)}}function j(a,b){var c,d,e=12*(b.year()-a.year())+(b.month()-a.month()),f=a.clone().add(e,"months");return 0>b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)}function k(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function l(){}function m(a,b){b!==!1&&H(a),p(this,a),this._d=new Date(+a._d),ub===!1&&(ub=!0,va.updateOffset(this),ub=!1)}function n(a){var b=A(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+1e3*j+6e4*i+36e5*h,this._days=+g+7*f,this._months=+e+3*d+12*c,this._data={},this._locale=va.localeData(),this._bubble()}function o(a,b){for(var d in b)c(b,d)&&(a[d]=b[d]);return c(b,"toString")&&(a.toString=b.toString),c(b,"valueOf")&&(a.valueOf=b.valueOf),a}function p(a,b){var c,d,e;if("undefined"!=typeof b._isAMomentObject&&(a._isAMomentObject=b._isAMomentObject),"undefined"!=typeof b._i&&(a._i=b._i),"undefined"!=typeof b._f&&(a._f=b._f),"undefined"!=typeof b._l&&(a._l=b._l),"undefined"!=typeof b._strict&&(a._strict=b._strict),"undefined"!=typeof b._tzm&&(a._tzm=b._tzm),"undefined"!=typeof b._isUTC&&(a._isUTC=b._isUTC),"undefined"!=typeof b._offset&&(a._offset=b._offset),"undefined"!=typeof b._pf&&(a._pf=b._pf),"undefined"!=typeof b._locale&&(a._locale=b._locale),Ka.length>0)for(c in Ka)d=Ka[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function q(a){return 0>a?Math.ceil(a):Math.floor(a)}function r(a,b,c){for(var d=""+Math.abs(a),e=a>=0;d.lengthd;d++)(c&&a[d]!==b[d]||!c&&C(a[d])!==C(b[d]))&&g++;return g+f}function z(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=lb[a]||mb[b]||b}return a}function A(a){var b,d,e={};for(d in a)c(a,d)&&(b=z(d),b&&(e[b]=a[d]));return e}function B(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}va[b]=function(e,f){var g,h,i=va._locale[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=va().utc().set(d,a);return i.call(va._locale,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function C(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function D(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function E(a,b,c){return ja(va([a,11,31+b-c]),b,c).week}function F(a){return G(a)?366:365}function G(a){return a%4===0&&a%100!==0||a%400===0}function H(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[Da]<0||a._a[Da]>11?Da:a._a[Ea]<1||a._a[Ea]>D(a._a[Ca],a._a[Da])?Ea:a._a[Fa]<0||a._a[Fa]>24||24===a._a[Fa]&&(0!==a._a[Ga]||0!==a._a[Ha]||0!==a._a[Ia])?Fa:a._a[Ga]<0||a._a[Ga]>59?Ga:a._a[Ha]<0||a._a[Ha]>59?Ha:a._a[Ia]<0||a._a[Ia]>999?Ia:-1,a._pf._overflowDayOfYear&&(Ca>b||b>Ea)&&(b=Ea),a._pf.overflow=b)}function I(b){return null==b._isValid&&(b._isValid=!isNaN(b._d.getTime())&&b._pf.overflow<0&&!b._pf.empty&&!b._pf.invalidMonth&&!b._pf.nullInput&&!b._pf.invalidFormat&&!b._pf.userInvalidated,b._strict&&(b._isValid=b._isValid&&0===b._pf.charsLeftOver&&0===b._pf.unusedTokens.length&&b._pf.bigHour===a)),b._isValid}function J(a){return a?a.toLowerCase().replace("_","-"):a}function K(a){for(var b,c,d,e,f=0;f0;){if(d=L(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&y(e,c,!0)>=b-1)break;b--}f++}return null}function L(a){var b=null;if(!Ja[a]&&La)try{b=va.locale(),require("./locale/"+a),va.locale(b)}catch(c){}return Ja[a]}function M(a,b){var c,d;return b._isUTC?(c=b.clone(),d=(va.isMoment(a)||x(a)?+a:+va(a))-+c,c._d.setTime(+c._d+d),va.updateOffset(c,!1),c):va(a).local()}function N(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function O(a){var b,c,d=a.match(Pa);for(b=0,c=d.length;c>b;b++)rb[d[b]]?d[b]=rb[d[b]]:d[b]=N(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function P(a,b){return a.isValid()?(b=Q(b,a.localeData()),nb[b]||(nb[b]=O(b)),nb[b](a)):a.localeData().invalidDate()}function Q(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Qa.lastIndex=0;d>=0&&Qa.test(a);)a=a.replace(Qa,c),Qa.lastIndex=0,d-=1;return a}function R(a,b){var c,d=b._strict;switch(a){case"Q":return _a;case"DDDD":return bb;case"YYYY":case"GGGG":case"gggg":return d?cb:Ta;case"Y":case"G":case"g":return eb;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?db:Ua;case"S":if(d)return _a;case"SS":if(d)return ab;case"SSS":if(d)return bb;case"DDD":return Sa;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Wa;case"a":case"A":return b._locale._meridiemParse;case"x":return Za;case"X":return $a;case"Z":case"ZZ":return Xa;case"T":return Ya;case"SSSS":return Va;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?ab:Ra;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Ra;case"Do":return d?b._locale._ordinalParse:b._locale._ordinalParseLenient;default:return c=new RegExp($(Z(a.replace("\\","")),"i"))}}function S(a){a=a||"";var b=a.match(Xa)||[],c=b[b.length-1]||[],d=(c+"").match(jb)||["-",0,0],e=+(60*d[1])+C(d[2]);return"+"===d[0]?e:-e}function T(a,b,c){var d,e=c._a;switch(a){case"Q":null!=b&&(e[Da]=3*(C(b)-1));break;case"M":case"MM":null!=b&&(e[Da]=C(b)-1);break;case"MMM":case"MMMM":d=c._locale.monthsParse(b,a,c._strict),null!=d?e[Da]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[Ea]=C(b));break;case"Do":null!=b&&(e[Ea]=C(parseInt(b.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=C(b));break;case"YY":e[Ca]=va.parseTwoDigitYear(b);break;case"YYYY":case"YYYYY":case"YYYYYY":e[Ca]=C(b);break;case"a":case"A":c._meridiem=b;break;case"h":case"hh":c._pf.bigHour=!0;case"H":case"HH":e[Fa]=C(b);break;case"m":case"mm":e[Ga]=C(b);break;case"s":case"ss":e[Ha]=C(b);break;case"S":case"SS":case"SSS":case"SSSS":e[Ia]=C(1e3*("0."+b));break;case"x":c._d=new Date(C(b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=S(b);break;case"dd":case"ddd":case"dddd":d=c._locale.weekdaysParse(b),null!=d?(c._w=c._w||{},c._w.d=d):c._pf.invalidWeekday=b;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=C(b));break;case"gg":case"GG":c._w=c._w||{},c._w[a]=va.parseTwoDigitYear(b)}}function U(a){var c,d,e,f,g,h,i;c=a._w,null!=c.GG||null!=c.W||null!=c.E?(g=1,h=4,d=b(c.GG,a._a[Ca],ja(va(),1,4).year),e=b(c.W,1),f=b(c.E,1)):(g=a._locale._week.dow,h=a._locale._week.doy,d=b(c.gg,a._a[Ca],ja(va(),g,h).year),e=b(c.w,1),null!=c.d?(f=c.d,g>f&&++e):f=null!=c.e?c.e+g:g),i=ka(d,e,f,h,g),a._a[Ca]=i.year,a._dayOfYear=i.dayOfYear}function V(a){var c,d,e,f,g=[];if(!a._d){for(e=X(a),a._w&&null==a._a[Ea]&&null==a._a[Da]&&U(a),a._dayOfYear&&(f=b(a._a[Ca],e[Ca]),a._dayOfYear>F(f)&&(a._pf._overflowDayOfYear=!0),d=fa(f,0,a._dayOfYear),a._a[Da]=d.getUTCMonth(),a._a[Ea]=d.getUTCDate()),c=0;3>c&&null==a._a[c];++c)a._a[c]=g[c]=e[c];for(;7>c;c++)a._a[c]=g[c]=null==a._a[c]?2===c?1:0:a._a[c];24===a._a[Fa]&&0===a._a[Ga]&&0===a._a[Ha]&&0===a._a[Ia]&&(a._nextDay=!0,a._a[Fa]=0),a._d=(a._useUTC?fa:ea).apply(null,g),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[Fa]=24)}}function W(a){var b;a._d||(b=A(a._i),a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],V(a))}function X(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function Y(b){if(b._f===va.ISO_8601)return void aa(b);b._a=[],b._pf.empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=Q(b._f,b._locale).match(Pa)||[],c=0;c0&&b._pf.unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length),rb[f]?(d?b._pf.empty=!1:b._pf.unusedTokens.push(f),T(f,d,b)):b._strict&&!d&&b._pf.unusedTokens.push(f);b._pf.charsLeftOver=i-j,h.length>0&&b._pf.unusedInput.push(h),b._pf.bigHour===!0&&b._a[Fa]<=12&&(b._pf.bigHour=a),b._a[Fa]=k(b._locale,b._a[Fa],b._meridiem),V(b),H(b)}function Z(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function $(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function _(a){var b,c,e,f,g;if(0===a._f.length)return a._pf.invalidFormat=!0,void(a._d=new Date(NaN));for(f=0;fg)&&(e=g,c=b));o(a,c||b)}function aa(a){var b,c,d=a._i,e=fb.exec(d);if(e){for(a._pf.iso=!0,b=0,c=hb.length;c>b;b++)if(hb[b][1].exec(d)){a._f=hb[b][0]+(e[6]||" ");break}for(b=0,c=ib.length;c>b;b++)if(ib[b][1].exec(d)){a._f+=ib[b][0];break}d.match(Xa)&&(a._f+="Z"),Y(a)}else a._isValid=!1}function ba(a){aa(a),a._isValid===!1&&(delete a._isValid,va.createFromInputFallback(a))}function ca(a,b){var c,d=[];for(c=0;ca&&h.setFullYear(a),h}function fa(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function ga(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function ha(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function ia(a,b,c){var d=va.duration(a).abs(),e=Aa(d.as("s")),f=Aa(d.as("m")),g=Aa(d.as("h")),h=Aa(d.as("d")),i=Aa(d.as("M")),j=Aa(d.as("y")),k=e0,k[4]=c,ha.apply({},k)}function ja(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=va(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function ka(a,b,c,d,e){var f,g,h=fa(a,0,1).getUTCDay();return h=0===h?7:h,c=null!=c?c:e,f=e-h+(h>d?7:0)-(e>h?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:F(a-1)+g}}function la(b){var c,d=b._i,e=b._f;return b._locale=b._locale||va.localeData(b._l),null===d||e===a&&""===d?va.invalid({nullInput:!0}):("string"==typeof d&&(b._i=d=b._locale.preparse(d)),va.isMoment(d)?new m(d,!0):(e?w(e)?_(b):Y(b):da(b),c=new m(b),c._nextDay&&(c.add(1,"d"),c._nextDay=a),c))}function ma(a,b){var c,d;if(1===b.length&&w(b[0])&&(b=b[0]),!b.length)return va();for(c=b[0],d=1;d=0?"+":"-";return b+r(Math.abs(a),6)},gg:function(){return r(this.weekYear()%100,2)},gggg:function(){return r(this.weekYear(),4)},ggggg:function(){return r(this.weekYear(),5)},GG:function(){return r(this.isoWeekYear()%100,2)},GGGG:function(){return r(this.isoWeekYear(),4)},GGGGG:function(){return r(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return C(this.milliseconds()/100)},SS:function(){return r(C(this.milliseconds()/10),2)},SSS:function(){return r(this.milliseconds(),3)},SSSS:function(){return r(this.milliseconds(),3)},Z:function(){var a=this.utcOffset(),b="+";return 0>a&&(a=-a,b="-"),b+r(C(a/60),2)+":"+r(C(a)%60,2)},ZZ:function(){var a=this.utcOffset(),b="+";return 0>a&&(a=-a,b="-"),b+r(C(a/60),2)+r(C(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},sb={},tb=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"],ub=!1;pb.length;)xa=pb.pop(),rb[xa+"o"]=i(rb[xa],xa);for(;qb.length;)xa=qb.pop(),rb[xa+xa]=h(rb[xa],2);rb.DDDD=h(rb.DDD,3),o(l.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a,b,c){var d,e,f;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),d=0;12>d;d++){if(e=va.utc([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=va([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.apply(b,[c]):d},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(a){return a},postformat:function(a){return a},week:function(a){return ja(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},firstDayOfWeek:function(){return this._week.dow},firstDayOfYear:function(){return this._week.doy},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),va=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._i=b,g._f=c,g._l=e,g._strict=f,g._isUTC=!1,g._pf=d(),la(g)},va.suppressDeprecationWarnings=!1,va.createFromInputFallback=f("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),va.min=function(){var a=[].slice.call(arguments,0);return ma("isBefore",a)},va.max=function(){var a=[].slice.call(arguments,0);return ma("isAfter",a)},va.utc=function(b,c,e,f){var g;return"boolean"==typeof e&&(f=e,e=a),g={},g._isAMomentObject=!0,g._useUTC=!0,g._isUTC=!0,g._l=e,g._i=b,g._f=c,g._strict=f,g._pf=d(),la(g).utc()},va.unix=function(a){return va(1e3*a)},va.duration=function(a,b){var d,e,f,g,h=a,i=null;return va.isDuration(a)?h={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(h={},b?h[b]=a:h.milliseconds=a):(i=Na.exec(a))?(d="-"===i[1]?-1:1,h={y:0,d:C(i[Ea])*d,h:C(i[Fa])*d,m:C(i[Ga])*d,s:C(i[Ha])*d,ms:C(i[Ia])*d}):(i=Oa.exec(a))?(d="-"===i[1]?-1:1,f=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*d},h={y:f(i[2]),M:f(i[3]),d:f(i[4]),h:f(i[5]),m:f(i[6]),s:f(i[7]),w:f(i[8])}):null==h?h={}:"object"==typeof h&&("from"in h||"to"in h)&&(g=t(va(h.from),va(h.to)),h={},h.ms=g.milliseconds,h.M=g.months),e=new n(h),va.isDuration(a)&&c(a,"_locale")&&(e._locale=a._locale),e},va.version=ya,va.defaultFormat=gb,va.ISO_8601=function(){},va.momentProperties=Ka,va.updateOffset=function(){},va.relativeTimeThreshold=function(b,c){return ob[b]===a?!1:c===a?ob[b]:(ob[b]=c,!0)},va.lang=f("moment.lang is deprecated. Use moment.locale instead.",function(a,b){return va.locale(a,b)}),va.locale=function(a,b){var c;return a&&(c="undefined"!=typeof b?va.defineLocale(a,b):va.localeData(a),c&&(va.duration._locale=va._locale=c)),va._locale._abbr},va.defineLocale=function(a,b){return null!==b?(b.abbr=a,Ja[a]||(Ja[a]=new l),Ja[a].set(b),va.locale(a),Ja[a]):(delete Ja[a],null)},va.langData=f("moment.langData is deprecated. Use moment.localeData instead.",function(a){return va.localeData(a)}),va.localeData=function(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return va._locale;if(!w(a)){if(b=L(a))return b;a=[a]}return K(a)},va.isMoment=function(a){return a instanceof m||null!=a&&c(a,"_isAMomentObject")},va.isDuration=function(a){return a instanceof n};for(xa=tb.length-1;xa>=0;--xa)B(tb[xa]);va.normalizeUnits=function(a){return z(a)},va.invalid=function(a){var b=va.utc(NaN);return null!=a?o(b._pf,a):b._pf.userInvalidated=!0,b},va.parseZone=function(){return va.apply(null,arguments).parseZone()},va.parseTwoDigitYear=function(a){return C(a)+(C(a)>68?1900:2e3)},va.isDate=x,o(va.fn=m.prototype,{clone:function(){return va(this)},valueOf:function(){return+this._d-6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=va(this).utc();return 00:!1},parsingFlags:function(){return o({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(a){return this.utcOffset(0,a)},local:function(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(this._dateUtcOffset(),"m")),this},format:function(a){var b=P(this,a||va.defaultFormat);return this.localeData().postformat(b)},add:u(1,"add"),subtract:u(-1,"subtract"),diff:function(a,b,c){var d,e,f=M(a,this),g=6e4*(f.utcOffset()-this.utcOffset());return b=z(b),"year"===b||"month"===b||"quarter"===b?(e=j(this,f),"quarter"===b?e/=3:"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:q(e)},from:function(a,b){return va.duration({to:this,from:a}).locale(this.locale()).humanize(!b)},fromNow:function(a){return this.from(va(),a)},calendar:function(a){var b=a||va(),c=M(b,this).startOf("day"),d=this.diff(c,"days",!0),e=-6>d?"sameElse":-1>d?"lastWeek":0>d?"lastDay":1>d?"sameDay":2>d?"nextDay":7>d?"nextWeek":"sameElse";return this.format(this.localeData().calendar(e,this,va(b)))},isLeapYear:function(){return G(this.year())},isDST:function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=ga(a,this.localeData()),this.add(a-b,"d")):b},month:qa("Month",!0),startOf:function(a){switch(a=z(a)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),"quarter"===a&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(b){return b=z(b),b===a||"millisecond"===b?this:this.startOf(b).add(1,"isoWeek"===b?"week":b).subtract(1,"ms")},isAfter:function(a,b){var c;return b=z("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=va.isMoment(a)?a:va(a),+this>+a):(c=va.isMoment(a)?+a:+va(a),c<+this.clone().startOf(b))},isBefore:function(a,b){var c;return b=z("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=va.isMoment(a)?a:va(a),+a>+this):(c=va.isMoment(a)?+a:+va(a),+this.clone().endOf(b)a?this:a}),max:f("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){return a=va.apply(null,arguments),a>this?this:a}),zone:f("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}),utcOffset:function(a,b){var c,d=this._offset||0;return null!=a?("string"==typeof a&&(a=S(a)),Math.abs(a)<16&&(a=60*a),!this._isUTC&&b&&(c=this._dateUtcOffset()),this._offset=a,this._isUTC=!0,null!=c&&this.add(c,"m"),d!==a&&(!b||this._changeInProgress?v(this,va.duration(a-d,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,va.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?d:this._dateUtcOffset()},isLocal:function(){return!this._isUTC},isUtcOffset:function(){return this._isUTC},isUtc:function(){return this._isUTC&&0===this._offset},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(S(this._i)),this},hasAlignedHourOffset:function(a){return a=a?va(a).utcOffset():0,(this.utcOffset()-a)%60===0},daysInMonth:function(){return D(this.year(),this.month())},dayOfYear:function(a){var b=Aa((va(this).startOf("day")-va(this).startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")},quarter:function(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)},weekYear:function(a){var b=ja(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==a?b:this.add(a-b,"y")},isoWeekYear:function(a){var b=ja(this,1,4).year;return null==a?b:this.add(a-b,"y")},week:function(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")},isoWeek:function(a){var b=ja(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")},weekday:function(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return E(this.year(),1,4)},weeksInYear:function(){var a=this.localeData()._week;return E(this.year(),a.dow,a.doy)},get:function(a){return a=z(a),this[a]()},set:function(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else a=z(a),"function"==typeof this[a]&&this[a](b);return this},locale:function(b){var c;return b===a?this._locale._abbr:(c=va.localeData(b),null!=c&&(this._locale=c),this)},lang:f("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(b){return b===a?this.localeData():this.locale(b)}),localeData:function(){return this._locale},_dateUtcOffset:function(){return 15*-Math.round(this._d.getTimezoneOffset()/15)}}),va.fn.millisecond=va.fn.milliseconds=qa("Milliseconds",!1),va.fn.second=va.fn.seconds=qa("Seconds",!1),va.fn.minute=va.fn.minutes=qa("Minutes",!1),va.fn.hour=va.fn.hours=qa("Hours",!0),va.fn.date=qa("Date",!0),va.fn.dates=f("dates accessor is deprecated. Use date instead.",qa("Date",!0)),va.fn.year=qa("FullYear",!0),va.fn.years=f("years accessor is deprecated. Use year instead.",qa("FullYear",!0)),va.fn.days=va.fn.day,va.fn.months=va.fn.month,va.fn.weeks=va.fn.week,va.fn.isoWeeks=va.fn.isoWeek,va.fn.quarters=va.fn.quarter,va.fn.toJSON=va.fn.toISOString,va.fn.isUTC=va.fn.isUtc,o(va.duration.fn=n.prototype,{_bubble:function(){var a,b,c,d=this._milliseconds,e=this._days,f=this._months,g=this._data,h=0;g.milliseconds=d%1e3,a=q(d/1e3),g.seconds=a%60,b=q(a/60),g.minutes=b%60,c=q(b/60),g.hours=c%24,e+=q(c/24),h=q(ra(e)),e-=q(sa(h)),f+=q(e/30),e%=30,h+=q(f/12),f%=12,g.days=e,g.months=f,g.years=h},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return q(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*C(this._months/12)},humanize:function(a){var b=ia(this,!a,this.localeData());return a&&(b=this.localeData().pastFuture(+this,b)),this.localeData().postformat(b)},add:function(a,b){var c=va.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=va.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=z(a),this[a.toLowerCase()+"s"]()},as:function(a){var b,c;if(a=z(a),"month"===a||"year"===a)return b=this._days+this._milliseconds/864e5,c=this._months+12*ra(b),"month"===a?c:c/12;switch(b=this._days+Math.round(sa(this._months/12)),a){case"week":return b/7+this._milliseconds/6048e5;case"day":return b+this._milliseconds/864e5;case"hour":return 24*b+this._milliseconds/36e5;case"minute":return 24*b*60+this._milliseconds/6e4;case"second":return 24*b*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*b*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+a)}},lang:va.fn.lang,locale:va.fn.locale,toIsoString:f("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"},localeData:function(){return this._locale},toJSON:function(){return this.toISOString()}}),va.duration.fn.toString=va.duration.fn.toISOString;for(xa in kb)c(kb,xa)&&ta(xa.toLowerCase());va.duration.fn.asMilliseconds=function(){return this.as("ms")},va.duration.fn.asSeconds=function(){return this.as("s")},va.duration.fn.asMinutes=function(){return this.as("m")},va.duration.fn.asHours=function(){return this.as("h")},va.duration.fn.asDays=function(){return this.as("d")},va.duration.fn.asWeeks=function(){return this.as("weeks")},va.duration.fn.asMonths=function(){return this.as("M")},va.duration.fn.asYears=function(){return this.as("y")},va.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===C(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),La?module.exports=va:"function"==typeof define&&define.amd?(define(function(a,b,c){return c.config&&c.config()&&c.config().noGlobal===!0&&(za.moment=wa),va}),ua(!0)):ua()}.call(this),function(a,b){if("function"==typeof define&&define.amd)define(["moment","jquery","exports"],function(c,d,e){a.daterangepicker=b(a,e,c,d)});else if("undefined"!=typeof exports){var c,d=require("moment");try{c=require("jquery")}catch(e){if(c=window.jQuery,!c)throw new Error("jQuery dependency not found")}b(a,exports,d,c)}else a.daterangepicker=b(a,{},a.moment,a.jQuery||a.Zepto||a.ender||a.$)}(this,function(a,b,c,d){var e=function(a,b,c){this.parentEl="body",this.element=d(a),this.isShowing=!1;var e='';"object"==typeof b&&null!==b||(b={}),this.parentEl=d("object"==typeof b&&b.parentEl&&d(b.parentEl).length?b.parentEl:this.parentEl),this.container=d(e).appendTo(this.parentEl),this.setOptions(b,c);var f=this.container;d.each(this.buttonClasses,function(a,b){f.find("button").addClass(b)}),this.container.find(".daterangepicker_start_input label").html(this.locale.fromLabel),this.container.find(".daterangepicker_end_input label").html(this.locale.toLabel),this.applyClass.length&&this.container.find(".applyBtn").addClass(this.applyClass),this.cancelClass.length&&this.container.find(".cancelBtn").addClass(this.cancelClass),this.container.find(".applyBtn").html(this.locale.applyLabel),this.container.find(".cancelBtn").html(this.locale.cancelLabel),this.container.find(".calendar").on("click.daterangepicker",".prev",d.proxy(this.clickPrev,this)).on("click.daterangepicker",".next",d.proxy(this.clickNext,this)).on("click.daterangepicker","td.available",d.proxy(this.clickDate,this)).on("mouseenter.daterangepicker","td.available",d.proxy(this.hoverDate,this)).on("mouseleave.daterangepicker","td.available",d.proxy(this.updateFormInputs,this)).on("change.daterangepicker","select.yearselect",d.proxy(this.updateMonthYear,this)).on("change.daterangepicker","select.monthselect",d.proxy(this.updateMonthYear,this)).on("change.daterangepicker","select.hourselect,select.minuteselect,select.secondselect,select.ampmselect",d.proxy(this.updateTime,this)),this.container.find(".ranges").on("click.daterangepicker","button.applyBtn",d.proxy(this.clickApply,this)).on("click.daterangepicker","button.cancelBtn",d.proxy(this.clickCancel,this)).on("click.daterangepicker",".daterangepicker_start_input,.daterangepicker_end_input",d.proxy(this.showCalendars,this)).on("change.daterangepicker",".daterangepicker_start_input,.daterangepicker_end_input",d.proxy(this.inputsChanged,this)).on("keydown.daterangepicker",".daterangepicker_start_input,.daterangepicker_end_input",d.proxy(this.inputsKeydown,this)).on("click.daterangepicker","li",d.proxy(this.clickRange,this)).on("mouseenter.daterangepicker","li",d.proxy(this.enterRange,this)).on("mouseleave.daterangepicker","li",d.proxy(this.updateFormInputs,this)),this.element.is("input")?this.element.on({"click.daterangepicker":d.proxy(this.show,this),"focus.daterangepicker":d.proxy(this.show,this),"keyup.daterangepicker":d.proxy(this.updateFromControl,this)}):this.element.on("click.daterangepicker",d.proxy(this.toggle,this))};e.prototype={constructor:e,setOptions:function(a,b){if(this.startDate=c().startOf("day"),this.endDate=c().endOf("day"),this.timeZone=c().zone(),this.minDate=!1,this.maxDate=!1,this.dateLimit=!1,this.showDropdowns=!1,this.showWeekNumbers=!1,this.timePicker=!1,this.timePickerSeconds=!1,this.timePickerIncrement=30,this.timePicker12Hour=!0,this.singleDatePicker=!1,this.ranges={},this.opens="right",this.element.hasClass("pull-right")&&(this.opens="left"),this.buttonClasses=["btn","btn-small btn-sm"],this.applyClass="btn-success",this.cancelClass="btn-default",this.format="MM/DD/YYYY",this.separator=" - ",this.locale={applyLabel:"Apply",cancelLabel:"Cancel",fromLabel:"From",toLabel:"To",weekLabel:"W",customRangeLabel:"Custom Range",daysOfWeek:c.weekdaysMin(),monthNames:c.monthsShort(),firstDay:c.localeData()._week.dow},this.cb=function(){},"string"==typeof a.format&&(this.format=a.format),"string"==typeof a.separator&&(this.separator=a.separator),"string"==typeof a.startDate&&(this.startDate=c(a.startDate,this.format)),"string"==typeof a.endDate&&(this.endDate=c(a.endDate,this.format)),"string"==typeof a.minDate&&(this.minDate=c(a.minDate,this.format)),"string"==typeof a.maxDate&&(this.maxDate=c(a.maxDate,this.format)),"object"==typeof a.startDate&&(this.startDate=c(a.startDate)),"object"==typeof a.endDate&&(this.endDate=c(a.endDate)),"object"==typeof a.minDate&&(this.minDate=c(a.minDate)),"object"==typeof a.maxDate&&(this.maxDate=c(a.maxDate)),"string"==typeof a.applyClass&&(this.applyClass=a.applyClass),"string"==typeof a.cancelClass&&(this.cancelClass=a.cancelClass),"object"==typeof a.dateLimit&&(this.dateLimit=a.dateLimit),"object"==typeof a.locale&&("object"==typeof a.locale.daysOfWeek&&(this.locale.daysOfWeek=a.locale.daysOfWeek.slice()),"object"==typeof a.locale.monthNames&&(this.locale.monthNames=a.locale.monthNames.slice()),"number"==typeof a.locale.firstDay&&(this.locale.firstDay=a.locale.firstDay),"string"==typeof a.locale.applyLabel&&(this.locale.applyLabel=a.locale.applyLabel),"string"==typeof a.locale.cancelLabel&&(this.locale.cancelLabel=a.locale.cancelLabel),"string"==typeof a.locale.fromLabel&&(this.locale.fromLabel=a.locale.fromLabel),"string"==typeof a.locale.toLabel&&(this.locale.toLabel=a.locale.toLabel),"string"==typeof a.locale.weekLabel&&(this.locale.weekLabel=a.locale.weekLabel),"string"==typeof a.locale.customRangeLabel&&(this.locale.customRangeLabel=a.locale.customRangeLabel)),"string"==typeof a.opens&&(this.opens=a.opens),"boolean"==typeof a.showWeekNumbers&&(this.showWeekNumbers=a.showWeekNumbers),"string"==typeof a.buttonClasses&&(this.buttonClasses=[a.buttonClasses]),"object"==typeof a.buttonClasses&&(this.buttonClasses=a.buttonClasses),"boolean"==typeof a.showDropdowns&&(this.showDropdowns=a.showDropdowns),"boolean"==typeof a.singleDatePicker&&(this.singleDatePicker=a.singleDatePicker,this.singleDatePicker&&(this.endDate=this.startDate.clone())),"boolean"==typeof a.timePicker&&(this.timePicker=a.timePicker),"boolean"==typeof a.timePickerSeconds&&(this.timePickerSeconds=a.timePickerSeconds),"number"==typeof a.timePickerIncrement&&(this.timePickerIncrement=a.timePickerIncrement),"boolean"==typeof a.timePicker12Hour&&(this.timePicker12Hour=a.timePicker12Hour),0!=this.locale.firstDay)for(var e=this.locale.firstDay;e>0;)this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift()),e--;var f,g,h;if("undefined"==typeof a.startDate&&"undefined"==typeof a.endDate&&d(this.element).is("input[type=text]")){var i=d(this.element).val(),j=i.split(this.separator);f=g=null,2==j.length?(f=c(j[0],this.format),g=c(j[1],this.format)):this.singleDatePicker&&""!==i&&(f=c(i,this.format),g=c(i,this.format)),null!==f&&null!==g&&(this.startDate=f,this.endDate=g)}if("string"==typeof a.timeZone||"number"==typeof a.timeZone?(this.timeZone=a.timeZone,this.startDate.zone(this.timeZone),this.endDate.zone(this.timeZone)):this.timeZone=c(this.startDate).zone(),"object"==typeof a.ranges){for(h in a.ranges)f="string"==typeof a.ranges[h][0]?c(a.ranges[h][0],this.format):c(a.ranges[h][0]),g="string"==typeof a.ranges[h][1]?c(a.ranges[h][1],this.format):c(a.ranges[h][1]),this.minDate&&f.isBefore(this.minDate)&&(f=c(this.minDate)),this.maxDate&&g.isAfter(this.maxDate)&&(g=c(this.maxDate)),this.minDate&&g.isBefore(this.minDate)||this.maxDate&&f.isAfter(this.maxDate)||(this.ranges[h]=[f,g]);var k="
                ";for(h in this.ranges)k+="
              • "+h+"
              • ";k+="
              • "+this.locale.customRangeLabel+"
              • ",k+="
              ",this.container.find(".ranges ul").remove(),this.container.find(".ranges").prepend(k)}if("function"==typeof b&&(this.cb=b),this.timePicker||(this.startDate=this.startDate.startOf("day"),this.endDate=this.endDate.endOf("day")),this.singleDatePicker?(this.opens="right",this.container.addClass("single"),this.container.find(".calendar.right").show(),this.container.find(".calendar.left").hide(),this.timePicker?this.container.find(".ranges .daterangepicker_start_input, .ranges .daterangepicker_end_input").hide():this.container.find(".ranges").hide(),this.container.find(".calendar.right").hasClass("single")||this.container.find(".calendar.right").addClass("single")):(this.container.removeClass("single"),this.container.find(".calendar.right").removeClass("single"),this.container.find(".ranges").show()),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.oldChosenLabel=this.chosenLabel,this.leftCalendar={month:c([this.startDate.year(),this.startDate.month(),1,this.startDate.hour(),this.startDate.minute(),this.startDate.second()]),calendar:[]},this.rightCalendar={month:c([this.endDate.year(),this.endDate.month(),1,this.endDate.hour(),this.endDate.minute(),this.endDate.second()]),calendar:[]},"right"==this.opens||"center"==this.opens){var l=this.container.find(".calendar.first"),m=this.container.find(".calendar.second");m.hasClass("single")&&(m.removeClass("single"),l.addClass("single")),l.removeClass("left").addClass("right"),m.removeClass("right").addClass("left"),this.singleDatePicker&&(l.show(),m.hide())}"undefined"!=typeof a.ranges||this.singleDatePicker||this.container.addClass("show-calendar"),this.container.addClass("opens"+this.opens),this.updateView(),this.updateCalendars()},setStartDate:function(a){"string"==typeof a&&(this.startDate=c(a,this.format).zone(this.timeZone)),"object"==typeof a&&(this.startDate=c(a)),this.timePicker||(this.startDate=this.startDate.startOf("day")),this.oldStartDate=this.startDate.clone(),this.updateView(),this.updateCalendars(),this.updateInputText()},setEndDate:function(a){"string"==typeof a&&(this.endDate=c(a,this.format).zone(this.timeZone)),"object"==typeof a&&(this.endDate=c(a)),this.timePicker||(this.endDate=this.endDate.endOf("day")),this.oldEndDate=this.endDate.clone(),this.updateView(),this.updateCalendars(),this.updateInputText()},updateView:function(){this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()).hour(this.startDate.hour()).minute(this.startDate.minute()),this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()).hour(this.endDate.hour()).minute(this.endDate.minute()),this.updateFormInputs()},updateFormInputs:function(){this.container.find("input[name=daterangepicker_start]").val(this.startDate.format(this.format)),this.container.find("input[name=daterangepicker_end]").val(this.endDate.format(this.format)),this.startDate.isSame(this.endDate)||this.startDate.isBefore(this.endDate)?this.container.find("button.applyBtn").removeAttr("disabled"):this.container.find("button.applyBtn").attr("disabled","disabled")},updateFromControl:function(){if(this.element.is("input")&&this.element.val().length){var a=this.element.val().split(this.separator),b=null,d=null;2===a.length&&(b=c(a[0],this.format).zone(this.timeZone),d=c(a[1],this.format).zone(this.timeZone)),(this.singleDatePicker||null===b||null===d)&&(b=c(this.element.val(),this.format).zone(this.timeZone),d=b),d.isBefore(b)||(this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.startDate=b,this.endDate=d,this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.notify(),this.updateCalendars())}},notify:function(){this.updateView(),this.cb(this.startDate,this.endDate,this.chosenLabel)},move:function(){var a={top:0,left:0},b=d(window).width();this.parentEl.is("body")||(a={top:this.parentEl.offset().top-this.parentEl.scrollTop(),left:this.parentEl.offset().left-this.parentEl.scrollLeft()},b=this.parentEl[0].clientWidth+this.parentEl.offset().left),"left"==this.opens?(this.container.css({top:this.element.offset().top+this.element.outerHeight()-a.top,right:b-this.element.offset().left-this.element.outerWidth(),left:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):"center"==this.opens?(this.container.css({top:this.element.offset().top+this.element.outerHeight()-a.top,left:this.element.offset().left-a.left+this.element.outerWidth()/2-this.container.outerWidth()/2,right:"auto"}),this.container.offset().left<0&&this.container.css({right:"auto",left:9})):(this.container.css({top:this.element.offset().top+this.element.outerHeight()-a.top,left:this.element.offset().left-a.left,right:"auto"}),this.container.offset().left+this.container.outerWidth()>d(window).width()&&this.container.css({left:"auto",right:0}))},toggle:function(a){this.element.hasClass("active")?this.hide():this.show()},show:function(a){this.isShowing||(this.element.addClass("active"),this.container.show(),this.move(),this._outsideClickProxy=d.proxy(function(a){this.outsideClick(a)},this),d(document).on("mousedown.daterangepicker",this._outsideClickProxy).on("touchend.daterangepicker",this._outsideClickProxy).on("click.daterangepicker","[data-toggle=dropdown]",this._outsideClickProxy).on("focusin.daterangepicker",this._outsideClickProxy),this.isShowing=!0,this.element.trigger("show.daterangepicker",this))},outsideClick:function(a){var b=d(a.target);"focusin"==a.type||b.closest(this.element).length||b.closest(this.container).length||b.closest(".calendar-date").length||this.hide()},hide:function(a){this.isShowing&&(d(document).off(".daterangepicker"),this.element.removeClass("active"),this.container.hide(),this.startDate.isSame(this.oldStartDate)&&this.endDate.isSame(this.oldEndDate)||this.notify(),this.oldStartDate=this.startDate.clone(),this.oldEndDate=this.endDate.clone(),this.isShowing=!1,this.element.trigger("hide.daterangepicker",this))},enterRange:function(a){var b=a.target.innerHTML;if(b==this.locale.customRangeLabel)this.updateView();else{var c=this.ranges[b];this.container.find("input[name=daterangepicker_start]").val(c[0].format(this.format)),this.container.find("input[name=daterangepicker_end]").val(c[1].format(this.format))}},showCalendars:function(){this.container.addClass("show-calendar"),this.move(),this.element.trigger("showCalendar.daterangepicker",this)},hideCalendars:function(){this.container.removeClass("show-calendar"),this.element.trigger("hideCalendar.daterangepicker",this)},inputsChanged:function(a){var b=d(a.target),e=c(b.val(),this.format);if(e.isValid()){var f,g;"daterangepicker_start"===b.attr("name")?(f=e,g=this.endDate):(f=this.startDate,g=e),this.setCustomDates(f,g)}},inputsKeydown:function(a){13===a.keyCode&&(this.inputsChanged(a),this.notify())},updateInputText:function(){this.element.is("input")&&!this.singleDatePicker?this.element.val(this.startDate.format(this.format)+this.separator+this.endDate.format(this.format)):this.element.is("input")&&this.element.val(this.endDate.format(this.format))},clickRange:function(a){var b=a.target.innerHTML;if(this.chosenLabel=b,b==this.locale.customRangeLabel)this.showCalendars();else{var c=this.ranges[b];this.startDate=c[0],this.endDate=c[1],this.timePicker||(this.startDate.startOf("day"),this.endDate.endOf("day")),this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()).hour(this.startDate.hour()).minute(this.startDate.minute()),this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()).hour(this.endDate.hour()).minute(this.endDate.minute()),this.updateCalendars(),this.updateInputText(),this.hideCalendars(),this.hide(),this.element.trigger("apply.daterangepicker",this)}},clickPrev:function(a){var b=d(a.target).parents(".calendar");b.hasClass("left")?this.leftCalendar.month.subtract(1,"month"):this.rightCalendar.month.subtract(1,"month"),this.updateCalendars()},clickNext:function(a){var b=d(a.target).parents(".calendar");b.hasClass("left")?this.leftCalendar.month.add(1,"month"):this.rightCalendar.month.add(1,"month"),this.updateCalendars()},hoverDate:function(a){var b=d(a.target).attr("data-title"),c=b.substr(1,1),e=b.substr(3,1),f=d(a.target).parents(".calendar");f.hasClass("left")?this.container.find("input[name=daterangepicker_start]").val(this.leftCalendar.calendar[c][e].format(this.format)):this.container.find("input[name=daterangepicker_end]").val(this.rightCalendar.calendar[c][e].format(this.format))},setCustomDates:function(a,b){if(this.chosenLabel=this.locale.customRangeLabel,a.isAfter(b)){var d=this.endDate.diff(this.startDate);b=c(a).add(d,"ms")}this.startDate=a,this.endDate=b,this.updateView(),this.updateCalendars()},clickDate:function(a){var b,e,f=d(a.target).attr("data-title"),g=f.substr(1,1),h=f.substr(3,1),i=d(a.target).parents(".calendar");if(i.hasClass("left")){if(b=this.leftCalendar.calendar[g][h],e=this.endDate,"object"==typeof this.dateLimit){var j=c(b).add(this.dateLimit).startOf("day");e.isAfter(j)&&(e=j)}}else if(b=this.startDate,e=this.rightCalendar.calendar[g][h],"object"==typeof this.dateLimit){var k=c(e).subtract(this.dateLimit).startOf("day");b.isBefore(k)&&(b=k)}this.singleDatePicker&&i.hasClass("left")?e=b.clone():this.singleDatePicker&&i.hasClass("right")&&(b=e.clone()),i.find("td").removeClass("active"),d(a.target).addClass("active"),this.setCustomDates(b,e),this.timePicker||e.endOf("day"),this.singleDatePicker&&!this.timePicker&&this.clickApply()},clickApply:function(a){this.updateInputText(),this.hide(),this.element.trigger("apply.daterangepicker",this)},clickCancel:function(a){this.startDate=this.oldStartDate,this.endDate=this.oldEndDate,this.chosenLabel=this.oldChosenLabel,this.updateView(),this.updateCalendars(),this.hide(),this.element.trigger("cancel.daterangepicker",this)},updateMonthYear:function(a){var b=d(a.target).closest(".calendar").hasClass("left"),c=b?"left":"right",e=this.container.find(".calendar."+c),f=parseInt(e.find(".monthselect").val(),10),g=e.find(".yearselect").val();this[c+"Calendar"].month.month(f).year(g),this.updateCalendars()},updateTime:function(a){var b=d(a.target).closest(".calendar"),c=b.hasClass("left"),e=parseInt(b.find(".hourselect").val(),10),f=parseInt(b.find(".minuteselect").val(),10),g=0;if(this.timePickerSeconds&&(g=parseInt(b.find(".secondselect").val(),10)),this.timePicker12Hour){var h=b.find(".ampmselect").val();"PM"===h&&12>e&&(e+=12),"AM"===h&&12===e&&(e=0)}if(c){var i=this.startDate.clone();i.hour(e),i.minute(f),i.second(g),this.startDate=i,this.leftCalendar.month.hour(e).minute(f).second(g),this.singleDatePicker&&(this.endDate=i.clone())}else{var j=this.endDate.clone();j.hour(e),j.minute(f),j.second(g),this.endDate=j,this.singleDatePicker&&(this.startDate=j.clone()),this.rightCalendar.month.hour(e).minute(f).second(g)}this.updateView(),this.updateCalendars()},updateCalendars:function(){this.leftCalendar.calendar=this.buildCalendar(this.leftCalendar.month.month(),this.leftCalendar.month.year(),this.leftCalendar.month.hour(),this.leftCalendar.month.minute(),this.leftCalendar.month.second(),"left"),this.rightCalendar.calendar=this.buildCalendar(this.rightCalendar.month.month(),this.rightCalendar.month.year(),this.rightCalendar.month.hour(),this.rightCalendar.month.minute(),this.rightCalendar.month.second(),"right"),this.container.find(".calendar.left").empty().html(this.renderCalendar(this.leftCalendar.calendar,this.startDate,this.minDate,this.maxDate,"left")),this.container.find(".calendar.right").empty().html(this.renderCalendar(this.rightCalendar.calendar,this.endDate,this.singleDatePicker?this.minDate:this.startDate,this.maxDate,"right")),this.container.find(".ranges li").removeClass("active");var a=!0,b=0;for(var c in this.ranges)this.timePicker?this.startDate.isSame(this.ranges[c][0])&&this.endDate.isSame(this.ranges[c][1])&&(a=!1,this.chosenLabel=this.container.find(".ranges li:eq("+b+")").addClass("active").html()):this.startDate.format("YYYY-MM-DD")==this.ranges[c][0].format("YYYY-MM-DD")&&this.endDate.format("YYYY-MM-DD")==this.ranges[c][1].format("YYYY-MM-DD")&&(a=!1,this.chosenLabel=this.container.find(".ranges li:eq("+b+")").addClass("active").html()),b++;a&&(this.chosenLabel=this.container.find(".ranges li:last").addClass("active").html(),this.showCalendars())},buildCalendar:function(a,b,d,e,f,g){var h,i=c([b,a]).daysInMonth(),j=c([b,a,1]),k=c([b,a,i]),l=c(j).subtract(1,"month").month(),m=c(j).subtract(1,"month").year(),n=c([m,l]).daysInMonth(),o=j.day(),p=[];for(p.firstDay=j,p.lastDay=k,h=0;6>h;h++)p[h]=[];var q=n-o+this.locale.firstDay+1;q>n&&(q-=7),o==this.locale.firstDay&&(q=n-6);var r,s,t=c([m,l,q,12,e,f]).zone(this.timeZone);for(h=0,r=0,s=0;42>h;h++,r++,t=c(t).add(24,"hour"))h>0&&r%7===0&&(r=0,s++),p[s][r]=t.clone().hour(d),t.hour(12),this.minDate&&p[s][r].format("YYYY-MM-DD")==this.minDate.format("YYYY-MM-DD")&&p[s][r].isBefore(this.minDate)&&"left"==g&&(p[s][r]=this.minDate.clone()),this.maxDate&&p[s][r].format("YYYY-MM-DD")==this.maxDate.format("YYYY-MM-DD")&&p[s][r].isAfter(this.maxDate)&&"right"==g&&(p[s][r]=this.maxDate.clone());return p},renderDropdowns:function(a,b,c){for(var d=a.month(),e=a.year(),f=c&&c.year()||e+5,g=b&&b.year()||e-50,h='";for(var l='",h+l},renderCalendar:function(a,b,c,e,f){var g='
              ';g+='',g+="",g+="",this.showWeekNumbers&&(g+=""),g+=!c||c.isBefore(a.firstDay)?'':"";var h=this.locale.monthNames[a[1][1].month()]+a[1][1].format(" YYYY");this.showDropdowns&&(h=this.renderDropdowns(a[1][1],c,e)),g+='",g+=!e||e.isAfter(a.lastDay)?'':"",g+="",g+="",this.showWeekNumbers&&(g+='"),d.each(this.locale.daysOfWeek,function(a,b){g+=""}),g+="",g+="",g+="";for(var i=0;6>i;i++){g+="",this.showWeekNumbers&&(g+='");for(var j=0;7>j;j++){var k="available ";k+=a[i][j].month()==a[1][1].month()?"":"off",c&&a[i][j].isBefore(c,"day")||e&&a[i][j].isAfter(e,"day")?k=" off disabled ":a[i][j].format("YYYY-MM-DD")==b.format("YYYY-MM-DD")?(k+=" active ",a[i][j].format("YYYY-MM-DD")==this.startDate.format("YYYY-MM-DD")&&(k+=" start-date "),a[i][j].format("YYYY-MM-DD")==this.endDate.format("YYYY-MM-DD")&&(k+=" end-date ")):a[i][j]>=this.startDate&&a[i][j]<=this.endDate&&(k+=" in-range ",a[i][j].isSame(this.startDate)&&(k+=" start-date "),a[i][j].isSame(this.endDate)&&(k+=" end-date "));var l="r"+i+"c"+j;g+='"}g+=""}g+="",g+="
              '+h+"
              '+this.locale.weekLabel+""+b+"
              '+a[i][0].week()+"'+a[i][j].date()+"
              ",g+="
              ";var m;if(this.timePicker){g+='
              ',g+=' : ",g+=' ",this.timePickerSeconds){for(g+=': "}if(this.timePicker12Hour){g+='"}g+="
              "}return g},remove:function(){this.container.remove(),this.element.off(".daterangepicker"),this.element.removeData("daterangepicker")}},d.fn.daterangepicker=function(a,b){return this.each(function(){var c=d(this);c.data("daterangepicker")&&c.data("daterangepicker").remove(),c.data("daterangepicker",new e(c,a,b))}),this}}),function(a){"use strict";a.module("ngBootstrap",[]).directive("input",["$compile","$parse","$filter",function(b,c,d){return{restrict:"E",require:"?ngModel",link:function(b,e,f,g){function h(a){return moment.isMoment(a)?a.toDate():a}function i(a){return moment.isMoment(a)?a:moment(a)}function j(a){return d("date")(h(a),l.format.replace(/Y/g,"y").replace(/D/g,"d"))}function k(a){return[j(a.startDate),j(a.endDate)].join(l.separator)}if("daterange"===f.type&&null!==g){var l={};l.format=f.format||"YYYY-MM-DD",l.separator=f.separator||" - ",l.minDate=f.minDate&&moment(f.minDate),l.maxDate=f.maxDate&&moment(f.maxDate),l.dateLimit=f.limit&&moment.duration.apply(this,f.limit.split(" ").map(function(a,b){return 0===b&&parseInt(a,10)||a})),l.ranges=f.ranges&&c(f.ranges)(b),l.locale=f.locale&&c(f.locale)(b),l.opens=f.opens||c(f.opens)(b),f.enabletimepicker&&(l.timePicker=!0,a.extend(l,c(f.enabletimepicker)(b))),g.$render=function(){g.$viewValue&&g.$viewValue.startDate&&e.val(k(g.$viewValue))},b.$watch(function(){return f.ngModel},function(a,c){return b[a]&&b[a].startDate?void(c===a&&(e.data("daterangepicker").startDate=i(b[a].startDate),e.data("daterangepicker").endDate=i(b[a].endDate),e.data("daterangepicker").updateView(),e.data("daterangepicker").updateCalendars(),e.data("daterangepicker").updateInputText())):void g.$setViewValue({startDate:moment().startOf("day"),endDate:moment().startOf("day")})}),e.daterangepicker(l,function(c,d,e){var f=g.$viewValue;a.equals(c,f.startDate)&&a.equals(d,f.endDate)||b.$apply(function(){g.$setViewValue({startDate:moment.isMoment(f.startDate)?c:c.toDate(),endDate:moment.isMoment(f.endDate)?d:d.toDate()}),g.$render()})})}}}}])}(angular),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/popup.html","uib/template/datepicker/year.html","uib/template/modal/backdrop.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$injector",function(a,b){var c=b.has("$animateCss")?b.get("$animateCss"):null;return{link:function(b,d,e){function f(){d.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),c?c(d,{addClass:"in",easing:"ease",to:{height:d[0].scrollHeight+"px"}}).start()["finally"](g):a.addClass(d,"in",{to:{height:d[0].scrollHeight+"px"}}).then(g)}function g(){d.removeClass("collapsing").addClass("collapse").css({height:"auto"})}function h(){return d.hasClass("collapse")||d.hasClass("in")?(d.css({height:d[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),void(c?c(d,{removeClass:"in",to:{height:"0"}}).start()["finally"](i):a.removeClass(d,"in",{to:{height:"0"}}).then(i))):i()}function i(){d.css({height:"0"}),d.removeClass("collapsing").addClass("collapse")}b.$eval(e.uibCollapse)||d.addClass("in").addClass("collapse").css({height:"auto"}),b.$watch(e.uibCollapse,function(a){a?h():f()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)}}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.uibAccordionTransclude]},function(a){a&&(b.find("span").html(""),b.find("span").append(a))})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function(a,b,c,d){a.closeable=!!b.close;var e=angular.isDefined(b.dismissOnTimeout)?c(b.dismissOnTimeout)(a.$parent):null;e&&d(function(){a.close()},parseInt(e,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);a&&!angular.isDefined(d.uncheckable)||b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":null)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(){for(;s.length;)s.shift()}function g(a){if(angular.isUndefined(p[a].index))return p[a];for(var b=0,c=p.length;c>b;++b)if(p[b].index===a)return p[b]}function h(c,d,g){t||(angular.extend(c,{direction:g,active:!0}),angular.extend(o.currentSlide||{},{direction:g,active:!1}),e.enabled(b)&&!a.$currentTransition&&c.$element&&o.slides.length>1&&(c.$element.data(q,c.direction),o.currentSlide&&o.currentSlide.$element&&o.currentSlide.$element.data(q,c.direction),a.$currentTransition=!0,e.on("addClass",c.$element,function(b,c){if("close"===c&&(a.$currentTransition=null,e.off("addClass",b),s.length)){var d=s.pop(),g=a.indexOfSlide(d),i=g>o.getCurrentIndex()?"next":"prev";f(),h(d,g,i)}})),o.currentSlide=c,r=d,k())}function i(){m&&(c.cancel(m),m=null)}function j(b){b.length||(a.$currentTransition=null,f())}function k(){i();var b=+a.interval;!isNaN(b)&&b>0&&(m=c(l,b))}function l(){var b=+a.interval;n&&!isNaN(b)&&b>0&&p.length?a.next():a.pause()}var m,n,o=this,p=o.slides=a.slides=[],q="uib-slideDirection",r=-1,s=[];o.currentSlide=null;var t=!1;o.addSlide=function(b,c){b.$element=c,p.push(b),1===p.length||b.active?(a.$currentTransition&&(a.$currentTransition=null),o.select(p[p.length-1]),1===p.length&&a.play()):b.active=!1},o.getCurrentIndex=function(){return o.currentSlide&&angular.isDefined(o.currentSlide.index)?+o.currentSlide.index:r},o.next=a.next=function(){var b=(o.getCurrentIndex()+1)%p.length;return 0===b&&a.noWrap()?void a.pause():o.select(g(b),"next")},o.prev=a.prev=function(){var b=o.getCurrentIndex()-1<0?p.length-1:o.getCurrentIndex()-1;return a.noWrap()&&b===p.length-1?void a.pause():o.select(g(b),"prev")},o.removeSlide=function(a){angular.isDefined(a.index)&&p.sort(function(a,b){return+a.index>+b.index});var b=s.indexOf(a);-1!==b&&s.splice(b,1);var c=p.indexOf(a);p.splice(c,1),d(function(){p.length>0&&a.active?c>=p.length?o.select(p[c-1]):o.select(p[c]):r>c&&r--}),0===p.length&&(o.currentSlide=null,f())},o.select=a.select=function(b,c){var d=a.indexOfSlide(b);void 0===c&&(c=d>o.getCurrentIndex()?"next":"prev"),b&&b!==o.currentSlide&&!a.$currentTransition?h(b,d,c):b&&b!==o.currentSlide&&a.$currentTransition&&(s.push(b),b.active=!1)},a.indexOfSlide=function(a){return angular.isDefined(a.index)?+a.index:p.indexOf(a)},a.isActive=function(a){return o.currentSlide===a},a.pause=function(){a.noPause||(n=!1,i())},a.play=function(){n||(n=!0,k())},a.$on("$destroy",function(){t=!0,i()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",k),a.$watchCollection("slides",j)}]).directive("uibCarousel",function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",function(){return{require:"^uibCarousel",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)}),a.$watch("active",function(b){b&&d.select(a)})}}}).animation(".item",["$animateCss",function(a){function b(a,b,c){a.removeClass(b),c&&c()}var c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i+" "+h,f);return d.addClass(h),a(d,{addClass:i}).start().done(j),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i,f);return a(d,{addClass:i}).start().done(j),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","orderByFilter",function(a,b,c){function d(a){var b=[],d=a.split(""),e=a.indexOf("'");if(e>-1){var f=!1;a=a.split("");for(var g=e;g-1){a=a.split(""),d[e]="("+c.regex+")",a[e]="$";for(var f=e+1,g=e+c.key.length;g>f;f++)d[f]="",a[f]="$";a=a.join(""),b.push({index:e,apply:c.apply,matcher:c.regex})}}),{regex:new RegExp("^"+d.join("")+"$"),map:c(b,"index")}}function e(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function f(a){return parseInt(a,10)}function g(a,b){return a&&b?k(a,b):a}function h(a,b){return a&&b?k(a,b,!0):a}function i(a,b){var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function j(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function k(a,b,c){c=c?-1:1;var d=i(b,a.getTimezoneOffset());return j(a,c*(d-a.getTimezoneOffset()))}var l,m,n=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){l=b.id,this.parsers={},m=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a}},{key:"yy",regex:"\\d{2}",apply:function(a){this.year=+a+2e3}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|")},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|")},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=f(c+d),this.minutes+=f(c+e)}},{key:"ww",regex:"[0-4][0-9]|5[0-3]"},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]"},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s")},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|")},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|")},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|")}]},this.init(),this.parse=function(c,f,g){if(!angular.isString(c)||!f)return c;f=b.DATETIME_FORMATS[f]||f,f=f.replace(n,"\\$&"),b.id!==l&&this.init(),this.parsers[f]||(this.parsers[f]=d(f));var h=this.parsers[f],i=h.regex,j=h.map,k=c.match(i),m=!1;if(k&&k.length){var o,p;angular.isDate(g)&&!isNaN(g.getTime())?o={year:g.getFullYear(),month:g.getMonth(),date:g.getDate(),hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()}:(g&&a.warn("dateparser:","baseDate is not a valid date"),o={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var q=1,r=k.length;r>q;q++){var s=j[q-1];"Z"===s.matcher&&(m=!0),s.apply&&s.apply.call(o,k[q])}var t=m?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=m?Date.prototype.setUTCHours:Date.prototype.setHours;return e(o.year,o.month,o.date)&&(!angular.isDate(g)||isNaN(g.getTime())||m?(p=new Date(0),t.call(p,o.year,o.month,o.date),u.call(p,o.hours||0,o.minutes||0,o.seconds||0,o.milliseconds||0)):(p=new Date(g),t.call(p,o.year,o.month,o.date),u.call(p,o.hours,o.minutes,o.seconds,o.milliseconds))),p}},this.toTimezone=g,this.fromTimezone=h,this.timezoneToOffset=i,this.addDateMinutes=j,this.convertTimezoneToLocal=k}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},e={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/};return{getRawNode:function(a){return a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(){if(angular.isUndefined(c)){var b=angular.element('
              ');a.find("body").append(b),c=b[0].offsetWidth-b[0].clientWidth,c=isFinite(c)?c:0,b.remove()}return c},scrollParent:function(c,e){c=this.getRawNode(c);var f=e?d.hidden:d.normal,g=a[0].documentElement,h=b.getComputedStyle(c),i="absolute"===h.position,j=c.parentElement||g;if(j===g||"fixed"===h.position)return g;for(;j.parentElement&&j!==g;){var k=b.getComputedStyle(j);if(i&&"static"!==k.position&&(i=!1),!i&&f.test(k.overflow+k.overflowY+k.overflowX))break;j=j.parentElement}return j},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=e.auto.test(a);return b&&(a=a.replace(e.auto,"")),a=a.split("-"),a[0]=a[0]||"top",e.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",e.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,f){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=f?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(e.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":e.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},positionArrow:function(a,c){a=this.getRawNode(a);var d=!0,f=a.querySelector(".tooltip-inner");if(f||(d=!1,f=a.querySelector(".popover-inner")),f){var g=d?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css({top:"",bottom:"",right:"",left:"",margin:""});var h="border-"+c[0]+"-width",i=b.getComputedStyle(g)[h],j="border-";j+=e.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],j+="-radius";var k=b.getComputedStyle(d?f:a)[j],l={top:"auto",bottom:"auto",left:"auto",right:"auto",margin:0};switch(c[0]){case"top":l.bottom=d?"0":"-"+i;break;case"bottom":l.top=d?"0":"-"+i;break;case"left":l.right=d?"0":"-"+i;break;case"right":l.left=d?"0":"-"+i}l[c[1]]=k,angular.element(g).css(l)}}}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position"]).value("$datepickerSuppressError",!1).constant("uibDatepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRows:4,yearColumns:5,minDate:null,maxDate:null,shortcutPropagation:!1,ngModelOptions:{}}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i){var j=this,k={$setViewValue:angular.noop},l={};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle"],function(c){j[c]=angular.isDefined(b[c])?d(b[c])(a.$parent):g[c]}),angular.forEach(["showWeeks","startingDay","yearRows","yearColumns","shortcutPropagation"],function(c){j[c]=angular.isDefined(b[c])?a.$parent.$eval(b[c]):g[c]}),angular.forEach(["minDate","maxDate"],function(c){b[c]?a.$parent.$watch(b[c],function(a){j[c]=a?angular.isDate(a)?i.fromTimezone(new Date(a),l.timezone):new Date(f(a,"medium")):null,j.refreshView()}):j[c]=g[c]?i.fromTimezone(new Date(g[c]),l.timezone):null}),angular.forEach(["minMode","maxMode"],function(c){b[c]?a.$parent.$watch(b[c],function(d){j[c]=a[c]=angular.isDefined(d)?d:b[c],("minMode"===c&&j.modes.indexOf(a.datepickerMode)j.modes.indexOf(j[c]))&&(a.datepickerMode=j[c])}):j[c]=a[c]=g[c]||null}),a.datepickerMode=a.datepickerMode||g.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),angular.isDefined(b.initDate)?(this.activeDate=i.fromTimezone(a.$parent.$eval(b.initDate),l.timezone)||new Date,a.$parent.$watch(b.initDate,function(a){a&&(k.$isEmpty(k.$modelValue)||k.$invalid)&&(j.activeDate=i.fromTimezone(a,l.timezone),j.refreshView())})):this.activeDate=new Date,a.disabled=angular.isDefined(b.disabled)||!1,angular.isDefined(b.ngDisabled)&&a.$parent.$watch(b.ngDisabled,function(b){a.disabled=b,j.refreshView()}),a.isActive=function(b){return 0===j.compare(b.date,j.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){k=a,l=a.$options||g.ngModelOptions,k.$modelValue&&(this.activeDate=k.$modelValue),k.$render=function(){j.render()}},this.render=function(){if(k.$viewValue){var a=new Date(k.$viewValue),b=!isNaN(a);b?this.activeDate=i.fromTimezone(a,l.timezone):h||e.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=k.$viewValue?new Date(k.$viewValue):null;b=i.fromTimezone(b,l.timezone),k.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=k.$viewValue?new Date(k.$viewValue):null;d=i.fromTimezone(d,l.timezone);var e={date:b,label:f(b,c.replace(/d!/,"dd")).replace(/M!/,"MM"),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),current:0===this.compare(b,new Date),customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=e),j.activeDate&&0===this.compare(e.date,j.activeDate)&&(a.activeDt=e),e},this.isDisabled=function(c){return a.disabled||this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===j.minMode){var c=k.$viewValue?i.fromTimezone(new Date(k.$viewValue),l.timezone):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=i.toTimezone(c,l.timezone),k.$setViewValue(c),k.$render()}else j.activeDate=b,a.datepickerMode=j.modes[j.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=j.activeDate.getFullYear()+a*(j.step.years||0),c=j.activeDate.getMonth()+a*(j.step.months||0);j.activeDate.setFullYear(b,c,1),j.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===j.maxMode&&1===b||a.datepickerMode===j.minMode&&-1===b||(a.datepickerMode=j.modes[j.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var m=function(){j.element[0].focus()};a.$on("uib:datepicker.focus",m),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),j.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(j.isDisabled(j.activeDate))return;a.select(j.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(j.handleKeyDown(c,b),j.refreshView()):a.toggleMode("up"===c?1:-1)}}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{ -uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,3)},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=3;else if("right"===a)c+=1;else if("down"===a)c+=3;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}).constant("uibDatepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepicker/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0,onOpenFocus:!0,altInputFormats:[]}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$parse","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function o(b){var c=j.parse(b,t,a.date);if(isNaN(c))for(var d=0;d
            "),a.ngModelOptions=angular.copy(C),a.ngModelOptions.timezone=null,z.attr({"ng-model":"date","ng-model-options":"ngModelOptions","ng-change":"dateSelection(date)","template-url":x}),A=angular.element(z.children()[0]),A.attr("template-url",y),G&&"month"===c.type&&(A.attr("datepicker-mode",'"month"'),A.attr("min-mode","month")),c.datepickerOptions){var l=a.$parent.$eval(c.datepickerOptions);l&&l.initDate&&(a.initDate=j.fromTimezone(l.initDate,C.timezone),A.attr("init-date","initDate"),delete l.initDate),angular.forEach(l,function(a,b){A.attr(n(b),a)})}angular.forEach(["minMode","maxMode"],function(b){c[b]&&(a.$parent.$watch(function(){return c[b]},function(c){a.watchData[b]=c}),A.attr(n(b),"watchData."+b))}),angular.forEach(["datepickerMode","shortcutPropagation"],function(b){if(c[b]){var d=e(c[b]),f={get:function(){return d(a.$parent)}};if(A.attr(n(b),"watchData."+b),"datepickerMode"===b){var g=d.assign;f.set=function(b){g(a.$parent,b)}}Object.defineProperty(a.watchData,b,f)}}),angular.forEach(["minDate","maxDate","initDate"],function(b){if(c[b]){var d=e(c[b]);a.$parent.$watch(d,function(c){"minDate"!==b&&"maxDate"!==b||(F[b]=angular.isDate(c)?j.fromTimezone(new Date(c),C.timezone):new Date(i(c,"medium"))),a.watchData[b]=F[b]||j.fromTimezone(new Date(c),C.timezone)}),A.attr(n(b),"watchData."+b)}}),c.dateDisabled&&A.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRows","yearColumns"],function(a){angular.isDefined(c[a])&&A.attr(n(a),c[a])}),c.customClass&&A.attr("custom-class","customClass({ date: date, mode: mode })"),G?B.$formatters.push(function(b){return a.date=j.fromTimezone(b,C.timezone),b}):(B.$$parserName="date",B.$validators.date=q,B.$parsers.unshift(p),B.$formatters.push(function(b){return B.$isEmpty(b)?(a.date=b,b):(a.date=j.fromTimezone(b,C.timezone),t=t.replace(/M!/,"MM").replace(/d!/,"dd"),i(a.date,t))})),B.$viewChangeListeners.push(function(){a.date=o(B.$viewValue)}),b.bind("keydown",s),D=d(z)(a),z.remove(),v?f.find("body").append(D):b.after(D),a.$on("$destroy",function(){a.isOpen===!0&&(g.$$phase||a.$apply(function(){a.isOpen=!1})),D.remove(),b.unbind("keydown",s),f.unbind("click",r)})},a.getText=function(b){return a[b+"Text"]||k[b+"Text"]},a.isDisabled=function(b){return"today"===b&&(b=new Date),a.watchData.minDate&&a.compare(b,F.minDate)<0||a.watchData.maxDate&&a.compare(b,F.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?i(a.date,t):null;b.val(d),B.$setViewValue(d),u&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b){if("today"===b){var c=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(c.getFullYear(),c.getMonth(),c.getDate())):b=new Date(c.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(){a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&a.$parent.$watch(e(c.ngDisabled),function(b){a.disabled=b}),a.$watch("isOpen",function(c){c?a.disabled?a.isOpen=!1:(a.position=v?h.offset(b):h.position(b),a.position.top=a.position.top+b.prop("offsetHeight"),l(function(){w&&a.$broadcast("uib:datepicker.focus"),f.bind("click",r)},0,!1)):f.unbind("click",r)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b){c||(a.on("click",d),a.on("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b){c===b&&(c=null,a.off("click",d),a.off("keydown",e))};var d=function(a){if(c&&!(a&&"disabled"===c.getAutoClose()||a&&3===a.which)){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(c.focusToggleElement(),d()):c.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.appendToOpenClass,q=e.openClass,r=angular.noop,s=c.onToggle?d(c.onToggle):angular.noop,t=!1,u=null,v=!1,w=i.find("body");b.addClass("dropdown"),this.init=function(){if(c.isOpen&&(m=d(c.isOpen),r=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),angular.isDefined(c.dropdownAppendTo)){var e=d(c.dropdownAppendTo)(o);e&&(u=angular.element(e))}t=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.keyboardNav),t&&!u&&(u=w),u&&n.dropdownMenu&&(u.append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return v},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(u&&n.dropdownMenu){var e,i,m=h.positionElements(b,n.dropdownMenu,"bottom-left",!0);if(e={top:m.top+"px",display:c?"block":"none"},i=n.dropdownMenu.hasClass("dropdown-menu-right"),i?(e.left="auto",e.right=window.innerWidth-(m.left+b.prop("offsetWidth"))+"px"):(e.left=m.left+"px",e.right="auto"),!t){var v=h.offset(u);e.top=m.top-v.top+"px",i?e.right=window.innerWidth-(m.left-v.left+b.prop("offsetWidth"))+"px":e.left=m.left-v.left+"px"}n.dropdownMenu.css(e)}var w=u?u:b;if(g[c?"addClass":"removeClass"](w,u?p:q).then(function(){angular.isDefined(c)&&c!==d&&s(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var x=angular.element('');n.dropdownMenu.replaceWith(x),n.dropdownMenu=x}f.close(o),n.selectedOption=null}angular.isFunction(r)&&r(a,c)}),a.$on("$locationChangeSuccess",function(){"disabled"!==o.getAutoClose()&&(o.isOpen=!1)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c0&&(b=t.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function l(){if(p&&-1===i()){var a=q;m(p,q,function(){a=null}),p=void 0,q=void 0}}function m(a,c,d,e){function g(){g.done||(g.done=!0,b(a,{event:"leave"}).start().then(function(){a.remove(),e&&e.resolve()}),c.$destroy(),d&&d())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(v.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function n(a){if(a.isDefaultPrevented())return a;var b=t.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){v.dismiss(b.key,"escape key press")}));break;case 9:v.loadFocusElementList(b);var c=!1;a.shiftKey?v.isFocusInFirstItem(a)&&(c=v.focusLastFocusableElement()):v.isFocusInLastItem(a)&&(c=v.focusFirstFocusableElement()),c&&(a.preventDefault(),a.stopPropagation())}}function o(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var p,q,r,s="modal-open",t=h.createNew(),u=g.createNew(),v={NOW_CLOSING_EVENT:"modal.stack.now-closing"},w=0,x="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(i,function(a){q&&(q.index=a)}),c.on("keydown",n),e.$on("$destroy",function(){c.off("keydown",n)}),v.open=function(b,f){var g=c[0].activeElement,h=f.openedClass||s;k(!1),t.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),u.put(h,b);var j=f.appendTo,l=i();if(!j.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");l>=0&&!p&&(q=e.$new(!0),q.modalOptions=f,q.index=l,p=angular.element('
            '),p.attr("backdrop-class",f.backdropClass),f.animation&&p.attr("modal-animation","true"),d(p)(q),a.enter(p,j));var m=angular.element('
            ');m.attr({"template-url":f.windowTemplateUrl,"window-class":f.windowClass,"window-top-class":f.windowTopClass,size:f.size,index:t.length()-1,animate:"animate"}).html(f.content),f.animation&&m.attr("modal-animation","true"),a.enter(m,j).then(function(){d(m)(f.scope),a.addClass(j,h)}),t.top().value.modalDomEl=m,t.top().value.modalOpener=g,v.clearFocusListCache()},v.close=function(a,b){var c=t.get(a);return c&&o(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),j(a,c.value.modalOpener),!0):!c},v.dismiss=function(a,b){var c=t.get(a);return c&&o(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),j(a,c.value.modalOpener),!0):!c},v.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},v.getTop=function(){return t.top()},v.modalRendered=function(a){var b=t.get(a);b&&b.value.renderDeferred.resolve()},v.focusFirstFocusableElement=function(){return r.length>0?(r[0].focus(),!0):!1},v.focusLastFocusableElement=function(){return r.length>0?(r[r.length-1].focus(),!0):!1},v.isFocusInFirstItem=function(a){return r.length>0?(a.target||a.srcElement)===r[0]:!1},v.isFocusInLastItem=function(a){return r.length>0?(a.target||a.srcElement)===r[r.length-1]:!1},v.clearFocusListCache=function(){r=[],w=0},v.loadFocusElementList=function(a){if((void 0===r||!r.length)&&a){var b=a.value.modalDomEl;b&&b.length&&(r=b[0].querySelectorAll(x))}},v}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return r}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=c.all([i(e),g.resolve(e.resolve,{},null,null)]);return q=k=c.all([k]).then(j,j).then(function(a){var c=e.scope||b,d=c.$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var g,i={};e.controller&&(i.$scope=d,i.$uibModalInstance=p,angular.forEach(a[1],function(a,b){i[b]=a}),g=f(e.controller,i),e.controllerAs&&(e.bindToController&&(g.$close=d.$close,g.$dismiss=d.$dismiss,angular.extend(g,c)),d[e.controllerAs]=g)),h.open(p,{scope:d,deferred:l,renderDeferred:o,closedDeferred:n,content:a[0],animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo}),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===q&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b.init=function(e,f){b.ngModelCtrl=e,b.config=f,e.$render=function(){b.render()},d.itemsPerPage?c.$parent.$watch(a(d.itemsPerPage),function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()}):b.itemsPerPage=f.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()}}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var m=f(h,h,h===a);c.push(m)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var n=f(d-1,"...",!1);c.unshift(n)}if(l){if(3===d){var o=f(2,"2",!1);c.unshift(o)}var p=f(1,"1",!1);c.unshift(p)}}if(b>e){if(!l||b-2>e){var q=f(e+1,"...",!1);c.push(q)}if(l){if(e===b-2){var r=f(b-1,b-1,!1);c.push(r)}var s=f(b,b,!1);c.push(s)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,d.create(this,a,b),b.maxSize&&a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()});var m=this.render;this.render=function(){m(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},replace:!0,link:function(a,c,d,e){var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),o.removeTop(),b=null)}}var o=m.createNew();return h.on("keypress",n),k.$on("$destroy",function(){h.off("keypress",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="
            ';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){M.isOpen?q():m()}function m(){L&&!a.$eval(d[k+"Enable"])||(u(),x(),M.popupDelay?G||(G=g(r,M.popupDelay,!1)):r())}function q(){s(),M.popupCloseDelay?H||(H=g(t,M.popupCloseDelay,!1)):t()}function r(){return s(),u(),M.content?(v(),void M.$evalAsync(function(){M.isOpen=!0,y(!0),R()})):angular.noop}function s(){G&&(g.cancel(G),G=null),I&&(g.cancel(I),I=null)}function t(){M&&M.$evalAsync(function(){M.isOpen=!1,y(!1),M.animation?F||(F=g(w,150,!1)):w()})}function u(){H&&(g.cancel(H),H=null),F&&(g.cancel(F),F=null)}function v(){D||(E=M.$new(),D=c(E,function(a){J?h.find("body").append(a):b.after(a)}),z())}function w(){s(),u(),A(),D&&(D.remove(),D=null),E&&(E.$destroy(),E=null)}function x(){M.title=d[k+"Title"],P?M.content=P(a):M.content=d[e],M.popupClass=d[k+"Class"],M.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=parseInt(d[k+"PopupDelay"],10),c=parseInt(d[k+"PopupCloseDelay"],10);M.popupDelay=isNaN(b)?n.popupDelay:b,M.popupCloseDelay=isNaN(c)?n.popupCloseDelay:c}function y(b){O&&angular.isFunction(O.assign)&&O.assign(a,b)}function z(){Q.length=0,P?(Q.push(a.$watch(P,function(a){M.content=a,!a&&M.isOpen&&t()})),Q.push(E.$watch(function(){N||(N=!0,E.$$postDigest(function(){N=!1,M&&M.isOpen&&R()}))}))):Q.push(d.$observe(e,function(a){M.content=a,!a&&M.isOpen?t():R()})),Q.push(d.$observe(k+"Title",function(a){M.title=a,M.isOpen&&R()})),Q.push(d.$observe(k+"Placement",function(a){M.placement=a?a:n.placement,M.isOpen&&R()}))}function A(){Q.length&&(angular.forEach(Q,function(a){a()}),Q.length=0)}function B(a){M&&M.isOpen&&D&&(b[0].contains(a.target)||D[0].contains(a.target)||q())}function C(){var a=d[k+"Trigger"];S(),K=p(a),"none"!==K.show&&K.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===K.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(K.hide[c],q)),b.on("keypress",function(a){27===a.which&&q()})})}var D,E,F,G,H,I,J=angular.isDefined(n.appendToBody)?n.appendToBody:!1,K=p(void 0),L=angular.isDefined(d[k+"Enable"]),M=a.$new(!0),N=!1,O=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,P=n.useContentExp?l(d[e]):!1,Q=[],R=function(){D&&D.html()&&(I||(I=g(function(){D.css({top:0,left:0});var a=i.positionElements(b,D,M.placement,J);D.css({top:a.top+"px",left:a.left+"px",visibility:"visible"}),n.placementClassPrefix&&D.removeClass("top bottom left right"),D.removeClass(n.placementClassPrefix+"top "+n.placementClassPrefix+"top-left "+n.placementClassPrefix+"top-right "+n.placementClassPrefix+"bottom "+n.placementClassPrefix+"bottom-left "+n.placementClassPrefix+"bottom-right "+n.placementClassPrefix+"left "+n.placementClassPrefix+"left-top "+n.placementClassPrefix+"left-bottom "+n.placementClassPrefix+"right "+n.placementClassPrefix+"right-top "+n.placementClassPrefix+"right-bottom"); -var c=a.placement.split("-");D.addClass(c[0],n.placementClassPrefix+a.placement),i.positionArrow(D,a.placement),I=null},0,!1)))};M.origScope=a,M.isOpen=!1,o.add(M,{close:t}),M.contentExp=function(){return M.content},d.$observe("disabled",function(a){a&&s(),a&&M.isOpen&&t()}),O&&a.$watch(O,function(a){M&&!a===M.isOpen&&j()});var S=function(){K.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j))}),K.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};C();var T=a.$eval(d[k+"Animation"]);M.animation=angular.isDefined(T)?!!T:n.animation;var U,V=k+"AppendToBody";U=V in d&&void 0===d[V]?!0:a.$eval(d[V]),J=angular.isDefined(U)?U:J,J&&a.$on("$locationChangeSuccess",function(){M.isOpen&&t()}),a.$on("$destroy",function(){S(),w(),o.remove(M),M=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}else c.addClass("top");b.popupClass&&c.addClass(b.popupClass),b.animation()&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){var d=this,e=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(a.max)?a.max:c.max,this.addBar=function(b,c,f){e||c.css({transition:"none"}),this.bars.push(b),b.max=a.max,b.title=f&&angular.isDefined(f.title)?f.title:"progressbar",b.$watch("value",function(a){b.recalculatePercentage()}),b.recalculatePercentage=function(){var a=d.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);a>100&&(b.percent-=a-100)},b.$on("$destroy",function(){c=null,d.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("max",function(b){d.bars.forEach(function(b){b.max=a.max,b.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{max:"=?"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop};this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(d.$viewValue===b?0:b),d.$render())},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){var b=this,c=b.tabs=a.tabs=[];b.select=function(a){angular.forEach(c,function(b){b.active&&b!==a&&(b.active=!1,b.onDeselect(),a.selectCalled=!1)}),a.active=!0,a.selectCalled||(a.onSelect(),a.selectCalled=!0)},b.addTab=function(a){c.push(a),1===c.length&&a.active!==!1?a.active=!0:a.active?b.select(a):a.active=!1},b.removeTab=function(a){var e=c.indexOf(a);if(a.active&&c.length>1&&!d){var f=e===c.length-1?e-1:e+1;b.select(c[f])}c.splice(e,1)};var d;a.$on("$destroy",function(){d=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{type:"@"},controller:"UibTabsetController",templateUrl:"uib/template/tabs/tabset.html",link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:"uib/template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(b,c,d,e,f){b.$watch("active",function(a){a&&e.select(b)}),b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),b.select=function(){b.disabled||(b.active=!0)},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=+a.hours,c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c?(a.showMeridian&&(12===b&&(b=0),a.meridian===t[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes;return b>=0&&60>b?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a){return null===a?"":angular.isDefined(a)&&a.toString().length<2?"0"+a:a.toString()}function l(a){m(),s.$setViewValue(new Date(r)),n(a)}function m(){s.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(s.$modelValue){var c=r.getHours(),d=r.getMinutes(),e=r.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c),"m"!==b&&(a.minutes=k(d)),a.meridian=r.getHours()<12?t[0]:t[1],"s"!==b&&(a.seconds=k(e)),a.meridian=r.getHours()<12?t[0]:t[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=t[0]}function o(a){r=q(r,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}var r=new Date,s={$setViewValue:angular.noop},t=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){s=b,s.$render=this.render,s.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2),i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var u=g.hourStep;c.hourStep&&a.$parent.$watch(d(c.hourStep),function(a){u=+a});var v=g.minuteStep;c.minuteStep&&a.$parent.$watch(d(c.minuteStep),function(a){v=+a});var w;a.$parent.$watch(d(c.min),function(a){var b=new Date(a);w=isNaN(b)?void 0:b});var x;a.$parent.$watch(d(c.max),function(a){var b=new Date(a);x=isNaN(b)?void 0:b});var y=!1;c.ngDisabled&&a.$parent.$watch(d(c.ngDisabled),function(a){y=a}),a.noIncrementHours=function(){var a=p(r,60*u);return y||a>x||r>a&&w>a},a.noDecrementHours=function(){var a=p(r,60*-u);return y||w>a||a>r&&a>x},a.noIncrementMinutes=function(){var a=p(r,v);return y||a>x||r>a&&w>a},a.noDecrementMinutes=function(){var a=p(r,-v);return y||w>a||a>r&&a>x},a.noIncrementSeconds=function(){var a=q(r,z);return y||a>x||r>a&&w>a},a.noDecrementSeconds=function(){var a=q(r,-z);return y||w>a||a>r&&a>x},a.noToggleMeridian=function(){return r.getHours()<12?y||p(r,720)>x:y||p(r,-720)0};b.bind("mousewheel wheel",function(b){y||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){y||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.bind("mousewheel wheel",function(b){y||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.bind("keydown",function(b){y||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.bind("keydown",function(b){y||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.bind("keydown",function(b){y||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){s.$setViewValue(null),s.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c),angular.isDefined(d)&&(a.invalidSeconds=d)};a.updateHours=function(){var a=h(),b=i();s.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(a),r.setMinutes(b),w>r||r>x?e(!0):l("h")):e(!0)},b.bind("blur",function(b){s.$setTouched(),null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours)})}),a.updateMinutes=function(){var a=i(),b=h();s.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(b),r.setMinutes(a),w>r||r>x?e(void 0,!0):l("m")):e(void 0,!0)},c.bind("blur",function(b){s.$setTouched(),null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();s.$setDirty(),angular.isDefined(a)?(r.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.bind("blur",function(b){!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=s.$viewValue;isNaN(b)?(s.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(r=b),w>r||r>x?(s.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*u*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-u*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*v)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-v)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(z)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-z)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(r.getHours()<12?60:-60)):a.meridian=a.meridian===t[0]?t[1]:t[0])},a.blur=function(){s.$setTouched()}}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),Y()}function o(){N.position=D?l.offset(b):l.position(b),N.position.top+=b.prop("offsetHeight")}var p,q,r=[9,13,27,38,40],s=200,t=a.$eval(c.typeaheadMinLength);t||0===t||(t=1);var u=a.$eval(c.typeaheadWaitMs)||0,v=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){v=a!==!1});var w,x,y=e(c.typeaheadLoading).assign||angular.noop,z=e(c.typeaheadOnSelect),A=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,B=e(c.typeaheadNoResults).assign||angular.noop,C=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,D=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,E=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,F=a.$eval(c.typeaheadFocusFirst)!==!1,G=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,H=e(c.typeaheadIsOpen).assign||angular.noop,I=a.$eval(c.typeaheadShowHint)||!1,J=e(c.ngModel),K=e(c.ngModel+"($$$p)"),L=function(b,c){return angular.isFunction(J(a))&&q&&q.$options&&q.$options.getterSetter?K(b,{$$$p:c}):J.assign(b,c)},M=m.parse(c.uibTypeahead),N=a.$new(),O=a.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q,R;I&&(Q=angular.element("
            "),Q.css("position","relative"),b.after(Q),R=b.clone(),R.attr("placeholder",""),R.val(""),R.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),Q.append(R),R.after(b));var S=angular.element("
            ");S.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&S.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&S.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var T=function(){I&&R.val("")},U=function(){N.matches=[],N.activeIdx=-1,b.attr("aria-expanded",!1),T()},V=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",V(a))});var W=function(a,b){return N.matches.length>b&&a?a.toUpperCase()===N.matches[b].label.toUpperCase():!1},X=function(c,d){var e={$viewValue:c};y(a,!0),B(a,!1),f.when(M.source(a,e)).then(function(f){var g=c===p.$viewValue;if(g&&w)if(f&&f.length>0){N.activeIdx=F?0:-1,B(a,!1),N.matches.length=0;for(var h=0;h0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?R.val(c+i.slice(c.length)):R.val("")}}else U(),B(a,!0);g&&y(a,!1)},function(){U(),y(a,!1),B(a,!0)})};D&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var Y=k(function(){N.matches.length&&o(),N.moveInProgress=!1},s);N.moveInProgress=!1,N.query=void 0;var Z,$=function(a){Z=g(function(){X(a)},u)},_=function(){Z&&g.cancel(Z)};U(),N.assignIsOpen=function(b){H(a,b)},N.select=function(d,e){var f,h,i={};x=!0,i[M.itemName]=h=N.matches[d].model,f=M.modelMapper(a,i),L(a,f),p.$setValidity("editable",!0),p.$setValidity("parse",!0),z(a,{$item:h,$model:f,$label:M.viewMapper(a,i),$event:e}),U(),N.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(a){if(0!==N.matches.length&&-1!==r.indexOf(a.which)){if(-1===N.activeIdx&&(9===a.which||13===a.which))return U(),void N.$digest();a.preventDefault();var b;switch(a.which){case 9:case 13:N.$apply(function(){angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(N.activeIdx,a)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(N.activeIdx,a)});break;case 27:a.stopPropagation(),U(),N.$digest();break;case 38:N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop;break;case 40:N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop}}}),b.bind("focus",function(a){w=!0,0!==t||p.$viewValue||g(function(){X(p.$viewValue,a)},0)}),b.bind("blur",function(a){A&&N.matches.length&&-1!==N.activeIdx&&!x&&(x=!0,N.$apply(function(){angular.isObject(N.debounceUpdate)&&angular.isNumber(N.debounceUpdate.blur)?k(function(){N.select(N.activeIdx,a)},N.debounceUpdate.blur):N.select(N.activeIdx,a)})),!v&&p.$error.editable&&(p.$viewValue="",b.val("")),w=!1,x=!1});var aa=function(a){b[0]!==a.target&&3!==a.which&&0!==N.matches.length&&(U(),j.$$phase||N.$digest())};h.on("click",aa),a.$on("$destroy",function(){h.off("click",aa),(D||E)&&ba.remove(),D&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),S.remove(),I&&Q.remove()});var ba=d(S)(N);D?h.find("body").append(ba):E?angular.element(E).eq(0).append(ba):b.after(ba),this.init=function(b,c){p=b,q=c,N.debounceUpdate=p.$options&&e(p.$options.debounce)(a),p.$parsers.unshift(function(b){return w=!0,0===t||b&&b.length>=t?u>0?(_(),$(b)):X(b):(y(a,!1),_(),U()),v?b:b?void p.$setValidity("editable",!1):(p.$setValidity("editable",!0),null)}),p.$formatters.push(function(b){var c,d,e={};return v||p.$setValidity("editable",!0),C?(e.$model=b,C(a,e)):(e[M.itemName]=b,c=M.viewMapper(a,e),e[M.itemName]=void 0,d=M.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"$&"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'
            \n
            \n

            \n
            {{heading}}
            \n

            \n
            \n
            \n
            \n
            \n
            \n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion.html",'
            ')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/carousel.html",'')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'
            \n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'
            \n \n \n \n
            ')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
            {{::label.abbr}}
            {{ weekNumbers[$index] }}\n \n
            \n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
            \n \n
            \n')}]),angular.module("uib/template/datepicker/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/popup.html",'\n'); -}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/year.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
            \n \n
            \n')}]),angular.module("uib/template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/backdrop.html",'\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html",'\n')}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'
            \n
            \n
            \n
            \n')}]),angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-html-unsafe-popup.html",'
            \n
            \n
            \n
            \n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'
            \n
            \n
            \n
            \n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'
            \n
            \n
            \n
            \n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'
            \n
            \n\n
            \n

            \n
            \n
            \n
            \n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'
            \n
            \n\n
            \n

            \n
            \n
            \n
            \n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'
            \n
            \n\n
            \n

            \n
            \n
            \n
            \n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'
            \n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'
            ')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'
            \n
            \n
            \n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'\n ({{ $index < value ? \'*\' : \' \' }})\n \n\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'
          • \n
            {{heading}}
            \n
          • \n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'
            \n \n
            \n
            \n
            \n
            \n
            \n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'\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')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),angular.module("ui.bootstrap.tabs").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('')}),function(a){"use strict";"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=a():"undefined"!=typeof Package?Sortable=a():window.Sortable=a()}(function(){"use strict";function a(a,b){if(!a||!a.nodeType||1!==a.nodeType)throw"Sortable: `el` must be HTMLElement, and not "+{}.toString.call(a);this.el=a,this.options=b=r({},b),a[L]=this;var c={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(a.nodeName)?"li":">*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",ignore:"a, img",filter:null,animation:0,setData:function(a,b){a.setData("Text",b.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1};for(var d in c)!(d in b)&&(b[d]=c[d]);V(b);for(var f in this)"_"===f.charAt(0)&&(this[f]=this[f].bind(this));this.nativeDraggable=b.forceFallback?!1:P,e(a,"mousedown",this._onTapStart),e(a,"touchstart",this._onTapStart),this.nativeDraggable&&(e(a,"dragover",this),e(a,"dragenter",this)),T.push(this._onDragOver),b.store&&this.sort(b.store.get(this))}function b(a){v&&v.state!==a&&(h(v,"display",a?"none":""),!a&&v.state&&w.insertBefore(v,s),v.state=a)}function c(a,b,c){if(a){c=c||N,b=b.split(".");var d=b.shift().toUpperCase(),e=new RegExp("\\s("+b.join("|")+")(?=\\s)","g");do if(">*"===d&&a.parentNode===c||(""===d||a.nodeName.toUpperCase()==d)&&(!b.length||((" "+a.className+" ").match(e)||[]).length==b.length))return a;while(a!==c&&(a=a.parentNode))}return null}function d(a){a.dataTransfer&&(a.dataTransfer.dropEffect="move"),a.preventDefault()}function e(a,b,c){a.addEventListener(b,c,!1)}function f(a,b,c){a.removeEventListener(b,c,!1)}function g(a,b,c){if(a)if(a.classList)a.classList[c?"add":"remove"](b);else{var d=(" "+a.className+" ").replace(K," ").replace(" "+b+" "," ");a.className=(d+(c?" "+b:"")).replace(K," ")}}function h(a,b,c){var d=a&&a.style;if(d){if(void 0===c)return N.defaultView&&N.defaultView.getComputedStyle?c=N.defaultView.getComputedStyle(a,""):a.currentStyle&&(c=a.currentStyle),void 0===b?c:c[b];b in d||(b="-webkit-"+b),d[b]=c+("string"==typeof c?"":"px")}}function i(a,b,c){if(a){var d=a.getElementsByTagName(b),e=0,f=d.length;if(c)for(;f>e;e++)c(d[e],e);return d}return[]}function j(a,b,c,d,e,f,g){var h=N.createEvent("Event"),i=(a||b[L]).options,j="on"+c.charAt(0).toUpperCase()+c.substr(1);h.initEvent(c,!0,!0),h.to=b,h.from=e||b,h.item=d||b,h.clone=v,h.oldIndex=f,h.newIndex=g,b.dispatchEvent(h),i[j]&&i[j].call(a,h)}function k(a,b,c,d,e,f){var g,h,i=a[L],j=i.options.onMove;return g=N.createEvent("Event"),g.initEvent("move",!0,!0),g.to=b,g.from=a,g.dragged=c,g.draggedRect=d,g.related=e||b,g.relatedRect=f||b.getBoundingClientRect(),a.dispatchEvent(g),j&&(h=j.call(i,g)),h}function l(a){a.draggable=!1}function m(){R=!1}function n(a,b){var c=a.lastElementChild,d=c.getBoundingClientRect();return(b.clientY-(d.top+d.height)>5||b.clientX-(d.right+d.width)>5)&&c}function o(a){for(var b=a.tagName+a.className+a.src+a.href+a.textContent,c=b.length,d=0;c--;)d+=b.charCodeAt(c);return d.toString(36)}function p(a){var b=0;if(!a||!a.parentNode)return-1;for(;a&&(a=a.previousElementSibling);)"TEMPLATE"!==a.nodeName.toUpperCase()&&b++;return b}function q(a,b){var c,d;return function(){void 0===c&&(c=arguments,d=this,setTimeout(function(){1===c.length?a.call(d,c[0]):a.apply(d,c),c=void 0},b))}}function r(a,b){if(a&&b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}var s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J={},K=/\s+/g,L="Sortable"+(new Date).getTime(),M=window,N=M.document,O=M.parseInt,P=!!("draggable"in N.createElement("div")),Q=function(a){return a=N.createElement("x"),a.style.cssText="pointer-events:auto","auto"===a.style.pointerEvents}(),R=!1,S=Math.abs,T=([].slice,[]),U=q(function(a,b,c){if(c&&b.scroll){var d,e,f,g,h=b.scrollSensitivity,i=b.scrollSpeed,j=a.clientX,k=a.clientY,l=window.innerWidth,m=window.innerHeight;if(z!==c&&(y=b.scroll,z=c,y===!0)){y=c;do if(y.offsetWidth=l-j)-(h>=j),g=(h>=m-k)-(h>=k),(f||g)&&(d=M)),J.vx===f&&J.vy===g&&J.el===d||(J.el=d,J.vx=f,J.vy=g,clearInterval(J.pid),d&&(J.pid=setInterval(function(){d===M?M.scrollTo(M.pageXOffset+f*i,M.pageYOffset+g*i):(g&&(d.scrollTop+=g*i),f&&(d.scrollLeft+=f*i))},24)))}},30),V=function(a){var b=a.group;b&&"object"==typeof b||(b=a.group={name:b}),["pull","put"].forEach(function(a){a in b||(b[a]=!0)}),a.groups=" "+b.name+(b.put.join?" "+b.put.join(" "):"")+" "};return a.prototype={constructor:a,_onTapStart:function(a){var b=this,d=this.el,e=this.options,f=a.type,g=a.touches&&a.touches[0],h=(g||a).target,i=h,k=e.filter;if(!("mousedown"===f&&0!==a.button||e.disabled)&&(h=c(h,e.draggable,d))){if(D=p(h),"function"==typeof k){if(k.call(this,a,h,this))return j(b,i,"filter",h,d,D),void a.preventDefault()}else if(k&&(k=k.split(",").some(function(a){return a=c(i,a.trim(),d),a?(j(b,a,"filter",h,d,D),!0):void 0})))return void a.preventDefault();e.handle&&!c(i,e.handle,d)||this._prepareDragStart(a,g,h)}},_prepareDragStart:function(a,b,c){var d,f=this,h=f.el,j=f.options,k=h.ownerDocument;c&&!s&&c.parentNode===h&&(G=a,w=h,s=c,t=s.parentNode,x=s.nextSibling,F=j.group,d=function(){f._disableDelayedDrag(),s.draggable=!0,g(s,f.options.chosenClass,!0),f._triggerDragStart(b)},j.ignore.split(",").forEach(function(a){i(s,a.trim(),l)}),e(k,"mouseup",f._onDrop),e(k,"touchend",f._onDrop),e(k,"touchcancel",f._onDrop),j.delay?(e(k,"mouseup",f._disableDelayedDrag),e(k,"touchend",f._disableDelayedDrag),e(k,"touchcancel",f._disableDelayedDrag),e(k,"mousemove",f._disableDelayedDrag),e(k,"touchmove",f._disableDelayedDrag),f._dragStartTimer=setTimeout(d,j.delay)):d())},_disableDelayedDrag:function(){var a=this.el.ownerDocument;clearTimeout(this._dragStartTimer),f(a,"mouseup",this._disableDelayedDrag),f(a,"touchend",this._disableDelayedDrag),f(a,"touchcancel",this._disableDelayedDrag),f(a,"mousemove",this._disableDelayedDrag),f(a,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(a){a?(G={target:s,clientX:a.clientX,clientY:a.clientY},this._onDragStart(G,"touch")):this.nativeDraggable?(e(s,"dragend",this),e(w,"dragstart",this._onDragStart)):this._onDragStart(G,!0);try{N.selection?N.selection.empty():window.getSelection().removeAllRanges()}catch(b){}},_dragStarted:function(){w&&s&&(g(s,this.options.ghostClass,!0),a.active=this,j(this,w,"start",s,w,D))},_emulateDragOver:function(){if(H){if(this._lastX===H.clientX&&this._lastY===H.clientY)return;this._lastX=H.clientX,this._lastY=H.clientY,Q||h(u,"display","none");var a=N.elementFromPoint(H.clientX,H.clientY),b=a,c=" "+this.options.group.name,d=T.length;if(b)do{if(b[L]&&b[L].options.groups.indexOf(c)>-1){for(;d--;)T[d]({clientX:H.clientX,clientY:H.clientY,target:a,rootEl:b});break}a=b}while(b=b.parentNode);Q||h(u,"display","")}},_onTouchMove:function(b){if(G){a.active||this._dragStarted(),this._appendGhost();var c=b.touches?b.touches[0]:b,d=c.clientX-G.clientX,e=c.clientY-G.clientY,f=b.touches?"translate3d("+d+"px,"+e+"px,0)":"translate("+d+"px,"+e+"px)";I=!0,H=c,h(u,"webkitTransform",f),h(u,"mozTransform",f),h(u,"msTransform",f),h(u,"transform",f),b.preventDefault()}},_appendGhost:function(){if(!u){var a,b=s.getBoundingClientRect(),c=h(s),d=this.options;u=s.cloneNode(!0),g(u,d.ghostClass,!1),g(u,d.fallbackClass,!0),h(u,"top",b.top-O(c.marginTop,10)),h(u,"left",b.left-O(c.marginLeft,10)),h(u,"width",b.width),h(u,"height",b.height),h(u,"opacity","0.8"),h(u,"position","fixed"),h(u,"zIndex","100000"),h(u,"pointerEvents","none"),d.fallbackOnBody&&N.body.appendChild(u)||w.appendChild(u),a=u.getBoundingClientRect(),h(u,"width",2*b.width-a.width),h(u,"height",2*b.height-a.height)}},_onDragStart:function(a,b){var c=a.dataTransfer,d=this.options;this._offUpEvents(),"clone"==F.pull&&(v=s.cloneNode(!0),h(v,"display","none"),w.insertBefore(v,s)),b?("touch"===b?(e(N,"touchmove",this._onTouchMove),e(N,"touchend",this._onDrop),e(N,"touchcancel",this._onDrop)):(e(N,"mousemove",this._onTouchMove),e(N,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,50)):(c&&(c.effectAllowed="move",d.setData&&d.setData.call(this,c,s)),e(N,"drop",this),setTimeout(this._dragStarted,0))},_onDragOver:function(a){var d,e,f,g=this.el,i=this.options,j=i.group,l=j.put,o=F===j,p=i.sort;if(void 0!==a.preventDefault&&(a.preventDefault(),!i.dragoverBubble&&a.stopPropagation()),I=!0,F&&!i.disabled&&(o?p||(f=!w.contains(s)):F.pull&&l&&(F.name===j.name||l.indexOf&&~l.indexOf(F.name)))&&(void 0===a.rootEl||a.rootEl===this.el)){if(U(a,i,this.el),R)return;if(d=c(a.target,i.draggable,g),e=s.getBoundingClientRect(),f)return b(!0),void(v||x?w.insertBefore(s,v||x):p||w.appendChild(s));if(0===g.children.length||g.children[0]===u||g===a.target&&(d=n(g,a))){if(d){if(d.animated)return;r=d.getBoundingClientRect()}b(o),k(w,g,s,e,d,r)!==!1&&(s.contains(g)||(g.appendChild(s),t=g),this._animate(e,s),d&&this._animate(r,d))}else if(d&&!d.animated&&d!==s&&void 0!==d.parentNode[L]){A!==d&&(A=d,B=h(d),C=h(d.parentNode));var q,r=d.getBoundingClientRect(),y=r.right-r.left,z=r.bottom-r.top,D=/left|right|inline/.test(B.cssFloat+B.display)||"flex"==C.display&&0===C["flex-direction"].indexOf("row"),E=d.offsetWidth>s.offsetWidth,G=d.offsetHeight>s.offsetHeight,H=(D?(a.clientX-r.left)/y:(a.clientY-r.top)/z)>.5,J=d.nextElementSibling,K=k(w,g,s,e,d,r);if(K!==!1){if(R=!0,setTimeout(m,30),b(o),1===K||-1===K)q=1===K;else if(D){var M=s.offsetTop,N=d.offsetTop;q=M===N?d.previousElementSibling===s&&!E||H&&E:N>M}else q=J!==s&&!G||H&&G;s.contains(g)||(q&&!J?g.appendChild(s):d.parentNode.insertBefore(s,q?J:d)),t=s.parentNode,this._animate(e,s),this._animate(r,d)}}}},_animate:function(a,b){var c=this.options.animation;if(c){var d=b.getBoundingClientRect();h(b,"transition","none"),h(b,"transform","translate3d("+(a.left-d.left)+"px,"+(a.top-d.top)+"px,0)"),b.offsetWidth,h(b,"transition","all "+c+"ms"),h(b,"transform","translate3d(0,0,0)"),clearTimeout(b.animated),b.animated=setTimeout(function(){h(b,"transition",""),h(b,"transform",""),b.animated=!1},c)}},_offUpEvents:function(){var a=this.el.ownerDocument;f(N,"touchmove",this._onTouchMove),f(a,"mouseup",this._onDrop),f(a,"touchend",this._onDrop),f(a,"touchcancel",this._onDrop)},_onDrop:function(b){var c=this.el,d=this.options;clearInterval(this._loopId),clearInterval(J.pid),clearTimeout(this._dragStartTimer),f(N,"mousemove",this._onTouchMove),this.nativeDraggable&&(f(N,"drop",this),f(c,"dragstart",this._onDragStart)),this._offUpEvents(),b&&(I&&(b.preventDefault(),!d.dropBubble&&b.stopPropagation()),u&&u.parentNode.removeChild(u),s&&(this.nativeDraggable&&f(s,"dragend",this),l(s),g(s,this.options.ghostClass,!1),g(s,this.options.chosenClass,!1),w!==t?(E=p(s),E>=0&&(j(null,t,"sort",s,w,D,E),j(this,w,"sort",s,w,D,E),j(null,t,"add",s,w,D,E),j(this,w,"remove",s,w,D,E))):(v&&v.parentNode.removeChild(v),s.nextSibling!==x&&(E=p(s),E>=0&&(j(this,w,"update",s,w,D,E),j(this,w,"sort",s,w,D,E)))),a.active&&(null!==E&&-1!==E||(E=D),j(this,w,"end",s,w,D,E),this.save())),w=s=t=u=x=v=y=z=G=H=I=E=A=B=F=a.active=null)},handleEvent:function(a){var b=a.type;"dragover"===b||"dragenter"===b?s&&(this._onDragOver(a),d(a)):"drop"!==b&&"dragend"!==b||this._onDrop(a)},toArray:function(){for(var a,b=[],d=this.el.children,e=0,f=d.length,g=this.options;f>e;e++)a=d[e],c(a,g.draggable,this.el)&&b.push(a.getAttribute(g.dataIdAttr)||o(a));return b},sort:function(a){var b={},d=this.el;this.toArray().forEach(function(a,e){var f=d.children[e];c(f,this.options.draggable,d)&&(b[a]=f)},this),a.forEach(function(a){b[a]&&(d.removeChild(b[a]),d.appendChild(b[a]))})},save:function(){var a=this.options.store;a&&a.set(this)},closest:function(a,b){return c(a,b||this.options.draggable,this.el)},option:function(a,b){var c=this.options;return void 0===b?c[a]:(c[a]=b,void("group"===a&&V(c)))},destroy:function(){var a=this.el;a[L]=null,f(a,"mousedown",this._onTapStart),f(a,"touchstart",this._onTapStart),this.nativeDraggable&&(f(a,"dragover",this),f(a,"dragenter",this)),Array.prototype.forEach.call(a.querySelectorAll("[draggable]"),function(a){a.removeAttribute("draggable")}),T.splice(T.indexOf(this._onDragOver),1),this._onDrop(),this.el=a=null}},a.utils={on:e,off:f,css:h,find:i,is:function(a,b){return!!c(a,b,a)},extend:r,throttle:q,closest:c,toggleClass:g,index:p},a.create=function(b,c){return new a(b,c)},a.version="1.4.2",a}),function(a){"use strict";"function"==typeof define&&define.amd?define(["angular","./Sortable"],a):"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?(require("angular"),a(angular,require("./Sortable")),module.exports="ng-sortable"):window.angular&&window.Sortable&&a(angular,Sortable)}(function(a,b){"use strict";var c="Sortable:ng-sortable";a.module("ng-sortable",[]).constant("ngSortableVersion","0.4.0").constant("ngSortableConfig",{}).directive("ngSortable",["$parse","ngSortableConfig",function(d,e){var f,g,h=function(a,b){var c=[].filter.call(a.childNodes,function(a){return 8===a.nodeType&&-1!==a.nodeValue.indexOf("ngRepeat:")})[0];if(!c)return function(){return null};c=c.nodeValue.match(/ngRepeat:\s*(?:\(.*?,\s*)?([^\s)]+)[\s)]+in\s+([^\s|]+)/);var e=d(c[2]);return function(){return e(b.$parent)||[]}};return{restrict:"AC",scope:{ngSortable:"=?"},link:function(d,i){function j(a,b){var c="on"+a.type.charAt(0).toUpperCase()+a.type.substr(1),d=p();n[c]&&n[c]({model:b||d[a.newIndex],models:d,oldIndex:a.oldIndex,newIndex:a.newIndex})}function k(e){var h=p();if(h){var i=e.oldIndex,j=e.newIndex;if(m!==e.from){var k=e.from[c]();f=k[i],e.clone?(f=a.copy(f),k.splice(b.utils.index(e.clone),0,k.splice(i,1)[0]),e.from.removeChild(e.clone)):k.splice(i,1),h.splice(j,0,f),e.from.insertBefore(e.item,g)}else h.splice(j,0,h.splice(i,1)[0]);d.$apply()}}var l,m=i[0],n=a.extend(d.ngSortable||{},e),o=[],p=h(m,d);m[c]=p,l=b.create(m,Object.keys(n).reduce(function(a,b){return a[b]=a[b]||n[b],a},{onStart:function(a){g=a.item.nextSibling,j(a),d.$apply()},onEnd:function(a){j(a,f),d.$apply()},onAdd:function(a){k(a),j(a,f),d.$apply()},onUpdate:function(a){k(a),j(a)},onRemove:function(a){j(a,f)},onSort:function(a){j(a)}})),i.on("$destroy",function(){a.forEach(o,function(a){a()}),l.destroy(),m[c]=null,m=null,o=null,l=null,g=null}),a.forEach(["sort","disabled","draggable","handle","animation","group","ghostClass","filter","onStart","onEnd","onAdd","onUpdate","onRemove","onSort"],function(a){o.push(d.$watch("ngSortable."+a,function(b){void 0!==b&&(n[a]=b,/^on[A-Z]/.test(a)||l.option(a,b))}))})}}}])}),function(a){"use strict";"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=a(require("./Sortable")):"function"==typeof define&&define.amd?define(["./Sortable"],a):window.SortableMixin=a(Sortable)}(function(a){"use strict";function b(a){return a.sortableOptions&&a.sortableOptions.model||g.model}function c(a){var c=b(a),d=a.state&&a.state[c]||a.props[c];return d.slice()}function d(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}var e,f,g={ref:"list",model:"items",animation:100,onStart:"handleStart",onEnd:"handleEnd",onAdd:"handleAdd",onUpdate:"handleUpdate",onRemove:"handleRemove",onSort:"handleSort",onFilter:"handleFilter",onMove:"handleMove"},h={sortableMixinVersion:"0.1.1",_sortableInstance:null,componentDidMount:function(){var h,i=d(d({},g),this.sortableOptions||{}),j=d({},i),k=function(a,b){var c=this[i[a]];c&&c.call(this,b,this._sortableInstance)}.bind(this);"onStart onEnd onAdd onSort onUpdate onRemove onFilter onMove".split(" ").forEach(function(a){j[a]=function(d){if("onStart"===a)e=d.item.nextElementSibling,f=this;else if("onAdd"===a||"onUpdate"===a){d.from.insertBefore(d.item,e);var g,h,i={},l={},m=d.oldIndex,n=d.newIndex,o=c(this);"onAdd"===a?(g=c(f),h=g.splice(m,1)[0],o.splice(n,0,h),l[b(f)]=g):o.splice(n,0,o.splice(m,1)[0]),i[b(this)]=o,j.stateHandler?this[j.stateHandler](i):this.setState(i),this!==f&&f.setState(l)}setTimeout(function(){k(a,d)},0)}.bind(this)},this),h=this.getDOMNode()?(this.refs[i.ref]||this).getDOMNode():this.refs[i.ref]||this,this._sortableInstance=a.create(h,j); -},componentWillReceiveProps:function(a){var c={},d=b(this),e=a[d];e&&(c[d]=e,this.setState(c))},componentWillUnmount:function(){this._sortableInstance.destroy(),this._sortableInstance=null}};return h}),function(a,b){"use strict";angular.module("adf",["adf.provider","ui.bootstrap"]).value("adfTemplatePath","../src/templates/").value("rowTemplate",'').value("columnTemplate",'').value("adfVersion","0.11.0"),angular.module("adf").directive("adfDashboardColumn",["$log","$compile","$rootScope","adfTemplatePath","rowTemplate","dashboard",function(a,b,c,d,e,f){function g(a,b,d){var e=b.widgets;a.$apply(function(){e.splice(d.newIndex,0,e.splice(d.oldIndex,1)[0]),c.$broadcast("adfWidgetMovedInColumn")})}function h(a,b){for(var c=null,d=0;d0)for(var c=a.widgets.shift();c;)b.widgets.push(c),c=a.widgets.shift()}function i(a,b,c){return c=c||0,angular.isDefined(a.rows)&&angular.forEach(a.rows,function(a){angular.forEach(a.columns,function(a){a.widgets||(a.widgets=[]),angular.isDefined(b[c])&&(angular.isDefined(a.rows)||(h(b[c],a),c++)),c=i(a,b,c)})}),c}function j(a,b){return b=b||[],angular.isDefined(a.rows)&&angular.forEach(a.rows,function(a){angular.forEach(a.columns,function(a){b.push(a),j(a,b)})}),b}function k(a,b){var c=j(a),d=0;for(a.rows=angular.copy(b.rows);d{}
            ',e='
            \n
            \n loading ...\n
            \n
            ',f=function(){return!0};this.widget=function(b,c){var d=angular.extend({reload:!1,frameless:!1},c);if(d.edit){var e={reload:!0,immediate:!1,apply:f};angular.extend(e,d.edit),d.edit=e}return a[b]=d,this},this.widgetsPath=function(a){return b=a,this},this.structure=function(a,b){return c[a]=b,this},this.messageTemplate=function(a){return d=a,this},this.loadingTemplate=function(a){return e=a,this},this.$get=function(){var f=0;return{widgets:a,widgetsPath:b,structures:c,messageTemplate:d,loadingTemplate:e,id:function(){return(new Date).getTime()+"-"+ ++f},idEquals:function(a,b){return a&&b&&a.toString()===b.toString()}}}}),angular.module("adf").directive("adfDashboardRow",["$compile","adfTemplatePath","columnTemplate",function(a,b,c){return{restrict:"E",replace:!0,scope:{row:"=",adfModel:"=",editMode:"=",continuousEditMode:"=",options:"="},templateUrl:b+"dashboard-row.html",link:function(b,d){angular.isDefined(b.row.columns)&&angular.isArray(b.row.columns)&&a(c)(b,function(a){d.append(a)})}}}]),angular.module("adf").directive("adfWidgetContent",["$log","$q","$sce","$http","$templateCache","$compile","$controller","$injector","dashboard",function(a,b,c,d,e,f,g,h,i){function j(a){var b=a;return a.indexOf("{widgetsPath}")>=0&&(b=a.replace("{widgetsPath}",i.widgetsPath).replace("//","/"),0===b.indexOf("/")&&(b=b.substring(1))),b}function k(a){var f=b.defer();if(a.template)f.resolve(a.template);else if(a.templateUrl){var g=e.get(a.templateUrl);if(g)f.resolve(g);else{var h=c.getTrustedResourceUrl(j(a.templateUrl));d.get(h).success(function(b){e.put(a.templateUrl,b),f.resolve(b)}).error(function(){f.reject("could not load template")})}}return f.promise}function l(c,d,e){var j=c.model,l=c.content;d.html(i.loadingTemplate);var m=c.$new();j.config||(j.config={}),m.config=j.config;var n={$scope:m,widget:j,config:j.config},o={};return o.$tpl=k(l),l.resolve&&angular.forEach(l.resolve,function(a,b){angular.isString(a)?o[b]=h.get(a):o[b]=h.invoke(a,a,n)}),b.all(o).then(function(a){angular.extend(a,n);var b=a.$tpl;if(d.html(b),l.controller){var c=g(l.controller,a);l.controllerAs&&(m[l.controllerAs]=c),d.children().data("$ngControllerController",c)}f(d.contents())(m)},function(b){var c="Could not resolve all promises";b&&(c+=": "+b),a.warn(c),d.html(i.messageTemplate.replace(/{}/g,c))}),e&&e.$destroy(),m}return{replace:!0,restrict:"EA",transclude:!1,scope:{model:"=",content:"="},link:function(a,b){var c=l(a,b,null);a.$on("widgetConfigChanged",function(){c=l(a,b,c)}),a.$on("widgetReload",function(){c=l(a,b,c)})}}}]),angular.module("adf").directive("adfWidget",["$injector","$q","$log","$uibModal","$rootScope","dashboard","adfTemplatePath",function(a,b,c,d,e,f,g){function h(a){var b=a.definition;if(b){var d=f.widgets[b.type];if(d){b.title||(b.title=d.title),b.titleTemplateUrl||(b.titleTemplateUrl=g+"widget-title.html",d.titleTemplateUrl&&(b.titleTemplateUrl=d.titleTemplateUrl)),b.titleTemplateUrl||(b.frameless=d.frameless),b.styleClass||(b.styleClass=d.styleClass),b.wid||(b.wid=f.id()),a.widget=angular.copy(d);var e=b.config;e?angular.isString(e)&&(e=angular.fromJson(e)):e={},a.config=e,a.widgetState||(a.widgetState={},a.widgetState.isCollapsed=d.collapsed===!0?d.collapsed:!1)}else c.warn("could not find widget "+b.type)}else c.debug("definition not specified, widget was probably removed")}function i(f,h){var i=f.definition;if(i){var j=function(){var a=f.col;if(a){var b=a.widgets.indexOf(i);b>=0&&a.widgets.splice(b,1)}h.remove(),e.$broadcast("adfWidgetRemovedFromColumn")};f.remove=function(){if(f.options.enableConfirmDelete){var a=f.$new(),b=g+"widget-delete.html";i.deleteTemplateUrl&&(b=i.deleteTemplateUrl);var c={scope:a,templateUrl:b,backdrop:"static"},e=d.open(c);a.closeDialog=function(){e.close(),a.$destroy()},a.deleteDialog=function(){j(),a.closeDialog()}}else j()},f.reload=function(){f.$broadcast("widgetReload")},f.edit=function(){function c(a){var c;if("boolean"==typeof a){var d=b.defer();a?d.resolve():d.reject(),c=d.promise}else c=b.when(a);return c}var e=f.$new();e.definition=angular.copy(i);var h=g+"widget-edit.html";i.editTemplateUrl&&(h=i.editTemplateUrl);var j={scope:e,templateUrl:h,backdrop:"static"},k=d.open(j);e.closeDialog=function(){k.close(),e.$destroy()},e.saveDialog=function(){e.validationError=null;var b=f.widget,d=b.edit.apply,g={widget:b,definition:e.definition,config:e.definition.config},h=a.invoke(d,d,g);c(h).then(function(){i.title=e.definition.title,angular.extend(i.config,e.definition.config),b.edit&&b.edit.reload&&f.$broadcast("widgetConfigChanged"),e.closeDialog()},function(a){a?e.validationError=a:e.validationError="Validation durring apply failed"})}}}else c.debug("widget not found")}return{replace:!0,restrict:"EA",transclude:!1,templateUrl:g+"widget.html",scope:{definition:"=",col:"=column",editMode:"=",options:"=",widgetState:"="},controller:["$scope",function(a){a.$on("adfDashboardCollapseExpand",function(b,c){a.widgetState.isCollapsed=c.collapseExpandStatus}),a.$on("adfWidgetEnterEditMode",function(b,c){f.idEquals(a.definition.wid,c.wid)&&a.edit()}),a.widgetClasses=function(b,c){var d=c.styleClass||"";return b.frameless&&!a.editMode||(d+=" panel panel-default"),d},a.openFullScreen=function(){var b=a.definition,c=a.$new(),e={scope:c,templateUrl:g+"widget-fullscreen.html",size:b.modalSize||"lg",backdrop:"static",windowClass:b.fullScreen?"dashboard-modal widget-fullscreen":"dashboard-modal"},f=d.open(e);c.closeDialog=function(){f.close(),c.$destroy()}}}],compile:function(){return{pre:h,post:i}}}}]),angular.module("adf").run(["$templateCache",function(a){a.put("../src/templates/dashboard-column.html",'
            '),a.put("../src/templates/dashboard-edit.html",' '),a.put("../src/templates/dashboard-row.html","
            "),a.put("../src/templates/dashboard-title.html",'

            {{model.title}}

            '),a.put("../src/templates/dashboard.html",'
            '),a.put("../src/templates/widget-add.html",' '),a.put("../src/templates/widget-delete.html",' '),a.put("../src/templates/widget-edit.html",'
            '),a.put("../src/templates/widget-fullscreen.html",' '),a.put("../src/templates/widget-title.html",'

            {{definition.title}}

            '),a.put("../src/templates/widget.html",'
            ')}])}(window),angular.module("adf.structures.base",["adf"]).config(["dashboardProvider",function(a){a.structure("6-6",{rows:[{columns:[{styleClass:"col-md-6"},{styleClass:"col-md-6"}]}]}).structure("4-8",{rows:[{columns:[{styleClass:"col-md-4",widgets:[]},{styleClass:"col-md-8",widgets:[]}]}]}).structure("12/4-4-4",{rows:[{columns:[{styleClass:"col-md-12"}]},{columns:[{styleClass:"col-md-4"},{styleClass:"col-md-4"},{styleClass:"col-md-4"}]}]}).structure("12/6-6",{rows:[{columns:[{styleClass:"col-md-12"}]},{columns:[{styleClass:"col-md-6"},{styleClass:"col-md-6"}]}]}).structure("12/6-6/12",{rows:[{columns:[{styleClass:"col-md-12"}]},{columns:[{styleClass:"col-md-6"},{styleClass:"col-md-6"}]},{columns:[{styleClass:"col-md-12"}]}]}).structure("3-9 (12/6-6)",{rows:[{columns:[{styleClass:"col-md-3"},{styleClass:"col-md-9",rows:[{columns:[{styleClass:"col-md-12"}]},{columns:[{styleClass:"col-md-6"},{styleClass:"col-md-6"}]}]}]}]})}]),function(a,b){"use strict";angular.module("adf.widget.clock",["adf.provider"]).config(["dashboardProvider",function(a){a.widget("clock",{title:"Clock",description:"Displays date and time",templateUrl:"{widgetsPath}/clock/src/view.html",controller:"clockController",controllerAs:"clock",config:{timePattern:"HH:mm:ss",datePattern:"YYYY-MM-DD"},edit:{templateUrl:"{widgetsPath}/clock/src/edit.html"}})}]).controller("clockController",["$scope","$interval","config",function(a,b,c){function d(){var a=new moment;e.time=a.format(c.timePattern),e.date=a.format(c.datePattern)}var e=this;d();var f=b(d,1e3);a.$on("$destroy",function(){b.cancel(f)})}]),angular.module("adf.widget.clock").run(["$templateCache",function(a){a.put("{widgetsPath}/clock/src/edit.html",'

            For the list of possible patterns, please have a look at moment.js documentation

            '),a.put("{widgetsPath}/clock/src/view.html","
            {{clock.time}}
            {{clock.date}}
            ")}])}(window),function(a,b){"use strict";angular.module("adf.widget.iframe",["adf.provider"]).config(["dashboardProvider",function(a){a.widget("iframe",{title:"iframe",description:"Embed an external page into the dashboard",templateUrl:"{widgetsPath}/iframe/src/view.html",controller:"iframeController",controllerAs:"iframe",edit:{templateUrl:"{widgetsPath}/iframe/src/edit.html"},config:{height:"420px"}})}]).controller("iframeController",["$sce","config",function(a,b){b.url&&(this.url=a.trustAsResourceUrl(b.url))}]),angular.module("adf.widget.iframe").run(["$templateCache",function(a){a.put("{widgetsPath}/iframe/src/edit.html","
            "),a.put("{widgetsPath}/iframe/src/view.html",'
            Please insert a url in the widget configuration
            ')}])}(window),function(){"use strict";angular.module("ui.grid.i18n",[]),angular.module("ui.grid",["ui.grid.i18n"])}(),function(){"use strict";angular.module("ui.grid").constant("uiGridConstants",{LOG_DEBUG_MESSAGES:!0,LOG_WARN_MESSAGES:!0,LOG_ERROR_MESSAGES:!0,CUSTOM_FILTERS:/CUSTOM_FILTERS/g,COL_FIELD:/COL_FIELD/g,MODEL_COL_FIELD:/MODEL_COL_FIELD/g,TOOLTIP:/title=\"TOOLTIP\"/g,DISPLAY_CELL_TEMPLATE:/DISPLAY_CELL_TEMPLATE/g,TEMPLATE_REGEXP:/<.+>/,FUNC_REGEXP:/(\([^)]*\))?$/,DOT_REGEXP:/\./g,APOS_REGEXP:/'/g,BRACKET_REGEXP:/^(.*)((?:\s*\[\s*\d+\s*\]\s*)|(?:\s*\[\s*"(?:[^"\\]|\\.)*"\s*\]\s*)|(?:\s*\[\s*'(?:[^'\\]|\\.)*'\s*\]\s*))(.*)$/,COL_CLASS_PREFIX:"ui-grid-col",events:{GRID_SCROLL:"uiGridScroll",COLUMN_MENU_SHOWN:"uiGridColMenuShown",ITEM_DRAGGING:"uiGridItemDragStart",COLUMN_HEADER_CLICK:"uiGridColumnHeaderClick"},keymap:{TAB:9,STRG:17,CAPSLOCK:20,CTRL:17,CTRLRIGHT:18,CTRLR:18,SHIFT:16,RETURN:13,ENTER:13,BACKSPACE:8,BCKSP:8,ALT:18,ALTR:17,ALTRIGHT:17,SPACE:32,WIN:91,MAC:91,FN:null,PG_UP:33,PG_DOWN:34,UP:38,DOWN:40,LEFT:37,RIGHT:39,ESC:27,DEL:46,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123},ASC:"asc",DESC:"desc",filter:{STARTS_WITH:2,ENDS_WITH:4,EXACT:8,CONTAINS:16,GREATER_THAN:32,GREATER_THAN_OR_EQUAL:64,LESS_THAN:128,LESS_THAN_OR_EQUAL:256,NOT_EQUAL:512,SELECT:"select",INPUT:"input"},aggregationTypes:{sum:2,count:4,avg:8,min:16,max:32},CURRENCY_SYMBOLS:["ƒ","$","£","$","¤","¥","៛","₩","₱","฿","₫"],scrollDirection:{UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",NONE:"none"},dataChange:{ALL:"all",EDIT:"edit",ROW:"row",COLUMN:"column",OPTIONS:"options"},scrollbars:{NEVER:0,ALWAYS:1}})}(),angular.module("ui.grid").directive("uiGridCell",["$compile","$parse","gridUtil","uiGridConstants",function(a,b,c,d){var e={priority:0,scope:!1,require:"?^uiGrid",compile:function(){return{pre:function(b,e,f,g){function h(){var a=b.col.compiledElementFn;a(b,function(a,b){e.append(a)})}if(g&&b.col.compiledElementFn)h();else if(g&&!b.col.compiledElementFn)b.col.getCompiledElementFn().then(function(a){a(b,function(a,b){e.append(a)})});else{var i=b.col.cellTemplate.replace(d.MODEL_COL_FIELD,"row.entity."+c.preEval(b.col.field)).replace(d.COL_FIELD,"grid.getCellValue(row, col)"),j=a(i)(b);e.append(j)}},post:function(a,b,c,e){var f=a.col.getColClass(!1);b.addClass(f);var g,h=function(c){var d=b;g&&(d.removeClass(g),g=null),g=angular.isFunction(a.col.cellClass)?a.col.cellClass(a.grid,a.row,a.col,a.rowRenderIndex,a.colRenderIndex):a.col.cellClass,d.addClass(g)};a.col.cellClass&&h();var i=a.grid.registerDataChangeCallback(h,[d.dataChange.COLUMN,d.dataChange.EDIT]),j=function(c,d){if(c!==d){(g||a.col.cellClass)&&h();var e=a.col.getColClass(!1);e!==f&&(b.removeClass(f),b.addClass(e),f=e)}},k=a.$watch("row",j),l=function(){i(),k()};a.$on("$destroy",l),b.on("$destroy",l)}}}};return e}]),function(){angular.module("ui.grid").service("uiGridColumnMenuService",["i18nService","uiGridConstants","gridUtil",function(a,b,c){var d={initialize:function(a,b){a.grid=b.grid,b.columnMenuScope=a,a.menuShown=!1},setColMenuItemWatch:function(a){var b=a.$watch("col.menuItems",function(b,c){"undefined"!=typeof b&&b&&angular.isArray(b)?(b.forEach(function(b){"undefined"!=typeof b.context&&b.context||(b.context={}),b.context.col=a.col}),a.menuItems=a.defaultMenuItems.concat(b)):a.menuItems=a.defaultMenuItems});a.$on("$destroy",b)},sortable:function(a){return!!(a.grid.options.enableSorting&&"undefined"!=typeof a.col&&a.col&&a.col.enableSorting)},isActiveSort:function(a,b){return"undefined"!=typeof a.col&&"undefined"!=typeof a.col.sort&&"undefined"!=typeof a.col.sort.direction&&a.col.sort.direction===b},suppressRemoveSort:function(a){return!(!a.col||!a.col.suppressRemoveSort)},hideable:function(a){return"undefined"==typeof a.col||!a.col||!a.col.colDef||a.col.colDef.enableHiding!==!1},getDefaultMenuItems:function(c){return[{title:a.getSafeText("sort.ascending"),icon:"ui-grid-icon-sort-alt-up",action:function(a){a.stopPropagation(),c.sortColumn(a,b.ASC)},shown:function(){return d.sortable(c)},active:function(){return d.isActiveSort(c,b.ASC)}},{title:a.getSafeText("sort.descending"),icon:"ui-grid-icon-sort-alt-down",action:function(a){a.stopPropagation(),c.sortColumn(a,b.DESC)},shown:function(){return d.sortable(c)},active:function(){return d.isActiveSort(c,b.DESC)}},{title:a.getSafeText("sort.remove"),icon:"ui-grid-icon-cancel",action:function(a){a.stopPropagation(),c.unsortColumn()},shown:function(){return d.sortable(c)&&"undefined"!=typeof c.col&&"undefined"!=typeof c.col.sort&&"undefined"!=typeof c.col.sort.direction&&null!==c.col.sort.direction&&!d.suppressRemoveSort(c)}},{title:a.getSafeText("column.hide"),icon:"ui-grid-icon-cancel",shown:function(){return d.hideable(c)},action:function(a){a.stopPropagation(),c.hideColumn()}},{title:a.getSafeText("columnMenu.close"),screenReaderOnly:!0,shown:function(){return!0},action:function(a){a.stopPropagation()}}]},getColumnElementPosition:function(a,b,d){var e={};return e.left=d[0].offsetLeft,e.top=d[0].offsetTop,e.parentLeft=d[0].offsetParent.offsetLeft,e.offset=0,b.grid.options.offsetLeft&&(e.offset=b.grid.options.offsetLeft),e.height=c.elementHeight(d,!0),e.width=c.elementWidth(d,!0),e},repositionMenu:function(a,b,d,e,f){var g=e[0].querySelectorAll(".ui-grid-menu"),h=b.renderContainer?b.renderContainer:"body",i=(b.grid.renderContainers[h],c.closestElm(f,".ui-grid-render-container")),j=i.getBoundingClientRect().left-a.grid.element[0].getBoundingClientRect().left,k=i.querySelectorAll(".ui-grid-viewport")[0].scrollLeft,l=b.lastMenuWidth?b.lastMenuWidth:a.lastMenuWidth?a.lastMenuWidth:170,m=b.lastMenuPaddingRight?b.lastMenuPaddingRight:a.lastMenuPaddingRight?a.lastMenuPaddingRight:10;if(0!==g.length){var n=g[0].querySelectorAll(".ui-grid-menu-mid");0===n.length||angular.element(n).hasClass("ng-hide")||(l=c.elementWidth(g,!0),a.lastMenuWidth=l,b.lastMenuWidth=l,m=parseInt(c.getStyles(angular.element(g)[0]).paddingRight,10),a.lastMenuPaddingRight=m,b.lastMenuPaddingRight=m)}var o=d.left+j-k+d.parentLeft+d.width-l+m;oc)d=b;else{if(c>a&&!d)return d=b,!0;if(c>a&&d)return!0}}),d){var g=d.getColClass();b.focus.bySelector(e,".ui-grid-header-cell."+g+" .ui-grid-header-cell-primary-focus",!0).then(angular.noop,function(a){return"canceled"!==a?c():void 0})}else c()})};f.hideColumn=function(){f.col.colDef.visible=!1,f.col.visible=!1,f.grid.queueGridRefresh(),f.hideMenu(),f.grid.api.core.notifyDataChange(c.dataChange.COLUMN),f.grid.api.core.raise.columnVisibilityChanged(f.col),j()}},controller:["$scope",function(a){var b=this;a.$watch("menuItems",function(a,c){b.menuItems=a})}]};return f}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFilter",["$compile","$templateCache","i18nService","gridUtil",function(a,b,c,d){return{compile:function(){return{pre:function(b,c,d,e){b.col.updateFilters=function(d){if(c.children().remove(),d){var e=b.col.filterHeaderTemplate;c.append(a(e)(b))}},b.$on("$destroy",function(){delete b.col.updateFilters})},post:function(a,b,e,f){a.aria=c.getSafeText("headerCell.aria"),a.removeFilter=function(a,c){a.term=null,d.focus.bySelector(b,".ui-grid-filter-input-"+c)}}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFooterCell",["$timeout","gridUtil","uiGridConstants","$compile",function(a,b,c,d){var e={priority:0,scope:{col:"=",row:"=",renderIndex:"="},replace:!0,require:"^uiGrid",compile:function(a,b,e){return{pre:function(a,b,c,e){var f=d(a.col.footerCellTemplate)(a);b.append(f)},post:function(a,b,d,e){a.grid=e.grid;var f=a.col.getColClass(!1);b.addClass(f);var g,h=function(c){var d=b;g&&(d.removeClass(g),g=null),g=angular.isFunction(a.col.footerCellClass)?a.col.footerCellClass(a.grid,a.row,a.col,a.rowRenderIndex,a.colRenderIndex):a.col.footerCellClass,d.addClass(g)};a.col.footerCellClass&&h(),a.col.updateAggregationValue();var i=a.grid.registerDataChangeCallback(h,[c.dataChange.COLUMN]);a.grid.api.core.on.rowsRendered(a,a.col.updateAggregationValue), -a.grid.api.core.on.rowsRendered(a,h),a.$on("$destroy",i)}}}};return e}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFooter",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout",function(a,b,c,d,e){return{restrict:"EA",replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:!0,compile:function(a,c){return{pre:function(a,c,e,f){var g=f[0],h=f[1];a.grid=g.grid,a.colContainer=h.colContainer,h.footer=c;var i=a.grid.options.footerTemplate;d.getTemplate(i).then(function(d){var e=angular.element(d),f=b(e)(a);if(c.append(f),h){var g=c[0].getElementsByClassName("ui-grid-footer-viewport")[0];g&&(h.footerViewport=g)}})},post:function(a,b,c,e){var f=e[0],g=e[1];f.grid;d.disableAnimations(b),g.footer=b;var h=b[0].getElementsByClassName("ui-grid-footer-viewport")[0];h&&(g.footerViewport=h)}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridGridFooter",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout",function(a,b,c,d,e){return{restrict:"EA",replace:!0,require:"^uiGrid",scope:!0,compile:function(a,c){return{pre:function(a,c,e,f){a.grid=f.grid;var g=a.grid.options.gridFooterTemplate;d.getTemplate(g).then(function(d){var e=angular.element(d),f=b(e)(a);c.append(f)})},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridGroupPanel",["$compile","uiGridConstants","gridUtil",function(a,b,c){var d="ui-grid/ui-grid-group-panel";return{restrict:"EA",replace:!0,require:"?^uiGrid",scope:!1,compile:function(b,e){return{pre:function(b,e,f,g){var h=b.grid.options.groupPanelTemplate||d;c.getTemplate(h).then(function(c){var d=angular.element(c),f=a(d)(b);e.append(f)})},post:function(a,b,c,d){b.bind("$destroy",function(){})}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridHeaderCell",["$compile","$timeout","$window","$document","gridUtil","uiGridConstants","ScrollEvent","i18nService",function(a,b,c,d,e,f,g,h){var i=500,j=500,k={priority:0,scope:{col:"=",row:"=",renderIndex:"="},require:["^uiGrid","^uiGridRenderContainer"],replace:!0,compile:function(){return{pre:function(b,c,d){var e=a(b.col.headerCellTemplate)(b);c.append(e)},post:function(a,c,e,g){var k=g[0],l=g[1];a.i18n={headerCell:h.getSafeText("headerCell"),sort:h.getSafeText("sort")},a.isSortPriorityVisible=function(){return a.col.sort.priority&&a.grid.columns.some(function(b,c){return b.sort.priority&&b!==a.col})},a.getSortDirectionAriaLabel=function(){var b=a.col,c=b.sort.direction===f.ASC?a.i18n.sort.ascending:b.sort.direction===f.DESC?a.i18n.sort.descending:a.i18n.sort.none,d=c;return a.isSortPriorityVisible()&&(d=d+". "+a.i18n.headerCell.priority+" "+b.sort.priority),d},a.grid=k.grid,a.renderContainer=k.grid.renderContainers[l.containerId];var m=a.col.getColClass(!1);c.addClass(m),a.menuShown=!1,a.asc=f.ASC,a.desc=f.DESC;var n,o,p=(angular.element(c[0].querySelectorAll(".ui-grid-header-cell-menu")),angular.element(c[0].querySelectorAll(".ui-grid-cell-contents"))),q=[];a.downFn=function(e){e.stopPropagation(),"undefined"!=typeof e.originalEvent&&void 0!==e.originalEvent&&(e=e.originalEvent),e.button&&0!==e.button||(o=e.pageX,a.mousedownStartTime=(new Date).getTime(),a.mousedownTimeout=b(function(){},i),a.mousedownTimeout.then(function(){a.colMenu&&k.columnMenuScope.showMenu(a.col,c,e)}),k.fireEvent(f.events.COLUMN_HEADER_CLICK,{event:e,columnName:a.col.colDef.name}),a.offAllEvents(),"touchstart"===e.type?(d.on("touchend",a.upFn),d.on("touchmove",a.moveFn)):"mousedown"===e.type&&(d.on("mouseup",a.upFn),d.on("mousemove",a.moveFn)))},a.upFn=function(c){c.stopPropagation(),b.cancel(a.mousedownTimeout),a.offAllEvents(),a.onDownEvents(c.type);var d=(new Date).getTime(),e=d-a.mousedownStartTime;e>i||a.sortable&&a.handleClick(c)},a.moveFn=function(c){var d=c.pageX-o;0!==d&&(b.cancel(a.mousedownTimeout),a.offAllEvents(),a.onDownEvents(c.type))},a.clickFn=function(b){b.stopPropagation(),p.off("click",a.clickFn)},a.offAllEvents=function(){p.off("touchstart",a.downFn),p.off("mousedown",a.downFn),d.off("touchend",a.upFn),d.off("mouseup",a.upFn),d.off("touchmove",a.moveFn),d.off("mousemove",a.moveFn),p.off("click",a.clickFn)},a.onDownEvents=function(c){switch(c){case"touchmove":case"touchend":p.on("click",a.clickFn),p.on("touchstart",a.downFn),b(function(){p.on("mousedown",a.downFn)},j);break;case"mousemove":case"mouseup":p.on("click",a.clickFn),p.on("mousedown",a.downFn),b(function(){p.on("touchstart",a.downFn)},j);break;default:p.on("click",a.clickFn),p.on("touchstart",a.downFn),p.on("mousedown",a.downFn)}};var r=function(d){var e=c;n&&(e.removeClass(n),n=null),n=angular.isFunction(a.col.headerCellClass)?a.col.headerCellClass(a.grid,a.row,a.col,a.rowRenderIndex,a.colRenderIndex):a.col.headerCellClass,e.addClass(n),b(function(){var b=a.grid.renderContainers.right?a.grid.renderContainers.right:a.grid.renderContainers.body;a.isLastCol=a.col===b.visibleColumnCache[b.visibleColumnCache.length-1]}),k.grid.options.enableSorting&&a.col.enableSorting?a.sortable=!0:a.sortable=!1;var g=a.filterable;k.grid.options.enableFiltering&&a.col.enableFiltering?a.filterable=!0:a.filterable=!1,g!==a.filterable&&("undefined"!=typeof a.col.updateFilters&&a.col.updateFilters(a.filterable),a.filterable?(a.col.filters.forEach(function(b,c){q.push(a.$watch("col.filters["+c+"].term",function(a,b){a!==b&&(k.grid.api.core.raise.filterChanged(),k.grid.api.core.notifyDataChange(f.dataChange.COLUMN),k.grid.queueGridRefresh())}))}),a.$on("$destroy",function(){q.forEach(function(a){a()})})):q.forEach(function(a){a()})),a.col.grid.options&&a.col.grid.options.enableColumnMenus!==!1&&a.col.colDef&&a.col.colDef.enableColumnMenu!==!1?a.colMenu=!0:a.colMenu=!1,a.offAllEvents(),(a.sortable||a.colMenu)&&(a.onDownEvents(),a.$on("$destroy",function(){a.offAllEvents()}))};r();var s=a.grid.registerDataChangeCallback(r,[f.dataChange.COLUMN]);a.$on("$destroy",s),a.handleClick=function(b){var c=!1;b.shiftKey&&(c=!0),k.grid.sortColumn(a.col,c).then(function(){k.columnMenuScope&&k.columnMenuScope.hideMenu(),k.grid.refresh()})},a.toggleMenu=function(b){b.stopPropagation(),k.columnMenuScope.menuShown&&k.columnMenuScope.col===a.col?k.columnMenuScope.hideMenu():k.columnMenuScope.showMenu(a.col,c)}}}}};return k}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridHeader",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout","ScrollEvent",function(a,b,c,d,e,f){var g="ui-grid/ui-grid-header",h="ui-grid/ui-grid-no-header";return{restrict:"EA",replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:!0,compile:function(a,c){return{pre:function(a,c,e,i){function j(){m.header=m.colContainer.header=c;var a=c[0].getElementsByClassName("ui-grid-header-canvas");a.length>0?m.headerCanvas=m.colContainer.headerCanvas=a[0]:m.headerCanvas=null}function k(a){if(!l.grid.isScrollingHorizontally){var b=d.normalizeScrollLeft(m.headerViewport,l.grid),c=m.colContainer.scrollHorizontal(b),e=new f(l.grid,null,m.colContainer,f.Sources.ViewPortScroll);e.newScrollLeft=b,c>-1&&(e.x={percentage:c}),l.grid.scrollContainers(null,e)}}var l=i[0],m=i[1];a.grid=l.grid,a.colContainer=m.colContainer,j();var n;n=a.grid.options.showHeader?a.grid.options.headerTemplate?a.grid.options.headerTemplate:g:h,d.getTemplate(n).then(function(d){var e=angular.element(d),f=b(e)(a);if(c.replaceWith(f),c=f,j(),m){var g=c[0].getElementsByClassName("ui-grid-header-viewport")[0];g&&(m.headerViewport=g,angular.element(g).on("scroll",k),a.$on("$destroy",function(){angular.element(g).off("scroll",k)}))}a.grid.queueRefresh()})},post:function(a,b,c,e){function f(){var a=h.colContainer.visibleColumnCache,b="",c=0;return a.forEach(function(a){b+=a.getColClassDefinition(),c+=a.drawnWidth}),h.colContainer.canvasWidth=c,b}var g=e[0],h=e[1];g.grid;d.disableAnimations(b),h.header=b;var i=b[0].getElementsByClassName("ui-grid-header-viewport")[0];i&&(h.headerViewport=i),g&&g.grid.registerStyleComputation({priority:15,func:f})}}}}}])}(),function(){angular.module("ui.grid").service("uiGridGridMenuService",["gridUtil","i18nService","uiGridConstants",function(a,b,c){var d={initialize:function(a,b){b.gridMenuScope=a,a.grid=b,a.registeredMenuItems=[],a.$on("$destroy",function(){a.grid&&a.grid.gridMenuScope&&(a.grid.gridMenuScope=null),a.grid&&(a.grid=null),a.registeredMenuItems&&(a.registeredMenuItems=null)}),a.registeredMenuItems=[],b.api.registerMethod("core","addToGridMenu",d.addToGridMenu),b.api.registerMethod("core","removeFromGridMenu",d.removeFromGridMenu)},addToGridMenu:function(b,c){angular.isArray(c)?b.gridMenuScope?(b.gridMenuScope.registeredMenuItems=b.gridMenuScope.registeredMenuItems?b.gridMenuScope.registeredMenuItems:[],b.gridMenuScope.registeredMenuItems=b.gridMenuScope.registeredMenuItems.concat(c)):a.logError("Asked to addToGridMenu, but gridMenuScope not present. Timing issue? Please log issue with ui-grid"):a.logError("addToGridMenu: menuItems must be an array, and is not, not adding any items")},removeFromGridMenu:function(b,c){var d=-1;b&&b.gridMenuScope&&b.gridMenuScope.registeredMenuItems.forEach(function(b,e){b.id===c&&(d>-1?a.logError("removeFromGridMenu: found multiple items with the same id, removing only the last"):d=e)}),d>-1&&b.gridMenuScope.registeredMenuItems.splice(d,1)},getMenuItems:function(c){var e=[];c.grid.options.gridMenuCustomItems&&(angular.isArray(c.grid.options.gridMenuCustomItems)?e=e.concat(c.grid.options.gridMenuCustomItems):a.logError("gridOptions.gridMenuCustomItems must be an array, and is not"));var f=[{title:b.getSafeText("gridMenu.clearAllFilters"),action:function(a){c.grid.clearAllFilters(void 0,!0,void 0)},shown:function(){return c.grid.options.enableFiltering},order:100}];return e=e.concat(f),e=e.concat(c.registeredMenuItems),c.grid.options.gridMenuShowHideColumns!==!1&&(e=e.concat(d.showHideColumns(c))),e.sort(function(a,b){return a.order-b.order}),e},showHideColumns:function(a){var c=[];return a.grid.options.columnDefs&&0!==a.grid.options.columnDefs.length&&0!==a.grid.columns.length?(c.push({title:b.getSafeText("gridMenu.columns"),order:300}),a.grid.options.gridMenuTitleFilter=a.grid.options.gridMenuTitleFilter?a.grid.options.gridMenuTitleFilter:function(a){return a},a.grid.options.columnDefs.forEach(function(b,e){if(b.enableHiding!==!1){var f={icon:"ui-grid-icon-ok",action:function(a){a.stopPropagation(),d.toggleColumnVisibility(this.context.gridCol)},shown:function(){return this.context.gridCol.colDef.visible===!0||void 0===this.context.gridCol.colDef.visible},context:{gridCol:a.grid.getColumn(b.name||b.field)},leaveOpen:!0,order:301+2*e};d.setMenuItemTitle(f,b,a.grid),c.push(f),f={icon:"ui-grid-icon-cancel",action:function(a){a.stopPropagation(),d.toggleColumnVisibility(this.context.gridCol)},shown:function(){return!(this.context.gridCol.colDef.visible===!0||void 0===this.context.gridCol.colDef.visible)},context:{gridCol:a.grid.getColumn(b.name||b.field)},leaveOpen:!0,order:301+2*e+1},d.setMenuItemTitle(f,b,a.grid),c.push(f)}}),c):c},setMenuItemTitle:function(b,c,d){var e=d.options.gridMenuTitleFilter(c.displayName||a.readableColumnName(c.name)||c.field);"string"==typeof e?b.title=e:e.then?(b.title="",e.then(function(a){b.title=a},function(a){b.title=a})):(a.logError("Expected gridMenuTitleFilter to return a string or a promise, it has returned neither, bad config"),b.title="badconfig")},toggleColumnVisibility:function(a){a.colDef.visible=!(a.colDef.visible===!0||void 0===a.colDef.visible),a.grid.refresh(),a.grid.api.core.notifyDataChange(c.dataChange.COLUMN),a.grid.api.core.raise.columnVisibilityChanged(a)}};return d}]).directive("uiGridMenuButton",["gridUtil","uiGridConstants","uiGridGridMenuService","i18nService",function(a,b,c,d){return{priority:0,scope:!0,require:["^uiGrid"],templateUrl:"ui-grid/ui-grid-menu-button",replace:!0,link:function(b,e,f,g){var h=g[0];b.i18n={aria:d.getSafeText("gridMenu.aria")},c.initialize(b,h.grid),b.shown=!1,b.toggleMenu=function(){b.shown?(b.$broadcast("hide-menu"),b.shown=!1):(b.menuItems=c.getMenuItems(b),b.$broadcast("show-menu"),b.shown=!0)},b.$on("menu-hidden",function(){b.shown=!1,a.focus.bySelector(e,".ui-grid-icon-container")})}}}])}(),function(){angular.module("ui.grid").directive("uiGridMenu",["$compile","$timeout","$window","$document","gridUtil","uiGridConstants","i18nService",function(a,b,c,d,e,f,g){var h={priority:0,scope:{menuItems:"=",autoHide:"=?"},require:"?^uiGrid",templateUrl:"ui-grid/uiGridMenu",replace:!1,link:function(a,d,h,i){var j;a.dynamicStyles="",i&&(j=i.grid.gridHeight-30,a.dynamicStyles=[".grid"+i.grid.id+" .ui-grid-menu-mid {","max-height: "+j+"px;","}"].join(" ")),a.i18n={close:g.getSafeText("columnMenu.close")},a.showMenu=function(c,f){a.shown?a.shownMid||(a.shownMid=!0,a.$emit("menu-shown")):(a.shown=!0,b(function(){a.shownMid=!0,a.$emit("menu-shown")}));var g="click";f&&f.originalEvent&&f.originalEvent.type&&"touchstart"===f.originalEvent.type&&(g=f.originalEvent.type),angular.element(document).off("click touchstart",k),b(function(){angular.element(document).on(g,k)}),e.focus.bySelector(d,"button[type=button]",!0)},a.hideMenu=function(c,d){a.shown&&(a.shownMid=!1,b(function(){a.shownMid||(a.shown=!1,a.$emit("menu-hidden"))},200)),angular.element(document).off("click touchstart",k)},a.$on("hide-menu",function(b,c){a.hideMenu(b,c)}),a.$on("show-menu",function(b,c){a.showMenu(b,c)});var k=function(){a.shown&&a.$apply(function(){a.hideMenu()})};"undefined"!=typeof a.autoHide&&void 0!==a.autoHide||(a.autoHide=!0),a.autoHide&&angular.element(c).on("resize",k),a.$on("$destroy",function(){angular.element(document).off("click touchstart",k)}),a.$on("$destroy",function(){angular.element(c).off("resize",k)}),i&&a.$on("$destroy",i.grid.api.core.on.scrollBegin(a,k)),a.$on("$destroy",a.$on(f.events.ITEM_DRAGGING,k))},controller:["$scope","$element","$attrs",function(a,b,c){}]};return h}]).directive("uiGridMenuItem",["gridUtil","$compile","i18nService",function(a,b,c){var d={priority:0,scope:{name:"=",active:"=",action:"=",icon:"=",shown:"=",context:"=",templateUrl:"=",leaveOpen:"=",screenReaderOnly:"="},require:["?^uiGrid","^uiGridMenu"],templateUrl:"ui-grid/uiGridMenuItem",replace:!1,compile:function(d,e){return{pre:function(c,d,e,f){f[0],f[1];c.templateUrl&&a.getTemplate(c.templateUrl).then(function(a){var e=angular.element(a),f=b(e)(c);d.replaceWith(f)})},post:function(b,d,e,f){var g=f[0];f[1];"undefined"!=typeof b.shown&&null!==b.shown||(b.shown=function(){return!0}),b.itemShown=function(){var a={};return b.context&&(a.context=b.context),"undefined"!=typeof g&&g&&(a.grid=g.grid),b.shown.call(a)},b.itemAction=function(c,e){if(a.logDebug("itemAction"),c.stopPropagation(),"function"==typeof b.action){var f={};b.context&&(f.context=b.context),"undefined"!=typeof g&&g&&(f.grid=g.grid),b.action.call(f,c,e),b.leaveOpen?a.focus.bySelector(angular.element(a.closestElm(d,".ui-grid-menu-items")),"button[type=button]",!0):b.$emit("hide-menu")}},b.i18n=c.get()}}}};return d}])}(),function(){"use strict";var a=angular.module("ui.grid");angular.forEach([{tag:"Src",method:"attr"},{tag:"Text",method:"text"},{tag:"Href",method:"attr"},{tag:"Class",method:"addClass"},{tag:"Html",method:"html"},{tag:"Alt",method:"attr"},{tag:"Style",method:"css"},{tag:"Value",method:"attr"},{tag:"Id",method:"attr"},{tag:"Id",directiveName:"IdGrid",method:"attr",appendGridId:!0},{tag:"Title",method:"attr"},{tag:"Label",method:"attr",aria:!0},{tag:"Labelledby",method:"attr",aria:!0},{tag:"Labelledby",directiveName:"LabelledbyGrid",appendGridId:!0,method:"attr",aria:!0},{tag:"Describedby",method:"attr",aria:!0},{tag:"Describedby",directiveName:"DescribedbyGrid",appendGridId:!0,method:"attr",aria:!0}],function(b){var c="uiGridOneBind",d=(b.aria?c+"Aria":c)+(b.directiveName?b.directiveName:b.tag);a.directive(d,["gridUtil",function(a){return{restrict:"A",require:["?uiGrid","?^uiGrid"],link:function(c,e,f,g){var h=function(b){var e;if(c.grid)e=c.grid;else if(c.col&&c.col.grid)e=c.col.grid;else if(!g.some(function(a){return a&&a.grid?(e=a.grid,!0):void 0}))throw a.logError("["+d+"] A valid grid could not be found to bind id. Are you using this directive within the correct scope? Trying to generate id: [gridID]-"+b),new Error("No valid grid could be found");if(e){var f=new RegExp(e.id.toString());f.test(b)||(b=e.id.toString()+"-"+b)}return b},i=c.$watch(f[d],function(a){if(a){if(b.appendGridId){var c=null;angular.forEach(a.split(" "),function(a){c=(c?c+" ":"")+h(a)}),a=c}switch(b.method){case"attr":b.aria?e[b.method]("aria-"+b.tag.toLowerCase(),a):e[b.method](b.tag.toLowerCase(),a);break;case"addClass":if(angular.isObject(a)&&!angular.isArray(a)){var d=[],f=!1;if(angular.forEach(a,function(a,b){null!==a&&"undefined"!=typeof a&&(f=!0,a&&d.push(b))}),!f)return;a=d}if(!a)return;e.addClass(angular.isArray(a)?a.join(" "):a);break;default:e[b.method](a)}i()}},!0)}}}])})}(),function(){"use strict";var a=angular.module("ui.grid");a.directive("uiGridRenderContainer",["$timeout","$document","uiGridConstants","gridUtil","ScrollEvent",function(a,b,c,d,e){return{replace:!0,transclude:!0,templateUrl:"ui-grid/uiGridRenderContainer",require:["^uiGrid","uiGridRenderContainer"],scope:{containerId:"=",rowContainerName:"=",colContainerName:"=",bindScrollHorizontal:"=",bindScrollVertical:"=",enableVerticalScrollbar:"=",enableHorizontalScrollbar:"="},controller:"uiGridRenderContainer as RenderContainer",compile:function(){return{pre:function(a,b,c,d){var e=d[0],f=d[1],g=a.grid=e.grid;if(!a.rowContainerName)throw"No row render container name specified";if(!a.colContainerName)throw"No column render container name specified";if(!g.renderContainers[a.rowContainerName])throw"Row render container '"+a.rowContainerName+"' is not registered.";if(!g.renderContainers[a.colContainerName])throw"Column render container '"+a.colContainerName+"' is not registered.";var h=a.rowContainer=g.renderContainers[a.rowContainerName],i=a.colContainer=g.renderContainers[a.colContainerName];f.containerId=a.containerId,f.rowContainer=h,f.colContainer=i},post:function(a,b,c,f){function g(){var b="",c=l.canvasWidth,d=l.getViewportWidth(),e=k.getCanvasHeight(),f=k.getViewportHeight();l.needsHScrollbarPlaceholder()&&(f-=j.scrollbarHeight);var g,i;return g=i=l.getHeaderViewportWidth(),b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-canvas { width: "+c+"px; height: "+e+"px; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-canvas { width: "+(c+j.scrollbarWidth)+"px; }",b+=o.explicitHeaderCanvasHeight?"\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-canvas { height: "+o.explicitHeaderCanvasHeight+"px; }":"\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-canvas { height: inherit; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-viewport { width: "+d+"px; height: "+f+"px; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-viewport { width: "+g+"px; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-footer-canvas { width: "+(c+j.scrollbarWidth)+"px; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-footer-viewport { width: "+i+"px; }"}var h=f[0],i=f[1],j=h.grid,k=i.rowContainer,l=i.colContainer,m=null,n=null,o=j.renderContainers[a.containerId];b.addClass("ui-grid-render-container-"+a.containerId),d.on.mousewheel(b,function(a){var b=new e(j,k,l,e.Sources.RenderContainerMouseWheel);if(0!==a.deltaY){var c=-1*a.deltaY*a.deltaFactor;m=i.viewport[0].scrollTop,b.verticalScrollLength=k.getVerticalScrollLength();var f=(m+c)/b.verticalScrollLength;f>=1&&mf?f=0:f>1&&(f=1),b.y={percentage:f,pixels:c}}if(0!==a.deltaX){var g=a.deltaX*a.deltaFactor;n=d.normalizeScrollLeft(i.viewport,j),b.horizontalScrollLength=l.getCanvasWidth()-l.getViewportWidth();var h=(n+g)/b.horizontalScrollLength;0>h?h=0:h>1&&(h=1),b.x={percentage:h,pixels:g}}0!==a.deltaY&&(b.atTop(m)||b.atBottom(m))||0!==a.deltaX&&(b.atLeft(n)||b.atRight(n))||(a.preventDefault(),a.stopPropagation(),b.fireThrottledScrollingEvent("",b))}),b.bind("$destroy",function(){b.unbind("keydown"),["touchstart","touchmove","touchend","keydown","wheel","mousewheel","DomMouseScroll","MozMousePixelScroll"].forEach(function(a){b.unbind(a)})}),h.grid.registerStyleComputation({priority:6,func:g})}}}}}]),a.controller("uiGridRenderContainer",["$scope","gridUtil",function(a,b){}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridRow",["gridUtil",function(a){return{replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:{row:"=uiGridRow",rowRenderIndex:"="},compile:function(){return{pre:function(a,b,c,d){function e(){a.row.getRowTemplateFn.then(function(c){var d=a.$new();c(d,function(a,c){h&&(h.remove(),i.$destroy()),b.empty().append(a),h=a,i=d})})}var f=d[0],g=d[1];f.grid;a.grid=f.grid,a.colContainer=g.colContainer;var h,i;e(),a.$watch("row.getRowTemplateFn",function(a,b){a!==b&&e()})},post:function(a,b,c,d){}}}}}])}(),function(){angular.module("ui.grid").directive("uiGridStyle",["gridUtil","$interpolate",function(a,b){return{link:function(a,c,d,e){var f=b(c.text(),!0);f&&a.$watch(f,function(a){c.text(a)})}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridViewport",["gridUtil","ScrollEvent","uiGridConstants","$log",function(a,b,c,d){return{replace:!0,scope:{},controllerAs:"Viewport",templateUrl:"ui-grid/uiGridViewport",require:["^uiGrid","^uiGridRenderContainer"],link:function(c,d,e,f){function g(e){var f=d[0].scrollTop,g=a.normalizeScrollLeft(d,p),h=n.scrollVertical(f),i=o.scrollHorizontal(g),j=new b(p,n,o,b.Sources.ViewPortScroll);j.newScrollLeft=g,j.newScrollTop=f,i>-1&&(j.x={percentage:i}),h>-1&&(j.y={percentage:h}),p.scrollContainers(c.$parent.containerId,j)}function h(a){m.prevScrollArgs=a;var b=a.getNewScrollTop(n,m.viewport);d[0].scrollTop=b}function i(b){m.prevScrollArgs=b;var c=b.getNewScrollLeft(o,m.viewport);d[0].scrollLeft=a.denormalizeScrollLeft(m.viewport,c,p)}function j(b){var c=b.getNewScrollLeft(o,m.viewport);m.headerViewport&&(m.headerViewport.scrollLeft=a.denormalizeScrollLeft(m.viewport,c,p))}function k(b){var c=b.getNewScrollLeft(o,m.viewport);m.footerViewport&&(m.footerViewport.scrollLeft=a.denormalizeScrollLeft(m.viewport,c,p))}var l=f[0],m=f[1];c.containerCtrl=m;var n=m.rowContainer,o=m.colContainer,p=l.grid;c.grid=l.grid,c.rowContainer=m.rowContainer,c.colContainer=m.colContainer,m.viewport=d,d.on("scroll",g);c.$parent.bindScrollVertical&&p.addVerticalScrollSync(c.$parent.containerId,h),c.$parent.bindScrollHorizontal&&(p.addHorizontalScrollSync(c.$parent.containerId,i),p.addHorizontalScrollSync(c.$parent.containerId+"header",j),p.addHorizontalScrollSync(c.$parent.containerId+"footer",k))},controller:["$scope",function(a){this.rowStyle=function(b){var c=a.rowContainer,d=a.colContainer,e={};if(0===b&&0!==c.currentTopRow){var f=c.currentTopRow*c.grid.options.rowHeight;e["margin-top"]=f+"px"}return 0!==d.currentFirstColumn&&(d.grid.isRTL()?e["margin-right"]=d.columnOffset+"px":e["margin-left"]=d.columnOffset+"px"),e}}]}}])}(),function(){angular.module("ui.grid").directive("uiGridVisible",function(){return function(a,b,c){a.$watch(c.uiGridVisible,function(a){b[a?"removeClass":"addClass"]("ui-grid-invisible")})}})}(),function(){"use strict";function a(a,b,c,d,e,f){return{templateUrl:"ui-grid/ui-grid",scope:{uiGrid:"="},replace:!0,transclude:!0,controller:"uiGridController",compile:function(){return{post:function(a,b,g,h){function i(){b[0].offsetWidth<=0&&p>q?(setTimeout(i,o),q++):c(k)}function j(){angular.element(d).on("resize",m),b.on("$destroy",function(){angular.element(d).off("resize",m)}),a.$watch(function(){return n.hasLeftContainer()},function(a,b){a!==b&&n.refreshCanvas(!0)}),a.$watch(function(){return n.hasRightContainer()},function(a,b){a!==b&&n.refreshCanvas(!0)})}function k(){n.gridWidth=a.gridWidth=e.elementWidth(b),n.canvasWidth=h.grid.gridWidth,n.gridHeight=a.gridHeight=e.elementHeight(b),n.gridHeight<=n.options.rowHeight&&n.options.enableMinHeightCheck&&l(),n.refreshCanvas(!0)}function l(){var c=n.options.minRowsToShow*n.options.rowHeight,d=n.options.showHeader?n.options.headerRowHeight:0,g=n.calcFooterHeight(),h=0;n.options.enableHorizontalScrollbar===f.scrollbars.ALWAYS&&(h=e.getScrollbarWidth());var i=0;if(angular.forEach(n.options.columnDefs,function(a){a.hasOwnProperty("filter")?1>i&&(i=1):a.hasOwnProperty("filters")&&i(n.grid.rowHeaderColumns?n.grid.rowHeaderColumns.length:0);!g&&!c.uiGridColumns&&0===n.grid.options.columnDefs.length&&b.length>0&&n.grid.buildColumnDefsFromData(b),!g&&(n.grid.options.columnDefs.length>0||b.length>0)&&d.push(n.grid.buildColumns().then(function(){n.grid.preCompileCellTemplates()})),e.all(d).then(function(){n.grid.modifyRows(p).then(function(){n.grid.redrawInPlace(!0),a.$evalAsync(function(){n.grid.refreshCanvas(!0),n.grid.callDataChangeCallbacks(f.dataChange.ROW)})})})}}var n=this;n.grid=h.createGrid(a.uiGrid),n.grid.appScope=n.grid.appScope||a.$parent,b.addClass("grid"+n.grid.id),n.grid.rtl="rtl"===d.getStyles(b[0]).direction,a.grid=n.grid,c.uiGridColumns&&c.$observe("uiGridColumns",function(a){n.grid.options.columnDefs=a,n.grid.buildColumns().then(function(){n.grid.preCompileCellTemplates(),n.grid.refreshCanvas(!0)})});var o=[];n.grid.options.fastWatch?(n.uiGrid=a.uiGrid,angular.isString(a.uiGrid.data)?(o.push(a.$parent.$watch(a.uiGrid.data,m)),o.push(a.$parent.$watch(function(){return n.grid.appScope[a.uiGrid.data]?n.grid.appScope[a.uiGrid.data].length:void 0},m))):(o.push(a.$parent.$watch(function(){return a.uiGrid.data},m)),o.push(a.$parent.$watch(function(){return a.uiGrid.data.length},m))),o.push(a.$parent.$watch(function(){return a.uiGrid.columnDefs},l)),o.push(a.$parent.$watch(function(){return a.uiGrid.columnDefs.length},l))):(angular.isString(a.uiGrid.data)?o.push(a.$parent.$watchCollection(a.uiGrid.data,m)):o.push(a.$parent.$watchCollection(function(){return a.uiGrid.data},m)),o.push(a.$parent.$watchCollection(function(){return a.uiGrid.columnDefs},l)));var p,q=a.$watch(function(){return n.grid.styleComputations},function(){n.grid.refreshCanvas(!0)});a.$on("$destroy",function(){o.forEach(function(a){a()}),q()}),n.fireEvent=function(b,c){"undefined"!=typeof c&&void 0!==c||(c={}),"undefined"!=typeof c.grid&&void 0!==c.grid||(c.grid=n.grid),a.$broadcast(b,c)},n.innerCompile=function(b){k(b)(a)}}]),angular.module("ui.grid").directive("uiGrid",a),a.$inject=["$compile","$templateCache","$timeout","$window","gridUtil","uiGridConstants"]}(),function(){"use strict";angular.module("ui.grid").directive("uiGridPinnedContainer",["gridUtil",function(a){return{restrict:"EA",replace:!0,template:'
            ',scope:{side:"=uiGridPinnedContainer"},require:"^uiGrid",compile:function(){return{post:function(a,b,c,d){function e(){var a=this,b=0;a.visibleColumnCache.forEach(function(a){b+=a.drawnWidth});var c=a.getViewportAdjustment();return b+=c.width}function f(){if("left"===a.side||"right"===a.side){for(var b=h.renderContainers[a.side].visibleColumnCache,c=0,d=0;d0?b[0]:null},p.prototype.getColDef=function(a){var b=this.options.columnDefs.filter(function(b){return b.name===a});return b.length>0?b[0]:null},p.prototype.assignTypes=function(){var a=this;a.options.columnDefs.forEach(function(b,c){if(!b.type){var e=new g(b,c,a),f=a.rows.length>0?a.rows[0]:null;f?b.type=d.guessType(a.getCellValue(f,e)):b.type="string"}})},p.prototype.isRowHeaderColumn=function(a){return-1!==this.rowHeaderColumns.indexOf(a)},p.prototype.addRowHeaderColumn=function(a){var b=this,c=new g(a,d.nextUid(),b);c.isRowHeader=!0,b.isRTL()?(b.createRightContainer(),c.renderContainer="right"):(b.createLeftContainer(),c.renderContainer="left"),b.columnBuilders[0](a,c,b.options).then(function(){c.enableFiltering=!1,c.enableSorting=!1,c.enableHiding=!1,b.rowHeaderColumns.push(c),b.buildColumns().then(function(){b.preCompileCellTemplates(),b.queueGridRefresh()})})},p.prototype.getOnlyDataColumns=function(){var a=this,b=[];return a.columns.forEach(function(c){-1===a.rowHeaderColumns.indexOf(c)&&b.push(c)}),b},p.prototype.buildColumns=function(b){var c={orderByColumnDefs:!1};angular.extend(c,b);var e,f=this,h=[],i=f.rowHeaderColumns.length;for(e=0;ee;e++)f.columns[e+i].name!==f.options.columnDefs[e].name?j[e+i]=f.getColumn(f.options.columnDefs[e].name):j[e+i]=f.columns[e+i];f.columns.length=0,Array.prototype.splice.apply(f.columns,[0,0].concat(j))}return a.all(h).then(function(){f.rows.length>0&&f.assignTypes()})},p.prototype.preCompileCellTemplates=function(){var a=this,c=function(c){var d=c.cellTemplate.replace(e.MODEL_COL_FIELD,a.getQualifiedColField(c));d=d.replace(e.COL_FIELD,"grid.getCellValue(row, col)");var f=b(d);c.compiledElementFn=f,c.compiledElementFnDefer&&c.compiledElementFnDefer.resolve(c.compiledElementFn)};this.columns.forEach(function(a){a.cellTemplate?c(a):a.cellTemplatePromise&&a.cellTemplatePromise.then(function(){c(a)})})},p.prototype.getQualifiedColField=function(a){return"row.entity."+d.preEval(a.field)},p.prototype.createLeftContainer=function(){this.hasLeftContainer()||(this.renderContainers.left=new l("left",this,{disableColumnOffset:!0}))},p.prototype.createRightContainer=function(){this.hasRightContainer()||(this.renderContainers.right=new l("right",this,{disableColumnOffset:!0}))},p.prototype.hasLeftContainer=function(){return void 0!==this.renderContainers.left},p.prototype.hasRightContainer=function(){return void 0!==this.renderContainers.right},p.prototype.preprocessColDef=function(a){var b=this;if(!a.field&&!a.name)throw new Error("colDef.name or colDef.field property is required");if(void 0===a.name&&void 0!==a.field){for(var c=a.field,d=2;b.getColumn(c);)c=a.field+d.toString(),d++;a.name=c}},p.prototype.newInN=function(a,b,c,d){for(var e=this,f=[],g=0;g0?d[0]:null},p.prototype.modifyRows=function(b){var c=this,d=c.rows.slice(0),e=c.rowHashMap||c.createRowHashMap();c.rowHashMap=c.createRowHashMap(),c.rows.length=0,b.forEach(function(a,b){var f;f=c.options.enableRowHashing?e.get(a):c.getRow(a,d),f||(f=c.processRowBuilders(new h(a,b,c))),c.rows.push(f),c.rowHashMap.put(a,f)}),c.assignTypes();var f=a.when(c.processRowsProcessors(c.rows)).then(function(a){return c.setVisibleRows(a)}),g=a.when(c.processColumnsProcessors(c.columns)).then(function(a){return c.setVisibleColumns(a)});return a.all([f,g])},p.prototype.addRows=function(a){for(var b=this,c=b.rows.length,d=0;dd)d+=e.drawnWidth,c++;else{for(var g=0,h=f;h>=f-c;h--)g+=a.columns[h].drawnWidth;b>g&&c++}}),c},p.prototype.getBodyHeight=function(){var a=this.getViewportHeight();return a},p.prototype.getViewportHeight=function(){var a=this,b=this.gridHeight-this.headerHeight-this.footerHeight,c=a.getViewportAdjustment();return b+=c.height},p.prototype.getViewportWidth=function(){var a=this,b=this.gridWidth,c=a.getViewportAdjustment();return b+=c.width},p.prototype.getHeaderViewportWidth=function(){var a=this.getViewportWidth();return a},p.prototype.addVerticalScrollSync=function(a,b){this.verticalScrollSyncCallBackFns[a]=b},p.prototype.addHorizontalScrollSync=function(a,b){this.horizontalScrollSyncCallBackFns[a]=b},p.prototype.scrollContainers=function(a,b){if(b.y){var c=["body","left","right"];this.flagScrollingVertically(b),"body"===a?c=["left","right"]:"left"===a?c=["body","right"]:"right"===a&&(c=["body","left"]);for(var d=0;db&&(b=a.sort.priority)}),b+1},p.prototype.resetColumnSorting=function(a){var b=this;b.columns.forEach(function(b){b===a||b.suppressRemoveSort||(b.sort={})})},p.prototype.getColumnSorting=function(){var a,b=this,c=[];return a=b.columns.slice(0),a.sort(j.prioritySort).forEach(function(a){a.sort&&"undefined"!=typeof a.sort.direction&&a.sort.direction&&(a.sort.direction===e.ASC||a.sort.direction===e.DESC)&&c.push(a)}),c},p.prototype.sortColumn=function(b,c,d){var e=this,f=null;if("undefined"==typeof b||!b)throw new Error("No column parameter provided");if("boolean"==typeof c?d=c:f=c,d?b.sort.priority||(b.sort.priority=e.getNextColumnSortPriority()):(e.resetColumnSorting(b),b.sort.priority=0,b.sort.priority=e.getNextColumnSortPriority()),f)b.sort.direction=f;else{var g=b.sortDirectionCycle.indexOf(b.sort.direction?b.sort.direction:null);g=(g+1)%b.sortDirectionCycle.length,b.colDef&&b.suppressRemoveSort&&!b.sortDirectionCycle[g]&&(g=(g+1)%b.sortDirectionCycle.length),b.sortDirectionCycle[g]?b.sort.direction=b.sortDirectionCycle[g]:b.sort={}}return e.api.core.raise.sortChanged(e,e.getColumnSorting()),a.when(b)},p.prototype.renderingComplete=function(){angular.isFunction(this.options.onRegisterApi)&&this.options.onRegisterApi(this.api),this.api.core.raise.renderingComplete(this.api)},p.prototype.createRowHashMap=function(){var a=this,b=new o;return b.grid=a,b},p.prototype.refresh=function(b){var c=this,d=c.processRowsProcessors(c.rows).then(function(a){c.setVisibleRows(a)}),e=c.processColumnsProcessors(c.columns).then(function(a){c.setVisibleColumns(a)});return a.all([d,e]).then(function(){c.redrawInPlace(b),c.refreshCanvas(!0)})},p.prototype.refreshRows=function(){var a=this;return a.processRowsProcessors(a.rows).then(function(b){a.setVisibleRows(b),a.redrawInPlace(),a.refreshCanvas(!0)})},p.prototype.refreshCanvas=function(b){var c=this;b&&c.buildStyles();var e=a.defer(),f=[];for(var g in c.renderContainers)if(c.renderContainers.hasOwnProperty(g)){var h=c.renderContainers[g];if(null===h.canvasWidth||isNaN(h.canvasWidth))continue;(h.header||h.headerCanvas)&&(h.explicitHeaderHeight=h.explicitHeaderHeight||null,h.explicitHeaderCanvasHeight=h.explicitHeaderCanvasHeight||null,f.push(h))}return f.length>0?(b&&c.buildStyles(),m(function(){var a,g,h=!1,i=0,j=0,k=function(a,b){return a!==b&&(h=!0),b};for(a=0;ao?0:o,g.innerHeaderHeight=o,!g.explicitHeaderHeight&&o>i&&(i=o)}if(g.headerCanvas){var p=g.headerCanvasHeight=k(g.headerCanvasHeight,parseInt(d.outerElementHeight(g.headerCanvas),10));!g.explicitHeaderCanvasHeight&&p>j&&(j=p)}}for(a=0;a0&&"undefined"!=typeof g.headerHeight&&null!==g.headerHeight&&(g.explicitHeaderHeight||g.headerHeight0&&"undefined"!=typeof g.headerCanvasHeight&&null!==g.headerCanvasHeight&&(g.explicitHeaderCanvasHeight||g.headerCanvasHeight0},p.prototype.hasRightContainerColumns=function(){return this.hasRightContainer()&&this.renderContainers.right.renderedColumns.length>0},p.prototype.scrollToIfNecessary=function(b,c){var d=this,e=new n(d,"uiGrid.scrollToIfNecessary"),f=d.renderContainers.body.visibleRowCache,g=d.renderContainers.body.visibleColumnCache,h=d.renderContainers.body.prevScrollTop+d.headerHeight;h=0>h?0:h;var i=d.renderContainers.body.prevScrollLeft,j=d.renderContainers.body.prevScrollTop+d.gridHeight-d.renderContainers.body.headerHeight-d.footerHeight-d.scrollbarWidth,k=d.renderContainers.body.prevScrollLeft+Math.ceil(d.renderContainers.body.getViewportWidth());if(null!==b){var l=f.indexOf(b),m=d.renderContainers.body.getCanvasHeight()-d.renderContainers.body.getViewportHeight(),o=l*d.options.rowHeight+d.headerHeight;o=0>o?0:o;var p,q;h>o?(p=d.renderContainers.body.prevScrollTop-(h-o),q=p/m,e.y={percentage:q}):o>j&&(p=o-j+d.renderContainers.body.prevScrollTop,q=p/m,e.y={percentage:q})}if(null!==c){for(var r=g.indexOf(c),s=d.renderContainers.body.getCanvasWidth()-d.renderContainers.body.getViewportWidth(),t=0,u=0;r>u;u++){var v=g[u];t+=v.drawnWidth}t=0>t?0:t;var w=t+c.drawnWidth;w=0>w?0:w;var x,y;i>t?(x=d.renderContainers.body.prevScrollLeft-(i-t),y=x/s,y=y>1?1:y,e.x={percentage:y}):w>k&&(x=w-k+d.renderContainers.body.prevScrollLeft,y=x/s,y=y>1?1:y,e.x={percentage:y})}var z=a.defer();if(e.y||e.x){e.withDelay=!1,d.scrollContainers("",e);var A=d.api.core.on.scrollEnd(null,function(){z.resolve(e),A()})}else z.resolve();return z.promise},p.prototype.scrollTo=function(a,b){var c=null,d=null;return null!==a&&"undefined"!=typeof a&&(c=this.getRow(a)),null!==b&&"undefined"!=typeof b&&(d=this.getColumn(b.name?b.name:b.field)),this.scrollToIfNecessary(c,d)},p.prototype.clearAllFilters=function(a,b,c){return void 0===a&&(a=!0),void 0===b&&(b=!1),void 0===c&&(c=!1),this.columns.forEach(function(a){a.filters.forEach(function(a){a.term=void 0,b&&(a.condition=void 0),c&&(a.flags=void 0)})}),a?this.refreshRows():void 0},o.prototype={put:function(a,b){this[this.grid.options.rowIdentity(a)]=b},get:function(a){return this[this.grid.options.rowIdentity(a)]},remove:function(a){var b=this[a=this.grid.options.rowIdentity(a)];return delete this[a],b}},p}])}(),function(){angular.module("ui.grid").factory("GridApi",["$q","$rootScope","gridUtil","uiGridConstants","GridRow","uiGridGridMenuService",function(a,b,c,d,e,f){function g(a,c,d,e){return b.$on(a,function(a){var b=Array.prototype.slice.call(arguments);b.splice(0,1),c.apply(e?e:d.api,b)})}var h=function(a){this.grid=a,this.listeners=[],this.registerEvent("core","renderingComplete"),this.registerEvent("core","filterChanged"),this.registerMethod("core","setRowInvisible",e.prototype.setRowInvisible),this.registerMethod("core","clearRowInvisible",e.prototype.clearRowInvisible),this.registerMethod("core","getVisibleRows",this.grid.getVisibleRows),this.registerEvent("core","rowsVisibleChanged"),this.registerEvent("core","rowsRendered"),this.registerEvent("core","scrollBegin"),this.registerEvent("core","scrollEnd"),this.registerEvent("core","canvasHeightChanged")};return h.prototype.suppressEvents=function(a,b){var c=this,d=angular.isArray(a)?a:[a],e=c.listeners.filter(function(a){return d.some(function(b){return a.handler===b})});e.forEach(function(a){a.dereg()}),b(),e.forEach(function(a){a.dereg=g(a.eventId,a.handler,c.grid,a._this)})},h.prototype.registerEvent=function(a,d){var e=this;e[a]||(e[a]={});var f=e[a];f.on||(f.on={},f.raise={});var h=e.grid.id+a+d;f.raise[d]=function(){b.$emit.apply(b,[h].concat(Array.prototype.slice.call(arguments)))},f.on[d]=function(b,f,i){if(null!==b&&"undefined"==typeof b.$on)return void c.logError("asked to listen on "+a+".on."+d+" but scope wasn't passed in the input parameters. It is legitimate to pass null, but you've passed something else, so you probably forgot to provide scope rather than did it deliberately, not registering");var j=g(h,f,e.grid,i),k={handler:f,dereg:j,eventId:h,scope:b,_this:i};e.listeners.push(k);var l=function(){k.dereg();var a=e.listeners.indexOf(k);e.listeners.splice(a,1)};return b&&b.$on("$destroy",function(){l()}),l}},h.prototype.registerEventsFromObject=function(a){var b=this,c=[];angular.forEach(a,function(a,b){var d={name:b,events:[]};angular.forEach(a,function(a,b){d.events.push(b)}),c.push(d)}),c.forEach(function(a){a.events.forEach(function(c){b.registerEvent(a.name,c)})})},h.prototype.registerMethod=function(a,b,d,e){this[a]||(this[a]={});var f=this[a];f[b]=c.createBoundedWrapper(e||this.grid,d)},h.prototype.registerMethodsFromObject=function(a,b){var c=this,d=[];angular.forEach(a,function(a,b){var c={name:b,methods:[]};angular.forEach(a,function(a,b){c.methods.push({name:b,fn:a})}),d.push(c)}),d.forEach(function(a){a.methods.forEach(function(d){c.registerMethod(a.name,d.name,d.fn,b)})})},h}])}(),function(){angular.module("ui.grid").factory("GridColumn",["gridUtil","uiGridConstants","i18nService",function(a,b,c){function d(a,c,d){var e=this;e.grid=d,e.uid=c,e.updateColumnDef(a,!0),e.aggregationValue=void 0,e.updateAggregationValue=function(){if(!e.aggregationType)return void(e.aggregationValue=void 0);var a=0,c=e.grid.getVisibleRows(),d=function(){var a=[];return c.forEach(function(b){var c=e.grid.getCellValue(b,e),d=Number(c);isNaN(d)||a.push(d)}),a};angular.isFunction(e.aggregationType)?e.aggregationValue=e.aggregationType(c,e):e.aggregationType===b.aggregationTypes.count?e.aggregationValue=e.grid.getVisibleRowCount():e.aggregationType===b.aggregationTypes.sum?(d().forEach(function(b){a+=b}),e.aggregationValue=a):e.aggregationType===b.aggregationTypes.avg?(d().forEach(function(b){a+=b}),a/=d().length,e.aggregationValue=a):e.aggregationType===b.aggregationTypes.min?e.aggregationValue=Math.min.apply(null,d()):e.aggregationType===b.aggregationTypes.max?e.aggregationValue=Math.max.apply(null,d()):e.aggregationValue=" "},this.getAggregationValue=function(){return e.aggregationValue}}return d.prototype.hideColumn=function(){this.colDef.visible=!1},d.prototype.setPropertyOrDefault=function(a,b,c){var d=this;"undefined"!=typeof a[b]&&a[b]?d[b]=a[b]:"undefined"!=typeof d[b]?d[b]=d[b]:d[b]=c?c:{}},d.prototype.updateColumnDef=function(c,d){var e=this;if(e.colDef=c,void 0===c.name)throw new Error("colDef.name is required for column at index "+e.grid.options.columnDefs.indexOf(c));if(e.displayName=void 0===c.displayName?a.readableColumnName(c.name):c.displayName,!angular.isNumber(e.width)||!e.hasCustomWidth||c.allowCustomWidthOverride){var f=c.width,g="Cannot parse column width '"+f+"' for column named '"+c.name+"'";if(e.hasCustomWidth=!1,angular.isString(f)||angular.isNumber(f))if(angular.isString(f))if(a.endsWith(f,"%")){var h=f.replace(/%/g,""),i=parseInt(h,10);if(isNaN(i))throw new Error(g);e.width=f}else if(f.match(/^(\d+)$/))e.width=parseInt(f.match(/^(\d+)$/)[1],10);else{if(!f.match(/^\*+$/))throw new Error(g);e.width=f}else e.width=f;else e.width="*"}["minWidth","maxWidth"].forEach(function(a){var b=c[a],d="Cannot parse column "+a+" '"+b+"' for column named '"+c.name+"'";if(angular.isString(b)||angular.isNumber(b))if(angular.isString(b)){if(!b.match(/^(\d+)$/))throw new Error(d);e[a]=parseInt(b.match(/^(\d+)$/)[1],10)}else e[a]=b;else e[a]="minWidth"===a?30:9e3}),e.field=void 0===c.field?c.name:c.field,"string"!=typeof e.field&&a.logError("Field is not a string, this is likely to break the code, Field is: "+e.field),e.name=c.name,e.displayName=void 0===c.displayName?a.readableColumnName(c.name):c.displayName,e.aggregationType=angular.isDefined(c.aggregationType)?c.aggregationType:null,e.footerCellTemplate=angular.isDefined(c.footerCellTemplate)?c.footerCellTemplate:null,"undefined"==typeof c.cellTooltip||c.cellTooltip===!1?e.cellTooltip=!1:c.cellTooltip===!0?e.cellTooltip=function(a,b){return e.grid.getCellValue(a,b)}:"function"==typeof c.cellTooltip?e.cellTooltip=c.cellTooltip:e.cellTooltip=function(a,b){return b.colDef.cellTooltip},"undefined"==typeof c.headerTooltip||c.headerTooltip===!1?e.headerTooltip=!1:c.headerTooltip===!0?e.headerTooltip=function(a){return a.displayName}:"function"==typeof c.headerTooltip?e.headerTooltip=c.headerTooltip:e.headerTooltip=function(a){return a.colDef.headerTooltip},e.footerCellClass=c.footerCellClass,e.cellClass=c.cellClass,e.headerCellClass=c.headerCellClass,e.cellFilter=c.cellFilter?c.cellFilter:"",e.sortCellFiltered=!!c.sortCellFiltered,e.filterCellFiltered=!!c.filterCellFiltered,e.headerCellFilter=c.headerCellFilter?c.headerCellFilter:"",e.footerCellFilter=c.footerCellFilter?c.footerCellFilter:"",e.visible=a.isNullOrUndefined(c.visible)||c.visible,e.headerClass=c.headerClass,e.enableSorting="undefined"!=typeof c.enableSorting?c.enableSorting:!0,e.sortingAlgorithm=c.sortingAlgorithm,e.sortDirectionCycle="undefined"!=typeof c.sortDirectionCycle?c.sortDirectionCycle:[null,b.ASC,b.DESC],"undefined"==typeof e.suppressRemoveSort&&(e.suppressRemoveSort="undefined"!=typeof c.suppressRemoveSort?c.suppressRemoveSort:!1),e.enableFiltering="undefined"!=typeof c.enableFiltering?c.enableFiltering:!0,e.setPropertyOrDefault(c,"menuItems",[]),d&&e.setPropertyOrDefault(c,"sort");var j=[];c.filter?j.push(c.filter):c.filters?j=c.filters:j.push({}),d?(e.setPropertyOrDefault(c,"filter"),e.setPropertyOrDefault(c,"filters",j)):e.filters.length===j.length&&e.filters.forEach(function(a,b){"undefined"!=typeof j[b].placeholder&&(a.placeholder=j[b].placeholder),"undefined"!=typeof j[b].ariaLabel&&(a.ariaLabel=j[b].ariaLabel),"undefined"!=typeof j[b].flags&&(a.flags=j[b].flags),"undefined"!=typeof j[b].type&&(a.type=j[b].type),"undefined"!=typeof j[b].selectOptions&&(a.selectOptions=j[b].selectOptions)})},d.prototype.unsort=function(){this.sort={},this.grid.api.core.raise.sortChanged(this.grid,this.grid.getColumnSorting())},d.prototype.getColClass=function(a){var c=b.COL_CLASS_PREFIX+this.uid;return a?"."+c:c},d.prototype.isPinnedLeft=function(){return"left"===this.renderContainer},d.prototype.isPinnedRight=function(){return"right"===this.renderContainer},d.prototype.getColClassDefinition=function(){return" .grid"+this.grid.id+" "+this.getColClass(!0)+" { min-width: "+this.drawnWidth+"px; max-width: "+this.drawnWidth+"px; }"},d.prototype.getRenderContainer=function(){var a=this,b=a.renderContainer;return null!==b&&""!==b&&void 0!==b||(b="body"),a.grid.renderContainers[b]},d.prototype.showColumn=function(){this.colDef.visible=!0},d.prototype.getAggregationText=function(){var a=this;if(a.colDef.aggregationHideLabel)return"";if(a.colDef.aggregationLabel)return a.colDef.aggregationLabel;switch(a.colDef.aggregationType){case b.aggregationTypes.count:return c.getSafeText("aggregation.count");case b.aggregationTypes.sum:return c.getSafeText("aggregation.sum");case b.aggregationTypes.avg:return c.getSafeText("aggregation.avg");case b.aggregationTypes.min:return c.getSafeText("aggregation.min");case b.aggregationTypes.max:return c.getSafeText("aggregation.max");default:return""}},d.prototype.getCellTemplate=function(){var a=this;return a.cellTemplatePromise},d.prototype.getCompiledElementFn=function(){var a=this;return a.compiledElementFnDefer.promise},d}])}(),function(){angular.module("ui.grid").factory("GridOptions",["gridUtil","uiGridConstants",function(a,b){return{initialize:function(c){return c.onRegisterApi=c.onRegisterApi||angular.noop(),c.data=c.data||[],c.columnDefs=c.columnDefs||[],c.excludeProperties=c.excludeProperties||["$$hashKey"],c.enableRowHashing=c.enableRowHashing!==!1,c.rowIdentity=c.rowIdentity||function(b){return a.hashKey(b)},c.getRowIdentity=c.getRowIdentity||function(a){return a.$$hashKey},c.flatEntityAccess=c.flatEntityAccess===!0,c.showHeader="undefined"!=typeof c.showHeader?c.showHeader:!0,c.showHeader?c.headerRowHeight="undefined"!=typeof c.headerRowHeight?c.headerRowHeight:30:c.headerRowHeight=0,c.rowHeight=c.rowHeight||30,c.minRowsToShow="undefined"!=typeof c.minRowsToShow?c.minRowsToShow:10,c.showGridFooter=c.showGridFooter===!0,c.showColumnFooter=c.showColumnFooter===!0,c.columnFooterHeight="undefined"!=typeof c.columnFooterHeight?c.columnFooterHeight:30,c.gridFooterHeight="undefined"!=typeof c.gridFooterHeight?c.gridFooterHeight:30,c.columnWidth="undefined"!=typeof c.columnWidth?c.columnWidth:50,c.maxVisibleColumnCount="undefined"!=typeof c.maxVisibleColumnCount?c.maxVisibleColumnCount:200,c.virtualizationThreshold="undefined"!=typeof c.virtualizationThreshold?c.virtualizationThreshold:20,c.columnVirtualizationThreshold="undefined"!=typeof c.columnVirtualizationThreshold?c.columnVirtualizationThreshold:10,c.excessRows="undefined"!=typeof c.excessRows?c.excessRows:4,c.scrollThreshold="undefined"!=typeof c.scrollThreshold?c.scrollThreshold:4,c.excessColumns="undefined"!=typeof c.excessColumns?c.excessColumns:4,c.horizontalScrollThreshold="undefined"!=typeof c.horizontalScrollThreshold?c.horizontalScrollThreshold:2,c.aggregationCalcThrottle="undefined"!=typeof c.aggregationCalcThrottle?c.aggregationCalcThrottle:500,c.wheelScrollThrottle="undefined"!=typeof c.wheelScrollThrottle?c.wheelScrollThrottle:70,c.scrollDebounce="undefined"!=typeof c.scrollDebounce?c.scrollDebounce:300,c.enableSorting=c.enableSorting!==!1,c.enableFiltering=c.enableFiltering===!0,c.enableColumnMenus=c.enableColumnMenus!==!1,c.enableVerticalScrollbar="undefined"!=typeof c.enableVerticalScrollbar?c.enableVerticalScrollbar:b.scrollbars.ALWAYS,c.enableHorizontalScrollbar="undefined"!=typeof c.enableHorizontalScrollbar?c.enableHorizontalScrollbar:b.scrollbars.ALWAYS,c.enableMinHeightCheck=c.enableMinHeightCheck!==!1,c.minimumColumnSize="undefined"!=typeof c.minimumColumnSize?c.minimumColumnSize:10,c.rowEquality=c.rowEquality||function(a,b){return a===b},c.headerTemplate=c.headerTemplate||null,c.footerTemplate=c.footerTemplate||"ui-grid/ui-grid-footer",c.gridFooterTemplate=c.gridFooterTemplate||"ui-grid/ui-grid-grid-footer",c.rowTemplate=c.rowTemplate||"ui-grid/ui-grid-row",c.appScopeProvider=c.appScopeProvider||null, -c}}}])}(),function(){angular.module("ui.grid").factory("GridRenderContainer",["gridUtil","uiGridConstants",function(a,b){function c(a,b,c){var d=this;d.name=a,d.grid=b,d.visibleRowCache=[],d.visibleColumnCache=[],d.renderedRows=[],d.renderedColumns=[],d.prevScrollTop=0,d.prevScrolltopPercentage=0,d.prevRowScrollIndex=0,d.prevScrollLeft=0,d.prevScrollleftPercentage=0,d.prevColumnScrollIndex=0,d.columnStyles="",d.viewportAdjusters=[],d.hasHScrollbar=!1,d.hasVScrollbar=!1,d.canvasHeightShouldUpdate=!0,d.$$canvasHeight=0,c&&angular.isObject(c)&&angular.extend(d,c),b.registerStyleComputation({priority:5,func:function(){return d.updateColumnWidths(),d.columnStyles}})}return c.prototype.reset=function(){this.visibleColumnCache.length=0,this.visibleRowCache.length=0,this.renderedRows.length=0,this.renderedColumns.length=0},c.prototype.containsColumn=function(a){return-1!==this.visibleColumnCache.indexOf(a)},c.prototype.minRowsToRender=function(){for(var a=this,b=0,c=0,d=a.getViewportHeight(),e=a.visibleRowCache.length-1;d>c&&e>=0;e--)c+=a.visibleRowCache[e].height,b++;return b},c.prototype.minColumnsToRender=function(){for(var a=this,b=this.getViewportWidth(),c=0,d=0,e=0;ed)d+=f.drawnWidth?f.drawnWidth:0,c++;else{for(var g=0,h=e;h>=e-c;h--)g+=a.visibleColumnCache[h].drawnWidth?a.visibleColumnCache[h].drawnWidth:0;b>g&&c++}}return c},c.prototype.getVisibleRowCount=function(){return this.visibleRowCache.length},c.prototype.registerViewportAdjuster=function(a){this.viewportAdjusters.push(a)},c.prototype.removeViewportAdjuster=function(a){var b=this.viewportAdjusters.indexOf(a);b>-1&&this.viewportAdjusters.splice(b,1)},c.prototype.getViewportAdjustment=function(){var a=this,b={height:0,width:0};return a.viewportAdjusters.forEach(function(a){b=a.call(this,b)}),b},c.prototype.getMargin=function(a){var b=this,c=0;return b.viewportAdjusters.forEach(function(b){var d=b.call(this,{height:0,width:0});d.side&&d.side===a&&(c+=-1*d.width)}),c},c.prototype.getViewportHeight=function(){var a=this,b=a.headerHeight?a.headerHeight:a.grid.headerHeight,c=a.grid.gridHeight-b-a.grid.footerHeight,d=a.getViewportAdjustment();return c+=d.height},c.prototype.getViewportWidth=function(){var a=this,b=a.grid.gridWidth,c=a.getViewportAdjustment();return b+=c.width},c.prototype.getHeaderViewportWidth=function(){var a=this.getViewportWidth();return a},c.prototype.getCanvasHeight=function(){var a=this;if(!a.canvasHeightShouldUpdate)return a.$$canvasHeight;var b=a.$$canvasHeight;return a.$$canvasHeight=0,a.visibleRowCache.forEach(function(b){a.$$canvasHeight+=b.height}),a.canvasHeightShouldUpdate=!1,a.grid.api.core.raise.canvasHeightChanged(b,a.$$canvasHeight),a.$$canvasHeight},c.prototype.getVerticalScrollLength=function(){return this.getCanvasHeight()-this.getViewportHeight()+this.grid.scrollbarHeight},c.prototype.getCanvasWidth=function(){var a=this,b=a.canvasWidth;return b},c.prototype.setRenderedRows=function(a){this.renderedRows.length=a.length;for(var b=0;b0&&(this.grid.scrollDirection=b.scrollDirection.DOWN),0>d&&(this.grid.scrollDirection=b.scrollDirection.UP);var e=this.getVerticalScrollLength();return c=a/e,c>1&&(c=1),0>c&&(c=0),this.adjustScrollVertical(a,c),c}},c.prototype.scrollHorizontal=function(a){var c=-1;if(a!==this.prevScrollLeft){var d=a-this.prevScrollLeft;d>0&&(this.grid.scrollDirection=b.scrollDirection.RIGHT),0>d&&(this.grid.scrollDirection=b.scrollDirection.LEFT);var e=this.canvasWidth-this.getViewportWidth();return c=0!==e?a/e:0,this.adjustScrollHorizontal(a,c),c}},c.prototype.adjustScrollVertical=function(a,b,c){(this.prevScrollTop!==a||c)&&("undefined"!=typeof a&&void 0!==a&&null!==a||(a=(this.getCanvasHeight()-this.getViewportHeight())*b),this.adjustRows(a,b,!1),this.prevScrollTop=a,this.prevScrolltopPercentage=b,this.grid.queueRefresh())},c.prototype.adjustScrollHorizontal=function(a,b,c){(this.prevScrollLeft!==a||c)&&("undefined"!=typeof a&&void 0!==a&&null!==a||(a=(this.getCanvasWidth()-this.getViewportWidth())*b),this.adjustColumns(a,b),this.prevScrollLeft=a,this.prevScrollleftPercentage=b,this.grid.queueRefresh())},c.prototype.adjustRows=function(a,b,c){var d=this,e=d.minRowsToRender(),f=d.visibleRowCache,g=f.length-e;"undefined"!=typeof b&&null!==b||!a||(b=a/d.getVerticalScrollLength());var h=Math.ceil(Math.min(g,g*b));h>g&&(h=g);var i=[];if(f.length>d.grid.options.virtualizationThreshold){if("undefined"!=typeof a&&null!==a){if(!d.grid.suppressParentScrollDown&&d.prevScrollToph)return;if(!d.grid.suppressParentScrollUp&&d.prevScrollTop>a&&h>d.prevRowScrollIndex-d.grid.options.scrollThreshold&&g>h)return}var j={},k={};j=Math.max(0,h-d.grid.options.excessRows),k=Math.min(f.length,h+e+d.grid.options.excessRows),i=[j,k]}else{var l=d.visibleRowCache.length;i=[0,Math.max(l,e+d.grid.options.excessRows)]}d.updateViewableRowRange(i),d.prevRowScrollIndex=h},c.prototype.adjustColumns=function(a,b){var c=this,d=c.minColumnsToRender(),e=c.visibleColumnCache,f=e.length-d;if(("undefined"==typeof b||null===b)&&a){var g=c.getCanvasWidth()-c.getViewportWidth();b=a/g}var h=Math.ceil(Math.min(f,f*b));h>f&&(h=f);var i=[];if(e.length>c.grid.options.columnVirtualizationThreshold&&c.getCanvasWidth()>c.getViewportWidth()){var j=Math.max(0,h-c.grid.options.excessColumns),k=Math.min(e.length,h+d+c.grid.options.excessColumns);i=[j,k]}else{var l=c.visibleColumnCache.length;i=[0,Math.max(l,d+c.grid.options.excessColumns)]}c.updateViewableColumnRange(i),c.prevColumnScrollIndex=h},c.prototype.updateViewableRowRange=function(a){var b=this.visibleRowCache.slice(a[0],a[1]);this.currentTopRow=a[0],this.setRenderedRows(b)},c.prototype.updateViewableColumnRange=function(a){var b=this.visibleColumnCache.slice(a[0],a[1]);this.currentFirstColumn=a[0],this.setRenderedColumns(b)},c.prototype.headerCellWrapperStyle=function(){var a=this;if(0!==a.currentFirstColumn){var b=a.columnOffset;return a.grid.isRTL()?{"margin-right":b+"px"}:{"margin-left":b+"px"}}return null},c.prototype.updateColumnWidths=function(){var b=this,c=[],d=0,e=0,f="",g=b.grid.getViewportWidth()-b.grid.scrollbarWidth,h=[];angular.forEach(b.grid.renderContainers,function(a,b){h=h.concat(a.visibleColumnCache)}),h.forEach(function(b,f){var h=0;b.visible&&(angular.isNumber(b.width)?(h=parseInt(b.width,10),e+=h,b.drawnWidth=h):a.endsWith(b.width,"%")?(h=parseInt(parseInt(b.width.replace(/%/g,""),10)/100*g),h>b.maxWidth&&(h=b.maxWidth),h0){var j=i/d;c.forEach(function(a){var b=parseInt(a.width.length*j,10);b>a.maxWidth&&(b=a.maxWidth),b0&&(a.drawnWidth++,e++,l--,m=!0)},l=g-e,m=!0;l>0&&m;)m=!1,c.forEach(k);var n=function(a){a.drawnWidth>a.minWidth&&o>0&&(a.drawnWidth--,e--,o--,m=!0)},o=e-g;for(m=!0;o>0&&m;)m=!1,c.forEach(n);var p=0;b.visibleColumnCache.forEach(function(a){a.visible&&(p+=a.drawnWidth)}),h.forEach(function(a){f+=a.getColClassDefinition()}),b.canvasWidth=p,this.columnStyles=f},c.prototype.needsHScrollbarPlaceholder=function(){return this.grid.options.enableHorizontalScrollbar&&!this.hasHScrollbar&&!this.grid.disableScrolling},c.prototype.getViewportStyle=function(){var a=this,c={};return a.hasHScrollbar=!1,a.hasVScrollbar=!1,a.grid.disableScrolling?(c["overflow-x"]="hidden",c["overflow-y"]="hidden",c):("body"===a.name?(a.hasHScrollbar=a.grid.options.enableHorizontalScrollbar!==b.scrollbars.NEVER,a.grid.isRTL()?a.grid.hasLeftContainerColumns()||(a.hasVScrollbar=a.grid.options.enableVerticalScrollbar!==b.scrollbars.NEVER):a.grid.hasRightContainerColumns()||(a.hasVScrollbar=a.grid.options.enableVerticalScrollbar!==b.scrollbars.NEVER)):"left"===a.name?a.hasVScrollbar=a.grid.isRTL()?a.grid.options.enableVerticalScrollbar!==b.scrollbars.NEVER:!1:a.hasVScrollbar=a.grid.isRTL()?!1:a.grid.options.enableVerticalScrollbar!==b.scrollbars.NEVER,c["overflow-x"]=a.hasHScrollbar?"scroll":"hidden",c["overflow-y"]=a.hasVScrollbar?"scroll":"hidden",c)},c}])}(),function(){angular.module("ui.grid").factory("GridRow",["gridUtil",function(a){function b(b,c,d){this.grid=d,this.entity=b,this.uid=a.nextUid(),this.visible=!0,this.$$height=d.options.rowHeight}return Object.defineProperty(b.prototype,"height",{get:function(){return this.$$height},set:function(a){a!==this.$$height&&(this.grid.updateCanvasHeight(),this.$$height=a)}}),b.prototype.getQualifiedColField=function(a){return"row."+this.getEntityQualifiedColField(a)},b.prototype.getEntityQualifiedColField=function(b){return a.preEval("entity."+b.field)},b.prototype.setRowInvisible=function(a){a&&a.setThisRowInvisible&&a.setThisRowInvisible("user")},b.prototype.clearRowInvisible=function(a){a&&a.clearThisRowInvisible&&a.clearThisRowInvisible("user")},b.prototype.setThisRowInvisible=function(a,b){this.invisibleReason||(this.invisibleReason={}),this.invisibleReason[a]=!0,this.evaluateRowVisibility(b)},b.prototype.clearThisRowInvisible=function(a,b){"undefined"!=typeof this.invisibleReason&&delete this.invisibleReason[a],this.evaluateRowVisibility(b)},b.prototype.evaluateRowVisibility=function(a){var b=!0;"undefined"!=typeof this.invisibleReason&&angular.forEach(this.invisibleReason,function(a,c){a&&(b=!1)}),"undefined"!=typeof this.visible&&this.visible===b||(this.visible=b,a||(this.grid.queueGridRefresh(),this.grid.api.core.raise.rowsVisibleChanged(this)))},b}])}(),function(){"use strict";angular.module("ui.grid").factory("GridRowColumn",["$parse","$filter",function(a,b){var c=function d(a,b){if(!(this instanceof d))throw"Using GridRowColumn as a function insead of as a constructor. Must be called with `new` keyword";this.row=a,this.col=b};return c.prototype.getIntersectionValueRaw=function(){var b=a(this.row.getEntityQualifiedColField(this.col)),c=this.row;return b(c)},c.prototype.getIntersectionValueFiltered=function(){var a=this.getIntersectionValueRaw();if(this.col.cellFilter&&""!==this.col.cellFilter){var c=function(a){try{return b(a)}catch(c){return null}},d=c(this.col.cellFilter);if(d)a=d(a);else{var e,f=/([^:]*):([^:]*):?([\s\S]+)?/;null!==(e=f.exec(this.col.cellFilter))&&(a=b(e[1])(a,e[2],e[3]))}}return a},c}])}(),function(){angular.module("ui.grid").factory("ScrollEvent",["gridUtil",function(a){function b(b,c,d,e){var f=this;if(!b)throw new Error("grid argument is required");f.grid=b,f.source=e,f.withDelay=!0,f.sourceRowContainer=c,f.sourceColContainer=d,f.newScrollLeft=null,f.newScrollTop=null,f.x=null,f.y=null,f.verticalScrollLength=-9999999,f.horizontalScrollLength=-999999,f.fireThrottledScrollingEvent=a.throttle(function(a){f.grid.scrollContainers(a,f)},f.grid.options.wheelScrollThrottle,{trailing:!0})}return b.prototype.getNewScrollLeft=function(b,c){var d=this;if(!d.newScrollLeft){var e,f=b.getCanvasWidth()-b.getViewportWidth(),g=a.normalizeScrollLeft(c,d.grid);if("undefined"!=typeof d.x.percentage&&void 0!==d.x.percentage)e=d.x.percentage;else{if("undefined"==typeof d.x.pixels||void 0===d.x.pixels)throw new Error("No percentage or pixel value provided for scroll event X axis");e=d.x.percentage=(g+d.x.pixels)/f}return Math.max(0,e*f)}return d.newScrollLeft},b.prototype.getNewScrollTop=function(a,b){var c=this;if(!c.newScrollTop){var d,e=a.getVerticalScrollLength(),f=b[0].scrollTop;if("undefined"!=typeof c.y.percentage&&void 0!==c.y.percentage)d=c.y.percentage;else{if("undefined"==typeof c.y.pixels||void 0===c.y.pixels)throw new Error("No percentage or pixel value provided for scroll event Y axis");d=c.y.percentage=(f+c.y.pixels)/e}return Math.max(0,d*e)}return c.newScrollTop},b.prototype.atTop=function(a){return this.y&&(0===this.y.percentage||this.verticalScrollLength<0)&&0===a},b.prototype.atBottom=function(a){return this.y&&(1===this.y.percentage||0===this.verticalScrollLength)&&a>0},b.prototype.atLeft=function(a){return this.x&&(0===this.x.percentage||this.horizontalScrollLength<0)&&0===a},b.prototype.atRight=function(a){return this.x&&(1===this.x.percentage||0===this.horizontalScrollLength)&&a>0},b.Sources={ViewPortScroll:"ViewPortScroll",RenderContainerMouseWheel:"RenderContainerMouseWheel",RenderContainerTouchMove:"RenderContainerTouchMove",Other:99},b}])}(),function(){"use strict";angular.module("ui.grid").service("gridClassFactory",["gridUtil","$q","$compile","$templateCache","uiGridConstants","Grid","GridColumn","GridRow",function(a,b,c,d,e,f,g,h){var i={createGrid:function(d){d="undefined"!=typeof d?d:{},d.id=a.newId();var e=new f(d);if(e.options.rowTemplate){var g=b.defer();e.getRowTemplateFn=g.promise,a.getTemplate(e.options.rowTemplate).then(function(a){var b=c(a);g.resolve(b)},function(a){throw new Error("Couldn't fetch/use row template '"+e.options.rowTemplate+"'")})}return e.registerColumnBuilder(i.defaultColumnBuilder),e.registerRowBuilder(i.rowTemplateAssigner),e.registerRowsProcessor(function(a){return a.forEach(function(a){a.evaluateRowVisibility(!0)},50),a}),e.registerColumnsProcessor(function(a){return a.forEach(function(a){a.visible=!0}),a},50),e.registerColumnsProcessor(function(a){return a.forEach(function(a){a.colDef.visible===!1&&(a.visible=!1)}),a},50),e.registerRowsProcessor(e.searchRows,100),e.options.externalSort&&angular.isFunction(e.options.externalSort)?e.registerRowsProcessor(e.options.externalSort,200):e.registerRowsProcessor(e.sortByColumn,200),e},defaultColumnBuilder:function(c,d,f){var g=[],h=function(b,f,h,i,j){c[b]?d[f]=c[b]:d[f]=h,g.push(a.getTemplate(d[f]).then(function(a){angular.isFunction(a)&&(a=a());var c="cellTooltip"===j?"col.cellTooltip(row,col)":"col.headerTooltip(col)";j&&d[j]===!1?a=a.replace(e.TOOLTIP,""):j&&d[j]&&(a=a.replace(e.TOOLTIP,'title="{{'+c+' CUSTOM_FILTERS }}"')),i?d[b]=a.replace(e.CUSTOM_FILTERS,function(){return d[i]?"|"+d[i]:""}):d[b]=a},function(a){throw new Error("Couldn't fetch/use colDef."+b+" '"+c[b]+"'")}))};return h("cellTemplate","providedCellTemplate","ui-grid/uiGridCell","cellFilter","cellTooltip"),d.cellTemplatePromise=g[0],h("headerCellTemplate","providedHeaderCellTemplate","ui-grid/uiGridHeaderCell","headerCellFilter","headerTooltip"),h("footerCellTemplate","providedFooterCellTemplate","ui-grid/uiGridFooterCell","footerCellFilter"),h("filterHeaderTemplate","providedFilterHeaderTemplate","ui-grid/ui-grid-filter"),d.compiledElementFnDefer=b.defer(),b.all(g)},rowTemplateAssigner:function(d){var e=this;if(d.rowTemplate){var f=b.defer();d.getRowTemplateFn=f.promise,a.getTemplate(d.rowTemplate).then(function(a){var b=c(a);f.resolve(b)},function(a){throw new Error("Couldn't fetch/use row template '"+d.rowTemplate+"'")})}else d.rowTemplate=e.options.rowTemplate,d.getRowTemplateFn=e.getRowTemplateFn;return d.getRowTemplateFn}};return i}])}(),function(){function a(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var b=angular.module("ui.grid");b.service("rowSearcher",["gridUtil","uiGridConstants",function(b,c){var d=c.filter.CONTAINS,e={};return e.getTerm=function(a){if("undefined"==typeof a.term)return a.term;var b=a.term;return"string"==typeof b&&(b=b.trim()),b},e.stripTerm=function(b){var c=e.getTerm(b);return"string"==typeof c?a(c.replace(/(^\*|\*$)/g,"")):c},e.guessCondition=function(a){if("undefined"==typeof a.term||!a.term)return d;var b=e.getTerm(a);if(/\*/.test(b)){var c="";a.flags&&a.flags.caseSensitive||(c+="i");var f=b.replace(/(\\)?\*/g,function(a,b){return b?a:"[\\s\\S]*?"});return new RegExp("^"+f+"$",c)}return d},e.setupFilters=function(a){for(var d=[],f=a.length,g=0;f>g;g++){var h=a[g];if(h.noTerm||!b.isNullOrUndefined(h.term)){var i={},j="";h.flags&&h.flags.caseSensitive||(j+="i"),b.isNullOrUndefined(h.term)||(i.term=e.stripTerm(h)),h.condition?i.condition=h.condition:i.condition=e.guessCondition(h),i.flags=angular.extend({caseSensitive:!1,date:!1},h.flags),i.condition===c.filter.STARTS_WITH&&(i.startswithRE=new RegExp("^"+i.term,j)),i.condition===c.filter.ENDS_WITH&&(i.endswithRE=new RegExp(i.term+"$",j)),i.condition===c.filter.CONTAINS&&(i.containsRE=new RegExp(i.term,j)),i.condition===c.filter.EXACT&&(i.exactRE=new RegExp("^"+i.term+"$",j)),d.push(i)}}return d},e.runColumnFilter=function(a,b,d,e){var f,g=typeof e.condition,h=e.term;if(f=d.filterCellFiltered?a.getCellDisplayValue(b,d):a.getCellValue(b,d),e.condition instanceof RegExp)return e.condition.test(f);if("function"===g)return e.condition(h,f,b,d);if(e.startswithRE)return e.startswithRE.test(f);if(e.endswithRE)return e.endswithRE.test(f);if(e.containsRE)return e.containsRE.test(f);if(e.exactRE)return e.exactRE.test(f);if(e.condition===c.filter.NOT_EQUAL){var i=new RegExp("^"+h+"$");return!i.exec(f)}if("number"==typeof f&&"string"==typeof h){var j=parseFloat(h.replace(/\\\./,".").replace(/\\\-/,"-"));isNaN(j)||(h=j)}return e.flags.date===!0&&(f=new Date(f),h=new Date(h.replace(/\\/g,""))),e.condition===c.filter.GREATER_THAN?f>h:e.condition===c.filter.GREATER_THAN_OR_EQUAL?f>=h:e.condition===c.filter.LESS_THAN?h>f:e.condition===c.filter.LESS_THAN_OR_EQUAL?h>=f:!0},e.searchColumn=function(a,b,c,d){if(a.options.useExternalFiltering)return!0;for(var f=d.length,g=0;f>g;g++){var h=d[g],i=e.runColumnFilter(a,b,c,h);if(!i)return!1}return!0},e.search=function(a,c,d){if(c){if(!a.options.enableFiltering)return c;for(var f=[],g=d.length,h=function(a){var c=!1;return a.forEach(function(a){(!b.isNullOrUndefined(a.term)&&""!==a.term||a.noTerm)&&(c=!0)}),c},i=0;g>i;i++){var j=d[i];"undefined"!=typeof j.filters&&h(j.filters)&&f.push({col:j,filters:e.setupFilters(j.filters)})}if(f.length>0){for(var k=function(a,b,c,d){b.visible&&!e.searchColumn(a,b,c,d)&&(b.visible=!1)},l=function(a,b){for(var d=c.length,e=0;d>e;e++)k(a,c[e],b.col,b.filters)},m=f.length,n=0;m>n;n++)l(a,f[n]);a.api.core.raise.rowsVisibleChanged&&a.api.core.raise.rowsVisibleChanged()}return c}},e}])}(),function(){var a=angular.module("ui.grid");a.service("rowSorter",["$parse","uiGridConstants",function(a,b){var c="("+b.CURRENCY_SYMBOLS.map(function(a){return"\\"+a}).join("|")+")?",d=(new RegExp("^[-+]?"+c+"[\\d,.]+"+c+"%?$"),{colSortFnCache:{}});return d.guessSortFn=function(a){switch(a){case"number":return d.sortNumber;case"numberStr":return d.sortNumberStr;case"boolean":return d.sortBool;case"string":return d.sortAlpha;case"date":return d.sortDate;case"object":return d.basicSort;default:throw new Error("No sorting function found for type:"+a)}},d.handleNulls=function(a,b){if(!a&&0!==a&&a!==!1||!b&&0!==b&&b!==!1){if(!a&&0!==a&&a!==!1&&!b&&0!==b&&b!==!1)return 0;if(!a&&0!==a&&a!==!1)return 1;if(!b&&0!==b&&b!==!1)return-1}return null},d.basicSort=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a===b?0:b>a?-1:1},d.sortNumber=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a-b},d.sortNumberStr=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;var e,f,g=!1,h=!1;return e=parseFloat(a.replace(/[^0-9.-]/g,"")),isNaN(e)&&(g=!0),f=parseFloat(b.replace(/[^0-9.-]/g,"")),isNaN(f)&&(h=!0),g&&h?0:g?1:h?-1:e-f},d.sortAlpha=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;var e=a.toString().toLowerCase(),f=b.toString().toLowerCase();return e===f?0:e.localeCompare(f)},d.sortDate=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;a instanceof Date||(a=new Date(a)),b instanceof Date||(b=new Date(b));var e=a.getTime(),f=b.getTime();return e===f?0:f>e?-1:1},d.sortBool=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a&&b?0:a||b?a?1:-1:0},d.getSortFn=function(a,b,c){var e;return d.colSortFnCache[b.colDef.name]?e=d.colSortFnCache[b.colDef.name]:void 0!==b.sortingAlgorithm?(e=b.sortingAlgorithm,d.colSortFnCache[b.colDef.name]=b.sortingAlgorithm):b.sortCellFiltered&&b.cellFilter?(e=d.sortAlpha,d.colSortFnCache[b.colDef.name]=e):(e=d.guessSortFn(b.colDef.type),e?d.colSortFnCache[b.colDef.name]=e:e=d.sortAlpha),e},d.prioritySort=function(a,b){return void 0!==a.sort.priority&&void 0!==b.sort.priority?a.sort.priorityf;f+=2){var i=h[f];if("margin"===c){var j=parseFloat(e[c+i]);isNaN(j)||(g+=j)}if(d){if("content"===c){var k=parseFloat(e["padding"+i]);isNaN(k)||(g-=k)}if("margin"!==c){var l=parseFloat(e["border"+i+"Width"]);isNaN(l)||(g-=l)}}else{var m=parseFloat(e["padding"+i]);if(isNaN(m)||(g+=m),"padding"!==c){var n=parseFloat(e["border"+i+"Width"]);isNaN(n)||(g+=n)}}}return g}function c(c,d,e){var f,h=!0,i=a(c),j="border-box"===i.boxSizing;if(0>=f||null==f){if(f=i[d],(0>f||null==f)&&(f=c.style[d]),g.test(f))return f;h=j&&!0,f=parseFloat(f)||0}var k=f+b(c,d,e||(j?"border":"content"),h,i);return k}function d(b){b=angular.element(b)[0];var c=b.parentElement;return c||(c=document.getElementsByTagName("body")[0]),parseInt(a(c).fontSize)||parseInt(a(b).fontSize)||16}var e,f=angular.module("ui.grid");"function"!=typeof Function.prototype.bind&&(e=function(){var a=Array.prototype.slice;return function(b){var c=this,d=a.call(arguments,1);return d.length?function(){return arguments.length?c.apply(b,d.concat(a.call(arguments))):c.apply(b,d)}:function(){return arguments.length?c.apply(b,arguments):c.call(b)}}});var g=new RegExp("^("+/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source+")(?!px)[a-z%]+$","i"),h=/^(block|none|table(?!-c[ea]).+)/,i={position:"absolute",visibility:"hidden",display:"block"},j=["0","0","0","0"],k="uiGrid-";f.service("gridUtil",["$log","$window","$document","$http","$templateCache","$timeout","$interval","$injector","$q","$interpolate","uiGridConstants",function(f,g,l,m,n,o,p,q,r,s,t){function u(a,b){var c=angular.element(this),d=0,e=0,f=0,g=0;if(b.originalEvent&&(b=b.originalEvent),"detail"in b&&(f=-1*b.detail),"wheelDelta"in b&&(f=b.wheelDelta),"wheelDeltaY"in b&&(f=b.wheelDeltaY),"wheelDeltaX"in b&&(e=-1*b.wheelDeltaX),"axis"in b&&b.axis===b.HORIZONTAL_AXIS&&(e=-1*f,f=0),d=0===f?e:f,"deltaY"in b&&(f=-1*b.deltaY,d=f),"deltaX"in b&&(e=b.deltaX,0===f&&(d=-1*e)),0!==f||0!==e){if(1===b.deltaMode){var h=c.data("mousewheel-line-height");d*=h,f*=h,e*=h}else if(2===b.deltaMode){var i=c.data("mousewheel-page-height");d*=i,f*=i,e*=i}g=Math.max(Math.abs(f),Math.abs(e)),(!z||z>g)&&(z=g,w(b,g)&&(z/=40)),d=Math[d>=1?"floor":"ceil"](d/z),e=Math[e>=1?"floor":"ceil"](e/z),f=Math[f>=1?"floor":"ceil"](f/z),b.deltaMode=0;var j={originalEvent:b,deltaX:e,deltaY:f,deltaFactor:z,preventDefault:function(){b.preventDefault()},stopPropagation:function(){b.stopPropagation()}};y&&clearTimeout(y),y=setTimeout(v,200),a.call(c[0],j)}}function v(){z=null}function w(a,b){return"mousewheel"===a.type&&b%120===0}var x={augmentWidthOrHeight:b,getStyles:a,createBoundedWrapper:function(a,b){return function(){return b.apply(a,arguments)}},readableColumnName:function(a){return"undefined"==typeof a||void 0===a||null===a?a:("string"!=typeof a&&(a=String(a)),a.replace(/_+/g," ").replace(/^[A-Z]+$/,function(a){return angular.lowercase(angular.uppercase(a.charAt(0))+a.slice(1))}).replace(/([\w\u00C0-\u017F]+)/g,function(a){return angular.uppercase(a.charAt(0))+a.slice(1)}).replace(/(\w+?(?=[A-Z]))/g,"$1 "))},getColumnsFromData:function(a,b){var c=[];if(!a||"undefined"==typeof a[0]||void 0===a[0])return[];angular.isUndefined(b)&&(b=[]);var d=a[0];return angular.forEach(d,function(a,d){-1===b.indexOf(d)&&c.push({name:d})}),c},newId:function(){var a=(new Date).getTime();return function(){return a+=1}}(),getTemplate:function(a){if(n.get(a))return x.postProcessTemplate(n.get(a));if(a.hasOwnProperty("then"))return a.then(x.postProcessTemplate);try{if(angular.element(a).length>0)return r.when(a).then(x.postProcessTemplate)}catch(b){}return x.logDebug("fetching url",a),m({method:"GET",url:a}).then(function(b){var c=b.data.trim();return n.put(a,c),c},function(b){throw new Error("Could not get template "+a+": "+b)}).then(x.postProcessTemplate)},postProcessTemplate:function(a){var b=s.startSymbol(),c=s.endSymbol();return"{{"===b&&"}}"===c||(a=a.replace(/\{\{/g,b),a=a.replace(/\}\}/g,c)),r.when(a)},guessType:function(a){var b=typeof a;switch(b){case"number":case"boolean":case"string":return b;default:return angular.isDate(a)?"date":"object"}},elementWidth:function(a){},elementHeight:function(a){},getScrollbarWidth:function(){var a=document.createElement("div");a.style.visibility="hidden",a.style.width="100px",a.style.msOverflowStyle="scrollbar",document.body.appendChild(a);var b=a.offsetWidth;a.style.overflow="scroll";var c=document.createElement("div");c.style.width="100%",a.appendChild(c);var d=c.offsetWidth;return a.parentNode.removeChild(a),b-d},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},fakeElement:function(a,b,c,d){var e,f,g=angular.element(a).clone()[0];for(f in b)g.style[f]=b[f];return angular.element(document.body).append(g),e=c.call(g,g),angular.element(g).remove(),e},normalizeWheelEvent:function(a){var b,c,d,e=a||window.event,f=([].slice.call(arguments,1),0),g=0,h=0,i=0,j=0;return e.originalEvent&&(e=e.originalEvent),e.wheelDelta&&(f=e.wheelDelta),e.detail&&(f=-1*e.detail),h=f,void 0!==e.axis&&e.axis===e.HORIZONTAL_AXIS&&(h=0,g=-1*f),e.deltaY&&(h=-1*e.deltaY,f=h),e.deltaX&&(g=e.deltaX,f=-1*g),void 0!==e.wheelDeltaY&&(h=e.wheelDeltaY),void 0!==e.wheelDeltaX&&(g=e.wheelDeltaX),i=Math.abs(f),(!b||b>i)&&(b=i),j=Math.max(Math.abs(h),Math.abs(g)),(!c||c>j)&&(c=j),d=f>0?"floor":"ceil",f=Math[d](f/b),g=Math[d](g/c),h=Math[d](h/c),{delta:f,deltaX:g,deltaY:h}},isTouchEnabled:function(){var a;return("ontouchstart"in g||g.DocumentTouch&&l instanceof DocumentTouch)&&(a=!0),a},isNullOrUndefined:function(a){return void 0===a||null===a},endsWith:function(a,b){return a&&b&&"string"==typeof a?-1!==a.indexOf(b,a.length-b.length):!1},arrayContainsObjectWithProperty:function(a,b,c){var d=!1;return angular.forEach(a,function(a){a[b]===c&&(d=!0)}),d},numericAndNullSort:function(a,b){return null===a?1:null===b?-1:null===a&&null===b?0:a-b},disableAnimations:function(a){var b;try{b=q.get("$animate"),angular.version.major>1||1===angular.version.major&&angular.version.minor>=4?b.enabled(a,!1):b.enabled(!1,a)}catch(c){}},enableAnimations:function(a){var b;try{return b=q.get("$animate"),angular.version.major>1||1===angular.version.major&&angular.version.minor>=4?b.enabled(a,!0):b.enabled(!0,a),b}catch(c){}},nextUid:function(){for(var a,b=j.length;b;){if(b--,a=j[b].charCodeAt(0),57===a)return j[b]="A",k+j.join("");if(90!==a)return j[b]=String.fromCharCode(a+1),k+j.join("");j[b]="0"}return j.unshift("0"),k+j.join("")},hashKey:function(a){var b,c=typeof a;return"object"===c&&null!==a?"function"==typeof(b=a.$$hashKey)?b=a.$$hashKey():"undefined"!=typeof a.$$hashKey&&a.$$hashKey?b=a.$$hashKey:void 0===b&&(b=a.$$hashKey=x.nextUid()):b=a,c+":"+b},resetUids:function(){j=["0","0","0"]},logError:function(a){t.LOG_ERROR_MESSAGES&&f.error(a)},logWarn:function(a){t.LOG_WARN_MESSAGES&&f.warn(a)},logDebug:function(){t.LOG_DEBUG_MESSAGES&&f.debug.apply(f,arguments)}};x.focus={queue:[],byId:function(a,b){this._purgeQueue();var c=o(function(){var c=(b&&b.id?b.id+"-":"")+a,d=g.document.getElementById(c);d?d.focus():x.logWarn("[focus.byId] Element id "+c+" was not found.")});return this.queue.push(c),c},byElement:function(a){if(!angular.isElement(a))return x.logWarn("Trying to focus on an element that isn't an element."),r.reject("not-element");a=angular.element(a),this._purgeQueue();var b=o(function(){a&&a[0].focus()});return this.queue.push(b),b},bySelector:function(a,b,c){var d=this;if(!angular.isElement(a))throw new Error("The parent element is not an element.");a=angular.element(a);var e=function(){var c=a[0].querySelector(b);return d.byElement(c)};if(this._purgeQueue(),c){var f=o(e);return this.queue.push(o(e)),f}return e()},_purgeQueue:function(){this.queue.forEach(function(a){o.cancel(a)}),this.queue=[]}},["width","height"].forEach(function(b){var d=angular.uppercase(b.charAt(0))+b.substr(1);x["element"+d]=function(d,e){var f=d;if(f&&"undefined"!=typeof f.length&&f.length&&(f=d[0]),f){var g=a(f);return 0===f.offsetWidth&&h.test(g.display)?x.swap(f,i,function(){return c(f,b,e)}):c(f,b,e)}return null},x["outerElement"+d]=function(a,b){return a?x["element"+d].call(this,a,b?"margin":"border"):null}}),x.closestElm=function(a,b){"undefined"!=typeof a.length&&a.length&&(a=a[0]);var c;["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].some(function(a){return"function"==typeof document.body[a]?(c=a,!0):!1});for(var d;null!==a;){if(d=a.parentElement,null!==d&&d[c](b))return d;a=d}return null},x.type=function(a){var b=Function.prototype.toString.call(a.constructor);return b.match(/function (.*?)\(/)[1]},x.getBorderSize=function(b,c){"undefined"!=typeof b.length&&b.length&&(b=b[0]);var d=a(b);c=c?"border"+c.charAt(0).toUpperCase()+c.slice(1):"border",c+="Width";var e=parseInt(d[c],10);return isNaN(e)?0:e},x.detectBrowser=function(){var a=g.navigator.userAgent,b={chrome:/chrome/i,safari:/safari/i,firefox:/firefox/i,ie:/internet explorer|trident\//i};for(var c in b)if(b[c].test(a))return c;return"unknown"},x.rtlScrollType=function B(){if(B.type)return B.type;var a=angular.element('
            A
            ')[0],b="reverse";return document.body.appendChild(a),a.scrollLeft>0?b="default":(a.scrollLeft=1,0===a.scrollLeft&&(b="negative")),angular.element(a).remove(),B.type=b,b},x.normalizeScrollLeft=function(a,b){"undefined"!=typeof a.length&&a.length&&(a=a[0]);var c=a.scrollLeft;if(b.isRTL())switch(x.rtlScrollType()){case"default":return a.scrollWidth-c-a.clientWidth;case"negative":return Math.abs(c);case"reverse":return c}return c},x.denormalizeScrollLeft=function(a,b,c){if("undefined"!=typeof a.length&&a.length&&(a=a[0]),c.isRTL())switch(x.rtlScrollType()){case"default":var d=a.scrollWidth-a.clientWidth;return d-b;case"negative":return-1*b;case"reverse":return b}return b},x.preEval=function(a){var b=t.BRACKET_REGEXP.exec(a);if(b)return(b[1]?x.preEval(b[1]):b[1])+b[2]+(b[3]?x.preEval(b[3]):b[3]);a=a.replace(t.APOS_REGEXP,"\\'");var c=a.split(t.DOT_REGEXP),d=[c.shift()];return angular.forEach(c,function(a){d.push(a.replace(t.FUNC_REGEXP,"']$1"))}),d.join("['")},x.debounce=function(a,b,c){function d(){g=this,f=arguments;var d=function(){e=null,c||(h=a.apply(g,f))},i=c&&!e;return e&&o.cancel(e),e=o(d,b),i&&(h=a.apply(g,f)),h}var e,f,g,h;return d.cancel=function(){o.cancel(e), -e=null},d},x.throttle=function(a,b,c){function d(b){g=+new Date,a.apply(e,f),p(function(){h=null},0,1)}c=c||{};var e,f,g=0,h=null;return function(){if(e=this,f=arguments,null===h){var a=+new Date-g;a>b?d():c.trailing&&(h=p(d,b-a,1))}}},x.on={},x.off={},x._events={},x.addOff=function(a){x.off[a]=function(b,c){var d=x._events[a].indexOf(c);d>0&&x._events[a].removeAt(d)}};var y,z,A="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];return x.on.mousewheel=function(a,b){if(a&&b){var c=angular.element(a);c.data("mousewheel-line-height",d(c)),c.data("mousewheel-page-height",x.elementHeight(c)),c.data("mousewheel-callbacks")||c.data("mousewheel-callbacks",{});var f=c.data("mousewheel-callbacks");f[b]=(Function.prototype.bind||e).call(u,c[0],b);for(var g=A.length;g;)c.on(A[--g],f[b])}},x.off.mousewheel=function(a,b){var c=angular.element(a),d=c.data("mousewheel-callbacks"),e=d[b];if(e)for(var f=A.length;f;)c.off(A[--f],e);delete d[b],0===Object.keys(d).length&&(c.removeData("mousewheel-line-height"),c.removeData("mousewheel-page-height"),c.removeData("mousewheel-callbacks"))},x}]),f.filter("px",function(){return function(a){return a.match(/^[\d\.]+$/)?a+"px":a}})}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){var b={aggregate:{label:"položky"},groupPanel:{description:"Přesuňte záhlaví zde pro vytvoření skupiny dle sloupce."},search:{placeholder:"Hledat...",showingItems:"Zobrazuji položky:",selectedItems:"Vybrané položky:",totalItems:"Celkem položek:",size:"Velikost strany:",first:"První strana",next:"Další strana",previous:"Předchozí strana",last:"Poslední strana"},menu:{text:"Vyberte sloupec:"},sort:{ascending:"Seřadit od A-Z",descending:"Seřadit od Z-A",remove:"Odebrat seřazení"},column:{hide:"Schovat sloupec"},aggregation:{count:"celkem řádků: ",sum:"celkem: ",avg:"avg: ",min:"min.: ",max:"max.: "},pinning:{pinLeft:"Zamknout vlevo",pinRight:"Zamknout vpravo",unpin:"Odemknout"},gridMenu:{columns:"Sloupce:",importerTitle:"Importovat soubor",exporterAllAsCsv:"Exportovat všechna data do csv",exporterVisibleAsCsv:"Exportovat viditelná data do csv",exporterSelectedAsCsv:"Exportovat vybraná data do csv",exporterAllAsPdf:"Exportovat všechna data do pdf",exporterVisibleAsPdf:"Exportovat viditelná data do pdf",exporterSelectedAsPdf:"Exportovat vybraná data do pdf",clearAllFilters:"Odstranit všechny filtry"},importer:{noHeaders:"Názvy sloupců se nepodařilo získat, obsahuje soubor záhlaví?",noObjects:"Data se nepodařilo zpracovat, obsahuje soubor řádky mimo záhlaví?",invalidCsv:"Soubor nelze zpracovat, jedná se o CSV?",invalidJson:"Soubor nelze zpracovat, je to JSON?",jsonNotArray:"Soubor musí obsahovat json. Ukončuji.."},pagination:{sizes:"položek na stránku",totalItems:"položek"},grouping:{group:"Seskupit",ungroup:"Odebrat seskupení",aggregate_count:"Agregace: Count",aggregate_sum:"Agregace: Sum",aggregate_max:"Agregace: Max",aggregate_min:"Agregace: Min",aggregate_avg:"Agregace: Avg",aggregate_remove:"Agregace: Odebrat"}};return a.add("cs",b),a.add("cz",b),a.add("cs-cz",b),a.add("cs-CZ",b),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("da",{aggregate:{label:"artikler"},groupPanel:{description:"Grupér rækker udfra en kolonne ved at trække dens overskift hertil."},search:{placeholder:"Søg...",showingItems:"Viste rækker:",selectedItems:"Valgte rækker:",totalItems:"Rækker totalt:",size:"Side størrelse:",first:"Første side",next:"Næste side",previous:"Forrige side",last:"Sidste side"},menu:{text:"Vælg kolonner:"},sort:{ascending:"Sorter stigende",descending:"Sorter faldende",none:"Sorter ingen",remove:"Fjern sortering"},column:{hide:"Skjul kolonne"},aggregation:{count:"antal rækker: ",sum:"sum: ",avg:"gns: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("de",{headerCell:{aria:{defaultFilterLabel:"Filter für Spalte",removeFilter:"Filter löschen",columnMenuButtonLabel:"Spaltenmenü"},priority:"Priorität:",filterLabel:"Filter für Spalte: "},aggregate:{label:"Eintrag"},groupPanel:{description:"Ziehen Sie eine Spaltenüberschrift hierhin, um nach dieser Spalte zu gruppieren."},search:{placeholder:"Suche...",showingItems:"Zeige Einträge:",selectedItems:"Ausgewählte Einträge:",totalItems:"Einträge gesamt:",size:"Einträge pro Seite:",first:"Erste Seite",next:"Nächste Seite",previous:"Vorherige Seite",last:"Letzte Seite"},menu:{text:"Spalten auswählen:"},sort:{ascending:"aufsteigend sortieren",descending:"absteigend sortieren",none:"keine Sortierung",remove:"Sortierung zurücksetzen"},column:{hide:"Spalte ausblenden"},aggregation:{count:"Zeilen insgesamt: ",sum:"gesamt: ",avg:"Durchschnitt: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Links anheften",pinRight:"Rechts anheften",unpin:"Lösen"},columnMenu:{close:"Schließen"},gridMenu:{aria:{buttonLabel:"Tabellenmenü"},columns:"Spalten:",importerTitle:"Datei importieren",exporterAllAsCsv:"Alle Daten als CSV exportieren",exporterVisibleAsCsv:"sichtbare Daten als CSV exportieren",exporterSelectedAsCsv:"markierte Daten als CSV exportieren",exporterAllAsPdf:"Alle Daten als PDF exportieren",exporterVisibleAsPdf:"sichtbare Daten als PDF exportieren",exporterSelectedAsPdf:"markierte Daten als CSV exportieren",clearAllFilters:"Alle Filter zurücksetzen"},importer:{noHeaders:"Es konnten keine Spaltennamen ermittelt werden. Sind in der Datei Spaltendefinitionen enthalten?",noObjects:"Es konnten keine Zeileninformationen gelesen werden, Sind in der Datei außer den Spaltendefinitionen auch Daten enthalten?",invalidCsv:"Die Datei konnte nicht eingelesen werden, ist es eine gültige CSV-Datei?",invalidJson:"Die Datei konnte nicht eingelesen werden. Enthält sie gültiges JSON?",jsonNotArray:"Die importierte JSON-Datei muß ein Array enthalten. Breche Import ab."},pagination:{aria:{pageToFirst:"Zum Anfang",pageBack:"Seite zurück",pageSelected:"Ausgwählte Seite",pageForward:"Seite vor",pageToLast:"Zum Ende"},sizes:"Einträge pro Seite",totalItems:"Einträge",through:"bis",of:"von"},grouping:{group:"Gruppieren",ungroup:"Gruppierung aufheben",aggregate_count:"Agg: Anzahl",aggregate_sum:"Agg: Summe",aggregate_max:"Agg: Maximum",aggregate_min:"Agg: Minimum",aggregate_avg:"Agg: Mittelwert",aggregate_remove:"Aggregation entfernen"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("en",{headerCell:{aria:{defaultFilterLabel:"Filter for column",removeFilter:"Remove Filter",columnMenuButtonLabel:"Column Menu"},priority:"Priority:",filterLabel:"Filter for column: "},aggregate:{label:"items"},groupPanel:{description:"Drag a column header here and drop it to group by that column."},search:{placeholder:"Search...",showingItems:"Showing Items:",selectedItems:"Selected Items:",totalItems:"Total Items:",size:"Page Size:",first:"First Page",next:"Next Page",previous:"Previous Page",last:"Last Page"},menu:{text:"Choose Columns:"},sort:{ascending:"Sort Ascending",descending:"Sort Descending",none:"Sort None",remove:"Remove Sort"},column:{hide:"Hide Column"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Pin Left",pinRight:"Pin Right",unpin:"Unpin"},columnMenu:{close:"Close"},gridMenu:{aria:{buttonLabel:"Grid Menu"},columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."},pagination:{aria:{pageToFirst:"Page to first",pageBack:"Page back",pageSelected:"Selected page",pageForward:"Page forward",pageToLast:"Page to last"},sizes:"items per page",totalItems:"items",through:"through",of:"of"},grouping:{group:"Group",ungroup:"Ungroup",aggregate_count:"Agg: Count",aggregate_sum:"Agg: Sum",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Avg",aggregate_remove:"Agg: Remove"},validate:{error:"Error:",minLength:"Value should be at least THRESHOLD characters long.",maxLength:"Value should be at most THRESHOLD characters long.",required:"A value is needed."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("es",{aggregate:{label:"Artículos"},groupPanel:{description:"Arrastre un encabezado de columna aquí y suéltelo para agrupar por esa columna."},search:{placeholder:"Buscar...",showingItems:"Artículos Mostrados:",selectedItems:"Artículos Seleccionados:",totalItems:"Artículos Totales:",size:"Tamaño de Página:",first:"Primera Página",next:"Página Siguiente",previous:"Página Anterior",last:"Última Página"},menu:{text:"Elegir columnas:"},sort:{ascending:"Orden Ascendente",descending:"Orden Descendente",remove:"Sin Ordenar"},column:{hide:"Ocultar la columna"},aggregation:{count:"filas totales: ",sum:"total: ",avg:"media: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fijar a la Izquierda",pinRight:"Fijar a la Derecha",unpin:"Quitar Fijación"},gridMenu:{columns:"Columnas:",importerTitle:"Importar archivo",exporterAllAsCsv:"Exportar todo como csv",exporterVisibleAsCsv:"Exportar vista como csv",exporterSelectedAsCsv:"Exportar selección como csv",exporterAllAsPdf:"Exportar todo como pdf",exporterVisibleAsPdf:"Exportar vista como pdf",exporterSelectedAsPdf:"Exportar selección como pdf",clearAllFilters:"Limpiar todos los filtros"},importer:{noHeaders:"No fue posible derivar los nombres de las columnas, ¿tiene encabezados el archivo?",noObjects:"No fue posible obtener registros, ¿contiene datos el archivo, aparte de los encabezados?",invalidCsv:"No fue posible procesar el archivo, ¿es un CSV válido?",invalidJson:"No fue posible procesar el archivo, ¿es un Json válido?",jsonNotArray:"El archivo json importado debe contener un array, abortando."},pagination:{sizes:"registros por página",totalItems:"registros",of:"de"},grouping:{group:"Agrupar",ungroup:"Desagrupar",aggregate_count:"Agr: Cont",aggregate_sum:"Agr: Sum",aggregate_max:"Agr: Máx",aggregate_min:"Agr: Min",aggregate_avg:"Agr: Prom",aggregate_remove:"Agr: Quitar"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fa",{aggregate:{label:"قلم"},groupPanel:{description:"عنوان یک ستون را بگیر و به گروهی از آن ستون رها کن."},search:{placeholder:"جستجو...",showingItems:"نمایش اقلام:",selectedItems:"قلم‌های انتخاب شده:",totalItems:"مجموع اقلام:",size:"اندازه‌ی صفحه:",first:"اولین صفحه",next:"صفحه‌ی‌بعدی",previous:"صفحه‌ی‌ قبلی",last:"آخرین صفحه"},menu:{text:"ستون‌های انتخابی:"},sort:{ascending:"ترتیب صعودی",descending:"ترتیب نزولی",remove:"حذف مرتب کردن"},column:{hide:"پنهان‌کردن ستون"},aggregation:{count:"تعداد: ",sum:"مجموع: ",avg:"میانگین: ",min:"کمترین: ",max:"بیشترین: "},pinning:{pinLeft:"پین کردن سمت چپ",pinRight:"پین کردن سمت راست",unpin:"حذف پین"},gridMenu:{columns:"ستون‌ها:",importerTitle:"وارد کردن فایل",exporterAllAsCsv:"خروجی تمام داده‌ها در فایل csv",exporterVisibleAsCsv:"خروجی داده‌های قابل مشاهده در فایل csv",exporterSelectedAsCsv:"خروجی داده‌های انتخاب‌شده در فایل csv",exporterAllAsPdf:"خروجی تمام داده‌ها در فایل pdf",exporterVisibleAsPdf:"خروجی داده‌های قابل مشاهده در فایل pdf",exporterSelectedAsPdf:"خروجی داده‌های انتخاب‌شده در فایل pdf",clearAllFilters:"پاک کردن تمام فیلتر"},importer:{noHeaders:"نام ستون قابل استخراج نیست. آیا فایل عنوان دارد؟",noObjects:"اشیا قابل استخراج نیستند. آیا به جز عنوان‌ها در فایل داده وجود دارد؟",invalidCsv:"فایل قابل پردازش نیست. آیا فرمت csv معتبر است؟",invalidJson:"فایل قابل پردازش نیست. آیا فرمت json معتبر است؟",jsonNotArray:"فایل json وارد شده باید حاوی آرایه باشد. عملیات ساقط شد."},pagination:{sizes:"اقلام در هر صفحه",totalItems:"اقلام",of:"از"},grouping:{group:"گروه‌بندی",ungroup:"حذف گروه‌بندی",aggregate_count:"Agg: تعداد",aggregate_sum:"Agg: جمع",aggregate_max:"Agg: بیشینه",aggregate_min:"Agg: کمینه",aggregate_avg:"Agg: میانگین",aggregate_remove:"Agg: حذف"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fi",{aggregate:{label:"rivit"},groupPanel:{description:"Raahaa ja pudota otsikko tähän ryhmittääksesi sarakkeen mukaan."},search:{placeholder:"Hae...",showingItems:"Näytetään rivejä:",selectedItems:"Valitut rivit:",totalItems:"Rivejä yht.:",size:"Näytä:",first:"Ensimmäinen sivu",next:"Seuraava sivu",previous:"Edellinen sivu",last:"Viimeinen sivu"},menu:{text:"Valitse sarakkeet:"},sort:{ascending:"Järjestä nouseva",descending:"Järjestä laskeva",remove:"Poista järjestys"},column:{hide:"Piilota sarake"},aggregation:{count:"Rivejä yht.: ",sum:"Summa: ",avg:"K.a.: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Lukitse vasemmalle",pinRight:"Lukitse oikealle",unpin:"Poista lukitus"},gridMenu:{columns:"Sarakkeet:",importerTitle:"Tuo tiedosto",exporterAllAsCsv:"Vie tiedot csv-muodossa",exporterVisibleAsCsv:"Vie näkyvä tieto csv-muodossa",exporterSelectedAsCsv:"Vie valittu tieto csv-muodossa",exporterAllAsPdf:"Vie tiedot pdf-muodossa",exporterVisibleAsPdf:"Vie näkyvä tieto pdf-muodossa",exporterSelectedAsPdf:"Vie valittu tieto pdf-muodossa",clearAllFilters:"Puhdista kaikki suodattimet"},importer:{noHeaders:"Sarakkeen nimiä ei voitu päätellä, onko tiedostossa otsikkoriviä?",noObjects:"Tietoja ei voitu lukea, onko tiedostossa muuta kuin otsikkot?",invalidCsv:"Tiedostoa ei voitu käsitellä, oliko se CSV-muodossa?",invalidJson:"Tiedostoa ei voitu käsitellä, oliko se JSON-muodossa?",jsonNotArray:"Tiedosto ei sisältänyt taulukkoa, lopetetaan."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fr",{aggregate:{label:"éléments"},groupPanel:{description:"Faites glisser une en-tête de colonne ici pour créer un groupe de colonnes."},search:{placeholder:"Recherche...",showingItems:"Affichage des éléments :",selectedItems:"Éléments sélectionnés :",totalItems:"Nombre total d'éléments:",size:"Taille de page:",first:"Première page",next:"Page Suivante",previous:"Page précédente",last:"Dernière page"},menu:{text:"Choisir des colonnes :"},sort:{ascending:"Trier par ordre croissant",descending:"Trier par ordre décroissant",remove:"Enlever le tri"},column:{hide:"Cacher la colonne"},aggregation:{count:"lignes totales: ",sum:"total: ",avg:"moy: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Épingler à gauche",pinRight:"Épingler à droite",unpin:"Détacher"},gridMenu:{columns:"Colonnes:",importerTitle:"Importer un fichier",exporterAllAsCsv:"Exporter toutes les données en CSV",exporterVisibleAsCsv:"Exporter les données visibles en CSV",exporterSelectedAsCsv:"Exporter les données sélectionnées en CSV",exporterAllAsPdf:"Exporter toutes les données en PDF",exporterVisibleAsPdf:"Exporter les données visibles en PDF",exporterSelectedAsPdf:"Exporter les données sélectionnées en PDF",clearAllFilters:"Nettoyez tous les filtres"},importer:{noHeaders:"Impossible de déterminer le nom des colonnes, le fichier possède-t-il une en-tête ?",noObjects:"Aucun objet trouvé, le fichier possède-t-il des données autres que l'en-tête ?",invalidCsv:"Le fichier n'a pas pu être traité, le CSV est-il valide ?",invalidJson:"Le fichier n'a pas pu être traité, le JSON est-il valide ?",jsonNotArray:"Le fichier JSON importé doit contenir un tableau, abandon."},pagination:{sizes:"éléments par page",totalItems:"éléments",of:"sur"},grouping:{group:"Grouper",ungroup:"Dégrouper",aggregate_count:"Agg: Compte",aggregate_sum:"Agg: Somme",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Moy",aggregate_remove:"Agg: Retirer"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("he",{aggregate:{label:"items"},groupPanel:{description:"גרור עמודה לכאן ושחרר בכדי לקבץ עמודה זו."},search:{placeholder:"חפש...",showingItems:"מציג:",selectedItems:'סה"כ נבחרו:',totalItems:'סה"כ רשומות:',size:"תוצאות בדף:",first:"דף ראשון",next:"דף הבא",previous:"דף קודם",last:"דף אחרון"},menu:{text:"בחר עמודות:"},sort:{ascending:"סדר עולה",descending:"סדר יורד",remove:"בטל"},column:{hide:"טור הסתר"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clean all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("hy",{aggregate:{label:"տվյալներ"},groupPanel:{description:"Ըստ սյան խմբավորելու համար քաշեք և գցեք վերնագիրն այստեղ։"},search:{placeholder:"Փնտրում...",showingItems:"Ցուցադրված տվյալներ՝",selectedItems:"Ընտրված:",totalItems:"Ընդամենը՝",size:"Տողերի քանակը էջում՝",first:"Առաջին էջ",next:"Հաջորդ էջ",previous:"Նախորդ էջ",last:"Վերջին էջ"},menu:{text:"Ընտրել սյուները:"},sort:{ascending:"Աճման կարգով",descending:"Նվազման կարգով",remove:"Հանել "},column:{hide:"Թաքցնել սյունը"},aggregation:{count:"ընդամենը տող՝ ",sum:"ընդամենը՝ ",avg:"միջին՝ ",min:"մին՝ ",max:"մաքս՝ "},pinning:{pinLeft:"Կպցնել ձախ կողմում",pinRight:"Կպցնել աջ կողմում",unpin:"Արձակել"},gridMenu:{columns:"Սյուներ:",importerTitle:"Ներմուծել ֆայլ",exporterAllAsCsv:"Արտահանել ամբողջը CSV",exporterVisibleAsCsv:"Արտահանել երևացող տվյալները CSV",exporterSelectedAsCsv:"Արտահանել ընտրված տվյալները CSV",exporterAllAsPdf:"Արտահանել PDF",exporterVisibleAsPdf:"Արտահանել երևացող տվյալները PDF",exporterSelectedAsPdf:"Արտահանել ընտրված տվյալները PDF",clearAllFilters:"Մաքրել բոլոր ֆիլտրերը"},importer:{noHeaders:"Հնարավոր չեղավ որոշել սյան վերնագրերը։ Արդյո՞ք ֆայլը ունի վերնագրեր։",noObjects:"Հնարավոր չեղավ կարդալ տվյալները։ Արդյո՞ք ֆայլում կան տվյալներ։",invalidCsv:"Հնարավոր չեղավ մշակել ֆայլը։ Արդյո՞ք այն վավեր CSV է։",invalidJson:"Հնարավոր չեղավ մշակել ֆայլը։ Արդյո՞ք այն վավեր Json է։",jsonNotArray:"Ներմուծված json ֆայլը պետք է պարունակի զանգված, կասեցվում է։"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("it",{aggregate:{label:"elementi"},groupPanel:{description:"Trascina un'intestazione all'interno del gruppo della colonna."},search:{placeholder:"Ricerca...",showingItems:"Mostra:",selectedItems:"Selezionati:",totalItems:"Totali:",size:"Tot Pagine:",first:"Prima",next:"Prossima",previous:"Precedente",last:"Ultima"},menu:{text:"Scegli le colonne:"},sort:{ascending:"Asc.",descending:"Desc.",remove:"Annulla ordinamento"},column:{hide:"Nascondi"},aggregation:{count:"righe totali: ",sum:"tot: ",avg:"media: ",min:"minimo: ",max:"massimo: "},pinning:{pinLeft:"Blocca a sx",pinRight:"Blocca a dx",unpin:"Blocca in alto"},gridMenu:{columns:"Colonne:",importerTitle:"Importa",exporterAllAsCsv:"Esporta tutti i dati in CSV",exporterVisibleAsCsv:"Esporta i dati visibili in CSV",exporterSelectedAsCsv:"Esporta i dati selezionati in CSV",exporterAllAsPdf:"Esporta tutti i dati in PDF",exporterVisibleAsPdf:"Esporta i dati visibili in PDF",exporterSelectedAsPdf:"Esporta i dati selezionati in PDF",clearAllFilters:"Pulire tutti i filtri"},importer:{noHeaders:"Impossibile reperire i nomi delle colonne, sicuro che siano indicati all'interno del file?",noObjects:"Impossibile reperire gli oggetti, sicuro che siano indicati all'interno del file?",invalidCsv:"Impossibile elaborare il file, sicuro che sia un CSV?",invalidJson:"Impossibile elaborare il file, sicuro che sia un JSON valido?",jsonNotArray:"Errore! Il file JSON da importare deve contenere un array."},grouping:{group:"Raggruppa",ungroup:"Separa",aggregate_count:"Agg: N. Elem.",aggregate_sum:"Agg: Somma",aggregate_max:"Agg: Massimo",aggregate_min:"Agg: Minimo",aggregate_avg:"Agg: Media",aggregate_remove:"Agg: Rimuovi"},validate:{error:"Errore:",minLength:"Lunghezza minima pari a THRESHOLD caratteri.",maxLength:"Lunghezza massima pari a THRESHOLD caratteri.",required:"Necessario inserire un valore."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ja",{aggregate:{label:"項目"},groupPanel:{description:"ここに列ヘッダをドラッグアンドドロップして、その列でグループ化します。"},search:{placeholder:"検索...",showingItems:"表示中の項目:",selectedItems:"選択した項目:",totalItems:"項目の総数:",size:"ページサイズ:",first:"最初のページ",next:"次のページ",previous:"前のページ",last:"前のページ"},menu:{text:"列の選択:"},sort:{ascending:"昇順に並べ替え",descending:"降順に並べ替え",remove:"並べ替えの解除"},column:{hide:"列の非表示"},aggregation:{count:"合計行数: ",sum:"合計: ",avg:"平均: ",min:"最小: ",max:"最大: "},pinning:{pinLeft:"左に固定",pinRight:"右に固定",unpin:"固定解除"},gridMenu:{columns:"列:",importerTitle:"ファイルのインポート",exporterAllAsCsv:"すべてのデータをCSV形式でエクスポート",exporterVisibleAsCsv:"表示中のデータをCSV形式でエクスポート",exporterSelectedAsCsv:"選択したデータをCSV形式でエクスポート",exporterAllAsPdf:"すべてのデータをPDF形式でエクスポート",exporterVisibleAsPdf:"表示中のデータをPDF形式でエクスポート",exporterSelectedAsPdf:"選択したデータをPDF形式でエクスポート",clearAllFilters:"すべてのフィルタを清掃してください"},importer:{noHeaders:"列名を取得できません。ファイルにヘッダが含まれていることを確認してください。",noObjects:"オブジェクトを取得できません。ファイルにヘッダ以外のデータが含まれていることを確認してください。",invalidCsv:"ファイルを処理できません。ファイルが有効なCSV形式であることを確認してください。",invalidJson:"ファイルを処理できません。ファイルが有効なJSON形式であることを確認してください。",jsonNotArray:"インポートしたJSONファイルには配列が含まれている必要があります。処理を中止します。"},pagination:{sizes:"項目/ページ",totalItems:"項目"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ko",{aggregate:{label:"아이템"},groupPanel:{description:"컬럼으로 그룹핑하기 위해서는 컬럼 헤더를 끌어 떨어뜨려 주세요."},search:{placeholder:"검색...",showingItems:"항목 보여주기:",selectedItems:"선택 항목:",totalItems:"전체 항목:",size:"페이지 크기:",first:"첫번째 페이지",next:"다음 페이지",previous:"이전 페이지",last:"마지막 페이지"},menu:{text:"컬럼을 선택하세요:"},sort:{ascending:"오름차순 정렬",descending:"내림차순 정렬",remove:"소팅 제거"},column:{hide:"컬럼 제거"},aggregation:{count:"전체 갯수: ",sum:"전체: ",avg:"평균: ",min:"최소: ",max:"최대: "},pinning:{pinLeft:"왼쪽 핀",pinRight:"오른쪽 핀",unpin:"핀 제거"},gridMenu:{columns:"컬럼:",importerTitle:"파일 가져오기",exporterAllAsCsv:"csv로 모든 데이터 내보내기",exporterVisibleAsCsv:"csv로 보이는 데이터 내보내기",exporterSelectedAsCsv:"csv로 선택된 데이터 내보내기",exporterAllAsPdf:"pdf로 모든 데이터 내보내기",exporterVisibleAsPdf:"pdf로 보이는 데이터 내보내기",exporterSelectedAsPdf:"pdf로 선택 데이터 내보내기",clearAllFilters:"모든 필터를 청소"},importer:{noHeaders:"컬럼명이 지정되어 있지 않습니다. 파일에 헤더가 명시되어 있는지 확인해 주세요.",noObjects:"데이터가 지정되어 있지 않습니다. 데이터가 파일에 있는지 확인해 주세요.",invalidCsv:"파일을 처리할 수 없습니다. 올바른 csv인지 확인해 주세요.",invalidJson:"파일을 처리할 수 없습니다. 올바른 json인지 확인해 주세요.",jsonNotArray:"json 파일은 배열을 포함해야 합니다."},pagination:{sizes:"페이지당 항목",totalItems:"전체 항목"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("nl",{aggregate:{label:"items"},groupPanel:{description:"Sleep hier een kolomnaam heen om op te groeperen."},search:{placeholder:"Zoeken...",showingItems:"Getoonde items:",selectedItems:"Geselecteerde items:",totalItems:"Totaal aantal items:",size:"Items per pagina:",first:"Eerste pagina",next:"Volgende pagina",previous:"Vorige pagina",last:"Laatste pagina"},menu:{text:"Kies kolommen:"},sort:{ascending:"Sorteer oplopend",descending:"Sorteer aflopend",remove:"Verwijder sortering"},column:{hide:"Verberg kolom"},aggregation:{count:"Aantal rijen: ",sum:"Som: ",avg:"Gemiddelde: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Zet links vast",pinRight:"Zet rechts vast",unpin:"Maak los"},gridMenu:{columns:"Kolommen:",importerTitle:"Importeer bestand",exporterAllAsCsv:"Exporteer alle data als csv",exporterVisibleAsCsv:"Exporteer zichtbare data als csv",exporterSelectedAsCsv:"Exporteer geselecteerde data als csv",exporterAllAsPdf:"Exporteer alle data als pdf",exporterVisibleAsPdf:"Exporteer zichtbare data als pdf",exporterSelectedAsPdf:"Exporteer geselecteerde data als pdf",clearAllFilters:"Reinig alle filters"},importer:{noHeaders:"Kolomnamen kunnen niet worden afgeleid. Heeft het bestand een header?",noObjects:"Objecten kunnen niet worden afgeleid. Bevat het bestand data naast de headers?",invalidCsv:"Het bestand kan niet verwerkt worden. Is het een valide csv bestand?",invalidJson:"Het bestand kan niet verwerkt worden. Is het valide json?",jsonNotArray:"Het json bestand moet een array bevatten. De actie wordt geannuleerd."},pagination:{sizes:"items per pagina",totalItems:"items",of:"van de"},grouping:{group:"Groepeer",ungroup:"Groepering opheffen",aggregate_count:"Agg: Aantal",aggregate_sum:"Agg: Som",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Gem",aggregate_remove:"Agg: Verwijder"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("pl",{headerCell:{aria:{defaultFilterLabel:"Filter dla kolumny",removeFilter:"Usuń filter",columnMenuButtonLabel:"Menu kolumny"},priority:"Prioritet:",filterLabel:"Filtr dla kolumny: "},aggregate:{label:"pozycji"},groupPanel:{description:"Przeciągnij nagłówek kolumny tutaj, aby pogrupować według niej."},search:{placeholder:"Szukaj...",showingItems:"Widoczne pozycje:",selectedItems:"Zaznaczone pozycje:",totalItems:"Wszystkich pozycji:",size:"Rozmiar strony:",first:"Pierwsza strona",next:"Następna strona",previous:"Poprzednia strona",last:"Ostatnia strona"},menu:{text:"Wybierz kolumny:"},sort:{ascending:"Sortuj rosnąco",descending:"Sortuj malejąco",none:"Brak sortowania",remove:"Wyłącz sortowanie"},column:{hide:"Ukryj kolumne"},aggregation:{count:"Razem pozycji: ",sum:"Razem: ",avg:"Średnia: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Przypnij do lewej",pinRight:"Przypnij do prawej",unpin:"Odepnij"},columnMenu:{close:"Zamknij"},gridMenu:{aria:{buttonLabel:"Menu Grida"},columns:"Kolumny:",importerTitle:"Importuj plik",exporterAllAsCsv:"Eksportuj wszystkie dane do csv",exporterVisibleAsCsv:"Eksportuj widoczne dane do csv",exporterSelectedAsCsv:"Eksportuj zaznaczone dane do csv",exporterAllAsPdf:"Eksportuj wszystkie dane do pdf",exporterVisibleAsPdf:"Eksportuj widoczne dane do pdf",exporterSelectedAsPdf:"Eksportuj zaznaczone dane do pdf",clearAllFilters:"Wyczyść filtry"},importer:{noHeaders:"Nie udało się wczytać nazw kolumn. Czy plik posiada nagłówek?",noObjects:"Nie udalo się wczytać pozycji. Czy plik zawiera dane??",invalidCsv:"Nie udało się przetworzyć pliku, jest to prawidlowy plik CSV??",invalidJson:"Nie udało się przetworzyć pliku, jest to prawidlowy plik Json?",jsonNotArray:"Importowany plik json musi zawierać tablicę, importowanie przerwane."},pagination:{aria:{pageToFirst:"Pierwsza strona",pageBack:"Poprzednia strona",pageSelected:"Wybrana strona",pageForward:"Następna strona",pageToLast:"Ostatnia strona"},sizes:"pozycji na stronę",totalItems:"pozycji",through:"do",of:"z"},grouping:{group:"Grupuj",ungroup:"Rozgrupuj",aggregate_count:"Zbiorczo: Razem",aggregate_sum:"Zbiorczo: Suma",aggregate_max:"Zbiorczo: Max",aggregate_min:"Zbiorczo: Min",aggregate_avg:"Zbiorczo: Średnia",aggregate_remove:"Zbiorczo: Usuń"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("pt-br",{headerCell:{aria:{defaultFilterLabel:"Filtro por coluna",removeFilter:"Remover filtro",columnMenuButtonLabel:"Menu coluna"},priority:"Prioridade:",filterLabel:"Filtro por coluna: "},aggregate:{label:"itens"},groupPanel:{description:"Arraste e solte uma coluna aqui para agrupar por essa coluna"},search:{placeholder:"Procurar...",showingItems:"Mostrando os Itens:",selectedItems:"Items Selecionados:",totalItems:"Total de Itens:",size:"Tamanho da Página:",first:"Primeira Página",next:"Próxima Página",previous:"Página Anterior",last:"Última Página"},menu:{text:"Selecione as colunas:"},sort:{ascending:"Ordenar Ascendente",descending:"Ordenar Descendente",none:"Nenhuma Ordem",remove:"Remover Ordenação"},column:{hide:"Esconder coluna"},aggregation:{count:"total de linhas: ",sum:"total: ",avg:"med: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fixar Esquerda",pinRight:"Fixar Direita",unpin:"Desprender"},columnMenu:{close:"Fechar"},gridMenu:{aria:{buttonLabel:"Menu Grid"},columns:"Colunas:",importerTitle:"Importar arquivo",exporterAllAsCsv:"Exportar todos os dados como csv",exporterVisibleAsCsv:"Exportar dados visíveis como csv",exporterSelectedAsCsv:"Exportar dados selecionados como csv",exporterAllAsPdf:"Exportar todos os dados como pdf",exporterVisibleAsPdf:"Exportar dados visíveis como pdf",exporterSelectedAsPdf:"Exportar dados selecionados como pdf",clearAllFilters:"Limpar todos os filtros"},importer:{noHeaders:"Nomes de colunas não puderam ser derivados. O arquivo tem um cabeçalho?",noObjects:"Objetos não puderam ser derivados. Havia dados no arquivo, além dos cabeçalhos?",invalidCsv:"Arquivo não pode ser processado. É um CSV válido?",invalidJson:"Arquivo não pode ser processado. É um Json válido?",jsonNotArray:"Arquivo json importado tem que conter um array. Abortando."},pagination:{aria:{pageToFirst:"Primeira página",pageBack:"Página anterior",pageSelected:"Página Selecionada",pageForward:"Proxima",pageToLast:"Anterior"},sizes:"itens por página",totalItems:"itens",through:"através dos",of:"de"},grouping:{group:"Agrupar",ungroup:"Desagrupar",aggregate_count:"Agr: Contar",aggregate_sum:"Agr: Soma",aggregate_max:"Agr: Max",aggregate_min:"Agr: Min",aggregate_avg:"Agr: Med",aggregate_remove:"Agr: Remover"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("pt",{headerCell:{aria:{defaultFilterLabel:"Filtro por coluna",removeFilter:"Remover filtro",columnMenuButtonLabel:"Menu coluna"},priority:"Prioridade:",filterLabel:"Filtro por coluna: "},aggregate:{label:"itens"},groupPanel:{description:"Arraste e solte uma coluna aqui para agrupar por essa coluna"},search:{placeholder:"Procurar...",showingItems:"Mostrando os Itens:", -selectedItems:"Itens Selecionados:",totalItems:"Total de Itens:",size:"Tamanho da Página:",first:"Primeira Página",next:"Próxima Página",previous:"Página Anterior",last:"Última Página"},menu:{text:"Selecione as colunas:"},sort:{ascending:"Ordenar Ascendente",descending:"Ordenar Descendente",none:"Nenhuma Ordem",remove:"Remover Ordenação"},column:{hide:"Esconder coluna"},aggregation:{count:"total de linhas: ",sum:"total: ",avg:"med: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fixar Esquerda",pinRight:"Fixar Direita",unpin:"Desprender"},columnMenu:{close:"Fechar"},gridMenu:{aria:{buttonLabel:"Menu Grid"},columns:"Colunas:",importerTitle:"Importar ficheiro",exporterAllAsCsv:"Exportar todos os dados como csv",exporterVisibleAsCsv:"Exportar dados visíveis como csv",exporterSelectedAsCsv:"Exportar dados selecionados como csv",exporterAllAsPdf:"Exportar todos os dados como pdf",exporterVisibleAsPdf:"Exportar dados visíveis como pdf",exporterSelectedAsPdf:"Exportar dados selecionados como pdf",clearAllFilters:"Limpar todos os filtros"},importer:{noHeaders:"Nomes de colunas não puderam ser derivados. O ficheiro tem um cabeçalho?",noObjects:"Objetos não puderam ser derivados. Havia dados no ficheiro, além dos cabeçalhos?",invalidCsv:"Ficheiro não pode ser processado. É um CSV válido?",invalidJson:"Ficheiro não pode ser processado. É um Json válido?",jsonNotArray:"Ficheiro json importado tem que conter um array. Interrompendo."},pagination:{aria:{pageToFirst:"Primeira página",pageBack:"Página anterior",pageSelected:"Página Selecionada",pageForward:"Próxima",pageToLast:"Anterior"},sizes:"itens por página",totalItems:"itens",through:"através dos",of:"de"},grouping:{group:"Agrupar",ungroup:"Desagrupar",aggregate_count:"Agr: Contar",aggregate_sum:"Agr: Soma",aggregate_max:"Agr: Max",aggregate_min:"Agr: Min",aggregate_avg:"Agr: Med",aggregate_remove:"Agr: Remover"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ro",{headerCell:{aria:{defaultFilterLabel:"Filtru pentru coloana",removeFilter:"Sterge filtru",columnMenuButtonLabel:"Column Menu"},priority:"Prioritate:",filterLabel:"Filtru pentru coloana:"},aggregate:{label:"Elemente"},groupPanel:{description:"Trage un cap de coloana aici pentru a grupa elementele dupa coloana respectiva"},search:{placeholder:"Cauta...",showingItems:"Arata elementele:",selectedItems:"Elementele selectate:",totalItems:"Total elemente:",size:"Marime pagina:",first:"Prima pagina",next:"Pagina urmatoare",previous:"Pagina anterioara",last:"Ultima pagina"},menu:{text:"Alege coloane:"},sort:{ascending:"Ordoneaza crescator",descending:"Ordoneaza descrescator",none:"Fara ordonare",remove:"Sterge ordonarea"},column:{hide:"Ascunde coloana"},aggregation:{count:"total linii: ",sum:"total: ",avg:"medie: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Pin la stanga",pinRight:"Pin la dreapta",unpin:"Sterge pinul"},columnMenu:{close:"Inchide"},gridMenu:{aria:{buttonLabel:"Grid Menu"},columns:"Coloane:",importerTitle:"Incarca fisier",exporterAllAsCsv:"Exporta toate datele ca csv",exporterVisibleAsCsv:"Exporta datele vizibile ca csv",exporterSelectedAsCsv:"Exporta datele selectate ca csv",exporterAllAsPdf:"Exporta toate datele ca pdf",exporterVisibleAsPdf:"Exporta datele vizibile ca pdf",exporterSelectedAsPdf:"Exporta datele selectate ca csv pdf",clearAllFilters:"Sterge toate filtrele"},importer:{noHeaders:"Numele coloanelor nu a putut fi incarcat, acest fisier are un header?",noObjects:"Datele nu au putut fi incarcate, exista date in fisier in afara numelor de coloane?",invalidCsv:"Fisierul nu a putut fi procesat, ati incarcat un CSV valid ?",invalidJson:"Fisierul nu a putut fi procesat, ati incarcat un Json valid?",jsonNotArray:"Json-ul incarcat trebuie sa contina un array, inchidere."},pagination:{aria:{pageToFirst:"Prima pagina",pageBack:"O pagina inapoi",pageSelected:"Pagina selectata",pageForward:"O pagina inainte",pageToLast:"Ultima pagina"},sizes:"Elemente per pagina",totalItems:"elemente",through:"prin",of:"of"},grouping:{group:"Grupeaza",ungroup:"Opreste gruparea",aggregate_count:"Agg: Count",aggregate_sum:"Agg: Sum",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Avg",aggregate_remove:"Agg: Remove"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ru",{headerCell:{aria:{defaultFilterLabel:"Фильтр столбца",removeFilter:"Удалить фильтр",columnMenuButtonLabel:"Меню столбца"},priority:"Приоритет:",filterLabel:"Фильтр столбца: "},aggregate:{label:"элементы"},groupPanel:{description:"Для группировки по столбцу перетащите сюда его название."},search:{placeholder:"Поиск...",showingItems:"Показать элементы:",selectedItems:"Выбранные элементы:",totalItems:"Всего элементов:",size:"Размер страницы:",first:"Первая страница",next:"Следующая страница",previous:"Предыдущая страница",last:"Последняя страница"},menu:{text:"Выбрать столбцы:"},sort:{ascending:"По возрастанию",descending:"По убыванию",none:"Без сортировки",remove:"Убрать сортировку"},column:{hide:"Спрятать столбец"},aggregation:{count:"всего строк: ",sum:"итого: ",avg:"среднее: ",min:"мин: ",max:"макс: "},pinning:{pinLeft:"Закрепить слева",pinRight:"Закрепить справа",unpin:"Открепить"},columnMenu:{close:"Закрыть"},gridMenu:{aria:{buttonLabel:"Меню"},columns:"Столбцы:",importerTitle:"Импортировать файл",exporterAllAsCsv:"Экспортировать всё в CSV",exporterVisibleAsCsv:"Экспортировать видимые данные в CSV",exporterSelectedAsCsv:"Экспортировать выбранные данные в CSV",exporterAllAsPdf:"Экспортировать всё в PDF",exporterVisibleAsPdf:"Экспортировать видимые данные в PDF",exporterSelectedAsPdf:"Экспортировать выбранные данные в PDF",clearAllFilters:"Очистите все фильтры"},importer:{noHeaders:"Не удалось получить названия столбцов, есть ли в файле заголовок?",noObjects:"Не удалось получить данные, есть ли в файле строки кроме заголовка?",invalidCsv:"Не удалось обработать файл, это правильный CSV-файл?",invalidJson:"Не удалось обработать файл, это правильный JSON?",jsonNotArray:"Импортируемый JSON-файл должен содержать массив, операция отменена."},pagination:{aria:{pageToFirst:"Первая страница",pageBack:"Предыдущая страница",pageSelected:"Выбранная страница",pageForward:"Следующая страница",pageToLast:"Последняя страница"},sizes:"строк на страницу",totalItems:"строк",through:"по",of:"из"},grouping:{group:"Группировать",ungroup:"Разгруппировать",aggregate_count:"Группировать: Count",aggregate_sum:"Для группы: Сумма",aggregate_max:"Для группы: Максимум",aggregate_min:"Для группы: Минимум",aggregate_avg:"Для группы: Среднее",aggregate_remove:"Для группы: Пусто"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("sk",{aggregate:{label:"items"},groupPanel:{description:"Pretiahni sem názov stĺpca pre zoskupenie podľa toho stĺpca."},search:{placeholder:"Hľadaj...",showingItems:"Zobrazujem položky:",selectedItems:"Vybraté položky:",totalItems:"Počet položiek:",size:"Počet:",first:"Prvá strana",next:"Ďalšia strana",previous:"Predchádzajúca strana",last:"Posledná strana"},menu:{text:"Vyberte stĺpce:"},sort:{ascending:"Zotriediť vzostupne",descending:"Zotriediť zostupne",remove:"Vymazať triedenie"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("sv",{aggregate:{label:"Artiklar"},groupPanel:{description:"Dra en kolumnrubrik hit och släpp den för att gruppera efter den kolumnen."},search:{placeholder:"Sök...",showingItems:"Visar artiklar:",selectedItems:"Valda artiklar:",totalItems:"Antal artiklar:",size:"Sidstorlek:",first:"Första sidan",next:"Nästa sida",previous:"Föregående sida",last:"Sista sidan"},menu:{text:"Välj kolumner:"},sort:{ascending:"Sortera stigande",descending:"Sortera fallande",remove:"Inaktivera sortering"},column:{hide:"Göm kolumn"},aggregation:{count:"Antal rader: ",sum:"Summa: ",avg:"Genomsnitt: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Fäst vänster",pinRight:"Fäst höger",unpin:"Lösgör"},gridMenu:{columns:"Kolumner:",importerTitle:"Importera fil",exporterAllAsCsv:"Exportera all data som CSV",exporterVisibleAsCsv:"Exportera synlig data som CSV",exporterSelectedAsCsv:"Exportera markerad data som CSV",exporterAllAsPdf:"Exportera all data som PDF",exporterVisibleAsPdf:"Exportera synlig data som PDF",exporterSelectedAsPdf:"Exportera markerad data som PDF",clearAllFilters:"Rengör alla filter"},importer:{noHeaders:"Kolumnnamn kunde inte härledas. Har filen ett sidhuvud?",noObjects:"Objekt kunde inte härledas. Har filen data undantaget sidhuvud?",invalidCsv:"Filen kunde inte behandlas, är den en giltig CSV?",invalidJson:"Filen kunde inte behandlas, är den en giltig JSON?",jsonNotArray:"Importerad JSON-fil måste innehålla ett fält. Import avbruten."},pagination:{sizes:"Artiklar per sida",totalItems:"Artiklar"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ta",{aggregate:{label:"உருப்படிகள்"},groupPanel:{description:"ஒரு பத்தியை குழுவாக அமைக்க அப்பத்தியின் தலைப்பை இங்கே இழுத்து வரவும் "},search:{placeholder:"தேடல் ...",showingItems:"உருப்படிகளை காண்பித்தல்:",selectedItems:"தேர்ந்தெடுக்கப்பட்ட உருப்படிகள்:",totalItems:"மொத்த உருப்படிகள்:",size:"பக்க அளவு: ",first:"முதல் பக்கம்",next:"அடுத்த பக்கம்",previous:"முந்தைய பக்கம் ",last:"இறுதி பக்கம்"},menu:{text:"பத்திகளை தேர்ந்தெடு:"},sort:{ascending:"மேலிருந்து கீழாக",descending:"கீழிருந்து மேலாக",remove:"வரிசையை நீக்கு"},column:{hide:"பத்தியை மறைத்து வை "},aggregation:{count:"மொத்த வரிகள்:",sum:"மொத்தம்: ",avg:"சராசரி: ",min:"குறைந்தபட்ச: ",max:"அதிகபட்ச: "},pinning:{pinLeft:"இடதுபுறமாக தைக்க ",pinRight:"வலதுபுறமாக தைக்க",unpin:"பிரி"},gridMenu:{columns:"பத்திகள்:",importerTitle:"கோப்பு : படித்தல்",exporterAllAsCsv:"எல்லா தரவுகளையும் கோப்பாக்கு: csv",exporterVisibleAsCsv:"இருக்கும் தரவுகளை கோப்பாக்கு: csv",exporterSelectedAsCsv:"தேர்ந்தெடுத்த தரவுகளை கோப்பாக்கு: csv",exporterAllAsPdf:"எல்லா தரவுகளையும் கோப்பாக்கு: pdf",exporterVisibleAsPdf:"இருக்கும் தரவுகளை கோப்பாக்கு: pdf",exporterSelectedAsPdf:"தேர்ந்தெடுத்த தரவுகளை கோப்பாக்கு: pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"பத்தியின் தலைப்புகளை பெற இயலவில்லை, கோப்பிற்கு தலைப்பு உள்ளதா?",noObjects:"இலக்குகளை உருவாக்க முடியவில்லை, கோப்பில் தலைப்புகளை தவிர தரவு ஏதேனும் உள்ளதா? ",invalidCsv:"சரிவர நடைமுறை படுத்த இயலவில்லை, கோப்பு சரிதானா? - csv",invalidJson:"சரிவர நடைமுறை படுத்த இயலவில்லை, கோப்பு சரிதானா? - json",jsonNotArray:"படித்த கோப்பில் வரிசைகள் உள்ளது, நடைமுறை ரத்து செய் : json"},pagination:{sizes:"உருப்படிகள் / பக்கம்",totalItems:"உருப்படிகள் "},grouping:{group:"குழு",ungroup:"பிரி",aggregate_count:"மதிப்பீட்டு : எண்ணு",aggregate_sum:"மதிப்பீட்டு : கூட்டல்",aggregate_max:"மதிப்பீட்டு : அதிகபட்சம்",aggregate_min:"மதிப்பீட்டு : குறைந்தபட்சம்",aggregate_avg:"மதிப்பீட்டு : சராசரி",aggregate_remove:"மதிப்பீட்டு : நீக்கு"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("tr",{headerCell:{aria:{defaultFilterLabel:"Sütun için filtre",removeFilter:"Filtreyi Kaldır",columnMenuButtonLabel:"Sütun Menüsü"},priority:"Öncelik:",filterLabel:"Sütun için filtre: "},aggregate:{label:"kayıtlar"},groupPanel:{description:"Sütuna göre gruplamak için sütun başlığını buraya sürükleyin ve bırakın."},search:{placeholder:"Arama...",showingItems:"Gösterilen Kayıt:",selectedItems:"Seçili Kayıt:",totalItems:"Toplam Kayıt:",size:"Sayfa Boyutu:",first:"İlk Sayfa",next:"Sonraki Sayfa",previous:"Önceki Sayfa",last:"Son Sayfa"},menu:{text:"Sütunları Seç:"},sort:{ascending:"Artan Sırada Sırala",descending:"Azalan Sırada Sırala",none:"Sıralama Yapma",remove:"Sıralamayı Kaldır"},column:{hide:"Sütunu Gizle"},aggregation:{count:"toplam satır: ",sum:"toplam: ",avg:"ort: ",min:"min: ",max:"maks: "},pinning:{pinLeft:"Sola Sabitle",pinRight:"Sağa Sabitle",unpin:"Sabitlemeyi Kaldır"},columnMenu:{close:"Kapat"},gridMenu:{aria:{buttonLabel:"Tablo Menü"},columns:"Sütunlar:",importerTitle:"Dosya içeri aktar",exporterAllAsCsv:"Bütün veriyi CSV olarak dışarı aktar",exporterVisibleAsCsv:"Görünen veriyi CSV olarak dışarı aktar",exporterSelectedAsCsv:"Seçili veriyi CSV olarak dışarı aktar",exporterAllAsPdf:"Bütün veriyi PDF olarak dışarı aktar",exporterVisibleAsPdf:"Görünen veriyi PDF olarak dışarı aktar",exporterSelectedAsPdf:"Seçili veriyi PDF olarak dışarı aktar",clearAllFilters:"Bütün filtreleri kaldır"},importer:{noHeaders:"Sütun isimleri üretilemiyor, dosyanın bir başlığı var mı?",noObjects:"Nesneler üretilemiyor, dosyada başlıktan başka bir veri var mı?",invalidCsv:"Dosya işlenemedi, geçerli bir CSV dosyası mı?",invalidJson:"Dosya işlenemedi, geçerli bir Json dosyası mı?",jsonNotArray:"Alınan Json dosyasında bir dizi bulunmalıdır, işlem iptal ediliyor."},pagination:{aria:{pageToFirst:"İlk sayfaya",pageBack:"Geri git",pageSelected:"Seçili sayfa",pageForward:"İleri git",pageToLast:"Sona git"},sizes:"Sayfadaki nesne sayısı",totalItems:"kayıtlar",through:"",of:""},grouping:{group:"Grupla",ungroup:"Gruplama",aggregate_count:"Yekun: Sayı",aggregate_sum:"Yekun: Toplam",aggregate_max:"Yekun: Maks",aggregate_min:"Yekun: Min",aggregate_avg:"Yekun: Ort",aggregate_remove:"Yekun: Sil"}}),a}])}])}(),function(){var a=["uiT","uiTranslate"],b=["t","uiTranslate"],c=angular.module("ui.grid.i18n");c.constant("i18nConstants",{MISSING:"[MISSING]",UPDATE_EVENT:"$uiI18n",LOCALE_DIRECTIVE_ALIAS:"uiI18n",DEFAULT_LANG:"en"}),c.service("i18nService",["$log","i18nConstants","$rootScope",function(a,b,c){var d={_langs:{},current:null,get:function(a){return this._langs[a.toLowerCase()]},add:function(a,b){var c=a.toLowerCase();this._langs[c]||(this._langs[c]={}),angular.extend(this._langs[c],b)},getAllLangs:function(){var a=[];if(!this._langs)return a;for(var b in this._langs)a.push(b);return a},setCurrent:function(a){this.current=a.toLowerCase()},getCurrentLang:function(){return this.current}},e={add:function(a,b){"object"==typeof a?angular.forEach(a,function(a){a&&d.add(a,b)}):d.add(a,b)},getAllLangs:function(){return d.getAllLangs()},get:function(a){var b=a?a:e.getCurrentLang();return d.get(b)},getSafeText:function(a,c){var f=c?c:e.getCurrentLang(),g=d.get(f);if(!g)return b.MISSING;for(var h=a.split("."),i=g,j=0;jf?0===g?new d(a,c[h]):new d(e[g-1],c[h]):new d(a,c[h])},f.prototype.getRowColRight=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);-1===f&&(f=0);var h=f===c.length-1?0:f+1;return f>h?g===e.length-1?new d(a,c[h]):new d(e[g+1],c[h]):new d(a,c[h])},f.prototype.getRowColDown=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);return-1===f&&(f=0),g===e.length-1?new d(a,c[f]):new d(e[g+1],c[f])},f.prototype.getRowColPageDown=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);-1===f&&(f=0);var h=this.bodyContainer.minRowsToRender();return g>=e.length-h?new d(e[e.length-1],c[f]):new d(e[g+h],c[f])},f.prototype.getRowColUp=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);return-1===f&&(f=0),0===g?new d(a,c[f]):new d(e[g-1],c[f])},f.prototype.getRowColPageUp=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);-1===f&&(f=0);var h=this.bodyContainer.minRowsToRender();return 0>g-h?new d(e[0],c[f]):new d(e[g-h],c[f])},f}]),a.service("uiGridCellNavService",["gridUtil","uiGridConstants","uiGridCellNavConstants","$q","uiGridCellNavFactory","GridRowColumn","ScrollEvent",function(a,b,c,d,e,f,g){var h={initializeGrid:function(a){a.registerColumnBuilder(h.cellNavColumnBuilder),a.cellNav={},a.cellNav.lastRowCol=null,a.cellNav.focusedCells=[],h.defaultGridOptions(a.options);var b={events:{cellNav:{navigate:function(a,b){},viewPortKeyDown:function(a,b){},viewPortKeyPress:function(a,b){}}},methods:{cellNav:{scrollToFocus:function(b,c){return h.scrollToFocus(a,b,c)},getFocusedCell:function(){return a.cellNav.lastRowCol},getCurrentSelection:function(){return a.cellNav.focusedCells},rowColSelectIndex:function(b){for(var c=-1,d=0;db&&(c+=a.drawnWidth)});var e=0===d?0:(d+1)/a.renderContainers.body.visibleColumnCache.length;return c+=b.drawnWidth*e}};return h}]),a.directive("uiGridCellnav",["gridUtil","uiGridCellNavService","uiGridCellNavConstants","uiGridConstants","GridRowColumn","$timeout","$compile",function(a,b,c,d,e,f,g){return{replace:!0,priority:-150,require:"^uiGrid",scope:!1,controller:function(){},compile:function(){return{pre:function(a,f,g,h){var i=a,j=h.grid;b.initializeGrid(j),h.cellNav={},h.cellNav.makeRowCol=function(a){return a instanceof e||(a=new e(a.row,a.col)),a},h.cellNav.getActiveCell=function(){var a=f[0].getElementsByClassName("ui-grid-cell-focus");return a.length>0?a[0]:void 0},h.cellNav.broadcastCellNav=j.cellNav.broadcastCellNav=function(a,b,d){b=!(void 0===b||!b),a=h.cellNav.makeRowCol(a),h.cellNav.broadcastFocus(a,b,d),i.$broadcast(c.CELL_NAV_EVENT,a,b,d)},h.cellNav.clearFocus=j.cellNav.clearFocus=function(){j.cellNav.focusedCells=[],i.$broadcast(c.CELL_NAV_EVENT)},h.cellNav.broadcastFocus=function(a,b,c){b=!(void 0===b||!b),a=h.cellNav.makeRowCol(a);var d=a.row,f=a.col,g=h.grid.api.cellNav.rowColSelectIndex(a);if(null===j.cellNav.lastRowCol||-1===g){var i=new e(d,f);null!==j.cellNav.lastRowCol&&j.cellNav.lastRowCol.row===i.row&&j.cellNav.lastRowCol.col===i.col||(j.api.cellNav.raise.navigate(i,j.cellNav.lastRowCol),j.cellNav.lastRowCol=i),h.grid.options.modifierKeysToMultiSelectCells&&b?j.cellNav.focusedCells.push(a):j.cellNav.focusedCells=[a]}else j.options.modifierKeysToMultiSelectCells&&b&&g>=0&&j.cellNav.focusedCells.splice(g,1)},h.cellNav.handleKeyDown=function(a){var e=b.getDirection(a);if(null===e)return null;var f="body";a.uiGridTargetRenderContainerId&&(f=a.uiGridTargetRenderContainerId);var g=h.grid.api.cellNav.getFocusedCell();if(g){var i=h.grid.renderContainers[f].cellNav.getNextRowCol(e,g.row,g.col),k=h.grid.renderContainers[f].cellNav.getFocusableCols(),l=h.grid.api.cellNav.rowColSelectIndex(i);return e===c.direction.LEFT&&i.col===k[k.length-1]&&i.row===g.row&&a.keyCode===d.keymap.TAB&&a.shiftKey?(j.cellNav.focusedCells.splice(l,1),h.cellNav.clearFocus(),!0):e!==c.direction.RIGHT||i.col!==k[0]||i.row!==g.row||a.keyCode!==d.keymap.TAB||a.shiftKey?(j.scrollToIfNecessary(i.row,i.col).then(function(){h.cellNav.broadcastCellNav(i)}),a.stopPropagation(),a.preventDefault(),!1):(j.cellNav.focusedCells.splice(l,1),h.cellNav.clearFocus(),!0)}}},post:function(a,b,d,e){function f(){var d='
             
            ',e=g(d)(a);b.prepend(e),a.$on(c.CELL_NAV_EVENT,function(a,b,c,d){function f(a){a!==e.text()&&(e[0].style.clip="rect(0px,0px,0px,0px)",e[0].innerHTML="",e[0].style.visibility="hidden",e[0].style.visibility="visible",""!==a&&(e[0].style.clip="auto",e[0].appendChild(document.createTextNode(a+" ")),e[0].style.visibility="hidden",e[0].style.visibility="visible"))}if(!d||"focus"!==d.type){for(var g=[],i=h.api.cellNav.getCurrentSelection(),j=0;j
            ')(b);d.append(o),o.on("focus",function(a){a.uiGridTargetRenderContainerId=m;var b=j.grid.api.cellNav.getFocusedCell();null===b&&(b=j.grid.renderContainers[m].cellNav.getNextRowCol(g.direction.DOWN,null,null),b.row&&b.col&&j.cellNav.broadcastCellNav(b))}),l.setAriaActivedescendant=function(a){d.attr("aria-activedescendant",a)},l.removeAriaActivedescendant=function(a){d.attr("aria-activedescendant")===a&&d.attr("aria-activedescendant","")},j.focus=function(){c.focus.byElement(o[0])};var p=null;o.on("keydown",function(a){a.uiGridTargetRenderContainerId=m;var b=j.grid.api.cellNav.getFocusedCell(),c=j.cellNav.handleKeyDown(a);null===c&&(j.grid.api.cellNav.raise.viewPortKeyDown(a,b),p=b)}),o.on("keypress",function(b){p&&(a(function(){j.grid.api.cellNav.raise.viewPortKeyPress(b,p)},4),p=null)}),b.$on("$destroy",function(){o.off()})}}}}}}}]),a.directive("uiGridViewport",["$timeout","$document","gridUtil","uiGridConstants","uiGridCellNavService","uiGridCellNavConstants","$log","$compile",function(a,b,c,d,e,f,g,h){return{replace:!0,priority:-99999,require:["^uiGrid","^uiGridRenderContainer","?^uiGridCellnav"],scope:!1,compile:function(){return{pre:function(a,b,c,d){},post:function(a,b,c,d){var e=d[0],f=d[1];if(e.grid.api.cellNav){var g=f.containerId;if("body"===g){var h=e.grid;h.api.core.on.scrollBegin(a,function(a){var b=e.grid.api.cellNav.getFocusedCell();null!==b&&f.colContainer.containsColumn(b.col)&&e.cellNav.clearFocus()}),h.api.core.on.scrollEnd(a,function(a){var b=e.grid.api.cellNav.getFocusedCell();null!==b&&f.colContainer.containsColumn(b.col)&&e.cellNav.broadcastCellNav(b)}),h.api.cellNav.on.navigate(a,function(){e.focus()})}}}}}}}]),a.directive("uiGridCell",["$timeout","$document","uiGridCellNavService","gridUtil","uiGridCellNavConstants","uiGridConstants","GridRowColumn",function(a,b,c,d,e,f,g){return{priority:-150,restrict:"A",require:["^uiGrid","?^uiGridCellnav"],scope:!1,link:function(a,b,c,d){function f(a){a.preventDefault()}function h(){if(!a.focused){var c=b.find("div");c.addClass("ui-grid-cell-focus"),b.attr("aria-selected",!0),k.setAriaActivedescendant(b.attr("id")),a.focused=!0}}function i(){if(a.focused){var c=b.find("div");c.removeClass("ui-grid-cell-focus"),b.attr("aria-selected",!1),k.removeAriaActivedescendant(b.attr("id")),a.focused=!1}}var j=d[0],k=d[1];if(j.grid.api.cellNav&&a.col.colDef.allowCellFocus){var l=j.grid;a.focused=!1,b.attr("tabindex",-1),b.find("div").on("click",function(b){j.cellNav.broadcastCellNav(new g(a.row,a.col),b.ctrlKey||b.metaKey,b),b.stopPropagation(),a.$apply()}),b.on("mousedown",f),j.grid.api.edit&&(j.grid.api.edit.on.beginCellEdit(a,function(){b.off("mousedown",f)}),j.grid.api.edit.on.afterCellEdit(a,function(){b.on("mousedown",f)}),j.grid.api.edit.on.cancelCellEdit(a,function(){b.on("mousedown",f)})),b.on("focus",function(b){j.cellNav.broadcastCellNav(new g(a.row,a.col),!1,b),b.stopPropagation(),a.$apply()}),a.$on(e.CELL_NAV_EVENT,function(b,c,d){var e=l.cellNav.focusedCells.some(function(b,c){return b.row===a.row&&b.col===a.col; -});e?h():i()}),a.$on("$destroy",function(){b.find("div").off(),b.off()})}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.edit",["ui.grid"]);a.constant("uiGridEditConstants",{EDITABLE_CELL_TEMPLATE:/EDITABLE_CELL_TEMPLATE/g,EDITABLE_CELL_DIRECTIVE:/editable_cell_directive/g,events:{BEGIN_CELL_EDIT:"uiGridEventBeginCellEdit",END_CELL_EDIT:"uiGridEventEndCellEdit",CANCEL_CELL_EDIT:"uiGridEventCancelCellEdit"}}),a.service("uiGridEditService",["$q","uiGridConstants","gridUtil",function(a,b,c){var d={initializeGrid:function(a){d.defaultGridOptions(a.options),a.registerColumnBuilder(d.editColumnBuilder),a.edit={};var b={events:{edit:{afterCellEdit:function(a,b,c,d){},beginCellEdit:function(a,b,c){},cancelCellEdit:function(a,b){}}},methods:{edit:{}}};a.api.registerEventsFromObject(b.events)},defaultGridOptions:function(a){a.cellEditableCondition=void 0===a.cellEditableCondition?!0:a.cellEditableCondition,a.enableCellEditOnFocus=void 0===a.enableCellEditOnFocus?!1:a.enableCellEditOnFocus},editColumnBuilder:function(b,d,e){var f=[];return b.enableCellEdit=void 0===b.enableCellEdit?void 0===e.enableCellEdit?"object"!==b.type:e.enableCellEdit:b.enableCellEdit,b.cellEditableCondition=void 0===b.cellEditableCondition?e.cellEditableCondition:b.cellEditableCondition,b.enableCellEdit&&(b.editableCellTemplate=b.editableCellTemplate||e.editableCellTemplate||"ui-grid/cellEditor",f.push(c.getTemplate(b.editableCellTemplate).then(function(a){d.editableCellTemplate=a},function(a){throw new Error("Couldn't fetch/use colDef.editableCellTemplate '"+b.editableCellTemplate+"'")}))),b.enableCellEditOnFocus=void 0===b.enableCellEditOnFocus?e.enableCellEditOnFocus:b.enableCellEditOnFocus,a.all(f)},isStartEditKey:function(a){return!(a.metaKey||a.keyCode===b.keymap.ESC||a.keyCode===b.keymap.SHIFT||a.keyCode===b.keymap.CTRL||a.keyCode===b.keymap.ALT||a.keyCode===b.keymap.WIN||a.keyCode===b.keymap.CAPSLOCK||a.keyCode===b.keymap.LEFT||a.keyCode===b.keymap.TAB&&a.shiftKey||a.keyCode===b.keymap.RIGHT||a.keyCode===b.keymap.TAB||a.keyCode===b.keymap.UP||a.keyCode===b.keymap.ENTER&&a.shiftKey||a.keyCode===b.keymap.DOWN||a.keyCode===b.keymap.ENTER)}};return d}]),a.directive("uiGridEdit",["gridUtil","uiGridEditService",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(e.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridViewport",["uiGridEditConstants",function(a){return{replace:!0,priority:-99998,require:["^uiGrid","^uiGridRenderContainer"],scope:!1,compile:function(){return{post:function(b,c,d,e){var f=e[0];if(f.grid.api.edit&&f.grid.api.cellNav){var g=e[1].containerId;"body"===g&&(b.$on(a.events.CANCEL_CELL_EDIT,function(){f.focus()}),b.$on(a.events.END_CELL_EDIT,function(){f.focus()}))}}}}}}]),a.directive("uiGridCell",["$compile","$injector","$timeout","uiGridConstants","uiGridEditConstants","gridUtil","$parse","uiGridEditService","$rootScope","$q",function(a,b,c,d,e,f,g,h,i,j){var k=500;if(b.has("uiGridCellNavService")){b.get("uiGridCellNavService")}return{priority:-100,restrict:"A",scope:!1,require:"?^uiGrid",link:function(b,l,m,n){function o(){l.on("dblclick",u),l.on("touchstart",p),n&&n.grid.api.cellNav&&(G=n.grid.api.cellNav.on.viewPortKeyDown(b,function(a,c){null!==c&&(c.row!==b.row||c.col!==b.col||b.col.colDef.enableCellEditOnFocus||s(a))}),F=n.grid.api.cellNav.on.navigate(b,function(a,d){b.col.colDef.enableCellEditOnFocus&&(d&&a.row===d.row&&a.col===d.col||a.row!==b.row||a.col!==b.col||c(function(){u()}))})),b.beginEditEventsWired=!0}function p(a){"undefined"!=typeof a.originalEvent&&void 0!==a.originalEvent&&(a=a.originalEvent),l.on("touchend",q),C=c(function(){},k),C.then(function(){setTimeout(u,0),l.off("touchend",q)})}function q(a){c.cancel(C),l.off("touchend",q)}function r(){l.off("dblclick",u),l.off("keydown",s),l.off("touchstart",p),F(),G(),b.beginEditEventsWired=!1}function s(a){h.isStartEditKey(a)&&u(a)}function t(a,c){return!c.isSaving&&(angular.isFunction(a.colDef.cellEditableCondition)?a.colDef.cellEditableCondition(b):a.colDef.cellEditableCondition)}function u(a){b.grid.api.core.scrollToIfNecessary(b.row,b.col).then(function(){v(a)})}function v(h){if(!E&&t(b.col,b.row)){B=g(b.row.getQualifiedColField(b.col)),A=B(b),z=b.col.editableCellTemplate,z=b.col.colDef.editModelField?z.replace(d.MODEL_COL_FIELD,f.preEval("row.entity."+b.col.colDef.editModelField)):z.replace(d.MODEL_COL_FIELD,b.row.getQualifiedColField(b.col)),z=z.replace(d.COL_FIELD,"grid.getCellValue(row, col)");var k=b.col.colDef.editDropdownFilter?"|"+b.col.colDef.editDropdownFilter:"";z=z.replace(d.CUSTOM_FILTERS,k);var m="text";switch(b.col.colDef.type){case"boolean":m="checkbox";break;case"number":m="number";break;case"date":m="date"}z=z.replace("INPUT_TYPE",m);var n=b.col.colDef.editDropdownOptionsFunction;if(n)j.when(n(b.row.entity,b.col.colDef)).then(function(a){b.editDropdownOptionsArray=a});else{var o=b.col.colDef.editDropdownRowEntityOptionsArrayPath;o?b.editDropdownOptionsArray=y(b.row.entity,o):b.editDropdownOptionsArray=b.col.colDef.editDropdownOptionsArray}b.editDropdownIdLabel=b.col.colDef.editDropdownIdLabel?b.col.colDef.editDropdownIdLabel:"id",b.editDropdownValueLabel=b.col.colDef.editDropdownValueLabel?b.col.colDef.editDropdownValueLabel:"value";var p=function(){E=!0,r();var c=angular.element(z);l.append(c),D=b.$new(),a(c)(D);var d=angular.element(l.children()[0]);d.addClass("ui-grid-cell-contents-hidden")};i.$$phase?p():b.$apply(p);var q=b.col.grid.api.core.on.scrollBegin(b,function(){b.grid.disableScrolling||(w(),b.grid.api.edit.raise.afterCellEdit(b.row.entity,b.col.colDef,B(b),A),q(),s(),u())}),s=b.$on(e.events.END_CELL_EDIT,function(){w(),b.grid.api.edit.raise.afterCellEdit(b.row.entity,b.col.colDef,B(b),A),s(),q(),u()}),u=b.$on(e.events.CANCEL_CELL_EDIT,function(){x(),u(),q(),s()});b.$broadcast(e.events.BEGIN_CELL_EDIT,h),c(function(){b.grid.api.edit.raise.beginCellEdit(b.row.entity,b.col.colDef,h)})}}function w(){if(b.grid.disableScrolling=!1,E){n&&n.grid.api.cellNav&&n.focus();var a=angular.element(l.children()[0]);D.$destroy(),angular.element(l.children()[1]).remove(),a.removeClass("ui-grid-cell-contents-hidden"),E=!1,o(),b.grid.api.core.notifyDataChange(d.dataChange.EDIT)}}function x(){b.grid.disableScrolling=!1,E&&(B.assign(b,A),b.$apply(),b.grid.api.edit.raise.cancelCellEdit(b.row.entity,b.col.colDef),w())}function y(a,b){b=b.replace(/\[(\w+)\]/g,".$1"),b=b.replace(/^\./,"");for(var c=b.split(".");c.length;){var d=c.shift();if(!(d in a))return;a=a[d]}return a}var z,A,B,C,D,E=!1;if(b.col.colDef.enableCellEdit){var F=function(){},G=function(){},H=function(){b.col.colDef.enableCellEdit&&b.row.enableCellEdit!==!1?b.beginEditEventsWired||o():b.beginEditEventsWired&&r()};H();var I=b.$watch("row",function(a,b){a!==b&&H()});b.$on("$destroy",I)}}}}]),a.directive("uiGridEditor",["gridUtil","uiGridConstants","uiGridEditConstants","$timeout","uiGridEditService",function(a,b,c,d,e){return{scope:!0,require:["?^uiGrid","?^uiGridRenderContainer","ngModel"],compile:function(){return{pre:function(a,b,c){},post:function(a,f,g,h){var i,j,k;h[0]&&(i=h[0]),h[1]&&(j=h[1]),h[2]&&(k=h[2]),a.$on(c.events.BEGIN_CELL_EDIT,function(b,c){if(d(function(){if(f[0].focus(),!a.col.colDef.enableCellEditOnFocus&&i&&i.grid.api.cellNav)try{f[0].setSelectionRange(f[0].value.length,f[0].value.length)}catch(b){}else f[0].select()}),i&&i.grid.api.cellNav)var g=i.grid.api.cellNav.on.viewPortKeyPress(a,function(a,b){e.isStartEditKey(a)&&(k.$setViewValue(String.fromCharCode("number"==typeof a.which?a.which:a.keyCode),a),k.$render()),g()});f.on("blur",function(b){a.stopEdit(b)})}),a.deepEdit=!1,a.stopEdit=function(b){a.inputForm&&!a.inputForm.$valid?(b.stopPropagation(),a.$emit(c.events.CANCEL_CELL_EDIT)):a.$emit(c.events.END_CELL_EDIT),a.deepEdit=!1},f.on("click",function(b){"checkbox"!==f[0].type&&(a.deepEdit=!0,d(function(){a.grid.disableScrolling=!0}))}),f.on("keydown",function(d){switch(d.keyCode){case b.keymap.ESC:d.stopPropagation(),a.$emit(c.events.CANCEL_CELL_EDIT)}if(!a.deepEdit||d.keyCode!==b.keymap.LEFT&&d.keyCode!==b.keymap.RIGHT&&d.keyCode!==b.keymap.UP&&d.keyCode!==b.keymap.DOWN)if(i&&i.grid.api.cellNav)d.uiGridTargetRenderContainerId=j.containerId,null!==i.cellNav.handleKeyDown(d)&&a.stopEdit(d);else switch(d.keyCode){case b.keymap.ENTER:case b.keymap.TAB:d.stopPropagation(),d.preventDefault(),a.stopEdit(d)}else d.stopPropagation();return!0})}}}}}]),a.directive("uiGridEditor",["$filter",function(a){function b(a){if("undefined"==typeof a||""===a)return null;var b=a.split("-");if(3!==b.length)return null;var c=parseInt(b[0],10),d=parseInt(b[1],10),e=parseInt(b[2],10);return 1>d||1>c||1>e?null:new Date(c,d-1,e)}return{priority:-100,require:"?ngModel",link:function(c,d,e,f){2===angular.version.minor&&e.type&&"date"===e.type&&f&&(f.$formatters.push(function(b){return f.$setValidity(null,!b||!isNaN(b.getTime())),a("date")(b,"yyyy-MM-dd")}),f.$parsers.push(function(a){if(a&&a.length>0){var c=b(a);return f.$setValidity(null,c&&!isNaN(c.getTime())),c}return f.$setValidity(null,!0),null}))}}}]),a.directive("uiGridEditDropdown",["uiGridConstants","uiGridEditConstants",function(a,b){return{require:["?^uiGrid","?^uiGridRenderContainer"],scope:!0,compile:function(){return{pre:function(a,b,c){},post:function(c,d,e,f){var g=f[0],h=f[1];c.$on(b.events.BEGIN_CELL_EDIT,function(){d[0].focus(),d[0].style.width=d[0].parentElement.offsetWidth-1+"px",d.on("blur",function(a){c.stopEdit(a)})}),c.stopEdit=function(a){c.$emit(b.events.END_CELL_EDIT)},d.on("keydown",function(d){switch(d.keyCode){case a.keymap.ESC:d.stopPropagation(),c.$emit(b.events.CANCEL_CELL_EDIT)}if(g&&g.grid.api.cellNav)d.uiGridTargetRenderContainerId=h.containerId,null!==g.cellNav.handleKeyDown(d)&&c.stopEdit(d);else switch(d.keyCode){case a.keymap.ENTER:case a.keymap.TAB:d.stopPropagation(),d.preventDefault(),c.stopEdit(d)}return!0})}}}}}]),a.directive("uiGridEditFileChooser",["gridUtil","uiGridConstants","uiGridEditConstants","$timeout",function(a,b,c,d){return{scope:!0,require:["?^uiGrid","?^uiGridRenderContainer"],compile:function(){return{pre:function(a,b,c){},post:function(b,d,e,f){var g,h;f[0]&&(g=f[0]),f[1]&&(h=f[1]);var i=(g.grid,function(d){var e=d.srcElement||d.target;e&&e.files&&e.files.length>0?("function"==typeof b.col.colDef.editFileChooserCallback?b.col.colDef.editFileChooserCallback(b.row,b.col,e.files):a.logError("You need to set colDef.editFileChooserCallback to use the file chooser"),e.form.reset(),b.$emit(c.events.END_CELL_EDIT)):b.$emit(c.events.CANCEL_CELL_EDIT)});d[0].addEventListener("change",i,!1),b.$on(c.events.BEGIN_CELL_EDIT,function(){d[0].focus(),d[0].select(),d.on("blur",function(a){b.$emit(c.events.END_CELL_EDIT)})})}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.expandable",["ui.grid"]);a.service("uiGridExpandableService",["gridUtil","$compile",function(a,b){var c={initializeGrid:function(b){b.expandable={},b.expandable.expandedAll=!1,b.options.enableExpandable=b.options.enableExpandable!==!1,b.options.expandableRowHeight=b.options.expandableRowHeight||150,b.options.expandableRowHeaderWidth=b.options.expandableRowHeaderWidth||40,b.options.enableExpandable&&!b.options.expandableRowTemplate&&(a.logError("You have not set the expandableRowTemplate, disabling expandable module"),b.options.enableExpandable=!1);var d={events:{expandable:{rowExpandedBeforeStateChanged:function(a,b){},rowExpandedStateChanged:function(a,b){}}},methods:{expandable:{toggleRowExpansion:function(a){var d=b.getRow(a);null!==d&&c.toggleRowExpansion(b,d)},expandAllRows:function(){c.expandAllRows(b)},collapseAllRows:function(){c.collapseAllRows(b)},toggleAllRows:function(){c.toggleAllRows(b)}}}};b.api.registerEventsFromObject(d.events),b.api.registerMethodsFromObject(d.methods)},toggleRowExpansion:function(a,b){a.api.expandable.raise.rowExpandedBeforeStateChanged(b),b.isExpanded=!b.isExpanded,angular.isUndefined(b.expandedRowHeight)&&(b.expandedRowHeight=a.options.expandableRowHeight),b.isExpanded?b.height=b.grid.options.rowHeight+b.expandedRowHeight:(b.height=b.grid.options.rowHeight,a.expandable.expandedAll=!1),a.api.expandable.raise.rowExpandedStateChanged(b)},expandAllRows:function(a,b){a.renderContainers.body.visibleRowCache.forEach(function(b){b.isExpanded||c.toggleRowExpansion(a,b)}),a.expandable.expandedAll=!0,a.queueGridRefresh()},collapseAllRows:function(a){a.renderContainers.body.visibleRowCache.forEach(function(b){b.isExpanded&&c.toggleRowExpansion(a,b)}),a.expandable.expandedAll=!1,a.queueGridRefresh()},toggleAllRows:function(a){a.expandable.expandedAll?c.collapseAllRows(a):c.expandAllRows(a)}};return c}]),a.directive("uiGridExpandable",["uiGridExpandableService","$templateCache",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(c,d,e,f){if(f.grid.options.enableExpandableRowHeader!==!1){var g={name:"expandableButtons",displayName:"",exporterSuppressExport:!0,enableColumnResizing:!1,enableColumnMenu:!1,width:f.grid.options.expandableRowHeaderWidth||40};g.cellTemplate=b.get("ui-grid/expandableRowHeader"),g.headerCellTemplate=b.get("ui-grid/expandableTopRowHeader"),f.grid.addRowHeaderColumn(g)}a.initializeGrid(f.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGrid",["uiGridExpandableService","$templateCache",function(a,b){return{replace:!0,priority:599,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,b,c,d){d.grid.api.core.on.renderingComplete(a,function(){a.row&&a.row.grid&&a.row.grid.options&&a.row.grid.options.enableExpandable&&(d.grid.parentRow=a.row)})},post:function(a,b,c,d){}}}}}]),a.directive("uiGridExpandableRow",["uiGridExpandableService","$timeout","$compile","uiGridConstants","gridUtil","$interval","$log",function(a,b,c,d,e,f,g){return{replace:!1,priority:0,scope:!1,compile:function(){return{pre:function(a,b,d,f){e.getTemplate(a.grid.options.expandableRowTemplate).then(function(d){if(a.grid.options.expandableRowScope){var e=a.grid.options.expandableRowScope;for(var f in e)e.hasOwnProperty(f)&&(a[f]=e[f])}var g=c(d)(a);b.append(g),a.row.expandedRendered=!0})},post:function(a,b,c,d){a.$on("$destroy",function(){a.row.expandedRendered=!1})}}}}}]),a.directive("uiGridRow",["$compile","gridUtil","$templateCache",function(a,b,c){return{priority:-200,scope:!1,compile:function(a,b){return{pre:function(a,b,c,d){a.expandableRow={},a.expandableRow.shouldRenderExpand=function(){var b="body"===a.colContainer.name&&a.grid.options.enableExpandable!==!1&&a.row.isExpanded&&(!a.grid.isScrollingVertically||a.row.expandedRendered);return b},a.expandableRow.shouldRenderFiller=function(){var b=a.row.isExpanded&&("body"!==a.colContainer.name||a.grid.isScrollingVertically&&!a.row.expandedRendered);return b}},post:function(a,b,c,d){}}}}}]),a.directive("uiGridViewport",["$compile","gridUtil","$templateCache",function(a,b,c){return{priority:-200,scope:!1,compile:function(a,b){var d=angular.element(a.children().children()[0]),e=c.get("ui-grid/expandableScrollFiller"),f=c.get("ui-grid/expandableRow");return d.append(f),d.append(e),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.exporter",["ui.grid"]);a.constant("uiGridExporterConstants",{featureName:"exporter",ALL:"all",VISIBLE:"visible",SELECTED:"selected",CSV_CONTENT:"CSV_CONTENT",BUTTON_LABEL:"BUTTON_LABEL",FILE_NAME:"FILE_NAME"}),a.service("uiGridExporterService",["$q","uiGridExporterConstants","gridUtil","$compile","$interval","i18nService",function(a,b,c,d,e,f){var g={delay:100,initializeGrid:function(a){a.exporter={},this.defaultGridOptions(a.options);var b={events:{exporter:{}},methods:{exporter:{csvExport:function(b,c){g.csvExport(a,b,c)},pdfExport:function(b,c){g.pdfExport(a,b,c)}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods),a.api.core.addToGridMenu?g.addToMenu(a):e(function(){a.api.core.addToGridMenu&&g.addToMenu(a)},this.delay,1)},defaultGridOptions:function(a){a.exporterSuppressMenu=a.exporterSuppressMenu===!0,a.exporterMenuLabel=a.exporterMenuLabel?a.exporterMenuLabel:"Export",a.exporterSuppressColumns=a.exporterSuppressColumns?a.exporterSuppressColumns:[],a.exporterCsvColumnSeparator=a.exporterCsvColumnSeparator?a.exporterCsvColumnSeparator:",",a.exporterCsvFilename=a.exporterCsvFilename?a.exporterCsvFilename:"download.csv",a.exporterPdfFilename=a.exporterPdfFilename?a.exporterPdfFilename:"download.pdf",a.exporterOlderExcelCompatibility=a.exporterOlderExcelCompatibility===!0,a.exporterPdfDefaultStyle=a.exporterPdfDefaultStyle?a.exporterPdfDefaultStyle:{fontSize:11},a.exporterPdfTableStyle=a.exporterPdfTableStyle?a.exporterPdfTableStyle:{margin:[0,5,0,15]},a.exporterPdfTableHeaderStyle=a.exporterPdfTableHeaderStyle?a.exporterPdfTableHeaderStyle:{bold:!0,fontSize:12,color:"black"},a.exporterPdfHeader=a.exporterPdfHeader?a.exporterPdfHeader:null,a.exporterPdfFooter=a.exporterPdfFooter?a.exporterPdfFooter:null,a.exporterPdfOrientation=a.exporterPdfOrientation?a.exporterPdfOrientation:"landscape",a.exporterPdfPageSize=a.exporterPdfPageSize?a.exporterPdfPageSize:"A4",a.exporterPdfMaxGridWidth=a.exporterPdfMaxGridWidth?a.exporterPdfMaxGridWidth:720,a.exporterMenuAllData=void 0!==a.exporterMenuAllData?a.exporterMenuAllData:!0,a.exporterMenuVisibleData=void 0!==a.exporterMenuVisibleData?a.exporterMenuVisibleData:!0,a.exporterMenuSelectedData=void 0!==a.exporterMenuSelectedData?a.exporterMenuSelectedData:!0,a.exporterMenuCsv=void 0!==a.exporterMenuCsv?a.exporterMenuCsv:!0,a.exporterMenuPdf=void 0!==a.exporterMenuPdf?a.exporterMenuPdf:!0,a.exporterPdfCustomFormatter=a.exporterPdfCustomFormatter&&"function"==typeof a.exporterPdfCustomFormatter?a.exporterPdfCustomFormatter:function(a){return a},a.exporterHeaderFilterUseName=a.exporterHeaderFilterUseName===!0,a.exporterFieldCallback=a.exporterFieldCallback?a.exporterFieldCallback:function(a,b,c,d){return d},a.exporterAllDataFn=a.exporterAllDataFn?a.exporterAllDataFn:null,null==a.exporterAllDataFn&&a.exporterAllDataPromise&&(a.exporterAllDataFn=a.exporterAllDataPromise)},addToMenu:function(a){a.api.core.addToGridMenu(a,[{title:f.getSafeText("gridMenu.exporterAllAsCsv"),action:function(a){this.grid.api.exporter.csvExport(b.ALL,b.ALL)},shown:function(){return this.grid.options.exporterMenuCsv&&this.grid.options.exporterMenuAllData},order:200},{title:f.getSafeText("gridMenu.exporterVisibleAsCsv"),action:function(a){this.grid.api.exporter.csvExport(b.VISIBLE,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuCsv&&this.grid.options.exporterMenuVisibleData},order:201},{title:f.getSafeText("gridMenu.exporterSelectedAsCsv"),action:function(a){this.grid.api.exporter.csvExport(b.SELECTED,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuCsv&&this.grid.options.exporterMenuSelectedData&&this.grid.api.selection&&this.grid.api.selection.getSelectedRows().length>0},order:202},{title:f.getSafeText("gridMenu.exporterAllAsPdf"),action:function(a){this.grid.api.exporter.pdfExport(b.ALL,b.ALL)},shown:function(){return this.grid.options.exporterMenuPdf&&this.grid.options.exporterMenuAllData},order:203},{title:f.getSafeText("gridMenu.exporterVisibleAsPdf"),action:function(a){this.grid.api.exporter.pdfExport(b.VISIBLE,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuPdf&&this.grid.options.exporterMenuVisibleData},order:204},{title:f.getSafeText("gridMenu.exporterSelectedAsPdf"),action:function(a){this.grid.api.exporter.pdfExport(b.SELECTED,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuPdf&&this.grid.options.exporterMenuSelectedData&&this.grid.api.selection&&this.grid.api.selection.getSelectedRows().length>0},order:205}])},csvExport:function(a,b,c){var d=this;this.loadAllDataIfNeeded(a,b,c).then(function(){var e=a.options.showHeader?d.getColumnHeaders(a,c):[],f=d.getData(a,b,c),g=d.formatAsCsv(e,f,a.options.exporterCsvColumnSeparator);d.downloadFile(a.options.exporterCsvFilename,g,a.options.exporterOlderExcelCompatibility)})},loadAllDataIfNeeded:function(c,d,e){if(d===b.ALL&&c.rows.length!==c.options.totalItems&&c.options.exporterAllDataFn)return c.options.exporterAllDataFn().then(function(){c.modifyRows(c.options.data)});var f=a.defer();return f.resolve(),f.promise},getColumnHeaders:function(a,c){var d,e=[];if(c===b.ALL)d=a.columns;else{var f=a.renderContainers.left?a.renderContainers.left.visibleColumnCache.filter(function(a){return a.visible}):[],g=a.renderContainers.body?a.renderContainers.body.visibleColumnCache.filter(function(a){return a.visible}):[],h=a.renderContainers.right?a.renderContainers.right.visibleColumnCache.filter(function(a){return a.visible}):[];d=f.concat(g,h)}return d.forEach(function(b,c){b.colDef.exporterSuppressExport!==!0&&-1===a.options.exporterSuppressColumns.indexOf(b.name)&&e.push({name:b.field,displayName:a.options.exporterHeaderFilter?a.options.exporterHeaderFilterUseName?a.options.exporterHeaderFilter(b.name):a.options.exporterHeaderFilter(b.displayName):b.displayName,width:b.drawnWidth?b.drawnWidth:b.width,align:"number"===b.colDef.type?"right":"left"})}),e},getData:function(a,d,e,f){var g,h,i=[];switch(d){case b.ALL:g=a.rows;break;case b.VISIBLE:g=a.getVisibleRows();break;case b.SELECTED:a.api.selection?g=a.api.selection.getSelectedGridRows():c.logError("selection feature must be enabled to allow selected rows to be exported")}if(e===b.ALL)h=a.columns;else{var j=a.renderContainers.left?a.renderContainers.left.visibleColumnCache.filter(function(a){return a.visible}):[],k=a.renderContainers.body?a.renderContainers.body.visibleColumnCache.filter(function(a){return a.visible}):[],l=a.renderContainers.right?a.renderContainers.right.visibleColumnCache.filter(function(a){return a.visible}):[];h=j.concat(k,l)}return g.forEach(function(c,d){if(c.exporterEnableExporting!==!1){var g=[];h.forEach(function(d,h){if((d.visible||e===b.ALL)&&d.colDef.exporterSuppressExport!==!0&&-1===a.options.exporterSuppressColumns.indexOf(d.name)){var i=f?a.getCellDisplayValue(c,d):a.getCellValue(c,d),j={value:a.options.exporterFieldCallback(a,c,d,i)};d.colDef.exporterPdfAlign&&(j.alignment=d.colDef.exporterPdfAlign),g.push(j)}}),i.push(g)}}),i},formatAsCsv:function(a,b,c){var d=this,e=a.map(function(a){return{value:a.displayName}}),f=e.length>0?d.formatRowAsCsv(this,c)(e)+"\n":"";return f+=b.map(this.formatRowAsCsv(this,c)).join("\n")},formatRowAsCsv:function(a,b){return function(c){return c.map(a.formatFieldAsCsv).join(b)}},formatFieldAsCsv:function(a){return null==a.value?"":"number"==typeof a.value?a.value:"boolean"==typeof a.value?a.value?"TRUE":"FALSE":"string"==typeof a.value?'"'+a.value.replace(/"/g,'""')+'"':JSON.stringify(a.value)},isIE:function(){var a=navigator.userAgent.search(/(?:Edge|MSIE|Trident\/.*; rv:)/),b=!1;return-1!==a&&(b=!0),b},downloadFile:function(a,b,c){var d,e,f=document,g=f.createElement("a"),h="application/octet-stream;charset=utf-8";if(e=this.isIE(),e&&10>e){var i=f.createElement("iframe");return document.body.appendChild(i),i.contentWindow.document.open("text/html","replace"),i.contentWindow.document.write("sep=,\r\n"+b),i.contentWindow.document.close(),i.contentWindow.focus(),i.contentWindow.document.execCommand("SaveAs",!0,a),document.body.removeChild(i),!0}if(navigator.msSaveBlob)return navigator.msSaveOrOpenBlob(new Blob([c?"\ufeff":"",b],{type:h}),a);if("download"in g){var j=new Blob([c?"\ufeff":"",b],{type:h});d=URL.createObjectURL(j),g.setAttribute("download",a)}else d="data:"+h+","+encodeURIComponent(b),g.setAttribute("target","_blank");g.href=d,g.setAttribute("style","display:none;"),f.body.appendChild(g),setTimeout(function(){if(g.click)g.click();else if(document.createEvent){var a=document.createEvent("MouseEvents");a.initEvent("click",!0,!0),g.dispatchEvent(a)}f.body.removeChild(g)},this.delay)},pdfExport:function(a,b,c){var d=this;this.loadAllDataIfNeeded(a,b,c).then(function(){var e=d.getColumnHeaders(a,c),f=d.getData(a,b,c),g=d.prepareAsPdf(a,e,f);d.isIE()||-1!==navigator.appVersion.indexOf("Edge")?d.downloadPDF(a.options.exporterPdfFilename,g):pdfMake.createPdf(g).open()})},downloadPDF:function(a,b){var c,d=document;d.createElement("a");c=this.isIE();var e,f=pdfMake.createPdf(b);f.getBuffer(function(b){if(e=new Blob([b]),navigator.msSaveBlob)return navigator.msSaveBlob(e,a);if(c){var f=d.createElement("iframe");return document.body.appendChild(f),f.contentWindow.document.open("text/html","replace"),f.contentWindow.document.write(e),f.contentWindow.document.close(),f.contentWindow.focus(),f.contentWindow.document.execCommand("SaveAs",!0,a),document.body.removeChild(f),!0}})},prepareAsPdf:function(a,b,c){var d=this.calculatePdfHeaderWidths(a,b),e=b.map(function(a){return{text:a.displayName,style:"tableHeader"}}),f=c.map(this.formatRowAsPdf(this)),g=[e].concat(f),h={pageOrientation:a.options.exporterPdfOrientation,pageSize:a.options.exporterPdfPageSize,content:[{style:"tableStyle",table:{headerRows:1,widths:d,body:g}}],styles:{tableStyle:a.options.exporterPdfTableStyle,tableHeader:a.options.exporterPdfTableHeaderStyle},defaultStyle:a.options.exporterPdfDefaultStyle};return a.options.exporterPdfLayout&&(h.layout=a.options.exporterPdfLayout),a.options.exporterPdfHeader&&(h.header=a.options.exporterPdfHeader),a.options.exporterPdfFooter&&(h.footer=a.options.exporterPdfFooter),a.options.exporterPdfCustomFormatter&&(h=a.options.exporterPdfCustomFormatter(h)),h},calculatePdfHeaderWidths:function(a,b){var c=0;b.forEach(function(a){"number"==typeof a.width&&(c+=a.width)});var d=0;b.forEach(function(a){if("*"===a.width&&(d+=100),"string"==typeof a.width&&a.width.match(/(\d)*%/)){var b=parseInt(a.width.match(/(\d)*%/)[0]);a.width=c*b/100,d+=a.width}});var e=c+d;return b.map(function(b){return"*"===b.width?b.width:b.width*a.options.exporterPdfMaxGridWidth/e})},formatRowAsPdf:function(a){return function(b){return b.map(a.formatFieldAsPdfString)}},formatFieldAsPdfString:function(a){var b;return b=null==a.value?"":"number"==typeof a.value?a.value.toString():"boolean"==typeof a.value?a.value?"TRUE":"FALSE":"string"==typeof a.value?a.value.replace(/"/g,'""'):JSON.stringify(a.value).replace(/^"/,"").replace(/"$/,""),a.alignment&&"string"==typeof a.alignment&&(b={text:b,alignment:a.alignment}),b}};return g}]),a.directive("uiGridExporter",["uiGridExporterConstants","uiGridExporterService","gridUtil","$compile",function(a,b,c,d){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,link:function(a,c,d,e){b.initializeGrid(e.grid),e.grid.exporter.$scope=a}}}])}(),function(){"use strict";var a=angular.module("ui.grid.grouping",["ui.grid","ui.grid.treeBase"]);a.constant("uiGridGroupingConstants",{featureName:"grouping",rowHeaderColName:"treeBaseRowHeaderCol",EXPANDED:"expanded",COLLAPSED:"collapsed",aggregation:{COUNT:"count",SUM:"sum",MAX:"max",MIN:"min",AVG:"avg"}}),a.service("uiGridGroupingService",["$q","uiGridGroupingConstants","gridUtil","rowSorter","GridRow","gridClassFactory","i18nService","uiGridConstants","uiGridTreeBaseService",function(a,b,c,d,e,f,g,h,i){var j={initializeGrid:function(a,b){i.initializeGrid(a,b),a.grouping={},a.grouping.groupHeaderCache={},j.defaultGridOptions(a.options),a.registerRowsProcessor(j.groupRows,400),a.registerColumnBuilder(j.groupingColumnBuilder),a.registerColumnsProcessor(j.groupingColumnProcessor,400);var c={events:{grouping:{aggregationChanged:{},groupingChanged:{}}},methods:{grouping:{getGrouping:function(b){var c=j.getGrouping(a);return c.grouping.forEach(function(a){a.colName=a.col.name,delete a.col}),c.aggregations.forEach(function(a){a.colName=a.col.name,delete a.col}),c.aggregations=c.aggregations.filter(function(a){return!a.aggregation.source||"grouping"!==a.aggregation.source}),b&&(c.rowExpandedStates=j.getRowExpandedStates(a.grouping.groupingHeaderCache)),c},setGrouping:function(b){j.setGrouping(a,b)},groupColumn:function(b){var c=a.getColumn(b);j.groupColumn(a,c)},ungroupColumn:function(b){var c=a.getColumn(b);j.ungroupColumn(a,c)},clearGrouping:function(){j.clearGrouping(a)},aggregateColumn:function(b,c,d){var e=a.getColumn(b);j.aggregateColumn(a,e,c,d)}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods),a.api.core.on.sortChanged(b,j.tidyPriorities)},defaultGridOptions:function(a){a.enableGrouping=a.enableGrouping!==!1,a.groupingShowCounts=a.groupingShowCounts!==!1,a.groupingNullLabel="undefined"==typeof a.groupingNullLabel?"Null":a.groupingNullLabel,a.enableGroupHeaderSelection=a.enableGroupHeaderSelection===!0},groupingColumnBuilder:function(a,d,e){if(a.enableGrouping!==!1){"undefined"==typeof d.grouping&&"undefined"!=typeof a.grouping?(d.grouping=angular.copy(a.grouping),"undefined"!=typeof d.grouping.groupPriority&&d.grouping.groupPriority>-1&&(d.treeAggregationFn=i.nativeAggregations()[b.aggregation.COUNT].aggregationFn,d.treeAggregationFinalizerFn=j.groupedFinalizerFn)):"undefined"==typeof d.grouping&&(d.grouping={}),"undefined"!=typeof d.grouping&&"undefined"!=typeof d.grouping.groupPriority&&d.grouping.groupPriority>=0&&(d.suppressRemoveSort=!0);var f={name:"ui.grid.grouping.group",title:g.get().grouping.group,icon:"ui-grid-icon-indent-right",shown:function(){return"undefined"==typeof this.context.col.grouping||"undefined"==typeof this.context.col.grouping.groupPriority||this.context.col.grouping.groupPriority<0},action:function(){j.groupColumn(this.context.col.grid,this.context.col)}},h={name:"ui.grid.grouping.ungroup",title:g.get().grouping.ungroup,icon:"ui-grid-icon-indent-left",shown:function(){return"undefined"!=typeof this.context.col.grouping&&"undefined"!=typeof this.context.col.grouping.groupPriority&&this.context.col.grouping.groupPriority>=0},action:function(){j.ungroupColumn(this.context.col.grid,this.context.col)}},k={name:"ui.grid.grouping.aggregateRemove",title:g.get().grouping.aggregate_remove,shown:function(){return"undefined"!=typeof this.context.col.treeAggregationFn},action:function(){j.aggregateColumn(this.context.col.grid,this.context.col,null)}},l=function(a,b){b=b||g.get().grouping["aggregate_"+a]||a;var e={name:"ui.grid.grouping.aggregate"+a,title:b,shown:function(){return"undefined"==typeof this.context.col.treeAggregation||"undefined"==typeof this.context.col.treeAggregation.type||this.context.col.treeAggregation.type!==a},action:function(){j.aggregateColumn(this.context.col.grid,this.context.col,a)}};c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.aggregate"+a)||d.menuItems.push(e)};d.colDef.groupingShowGroupingMenu!==!1&&(c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.group")||d.menuItems.push(f),c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.ungroup")||d.menuItems.push(h)),d.colDef.groupingShowAggregationMenu!==!1&&(angular.forEach(i.nativeAggregations(),function(a,b){l(b)}),angular.forEach(e.treeCustomAggregations,function(a,b){l(b,a.menuTitle)}),c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.aggregateRemove")||d.menuItems.push(k))}},groupingColumnProcessor:function(a,b){return a=j.moveGroupColumns(this,a,b)},groupedFinalizerFn:function(a){var b=this;"undefined"!=typeof a.groupVal?(a.rendered=a.groupVal,b.grid.options.groupingShowCounts&&"date"!==b.colDef.type&&(a.rendered+=" ("+a.value+")")):a.rendered=null},moveGroupColumns:function(a,b,c){return a.options.moveGroupColumns===!1?b:(b.forEach(function(a,b){a.groupingPosition=b}),b.sort(function(a,b){var c,d;return c=a.isRowHeader?-1e3:"undefined"==typeof a.grouping||"undefined"==typeof a.grouping.groupPriority||a.grouping.groupPriority<0?null:a.grouping.groupPriority,d=b.isRowHeader?-1e3:"undefined"==typeof b.grouping||"undefined"==typeof b.grouping.groupPriority||b.grouping.groupPriority<0?null:b.grouping.groupPriority,null!==c&&null===d?-1:null!==d&&null===c?1:null!==c&&null!==d?c-d:a.groupingPosition-b.groupingPosition}),b.forEach(function(a,b){delete a.groupingPosition}),b)},groupColumn:function(a,c){"undefined"==typeof c.grouping&&(c.grouping={});var d=j.getGrouping(a); -c.grouping.groupPriority=d.grouping.length,c.sort?"undefined"!=typeof c.sort.direction&&null!==c.sort.direction||(c.sort.direction=h.ASC):c.sort={direction:h.ASC},c.treeAggregation={type:b.aggregation.COUNT,source:"grouping"},c.treeAggregationFn=i.nativeAggregations()[b.aggregation.COUNT].aggregationFn,c.treeAggregationFinalizerFn=j.groupedFinalizerFn,a.api.grouping.raise.groupingChanged(c),a.api.core.raise.sortChanged(a,a.getColumnSorting()),a.queueGridRefresh()},ungroupColumn:function(a,b){"undefined"!=typeof b.grouping&&(delete b.grouping.groupPriority,delete b.treeAggregation,delete b.customTreeAggregationFinalizer,j.tidyPriorities(a),a.api.grouping.raise.groupingChanged(b),a.queueGridRefresh())},aggregateColumn:function(a,b,c){"undefined"!=typeof b.grouping&&"undefined"!=typeof b.grouping.groupPriority&&b.grouping.groupPriority>=0&&j.ungroupColumn(a,b);var d={};"undefined"!=typeof a.options.treeCustomAggregations[c]?d=a.options.treeCustomAggregations[c]:"undefined"!=typeof i.nativeAggregations()[c]&&(d=i.nativeAggregations()[c]),b.treeAggregation={type:c,label:g.get().aggregation[d.label]||d.label},b.treeAggregationFn=d.aggregationFn,b.treeAggregationFinalizerFn=d.finalizerFn,a.api.grouping.raise.aggregationChanged(b),a.queueGridRefresh()},setGrouping:function(a,b){"undefined"!=typeof b&&(j.clearGrouping(a),b.grouping&&b.grouping.length&&b.grouping.length>0&&b.grouping.forEach(function(b){var c=a.getColumn(b.colName);c&&j.groupColumn(a,c)}),b.aggregations&&b.aggregations.length&&b.aggregations.forEach(function(b){var c=a.getColumn(b.colName);c&&j.aggregateColumn(a,c,b.aggregation.type)}),b.rowExpandedStates&&j.applyRowExpandedStates(a.grouping.groupingHeaderCache,b.rowExpandedStates))},clearGrouping:function(a){var b=j.getGrouping(a);b.grouping.length>0&&b.grouping.forEach(function(b){b.col||(b.col=a.getColumn(b.colName)),j.ungroupColumn(a,b.col)}),b.aggregations.length>0&&b.aggregations.forEach(function(b){b.col||(b.col=a.getColumn(b.colName)),j.aggregateColumn(a,b.col,null)})},tidyPriorities:function(a){"undefined"!=typeof a&&"undefined"==typeof a.grid||"undefined"==typeof this.grid||(a=this.grid);var b=[],c=[];a.columns.forEach(function(a,d){"undefined"!=typeof a.grouping&&"undefined"!=typeof a.grouping.groupPriority&&a.grouping.groupPriority>=0?b.push(a):"undefined"!=typeof a.sort&&"undefined"!=typeof a.sort.priority&&a.sort.priority>=0&&c.push(a)}),b.sort(function(a,b){return a.grouping.groupPriority-b.grouping.groupPriority}),b.forEach(function(a,b){a.grouping.groupPriority=b,a.suppressRemoveSort=!0,"undefined"==typeof a.sort&&(a.sort={}),a.sort.priority=b});var d=b.length;c.sort(function(a,b){return a.sort.priority-b.sort.priority}),c.forEach(function(a,b){a.sort.priority=d,a.suppressRemoveSort=a.colDef.suppressRemoveSort,d++})},groupRows:function(a){if(0===a.length)return a;var b=this;b.grouping.oldGroupingHeaderCache=b.grouping.groupingHeaderCache||{},b.grouping.groupingHeaderCache={};for(var c=j.initialiseProcessingState(b),e=function(e,h){var i=b.getCellValue(g,e.col);e.initialised&&0===d.getSortFn(b,e.col,a)(i,e.currentValue)||(j.insertGroupHeader(b,a,f,c,h),f++)},f=0;f=0&&b.push({field:a.field,col:a,groupPriority:a.grouping.groupPriority,grouping:a.grouping}),a.treeAggregation&&a.treeAggregation.type&&c.push({field:a.field,col:a,aggregation:a.treeAggregation})}),b.sort(function(a,b){return a.groupPriority-b.groupPriority}),b.forEach(function(a,b){a.grouping.groupPriority=b,a.groupPriority=b,delete a.grouping}),{grouping:b,aggregations:c}},insertGroupHeader:function(a,b,c,d,g){var h=(d[g].fieldName,d[g].col),i=a.getCellValue(b[c],h),k=i;"undefined"!=typeof i&&null!==i||(k=a.options.groupingNullLabel);for(var l=function(a){return angular.isObject(a)?JSON.stringify(a):a},m=a.grouping.oldGroupingHeaderCache,n=0;g>n;n++)m&&m[l(d[n].currentValue)]&&(m=m[l(d[n].currentValue)].children);var o;for(m&&m[l(i)]?(o=m[l(i)].row,o.entity={}):(o=new e({},null,a),f.rowTemplateAssigner.call(a,o)),o.entity["$$"+d[g].col.uid]={groupVal:k},o.treeLevel=g,o.groupHeader=!0,o.internalRow=!0,o.enableCellEdit=!1,o.enableSelection=a.options.enableGroupHeaderSelection,d[g].initialised=!0,d[g].currentValue=i,d[g].currentRow=o,j.finaliseProcessingState(d,g+1),b.splice(c,0,o),m=a.grouping.groupingHeaderCache,n=0;g>n;n++)m=m[l(d[n].currentValue)].children;m[l(i)]={row:o,children:{}}},finaliseProcessingState:function(a,b){for(var c=b;c 1 or < 1 file choosers within the menu item, error, cannot continue"):h[0].addEventListener("change",g,!1)}}}])}(),function(){"use strict";var a=angular.module("ui.grid.infiniteScroll",["ui.grid"]);a.service("uiGridInfiniteScrollService",["gridUtil","$compile","$timeout","uiGridConstants","ScrollEvent","$q",function(a,b,c,d,e,f){var g={initializeGrid:function(a,b){if(g.defaultGridOptions(a.options),a.options.enableInfiniteScroll){a.infiniteScroll={dataLoading:!1},g.setScrollDirections(a,a.options.infiniteScrollUp,a.options.infiniteScrollDown),a.api.core.on.scrollEnd(b,g.handleScroll);var c={events:{infiniteScroll:{needLoadMoreData:function(a,b){},needLoadMoreDataTop:function(a,b){}}},methods:{infiniteScroll:{dataLoaded:function(b,c){g.setScrollDirections(a,b,c);var d=g.adjustScroll(a).then(function(){a.infiniteScroll.dataLoading=!1});return d},resetScroll:function(b,c){return g.setScrollDirections(a,b,c),g.adjustInfiniteScrollPosition(a,0)},saveScrollPercentage:function(){a.infiniteScroll.prevScrollTop=a.renderContainers.body.prevScrollTop,a.infiniteScroll.previousVisibleRows=a.getVisibleRowCount()},dataRemovedTop:function(b,c){g.dataRemovedTop(a,b,c)},dataRemovedBottom:function(b,c){g.dataRemovedBottom(a,b,c)},setScrollDirections:function(b,c){g.setScrollDirections(a,b,c)}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)}},defaultGridOptions:function(a){a.enableInfiniteScroll=a.enableInfiniteScroll!==!1,a.infiniteScrollRowsFromEnd=a.infiniteScrollRowsFromEnd||20,a.infiniteScrollUp=a.infiniteScrollUp===!0,a.infiniteScrollDown=a.infiniteScrollDown!==!1},setScrollDirections:function(a,b,c){a.infiniteScroll.scrollUp=b===!0,a.suppressParentScrollUp=b===!0,a.infiniteScroll.scrollDown=c!==!1,a.suppressParentScrollDown=c!==!1},handleScroll:function(a){if(!(a.grid.infiniteScroll&&a.grid.infiniteScroll.dataLoading||"ui.grid.adjustInfiniteScrollPosition"===a.source)&&a.y){var b,c=a.grid.options.infiniteScrollRowsFromEnd/a.grid.renderContainers.body.visibleRowCache.length;a.grid.scrollDirection===d.scrollDirection.UP?(b=a.y.percentage,c>=b&&g.loadData(a.grid)):a.grid.scrollDirection===d.scrollDirection.DOWN&&(b=1-a.y.percentage,c>=b&&g.loadData(a.grid))}},loadData:function(a){a.infiniteScroll.previousVisibleRows=a.renderContainers.body.visibleRowCache.length,a.infiniteScroll.direction=a.scrollDirection,delete a.infiniteScroll.prevScrollTop,a.scrollDirection===d.scrollDirection.UP&&a.infiniteScroll.scrollUp?(a.infiniteScroll.dataLoading=!0,a.api.infiniteScroll.raise.needLoadMoreDataTop()):a.scrollDirection===d.scrollDirection.DOWN&&a.infiniteScroll.scrollDown&&(a.infiniteScroll.dataLoading=!0,a.api.infiniteScroll.raise.needLoadMoreData())},adjustScroll:function(a){var b=f.defer();return c(function(){var e,f,h,i,j;e=a.getViewportHeight()+a.headerHeight-a.renderContainers.body.headerHeight-a.scrollbarHeight,f=a.options.rowHeight,void 0===a.infiniteScroll.direction&&g.adjustInfiniteScrollPosition(a,0),h=a.getVisibleRowCount();var k=f*h;a.infiniteScroll.scrollDown&&e>k&&a.api.infiniteScroll.raise.needLoadMoreData(),a.infiniteScroll.direction===d.scrollDirection.UP&&(i=a.infiniteScroll.prevScrollTop||0,j=i+(h-a.infiniteScroll.previousVisibleRows)*f,g.adjustInfiniteScrollPosition(a,j),c(function(){b.resolve()})),a.infiniteScroll.direction===d.scrollDirection.DOWN&&(j=a.infiniteScroll.prevScrollTop||a.infiniteScroll.previousVisibleRows*f-e,g.adjustInfiniteScrollPosition(a,j),c(function(){b.resolve()}))},0),b.promise},adjustInfiniteScrollPosition:function(a,b){var c=new e(a,null,null,"ui.grid.adjustInfiniteScrollPosition"),d=a.getVisibleRowCount(),f=a.getViewportHeight()+a.headerHeight-a.renderContainers.body.headerHeight-a.scrollbarHeight,g=a.options.rowHeight,h=d*g-f;0===b&&a.infiniteScroll.scrollUp?c.y={percentage:1/h}:c.y={percentage:b/h},a.scrollContainers("",c)},dataRemovedTop:function(a,b,c){var d,e,f,h;return g.setScrollDirections(a,b,c),d=a.renderContainers.body.visibleRowCache.length,e=a.infiniteScroll.prevScrollTop,h=a.options.rowHeight,f=e-(a.infiniteScroll.previousVisibleRows-d)*h,g.adjustInfiniteScrollPosition(a,f)},dataRemovedBottom:function(a,b,c){var d;return g.setScrollDirections(a,b,c),d=a.infiniteScroll.prevScrollTop,g.adjustInfiniteScrollPosition(a,d)}};return g}]),a.directive("uiGridInfiniteScroll",["uiGridInfiniteScrollService",function(a){return{priority:-200,scope:!1,require:"^uiGrid",compile:function(b,c,d){return{pre:function(b,c,d,e){a.initializeGrid(e.grid,b)},post:function(a,b,c){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.moveColumns",["ui.grid"]);a.service("uiGridMoveColumnService",["$q","$timeout","$log","ScrollEvent","uiGridConstants","gridUtil",function(a,b,c,d,e,f){var g={initializeGrid:function(a){var b=this;this.registerPublicApi(a),this.defaultGridOptions(a.options),a.moveColumns={orderCache:[]},a.registerColumnBuilder(b.movableColumnBuilder),a.registerDataChangeCallback(b.verifyColumnOrder,[e.dataChange.COLUMN])},registerPublicApi:function(a){var b=this,c={events:{colMovable:{columnPositionChanged:function(a,b,c){}}},methods:{colMovable:{moveColumn:function(c,d){var e=a.columns;if(!angular.isNumber(c)||!angular.isNumber(d))return void f.logError("MoveColumn: Please provide valid values for originalPosition and finalPosition");for(var g=0,h=0;h=e.length-g||d>=e.length-g)return void f.logError("MoveColumn: Invalid values for originalPosition, finalPosition");var i=function(a){for(var b=a,c=0;b>=c;c++)angular.isDefined(e[c])&&(angular.isDefined(e[c].colDef.visible)&&e[c].colDef.visible===!1||e[c].isRowHeader===!0)&&b++;return b};b.redrawColumnAtPosition(a,i(c),i(d))}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.enableColumnMoving=a.enableColumnMoving!==!1},movableColumnBuilder:function(b,c,d){var e=[];return b.enableColumnMoving=void 0===b.enableColumnMoving?d.enableColumnMoving:b.enableColumnMoving,a.all(e)},updateColumnCache:function(a){a.moveColumns.orderCache=a.getOnlyDataColumns()},verifyColumnOrder:function(a){var b,c=a.rowHeaderColumns.length;angular.forEach(a.moveColumns.orderCache,function(d,e){if(b=a.columns.indexOf(d),-1!==b&&b-c!==e){var f=a.columns.splice(b,1)[0];a.columns.splice(e+c,0,f)}})},redrawColumnAtPosition:function(a,c,d){if(c!==d){var f=a.columns,h=f[c];if(h.colDef.enableColumnMoving){if(c>d)for(var i=c;i>d;i--)f[i]=f[i-1];else if(d>c)for(var j=c;d>j;j++)f[j]=f[j+1];f[d]=h,g.updateColumnCache(a),a.queueGridRefresh(),b(function(){a.api.core.notifyDataChange(e.dataChange.COLUMN),a.api.colMovable.raise.columnPositionChanged(h.colDef,c,d)})}}}};return g}]),a.directive("uiGridMoveColumns",["uiGridMoveColumnService",function(a){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(b,c,d,e){a.initializeGrid(e.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridHeaderCell",["$q","gridUtil","uiGridMoveColumnService","$document","$log","uiGridConstants","ScrollEvent",function(a,b,c,d,e,f,g){return{priority:-10,require:"^uiGrid",compile:function(){return{post:function(a,b,e,f){if(a.col.colDef.enableColumnMoving){var h,i,j,k,l,m,n=angular.element(b[0].querySelectorAll(".ui-grid-cell-contents")),o=!1,p=!1,q=function(b){h=a.grid.element[0].getBoundingClientRect().left,a.grid.hasLeftContainer()&&(h+=a.grid.renderContainers.left.header[0].getBoundingClientRect().width),i=b.pageX,j=0,k=h+a.grid.getViewportWidth(),"mousedown"===b.type?(d.on("mousemove",r),d.on("mouseup",s)):"touchstart"===b.type&&(d.on("touchmove",r),d.on("touchend",s))},r=function(a){var b=a.pageX-i;0!==b&&(document.onselectstart=function(){return!1},p=!0,o?o&&(w(b),i=a.pageX):v())},s=function(b){if(document.onselectstart=null,l&&(l.remove(),o=!1),u(),t(),p){for(var d=a.grid.columns,e=0,f=0;fj){for(var g=0,h=e-1;h>=0;h--)if((angular.isUndefined(d[h].colDef.visible)||d[h].colDef.visible===!0)&&(g+=d[h].drawnWidth||d[h].width||d[h].colDef.width,g>Math.abs(j))){c.redrawColumnAtPosition(a.grid,e,h+1);break}g0){for(var i=0,k=e+1;kj)){c.redrawColumnAtPosition(a.grid,e,k-1);break}j>i&&c.redrawColumnAtPosition(a.grid,e,d.length-1)}}},t=function(){n.on("touchstart",q),n.on("mousedown",q)},u=function(){n.off("touchstart",q),n.off("mousedown",q),d.off("mousemove",r),d.off("touchmove",r),d.off("mouseup",s),d.off("touchend",s)};t();var v=function(){o=!0,l=b.clone(),b.parent().append(l),l.addClass("movingColumn");var c={};c.left=b[0].offsetLeft+"px";var d=a.grid.element[0].getBoundingClientRect().right,e=b[0].getBoundingClientRect().right;e>d&&(m=a.col.drawnWidth+(d-e),c.width=m+"px"),l.css(c)},w=function(b){for(var c=a.grid.columns,d=0,e=0;ei?i:k,(n>=h||b>0)&&(k>=o||0>b))l.css({visibility:"visible",left:l[0].offsetLeft+(k>i?b:k-n)+"px"});else if(d>Math.ceil(f.grid.gridWidth)){b*=8;var p=new g(a.col.grid,null,null,"uiGridHeaderCell.moveElement");p.x={pixels:b},p.grid.scrollContainers("",p)}for(var q=0,r=0;r0?a.options.paginationCurrentPage=Math.min(a.options.paginationCurrentPage+1,c.methods.pagination.getTotalPages()):a.options.paginationCurrentPage++)},previousPage:function(){a.options.enablePagination&&(a.options.paginationCurrentPage=Math.max(a.options.paginationCurrentPage-1,1))},seek:function(b){if(a.options.enablePagination){if(!angular.isNumber(b)||1>b)throw"Invalid page number: "+b;a.options.paginationCurrentPage=Math.min(b,c.methods.pagination.getTotalPages())}}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods);var d=function(b){if(a.options.useExternalPagination||!a.options.enablePagination)return b;var c=parseInt(a.options.paginationPageSize,10),d=parseInt(a.options.paginationCurrentPage,10),e=b.filter(function(a){return a.visible});a.options.totalItems=e.length;var f=(d-1)*c;return f>e.length&&(d=a.options.paginationCurrentPage=1,f=(d-1)*c),e.slice(f,f+c)};a.registerRowsProcessor(d,900)},defaultGridOptions:function(b){b.enablePagination=b.enablePagination!==!1,b.enablePaginationControls=b.enablePaginationControls!==!1,b.useExternalPagination=b.useExternalPagination===!0,a.isNullOrUndefined(b.totalItems)&&(b.totalItems=0),a.isNullOrUndefined(b.paginationPageSizes)&&(b.paginationPageSizes=[250,500,1e3]),a.isNullOrUndefined(b.paginationPageSize)&&(b.paginationPageSizes.length>0?b.paginationPageSize=b.paginationPageSizes[0]:b.paginationPageSize=0),a.isNullOrUndefined(b.paginationCurrentPage)&&(b.paginationCurrentPage=1),a.isNullOrUndefined(b.paginationTemplate)&&(b.paginationTemplate="ui-grid/pagination")},onPaginationChanged:function(a,b,c){a.api.pagination.raise.paginationChanged(b,c),a.options.useExternalPagination||a.queueGridRefresh()}};return b}]),a.directive("uiGridPagination",["gridUtil","uiGridPaginationService",function(a,b){return{priority:-200,scope:!1,require:"uiGrid",link:{pre:function(c,d,e,f){b.initializeGrid(f.grid),a.getTemplate(f.grid.options.paginationTemplate).then(function(a){var b=angular.element(a);d.append(b),f.innerCompile(b)})}}}}]),a.directive("uiGridPager",["uiGridPaginationService","uiGridConstants","gridUtil","i18nService",function(a,b,c,d){return{priority:-200,scope:!0,require:"^uiGrid",link:function(e,f,g,h){var i=".ui-grid-pager-control-input";e.aria=d.getSafeText("pagination.aria"),e.paginationApi=h.grid.api.pagination,e.sizesLabel=d.getSafeText("pagination.sizes"),e.totalItemsLabel=d.getSafeText("pagination.totalItems"),e.paginationOf=d.getSafeText("pagination.of"),e.paginationThrough=d.getSafeText("pagination.through");var j=h.grid.options;h.grid.renderContainers.body.registerViewportAdjuster(function(a){return a.height=a.height-c.elementHeight(f,"padding"),a});var k=h.grid.registerDataChangeCallback(function(a){a.options.useExternalPagination||(a.options.totalItems=a.rows.length)},[b.dataChange.ROW]);e.$on("$destroy",k);var l=function(){e.showingLow=(j.paginationCurrentPage-1)*j.paginationPageSize+1,e.showingHigh=Math.min(j.paginationCurrentPage*j.paginationPageSize,j.totalItems)},m=e.$watch("grid.options.totalItems + grid.options.paginationPageSize",l),n=e.$watch("grid.options.paginationCurrentPage + grid.options.paginationPageSize",function(b,c){if(b!==c&&void 0!==c){if(!angular.isNumber(j.paginationCurrentPage)||j.paginationCurrentPage<1)return void(j.paginationCurrentPage=1);if(j.totalItems>0&&j.paginationCurrentPage>e.paginationApi.getTotalPages())return void(j.paginationCurrentPage=e.paginationApi.getTotalPages());l(),a.onPaginationChanged(e.grid,j.paginationCurrentPage,j.paginationPageSize)}});e.$on("$destroy",function(){m(),n()}),e.cantPageForward=function(){return j.totalItems>0?j.paginationCurrentPage>=e.paginationApi.getTotalPages():j.data.length<1},e.cantPageToLast=function(){return j.totalItems>0?e.cantPageForward():!0},e.cantPageBackward=function(){return j.paginationCurrentPage<=1};var o=function(a){a&&c.focus.bySelector(f,i)};e.pageFirstPageClick=function(){e.paginationApi.seek(1),o(e.cantPageBackward())},e.pagePreviousPageClick=function(){e.paginationApi.previousPage(),o(e.cantPageBackward())},e.pageNextPageClick=function(){e.paginationApi.nextPage(),o(e.cantPageForward())},e.pageLastPageClick=function(){e.paginationApi.seek(e.paginationApi.getTotalPages()),o(e.cantPageToLast())}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.pinning",["ui.grid"]);a.constant("uiGridPinningConstants",{container:{LEFT:"left",RIGHT:"right",NONE:""}}),a.service("uiGridPinningService",["gridUtil","GridRenderContainer","i18nService","uiGridPinningConstants",function(a,b,c,d){var e={initializeGrid:function(a){e.defaultGridOptions(a.options),a.registerColumnBuilder(e.pinningColumnBuilder);var b={events:{pinning:{columnPinned:function(a,b){}}},methods:{pinning:{pinColumn:function(b,c){e.pinColumn(a,b,c)}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},defaultGridOptions:function(a){a.enablePinning=a.enablePinning!==!1},pinningColumnBuilder:function(b,f,g){if(b.enablePinning=void 0===b.enablePinning?g.enablePinning:b.enablePinning,b.pinnedLeft?(f.renderContainer="left",f.grid.createLeftContainer()):b.pinnedRight&&(f.renderContainer="right",f.grid.createRightContainer()),b.enablePinning){var h={name:"ui.grid.pinning.pinLeft",title:c.get().pinning.pinLeft,icon:"ui-grid-icon-left-open",shown:function(){return"undefined"==typeof this.context.col.renderContainer||!this.context.col.renderContainer||"left"!==this.context.col.renderContainer},action:function(){e.pinColumn(this.context.col.grid,this.context.col,d.container.LEFT)}},i={name:"ui.grid.pinning.pinRight",title:c.get().pinning.pinRight,icon:"ui-grid-icon-right-open",shown:function(){return"undefined"==typeof this.context.col.renderContainer||!this.context.col.renderContainer||"right"!==this.context.col.renderContainer},action:function(){e.pinColumn(this.context.col.grid,this.context.col,d.container.RIGHT)}},j={name:"ui.grid.pinning.unpin",title:c.get().pinning.unpin,icon:"ui-grid-icon-cancel",shown:function(){return"undefined"!=typeof this.context.col.renderContainer&&null!==this.context.col.renderContainer&&"body"!==this.context.col.renderContainer},action:function(){e.pinColumn(this.context.col.grid,this.context.col,d.container.UNPIN)}};a.arrayContainsObjectWithProperty(f.menuItems,"name","ui.grid.pinning.pinLeft")||f.menuItems.push(h),a.arrayContainsObjectWithProperty(f.menuItems,"name","ui.grid.pinning.pinRight")||f.menuItems.push(i),a.arrayContainsObjectWithProperty(f.menuItems,"name","ui.grid.pinning.unpin")||f.menuItems.push(j)}},pinColumn:function(a,b,c){c===d.container.NONE?b.renderContainer=null:(b.renderContainer=c,c===d.container.LEFT?a.createLeftContainer():c===d.container.RIGHT&&a.createRightContainer()),a.refresh().then(function(){a.api.pinning.raise.columnPinned(b.colDef,c)})}};return e}]),a.directive("uiGridPinning",["gridUtil","uiGridPinningService",function(a,b){return{require:"uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(e.grid)},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.resizeColumns",["ui.grid"]);a.service("uiGridResizeColumnsService",["gridUtil","$q","$timeout",function(a,b,c){var d={defaultGridOptions:function(a){a.enableColumnResizing=a.enableColumnResizing!==!1,a.enableColumnResize===!1&&(a.enableColumnResizing=!1)},colResizerColumnBuilder:function(a,c,d){var e=[];return a.enableColumnResizing=void 0===a.enableColumnResizing?d.enableColumnResizing:a.enableColumnResizing,a.enableColumnResize===!1&&(a.enableColumnResizing=!1),b.all(e)},registerPublicApi:function(a){var b={events:{colResizable:{columnSizeChanged:function(a,b){}}}};a.api.registerEventsFromObject(b.events)},fireColumnSizeChanged:function(b,d,e){c(function(){b.api.colResizable?b.api.colResizable.raise.columnSizeChanged(d,e):a.logError("The resizeable api is not registered, this may indicate that you've included the module but not added the 'ui-grid-resize-columns' directive to your grid definition. Cannot raise any events.")})},findTargetCol:function(a,b,c){var d=a.getRenderContainer();if("left"===b){var e=d.visibleColumnCache.indexOf(a);return d.visibleColumnCache[e-1*c]}return a}};return d}]),a.directive("uiGridResizeColumns",["gridUtil","uiGridResizeColumnsService",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.defaultGridOptions(e.grid.options),e.grid.registerColumnBuilder(b.colResizerColumnBuilder),b.registerPublicApi(e.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridHeaderCell",["gridUtil","$templateCache","$compile","$q","uiGridResizeColumnsService","uiGridConstants","$timeout",function(a,b,c,d,e,f,g){return{priority:-10,require:"^uiGrid",compile:function(){return{post:function(a,d,h,i){var j=i.grid;if(j.options.enableColumnResizing){var k=b.get("ui-grid/columnResizer"),l=1;j.isRTL()&&(a.position="left",l=-1);var m=function(){for(var b=d[0].getElementsByClassName("ui-grid-column-resizer"),f=0;f
            '),f={priority:0,scope:{col:"=",position:"@",renderIndex:"="},require:"?^uiGrid",link:function(f,g,h,i){function j(a){i.grid.refreshCanvas(!0).then(function(){i.grid.queueGridRefresh()})}function k(a,b){var c=b;return a.minWidth&&ca.maxWidth&&(c=a.maxWidth),c}function l(a,b){a.originalEvent&&(a=a.originalEvent),a.preventDefault(),o=(a.targetTouches?a.targetTouches[0]:a).clientX-p,0>o?o=0:o>i.grid.gridWidth&&(o=i.grid.gridWidth);var g=d.findTargetCol(f.col,f.position,q); -if(g.colDef.enableColumnResizing!==!1){i.grid.element.hasClass("column-resizing")||i.grid.element.addClass("column-resizing");var h=o-n,j=parseInt(g.drawnWidth+h*q,10);o+=(k(g,j)-j)*q,e.css({left:o+"px"}),i.fireEvent(c.events.ITEM_DRAGGING)}}function m(a,b){a.originalEvent&&(a=a.originalEvent),a.preventDefault(),i.grid.element.removeClass("column-resizing"),e.remove(),o=(a.changedTouches?a.changedTouches[0]:a).clientX-p;var c=o-n;if(0===c)return t(),void s();var g=d.findTargetCol(f.col,f.position,q);if(g.colDef.enableColumnResizing!==!1){var h=parseInt(g.drawnWidth+c*q,10);g.width=k(g,h),g.hasCustomWidth=!0,j(c),d.fireColumnSizeChanged(i.grid,g.colDef,c),t(),s()}}var n=0,o=0,p=0,q=1;i.grid.isRTL()&&(f.position="left",q=-1),"left"===f.position?g.addClass("left"):"right"===f.position&&g.addClass("right");var r=function(b,c){b.originalEvent&&(b=b.originalEvent),b.stopPropagation(),p=i.grid.element[0].getBoundingClientRect().left,n=(b.targetTouches?b.targetTouches[0]:b).clientX-p,i.grid.element.append(e),e.css({left:n}),"touchstart"===b.type?(a.on("touchend",m),a.on("touchmove",l),g.off("mousedown",r)):(a.on("mouseup",m),a.on("mousemove",l),g.off("touchstart",r))},s=function(){g.on("mousedown",r),g.on("touchstart",r)},t=function(){a.off("mouseup",m),a.off("touchend",m),a.off("mousemove",l),a.off("touchmove",l),g.off("mousedown",r),g.off("touchstart",r)};s();var u=function(a,e){a.stopPropagation();var h=d.findTargetCol(f.col,f.position,q);if(h.colDef.enableColumnResizing!==!1){var l=0,m=0,n=b.closestElm(g,".ui-grid-render-container"),o=n.querySelectorAll("."+c.COL_CLASS_PREFIX+h.uid+" .ui-grid-cell-contents");Array.prototype.forEach.call(o,function(a){var c;angular.element(a).parent().hasClass("ui-grid-header-cell")&&(c=angular.element(a).parent()[0].querySelectorAll(".ui-grid-column-menu-button")),b.fakeElement(a,{},function(a){var d=angular.element(a);d.attr("style","float: left");var e=b.elementWidth(d);if(c){var f=b.elementWidth(c);e+=f}e>l&&(l=e,m=l-e)})}),h.width=k(h,l),h.hasCustomWidth=!0,j(m),d.fireColumnSizeChanged(i.grid,h.colDef,m)}};g.on("dblclick",u),g.on("$destroy",function(){g.off("dblclick",u),t()})}};return f}])}(),function(){"use strict";var a=angular.module("ui.grid.rowEdit",["ui.grid","ui.grid.edit","ui.grid.cellNav"]);a.constant("uiGridRowEditConstants",{}),a.service("uiGridRowEditService",["$interval","$q","uiGridConstants","uiGridRowEditConstants","gridUtil",function(a,b,c,d,e){var f={initializeGrid:function(a,b){b.rowEdit={};var c={events:{rowEdit:{saveRow:function(a){}}},methods:{rowEdit:{setSavePromise:function(a,c){f.setSavePromise(b,a,c)},getDirtyRows:function(){return b.rowEdit.dirtyRows?b.rowEdit.dirtyRows:[]},getErrorRows:function(){return b.rowEdit.errorRows?b.rowEdit.errorRows:[]},flushDirtyRows:function(){return f.flushDirtyRows(b)},setRowsDirty:function(a){f.setRowsDirty(b,a)},setRowsClean:function(a){f.setRowsClean(b,a)}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods),b.api.core.on.renderingComplete(a,function(c){b.api.edit.on.afterCellEdit(a,f.endEditCell),b.api.edit.on.beginCellEdit(a,f.beginEditCell),b.api.edit.on.cancelCellEdit(a,f.cancelEditCell),b.api.cellNav&&b.api.cellNav.on.navigate(a,f.navigate)})},defaultGridOptions:function(a){},saveRow:function(a,b){var c=this;return function(){if(b.isSaving=!0,b.rowEditSavePromise)return b.rowEditSavePromise;var d=a.api.rowEdit.raise.saveRow(b.entity);return b.rowEditSavePromise?b.rowEditSavePromise.then(c.processSuccessPromise(a,b),c.processErrorPromise(a,b)):e.logError("A promise was not returned when saveRow event was raised, either nobody is listening to event, or event handler did not return a promise"),d}},setSavePromise:function(a,b,c){var d=a.getRow(b);d.rowEditSavePromise=c},processSuccessPromise:function(a,b){var c=this;return function(){delete b.isSaving,delete b.isDirty,delete b.isError,delete b.rowEditSaveTimer,delete b.rowEditSavePromise,c.removeRow(a.rowEdit.errorRows,b),c.removeRow(a.rowEdit.dirtyRows,b)}},processErrorPromise:function(a,b){return function(){delete b.isSaving,delete b.rowEditSaveTimer,delete b.rowEditSavePromise,b.isError=!0,a.rowEdit.errorRows||(a.rowEdit.errorRows=[]),f.isRowPresent(a.rowEdit.errorRows,b)||a.rowEdit.errorRows.push(b)}},removeRow:function(a,b){"undefined"!=typeof a&&null!==a&&a.forEach(function(c,d){c.uid===b.uid&&a.splice(d,1)})},isRowPresent:function(a,b){var c=!1;return a.forEach(function(a,d){a.uid===b.uid&&(c=!0)}),c},flushDirtyRows:function(a){var c=[];return a.api.rowEdit.getDirtyRows().forEach(function(b){f.saveRow(a,b)(),c.push(b.rowEditSavePromise)}),b.all(c)},endEditCell:function(a,b,c,d){var g=this.grid,h=g.getRow(a);return h?void((c!==d||h.isDirty)&&(g.rowEdit.dirtyRows||(g.rowEdit.dirtyRows=[]),h.isDirty||(h.isDirty=!0,g.rowEdit.dirtyRows.push(h)),delete h.isError,f.considerSetTimer(g,h))):void e.logError("Unable to find rowEntity in grid data, dirty flag cannot be set")},beginEditCell:function(a,b){var c=this.grid,d=c.getRow(a);return d?void f.cancelTimer(c,d):void e.logError("Unable to find rowEntity in grid data, timer cannot be cancelled")},cancelEditCell:function(a,b){var c=this.grid,d=c.getRow(a);return d?void f.considerSetTimer(c,d):void e.logError("Unable to find rowEntity in grid data, timer cannot be set")},navigate:function(a,b){var c=this.grid;a.row.rowEditSaveTimer&&f.cancelTimer(c,a.row),b&&b.row&&b.row!==a.row&&f.considerSetTimer(c,b.row)},considerSetTimer:function(b,c){if(f.cancelTimer(b,c),c.isDirty&&!c.isSaving&&-1!==b.options.rowEditWaitInterval){var d=b.options.rowEditWaitInterval?b.options.rowEditWaitInterval:2e3;c.rowEditSaveTimer=a(f.saveRow(b,c),d,1)}},cancelTimer:function(b,c){c.rowEditSaveTimer&&!c.isSaving&&(a.cancel(c.rowEditSaveTimer),delete c.rowEditSaveTimer)},setRowsDirty:function(a,b){var c;b.forEach(function(b,d){c=a.getRow(b),c?(a.rowEdit.dirtyRows||(a.rowEdit.dirtyRows=[]),c.isDirty||(c.isDirty=!0,a.rowEdit.dirtyRows.push(c)),delete c.isError,f.considerSetTimer(a,c)):e.logError("requested row not found in rowEdit.setRowsDirty, row was: "+b)})},setRowsClean:function(a,b){var c;b.forEach(function(b,d){c=a.getRow(b),c?(delete c.isDirty,f.removeRow(a.rowEdit.dirtyRows,c),f.cancelTimer(a,c),delete c.isError,f.removeRow(a.rowEdit.errorRows,c)):e.logError("requested row not found in rowEdit.setRowsClean, row was: "+b)})}};return f}]),a.directive("uiGridRowEdit",["gridUtil","uiGridRowEditService","uiGridEditConstants",function(a,b,c){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(a,e.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","gridUtil","$parse",function(a,b,c,d){return{priority:-200,scope:!1,compile:function(a,b){var c=angular.element(a.children().children()[0]),d=c.attr("ng-class"),e="";return e=d?d.slice(0,-1)+", 'ui-grid-row-dirty': row.isDirty, 'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}":"{'ui-grid-row-dirty': row.isDirty, 'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}",c.attr("ng-class",e),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.saveState",["ui.grid","ui.grid.selection","ui.grid.cellNav","ui.grid.grouping","ui.grid.pinning","ui.grid.treeView"]);a.constant("uiGridSaveStateConstants",{featureName:"saveState"}),a.service("uiGridSaveStateService",["$q","uiGridSaveStateConstants","gridUtil","$compile","$interval","uiGridConstants",function(a,b,c,d,e,f){var g={initializeGrid:function(a){a.saveState={},this.defaultGridOptions(a.options);var b={events:{saveState:{}},methods:{saveState:{save:function(){return g.save(a)},restore:function(b,c){g.restore(a,b,c)}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},defaultGridOptions:function(a){a.saveWidths=a.saveWidths!==!1,a.saveOrder=a.saveOrder!==!1,a.saveScroll=a.saveScroll===!0,a.saveFocus=a.saveScroll!==!0&&a.saveFocus!==!1,a.saveVisible=a.saveVisible!==!1,a.saveSort=a.saveSort!==!1,a.saveFilter=a.saveFilter!==!1,a.saveSelection=a.saveSelection!==!1,a.saveGrouping=a.saveGrouping!==!1,a.saveGroupingExpandedStates=a.saveGroupingExpandedStates===!0,a.savePinning=a.savePinning!==!1,a.saveTreeView=a.saveTreeView!==!1},save:function(a){var b={};return b.columns=g.saveColumns(a),b.scrollFocus=g.saveScrollFocus(a),b.selection=g.saveSelection(a),b.grouping=g.saveGrouping(a),b.treeView=g.saveTreeView(a),b},restore:function(a,b,c){c.columns&&g.restoreColumns(a,c.columns),c.scrollFocus&&g.restoreScrollFocus(a,b,c.scrollFocus),c.selection&&g.restoreSelection(a,c.selection),c.grouping&&g.restoreGrouping(a,c.grouping),c.treeView&&g.restoreTreeView(a,c.treeView),a.refresh()},saveColumns:function(a){var b=[];return a.getOnlyDataColumns().forEach(function(c){var d={};d.name=c.name,a.options.saveVisible&&(d.visible=c.visible),a.options.saveWidths&&(d.width=c.width),a.options.saveSort&&(d.sort=angular.copy(c.sort)),a.options.saveFilter&&(d.filters=[],c.filters.forEach(function(a){var b={};angular.forEach(a,function(a,c){"condition"!==c&&"$$hashKey"!==c&&"placeholder"!==c&&(b[c]=a)}),d.filters.push(b)})),a.api.pinning&&a.options.savePinning&&(d.pinned=c.renderContainer?c.renderContainer:""),b.push(d)}),b},saveScrollFocus:function(a){if(!a.api.cellNav)return{};var b={};if(a.options.saveFocus){b.focus=!0;var c=a.api.cellNav.getFocusedCell();null!==c&&(null!==c.col&&(b.colName=c.col.colDef.name),null!==c.row&&(b.rowVal=g.getRowVal(a,c.row)))}return(a.options.saveScroll||a.options.saveFocus&&!b.colName&&!b.rowVal)&&(b.focus=!1,a.renderContainers.body.prevRowScrollIndex&&(b.rowVal=g.getRowVal(a,a.renderContainers.body.visibleRowCache[a.renderContainers.body.prevRowScrollIndex])),a.renderContainers.body.prevColScrollIndex&&(b.colName=a.renderContainers.body.visibleColumnCache[a.renderContainers.body.prevColScrollIndex].name)),b},saveSelection:function(a){if(!a.api.selection||!a.options.saveSelection)return[];var b=a.api.selection.getSelectedGridRows().map(function(b){return g.getRowVal(a,b)});return b},saveGrouping:function(a){return a.api.grouping&&a.options.saveGrouping?a.api.grouping.getGrouping(a.options.saveGroupingExpandedStates):{}},saveTreeView:function(a){return a.api.treeView&&a.options.saveTreeView?a.api.treeView.getTreeView():{}},getRowVal:function(a,b){if(!b)return null;var c={};return a.options.saveRowIdentity?(c.identity=!0,c.row=a.options.saveRowIdentity(b.entity)):(c.identity=!1,c.row=a.renderContainers.body.visibleRowCache.indexOf(b)),c},restoreColumns:function(a,b){var c=!1;b.forEach(function(b,d){var e=a.getColumn(b.name);if(e&&!a.isRowHeaderColumn(e)){!a.options.saveVisible||e.visible===b.visible&&e.colDef.visible===b.visible||(e.visible=b.visible,e.colDef.visible=b.visible,a.api.core.raise.columnVisibilityChanged(e)),a.options.saveWidths&&(e.width=b.width),!a.options.saveSort||angular.equals(e.sort,b.sort)||void 0===e.sort&&angular.isEmpty(b.sort)||(e.sort=angular.copy(b.sort),c=!0),a.options.saveFilter&&!angular.equals(e.filters,b.filters)&&(b.filters.forEach(function(a,b){angular.extend(e.filters[b],a),"undefined"!=typeof a.term&&null!==a.term||delete e.filters[b].term}),a.api.core.raise.filterChanged()),a.api.pinning&&a.options.savePinning&&e.renderContainer!==b.pinned&&a.api.pinning.pinColumn(e,b.pinned);var f=a.getOnlyDataColumns().indexOf(e);if(-1!==f&&a.options.saveOrder&&f!==d){var g=a.columns.splice(f+a.rowHeaderColumns.length,1)[0];a.columns.splice(d+a.rowHeaderColumns.length,0,g)}}}),c&&a.api.core.raise.sortChanged(a,a.getColumnSorting())},restoreScrollFocus:function(a,b,c){if(a.api.cellNav){var d,e;if(c.colName){var f=a.options.columnDefs.filter(function(a){return a.name===c.colName});f.length>0&&(d=f[0])}c.rowVal&&c.rowVal.row&&(e=c.rowVal.identity?g.findRowByIdentity(a,c.rowVal):a.renderContainers.body.visibleRowCache[c.rowVal.row]);var h=e&&e.entity?e.entity:null;(d||h)&&(c.focus?a.api.cellNav.scrollToFocus(h,d):a.scrollTo(h,d))}},restoreSelection:function(a,b){a.api.selection&&(a.api.selection.clearSelectedRows(),b.forEach(function(b){if(b.identity){var c=g.findRowByIdentity(a,b);c&&a.api.selection.selectRow(c.entity)}else a.api.selection.selectRowByVisibleIndex(b.row)}))},restoreGrouping:function(a,b){a.api.grouping&&"undefined"!=typeof b&&null!==b&&!angular.equals(b,{})&&a.api.grouping.setGrouping(b)},restoreTreeView:function(a,b){a.api.treeView&&"undefined"!=typeof b&&null!==b&&!angular.equals(b,{})&&a.api.treeView.setTreeView(b)},findRowByIdentity:function(a,b){if(!a.options.saveRowIdentity)return null;var c=a.rows.filter(function(c){return a.options.saveRowIdentity(c.entity)===b.row});return c.length>0?c[0]:null}};return g}]),a.directive("uiGridSaveState",["uiGridSaveStateConstants","uiGridSaveStateService","gridUtil","$compile",function(a,b,c,d){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,link:function(a,c,d,e){b.initializeGrid(e.grid)}}}])}(),function(){"use strict";var a=angular.module("ui.grid.selection",["ui.grid"]);a.constant("uiGridSelectionConstants",{featureName:"selection",selectionRowHeaderColName:"selectionRowHeaderCol"}),angular.module("ui.grid").config(["$provide",function(a){a.decorator("GridRow",["$delegate",function(a){return a.prototype.setSelected=function(a){this.isSelected=a,a?this.grid.selection.selectedCount++:this.grid.selection.selectedCount--},a}])}]),a.service("uiGridSelectionService",["$q","$templateCache","uiGridSelectionConstants","gridUtil",function(a,b,c,d){var e={initializeGrid:function(a){a.selection={},a.selection.lastSelectedRow=null,a.selection.selectAll=!1,a.selection.selectedCount=0,e.defaultGridOptions(a.options);var b={events:{selection:{rowSelectionChanged:function(a,b,c){},rowSelectionChangedBatch:function(a,b,c){}}},methods:{selection:{toggleRowSelection:function(b,c){var d=a.getRow(b);null!==d&&e.toggleRowSelection(a,d,c,a.options.multiSelect,a.options.noUnselect)},selectRow:function(b,c){var d=a.getRow(b);null===d||d.isSelected||e.toggleRowSelection(a,d,c,a.options.multiSelect,a.options.noUnselect)},selectRowByVisibleIndex:function(b,c){var d=a.renderContainers.body.visibleRowCache[b];null===d||"undefined"==typeof d||d.isSelected||e.toggleRowSelection(a,d,c,a.options.multiSelect,a.options.noUnselect)},unSelectRow:function(b,c){var d=a.getRow(b);null!==d&&d.isSelected&&e.toggleRowSelection(a,d,c,a.options.multiSelect,a.options.noUnselect)},selectAllRows:function(b){if(a.options.multiSelect!==!1){var c=[];a.rows.forEach(function(d){d.isSelected||d.enableSelection===!1||(d.setSelected(!0),e.decideRaiseSelectionEvent(a,d,c,b))}),e.decideRaiseSelectionBatchEvent(a,c,b),a.selection.selectAll=!0}},selectAllVisibleRows:function(b){if(a.options.multiSelect!==!1){var c=[];a.rows.forEach(function(d){d.visible?d.isSelected||d.enableSelection===!1||(d.setSelected(!0),e.decideRaiseSelectionEvent(a,d,c,b)):d.isSelected&&(d.setSelected(!1),e.decideRaiseSelectionEvent(a,d,c,b))}),e.decideRaiseSelectionBatchEvent(a,c,b),a.selection.selectAll=!0}},clearSelectedRows:function(b){e.clearSelectedRows(a,b)},getSelectedRows:function(){return e.getSelectedRows(a).map(function(a){return a.entity})},getSelectedGridRows:function(){return e.getSelectedRows(a)},getSelectedCount:function(){return a.selection.selectedCount},setMultiSelect:function(b){a.options.multiSelect=b},setModifierKeysToMultiSelect:function(b){a.options.modifierKeysToMultiSelect=b},getSelectAllState:function(){return a.selection.selectAll}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},defaultGridOptions:function(a){a.enableRowSelection=a.enableRowSelection!==!1,a.multiSelect=a.multiSelect!==!1,a.noUnselect=a.noUnselect===!0,a.modifierKeysToMultiSelect=a.modifierKeysToMultiSelect===!0,a.enableRowHeaderSelection=a.enableRowHeaderSelection!==!1,"undefined"==typeof a.enableFullRowSelection&&(a.enableFullRowSelection=!a.enableRowHeaderSelection),a.enableSelectAll=a.enableSelectAll!==!1,a.enableSelectionBatchEvent=a.enableSelectionBatchEvent!==!1,a.selectionRowHeaderWidth=angular.isDefined(a.selectionRowHeaderWidth)?a.selectionRowHeaderWidth:30,a.enableFooterTotalSelected=a.enableFooterTotalSelected!==!1,a.isRowSelectable=angular.isDefined(a.isRowSelectable)?a.isRowSelectable:angular.noop},toggleRowSelection:function(a,b,c,d,f){var g=b.isSelected;if(b.enableSelection!==!1||g){var h;d||g?!d&&g&&(h=e.getSelectedRows(a),h.length>1&&(g=!1,e.clearSelectedRows(a,c))):e.clearSelectedRows(a,c),g&&f||(b.setSelected(!g),b.isSelected===!0&&(a.selection.lastSelectedRow=b),h=e.getSelectedRows(a),a.selection.selectAll=a.rows.length===h.length,a.api.selection.raise.rowSelectionChanged(b,c))}},shiftSelect:function(a,b,c,d){if(d){var f=e.getSelectedRows(a),g=f.length>0?a.renderContainers.body.visibleRowCache.indexOf(a.selection.lastSelectedRow):0,h=a.renderContainers.body.visibleRowCache.indexOf(b);if(g>h){var i=g;g=h,h=i}for(var j=[],k=g;h>=k;k++){var l=a.renderContainers.body.visibleRowCache[k];l&&(l.isSelected||l.enableSelection===!1||(l.setSelected(!0),a.selection.lastSelectedRow=l,e.decideRaiseSelectionEvent(a,l,j,c)))}e.decideRaiseSelectionBatchEvent(a,j,c)}},getSelectedRows:function(a){return a.rows.filter(function(a){return a.isSelected})},clearSelectedRows:function(a,b){var c=[];e.getSelectedRows(a).forEach(function(d){d.isSelected&&(d.setSelected(!1),e.decideRaiseSelectionEvent(a,d,c,b))}),e.decideRaiseSelectionBatchEvent(a,c,b),a.selection.selectAll=!1,a.selection.selectedCount=0},decideRaiseSelectionEvent:function(a,b,c,d){a.options.enableSelectionBatchEvent?c.push(b):a.api.selection.raise.rowSelectionChanged(b,d)},decideRaiseSelectionBatchEvent:function(a,b,c){b.length>0&&a.api.selection.raise.rowSelectionChangedBatch(b,c)}};return e}]),a.directive("uiGridSelection",["uiGridSelectionConstants","uiGridSelectionService","$templateCache","uiGridConstants",function(a,b,c,d){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(c,e,f,g){if(b.initializeGrid(g.grid),g.grid.options.enableRowHeaderSelection){var h={name:a.selectionRowHeaderColName,displayName:"",width:g.grid.options.selectionRowHeaderWidth,minWidth:10,cellTemplate:"ui-grid/selectionRowHeader",headerCellTemplate:"ui-grid/selectionHeaderCell",enableColumnResizing:!1,enableColumnMenu:!1,exporterSuppressExport:!0,allowCellFocus:!0};g.grid.addRowHeaderColumn(h)}var i=!1,j=function(a){return a.forEach(function(a){a.enableSelection=g.grid.options.isRowSelectable(a)}),a},k=function(){g.grid.options.isRowSelectable!==angular.noop&&i!==!0&&(g.grid.registerRowsProcessor(j,500),i=!0)};k();var l=g.grid.registerDataChangeCallback(k,[d.dataChange.OPTIONS]);c.$on("$destroy",l)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridSelectionRowHeaderButtons",["$templateCache","uiGridSelectionService","gridUtil",function(a,b,c){return{replace:!0,restrict:"E",template:a.get("ui-grid/selectionRowHeaderButtons"),scope:!0,require:"^uiGrid",link:function(a,d,e,f){function g(a,c){c.stopPropagation(),c.shiftKey?b.shiftSelect(i,a,c,i.options.multiSelect):c.ctrlKey||c.metaKey?b.toggleRowSelection(i,a,c,i.options.multiSelect,i.options.noUnselect):b.toggleRowSelection(i,a,c,i.options.multiSelect&&!i.options.modifierKeysToMultiSelect,i.options.noUnselect)}function h(a){(a.ctrlKey||a.shiftKey)&&(a.target.onselectstart=function(){return!1},window.setTimeout(function(){a.target.onselectstart=null},0))}var i=f.grid;a.selectButtonClick=g,"ie"===c.detectBrowser()&&d.on("mousedown",h)}}}]),a.directive("uiGridSelectionSelectAllButtons",["$templateCache","uiGridSelectionService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/selectionSelectAllButtons"),scope:!1,link:function(a,c,d,e){var f=a.col.grid;a.headerButtonClick=function(a,c){f.selection.selectAll?(b.clearSelectedRows(f,c),f.options.noUnselect&&f.api.selection.selectRowByVisibleIndex(0,c),f.selection.selectAll=!1):f.options.multiSelect&&(f.api.selection.selectAllVisibleRows(c),f.selection.selectAll=!0)}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","uiGridSelectionConstants","gridUtil","$parse","uiGridSelectionService",function(a,b,c,d,e,f){return{priority:-200,scope:!1,compile:function(a,b){var c=angular.element(a.children().children()[0]),d=c.attr("ng-class"),e="";return e=d?d.slice(0,-1)+",'ui-grid-row-selected': row.isSelected}":"{'ui-grid-row-selected': row.isSelected}",c.attr("ng-class",e),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}]),a.directive("uiGridCell",["$compile","uiGridConstants","uiGridSelectionConstants","gridUtil","$parse","uiGridSelectionService","$timeout",function(a,b,c,d,e,f,g){return{priority:-200,restrict:"A",require:"?^uiGrid",scope:!1,link:function(a,c,d,e){function h(){a.grid.options.enableRowSelection&&a.grid.options.enableFullRowSelection&&(c.addClass("ui-grid-disable-selection"),c.on("touchstart",m),c.on("touchend",n),c.on("click",l),a.registered=!0)}function i(){a.registered&&(c.removeClass("ui-grid-disable-selection"),c.off("touchstart",m),c.off("touchend",n),c.off("click",l),a.registered=!1)}var j=0,k=300;e.grid.api.cellNav&&e.grid.api.cellNav.on.viewPortKeyDown(a,function(b,c){null!==c&&c.row===a.row&&c.col===a.col&&32===b.keyCode&&"selectionRowHeaderCol"===a.col.colDef.name&&(f.toggleRowSelection(a.grid,a.row,b,a.grid.options.multiSelect&&!a.grid.options.modifierKeysToMultiSelect,a.grid.options.noUnselect),a.$apply())});var l=function(b){c.off("touchend",n),b.shiftKey?f.shiftSelect(a.grid,a.row,b,a.grid.options.multiSelect):b.ctrlKey||b.metaKey?f.toggleRowSelection(a.grid,a.row,b,a.grid.options.multiSelect,a.grid.options.noUnselect):f.toggleRowSelection(a.grid,a.row,b,a.grid.options.multiSelect&&!a.grid.options.modifierKeysToMultiSelect,a.grid.options.noUnselect),a.$apply(),g(function(){c.on("touchend",n)},k)},m=function(a){j=(new Date).getTime(),c.off("click",l)},n=function(a){var b=(new Date).getTime(),d=b-j;k>d&&l(a),g(function(){c.on("click",l)},k)};h();var o=a.grid.registerDataChangeCallback(function(){a.grid.options.enableRowSelection&&a.grid.options.enableFullRowSelection&&!a.registered?h():a.grid.options.enableRowSelection&&a.grid.options.enableFullRowSelection||!a.registered||i()},[b.dataChange.OPTIONS]);c.on("$destroy",o)}}}]),a.directive("uiGridGridFooter",["$compile","uiGridConstants","gridUtil",function(a,b,c){return{restrict:"EA",replace:!0,priority:-1e3,require:"^uiGrid",scope:!0,compile:function(b,d){return{pre:function(b,d,e,f){f.grid.options.showGridFooter&&c.getTemplate("ui-grid/gridFooterSelectedItems").then(function(c){var e=angular.element(c),f=a(e)(b);angular.element(d[0].getElementsByClassName("ui-grid-grid-footer")[0]).append(f)})},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.treeBase",["ui.grid"]);a.constant("uiGridTreeBaseConstants",{featureName:"treeBase",rowHeaderColName:"treeBaseRowHeaderCol",EXPANDED:"expanded",COLLAPSED:"collapsed",aggregation:{COUNT:"count",SUM:"sum",MAX:"max",MIN:"min",AVG:"avg"}}),a.service("uiGridTreeBaseService",["$q","uiGridTreeBaseConstants","gridUtil","GridRow","gridClassFactory","i18nService","uiGridConstants","rowSorter",function(a,b,c,d,e,f,g,h){var i={initializeGrid:function(a,b){a.treeBase={},a.treeBase.numberLevels=0,a.treeBase.expandAll=!1,a.treeBase.tree=[],i.defaultGridOptions(a.options),a.registerRowsProcessor(i.treeRows,410),a.registerColumnBuilder(i.treeBaseColumnBuilder),i.createRowHeader(a);var c={events:{treeBase:{rowExpanded:{},rowCollapsed:{}}},methods:{treeBase:{expandAllRows:function(){i.expandAllRows(a)},collapseAllRows:function(){i.collapseAllRows(a)},toggleRowTreeState:function(b){i.toggleRowTreeState(a,b)},expandRow:function(b){i.expandRow(a,b)},expandRowChildren:function(b){i.expandRowChildren(a,b)},collapseRow:function(b){i.collapseRow(a,b)},collapseRowChildren:function(b){i.collapseRowChildren(a,b)},getTreeExpandedState:function(){return{expandedState:i.getTreeState(a)}},setTreeState:function(b){i.setTreeState(a,b)},getRowChildren:function(a){return a.treeNode.children.map(function(a){return a.row})}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.treeRowHeaderBaseWidth=a.treeRowHeaderBaseWidth||30,a.treeIndent=a.treeIndent||10,a.showTreeRowHeader=a.showTreeRowHeader!==!1,a.showTreeExpandNoChildren=a.showTreeExpandNoChildren!==!1,a.treeRowHeaderAlwaysVisible=a.treeRowHeaderAlwaysVisible!==!1,a.treeCustomAggregations=a.treeCustomAggregations||{}},treeBaseColumnBuilder:function(a,b,c){"undefined"!=typeof a.customTreeAggregationFn&&(b.treeAggregationFn=a.customTreeAggregationFn),"undefined"!=typeof a.treeAggregationType&&(b.treeAggregation={type:a.treeAggregationType},"undefined"!=typeof c.treeCustomAggregations[a.treeAggregationType]?(b.treeAggregationFn=c.treeCustomAggregations[a.treeAggregationType].aggregationFn,b.treeAggregationFinalizerFn=c.treeCustomAggregations[a.treeAggregationType].finalizerFn,b.treeAggregation.label=c.treeCustomAggregations[a.treeAggregationType].label):"undefined"!=typeof i.nativeAggregations()[a.treeAggregationType]&&(b.treeAggregationFn=i.nativeAggregations()[a.treeAggregationType].aggregationFn,b.treeAggregation.label=i.nativeAggregations()[a.treeAggregationType].label)),"undefined"!=typeof a.treeAggregationLabel&&("undefined"==typeof b.treeAggregation&&(b.treeAggregation={}),b.treeAggregation.label=a.treeAggregationLabel),b.treeAggregationUpdateEntity=a.treeAggregationUpdateEntity!==!1,"undefined"==typeof b.customTreeAggregationFinalizerFn&&(b.customTreeAggregationFinalizerFn=a.customTreeAggregationFinalizerFn)},createRowHeader:function(a){var c={name:b.rowHeaderColName,displayName:"",width:a.options.treeRowHeaderBaseWidth,minWidth:10,cellTemplate:"ui-grid/treeBaseRowHeader",headerCellTemplate:"ui-grid/treeBaseHeaderCell",enableColumnResizing:!1,enableColumnMenu:!1,exporterSuppressExport:!0,allowCellFocus:!0};c.visible=a.options.treeRowHeaderAlwaysVisible,a.addRowHeaderColumn(c)},expandAllRows:function(a){a.treeBase.tree.forEach(function(c){i.setAllNodes(a,c,b.EXPANDED)}),a.treeBase.expandAll=!0,a.queueGridRefresh()},collapseAllRows:function(a){a.treeBase.tree.forEach(function(c){i.setAllNodes(a,c,b.COLLAPSED)}),a.treeBase.expandAll=!1,a.queueGridRefresh()},setAllNodes:function(a,c,d){"undefined"!=typeof c.state&&c.state!==d&&(c.state=d,d===b.EXPANDED?a.api.treeBase.raise.rowExpanded(c.row):a.api.treeBase.raise.rowCollapsed(c.row)),c.children&&c.children.forEach(function(b){i.setAllNodes(a,b,d)})},toggleRowTreeState:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||(c.treeNode.state===b.EXPANDED?i.collapseRow(a,c):i.expandRow(a,c),a.queueGridRefresh())},expandRow:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||c.treeNode.state!==b.EXPANDED&&(c.treeNode.state=b.EXPANDED,a.api.treeBase.raise.rowExpanded(c),a.treeBase.expandAll=i.allExpanded(a.treeBase.tree),a.queueGridRefresh())},expandRowChildren:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||(i.setAllNodes(a,c.treeNode,b.EXPANDED),a.treeBase.expandAll=i.allExpanded(a.treeBase.tree),a.queueGridRefresh())},collapseRow:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||c.treeNode.state!==b.COLLAPSED&&(c.treeNode.state=b.COLLAPSED,a.treeBase.expandAll=!1,a.api.treeBase.raise.rowCollapsed(c),a.queueGridRefresh())},collapseRowChildren:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||(i.setAllNodes(a,c.treeNode,b.COLLAPSED),a.treeBase.expandAll=!1,a.queueGridRefresh())},allExpanded:function(a){var b=!0;return a.forEach(function(a){i.allExpandedInternal(a)||(b=!1)}),b},allExpandedInternal:function(a){if(a.children&&a.children.length>0){if(a.state===b.COLLAPSED)return!1;var c=!0;return a.children.forEach(function(a){i.allExpandedInternal(a)||(c=!1)}),c}return!0},treeRows:function(a){if(0===a.length)return a;var c=this;b.EXPANDED;return c.treeBase.tree=i.createTree(c,a),i.updateRowHeaderWidth(c),i.sortTree(c),i.fixFilter(c),i.renderTree(c.treeBase.tree)},updateRowHeaderWidth:function(a){var c=a.getColumn(b.rowHeaderColName),d=a.options.treeRowHeaderBaseWidth+a.options.treeIndent*Math.max(a.treeBase.numberLevels-1,0);c&&d!==c.width&&(c.width=d,a.queueRefresh());var e=!0;a.options.showTreeRowHeader===!1&&(e=!1),a.options.treeRowHeaderAlwaysVisible===!1&&a.treeBase.numberLevels<=0&&(e=!1),c.visible!==e&&(c.visible=e,c.colDef.visible=e,a.queueGridRefresh())},renderTree:function(a){var c=[];return a.forEach(function(a){a.row.visible&&c.push(a.row),a.state===b.EXPANDED&&a.children&&a.children.length>0&&(c=c.concat(i.renderTree(a.children)))}),c},createTree:function(a,c){var d,e=-1,f=[];a.treeBase.tree=[],a.treeBase.numberLevels=0;var g=i.getAggregations(a),h=function(c){if("undefined"!=typeof c.entity.$$treeLevel&&c.treeLevel!==c.entity.$$treeLevel&&(c.treeLevel=c.entity.$$treeLevel),c.treeLevel<=e){for(;c.treeLevel<=e;){var h=f.pop();i.finaliseAggregations(h),e--}d=f.length>0?i.setCurrentState(f):b.EXPANDED}("undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0)&&c.visible&&i.aggregate(a,c,f),i.addOrUseNode(a,c,f,g),"undefined"!=typeof c.treeLevel&&null!==c.treeLevel&&c.treeLevel>=0&&(f.push(c),e++,d=i.setCurrentState(f)),a.treeBase.numberLevels0;){var j=f.pop();i.finaliseAggregations(j)}return a.treeBase.tree},addOrUseNode:function(a,c,d,e){var f=[];e.forEach(function(a){f.push(i.buildAggregationObject(a.col))});var g={state:b.COLLAPSED,row:c,parentRow:null,aggregations:f,children:[]};c.treeNode&&(g.state=c.treeNode.state),d.length>0&&(g.parentRow=d[d.length-1]),c.treeNode=g,0===d.length?a.treeBase.tree.push(g):d[d.length-1].treeNode.children.push(g)},setCurrentState:function(a){var c=b.EXPANDED;return a.forEach(function(a){a.treeNode.state===b.COLLAPSED&&(c=b.COLLAPSED)}),c},sortTree:function(a){a.columns.forEach(function(a){a.sort&&a.sort.ignoreSort&&delete a.sort.ignoreSort}),a.treeBase.tree=i.sortInternal(a,a.treeBase.tree)},sortInternal:function(a,c){var d=c.map(function(a){return a.row});d=h.sort(a,d,a.columns);var e=d.map(function(a){return a.treeNode});return e.forEach(function(c){c.state===b.EXPANDED&&c.children&&c.children.length>0&&(c.children=i.sortInternal(a,c.children))}),e},fixFilter:function(a){var b;a.treeBase.tree.forEach(function(a){a.children&&a.children.length>0&&(b=a.row.visible,i.fixFilterInternal(a.children,b))})},fixFilterInternal:function(a,b){return a.forEach(function(a){a.row.visible&&!b&&(i.setParentsVisible(a),b=!0),a.children&&a.children.length>0&&i.fixFilterInternal(a.children,b&&a.row.visible)&&(b=!0)}),b},setParentsVisible:function(a){for(;a.parentRow;)a.parentRow.visible=!0,a=a.parentRow.treeNode},buildAggregationObject:function(a){var b={col:a};return a.treeAggregation&&a.treeAggregation.type&&(b.type=a.treeAggregation.type),a.treeAggregation&&a.treeAggregation.label&&(b.label=a.treeAggregation.label),b},getAggregations:function(a){var b=[];return a.columns.forEach(function(c){"undefined"!=typeof c.treeAggregationFn&&(b.push(i.buildAggregationObject(c)),a.options.showColumnFooter&&"undefined"==typeof c.colDef.aggregationType&&c.treeAggregation&&(c.treeFooterAggregation=i.buildAggregationObject(c),c.aggregationType=i.treeFooterAggregationType))}),b},aggregate:function(a,b,c){0===c.length&&b.treeNode&&b.treeNode.aggregations&&b.treeNode.aggregations.forEach(function(c){if("undefined"!=typeof c.col.treeFooterAggregation){var d=a.getCellValue(b,c.col),e=Number(d);c.col.treeAggregationFn(c.col.treeFooterAggregation,d,e,b)}}),c.forEach(function(c,d){c.treeNode.aggregations&&c.treeNode.aggregations.forEach(function(c){var e=a.getCellValue(b,c.col),f=Number(e);c.col.treeAggregationFn(c,e,f,b),0===d&&"undefined"!=typeof c.col.treeFooterAggregation&&c.col.treeAggregationFn(c.col.treeFooterAggregation,e,f,b)})})},nativeAggregations:function(){var a={count:{label:f.get().aggregation.count, -menuTitle:f.get().grouping.aggregate_count,aggregationFn:function(a,b,c){"undefined"==typeof a.value?a.value=1:a.value++}},sum:{label:f.get().aggregation.sum,menuTitle:f.get().grouping.aggregate_sum,aggregationFn:function(a,b,c){isNaN(c)||("undefined"==typeof a.value?a.value=c:a.value+=c)}},min:{label:f.get().aggregation.min,menuTitle:f.get().grouping.aggregate_min,aggregationFn:function(a,b,c){"undefined"==typeof a.value?a.value=b:"undefined"!=typeof b&&null!==b&&(ba.value||null===a.value)&&(a.value=b)}},avg:{label:f.get().aggregation.avg,menuTitle:f.get().grouping.aggregate_avg,aggregationFn:function(a,b,c){"undefined"==typeof a.count?a.count=1:a.count++,isNaN(c)||("undefined"==typeof a.value||"undefined"==typeof a.sum?(a.value=c,a.sum=c):(a.sum+=c,a.value=a.sum/a.count))}}};return a},finaliseAggregation:function(a,b){b.col.treeAggregationUpdateEntity&&"undefined"!=typeof a&&"undefined"!=typeof a.entity["$$"+b.col.uid]&&angular.extend(b,a.entity["$$"+b.col.uid]),"function"==typeof b.col.treeAggregationFinalizerFn&&b.col.treeAggregationFinalizerFn(b),"function"==typeof b.col.customTreeAggregationFinalizerFn&&b.col.customTreeAggregationFinalizerFn(b),"undefined"==typeof b.rendered&&(b.rendered=b.label?b.label+b.value:b.value)},finaliseAggregations:function(a){"undefined"!=typeof a.treeNode.aggregations&&a.treeNode.aggregations.forEach(function(b){if(i.finaliseAggregation(a,b),b.col.treeAggregationUpdateEntity){var c={};angular.forEach(b,function(a,d){b.hasOwnProperty(d)&&"col"!==d&&(c[d]=a)}),a.entity["$$"+b.col.uid]=c}})},treeFooterAggregationType:function(a,b){return i.finaliseAggregation(void 0,b.treeFooterAggregation),"undefined"==typeof b.treeFooterAggregation.value||null===b.treeFooterAggregation.rendered?"":b.treeFooterAggregation.rendered}};return i}]),a.directive("uiGridTreeBaseRowHeaderButtons",["$templateCache","uiGridTreeBaseService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/treeBaseRowHeaderButtons"),scope:!0,require:"^uiGrid",link:function(a,c,d,e){var f=e.grid;a.treeButtonClick=function(a,c){b.toggleRowTreeState(f,a,c)}}}}]),a.directive("uiGridTreeBaseExpandAllButtons",["$templateCache","uiGridTreeBaseService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/treeBaseExpandAllButtons"),scope:!1,link:function(a,c,d,e){var f=a.col.grid;a.headerButtonClick=function(a,c){f.treeBase.expandAll?b.collapseAllRows(f,c):b.expandAllRows(f,c)}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","gridUtil","$parse",function(a,b,c,d){return{priority:-200,scope:!1,compile:function(a,b){var c=angular.element(a.children().children()[0]),d=c.attr("ng-class"),e="";return e=d?d.slice(0,-1)+",'ui-grid-tree-header-row': row.treeLevel > -1}":"{'ui-grid-tree-header-row': row.treeLevel > -1}",c.attr("ng-class",e),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.treeView",["ui.grid","ui.grid.treeBase"]);a.constant("uiGridTreeViewConstants",{featureName:"treeView",rowHeaderColName:"treeBaseRowHeaderCol",EXPANDED:"expanded",COLLAPSED:"collapsed",aggregation:{COUNT:"count",SUM:"sum",MAX:"max",MIN:"min",AVG:"avg"}}),a.service("uiGridTreeViewService",["$q","uiGridTreeViewConstants","uiGridTreeBaseConstants","uiGridTreeBaseService","gridUtil","GridRow","gridClassFactory","i18nService","uiGridConstants",function(a,b,c,d,e,f,g,h,i){var j={initializeGrid:function(a,b){d.initializeGrid(a,b),a.treeView={},a.registerRowsProcessor(j.adjustSorting,60);var c={events:{treeView:{}},methods:{treeView:{}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.enableTreeView=a.enableTreeView!==!1},adjustSorting:function(a){var b=this;return b.columns.forEach(function(a){a.sort&&(a.sort.ignoreSort=!0)}),a}};return j}]),a.directive("uiGridTreeView",["uiGridTreeViewConstants","uiGridTreeViewService","$templateCache",function(a,b,c){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){e.grid.options.enableTreeView!==!1&&b.initializeGrid(e.grid,a)},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.validate",["ui.grid"]);a.service("uiGridValidateService",["$sce","$q","$http","i18nService","uiGridConstants",function(a,b,c,d,e){var f={validatorFactories:{},setExternalFactoryFunction:function(a){f.externalFactoryFunction=a},clearExternalFactory:function(){delete f.externalFactoryFunction},getValidatorFromExternalFactory:function(a,b){return f.externalFactoryFunction(a,b).validatorFactory(b)},getMessageFromExternalFactory:function(a,b){return f.externalFactoryFunction(a,b).messageFunction(b)},setValidator:function(a,b,c){f.validatorFactories[a]={validatorFactory:b,messageFunction:c}},getValidator:function(a,b){if(f.externalFactoryFunction){var c=f.getValidatorFromExternalFactory(a,b);if(c)return c}if(!f.validatorFactories[a])throw"Invalid validator name: "+a;return f.validatorFactories[a].validatorFactory(b)},getMessage:function(a,b){if(f.externalFactoryFunction){var c=f.getMessageFromExternalFactory(a,b);if(c)return c}return f.validatorFactories[a].messageFunction(b)},isInvalid:function(a,b){return a["$$invalid"+b.name]},setInvalid:function(a,b){a["$$invalid"+b.name]=!0},setValid:function(a,b){delete a["$$invalid"+b.name]},setError:function(a,b,c){a["$$errors"+b.name]||(a["$$errors"+b.name]={}),a["$$errors"+b.name][c]=!0},clearError:function(a,b,c){a["$$errors"+b.name]&&c in a["$$errors"+b.name]&&delete a["$$errors"+b.name][c]},getErrorMessages:function(a,b){var c=[];return a["$$errors"+b.name]&&0!==Object.keys(a["$$errors"+b.name]).length?(Object.keys(a["$$errors"+b.name]).sort().forEach(function(a){c.push(f.getMessage(a,b.validators[a]))}),c):c},getFormattedErrors:function(b,c){var e="",g=f.getErrorMessages(b,c);return g.length?(g.forEach(function(a){e+=a+"
            "}),a.trustAsHtml("

            "+d.getSafeText("validate.error")+"

            "+e)):void 0},getTitleFormattedErrors:function(b,c){var e="\n",g="",h=f.getErrorMessages(b,c);return h.length?(h.forEach(function(a){g+=a+e}),a.trustAsHtml(d.getSafeText("validate.error")+e+g)):void 0},runValidators:function(a,c,d,e,g){if(d!==e){if("undefined"==typeof c.name||!c.name)throw new Error("colDef.name is required to perform validation");f.setValid(a,c);var h=function(a,b,c){return function(h){h||(f.setInvalid(a,b),f.setError(a,b,c),g&&g.api.validate.raise.validationFailed(a,b,d,e))}};for(var i in c.validators){f.clearError(a,c,i);var j=f.getValidator(i,c.validators[i]);b.when(j(e,d,a,c)).then(h(a,c,i))}}},createDefaultValidators:function(){f.setValidator("minLength",function(a){return function(b,c,d,e){return void 0===c||null===c||""===c?!0:c.length>=a}},function(a){return d.getSafeText("validate.minLength").replace("THRESHOLD",a)}),f.setValidator("maxLength",function(a){return function(b,c,d,e){return void 0===c||null===c||""===c?!0:c.length<=a}},function(a){return d.getSafeText("validate.maxLength").replace("THRESHOLD",a)}),f.setValidator("required",function(a){return function(b,c,d,e){return a?!(void 0===c||null===c||""===c):!0}},function(a){return d.getSafeText("validate.required")})},initializeGrid:function(a,b){b.validate={isInvalid:f.isInvalid,getFormattedErrors:f.getFormattedErrors,getTitleFormattedErrors:f.getTitleFormattedErrors,runValidators:f.runValidators};var c={events:{validate:{validationFailed:function(a,b,c,d){}}},methods:{validate:{isInvalid:function(a,c){return b.validate.isInvalid(a,c)},getErrorMessages:function(a,c){return b.validate.getErrorMessages(a,c)},getFormattedErrors:function(a,c){return b.validate.getFormattedErrors(a,c)},getTitleFormattedErrors:function(a,c){return b.validate.getTitleFormattedErrors(a,c)}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods),b.edit&&b.api.edit.on.afterCellEdit(a,function(a,c,d,e){b.validate.runValidators(a,c,d,e,b)}),f.createDefaultValidators()}};return f}]),a.directive("uiGridValidate",["gridUtil","uiGridValidateService",function(a,b){return{priority:0,replace:!0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(a,e.grid)},post:function(a,b,c,d){}}}}}])}(),angular.module("ui.grid").run(["$templateCache",function(a){"use strict";a.put("ui-grid/ui-grid-filter",'
             
             
            '),a.put("ui-grid/ui-grid-footer",''),a.put("ui-grid/ui-grid-grid-footer",''),a.put("ui-grid/ui-grid-group-panel",'
            • {{group.displayName}} x
            '),a.put("ui-grid/ui-grid-header",'
            '),a.put("ui-grid/ui-grid-menu-button",'
             
            '),a.put("ui-grid/ui-grid-no-header",'
            '),a.put("ui-grid/ui-grid-row","
            "),a.put("ui-grid/ui-grid",'
            '),a.put("ui-grid/uiGridCell",'
            {{COL_FIELD CUSTOM_FILTERS}}
            '),a.put("ui-grid/uiGridColumnMenu",'
            '),a.put("ui-grid/uiGridFooterCell",'
            {{ col.getAggregationText() + ( col.getAggregationValue() CUSTOM_FILTERS ) }}
            '),a.put("ui-grid/uiGridHeaderCell",'
            {{ col.displayName CUSTOM_FILTERS }} {{col.sort.priority}}
            '),a.put("ui-grid/uiGridMenu",'
            '),a.put("ui-grid/uiGridMenuItem",''),a.put("ui-grid/uiGridRenderContainer","
            "),a.put("ui-grid/uiGridViewport",'
            '),a.put("ui-grid/cellEditor",'
            '),a.put("ui-grid/dropdownEditor",'
            '),a.put("ui-grid/fileChooserEditor",'
            '),a.put("ui-grid/expandableRow",'
            '),a.put("ui-grid/expandableRowHeader",'
            '),a.put("ui-grid/expandableScrollFiller","
            "),a.put("ui-grid/expandableTopRowHeader",'
            '),a.put("ui-grid/csvLink",'LINK_LABEL'),a.put("ui-grid/importerMenuItem",'
          • '),a.put("ui-grid/importerMenuItemContainer","
            "),a.put("ui-grid/pagination",''),a.put("ui-grid/columnResizer",'
            '),a.put("ui-grid/gridFooterSelectedItems",'({{"search.selectedItems" | t}} {{grid.selection.selectedCount}})'),a.put("ui-grid/selectionHeaderCell",'
            '),a.put("ui-grid/selectionRowHeader",'
            '),a.put("ui-grid/selectionRowHeaderButtons",'
             
            '),a.put("ui-grid/selectionSelectAllButtons",'
            '),a.put("ui-grid/treeBaseExpandAllButtons",'
            '),a.put("ui-grid/treeBaseHeaderCell",'
            '),a.put("ui-grid/treeBaseRowHeader",'
            '),a.put("ui-grid/treeBaseRowHeaderButtons","
            -1 }\" ng-click=\"treeButtonClick(row, $event)\"> -1 ) || ( row.treeNode.children && row.treeNode.children.length > 0 ) ) && row.treeNode.state === 'expanded', 'ui-grid-icon-plus-squared': ( ( grid.options.showTreeExpandNoChildren && row.treeLevel > -1 ) || ( row.treeNode.children && row.treeNode.children.length > 0 ) ) && row.treeNode.state === 'collapsed'}\" ng-style=\"{'padding-left': grid.options.treeIndent * row.treeLevel + 'px'}\">  
            "),a.put("ui-grid/cellTitleValidator",'
            {{COL_FIELD CUSTOM_FILTERS}}
            '),a.put("ui-grid/cellTooltipValidator",'
            {{COL_FIELD CUSTOM_FILTERS}}
            ')}]),function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){(function(b){a.exports=b.pdfMake=c(1)}).call(b,function(){return this}())},function(a,b,c){(function(b){"use strict";function d(a,b,c){this.docDefinition=a,this.fonts=b||h,this.vfs=c}var e=c(6),f=c(105),g=f.saveAs,h={Roboto:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-Italic.ttf"}};d.prototype._createDoc=function(a,c){var d=new e(this.fonts);d.fs.bindFS(this.vfs);var f,g=d.createPdfKitDocument(this.docDefinition,a),h=[];g.on("data",function(a){h.push(a)}),g.on("end",function(){f=b.concat(h),c(f,g._pdfMakePages)}),g.end()},d.prototype._getPages=function(a,b){if(!b)throw"getBuffer is an async method and needs a callback argument";this._createDoc(a,function(a,c){b(c)})},d.prototype.open=function(a){var b=window.open("","_blank");try{this.getDataUrl(function(a){b.location.href=a})}catch(c){throw b.close(),c}},d.prototype.print=function(){this.getDataUrl(function(a){var b=document.createElement("iframe");b.style.position="absolute",b.style.left="-99999px",b.src=a,b.onload=function(){function a(){document.body.removeChild(b),document.removeEventListener("click",a)}document.addEventListener("click",a,!1)},document.body.appendChild(b)},{autoPrint:!0})},d.prototype.download=function(a,b){"function"==typeof a&&(b=a,a=null),a=a||"file.pdf",this.getBuffer(function(c){var d;try{d=new Blob([c],{type:"application/pdf"})}catch(e){if("InvalidStateError"==e.name){var f=new Uint8Array(c);d=new Blob([f.buffer],{type:"application/pdf"})}}if(!d)throw"Could not generate blob";g(d,a),"function"==typeof b&&b()})},d.prototype.getBase64=function(a,b){if(!a)throw"getBase64 is an async method and needs a callback argument";this._createDoc(b,function(b){a(b.toString("base64"))})},d.prototype.getDataUrl=function(a,b){if(!a)throw"getDataUrl is an async method and needs a callback argument";this._createDoc(b,function(b){a("data:application/pdf;base64,"+b.toString("base64"))})},d.prototype.getBuffer=function(a,b){if(!a)throw"getBuffer is an async method and needs a callback argument";this._createDoc(b,function(b){a(b)})},a.exports={createPdf:function(a){return new d(a,window.pdfMake.fonts,window.pdfMake.vfs)}}}).call(b,c(2).Buffer)},function(a,b,c){(function(a,d){function e(){function a(){}try{var b=new Uint8Array(1);return b.foo=function(){return 42},b.constructor=a,42===b.foo()&&b.constructor===a&&"function"==typeof b.subarray&&0===b.subarray(1,1).byteLength}catch(c){return!1}}function f(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(b){return this instanceof a?(this.length=0,this.parent=void 0,"number"==typeof b?g(this,b):"string"==typeof b?h(this,b,arguments.length>1?arguments[1]:"utf8"):i(this,b)):arguments.length>1?new a(b,arguments[1]):new a(b)}function g(b,c){if(b=p(b,0>c?0:0|q(c)),!a.TYPED_ARRAY_SUPPORT)for(var d=0;c>d;d++)b[d]=0;return b}function h(a,b,c){"string"==typeof c&&""!==c||(c="utf8");var d=0|s(b,c);return a=p(a,d),a.write(b,c),a}function i(b,c){if(a.isBuffer(c))return j(b,c);if(Y(c))return k(b,c);if(null==c)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(c.buffer instanceof ArrayBuffer)return l(b,c);if(c instanceof ArrayBuffer)return m(b,c)}return c.length?n(b,c):o(b,c)}function j(a,b){var c=0|q(b.length);return a=p(a,c),b.copy(a,0,0,c),a}function k(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function l(a,b){var c=0|q(b.length); -a=p(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function m(b,c){return a.TYPED_ARRAY_SUPPORT?(c.byteLength,b=a._augment(new Uint8Array(c))):b=l(b,new Uint8Array(c)),b}function n(a,b){var c=0|q(b.length);a=p(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function o(a,b){var c,d=0;"Buffer"===b.type&&Y(b.data)&&(c=b.data,d=0|q(c.length)),a=p(a,d);for(var e=0;d>e;e+=1)a[e]=255&c[e];return a}function p(b,c){a.TYPED_ARRAY_SUPPORT?(b=a._augment(new Uint8Array(c)),b.__proto__=a.prototype):(b.length=c,b._isBuffer=!0);var d=0!==c&&c<=a.poolSize>>>1;return d&&(b.parent=Z),b}function q(a){if(a>=f())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f().toString(16)+" bytes");return 0|a}function r(b,c){if(!(this instanceof r))return new r(b,c);var d=new a(b,c);return delete d.parent,d}function s(a,b){"string"!=typeof a&&(a=""+a);var c=a.length;if(0===c)return 0;for(var d=!1;;)switch(b){case"ascii":case"binary":case"raw":case"raws":return c;case"utf8":case"utf-8":return R(a).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*c;case"hex":return c>>>1;case"base64":return U(a).length;default:if(d)return R(a).length;b=(""+b).toLowerCase(),d=!0}}function t(a,b,c){var d=!1;if(b=0|b,c=void 0===c||c===1/0?this.length:0|c,a||(a="utf8"),0>b&&(b=0),c>this.length&&(c=this.length),b>=c)return"";for(;;)switch(a){case"hex":return F(this,b,c);case"utf8":case"utf-8":return B(this,b,c);case"ascii":return D(this,b,c);case"binary":return E(this,b,c);case"base64":return A(this,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,b,c);default:if(d)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),d=!0}}function u(a,b,c,d){c=Number(c)||0;var e=a.length-c;d?(d=Number(d),d>e&&(d=e)):d=e;var f=b.length;if(f%2!==0)throw new Error("Invalid hex string");d>f/2&&(d=f/2);for(var g=0;d>g;g++){var h=parseInt(b.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");a[c+g]=h}return g}function v(a,b,c,d){return V(R(b,a.length-c),a,c,d)}function w(a,b,c,d){return V(S(b),a,c,d)}function x(a,b,c,d){return w(a,b,c,d)}function y(a,b,c,d){return V(U(b),a,c,d)}function z(a,b,c,d){return V(T(b,a.length-c),a,c,d)}function A(a,b,c){return 0===b&&c===a.length?W.fromByteArray(a):W.fromByteArray(a.slice(b,c))}function B(a,b,c){c=Math.min(a.length,c);for(var d=[],e=b;c>e;){var f=a[e],g=null,h=f>239?4:f>223?3:f>191?2:1;if(c>=e+h){var i,j,k,l;switch(h){case 1:128>f&&(g=f);break;case 2:i=a[e+1],128===(192&i)&&(l=(31&f)<<6|63&i,l>127&&(g=l));break;case 3:i=a[e+1],j=a[e+2],128===(192&i)&&128===(192&j)&&(l=(15&f)<<12|(63&i)<<6|63&j,l>2047&&(55296>l||l>57343)&&(g=l));break;case 4:i=a[e+1],j=a[e+2],k=a[e+3],128===(192&i)&&128===(192&j)&&128===(192&k)&&(l=(15&f)<<18|(63&i)<<12|(63&j)<<6|63&k,l>65535&&1114112>l&&(g=l))}}null===g?(g=65533,h=1):g>65535&&(g-=65536,d.push(g>>>10&1023|55296),g=56320|1023&g),d.push(g),e+=h}return C(d)}function C(a){var b=a.length;if($>=b)return String.fromCharCode.apply(String,a);for(var c="",d=0;b>d;)c+=String.fromCharCode.apply(String,a.slice(d,d+=$));return c}function D(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(127&a[e]);return d}function E(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(a[e]);return d}function F(a,b,c){var d=a.length;(!b||0>b)&&(b=0),(!c||0>c||c>d)&&(c=d);for(var e="",f=b;c>f;f++)e+=Q(a[f]);return e}function G(a,b,c){for(var d=a.slice(b,c),e="",f=0;fa)throw new RangeError("offset is not uint");if(a+b>c)throw new RangeError("Trying to access beyond buffer length")}function I(b,c,d,e,f,g){if(!a.isBuffer(b))throw new TypeError("buffer must be a Buffer instance");if(c>f||g>c)throw new RangeError("value is out of bounds");if(d+e>b.length)throw new RangeError("index out of range")}function J(a,b,c,d){0>b&&(b=65535+b+1);for(var e=0,f=Math.min(a.length-c,2);f>e;e++)a[c+e]=(b&255<<8*(d?e:1-e))>>>8*(d?e:1-e)}function K(a,b,c,d){0>b&&(b=4294967295+b+1);for(var e=0,f=Math.min(a.length-c,4);f>e;e++)a[c+e]=b>>>8*(d?e:3-e)&255}function L(a,b,c,d,e,f){if(b>e||f>b)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range");if(0>c)throw new RangeError("index out of range")}function M(a,b,c,d,e){return e||L(a,b,c,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(a,b,c,d,23,4),c+4}function N(a,b,c,d,e){return e||L(a,b,c,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(a,b,c,d,52,8),c+8}function O(a){if(a=P(a).replace(aa,""),a.length<2)return"";for(;a.length%4!==0;)a+="=";return a}function P(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function Q(a){return 16>a?"0"+a.toString(16):a.toString(16)}function R(a,b){b=b||1/0;for(var c,d=a.length,e=null,f=[],g=0;d>g;g++){if(c=a.charCodeAt(g),c>55295&&57344>c){if(!e){if(c>56319){(b-=3)>-1&&f.push(239,191,189);continue}if(g+1===d){(b-=3)>-1&&f.push(239,191,189);continue}e=c;continue}if(56320>c){(b-=3)>-1&&f.push(239,191,189),e=c;continue}c=e-55296<<10|c-56320|65536}else e&&(b-=3)>-1&&f.push(239,191,189);if(e=null,128>c){if((b-=1)<0)break;f.push(c)}else if(2048>c){if((b-=2)<0)break;f.push(c>>6|192,63&c|128)}else if(65536>c){if((b-=3)<0)break;f.push(c>>12|224,c>>6&63|128,63&c|128)}else{if(!(1114112>c))throw new Error("Invalid code point");if((b-=4)<0)break;f.push(c>>18|240,c>>12&63|128,c>>6&63|128,63&c|128)}}return f}function S(a){for(var b=[],c=0;c>8,e=c%256,f.push(e),f.push(d);return f}function U(a){return W.toByteArray(O(a))}function V(a,b,c,d){for(var e=0;d>e&&!(e+c>=b.length||e>=a.length);e++)b[e+c]=a[e];return e}var W=c(3),X=c(4),Y=c(5);b.Buffer=a,b.SlowBuffer=r,b.INSPECT_MAX_BYTES=50,a.poolSize=8192;var Z={};a.TYPED_ARRAY_SUPPORT=void 0!==d.TYPED_ARRAY_SUPPORT?d.TYPED_ARRAY_SUPPORT:e(),a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array),a.isBuffer=function(a){return!(null==a||!a._isBuffer)},a.compare=function(b,c){if(!a.isBuffer(b)||!a.isBuffer(c))throw new TypeError("Arguments must be Buffers");if(b===c)return 0;for(var d=b.length,e=c.length,f=0,g=Math.min(d,e);g>f&&b[f]===c[f];)++f;return f!==g&&(d=b[f],e=c[f]),e>d?-1:d>e?1:0},a.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(b,c){if(!Y(b))throw new TypeError("list argument must be an Array of Buffers.");if(0===b.length)return new a(0);var d;if(void 0===c)for(c=0,d=0;d0&&(a=this.toString("hex",0,c).match(/.{2}/g).join(" "),this.length>c&&(a+=" ... ")),""},a.prototype.compare=function(b){if(!a.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b?0:a.compare(this,b)},a.prototype.indexOf=function(b,c){function d(a,b,c){for(var d=-1,e=0;c+e2147483647?c=2147483647:-2147483648>c&&(c=-2147483648),c>>=0,0===this.length)return-1;if(c>=this.length)return-1;if(0>c&&(c=Math.max(this.length+c,0)),"string"==typeof b)return 0===b.length?-1:String.prototype.indexOf.call(this,b,c);if(a.isBuffer(b))return d(this,b,c);if("number"==typeof b)return a.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,b,c):d(this,[b],c);throw new TypeError("val must be string, number or Buffer")},a.prototype.get=function(a){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(a)},a.prototype.set=function(a,b){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(a,b)},a.prototype.write=function(a,b,c,d){if(void 0===b)d="utf8",c=this.length,b=0;else if(void 0===c&&"string"==typeof b)d=b,c=this.length,b=0;else if(isFinite(b))b=0|b,isFinite(c)?(c=0|c,void 0===d&&(d="utf8")):(d=c,c=void 0);else{var e=d;d=b,b=0|c,c=e}var f=this.length-b;if((void 0===c||c>f)&&(c=f),a.length>0&&(0>c||0>b)||b>this.length)throw new RangeError("attempt to write outside buffer bounds");d||(d="utf8");for(var g=!1;;)switch(d){case"hex":return u(this,a,b,c);case"utf8":case"utf-8":return v(this,a,b,c);case"ascii":return w(this,a,b,c);case"binary":return x(this,a,b,c);case"base64":return y(this,a,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,a,b,c);default:if(g)throw new TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase(),g=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;a.prototype.slice=function(b,c){var d=this.length;b=~~b,c=void 0===c?d:~~c,0>b?(b+=d,0>b&&(b=0)):b>d&&(b=d),0>c?(c+=d,0>c&&(c=0)):c>d&&(c=d),b>c&&(c=b);var e;if(a.TYPED_ARRAY_SUPPORT)e=a._augment(this.subarray(b,c));else{var f=c-b;e=new a(f,void 0);for(var g=0;f>g;g++)e[g]=this[g+b]}return e.length&&(e.parent=this.parent||this),e},a.prototype.readUIntLE=function(a,b,c){a=0|a,b=0|b,c||H(a,b,this.length);for(var d=this[a],e=1,f=0;++f0&&(e*=256);)d+=this[a+--b]*e;return d},a.prototype.readUInt8=function(a,b){return b||H(a,1,this.length),this[a]},a.prototype.readUInt16LE=function(a,b){return b||H(a,2,this.length),this[a]|this[a+1]<<8},a.prototype.readUInt16BE=function(a,b){return b||H(a,2,this.length),this[a]<<8|this[a+1]},a.prototype.readUInt32LE=function(a,b){return b||H(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]},a.prototype.readUInt32BE=function(a,b){return b||H(a,4,this.length),16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])},a.prototype.readIntLE=function(a,b,c){a=0|a,b=0|b,c||H(a,b,this.length);for(var d=this[a],e=1,f=0;++f=e&&(d-=Math.pow(2,8*b)),d},a.prototype.readIntBE=function(a,b,c){a=0|a,b=0|b,c||H(a,b,this.length);for(var d=b,e=1,f=this[a+--d];d>0&&(e*=256);)f+=this[a+--d]*e;return e*=128,f>=e&&(f-=Math.pow(2,8*b)),f},a.prototype.readInt8=function(a,b){return b||H(a,1,this.length),128&this[a]?-1*(255-this[a]+1):this[a]},a.prototype.readInt16LE=function(a,b){b||H(a,2,this.length);var c=this[a]|this[a+1]<<8;return 32768&c?4294901760|c:c},a.prototype.readInt16BE=function(a,b){b||H(a,2,this.length);var c=this[a+1]|this[a]<<8;return 32768&c?4294901760|c:c},a.prototype.readInt32LE=function(a,b){return b||H(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},a.prototype.readInt32BE=function(a,b){return b||H(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},a.prototype.readFloatLE=function(a,b){return b||H(a,4,this.length),X.read(this,a,!0,23,4)},a.prototype.readFloatBE=function(a,b){return b||H(a,4,this.length),X.read(this,a,!1,23,4)},a.prototype.readDoubleLE=function(a,b){return b||H(a,8,this.length),X.read(this,a,!0,52,8)},a.prototype.readDoubleBE=function(a,b){return b||H(a,8,this.length),X.read(this,a,!1,52,8)},a.prototype.writeUIntLE=function(a,b,c,d){a=+a,b=0|b,c=0|c,d||I(this,a,b,c,Math.pow(2,8*c),0);var e=1,f=0;for(this[b]=255&a;++f=0&&(f*=256);)this[b+e]=a/f&255;return b+c},a.prototype.writeUInt8=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,1,255,0),a.TYPED_ARRAY_SUPPORT||(b=Math.floor(b)),this[c]=255&b,c+1},a.prototype.writeUInt16LE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[c]=255&b,this[c+1]=b>>>8):J(this,b,c,!0),c+2},a.prototype.writeUInt16BE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[c]=b>>>8,this[c+1]=255&b):J(this,b,c,!1),c+2},a.prototype.writeUInt32LE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[c+3]=b>>>24,this[c+2]=b>>>16,this[c+1]=b>>>8,this[c]=255&b):K(this,b,c,!0),c+4},a.prototype.writeUInt32BE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[c]=b>>>24,this[c+1]=b>>>16,this[c+2]=b>>>8,this[c+3]=255&b):K(this,b,c,!1),c+4},a.prototype.writeIntLE=function(a,b,c,d){if(a=+a,b=0|b,!d){var e=Math.pow(2,8*c-1);I(this,a,b,c,e-1,-e)}var f=0,g=1,h=0>a?1:0;for(this[b]=255&a;++f>0)-h&255;return b+c},a.prototype.writeIntBE=function(a,b,c,d){if(a=+a,b=0|b,!d){var e=Math.pow(2,8*c-1);I(this,a,b,c,e-1,-e)}var f=c-1,g=1,h=0>a?1:0;for(this[b+f]=255&a;--f>=0&&(g*=256);)this[b+f]=(a/g>>0)-h&255;return b+c},a.prototype.writeInt8=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,1,127,-128),a.TYPED_ARRAY_SUPPORT||(b=Math.floor(b)),0>b&&(b=255+b+1),this[c]=255&b,c+1},a.prototype.writeInt16LE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[c]=255&b,this[c+1]=b>>>8):J(this,b,c,!0),c+2},a.prototype.writeInt16BE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[c]=b>>>8,this[c+1]=255&b):J(this,b,c,!1),c+2},a.prototype.writeInt32LE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[c]=255&b,this[c+1]=b>>>8,this[c+2]=b>>>16,this[c+3]=b>>>24):K(this,b,c,!0),c+4},a.prototype.writeInt32BE=function(b,c,d){return b=+b,c=0|c,d||I(this,b,c,4,2147483647,-2147483648),0>b&&(b=4294967295+b+1),a.TYPED_ARRAY_SUPPORT?(this[c]=b>>>24,this[c+1]=b>>>16,this[c+2]=b>>>8,this[c+3]=255&b):K(this,b,c,!1),c+4},a.prototype.writeFloatLE=function(a,b,c){return M(this,a,b,!0,c)},a.prototype.writeFloatBE=function(a,b,c){return M(this,a,b,!1,c)},a.prototype.writeDoubleLE=function(a,b,c){return N(this,a,b,!0,c)},a.prototype.writeDoubleBE=function(a,b,c){return N(this,a,b,!1,c)},a.prototype.copy=function(b,c,d,e){if(d||(d=0),e||0===e||(e=this.length),c>=b.length&&(c=b.length),c||(c=0),e>0&&d>e&&(e=d),e===d)return 0;if(0===b.length||0===this.length)return 0;if(0>c)throw new RangeError("targetStart out of bounds");if(0>d||d>=this.length)throw new RangeError("sourceStart out of bounds");if(0>e)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length),b.length-cd&&e>c)for(f=g-1;f>=0;f--)b[f+c]=this[f+d];else if(1e3>g||!a.TYPED_ARRAY_SUPPORT)for(f=0;g>f;f++)b[f+c]=this[f+d];else b._set(this.subarray(d,d+g),c);return g},a.prototype.fill=function(a,b,c){if(a||(a=0),b||(b=0),c||(c=this.length),b>c)throw new RangeError("end < start");if(c!==b&&0!==this.length){if(0>b||b>=this.length)throw new RangeError("start out of bounds");if(0>c||c>this.length)throw new RangeError("end out of bounds");var d;if("number"==typeof a)for(d=b;c>d;d++)this[d]=a;else{var e=R(a.toString()),f=e.length;for(d=b;c>d;d++)this[d]=e[d%f]}return this}},a.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(a.TYPED_ARRAY_SUPPORT)return new a(this).buffer;for(var b=new Uint8Array(this.length),c=0,d=b.length;d>c;c+=1)b[c]=this[c];return b.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var _=a.prototype;a._augment=function(b){return b.constructor=a,b._isBuffer=!0,b._set=b.set,b.get=_.get,b.set=_.set,b.write=_.write,b.toString=_.toString,b.toLocaleString=_.toString,b.toJSON=_.toJSON,b.equals=_.equals,b.compare=_.compare,b.indexOf=_.indexOf,b.copy=_.copy,b.slice=_.slice,b.readUIntLE=_.readUIntLE,b.readUIntBE=_.readUIntBE,b.readUInt8=_.readUInt8,b.readUInt16LE=_.readUInt16LE,b.readUInt16BE=_.readUInt16BE,b.readUInt32LE=_.readUInt32LE,b.readUInt32BE=_.readUInt32BE,b.readIntLE=_.readIntLE,b.readIntBE=_.readIntBE,b.readInt8=_.readInt8,b.readInt16LE=_.readInt16LE,b.readInt16BE=_.readInt16BE,b.readInt32LE=_.readInt32LE,b.readInt32BE=_.readInt32BE,b.readFloatLE=_.readFloatLE,b.readFloatBE=_.readFloatBE,b.readDoubleLE=_.readDoubleLE,b.readDoubleBE=_.readDoubleBE,b.writeUInt8=_.writeUInt8,b.writeUIntLE=_.writeUIntLE,b.writeUIntBE=_.writeUIntBE,b.writeUInt16LE=_.writeUInt16LE,b.writeUInt16BE=_.writeUInt16BE,b.writeUInt32LE=_.writeUInt32LE,b.writeUInt32BE=_.writeUInt32BE,b.writeIntLE=_.writeIntLE,b.writeIntBE=_.writeIntBE,b.writeInt8=_.writeInt8,b.writeInt16LE=_.writeInt16LE,b.writeInt16BE=_.writeInt16BE,b.writeInt32LE=_.writeInt32LE,b.writeInt32BE=_.writeInt32BE,b.writeFloatLE=_.writeFloatLE,b.writeFloatBE=_.writeFloatBE,b.writeDoubleLE=_.writeDoubleLE,b.writeDoubleBE=_.writeDoubleBE,b.fill=_.fill,b.inspect=_.inspect,b.toArrayBuffer=_.toArrayBuffer,b};var aa=/[^+\/0-9A-Za-z-_]/g}).call(b,c(2).Buffer,function(){return this}())},function(a,b,c){var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(a){"use strict";function b(a){var b=a.charCodeAt(0);return b===g||b===l?62:b===h||b===m?63:i>b?-1:i+10>b?b-i+26+26:k+26>b?b-k:j+26>b?b-j+26:void 0}function c(a){function c(a){j[l++]=a}var d,e,g,h,i,j;if(a.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=a.length;i="="===a.charAt(k-2)?2:"="===a.charAt(k-1)?1:0,j=new f(3*a.length/4-i),g=i>0?a.length-4:a.length;var l=0;for(d=0,e=0;g>d;d+=4,e+=3)h=b(a.charAt(d))<<18|b(a.charAt(d+1))<<12|b(a.charAt(d+2))<<6|b(a.charAt(d+3)),c((16711680&h)>>16),c((65280&h)>>8),c(255&h);return 2===i?(h=b(a.charAt(d))<<2|b(a.charAt(d+1))>>4,c(255&h)):1===i&&(h=b(a.charAt(d))<<10|b(a.charAt(d+1))<<4|b(a.charAt(d+2))>>2,c(h>>8&255),c(255&h)),j}function e(a){function b(a){return d.charAt(a)}function c(a){return b(a>>18&63)+b(a>>12&63)+b(a>>6&63)+b(63&a)}var e,f,g,h=a.length%3,i="";for(e=0,g=a.length-h;g>e;e+=3)f=(a[e]<<16)+(a[e+1]<<8)+a[e+2],i+=c(f);switch(h){case 1:f=a[a.length-1],i+=b(f>>2),i+=b(f<<4&63),i+="==";break;case 2:f=(a[a.length-2]<<8)+a[a.length-1],i+=b(f>>10),i+=b(f>>4&63),i+=b(f<<2&63),i+="="}return i}var f="undefined"!=typeof Uint8Array?Uint8Array:Array,g="+".charCodeAt(0),h="/".charCodeAt(0),i="0".charCodeAt(0),j="a".charCodeAt(0),k="A".charCodeAt(0),l="-".charCodeAt(0),m="_".charCodeAt(0);a.toByteArray=c,a.fromByteArray=e}(b)},function(a,b){b.read=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<>1,k=-7,l=c?e-1:0,m=c?-1:1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?NaN:(n?-1:1)*(1/0);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},b.write=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?0:f-1,o=d?1:-1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},function(a,b){var c=Array.isArray,d=Object.prototype.toString;a.exports=c||function(a){return!!a&&"[object Array]"==d.call(a)}},function(a,b,c){"use strict";function d(a){this.fontDescriptors=a}function e(a){if(!a)return null;if("number"==typeof a||a instanceof Number)a={left:a,right:a,top:a,bottom:a};else if(a instanceof Array)if(2===a.length)a={left:a[0],top:a[1],right:a[0],bottom:a[1]};else{if(4!==a.length)throw"Invalid pageMargins definition";a={left:a[0],top:a[1],right:a[2],bottom:a[3]}}return a}function f(a){a.registerTableLayouts({noBorders:{hLineWidth:function(a){return 0},vLineWidth:function(a){return 0},paddingLeft:function(a){return a&&4||0},paddingRight:function(a,b){return ab.options.size[1]?"landscape":"portrait";if(a.pageSize.orientation!==c){var d=b.options.size[0],e=b.options.size[1];b.options.size=[e,d]}}function i(a,b,c){c._pdfMakePages=a;for(var d=0;d0&&(h(a[d],c),c.addPage(c.options));for(var e=a[d],f=0,g=e.items.length;g>f;f++){var i=e.items[f];switch(i.type){case"vector":l(i.item,c);break;case"line":j(i.item,i.item.x,i.item.y,c);break;case"image":m(i.item,i.item.x,i.item.y,c)}}e.watermark&&k(e,c),b.setFontRefsToPdfDoc()}}function j(a,b,c,d){b=b||0,c=c||0;var e=a.getHeight(),f=a.getAscenderHeight();s.drawBackground(a,b,c,d);for(var g=0,h=a.inlines.length;h>g;g++){var i=a.inlines[g];d.fill(i.color||"black"),d.save(),d.transform(1,0,0,-1,0,d.page.height);var j=i.font.encode(i.text);d.addContent("BT"),d.addContent(""+(b+i.x)+" "+(d.page.height-c-f)+" Td"),d.addContent("/"+j.fontId+" "+i.fontSize+" Tf"),d.addContent("<"+j.encodedText+"> Tj"),d.addContent("ET"),i.link&&d.link(b+i.x,d.page.height-c-e,i.width,e,i.link),d.restore()}s.drawDecorations(a,b,c,d)}function k(a,b){var c=a.watermark;b.fill("black"),b.opacity(.6),b.save(),b.transform(1,0,0,-1,0,b.page.height);var d=180*Math.atan2(b.page.height,b.page.width)/Math.PI;b.rotate(d,{origin:[b.page.width/2,b.page.height/2]});var e=c.font.encode(c.text);b.addContent("BT"),b.addContent(""+(b.page.width/2-c.size.size.width/2)+" "+(b.page.height/2-c.size.size.height/4)+" Td"),b.addContent("/"+e.fontId+" "+c.size.fontSize+" Tf"),b.addContent("<"+e.encodedText+"> Tj"),b.addContent("ET"),b.restore()}function l(a,b){switch(b.lineWidth(a.lineWidth||1),a.dash?b.dash(a.dash.length,{space:a.dash.space||a.dash.length}):b.undash(),b.fillOpacity(a.fillOpacity||1),b.strokeOpacity(a.strokeOpacity||1),b.lineJoin(a.lineJoin||"miter"),a.type){case"ellipse":b.ellipse(a.x,a.y,a.r1,a.r2);break;case"rect":a.r?b.roundedRect(a.x,a.y,a.w,a.h,a.r):b.rect(a.x,a.y,a.w,a.h);break;case"line":b.moveTo(a.x1,a.y1),b.lineTo(a.x2,a.y2);break;case"polyline":if(0===a.points.length)break;b.moveTo(a.points[0].x,a.points[0].y);for(var c=1,d=a.points.length;d>c;c++)b.lineTo(a.points[c].x,a.points[c].y);if(a.points.length>1){var e=a.points[0],f=a.points[a.points.length-1];(a.closePath||e.x===f.x&&e.y===f.y)&&b.closePath()}}a.color&&a.lineColor?b.fillAndStroke(a.color,a.lineColor):a.color?b.fill(a.color):b.stroke(a.lineColor||"black")}function m(a,b,c,d){d.image(a.image,a.x,a.y,{width:a._width,height:a._height})}var n=(c(7),c(9)),o=c(11),p=c(24),q=(c(46),c(102)),r=c(103),s=c(104),n=c(9);d.prototype.createPdfKitDocument=function(a,b){b=b||{};var c=g(a.pageSize||"a4");if("landscape"===a.pageOrientation&&(c={width:c.height,height:c.width}),c.orientation="landscape"===a.pageOrientation?a.pageOrientation:"portrait",this.pdfKitDoc=new p({size:[c.width,c.height],compress:!1}),this.pdfKitDoc.info.Producer="pdfmake",this.pdfKitDoc.info.Creator="pdfmake",a.info){a.info;this.pdfKitDoc.info.Title=a.info.title?a.info.title:null,this.pdfKitDoc.info.Author=a.info.author?a.info.author:null,this.pdfKitDoc.info.Subject=a.info.subject?a.info.subject:null,this.pdfKitDoc.info.Keywords=a.info.keywords?a.info.keywords:null}this.fontProvider=new n(this.fontDescriptors,this.pdfKitDoc),a.images=a.images||{};var d=new o(c,e(a.pageMargins||40),new r(this.pdfKitDoc,a.images));f(d),b.tableLayouts&&d.registerTableLayouts(b.tableLayouts);var h=d.layoutDocument(a.content,this.fontProvider,a.styles||{},a.defaultStyle||{fontSize:12,font:"Roboto"},a.background,a.header,a.footer,a.images,a.watermark,a.pageBreakBefore);if(i(h,this.fontProvider,this.pdfKitDoc),b.autoPrint){var j=this.pdfKitDoc.ref({Type:"Action",S:"Named",N:"Print"});this.pdfKitDoc._root.data.OpenAction=j,j.end()}return this.pdfKitDoc};a.exports=d,d.prototype.fs=c(44)},function(a,b,c){var d;(function(a,e){(function(){function f(a,b){if(a!==b){var c=null===a,d=a===B,e=a===a,f=null===b,g=b===B,h=b===b;if(a>b&&!f||!e||c&&!g&&h||d&&h)return 1;if(b>a&&!c||!h||f&&!d&&e||g&&e)return-1}return 0}function g(a,b,c){for(var d=a.length,e=c?d:-1;c?e--:++e-1;);return c}function l(a,b){for(var c=a.length;c--&&b.indexOf(a.charAt(c))>-1;);return c}function m(a,b){return f(a.criteria,b.criteria)||a.index-b.index}function n(a,b,c){for(var d=-1,e=a.criteria,g=b.criteria,h=e.length,i=c.length;++d=i)return j;var k=c[d];return j*("asc"===k||k===!0?1:-1)}}return a.index-b.index}function o(a){return Ua[a]}function p(a){return Va[a]}function q(a,b,c){return b?a=Ya[a]:c&&(a=Za[a]),"\\"+a}function r(a){return"\\"+Za[a]}function s(a,b,c){for(var d=a.length,e=b+(c?0:-1);c?e--:++e=a&&a>=9&&13>=a||32==a||160==a||5760==a||6158==a||a>=8192&&(8202>=a||8232==a||8233==a||8239==a||8287==a||12288==a||65279==a)}function v(a,b){for(var c=-1,d=a.length,e=-1,f=[];++cb,e=c?a.length:0,f=Tc(0,e,this.__views__),g=f.start,h=f.end,i=h-g,j=d?h:g-1,k=this.__iteratees__,l=k.length,m=0,n=wg(i,this.__takeCount__);if(!c||Q>e||e==i&&n==i)return cc(d&&c?a.reverse():a,this.__actions__);var o=[];a:for(;i--&&n>m;){j+=b;for(var p=-1,q=a[j];++p=Q?oc(b):null,j=b.length;i&&(f=Za,g=!1,b=i);a:for(;++ec&&(c=-c>e?0:e+c),d=d===B||d>e?e:+d||0,0>d&&(d+=e),e=c>d?0:d>>>0,c>>>=0;e>c;)a[c++]=b;return a}function Bb(a,b){var c=[];return Jg(a,function(a,d,e){b(a,d,e)&&c.push(a)}),c}function Cb(a,b,c,d){var e;return c(a,function(a,c,f){return b(a,c,f)?(e=d?c:a,!1):void 0}),e}function Db(a,b,c,d){d||(d=[]);for(var e=-1,f=a.length;++ed;)a=a[b[d++]];return d&&d==e?a:B}}function Jb(a,b,c,d,e,f){return a===b?!0:null==a||null==b||!He(a)&&!t(b)?a!==a&&b!==b:Kb(a,b,Jb,c,d,e,f)}function Kb(a,b,c,d,e,f,g){ -var h=Ch(a),i=Ch(b),j=W,k=W;h||(j=cg.call(a),j==V?j=ba:j!=ba&&(h=Qe(a))),i||(k=cg.call(b),k==V?k=ba:k!=ba&&(i=Qe(b)));var l=j==ba,m=k==ba,n=j==k;if(n&&!h&&!l)return Mc(a,b,j);if(!e){var o=l&&ag.call(a,"__wrapped__"),p=m&&ag.call(b,"__wrapped__");if(o||p)return c(o?a.value():a,p?b.value():b,d,e,f,g)}if(!n)return!1;f||(f=[]),g||(g=[]);for(var q=f.length;q--;)if(f[q]==a)return g[q]==b;f.push(a),g.push(b);var r=(h?Lc:Nc)(a,b,c,d,e,f,g);return f.pop(),g.pop(),r}function Lb(a,b,c){var d=b.length,e=d,f=!c;if(null==a)return!e;for(a=kd(a);d--;){var g=b[d];if(f&&g[2]?g[1]!==a[g[0]]:!(g[0]in a))return!1}for(;++db&&(b=-b>e?0:e+b),c=c===B||c>e?e:+c||0,0>c&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Of(e);++d=Q,i=g?oc():null,j=[];i?(d=Za,f=!1):(g=!1,i=b?[]:j);a:for(;++c=e){for(;e>d;){var f=d+e>>>1,g=a[f];(c?b>=g:b>g)&&null!==g?d=f+1:e=f}return e}return ec(a,b,Bf,c)}function ec(a,b,c,d){b=c(b);for(var e=0,f=a?a.length:0,g=b!==b,h=null===b,i=b===B;f>e;){var j=rg((e+f)/2),k=c(a[j]),l=k!==B,m=k===k;if(g)var n=m||d;else n=h?m&&l&&(d||null!=k):i?m&&(d||l):null==k?!1:d?b>=k:b>k;n?e=j+1:f=j}return wg(f,Dg)}function fc(a,b,c){if("function"!=typeof a)return Bf;if(b===B)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)};case 5:return function(c,d,e,f,g){return a.call(b,c,d,e,f,g)}}return function(){return a.apply(b,arguments)}}function gc(a){var b=new fg(a.byteLength),c=new ng(b);return c.set(new ng(a)),b}function hc(a,b,c){for(var d=c.length,e=-1,f=vg(a.length-d,0),g=-1,h=b.length,i=Of(h+f);++g2?c[e-2]:B,g=e>2?c[2]:B,h=e>1?c[e-1]:B;for("function"==typeof f?(f=fc(f,h,5),e-=2):(f="function"==typeof h?h:B,e-=f?1:0),g&&$c(c[0],c[1],g)&&(f=3>e?B:f,e=1);++d-1?c[f]:B}return Cb(c,d,a)}}function vc(a){return function(b,c,d){return b&&b.length?(c=Oc(c,d,3),g(b,c,a)):-1}}function wc(a){return function(b,c,d){return c=Oc(c,d,3),Cb(b,c,a,!0)}}function xc(a){return function(){for(var b,c=arguments.length,e=a?c:-1,f=0,g=Of(c);a?e--:++e=Q)return b.plant(d).value();for(var e=0,f=c?g[e].apply(this,a):d;++es){var y=h?ab(h):B,z=vg(j-s,0),A=o?x:B,C=o?B:x,F=o?u:B,G=o?B:u;b|=o?I:J,b&=~(o?J:I),p||(b&=~(D|E));var H=[a,b,c,F,A,G,C,y,i,z],K=Fc.apply(B,H);return ad(a)&&Qg(K,H),K.placeholder=w,K}}var L=m?c:this,M=n?L[a]:a;return h&&(u=hd(u,h)),l&&i=b||!tg(b))return"";var e=b-d;return c=null==c?" ":c+"",qf(c,pg(e/c.length)).slice(0,e)}function Hc(a,b,c,d){function e(){for(var b=-1,h=arguments.length,i=-1,j=d.length,k=Of(j+h);++ii))return!1;for(;++h-1&&a%1==0&&b>a}function $c(a,b,c){if(!He(c))return!1;var d=typeof b;if("number"==d?Yc(c)&&Zc(b,c.length):"string"==d&&b in c){var e=c[b];return a===a?a===e:e!==e}return!1}function _c(a,b){var c=typeof a;if("string"==c&&Ba.test(a)||"number"==c)return!0;if(Ch(a))return!1;var d=!Aa.test(a);return d||null!=b&&a in kd(b)}function ad(a){var c=Pc(a);if(!(c in e.prototype))return!1;var d=b[c];if(a===d)return!0;var f=Og(d);return!!f&&a===f[0]}function bd(a){return"number"==typeof a&&a>-1&&a%1==0&&Fg>=a}function cd(a){return a===a&&!He(a)}function dd(a,b){var c=a[1],d=b[1],e=c|d,f=K>e,g=d==K&&c==G||d==K&&c==L&&a[7].length<=b[8]||d==(K|L)&&c==G;if(!f&&!g)return a;d&D&&(a[2]=b[2],e|=c&D?0:F);var h=b[3];if(h){var i=a[3];a[3]=i?hc(i,h,b[4]):ab(h),a[4]=i?v(a[3],U):ab(b[4])}return h=b[5],h&&(i=a[5],a[5]=i?ic(i,h,b[6]):ab(h),a[6]=i?v(a[5],U):ab(b[6])),h=b[7],h&&(a[7]=ab(h)),d&K&&(a[8]=null==a[8]?b[8]:wg(a[8],b[8])),null==a[9]&&(a[9]=b[9]),a[0]=b[0],a[1]=e,a}function ed(a,b){return a===B?b:Dh(a,b,ed)}function fd(a,b){a=kd(a);for(var c=-1,d=b.length,e={};++cd;)g[++f]=Wb(a,d,d+=b);return g}function od(a){for(var b=-1,c=a?a.length:0,d=-1,e=[];++bb?0:b)):[]}function qd(a,b,c){var d=a?a.length:0;return d?((c?$c(a,b,c):null==b)&&(b=1),b=d-(+b||0),Wb(a,0,0>b?0:b)):[]}function rd(a,b,c){return a&&a.length?bc(a,Oc(b,c,3),!0,!0):[]}function sd(a,b,c){return a&&a.length?bc(a,Oc(b,c,3),!0):[]}function td(a,b,c,d){var e=a?a.length:0;return e?(c&&"number"!=typeof c&&$c(a,b,c)&&(c=0,d=e),Ab(a,b,c,d)):[]}function ud(a){return a?a[0]:B}function vd(a,b,c){var d=a?a.length:0;return c&&$c(a,b,c)&&(b=!1),d?Db(a,b):[]}function wd(a){var b=a?a.length:0;return b?Db(a,!0):[]}function xd(a,b,c){var d=a?a.length:0;if(!d)return-1;if("number"==typeof c)c=0>c?vg(d+c,0):c;else if(c){var e=dc(a,b);return d>e&&(b===b?b===a[e]:a[e]!==a[e])?e:-1}return h(a,b,c||0)}function yd(a){return qd(a,1)}function zd(a){var b=a?a.length:0;return b?a[b-1]:B}function Ad(a,b,c){var d=a?a.length:0;if(!d)return-1;var e=d;if("number"==typeof c)e=(0>c?vg(d+c,0):wg(c||0,d-1))+1;else if(c){e=dc(a,b,!0)-1;var f=a[e];return(b===b?b===f:f!==f)?e:-1}if(b!==b)return s(a,e,!0);for(;e--;)if(a[e]===b)return e;return-1}function Bd(){var a=arguments,b=a[0];if(!b||!b.length)return b;for(var c=0,d=Qc(),e=a.length;++c-1;)mg.call(b,f,1);return b}function Cd(a,b,c){var d=[];if(!a||!a.length)return d;var e=-1,f=[],g=a.length;for(b=Oc(b,c,3);++eb?0:b)):[]}function Gd(a,b,c){var d=a?a.length:0;return d?((c?$c(a,b,c):null==b)&&(b=1),b=d-(+b||0),Wb(a,0>b?0:b)):[]}function Hd(a,b,c){return a&&a.length?bc(a,Oc(b,c,3),!1,!0):[]}function Id(a,b,c){return a&&a.length?bc(a,Oc(b,c,3)):[]}function Jd(a,b,c,d){var e=a?a.length:0;if(!e)return[];null!=b&&"boolean"!=typeof b&&(d=c,c=$c(a,b,d)?B:b,b=!1);var f=Oc();return null==c&&f===ub||(c=f(c,d,3)),b&&Qc()==h?w(a,c):_b(a,c)}function Kd(a){if(!a||!a.length)return[];var b=-1,c=0;a=hb(a,function(a){return Yc(a)?(c=vg(a.length,c),!0):void 0});for(var d=Of(c);++bc?vg(e+c,0):c||0,"string"==typeof a||!Ch(a)&&Pe(a)?e>=c&&a.indexOf(b,c)>-1:!!e&&Qc(a,b,c)>-1}function _d(a,b,c){var d=Ch(a)?ib:Mb;return b=Oc(b,c,3),d(a,b)}function ae(a,b){return _d(a,Hf(b))}function be(a,b,c){var d=Ch(a)?hb:Bb;return b=Oc(b,c,3),d(a,function(a,c,d){return!b(a,c,d)})}function ce(a,b,c){if(c?$c(a,b,c):null==b){a=jd(a);var d=a.length;return d>0?a[Ub(0,d-1)]:B}var e=-1,f=Ue(a),d=f.length,g=d-1;for(b=wg(0>b?0:+b||0,d);++e0&&(c=b.apply(this,arguments)),1>=a&&(b=B),c}}function me(a,b,c){function d(){n&&gg(n),j&&gg(j),p=0,j=n=o=B}function e(b,c){c&&gg(c),j=n=o=B,b&&(p=oh(),k=a.apply(m,i),n||j||(i=m=B))}function f(){var a=b-(oh()-l);0>=a||a>b?e(o,j):n=lg(f,a)}function g(){e(r,n)}function h(){if(i=arguments,l=oh(),m=this,o=r&&(n||!s),q===!1)var c=s&&!n;else{j||s||(p=l);var d=q-(l-p),e=0>=d||d>q;e?(j&&(j=gg(j)),p=l,k=a.apply(m,i)):j||(j=lg(g,d))}return e&&n?n=gg(n):n||b===q||(n=lg(f,b)),c&&(e=!0,k=a.apply(m,i)),!e||n||j||(i=m=B),k}var i,j,k,l,m,n,o,p=0,q=!1,r=!0;if("function"!=typeof a)throw new Xf(T);if(b=0>b?0:+b||0,c===!0){var s=!0;r=!1}else He(c)&&(s=!!c.leading,q="maxWait"in c&&vg(+c.maxWait||0,b),r="trailing"in c?!!c.trailing:r);return h.cancel=d,h}function ne(a,b){if("function"!=typeof a||b&&"function"!=typeof b)throw new Xf(T);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g),g};return c.cache=new ne.Cache,c}function oe(a){if("function"!=typeof a)throw new Xf(T);return function(){return!a.apply(this,arguments)}}function pe(a){return le(2,a)}function qe(a,b){if("function"!=typeof a)throw new Xf(T);return b=vg(b===B?a.length-1:+b||0,0),function(){for(var c=arguments,d=-1,e=vg(c.length-b,0),f=Of(e);++db}function xe(a,b){return a>=b}function ye(a){return t(a)&&Yc(a)&&ag.call(a,"callee")&&!jg.call(a,"callee")}function ze(a){return a===!0||a===!1||t(a)&&cg.call(a)==X}function Ae(a){return t(a)&&cg.call(a)==Y}function Be(a){return!!a&&1===a.nodeType&&t(a)&&!Ne(a)}function Ce(a){return null==a?!0:Yc(a)&&(Ch(a)||Pe(a)||ye(a)||t(a)&&Ge(a.splice))?!a.length:!Nh(a).length}function De(a,b,c,d){c="function"==typeof c?fc(c,d,3):B;var e=c?c(a,b):B;return e===B?Jb(a,b,c):!!e}function Ee(a){return t(a)&&"string"==typeof a.message&&cg.call(a)==Z}function Fe(a){return"number"==typeof a&&tg(a)}function Ge(a){return He(a)&&cg.call(a)==$}function He(a){var b=typeof a;return!!a&&("object"==b||"function"==b)}function Ie(a,b,c,d){return c="function"==typeof c?fc(c,d,3):B,Lb(a,Rc(b),c)}function Je(a){return Me(a)&&a!=+a}function Ke(a){return null==a?!1:Ge(a)?eg.test(_f.call(a)):t(a)&&Ka.test(a)}function Le(a){return null===a}function Me(a){return"number"==typeof a||t(a)&&cg.call(a)==aa}function Ne(a){var b;if(!t(a)||cg.call(a)!=ba||ye(a)||!ag.call(a,"constructor")&&(b=a.constructor,"function"==typeof b&&!(b instanceof b)))return!1;var c;return Eb(a,function(a,b){c=b}),c===B||ag.call(a,c)}function Oe(a){return He(a)&&cg.call(a)==ca}function Pe(a){return"string"==typeof a||t(a)&&cg.call(a)==ea}function Qe(a){return t(a)&&bd(a.length)&&!!Sa[cg.call(a)]}function Re(a){return a===B}function Se(a,b){return b>a}function Te(a,b){return b>=a}function Ue(a){var b=a?Pg(a):0;return bd(b)?b?ab(a):[]:ef(a)}function Ve(a){return tb(a,_e(a))}function We(a,b,c){var d=Ig(a);return c&&$c(a,b,c)&&(b=B),b?rb(d,b):d}function Xe(a){return Hb(a,_e(a))}function Ye(a,b,c){var d=null==a?B:Ib(a,ld(b),b+"");return d===B?c:d}function Ze(a,b){if(null==a)return!1;var c=ag.call(a,b);if(!c&&!_c(b)){if(b=ld(b),a=1==b.length?a:Ib(a,Wb(b,0,-1)),null==a)return!1;b=zd(b),c=ag.call(a,b)}return c||bd(a.length)&&Zc(b,a.length)&&(Ch(a)||ye(a))}function $e(a,b,c){c&&$c(a,b,c)&&(b=B);for(var d=-1,e=Nh(a),f=e.length,g={};++d0;++d=wg(b,c)&&ac?0:+c||0,d),c-=b.length,c>=0&&a.indexOf(b,c)==c}function mf(a){return a=j(a),a&&wa.test(a)?a.replace(ua,p):a}function nf(a){return a=j(a),a&&Ea.test(a)?a.replace(Da,q):a||"(?:)"}function of(a,b,c){a=j(a),b=+b;var d=a.length;if(d>=b||!tg(b))return a;var e=(b-d)/2,f=rg(e),g=pg(e);return c=Gc("",g,c),c.slice(0,f)+a+c}function pf(a,b,c){return(c?$c(a,b,c):null==b)?b=0:b&&(b=+b),a=tf(a),yg(a,b||(Ja.test(a)?16:10))}function qf(a,b){var c="";if(a=j(a),b=+b,1>b||!a||!tg(b))return c;do b%2&&(c+=a),b=rg(b/2),a+=a;while(b);return c}function rf(a,b,c){return a=j(a),c=null==c?0:wg(0>c?0:+c||0,a.length),a.lastIndexOf(b,c)==c}function sf(a,c,d){var e=b.templateSettings;d&&$c(a,c,d)&&(c=d=B),a=j(a),c=qb(rb({},d||c),e,pb);var f,g,h=qb(rb({},c.imports),e.imports,pb),i=Nh(h),k=ac(h,i),l=0,m=c.interpolate||Na,n="__p += '",o=Vf((c.escape||Na).source+"|"+m.source+"|"+(m===za?Ha:Na).source+"|"+(c.evaluate||Na).source+"|$","g"),p="//# sourceURL="+("sourceURL"in c?c.sourceURL:"lodash.templateSources["+ ++Ra+"]")+"\n";a.replace(o,function(b,c,d,e,h,i){return d||(d=e),n+=a.slice(l,i).replace(Oa,r),c&&(f=!0,n+="' +\n__e("+c+") +\n'"),h&&(g=!0,n+="';\n"+h+";\n__p += '"),d&&(n+="' +\n((__t = ("+d+")) == null ? '' : __t) +\n'"),l=i+b.length,b}),n+="';\n";var q=c.variable;q||(n="with (obj) {\n"+n+"\n}\n"),n=(g?n.replace(qa,""):n).replace(ra,"$1").replace(sa,"$1;"),n="function("+(q||"obj")+") {\n"+(q?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(f?", __e = _.escape":"")+(g?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+n+"return __p\n}";var s=Yh(function(){return Rf(i,p+"return "+n).apply(B,k)});if(s.source=n,Ee(s))throw s;return s}function tf(a,b,c){var d=a;return(a=j(a))?(c?$c(d,b,c):null==b)?a.slice(x(a),y(a)+1):(b+="",a.slice(k(a,b),l(a,b)+1)):a}function uf(a,b,c){var d=a;return a=j(a),a?(c?$c(d,b,c):null==b)?a.slice(x(a)):a.slice(k(a,b+"")):a}function vf(a,b,c){var d=a;return a=j(a),a?(c?$c(d,b,c):null==b)?a.slice(0,y(a)+1):a.slice(0,l(a,b+"")+1):a}function wf(a,b,c){c&&$c(a,b,c)&&(b=B);var d=M,e=N;if(null!=b)if(He(b)){var f="separator"in b?b.separator:f;d="length"in b?+b.length||0:d,e="omission"in b?j(b.omission):e}else d=+b||0;if(a=j(a),d>=a.length)return a;var g=d-e.length;if(1>g)return e;var h=a.slice(0,g);if(null==f)return h+e;if(Oe(f)){if(a.slice(g).search(f)){var i,k,l=a.slice(0,g);for(f.global||(f=Vf(f.source,(Ia.exec(f)||"")+"g")),f.lastIndex=0;i=f.exec(l);)k=i.index;h=h.slice(0,null==k?g:k)}}else if(a.indexOf(f,g)!=g){var m=h.lastIndexOf(f);m>-1&&(h=h.slice(0,m))}return h+e}function xf(a){return a=j(a),a&&va.test(a)?a.replace(ta,z):a}function yf(a,b,c){return c&&$c(a,b,c)&&(b=B),a=j(a),a.match(b||Pa)||[]}function zf(a,b,c){return c&&$c(a,b,c)&&(b=B),t(a)?Cf(a):ub(a,b)}function Af(a){return function(){return a}}function Bf(a){return a}function Cf(a){return Nb(vb(a,!0))}function Df(a,b){return Ob(a,vb(b,!0))}function Ef(a,b,c){if(null==c){var d=He(b),e=d?Nh(b):B,f=e&&e.length?Hb(b,e):B;(f?f.length:d)||(f=!1,c=b,b=a,a=this)}f||(f=Hb(b,Nh(b)));var g=!0,h=-1,i=Ge(a),j=f.length;c===!1?g=!1:He(c)&&"chain"in c&&(g=c.chain);for(;++ha||!tg(a))return[];var d=-1,e=Of(wg(a,Cg));for(b=fc(b,c,1);++dd?e[d]=b(d):b(d);return e}function Lf(a){var b=++bg;return j(a)+b}function Mf(a,b){return(+a||0)+(+b||0)}function Nf(a,b,c){return c&&$c(a,b,c)&&(b=B),b=Oc(b,c,3),1==b.length?nb(Ch(a)?a:jd(a),b):$b(a,b)}a=a?eb.defaults(db.Object(),a,eb.pick(db,Qa)):db;var Of=a.Array,Pf=a.Date,Qf=a.Error,Rf=a.Function,Sf=a.Math,Tf=a.Number,Uf=a.Object,Vf=a.RegExp,Wf=a.String,Xf=a.TypeError,Yf=Of.prototype,Zf=Uf.prototype,$f=Wf.prototype,_f=Rf.prototype.toString,ag=Zf.hasOwnProperty,bg=0,cg=Zf.toString,dg=db._,eg=Vf("^"+_f.call(ag).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fg=a.ArrayBuffer,gg=a.clearTimeout,hg=a.parseFloat,ig=Sf.pow,jg=Zf.propertyIsEnumerable,kg=Sc(a,"Set"),lg=a.setTimeout,mg=Yf.splice,ng=a.Uint8Array,og=Sc(a,"WeakMap"),pg=Sf.ceil,qg=Sc(Uf,"create"),rg=Sf.floor,sg=Sc(Of,"isArray"),tg=a.isFinite,ug=Sc(Uf,"keys"),vg=Sf.max,wg=Sf.min,xg=Sc(Pf,"now"),yg=a.parseInt,zg=Sf.random,Ag=Tf.NEGATIVE_INFINITY,Bg=Tf.POSITIVE_INFINITY,Cg=4294967295,Dg=Cg-1,Eg=Cg>>>1,Fg=9007199254740991,Gg=og&&new og,Hg={};b.support={};b.templateSettings={escape:xa,evaluate:ya,interpolate:za,variable:"",imports:{_:b}};var Ig=function(){function a(){}return function(b){if(He(b)){a.prototype=b;var c=new a;a.prototype=B}return c||{}}}(),Jg=lc(Fb),Kg=lc(Gb,!0),Lg=mc(),Mg=mc(!0),Ng=Gg?function(a,b){return Gg.set(a,b),a}:Bf,Og=Gg?function(a){return Gg.get(a)}:Gf,Pg=Rb("length"),Qg=function(){var a=0,b=0;return function(c,d){var e=oh(),f=P-(e-b);if(b=e,f>0){if(++a>=O)return c}else a=0;return Ng(c,d)}}(),Rg=qe(function(a,b){return t(a)&&Yc(a)?xb(a,Db(b,!1,!0)):[]}),Sg=vc(),Tg=vc(!0),Ug=qe(function(a){for(var b=a.length,c=b,d=Of(l),e=Qc(),f=e==h,g=[];c--;){var i=a[c]=Yc(i=a[c])?i:[];d[c]=f&&i.length>=120?oc(c&&i):null}var j=a[0],k=-1,l=j?j.length:0,m=d[0];a:for(;++k2?a[b-2]:B,d=b>1?a[b-1]:B;return b>2&&"function"==typeof c?b-=2:(c=b>1&&"function"==typeof d?(--b,d):B,d=B),a.length=b,Ld(a,c,d)}),ah=qe(function(a){return a=Db(a),this.thru(function(b){return _a(Ch(b)?b:[kd(b)],a)})}),bh=qe(function(a,b){return sb(a,Db(b))}),ch=jc(function(a,b,c){ag.call(a,c)?++a[c]:a[c]=1}),dh=uc(Jg),eh=uc(Kg,!0),fh=yc(bb,Jg),gh=yc(cb,Kg),hh=jc(function(a,b,c){ag.call(a,c)?a[c].push(b):a[c]=[b]}),ih=jc(function(a,b,c){a[c]=b}),jh=qe(function(a,b,c){var d=-1,e="function"==typeof b,f=_c(b),g=Yc(a)?Of(a.length):[];return Jg(a,function(a){var h=e?b:f&&null!=a?a[b]:B;g[++d]=h?h.apply(a,c):Xc(a,b,c)}),g}),kh=jc(function(a,b,c){a[c?0:1].push(b)},function(){return[[],[]]}),lh=Ec(kb,Jg),mh=Ec(lb,Kg),nh=qe(function(a,b){if(null==a)return[];var c=b[2];return c&&$c(b[0],b[1],c)&&(b.length=1),Zb(a,Db(b),[])}),oh=xg||function(){return(new Pf).getTime()},ph=qe(function(a,b,c){var d=D;if(c.length){var e=v(c,ph.placeholder);d|=I}return Kc(a,d,b,c,e)}),qh=qe(function(a,b){b=b.length?Db(b):Xe(a);for(var c=-1,d=b.length;++c0||0>b)?new e(c):(0>a?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==B&&(b=+b||0,c=0>b?c.dropRight(-b):c.take(b-a)),c)},e.prototype.takeRightWhile=function(a,b){return this.reverse().takeWhile(a,b).reverse()},e.prototype.toArray=function(){return this.take(Bg)},Fb(e.prototype,function(a,c){var f=/^(?:filter|map|reject)|While$/.test(c),g=/^(?:first|last)$/.test(c),h=b[g?"take"+("last"==c?"Right":""):c];h&&(b.prototype[c]=function(){var b=g?[1]:arguments,c=this.__chain__,i=this.__wrapped__,j=!!this.__actions__.length,k=i instanceof e,l=b[0],m=k||Ch(i);m&&f&&"function"==typeof l&&1!=l.length&&(k=m=!1);var n=function(a){return g&&c?h(a,1)[0]:h.apply(B,jb([a],b))},o={func:Qd,args:[n],thisArg:B},p=k&&!j;if(g&&!c)return p?(i=i.clone(),i.__actions__.push(o),a.call(i)):h.call(B,this.value())[0];if(!g&&m){i=p?i:new e(this);var q=a.apply(i,b);return q.__actions__.push(o),new d(q,c)}return this.thru(n)})}),bb(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(a){var c=(/^(?:replace|split)$/.test(a)?$f:Yf)[a],d=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",e=/^(?:join|pop|replace|shift)$/.test(a);b.prototype[a]=function(){var a=arguments;return e&&!this.__chain__?c.apply(this.value(),a):this[d](function(b){return c.apply(b,a)})}}),Fb(e.prototype,function(a,c){var d=b[c];if(d){var e=d.name,f=Hg[e]||(Hg[e]=[]);f.push({name:c,func:d})}}),Hg[Fc(B,E).name]=[{name:"wrapper",func:B}],e.prototype.clone=u,e.prototype.reverse=_,e.prototype.value=da,b.prototype.chain=Rd,b.prototype.commit=Sd,b.prototype.concat=ah,b.prototype.plant=Td,b.prototype.reverse=Ud,b.prototype.toString=Vd,b.prototype.run=b.prototype.toJSON=b.prototype.valueOf=b.prototype.value=Wd,b.prototype.collect=b.prototype.map,b.prototype.head=b.prototype.first,b.prototype.select=b.prototype.filter,b.prototype.tail=b.prototype.rest,b}var B,C="3.10.1",D=1,E=2,F=4,G=8,H=16,I=32,J=64,K=128,L=256,M=30,N="...",O=150,P=16,Q=200,R=1,S=2,T="Expected a function",U="__lodash_placeholder__",V="[object Arguments]",W="[object Array]",X="[object Boolean]",Y="[object Date]",Z="[object Error]",$="[object Function]",_="[object Map]",aa="[object Number]",ba="[object Object]",ca="[object RegExp]",da="[object Set]",ea="[object String]",fa="[object WeakMap]",ga="[object ArrayBuffer]",ha="[object Float32Array]",ia="[object Float64Array]",ja="[object Int8Array]",ka="[object Int16Array]",la="[object Int32Array]",ma="[object Uint8Array]",na="[object Uint8ClampedArray]",oa="[object Uint16Array]",pa="[object Uint32Array]",qa=/\b__p \+= '';/g,ra=/\b(__p \+=) '' \+/g,sa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ta=/&(?:amp|lt|gt|quot|#39|#96);/g,ua=/[&<>"'`]/g,va=RegExp(ta.source),wa=RegExp(ua.source),xa=/<%-([\s\S]+?)%>/g,ya=/<%([\s\S]+?)%>/g,za=/<%=([\s\S]+?)%>/g,Aa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,Ba=/^\w*$/,Ca=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Da=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,Ea=RegExp(Da.source),Fa=/[\u0300-\u036f\ufe20-\ufe23]/g,Ga=/\\(\\)?/g,Ha=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ia=/\w*$/,Ja=/^0[xX]/,Ka=/^\[object .+?Constructor\]$/,La=/^\d+$/,Ma=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Na=/($^)/,Oa=/['\n\r\u2028\u2029\\]/g,Pa=function(){var a="[A-Z\\xc0-\\xd6\\xd8-\\xde]",b="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(a+"+(?="+a+b+")|"+a+"?"+b+"|"+a+"+|[0-9]+","g")}(),Qa=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],Ra=-1,Sa={};Sa[ha]=Sa[ia]=Sa[ja]=Sa[ka]=Sa[la]=Sa[ma]=Sa[na]=Sa[oa]=Sa[pa]=!0,Sa[V]=Sa[W]=Sa[ga]=Sa[X]=Sa[Y]=Sa[Z]=Sa[$]=Sa[_]=Sa[aa]=Sa[ba]=Sa[ca]=Sa[da]=Sa[ea]=Sa[fa]=!1;var Ta={};Ta[V]=Ta[W]=Ta[ga]=Ta[X]=Ta[Y]=Ta[ha]=Ta[ia]=Ta[ja]=Ta[ka]=Ta[la]=Ta[aa]=Ta[ba]=Ta[ca]=Ta[ea]=Ta[ma]=Ta[na]=Ta[oa]=Ta[pa]=!0,Ta[Z]=Ta[$]=Ta[_]=Ta[da]=Ta[fa]=!1;var Ua={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Va={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Wa={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Xa={"function":!0,object:!0},Ya={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Za={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$a=Xa[typeof b]&&b&&!b.nodeType&&b,_a=Xa[typeof a]&&a&&!a.nodeType&&a,ab=$a&&_a&&"object"==typeof e&&e&&e.Object&&e,bb=Xa[typeof self]&&self&&self.Object&&self,cb=Xa[typeof window]&&window&&window.Object&&window,db=(_a&&_a.exports===$a&&$a,ab||cb!==(this&&this.window)&&cb||bb||this),eb=A();db._=eb,d=function(){return eb}.call(b,c,b,a),!(d!==B&&(a.exports=d))}).call(this)}).call(b,c(8)(a),function(){return this}())},function(a,b){a.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children=[],a.webpackPolyfill=1),a}},function(a,b,c){"use strict";function d(a,b){var c="normal";return a&&b?c="bolditalics":a?c="bold":b&&(c="italics"),c}function e(a,b){this.fonts={},this.pdfDoc=b,this.fontWrappers={};for(var c in a)if(a.hasOwnProperty(c)){var d=a[c];this.fonts[c]={normal:d.normal,bold:d.bold,italics:d.italics,bolditalics:d.bolditalics}}}var f=c(7),g=c(10);e.prototype.provideFont=function(a,b,c){var e=d(b,c);if(!this.fonts[a]||!this.fonts[a][e])throw new Error("Font '"+a+"' in style '"+e+"' is not defined in the font section of the document definition.");return this.fontWrappers[a]=this.fontWrappers[a]||{},this.fontWrappers[a][e]||(this.fontWrappers[a][e]=new g(this.pdfDoc,this.fonts[a][e],a+"("+e+")")),this.fontWrappers[a][e]},e.prototype.setFontRefsToPdfDoc=function(){var a=this;f.each(a.fontWrappers,function(b){f.each(b,function(b){f.each(b.pdfFonts,function(b){a.pdfDoc.page.fonts[b.id]||(a.pdfDoc.page.fonts[b.id]=b.ref())})})})},a.exports=e},function(a,b,c){"use strict";function d(a,b,c){this.MAX_CHAR_TYPES=92,this.pdfkitDoc=a,this.path=b,this.pdfFonts=[],this.charCatalogue=[],this.name=c,Object.defineProperty(this,"ascender",{get:function(){var a=this.getFont(0);return a.ascender}}),Object.defineProperty(this,"decender",{get:function(){var a=this.getFont(0);return a.decender}})}var e=c(7);d.prototype.getFont=function(a){if(!this.pdfFonts[a]){var b=this.name+a;this.postscriptName&&delete this.pdfkitDoc._fontFamilies[this.postscriptName],this.pdfFonts[a]=this.pdfkitDoc.font(this.path,b)._font,this.postscriptName||(this.postscriptName=this.pdfFonts[a].name)}return this.pdfFonts[a]},d.prototype.widthOfString=function(){var a=this.getFont(0);return a.widthOfString.apply(a,arguments)},d.prototype.lineHeight=function(){var a=this.getFont(0);return a.lineHeight.apply(a,arguments)},d.prototype.ref=function(){var a=this.getFont(0);return a.ref.apply(a,arguments)};var f=function(a){return a.charCodeAt(0)};d.prototype.encode=function(a){var b=this,c=e.chain(a.split("")).map(f).uniq().value();if(c.length>b.MAX_CHAR_TYPES)throw new Error("Inline has more than "+b.MAX_CHAR_TYPES+": "+a+" different character types and therefore cannot be properly embedded into pdf.");var d=function(a){return e.uniq(a.concat(c)).length<=b.MAX_CHAR_TYPES},g=e.findIndex(b.charCatalogue,d);0>g&&(g=b.charCatalogue.length,b.charCatalogue[g]=[]);var h=b.getFont(g);h.use(a),e.each(c,function(a){e.includes(b.charCatalogue[g],a)||b.charCatalogue[g].push(a)});var i=e.map(h.encode(a),function(a){return a.charCodeAt(0).toString(16)}).join("");return{encodedText:i,fontId:h.id}},a.exports=d},function(a,b,c){"use strict";function d(a,b){g.each(b,function(b){a.push(b)})}function e(a,b,c){this.pageSize=a,this.pageMargins=b,this.tracker=new h,this.imageMeasure=c,this.tableLayouts={}}function f(a){var b=a.x,c=a.y;a.positions=[],g.each(a.canvas,function(a){var b=a.x,c=a.y,d=a.x1,e=a.y1,f=a.x2,g=a.y2;a.resetXY=function(){a.x=b,a.y=c,a.x1=d,a.y1=e,a.x2=f,a.y2=g}}),a.resetXY=function(){a.x=b,a.y=c,g.each(a.canvas,function(a){a.resetXY()})}}var g=c(7),h=c(12),i=c(13),j=c(19),k=c(20),l=c(16),m=c(23),n=c(22),o=c(17).pack,p=c(17).offsetVector,q=c(17).fontStringify,r=c(17).isFunction,s=c(14),t=c(15);e.prototype.registerTableLayouts=function(a){this.tableLayouts=o(this.tableLayouts,a)},e.prototype.layoutDocument=function(a,b,c,d,e,f,h,j,k,l){function m(a,b){return r(l)?(a=g.reject(a,function(a){return g.isEmpty(a.positions)}),g.each(a,function(a){var c=g.pick(a,["id","text","ul","ol","table","image","qr","canvas","columns","headlineLevel","style","pageBreak","pageOrientation","width","height"]);c.startPosition=g.first(a.positions),c.pageNumbers=g.chain(a.positions).map("pageNumber").uniq().value(),c.pages=b.length,c.stack=g.isArray(a.stack),a.nodeInfo=c}),g.any(a,function(a,b,c){if("before"!==a.pageBreak&&!a.pageBreakCalculated){a.pageBreakCalculated=!0;var d=g.first(a.nodeInfo.pageNumbers),e=g.chain(c).drop(b+1).filter(function(a){return g.contains(a.nodeInfo.pageNumbers,d)}).value(),f=g.chain(c).drop(b+1).filter(function(a){return g.contains(a.nodeInfo.pageNumbers,d+1)}).value(),h=g.chain(c).take(b).filter(function(a){return g.contains(a.nodeInfo.pageNumbers,d)}).value();if(l(a.nodeInfo,g.map(e,"nodeInfo"),g.map(f,"nodeInfo"),g.map(h,"nodeInfo")))return a.pageBreak="before",!0}})):!1}function n(a){g.each(a.linearNodeList,function(a){a.resetXY()})}this.docMeasure=new i(b,c,d,this.imageMeasure,this.tableLayouts,j);for(var o=this.tryLayoutDocument(a,b,c,d,e,f,h,j,k);m(o.linearNodeList,o.pages);)n(o),o=this.tryLayoutDocument(a,b,c,d,e,f,h,j,k);return o.pages},e.prototype.tryLayoutDocument=function(a,b,c,d,e,f,g,h,i,l){this.linearNodeList=[],a=this.docMeasure.measureDocument(a),this.writer=new k(new j(this.pageSize,this.pageMargins),this.tracker);var m=this;return this.writer.context().tracker.startTracking("pageAdded",function(){m.addBackground(e)}),this.addBackground(e),this.processNode(a),this.addHeadersAndFooters(f,g),null!=i&&this.addWatermark(i,b),{pages:this.writer.context().pages,linearNodeList:this.linearNodeList}},e.prototype.addBackground=function(a){var b=r(a)?a:function(){return a},c=b(this.writer.context().page+1);if(c){var d=this.writer.context().getCurrentPage().pageSize;this.writer.beginUnbreakableBlock(d.width,d.height),this.processNode(this.docMeasure.measureDocument(c)),this.writer.commitUnbreakableBlock(0,0)}},e.prototype.addStaticRepeatable=function(a,b){this.addDynamicRepeatable(function(){return a},b)},e.prototype.addDynamicRepeatable=function(a,b){for(var c=this.writer.context().pages,d=0,e=c.length;e>d;d++){this.writer.context().page=d;var f=a(d+1,e);if(f){var g=b(this.writer.context().getCurrentPage().pageSize,this.pageMargins);this.writer.beginUnbreakableBlock(g.width,g.height),this.processNode(this.docMeasure.measureDocument(f)),this.writer.commitUnbreakableBlock(g.x,g.y)}}},e.prototype.addHeadersAndFooters=function(a,b){var c=function(a,b){return{x:0,y:0,width:a.width,height:b.top}},d=function(a,b){return{x:0,y:a.height-b.bottom,width:a.width,height:b.bottom}};r(a)?this.addDynamicRepeatable(a,c):a&&this.addStaticRepeatable(a,c),r(b)?this.addDynamicRepeatable(b,d):b&&this.addStaticRepeatable(b,d)},e.prototype.addWatermark=function(a,b){function c(a,b,c){for(var d,e=a.width,f=a.height,g=.8*Math.sqrt(e*e+f*f),h=new s(c),i=new t,j=0,k=1e3,l=(j+k)/2;Math.abs(j-k)>1;)i.push({fontSize:l}),d=h.sizeOfString(b,i),d.width>g?(k=l,l=(j+k)/2):d.widthg;g++)f[g].watermark=e},e.prototype.processNode=function(a){function b(b){var d=a._margin;"before"===a.pageBreak&&c.writer.moveToNextPage(a.pageOrientation),d&&(c.writer.context().moveDown(d[1]),c.writer.context().addMargin(d[0],d[2])),b(),d&&(c.writer.context().addMargin(-d[0],-d[2]),c.writer.context().moveDown(d[3])),"after"===a.pageBreak&&c.writer.moveToNextPage(a.pageOrientation)}var c=this;this.linearNodeList.push(a),f(a),b(function(){var b=a.absolutePosition;if(b&&(c.writer.context().beginDetachedBlock(),c.writer.context().moveTo(b.x||0,b.y||0)),a.stack)c.processVerticalContainer(a);else if(a.columns)c.processColumns(a);else if(a.ul)c.processList(!1,a);else if(a.ol)c.processList(!0,a);else if(a.table)c.processTable(a);else if(void 0!==a.text)c.processLeaf(a);else if(a.image)c.processImage(a);else if(a.canvas)c.processCanvas(a);else if(a.qr)c.processQr(a);else if(!a._span)throw"Unrecognized document structure: "+JSON.stringify(a,q);b&&c.writer.context().endDetachedBlock()})},e.prototype.processVerticalContainer=function(a){var b=this;a.stack.forEach(function(c){b.processNode(c),d(a.positions,c.positions)})},e.prototype.processColumns=function(a){function b(a){if(!a)return null;var b=[];b.push(0);for(var d=c.length-1;d>0;d--)b.push(a);return b}var c=a.columns,e=this.writer.context().availableWidth,f=b(a._gap);f&&(e-=(f.length-1)*a._gap),l.buildColumnWidths(c,e);var g=this.processRow(c,c,f);d(a.positions,g.positions)},e.prototype.processRow=function(a,b,c,e,f){function g(a){for(var b,c=0,d=k.length;d>c;c++){var e=k[c];if(e.prevPage===a.prevPage){b=e;break}}b||(b=a,k.push(b)),b.prevY=Math.max(b.prevY,a.prevY),b.y=Math.min(b.y,a.y)}function h(a){return c&&c.length>a?c[a]:0}function i(a,b){if(a.rowSpan&&a.rowSpan>1){var c=f+a.rowSpan-1;if(c>=e.length)throw"Row span for column "+b+" (with indexes starting from 0) exceeded row count";return e[c][b]}return null}var j=this,k=[],l=[];return this.tracker.auto("pageChanged",g,function(){b=b||a,j.writer.context().beginColumnGroup();for(var e=0,f=a.length;f>e;e++){var g=a[e],k=b[e]._calcWidth,m=h(e);if(g.colSpan&&g.colSpan>1)for(var n=1;nc;c++){b.beginRow(c,this.writer);var f=this.processRow(a.table.body[c],a.table.widths,a._offsets.offsets,a.table.body,c);d(a.positions,f.positions),b.endRow(c,this.writer,f.pageBreaks)}b.endTable(this.writer)},e.prototype.processLeaf=function(a){for(var b=this.buildNextLine(a),c=b?b.getHeight():0,d=a.maxHeight||-1;b&&(-1===d||d>c);){var e=this.writer.addLine(b);a.positions.push(e),b=this.buildNextLine(a),b&&(c+=b.getHeight())}},e.prototype.buildNextLine=function(a){if(!a._inlines||0===a._inlines.length)return null;for(var b=new n(this.writer.context().availableWidth);a._inlines&&a._inlines.length>0&&b.hasEnoughSpaceForInline(a._inlines[0]);)b.addInline(a._inlines.shift());return b.lastLineInParagraph=0===a._inlines.length,b},e.prototype.processImage=function(a){var b=this.writer.addImage(a);a.positions.push(b)},e.prototype.processCanvas=function(a){var b=a._minHeight;this.writer.context().availableHeight=0&&c.splice(d,1)}},c.prototype.emit=function(a){var b=Array.prototype.slice.call(arguments,1),c=this.events[a];c&&c.forEach(function(a){a.apply(this,b)})},c.prototype.auto=function(a,b,c){this.startTracking(a,b),c(),this.stopTracking(a,b)},a.exports=c},function(a,b,c){"use strict";function d(a,b,c,d,g,h){this.textTools=new e(a),this.styleStack=new f(b,c),this.imageMeasure=d,this.tableLayouts=g,this.images=h,this.autoImageIndex=1}var e=c(14),f=c(15),g=c(16),h=c(17).fontStringify,i=c(17).pack,j=c(18);d.prototype.measureDocument=function(a){return this.measureNode(a)},d.prototype.measureNode=function(a){function b(a){var b=a._margin;return b&&(a._minWidth+=b[0]+b[2],a._maxWidth+=b[0]+b[2]),a}function c(){function b(a,b){return a.marginLeft||a.marginTop||a.marginRight||a.marginBottom?[a.marginLeft||b[0]||0,a.marginTop||b[1]||0,a.marginRight||b[2]||0,a.marginBottom||b[3]||0]:b}function c(a){for(var b={},c=a.length-1;c>=0;c--){var e=a[c],f=d.styleStack.styleDictionary[e];for(var g in f)f.hasOwnProperty(g)&&(b[g]=f[g])}return b}function e(a){return"number"==typeof a||a instanceof Number?a=[a,a,a,a]:a instanceof Array&&2===a.length&&(a=[a[0],a[1],a[0],a[1]]),a}var f=[void 0,void 0,void 0,void 0];if(a.style){var g=a.style instanceof Array?a.style:[a.style],h=c(g);h&&(f=b(h,f)),h.margin&&(f=e(h.margin))}return f=b(a,f),a.margin&&(f=e(a.margin)),void 0===f[0]&&void 0===f[1]&&void 0===f[2]&&void 0===f[3]?null:f}a instanceof Array?a={stack:a}:("string"==typeof a||a instanceof String)&&(a={text:a}),0===Object.keys(a).length&&(a={text:""});var d=this;return this.styleStack.auto(a,function(){if(a._margin=c(a),a.columns)return b(d.measureColumns(a));if(a.stack)return b(d.measureVerticalContainer(a));if(a.ul)return b(d.measureList(!1,a));if(a.ol)return b(d.measureList(!0,a));if(a.table)return b(d.measureTable(a));if(void 0!==a.text)return b(d.measureLeaf(a));if(a.image)return b(d.measureImage(a));if(a.canvas)return b(d.measureCanvas(a));if(a.qr)return b(d.measureQr(a));throw"Unrecognized document structure: "+JSON.stringify(a,h)})},d.prototype.convertIfBase64Image=function(a){if(/^data:image\/(jpeg|jpg|png);base64,/.test(a.image)){var b="$$pdfmake$$"+this.autoImageIndex++;this.images[b]=a.image,a.image=b}},d.prototype.measureImage=function(a){this.images&&this.convertIfBase64Image(a);var b=this.imageMeasure.measureImage(a.image);if(a.fit){var c=b.width/b.height>a.fit[0]/a.fit[1]?a.fit[0]/b.width:a.fit[1]/b.height;a._width=a._minWidth=a._maxWidth=b.width*c,a._height=b.height*c}else a._width=a._minWidth=a._maxWidth=a.width||b.width,a._height=a.height||b.height*a._width/b.width;return a._alignment=this.styleStack.getProperty("alignment"),a},d.prototype.measureLeaf=function(a){var b=this.styleStack.clone();b.push(a);var c=this.textTools.buildInlines(a.text,b);return a._inlines=c.items,a._minWidth=c.minWidth,a._maxWidth=c.maxWidth,a},d.prototype.measureVerticalContainer=function(a){var b=a.stack;a._minWidth=0,a._maxWidth=0;for(var c=0,d=b.length;d>c;c++)b[c]=this.measureNode(b[c]),a._minWidth=Math.max(a._minWidth,b[c]._minWidth),a._maxWidth=Math.max(a._maxWidth,b[c]._maxWidth);return a},d.prototype.gapSizeForList=function(a,b){if(a){var c=b.length.toString().replace(/./g,"9");return this.textTools.sizeOfString(c+". ",this.styleStack)}return this.textTools.sizeOfString("9. ",this.styleStack)},d.prototype.buildMarker=function(a,b,c,d){var e;if(a)e={_inlines:this.textTools.buildInlines(b,c).items};else{var f=d.fontSize/6;e={canvas:[{x:f,y:d.height/d.lineHeight+d.decender-d.fontSize/3,r1:f,r2:f,type:"ellipse",color:"black"}]}}return e._minWidth=e._maxWidth=d.width,e._minHeight=e._maxHeight=d.height,e},d.prototype.measureList=function(a,b){var c=this.styleStack.clone(),d=a?b.ol:b.ul;b._gapSize=this.gapSizeForList(a,d),b._minWidth=0,b._maxWidth=0;for(var e=1,f=0,g=d.length;g>f;f++){var h=d[f]=this.measureNode(d[f]),i=e++ +". ";h.ol||h.ul||(h.listMarker=this.buildMarker(a,h.counter||i,c,b._gapSize)),b._minWidth=Math.max(b._minWidth,d[f]._minWidth+b._gapSize.width),b._maxWidth=Math.max(b._maxWidth,d[f]._maxWidth+b._gapSize.width)}return b},d.prototype.measureColumns=function(a){var b=a.columns;a._gap=this.styleStack.getProperty("columnGap")||0;for(var c=0,d=b.length;d>c;c++)b[c]=this.measureNode(b[c]);var e=g.measureMinMax(b);return a._minWidth=e.min+a._gap*(b.length-1),a._maxWidth=e.max+a._gap*(b.length-1),a},d.prototype.measureTable=function(a){function b(a,b){return function(){return null!==b&&"object"==typeof b&&(b.fillColor=a.styleStack.getProperty("fillColor")),a.measureNode(b)}}function c(b){var c=a.layout;("string"==typeof a.layout||a instanceof String)&&(c=b[c]);var d={hLineWidth:function(a,b){return 1},vLineWidth:function(a,b){return 1},hLineColor:function(a,b){return"black"},vLineColor:function(a,b){return"black"},paddingLeft:function(a,b){return 4},paddingRight:function(a,b){return 4},paddingTop:function(a,b){return 2},paddingBottom:function(a,b){return 2}};return i(d,c)}function d(b){for(var c=[],d=0,e=0,f=0,g=a.table.widths.length;g>f;f++){var h=e+b.vLineWidth(f,a)+b.paddingLeft(f,a);c.push(h),d+=h,e=b.paddingRight(f,a)}return d+=e+b.vLineWidth(a.table.widths.length,a),{total:d,offsets:c}}function e(){for(var b,c,d=0,e=p.length;e>d;d++){var g=p[d],h=f(g.col,g.span,a._offsets),i=g.minWidth-h.minWidth,j=g.maxWidth-h.maxWidth;if(i>0)for(b=i/g.span,c=0;c0)for(b=j/g.span,c=0;cf;f++)e.minWidth+=a.table.widths[b+f]._minWidth+(f?d.offsets[b+f]:0),e.maxWidth+=a.table.widths[b+f]._maxWidth+(f?d.offsets[b+f]:0);return e}function h(a,b,c){for(var d=1;c>d;d++)a[b+d]={_span:!0,_minWidth:0,_maxWidth:0,rowSpan:a[b].rowSpan}}function j(a,b,c,d){for(var e=1;d>e;e++)a.body[b+e][c]={_span:!0,_minWidth:0,_maxWidth:0,fillColor:a.body[b][c].fillColor}}function k(a){if(a.table.widths||(a.table.widths="auto"),"string"==typeof a.table.widths||a.table.widths instanceof String)for(a.table.widths=[a.table.widths];a.table.widths.lengthb;b++){var d=a.table.widths[b];("number"==typeof d||d instanceof Number||"string"==typeof d||d instanceof String)&&(a.table.widths[b]={width:d})}}k(a),a._layout=c(this.tableLayouts),a._offsets=d(a._layout);var l,m,n,o,p=[];for(l=0,n=a.table.body[0].length;n>l;l++){var q=a.table.widths[l];for(q._minWidth=0,q._maxWidth=0,m=0,o=a.table.body.length;o>m;m++){var r=a.table.body[m],s=r[l];if(!s._span){s=r[l]=this.styleStack.auto(s,b(this,s)),s.colSpan&&s.colSpan>1?(h(r,l,s.colSpan),p.push({col:l,span:s.colSpan,minWidth:s._minWidth,maxWidth:s._maxWidth})):(q._minWidth=Math.max(q._minWidth,s._minWidth),q._maxWidth=Math.max(q._maxWidth,s._maxWidth))}s.rowSpan&&s.rowSpan>1&&j(a.table,m,l,s.rowSpan)}}e();var t=g.measureMinMax(a.table.widths);return a._minWidth=t.min+a._offsets.total,a._maxWidth=t.max+a._offsets.total,a},d.prototype.measureCanvas=function(a){for(var b=0,c=0,d=0,e=a.canvas.length;e>d;d++){var f=a.canvas[d];switch(f.type){case"ellipse":b=Math.max(b,f.x+f.r1),c=Math.max(c,f.y+f.r2);break;case"rect":b=Math.max(b,f.x+f.w),c=Math.max(c,f.y+f.h);break;case"line":b=Math.max(b,f.x1,f.x2),c=Math.max(c,f.y1,f.y2);break;case"polyline":for(var g=0,h=f.points.length;h>g;g++)b=Math.max(b,f.points[g].x),c=Math.max(c,f.points[g].y)}}return a._minWidth=a._maxWidth=b,a._minHeight=a._maxHeight=c,a},d.prototype.measureQr=function(a){return a=j.measure(a),a._alignment=this.styleStack.getProperty("alignment"),a},a.exports=d},function(a,b){"use strict";function c(a){this.fontProvider=a}function d(a,b){var c=[];a=a.replace(" "," ");var d;d=b?[a,""]:a.match(j);for(var e=0,f=d.length;f-1>e;e++){var g=d[e],h=0===g.length;if(h){var i=0===c.length||c[c.length-1].lineEnd;i?c.push({text:"",lineEnd:!0}):c[c.length-1].lineEnd=!0}else c.push({text:g})}return c}function e(a,b){b=b||{},a=a||{};for(var c in a)"text"!=c&&a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function f(a){var b=[];("string"==typeof a||a instanceof String)&&(a=[a]);for(var c=0,f=a.length;f>c;c++){var g,h=a[c],i=null;"string"==typeof h||h instanceof String?g=d(h):(g=d(h.text,h.noWrap),i=e(h));for(var j=0,k=g.length;k>j;j++){var l={text:g[j].text};g[j].lineEnd&&(l.lineEnd=!0),e(i,l),b.push(l)}}return b}function g(a){return a.replace(/[^A-Za-z0-9\[\] ]/g,function(a){return m[a]||a})}function h(a,b,c,d){var e;return void 0!==a[c]&&null!==a[c]?a[c]:b?(b.auto(a,function(){e=b.getProperty(c)}),null!==e&&void 0!==e?e:d):d}function i(a,b,c){var d=f(b);return d.forEach(function(b){var d=h(b,c,"font","Roboto"),e=h(b,c,"fontSize",12),f=h(b,c,"bold",!1),i=h(b,c,"italics",!1),j=h(b,c,"color","black"),m=h(b,c,"decoration",null),n=h(b,c,"decorationColor",null),o=h(b,c,"decorationStyle",null),p=h(b,c,"background",null),q=h(b,c,"lineHeight",1),r=a.provideFont(d,f,i);b.width=r.widthOfString(g(b.text),e),b.height=r.lineHeight(e)*q;var s=b.text.match(k),t=b.text.match(l);s?b.leadingCut=r.widthOfString(s[0],e):b.leadingCut=0, -t?b.trailingCut=r.widthOfString(t[0],e):b.trailingCut=0,b.alignment=h(b,c,"alignment","left"),b.font=r,b.fontSize=e,b.color=j,b.decoration=m,b.decorationColor=n,b.decorationStyle=o,b.background=p}),d}var j=/([^ ,\/!.?:;\-\n]*[ ,\/!.?:;\-]*)|\n/g,k=/^(\s)+/g,l=/(\s)+$/g;c.prototype.buildInlines=function(a,b){function c(a){return Math.max(0,a.width-a.leadingCut-a.trailingCut)}var d,e=i(this.fontProvider,a,b),f=0,g=0;return e.forEach(function(a){f=Math.max(f,a.width-a.leadingCut-a.trailingCut),d||(d={width:0,leadingCut:a.leadingCut,trailingCut:0}),d.width+=a.width,d.trailingCut=a.trailingCut,g=Math.max(g,c(d)),a.lineEnd&&(d=null)}),h({},b,"noWrap",!1)&&(f=g),{items:e,minWidth:f,maxWidth:g}},c.prototype.sizeOfString=function(a,b){a=a.replace(" "," ");var c=h({},b,"font","Roboto"),d=h({},b,"fontSize",12),e=h({},b,"bold",!1),f=h({},b,"italics",!1),i=h({},b,"lineHeight",1),j=this.fontProvider.provideFont(c,e,f);return{width:j.widthOfString(g(a),d),height:j.lineHeight(d)*i,fontSize:d,lineHeight:i,ascender:j.ascender/1e3*d,decender:j.decender/1e3*d}};var m={"Ą":"A","Ć":"C","Ę":"E","Ł":"L","Ń":"N","Ó":"O","Ś":"S","Ź":"Z","Ż":"Z","ą":"a","ć":"c","ę":"e","ł":"l","ń":"n","ó":"o","ś":"s","ź":"z","ż":"z"};a.exports=c},function(a,b){"use strict";function c(a,b){this.defaultStyle=b||{},this.styleDictionary=a,this.styleOverrides=[]}c.prototype.clone=function(){var a=new c(this.styleDictionary,this.defaultStyle);return this.styleOverrides.forEach(function(b){a.styleOverrides.push(b)}),a},c.prototype.push=function(a){this.styleOverrides.push(a)},c.prototype.pop=function(a){for(a=a||1;a-- >0;)this.styleOverrides.pop()},c.prototype.autopush=function(a){if("string"==typeof a||a instanceof String)return 0;var b=[];a.style&&(b=a.style instanceof Array?a.style:[a.style]);for(var c=0,d=b.length;d>c;c++)this.push(b[c]);var e={},f=!1;return["font","fontSize","bold","italics","alignment","color","columnGap","fillColor","decoration","decorationStyle","decorationColor","background","lineHeight","noWrap"].forEach(function(b){void 0!==a[b]&&null!==a[b]&&(e[b]=a[b],f=!0)}),f&&this.push(e),b.length+(f?1:0)},c.prototype.auto=function(a,b){var c=this.autopush(a),d=b();return c>0&&this.pop(c),d},c.prototype.getProperty=function(a){if(this.styleOverrides)for(var b=this.styleOverrides.length-1;b>=0;b--){var c=this.styleOverrides[b];if("string"==typeof c||c instanceof String){var d=this.styleDictionary[c];if(d&&null!==d[a]&&void 0!==d[a])return d[a]}else if(void 0!==c[a]&&null!==c[a])return c[a]}return this.defaultStyle&&this.defaultStyle[a]},a.exports=c},function(a,b){"use strict";function c(a,b){var c=[],f=0,g=0,h=[],i=0,j=0,k=[],l=b;a.forEach(function(a){d(a)?(c.push(a),f+=a._minWidth,g+=a._maxWidth):e(a)?(h.push(a),i=Math.max(i,a._minWidth),j=Math.max(j,a._maxWidth)):k.push(a)}),k.forEach(function(a){"string"==typeof a.width&&/\d+%/.test(a.width)&&(a.width=parseFloat(a.width)*l/100),a.width=b)c.forEach(function(a){a._calcWidth=a._minWidth}),h.forEach(function(a){a._calcWidth=i});else{if(b>n)c.forEach(function(a){a._calcWidth=a._maxWidth,b-=a._calcWidth});else{var o=b-m,p=n-m;c.forEach(function(a){var c=a._maxWidth-a._minWidth;a._calcWidth=a._minWidth+c*o/p,b-=a._calcWidth})}if(h.length>0){var q=b/h.length;h.forEach(function(a){a._calcWidth=q})}}}function d(a){return"auto"===a.width}function e(a){return null===a.width||void 0===a.width||"*"===a.width||"star"===a.width}function f(a){for(var b={min:0,max:0},c={min:0,max:0},f=0,g=0,h=a.length;h>g;g++){var i=a[g];e(i)?(c.min=Math.max(c.min,i._minWidth),c.max=Math.max(c.max,i._maxWidth),f++):d(i)?(b.min+=i._minWidth,b.max+=i._maxWidth):(b.min+=void 0!==i.width&&i.width||i._minWidth,b.max+=void 0!==i.width&&i.width||i._maxWidth)}return f&&(b.min+=f*c.min,b.max+=f*c.max),b}a.exports={buildColumnWidths:c,measureMinMax:f,isAutoColumn:d,isStarColumn:e}},function(a,b){"use strict";function c(){for(var a={},b=0,c=arguments.length;c>b;b++){var d=arguments[b];if(d)for(var e in d)d.hasOwnProperty(e)&&(a[e]=d[e])}return a}function d(a,b,c){switch(a.type){case"ellipse":case"rect":a.x+=b,a.y+=c;break;case"line":a.x1+=b,a.x2+=b,a.y1+=c,a.y2+=c;break;case"polyline":for(var d=0,e=a.points.length;e>d;d++)a.points[d].x+=b,a.points[d].y+=c}}function e(a,b){return"font"===a?"font":b}function f(a){var b={};return a&&"[object Function]"===b.toString.call(a)}a.exports={pack:c,fontStringify:e,offsetVector:d,isFunction:f}},function(a,b){"use strict";function c(a,b){var c={numeric:h,alphanumeric:i,octet:j},d={L:o,M:p,Q:q,H:r};b=b||{};var e=b.version||-1,f=d[(b.eccLevel||"L").toUpperCase()],g=b.mode?c[b.mode.toLowerCase()]:-1,k="mask"in b?b.mask:-1;if(0>g)g="string"==typeof a?a.match(l)?h:a.match(n)?i:j:j;else if(g!=h&&g!=i&&g!=j)throw"invalid or unsupported mode";if(a=K(g,a),null===a)throw"invalid data format";if(0>f||f>3)throw"invalid ECC level";if(0>e){for(e=1;40>=e&&!(a.length<=J(e,g,f));++e);if(e>40)throw"too large data for the Qr format"}else if(1>e||e>40)throw"invalid Qr version! should be between 1 and 40";if(-1!=k&&(0>k||k>8))throw"invalid mask";return U(a,e,g,f,k)}function d(a,b){var d=[],e=a.background||"#fff",f=a.foreground||"#000",g=c(a,b),h=g.length,i=Math.floor(b.fit?b.fit/h:5),j=h*i;d.push({type:"rect",x:0,y:0,w:j,h:j,lineWidth:0,color:e});for(var k=0;h>k;++k)for(var l=0;h>l;++l)g[k][l]&&d.push({type:"rect",x:i*k,y:i*l,w:i,h:i,lineWidth:0,color:f});return{canvas:d,size:j}}function e(a){var b=d(a.qr,a);return a._canvas=b.canvas,a._width=a._height=a._minWidth=a._maxWidth=a._minHeight=a._maxHeight=b.size,a}for(var f=[null,[[10,7,17,13],[1,1,1,1],[]],[[16,10,28,22],[1,1,1,1],[4,16]],[[26,15,22,18],[1,1,2,2],[4,20]],[[18,20,16,26],[2,1,4,2],[4,24]],[[24,26,22,18],[2,1,4,4],[4,28]],[[16,18,28,24],[4,2,4,4],[4,32]],[[18,20,26,18],[4,2,5,6],[4,20,36]],[[22,24,26,22],[4,2,6,6],[4,22,40]],[[22,30,24,20],[5,2,8,8],[4,24,44]],[[26,18,28,24],[5,4,8,8],[4,26,48]],[[30,20,24,28],[5,4,11,8],[4,28,52]],[[22,24,28,26],[8,4,11,10],[4,30,56]],[[22,26,22,24],[9,4,16,12],[4,32,60]],[[24,30,24,20],[9,4,16,16],[4,24,44,64]],[[24,22,24,30],[10,6,18,12],[4,24,46,68]],[[28,24,30,24],[10,6,16,17],[4,24,48,72]],[[28,28,28,28],[11,6,19,16],[4,28,52,76]],[[26,30,28,28],[13,6,21,18],[4,28,54,80]],[[26,28,26,26],[14,7,25,21],[4,28,56,84]],[[26,28,28,30],[16,8,25,20],[4,32,60,88]],[[26,28,30,28],[17,8,25,23],[4,26,48,70,92]],[[28,28,24,30],[17,9,34,23],[4,24,48,72,96]],[[28,30,30,30],[18,9,30,25],[4,28,52,76,100]],[[28,30,30,30],[20,10,32,27],[4,26,52,78,104]],[[28,26,30,30],[21,12,35,29],[4,30,56,82,108]],[[28,28,30,28],[23,12,37,34],[4,28,56,84,112]],[[28,30,30,30],[25,12,40,34],[4,32,60,88,116]],[[28,30,30,30],[26,13,42,35],[4,24,48,72,96,120]],[[28,30,30,30],[28,14,45,38],[4,28,52,76,100,124]],[[28,30,30,30],[29,15,48,40],[4,24,50,76,102,128]],[[28,30,30,30],[31,16,51,43],[4,28,54,80,106,132]],[[28,30,30,30],[33,17,54,45],[4,32,58,84,110,136]],[[28,30,30,30],[35,18,57,48],[4,28,56,84,112,140]],[[28,30,30,30],[37,19,60,51],[4,32,60,88,116,144]],[[28,30,30,30],[38,19,63,53],[4,28,52,76,100,124,148]],[[28,30,30,30],[40,20,66,56],[4,22,48,74,100,126,152]],[[28,30,30,30],[43,21,70,59],[4,26,52,78,104,130,156]],[[28,30,30,30],[45,22,74,62],[4,30,56,82,108,134,160]],[[28,30,30,30],[47,24,77,65],[4,24,52,80,108,136,164]],[[28,30,30,30],[49,25,81,68],[4,28,56,84,112,140,168]]],g=0,h=1,i=2,j=4,k=8,l=/^\d*$/,m=/^[A-Za-z0-9 $%*+\-.\/:]*$/,n=/^[A-Z0-9 $%*+\-.\/:]*$/,o=1,p=0,q=3,r=2,s=[],t=[-1],u=0,v=1;255>u;++u)s.push(v),t[v]=u,v=2*v^(v>=128?285:0);for(var w=[[]],u=0;30>u;++u){for(var x=w[u],y=[],z=0;u>=z;++z){var A=u>z?s[x[z]]:0,B=s[(u+(x[z-1]||0))%255];y.push(t[A^B])}w.push(y)}for(var C={},u=0;45>u;++u)C["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".charAt(u)]=u;var D=[function(a,b){return(a+b)%2===0},function(a,b){return a%2===0},function(a,b){return b%3===0},function(a,b){return(a+b)%3===0},function(a,b){return((a/2|0)+(b/3|0))%2===0},function(a,b){return a*b%2+a*b%3===0},function(a,b){return(a*b%2+a*b%3)%2===0},function(a,b){return((a+b)%2+a*b%3)%2===0}],E=function(a){return a>6},F=function(a){return 4*a+17},G=function(a){var b=f[a],c=16*a*a+128*a+64;return E(a)&&(c-=36),b[2].length&&(c-=25*b[2].length*b[2].length-10*b[2].length-55),c},H=function(a,b){var c=-8&G(a),d=f[a];return c-=8*d[0][b]*d[1][b]},I=function(a,b){switch(b){case h:return 10>a?10:27>a?12:14;case i:return 10>a?9:27>a?11:13;case j:return 10>a?8:16;case k:return 10>a?8:27>a?10:12}},J=function(a,b,c){var d=H(a,c)-4-I(a,b);switch(b){case h:return 3*(d/10|0)+(4>d%10?0:7>d%10?1:2);case i:return 2*(d/11|0)+(6>d%11?0:1);case j:return d/8|0;case k:return d/13|0}},K=function(a,b){switch(a){case h:return b.match(l)?b:null;case i:return b.match(m)?b.toUpperCase():null;case j:if("string"==typeof b){for(var c=[],d=0;de?c.push(e):2048>e?c.push(192|e>>6,128|63&e):65536>e?c.push(224|e>>12,128|e>>6&63,128|63&e):c.push(240|e>>18,128|e>>12&63,128|e>>6&63,128|63&e)}return c}return b}},L=function(a,b,c,d){var e=[],f=0,k=8,l=c.length,m=function(a,b){if(b>=k){for(e.push(f|a>>(b-=k));b>=8;)e.push(a>>(b-=8)&255);f=0,k=8}b>0&&(f|=(a&(1<o;o+=3)m(parseInt(c.substring(o-2,o+1),10),10);m(parseInt(c.substring(o-2),10),[0,4,7][l%3]);break;case i:for(var o=1;l>o;o+=2)m(45*C[c.charAt(o-1)]+C[c.charAt(o)],11);l%2==1&&m(C[c.charAt(o-1)],6);break;case j:for(var o=0;l>o;++o)m(c[o],8)}for(m(g,4),8>k&&e.push(f);e.length+1f;++f)c.push(0);for(var f=0;d>f;){var g=t[c[f++]];if(g>=0)for(var h=0;e>h;++h)c[f+h]^=s[(g+b[h])%255]}return c.slice(d)},N=function(a,b,c){for(var d=[],e=a.length/b|0,f=0,g=b-a.length%b,h=0;g>h;++h)d.push(f),f+=e;for(var h=g;b>h;++h)d.push(f),f+=e+1;d.push(f);for(var i=[],h=0;b>h;++h)i.push(M(a.slice(d[h],d[h+1]),c));for(var j=[],k=a.length/b|0,h=0;k>h;++h)for(var l=0;b>l;++l)j.push(a[d[l]+h]);for(var l=g;b>l;++l)j.push(a[d[l+1]-1]);for(var h=0;hl;++l)j.push(i[l][h]);return j},O=function(a,b,c,d){for(var e=a<=0;--f)e>>d+f&1&&(e^=c<g;++g)d.push([]),e.push([]);var h=function(a,b,c,f,g){for(var h=0;c>h;++h)for(var i=0;f>i;++i)d[a+h][b+i]=g[h]>>i&1,e[a+h][b+i]=1};h(0,0,9,9,[127,65,93,93,93,65,383,0,64]),h(c-8,0,8,9,[256,127,65,93,93,93,65,127]),h(0,c-8,9,8,[254,130,186,186,186,130,254,0,0]);for(var g=9;c-8>g;++g)d[6][g]=d[g][6]=1&~g,e[6][g]=e[g][6]=1;for(var i=b[2],j=i.length,g=0;j>g;++g)for(var k=0===g||g===j-1?1:0,l=0===g?j-1:j,m=k;l>m;++m)h(i[g],i[m],5,5,[31,17,21,17,31]);if(E(a))for(var n=O(a,6,7973,12),o=0,g=0;6>g;++g)for(var m=0;3>m;++m)d[g][c-11+m]=d[c-11+m][g]=n>>o++&1,e[g][c-11+m]=e[c-11+m][g]=1;return{matrix:d,reserved:e}},Q=function(a,b,c){for(var d=a.length,e=0,f=-1,g=d-1;g>=0;g-=2){6==g&&--g;for(var h=0>f?d-1:0,i=0;d>i;++i){for(var j=g;j>g-2;--j)b[h][j]||(a[h][j]=c[e>>3]>>(7&~e)&1,++e);h+=f}f=-f}return a},R=function(a,b,c){for(var d=D[c],e=a.length,f=0;e>f;++f)for(var g=0;e>g;++g)b[f][g]||(a[f][g]^=d(f,g));return a},S=function(a,b,c,d){for(var e=a.length,f=21522^O(c<<3|d,5,1335,10),g=0;15>g;++g){var h=[0,1,2,3,4,5,7,8,e-7,e-6,e-5,e-4,e-3,e-2,e-1][g],i=[e-1,e-2,e-3,e-4,e-5,e-6,e-7,e-8,7,5,4,3,2,1,0][g];a[h][8]=a[8][i]=f>>g&1}return a},T=function(a){for(var b=3,c=3,d=40,e=10,f=function(a){for(var c=0,e=0;e=5&&(c+=b+(a[e]-5));for(var e=5;e=4*f||a[e+1]>=4*f)&&(c+=d)}return c},g=a.length,h=0,i=0,j=0;g>j;++j){var k,l=a[j];k=[0];for(var m=0;g>m;){var n;for(n=0;g>m&&l[m];++n)++m;for(k.push(n),n=0;g>m&&!l[m];++n)++m;k.push(n)}h+=f(k),k=[0];for(var m=0;g>m;){var n;for(n=0;g>m&&a[m][j];++n)++m;for(k.push(n),n=0;g>m&&!a[m][j];++n)++m;k.push(n)}h+=f(k);var o=a[j+1]||[];i+=l[0];for(var m=1;g>m;++m){var p=l[m];i+=p,l[m-1]==p&&o[m]===p&&o[m-1]===p&&(h+=c)}}return h+=e*(Math.abs(i/g/g-.5)/.05|0)},U=function(a,b,c,d,e){var g=f[b],h=L(b,c,a,H(b,d)>>3);h=N(h,g[1][d],w[g[0][d]]);var i=P(b),j=i.matrix,k=i.reserved;if(Q(j,k,h),0>e){R(j,k,0),S(j,k,d,0);var l=0,m=T(j);for(R(j,k,0),e=1;8>e;++e){R(j,k,e),S(j,k,d,e);var n=T(j);m>n&&(m=n,l=e),R(j,k,e)}e=l}return R(j,k,e),S(j,k,d,e),j};a.exports={measure:e}},function(a,b,c){"use strict";function d(a,b){this.pages=[],this.pageMargins=b,this.x=b.left,this.availableWidth=a.width-b.left-b.right,this.availableHeight=0,this.page=-1,this.snapshots=[],this.endingCell=null,this.tracker=new g,this.addPage(a)}function e(a,b){return void 0===a?b:"landscape"===a?"landscape":"portrait"}function f(a,b){var c;return c=a.page>b.page?a:b.page>a.page?b:a.y>b.y?a:b,{page:c.page,x:c.x,y:c.y,availableHeight:c.availableHeight,availableWidth:c.availableWidth}}var g=c(12);d.prototype.beginColumnGroup=function(){this.snapshots.push({x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,page:this.page,bottomMost:{y:this.y,page:this.page},endingCell:this.endingCell,lastColumnWidth:this.lastColumnWidth}),this.lastColumnWidth=0},d.prototype.beginColumn=function(a,b,c){var d=this.snapshots[this.snapshots.length-1];this.calculateBottomMost(d),this.endingCell=c,this.page=d.page,this.x=this.x+this.lastColumnWidth+(b||0),this.y=d.y,this.availableWidth=a,this.availableHeight=d.availableHeight,this.lastColumnWidth=a},d.prototype.calculateBottomMost=function(a){this.endingCell?(this.saveContextInEndingCell(this.endingCell),this.endingCell=null):a.bottomMost=f(this,a.bottomMost)},d.prototype.markEnding=function(a){this.page=a._columnEndingContext.page,this.x=a._columnEndingContext.x,this.y=a._columnEndingContext.y,this.availableWidth=a._columnEndingContext.availableWidth,this.availableHeight=a._columnEndingContext.availableHeight,this.lastColumnWidth=a._columnEndingContext.lastColumnWidth},d.prototype.saveContextInEndingCell=function(a){a._columnEndingContext={page:this.page,x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,lastColumnWidth:this.lastColumnWidth}},d.prototype.completeColumnGroup=function(){var a=this.snapshots.pop();this.calculateBottomMost(a),this.endingCell=null,this.x=a.x,this.y=a.bottomMost.y,this.page=a.bottomMost.page,this.availableWidth=a.availableWidth,this.availableHeight=a.bottomMost.availableHeight,this.lastColumnWidth=a.lastColumnWidth},d.prototype.addMargin=function(a,b){this.x+=a,this.availableWidth-=a+(b||0)},d.prototype.moveDown=function(a){return this.y+=a,this.availableHeight-=a,this.availableHeight>0},d.prototype.initializePage=function(){this.y=this.pageMargins.top,this.availableHeight=this.getCurrentPage().pageSize.height-this.pageMargins.top-this.pageMargins.bottom,this.pageSnapshot().availableWidth=this.getCurrentPage().pageSize.width-this.pageMargins.left-this.pageMargins.right},d.prototype.pageSnapshot=function(){return this.snapshots[0]?this.snapshots[0]:this},d.prototype.moveTo=function(a,b){void 0!==a&&null!==a&&(this.x=a,this.availableWidth=this.getCurrentPage().pageSize.width-this.x-this.pageMargins.right),void 0!==b&&null!==b&&(this.y=b,this.availableHeight=this.getCurrentPage().pageSize.height-this.y-this.pageMargins.bottom)},d.prototype.beginDetachedBlock=function(){this.snapshots.push({x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,page:this.page,endingCell:this.endingCell,lastColumnWidth:this.lastColumnWidth})},d.prototype.endDetachedBlock=function(){var a=this.snapshots.pop();this.x=a.x,this.y=a.y,this.availableWidth=a.availableWidth,this.availableHeight=a.availableHeight,this.page=a.page,this.endingCell=a.endingCell,this.lastColumnWidth=a.lastColumnWidth};var h=function(a,b){return b=e(b,a.pageSize.orientation),b!==a.pageSize.orientation?{orientation:b,width:a.pageSize.height,height:a.pageSize.width}:{orientation:a.pageSize.orientation,width:a.pageSize.width,height:a.pageSize.height}};d.prototype.moveToNextPage=function(a){var b=this.page+1,c=this.page,d=this.y,e=b>=this.pages.length;return e?this.addPage(h(this.getCurrentPage(),a)):(this.page=b,this.initializePage()),{newPageCreated:e,prevPage:c,prevY:d,y:this.y}},d.prototype.addPage=function(a){var b={items:[],pageSize:a};return this.pages.push(b),this.page=this.pages.length-1,this.initializePage(),this.tracker.emit("pageAdded"),b},d.prototype.getCurrentPage=function(){return this.page<0||this.page>=this.pages.length?null:this.pages[this.page]},d.prototype.getCurrentPosition=function(){var a=this.getCurrentPage().pageSize,b=a.height-this.pageMargins.top-this.pageMargins.bottom,c=a.width-this.pageMargins.left-this.pageMargins.right;return{pageNumber:this.page+1,pageOrientation:a.orientation,pageInnerHeight:b,pageInnerWidth:c,left:this.x,top:this.y,verticalRatio:(this.y-this.pageMargins.top)/b,horizontalRatio:(this.x-this.pageMargins.left)/c}},a.exports=d},function(a,b,c){"use strict";function d(a,b){this.transactionLevel=0,this.repeatables=[],this.tracker=b,this.writer=new f(a,b)}function e(a,b){var c=b(a);return c||(a.moveToNextPage(),c=b(a)),c}var f=c(21);d.prototype.addLine=function(a,b,c){return e(this,function(d){return d.writer.addLine(a,b,c)})},d.prototype.addImage=function(a,b){return e(this,function(c){return c.writer.addImage(a,b)})},d.prototype.addQr=function(a,b){return e(this,function(c){return c.writer.addQr(a,b)})},d.prototype.addVector=function(a,b,c,d){return this.writer.addVector(a,b,c,d)},d.prototype.addFragment=function(a,b,c,d){this.writer.addFragment(a,b,c,d)||(this.moveToNextPage(),this.writer.addFragment(a,b,c,d))},d.prototype.moveToNextPage=function(a){var b=this.writer.context.moveToNextPage(a);b.newPageCreated?this.repeatables.forEach(function(a){this.writer.addFragment(a,!0)},this):this.repeatables.forEach(function(a){this.writer.context.moveDown(a.height)},this),this.writer.tracker.emit("pageChanged",{prevPage:b.prevPage,prevY:b.prevY,y:b.y})},d.prototype.beginUnbreakableBlock=function(a,b){0===this.transactionLevel++&&(this.originalX=this.writer.context.x,this.writer.pushContext(a,b))},d.prototype.commitUnbreakableBlock=function(a,b){if(0===--this.transactionLevel){var c=this.writer.context;this.writer.popContext();var d=c.pages.length;if(d>0){var e=c.pages[0];if(e.xOffset=a,e.yOffset=b,d>1)if(void 0!==a||void 0!==b)e.height=c.getCurrentPage().pageSize.height-c.pageMargins.top-c.pageMargins.bottom;else{e.height=this.writer.context.getCurrentPage().pageSize.height-this.writer.context.pageMargins.top-this.writer.context.pageMargins.bottom;for(var f=0,g=this.repeatables.length;g>f;f++)e.height-=this.repeatables[f].height}else e.height=c.y;void 0!==a||void 0!==b?this.writer.addFragment(e,!0,!0,!0):this.addFragment(e)}}},d.prototype.currentBlockToRepeatable=function(){var a=this.writer.context,b={items:[]};return a.pages[0].items.forEach(function(a){b.items.push(a)}),b.xOffset=this.originalX,b.height=a.y,b},d.prototype.pushToRepeatables=function(a){this.repeatables.push(a)},d.prototype.popFromRepeatables=function(){this.repeatables.pop()},d.prototype.context=function(){return this.writer.context},a.exports=d},function(a,b,c){"use strict";function d(a,b){this.context=a,this.contextStack=[],this.tracker=b}function e(a,b,c){null===c||void 0===c||0>c||c>a.items.length?a.items.push(b):a.items.splice(c,0,b)}function f(a){var b=new g(a.maxWidth);for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}var g=c(22),h=c(17).pack,i=c(17).offsetVector,j=c(19);d.prototype.addLine=function(a,b,c){var d=a.getHeight(),f=this.context,g=f.getCurrentPage(),h=this.getCurrentPositionOnPage();return f.availableHeight0&&a.inlines[0].alignment,e=0;switch(d){case"right":e=b-c;break;case"center":e=(b-c)/2}if(e&&(a.x=(a.x||0)+e),"justify"===d&&!a.newLineForced&&!a.lastLineInParagraph&&a.inlines.length>1)for(var f=(b-c)/(a.inlines.length-1),g=1,h=a.inlines.length;h>g;g++)e=g*f,a.inlines[g].x+=e},d.prototype.addImage=function(a,b){var c=this.context,d=c.getCurrentPage(),f=this.getCurrentPositionOnPage();return c.availableHeightf;f++){var h=a._canvas[f];h.x+=a.x,h.y+=a.y,this.addVector(h,!0,!0,b)}return c.moveDown(a._height),e},d.prototype.alignImage=function(a){var b=this.context.availableWidth,c=a._minWidth,d=0;switch(a._alignment){case"right":d=b-c;break;case"center":d=(b-c)/2}d&&(a.x=(a.x||0)+d)},d.prototype.addVector=function(a,b,c,d){var f=this.context,g=f.getCurrentPage(),h=this.getCurrentPositionOnPage();return g?(i(a,b?0:f.x,c?0:f.y),e(g,{type:"vector",item:a},d),h):void 0},d.prototype.addFragment=function(a,b,c,d){var e=this.context,g=e.getCurrentPage();return!b&&a.height>e.availableHeight?!1:(a.items.forEach(function(d){switch(d.type){case"line":var j=f(d.item);j.x=(j.x||0)+(b?a.xOffset||0:e.x),j.y=(j.y||0)+(c?a.yOffset||0:e.y),g.items.push({type:"line",item:j});break;case"vector":var k=h(d.item);i(k,b?a.xOffset||0:e.x,c?a.yOffset||0:e.y),g.items.push({type:"vector",item:k});break;case"image":var l=h(d.item);l.x=(l.x||0)+(b?a.xOffset||0:e.x),l.y=(l.y||0)+(c?a.yOffset||0:e.y),g.items.push({type:"image",item:l})}}),d||e.moveDown(a.height),!0)},d.prototype.pushContext=function(a,b){void 0===a&&(b=this.context.getCurrentPage().height-this.context.pageMargins.top-this.context.pageMargins.bottom,a=this.context.availableWidth),("number"==typeof a||a instanceof Number)&&(a=new j({width:a,height:b},{left:0,right:0,top:0,bottom:0})),this.contextStack.push(this.context),this.context=a},d.prototype.popContext=function(){this.context=this.contextStack.pop()},d.prototype.getCurrentPositionOnPage=function(){return(this.contextStack[0]||this.context).getCurrentPosition()},a.exports=d},function(a,b){"use strict";function c(a){this.maxWidth=a,this.leadingCut=0,this.trailingCut=0,this.inlineWidths=0,this.inlines=[]}c.prototype.getAscenderHeight=function(){var a=0;return this.inlines.forEach(function(b){a=Math.max(a,b.font.ascender/1e3*b.fontSize)}),a},c.prototype.hasEnoughSpaceForInline=function(a){return 0===this.inlines.length?!0:this.newLineForced?!1:this.inlineWidths+a.width-this.leadingCut-(a.trailingCut||0)<=this.maxWidth},c.prototype.addInline=function(a){0===this.inlines.length&&(this.leadingCut=a.leadingCut||0),this.trailingCut=a.trailingCut||0,a.x=this.inlineWidths-this.leadingCut,this.inlines.push(a),this.inlineWidths+=a.width,a.lineEnd&&(this.newLineForced=!0)},c.prototype.getWidth=function(){return this.inlineWidths-this.leadingCut-this.trailingCut},c.prototype.getHeight=function(){var a=0;return this.inlines.forEach(function(b){a=Math.max(a,b.height||0)}),a},a.exports=c},function(a,b,c){"use strict";function d(a){this.tableNode=a}var e=c(16);d.prototype.beginTable=function(a){function b(){var a=0;return d.table.widths.forEach(function(b){a+=b._calcWidth}),a}function c(){var a=[],b=0,c=0;a.push({left:0,rowSpan:0});for(var d=0,e=g.tableNode.table.body[0].length;e>d;d++){var f=g.layout.paddingLeft(d,g.tableNode)+g.layout.paddingRight(d,g.tableNode),h=g.layout.vLineWidth(d,g.tableNode);c=f+h+g.tableNode.table.widths[d]._calcWidth,a[a.length-1].width=c,b+=c,a.push({left:b,rowSpan:0,width:0})}return a}var d,f,g=this;d=this.tableNode,this.offsets=d._offsets,this.layout=d._layout,f=a.context().availableWidth-this.offsets.total,e.buildColumnWidths(d.table.widths,f),this.tableWidth=d._offsets.total+b(),this.rowSpanData=c(),this.cleanUpRepeatables=!1,this.headerRows=d.table.headerRows||0,this.rowsWithoutPageBreak=this.headerRows+(d.table.keepWithHeaderRows||0),this.dontBreakRows=d.table.dontBreakRows||!1,this.rowsWithoutPageBreak&&a.beginUnbreakableBlock(),this.drawHorizontalLine(0,a)},d.prototype.onRowBreak=function(a,b){var c=this;return function(){var a=c.rowPaddingTop+(c.headerRows?0:c.topLineWidth);b.context().moveDown(a)}},d.prototype.beginRow=function(a,b){this.topLineWidth=this.layout.hLineWidth(a,this.tableNode),this.rowPaddingTop=this.layout.paddingTop(a,this.tableNode),this.bottomLineWidth=this.layout.hLineWidth(a+1,this.tableNode),this.rowPaddingBottom=this.layout.paddingBottom(a,this.tableNode),this.rowCallback=this.onRowBreak(a,b),b.tracker.startTracking("pageChanged",this.rowCallback),this.dontBreakRows&&b.beginUnbreakableBlock(),this.rowTopY=b.context().y,this.reservedAtBottom=this.bottomLineWidth+this.rowPaddingBottom,b.context().availableHeight-=this.reservedAtBottom,b.context().moveDown(this.rowPaddingTop)},d.prototype.drawHorizontalLine=function(a,b,c){var d=this.layout.hLineWidth(a,this.tableNode);if(d){for(var e=d/2,f=null,g=0,h=this.rowSpanData.length;h>g;g++){var i=this.rowSpanData[g],j=!i.rowSpan;!f&&j&&(f={left:i.left,width:0}),j&&(f.width+=i.width||0);var k=(c||0)+e;j&&g!==h-1||f&&(b.addVector({type:"line",x1:f.left,x2:f.left+f.width,y1:k,y2:k,lineWidth:d,lineColor:"function"==typeof this.layout.hLineColor?this.layout.hLineColor(a,this.tableNode):this.layout.hLineColor},!1,c),f=null)}b.context().moveDown(d)}},d.prototype.drawVerticalLine=function(a,b,c,d,e){var f=this.layout.vLineWidth(d,this.tableNode);0!==f&&e.addVector({type:"line",x1:a+f/2,x2:a+f/2,y1:b,y2:c,lineWidth:f,lineColor:"function"==typeof this.layout.vLineColor?this.layout.vLineColor(d,this.tableNode):this.layout.vLineColor},!1,!0)},d.prototype.endTable=function(a){this.cleanUpRepeatables&&a.popFromRepeatables()},d.prototype.endRow=function(a,b,c){function d(){for(var b=[],c=0,d=0,e=g.tableNode.table.body[a].length;e>d;d++){if(!c){b.push({x:g.rowSpanData[d].left,index:d});var f=g.tableNode.table.body[a][d];c=f._colSpan||f.colSpan||0}c>0&&c--}return b.push({x:g.rowSpanData[g.rowSpanData.length-1].left,index:g.rowSpanData.length-1}),b}var e,f,g=this;b.tracker.stopTracking("pageChanged",this.rowCallback),b.context().moveDown(this.layout.paddingBottom(a,this.tableNode)),b.context().availableHeight+=this.reservedAtBottom;var h=b.context().page,i=b.context().y,j=d(),k=[],l=c&&c.length>0;if(k.push({y0:this.rowTopY,page:l?c[0].prevPage:h}),l)for(f=0,e=c.length;e>f;f++){var m=c[f];k[k.length-1].y1=m.prevY,k.push({y0:m.y,page:m.prevPage+1})}k[k.length-1].y1=i;for(var n=k[0].y1-k[0].y0===this.rowPaddingTop,o=n?1:0,p=k.length;p>o;o++){var q=o0&&!this.headerRows,s=r?0:this.topLineWidth,t=k[o].y0,u=k[o].y1;for(q&&(u+=this.rowPaddingBottom),b.context().page!=k[o].page&&(b.context().page=k[o].page,this.reservedAtBottom=0),f=0,e=j.length;e>f;f++)if(this.drawVerticalLine(j[f].x,t-s,u+this.bottomLineWidth,j[f].index,b),e-1>f){var v=j[f].index,w=this.tableNode.table.body[a][v].fillColor;if(w){var x=this.layout.vLineWidth(v,this.tableNode),y=j[f].x+x,z=t-s;b.addVector({type:"rect",x:y,y:z,w:j[f+1].x-y,h:u+this.bottomLineWidth-z,lineWidth:0,color:w},!1,!0,0)}}q&&this.layout.hLineWhenBroken!==!1&&this.drawHorizontalLine(a+1,b,u),r&&this.layout.hLineWhenBroken!==!1&&this.drawHorizontalLine(a,b,t)}b.context().page=h,b.context().y=i;var A=this.tableNode.table.body[a];for(f=0,e=A.length;e>f;f++){if(A[f].rowSpan&&(this.rowSpanData[f].rowSpan=A[f].rowSpan,A[f].colSpan&&A[f].colSpan>1))for(var B=1;B0&&this.rowSpanData[f].rowSpan--}this.drawHorizontalLine(a+1,b),this.headerRows&&a===this.headerRows-1&&(this.headerRepeatable=b.currentBlockToRepeatable()),this.dontBreakRows&&b.tracker.auto("pageChanged",function(){g.drawHorizontalLine(a,b)},function(){b.commitUnbreakableBlock(),g.drawHorizontalLine(a,b)}),!this.headerRepeatable||a!==this.rowsWithoutPageBreak-1&&a!==this.tableNode.table.body.length-1||(b.commitUnbreakableBlock(),b.pushToRepeatables(this.headerRepeatable),this.cleanUpRepeatables=!0,this.headerRepeatable=null)},a.exports=d},function(a,b,c){(function(b){(function(){var d,e,f,g,h,i,j={}.hasOwnProperty,k=function(a,b){function c(){this.constructor=a}for(var d in b)j.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};i=c(25),h=c(44),e=c(45),g=c(46),f=c(64),d=function(a){function d(a){var b,c,e,f;if(this.options=null!=a?a:{},d.__super__.constructor.apply(this,arguments),this.version=1.3,this.compress=null!=(e=this.options.compress)?e:!0,this._pageBuffer=[],this._pageBufferStart=0,this._offsets=[],this._waiting=0,this._ended=!1,this._offset=0,this._root=this.ref({Type:"Catalog",Pages:this.ref({Type:"Pages",Count:0,Kids:[]})}),this.page=null,this.initColor(),this.initVector(),this.initFonts(),this.initText(),this.initImages(),this.info={Producer:"PDFKit",Creator:"PDFKit",CreationDate:new Date},this.options.info){f=this.options.info;for(b in f)c=f[b],this.info[b]=c}this._write("%PDF-"+this.version),this._write("%ÿÿÿÿ"),this.addPage()}var i;return k(d,a),i=function(a){var b,c,e;e=[];for(c in a)b=a[c],e.push(d.prototype[c]=b);return e},i(c(65)),i(c(67)),i(c(69)),i(c(89)),i(c(96)),i(c(101)),d.prototype.addPage=function(a){var b;return null==a&&(a=this.options),this.options.bufferPages||this.flushPages(),this.page=new f(this,a),this._pageBuffer.push(this.page),b=this._root.data.Pages.data,b.Kids.push(this.page.dictionary),b.Count++,this.x=this.page.margins.left,this.y=this.page.margins.top,this._ctm=[1,0,0,1,0,0],this.transform(1,0,0,-1,0,this.page.height),this},d.prototype.bufferedPageRange=function(){return{start:this._pageBufferStart,count:this._pageBuffer.length}},d.prototype.switchToPage=function(a){var b;if(!(b=this._pageBuffer[a-this._pageBufferStart]))throw new Error("switchToPage("+a+") out of bounds, current buffer covers pages "+this._pageBufferStart+" to "+(this._pageBufferStart+this._pageBuffer.length-1));return this.page=b},d.prototype.flushPages=function(){var a,b,c,d;for(b=this._pageBuffer,this._pageBuffer=[],this._pageBufferStart+=b.length,c=0,d=b.length;d>c;c++)a=b[c],a.end()},d.prototype.ref=function(a){var b;return b=new g(this,this._offsets.length+1,a),this._offsets.push(null),this._waiting++,b},d.prototype._read=function(){},d.prototype._write=function(a){return b.isBuffer(a)||(a=new b(a+"\n","binary")),this.push(a),this._offset+=a.length},d.prototype.addContent=function(a){return this.page.write(a),this},d.prototype._refEnd=function(a){return this._offsets[a.id-1]=a.offset,0===--this._waiting&&this._ended?(this._finalize(),this._ended=!1):void 0},d.prototype.write=function(a,b){var c;return c=new Error("PDFDocument#write is deprecated, and will be removed in a future version of PDFKit. Please pipe the document into a Node stream."),console.warn(c.stack),this.pipe(h.createWriteStream(a)),this.end(),this.once("end",b)},d.prototype.output=function(a){throw new Error("PDFDocument#output is deprecated, and has been removed from PDFKit. Please pipe the document into a Node stream.")},d.prototype.end=function(){var a,b,c,d,e,f;this.flushPages(),this._info=this.ref(),e=this.info;for(b in e)d=e[b],"string"==typeof d&&(d=new String(d)),this._info.data[b]=d;this._info.end(),f=this._fontFamilies;for(c in f)a=f[c],a.embed();return this._root.end(),this._root.data.Pages.end(),0===this._waiting?this._finalize():this._ended=!0},d.prototype._finalize=function(a){var b,c,d,f,g;for(c=this._offset,this._write("xref"),this._write("0 "+(this._offsets.length+1)),this._write("0000000000 65535 f "),g=this._offsets,d=0,f=g.length;f>d;d++)b=g[d],b=("0000000000"+b).slice(-10),this._write(b+" 00000 n ");return this._write("trailer"),this._write(e.convert({Size:this._offsets.length+1,Root:this._root,Info:this._info})),this._write("startxref"),this._write(""+c),this._write("%%EOF"),this.push(null)},d.prototype.toString=function(){ -return"[object PDFDocument]"},d}(i.Readable),a.exports=d}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){function d(){e.call(this)}a.exports=d;var e=c(26).EventEmitter,f=c(27);f(d,e),d.Readable=c(28),d.Writable=c(40),d.Duplex=c(41),d.Transform=c(42),d.PassThrough=c(43),d.Stream=d,d.prototype.pipe=function(a,b){function c(b){a.writable&&!1===a.write(b)&&j.pause&&j.pause()}function d(){j.readable&&j.resume&&j.resume()}function f(){k||(k=!0,a.end())}function g(){k||(k=!0,"function"==typeof a.destroy&&a.destroy())}function h(a){if(i(),0===e.listenerCount(this,"error"))throw a}function i(){j.removeListener("data",c),a.removeListener("drain",d),j.removeListener("end",f),j.removeListener("close",g),j.removeListener("error",h),a.removeListener("error",h),j.removeListener("end",i),j.removeListener("close",i),a.removeListener("close",i)}var j=this;j.on("data",c),a.on("drain",d),a._isStdio||b&&b.end===!1||(j.on("end",f),j.on("close",g));var k=!1;return j.on("error",h),a.on("error",h),j.on("end",i),j.on("close",i),a.on("close",i),a.emit("pipe",j),a}},function(a,b){function c(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function d(a){return"function"==typeof a}function e(a){return"number"==typeof a}function f(a){return"object"==typeof a&&null!==a}function g(a){return void 0===a}a.exports=c,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._maxListeners=void 0,c.defaultMaxListeners=10,c.prototype.setMaxListeners=function(a){if(!e(a)||0>a||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},c.prototype.emit=function(a){var b,c,e,h,i,j;if(this._events||(this._events={}),"error"===a&&(!this._events.error||f(this._events.error)&&!this._events.error.length)){if(b=arguments[1],b instanceof Error)throw b;throw TypeError('Uncaught, unspecified "error" event.')}if(c=this._events[a],g(c))return!1;if(d(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:h=Array.prototype.slice.call(arguments,1),c.apply(this,h)}else if(f(c))for(h=Array.prototype.slice.call(arguments,1),j=c.slice(),e=j.length,i=0;e>i;i++)j[i].apply(this,h);return!0},c.prototype.addListener=function(a,b){var e;if(!d(b))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,d(b.listener)?b.listener:b),this._events[a]?f(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,f(this._events[a])&&!this._events[a].warned&&(e=g(this._maxListeners)?c.defaultMaxListeners:this._maxListeners,e&&e>0&&this._events[a].length>e&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),"function"==typeof console.trace&&console.trace())),this},c.prototype.on=c.prototype.addListener,c.prototype.once=function(a,b){function c(){this.removeListener(a,c),e||(e=!0,b.apply(this,arguments))}if(!d(b))throw TypeError("listener must be a function");var e=!1;return c.listener=b,this.on(a,c),this},c.prototype.removeListener=function(a,b){var c,e,g,h;if(!d(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],g=c.length,e=-1,c===b||d(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(f(c)){for(h=g;h-- >0;)if(c[h]===b||c[h].listener&&c[h].listener===b){e=h;break}if(0>e)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(e,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},c.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],d(c))this.removeListener(a,c);else if(c)for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},c.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?d(this._events[a])?[this._events[a]]:this._events[a].slice():[]},c.prototype.listenerCount=function(a){if(this._events){var b=this._events[a];if(d(b))return 1;if(b)return b.length}return 0},c.listenerCount=function(a,b){return a.listenerCount(b)}},function(a,b){"function"==typeof Object.create?a.exports=function(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:a.exports=function(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}},function(a,b,c){b=a.exports=c(29),b.Stream=c(25),b.Readable=b,b.Writable=c(36),b.Duplex=c(35),b.Transform=c(38),b.PassThrough=c(39)},function(a,b,c){(function(b){function d(a,b){var d=c(35);a=a||{};var e=a.highWaterMark,f=a.objectMode?16:16384;this.highWaterMark=e||0===e?e:f,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!a.objectMode,b instanceof d&&(this.objectMode=this.objectMode||!!a.readableObjectMode),this.defaultEncoding=a.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,a.encoding&&(C||(C=c(37).StringDecoder),this.decoder=new C(a.encoding),this.encoding=a.encoding)}function e(a){c(35);return this instanceof e?(this._readableState=new d(a,this),this.readable=!0,void A.call(this)):new e(a)}function f(a,b,c,d,e){var f=j(b,c);if(f)a.emit("error",f);else if(B.isNullOrUndefined(c))b.reading=!1,b.ended||k(a,b);else if(b.objectMode||c&&c.length>0)if(b.ended&&!e){var h=new Error("stream.push() after EOF");a.emit("error",h)}else if(b.endEmitted&&e){var h=new Error("stream.unshift() after end event");a.emit("error",h)}else!b.decoder||e||d||(c=b.decoder.write(c)),e||(b.reading=!1),b.flowing&&0===b.length&&!b.sync?(a.emit("data",c),a.read(0)):(b.length+=b.objectMode?1:c.length,e?b.buffer.unshift(c):b.buffer.push(c),b.needReadable&&l(a)),n(a,b);else e||(b.reading=!1);return g(b)}function g(a){return!a.ended&&(a.needReadable||a.length=E)a=E;else{a--;for(var b=1;32>b;b<<=1)a|=a>>b;a++}return a}function i(a,b){return 0===b.length&&b.ended?0:b.objectMode?0===a?0:1:isNaN(a)||B.isNull(a)?b.flowing&&b.buffer.length?b.buffer[0].length:b.length:0>=a?0:(a>b.highWaterMark&&(b.highWaterMark=h(a)),a>b.length?b.ended?b.length:(b.needReadable=!0,0):a)}function j(a,b){var c=null;return B.isBuffer(b)||B.isString(b)||B.isNullOrUndefined(b)||a.objectMode||(c=new TypeError("Invalid non-string/buffer chunk")),c}function k(a,b){if(b.decoder&&!b.ended){var c=b.decoder.end();c&&c.length&&(b.buffer.push(c),b.length+=b.objectMode?1:c.length)}b.ended=!0,l(a)}function l(a){var c=a._readableState;c.needReadable=!1,c.emittedReadable||(D("emitReadable",c.flowing),c.emittedReadable=!0,c.sync?b.nextTick(function(){m(a)}):m(a))}function m(a){D("emit readable"),a.emit("readable"),s(a)}function n(a,c){c.readingMore||(c.readingMore=!0,b.nextTick(function(){o(a,c)}))}function o(a,b){for(var c=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length=e)c=f?d.join(""):y.concat(d,e),d.length=0;else if(aj&&a>i;j++){var h=d[0],l=Math.min(a-i,h.length);f?c+=h.slice(0,l):h.copy(c,i,0,l),l0)throw new Error("endReadable called on non-empty stream");c.endEmitted||(c.ended=!0,b.nextTick(function(){c.endEmitted||0!==c.length||(c.endEmitted=!0,a.readable=!1,a.emit("end"))}))}function v(a,b){for(var c=0,d=a.length;d>c;c++)b(a[c],c)}function w(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1}a.exports=e;var x=c(31),y=c(2).Buffer;e.ReadableState=d;var z=c(26).EventEmitter;z.listenerCount||(z.listenerCount=function(a,b){return a.listeners(b).length});var A=c(25),B=c(32);B.inherits=c(33);var C,D=c(34);D=D&&D.debuglog?D.debuglog("stream"):function(){},B.inherits(e,A),e.prototype.push=function(a,b){var c=this._readableState;return B.isString(a)&&!c.objectMode&&(b=b||c.defaultEncoding,b!==c.encoding&&(a=new y(a,b),b="")),f(this,c,a,b,!1)},e.prototype.unshift=function(a){var b=this._readableState;return f(this,b,a,"",!0)},e.prototype.setEncoding=function(a){return C||(C=c(37).StringDecoder),this._readableState.decoder=new C(a),this._readableState.encoding=a,this};var E=8388608;e.prototype.read=function(a){D("read",a);var b=this._readableState,c=a;if((!B.isNumber(a)||a>0)&&(b.emittedReadable=!1),0===a&&b.needReadable&&(b.length>=b.highWaterMark||b.ended))return D("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?u(this):l(this),null;if(a=i(a,b),0===a&&b.ended)return 0===b.length&&u(this),null;var d=b.needReadable;D("need readable",d),(0===b.length||b.length-a0?t(a,b):null,B.isNull(e)&&(b.needReadable=!0,a=0),b.length-=a,0!==b.length||b.ended||(b.needReadable=!0),c!==a&&b.ended&&0===b.length&&u(this),B.isNull(e)||this.emit("data",e),e},e.prototype._read=function(a){this.emit("error",new Error("not implemented"))},e.prototype.pipe=function(a,c){function d(a){D("onunpipe"),a===l&&f()}function e(){D("onend"),a.end()}function f(){D("cleanup"),a.removeListener("close",i),a.removeListener("finish",j),a.removeListener("drain",q),a.removeListener("error",h),a.removeListener("unpipe",d),l.removeListener("end",e),l.removeListener("end",f),l.removeListener("data",g),!m.awaitDrain||a._writableState&&!a._writableState.needDrain||q()}function g(b){D("ondata");var c=a.write(b);!1===c&&(D("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,l.pause())}function h(b){D("onerror",b),k(),a.removeListener("error",h),0===z.listenerCount(a,"error")&&a.emit("error",b)}function i(){a.removeListener("finish",j),k()}function j(){D("onfinish"),a.removeListener("close",i),k()}function k(){D("unpipe"),l.unpipe(a)}var l=this,m=this._readableState;switch(m.pipesCount){case 0:m.pipes=a;break;case 1:m.pipes=[m.pipes,a];break;default:m.pipes.push(a)}m.pipesCount+=1,D("pipe count=%d opts=%j",m.pipesCount,c);var n=(!c||c.end!==!1)&&a!==b.stdout&&a!==b.stderr,o=n?e:f;m.endEmitted?b.nextTick(o):l.once("end",o),a.on("unpipe",d);var q=p(l);return a.on("drain",q),l.on("data",g),a._events&&a._events.error?x(a._events.error)?a._events.error.unshift(h):a._events.error=[h,a._events.error]:a.on("error",h),a.once("close",i),a.once("finish",j),a.emit("pipe",l),m.flowing||(D("pipe resume"),l.resume()),a},e.prototype.unpipe=function(a){var b=this._readableState;if(0===b.pipesCount)return this;if(1===b.pipesCount)return a&&a!==b.pipes?this:(a||(a=b.pipes),b.pipes=null,b.pipesCount=0,b.flowing=!1,a&&a.emit("unpipe",this),this);if(!a){var c=b.pipes,d=b.pipesCount;b.pipes=null,b.pipesCount=0,b.flowing=!1;for(var e=0;d>e;e++)c[e].emit("unpipe",this);return this}var e=w(b.pipes,a);return-1===e?this:(b.pipes.splice(e,1),b.pipesCount-=1,1===b.pipesCount&&(b.pipes=b.pipes[0]),a.emit("unpipe",this),this)},e.prototype.on=function(a,c){var d=A.prototype.on.call(this,a,c);if("data"===a&&!1!==this._readableState.flowing&&this.resume(),"readable"===a&&this.readable){var e=this._readableState;if(!e.readableListening)if(e.readableListening=!0,e.emittedReadable=!1,e.needReadable=!0,e.reading)e.length&&l(this,e);else{var f=this;b.nextTick(function(){D("readable nexttick read 0"),f.read(0)})}}return d},e.prototype.addListener=e.prototype.on,e.prototype.resume=function(){var a=this._readableState;return a.flowing||(D("resume"),a.flowing=!0,a.reading||(D("resume read 0"),this.read(0)),q(this,a)),this},e.prototype.pause=function(){return D("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(D("pause"),this._readableState.flowing=!1,this.emit("pause")),this},e.prototype.wrap=function(a){var b=this._readableState,c=!1,d=this;a.on("end",function(){if(D("wrapped end"),b.decoder&&!b.ended){var a=b.decoder.end();a&&a.length&&d.push(a)}d.push(null)}),a.on("data",function(e){if(D("wrapped data"),b.decoder&&(e=b.decoder.write(e)),e&&(b.objectMode||e.length)){var f=d.push(e);f||(c=!0,a.pause())}});for(var e in a)B.isFunction(a[e])&&B.isUndefined(this[e])&&(this[e]=function(b){return function(){return a[b].apply(a,arguments)}}(e));var f=["error","close","destroy","pause","resume"];return v(f,function(b){a.on(b,d.emit.bind(d,b))}),d._read=function(b){D("wrapped _read",b),c&&(c=!1,a.resume())},d},e._fromList=t}).call(b,c(30))},function(a,b){function c(){j=!1,g.length?i=g.concat(i):k=-1,i.length&&d()}function d(){if(!j){var a=setTimeout(c);j=!0;for(var b=i.length;b;){for(g=i,i=[];++k1)for(var c=1;cc;c++)b(a[c],c)}a.exports=d;var g=Object.keys||function(a){var b=[];for(var c in a)b.push(c);return b},h=c(32);h.inherits=c(33);var i=c(29),j=c(36);h.inherits(d,i),f(g(j.prototype),function(a){d.prototype[a]||(d.prototype[a]=j.prototype[a])})}).call(b,c(30))},function(a,b,c){(function(b){function d(a,b,c){this.chunk=a,this.encoding=b,this.callback=c}function e(a,b){var d=c(35);a=a||{};var e=a.highWaterMark,f=a.objectMode?16:16384;this.highWaterMark=e||0===e?e:f,this.objectMode=!!a.objectMode,b instanceof d&&(this.objectMode=this.objectMode||!!a.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var g=a.decodeStrings===!1;this.decodeStrings=!g,this.defaultEncoding=a.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){n(b,a)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function f(a){var b=c(35);return this instanceof f||this instanceof b?(this._writableState=new e(a,this),this.writable=!0,void x.call(this)):new f(a)}function g(a,c,d){var e=new Error("write after end");a.emit("error",e),b.nextTick(function(){d(e)})}function h(a,c,d,e){var f=!0;if(!(w.isBuffer(d)||w.isString(d)||w.isNullOrUndefined(d)||c.objectMode)){var g=new TypeError("Invalid non-string/buffer chunk");a.emit("error",g),b.nextTick(function(){e(g)}),f=!1}return f}function i(a,b,c){return!a.objectMode&&a.decodeStrings!==!1&&w.isString(b)&&(b=new v(b,c)),b}function j(a,b,c,e,f){c=i(b,c,e),w.isBuffer(c)&&(e="buffer");var g=b.objectMode?1:c.length;b.length+=g;var h=b.length1){for(var c=[],d=0;d=this.charLength-this.charReceived?this.charLength-this.charReceived:a.length;if(a.copy(this.charBuffer,this.charReceived,0,c),this.charReceived+=c,this.charReceived=55296&&56319>=d)){if(this.charReceived=this.charLength=0,0===a.length)return b;break}this.charLength+=this.surrogateSize,b=""}this.detectIncompleteChar(a);var e=a.length;this.charLength&&(a.copy(this.charBuffer,0,a.length-this.charReceived,e),e-=this.charReceived),b+=a.toString(this.encoding,0,e);var e=b.length-1,d=b.charCodeAt(e);if(d>=55296&&56319>=d){var f=this.surrogateSize;return this.charLength+=f,this.charReceived+=f,this.charBuffer.copy(this.charBuffer,f,0,f),a.copy(this.charBuffer,0,0,f),b.substring(0,e)}return b},j.prototype.detectIncompleteChar=function(a){for(var b=a.length>=3?3:a.length;b>0;b--){var c=a[a.length-b];if(1==b&&c>>5==6){this.charLength=2;break}if(2>=b&&c>>4==14){this.charLength=3;break}if(3>=b&&c>>3==30){this.charLength=4;break}}this.charReceived=b},j.prototype.end=function(a){var b="";if(a&&a.length&&(b=this.write(a)),this.charReceived){var c=this.charReceived,d=this.charBuffer,e=this.encoding;b+=d.slice(0,c).toString(e)}return b}},function(a,b,c){function d(a,b){this.afterTransform=function(a,c){return e(b,a,c)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function e(a,b,c){var d=a._transformState;d.transforming=!1;var e=d.writecb;if(!e)return a.emit("error",new Error("no writecb in Transform class"));d.writechunk=null,d.writecb=null,i.isNullOrUndefined(c)||a.push(c),e&&e(b);var f=a._readableState;f.reading=!1,(f.needReadable||f.lengthe;c=e+=2)b=a[c],a[c]=a[c+1],a[c+1]=b;return a},a.convert=function(h){var i,j,k,l,m,n,o,p,q,r;if("string"==typeof h)return"/"+h;if(h instanceof String){for(o=h.replace(d,function(a){return c[a]}),k=!1,j=q=0,r=o.length;r>q;j=q+=1)if(o.charCodeAt(j)>127){k=!0;break}return k&&(o=g(new b("\ufeff"+o,"utf16le")).toString("binary")),"("+o+")"}if(b.isBuffer(h))return"<"+h.toString("hex")+">";if(h instanceof e)return h.toString();if(h instanceof Date)return"(D:"+f(h.getUTCFullYear(),4)+f(h.getUTCMonth(),2)+f(h.getUTCDate(),2)+f(h.getUTCHours(),2)+f(h.getUTCMinutes(),2)+f(h.getUTCSeconds(),2)+"Z)";if(Array.isArray(h))return l=function(){var b,c,d;for(d=[],b=0,c=h.length;c>b;b++)i=h[b],d.push(a.convert(i));return d}().join(" "),"["+l+"]";if("[object Object]"==={}.toString.call(h)){n=["<<"];for(m in h)p=h[m],n.push("/"+m+" "+a.convert(p));return n.push(">>"),n.join("\n")}return""+h},a}(),a.exports=d,e=c(46)}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(b){(function(){var d,e,f,g=function(a,b){return function(){return a.apply(b,arguments)}};f=c(47),e=function(){function a(a,b,c){this.document=a,this.id=b,this.data=null!=c?c:{},this.finalize=g(this.finalize,this),this.gen=0,this.deflate=null,this.compress=this.document.compress&&!this.data.Filter,this.uncompressedLength=0,this.chunks=[]}return a.prototype.initDeflate=function(){return this.data.Filter="FlateDecode",this.deflate=f.createDeflate(),this.deflate.on("data",function(a){return function(b){return a.chunks.push(b),a.data.Length+=b.length}}(this)),this.deflate.on("end",this.finalize)},a.prototype.write=function(a){var c;return b.isBuffer(a)||(a=new b(a+"\n","binary")),this.uncompressedLength+=a.length,null==(c=this.data).Length&&(c.Length=0),this.compress?(this.deflate||this.initDeflate(),this.deflate.write(a)):(this.chunks.push(a),this.data.Length+=a.length)},a.prototype.end=function(a){return("string"==typeof a||b.isBuffer(a))&&this.write(a),this.deflate?this.deflate.end():this.finalize()},a.prototype.finalize=function(){var a,b,c,e;if(this.offset=this.document._offset,this.document._write(""+this.id+" "+this.gen+" obj"),this.document._write(d.convert(this.data)),this.chunks.length){for(this.document._write("stream"),e=this.chunks,b=0,c=e.length;c>b;b++)a=e[b],this.document._write(a);this.chunks.length=0,this.document._write("\nendstream")}return this.document._write("endobj"),this.document._refEnd(this)},a.prototype.toString=function(){return""+this.id+" "+this.gen+" R"},a}(),a.exports=e,d=c(45)}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(a,d){function e(b,c,d){function e(){for(var a;null!==(a=b.read());)h.push(a),i+=a.length;b.once("readable",e)}function f(a){b.removeListener("end",g),b.removeListener("readable",e),d(a)}function g(){var c=a.concat(h,i);h=[],d(null,c),b.close()}var h=[],i=0;b.on("error",f),b.on("end",g),b.end(c),e()}function f(b,c){if("string"==typeof c&&(c=new a(c)),!a.isBuffer(c))throw new TypeError("Not a string or buffer");var d=p.Z_FINISH;return b._processChunk(c,d)}function g(a){return this instanceof g?void n.call(this,a,p.DEFLATE):new g(a)}function h(a){return this instanceof h?void n.call(this,a,p.INFLATE):new h(a)}function i(a){return this instanceof i?void n.call(this,a,p.GZIP):new i(a)}function j(a){return this instanceof j?void n.call(this,a,p.GUNZIP):new j(a)}function k(a){return this instanceof k?void n.call(this,a,p.DEFLATERAW):new k(a)}function l(a){return this instanceof l?void n.call(this,a,p.INFLATERAW):new l(a)}function m(a){return this instanceof m?void n.call(this,a,p.UNZIP):new m(a)}function n(c,d){if(this._opts=c=c||{},this._chunkSize=c.chunkSize||b.Z_DEFAULT_CHUNK,o.call(this,c),c.flush&&c.flush!==p.Z_NO_FLUSH&&c.flush!==p.Z_PARTIAL_FLUSH&&c.flush!==p.Z_SYNC_FLUSH&&c.flush!==p.Z_FULL_FLUSH&&c.flush!==p.Z_FINISH&&c.flush!==p.Z_BLOCK)throw new Error("Invalid flush flag: "+c.flush);if(this._flushFlag=c.flush||p.Z_NO_FLUSH,c.chunkSize&&(c.chunkSizeb.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+c.chunkSize);if(c.windowBits&&(c.windowBitsb.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+c.windowBits);if(c.level&&(c.levelb.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+c.level);if(c.memLevel&&(c.memLevelb.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+c.memLevel);if(c.strategy&&c.strategy!=b.Z_FILTERED&&c.strategy!=b.Z_HUFFMAN_ONLY&&c.strategy!=b.Z_RLE&&c.strategy!=b.Z_FIXED&&c.strategy!=b.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+c.strategy);if(c.dictionary&&!a.isBuffer(c.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new p.Zlib(d);var e=this;this._hadError=!1,this._binding.onerror=function(a,c){e._binding=null,e._hadError=!0;var d=new Error(a);d.errno=c,d.code=b.codes[c],e.emit("error",d)};var f=b.Z_DEFAULT_COMPRESSION;"number"==typeof c.level&&(f=c.level);var g=b.Z_DEFAULT_STRATEGY;"number"==typeof c.strategy&&(g=c.strategy),this._binding.init(c.windowBits||b.Z_DEFAULT_WINDOWBITS,f,c.memLevel||b.Z_DEFAULT_MEMLEVEL,g,c.dictionary),this._buffer=new a(this._chunkSize),this._offset=0,this._closed=!1,this._level=f,this._strategy=g,this.once("end",this.close)}var o=c(42),p=c(48),q=c(60),r=c(63).ok;p.Z_MIN_WINDOWBITS=8,p.Z_MAX_WINDOWBITS=15,p.Z_DEFAULT_WINDOWBITS=15,p.Z_MIN_CHUNK=64,p.Z_MAX_CHUNK=1/0,p.Z_DEFAULT_CHUNK=16384,p.Z_MIN_MEMLEVEL=1,p.Z_MAX_MEMLEVEL=9,p.Z_DEFAULT_MEMLEVEL=8,p.Z_MIN_LEVEL=-1,p.Z_MAX_LEVEL=9,p.Z_DEFAULT_LEVEL=p.Z_DEFAULT_COMPRESSION,Object.keys(p).forEach(function(a){ -a.match(/^Z/)&&(b[a]=p[a])}),b.codes={Z_OK:p.Z_OK,Z_STREAM_END:p.Z_STREAM_END,Z_NEED_DICT:p.Z_NEED_DICT,Z_ERRNO:p.Z_ERRNO,Z_STREAM_ERROR:p.Z_STREAM_ERROR,Z_DATA_ERROR:p.Z_DATA_ERROR,Z_MEM_ERROR:p.Z_MEM_ERROR,Z_BUF_ERROR:p.Z_BUF_ERROR,Z_VERSION_ERROR:p.Z_VERSION_ERROR},Object.keys(b.codes).forEach(function(a){b.codes[b.codes[a]]=a}),b.Deflate=g,b.Inflate=h,b.Gzip=i,b.Gunzip=j,b.DeflateRaw=k,b.InflateRaw=l,b.Unzip=m,b.createDeflate=function(a){return new g(a)},b.createInflate=function(a){return new h(a)},b.createDeflateRaw=function(a){return new k(a)},b.createInflateRaw=function(a){return new l(a)},b.createGzip=function(a){return new i(a)},b.createGunzip=function(a){return new j(a)},b.createUnzip=function(a){return new m(a)},b.deflate=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new g(b),a,c)},b.deflateSync=function(a,b){return f(new g(b),a)},b.gzip=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new i(b),a,c)},b.gzipSync=function(a,b){return f(new i(b),a)},b.deflateRaw=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new k(b),a,c)},b.deflateRawSync=function(a,b){return f(new k(b),a)},b.unzip=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new m(b),a,c)},b.unzipSync=function(a,b){return f(new m(b),a)},b.inflate=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new h(b),a,c)},b.inflateSync=function(a,b){return f(new h(b),a)},b.gunzip=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new j(b),a,c)},b.gunzipSync=function(a,b){return f(new j(b),a)},b.inflateRaw=function(a,b,c){return"function"==typeof b&&(c=b,b={}),e(new l(b),a,c)},b.inflateRawSync=function(a,b){return f(new l(b),a)},q.inherits(n,o),n.prototype.params=function(a,c,e){if(ab.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+a);if(c!=b.Z_FILTERED&&c!=b.Z_HUFFMAN_ONLY&&c!=b.Z_RLE&&c!=b.Z_FIXED&&c!=b.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+c);if(this._level!==a||this._strategy!==c){var f=this;this.flush(p.Z_SYNC_FLUSH,function(){f._binding.params(a,c),f._hadError||(f._level=a,f._strategy=c,e&&e())})}else d.nextTick(e)},n.prototype.reset=function(){return this._binding.reset()},n.prototype._flush=function(b){this._transform(new a(0),"",b)},n.prototype.flush=function(b,c){var e=this._writableState;if(("function"==typeof b||void 0===b&&!c)&&(c=b,b=p.Z_FULL_FLUSH),e.ended)c&&d.nextTick(c);else if(e.ending)c&&this.once("end",c);else if(e.needDrain){var f=this;this.once("drain",function(){f.flush(c)})}else this._flushFlag=b,this.write(new a(0),"",c)},n.prototype.close=function(a){if(a&&d.nextTick(a),!this._closed){this._closed=!0,this._binding.close();var b=this;d.nextTick(function(){b.emit("close")})}},n.prototype._transform=function(b,c,d){var e,f=this._writableState,g=f.ending||f.ended,h=g&&(!b||f.length===b.length);if(null===!b&&!a.isBuffer(b))return d(new Error("invalid input"));h?e=p.Z_FINISH:(e=this._flushFlag,b.length>=f.length&&(this._flushFlag=this._opts.flush||p.Z_NO_FLUSH));this._processChunk(b,e,d)},n.prototype._processChunk=function(b,c,d){function e(k,n){if(!i._hadError){var o=g-n;if(r(o>=0,"have should not go down"),o>0){var p=i._buffer.slice(i._offset,i._offset+o);i._offset+=o,j?i.push(p):(l.push(p),m+=p.length)}if((0===n||i._offset>=i._chunkSize)&&(g=i._chunkSize,i._offset=0,i._buffer=new a(i._chunkSize)),0===n){if(h+=f-k,f=k,!j)return!0;var q=i._binding.write(c,b,h,f,i._buffer,i._offset,i._chunkSize);return q.callback=e,void(q.buffer=b)}return j?void d():!1}}var f=b&&b.length,g=this._chunkSize-this._offset,h=0,i=this,j="function"==typeof d;if(!j){var k,l=[],m=0;this.on("error",function(a){k=a});do var n=this._binding.writeSync(c,b,h,f,this._buffer,this._offset,g);while(!this._hadError&&e(n[0],n[1]));if(this._hadError)throw k;var o=a.concat(l,m);return this.close(),o}var p=this._binding.write(c,b,h,f,this._buffer,this._offset,g);p.buffer=b,p.callback=e},q.inherits(g,n),q.inherits(h,n),q.inherits(i,n),q.inherits(j,n),q.inherits(k,n),q.inherits(l,n),q.inherits(m,n)}).call(b,c(2).Buffer,c(30))},function(a,b,c){(function(a,d){function e(a){if(ab.UNZIP)throw new TypeError("Bad argument");this.mode=a,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function f(a,b){for(var c=0;c4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(C.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){D._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,C.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=E(a.adler,b,e,c):2===a.state.wrap&&(a.adler=F(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-ja?a.strstart-(a.w_size-ja):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ia,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&m>f);if(d=ia-(m-f),f=m-ia,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-ja)){C.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=ha)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===H)return sa;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return sa;if(a.strstart-a.block_start>=a.w_size-ja&&(h(a,!1),0===a.strm.avail_out))return sa}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ua:va):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?sa:sa}function o(a,b){for(var c,d;;){if(a.lookahead=ha&&(a.ins_h=(a.ins_h<=ha)if(d=D._tr_tally(a,a.strstart-a.match_start,a.match_length-ha),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=ha){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<=ha&&(a.ins_h=(a.ins_h<4096)&&(a.match_length=ha-1)),a.prev_length>=ha&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-ha,d=D._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-ha),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<=ha&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ia;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&f>e);a.match_length=ia-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=ha?(c=D._tr_tally(a,1,a.match_length-ha),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return sa}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ua:va):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sa:ta}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===H)return sa;break}if(a.match_length=0,c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return sa}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ua:va):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sa:ta}function s(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=B[a.level].max_lazy,a.good_match=B[a.level].good_length,a.nice_match=B[a.level].nice_length,a.max_chain_length=B[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=ha-1,a.match_available=0,a.ins_h=0}function t(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new C.Buf16(2*fa),this.dyn_dtree=new C.Buf16(2*(2*da+1)),this.bl_tree=new C.Buf16(2*(2*ea+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new C.Buf16(ga+1),this.heap=new C.Buf16(2*ca+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new C.Buf16(2*ca+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function u(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=X,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?la:qa,a.adler=2===b.wrap?0:1,b.last_flush=H,D._tr_init(b),M):d(a,O)}function v(a){var b=u(a);return b===M&&s(a.state),b}function w(a,b){return a&&a.state?2!==a.state.wrap?O:(a.state.gzhead=b,M):O}function x(a,b,c,e,f,g){if(!a)return O;var h=1;if(b===R&&(b=6),0>e?(h=0,e=-e):e>15&&(h=2,e-=16),1>f||f>Z||c!==Y||8>e||e>15||0>b||b>9||0>g||g>V)return d(a,O);8===e&&(e=9);var i=new t;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<>1,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,v(a)}function y(a,b){return x(a,b,Y,$,_,W)}function z(a,b){var c,h,k,l;if(!a||!a.state||b>L||0>b)return a?d(a,O):O;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===ra&&b!==K)return d(a,0===a.avail_out?Q:O);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===la)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=F(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=ma):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,wa),h.status=qa);else{var m=Y+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=T||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=ka),m+=31-m%31,h.status=qa,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===ma)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=na)}else h.status=na;if(h.status===na)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindexk&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=oa)}else h.status=oa;if(h.status===oa)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindexk&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=pa)}else h.status=pa;if(h.status===pa&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=qa)):h.status=qa),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,M}else if(0===a.avail_in&&e(b)<=e(c)&&b!==K)return d(a,Q);if(h.status===ra&&0!==a.avail_in)return d(a,Q);if(0!==a.avail_in||0!==h.lookahead||b!==H&&h.status!==ra){var o=h.strategy===T?r(h,b):h.strategy===U?q(h,b):B[h.level].func(h,b);if(o!==ua&&o!==va||(h.status=ra),o===sa||o===ua)return 0===a.avail_out&&(h.last_flush=-1),M;if(o===ta&&(b===I?D._tr_align(h):b!==L&&(D._tr_stored_block(h,0,0,!1),b===J&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,M}return b!==K?M:h.wrap<=0?N:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?M:N)}function A(a){var b;return a&&a.state?(b=a.state.status,b!==la&&b!==ma&&b!==na&&b!==oa&&b!==pa&&b!==qa&&b!==ra?d(a,O):(a.state=null,b===qa?d(a,P):M)):O}var B,C=c(52),D=c(53),E=c(54),F=c(55),G=c(49),H=0,I=1,J=3,K=4,L=5,M=0,N=1,O=-2,P=-3,Q=-5,R=-1,S=1,T=2,U=3,V=4,W=0,X=2,Y=8,Z=9,$=15,_=8,aa=29,ba=256,ca=ba+1+aa,da=30,ea=19,fa=2*ca+1,ga=15,ha=3,ia=258,ja=ia+ha+1,ka=32,la=42,ma=69,na=73,oa=91,pa=103,qa=113,ra=666,sa=1,ta=2,ua=3,va=4,wa=3,xa=function(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e};B=[new xa(0,0,0,0,n),new xa(4,4,8,4,o),new xa(4,5,16,8,o),new xa(4,6,32,32,o),new xa(4,4,16,16,p),new xa(8,16,32,32,p),new xa(8,16,128,128,p),new xa(8,32,128,256,p),new xa(32,128,258,1024,p),new xa(32,258,258,4096,p)],b.deflateInit=y,b.deflateInit2=x,b.deflateReset=v,b.deflateResetKeep=u,b.deflateSetHeader=w,b.deflate=z,b.deflateEnd=A,b.deflateInfo="pako deflate (from Nodeca project)"},function(a,b){"use strict";var c="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;b.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},b.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var d={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;c>b;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;c>b;b++)f=a[b],g.set(f,e),e+=f.length;return g}},e={arraySet:function(a,b,c,d,e){for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};b.setTyped=function(a){a?(b.Buf8=Uint8Array,b.Buf16=Uint16Array,b.Buf32=Int32Array,b.assign(b,d)):(b.Buf8=Array,b.Buf16=Array,b.Buf32=Array,b.assign(b,e))},b.setTyped(c)},function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a){return 256>a?ga[a]:ga[256+(a>>>7)]}function f(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function g(a,b,c){a.bi_valid>V-c?(a.bi_buf|=b<>V-a.bi_valid,a.bi_valid+=c-V):(a.bi_buf|=b<>>=1,c<<=1;while(--b>0);return c>>>1}function j(a){16===a.bi_valid?(f(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function k(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;U>=f;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;T>c;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function l(a,b,c){var d,e,f=new Array(U+1),g=0;for(d=1;U>=d;d++)f[d]=g=g+c[d-1]<<1;for(e=0;b>=e;e++){var h=a[2*e+1];0!==h&&(a[2*e]=i(f[h]++,h))}}function m(){var a,b,c,d,e,f=new Array(U+1);for(c=0,d=0;O-1>d;d++)for(ia[d]=c,a=0;a<1<<_[d];a++)ha[c++]=d;for(ha[c-1]=d,e=0,d=0;16>d;d++)for(ja[d]=e,a=0;a<1<>=7;R>d;d++)for(ja[d]=e<<7,a=0;a<1<=b;b++)f[b]=0;for(a=0;143>=a;)ea[2*a+1]=8,a++,f[8]++;for(;255>=a;)ea[2*a+1]=9,a++,f[9]++;for(;279>=a;)ea[2*a+1]=7,a++,f[7]++;for(;287>=a;)ea[2*a+1]=8,a++,f[8]++;for(l(ea,Q+1,f),a=0;R>a;a++)fa[2*a+1]=5,fa[2*a]=i(a,5);ka=new na(ea,_,P+1,Q,U),la=new na(fa,aa,0,R,U),ma=new na(new Array(0),ba,0,S,W)}function n(a){var b;for(b=0;Q>b;b++)a.dyn_ltree[2*b]=0;for(b=0;R>b;b++)a.dyn_dtree[2*b]=0;for(b=0;S>b;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*X]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function o(a){a.bi_valid>8?f(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function p(a,b,c,d){o(a),d&&(f(a,c),f(a,~c)),E.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function q(a,b,c,d){var e=2*b,f=2*c;return a[e]c;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=2>j?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)r(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],r(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,r(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],k(a,b),l(f,j,a.bl_count)}function u(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;c>=d;d++)e=g,g=b[2*(d+1)+1],++hh?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*Y]++):10>=h?a.bl_tree[2*Z]++:a.bl_tree[2*$]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function v(a,b,c){var d,e,f=-1,i=b[1],j=0,k=7,l=4;for(0===i&&(k=138,l=3),d=0;c>=d;d++)if(e=i,i=b[2*(d+1)+1],!(++jj){do h(a,e,a.bl_tree);while(0!==--j)}else 0!==e?(e!==f&&(h(a,e,a.bl_tree),j--),h(a,Y,a.bl_tree),g(a,j-3,2)):10>=j?(h(a,Z,a.bl_tree),g(a,j-3,3)):(h(a,$,a.bl_tree),g(a,j-11,7));j=0,f=e,0===i?(k=138,l=3):e===i?(k=6,l=3):(k=7,l=4)}}function w(a){var b;for(u(a,a.dyn_ltree,a.l_desc.max_code),u(a,a.dyn_dtree,a.d_desc.max_code),t(a,a.bl_desc),b=S-1;b>=3&&0===a.bl_tree[2*ca[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function x(a,b,c,d){var e;for(g(a,b-257,5),g(a,c-1,5),g(a,d-4,4),e=0;d>e;e++)g(a,a.bl_tree[2*ca[e]+1],3);v(a,a.dyn_ltree,b-1),v(a,a.dyn_dtree,c-1)}function y(a){var b,c=4093624447;for(b=0;31>=b;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return G;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return H;for(b=32;P>b;b++)if(0!==a.dyn_ltree[2*b])return H;return G}function z(a){pa||(m(),pa=!0),a.l_desc=new oa(a.dyn_ltree,ka),a.d_desc=new oa(a.dyn_dtree,la),a.bl_desc=new oa(a.bl_tree,ma),a.bi_buf=0,a.bi_valid=0,n(a)}function A(a,b,c,d){g(a,(J<<1)+(d?1:0),3),p(a,b,c,!0)}function B(a){g(a,K<<1,3),h(a,X,ea),j(a)}function C(a,b,c,d){var e,f,h=0;a.level>0?(a.strm.data_type===I&&(a.strm.data_type=y(a)),t(a,a.l_desc),t(a,a.d_desc),h=w(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,e>=f&&(e=f)):e=f=c+5,e>=c+4&&-1!==b?A(a,b,c,d):a.strategy===F||f===e?(g(a,(K<<1)+(d?1:0),3),s(a,ea,fa)):(g(a,(L<<1)+(d?1:0),3),x(a,a.l_desc.max_code+1,a.d_desc.max_code+1,h+1),s(a,a.dyn_ltree,a.dyn_dtree)),n(a),d&&o(a)}function D(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(ha[c]+P+1)]++,a.dyn_dtree[2*e(b)]++),a.last_lit===a.lit_bufsize-1}var E=c(52),F=4,G=0,H=1,I=2,J=0,K=1,L=2,M=3,N=258,O=29,P=256,Q=P+1+O,R=30,S=19,T=2*Q+1,U=15,V=16,W=7,X=256,Y=16,Z=17,$=18,_=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],aa=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ba=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ca=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],da=512,ea=new Array(2*(Q+2));d(ea);var fa=new Array(2*R);d(fa);var ga=new Array(da);d(ga);var ha=new Array(N-M+1);d(ha);var ia=new Array(O);d(ia);var ja=new Array(R);d(ja);var ka,la,ma,na=function(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length},oa=function(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b},pa=!1;b._tr_init=z,b._tr_stored_block=A,b._tr_flush_block=C,b._tr_tally=D,b._tr_align=B},function(a,b){"use strict";function c(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}a.exports=c},function(a,b){"use strict";function c(){for(var a,b=[],c=0;256>c;c++){a=c;for(var d=0;8>d;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function d(a,b,c,d){var f=e,g=d+c;a=-1^a;for(var h=d;g>h;h++)a=a>>>8^f[255&(a^b[h])];return-1^a}var e=c();a.exports=d},function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=K,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new r.Buf32(oa),b.distcode=b.distdyn=new r.Buf32(pa),b.sane=1,b.back=-1,C):F}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):F}function h(a,b){var c,d;return a&&a.state?(d=a.state,0>b?(c=0,b=-b):(c=(b>>4)+1,48>b&&(b&=15)),b&&(8>b||b>15)?F:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):F}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==C&&(a.state=null),c):F}function j(a){return i(a,ra)}function k(a){if(sa){var b;for(p=new r.Buf32(512),q=new r.Buf32(32),b=0;144>b;)a.lens[b++]=8;for(;256>b;)a.lens[b++]=9;for(;280>b;)a.lens[b++]=7;for(;288>b;)a.lens[b++]=8;for(v(x,a.lens,0,288,p,0,a.work,{bits:9}),b=0;32>b;)a.lens[b++]=5;v(y,a.lens,0,32,q,0,a.work,{bits:5}),sa=!1}a.lencode=p,a.lenbits=9,a.distcode=q,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<=f.wsize?(r.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),r.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(r.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whaven;){if(0===i)break a; -i--,m+=e[g++]<>>8&255,c.check=t(c.check,Ba,2,0),m=0,n=0,c.mode=L;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=la;break}if((15&m)!==J){a.msg="unknown compression method",c.mode=la;break}if(m>>>=4,n-=4,wa=(15&m)+8,0===c.wbits)c.wbits=wa;else if(wa>c.wbits){a.msg="invalid window size",c.mode=la;break}c.dmax=1<n;){if(0===i)break a;i--,m+=e[g++]<>8&1),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0,c.mode=M;case M:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<>>8&255,Ba[2]=m>>>16&255,Ba[3]=m>>>24&255,c.check=t(c.check,Ba,4,0)),m=0,n=0,c.mode=N;case N:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>8),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0,c.mode=O;case O:if(1024&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=P;case P:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wa=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),r.arraySet(c.head.extra,e,g,q,wa)),512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=Q;case Q:if(2048&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.name+=String.fromCharCode(wa));while(wa&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=R;case R:if(4096&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.comment+=String.fromCharCode(wa));while(wa&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.comment=null);c.mode=S;case S:if(512&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=V;break;case T:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<>>=7&n,n-=7&n,c.mode=ia;break}for(;3>n;){if(0===i)break a;i--,m+=e[g++]<>>=1,n-=1,3&m){case 0:c.mode=X;break;case 1:if(k(c),c.mode=ba,b===B){m>>>=2,n-=2;break a}break;case 2:c.mode=$;break;case 3:a.msg="invalid block type",c.mode=la}m>>>=2,n-=2;break;case X:for(m>>>=7&n,n-=7&n;32>n;){if(0===i)break a;i--,m+=e[g++]<>>16^65535)){a.msg="invalid stored block lengths",c.mode=la;break}if(c.length=65535&m,m=0,n=0,c.mode=Y,b===B)break a;case Y:c.mode=Z;case Z:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;r.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=V;break;case $:for(;14>n;){if(0===i)break a;i--,m+=e[g++]<>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=la;break}c.have=0,c.mode=_;case _:for(;c.haven;){if(0===i)break a;i--,m+=e[g++]<>>=3,n-=3}for(;c.have<19;)c.lens[Ca[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ya={bits:c.lenbits},xa=v(w,c.lens,0,19,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid code lengths set",c.mode=la;break}c.have=0,c.mode=aa;case aa:for(;c.have>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<sa)m>>>=qa,n-=qa,c.lens[c.have++]=sa;else{if(16===sa){for(za=qa+2;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=qa,n-=qa,0===c.have){a.msg="invalid bit length repeat",c.mode=la;break}wa=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sa){for(za=qa+3;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=qa,n-=qa,wa=0,q=3+(7&m),m>>>=3,n-=3}else{for(za=qa+7;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=qa,n-=qa,wa=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=la;break}for(;q--;)c.lens[c.have++]=wa}}if(c.mode===la)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=la;break}if(c.lenbits=9,ya={bits:c.lenbits},xa=v(x,c.lens,0,c.nlen,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid literal/lengths set",c.mode=la;break}if(c.distbits=6,c.distcode=c.distdyn,ya={bits:c.distbits},xa=v(y,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ya),c.distbits=ya.bits,xa){a.msg="invalid distances set",c.mode=la;break}if(c.mode=ba,b===B)break a;case ba:c.mode=ca;case ca:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,u(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===V&&(c.back=-1);break}for(c.back=0;Aa=c.lencode[m&(1<>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=ta+qa);){if(0===i)break a;i--,m+=e[g++]<>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,c.length=sa,0===ra){c.mode=ha;break}if(32&ra){c.back=-1,c.mode=V;break}if(64&ra){a.msg="invalid literal/length code",c.mode=la;break}c.extra=15&ra,c.mode=da;case da:if(c.extra){for(za=c.extra;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=ea;case ea:for(;Aa=c.distcode[m&(1<>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=ta+qa);){if(0===i)break a;i--,m+=e[g++]<>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,64&ra){a.msg="invalid distance code",c.mode=la;break}c.offset=sa,c.extra=15&ra,c.mode=fa;case fa:if(c.extra){for(za=c.extra;za>n;){if(0===i)break a;i--,m+=e[g++]<>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=la;break}c.mode=ga;case ga:if(0===j)break a;if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=la;break}q>c.wnext?(q-=c.wnext,oa=c.wsize-q):oa=c.wnext-q,q>c.length&&(q=c.length),pa=c.window}else pa=f,oa=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pa[oa++];while(--q);0===c.length&&(c.mode=ca);break;case ha:if(0===j)break a;f[h++]=c.length,j--,c.mode=ca;break;case ia:if(c.wrap){for(;32>n;){if(0===i)break a;i--,m|=e[g++]<n;){if(0===i)break a;i--,m+=e[g++]<q&&(p+=B[f++]<>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<q&&(p+=B[f++]<>>=w,q-=w),15>q&&(p+=B[f++]<>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<q&&(p+=B[f++]<q&&(p+=B[f++]<k){a.msg="invalid distance too far back",e.mode=c;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&e.sane){a.msg="invalid distance too far back",e.mode=c;break a}if(z=0,A=o,0===n){if(z+=l-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(w>n){if(z+=l+n-w,w-=n,x>w){x-=w;do C[h++]=o[z++];while(--w);if(z=0,x>n){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(g>f&&j>h);x=q>>3,f-=x,q-=x<<3,p&=(1<f?5+(g-f):5-(f-g),a.avail_out=j>h?257+(j-h):257-(h-j),e.hold=p,e.bits=q}},function(a,b,c){"use strict";var d=c(52),e=15,f=852,g=592,h=0,i=1,j=2,k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],n=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];a.exports=function(a,b,c,o,p,q,r,s){var t,u,v,w,x,y,z,A,B,C=s.bits,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=null,O=0,P=new d.Buf16(e+1),Q=new d.Buf16(e+1),R=null,S=0;for(D=0;e>=D;D++)P[D]=0;for(E=0;o>E;E++)P[b[c+E]]++;for(H=C,G=e;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;G>F&&0===P[F];F++);for(F>H&&(H=F),K=1,D=1;e>=D;D++)if(K<<=1,K-=P[D],0>K)return-1;if(K>0&&(a===h||1!==G))return-1;for(Q[1]=0,D=1;e>D;D++)Q[D+1]=Q[D]+P[D];for(E=0;o>E;E++)0!==b[c+E]&&(r[Q[b[c+E]]++]=E);if(a===h?(N=R=r,y=19):a===i?(N=k,O-=257,R=l,S-=257,y=256):(N=m,R=n,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<f||a===j&&L>g)return 1;for(var T=0;;){T++,z=D-J,r[E]y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[c+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<I+J&&(K-=P[I+J],!(0>=K));)I++,K<<=1;if(L+=1<f||a===j&&L>g)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},function(a,b){a.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(a,b,c){(function(a,d){function e(a,c){var d={seen:[],stylize:g};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),p(c)?d.showHidden=c:c&&b._extend(d,c),v(d.showHidden)&&(d.showHidden=!1),v(d.depth)&&(d.depth=2),v(d.colors)&&(d.colors=!1),v(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=f),i(d,a,d.depth)}function f(a,b){var c=e.styles[b];return c?"["+e.colors[c][0]+"m"+a+"["+e.colors[c][1]+"m":a}function g(a,b){return a}function h(a){var b={};return a.forEach(function(a,c){b[a]=!0}),b}function i(a,c,d){if(a.customInspect&&c&&A(c.inspect)&&c.inspect!==b.inspect&&(!c.constructor||c.constructor.prototype!==c)){var e=c.inspect(d,a);return t(e)||(e=i(a,e,d)),e}var f=j(a,c);if(f)return f;var g=Object.keys(c),p=h(g);if(a.showHidden&&(g=Object.getOwnPropertyNames(c)),z(c)&&(g.indexOf("message")>=0||g.indexOf("description")>=0))return k(c);if(0===g.length){if(A(c)){var q=c.name?": "+c.name:"";return a.stylize("[Function"+q+"]","special")}if(w(c))return a.stylize(RegExp.prototype.toString.call(c),"regexp");if(y(c))return a.stylize(Date.prototype.toString.call(c),"date");if(z(c))return k(c)}var r="",s=!1,u=["{","}"];if(o(c)&&(s=!0,u=["[","]"]),A(c)){var v=c.name?": "+c.name:"";r=" [Function"+v+"]"}if(w(c)&&(r=" "+RegExp.prototype.toString.call(c)),y(c)&&(r=" "+Date.prototype.toUTCString.call(c)),z(c)&&(r=" "+k(c)),0===g.length&&(!s||0==c.length))return u[0]+r+u[1];if(0>d)return w(c)?a.stylize(RegExp.prototype.toString.call(c),"regexp"):a.stylize("[Object]","special");a.seen.push(c);var x;return x=s?l(a,c,d,p,g):g.map(function(b){return m(a,c,d,p,b,s)}),a.seen.pop(),n(x,r,u)}function j(a,b){if(v(b))return a.stylize("undefined","undefined");if(t(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return s(b)?a.stylize(""+b,"number"):p(b)?a.stylize(""+b,"boolean"):q(b)?a.stylize("null","null"):void 0}function k(a){return"["+Error.prototype.toString.call(a)+"]"}function l(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)F(b,String(g))?f.push(m(a,b,c,d,String(g),!0)):f.push("");return e.forEach(function(e){e.match(/^\d+$/)||f.push(m(a,b,c,d,e,!0))}),f}function m(a,b,c,d,e,f){var g,h,j;if(j=Object.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?h=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(h=a.stylize("[Setter]","special")),F(d,e)||(g="["+e+"]"),h||(a.seen.indexOf(j.value)<0?(h=q(c)?i(a,j.value,null):i(a,j.value,c-1),h.indexOf("\n")>-1&&(h=f?h.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+h.split("\n").map(function(a){return" "+a}).join("\n"))):h=a.stylize("[Circular]","special")),v(g)){if(f&&e.match(/^\d+$/))return h;g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+h}function n(a,b,c){var d=0,e=a.reduce(function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function o(a){return Array.isArray(a)}function p(a){return"boolean"==typeof a}function q(a){return null===a}function r(a){return null==a}function s(a){return"number"==typeof a}function t(a){return"string"==typeof a}function u(a){return"symbol"==typeof a}function v(a){return void 0===a}function w(a){return x(a)&&"[object RegExp]"===C(a)}function x(a){return"object"==typeof a&&null!==a}function y(a){return x(a)&&"[object Date]"===C(a)}function z(a){return x(a)&&("[object Error]"===C(a)||a instanceof Error)}function A(a){return"function"==typeof a}function B(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function C(a){return Object.prototype.toString.call(a)}function D(a){return 10>a?"0"+a.toString(10):a.toString(10)}function E(){var a=new Date,b=[D(a.getHours()),D(a.getMinutes()),D(a.getSeconds())].join(":");return[a.getDate(),J[a.getMonth()],b].join(" ")}function F(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var G=/%[sdj%]/g;b.format=function(a){if(!t(a)){for(var b=[],c=0;c=f)return a;switch(a){case"%s":return String(d[c++]);case"%d":return Number(d[c++]);case"%j":try{return JSON.stringify(d[c++])}catch(b){return"[Circular]"}default:return a}}),h=d[c];f>c;h=d[++c])g+=q(h)||!x(h)?" "+h:" "+e(h);return g},b.deprecate=function(c,e){function f(){if(!g){if(d.throwDeprecation)throw new Error(e);d.traceDeprecation?console.trace(e):console.error(e),g=!0}return c.apply(this,arguments)}if(v(a.process))return function(){return b.deprecate(c,e).apply(this,arguments)};if(d.noDeprecation===!0)return c;var g=!1;return f};var H,I={};b.debuglog=function(a){if(v(H)&&(H=d.env.NODE_DEBUG||""),a=a.toUpperCase(),!I[a])if(new RegExp("\\b"+a+"\\b","i").test(H)){var c=d.pid;I[a]=function(){var d=b.format.apply(b,arguments);console.error("%s %d: %s",a,c,d)}}else I[a]=function(){};return I[a]},b.inspect=e,e.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},e.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},b.isArray=o,b.isBoolean=p,b.isNull=q,b.isNullOrUndefined=r,b.isNumber=s,b.isString=t,b.isSymbol=u,b.isUndefined=v,b.isRegExp=w,b.isObject=x,b.isDate=y,b.isError=z,b.isFunction=A,b.isPrimitive=B,b.isBuffer=c(61);var J=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];b.log=function(){console.log("%s - %s",E(),b.format.apply(b,arguments))},b.inherits=c(62),b._extend=function(a,b){if(!b||!x(b))return a;for(var c=Object.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}}).call(b,function(){return this}(),c(30))},function(a,b){a.exports=function(a){return a&&"object"==typeof a&&"function"==typeof a.copy&&"function"==typeof a.fill&&"function"==typeof a.readUInt8}},function(a,b){"function"==typeof Object.create?a.exports=function(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:a.exports=function(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}},function(a,b,c){function d(a,b){return n.isUndefined(b)?""+b:n.isNumber(b)&&!isFinite(b)?b.toString():n.isFunction(b)||n.isRegExp(b)?b.toString():b}function e(a,b){return n.isString(a)?a.length=0;f--)if(g[f]!=h[f])return!1;for(f=g.length-1;f>=0;f--)if(e=g[f],!i(a[e],b[e]))return!1;return!0}function l(a,b){return a&&b?"[object RegExp]"==Object.prototype.toString.call(b)?b.test(a):a instanceof b?!0:b.call({},a)===!0:!1}function m(a,b,c,d){var e;n.isString(c)&&(d=c,c=null);try{b()}catch(f){e=f}if(d=(c&&c.name?" ("+c.name+").":".")+(d?" "+d:"."),a&&!e&&g(e,c,"Missing expected exception"+d),!a&&l(e,c)&&g(e,c,"Got unwanted exception"+d),a&&e&&c&&!l(e,c)||!a&&e)throw e}var n=c(60),o=Array.prototype.slice,p=Object.prototype.hasOwnProperty,q=a.exports=h;q.AssertionError=function(a){this.name="AssertionError",this.actual=a.actual,this.expected=a.expected,this.operator=a.operator,a.message?(this.message=a.message,this.generatedMessage=!1):(this.message=f(this),this.generatedMessage=!0);var b=a.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,b);else{var c=new Error;if(c.stack){var d=c.stack,e=b.name,h=d.indexOf("\n"+e);if(h>=0){var i=d.indexOf("\n",h+1);d=d.substring(i+1)}this.stack=d}}},n.inherits(q.AssertionError,Error),q.fail=g,q.ok=h,q.equal=function(a,b,c){a!=b&&g(a,b,c,"==",q.equal)},q.notEqual=function(a,b,c){a==b&&g(a,b,c,"!=",q.notEqual)},q.deepEqual=function(a,b,c){i(a,b)||g(a,b,c,"deepEqual",q.deepEqual)},q.notDeepEqual=function(a,b,c){i(a,b)&&g(a,b,c,"notDeepEqual",q.notDeepEqual)},q.strictEqual=function(a,b,c){a!==b&&g(a,b,c,"===",q.strictEqual)},q.notStrictEqual=function(a,b,c){a===b&&g(a,b,c,"!==",q.notStrictEqual)},q["throws"]=function(a,b,c){m.apply(this,[!0].concat(o.call(arguments)))},q.doesNotThrow=function(a,b){m.apply(this,[!1].concat(o.call(arguments)))},q.ifError=function(a){if(a)throw a};var r=Object.keys||function(a){var b=[];for(var c in a)p.call(a,c)&&b.push(c);return b}},function(a,b){(function(){var b;b=function(){function a(a,d){var e;this.document=a,null==d&&(d={}),this.size=d.size||"letter",this.layout=d.layout||"portrait","number"==typeof d.margin?this.margins={top:d.margin,left:d.margin,bottom:d.margin,right:d.margin}:this.margins=d.margins||b,e=Array.isArray(this.size)?this.size:c[this.size.toUpperCase()],this.width=e["portrait"===this.layout?0:1],this.height=e["portrait"===this.layout?1:0],this.content=this.document.ref(),this.resources=this.document.ref({ProcSet:["PDF","Text","ImageB","ImageC","ImageI"]}),Object.defineProperties(this,{fonts:{get:function(a){return function(){var b;return null!=(b=a.resources.data).Font?b.Font:b.Font={}}}(this)},xobjects:{get:function(a){return function(){var b;return null!=(b=a.resources.data).XObject?b.XObject:b.XObject={}}}(this)},ext_gstates:{get:function(a){return function(){var b;return null!=(b=a.resources.data).ExtGState?b.ExtGState:b.ExtGState={}}}(this)},patterns:{get:function(a){return function(){var b;return null!=(b=a.resources.data).Pattern?b.Pattern:b.Pattern={}}}(this)},annotations:{get:function(a){return function(){var b;return null!=(b=a.dictionary.data).Annots?b.Annots:b.Annots=[]}}(this)}}),this.dictionary=this.document.ref({Type:"Page",Parent:this.document._root.data.Pages,MediaBox:[0,0,this.width,this.height],Contents:this.content,Resources:this.resources})}var b,c;return a.prototype.maxY=function(){return this.height-this.margins.bottom},a.prototype.write=function(a){return this.content.write(a)},a.prototype.end=function(){return this.dictionary.end(),this.resources.end(),this.content.end()},b={top:72,left:72,bottom:72,right:72},c={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]},a}(),a.exports=b}).call(this)},function(a,b,c){(function(){var b,d,e,f,g;g=c(66),b=g.PDFGradient,d=g.PDFLinearGradient,e=g.PDFRadialGradient,a.exports={initColor:function(){return this._opacityRegistry={},this._opacityCount=0,this._gradCount=0},_normalizeColor:function(a){var c,d;return a instanceof b?a:("string"==typeof a&&("#"===a.charAt(0)?(4===a.length&&(a=a.replace(/#([0-9A-F])([0-9A-F])([0-9A-F])/i,"#$1$1$2$2$3$3")),c=parseInt(a.slice(1),16),a=[c>>16,c>>8&255,255&c]):f[a]&&(a=f[a])),Array.isArray(a)?(3===a.length?a=function(){var b,c,e;for(e=[],b=0,c=a.length;c>b;b++)d=a[b],e.push(d/255);return e}():4===a.length&&(a=function(){var b,c,e;for(e=[],b=0,c=a.length;c>b;b++)d=a[b],e.push(d/100);return e}()),a):null)},_setColor:function(a,c){var d,e,f,g;return(a=this._normalizeColor(a))?(this._sMasked&&(d=this.ref({Type:"ExtGState",SMask:"None"}),d.end(),e="Gs"+ ++this._opacityCount,this.page.ext_gstates[e]=d,this.addContent("/"+e+" gs"),this._sMasked=!1),f=c?"SCN":"scn",a instanceof b?(this._setColorSpace("Pattern",c),a.apply(f)):(g=4===a.length?"DeviceCMYK":"DeviceRGB",this._setColorSpace(g,c),a=a.join(" "),this.addContent(""+a+" "+f)),!0):!1},_setColorSpace:function(a,b){var c;return c=b?"CS":"cs",this.addContent("/"+a+" "+c)},fillColor:function(a,b){var c;return null==b&&(b=1),c=this._setColor(a,!1),c&&this.fillOpacity(b),this._fillColor=[a,b],this},strokeColor:function(a,b){var c;return null==b&&(b=1),c=this._setColor(a,!0),c&&this.strokeOpacity(b),this},opacity:function(a){return this._doOpacity(a,a),this},fillOpacity:function(a){return this._doOpacity(a,null),this},strokeOpacity:function(a){return this._doOpacity(null,a),this},_doOpacity:function(a,b){var c,d,e,f,g;if(null!=a||null!=b)return null!=a&&(a=Math.max(0,Math.min(1,a))),null!=b&&(b=Math.max(0,Math.min(1,b))),e=""+a+"_"+b,this._opacityRegistry[e]?(g=this._opacityRegistry[e],c=g[0],f=g[1]):(c={Type:"ExtGState"},null!=a&&(c.ca=a),null!=b&&(c.CA=b),c=this.ref(c),c.end(),d=++this._opacityCount,f="Gs"+d,this._opacityRegistry[e]=[c,f]),this.page.ext_gstates[f]=c,this.addContent("/"+f+" gs")},linearGradient:function(a,b,c,e){return new d(this,a,b,c,e)},radialGradient:function(a,b,c,d,f,g){return new e(this,a,b,c,d,f,g)}},f={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}).call(this)},function(a,b){(function(){var b,c,d,e={}.hasOwnProperty,f=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};b=function(){function a(a){this.doc=a,this.stops=[],this.embedded=!1,this.transform=[1,0,0,1,0,0],this._colorSpace="DeviceRGB"}return a.prototype.stop=function(a,b,c){return null==c&&(c=1),c=Math.max(0,Math.min(1,c)),this.stops.push([a,this.doc._normalizeColor(b),c]),this},a.prototype.embed=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J;if(!this.embedded&&0!==this.stops.length){for(this.embedded=!0,k=this.stops[this.stops.length-1],k[0]<1&&this.stops.push([1,k[1],k[2]]),a=[],d=[],C=[],j=E=0,H=this.stops.length-1;H>=0?H>E:E>H;j=H>=0?++E:--E)d.push(0,1),j+2!==this.stops.length&&a.push(this.stops[j+1][0]),e=this.doc.ref({FunctionType:2,Domain:[0,1],C0:this.stops[j+0][1],C1:this.stops[j+1][1],N:1}),C.push(e),e.end();if(1===C.length?e=C[0]:(e=this.doc.ref({FunctionType:3,Domain:[0,1],Functions:C,Bounds:a,Encode:d}),e.end()),this.id="Sh"+ ++this.doc._gradCount,l=this.doc._ctm.slice(),m=l[0],n=l[1],q=l[2],t=l[3],u=l[4],v=l[5],I=this.transform,o=I[0],p=I[1],r=I[2],s=I[3],b=I[4],c=I[5],l[0]=m*o+q*p,l[1]=n*o+t*p,l[2]=m*r+q*s,l[3]=n*r+t*s,l[4]=m*b+q*c+u,l[5]=n*b+t*c+v, -A=this.shader(e),A.end(),x=this.doc.ref({Type:"Pattern",PatternType:2,Shading:A,Matrix:function(){var a,b,c;for(c=[],a=0,b=l.length;b>a;a++)D=l[a],c.push(+D.toFixed(5));return c}()}),this.doc.page.patterns[this.id]=x,x.end(),this.stops.some(function(a){return a[2]<1})){for(g=this.opacityGradient(),g._colorSpace="DeviceGray",J=this.stops,F=0,G=J.length;G>F;F++)B=J[F],g.stop(B[0],[B[2]]);g=g.embed(),h=this.doc.ref({Type:"Group",S:"Transparency",CS:"DeviceGray"}),h.end(),y=this.doc.ref({ProcSet:["PDF","Text","ImageB","ImageC","ImageI"],Shading:{Sh1:g.data.Shading}}),y.end(),f=this.doc.ref({Type:"XObject",Subtype:"Form",FormType:1,BBox:[0,0,this.doc.page.width,this.doc.page.height],Group:h,Resources:y}),f.end("/Sh1 sh"),z=this.doc.ref({Type:"Mask",S:"Luminosity",G:f}),z.end(),i=this.doc.ref({Type:"ExtGState",SMask:z}),this.opacity_id=++this.doc._opacityCount,w="Gs"+this.opacity_id,this.doc.page.ext_gstates[w]=i,i.end()}return x}},a.prototype.apply=function(a){return this.embedded||this.embed(),this.doc.addContent("/"+this.id+" "+a),this.opacity_id?(this.doc.addContent("/Gs"+this.opacity_id+" gs"),this.doc._sMasked=!0):void 0},a}(),c=function(a){function b(a,c,d,e,f){this.doc=a,this.x1=c,this.y1=d,this.x2=e,this.y2=f,b.__super__.constructor.apply(this,arguments)}return f(b,a),b.prototype.shader=function(a){return this.doc.ref({ShadingType:2,ColorSpace:this._colorSpace,Coords:[this.x1,this.y1,this.x2,this.y2],Function:a,Extend:[!0,!0]})},b.prototype.opacityGradient=function(){return new b(this.doc,this.x1,this.y1,this.x2,this.y2)},b}(b),d=function(a){function b(a,c,d,e,f,g,h){this.doc=a,this.x1=c,this.y1=d,this.r1=e,this.x2=f,this.y2=g,this.r2=h,b.__super__.constructor.apply(this,arguments)}return f(b,a),b.prototype.shader=function(a){return this.doc.ref({ShadingType:3,ColorSpace:this._colorSpace,Coords:[this.x1,this.y1,this.r1,this.x2,this.y2,this.r2],Function:a,Extend:[!0,!0]})},b.prototype.opacityGradient=function(){return new b(this.doc,this.x1,this.y1,this.r1,this.x2,this.y2,this.r2)},b}(b),a.exports={PDFGradient:b,PDFLinearGradient:c,PDFRadialGradient:d}}).call(this)},function(a,b,c){(function(){var b,d,e=[].slice;d=c(68),b=4*((Math.sqrt(2)-1)/3),a.exports={initVector:function(){return this._ctm=[1,0,0,1,0,0],this._ctmStack=[]},save:function(){return this._ctmStack.push(this._ctm.slice()),this.addContent("q")},restore:function(){return this._ctm=this._ctmStack.pop()||[1,0,0,1,0,0],this.addContent("Q")},closePath:function(){return this.addContent("h")},lineWidth:function(a){return this.addContent(""+a+" w")},_CAP_STYLES:{BUTT:0,ROUND:1,SQUARE:2},lineCap:function(a){return"string"==typeof a&&(a=this._CAP_STYLES[a.toUpperCase()]),this.addContent(""+a+" J")},_JOIN_STYLES:{MITER:0,ROUND:1,BEVEL:2},lineJoin:function(a){return"string"==typeof a&&(a=this._JOIN_STYLES[a.toUpperCase()]),this.addContent(""+a+" j")},miterLimit:function(a){return this.addContent(""+a+" M")},dash:function(a,b){var c,d,e;return null==b&&(b={}),null==a?this:(d=null!=(e=b.space)?e:a,c=b.phase||0,this.addContent("["+a+" "+d+"] "+c+" d"))},undash:function(){return this.addContent("[] 0 d")},moveTo:function(a,b){return this.addContent(""+a+" "+b+" m")},lineTo:function(a,b){return this.addContent(""+a+" "+b+" l")},bezierCurveTo:function(a,b,c,d,e,f){return this.addContent(""+a+" "+b+" "+c+" "+d+" "+e+" "+f+" c")},quadraticCurveTo:function(a,b,c,d){return this.addContent(""+a+" "+b+" "+c+" "+d+" v")},rect:function(a,b,c,d){return this.addContent(""+a+" "+b+" "+c+" "+d+" re")},roundedRect:function(a,b,c,d,e){return null==e&&(e=0),this.moveTo(a+e,b),this.lineTo(a+c-e,b),this.quadraticCurveTo(a+c,b,a+c,b+e),this.lineTo(a+c,b+d-e),this.quadraticCurveTo(a+c,b+d,a+c-e,b+d),this.lineTo(a+e,b+d),this.quadraticCurveTo(a,b+d,a,b+d-e),this.lineTo(a,b+e),this.quadraticCurveTo(a,b,a+e,b)},ellipse:function(a,c,d,e){var f,g,h,i,j,k;return null==e&&(e=d),a-=d,c-=e,f=d*b,g=e*b,h=a+2*d,j=c+2*e,i=a+d,k=c+e,this.moveTo(a,k),this.bezierCurveTo(a,k-g,i-f,c,i,c),this.bezierCurveTo(i+f,c,h,k-g,h,k),this.bezierCurveTo(h,k+g,i+f,j,i,j),this.bezierCurveTo(i-f,j,a,k+g,a,k),this.closePath()},circle:function(a,b,c){return this.ellipse(a,b,c)},polygon:function(){var a,b,c,d;for(b=1<=arguments.length?e.call(arguments,0):[],this.moveTo.apply(this,b.shift()),c=0,d=b.length;d>c;c++)a=b[c],this.lineTo.apply(this,a);return this.closePath()},path:function(a){return d.apply(this,a),this},_windingRule:function(a){return/even-?odd/.test(a)?"*":""},fill:function(a,b){return/(even-?odd)|(non-?zero)/.test(a)&&(b=a,a=null),a&&this.fillColor(a),this.addContent("f"+this._windingRule(b))},stroke:function(a){return a&&this.strokeColor(a),this.addContent("S")},fillAndStroke:function(a,b,c){var d;return null==b&&(b=a),d=/(even-?odd)|(non-?zero)/,d.test(a)&&(c=a,a=null),d.test(b)&&(c=b,b=a),a&&(this.fillColor(a),this.strokeColor(b)),this.addContent("B"+this._windingRule(c))},clip:function(a){return this.addContent("W"+this._windingRule(a)+" n")},transform:function(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o;return g=this._ctm,h=g[0],i=g[1],j=g[2],k=g[3],l=g[4],m=g[5],g[0]=h*a+j*b,g[1]=i*a+k*b,g[2]=h*c+j*d,g[3]=i*c+k*d,g[4]=h*e+j*f+l,g[5]=i*e+k*f+m,o=function(){var g,h,i,j;for(i=[a,b,c,d,e,f],j=[],g=0,h=i.length;h>g;g++)n=i[g],j.push(+n.toFixed(5));return j}().join(" "),this.addContent(""+o+" cm")},translate:function(a,b){return this.transform(1,0,0,1,a,b)},rotate:function(a,b){var c,d,e,f,g,h,i,j;return null==b&&(b={}),d=a*Math.PI/180,c=Math.cos(d),e=Math.sin(d),f=h=0,null!=b.origin&&(j=b.origin,f=j[0],h=j[1],g=f*c-h*e,i=f*e+h*c,f-=g,h-=i),this.transform(c,e,-e,c,f,h)},scale:function(a,b,c){var d,e,f;return null==b&&(b=a),null==c&&(c={}),2===arguments.length&&(b=a,c=b),d=e=0,null!=c.origin&&(f=c.origin,d=f[0],e=f[1],d-=a*d,e-=b*e),this.transform(a,0,0,b,d,e)}}}).call(this)},function(a,b){(function(){var b;b=function(){function a(){}var b,c,d,e,f,g,h,i,j,k,l,m,n;return a.apply=function(a,c){var d;return d=g(c),b(d,a)},f={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0},g=function(a){var b,c,d,e,g,h,i,j,k;for(i=[],b=[],e="",g=!1,h=0,j=0,k=a.length;k>j;j++)if(c=a[j],null!=f[c])h=f[c],d&&(e.length>0&&(b[b.length]=+e),i[i.length]={cmd:d,args:b},b=[],e="",g=!1),d=c;else if(" "===c||","===c||"-"===c&&e.length>0&&"e"!==e[e.length-1]||"."===c&&g){if(0===e.length)continue;b.length===h?(i[i.length]={cmd:d,args:b},b=[+e],"M"===d&&(d="L"),"m"===d&&(d="l")):b[b.length]=+e,g="."===c,e="-"===c||"."===c?c:""}else e+=c,"."===c&&(g=!0);return e.length>0&&(b.length===h?(i[i.length]={cmd:d,args:b},b=[+e],"M"===d&&(d="L"),"m"===d&&(d="l")):b[b.length]=+e),i[i.length]={cmd:d,args:b},i},d=e=h=i=m=n=0,b=function(a,b){var c,f,g,k,l;for(d=e=h=i=m=n=0,f=g=0,k=a.length;k>g;f=++g)c=a[f],"function"==typeof j[l=c.cmd]&&j[l](b,c.args);return d=e=h=i=0},j={M:function(a,b){return d=b[0],e=b[1],h=i=null,m=d,n=e,a.moveTo(d,e)},m:function(a,b){return d+=b[0],e+=b[1],h=i=null,m=d,n=e,a.moveTo(d,e)},C:function(a,b){return d=b[4],e=b[5],h=b[2],i=b[3],a.bezierCurveTo.apply(a,b)},c:function(a,b){return a.bezierCurveTo(b[0]+d,b[1]+e,b[2]+d,b[3]+e,b[4]+d,b[5]+e),h=d+b[2],i=e+b[3],d+=b[4],e+=b[5]},S:function(a,b){return null===h&&(h=d,i=e),a.bezierCurveTo(d-(h-d),e-(i-e),b[0],b[1],b[2],b[3]),h=b[0],i=b[1],d=b[2],e=b[3]},s:function(a,b){return null===h&&(h=d,i=e),a.bezierCurveTo(d-(h-d),e-(i-e),d+b[0],e+b[1],d+b[2],e+b[3]),h=d+b[0],i=e+b[1],d+=b[2],e+=b[3]},Q:function(a,b){return h=b[0],i=b[1],d=b[2],e=b[3],a.quadraticCurveTo(b[0],b[1],d,e)},q:function(a,b){return a.quadraticCurveTo(b[0]+d,b[1]+e,b[2]+d,b[3]+e),h=d+b[0],i=e+b[1],d+=b[2],e+=b[3]},T:function(a,b){return null===h?(h=d,i=e):(h=d-(h-d),i=e-(i-e)),a.quadraticCurveTo(h,i,b[0],b[1]),h=d-(h-d),i=e-(i-e),d=b[0],e=b[1]},t:function(a,b){return null===h?(h=d,i=e):(h=d-(h-d),i=e-(i-e)),a.quadraticCurveTo(h,i,d+b[0],e+b[1]),d+=b[0],e+=b[1]},A:function(a,b){return l(a,d,e,b),d=b[5],e=b[6]},a:function(a,b){return b[5]+=d,b[6]+=e,l(a,d,e,b),d=b[5],e=b[6]},L:function(a,b){return d=b[0],e=b[1],h=i=null,a.lineTo(d,e)},l:function(a,b){return d+=b[0],e+=b[1],h=i=null,a.lineTo(d,e)},H:function(a,b){return d=b[0],h=i=null,a.lineTo(d,e)},h:function(a,b){return d+=b[0],h=i=null,a.lineTo(d,e)},V:function(a,b){return e=b[0],h=i=null,a.lineTo(d,e)},v:function(a,b){return e+=b[0],h=i=null,a.lineTo(d,e)},Z:function(a){return a.closePath(),d=m,e=n},z:function(a){return a.closePath(),d=m,e=n}},l=function(a,b,d,e){var f,g,h,i,j,l,m,n,o,p,q,r,s;for(l=e[0],m=e[1],j=e[2],i=e[3],p=e[4],g=e[5],h=e[6],o=c(g,h,l,m,i,p,j,b,d),s=[],q=0,r=o.length;r>q;q++)n=o[q],f=k.apply(null,n),s.push(a.bezierCurveTo.apply(a,f));return s},c=function(a,b,c,d,e,f,g,j,k){var l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K;for(y=g*(Math.PI/180),x=Math.sin(y),p=Math.cos(y),c=Math.abs(c),d=Math.abs(d),h=p*(j-a)*.5+x*(k-b)*.5,i=p*(k-b)*.5-x*(j-a)*.5,s=h*h/(c*c)+i*i/(d*d),s>1&&(s=Math.sqrt(s),c*=s,d*=s),l=p/c,m=x/c,n=-x/d,o=p/d,E=l*j+m*k,H=n*j+o*k,F=l*a+m*b,I=n*a+o*b,q=(F-E)*(F-E)+(I-H)*(I-H),w=1/q-.25,0>w&&(w=0),v=Math.sqrt(w),f===e&&(v=-v),G=.5*(E+F)-v*(I-H),J=.5*(H+I)+v*(F-E),z=Math.atan2(H-J,E-G),A=Math.atan2(I-J,F-G),D=A-z,0>D&&1===f?D+=2*Math.PI:D>0&&0===f&&(D-=2*Math.PI),u=Math.ceil(Math.abs(D/(.5*Math.PI+.001))),t=[],r=K=0;u>=0?u>K:K>u;r=u>=0?++K:--K)B=z+r*D/u,C=z+(r+1)*D/u,t[r]=[G,J,B,C,c,d,x,p];return t},k=function(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p,q,r,s,t;return i=h*e,j=-g*f,k=g*e,l=h*f,n=.5*(d-c),m=8/3*Math.sin(.5*n)*Math.sin(.5*n)/Math.sin(n),o=a+Math.cos(c)-m*Math.sin(c),r=b+Math.sin(c)+m*Math.cos(c),q=a+Math.cos(d),t=b+Math.sin(d),p=q+m*Math.sin(d),s=t-m*Math.cos(d),[i*o+j*r,k*o+l*r,i*p+j*s,k*p+l*s,i*q+j*t,k*q+l*t]},a}(),a.exports=b}).call(this)},function(a,b,c){(function(){var b;b=c(70),a.exports={initFonts:function(){this._fontFamilies={},this._fontCount=0,this._fontSize=12,this._font=null,this._registeredFonts={}},font:function(a,c,d){var e,f,g,h;return"number"==typeof c&&(d=c,c=null),"string"==typeof a&&this._registeredFonts[a]?(e=a,h=this._registeredFonts[a],a=h.src,c=h.family):(e=c||a,"string"!=typeof e&&(e=null)),null!=d&&this.fontSize(d),(f=this._fontFamilies[e])?(this._font=f,this):(g="F"+ ++this._fontCount,this._font=new b(this,a,c,g),(f=this._fontFamilies[this._font.name])?(this._font=f,this):(e&&(this._fontFamilies[e]=this._font),this._fontFamilies[this._font.name]=this._font,this))},fontSize:function(a){return this._fontSize=a,this},currentLineHeight:function(a){return null==a&&(a=!1),this._font.lineHeight(this._fontSize,a)},registerFont:function(a,b,c){return this._registeredFonts[a]={src:b,family:c},this}}}).call(this)},function(a,b,c){(function(b,d){(function(){var e,f,g,h,i;h=c(71),e=c(87),g=c(88),i=c(44),f=function(){function a(a,d,f,i){if(this.document=a,this.id=i,"string"==typeof d){if(d in c)return this.isAFM=!0,this.font=new e(c[d]()),void this.registerAFM(d);if(/\.(ttf|ttc)$/i.test(d))this.font=h.open(d,f);else{if(!/\.dfont$/i.test(d))throw new Error("Not a supported font format or standard PDF font.");this.font=h.fromDFont(d,f)}}else if(b.isBuffer(d))this.font=h.fromBuffer(d,f);else if(d instanceof Uint8Array)this.font=h.fromBuffer(new b(d),f);else{if(!(d instanceof ArrayBuffer))throw new Error("Not a supported font format or standard PDF font.");this.font=h.fromBuffer(new b(new Uint8Array(d)),f)}this.subset=new g(this.font),this.registerTTF()}var c,f;return c={Courier:function(){return i.readFileSync(d+"/font/data/Courier.afm","utf8")},"Courier-Bold":function(){return i.readFileSync(d+"/font/data/Courier-Bold.afm","utf8")},"Courier-Oblique":function(){return i.readFileSync(d+"/font/data/Courier-Oblique.afm","utf8")},"Courier-BoldOblique":function(){return i.readFileSync(d+"/font/data/Courier-BoldOblique.afm","utf8")},Helvetica:function(){return i.readFileSync(d+"/font/data/Helvetica.afm","utf8")},"Helvetica-Bold":function(){return i.readFileSync(d+"/font/data/Helvetica-Bold.afm","utf8")},"Helvetica-Oblique":function(){return i.readFileSync(d+"/font/data/Helvetica-Oblique.afm","utf8")},"Helvetica-BoldOblique":function(){return i.readFileSync(d+"/font/data/Helvetica-BoldOblique.afm","utf8")},"Times-Roman":function(){return i.readFileSync(d+"/font/data/Times-Roman.afm","utf8")},"Times-Bold":function(){return i.readFileSync(d+"/font/data/Times-Bold.afm","utf8")},"Times-Italic":function(){return i.readFileSync(d+"/font/data/Times-Italic.afm","utf8")},"Times-BoldItalic":function(){return i.readFileSync(d+"/font/data/Times-BoldItalic.afm","utf8")},Symbol:function(){return i.readFileSync(d+"/font/data/Symbol.afm","utf8")},ZapfDingbats:function(){return i.readFileSync(d+"/font/data/ZapfDingbats.afm","utf8")}},a.prototype.use=function(a){var b;return null!=(b=this.subset)?b.use(a):void 0},a.prototype.embed=function(){return this.embedded||null==this.dictionary?void 0:(this.isAFM?this.embedAFM():this.embedTTF(),this.embedded=!0)},a.prototype.encode=function(a){var b;return this.isAFM?this.font.encodeText(a):(null!=(b=this.subset)?b.encodeText(a):void 0)||a},a.prototype.ref=function(){return null!=this.dictionary?this.dictionary:this.dictionary=this.document.ref()},a.prototype.registerTTF=function(){var a,b,c,d,e;if(this.name=this.font.name.postscriptName,this.scaleFactor=1e3/this.font.head.unitsPerEm,this.bbox=function(){var b,c,d,e;for(d=this.font.bbox,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(Math.round(a*this.scaleFactor));return e}.call(this),this.stemV=0,this.font.post.exists?(d=this.font.post.italic_angle,b=d>>16,c=255&d,b&!0&&(b=-((65535^b)+1)),this.italicAngle=+(""+b+"."+c)):this.italicAngle=0,this.ascender=Math.round(this.font.ascender*this.scaleFactor),this.decender=Math.round(this.font.decender*this.scaleFactor),this.lineGap=Math.round(this.font.lineGap*this.scaleFactor),this.capHeight=this.font.os2.exists&&this.font.os2.capHeight||this.ascender,this.xHeight=this.font.os2.exists&&this.font.os2.xHeight||0,this.familyClass=(this.font.os2.exists&&this.font.os2.familyClass||0)>>8,this.isSerif=1===(e=this.familyClass)||2===e||3===e||4===e||5===e||7===e,this.isScript=10===this.familyClass,this.flags=0,this.font.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.font.cmap.unicode)throw new Error("No unicode cmap for font")},a.prototype.embedTTF=function(){var a,b,c,d,e,g,h,i;return d=this.subset.encode(),h=this.document.ref(),h.write(d),h.data.Length1=h.uncompressedLength,h.end(),e=this.document.ref({Type:"FontDescriptor",FontName:this.subset.postscriptName,FontFile2:h,FontBBox:this.bbox,Flags:this.flags,StemV:this.stemV,ItalicAngle:this.italicAngle,Ascent:this.ascender,Descent:this.decender,CapHeight:this.capHeight,XHeight:this.xHeight}),e.end(),g=+Object.keys(this.subset.cmap)[0],a=function(){var a,b;a=this.subset.cmap,b=[];for(c in a)i=a[c],b.push(Math.round(this.font.widthOfGlyph(i)));return b}.call(this),b=this.document.ref(),b.end(f(this.subset.subset)),this.dictionary.data={Type:"Font",BaseFont:this.subset.postscriptName,Subtype:"TrueType",FontDescriptor:e,FirstChar:g,LastChar:g+a.length-1,Widths:a,Encoding:"MacRomanEncoding",ToUnicode:b},this.dictionary.end()},f=function(a){var b,c,d,e,f,g,h;for(f="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<00>\nendcodespacerange",c=Object.keys(a).sort(function(a,b){return a-b}),d=[],g=0,h=c.length;h>g;g++)b=c[g],d.length>=100&&(f+="\n"+d.length+" beginbfchar\n"+d.join("\n")+"\nendbfchar",d=[]),e=("0000"+a[b].toString(16)).slice(-4),b=(+b).toString(16),d.push("<"+b+"><"+e+">");return d.length&&(f+="\n"+d.length+" beginbfchar\n"+d.join("\n")+"\nendbfchar\n"),f+="endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"},a.prototype.registerAFM=function(a){var b;return this.name=a,b=this.font,this.ascender=b.ascender,this.decender=b.decender,this.bbox=b.bbox,this.lineGap=b.lineGap,b},a.prototype.embedAFM=function(){return this.dictionary.data={Type:"Font",BaseFont:this.name,Subtype:"Type1",Encoding:"WinAnsiEncoding"},this.dictionary.end()},a.prototype.widthOfString=function(a,b){var c,d,e,f,g,h;for(a=""+a,f=0,d=g=0,h=a.length;h>=0?h>g:g>h;d=h>=0?++g:--g)c=a.charCodeAt(d),f+=this.font.widthOfGlyph(this.font.characterToGlyph(c))||0;return e=b/1e3,f*e},a.prototype.lineHeight=function(a,b){var c;return null==b&&(b=!1),c=b?this.lineGap:0,(this.ascender+c-this.decender)/1e3*a},a}(),a.exports=f}).call(this)}).call(b,c(2).Buffer,"/")},function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k,l,m,n,o,p,q;q=c(44),e=c(72),d=c(73),f=c(74),m=c(75),h=c(78),b=c(79),j=c(80),i=c(81),l=c(82),o=c(83),n=c(84),k=c(85),g=c(86),p=function(){function a(a,b){var c,d,f,g,h,i,j,k,l;if(this.rawData=a,c=this.contents=new e(this.rawData),"ttcf"===c.readString(4)){if(!b)throw new Error("Must specify a font name for TTC files.");for(i=c.readInt(),f=c.readInt(),h=[],d=j=0;f>=0?f>j:j>f;d=f>=0?++j:--j)h[d]=c.readInt();for(d=k=0,l=h.length;l>k;d=++k)if(g=h[d],c.pos=g,this.parse(),this.name.postscriptName===b)return;throw new Error("Font "+b+" not found in TTC file.")}c.pos=0,this.parse()}return a.open=function(b,c){var d;return d=q.readFileSync(b),new a(d,c)},a.fromDFont=function(b,c){var e;return e=d.open(b),new a(e.getNamedFont(c))},a.fromBuffer=function(b,c){var e,f,g;try{if(g=new a(b,c),!(g.head.exists&&g.name.exists&&g.cmap.exists||(e=new d(b),g=new a(e.getNamedFont(c)),g.head.exists&&g.name.exists&&g.cmap.exists)))throw new Error("Invalid TTF file in DFont");return g}catch(h){throw f=h,new Error("Unknown font format in buffer: "+f.message)}},a.prototype.parse=function(){return this.directory=new f(this.contents),this.head=new h(this),this.name=new m(this),this.cmap=new b(this),this.hhea=new i(this),this.maxp=new l(this),this.hmtx=new j(this),this.post=new o(this),this.os2=new n(this),this.loca=new k(this),this.glyf=new g(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},a.prototype.characterToGlyph=function(a){var b;return(null!=(b=this.cmap.unicode)?b.codeMap[a]:void 0)||0},a.prototype.widthOfGlyph=function(a){var b;return b=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(a).advance*b},a}(),a.exports=p}).call(this)},function(a,b){(function(){var b;b=function(){function a(a){this.data=null!=a?a:[],this.pos=0,this.length=this.data.length}return a.prototype.readByte=function(){return this.data[this.pos++]},a.prototype.writeByte=function(a){return this.data[this.pos++]=a},a.prototype.byteAt=function(a){return this.data[a]},a.prototype.readBool=function(){return!!this.readByte()},a.prototype.writeBool=function(a){return this.writeByte(a?1:0)},a.prototype.readUInt32=function(){var a,b,c,d;return a=16777216*this.readByte(),b=this.readByte()<<16,c=this.readByte()<<8,d=this.readByte(),a+b+c+d},a.prototype.writeUInt32=function(a){return this.writeByte(a>>>24&255),this.writeByte(a>>16&255),this.writeByte(a>>8&255),this.writeByte(255&a)},a.prototype.readInt32=function(){var a;return a=this.readUInt32(),a>=2147483648?a-4294967296:a},a.prototype.writeInt32=function(a){return 0>a&&(a+=4294967296),this.writeUInt32(a)},a.prototype.readUInt16=function(){var a,b;return a=this.readByte()<<8,b=this.readByte(),a|b},a.prototype.writeUInt16=function(a){return this.writeByte(a>>8&255),this.writeByte(255&a)},a.prototype.readInt16=function(){var a;return a=this.readUInt16(),a>=32768?a-65536:a},a.prototype.writeInt16=function(a){return 0>a&&(a+=65536),this.writeUInt16(a)},a.prototype.readString=function(a){var b,c,d;for(c=[],b=d=0;a>=0?a>d:d>a;b=a>=0?++d:--d)c[b]=String.fromCharCode(this.readByte());return c.join("")},a.prototype.writeString=function(a){var b,c,d,e;for(e=[],b=c=0,d=a.length;d>=0?d>c:c>d;b=d>=0?++c:--c)e.push(this.writeByte(a.charCodeAt(b)));return e},a.prototype.stringAt=function(a,b){return this.pos=a,this.readString(b)},a.prototype.readShort=function(){return this.readInt16()},a.prototype.writeShort=function(a){return this.writeInt16(a)},a.prototype.readLongLong=function(){var a,b,c,d,e,f,g,h;return a=this.readByte(),b=this.readByte(),c=this.readByte(),d=this.readByte(),e=this.readByte(),f=this.readByte(),g=this.readByte(),h=this.readByte(),128&a?-1*(72057594037927940*(255^a)+281474976710656*(255^b)+1099511627776*(255^c)+4294967296*(255^d)+16777216*(255^e)+65536*(255^f)+256*(255^g)+(255^h)+1):72057594037927940*a+281474976710656*b+1099511627776*c+4294967296*d+16777216*e+65536*f+256*g+h},a.prototype.writeLongLong=function(a){var b,c;return b=Math.floor(a/4294967296),c=4294967295&a,this.writeByte(b>>24&255),this.writeByte(b>>16&255),this.writeByte(b>>8&255),this.writeByte(255&b),this.writeByte(c>>24&255),this.writeByte(c>>16&255),this.writeByte(c>>8&255),this.writeByte(255&c)},a.prototype.readInt=function(){return this.readInt32()},a.prototype.writeInt=function(a){return this.writeInt32(a)},a.prototype.slice=function(a,b){return this.data.slice(a,b)},a.prototype.read=function(a){var b,c,d;for(b=[],c=d=0;a>=0?a>d:d>a;c=a>=0?++d:--d)b.push(this.readByte());return b},a.prototype.write=function(a){var b,c,d,e;for(e=[],c=0,d=a.length;d>c;c++)b=a[c],e.push(this.writeByte(b));return e},a}(),a.exports=b}).call(this)},function(a,b,c){(function(){var b,d,e,f,g;g=c(44),d=c(72),e=c(74),f=c(75),b=function(){function a(a){this.contents=new d(a),this.parse(this.contents)}return a.open=function(b){var c;return c=g.readFileSync(b),new a(c)},a.prototype.parse=function(a){var b,c,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G;for(j=a.readInt(),u=a.readInt(),i=a.readInt(),t=a.readInt(),this.map={},a.pos=u+24,E=a.readShort()+u,y=a.readShort()+u,a.pos=E,v=a.readShort(),o=F=0;v>=F;o=F+=1){for(D=a.readString(4),w=a.readShort(),C=a.readShort(),this.map[D]={list:[],named:{}},B=a.pos,a.pos=E+C,q=G=0;w>=G;q=G+=1)p=a.readShort(),z=a.readShort(),b=a.readByte(),c=a.readByte()<<16,g=a.readByte()<<8,h=a.readByte(),k=j+(0|c|g|h),n=a.readUInt32(),l={id:p,attributes:b,offset:k,handle:n},A=a.pos,-1!==z&&u+t>y+z?(a.pos=y+z,r=a.readByte(),l.name=a.readString(r)):"sfnt"===D&&(a.pos=l.offset,s=a.readUInt32(),m={},m.contents=new d(a.slice(a.pos,a.pos+s)),m.directory=new e(m.contents),x=new f(m),l.name=x.fontName[0].raw),a.pos=A,this.map[D].list.push(l),l.name&&(this.map[D].named[l.name]=l);a.pos=B}},a.prototype.getNamedFont=function(a){var b,c,d,e,f,g;if(b=this.contents,e=b.pos,c=null!=(g=this.map.sfnt)?g.named[a]:void 0,!c)throw new Error("Font "+a+" not found in DFont file.");return b.pos=c.offset,d=b.readUInt32(),f=b.slice(b.pos,b.pos+d),b.pos=e,f},a}(),a.exports=b}).call(this)},function(a,b,c){(function(b){(function(){var d,e,f=[].slice;d=c(72),e=function(){function a(a){var b,c,d,e;for(this.scalarType=a.readInt(),this.tableCount=a.readShort(),this.searchRange=a.readShort(),this.entrySelector=a.readShort(),this.rangeShift=a.readShort(),this.tables={},c=d=0,e=this.tableCount;e>=0?e>d:d>e;c=e>=0?++d:--d)b={tag:a.readString(4),checksum:a.readInt(),offset:a.readInt(),length:a.readInt()},this.tables[b.tag]=b}var c;return a.prototype.encode=function(a){var e,f,g,h,i,j,k,l,m,n,o,p,q,r;p=Object.keys(a).length,j=Math.log(2),m=16*Math.floor(Math.log(p)/j),h=Math.floor(m/j),l=16*p-m,f=new d,f.writeInt(this.scalarType),f.writeShort(p),f.writeShort(m),f.writeShort(h),f.writeShort(l),g=16*p,k=f.pos+g,i=null,q=[];for(r in a)for(o=a[r],f.writeString(r),f.writeInt(c(o)),f.writeInt(k),f.writeInt(o.length),q=q.concat(o),"head"===r&&(i=k),k+=o.length;k%4;)q.push(0),k++;return f.write(q),n=c(f.data),e=2981146554-n,f.pos=i+8,f.writeUInt32(e),new b(f.data)},c=function(a){var b,c,e,g,h;for(a=f.call(a);a.length%4;)a.push(0);for(e=new d(a),c=0,b=g=0,h=a.length;h>g;b=g+=4)c+=e.readUInt32();return 4294967295&c},a}(),a.exports=e}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(){var b,d,e,f,g,h={}.hasOwnProperty,i=function(a,b){function c(){this.constructor=a}for(var d in b)h.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};f=c(76),b=c(72),g=c(77),e=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}var e;return i(c,a),c.prototype.tag="name",c.prototype.parse=function(a){var b,c,e,f,g,h,i,j,k,l,m,n,o;for(a.pos=this.offset,f=a.readShort(),b=a.readShort(),i=a.readShort(),c=[],g=l=0;b>=0?b>l:l>b;g=b>=0?++l:--l)c.push({platformID:a.readShort(),encodingID:a.readShort(),languageID:a.readShort(),nameID:a.readShort(),length:a.readShort(),offset:this.offset+i+a.readShort()});for(j={},g=m=0,n=c.length;n>m;g=++m)e=c[g],a.pos=e.offset,k=a.readString(e.length),h=new d(k,e),null==j[o=e.nameID]&&(j[o]=[]),j[e.nameID].push(h);return this.strings=j,this.copyright=j[0],this.fontFamily=j[1],this.fontSubfamily=j[2],this.uniqueSubfamily=j[3],this.fontName=j[4],this.version=j[5],this.postscriptName=j[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,""),this.trademark=j[7],this.manufacturer=j[8],this.designer=j[9],this.description=j[10],this.vendorUrl=j[11],this.designerUrl=j[12],this.license=j[13],this.licenseUrl=j[14],this.preferredFamily=j[15],this.preferredSubfamily=j[17],this.compatibleFull=j[18],this.sampleText=j[19]},e="AAAAAA",c.prototype.encode=function(){var a,c,f,h,i,j,k,l,m,n,o,p,q,r;m={},r=this.strings;for(a in r)o=r[a],m[a]=o;i=new d(""+e+"+"+this.postscriptName,{platformID:1,encodingID:0,languageID:0}),m[6]=[i],e=g.successorOf(e),j=0;for(a in m)c=m[a],null!=c&&(j+=c.length);n=new b,k=new b,n.writeShort(0),n.writeShort(j),n.writeShort(6+12*j);for(f in m)if(c=m[f],null!=c)for(p=0,q=c.length;q>p;p++)l=c[p],n.writeShort(l.platformID),n.writeShort(l.encodingID),n.writeShort(l.languageID),n.writeShort(f),n.writeShort(l.length),n.writeShort(k.pos),k.writeString(l.raw);return h={postscriptName:i.raw,table:n.data.concat(k.data)}},c}(f),a.exports=e,d=function(){function a(a,b){this.raw=a,this.length=this.raw.length,this.platformID=b.platformID,this.encodingID=b.encodingID,this.languageID=b.languageID}return a}()}).call(this)},function(a,b){(function(){var b;b=function(){function a(a){var b;this.file=a,b=this.file.directory.tables[this.tag],this.exists=!!b,b&&(this.offset=b.offset,this.length=b.length,this.parse(this.file.contents))}return a.prototype.parse=function(){},a.prototype.encode=function(){},a.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},a}(),a.exports=b}).call(this)},function(a,b){(function(){b.successorOf=function(a){var b,c,d,e,f,g,h,i,j,k;for(c="abcdefghijklmnopqrstuvwxyz",i=c.length,k=a,e=a.length;e>=0;){if(h=a.charAt(--e),isNaN(h)){if(f=c.indexOf(h.toLowerCase()),-1===f)j=h,d=!0;else if(j=c.charAt((f+1)%i),g=h===h.toUpperCase(),g&&(j=j.toUpperCase()),d=f+1>=i,d&&0===e){b=g?"A":"a",k=b+j+k.slice(1);break}}else if(j=+h+1,d=j>9,d&&(j=0),d&&0===e){k="1"+j+k.slice(1);break}if(k=k.slice(0,e)+j+k.slice(e+1),!d)break}return k},b.invert=function(a){var b,c,d;c={};for(b in a)d=a[b],c[d]=b;return c}}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return g(c,a),c.prototype.tag="head",c.prototype.parse=function(a){return a.pos=this.offset,this.version=a.readInt(),this.revision=a.readInt(),this.checkSumAdjustment=a.readInt(),this.magicNumber=a.readInt(),this.flags=a.readShort(),this.unitsPerEm=a.readShort(),this.created=a.readLongLong(),this.modified=a.readLongLong(),this.xMin=a.readShort(),this.yMin=a.readShort(),this.xMax=a.readShort(),this.yMax=a.readShort(),this.macStyle=a.readShort(),this.lowestRecPPEM=a.readShort(),this.fontDirectionHint=a.readShort(),this.indexToLocFormat=a.readShort(),this.glyphDataFormat=a.readShort()},c.prototype.encode=function(a){var c;return c=new b,c.writeInt(this.version),c.writeInt(this.revision),c.writeInt(this.checkSumAdjustment),c.writeInt(this.magicNumber),c.writeShort(this.flags),c.writeShort(this.unitsPerEm),c.writeLongLong(this.created),c.writeLongLong(this.modified),c.writeShort(this.xMin),c.writeShort(this.yMin),c.writeShort(this.xMax),c.writeShort(this.yMax),c.writeShort(this.macStyle),c.writeShort(this.lowestRecPPEM),c.writeShort(this.fontDirectionHint),c.writeShort(a.type),c.writeShort(this.glyphDataFormat),c.data},c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f,g={}.hasOwnProperty,h=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};f=c(76),e=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return h(c,a),c.prototype.tag="cmap",c.prototype.parse=function(a){var c,d,e,f;for(a.pos=this.offset,this.version=a.readUInt16(),e=a.readUInt16(),this.tables=[],this.unicode=null,d=f=0;e>=0?e>f:f>e;d=e>=0?++f:--f)c=new b(a,this.offset),this.tables.push(c),c.isUnicode&&null==this.unicode&&(this.unicode=c);return!0},c.encode=function(a,c){var d,f;return null==c&&(c="macroman"),d=b.encode(a,c),f=new e,f.writeUInt16(0),f.writeUInt16(1),d.table=f.data.concat(d.subtable),d},c}(f),b=function(){function a(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;switch(this.platformID=a.readUInt16(),this.encodingID=a.readShort(),this.offset=b+a.readInt(),l=a.pos,a.pos=this.offset,this.format=a.readUInt16(),this.length=a.readUInt16(),this.language=a.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(h=r=0;256>r;h=++r)this.codeMap[h]=a.readByte();break;case 4:for(n=a.readUInt16(),m=n/2,a.pos+=6,e=function(){var b,c;for(c=[],h=b=0;m>=0?m>b:b>m;h=m>=0?++b:--b)c.push(a.readUInt16());return c}(),a.pos+=2,p=function(){var b,c;for(c=[],h=b=0;m>=0?m>b:b>m;h=m>=0?++b:--b)c.push(a.readUInt16());return c}(),i=function(){var b,c;for(c=[],h=b=0;m>=0?m>b:b>m;h=m>=0?++b:--b)c.push(a.readUInt16());return c}(),j=function(){var b,c;for(c=[],h=b=0;m>=0?m>b:b>m;h=m>=0?++b:--b)c.push(a.readUInt16());return c}(),d=(this.length-a.pos+this.offset)/2,g=function(){var b,c;for(c=[],h=b=0;d>=0?d>b:b>d;h=d>=0?++b:--b)c.push(a.readUInt16());return c}(),h=s=0,u=e.length;u>s;h=++s)for(q=e[h],o=p[h],c=t=o;q>=o?q>=t:t>=q;c=q>=o?++t:--t)0===j[h]?f=c+i[h]:(k=j[h]/2+(c-o)-(m-h),f=g[k]||0,0!==f&&(f+=i[h])),this.codeMap[c]=65535&f}a.pos=l}return a.encode=function(a,b){var c,d,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X;switch(F=new e,g=Object.keys(a).sort(function(a,b){return a-b}),b){case"macroman":for(p=0,q=function(){var a,b;for(b=[],o=a=0;256>a;o=++a)b.push(0);return b}(),s={0:0},f={},G=0,K=g.length;K>G;G++)d=g[G],null==s[U=a[d]]&&(s[U]=++p),f[d]={old:a[d],"new":s[a[d]]},q[d]=s[a[d]];return F.writeUInt16(1),F.writeUInt16(0),F.writeUInt32(12),F.writeUInt16(0),F.writeUInt16(262),F.writeUInt16(0),F.write(q),y={charMap:f,subtable:F.data,maxGlyphID:p+1};case"unicode":for(D=[],l=[],t=0,s={},c={},r=j=null,H=0,L=g.length;L>H;H++)d=g[H],v=a[d],null==s[v]&&(s[v]=++t),c[d]={old:v,"new":s[v]},h=s[v]-d,null!=r&&h===j||(r&&l.push(r),D.push(d),j=h),r=d;for(r&&l.push(r),l.push(65535),D.push(65535),A=D.length,B=2*A,z=2*Math.pow(Math.log(A)/Math.LN2,2),m=Math.log(z/2)/Math.LN2,x=2*A-z,i=[],w=[],n=[],o=I=0,M=D.length;M>I;o=++I){if(C=D[o],k=l[o],65535===C){i.push(0),w.push(0);break}if(E=c[C]["new"],C-E>=32768)for(i.push(0),w.push(2*(n.length+A-o)),d=J=C;k>=C?k>=J:J>=k;d=k>=C?++J:--J)n.push(c[d]["new"]);else i.push(E-C),w.push(0)}for(F.writeUInt16(3),F.writeUInt16(1),F.writeUInt32(12),F.writeUInt16(4),F.writeUInt16(16+8*A+2*n.length),F.writeUInt16(0),F.writeUInt16(B),F.writeUInt16(z),F.writeUInt16(m),F.writeUInt16(x),S=0,N=l.length;N>S;S++)d=l[S],F.writeUInt16(d);for(F.writeUInt16(0),T=0,O=D.length;O>T;T++)d=D[T], -F.writeUInt16(d);for(V=0,P=i.length;P>V;V++)h=i[V],F.writeUInt16(h);for(W=0,Q=w.length;Q>W;W++)u=w[W],F.writeUInt16(u);for(X=0,R=n.length;R>X;X++)p=n[X],F.writeUInt16(p);return y={charMap:c,subtable:F.data,maxGlyphID:t+1}}},a}(),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return g(c,a),c.prototype.tag="hmtx",c.prototype.parse=function(a){var b,c,d,e,f,g,h,i;for(a.pos=this.offset,this.metrics=[],b=f=0,h=this.file.hhea.numberOfMetrics;h>=0?h>f:f>h;b=h>=0?++f:--f)this.metrics.push({advance:a.readUInt16(),lsb:a.readInt16()});for(d=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var c,e;for(e=[],b=c=0;d>=0?d>c:c>d;b=d>=0?++c:--c)e.push(a.readInt16());return e}(),this.widths=function(){var a,b,c,d;for(c=this.metrics,d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(e.advance);return d}.call(this),c=this.widths[this.widths.length-1],i=[],b=g=0;d>=0?d>g:g>d;b=d>=0?++g:--g)i.push(this.widths.push(c));return i},c.prototype.forGlyph=function(a){var b;return a in this.metrics?this.metrics[a]:b={advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[a-this.metrics.length]}},c.prototype.encode=function(a){var c,d,e,f,g;for(e=new b,f=0,g=a.length;g>f;f++)c=a[f],d=this.forGlyph(c),e.writeUInt16(d.advance),e.writeUInt16(d.lsb);return e.data},c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return g(c,a),c.prototype.tag="hhea",c.prototype.parse=function(a){return a.pos=this.offset,this.version=a.readInt(),this.ascender=a.readShort(),this.decender=a.readShort(),this.lineGap=a.readShort(),this.advanceWidthMax=a.readShort(),this.minLeftSideBearing=a.readShort(),this.minRightSideBearing=a.readShort(),this.xMaxExtent=a.readShort(),this.caretSlopeRise=a.readShort(),this.caretSlopeRun=a.readShort(),this.caretOffset=a.readShort(),a.pos+=8,this.metricDataFormat=a.readShort(),this.numberOfMetrics=a.readUInt16()},c.prototype.encode=function(a){var c,d,e,f;for(d=new b,d.writeInt(this.version),d.writeShort(this.ascender),d.writeShort(this.decender),d.writeShort(this.lineGap),d.writeShort(this.advanceWidthMax),d.writeShort(this.minLeftSideBearing),d.writeShort(this.minRightSideBearing),d.writeShort(this.xMaxExtent),d.writeShort(this.caretSlopeRise),d.writeShort(this.caretSlopeRun),d.writeShort(this.caretOffset),c=e=0,f=8;f>=0?f>e:e>f;c=f>=0?++e:--e)d.writeByte(0);return d.writeShort(this.metricDataFormat),d.writeUInt16(a.length),d.data},c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return g(c,a),c.prototype.tag="maxp",c.prototype.parse=function(a){return a.pos=this.offset,this.version=a.readInt(),this.numGlyphs=a.readUInt16(),this.maxPoints=a.readUInt16(),this.maxContours=a.readUInt16(),this.maxCompositePoints=a.readUInt16(),this.maxComponentContours=a.readUInt16(),this.maxZones=a.readUInt16(),this.maxTwilightPoints=a.readUInt16(),this.maxStorage=a.readUInt16(),this.maxFunctionDefs=a.readUInt16(),this.maxInstructionDefs=a.readUInt16(),this.maxStackElements=a.readUInt16(),this.maxSizeOfInstructions=a.readUInt16(),this.maxComponentElements=a.readUInt16(),this.maxComponentDepth=a.readUInt16()},c.prototype.encode=function(a){var c;return c=new b,c.writeInt(this.version),c.writeUInt16(a.length),c.writeUInt16(this.maxPoints),c.writeUInt16(this.maxContours),c.writeUInt16(this.maxCompositePoints),c.writeUInt16(this.maxComponentContours),c.writeUInt16(this.maxZones),c.writeUInt16(this.maxTwilightPoints),c.writeUInt16(this.maxStorage),c.writeUInt16(this.maxFunctionDefs),c.writeUInt16(this.maxInstructionDefs),c.writeUInt16(this.maxStackElements),c.writeUInt16(this.maxSizeOfInstructions),c.writeUInt16(this.maxComponentElements),c.writeUInt16(this.maxComponentDepth),c.data},c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}var d;return g(c,a),c.prototype.tag="post",c.prototype.parse=function(a){var b,c,d,e,f;switch(a.pos=this.offset,this.format=a.readInt(),this.italicAngle=a.readInt(),this.underlinePosition=a.readShort(),this.underlineThickness=a.readShort(),this.isFixedPitch=a.readInt(),this.minMemType42=a.readInt(),this.maxMemType42=a.readInt(),this.minMemType1=a.readInt(),this.maxMemType1=a.readInt(),this.format){case 65536:break;case 131072:for(d=a.readUInt16(),this.glyphNameIndex=[],b=e=0;d>=0?d>e:e>d;b=d>=0?++e:--e)this.glyphNameIndex.push(a.readUInt16());for(this.names=[],f=[];a.pos=0?d>c:c>d;b=d>=0?++c:--c)e.push(a.readUInt32());return e}.call(this)}},c.prototype.glyphFor=function(a){var b;switch(this.format){case 65536:return d[a]||".notdef";case 131072:return b=this.glyphNameIndex[a],257>=b?d[b]:this.names[b-258]||".notdef";case 151552:return d[a+this.offsets[a]]||".notdef";case 196608:return".notdef";case 262144:return this.map[a]||65535}},c.prototype.encode=function(a){var c,e,f,g,h,i,j,k,l,m,n,o,p,q,r;if(!this.exists)return null;if(i=this.raw(),196608===this.format)return i;for(l=new b(i.slice(0,32)),l.writeUInt32(131072),l.pos=32,f=[],k=[],m=0,p=a.length;p>m;m++)c=a[m],h=this.glyphFor(c),g=d.indexOf(h),-1!==g?f.push(g):(f.push(257+k.length),k.push(h));for(l.writeUInt16(Object.keys(a).length),n=0,q=f.length;q>n;n++)e=f[n],l.writeUInt16(e);for(o=0,r=k.length;r>o;o++)j=k[o],l.writeByte(j.length),l.writeString(j);return l.data},d=".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent\nampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash\nzero one two three four five six seven eight nine colon semicolon less equal greater\nquestion at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\nbracketleft backslash bracketright asciicircum underscore grave\na b c d e f g h i j k l m n o p q r s t u v w x y z\nbraceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis\nUdieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave\necircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve\nocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent\nsterling section bullet paragraph germandbls registered copyright trademark acute\ndieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu\npartialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash\nquestiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft\nguillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash\nquotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis\nfraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered\nquotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis\nEgrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute\nUcircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla\nhungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth\neth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior\nonehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla\nCacute cacute Ccaron ccaron dcroat".split(/\s+/g),c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e={}.hasOwnProperty,f=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};d=c(76),b=function(a){function b(){return b.__super__.constructor.apply(this,arguments)}return f(b,a),b.prototype.tag="OS/2",b.prototype.parse=function(a){var b;return a.pos=this.offset,this.version=a.readUInt16(),this.averageCharWidth=a.readShort(),this.weightClass=a.readUInt16(),this.widthClass=a.readUInt16(),this.type=a.readShort(),this.ySubscriptXSize=a.readShort(),this.ySubscriptYSize=a.readShort(),this.ySubscriptXOffset=a.readShort(),this.ySubscriptYOffset=a.readShort(),this.ySuperscriptXSize=a.readShort(),this.ySuperscriptYSize=a.readShort(),this.ySuperscriptXOffset=a.readShort(),this.ySuperscriptYOffset=a.readShort(),this.yStrikeoutSize=a.readShort(),this.yStrikeoutPosition=a.readShort(),this.familyClass=a.readShort(),this.panose=function(){var c,d;for(d=[],b=c=0;10>c;b=++c)d.push(a.readByte());return d}(),this.charRange=function(){var c,d;for(d=[],b=c=0;4>c;b=++c)d.push(a.readInt());return d}(),this.vendorID=a.readString(4),this.selection=a.readShort(),this.firstCharIndex=a.readShort(),this.lastCharIndex=a.readShort(),this.version>0&&(this.ascent=a.readShort(),this.descent=a.readShort(),this.lineGap=a.readShort(),this.winAscent=a.readShort(),this.winDescent=a.readShort(),this.codePageRange=function(){var c,d;for(d=[],b=c=0;2>c;b=++c)d.push(a.readInt());return d}(),this.version>1)?(this.xHeight=a.readShort(),this.capHeight=a.readShort(),this.defaultChar=a.readShort(),this.breakChar=a.readShort(),this.maxContext=a.readShort()):void 0},b.prototype.encode=function(){return this.raw()},b}(d),a.exports=b}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};e=c(76),b=c(72),d=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return g(c,a),c.prototype.tag="loca",c.prototype.parse=function(a){var b,c;return a.pos=this.offset,b=this.file.head.indexToLocFormat,0===b?this.offsets=function(){var b,d,e;for(e=[],c=b=0,d=this.length;d>b;c=b+=2)e.push(2*a.readUInt16());return e}.call(this):this.offsets=function(){var b,d,e;for(e=[],c=b=0,d=this.length;d>b;c=b+=4)e.push(a.readUInt32());return e}.call(this)},c.prototype.indexOf=function(a){return this.offsets[a]},c.prototype.lengthOf=function(a){return this.offsets[a+1]-this.offsets[a]},c.prototype.encode=function(a){var c,d,e,f,g,h,i,j,k,l,m;for(f=new b,g=0,j=a.length;j>g;g++)if(d=a[g],d>65535){for(m=this.offsets,h=0,k=m.length;k>h;h++)c=m[h],f.writeUInt32(c);return e={format:1,table:f.data}}for(i=0,l=a.length;l>i;i++)c=a[i],f.writeUInt16(c/2);return e={format:0,table:f.data}},c}(e),a.exports=d}).call(this)},function(a,b,c){(function(){var b,d,e,f,g,h={}.hasOwnProperty,i=function(a,b){function c(){this.constructor=a}for(var d in b)h.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},j=[].slice;g=c(76),d=c(72),e=function(a){function c(){return c.__super__.constructor.apply(this,arguments)}return i(c,a),c.prototype.tag="glyf",c.prototype.parse=function(a){return this.cache={}},c.prototype.glyphFor=function(a){var c,e,g,h,i,j,k,l,m,n;return a in this.cache?this.cache[a]:(h=this.file.loca,c=this.file.contents,e=h.indexOf(a),g=h.lengthOf(a),0===g?this.cache[a]=null:(c.pos=this.offset+e,j=new d(c.read(g)),i=j.readShort(),l=j.readShort(),n=j.readShort(),k=j.readShort(),m=j.readShort(),-1===i?this.cache[a]=new b(j,l,n,k,m):this.cache[a]=new f(j,i,l,n,k,m),this.cache[a]))},c.prototype.encode=function(a,b,c){var d,e,f,g,h,i;for(g=[],f=[],h=0,i=b.length;i>h;h++)e=b[h],d=a[e],f.push(g.length),d&&(g=g.concat(d.encode(c)));return f.push(g.length),{table:g,offsets:f}},c}(g),f=function(){function a(a,b,c,d,e,f){this.raw=a,this.numberOfContours=b,this.xMin=c,this.yMin=d,this.xMax=e,this.yMax=f,this.compound=!1}return a.prototype.encode=function(){return this.raw.data},a}(),b=function(){function a(a,d,h,i,j){var k,l;for(this.raw=a,this.xMin=d,this.yMin=h,this.xMax=i,this.yMax=j,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],k=this.raw;;){if(l=k.readShort(),this.glyphOffsets.push(k.pos),this.glyphIDs.push(k.readShort()),!(l&c))break;l&b?k.pos+=4:k.pos+=2,l&g?k.pos+=8:l&e?k.pos+=4:l&f&&(k.pos+=2)}}var b,c,e,f,g,h;return b=1,f=8,c=32,e=64,g=128,h=256,a.prototype.encode=function(a){var b,c,e,f,g,h;for(e=new d(j.call(this.raw.data)),h=this.glyphIDs,b=f=0,g=h.length;g>f;b=++f)c=h[b],e.pos=this.glyphOffsets[b],e.writeShort(a[c]);return e.data},a}(),a.exports=e}).call(this)},function(a,b,c){(function(){var b,d;d=c(44),b=function(){function a(a){var b,d;this.contents=a,this.attributes={},this.glyphWidths={},this.boundingBoxes={},this.parse(),this.charWidths=function(){var a,b;for(b=[],d=a=0;255>=a;d=++a)b.push(this.glyphWidths[c[d]]);return b}.call(this),this.bbox=function(){var a,c,d,e;for(d=this.attributes.FontBBox.split(/\s+/),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(+b);return e}.call(this),this.ascender=+(this.attributes.Ascender||0),this.decender=+(this.attributes.Descender||0),this.lineGap=this.bbox[3]-this.bbox[1]-(this.ascender-this.decender)}var b,c;return a.open=function(b){return new a(d.readFileSync(b,"utf8"))},a.prototype.parse=function(){var a,b,c,d,e,f,g,h,i,j;for(f="",j=this.contents.split("\n"),h=0,i=j.length;i>h;h++)if(c=j[h],d=c.match(/^Start(\w+)/))f=d[1];else if(d=c.match(/^End(\w+)/))f="";else switch(f){case"FontMetrics":d=c.match(/(^\w+)\s+(.*)/),b=d[1],g=d[2],(a=this.attributes[b])?(Array.isArray(a)||(a=this.attributes[b]=[a]),a.push(g)):this.attributes[b]=g;break;case"CharMetrics":if(!/^CH?\s/.test(c))continue;e=c.match(/\bN\s+(\.?\w+)\s*;/)[1],this.glyphWidths[e]=+c.match(/\bWX\s+(\d+)\s*;/)[1]}},b={402:131,8211:150,8212:151,8216:145,8217:146,8218:130,8220:147,8221:148,8222:132,8224:134,8225:135,8226:149,8230:133,8364:128,8240:137,8249:139,8250:155,710:136,8482:153,338:140,339:156,732:152,352:138,353:154,376:159,381:142,382:158},a.prototype.encodeText=function(a){var c,d,e,f,g;for(e="",d=f=0,g=a.length;g>=0?g>f:f>g;d=g>=0?++f:--f)c=a.charCodeAt(d),c=b[c]||c,e+=String.fromCharCode(c);return e},a.prototype.characterToGlyph=function(a){return c[b[a]||a]},a.prototype.widthOfGlyph=function(a){return this.glyphWidths[a]},c=".notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n\nspace exclam quotedbl numbersign\ndollar percent ampersand quotesingle\nparenleft parenright asterisk plus\ncomma hyphen period slash\nzero one two three\nfour five six seven\neight nine colon semicolon\nless equal greater question\n\nat A B C\nD E F G\nH I J K\nL M N O\nP Q R S\nT U V W\nX Y Z bracketleft\nbackslash bracketright asciicircum underscore\n\ngrave a b c\nd e f g\nh i j k\nl m n o\np q r s\nt u v w\nx y z braceleft\nbar braceright asciitilde .notdef\n\nEuro .notdef quotesinglbase florin\nquotedblbase ellipsis dagger daggerdbl\ncircumflex perthousand Scaron guilsinglleft\nOE .notdef Zcaron .notdef\n.notdef quoteleft quoteright quotedblleft\nquotedblright bullet endash emdash\ntilde trademark scaron guilsinglright\noe .notdef zcaron ydieresis\n\nspace exclamdown cent sterling\ncurrency yen brokenbar section\ndieresis copyright ordfeminine guillemotleft\nlogicalnot hyphen registered macron\ndegree plusminus twosuperior threesuperior\nacute mu paragraph periodcentered\ncedilla onesuperior ordmasculine guillemotright\nonequarter onehalf threequarters questiondown\n\nAgrave Aacute Acircumflex Atilde\nAdieresis Aring AE Ccedilla\nEgrave Eacute Ecircumflex Edieresis\nIgrave Iacute Icircumflex Idieresis\nEth Ntilde Ograve Oacute\nOcircumflex Otilde Odieresis multiply\nOslash Ugrave Uacute Ucircumflex\nUdieresis Yacute Thorn germandbls\n\nagrave aacute acircumflex atilde\nadieresis aring ae ccedilla\negrave eacute ecircumflex edieresis\nigrave iacute icircumflex idieresis\neth ntilde ograve oacute\nocircumflex otilde odieresis divide\noslash ugrave uacute ucircumflex\nudieresis yacute thorn ydieresis".split(/\s+/),a}(),a.exports=b}).call(this)},function(a,b,c){(function(){var b,d,e,f=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=c(79),e=c(77),d=function(){function a(a){this.font=a,this.subset={},this.unicodes={},this.next=33}return a.prototype.use=function(a){var b,c,d;{if("string"!=typeof a)return this.unicodes[a]?void 0:(this.subset[this.next]=a,this.unicodes[a]=this.next++);for(b=c=0,d=a.length;d>=0?d>c:c>d;b=d>=0?++c:--c)this.use(a.charCodeAt(b))}},a.prototype.encodeText=function(a){var b,c,d,e,f;for(d="",c=e=0,f=a.length;f>=0?f>e:e>f;c=f>=0?++e:--e)b=this.unicodes[a.charCodeAt(c)],d+=String.fromCharCode(b);return d},a.prototype.generateCmap=function(){var a,b,c,d,e;d=this.font.cmap.tables[0].codeMap,a={},e=this.subset;for(b in e)c=e[b],a[b]=d[c];return a},a.prototype.glyphIDs=function(){var a,b,c,d,e,g;d=this.font.cmap.tables[0].codeMap,a=[0],g=this.subset;for(b in g)c=g[b],e=d[c],null!=e&&f.call(a,e)<0&&a.push(e);return a.sort()},a.prototype.glyphsFor=function(a){var b,c,d,e,f,g,h;for(d={},f=0,g=a.length;g>f;f++)e=a[f],d[e]=this.font.glyf.glyphFor(e);b=[];for(e in d)c=d[e],(null!=c?c.compound:void 0)&&b.push.apply(b,c.glyphIDs);if(b.length>0){h=this.glyphsFor(b);for(e in h)c=h[e],d[e]=c}return d},a.prototype.encode=function(){var a,c,d,f,g,h,i,j,k,l,m,n,o,p,q,r,s;a=b.encode(this.generateCmap(),"unicode"),f=this.glyphsFor(this.glyphIDs()),n={0:0},r=a.charMap;for(c in r)h=r[c],n[h.old]=h["new"];m=a.maxGlyphID;for(o in f)o in n||(n[o]=m++);k=e.invert(n),l=Object.keys(k).sort(function(a,b){return a-b}),p=function(){var a,b,c;for(c=[],a=0,b=l.length;b>a;a++)g=l[a],c.push(k[g]);return c}(),d=this.font.glyf.encode(f,p,n),i=this.font.loca.encode(d.offsets),j=this.font.name.encode(),this.postscriptName=j.postscriptName,this.cmap={},s=a.charMap;for(c in s)h=s[c],this.cmap[c]=h.old;return q={cmap:a.table,glyf:d.table,loca:i.table,hmtx:this.font.hmtx.encode(p),hhea:this.font.hhea.encode(p),maxp:this.font.maxp.encode(p),post:this.font.post.encode(p),name:j.table,head:this.font.head.encode(i)},this.font.os2.exists&&(q["OS/2"]=this.font.os2.raw()),this.font.directory.encode(q)},a}(),a.exports=d}).call(this)},function(a,b,c){(function(){var b;b=c(90),a.exports={initText:function(){return this.x=0,this.y=0,this._lineGap=0},lineGap:function(a){return this._lineGap=a,this},moveDown:function(a){return null==a&&(a=1),this.y+=this.currentLineHeight(!0)*a+this._lineGap,this},moveUp:function(a){return null==a&&(a=1),this.y-=this.currentLineHeight(!0)*a+this._lineGap,this},_text:function(a,c,d,e,f){var g,h,i,j,k;if(e=this._initOptions(c,d,e),a=""+a,e.wordSpacing&&(a=a.replace(/\s{2,}/g," ")),e.width)h=this._wrapper,h||(h=new b(this,e),h.on("line",f)),this._wrapper=e.continued?h:null,this._textOptions=e.continued?e:null,h.wrap(a,e);else for(k=a.split("\n"),i=0,j=k.length;j>i;i++)g=k[i],f(g,e);return this},text:function(a,b,c,d){return this._text(a,b,c,d,this._line.bind(this))},widthOfString:function(a,b){return null==b&&(b={}),this._font.widthOfString(a,this._fontSize)+(b.characterSpacing||0)*(a.length-1)},heightOfString:function(a,b){var c,d,e,f;return null==b&&(b={}),e=this.x,f=this.y,b=this._initOptions(b),b.height=1/0,d=b.lineGap||this._lineGap||0,this._text(a,this.x,this.y,b,function(a){return function(b,c){return a.y+=a.currentLineHeight(!0)+d}}(this)),c=this.y-f,this.x=e,this.y=f,c},list:function(a,c,d,e,f){var g,h,i,j,k,l,m,n;return e=this._initOptions(c,d,e),n=Math.round(this._font.ascender/1e3*this._fontSize/3),i=e.textIndent||5*n,j=e.bulletIndent||8*n,l=1,k=[],m=[],g=function(a){var b,c,d,e,f;for(f=[],b=d=0,e=a.length;e>d;b=++d)c=a[b],Array.isArray(c)?(l++,g(c),f.push(l--)):(k.push(c),f.push(m.push(l)));return f},g(a),f=new b(this,e),f.on("line",this._line.bind(this)),l=1,h=0,f.on("firstLine",function(a){return function(){var b,c;return(c=m[h++])!==l&&(b=j*(c-l),a.x+=b,f.lineWidth-=b,l=c),a.circle(a.x-i+n,a.y+n+n/2,n),a.fill()}}(this)),f.on("sectionStart",function(a){return function(){var b;return b=i+j*(l-1),a.x+=b,f.lineWidth-=b}}(this)),f.on("sectionEnd",function(a){return function(){var b;return b=i+j*(l-1),a.x-=b,f.lineWidth+=b}}(this)),f.wrap(k.join("\n"),e),this},_initOptions:function(a,b,c){var d,e,f,g;if(null==a&&(a={}),null==c&&(c={}),"object"==typeof a&&(c=a,a=null),c=function(){var a,b,d;b={};for(a in c)d=c[a],b[a]=d;return b}(),this._textOptions){g=this._textOptions;for(d in g)f=g[d],"continued"!==d&&null==c[d]&&(c[d]=f)}return null!=a&&(this.x=a),null!=b&&(this.y=b),c.lineBreak!==!1&&(e=this.page.margins,null==c.width&&(c.width=this.page.width-this.x-e.right)),c.columns||(c.columns=0),null==c.columnGap&&(c.columnGap=18),c},_line:function(a,b,c){var d;return null==b&&(b={}),this._fragment(a,this.x,this.y,b),d=b.lineGap||this._lineGap||0,c?this.y+=this.currentLineHeight(!0)+d:this.x+=this.widthOfString(a)},_fragment:function(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;if(a=""+a,0!==a.length){if(e=d.align||"left",r=d.wordSpacing||0,f=d.characterSpacing||0,d.width)switch(e){case"right":p=this.widthOfString(a.replace(/\s+$/,""),d),b+=d.lineWidth-p;break;case"center":b+=d.lineWidth/2-d.textWidth/2;break;case"justify":s=a.trim().split(/\s+/),p=this.widthOfString(a.replace(/\s+/g,""),d),o=this.widthOfString(" ")+f,r=Math.max(0,(d.lineWidth-p)/Math.max(1,s.length-1)-o)}if(n=d.textWidth+r*(d.wordCount-1)+f*(a.length-1),d.link&&this.link(b,c,n,this.currentLineHeight(),d.link),(d.underline||d.strike)&&(this.save(),d.stroke||this.strokeColor.apply(this,this._fillColor),k=this._fontSize<10?.5:Math.floor(this._fontSize/10),this.lineWidth(k),h=d.underline?1:2,l=c+this.currentLineHeight()/h,d.underline&&(l-=k),this.moveTo(b,l),this.lineTo(b+n,l),this.stroke(),this.restore()),this.save(),this.transform(1,0,0,-1,0,this.page.height),c=this.page.height-c-this._font.ascender/1e3*this._fontSize,null==(t=this.page.fonts)[w=this._font.id]&&(t[w]=this._font.ref()),this._font.use(a),this.addContent("BT"),this.addContent(""+b+" "+c+" Td"),this.addContent("/"+this._font.id+" "+this._fontSize+" Tf"),m=d.fill&&d.stroke?2:d.stroke?1:0,m&&this.addContent(""+m+" Tr"),f&&this.addContent(""+f+" Tc"),r){for(s=a.trim().split(/\s+/),r+=this.widthOfString(" ")+f,r*=1e3/this._fontSize,g=[],u=0,v=s.length;v>u;u++)q=s[u],i=this._font.encode(q),i=function(){var a,b,c;for(c=[],j=a=0,b=i.length;b>a;j=a+=1)c.push(i.charCodeAt(j).toString(16));return c}().join(""),g.push("<"+i+"> "+-r);this.addContent("["+g.join(" ")+"] TJ")}else i=this._font.encode(a),i=function(){var a,b,c;for(c=[],j=a=0,b=i.length;b>a;j=a+=1)c.push(i.charCodeAt(j).toString(16));return c}().join(""),this.addContent("<"+i+"> Tj");return this.addContent("ET"),this.restore()}}}}).call(this)},function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};b=c(26).EventEmitter,d=c(91),e=function(a){function b(a,b){var c;this.document=a,this.indent=b.indent||0,this.characterSpacing=b.characterSpacing||0,this.wordSpacing=0===b.wordSpacing,this.columns=b.columns||1,this.columnGap=null!=(c=b.columnGap)?c:18,this.lineWidth=(b.width-this.columnGap*(this.columns-1))/this.columns,this.spaceLeft=this.lineWidth,this.startX=this.document.x,this.startY=this.document.y,this.column=1,this.ellipsis=b.ellipsis,this.continuedX=0,null!=b.height?(this.height=b.height,this.maxY=this.startY+b.height):this.maxY=this.document.page.maxY(),this.on("firstLine",function(a){return function(b){var c;return c=a.continuedX||a.indent,a.document.x+=c,a.lineWidth-=c,a.once("line",function(){return a.document.x-=c,a.lineWidth+=c,b.continued&&!a.continuedX&&(a.continuedX=a.indent),b.continued?void 0:a.continuedX=0})}}(this)),this.on("lastLine",function(a){return function(b){var c;return c=b.align,"justify"===c&&(b.align="left"),a.lastLine=!0,a.once("line",function(){return a.document.y+=b.paragraphGap||0,b.align=c,a.lastLine=!1})}}(this))}return g(b,a),b.prototype.wordWidth=function(a){return this.document.widthOfString(a,this)+this.characterSpacing+this.wordSpacing},b.prototype.eachWord=function(a,b){var c,e,f,g,h,i,j,k,l,m;for(e=new d(a),h=null,m={};c=e.nextBreak();){if(l=a.slice((null!=h?h.position:void 0)||0,c.position),k=null!=m[l]?m[l]:m[l]=this.wordWidth(l),k>this.lineWidth+this.continuedX)for(i=h,f={};l.length;){for(g=l.length;k>this.spaceLeft;)k=this.wordWidth(l.slice(0,--g));if(f.required=gthis.maxY||f>this.maxY)&&this.nextSection(),c="",g=0,h=0,e=0,i=this.document.y,d=function(a){return function(){return b.textWidth=g+a.wordSpacing*(h-1),b.wordCount=h,b.lineWidth=a.lineWidth,i=a.document.y,a.emit("line",c,b,a),e++}}(this),this.emit("sectionStart",b,this),this.eachWord(a,function(a){return function(e,f,i,j){var k,l;if((null==j||j.required)&&(a.emit("firstLine",b,a),a.spaceLeft=a.lineWidth),f<=a.spaceLeft&&(c+=e,g+=f,h++),i.required||f>a.spaceLeft){if(i.required&&a.emit("lastLine",b,a),k=a.document.currentLineHeight(!0),null!=a.height&&a.ellipsis&&a.document.y+2*k>a.maxY&&a.column>=a.columns){for(a.ellipsis===!0&&(a.ellipsis="…"),c=c.replace(/\s+$/,""),g=a.wordWidth(c+a.ellipsis);g>a.lineWidth;)c=c.slice(0,-1).replace(/\s+$/,""),g=a.wordWidth(c+a.ellipsis);c+=a.ellipsis}return d(),a.document.y+k>a.maxY&&(l=a.nextSection(),!l)?(h=0,c="",!1):i.required?(f>a.spaceLeft&&(c=e,g=f,h=1,d()),a.spaceLeft=a.lineWidth,c="",g=0,h=0):(a.spaceLeft=a.lineWidth-f,c=e,g=f,h=1)}return a.spaceLeft-=f}}(this)),h>0&&(this.emit("lastLine",b,this),d()),this.emit("sectionEnd",b,this),b.continued===!0?(e>1&&(this.continuedX=0),this.continuedX+=b.textWidth,this.document.y=i):this.document.x=this.startX},b.prototype.nextSection=function(a){var b;if(this.emit("sectionEnd",a,this),++this.column>this.columns){if(null!=this.height)return!1;this.document.addPage(),this.column=1,this.startY=this.document.page.margins.top,this.maxY=this.document.page.maxY(),this.document.x=this.startX,this.document._fillColor&&(b=this.document).fillColor.apply(b,this.document._fillColor),this.emit("pageBreak",a,this)}else this.document.x+=this.lineWidth+this.columnGap,this.document.y=this.startY,this.emit("columnBreak",a,this);return this.emit("sectionStart",a,this),!0},b}(b),a.exports=e}).call(this)},function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D;w=c(92),A=new w(c(93)),C=c(94),f=C.BK,k=C.CR,o=C.LF,q=C.NL,g=C.CB,e=C.BA,v=C.SP,x=C.WJ,v=C.SP,f=C.BK,o=C.LF,q=C.NL,b=C.AI,d=C.AL,t=C.SA,u=C.SG,y=C.XX,i=C.CJ,m=C.ID,r=C.NS,z=C.characterClasses,D=c(95),l=D.DI_BRK,n=D.IN_BRK,h=D.CI_BRK,j=D.CP_BRK,s=D.PR_BRK,B=D.pairTable,p=function(){function a(a){this.string=a,this.pos=0,this.lastPos=0,this.curClass=null,this.nextClass=null}var c,m,p;return a.prototype.nextCodePoint=function(){var a,b;return a=this.string.charCodeAt(this.pos++),b=this.string.charCodeAt(this.pos),a>=55296&&56319>=a&&b>=56320&&57343>=b?(this.pos++,1024*(a-55296)+(b-56320)+65536):a},m=function(a){switch(a){case b:return d;case t:case u:case y:return d;case i:return r;default:return a}},p=function(a){switch(a){case o:case q:return f;case g:return e;case v:return x;default:return a}},a.prototype.nextCharClass=function(a){return null==a&&(a=!1),m(A.get(this.nextCodePoint()))},c=function(){function a(a,b){this.position=a,this.required=null!=b?b:!1}return a}(),a.prototype.nextBreak=function(){var a,b,d;for(null==this.curClass&&(this.curClass=p(this.nextCharClass()));this.pos=this.string.length?this.lastPos>n,g=1<>p,k=1024>>p,h=l+k,r=h,q=32,f=r+q,c=1<a||a>1114111?this.errorValue:55296>a||a>56319&&65535>=a?(b=(this.data[a>>p]<=a?(b=(this.data[l+(a-55296>>p)]<>n)],b=this.data[b+(a>>p&i)],b=(b<h?(n=i,j=i/m):(j=g,n=g*m),"center"===f.align?c=c+i/2-n/2:"right"===f.align&&(c=c+i-n),"center"===f.valign?e=e+g/2-j/2:"bottom"===f.valign&&(e=e+g-j)),this.y===e&&(this.y+=j),this.save(),this.transform(n,0,0,-j,c,e+j),this.addContent("/"+l.label+" Do"),this.restore(),this}}}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(b){(function(){var d,e,f,g,h;h=c(44),d=c(72),e=c(98),g=c(99),f=function(){function a(){}return a.open=function(a,c){var d,f;if(b.isBuffer(a))d=a;else if(f=/^data:.+;base64,(.*)$/.exec(a))d=new b(f[1],"base64");else if(d=h.readFileSync(a),!d)return;if(255===d[0]&&216===d[1])return new e(d,c);if(137===d[0]&&"PNG"===d.toString("ascii",1,4))return new g(d,c);throw new Error("Unknown image format.")},a}(),a.exports=f}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(){var b,d,e=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};d=c(44),b=function(){function a(a,c){var d,f,g;if(this.data=a,this.label=c,65496!==this.data.readUInt16BE(0))throw"SOI not found in JPEG";for(g=2;g=0));)g+=this.data.readUInt16BE(g);if(e.call(b,f)<0)throw"Invalid JPEG.";g+=2,this.bits=this.data[g++],this.height=this.data.readUInt16BE(g),g+=2,this.width=this.data.readUInt16BE(g),g+=2,d=this.data[g++],this.colorSpace=function(){switch(d){case 1:return"DeviceGray";case 3:return"DeviceRGB";case 4:return"DeviceCMYK"}}(),this.obj=null}var b;return b=[65472,65473,65474,65475,65477,65478,65479,65480,65481,65482,65483,65484,65485,65486,65487],a.prototype.embed=function(a){return this.obj?void 0:(this.obj=a.ref({Type:"XObject",Subtype:"Image",BitsPerComponent:this.bits,Width:this.width,Height:this.height,ColorSpace:this.colorSpace,Filter:"DCTDecode"}),"DeviceCMYK"===this.colorSpace&&(this.obj.data.Decode=[1,0,1,0,1,0,1,0]),this.obj.end(this.data),this.data=null)},a}(),a.exports=b}).call(this)},function(a,b,c){(function(b){(function(){var d,e,f;f=c(47),d=c(100),e=function(){function a(a,b){this.label=b,this.image=new d(a),this.width=this.image.width,this.height=this.image.height,this.imgData=this.image.imgData,this.obj=null}return a.prototype.embed=function(a){var c,d,e,f,g,h,i,j;if(this.document=a,!this.obj){if(this.obj=a.ref({Type:"XObject",Subtype:"Image",BitsPerComponent:this.image.bits,Width:this.width,Height:this.height,Filter:"FlateDecode"}),this.image.hasAlphaChannel||(e=a.ref({Predictor:15,Colors:this.image.colors,BitsPerComponent:this.image.bits,Columns:this.width}),this.obj.data.DecodeParms=e,e.end()),0===this.image.palette.length?this.obj.data.ColorSpace=this.image.colorSpace:(d=a.ref(),d.end(new b(this.image.palette)),this.obj.data.ColorSpace=["Indexed","DeviceRGB",this.image.palette.length/3-1,d]),this.image.transparency.grayscale)return g=this.image.transparency.greyscale,this.obj.data.Mask=[g,g];if(this.image.transparency.rgb){for(f=this.image.transparency.rgb,c=[],i=0,j=f.length;j>i;i++)h=f[i],c.push(h,h);return this.obj.data.Mask=c}return this.image.transparency.indexed?this.loadIndexedAlphaChannel():this.image.hasAlphaChannel?this.splitAlphaChannel():this.finalize()}},a.prototype.finalize=function(){var a;return this.alphaChannel&&(a=this.document.ref({Type:"XObject",Subtype:"Image",Height:this.height,Width:this.width,BitsPerComponent:8,Filter:"FlateDecode",ColorSpace:"DeviceGray",Decode:[0,1]}),a.end(this.alphaChannel),this.obj.data.SMask=a),this.obj.end(this.imgData),this.image=null,this.imgData=null},a.prototype.splitAlphaChannel=function(){return this.image.decodePixels(function(a){return function(c){var d,e,g,h,i,j,k,l,m;for(g=a.image.colors*a.image.bits/8,m=a.width*a.height,j=new b(m*g),e=new b(m),i=l=d=0,k=c.length;k>i;)j[l++]=c[i++],j[l++]=c[i++],j[l++]=c[i++],e[d++]=c[i++];return h=0,f.deflate(j,function(b,c){if(a.imgData=c,b)throw b;return 2===++h?a.finalize():void 0}),f.deflate(e,function(b,c){if(a.alphaChannel=c,b)throw b;return 2===++h?a.finalize():void 0})}}(this))},a.prototype.loadIndexedAlphaChannel=function(a){var c;return c=this.image.transparency.indexed,this.image.decodePixels(function(a){return function(d){var e,g,h,i,j;for(e=new b(a.width*a.height),g=0,h=i=0,j=d.length;j>i;h=i+=1)e[g++]=c[d[h]];return f.deflate(e,function(b,c){if(a.alphaChannel=c,b)throw b;return a.finalize()})}}(this))},a}(),a.exports=e}).call(this)}).call(b,c(2).Buffer)},function(a,b,c){(function(b){(function(){var d,e,f;e=c(44),f=c(47),a.exports=d=function(){function a(a){var c,d,e,f,g,h,i,j,k,l,m;for(this.data=a,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.text={};;){switch(c=this.readUInt32(),h=function(){var a,b;for(b=[],e=a=0;4>a;e=++a)b.push(String.fromCharCode(this.data[this.pos++]));return b}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"PLTE":this.palette=this.read(c);break;case"IDAT":for(e=k=0;c>k;e=k+=1)this.imgData.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(c),i=255-this.transparency.indexed.length,i>0)for(e=l=0;i>=0?i>l:l>i;e=i>=0?++l:--l)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(c)[0];break;case 2:this.transparency.rgb=this.read(c)}break;case"tEXt":j=this.read(c),f=j.indexOf(0),g=String.fromCharCode.apply(String,j.slice(0,f)),this.text[g]=String.fromCharCode.apply(String,j.slice(f+1));break;case"IEND":return this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(m=this.colorType)||6===m,d=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*d,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new b(this.imgData));default:this.pos+=c}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return a.decode=function(b,c){return e.readFile(b,function(b,d){var e;return e=new a(d),e.decode(function(a){return c(a)})})},a.load=function(b){var c;return c=e.readFileSync(b),new a(c)},a.prototype.read=function(a){var b,c,d;for(d=[],b=c=0;a>=0?a>c:c>a;b=a>=0?++c:--c)d.push(this.data[this.pos++]);return d},a.prototype.readUInt32=function(){var a,b,c,d;return a=this.data[this.pos++]<<24,b=this.data[this.pos++]<<16,c=this.data[this.pos++]<<8,d=this.data[this.pos++],a|b|c|d},a.prototype.readUInt16=function(){var a,b;return a=this.data[this.pos++]<<8,b=this.data[this.pos++],a|b},a.prototype.decodePixels=function(a){var c=this;return f.inflate(this.imgData,function(d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B;if(d)throw d;for(q=c.pixelBitlength/8,u=q*c.width,r=new b(u*c.height),k=e.length,t=0,s=0,g=0;k>s;){switch(e[s++]){case 0:for(i=x=0;u>x;i=x+=1)r[g++]=e[s++];break;case 1:for(i=y=0;u>y;i=y+=1)f=e[s++],j=q>i?0:r[g-q],r[g++]=(f+j)%256;break;case 2:for(i=z=0;u>z;i=z+=1)f=e[s++],h=(i-i%q)/q,v=t&&r[(t-1)*u+h*q+i%q],r[g++]=(v+f)%256;break;case 3:for(i=A=0;u>A;i=A+=1)f=e[s++],h=(i-i%q)/q,j=q>i?0:r[g-q],v=t&&r[(t-1)*u+h*q+i%q],r[g++]=(f+Math.floor((j+v)/2))%256;break;case 4:for(i=B=0;u>B;i=B+=1)f=e[s++],h=(i-i%q)/q,j=q>i?0:r[g-q],0===t?v=w=0:(v=r[(t-1)*u+h*q+i%q],w=h&&r[(t-1)*u+(h-1)*q+i%q]),l=j+v-w,m=Math.abs(l-j),o=Math.abs(l-v),p=Math.abs(l-w),n=o>=m&&p>=m?j:p>=o?v:w,r[g++]=(f+n)%256;break;default:throw new Error("Invalid filter algorithm: "+e[s-1])}t++}return a(r)})},a.prototype.decodePalette=function(){var a,c,d,e,f,g,h,i,j,k;for(e=this.palette,h=this.transparency.indexed||[],g=new b(h.length+e.length),f=0,d=e.length,a=0,c=i=0,j=e.length;j>i;c=i+=3)g[f++]=e[c],g[f++]=e[c+1],g[f++]=e[c+2],g[f++]=null!=(k=h[a++])?k:255;return g},a.prototype.copyToImageData=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;if(d=this.colors,k=null,c=this.hasAlphaChannel,this.palette.length&&(k=null!=(m=this._decodedPalette)?m:this._decodedPalette=this.decodePalette(),d=4,c=!0),e=(null!=a?a.data:void 0)||a,j=e.length,g=k||b,f=h=0,1===d)for(;j>f;)i=k?4*b[f/4]:h,l=g[i++],e[f++]=l,e[f++]=l,e[f++]=l,e[f++]=c?g[i++]:255,h=i;else for(;j>f;)i=k?4*b[f/4]:h,e[f++]=g[i++],e[f++]=g[i++],e[f++]=g[i++],e[f++]=c?g[i++]:255,h=i},a.prototype.decode=function(a){var c,d=this;return c=new b(this.width*this.height*4),this.decodePixels(function(b){return d.copyToImageData(c,b),a(c)})},a}()}).call(this)}).call(b,c(2).Buffer)},function(a,b){(function(){a.exports={annotate:function(a,b,c,d,e){var f,g,h;e.Type="Annot",e.Rect=this._convertRect(a,b,c,d),e.Border=[0,0,0],"Link"!==e.Subtype&&null==e.C&&(e.C=this._normalizeColor(e.color||[0,0,0])),delete e.color,"string"==typeof e.Dest&&(e.Dest=new String(e.Dest));for(f in e)h=e[f],e[f[0].toUpperCase()+f.slice(1)]=h;return g=this.ref(e),this.page.annotations.push(g),g.end(),this},note:function(a,b,c,d,e,f){return null==f&&(f={}),f.Subtype="Text",f.Contents=new String(e),f.Name="Comment",null==f.color&&(f.color=[243,223,92]),this.annotate(a,b,c,d,f)},link:function(a,b,c,d,e,f){return null==f&&(f={}),f.Subtype="Link",f.A=this.ref({S:"URI",URI:new String(e)}),f.A.end(),this.annotate(a,b,c,d,f)},_markup:function(a,b,c,d,e){var f,g,h,i,j;return null==e&&(e={}),j=this._convertRect(a,b,c,d),f=j[0],h=j[1],g=j[2],i=j[3],e.QuadPoints=[f,i,g,i,f,h,g,h],e.Contents=new String,this.annotate(a,b,c,d,e)},highlight:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Highlight",null==e.color&&(e.color=[241,238,148]),this._markup(a,b,c,d,e)},underline:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Underline",this._markup(a,b,c,d,e)},strike:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="StrikeOut",this._markup(a,b,c,d,e)},lineAnnotation:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Line",e.Contents=new String,e.L=[a,this.page.height-b,c,this.page.height-d],this.annotate(a,b,c,d,e)},rectAnnotation:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Square",e.Contents=new String,this.annotate(a,b,c,d,e)},ellipseAnnotation:function(a,b,c,d,e){return null==e&&(e={}),e.Subtype="Circle",e.Contents=new String,this.annotate(a,b,c,d,e)},textAnnotation:function(a,b,c,d,e,f){return null==f&&(f={}),f.Subtype="FreeText",f.Contents=new String(e),f.DA=new String,this.annotate(a,b,c,d,f)},_convertRect:function(a,b,c,d){var e,f,g,h,i,j,k,l,m;return l=b,b+=d,k=a+c,m=this._ctm,e=m[0],f=m[1],g=m[2],h=m[3],i=m[4],j=m[5],a=e*a+g*b+i,b=f*a+h*b+j,k=e*k+g*l+i,l=f*k+h*l+j,[a,b,k,l]}}}).call(this)},function(a,b){a.exports={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]}},function(a,b,c){(function(b){"use strict";function d(a,b){this.pdfDoc=a,this.imageDictionary=b||{}}var e=(c(24),c(97));d.prototype.measureImage=function(a){function c(a){var c=g.imageDictionary[a];if(!c)return a;var d=c.indexOf("base64,");if(0>d)throw"invalid image format, images dictionary should contain dataURL entries";return new b(c.substring(d+7),"base64")}var d,f,g=this;return this.pdfDoc._imageRegistry[a]?d=this.pdfDoc._imageRegistry[a]:(f="I"+ ++this.pdfDoc._imageCount,d=e.open(c(a),f),d.embed(this.pdfDoc),this.pdfDoc._imageRegistry[a]=d),{width:d.width,height:d.height}},a.exports=d}).call(b,c(2).Buffer)},function(a,b){"use strict";function c(a){for(var b=[],c=null,d=0,e=a.inlines.length;e>d;d++){var f=a.inlines[d],g=f.decoration;if(g){var h=f.decorationColor||f.color||"black",i=f.decorationStyle||"solid";g=Array.isArray(g)?g:[g];for(var j=0,k=g.length;k>j;j++){var l=g[j];c&&l===c.decoration&&i===c.decorationStyle&&h===c.decorationColor&&"lineThrough"!==l?c.inlines.push(f):(c={line:a,decoration:l,decorationColor:h,decorationStyle:i,inlines:[f]},b.push(c))}}else c=null}return b}function d(a,b,c,d){function e(){for(var b=0,c=0,d=a.inlines.length;d>c;c++){var e=a.inlines[c];b=e.fontSize>b?c:b}return a.inlines[b]}function f(){for(var b=0,c=0,d=a.inlines.length;d>c;c++)b+=a.inlines[c].width;return b}var g=a.inlines[0],h=e(),i=f(),j=a.line.getAscenderHeight(),k=h.font.ascender/1e3*h.fontSize,l=h.height,m=l-k,n=.5+.12*Math.floor(Math.max(h.fontSize-8,0)/2);switch(a.decoration){case"underline":c+=j+.45*m;break;case"overline":c+=j-.85*k;break;case"lineThrough":c+=j-.25*k;break;default:throw"Unkown decoration : "+a.decoration}if(d.save(),"double"===a.decorationStyle){var o=Math.max(.5,2*n);d.fillColor(a.decorationColor).rect(b+g.x,c-n/2,i,n/2).fill().rect(b+g.x,c+o-n/2,i,n/2).fill()}else if("dashed"===a.decorationStyle){var p=Math.ceil(i/6.8),q=b+g.x;d.rect(q,c,i,n).clip(),d.fillColor(a.decorationColor);for(var r=0;p>r;r++)d.rect(q,c-n/2,3.96,n).fill(),q+=6.8}else if("dotted"===a.decorationStyle){var s=Math.ceil(i/(3*n)),t=b+g.x;d.rect(t,c,i,n).clip(),d.fillColor(a.decorationColor);for(var u=0;s>u;u++)d.rect(t,c-n/2,n,n).fill(),t+=3*n}else if("wavy"===a.decorationStyle){var v=.7,w=1,x=Math.ceil(i/(2*v))+1,y=b+g.x-1;d.rect(b+g.x,c-w,i,c+w).clip(),d.lineWidth(.24),d.moveTo(y,c);for(var z=0;x>z;z++)d.bezierCurveTo(y+v,c-w,y+2*v,c-w,y+3*v,c).bezierCurveTo(y+4*v,c+w,y+5*v,c+w,y+6*v,c),y+=6*v;d.stroke(a.decorationColor)}else d.fillColor(a.decorationColor).rect(b+g.x,c-n/2,i,n).fill();d.restore()}function e(a,b,e,f){for(var g=c(a),h=0,i=g.length;i>h;h++)d(g[h],b,e,f)}function f(a,b,c,d){for(var e=a.getHeight(),f=0,g=a.inlines.length;g>f;f++){var h=a.inlines[f];h.background&&d.fillColor(h.background).rect(b+h.x,c,h.width,e).fill()}}a.exports={drawBackground:f,drawDecorations:e}},function(a,b,c){var d,e,f=f||function(a){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(a){var b=new MouseEvent("click");a.dispatchEvent(b)},g=a.webkitRequestFileSystem,h=a.requestFileSystem||g||a.mozRequestFileSystem,i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=0,l=500,m=function(b){var d=function(){"string"==typeof b?c().revokeObjectURL(b):b.remove()};a.chrome?d():setTimeout(d,l)},n=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(f){i(f)}}},o=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},p=function(b,i,l){l||(b=o(b));var p,q,r,s=this,t=b.type,u=!1,v=function(){n(s,"writestart progress write writeend".split(" "))},w=function(){if(!u&&p||(p=c().createObjectURL(b)),q)q.location.href=p;else{var d=a.open(p,"_blank");void 0==d&&"undefined"!=typeof safari&&(a.location.href=p)}s.readyState=s.DONE,v(),m(p)},x=function(a){return function(){return s.readyState!==s.DONE?a.apply(this,arguments):void 0}},y={create:!0,exclusive:!1};return s.readyState=s.INIT,i||(i="download"),e?(p=c().createObjectURL(b),d.href=p,d.download=i,void setTimeout(function(){f(d),v(),m(p),s.readyState=s.DONE})):(a.chrome&&t&&t!==j&&(r=b.slice||b.webkitSlice,b=r.call(b,0,b.size,j),u=!0),g&&"download"!==i&&(i+=".download"),(t===j||g)&&(q=a),h?(k+=b.size,void h(a.TEMPORARY,k,x(function(a){a.root.getDirectory("saved",y,x(function(a){var c=function(){a.getFile(i,y,x(function(a){a.createWriter(x(function(c){c.onwriteend=function(b){q.location.href=a.toURL(),s.readyState=s.DONE,n(s,"writeend",b),m(a)},c.onerror=function(){var a=c.error;a.code!==a.ABORT_ERR&&w()},"writestart progress write abort".split(" ").forEach(function(a){c["on"+a]=s["on"+a]}),c.write(b),s.abort=function(){c.abort(),s.readyState=s.DONE},s.readyState=s.WRITING}),w)}),w)};a.getFile(i,{create:!1},x(function(a){a.remove(),c()}),x(function(a){a.code===a.NOT_FOUND_ERR?c():w()}))}),w)}),w)):void w())},q=p.prototype,r=function(a,b,c){return new p(a,b,c)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(a,b,c){return c||(a=o(a)),navigator.msSaveOrOpenBlob(a,b||"download")}:(q.abort=function(){var a=this;a.readyState=a.DONE,n(a,"abort")},q.readyState=q.INIT=0,q.WRITING=1,q.DONE=2,q.error=q.onwritestart=q.onprogress=q.onwrite=q.onabort=q.onerror=q.onwriteend=null,r)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof a&&a.exports?a.exports.saveAs=f:null!==c(106)&&null!=c(107)&&(d=[],e=function(){return f}.apply(b,d),!(void 0!==e&&(a.exports=e)))},function(a,b){a.exports=function(){throw new Error("define cannot be used indirect")}},function(a,b){(function(b){a.exports=b}).call(b,{})}]),window.pdfMake=window.pdfMake||{},window.pdfMake.vfs={"LICENSE.txt":"DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBcGFjaGUgTGljZW5zZQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgVmVyc2lvbiAyLjAsIEphbnVhcnkgMjAwNA0KICAgICAgICAgICAgICAgICAgICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzLw0KDQogICBURVJNUyBBTkQgQ09ORElUSU9OUyBGT1IgVVNFLCBSRVBST0RVQ1RJT04sIEFORCBESVNUUklCVVRJT04NCg0KICAgMS4gRGVmaW5pdGlvbnMuDQoNCiAgICAgICJMaWNlbnNlIiBzaGFsbCBtZWFuIHRoZSB0ZXJtcyBhbmQgY29uZGl0aW9ucyBmb3IgdXNlLCByZXByb2R1Y3Rpb24sDQogICAgICBhbmQgZGlzdHJpYnV0aW9uIGFzIGRlZmluZWQgYnkgU2VjdGlvbnMgMSB0aHJvdWdoIDkgb2YgdGhpcyBkb2N1bWVudC4NCg0KICAgICAgIkxpY2Vuc29yIiBzaGFsbCBtZWFuIHRoZSBjb3B5cmlnaHQgb3duZXIgb3IgZW50aXR5IGF1dGhvcml6ZWQgYnkNCiAgICAgIHRoZSBjb3B5cmlnaHQgb3duZXIgdGhhdCBpcyBncmFudGluZyB0aGUgTGljZW5zZS4NCg0KICAgICAgIkxlZ2FsIEVudGl0eSIgc2hhbGwgbWVhbiB0aGUgdW5pb24gb2YgdGhlIGFjdGluZyBlbnRpdHkgYW5kIGFsbA0KICAgICAgb3RoZXIgZW50aXRpZXMgdGhhdCBjb250cm9sLCBhcmUgY29udHJvbGxlZCBieSwgb3IgYXJlIHVuZGVyIGNvbW1vbg0KICAgICAgY29udHJvbCB3aXRoIHRoYXQgZW50aXR5LiBGb3IgdGhlIHB1cnBvc2VzIG9mIHRoaXMgZGVmaW5pdGlvbiwNCiAgICAgICJjb250cm9sIiBtZWFucyAoaSkgdGhlIHBvd2VyLCBkaXJ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P/0//8AYgAAA0EHTAImACsAAAAHAJz/8gGc//8APgAAAtoF9QImAIoAAAAGAJyLRQAA////mv5YAjoFsAImACsAAAAGAJ/jCAAA////e/5QAjEGGAImAEsAAAAGAJ/EAAAA//8AYgAAAogHDQImACsAAAAHAJ0AVwFd//8AYv/rBnYFsAAmACsAAAAHACwCJAAA//8ARP5LBCEGGAAmAEsAAAAHAEwB6AAA//8AD//rBSwHOQImACwAAAAHAJoBpQFQ////G/5LAsQF3AImAJgAAAAHAJr/Pf/z//8APv31BTUFsAAmAC0AAAAHAZEBIP7G//8ANv33BCgGGAImAE0AAAAHAZEAxP7I//8AWAAAA60G4AImAC4AAAAHAHMAjwEa//8ARAAAA0MHXAImAE4AAAAHAHMAlwGW//8AWP33A60FsAImAC4AAAAHAZEBGv7I////qP33AjEGGAImAE4AAAAHAZH/wv7I//8AWAAAA9UFsQImAC4AAAAHAZECsgTF//8ARAAAA3IGGAAmAE4AAAAHAZECTwUs//8AWAAAA60FsAImAC4AAAAHAJ0BNP3F//8ARAAAAukGGAAmAE4AAAAHAJ0AuP23//8AWAAABXoHHwImADAAAAAHAHMCQAFZ//8ANQAABCEF3QImAFAAAAAHAHMBdQAX//8AWP33BXoFsAImADAAAAAHAZEBd/7I//8ANf33BBgETgImAFAAAAAHAZEA7P7I//8AWAAABXoHRwImADAAAAAHAJsBRQFe//8ANQAABCMGBQImAFAAAAAGAJt6HAAA//8ANQAABBgGGAImAFAAAAAHAZEAiwUs//8AXv/rBTYHDwAmADEAAAAHAG4BRwFf//8ARv/sBBwFuAImAFEAAAAGAG5iCAAA//8AXv/rBTYHYQAmADEAAAAHAJwBggGx//8ARv/sBBwGCgImAFEAAAAHAJwAnQBa//8AXv/rBZkHYAAmADEAAAAHAKEBqgFy//8ARv/sBLQGCQImAFEAAAAHAKEAxQAb//8AVwAABQIHHwImADQAAAAHAHMB3AFZ//8ANQAAA4cF3QImAFQAAAAHAHMA2wAX//8AV/33BQIFrwImADQAAAAHAZEBE/7I////p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r+UAQ7BDoAJwAAIQ4BBwYWMzI2NwcOASMiJjc+AT8BJw4BIyImNxMzAwYWMzI2NxMzAwNiV2IJBhsoGTAXByBMMk9YDwpeWRIDP6JlnZMwf7Z/JkNpX5Mzm7XYPmQ8JSURC3gTGWNaRno1jwFSVOHwAn39gb53W1MDBvvG//8A7AAABuwHRgImADkAAAAHAJoBnAFd//8AsgAABfoF7wImAFkAAAAHAJoBFQAG//8A7gAABVMHRAImADsAAAAHAJoA2AFb////vP5LBCoF7wImAFsAAAAGAJokBgAA//8A7gAABVMHCgImADsAAAAHAGgA2QFa//8AIAAABH0HHwAmADwAAAAHAHMB0QFZ//8ACAAAA+oFyAImAFwAAAAHAHMBPgAC//8AIAAABFsHDQAmADwAAAAHAJ0BgQFd//8ACAAAA98FtgImAFwAAAAHAJ0A7gAG//8AIAAABH8HRwAmADwAAAAHAJsA1gFe//8ACAAAA+wF8AImAFwAAAAGAJtDBwAA////ngAAB3UHHwImAH8AAAAHAHMDAQFZ//8ABP/rBmAF3gImAIQAAAAHAHMCegAY//8AJv+jBWsHXQImAIEAAAAHAHMCMQGX//8ATP95BDgF3AImAIcAAAAHAHMBUAAW//8ACwAABEkEjQImAakAAAAHAdP/Uv97//8ACwAABEkEjQImAakAAAAHAdP/Uv97//8AvQAABCUEjQImAbgAAAAGAdMo9wAA////1AAAA+gF3wImAaYAAAAHAEIA2QAa////1AAABDEF3AImAaYAAAAHAHMBhQAW////1AAAA/sGAwImAaYAAAAGAJp0GgAA////1AAABEIGDgImAaYAAAAHAKAAkwAd////1AAABDoFyQImAaYAAAAGAGh1GQAA////1AAAA+gGRQImAaYAAAAHAJ4BAABl////1AAABDQGXQImAaYAAAAHAdQA9//q//8ATf5HBEIEnQImAagAAAAHAHcBU//6//8APgAABB0F3wImAaoAAAAHAEIAqgAa//8APgAABB0F3AImAaoAAAAHAHMBVgAW//8APgAABB0GAwImAaoAAAAGAJpFGgAA//8APgAABB0FyQImAaoAAAAGAGhGGQAA//8APgAAAd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AImAaoAAAAGAJtbGwAA//8ASv/vBF4GEwImAawAAAAGAJpzKgAA//8ASv/vBF4GGQImAawAAAAHAJwAzgBp//8ASv/vBF4F2gImAawAAAAHAJ0BNAAq//8ASv3nBF4EnQImAawAAAAHAZEA9/64//8APgAABKQGAwImAa0AAAAGAJp7GgAA//8APgAAAwAGDgImAa4AAAAHAKD/UQAd//8APgAAAwoFtwImAa4AAAAHAG7/UgAH//8APgAAAtwGCQImAa4AAAAGAJyNWQAA////c/5QAd0EjQImAa4AAAAGAJ+8AAAA//8APgAAAiQFygImAa4AAAAGAJ3zGgAA//8AC//vBKYF+QImAa8AAAAHAJoBHwAQ//8APv3zBHEEjQImAbAAAAAHAZEArP7E//8APgAAAvsFwQImAbEAAAAGAHND+wAA//8APv31AvsEjQImAbEAAAAHAZEAjP7G//8APgAAAxAEjgImAbEAAAAHAZEB7QOi//8APgAAAvsEjQImAbEAAAAHAJ0Aif0m//8APgAABL4F3AImAbMAAAAHAHMBowAW//8APv31BL4EjQImAbMAAAAHAZEBGv7G//8APgAABL4GBAImAbMAAAAHAJsAqAAb//8ATf/vBG8FxwImAbQAAAAHAG4AmAAX//8ATf/vBG8GGQImAbQAAAAHAJwA0wBp//8ATf/vBOoGGAImAbQAAAAHAKEA+wAq//8APgAABD8F3AImAbYAAAAHAHMBOQAW//8APv31BD8EjQImAbYAAAAHAZEAsP7G//8APgAABD8GBAImAbYAAAAGAJs+GwAA//8AI//vBDIF7AImAbcAAAAHAHMBZAAm//8AI//vBDIGEwImAbcAAAAGAJpTKgAA//8AI/5HBDIEnQImAbcAAAAHAHcBPf/6//8AI//vBDIGFAImAbcAAAAGAJtpKwAA//8Al/31BCUEjQImAbgAAAAHAZEAsf7G//8AvQAABCUGAwImAbgAAAAGAJs/GgAA//8AWP/vBLwGDwImAbkAAAAHAKAArwAe//8AWP/vBLwFuAImAbkAAAAHAG4AsAAI//8AWP/vBLwGCgImAbkAAAAHAJwA6wBa//8AWP/vBLwGRgImAbkAAAAHAJ4BHABm//8AWP/vBQIGCQImAbkAAAAHAKEBEwAbAAEAWP57BLwEjQAoAAABAw4BBw4BBwYWMzI2NwcOASMiJjc+ATcnIgYjIiY3EzMDBhYzMjY3EwS8mR2QcFBbCAYbKBkwFwcgTDJPWA8HNC4BBQ0LxeEombSZHH+Ee78amQSN/QGLszA5YDolJRELeBMZY1ozWigDAdzDAv/9AYiEjn4C/wAAAP//ANQAAAXyBgMCJgG7AAAABwCaAQwAGv//ALUAAASBBgICJgG9AAAABgCaRxkAAP//ALUAAASBBcgCJgG9AAAABgBoSBgAAP////kAAAQWBdwCJgG+AAAABwBzATcAFv////kAAAQWBcoCJgG+AAAABwCdAOcAGv////kAAAQWBgQCJgG+AAAABgCbPBsAAP//ACP/7whdBJ0AJgG3AAAABwG3BCsAAP///9UAAAR/BngCJgAjAAAABgCpPAAAAP//AJsAAAVWBnoAJgAnZAAABwCp/zcAAv//ALwAAAXdBnoAJgAqZAAABwCp/2MAAv//AMYAAAKeBnkAJgArZAAABwCp/2cAAf//AHL/6wVKBngAJgAxFAAABgCpmgAAAP//AEkAAAW3BngAJgA7ZAAABwCp/uUAAP//ADEAAAUcBngAJgC1FAAABgCphAAAAP//AGz/6wMkBj8CJgC+AAAABwCq/yv/t////9UAAAR/BbACBgAjAAD//wBYAAAE0AWwAgYAJAAA//8AWAAABPIFsAIGACcAAP//ACAAAARbBbAABgA8AAD//wBYAAAFeQWwAgYAKgAA//8AYgAAAjoFsAIGACsAAP//AD4AAAU1BbAABgAtAAD//wBYAAAGswWwAgYALwAA//8AWAAABXoFsAIGADAAAP//AF7/6wU2BcUABgAxAAD//wBYAAAFGAWwAgYAMgAA//8A7AAABQsFsAIGADYAAP//AO4AAAVTBbACBgA7AAD////8AAAFHQWwAgYAOgAA//8AYgAAA10HDAImACsAAAAHAGj/mAFc//8A7gAABVMHCgImADsAAAAHAGgA2QFa//8AQP/rBDQGegImALYAAAAHAKkBWwAC//8AKf/tA/0GeQImALoAAAAHAKkBFgAB//8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wBG/+wEHAROAgYAUQAA////4v5gBCYETgIGAFIAAAABAEf/7AP7BE4AGwAAJTI2NzMGBCMiAj8BNgAzMhYHIzYmIyIGDwEGFgHxWqAPrBn+8qbXuyUHJwER4a7BGqwQameNpBoHHFWBeFyazwEy6ir1ASfeqmyG4qQqsdYAAP///7z+SwQqBDoCBgBbAAD////pAAAD8QQ6AgYAWgAA//8AR//sA/IFywImAEcAAAAGAGgtGwAA//8APgAAA5UFyAImAOcAAAAHAHMA5wAC//8AO//sA8kETgIGAFUAAP//AEQAAAIxBhgCBgBLAAD//wA+AAAC9gW1AiYAigAAAAcAaP8xAAX///8d/ksCOQYYAgYATAAA//8AQAAABGEFxwImAOwAAAAHAHMBTQAB////vP5LBCoF9QImAFsAAAAGAJx/RQAA//8A7AAABuwHIgImADkAAAAHAEICAQFd//8AsgAABfoFywImAFkAAAAHAEIBegAG//8A7AAABuwHHwImADkAAAAHAHMCrQFZ//8AsgAABfoFyAImAFkAAAAHAHMCJgAC//8A7AAABuwHDAImADkAAAAHAGgBnQFc//8AsgAABfoFtQImAFkAAAAHAGgBFgAF//8A7gAABVMHIAImADsAAAAHAEIBPQFb////vP5LBCoFywImAFsAAAAHAEIAiQAG//8AxgQjAagGGAIGAAkAAP//AMUEFAK9BhgCBgAEAAD//wBPAAAEJQWwACYEHAAAAAcEHAH9AAD//wCKAAAEzAYtACYASAAAAAcATgKbAAD///8b/ksC/AXdAiYAmAAAAAcAm/9T//T//wCxA+cCIAYYAgYBZgAA//8AWAAABrMHHwImAC8AAAAHAHMC3wFZ//8ANQAABlsF3QImAE8AAAAHAHMCrwAX////1f6HBH8FsAImACMAAAAHAKIBOQAA//8AOv6HA/cETgImAEMAAAAHAKIAkgAA//8AAf/rBTYGogAmADEAAAAHAdX/DADM//8AigAABrIGLQAmAEgAAAAHAZICmwAA//8AigAAB2cGLQAmAEgAAAAnAEgCmwAAAAcATgU2AAD//wBYAAAE8gciAiYAJwAAAAcAQgE3AV3//wBYAAAFegciAiYA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+sFNgchACYAMQAAAAcAaAEoAXH//wBG/+wEHAXKAiYAUQAAAAYAaEMaAAD//wBd/+sFNwXFAgYBEgAA//8ARv/sBBwETgIGARMAAP//AF3/6wU3BwcCJgESAAAABwBoAScBV///AEb/7AQeBeYCJgETAAAABgBoWTYAAP//AIf/7AU0ByICJgDiAAAABwBoARQBcv//ADP/6wQNBcoCJgD6AAAABgBoSBoAAP//AKP/6wVFBvoCJgDZAAAABwBuAQMBSv///7z+SwQqBaQCJgBbAAAABgBuRPQAAP//AKP/6wVFBwwCJgDZAAAABwBoAOQBXP///7z+SwQqBbUCJgBbAAAABgBoJQUAAP//AKP/6wVVB0sCJgDZAAAABwChAWYBXf///7z+SwSWBfQCJgBbAAAABwChAKcABv//ANEAAAVIBwwCJgDcAAAABwBoAQsBXP//AH8AAAQGBbUCJgD0AAAABgBoLwUAAP//AFcAAAaiBwwAJgDhDwAAJwArBGgAAAAHAGgByAFc//8AQAAABasFtQAmAPkAAAAnAIoD3gAAAAcAaAEjAAX////8/ksFHQWwAiYAOgAAAAcBmgN+AAD////p/ksD8QQ6AiYAWgAAAAcBmgKWAAD//wBE/+sElQYYAgYARgAA////3v5LBXEFsAImANgAAAAHAZoD/AAA////1f5LBEkEOgImAO0AAAAHAZoDHwAA////1f6xBH8FsAImACMAAAAHAKgErAAA//8AOv6xA/cETgImAEMAAAAHAKgEBQAA////1QAABH8HxgImACMAAAAHAKYE5QFT//8AOv/sA/cGhAImAEMAAAAHAKYELQAR////1QAABg4HqAImACMAAAAHAaMA8AEW//8AOv/sBVYGZwImAEMAAAAGAaM41QAA////1QAABLcHpQImACMAAAAHAaIA+gEl//8AOv/sA/8GZAImAEMAAAAGAaJC5AAA////1QAABZ4H2wImACMAAAAHAaEA9QEN//8AOv/sBOYGmgImAEMAAAAGAaE9zAAA////1QAABLYH5QImACMAAAAHAaAA9gET//8AOv/sA/4GpAImAEMAAAAGAaA+0gAA////1f6xBI0HRgImACMAAAAnAJoBBgFdAAcAqASsAAD//wA6/rED9wYEAiYAQwAAACYAmk4bAAcAqAQFAAAAAP///9UAAASqB90CJgAjAAAABwGfASkBVP//ADr/7AP3BpsCJgBDAAAABgGfcRIAAP///9UAAATOB+ACJgAjAAAABwGkAS8BZ///ADr/7AQWBp4CJgBDAAAABgGkdyUAAP///9UAAASVCEsCJgAjAAAABwGeASkBSf//ADr/7AP3BwkCJgBDAAAABgGecQcAAP///9UAAATMCB8CJgAjAAAABwGdASsBUf//ADr/7AQUBt0CJgBDAAAABgGdcw8AAP///9X+sQSwB0wCJgAjAAAAJwCcAWEBnAAHAKgErAAA//8AOv6xA/gGCgImAEMAAAAnAJwAqQBaAAcAqAQFAAD//wBY/rsE8gWwAiYAJwAAAAcAqAR3AAr//wBH/rED6wROAiYARwAAAAcAqARRAAD//wBYAAAE8gfGAiYAJwAAAAcApgSxAVP//wBH/+wD6waFAiYARwAAAAcApgQLABL//wBYAAAE8gdRAiYAJwAAAAcAoADxAWD//wBH/+wD+gYQAiYARwAAAAYAoEsfAAD//wBYAAAF2geoAiYAJwAAAAcBowC8ARb//wBH/+wFNAZoAiYARwAAAAYBoxbWAAD//wBYAAAE8gelAiYAJwAAAAcBogDGASX//wBH/+wD6wZlAiYARwAAAAYBoiDlAAD//wBYAAAFagfbAiYAJwAAAAcBoQDBAQ3//wBH/+wExAabAiYARwAAAAYBoRvNAAD//wBYAAAE8gflAiYAJwAAAAcBoADCARP//wBH/+wD6walAiYARwAAAAYBoBzTAAD//wBY/rsE8gdGAiYAJwAAACcAmgDSAV0ABwCoBHcACv//AEf+sQPrBgUCJgBHAAAAJgCaLBwABwCoBFEAAAAA//8AYgAAAwoHxgImACsAAAAHAKYDdQFT//8APgAAAqMGcAImAIoAAAAHAKYDDv/9//8AF/65AjoFsAImACsAAAAHAKgDOwAI////+v67AjEGGAImAEsAAAAHAKgDHgAK//8AXv6pBTYFxQAmADEAAAAHAKgEw//4//8ARv6oBBwETgImAFEAAAAHAKgEV//3//8AXv/rBTYH2wAmADEAAAAHAKYFBgFo//8ARv/sBBwGhAImAFEAAAAHAKYEIQAR//8AXv/rBi8HvQAmADEAAAAHAaMBEQEr//8ARv/sBUoGZwImAFEAAAAGAaMs1QAA//8AXv/rBTYHugAmADEAAAAHAaIBGwE6//8ARv/sBBwGZAImAFEAAAAGAaI25AAA//8AXv/rBb8H8AAmADEAAAAHAaEBFgEi//8ARv/sBNoGmgImAFEAAAAGAaExzAAA//8AXv/rBTYH+gAmADEAAAAHAaABFwEo//8ARv/sBBwGpAImAFEAAAAGAaAy0gAA//8AXv6pBTYHWwAmADEAAAAnAJoBJwFyAAcAqATD//j//wBG/qgEHAYEAiYAUQAAACYAmkIbAAcAqARX//cAAP//AFn/6wYlBw8CJgCUAAAABwBzAiQBSf//AEb/7AUJBd0CJgCVAAAABwBzAXgAF///AFn/6wYlBxICJgCUAAAABwBCAXgBTf//AEb/7AUJBeACJgCVAAAABwBCAMwAG///AFn/6wYlB7YCJgCUAAAABwCmBPIBQ///AEb/7AUJBoQCJgCVAAAABwCmBEYAEf//AFn/6wYlB0ECJgCUAAAABwCgATIBUP//AEb/7AUJBg8CJgCVAAAABwCgAIYAHv//AFn+sQYlBjYCJgCUAAAABwCoBLEAAP//AEb+qAUJBLACJgCVAAAABwCoBEj/9///AGf+qgVXBbACJgA3AAAABwCoBLL/+f//AFr+sQQ7BDoCJgBXAAAABwCoBAsAAP//AGf/6wVXB8YCJgA3AAAABwCmBPEBU///AFr/7AQ7BnACJgBXAAAABwCmBED//f//AGf/6walBx8CJgCWAAAABwBzAiIBWf//AFr/7AVXBcgCJgCXAAAABwBzAXIAAv//AGf/6walByICJgCWAAAABwBCAXYBXf//AFr/7AVXBcsCJgCXAAAABwBCAMYABv//AGf/6walB8YCJgCWAAAABwCmBPABU///AFr/7AVXBnACJgCXAAAABwCmBED//f//AGf/6walB1ECJgCWAAAABwCgATABYP//AFr/7AVXBfoCJgCXAAAABwCgAIAACf//AGf+qQalBg0CJgCWAAAABwCoBLH/+P//AFr+sQVXBJ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QKVgnA6NfzoBMeqp6cAAAEANQAABLUFsAAPAAABIxEjESM1MxEhNSEVIREzA73P883N/joEgP45zwMS/O4DEqoBMcPD/s8AAf/n/+wCdgVBAB8AAAERMxUjFTMVIxEUFjMyNjcXDgEjIiY1ESM1MzUjNTMRAaHDw9XVMSsZLBQaIV4xg4/Hx5WVBUH++bSlqv75RTYHBrIQFJmrAQeqpbQBB///ABoAAAUoByICJgAjAAAABwBCAPwBXP//ABoAAAUoByECJgAjAAAABwBzAbMBW///ABoAAAUoB0cCJgAjAAAABwCaALcBWf//ABoAAAUoB2MCJgAjAAAABwCgALkBbP//ABoAAAUoBw0CJgAjAAAABwBoAJMBXf//ABoAAAUoB48CJgAjAAAABwCeAUwBs///ABoAAAUoB70CJgAjAAAABwHUAVIBKP//AHT+PATYBcUCJgAlAAAABwB3Acb/+///AJ8AAAR1ByICJgAnAAAABwBCAMQBXP//AJ8AAAR1ByECJgAnAAAABwBzAXsBW///AJ8AAAR1B0cCJgAnAAAABwCaAH8BWf//AJ8AAAR1Bw0CJgAnAAAABwBoAFsBXf///8wAAAGgByICJgArAAAABwBC/4IBXP//AK0AAAKEByECJgArAAAABwBzADgBW////9gAAAJ5B0cCJgArAAAABwCa/z0BWf///70AAAKSBw0CJgArAAAABwBo/xkBXf//AJ8AAAUQB2MCJgAwAAAABwCgAO4BbP//AHT/6wUbBzcCJgAxAAAABwBCASMBcf//AHT/6wUbBzYCJgAxAAAABwBzAdoBcP//AHT/6wUbB1wCJgAxAAAABwCaAN4Bbv//AHT/6wUbB3gCJgAxAAAABwCgAOABgf//AHT/6wUbByICJgAxAAAABwBoALoBcv//AIb/6wTxByICJgA3AAAABwBCARcBXP//AIb/6wTxByECJgA3AAAABwBzAc4BW///AIb/6wTxB0cCJgA3AAAABwCaANIBWf//AIb/6wTxBw0CJgA3AAAABwBoAK4BXf//ABMAAATvByECJgA7AAAABwBzAZYBW///AF7/7AQBBeACJgBDAAAABwBCAIEAGv//AF7/7AQBBd8CJgBDA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AAF0AW2AiYAWQAAAAcAaADtAAb//wATAAAE7wciAiYAOwAAAAcAQgDfAVz//wAQ/ksD/AXLAiYAWwAAAAYAQmEFAAD//wBSBAQBCwYYAgYACQAA//8AUgP8Aj8GGAIGAAQAAP//AJoAAAOyBbAAJgQbAAAABwQbAiUAAP//ADEAAARSBi0AJgBIAAAABwBOAs8AAP///7X+SwJsBeoCJgCYAAAABwCb/z//+f//ADMD1gFpBhgCBgFmAAD//wCfAAAGYgchAiYALwAAAAcAcwKSAVv//wCAAAAGdQXfAiYATwAAAAcAcwKhABn//wAa/n4FKAWwAiYAIwAAAAcAogFIAAD//wBe/oUEAQROAiYAQwAAAAcAogCQAAf///89/+sFGwasAiYAMQAAAAcB1f7RANX//wAxAAAG5gYtACYASAAAAAcBkgLPAAD//wAxAAAHIQYtACYASAAAACcASALPAAAABwBOBZ4AAP//AJ8AAAR1ByICJgAnAAAABwBCAMQBXP//AJoAAAULByICJgDXAAAABwBCAS8BXP//AFn/7AP4BeECJgBHAAAABwBCAIMAG///AIYAAAQSBcsCJgDrAAAABwBCAKcABf//AEgAAAVRBbACBgC0AAD//wBP/iIFfgQ6AgYAyAAA//8AEQAABO8HRAImARQAAAAHAKcEOwFW////4wAABBgGMgImARUAAAAHAKcD1wBE//8AU/5LCIQETgAmAFEAAAAHAFsEiAAA//8AdP5LCYsFxQAmADEAAAAHAFsFjwAA//8ASv46BHsFxQImANYAAAAHAZwBkv+g//8ATf47A8QETQImAOoAAAAHAZwBOf+h//8AdP4+BNgFxQImACUAAAAHAZwB0/+k//8AUf4+A/cETgImAEUAAAAHAZwBS/+k//8AEwAABO8FsAIGADsAAP//ACD+XwP1BDoCBgC4AAD//wCtAAABoAWwAgYAKwAA//8AGAAAB4kHXAImANUAAAAHAJwCHAGs//8AFwAABl8GBQImAOkAAAAHAJwBpQBV//8ArQAAAaAFsAIGACsAAP//ABoAAAUoB1wCJgAjAAAABwCcAOoBrP//AF7/7AQBBhoCJgBDAAAABgCcb2oAAP//ABoAAAUoBw0CJgAjAAAABwBoAJMBXf//AF7/7AQBBcsCJgBDAAAABgBoGBsAAP////YAAAdXBbACBgB/AAD//wA0/+sGhAROAgYAhAAA//8AnwAABHUHXAImACcAAAAHAJwAsgGs//8AWf/sA/gGGwImAEcAAAAGAJxxawAA//8AU//qBRsG2gImAUEAAAAHAGgAcwEq//8AWf/sA/gEUAIGAJkAAP//AFn/7AP4BcwCJgCZAAAABgBoGhwAAP//ABgAAAeJBw0CJgDVAAAABwBoAcUBXf//ABcAAAZfBbYCJgDpAAAABwBoAU4ABv//AEr/6wR7ByICJgDWAAAABwBoAFgBcv//AE3/7APEBcoCJgDqAAAABgBoABoAAP//AJoAAAULBvYCJgDXAAAABwBuAOUBRv//AIYAAAQSBaACJgDrAAAABgBuXfAAAP//AJoAAAULBw0CJgDXAAAABwBoAMYBXf//AIYAAAQSBbYCJgDrAAAABgBoPgYAAP//AHT/6wUbByICJgAxAAAABwBoALoBcv//AFP/7AQ0BcsCJgBRAAAABgBoNRsAAP//AGr/6wURBcUCBgESAAD//wBS/+wEMwROAgYBEwAA//8Aav/rBREHCAImARIAAAAHAGgAxgFY//8AUv/sBDMF5wImARMAAAAGAGghNwAA//8AiP/sBNcHIwImAOIAAAAHAGgAjwFz//8AUf/rA+gFywImAPoAAAAGAGgPGwAA//8AP//rBNkG9gImANkAAAAHAG4AlwFG//8AEP5LA/wFoAImAFsAAAAGAG4X8AAA//8AP//rBNkHDQImANkAAAAHAGgAeAFd//8AEP5LA/wFtgImAFsAAAAGAGj5BgAA//8AP//rBNkHSwImANkAAAAHAKEBAQFd//8AEP5LBBwF9AImAFsAAAAHAKEAgQAG//8AjwAABOkHDQImANwAAAAHAGgAwgFd//8AXwAAA+AFtgImAPQAAAAGAGgNBgAA//8AnwAABlkHDQAmAOELAAAnACsEuQAAAAcAaAFuAV3//wCPAAAFyQW2ACYA+QAAACcAigRHAAAABwBoAR8ABv//AC/+SwVUBbACJgA6AAAABwGaA8YAAP//ACH+SwRYB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ASAAAAAAAAAAAAAAAAAAYAAAAAAAYADAATABsAFgAJAAQACQAWAAUAFwAWAAkAGAAAAAAAAAAJAAUADwAAAA8AAAAPAAAACgAFAAsACwAAAAAAAAALAAAACQASABsABgAAAAAAAAAAABYACQAAAAAABwAFABYABgAAAAAABgAWAAoABQAAABMAFwAAABIAGwASABsAAAAAAAAAFgAAABYAFgATABcAAAAAAAAACQAAAAkABgAEAAYAFgAGAAQAAAAAABEABQARAAUAEQAFAA4AAwAAAAkAEwAXABYAAgAQABIAGwASABsAEgAbABIAGwASABsAEgAbABIAGwASABsAEgAbABIAGwASABsAEgAbAAAAFgAAABYAAAAWAAAAFgAAABYAAAAWAAAAFgAAABYAAAAAAAAAAAAGAAQABgAEAAYABAAGAAQABgAEAAYABAAGAAQABgAWAAYAFgAGABYABgAEAAYAFgAIAA0ACAANAAAADQAAAA0AAAANAAAADQAAAA0ACgAFAAoABQAKAAUAAAAAAAAACQAAAAkADAAAABMAFwAOAAMADgADAAAACQATABcAAAAAAAAAAAAAAAAAAAAAAAAAAAAJAAAACQAAAAkAAgAQAAoAAAAAAAAAAAAAABkAAAABAAAACgAsAI4AAURGTFQACAAEAAAAAP//AAgAAAABAAIAAwAEAAUABgAHAAhsaWdhADJsbnVtADhzbWNwAD5zczAxAERzczAyAEpzczAzAFBzczA0AFZzczA1AFwAAAABAAEAAAABAAIAAAABAAAAAAABAAMAAAABAAQAAAABAAUAAAABAAYAAAABAAcACAASABoAIgAqADIAOgBCAEoAAQAAAAEAQAAEAAAAAQH2AAEAAAABAgAAAQAAAAECEgABAAAAAQIQAAEAAAABAg4AAQAAAAECDAABAAAAAQIOAAICEADcAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AegBtQG2AbcBuAG5AboBuwG8Ab0BvgGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAHoAbUBtgG3AbgBuQG6AbsBvAG9Ab4C9wKiAqECogKjAqMCpAKlAqYCpwKoAqkCqgKrAqwCrQ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AEwAAAREjEQ4BIyImNREzERQWMzI2NxEExLlhsHv187qMomm8ZwWw+lACYR0azvIBxv46q38cHAK4AAEAtAAABtIFsAALAAABESERMxEhETMRIREBbgH6uQH4ufniBbD65QUb+uUFG/pQBbAAAAABALT+oQdrBbAADwAAAREhETMRIREzETMDIxEhEQFuAfq5Afi5mRKm+gEFsPrlBRv65QUb+uX+DAFfBbAAAAAAAgARAAAFuAWwAAwAFQAAEyERITIWFRQGIyERIQERITI2NTQmIxECVQFo7vz97f3f/mQCVQFonJSUnAWw/ajhx8joBRv9qP3Sn355mAAAAAADALUAAAY1BbAACgATABcAAAEhMhYVFAYjIREzGQEhMjY1NCYjASMRMwFuAWju/P3t/d+5AWiclJScA1+5uQNY4cfI6AWw/RP90p9+eZj9PQWwAAACAKYAAASxBbAACgATAAABITIWFRQGIyERMxkBITI2NTQmIwFfAWju/P3t/d+5AWiclJScA1jhx8joBbD9E/3Sn355mAAAAAABALH/7AT2BcYAHwAAEzQAMzIAGQEQACMiADUzFBYzMhI9ASE1ITU0AiMiBhWxAST2+wEw/tD7+/7hubWsq8f9uwJFx6ustQPf1QES/qb+7f7//uz+qAEB46CvAQjNOJU2zgEJsKEAAAIAw//rBt4FxQAVACMAAAEQACEgABE1IxEjETMRMzUQACEgABEnNAIjIgIVERQSMzISNQbe/rv+9v7+/sbXubnXAToBAgEKAUW52ry0z8+0vdkCV/70/qABYAEMKP2BBbD9ZEQBCwFi/p7+9QLJAQb++sn+/cv++gEFzAACAGMAAARnBbAADQAWAAAhIwEuATU0JDMhESMRIQEhIgYVFBYzIQEoxQFVkJABC/UBz7r+qwFV/uujpKSdARsCbzbDktTi+lACPALeloiHowAAAAACAGH/6wQoBhEAGwApAAABMhIdARQAIyIAPQEQADc+ATUzFAYHDgEHFz4BFyIGHQEUFjMyNj0BNCYCZ9Pu/wDj5P8AAQPmhnOYsLqNwx4DRrJFlJSVlZSWlwP7/vLbGOz+3QEj7IgBSgF3KxlASrFxHhipqgJGUZXAlBin09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AABwBCAOABXf//ALYAAAR1Bx8CJgAnAAAABwBzAZoBWf//ALYAAAR1B0YCJgAnAAAABwCaAJwBXf//ALYAAAR1BwwCJgAnAAAABwBoAHYBXP///9wAAAF8ByICJgArAAAABwBC/40BXf//AMMAAAJkBx8CJgArAAAABwBzAEYBWf////IAAAJPB0YCJgArAAAABwCa/0kBXf///8wAAAJ1BwwCJgArAAAABwBo/yMBXP//ALYAAAT+B1ECJgAwAAAABwCgAPsBYP//AIL/6wUNBzcCJgAxAAAABwBCATQBcv//AIL/6wUNBzQCJgAxAAAABwBzAe4Bbv//AIL/6wUNB1sCJgAxAAAABwCaAPABcv//AIL/6wUNB2YCJgAxAAAABwCgAOoBdf//AIL/6wUNByECJgAxAAAABwBoAMoBcf//AJb/6wTXByICJgA3AAAABwBCASYBXf//AJb/6wTXBx8CJgA3AAAABwBzAeABWf//AJb/6wTXB0YCJgA3AAAABwCaAOIBXf//AJb/6wTXBwwCJgA3AAAABwBoALwBXP//AB4AAATTBx0CJgA7AAAABwBzAaABV///AHL/7APsBeACJgBDAAAABwBCAJYAG///AHL/7APsBd0CJgBDAAAABwBzAVAAF///AHL/7APsBgQCJgBDAAAABgCaUhsAAP//AHL/7APsBg8CJgBDAAAABgCgTB4AAP//AHL/7APsBcoCJgBDAAAABgBoLBoAAP//AHL/7APsBkYCJgBDAAAABwCeANMAZv//AHL/7APsBl4CJgBDAAAABwHUAOP/6///AGH+RAPyBE4CJgBFAAAABwB3AUX/9///AGL/7APpBeECJgBHAAAABwBCAJsAHP//AGL/7APpBd4CJgBHAAAABwBzAVUAGP//AGL/7APpBgUCJgBHAAAABgCaVxwAAP//AGL/7APpBcsCJgBHAAAABgBoMRsAAP///7UAAAFVBcsCJgCKAAAABwBC/2YABv//AJsAAAI9BcgCJgCKAAAABgBzHwIAAP///8sAAAIoBe8CJgCKAAAABwCa/yIABv///6UAAAJOBbUCJgCKAAAABwBo/vwABf//AJEAAAP4Bg8CJgBQAAAABgCgZR4AAP//AGD/7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CAUoBXf//AGL/7APpBeECJgBHAAAABwBCAJsAHP//AJwAAAQBBcsCJgDrAAAABwBCALsABv//AF0AAAUYBbACBgC0AAD//wBf/ikFQwQ6AgYAyAAA//8AFwAABNoHRwImARQAAAAHAKcENwFZ////+QAABAsGHwImARUAAAAHAKcD0gAx//8AYP5LCGwETgAmAFEAAAAHAFsEiAAA//8Agv5LCXQFxQAmADEAAAAHAFsFkAAA//8AUf5RBGcFxQImANYAAAAHAZwBnP+4//8AWP5SA6wETAImAOoAAAAHAZwBQ/+5//8Ag/5RBMkFxQImACUAAAAHAZwB7v+4//8AYf5RA/IETgImAEUAAAAHAZwBWP+4//8AHgAABNMFsAIGADsAAP//AC7+YAPfBDoCBgC4AAD//wDDAAABfAWwAgYAKwAA//8AGwAABygHTAImANUAAAAHAJwB+AGc//8AFQAABgQF9QImAOkAAAAHAJwBjQBF//8AwwAAAXwFsAIGACsAAP//ACcAAAUiB0wCJgAjAAAABwCcAPsBnP//AHL/7APsBgoCJgBDAAAABgCcfVoAAP//ACcAAAUiBwwCJgAjAAAABwBoAKoBXP//AHL/7APsBcoCJgBDAAAABgBoLBoAAP////IAAAdXBbACBgB/AAD//wA9/+sGfAROAgYAhAAA//8AtgAABHUHTAImACcAAAAHAJwAxwGc//8AYv/sA+kGCwImAEcAAAAHAJwAggBb//8AX//rBRAG3gImAUEAAAAHAGgAfQEu//8AYv/sA+kETwIGAJkAAP//AGL/7APpBcsCJgCZAAAABgBoMRsAAP//ABsAAAcoBwwCJgDVAAAABwBoAacBXP//ABUAAAYEBbUCJgDpAAAABwBoATwABf//AFH/6wRnByECJgDWAAAABwBoAGEBcf//AFj/7QOsBckCJgDqAAAABgBoCBkAAP//ALYAAAT+BvoCJgDXAAAABwBuAQQBSv//AJwAAAQBBaQCJgDrAAAABgBudfQAAP//ALYAAAT+BwwCJgDXAAAABwBoAOABXP//AJwAAAQBBbUCJgDrAAAABgBoUQUAAP//AIL/6wUNByECJgAxAAAABwBoAMoBcf//AGD/7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AAAAAAAAAAAAAAFAAAAAAAOABIAAAAOABUAAAAYAAAACwAAAAgAAAACAAAAAAALAAgACwAAAAAAAAAAAAAAAAAcAAAAAAAQABEAAAAAAAAAAAAAAAAABQAAAAAABQAKABIAGgAVABgACAAYABUAAgAWABUAGAAbAAAAAAAAABgAAgAJAAAACQAAAAkAAAAOAAIABwAHAAAAAAAAAAcAAAAYABEAGgAFAAAAAAAAAAAAFQAYAAAAAAANAAIAFQAFAAAAAAAFABUADgACAAAAEgAWAAAAEQAaABEAGgAAAAAAAAAVAAAAFQAVABIAFgAAAAAAAAAYAAAAGAAFAAgABQAVAAUACAAAAAAAEAACABAAAgAQAAIADwADAAAAGAASABYAFQABAAQAEQAaABEAGgARABoAEQAaABEAGgARABoAEQAaABEAGgARABoAEQAaABEAGgARABoAAAAVAAAAFQAAABUAAAAVAAAAFQAAABUAAAAVAAAAFQAAAAAAAAAAAAUACAAFAAgABQAIAAUACAAFAAgABQAIAAUACAAFABUABQAVAAUAFQAFAAgABQAVAAYACwAGAAsAAAALAAAACwAAAAsAAAALAAAACwAOAAIADgACAA4AAgAAAAAAAAAYAAAAGAAKAAAAEgAWAA8AAwAPAAMAAAAYABIAFgAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAYAAAAGAABAAQADgAAAAAAAAAAAAAAFwABAAAACgAsAI4AAURGTFQACAAEAAAAAP//AAgAAAABAAIAAwAEAAUABgAHAAhsaWdhADJsbnVtADhzbWNwAD5zczAxAERzczAyAEpzczAzAFBzczA0AFZzczA1AFwAAAABAAEAAAABAAIAAAABAAAAAAABAAMAAAABAAQAAAABAAUAAAABAAYAAAABAAcACAASABoAIgAqADIAOgBCAEoAAQAAAAEAQAAEAAAAAQH2AAEAAAABAgAAAQAAAAECEgABAAAAAQIQAAEAAAABAg4AAQAAAAECDAABAAAAAQIOAAICEADcAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AegBtQG2AbcBuAG5AboBuwG8Ab0BvgGmAacBqAGpAao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mZgABAGxmZgAGAAAAAAABAC9mZgABAKGZmgAGAAAAAAABADIAAAABAFoAAAAGAAAAAAABADUAAAABAC0AAAAGAAAAAAABOEJJTQP4AAAAAABwAAD/////////////////////////////A+gAAAAA/////////////////////////////wPoAAAAAP////////////////////////////8D6AAAAAD/////////////////////////////A+gAADhCSU0EAAAAAAAAAgABOEJJTQQCAAAAAAAEAAAAADhCSU0EMAAAAAAAAgEBOEJJTQQtAAAAAAAGAAEAAAACOEJJTQQIAAAAAAAQAAAAAQAAAkAAAAJAAAAAADhCSU0EHgAAAAAABAAAAAA4QklNBBoAAAAAA0sAAAAGAAAAAAAAAAAAAAE2AAACtwAAAAsAQgBlAHoAIABuAGEAegB3AHkALQAxAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAK3AAABNgAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABAAAAABAAAAAAAAbnVsbAAAAAIAAAAGYm91bmRzT2JqYwAAAAEAAAAAAABSY3QxAAAABAAAAABUb3AgbG9uZwAAAAAAAAAATGVmdGxvbmcAAAAAAAAAAEJ0b21sb25nAAABNgAAAABSZ2h0bG9uZwAAArcAAAAGc2xpY2VzVmxMcwAAAAFPYmpjAAAAAQAAAAAABXNsaWNlAAAAEgAAAAdzbGljZUlEbG9uZwAAAAAAAAAHZ3JvdXBJRGxvbmcAAAAAAAAABm9yaWdpbmVudW0AAAAMRVNsaWNlT3JpZ2luAAAADWF1dG9HZW5lcmF0ZWQAAAAAVHlwZWVudW0AAAAKRVNsaWNlVHlwZQAAAABJbWcgAAAABmJvdW5kc09iamMAAAABAAAAAAAAUmN0MQAAAAQAAAAAVG9wIGxvbmcAAAAAAAAAAExlZnRsb25nAAAAAAAAAABCdG9tbG9uZwAAATYAAAAAUmdodGxvbmcAAAK3AAAAA3VybFRFWFQAAAABAAAAAAAAbnVsbFRFWFQAAAABAAAAAAAATXNnZVRFWFQAAAABAAAAAAAGYWx0VGFnVEVYV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JBZG9iZSBQaG90b3Nob3AgQ1M1LjEgTWFjaW50b3NoIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDowMjgwMTE3NDA3MjA2ODExODcxRjgxMzFGQjZFNjg5OCIgc3RFdnQ6d2hlbj0iMjAxNC0wMy0xOVQwMzowMjoyNiswMTowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPD94cGFja2V0IGVuZD0idyI/Pv/iDFhJQ0NfUFJPRklMRQABAQAADEhMaW5vAhAAAG1udHJSR0IgWFlaIAfOAAIACQAGADEAAGFjc3BNU0ZUAAAAAElFQyBzUkdCAAAAAAAAAAAAAAABAAD21gABAAAAANMtSFAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEWNwcnQAAAFQAAAAM2Rlc2MAAAGEAAAAbHd0cHQAAAHwAAAAFGJrcHQAAAIEAAAAFHJYWVoAAAIYAAAAFGdYWVoAAAIsAAAAFGJYWVoAAAJAAAAAFGRtbmQAAAJUAAAAcGRtZGQAAALEAAAAiHZ1ZWQAAANMAAAAhnZpZXcAAAPUAAAAJGx1bWkAAAP4AAAAFG1lYXMAAAQMAAAAJHRlY2gAAAQwAAAADHJUUkMAAAQ8AAAIDGdUUkMAAAQ8AAAIDGJUUkMAAAQ8AAAIDHRleHQAAAAAQ29weXJpZ2h0IChjKSAxOTk4IEhld2xldHQtUGFja2FyZCBDb21wYW55AABkZXNjAAAAAAAAABJzUkdCIElFQzYxOTY2LTIuMQAAAAAAAAAAAAAAEnNSR0IgSUVDNjE5NjY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TpTpkJBI4lCdL43C/GFkK/FzDGg79skFNqEolChWYNIKVdeVCe9BTbHZiqypKQtXoApKkh6Up0ag6fPAeagd7cf1urFKenQhweXTx33/AONsI5p3f//Z" -},function(){function a(a,b){b=b||"";for(var c=1024,d=window.atob(a),e=[],f=0,g=d.length;g>f;f+=c){for(var h=d.slice(f,f+c),i=new Array(h.length),j=0;j=b.toIndex&&(b.toIndex+=1),e.$apply(function(){d.apply(i(),[b.fromIndex,b.toIndex])}),g.api.draggableRows.raise.rowDropped(b,this),void c.preventDefault())}};h.addEventListener("dragover",j.onDragOverEventListener,!1),h.addEventListener("dragstart",j.onDragStartEventListener,!1),h.addEventListener("dragleave",j.onDragLeaveEventListener,!1),h.addEventListener("dragenter",j.onDragEnterEventListener,!1),h.addEventListener("dragend",j.onDragEndEventListener,!1),h.addEventListener("drop",j.onDropEventListener)}}]).directive("uiGridDraggableRow",["uiGridDraggableRowService",function(a){return{restrict:"ACE",scope:{grid:"="},compile:function(){return{pre:function(b,c){a.prepareDraggableRow(b,c)}}}}}]).directive("uiGridDraggableRows",["uiGridDraggableRowsService",function(a){return{restrict:"A",replace:!0,priority:0,require:"uiGrid",scope:!1,compile:function(){return{pre:function(b,c,d,e){a.initializeGrid(e.grid,b,c)}}}}}])}(),function(a,b){"object"==typeof module&&module.exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return m[e]||(k.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",k.cssRules.length),m[e]=1),e}function d(a,b){var c,d,e=a.style;if(b=b.charAt(0).toUpperCase()+b.slice(1),void 0!==e[b])return b;for(d=0;d',c)}k.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.scale*d.width,left:d.scale*d.radius,top:-d.scale*d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.scale*(d.length+d.width),k=2*d.scale*j,l=-(d.width+d.length)*d.scale*2+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;ka&&(d="-",a=-a),a=""+a;a.lengtha;a++)if(m[a]===d){m.splice(a,1),h(-1,c,"");break}}return!e&&p&&p.then&&p.then(i),d}var t=new i,u=l[0],v=!1;if(u&&u.match(a,f)){if(!u.matchData(g))throw new Error("Expected "+u+" with different data\nEXPECTED: "+r(u.data)+"\nGOT: "+g);if(!u.matchHeaders(j))throw new Error("Expected "+u+" with different headers\nEXPECTED: "+r(u.headers)+"\nGOT: "+r(j));if(l.shift(),u.response)return void m.push(s(u));v=!0}for(var w,x=-1;w=k[++x];)if(w.match(a,f,g,j||{})){if(w.response)(e?e.defer:n)(s(w));else{if(!w.passThrough)throw new Error("No response defined !");d(a,f,g,h,j,p,q)}return}throw v?new Error("No response defined !"):new Error("Unexpected request: "+a+" "+f+"\n"+(u?"Expected "+u:"No more request expected"))}function j(a){b.forEach(["GET","DELETE","JSONP"],function(b){g[a+b]=function(d,e){return g[a](b,d,c,e)}}),b.forEach(["PUT","POST","PATCH"],function(b){g[a+b]=function(c,d,e){return g[a](b,c,d,e)}})}var k=[],l=[],m=[],n=b.bind(m,m.push),o=b.copy;return g.when=function(a,b,c,d){var g=new h(a,b,c,d),i={respond:function(a,b,c,d){g.response=f(a,b,c,d)}};return e&&(i.passThrough=function(){g.passThrough=!0}),k.push(g),i},j("when"),g.expect=function(a,b,c,d){var e=new h(a,b,c,d);return l.push(e),{respond:function(a,b,c,d){e.response=f(a,b,c,d)}}},j("expect"),g.flush=function(c){if(a.$digest(),!m.length)throw new Error("No pending request to flush !");if(b.isDefined(c))for(;c--;){if(!m.length)throw new Error("No more pending request to flush !");m.shift()()}else for(;m.length;)m.shift()();g.verifyNoOutstandingExpectation()},g.verifyNoOutstandingExpectation=function(){if(a.$digest(),l.length)throw new Error("Unsatisfied requests: "+l.join(", "))},g.verifyNoOutstandingRequest=function(){if(m.length)throw new Error("Unflushed requests: "+m.length)},g.resetExpectations=function(){l.length=0,m.length=0},g}function h(a,c,d,e){this.data=d,this.headers=e,this.match=function(c,d,e,f){return a!=c?!1:this.matchUrl(d)?b.isDefined(e)&&!this.matchData(e)?!1:!b.isDefined(f)||this.matchHeaders(f):!1},this.matchUrl=function(a){return c?b.isFunction(c.test)?c.test(a):c==a:!0},this.matchHeaders=function(a){return b.isUndefined(e)?!0:b.isFunction(e)?e(a):b.equals(e,a)},this.matchData=function(a){return b.isUndefined(d)?!0:d&&b.isFunction(d.test)?d.test(a):d&&b.isFunction(d)?d(a):d&&!b.isString(d)?b.equals(d,b.fromJson(a)):d==a},this.toString=function(){return a+" "+c}}function i(){i.$$lastInstance=this,this.open=function(a,b,c){this.$$method=a,this.$$url=b,this.$$async=c,this.$$reqHeaders={},this.$$respHeaders={}},this.send=function(a){this.$$data=a},this.setRequestHeader=function(a,b){this.$$reqHeaders[a]=b},this.getResponseHeader=function(a){var d=this.$$respHeaders[a];return d?d:(a=b.lowercase(a),(d=this.$$respHeaders[a])?d:(d=c,b.forEach(this.$$respHeaders,function(c,e){d||b.lowercase(e)!=a||(d=c)}),d))},this.getAllResponseHeaders=function(){var a=[];return b.forEach(this.$$respHeaders,function(b,c){a.push(c+": "+b)}),a.join("\n")},this.abort=b.noop}b.mock={},b.mock.$BrowserProvider=function(){this.$get=function(){return new b.mock.$Browser}},b.mock.$Browser=function(){var a=this;this.isMock=!0,a.$$url="http://server/",a.$$lastUrl=a.$$url,a.pollFns=[],a.$$completeOutstandingRequest=b.noop,a.$$incOutstandingRequestCount=b.noop,a.onUrlChange=function(b){return a.pollFns.push(function(){a.$$lastUrl!=a.$$url&&(a.$$lastUrl=a.$$url,b(a.$$url))}),b},a.cookieHash={},a.lastCookieHash={},a.deferredFns=[],a.deferredNextId=0,a.defer=function(b,c){return c=c||0,a.deferredFns.push({time:a.defer.now+c,fn:b,id:a.deferredNextId}),a.deferredFns.sort(function(a,b){return a.time-b.time}),a.deferredNextId++},a.defer.now=0,a.defer.cancel=function(d){var e;return b.forEach(a.deferredFns,function(a,b){a.id===d&&(e=b)}),e!==c?(a.deferredFns.splice(e,1),!0):!1},a.defer.flush=function(c){if(b.isDefined(c))a.defer.now+=c;else{if(!a.deferredFns.length)throw new Error("No deferred tasks to be flushed");a.defer.now=a.deferredFns[a.deferredFns.length-1].time}for(;a.deferredFns.length&&a.deferredFns[0].time<=a.defer.now;)a.deferredFns.shift().fn()},a.$$baseHref="",a.baseHref=function(){return this.$$baseHref}},b.mock.$Browser.prototype={poll:function(){b.forEach(this.pollFns,function(a){a()})},addPollFn:function(a){return this.pollFns.push(a),a},url:function(a,b){return a?(this.$$url=a,this):this.$$url},cookies:function(a,c){return a?void(b.isUndefined(c)?delete this.cookieHash[a]:b.isString(c)&&c.length<=4096&&(this.cookieHash[a]=c)):(b.equals(this.cookieHash,this.lastCookieHash)||(this.lastCookieHash=b.copy(this.cookieHash),this.cookieHash=b.copy(this.cookieHash)),this.cookieHash)},notifyWhenNoOutstandingRequests:function(a){a()}},b.mock.$ExceptionHandlerProvider=function(){var a;this.mode=function(b){switch(b){case"rethrow":a=function(a){throw a};break;case"log":var c=[];a=function(a){1==arguments.length?c.push(a):c.push([].slice.call(arguments,0))},a.errors=c;break;default:throw new Error("Unknown mode '"+b+"', only 'log'/'rethrow' modes are allowed!")}},this.$get=function(){return a},this.mode("rethrow")},b.mock.$LogProvider=function(){function a(a,b,c){return a.concat(Array.prototype.slice.call(b,c))}var c=!0;this.debugEnabled=function(a){return b.isDefined(a)?(c=a,this):c},this.$get=function(){var d={log:function(){d.log.logs.push(a([],arguments,0))},warn:function(){d.warn.logs.push(a([],arguments,0))},info:function(){d.info.logs.push(a([],arguments,0))},error:function(){d.error.logs.push(a([],arguments,0))},debug:function(){c&&d.debug.logs.push(a([],arguments,0))}};return d.reset=function(){d.log.logs=[],d.info.logs=[],d.warn.logs=[],d.error.logs=[],d.debug.logs=[]},d.assertEmpty=function(){var a=[];if(b.forEach(["error","warn","info","log","debug"],function(c){b.forEach(d[c].logs,function(d){b.forEach(d,function(b){a.push("MOCK $log ("+c+"): "+String(b)+"\n"+(b.stack||""))})})}),a.length)throw a.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or an expected log message was not checked and removed:"),a.push(""),new Error(a.join("\n---------\n"))},d.reset(),d}},b.mock.$IntervalProvider=function(){this.$get=["$rootScope","$q",function(a,d){var e=[],f=0,g=0,h=function(h,i,j,k){function l(){if(m.notify(o++),j>0&&o>=j){var d;m.resolve(o),b.forEach(e,function(a,b){a.id===n.$$intervalId&&(d=b)}),d!==c&&e.splice(d,1)}p||a.$apply()}var m=d.defer(),n=m.promise,o=0,p=b.isDefined(k)&&!k;return j=b.isDefined(j)?j:0,n.then(null,null,h),n.$$intervalId=f,e.push({nextTime:g+i,delay:i,fn:l,id:f,deferred:m}),e.sort(function(a,b){return a.nextTime-b.nextTime}),f++,n};return h.cancel=function(a){if(!a)return!1;var d;return b.forEach(e,function(b,c){b.id===a.$$intervalId&&(d=c)}),d!==c?(e[d].deferred.reject("canceled"),e.splice(d,1),!0):!1},h.flush=function(a){for(g+=a;e.length&&e[0].nextTime<=g;){var b=e[0];b.fn(),b.nextTime+=b.delay,e.sort(function(a,b){return a.nextTime-b.nextTime})}return a},h}]};var j=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;if(b.mock.TzDate=function(a,c){var e=new Date(0);if(b.isString(c)){var g=c;if(e.origDate=d(c),c=e.origDate.getTime(),isNaN(c))throw{name:"Illegal Argument",message:"Arg '"+g+"' passed into TzDate constructor is not a valid date string"}}else e.origDate=new Date(c);var h=new Date(c).getTimezoneOffset();e.offsetDiff=60*h*1e3-1e3*a*60*60,e.date=new Date(c+e.offsetDiff),e.getTime=function(){return e.date.getTime()-e.offsetDiff},e.toLocaleDateString=function(){return e.date.toLocaleDateString()},e.getFullYear=function(){return e.date.getFullYear()},e.getMonth=function(){return e.date.getMonth()},e.getDate=function(){return e.date.getDate()},e.getHours=function(){return e.date.getHours()},e.getMinutes=function(){return e.date.getMinutes()},e.getSeconds=function(){return e.date.getSeconds()},e.getMilliseconds=function(){return e.date.getMilliseconds()},e.getTimezoneOffset=function(){return 60*a},e.getUTCFullYear=function(){return e.origDate.getUTCFullYear()},e.getUTCMonth=function(){return e.origDate.getUTCMonth()},e.getUTCDate=function(){return e.origDate.getUTCDate()},e.getUTCHours=function(){return e.origDate.getUTCHours()},e.getUTCMinutes=function(){return e.origDate.getUTCMinutes()},e.getUTCSeconds=function(){return e.origDate.getUTCSeconds()},e.getUTCMilliseconds=function(){return e.origDate.getUTCMilliseconds()},e.getDay=function(){return e.date.getDay()},e.toISOString&&(e.toISOString=function(){return f(e.origDate.getUTCFullYear(),4)+"-"+f(e.origDate.getUTCMonth()+1,2)+"-"+f(e.origDate.getUTCDate(),2)+"T"+f(e.origDate.getUTCHours(),2)+":"+f(e.origDate.getUTCMinutes(),2)+":"+f(e.origDate.getUTCSeconds(),2)+"."+f(e.origDate.getUTCMilliseconds(),3)+"Z"});var i=["getUTCDay","getYear","setDate","setFullYear","setHours","setMilliseconds","setMinutes","setMonth","setSeconds","setTime","setUTCDate","setUTCFullYear","setUTCHours","setUTCMilliseconds","setUTCMinutes","setUTCMonth","setUTCSeconds","setYear","toDateString","toGMTString","toJSON","toLocaleFormat","toLocaleString","toLocaleTimeString","toSource","toString","toTimeString","toUTCString","valueOf"];return b.forEach(i,function(a){e[a]=function(){throw new Error("Method '"+a+"' is not implemented in the TzDate mock")}}),e},b.mock.TzDate.prototype=Date.prototype,b.mock.animate=b.module("ngAnimateMock",["ng"]).config(["$provide",function(a){var c=[];a.value("$$animateReflow",function(a){var b=c.length;return c.push(a),function(){c.splice(b,1)}}),a.decorator("$animate",["$delegate","$$asyncCallback",function(a,d){var e={queue:[],enabled:a.enabled,triggerCallbacks:function(){d.flush()},triggerReflow:function(){b.forEach(c,function(a){a()}),c=[]}};return b.forEach(["enter","leave","move","addClass","removeClass","setClass"],function(b){e[b]=function(){e.queue.push({event:b,element:arguments[0],args:arguments}),a[b].apply(a,arguments)}}),e}])}]),b.mock.dump=function(a){function c(a){var e;return b.isElement(a)?(a=b.element(a),e=b.element("
            "),b.forEach(a,function(a){e.append(b.element(a).clone())}),e=e.html()):b.isArray(a)?(e=[],b.forEach(a,function(a){e.push(c(a))}),e="[ "+e.join(", ")+" ]"):e=b.isObject(a)?b.isFunction(a.$eval)&&b.isFunction(a.$apply)?d(a):a instanceof Error?a.stack||""+a.name+": "+a.message:b.toJson(a,!0):String(a),e}function d(a,c){c=c||" ";var e=[c+"Scope("+a.$id+"): {"];for(var f in a)Object.prototype.hasOwnProperty.call(a,f)&&!f.match(/^(\$|this)/)&&e.push(" "+f+": "+b.toJson(a[f]));for(var g=a.$$childHead;g;)e.push(d(g,c+" ")),g=g.$$nextSibling;return e.push("}"),e.join("\n"+c)}return c(a)},b.mock.$HttpBackendProvider=function(){this.$get=["$rootScope",g]},b.mock.$TimeoutDecorator=function(a,c){function d(a){var c=[];return b.forEach(a,function(a){c.push("{id: "+a.id+", time: "+a.time+"}")}),c.join(", ")}return a.flush=function(a){c.defer.flush(a)},a.verifyNoPendingTasks=function(){if(c.deferredFns.length)throw new Error("Deferred tasks to flush ("+c.deferredFns.length+"): "+d(c.deferredFns))},a},b.mock.$RAFDecorator=function(a){var b=[],c=function(a){var c=b.length;return b.push(a),function(){b.splice(c,1)}};return c.supported=a.supported,c.flush=function(){if(0===b.length)throw new Error("No rAF callbacks present");for(var a=b.length,c=0;a>c;c++)b[c]();b=[]},c},b.mock.$AsyncCallbackDecorator=function(a){var c=[],d=function(a){c.push(a)};return d.flush=function(){b.forEach(c,function(a){a()}),c=[]},d},b.mock.$RootElementProvider=function(){this.$get=function(){return b.element("
            ")}},b.module("ngMock",["ng"]).provider({$browser:b.mock.$BrowserProvider,$exceptionHandler:b.mock.$ExceptionHandlerProvider,$log:b.mock.$LogProvider,$interval:b.mock.$IntervalProvider,$httpBackend:b.mock.$HttpBackendProvider,$rootElement:b.mock.$RootElementProvider}).config(["$provide",function(a){a.decorator("$timeout",b.mock.$TimeoutDecorator),a.decorator("$$rAF",b.mock.$RAFDecorator),a.decorator("$$asyncCallback",b.mock.$AsyncCallbackDecorator)}]),b.module("ngMockE2E",["ng"]).config(["$provide",function(a){a.decorator("$httpBackend",b.mock.e2e.$httpBackendDecorator)}]),b.mock.e2e={},b.mock.e2e.$httpBackendDecorator=["$rootScope","$delegate","$browser",g],b.mock.clearDataCache=function(){var a,c=b.element.cache;for(a in c)if(Object.prototype.hasOwnProperty.call(c,a)){var d=c[a].handle;d&&b.element(d.elem).off(),delete c[a]}},a.jasmine||a.mocha){var k=null,l=function(){return!!k};(a.beforeEach||a.setup)(function(){k=this}),(a.afterEach||a.teardown)(function(){var a=k.$injector;k.$injector=null,k.$modules=null,k=null,a&&(a.get("$rootElement").off(),a.get("$browser").pollFns.length=0),b.mock.clearDataCache(),b.forEach(b.element.fragments,function(a,c){delete b.element.fragments[c]}),i.$$lastInstance=null,b.forEach(b.callbacks,function(a,c){delete b.callbacks[c]}),b.callbacks.counter=0}),a.module=b.mock.module=function(){function a(){if(k.$injector)throw new Error("Injector already created, can not register a module!");var a=k.$modules||(k.$modules=[]);b.forEach(c,function(c){b.isObject(c)&&!b.isArray(c)?a.push(function(a){b.forEach(c,function(b,c){a.value(c,b)})}):a.push(c)})}var c=Array.prototype.slice.call(arguments,0);return l()?a():a};var m=function(a,b){this.message=a.message,this.name=a.name,a.line&&(this.line=a.line),a.sourceId&&(this.sourceId=a.sourceId),a.stack&&b&&(this.stack=a.stack+"\n"+b.stack),a.stackArray&&(this.stackArray=a.stackArray)};m.prototype.toString=Error.prototype.toString,a.inject=b.mock.inject=function(){function a(){var a=k.$modules||[];a.unshift("ngMock"),a.unshift("ng");var e=k.$injector;e||(e=k.$injector=b.injector(a));for(var f=0,g=c.length;g>f;f++)try{e.invoke(c[f]||b.noop,this)}catch(h){if(h.stack&&d)throw new m(h,d);throw h}finally{d=null}}var c=Array.prototype.slice.call(arguments,0),d=new Error("Declaration Location");return l()?a.call(k):a}}}(window,window.angular),function(){var a;a=function(a,b){var c,d;for(c in a)d=a[c],"$$hashKey"!==c&&(b[c]=d)},angular.module("builder.controller",["builder.provider"]).controller("fbFormObjectEditableController",["$scope","$injector",function(b,c){var d;return d=c.get("$builder"),b.setupScope=function(c){var e;return a(c,b),b.optionsText=c.options.join("\n"),b.$watch("[label, description, placeholder, required, options, validation]",function(){return c.label=b.label,c.description=b.description,c.placeholder=b.placeholder,c.required=b.required,c.options=b.options,c.validation=b.validation},!0),b.$watch("optionsText",function(a){var c;return b.options=function(){var b,d,e,f;for(e=a.split("\n"),f=[],b=0,d=e.length;d>b;b++)c=e[b],c.length>0&&f.push(c);return f}(),b.inputText=b.options[0]}),e=d.components[c.component],b.validationOptions=e.validationOptions},b.data={model:null,backup:function(){return this.model={label:b.label,description:b.description,placeholder:b.placeholder,required:b.required,optionsText:b.optionsText,validation:b.validation}},rollback:function(){return this.model?(b.label=this.model.label,b.description=this.model.description,b.placeholder=this.model.placeholder,b.required=this.model.required,b.optionsText=this.model.optionsText,b.validation=this.model.validation):void 0}}}]).controller("fbComponentsController",["$scope","$injector",function(a,b){var c;return c=b.get("$builder"),a.selectGroup=function(b,d){var e,f,g,h;null!=b&&b.preventDefault(),a.activeGroup=d,a.components=[],g=c.components,h=[];for(f in g)e=g[f],e.group===d&&h.push(a.components.push(e));return h},a.groups=c.groups,a.activeGroup=a.groups[0],a.allComponents=c.components,a.$watch("allComponents",function(){return a.selectGroup(null,a.activeGroup)})}]).controller("fbComponentController",["$scope",function(b){return b.copyObjectToScope=function(c){return a(c,b)}}]).controller("fbFormController",["$scope","$injector",function(a,b){var c,d;return c=b.get("$builder"),d=b.get("$timeout"),null==a.input&&(a.input=[]),a.$watch("form",function(){return a.input.length>a.form.length&&a.input.splice(a.form.length),d(function(){return a.$broadcast(c.broadcastChannel.updateInput)})},!0)}]).controller("fbFormObjectController",["$scope","$injector",function(b,c){var d;return d=c.get("$builder"),b.copyObjectToScope=function(c){return a(c,b)},b.updateInput=function(a){var c;return c={id:b.formObject.id,label:b.formObject.label,value:null!=a?a:""},b.$parent.input.splice(b.$index,1,c)}}])}.call(this),function(){angular.module("builder.directive",["builder.provider","builder.controller","builder.drag","validator"]).directive("fbBuilder",["$injector",function(a){var b,c;return b=a.get("$builder"),c=a.get("$drag"),{restrict:"A",scope:{fbBuilder:"="},template:"
            \n
            \n
            ",link:function(a,d,e){var f,g,h;return a.formName=e.fbBuilder,null==(g=b.forms)[h=a.formName]&&(g[h]=[]),a.formObjects=b.forms[a.formName],f=!0,$(d).addClass("fb-builder"),c.droppable($(d),{move:function(a){var b,c,e,g,h,i,j,k,l,m,n;if(f&&($("div.fb-form-object-editable").popover("hide"),f=!1),e=$(d).find(".fb-form-object-editable:not(.empty,.dragging)"),0===e.length)return void(0===$(d).find(".fb-form-object-editable.empty").length&&$(d).find(">div:first").append($("
            ")));for(j=[],j.push(-1e3),h=k=0,m=e.length;m>k;h=k+=1)c=$(e[h]),i=c.offset(),g=c.height(),j.push(i.top+g/2);for(j.push(j[j.length-1]+1e3),h=l=1,n=j.length;n>l;h=l+=1)if(a.pageY>j[h-1]&&a.pageY<=j[h]){$(d).find(".empty").remove(),b=$("
            "),h-1l&&k--,b.updateFormObjectIndex(a.formName,l,k))):(j=i.object.formObject,j.editable&&b.removeFormObject(e.fbBuilder,j.index)),$(d).find(".empty").remove()):void $(d).find(".empty").remove()}})}}}]).directive("fbFormObjectEditable",["$injector",function(a){var b,c,d,e;return b=a.get("$builder"),d=a.get("$drag"),c=a.get("$compile"),e=a.get("$validator"),{restrict:"A",controller:"fbFormObjectEditableController",scope:{formObject:"=fbFormObjectEditable"},link:function(a,f){var g;return a.inputArray=[],a.$component=b.components[a.formObject.component],a.setupScope(a.formObject),a.$watch("$component.template",function(b){var d;if(b)return d=c(b)(a),$(f).html(d)}),$(f).on("click",function(){return!1}),d.draggable($(f),{object:{formObject:a.formObject}}),a.formObject.editable?(g={},a.$watch("$component.popoverTemplate",function(b){return b?($(f).removeClass(g.id),g={id:"fb-"+Math.random().toString().substr(2),isClickedSave:!1,view:null,html:b},g.html=$(g.html).addClass(g.id),g.view=c(g.html)(a),$(f).addClass(g.id),$(f).popover({html:!0,title:a.$component.label,content:g.view,container:"body"})):void 0}),a.popover={save:function(b){b.preventDefault(),e.validate(a).success(function(){return g.isClickedSave=!0,$(f).popover("hide")})},remove:function(c){c.preventDefault(),b.removeFormObject(a.$parent.formName,a.$parent.$index),$(f).popover("hide")},shown:function(){return a.data.backup(),g.isClickedSave=!1},cancel:function(b){a.data.rollback(),b&&(b.preventDefault(),$(f).popover("hide"))}},$(f).on("show.bs.popover",function(){var a,b,c;return d.isMouseMoved()?!1:($("div.fb-form-object-editable:not(."+g.id+")").popover("hide"),a=$("form."+g.id).closest(".popover"),a.length>0?(b=$(f).offset().top+$(f).height()/2,c=b-a.height()/2,a.css({position:"absolute",top:c}),a.show(),setTimeout(function(){return a.addClass("in"),$(f).triggerHandler("shown.bs.popover")},0),!1):void 0)}),$(f).on("shown.bs.popover",function(){$(".popover ."+g.id+" input:first").select(),a.$apply(function(){return a.popover.shown()})}),$(f).on("hide.bs.popover",function(){var b;return b=$("form."+g.id).closest(".popover"),g.isClickedSave||(a.$$phase||a.$root.$$phase?a.popover.cancel():a.$apply(function(){return a.popover.cancel()})),b.removeClass("in"),setTimeout(function(){return b.hide()},300),!1})):void 0}}}]).directive("fbComponents",function(){return{restrict:"A",template:'\n
            \n
            \n
            ',controller:"fbComponentsController"}}).directive("fbComponent",["$injector",function(a){var b,c,d;return b=a.get("$builder"),d=a.get("$drag"),c=a.get("$compile"),{restrict:"A",scope:{component:"=fbComponent"},controller:"fbComponentController",link:function(a,b){return a.copyObjectToScope(a.component),d.draggable($(b),{ -mode:"mirror",defer:!1,object:{componentName:a.component.name}}),a.$watch("component.template",function(d){var e;if(d)return e=c(d)(a),$(b).html(e)})}}}]).directive("fbForm",["$injector",function(a){return{restrict:"A",require:"ngModel",scope:{formName:"@fbForm",input:"=ngModel","default":"=fbDefault"},template:'
            ',controller:"fbFormController",link:function(b,c,d){var e,f,g;return e=a.get("$builder"),null==(f=e.forms)[g=b.formName]&&(f[g]=[]),b.form=e.forms[b.formName]}}}]).directive("fbFormObject",["$injector",function(a){var b,c,d;return b=a.get("$builder"),c=a.get("$compile"),d=a.get("$parse"),{restrict:"A",controller:"fbFormObjectController",link:function(a,e,f){return a.formObject=d(f.fbFormObject)(a),a.$component=b.components[a.formObject.component],a.$on(b.broadcastChannel.updateInput,function(){return a.updateInput(a.inputText)}),a.$component.arrayToText&&(a.inputArray=[],a.$watch("inputArray",function(b,c){var d,e;if(b!==c){d=[];for(e in a.inputArray)a.inputArray[e]&&d.push(a.options[e]);return a.inputText=d.join(", ")}},!0)),a.$watch("inputText",function(){return a.updateInput(a.inputText)}),a.$watch(f.fbFormObject,function(){return a.copyObjectToScope(a.formObject)},!0),a.$watch("$component.template",function(b){var d,f,g;if(b)return f=$(b),d=f.find("[ng-model='inputText']"),d.attr({validator:"{{validation}}"}),g=c(f)(a),$(e).html(g)}),!a.$component.arrayToText&&a.formObject.options.length>0&&(a.inputText=a.formObject.options[0]),a.$watch("default["+a.formObject.id+"]",function(b){return b?a.$component.arrayToText?a.inputArray=b:a.inputText=b:void 0})}}}])}.call(this),function(){angular.module("builder.drag",[]).provider("$drag",function(){var a,b,c;a=null,b=null,this.data={draggables:{},droppables:{}},this.mouseMoved=!1,this.isMouseMoved=function(a){return function(){return a.mouseMoved}}(this),this.hooks={down:{},move:{},up:{}},this.eventMouseMove=function(){},this.eventMouseUp=function(){},$(function(a){return function(){return $(document).on("mousedown",function(b){var c,d,e;a.mouseMoved=!1,e=a.hooks.down;for(d in e)(c=e[d])(b)}),$(document).on("mousemove",function(b){var c,d,e;a.mouseMoved=!0,e=a.hooks.move;for(d in e)(c=e[d])(b)}),$(document).on("mouseup",function(b){var c,d,e;e=a.hooks.up;for(d in e)(c=e[d])(b)})}}(this)),this.currentId=0,this.getNewId=function(a){return function(){return""+a.currentId++}}(this),this.setupEasing=function(){return jQuery.extend(jQuery.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}})},this.setupProviders=function(c){return a=c,b=a.get("$rootScope")},this.isHover=function(a){return function(a,b){var c,d,e,f,g;return d=a.offset(),e=b.offset(),f={width:a.width(),height:a.height()},g={width:b.width(),height:b.height()},c={x:!1,y:!1},c.x=d.left>e.left&&d.lefte.left&&d.left+f.widthe.top&&d.tope.top&&d.top+f.height$(window).innerHeight()-50))return a.autoScroll.up=!1,a.autoScroll.down=!1;if(a.autoScroll.up=!1,a.autoScroll.down=!0,!a.autoScroll.scrolling)return a.autoScroll.scroll()}}}(this),stop:function(a){return function(){return a.autoScroll.up=!1,a.autoScroll.down=!1}}(this)},this.dragMirrorMode=function(a){return function(b,c,d){var e;return null==c&&(c=!0),e={id:a.getNewId(),mode:"mirror",maternal:b[0],element:null,object:d},b.on("mousedown",function(d){var f;return d.preventDefault(),f=b.clone(),e.element=f[0],f.addClass("fb-draggable form-horizontal prepare-dragging"),a.hooks.move.drag=function(c,d){var g,h,i,j;if(!f.hasClass("prepare-dragging")||(f.css({width:b.width(),height:b.height()}),f.removeClass("prepare-dragging"),f.addClass("dragging"),!d)){f.offset({left:c.pageX-f.width()/2,top:c.pageY-f.height()/2}),a.autoScroll.start(c),i=a.data.droppables,j=[];for(h in i)g=i[h],a.isHover(f,$(g.element))?j.push(g.move(c,e)):j.push(g.out(c,e));return j}},a.hooks.up.drag=function(b){var c,d,g,h;h=a.data.droppables;for(d in h)c=h[d],g=a.isHover(f,$(c.element)),c.up(b,g,e);return delete a.hooks.move.drag,delete a.hooks.up.drag,e.element=null,f.remove(),a.autoScroll.stop()},$("body").append(f),c?void 0:a.hooks.move.drag(d,c)}),e}}(this),this.dragDragMode=function(a){return function(b,c,d){var e;return null==c&&(c=!0),e={id:a.getNewId(),mode:"drag",maternal:null,element:b[0],object:d},b.addClass("fb-draggable"),b.on("mousedown",function(d){return d.preventDefault(),b.hasClass("dragging")?void 0:(b.addClass("prepare-dragging"),a.hooks.move.drag=function(c,d){var f,g,h;if(!b.hasClass("prepare-dragging")||(b.css({width:b.width(),height:b.height()}),b.removeClass("prepare-dragging"),b.addClass("dragging"),!d)){b.offset({left:c.pageX-b.width()/2,top:c.pageY-b.height()/2}),a.autoScroll.start(c),h=a.data.droppables;for(g in h)f=h[g],a.isHover(b,$(f.element))?f.move(c,e):f.out(c,e)}},a.hooks.up.drag=function(c){var d,f,g,h;h=a.data.droppables;for(f in h)d=h[f],g=a.isHover(b,$(d.element)),d.up(c,g,e);return delete a.hooks.move.drag,delete a.hooks.up.drag,b.css({width:"",height:"",left:"",top:""}),b.removeClass("dragging defer-dragging"),a.autoScroll.stop()},c?void 0:a.hooks.move.drag(d,c))}),e}}(this),this.dropMode=function(a){return function(c,d){var e;return e={id:a.getNewId(),element:c[0],move:function(a,c){return b.$apply(function(){return"function"==typeof d.move?d.move(a,c):void 0})},up:function(a,c,e){return b.$apply(function(){return"function"==typeof d.up?d.up(a,c,e):void 0})},out:function(a,c){return b.$apply(function(){return"function"==typeof d.out?d.out(a,c):void 0})}}}}(this),this.draggable=function(a){return function(b,c){var d,e,f,g,h,i,j;if(null==c&&(c={}),f=[],"mirror"===c.mode)for(g=0,i=b.length;i>g;g++)e=b[g],d=a.dragMirrorMode($(e),c.defer,c.object),f.push(d.id),a.data.draggables[d.id]=d;else for(h=0,j=b.length;j>h;h++)e=b[h],d=a.dragDragMode($(e),c.defer,c.object),f.push(d.id),a.data.draggables[d.id]=d;return f}}(this),this.droppable=function(a){return function(b,c){var d,e,f,g,h;for(null==c&&(c={}),f=[],g=0,h=b.length;h>g;g++)e=b[g],d=a.dropMode($(e),c),f.push(d),a.data.droppables[d.id]=d;return f}}(this),this.get=function(a){return this.setupEasing(),this.setupProviders(a),{isMouseMoved:this.isMouseMoved,data:this.data,draggable:this.draggable,droppable:this.droppable}},this.get.$inject=["$injector"],this.$get=this.get})}.call(this),function(){angular.module("builder",["builder.directive"])}.call(this),function(){var a=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};angular.module("builder.provider",[]).provider("$builder",function(){var b,c,d;c=null,b=null,d=null,this.version="0.0.2",this.components={},this.groups=[],this.broadcastChannel={updateInput:"$updateInput"},this.forms={"default":[]},this.formsId={"default":0},this.convertComponent=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;return c={name:a,group:null!=(d=b.group)?d:"Default",label:null!=(e=b.label)?e:"",description:null!=(f=b.description)?f:"",placeholder:null!=(g=b.placeholder)?g:"",editable:null!=(h=b.editable)?h:!0,required:null!=(i=b.required)?i:!1,validation:null!=(j=b.validation)?j:"/.*/",validationOptions:null!=(k=b.validationOptions)?k:[],options:null!=(l=b.options)?l:[],arrayToText:null!=(m=b.arrayToText)?m:!1,template:b.template,templateUrl:b.templateUrl,popoverTemplate:b.popoverTemplate,popoverTemplateUrl:b.popoverTemplateUrl},c.template||c.templateUrl||console.error("The template is empty."),c.popoverTemplate||c.popoverTemplateUrl||console.error("The popoverTemplate is empty."),c},this.convertFormObject=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;if(null==b&&(b={}),c=this.components[b.component],null==c)throw"The component "+b.component+" was not registered.";if(b.id){for(d=!1,i=this.forms[a],g=0,h=i.length;h>g;g++)if(e=i[g],b.id<=e.id){b.id=this.formsId[a]++,d=!0;break}d||(this.formsId[a]=b.id+1)}return f={id:null!=(j=b.id)?j:this.formsId[a]++,component:b.component,editable:null!=(k=b.editable)?k:c.editable,index:null!=(l=b.index)?l:0,label:null!=(m=b.label)?m:c.label,description:null!=(n=b.description)?n:c.description,placeholder:null!=(o=b.placeholder)?o:c.placeholder,options:null!=(p=b.options)?p:c.options,required:null!=(q=b.required)?q:c.required,validation:null!=(r=b.validation)?r:c.validation}},this.reindexFormObject=function(a){return function(b){var c,d,e,f;for(c=a.forms[b],d=e=0,f=c.length;f>e;d=e+=1)c[d].index=d}}(this),this.setupProviders=function(a){return function(a){return c=a,b=c.get("$http"),d=c.get("$templateCache")}}(this),this.loadTemplate=function(a){return null==a.template&&b.get(a.templateUrl,{cache:d}).success(function(b){return a.template=b}),null==a.popoverTemplate?b.get(a.popoverTemplateUrl,{cache:d}).success(function(b){return a.popoverTemplate=b}):void 0},this.registerComponent=function(b){return function(d,e){var f,g;null==e&&(e={}),null==b.components[d]?(f=b.convertComponent(d,e),b.components[d]=f,null!=c&&b.loadTemplate(f),g=f.group,a.call(b.groups,g)<0&&b.groups.push(f.group)):console.error("The component "+d+" was registered.")}}(this),this.addFormObject=function(a){return function(b,c){var d;return null==c&&(c={}),null==(d=a.forms)[b]&&(d[b]=[]),a.insertFormObject(b,a.forms[b].length,c)}}(this),this.insertFormObject=function(a){return function(b,c,d){var e,f;return null==d&&(d={}),null==(e=a.forms)[b]&&(e[b]=[]),null==(f=a.formsId)[b]&&(f[b]=0),c>a.forms[b].length?c=a.forms[b].length:0>c&&(c=0),a.forms[b].splice(c,0,a.convertFormObject(b,d)),a.reindexFormObject(b),a.forms[b][c]}}(this),this.removeFormObject=function(a){return function(b,c){var d;return d=a.forms[b],d.splice(c,1),a.reindexFormObject(b)}}(this),this.updateFormObjectIndex=function(a){return function(b,c,d){var e,f;if(c!==d)return f=a.forms[b],e=f.splice(c,1)[0],f.splice(d,0,e),a.reindexFormObject(b)}}(this),this.$get=["$injector",function(a){return function(b){var c,d,e;a.setupProviders(b),e=a.components;for(d in e)c=e[d],a.loadTemplate(c);return{version:a.version,components:a.components,groups:a.groups,forms:a.forms,broadcastChannel:a.broadcastChannel,registerComponent:a.registerComponent,addFormObject:a.addFormObject,insertFormObject:a.insertFormObject,removeFormObject:a.removeFormObject,updateFormObjectIndex:a.updateFormObjectIndex}}}(this)]})}.call(this),function(){angular.module("builder.components",["builder","validator.rules"]).config(["$builderProvider",function(a){return a.registerComponent("textInput",{group:"Default",label:"Text Input",description:"description",placeholder:"placeholder",required:!1,validationOptions:[{label:"none",rule:"/.*/"},{label:"number",rule:"[number]"},{label:"email",rule:"[email]"},{label:"url",rule:"[url]"}],template:'
            \n \n
            \n \n

            {{description}}

            \n
            \n
            ',popoverTemplate:"
            \n
            \n \n \n
            \n
            \n \n \n
            \n
            \n \n \n
            \n
            \n \n
            \n
            0\">\n \n \n
            \n\n
            \n
            \n \n \n \n
            \n
            "}),a.registerComponent("textArea",{group:"Default",label:"Text Area",description:"description",placeholder:"placeholder",required:!1,template:'
            \n \n
            \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n\n \n
            \n\n'),a.put("app/analytic/metric/list/list.html",'\n
            \n
            \n \n\n \n
            \n
            \n
            \n \n {{ \'APPLICATION_DEFAULT_METRICS\' | translate }} \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_METRICS\' | translate }} \n
            \n
            \n \n
            \n \n
            \n \n
            \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/analytic/metric/list/view.modal.html",'\n\n\n'),a.put("app/analytic/metric/view/view.html",'\n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n {{metric.name}}\n
            \n \n
            \n \n\n \n \n \n
            \n \n
            \n \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/analytic/metric/view/view.settings.html",'
            \n
            \n
            \n
            \n
            \n \n {{ \'APPLICATION_METRIC\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
            \n \n
            \n\n
            \n
            \n \n
            \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{\'APPLICATION_\'+$select.selected.value.toUpperCase() | translate}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n \n
            \n
            \n \n\n
            \n
            \n
            \n
            \n
            \n'),a.put("app/analytic/report/list/copy.modal.html",'\n\n\n'),a.put("app/analytic/report/list/create.modal.html",'\n\n\n'), -a.put("app/analytic/report/list/deleteNode.modal.html",'\n\n\n'),a.put("app/analytic/report/list/extract.modal.html",'\n\n\n'),a.put("app/analytic/report/list/list.html",'\n
            \n
            \n \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_FOLDERS\' | translate }} \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 {{ \'APPLICATION_REPORTS\' | translate }} - {{selectedNode}}\n
            \n
            \n \n
            \n \n \n {{\'APPLICATION_IMPORT_FROM_JSON\' | translate}}\n \n \n
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n
            \n \n
            \n
            \n
            \n
            \n\n'),a.put("app/analytic/report/list/preview.modal.html",'\n\n\n'),a.put("app/analytic/report/view/view.html",'\n
            \n
            \n \n\n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/analytic/report/view/view.settings.html",'
            \n
            \n
            \n
            \n
            \n \n
            {{ \'APPLICATION_REPORT\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} - {{report.name}}
            \n
            \n \n
            \n\n
            \n\n
            \n\n \n
            \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n\n \n
            \n
            \n \n\n \n
            \n
            \n \n
            \n \n \n {{\'APPLICATION_\'+$select.selected.value.toUpperCase() | translate}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_FIELDS\' | translate}} \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
            {{ \'APPLICATION_FIELD\' | translate }} / {{ \'APPLICATION_METRIC\' | translate }}{{ \'APPLICATION_ALIAS\' | translate }}{{ \'APPLICATION_FUNCTION\' | translate }}{{ \'APPLICATION_FORMAT\' | translate }}{{ \'APPLICATION_GROUP_BY\' | translate }}{{ \'APPLICATION_ORDER_BY\' | translate }}
            \n \n
            \n \n
            \n \n \n \n
            \n
            \n
            \n \n \n \n \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_WRONG_FORMAT\' | translate}}.\n \n
            \n \n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n \n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n \n
            \n \n
            \n \n \n {{$select.selected.name | translate}}\n \n {{$translate.instant(groupBy.name)}}\n \n \n
            \n \n
            \n \n
            \n \n \n {{$select.selected}}\n \n
            \n
            \n
            \n
            \n \n
            \n \n \n \n
            \n {{ \'MESSAGE_ADD_A_FIELD\' | translate }}\n
            \n \n \n
            \n
            \n
            \n
            \n \n {{ \'APPLICATION_CONDITIONS\' | translate}} \n
            \n
            \n
            \n Output\n
            \n \n
            \n\n \n
            \n \n
            \n
            \n \n\n \n
            \n
            \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n
            \n
            \n \n\n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/chat/offline/list/list.html",'\n\n\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_OFFLINE_MESSAGES\' | translate }} \n
            \n \n
            \n
            \n \n
            \n
            {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/chat/offline/message/message.directive.html",'
            \n
            \n
            \n From: \n [{{message.email}}]\n
            \n
            \n
            \n \n {{message.createdAt | date:\'medium\'}} ()\n \n
            \n
            \n
            {{\'MESSAGE_NO_AVAILABLE_TEXT\' | translate | lowercase}}
            \n
            \n'),a.put("app/channels/chat/offline/view/view.html",'\n
            \n
            \n \n\n \n
            \n
            \n
            \n {{enquiry.ChatWebsite.name}}\n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n \n \n \n \n \n \n {{\'APPLICATION_NAME\' | translate}}:

            {{enquiry.ChatVisitor.fullname}}

            \n {{\'APPLICATION_EMAIL\' | translate}}:

            {{enquiry.ChatVisitor.email}}

            \n {{enquiry.ChatVisitor.labelOfflineData1}}:

            {{enquiry.ChatVisitor.offlineData1}}

            \n {{enquiry.ChatVisitor.labelOfflineData2}}:

            {{enquiry.ChatVisitor.offlineData2}}

            \n {{enquiry.ChatVisitor.labelOfflineData3}}:

            {{enquiry.ChatVisitor.offlineData3}}

            \n {{\'APPLICATION_REMOTE_ADDRESS\' | translate}}:

            {{enquiry.ChatVisitor.remote_address}}

            \n {{\'APPLICATION_BROWSER\' | translate}}:

            {{enquiry.ChatVisitor.browser}}

            \n {{\'APPLICATION_REFERER\' | translate}}:

            {{enquiry.ChatVisitor.referer}} - {{enquiry.ChatWebsite.name}}

            \n {{\'APPLICATION_OS\' | translate}}:

            {{enquiry.ChatVisitor.os}}

            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
              \n
            • \n \n
            • \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n\n'),a.put("app/channels/chat/online/list/list.html",'\n\n\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_VISITORS\' | translate }} \n
            \n \n
            \n
            \n \n
            \n
            {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'), -a.put("app/channels/chat/online/view/view.detail.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_DETAIL\' | translate}}\n
            \n
            \n \n
            \n
            \n
            \n'),a.put("app/channels/chat/online/view/view.html",'\n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n {{chatRoom.ChatVisitor.email}}\n
            \n
            \n {{chatRoom.ChatVisitor.fullname}}\n
            \n
            \n \n \n \n \n
            \n \n
            \n \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/chat/preview/preview.html",'\n
            \n
            \n \n \n \n \n \n \n \n {{statePreview.state == \'online\' ? chatWebsite.header_online : chatWebsite.header_offline}}\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

            {{chatWebsite.rating_message}}

            \n
            \n
            \n \n \n
            \n
            \n \n \n
            \n \n \n
            \n
            \n \n
            \n
            \n'),a.put("app/channels/chat/queue/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/chat/queue/list/list.html",'\n\n\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_QUEUES\' | translate }} \n
            \n \n
            \n
            \n \n
            \n
            {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/chat/queue/view/view.agents.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_AGENTS\' | translate}}\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'),a.put("app/channels/chat/queue/view/view.html",'\n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n {{queue.name}}\n
            \n
            \n \n\n \n \n \n
            \n \n
            \n \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/chat/queue/view/view.settings.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
            \n
            \n
            \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected | uppercase}}\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'), -a.put("app/channels/chat/realtime/view/agent/agent.html",'\n
            \n
            \n \n
            \n \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/chat/realtime/view/agent/agent.modal.info.html",'\n\n\n'),a.put("app/channels/chat/realtime/view/agent/queue.modal.add.html",'\n\n\n'),a.put("app/channels/chat/realtime/view/application/application.html",'\n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/chat/realtime/view/view.html",'\n\n\n'),a.put("app/channels/chat/room/external/list/list.html",'\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 {{$item}}\n \n {{tag}}\n \n \n
            \n
            \n
            \n \n
            \n
            \n \n \n \n\n \n\n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/chat/room/group/list/list.html",'\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 {{$item}}\n \n {{tag}}\n \n \n
            \n
            \n
            \n \n
            \n
            \n \n \n \n\n \n\n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/chat/room/internal/list/list.html",'\n
            \n
            \n \n \n \n\n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/chat/room/room.add.html",'\n\n\n\n\n'),a.put("app/channels/chat/room/room.close.html",'\n\n\n'),a.put("app/channels/chat/room/room.directive.html",'
            \n
            \n
            \n {{chatRoom.status}}\n | \n {{chatRoom.ChatWebsite.name | truncate: 25: \'...\': true}}\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 {{$item}}\n \n {{tag}}\n \n \n
            \n
            \n
            \n \n
            \n
            \n \n \n \n \n \n \n {{\'APPLICATION_ROOM_ID\' | translate}}:

            {{chatRoom.id}}

            \n {{\'APPLICATION_NAME\' | translate}}:

            {{chatRoom.ChatVisitor.fullname}}

            \n {{\'APPLICATION_EMAIL\' | translate}}:

            {{chatRoom.ChatVisitor.email}}

            \n {{chatRoom.ChatVisitor.labelData1}}:

            {{chatRoom.ChatVisitor.data1}}

            \n {{chatRoom.ChatVisitor.labelData2}}:

            {{chatRoom.ChatVisitor.data2}}

            \n {{chatRoom.ChatVisitor.labelData3}}:

            {{chatRoom.ChatVisitor.data3}}

            \n {{\'APPLICATION_REMOTE_ADDRESS\' | translate}}:

            {{chatRoom.ChatVisitor.remote_address}}

            \n {{\'APPLICATION_BROWSER\' | translate}}:

            {{chatRoom.ChatVisitor.browser}}

            \n {{\'APPLICATION_REFERER\' | translate}}:

            {{chatRoom.ChatVisitor.referer}} - {{enquiry.ChatWebsite.name}}

            \n {{\'APPLICATION_OS\' | translate}}:

            {{chatRoom.ChatVisitor.os}}

            \n
            \n
            \n\n \n \n \n \n \n {{\'APPLICATION_NAME\' | translate}}:

            {{user.fullname}}

            \n {{\'APPLICATION_ROLE\' | translate}}:

            {{user.role}}

            \n {{\'APPLICATION_INTERNAL\' | translate}}:

            {{user.internal}}

            \n {{\'APPLICATION_EMAIL\' | translate}}:

            {{user.email}}

            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n

            {{\'MESSAGE_CHAT_ROOM_CLOSED\' | translate}}!

            \n

            \n {{\'MESSAGE_CHAT_ROOM_CLOSED_DETAILS\' | translate}}.\n

            \n
            \n

            \n {{\'APPLICATION_DISPOSITION\' | translate}}: {{chatRoom.disposition}}\n

            \n

            \n {{\'APPLICATION_RATING\' | translate}}: {{chatRoom.rating | ucfirst}}\n

            \n

            \n {{\'APPLICATION_RATING_MESSAGE\' | translate}}: {{chatRoom.ratingMessage}}\n

            \n

            \n {{\'APPLICATION_UPDATED_AT\' | translate}}: {{chatRoom.updatedAt | date:\'medium\'}} ()\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 No Results Found\n
            \n \n'+" {{'APPLICATION_WARNING' | translate}}! {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n \n
            \n
            \n\n
            \n
            \n
            \n
            \n
            \n
            \n"),a.put("app/channels/chat/room/room.html",'\n\n\n'),a.put("app/channels/chat/room/template.html",'
            \n
            \n
            \n
            \n \n \n
            \n
            \n \n
            \n {{video.description}}\n
            \n
            \n {{video.views}}\n {{video.likes}}\n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/chat/room/view.tags.modal.html",'\n\n\n'),a.put("app/channels/chat/visitor/list/list.html",'\n\n\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_VISITORS\' | translate }} \n
            \n \n
            \n
            \n \n
            \n
            {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/chat/visitor/view/view.html",'\n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n {{chatVisitor.fullname}}\n
            \n
            \n \n\n \n \n \n
            \n \n
            \n \n \n
            \n
            \n \n
            \n
            \n\n'), -a.put("app/channels/chat/visitor/view/view.profile.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_PROFILE\' | translate}}\n
            \n
            \n \n
            \n
            \n
            \n'),a.put("app/channels/chat/website/list/list.html",'\n\n\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_WEB_SITES\' | translate }} \n
            \n \n
            \n
            \n \n
            \n
            {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/chat/website/view/action/list/list.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
            \n \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n
            \n
            \n'),a.put("app/channels/chat/website/view/action/view/view.html",'\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_ACTION\' | translate }} \n
            \n
            \n
            \n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n
            \n \n
            \n \n \n {{$select.selected.fullname}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n\n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n\n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n \n
            \n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n \n
            \n
            \n \n
            \n
            to
            \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
            \n
            \n \n
            \n\n
            \n\n \n
            \n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/chat/website/view/action/wizard/wizard.html",'\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_ACTION\' | translate }} WIZARD \n
            \n
            \n
            \n \n \n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n \n \n {{$select.selected.fullname}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n\n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n
            \n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n\n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n\n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n \n
            \n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n \n
            \n
            \n \n
            \n
            to
            \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
            \n
            \n \n
            \n\n
            \n\n \n
            \n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n\n \n
            \n
            \n \n

            {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

            \n \n \n
            \n
            \n
            \n
            \n \n
            \n
            \n\n'), -a.put("app/channels/chat/website/view/disposition/modal/add.modal.html",'\n\n\n'),a.put("app/channels/chat/website/view/disposition/view/view.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_DISPOSITIONS\' | translate}}\n
            \n
            \n \n \n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n

            Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}

            \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'),a.put("app/channels/chat/website/view/embedding/view/view.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_EMBEDDING\' | translate}}\n
            \n \n
            \n
            \n
            \n
            \n

            {{\'APPLICATION_EMBED_SNIPPET\' | translate}}

            \n

            \n {{\'MESSAGE_EMBED_SNIPPET\' | translate}}\n

            \n
            \n
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/chat/website/view/form/view/view.html",'
            \n
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n {{ \'APPLICATION_FIELDS_SELECTED\' | translate }}\n
            \n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n {{ \'APPLICATION_FIELDS_AVAILABLE\' | translate }}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n {{ \'APPLICATION_FIELDS_SELECTED\' | translate }}\n
            \n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n {{ \'APPLICATION_FIELDS_AVAILABLE\' | translate }}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/chat/website/view/hooks/view/view.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_HOOKS\' | translate}}\n
            \n \n
            \n
            \n
            \n \n
            \n
            \n \n
            \n
            \n \n \n {{$select.selected.name | uppercase}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n \n \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n \n
            \n
            \n \n \n
            \n
            \n \n
            \n
            \n \n \n {{$select.selected.name | uppercase}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n\n \n \n
            \n
            \n \n \n
            \n
            \n
            \n
            \n \n \n {{$select.selected.name | uppercase}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/chat/website/view/proactive/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/chat/website/view/proactive/list/list.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_PROACTIVE_ACTIONS\' | translate}}\n
            \n \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n
            \n
            \n'),a.put("app/channels/chat/website/view/setting/view/view.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
            \n
            \n
            \n
            \n \n
            \n \n
            \n\n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n\n \n \n \n\n
            \n
            \n \n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/chat/website/view/snippet/view/view.html",'
            \n
            \n
            \n \n
            \n
            \n
            \n
            \n\n \n
            \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{$translate.instant(\'APPLICATION_\' + $select.selected.toUpperCase())}}\n \n
            \n
            \n
            \n
            \n \n\n \n
            \n
            \n \n \n
            \n \n\n
            \n
            \n \n {{\'APPLICATION_WHITE_LABEL\' | translate}}\n
            \n
            \n\n
            \n
            \n \n
            \n \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n
            \n \n {{\'APPLICATION_LOGO\' | translate}}\n
            \n
            \n
            \n\n
            \n
            \n \n
            \n \n
            \n
            \n
            \n \n
            \n
            \n
            \n
            \n \n {{ \'APPLICATION_SELECT_IMAGE\' | translate }} \n
            \n
            \n
            \n

            \n
            {{ \'MESSAGE_SUPPORTED_FORMATS\' | translate }} jpg, png, jpeg.\n

            \n
            \n
            \n
            \n
            \n
            \n \n \n \n \n \n \n \n \n
            \n \n {{ item.file.name }}\n \n \n {{ item.file.size/1024/1024|number:2 }} MB\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

            {{\'APPLICATION_ONLINE_STATE\' | translate}}

            \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

            {{\'APPLICATION_RATING_STATE\' | translate}}

            \n\n \n
            \n \n \n
            \n \n\n \n
            \n \n \n
            \n \n\n \n
            \n \n \n
            \n \n\n

            {{\'APPLICATION_OFFLINE_STATE\' | translate}}

            \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 {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n \n
            \n \n\n \n
            \n
            \n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\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 {{\'MESSAGE_REMEMBER_SMTP_SERVICE_ACCOUNT\' | translate}}.\n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n
            \n \n
            \n
            \n
            \n \n
            \n \n \n \n {{$select.selected}}\n \n
            \n
            \n
            \n
            \n \n \n
            \n
            \n
            \n
            \n
            \n
            \n'), -a.put("app/channels/chat/website/view/view.html",'\n\n\n'),a.put("app/channels/chat/website/wizard/wizard.html",'\n\n\n\n\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_WEB_SITE\' | translate }} WIZARD \n
            \n
            \n
            \n \n \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n \n
            \n
            \n\n \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{$translate.instant(\'APPLICATION_\' + $select.selected.toUpperCase())}}\n \n
            \n
            \n
            \n
            \n \n\n \n
            \n \n \n {{$select.selected ? \'On\' : \'Off\'}}\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 \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 {{$select.selected ? \'On\' : \'Off\'}}\n \n
            \n
            \n
            \n
            \n \n\n \n \n
            \n
            \n\n \n

            {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

            \n \n \n
            \n
            \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/fax/account/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/fax/account/list/list.html",'\n\n\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_ACCOUNTS\' | translate }} \n
            \n
            \n \n
            \n \n \n
            \n
            \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/fax/account/view/action/list/list.html",'
            \r\n
            \r\n
            \r\n
            \r\n
            \r\n \r\n {{\'APPLICATION_ACTIONS\' | translate}}\r\n
            \r\n \r\n
            \r\n
            \r\n \r\n
            \r\n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \r\n
            \r\n \r\n
            \r\n
            \r\n
            \r\n
            \r\n'), -a.put("app/channels/fax/account/view/action/view/view.html",'\r\n
            \r\n
            \r\n \r\n
            \r\n
            \r\n
            \r\n \r\n {{ \'APPLICATION_ACTION\' | translate }} \r\n
            \r\n
            \r\n
            \r\n
            \r\n \r\n
            \r\n \r\n \r\n {{$select.selected.name}}\r\n \r\n
            \r\n
            \r\n
            \r\n \r\n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\r\n \r\n
            \r\n \r\n\r\n
            \r\n \r\n
            \r\n \r\n \r\n {{$select.selected.name}}\r\n \r\n
            \r\n
            \r\n
            \r\n
            \r\n

            Warning!

            \r\n

            \r\n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\r\n

            \r\n

            \r\n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\r\n

            \r\n
            \r\n \r\n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\r\n \r\n
            \r\n \r\n\r\n \r\n
            \r\n \r\n \r\n \r\n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\r\n \r\n
            \r\n \r\n
            \r\n\r\n
            \r\n \r\n
            \r\n \r\n \r\n {{$select.selected.fullname}}\r\n \r\n
            \r\n
            \r\n
            \r\n
            \r\n

            Warning!

            \r\n

            \r\n {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\r\n

            \r\n

            \r\n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\r\n

            \r\n
            \r\n \r\n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\r\n \r\n
            \r\n \r\n\r\n \r\n
            \r\n \r\n \r\n \r\n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\r\n \r\n
            \r\n \r\n
            \r\n\r\n
            \r\n \r\n
            \r\n \r\n \r\n \r\n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\r\n \r\n
            \r\n\r\n
            \r\n \r\n \r\n {{$select.selected.name}}\r\n \r\n
            \r\n
            \r\n
            \r\n \r\n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\r\n \r\n
            \r\n\r\n
            \r\n \r\n \r\n {{$select.selected.name}}\r\n \r\n
            \r\n
            \r\n
            \r\n \r\n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\r\n \r\n
            \r\n \r\n
            \r\n\r\n \r\n
            \r\n \r\n \r\n {{ $select.selected.name | translate }}\r\n \r\n {{ intType.name | translate }}\r\n \r\n \r\n \r\n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\r\n \r\n
            \r\n \r\n\r\n
            \r\n \r\n
            \r\n \r\n
            \r\n
            \r\n \r\n
            \r\n
            to
            \r\n
            \r\n \r\n
            \r\n
            \r\n \r\n\r\n \r\n
            \r\n \r\n
            \r\n \r\n
            \r\n
            \r\n \r\n\r\n \r\n
            \r\n \r\n
            \r\n \r\n {{ $select.selected.name | translate }}\r\n \r\n {{ weekDay.name | translate}}\r\n \r\n \r\n to\r\n \r\n {{ $select.selected.name | translate }}\r\n \r\n {{ weekDay.name | translate }}\r\n \r\n \r\n
            \r\n
            \r\n \r\n\r\n \r\n
            \r\n \r\n
            \r\n \r\n {{$select.selected}}\r\n \r\n {{monthDay}}\r\n \r\n \r\n to\r\n \r\n {{$select.selected}}\r\n \r\n {{monthDay}}\r\n \r\n \r\n
            \r\n
            \r\n \r\n\r\n \r\n
            \r\n \r\n
            \r\n \r\n {{ $select.selected.name | translate }}\r\n \r\n {{ month.name | translate }}\r\n \r\n \r\n to\r\n \r\n {{ $select.selected.name | translate }}\r\n \r\n {{ month.name | translate }}\r\n \r\n \r\n
            \r\n
            \r\n \r\n
            \r\n\r\n
            \r\n\r\n \r\n
            \r\n \r\n \r\n {{ $select.selected.name}}\r\n \r\n {{ interval.name}}\r\n \r\n \r\n
            \r\n

            Warning!

            \r\n

            \r\n {{ \'MESSAGE_NO_INTERVALS_AVAILABLE\' | translate }}\r\n

            \r\n

            \r\n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_INTERVALS\' | translate}}\r\n

            \r\n
            \r\n \r\n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\r\n \r\n
            \r\n \r\n\r\n
            \r\n \r\n
            \r\n
            \r\n
            \r\n \r\n
            \r\n
            \r\n\r\n'),a.put("app/channels/fax/account/view/action/wizard/wizard.html",'\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_ACTION\' | translate }} WIZARD \n
            \n
            \n
            \n \n \n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n \n \n {{$select.selected.fullname}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n\n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n
            \n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n\n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n\n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n \n
            \n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n \n
            \n
            \n \n
            \n
            to
            \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
            \n
            \n \n
            \n\n
            \n\n \n
            \n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_INTERVALS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_INTERVALS\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n\n \n
            \n
            \n \n

            {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

            \n \n \n
            \n
            \n
            \n
            \n \n
            \n
            \n\n'), -a.put("app/channels/fax/account/view/disposition/modal/add.modal.html",'\n\n\n'),a.put("app/channels/fax/account/view/disposition/view/view.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_DISPOSITIONS\' | translate}}\n
            \n
            \n \n \n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n

            Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}

            \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'),a.put("app/channels/fax/account/view/hooks/view/view.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_HOOKS\' | translate}}\n
            \n \n
            \n
            \n
            \n \n
            \n
            \n
            \n
            \n \n \n {{$select.selected.name | uppercase}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n \n
            \n
            \n \n \n
            \n
            \n
            \n
            \n \n \n {{$select.selected.name | uppercase}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n
            \n
            \n \n \n
            \n
            \n
            \n
            \n \n \n {{$select.selected.name | uppercase}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/fax/account/view/setting/view/view.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
            \n \n
            \n
            \n
            \n \n
            \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'DESCRIPTION_HEADERINFO\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_INTERVALS\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'DESCRIPTION_LOCALSTATIONID\' | translate}}.\n \n
            \n \n\n \n
            \n \n
            \n\n \n {{$select.selected.name}}\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 {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\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 {{\'DESCRIPTION_ECM\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected}}\n \n
            \n
            \n
            \n \n {{\'DESCRIPTION_MINRATE\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected}}\n \n
            \n
            \n
            \n \n {{\'DESCRIPTION_MAXRATE\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'DESCRIPTION_MODEM\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n \n
            \n \n \n \n {{\'DESCRIPTION_GATEWAY\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_PATTERN_GATEWAY\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'DESCRIPTION_FAXDETECT\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_PATTERN_FAXDETECT\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'DESCRIPTION_T38TIMEOUT\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_T38TIMEOUT\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n\n \n
            \n
            \n \n\n
            \n
            \n
            \n
            \n
            \n'), -a.put("app/channels/fax/account/view/view.html",'\n
            \n
            \n \n\n\n\n\n \n
            \n \n
            \n \n
            \n \n
            \n \n\n \n
            \n
            \n {{ account.name || account.description }}\n
            \n
            \n {{ account.phone }}\n
            \n
            \n \n\n \n \n \n
            \n
            \n \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/fax/account/wizard/wizard.html",'\n\n\n\n\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD \n
            \n
            \n
            \n \n \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'DESCRIPTION_HEADERINFO\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_INTERVALS\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'DESCRIPTION_LOCALSTATIONID\' | translate}}.\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 {{\'DESCRIPTION_ECM\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected}}\n \n
            \n
            \n
            \n \n {{\'DESCRIPTION_MINRATE\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected}}\n \n
            \n
            \n
            \n \n {{\'DESCRIPTION_MAXRATE\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'DESCRIPTION_MODEM\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'DESCRIPTION_GATEWAY\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_PATTERN_GATEWAY\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'DESCRIPTION_FAXDETECT\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_PATTERN_FAXDETECT\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'DESCRIPTION_T38TIMEOUT\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_T38TIMEOUT\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n \n\n
            \n
            \n\n \n

            {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

            \n \n \n
            \n\n
            \n\n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/fax/inbox/message/info.modal.html",'\n\n\n'),a.put("app/channels/fax/inbox/message/message.directive.html",'
            \n
            \n
            \n From: \n [{{message.from}}]\n
            \n To: \n [{{message.to}}]\n
            \n
            \n \n \n \n {{\'APPLICATION_SENT_BY\' | translate}}: {{message.User.fullname}}\n
            \n
            \n
            \n \n \n {{message.status | uppercase}}\n \n \n {{message.status | uppercase}}\n \n \n {{message.status | uppercase}}\n \n \n \n \n {{message.status | uppercase}}\n \n \n \n \n \n
            \n
            \n {{faxAttachment.name}}\n \n \n \n
            \n
            \n'),a.put("app/channels/fax/inbox/note/note.directive.html",'
            \n
            \n
            \n \n \n \n\n \n
            \n
            \n {{\'APPLICATION_ADD_BY\' | translate}}: {{message.User.fullname}}\n
            \n
            \n
            \n \n
            \n'),a.put("app/channels/fax/inbox/note/note.modal.html",'\n\n\n'),a.put("app/channels/fax/inbox/room/room.directive.html",'\n
            \n
            \n
            \n
            \n \n | \n #{{faxRoom.id}} {{faxRoom.status}}\n | \n {{faxRoom.contact}}\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 {{$item}}\n \n {{tag}}\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

            {{\'MESSAGE_FAX_ROOM_CLOSED\' | translate}}!

            \n

            \n {{\'MESSAGE_FAX_ROOM_CLOSED_DETAILS\' | translate}}.\n

            \n
            \n

            \n {{\'APPLICATION_DISPOSITION\' | translate}}: {{faxRoom.disposition}}\n

            \n

            \n {{\'APPLICATION_UPDATED_AT\' | translate}}: {{faxRoom.updatedAt | date:\'medium\'}} ()\n

            \n
            \n
            \n\n \n
            \n\n \n \n \n From: {{form.from}}, To: {{form.to[0].fax}}\n \n \n \n
            \n
            \n
            \n
            \n \n
            \n
            \n \n {{$select.selected.name}}\n \n
            \n \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n
            \n
            \n \n\n \n
            \n
            \n
            \n
            \n \n
            \n
            \n \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_TO_LIMIT\' | translate}}.\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
            {{ item.file.name | truncate: 5: \'...\': true}}{{ item.file.size/1024/1024|number:2 }} MB\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'), -a.put("app/channels/fax/inbox/status/status.modal.html",'\n\n\n'),a.put("app/channels/fax/inbox/view/account/list/list.html",'\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 {{$item}}\n \n {{tag}}\n \n \n
            \n
            \n
            \n \n
            \n
            \n \n \n \n\n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/fax/inbox/view/view.agents.modal.html",'\n\n\n'),a.put("app/channels/fax/inbox/view/view.html",'
            \r\n
            \r\n
            \r\n \r\n
            \r\n
            \r\n
            \r\n\r\n\r\n
            \r\n
            \r\n \r\n
            \r\n

            Warning!

            \r\n

            \r\n {{ \'MESSAGE_NO_AVAILABLE_ACCOUNTS\' | translate }}\r\n

            \r\n

            \r\n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_ACCOUNTS\' | translate}}\r\n

            \r\n
            \r\n
            \r\n\r\n
            \r\n \r\n
            \r\n
            \r\n
            \r\n

            Info! {{\'APPLICATION_NO_ACCOUNT_SELECTED\' | translate}}

            \r\n
            \r\n
            \r\n
            \r\n \r\n
            \r\n
            \r\n'),a.put("app/channels/fax/inbox/view/view.status.modal.html",'\n\n\n'),a.put("app/channels/fax/inbox/view/view.tags.modal.html",'\n\n\n'),a.put("app/channels/fax/queue/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/fax/queue/list/list.html",'\n\n\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_QUEUES\' | translate }} \n
            \n \n
            \n
            \n \n
            \n
            {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/fax/queue/view/view.agents.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_AGENTS\' | translate}}\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'),a.put("app/channels/fax/queue/view/view.html",'\n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n {{queue.name}}\n
            \n \n
            \n \n\n \n \n \n
            \n \n
            \n \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/fax/queue/view/view.settings.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
            \n
            \n
            \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected | uppercase}}\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'),a.put("app/channels/fax/realtime/view/agent/agent.html",'\n
            \n
            \n \n
            \n \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/fax/realtime/view/agent/agent.modal.info.html",'\n\n\n'),a.put("app/channels/fax/realtime/view/agent/queue.modal.add.html",'\n\n\n'),a.put("app/channels/fax/realtime/view/application/application.html",'\n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/fax/realtime/view/view.html",'\n\n\n'),a.put("app/channels/mail/account/list/list.html",'\n\n\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_ACCOUNTS\' | translate }} \n
            \n \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/mail/account/view/action/list/list.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
            \n \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n
            \n
            \n'), -a.put("app/channels/mail/account/view/action/view/view.html",'\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_ACTION\' | translate }} \n
            \n
            \n
            \n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n
            \n \n
            \n \n \n {{$select.selected.fullname}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_AGENTS\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n\n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n\n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n\n
            \n \n
            \n \n \n {{$select.selected.key | translate }}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n\n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n\n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n \n
            \n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n \n
            \n
            \n \n
            \n
            to
            \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
            \n
            \n \n
            \n\n
            \n\n \n
            \n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/mail/account/view/action/wizard/wizard.html",'\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_ACTION\' | translate }} WIZARD \n
            \n
            \n
            \n \n \n\n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n \n \n {{$select.selected.fullname}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_AGENTS\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n\n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n
            \n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n\n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n\n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n
            \n \n
            \n \n \n {{$select.selected.key | translate }}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n\n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n\n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n\n \n
            \n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n \n
            \n
            \n \n
            \n
            to
            \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
            \n
            \n \n
            \n\n
            \n\n \n
            \n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n\n \n\n
            \n
            \n \n

            {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

            \n \n \n
            \n
            \n
            \n
            \n \n
            \n
            \n\n'), -a.put("app/channels/mail/account/view/disposition/modal/add.modal.html",'\n\n\n'),a.put("app/channels/mail/account/view/disposition/view/view.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_DISPOSITIONS\' | translate}}\n
            \n
            \n \n \n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n

            Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}

            \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'),a.put("app/channels/mail/account/view/hooks/view/view.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_HOOKS\' | translate}}\n
            \n \n
            \n
            \n
            \n \n
            \n
            \n
            \n
            \n \n \n {{$select.selected.name | uppercase}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n \n \n
            \n
            \n
            \n
            \n \n \n {{$select.selected.name | uppercase}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n
            \n
            \n \n \n
            \n
            \n
            \n
            \n \n \n {{$select.selected.name | uppercase}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/mail/account/view/other/view/view.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_OTHER\' | translate}}\n
            \n \n
            \n
            \n \n \n \n\n
            \n \n
            \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\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'),a.put("app/channels/mail/account/view/setting/view/view.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
            \n \n
            \n
            \n \n \n \n\n
            \n \n
            \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n
            \n\n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n\n \n \n \n\n
            \n
            \n \n\n \n
            \n \n
            \n\n \n {{$select.selected.name}}\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 {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\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

            ERROR

            \n \n
            \n\n
            \n

            CONNECTED

            \n
            \n\n
            \n

            TRYING...

            \n
            \n\n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n\n \n
            \n \n \n {{$select.selected}}\n \n
            \n
            \n
            \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\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

            ERROR

            \n \n
            \n\n
            \n

            CONNECTED

            \n
            \n\n
            \n

            TRYING...

            \n
            \n\n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n
            \n \n
            \n \n\n \n \n
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n'), -a.put("app/channels/mail/account/view/view.html",'\n
            \n \n\n
            \n'),a.put("app/channels/mail/account/wizard/wizard.html",'\n
            \n
            \n \n \n \n\n \n
            \n
            \n
            \n \n {{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD \n
            \n
            \n
            \n \n \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n \n
            \n
            \n\n \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n\n \n
            \n \n \n {{$select.selected}}\n \n
            \n
            \n
            \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\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 {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n
            \n \n
            \n \n \n \n \n
            \n
            \n\n \n

            {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

            \n \n \n
            \n
            \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/mail/inbox/message/info.modal.html",'\n\n\n'),a.put("app/channels/mail/inbox/message/message.directive.html",'
            \n
            \n
            \n From: \n {{message.from[0]}} \n
            \n To: \n {{to}}, \n
            \n Cc: \n {{cc}}, \n
            \n Bcc: \n {{bcc}}, \n
            \n
            \n
            \n {{\'APPLICATION_SENT_BY\' | translate}}: {{message.User.fullname}}\n {{\'APPLICATION_SENT_BY\' | translate}}: Cally ²\n \n \n \n
            \n
            \n
            \n \n \n {{message.status | uppercase}}\n \n \n {{message.status | uppercase}}\n \n \n {{message.status | uppercase}}\n \n \n \n \n {{message.status | uppercase}}\n \n \n \n \n \n
            \n
            \n
            {{\'MESSAGE_NO_AVAILABLE_TEXT\' | translate | lowercase}}
            \n
            \n
            \n {{mailAttachment.name}}\n \n ({{mailAttachment.size | prettyBytes}})\n \n \n \n \n \n \n \n
            \n
            \n'),a.put("app/channels/mail/inbox/note/note.directive.html",'
            \n
            \n
            \n \n \n \n\n \n
            \n
            \n {{\'APPLICATION_ADD_BY\' | translate}}: {{message.User.fullname}}\n
            \n
            \n
            \n \n
            \n'),a.put("app/channels/mail/inbox/note/note.modal.html",'\n\n\n'),a.put("app/channels/mail/inbox/room/room.directive.html",'\n
            \n
            \n
            \n
            \n \n | \n #{{mailRoom.id}} {{mailRoom.status}}\n | \n Ref: #{{mailRoom.ParentId}}\n | \n {{mailRoom.subject || \'No subject\'}}\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 {{$item}}\n \n {{tag}}\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

            {{\'MESSAGE_MAIL_ROOM_CLOSED\' | translate}}!

            \n

            \n {{\'MESSAGE_MAIL_ROOM_CLOSED_DETAILS\' | translate}}.\n

            \n
            \n

            \n {{\'APPLICATION_DISPOSITION\' | translate}}: {{mailRoom.disposition}}\n

            \n

            \n {{\'APPLICATION_UPDATED_AT\' | translate}}: {{mailRoom.updatedAt | date:\'medium\'}} ()\n

            \n
            \n
            \n \n
            \n \n \n \n From: {{form.from[0]}}, To: {{form.to[0].email}} (+{{form.to.length - 1}})\n \n \n \n
            \n
            \n
            \n
            \n \n
            \n
            \n \n {{$select.selected.name}}\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
            \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\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 {{\'APPLICATION_ATTACHMENTS\' | translate}}:\n {{ item.file.name }}{{ item.file.size/1024/1024|number:2 }} MB\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 No Results Found\n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n
            \n
            \n \n\n \n
            \n
            \n
            \n \n'+" {{'APPLICATION_WARNING' | translate}}! {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n \n
            \n
            \n \n\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n\n"), -a.put("app/channels/mail/inbox/status/status.modal.html",'\n\n\n'),a.put("app/channels/mail/inbox/view/account/list/list.html",'\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 {{$item}}\n \n {{tag}}\n \n \n
            \n
            \n
            \n \n
            \n
            \n \n \n \n\n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/mail/inbox/view/view.agents.modal.html",'\n\n\n'),a.put("app/channels/mail/inbox/view/view.html",'\n\n\n
            \n
            \n \n
            \n\n
            \n \n
            \n
            \n
            \n

            Info! {{\'APPLICATION_NO_ACCOUNT_SELECTED\' | translate}}

            \n
            \n
            \n
            \n \n
            \n\n
            \n'),a.put("app/channels/mail/inbox/view/view.tags.modal.html",'\n\n\n'),a.put("app/channels/mail/inbox/view/view.templates.modal.html",'\n\n\n'),a.put("app/channels/mail/queue/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/mail/queue/list/list.html",'\n\n\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_QUEUES\' | translate }} \n
            \n \n
            \n
            \n \n
            \n
            {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/mail/queue/view/view.agents.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_AGENTS\' | translate}}\n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}\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'),a.put("app/channels/mail/queue/view/view.html",'\n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n {{queue.name}}\n
            \n \n
            \n \n\n \n \n \n
            \n \n
            \n \n \n
            \n
            \n \n
            \n
            \n \n'),a.put("app/channels/mail/queue/view/view.settings.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
            \n
            \n
            \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n\n \n
            \n \n \n
            \n \n\n \n
            \n \n \n {{$select.selected | uppercase}}\n \n
            \n
            \n
            \n
            \n \n\n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/mail/realtime/view/agent/agent.html",'\n
            \n
            \n \n
            \n \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/mail/realtime/view/agent/agent.modal.info.html",'\n\n\n'),a.put("app/channels/mail/realtime/view/agent/queue.modal.add.html",'\n\n\n'),a.put("app/channels/mail/realtime/view/application/application.html",'\n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/mail/realtime/view/view.html",'\n\n\n'),a.put("app/channels/mail/realtime/view/view.queue.html",'\n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/openchannel/account/list/list.html",'\n\n\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_ACCOUNTS\' | translate }} \n
            \n \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/openchannel/account/view/action/list/list.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
            \n \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n
            \n
            \n'), -a.put("app/channels/openchannel/account/view/action/view/view.html",'\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_ACTION\' | translate }} \n
            \n
            \n
            \n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n
            \n \n
            \n \n \n {{$select.selected.fullname}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n \n
            \n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n \n
            \n
            \n \n
            \n
            to
            \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
            \n
            \n \n
            \n\n
            \n\n \n
            \n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/openchannel/account/view/action/wizard/wizard.html",'\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_ACTION\' | translate }} WIZARD \n
            \n
            \n
            \n \n \n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n
            \n \n
            \n \n \n {{$select.selected.fullname}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n \n
            \n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n \n
            \n
            \n \n
            \n
            to
            \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
            \n
            \n \n
            \n\n
            \n\n \n
            \n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n\n \n
            \n
            \n \n

            {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

            \n \n \n
            \n
            \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/openchannel/account/view/api/view/view.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_API\' | translate}}\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'),a.put("app/channels/openchannel/account/view/disposition/modal/add.modal.html",'\n\n\n'),a.put("app/channels/openchannel/account/view/disposition/view/view.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_DISPOSITIONS\' | translate}}\n
            \n
            \n \n \n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n

            Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}

            \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'),a.put("app/channels/openchannel/account/view/hooks/view/view.html",'
            \n
            \n
            \n \n
            \n
            \n \n
            \n
            \n
            \n
            \n \n \n {{$select.selected.name | uppercase}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n
            \n
            \n \n\n \n
            \n
            \n
            \n
            \n \n \n {{$select.selected.name | uppercase}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n \n
            \n
            \n \n \n
            \n
            \n
            \n
            \n \n \n {{$select.selected.name | uppercase}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n
            \n
            \n \n \n
            \n
            \n
            \n
            \n \n \n {{$select.selected.name | uppercase}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n'), -a.put("app/channels/openchannel/account/view/setting/view/view.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
            \n \n
            \n
            \n
            \n \n
            \n
            \n \n
            \n \n \n
            \n \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n
            \n\n \n {{$select.selected.name}}\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 {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n\n \n \n \n \n \n \n\n \n
            \n \n \n \n {{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/openchannel/account/view/view.html",'\n
            \n \n\n
            \n'),a.put("app/channels/openchannel/account/wizard/wizard.html",'\n
            \n
            \n \n \n \n\n \n
            \n
            \n
            \n \n {{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD \n
            \n
            \n
            \n \n \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n \n
            \n \n \n \n {{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n
            \n \n

            {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

            \n \n \n
            \n
            \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/openchannel/inbox/message/info.modal.html",'\n\n\n'),a.put("app/channels/openchannel/inbox/message/message.html",'
            \n
            \n
            \n \n
            \n
            \n From: {{Message.from}} \n
            \n
            \n
            \n
            \n To: {{Message.to}} \n
            \n
            \n
            \n
            \n Name: {{Message.name}}\n
            \n
            \n
            \n
            \n Phone: {{Message.phone}}\n
            \n
            \n
            \n
            \n Email: {{Message.email}}\n
            \n
            \n
            \n
            \n {{\'APPLICATION_SENT_BY\' | translate}}: {{Message.User.fullname}}\n
            \n
            \n
            \n \n \n {{Message.status | uppercase}}\n \n \n {{Message.status | uppercase}}\n \n \n {{Message.status | uppercase}}\n \n \n {{Message.status | uppercase}}\n \n \n {{Message.status | uppercase}}\n \n \n {{Message.status | uppercase}}\n \n
            \n
            \n\n \n
            \n
            \n \n \n
            \n'),a.put("app/channels/openchannel/inbox/room/room.directive.html",'\n\n
            \n
            \n
            \n
            \n \n | \n #{{Room.id}} {{Room.status}}\n | \n Ref: #{{Room.ParentId}}\n
            \n
            \n \n \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n \n \n \n
            \n
            \n \n {{$item}}\n \n {{tag}}\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

            Info! {{\'MESSAGE_ROOM_CLOSED\' | translate}}

            \n

            \n {{\'MESSAGE_ROOM_CLOSED_DETAILS\' | translate}}.\n

            \n
            \n

            \n {{\'APPLICATION_DISPOSITION\' | translate}}: {{Room.disposition}}\n

            \n

            \n {{\'APPLICATION_UPDATED_AT\' | translate}}: {{Room.updatedAt | date:\'medium\'}} ()\n

            \n
            \n
            \n \n
            \n\n \n
            \n
            \n
            \n
            \n \n
            \n
            \n \n {{$select.selected.name}}\n \n
            \n \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n
            \n
            \n \n \n
            \n\n
            \n
            \n
            \n \n
            \n
            \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n
            \n
            \n \n \n
            \n
            \n
            \n \n \n \n
            \n
            \n \n \n
            \n No Results Found\n
            \n
            \n
            \n\n
            \n \n \n
            \n
            \n \n \n'+" {{'APPLICATION_WARNING' | translate}}! {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n \n
            \n
            \n\n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n\n"),a.put("app/channels/openchannel/inbox/view/account/list/list.html",'\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 {{$item}}\n \n {{tag}}\n \n \n
            \n
            \n
            \n \n
            \n
            \n \n \n \n\n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'), -a.put("app/channels/openchannel/inbox/view/view.agents.modal.html",'\n\n\n'),a.put("app/channels/openchannel/inbox/view/view.html",'\n\n\n\n
            \n
            \n \n
            \n\n
            \n \n
            \n
            \n

            Info! {{\'APPLICATION_NO_ACCOUNT_SELECTED\' | translate}}

            \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/openchannel/inbox/view/view.status.modal.html",'\n\n\n'),a.put("app/channels/openchannel/inbox/view/view.tags.modal.html",'\n\n\n'),a.put("app/channels/openchannel/queue/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/openchannel/queue/list/list.html",'\n\n\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_QUEUES\' | translate }} \n
            \n \n
            \n
            \n \n
            \n
            {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/openchannel/queue/view/view.agents.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_AGENTS\' | translate}}\n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}\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'),a.put("app/channels/openchannel/queue/view/view.html",'\n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n {{queue.name}}\n
            \n \n
            \n \n\n \n \n \n
            \n \n
            \n \n \n
            \n
            \n \n
            \n
            \n \n'),a.put("app/channels/openchannel/queue/view/view.settings.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
            \n
            \n
            \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n\n \n
            \n \n \n
            \n \n\n \n
            \n \n \n {{$select.selected.toUpperCase()}}\n \n
            \n
            \n
            \n
            \n \n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/openchannel/realtime/view/agent/agent.html",'\n
            \n
            \n \n
            \n \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/openchannel/realtime/view/agent/agent.modal.info.html",'\n\n\n'),a.put("app/channels/openchannel/realtime/view/agent/queue.modal.add.html",'\n\n\n'),a.put("app/channels/openchannel/realtime/view/application/application.html",'\n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/openchannel/realtime/view/view.html",'\n\n\n'),a.put("app/channels/openchannel/realtime/view/view.queue.html",'\n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/realtime/view/agent/agent.html",'\n
            \n
            \n \n
            \n \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/realtime/view/agent/agent.modal.info.html",'\n\n\n'),a.put("app/channels/realtime/view/agent/queue.modal.add.html",'\n\n\n'),a.put("app/channels/realtime/view/view.html",'\n\n\n'),a.put("app/channels/sms/account/list/list.html",'\n\n\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_ACCOUNTS\' | translate }} \n
            \n \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/sms/account/view/action/list/list.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
            \n \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n
            \n
            \n'), -a.put("app/channels/sms/account/view/action/view/view.html",'\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_ACTION\' | translate }} \n
            \n
            \n
            \n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n
            \n \n
            \n \n \n {{$select.selected.fullname}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n\n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n\n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n
            \n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n\n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n\n \n
            \n \n
            \n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n \n
            \n
            \n \n
            \n
            to
            \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
            \n
            \n \n
            \n\n
            \n\n \n
            \n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/sms/account/view/action/wizard/wizard.html",'\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_ACTION\' | translate }} WIZARD \n
            \n
            \n
            \n \n \n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n \n \n {{$select.selected.fullname}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_AGENTS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_AGENTS\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n\n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n\n
            \n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n\n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n\n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n\n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n\n \n
            \n \n
            \n \n \n {{ $select.selected.name | translate }}\n \n {{ intType.name | translate }}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n \n
            \n
            \n \n
            \n
            to
            \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate}}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ weekDay.name | translate }}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n to\n \n {{$select.selected}}\n \n {{monthDay}}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n to\n \n {{ $select.selected.name | translate }}\n \n {{ month.name | translate }}\n \n \n
            \n
            \n \n
            \n\n
            \n\n \n
            \n \n \n {{ $select.selected.name}}\n \n {{ interval.name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n\n \n
            \n
            \n \n

            {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

            \n \n \n
            \n
            \n
            \n
            \n \n
            \n
            \n\n'), -a.put("app/channels/sms/account/view/api/view/view.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_API\' | translate}}\n
            \n
            \n
            \n
            \n \n
            \n \n
            \n
            \n \n

            \n Copy the following url and insert it into your {{account.type}} account settings to receive SMS.\n Detail\n

            \n
            \n
            \n
            \n
            \n \n
            \n
            \n \n \n
            \n

            \n \n \n
            \n
            \n \n

            \n Copy the following url and insert it into your {{account.type}} account settings to receive delivery report.\n Detail\n

            \n
            \n
            \n
            \n
            \n \n
            \n
            \n \n \n
            \n
            \n \n
            \n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/sms/account/view/disposition/modal/add.modal.html",'\n\n\n'),a.put("app/channels/sms/account/view/disposition/view/view.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_DISPOSITIONS\' | translate}}\n
            \n
            \n \n \n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n

            Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}

            \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'),a.put("app/channels/sms/account/view/hooks/view/view.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_HOOKS\' | translate}}\n
            \n \n
            \n
            \n
            \n \n
            \n
            \n \n
            \n
            \n \n \n {{$select.selected.name | uppercase}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n \n \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n\n \n
            \n
            \n \n \n
            \n
            \n \n
            \n
            \n \n \n {{$select.selected.name | uppercase}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n\n \n \n
            \n
            \n \n \n
            \n
            \n
            \n
            \n \n \n {{$select.selected.name | uppercase}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n \n
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/sms/account/view/setting/view/view.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
            \n \n
            \n
            \n
            \n \n
            \n
            \n \n
            \n \n \n
            \n \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n
            \n\n \n {{$select.selected.name}}\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 {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n \n \n
            \n \n \n {{$select.selected | uppercase}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n \n {{ \'DESCRIPTION_PHONE_NUMBER\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n \n
            \n \n \n \n {{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/sms/account/view/view.html",'\n
            \n \n\n
            \n'), -a.put("app/channels/sms/account/view/view.settings.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
            \n \n
            \n
            \n
            \n \n
            \n
            \n \n
            \n \n \n
            \n \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n
            \n\n \n {{$select.selected.name}}\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 {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_NUMERIC_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n\n \n\n
            \n \n \n\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n\n
            \n \n \n {{$select.selected | uppercase}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n \n {{ \'DESCRIPTION_PHONE_NUMBER\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n
            \n
            \n \n Copy the following url and insert it into your {{account.type}} account settings to receive sms.\n Detail\n \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n \n \n
            \n
            \n \n \n
            \n
            \n
            \n Copy the following url and insert it into your {{account.type}} account settings to receive delivery status.\n Detail\n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n \n \n
            \n
            \n \n \n
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/sms/account/wizard/wizard.html",'\n
            \n
            \n \n \n \n\n \n
            \n
            \n
            \n \n {{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD \n
            \n
            \n
            \n \n \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n \n\n
            \n \n \n {{$select.selected | uppercase}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected | uppercase}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n \n {{ \'DESCRIPTION_PHONE_NUMBER\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n \n {{\'MESSAGE_MOTION_ADDRESS_FORMAT\' | translate}}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n
            \n \n

            {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

            \n \n \n
            \n
            \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/sms/inbox/room/room.directive.html",'\n\n
            \n
            \n
            \n
            \n \n | \n #{{SmsRoom.id}} {{SmsRoom.status}}\n | \n Ref: #{{SmsRoom.ParentId}}\n
            \n
            \n \n \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n \n \n \n
            \n
            \n \n {{$item}}\n \n {{tag}}\n \n \n
            \n
            \n
            \n \n
            \n
            \n\n
            \n
              \n
            • \n
              \n \n \n
              \n \n
            • \n
            \n
            \n
            \n
            \n
            \n

            Info! {{\'MESSAGE_SMS_ROOM_CLOSED\' | translate}}

            \n

            \n {{\'MESSAGE_SMS_ROOM_CLOSED_DETAILS\' | translate}}.\n

            \n
            \n

            \n {{\'APPLICATION_DISPOSITION\' | translate}}: {{SmsRoom.disposition}}\n

            \n

            \n {{\'APPLICATION_UPDATED_AT\' | translate}}: {{SmsRoom.updatedAt | date:\'medium\'}} ()\n

            \n
            \n
            \n \n
            \n\n \n
            \n
            \n
            \n
            \n \n
            \n
            \n \n {{$select.selected.name}}\n \n
            \n \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n
            \n
            \n \n \n
            \n\n
            \n
            \n
            \n \n
            \n
            \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n
            \n
            \n
            \n \n \n
            \n
            \n
            \n \n \n \n
            \n
            \n \n \n
            \n No Results Found\n
            \n
            \n
            \n\n
            \n \n \n
            \n
            \n \n \n Max 160 chars\n \n'+" {{'APPLICATION_WARNING' | translate}}! {{'MESSAGE_REQUIRED_FIELD' | translate}}.\n \n
            \n
            \n\n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n\n"), -a.put("app/channels/sms/inbox/sms/info.modal.html",'\n\n\n'),a.put("app/channels/sms/inbox/sms/sms.html",'
            \n
            \n
            \n From: \n [{{smsMessage.from}}]\n
            \n To: \n [{{smsMessage.to}}]\n
            \n
            \n
            \n {{\'APPLICATION_SENT_BY\' | translate}}: {{smsMessage.User.fullname}}\n {{\'APPLICATION_SENT_BY\' | translate}}: Cally ²\n \n \n
            \n
            \n\n
            \n \n \n {{smsMessage.status | uppercase}}\n \n \n {{smsMessage.status | uppercase}}\n \n \n {{smsMessage.status | uppercase}}\n \n \n {{smsMessage.status | uppercase}}\n \n \n {{smsMessage.status | uppercase}}\n \n \n {{smsMessage.status | uppercase}}\n \n
            \n \n
            \n\n \n
            \n
            \n \n\n
            \n'),a.put("app/channels/sms/inbox/view/account/list/list.html",'\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 {{$item}}\n \n {{tag}}\n \n \n
            \n
            \n
            \n \n
            \n
            \n \n \n \n\n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/sms/inbox/view/view.agents.modal.html",'\n\n\n'),a.put("app/channels/sms/inbox/view/view.html",'\n\n\n\n
            \n
            \n \n
            \n\n
            \n \n
            \n
            \n

            Info! {{\'APPLICATION_NO_ACCOUNT_SELECTED\' | translate}}

            \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/sms/inbox/view/view.status.modal.html",'\n\n\n'),a.put("app/channels/sms/inbox/view/view.tags.modal.html",'\n\n\n'),a.put("app/channels/sms/inbox/view/view.templates.modal.html",'\n\n\n'),a.put("app/channels/sms/queue/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/sms/queue/list/list.html",'\n\n\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_QUEUES\' | translate }} \n
            \n \n
            \n
            \n \n
            \n
            {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/sms/queue/view/view.agents.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_AGENTS\' | translate}}\n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}\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'),a.put("app/channels/sms/queue/view/view.html",'\n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n {{queue.name}}\n
            \n \n
            \n \n\n \n \n \n
            \n \n
            \n \n \n
            \n
            \n \n
            \n
            \n \n'),a.put("app/channels/sms/queue/view/view.settings.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_SETTINGS\' | translate}}\n
            \n
            \n
            \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_INVALID_PATTERN_NAME\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected | uppercase}}\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'),a.put("app/channels/sms/realtime/view/agent/agent.html",'\n
            \n
            \n \n
            \n \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/sms/realtime/view/agent/agent.modal.info.html",'\n\n\n'),a.put("app/channels/sms/realtime/view/agent/queue.modal.add.html",'\n\n\n'),a.put("app/channels/sms/realtime/view/application/application.html",'\n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/sms/realtime/view/view.html",'\n\n\n'), -a.put("app/channels/sms/realtime/view/view.queue.html",'\n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/chanspy/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/voice/chanspy/list/list.html",'\n
            \n
            \n \n\n \n
            \n
            \n
            \n \n {{ \'APPLICATION_CHANSPY\' | translate }} \n
            \n
            \n \n
            \n \n
            \n
            \n
            \n
            \n \n
            \n
            {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/chanspy/view/view.html",'\n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n {{chanspy.name}}\n
            \n \n
            \n \n\n \n \n \n
            \n \n
            \n \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/chanspy/view/view.settings.html",'
            \n
            \n
            \n
            \n
            \n \n {{ \'APPLICATION_CHANSPY\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
            \n \n
            \n\n
            \n
            \n \n
            \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$item.value}}: {{$item.name | translate}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n
            \n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n \n
            \n
            \n \n\n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/voice/context/list/create.modal.html",'\n\n\n'),a.put("app/channels/voice/context/list/list.html",'\n
            \n
            \n \n\n \n
            \n
            \n
            \n \n {{ \'APPLICATION_CONTEXTS\' | translate }} \n
            \n \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/context/view/view.html",'\n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n {{context.name}}\n
            \n
            \n \n\n \n \n \n
            \n \n
            \n \n \n
            \n
            \n \n
            \n
            \n \n'),a.put("app/channels/voice/context/view/view.settings.html",'
            \n
            \n
            \n
            \n
            \n \n {{ \'APPLICATION_CONTEXT\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
            \n \n
            \n\n
            \n
            \n \n
            \n
            \n\n \n
            \n \n \n \n {{ \'DESCRIPTION_CANT_EDIT_NAME\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n \n
            \n
            \n \n\n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/voice/disposition/list/list.html",'\n
            \n
            \n \n\n \n
            \n
            \n
            \n \n {{ \'APPLICATION_DISPOSITIONS\' | translate }} \n
            \n
            \n \n \n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n

            Info! {{\'MESSAGE_NO_DISPOSITIONS_AVAILABLE\' | translate}}

            \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'),a.put("app/channels/voice/disposition/list/modal/add.modal.html",'\n\n\n'),a.put("app/channels/voice/moh/list/create.modal.html",'\n\n\n'),a.put("app/channels/voice/moh/list/list.html",'\n
            \n
            \n \n\n \n
            \n
            \n
            \n \n {{ \'APPLICATION_MOHS\' | translate }} \n
            \n \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'), -a.put("app/channels/voice/moh/view/view.addFiles.html",'\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_MOH\' | translate }} {{ \'APPLICATION_ADD_FILES\' | translate }} \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_SOUNDS\' | translate}}\n

            \n
            \n
            \n\n \n
            \n \n \n {{$item.display_name}}\n \n {{sound.display_name}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/moh/view/view.audios.html",'
            \n
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_AUDIOS\' | translate}}\n
            \n \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_FOLDER_DOES_NOT_EXIST\' | translate }}\n

            \n
            \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
            {{ \'APPLICATION_NAME\' | translate }}{{ \'APPLICATION_PREVIEW\' | translate }}{{ \'APPLICATION_ACTIONS\' | translate }}
            {{audiofile}}\n \n \n {{ \'APPLICATION_DELETE\' | translate }}\n \n
            \n {{ \'MESSAGE_NO_AUDIOFILES_AVAILABLE\' | translate }}\n
            \n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/voice/moh/view/view.html",'\n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n {{moh.name}}\n
            \n
            \n \n\n \n \n \n
            \n \n
            \n \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/moh/view/view.settings.html",'
            \n
            \n
            \n
            \n
            \n \n {{ \'APPLICATION_MOH_CLASS\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
            \n \n
            \n\n
            \n
            \n \n
            \n
            \n\n \n
            \n \n \n
            \n \n\n \n
            \n \n \n {{$translate.instant($select.selected.name)}}\n \n {{$translate.instant(sort.name)}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/voice/queue/list/list.create.modal.html",'\n\n\n'),a.put("app/channels/voice/queue/list/list.html",'\n
            \n
            \n \n\n \n
            \n
            \n
            \n \n {{ \'APPLICATION_QUEUES\' | translate }}\n
            \n \n
            \n
            \n \n
            \n
            {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/queue/view/view.agents.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_AGENTS\' | translate}}\n
            \n
            \n
            \n

            Warning!

            {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}

            \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'),a.put("app/channels/voice/queue/view/view.html",'\n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n {{queue.name}}\n
            \n
            \n \n\n \n \n \n
            \n \n
            \n \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/queue/view/view.settings.html",'
            \n
            \n
            \n
            \n
            \n \n {{ \'APPLICATION_QUEUE_SETTINGS\' | translate}}\n
            \n \n
            \n\n
            \n
            \n \n
            \n
            \n
            \n
            \n \n
            \n \n \n {{$select.selected.toUpperCase()}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_STRATEGY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_VOICE_MOH\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{ \'DESCRIPTION_QUEUE_TIMEOUT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{ \'DESCRIPTION_QUEUE_MAXLEN\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{ \'DESCRIPTION_QUEUE_RETRY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n
            \n \n
            \n \n \n \n {{ \'DESCRIPTION_QUEUE_WRAPUPTIME\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{ \'DESCRIPTION_QUEUE_WEIGHT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$item}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_JOINEMPTY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$item}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_LEAVEWHENEMPTY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.display_name}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_ANNOUNCE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\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 {{$item.display_name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_SOUNDS\' | translate}}\n

            \n
            \n \n {{ \'DESCRIPTION_QUEUE_PERIODIC_ANNOUNCE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n
            \n
            \n

            {{\'APPLICATION_SETTINGS\' | translate}}

            \n \n
            \n \n \n \n {{ \'DESCRIPTION_QUEUE_ANNOUNCE_FREQUENCY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{ \'DESCRIPTION_QUEUE_MIN_ANNOUNCE_FREQUENCY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{ \'DESCRIPTION_QUEUE_PERIODIC_ANNOUNCE_FREQUENCY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected | capitalize}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_RANDOM_PERIODIC_ANNOUNCE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected | capitalize}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_ANNOUNCE_HOLDTIME\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected | capitalize}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_ANNOUNCE_POSITION\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{ \'DESCRIPTION_QUEUE_ANNOUNCE_POSITION_LIMIT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected | capitalize}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_REPORTHOLDTIME\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n
            \n

            {{\'APPLICATION_SOUNDS\' | translate}}

            \n \n
            \n \n \n {{$select.selected.display_name}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_REPORTHOLD\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.display_name}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_YOUARENEXT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.display_name}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_THEREARE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.display_name}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_CALLSWAITING\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.display_name}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_HOLDTIME\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.display_name}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_MINUTES\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.display_name}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_MINUTE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.display_name}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_SECONDS\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.display_name}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_THANKYOU\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n
            \n\n \n
            \n
            \n \n \n
            \n
            \n\n
            \n
            \n\n \n
            \n \n \n {{$select.selected | capitalize}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_AUTOPAUSE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected | capitalize}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_RINGINUSE\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{ \'DESCRIPTION_QUEUE_MEMBER_DELAY\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n
            \n \n \n {{ \'DESCRIPTION_ACW\' | translate }}\n \n \n {{\'APPLICATION_ACW\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n
            \n \n \n {{ \'DESCRIPTION_SETINTERFACEVAR\' | translate }} wiki)\n \n \n {{\'APPLICATION_SETINTERFACEVAR\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n
            \n \n \n {{ \'DESCRIPTION_SETQUEUEVAR\' | translate }} wiki)\n \n \n {{\'APPLICATION_SETQUEUEVAR\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n
            \n\n \n
            \n \n \n {{$select.selected | capitalize}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_TIMEOUTRESTART\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_MONITOR_FORMAT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_QUEUE_VOICE_CONTEXT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{ \'DESCRIPTION_ACW_TIMEOUT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n
            \n \n \n {{ \'DESCRIPTION_SETQUEUEENTRYVAR\' | translate }} wiki)\n \n \n {{\'APPLICATION_SETQUEUEENTRYVAR\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n
            \n\n \n
            \n
            \n \n\n
            \n
            \n
            \n
            \n
            \n'), -a.put("app/channels/voice/realtime/view/abandoned/abandoned.html",'\n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/realtime/view/agent/agent.html",'\n
            \n
            \n \n
            \n \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/realtime/view/agent/agent.modal.info.html",'\n\n\n'),a.put("app/channels/voice/realtime/view/agent/queue.modal.add.html",'\n\n\n'),a.put("app/channels/voice/realtime/view/outbound/outbound.html",'\n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/realtime/view/parameter/parameter.html",'\n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/realtime/view/queue/queue.html",'\n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/realtime/view/queuecalls/queuecalls.html",'\n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/realtime/view/telephone/telephone.html",'\n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/realtime/view/telephone/telephone.modal.info.html",'\n\n\n'),a.put("app/channels/voice/realtime/view/view.html",'\n\n\n'),a.put("app/channels/voice/recording/list/list.html",'\n
            \n
            \n \n\n \n
            \n
            \n
            \n \n {{ \'APPLICATION_RECORDINGS\' | translate }} \n
            \n \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/route/inbound/list/create.modal.html",'\n\n\n\n'),a.put("app/channels/voice/route/inbound/list/list.html",'\n
            \n
            \n \n\n \n
            \n
            \n
            \n \n {{ \'APPLICATION_INBOUND\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }} \n
            \n \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/route/inbound/view/view.applications.html",'
            \n
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
            \n \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/voice/route/inbound/view/view.html",'\n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n {{route.exten}}\n
            \n \n
            \n \n\n \n \n \n
            \n \n
            \n \n \n
            \n
            \n \n
            \n
            \n\n"),a.put("app/channels/voice/route/inbound/view/view.settings.html",'
            \n
            \n
            \n
            \n
            \n \n {{ \'APPLICATION_INBOUND\' | translate}} {{ \'APPLICATION_ROUTE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
            \n \n
            \n\n
            \n
            \n \n
            \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n\n \n
            \n
            \n \n\n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/voice/route/internal/list/create.modal.html",'\n\n\n\n'),a.put("app/channels/voice/route/internal/list/list.html",'\n
            \n
            \n \n\n \n
            \n
            \n
            \n \n {{ \'APPLICATION_INTERNAL\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }} \n
            \n \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/route/internal/view/view.applications.html",'
            \n
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
            \n \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/voice/route/internal/view/view.html",'\n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n {{route.exten}}\n
            \n \n
            \n \n\n \n \n \n
            \n \n
            \n \n \n
            \n
            \n \n \n
            \n
            \n\n"), -a.put("app/channels/voice/route/internal/view/view.settings.html",'
            \n
            \n
            \n
            \n
            \n \n {{ \'APPLICATION_INTERNAL\' | translate}} {{ \'APPLICATION_ROUTE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
            \n \n
            \n\n
            \n
            \n \n
            \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n\n \n
            \n
            \n \n\n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/voice/route/outbound/list/create.modal.html",'\n\n\n\n'),a.put("app/channels/voice/route/outbound/list/list.html",'\n
            \n
            \n \n\n \n
            \n
            \n
            \n \n {{ \'APPLICATION_OUTBOUND\' | translate }} {{ \'APPLICATION_ROUTES\' | translate }} \n
            \n \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/route/outbound/view/view.html",'\n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n {{route.exten}}\n
            \n \n
            \n \n\n \n \n \n
            \n \n
            \n \n \n
            \n
            \n \n \n
            \n
            \n\n"),a.put("app/channels/voice/route/outbound/view/view.route.html",'
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_NEW_ROUTE\' | translate }} WIZARD \n
            \n
            \n
            \n
            \n {{(main.app.name | translate) || \'Application\'}}\n
            \n \n \n
            \n \n \n
            \n \n \n {{$select.selected.name | translate}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_TRUNKS\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \' placeholder=\'"name" \' class="form-control" data-ng-model="application.appdata[1]" data-ng-init="application.appdata[1] = null">\n \n {{ \'DESCRIPTION_OUTBOUND_CALLERID\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{ \'DESCRIPTION_OUTBOUND_PREFIX\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n \n
            \n
            \n \n
            \n \n \n \n
            \n \n \n {{$select.selected.name | translate}}\n \n {{$translate.instant(intType.name)}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n \n
            \n \n
            \n
            \n
            to
            \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected.name | translate}}\n \n {{weekDay.name | translate}}\n \n \n to\n \n {{$select.selected.name | translate}}\n \n {{weekDay.name | translate}}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}\n \n {{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n \n \n to\n \n {{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}\n \n {{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected.name | translate}}\n \n {{month.name | translate}}\n \n \n to\n \n {{$select.selected.name | translate}}\n \n {{month.name | translate}}\n \n \n
            \n
            \n \n
            \n\n
            \n\n \n
            \n \n \n {{$select.selected.name | translate}}\n \n {{interval.name | translate}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n\n \n \n
            \n
            \n\n \n

            {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

            \n \n \n
            \n
            \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/route/outbound/view/view.routeSettings.html",'
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_APPLICATION_SETTINGS\' | translate }} WIZARD \n
            \n
            \n
            \n \n
            \n {{(main.app.name | translate) || \'Application\'}}\n
            \n \n
            \n \n
            \n\n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_TRUNKS\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \' placeholder=\'"name" \' class="form-control" data-ng-model="route.Applications[selectedApp].appdata[1]">\n \n {{ \'DESCRIPTION_OUTBOUND_CALLERID\' | translate }} "name" <number>\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{ \'DESCRIPTION_OUTBOUND_PREFIX\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n \n
            \n
            \n \n
            \n \n \n \n
            \n \n \n {{$select.selected.name | translate}}\n \n {{intType.name | translate}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n \n
            \n \n
            \n
            \n
            to
            \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected.name | translate}}\n \n {{weekDay.name | translate}}\n \n \n to\n \n {{$select.selected.name | translate}}\n \n {{weekDay.name | translate}}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}\n \n {{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n \n \n to\n \n {{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}\n \n {{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected.name | translate}}\n \n {{month.name | translate}}\n \n \n to\n \n {{$select.selected.name | translate}}\n \n {{month.name | translate}}\n \n \n
            \n
            \n \n
            \n\n
            \n\n \n
            \n \n \n {{$select.selected.name | translate}}\n \n {{interval.name | translate}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n \n
            \n
            \n\n \n

            {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

            \n \n \n
            \n
            \n
            \n
            \n \n
            \n
            \n\n'), -a.put("app/channels/voice/route/outbound/view/view.routes.html",'
            \n
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_ACTIONS\' | translate}}\n
            \n \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/voice/route/outbound/view/view.settings.html",'
            \n
            \n
            \n
            \n
            \n \n {{ \'APPLICATION_OUTBOUND\' | translate}} {{ \'APPLICATION_ROUTE\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
            \n \n
            \n\n
            \n
            \n \n
            \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n \n
            \n \n\n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n
            \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n\n \n
            \n
            \n \n\n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/voice/route/view.application.html",'\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_NEW_APPLICATION\' | translate }} WIZARD \n
            \n
            \n
            \n \n
            \n {{(main.app.name | translate) || \'Application\'}}\n
            \n \n
            \n \n \n\n \n \n
            \n \n \n {{$select.selected.name | translate}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.display_name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_SOUNDS\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n
            \n \n
            \n \n \n {{$select.selected.display_name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_SOUNDS\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{ \'APPLICATION_WARNING\' | translate }}! {{ \'MESSAGE_REQUIRED_FIELD\' | translate }}.\n \n
            \n \n\n \n
            \n \n \n \n {{ \'APPLICATION_WARNING\' | translate }}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n

            \n

            \n {{ \'APPLICATION_GO_TO\' | translate }} {{ \'APPLICATION_TRUNKS\' | translate }}\n

            \n
            \n \n {{ \'APPLICATION_WARNING\' | translate }}! {{ \'MESSAGE_REQUIRED_FIELD\' | translate }}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n \n \n
            \n \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_PROJECTS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_PROJECTS\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n \n
            \n \n \n {{$select.selected.name | translate}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n \n
            \n \n \n {{$select.selected.mailbox}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_VOICEMAILS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_VOICEMAILS\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n \n
            \n
            \n \n
            \n \n \n \n
            \n \n \n {{$select.selected.name | translate}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n \n
            \n \n
            \n
            \n
            to
            \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected.name | translate}}\n \n {{weekDay.name | translate}}\n \n \n to\n \n {{$select.selected.name | translate}}\n \n {{weekDay.name | translate}}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}\n \n {{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n \n \n to\n \n {{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}\n \n {{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected.name | translate}}\n \n {{month.name | translate}}\n \n \n to\n \n {{$select.selected.name | translate}}\n \n {{month.name | translate}}\n \n \n
            \n
            \n \n
            \n\n
            \n\n \n
            \n \n \n {{$select.selected.name | translate}}\n \n {{interval.name | translate}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n \n
            \n
            \n\n \n

            {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

            \n \n \n
            \n
            \n
            \n
            \n \n
            \n
            \n\n'), -a.put("app/channels/voice/route/view.applicationSettings.html",'\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_APPLICATION_SETTINGS\' | translate }} WIZARD \n
            \n
            \n
            \n \n
            \n {{(main.app.name | translate) || \'Application\'}}\n
            \n \n
            \n \n\n \n\n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_QUEUES_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_QUEUES\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.display_name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_SOUNDS\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n
            \n \n
            \n \n \n {{$select.selected.display_name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_SOUNDS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_SOUNDS\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n
            \n\n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_TRUNKS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_TRUNKS\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n \n \n
            \n \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_PROJECTS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_PROJECTS\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n \n \n\n
            \n
            \n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n \n
            \n \n \n {{$select.selected.name | translate}}\n \n {{hangupCause.name | translate}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n \n
            \n \n \n {{$select.selected.mailbox}}\n \n
            \n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_VOICEMAILS_AVAILABLE\' | translate }}\n

            \n

            \n {{\'APPLICATION_GO_TO\' | translate}} {{\'APPLICATION_VOICEMAILS\' | translate}}\n

            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n \n
            \n
            \n\n
            \n \n \n \n
            \n \n \n {{$select.selected.name | translate}}\n \n {{intType.name | translate}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n \n
            \n \n
            \n
            \n
            to
            \n
            \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected.name | translate}}\n \n {{weekDay.name | translate}}\n \n \n to\n \n {{$select.selected.name | translate}}\n \n {{weekDay.name | translate}}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}\n \n {{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n \n \n to\n \n {{$select.selected === \'always\' ? \'APPLICATION_ALWAYS\' : $select.selected | translate}}\n \n {{monthDay === \'always\' ? \'APPLICATION_ALWAYS\' : monthDay | translate}}\n \n \n
            \n
            \n \n\n \n
            \n \n
            \n \n {{$select.selected.name | translate}}\n \n {{month.name | translate}}\n \n \n to\n \n {{$select.selected.name | translate}}\n \n {{month.name | translate}}\n \n \n
            \n
            \n \n
            \n\n
            \n\n \n
            \n \n \n {{$select.selected.name | translate}}\n \n {{interval.name | translate}}\n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n
            \n \n \n
            \n
            \n\n\n

            {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

            \n \n \n
            \n
            \n
            \n
            \n\n
            \n
            \n\n'), -a.put("app/channels/voice/voicemail/list/list.html",'\n
            \n
            \n \n\n \n
            \n
            \n
            \n \n {{ \'APPLICATION_VOICEMAILS\' | translate }} \n
            \n \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/voicemail/view/view.html",'\n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n {{voicemail.mailbox}}\n
            \n
            \n \n\n \n \n \n
            \n \n
            \n \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/channels/voice/voicemail/view/view.messages.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_MESSAGES\' | translate}}\n
            \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n
            \n
            \n'),a.put("app/channels/voice/voicemail/view/view.settings.html",'
            \n
            \n
            \n
            \n
            \n \n {{ \'APPLICATION_VOICEMAIL\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
            \n \n
            \n\n
            \n
            \n \n
            \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n \n {{ \'DESCRIPTION_VOICE_CONTEXT\' | translate }}\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n
            \n \n \n
            \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\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 {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n
            \n \n\n
            \n
            \n
            \n
            \n
            \n'),a.put("app/channels/voice/voicemail/wizard/wizard.html",'
            \n \n \n \n\n \n
            \n
            \n
            \n \n {{ \'APPLICATION_VOICEMAIL\' | translate }} WIZARD \n
            \n
            \n
            \n \n \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_WRONG_PASSWORD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n
            \n\n \n

            {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

            \n \n \n
            \n
            \n
            \n
            \n \n
            \n'),a.put("app/contactmanager/company/list/create.modal.html",'\n\n\n'), -a.put("app/contactmanager/company/list/list.html",'\n
            \n
            \n \n\n \n
            \n
            \n
            \n \n {{ \'APPLICATION_COMPANIES\' | translate }} \n
            \n
            \n \n
            \n \n
            \n \n
            \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/contactmanager/company/view/view.html",'\n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n {{company.name}}\n
            \n \n
            \n \n\n \n \n \n
            \n \n
            \n \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/contactmanager/company/view/view.settings.html",'
            \n
            \n
            \n
            \n
            \n \n {{ \'APPLICATION_COMPANY\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
            \n \n
            \n\n
            \n
            \n \n
            \n
            \n
            \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n
            \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n
            \n
            \n \n
            \n
            \n \n
            \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n
            \n
            \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/contactmanager/contact/list/copy.modal.html",'\n\n\n'),a.put("app/contactmanager/contact/list/import.modal.html",'\n\n\n'), -a.put("app/contactmanager/contact/list/list.html",'\n
            \n
            \n \n\n \n
            \n
            \n
            \n \n {{ \'APPLICATION_CONTACTS\' | translate }} \n
            \n
            \n \n
            \n \n \n \n {{\'APPLICATION_IMPORT_FROM_CSV\' | translate}}\n \n \n
            \n \n
            \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/contactmanager/list/list/create.modal.html",'\n\n\n'),a.put("app/contactmanager/list/list/list.html",'\n
            \n
            \n \n\n \n
            \n
            \n
            \n \n {{ \'APPLICATION_LISTS\' | translate }} \n
            \n
            \n \n
            \n \n
            \n
            \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/contactmanager/list/view/create.modal.html",'\n\n\n'),a.put("app/contactmanager/list/view/view.agents.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_AGENTS\' | translate}}\n
            \n
            \n
            \n

            Warning!

            \n

            \n {{ \'MESSAGE_NO_AVAILABLE_TEAMS\' | translate }}\n

            \n
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n
            \n'),a.put("app/contactmanager/list/view/view.customFieldSettings.html",'
            \n
            \n
            \n
            \n
            \n \n {{ \'APPLICATION_CUSTOM_FIELD\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
            \n
            \n\n
            \n \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\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'),a.put("app/contactmanager/list/view/view.customFields.html",'
            \n
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_CUSTOM_FIELDS\' | translate}}\n
            \n
            \n \n
            \n \n
            \n
            \n
            \n
            \n \n
            \n
            {{ \'MESSAGE_NO_RESULTS_AVAILABLE\' | translate }}
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/contactmanager/list/view/view.html",'\n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n {{list.name}}\n
            \n \n
            \n \n\n \n \n \n
            \n \n
            \n \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/contactmanager/list/view/view.settings.html",'
            \n
            \n
            \n
            \n
            \n \n {{ \'APPLICATION_LIST\' | translate}} {{ \'APPLICATION_SETTINGS\' | translate}} \n
            \n \n
            \n\n
            \n
            \n \n
            \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n \n
            \n
            \n \n\n
            \n
            \n
            \n
            \n
            \n'),a.put("app/dashboard/chat/chat.html",'
            \n
            \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n \n  {{ \'APPLICATION_TODAY_STATS\' | translate }}\n \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{waiting || 0}}\n
            \n
            \n {{\'APPLICATION_DASHBOARD_WAITING_NEW\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{open || 0}}\n
            \n
            \n {{\'APPLICATION_DASHBOARD_OPEN\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{unmanaged || 0}}\n
            \n
            \n {{\'APPLICATION_UNMANAGED\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{closed || 0}}\n
            \n
            \n {{\'APPLICATION_DASHBOARD_CLOSED\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{abandoned || 0}}\n
            \n
            \n {{\'APPLICATION_DASHBOARD_ABANDONED\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{new+open+unmanaged+closed+abandoned || 0}}\n
            \n
            \n {{\'APPLICATION_TOTAL\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n \n \n \n
            \n
            \n \n  {{ \'APPLICATION_INTERACTION_STATS\' | translate }}\n \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{timeout || 0}}\n
            \n
            \n {{\'APPLICATION_TIMEOUT\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{waiting || 0}}\n
            \n
            \n {{\'APPLICATION_WAITING\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n\n
            \n
            \n'),a.put("app/dashboard/dashboard.html",'\n\n\n'),a.put("app/dashboard/fax/fax.html",'
            \n
            \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n \n  {{ \'APPLICATION_TODAY_STATS\' | translate }}\n \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{new || 0}}\n
            \n
            \n {{\'APPLICATION_DASHBOARD_NEW\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{open || 0}}\n
            \n
            \n {{\'APPLICATION_DASHBOARD_OPEN\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{pending || 0}}\n
            \n
            \n {{\'APPLICATION_DASHBOARD_PENDING\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{closed || 0}}\n
            \n
            \n {{\'APPLICATION_DASHBOARD_CLOSED\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{new+open+pending+closed || 0}}\n
            \n
            \n {{\'APPLICATION_TOTAL\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n \n \n \n
            \n
            \n \n  {{ \'APPLICATION_INTERACTION_STATS\' | translate }}\n \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{timeout || 0}}\n
            \n
            \n {{\'APPLICATION_TIMEOUT\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{waiting || 0}}\n
            \n
            \n {{\'APPLICATION_WAITING\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n\n
            \n
            \n'), -a.put("app/dashboard/mail/mail.html",'
            \n
            \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n \n  {{ \'APPLICATION_TODAY_STATS\' | translate }}\n \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{new || 0}}\n
            \n
            \n {{\'APPLICATION_DASHBOARD_NEW\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{open || 0}}\n
            \n
            \n {{\'APPLICATION_DASHBOARD_OPEN\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{pending || 0}}\n
            \n
            \n {{\'APPLICATION_DASHBOARD_PENDING\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{closed || 0}}\n
            \n
            \n {{\'APPLICATION_DASHBOARD_CLOSED\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{new+open+pending+closed || 0}}\n
            \n
            \n {{\'APPLICATION_TOTAL\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n \n \n \n
            \n
            \n \n  {{ \'APPLICATION_INTERACTION_STATS\' | translate }}\n \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{timeout || 0}}\n
            \n
            \n {{\'APPLICATION_TIMEOUT\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{waiting || 0}}\n
            \n
            \n {{\'APPLICATION_WAITING\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n\n
            \n
            \n'),a.put("app/dashboard/openchannel/openchannel.html",'
            \n
            \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n \n  {{ \'APPLICATION_TODAY_STATS\' | translate }}\n \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{new || 0}}\n
            \n
            \n {{\'APPLICATION_DASHBOARD_NEW\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{open || 0}}\n
            \n
            \n {{\'APPLICATION_DASHBOARD_OPEN\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{pending || 0}}\n
            \n
            \n {{\'APPLICATION_DASHBOARD_PENDING\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{closed || 0}}\n
            \n
            \n {{\'APPLICATION_DASHBOARD_CLOSED\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{new+open+pending+closed || 0}}\n
            \n
            \n {{\'APPLICATION_TOTAL\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n \n \n \n
            \n
            \n \n  {{ \'APPLICATION_INTERACTION_STATS\' | translate }}\n \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{timeout || 0}}\n
            \n
            \n {{\'APPLICATION_TIMEOUT\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{waiting || 0}}\n
            \n
            \n {{\'APPLICATION_WAITING\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n\n
            \n
            \n'),a.put("app/dashboard/sms/sms.html",'
            \n
            \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n \n  {{ \'APPLICATION_TODAY_STATS\' | translate }}\n \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{new || 0}}\n
            \n
            \n {{\'APPLICATION_DASHBOARD_NEW\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{open || 0}}\n
            \n
            \n {{\'APPLICATION_DASHBOARD_OPEN\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{pending || 0}}\n
            \n
            \n {{\'APPLICATION_DASHBOARD_PENDING\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{closed || 0}}\n
            \n
            \n {{\'APPLICATION_DASHBOARD_CLOSED\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{new+open+pending+closed || 0}}\n
            \n
            \n {{\'APPLICATION_TOTAL\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n \n \n \n
            \n
            \n \n  {{ \'APPLICATION_INTERACTION_STATS\' | translate }}\n \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{timeout || 0}}\n
            \n
            \n {{\'APPLICATION_TIMEOUT\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{waiting || 0}}\n
            \n
            \n {{\'APPLICATION_WAITING\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n\n
            \n
            \n'),a.put("app/dashboard/voice/voice.html",'
            \n
            \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n\n
            \n \n
            \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n \n
            \n
            {{\'MESSAGE_NO_RESULTS_AVAILABLE\' | translate}}
            \n
            \n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n {{ \'APPLICATION_INBOUND\' | translate }}{{ \'APPLICATION_TODAY_STATS\' | translate }}\n \n\n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{waiting || 0}}\n
            \n
            \n {{\'APPLICATION_WAITING\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{active || 0}}\n
            \n
            \n {{\'APPLICATION_ACTIVE\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{answered || 0}}\n
            \n
            \n {{\'APPLICATION_ANSWERED\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{abandoned || 0}}\n
            \n
            \n {{\'APPLICATION_ABANDONED\' | translate}}\n
            \n
            \n
            \n
            \n
            \n\n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{avganswertime || 0}}\n
            \n
            \n {{\'APPLICATION_AVG_ANSWER_TIME\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{avgtalktime || 0}}\n
            \n
            \n {{\'APPLICATION_AVG_TALK_TIME\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{answerrate || 0}}\n
            \n
            \n {{\'APPLICATION_ANSWER_RATE\' | translate}} (%)\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{abandonrate || 0}}\n
            \n
            \n {{\'APPLICATION_ABANDON_RATE\' | translate}} (%)\n
            \n
            \n
            \n
            \n
            \n\n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{totaloffered || 0}}\n
            \n
            \n {{\'APPLICATION_TOTAL_OFFERED\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{unmanaged || 0}}\n
            \n
            \n {{\'APPLICATION_UNMANAGED\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n\n
            \n \n {{ \'APPLICATION_OUTBOUND\' | translate }}{{ \'APPLICATION_TODAY_STATS\' | translate }}\n \n\n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{manualoutbound || 0}}\n
            \n
            \n {{\'APPLICATION_MANUAL_OUTBOUND\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{manualoutboundglobalduration || 0}}\n
            \n
            \n {{\'APPLICATION_GLOBAL_DURATION\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{manualoutboundanswered || 0}}\n
            \n
            \n {{\'APPLICATION_ANSWERED\' | translate}}\n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{manualoutboundavgduration || 0}}\n
            \n
            \n {{\'APPLICATION_AVG_DURATION\' | translate}} (%)\n
            \n
            \n
            \n
            \n
            \n\n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n {{manualoutboundanswerrate || 0}}\n
            \n
            \n {{\'APPLICATION_ANSWER_RATE\' | translate}} (%)\n
            \n
            \n
            \n
            \n
            \n\n
            \n
            \n
            \n'),a.put("app/desk/list/list.html",'\n
            \n
            \n \n\n \n
            \n
            \n
            \n \n {{ \'APPLICATION_DESK_COM\' | translate }} \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 {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n \n \n \n \n
            \n
            \n
            \n
            {{ \'APPLICATION_NAME\' | translate }}{{ \'APPLICATION_EMAIL\' | translate }}{{ \'APPLICATION_REMOTE_ADDRESS\' | translate }}{{ \'APPLICATION_DESCRIPTION\' | translate }}{{ \'APPLICATION_ACTIONS\' | translate }}
            {{account.name}}{{account.username}}{{account.remoteUri}}{{account.description}}\n \n {{ \'APPLICATION_EDIT\' | translate }}\n \n \n {{ \'APPLICATION_CHECK\' | translate }}\n \n \n {{ \'APPLICATION_DELETE\' | translate }}\n \n
            \n No account available\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'), -a.put("app/desk/view/view.account.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_ACCOUNT\' | translate}}\n
            \n \n
            \n
            \n
            \n \n
            \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected | capitalize}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n
            \n \n\n
            \n
            \n
            \n
            \n
            \n'),a.put("app/desk/view/view.configuration.html",'
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_CONFIGURATION\' | translate }} WIZARD \n
            \n
            \n
            \n \n \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n
            \n \n\n \n
            \n
            \n\n \n

            {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

            \n \n \n
            \n
            \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/desk/view/view.configurationSettings.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}\n
            \n \n
            \n
            \n
            \n \n
            \n
            \n
            \n All following fields will be join by blank space:\n
            \n
            \n \n
            \n
            \n
            \n \n
            \n
            \n \n {{$select.selected | capitalize}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n
            \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n \n
            \n \n \n
            \n
            \n
            \n All following fields will be join by new line:\n
            \n
            \n \n
            \n
            \n
            \n \n
            \n \n
            \n \n {{$select.selected | ucfirst}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n \n
            \n
            \n \n {{$select.selected | capitalize}}\n \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n \n
            \n \n \n
            \n
            \n
            \n Add how to fill the fields present in your account:\n
            \n
            \n \n
            \n
            \n
            \n \n
            \n
            \n \n {{$select.selected.label}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n \n {{$select.selected}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n {{$select.selected | ucfirst}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n
            \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n \n
            \n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/desk/view/view.configurations.html",'
            \n
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_CONFIGURATIONS\' | translate}}\n
            \n \n
            \n
            \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
            {{\'APPLICATION_NAME\' | translate}}{{\'APPLICATION_DESCRIPTION\' | translate}}{{ \'APPLICATION_ACTIONS\' | translate }}
            {{configuration.name}}{{configuration.description}}\n \n {{ \'APPLICATION_SETTINGS\' | translate}}\n \n \n {{ \'APPLICATION_DELETE\' | translate }}\n \n
            \n No configuration available\n
            \n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/desk/view/view.html",'\n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n {{account.name}}\n
            \n
            \n {{account.remoteUri}}\n
            \n
            \n \n \n \n \n
            \n \n
            \n \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/desk/wizard/wizard.html",'\n\n\n\n\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD \n
            \n
            \n
            \n \n \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n \n
            \n \n\n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_EXIST_DOMAIN\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n {{$select.selected | capitalize}}\n \n
            \n
            \n
            \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n\n
            \n
            \n\n \n

            {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

            \n \n \n
            \n\n
            \n\n
            \n
            \n \n
            \n
            \n\n'), -a.put("app/freshdesk/list/list.html",'\n
            \n
            \n \n\n \n
            \n
            \n
            \n \n {{ \'APPLICATION_FRESHDESK\' | translate }} \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 {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n \n \n \n \n
            \n
            \n
            \n
            {{ \'APPLICATION_NAME\' | translate }}{{ \'APPLICATION_EMAIL\' | translate }}{{ \'APPLICATION_REMOTE_ADDRESS\' | translate }}{{ \'APPLICATION_DESCRIPTION\' | translate }}{{ \'APPLICATION_ACTIONS\' | translate }}
            {{account.name}}{{account.username}}{{account.remoteUri}}{{account.description}}\n \n {{ \'APPLICATION_EDIT\' | translate }}\n \n \n {{ \'APPLICATION_CHECK\' | translate }}\n \n \n {{ \'APPLICATION_DELETE\' | translate }}\n \n
            \n No account available\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'),a.put("app/freshdesk/view/view.account.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_ACCOUNT\' | translate}}\n
            \n \n
            \n
            \n
            \n \n
            \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n
            \n \n\n
            \n
            \n
            \n
            \n
            \n'),a.put("app/freshdesk/view/view.configuration.html",'
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_CONFIGURATION\' | translate }} WIZARD \n
            \n
            \n
            \n \n \n
            \n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n \n
            \n \n \n
            \n \n\n \n
            \n
            \n\n \n

            {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

            \n \n \n
            \n
            \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/freshdesk/view/view.configurationSettings.html",'
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_CONFIGURATION\' | translate}}: {{configurationName}}\n
            \n \n
            \n
            \n
            \n \n
            \n
            \n
            \n All following fields will be join by blank space:\n
            \n
            \n \n
            \n
            \n
            \n \n
            \n
            \n \n {{$select.selected | capitalize}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n
            \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n \n
            \n \n \n
            \n
            \n
            \n All following fields will be join by new line:\n
            \n
            \n \n
            \n
            \n
            \n \n
            \n \n
            \n \n {{$select.selected | ucfirst}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n \n
            \n
            \n \n {{$select.selected | capitalize}}\n \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n \n
            \n \n \n
            \n
            \n
            \n Add how to fill the fields present in your account:\n
            \n
            \n \n
            \n
            \n
            \n \n
            \n
            \n \n {{$select.selected.label}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n \n {{$select.selected[0]}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n {{$select.selected | ucfirst}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n
            \n \n {{$select.selected.name}}\n \n
            \n
            \n
            \n
            \n
            \n
            \n
            \n \n
            \n
            \n
            \n \n
            \n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/freshdesk/view/view.configurations.html",'
            \n
            \n
            \n
            \n
            \n
            \n \n {{\'APPLICATION_CONFIGURATIONS\' | translate}}\n
            \n \n
            \n
            \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
            {{\'APPLICATION_NAME\' | translate}}{{\'APPLICATION_DESCRIPTION\' | translate}}{{ \'APPLICATION_ACTIONS\' | translate }}
            {{configuration.name}}{{configuration.description}}\n \n {{ \'APPLICATION_SETTINGS\' | translate}}\n \n \n {{ \'APPLICATION_DELETE\' | translate }}\n \n
            \n No configuration available\n
            \n \n
            \n
            \n
            \n
            \n
            \n'),a.put("app/freshdesk/view/view.html",'\n
            \n
            \n \n\n \n
            \n \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n {{account.name}}\n
            \n
            \n {{account.remoteUri}}\n
            \n
            \n \n \n \n \n
            \n \n
            \n \n \n
            \n
            \n \n
            \n
            \n\n'),a.put("app/freshdesk/wizard/wizard.html",'\n\n\n\n\n
            \n
            \n \n
            \n
            \n
            \n \n {{ \'APPLICATION_ACCOUNT\' | translate }} WIZARD \n
            \n
            \n
            \n \n \n
            \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_EXIST_USERNAME\' | translate}}.\n \n
            \n \n\n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_EXIST_DOMAIN\' | translate}}.\n \n
            \n \n\n \n
            \n \n \n \n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\n \n
            \n \n\n \n\n
            \n
            \n\n \n

            {{\'MESSAGE_CONFIGURATION_COMPLETED\' | translate}}

            \n \n \n
            \n\n
            \n\n
            \n
            \n \n
            \n
            \n\n'), -a.put("app/iframe/view/view.html",'\r\n
            \r\n
            \r\n \r\n\r\n \r\n
            \r\n \r\n
            \r\n \r\n
            \r\n \r\n
            \r\n \r\n \r\n
            \r\n
            \r\n {{iframe.title}}\r\n
            \r\n
            \r\n {{ \'APPLICATION_IFRAME\' | translate }}\r\n
            \r\n
            \r\n \r\n
            \r\n \r\n
            \r\n \r\n \r\n
            \r\n
            \r\n
            \r\n
            \r\n
            \r\n
            \r\n \r\n {{\'APPLICATION_IFRAME\' | translate}}\r\n
            \r\n \r\n
            \r\n
            \r\n
            \r\n \r\n
            \r\n
            \r\n \r\n
            \r\n \r\n \r\n \r\n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\r\n \r\n
            \r\n \r\n\r\n \r\n
            \r\n \r\n \r\n \r\n {{\'APPLICATION_WARNING\' | translate}}! {{\'MESSAGE_REQUIRED_FIELD\' | translate}}.\r\n \r\n
            \r\n \r\n\r\n \r\n
            \r\n
            \r\n \r\n\r\n
            \r\n
            \r\n
            \r\n
            \r\n
            \r\n
            \r\n \r\n\r\n
            \r\n
            \r\n '); - var attributes = element.prop("attributes"); - // loop through element attributes and apply them on iframe - angular.forEach(attributes, function(attr) { - iframe.attr(attr.name, attr.value); - }); - iframe.attr('src', iframe.attr('ta-insert-video')); - element.replaceWith(iframe); - } - } -]) - -.value('taTranslations', { - // moved to sub-elements - //toggleHTML: "Toggle HTML", - //insertImage: "Please enter a image URL to insert", - //insertLink: "Please enter a URL to insert", - //insertVideo: "Please enter a youtube URL to embed", - html: { - tooltip: 'Toggle html / Rich Text' - }, - // tooltip for heading - might be worth splitting - heading: { - tooltip: 'Heading ' - }, - p: { - tooltip: 'Paragraph' - }, - pre: { - tooltip: 'Preformatted text' - }, - ul: { - tooltip: 'Unordered List' - }, - ol: { - tooltip: 'Ordered List' - }, - quote: { - tooltip: 'Quote/unquote selection or paragraph' - }, - undo: { - tooltip: 'Undo' - }, - redo: { - tooltip: 'Redo' - }, - bold: { - tooltip: 'Bold' - }, - italic: { - tooltip: 'Italic' - }, - underline: { - tooltip: 'Underline' - }, - strikeThrough:{ - tooltip: 'Strikethrough' - }, - justifyLeft: { - tooltip: 'Align text left' - }, - justifyRight: { - tooltip: 'Align text right' - }, - justifyFull: { - tooltip: 'Justify text' - }, - justifyCenter: { - tooltip: 'Center' - }, - indent: { - tooltip: 'Increase indent' - }, - outdent: { - tooltip: 'Decrease indent' - }, - clear: { - tooltip: 'Clear formatting' - }, - insertImage: { - dialogPrompt: 'Please enter an image URL to insert', - tooltip: 'Insert image', - hotkey: 'the - possibly language dependent hotkey ... for some future implementation' - }, - insertVideo: { - tooltip: 'Insert video', - dialogPrompt: 'Please enter a youtube URL to embed' - }, - insertLink: { - tooltip: 'Insert / edit link', - dialogPrompt: "Please enter a URL to insert" - }, - editLink: { - reLinkButton: { - tooltip: "Relink" - }, - unLinkButton: { - tooltip: "Unlink" - }, - targetToggle: { - buttontext: "Open in New Window" - } - }, - wordcount: { - tooltip: 'Display words Count' - }, - charcount: { - tooltip: 'Display characters Count' - } -}) -.factory('taToolFunctions', ['$window','taTranslations', function($window, taTranslations) { - return { - imgOnSelectAction: function(event, $element, editorScope){ - // setup the editor toolbar - // Credit to the work at http://hackerwins.github.io/summernote/ for this editbar logic/display - var finishEdit = function(){ - editorScope.updateTaBindtaTextElement(); - editorScope.hidePopover(); - }; - event.preventDefault(); - editorScope.displayElements.popover.css('width', '375px'); - var container = editorScope.displayElements.popoverContainer; - container.empty(); - var buttonGroup = angular.element('
            '); - var fullButton = angular.element(''); - fullButton.on('click', function(event){ - event.preventDefault(); - $element.css({ - 'width': '100%', - 'height': '' - }); - finishEdit(); - }); - var halfButton = angular.element(''); - halfButton.on('click', function(event){ - event.preventDefault(); - $element.css({ - 'width': '50%', - 'height': '' - }); - finishEdit(); - }); - var quartButton = angular.element(''); - quartButton.on('click', function(event){ - event.preventDefault(); - $element.css({ - 'width': '25%', - 'height': '' - }); - finishEdit(); - }); - var resetButton = angular.element(''); - resetButton.on('click', function(event){ - event.preventDefault(); - $element.css({ - width: '', - height: '' - }); - finishEdit(); - }); - buttonGroup.append(fullButton); - buttonGroup.append(halfButton); - buttonGroup.append(quartButton); - buttonGroup.append(resetButton); - container.append(buttonGroup); - - buttonGroup = angular.element('
            '); - var floatLeft = angular.element(''); - floatLeft.on('click', function(event){ - event.preventDefault(); - // webkit - $element.css('float', 'left'); - // firefox - $element.css('cssFloat', 'left'); - // IE < 8 - $element.css('styleFloat', 'left'); - finishEdit(); - }); - var floatRight = angular.element(''); - floatRight.on('click', function(event){ - event.preventDefault(); - // webkit - $element.css('float', 'right'); - // firefox - $element.css('cssFloat', 'right'); - // IE < 8 - $element.css('styleFloat', 'right'); - finishEdit(); - }); - var floatNone = angular.element(''); - floatNone.on('click', function(event){ - event.preventDefault(); - // webkit - $element.css('float', ''); - // firefox - $element.css('cssFloat', ''); - // IE < 8 - $element.css('styleFloat', ''); - finishEdit(); - }); - buttonGroup.append(floatLeft); - buttonGroup.append(floatNone); - buttonGroup.append(floatRight); - container.append(buttonGroup); - - buttonGroup = angular.element('
            '); - var remove = angular.element(''); - remove.on('click', function(event){ - event.preventDefault(); - $element.remove(); - finishEdit(); - }); - buttonGroup.append(remove); - container.append(buttonGroup); - - editorScope.showPopover($element); - editorScope.showResizeOverlay($element); - }, - aOnSelectAction: function(event, $element, editorScope){ - // setup the editor toolbar - // Credit to the work at http://hackerwins.github.io/summernote/ for this editbar logic - event.preventDefault(); - editorScope.displayElements.popover.css('width', '436px'); - var container = editorScope.displayElements.popoverContainer; - container.empty(); - container.css('line-height', '28px'); - var link = angular.element('' + $element.attr('href') + ''); - link.css({ - 'display': 'inline-block', - 'max-width': '200px', - 'overflow': 'hidden', - 'text-overflow': 'ellipsis', - 'white-space': 'nowrap', - 'vertical-align': 'middle' - }); - container.append(link); - var buttonGroup = angular.element('
            '); - var reLinkButton = angular.element(''); - reLinkButton.on('click', function(event){ - event.preventDefault(); - var urlLink = $window.prompt(taTranslations.insertLink.dialogPrompt, $element.attr('href')); - if(urlLink && urlLink !== '' && urlLink !== 'http://'){ - $element.attr('href', urlLink); - editorScope.updateTaBindtaTextElement(); - } - editorScope.hidePopover(); - }); - buttonGroup.append(reLinkButton); - var unLinkButton = angular.element(''); - // directly before this click event is fired a digest is fired off whereby the reference to $element is orphaned off - unLinkButton.on('click', function(event){ - event.preventDefault(); - $element.replaceWith($element.contents()); - editorScope.updateTaBindtaTextElement(); - editorScope.hidePopover(); - }); - buttonGroup.append(unLinkButton); - var targetToggle = angular.element(''); - if($element.attr('target') === '_blank'){ - targetToggle.addClass('active'); - } - targetToggle.on('click', function(event){ - event.preventDefault(); - $element.attr('target', ($element.attr('target') === '_blank') ? '' : '_blank'); - targetToggle.toggleClass('active'); - editorScope.updateTaBindtaTextElement(); - }); - buttonGroup.append(targetToggle); - container.append(buttonGroup); - editorScope.showPopover($element); - }, - extractYoutubeVideoId: function(url) { - var re = /(?:youtube(?:-nocookie)?\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=)|youtu\.be\/)([a-zA-Z0-9_-]{11})/i; - var match = url.match(re); - return (match && match[1]) || null; - } - }; -}]) -.run(['taRegisterTool', '$window', 'taTranslations', 'taSelection', 'taToolFunctions', '$sanitize', 'taOptions', function(taRegisterTool, $window, taTranslations, taSelection, taToolFunctions, $sanitize, taOptions){ - // test for the version of $sanitize that is in use - // You can disable this check by setting taOptions.textAngularSanitize == false - var gv = {}; $sanitize('', gv); - /* istanbul ignore next, throws error */ - if ((taOptions.forceTextAngularSanitize===true) && (gv.version !== 'taSanitize')) { - throw angular.$$minErr('textAngular')("textAngularSetup", "The textAngular-sanitize provider has been replaced by another -- have you included angular-sanitize by mistake?"); - } - taRegisterTool("html", { - iconclass: 'fa fa-code', - tooltiptext: taTranslations.html.tooltip, - action: function(){ - this.$editor().switchView(); - }, - activeState: function(){ - return this.$editor().showHtml; - } - }); - // add the Header tools - // convenience functions so that the loop works correctly - var _retActiveStateFunction = function(q){ - return function(){ return this.$editor().queryFormatBlockState(q); }; - }; - var headerAction = function(){ - return this.$editor().wrapSelection("formatBlock", "<" + this.name.toUpperCase() +">"); - }; - angular.forEach(['h1','h2','h3','h4','h5','h6'], function(h){ - taRegisterTool(h.toLowerCase(), { - buttontext: h.toUpperCase(), - tooltiptext: taTranslations.heading.tooltip + h.charAt(1), - action: headerAction, - activeState: _retActiveStateFunction(h.toLowerCase()) - }); - }); - taRegisterTool('p', { - buttontext: 'P', - tooltiptext: taTranslations.p.tooltip, - action: function(){ - return this.$editor().wrapSelection("formatBlock", "

            "); - }, - activeState: function(){ return this.$editor().queryFormatBlockState('p'); } - }); - // key: pre -> taTranslations[key].tooltip, taTranslations[key].buttontext - taRegisterTool('pre', { - buttontext: 'pre', - tooltiptext: taTranslations.pre.tooltip, - action: function(){ - return this.$editor().wrapSelection("formatBlock", "

            ");
            -		},
            -		activeState: function(){ return this.$editor().queryFormatBlockState('pre'); }
            -	});
            -	taRegisterTool('ul', {
            -		iconclass: 'fa fa-list-ul',
            -		tooltiptext: taTranslations.ul.tooltip,
            -		action: function(){
            -			return this.$editor().wrapSelection("insertUnorderedList", null);
            -		},
            -		activeState: function(){ return this.$editor().queryCommandState('insertUnorderedList'); }
            -	});
            -	taRegisterTool('ol', {
            -		iconclass: 'fa fa-list-ol',
            -		tooltiptext: taTranslations.ol.tooltip,
            -		action: function(){
            -			return this.$editor().wrapSelection("insertOrderedList", null);
            -		},
            -		activeState: function(){ return this.$editor().queryCommandState('insertOrderedList'); }
            -	});
            -	taRegisterTool('quote', {
            -		iconclass: 'fa fa-quote-right',
            -		tooltiptext: taTranslations.quote.tooltip,
            -		action: function(){
            -			return this.$editor().wrapSelection("formatBlock", "
            "); - }, - activeState: function(){ return this.$editor().queryFormatBlockState('blockquote'); } - }); - taRegisterTool('undo', { - iconclass: 'fa fa-undo', - tooltiptext: taTranslations.undo.tooltip, - action: function(){ - return this.$editor().wrapSelection("undo", null); - } - }); - taRegisterTool('redo', { - iconclass: 'fa fa-repeat', - tooltiptext: taTranslations.redo.tooltip, - action: function(){ - return this.$editor().wrapSelection("redo", null); - } - }); - taRegisterTool('bold', { - iconclass: 'fa fa-bold', - tooltiptext: taTranslations.bold.tooltip, - action: function(){ - return this.$editor().wrapSelection("bold", null); - }, - activeState: function(){ - return this.$editor().queryCommandState('bold'); - }, - commandKeyCode: 98 - }); - taRegisterTool('justifyLeft', { - iconclass: 'fa fa-align-left', - tooltiptext: taTranslations.justifyLeft.tooltip, - action: function(){ - return this.$editor().wrapSelection("justifyLeft", null); - }, - activeState: function(commonElement){ - /* istanbul ignore next: */ - if (commonElement && commonElement.nodeName === '#document') return false; - var result = false; - if (commonElement) - result = - commonElement.css('text-align') === 'left' || - commonElement.attr('align') === 'left' || - ( - commonElement.css('text-align') !== 'right' && - commonElement.css('text-align') !== 'center' && - commonElement.css('text-align') !== 'justify' && !this.$editor().queryCommandState('justifyRight') && !this.$editor().queryCommandState('justifyCenter') - ) && !this.$editor().queryCommandState('justifyFull'); - result = result || this.$editor().queryCommandState('justifyLeft'); - return result; - } - }); - taRegisterTool('justifyRight', { - iconclass: 'fa fa-align-right', - tooltiptext: taTranslations.justifyRight.tooltip, - action: function(){ - return this.$editor().wrapSelection("justifyRight", null); - }, - activeState: function(commonElement){ - /* istanbul ignore next: */ - if (commonElement && commonElement.nodeName === '#document') return false; - var result = false; - if(commonElement) result = commonElement.css('text-align') === 'right'; - result = result || this.$editor().queryCommandState('justifyRight'); - return result; - } - }); - taRegisterTool('justifyFull', { - iconclass: 'fa fa-align-justify', - tooltiptext: taTranslations.justifyFull.tooltip, - action: function(){ - return this.$editor().wrapSelection("justifyFull", null); - }, - activeState: function(commonElement){ - var result = false; - if(commonElement) result = commonElement.css('text-align') === 'justify'; - result = result || this.$editor().queryCommandState('justifyFull'); - return result; - } - }); - taRegisterTool('justifyCenter', { - iconclass: 'fa fa-align-center', - tooltiptext: taTranslations.justifyCenter.tooltip, - action: function(){ - return this.$editor().wrapSelection("justifyCenter", null); - }, - activeState: function(commonElement){ - /* istanbul ignore next: */ - if (commonElement && commonElement.nodeName === '#document') return false; - var result = false; - if(commonElement) result = commonElement.css('text-align') === 'center'; - result = result || this.$editor().queryCommandState('justifyCenter'); - return result; - } - }); - taRegisterTool('indent', { - iconclass: 'fa fa-indent', - tooltiptext: taTranslations.indent.tooltip, - action: function(){ - return this.$editor().wrapSelection("indent", null); - }, - activeState: function(){ - return this.$editor().queryFormatBlockState('blockquote'); - }, - commandKeyCode: 'TabKey' - }); - taRegisterTool('outdent', { - iconclass: 'fa fa-outdent', - tooltiptext: taTranslations.outdent.tooltip, - action: function(){ - return this.$editor().wrapSelection("outdent", null); - }, - activeState: function(){ - return false; - }, - commandKeyCode: 'ShiftTabKey' - }); - taRegisterTool('italics', { - iconclass: 'fa fa-italic', - tooltiptext: taTranslations.italic.tooltip, - action: function(){ - return this.$editor().wrapSelection("italic", null); - }, - activeState: function(){ - return this.$editor().queryCommandState('italic'); - }, - commandKeyCode: 105 - }); - taRegisterTool('underline', { - iconclass: 'fa fa-underline', - tooltiptext: taTranslations.underline.tooltip, - action: function(){ - return this.$editor().wrapSelection("underline", null); - }, - activeState: function(){ - return this.$editor().queryCommandState('underline'); - }, - commandKeyCode: 117 - }); - taRegisterTool('strikeThrough', { - iconclass: 'fa fa-strikethrough', - tooltiptext: taTranslations.strikeThrough.tooltip, - action: function(){ - return this.$editor().wrapSelection("strikeThrough", null); - }, - activeState: function(){ - return document.queryCommandState('strikeThrough'); - } - }); - taRegisterTool('clear', { - iconclass: 'fa fa-ban', - tooltiptext: taTranslations.clear.tooltip, - action: function(deferred, restoreSelection){ - var i; - this.$editor().wrapSelection("removeFormat", null); - var possibleNodes = angular.element(taSelection.getSelectionElement()); - // remove lists - var removeListElements = function(list){ - list = angular.element(list); - var prevElement = list; - angular.forEach(list.children(), function(liElem){ - var newElem = angular.element('

            '); - newElem.html(angular.element(liElem).html()); - prevElement.after(newElem); - prevElement = newElem; - }); - list.remove(); - }; - angular.forEach(possibleNodes.find("ul"), removeListElements); - angular.forEach(possibleNodes.find("ol"), removeListElements); - if(possibleNodes[0].tagName.toLowerCase() === 'li'){ - var _list = possibleNodes[0].parentNode.childNodes; - var _preLis = [], _postLis = [], _found = false; - for(i = 0; i < _list.length; i++){ - if(_list[i] === possibleNodes[0]){ - _found = true; - }else if(!_found) _preLis.push(_list[i]); - else _postLis.push(_list[i]); - } - var _parent = angular.element(possibleNodes[0].parentNode); - var newElem = angular.element('

            '); - newElem.html(angular.element(possibleNodes[0]).html()); - if(_preLis.length === 0 || _postLis.length === 0){ - if(_postLis.length === 0) _parent.after(newElem); - else _parent[0].parentNode.insertBefore(newElem[0], _parent[0]); - - if(_preLis.length === 0 && _postLis.length === 0) _parent.remove(); - else angular.element(possibleNodes[0]).remove(); - }else{ - var _firstList = angular.element('<'+_parent[0].tagName+'>'); - var _secondList = angular.element('<'+_parent[0].tagName+'>'); - for(i = 0; i < _preLis.length; i++) _firstList.append(angular.element(_preLis[i])); - for(i = 0; i < _postLis.length; i++) _secondList.append(angular.element(_postLis[i])); - _parent.after(_secondList); - _parent.after(newElem); - _parent.after(_firstList); - _parent.remove(); - } - taSelection.setSelectionToElementEnd(newElem[0]); - } - // clear out all class attributes. These do not seem to be cleared via removeFormat - var $editor = this.$editor(); - var recursiveRemoveClass = function(node){ - node = angular.element(node); - if(node[0] !== $editor.displayElements.text[0]) node.removeAttr('class'); - angular.forEach(node.children(), recursiveRemoveClass); - }; - angular.forEach(possibleNodes, recursiveRemoveClass); - // check if in list. If not in list then use formatBlock option - if(possibleNodes[0].tagName.toLowerCase() !== 'li' && - possibleNodes[0].tagName.toLowerCase() !== 'ol' && - possibleNodes[0].tagName.toLowerCase() !== 'ul') this.$editor().wrapSelection("formatBlock", "default"); - restoreSelection(); - } - }); - - - taRegisterTool('insertImage', { - iconclass: 'fa fa-picture-o', - tooltiptext: taTranslations.insertImage.tooltip, - action: function(){ - var imageLink; - imageLink = $window.prompt(taTranslations.insertImage.dialogPrompt, 'http://'); - if(imageLink && imageLink !== '' && imageLink !== 'http://'){ - return this.$editor().wrapSelection('insertImage', imageLink, true); - } - }, - onElementSelect: { - element: 'img', - action: taToolFunctions.imgOnSelectAction - } - }); - taRegisterTool('insertVideo', { - iconclass: 'fa fa-youtube-play', - tooltiptext: taTranslations.insertVideo.tooltip, - action: function(){ - var urlPrompt; - urlPrompt = $window.prompt(taTranslations.insertVideo.dialogPrompt, 'https://'); - if (urlPrompt && urlPrompt !== '' && urlPrompt !== 'https://') { - - videoId = taToolFunctions.extractYoutubeVideoId(urlPrompt); - - /* istanbul ignore else: if it's invalid don't worry - though probably should show some kind of error message */ - if(videoId){ - // create the embed link - var urlLink = "https://www.youtube.com/embed/" + videoId; - // create the HTML - // for all options see: http://stackoverflow.com/questions/2068344/how-do-i-get-a-youtube-video-thumbnail-from-the-youtube-api - // maxresdefault.jpg seems to be undefined on some. - var embed = ''; - // insert - return this.$editor().wrapSelection('insertHTML', embed, true); - } - } - }, - onElementSelect: { - element: 'img', - onlyWithAttrs: ['ta-insert-video'], - action: taToolFunctions.imgOnSelectAction - } - }); - taRegisterTool('insertLink', { - tooltiptext: taTranslations.insertLink.tooltip, - iconclass: 'fa fa-link', - action: function(){ - var urlLink; - urlLink = $window.prompt(taTranslations.insertLink.dialogPrompt, 'http://'); - if(urlLink && urlLink !== '' && urlLink !== 'http://'){ - return this.$editor().wrapSelection('createLink', urlLink, true); - } - }, - activeState: function(commonElement){ - if(commonElement) return commonElement[0].tagName === 'A'; - return false; - }, - onElementSelect: { - element: 'a', - action: taToolFunctions.aOnSelectAction - } - }); - taRegisterTool('wordcount', { - display: '
            Words:
            ', - disabled: true, - wordcount: 0, - activeState: function(){ // this fires on keyup - var textElement = this.$editor().displayElements.text; - /* istanbul ignore next: will default to '' when undefined */ - var workingHTML = textElement[0].innerHTML || ''; - var noOfWords = 0; - - /* istanbul ignore if: will default to '' when undefined */ - if (workingHTML.replace(/\s*<[^>]*?>\s*/g, '') !== '') { - noOfWords = workingHTML.replace(/<\/?(b|i|em|strong|span|u|strikethrough|a|img|small|sub|sup|label)( [^>*?])?>/gi, '') // remove inline tags without adding spaces - .replace(/(<[^>]*?>\s*<[^>]*?>)/ig, ' ') // replace adjacent tags with possible space between with a space - .replace(/(<[^>]*?>)/ig, '') // remove any singular tags - .replace(/\s+/ig, ' ') // condense spacing - .match(/\S+/g).length; // count remaining non-space strings - } - - //Set current scope - this.wordcount = noOfWords; - //Set editor scope - this.$editor().wordcount = noOfWords; - - return false; - } - }); - taRegisterTool('charcount', { - display: '
            Characters:
            ', - disabled: true, - charcount: 0, - activeState: function(){ // this fires on keyup - var textElement = this.$editor().displayElements.text; - var sourceText = textElement[0].innerText || textElement[0].textContent; // to cover the non-jquery use case. - - // Caculate number of chars - var noOfChars = sourceText.replace(/(\r\n|\n|\r)/gm,"").replace(/^\s+/g,' ').replace(/\s+$/g, ' ').length; - //Set current scope - this.charcount = noOfChars; - //Set editor scope - this.$editor().charcount = noOfChars; - return false; - } - }); -}]); diff --git a/public/bower_components/ui-iconpicker/.bower.json b/public/bower_components/ui-iconpicker/.bower.json deleted file mode 100644 index 1c6b881..0000000 --- a/public/bower_components/ui-iconpicker/.bower.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "ui-iconpicker", - "description": "Bootstrap 3 Icon Picker for AngularJS", - "version": "0.1.4", - "keywords": [ - "Bootstrap", - "Font Awesome", - "Iconpicker", - "AngularJS" - ], - "license": "MIT", - "authers": [ - { - "name": "Justin Lau", - "email": "justin@tclau.com", - "homepage": "http://tclau.com" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/justin-lau/ui-iconpicker" - }, - "dependencies": { - "angular": "~1.2.16", - "angular-bootstrap": "~0.10.0", - "requirejs": "~2.1.11" - }, - "devDependencies": { - "bootstrap-sass": "twbs/bootstrap-sass#~3.1.1", - "font-awesome": "~4.0.3" - }, - "homepage": "https://github.com/justin-lau/ui-iconpicker", - "_release": "0.1.4", - "_resolution": { - "type": "version", - "tag": "v0.1.4", - "commit": "571d543db77c399f5f9b06e36a00846cb4992c38" - }, - "_source": "https://github.com/justin-lau/ui-iconpicker.git", - "_target": "^0.1.4", - "_originalSource": "ui-iconpicker", - "_direct": true -} \ No newline at end of file diff --git a/public/bower_components/ui-iconpicker/.bowerrc b/public/bower_components/ui-iconpicker/.bowerrc deleted file mode 100644 index 03fca3c..0000000 --- a/public/bower_components/ui-iconpicker/.bowerrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "directory": "src/components" -} \ No newline at end of file diff --git a/public/bower_components/ui-iconpicker/.gitignore b/public/bower_components/ui-iconpicker/.gitignore deleted file mode 100644 index e7654a6..0000000 --- a/public/bower_components/ui-iconpicker/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/.sass-cache -/dist/scripts/**/*.js.map -/node_modules -/src/components -/src/scripts/**/*.js -/src/scripts/**/*.js.map -/temp -.DS_Store -sftp-config.json -Thumbs.db \ No newline at end of file diff --git a/public/bower_components/ui-iconpicker/LICENSE b/public/bower_components/ui-iconpicker/LICENSE deleted file mode 100644 index af2b544..0000000 --- a/public/bower_components/ui-iconpicker/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Justin Lau - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/public/bower_components/ui-iconpicker/README.md b/public/bower_components/ui-iconpicker/README.md deleted file mode 100644 index 2f7846d..0000000 --- a/public/bower_components/ui-iconpicker/README.md +++ /dev/null @@ -1,89 +0,0 @@ -# ui-iconpicker - _Bootstrap 3 Icon Picker for AngularJS_ # - -[![Bower version](https://badge.fury.io/bo/ui-iconpicker.png)](http://badge.fury.io/bo/ui-iconpicker) -[![devDependencies Status](https://david-dm.org/justin-lau/ui-iconpicker/dev-status.png)](https://david-dm.org/justin-lau/ui-iconpicker#info=devDependencies) - - -ui-iconpicker is a [Bootstrap]([Bootstrap](http://getbootstrap.com/)) (and -optionally [Font Awesome](http://fortawesome.github.io/Font-Awesome/)) icons -picking component implemented in [AngularJS](https://angularjs.org/). - - - -## Demo ## - -To see the directive in action, visit http://justin-lau.github.io/ui-iconpicker/. - - - -## Usage ## - -### Dependencies ### -ui-iconpicker depends only on -[Angular UI Bootstrap](http://angular-ui.github.io/bootstrap/), and thus also -depends on [AngularJS](https://angularjs.org/) and -[Bootstrap](http://getbootstrap.com/)'s CSS. It also supports -[Font Awesome](http://fortawesome.github.io/Font-Awesome/) icons. - -### Installation ### -Normally you would use ui-iconpicker like this: - -```html - - - - - - - - - - - - - - - - - - - - - - - -``` - -ui-iconpicker also supports the AMD API ([RequireJS](http://requirejs.org/)), -the same scripts from above would look like the following with RequireJS: - -```javascript -require.config({ - paths: { - 'angular': '//ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.min', - 'angular-bootstrap': '//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.10.0/ui-bootstrap-tpls.min', - 'ui-iconpicker': '//rawgithub.com/justin-lau/ui-iconpicker/v0.1.4/dist/scripts/ui-iconpicker.min', - }, - - shim: { - 'angular': { - exports: 'angular', - }, - 'angular-bootstrap': { - deps: ['angular'], - }, - }, -}); - -require(['angular', 'ui-iconpicker'], function (angular) { - - // load ui-iconpicker as Angular dependency - angular.module('myModule', ['ui-iconpicker']); - -}); -``` \ No newline at end of file diff --git a/public/bower_components/ui-iconpicker/bower.json b/public/bower_components/ui-iconpicker/bower.json deleted file mode 100644 index d3051b5..0000000 --- a/public/bower_components/ui-iconpicker/bower.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "ui-iconpicker", - "description": "Bootstrap 3 Icon Picker for AngularJS", - "version": "0.1.4", - "keywords": [ - "Bootstrap", - "Font Awesome", - "Iconpicker", - "AngularJS" - ], - "license": "MIT", - "authers": [ - { - "name": "Justin Lau", - "email": "justin@tclau.com", - "homepage": "http://tclau.com" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/justin-lau/ui-iconpicker" - }, - "dependencies": { - "angular": "~1.2.16", - "angular-bootstrap": "~0.10.0", - "requirejs": "~2.1.11" - }, - "devDependencies": { - "bootstrap-sass": "twbs/bootstrap-sass#~3.1.1", - "font-awesome": "~4.0.3" - } -} \ No newline at end of file diff --git a/public/bower_components/ui-iconpicker/dist/scripts/ui-iconpicker.js b/public/bower_components/ui-iconpicker/dist/scripts/ui-iconpicker.js deleted file mode 100644 index c05b761..0000000 --- a/public/bower_components/ui-iconpicker/dist/scripts/ui-iconpicker.js +++ /dev/null @@ -1,277 +0,0 @@ -/** - * ui-iconpicker - * - * @version v0.1.4 - * @author Justin Lau - * @copyright Copyright (c) 2014 Justin Lau - * @license The MIT License (MIT) - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the 'Software'), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -(function() { - var umd; - - umd = function(root, factory) { - if (typeof define === "function" && (define.amd != null)) { - return define("values/icon-groups-map", ["angular"], factory); - } else { - return factory(root.angular); - } - }; - - umd(this, function(angular) { - var module; - module = angular.module("ui-iconpicker/values/icon-groups-map", []); - return module.value("iconGroupsMap", { - "bootstrap": { - prefix: "glyphicon glyphicon-", - classes: ["asterisk", "plus", "euro", "minus", "cloud", "envelope", "pencil", "glass", "music", "search", "heart", "star", "star-empty", "user", "film", "th-large", "th", "th-list", - "ok", "remove", "zoom-in", "zoom-out", "off", "signal", "cog", "trash", "home", "file", "time", "road", "download-alt", "download", "upload", "inbox", "play-circle", "repeat", - "refresh", "list-alt", "lock", "flag", "headphones", "volume-off", "volume-down", "volume-up", "qrcode", "barcode", "tag", "tags", "book", "bookmark", "print", "camera", "font", - "bold", "italic", "text-height", "text-width", "align-left", "align-center", "align-right", "align-justify", "list", "indent-left", "indent-right", "facetime-video", "picture", - "map-marker", "adjust", "tint", "edit", "share", "check", "move", "step-backward", "fast-backward", "backward", "play", "pause", "stop", "forward", "fast-forward", - "step-forward", "eject", "chevron-left", "chevron-right", "plus-sign", "minus-sign", "remove-sign", "ok-sign", "question-sign", "info-sign", "screenshot", "remove-circle", - "ok-circle", "ban-circle", "arrow-left", "arrow-right", "arrow-up", "arrow-down", "share-alt", "resize-full", "resize-small", "exclamation-sign", "gift", "leaf", "fire", - "eye-open", "eye-close", "warning-sign", "plane", "calendar", "random", "comment", "magnet", "chevron-up", "chevron-down", "retweet", "shopping-cart", "folder-close", - "folder-open", "resize-vertical", "resize-horizontal", "hdd", "bullhorn", "bell", "certificate", "thumbs-up", "thumbs-down", "hand-right", "hand-left", "hand-up", "hand-down", - "circle-arrow-right", "circle-arrow-left", "circle-arrow-up", "circle-arrow-down", "globe", "wrench", "tasks", "filter", "briefcase", "fullscreen", "dashboard", "paperclip", - "heart-empty", "link", "phone", "pushpin", "usd", "gbp", "sort", "sort-by-alphabet", "sort-by-alphabet-alt", "sort-by-order", "sort-by-order-alt", "sort-by-attributes", - "sort-by-attributes-alt", "unchecked", "expand", "collapse-down", "collapse-up", "log-in", "flash", "log-out", "new-window", "record", "save", "open", "saved", "import", - "export", "send", "floppy-disk", "floppy-saved", "floppy-remove", "floppy-save", "floppy-open", "credit-card", "transfer", "cutlery", "header", "compressed", "earphone", - "phone-alt", "tower", "stats", "sd-video", "hd-video", "subtitles", "sound-stereo", "sound-dolby", "sound-5-1", "sound-6-1", "sound-7-1", "copyright-mark", "registration-mark", - "cloud-download", "cloud-upload", "tree-conifer", "tree-deciduous" - ] - }, - "font-awesome": { - prefix: "fa fa-lg fa-", - classes: ["glass", "music", "search", "envelope-o", "heart", "star", "star-o", "user", "film", "th-large", "th", "th-list", "check", "times", "search-plus", "search-minus", - "power-off", "signal", "gear", "cog", "trash-o", "home", "file-o", "clock-o", "road", "download", "arrow-circle-o-down", "arrow-circle-o-up", "inbox", "play-circle-o", - "rotate-right", "repeat", "refresh", "list-alt", "lock", "flag", "headphones", "volume-off", "volume-down", "volume-up", "qrcode", "barcode", "tag", "tags", "book", "bookmark", - "print", "camera", "font", "bold", "italic", "text-height", "text-width", "align-left", "align-center", "align-right", "align-justify", "list", "dedent", "outdent", "indent", - "video-camera", "picture-o", "pencil", "map-marker", "adjust", "tint", "edit", "pencil-square-o", "share-square-o", "check-square-o", "arrows", "step-backward", "fast-backward", - "backward", "play", "pause", "stop", "forward", "fast-forward", "step-forward", "eject", "chevron-left", "chevron-right", "plus-circle", "minus-circle", "times-circle", - "check-circle", "question-circle", "info-circle", "crosshairs", "times-circle-o", "check-circle-o", "ban", "arrow-left", "arrow-right", "arrow-up", "arrow-down", "mail-forward", - "share", "expand", "compress", "plus", "minus", "asterisk", "exclamation-circle", "gift", "leaf", "fire", "eye", "eye-slash", "warning", "exclamation-triangle", "plane", - "calendar", "random", "comment", "magnet", "chevron-up", "chevron-down", "retweet", "shopping-cart", "folder", "folder-open", "arrows-v", "arrows-h", "bar-chart-o", - "twitter-square", "facebook-square", "camera-retro", "key", "gears", "cogs", "comments", "thumbs-o-up", "thumbs-o-down", "star-half", "heart-o", "sign-out", "linkedin-square", - "thumb-tack", "external-link", "sign-in", "trophy", "github-square", "upload", "lemon-o", "phone", "square-o", "bookmark-o", "phone-square", "twitter", "facebook", "github", - "unlock", "credit-card", "rss", "hdd-o", "bullhorn", "bell", "certificate", "hand-o-right", "hand-o-left", "hand-o-up", "hand-o-down", "arrow-circle-left", "arrow-circle-right", - "arrow-circle-up", "arrow-circle-down", "globe", "wrench", "tasks", "filter", "briefcase", "arrows-alt", "group", "users", "chain", "link", "cloud", "flask", "cut", "scissors", - "copy", "files-o", "paperclip", "save", "floppy-o", "square", "bars", "list-ul", "list-ol", "strikethrough", "underline", "table", "magic", "truck", "pinterest", - "pinterest-square", "google-plus-square", "google-plus", "money", "caret-down", "caret-up", "caret-left", "caret-right", "columns", "unsorted", "sort", "sort-down", "sort-asc", - "sort-up", "sort-desc", "envelope", "linkedin", "rotate-left", "undo", "legal", "gavel", "dashboard", "tachometer", "comment-o", "comments-o", "flash", "bolt", "sitemap", - "umbrella", "paste", "clipboard", "lightbulb-o", "exchange", "cloud-download", "cloud-upload", "user-md", "stethoscope", "suitcase", "bell-o", "coffee", "cutlery", "file-text-o", - "building-o", "hospital-o", "ambulance", "medkit", "fighter-jet", "beer", "h-square", "plus-square", "angle-double-left", "angle-double-right", "angle-double-up", - "angle-double-down", "angle-left", "angle-right", "angle-up", "angle-down", "desktop", "laptop", "tablet", "mobile-phone", "mobile", "circle-o", "quote-left", "quote-right", - "spinner", "circle", "mail-reply", "reply", "github-alt", "folder-o", "folder-open-o", "smile-o", "frown-o", "meh-o", "gamepad", "keyboard-o", "flag-o", "flag-checkered", - "terminal", "code", "reply-all", "mail-reply-all", "star-half-empty", "star-half-full", "star-half-o", "location-arrow", "crop", "code-fork", "unlink", "chain-broken", - "question", "info", "exclamation", "superscript", "subscript", "eraser", "puzzle-piece", "microphone", "microphone-slash", "shield", "calendar-o", "fire-extinguisher", "rocket", - "maxcdn", "chevron-circle-left", "chevron-circle-right", "chevron-circle-up", "chevron-circle-down", "html5", "css3", "anchor", "unlock-alt", "bullseye", "ellipsis-h", - "ellipsis-v", "rss-square", "play-circle", "ticket", "minus-square", "minus-square-o", "level-up", "level-down", "check-square", "pencil-square", "external-link-square", - "share-square", "compass", "toggle-down", "caret-square-o-down", "toggle-up", "caret-square-o-up", "toggle-right", "caret-square-o-right", "euro", "eur", "gbp", "dollar", "usd", - "rupee", "inr", "cny", "rmb", "yen", "jpy", "ruble", "rouble", "rub", "won", "krw", "bitcoin", "btc", "file", "file-text", "sort-alpha-asc", "sort-alpha-desc", "sort-amount-asc", - "sort-amount-desc", "sort-numeric-asc", "sort-numeric-desc", "thumbs-up", "thumbs-down", "youtube-square", "youtube", "xing", "xing-square", "youtube-play", "dropbox", - "stack-overflow", "instagram", "flickr", "adn", "bitbucket", "bitbucket-square", "tumblr", "tumblr-square", "long-arrow-down", "long-arrow-up", "long-arrow-left", - "long-arrow-right", "apple", "windows", "android", "linux", "dribbble", "skype", "foursquare", "trello", "female", "male", "gittip", "sun-o", "moon-o", "archive", "bug", "vk", - "weibo", "renren", "pagelines", "stack-exchange", "arrow-circle-o-right", "arrow-circle-o-left", "toggle-left", "caret-square-o-left", "dot-circle-o", "wheelchair", - "vimeo-square", "turkish-lira", "try", "plus-square-o" - ] - } - }); - }); - -}).call(this); - -(function() { - var umd; - - umd = function(root, factory) { - if (typeof define === "function" && (define.amd != null)) { - return define("services/IconGroupCollection", ["angular", "values/icon-groups-map"], factory); - } else { - return factory(root.angular); - } - }; - - umd(this, function(angular) { - var module; - module = angular.module("ui-iconpicker/services/IconGroupCollection", ["ui-iconpicker/values/icon-groups-map"]); - return module.factory("IconGroupCollection", [ - "iconGroupsMap", - function(iconGroupsMap) { - var IconGroupCollection; - return IconGroupCollection = (function() { - function IconGroupCollection(groupIdLiteral) { - if (groupIdLiteral == null) { - groupIdLiteral = "bootstrap"; - } - this.iconGroupsMap = {}; - this.includeGroups(groupIdLiteral); - } - - IconGroupCollection.prototype.filterByGroups = function(groupIdLiteral) { - var group, groupId, groupIds, _ref; - if (groupIdLiteral == null) { - groupIdLiteral = "bootstrap"; - } - if (groupIdLiteral !== "all") { - groupIds = groupIdLiteral.split(" "); - _ref = this.iconGroupsMap; - for (groupId in _ref) { - group = _ref[groupId]; - if (groupIds.indexOf(groupId) !== -1) { - delete this.iconGroupsMap[groupId]; - } - } - } - return this; - }; - - IconGroupCollection.prototype.includeGroups = function(groupIdLiteral) { - var group, groupId, groupIds; - if (groupIdLiteral == null) { - groupIdLiteral = "bootstrap"; - } - groupIds = groupIdLiteral.split(" "); - for (groupId in iconGroupsMap) { - group = iconGroupsMap[groupId]; - if (this.iconGroupsMap[groupId] == null) { - if (groupIdLiteral === "all" || groupIds.indexOf(groupId) !== -1) { - this.iconGroupsMap[groupId] = group; - } - } - } - return this; - }; - - IconGroupCollection.prototype.getClassArray = function() { - var classes, group, iconClass, id, _i, _len, _ref, _ref1; - classes = []; - _ref = this.iconGroupsMap; - for (id in _ref) { - group = _ref[id]; - _ref1 = group.classes; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - iconClass = _ref1[_i]; - classes.push(group.prefix + iconClass); - } - } - return classes; - }; - - return IconGroupCollection; - - })(); - } - ]); - }); - -}).call(this); - -(function() { - var umd; - - umd = function(root, factory) { - if (typeof define === "function" && (define.amd != null)) { - return define("templates/iconpicker", ["angular", "angular-bootstrap"], factory); - } else { - return factory(root.angular); - } - }; - - umd(this, function(angular) { - var module; - module = angular.module("ui-iconpicker/templates/iconpicker", ["ui.bootstrap"]); - return module.run([ - "$templateCache", - function($templateCache) { - // return $templateCache.put("templates/iconpicker.html", "\n \n
              \n
            • \n \n
            • \n
            \n \n
            "); - return $templateCache.put("templates/iconpicker.html", - "\n \n
              \n
            • \n \n
            • \n
            \n \n
            " - ); - } - ]); - }); - -}).call(this); - -(function() { - var umd; - - umd = function(root, factory) { - if (typeof define === "function" && (define.amd != null)) { - return define("directives/ui-iconpicker", ["angular", "services/IconGroupCollection", "templates/iconpicker"], factory); - } else { - return factory(root.angular); - } - }; - - umd(this, function(angular) { - var module; - module = angular.module("ui-iconpicker/directives/ui-iconpicker", ["ui-iconpicker/services/IconGroupCollection", "ui-iconpicker/templates/iconpicker"]); - return module.directive("uiIconpicker", [ - "IconGroupCollection", - function(IconGroupCollection) { - return { - replace: true, - restrict: "E", - scope: { - name: "@", - model: "=?ngModel" - }, - templateUrl: "templates/iconpicker.html", - link: function($scope, $element, attrs) { - var _ref; - $scope.availableIconClasses = (new IconGroupCollection(attrs.groups)).getClassArray(); - $scope.iconClass = (_ref = attrs.value) != null ? _ref : $scope.availableIconClasses[0]; - if (attrs.ngModel) { - $scope.model = $scope[attrs.ngModel]; - $scope.$watch("iconClass", function() { - return $scope.model = $scope.iconClass; - }); - $scope.$watch("model", function() { - return $scope.iconClass = $scope.model; - }); - } - $scope.$dropdownButton = $element.find("button").eq(0); - return $scope.disabled = attrs.disabled != null; - } - }; - } - ]); - }); - -}).call(this); - -(function() { - var umd; - - umd = function(root, factory) { - if (typeof define === "function" && (define.amd != null)) { - return define("ui-iconpicker", ["angular", "directives/ui-iconpicker"], factory); - } else { - return factory(root.angular); - } - }; - - umd(this, function(angular) { - return angular.module("ui-iconpicker", ["ui-iconpicker/directives/ui-iconpicker"]); - }); - -}).call(this); diff --git a/public/bower_components/ui-iconpicker/dist/scripts/ui-iconpicker.min.js b/public/bower_components/ui-iconpicker/dist/scripts/ui-iconpicker.min.js deleted file mode 100644 index 370326f..0000000 --- a/public/bower_components/ui-iconpicker/dist/scripts/ui-iconpicker.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/* - ui-iconpicker v0.1.4 - (c) 2014 Justin Lau http://justin-lau.github.io/ui-iconpicker/ - License: MIT -*/ -(function(){var e;(e=function(e,o){return"function"==typeof define&&null!=define.amd?define("values/icon-groups-map",["angular"],o):o(e.angular)})(this,function(e){var o;return o=e.module("ui-iconpicker/values/icon-groups-map",[]),o.value("iconGroupsMap",{bootstrap:{prefix:"glyphicon glyphicon-",classes:["asterisk","plus","euro","minus","cloud","envelope","pencil","glass","music","search","heart","star","star-empty","user","film","th-large","th","th-list","ok","remove","zoom-in","zoom-out","off","signal","cog","trash","home","file","time","road","download-alt","download","upload","inbox","play-circle","repeat","refresh","list-alt","lock","flag","headphones","volume-off","volume-down","volume-up","qrcode","barcode","tag","tags","book","bookmark","print","camera","font","bold","italic","text-height","text-width","align-left","align-center","align-right","align-justify","list","indent-left","indent-right","facetime-video","picture","map-marker","adjust","tint","edit","share","check","move","step-backward","fast-backward","backward","play","pause","stop","forward","fast-forward","step-forward","eject","chevron-left","chevron-right","plus-sign","minus-sign","remove-sign","ok-sign","question-sign","info-sign","screenshot","remove-circle","ok-circle","ban-circle","arrow-left","arrow-right","arrow-up","arrow-down","share-alt","resize-full","resize-small","exclamation-sign","gift","leaf","fire","eye-open","eye-close","warning-sign","plane","calendar","random","comment","magnet","chevron-up","chevron-down","retweet","shopping-cart","folder-close","folder-open","resize-vertical","resize-horizontal","hdd","bullhorn","bell","certificate","thumbs-up","thumbs-down","hand-right","hand-left","hand-up","hand-down","circle-arrow-right","circle-arrow-left","circle-arrow-up","circle-arrow-down","globe","wrench","tasks","filter","briefcase","fullscreen","dashboard","paperclip","heart-empty","link","phone","pushpin","usd","gbp","sort","sort-by-alphabet","sort-by-alphabet-alt","sort-by-order","sort-by-order-alt","sort-by-attributes","sort-by-attributes-alt","unchecked","expand","collapse-down","collapse-up","log-in","flash","log-out","new-window","record","save","open","saved","import","export","send","floppy-disk","floppy-saved","floppy-remove","floppy-save","floppy-open","credit-card","transfer","cutlery","header","compressed","earphone","phone-alt","tower","stats","sd-video","hd-video","subtitles","sound-stereo","sound-dolby","sound-5-1","sound-6-1","sound-7-1","copyright-mark","registration-mark","cloud-download","cloud-upload","tree-conifer","tree-deciduous"]},"font-awesome":{prefix:"fa fa-lg fa-",classes:["glass","music","search","envelope-o","heart","star","star-o","user","film","th-large","th","th-list","check","times","search-plus","search-minus","power-off","signal","gear","cog","trash-o","home","file-o","clock-o","road","download","arrow-circle-o-down","arrow-circle-o-up","inbox","play-circle-o","rotate-right","repeat","refresh","list-alt","lock","flag","headphones","volume-off","volume-down","volume-up","qrcode","barcode","tag","tags","book","bookmark","print","camera","font","bold","italic","text-height","text-width","align-left","align-center","align-right","align-justify","list","dedent","outdent","indent","video-camera","picture-o","pencil","map-marker","adjust","tint","edit","pencil-square-o","share-square-o","check-square-o","arrows","step-backward","fast-backward","backward","play","pause","stop","forward","fast-forward","step-forward","eject","chevron-left","chevron-right","plus-circle","minus-circle","times-circle","check-circle","question-circle","info-circle","crosshairs","times-circle-o","check-circle-o","ban","arrow-left","arrow-right","arrow-up","arrow-down","mail-forward","share","expand","compress","plus","minus","asterisk","exclamation-circle","gift","leaf","fire","eye","eye-slash","warning","exclamation-triangle","plane","calendar","random","comment","magnet","chevron-up","chevron-down","retweet","shopping-cart","folder","folder-open","arrows-v","arrows-h","bar-chart-o","twitter-square","facebook-square","camera-retro","key","gears","cogs","comments","thumbs-o-up","thumbs-o-down","star-half","heart-o","sign-out","linkedin-square","thumb-tack","external-link","sign-in","trophy","github-square","upload","lemon-o","phone","square-o","bookmark-o","phone-square","twitter","facebook","github","unlock","credit-card","rss","hdd-o","bullhorn","bell","certificate","hand-o-right","hand-o-left","hand-o-up","hand-o-down","arrow-circle-left","arrow-circle-right","arrow-circle-up","arrow-circle-down","globe","wrench","tasks","filter","briefcase","arrows-alt","group","users","chain","link","cloud","flask","cut","scissors","copy","files-o","paperclip","save","floppy-o","square","bars","list-ul","list-ol","strikethrough","underline","table","magic","truck","pinterest","pinterest-square","google-plus-square","google-plus","money","caret-down","caret-up","caret-left","caret-right","columns","unsorted","sort","sort-down","sort-asc","sort-up","sort-desc","envelope","linkedin","rotate-left","undo","legal","gavel","dashboard","tachometer","comment-o","comments-o","flash","bolt","sitemap","umbrella","paste","clipboard","lightbulb-o","exchange","cloud-download","cloud-upload","user-md","stethoscope","suitcase","bell-o","coffee","cutlery","file-text-o","building-o","hospital-o","ambulance","medkit","fighter-jet","beer","h-square","plus-square","angle-double-left","angle-double-right","angle-double-up","angle-double-down","angle-left","angle-right","angle-up","angle-down","desktop","laptop","tablet","mobile-phone","mobile","circle-o","quote-left","quote-right","spinner","circle","mail-reply","reply","github-alt","folder-o","folder-open-o","smile-o","frown-o","meh-o","gamepad","keyboard-o","flag-o","flag-checkered","terminal","code","reply-all","mail-reply-all","star-half-empty","star-half-full","star-half-o","location-arrow","crop","code-fork","unlink","chain-broken","question","info","exclamation","superscript","subscript","eraser","puzzle-piece","microphone","microphone-slash","shield","calendar-o","fire-extinguisher","rocket","maxcdn","chevron-circle-left","chevron-circle-right","chevron-circle-up","chevron-circle-down","html5","css3","anchor","unlock-alt","bullseye","ellipsis-h","ellipsis-v","rss-square","play-circle","ticket","minus-square","minus-square-o","level-up","level-down","check-square","pencil-square","external-link-square","share-square","compass","toggle-down","caret-square-o-down","toggle-up","caret-square-o-up","toggle-right","caret-square-o-right","euro","eur","gbp","dollar","usd","rupee","inr","cny","rmb","yen","jpy","ruble","rouble","rub","won","krw","bitcoin","btc","file","file-text","sort-alpha-asc","sort-alpha-desc","sort-amount-asc","sort-amount-desc","sort-numeric-asc","sort-numeric-desc","thumbs-up","thumbs-down","youtube-square","youtube","xing","xing-square","youtube-play","dropbox","stack-overflow","instagram","flickr","adn","bitbucket","bitbucket-square","tumblr","tumblr-square","long-arrow-down","long-arrow-up","long-arrow-left","long-arrow-right","apple","windows","android","linux","dribbble","skype","foursquare","trello","female","male","gittip","sun-o","moon-o","archive","bug","vk","weibo","renren","pagelines","stack-exchange","arrow-circle-o-right","arrow-circle-o-left","toggle-left","caret-square-o-left","dot-circle-o","wheelchair","vimeo-square","turkish-lira","try","plus-square-o"]}})})}).call(this),function(){var e;(e=function(e,o){return"function"==typeof define&&null!=define.amd?define("services/IconGroupCollection",["angular","values/icon-groups-map"],o):o(e.angular)})(this,function(e){var o;return o=e.module("ui-iconpicker/services/IconGroupCollection",["ui-iconpicker/values/icon-groups-map"]),o.factory("IconGroupCollection",["iconGroupsMap",function(e){var o;return o=function(){function o(e){null==e&&(e="bootstrap"),this.iconGroupsMap={},this.includeGroups(e)}return o.prototype.filterByGroups=function(e){var o,r,a,t;if(null==e&&(e="bootstrap"),"all"!==e){a=e.split(" "),t=this.iconGroupsMap;for(r in t)o=t[r],-1!==a.indexOf(r)&&delete this.iconGroupsMap[r]}return this},o.prototype.includeGroups=function(o){var r,a,t;null==o&&(o="bootstrap"),t=o.split(" ");for(a in e)r=e[a],null==this.iconGroupsMap[a]&&("all"===o||-1!==t.indexOf(a))&&(this.iconGroupsMap[a]=r);return this},o.prototype.getClassArray=function(){var e,o,r,a,t,n,l,i;e=[],l=this.iconGroupsMap;for(a in l)for(o=l[a],i=o.classes,t=0,n=i.length;n>t;t++)r=i[t],e.push(o.prefix+r);return e},o}()}])})}.call(this),function(){var e;(e=function(e,o){return"function"==typeof define&&null!=define.amd?define("templates/iconpicker",["angular","angular-bootstrap"],o):o(e.angular)})(this,function(e){var o;return o=e.module("ui-iconpicker/templates/iconpicker",["ui.bootstrap"]),o.run(["$templateCache",function(e){return e.put("templates/iconpicker.html",'\n \n \n \n')}])})}.call(this),function(){var e;(e=function(e,o){return"function"==typeof define&&null!=define.amd?define("directives/ui-iconpicker",["angular","services/IconGroupCollection","templates/iconpicker"],o):o(e.angular)})(this,function(e){var o;return o=e.module("ui-iconpicker/directives/ui-iconpicker",["ui-iconpicker/services/IconGroupCollection","ui-iconpicker/templates/iconpicker"]),o.directive("uiIconpicker",["IconGroupCollection",function(e){return{replace:!0,restrict:"E",scope:{name:"@",model:"=?ngModel"},templateUrl:"templates/iconpicker.html",link:function(o,r,a){var t;return o.availableIconClasses=new e(a.groups).getClassArray(),o.iconClass=null!=(t=a.value)?t:o.availableIconClasses[0],a.ngModel&&(o.model=o[a.ngModel],o.$watch("iconClass",function(){return o.model=o.iconClass}),o.$watch("model",function(){return o.iconClass=o.model})),o.$dropdownButton=r.find("button").eq(0),o.disabled=null!=a.disabled}}}])})}.call(this),function(){var e;(e=function(e,o){return"function"==typeof define&&null!=define.amd?define("ui-iconpicker",["angular","directives/ui-iconpicker"],o):o(e.angular)})(this,function(e){return e.module("ui-iconpicker",["ui-iconpicker/directives/ui-iconpicker"])})}.call(this); \ No newline at end of file diff --git a/public/bower_components/ui-iconpicker/dist/styles/ui-iconpicker.css b/public/bower_components/ui-iconpicker/dist/styles/ui-iconpicker.css deleted file mode 100644 index 9dfe06c..0000000 --- a/public/bower_components/ui-iconpicker/dist/styles/ui-iconpicker.css +++ /dev/null @@ -1,247 +0,0 @@ -/** - * ui-iconpicker - * - * @version v0.1.4 - * @author Justin Lau - * @copyright Copyright (c) 2014 Justin Lau - * @license The MIT License (MIT) - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the 'Software'), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -.ui-iconpicker.brand-default > button { - color: #333333; - background-color: white; - border-color: #cccccc; -} -.ui-iconpicker.brand-default > button:hover, .ui-iconpicker.brand-default > button:focus, .ui-iconpicker.brand-default > button:active, .ui-iconpicker.brand-default > button.active { - color: #333333; - background-color: #ebebeb; - border-color: #adadad; -} -.open .ui-iconpicker.brand-default > button.dropdown-toggle { - color: #333333; - background-color: #ebebeb; - border-color: #adadad; -} -.ui-iconpicker.brand-default > button:active, .ui-iconpicker.brand-default > button.active { - background-image: none; -} -.open .ui-iconpicker.brand-default > button.dropdown-toggle { - background-image: none; -} -.ui-iconpicker.brand-default > button.disabled, .ui-iconpicker.brand-default > button.disabled:hover, .ui-iconpicker.brand-default > button.disabled:focus, .ui-iconpicker.brand-default > button.disabled:active, .ui-iconpicker.brand-default > button.disabled.active, .ui-iconpicker.brand-default > button[disabled], .ui-iconpicker.brand-default > button[disabled]:hover, .ui-iconpicker.brand-default > button[disabled]:focus, .ui-iconpicker.brand-default > button[disabled]:active, .ui-iconpicker.brand-default > button[disabled].active, fieldset[disabled] .ui-iconpicker.brand-default > button, fieldset[disabled] .ui-iconpicker.brand-default > button:hover, fieldset[disabled] .ui-iconpicker.brand-default > button:focus, fieldset[disabled] .ui-iconpicker.brand-default > button:active, fieldset[disabled] .ui-iconpicker.brand-default > button.active { - background-color: white; - border-color: #cccccc; -} -.ui-iconpicker.brand-default > button .badge { - color: white; - background-color: #333333; -} -.ui-iconpicker.brand-primary > button { - color: white; - background-color: #428bca; - border-color: #357ebd; -} -.ui-iconpicker.brand-primary > button:hover, .ui-iconpicker.brand-primary > button:focus, .ui-iconpicker.brand-primary > button:active, .ui-iconpicker.brand-primary > button.active { - color: white; - background-color: #3276b1; - border-color: #285e8e; -} -.open .ui-iconpicker.brand-primary > button.dropdown-toggle { - color: white; - background-color: #3276b1; - border-color: #285e8e; -} -.ui-iconpicker.brand-primary > button:active, .ui-iconpicker.brand-primary > button.active { - background-image: none; -} -.open .ui-iconpicker.brand-primary > button.dropdown-toggle { - background-image: none; -} -.ui-iconpicker.brand-primary > button.disabled, .ui-iconpicker.brand-primary > button.disabled:hover, .ui-iconpicker.brand-primary > button.disabled:focus, .ui-iconpicker.brand-primary > button.disabled:active, .ui-iconpicker.brand-primary > button.disabled.active, .ui-iconpicker.brand-primary > button[disabled], .ui-iconpicker.brand-primary > button[disabled]:hover, .ui-iconpicker.brand-primary > button[disabled]:focus, .ui-iconpicker.brand-primary > button[disabled]:active, .ui-iconpicker.brand-primary > button[disabled].active, fieldset[disabled] .ui-iconpicker.brand-primary > button, fieldset[disabled] .ui-iconpicker.brand-primary > button:hover, fieldset[disabled] .ui-iconpicker.brand-primary > button:focus, fieldset[disabled] .ui-iconpicker.brand-primary > button:active, fieldset[disabled] .ui-iconpicker.brand-primary > button.active { - background-color: #428bca; - border-color: #357ebd; -} -.ui-iconpicker.brand-primary > button .badge { - color: #428bca; - background-color: white; -} -.ui-iconpicker.brand-success > button { - color: white; - background-color: #5cb85c; - border-color: #4cae4c; -} -.ui-iconpicker.brand-success > button:hover, .ui-iconpicker.brand-success > button:focus, .ui-iconpicker.brand-success > button:active, .ui-iconpicker.brand-success > button.active { - color: white; - background-color: #47a447; - border-color: #398439; -} -.open .ui-iconpicker.brand-success > button.dropdown-toggle { - color: white; - background-color: #47a447; - border-color: #398439; -} -.ui-iconpicker.brand-success > button:active, .ui-iconpicker.brand-success > button.active { - background-image: none; -} -.open .ui-iconpicker.brand-success > button.dropdown-toggle { - background-image: none; -} -.ui-iconpicker.brand-success > button.disabled, .ui-iconpicker.brand-success > button.disabled:hover, .ui-iconpicker.brand-success > button.disabled:focus, .ui-iconpicker.brand-success > button.disabled:active, .ui-iconpicker.brand-success > button.disabled.active, .ui-iconpicker.brand-success > button[disabled], .ui-iconpicker.brand-success > button[disabled]:hover, .ui-iconpicker.brand-success > button[disabled]:focus, .ui-iconpicker.brand-success > button[disabled]:active, .ui-iconpicker.brand-success > button[disabled].active, fieldset[disabled] .ui-iconpicker.brand-success > button, fieldset[disabled] .ui-iconpicker.brand-success > button:hover, fieldset[disabled] .ui-iconpicker.brand-success > button:focus, fieldset[disabled] .ui-iconpicker.brand-success > button:active, fieldset[disabled] .ui-iconpicker.brand-success > button.active { - background-color: #5cb85c; - border-color: #4cae4c; -} -.ui-iconpicker.brand-success > button .badge { - color: #5cb85c; - background-color: white; -} -.ui-iconpicker.brand-info > button { - color: white; - background-color: #5bc0de; - border-color: #46b8da; -} -.ui-iconpicker.brand-info > button:hover, .ui-iconpicker.brand-info > button:focus, .ui-iconpicker.brand-info > button:active, .ui-iconpicker.brand-info > button.active { - color: white; - background-color: #39b3d7; - border-color: #269abc; -} -.open .ui-iconpicker.brand-info > button.dropdown-toggle { - color: white; - background-color: #39b3d7; - border-color: #269abc; -} -.ui-iconpicker.brand-info > button:active, .ui-iconpicker.brand-info > button.active { - background-image: none; -} -.open .ui-iconpicker.brand-info > button.dropdown-toggle { - background-image: none; -} -.ui-iconpicker.brand-info > button.disabled, .ui-iconpicker.brand-info > button.disabled:hover, .ui-iconpicker.brand-info > button.disabled:focus, .ui-iconpicker.brand-info > button.disabled:active, .ui-iconpicker.brand-info > button.disabled.active, .ui-iconpicker.brand-info > button[disabled], .ui-iconpicker.brand-info > button[disabled]:hover, .ui-iconpicker.brand-info > button[disabled]:focus, .ui-iconpicker.brand-info > button[disabled]:active, .ui-iconpicker.brand-info > button[disabled].active, fieldset[disabled] .ui-iconpicker.brand-info > button, fieldset[disabled] .ui-iconpicker.brand-info > button:hover, fieldset[disabled] .ui-iconpicker.brand-info > button:focus, fieldset[disabled] .ui-iconpicker.brand-info > button:active, fieldset[disabled] .ui-iconpicker.brand-info > button.active { - background-color: #5bc0de; - border-color: #46b8da; -} -.ui-iconpicker.brand-info > button .badge { - color: #5bc0de; - background-color: white; -} -.ui-iconpicker.brand-warning > button { - color: white; - background-color: #f0ad4e; - border-color: #eea236; -} -.ui-iconpicker.brand-warning > button:hover, .ui-iconpicker.brand-warning > button:focus, .ui-iconpicker.brand-warning > button:active, .ui-iconpicker.brand-warning > button.active { - color: white; - background-color: #ed9c28; - border-color: #d58512; -} -.open .ui-iconpicker.brand-warning > button.dropdown-toggle { - color: white; - background-color: #ed9c28; - border-color: #d58512; -} -.ui-iconpicker.brand-warning > button:active, .ui-iconpicker.brand-warning > button.active { - background-image: none; -} -.open .ui-iconpicker.brand-warning > button.dropdown-toggle { - background-image: none; -} -.ui-iconpicker.brand-warning > button.disabled, .ui-iconpicker.brand-warning > button.disabled:hover, .ui-iconpicker.brand-warning > button.disabled:focus, .ui-iconpicker.brand-warning > button.disabled:active, .ui-iconpicker.brand-warning > button.disabled.active, .ui-iconpicker.brand-warning > button[disabled], .ui-iconpicker.brand-warning > button[disabled]:hover, .ui-iconpicker.brand-warning > button[disabled]:focus, .ui-iconpicker.brand-warning > button[disabled]:active, .ui-iconpicker.brand-warning > button[disabled].active, fieldset[disabled] .ui-iconpicker.brand-warning > button, fieldset[disabled] .ui-iconpicker.brand-warning > button:hover, fieldset[disabled] .ui-iconpicker.brand-warning > button:focus, fieldset[disabled] .ui-iconpicker.brand-warning > button:active, fieldset[disabled] .ui-iconpicker.brand-warning > button.active { - background-color: #f0ad4e; - border-color: #eea236; -} -.ui-iconpicker.brand-warning > button .badge { - color: #f0ad4e; - background-color: white; -} -.ui-iconpicker.brand-danger > button { - color: white; - background-color: #d9534f; - border-color: #d43f3a; -} -.ui-iconpicker.brand-danger > button:hover, .ui-iconpicker.brand-danger > button:focus, .ui-iconpicker.brand-danger > button:active, .ui-iconpicker.brand-danger > button.active { - color: white; - background-color: #d2322d; - border-color: #ac2925; -} -.open .ui-iconpicker.brand-danger > button.dropdown-toggle { - color: white; - background-color: #d2322d; - border-color: #ac2925; -} -.ui-iconpicker.brand-danger > button:active, .ui-iconpicker.brand-danger > button.active { - background-image: none; -} -.open .ui-iconpicker.brand-danger > button.dropdown-toggle { - background-image: none; -} -.ui-iconpicker.brand-danger > button.disabled, .ui-iconpicker.brand-danger > button.disabled:hover, .ui-iconpicker.brand-danger > button.disabled:focus, .ui-iconpicker.brand-danger > button.disabled:active, .ui-iconpicker.brand-danger > button.disabled.active, .ui-iconpicker.brand-danger > button[disabled], .ui-iconpicker.brand-danger > button[disabled]:hover, .ui-iconpicker.brand-danger > button[disabled]:focus, .ui-iconpicker.brand-danger > button[disabled]:active, .ui-iconpicker.brand-danger > button[disabled].active, fieldset[disabled] .ui-iconpicker.brand-danger > button, fieldset[disabled] .ui-iconpicker.brand-danger > button:hover, fieldset[disabled] .ui-iconpicker.brand-danger > button:focus, fieldset[disabled] .ui-iconpicker.brand-danger > button:active, fieldset[disabled] .ui-iconpicker.brand-danger > button.active { - background-color: #d9534f; - border-color: #d43f3a; -} -.ui-iconpicker.brand-danger > button .badge { - color: #d9534f; - background-color: white; -} -.ui-iconpicker.disabled > button, .ui-iconpicker[disabled] > button, fieldset[disabled] .ui-iconpicker > button { - cursor: not-allowed; - pointer-events: none; - opacity: 0.65; - filter: alpha(opacity=65); - -webkit-box-shadow: none; - box-shadow: none; -} -.ui-iconpicker > button > i { - padding-right: .5em; -} -.ui-iconpicker > ul.dropdown-menu { - max-height: 12.1em; - overflow-y: scroll; - padding: 0.5em 0.5em; - width: 12.1em; -} -@media (min-width: 768px) and (max-width: 991px) { - .ui-iconpicker > ul.dropdown-menu { - max-height: 15.1em; - width: 15.1em; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .ui-iconpicker > ul.dropdown-menu { - max-height: 23.1em; - width: 23.1em; - } -} -@media (min-width: 1200px) { - .ui-iconpicker > ul.dropdown-menu { - max-height: 23.1em; - width: 34.1em; - } -} -.ui-iconpicker > ul.dropdown-menu::-webkit-scrollbar { - width: 0.1em; -} -.ui-iconpicker > ul.dropdown-menu > li { - float: left; -} -.ui-iconpicker > ul.dropdown-menu > li button { - height: 2.5em; - margin: 0.1em 0.1em; - padding: 0 0; - width: 2.5em; -} diff --git a/public/bower_components/ui-iconpicker/dist/styles/ui-iconpicker.min.css b/public/bower_components/ui-iconpicker/dist/styles/ui-iconpicker.min.css deleted file mode 100644 index beb074d..0000000 --- a/public/bower_components/ui-iconpicker/dist/styles/ui-iconpicker.min.css +++ /dev/null @@ -1,6 +0,0 @@ -/* - ui-iconpicker v0.1.4 - (c) 2014 Justin Lau http://justin-lau.github.io/ui-iconpicker/ - License: MIT -*/ -.ui-iconpicker.brand-default>button{color:#333;background-color:#fff;border-color:#ccc}.open .ui-iconpicker.brand-default>button.dropdown-toggle,.ui-iconpicker.brand-default>button.active,.ui-iconpicker.brand-default>button:active,.ui-iconpicker.brand-default>button:focus,.ui-iconpicker.brand-default>button:hover{color:#333;background-color:#ebebeb;border-color:#adadad}.open .ui-iconpicker.brand-default>button.dropdown-toggle,.ui-iconpicker.brand-default>button.active,.ui-iconpicker.brand-default>button:active{background-image:none}.ui-iconpicker.brand-default>button.disabled,.ui-iconpicker.brand-default>button.disabled.active,.ui-iconpicker.brand-default>button.disabled:active,.ui-iconpicker.brand-default>button.disabled:focus,.ui-iconpicker.brand-default>button.disabled:hover,.ui-iconpicker.brand-default>button[disabled],.ui-iconpicker.brand-default>button[disabled].active,.ui-iconpicker.brand-default>button[disabled]:active,.ui-iconpicker.brand-default>button[disabled]:focus,.ui-iconpicker.brand-default>button[disabled]:hover,fieldset[disabled] .ui-iconpicker.brand-default>button,fieldset[disabled] .ui-iconpicker.brand-default>button.active,fieldset[disabled] .ui-iconpicker.brand-default>button:active,fieldset[disabled] .ui-iconpicker.brand-default>button:focus,fieldset[disabled] .ui-iconpicker.brand-default>button:hover{background-color:#fff;border-color:#ccc}.ui-iconpicker.brand-default>button .badge{color:#fff;background-color:#333}.ui-iconpicker.brand-primary>button{color:#fff;background-color:#428bca;border-color:#357ebd}.open .ui-iconpicker.brand-primary>button.dropdown-toggle,.ui-iconpicker.brand-primary>button.active,.ui-iconpicker.brand-primary>button:active,.ui-iconpicker.brand-primary>button:focus,.ui-iconpicker.brand-primary>button:hover{color:#fff;background-color:#3276b1;border-color:#285e8e}.open .ui-iconpicker.brand-primary>button.dropdown-toggle,.ui-iconpicker.brand-primary>button.active,.ui-iconpicker.brand-primary>button:active{background-image:none}.ui-iconpicker.brand-primary>button.disabled,.ui-iconpicker.brand-primary>button.disabled.active,.ui-iconpicker.brand-primary>button.disabled:active,.ui-iconpicker.brand-primary>button.disabled:focus,.ui-iconpicker.brand-primary>button.disabled:hover,.ui-iconpicker.brand-primary>button[disabled],.ui-iconpicker.brand-primary>button[disabled].active,.ui-iconpicker.brand-primary>button[disabled]:active,.ui-iconpicker.brand-primary>button[disabled]:focus,.ui-iconpicker.brand-primary>button[disabled]:hover,fieldset[disabled] .ui-iconpicker.brand-primary>button,fieldset[disabled] .ui-iconpicker.brand-primary>button.active,fieldset[disabled] .ui-iconpicker.brand-primary>button:active,fieldset[disabled] .ui-iconpicker.brand-primary>button:focus,fieldset[disabled] .ui-iconpicker.brand-primary>button:hover{background-color:#428bca;border-color:#357ebd}.ui-iconpicker.brand-primary>button .badge{color:#428bca;background-color:#fff}.ui-iconpicker.brand-success>button{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.open .ui-iconpicker.brand-success>button.dropdown-toggle,.ui-iconpicker.brand-success>button.active,.ui-iconpicker.brand-success>button:active,.ui-iconpicker.brand-success>button:focus,.ui-iconpicker.brand-success>button:hover{color:#fff;background-color:#47a447;border-color:#398439}.open .ui-iconpicker.brand-success>button.dropdown-toggle,.ui-iconpicker.brand-success>button.active,.ui-iconpicker.brand-success>button:active{background-image:none}.ui-iconpicker.brand-success>button.disabled,.ui-iconpicker.brand-success>button.disabled.active,.ui-iconpicker.brand-success>button.disabled:active,.ui-iconpicker.brand-success>button.disabled:focus,.ui-iconpicker.brand-success>button.disabled:hover,.ui-iconpicker.brand-success>button[disabled],.ui-iconpicker.brand-success>button[disabled].active,.ui-iconpicker.brand-success>button[disabled]:active,.ui-iconpicker.brand-success>button[disabled]:focus,.ui-iconpicker.brand-success>button[disabled]:hover,fieldset[disabled] .ui-iconpicker.brand-success>button,fieldset[disabled] .ui-iconpicker.brand-success>button.active,fieldset[disabled] .ui-iconpicker.brand-success>button:active,fieldset[disabled] .ui-iconpicker.brand-success>button:focus,fieldset[disabled] .ui-iconpicker.brand-success>button:hover{background-color:#5cb85c;border-color:#4cae4c}.ui-iconpicker.brand-success>button .badge{color:#5cb85c;background-color:#fff}.ui-iconpicker.brand-info>button{color:#fff;background-color:#5bc0de;border-color:#46b8da}.open .ui-iconpicker.brand-info>button.dropdown-toggle,.ui-iconpicker.brand-info>button.active,.ui-iconpicker.brand-info>button:active,.ui-iconpicker.brand-info>button:focus,.ui-iconpicker.brand-info>button:hover{color:#fff;background-color:#39b3d7;border-color:#269abc}.open .ui-iconpicker.brand-info>button.dropdown-toggle,.ui-iconpicker.brand-info>button.active,.ui-iconpicker.brand-info>button:active{background-image:none}.ui-iconpicker.brand-info>button.disabled,.ui-iconpicker.brand-info>button.disabled.active,.ui-iconpicker.brand-info>button.disabled:active,.ui-iconpicker.brand-info>button.disabled:focus,.ui-iconpicker.brand-info>button.disabled:hover,.ui-iconpicker.brand-info>button[disabled],.ui-iconpicker.brand-info>button[disabled].active,.ui-iconpicker.brand-info>button[disabled]:active,.ui-iconpicker.brand-info>button[disabled]:focus,.ui-iconpicker.brand-info>button[disabled]:hover,fieldset[disabled] .ui-iconpicker.brand-info>button,fieldset[disabled] .ui-iconpicker.brand-info>button.active,fieldset[disabled] .ui-iconpicker.brand-info>button:active,fieldset[disabled] .ui-iconpicker.brand-info>button:focus,fieldset[disabled] .ui-iconpicker.brand-info>button:hover{background-color:#5bc0de;border-color:#46b8da}.ui-iconpicker.brand-info>button .badge{color:#5bc0de;background-color:#fff}.ui-iconpicker.brand-warning>button{color:#fff;background-color:#f0ad4e;border-color:#eea236}.open .ui-iconpicker.brand-warning>button.dropdown-toggle,.ui-iconpicker.brand-warning>button.active,.ui-iconpicker.brand-warning>button:active,.ui-iconpicker.brand-warning>button:focus,.ui-iconpicker.brand-warning>button:hover{color:#fff;background-color:#ed9c28;border-color:#d58512}.open .ui-iconpicker.brand-warning>button.dropdown-toggle,.ui-iconpicker.brand-warning>button.active,.ui-iconpicker.brand-warning>button:active{background-image:none}.ui-iconpicker.brand-warning>button.disabled,.ui-iconpicker.brand-warning>button.disabled.active,.ui-iconpicker.brand-warning>button.disabled:active,.ui-iconpicker.brand-warning>button.disabled:focus,.ui-iconpicker.brand-warning>button.disabled:hover,.ui-iconpicker.brand-warning>button[disabled],.ui-iconpicker.brand-warning>button[disabled].active,.ui-iconpicker.brand-warning>button[disabled]:active,.ui-iconpicker.brand-warning>button[disabled]:focus,.ui-iconpicker.brand-warning>button[disabled]:hover,fieldset[disabled] .ui-iconpicker.brand-warning>button,fieldset[disabled] .ui-iconpicker.brand-warning>button.active,fieldset[disabled] .ui-iconpicker.brand-warning>button:active,fieldset[disabled] .ui-iconpicker.brand-warning>button:focus,fieldset[disabled] .ui-iconpicker.brand-warning>button:hover{background-color:#f0ad4e;border-color:#eea236}.ui-iconpicker.brand-warning>button .badge{color:#f0ad4e;background-color:#fff}.ui-iconpicker.brand-danger>button{color:#fff;background-color:#d9534f;border-color:#d43f3a}.open .ui-iconpicker.brand-danger>button.dropdown-toggle,.ui-iconpicker.brand-danger>button.active,.ui-iconpicker.brand-danger>button:active,.ui-iconpicker.brand-danger>button:focus,.ui-iconpicker.brand-danger>button:hover{color:#fff;background-color:#d2322d;border-color:#ac2925}.open .ui-iconpicker.brand-danger>button.dropdown-toggle,.ui-iconpicker.brand-danger>button.active,.ui-iconpicker.brand-danger>button:active{background-image:none}.ui-iconpicker.brand-danger>button.disabled,.ui-iconpicker.brand-danger>button.disabled.active,.ui-iconpicker.brand-danger>button.disabled:active,.ui-iconpicker.brand-danger>button.disabled:focus,.ui-iconpicker.brand-danger>button.disabled:hover,.ui-iconpicker.brand-danger>button[disabled],.ui-iconpicker.brand-danger>button[disabled].active,.ui-iconpicker.brand-danger>button[disabled]:active,.ui-iconpicker.brand-danger>button[disabled]:focus,.ui-iconpicker.brand-danger>button[disabled]:hover,fieldset[disabled] .ui-iconpicker.brand-danger>button,fieldset[disabled] .ui-iconpicker.brand-danger>button.active,fieldset[disabled] .ui-iconpicker.brand-danger>button:active,fieldset[disabled] .ui-iconpicker.brand-danger>button:focus,fieldset[disabled] .ui-iconpicker.brand-danger>button:hover{background-color:#d9534f;border-color:#d43f3a}.ui-iconpicker.brand-danger>button .badge{color:#d9534f;background-color:#fff}.ui-iconpicker.disabled>button,.ui-iconpicker[disabled]>button,fieldset[disabled] .ui-iconpicker>button{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.ui-iconpicker>button>i{padding-right:.5em}.ui-iconpicker>ul.dropdown-menu{max-height:12.1em;overflow-y:scroll;padding:.5em;width:12.1em}@media (min-width:768px) and (max-width:991px){.ui-iconpicker>ul.dropdown-menu{max-height:15.1em;width:15.1em}}@media (min-width:992px) and (max-width:1199px){.ui-iconpicker>ul.dropdown-menu{max-height:23.1em;width:23.1em}}@media (min-width:1200px){.ui-iconpicker>ul.dropdown-menu{max-height:23.1em;width:34.1em}}.ui-iconpicker>ul.dropdown-menu::-webkit-scrollbar{width:.1em}.ui-iconpicker>ul.dropdown-menu>li{float:left}.ui-iconpicker>ul.dropdown-menu>li button{height:2.5em;margin:.1em;padding:0;width:2.5em} \ No newline at end of file diff --git a/public/bower_components/ui-iconpicker/gruntfile.coffee b/public/bower_components/ui-iconpicker/gruntfile.coffee deleted file mode 100644 index 19c8fde..0000000 --- a/public/bower_components/ui-iconpicker/gruntfile.coffee +++ /dev/null @@ -1,289 +0,0 @@ -# @author Justin Lau -# @copyright Copyright (c) 2014 Justin Lau -# @license The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - -module.exports = (grunt) -> - - ### - ## Loading Grunt Plugins ## - ### - grunt.loadNpmTasks "grunt-contrib-bump" - grunt.loadNpmTasks "grunt-contrib-clean" - grunt.loadNpmTasks "grunt-contrib-coffee" - grunt.loadNpmTasks "grunt-contrib-compass" - grunt.loadNpmTasks "grunt-contrib-cssmin" - grunt.loadNpmTasks "grunt-contrib-requirejs" - grunt.loadNpmTasks "grunt-contrib-watch" - grunt.loadNpmTasks "grunt-replace" - - ### - ## Grunt Configuration ## - ### - grunt.initConfig - path: - src : "src" - dist : "dist" - - banner: - full : """ - /** - * ui-iconpicker - * - * @version v<%= pkg.version %> - * @author Justin Lau - * @copyright Copyright (c) 2014 Justin Lau - * @license The MIT License (MIT) - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the 'Software'), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */""" - min : """ - /* - ui-iconpicker v<%= pkg.version %> - (c) 2014 Justin Lau http://justin-lau.github.io/ui-iconpicker/ - License: MIT - */""" - pkg: grunt.file.readJSON "package.json" - - ### - **Bump** - ### - bump: - options: - filepaths : [ - 'bower.json' - 'package.json' - ] - syncVersions : true - commit : false - tag : false - - ### - **Clean** - ### - clean: [ - "<%= path.src %>/scripts/**/*.js" - "<%= path.src %>/scripts/**/*.js.map" - "<%= path.dist %>" - ] - - ### - **CoffeeScript** - ### - coffee: - debug: - cwd : "<%= path.src %>" - dest : "<%= path.src %>" - expand : true - ext : ".js" - options : - sourceMap : true - src : ["**/*.coffee"] - - dist: - cwd : "<%= path.src %>" - dest : "<%= path.src %>" - expand : true - ext : ".js" - src : ["**/*.coffee"] - - ### - **Compass** - ### - compass: - options: - cssDir : "<%= path.dist %>/styles" - sassDir : "<%= path.src %>/styles" - specify : "<%= path.src %>/styles/ui-iconpicker.scss" - debug: - options: - environment : "development" - outputStyle : "expanded" - dist: - options: - environment : "production" - noLineComments : true - outputStyle : "expanded" - ### - **CssMin** - ### - cssmin: - dist: - options: - banner: "<%= banner.min %>" - expand: true, - cwd: "<%= path.dist %>", - src: [ - '**/*.css' - '**/!*.min.css' - ], - dest: "<%= path.dist %>", - ext: '.min.css' - - ### - **Replace** - ### - replace: - css_banner: - options : - patterns: [{ - match : /^(\/\*\*[\S\s]*^ \*\/)?$/m - replacement : "<%= banner.full %>" - }] - files : [{ - expand : true - cwd : "<%= path.dist %>/styles" - src : [ - "**/*.css" - "!**/*.min.css" - ] - dest : "<%= path.dist %>/styles" - }] - js_banner: - options : - patterns: [{ - match : /^([\S\s]*?)$/ - replacement : "<%= banner.full %>\n$1" - }] - files : [{ - expand : true - cwd : "<%= path.dist %>/scripts" - src : [ - "**/*.js" - "!**/*.min.js" - ] - dest : "<%= path.dist %>/scripts" - }] - js_banner_min: - options : - patterns: [{ - match : /^([\S\s]*?)$/ - replacement : "<%= banner.min %>\n$1" - }] - files : [{ - expand : true - cwd : "<%= path.dist %>/scripts" - src : ["**/*.min.js"] - dest : "<%= path.dist %>/scripts" - }] - - ### - **RequireJS** - ### - requirejs: - options: - baseUrl : "<%= path.src %>/scripts" - mainConfigFile : "<%= path.src %>/scripts/config.js" - name : "ui-iconpicker" - debug: - options: - generateSourceMaps : true - optimize : "none" - out : "<%= path.dist %>/scripts/ui-iconpicker.js" - dist: - options: - optimize : "none" - out : "<%= path.dist %>/scripts/ui-iconpicker.js" - dist_min: - options: - optimize : "uglify2" - out : "<%= path.dist %>/scripts/ui-iconpicker.min.js" - - ### - **Watch** - ### - watch: - options : - livereload : true - spawn : false - - # compiles changed coffeescripts - coffeescripts: - files : ["<%= path.src %>/scripts/**/*.coffee"] - tasks : [ - "coffee:debug" - "requirejs:debug" - ] - - # compiles changed sass files - sass: - files : ["<%= path.src %>/styles/**/*.scss"] - tasks : [ - "compass:debug" - ] - - - ### - ## Tasks ## - ### - - grunt.registerTask "replace:dist", [ - "replace:css_banner" - "replace:js_banner" - "replace:js_banner_min" - ] - - ### - **debug** - ### - grunt.registerTask "debug", [ - "clean" - "compass:debug" - "coffee:debug" - "requirejs:debug" - ] - - ### - **dist** - ### - grunt.registerTask "dist", [ - "clean" - "compass:dist" - "cssmin:dist" - "coffee:dist" - "requirejs:dist" - "requirejs:dist_min" - "replace:dist" - ] - - ### - **dev** - ### - grunt.registerTask "dev", [ - "debug" - "watch" - ] \ No newline at end of file diff --git a/public/bower_components/ui-iconpicker/package.json b/public/bower_components/ui-iconpicker/package.json deleted file mode 100644 index f4909a4..0000000 --- a/public/bower_components/ui-iconpicker/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "ui-iconpicker", - "description": "Bootstrap 3 Icon Picker for AngularJS", - "version": "0.1.4", - "keywords": [ - "Bootstrap", - "Font Awesome", - "Iconpicker", - "AngularJS" - ], - "bugs": { - "url": "https://github.com/justin-lau/ui-iconpicker/issues", - "email": "justin@tclau.com" - }, - "license": "MIT", - "auther": { - "name": "Justin Lau", - "email": "justin@tclau.com", - "url": "http://tclau.com" - }, - "repository": { - "type": "git", - "url": "https://github.com/justin-lau/ui-iconpicker" - }, - "engines": { - "node": ">=0.10.25" - }, - "devDependencies": { - "grunt": "~0.4.4", - "grunt-contrib-bump": "git://github.com/gruntjs/grunt-contrib-bump", - "grunt-contrib-clean": "~0.5.0", - "grunt-contrib-coffee": "~0.10.1", - "grunt-contrib-compass": "~0.7.2", - "grunt-contrib-cssmin": "~0.9.0", - "grunt-contrib-requirejs": "~0.4.3", - "grunt-contrib-watch": "~0.6.1", - "grunt-replace": "~0.7.6" - } -} \ No newline at end of file diff --git a/public/bower_components/ui-iconpicker/src/scripts/config.coffee b/public/bower_components/ui-iconpicker/src/scripts/config.coffee deleted file mode 100644 index 824887f..0000000 --- a/public/bower_components/ui-iconpicker/src/scripts/config.coffee +++ /dev/null @@ -1,32 +0,0 @@ -# @author Justin Lau -# @copyright Copyright (c) 2014 Justin Lau -# @license The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - -require.config - - paths: - "angular" : "empty:" - "angular-bootstrap" : "empty:" - - shim: - "angular-bootstrap": - deps: ["angular"] \ No newline at end of file diff --git a/public/bower_components/ui-iconpicker/src/scripts/directives/ui-iconpicker.coffee b/public/bower_components/ui-iconpicker/src/scripts/directives/ui-iconpicker.coffee deleted file mode 100644 index 2c56672..0000000 --- a/public/bower_components/ui-iconpicker/src/scripts/directives/ui-iconpicker.coffee +++ /dev/null @@ -1,71 +0,0 @@ -# @author Justin Lau -# @copyright Copyright (c) 2014 Justin Lau -# @license The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - -umd = (root, factory) -> - - # AMD - if typeof define is "function" and define.amd? - define("directives/ui-iconpicker", [ - "angular" - "services/IconGroupCollection" - "templates/iconpicker" - ], factory); - - # Non-AMD - else - factory(root.angular); - -umd this, (angular) -> - - # Register Angular Module - module = angular.module("ui-iconpicker/directives/ui-iconpicker", [ - "ui-iconpicker/services/IconGroupCollection" - "ui-iconpicker/templates/iconpicker" - ]); - - module.directive "uiIconpicker", [ - "IconGroupCollection" - (IconGroupCollection) -> - replace: true - restrict: "E" - scope: - name : "@" - model : "=?ngModel" - templateUrl: "templates/iconpicker.html" - link: ($scope, $element, attrs) -> - $scope.availableIconClasses = (new IconGroupCollection(attrs.groups)).getClassArray(); - $scope.iconClass = attrs.value ? $scope.availableIconClasses[0]; - - # setup two way bindings between $scope.iconClass and $scope.model - # when ng-model is found in the DOM attribute. - if attrs.ngModel - $scope.model = $scope[attrs.ngModel]; - $scope.$watch "iconClass", -> - $scope.model = $scope.iconClass; - $scope.$watch "model", -> - $scope.iconClass = $scope.model; - - $scope.$dropdownButton = $element.find("button").eq(0); - - $scope.disabled = attrs.disabled?; - ] \ No newline at end of file diff --git a/public/bower_components/ui-iconpicker/src/scripts/services/IconGroupCollection.coffee b/public/bower_components/ui-iconpicker/src/scripts/services/IconGroupCollection.coffee deleted file mode 100644 index 1797a8d..0000000 --- a/public/bower_components/ui-iconpicker/src/scripts/services/IconGroupCollection.coffee +++ /dev/null @@ -1,83 +0,0 @@ -# @author Justin Lau -# @copyright Copyright (c) 2014 Justin Lau -# @license The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - -umd = (root, factory) -> - - # AMD - if typeof define is "function" and define.amd? - define("services/IconGroupCollection", [ - "angular" - "values/icon-groups-map" - ], factory); - - # Non-AMD - else - factory(root.angular); - -umd this, (angular) -> - - # Register Angular Module - module = angular.module("ui-iconpicker/services/IconGroupCollection", [ - "ui-iconpicker/values/icon-groups-map" - ]); - - module.factory "IconGroupCollection", [ - "iconGroupsMap" - (iconGroupsMap) -> - - class IconGroupCollection - # usage: iconGroups = new IconGroupCollection("bootstrap font-awesome"); - constructor: (groupIdLiteral = "bootstrap") -> - @iconGroupsMap = {}; - - @includeGroups(groupIdLiteral); - - # usage: iconGroups = iconGroups.filterByGroups("bootstrap font-awesome") - filterByGroups: (groupIdLiteral = "bootstrap") -> - if groupIdLiteral isnt "all" - groupIds = groupIdLiteral.split(" "); - - for groupId, group of @iconGroupsMap when groupIds.indexOf(groupId) isnt -1 - delete @iconGroupsMap[groupId] - - return @; - - # usage: iconGroups = iconGroups.includeGroups("bootstrap font-awesome") - includeGroups: (groupIdLiteral = "bootstrap") -> - groupIds = groupIdLiteral.split(" "); - - for groupId, group of iconGroupsMap when not @iconGroupsMap[groupId]? - if groupIdLiteral is "all" or groupIds.indexOf(groupId) isnt -1 - @iconGroupsMap[groupId] = group; - - return @; - - # usage: array = iconsets.getClassArray() - getClassArray: -> - classes = []; - - for id, group of @iconGroupsMap - classes.push(group.prefix + iconClass) for iconClass in group.classes; - - return classes; - ] \ No newline at end of file diff --git a/public/bower_components/ui-iconpicker/src/scripts/templates/iconpicker.coffee b/public/bower_components/ui-iconpicker/src/scripts/templates/iconpicker.coffee deleted file mode 100644 index 322a47e..0000000 --- a/public/bower_components/ui-iconpicker/src/scripts/templates/iconpicker.coffee +++ /dev/null @@ -1,61 +0,0 @@ -# @author Justin Lau -# @copyright Copyright (c) 2014 Justin Lau -# @license The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - -umd = (root, factory) -> - - # AMD - if typeof define is "function" and define.amd? - define("templates/iconpicker", [ - "angular" - "angular-bootstrap" - ], factory); - - # Non-AMD - else - factory(root.angular); - -umd this, (angular) -> - - # Register Angular Module - module = angular.module("ui-iconpicker/templates/iconpicker", [ - "ui.bootstrap" - ]); - - # Create template into cache - module.run [ - "$templateCache" - ($templateCache) -> - $templateCache.put "templates/iconpicker.html", - """ - - - - - - """ - ] \ No newline at end of file diff --git a/public/bower_components/ui-iconpicker/src/scripts/ui-iconpicker.coffee b/public/bower_components/ui-iconpicker/src/scripts/ui-iconpicker.coffee deleted file mode 100644 index 028de19..0000000 --- a/public/bower_components/ui-iconpicker/src/scripts/ui-iconpicker.coffee +++ /dev/null @@ -1,42 +0,0 @@ -# @author Justin Lau -# @copyright Copyright (c) 2014 Justin Lau -# @license The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - -umd = (root, factory) -> - - # AMD - if typeof define is "function" and define.amd? - define("ui-iconpicker", [ - "angular" - "directives/ui-iconpicker" - ], factory); - - # Non-AMD - else - factory(root.angular); - -umd this, (angular) -> - - # Register Angular Module - angular.module("ui-iconpicker", [ - "ui-iconpicker/directives/ui-iconpicker" - ]); \ No newline at end of file diff --git a/public/bower_components/ui-iconpicker/src/scripts/values/icon-groups-map.coffee b/public/bower_components/ui-iconpicker/src/scripts/values/icon-groups-map.coffee deleted file mode 100644 index b69e790..0000000 --- a/public/bower_components/ui-iconpicker/src/scripts/values/icon-groups-map.coffee +++ /dev/null @@ -1,658 +0,0 @@ -# @author Justin Lau -# @copyright Copyright (c) 2014 Justin Lau -# @license The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# - -umd = (root, factory) -> - - # AMD - if typeof define is "function" and define.amd? - define("values/icon-groups-map", [ - "angular" - ], factory); - - # Non-AMD - else - factory(root.angular); - -umd this, (angular) -> - - # Register Angular Module - module = angular.module("ui-iconpicker/values/icon-groups-map", []); - - module.value "iconGroupsMap", - "bootstrap" : - prefix : "glyphicon glyphicon-" - classes : [ - "asterisk" - "plus" - "euro" - "minus" - "cloud" - "envelope" - "pencil" - "glass" - "music" - "search" - "heart" - "star" - "star-empty" - "user" - "film" - "th-large" - "th" - "th-list" - "ok" - "remove" - "zoom-in" - "zoom-out" - "off" - "signal" - "cog" - "trash" - "home" - "file" - "time" - "road" - "download-alt" - "download" - "upload" - "inbox" - "play-circle" - "repeat" - "refresh" - "list-alt" - "lock" - "flag" - "headphones" - "volume-off" - "volume-down" - "volume-up" - "qrcode" - "barcode" - "tag" - "tags" - "book" - "bookmark" - "print" - "camera" - "font" - "bold" - "italic" - "text-height" - "text-width" - "align-left" - "align-center" - "align-right" - "align-justify" - "list" - "indent-left" - "indent-right" - "facetime-video" - "picture" - "map-marker" - "adjust" - "tint" - "edit" - "share" - "check" - "move" - "step-backward" - "fast-backward" - "backward" - "play" - "pause" - "stop" - "forward" - "fast-forward" - "step-forward" - "eject" - "chevron-left" - "chevron-right" - "plus-sign" - "minus-sign" - "remove-sign" - "ok-sign" - "question-sign" - "info-sign" - "screenshot" - "remove-circle" - "ok-circle" - "ban-circle" - "arrow-left" - "arrow-right" - "arrow-up" - "arrow-down" - "share-alt" - "resize-full" - "resize-small" - "exclamation-sign" - "gift" - "leaf" - "fire" - "eye-open" - "eye-close" - "warning-sign" - "plane" - "calendar" - "random" - "comment" - "magnet" - "chevron-up" - "chevron-down" - "retweet" - "shopping-cart" - "folder-close" - "folder-open" - "resize-vertical" - "resize-horizontal" - "hdd" - "bullhorn" - "bell" - "certificate" - "thumbs-up" - "thumbs-down" - "hand-right" - "hand-left" - "hand-up" - "hand-down" - "circle-arrow-right" - "circle-arrow-left" - "circle-arrow-up" - "circle-arrow-down" - "globe" - "wrench" - "tasks" - "filter" - "briefcase" - "fullscreen" - "dashboard" - "paperclip" - "heart-empty" - "link" - "phone" - "pushpin" - "usd" - "gbp" - "sort" - "sort-by-alphabet" - "sort-by-alphabet-alt" - "sort-by-order" - "sort-by-order-alt" - "sort-by-attributes" - "sort-by-attributes-alt" - "unchecked" - "expand" - "collapse-down" - "collapse-up" - "log-in" - "flash" - "log-out" - "new-window" - "record" - "save" - "open" - "saved" - "import" - "export" - "send" - "floppy-disk" - "floppy-saved" - "floppy-remove" - "floppy-save" - "floppy-open" - "credit-card" - "transfer" - "cutlery" - "header" - "compressed" - "earphone" - "phone-alt" - "tower" - "stats" - "sd-video" - "hd-video" - "subtitles" - "sound-stereo" - "sound-dolby" - "sound-5-1" - "sound-6-1" - "sound-7-1" - "copyright-mark" - "registration-mark" - "cloud-download" - "cloud-upload" - "tree-conifer" - "tree-deciduous" - ] - "font-awesome" : - prefix : "fa fa-lg fa-" - classes : [ - "glass" - "music" - "search" - "envelope-o" - "heart" - "star" - "star-o" - "user" - "film" - "th-large" - "th" - "th-list" - "check" - "times" - "search-plus" - "search-minus" - "power-off" - "signal" - "gear" - "cog" - "trash-o" - "home" - "file-o" - "clock-o" - "road" - "download" - "arrow-circle-o-down" - "arrow-circle-o-up" - "inbox" - "play-circle-o" - "rotate-right" - "repeat" - "refresh" - "list-alt" - "lock" - "flag" - "headphones" - "volume-off" - "volume-down" - "volume-up" - "qrcode" - "barcode" - "tag" - "tags" - "book" - "bookmark" - "print" - "camera" - "font" - "bold" - "italic" - "text-height" - "text-width" - "align-left" - "align-center" - "align-right" - "align-justify" - "list" - "dedent" - "outdent" - "indent" - "video-camera" - "picture-o" - "pencil" - "map-marker" - "adjust" - "tint" - "edit" - "pencil-square-o" - "share-square-o" - "check-square-o" - "arrows" - "step-backward" - "fast-backward" - "backward" - "play" - "pause" - "stop" - "forward" - "fast-forward" - "step-forward" - "eject" - "chevron-left" - "chevron-right" - "plus-circle" - "minus-circle" - "times-circle" - "check-circle" - "question-circle" - "info-circle" - "crosshairs" - "times-circle-o" - "check-circle-o" - "ban" - "arrow-left" - "arrow-right" - "arrow-up" - "arrow-down" - "mail-forward" - "share" - "expand" - "compress" - "plus" - "minus" - "asterisk" - "exclamation-circle" - "gift" - "leaf" - "fire" - "eye" - "eye-slash" - "warning" - "exclamation-triangle" - "plane" - "calendar" - "random" - "comment" - "magnet" - "chevron-up" - "chevron-down" - "retweet" - "shopping-cart" - "folder" - "folder-open" - "arrows-v" - "arrows-h" - "bar-chart-o" - "twitter-square" - "facebook-square" - "camera-retro" - "key" - "gears" - "cogs" - "comments" - "thumbs-o-up" - "thumbs-o-down" - "star-half" - "heart-o" - "sign-out" - "linkedin-square" - "thumb-tack" - "external-link" - "sign-in" - "trophy" - "github-square" - "upload" - "lemon-o" - "phone" - "square-o" - "bookmark-o" - "phone-square" - "twitter" - "facebook" - "github" - "unlock" - "credit-card" - "rss" - "hdd-o" - "bullhorn" - "bell" - "certificate" - "hand-o-right" - "hand-o-left" - "hand-o-up" - "hand-o-down" - "arrow-circle-left" - "arrow-circle-right" - "arrow-circle-up" - "arrow-circle-down" - "globe" - "wrench" - "tasks" - "filter" - "briefcase" - "arrows-alt" - "group" - "users" - "chain" - "link" - "cloud" - "flask" - "cut" - "scissors" - "copy" - "files-o" - "paperclip" - "save" - "floppy-o" - "square" - "bars" - "list-ul" - "list-ol" - "strikethrough" - "underline" - "table" - "magic" - "truck" - "pinterest" - "pinterest-square" - "google-plus-square" - "google-plus" - "money" - "caret-down" - "caret-up" - "caret-left" - "caret-right" - "columns" - "unsorted" - "sort" - "sort-down" - "sort-asc" - "sort-up" - "sort-desc" - "envelope" - "linkedin" - "rotate-left" - "undo" - "legal" - "gavel" - "dashboard" - "tachometer" - "comment-o" - "comments-o" - "flash" - "bolt" - "sitemap" - "umbrella" - "paste" - "clipboard" - "lightbulb-o" - "exchange" - "cloud-download" - "cloud-upload" - "user-md" - "stethoscope" - "suitcase" - "bell-o" - "coffee" - "cutlery" - "file-text-o" - "building-o" - "hospital-o" - "ambulance" - "medkit" - "fighter-jet" - "beer" - "h-square" - "plus-square" - "angle-double-left" - "angle-double-right" - "angle-double-up" - "angle-double-down" - "angle-left" - "angle-right" - "angle-up" - "angle-down" - "desktop" - "laptop" - "tablet" - "mobile-phone" - "mobile" - "circle-o" - "quote-left" - "quote-right" - "spinner" - "circle" - "mail-reply" - "reply" - "github-alt" - "folder-o" - "folder-open-o" - "smile-o" - "frown-o" - "meh-o" - "gamepad" - "keyboard-o" - "flag-o" - "flag-checkered" - "terminal" - "code" - "reply-all" - "mail-reply-all" - "star-half-empty" - "star-half-full" - "star-half-o" - "location-arrow" - "crop" - "code-fork" - "unlink" - "chain-broken" - "question" - "info" - "exclamation" - "superscript" - "subscript" - "eraser" - "puzzle-piece" - "microphone" - "microphone-slash" - "shield" - "calendar-o" - "fire-extinguisher" - "rocket" - "maxcdn" - "chevron-circle-left" - "chevron-circle-right" - "chevron-circle-up" - "chevron-circle-down" - "html5" - "css3" - "anchor" - "unlock-alt" - "bullseye" - "ellipsis-h" - "ellipsis-v" - "rss-square" - "play-circle" - "ticket" - "minus-square" - "minus-square-o" - "level-up" - "level-down" - "check-square" - "pencil-square" - "external-link-square" - "share-square" - "compass" - "toggle-down" - "caret-square-o-down" - "toggle-up" - "caret-square-o-up" - "toggle-right" - "caret-square-o-right" - "euro" - "eur" - "gbp" - "dollar" - "usd" - "rupee" - "inr" - "cny" - "rmb" - "yen" - "jpy" - "ruble" - "rouble" - "rub" - "won" - "krw" - "bitcoin" - "btc" - "file" - "file-text" - "sort-alpha-asc" - "sort-alpha-desc" - "sort-amount-asc" - "sort-amount-desc" - "sort-numeric-asc" - "sort-numeric-desc" - "thumbs-up" - "thumbs-down" - "youtube-square" - "youtube" - "xing" - "xing-square" - "youtube-play" - "dropbox" - "stack-overflow" - "instagram" - "flickr" - "adn" - "bitbucket" - "bitbucket-square" - "tumblr" - "tumblr-square" - "long-arrow-down" - "long-arrow-up" - "long-arrow-left" - "long-arrow-right" - "apple" - "windows" - "android" - "linux" - "dribbble" - "skype" - "foursquare" - "trello" - "female" - "male" - "gittip" - "sun-o" - "moon-o" - "archive" - "bug" - "vk" - "weibo" - "renren" - "pagelines" - "stack-exchange" - "arrow-circle-o-right" - "arrow-circle-o-left" - "toggle-left" - "caret-square-o-left" - "dot-circle-o" - "wheelchair" - "vimeo-square" - "turkish-lira" - "try" - "plus-square-o" - ] \ No newline at end of file diff --git a/public/bower_components/ui-iconpicker/src/styles/_variables.scss b/public/bower_components/ui-iconpicker/src/styles/_variables.scss deleted file mode 100644 index 7ca7a9b..0000000 --- a/public/bower_components/ui-iconpicker/src/styles/_variables.scss +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @author Justin Lau - * @copyright Copyright (c) 2014 Justin Lau - * @license The MIT License (MIT) - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -@import "../components/bootstrap-sass/vendor/assets/stylesheets/bootstrap/variables"; -@import "../components/bootstrap-sass/vendor/assets/stylesheets/bootstrap/mixins"; -@import "../components/font-awesome/scss/variables"; - -$iconpicker-dropdown-menu-padding-h: 0.5em !default; -$iconpicker-dropdown-menu-padding-v: $iconpicker-dropdown-menu-padding-h !default; -$iconpicker-dropdown-menu-padding: $iconpicker-dropdown-menu-padding-v $iconpicker-dropdown-menu-padding-h !default; -$iconpicker-button-width: 2.5em !default; -$iconpicker-button-height: $iconpicker-button-width !default; -$iconpicker-button-margin-h: 0.1em !default; -$iconpicker-button-margin-v: $iconpicker-button-margin-h !default; -$iconpicker-button-margin: $iconpicker-button-margin-v $iconpicker-button-margin-h !default; -$iconpicker-button-padding-h: 0 !default; -$iconpicker-button-padding-v: $iconpicker-button-padding-h !default; -$iconpicker-button-padding: $iconpicker-button-padding-v $iconpicker-button-padding-h !default; -$iconpicker-cols-xs: 4 !default; -$iconpicker-cols-sm: 5 !default; -$iconpicker-cols-md: 8 !default; -$iconpicker-cols-lg: 12 !default; -$iconpicker-rows-xs: 4 !default; -$iconpicker-rows-sm: 5 !default; -$iconpicker-rows-md: 8 !default; -$iconpicker-rows-lg: 8 !default; \ No newline at end of file diff --git a/public/bower_components/ui-iconpicker/src/styles/ui-iconpicker.scss b/public/bower_components/ui-iconpicker/src/styles/ui-iconpicker.scss deleted file mode 100644 index 0ef3edb..0000000 --- a/public/bower_components/ui-iconpicker/src/styles/ui-iconpicker.scss +++ /dev/null @@ -1,133 +0,0 @@ -/** - * @author Justin Lau - * @copyright Copyright (c) 2014 Justin Lau - * @license The MIT License (MIT) - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -@import "variables"; - -.ui-iconpicker { - - &.brand-default { - - > button { - @include button-variant($btn-default-color, $btn-default-bg, $btn-default-border); - } - - } - - &.brand-primary { - - > button { - @include button-variant($btn-primary-color, $btn-primary-bg, $btn-primary-border); - } - - } - - &.brand-success { - - > button { - @include button-variant($btn-success-color, $btn-success-bg, $btn-success-border); - } - - } - - &.brand-info { - - > button { - @include button-variant($btn-info-color, $btn-info-bg, $btn-info-border); - } - - } - - &.brand-warning { - - > button { - @include button-variant($btn-warning-color, $btn-warning-bg, $btn-warning-border); - } - - } - - &.brand-danger { - - > button { - @include button-variant($btn-danger-color, $btn-danger-bg, $btn-danger-border); - } - - } - - &.disabled, - &[disabled], - fieldset[disabled] & { - - > button { - cursor: not-allowed; - pointer-events: none; // Future-proof disabling of clicks - @include opacity(.65); - @include box-shadow(none); - } - - } - - - > button > i { - padding-right: .5em; - } - - > ul.dropdown-menu { - max-height: 0.1em + ceil(2 * $iconpicker-dropdown-menu-padding-v + $iconpicker-rows-xs * ($iconpicker-button-height + 2 * $iconpicker-button-padding-v + 2 * $iconpicker-button-margin-v)); - overflow-y: scroll; - padding: $iconpicker-dropdown-menu-padding; - width: 0.1em + ceil(2 * $iconpicker-dropdown-menu-padding-h + $iconpicker-cols-xs * ($iconpicker-button-width + 2 * $iconpicker-button-padding-h + 2 * $iconpicker-button-margin-h)); - - @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { - max-height: 0.1em + ceil(2 * $iconpicker-dropdown-menu-padding-v + $iconpicker-rows-sm * ($iconpicker-button-height + 2 * $iconpicker-button-padding-v + 2 * $iconpicker-button-margin-v)); - width: 0.1em + ceil(2 * $iconpicker-dropdown-menu-padding-h + $iconpicker-cols-sm * ($iconpicker-button-width + 2 * $iconpicker-button-padding-h + 2 * $iconpicker-button-margin-h)); - } - - @media (min-width: $screen-md-min) and (max-width: $screen-md-max) { - max-height: 0.1em + ceil(2 * $iconpicker-dropdown-menu-padding-v + $iconpicker-rows-md * ($iconpicker-button-height + 2 * $iconpicker-button-padding-v + 2 * $iconpicker-button-margin-v)); - width: 0.1em + ceil(2 * $iconpicker-dropdown-menu-padding-h + $iconpicker-cols-md * ($iconpicker-button-width + 2 * $iconpicker-button-padding-h + 2 * $iconpicker-button-margin-h)); - } - - @media (min-width: $screen-lg-min) { - max-height: 0.1em + ceil(2 * $iconpicker-dropdown-menu-padding-v + $iconpicker-rows-lg * ($iconpicker-button-height + 2 * $iconpicker-button-padding-v + 2 * $iconpicker-button-margin-v)); - width: 0.1em + ceil(2 * $iconpicker-dropdown-menu-padding-h + $iconpicker-cols-lg * ($iconpicker-button-width + 2 * $iconpicker-button-padding-h + 2 * $iconpicker-button-margin-h)); - } - - &::-webkit-scrollbar { - width: 0.1em; - } - - > li { - float: left; - - button { - height : $iconpicker-button-height; - margin : $iconpicker-button-margin; - padding : $iconpicker-button-padding; - width : $iconpicker-button-width; - } - - } - - } - -} \ No newline at end of file diff --git a/public/bower_components/ui-select/select.css b/public/bower_components/ui-select/select.css deleted file mode 100644 index b1e9d65..0000000 --- a/public/bower_components/ui-select/select.css +++ /dev/null @@ -1,267 +0,0 @@ -/*! - * ui-select - * http://github.com/angular-ui/ui-select - * Version: 0.16.0 - 2016-03-23T20:51:56.678Z - * License: MIT - */ - - -/* Style when highlighting a search. */ -.ui-select-highlight { - font-weight: bold; -} - -.ui-select-offscreen { - clip: rect(0 0 0 0) !important; - width: 1px !important; - height: 1px !important; - border: 0 !important; - margin: 0 !important; - padding: 0 !important; - overflow: hidden !important; - position: absolute !important; - outline: 0 !important; - left: 0px !important; - top: 0px !important; -} - - -.ui-select-choices-row:hover { - background-color: #f5f5f5; -} - -/* Select2 theme */ - -/* Mark invalid Select2 */ -.ng-dirty.ng-invalid > a.select2-choice { - border-color: #D44950; -} - -.select2-result-single { - padding-left: 0; -} - -.select2-locked > .select2-search-choice-close{ - display:none; -} - -.select-locked > .ui-select-match-close{ - display:none; -} - -body > .select2-container.open { - z-index: 9999; /* The z-index Select2 applies to the select2-drop */ -} - -/* Handle up direction Select2 */ -.ui-select-container[theme="select2"].direction-up .ui-select-match { - border-radius: 4px; /* FIXME hardcoded value :-/ */ - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.ui-select-container[theme="select2"].direction-up .ui-select-dropdown { - border-radius: 4px; /* FIXME hardcoded value :-/ */ - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - - border-top-width: 1px; /* FIXME hardcoded value :-/ */ - border-top-style: solid; - - box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25); - - margin-top: -4px; /* FIXME hardcoded value :-/ */ -} -.ui-select-container[theme="select2"].direction-up .ui-select-dropdown .select2-search { - margin-top: 4px; /* FIXME hardcoded value :-/ */ -} -.ui-select-container[theme="select2"].direction-up.select2-dropdown-open .ui-select-match { - border-bottom-color: #5897fb; -} - -/* Selectize theme */ - -/* Helper class to show styles when focus */ -.selectize-input.selectize-focus{ - border-color: #007FBB !important; -} - -/* Fix input width for Selectize theme */ -.selectize-control > .selectize-input > input { - width: 100%; -} - -/* Fix dropdown width for Selectize theme */ -.selectize-control > .selectize-dropdown { - width: 100%; -} - -/* Mark invalid Selectize */ -.ng-dirty.ng-invalid > div.selectize-input { - border-color: #D44950; -} - -/* Handle up direction Selectize */ -.ui-select-container[theme="selectize"].direction-up .ui-select-dropdown { - box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25); - - margin-top: -2px; /* FIXME hardcoded value :-/ */ -} - -/* Bootstrap theme */ - -/* Helper class to show styles when focus */ -.btn-default-focus { - color: #333; - background-color: #EBEBEB; - border-color: #ADADAD; - text-decoration: none; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); -} - -.ui-select-bootstrap .ui-select-toggle { - position: relative; -} - -.ui-select-bootstrap .ui-select-toggle > .caret { - position: absolute; - height: 10px; - top: 50%; - right: 10px; - margin-top: -2px; -} - -/* Fix Bootstrap dropdown position when inside a input-group */ -.input-group > .ui-select-bootstrap.dropdown { - /* Instead of relative */ - position: static; -} - -.input-group > .ui-select-bootstrap > input.ui-select-search.form-control { - border-radius: 4px; /* FIXME hardcoded value :-/ */ - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} -.input-group > .ui-select-bootstrap > input.ui-select-search.form-control.direction-up { - border-radius: 4px !important; /* FIXME hardcoded value :-/ */ - border-top-right-radius: 0 !important; - border-bottom-right-radius: 0 !important; -} - -.ui-select-bootstrap > .ui-select-match > .btn{ - /* Instead of center because of .btn */ - text-align: left !important; -} - -.ui-select-bootstrap > .ui-select-match > .caret { - position: absolute; - top: 45%; - right: 15px; -} - -/* See Scrollable Menu with Bootstrap 3 http://stackoverflow.com/questions/19227496 */ -.ui-select-bootstrap > .ui-select-choices { - width: 100%; - height: auto; - max-height: 200px; - overflow-x: hidden; - margin-top: -1px; -} - -body > .ui-select-bootstrap.open { - z-index: 1000; /* Standard Bootstrap dropdown z-index */ -} - -.ui-select-multiple.ui-select-bootstrap { - height: auto; - padding: 3px 3px 0 3px; -} - -.ui-select-multiple.ui-select-bootstrap input.ui-select-search { - background-color: transparent !important; /* To prevent double background when disabled */ - border: none; - outline: none; - height: 1.666666em; - margin-bottom: 3px; -} - -.ui-select-multiple.ui-select-bootstrap .ui-select-match .close { - font-size: 1.6em; - line-height: 0.75; -} - -.ui-select-multiple.ui-select-bootstrap .ui-select-match-item { - outline: 0; - margin: 0 3px 3px 0; -} - -.ui-select-multiple .ui-select-match-item { - position: relative; -} - -.ui-select-multiple .ui-select-match-item.dropping-before:before { - content: ""; - position: absolute; - top: 0; - right: 100%; - height: 100%; - margin-right: 2px; - border-left: 1px solid #428bca; -} - -.ui-select-multiple .ui-select-match-item.dropping-after:after { - content: ""; - position: absolute; - top: 0; - left: 100%; - height: 100%; - margin-left: 2px; - border-right: 1px solid #428bca; -} - -.ui-select-bootstrap .ui-select-choices-row>a { - display: block; - padding: 3px 20px; - clear: both; - font-weight: 400; - line-height: 1.42857143; - color: #333; - white-space: nowrap; -} - -.ui-select-bootstrap .ui-select-choices-row>a:hover, .ui-select-bootstrap .ui-select-choices-row>a:focus { - text-decoration: none; - color: #262626; - background-color: #f5f5f5; -} - -.ui-select-bootstrap .ui-select-choices-row.active>a { - color: #fff; - text-decoration: none; - outline: 0; - background-color: #428bca; -} - -.ui-select-bootstrap .ui-select-choices-row.disabled>a, -.ui-select-bootstrap .ui-select-choices-row.active.disabled>a { - color: #777; - cursor: not-allowed; - background-color: #fff; -} - -/* fix hide/show angular animation */ -.ui-select-match.ng-hide-add, -.ui-select-search.ng-hide-add { - display: none !important; -} - -/* Mark invalid Bootstrap */ -.ui-select-bootstrap.ng-dirty.ng-invalid > button.btn.ui-select-match { - border-color: #D44950; -} - -/* Handle up direction Bootstrap */ -.ui-select-container[theme="bootstrap"].direction-up .ui-select-dropdown { - box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.25); -} diff --git a/public/bower_components/ui-select/select.js b/public/bower_components/ui-select/select.js deleted file mode 100644 index 42839ab..0000000 --- a/public/bower_components/ui-select/select.js +++ /dev/null @@ -1,2089 +0,0 @@ -/*! - * ui-select - * http://github.com/angular-ui/ui-select - * Version: 0.16.0 - 2016-03-23T20:51:56.609Z - * License: MIT - */ - - -(function () { -"use strict"; -var KEY = { - TAB: 9, - ENTER: 13, - ESC: 27, - SPACE: 32, - LEFT: 37, - UP: 38, - RIGHT: 39, - DOWN: 40, - SHIFT: 16, - CTRL: 17, - ALT: 18, - PAGE_UP: 33, - PAGE_DOWN: 34, - HOME: 36, - END: 35, - BACKSPACE: 8, - DELETE: 46, - COMMAND: 91, - - MAP: { 91 : "COMMAND", 8 : "BACKSPACE" , 9 : "TAB" , 13 : "ENTER" , 16 : "SHIFT" , 17 : "CTRL" , 18 : "ALT" , 19 : "PAUSEBREAK" , 20 : "CAPSLOCK" , 27 : "ESC" , 32 : "SPACE" , 33 : "PAGE_UP", 34 : "PAGE_DOWN" , 35 : "END" , 36 : "HOME" , 37 : "LEFT" , 38 : "UP" , 39 : "RIGHT" , 40 : "DOWN" , 43 : "+" , 44 : "PRINTSCREEN" , 45 : "INSERT" , 46 : "DELETE", 48 : "0" , 49 : "1" , 50 : "2" , 51 : "3" , 52 : "4" , 53 : "5" , 54 : "6" , 55 : "7" , 56 : "8" , 57 : "9" , 59 : ";", 61 : "=" , 65 : "A" , 66 : "B" , 67 : "C" , 68 : "D" , 69 : "E" , 70 : "F" , 71 : "G" , 72 : "H" , 73 : "I" , 74 : "J" , 75 : "K" , 76 : "L", 77 : "M" , 78 : "N" , 79 : "O" , 80 : "P" , 81 : "Q" , 82 : "R" , 83 : "S" , 84 : "T" , 85 : "U" , 86 : "V" , 87 : "W" , 88 : "X" , 89 : "Y" , 90 : "Z", 96 : "0" , 97 : "1" , 98 : "2" , 99 : "3" , 100 : "4" , 101 : "5" , 102 : "6" , 103 : "7" , 104 : "8" , 105 : "9", 106 : "*" , 107 : "+" , 109 : "-" , 110 : "." , 111 : "/", 112 : "F1" , 113 : "F2" , 114 : "F3" , 115 : "F4" , 116 : "F5" , 117 : "F6" , 118 : "F7" , 119 : "F8" , 120 : "F9" , 121 : "F10" , 122 : "F11" , 123 : "F12", 144 : "NUMLOCK" , 145 : "SCROLLLOCK" , 186 : ";" , 187 : "=" , 188 : "," , 189 : "-" , 190 : "." , 191 : "/" , 192 : "`" , 219 : "[" , 220 : "\\" , 221 : "]" , 222 : "'" - }, - - isControl: function (e) { - var k = e.which; - switch (k) { - case KEY.COMMAND: - case KEY.SHIFT: - case KEY.CTRL: - case KEY.ALT: - return true; - } - - if (e.metaKey) return true; - - return false; - }, - isFunctionKey: function (k) { - k = k.which ? k.which : k; - return k >= 112 && k <= 123; - }, - isVerticalMovement: function (k){ - return ~[KEY.UP, KEY.DOWN].indexOf(k); - }, - isHorizontalMovement: function (k){ - return ~[KEY.LEFT,KEY.RIGHT,KEY.BACKSPACE,KEY.DELETE].indexOf(k); - }, - toSeparator: function (k) { - var sep = {ENTER:"\n",TAB:"\t",SPACE:" "}[k]; - if (sep) return sep; - // return undefined for special keys other than enter, tab or space. - // no way to use them to cut strings. - return KEY[k] ? undefined : k; - } - }; - -/** - * Add querySelectorAll() to jqLite. - * - * jqLite find() is limited to lookups by tag name. - * TODO This will change with future versions of AngularJS, to be removed when this happens - * - * See jqLite.find - why not use querySelectorAll? https://github.com/angular/angular.js/issues/3586 - * See feat(jqLite): use querySelectorAll instead of getElementsByTagName in jqLite.find https://github.com/angular/angular.js/pull/3598 - */ -if (angular.element.prototype.querySelectorAll === undefined) { - angular.element.prototype.querySelectorAll = function(selector) { - return angular.element(this[0].querySelectorAll(selector)); - }; -} - -/** - * Add closest() to jqLite. - */ -if (angular.element.prototype.closest === undefined) { - angular.element.prototype.closest = function( selector) { - var elem = this[0]; - var matchesSelector = elem.matches || elem.webkitMatchesSelector || elem.mozMatchesSelector || elem.msMatchesSelector; - - while (elem) { - if (matchesSelector.bind(elem)(selector)) { - return elem; - } else { - elem = elem.parentElement; - } - } - return false; - }; -} - -var latestId = 0; - -var uis = angular.module('ui.select', []) - -.constant('uiSelectConfig', { - theme: 'bootstrap', - searchEnabled: true, - sortable: false, - placeholder: '', // Empty by default, like HTML tag "); - $compile(focusser)(scope); - $select.focusser = focusser; - - //Input that will handle focus - $select.focusInput = focusser; - - element.parent().append(focusser); - focusser.bind("focus", function(){ - scope.$evalAsync(function(){ - $select.focus = true; - }); - }); - focusser.bind("blur", function(){ - scope.$evalAsync(function(){ - $select.focus = false; - }); - }); - focusser.bind("keydown", function(e){ - - if (e.which === KEY.BACKSPACE) { - e.preventDefault(); - e.stopPropagation(); - $select.select(undefined); - scope.$apply(); - return; - } - - if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC) { - return; - } - - if (e.which == KEY.DOWN || e.which == KEY.UP || e.which == KEY.ENTER || e.which == KEY.SPACE){ - e.preventDefault(); - e.stopPropagation(); - $select.activate(); - } - - scope.$digest(); - }); - - focusser.bind("keyup input", function(e){ - - if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC || e.which == KEY.ENTER || e.which === KEY.BACKSPACE) { - return; - } - - $select.activate(focusser.val()); //User pressed some regular key, so we pass it to the search input - focusser.val(''); - scope.$digest(); - - }); - - - } - }; -}]); -// Make multiple matches sortable -uis.directive('uiSelectSort', ['$timeout', 'uiSelectConfig', 'uiSelectMinErr', function($timeout, uiSelectConfig, uiSelectMinErr) { - return { - require: '^^uiSelect', - link: function(scope, element, attrs, $select) { - if (scope[attrs.uiSelectSort] === null) { - throw uiSelectMinErr('sort', 'Expected a list to sort'); - } - - var options = angular.extend({ - axis: 'horizontal' - }, - scope.$eval(attrs.uiSelectSortOptions)); - - var axis = options.axis; - var draggingClassName = 'dragging'; - var droppingClassName = 'dropping'; - var droppingBeforeClassName = 'dropping-before'; - var droppingAfterClassName = 'dropping-after'; - - scope.$watch(function(){ - return $select.sortable; - }, function(newValue){ - if (newValue) { - element.attr('draggable', true); - } else { - element.removeAttr('draggable'); - } - }); - - element.on('dragstart', function(event) { - element.addClass(draggingClassName); - - (event.dataTransfer || event.originalEvent.dataTransfer).setData('text', scope.$index.toString()); - }); - - element.on('dragend', function() { - element.removeClass(draggingClassName); - }); - - var move = function(from, to) { - /*jshint validthis: true */ - this.splice(to, 0, this.splice(from, 1)[0]); - }; - - var dragOverHandler = function(event) { - event.preventDefault(); - - var offset = axis === 'vertical' ? event.offsetY || event.layerY || (event.originalEvent ? event.originalEvent.offsetY : 0) : event.offsetX || event.layerX || (event.originalEvent ? event.originalEvent.offsetX : 0); - - if (offset < (this[axis === 'vertical' ? 'offsetHeight' : 'offsetWidth'] / 2)) { - element.removeClass(droppingAfterClassName); - element.addClass(droppingBeforeClassName); - - } else { - element.removeClass(droppingBeforeClassName); - element.addClass(droppingAfterClassName); - } - }; - - var dropTimeout; - - var dropHandler = function(event) { - event.preventDefault(); - - var droppedItemIndex = parseInt((event.dataTransfer || event.originalEvent.dataTransfer).getData('text'), 10); - - // prevent event firing multiple times in firefox - $timeout.cancel(dropTimeout); - dropTimeout = $timeout(function() { - _dropHandler(droppedItemIndex); - }, 20); - }; - - var _dropHandler = function(droppedItemIndex) { - var theList = scope.$eval(attrs.uiSelectSort); - var itemToMove = theList[droppedItemIndex]; - var newIndex = null; - - if (element.hasClass(droppingBeforeClassName)) { - if (droppedItemIndex < scope.$index) { - newIndex = scope.$index - 1; - } else { - newIndex = scope.$index; - } - } else { - if (droppedItemIndex < scope.$index) { - newIndex = scope.$index; - } else { - newIndex = scope.$index + 1; - } - } - - move.apply(theList, [droppedItemIndex, newIndex]); - - scope.$apply(function() { - scope.$emit('uiSelectSort:change', { - array: theList, - item: itemToMove, - from: droppedItemIndex, - to: newIndex - }); - }); - - element.removeClass(droppingClassName); - element.removeClass(droppingBeforeClassName); - element.removeClass(droppingAfterClassName); - - element.off('drop', dropHandler); - }; - - element.on('dragenter', function() { - if (element.hasClass(draggingClassName)) { - return; - } - - element.addClass(droppingClassName); - - element.on('dragover', dragOverHandler); - element.on('drop', dropHandler); - }); - - element.on('dragleave', function(event) { - if (event.target != element) { - return; - } - element.removeClass(droppingClassName); - element.removeClass(droppingBeforeClassName); - element.removeClass(droppingAfterClassName); - - element.off('dragover', dragOverHandler); - element.off('drop', dropHandler); - }); - } - }; -}]); - -/** - * Parses "repeat" attribute. - * - * Taken from AngularJS ngRepeat source code - * See https://github.com/angular/angular.js/blob/v1.2.15/src/ng/directive/ngRepeat.js#L211 - * - * Original discussion about parsing "repeat" attribute instead of fully relying on ng-repeat: - * https://github.com/angular-ui/ui-select/commit/5dd63ad#commitcomment-5504697 - */ - -uis.service('uisRepeatParser', ['uiSelectMinErr','$parse', function(uiSelectMinErr, $parse) { - var self = this; - - /** - * Example: - * expression = "address in addresses | filter: {street: $select.search} track by $index" - * itemName = "address", - * source = "addresses | filter: {street: $select.search}", - * trackByExp = "$index", - */ - self.parse = function(expression) { - - - var match; - //var isObjectCollection = /\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)/.test(expression); - // If an array is used as collection - - // if (isObjectCollection){ - // 000000000000000000000000000000111111111000000000000000222222222222220033333333333333333333330000444444444444444444000000000000000055555555555000000000000000000000066666666600000000 - match = expression.match(/^\s*(?:([\s\S]+?)\s+as\s+)?(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(\s*[\s\S]+?)?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/); - - // 1 Alias - // 2 Item - // 3 Key on (key,value) - // 4 Value on (key,value) - // 5 Source expression (including filters) - // 6 Track by - - if (!match) { - throw uiSelectMinErr('iexp', "Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.", - expression); - } - - var source = match[5], - filters = ''; - - // When using (key,value) ui-select requires filters to be extracted, since the object - // is converted to an array for $select.items - // (in which case the filters need to be reapplied) - if (match[3]) { - // Remove any enclosing parenthesis - source = match[5].replace(/(^\()|(\)$)/g, ''); - // match all after | but not after || - var filterMatch = match[5].match(/^\s*(?:[\s\S]+?)(?:[^\|]|\|\|)+([\s\S]*)\s*$/); - if(filterMatch && filterMatch[1].trim()) { - filters = filterMatch[1]; - source = source.replace(filters, ''); - } - } - - return { - itemName: match[4] || match[2], // (lhs) Left-hand side, - keyName: match[3], //for (key, value) syntax - source: $parse(source), - filters: filters, - trackByExp: match[6], - modelMapper: $parse(match[1] || match[4] || match[2]), - repeatExpression: function (grouped) { - var expression = this.itemName + ' in ' + (grouped ? '$group.items' : '$select.items'); - if (this.trackByExp) { - expression += ' track by ' + this.trackByExp; - } - return expression; - } - }; - - }; - - self.getGroupNgRepeatExpression = function() { - return '$group in $select.groups'; - }; - -}]); - -}()); -angular.module("ui.select").run(["$templateCache", function($templateCache) {$templateCache.put("bootstrap/choices.tpl.html","
            • 0\">
            "); -$templateCache.put("bootstrap/match-multiple.tpl.html"," × "); -$templateCache.put("bootstrap/match.tpl.html","
            {{$select.placeholder}}
            "); -$templateCache.put("bootstrap/select-multiple.tpl.html","
            "); -$templateCache.put("bootstrap/select.tpl.html","
            "); -$templateCache.put("select2/choices.tpl.html","
            "); -$templateCache.put("select2/match-multiple.tpl.html","
          • "); -$templateCache.put("select2/match.tpl.html","{{$select.placeholder}} "); -$templateCache.put("select2/select-multiple.tpl.html","
            "); -$templateCache.put("select2/select.tpl.html","
            "); -$templateCache.put("selectize/choices.tpl.html","
            "); -$templateCache.put("selectize/match.tpl.html","
            "); -$templateCache.put("selectize/select.tpl.html","
            ");}]); \ No newline at end of file diff --git a/public/bower_components/webcomponentsjs/webcomponents.js b/public/bower_components/webcomponentsjs/webcomponents.js index 546067f..f363c0e 100644 --- a/public/bower_components/webcomponentsjs/webcomponents.js +++ b/public/bower_components/webcomponentsjs/webcomponents.js @@ -7,7 +7,7 @@ * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ -// @version 0.7.20 +// @version 0.7.22 (function() { window.WebComponents = window.WebComponents || { flags: {} @@ -3420,10 +3420,7 @@ if (WebComponents.flags.shadow) { var unwrappedActiveElement = unwrap(this).ownerDocument.activeElement; if (!unwrappedActiveElement || !unwrappedActiveElement.nodeType) return null; var activeElement = wrap(unwrappedActiveElement); - if (activeElement === this.host) { - return null; - } - while (!this.contains(activeElement) && !this.host.contains(activeElement)) { + while (!this.contains(activeElement)) { while (activeElement.parentNode) { activeElement = activeElement.parentNode; } @@ -6368,7 +6365,7 @@ window.HTMLImports.addModule(function(scope) { if (doc && this._mayParse.indexOf(doc) < 0) { this._mayParse.push(doc); var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc)); - for (var i = 0, l = nodes.length, p = 0, n; i < l && (n = nodes[i]); i++) { + for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) { if (!this.isParsed(n)) { if (this.hasResource(n)) { return nodeIsImport(n) ? this.nextToParseInDoc(n.__doc, n) : n; @@ -6933,6 +6930,9 @@ window.CustomElements.addModule(function(scope) { definition.prototype = Object.create(HTMLElement.prototype); } definition.__name = name.toLowerCase(); + if (definition.extends) { + definition.extends = definition.extends.toLowerCase(); + } definition.lifecycle = definition.lifecycle || {}; definition.ancestry = ancestry(definition.extends); resolveTagName(definition); @@ -7105,21 +7105,6 @@ window.CustomElements.addModule(function(scope) { } wrapDomMethodToForceUpgrade(Node.prototype, "cloneNode"); wrapDomMethodToForceUpgrade(document, "importNode"); - if (isIE) { - (function() { - var importNode = document.importNode; - document.importNode = function() { - var n = importNode.apply(document, arguments); - if (n.nodeType == n.DOCUMENT_FRAGMENT_NODE) { - var f = document.createDocumentFragment(); - f.appendChild(n); - return f; - } else { - return n; - } - }; - })(); - } document.registerElement = register; document.createElement = createElement; document.createElementNS = createElementNS; diff --git a/public/index.html b/public/index.html index af59346..5de598b 100644 --- a/public/index.html +++ b/public/index.html @@ -12,7 +12,7 @@ - + @@ -48,9 +48,9 @@ - + - + diff --git a/release-notes/changelog_0.0.141.txt b/release-notes/changelog_0.0.141.txt index 37e8fbb..97cec06 100644 --- a/release-notes/changelog_0.0.141.txt +++ b/release-notes/changelog_0.0.141.txt @@ -1,5 +1,11 @@ # xCALLY MOTION Changelog +- * 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. - * 0a64ca2 - 2016-09-07: Updated ui-select; Fixed sounds and announces in queue settings. - * 16b208a - 2016-09-07: new version - * 54a160d - 2016-09-07: fixed chat error @@ -35,13 +41,4 @@ - * d06a61e - 2016-09-02: Added enalble recording flag in agent motionbar settings - * 0f9e6b1 - 2016-09-01: Fixed menu, getdigits and getsecretdigits retry; Added answer to start block and a switch to enable/disable it; - * f0d80d7 - 2016-09-01: Fixed voicemail select in square block -- * a125cc6 - 2016-09-01: Added notes to square projects -- * 41779ad - 2016-08-31: Fixed cm contacts filtering -- * db45094 - 2016-08-31: server side licenses migrations -- * 2008cb7 - 2016-08-31: Return max number of agents starting from a min internal; Return max number of mailbox starting from a min mailbox; Return first free internal number; Improved min internal and min mailbox generation; Moved general section on top in the sidebar. -- * 26587d0 - 2016-08-31: model action data string to string(4096) -- * a20509a - 2016-08-31: server side config/routing send mail app replace template -- * 9f412a9 - 2016-08-31: client side components/sidebar update -- * 47b3d2c - 2016-08-31: server side api/smtp update -- * 16406e3 - 2016-08-31: client side app/setting/smtp bug fix diff --git a/server/api/_apidoc.js b/server/api/_apidoc.js index 15acac0..836e5a5 100644 --- a/server/api/_apidoc.js +++ b/server/api/_apidoc.js @@ -1 +1,21 @@ -var _0x5546=[] \ No newline at end of file +/** + * @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 + * } + */ diff --git a/server/api/action/action.controller.js b/server/api/action/action.controller.js index 5046331..a5d8d27 100644 --- a/server/api/action/action.controller.js +++ b/server/api/action/action.controller.js @@ -1 +1,88 @@ -var _0x93dc=["\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"];_0x93dc[0];var _=require(_0x93dc[1]);var Action=require(_0x93dc[3])[_0x93dc[2]];var sequelize=require(_0x93dc[3])[_0x93dc[4]];function handleError(_0xf1fdx5,_0xf1fdx6){return _0xf1fdx5[_0x93dc[6]](500)[_0x93dc[5]](_0xf1fdx6)}function responseWithResult(_0xf1fdx5,_0xf1fdx8){_0xf1fdx8= _0xf1fdx8|| 200;return function(_0xf1fdx9){if(_0xf1fdx9){_0xf1fdx5[_0x93dc[6]](_0xf1fdx8)[_0x93dc[7]](_0xf1fdx9)}}}function handleEntityNotFound(_0xf1fdx5){return function(_0xf1fdx9){if(!_0xf1fdx9){_0xf1fdx5[_0x93dc[6]](404)[_0x93dc[8]]();return null};return _0xf1fdx9}}function saveUpdates(_0xf1fdxc){return function(_0xf1fdx9){return _0xf1fdx9[_0x93dc[10]](_0xf1fdxc)[_0x93dc[9]](function(_0xf1fdxd){return _0xf1fdxd})}}function removeEntity(_0xf1fdx5){return function(_0xf1fdx9){if(_0xf1fdx9){return _0xf1fdx9[_0x93dc[11]]()[_0x93dc[9]](function(){_0xf1fdx5[_0x93dc[6]](204)[_0x93dc[8]]()})}}}exports[_0x93dc[12]]= function(_0xf1fdxf,_0xf1fdx5){return Action[_0x93dc[14]]()[_0x93dc[9]](responseWithResult(_0xf1fdx5))[_0x93dc[13]](handleError(_0xf1fdx5))};exports[_0x93dc[15]]= function(_0xf1fdxf,_0xf1fdx5,_0xf1fdx10){_0xf1fdxf[_0x93dc[17]][_0x93dc[16]]= _0xf1fdxf[_0x93dc[19]][_0x93dc[18]];return sequelize[_0x93dc[28]](function(_0xf1fdx12){return Action[_0x93dc[15]](_[_0x93dc[27]](_0xf1fdxf[_0x93dc[17]],_0xf1fdxf[_0x93dc[26]]),{transaction:_0xf1fdx12,body:_0xf1fdxf[_0x93dc[17]]})})[_0x93dc[9]](function(_0xf1fdx11){return _0xf1fdx5[_0x93dc[6]](201)[_0x93dc[5]](_0xf1fdx11)})[_0x93dc[13]](function(_0xf1fdx6){console[_0x93dc[20]](_0xf1fdx6);if(_0xf1fdx6[_0x93dc[21]]=== _0x93dc[22]){_0xf1fdx6[_0x93dc[21]]= _0x93dc[23];_0xf1fdx6[_0x93dc[24]]= _0x93dc[25]};return handleError(_0xf1fdx5,_0xf1fdx6)})} \ No newline at end of file +/** + * 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); + }); +} diff --git a/server/api/action/action.events.js b/server/api/action/action.events.js index ce81af0..597aed4 100644 --- a/server/api/action/action.events.js +++ b/server/api/action/action.events.js @@ -1 +1,36 @@ -var _0xedc7=["\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"];_0xedc7[0];const EventEmitter=require(_0xedc7[1]);const Action=require(_0xedc7[3])[_0xedc7[2]];var ActionEvents= new EventEmitter();ActionEvents[_0xedc7[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xedc7[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xedc7[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xedc7[6]};for(var e in events){var event=events[e];Action[_0xedc7[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xf3e3x8,_0xf3e3x9,_0xf3e3xa){ActionEvents[_0xedc7[10]](event+ _0xedc7[8]+ _0xf3e3x8[_0xedc7[9]],_0xf3e3x8);ActionEvents[_0xedc7[10]](event,_0xf3e3x8);_0xf3e3xa(null)}}module[_0xedc7[11]]= ActionEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/action/action.socket.js b/server/api/action/action.socket.js index 8e82050..26d4dbd 100644 --- a/server/api/action/action.socket.js +++ b/server/api/action/action.socket.js @@ -1 +1,32 @@ -var _0x7be5=["\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"];_0x7be5[0];const ActionEvents=require(_0x7be5[1]);var events=[_0x7be5[2],_0x7be5[3]];exports[_0x7be5[4]]= function(_0x8438x3){for(var _0x8438x4=0,_0x8438x5=events[_0x7be5[5]];_0x8438x4< _0x8438x5;_0x8438x4++){var _0x8438x6=events[_0x8438x4];var _0x8438x7=createListener(_0x7be5[6]+ _0x8438x6,_0x8438x3);ActionEvents[_0x7be5[7]](_0x8438x6,_0x8438x7);_0x8438x3[_0x7be5[7]](_0x7be5[8],removeListener(_0x8438x6,_0x8438x7))}};function createListener(_0x8438x6,_0x8438x3){return function(_0x8438x9){_0x8438x3[_0x7be5[9]](_0x8438x6,_0x8438x9)}}function removeListener(_0x8438x6,_0x8438x7){return function(){ActionEvents[_0x7be5[10]](_0x8438x6,_0x8438x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/action/index.js b/server/api/action/index.js index 7585d6a..1882fa5 100644 --- a/server/api/action/index.js +++ b/server/api/action/index.js @@ -1 +1,13 @@ -var _0x838b=["\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"];_0x838b[0];var express=require(_0x838b[1]);var auth=require(_0x838b[2]);var controller=require(_0x838b[3]);var router=express.Router();router[_0x838b[7]](_0x838b[4],auth[_0x838b[5]](),controller[_0x838b[6]]);router[_0x838b[10]](_0x838b[8],auth[_0x838b[5]](),controller[_0x838b[9]]);module[_0x838b[11]]= router \ No newline at end of file +'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; diff --git a/server/api/agent/agent.controller.js b/server/api/agent/agent.controller.js index 07eb064..0e63059 100644 --- a/server/api/agent/agent.controller.js +++ b/server/api/agent/agent.controller.js @@ -1 +1,1144 @@ -var _0x5df0=["\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"];_0x5df0[0];var _=require(_0x5df0[1]);var sequelize=require(_0x5df0[3])[_0x5df0[2]];var util=require(_0x5df0[4]);var Util=require(_0x5df0[5]);var OpenchannelQueue=require(_0x5df0[3])[_0x5df0[6]];var VoiceQueue=require(_0x5df0[3])[_0x5df0[7]];var ChatQueue=require(_0x5df0[3])[_0x5df0[8]];var MailQueue=require(_0x5df0[3])[_0x5df0[9]];var FaxQueue=require(_0x5df0[3])[_0x5df0[10]];var SmsQueue=require(_0x5df0[3])[_0x5df0[11]];var MailRoom=require(_0x5df0[3])[_0x5df0[12]];var Setting=require(_0x5df0[3])[_0x5df0[13]];var Agent=require(_0x5df0[3])[_0x5df0[14]];var User=require(_0x5df0[3])[_0x5df0[14]];var Team=require(_0x5df0[3])[_0x5df0[15]];var List=require(_0x5df0[3])[_0x5df0[16]];exports[_0x5df0[17]]= function(_0x9602x11,_0x9602x12,_0x9602x13){switch(_0x9602x11[_0x5df0[26]][_0x5df0[32]]){case _0x5df0[26]:return User[_0x5df0[27]](_0x9602x11[_0x5df0[26]][_0x5df0[25]],{attributes:[_0x5df0[25]]})[_0x5df0[22]](Util[_0x5df0[24]](_0x9602x11[_0x5df0[23]]))[_0x5df0[22]](function(_0x9602x15){return _0x9602x12[_0x5df0[21]](200)[_0x5df0[20]](_0x9602x15)})[_0x5df0[19]](function(_0x9602x14){console[_0x5df0[18]](_0x9602x14);return handleError(_0x9602x12,_0x9602x14)});default:return Agent[_0x5df0[31]](_0x5df0[30])[_0x5df0[29]](Util[_0x5df0[28]](_0x9602x11[_0x5df0[23]]))[_0x5df0[22]](function(_0x9602x15){return _0x9602x12[_0x5df0[21]](200)[_0x5df0[20]](_0x9602x15)})[_0x5df0[19]](function(_0x9602x14){return handleError(_0x9602x12,_0x9602x14)})}};exports[_0x5df0[33]]= function(_0x9602x11,_0x9602x12,_0x9602x13){return Agent[_0x5df0[27]](_0x9602x11[_0x5df0[52]][_0x5df0[25]],{attributes:[_0x5df0[25],_0x5df0[37]]})[_0x5df0[22]](function(_0x9602x17){if(!_0x9602x17){return _0x9602x12[_0x5df0[34]](401)};switch(_0x9602x11[_0x5df0[52]][_0x5df0[51]]){case _0x5df0[40]:return _0x9602x17[_0x5df0[39]](_0x9602x11[_0x5df0[35]],{interface:util[_0x5df0[38]](_0x5df0[36],_0x9602x17[_0x5df0[37]]),stateinterface:util[_0x5df0[38]](_0x5df0[36],_0x9602x17[_0x5df0[37]]),membername:_0x9602x17[_0x5df0[37]],UserId:_0x9602x17[_0x5df0[25]]});case _0x5df0[42]:return _0x9602x17[_0x5df0[41]](_0x9602x11[_0x5df0[35]]);case _0x5df0[44]:return _0x9602x17[_0x5df0[43]](_0x9602x11[_0x5df0[35]]);case _0x5df0[46]:return _0x9602x17[_0x5df0[45]](_0x9602x11[_0x5df0[35]]);case _0x5df0[48]:return _0x9602x17[_0x5df0[47]](_0x9602x11[_0x5df0[35]]);case _0x5df0[50]:return _0x9602x17[_0x5df0[49]](_0x9602x11[_0x5df0[35]]);default:return null}})[_0x5df0[22]](function(_0x9602x16){return _0x9602x12[_0x5df0[34]](_0x9602x16?200:401)})[_0x5df0[19]](function(_0x9602x14){console[_0x5df0[18]](_0x9602x14)})};exports[_0x5df0[53]]= function(_0x9602x11,_0x9602x12,_0x9602x13){return Agent[_0x5df0[27]](_0x9602x11[_0x5df0[52]][_0x5df0[25]],{attributes:[_0x5df0[25]]})[_0x5df0[22]](function(_0x9602x17){if(!_0x9602x17){return _0x9602x12[_0x5df0[34]](401)};switch(_0x9602x11[_0x5df0[52]][_0x5df0[51]]){case _0x5df0[40]:return _0x9602x17[_0x5df0[55]](_0x9602x11[_0x5df0[23]][_0x5df0[54]]);case _0x5df0[42]:return _0x9602x17[_0x5df0[56]](_0x9602x11[_0x5df0[23]][_0x5df0[54]]);case _0x5df0[44]:return _0x9602x17[_0x5df0[57]](_0x9602x11[_0x5df0[23]][_0x5df0[54]]);case _0x5df0[48]:return _0x9602x17[_0x5df0[58]](_0x9602x11[_0x5df0[23]][_0x5df0[54]]);case _0x5df0[46]:return _0x9602x17[_0x5df0[59]](_0x9602x11[_0x5df0[23]][_0x5df0[54]]);case _0x5df0[50]:return _0x9602x17[_0x5df0[60]](_0x9602x11[_0x5df0[23]][_0x5df0[54]]);default:return null}})[_0x5df0[22]](function(_0x9602x16){return _0x9602x12[_0x5df0[34]](_0x9602x16?200:401)})[_0x5df0[19]](function(_0x9602x14){console[_0x5df0[18]](_0x9602x14)})};exports[_0x5df0[61]]= function(_0x9602x11,_0x9602x12,_0x9602x13){switch(_0x9602x11[_0x5df0[26]][_0x5df0[32]]){case _0x5df0[26]:return User[_0x5df0[27]](_0x9602x11[_0x5df0[26]][_0x5df0[25]],{attributes:[_0x5df0[25]]})[_0x5df0[22]](Util[_0x5df0[24]](_0x9602x11[_0x5df0[23]]))[_0x5df0[22]](function(_0x9602x15){return _0x9602x12[_0x5df0[21]](200)[_0x5df0[20]](_0x9602x15)})[_0x5df0[19]](function(_0x9602x14){console[_0x5df0[62]](_0x9602x14);return handleError(_0x9602x12,_0x9602x14)});default:return Agent[_0x5df0[31]](_0x5df0[30],{method:[_0x5df0[63],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[64],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[65],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[66],_0x9602x11[_0x5df0[23]]]},_0x5df0[67])[_0x5df0[29]](Util[_0x5df0[28]](_0x9602x11[_0x5df0[23]]))[_0x5df0[22]](function(_0x9602x15){return _0x9602x12[_0x5df0[21]](200)[_0x5df0[20]](_0x9602x15)})[_0x5df0[19]](function(_0x9602x14){console[_0x5df0[62]](_0x9602x14);return handleError(_0x9602x12,_0x9602x14)})}};exports[_0x5df0[68]]= function(_0x9602x11,_0x9602x12,_0x9602x13){switch(_0x9602x11[_0x5df0[26]][_0x5df0[32]]){case _0x5df0[26]:var _0x9602x18=[];return User[_0x5df0[27]](_0x9602x11[_0x5df0[26]][_0x5df0[25]],{attributes:[_0x5df0[25]]})[_0x5df0[22]](Util[_0x5df0[74]]({},{attributes:[_0x5df0[37]],include:[{raw:true,model:User,attributes:[_0x5df0[25]]}]}))[_0x5df0[22]](function(_0x9602x16){var _0x9602x19=_[_0x5df0[70]](_0x9602x16[_0x5df0[69]],_0x5df0[37]);_0x9602x16[_0x5df0[69]][_0x5df0[72]](function(_0x9602x1a){_0x9602x18= _[_0x5df0[71]](_0x9602x18,_[_0x5df0[70]](_0x9602x1a.Users,_0x5df0[25]))});return User[_0x5df0[31]](_0x5df0[30],{method:[_0x5df0[63],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[64],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[65],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[66],_0x9602x11[_0x5df0[23]]]})[_0x5df0[29]](_[_0x5df0[73]](Util[_0x5df0[28]](_0x9602x11[_0x5df0[23]],{id:{$in:_0x9602x18}}),{include:[{model:VoiceQueue,where:{name:{$in:_0x9602x19}},required:false}]}))})[_0x5df0[22]](function(_0x9602x15){return _0x9602x12[_0x5df0[21]](200)[_0x5df0[20]](_0x9602x15)})[_0x5df0[19]](function(_0x9602x14){console[_0x5df0[62]](_0x9602x14);return handleError(_0x9602x12,_0x9602x14)});default:return Agent[_0x5df0[31]](_0x5df0[30],{method:[_0x5df0[63],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[64],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[65],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[66],_0x9602x11[_0x5df0[23]]]},_0x5df0[67])[_0x5df0[29]](Util[_0x5df0[28]](_0x9602x11[_0x5df0[23]]))[_0x5df0[22]](function(_0x9602x15){return _0x9602x12[_0x5df0[21]](200)[_0x5df0[20]](_0x9602x15)})[_0x5df0[19]](function(_0x9602x14){console[_0x5df0[62]](_0x9602x14);return handleError(_0x9602x12,_0x9602x14)})}};exports[_0x5df0[75]]= function(_0x9602x11,_0x9602x12,_0x9602x13){switch(_0x9602x11[_0x5df0[26]][_0x5df0[32]]){case _0x5df0[26]:var _0x9602x18=[];return User[_0x5df0[27]](_0x9602x11[_0x5df0[26]][_0x5df0[25]],{attributes:[_0x5df0[25]]})[_0x5df0[22]](Util[_0x5df0[76]]({},{attributes:[_0x5df0[25]],include:[{raw:true,model:User,attributes:[_0x5df0[25]]}]}))[_0x5df0[22]](function(_0x9602x16){var _0x9602x1b=_[_0x5df0[70]](_0x9602x16[_0x5df0[69]],_0x5df0[25]);_0x9602x16[_0x5df0[69]][_0x5df0[72]](function(_0x9602x1a){_0x9602x18= _[_0x5df0[71]](_0x9602x18,_[_0x5df0[70]](_0x9602x1a.Users,_0x5df0[25]))});return User[_0x5df0[31]](_0x5df0[30],{method:[_0x5df0[63],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[64],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[65],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[66],_0x9602x11[_0x5df0[23]]]})[_0x5df0[29]](_[_0x5df0[73]](Util[_0x5df0[28]](_0x9602x11[_0x5df0[23]],{id:{$in:_0x9602x18}}),{include:[{model:ChatQueue,where:{id:{$in:_0x9602x1b}},required:false}]}))})[_0x5df0[22]](function(_0x9602x15){return _0x9602x12[_0x5df0[21]](200)[_0x5df0[20]](_0x9602x15)})[_0x5df0[19]](function(_0x9602x14){console[_0x5df0[62]](_0x9602x14);return handleError(_0x9602x12,_0x9602x14)});default:return Agent[_0x5df0[31]](_0x5df0[30],{method:[_0x5df0[63],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[64],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[65],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[66],_0x9602x11[_0x5df0[23]]]},_0x5df0[67])[_0x5df0[29]](Util[_0x5df0[28]](_0x9602x11[_0x5df0[23]]))[_0x5df0[22]](function(_0x9602x15){return _0x9602x12[_0x5df0[21]](200)[_0x5df0[20]](_0x9602x15)})[_0x5df0[19]](function(_0x9602x14){console[_0x5df0[62]](_0x9602x14);return handleError(_0x9602x12,_0x9602x14)})}};exports[_0x5df0[77]]= function(_0x9602x11,_0x9602x12,_0x9602x13){switch(_0x9602x11[_0x5df0[26]][_0x5df0[32]]){case _0x5df0[26]:var _0x9602x18=[];return User[_0x5df0[27]](_0x9602x11[_0x5df0[26]][_0x5df0[25]],{attributes:[_0x5df0[25]]})[_0x5df0[22]](Util[_0x5df0[78]]({},{attributes:[_0x5df0[25]],include:[{raw:true,model:User,attributes:[_0x5df0[25]]}]}))[_0x5df0[22]](function(_0x9602x16){var _0x9602x1c=_[_0x5df0[70]](_0x9602x16[_0x5df0[69]],_0x5df0[25]);_0x9602x16[_0x5df0[69]][_0x5df0[72]](function(_0x9602x1a){_0x9602x18= _[_0x5df0[71]](_0x9602x18,_[_0x5df0[70]](_0x9602x1a.Users,_0x5df0[25]))});return User[_0x5df0[31]](_0x5df0[30],{method:[_0x5df0[63],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[64],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[65],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[66],_0x9602x11[_0x5df0[23]]]})[_0x5df0[29]](_[_0x5df0[73]](Util[_0x5df0[28]](_0x9602x11[_0x5df0[23]],{id:{$in:_0x9602x18}}),{include:[{model:MailQueue,where:{id:{$in:_0x9602x1c}},required:false}]}))})[_0x5df0[22]](function(_0x9602x15){return _0x9602x12[_0x5df0[21]](200)[_0x5df0[20]](_0x9602x15)})[_0x5df0[19]](function(_0x9602x14){console[_0x5df0[62]](_0x9602x14);return handleError(_0x9602x12,_0x9602x14)});default:return Agent[_0x5df0[31]](_0x5df0[30],{method:[_0x5df0[63],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[64],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[65],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[66],_0x9602x11[_0x5df0[23]]]},_0x5df0[67])[_0x5df0[29]](Util[_0x5df0[28]](_0x9602x11[_0x5df0[23]]))[_0x5df0[22]](function(_0x9602x15){return _0x9602x12[_0x5df0[21]](200)[_0x5df0[20]](_0x9602x15)})[_0x5df0[19]](function(_0x9602x14){console[_0x5df0[62]](_0x9602x14);return handleError(_0x9602x12,_0x9602x14)})}};exports[_0x5df0[79]]= function(_0x9602x11,_0x9602x12,_0x9602x13){switch(_0x9602x11[_0x5df0[26]][_0x5df0[32]]){case _0x5df0[26]:var _0x9602x18=[];return User[_0x5df0[27]](_0x9602x11[_0x5df0[26]][_0x5df0[25]],{attributes:[_0x5df0[25]]})[_0x5df0[22]](Util[_0x5df0[80]]({},{attributes:[_0x5df0[25]],include:[{raw:true,model:User,attributes:[_0x5df0[25]]}]}))[_0x5df0[22]](function(_0x9602x16){var _0x9602x1d=_[_0x5df0[70]](_0x9602x16[_0x5df0[69]],_0x5df0[25]);_0x9602x16[_0x5df0[69]][_0x5df0[72]](function(_0x9602x1a){_0x9602x18= _[_0x5df0[71]](_0x9602x18,_[_0x5df0[70]](_0x9602x1a.Users,_0x5df0[25]))});return User[_0x5df0[31]](_0x5df0[30],{method:[_0x5df0[63],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[64],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[65],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[66],_0x9602x11[_0x5df0[23]]]})[_0x5df0[29]](_[_0x5df0[73]](Util[_0x5df0[28]](_0x9602x11[_0x5df0[23]],{id:{$in:_0x9602x18}}),{include:[{model:FaxQueue,where:{id:{$in:_0x9602x1d}},required:false}]}))})[_0x5df0[22]](function(_0x9602x15){return _0x9602x12[_0x5df0[21]](200)[_0x5df0[20]](_0x9602x15)})[_0x5df0[19]](function(_0x9602x14){console[_0x5df0[62]](_0x9602x14);return handleError(_0x9602x12,_0x9602x14)});default:return Agent[_0x5df0[31]](_0x5df0[30],{method:[_0x5df0[63],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[64],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[65],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[66],_0x9602x11[_0x5df0[23]]]},_0x5df0[67])[_0x5df0[29]](Util[_0x5df0[28]](_0x9602x11[_0x5df0[23]]))[_0x5df0[22]](function(_0x9602x15){return _0x9602x12[_0x5df0[21]](200)[_0x5df0[20]](_0x9602x15)})[_0x5df0[19]](function(_0x9602x14){console[_0x5df0[62]](_0x9602x14);return handleError(_0x9602x12,_0x9602x14)})}};exports[_0x5df0[81]]= function(_0x9602x11,_0x9602x12,_0x9602x13){switch(_0x9602x11[_0x5df0[26]][_0x5df0[32]]){case _0x5df0[26]:var _0x9602x18=[];return User[_0x5df0[27]](_0x9602x11[_0x5df0[26]][_0x5df0[25]],{attributes:[_0x5df0[25]]})[_0x5df0[22]](Util[_0x5df0[82]]({},{attributes:[_0x5df0[25]],include:[{raw:true,model:User,attributes:[_0x5df0[25]]}]}))[_0x5df0[22]](function(_0x9602x16){var _0x9602x1e=_[_0x5df0[70]](_0x9602x16[_0x5df0[69]],_0x5df0[25]);_0x9602x16[_0x5df0[69]][_0x5df0[72]](function(_0x9602x1a){_0x9602x18= _[_0x5df0[71]](_0x9602x18,_[_0x5df0[70]](_0x9602x1a.Users,_0x5df0[25]))});return User[_0x5df0[31]](_0x5df0[30],{method:[_0x5df0[63],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[64],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[65],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[66],_0x9602x11[_0x5df0[23]]]})[_0x5df0[29]](_[_0x5df0[73]](Util[_0x5df0[28]](_0x9602x11[_0x5df0[23]],{id:{$in:_0x9602x18}}),{include:[{model:SmsQueue,where:{id:{$in:_0x9602x1e}},required:false}]}))})[_0x5df0[22]](function(_0x9602x15){return _0x9602x12[_0x5df0[21]](200)[_0x5df0[20]](_0x9602x15)})[_0x5df0[19]](function(_0x9602x14){console[_0x5df0[62]](_0x9602x14);return handleError(_0x9602x12,_0x9602x14)});default:return Agent[_0x5df0[31]](_0x5df0[30],{method:[_0x5df0[63],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[64],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[65],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[66],_0x9602x11[_0x5df0[23]]]},_0x5df0[67])[_0x5df0[29]](Util[_0x5df0[28]](_0x9602x11[_0x5df0[23]]))[_0x5df0[22]](function(_0x9602x15){return _0x9602x12[_0x5df0[21]](200)[_0x5df0[20]](_0x9602x15)})[_0x5df0[19]](function(_0x9602x14){console[_0x5df0[62]](_0x9602x14);return handleError(_0x9602x12,_0x9602x14)})}};exports[_0x5df0[83]]= function(_0x9602x11,_0x9602x12,_0x9602x13){switch(_0x9602x11[_0x5df0[26]][_0x5df0[32]]){case _0x5df0[26]:var _0x9602x18=[];return User[_0x5df0[27]](_0x9602x11[_0x5df0[26]][_0x5df0[25]],{attributes:[_0x5df0[25]]})[_0x5df0[22]](Util[_0x5df0[84]]({},{attributes:[_0x5df0[25]],include:[{raw:true,model:User,attributes:[_0x5df0[25]]}]}))[_0x5df0[22]](function(_0x9602x16){var _0x9602x1f=_[_0x5df0[70]](_0x9602x16[_0x5df0[69]],_0x5df0[25]);_0x9602x16[_0x5df0[69]][_0x5df0[72]](function(_0x9602x1a){_0x9602x18= _[_0x5df0[71]](_0x9602x18,_[_0x5df0[70]](_0x9602x1a.Users,_0x5df0[25]))});return User[_0x5df0[31]](_0x5df0[30],{method:[_0x5df0[63],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[64],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[65],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[66],_0x9602x11[_0x5df0[23]]]})[_0x5df0[29]](_[_0x5df0[73]](Util[_0x5df0[28]](_0x9602x11[_0x5df0[23]],{id:{$in:_0x9602x18}}),{include:[{model:OpenchannelQueue,where:{id:{$in:_0x9602x1f}},required:false}]}))})[_0x5df0[22]](function(_0x9602x15){return _0x9602x12[_0x5df0[21]](200)[_0x5df0[20]](_0x9602x15)})[_0x5df0[19]](function(_0x9602x14){console[_0x5df0[62]](_0x9602x14);return handleError(_0x9602x12,_0x9602x14)});default:return Agent[_0x5df0[31]](_0x5df0[30],{method:[_0x5df0[63],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[64],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[65],_0x9602x11[_0x5df0[23]]]},{method:[_0x5df0[66],_0x9602x11[_0x5df0[23]]]},_0x5df0[67])[_0x5df0[29]](Util[_0x5df0[28]](_0x9602x11[_0x5df0[23]]))[_0x5df0[22]](function(_0x9602x15){return _0x9602x12[_0x5df0[21]](200)[_0x5df0[20]](_0x9602x15)})[_0x5df0[19]](function(_0x9602x14){console[_0x5df0[62]](_0x9602x14);return handleError(_0x9602x12,_0x9602x14)})}};exports[_0x5df0[85]]= function(_0x9602x11,_0x9602x12){return Agent[_0x5df0[31]](_0x5df0[30])[_0x5df0[27]](_0x9602x11[_0x5df0[52]][_0x5df0[25]])[_0x5df0[22]](function(_0x9602x17){if(!_0x9602x17){return _0x9602x12[_0x5df0[34]](404)};return _0x9602x12[_0x5df0[20]](_0x9602x17)})[_0x5df0[19]](function(_0x9602x14){return handleError(_0x9602x12,_0x9602x14)})};exports[_0x5df0[86]]= function(_0x9602x11,_0x9602x12){return Agent[_0x5df0[31]](_0x5df0[30])[_0x5df0[27]](_0x9602x11[_0x5df0[52]][_0x5df0[25]])[_0x5df0[22]](function(_0x9602x17){if(!_0x9602x17){return _0x9602x12[_0x5df0[34]](404)};return _0x9602x17[_0x5df0[88]]({attributes:[_0x5df0[37]]})})[_0x5df0[22]](function(_0x9602x19){return _0x9602x12[_0x5df0[20]]({count:_0x9602x19[_0x5df0[87]],rows:_0x9602x19})})[_0x5df0[19]](function(_0x9602x14){return handleError(_0x9602x12,_0x9602x14)})};exports[_0x5df0[89]]= function(_0x9602x11,_0x9602x12){return Agent[_0x5df0[31]](_0x5df0[30])[_0x5df0[27]](_0x9602x11[_0x5df0[52]][_0x5df0[25]])[_0x5df0[22]](function(_0x9602x17){if(!_0x9602x17){return _0x9602x12[_0x5df0[34]](404)};return _0x9602x17[_0x5df0[90]]({attributes:[_0x5df0[25]]})})[_0x5df0[22]](function(_0x9602x1b){return _0x9602x12[_0x5df0[20]]({count:_0x9602x1b[_0x5df0[87]],rows:_0x9602x1b})})[_0x5df0[19]](function(_0x9602x14){return handleError(_0x9602x12,_0x9602x14)})};exports[_0x5df0[91]]= function(_0x9602x11,_0x9602x12){return Agent[_0x5df0[31]](_0x5df0[30])[_0x5df0[27]](_0x9602x11[_0x5df0[52]][_0x5df0[25]])[_0x5df0[22]](function(_0x9602x17){if(!_0x9602x17){return _0x9602x12[_0x5df0[34]](404)};return _0x9602x17[_0x5df0[92]]({attributes:[_0x5df0[25]]})})[_0x5df0[22]](function(_0x9602x1c){return _0x9602x12[_0x5df0[20]]({count:_0x9602x1c[_0x5df0[87]],rows:_0x9602x1c})})[_0x5df0[19]](function(_0x9602x14){return handleError(_0x9602x12,_0x9602x14)})};exports[_0x5df0[93]]= function(_0x9602x11,_0x9602x12){return Agent[_0x5df0[31]](_0x5df0[30])[_0x5df0[27]](_0x9602x11[_0x5df0[52]][_0x5df0[25]])[_0x5df0[22]](function(_0x9602x17){if(!_0x9602x17){return _0x9602x12[_0x5df0[34]](404)};return _0x9602x17[_0x5df0[94]]({attributes:[_0x5df0[25]]})})[_0x5df0[22]](function(_0x9602x1d){return _0x9602x12[_0x5df0[20]]({count:_0x9602x1d[_0x5df0[87]],rows:_0x9602x1d})})[_0x5df0[19]](function(_0x9602x14){return handleError(_0x9602x12,_0x9602x14)})};exports[_0x5df0[95]]= function(_0x9602x11,_0x9602x12){return Agent[_0x5df0[31]](_0x5df0[30])[_0x5df0[27]](_0x9602x11[_0x5df0[52]][_0x5df0[25]])[_0x5df0[22]](function(_0x9602x17){if(!_0x9602x17){return _0x9602x12[_0x5df0[34]](404)};return _0x9602x17[_0x5df0[96]]({attributes:[_0x5df0[25]]})})[_0x5df0[22]](function(_0x9602x1e){return _0x9602x12[_0x5df0[20]]({count:_0x9602x1e[_0x5df0[87]],rows:_0x9602x1e})})[_0x5df0[19]](function(_0x9602x14){return handleError(_0x9602x12,_0x9602x14)})};exports[_0x5df0[97]]= function(_0x9602x11,_0x9602x12){return Agent[_0x5df0[31]](_0x5df0[30])[_0x5df0[27]](_0x9602x11[_0x5df0[52]][_0x5df0[25]])[_0x5df0[22]](function(_0x9602x17){if(!_0x9602x17){return _0x9602x12[_0x5df0[34]](404)};return _0x9602x17[_0x5df0[98]]({attributes:[_0x5df0[25]]})})[_0x5df0[22]](function(_0x9602x20){return _0x9602x12[_0x5df0[20]]({count:_0x9602x20[_0x5df0[87]],rows:_0x9602x20})})[_0x5df0[19]](function(_0x9602x14){return handleError(_0x9602x12,_0x9602x14)})};exports[_0x5df0[99]]= function(_0x9602x11,_0x9602x12){var _0x9602x21;_0x9602x11[_0x5df0[35]][_0x5df0[32]]= _0x5df0[30];return sequelize[_0x5df0[105]](function(_0x9602x22){return Agent[_0x5df0[31]](_0x5df0[30])[_0x5df0[99]](_0x9602x11[_0x5df0[35]],{transaction:_0x9602x22})[_0x5df0[22]](function(_0x9602x17){_0x9602x21= _0x9602x17;return Team[_0x5df0[104]]({where:{defaultEntry:true}})})[_0x5df0[22]](function(_0x9602x24){return _0x9602x24[_0x5df0[103]](_0x9602x21[_0x5df0[25]],{transaction:_0x9602x22})})[_0x5df0[22]](function(){return List[_0x5df0[104]]({where:{defaultEntry:true}})})[_0x5df0[22]](function(_0x9602x23){return _0x9602x23[_0x5df0[103]](_0x9602x21[_0x5df0[25]],{transaction:_0x9602x22})})[_0x5df0[22]](function(){if(_0x9602x11[_0x5df0[35]][_0x5df0[102]]&& _0x9602x11[_0x5df0[35]][_0x5df0[102]][_0x5df0[40]]&& _0x9602x11[_0x5df0[35]][_0x5df0[102]][_0x5df0[40]][_0x5df0[67]]){return _0x9602x21[_0x5df0[39]](_0x9602x11[_0x5df0[35]][_0x5df0[102]][_0x5df0[40]][_0x5df0[67]],{interface:util[_0x5df0[38]](_0x5df0[36],_0x9602x21[_0x5df0[37]]),stateinterface:util[_0x5df0[38]](_0x5df0[36],_0x9602x21[_0x5df0[37]]),membername:_0x9602x21[_0x5df0[37]],UserId:_0x9602x21[_0x5df0[25]],transaction:_0x9602x22})}})[_0x5df0[22]](function(){if(_0x9602x11[_0x5df0[35]][_0x5df0[102]]&& _0x9602x11[_0x5df0[35]][_0x5df0[102]][_0x5df0[42]]&& _0x9602x11[_0x5df0[35]][_0x5df0[102]][_0x5df0[42]][_0x5df0[67]]){return _0x9602x21[_0x5df0[41]](_0x9602x11[_0x5df0[35]][_0x5df0[102]][_0x5df0[42]][_0x5df0[67]],{transaction:_0x9602x22})}})[_0x5df0[22]](function(){if(_0x9602x11[_0x5df0[35]][_0x5df0[102]]&& _0x9602x11[_0x5df0[35]][_0x5df0[102]][_0x5df0[44]]&& _0x9602x11[_0x5df0[35]][_0x5df0[102]][_0x5df0[44]][_0x5df0[67]]){return _0x9602x21[_0x5df0[43]](_0x9602x11[_0x5df0[35]][_0x5df0[102]][_0x5df0[44]][_0x5df0[67]],{transaction:_0x9602x22})}})[_0x5df0[22]](function(){if(_0x9602x11[_0x5df0[35]][_0x5df0[102]]&& _0x9602x11[_0x5df0[35]][_0x5df0[102]][_0x5df0[48]]&& _0x9602x11[_0x5df0[35]][_0x5df0[102]][_0x5df0[48]][_0x5df0[67]]){return _0x9602x21[_0x5df0[47]](_0x9602x11[_0x5df0[35]][_0x5df0[102]][_0x5df0[48]][_0x5df0[67]],{transaction:_0x9602x22})}})[_0x5df0[22]](function(){if(_0x9602x11[_0x5df0[35]][_0x5df0[102]]&& _0x9602x11[_0x5df0[35]][_0x5df0[102]][_0x5df0[46]]&& _0x9602x11[_0x5df0[35]][_0x5df0[102]][_0x5df0[46]][_0x5df0[67]]){return _0x9602x21[_0x5df0[45]](_0x9602x11[_0x5df0[35]][_0x5df0[102]][_0x5df0[46]][_0x5df0[67]],{transaction:_0x9602x22})}})[_0x5df0[22]](function(){if(_0x9602x11[_0x5df0[35]][_0x5df0[102]]&& _0x9602x11[_0x5df0[35]][_0x5df0[102]][_0x5df0[50]]&& _0x9602x11[_0x5df0[35]][_0x5df0[102]][_0x5df0[50]][_0x5df0[67]]){return _0x9602x21[_0x5df0[49]](_0x9602x11[_0x5df0[35]][_0x5df0[102]][_0x5df0[50]][_0x5df0[67]],{transaction:_0x9602x22})}})})[_0x5df0[22]](function(){return _0x9602x12[_0x5df0[21]](201)[_0x5df0[20]](_0x9602x21)})[_0x5df0[19]](sequelize.UniqueConstraintError,function(_0x9602x14){console[_0x5df0[62]](_0x9602x14);return Util[_0x5df0[101]][_0x5df0[100]](_0x9602x12,_0x9602x14)})[_0x5df0[19]](function(_0x9602x14){console[_0x5df0[62]](_0x9602x14);return handleError(_0x9602x12,_0x9602x14)})};exports[_0x5df0[106]]= function(_0x9602x11,_0x9602x12){var _0x9602x25;var _0x9602x26;var _0x9602x27=[];var _0x9602x28=String(_0x9602x11[_0x5df0[35]][_0x5df0[107]]);return sequelize[_0x5df0[105]](function(_0x9602x22){return Setting[_0x5df0[27]](1)[_0x5df0[22]](function(_0x9602x29){_0x9602x26= _0x9602x29;var _0x9602x2a=_0x9602x26[_0x5df0[109]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0x9602x2a[_0x5df0[110]](_0x9602x28)){throw new Error(_0x5df0[111])};var _0x9602x2b=0;if(_0x9602x11[_0x5df0[35]][_0x5df0[113]](_0x5df0[112])&& _[_0x5df0[114]](_0x9602x11[_0x5df0[35]][_0x5df0[112]])&& _0x9602x11[_0x5df0[35]][_0x5df0[112]]>= 0){_0x9602x2b= _0x9602x11[_0x5df0[35]][_0x5df0[112]];delete _0x9602x11[_0x5df0[35]][_0x5df0[112]]};var _0x9602x2c=_0x9602x11[_0x5df0[35]][_0x5df0[115]];delete _0x9602x11[_0x5df0[35]][_0x5df0[115]];if(_0x9602x11[_0x5df0[35]][_0x5df0[116]]){_0x9602x11[_0x5df0[35]][_0x5df0[32]]= _0x5df0[30];for(var _0x9602x2d=_0x9602x2b;_0x9602x2d< _0x9602x11[_0x5df0[35]][_0x5df0[116]]+ _0x9602x2b;_0x9602x2d++,_0x9602x2c++){var _0x9602x2e=_[_0x5df0[117]](_0x9602x11[_0x5df0[35]]);_0x9602x2e[_0x5df0[118]]= _0x9602x2c;_0x9602x2e[_0x5df0[37]]= _0x9602x2e[_0x5df0[37]]+ _0x9602x2d;_0x9602x2e[_0x5df0[119]]= _0x9602x2e[_0x5df0[119]]+ _0x9602x2d;_0x9602x2e[_0x5df0[120]]= _0x9602x2e[_0x5df0[120]][_0x5df0[122]](_0x5df0[121])[0]+ _0x9602x2d+ _0x5df0[121]+ _0x9602x2e[_0x5df0[120]][_0x5df0[122]](_0x5df0[121])[1];_0x9602x27[_0x5df0[123]](_0x9602x2e)}}else {throw new Error(_0x5df0[124])};return Agent[_0x5df0[106]](_0x9602x27,{transaction:_0x9602x22,individualHooks:true})})[_0x5df0[22]](function(_0x9602x18){_0x9602x25= _0x9602x18;return Team[_0x5df0[104]]({where:{defaultEntry:true}})})[_0x5df0[22]](function(_0x9602x24){return _0x9602x24[_0x5df0[108]](_[_0x5df0[70]](_0x9602x25,_0x5df0[25]),{transaction:_0x9602x22})})})[_0x5df0[22]](function(){return _0x9602x12[_0x5df0[34]](201)})[_0x5df0[19]](sequelize.UniqueConstraintError,function(_0x9602x14){console[_0x5df0[62]](_0x9602x14);return Util[_0x5df0[101]][_0x5df0[100]](_0x9602x12,_0x9602x14)})[_0x5df0[19]](function(_0x9602x14){console[_0x5df0[62]](_0x9602x14);return handleError(_0x9602x12,_0x9602x14)})};exports[_0x5df0[125]]= function(_0x9602x11,_0x9602x12){if(_0x9602x11[_0x5df0[35]][_0x5df0[25]]){delete _0x9602x11[_0x5df0[35]][_0x5df0[25]]};delete _0x9602x11[_0x5df0[35]][_0x5df0[32]];delete _0x9602x11[_0x5df0[35]][_0x5df0[37]];delete _0x9602x11[_0x5df0[35]][_0x5df0[107]];return sequelize[_0x5df0[105]](function(_0x9602x22){return Agent[_0x5df0[27]](_0x9602x11[_0x5df0[52]][_0x5df0[25]])[_0x5df0[22]](function(_0x9602x17){if(!_0x9602x17){return _0x9602x12[_0x5df0[34]](404)};var _0x9602x2f=_[_0x5df0[73]](_0x9602x17,_0x9602x11[_0x5df0[35]]);return _0x9602x2f[_0x5df0[126]]({transaction:_0x9602x22})})[_0x5df0[22]](function(_0x9602x17){return _0x9602x12[_0x5df0[21]](200)[_0x5df0[20]](_0x9602x17)})})[_0x5df0[19]](sequelize.UniqueConstraintError,function(_0x9602x14){console[_0x5df0[62]](_0x9602x14);return Util[_0x5df0[101]][_0x5df0[100]](_0x9602x12,_0x9602x14)})[_0x5df0[19]](function(_0x9602x14){console[_0x5df0[62]](_0x9602x14);return handleError(_0x9602x12,_0x9602x14)})};exports[_0x5df0[127]]= function(_0x9602x11,_0x9602x12){var _0x9602x21;return Agent[_0x5df0[27]](_0x9602x11[_0x5df0[52]][_0x5df0[25]])[_0x5df0[22]](function(_0x9602x17){_0x9602x21= _0x9602x17;if(!_0x9602x17){return _0x9602x12[_0x5df0[34]](404)};return _0x9602x17[_0x5df0[127]]()})[_0x5df0[22]](function(){return _0x9602x12[_0x5df0[34]](204)})[_0x5df0[19]](sequelize.ForeignKeyConstraintError,function(_0x9602x14){return Util[_0x5df0[101]][_0x5df0[128]](_0x9602x12,_0x5df0[30],_0x9602x21[_0x5df0[37]],_0x9602x14)})[_0x5df0[19]](function(_0x9602x14){return handleError(_0x9602x12,_0x9602x14)})};exports[_0x5df0[129]]= function(_0x9602x11,_0x9602x12){return Agent[_0x5df0[127]]({where:{id:_0x9602x11[_0x5df0[23]][_0x5df0[54]]},individualHooks:true})[_0x5df0[22]](function(){return _0x9602x12[_0x5df0[34]](204)})[_0x5df0[19]](function(_0x9602x14){return handleError(_0x9602x12,_0x9602x14)})};exports[_0x5df0[130]]= function(_0x9602x11,_0x9602x12,_0x9602x13){var _0x9602x26;var _0x9602x30=_0x9602x11[_0x5df0[26]][_0x5df0[25]];var _0x9602x31=String(_0x9602x11[_0x5df0[35]][_0x5df0[131]]);var _0x9602x32=String(_0x9602x11[_0x5df0[35]][_0x5df0[132]]);return Setting[_0x5df0[27]](1)[_0x5df0[22]](function(_0x9602x29){_0x9602x26= _0x9602x29;return Agent[_0x5df0[27]](_0x9602x30)})[_0x5df0[22]](function(_0x9602x33){var _0x9602x2a=_0x9602x26[_0x5df0[109]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0x9602x2a[_0x5df0[110]](_0x9602x32)){throw new Error(_0x5df0[111])};if(_0x9602x33[_0x5df0[133]](_0x9602x31)){_0x9602x33[_0x5df0[107]]= _0x9602x32;return _0x9602x33[_0x5df0[126]]()}else {return _0x9602x12[_0x5df0[34]](403)}})[_0x5df0[22]](function(){return _0x9602x12[_0x5df0[34]](200)})[_0x5df0[19]](function(_0x9602x14){return handleError(_0x9602x12,_0x9602x14)})};exports[_0x5df0[134]]= function(_0x9602x11,_0x9602x12,_0x9602x13){var _0x9602x26;var _0x9602x30=_0x9602x11[_0x5df0[52]][_0x5df0[25]];var _0x9602x32=String(_0x9602x11[_0x5df0[35]][_0x5df0[132]]);return Setting[_0x5df0[27]](1)[_0x5df0[22]](function(_0x9602x29){_0x9602x26= _0x9602x29;return Agent[_0x5df0[27]](_0x9602x30)})[_0x5df0[22]](function(_0x9602x33){var _0x9602x2a=_0x9602x26[_0x5df0[109]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0x9602x2a[_0x5df0[110]](_0x9602x32)){throw new Error(_0x5df0[111])};_0x9602x33[_0x5df0[107]]= _0x9602x32;return _0x9602x33[_0x5df0[126]]()})[_0x5df0[22]](function(){return _0x9602x12[_0x5df0[34]](200)})[_0x5df0[19]](function(_0x9602x14){return handleError(_0x9602x12,_0x9602x14)})};function handleError(_0x9602x12,_0x9602x14){return _0x9602x12[_0x5df0[21]](500)[_0x5df0[20]](_0x9602x14)} \ No newline at end of file +'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); +} diff --git a/server/api/agent/agent.events.js b/server/api/agent/agent.events.js index 59f8c4c..24661dc 100644 --- a/server/api/agent/agent.events.js +++ b/server/api/agent/agent.events.js @@ -1 +1,36 @@ -var _0x89dd=["\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"];_0x89dd[0];const EventEmitter=require(_0x89dd[1]);const Agent=require(_0x89dd[3])[_0x89dd[2]];var AgentEvents= new EventEmitter();AgentEvents[_0x89dd[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x89dd[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x89dd[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x89dd[6]};for(var e in events){var event=events[e];Agent[_0x89dd[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xe286x8,_0xe286x9,_0xe286xa){AgentEvents[_0x89dd[10]](event+ _0x89dd[8]+ _0xe286x8[_0x89dd[9]],_0xe286x8);AgentEvents[_0x89dd[10]](event,_0xe286x8);_0xe286xa(null)}}module[_0x89dd[11]]= AgentEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/agent/agent.socket.js b/server/api/agent/agent.socket.js index 048a07f..7f5cb13 100644 --- a/server/api/agent/agent.socket.js +++ b/server/api/agent/agent.socket.js @@ -1 +1,51 @@ -var _0xde18=["\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"];_0xde18[0];const AgentEvents=require(_0xde18[1]);const _=require(_0xde18[2]);var events=[_0xde18[3],_0xde18[4]];exports[_0xde18[5]]= function(_0x30f1x4){for(var _0x30f1x5=0,_0x30f1x6=events[_0xde18[6]];_0x30f1x5< _0x30f1x6;_0x30f1x5++){var _0x30f1x7=events[_0x30f1x5];var _0x30f1x8=createListener(_0xde18[7]+ _0x30f1x7,_0x30f1x4);AgentEvents[_0xde18[8]](_0x30f1x7,_0x30f1x8);_0x30f1x4[_0xde18[8]](_0xde18[9],removeListener(_0x30f1x7,_0x30f1x8))}};function createListener(_0x30f1x7,_0x30f1x4){return function(_0x30f1xa){switch(_0x30f1x7){case _0xde18[23]:if(_0x30f1xa[_0xde18[10]]=== _0xde18[11]&& (_0x30f1x4[_0xde18[10]]!== _0xde18[11]|| _0x30f1x4[_0xde18[12]]== _0x30f1xa[_0xde18[13]]|| _0x30f1xa[_0xde18[15]](_0xde18[14]))){var _0x30f1xb=_[_0xde18[17]](_0x30f1xa[_0xde18[16]]);if(_0x30f1xa[_0xde18[20]][_0xde18[19]](_0xde18[18])){_0x30f1xb[_0xde18[21]]= undefined}else {if(_0x30f1xa[_0xde18[20]][_0xde18[19]](_0xde18[21])){_0x30f1xb[_0xde18[18]]= undefined}};_0x30f1x4[_0xde18[22]](_0x30f1x7,_0x30f1xb)};break;case _0xde18[24]:_0x30f1x4[_0xde18[22]](_0x30f1x7,_0x30f1xa);break;default:}}}function removeListener(_0x30f1x7,_0x30f1x8){return function(){AgentEvents[_0xde18[25]](_0x30f1x7,_0x30f1x8)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/agent/index.js b/server/api/agent/index.js index 02bd726..49fcc15 100644 --- a/server/api/agent/index.js +++ b/server/api/agent/index.js @@ -1 +1,312 @@ -var _0x1a97=["\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"];_0x1a97[0];var express=require(_0x1a97[1]);var controller=require(_0x1a97[2]);var auth=require(_0x1a97[3]);var license=require(_0x1a97[4]);var router=express.Router();router[_0x1a97[11]](_0x1a97[5],auth[_0x1a97[6]](),auth[_0x1a97[9]]([4],[_0x1a97[7],_0x1a97[8]]),controller[_0x1a97[10]]);router[_0x1a97[11]](_0x1a97[12],auth[_0x1a97[6]](),auth[_0x1a97[9]]([12],[_0x1a97[7]]),controller[_0x1a97[13]]);router[_0x1a97[11]](_0x1a97[14],auth[_0x1a97[6]](),auth[_0x1a97[9]]([7],[_0x1a97[7]]),controller[_0x1a97[15]]);router[_0x1a97[11]](_0x1a97[16],auth[_0x1a97[6]](),auth[_0x1a97[9]]([9],[_0x1a97[7]]),controller[_0x1a97[17]]);router[_0x1a97[11]](_0x1a97[18],auth[_0x1a97[6]](),auth[_0x1a97[9]]([8],[_0x1a97[7]]),controller[_0x1a97[19]]);router[_0x1a97[11]](_0x1a97[20],auth[_0x1a97[6]](),auth[_0x1a97[9]]([10],[_0x1a97[7]]),controller[_0x1a97[21]]);router[_0x1a97[11]](_0x1a97[22],auth[_0x1a97[6]](),auth[_0x1a97[9]]([11],[_0x1a97[7]]),controller[_0x1a97[23]]);router[_0x1a97[11]](_0x1a97[24],auth[_0x1a97[6]](),auth[_0x1a97[9]]([20],[_0x1a97[7]]),controller[_0x1a97[25]]);router[_0x1a97[11]](_0x1a97[26],auth[_0x1a97[6]](),auth[_0x1a97[9]]([4],[_0x1a97[7],_0x1a97[27],_0x1a97[8]]),controller[_0x1a97[28]]);router[_0x1a97[30]](_0x1a97[5],auth[_0x1a97[6]](),auth[_0x1a97[9]]([4],[_0x1a97[7]]),controller[_0x1a97[29]]);router[_0x1a97[30]](_0x1a97[31],auth[_0x1a97[6]](),auth[_0x1a97[9]]([4],[_0x1a97[7]]),controller[_0x1a97[32]]);router[_0x1a97[34]](_0x1a97[26],auth[_0x1a97[6]](),auth[_0x1a97[9]]([4],[_0x1a97[7]]),controller[_0x1a97[33]]);router[_0x1a97[36]](_0x1a97[5],auth[_0x1a97[6]](),auth[_0x1a97[9]]([4],[_0x1a97[7]]),controller[_0x1a97[35]]);router[_0x1a97[36]](_0x1a97[26],auth[_0x1a97[6]](),auth[_0x1a97[9]]([4],[_0x1a97[7]]),controller[_0x1a97[37]]);router[_0x1a97[11]](_0x1a97[38],auth[_0x1a97[6]](),auth[_0x1a97[9]]([4],[_0x1a97[7],_0x1a97[8]]),controller[_0x1a97[39]]);router[_0x1a97[11]](_0x1a97[40],auth[_0x1a97[6]](),auth[_0x1a97[9]]([4],[_0x1a97[7],_0x1a97[8]]),controller[_0x1a97[41]]);router[_0x1a97[11]](_0x1a97[42],auth[_0x1a97[6]](),auth[_0x1a97[9]]([4],[_0x1a97[7],_0x1a97[8]]),controller[_0x1a97[43]]);router[_0x1a97[11]](_0x1a97[44],auth[_0x1a97[6]](),auth[_0x1a97[9]]([4],[_0x1a97[7],_0x1a97[8]]),controller[_0x1a97[45]]);router[_0x1a97[11]](_0x1a97[46],auth[_0x1a97[6]](),auth[_0x1a97[9]]([4],[_0x1a97[7],_0x1a97[8]]),controller[_0x1a97[47]]);router[_0x1a97[11]](_0x1a97[48],auth[_0x1a97[6]](),auth[_0x1a97[9]]([4],[_0x1a97[7],_0x1a97[8]]),controller[_0x1a97[49]]);router[_0x1a97[30]](_0x1a97[50],auth[_0x1a97[6]](),auth[_0x1a97[9]]([4],[_0x1a97[7],_0x1a97[8]]),controller[_0x1a97[51]]);router[_0x1a97[36]](_0x1a97[50],auth[_0x1a97[6]](),auth[_0x1a97[9]]([4],[_0x1a97[7],_0x1a97[8]]),controller[_0x1a97[52]]);module[_0x1a97[53]]= router \ No newline at end of file +'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; diff --git a/server/api/ami/ami.ami.js b/server/api/ami/ami.ami.js index 45a564d..1282301 100644 --- a/server/api/ami/ami.ami.js +++ b/server/api/ami/ami.ami.js @@ -1 +1,36 @@ -var _0x4f0a=["\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"];_0x4f0a[0];var Ami=require(_0x4f0a[2])[_0x4f0a[1]];var _=require(_0x4f0a[3]);var ami=null;exports[_0x4f0a[4]]= function(ami){this[_0x4f0a[5]]= ami};exports[_0x4f0a[6]]= function(_0x3816x4,_0x3816x5){if(this[_0x4f0a[5]]&& this[_0x4f0a[5]][_0x4f0a[7]]()){this[_0x4f0a[5]][_0x4f0a[6]](_0x3816x4,function(_0x3816x6,_0x3816x7){if(_0x3816x6){_0x3816x5(_0x3816x6)};var _0x3816x8=_[_0x4f0a[8]](_0x3816x7,_0x3816x4);Ami[_0x4f0a[11]](_0x3816x8)[_0x4f0a[10]](function(ami){_0x3816x5(null,ami)})[_0x4f0a[9]](function(_0x3816x6){return _0x3816x5(_0x3816x6)})})}else {_0x3816x5( new Error(_0x4f0a[12]))}} \ No newline at end of file +/** + * 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..')); + } +} diff --git a/server/api/ami/ami.controller.js b/server/api/ami/ami.controller.js index c1e7faf..9b00f54 100644 --- a/server/api/ami/ami.controller.js +++ b/server/api/ami/ami.controller.js @@ -1 +1,37 @@ -var _0x9862=["\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"];_0x9862[0];var _=require(_0x9862[1]);var Ami=require(_0x9862[3])[_0x9862[2]];var Util=require(_0x9862[4]);exports[_0x9862[5]]= function(_0xa25cx4,_0xa25cx5,_0xa25cx6){return Ami[_0x9862[12]](Util[_0x9862[11]](_0xa25cx4[_0x9862[10]]))[_0x9862[9]](function(_0xa25cx8){return _0xa25cx5[_0x9862[8]](200)[_0x9862[7]](_0xa25cx8)})[_0x9862[6]](function(_0xa25cx7){return handleError(_0xa25cx5,_0xa25cx7)})};exports[_0x9862[13]]= function(_0xa25cx4,_0xa25cx5){_0xa25cx4[_0x9862[15]][_0x9862[14]]= JSON[_0x9862[16]](_0xa25cx4[_0x9862[15]]);_0xa25cx4[_0x9862[15]][_0x9862[17]]= _0xa25cx4[_0x9862[19]][_0x9862[18]];require(_0x9862[21])[_0x9862[20]](_0xa25cx4[_0x9862[15]],function(_0xa25cx7,_0xa25cx8){if(_0xa25cx7){handleError(_0xa25cx5,_0xa25cx7)}else {return _0xa25cx5[_0x9862[8]](201)[_0x9862[7]](_0xa25cx8)}})};function handleError(_0xa25cx5,_0xa25cx7){return _0xa25cx5[_0x9862[8]](500)[_0x9862[7]](_0xa25cx7)} \ No newline at end of file +'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); +} diff --git a/server/api/ami/ami.events.js b/server/api/ami/ami.events.js index c4f2267..69ed024 100644 --- a/server/api/ami/ami.events.js +++ b/server/api/ami/ami.events.js @@ -1 +1,36 @@ -var _0x2fc8=["\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"];_0x2fc8[0];const EventEmitter=require(_0x2fc8[1]);const Ami=require(_0x2fc8[3])[_0x2fc8[2]];var AmiEvents= new EventEmitter();AmiEvents[_0x2fc8[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x2fc8[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x2fc8[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x2fc8[6]};for(var e in events){var event=events[e];Ami[_0x2fc8[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xb770x8,_0xb770x9,_0xb770xa){AmiEvents[_0x2fc8[10]](event+ _0x2fc8[8]+ _0xb770x8[_0x2fc8[9]],_0xb770x8);AmiEvents[_0x2fc8[10]](event,_0xb770x8);_0xb770xa(null)}}module[_0x2fc8[11]]= AmiEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/ami/ami.socket.js b/server/api/ami/ami.socket.js index 9af8ca1..b1ba530 100644 --- a/server/api/ami/ami.socket.js +++ b/server/api/ami/ami.socket.js @@ -1 +1,32 @@ -var _0x8d60=["\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"];_0x8d60[0];const AmiEvents=require(_0x8d60[1]);var events=[_0x8d60[2],_0x8d60[3]];exports[_0x8d60[4]]= function(_0x8164x3){for(var _0x8164x4=0,_0x8164x5=events[_0x8d60[5]];_0x8164x4< _0x8164x5;_0x8164x4++){var _0x8164x6=events[_0x8164x4];var _0x8164x7=createListener(_0x8d60[6]+ _0x8164x6,_0x8164x3);AmiEvents[_0x8d60[7]](_0x8164x6,_0x8164x7);_0x8164x3[_0x8d60[7]](_0x8d60[8],removeListener(_0x8164x6,_0x8164x7))}};function createListener(_0x8164x6,_0x8164x3){return function(_0x8164x9){_0x8164x3[_0x8d60[9]](_0x8164x6,_0x8164x9)}}function removeListener(_0x8164x6,_0x8164x7){return function(){AmiEvents[_0x8d60[10]](_0x8164x6,_0x8164x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/ami/index.js b/server/api/ami/index.js index f931756..ae0b77c 100644 --- a/server/api/ami/index.js +++ b/server/api/ami/index.js @@ -1 +1,12 @@ -var _0xdd89=["\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"];_0xdd89[0];var express=require(_0xdd89[1]);var controller=require(_0xdd89[2]);var auth=require(_0xdd89[3]);var router=express.Router();router[_0xdd89[7]](_0xdd89[4],auth[_0xdd89[5]](),controller[_0xdd89[6]]);router[_0xdd89[9]](_0xdd89[4],auth[_0xdd89[5]](),controller[_0xdd89[8]]);module[_0xdd89[10]]= router \ No newline at end of file +'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; diff --git a/server/api/automation/automation.controller.js b/server/api/automation/automation.controller.js index cf7b1b8..169fca5 100644 --- a/server/api/automation/automation.controller.js +++ b/server/api/automation/automation.controller.js @@ -1 +1,205 @@ -var _0x610a=["\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"];_0x610a[0];var _=require(_0x610a[1]);var util=require(_0x610a[2]);var Util=require(_0x610a[3]);var sequelize=require(_0x610a[5])[_0x610a[4]];var Automation=require(_0x610a[5])[_0x610a[6]];var ToolsCondition=require(_0x610a[5])[_0x610a[7]];var ToolsAction=require(_0x610a[5])[_0x610a[8]];exports[_0x610a[9]]= function(_0x34acx8,_0x34acx9,_0x34acxa){return Automation[_0x610a[19]](_0x610a[18])[_0x610a[17]](_[_0x610a[16]](Util[_0x610a[15]](_0x34acx8[_0x610a[14]]),{distinct:true}))[_0x610a[13]](function(_0x34acxc){_0x34acx9[_0x610a[12]](200)[_0x610a[11]](_0x34acxc)})[_0x610a[10]](function(_0x34acxb){return handleError(_0x34acx9,_0x34acxb)})};exports[_0x610a[20]]= function(_0x34acx8,_0x34acx9){return Automation[_0x610a[19]](_0x610a[18])[_0x610a[24]](_0x34acx8[_0x610a[23]][_0x610a[22]])[_0x610a[13]](function(Automation){if(!Automation){return _0x34acx9[_0x610a[21]](404)};return _0x34acx9[_0x610a[11]](Automation)})[_0x610a[10]](function(_0x34acxb){return handleError(_0x34acx9,_0x34acxb)})};exports[_0x610a[25]]= function(_0x34acx8,_0x34acx9,_0x34acxa){return Automation[_0x610a[25]](_0x34acx8[_0x610a[26]],{include:[{model:ToolsCondition,as:_0x610a[27]},{model:ToolsCondition,as:_0x610a[28]},{model:ToolsAction,as:_0x610a[29]}]})[_0x610a[13]](function(){return _0x34acx9[_0x610a[21]](201)})[_0x610a[10]](function(_0x34acxb){return handleError(_0x34acx9,_0x34acxb)})};exports[_0x610a[30]]= function(_0x34acx8,_0x34acx9,_0x34acxa){var _0x34acxd;if(_0x34acx8[_0x610a[26]][_0x610a[22]]){delete _0x34acx8[_0x610a[26]][_0x610a[22]]};return sequelize[_0x610a[41]](function(_0x34acxe){return Automation[_0x610a[24]](_0x34acx8[_0x610a[23]][_0x610a[22]])[_0x610a[13]](function(_0x34acx11){if(!_0x34acx11){return _0x34acx9[_0x610a[21]](404)};_0x34acxd= _0x34acx11;if(_0x34acx8[_0x610a[26]][_0x610a[28]]){return ToolsCondition[_0x610a[38]]({where:{AutomationAnyId:_0x34acx8[_0x610a[23]][_0x610a[22]]},transaction:_0x34acxe})}})[_0x610a[13]](function(){if(_0x34acx8[_0x610a[26]][_0x610a[28]]&& Array[_0x610a[33]](_0x34acx8[_0x610a[26]].Any)&& _0x34acx8[_0x610a[26]][_0x610a[28]][_0x610a[34]]){_[_0x610a[36]](_0x34acx8[_0x610a[26]].Any,function(_0x34acx10){_0x34acx10[_0x610a[40]]= _0x34acx8[_0x610a[23]][_0x610a[22]]});return ToolsCondition[_0x610a[37]](_0x34acx8[_0x610a[26]].Any,{transaction:_0x34acxe})};return})[_0x610a[13]](function(){if(_0x34acx8[_0x610a[26]][_0x610a[27]]){return ToolsCondition[_0x610a[38]]({where:{AutomationAllId:_0x34acx8[_0x610a[23]][_0x610a[22]]},transaction:_0x34acxe})}})[_0x610a[13]](function(){if(_0x34acx8[_0x610a[26]][_0x610a[27]]&& Array[_0x610a[33]](_0x34acx8[_0x610a[26]].All)&& _0x34acx8[_0x610a[26]][_0x610a[27]][_0x610a[34]]){_[_0x610a[36]](_0x34acx8[_0x610a[26]].All,function(_0x34acx10){_0x34acx10[_0x610a[39]]= _0x34acx8[_0x610a[23]][_0x610a[22]]});return ToolsCondition[_0x610a[37]](_0x34acx8[_0x610a[26]].All,{transaction:_0x34acxe})};return})[_0x610a[13]](function(){if(_0x34acx8[_0x610a[26]][_0x610a[29]]){return ToolsAction[_0x610a[38]]({where:{AutomationId:_0x34acx8[_0x610a[23]][_0x610a[22]]},transaction:_0x34acxe})}})[_0x610a[13]](function(){if(_0x34acx8[_0x610a[26]][_0x610a[29]]&& Array[_0x610a[33]](_0x34acx8[_0x610a[26]].Actions)&& _0x34acx8[_0x610a[26]][_0x610a[29]][_0x610a[34]]){_[_0x610a[36]](_0x34acx8[_0x610a[26]].Actions,function(_0x34acx10){_0x34acx10[_0x610a[35]]= _0x34acx8[_0x610a[23]][_0x610a[22]]});return ToolsAction[_0x610a[37]](_0x34acx8[_0x610a[26]].Actions,{transaction:_0x34acxe})};return})[_0x610a[13]](function(){var _0x34acxf=_[_0x610a[16]](_0x34acxd,_0x34acx8[_0x610a[26]]);return _0x34acxf[_0x610a[32]]({transaction:_0x34acxe})})})[_0x610a[13]](function(){return _0x34acx9[_0x610a[21]](200)})[_0x610a[10]](function(_0x34acxb){console[_0x610a[31]](_0x34acxb);return handleError(_0x34acx9,_0x34acxb)})};exports[_0x610a[38]]= function(_0x34acx8,_0x34acx9){return Automation[_0x610a[24]](_0x34acx8[_0x610a[23]][_0x610a[22]])[_0x610a[13]](function(Automation){if(!Automation){return _0x34acx9[_0x610a[21]](404)};Automation[_0x610a[38]]()[_0x610a[13]](function(){return _0x34acx9[_0x610a[21]](204)})[_0x610a[10]](function(_0x34acxb){return handleError(_0x34acx9,_0x34acxb)})})[_0x610a[10]](function(_0x34acxb){return handleError(_0x34acx9,_0x34acxb)})};exports[_0x610a[42]]= function(_0x34acx8,_0x34acx9){return Automation[_0x610a[38]]({where:{id:_0x34acx8[_0x610a[14]][_0x610a[43]]},individualHooks:true})[_0x610a[13]](function(){return _0x34acx9[_0x610a[21]](204)})[_0x610a[10]](function(_0x34acxb){return handleError(_0x34acx9,_0x34acxb)})};function handleError(_0x34acx9,_0x34acxb){return _0x34acx9[_0x610a[12]](500)[_0x610a[11]](_0x34acxb)} \ No newline at end of file +'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); +} diff --git a/server/api/automation/automation.events.js b/server/api/automation/automation.events.js index 7ae98ea..c0aaffc 100644 --- a/server/api/automation/automation.events.js +++ b/server/api/automation/automation.events.js @@ -1 +1,36 @@ -var _0x9fa3=["\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"];_0x9fa3[0];const EventEmitter=require(_0x9fa3[1]);const Automation=require(_0x9fa3[3])[_0x9fa3[2]];var AutomationEvents= new EventEmitter();AutomationEvents[_0x9fa3[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x9fa3[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x9fa3[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x9fa3[6]};for(var e in events){var event=events[e];Automation[_0x9fa3[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xc95cx8,_0xc95cx9,_0xc95cxa){AutomationEvents[_0x9fa3[10]](event+ _0x9fa3[8]+ _0xc95cx8[_0x9fa3[9]],_0xc95cx8);AutomationEvents[_0x9fa3[10]](event,_0xc95cx8);_0xc95cxa(null)}}module[_0x9fa3[11]]= AutomationEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/automation/automation.socket.js b/server/api/automation/automation.socket.js index e8712de..c767335 100644 --- a/server/api/automation/automation.socket.js +++ b/server/api/automation/automation.socket.js @@ -1 +1,28 @@ -var _0x1ac7=["\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"];_0x1ac7[0];const AutomationEvents=require(_0x1ac7[1]);var events=[_0x1ac7[2],_0x1ac7[3]];exports[_0x1ac7[4]]= function(_0x339cx3){for(var _0x339cx4=0,_0x339cx5=events[_0x1ac7[5]];_0x339cx4< _0x339cx5;_0x339cx4++){var _0x339cx6=events[_0x339cx4];var _0x339cx7=createListener(_0x1ac7[6]+ _0x339cx6,_0x339cx3);AutomationEvents[_0x1ac7[7]](_0x339cx6,_0x339cx7);_0x339cx3[_0x1ac7[7]](_0x1ac7[8],removeListener(_0x339cx6,_0x339cx7))}};function createListener(_0x339cx6,_0x339cx3){return function(_0x339cx9){_0x339cx3[_0x1ac7[9]](_0x339cx6,_0x339cx9)}}function removeListener(_0x339cx6,_0x339cx7){return function(){AutomationEvents[_0x1ac7[10]](_0x339cx6,_0x339cx7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/automation/index.js b/server/api/automation/index.js index 9a92452..654a7c9 100644 --- a/server/api/automation/index.js +++ b/server/api/automation/index.js @@ -1 +1,16 @@ -var _0xe45e=["\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"];_0xe45e[0];var express=require(_0xe45e[1]);var controller=require(_0xe45e[2]);var auth=require(_0xe45e[3]);var router=express.Router();router[_0xe45e[9]](_0xe45e[4],auth[_0xe45e[5]](),auth[_0xe45e[7]]([13],[_0xe45e[6]]),controller[_0xe45e[8]]);router[_0xe45e[9]](_0xe45e[10],auth[_0xe45e[5]](),auth[_0xe45e[7]]([13],[_0xe45e[6]]),controller[_0xe45e[11]]);router[_0xe45e[13]](_0xe45e[4],auth[_0xe45e[5]](),auth[_0xe45e[7]]([13],[_0xe45e[6]]),controller[_0xe45e[12]]);router[_0xe45e[15]](_0xe45e[10],auth[_0xe45e[5]](),auth[_0xe45e[7]]([13],[_0xe45e[6]]),controller[_0xe45e[14]]);router[_0xe45e[17]](_0xe45e[10],auth[_0xe45e[5]](),auth[_0xe45e[7]]([13],[_0xe45e[6]]),controller[_0xe45e[16]]);router[_0xe45e[17]](_0xe45e[4],auth[_0xe45e[5]](),auth[_0xe45e[7]]([13],[_0xe45e[6]]),controller[_0xe45e[18]]);module[_0xe45e[19]]= router \ No newline at end of file +'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; diff --git a/server/api/canned_answer/canned_answer.controller.js b/server/api/canned_answer/canned_answer.controller.js index 92c9aa6..dfda955 100644 --- a/server/api/canned_answer/canned_answer.controller.js +++ b/server/api/canned_answer/canned_answer.controller.js @@ -1 +1,131 @@ -var _0x1be1=["\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"];_0x1be1[0];var _=require(_0x1be1[1]);var Util=require(_0x1be1[2]);var CannedAnswer=require(_0x1be1[4])[_0x1be1[3]];function handleError(_0xced5x5,_0xced5x6){_0xced5x6= _0xced5x6|| 500;return function(_0xced5x7){_0xced5x5[_0x1be1[6]](_0xced5x6)[_0x1be1[5]](_0xced5x7)}}function responseWithResult(_0xced5x5,_0xced5x6){_0xced5x6= _0xced5x6|| 200;return function(_0xced5x9){if(_0xced5x9){_0xced5x5[_0x1be1[6]](_0xced5x6)[_0x1be1[7]](_0xced5x9)}}}function handleEntityNotFound(_0xced5x5){return function(_0xced5x9){if(!_0xced5x9){_0xced5x5[_0x1be1[6]](404)[_0x1be1[8]]();return null};return _0xced5x9}}function saveUpdates(_0xced5xc){return function(_0xced5x9){return _0xced5x9[_0x1be1[10]](_0xced5xc)[_0x1be1[9]](function(_0xced5xd){return _0xced5xd})}}function removeEntity(_0xced5x5){return function(_0xced5x9){if(_0xced5x9){return _0xced5x9[_0x1be1[11]]()[_0x1be1[9]](function(){_0xced5x5[_0x1be1[6]](204)[_0x1be1[8]]()})}}}exports[_0x1be1[12]]= function(_0xced5xf,_0xced5x5,_0xced5x10){return CannedAnswer[_0x1be1[17]](Util[_0x1be1[16]](_0xced5xf[_0x1be1[15]]))[_0x1be1[9]](function(_0xced5x11){_0xced5x5[_0x1be1[6]](200)[_0x1be1[5]](_0xced5x11)})[_0x1be1[14]](function(_0xced5x7){console[_0x1be1[13]](_0xced5x7);return handleError(_0xced5x5,_0xced5x7)})};exports[_0x1be1[18]]= function(_0xced5xf,_0xced5x5){return CannedAnswer[_0x1be1[21]](_0xced5xf[_0x1be1[20]][_0x1be1[19]])[_0x1be1[9]](handleEntityNotFound(_0xced5x5))[_0x1be1[9]](responseWithResult(_0xced5x5))[_0x1be1[14]](handleError(_0xced5x5))};exports[_0x1be1[22]]= function(_0xced5xf,_0xced5x5){CannedAnswer[_0x1be1[22]](_0xced5xf[_0x1be1[23]])[_0x1be1[9]](responseWithResult(_0xced5x5,201))[_0x1be1[14]](handleError(_0xced5x5))};exports[_0x1be1[24]]= function(_0xced5xf,_0xced5x5){if(_0xced5xf[_0x1be1[23]][_0x1be1[19]]){delete _0xced5xf[_0x1be1[23]][_0x1be1[19]]};return CannedAnswer[_0x1be1[21]](_0xced5xf[_0x1be1[20]][_0x1be1[19]])[_0x1be1[9]](handleEntityNotFound(_0xced5x5))[_0x1be1[9]](saveUpdates(_0xced5xf[_0x1be1[23]]))[_0x1be1[9]](responseWithResult(_0xced5x5))[_0x1be1[14]](handleError(_0xced5x5))};exports[_0x1be1[11]]= function(_0xced5xf,_0xced5x5){return CannedAnswer[_0x1be1[21]](_0xced5xf[_0x1be1[20]][_0x1be1[19]])[_0x1be1[9]](handleEntityNotFound(_0xced5x5))[_0x1be1[9]](removeEntity(_0xced5x5))[_0x1be1[14]](handleError(_0xced5x5))};exports[_0x1be1[25]]= function(_0xced5xf,_0xced5x5){return CannedAnswer[_0x1be1[11]]({where:{id:_0xced5xf[_0x1be1[15]][_0x1be1[27]]},individualHooks:true})[_0x1be1[9]](function(){return _0xced5x5[_0x1be1[26]](204)})[_0x1be1[14]](function(_0xced5x7){return handleError(_0xced5x5,_0xced5x7)})} \ No newline at end of file +/** + * 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); + }); +}; diff --git a/server/api/canned_answer/canned_answer.events.js b/server/api/canned_answer/canned_answer.events.js index 7a7d617..cc2c85e 100644 --- a/server/api/canned_answer/canned_answer.events.js +++ b/server/api/canned_answer/canned_answer.events.js @@ -1 +1,36 @@ -var _0xcdf3=["\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"];_0xcdf3[0];const EventEmitter=require(_0xcdf3[1]);const CannedAnswer=require(_0xcdf3[3])[_0xcdf3[2]];var CannedAnswerEvents= new EventEmitter();CannedAnswerEvents[_0xcdf3[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xcdf3[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xcdf3[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xcdf3[6]};for(var e in events){var event=events[e];CannedAnswer[_0xcdf3[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x51f6x8,_0x51f6x9,_0x51f6xa){CannedAnswerEvents[_0xcdf3[10]](event+ _0xcdf3[8]+ _0x51f6x8[_0xcdf3[9]],_0x51f6x8);CannedAnswerEvents[_0xcdf3[10]](event,_0x51f6x8);_0x51f6xa(null)}}module[_0xcdf3[11]]= CannedAnswerEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/canned_answer/canned_answer.socket.js b/server/api/canned_answer/canned_answer.socket.js index 680cfab..ce308fc 100644 --- a/server/api/canned_answer/canned_answer.socket.js +++ b/server/api/canned_answer/canned_answer.socket.js @@ -1 +1,28 @@ -var _0x4f90=["\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"];_0x4f90[0];const CannedAnswerEvents=require(_0x4f90[1]);var events=[_0x4f90[2],_0x4f90[3]];exports[_0x4f90[4]]= function(_0xc373x3){for(var _0xc373x4=0,_0xc373x5=events[_0x4f90[5]];_0xc373x4< _0xc373x5;_0xc373x4++){var _0xc373x6=events[_0xc373x4];var _0xc373x7=createListener(_0x4f90[6]+ _0xc373x6,_0xc373x3);CannedAnswerEvents[_0x4f90[7]](_0xc373x6,_0xc373x7);_0xc373x3[_0x4f90[7]](_0x4f90[8],removeListener(_0xc373x6,_0xc373x7))}};function createListener(_0xc373x6,_0xc373x3){return function(_0xc373x9){_0xc373x3[_0x4f90[9]](_0xc373x6,_0xc373x9)}}function removeListener(_0xc373x6,_0xc373x7){return function(){CannedAnswerEvents[_0x4f90[10]](_0xc373x6,_0xc373x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/canned_answer/index.js b/server/api/canned_answer/index.js index 18da14c..e01ee26 100644 --- a/server/api/canned_answer/index.js +++ b/server/api/canned_answer/index.js @@ -1 +1,16 @@ -var _0x85a4=["\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"];_0x85a4[0];var express=require(_0x85a4[1]);var auth=require(_0x85a4[2]);var controller=require(_0x85a4[3]);var router=express.Router();router[_0x85a4[10]](_0x85a4[4],auth[_0x85a4[5]](),auth[_0x85a4[8]]([13],[_0x85a4[6],_0x85a4[7]]),controller[_0x85a4[9]]);router[_0x85a4[10]](_0x85a4[11],auth[_0x85a4[5]](),auth[_0x85a4[8]]([13],[_0x85a4[6]]),controller[_0x85a4[12]]);router[_0x85a4[14]](_0x85a4[4],auth[_0x85a4[5]](),auth[_0x85a4[8]]([13],[_0x85a4[6]]),controller[_0x85a4[13]]);router[_0x85a4[16]](_0x85a4[11],auth[_0x85a4[5]](),auth[_0x85a4[8]]([13],[_0x85a4[6]]),controller[_0x85a4[15]]);router[_0x85a4[18]](_0x85a4[4],auth[_0x85a4[5]](),auth[_0x85a4[8]]([13],[_0x85a4[6]]),controller[_0x85a4[17]]);router[_0x85a4[18]](_0x85a4[11],auth[_0x85a4[5]](),auth[_0x85a4[8]]([13],[_0x85a4[6]]),controller[_0x85a4[19]]);module[_0x85a4[20]]= router \ No newline at end of file +'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; diff --git a/server/api/chanspy/chanspy.controller.js b/server/api/chanspy/chanspy.controller.js index 0956534..e3dafb3 100644 --- a/server/api/chanspy/chanspy.controller.js +++ b/server/api/chanspy/chanspy.controller.js @@ -1 +1,107 @@ -var _0x5a46=["\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"];_0x5a46[0];var _=require(_0x5a46[1]);var ChanSpy=require(_0x5a46[3])[_0x5a46[2]];var Util=require(_0x5a46[4]);exports[_0x5a46[5]]= function(_0x2b83x4,_0x2b83x5,_0x2b83x6){return ChanSpy[_0x5a46[13]](Util[_0x5a46[12]](_0x2b83x4[_0x5a46[11]]))[_0x5a46[10]](function(_0x2b83x8){_0x2b83x5[_0x5a46[9]](200)[_0x5a46[8]](_0x2b83x8)})[_0x5a46[7]](function(_0x2b83x7){console[_0x5a46[6]](_0x2b83x7);return handleError(_0x2b83x5,_0x2b83x7)})};exports[_0x5a46[14]]= function(_0x2b83x4,_0x2b83x5){return ChanSpy[_0x5a46[18]](_0x2b83x4[_0x5a46[17]][_0x5a46[16]])[_0x5a46[10]](function(_0x2b83x9){if(!_0x2b83x9){return _0x2b83x5[_0x5a46[15]](404)};return _0x2b83x5[_0x5a46[8]](_0x2b83x9)})[_0x5a46[7]](function(_0x2b83x7){return handleError(_0x2b83x5,_0x2b83x7)})};exports[_0x5a46[19]]= function(_0x2b83x4,_0x2b83x5){return ChanSpy[_0x5a46[19]](_0x2b83x4[_0x5a46[20]])[_0x5a46[10]](function(_0x2b83x9){return _0x2b83x5[_0x5a46[9]](201)[_0x5a46[8]](_0x2b83x9)})[_0x5a46[7]](function(_0x2b83x7){return handleError(_0x2b83x5,_0x2b83x7)})};exports[_0x5a46[21]]= function(_0x2b83x4,_0x2b83x5){if(_0x2b83x4[_0x5a46[20]][_0x5a46[16]]){delete _0x2b83x4[_0x5a46[20]][_0x5a46[16]]};return ChanSpy[_0x5a46[18]](_0x2b83x4[_0x5a46[17]][_0x5a46[16]])[_0x5a46[10]](function(_0x2b83x9){if(!_0x2b83x9){return _0x2b83x5[_0x5a46[15]](404)};var _0x2b83xa=_[_0x5a46[22]](_0x2b83x9,_0x2b83x4[_0x5a46[20]]);return _0x2b83xa[_0x5a46[23]]()})[_0x5a46[10]](function(_0x2b83x9){return _0x2b83x5[_0x5a46[9]](200)[_0x5a46[8]](_0x2b83x9)})[_0x5a46[7]](function(_0x2b83x7){return handleError(_0x2b83x5,_0x2b83x7)})};exports[_0x5a46[24]]= function(_0x2b83x4,_0x2b83x5){return ChanSpy[_0x5a46[18]](_0x2b83x4[_0x5a46[17]][_0x5a46[16]])[_0x5a46[10]](function(_0x2b83x9){if(!_0x2b83x9){return _0x2b83x5[_0x5a46[15]](404)};return _0x2b83x9[_0x5a46[24]]()})[_0x5a46[10]](function(){return _0x2b83x5[_0x5a46[15]](204)})[_0x5a46[7]](function(_0x2b83x7){return handleError(_0x2b83x5,_0x2b83x7)})};exports[_0x5a46[25]]= function(_0x2b83x4,_0x2b83x5){return ChanSpy[_0x5a46[24]]({where:{id:_0x2b83x4[_0x5a46[11]][_0x5a46[26]]},individualHooks:true})[_0x5a46[10]](function(){return _0x2b83x5[_0x5a46[15]](204)})[_0x5a46[7]](function(_0x2b83x7){return handleError(_0x2b83x5,_0x2b83x7)})};function handleError(_0x2b83x5,_0x2b83x7){return _0x2b83x5[_0x5a46[9]](500)[_0x5a46[8]](_0x2b83x7)} \ No newline at end of file +'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); +} diff --git a/server/api/chanspy/chanspy.events.js b/server/api/chanspy/chanspy.events.js index d119adf..6310918 100644 --- a/server/api/chanspy/chanspy.events.js +++ b/server/api/chanspy/chanspy.events.js @@ -1 +1,36 @@ -var _0xeed5=["\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"];_0xeed5[0];const EventEmitter=require(_0xeed5[1]);const ChanSpy=require(_0xeed5[3])[_0xeed5[2]];var ChanSpyEvents= new EventEmitter();ChanSpyEvents[_0xeed5[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xeed5[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xeed5[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xeed5[6]};for(var e in events){var event=events[e];ChanSpy[_0xeed5[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xa8a4x8,_0xa8a4x9,_0xa8a4xa){ChanSpyEvents[_0xeed5[10]](event+ _0xeed5[8]+ _0xa8a4x8[_0xeed5[9]],_0xa8a4x8);ChanSpyEvents[_0xeed5[10]](event,_0xa8a4x8);_0xa8a4xa(null)}}module[_0xeed5[11]]= ChanSpyEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/chanspy/chanspy.socket.js b/server/api/chanspy/chanspy.socket.js index fa388a8..c0e03c0 100644 --- a/server/api/chanspy/chanspy.socket.js +++ b/server/api/chanspy/chanspy.socket.js @@ -1 +1,28 @@ -var _0x6d3d=["\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"];_0x6d3d[0];const ChanSpyEvents=require(_0x6d3d[1]);var events=[_0x6d3d[2],_0x6d3d[3]];exports[_0x6d3d[4]]= function(_0x386fx3){for(var _0x386fx4=0,_0x386fx5=events[_0x6d3d[5]];_0x386fx4< _0x386fx5;_0x386fx4++){var _0x386fx6=events[_0x386fx4];var _0x386fx7=createListener(_0x6d3d[6]+ _0x386fx6,_0x386fx3);ChanSpyEvents[_0x6d3d[7]](_0x386fx6,_0x386fx7);_0x386fx3[_0x6d3d[7]](_0x6d3d[8],removeListener(_0x386fx6,_0x386fx7))}};function createListener(_0x386fx6,_0x386fx3){return function(_0x386fx9){_0x386fx3[_0x6d3d[9]](_0x386fx6,_0x386fx9)}}function removeListener(_0x386fx6,_0x386fx7){return function(){ChanSpyEvents[_0x6d3d[10]](_0x386fx6,_0x386fx7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/chanspy/index.js b/server/api/chanspy/index.js index dbd8210..597a004 100644 --- a/server/api/chanspy/index.js +++ b/server/api/chanspy/index.js @@ -1 +1,16 @@ -var _0xefbb=["\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"];_0xefbb[0];var express=require(_0xefbb[1]);var controller=require(_0xefbb[2]);var auth=require(_0xefbb[3]);var router=express.Router();router[_0xefbb[9]](_0xefbb[4],auth[_0xefbb[5]](),auth[_0xefbb[7]]([7],[_0xefbb[6]]),controller[_0xefbb[8]]);router[_0xefbb[9]](_0xefbb[10],auth[_0xefbb[5]](),auth[_0xefbb[7]]([7],[_0xefbb[6]]),controller[_0xefbb[11]]);router[_0xefbb[13]](_0xefbb[4],auth[_0xefbb[5]](),auth[_0xefbb[7]]([7],[_0xefbb[6]]),controller[_0xefbb[12]]);router[_0xefbb[15]](_0xefbb[10],auth[_0xefbb[5]](),auth[_0xefbb[7]]([7],[_0xefbb[6]]),controller[_0xefbb[14]]);router[_0xefbb[17]](_0xefbb[4],auth[_0xefbb[5]](),auth[_0xefbb[7]]([7],[_0xefbb[6]]),controller[_0xefbb[16]]);router[_0xefbb[17]](_0xefbb[10],auth[_0xefbb[5]](),auth[_0xefbb[7]]([7],[_0xefbb[6]]),controller[_0xefbb[18]]);module[_0xefbb[19]]= router \ No newline at end of file +'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; diff --git a/server/api/chat_application/chat_application.controller.js b/server/api/chat_application/chat_application.controller.js index 8327b51..cc166a1 100644 --- a/server/api/chat_application/chat_application.controller.js +++ b/server/api/chat_application/chat_application.controller.js @@ -1 +1,97 @@ -var _0x18a1=["\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"];_0x18a1[0];var _=require(_0x18a1[1]);var ChatApplication=require(_0x18a1[3])[_0x18a1[2]];exports[_0x18a1[4]]= function(_0x9f6cx3,_0x9f6cx4){return ChatApplication[_0x18a1[11]]({where:_0x9f6cx3[_0x18a1[9]],order:_0x18a1[10],include:[{all:true}]})[_0x18a1[8]](function(_0x9f6cx6){return _0x9f6cx4[_0x18a1[7]](200)[_0x18a1[6]](_0x9f6cx6)})[_0x18a1[5]](function(_0x9f6cx5){return handleError(_0x9f6cx4,_0x9f6cx5)})};exports[_0x18a1[12]]= function(_0x9f6cx3,_0x9f6cx4){return ChatApplication[_0x18a1[16]](_0x9f6cx3[_0x18a1[15]][_0x18a1[14]])[_0x18a1[8]](function(_0x9f6cx7){if(!_0x9f6cx7){return _0x9f6cx4[_0x18a1[13]](404)};return _0x9f6cx4[_0x18a1[6]](_0x9f6cx7)})[_0x18a1[5]](function(_0x9f6cx5){return handleError(_0x9f6cx4,_0x9f6cx5)})};exports[_0x18a1[17]]= function(_0x9f6cx3,_0x9f6cx4,_0x9f6cx8){return ChatApplication[_0x18a1[20]](_0x18a1[10],{where:{ChatWebsiteId:_0x9f6cx3[_0x18a1[18]][_0x18a1[19]]}})[_0x18a1[8]](function(_0x9f6cxa){_0x9f6cx3[_0x18a1[18]][_0x18a1[10]]= _0x9f6cxa?++_0x9f6cxa:1;return ChatApplication[_0x18a1[17]](_0x9f6cx3[_0x18a1[18]])})[_0x18a1[8]](function(_0x9f6cx9){return _0x9f6cx4[_0x18a1[7]](201)[_0x18a1[6]](_0x9f6cx9)})[_0x18a1[5]](function(_0x9f6cx5){_0x9f6cx8(_0x9f6cx5)})};exports[_0x18a1[21]]= function(_0x9f6cx3,_0x9f6cx4){if(_0x9f6cx3[_0x18a1[18]][_0x18a1[14]]){delete _0x9f6cx3[_0x18a1[18]][_0x18a1[14]]};return ChatApplication[_0x18a1[16]](_0x9f6cx3[_0x18a1[15]][_0x18a1[14]])[_0x18a1[8]](function(_0x9f6cx7){if(!_0x9f6cx7){return _0x9f6cx4[_0x18a1[13]](404)};var _0x9f6cxb=_[_0x18a1[22]](_0x9f6cx7,_0x9f6cx3[_0x18a1[18]]);return _0x9f6cxb[_0x18a1[23]]()})[_0x18a1[8]](function(_0x9f6cx7){return _0x9f6cx4[_0x18a1[7]](200)[_0x18a1[6]](_0x9f6cx7)})[_0x18a1[5]](function(_0x9f6cx5){return handleError(_0x9f6cx4,_0x9f6cx5)})};exports[_0x18a1[24]]= function(_0x9f6cx3,_0x9f6cx4){return ChatApplication[_0x18a1[16]](_0x9f6cx3[_0x18a1[15]][_0x18a1[14]])[_0x18a1[8]](function(_0x9f6cx7){if(!_0x9f6cx7){return _0x9f6cx4[_0x18a1[13]](404)};return _0x9f6cx7[_0x18a1[24]]()})[_0x18a1[8]](function(){return _0x9f6cx4[_0x18a1[13]](204)})[_0x18a1[5]](function(_0x9f6cx5){return handleError(_0x9f6cx4,_0x9f6cx5)})};function handleError(_0x9f6cx4,_0x9f6cx5){return _0x9f6cx4[_0x18a1[7]](500)[_0x18a1[6]](_0x9f6cx5)} \ No newline at end of file +'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); +} diff --git a/server/api/chat_application/chat_application.events.js b/server/api/chat_application/chat_application.events.js index a1a525c..25f766a 100644 --- a/server/api/chat_application/chat_application.events.js +++ b/server/api/chat_application/chat_application.events.js @@ -1 +1,36 @@ -var _0xc23e=["\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"];_0xc23e[0];const EventEmitter=require(_0xc23e[1]);const ChatApplication=require(_0xc23e[3])[_0xc23e[2]];var ChatApplicationEvents= new EventEmitter();ChatApplicationEvents[_0xc23e[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xc23e[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xc23e[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xc23e[6]};for(var e in events){var event=events[e];ChatApplication[_0xc23e[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x895bx8,_0x895bx9,_0x895bxa){ChatApplicationEvents[_0xc23e[10]](event+ _0xc23e[8]+ _0x895bx8[_0xc23e[9]],_0x895bx8);ChatApplicationEvents[_0xc23e[10]](event,_0x895bx8);_0x895bxa(null)}}module[_0xc23e[11]]= ChatApplicationEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/chat_application/chat_application.socket.js b/server/api/chat_application/chat_application.socket.js index 010f26a..1e82b2e 100644 --- a/server/api/chat_application/chat_application.socket.js +++ b/server/api/chat_application/chat_application.socket.js @@ -1 +1,28 @@ -var _0x6ae1=["\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"];_0x6ae1[0];const ChatApplicationEvents=require(_0x6ae1[1]);var events=[_0x6ae1[2],_0x6ae1[3]];exports[_0x6ae1[4]]= function(_0xf722x3){for(var _0xf722x4=0,_0xf722x5=events[_0x6ae1[5]];_0xf722x4< _0xf722x5;_0xf722x4++){var _0xf722x6=events[_0xf722x4];var _0xf722x7=createListener(_0x6ae1[6]+ _0xf722x6,_0xf722x3);ChatApplicationEvents[_0x6ae1[7]](_0xf722x6,_0xf722x7);_0xf722x3[_0x6ae1[7]](_0x6ae1[8],removeListener(_0xf722x6,_0xf722x7))}};function createListener(_0xf722x6,_0xf722x3){return function(_0xf722x9){_0xf722x3[_0x6ae1[9]](_0xf722x6,_0xf722x9)}}function removeListener(_0xf722x6,_0xf722x7){return function(){ChatApplicationEvents[_0x6ae1[10]](_0xf722x6,_0xf722x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/chat_application/index.js b/server/api/chat_application/index.js index 75f5083..d72780d 100644 --- a/server/api/chat_application/index.js +++ b/server/api/chat_application/index.js @@ -1 +1,17 @@ -var _0xd4c8=["\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"];_0xd4c8[0];var express=require(_0xd4c8[1]);var controller=require(_0xd4c8[2]);var license=require(_0xd4c8[3]);var auth=require(_0xd4c8[4]);var router=express.Router();router[_0xd4c8[12]](_0xd4c8[5],license[_0xd4c8[6]](),license[_0xd4c8[7]](),auth[_0xd4c8[8]](),auth[_0xd4c8[10]]([8],[_0xd4c8[9]]),controller[_0xd4c8[11]]);router[_0xd4c8[12]](_0xd4c8[13],license[_0xd4c8[6]](),license[_0xd4c8[7]](),auth[_0xd4c8[8]](),auth[_0xd4c8[10]]([8],[_0xd4c8[9]]),controller[_0xd4c8[14]]);router[_0xd4c8[16]](_0xd4c8[5],license[_0xd4c8[6]](),license[_0xd4c8[7]](),auth[_0xd4c8[8]](),auth[_0xd4c8[10]]([8],[_0xd4c8[9]]),controller[_0xd4c8[15]]);router[_0xd4c8[18]](_0xd4c8[13],license[_0xd4c8[6]](),license[_0xd4c8[7]](),auth[_0xd4c8[8]](),auth[_0xd4c8[10]]([8],[_0xd4c8[9]]),controller[_0xd4c8[17]]);router[_0xd4c8[19]](_0xd4c8[13],license[_0xd4c8[6]](),license[_0xd4c8[7]](),auth[_0xd4c8[8]](),auth[_0xd4c8[10]]([8],[_0xd4c8[9]]),controller[_0xd4c8[17]]);router[_0xd4c8[21]](_0xd4c8[13],license[_0xd4c8[6]](),license[_0xd4c8[7]](),auth[_0xd4c8[8]](),auth[_0xd4c8[10]]([8],[_0xd4c8[9]]),controller[_0xd4c8[20]]);module[_0xd4c8[22]]= router \ No newline at end of file +'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; diff --git a/server/api/chat_disposition/chat_disposition.controller.js b/server/api/chat_disposition/chat_disposition.controller.js index 60debb5..4902da1 100644 --- a/server/api/chat_disposition/chat_disposition.controller.js +++ b/server/api/chat_disposition/chat_disposition.controller.js @@ -1 +1,111 @@ -var _0x3fef=["\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"];_0x3fef[0];var _=require(_0x3fef[1]);var ChatDisposition=require(_0x3fef[3])[_0x3fef[2]];function handleError(_0x4a18x4,_0x4a18x5){_0x4a18x5= _0x4a18x5|| 500;return function(_0x4a18x6){_0x4a18x4[_0x3fef[5]](_0x4a18x5)[_0x3fef[4]](_0x4a18x6)}}function responseWithResult(_0x4a18x4,_0x4a18x5){_0x4a18x5= _0x4a18x5|| 200;return function(_0x4a18x8){if(_0x4a18x8){_0x4a18x4[_0x3fef[5]](_0x4a18x5)[_0x3fef[6]](_0x4a18x8)}}}function responseWithoutResult(_0x4a18x4,_0x4a18x5){_0x4a18x5= _0x4a18x5|| 200;return function(){_0x4a18x4[_0x3fef[7]](_0x4a18x5)}}function handleEntityNotFound(_0x4a18x4){return function(_0x4a18x8){if(!_0x4a18x8){_0x4a18x4[_0x3fef[5]](404)[_0x3fef[8]]();return null};return _0x4a18x8}}function saveUpdates(_0x4a18xc){return function(_0x4a18x8){return _0x4a18x8[_0x3fef[10]](_0x4a18xc)[_0x3fef[9]](function(_0x4a18xd){return _0x4a18xd})}}function removeEntity(_0x4a18x4){return function(_0x4a18x8){if(_0x4a18x8){return _0x4a18x8[_0x3fef[11]]()[_0x3fef[9]](function(){_0x4a18x4[_0x3fef[5]](204)[_0x3fef[8]]()})}}}exports[_0x3fef[12]]= function(_0x4a18xf,_0x4a18x4){ChatDisposition[_0x3fef[14]]()[_0x3fef[9]](responseWithResult(_0x4a18x4))[_0x3fef[13]](handleError(_0x4a18x4))};exports[_0x3fef[15]]= function(_0x4a18xf,_0x4a18x4){ChatDisposition[_0x3fef[18]](_0x4a18xf[_0x3fef[17]][_0x3fef[16]])[_0x3fef[9]](handleEntityNotFound(_0x4a18x4))[_0x3fef[9]](responseWithResult(_0x4a18x4))[_0x3fef[13]](handleError(_0x4a18x4))};exports[_0x3fef[19]]= function(_0x4a18xf,_0x4a18x4){ChatDisposition[_0x3fef[19]](_0x4a18xf[_0x3fef[20]])[_0x3fef[9]](responseWithResult(_0x4a18x4,201))[_0x3fef[13]](handleError(_0x4a18x4))};exports[_0x3fef[21]]= function(_0x4a18xf,_0x4a18x4){if(_0x4a18xf[_0x3fef[20]][_0x3fef[16]]){delete _0x4a18xf[_0x3fef[20]][_0x3fef[16]]};ChatDisposition[_0x3fef[18]](_0x4a18xf[_0x3fef[17]][_0x3fef[16]])[_0x3fef[9]](handleEntityNotFound(_0x4a18x4))[_0x3fef[9]](saveUpdates(_0x4a18xf[_0x3fef[20]]))[_0x3fef[9]](responseWithResult(_0x4a18x4))[_0x3fef[13]](handleError(_0x4a18x4))};exports[_0x3fef[11]]= function(_0x4a18xf,_0x4a18x4){ChatDisposition[_0x3fef[18]](_0x4a18xf[_0x3fef[17]][_0x3fef[16]])[_0x3fef[9]](handleEntityNotFound(_0x4a18x4))[_0x3fef[9]](removeEntity(_0x4a18x4))[_0x3fef[13]](handleError(_0x4a18x4))} \ No newline at end of file +/** + * 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)); +} diff --git a/server/api/chat_disposition/chat_disposition.events.js b/server/api/chat_disposition/chat_disposition.events.js index 40e4ef2..ec5fd9d 100644 --- a/server/api/chat_disposition/chat_disposition.events.js +++ b/server/api/chat_disposition/chat_disposition.events.js @@ -1 +1,36 @@ -var _0x529f=["\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"];_0x529f[0];const EventEmitter=require(_0x529f[1]);const ChatDisposition=require(_0x529f[3])[_0x529f[2]];var ChatDispositionEvents= new EventEmitter();ChatDispositionEvents[_0x529f[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x529f[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x529f[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x529f[6]};for(var e in events){var event=events[e];ChatDisposition[_0x529f[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xe576x8,_0xe576x9,_0xe576xa){ChatDispositionEvents[_0x529f[10]](event+ _0x529f[8]+ _0xe576x8[_0x529f[9]],_0xe576x8);ChatDispositionEvents[_0x529f[10]](event,_0xe576x8);_0xe576xa(null)}}module[_0x529f[11]]= ChatDispositionEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/chat_disposition/chat_disposition.socket.js b/server/api/chat_disposition/chat_disposition.socket.js index 2c63b6c..8788c23 100644 --- a/server/api/chat_disposition/chat_disposition.socket.js +++ b/server/api/chat_disposition/chat_disposition.socket.js @@ -1 +1,32 @@ -var _0x921f=["\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"];_0x921f[0];const ChatDispositionEvents=require(_0x921f[1]);var events=[_0x921f[2],_0x921f[3]];exports[_0x921f[4]]= function(_0x56b0x3){for(var _0x56b0x4=0,_0x56b0x5=events[_0x921f[5]];_0x56b0x4< _0x56b0x5;_0x56b0x4++){var _0x56b0x6=events[_0x56b0x4];var _0x56b0x7=createListener(_0x921f[6]+ _0x56b0x6,_0x56b0x3);ChatDispositionEvents[_0x921f[7]](_0x56b0x6,_0x56b0x7);_0x56b0x3[_0x921f[7]](_0x921f[8],removeListener(_0x56b0x6,_0x56b0x7))}};function createListener(_0x56b0x6,_0x56b0x3){return function(_0x56b0x9){_0x56b0x3[_0x921f[9]](_0x56b0x6,_0x56b0x9)}}function removeListener(_0x56b0x6,_0x56b0x7){return function(){ChatDispositionEvents[_0x921f[10]](_0x56b0x6,_0x56b0x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/chat_disposition/index.js b/server/api/chat_disposition/index.js index 63673a4..aec3275 100644 --- a/server/api/chat_disposition/index.js +++ b/server/api/chat_disposition/index.js @@ -1 +1,18 @@ -var _0x4e4a=["\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"];_0x4e4a[0];var express=require(_0x4e4a[1]);var auth=require(_0x4e4a[2]);var controller=require(_0x4e4a[3]);var license=require(_0x4e4a[4]);var router=express.Router();router[_0x4e4a[10]](_0x4e4a[5],license[_0x4e4a[6]](),license[_0x4e4a[7]](),auth[_0x4e4a[8]](),controller[_0x4e4a[9]]);router[_0x4e4a[10]](_0x4e4a[11],license[_0x4e4a[6]](),license[_0x4e4a[7]](),auth[_0x4e4a[8]](),controller[_0x4e4a[12]]);router[_0x4e4a[14]](_0x4e4a[5],license[_0x4e4a[6]](),license[_0x4e4a[7]](),auth[_0x4e4a[8]](),controller[_0x4e4a[13]]);router[_0x4e4a[16]](_0x4e4a[11],license[_0x4e4a[6]](),license[_0x4e4a[7]](),auth[_0x4e4a[8]](),controller[_0x4e4a[15]]);router[_0x4e4a[17]](_0x4e4a[11],license[_0x4e4a[6]](),license[_0x4e4a[7]](),auth[_0x4e4a[8]](),controller[_0x4e4a[15]]);router[_0x4e4a[19]](_0x4e4a[11],license[_0x4e4a[6]](),license[_0x4e4a[7]](),auth[_0x4e4a[8]](),controller[_0x4e4a[18]]);module[_0x4e4a[20]]= router \ No newline at end of file +'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; diff --git a/server/api/chat_enquiry/enquiry.controller.js b/server/api/chat_enquiry/enquiry.controller.js index e0cca69..0adc0f6 100644 --- a/server/api/chat_enquiry/enquiry.controller.js +++ b/server/api/chat_enquiry/enquiry.controller.js @@ -1 +1,123 @@ -var _0x9f96=["\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"];_0x9f96[0];var _=require(_0x9f96[1]);var Util=require(_0x9f96[2]);var ChatEnquiry=require(_0x9f96[4])[_0x9f96[3]];var ChatVisitor=require(_0x9f96[4])[_0x9f96[5]];var ChatWebsite=require(_0x9f96[4])[_0x9f96[6]];var List=require(_0x9f96[4])[_0x9f96[7]];exports[_0x9f96[8]]= function(_0x52d6x7,_0x52d6x8,_0x52d6x9){return ChatEnquiry[_0x9f96[18]](_[_0x9f96[17]](Util[_0x9f96[14]](_0x52d6x7[_0x9f96[13]]),{include:[{model:ChatWebsite,attributes:[_0x9f96[15],_0x9f96[16]]}]}))[_0x9f96[12]](function(_0x52d6xb){return _0x52d6x8[_0x9f96[11]](200)[_0x9f96[10]](_0x52d6xb)})[_0x9f96[9]](function(_0x52d6xa){return handleError(_0x52d6x8,_0x52d6xa)})};exports[_0x9f96[19]]= function(_0x52d6x7,_0x52d6x8){return ChatEnquiry[_0x9f96[24]](_0x52d6x7[_0x9f96[22]][_0x9f96[15]],{include:[{model:ChatWebsite,attributes:[_0x9f96[15],_0x9f96[16],_0x9f96[23]]},{model:ChatVisitor}]})[_0x9f96[12]](function(_0x52d6xc){if(!_0x52d6xc){return _0x52d6x8[_0x9f96[21]](404)};return _0x52d6x8[_0x9f96[10]](_0x52d6xc)})[_0x9f96[9]](function(_0x52d6xa){console[_0x9f96[20]](_0x52d6xa);return handleError(_0x52d6x8,_0x52d6xa)})};exports[_0x9f96[25]]= function(_0x52d6x7,_0x52d6x8){return ChatEnquiry[_0x9f96[25]](_0x52d6x7[_0x9f96[26]])[_0x9f96[12]](function(_0x52d6xc){return _0x52d6x8[_0x9f96[11]](201)[_0x9f96[10]](_0x52d6xc)})[_0x9f96[9]](function(_0x52d6xa){return handleError(_0x52d6x8,_0x52d6xa)})};exports[_0x9f96[27]]= function(_0x52d6x7,_0x52d6x8){if(_0x52d6x7[_0x9f96[26]][_0x9f96[15]]){delete _0x52d6x7[_0x9f96[26]][_0x9f96[15]]};return ChatEnquiry[_0x9f96[24]](_0x52d6x7[_0x9f96[22]][_0x9f96[15]])[_0x9f96[12]](function(_0x52d6xc){if(!_0x52d6xc){return _0x52d6x8[_0x9f96[21]](404)};var _0x52d6xd=_[_0x9f96[17]](_0x52d6xc,_0x52d6x7[_0x9f96[26]]);return _0x52d6xd[_0x9f96[28]]()})[_0x9f96[12]](function(_0x52d6xc){return _0x52d6x8[_0x9f96[11]](200)[_0x9f96[10]](_0x52d6xc)})[_0x9f96[9]](function(_0x52d6xa){return handleError(_0x52d6x8,_0x52d6xa)})};exports[_0x9f96[29]]= function(_0x52d6x7,_0x52d6x8){return ChatEnquiry[_0x9f96[24]](_0x52d6x7[_0x9f96[22]][_0x9f96[15]])[_0x9f96[12]](function(_0x52d6xc){if(!_0x52d6xc){return _0x52d6x8[_0x9f96[21]](404)};return _0x52d6xc[_0x9f96[29]]()})[_0x9f96[12]](function(){return _0x52d6x8[_0x9f96[21]](204)})[_0x9f96[9]](function(_0x52d6xa){return handleError(_0x52d6x8,_0x52d6xa)})};exports[_0x9f96[30]]= function(_0x52d6x7,_0x52d6x8){return ChatEnquiry[_0x9f96[29]]({where:{id:_0x52d6x7[_0x9f96[13]][_0x9f96[31]]},individualHooks:true})[_0x9f96[12]](function(){return _0x52d6x8[_0x9f96[21]](204)})[_0x9f96[9]](function(_0x52d6xa){return handleError(_0x52d6x8,_0x52d6xa)})};function handleError(_0x52d6x8,_0x52d6xa){return _0x52d6x8[_0x9f96[11]](500)[_0x9f96[10]](_0x52d6xa)} \ No newline at end of file +'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); +} diff --git a/server/api/chat_enquiry/enquiry.events.js b/server/api/chat_enquiry/enquiry.events.js index 3a14f4b..e818a2a 100644 --- a/server/api/chat_enquiry/enquiry.events.js +++ b/server/api/chat_enquiry/enquiry.events.js @@ -1 +1,36 @@ -var _0x3ff9=["\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"];_0x3ff9[0];const EventEmitter=require(_0x3ff9[1]);const Enquiry=require(_0x3ff9[3])[_0x3ff9[2]];var EnquiryEvents= new EventEmitter();EnquiryEvents[_0x3ff9[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x3ff9[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x3ff9[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x3ff9[6]};for(var e in events){var event=events[e];Enquiry[_0x3ff9[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xa639x8,_0xa639x9,_0xa639xa){EnquiryEvents[_0x3ff9[10]](event+ _0x3ff9[8]+ _0xa639x8[_0x3ff9[9]],_0xa639x8);EnquiryEvents[_0x3ff9[10]](event,_0xa639x8);_0xa639xa(null)}}module[_0x3ff9[11]]= EnquiryEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/chat_enquiry/enquiry.socket.js b/server/api/chat_enquiry/enquiry.socket.js index 521a686..686f9a1 100644 --- a/server/api/chat_enquiry/enquiry.socket.js +++ b/server/api/chat_enquiry/enquiry.socket.js @@ -1 +1,28 @@ -var _0x614b=["\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"];_0x614b[0];const ChatEnquiryEvents=require(_0x614b[1]);var events=[_0x614b[2],_0x614b[3]];exports[_0x614b[4]]= function(_0xe95fx3){for(var _0xe95fx4=0,_0xe95fx5=events[_0x614b[5]];_0xe95fx4< _0xe95fx5;_0xe95fx4++){var _0xe95fx6=events[_0xe95fx4];var _0xe95fx7=createListener(_0x614b[6]+ _0xe95fx6,_0xe95fx3);ChatEnquiryEvents[_0x614b[7]](_0xe95fx6,_0xe95fx7);_0xe95fx3[_0x614b[7]](_0x614b[8],removeListener(_0xe95fx6,_0xe95fx7))}};function createListener(_0xe95fx6,_0xe95fx3){return function(_0xe95fx9){_0xe95fx3[_0x614b[9]](_0xe95fx6,_0xe95fx9)}}function removeListener(_0xe95fx6,_0xe95fx7){return function(){ChatEnquiryEvents[_0x614b[10]](_0xe95fx6,_0xe95fx7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/chat_enquiry/index.js b/server/api/chat_enquiry/index.js index dd879e0..0add885 100644 --- a/server/api/chat_enquiry/index.js +++ b/server/api/chat_enquiry/index.js @@ -1 +1,19 @@ -var _0x2d1e=["\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"];_0x2d1e[0];var express=require(_0x2d1e[1]);var controller=require(_0x2d1e[2]);var license=require(_0x2d1e[3]);var auth=require(_0x2d1e[4]);var router=express.Router();router[_0x2d1e[12]](_0x2d1e[5],license[_0x2d1e[6]](),license[_0x2d1e[7]](),auth[_0x2d1e[8]](),auth[_0x2d1e[10]]([8],[_0x2d1e[9]]),controller[_0x2d1e[11]]);router[_0x2d1e[12]](_0x2d1e[13],license[_0x2d1e[6]](),license[_0x2d1e[7]](),auth[_0x2d1e[8]](),auth[_0x2d1e[10]]([8],[_0x2d1e[9]]),controller[_0x2d1e[14]]);router[_0x2d1e[16]](_0x2d1e[5],license[_0x2d1e[6]](),license[_0x2d1e[7]](),auth[_0x2d1e[8]](),auth[_0x2d1e[10]]([8],[_0x2d1e[9]]),controller[_0x2d1e[15]]);router[_0x2d1e[18]](_0x2d1e[13],license[_0x2d1e[6]](),license[_0x2d1e[7]](),auth[_0x2d1e[8]](),auth[_0x2d1e[10]]([8],[_0x2d1e[9]]),controller[_0x2d1e[17]]);router[_0x2d1e[19]](_0x2d1e[13],license[_0x2d1e[6]](),license[_0x2d1e[7]](),auth[_0x2d1e[8]](),auth[_0x2d1e[10]]([8],[_0x2d1e[9]]),controller[_0x2d1e[17]]);router[_0x2d1e[21]](_0x2d1e[5],license[_0x2d1e[6]](),license[_0x2d1e[7]](),auth[_0x2d1e[8]](),auth[_0x2d1e[10]]([8],[_0x2d1e[9]]),controller[_0x2d1e[20]]);router[_0x2d1e[21]](_0x2d1e[13],license[_0x2d1e[6]](),license[_0x2d1e[7]](),auth[_0x2d1e[8]](),auth[_0x2d1e[10]]([8],[_0x2d1e[9]]),controller[_0x2d1e[22]]);module[_0x2d1e[23]]= router \ No newline at end of file +'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; diff --git a/server/api/chat_message/chat_message.controller.js b/server/api/chat_message/chat_message.controller.js index cbb749c..ac89444 100644 --- a/server/api/chat_message/chat_message.controller.js +++ b/server/api/chat_message/chat_message.controller.js @@ -1 +1,106 @@ -var _0x1dcc=["\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"];_0x1dcc[0];var _=require(_0x1dcc[1]);var md5=require(_0x1dcc[2]);var User=require(_0x1dcc[4])[_0x1dcc[3]];var ChatRoom=require(_0x1dcc[4])[_0x1dcc[5]];var ChatMessage=require(_0x1dcc[4])[_0x1dcc[6]];var ChatVisitor=require(_0x1dcc[4])[_0x1dcc[7]];exports[_0x1dcc[8]]= function(_0x52edx7,_0x52edx8){return ChatMessage[_0x1dcc[13]]()[_0x1dcc[12]](function(_0x52edxa){return _0x52edx8[_0x1dcc[11]](200)[_0x1dcc[10]](_0x52edxa)})[_0x1dcc[9]](function(_0x52edx9){return handleError(_0x52edx8,_0x52edx9)})};exports[_0x1dcc[14]]= function(_0x52edx7,_0x52edx8){return ChatMessage[_0x1dcc[14]]()[_0x1dcc[12]](function(_0x52edxb){return _0x52edx8[_0x1dcc[11]](200)[_0x1dcc[10]](_0x52edxb)})[_0x1dcc[9]](function(_0x52edx9){return handleError(_0x52edx8,_0x52edx9)})};exports[_0x1dcc[15]]= function(_0x52edx7,_0x52edx8){return ChatMessage[_0x1dcc[19]](_0x52edx7[_0x1dcc[18]][_0x1dcc[17]])[_0x1dcc[12]](function(_0x52edxc){if(!_0x52edxc){return _0x52edx8[_0x1dcc[16]](404)};return _0x52edx8[_0x1dcc[10]](_0x52edxc)})[_0x1dcc[9]](function(_0x52edx9){return handleError(_0x52edx8,_0x52edx9)})};exports[_0x1dcc[20]]= function(_0x52edx7,_0x52edx8,_0x52edxd){return ChatMessage[_0x1dcc[20]](_[_0x1dcc[23]](_0x52edx7[_0x1dcc[21]],{UserId:_0x52edx7[_0x1dcc[22]][_0x1dcc[17]]}))[_0x1dcc[12]](function(_0x52edxc){return _0x52edx8[_0x1dcc[11]](201)[_0x1dcc[10]](_0x52edxc)})[_0x1dcc[9]](function(_0x52edx9){return handleError(_0x52edx8,_0x52edx9)})};exports[_0x1dcc[24]]= function(_0x52edx7,_0x52edx8){if(_0x52edx7[_0x1dcc[21]][_0x1dcc[17]]){delete _0x52edx7[_0x1dcc[21]][_0x1dcc[17]]};return ChatMessage[_0x1dcc[19]](_0x52edx7[_0x1dcc[18]][_0x1dcc[17]])[_0x1dcc[12]](function(_0x52edxc){if(!_0x52edxc){return _0x52edx8[_0x1dcc[16]](404)};var _0x52edxe=_[_0x1dcc[23]](_0x52edxc,_0x52edx7[_0x1dcc[21]]);return _0x52edxe[_0x1dcc[25]]()})[_0x1dcc[12]](function(_0x52edxc){return _0x52edx8[_0x1dcc[11]](200)[_0x1dcc[10]](_0x52edxc)})[_0x1dcc[9]](function(_0x52edx9){return handleError(_0x52edx8,_0x52edx9)})};exports[_0x1dcc[26]]= function(_0x52edx7,_0x52edx8){return ChatMessage[_0x1dcc[19]](_0x52edx7[_0x1dcc[18]][_0x1dcc[17]])[_0x1dcc[12]](function(_0x52edxc){if(!_0x52edxc){return _0x52edx8[_0x1dcc[16]](404)};return _0x52edxc[_0x1dcc[26]]()})[_0x1dcc[12]](function(){return _0x52edx8[_0x1dcc[16]](204)})[_0x1dcc[9]](function(_0x52edx9){return handleError(_0x52edx8,_0x52edx9)})};function handleError(_0x52edx8,_0x52edx9){return _0x52edx8[_0x1dcc[11]](500)[_0x1dcc[10]](_0x52edx9)} \ No newline at end of file +'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); +} diff --git a/server/api/chat_message/chat_message.events.js b/server/api/chat_message/chat_message.events.js index c2e95d0..64d8887 100644 --- a/server/api/chat_message/chat_message.events.js +++ b/server/api/chat_message/chat_message.events.js @@ -1 +1,36 @@ -var _0x8876=["\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"];_0x8876[0];const EventEmitter=require(_0x8876[1]);const ChatMessage=require(_0x8876[3])[_0x8876[2]];var ChatMessageEvents= new EventEmitter();ChatMessageEvents[_0x8876[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x8876[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x8876[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x8876[6]};for(var e in events){var event=events[e];ChatMessage[_0x8876[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x777ex8,_0x777ex9,_0x777exa){ChatMessageEvents[_0x8876[10]](event+ _0x8876[8]+ _0x777ex8[_0x8876[9]],_0x777ex8);ChatMessageEvents[_0x8876[10]](event,_0x777ex8);_0x777exa(null)}}module[_0x8876[11]]= ChatMessageEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/chat_message/chat_message.socket.js b/server/api/chat_message/chat_message.socket.js index 199431c..df90ddc 100644 --- a/server/api/chat_message/chat_message.socket.js +++ b/server/api/chat_message/chat_message.socket.js @@ -1 +1,62 @@ -var _0xd669=["\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"];_0xd669[0];const _=require(_0xd669[1]);const ChatMessage=require(_0xd669[3])[_0xd669[2]];const ChatMessageEvents=require(_0xd669[4]);var events=[_0xd669[5],_0xd669[6]];exports[_0xd669[7]]= function(_0x4eeex5){for(var _0x4eeex6=0,_0x4eeex7=events[_0xd669[8]];_0x4eeex6< _0x4eeex7;_0x4eeex6++){var _0x4eeex8=events[_0x4eeex6];var _0x4eeex9=createListener(_0xd669[9]+ _0x4eeex8,_0x4eeex5);ChatMessageEvents[_0xd669[10]](_0x4eeex8,_0x4eeex9);_0x4eeex5[_0xd669[10]](_0xd669[11],removeListener(_0x4eeex8,_0x4eeex9))}};function createListener(_0x4eeex8,_0x4eeex5){return function(_0x4eeexb){return _0x4eeexb[_0xd669[32]]()[_0xd669[31]](function(_0x4eeex11){return [_0x4eeex11[_0xd669[29]]({attributes:[_0xd669[17],_0xd669[23],_0xd669[24],_0xd669[25],_0xd669[26],_0xd669[27],_0xd669[28]],raw:true}),_0x4eeex11[_0xd669[30]]({attributes:[_0xd669[17],_0xd669[24],_0xd669[25]],raw:true})]})[_0xd669[22]](function(_0x4eeexd,_0x4eeexe){var _0x4eeexf=_[_0xd669[15]](_0x4eeexd,{id:_0x4eeexb[_0xd669[14]]});_0x4eeexd[_0xd669[21]](function(_0x4eeex10){if(_0x4eeex5[_0xd669[16]]== _0x4eeex10[_0xd669[17]]&& (_0x4eeexf|| _0x4eeexe)){_0x4eeex5[_0xd669[20]](_0x4eeex8,_[_0xd669[19]](_0x4eeexb[_0xd669[18]],{User:_0x4eeexf,ChatVisitor:_0x4eeexf?null:_0x4eeexe}))}})})[_0xd669[13]](function(_0x4eeexc){console[_0xd669[12]](_0x4eeexc)})}}function removeListener(_0x4eeex8,_0x4eeex9){return function(){ChatMessageEvents[_0xd669[33]](_0x4eeex8,_0x4eeex9)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/chat_message/index.js b/server/api/chat_message/index.js index bcc75a7..947b5a8 100644 --- a/server/api/chat_message/index.js +++ b/server/api/chat_message/index.js @@ -1 +1,18 @@ -var _0xd5d7=["\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"];_0xd5d7[0];var express=require(_0xd5d7[1]);var controller=require(_0xd5d7[2]);var license=require(_0xd5d7[3]);var auth=require(_0xd5d7[4]);var router=express.Router();router[_0xd5d7[13]](_0xd5d7[5],license[_0xd5d7[6]](),license[_0xd5d7[7]](),auth[_0xd5d7[8]](),auth[_0xd5d7[11]]([8],[_0xd5d7[9],_0xd5d7[10]]),controller[_0xd5d7[12]]);router[_0xd5d7[13]](_0xd5d7[14],license[_0xd5d7[6]](),license[_0xd5d7[7]](),auth[_0xd5d7[8]](),auth[_0xd5d7[11]]([8],[_0xd5d7[9]]),controller[_0xd5d7[15]]);router[_0xd5d7[13]](_0xd5d7[16],license[_0xd5d7[6]](),license[_0xd5d7[7]](),auth[_0xd5d7[8]](),auth[_0xd5d7[11]]([8],[_0xd5d7[9],_0xd5d7[10]]),controller[_0xd5d7[17]]);router[_0xd5d7[19]](_0xd5d7[5],license[_0xd5d7[6]](),license[_0xd5d7[7]](),auth[_0xd5d7[8]](),auth[_0xd5d7[11]]([8],[_0xd5d7[9],_0xd5d7[10]]),controller[_0xd5d7[18]]);router[_0xd5d7[21]](_0xd5d7[16],license[_0xd5d7[6]](),license[_0xd5d7[7]](),auth[_0xd5d7[8]](),auth[_0xd5d7[11]]([8],[_0xd5d7[9]]),controller[_0xd5d7[20]]);router[_0xd5d7[23]](_0xd5d7[16],license[_0xd5d7[6]](),license[_0xd5d7[7]](),auth[_0xd5d7[8]](),auth[_0xd5d7[11]]([8],[_0xd5d7[9]]),controller[_0xd5d7[22]]);module[_0xd5d7[24]]= router \ No newline at end of file +'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; 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 7ef11a7..8e3b8ba 100644 --- a/server/api/chat_proactive_action/chat_proactive_action.controller.js +++ b/server/api/chat_proactive_action/chat_proactive_action.controller.js @@ -1 +1,112 @@ -var _0x7ce1=["\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"];_0x7ce1[0];var _=require(_0x7ce1[1]);var Util=require(_0x7ce1[2]);var ChatProactiveAction=require(_0x7ce1[4])[_0x7ce1[3]];function handleError(_0xde0fx5,_0xde0fx6){_0xde0fx6= _0xde0fx6|| 500;return function(_0xde0fx7){_0xde0fx5[_0x7ce1[6]](_0xde0fx6)[_0x7ce1[5]](_0xde0fx7)}}function responseWithResult(_0xde0fx5,_0xde0fx6){_0xde0fx6= _0xde0fx6|| 200;return function(_0xde0fx9){if(_0xde0fx9){_0xde0fx5[_0x7ce1[6]](_0xde0fx6)[_0x7ce1[7]](_0xde0fx9)}}}function responseWithoutResult(_0xde0fx5,_0xde0fx6){_0xde0fx6= _0xde0fx6|| 204;return function(){_0xde0fx5[_0x7ce1[8]](_0xde0fx6)}}function handleEntityNotFound(_0xde0fx5){return function(_0xde0fx9){if(!_0xde0fx9){_0xde0fx5[_0x7ce1[6]](404)[_0x7ce1[9]]();return null};return _0xde0fx9}}function saveUpdates(_0xde0fxd){return function(_0xde0fx9){return _0xde0fx9[_0x7ce1[11]](_0xde0fxd)[_0x7ce1[10]](function(_0xde0fxe){return _0xde0fxe})}}function removeEntity(_0xde0fx5){return function(_0xde0fx9){if(_0xde0fx9){return _0xde0fx9[_0x7ce1[12]]()[_0x7ce1[10]](function(){_0xde0fx5[_0x7ce1[6]](204)[_0x7ce1[9]]()})}}}exports[_0x7ce1[13]]= function(_0xde0fx10,_0xde0fx5){return ChatProactiveAction[_0x7ce1[17]](Util[_0x7ce1[16]](_0xde0fx10[_0x7ce1[15]]))[_0x7ce1[10]](responseWithResult(_0xde0fx5))[_0x7ce1[14]](handleError(_0xde0fx5))};exports[_0x7ce1[18]]= function(_0xde0fx10,_0xde0fx5){return ChatProactiveAction[_0x7ce1[21]](_0xde0fx10[_0x7ce1[20]][_0x7ce1[19]])[_0x7ce1[10]](handleEntityNotFound(_0xde0fx5))[_0x7ce1[10]](responseWithResult(_0xde0fx5))[_0x7ce1[14]](handleError(_0xde0fx5))};exports[_0x7ce1[22]]= function(_0xde0fx10,_0xde0fx5){return ChatProactiveAction[_0x7ce1[22]](_0xde0fx10[_0x7ce1[23]])[_0x7ce1[10]](responseWithResult(_0xde0fx5,201))[_0x7ce1[14]](handleError(_0xde0fx5))};exports[_0x7ce1[24]]= function(_0xde0fx10,_0xde0fx5){if(_0xde0fx10[_0x7ce1[23]][_0x7ce1[19]]){delete _0xde0fx10[_0x7ce1[23]][_0x7ce1[19]]};return ChatProactiveAction[_0x7ce1[21]](_0xde0fx10[_0x7ce1[20]][_0x7ce1[19]])[_0x7ce1[10]](handleEntityNotFound(_0xde0fx5))[_0x7ce1[10]](saveUpdates(_0xde0fx10[_0x7ce1[23]]))[_0x7ce1[10]](responseWithResult(_0xde0fx5))[_0x7ce1[14]](handleError(_0xde0fx5))};exports[_0x7ce1[12]]= function(_0xde0fx10,_0xde0fx5){return ChatProactiveAction[_0x7ce1[21]](_0xde0fx10[_0x7ce1[20]][_0x7ce1[19]])[_0x7ce1[10]](handleEntityNotFound(_0xde0fx5))[_0x7ce1[10]](removeEntity(_0xde0fx5))[_0x7ce1[14]](handleError(_0xde0fx5))} \ No newline at end of file +/** + * 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)); +} 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 fe7195f..63b128a 100644 --- a/server/api/chat_proactive_action/chat_proactive_action.events.js +++ b/server/api/chat_proactive_action/chat_proactive_action.events.js @@ -1 +1,36 @@ -var _0x836f=["\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"];_0x836f[0];const EventEmitter=require(_0x836f[1]);const ChatProactiveAction=require(_0x836f[3])[_0x836f[2]];var ChatProactiveActionEvents= new EventEmitter();ChatProactiveActionEvents[_0x836f[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x836f[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x836f[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x836f[6]};for(var e in events){var event=events[e];ChatProactiveAction[_0x836f[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x87cfx8,_0x87cfx9,_0x87cfxa){ChatProactiveActionEvents[_0x836f[10]](event+ _0x836f[8]+ _0x87cfx8[_0x836f[9]],_0x87cfx8);ChatProactiveActionEvents[_0x836f[10]](event,_0x87cfx8);_0x87cfxa(null)}}module[_0x836f[11]]= ChatProactiveActionEvents \ No newline at end of file +/** + * 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; 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 0d37523..2e9d2a7 100644 --- a/server/api/chat_proactive_action/chat_proactive_action.socket.js +++ b/server/api/chat_proactive_action/chat_proactive_action.socket.js @@ -1 +1,28 @@ -var _0xca8e=["\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"];_0xca8e[0];const ChatProactiveActionEvents=require(_0xca8e[1]);var events=[_0xca8e[2],_0xca8e[3]];exports[_0xca8e[4]]= function(_0xd349x3){for(var _0xd349x4=0,_0xd349x5=events[_0xca8e[5]];_0xd349x4< _0xd349x5;_0xd349x4++){var _0xd349x6=events[_0xd349x4];var _0xd349x7=createListener(_0xca8e[6]+ _0xd349x6,_0xd349x3);ChatProactiveActionEvents[_0xca8e[7]](_0xd349x6,_0xd349x7);_0xd349x3[_0xca8e[7]](_0xca8e[8],removeListener(_0xd349x6,_0xd349x7))}};function createListener(_0xd349x6,_0xd349x3){return function(_0xd349x9){_0xd349x3[_0xca8e[9]](_0xd349x6,_0xd349x9)}}function removeListener(_0xd349x6,_0xd349x7){return function(){ChatProactiveActionEvents[_0xca8e[10]](_0xd349x6,_0xd349x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/chat_proactive_action/index.js b/server/api/chat_proactive_action/index.js index 91a835a..e8e0ecf 100644 --- a/server/api/chat_proactive_action/index.js +++ b/server/api/chat_proactive_action/index.js @@ -1 +1,17 @@ -var _0x8476=["\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"];_0x8476[0];var express=require(_0x8476[1]);var auth=require(_0x8476[2]);var controller=require(_0x8476[3]);var license=require(_0x8476[4]);var router=express.Router();router[_0x8476[12]](_0x8476[5],license[_0x8476[6]](),license[_0x8476[7]](),auth[_0x8476[8]](),auth[_0x8476[10]]([8],[_0x8476[9]]),controller[_0x8476[11]]);router[_0x8476[12]](_0x8476[13],license[_0x8476[6]](),license[_0x8476[7]](),auth[_0x8476[8]](),auth[_0x8476[10]]([8],[_0x8476[9]]),controller[_0x8476[14]]);router[_0x8476[16]](_0x8476[5],license[_0x8476[6]](),license[_0x8476[7]](),auth[_0x8476[8]](),auth[_0x8476[10]]([8],[_0x8476[9]]),controller[_0x8476[15]]);router[_0x8476[18]](_0x8476[13],license[_0x8476[6]](),license[_0x8476[7]](),auth[_0x8476[8]](),auth[_0x8476[10]]([8],[_0x8476[9]]),controller[_0x8476[17]]);router[_0x8476[19]](_0x8476[13],license[_0x8476[6]](),license[_0x8476[7]](),auth[_0x8476[8]](),auth[_0x8476[10]]([8],[_0x8476[9]]),controller[_0x8476[17]]);router[_0x8476[21]](_0x8476[13],license[_0x8476[6]](),license[_0x8476[7]](),auth[_0x8476[8]](),auth[_0x8476[10]]([8],[_0x8476[9]]),controller[_0x8476[20]]);module[_0x8476[22]]= router \ No newline at end of file +'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; diff --git a/server/api/chat_queue/chat_queue.controller.js b/server/api/chat_queue/chat_queue.controller.js index 9910589..fa34821 100644 --- a/server/api/chat_queue/chat_queue.controller.js +++ b/server/api/chat_queue/chat_queue.controller.js @@ -1 +1,237 @@ -var _0x9520=["\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"];_0x9520[0];var _=require(_0x9520[1]);var Util=require(_0x9520[2]);var ChatQueue=require(_0x9520[4])[_0x9520[3]];var User=require(_0x9520[4])[_0x9520[5]];var UserHasChatQueue=require(_0x9520[4])[_0x9520[6]];exports[_0x9520[7]]= function(_0x5d7cx6,_0x5d7cx7){switch(_0x5d7cx6[_0x9520[15]][_0x9520[24]]){case _0x9520[15]:return User[_0x9520[16]](_0x5d7cx6[_0x9520[15]][_0x9520[14]],{attributes:[_0x9520[14]]})[_0x9520[11]](Util[_0x9520[13]](_0x5d7cx6[_0x9520[12]]))[_0x9520[11]](function(_0x5d7cx9){_0x5d7cx7[_0x9520[10]](200)[_0x9520[9]](_0x5d7cx9)})[_0x9520[8]](function(_0x5d7cx8){return handleError(_0x5d7cx7,_0x5d7cx8)});default:return ChatQueue[_0x9520[23]](_0x9520[22])[_0x9520[21]](_[_0x9520[20]](Util[_0x9520[19]](_0x5d7cx6[_0x9520[12]]),{distinct:true}))[_0x9520[11]](function(_0x5d7cx9){return _0x5d7cx7[_0x9520[10]](200)[_0x9520[9]]({rows:_0x5d7cx9[_0x9520[17]],count:_0x5d7cx9[_0x9520[17]][_0x9520[18]]})})[_0x9520[8]](function(_0x5d7cx8){return handleError(_0x5d7cx7,_0x5d7cx8)})}};exports[_0x9520[25]]= function(_0x5d7cx6,_0x5d7cx7,_0x5d7cxa){return UserHasChatQueue[_0x9520[26]]({where:{UserId:_0x5d7cx6[_0x9520[15]][_0x9520[14]]}})[_0x9520[11]](function(_0x5d7cxb){return _0x5d7cx7[_0x9520[10]](200)[_0x9520[9]](_0x5d7cxb)})[_0x9520[8]](function(_0x5d7cx8){return handleError(_0x5d7cx7,_0x5d7cx8)})};exports[_0x9520[27]]= function(_0x5d7cx6,_0x5d7cx7){return ChatQueue[_0x9520[16]](_0x5d7cx6[_0x9520[29]][_0x9520[14]])[_0x9520[11]](function(_0x5d7cxc){if(!_0x5d7cxc){return _0x5d7cx7[_0x9520[28]](404)};return _0x5d7cx7[_0x9520[9]](_0x5d7cxc)})[_0x9520[8]](function(_0x5d7cx8){return handleError(_0x5d7cx7,_0x5d7cx8)})};exports[_0x9520[30]]= function(_0x5d7cx6,_0x5d7cx7){return ChatQueue[_0x9520[16]](_0x5d7cx6[_0x9520[29]][_0x9520[14]])[_0x9520[11]](function(_0x5d7cxe){if(!_0x5d7cxe){return _0x5d7cx7[_0x9520[28]](404)};return _0x5d7cxe[_0x9520[35]]({where:{role:_0x9520[31]},attributes:[_0x9520[14],_0x9520[32],_0x9520[33],_0x9520[34]]})})[_0x9520[11]](function(_0x5d7cxd){return _0x5d7cx7[_0x9520[10]](200)[_0x9520[9]]({rows:_0x5d7cxd,count:_0x5d7cxd[_0x9520[18]]})})[_0x9520[8]](function(_0x5d7cx8){return handleError(_0x5d7cx7,_0x5d7cx8)})};exports[_0x9520[36]]= function(_0x5d7cx6,_0x5d7cx7){var _0x5d7cxf;return ChatQueue[_0x9520[36]](_0x5d7cx6[_0x9520[38]])[_0x9520[11]](function(_0x5d7cx10){_0x5d7cxf= _0x5d7cx10;if(_0x5d7cx6[_0x9520[38]][_0x9520[37]]){return _0x5d7cxf[_0x9520[40]](_0x5d7cx6[_0x9520[38]][_0x9520[37]],{penalty:_0x5d7cx6[_0x9520[38]][_0x9520[39]]|| 0,queue:_0x5d7cxf[_0x9520[32]]})}})[_0x9520[11]](function(){return _0x5d7cx7[_0x9520[10]](201)[_0x9520[9]](_0x5d7cxf)})[_0x9520[8]](function(_0x5d7cx8){return handleError(_0x5d7cx7,_0x5d7cx8)})};exports[_0x9520[41]]= function(_0x5d7cx6,_0x5d7cx7){if(_0x5d7cx6[_0x9520[38]][_0x9520[14]]){delete _0x5d7cx6[_0x9520[38]][_0x9520[14]]};return ChatQueue[_0x9520[16]](_0x5d7cx6[_0x9520[29]][_0x9520[14]])[_0x9520[11]](function(_0x5d7cxc){if(!_0x5d7cxc){return _0x5d7cx7[_0x9520[28]](404)};var _0x5d7cx11=_[_0x9520[20]](_0x5d7cxc,_0x5d7cx6[_0x9520[38]]);return _0x5d7cx11[_0x9520[42]]()})[_0x9520[11]](function(_0x5d7cxc){return _0x5d7cx7[_0x9520[10]](200)[_0x9520[9]](_0x5d7cxc)})[_0x9520[8]](function(_0x5d7cx8){return handleError(_0x5d7cx7,_0x5d7cx8)})};exports[_0x9520[43]]= function(_0x5d7cx6,_0x5d7cx7,_0x5d7cxa){return ChatQueue[_0x9520[16]](_0x5d7cx6[_0x9520[29]][_0x9520[14]])[_0x9520[11]](function(_0x5d7cx10){if(!_0x5d7cx10){return _0x5d7cx7[_0x9520[28]](404)};var _0x5d7cxb=_[_0x9520[44]](_0x5d7cx6[_0x9520[38]][_0x9520[37]],function(_0x5d7cx12){return {UserId:_0x5d7cx12,penalty:_0x5d7cx6[_0x9520[38]][_0x9520[39]],ChatQueueId:_0x5d7cx10[_0x9520[14]],queue:_0x5d7cx10[_0x9520[32]]}});return UserHasChatQueue[_0x9520[45]](_0x5d7cxb,{individualHooks:true})})[_0x9520[11]](function(){return _0x5d7cx7[_0x9520[28]](200)})[_0x9520[8]](function(_0x5d7cx8){return handleError(_0x5d7cx7,_0x5d7cx8)})};exports[_0x9520[46]]= function(_0x5d7cx6,_0x5d7cx7,_0x5d7cxa){return ChatQueue[_0x9520[16]](_0x5d7cx6[_0x9520[29]][_0x9520[14]])[_0x9520[11]](function(_0x5d7cx10){if(!_0x5d7cx10){return _0x5d7cx7[_0x9520[28]](404)};return _0x5d7cx10[_0x9520[47]](_0x5d7cx6[_0x9520[12]][_0x9520[37]],{individualHooks:true})})[_0x9520[11]](function(){return _0x5d7cx7[_0x9520[28]](200)})[_0x9520[8]](function(_0x5d7cx8){return handleError(_0x5d7cx7,_0x5d7cx8)})};exports[_0x9520[48]]= function(_0x5d7cx6,_0x5d7cx7){return ChatQueue[_0x9520[16]](_0x5d7cx6[_0x9520[29]][_0x9520[14]])[_0x9520[11]](function(_0x5d7cxc){if(!_0x5d7cxc){return _0x5d7cx7[_0x9520[28]](404)};return _0x5d7cxc[_0x9520[48]]()})[_0x9520[11]](function(){return _0x5d7cx7[_0x9520[28]](204)})[_0x9520[8]](function(_0x5d7cx8){return handleError(_0x5d7cx7,_0x5d7cx8)})};exports[_0x9520[49]]= function(_0x5d7cx6,_0x5d7cx7){return ChatQueue[_0x9520[48]]({where:{id:_0x5d7cx6[_0x9520[12]][_0x9520[50]]},individualHooks:true})[_0x9520[11]](function(){return _0x5d7cx7[_0x9520[28]](204)})[_0x9520[8]](function(_0x5d7cx8){return handleError(_0x5d7cx7,_0x5d7cx8)})};function handleError(_0x5d7cx7,_0x5d7cx8){return _0x5d7cx7[_0x9520[10]](500)[_0x9520[9]](_0x5d7cx8)} \ No newline at end of file +'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); +} diff --git a/server/api/chat_queue/chat_queue.events.js b/server/api/chat_queue/chat_queue.events.js index 00e6d84..7fe734e 100644 --- a/server/api/chat_queue/chat_queue.events.js +++ b/server/api/chat_queue/chat_queue.events.js @@ -1 +1,36 @@ -var _0x9f24=["\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"];_0x9f24[0];const EventEmitter=require(_0x9f24[1]);const ChatQueue=require(_0x9f24[3])[_0x9f24[2]];var ChatQueueEvents= new EventEmitter();ChatQueueEvents[_0x9f24[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x9f24[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x9f24[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x9f24[6]};for(var e in events){var event=events[e];ChatQueue[_0x9f24[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x2715x8,_0x2715x9,_0x2715xa){ChatQueueEvents[_0x9f24[10]](event+ _0x9f24[8]+ _0x2715x8[_0x9f24[9]],_0x2715x8);ChatQueueEvents[_0x9f24[10]](event,_0x2715x8);_0x2715xa(null)}}module[_0x9f24[11]]= ChatQueueEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/chat_queue/chat_queue.socket.js b/server/api/chat_queue/chat_queue.socket.js index e93f5cc..cee7104 100644 --- a/server/api/chat_queue/chat_queue.socket.js +++ b/server/api/chat_queue/chat_queue.socket.js @@ -1 +1,28 @@ -var _0x6efc=["\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"];_0x6efc[0];const ChatQueueEvents=require(_0x6efc[1]);var events=[_0x6efc[2],_0x6efc[3]];exports[_0x6efc[4]]= function(_0xeabfx3){for(var _0xeabfx4=0,_0xeabfx5=events[_0x6efc[5]];_0xeabfx4< _0xeabfx5;_0xeabfx4++){var _0xeabfx6=events[_0xeabfx4];var _0xeabfx7=createListener(_0x6efc[6]+ _0xeabfx6,_0xeabfx3);ChatQueueEvents[_0x6efc[7]](_0xeabfx6,_0xeabfx7);_0xeabfx3[_0x6efc[7]](_0x6efc[8],removeListener(_0xeabfx6,_0xeabfx7))}};function createListener(_0xeabfx6,_0xeabfx3){return function(_0xeabfx9){_0xeabfx3[_0x6efc[9]](_0xeabfx6,_0xeabfx9)}}function removeListener(_0xeabfx6,_0xeabfx7){return function(){ChatQueueEvents[_0x6efc[10]](_0xeabfx6,_0xeabfx7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/chat_queue/index.js b/server/api/chat_queue/index.js index 5943453..ecfb13e 100644 --- a/server/api/chat_queue/index.js +++ b/server/api/chat_queue/index.js @@ -1 +1,23 @@ -var _0x4967=["\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","\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"];_0x4967[0];var express=require(_0x4967[1]);var controller=require(_0x4967[2]);var auth=require(_0x4967[3]);var license=require(_0x4967[4]);var router=express.Router();router[_0x4967[12]](_0x4967[5],license[_0x4967[6]](),license[_0x4967[7]](),auth[_0x4967[8]](),auth[_0x4967[10]]([8],[_0x4967[9]]),controller[_0x4967[11]]);router[_0x4967[12]](_0x4967[13],license[_0x4967[6]](),license[_0x4967[7]](),auth[_0x4967[8]](),auth[_0x4967[10]]([8],[_0x4967[9]]),controller[_0x4967[14]]);router[_0x4967[12]](_0x4967[15],license[_0x4967[6]](),license[_0x4967[7]](),auth[_0x4967[8]](),auth[_0x4967[10]]([8],[_0x4967[9]]),controller[_0x4967[16]]);router[_0x4967[12]](_0x4967[17],license[_0x4967[6]](),license[_0x4967[7]](),auth[_0x4967[8]](),auth[_0x4967[10]]([8],[_0x4967[9]]),controller[_0x4967[18]]);router[_0x4967[20]](_0x4967[5],license[_0x4967[6]](),license[_0x4967[7]](),auth[_0x4967[8]](),auth[_0x4967[10]]([8],[_0x4967[9]]),controller[_0x4967[19]]);router[_0x4967[20]](_0x4967[15],license[_0x4967[6]](),license[_0x4967[7]](),auth[_0x4967[8]](),auth[_0x4967[10]]([8],[_0x4967[9]]),controller[_0x4967[21]]);router[_0x4967[23]](_0x4967[17],license[_0x4967[6]](),license[_0x4967[7]](),auth[_0x4967[8]](),auth[_0x4967[10]]([8],[_0x4967[9]]),controller[_0x4967[22]]);router[_0x4967[25]](_0x4967[15],license[_0x4967[6]](),license[_0x4967[7]](),auth[_0x4967[8]](),auth[_0x4967[10]]([8],[_0x4967[9]]),controller[_0x4967[24]]);router[_0x4967[26]](_0x4967[17],license[_0x4967[6]](),license[_0x4967[7]](),auth[_0x4967[8]](),auth[_0x4967[10]]([8],[_0x4967[9]]),controller[_0x4967[22]]);router[_0x4967[25]](_0x4967[5],license[_0x4967[6]](),license[_0x4967[7]](),auth[_0x4967[8]](),auth[_0x4967[10]]([8],[_0x4967[9]]),controller[_0x4967[27]]);router[_0x4967[25]](_0x4967[17],license[_0x4967[6]](),license[_0x4967[7]](),auth[_0x4967[8]](),auth[_0x4967[10]]([8],[_0x4967[9]]),controller[_0x4967[28]]);module[_0x4967[29]]= router \ No newline at end of file +'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.hasModule([8], ['admin']), controller.create); +router.post('/:id/agents', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.addAgents); +router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update); +router.delete('/:id/agents', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.removeAgents); +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; diff --git a/server/api/chat_room/chat_room.controller.js b/server/api/chat_room/chat_room.controller.js index 77fe904..47b4932 100644 --- a/server/api/chat_room/chat_room.controller.js +++ b/server/api/chat_room/chat_room.controller.js @@ -1 +1,655 @@ -var _0x6e3a=["\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\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","\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"];_0x6e3a[0];var _=require(_0x6e3a[1]);var md5=require(_0x6e3a[2]);var moment=require(_0x6e3a[3]);var csv=require(_0x6e3a[4]);var util=require(_0x6e3a[5]);var Util=require(_0x6e3a[6]);var User=require(_0x6e3a[8])[_0x6e3a[7]];var Agent=require(_0x6e3a[8])[_0x6e3a[7]];var ChatRoom=require(_0x6e3a[8])[_0x6e3a[9]];var ChatMessage=require(_0x6e3a[8])[_0x6e3a[10]];var ChatWebsite=require(_0x6e3a[8])[_0x6e3a[11]];var ChatApplication=require(_0x6e3a[8])[_0x6e3a[12]];var ChatQueue=require(_0x6e3a[8])[_0x6e3a[13]];var ChatVisitor=require(_0x6e3a[8])[_0x6e3a[14]];var List=require(_0x6e3a[8])[_0x6e3a[15]];var UserHasChatRoom=require(_0x6e3a[8])[_0x6e3a[16]];exports[_0x6e3a[17]]= function(_0x6e02x11,_0x6e02x12,_0x6e02x13){return ChatRoom[_0x6e3a[32]](_[_0x6e3a[31]](Util[_0x6e3a[24]](_0x6e02x11[_0x6e3a[23]]),{include:[{model:User,attributes:[_0x6e3a[25],_0x6e3a[26],_0x6e3a[27],_0x6e3a[28],_0x6e3a[29],_0x6e3a[30]]},{model:ChatMessage},{model:ChatVisitor}]}))[_0x6e3a[22]](function(_0x6e02x15){_0x6e02x12[_0x6e3a[21]](200)[_0x6e3a[20]](_0x6e02x15)})[_0x6e3a[19]](function(_0x6e02x14){console[_0x6e3a[18]](_0x6e02x14);return handleError(_0x6e02x12,_0x6e02x14)})};exports[_0x6e3a[33]]= function(_0x6e02x11,_0x6e02x12){return ChatRoom[_0x6e3a[33]]()[_0x6e3a[22]](function(_0x6e02x16){return _0x6e02x12[_0x6e3a[21]](200)[_0x6e3a[20]](_0x6e02x16)})[_0x6e3a[19]](function(_0x6e02x14){return handleError(_0x6e02x12,_0x6e02x14)})};function getChatQueues(_0x6e02x18){return function(){switch(_0x6e02x18[_0x6e3a[29]]){case _0x6e3a[37]:return User[_0x6e3a[36]](_0x6e02x18[_0x6e3a[25]],{attributes:[_0x6e3a[25]]})[_0x6e3a[22]](Util[_0x6e3a[35]]({},{attributes:[_0x6e3a[25]]}))[_0x6e3a[22]](function(_0x6e02x19){return {include:{model:ChatWebsite,include:{model:ChatApplication,include:{model:ChatQueue,where:{id:_[_0x6e3a[34]](_0x6e02x19,_0x6e3a[25])}}}}}});default:return {}}}}exports[_0x6e3a[38]]= function(_0x6e02x11,_0x6e02x12){return Promise[_0x6e3a[43]]([])[_0x6e3a[22]](getChatQueues(_0x6e02x11[_0x6e3a[37]]))[_0x6e3a[22]](function(_0x6e02x1b){return ChatRoom[_0x6e3a[42]](_[_0x6e3a[31]](Util[_0x6e3a[24]](_0x6e02x11[_0x6e3a[23]],{status:_0x6e3a[39],updatedAt:{$gte:moment()[_0x6e3a[41]](_0x6e3a[40])}}),_0x6e02x1b))})[_0x6e3a[22]](function(_0x6e02x1a){return _0x6e02x12[_0x6e3a[21]](200)[_0x6e3a[20]]({value:_0x6e02x1a})})[_0x6e3a[19]](function(_0x6e02x14){console[_0x6e3a[18]](_0x6e02x14);return handleError(_0x6e02x12,_0x6e02x14)})};exports[_0x6e3a[44]]= function(_0x6e02x11,_0x6e02x12,_0x6e02x13){var _0x6e02x1c={tags:_0x6e02x11[_0x6e3a[46]][_0x6e3a[45]]};var _0x6e02x1d={where:{id:_0x6e02x11[_0x6e3a[49]][_0x6e3a[25]][_0x6e3a[48]](_0x6e3a[47])}};return ChatRoom[_0x6e3a[51]](_0x6e02x1c,_0x6e02x1d)[_0x6e3a[22]](function(_0x6e02x1e){if(!_0x6e02x1e){return _0x6e02x12[_0x6e3a[50]](404)};return _0x6e02x1e})[_0x6e3a[22]](function(_0x6e02x1e){return _0x6e02x12[_0x6e3a[50]](200)})[_0x6e3a[19]](function(_0x6e02x14){return handleError(_0x6e02x12,_0x6e02x14)})};function checkTags(_0x6e02x20){if(_0x6e02x20){if(_0x6e02x20[_0x6e3a[45]]){_0x6e02x20[_0x6e3a[52]]= [];if(_[_0x6e3a[53]](_0x6e02x20[_0x6e3a[45]])){for(var _0x6e02x21=0;_0x6e02x21< _0x6e02x20[_0x6e3a[45]][_0x6e3a[54]];_0x6e02x21++){_0x6e02x20[_0x6e3a[52]][_0x6e3a[57]]({tags:{$like:_0x6e3a[55]+ _0x6e02x20[_0x6e3a[45]][_0x6e02x21]+ _0x6e3a[56]}})}}else {_0x6e02x20[_0x6e3a[52]][_0x6e3a[57]]({tags:{$like:_0x6e3a[55]+ _0x6e02x20[_0x6e3a[45]]+ _0x6e3a[56]}})};delete _0x6e02x20[_0x6e3a[45]]}}}exports[_0x6e3a[58]]= function(_0x6e02x11,_0x6e02x12,_0x6e02x13){switch(_0x6e02x11[_0x6e3a[37]][_0x6e3a[29]]){case _0x6e3a[37]:return User[_0x6e3a[36]](_0x6e02x11[_0x6e3a[37]][_0x6e3a[25]],{attributes:[_0x6e3a[25]],where:{id:{$ne:_0x6e02x11[_0x6e3a[37]][_0x6e3a[25]]},online:true}})[_0x6e3a[22]](Util[_0x6e3a[59]](_[_0x6e3a[31]](_0x6e02x11[_0x6e3a[23]],{id:{$ne:_0x6e02x11[_0x6e3a[37]][_0x6e3a[25]]}})))[_0x6e3a[22]](function(_0x6e02x15){return _0x6e02x12[_0x6e3a[21]](200)[_0x6e3a[20]](_0x6e02x15)})[_0x6e3a[19]](function(_0x6e02x14){return handleError(_0x6e02x12,_0x6e02x14)});default:return User[_0x6e3a[60]](_0x6e3a[43])[_0x6e3a[32]](_[_0x6e3a[31]](Util[_0x6e3a[24]](_0x6e02x11[_0x6e3a[23]]),{where:{id:{$ne:_0x6e02x11[_0x6e3a[37]][_0x6e3a[25]]},online:true}}))[_0x6e3a[22]](function(_0x6e02x15){return _0x6e02x12[_0x6e3a[21]](200)[_0x6e3a[20]](_0x6e02x15)})[_0x6e3a[19]](function(_0x6e02x14){return handleError(_0x6e02x12,_0x6e02x14)})}};exports[_0x6e3a[61]]= function(_0x6e02x11,_0x6e02x12,_0x6e02x13){checkTags(_0x6e02x11[_0x6e3a[23]]);var _0x6e02x22={where:_[_0x6e3a[31]]({type:_0x6e3a[62]},_0x6e02x11[_0x6e3a[23]])};switch(_0x6e02x11[_0x6e3a[37]][_0x6e3a[29]]){case _0x6e3a[63]:_[_0x6e3a[31]](_0x6e02x22,{include:[{model:User,attributes:[_0x6e3a[25]],where:{id:_0x6e02x11[_0x6e3a[37]][_0x6e3a[25]]}}]});break;default:};return ChatRoom[_0x6e3a[65]](_0x6e02x22)[_0x6e3a[22]](function(_0x6e02x1e){return ChatRoom[_0x6e3a[65]]({where:{id:{$in:_[_0x6e3a[34]](_0x6e02x1e,_0x6e3a[25])}},include:[{model:User,attributes:[_0x6e3a[25],_0x6e3a[26],_0x6e3a[27],_0x6e3a[29],_0x6e3a[64]]},{model:ChatVisitor}]})})[_0x6e3a[22]](function(_0x6e02x1e){return _0x6e02x12[_0x6e3a[21]](200)[_0x6e3a[20]]({rows:_0x6e02x1e,count:_0x6e02x1e[_0x6e3a[54]]})})[_0x6e3a[19]](function(_0x6e02x14){return handleError(_0x6e02x12,_0x6e02x14)})};exports[_0x6e3a[66]]= function(_0x6e02x11,_0x6e02x12,_0x6e02x13){checkTags(_0x6e02x11[_0x6e3a[23]]);var _0x6e02x22={where:_[_0x6e3a[31]]({type:_0x6e3a[67]},_0x6e02x11[_0x6e3a[23]]),include:[{model:ChatVisitor,attributes:[_0x6e3a[25],_0x6e3a[27]]}]};switch(_0x6e02x11[_0x6e3a[37]][_0x6e3a[29]]){case _0x6e3a[63]:_0x6e02x22[_0x6e3a[68]][_0x6e3a[57]]({model:User,attributes:[_0x6e3a[25]],where:{id:_0x6e02x11[_0x6e3a[37]][_0x6e3a[25]]}});break;default:};return ChatRoom[_0x6e3a[65]](_0x6e02x22)[_0x6e3a[22]](function(_0x6e02x1e){return _0x6e02x12[_0x6e3a[21]](200)[_0x6e3a[20]]({rows:_0x6e02x1e,count:_0x6e02x1e[_0x6e3a[54]]})})[_0x6e3a[19]](function(_0x6e02x14){return handleError(_0x6e02x12,_0x6e02x14)})};exports[_0x6e3a[69]]= function(_0x6e02x11,_0x6e02x12,_0x6e02x13){return User[_0x6e3a[60]](_0x6e3a[43])[_0x6e3a[36]](_0x6e02x11[_0x6e3a[49]][_0x6e3a[25]])[_0x6e3a[22]](function(_0x6e02x15){return _0x6e02x12[_0x6e3a[21]](200)[_0x6e3a[20]](_0x6e02x15)})[_0x6e3a[19]](function(_0x6e02x14){return handleError(_0x6e02x12,_0x6e02x14)})};exports[_0x6e3a[70]]= function(_0x6e02x11,_0x6e02x12,_0x6e02x13){return ChatRoom[_0x6e3a[60]](_0x6e3a[71])[_0x6e3a[32]](_[_0x6e3a[31]](Util[_0x6e3a[24]](_0x6e02x11[_0x6e3a[23]]),{include:[{model:User,attributes:[_0x6e3a[25],_0x6e3a[26],_0x6e3a[27],_0x6e3a[28],_0x6e3a[29],_0x6e3a[30]]},{model:ChatMessage},{model:ChatVisitor}]}))[_0x6e3a[22]](function(_0x6e02x15){_0x6e02x12[_0x6e3a[21]](200)[_0x6e3a[20]](_0x6e02x15)})[_0x6e3a[19]](function(_0x6e02x14){console[_0x6e3a[18]](_0x6e02x14);return handleError(_0x6e02x12,_0x6e02x14)})};exports[_0x6e3a[72]]= function(_0x6e02x11,_0x6e02x12){return User[_0x6e3a[36]](_0x6e02x11[_0x6e3a[37]][_0x6e3a[25]])[_0x6e3a[22]](function(_0x6e02x18){return _0x6e02x18[_0x6e3a[74]]({include:[{model:ChatVisitor,attributes:[_0x6e3a[25],_0x6e3a[27],_0x6e3a[28]]},{model:User,attributes:[_0x6e3a[25],_0x6e3a[26],_0x6e3a[27],_0x6e3a[28],_0x6e3a[29],_0x6e3a[30]]}]})})[_0x6e3a[22]](function(_0x6e02x1e){if(!_0x6e02x1e){return _0x6e02x12[_0x6e3a[50]](404)};return _0x6e02x12[_0x6e3a[20]](_0x6e02x1e)})[_0x6e3a[19]](function(_0x6e02x14){console[_0x6e3a[73]](_0x6e02x14);return handleError(_0x6e02x12,_0x6e02x14)})};exports[_0x6e3a[75]]= function(_0x6e02x11,_0x6e02x12){return ChatRoom[_0x6e3a[36]](_0x6e02x11[_0x6e3a[49]][_0x6e3a[25]],{include:[{model:ChatMessage,include:[{model:ChatVisitor,attributes:[_0x6e3a[25],_0x6e3a[28],_0x6e3a[27]]},{model:User,attributes:[_0x6e3a[25],_0x6e3a[28],_0x6e3a[26],_0x6e3a[27],_0x6e3a[64],_0x6e3a[29],_0x6e3a[30]]}]},{model:User,attributes:[_0x6e3a[25],_0x6e3a[28],_0x6e3a[26],_0x6e3a[27],_0x6e3a[64],_0x6e3a[29],_0x6e3a[30]]},{model:ChatVisitor},{model:ChatWebsite,attributes:[_0x6e3a[25],_0x6e3a[26],_0x6e3a[76]],include:[List]}]})[_0x6e3a[22]](function(_0x6e02x23){if(!_0x6e02x23){return _0x6e02x12[_0x6e3a[50]](404)};return _0x6e02x12[_0x6e3a[20]](_0x6e02x23)})[_0x6e3a[19]](function(_0x6e02x14){return handleError(_0x6e02x12,_0x6e02x14)})};exports[_0x6e3a[77]]= function(_0x6e02x11,_0x6e02x12,_0x6e02x13){var _0x6e02x24;return ChatRoom[_0x6e3a[87]]({where:{token:md5(JSON[_0x6e3a[85]](_0x6e02x11[_0x6e3a[23]][_0x6e3a[80]][_0x6e3a[84]]())).toString(_0x6e3a[83])},defaults:{type:_0x6e3a[30],token:md5(JSON[_0x6e3a[85]](_0x6e02x11[_0x6e3a[23]][_0x6e3a[80]][_0x6e3a[84]]())).toString(_0x6e3a[83]),status:_0x6e3a[86]},include:[{model:ChatMessage,include:[{model:ChatVisitor,attributes:[_0x6e3a[25],_0x6e3a[28],_0x6e3a[27]]},{model:User,attributes:[_0x6e3a[25],_0x6e3a[26],_0x6e3a[27],_0x6e3a[28],_0x6e3a[29],_0x6e3a[30]]}]},{model:User,attributes:[_0x6e3a[25],_0x6e3a[26],_0x6e3a[27],_0x6e3a[28],_0x6e3a[29],_0x6e3a[30]]}]})[_0x6e3a[82]](function(_0x6e02x23,_0x6e02x26){_0x6e02x24= _0x6e02x23;if(_0x6e02x26){return _0x6e02x24[_0x6e3a[81]](_0x6e02x11[_0x6e3a[23]][_0x6e3a[80]])}})[_0x6e3a[22]](function(){return _0x6e02x24[_0x6e3a[79]]()})[_0x6e3a[22]](function(_0x6e02x25){return _0x6e02x12[_0x6e3a[21]](200)[_0x6e3a[20]](_[_0x6e3a[31]](_0x6e02x24[_0x6e3a[78]],{Users:_0x6e02x25}))})[_0x6e3a[19]](function(_0x6e02x14){return handleError(_0x6e02x12,_0x6e02x14)})};exports[_0x6e3a[88]]= function(_0x6e02x11,_0x6e02x12,_0x6e02x13){var _0x6e02x24;return ChatRoom[_0x6e3a[36]](_0x6e02x11[_0x6e3a[49]][_0x6e3a[25]])[_0x6e3a[22]](function(_0x6e02x23){_0x6e02x24= _0x6e02x23;if(!_0x6e02x24){return _0x6e02x12[_0x6e3a[50]](404)}})[_0x6e3a[22]](function(){return ChatMessage[_0x6e3a[90]](_[_0x6e3a[31]](_0x6e02x11[_0x6e3a[46]],{type:_0x6e02x24[_0x6e3a[89]],ChatRoomId:_0x6e02x11[_0x6e3a[49]][_0x6e3a[25]],UserId:_0x6e02x11[_0x6e3a[37]][_0x6e3a[25]]}))})[_0x6e3a[22]](function(_0x6e02x27){return _0x6e02x12[_0x6e3a[21]](200)[_0x6e3a[20]](_0x6e02x27)})[_0x6e3a[19]](function(_0x6e02x14){return handleError(_0x6e02x12,_0x6e02x14)})};exports[_0x6e3a[91]]= function(_0x6e02x11,_0x6e02x12,_0x6e02x13){return ChatRoom[_0x6e3a[36]](_0x6e02x11[_0x6e3a[49]][_0x6e3a[25]],{include:[{model:ChatMessage,include:[{model:ChatVisitor,attributes:[_0x6e3a[25],_0x6e3a[27]]},{model:User,attributes:[_0x6e3a[25],_0x6e3a[27]]}]}]})[_0x6e3a[22]](function(_0x6e02x23){var _0x6e02x28=[];_0x6e02x23[_0x6e3a[96]][_0x6e3a[95]](function(_0x6e02x27){_0x6e02x28[_0x6e3a[57]]({name:_0x6e02x27[_0x6e3a[7]]?_0x6e02x27[_0x6e3a[7]][_0x6e3a[27]]:_0x6e02x27[_0x6e3a[14]][_0x6e3a[27]],text:_0x6e02x27[_0x6e3a[46]][_0x6e3a[93]](/(\r\n|\n|\r)/gm,_0x6e3a[92]),date:_0x6e02x27[_0x6e3a[94]]})});return _0x6e02x12[_0x6e3a[89]](_0x6e3a[97])[_0x6e3a[21]](200)[_0x6e3a[20]](csv(_0x6e02x28))})[_0x6e3a[19]](function(_0x6e02x14){return handleError(_0x6e02x12,_0x6e02x14)})};exports[_0x6e3a[98]]= function(_0x6e02x11,_0x6e02x12){return User[_0x6e3a[36]](_0x6e02x11[_0x6e3a[37]][_0x6e3a[25]])[_0x6e3a[22]](function(_0x6e02x18){return _0x6e02x18[_0x6e3a[74]]({where:{type:_0x6e02x11[_0x6e3a[49]][_0x6e3a[89]]},include:[{model:ChatVisitor,attributes:[_0x6e3a[25],_0x6e3a[27],_0x6e3a[28]]}]})})[_0x6e3a[22]](function(_0x6e02x1e){if(!_0x6e02x1e){return _0x6e02x12[_0x6e3a[50]](404)};return _0x6e02x12[_0x6e3a[20]](_0x6e02x1e)})[_0x6e3a[19]](function(_0x6e02x14){return handleError(_0x6e02x12,_0x6e02x14)})};exports[_0x6e3a[99]]= function(_0x6e02x11,_0x6e02x12){return User[_0x6e3a[36]](_0x6e02x11[_0x6e3a[37]][_0x6e3a[25]])[_0x6e3a[22]](function(_0x6e02x18){return _0x6e02x18[_0x6e3a[74]]({include:[{model:ChatVisitor,attributes:[_0x6e3a[25],_0x6e3a[27],_0x6e3a[28]]},{model:User,attributes:[_0x6e3a[25],_0x6e3a[26],_0x6e3a[27],_0x6e3a[28],_0x6e3a[29],_0x6e3a[30]]}]})})[_0x6e3a[22]](function(_0x6e02x1e){if(!_0x6e02x1e){return _0x6e02x12[_0x6e3a[50]](404)};return _0x6e02x12[_0x6e3a[20]](_0x6e02x1e)})[_0x6e3a[19]](function(_0x6e02x14){return handleError(_0x6e02x12,_0x6e02x14)})};exports[_0x6e3a[90]]= function(_0x6e02x11,_0x6e02x12){};exports[_0x6e3a[51]]= function(_0x6e02x11,_0x6e02x12){if(_0x6e02x11[_0x6e3a[46]][_0x6e3a[25]]){delete _0x6e02x11[_0x6e3a[46]][_0x6e3a[25]]};return ChatRoom[_0x6e3a[36]](_0x6e02x11[_0x6e3a[49]][_0x6e3a[25]])[_0x6e3a[22]](function(_0x6e02x23){if(!_0x6e02x23){return _0x6e02x12[_0x6e3a[50]](404)};return _0x6e02x23[_0x6e3a[51]](_0x6e02x11[_0x6e3a[46]])})[_0x6e3a[22]](function(_0x6e02x23){return _0x6e02x12[_0x6e3a[21]](200)[_0x6e3a[20]](_0x6e02x23)})[_0x6e3a[19]](function(_0x6e02x14){return handleError(_0x6e02x12,_0x6e02x14)})};exports[_0x6e3a[100]]= function(_0x6e02x11,_0x6e02x12){var _0x6e02x24;if(_0x6e02x11[_0x6e3a[46]][_0x6e3a[25]]){delete _0x6e02x11[_0x6e3a[46]][_0x6e3a[25]]};return ChatRoom[_0x6e3a[36]](_0x6e02x11[_0x6e3a[49]][_0x6e3a[25]])[_0x6e3a[22]](function(_0x6e02x23){if(!_0x6e02x23|| !_0x6e02x11[_0x6e3a[46]][_0x6e3a[80]]){return _0x6e02x12[_0x6e3a[50]](404)};return _0x6e02x23})[_0x6e3a[22]](function(_0x6e02x23){return _0x6e02x23[_0x6e3a[51]]({type:_0x6e3a[62],token:md5(JSON[_0x6e3a[85]](_0x6e02x11[_0x6e3a[46]][_0x6e3a[80]][_0x6e3a[84]]())).toString(_0x6e3a[83])})})[_0x6e3a[22]](function(_0x6e02x23){_0x6e02x24= _0x6e02x23;return _0x6e02x23[_0x6e3a[81]](_0x6e02x11[_0x6e3a[46]][_0x6e3a[80]][_0x6e3a[84]](),{individualHooks:true})})[_0x6e3a[22]](function(){return _0x6e02x24[_0x6e3a[79]]()})[_0x6e3a[22]](function(_0x6e02x25){_[_0x6e3a[31]](_0x6e02x24[_0x6e3a[78]],{Users:_0x6e02x25});return _0x6e02x12[_0x6e3a[21]](200)[_0x6e3a[20]](_0x6e02x24)})[_0x6e3a[19]](function(_0x6e02x14){return handleError(_0x6e02x12,_0x6e02x14)})};exports[_0x6e3a[101]]= function(_0x6e02x11,_0x6e02x12){return ChatRoom[_0x6e3a[36]](_0x6e02x11[_0x6e3a[49]][_0x6e3a[25]])[_0x6e3a[22]](function(_0x6e02x23){if(!_0x6e02x23){return _0x6e02x12[_0x6e3a[50]](404)};return _0x6e02x23[_0x6e3a[101]]()})[_0x6e3a[22]](function(){return _0x6e02x12[_0x6e3a[50]](204)})[_0x6e3a[19]](function(_0x6e02x14){return handleError(_0x6e02x12,_0x6e02x14)})};function handleError(_0x6e02x12,_0x6e02x14){console[_0x6e3a[18]](_0x6e02x14);return _0x6e02x12[_0x6e3a[21]](500)[_0x6e3a[20]](_0x6e02x14)} \ No newline at end of file +'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); +} diff --git a/server/api/chat_room/chat_room.events.js b/server/api/chat_room/chat_room.events.js index 5b6273e..b842a41 100644 --- a/server/api/chat_room/chat_room.events.js +++ b/server/api/chat_room/chat_room.events.js @@ -1 +1,36 @@ -var _0x373d=["\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"];_0x373d[0];const EventEmitter=require(_0x373d[1]);const ChatRoom=require(_0x373d[3])[_0x373d[2]];var ChatRoomEvents= new EventEmitter();ChatRoomEvents[_0x373d[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x373d[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x373d[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x373d[6]};for(var e in events){var event=events[e];ChatRoom[_0x373d[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xb2c5x8,_0xb2c5x9,_0xb2c5xa){ChatRoomEvents[_0x373d[10]](event+ _0x373d[8]+ _0xb2c5x8[_0x373d[9]],_0xb2c5x8);ChatRoomEvents[_0x373d[10]](event,_0xb2c5x8);_0xb2c5xa(null)}}module[_0x373d[11]]= ChatRoomEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/chat_room/chat_room.socket.js b/server/api/chat_room/chat_room.socket.js index 5f08653..0f60e68 100644 --- a/server/api/chat_room/chat_room.socket.js +++ b/server/api/chat_room/chat_room.socket.js @@ -1 +1,28 @@ -var _0xc898=["\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"];_0xc898[0];const ChatRoomEvents=require(_0xc898[1]);var events=[_0xc898[2],_0xc898[3]];exports[_0xc898[4]]= function(_0xdc0cx3){for(var _0xdc0cx4=0,_0xdc0cx5=events[_0xc898[5]];_0xdc0cx4< _0xdc0cx5;_0xdc0cx4++){var _0xdc0cx6=events[_0xdc0cx4];var _0xdc0cx7=createListener(_0xc898[6]+ _0xdc0cx6,_0xdc0cx3);ChatRoomEvents[_0xc898[7]](_0xdc0cx6,_0xdc0cx7);_0xdc0cx3[_0xc898[7]](_0xc898[8],removeListener(_0xdc0cx6,_0xdc0cx7))}};function createListener(_0xdc0cx6,_0xdc0cx3){return function(_0xdc0cx9){_0xdc0cx3[_0xc898[9]](_0xdc0cx6,_0xdc0cx9)}}function removeListener(_0xdc0cx6,_0xdc0cx7){return function(){ChatRoomEvents[_0xc898[10]](_0xdc0cx6,_0xdc0cx7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/chat_room/index.js b/server/api/chat_room/index.js index 9b4bdf5..43f0a87 100644 --- a/server/api/chat_room/index.js +++ b/server/api/chat_room/index.js @@ -1 +1,32 @@ -var _0x1fc5=["\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"];_0x1fc5[0];var express=require(_0x1fc5[1]);var controller=require(_0x1fc5[2]);var auth=require(_0x1fc5[3]);var license=require(_0x1fc5[4]);var router=express.Router();router[_0x1fc5[13]](_0x1fc5[5],license[_0x1fc5[6]](),license[_0x1fc5[7]](),auth[_0x1fc5[8]](),auth[_0x1fc5[11]]([8],[_0x1fc5[9],_0x1fc5[10]]),controller[_0x1fc5[12]]);router[_0x1fc5[13]](_0x1fc5[14],license[_0x1fc5[6]](),license[_0x1fc5[7]](),auth[_0x1fc5[8]](),auth[_0x1fc5[11]]([8],[_0x1fc5[9],_0x1fc5[10]]),controller[_0x1fc5[15]]);router[_0x1fc5[13]](_0x1fc5[16],license[_0x1fc5[6]](),license[_0x1fc5[7]](),auth[_0x1fc5[8]](),auth[_0x1fc5[11]]([8],[_0x1fc5[9]]),controller[_0x1fc5[17]]);router[_0x1fc5[13]](_0x1fc5[18],license[_0x1fc5[6]](),license[_0x1fc5[7]](),auth[_0x1fc5[8]](),auth[_0x1fc5[11]]([8],[_0x1fc5[9]]),controller[_0x1fc5[19]]);router[_0x1fc5[13]](_0x1fc5[20],license[_0x1fc5[6]](),license[_0x1fc5[7]](),auth[_0x1fc5[8]](),auth[_0x1fc5[11]]([8],[_0x1fc5[9],_0x1fc5[21],_0x1fc5[10]]),controller[_0x1fc5[22]]);router[_0x1fc5[13]](_0x1fc5[23],license[_0x1fc5[6]](),license[_0x1fc5[7]](),auth[_0x1fc5[8]](),auth[_0x1fc5[11]]([8],[_0x1fc5[9],_0x1fc5[10]]),controller[_0x1fc5[24]]);router[_0x1fc5[13]](_0x1fc5[25],license[_0x1fc5[6]](),license[_0x1fc5[7]](),auth[_0x1fc5[8]](),auth[_0x1fc5[11]]([8],[_0x1fc5[9],_0x1fc5[10]]),controller[_0x1fc5[26]]);router[_0x1fc5[13]](_0x1fc5[27],license[_0x1fc5[6]](),license[_0x1fc5[7]](),auth[_0x1fc5[8]](),auth[_0x1fc5[11]]([8],[_0x1fc5[9],_0x1fc5[10]]),controller[_0x1fc5[28]]);router[_0x1fc5[13]](_0x1fc5[29],license[_0x1fc5[6]](),license[_0x1fc5[7]](),auth[_0x1fc5[8]](),auth[_0x1fc5[11]]([8],[_0x1fc5[9],_0x1fc5[10]]),controller[_0x1fc5[30]]);router[_0x1fc5[13]](_0x1fc5[31],license[_0x1fc5[6]](),license[_0x1fc5[7]](),auth[_0x1fc5[8]](),auth[_0x1fc5[11]]([8],[_0x1fc5[9],_0x1fc5[10]]),controller[_0x1fc5[32]]);router[_0x1fc5[13]](_0x1fc5[33],license[_0x1fc5[6]](),license[_0x1fc5[7]](),auth[_0x1fc5[8]](),auth[_0x1fc5[11]]([8],[_0x1fc5[9],_0x1fc5[10]]),controller[_0x1fc5[34]]);router[_0x1fc5[13]](_0x1fc5[35],license[_0x1fc5[6]](),license[_0x1fc5[7]](),auth[_0x1fc5[8]](),auth[_0x1fc5[11]]([8],[_0x1fc5[9],_0x1fc5[10]]),controller[_0x1fc5[36]]);router[_0x1fc5[13]](_0x1fc5[37],license[_0x1fc5[6]](),license[_0x1fc5[7]](),controller[_0x1fc5[38]]);router[_0x1fc5[40]](_0x1fc5[5],license[_0x1fc5[6]](),license[_0x1fc5[7]](),auth[_0x1fc5[8]](),auth[_0x1fc5[11]]([8],[_0x1fc5[9],_0x1fc5[10]]),controller[_0x1fc5[39]]);router[_0x1fc5[40]](_0x1fc5[41],license[_0x1fc5[6]](),license[_0x1fc5[7]](),auth[_0x1fc5[8]](),auth[_0x1fc5[11]]([8],[_0x1fc5[9],_0x1fc5[10]]),controller[_0x1fc5[42]]);router[_0x1fc5[44]](_0x1fc5[35],license[_0x1fc5[6]](),license[_0x1fc5[7]](),auth[_0x1fc5[8]](),auth[_0x1fc5[11]]([8],[_0x1fc5[9],_0x1fc5[10]]),controller[_0x1fc5[43]]);router[_0x1fc5[46]](_0x1fc5[35],license[_0x1fc5[6]](),license[_0x1fc5[7]](),auth[_0x1fc5[8]](),auth[_0x1fc5[11]]([8],[_0x1fc5[9],_0x1fc5[10]]),controller[_0x1fc5[45]]);router[_0x1fc5[46]](_0x1fc5[47],license[_0x1fc5[6]](),license[_0x1fc5[7]](),auth[_0x1fc5[8]](),auth[_0x1fc5[11]]([8],[_0x1fc5[9],_0x1fc5[10]]),controller[_0x1fc5[48]]);router[_0x1fc5[50]](_0x1fc5[35],license[_0x1fc5[6]](),license[_0x1fc5[7]](),auth[_0x1fc5[8]](),auth[_0x1fc5[11]]([8],[_0x1fc5[9],_0x1fc5[10]]),controller[_0x1fc5[49]]);module[_0x1fc5[51]]= router \ No newline at end of file +'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; diff --git a/server/api/chat_visitor/chat_visitor.controller.js b/server/api/chat_visitor/chat_visitor.controller.js index 2d4d754..38e5d14 100644 --- a/server/api/chat_visitor/chat_visitor.controller.js +++ b/server/api/chat_visitor/chat_visitor.controller.js @@ -1 +1,104 @@ -var _0xc761=["\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"];_0xc761[0];var _=require(_0xc761[1]);var Util=require(_0xc761[2]);var ChatVisitor=require(_0xc761[4])[_0xc761[3]];var ChatEnquiry=require(_0xc761[4])[_0xc761[5]];var ChatWebsite=require(_0xc761[4])[_0xc761[6]];exports[_0xc761[7]]= function(_0x3aa6x6,_0x3aa6x7,_0x3aa6x8){return ChatVisitor[_0xc761[16]](_[_0xc761[15]](Util[_0xc761[14]](_0x3aa6x6[_0xc761[13]]),{include:[{model:ChatWebsite}]}))[_0xc761[12]](function(_0x3aa6xa){_0x3aa6x7[_0xc761[11]](200)[_0xc761[10]](_0x3aa6xa)})[_0xc761[9]](function(_0x3aa6x9){console[_0xc761[8]](_0x3aa6x9);return handleError(_0x3aa6x7,_0x3aa6x9)})};exports[_0xc761[17]]= function(_0x3aa6x6,_0x3aa6x7){return ChatVisitor[_0xc761[21]](_0x3aa6x6[_0xc761[20]][_0xc761[19]],{include:[{model:ChatEnquiry},{model:ChatWebsite}]})[_0xc761[12]](function(_0x3aa6xb){if(!_0x3aa6xb){return _0x3aa6x7[_0xc761[18]](404)};return _0x3aa6x7[_0xc761[10]](_0x3aa6xb)})[_0xc761[9]](function(_0x3aa6x9){return handleError(_0x3aa6x7,_0x3aa6x9)})};exports[_0xc761[22]]= function(_0x3aa6x6,_0x3aa6x7){return ChatVisitor[_0xc761[22]](_0x3aa6x6[_0xc761[23]])[_0xc761[12]](function(_0x3aa6xb){return _0x3aa6x7[_0xc761[11]](201)[_0xc761[10]](_0x3aa6xb)})[_0xc761[9]](function(_0x3aa6x9){return handleError(_0x3aa6x7,_0x3aa6x9)})};exports[_0xc761[24]]= function(_0x3aa6x6,_0x3aa6x7){if(_0x3aa6x6[_0xc761[23]][_0xc761[19]]){delete _0x3aa6x6[_0xc761[23]][_0xc761[19]]};return ChatVisitor[_0xc761[21]](_0x3aa6x6[_0xc761[20]][_0xc761[19]])[_0xc761[12]](function(_0x3aa6xb){if(!_0x3aa6xb){return _0x3aa6x7[_0xc761[18]](404)};var _0x3aa6xc=_[_0xc761[15]](_0x3aa6xb,_0x3aa6x6[_0xc761[23]]);return _0x3aa6xc[_0xc761[25]]()})[_0xc761[12]](function(_0x3aa6xb){return _0x3aa6x7[_0xc761[11]](200)[_0xc761[10]](_0x3aa6xb)})[_0xc761[9]](function(_0x3aa6x9){return handleError(_0x3aa6x7,_0x3aa6x9)})};exports[_0xc761[26]]= function(_0x3aa6x6,_0x3aa6x7){return ChatVisitor[_0xc761[21]](_0x3aa6x6[_0xc761[20]][_0xc761[19]])[_0xc761[12]](function(_0x3aa6xb){if(!_0x3aa6xb){return _0x3aa6x7[_0xc761[18]](404)};return _0x3aa6xb[_0xc761[26]]()})[_0xc761[12]](function(){return _0x3aa6x7[_0xc761[18]](204)})[_0xc761[9]](function(_0x3aa6x9){return handleError(_0x3aa6x7,_0x3aa6x9)})};function handleError(_0x3aa6x7,_0x3aa6x9){return _0x3aa6x7[_0xc761[11]](500)[_0xc761[10]](_0x3aa6x9)} \ No newline at end of file +'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); +} diff --git a/server/api/chat_visitor/chat_visitor.events.js b/server/api/chat_visitor/chat_visitor.events.js index 7345bec..d4c36db 100644 --- a/server/api/chat_visitor/chat_visitor.events.js +++ b/server/api/chat_visitor/chat_visitor.events.js @@ -1 +1,36 @@ -var _0x3349=["\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"];_0x3349[0];const EventEmitter=require(_0x3349[1]);const ChatVisitor=require(_0x3349[3])[_0x3349[2]];var ChatVisitorEvents= new EventEmitter();ChatVisitorEvents[_0x3349[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x3349[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x3349[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x3349[6]};for(var e in events){var event=events[e];ChatVisitor[_0x3349[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xe11cx8,_0xe11cx9,_0xe11cxa){ChatVisitorEvents[_0x3349[10]](event+ _0x3349[8]+ _0xe11cx8[_0x3349[9]],_0xe11cx8);ChatVisitorEvents[_0x3349[10]](event,_0xe11cx8);_0xe11cxa(null)}}module[_0x3349[11]]= ChatVisitorEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/chat_visitor/chat_visitor.socket.js b/server/api/chat_visitor/chat_visitor.socket.js index 146ac72..3a627b1 100644 --- a/server/api/chat_visitor/chat_visitor.socket.js +++ b/server/api/chat_visitor/chat_visitor.socket.js @@ -1 +1,28 @@ -var _0xbf91=["\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"];_0xbf91[0];const ChatVisitorEvents=require(_0xbf91[1]);var events=[_0xbf91[2],_0xbf91[3]];exports[_0xbf91[4]]= function(_0x4fa6x3){for(var _0x4fa6x4=0,_0x4fa6x5=events[_0xbf91[5]];_0x4fa6x4< _0x4fa6x5;_0x4fa6x4++){var _0x4fa6x6=events[_0x4fa6x4];var _0x4fa6x7=createListener(_0xbf91[6]+ _0x4fa6x6,_0x4fa6x3);ChatVisitorEvents[_0xbf91[7]](_0x4fa6x6,_0x4fa6x7);_0x4fa6x3[_0xbf91[7]](_0xbf91[8],removeListener(_0x4fa6x6,_0x4fa6x7))}};function createListener(_0x4fa6x6,_0x4fa6x3){return function(_0x4fa6x9){_0x4fa6x3[_0xbf91[9]](_0x4fa6x6,_0x4fa6x9)}}function removeListener(_0x4fa6x6,_0x4fa6x7){return function(){ChatVisitorEvents[_0xbf91[10]](_0x4fa6x6,_0x4fa6x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/chat_visitor/index.js b/server/api/chat_visitor/index.js index 6385a49..829db71 100644 --- a/server/api/chat_visitor/index.js +++ b/server/api/chat_visitor/index.js @@ -1 +1,17 @@ -var _0xec52=["\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"];_0xec52[0];var express=require(_0xec52[1]);var controller=require(_0xec52[2]);var auth=require(_0xec52[3]);var license=require(_0xec52[4]);var router=express.Router();router[_0xec52[12]](_0xec52[5],license[_0xec52[6]](),license[_0xec52[7]](),auth[_0xec52[8]](),auth[_0xec52[10]]([8],[_0xec52[9]]),controller[_0xec52[11]]);router[_0xec52[12]](_0xec52[13],license[_0xec52[6]](),license[_0xec52[7]](),auth[_0xec52[8]](),auth[_0xec52[10]]([8],[_0xec52[9]]),controller[_0xec52[14]]);router[_0xec52[16]](_0xec52[5],license[_0xec52[6]](),license[_0xec52[7]](),auth[_0xec52[8]](),auth[_0xec52[10]]([8],[_0xec52[9]]),controller[_0xec52[15]]);router[_0xec52[18]](_0xec52[13],license[_0xec52[6]](),license[_0xec52[7]](),auth[_0xec52[8]](),auth[_0xec52[10]]([8],[_0xec52[9]]),controller[_0xec52[17]]);router[_0xec52[20]](_0xec52[13],license[_0xec52[6]](),license[_0xec52[7]](),auth[_0xec52[8]](),auth[_0xec52[10]]([8],[_0xec52[9]]),controller[_0xec52[19]]);module[_0xec52[21]]= router \ No newline at end of file +'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; diff --git a/server/api/chat_website/chat_website.controller.js b/server/api/chat_website/chat_website.controller.js index cd7fafb..16650b7 100644 --- a/server/api/chat_website/chat_website.controller.js +++ b/server/api/chat_website/chat_website.controller.js @@ -1 +1,575 @@ -var _0xb8af=["\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","\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"];_0xb8af[0];var _=require(_0xb8af[1]);var util=require(_0xb8af[2]);var Mustache=require(_0xb8af[3]);var Util=require(_0xb8af[4]);var sequelize=require(_0xb8af[6])[_0xb8af[5]];var ChatWebsite=require(_0xb8af[6])[_0xb8af[7]];var ChatQueue=require(_0xb8af[6])[_0xb8af[8]];var User=require(_0xb8af[6])[_0xb8af[9]];var ChatApplication=require(_0xb8af[6])[_0xb8af[10]];var ChatWebsitesField=require(_0xb8af[6])[_0xb8af[11]];var ChatProactiveAction=require(_0xb8af[6])[_0xb8af[12]];var ChatDisposition=require(_0xb8af[6])[_0xb8af[13]];var snippet=require(_0xb8af[15])[_0xb8af[14]];var UploadFile=require(_0xb8af[16]);var path=require(_0xb8af[17]);var sr=require(_0xb8af[18]);var config=require(_0xb8af[19]);exports[_0xb8af[20]]= function(_0xc71fx12,_0xc71fx13,_0xc71fx14){return ChatWebsite[_0xb8af[27]](Util[_0xb8af[26]](_0xc71fx12[_0xb8af[25]]))[_0xb8af[24]](function(_0xc71fx16){_0xc71fx13[_0xb8af[23]](200)[_0xb8af[22]](_0xc71fx16)})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[28]]= function(_0xc71fx12,_0xc71fx13){return ChatWebsite[_0xb8af[32]](_0xc71fx12[_0xb8af[31]][_0xb8af[30]])[_0xb8af[24]](function(_0xc71fx17){if(!_0xc71fx17){return _0xc71fx13[_0xb8af[29]](404)};return _0xc71fx13[_0xb8af[22]](_0xc71fx17)})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[33]]= function(_0xc71fx12,_0xc71fx13){var _0xc71fx18= new UploadFile({dest:path[_0xb8af[38]](config[_0xb8af[34]],_0xb8af[35],_0xb8af[36],_0xb8af[37]),maxNumberOfFiles:1,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(jpeg|png)$/i,rename:function(_0xc71fx19,_0xc71fx1a){return sr()+ path[_0xb8af[40]](_0xc71fx1a[_0xb8af[39]])},messages:{maxNumberOfFiles:_0xb8af[41],acceptFileTypes:_0xb8af[42],invalidRequest:_0xb8af[43]}});_0xc71fx18[_0xb8af[49]](_0xb8af[44],function(_0xc71fx1b,_0xc71fx1c){if(!_0xc71fx1c[_0xb8af[45]][_0xb8af[39]]){return _0xc71fx13[_0xb8af[23]](500)[_0xb8af[22]](_0xc71fx18)};return sequelize[_0xb8af[48]](function(_0xc71fx1d){return ChatWebsite[_0xb8af[32]](_0xc71fx12[_0xb8af[31]][_0xb8af[30]])[_0xb8af[24]](function(_0xc71fx1f){if(!_0xc71fx1f){return _0xc71fx13[_0xb8af[29]](404)};var _0xc71fx20={};_0xc71fx20[_0xb8af[46]]= _0xc71fx1c[_0xb8af[45]][_0xb8af[39]];return _0xc71fx1f[_0xb8af[47]](_0xc71fx20,{transaction:_0xc71fx1d})})[_0xb8af[24]](function(_0xc71fx1e){return _0xc71fx13[_0xb8af[23]](200)[_0xb8af[22]](_0xc71fx1e)})})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})});_0xc71fx18[_0xb8af[49]](_0xb8af[50],function(_0xc71fx15){console[_0xb8af[52]](_0xb8af[51],_0xc71fx15);return handleError(_0xc71fx13,_0xc71fx15)});_0xc71fx18[_0xb8af[53]](_0xc71fx12)};exports[_0xb8af[54]]= function(_0xc71fx12,_0xc71fx13,_0xc71fx14){return ChatWebsite[_0xb8af[32]](_0xc71fx12[_0xb8af[31]][_0xb8af[30]])[_0xb8af[24]](function(_0xc71fx17){if(!_0xc71fx17){return _0xc71fx13[_0xb8af[29]](404)};return _0xc71fx17[_0xb8af[56]]()})[_0xb8af[24]](function(_0xc71fx21){return _0xc71fx13[_0xb8af[23]](200)[_0xb8af[22]]({rows:_0xc71fx21,count:_0xc71fx21[_0xb8af[55]]})})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[57]]= function(_0xc71fx12,_0xc71fx13,_0xc71fx14){_0xc71fx12[_0xb8af[59]][_0xb8af[58]]= _0xc71fx12[_0xb8af[31]][_0xb8af[30]];return ChatDisposition[_0xb8af[60]](_0xc71fx12[_0xb8af[59]])[_0xb8af[24]](function(_0xc71fx22){return _0xc71fx13[_0xb8af[23]](201)[_0xb8af[22]](_0xc71fx22)})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[61]]= function(_0xc71fx12,_0xc71fx13){if(_0xc71fx12[_0xb8af[59]][_0xb8af[30]]){delete _0xc71fx12[_0xb8af[59]][_0xb8af[30]]};return ChatDisposition[_0xb8af[32]](_0xc71fx12[_0xb8af[31]][_0xb8af[64]])[_0xb8af[24]](function(_0xc71fx22){if(!_0xc71fx22){return _0xc71fx13[_0xb8af[29]](404)};var _0xc71fx23=_[_0xb8af[62]](_0xc71fx22,_0xc71fx12[_0xb8af[59]]);return _0xc71fx23[_0xb8af[63]]()})[_0xb8af[24]](function(_0xc71fx17){return _0xc71fx13[_0xb8af[23]](200)[_0xb8af[22]](_0xc71fx17)})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[65]]= function(_0xc71fx12,_0xc71fx13,_0xc71fx14){return ChatDisposition[_0xb8af[32]](_0xc71fx12[_0xb8af[31]][_0xb8af[64]])[_0xb8af[24]](function(_0xc71fx24){if(!_0xc71fx24){return _0xc71fx13[_0xb8af[29]](404)};return _0xc71fx24[_0xb8af[66]]()})[_0xb8af[24]](function(){return _0xc71fx13[_0xb8af[29]](204)})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[67]]= function(_0xc71fx12,_0xc71fx13,_0xc71fx14){return ChatWebsite[_0xb8af[32]](_0xc71fx12[_0xb8af[31]][_0xb8af[30]])[_0xb8af[24]](function(_0xc71fx26){if(!_0xc71fx26){return _0xc71fx13[_0xb8af[29]](404)};return _0xc71fx26[_0xb8af[69]](_[_0xb8af[62]](Util[_0xb8af[26]](_0xc71fx12[_0xb8af[25]]),{include:[{model:ChatQueue,attributes:[_0xb8af[30],_0xb8af[68]]},{model:User,attributes:[_0xb8af[30],_0xb8af[68]]}]}))})[_0xb8af[24]](function(_0xc71fx25){return _0xc71fx13[_0xb8af[22]]({count:_0xc71fx25[_0xb8af[55]],rows:_0xc71fx25})})[_0xb8af[21]](function(_0xc71fx15){console[_0xb8af[52]](_0xc71fx15);return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[70]]= function(_0xc71fx12,_0xc71fx13,_0xc71fx14){return ChatWebsite[_0xb8af[32]](_0xc71fx12[_0xb8af[31]][_0xb8af[30]])[_0xb8af[24]](function(_0xc71fx26){if(!_0xc71fx26){return _0xc71fx13[_0xb8af[29]](404)};return _0xc71fx26[_0xb8af[71]](Util[_0xb8af[26]](_0xc71fx12[_0xb8af[25]]))})[_0xb8af[24]](function(_0xc71fx27){return _0xc71fx13[_0xb8af[22]]({count:_0xc71fx27[_0xb8af[55]],rows:_0xc71fx27})})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[72]]= function(_0xc71fx12,_0xc71fx13){return ChatWebsite[_0xb8af[32]](_0xc71fx12[_0xb8af[31]][_0xb8af[30]])[_0xb8af[24]](function(_0xc71fx17){var _0xc71fx28={remote:_0xc71fx17[_0xb8af[73]],websiteId:_0xc71fx12[_0xb8af[31]][_0xb8af[30]]};var _0xc71fx29=Mustache[_0xb8af[74]](snippet,_0xc71fx28);return _0xc71fx13[_0xb8af[23]](200)[_0xb8af[22]]({html:_0xc71fx29})})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[60]]= function(_0xc71fx12,_0xc71fx13){return ChatWebsite[_0xb8af[60]](_0xc71fx12[_0xb8af[59]])[_0xb8af[24]](function(_0xc71fx17){return _0xc71fx13[_0xb8af[23]](201)[_0xb8af[22]](_0xc71fx17)})[_0xb8af[21]](function(_0xc71fx15){console[_0xb8af[52]](_0xc71fx15);return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[47]]= function(_0xc71fx12,_0xc71fx13){if(_0xc71fx12[_0xb8af[59]][_0xb8af[30]]){delete _0xc71fx12[_0xb8af[59]][_0xb8af[30]]};return ChatWebsite[_0xb8af[32]](_0xc71fx12[_0xb8af[31]][_0xb8af[30]])[_0xb8af[24]](function(_0xc71fx17){if(!_0xc71fx17){return _0xc71fx13[_0xb8af[29]](404)};return _0xc71fx17[_0xb8af[47]](_0xc71fx12[_0xb8af[59]])})[_0xb8af[24]](function(_0xc71fx17){return _0xc71fx13[_0xb8af[23]](200)[_0xb8af[22]](_0xc71fx17)})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[75]]= function(_0xc71fx12,_0xc71fx13){var _0xc71fx2a=0;var _0xc71fx2b=_0xc71fx12[_0xb8af[59]];_0xc71fx2b[_0xb8af[79]](function(_0xc71fx2c){delete _0xc71fx2c[_0xb8af[30]];delete _0xc71fx2c[_0xb8af[76]];delete _0xc71fx2c[_0xb8af[77]];_0xc71fx2c[_0xb8af[78]]= ++_0xc71fx2a});return sequelize[_0xb8af[48]](function(_0xc71fx1d){return ChatApplication[_0xb8af[66]]({where:{ChatWebsiteId:_0xc71fx12[_0xb8af[31]][_0xb8af[30]]},individualHooks:true,transaction:_0xc71fx1d})[_0xb8af[24]](function(){return ChatApplication[_0xb8af[80]](_0xc71fx2b,{individualHooks:true,transaction:_0xc71fx1d})})})[_0xb8af[24]](function(_0xc71fx25){return _0xc71fx13[_0xb8af[23]](200)[_0xb8af[22]]({count:_0xc71fx25[_0xb8af[55]],rows:_0xc71fx25})})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[66]]= function(_0xc71fx12,_0xc71fx13){return ChatWebsite[_0xb8af[32]](_0xc71fx12[_0xb8af[31]][_0xb8af[30]])[_0xb8af[24]](function(_0xc71fx17){if(!_0xc71fx17){return _0xc71fx13[_0xb8af[29]](404)};return _0xc71fx17[_0xb8af[66]]()})[_0xb8af[24]](function(){return _0xc71fx13[_0xb8af[29]](204)})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[81]]= function(_0xc71fx12,_0xc71fx13){return ChatWebsite[_0xb8af[66]]({where:{id:_0xc71fx12[_0xb8af[25]][_0xb8af[82]]},individualHooks:true})[_0xb8af[24]](function(){return _0xc71fx13[_0xb8af[29]](204)})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[83]]= function(_0xc71fx12,_0xc71fx13){return ChatApplication[_0xb8af[66]]({where:{id:_0xc71fx12[_0xb8af[25]][_0xb8af[84]]},individualHooks:true})[_0xb8af[24]](function(){return _0xc71fx13[_0xb8af[29]](204)})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[85]]= function(_0xc71fx12,_0xc71fx13,_0xc71fx14){return ChatApplication[_0xb8af[32]](_0xc71fx12[_0xb8af[31]][_0xb8af[86]])[_0xb8af[24]](function(_0xc71fx2d){if(!_0xc71fx2d){return _0xc71fx13[_0xb8af[29]](404)};return _0xc71fx2d[_0xb8af[66]]()})[_0xb8af[24]](function(){return _0xc71fx13[_0xb8af[29]](204)})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[87]]= function(_0xc71fx12,_0xc71fx13){return ChatWebsitesField[_0xb8af[91]]({method:[_0xc71fx12[_0xb8af[31]][_0xb8af[90]],_0xc71fx12[_0xb8af[31]][_0xb8af[30]]]})[_0xb8af[89]]()[_0xb8af[24]](function(_0xc71fx2e){return _0xc71fx13[_0xb8af[23]](200)[_0xb8af[88]](_0xc71fx2e)})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[92]]= function(_0xc71fx12,_0xc71fx13,_0xc71fx14){return ChatWebsitesField[_0xb8af[66]]({where:_0xc71fx12[_0xb8af[31]][_0xb8af[90]]=== _0xb8af[93]?{OnlineId:_0xc71fx12[_0xb8af[31]][_0xb8af[30]]}:{OfflineId:_0xc71fx12[_0xb8af[31]][_0xb8af[30]]}})[_0xb8af[24]](function(){_[_0xb8af[79]](_0xc71fx12[_0xb8af[59]],function(_0xc71fx2f){if(_0xc71fx12[_0xb8af[31]][_0xb8af[90]]=== _0xb8af[93]){_0xc71fx2f[_0xb8af[94]]= _0xc71fx12[_0xb8af[31]][_0xb8af[30]]}else {if(_0xc71fx12[_0xb8af[31]][_0xb8af[90]]=== _0xb8af[95]){_0xc71fx2f[_0xb8af[96]]= _0xc71fx12[_0xb8af[31]][_0xb8af[30]]}}});return ChatWebsitesField[_0xb8af[80]](_0xc71fx12[_0xb8af[59]])})[_0xb8af[24]](function(_0xc71fx1b){_0xc71fx13[_0xb8af[23]](201)[_0xb8af[88]](_0xc71fx1b)})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[97]]= function(_0xc71fx12,_0xc71fx13){return ChatProactiveAction[_0xb8af[66]]({where:{id:_0xc71fx12[_0xb8af[25]][_0xb8af[84]]},individualHooks:true})[_0xb8af[24]](function(){return _0xc71fx13[_0xb8af[29]](204)})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[98]]= function(_0xc71fx12,_0xc71fx13,_0xc71fx14){return ChatProactiveAction[_0xb8af[32]](_0xc71fx12[_0xb8af[31]][_0xb8af[99]])[_0xb8af[24]](function(_0xc71fx30){if(!_0xc71fx30){return _0xc71fx13[_0xb8af[29]](404)};return _0xc71fx30[_0xb8af[66]]()})[_0xb8af[24]](function(){return _0xc71fx13[_0xb8af[29]](204)})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[100]]= function(_0xc71fx12,_0xc71fx13,_0xc71fx14){return ChatWebsite[_0xb8af[32]](_0xc71fx12[_0xb8af[31]][_0xb8af[30]])[_0xb8af[24]](function(_0xc71fx26){if(!_0xc71fx26){return _0xc71fx13[_0xb8af[29]](404)};_0xc71fx12[_0xb8af[59]][_0xb8af[58]]= _0xc71fx26[_0xb8af[30]];return ChatProactiveAction[_0xb8af[60]](_0xc71fx12[_0xb8af[59]])})[_0xb8af[24]](function(_0xc71fx30){return _0xc71fx13[_0xb8af[23]](201)[_0xb8af[22]](_0xc71fx30)})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[101]]= function(_0xc71fx12,_0xc71fx13){if(_0xc71fx12[_0xb8af[59]][_0xb8af[30]]){delete _0xc71fx12[_0xb8af[59]][_0xb8af[30]]};return ChatProactiveAction[_0xb8af[32]](_0xc71fx12[_0xb8af[31]][_0xb8af[99]])[_0xb8af[24]](function(_0xc71fx30){if(!_0xc71fx30){return _0xc71fx13[_0xb8af[29]](404)};return _0xc71fx30[_0xb8af[47]](_0xc71fx12[_0xb8af[59]])})[_0xb8af[24]](function(_0xc71fx30){return _0xc71fx13[_0xb8af[23]](200)[_0xb8af[22]](_0xc71fx30)})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};function handleError(_0xc71fx13,_0xc71fx15){return _0xc71fx13[_0xb8af[23]](500)[_0xb8af[22]](_0xc71fx15)}exports[_0xb8af[102]]= function(_0xc71fx12,_0xc71fx13,_0xc71fx14){return ChatApplication[_0xb8af[103]](_0xb8af[78],{where:{ChatWebsiteId:_0xc71fx12[_0xb8af[31]][_0xb8af[30]]}})[_0xb8af[24]](function(_0xc71fx32){_0xc71fx12[_0xb8af[59]][_0xb8af[78]]= _0xc71fx32?++_0xc71fx32:1;_0xc71fx12[_0xb8af[59]][_0xb8af[58]]= _0xc71fx12[_0xb8af[31]][_0xb8af[30]];return ChatApplication[_0xb8af[60]](_0xc71fx12[_0xb8af[59]])})[_0xb8af[24]](function(_0xc71fx2d){return _0xc71fx13[_0xb8af[23]](201)[_0xb8af[22]](_0xc71fx2d)})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[104]]= function(_0xc71fx12,_0xc71fx13){if(_0xc71fx12[_0xb8af[59]][_0xb8af[30]]){delete _0xc71fx12[_0xb8af[59]][_0xb8af[30]]};return ChatApplication[_0xb8af[32]](_0xc71fx12[_0xb8af[31]][_0xb8af[86]])[_0xb8af[24]](function(_0xc71fx2d){if(!_0xc71fx2d){return _0xc71fx13[_0xb8af[29]](404)};return _0xc71fx2d[_0xb8af[47]](_0xc71fx12[_0xb8af[59]])})[_0xb8af[24]](function(_0xc71fx2d){return _0xc71fx13[_0xb8af[23]](200)[_0xb8af[22]](_0xc71fx2d)})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})};exports[_0xb8af[105]]= function(_0xc71fx12,_0xc71fx13){return ChatApplication[_0xb8af[32]](_0xc71fx12[_0xb8af[31]][_0xb8af[86]],{include:[{all:true}]})[_0xb8af[24]](function(_0xc71fx2d){if(!_0xc71fx2d){return _0xc71fx13[_0xb8af[29]](404)};return _0xc71fx13[_0xb8af[22]](_0xc71fx2d)})[_0xb8af[21]](function(_0xc71fx15){return handleError(_0xc71fx13,_0xc71fx15)})} \ No newline at end of file +'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 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'] + }] + })); + }) + .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); + }); +} diff --git a/server/api/chat_website/chat_website.events.js b/server/api/chat_website/chat_website.events.js index 81d9cb0..f910de1 100644 --- a/server/api/chat_website/chat_website.events.js +++ b/server/api/chat_website/chat_website.events.js @@ -1 +1,36 @@ -var _0x4ce8=["\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"];_0x4ce8[0];const EventEmitter=require(_0x4ce8[1]);const ChatWebsite=require(_0x4ce8[3])[_0x4ce8[2]];var ChatWebsiteEvents= new EventEmitter();ChatWebsiteEvents[_0x4ce8[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x4ce8[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x4ce8[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x4ce8[6]};for(var e in events){var event=events[e];ChatWebsite[_0x4ce8[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x21d0x8,_0x21d0x9,_0x21d0xa){ChatWebsiteEvents[_0x4ce8[10]](event+ _0x4ce8[8]+ _0x21d0x8[_0x4ce8[9]],_0x21d0x8);ChatWebsiteEvents[_0x4ce8[10]](event,_0x21d0x8);_0x21d0xa(null)}}module[_0x4ce8[11]]= ChatWebsiteEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/chat_website/chat_website.socket.js b/server/api/chat_website/chat_website.socket.js index c4f16c9..5200183 100644 --- a/server/api/chat_website/chat_website.socket.js +++ b/server/api/chat_website/chat_website.socket.js @@ -1 +1,28 @@ -var _0x6477=["\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"];_0x6477[0];const ChatWebsiteEvents=require(_0x6477[1]);var events=[_0x6477[2],_0x6477[3]];exports[_0x6477[4]]= function(_0x601ex3){for(var _0x601ex4=0,_0x601ex5=events[_0x6477[5]];_0x601ex4< _0x601ex5;_0x601ex4++){var _0x601ex6=events[_0x601ex4];var _0x601ex7=createListener(_0x6477[6]+ _0x601ex6,_0x601ex3);ChatWebsiteEvents[_0x6477[7]](_0x601ex6,_0x601ex7);_0x601ex3[_0x6477[7]](_0x6477[8],removeListener(_0x601ex6,_0x601ex7))}};function createListener(_0x601ex6,_0x601ex3){return function(_0x601ex9){_0x601ex3[_0x6477[9]](_0x601ex6,_0x601ex9)}}function removeListener(_0x601ex6,_0x601ex7){return function(){ChatWebsiteEvents[_0x6477[10]](_0x601ex6,_0x601ex7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/chat_website/index.js b/server/api/chat_website/index.js index 003dda2..a197f8f 100644 --- a/server/api/chat_website/index.js +++ b/server/api/chat_website/index.js @@ -1 +1,40 @@ -var _0x16ed=["\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"];_0x16ed[0];var express=require(_0x16ed[1]);var controller=require(_0x16ed[2]);var auth=require(_0x16ed[3]);var license=require(_0x16ed[4]);var router=express.Router();router[_0x16ed[12]](_0x16ed[5],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[11]]);router[_0x16ed[12]](_0x16ed[13],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9],_0x16ed[14]]),controller[_0x16ed[15]]);router[_0x16ed[12]](_0x16ed[16],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[17]]);router[_0x16ed[12]](_0x16ed[18],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[19]]);router[_0x16ed[12]](_0x16ed[20],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9],_0x16ed[14]]),controller[_0x16ed[21]]);router[_0x16ed[12]](_0x16ed[22],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[23]]);router[_0x16ed[12]](_0x16ed[24],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[25]]);router[_0x16ed[12]](_0x16ed[26],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[27]]);router[_0x16ed[29]](_0x16ed[5],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[28]]);router[_0x16ed[29]](_0x16ed[16],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[30]]);router[_0x16ed[29]](_0x16ed[20],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[31]]);router[_0x16ed[29]](_0x16ed[22],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[32]]);router[_0x16ed[29]](_0x16ed[33],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[34]]);router[_0x16ed[36]](_0x16ed[13],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[35]]);router[_0x16ed[36]](_0x16ed[16],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[37]]);router[_0x16ed[36]](_0x16ed[18],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[38]]);router[_0x16ed[36]](_0x16ed[39],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[40]]);router[_0x16ed[36]](_0x16ed[41],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[42]]);router[_0x16ed[36]](_0x16ed[24],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[43]]);router[_0x16ed[44]](_0x16ed[13],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[35]]);router[_0x16ed[46]](_0x16ed[5],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[45]]);router[_0x16ed[46]](_0x16ed[13],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[47]]);router[_0x16ed[46]](_0x16ed[16],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[48]]);router[_0x16ed[46]](_0x16ed[22],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[49]]);router[_0x16ed[46]](_0x16ed[18],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[50]]);router[_0x16ed[46]](_0x16ed[41],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[51]]);router[_0x16ed[46]](_0x16ed[39],license[_0x16ed[6]](),license[_0x16ed[7]](),auth[_0x16ed[8]](),auth[_0x16ed[10]]([8],[_0x16ed[9]]),controller[_0x16ed[52]]);module[_0x16ed[53]]= router \ No newline at end of file +'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; 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 c234078..78c9c47 100644 --- a/server/api/chat_websites_field/chat_websites_field.controller.js +++ b/server/api/chat_websites_field/chat_websites_field.controller.js @@ -1 +1,112 @@ -var _0xbba5=["\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"];_0xbba5[0];var _=require(_0xbba5[1]);var Util=require(_0xbba5[2]);var ChatWebsitesField=require(_0xbba5[4])[_0xbba5[3]];function handleError(_0x1259x5,_0x1259x6){_0x1259x6= _0x1259x6|| 500;return function(_0x1259x7){_0x1259x5[_0xbba5[6]](_0x1259x6)[_0xbba5[5]](_0x1259x7)}}function responseWithResult(_0x1259x5,_0x1259x6){_0x1259x6= _0x1259x6|| 200;return function(_0x1259x9){if(_0x1259x9){_0x1259x5[_0xbba5[6]](_0x1259x6)[_0xbba5[7]](_0x1259x9)}}}function responseWithoutResult(_0x1259x5,_0x1259x6){_0x1259x6= _0x1259x6|| 204;return function(){_0x1259x5[_0xbba5[8]](_0x1259x6)}}function handleEntityNotFound(_0x1259x5){return function(_0x1259x9){if(!_0x1259x9){_0x1259x5[_0xbba5[6]](404)[_0xbba5[9]]();return null};return _0x1259x9}}function saveUpdates(_0x1259xd){return function(_0x1259x9){return _0x1259x9[_0xbba5[11]](_0x1259xd)[_0xbba5[10]](function(_0x1259xe){return _0x1259xe})}}function removeEntity(_0x1259x5){return function(_0x1259x9){if(_0x1259x9){return _0x1259x9[_0xbba5[12]]()[_0xbba5[10]](function(){_0x1259x5[_0xbba5[6]](204)[_0xbba5[9]]()})}}}exports[_0xbba5[13]]= function(_0x1259x10,_0x1259x5){return ChatWebsitesField[_0xbba5[17]](Util[_0xbba5[16]](_0x1259x10[_0xbba5[15]]))[_0xbba5[10]](responseWithResult(_0x1259x5))[_0xbba5[14]](handleError(_0x1259x5))};exports[_0xbba5[18]]= function(_0x1259x10,_0x1259x5){return ChatWebsitesField[_0xbba5[21]](_0x1259x10[_0xbba5[20]][_0xbba5[19]])[_0xbba5[10]](handleEntityNotFound(_0x1259x5))[_0xbba5[10]](responseWithResult(_0x1259x5))[_0xbba5[14]](handleError(_0x1259x5))};exports[_0xbba5[22]]= function(_0x1259x10,_0x1259x5){return ChatWebsitesField[_0xbba5[22]](_0x1259x10[_0xbba5[23]])[_0xbba5[10]](responseWithResult(_0x1259x5,201))[_0xbba5[14]](handleError(_0x1259x5))};exports[_0xbba5[24]]= function(_0x1259x10,_0x1259x5){if(_0x1259x10[_0xbba5[23]][_0xbba5[19]]){delete _0x1259x10[_0xbba5[23]][_0xbba5[19]]};return ChatWebsitesField[_0xbba5[21]](_0x1259x10[_0xbba5[20]][_0xbba5[19]])[_0xbba5[10]](handleEntityNotFound(_0x1259x5))[_0xbba5[10]](saveUpdates(_0x1259x10[_0xbba5[23]]))[_0xbba5[10]](responseWithResult(_0x1259x5))[_0xbba5[14]](handleError(_0x1259x5))};exports[_0xbba5[12]]= function(_0x1259x10,_0x1259x5){return ChatWebsitesField[_0xbba5[21]](_0x1259x10[_0xbba5[20]][_0xbba5[19]])[_0xbba5[10]](handleEntityNotFound(_0x1259x5))[_0xbba5[10]](removeEntity(_0x1259x5))[_0xbba5[14]](handleError(_0x1259x5))} \ No newline at end of file +/** + * 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)); +} 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 d9e5a57..44c852c 100644 --- a/server/api/chat_websites_field/chat_websites_field.events.js +++ b/server/api/chat_websites_field/chat_websites_field.events.js @@ -1 +1,36 @@ -var _0x80e6=["\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"];_0x80e6[0];const EventEmitter=require(_0x80e6[1]);const ChatWebsitesField=require(_0x80e6[3])[_0x80e6[2]];var ChatWebsitesFieldEvents= new EventEmitter();ChatWebsitesFieldEvents[_0x80e6[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x80e6[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x80e6[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x80e6[6]};for(var e in events){var event=events[e];ChatWebsitesField[_0x80e6[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xb38ax8,_0xb38ax9,_0xb38axa){ChatWebsitesFieldEvents[_0x80e6[10]](event+ _0x80e6[8]+ _0xb38ax8[_0x80e6[9]],_0xb38ax8);ChatWebsitesFieldEvents[_0x80e6[10]](event,_0xb38ax8);_0xb38axa(null)}}module[_0x80e6[11]]= ChatWebsitesFieldEvents \ No newline at end of file +/** + * 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; 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 6df8e35..8232b06 100644 --- a/server/api/chat_websites_field/chat_websites_field.socket.js +++ b/server/api/chat_websites_field/chat_websites_field.socket.js @@ -1 +1,28 @@ -var _0x4064=["\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"];_0x4064[0];const ChatWebsitesFieldEvents=require(_0x4064[1]);var events=[_0x4064[2],_0x4064[3]];exports[_0x4064[4]]= function(_0xb3f3x3){for(var _0xb3f3x4=0,_0xb3f3x5=events[_0x4064[5]];_0xb3f3x4< _0xb3f3x5;_0xb3f3x4++){var _0xb3f3x6=events[_0xb3f3x4];var _0xb3f3x7=createListener(_0x4064[6]+ _0xb3f3x6,_0xb3f3x3);ChatWebsitesFieldEvents[_0x4064[7]](_0xb3f3x6,_0xb3f3x7);_0xb3f3x3[_0x4064[7]](_0x4064[8],removeListener(_0xb3f3x6,_0xb3f3x7))}};function createListener(_0xb3f3x6,_0xb3f3x3){return function(_0xb3f3x9){_0xb3f3x3[_0x4064[9]](_0xb3f3x6,_0xb3f3x9)}}function removeListener(_0xb3f3x6,_0xb3f3x7){return function(){ChatWebsitesFieldEvents[_0x4064[10]](_0xb3f3x6,_0xb3f3x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/chat_websites_field/index.js b/server/api/chat_websites_field/index.js index 53b6c28..c525bbb 100644 --- a/server/api/chat_websites_field/index.js +++ b/server/api/chat_websites_field/index.js @@ -1 +1,18 @@ -var _0x3c4d=["\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"];_0x3c4d[0];var express=require(_0x3c4d[1]);var auth=require(_0x3c4d[2]);var controller=require(_0x3c4d[3]);var license=require(_0x3c4d[4]);var router=express.Router();router[_0x3c4d[12]](_0x3c4d[5],license[_0x3c4d[6]](),license[_0x3c4d[7]](),auth[_0x3c4d[8]](),auth[_0x3c4d[10]]([8],[_0x3c4d[9]]),controller[_0x3c4d[11]]);router[_0x3c4d[12]](_0x3c4d[13],license[_0x3c4d[6]](),license[_0x3c4d[7]](),auth[_0x3c4d[8]](),auth[_0x3c4d[10]]([8],[_0x3c4d[9]]),controller[_0x3c4d[14]]);router[_0x3c4d[16]](_0x3c4d[5],license[_0x3c4d[6]](),license[_0x3c4d[7]](),auth[_0x3c4d[8]](),auth[_0x3c4d[10]]([8],[_0x3c4d[9]]),controller[_0x3c4d[15]]);router[_0x3c4d[18]](_0x3c4d[13],license[_0x3c4d[6]](),license[_0x3c4d[7]](),auth[_0x3c4d[8]](),auth[_0x3c4d[10]]([8],[_0x3c4d[9]]),controller[_0x3c4d[17]]);router[_0x3c4d[19]](_0x3c4d[13],license[_0x3c4d[6]](),license[_0x3c4d[7]](),auth[_0x3c4d[8]](),auth[_0x3c4d[10]]([8],[_0x3c4d[9]]),controller[_0x3c4d[17]]);router[_0x3c4d[21]](_0x3c4d[13],license[_0x3c4d[6]](),license[_0x3c4d[7]](),auth[_0x3c4d[8]](),auth[_0x3c4d[10]]([8],[_0x3c4d[9]]),controller[_0x3c4d[20]]);module[_0x3c4d[22]]= router \ No newline at end of file +'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; diff --git a/server/api/company/company.controller.js b/server/api/company/company.controller.js index a873fd5..a20f981 100644 --- a/server/api/company/company.controller.js +++ b/server/api/company/company.controller.js @@ -1 +1,146 @@ -var _0xa528=["\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"];_0xa528[0];var _=require(_0xa528[1]);var Company=require(_0xa528[3])[_0xa528[2]];var util=require(_0xa528[4]);var Util=require(_0xa528[5]);exports[_0xa528[6]]= function(_0x3b72x5,_0x3b72x6,_0x3b72x7){return Company[_0xa528[13]](Util[_0xa528[12]](_0x3b72x5[_0xa528[11]]))[_0xa528[10]](function(_0x3b72x9){_0x3b72x6[_0xa528[9]](200)[_0xa528[8]](_0x3b72x9)})[_0xa528[7]](function(_0x3b72x8){return handleError(_0x3b72x6,_0x3b72x8)})};exports[_0xa528[14]]= function(_0x3b72x5,_0x3b72x6){return Company[_0xa528[18]]({where:{name:_0x3b72x5[_0xa528[17]][_0xa528[16]]}})[_0xa528[10]](function(_0x3b72xa){if(!_0x3b72xa){return _0x3b72x6[_0xa528[15]](404)};return _0x3b72x6[_0xa528[8]](_0x3b72xa)})[_0xa528[7]](function(_0x3b72x8){return handleError(_0x3b72x6,_0x3b72x8)})};exports[_0xa528[19]]= function(_0x3b72x5,_0x3b72x6){return Company[_0xa528[22]](_0x3b72x5[_0xa528[21]][_0xa528[20]])[_0xa528[10]](function(_0x3b72xb){if(!_0x3b72xb){return _0x3b72x6[_0xa528[15]](404)};return _0x3b72x6[_0xa528[8]](_0x3b72xb)})[_0xa528[7]](function(_0x3b72x8){return handleError(_0x3b72x6,_0x3b72x8)})};exports[_0xa528[23]]= function(_0x3b72x5,_0x3b72x6){return Company[_0xa528[23]](_0x3b72x5[_0xa528[17]])[_0xa528[10]](function(_0x3b72xb){return _0x3b72x6[_0xa528[9]](201)[_0xa528[8]](_0x3b72xb)})[_0xa528[7]](function(_0x3b72x8){return handleError(_0x3b72x6,_0x3b72x8)})};exports[_0xa528[24]]= function(_0x3b72x5,_0x3b72x6){return Company[_0xa528[18]]({where:{name:_0x3b72x5[_0xa528[17]][_0xa528[16]],id:{$ne:_0x3b72x5[_0xa528[17]][_0xa528[20]]}}})[_0xa528[10]](function(_0x3b72xa){if(!_0x3b72xa){return _0x3b72x6[_0xa528[15]](404)};if(_0x3b72xa[_0xa528[27]]> 0){return _0x3b72x6[_0xa528[9]](500)[_0xa528[8]]({message:_0xa528[28]})};if(_0x3b72x5[_0xa528[17]][_0xa528[20]]){delete _0x3b72x5[_0xa528[17]][_0xa528[20]]};return Company[_0xa528[29]]({where:{id:_0x3b72x5[_0xa528[21]][_0xa528[20]]}})})[_0xa528[10]](function(_0x3b72xb){if(!_0x3b72xb){return _0x3b72x6[_0xa528[15]](404)};var _0x3b72xc=_[_0xa528[25]](_0x3b72xb,_0x3b72x5[_0xa528[17]]);return _0x3b72xc[_0xa528[26]]()})[_0xa528[10]](function(_0x3b72xb){return _0x3b72x6[_0xa528[9]](200)[_0xa528[8]](_0x3b72xb)})[_0xa528[7]](function(_0x3b72x8){return handleError(_0x3b72x6,_0x3b72x8)})};exports[_0xa528[30]]= function(_0x3b72x5,_0x3b72x6){return Company[_0xa528[22]](_0x3b72x5[_0xa528[21]][_0xa528[20]])[_0xa528[10]](function(_0x3b72xb){if(!_0x3b72xb){return _0x3b72x6[_0xa528[15]](404)};return _0x3b72xb[_0xa528[30]]()})[_0xa528[10]](function(){return _0x3b72x6[_0xa528[15]](204)})[_0xa528[7]](function(_0x3b72x8){return handleError(_0x3b72x6,_0x3b72x8)})};exports[_0xa528[31]]= function(_0x3b72x5,_0x3b72x6){return Company[_0xa528[30]]({where:{id:_0x3b72x5[_0xa528[11]][_0xa528[32]]},individualHooks:true})[_0xa528[10]](function(){return _0x3b72x6[_0xa528[15]](204)})[_0xa528[7]](function(_0x3b72x8){return handleError(_0x3b72x6,_0x3b72x8)})};function handleError(_0x3b72x6,_0x3b72x8){return _0x3b72x6[_0xa528[9]](500)[_0xa528[8]](_0x3b72x8)} \ No newline at end of file +'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); +} diff --git a/server/api/company/company.events.js b/server/api/company/company.events.js index d7a5a69..b232d0d 100644 --- a/server/api/company/company.events.js +++ b/server/api/company/company.events.js @@ -1 +1,36 @@ -var _0x7638=["\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"];_0x7638[0];const EventEmitter=require(_0x7638[1]);const Company=require(_0x7638[3])[_0x7638[2]];var CompanyEvents= new EventEmitter();CompanyEvents[_0x7638[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x7638[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x7638[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x7638[6]};for(var e in events){var event=events[e];Company[_0x7638[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6b7ax8,_0x6b7ax9,_0x6b7axa){CompanyEvents[_0x7638[10]](event+ _0x7638[8]+ _0x6b7ax8[_0x7638[9]],_0x6b7ax8);CompanyEvents[_0x7638[10]](event,_0x6b7ax8);_0x6b7axa(null)}}module[_0x7638[11]]= CompanyEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/company/company.socket.js b/server/api/company/company.socket.js index d6c32ed..5fb7808 100644 --- a/server/api/company/company.socket.js +++ b/server/api/company/company.socket.js @@ -1 +1,28 @@ -var _0x1426=["\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"];_0x1426[0];const CompanyEvents=require(_0x1426[1]);var events=[_0x1426[2],_0x1426[3]];exports[_0x1426[4]]= function(_0x5f1cx3){for(var _0x5f1cx4=0,_0x5f1cx5=events[_0x1426[5]];_0x5f1cx4< _0x5f1cx5;_0x5f1cx4++){var _0x5f1cx6=events[_0x5f1cx4];var _0x5f1cx7=createListener(_0x1426[6]+ _0x5f1cx6,_0x5f1cx3);CompanyEvents[_0x1426[7]](_0x5f1cx6,_0x5f1cx7);_0x5f1cx3[_0x1426[7]](_0x1426[8],removeListener(_0x5f1cx6,_0x5f1cx7))}};function createListener(_0x5f1cx6,_0x5f1cx3){return function(_0x5f1cx9){_0x5f1cx3[_0x1426[9]](_0x5f1cx6,_0x5f1cx9)}}function removeListener(_0x5f1cx6,_0x5f1cx7){return function(){CompanyEvents[_0x1426[10]](_0x5f1cx6,_0x5f1cx7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/company/index.js b/server/api/company/index.js index 9c7cc35..af51e8c 100644 --- a/server/api/company/index.js +++ b/server/api/company/index.js @@ -1 +1,18 @@ -var _0x5275=["\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"];_0x5275[0];var express=require(_0x5275[1]);var controller=require(_0x5275[2]);var auth=require(_0x5275[3]);var license=require(_0x5275[4]);var router=express.Router();router[_0x5275[12]](_0x5275[5],auth[_0x5275[6]](),license[_0x5275[7]](),auth[_0x5275[10]]([5],[_0x5275[8],_0x5275[9]]),controller[_0x5275[11]]);router[_0x5275[12]](_0x5275[13],auth[_0x5275[6]](),license[_0x5275[7]](),auth[_0x5275[10]]([5],[_0x5275[8],_0x5275[9]]),controller[_0x5275[14]]);router[_0x5275[16]](_0x5275[5],auth[_0x5275[6]](),license[_0x5275[7]](),auth[_0x5275[10]]([5],[_0x5275[8]]),controller[_0x5275[15]]);router[_0x5275[16]](_0x5275[17],auth[_0x5275[6]](),license[_0x5275[7]](),auth[_0x5275[10]]([5],[_0x5275[8]]),controller[_0x5275[18]]);router[_0x5275[20]](_0x5275[13],auth[_0x5275[6]](),license[_0x5275[7]](),auth[_0x5275[10]]([5],[_0x5275[8]]),controller[_0x5275[19]]);router[_0x5275[22]](_0x5275[5],auth[_0x5275[6]](),license[_0x5275[7]](),auth[_0x5275[10]]([5],[_0x5275[8]]),controller[_0x5275[21]]);router[_0x5275[22]](_0x5275[13],auth[_0x5275[6]](),license[_0x5275[7]](),auth[_0x5275[10]]([5],[_0x5275[8]]),controller[_0x5275[23]]);module[_0x5275[24]]= router \ No newline at end of file +'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; diff --git a/server/api/contact_manager/contact_manager.controller.js b/server/api/contact_manager/contact_manager.controller.js index 00840f0..eea8c8a 100644 --- a/server/api/contact_manager/contact_manager.controller.js +++ b/server/api/contact_manager/contact_manager.controller.js @@ -1 +1,708 @@ -var _0x4659=["\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"];_0x4659[0];var _=require(_0x4659[1]);var moment=require(_0x4659[2]);var Contact=require(_0x4659[4])[_0x4659[3]];var User=require(_0x4659[4])[_0x4659[5]];var ContactPhone=require(_0x4659[4])[_0x4659[6]];var ContactEmail=require(_0x4659[4])[_0x4659[7]];var CustomField=require(_0x4659[4])[_0x4659[8]];var ReportCall=require(_0x4659[4])[_0x4659[9]];var ReportQueue=require(_0x4659[4])[_0x4659[10]];var ReportQueueHistory=require(_0x4659[4])[_0x4659[12]][_0x4659[11]];var ReportChatRoom=require(_0x4659[4])[_0x4659[13]];var ReportChatRoomHistory=require(_0x4659[4])[_0x4659[12]][_0x4659[14]];var ChatRoom=require(_0x4659[4])[_0x4659[15]];var FaxRoom=require(_0x4659[4])[_0x4659[16]];var SmsRoom=require(_0x4659[4])[_0x4659[17]];var ReportIntegration=require(_0x4659[4])[_0x4659[18]];var List=require(_0x4659[4])[_0x4659[19]];var ReportCallHistory=require(_0x4659[4])[_0x4659[12]][_0x4659[20]];var ReportMailSession=require(_0x4659[4])[_0x4659[21]];var MailRoom=require(_0x4659[4])[_0x4659[22]];var ReportMailSessionHistory=require(_0x4659[4])[_0x4659[12]][_0x4659[23]];var Tag=require(_0x4659[4])[_0x4659[24]];var stream=require(_0x4659[25]);var sequelize=require(_0x4659[4])[_0x4659[26]];var util=require(_0x4659[27]);var Util=require(_0x4659[28]);var Async=require(_0x4659[29]);exports[_0x4659[30]]= function(_0x93cfx1c,_0x93cfx1d,_0x93cfx1e){var _0x93cfx1f,_0x93cfx20;switch(_0x93cfx1c[_0x4659[68]][_0x4659[72]]){case _0x4659[70]:return User[_0x4659[69]](_0x93cfx1c[_0x4659[68]][_0x4659[45]])[_0x4659[35]](function(_0x93cfx2c){return _0x93cfx2c[_0x4659[67]]()})[_0x4659[35]](function(_0x93cfx2b){_0x93cfx20= _[_0x4659[42]](_0x93cfx2b,_0x4659[45]);return List[_0x4659[55]]({where:{defaultEntry:true},attributes:[_0x4659[45]]})})[_0x4659[35]](function(_0x93cfx29){var _0x93cfx2a={CompanyId:_0x93cfx1c[_0x4659[50]][_0x4659[58]]|| null,ListId:_0x93cfx1c[_0x4659[50]][_0x4659[59]]|| null};delete _0x93cfx1c[_0x4659[50]][_0x4659[58]];delete _0x93cfx1c[_0x4659[50]][_0x4659[59]];return Contact[_0x4659[66]](_0x4659[63],_0x4659[64],{method:[_0x4659[65],_0x93cfx2a]})[_0x4659[62]](Util[_0x4659[61]](_0x93cfx1c[_0x4659[50]],_0x93cfx2a[_0x4659[59]]?{}:{ListId:{$in:_0x93cfx20[_0x4659[60]](_[_0x4659[42]](_0x93cfx29,_0x4659[45]))}}))})[_0x4659[35]](function(_0x93cfx28){_0x93cfx1f= {rows:_[_0x4659[42]](_0x93cfx28[_0x4659[36]],_0x4659[56]),count:_0x93cfx28[_0x4659[36]]};return Contact[_0x4659[57]]()})[_0x4659[35]](function(_0x93cfx26){_0x93cfx26= _[_0x4659[54]](_[_0x4659[51]](_0x93cfx26),function(_0x93cfx27){return _[_0x4659[53]](_0x93cfx27,_0x4659[52])});return CustomField[_0x4659[55]]({where:{name:_0x93cfx26}})})[_0x4659[35]](function(_0x93cfx24){if(_0x93cfx24[_0x4659[38]]){var _0x93cfx25=_[_0x4659[42]](_0x93cfx24,_0x4659[41])[_0x4659[40]](_0x4659[39]);return sequelize[_0x4659[50]](util[_0x4659[47]](_0x4659[43]+ _[_0x4659[42]](_0x93cfx1f[_0x4659[36]],_0x4659[45])[_0x4659[40]](_0x4659[44])+ _0x4659[46],_0x93cfx25),{type:sequelize[_0x4659[49]][_0x4659[48]]})}})[_0x4659[35]](function(_0x93cfx23){_[_0x4659[37]](_0x93cfx1f[_0x4659[36]],_0x93cfx23);return _0x93cfx1f})[_0x4659[35]](function(_0x93cfx22){_0x93cfx1d[_0x4659[34]](200)[_0x4659[33]](_0x93cfx22)})[_0x4659[32]](function(_0x93cfx21){console[_0x4659[31]](_0x93cfx21);return handleError(_0x93cfx1d,_0x93cfx21)});default:var _0x93cfx2a={CompanyId:_0x93cfx1c[_0x4659[50]][_0x4659[58]]|| null,ListId:_0x93cfx1c[_0x4659[50]][_0x4659[59]]|| null};delete _0x93cfx1c[_0x4659[50]][_0x4659[58]];delete _0x93cfx1c[_0x4659[50]][_0x4659[59]];return Contact[_0x4659[66]](_0x4659[63],_0x4659[64],{method:[_0x4659[65],_0x93cfx2a]})[_0x4659[62]](Util[_0x4659[61]](_0x93cfx1c[_0x4659[50]]))[_0x4659[35]](function(_0x93cfx28){_0x93cfx1f= {rows:_[_0x4659[42]](_0x93cfx28[_0x4659[36]],_0x4659[56]),count:_0x93cfx28[_0x4659[71]]};return Contact[_0x4659[57]]()})[_0x4659[35]](function(_0x93cfx26){_0x93cfx26= _[_0x4659[54]](_[_0x4659[51]](_0x93cfx26),function(_0x93cfx27){return _[_0x4659[53]](_0x93cfx27,_0x4659[52])});return CustomField[_0x4659[55]]({where:{name:_0x93cfx26}})})[_0x4659[35]](function(_0x93cfx24){if(_0x93cfx1f[_0x4659[36]][_0x4659[38]]&& _0x93cfx24[_0x4659[38]]){var _0x93cfx25=_[_0x4659[42]](_0x93cfx24,_0x4659[41])[_0x4659[40]](_0x4659[39]);return sequelize[_0x4659[50]](util[_0x4659[47]](_0x4659[43]+ _[_0x4659[42]](_0x93cfx1f[_0x4659[36]],_0x4659[45])[_0x4659[40]](_0x4659[44])+ _0x4659[46],_0x93cfx25),{type:sequelize[_0x4659[49]][_0x4659[48]]})}})[_0x4659[35]](function(_0x93cfx23){if(_0x93cfx23){_[_0x4659[37]](_0x93cfx1f[_0x4659[36]],_0x93cfx23)};return _0x93cfx1f})[_0x4659[35]](function(_0x93cfx22){_0x93cfx1d[_0x4659[34]](200)[_0x4659[33]](_0x93cfx22)})[_0x4659[32]](function(_0x93cfx21){console[_0x4659[31]](_0x93cfx21);return handleError(_0x93cfx1d,_0x93cfx21)})}};exports[_0x4659[57]]= function(_0x93cfx1c,_0x93cfx1d){return Contact[_0x4659[57]]()[_0x4659[35]](function(_0x93cfx26){return _0x93cfx1d[_0x4659[34]](200)[_0x4659[33]](_0x93cfx26)})[_0x4659[32]](function(_0x93cfx21){return handleError(_0x93cfx1d,_0x93cfx21)})};exports[_0x4659[73]]= function(_0x93cfx1c,_0x93cfx1d,_0x93cfx1e){_0x93cfx1c[_0x4659[50]][_0x4659[74]]= _0x93cfx1c[_0x4659[50]][_0x4659[74]]|| _0x4659[75];_0x93cfx1c[_0x4659[50]][_0x4659[76]]= _0x93cfx1c[_0x4659[50]][_0x4659[76]]|| _0x4659[77];_0x93cfx1c[_0x4659[50]][_0x4659[78]]= _0x93cfx1c[_0x4659[50]][_0x4659[78]]|| _0x4659[79];_0x93cfx1c[_0x4659[50]][_0x4659[80]]= _0x93cfx1c[_0x4659[50]][_0x4659[80]]|| _0x4659[81];var _0x93cfx2d,_0x93cfx2e={};return Contact[_0x4659[69]](_0x93cfx1c[_0x4659[98]][_0x4659[45]])[_0x4659[35]](function(_0x93cfx2f){if(!_0x93cfx2f){return _0x93cfx1d[_0x4659[82]](404)};switch(_0x93cfx1c[_0x4659[50]][_0x4659[74]]){case _0x4659[75]:switch(_0x93cfx1c[_0x4659[50]][_0x4659[76]]){case _0x4659[77]:_0x93cfx2d= (_0x93cfx1c[_0x4659[50]][_0x4659[78]]=== _0x4659[12])?ReportCallHistory:ReportCall;if(_0x93cfx1c[_0x4659[50]][_0x4659[80]]=== _0x4659[83]){_0x93cfx2e[_0x4659[84]]= [_0x93cfx2f[_0x4659[77]],_0x93cfx2f[_0x4659[85]]]}else {_0x93cfx2e[_0x4659[86]]= [_0x93cfx2f[_0x4659[77]],_0x93cfx2f[_0x4659[85]]]};break;case _0x4659[88]:_0x93cfx2d= MailRoom;_0x93cfx2e[_0x4659[87]]= _0x93cfx2f[_0x4659[88]];if(_0x93cfx1c[_0x4659[50]][_0x4659[78]]=== _0x4659[12]){_0x93cfx2e[_0x4659[89]]= {$lt:moment()[_0x4659[91]](_0x4659[90])}}else {_0x93cfx2e[_0x4659[89]]= {$gte:moment()[_0x4659[91]](_0x4659[90])}};break;case _0x4659[93]:_0x93cfx2d= ChatRoom;_0x93cfx2e[_0x4659[92]]= _0x93cfx2f[_0x4659[88]];if(_0x93cfx1c[_0x4659[50]][_0x4659[78]]=== _0x4659[12]){_0x93cfx2e[_0x4659[89]]= {$lt:moment()[_0x4659[91]](_0x4659[90])}}else {_0x93cfx2e[_0x4659[89]]= {$gte:moment()[_0x4659[91]](_0x4659[90])}};break;case _0x4659[94]:_0x93cfx2d= FaxRoom;_0x93cfx2e[_0x4659[92]]= _0x93cfx2f[_0x4659[94]];if(_0x93cfx1c[_0x4659[50]][_0x4659[78]]=== _0x4659[12]){_0x93cfx2e[_0x4659[89]]= {$lt:moment()[_0x4659[91]](_0x4659[90])}}else {_0x93cfx2e[_0x4659[89]]= {$gte:moment()[_0x4659[91]](_0x4659[90])}};break;case _0x4659[95]:_0x93cfx2d= SmsRoom;_0x93cfx2e[_0x4659[92]]= [_0x93cfx2f[_0x4659[77]],_0x93cfx2f[_0x4659[85]]];if(_0x93cfx1c[_0x4659[50]][_0x4659[78]]=== _0x4659[12]){_0x93cfx2e[_0x4659[89]]= {$lt:moment()[_0x4659[91]](_0x4659[90])}}else {_0x93cfx2e[_0x4659[89]]= {$gte:moment()[_0x4659[91]](_0x4659[90])}};break;default:_0x93cfx2d= (_0x93cfx1c[_0x4659[50]][_0x4659[78]]=== _0x4659[12])?ReportCallHistory:ReportCall};break;case _0x4659[97]:switch(_0x93cfx1c[_0x4659[50]][_0x4659[76]]){case _0x4659[77]:_0x93cfx2d= (_0x93cfx1c[_0x4659[50]][_0x4659[78]]=== _0x4659[12])?ReportQueueHistory:ReportQueue;_0x93cfx2e[_0x4659[96]]= [_0x93cfx2f[_0x4659[77]],_0x93cfx2f[_0x4659[85]]];break;case _0x4659[88]:return _0x93cfx1d[_0x4659[82]](404);default:_0x93cfx2d= (_0x93cfx1c[_0x4659[50]][_0x4659[78]]=== _0x4659[12])?ReportQueueHistory:ReportQueue};break;default:_0x93cfx2d= ReportCall};delete _0x93cfx1c[_0x4659[50]][_0x4659[74]];delete _0x93cfx1c[_0x4659[50]][_0x4659[76]];delete _0x93cfx1c[_0x4659[50]][_0x4659[78]];delete _0x93cfx1c[_0x4659[50]][_0x4659[80]];return _0x93cfx2d[_0x4659[62]](Util[_0x4659[61]](_0x93cfx1c[_0x4659[50]],_0x93cfx2e))})[_0x4659[35]](function(_0x93cfx22){_0x93cfx1d[_0x4659[34]](200)[_0x4659[33]](_0x93cfx22)})[_0x4659[32]](function(_0x93cfx21){console[_0x4659[31]](_0x93cfx21);return handleError(_0x93cfx1d,_0x93cfx21)})};exports[_0x4659[76]]= function(_0x93cfx1c,_0x93cfx1d){var _0x93cfx30;return Contact[_0x4659[66]](_0x4659[63],_0x4659[68],_0x4659[64])[_0x4659[69]](_0x93cfx1c[_0x4659[98]][_0x4659[45]])[_0x4659[35]](function(_0x93cfx35){if(!_0x93cfx35){return _0x93cfx1d[_0x4659[82]](404)};_0x93cfx30= _0x93cfx35;return CustomField[_0x4659[55]]({where:{ListId:_0x93cfx30[_0x4659[59]]}})})[_0x4659[35]](function(_0x93cfx24){if(_0x93cfx24[_0x4659[38]]){var _0x93cfx25=_[_0x4659[42]](_0x93cfx24,_0x4659[41])[_0x4659[40]](_0x4659[39]);return sequelize[_0x4659[50]](util[_0x4659[47]](_0x4659[101],_0x93cfx25,_0x93cfx1c[_0x4659[98]][_0x4659[45]]),{type:sequelize[_0x4659[49]][_0x4659[48]]})}})[_0x4659[35]](function(_0x93cfx31){if(_0x93cfx31){_[_0x4659[100]](_0x93cfx31[0],function(_0x93cfx32,_0x93cfx33,_0x93cfx34){if(_0x93cfx32=== _0x4659[99]){_0x93cfx34[_0x93cfx33]= null}});_[_0x4659[37]](_0x93cfx30[_0x4659[56]],_0x93cfx31[0])}})[_0x4659[35]](function(){return _0x93cfx1d[_0x4659[34]](200)[_0x4659[33]](_0x93cfx30)})[_0x4659[32]](function(_0x93cfx21){console[_0x4659[31]](_0x93cfx21);return handleError(_0x93cfx1d,_0x93cfx21)})};exports[_0x4659[102]]= function(_0x93cfx1c,_0x93cfx1d){return ReportIntegration[_0x4659[69]](_0x93cfx1c[_0x4659[98]][_0x4659[45]])[_0x4659[35]](function(_0x93cfx36){var _0x93cfx2e={};switch(_0x93cfx36[_0x4659[105]]){case _0x4659[103]:_0x93cfx2e= {$or:{phone:_0x93cfx36[_0x4659[96]],mobile:_0x93cfx36[_0x4659[96]]}};break;case _0x4659[104]:_0x93cfx2e= {email:_0x93cfx36[_0x4659[87]]};break;default:_0x93cfx2e= {}};return Contact[_0x4659[62]]({where:_0x93cfx2e,include:[{model:List,where:{$or:{id:_[_0x4659[42]](_[_0x4659[42]](_0x93cfx1c[_0x4659[68]].Lists,_0x4659[56]),_0x4659[45]),defaultEntry:true}}}]})})[_0x4659[35]](function(_0x93cfx28){return _0x93cfx1d[_0x4659[34]](200)[_0x4659[33]](_0x93cfx28)})[_0x4659[32]](function(_0x93cfx21){console[_0x4659[31]](_0x93cfx21);return handleError(_0x93cfx1d,_0x93cfx21)})};exports[_0x4659[106]]= function(_0x93cfx1c,_0x93cfx1d,_0x93cfx1e){var _0x93cfx30;return Tag[_0x4659[55]]()[_0x4659[35]](function(_0x93cfx37){var _0x93cfx38=[];var _0x93cfx39=_[_0x4659[42]](_[_0x4659[42]](_0x93cfx37,_0x4659[56]),_0x4659[41]);if(_0x93cfx1c[_0x4659[108]][_0x4659[114]]){_0x93cfx1c[_0x4659[108]][_0x4659[114]][_0x4659[100]](function(_0x93cfx27){if(!_[_0x4659[53]](_0x93cfx39,_0x93cfx27)){_0x93cfx38[_0x4659[110]](Tag[_0x4659[106]]({name:_0x93cfx27}))}})};return _0x93cfx38})[_0x4659[113]]()[_0x4659[35]](function(){_0x93cfx1c[_0x4659[108]][_0x4659[112]]= _0x93cfx1c[_0x4659[68]][_0x4659[45]];return Contact[_0x4659[106]](_0x93cfx1c[_0x4659[108]])})[_0x4659[35]](function(_0x93cfx2f){_0x93cfx30= _0x93cfx2f;return CustomField[_0x4659[55]]({where:{ListId:_0x93cfx30[_0x4659[59]]}})})[_0x4659[35]](function(_0x93cfx24){if(_0x93cfx24[_0x4659[38]]){var _0x93cfx25=[];_0x93cfx24[_0x4659[100]](function(_0x93cfx27){if(_0x93cfx1c[_0x4659[108]][_0x4659[107]](_0x93cfx27[_0x4659[41]])){_0x93cfx25[_0x4659[110]](util[_0x4659[47]](_0x4659[109],_0x93cfx27[_0x4659[41]],_0x93cfx1c[_0x4659[108]][_0x93cfx27[_0x4659[41]]]))}});if(_0x93cfx25[_0x4659[38]]){_0x93cfx25= _0x93cfx25[_0x4659[40]](_0x4659[39]);return sequelize[_0x4659[50]](util[_0x4659[47]](_0x4659[111],_0x93cfx25,_0x93cfx30[_0x4659[45]]))}}})[_0x4659[35]](function(){return _0x93cfx1d[_0x4659[34]](201)[_0x4659[33]](_0x93cfx30)})[_0x4659[32]](function(_0x93cfx21){console[_0x4659[31]](_0x93cfx21);return _0x93cfx1e(_0x93cfx21)})};exports[_0x4659[115]]= function(_0x93cfx1c,_0x93cfx1d,_0x93cfx1e){var _0x93cfx30,_0x93cfx3a;return Contact[_0x4659[69]](_0x93cfx1c[_0x4659[98]][_0x4659[45]])[_0x4659[35]](function(_0x93cfx2f){_0x93cfx30= _0x93cfx2f[_0x4659[56]];_0x93cfx3a= _[_0x4659[117]](_0x93cfx2f[_0x4659[56]]);delete _0x93cfx3a[_0x4659[45]];_0x93cfx3a[_0x4659[112]]= _0x93cfx1c[_0x4659[68]][_0x4659[45]];_0x93cfx3a[_0x4659[59]]= _0x93cfx1c[_0x4659[108]][_0x4659[59]];_0x93cfx3a[_0x4659[114]]= _0x93cfx3a[_0x4659[114]]?_0x93cfx3a[_0x4659[114]][_0x4659[119]](_0x4659[118]):[];if(_0x93cfx3a[_0x4659[114]][_0x4659[38]]> 1){_0x93cfx3a[_0x4659[114]][_0x4659[120]]()};return Contact[_0x4659[106]](_0x93cfx3a)})[_0x4659[35]](function(_0x93cfx3b){_0x93cfx3a= _0x93cfx3b;if(_0x93cfx30[_0x4659[59]]=== _0x93cfx1c[_0x4659[108]][_0x4659[59]]){return CustomField[_0x4659[55]]({where:{ListId:_0x93cfx30[_0x4659[59]]}})}})[_0x4659[35]](function(_0x93cfx24){if(_0x93cfx24&& _0x93cfx24[_0x4659[38]]){var _0x93cfx25=_[_0x4659[42]](_0x93cfx24,_0x4659[41])[_0x4659[40]](_0x4659[39]);return sequelize[_0x4659[50]](util[_0x4659[47]](_0x4659[101],_0x93cfx25,_0x93cfx30[_0x4659[45]]),{type:sequelize[_0x4659[49]][_0x4659[48]]})}})[_0x4659[35]](function(_0x93cfx31){if(_0x93cfx31){var _0x93cfx25=[];_[_0x4659[116]](_0x93cfx31[0],function(_0x93cfx32,_0x93cfx33){_0x93cfx25[_0x4659[110]](util[_0x4659[47]](_0x4659[109],_0x93cfx33,_0x93cfx32))});if(_0x93cfx25[_0x4659[38]]){_0x93cfx25= _0x93cfx25[_0x4659[40]](_0x4659[39]);return sequelize[_0x4659[50]](util[_0x4659[47]](_0x4659[111],_0x93cfx25,_0x93cfx3a[_0x4659[45]]))}}})[_0x4659[35]](function(){return _0x93cfx1d[_0x4659[34]](201)[_0x4659[33]](_0x93cfx3a)})[_0x4659[32]](function(_0x93cfx21){console[_0x4659[31]](_0x93cfx21);return _0x93cfx1e(_0x93cfx21)})};exports[_0x4659[121]]= function(_0x93cfx1c,_0x93cfx1d,_0x93cfx1e){var _0x93cfx3c=[];var _0x93cfx3d={ok:0,ko:0};return Tag[_0x4659[55]]()[_0x4659[35]](function(_0x93cfx37){var _0x93cfx38=[],_0x93cfx40=[];var _0x93cfx39=_[_0x4659[42]](_[_0x4659[42]](_0x93cfx37,_0x4659[56]),_0x4659[41]);_0x93cfx1c[_0x4659[108]][_0x4659[122]][_0x4659[100]](function(_0x93cfx2f){if(_0x93cfx2f[_0x4659[114]]){_0x93cfx40= _[_0x4659[126]](_0x93cfx40,_0x93cfx2f[_0x4659[114]])}});_0x93cfx40[_0x4659[100]](function(_0x93cfx27){if(!_[_0x4659[53]](_0x93cfx39,_0x93cfx27)){_0x93cfx38[_0x4659[110]](Tag[_0x4659[106]]({name:_0x93cfx27}))}});return _0x93cfx38})[_0x4659[113]]()[_0x4659[35]](function(){var _0x93cfx3f=[];Async[_0x4659[125]](_0x93cfx1c[_0x4659[108]][_0x4659[122]],function(_0x93cfx2f){_0x93cfx2f[_0x4659[112]]= _0x93cfx1c[_0x4659[68]][_0x4659[45]];_0x93cfx3f[_0x4659[110]](Contact[_0x4659[106]](_0x93cfx2f)[_0x4659[35]](function(_0x93cfx2f){_0x93cfx3c[_0x4659[110]](_0x93cfx2f);_0x93cfx3d[_0x4659[124]]++})[_0x4659[32]](function(_0x93cfx21){_0x93cfx3d[_0x4659[123]]++}))});return _0x93cfx3f})[_0x4659[113]]()[_0x4659[35]](function(){return CustomField[_0x4659[55]]({where:{ListId:{$in:_[_0x4659[42]](_0x93cfx1c[_0x4659[108]][_0x4659[122]],_0x4659[59])}}})})[_0x4659[35]](function(_0x93cfx24){var _0x93cfx3e=[];if(_0x93cfx24[_0x4659[38]]){var _0x93cfx25=[];_0x93cfx3c[_0x4659[100]](function(_0x93cfx2f){_0x93cfx25= [];_0x93cfx24[_0x4659[100]](function(_0x93cfx27){if(_0x93cfx2f[_0x4659[107]](_0x93cfx27[_0x4659[41]])){_0x93cfx25[_0x4659[110]](util[_0x4659[47]](_0x4659[109],_0x93cfx27[_0x4659[41]],_0x93cfx1c[_0x4659[108]][_0x93cfx27[_0x4659[41]]]))}});if(_0x93cfx25[_0x4659[38]]){_0x93cfx25= _0x93cfx25[_0x4659[40]](_0x4659[39]);_0x93cfx3e[_0x4659[110]](sequelize[_0x4659[50]](util[_0x4659[47]](_0x4659[111],_0x93cfx25,_0x93cfx2f[_0x4659[45]])))}})};return _0x93cfx3e})[_0x4659[113]]()[_0x4659[35]](function(){return _0x93cfx1d[_0x4659[34]](201)[_0x4659[33]](_0x93cfx3d)})[_0x4659[32]](function(_0x93cfx21){console[_0x4659[31]](_0x93cfx21);return _0x93cfx1e(_0x93cfx21)})};exports[_0x4659[127]]= function(_0x93cfx1c,_0x93cfx1d,_0x93cfx1e){return Promise[_0x4659[113]]([])[_0x4659[35]](updateContact(_0x93cfx1c,_0x93cfx1d))[_0x4659[35]](function(_0x93cfx2f){return _0x93cfx1d[_0x4659[34]](200)[_0x4659[33]](_0x93cfx2f)})[_0x4659[32]](function(_0x93cfx21){console[_0x4659[31]](_0x93cfx21);return handleError(_0x93cfx1d,_0x93cfx21)})};exports[_0x4659[37]]= function(_0x93cfx1c,_0x93cfx1d,_0x93cfx1e){var _0x93cfx30;return Promise[_0x4659[113]]([])[_0x4659[35]](updateContact(_0x93cfx1c,_0x93cfx1d))[_0x4659[35]](function(_0x93cfx2f){_0x93cfx30= _0x93cfx2f;if(_0x93cfx1c[_0x4659[108]][_0x4659[128]]){return Contact[_0x4659[129]]({where:{id:_0x93cfx1c[_0x4659[108]][_0x4659[128]]},individualHooks:true})}})[_0x4659[35]](function(){return _0x93cfx1d[_0x4659[34]](200)[_0x4659[33]](_0x93cfx30)})[_0x4659[32]](function(_0x93cfx21){console[_0x4659[31]](_0x93cfx21);return handleError(_0x93cfx1d,_0x93cfx21)})};function updateContact(_0x93cfx1c,_0x93cfx1d){return function(){var _0x93cfx30;return Tag[_0x4659[55]]()[_0x4659[35]](function(_0x93cfx37){var _0x93cfx38=[];var _0x93cfx39=_[_0x4659[42]](_[_0x4659[42]](_0x93cfx37,_0x4659[56]),_0x4659[41]);if(_0x93cfx1c[_0x4659[108]][_0x4659[114]]){_0x93cfx1c[_0x4659[108]][_0x4659[114]][_0x4659[100]](function(_0x93cfx27){if(!_[_0x4659[53]](_0x93cfx39,_0x93cfx27)){_0x93cfx38[_0x4659[110]](Tag[_0x4659[106]]({name:_0x93cfx27}))}})};return _0x93cfx38})[_0x4659[35]](function(){return Contact[_0x4659[69]](_0x93cfx1c[_0x4659[98]][_0x4659[45]])})[_0x4659[35]](function(_0x93cfx2f){if(!_0x93cfx2f){return _0x93cfx1d[_0x4659[82]](404)};delete _0x93cfx1c[_0x4659[108]][_0x4659[45]];return _0x93cfx2f[_0x4659[130]](_0x93cfx1c[_0x4659[108]])})[_0x4659[35]](function(_0x93cfx2f){_0x93cfx30= _0x93cfx2f;return CustomField[_0x4659[55]]({where:{ListId:_0x93cfx30[_0x4659[59]]}})})[_0x4659[35]](function(_0x93cfx24){if(_0x93cfx24[_0x4659[38]]){var _0x93cfx25=[];_0x93cfx24[_0x4659[100]](function(_0x93cfx27){if(_0x93cfx1c[_0x4659[108]][_0x4659[107]](_0x93cfx27[_0x4659[41]])){_0x93cfx25[_0x4659[110]](util[_0x4659[47]](_0x4659[109],_0x93cfx27[_0x4659[41]],_0x93cfx1c[_0x4659[108]][_0x93cfx27[_0x4659[41]]]))}});if(_0x93cfx25[_0x4659[38]]){_0x93cfx25= _0x93cfx25[_0x4659[40]](_0x4659[39]);return sequelize[_0x4659[50]](util[_0x4659[47]](_0x4659[111],_0x93cfx25,_0x93cfx30[_0x4659[45]]))}}})[_0x4659[35]](function(){return _0x93cfx30})}}exports[_0x4659[129]]= function(_0x93cfx1c,_0x93cfx1d){return Contact[_0x4659[69]](_0x93cfx1c[_0x4659[98]][_0x4659[45]])[_0x4659[35]](function(_0x93cfx35){if(!_0x93cfx35){return _0x93cfx1d[_0x4659[82]](404)};return _0x93cfx35[_0x4659[129]]()})[_0x4659[35]](function(){return _0x93cfx1d[_0x4659[82]](204)})[_0x4659[32]](function(_0x93cfx21){return handleError(_0x93cfx1d,_0x93cfx21)})};exports[_0x4659[131]]= function(_0x93cfx1c,_0x93cfx1d){return Contact[_0x4659[129]]({where:{id:_0x93cfx1c[_0x4659[50]][_0x4659[132]]},individualHooks:true})[_0x4659[35]](function(){return _0x93cfx1d[_0x4659[82]](204)})[_0x4659[32]](function(_0x93cfx21){return handleError(_0x93cfx1d,_0x93cfx21)})};function handleError(_0x93cfx1d,_0x93cfx21){return _0x93cfx1d[_0x4659[34]](500)[_0x4659[33]](_0x93cfx21)} \ No newline at end of file +'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); +} diff --git a/server/api/contact_manager/contact_manager.events.js b/server/api/contact_manager/contact_manager.events.js index e888d79..dd5bf3e 100644 --- a/server/api/contact_manager/contact_manager.events.js +++ b/server/api/contact_manager/contact_manager.events.js @@ -1 +1,36 @@ -var _0x4aba=["\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"];_0x4aba[0];const EventEmitter=require(_0x4aba[1]);const Contact=require(_0x4aba[3])[_0x4aba[2]];var ContactEvents= new EventEmitter();ContactEvents[_0x4aba[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x4aba[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x4aba[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x4aba[6]};for(var e in events){var event=events[e];Contact[_0x4aba[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4701x8,_0x4701x9,_0x4701xa){ContactEvents[_0x4aba[10]](event+ _0x4aba[8]+ _0x4701x8[_0x4aba[9]],_0x4701x8);ContactEvents[_0x4aba[10]](event,_0x4701x8);_0x4701xa(null)}}module[_0x4aba[11]]= ContactEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/contact_manager/contact_manager.socket.js b/server/api/contact_manager/contact_manager.socket.js index 2725b70..8432549 100644 --- a/server/api/contact_manager/contact_manager.socket.js +++ b/server/api/contact_manager/contact_manager.socket.js @@ -1 +1,28 @@ -var _0xd499=["\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"];_0xd499[0];const ContactManagerEvents=require(_0xd499[1]);var events=[_0xd499[2],_0xd499[3]];exports[_0xd499[4]]= function(_0xd202x3){for(var _0xd202x4=0,_0xd202x5=events[_0xd499[5]];_0xd202x4< _0xd202x5;_0xd202x4++){var _0xd202x6=events[_0xd202x4];var _0xd202x7=createListener(_0xd499[6]+ _0xd202x6,_0xd202x3);ContactManagerEvents[_0xd499[7]](_0xd202x6,_0xd202x7);_0xd202x3[_0xd499[7]](_0xd499[8],removeListener(_0xd202x6,_0xd202x7))}};function createListener(_0xd202x6,_0xd202x3){return function(_0xd202x9){_0xd202x3[_0xd499[9]](_0xd202x6,_0xd202x9)}}function removeListener(_0xd202x6,_0xd202x7){return function(){ContactManagerEvents[_0xd499[10]](_0xd202x6,_0xd202x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/contact_manager/index.js b/server/api/contact_manager/index.js index 46de23f..a17e604 100644 --- a/server/api/contact_manager/index.js +++ b/server/api/contact_manager/index.js @@ -1 +1,23 @@ -var _0xae3b=["\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"];_0xae3b[0];var express=require(_0xae3b[1]);var controller=require(_0xae3b[2]);var auth=require(_0xae3b[3]);var license=require(_0xae3b[4]);var router=express.Router();router[_0xae3b[12]](_0xae3b[5],auth[_0xae3b[6]](),license[_0xae3b[7]](),auth[_0xae3b[10]]([5],[_0xae3b[8],_0xae3b[9]]),controller[_0xae3b[11]]);router[_0xae3b[12]](_0xae3b[13],auth[_0xae3b[6]](),license[_0xae3b[7]](),auth[_0xae3b[10]]([5],[_0xae3b[8]]),controller[_0xae3b[14]]);router[_0xae3b[12]](_0xae3b[15],auth[_0xae3b[6]](),license[_0xae3b[7]](),auth[_0xae3b[10]]([5],[_0xae3b[8],_0xae3b[9]]),controller[_0xae3b[16]]);router[_0xae3b[12]](_0xae3b[17],auth[_0xae3b[6]](),license[_0xae3b[7]](),auth[_0xae3b[10]]([5],[_0xae3b[8],_0xae3b[9]]),controller[_0xae3b[18]]);router[_0xae3b[12]](_0xae3b[19],auth[_0xae3b[6]](),license[_0xae3b[7]](),auth[_0xae3b[10]]([5],[_0xae3b[8],_0xae3b[9]]),controller[_0xae3b[20]]);router[_0xae3b[22]](_0xae3b[5],auth[_0xae3b[6]](),license[_0xae3b[7]](),auth[_0xae3b[10]]([5],[_0xae3b[8],_0xae3b[9]]),controller[_0xae3b[21]]);router[_0xae3b[22]](_0xae3b[23],auth[_0xae3b[6]](),license[_0xae3b[7]](),auth[_0xae3b[10]]([5],[_0xae3b[8],_0xae3b[9]]),controller[_0xae3b[24]]);router[_0xae3b[22]](_0xae3b[25],auth[_0xae3b[6]](),license[_0xae3b[7]](),auth[_0xae3b[10]]([5],[_0xae3b[8],_0xae3b[9]]),controller[_0xae3b[26]]);router[_0xae3b[22]](_0xae3b[27],auth[_0xae3b[6]](),license[_0xae3b[7]](),auth[_0xae3b[10]]([5],[_0xae3b[8]]),controller[_0xae3b[28]]);router[_0xae3b[30]](_0xae3b[17],auth[_0xae3b[6]](),license[_0xae3b[7]](),auth[_0xae3b[10]]([5],[_0xae3b[8],_0xae3b[9]]),controller[_0xae3b[29]]);router[_0xae3b[32]](_0xae3b[5],auth[_0xae3b[6]](),license[_0xae3b[7]](),auth[_0xae3b[10]]([5],[_0xae3b[8]]),controller[_0xae3b[31]]);router[_0xae3b[32]](_0xae3b[17],auth[_0xae3b[6]](),license[_0xae3b[7]](),auth[_0xae3b[10]]([5],[_0xae3b[8]]),controller[_0xae3b[33]]);module[_0xae3b[34]]= router \ No newline at end of file +'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; diff --git a/server/api/custom_report/custom_report.controller.js b/server/api/custom_report/custom_report.controller.js index 4971153..dfb2ecc 100644 --- a/server/api/custom_report/custom_report.controller.js +++ b/server/api/custom_report/custom_report.controller.js @@ -1 +1,569 @@ -var _0x7427=["\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"];_0x7427[0];var _=require(_0x7427[1]);var util=require(_0x7427[2]);var sequelize=require(_0x7427[4])[_0x7427[3]];var CustomReport=require(_0x7427[4])[_0x7427[5]];var ReportField=require(_0x7427[4])[_0x7427[6]];var Metric=require(_0x7427[4])[_0x7427[7]];var ExtractedReport=require(_0x7427[4])[_0x7427[8]];var extractUtils=require(_0x7427[9]);var reportBuildUtils=require(_0x7427[10]);var Util=require(_0x7427[11]);var sr=require(_0x7427[12]);var moment=require(_0x7427[13]);var cp=require(_0x7427[14]);var ReportTree=require(_0x7427[4])[_0x7427[15]];exports[_0x7427[16]]= function(_0x4f34xf,_0x4f34x10,_0x4f34x11){return CustomReport[_0x7427[23]](Util[_0x7427[22]](_0x4f34xf[_0x7427[21]],{deletedAt:null}))[_0x7427[20]](function(_0x4f34x13){_0x4f34x10[_0x7427[19]](200)[_0x7427[18]](_0x4f34x13)})[_0x7427[17]](function(_0x4f34x12){return handleError(_0x4f34x10,_0x4f34x12)})};exports[_0x7427[24]]= function(_0x4f34xf,_0x4f34x10){return Promise[_0x7427[29]]([])[_0x7427[20]](getQuery(_0x4f34xf,_0x4f34x10))[_0x7427[20]](function(_0x4f34x14){if(_0x4f34x14){switch(_0x4f34x14){case _0x7427[28]:_0x4f34x14= _0x7427[27];break;default:}};_0x4f34x10[_0x7427[19]](200)[_0x7427[18]]({query:_0x4f34x14})})[_0x7427[17]](function(_0x4f34x12){console[_0x7427[26]](_0x7427[25],_0x4f34x12)})};function getQuery(_0x4f34xf,_0x4f34x10){var _0x4f34x16;return function(){return CustomReport[_0x7427[51]](_0x7427[50])[_0x7427[49]](_0x4f34xf[_0x7427[48]][_0x7427[47]])[_0x7427[20]](function(_0x4f34x18){console[_0x7427[26]](_0x7427[34]);if(!_0x4f34x18){return _0x4f34x10[_0x7427[35]](404)};if(_0x4f34xf[_0x7427[21]][_0x7427[36]]&& _0x4f34xf[_0x7427[21]][_0x7427[36]]=== _0x7427[37]){_0x4f34xf[_0x7427[21]][_0x7427[38]]= moment()[_0x7427[40]](_0x7427[39]);_0x4f34xf[_0x7427[21]][_0x7427[41]]= moment()[_0x7427[40]](_0x7427[39]);_0x4f34x18[_0x7427[43]][_0x7427[42]]= _0x4f34x18[_0x7427[43]][_0x7427[42]][_0x7427[46]](_0x7427[44],_0x7427[45])};delete _0x4f34xf[_0x7427[21]][_0x7427[36]];_0x4f34x16= _0x4f34x18[_0x7427[43]];return _0x4f34x16[_0x7427[42]]})[_0x7427[20]](reportBuildUtils[_0x7427[33]](_0x4f34xf[_0x7427[32]]))[_0x7427[20]](function(_0x4f34x17){return [_0x4f34x17,_0x4f34x16]})[_0x7427[31]](reportBuildUtils[_0x7427[30]](_0x4f34xf[_0x7427[21]]))}}exports[_0x7427[52]]= function(_0x4f34xf,_0x4f34x10){var _0x4f34x19;return Promise[_0x7427[29]]([])[_0x7427[20]](getQuery(_0x4f34xf,_0x4f34x10))[_0x7427[20]](reportBuildUtils[_0x7427[64]]())[_0x7427[20]](function(_0x4f34x1a){if(_0x4f34x1a&& _[_0x7427[53]](_0x4f34x1a)){_0x4f34x19= _0x4f34x1a[_0x7427[54]];if(_0x4f34xf[_0x7427[21]][_0x7427[55]]){_0x4f34x1a= _(_0x4f34x1a)[_0x7427[59]](_0x4f34xf[_0x7427[21]][_0x7427[58]]|| 0)[_0x7427[57]](_0x4f34xf[_0x7427[21]][_0x7427[55]])[_0x7427[56]]()};_[_0x7427[62]](_0x4f34x1a,function(_0x4f34x1b){_[_0x7427[61]](_0x4f34x1b,function(_0x4f34x1c,_0x4f34x1d){if(_0x4f34x1c instanceof Date){_0x4f34x1b[_0x4f34x1d]= moment(_0x4f34x1c)[_0x7427[40]](_0x7427[60]).toString()}})});_0x4f34x10[_0x7427[19]](200)[_0x7427[18]]({rows:_0x4f34x1a,count:_0x4f34x19})}else {return handleError(_0x4f34x10,{message:_0x4f34x1a|| _0x7427[63]})}})[_0x7427[17]](function(_0x4f34x12){console[_0x7427[26]](_0x4f34x12);return handleError(_0x4f34x10,_0x4f34x12)})};exports[_0x7427[65]]= function(_0x4f34xf,_0x4f34x10){docExtract(_0x4f34xf,_0x4f34x10,_0x7427[66])};exports[_0x7427[67]]= function(_0x4f34xf,_0x4f34x10){docExtract(_0x4f34xf,_0x4f34x10,_0x7427[68])};exports[_0x7427[69]]= function(_0x4f34xf,_0x4f34x10){return ReportTree[_0x7427[49]](2)[_0x7427[20]](function(_0x4f34x1e){_0x4f34x1e= JSON[_0x7427[71]](_0x4f34x1e[_0x7427[70]]);var _0x4f34x1f=_[_0x7427[72]](_0x4f34x1e,{id:_0x4f34xf[_0x7427[48]][_0x7427[47]]});if(!_0x4f34x1f){throw new Error(_0x7427[73])};var _0x4f34x20=[];findSubNodes(_0x4f34x1f,_0x4f34x1e,_0x4f34x20);console[_0x7427[26]](_0x4f34x20);return CustomReport[_0x7427[74]]({where:{parent:_0x4f34x20},individualHooks:true})})[_0x7427[20]](function(){return _0x4f34x10[_0x7427[35]](200)})[_0x7427[17]](function(_0x4f34x12){console[_0x7427[26]](_0x4f34x12);return handleError(_0x4f34x10,_0x4f34x12)})};function findSubNodes(_0x4f34x1f,_0x4f34x1e,_0x4f34x22){_0x4f34x22[_0x7427[75]](_0x4f34x1f[_0x7427[47]]);var _0x4f34x23=_[_0x7427[76]](_0x4f34x1e,{parent:_0x4f34x1f[_0x7427[47]]});if(!_0x4f34x23|| !_0x4f34x23[_0x7427[54]]){return};_[_0x7427[62]](_0x4f34x23,function(_0x4f34x24){findSubNodes(_0x4f34x24,_0x4f34x1e,_0x4f34x22)})}function docExtract(_0x4f34xf,_0x4f34x10,_0x4f34x26){var _0x4f34x18;CustomReport[_0x7427[51]](_0x7427[50])[_0x7427[49]](_0x4f34xf[_0x7427[48]][_0x7427[47]])[_0x7427[20]](function(_0x4f34x16){if(!_0x4f34x16){return _0x4f34x10[_0x7427[35]](404)};_0x4f34x18= _0x4f34x16;return ReportTree[_0x7427[49]](2)})[_0x7427[20]](function(_0x4f34x1e){_0x4f34x1e= JSON[_0x7427[71]](_0x4f34x1e[_0x7427[70]]);var _0x4f34x2a=_[_0x7427[72]](_0x4f34x1e,{id:_0x4f34x18[_0x7427[87]]});var _0x4f34x2b=getReportPath(_0x4f34x2a,_0x4f34x1e,_0x4f34x18[_0x7427[88]]);if(_0x4f34xf[_0x7427[21]][_0x7427[36]]&& _0x4f34xf[_0x7427[21]][_0x7427[36]]=== _0x7427[37]){_0x4f34xf[_0x7427[21]][_0x7427[38]]= moment()[_0x7427[40]](_0x7427[39]);_0x4f34xf[_0x7427[21]][_0x7427[41]]= moment()[_0x7427[40]](_0x7427[39]);_0x4f34x18[_0x7427[43]][_0x7427[42]]= _0x4f34x18[_0x7427[43]][_0x7427[42]][_0x7427[46]](_0x7427[44],_0x7427[45])};delete _0x4f34xf[_0x7427[21]][_0x7427[36]];return [_0x4f34x18,ExtractedReport[_0x7427[94]]({name:_0x4f34x2b,startDate:_0x4f34xf[_0x7427[21]][_0x7427[38]]?_0x4f34xf[_0x7427[21]][_0x7427[38]]+ (_0x4f34xf[_0x7427[21]][_0x7427[89]]?_0x7427[90]+ _0x4f34xf[_0x7427[21]][_0x7427[89]]:_0x7427[91]):null,endDate:_0x4f34xf[_0x7427[21]][_0x7427[41]]?_0x4f34xf[_0x7427[21]][_0x7427[41]]+ (_0x4f34xf[_0x7427[21]][_0x7427[92]]?_0x7427[90]+ _0x4f34xf[_0x7427[21]][_0x7427[92]]:_0x7427[93]):null,output:_0x4f34x26,UserId:_0x4f34xf[_0x7427[32]][_0x7427[47]]})]})[_0x7427[31]](function(_0x4f34x18,_0x4f34x27){var _0x4f34x28=cp[_0x7427[78]](__dirname+ _0x7427[77]);_0x4f34x28[_0x7427[81]](_0x7427[84],function(_0x4f34x29){console[_0x7427[26]](_0x7427[85],_0x4f34x29);_0x4f34x28[_0x7427[86]]()})[_0x7427[81]](_0x7427[82],function(){console[_0x7427[26]](_0x7427[83])})[_0x7427[81]](_0x7427[79],function(_0x4f34x12){console[_0x7427[26]](_0x7427[80],_0x4f34x12)});_0x4f34x28[_0x7427[18]]({report:_0x4f34x18,query:_0x4f34xf[_0x7427[21]],extractedId:_0x4f34x27[_0x7427[47]],user:_0x4f34xf[_0x7427[32]],type:_0x4f34x26})})[_0x7427[17]](function(_0x4f34x12){console[_0x7427[26]](_0x4f34x12);return handleError(_0x4f34x10,_0x4f34x12)});return _0x4f34x10[_0x7427[35]](200)}function getReportPath(_0x4f34x2a,_0x4f34x1e,_0x4f34x2b){_0x4f34x2b= _0x4f34x2a[_0x7427[95]]+ _0x7427[96]+ _0x4f34x2b;if(_0x4f34x2a[_0x7427[87]]=== _0x7427[97]){return _0x4f34x2b}else {return getReportPath(_[_0x7427[72]](_0x4f34x1e,{id:_0x4f34x2a[_0x7427[87]]}),_0x4f34x1e,_0x4f34x2b)}}exports[_0x7427[98]]= function(_0x4f34xf,_0x4f34x10){return CustomReport[_0x7427[51]](_0x7427[50])[_0x7427[49]](_0x4f34xf[_0x7427[48]][_0x7427[47]])[_0x7427[20]](function(_0x4f34x18){if(!_0x4f34x18){return _0x4f34x10[_0x7427[35]](404)};return _0x4f34x10[_0x7427[18]](_0x4f34x18)})[_0x7427[17]](function(_0x4f34x12){return handleError(_0x4f34x10,_0x4f34x12)})};exports[_0x7427[99]]= function(_0x4f34xf,_0x4f34x10){return CustomReport[_0x7427[51]]({method:[_0x7427[102],{CustomReportId:_0x4f34xf[_0x7427[48]][_0x7427[47]]}]})[_0x7427[49]](_0x4f34xf[_0x7427[48]][_0x7427[47]],{attributes:[_0x7427[100],_0x7427[101],_0x7427[88],_0x7427[87],_0x7427[42]]})[_0x7427[20]](function(_0x4f34x18){if(!_0x4f34x18){return _0x4f34x10[_0x7427[35]](404)};return _0x4f34x10[_0x7427[18]](_0x4f34x18)})[_0x7427[17]](function(_0x4f34x12){return handleError(_0x4f34x10,_0x4f34x12)})};exports[_0x7427[103]]= function(_0x4f34xf,_0x4f34x10){var _0x4f34x2d;return sequelize[_0x7427[108]](function(_0x4f34x2e){return CustomReport[_0x7427[51]](_0x7427[50])[_0x7427[49]](_0x4f34xf[_0x7427[48]][_0x7427[47]])[_0x7427[20]](function(_0x4f34x18){if(!_0x4f34x18){return _0x4f34x10[_0x7427[35]](404)};var _0x4f34x2f=_0x4f34x18[_0x7427[43]];delete _0x4f34x2f[_0x7427[47]];delete _0x4f34x2f[_0x7427[104]];delete _0x4f34x2f[_0x7427[105]];_0x4f34x2f[_0x7427[87]]= _0x4f34xf[_0x7427[106]][_0x7427[87]];_0x4f34x2d= _[_0x7427[107]](_0x4f34x2f.Fields,_0x7427[43]);return CustomReport[_0x7427[94]](_0x4f34x2f,{transaction:_0x4f34x2e})})[_0x7427[20]](function(_0x4f34x18){return [_0x4f34x18,_0x4f34x2d]})[_0x7427[31]](createFields(_0x4f34x2e))})[_0x7427[20]](function(){return _0x4f34x10[_0x7427[35]](201)})[_0x7427[17]](function(_0x4f34x12){console[_0x7427[26]](_0x4f34x12);return handleError(_0x4f34x10,_0x4f34x12)})};exports[_0x7427[94]]= function(_0x4f34xf,_0x4f34x10){var _0x4f34x16;return sequelize[_0x7427[108]](function(_0x4f34x2e){return CustomReport[_0x7427[94]](_0x4f34xf[_0x7427[106]],{transaction:_0x4f34x2e})[_0x7427[20]](function(_0x4f34x18){_0x4f34x16= _0x4f34x18;return [_0x4f34x16,_0x4f34xf[_0x7427[106]][_0x7427[109]]]})[_0x7427[31]](createFields(_0x4f34x2e))})[_0x7427[20]](function(){return _0x4f34x10[_0x7427[19]](201)[_0x7427[18]](_0x4f34x16)})[_0x7427[17]](function(_0x4f34x12){console[_0x7427[26]](_0x4f34x12);return handleError(_0x4f34x10,_0x4f34x12)})};exports[_0x7427[110]]= function(_0x4f34xf,_0x4f34x10){var _0x4f34x16;return sequelize[_0x7427[108]](function(_0x4f34x2e){return CustomReport[_0x7427[94]](_0x4f34xf[_0x7427[106]],{transaction:_0x4f34x2e})[_0x7427[20]](function(_0x4f34x18){_0x4f34x16= _0x4f34x18;return [_0x4f34x16,_0x4f34xf[_0x7427[106]][_0x7427[109]]]})[_0x7427[31]](createImportFields(_0x4f34x2e))})[_0x7427[20]](function(){return _0x4f34x10[_0x7427[19]](201)[_0x7427[18]](_0x4f34x16)})[_0x7427[17]](function(_0x4f34x12){console[_0x7427[26]](_0x4f34x12);return handleError(_0x4f34x10,_0x4f34x12)})};exports[_0x7427[111]]= function(_0x4f34xf,_0x4f34x10,_0x4f34x11){if(_0x4f34xf[_0x7427[106]][_0x7427[47]]){delete _0x4f34xf[_0x7427[106]][_0x7427[47]]};var _0x4f34x16;return sequelize[_0x7427[108]](function(_0x4f34x2e){return CustomReport[_0x7427[49]](_0x4f34xf[_0x7427[48]][_0x7427[47]])[_0x7427[20]](function(_0x4f34x18){if(!_0x4f34x18){return _0x4f34x10[_0x7427[35]](404)};var _0x4f34x30=_[_0x7427[112]](_0x4f34x18,_0x4f34xf[_0x7427[106]]);return _0x4f34x18[_0x7427[113]]({transaction:_0x4f34x2e})})[_0x7427[20]](function(_0x4f34x18){_0x4f34x16= _0x4f34x18;if(_0x4f34xf[_0x7427[106]][_0x7427[109]]){return ReportField[_0x7427[74]]({where:{CustomReportId:_0x4f34xf[_0x7427[48]][_0x7427[47]]},transaction:_0x4f34x2e})}})[_0x7427[20]](function(){return [_0x4f34x16,_0x4f34xf[_0x7427[106]][_0x7427[109]]]})[_0x7427[31]](createFields(_0x4f34x2e))})[_0x7427[20]](function(){return _0x4f34x10[_0x7427[35]](200)})[_0x7427[17]](function(_0x4f34x12){console[_0x7427[26]](_0x4f34x12);return handleError(_0x4f34x10,_0x4f34x12)})};function createFields(_0x4f34x2e){return function(_0x4f34x18,_0x4f34x32){if(_0x4f34x32&& Array[_0x7427[53]](_0x4f34x32)&& _0x4f34x32[_0x7427[54]]){var _0x4f34x33=reportBuildUtils[_0x7427[114]](_0x4f34x18[_0x7427[42]]);if(_0x4f34x33){var _0x4f34x34;return _0x4f34x33[_0x7427[127]]()[_0x7427[20]](function(_0x4f34x39){_0x4f34x34= _[_0x7427[125]](_0x4f34x39);return Metric[_0x7427[126]]()})[_0x7427[20]](function(_0x4f34x35){var _0x4f34x36=[];_0x4f34x35= _[_0x7427[107]](_0x4f34x35,_0x7427[43]);_0x4f34x32[_0x7427[62]](function(_0x4f34x37){_0x4f34x37[_0x7427[115]]= _0x4f34x18[_0x7427[47]];if(_0x4f34x37[_0x7427[116]]){var _0x4f34x38=_[_0x7427[72]](_0x4f34x35,{id:_0x4f34x37[_0x7427[116]]});if(_0x4f34x38){_0x4f34x37[_0x7427[117]]= _0x4f34x38[_0x7427[118]];_0x4f34x36[_0x7427[75]](ReportField[_0x7427[94]](_0x4f34x37,{transaction:_0x4f34x2e}))}else {throw new sequelize.Error(_0x7427[119]+ _0x4f34x37[_0x7427[116]]+ _0x7427[120])}}else {if(_[_0x7427[121]](_0x4f34x34,_0x4f34x37[_0x7427[117]])|| _0x4f34x37[_0x7427[122]]){_0x4f34x36[_0x7427[75]](ReportField[_0x7427[94]](_0x4f34x37,{transaction:_0x4f34x2e}))}else {throw new sequelize.Error(_0x7427[123]+ _0x4f34x37[_0x7427[117]]+ _0x7427[124])}}});return _0x4f34x36})[_0x7427[29]]()}else {throw new sequelize.Error(_0x7427[128])}}}}function createImportFields(_0x4f34x2e){return function(_0x4f34x18,_0x4f34x32){if(_0x4f34x32&& Array[_0x7427[53]](_0x4f34x32)&& _0x4f34x32[_0x7427[54]]){var _0x4f34x33=reportBuildUtils[_0x7427[114]](_0x4f34x18[_0x7427[42]]);if(_0x4f34x33){var _0x4f34x34;return _0x4f34x33[_0x7427[127]]()[_0x7427[20]](function(_0x4f34x39){_0x4f34x34= _[_0x7427[125]](_0x4f34x39);var _0x4f34x36=[];var _0x4f34x3b;if(_[_0x7427[131]](_0x4f34x32,function(_0x4f34x37){return _[_0x7427[130]](_0x4f34x37,_0x7427[129])})){_0x4f34x3b= _0x7427[132]}else {if(_[_0x7427[131]](_0x4f34x32,function(_0x4f34x37){return _[_0x7427[130]](_0x4f34x37,_0x7427[116])})){_0x4f34x3b= _0x7427[7]}else {throw new sequelize.Error(_0x7427[133])}};var _0x4f34x3c=_[_0x7427[135]](_0x4f34x32,_0x4f34x3b+ _0x7427[134]);_[_0x7427[61]](_0x4f34x3c,function(_0x4f34x3d,_0x4f34x1d){if(_0x4f34x1d!== _0x7427[136]&& _0x4f34x1d!== _0x7427[137]){_0x4f34x3d[0][_0x4f34x3b][_0x7427[138]][_0x7427[62]](function(_0x4f34x37){_0x4f34x37[_0x7427[115]]= _0x4f34x18[_0x7427[47]]});_0x4f34x3d[0][_0x4f34x3b][_0x7427[88]]+= _0x7427[139]+ sr({length:5});_0x4f34x36[_0x7427[75]](Metric[_0x7427[94]](_0x4f34x3d[0][_0x4f34x3b],{include:[{model:ReportField,as:_0x7427[138]}],transaction:_0x4f34x2e}))}else {_0x4f34x3d[_0x7427[62]](function(_0x4f34x37){if(_[_0x7427[121]](_0x4f34x34,_0x4f34x37[_0x7427[117]])|| _0x4f34x37[_0x7427[122]]){_0x4f34x37[_0x7427[115]]= _0x4f34x18[_0x7427[47]];_0x4f34x36[_0x7427[75]](ReportField[_0x7427[94]](_0x4f34x37,{transaction:_0x4f34x2e}))}else {throw new sequelize.Error(_0x7427[123]+ _0x4f34x37[_0x7427[117]]+ _0x7427[124])}})}});return _0x4f34x36})[_0x7427[29]]()}else {throw new sequelize.Error(_0x7427[128])}}}}exports[_0x7427[74]]= function(_0x4f34xf,_0x4f34x10){return CustomReport[_0x7427[49]](_0x4f34xf[_0x7427[48]][_0x7427[47]])[_0x7427[20]](function(_0x4f34x18){if(!_0x4f34x18){return _0x4f34x10[_0x7427[35]](404)};return _0x4f34x18[_0x7427[74]]()})[_0x7427[20]](function(){return _0x4f34x10[_0x7427[35]](204)})[_0x7427[17]](function(_0x4f34x12){return handleError(_0x4f34x10,_0x4f34x12)})};exports[_0x7427[140]]= function(_0x4f34xf,_0x4f34x10){return CustomReport[_0x7427[74]]({where:{id:_0x4f34xf[_0x7427[21]][_0x7427[141]]},individualHooks:true})[_0x7427[20]](function(){return _0x4f34x10[_0x7427[35]](204)})[_0x7427[17]](function(_0x4f34x12){return handleError(_0x4f34x10,_0x4f34x12)})};function handleError(_0x4f34x10,_0x4f34x12){return _0x4f34x10[_0x7427[19]](500)[_0x7427[18]](_0x4f34x12)} \ No newline at end of file +'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); + console.log(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); +} diff --git a/server/api/custom_report/custom_report.events.js b/server/api/custom_report/custom_report.events.js index b546f1d..ac4b9d7 100644 --- a/server/api/custom_report/custom_report.events.js +++ b/server/api/custom_report/custom_report.events.js @@ -1 +1,36 @@ -var _0xd555=["\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"];_0xd555[0];const EventEmitter=require(_0xd555[1]);const CustomReport=require(_0xd555[3])[_0xd555[2]];var CustomReportEvents= new EventEmitter();CustomReportEvents[_0xd555[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd555[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd555[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd555[6]};for(var e in events){var event=events[e];CustomReport[_0xd555[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xd3a4x8,_0xd3a4x9,_0xd3a4xa){CustomReportEvents[_0xd555[10]](event+ _0xd555[8]+ _0xd3a4x8[_0xd555[9]],_0xd3a4x8);CustomReportEvents[_0xd555[10]](event,_0xd3a4x8);_0xd3a4xa(null)}}module[_0xd555[11]]= CustomReportEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/custom_report/custom_report.socket.js b/server/api/custom_report/custom_report.socket.js index a713c83..ab9086c 100644 --- a/server/api/custom_report/custom_report.socket.js +++ b/server/api/custom_report/custom_report.socket.js @@ -1 +1,28 @@ -var _0xe592=["\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"];_0xe592[0];const CustomReportEvents=require(_0xe592[1]);var events=[_0xe592[2],_0xe592[3]];exports[_0xe592[4]]= function(_0x3eb9x3){for(var _0x3eb9x4=0,_0x3eb9x5=events[_0xe592[5]];_0x3eb9x4< _0x3eb9x5;_0x3eb9x4++){var _0x3eb9x6=events[_0x3eb9x4];var _0x3eb9x7=createListener(_0xe592[6]+ _0x3eb9x6,_0x3eb9x3);CustomReportEvents[_0xe592[7]](_0x3eb9x6,_0x3eb9x7);_0x3eb9x3[_0xe592[7]](_0xe592[8],removeListener(_0x3eb9x6,_0x3eb9x7))}};function createListener(_0x3eb9x6,_0x3eb9x3){return function(_0x3eb9x9){_0x3eb9x3[_0xe592[9]](_0x3eb9x6,_0x3eb9x9)}}function removeListener(_0x3eb9x6,_0x3eb9x7){return function(){CustomReportEvents[_0xe592[10]](_0x3eb9x6,_0x3eb9x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/custom_report/index.js b/server/api/custom_report/index.js index fcc645f..cf6aa62 100644 --- a/server/api/custom_report/index.js +++ b/server/api/custom_report/index.js @@ -1 +1,24 @@ -var _0x327f=["\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"];_0x327f[0];var express=require(_0x327f[1]);var controller=require(_0x327f[2]);var auth=require(_0x327f[3]);var router=express.Router();router[_0x327f[9]](_0x327f[4],auth[_0x327f[5]](),auth[_0x327f[7]]([17],[_0x327f[6]]),controller[_0x327f[8]]);router[_0x327f[9]](_0x327f[10],auth[_0x327f[5]](),auth[_0x327f[7]]([17],[_0x327f[6]]),controller[_0x327f[11]]);router[_0x327f[9]](_0x327f[12],auth[_0x327f[5]](),auth[_0x327f[7]]([17],[_0x327f[6]]),controller[_0x327f[13]]);router[_0x327f[9]](_0x327f[14],auth[_0x327f[5]](),auth[_0x327f[7]]([17],[_0x327f[6]]),controller[_0x327f[15]]);router[_0x327f[9]](_0x327f[16],auth[_0x327f[5]](),auth[_0x327f[7]]([17],[_0x327f[6]]),controller[_0x327f[17]]);router[_0x327f[19]](_0x327f[4],auth[_0x327f[5]](),auth[_0x327f[7]]([17],[_0x327f[6]]),controller[_0x327f[18]]);router[_0x327f[9]](_0x327f[20],auth[_0x327f[5]](),auth[_0x327f[7]]([17],[_0x327f[6]]),controller[_0x327f[21]]);router[_0x327f[9]](_0x327f[22],auth[_0x327f[5]](),auth[_0x327f[7]]([17],[_0x327f[6]]),controller[_0x327f[23]]);router[_0x327f[19]](_0x327f[24],auth[_0x327f[5]](),auth[_0x327f[7]]([17],[_0x327f[6]]),controller[_0x327f[25]]);router[_0x327f[19]](_0x327f[26],auth[_0x327f[5]](),auth[_0x327f[7]]([17],[_0x327f[6]]),controller[_0x327f[27]]);router[_0x327f[29]](_0x327f[12],auth[_0x327f[5]](),auth[_0x327f[7]]([17],[_0x327f[6]]),controller[_0x327f[28]]);router[_0x327f[31]](_0x327f[4],auth[_0x327f[5]](),auth[_0x327f[7]]([17],[_0x327f[6]]),controller[_0x327f[30]]);router[_0x327f[31]](_0x327f[32],auth[_0x327f[5]](),auth[_0x327f[7]]([17],[_0x327f[6]]),controller[_0x327f[33]]);router[_0x327f[31]](_0x327f[12],auth[_0x327f[5]](),auth[_0x327f[7]]([17],[_0x327f[6]]),controller[_0x327f[34]]);module[_0x327f[35]]= router \ No newline at end of file +'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; diff --git a/server/api/dashboard/dashboard.controller.js b/server/api/dashboard/dashboard.controller.js index fe513c4..9a1998e 100644 --- a/server/api/dashboard/dashboard.controller.js +++ b/server/api/dashboard/dashboard.controller.js @@ -1 +1,320 @@ -var _0x3f67=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\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","\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\x6C\x6C","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\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","\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","\x6E\x61\x6D\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\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x3f67[0];var _=require(_0x3f67[1]);var util=require(_0x3f67[2]);var Dashboard=require(_0x3f67[4])[_0x3f67[3]];var Util=require(_0x3f67[5]);exports[_0x3f67[6]]= function(_0x9305x5,_0x9305x6,_0x9305x7){return Dashboard[_0x3f67[13]](Util[_0x3f67[12]](_0x9305x5[_0x3f67[11]]))[_0x3f67[10]](function(_0x9305x9){_0x9305x6[_0x3f67[9]](200)[_0x3f67[8]](_0x9305x9)})[_0x3f67[7]](function(_0x9305x8){return handleError(_0x9305x6,_0x9305x8)})};exports[_0x3f67[14]]= function(_0x9305x5,_0x9305x6){return Dashboard[_0x3f67[16]]()[_0x3f67[10]](function(_0x9305xa){if(!_0x9305xa){return _0x9305x6[_0x3f67[15]](404)};return _0x9305x6[_0x3f67[9]](200)[_0x3f67[8]](_0x9305xa)})[_0x3f67[7]](function(_0x9305x8){return handleError(_0x9305x6,_0x9305x8)})};exports[_0x3f67[17]]= function(_0x9305x5,_0x9305x6){return Dashboard[_0x3f67[20]](_0x9305x5[_0x3f67[19]][_0x3f67[18]])[_0x3f67[10]](function(_0x9305xb){if(!_0x9305xb){return _0x9305x6[_0x3f67[15]](404)};return _0x9305x6[_0x3f67[8]](_0x9305xb)})[_0x3f67[7]](function(_0x9305x8){return handleError(_0x9305x6,_0x9305x8)})};exports[_0x3f67[21]]= function(_0x9305x5,_0x9305x6){return Dashboard[_0x3f67[21]](_0x9305x5[_0x3f67[22]])[_0x3f67[10]](function(_0x9305xb){return _0x9305x6[_0x3f67[9]](201)[_0x3f67[8]](_0x9305xb)})[_0x3f67[7]](function(_0x9305x8){return handleError(_0x9305x6,_0x9305x8)})};exports[_0x3f67[23]]= function(_0x9305x5,_0x9305x6){return Dashboard[_0x3f67[20]](_0x9305x5[_0x3f67[19]][_0x3f67[18]])[_0x3f67[10]](function(_0x9305xb){var _0x9305xc=_0x9305xb[_0x3f67[24]];delete _0x9305xc[_0x3f67[18]];_0x9305xc[_0x3f67[25]]= true;_0x9305xc[_0x3f67[26]]= false;_0x9305xc[_0x3f67[27]]= _0x9305x5[_0x3f67[22]][_0x3f67[27]]|| _0x9305xc[_0x3f67[27]];return Dashboard[_0x3f67[21]](_0x9305xc)})[_0x3f67[10]](function(_0x9305xb){return _0x9305x6[_0x3f67[9]](201)[_0x3f67[8]](_0x9305xb)})[_0x3f67[7]](function(_0x9305x8){return handleError(_0x9305x6,_0x9305x8)})};exports[_0x3f67[28]]= function(_0x9305x5,_0x9305x6){if(_0x9305x5[_0x3f67[22]][_0x3f67[18]]){delete _0x9305x5[_0x3f67[22]][_0x3f67[18]]};return Dashboard[_0x3f67[20]](_0x9305x5[_0x3f67[19]][_0x3f67[18]])[_0x3f67[10]](function(_0x9305xb){if(!_0x9305xb){return _0x9305x6[_0x3f67[15]](404)};var _0x9305xd=_[_0x3f67[29]](_0x9305xb,_0x9305x5[_0x3f67[22]]);return _0x9305xd[_0x3f67[30]]()})[_0x3f67[10]](function(_0x9305xb){return _0x9305x6[_0x3f67[9]](200)[_0x3f67[8]](_0x9305xb)})[_0x3f67[7]](function(_0x9305x8){return handleError(_0x9305x6,_0x9305x8)})};exports[_0x3f67[31]]= function(_0x9305x5,_0x9305x6){return Dashboard[_0x3f67[20]](_0x9305x5[_0x3f67[19]][_0x3f67[18]])[_0x3f67[10]](function(_0x9305xb){if(!_0x9305xb){return _0x9305x6[_0x3f67[15]](404)};return _0x9305xb[_0x3f67[31]]()})[_0x3f67[10]](function(){return _0x9305x6[_0x3f67[15]](204)})[_0x3f67[7]](function(_0x9305x8){return handleError(_0x9305x6,_0x9305x8)})};exports[_0x3f67[32]]= function(_0x9305x5,_0x9305x6){return Dashboard[_0x3f67[31]]({where:{id:_0x9305x5[_0x3f67[11]][_0x3f67[33]]},individualHooks:true})[_0x3f67[10]](function(){return _0x9305x6[_0x3f67[15]](204)})[_0x3f67[7]](function(_0x9305x8){return handleError(_0x9305x6,_0x9305x8)})};function handleError(_0x9305x6,_0x9305x8){return _0x9305x6[_0x3f67[9]](500)[_0x3f67[8]](_0x9305x8)} \ No newline at end of file +'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); +} diff --git a/server/api/dashboard/dashboard.events.js b/server/api/dashboard/dashboard.events.js index de13269..2097ae7 100644 --- a/server/api/dashboard/dashboard.events.js +++ b/server/api/dashboard/dashboard.events.js @@ -1 +1,36 @@ -var _0x8ffd=["\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"];_0x8ffd[0];const EventEmitter=require(_0x8ffd[1]);const Dashboard=require(_0x8ffd[3])[_0x8ffd[2]];var DashboardEvents= new EventEmitter();DashboardEvents[_0x8ffd[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x8ffd[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x8ffd[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x8ffd[6]};for(var e in events){var event=events[e];Dashboard[_0x8ffd[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xa2ebx8,_0xa2ebx9,_0xa2ebxa){DashboardEvents[_0x8ffd[10]](event+ _0x8ffd[8]+ _0xa2ebx8[_0x8ffd[9]],_0xa2ebx8);DashboardEvents[_0x8ffd[10]](event,_0xa2ebx8);_0xa2ebxa(null)}}module[_0x8ffd[11]]= DashboardEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/dashboard/dashboard.socket.js b/server/api/dashboard/dashboard.socket.js index cf1dd82..f23e2a0 100644 --- a/server/api/dashboard/dashboard.socket.js +++ b/server/api/dashboard/dashboard.socket.js @@ -1 +1,28 @@ -var _0x6b86=["\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"];_0x6b86[0];const DashboardEvents=require(_0x6b86[1]);var events=[_0x6b86[2],_0x6b86[3]];exports[_0x6b86[4]]= function(_0x427ex3){for(var _0x427ex4=0,_0x427ex5=events[_0x6b86[5]];_0x427ex4< _0x427ex5;_0x427ex4++){var _0x427ex6=events[_0x427ex4];var _0x427ex7=createListener(_0x6b86[6]+ _0x427ex6,_0x427ex3);DashboardEvents[_0x6b86[7]](_0x427ex6,_0x427ex7);_0x427ex3[_0x6b86[7]](_0x6b86[8],removeListener(_0x427ex6,_0x427ex7))}};function createListener(_0x427ex6,_0x427ex3){return function(_0x427ex9){_0x427ex3[_0x6b86[9]](_0x427ex6,_0x427ex9)}}function removeListener(_0x427ex6,_0x427ex7){return function(){DashboardEvents[_0x6b86[10]](_0x427ex6,_0x427ex7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/dashboard/index.js b/server/api/dashboard/index.js index dc638b5..495783a 100644 --- a/server/api/dashboard/index.js +++ b/server/api/dashboard/index.js @@ -1 +1,19 @@ -var _0x9b53=["\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\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"];_0x9b53[0];var express=require(_0x9b53[1]);var controller=require(_0x9b53[2]);var auth=require(_0x9b53[3]);var router=express.Router();router[_0x9b53[11]](_0x9b53[4],auth[_0x9b53[5]](),auth[_0x9b53[9]]([2],[_0x9b53[6],_0x9b53[7],_0x9b53[8]]),controller[_0x9b53[10]]);router[_0x9b53[11]](_0x9b53[12],auth[_0x9b53[5]](),auth[_0x9b53[9]]([2],[_0x9b53[6]]),controller[_0x9b53[13]]);router[_0x9b53[11]](_0x9b53[14],auth[_0x9b53[5]](),auth[_0x9b53[9]]([2],[_0x9b53[6]]),controller[_0x9b53[15]]);router[_0x9b53[17]](_0x9b53[4],auth[_0x9b53[5]](),auth[_0x9b53[9]]([2],[_0x9b53[6]]),controller[_0x9b53[16]]);router[_0x9b53[17]](_0x9b53[18],auth[_0x9b53[5]](),auth[_0x9b53[9]]([2],[_0x9b53[6]]),controller[_0x9b53[19]]);router[_0x9b53[21]](_0x9b53[14],auth[_0x9b53[5]](),auth[_0x9b53[9]]([2],[_0x9b53[6]]),controller[_0x9b53[20]]);router[_0x9b53[23]](_0x9b53[4],auth[_0x9b53[5]](),auth[_0x9b53[9]]([2],[_0x9b53[6]]),controller[_0x9b53[22]]);router[_0x9b53[23]](_0x9b53[14],auth[_0x9b53[5]](),auth[_0x9b53[9]]([2],[_0x9b53[6]]),controller[_0x9b53[24]]);module[_0x9b53[25]]= router \ No newline at end of file +'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; diff --git a/server/api/default_metric/default_metric.controller.js b/server/api/default_metric/default_metric.controller.js index 285f648..321849c 100644 --- a/server/api/default_metric/default_metric.controller.js +++ b/server/api/default_metric/default_metric.controller.js @@ -1 +1,158 @@ -var _0x6e97=["\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"];_0x6e97[0];var _=require(_0x6e97[1]);var DefaultMetric=require(_0x6e97[3])[_0x6e97[2]];var Metric=require(_0x6e97[3])[_0x6e97[4]];var util=require(_0x6e97[5]);var Util=require(_0x6e97[6]);var sequelize=require(_0x6e97[3])[_0x6e97[7]];var sr=require(_0x6e97[8]);exports[_0x6e97[9]]= function(_0x7ce5x8,_0x7ce5x9,_0x7ce5xa){return DefaultMetric[_0x6e97[16]](Util[_0x6e97[15]](_0x7ce5x8[_0x6e97[14]]))[_0x6e97[13]](function(_0x7ce5xc){return _0x7ce5x9[_0x6e97[12]](200)[_0x6e97[11]](_0x7ce5xc)})[_0x6e97[10]](function(_0x7ce5xb){return handleError(_0x7ce5x9,_0x7ce5xb)})};exports[_0x6e97[17]]= function(_0x7ce5x8,_0x7ce5x9){return DefaultMetric[_0x6e97[21]]({where:{table:_0x7ce5x8[_0x6e97[14]][_0x6e97[20]]}})[_0x6e97[13]](function(_0x7ce5xd){if(!_0x7ce5xd){return _0x7ce5x9[_0x6e97[18]](404)};return _0x7ce5x9[_0x6e97[12]](200)[_0x6e97[11]]({count:_0x7ce5xd[_0x6e97[19]],rows:_0x7ce5xd})})[_0x6e97[10]](function(_0x7ce5xb){return handleError(_0x7ce5x9,_0x7ce5xb)})};exports[_0x6e97[22]]= function(_0x7ce5x8,_0x7ce5x9){return DefaultMetric[_0x6e97[29]](_0x7ce5x8[_0x6e97[28]][_0x6e97[23]])[_0x6e97[13]](function(_0x7ce5xe){if(!_0x7ce5xe){return _0x7ce5x9[_0x6e97[18]](404)};delete _0x7ce5xe[_0x6e97[24]][_0x6e97[23]];_0x7ce5xe[_0x6e97[24]][_0x6e97[25]]+= _0x6e97[26]+ sr({length:5});return Metric[_0x6e97[27]](_0x7ce5xe[_0x6e97[24]])})[_0x6e97[13]](function(){return _0x7ce5x9[_0x6e97[18]](201)})[_0x6e97[10]](function(_0x7ce5xb){return handleError(_0x7ce5x9,_0x7ce5xb)})};function handleError(_0x7ce5x9,_0x7ce5xb){return _0x7ce5x9[_0x6e97[12]](500)[_0x6e97[11]](_0x7ce5xb)} \ No newline at end of file +'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); +} diff --git a/server/api/default_metric/index.js b/server/api/default_metric/index.js index 4902a06..4608ee8 100644 --- a/server/api/default_metric/index.js +++ b/server/api/default_metric/index.js @@ -1 +1,19 @@ -var _0x6933=["\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"];_0x6933[0];var express=require(_0x6933[1]);var controller=require(_0x6933[2]);var auth=require(_0x6933[3]);var router=express.Router();router[_0x6933[9]](_0x6933[4],auth[_0x6933[5]](),auth[_0x6933[7]]([17],[_0x6933[6]]),controller[_0x6933[8]]);router[_0x6933[9]](_0x6933[10],auth[_0x6933[5]](),auth[_0x6933[7]]([17],[_0x6933[6]]),controller[_0x6933[11]]);router[_0x6933[9]](_0x6933[12],auth[_0x6933[5]](),auth[_0x6933[7]]([17],[_0x6933[6]]),controller[_0x6933[13]]);module[_0x6933[14]]= router \ No newline at end of file +'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; diff --git a/server/api/default_report/default_report.controller.js b/server/api/default_report/default_report.controller.js index f9ed909..dfa2805 100644 --- a/server/api/default_report/default_report.controller.js +++ b/server/api/default_report/default_report.controller.js @@ -1 +1,404 @@ -var _0x4558=["\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","\x28","\x72\x75\x6C\x65\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x67\x72\x6F\x75\x70","\x66\x69\x65\x6C\x64","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x20\x27","\x4C\x49\x4B\x45","\x25","\x27","\x29","\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","\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"];_0x4558[0];var _=require(_0x4558[1]);var util=require(_0x4558[2]);var DefaultReport=require(_0x4558[4])[_0x4558[3]];var ReportField=require(_0x4558[4])[_0x4558[5]];var Metric=require(_0x4558[4])[_0x4558[6]];var sequelize=require(_0x4558[4])[_0x4558[7]];var CustomReport=require(_0x4558[4])[_0x4558[8]];var ExtractedReport=require(_0x4558[4])[_0x4558[9]];var extractUtils=require(_0x4558[10]);var reportBuildUtils=require(_0x4558[11]);var Util=require(_0x4558[12]);var moment=require(_0x4558[13]);var cp=require(_0x4558[14]);var sr=require(_0x4558[15]);var ReportTree=require(_0x4558[4])[_0x4558[16]];exports[_0x4558[17]]= function(_0x5853x10,_0x5853x11,_0x5853x12){return DefaultReport[_0x4558[24]](Util[_0x4558[23]](_0x5853x10[_0x4558[22]]))[_0x4558[21]](function(_0x5853x14){_0x5853x11[_0x4558[20]](200)[_0x4558[19]](_0x5853x14)})[_0x4558[18]](function(_0x5853x13){return handleError(_0x5853x11,_0x5853x13)})};exports[_0x4558[25]]= function(_0x5853x10,_0x5853x11){return DefaultReport[_0x4558[36]]({method:[_0x4558[35],{DefaultReportId:_0x5853x10[_0x4558[28]][_0x4558[27]]}]})[_0x4558[34]](_0x5853x10[_0x4558[28]][_0x4558[27]],{attributes:[_0x4558[29],_0x4558[30],_0x4558[31],_0x4558[32],_0x4558[33]]})[_0x4558[21]](function(_0x5853x15){if(!_0x5853x15){return _0x5853x11[_0x4558[26]](404)};return _0x5853x11[_0x4558[19]](_0x5853x15)})[_0x4558[18]](function(_0x5853x13){return handleError(_0x5853x11,_0x5853x13)})};exports[_0x4558[37]]= function(_0x5853x10,_0x5853x11){return Promise[_0x4558[42]]([])[_0x4558[21]](getQuery(_0x5853x10,_0x5853x11))[_0x4558[21]](function(_0x5853x16){if(_0x5853x16){switch(_0x5853x16){case _0x4558[41]:_0x5853x16= _0x4558[40];break;default:}};_0x5853x11[_0x4558[20]](200)[_0x4558[19]]({query:_0x5853x16})})[_0x4558[18]](function(_0x5853x13){console[_0x4558[39]](_0x4558[38],_0x5853x13)})};function getQuery(_0x5853x10,_0x5853x11){var _0x5853x18;return function(){return DefaultReport[_0x4558[36]](_0x4558[58])[_0x4558[34]](_0x5853x10[_0x4558[28]][_0x4558[27]])[_0x4558[21]](function(_0x5853x15){console[_0x4558[39]](_0x4558[47]);if(!_0x5853x15){return _0x5853x11[_0x4558[26]](404)};if(_0x5853x10[_0x4558[22]][_0x4558[48]]&& _0x5853x10[_0x4558[22]][_0x4558[48]]=== _0x4558[49]){_0x5853x10[_0x4558[22]][_0x4558[50]]= moment()[_0x4558[52]](_0x4558[51]);_0x5853x10[_0x4558[22]][_0x4558[53]]= moment()[_0x4558[52]](_0x4558[51]);_0x5853x15[_0x4558[54]][_0x4558[33]]= _0x5853x15[_0x4558[54]][_0x4558[33]][_0x4558[57]](_0x4558[55],_0x4558[56])};delete _0x5853x10[_0x4558[22]][_0x4558[48]];_0x5853x18= _0x5853x15[_0x4558[54]];return _0x5853x18[_0x4558[33]]})[_0x4558[21]](reportBuildUtils[_0x4558[46]](_0x5853x10[_0x4558[45]]))[_0x4558[21]](function(_0x5853x19){return [_0x5853x19,_0x5853x18]})[_0x4558[44]](reportBuildUtils[_0x4558[43]](_0x5853x10[_0x4558[22]]))}}exports[_0x4558[59]]= function(_0x5853x10,_0x5853x11){var _0x5853x1a;return Promise[_0x4558[42]]([])[_0x4558[21]](getQuery(_0x5853x10,_0x5853x11))[_0x4558[21]](reportBuildUtils[_0x4558[71]]())[_0x4558[21]](function(_0x5853x1b){if(_0x5853x1b&& _[_0x4558[60]](_0x5853x1b)){_0x5853x1a= _0x5853x1b[_0x4558[61]];if(_0x5853x10[_0x4558[22]][_0x4558[62]]){_0x5853x1b= _(_0x5853x1b)[_0x4558[66]](_0x5853x10[_0x4558[22]][_0x4558[65]]|| 0)[_0x4558[64]](_0x5853x10[_0x4558[22]][_0x4558[62]])[_0x4558[63]]()};_[_0x4558[69]](_0x5853x1b,function(_0x5853x1c){_[_0x4558[68]](_0x5853x1c,function(_0x5853x1d,_0x5853x1e){if(_0x5853x1d instanceof Date){_0x5853x1c[_0x5853x1e]= moment(_0x5853x1d)[_0x4558[52]](_0x4558[67]).toString()}})});_0x5853x11[_0x4558[20]](200)[_0x4558[19]]({rows:_0x5853x1b,count:_0x5853x1a})}else {return handleError(_0x5853x11,{message:_0x5853x1b|| _0x4558[70]})}})[_0x4558[18]](function(_0x5853x13){console[_0x4558[39]](_0x5853x13);return handleError(_0x5853x11,_0x5853x13)})};exports[_0x4558[72]]= function(_0x5853x10,_0x5853x11){docExtract(_0x5853x10,_0x5853x11,_0x4558[73])};exports[_0x4558[74]]= function(_0x5853x10,_0x5853x11){docExtract(_0x5853x10,_0x5853x11,_0x4558[75])};function docExtract(_0x5853x10,_0x5853x11,_0x5853x20){var _0x5853x15;DefaultReport[_0x4558[36]](_0x4558[58])[_0x4558[34]](_0x5853x10[_0x4558[28]][_0x4558[27]])[_0x4558[21]](function(_0x5853x18){if(!_0x5853x18){return _0x5853x11[_0x4558[26]](404)};_0x5853x15= _0x5853x18;return ReportTree[_0x4558[34]](1)})[_0x4558[21]](function(_0x5853x24){_0x5853x24= JSON[_0x4558[87]](_0x5853x24[_0x4558[86]]);var _0x5853x25=_[_0x4558[88]](_0x5853x24,{id:_0x5853x15[_0x4558[32]]});var _0x5853x26=getReportPath(_0x5853x25,_0x5853x24,_0x5853x15[_0x4558[31]]);if(_0x5853x10[_0x4558[22]][_0x4558[48]]&& _0x5853x10[_0x4558[22]][_0x4558[48]]=== _0x4558[49]){_0x5853x10[_0x4558[22]][_0x4558[50]]= moment()[_0x4558[52]](_0x4558[51]);_0x5853x10[_0x4558[22]][_0x4558[53]]= moment()[_0x4558[52]](_0x4558[51]);_0x5853x15[_0x4558[54]][_0x4558[33]]= _0x5853x15[_0x4558[54]][_0x4558[33]][_0x4558[57]](_0x4558[55],_0x4558[56])};delete _0x5853x10[_0x4558[22]][_0x4558[48]];return [_0x5853x15,ExtractedReport[_0x4558[94]]({name:_0x5853x26,startDate:_0x5853x10[_0x4558[22]][_0x4558[50]]?_0x5853x10[_0x4558[22]][_0x4558[50]]+ (_0x5853x10[_0x4558[22]][_0x4558[89]]?_0x4558[90]+ _0x5853x10[_0x4558[22]][_0x4558[89]]:_0x4558[91]):null,endDate:_0x5853x10[_0x4558[22]][_0x4558[53]]?_0x5853x10[_0x4558[22]][_0x4558[53]]+ (_0x5853x10[_0x4558[22]][_0x4558[92]]?_0x4558[90]+ _0x5853x10[_0x4558[22]][_0x4558[92]]:_0x4558[93]):null,output:_0x5853x20,UserId:_0x5853x10[_0x4558[45]][_0x4558[27]]})]})[_0x4558[44]](function(_0x5853x15,_0x5853x21){var _0x5853x22=cp[_0x4558[77]](__dirname+ _0x4558[76]);_0x5853x22[_0x4558[80]](_0x4558[83],function(_0x5853x23){console[_0x4558[39]](_0x4558[84],_0x5853x23);_0x5853x22[_0x4558[85]]()})[_0x4558[80]](_0x4558[81],function(){console[_0x4558[39]](_0x4558[82])})[_0x4558[80]](_0x4558[78],function(_0x5853x13){console[_0x4558[39]](_0x4558[79],_0x5853x13)});_0x5853x22[_0x4558[19]]({report:_0x5853x15,query:_0x5853x10[_0x4558[22]],extractedId:_0x5853x21[_0x4558[27]],user:_0x5853x10[_0x4558[45]],type:_0x5853x20})})[_0x4558[18]](function(_0x5853x13){console[_0x4558[39]](_0x5853x13);return handleError(_0x5853x11,_0x5853x13)});return _0x5853x11[_0x4558[26]](200)}function getReportPath(_0x5853x25,_0x5853x24,_0x5853x26){_0x5853x26= _0x5853x25[_0x4558[95]]+ _0x4558[96]+ _0x5853x26;if(_0x5853x25[_0x4558[32]]=== _0x4558[97]){return _0x5853x26}else {return getReportPath(_[_0x4558[88]](_0x5853x24,{id:_0x5853x25[_0x4558[32]]}),_0x5853x24,_0x5853x26)}}function getConditions(_0x5853x29){if(!_0x5853x29){return _0x4558[56]};for(var _0x5853x2a=_0x4558[98],_0x5853x2b=0;_0x5853x2b< _0x5853x29[_0x4558[99]][_0x4558[61]];_0x5853x2b++){_0x5853x2b> 0&& (_0x5853x2a+= _0x4558[90]+ _0x5853x29[_0x4558[100]]+ _0x4558[90]);_0x5853x2a+= _0x5853x29[_0x4558[99]][_0x5853x2b][_0x4558[101]]?getConditions(_0x5853x29[_0x4558[99]][_0x5853x2b][_0x4558[101]]):_0x5853x29[_0x4558[99]][_0x5853x2b][_0x4558[102]]+ _0x4558[90]+ _0x5853x29[_0x4558[99]][_0x5853x2b][_0x4558[103]]+ _0x4558[104]+ (_0x5853x29[_0x4558[99]][_0x5853x2b][_0x4558[103]]=== _0x4558[105]?_0x4558[106]+ _0x5853x29[_0x4558[99]][_0x5853x2b][_0x4558[63]]+ _0x4558[106]:_0x5853x29[_0x4558[99]][_0x5853x2b][_0x4558[63]])+ _0x4558[107]};return _0x5853x2a+ _0x4558[108]}exports[_0x4558[109]]= function(_0x5853x10,_0x5853x11){return DefaultReport[_0x4558[34]](_0x5853x10[_0x4558[28]][_0x4558[27]],{include:[{all:true}]})[_0x4558[21]](function(_0x5853x15){if(!_0x5853x15){return _0x5853x11[_0x4558[26]](404)};return _0x5853x11[_0x4558[19]](_0x5853x15)})[_0x4558[18]](function(_0x5853x13){return handleError(_0x5853x11,_0x5853x13)})};exports[_0x4558[110]]= function(_0x5853x10,_0x5853x11){var _0x5853x2c;return sequelize[_0x4558[115]](function(_0x5853x2d){return DefaultReport[_0x4558[36]]({method:[_0x4558[35],{DefaultReportId:_0x5853x10[_0x4558[28]][_0x4558[27]]}]})[_0x4558[34]](_0x5853x10[_0x4558[28]][_0x4558[27]])[_0x4558[21]](function(_0x5853x15){if(!_0x5853x15){return _0x5853x11[_0x4558[26]](404)};var _0x5853x2e=_0x5853x15[_0x4558[54]];console[_0x4558[39]](_0x5853x2e);delete _0x5853x2e[_0x4558[27]];delete _0x5853x2e[_0x4558[111]];delete _0x5853x2e[_0x4558[112]];_0x5853x2e[_0x4558[32]]= _0x5853x10[_0x4558[113]][_0x4558[32]];_0x5853x2c= _[_0x4558[114]](_0x5853x2e.Fields,_0x4558[54]);return CustomReport[_0x4558[94]](_0x5853x2e,{transaction:_0x5853x2d})})[_0x4558[21]](function(_0x5853x15){return [_0x5853x15,_0x5853x2c]})[_0x4558[44]](createCopyFields(_0x5853x2d))})[_0x4558[21]](function(){return _0x5853x11[_0x4558[26]](201)})[_0x4558[18]](function(_0x5853x13){console[_0x4558[39]](_0x5853x13);return handleError(_0x5853x11,_0x5853x13)})};function createCopyFields(_0x5853x2d){return function(_0x5853x15,_0x5853x30){if(_0x5853x30&& Array[_0x4558[60]](_0x5853x30)&& _0x5853x30[_0x4558[61]]){var _0x5853x31=reportBuildUtils[_0x4558[116]](_0x5853x15[_0x4558[33]]);if(_0x5853x31){var _0x5853x32;return _0x5853x31[_0x4558[131]]()[_0x4558[21]](function(_0x5853x33){_0x5853x32= _[_0x4558[117]](_0x5853x33);var _0x5853x34=[];var _0x5853x35=_[_0x4558[119]](_0x5853x30,_0x4558[118]);_[_0x4558[68]](_0x5853x35,function(_0x5853x36,_0x5853x1e){if(_0x5853x1e!== _0x4558[120]&& _0x5853x1e!== _0x4558[121]){_0x5853x36[0][_0x4558[124]][_0x4558[123]][_0x4558[69]](function(_0x5853x37){_0x5853x37[_0x4558[122]]= _0x5853x15[_0x4558[27]]});_0x5853x36[0][_0x4558[124]][_0x4558[31]]+= _0x4558[125]+ sr({length:5});_0x5853x34[_0x4558[126]](Metric[_0x4558[94]](_0x5853x36[0][_0x4558[124]][_0x4558[54]],{include:[{model:ReportField,as:_0x4558[123]}],transaction:_0x5853x2d}))}else {_0x5853x36[_0x4558[69]](function(_0x5853x37){if(_[_0x4558[127]](_0x5853x32,_0x5853x37[_0x4558[102]])|| _0x5853x37[_0x4558[128]]){_0x5853x37[_0x4558[122]]= _0x5853x15[_0x4558[27]];_0x5853x34[_0x4558[126]](ReportField[_0x4558[94]](_0x5853x37,{transaction:_0x5853x2d}))}else {throw new sequelize.Error(_0x4558[129]+ _0x5853x37[_0x4558[102]]+ _0x4558[130])}})}});return _0x5853x34})[_0x4558[42]]()}else {throw new sequelize.Error(_0x4558[132])}}}}exports[_0x4558[94]]= function(_0x5853x10,_0x5853x11){return DefaultReport[_0x4558[94]](_0x5853x10[_0x4558[113]])[_0x4558[21]](function(_0x5853x15){return _0x5853x11[_0x4558[20]](201)[_0x4558[19]](_0x5853x15)})[_0x4558[18]](function(_0x5853x13){return handleError(_0x5853x11,_0x5853x13)})};exports[_0x4558[133]]= function(_0x5853x10,_0x5853x11){if(_0x5853x10[_0x4558[113]][_0x4558[27]]){delete _0x5853x10[_0x4558[113]][_0x4558[27]]};return DefaultReport[_0x4558[34]](_0x5853x10[_0x4558[28]][_0x4558[27]])[_0x4558[21]](function(_0x5853x15){if(!_0x5853x15){return _0x5853x11[_0x4558[26]](404)};var _0x5853x38=_[_0x4558[134]](_0x5853x15,_0x5853x10[_0x4558[113]]);return _0x5853x38[_0x4558[135]]()})[_0x4558[21]](function(_0x5853x15){return _0x5853x11[_0x4558[20]](200)[_0x4558[19]](_0x5853x15)})[_0x4558[18]](function(_0x5853x13){return handleError(_0x5853x11,_0x5853x13)})};exports[_0x4558[136]]= function(_0x5853x10,_0x5853x11){return DefaultReport[_0x4558[34]](_0x5853x10[_0x4558[28]][_0x4558[27]])[_0x4558[21]](function(_0x5853x15){if(!_0x5853x15){return _0x5853x11[_0x4558[26]](404)};return _0x5853x15[_0x4558[136]]()})[_0x4558[21]](function(){return _0x5853x11[_0x4558[26]](204)})[_0x4558[18]](function(_0x5853x13){return handleError(_0x5853x11,_0x5853x13)})};function handleError(_0x5853x11,_0x5853x13){return _0x5853x11[_0x4558[20]](500)[_0x4558[19]](_0x5853x13)} \ No newline at end of file +'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); + } +} + +function getConditions(group) { + if (!group) return ""; + for (var str = "(", i = 0; i < group.rules.length; i++) { + i > 0 && (str += " " + group.operator + " "); + str += group.rules[i].group ? + getConditions(group.rules[i].group) : + group.rules[i].field + " " + group.rules[i].condition + " '" + (group.rules[i].condition === 'LIKE' ? "%" + group.rules[i].value + "%" : group.rules[i].value) + "'"; + } + + return str + ')'; +} + +// 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); +} diff --git a/server/api/default_report/default_report.events.js b/server/api/default_report/default_report.events.js index 28fe48b..d10d898 100644 --- a/server/api/default_report/default_report.events.js +++ b/server/api/default_report/default_report.events.js @@ -1 +1,36 @@ -var _0x676e=["\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"];_0x676e[0];const EventEmitter=require(_0x676e[1]);const DefaultReport=require(_0x676e[3])[_0x676e[2]];var DefaultReportEvents= new EventEmitter();DefaultReportEvents[_0x676e[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x676e[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x676e[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x676e[6]};for(var e in events){var event=events[e];DefaultReport[_0x676e[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x1b9bx8,_0x1b9bx9,_0x1b9bxa){DefaultReportEvents[_0x676e[10]](event+ _0x676e[8]+ _0x1b9bx8[_0x676e[9]],_0x1b9bx8);DefaultReportEvents[_0x676e[10]](event,_0x1b9bx8);_0x1b9bxa(null)}}module[_0x676e[11]]= DefaultReportEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/default_report/default_report.socket.js b/server/api/default_report/default_report.socket.js index 2536de1..db50575 100644 --- a/server/api/default_report/default_report.socket.js +++ b/server/api/default_report/default_report.socket.js @@ -1 +1,28 @@ -var _0x31f6=["\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"];_0x31f6[0];const DefaultReportEvents=require(_0x31f6[1]);var events=[_0x31f6[2],_0x31f6[3]];exports[_0x31f6[4]]= function(_0xc4c9x3){for(var _0xc4c9x4=0,_0xc4c9x5=events[_0x31f6[5]];_0xc4c9x4< _0xc4c9x5;_0xc4c9x4++){var _0xc4c9x6=events[_0xc4c9x4];var _0xc4c9x7=createListener(_0x31f6[6]+ _0xc4c9x6,_0xc4c9x3);DefaultReportEvents[_0x31f6[7]](_0xc4c9x6,_0xc4c9x7);_0xc4c9x3[_0x31f6[7]](_0x31f6[8],removeListener(_0xc4c9x6,_0xc4c9x7))}};function createListener(_0xc4c9x6,_0xc4c9x3){return function(_0xc4c9x9){_0xc4c9x3[_0x31f6[9]](_0xc4c9x6,_0xc4c9x9)}}function removeListener(_0xc4c9x6,_0xc4c9x7){return function(){DefaultReportEvents[_0x31f6[10]](_0xc4c9x6,_0xc4c9x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/default_report/index.js b/server/api/default_report/index.js index f3212be..019d6fb 100644 --- a/server/api/default_report/index.js +++ b/server/api/default_report/index.js @@ -1 +1,21 @@ -var _0x99e6=["\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"];_0x99e6[0];var express=require(_0x99e6[1]);var controller=require(_0x99e6[2]);var auth=require(_0x99e6[3]);var router=express.Router();router[_0x99e6[9]](_0x99e6[4],auth[_0x99e6[5]](),auth[_0x99e6[7]]([17],[_0x99e6[6]]),controller[_0x99e6[8]]);router[_0x99e6[9]](_0x99e6[10],auth[_0x99e6[5]](),auth[_0x99e6[7]]([17],[_0x99e6[6]]),controller[_0x99e6[11]]);router[_0x99e6[9]](_0x99e6[12],auth[_0x99e6[5]](),auth[_0x99e6[7]]([17],[_0x99e6[6]]),controller[_0x99e6[13]]);router[_0x99e6[9]](_0x99e6[14],auth[_0x99e6[5]](),auth[_0x99e6[7]]([17],[_0x99e6[6]]),controller[_0x99e6[15]]);router[_0x99e6[9]](_0x99e6[16],auth[_0x99e6[5]](),auth[_0x99e6[7]]([17],[_0x99e6[6]]),controller[_0x99e6[17]]);router[_0x99e6[9]](_0x99e6[18],auth[_0x99e6[5]](),auth[_0x99e6[7]]([17],[_0x99e6[6]]),controller[_0x99e6[19]]);router[_0x99e6[9]](_0x99e6[20],auth[_0x99e6[5]](),auth[_0x99e6[7]]([17],[_0x99e6[6]]),controller[_0x99e6[21]]);router[_0x99e6[24]](_0x99e6[22],auth[_0x99e6[5]](),auth[_0x99e6[7]]([17],[_0x99e6[6]]),controller[_0x99e6[23]]);module[_0x99e6[25]]= router \ No newline at end of file +'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; diff --git a/server/api/desk_account/desk_account.controller.js b/server/api/desk_account/desk_account.controller.js index 37b436c..f65313b 100644 --- a/server/api/desk_account/desk_account.controller.js +++ b/server/api/desk_account/desk_account.controller.js @@ -1 +1,255 @@ -var _0x69f0=["\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"];_0x69f0[0];var _=require(_0x69f0[1]);var util=require(_0x69f0[2]);var desk=require(_0x69f0[3]);var DeskAccount=require(_0x69f0[5])[_0x69f0[4]];exports[_0x69f0[6]]= function(_0xbdacx5,_0xbdacx6){var _0xbdacx7=[_0x69f0[7],_0x69f0[8],_0x69f0[9],_0x69f0[10]];var _0xbdacx8=_0xbdacx5[_0x69f0[12]][_0x69f0[11]]?parseInt(_0xbdacx5[_0x69f0[12]][_0x69f0[11]],10):100;var _0xbdacx9=_0xbdacx5[_0x69f0[12]][_0x69f0[13]]?parseInt(_0xbdacx5[_0x69f0[12]][_0x69f0[13]],10):0;var _0xbdacxa={where:{},limit:_0xbdacx8,offset:_0xbdacx9* _0xbdacx8};_[_0x69f0[27]](_0xbdacx5[_0x69f0[12]],function(_0xbdacxb,_0xbdacxc){switch(_0xbdacxc){case _0x69f0[11]:;case _0x69f0[13]:break;case _0x69f0[16]:_0xbdacxa[_0x69f0[14]]= util[_0x69f0[19]](_0x69f0[15],_0xbdacx5[_0x69f0[12]][_0x69f0[16]],_0xbdacx5[_0x69f0[12]][_0x69f0[17]]|| _0x69f0[18])|| null;break;case _0x69f0[17]:break;case _0x69f0[25]:_0xbdacxa[_0x69f0[21]][_0x69f0[20]]= [];_0xbdacx7[_0x69f0[24]](function(_0xbdacxd){var _0xbdacxe={};_0xbdacxe[_0xbdacxd]= {$like:_0x69f0[22]+ _0xbdacxb+ _0x69f0[22]};_0xbdacxa[_0x69f0[21]][_0x69f0[20]][_0x69f0[23]](_0xbdacxe)});break;default:_0xbdacxa[_0x69f0[21]][_0xbdacxc]= {$like:{}};_0xbdacxa[_0x69f0[21]][_0xbdacxc][_0x69f0[26]]= _0x69f0[22]+ _0xbdacxb+ _0x69f0[22]}});return DeskAccount[_0x69f0[42]](_0xbdacxa)[_0x69f0[41]](function(_0xbdacx10){var _0xbdacx11=Math[_0x69f0[33]](_0xbdacx10[_0x69f0[32]]/ _0xbdacx8);var _0xbdacx12=_0xbdacx11> (_0xbdacxa[_0x69f0[34]]+ 1)?util[_0x69f0[19]](_0x69f0[35],_0xbdacx5[_0x69f0[36]],_0xbdacx5[_0x69f0[38]][_0x69f0[37]],_0xbdacx5[_0x69f0[39]],_0xbdacx9+ 1):null;var _0xbdacx13=_0xbdacx9> 0?util[_0x69f0[19]](_0x69f0[35],_0xbdacx5[_0x69f0[36]],_0xbdacx5[_0x69f0[38]][_0x69f0[37]],_0xbdacx5[_0x69f0[39]],_0xbdacx9- 1):null;return _0xbdacx6[_0x69f0[30]](200)[_0x69f0[29]]({count:_0xbdacx10[_0x69f0[32]],rows:_0xbdacx10[_0x69f0[40]],next_page:_0xbdacx12,previous_page:_0xbdacx13,total_pages:_0xbdacx11})})[_0x69f0[31]](function(_0xbdacxf){return _0xbdacx6[_0x69f0[30]](500)[_0x69f0[29]]({error:_0x69f0[28]})})};exports[_0x69f0[43]]= function(_0xbdacx5,_0xbdacx6){DeskAccount[_0x69f0[47]](_0xbdacx5[_0x69f0[46]][_0x69f0[45]])[_0x69f0[41]](function(_0xbdacx14){if(!_0xbdacx14){return _0xbdacx6[_0x69f0[44]](404)};return _0xbdacx6[_0x69f0[29]](_0xbdacx14)})[_0x69f0[31]](function(_0xbdacxf){return handleError(_0xbdacx6,_0xbdacxf)})};exports[_0x69f0[48]]= function(_0xbdacx5,_0xbdacx6,_0xbdacx15){DeskAccount[_0x69f0[48]](_0xbdacx5[_0x69f0[49]])[_0x69f0[41]](function(_0xbdacx14){return _0xbdacx6[_0x69f0[30]](201)[_0x69f0[29]](_0xbdacx14)})[_0x69f0[31]](function(_0xbdacxf){return handleError(_0xbdacx6,_0xbdacxf)})};exports[_0x69f0[50]]= function(_0xbdacx5,_0xbdacx6){if(_0xbdacx5[_0x69f0[49]][_0x69f0[45]]){delete _0xbdacx5[_0x69f0[49]][_0x69f0[45]]};DeskAccount[_0x69f0[47]](_0xbdacx5[_0x69f0[46]][_0x69f0[45]])[_0x69f0[41]](function(_0xbdacx14){if(!_0xbdacx14){return _0xbdacx6[_0x69f0[44]](404)};var _0xbdacx16=_[_0x69f0[51]](_0xbdacx14,_0xbdacx5[_0x69f0[49]]);_0xbdacx16[_0x69f0[52]]()[_0x69f0[41]](function(){return _0xbdacx6[_0x69f0[30]](200)[_0x69f0[29]](_0xbdacx14)})[_0x69f0[31]](function(_0xbdacxf){return handleError(_0xbdacx6,_0xbdacxf)})})[_0x69f0[31]](function(_0xbdacxf){return handleError(_0xbdacx6,_0xbdacxf)})};exports[_0x69f0[53]]= function(_0xbdacx5,_0xbdacx6){DeskAccount[_0x69f0[47]](_0xbdacx5[_0x69f0[46]][_0x69f0[45]])[_0x69f0[41]](function(_0xbdacx14){if(!_0xbdacx14){return _0xbdacx6[_0x69f0[44]](404)};_0xbdacx14[_0x69f0[53]]()[_0x69f0[41]](function(){return _0xbdacx6[_0x69f0[44]](204)})[_0x69f0[31]](function(_0xbdacxf){return handleError(_0xbdacx6,_0xbdacxf)})})[_0x69f0[31]](function(_0xbdacxf){return handleError(_0xbdacx6,_0xbdacxf)})};exports[_0x69f0[54]]= function(_0xbdacx5,_0xbdacx6){DeskAccount[_0x69f0[47]](_0xbdacx5[_0x69f0[46]][_0x69f0[45]])[_0x69f0[41]](function(_0xbdacx17){var _0xbdacx14={endpoint:stripTrailingSlash(_0xbdacx17[_0x69f0[10]]),retry:false};if(_0xbdacx17[_0x69f0[55]]=== _0x69f0[56]){_0xbdacx14[_0x69f0[9]]= _0xbdacx17[_0x69f0[9]];_0xbdacx14[_0x69f0[57]]= _0xbdacx17[_0x69f0[57]]}else {if(_0xbdacx17[_0x69f0[55]]=== _0x69f0[58]){_0xbdacx14[_0x69f0[59]]= _0xbdacx17[_0x69f0[59]];_0xbdacx14[_0x69f0[60]]= _0xbdacx17[_0x69f0[60]];_0xbdacx14[_0x69f0[61]]= _0xbdacx17[_0x69f0[61]];_0xbdacx14[_0x69f0[62]]= _0xbdacx17[_0x69f0[62]]}};var _0xbdacx18=desk[_0x69f0[63]](_0xbdacx14);_0xbdacx18[_0x69f0[65]](_0x69f0[64],function(_0xbdacxf,_0xbdacx19,_0xbdacx1a){if(_0xbdacxf){return handleError(_0xbdacx6,_0xbdacxf)};return _0xbdacx6[_0x69f0[44]](200)})})[_0x69f0[31]](function(_0xbdacxf){return handleError(_0xbdacx6,_0xbdacxf)})};exports[_0x69f0[66]]= function(_0xbdacx5,_0xbdacx6){var _0xbdacx1b={};_0xbdacx1b[_0xbdacx5[_0x69f0[46]][_0x69f0[67]]]= _0xbdacx5[_0x69f0[49]][_0x69f0[68]];DeskAccount[_0x69f0[42]]({where:_0xbdacx1b})[_0x69f0[41]](function(_0xbdacx10){if(_0xbdacx10[_0x69f0[32]]){return _0xbdacx6[_0x69f0[30]](200)[_0x69f0[29]]({isValid:false,value:_0xbdacx5[_0x69f0[49]][_0x69f0[68]]})};return _0xbdacx6[_0x69f0[30]](200)[_0x69f0[29]]({isValid:true,value:_0xbdacx5[_0x69f0[49]][_0x69f0[68]]})})[_0x69f0[31]](function(_0xbdacxf){return handleError(_0xbdacx6,_0xbdacxf)})};exports[_0x69f0[69]]= function(_0xbdacx5,_0xbdacx6){DeskAccount[_0x69f0[47]](_0xbdacx5[_0x69f0[46]][_0x69f0[45]])[_0x69f0[41]](function(_0xbdacx17){var _0xbdacx14={endpoint:stripTrailingSlash(_0xbdacx17[_0x69f0[10]]),retry:false};if(_0xbdacx17[_0x69f0[55]]=== _0x69f0[56]){_0xbdacx14[_0x69f0[9]]= _0xbdacx17[_0x69f0[9]];_0xbdacx14[_0x69f0[57]]= _0xbdacx17[_0x69f0[57]]}else {if(_0xbdacx17[_0x69f0[55]]=== _0x69f0[58]){_0xbdacx14[_0x69f0[59]]= _0xbdacx17[_0x69f0[59]];_0xbdacx14[_0x69f0[60]]= _0xbdacx17[_0x69f0[60]];_0xbdacx14[_0x69f0[61]]= _0xbdacx17[_0x69f0[61]];_0xbdacx14[_0x69f0[62]]= _0xbdacx17[_0x69f0[62]]}};var _0xbdacx18=desk[_0x69f0[63]](_0xbdacx14);_0xbdacx18[_0x69f0[65]](_0x69f0[70],function(_0xbdacxf,_0xbdacx19,_0xbdacx1a){if(_0xbdacxf){return handleError(_0xbdacx6,_0xbdacxf)};return _0xbdacx6[_0x69f0[30]](200)[_0x69f0[73]](_0xbdacx19[_0x69f0[72]][_0x69f0[71]])})})[_0x69f0[31]](function(_0xbdacxf){return handleError(_0xbdacx6,_0xbdacxf)})};exports[_0x69f0[74]]= function(_0xbdacx5,_0xbdacx6){DeskAccount[_0x69f0[53]]({where:{id:_0xbdacx5[_0x69f0[12]][_0x69f0[45]]},individualHooks:true})[_0x69f0[41]](function(){return _0xbdacx6[_0x69f0[44]](204)})[_0x69f0[31]](function(_0xbdacxf){return handleError(_0xbdacx6,_0xbdacxf)})};function stripTrailingSlash(_0xbdacx1d){if(_0xbdacx1d[_0x69f0[75]](-1) === _0x69f0[76]){return _0xbdacx1d[_0x69f0[75]](0,_0xbdacx1d[_0x69f0[77]]- 1)};return _0xbdacx1d}function handleError(_0xbdacx6,_0xbdacxf){return _0xbdacx6[_0x69f0[30]](500)[_0x69f0[29]](_0xbdacxf)} \ No newline at end of file +'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); +} diff --git a/server/api/desk_account/desk_account.events.js b/server/api/desk_account/desk_account.events.js index 0a450fd..3a0d697 100644 --- a/server/api/desk_account/desk_account.events.js +++ b/server/api/desk_account/desk_account.events.js @@ -1 +1,36 @@ -var _0xf28b=["\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"];_0xf28b[0];const EventEmitter=require(_0xf28b[1]);const DeskAccount=require(_0xf28b[3])[_0xf28b[2]];var DeskAccountEvents= new EventEmitter();DeskAccountEvents[_0xf28b[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xf28b[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xf28b[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xf28b[6]};for(var e in events){var event=events[e];DeskAccount[_0xf28b[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x478bx8,_0x478bx9,_0x478bxa){DeskAccountEvents[_0xf28b[10]](event+ _0xf28b[8]+ _0x478bx8[_0xf28b[9]],_0x478bx8);DeskAccountEvents[_0xf28b[10]](event,_0x478bx8);_0x478bxa(null)}}module[_0xf28b[11]]= DeskAccountEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/desk_account/desk_account.socket.js b/server/api/desk_account/desk_account.socket.js index 0b3a652..1d543a4 100644 --- a/server/api/desk_account/desk_account.socket.js +++ b/server/api/desk_account/desk_account.socket.js @@ -1 +1,28 @@ -var _0x5fa7=["\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"];_0x5fa7[0];const DeskAccountEvents=require(_0x5fa7[1]);var events=[_0x5fa7[2],_0x5fa7[3]];exports[_0x5fa7[4]]= function(_0xfeb8x3){for(var _0xfeb8x4=0,_0xfeb8x5=events[_0x5fa7[5]];_0xfeb8x4< _0xfeb8x5;_0xfeb8x4++){var _0xfeb8x6=events[_0xfeb8x4];var _0xfeb8x7=createListener(_0x5fa7[6]+ _0xfeb8x6,_0xfeb8x3);DeskAccountEvents[_0x5fa7[7]](_0xfeb8x6,_0xfeb8x7);_0xfeb8x3[_0x5fa7[7]](_0x5fa7[8],removeListener(_0xfeb8x6,_0xfeb8x7))}};function createListener(_0xfeb8x6,_0xfeb8x3){return function(_0xfeb8x9){_0xfeb8x3[_0x5fa7[9]](_0xfeb8x6,_0xfeb8x9)}}function removeListener(_0xfeb8x6,_0xfeb8x7){return function(){DeskAccountEvents[_0x5fa7[10]](_0xfeb8x6,_0xfeb8x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/desk_account/index.js b/server/api/desk_account/index.js index 0e65e51..506e627 100644 --- a/server/api/desk_account/index.js +++ b/server/api/desk_account/index.js @@ -1 +1,18 @@ -var _0x1c87=["\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"];_0x1c87[0];var express=require(_0x1c87[1]);var controller=require(_0x1c87[2]);var auth=require(_0x1c87[3]);var router=express.Router();router[_0x1c87[9]](_0x1c87[4],auth[_0x1c87[5]](),auth[_0x1c87[7]]([19,13],[_0x1c87[6]]),controller[_0x1c87[8]]);router[_0x1c87[9]](_0x1c87[10],auth[_0x1c87[5]](),auth[_0x1c87[7]]([19],[_0x1c87[6]]),controller[_0x1c87[11]]);router[_0x1c87[9]](_0x1c87[12],auth[_0x1c87[5]](),auth[_0x1c87[7]]([19],[_0x1c87[6]]),controller[_0x1c87[13]]);router[_0x1c87[9]](_0x1c87[14],auth[_0x1c87[5]](),auth[_0x1c87[7]]([19],[_0x1c87[6]]),controller[_0x1c87[15]]);router[_0x1c87[18]](_0x1c87[16],auth[_0x1c87[5]](),auth[_0x1c87[7]]([19],[_0x1c87[6]]),controller[_0x1c87[17]]);router[_0x1c87[18]](_0x1c87[4],auth[_0x1c87[5]](),auth[_0x1c87[7]]([19],[_0x1c87[6]]),controller[_0x1c87[19]]);router[_0x1c87[21]](_0x1c87[10],auth[_0x1c87[5]](),auth[_0x1c87[7]]([19],[_0x1c87[6]]),controller[_0x1c87[20]]);router[_0x1c87[23]](_0x1c87[4],auth[_0x1c87[5]](),auth[_0x1c87[7]]([19],[_0x1c87[6]]),controller[_0x1c87[22]]);router[_0x1c87[23]](_0x1c87[10],auth[_0x1c87[5]](),auth[_0x1c87[7]]([19],[_0x1c87[6]]),controller[_0x1c87[24]]);module[_0x1c87[25]]= router \ No newline at end of file +'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; diff --git a/server/api/desk_configuration/desk_configuration.controller.js b/server/api/desk_configuration/desk_configuration.controller.js index d3f5beb..3824ca1 100644 --- a/server/api/desk_configuration/desk_configuration.controller.js +++ b/server/api/desk_configuration/desk_configuration.controller.js @@ -1 +1,145 @@ -var _0x3659=["\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"];_0x3659[0];var _=require(_0x3659[1]);var DeskConfiguration=require(_0x3659[3])[_0x3659[2]];var DeskField=require(_0x3659[3])[_0x3659[4]];function handleError(_0x84eax5,_0x84eax6){_0x84eax6= _0x84eax6|| 500;return function(_0x84eax7){_0x84eax5[_0x3659[6]](_0x84eax6)[_0x3659[5]](_0x84eax7)}}function responseWithResult(_0x84eax5,_0x84eax6){_0x84eax6= _0x84eax6|| 200;return function(_0x84eax9){if(_0x84eax9){_0x84eax5[_0x3659[6]](_0x84eax6)[_0x3659[7]](_0x84eax9)}}}function handleEntityNotFound(_0x84eax5){return function(_0x84eax9){if(!_0x84eax9){_0x84eax5[_0x3659[6]](404)[_0x3659[8]]();return null};return _0x84eax9}}function saveUpdates(_0x84eaxc){return function(_0x84eax9){return _0x84eax9[_0x3659[10]](_0x84eaxc)[_0x3659[9]](function(_0x84eaxd){return _0x84eaxd})}}function removeEntity(_0x84eax5){return function(_0x84eax9){if(_0x84eax9){return _0x84eax9[_0x3659[11]]()[_0x3659[9]](function(){_0x84eax5[_0x3659[6]](204)[_0x3659[8]]()})}}}exports[_0x3659[12]]= function(_0x84eaxf,_0x84eax5){DeskConfiguration[_0x3659[15]]({where:_0x84eaxf[_0x3659[14]]})[_0x3659[9]](responseWithResult(_0x84eax5))[_0x3659[13]](handleError(_0x84eax5))};exports[_0x3659[16]]= function(_0x84eaxf,_0x84eax5){DeskConfiguration[_0x3659[22]]({where:{id:_0x84eaxf[_0x3659[18]][_0x3659[17]]},include:[{model:DeskField,as:_0x3659[19]},{model:DeskField,as:_0x3659[20]},{model:DeskField,as:_0x3659[21]}]})[_0x3659[9]](handleEntityNotFound(_0x84eax5))[_0x3659[9]](responseWithResult(_0x84eax5))[_0x3659[13]](handleError(_0x84eax5))};exports[_0x3659[23]]= function(_0x84eaxf,_0x84eax5){DeskConfiguration[_0x3659[23]](_0x84eaxf[_0x3659[24]])[_0x3659[9]](responseWithResult(_0x84eax5,201))[_0x3659[13]](handleError(_0x84eax5))};exports[_0x3659[25]]= function(_0x84eaxf,_0x84eax5){if(_0x84eaxf[_0x3659[24]][_0x3659[17]]){delete _0x84eaxf[_0x3659[24]][_0x3659[17]]};DeskConfiguration[_0x3659[26]](_0x84eaxf[_0x3659[18]][_0x3659[17]])[_0x3659[9]](handleEntityNotFound(_0x84eax5))[_0x3659[9]](saveUpdates(_0x84eaxf[_0x3659[24]]))[_0x3659[9]](responseWithResult(_0x84eax5))[_0x3659[13]](handleError(_0x84eax5))};exports[_0x3659[11]]= function(_0x84eaxf,_0x84eax5){DeskConfiguration[_0x3659[26]](_0x84eaxf[_0x3659[18]][_0x3659[17]])[_0x3659[9]](handleEntityNotFound(_0x84eax5))[_0x3659[9]](removeEntity(_0x84eax5))[_0x3659[13]](handleError(_0x84eax5))};exports[_0x3659[27]]= function(_0x84eaxf,_0x84eax5,_0x84eax10){var _0x84eax11;DeskConfiguration[_0x3659[26]](_0x84eaxf[_0x3659[18]][_0x3659[17]])[_0x3659[9]](handleEntityNotFound(_0x84eax5))[_0x3659[9]](function(_0x84eax14){_0x84eax11= _0x84eax14;return DeskField[_0x3659[23]](_0x84eaxf[_0x3659[24]])})[_0x3659[9]](function(_0x84eax13){switch(_0x84eaxf[_0x3659[18]][_0x3659[35]]){case _0x3659[30]:return [_0x84eax11[_0x3659[29]](_0x84eax13),_0x84eax13];case _0x3659[32]:return [_0x84eax11[_0x3659[31]](_0x84eax13),_0x84eax13];case _0x3659[34]:return [_0x84eax11[_0x3659[33]](_0x84eax13),_0x84eax13]}})[_0x3659[28]](function(_0x84eax12,_0x84eax13){return _0x84eax5[_0x3659[6]](201)[_0x3659[7]](_0x84eax13)})[_0x3659[13]](handleError(_0x84eax5))} \ No newline at end of file +/** + * 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)); +}; diff --git a/server/api/desk_configuration/desk_configuration.events.js b/server/api/desk_configuration/desk_configuration.events.js index 62f3a92..12fbc47 100644 --- a/server/api/desk_configuration/desk_configuration.events.js +++ b/server/api/desk_configuration/desk_configuration.events.js @@ -1 +1,36 @@ -var _0xd6ef=["\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"];_0xd6ef[0];const EventEmitter=require(_0xd6ef[1]);const DeskConfiguration=require(_0xd6ef[3])[_0xd6ef[2]];var DeskConfigurationEvents= new EventEmitter();DeskConfigurationEvents[_0xd6ef[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd6ef[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd6ef[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd6ef[6]};for(var e in events){var event=events[e];DeskConfiguration[_0xd6ef[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x3f53x8,_0x3f53x9,_0x3f53xa){DeskConfigurationEvents[_0xd6ef[10]](event+ _0xd6ef[8]+ _0x3f53x8[_0xd6ef[9]],_0x3f53x8);DeskConfigurationEvents[_0xd6ef[10]](event,_0x3f53x8);_0x3f53xa(null)}}module[_0xd6ef[11]]= DeskConfigurationEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/desk_configuration/desk_configuration.socket.js b/server/api/desk_configuration/desk_configuration.socket.js index e97ad4b..5bc3ca6 100644 --- a/server/api/desk_configuration/desk_configuration.socket.js +++ b/server/api/desk_configuration/desk_configuration.socket.js @@ -1 +1,28 @@ -var _0x180c=["\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"];_0x180c[0];const DeskConfigurationEvents=require(_0x180c[1]);var events=[_0x180c[2],_0x180c[3]];exports[_0x180c[4]]= function(_0xec05x3){for(var _0xec05x4=0,_0xec05x5=events[_0x180c[5]];_0xec05x4< _0xec05x5;_0xec05x4++){var _0xec05x6=events[_0xec05x4];var _0xec05x7=createListener(_0x180c[6]+ _0xec05x6,_0xec05x3);DeskConfigurationEvents[_0x180c[7]](_0xec05x6,_0xec05x7);_0xec05x3[_0x180c[7]](_0x180c[8],removeListener(_0xec05x6,_0xec05x7))}};function createListener(_0xec05x6,_0xec05x3){return function(_0xec05x9){_0xec05x3[_0x180c[9]](_0xec05x6,_0xec05x9)}}function removeListener(_0xec05x6,_0xec05x7){return function(){DeskConfigurationEvents[_0x180c[10]](_0xec05x6,_0xec05x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/desk_configuration/index.js b/server/api/desk_configuration/index.js index f31e6e7..23cf463 100644 --- a/server/api/desk_configuration/index.js +++ b/server/api/desk_configuration/index.js @@ -1 +1,18 @@ -var _0x7ba1=["\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"];_0x7ba1[0];var express=require(_0x7ba1[1]);var auth=require(_0x7ba1[2]);var controller=require(_0x7ba1[3]);var router=express.Router();router[_0x7ba1[7]](_0x7ba1[4],auth[_0x7ba1[5]](),controller[_0x7ba1[6]]);router[_0x7ba1[7]](_0x7ba1[8],auth[_0x7ba1[5]](),auth[_0x7ba1[10]]([19],[_0x7ba1[9]]),controller[_0x7ba1[11]]);router[_0x7ba1[13]](_0x7ba1[4],auth[_0x7ba1[5]](),auth[_0x7ba1[10]]([19],[_0x7ba1[9]]),controller[_0x7ba1[12]]);router[_0x7ba1[15]](_0x7ba1[8],auth[_0x7ba1[5]](),auth[_0x7ba1[10]]([19],[_0x7ba1[9]]),controller[_0x7ba1[14]]);router[_0x7ba1[13]](_0x7ba1[16],auth[_0x7ba1[5]](),auth[_0x7ba1[10]]([19],[_0x7ba1[9]]),controller[_0x7ba1[17]]);router[_0x7ba1[19]](_0x7ba1[8],auth[_0x7ba1[5]](),auth[_0x7ba1[10]]([19],[_0x7ba1[9]]),controller[_0x7ba1[18]]);module[_0x7ba1[20]]= router \ No newline at end of file +'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; diff --git a/server/api/desk_field/desk_field.controller.js b/server/api/desk_field/desk_field.controller.js index 783bcfd..6b39f83 100644 --- a/server/api/desk_field/desk_field.controller.js +++ b/server/api/desk_field/desk_field.controller.js @@ -1 +1,104 @@ -var _0xaa00=["\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"];_0xaa00[0];var _=require(_0xaa00[1]);var DeskField=require(_0xaa00[3])[_0xaa00[2]];function handleError(_0x2d9fx4,_0x2d9fx5){_0x2d9fx5= _0x2d9fx5|| 500;return function(_0x2d9fx6){_0x2d9fx4[_0xaa00[5]](_0x2d9fx5)[_0xaa00[4]](_0x2d9fx6)}}function responseWithResult(_0x2d9fx4,_0x2d9fx5){_0x2d9fx5= _0x2d9fx5|| 200;return function(_0x2d9fx8){if(_0x2d9fx8){_0x2d9fx4[_0xaa00[5]](_0x2d9fx5)[_0xaa00[6]](_0x2d9fx8)}}}function handleEntityNotFound(_0x2d9fx4){return function(_0x2d9fx8){if(!_0x2d9fx8){_0x2d9fx4[_0xaa00[5]](404)[_0xaa00[7]]();return null};return _0x2d9fx8}}function saveUpdates(_0x2d9fxb){return function(_0x2d9fx8){return _0x2d9fx8[_0xaa00[9]](_0x2d9fxb)[_0xaa00[8]](function(_0x2d9fxc){return _0x2d9fxc})}}function removeEntity(_0x2d9fx4){return function(_0x2d9fx8){if(_0x2d9fx8){return _0x2d9fx8[_0xaa00[10]]()[_0xaa00[8]](function(){_0x2d9fx4[_0xaa00[5]](204)[_0xaa00[7]]()})}}}exports[_0xaa00[11]]= function(_0x2d9fxe,_0x2d9fx4){DeskField[_0xaa00[13]]()[_0xaa00[8]](responseWithResult(_0x2d9fx4))[_0xaa00[12]](handleError(_0x2d9fx4))};exports[_0xaa00[14]]= function(_0x2d9fxe,_0x2d9fx4){DeskField[_0xaa00[17]](_0x2d9fxe[_0xaa00[16]][_0xaa00[15]])[_0xaa00[8]](handleEntityNotFound(_0x2d9fx4))[_0xaa00[8]](responseWithResult(_0x2d9fx4))[_0xaa00[12]](handleError(_0x2d9fx4))};exports[_0xaa00[18]]= function(_0x2d9fxe,_0x2d9fx4){DeskField[_0xaa00[18]](_0x2d9fxe[_0xaa00[19]])[_0xaa00[8]](responseWithResult(_0x2d9fx4,201))[_0xaa00[12]](handleError(_0x2d9fx4))};exports[_0xaa00[20]]= function(_0x2d9fxe,_0x2d9fx4){if(_0x2d9fxe[_0xaa00[19]][_0xaa00[15]]){delete _0x2d9fxe[_0xaa00[19]][_0xaa00[15]]};DeskField[_0xaa00[17]](_0x2d9fxe[_0xaa00[16]][_0xaa00[15]])[_0xaa00[8]](handleEntityNotFound(_0x2d9fx4))[_0xaa00[8]](saveUpdates(_0x2d9fxe[_0xaa00[19]]))[_0xaa00[8]](responseWithResult(_0x2d9fx4))[_0xaa00[12]](handleError(_0x2d9fx4))};exports[_0xaa00[10]]= function(_0x2d9fxe,_0x2d9fx4){DeskField[_0xaa00[17]](_0x2d9fxe[_0xaa00[16]][_0xaa00[15]])[_0xaa00[8]](handleEntityNotFound(_0x2d9fx4))[_0xaa00[8]](removeEntity(_0x2d9fx4))[_0xaa00[12]](handleError(_0x2d9fx4))} \ No newline at end of file +/** + * 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)); +} diff --git a/server/api/desk_field/desk_field.events.js b/server/api/desk_field/desk_field.events.js index db742a7..90e8c70 100644 --- a/server/api/desk_field/desk_field.events.js +++ b/server/api/desk_field/desk_field.events.js @@ -1 +1,36 @@ -var _0x6ead=["\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"];_0x6ead[0];const EventEmitter=require(_0x6ead[1]);const DeskField=require(_0x6ead[3])[_0x6ead[2]];var DeskFieldEvents= new EventEmitter();DeskFieldEvents[_0x6ead[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x6ead[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x6ead[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x6ead[6]};for(var e in events){var event=events[e];DeskField[_0x6ead[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xf49ex8,_0xf49ex9,_0xf49exa){DeskFieldEvents[_0x6ead[10]](event+ _0x6ead[8]+ _0xf49ex8[_0x6ead[9]],_0xf49ex8);DeskFieldEvents[_0x6ead[10]](event,_0xf49ex8);_0xf49exa(null)}}module[_0x6ead[11]]= DeskFieldEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/desk_field/desk_field.socket.js b/server/api/desk_field/desk_field.socket.js index ceaacc1..b8144e2 100644 --- a/server/api/desk_field/desk_field.socket.js +++ b/server/api/desk_field/desk_field.socket.js @@ -1 +1,28 @@ -var _0x7890=["\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"];_0x7890[0];const DeskFieldEvents=require(_0x7890[1]);var events=[_0x7890[2],_0x7890[3]];exports[_0x7890[4]]= function(_0xe434x3){for(var _0xe434x4=0,_0xe434x5=events[_0x7890[5]];_0xe434x4< _0xe434x5;_0xe434x4++){var _0xe434x6=events[_0xe434x4];var _0xe434x7=createListener(_0x7890[6]+ _0xe434x6,_0xe434x3);DeskFieldEvents[_0x7890[7]](_0xe434x6,_0xe434x7);_0xe434x3[_0x7890[7]](_0x7890[8],removeListener(_0xe434x6,_0xe434x7))}};function createListener(_0xe434x6,_0xe434x3){return function(_0xe434x9){_0xe434x3[_0x7890[9]](_0xe434x6,_0xe434x9)}}function removeListener(_0xe434x6,_0xe434x7){return function(){DeskFieldEvents[_0x7890[10]](_0xe434x6,_0xe434x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/desk_field/index.js b/server/api/desk_field/index.js index 857c995..37342d1 100644 --- a/server/api/desk_field/index.js +++ b/server/api/desk_field/index.js @@ -1 +1,16 @@ -var _0xac09=["\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"];_0xac09[0];var express=require(_0xac09[1]);var auth=require(_0xac09[2]);var controller=require(_0xac09[3]);var router=express.Router();router[_0xac09[9]](_0xac09[4],auth[_0xac09[5]](),auth[_0xac09[7]]([19],[_0xac09[6]]),controller[_0xac09[8]]);router[_0xac09[9]](_0xac09[10],auth[_0xac09[5]](),auth[_0xac09[7]]([19],[_0xac09[6]]),controller[_0xac09[11]]);router[_0xac09[13]](_0xac09[4],auth[_0xac09[5]](),auth[_0xac09[7]]([19],[_0xac09[6]]),controller[_0xac09[12]]);router[_0xac09[15]](_0xac09[10],auth[_0xac09[5]](),auth[_0xac09[7]]([19],[_0xac09[6]]),controller[_0xac09[14]]);router[_0xac09[17]](_0xac09[10],auth[_0xac09[5]](),auth[_0xac09[7]]([19],[_0xac09[6]]),controller[_0xac09[16]]);module[_0xac09[18]]= router \ No newline at end of file +'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; diff --git a/server/api/extracted_report/extracted_report.controller.js b/server/api/extracted_report/extracted_report.controller.js index e4dab20..454f170 100644 --- a/server/api/extracted_report/extracted_report.controller.js +++ b/server/api/extracted_report/extracted_report.controller.js @@ -1 +1,207 @@ -var _0xd460=["\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"];_0xd460[0];var _=require(_0xd460[1]);var ExtractedReport=require(_0xd460[3])[_0xd460[2]];var util=require(_0xd460[4]);var path=require(_0xd460[5]);var moment=require(_0xd460[6]);var config=require(_0xd460[7]);var base64=require(_0xd460[8]);var fs=require(_0xd460[9]);var Util=require(_0xd460[10]);exports[_0xd460[11]]= function(_0x6118xa,_0x6118xb,_0x6118xc){switch(_0x6118xa[_0xd460[18]][_0xd460[21]]){case _0xd460[18]:return ExtractedReport[_0xd460[20]](Util[_0xd460[19]](_0x6118xa[_0xd460[16]],{UserId:_0x6118xa[_0xd460[18]][_0xd460[17]]}))[_0xd460[15]](function(_0x6118xe){_0x6118xb[_0xd460[14]](200)[_0xd460[13]](_0x6118xe)})[_0xd460[12]](function(_0x6118xd){return handleError(_0x6118xb,_0x6118xd)});default:return ExtractedReport[_0xd460[20]](Util[_0xd460[19]](_0x6118xa[_0xd460[16]]))[_0xd460[15]](function(_0x6118xe){_0x6118xb[_0xd460[14]](200)[_0xd460[13]](_0x6118xe)})[_0xd460[12]](function(_0x6118xd){return handleError(_0x6118xb,_0x6118xd)})}};exports[_0xd460[22]]= function(_0x6118xa,_0x6118xb){return ExtractedReport[_0xd460[25]](_0x6118xa[_0xd460[24]][_0xd460[17]])[_0xd460[15]](function(_0x6118xf){if(!_0x6118xf){return _0x6118xb[_0xd460[23]](404)};return _0x6118xb[_0xd460[13]](_0x6118xf)})[_0xd460[12]](function(_0x6118xd){return handleError(_0x6118xb,_0x6118xd)})};exports[_0xd460[26]]= function(_0x6118xa,_0x6118xb){return ExtractedReport[_0xd460[25]](_0x6118xa[_0xd460[24]][_0xd460[17]])[_0xd460[15]](function(_0x6118x10){if(!_0x6118x10){return _0x6118xb[_0xd460[14]](404)[_0xd460[13]](_0x6118x10)};var _0x6118x11=path[_0xd460[32]](config[_0xd460[27]],_0xd460[28],_0xd460[29],_0xd460[30],_0x6118x10[_0xd460[31]]);base64[_0xd460[33]](_0x6118x11,function(_0x6118xd,_0x6118x12){if(_0x6118xd){return handleError(_0x6118xb,_0x6118xd)}else {return _0x6118xb[_0xd460[14]](200)[_0xd460[13]]({downloadString:_0x6118x12})}})})[_0xd460[12]](function(_0x6118xd){return handleError(_0x6118xb,_0x6118xd)})};exports[_0xd460[34]]= function(_0x6118xa,_0x6118xb){return ExtractedReport[_0xd460[34]](_0x6118xa[_0xd460[35]])[_0xd460[15]](function(_0x6118xf){return _0x6118xb[_0xd460[14]](201)[_0xd460[13]](_0x6118xf)})[_0xd460[12]](function(_0x6118xd){return handleError(_0x6118xb,_0x6118xd)})};exports[_0xd460[36]]= function(_0x6118xa,_0x6118xb){return ExtractedReport[_0xd460[40]]({where:{name:_0x6118xa[_0xd460[35]][_0xd460[39]],id:{$ne:_0x6118xa[_0xd460[35]][_0xd460[17]]}}})[_0xd460[15]](function(_0x6118x14){if(!_0x6118x14){return _0x6118xb[_0xd460[23]](404)};if(_0x6118xa[_0xd460[35]][_0xd460[17]]){delete _0x6118xa[_0xd460[35]][_0xd460[17]]};return ExtractedReport[_0xd460[25]](_0x6118xa[_0xd460[24]][_0xd460[17]])})[_0xd460[15]](function(_0x6118xf){if(!_0x6118xf){return _0x6118xb[_0xd460[23]](404)};var _0x6118x13=_[_0xd460[37]](_0x6118xf,_0x6118xa[_0xd460[35]]);return _0x6118x13[_0xd460[38]]()})[_0xd460[15]](function(_0x6118xf){return _0x6118xb[_0xd460[14]](200)[_0xd460[13]](_0x6118xf)})[_0xd460[12]](function(_0x6118xd){return handleError(_0x6118xb,_0x6118xd)})};exports[_0xd460[41]]= function(_0x6118xa,_0x6118xb){var _0x6118x15;return ExtractedReport[_0xd460[25]](_0x6118xa[_0xd460[24]][_0xd460[17]])[_0xd460[15]](function(_0x6118xf){_0x6118x15= _0x6118xf;if(!_0x6118xf){return _0x6118xb[_0xd460[23]](404)};return _0x6118xf[_0xd460[41]]()})[_0xd460[15]](function(){if(_0x6118x15[_0xd460[31]]){var _0x6118x11=path[_0xd460[32]](config[_0xd460[27]],_0xd460[28],_0xd460[29],_0xd460[30],_0x6118x15[_0xd460[31]]);fs[_0xd460[50]](_0x6118x11,fs[_0xd460[42]]| fs[_0xd460[43]],function(_0x6118xd){if(_0x6118xd){console[_0xd460[45]](_0xd460[44])}else {fs[_0xd460[49]](_0x6118x11,function(_0x6118xd){if(_0x6118xd){console[_0xd460[45]](_0xd460[46],_0x6118xd)}else {console[_0xd460[48]](_0xd460[47])}})}})};return _0x6118xb[_0xd460[23]](204)})[_0xd460[12]](function(_0x6118xd){return handleError(_0x6118xb,_0x6118xd)})};exports[_0xd460[51]]= function(_0x6118xa,_0x6118xb){var _0x6118x16;return ExtractedReport[_0xd460[40]]({where:{id:_0x6118xa[_0xd460[16]][_0xd460[55]]}})[_0xd460[15]](function(_0x6118x17){_0x6118x16= _0x6118x17;var _0x6118x18=[];_0x6118x17[_0xd460[52]](function(_0x6118xf){_0x6118x18[_0xd460[54]](_0x6118xf[_0xd460[41]]())});return _0x6118x18})[_0xd460[53]]()[_0xd460[15]](function(){_0x6118x16[_0xd460[52]](function(_0x6118xf){if(_0x6118xf[_0xd460[31]]){var _0x6118x11=path[_0xd460[32]](config[_0xd460[27]],_0xd460[28],_0xd460[29],_0xd460[30],_0x6118xf[_0xd460[31]]);fs[_0xd460[50]](_0x6118x11,fs[_0xd460[42]]| fs[_0xd460[43]],function(_0x6118xd){if(_0x6118xd){console[_0xd460[45]](_0xd460[44])}else {fs[_0xd460[49]](_0x6118x11,function(_0x6118xd){if(_0x6118xd){console[_0xd460[45]](_0xd460[46],_0x6118xd)}else {console[_0xd460[48]](_0xd460[47])}})}})}});return _0x6118xb[_0xd460[23]](204)})[_0xd460[12]](function(_0x6118xd){return handleError(_0x6118xb,_0x6118xd)})};function handleError(_0x6118xb,_0x6118xd){console[_0xd460[48]](_0x6118xd);return _0x6118xb[_0xd460[14]](500)[_0xd460[13]](_0x6118xd)} \ No newline at end of file +'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); +} diff --git a/server/api/extracted_report/extracted_report.events.js b/server/api/extracted_report/extracted_report.events.js index 152fa25..311b078 100644 --- a/server/api/extracted_report/extracted_report.events.js +++ b/server/api/extracted_report/extracted_report.events.js @@ -1 +1,36 @@ -var _0xa6cd=["\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"];_0xa6cd[0];const EventEmitter=require(_0xa6cd[1]);const ExtractedReport=require(_0xa6cd[3])[_0xa6cd[2]];var ExtractedReportEvents= new EventEmitter();ExtractedReportEvents[_0xa6cd[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xa6cd[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xa6cd[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xa6cd[6]};for(var e in events){var event=events[e];ExtractedReport[_0xa6cd[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xe4d5x8,_0xe4d5x9,_0xe4d5xa){ExtractedReportEvents[_0xa6cd[10]](event+ _0xa6cd[8]+ _0xe4d5x8[_0xa6cd[9]],_0xe4d5x8);ExtractedReportEvents[_0xa6cd[10]](event,_0xe4d5x8);_0xe4d5xa(null)}}module[_0xa6cd[11]]= ExtractedReportEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/extracted_report/extracted_report.socket.js b/server/api/extracted_report/extracted_report.socket.js index c647acf..684fc40 100644 --- a/server/api/extracted_report/extracted_report.socket.js +++ b/server/api/extracted_report/extracted_report.socket.js @@ -1 +1,28 @@ -var _0x276a=["\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"];_0x276a[0];const ExtractedReportEvents=require(_0x276a[1]);var events=[_0x276a[2],_0x276a[3]];exports[_0x276a[4]]= function(_0xca9fx3){for(var _0xca9fx4=0,_0xca9fx5=events[_0x276a[5]];_0xca9fx4< _0xca9fx5;_0xca9fx4++){var _0xca9fx6=events[_0xca9fx4];var _0xca9fx7=createListener(_0x276a[6]+ _0xca9fx6,_0xca9fx3);ExtractedReportEvents[_0x276a[7]](_0xca9fx6,_0xca9fx7);_0xca9fx3[_0x276a[7]](_0x276a[8],removeListener(_0xca9fx6,_0xca9fx7))}};function createListener(_0xca9fx6,_0xca9fx3){return function(_0xca9fx9){_0xca9fx3[_0x276a[9]](_0xca9fx6,_0xca9fx9)}}function removeListener(_0xca9fx6,_0xca9fx7){return function(){ExtractedReportEvents[_0x276a[10]](_0xca9fx6,_0xca9fx7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/extracted_report/index.js b/server/api/extracted_report/index.js index 26e6cdc..ab71e52 100644 --- a/server/api/extracted_report/index.js +++ b/server/api/extracted_report/index.js @@ -1 +1,17 @@ -var _0x4351=["\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"];_0x4351[0];var express=require(_0x4351[1]);var controller=require(_0x4351[2]);var auth=require(_0x4351[3]);var router=express.Router();router[_0x4351[9]](_0x4351[4],auth[_0x4351[5]](),auth[_0x4351[7]]([17],[_0x4351[6]]),controller[_0x4351[8]]);router[_0x4351[9]](_0x4351[10],auth[_0x4351[5]](),auth[_0x4351[7]]([17],[_0x4351[6]]),controller[_0x4351[11]]);router[_0x4351[9]](_0x4351[12],auth[_0x4351[5]](),auth[_0x4351[7]]([17],[_0x4351[6]]),controller[_0x4351[13]]);router[_0x4351[15]](_0x4351[4],auth[_0x4351[5]](),auth[_0x4351[7]]([17],[_0x4351[6]]),controller[_0x4351[14]]);router[_0x4351[17]](_0x4351[12],auth[_0x4351[5]](),auth[_0x4351[7]]([17],[_0x4351[6]]),controller[_0x4351[16]]);router[_0x4351[19]](_0x4351[4],auth[_0x4351[5]](),auth[_0x4351[7]]([17],[_0x4351[6]]),controller[_0x4351[18]]);router[_0x4351[19]](_0x4351[12],auth[_0x4351[5]](),auth[_0x4351[7]]([17],[_0x4351[6]]),controller[_0x4351[20]]);module[_0x4351[21]]= router \ No newline at end of file +'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; diff --git a/server/api/fax_account/fax_account.controller.js b/server/api/fax_account/fax_account.controller.js index 83197ea..632aec5 100644 --- a/server/api/fax_account/fax_account.controller.js +++ b/server/api/fax_account/fax_account.controller.js @@ -1 +1,470 @@ -var _0x989a=["\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","\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"];_0x989a[0];var _=require(_0x989a[1]);var Util=require(_0x989a[2]);var sequelize=require(_0x989a[4])[_0x989a[3]];var FaxAccount=require(_0x989a[4])[_0x989a[5]];var FaxRoom=require(_0x989a[4])[_0x989a[6]];var FaxApplication=require(_0x989a[4])[_0x989a[7]];var FaxQueue=require(_0x989a[4])[_0x989a[8]];var FaxDisposition=require(_0x989a[4])[_0x989a[9]];var FaxMessage=require(_0x989a[4])[_0x989a[10]];var FaxAttachment=require(_0x989a[4])[_0x989a[11]];var User=require(_0x989a[4])[_0x989a[12]];function handleError(_0xb0c2xd,_0xb0c2xe){_0xb0c2xe= _0xb0c2xe|| 500;return function(_0xb0c2xf){_0xb0c2xd[_0x989a[14]](_0xb0c2xe)[_0x989a[13]](_0xb0c2xf)}}function responseWithResult(_0xb0c2xd,_0xb0c2xe){_0xb0c2xe= _0xb0c2xe|| 200;return function(_0xb0c2x11){if(_0xb0c2x11){_0xb0c2xd[_0x989a[14]](_0xb0c2xe)[_0x989a[15]](_0xb0c2x11)}}}function responseWithoutResult(_0xb0c2xd,_0xb0c2xe){_0xb0c2xe= _0xb0c2xe|| 204;return function(){_0xb0c2xd[_0x989a[16]](_0xb0c2xe)}}function handleEntityNotFound(_0xb0c2xd){return function(_0xb0c2x11){if(!_0xb0c2x11){_0xb0c2xd[_0x989a[14]](404)[_0x989a[17]]();return null};return _0xb0c2x11}}function saveUpdates(_0xb0c2x15){return function(_0xb0c2x11){return _0xb0c2x11[_0x989a[19]](_0xb0c2x15)[_0x989a[18]](function(_0xb0c2x16){return _0xb0c2x16})}}function removeEntity(_0xb0c2xd){return function(_0xb0c2x11){if(_0xb0c2x11){return _0xb0c2x11[_0x989a[20]]()[_0x989a[18]](function(){_0xb0c2xd[_0x989a[14]](204)[_0x989a[17]]()})}}}exports[_0x989a[21]]= function(_0xb0c2x18,_0xb0c2xd){return FaxAccount[_0x989a[25]](Util[_0x989a[24]](_0xb0c2x18[_0x989a[23]]))[_0x989a[18]](responseWithResult(_0xb0c2xd))[_0x989a[22]](handleError(_0xb0c2xd))};exports[_0x989a[26]]= function(_0xb0c2x18,_0xb0c2xd){return FaxAccount[_0x989a[29]](_0xb0c2x18[_0x989a[28]][_0x989a[27]])[_0x989a[18]](handleEntityNotFound(_0xb0c2xd))[_0x989a[18]](responseWithResult(_0xb0c2xd))[_0x989a[22]](handleError(_0xb0c2xd))};exports[_0x989a[30]]= function(_0xb0c2x18,_0xb0c2xd){return sequelize[_0x989a[38]](function(_0xb0c2x19){return FaxAccount[_0x989a[30]](_0xb0c2x18[_0x989a[37]],{transaction:_0xb0c2x19})})[_0x989a[18]](responseWithoutResult(_0xb0c2xd,201))[_0x989a[22]](sequelize.ValidationError,function(_0xb0c2xf){_0xb0c2xf[_0x989a[33]]= _0x989a[34];_0xb0c2xf[_0x989a[35]]= _0x989a[36];return _0xb0c2xd[_0x989a[14]](500)[_0x989a[13]](_0xb0c2xf)})[_0x989a[22]](sequelize.UniqueConstraintError,function(_0xb0c2xf){return Util[_0x989a[32]][_0x989a[31]](_0xb0c2xd,_0xb0c2xf)})[_0x989a[22]](handleError(_0xb0c2xd))};exports[_0x989a[39]]= function(_0xb0c2x18,_0xb0c2xd){if(_0xb0c2x18[_0x989a[37]][_0x989a[27]]){delete _0xb0c2x18[_0x989a[37]][_0x989a[27]]};return sequelize[_0x989a[38]](function(_0xb0c2x19){return FaxAccount[_0x989a[29]](_0xb0c2x18[_0x989a[28]][_0x989a[27]])[_0x989a[18]](handleEntityNotFound(_0xb0c2xd))[_0x989a[18]](function(_0xb0c2x1a){return _0xb0c2x1a[_0x989a[19]](_0xb0c2x18[_0x989a[37]],{transaction:_0xb0c2x19})})})[_0x989a[18]](responseWithoutResult(_0xb0c2xd))[_0x989a[22]](sequelize.ValidationError,function(_0xb0c2xf){_0xb0c2xf[_0x989a[33]]= _0x989a[34];_0xb0c2xf[_0x989a[35]]= _0x989a[36];return _0xb0c2xd[_0x989a[14]](500)[_0x989a[13]](_0xb0c2xf)})[_0x989a[22]](sequelize.UniqueConstraintError,function(_0xb0c2xf){return Util[_0x989a[32]][_0x989a[31]](_0xb0c2xd,_0xb0c2xf)})[_0x989a[22]](handleError(_0xb0c2xd))};exports[_0x989a[20]]= function(_0xb0c2x18,_0xb0c2xd){return sequelize[_0x989a[38]](function(_0xb0c2x19){return FaxAccount[_0x989a[29]](_0xb0c2x18[_0x989a[28]][_0x989a[27]])[_0x989a[18]](handleEntityNotFound(_0xb0c2xd))[_0x989a[18]](function(_0xb0c2x1a){return _0xb0c2x1a[_0x989a[20]]()})})[_0x989a[18]](function(){_0xb0c2xd[_0x989a[14]](204)[_0x989a[17]]()})[_0x989a[22]](handleError(_0xb0c2xd))};exports[_0x989a[40]]= function(_0xb0c2x18,_0xb0c2xd){return FaxAccount[_0x989a[20]]({where:{id:_0xb0c2x18[_0x989a[23]][_0x989a[41]]},individualHooks:true})[_0x989a[18]](responseWithoutResult(_0xb0c2xd))[_0x989a[22]](handleError(_0xb0c2xd))};exports[_0x989a[42]]= function(_0xb0c2x18,_0xb0c2xd,_0xb0c2x1b){return FaxAccount[_0x989a[49]](_0x989a[48])[_0x989a[29]](_0xb0c2x18[_0x989a[28]][_0x989a[27]])[_0x989a[18]](handleEntityNotFound(_0xb0c2xd))[_0x989a[18]](function(_0xb0c2x1a){return _0xb0c2x1a[_0x989a[47]](_[_0x989a[46]](Util[_0x989a[24]](_0xb0c2x18[_0x989a[23]]),{include:[{model:FaxQueue,attributes:[_0x989a[27],_0x989a[44]]},{model:User,attributes:[_0x989a[27],_0x989a[44],_0x989a[45]]}]}))})[_0x989a[18]](function(_0xb0c2x1c){return _0xb0c2xd[_0x989a[13]]({count:_0xb0c2x1c[_0x989a[43]],rows:_0xb0c2x1c})})[_0x989a[22]](handleError(_0xb0c2xd))};exports[_0x989a[50]]= function(_0xb0c2x18,_0xb0c2xd,_0xb0c2x1b){return FaxApplication[_0x989a[53]](_0x989a[51],{where:{FaxAccountId:_0xb0c2x18[_0x989a[28]][_0x989a[27]]}})[_0x989a[18]](function(_0xb0c2x1d){_0xb0c2x18[_0x989a[37]][_0x989a[51]]= _0xb0c2x1d?++_0xb0c2x1d:1;_0xb0c2x18[_0x989a[37]][_0x989a[52]]= _0xb0c2x18[_0x989a[28]][_0x989a[27]];return FaxApplication[_0x989a[30]](_0xb0c2x18[_0x989a[37]])})[_0x989a[18]](responseWithResult(_0xb0c2xd,201))[_0x989a[22]](handleError(_0xb0c2xd))};exports[_0x989a[54]]= function(_0xb0c2x18,_0xb0c2xd){return FaxApplication[_0x989a[20]]({where:{id:_0xb0c2x18[_0x989a[23]][_0x989a[41]]},individualHooks:true})[_0x989a[18]](responseWithoutResult(_0xb0c2xd))[_0x989a[22]](handleError(_0xb0c2xd))};exports[_0x989a[55]]= function(_0xb0c2x18,_0xb0c2xd,_0xb0c2x1b){return FaxApplication[_0x989a[29]](_0xb0c2x18[_0x989a[28]][_0x989a[56]])[_0x989a[18]](handleEntityNotFound(_0xb0c2xd))[_0x989a[18]](removeEntity(_0xb0c2xd))[_0x989a[22]](handleError(_0xb0c2xd))};exports[_0x989a[57]]= function(_0xb0c2x18,_0xb0c2xd){var _0xb0c2x1e=0;var _0xb0c2x1f=_0xb0c2x18[_0x989a[37]];_0xb0c2x1f[_0x989a[60]](function(_0xb0c2x20){delete _0xb0c2x20[_0x989a[27]];delete _0xb0c2x20[_0x989a[58]];delete _0xb0c2x20[_0x989a[59]];_0xb0c2x20[_0x989a[51]]= ++_0xb0c2x1e});return sequelize[_0x989a[38]](function(_0xb0c2x19){return FaxApplication[_0x989a[20]]({where:{FaxAccountId:_0xb0c2x18[_0x989a[28]][_0x989a[27]]},individualHooks:true,transaction:_0xb0c2x19})[_0x989a[18]](function(_0xb0c2x21){return FaxApplication[_0x989a[61]](_0xb0c2x1f,{individualHooks:true,transaction:_0xb0c2x19})})})[_0x989a[18]](function(_0xb0c2x1c){return _0xb0c2xd[_0x989a[14]](200)[_0x989a[13]]({count:_0xb0c2x1c[_0x989a[43]],rows:_0xb0c2x1c})})[_0x989a[22]](handleError(_0xb0c2xd))};exports[_0x989a[62]]= function(_0xb0c2x18,_0xb0c2xd){if(_0xb0c2x18[_0x989a[37]][_0x989a[27]]){delete _0xb0c2x18[_0x989a[37]][_0x989a[27]]};return FaxApplication[_0x989a[29]](_0xb0c2x18[_0x989a[28]][_0x989a[56]])[_0x989a[18]](handleEntityNotFound(_0xb0c2xd))[_0x989a[18]](saveUpdates(_0xb0c2x18[_0x989a[37]]))[_0x989a[18]](responseWithResult(_0xb0c2xd))[_0x989a[22]](handleError(_0xb0c2xd))};exports[_0x989a[63]]= function(_0xb0c2x18,_0xb0c2xd){return FaxApplication[_0x989a[29]](_0xb0c2x18[_0x989a[28]][_0x989a[56]],{include:[{all:true}]})[_0x989a[18]](handleEntityNotFound(_0xb0c2xd))[_0x989a[18]](responseWithResult(_0xb0c2xd))[_0x989a[22]](handleError(_0xb0c2xd))};exports[_0x989a[64]]= function(_0xb0c2x18,_0xb0c2xd,_0xb0c2x1b){var _0xb0c2x22={where:{FaxAccountId:_0xb0c2x18[_0x989a[28]][_0x989a[27]],$and:[]},include:[],attributes:[_0x989a[27],_0x989a[65],_0x989a[66],_0x989a[67],_0x989a[68],_0x989a[59]]};if(_0xb0c2x18[_0x989a[23]]){if(_0xb0c2x18[_0x989a[23]][_0x989a[67]]){if(_[_0x989a[69]](_0xb0c2x18[_0x989a[23]][_0x989a[67]])){for(var _0xb0c2x23=0;_0xb0c2x23< _0xb0c2x18[_0x989a[23]][_0x989a[67]][_0x989a[43]];_0xb0c2x23++){_0xb0c2x22[_0x989a[73]][_0x989a[72]][_0x989a[71]]({tags:{$like:_0x989a[70]+ _0xb0c2x18[_0x989a[23]][_0x989a[67]][_0xb0c2x23]+ _0x989a[70]}})}}else {_0xb0c2x22[_0x989a[73]][_0x989a[72]][_0x989a[71]]({tags:{$like:_0x989a[70]+ _0xb0c2x18[_0x989a[23]][_0x989a[67]]+ _0x989a[70]}})};delete _0xb0c2x18[_0x989a[23]][_0x989a[67]]};_[_0x989a[46]](_0xb0c2x22[_0x989a[73]],_0xb0c2x18[_0x989a[23]])};switch(_0xb0c2x18[_0x989a[83]][_0x989a[86]]){case _0x989a[76]:_0xb0c2x22[_0x989a[74]][_0x989a[71]]({model:User,attributes:[_0x989a[27]]});var _0xb0c2x24;var _0xb0c2x25;var _0xb0c2x26;return User[_0x989a[29]](_0xb0c2x18[_0x989a[83]][_0x989a[27]])[_0x989a[18]](function(_0xb0c2x2a){if(_0xb0c2x2a){return _0xb0c2x2a[_0x989a[85]]()}else {return []}})[_0x989a[18]](function(_0xb0c2x29){_0xb0c2x25= _[_0x989a[79]](_0xb0c2x29,_0x989a[27]);return FaxAccount[_0x989a[29]](_0xb0c2x18[_0x989a[28]][_0x989a[27]])})[_0x989a[18]](function(_0xb0c2x28){return _0xb0c2x28[_0x989a[47]]({where:{$or:[{app:_0x989a[80]},{app:_0x989a[76]}]}})})[_0x989a[18]](function(_0xb0c2x1f){_0xb0c2x24= _[_0x989a[79]](_[_0x989a[77]](_0xb0c2x1f,{"\x61\x70\x70":_0x989a[76]}),_0x989a[78]);_0xb0c2x26= _[_0x989a[79]](_[_0x989a[77]](_0xb0c2x1f,{"\x61\x70\x70":_0x989a[80]}),_0x989a[81]);if(_[_0x989a[82]](_0xb0c2x25,_0xb0c2x26)[_0x989a[43]]|| _[_0x989a[82]](_0xb0c2x24,[_0xb0c2x18[_0x989a[83]][_0x989a[27]]])[_0x989a[43]]){return FaxRoom[_0x989a[84]](_0xb0c2x22)[_0x989a[18]](function(_0xb0c2x27){return _0xb0c2xd[_0x989a[14]](200)[_0x989a[13]](_0xb0c2x27)})[_0x989a[22]](function(_0xb0c2xf){console[_0x989a[75]](_0xb0c2xf);return handleError(_0xb0c2xd,_0xb0c2xf)})}else {return _0xb0c2xd[_0x989a[14]](200)[_0x989a[13]]([])}})[_0x989a[22]](function(_0xb0c2xf){console[_0x989a[75]](_0xb0c2xf)});default:return FaxRoom[_0x989a[84]](_0xb0c2x22)[_0x989a[18]](function(_0xb0c2x27){return _0xb0c2xd[_0x989a[14]](200)[_0x989a[13]](_0xb0c2x27)})[_0x989a[22]](handleError(_0xb0c2xd))}};exports[_0x989a[87]]= function(_0xb0c2x18,_0xb0c2xd,_0xb0c2x1b){return FaxAccount[_0x989a[29]](_0xb0c2x18[_0x989a[28]][_0x989a[27]])[_0x989a[18]](handleEntityNotFound(_0xb0c2xd))[_0x989a[18]](function(_0xb0c2x1a){return _0xb0c2x1a[_0x989a[88]]()})[_0x989a[18]](function(_0xb0c2x2b){return _0xb0c2xd[_0x989a[14]](200)[_0x989a[13]]({rows:_0xb0c2x2b,count:_0xb0c2x2b[_0x989a[43]]})})[_0x989a[22]](handleError(_0xb0c2xd))};exports[_0x989a[89]]= function(_0xb0c2x18,_0xb0c2xd,_0xb0c2x1b){_0xb0c2x18[_0x989a[37]][_0x989a[52]]= _0xb0c2x18[_0x989a[28]][_0x989a[27]];return FaxDisposition[_0x989a[30]](_0xb0c2x18[_0x989a[37]])[_0x989a[18]](responseWithResult(_0xb0c2xd,201))[_0x989a[22]](handleError(_0xb0c2xd))};exports[_0x989a[90]]= function(_0xb0c2x18,_0xb0c2xd){if(_0xb0c2x18[_0x989a[37]][_0x989a[27]]){delete _0xb0c2x18[_0x989a[37]][_0x989a[27]]};return FaxDisposition[_0x989a[29]](_0xb0c2x18[_0x989a[28]][_0x989a[92]])[_0x989a[18]](handleEntityNotFound(_0xb0c2xd))[_0x989a[18]](function(_0xb0c2x2c){var _0xb0c2x16=_[_0x989a[46]](_0xb0c2x2c,_0xb0c2x18[_0x989a[37]]);return _0xb0c2x16[_0x989a[91]]()})[_0x989a[18]](responseWithResult(_0xb0c2xd,200))[_0x989a[22]](handleError(_0xb0c2xd))};exports[_0x989a[93]]= function(_0xb0c2x18,_0xb0c2xd,_0xb0c2x1b){return FaxDisposition[_0x989a[29]](_0xb0c2x18[_0x989a[28]][_0x989a[92]])[_0x989a[18]](handleEntityNotFound(_0xb0c2xd))[_0x989a[18]](function(_0xb0c2x2d){return _0xb0c2x2d[_0x989a[20]]()})[_0x989a[18]](responseWithoutResult(_0xb0c2xd,204))[_0x989a[22]](handleError(_0xb0c2xd))};exports[_0x989a[94]]= function(_0xb0c2x18,_0xb0c2xd,_0xb0c2x1b){_0xb0c2x18[_0x989a[37]][_0x989a[78]]= _0xb0c2x18[_0x989a[83]][_0x989a[27]];return FaxMessage[_0x989a[30]](_0xb0c2x18[_0x989a[37]],{include:[{model:FaxAttachment}],user:_0xb0c2x18[_0x989a[83]]})[_0x989a[18]](responseWithResult(_0xb0c2xd,201))[_0x989a[22]](handleError(_0xb0c2xd))} \ No newline at end of file +/** + * 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; + + +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'] + }] + })); + }) + .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)); +}; diff --git a/server/api/fax_account/fax_account.events.js b/server/api/fax_account/fax_account.events.js index 186f892..076c9bc 100644 --- a/server/api/fax_account/fax_account.events.js +++ b/server/api/fax_account/fax_account.events.js @@ -1 +1,36 @@ -var _0xea24=["\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"];_0xea24[0];const EventEmitter=require(_0xea24[1]);const FaxAccount=require(_0xea24[3])[_0xea24[2]];var FaxAccountEvents= new EventEmitter();FaxAccountEvents[_0xea24[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xea24[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xea24[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xea24[6]};for(var e in events){var event=events[e];FaxAccount[_0xea24[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x56c2x8,_0x56c2x9,_0x56c2xa){FaxAccountEvents[_0xea24[10]](event+ _0xea24[8]+ _0x56c2x8[_0xea24[9]],_0x56c2x8);FaxAccountEvents[_0xea24[10]](event,_0x56c2x8);_0x56c2xa(null)}}module[_0xea24[11]]= FaxAccountEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/fax_account/fax_account.socket.js b/server/api/fax_account/fax_account.socket.js index 915f1a5..777c337 100644 --- a/server/api/fax_account/fax_account.socket.js +++ b/server/api/fax_account/fax_account.socket.js @@ -1 +1,28 @@ -var _0xcc90=["\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"];_0xcc90[0];const FaxAccountEvents=require(_0xcc90[1]);var events=[_0xcc90[2],_0xcc90[3]];exports[_0xcc90[4]]= function(_0x81b9x3){for(var _0x81b9x4=0,_0x81b9x5=events[_0xcc90[5]];_0x81b9x4< _0x81b9x5;_0x81b9x4++){var _0x81b9x6=events[_0x81b9x4];var _0x81b9x7=createListener(_0xcc90[6]+ _0x81b9x6,_0x81b9x3);FaxAccountEvents[_0xcc90[7]](_0x81b9x6,_0x81b9x7);_0x81b9x3[_0xcc90[7]](_0xcc90[8],removeListener(_0x81b9x6,_0x81b9x7))}};function createListener(_0x81b9x6,_0x81b9x3){return function(_0x81b9x9){_0x81b9x3[_0xcc90[9]](_0x81b9x6,_0x81b9x9)}}function removeListener(_0x81b9x6,_0x81b9x7){return function(){FaxAccountEvents[_0xcc90[10]](_0x81b9x6,_0x81b9x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/fax_account/index.js b/server/api/fax_account/index.js index 31517dc..52e34bf 100644 --- a/server/api/fax_account/index.js +++ b/server/api/fax_account/index.js @@ -1 +1,31 @@ -var _0xed0e=["\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"];_0xed0e[0];var express=require(_0xed0e[1]);var auth=require(_0xed0e[2]);var controller=require(_0xed0e[3]);var license=require(_0xed0e[4]);var router=express.Router();router[_0xed0e[13]](_0xed0e[5],license[_0xed0e[6]](),license[_0xed0e[7]](),auth[_0xed0e[8]](),auth[_0xed0e[11]]([10],[_0xed0e[9],_0xed0e[10]]),controller[_0xed0e[12]]);router[_0xed0e[13]](_0xed0e[14],license[_0xed0e[6]](),license[_0xed0e[7]](),auth[_0xed0e[8]](),auth[_0xed0e[11]]([10],[_0xed0e[9],_0xed0e[10]]),controller[_0xed0e[15]]);router[_0xed0e[13]](_0xed0e[16],license[_0xed0e[6]](),license[_0xed0e[7]](),auth[_0xed0e[8]](),auth[_0xed0e[11]]([10],[_0xed0e[9]]),controller[_0xed0e[17]]);router[_0xed0e[13]](_0xed0e[18],license[_0xed0e[6]](),license[_0xed0e[7]](),auth[_0xed0e[8]](),auth[_0xed0e[11]]([10],[_0xed0e[9]]),controller[_0xed0e[19]]);router[_0xed0e[13]](_0xed0e[20],license[_0xed0e[6]](),license[_0xed0e[7]](),auth[_0xed0e[8]](),auth[_0xed0e[11]]([10],[_0xed0e[9],_0xed0e[10]]),controller[_0xed0e[21]]);router[_0xed0e[13]](_0xed0e[22],license[_0xed0e[6]](),license[_0xed0e[7]](),auth[_0xed0e[8]](),auth[_0xed0e[11]]([10],[_0xed0e[9],_0xed0e[10]]),controller[_0xed0e[23]]);router[_0xed0e[25]](_0xed0e[5],license[_0xed0e[6]](),license[_0xed0e[7]](),auth[_0xed0e[8]](),auth[_0xed0e[11]]([10],[_0xed0e[9]]),controller[_0xed0e[24]]);router[_0xed0e[25]](_0xed0e[16],license[_0xed0e[6]](),license[_0xed0e[7]](),auth[_0xed0e[8]](),auth[_0xed0e[11]]([10],[_0xed0e[9]]),controller[_0xed0e[26]]);router[_0xed0e[25]](_0xed0e[22],license[_0xed0e[6]](),license[_0xed0e[7]](),auth[_0xed0e[8]](),auth[_0xed0e[11]]([10],[_0xed0e[9]]),controller[_0xed0e[27]]);router[_0xed0e[25]](_0xed0e[28],license[_0xed0e[6]](),license[_0xed0e[7]](),auth[_0xed0e[8]](),auth[_0xed0e[11]]([10],[_0xed0e[9],_0xed0e[10]]),controller[_0xed0e[29]]);router[_0xed0e[31]](_0xed0e[14],license[_0xed0e[6]](),license[_0xed0e[7]](),auth[_0xed0e[8]](),auth[_0xed0e[11]]([10],[_0xed0e[9]]),controller[_0xed0e[30]]);router[_0xed0e[31]](_0xed0e[16],license[_0xed0e[6]](),license[_0xed0e[7]](),auth[_0xed0e[8]](),auth[_0xed0e[11]]([10],[_0xed0e[9]]),controller[_0xed0e[32]]);router[_0xed0e[31]](_0xed0e[18],license[_0xed0e[6]](),license[_0xed0e[7]](),auth[_0xed0e[8]](),auth[_0xed0e[11]]([10],[_0xed0e[9]]),controller[_0xed0e[33]]);router[_0xed0e[31]](_0xed0e[34],license[_0xed0e[6]](),license[_0xed0e[7]](),auth[_0xed0e[8]](),auth[_0xed0e[11]]([10],[_0xed0e[9]]),controller[_0xed0e[35]]);router[_0xed0e[37]](_0xed0e[5],license[_0xed0e[6]](),license[_0xed0e[7]](),auth[_0xed0e[8]](),auth[_0xed0e[11]]([10],[_0xed0e[9]]),controller[_0xed0e[36]]);router[_0xed0e[37]](_0xed0e[14],license[_0xed0e[6]](),license[_0xed0e[7]](),auth[_0xed0e[8]](),auth[_0xed0e[11]]([10],[_0xed0e[9]]),controller[_0xed0e[38]]);router[_0xed0e[37]](_0xed0e[16],license[_0xed0e[6]](),license[_0xed0e[7]](),auth[_0xed0e[8]](),auth[_0xed0e[11]]([10],[_0xed0e[9]]),controller[_0xed0e[39]]);router[_0xed0e[37]](_0xed0e[18],license[_0xed0e[6]](),license[_0xed0e[7]](),auth[_0xed0e[8]](),auth[_0xed0e[11]]([10],[_0xed0e[9]]),controller[_0xed0e[40]]);router[_0xed0e[37]](_0xed0e[34],license[_0xed0e[6]](),license[_0xed0e[7]](),auth[_0xed0e[8]](),auth[_0xed0e[11]]([10],[_0xed0e[9]]),controller[_0xed0e[41]]);module[_0xed0e[42]]= router \ No newline at end of file +'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; diff --git a/server/api/fax_application/fax_application.controller.js b/server/api/fax_application/fax_application.controller.js index 7bfd5bd..59b09cb 100644 --- a/server/api/fax_application/fax_application.controller.js +++ b/server/api/fax_application/fax_application.controller.js @@ -1 +1,94 @@ -var _0xf1aa=["\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"];_0xf1aa[0];var _=require(_0xf1aa[1]);var FaxApplication=require(_0xf1aa[3])[_0xf1aa[2]];exports[_0xf1aa[4]]= function(_0x3d4fx3,_0x3d4fx4){FaxApplication[_0xf1aa[10]]({where:_0x3d4fx3[_0xf1aa[9]]})[_0xf1aa[8]](function(_0x3d4fx6){return _0x3d4fx4[_0xf1aa[7]](200)[_0xf1aa[6]](_0x3d4fx6)})[_0xf1aa[5]](function(_0x3d4fx5){return handleError(_0x3d4fx4,_0x3d4fx5)})};exports[_0xf1aa[11]]= function(_0x3d4fx3,_0x3d4fx4){FaxApplication[_0xf1aa[15]](_0x3d4fx3[_0xf1aa[14]][_0xf1aa[13]])[_0xf1aa[8]](function(_0x3d4fx7){if(!_0x3d4fx7){return _0x3d4fx4[_0xf1aa[12]](404)};return _0x3d4fx4[_0xf1aa[6]](_0x3d4fx7)})[_0xf1aa[5]](function(_0x3d4fx5){return handleError(_0x3d4fx4,_0x3d4fx5)})};exports[_0xf1aa[16]]= function(_0x3d4fx3,_0x3d4fx4,_0x3d4fx8){console[_0xf1aa[18]](_0x3d4fx3[_0xf1aa[17]]);FaxApplication[_0xf1aa[21]](_0xf1aa[19],{where:{FaxAccountId:_0x3d4fx3[_0xf1aa[17]][_0xf1aa[20]]}})[_0xf1aa[8]](function(_0x3d4fx9){_0x3d4fx3[_0xf1aa[17]][_0xf1aa[19]]= _0x3d4fx9?++_0x3d4fx9:1;FaxApplication[_0xf1aa[16]](_0x3d4fx3[_0xf1aa[17]])[_0xf1aa[8]](function(_0x3d4fxa){return _0x3d4fx4[_0xf1aa[7]](201)[_0xf1aa[6]](_0x3d4fxa)})[_0xf1aa[5]](function(_0x3d4fx5){return _0x3d4fx8(_0x3d4fx5)});console[_0xf1aa[18]](_0x3d4fx9)})[_0xf1aa[5]](function(_0x3d4fx5){_0x3d4fx8(_0x3d4fx5)})};exports[_0xf1aa[22]]= function(_0x3d4fx3,_0x3d4fx4){if(_0x3d4fx3[_0xf1aa[17]][_0xf1aa[13]]){delete _0x3d4fx3[_0xf1aa[17]][_0xf1aa[13]]};FaxApplication[_0xf1aa[15]](_0x3d4fx3[_0xf1aa[14]][_0xf1aa[13]])[_0xf1aa[8]](function(_0x3d4fx7){if(!_0x3d4fx7){return _0x3d4fx4[_0xf1aa[12]](404)};var _0x3d4fxb=_[_0xf1aa[23]](_0x3d4fx7,_0x3d4fx3[_0xf1aa[17]]);_0x3d4fxb[_0xf1aa[24]]()[_0xf1aa[8]](function(){return _0x3d4fx4[_0xf1aa[7]](200)[_0xf1aa[6]](_0x3d4fx7)})[_0xf1aa[5]](function(_0x3d4fx5){return handleError(_0x3d4fx4,_0x3d4fx5)})})[_0xf1aa[5]](function(_0x3d4fx5){return handleError(_0x3d4fx4,_0x3d4fx5)})};exports[_0xf1aa[25]]= function(_0x3d4fx3,_0x3d4fx4){FaxApplication[_0xf1aa[26]]({where:{id:_0x3d4fx3[_0xf1aa[14]][_0xf1aa[13]]}})[_0xf1aa[8]](function(_0x3d4fx7){if(!_0x3d4fx7){return _0x3d4fx4[_0xf1aa[12]](404)};_0x3d4fx7[_0xf1aa[25]]()[_0xf1aa[8]](function(){return _0x3d4fx4[_0xf1aa[12]](204)})[_0xf1aa[5]](function(_0x3d4fx5){return handleError(_0x3d4fx4,_0x3d4fx5)})})[_0xf1aa[5]](function(_0x3d4fx5){return handleError(_0x3d4fx4,_0x3d4fx5)})};function handleError(_0x3d4fx4,_0x3d4fx5){return _0x3d4fx4[_0xf1aa[7]](500)[_0xf1aa[6]](_0x3d4fx5)} \ No newline at end of file +'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); +} diff --git a/server/api/fax_application/fax_application.events.js b/server/api/fax_application/fax_application.events.js index 4b57eff..72f4dd0 100644 --- a/server/api/fax_application/fax_application.events.js +++ b/server/api/fax_application/fax_application.events.js @@ -1 +1,36 @@ -var _0xa15a=["\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"];_0xa15a[0];const EventEmitter=require(_0xa15a[1]);const FaxApplication=require(_0xa15a[3])[_0xa15a[2]];var FaxApplicationEvents= new EventEmitter();FaxApplicationEvents[_0xa15a[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xa15a[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xa15a[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xa15a[6]};for(var e in events){var event=events[e];FaxApplication[_0xa15a[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xecccx8,_0xecccx9,_0xecccxa){FaxApplicationEvents[_0xa15a[10]](event+ _0xa15a[8]+ _0xecccx8[_0xa15a[9]],_0xecccx8);FaxApplicationEvents[_0xa15a[10]](event,_0xecccx8);_0xecccxa(null)}}module[_0xa15a[11]]= FaxApplicationEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/fax_application/fax_application.socket.js b/server/api/fax_application/fax_application.socket.js index e802650..ce03f3d 100644 --- a/server/api/fax_application/fax_application.socket.js +++ b/server/api/fax_application/fax_application.socket.js @@ -1 +1,28 @@ -var _0xc30a=["\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"];_0xc30a[0];const FaxApplicationEvents=require(_0xc30a[1]);var events=[_0xc30a[2],_0xc30a[3]];exports[_0xc30a[4]]= function(_0xa481x3){for(var _0xa481x4=0,_0xa481x5=events[_0xc30a[5]];_0xa481x4< _0xa481x5;_0xa481x4++){var _0xa481x6=events[_0xa481x4];var _0xa481x7=createListener(_0xc30a[6]+ _0xa481x6,_0xa481x3);FaxApplicationEvents[_0xc30a[7]](_0xa481x6,_0xa481x7);_0xa481x3[_0xc30a[7]](_0xc30a[8],removeListener(_0xa481x6,_0xa481x7))}};function createListener(_0xa481x6,_0xa481x3){return function(_0xa481x9){_0xa481x3[_0xc30a[9]](_0xa481x6,_0xa481x9)}}function removeListener(_0xa481x6,_0xa481x7){return function(){FaxApplicationEvents[_0xc30a[10]](_0xa481x6,_0xa481x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/fax_application/index.js b/server/api/fax_application/index.js index 0114caa..91aae9d 100644 --- a/server/api/fax_application/index.js +++ b/server/api/fax_application/index.js @@ -1 +1,15 @@ -var _0xe04d=["\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"];_0xe04d[0];var express=require(_0xe04d[1]);var controller=require(_0xe04d[2]);var auth=require(_0xe04d[3]);var license=require(_0xe04d[4]);var router=express.Router();router[_0xe04d[12]](_0xe04d[5],license[_0xe04d[6]](),license[_0xe04d[7]](),auth[_0xe04d[8]](),auth[_0xe04d[10]]([10],[_0xe04d[9]]),controller[_0xe04d[11]]);router[_0xe04d[12]](_0xe04d[13],license[_0xe04d[6]](),license[_0xe04d[7]](),auth[_0xe04d[8]](),auth[_0xe04d[10]]([10],[_0xe04d[9]]),controller[_0xe04d[14]]);router[_0xe04d[16]](_0xe04d[5],license[_0xe04d[6]](),license[_0xe04d[7]](),auth[_0xe04d[8]](),auth[_0xe04d[10]]([10],[_0xe04d[9]]),controller[_0xe04d[15]]);router[_0xe04d[18]](_0xe04d[13],license[_0xe04d[6]](),license[_0xe04d[7]](),auth[_0xe04d[8]](),auth[_0xe04d[10]]([10],[_0xe04d[9]]),controller[_0xe04d[17]]);router[_0xe04d[20]](_0xe04d[13],license[_0xe04d[6]](),license[_0xe04d[7]](),auth[_0xe04d[8]](),auth[_0xe04d[10]]([10],[_0xe04d[9]]),controller[_0xe04d[19]]);module[_0xe04d[21]]= router \ No newline at end of file +'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; diff --git a/server/api/fax_attachment/fax_attachment.controller.js b/server/api/fax_attachment/fax_attachment.controller.js index 3730ef1..39802ff 100644 --- a/server/api/fax_attachment/fax_attachment.controller.js +++ b/server/api/fax_attachment/fax_attachment.controller.js @@ -1 +1,140 @@ -var _0x64ee=["\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"];_0x64ee[0];var _=require(_0x64ee[1]);var path=require(_0x64ee[2]);var Util=require(_0x64ee[3]);var formidable=require(_0x64ee[4]);var Promise=require(_0x64ee[5]);var config=require(_0x64ee[6]);var FaxAttachment=require(_0x64ee[8])[_0x64ee[7]];function handleError(_0xe422x9,_0xe422xa){_0xe422xa= _0xe422xa|| 500;return function(_0xe422xb){_0xe422x9[_0x64ee[10]](_0xe422xa)[_0x64ee[9]](_0xe422xb)}}function responseWithResult(_0xe422x9,_0xe422xa){_0xe422xa= _0xe422xa|| 200;return function(_0xe422xd){if(_0xe422xd){_0xe422x9[_0x64ee[10]](_0xe422xa)[_0x64ee[11]](_0xe422xd)}}}function responseWithoutResult(_0xe422x9,_0xe422xa){_0xe422xa= _0xe422xa|| 204;return function(){_0xe422x9[_0x64ee[12]](_0xe422xa)}}function handleEntityNotFound(_0xe422x9){return function(_0xe422xd){if(!_0xe422xd){_0xe422x9[_0x64ee[10]](404)[_0x64ee[13]]();return null};return _0xe422xd}}function saveUpdates(_0xe422x11){return function(_0xe422xd){return _0xe422xd[_0x64ee[15]](_0xe422x11)[_0x64ee[14]](function(_0xe422x12){return _0xe422x12})}}function removeEntity(_0xe422x9){return function(_0xe422xd){if(_0xe422xd){return _0xe422xd[_0x64ee[16]]()[_0x64ee[14]](function(){_0xe422x9[_0x64ee[10]](204)[_0x64ee[13]]()})}}}exports[_0x64ee[17]]= function(_0xe422x14,_0xe422x9){return FaxAttachment[_0x64ee[21]](Util[_0x64ee[20]](_0xe422x14[_0x64ee[19]]))[_0x64ee[14]](responseWithResult(_0xe422x9))[_0x64ee[18]](handleError(_0xe422x9))};exports[_0x64ee[22]]= function(_0xe422x14,_0xe422x9){return FaxAttachment[_0x64ee[26]](_0xe422x14[_0x64ee[25]][_0x64ee[24]])[_0x64ee[14]](handleEntityNotFound(_0xe422x9))[_0x64ee[14]](function(_0xe422x15){return _0xe422x9[_0x64ee[23]](_0xe422x15[_0x64ee[2]])})[_0x64ee[18]](handleError(_0xe422x9))};exports[_0x64ee[27]]= function(_0xe422x14,_0xe422x9){var _0xe422x16= new formidable.IncomingForm();_0xe422x16[_0x64ee[28]]= path[_0x64ee[35]](config[_0x64ee[29]],_0x64ee[30],_0x64ee[31],_0x64ee[32],_0x64ee[33],_0x64ee[34]);_0xe422x16[_0x64ee[36]]= true;_0xe422x16[_0x64ee[37]]= true;_0xe422x16[_0x64ee[38]]= true;_0xe422x16[_0x64ee[43]](_0xe422x14,function(_0xe422xb,_0xe422x16,_0xe422x17){if(_0xe422xb){return _0xe422x9[_0x64ee[10]](500)[_0x64ee[9]](_0xe422xb)};return _0xe422x9[_0x64ee[10]](201)[_0x64ee[9]]({path:_0xe422x17[_0x64ee[39]][_0x64ee[2]],name:_0xe422x17[_0x64ee[39]][_0x64ee[40]],basename:path[_0x64ee[41]](_0xe422x17[_0x64ee[39]][_0x64ee[2]]),type:_0xe422x17[_0x64ee[39]][_0x64ee[42]]})})};exports[_0x64ee[44]]= function(_0xe422x14,_0xe422x9){if(_0xe422x14[_0x64ee[45]][_0x64ee[24]]){delete _0xe422x14[_0x64ee[45]][_0x64ee[24]]};return FaxAttachment[_0x64ee[26]](_0xe422x14[_0x64ee[25]][_0x64ee[24]])[_0x64ee[14]](handleEntityNotFound(_0xe422x9))[_0x64ee[14]](saveUpdates(_0xe422x14[_0x64ee[45]]))[_0x64ee[14]](responseWithResult(_0xe422x9))[_0x64ee[18]](handleError(_0xe422x9))};exports[_0x64ee[16]]= function(_0xe422x14,_0xe422x9){var _0xe422x18=Promise[_0x64ee[48]](require(_0x64ee[47])[_0x64ee[46]]);var _0xe422x19=path[_0x64ee[35]](config[_0x64ee[29]],_0x64ee[30],_0x64ee[31],_0x64ee[32],_0x64ee[33],_0x64ee[34],_0xe422x14[_0x64ee[25]][_0x64ee[24]]);return _0xe422x18(_0xe422x19)[_0x64ee[14]](function(){return _0xe422x9[_0x64ee[12]](204)})[_0x64ee[18]](function(_0xe422xb){return handleError(_0xe422x9,_0xe422xb)})} \ No newline at end of file +/** + * 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); + }); +} diff --git a/server/api/fax_attachment/fax_attachment.events.js b/server/api/fax_attachment/fax_attachment.events.js index 5f2d01a..173e113 100644 --- a/server/api/fax_attachment/fax_attachment.events.js +++ b/server/api/fax_attachment/fax_attachment.events.js @@ -1 +1,36 @@ -var _0x6cc1=["\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"];_0x6cc1[0];const EventEmitter=require(_0x6cc1[1]);const FaxAttachment=require(_0x6cc1[3])[_0x6cc1[2]];var FaxAttachmentEvents= new EventEmitter();FaxAttachmentEvents[_0x6cc1[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x6cc1[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x6cc1[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x6cc1[6]};for(var e in events){var event=events[e];FaxAttachment[_0x6cc1[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xe2b6x8,_0xe2b6x9,_0xe2b6xa){FaxAttachmentEvents[_0x6cc1[10]](event+ _0x6cc1[8]+ _0xe2b6x8[_0x6cc1[9]],_0xe2b6x8);FaxAttachmentEvents[_0x6cc1[10]](event,_0xe2b6x8);_0xe2b6xa(null)}}module[_0x6cc1[11]]= FaxAttachmentEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/fax_attachment/fax_attachment.socket.js b/server/api/fax_attachment/fax_attachment.socket.js index 42d9c2d..ab07da6 100644 --- a/server/api/fax_attachment/fax_attachment.socket.js +++ b/server/api/fax_attachment/fax_attachment.socket.js @@ -1 +1,28 @@ -var _0xea05=["\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"];_0xea05[0];const FaxAttachmentEvents=require(_0xea05[1]);var events=[_0xea05[2],_0xea05[3]];exports[_0xea05[4]]= function(_0x30d9x3){for(var _0x30d9x4=0,_0x30d9x5=events[_0xea05[5]];_0x30d9x4< _0x30d9x5;_0x30d9x4++){var _0x30d9x6=events[_0x30d9x4];var _0x30d9x7=createListener(_0xea05[6]+ _0x30d9x6,_0x30d9x3);FaxAttachmentEvents[_0xea05[7]](_0x30d9x6,_0x30d9x7);_0x30d9x3[_0xea05[7]](_0xea05[8],removeListener(_0x30d9x6,_0x30d9x7))}};function createListener(_0x30d9x6,_0x30d9x3){return function(_0x30d9x9){_0x30d9x3[_0xea05[9]](_0x30d9x6,_0x30d9x9)}}function removeListener(_0x30d9x6,_0x30d9x7){return function(){FaxAttachmentEvents[_0xea05[10]](_0x30d9x6,_0x30d9x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/fax_attachment/index.js b/server/api/fax_attachment/index.js index 5f1deaf..9dd6190 100644 --- a/server/api/fax_attachment/index.js +++ b/server/api/fax_attachment/index.js @@ -1 +1,16 @@ -var _0xd4ba=["\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"];_0xd4ba[0];var express=require(_0xd4ba[1]);var auth=require(_0xd4ba[2]);var controller=require(_0xd4ba[3]);var license=require(_0xd4ba[4]);var router=express.Router();router[_0xd4ba[13]](_0xd4ba[5],license[_0xd4ba[6]](),license[_0xd4ba[7]](),auth[_0xd4ba[8]](),auth[_0xd4ba[11]]([10],[_0xd4ba[9],_0xd4ba[10]]),controller[_0xd4ba[12]]);router[_0xd4ba[13]](_0xd4ba[14],license[_0xd4ba[6]](),license[_0xd4ba[7]](),controller[_0xd4ba[15]]);router[_0xd4ba[17]](_0xd4ba[5],license[_0xd4ba[6]](),license[_0xd4ba[7]](),auth[_0xd4ba[8]](),auth[_0xd4ba[11]]([10],[_0xd4ba[9],_0xd4ba[10]]),controller[_0xd4ba[16]]);router[_0xd4ba[19]](_0xd4ba[14],license[_0xd4ba[6]](),license[_0xd4ba[7]](),auth[_0xd4ba[8]](),auth[_0xd4ba[11]]([10],[_0xd4ba[9],_0xd4ba[10]]),controller[_0xd4ba[18]]);router[_0xd4ba[21]](_0xd4ba[14],license[_0xd4ba[6]](),license[_0xd4ba[7]](),auth[_0xd4ba[8]](),auth[_0xd4ba[11]]([10],[_0xd4ba[9],_0xd4ba[10]]),controller[_0xd4ba[20]]);module[_0xd4ba[22]]= router \ No newline at end of file +'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; diff --git a/server/api/fax_disposition/fax_disposition.controller.js b/server/api/fax_disposition/fax_disposition.controller.js index 4e0d6ac..c3dcbb7 100644 --- a/server/api/fax_disposition/fax_disposition.controller.js +++ b/server/api/fax_disposition/fax_disposition.controller.js @@ -1 +1,112 @@ -var _0xc9b1=["\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"];_0xc9b1[0];var _=require(_0xc9b1[1]);var Util=require(_0xc9b1[2]);var FaxDisposition=require(_0xc9b1[4])[_0xc9b1[3]];function handleError(_0x55d8x5,_0x55d8x6){_0x55d8x6= _0x55d8x6|| 500;return function(_0x55d8x7){_0x55d8x5[_0xc9b1[6]](_0x55d8x6)[_0xc9b1[5]](_0x55d8x7)}}function responseWithResult(_0x55d8x5,_0x55d8x6){_0x55d8x6= _0x55d8x6|| 200;return function(_0x55d8x9){if(_0x55d8x9){_0x55d8x5[_0xc9b1[6]](_0x55d8x6)[_0xc9b1[7]](_0x55d8x9)}}}function responseWithoutResult(_0x55d8x5,_0x55d8x6){_0x55d8x6= _0x55d8x6|| 204;return function(){_0x55d8x5[_0xc9b1[8]](_0x55d8x6)}}function handleEntityNotFound(_0x55d8x5){return function(_0x55d8x9){if(!_0x55d8x9){_0x55d8x5[_0xc9b1[6]](404)[_0xc9b1[9]]();return null};return _0x55d8x9}}function saveUpdates(_0x55d8xd){return function(_0x55d8x9){return _0x55d8x9[_0xc9b1[11]](_0x55d8xd)[_0xc9b1[10]](function(_0x55d8xe){return _0x55d8xe})}}function removeEntity(_0x55d8x5){return function(_0x55d8x9){if(_0x55d8x9){return _0x55d8x9[_0xc9b1[12]]()[_0xc9b1[10]](function(){_0x55d8x5[_0xc9b1[6]](204)[_0xc9b1[9]]()})}}}exports[_0xc9b1[13]]= function(_0x55d8x10,_0x55d8x5){return FaxDisposition[_0xc9b1[17]](Util[_0xc9b1[16]](_0x55d8x10[_0xc9b1[15]]))[_0xc9b1[10]](responseWithResult(_0x55d8x5))[_0xc9b1[14]](handleError(_0x55d8x5))};exports[_0xc9b1[18]]= function(_0x55d8x10,_0x55d8x5){return FaxDisposition[_0xc9b1[21]](_0x55d8x10[_0xc9b1[20]][_0xc9b1[19]])[_0xc9b1[10]](handleEntityNotFound(_0x55d8x5))[_0xc9b1[10]](responseWithResult(_0x55d8x5))[_0xc9b1[14]](handleError(_0x55d8x5))};exports[_0xc9b1[22]]= function(_0x55d8x10,_0x55d8x5){return FaxDisposition[_0xc9b1[22]](_0x55d8x10[_0xc9b1[23]])[_0xc9b1[10]](responseWithResult(_0x55d8x5,201))[_0xc9b1[14]](handleError(_0x55d8x5))};exports[_0xc9b1[24]]= function(_0x55d8x10,_0x55d8x5){if(_0x55d8x10[_0xc9b1[23]][_0xc9b1[19]]){delete _0x55d8x10[_0xc9b1[23]][_0xc9b1[19]]};return FaxDisposition[_0xc9b1[21]](_0x55d8x10[_0xc9b1[20]][_0xc9b1[19]])[_0xc9b1[10]](handleEntityNotFound(_0x55d8x5))[_0xc9b1[10]](saveUpdates(_0x55d8x10[_0xc9b1[23]]))[_0xc9b1[10]](responseWithResult(_0x55d8x5))[_0xc9b1[14]](handleError(_0x55d8x5))};exports[_0xc9b1[12]]= function(_0x55d8x10,_0x55d8x5){return FaxDisposition[_0xc9b1[21]](_0x55d8x10[_0xc9b1[20]][_0xc9b1[19]])[_0xc9b1[10]](handleEntityNotFound(_0x55d8x5))[_0xc9b1[10]](removeEntity(_0x55d8x5))[_0xc9b1[14]](handleError(_0x55d8x5))} \ No newline at end of file +/** + * 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)); +} diff --git a/server/api/fax_disposition/fax_disposition.events.js b/server/api/fax_disposition/fax_disposition.events.js index 0ff4661..ea2756f 100644 --- a/server/api/fax_disposition/fax_disposition.events.js +++ b/server/api/fax_disposition/fax_disposition.events.js @@ -1 +1,36 @@ -var _0xad1e=["\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"];_0xad1e[0];const EventEmitter=require(_0xad1e[1]);const FaxDisposition=require(_0xad1e[3])[_0xad1e[2]];var FaxDispositionEvents= new EventEmitter();FaxDispositionEvents[_0xad1e[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xad1e[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xad1e[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xad1e[6]};for(var e in events){var event=events[e];FaxDisposition[_0xad1e[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x9010x8,_0x9010x9,_0x9010xa){FaxDispositionEvents[_0xad1e[10]](event+ _0xad1e[8]+ _0x9010x8[_0xad1e[9]],_0x9010x8);FaxDispositionEvents[_0xad1e[10]](event,_0x9010x8);_0x9010xa(null)}}module[_0xad1e[11]]= FaxDispositionEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/fax_disposition/fax_disposition.socket.js b/server/api/fax_disposition/fax_disposition.socket.js index b46ddd3..42f6297 100644 --- a/server/api/fax_disposition/fax_disposition.socket.js +++ b/server/api/fax_disposition/fax_disposition.socket.js @@ -1 +1,28 @@ -var _0x6641=["\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"];_0x6641[0];const FaxDispositionEvents=require(_0x6641[1]);var events=[_0x6641[2],_0x6641[3]];exports[_0x6641[4]]= function(_0xe57fx3){for(var _0xe57fx4=0,_0xe57fx5=events[_0x6641[5]];_0xe57fx4< _0xe57fx5;_0xe57fx4++){var _0xe57fx6=events[_0xe57fx4];var _0xe57fx7=createListener(_0x6641[6]+ _0xe57fx6,_0xe57fx3);FaxDispositionEvents[_0x6641[7]](_0xe57fx6,_0xe57fx7);_0xe57fx3[_0x6641[7]](_0x6641[8],removeListener(_0xe57fx6,_0xe57fx7))}};function createListener(_0xe57fx6,_0xe57fx3){return function(_0xe57fx9){_0xe57fx3[_0x6641[9]](_0xe57fx6,_0xe57fx9)}}function removeListener(_0xe57fx6,_0xe57fx7){return function(){FaxDispositionEvents[_0x6641[10]](_0xe57fx6,_0xe57fx7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/fax_disposition/index.js b/server/api/fax_disposition/index.js index bf62642..2e61ead 100644 --- a/server/api/fax_disposition/index.js +++ b/server/api/fax_disposition/index.js @@ -1 +1,16 @@ -var _0xefe6=["\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"];_0xefe6[0];var express=require(_0xefe6[1]);var auth=require(_0xefe6[2]);var controller=require(_0xefe6[3]);var router=express.Router();router[_0xefe6[7]](_0xefe6[4],auth[_0xefe6[5]](),controller[_0xefe6[6]]);router[_0xefe6[7]](_0xefe6[8],auth[_0xefe6[5]](),controller[_0xefe6[9]]);router[_0xefe6[11]](_0xefe6[4],auth[_0xefe6[5]](),controller[_0xefe6[10]]);router[_0xefe6[13]](_0xefe6[8],auth[_0xefe6[5]](),controller[_0xefe6[12]]);router[_0xefe6[14]](_0xefe6[8],auth[_0xefe6[5]](),controller[_0xefe6[12]]);router[_0xefe6[16]](_0xefe6[8],auth[_0xefe6[5]](),controller[_0xefe6[15]]);module[_0xefe6[17]]= router \ No newline at end of file +'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; diff --git a/server/api/fax_message/fax_message.ami.js b/server/api/fax_message/fax_message.ami.js index 52a74f4..8bb89b2 100644 --- a/server/api/fax_message/fax_message.ami.js +++ b/server/api/fax_message/fax_message.ami.js @@ -1 +1,64 @@ -var _0xc9f2=["\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"];_0xc9f2[0];var _=require(_0xc9f2[1]);var util=require(_0xc9f2[2]);var FaxMessage=require(_0xc9f2[4])[_0xc9f2[3]];var Trunk=require(_0xc9f2[4])[_0xc9f2[5]];exports[_0xc9f2[6]]= function(_0x658cx5){FaxMessage[_0xc9f2[9]](function(_0x658cx6){console[_0xc9f2[8]](_0xc9f2[7])})};function onSave(_0x658cx5,_0x658cx6,_0x658cx8){if(_0x658cx6[_0xc9f2[10]]=== _0xc9f2[11]&& !_0x658cx6[_0xc9f2[12]]){var _0x658cx9=JSON[_0xc9f2[14]](_0x658cx6[_0xc9f2[13]]);console[_0xc9f2[8]](_0xc9f2[15],_0x658cx9);Trunk[_0xc9f2[44]](_0x658cx9[_0xc9f2[43]][_0xc9f2[42]])[_0xc9f2[41]](function(_0x658cxb){var _0x658cxc={Action:_0xc9f2[18],CallerID:_0x658cx9[_0xc9f2[19]],Channel:util[_0xc9f2[24]](_0xc9f2[20],_0x658cx9[_0xc9f2[21]],_0x658cx9[_0xc9f2[22]],_0x658cxb[_0xc9f2[23]]),Context:_0xc9f2[25],Exten:_0xc9f2[26],Priority:1,Async:_0xc9f2[27],Variable:{MAXRATE:_0x658cx9[_0xc9f2[28]],MINRATE:_0x658cx9[_0xc9f2[29]],ECM:_0x658cx9[_0xc9f2[30]]?_0xc9f2[31]:_0xc9f2[32],LOCALID:_0x658cx9[_0xc9f2[33]],FAXFILE:_0x658cx9[_0xc9f2[34]],FAXHEADER:_0x658cx9[_0xc9f2[35]],FAXUUID:_0x658cx9[_0xc9f2[36]]}};_0x658cx5[_0xc9f2[40]](_0x658cxc,function(_0x658cxa,_0x658cxd){if(_0x658cxa){_0x658cx6[_0xc9f2[38]]({status:_0xc9f2[37]})}else {if(_0x658cxd[_0xc9f2[39]]&& _0x658cxd[_0xc9f2[12]]){_0x658cx6[_0xc9f2[38]]({actionid:_0x658cxd[_0xc9f2[12]]})}}})})[_0xc9f2[17]](function(_0x658cxa){console[_0xc9f2[16]](_0x658cxa)})}} \ No newline at end of file +'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); + }); + } +} diff --git a/server/api/fax_message/fax_message.controller.js b/server/api/fax_message/fax_message.controller.js index 1259ac8..39fa261 100644 --- a/server/api/fax_message/fax_message.controller.js +++ b/server/api/fax_message/fax_message.controller.js @@ -1 +1,175 @@ -var _0x12df=["\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"];_0x12df[0];var _=require(_0x12df[1]);var fs=require(_0x12df[2]);var path=require(_0x12df[3]);var uploadFile=require(_0x12df[4]);var uuidLib=require(_0x12df[5]);var pdf=require(_0x12df[6]);var formidable=require(_0x12df[7]);var exec=require(_0x12df[9])[_0x12df[8]];var config=require(_0x12df[10]);var FaxMessage=require(_0x12df[12])[_0x12df[11]];var FaxAttachment=require(_0x12df[12])[_0x12df[13]];var FaxRoom=require(_0x12df[12])[_0x12df[14]];var FaxAccount=require(_0x12df[12])[_0x12df[15]];var FaxAttachment=require(_0x12df[12])[_0x12df[13]];var User=require(_0x12df[12])[_0x12df[16]];exports[_0x12df[17]]= function(_0x4ff0xf,_0x4ff0x10,_0x4ff0x11){var _0x4ff0x12={order:_0x12df[18],include:[{all:true,include:[{all:true}]}]};switch(_0x4ff0xf[_0x12df[24]][_0x12df[23]]){case _0x12df[21]:_0x4ff0x12[_0x12df[19]]= _0x4ff0xf[_0x12df[20]];break;case _0x12df[22]:break;default:};return FaxMessage[_0x12df[29]](_0x4ff0x12)[_0x12df[28]](function(_0x4ff0x14){return _0x4ff0x10[_0x12df[27]](200)[_0x12df[26]](_0x4ff0x14)})[_0x12df[25]](function(_0x4ff0x13){return handleError(_0x4ff0x10,_0x4ff0x13,_0x4ff0x11)})};exports[_0x12df[30]]= function(_0x4ff0xf,_0x4ff0x10){return FaxMessage[_0x12df[30]]()[_0x12df[28]](function(_0x4ff0x15){return _0x4ff0x10[_0x12df[27]](200)[_0x12df[26]](_0x4ff0x15)})[_0x12df[25]](function(_0x4ff0x13){return handleError(_0x4ff0x10,_0x4ff0x13)})};exports[_0x12df[31]]= function(_0x4ff0xf,_0x4ff0x10,_0x4ff0x11){return FaxMessage[_0x12df[38]](_0x4ff0xf[_0x12df[34]][_0x12df[33]],{include:[{model:FaxAttachment},{model:User,attributes:[_0x12df[33],_0x12df[35],_0x12df[36],_0x12df[37]]}]})[_0x12df[28]](function(_0x4ff0x16){if(!_0x4ff0x16){return _0x4ff0x10[_0x12df[32]](404)};return _0x4ff0x10[_0x12df[26]](_0x4ff0x16)})[_0x12df[25]](function(_0x4ff0x13){return handleError(_0x4ff0x10,_0x4ff0x13,_0x4ff0x11)})};exports[_0x12df[39]]= function(_0x4ff0xf,_0x4ff0x10,_0x4ff0x11){_0x4ff0xf[_0x12df[41]][_0x12df[40]]= _0x4ff0xf[_0x12df[24]][_0x12df[33]];_0x4ff0xf[_0x12df[41]][_0x12df[42]]= _0x4ff0xf[_0x12df[41]][_0x12df[42]];return FaxMessage[_0x12df[39]](_0x4ff0xf[_0x12df[41]],{include:[{model:FaxAttachment}]})[_0x12df[28]](function(_0x4ff0x16){return _0x4ff0x10[_0x12df[27]](201)[_0x12df[26]](_0x4ff0x16)})[_0x12df[25]](function(_0x4ff0x13){return handleError(_0x4ff0x10,_0x4ff0x13)})};exports[_0x12df[43]]= function(_0x4ff0xf,_0x4ff0x10,_0x4ff0x11){return FaxMessage[_0x12df[38]](_0x4ff0xf[_0x12df[34]][_0x12df[33]],{include:[{all:true}]})[_0x12df[28]](function(_0x4ff0x16){if(!_0x4ff0x16){return _0x4ff0x10[_0x12df[32]](404)};return _0x4ff0x16[_0x12df[44]](_0x4ff0xf[_0x12df[41]],{user:_0x4ff0xf[_0x12df[24]]})})[_0x12df[28]](function(_0x4ff0x17){return _0x4ff0x10[_0x12df[27]](200)[_0x12df[26]](_0x4ff0x17)})[_0x12df[25]](function(_0x4ff0x13){return handleError(_0x4ff0x10,_0x4ff0x13,_0x4ff0x11)})};exports[_0x12df[45]]= function(_0x4ff0xf,_0x4ff0x10,_0x4ff0x11){return FaxMessage[_0x12df[38]](_0x4ff0xf[_0x12df[34]][_0x12df[33]])[_0x12df[28]](function(_0x4ff0x16){if(!_0x4ff0x16){return _0x4ff0x10[_0x12df[32]](404)};return _0x4ff0x16[_0x12df[45]]()})[_0x12df[28]](function(){return _0x4ff0x10[_0x12df[32]](204)})[_0x12df[25]](function(_0x4ff0x13){return handleError(_0x4ff0x10,_0x4ff0x13,_0x4ff0x11)})};exports[_0x12df[46]]= function(_0x4ff0xf,_0x4ff0x10,_0x4ff0x11){return FaxMessage[_0x12df[48]]({where:{id:{$in:_0x4ff0xf[_0x12df[41]][_0x12df[33]]}},attributes:{directory:_0x12df[47]}})[_0x12df[28]](function(_0x4ff0x16){if(!_0x4ff0x16){return _0x4ff0x10[_0x12df[32]](404)};return _0x4ff0x16[_0x12df[45]]()})[_0x12df[28]](function(){return _0x4ff0x10[_0x12df[32]](204)})[_0x12df[25]](function(_0x4ff0x13){return handleError(_0x4ff0x10,_0x4ff0x13,_0x4ff0x11)})};function handleError(_0x4ff0x10,_0x4ff0x13,_0x4ff0x11){return _0x4ff0x10[_0x12df[27]](500)[_0x12df[26]](_0x4ff0x13)} \ No newline at end of file +'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); +} diff --git a/server/api/fax_message/fax_message.events.js b/server/api/fax_message/fax_message.events.js index d2321b7..ca98ec2 100644 --- a/server/api/fax_message/fax_message.events.js +++ b/server/api/fax_message/fax_message.events.js @@ -1 +1,36 @@ -var _0x6cd3=["\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"];_0x6cd3[0];const EventEmitter=require(_0x6cd3[1]);const FaxMessage=require(_0x6cd3[3])[_0x6cd3[2]];var FaxMessageEvents= new EventEmitter();FaxMessageEvents[_0x6cd3[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x6cd3[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x6cd3[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x6cd3[6]};for(var e in events){var event=events[e];FaxMessage[_0x6cd3[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6a17x8,_0x6a17x9,_0x6a17xa){FaxMessageEvents[_0x6cd3[10]](event+ _0x6cd3[8]+ _0x6a17x8[_0x6cd3[9]],_0x6a17x8);FaxMessageEvents[_0x6cd3[10]](event,_0x6a17x8);_0x6a17xa(null)}}module[_0x6cd3[11]]= FaxMessageEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/fax_message/fax_message.socket.js b/server/api/fax_message/fax_message.socket.js index 45477c2..fc70af3 100644 --- a/server/api/fax_message/fax_message.socket.js +++ b/server/api/fax_message/fax_message.socket.js @@ -1 +1,28 @@ -var _0x52b6=["\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"];_0x52b6[0];const FaxMessageEvents=require(_0x52b6[1]);var events=[_0x52b6[2],_0x52b6[3]];exports[_0x52b6[4]]= function(_0x47b1x3){for(var _0x47b1x4=0,_0x47b1x5=events[_0x52b6[5]];_0x47b1x4< _0x47b1x5;_0x47b1x4++){var _0x47b1x6=events[_0x47b1x4];var _0x47b1x7=createListener(_0x52b6[6]+ _0x47b1x6,_0x47b1x3);FaxMessageEvents[_0x52b6[7]](_0x47b1x6,_0x47b1x7);_0x47b1x3[_0x52b6[7]](_0x52b6[8],removeListener(_0x47b1x6,_0x47b1x7))}};function createListener(_0x47b1x6,_0x47b1x3){return function(_0x47b1x9){_0x47b1x3[_0x52b6[9]](_0x47b1x6,_0x47b1x9)}}function removeListener(_0x47b1x6,_0x47b1x7){return function(){FaxMessageEvents[_0x52b6[10]](_0x47b1x6,_0x47b1x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/fax_message/index.js b/server/api/fax_message/index.js index 72f9c6f..60e36a1 100644 --- a/server/api/fax_message/index.js +++ b/server/api/fax_message/index.js @@ -1 +1,30 @@ -var _0x3a56=["\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"];_0x3a56[0];var express=require(_0x3a56[1]);var controller=require(_0x3a56[2]);var auth=require(_0x3a56[3]);var license=require(_0x3a56[4]);var router=express.Router();router[_0x3a56[13]](_0x3a56[5],license[_0x3a56[6]](),license[_0x3a56[7]](),auth[_0x3a56[8]](),auth[_0x3a56[11]]([10],[_0x3a56[9],_0x3a56[10]]),controller[_0x3a56[12]]);router[_0x3a56[13]](_0x3a56[14],license[_0x3a56[6]](),license[_0x3a56[7]](),auth[_0x3a56[8]](),auth[_0x3a56[11]]([10],[_0x3a56[9]]),controller[_0x3a56[15]]);router[_0x3a56[13]](_0x3a56[16],license[_0x3a56[6]](),license[_0x3a56[7]](),auth[_0x3a56[8]](),auth[_0x3a56[11]]([10],[_0x3a56[9],_0x3a56[10]]),controller[_0x3a56[17]]);router[_0x3a56[19]](_0x3a56[5],license[_0x3a56[6]](),license[_0x3a56[7]](),auth[_0x3a56[8]](),auth[_0x3a56[11]]([10],[_0x3a56[9],_0x3a56[10]]),controller[_0x3a56[18]]);router[_0x3a56[21]](_0x3a56[5],license[_0x3a56[6]](),license[_0x3a56[7]](),auth[_0x3a56[8]](),auth[_0x3a56[11]]([10],[_0x3a56[9],_0x3a56[10]]),controller[_0x3a56[20]]);router[_0x3a56[21]](_0x3a56[22],license[_0x3a56[6]](),license[_0x3a56[7]](),auth[_0x3a56[8]](),auth[_0x3a56[11]]([10],[_0x3a56[9]]),controller[_0x3a56[23]]);router[_0x3a56[21]](_0x3a56[24],license[_0x3a56[6]](),license[_0x3a56[7]](),auth[_0x3a56[8]](),auth[_0x3a56[11]]([10],[_0x3a56[9]]),controller[_0x3a56[20]]);router[_0x3a56[21]](_0x3a56[16],license[_0x3a56[6]](),license[_0x3a56[7]](),auth[_0x3a56[8]](),auth[_0x3a56[11]]([10],[_0x3a56[9],_0x3a56[10]]),controller[_0x3a56[20]]);router[_0x3a56[26]](_0x3a56[16],license[_0x3a56[6]](),license[_0x3a56[7]](),auth[_0x3a56[8]](),auth[_0x3a56[11]]([10],[_0x3a56[9]]),controller[_0x3a56[25]]);module[_0x3a56[27]]= router \ No newline at end of file +'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; diff --git a/server/api/fax_queue/fax_queue.controller.js b/server/api/fax_queue/fax_queue.controller.js index 930f4aa..682bc1f 100644 --- a/server/api/fax_queue/fax_queue.controller.js +++ b/server/api/fax_queue/fax_queue.controller.js @@ -1 +1,213 @@ -var _0x423e=["\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"];_0x423e[0];var _=require(_0x423e[1]);var Util=require(_0x423e[2]);var User=require(_0x423e[4])[_0x423e[3]];var FaxQueue=require(_0x423e[4])[_0x423e[5]];var UserHasFaxQueue=require(_0x423e[4])[_0x423e[6]];exports[_0x423e[7]]= function(_0x157fx6,_0x157fx7){switch(_0x157fx6[_0x423e[15]][_0x423e[19]]){case _0x423e[15]:return User[_0x423e[16]](_0x157fx6[_0x423e[15]][_0x423e[14]],{attributes:[_0x423e[14]]})[_0x423e[11]](Util[_0x423e[13]](_0x157fx6[_0x423e[12]]))[_0x423e[11]](function(_0x157fx9){_0x157fx7[_0x423e[10]](200)[_0x423e[9]](_0x157fx9)})[_0x423e[8]](function(_0x157fx8){return handleError(_0x157fx7,_0x157fx8)});default:return FaxQueue[_0x423e[18]](Util[_0x423e[17]](_0x157fx6[_0x423e[12]]))[_0x423e[11]](function(_0x157fx9){_0x157fx7[_0x423e[10]](200)[_0x423e[9]](_0x157fx9)})[_0x423e[8]](function(_0x157fx8){return handleError(_0x157fx7,_0x157fx8)})}};exports[_0x423e[20]]= function(_0x157fx6,_0x157fx7){return FaxQueue[_0x423e[16]](_0x157fx6[_0x423e[22]][_0x423e[14]])[_0x423e[11]](function(_0x157fxa){if(!_0x157fxa){return _0x157fx7[_0x423e[21]](404)};return _0x157fx7[_0x423e[9]](_0x157fxa)})[_0x423e[8]](function(_0x157fx8){return handleError(_0x157fx7,_0x157fx8)})};exports[_0x423e[23]]= function(_0x157fx6,_0x157fx7){var _0x157fxb;return FaxQueue[_0x423e[23]](_0x157fx6[_0x423e[25]])[_0x423e[11]](function(_0x157fxc){_0x157fxb= _0x157fxc;if(_0x157fx6[_0x423e[25]][_0x423e[24]]){return _0x157fxb[_0x423e[28]](_0x157fx6[_0x423e[25]][_0x423e[24]],{penalty:_0x157fx6[_0x423e[25]][_0x423e[26]]|| 0,queue:_0x157fxb[_0x423e[27]]})}})[_0x423e[11]](function(){return _0x157fx7[_0x423e[10]](201)[_0x423e[9]](_0x157fxb)})[_0x423e[8]](function(_0x157fx8){return handleError(_0x157fx7,_0x157fx8)})};exports[_0x423e[29]]= function(_0x157fx6,_0x157fx7){if(_0x157fx6[_0x423e[25]][_0x423e[14]]){delete _0x157fx6[_0x423e[25]][_0x423e[14]]};return FaxQueue[_0x423e[16]](_0x157fx6[_0x423e[22]][_0x423e[14]])[_0x423e[11]](function(_0x157fxa){if(!_0x157fxa){return _0x157fx7[_0x423e[21]](404)};var _0x157fxd=_[_0x423e[30]](_0x157fxa,_0x157fx6[_0x423e[25]]);return _0x157fxd[_0x423e[31]]()})[_0x423e[11]](function(_0x157fxa){return _0x157fx7[_0x423e[10]](200)[_0x423e[9]](_0x157fxa)})[_0x423e[8]](function(_0x157fx8){return handleError(_0x157fx7,_0x157fx8)})};exports[_0x423e[32]]= function(_0x157fx6,_0x157fx7){return FaxQueue[_0x423e[16]](_0x157fx6[_0x423e[22]][_0x423e[14]])[_0x423e[11]](function(_0x157fxa){if(!_0x157fxa){return _0x157fx7[_0x423e[21]](404)};return _0x157fxa[_0x423e[32]]()})[_0x423e[11]](function(){return _0x157fx7[_0x423e[21]](204)})[_0x423e[8]](function(_0x157fx8){return handleError(_0x157fx7,_0x157fx8)})};exports[_0x423e[33]]= function(_0x157fx6,_0x157fx7,_0x157fxe){return FaxQueue[_0x423e[16]](_0x157fx6[_0x423e[22]][_0x423e[14]])[_0x423e[11]](function(_0x157fxc){if(!_0x157fxc){return _0x157fx7[_0x423e[21]](404)};var _0x157fxf=_[_0x423e[34]](_0x157fx6[_0x423e[25]][_0x423e[24]],function(_0x157fx10){return {UserId:_0x157fx10,penalty:_0x157fx6[_0x423e[25]][_0x423e[26]],FaxQueueId:_0x157fxc[_0x423e[14]],queue:_0x157fxc[_0x423e[27]]}});return UserHasFaxQueue[_0x423e[35]](_0x157fxf,{individualHooks:true})})[_0x423e[11]](function(){return _0x157fx7[_0x423e[21]](200)})[_0x423e[8]](function(_0x157fx8){return handleError(_0x157fx7,_0x157fx8)})};exports[_0x423e[36]]= function(_0x157fx6,_0x157fx7){return FaxQueue[_0x423e[16]](_0x157fx6[_0x423e[22]][_0x423e[14]])[_0x423e[11]](function(_0x157fx12){if(!_0x157fx12){return _0x157fx7[_0x423e[21]](404)};return _0x157fx12[_0x423e[41]]({where:{role:_0x423e[38]},attributes:[_0x423e[14],_0x423e[27],_0x423e[39],_0x423e[40]]})})[_0x423e[11]](function(_0x157fx11){return _0x157fx7[_0x423e[10]](200)[_0x423e[9]]({rows:_0x157fx11,count:_0x157fx11[_0x423e[37]]})})[_0x423e[8]](function(_0x157fx8){return handleError(_0x157fx7,_0x157fx8)})};exports[_0x423e[42]]= function(_0x157fx6,_0x157fx7,_0x157fxe){return FaxQueue[_0x423e[16]](_0x157fx6[_0x423e[22]][_0x423e[14]])[_0x423e[11]](function(_0x157fx12){if(!_0x157fx12){return _0x157fx7[_0x423e[21]](404)};return _0x157fx12[_0x423e[43]](_0x157fx6[_0x423e[12]][_0x423e[24]],{individualHooks:true})})[_0x423e[11]](function(){return _0x157fx7[_0x423e[21]](202)})[_0x423e[8]](function(_0x157fx8){return _0x157fxe(_0x157fx8)})};exports[_0x423e[44]]= function(_0x157fx6,_0x157fx7){return FaxQueue[_0x423e[32]]({where:{id:_0x157fx6[_0x423e[12]][_0x423e[45]]},individualHooks:true})[_0x423e[11]](function(){return _0x157fx7[_0x423e[21]](204)})[_0x423e[8]](function(_0x157fx8){return handleError(_0x157fx7,_0x157fx8)})};function handleError(_0x157fx7,_0x157fx8){return _0x157fx7[_0x423e[10]](500)[_0x423e[9]](_0x157fx8)} \ No newline at end of file +'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); +} diff --git a/server/api/fax_queue/fax_queue.events.js b/server/api/fax_queue/fax_queue.events.js index fb77d46..a65c990 100644 --- a/server/api/fax_queue/fax_queue.events.js +++ b/server/api/fax_queue/fax_queue.events.js @@ -1 +1,36 @@ -var _0xd946=["\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"];_0xd946[0];const EventEmitter=require(_0xd946[1]);const FaxQueue=require(_0xd946[3])[_0xd946[2]];var FaxQueueEvents= new EventEmitter();FaxQueueEvents[_0xd946[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd946[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd946[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd946[6]};for(var e in events){var event=events[e];FaxQueue[_0xd946[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x5ba0x8,_0x5ba0x9,_0x5ba0xa){FaxQueueEvents[_0xd946[10]](event+ _0xd946[8]+ _0x5ba0x8[_0xd946[9]],_0x5ba0x8);FaxQueueEvents[_0xd946[10]](event,_0x5ba0x8);_0x5ba0xa(null)}}module[_0xd946[11]]= FaxQueueEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/fax_queue/fax_queue.socket.js b/server/api/fax_queue/fax_queue.socket.js index 3413cfc..8d589ab 100644 --- a/server/api/fax_queue/fax_queue.socket.js +++ b/server/api/fax_queue/fax_queue.socket.js @@ -1 +1,28 @@ -var _0xf65e=["\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"];_0xf65e[0];const FaxQueueEvents=require(_0xf65e[1]);var events=[_0xf65e[2],_0xf65e[3]];exports[_0xf65e[4]]= function(_0x5996x3){for(var _0x5996x4=0,_0x5996x5=events[_0xf65e[5]];_0x5996x4< _0x5996x5;_0x5996x4++){var _0x5996x6=events[_0x5996x4];var _0x5996x7=createListener(_0xf65e[6]+ _0x5996x6,_0x5996x3);FaxQueueEvents[_0xf65e[7]](_0x5996x6,_0x5996x7);_0x5996x3[_0xf65e[7]](_0xf65e[8],removeListener(_0x5996x6,_0x5996x7))}};function createListener(_0x5996x6,_0x5996x3){return function(_0x5996x9){_0x5996x3[_0xf65e[9]](_0x5996x6,_0x5996x9)}}function removeListener(_0x5996x6,_0x5996x7){return function(){FaxQueueEvents[_0xf65e[10]](_0x5996x6,_0x5996x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/fax_queue/index.js b/server/api/fax_queue/index.js index 3bb5c0c..9f1fac3 100644 --- a/server/api/fax_queue/index.js +++ b/server/api/fax_queue/index.js @@ -1 +1,20 @@ -var _0x1be5=["\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","\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\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","\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"];_0x1be5[0];var express=require(_0x1be5[1]);var controller=require(_0x1be5[2]);var auth=require(_0x1be5[3]);var router=express.Router();router[_0x1be5[7]](_0x1be5[4],auth[_0x1be5[5]](),controller[_0x1be5[6]]);router[_0x1be5[7]](_0x1be5[8],auth[_0x1be5[5]](),controller[_0x1be5[9]]);router[_0x1be5[7]](_0x1be5[10],auth[_0x1be5[5]](),controller[_0x1be5[11]]);router[_0x1be5[13]](_0x1be5[4],auth[_0x1be5[5]](),controller[_0x1be5[12]]);router[_0x1be5[13]](_0x1be5[10],auth[_0x1be5[5]](),controller[_0x1be5[14]]);router[_0x1be5[16]](_0x1be5[8],auth[_0x1be5[5]](),controller[_0x1be5[15]]);router[_0x1be5[17]](_0x1be5[8],auth[_0x1be5[5]](),controller[_0x1be5[15]]);router[_0x1be5[19]](_0x1be5[4],auth[_0x1be5[5]](),controller[_0x1be5[18]]);router[_0x1be5[19]](_0x1be5[8],auth[_0x1be5[5]](),controller[_0x1be5[20]]);router[_0x1be5[19]](_0x1be5[10],auth[_0x1be5[5]](),controller[_0x1be5[21]]);module[_0x1be5[22]]= router \ No newline at end of file +'use strict'; + +var express = require('express'); +var controller = require('./fax_queue.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.get('/:id/agents', auth.isAuthenticated(), controller.showAgents); +router.post('/', auth.isAuthenticated(), controller.create); +router.post('/:id/agents', auth.isAuthenticated(), controller.addAgents); +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); +router.delete('/:id/agents', auth.isAuthenticated(), controller.removeAgents); + +module.exports = router; diff --git a/server/api/fax_room/fax_room.controller.js b/server/api/fax_room/fax_room.controller.js index 34f9867..ab316a3 100644 --- a/server/api/fax_room/fax_room.controller.js +++ b/server/api/fax_room/fax_room.controller.js @@ -1 +1,474 @@ -var _0x7500=["\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"];_0x7500[0];var _=require(_0x7500[1]);var util=require(_0x7500[2]);var Util=require(_0x7500[3]);var moment=require(_0x7500[4]);var sequelize=require(_0x7500[6])[_0x7500[5]];var User=require(_0x7500[6])[_0x7500[7]];var Agent=require(_0x7500[6])[_0x7500[7]];var Contact=require(_0x7500[6])[_0x7500[8]];var FaxRoom=require(_0x7500[6])[_0x7500[9]];var FaxMessage=require(_0x7500[6])[_0x7500[10]];var FaxAccount=require(_0x7500[6])[_0x7500[11]];var FaxApplication=require(_0x7500[6])[_0x7500[12]];var FaxQueue=require(_0x7500[6])[_0x7500[13]];var FaxAttachment=require(_0x7500[6])[_0x7500[14]];exports[_0x7500[15]]= function(_0x5983xf,_0x5983x10,_0x5983x11){return FaxRoom[_0x7500[24]](_0x7500[23])[_0x7500[22]](Util[_0x7500[21]](_0x5983xf[_0x7500[20]]))[_0x7500[19]](function(_0x5983x13){return _0x5983x10[_0x7500[18]](200)[_0x7500[17]](_0x5983x13)})[_0x7500[16]](function(_0x5983x12){return handleError(_0x5983x10,_0x5983x12)})};exports[_0x7500[25]]= function(_0x5983xf,_0x5983x10){return FaxRoom[_0x7500[25]]()[_0x7500[19]](function(_0x5983x14){return _0x5983x10[_0x7500[18]](200)[_0x7500[17]](_0x5983x14)})[_0x7500[16]](function(_0x5983x12){return handleError(_0x5983x10,_0x5983x12)})};function getFaxQueues(_0x5983x16){return function(){switch(_0x5983x16[_0x7500[31]]){case _0x7500[30]:return User[_0x7500[29]](_0x5983x16[_0x7500[26]],{attributes:[_0x7500[26]]})[_0x7500[19]](Util[_0x7500[28]]({},{attributes:[_0x7500[26]]}))[_0x7500[19]](function(_0x5983x17){return {include:{model:FaxAccount,include:{model:FaxApplication,include:{model:FaxQueue,where:{id:_[_0x7500[27]](_0x5983x17,_0x7500[26])}}}}}});default:return {}}}}exports[_0x7500[32]]= function(_0x5983xf,_0x5983x10){return Promise[_0x7500[39]]([])[_0x7500[19]](getFaxQueues(_0x5983xf[_0x7500[30]]))[_0x7500[19]](function(_0x5983x19){return FaxRoom[_0x7500[38]](_[_0x7500[37]](Util[_0x7500[21]](_0x5983xf[_0x7500[20]],{status:_0x7500[34],updatedAt:{$gte:moment()[_0x7500[36]](_0x7500[35])}}),_0x5983x19))})[_0x7500[19]](function(_0x5983x18){return _0x5983x10[_0x7500[18]](200)[_0x7500[17]]({value:_0x5983x18})})[_0x7500[16]](function(_0x5983x12){console[_0x7500[33]](_0x5983x12);return handleError(_0x5983x10,_0x5983x12)})};exports[_0x7500[40]]= function(_0x5983xf,_0x5983x10){return Promise[_0x7500[39]]([])[_0x7500[19]](getFaxQueues(_0x5983xf[_0x7500[30]]))[_0x7500[19]](function(_0x5983x19){return FaxRoom[_0x7500[38]](_[_0x7500[37]](Util[_0x7500[21]](_0x5983xf[_0x7500[20]],{status:_0x7500[41],updatedAt:{$gte:moment()[_0x7500[36]](_0x7500[35])}}),_0x5983x19))})[_0x7500[19]](function(_0x5983x18){return _0x5983x10[_0x7500[18]](200)[_0x7500[17]]({value:_0x5983x18})})[_0x7500[16]](function(_0x5983x12){console[_0x7500[33]](_0x5983x12);return handleError(_0x5983x10,_0x5983x12)})};exports[_0x7500[42]]= function(_0x5983xf,_0x5983x10){return Promise[_0x7500[39]]([])[_0x7500[19]](getFaxQueues(_0x5983xf[_0x7500[30]]))[_0x7500[19]](function(_0x5983x19){return FaxRoom[_0x7500[38]](_[_0x7500[37]](Util[_0x7500[21]](_0x5983xf[_0x7500[20]],{status:_0x7500[43],updatedAt:{$gte:moment()[_0x7500[36]](_0x7500[35])}}),_0x5983x19))})[_0x7500[19]](function(_0x5983x18){return _0x5983x10[_0x7500[18]](200)[_0x7500[17]]({value:_0x5983x18})})[_0x7500[16]](function(_0x5983x12){console[_0x7500[33]](_0x5983x12);return handleError(_0x5983x10,_0x5983x12)})};exports[_0x7500[44]]= function(_0x5983xf,_0x5983x10){return Promise[_0x7500[39]]([])[_0x7500[19]](getFaxQueues(_0x5983xf[_0x7500[30]]))[_0x7500[19]](function(_0x5983x19){return FaxRoom[_0x7500[38]](_[_0x7500[37]](Util[_0x7500[21]](_0x5983xf[_0x7500[20]],{status:_0x7500[45],updatedAt:{$gte:moment()[_0x7500[36]](_0x7500[35])}}),_0x5983x19))})[_0x7500[19]](function(_0x5983x18){return _0x5983x10[_0x7500[18]](200)[_0x7500[17]]({value:_0x5983x18})})[_0x7500[16]](function(_0x5983x12){console[_0x7500[33]](_0x5983x12);return handleError(_0x5983x10,_0x5983x12)})};exports[_0x7500[46]]= function(_0x5983xf,_0x5983x10,_0x5983x11){switch(_0x5983xf[_0x7500[30]][_0x7500[31]]){case _0x7500[52]:return sequelize[_0x7500[20]](_0x7500[48],{replacements:{status:_0x7500[49],id:_0x5983xf[_0x7500[30]][_0x7500[26]]},type:sequelize[_0x7500[51]][_0x7500[50]]})[_0x7500[19]](function(_0x5983x13){return _0x5983x10[_0x7500[18]](200)[_0x7500[17]](_0x5983x13)})[_0x7500[16]](function(_0x5983x12){console[_0x7500[47]](_0x5983x12);return handleError(_0x5983x10,_0x5983x12)});default:return sequelize[_0x7500[20]](_0x7500[53],{replacements:{status:_0x7500[49],id:_0x5983xf[_0x7500[30]][_0x7500[26]]},type:sequelize[_0x7500[51]][_0x7500[50]]})[_0x7500[19]](function(_0x5983x13){return _0x5983x10[_0x7500[18]](200)[_0x7500[17]](_0x5983x13)})[_0x7500[16]](function(_0x5983x12){return handleError(_0x5983x10,_0x5983x12)})}};exports[_0x7500[54]]= function(_0x5983xf,_0x5983x10,_0x5983x11){return FaxRoom[_0x7500[56]]({where:{UserId:_0x5983xf[_0x7500[55]][_0x7500[26]]},include:[{all:true}]})[_0x7500[19]](function(_0x5983x1a){return _0x5983x10[_0x7500[18]](200)[_0x7500[17]](_0x5983x1a)})[_0x7500[16]](function(_0x5983x12){return handleError(_0x5983x10,_0x5983x12)})};exports[_0x7500[57]]= function(_0x5983xf,_0x5983x10,_0x5983x11){var _0x5983x1b;if(_0x5983xf[_0x7500[30]][_0x7500[31]]=== _0x7500[52]){return FaxRoom[_0x7500[29]](_0x5983xf[_0x7500[55]][_0x7500[26]])[_0x7500[19]](function(_0x5983x1c){_0x5983x1b= _0x5983x1c;if(!_0x5983x1b){return _0x5983x10[_0x7500[58]](404)};return _0x5983x1b[_0x7500[60]]({status:_0x7500[43]},{userId:_0x5983xf[_0x7500[30]][_0x7500[26]]})})[_0x7500[19]](function(){return _0x5983x1b[_0x7500[59]](_0x5983xf[_0x7500[30]][_0x7500[26]])})[_0x7500[19]](function(){return _0x5983x10[_0x7500[58]](200)})[_0x7500[16]](function(_0x5983x12){return handleError(_0x5983x10,_0x5983x12)})}};exports[_0x7500[61]]= function(_0x5983xf,_0x5983x10,_0x5983x11){return FaxRoom[_0x7500[24]](_0x7500[23])[_0x7500[29]](_0x5983xf[_0x7500[55]][_0x7500[26]])[_0x7500[19]](function(_0x5983x1c){if(!_0x5983x1c){return _0x5983x10[_0x7500[58]](404)};return _0x5983x10[_0x7500[17]](_0x5983x1c)})[_0x7500[16]](function(_0x5983x12){console[_0x7500[47]](_0x5983x12);return handleError(_0x5983x10,_0x5983x12)})};exports[_0x7500[62]]= function(_0x5983xf,_0x5983x10,_0x5983x11){return FaxRoom[_0x7500[29]](_0x5983xf[_0x7500[55]][_0x7500[26]])[_0x7500[19]](function(_0x5983x1c){if(!_0x5983x1c){return _0x5983x10[_0x7500[58]](404)};return _0x5983x1c[_0x7500[67]]({attributes:[_0x7500[26],_0x7500[63],_0x7500[64],_0x7500[65],_0x7500[31],_0x7500[66]]})})[_0x7500[19]](function(_0x5983x1d){return _0x5983x10[_0x7500[17]](_0x5983x1d)})[_0x7500[16]](function(_0x5983x12){return handleError(_0x5983x10,_0x5983x12)})};exports[_0x7500[68]]= function(_0x5983xf,_0x5983x10,_0x5983x11){return FaxRoom[_0x7500[68]](_0x5983xf[_0x7500[69]])[_0x7500[19]](function(_0x5983x1c){return _0x5983x10[_0x7500[18]](201)[_0x7500[17]](_0x5983x1c)})[_0x7500[16]](function(_0x5983x12){return handleError(_0x5983x10,_0x5983x12)})};exports[_0x7500[70]]= function(_0x5983xf,_0x5983x10,_0x5983x11){_0x5983xf[_0x7500[69]][_0x7500[71]]= _0x5983xf[_0x7500[30]][_0x7500[26]];_0x5983xf[_0x7500[69]][_0x7500[72]]= _0x5983xf[_0x7500[55]][_0x7500[26]];_0x5983xf[_0x7500[69]][_0x7500[73]]= _0x5983xf[_0x7500[69]][_0x7500[73]];return FaxMessage[_0x7500[68]](_0x5983xf[_0x7500[69]],{include:[{model:FaxAttachment}],user:_0x5983xf[_0x7500[30]]})[_0x7500[19]](function(_0x5983x1e){return _0x5983x10[_0x7500[18]](201)[_0x7500[17]](_0x5983x1e)})[_0x7500[16]](function(_0x5983x12){return handleError(_0x5983x10,_0x5983x12)})};exports[_0x7500[60]]= function(_0x5983xf,_0x5983x10,_0x5983x11){return FaxRoom[_0x7500[29]](_0x5983xf[_0x7500[55]][_0x7500[26]])[_0x7500[19]](function(_0x5983x1c){if(!_0x5983x1c){return _0x5983x10[_0x7500[58]](404)};if(_0x5983x1c[_0x7500[74]]){throw new Error(_0x7500[75])};var _0x5983x1f=_[_0x7500[37]](_0x5983x1c,_0x5983xf[_0x7500[69]]);return _0x5983x1f[_0x7500[76]]()})[_0x7500[19]](function(_0x5983x1c){return _0x5983x10[_0x7500[18]](200)[_0x7500[17]](_0x5983x1c)})[_0x7500[16]](function(_0x5983x12){return handleError(_0x5983x10,_0x5983x12)})};exports[_0x7500[77]]= function(_0x5983xf,_0x5983x10,_0x5983x11){return FaxRoom[_0x7500[29]](_0x5983xf[_0x7500[55]][_0x7500[26]])[_0x7500[19]](function(_0x5983x1c){if(!_0x5983x1c){return _0x5983x10[_0x7500[58]](404)};return _0x5983x1c[_0x7500[79]](_0x5983xf[_0x7500[69]][_0x7500[78]],{individualHooks:true})})[_0x7500[19]](function(){return _0x5983x10[_0x7500[58]](200)})[_0x7500[16]](function(_0x5983x12){return handleError(_0x5983x10,_0x5983x12)})};exports[_0x7500[80]]= function(_0x5983xf,_0x5983x10,_0x5983x11){return FaxRoom[_0x7500[29]](_0x5983xf[_0x7500[55]][_0x7500[26]])[_0x7500[19]](function(_0x5983x1c){if(!_0x5983x1c){return _0x5983x10[_0x7500[58]](404)};return _0x5983x1c[_0x7500[80]]()})[_0x7500[19]](function(){return _0x5983x10[_0x7500[58]](204)})[_0x7500[16]](function(_0x5983x12){return handleError(_0x5983x10,_0x5983x12)})};exports[_0x7500[81]]= function(_0x5983xf,_0x5983x10){return FaxRoom[_0x7500[80]]({where:{id:_0x5983xf[_0x7500[20]][_0x7500[82]]},individualHooks:true})[_0x7500[19]](function(){return _0x5983x10[_0x7500[58]](200)})[_0x7500[16]](function(_0x5983x12){return handleError(_0x5983x10,_0x5983x12)})};function handleError(_0x5983x10,_0x5983x12){return _0x5983x10[_0x7500[18]](500)[_0x7500[17]](_0x5983x12)}exports[_0x7500[83]]= function(_0x5983xf,_0x5983x10,_0x5983x11){var _0x5983x21={where:{id:_0x5983xf[_0x7500[55]][_0x7500[26]][_0x7500[85]](_0x7500[84])},user:_0x5983xf[_0x7500[30]],individualHooks:true};return FaxRoom[_0x7500[60]](_0x5983xf[_0x7500[69]],_0x5983x21)[_0x7500[19]](function(_0x5983x22){if(!_0x5983x22){return _0x5983x10[_0x7500[58]](404)};return _0x5983x22})[_0x7500[19]](function(_0x5983x22){return _0x5983x10[_0x7500[58]](200)})[_0x7500[16]](function(_0x5983x12){return handleError(_0x5983x10,_0x5983x12)})};exports[_0x7500[86]]= function(_0x5983xf,_0x5983x10,_0x5983x11){return FaxMessage[_0x7500[29]](_0x5983xf[_0x7500[55]][_0x7500[26]])[_0x7500[19]](function(_0x5983x1e){return _0x5983x1e[_0x7500[87]]({include:[{model:FaxAccount},{model:FaxMessage,include:[{model:FaxAttachment},{model:User,attributes:[_0x7500[26],_0x7500[63],_0x7500[64],_0x7500[65]]}]},{model:User,attributes:[_0x7500[26],_0x7500[63],_0x7500[64],_0x7500[65]]}]})})[_0x7500[19]](function(_0x5983x1c){return _0x5983x10[_0x7500[17]](_0x5983x1c)})[_0x7500[16]](function(_0x5983x12){return handleError(_0x5983x10,_0x5983x12)})} \ No newline at end of file +'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); + }); +}; diff --git a/server/api/fax_room/fax_room.events.js b/server/api/fax_room/fax_room.events.js index 2efa82e..0ed0d8a 100644 --- a/server/api/fax_room/fax_room.events.js +++ b/server/api/fax_room/fax_room.events.js @@ -1 +1,36 @@ -var _0xc425=["\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"];_0xc425[0];const EventEmitter=require(_0xc425[1]);const FaxRoom=require(_0xc425[3])[_0xc425[2]];var FaxRoomEvents= new EventEmitter();FaxRoomEvents[_0xc425[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xc425[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xc425[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xc425[6]};for(var e in events){var event=events[e];FaxRoom[_0xc425[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xf3cbx8,_0xf3cbx9,_0xf3cbxa){FaxRoomEvents[_0xc425[10]](event+ _0xc425[8]+ _0xf3cbx8[_0xc425[9]],_0xf3cbx8);FaxRoomEvents[_0xc425[10]](event,_0xf3cbx8);_0xf3cbxa(null)}}module[_0xc425[11]]= FaxRoomEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/fax_room/fax_room.socket.js b/server/api/fax_room/fax_room.socket.js index 3cb6928..80b8f06 100644 --- a/server/api/fax_room/fax_room.socket.js +++ b/server/api/fax_room/fax_room.socket.js @@ -1 +1,69 @@ -var _0x9313=["\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"];_0x9313[0];const FaxRoomEvents=require(_0x9313[1]);var events=[_0x9313[2],_0x9313[3]];exports[_0x9313[4]]= function(_0x63bbx3){for(var _0x63bbx4=0,_0x63bbx5=events[_0x9313[5]];_0x63bbx4< _0x63bbx5;_0x63bbx4++){var _0x63bbx6=events[_0x63bbx4];var _0x63bbx7=createListener(_0x9313[6]+ _0x63bbx6,_0x63bbx3);FaxRoomEvents[_0x9313[7]](_0x63bbx6,_0x63bbx7);_0x63bbx3[_0x9313[7]](_0x9313[8],removeListener(_0x63bbx6,_0x63bbx7))}};function createListener(_0x63bbx6,_0x63bbx3){return function(_0x63bbx9,_0x63bbxa){_0x63bbx3[_0x9313[9]](_0x63bbx6,_0x63bbx9)}}function removeListener(_0x63bbx6,_0x63bbx7){return function(){FaxRoomEvents[_0x9313[10]](_0x63bbx6,_0x63bbx7)}} \ No newline at end of file +// /** +// * 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); + }; +} diff --git a/server/api/fax_room/index.js b/server/api/fax_room/index.js index 12e6c51..e2652dd 100644 --- a/server/api/fax_room/index.js +++ b/server/api/fax_room/index.js @@ -1 +1,31 @@ -var _0x3e05=["\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"];_0x3e05[0];var express=require(_0x3e05[1]);var controller=require(_0x3e05[2]);var auth=require(_0x3e05[3]);var license=require(_0x3e05[4]);var router=express.Router();router[_0x3e05[12]](_0x3e05[5],license[_0x3e05[6]](),license[_0x3e05[7]](),auth[_0x3e05[8]](),auth[_0x3e05[10]]([10],[_0x3e05[9]]),controller[_0x3e05[11]]);router[_0x3e05[12]](_0x3e05[13],license[_0x3e05[6]](),license[_0x3e05[7]](),auth[_0x3e05[8]](),auth[_0x3e05[10]]([10],[_0x3e05[9],_0x3e05[14]]),controller[_0x3e05[15]]);router[_0x3e05[12]](_0x3e05[16],license[_0x3e05[6]](),license[_0x3e05[7]](),auth[_0x3e05[8]](),auth[_0x3e05[10]]([10],[_0x3e05[9]]),controller[_0x3e05[17]]);router[_0x3e05[12]](_0x3e05[18],license[_0x3e05[6]](),license[_0x3e05[7]](),auth[_0x3e05[8]](),auth[_0x3e05[10]]([10,17],[_0x3e05[9]]),controller[_0x3e05[19]]);router[_0x3e05[12]](_0x3e05[20],license[_0x3e05[6]](),license[_0x3e05[7]](),auth[_0x3e05[8]](),auth[_0x3e05[10]]([10,17],[_0x3e05[9]]),controller[_0x3e05[21]]);router[_0x3e05[12]](_0x3e05[22],license[_0x3e05[6]](),license[_0x3e05[7]](),auth[_0x3e05[8]](),auth[_0x3e05[10]]([10,17],[_0x3e05[9]]),controller[_0x3e05[23]]);router[_0x3e05[12]](_0x3e05[24],license[_0x3e05[6]](),license[_0x3e05[7]](),auth[_0x3e05[8]](),auth[_0x3e05[10]]([10,17],[_0x3e05[9]]),controller[_0x3e05[25]]);router[_0x3e05[12]](_0x3e05[26],license[_0x3e05[6]](),license[_0x3e05[7]](),auth[_0x3e05[8]](),auth[_0x3e05[10]]([10],[_0x3e05[9]]),controller[_0x3e05[27]]);router[_0x3e05[12]](_0x3e05[28],license[_0x3e05[6]](),license[_0x3e05[7]](),auth[_0x3e05[8]](),auth[_0x3e05[10]]([10],[_0x3e05[9],_0x3e05[14]]),controller[_0x3e05[29]]);router[_0x3e05[12]](_0x3e05[30],license[_0x3e05[6]](),license[_0x3e05[7]](),auth[_0x3e05[8]](),auth[_0x3e05[10]]([10],[_0x3e05[9],_0x3e05[31],_0x3e05[14]]),controller[_0x3e05[32]]);router[_0x3e05[12]](_0x3e05[33],license[_0x3e05[6]](),license[_0x3e05[7]](),auth[_0x3e05[8]](),auth[_0x3e05[10]]([10],[_0x3e05[9],_0x3e05[14]]),controller[_0x3e05[34]]);router[_0x3e05[36]](_0x3e05[5],license[_0x3e05[6]](),license[_0x3e05[7]](),auth[_0x3e05[8]](),auth[_0x3e05[10]]([10],[_0x3e05[9]]),controller[_0x3e05[35]]);router[_0x3e05[36]](_0x3e05[37],license[_0x3e05[6]](),license[_0x3e05[7]](),auth[_0x3e05[8]](),auth[_0x3e05[10]]([10],[_0x3e05[9],_0x3e05[31],_0x3e05[14]]),controller[_0x3e05[38]]);router[_0x3e05[40]](_0x3e05[30],license[_0x3e05[6]](),license[_0x3e05[7]](),auth[_0x3e05[8]](),auth[_0x3e05[10]]([10],[_0x3e05[9],_0x3e05[14]]),controller[_0x3e05[39]]);router[_0x3e05[42]](_0x3e05[30],license[_0x3e05[6]](),license[_0x3e05[7]](),auth[_0x3e05[8]](),auth[_0x3e05[10]]([10],[_0x3e05[9],_0x3e05[14]]),controller[_0x3e05[41]]);router[_0x3e05[40]](_0x3e05[33],license[_0x3e05[6]](),license[_0x3e05[7]](),auth[_0x3e05[8]](),auth[_0x3e05[10]]([10],[_0x3e05[9],_0x3e05[14]]),controller[_0x3e05[43]]);router[_0x3e05[40]](_0x3e05[44],license[_0x3e05[6]](),license[_0x3e05[7]](),auth[_0x3e05[8]](),auth[_0x3e05[10]]([10],[_0x3e05[14]]),controller[_0x3e05[45]]);router[_0x3e05[47]](_0x3e05[5],license[_0x3e05[6]](),license[_0x3e05[7]](),auth[_0x3e05[8]](),auth[_0x3e05[10]]([10],[_0x3e05[9]]),controller[_0x3e05[46]]);router[_0x3e05[47]](_0x3e05[30],license[_0x3e05[6]](),license[_0x3e05[7]](),auth[_0x3e05[8]](),auth[_0x3e05[10]]([10],[_0x3e05[9]]),controller[_0x3e05[48]]);module[_0x3e05[49]]= router \ No newline at end of file +'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; diff --git a/server/api/freshdesk_account/freshdesk_account.controller.js b/server/api/freshdesk_account/freshdesk_account.controller.js index 5d801a7..ae9ab8a 100644 --- a/server/api/freshdesk_account/freshdesk_account.controller.js +++ b/server/api/freshdesk_account/freshdesk_account.controller.js @@ -1 +1,239 @@ -var _0x6b55=["\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"];_0x6b55[0];var _=require(_0x6b55[1]);var util=require(_0x6b55[2]);var _fd=require(_0x6b55[3]);var FreshdeskAccount=require(_0x6b55[5])[_0x6b55[4]];function handleError(_0x5731x6,_0x5731x7){_0x5731x7= _0x5731x7|| 500;return function(_0x5731x8){_0x5731x6[_0x6b55[7]](_0x5731x7)[_0x6b55[6]](_0x5731x8)}}function responseWithResult(_0x5731x6,_0x5731x7){_0x5731x7= _0x5731x7|| 200;return function(_0x5731xa){if(_0x5731xa){_0x5731x6[_0x6b55[7]](_0x5731x7)[_0x6b55[8]](_0x5731xa)}}}function handleEntityNotFound(_0x5731x6){return function(_0x5731xa){if(!_0x5731xa){_0x5731x6[_0x6b55[7]](404)[_0x6b55[9]]();return null};return _0x5731xa}}function saveUpdates(_0x5731xd){return function(_0x5731xa){return _0x5731xa[_0x6b55[11]](_0x5731xd)[_0x6b55[10]](function(_0x5731xe){return _0x5731xe})}}function removeEntity(_0x5731x6){return function(_0x5731xa){if(_0x5731xa){return _0x5731xa[_0x6b55[12]]()[_0x6b55[10]](function(){_0x5731x6[_0x6b55[7]](204)[_0x6b55[9]]()})}}}exports[_0x6b55[13]]= function(_0x5731x10,_0x5731x6){var _0x5731x11=[_0x6b55[14],_0x6b55[15],_0x6b55[16],_0x6b55[17]];var _0x5731x12=_0x5731x10[_0x6b55[19]][_0x6b55[18]]?parseInt(_0x5731x10[_0x6b55[19]][_0x6b55[18]],10):100;var _0x5731x13=_0x5731x10[_0x6b55[19]][_0x6b55[20]]?parseInt(_0x5731x10[_0x6b55[19]][_0x6b55[20]],10):0;var _0x5731x14={where:{},limit:_0x5731x12,offset:_0x5731x13* _0x5731x12};_[_0x6b55[34]](_0x5731x10[_0x6b55[19]],function(_0x5731x15,_0x5731x16){switch(_0x5731x16){case _0x6b55[18]:;case _0x6b55[20]:break;case _0x6b55[23]:_0x5731x14[_0x6b55[21]]= util[_0x6b55[26]](_0x6b55[22],_0x5731x10[_0x6b55[19]][_0x6b55[23]],_0x5731x10[_0x6b55[19]][_0x6b55[24]]|| _0x6b55[25])|| null;break;case _0x6b55[24]:break;case _0x6b55[32]:_0x5731x14[_0x6b55[28]][_0x6b55[27]]= [];_0x5731x11[_0x6b55[31]](function(_0x5731x17){var _0x5731x18={};_0x5731x18[_0x5731x17]= {$like:_0x6b55[29]+ _0x5731x15+ _0x6b55[29]};_0x5731x14[_0x6b55[28]][_0x6b55[27]][_0x6b55[30]](_0x5731x18)});break;default:_0x5731x14[_0x6b55[28]][_0x5731x16]= {$like:{}};_0x5731x14[_0x6b55[28]][_0x5731x16][_0x6b55[33]]= _0x6b55[29]+ _0x5731x15+ _0x6b55[29]}});FreshdeskAccount[_0x6b55[46]](_0x5731x14)[_0x6b55[10]](function(_0x5731x19){var _0x5731x1a=Math[_0x6b55[38]](_0x5731x19[_0x6b55[37]]/ _0x5731x12);var _0x5731x1b=_0x5731x1a> (_0x5731x14[_0x6b55[39]]+ 1)?util[_0x6b55[26]](_0x6b55[40],_0x5731x10[_0x6b55[41]],_0x5731x10[_0x6b55[43]][_0x6b55[42]],_0x5731x10[_0x6b55[44]],_0x5731x13+ 1):null;var _0x5731x1c=_0x5731x13> 0?util[_0x6b55[26]](_0x6b55[40],_0x5731x10[_0x6b55[41]],_0x5731x10[_0x6b55[43]][_0x6b55[42]],_0x5731x10[_0x6b55[44]],_0x5731x13- 1):null;return _0x5731x6[_0x6b55[7]](200)[_0x6b55[6]]({count:_0x5731x19[_0x6b55[37]],rows:_0x5731x19[_0x6b55[45]],next_page:_0x5731x1b,previous_page:_0x5731x1c,total_pages:_0x5731x1a})})[_0x6b55[36]](function(_0x5731x8){return _0x5731x6[_0x6b55[7]](500)[_0x6b55[6]]({error:_0x6b55[35]})})};exports[_0x6b55[47]]= function(_0x5731x10,_0x5731x6){FreshdeskAccount[_0x6b55[50]](_0x5731x10[_0x6b55[49]][_0x6b55[48]])[_0x6b55[10]](handleEntityNotFound(_0x5731x6))[_0x6b55[10]](responseWithResult(_0x5731x6))[_0x6b55[36]](handleError(_0x5731x6))};exports[_0x6b55[51]]= function(_0x5731x10,_0x5731x6){FreshdeskAccount[_0x6b55[51]](_0x5731x10[_0x6b55[52]])[_0x6b55[10]](responseWithResult(_0x5731x6,201))[_0x6b55[36]](handleError(_0x5731x6))};exports[_0x6b55[53]]= function(_0x5731x10,_0x5731x6){if(_0x5731x10[_0x6b55[52]][_0x6b55[48]]){delete _0x5731x10[_0x6b55[52]][_0x6b55[48]]};FreshdeskAccount[_0x6b55[50]](_0x5731x10[_0x6b55[49]][_0x6b55[48]])[_0x6b55[10]](handleEntityNotFound(_0x5731x6))[_0x6b55[10]](saveUpdates(_0x5731x10[_0x6b55[52]]))[_0x6b55[10]](responseWithResult(_0x5731x6))[_0x6b55[36]](handleError(_0x5731x6))};exports[_0x6b55[12]]= function(_0x5731x10,_0x5731x6){FreshdeskAccount[_0x6b55[50]](_0x5731x10[_0x6b55[49]][_0x6b55[48]])[_0x6b55[10]](handleEntityNotFound(_0x5731x6))[_0x6b55[10]](removeEntity(_0x5731x6))[_0x6b55[36]](handleError(_0x5731x6))};exports[_0x6b55[54]]= function(_0x5731x10,_0x5731x6){FreshdeskAccount[_0x6b55[12]]({where:{id:_0x5731x10[_0x6b55[19]][_0x6b55[48]]},individualHooks:true})[_0x6b55[10]](function(){return _0x5731x6[_0x6b55[55]](204)})[_0x6b55[36]](function(_0x5731x8){return handleError(_0x5731x6,_0x5731x8)})};exports[_0x6b55[56]]= function(_0x5731x10,_0x5731x6){FreshdeskAccount[_0x6b55[50]](_0x5731x10[_0x6b55[49]][_0x6b55[48]])[_0x6b55[10]](handleEntityNotFound(_0x5731x6))[_0x6b55[10]](function(_0x5731x1d){var _0x5731x1e= new _fd(_0x5731x1d[_0x6b55[17]],_0x5731x1d[_0x6b55[57]]);_0x5731x1e[_0x6b55[60]](function(_0x5731x8,_0x5731x1f,_0x5731x20){if(_0x5731x8){return _0x5731x6[_0x6b55[55]](400)};_0x5731x20= JSON[_0x6b55[58]](_0x5731x20);if(_0x5731x20[_0x6b55[59]]){return _0x5731x6[_0x6b55[55]](400)};return _0x5731x6[_0x6b55[55]](200)})})[_0x6b55[36]](handleError(_0x5731x6))};exports[_0x6b55[61]]= function(_0x5731x10,_0x5731x6){var _0x5731x21={};_0x5731x21[_0x5731x10[_0x6b55[49]][_0x6b55[62]]]= _0x5731x10[_0x6b55[52]][_0x6b55[63]];FreshdeskAccount[_0x6b55[46]]({where:_0x5731x21})[_0x6b55[10]](function(_0x5731x19){if(_0x5731x19[_0x6b55[37]]){return _0x5731x6[_0x6b55[7]](200)[_0x6b55[6]]({isValid:false,value:_0x5731x10[_0x6b55[52]][_0x6b55[63]]})};return _0x5731x6[_0x6b55[7]](200)[_0x6b55[6]]({isValid:true,value:_0x5731x10[_0x6b55[52]][_0x6b55[63]]})})[_0x6b55[36]](function(_0x5731x8){return handleError(_0x5731x6,_0x5731x8)})};exports[_0x6b55[64]]= function(_0x5731x10,_0x5731x6,_0x5731x22){FreshdeskAccount[_0x6b55[50]](_0x5731x10[_0x6b55[49]][_0x6b55[48]])[_0x6b55[10]](handleEntityNotFound(_0x5731x6))[_0x6b55[10]](function(_0x5731x1d){var _0x5731x23= new _fd(_0x5731x1d[_0x6b55[17]],_0x5731x1d[_0x6b55[57]]);_0x5731x23[_0x6b55[66]](_0x6b55[65],function(_0x5731x8,_0x5731x1f,_0x5731x20){if(_0x5731x8){return _0x5731x22(_0x5731x8)};_0x5731x20= JSON[_0x6b55[58]](_0x5731x20);return _0x5731x6[_0x6b55[7]](200)[_0x6b55[6]](_0x5731x20)})})[_0x6b55[36]](handleError(_0x5731x6))} \ No newline at end of file +/** + * 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)); +}; diff --git a/server/api/freshdesk_account/freshdesk_account.events.js b/server/api/freshdesk_account/freshdesk_account.events.js index 9d4c652..0b71e73 100644 --- a/server/api/freshdesk_account/freshdesk_account.events.js +++ b/server/api/freshdesk_account/freshdesk_account.events.js @@ -1 +1,36 @@ -var _0x4990=["\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"];_0x4990[0];const EventEmitter=require(_0x4990[1]);const FreshdeskAccount=require(_0x4990[3])[_0x4990[2]];var FreshdeskAccountEvents= new EventEmitter();FreshdeskAccountEvents[_0x4990[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x4990[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x4990[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x4990[6]};for(var e in events){var event=events[e];FreshdeskAccount[_0x4990[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xc806x8,_0xc806x9,_0xc806xa){FreshdeskAccountEvents[_0x4990[10]](event+ _0x4990[8]+ _0xc806x8[_0x4990[9]],_0xc806x8);FreshdeskAccountEvents[_0x4990[10]](event,_0xc806x8);_0xc806xa(null)}}module[_0x4990[11]]= FreshdeskAccountEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/freshdesk_account/freshdesk_account.socket.js b/server/api/freshdesk_account/freshdesk_account.socket.js index 68f4c81..c41142d 100644 --- a/server/api/freshdesk_account/freshdesk_account.socket.js +++ b/server/api/freshdesk_account/freshdesk_account.socket.js @@ -1 +1,28 @@ -var _0x92b4=["\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"];_0x92b4[0];const FreshdeskAccountEvents=require(_0x92b4[1]);var events=[_0x92b4[2],_0x92b4[3]];exports[_0x92b4[4]]= function(_0x4bd1x3){for(var _0x4bd1x4=0,_0x4bd1x5=events[_0x92b4[5]];_0x4bd1x4< _0x4bd1x5;_0x4bd1x4++){var _0x4bd1x6=events[_0x4bd1x4];var _0x4bd1x7=createListener(_0x92b4[6]+ _0x4bd1x6,_0x4bd1x3);FreshdeskAccountEvents[_0x92b4[7]](_0x4bd1x6,_0x4bd1x7);_0x4bd1x3[_0x92b4[7]](_0x92b4[8],removeListener(_0x4bd1x6,_0x4bd1x7))}};function createListener(_0x4bd1x6,_0x4bd1x3){return function(_0x4bd1x9){_0x4bd1x3[_0x92b4[9]](_0x4bd1x6,_0x4bd1x9)}}function removeListener(_0x4bd1x6,_0x4bd1x7){return function(){FreshdeskAccountEvents[_0x92b4[10]](_0x4bd1x6,_0x4bd1x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/freshdesk_account/index.js b/server/api/freshdesk_account/index.js index f527a6d..a7385b7 100644 --- a/server/api/freshdesk_account/index.js +++ b/server/api/freshdesk_account/index.js @@ -1 +1,21 @@ -var _0xe0a2=["\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"];_0xe0a2[0];var express=require(_0xe0a2[1]);var auth=require(_0xe0a2[2]);var controller=require(_0xe0a2[3]);var router=express.Router();router[_0xe0a2[7]](_0xe0a2[4],auth[_0xe0a2[5]](),controller[_0xe0a2[6]]);router[_0xe0a2[7]](_0xe0a2[8],auth[_0xe0a2[5]](),controller[_0xe0a2[9]]);router[_0xe0a2[7]](_0xe0a2[10],auth[_0xe0a2[5]](),controller[_0xe0a2[11]]);router[_0xe0a2[7]](_0xe0a2[12],auth[_0xe0a2[5]](),controller[_0xe0a2[13]]);router[_0xe0a2[16]](_0xe0a2[14],auth[_0xe0a2[5]](),controller[_0xe0a2[15]]);router[_0xe0a2[16]](_0xe0a2[4],auth[_0xe0a2[5]](),controller[_0xe0a2[17]]);router[_0xe0a2[19]](_0xe0a2[8],auth[_0xe0a2[5]](),controller[_0xe0a2[18]]);router[_0xe0a2[20]](_0xe0a2[8],auth[_0xe0a2[5]](),controller[_0xe0a2[18]]);router[_0xe0a2[22]](_0xe0a2[4],auth[_0xe0a2[5]](),controller[_0xe0a2[21]]);router[_0xe0a2[22]](_0xe0a2[8],auth[_0xe0a2[5]](),controller[_0xe0a2[23]]);module[_0xe0a2[24]]= router \ No newline at end of file +'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; diff --git a/server/api/freshdesk_configuration/freshdesk_configuration.controller.js b/server/api/freshdesk_configuration/freshdesk_configuration.controller.js index e3999f6..4c3d44d 100644 --- a/server/api/freshdesk_configuration/freshdesk_configuration.controller.js +++ b/server/api/freshdesk_configuration/freshdesk_configuration.controller.js @@ -1 +1,146 @@ -var _0xbd15=["\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"];_0xbd15[0];var _=require(_0xbd15[1]);var FreshdeskConfiguration=require(_0xbd15[3])[_0xbd15[2]];var FreshdeskField=require(_0xbd15[3])[_0xbd15[4]];function handleError(_0xd8b2x5,_0xd8b2x6){_0xd8b2x6= _0xd8b2x6|| 500;return function(_0xd8b2x7){_0xd8b2x5[_0xbd15[6]](_0xd8b2x6)[_0xbd15[5]](_0xd8b2x7)}}function responseWithResult(_0xd8b2x5,_0xd8b2x6){_0xd8b2x6= _0xd8b2x6|| 200;return function(_0xd8b2x9){if(_0xd8b2x9){_0xd8b2x5[_0xbd15[6]](_0xd8b2x6)[_0xbd15[7]](_0xd8b2x9)}}}function handleEntityNotFound(_0xd8b2x5){return function(_0xd8b2x9){if(!_0xd8b2x9){_0xd8b2x5[_0xbd15[6]](404)[_0xbd15[8]]();return null};return _0xd8b2x9}}function saveUpdates(_0xd8b2xc){return function(_0xd8b2x9){return _0xd8b2x9[_0xbd15[10]](_0xd8b2xc)[_0xbd15[9]](function(_0xd8b2xd){return _0xd8b2xd})}}function removeEntity(_0xd8b2x5){return function(_0xd8b2x9){if(_0xd8b2x9){return _0xd8b2x9[_0xbd15[11]]()[_0xbd15[9]](function(){_0xd8b2x5[_0xbd15[6]](204)[_0xbd15[8]]()})}}}exports[_0xbd15[12]]= function(_0xd8b2xf,_0xd8b2x5){FreshdeskConfiguration[_0xbd15[15]]({where:_0xd8b2xf[_0xbd15[14]]})[_0xbd15[9]](responseWithResult(_0xd8b2x5))[_0xbd15[13]](handleError(_0xd8b2x5))};exports[_0xbd15[16]]= function(_0xd8b2xf,_0xd8b2x5){FreshdeskConfiguration[_0xbd15[22]]({where:{id:_0xd8b2xf[_0xbd15[18]][_0xbd15[17]]},include:[{model:FreshdeskField,as:_0xbd15[19]},{model:FreshdeskField,as:_0xbd15[20]},{model:FreshdeskField,as:_0xbd15[21]}]})[_0xbd15[9]](handleEntityNotFound(_0xd8b2x5))[_0xbd15[9]](responseWithResult(_0xd8b2x5))[_0xbd15[13]](handleError(_0xd8b2x5))};exports[_0xbd15[23]]= function(_0xd8b2xf,_0xd8b2x5){FreshdeskConfiguration[_0xbd15[23]](_0xd8b2xf[_0xbd15[24]])[_0xbd15[9]](responseWithResult(_0xd8b2x5,201))[_0xbd15[13]](handleError(_0xd8b2x5))};exports[_0xbd15[25]]= function(_0xd8b2xf,_0xd8b2x5){if(_0xd8b2xf[_0xbd15[24]][_0xbd15[17]]){delete _0xd8b2xf[_0xbd15[24]][_0xbd15[17]]};FreshdeskConfiguration[_0xbd15[26]](_0xd8b2xf[_0xbd15[18]][_0xbd15[17]])[_0xbd15[9]](handleEntityNotFound(_0xd8b2x5))[_0xbd15[9]](saveUpdates(_0xd8b2xf[_0xbd15[24]]))[_0xbd15[9]](responseWithResult(_0xd8b2x5))[_0xbd15[13]](handleError(_0xd8b2x5))};exports[_0xbd15[11]]= function(_0xd8b2xf,_0xd8b2x5){FreshdeskConfiguration[_0xbd15[26]](_0xd8b2xf[_0xbd15[18]][_0xbd15[17]])[_0xbd15[9]](handleEntityNotFound(_0xd8b2x5))[_0xbd15[9]](removeEntity(_0xd8b2x5))[_0xbd15[13]](handleError(_0xd8b2x5))};exports[_0xbd15[27]]= function(_0xd8b2xf,_0xd8b2x5,_0xd8b2x10){var _0xd8b2x11;FreshdeskConfiguration[_0xbd15[26]](_0xd8b2xf[_0xbd15[18]][_0xbd15[17]])[_0xbd15[9]](handleEntityNotFound(_0xd8b2x5))[_0xbd15[9]](function(_0xd8b2x14){_0xd8b2x11= _0xd8b2x14;return FreshdeskField[_0xbd15[23]](_0xd8b2xf[_0xbd15[24]])})[_0xbd15[9]](function(_0xd8b2x13){switch(_0xd8b2xf[_0xbd15[18]][_0xbd15[35]]){case _0xbd15[30]:return [_0xd8b2x11[_0xbd15[29]](_0xd8b2x13),_0xd8b2x13];case _0xbd15[32]:return [_0xd8b2x11[_0xbd15[31]](_0xd8b2x13),_0xd8b2x13];case _0xbd15[34]:return [_0xd8b2x11[_0xbd15[33]](_0xd8b2x13),_0xd8b2x13]}})[_0xbd15[28]](function(_0xd8b2x12,_0xd8b2x13){return _0xd8b2x5[_0xbd15[6]](201)[_0xbd15[7]](_0xd8b2x13)})[_0xbd15[13]](handleError(_0xd8b2x5))} \ No newline at end of file +/** + * 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)); +}; diff --git a/server/api/freshdesk_configuration/freshdesk_configuration.events.js b/server/api/freshdesk_configuration/freshdesk_configuration.events.js index a0adebb..f36d5f5 100644 --- a/server/api/freshdesk_configuration/freshdesk_configuration.events.js +++ b/server/api/freshdesk_configuration/freshdesk_configuration.events.js @@ -1 +1,36 @@ -var _0x840d=["\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"];_0x840d[0];const EventEmitter=require(_0x840d[1]);const FreshdeskConfiguration=require(_0x840d[3])[_0x840d[2]];var FreshdeskConfigurationEvents= new EventEmitter();FreshdeskConfigurationEvents[_0x840d[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x840d[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x840d[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x840d[6]};for(var e in events){var event=events[e];FreshdeskConfiguration[_0x840d[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x40d5x8,_0x40d5x9,_0x40d5xa){FreshdeskConfigurationEvents[_0x840d[10]](event+ _0x840d[8]+ _0x40d5x8[_0x840d[9]],_0x40d5x8);FreshdeskConfigurationEvents[_0x840d[10]](event,_0x40d5x8);_0x40d5xa(null)}}module[_0x840d[11]]= FreshdeskConfigurationEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/freshdesk_configuration/freshdesk_configuration.socket.js b/server/api/freshdesk_configuration/freshdesk_configuration.socket.js index ad91347..9c77498 100644 --- a/server/api/freshdesk_configuration/freshdesk_configuration.socket.js +++ b/server/api/freshdesk_configuration/freshdesk_configuration.socket.js @@ -1 +1,28 @@ -var _0xd952=["\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"];_0xd952[0];const FreshdeskConfigurationEvents=require(_0xd952[1]);var events=[_0xd952[2],_0xd952[3]];exports[_0xd952[4]]= function(_0xea65x3){for(var _0xea65x4=0,_0xea65x5=events[_0xd952[5]];_0xea65x4< _0xea65x5;_0xea65x4++){var _0xea65x6=events[_0xea65x4];var _0xea65x7=createListener(_0xd952[6]+ _0xea65x6,_0xea65x3);FreshdeskConfigurationEvents[_0xd952[7]](_0xea65x6,_0xea65x7);_0xea65x3[_0xd952[7]](_0xd952[8],removeListener(_0xea65x6,_0xea65x7))}};function createListener(_0xea65x6,_0xea65x3){return function(_0xea65x9){_0xea65x3[_0xd952[9]](_0xea65x6,_0xea65x9)}}function removeListener(_0xea65x6,_0xea65x7){return function(){FreshdeskConfigurationEvents[_0xd952[10]](_0xea65x6,_0xea65x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/freshdesk_configuration/index.js b/server/api/freshdesk_configuration/index.js index 4590844..e08945f 100644 --- a/server/api/freshdesk_configuration/index.js +++ b/server/api/freshdesk_configuration/index.js @@ -1 +1,19 @@ -var _0xb241=["\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"];_0xb241[0];var express=require(_0xb241[1]);var auth=require(_0xb241[2]);var controller=require(_0xb241[3]);var router=express.Router();router[_0xb241[7]](_0xb241[4],auth[_0xb241[5]](),controller[_0xb241[6]]);router[_0xb241[7]](_0xb241[8],auth[_0xb241[5]](),controller[_0xb241[9]]);router[_0xb241[11]](_0xb241[4],auth[_0xb241[5]](),controller[_0xb241[10]]);router[_0xb241[13]](_0xb241[8],auth[_0xb241[5]](),controller[_0xb241[12]]);router[_0xb241[11]](_0xb241[14],auth[_0xb241[5]](),controller[_0xb241[15]]);router[_0xb241[16]](_0xb241[8],auth[_0xb241[5]](),controller[_0xb241[12]]);router[_0xb241[18]](_0xb241[8],auth[_0xb241[5]](),controller[_0xb241[17]]);module[_0xb241[19]]= router \ No newline at end of file +'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; diff --git a/server/api/freshdesk_field/freshdesk_field.controller.js b/server/api/freshdesk_field/freshdesk_field.controller.js index b08d345..4a35db8 100644 --- a/server/api/freshdesk_field/freshdesk_field.controller.js +++ b/server/api/freshdesk_field/freshdesk_field.controller.js @@ -1 +1,104 @@ -var _0x372f=["\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"];_0x372f[0];var _=require(_0x372f[1]);var FreshdeskField=require(_0x372f[3])[_0x372f[2]];function handleError(_0xc990x4,_0xc990x5){_0xc990x5= _0xc990x5|| 500;return function(_0xc990x6){_0xc990x4[_0x372f[5]](_0xc990x5)[_0x372f[4]](_0xc990x6)}}function responseWithResult(_0xc990x4,_0xc990x5){_0xc990x5= _0xc990x5|| 200;return function(_0xc990x8){if(_0xc990x8){_0xc990x4[_0x372f[5]](_0xc990x5)[_0x372f[6]](_0xc990x8)}}}function handleEntityNotFound(_0xc990x4){return function(_0xc990x8){if(!_0xc990x8){_0xc990x4[_0x372f[5]](404)[_0x372f[7]]();return null};return _0xc990x8}}function saveUpdates(_0xc990xb){return function(_0xc990x8){return _0xc990x8[_0x372f[9]](_0xc990xb)[_0x372f[8]](function(_0xc990xc){return _0xc990xc})}}function removeEntity(_0xc990x4){return function(_0xc990x8){if(_0xc990x8){return _0xc990x8[_0x372f[10]]()[_0x372f[8]](function(){_0xc990x4[_0x372f[5]](204)[_0x372f[7]]()})}}}exports[_0x372f[11]]= function(_0xc990xe,_0xc990x4){FreshdeskField[_0x372f[13]]()[_0x372f[8]](responseWithResult(_0xc990x4))[_0x372f[12]](handleError(_0xc990x4))};exports[_0x372f[14]]= function(_0xc990xe,_0xc990x4){FreshdeskField[_0x372f[17]](_0xc990xe[_0x372f[16]][_0x372f[15]])[_0x372f[8]](handleEntityNotFound(_0xc990x4))[_0x372f[8]](responseWithResult(_0xc990x4))[_0x372f[12]](handleError(_0xc990x4))};exports[_0x372f[18]]= function(_0xc990xe,_0xc990x4){FreshdeskField[_0x372f[18]](_0xc990xe[_0x372f[19]])[_0x372f[8]](responseWithResult(_0xc990x4,201))[_0x372f[12]](handleError(_0xc990x4))};exports[_0x372f[20]]= function(_0xc990xe,_0xc990x4){if(_0xc990xe[_0x372f[19]][_0x372f[15]]){delete _0xc990xe[_0x372f[19]][_0x372f[15]]};FreshdeskField[_0x372f[17]](_0xc990xe[_0x372f[16]][_0x372f[15]])[_0x372f[8]](handleEntityNotFound(_0xc990x4))[_0x372f[8]](saveUpdates(_0xc990xe[_0x372f[19]]))[_0x372f[8]](responseWithResult(_0xc990x4))[_0x372f[12]](handleError(_0xc990x4))};exports[_0x372f[10]]= function(_0xc990xe,_0xc990x4){FreshdeskField[_0x372f[17]](_0xc990xe[_0x372f[16]][_0x372f[15]])[_0x372f[8]](handleEntityNotFound(_0xc990x4))[_0x372f[8]](removeEntity(_0xc990x4))[_0x372f[12]](handleError(_0xc990x4))} \ No newline at end of file +/** + * 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)); +} diff --git a/server/api/freshdesk_field/freshdesk_field.events.js b/server/api/freshdesk_field/freshdesk_field.events.js index 62dec35..dcadf5c 100644 --- a/server/api/freshdesk_field/freshdesk_field.events.js +++ b/server/api/freshdesk_field/freshdesk_field.events.js @@ -1 +1,36 @@ -var _0x53a5=["\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"];_0x53a5[0];const EventEmitter=require(_0x53a5[1]);const FreshdeskField=require(_0x53a5[3])[_0x53a5[2]];var FreshdeskFieldEvents= new EventEmitter();FreshdeskFieldEvents[_0x53a5[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x53a5[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x53a5[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x53a5[6]};for(var e in events){var event=events[e];FreshdeskField[_0x53a5[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x5184x8,_0x5184x9,_0x5184xa){FreshdeskFieldEvents[_0x53a5[10]](event+ _0x53a5[8]+ _0x5184x8[_0x53a5[9]],_0x5184x8);FreshdeskFieldEvents[_0x53a5[10]](event,_0x5184x8);_0x5184xa(null)}}module[_0x53a5[11]]= FreshdeskFieldEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/freshdesk_field/freshdesk_field.socket.js b/server/api/freshdesk_field/freshdesk_field.socket.js index 0aa3acc..41eae7a 100644 --- a/server/api/freshdesk_field/freshdesk_field.socket.js +++ b/server/api/freshdesk_field/freshdesk_field.socket.js @@ -1 +1,28 @@ -var _0x263b=["\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"];_0x263b[0];const FreshdeskFieldEvents=require(_0x263b[1]);var events=[_0x263b[2],_0x263b[3]];exports[_0x263b[4]]= function(_0x944bx3){for(var _0x944bx4=0,_0x944bx5=events[_0x263b[5]];_0x944bx4< _0x944bx5;_0x944bx4++){var _0x944bx6=events[_0x944bx4];var _0x944bx7=createListener(_0x263b[6]+ _0x944bx6,_0x944bx3);FreshdeskFieldEvents[_0x263b[7]](_0x944bx6,_0x944bx7);_0x944bx3[_0x263b[7]](_0x263b[8],removeListener(_0x944bx6,_0x944bx7))}};function createListener(_0x944bx6,_0x944bx3){return function(_0x944bx9){_0x944bx3[_0x263b[9]](_0x944bx6,_0x944bx9)}}function removeListener(_0x944bx6,_0x944bx7){return function(){FreshdeskFieldEvents[_0x263b[10]](_0x944bx6,_0x944bx7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/freshdesk_field/index.js b/server/api/freshdesk_field/index.js index 673397d..d17268f 100644 --- a/server/api/freshdesk_field/index.js +++ b/server/api/freshdesk_field/index.js @@ -1 +1,18 @@ -var _0x7bb5=["\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"];_0x7bb5[0];var express=require(_0x7bb5[1]);var auth=require(_0x7bb5[2]);var controller=require(_0x7bb5[3]);var router=express.Router();router[_0x7bb5[7]](_0x7bb5[4],auth[_0x7bb5[5]](),controller[_0x7bb5[6]]);router[_0x7bb5[7]](_0x7bb5[8],auth[_0x7bb5[5]](),controller[_0x7bb5[9]]);router[_0x7bb5[11]](_0x7bb5[4],auth[_0x7bb5[5]](),controller[_0x7bb5[10]]);router[_0x7bb5[13]](_0x7bb5[8],auth[_0x7bb5[5]](),controller[_0x7bb5[12]]);router[_0x7bb5[14]](_0x7bb5[8],auth[_0x7bb5[5]](),controller[_0x7bb5[12]]);router[_0x7bb5[16]](_0x7bb5[8],auth[_0x7bb5[5]](),controller[_0x7bb5[15]]);module[_0x7bb5[17]]= router \ No newline at end of file +'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; diff --git a/server/api/integration/index.js b/server/api/integration/index.js index 73bf633..74118a8 100644 --- a/server/api/integration/index.js +++ b/server/api/integration/index.js @@ -1 +1,15 @@ -var _0x1a65=["\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"];_0x1a65[0];var express=require(_0x1a65[1]);var controller=require(_0x1a65[2]);var auth=require(_0x1a65[3]);var router=express.Router();router[_0x1a65[10]](_0x1a65[4],auth[_0x1a65[5]](),auth[_0x1a65[8]]([19],[_0x1a65[6],_0x1a65[7]]),controller[_0x1a65[9]]);router[_0x1a65[10]](_0x1a65[11],auth[_0x1a65[5]](),auth[_0x1a65[12]](_0x1a65[6]),controller[_0x1a65[13]]);router[_0x1a65[15]](_0x1a65[4],auth[_0x1a65[5]](),auth[_0x1a65[12]](_0x1a65[6]),controller[_0x1a65[14]]);router[_0x1a65[17]](_0x1a65[11],auth[_0x1a65[5]](),auth[_0x1a65[12]](_0x1a65[6]),controller[_0x1a65[16]]);router[_0x1a65[19]](_0x1a65[11],auth[_0x1a65[5]](),auth[_0x1a65[12]](_0x1a65[6]),controller[_0x1a65[18]]);module[_0x1a65[20]]= router \ No newline at end of file +'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; diff --git a/server/api/integration/integration.controller.js b/server/api/integration/integration.controller.js index 0afdc62..d99521f 100644 --- a/server/api/integration/integration.controller.js +++ b/server/api/integration/integration.controller.js @@ -1 +1,168 @@ -var _0xd12b=["\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"];_0xd12b[0];var _=require(_0xd12b[1]);var uploadFile=require(_0xd12b[2]);var config=require(_0xd12b[3]);var path=require(_0xd12b[4]);var sr=require(_0xd12b[5]);var admZip=require(_0xd12b[6]);var str2json=require(_0xd12b[7]);var fs=require(_0xd12b[8]);var Util=require(_0xd12b[9]);var Integration=require(_0xd12b[11])[_0xd12b[10]];exports[_0xd12b[12]]= function(_0x4677xb,_0x4677xc,_0x4677xd){return Integration[_0xd12b[19]](Util[_0xd12b[18]](_0x4677xb[_0xd12b[17]]))[_0xd12b[16]](function(_0x4677xf){_0x4677xc[_0xd12b[15]](200)[_0xd12b[14]](_0x4677xf)})[_0xd12b[13]](function(_0x4677xe){return handleError(_0x4677xc,_0x4677xe)})};exports[_0xd12b[20]]= function(_0x4677xb,_0x4677xc){return Integration[_0xd12b[24]](_0x4677xb[_0xd12b[23]][_0xd12b[22]])[_0xd12b[16]](function(_0x4677x10){if(!_0x4677x10){return _0x4677xc[_0xd12b[21]](404)};return _0x4677xc[_0xd12b[14]](_0x4677x10)})[_0xd12b[13]](function(_0x4677xe){return handleError(_0x4677xc,_0x4677xe)})};exports[_0xd12b[25]]= function(_0x4677xb,_0x4677xc){var _0x4677x11= new uploadFile({dest:path[_0xd12b[28]](config[_0xd12b[26]],_0xd12b[27]),maxFileSize:5* 1000000,maxNumberOfFiles:1,minNumberOfFiles:1,acceptFileTypes:/(\.|\/)(zip)$/i,messages:{maxNumberOfFiles:_0xd12b[29],acceptFileTypes:_0xd12b[30],maxFileSize:_0xd12b[31],invalidRequest:_0xd12b[32]}});_0x4677x11[_0xd12b[50]](_0xd12b[33],function(_0x4677x12,_0x4677x13){var _0x4677x14= new admZip(_0x4677x13[_0xd12b[34]][_0xd12b[4]]);var _0x4677x15=false;var _0x4677x16=_0x4677x14[_0xd12b[35]]();_0x4677x16[_0xd12b[46]](function(_0x4677x17){if(_0x4677x17[_0xd12b[36]]=== _0xd12b[37]){var _0x4677x18=_0x4677x17[_0xd12b[39]]().toString(_0xd12b[38]);console[_0xd12b[41]](_0xd12b[40],_0x4677x18);try{_0x4677x15= JSON[_0xd12b[42]](_0x4677x18);console[_0xd12b[41]](_0xd12b[40],_0x4677x15);Integration[_0xd12b[25]](_[_0xd12b[44]](_0x4677x13[_0xd12b[34]],_0x4677x15))[_0xd12b[16]](function(_0x4677x10){_0x4677x14[_0xd12b[43]](path[_0xd12b[28]](config[_0xd12b[26]],_0xd12b[27]),true);return _0x4677xc[_0xd12b[15]](201)[_0xd12b[14]](_0x4677x10)})[_0xd12b[13]](function(_0x4677xe){return handleError(_0x4677xc,_0x4677xe)})}catch(e){console[_0xd12b[41]](e);var _0x4677xe={errors:[{type:_0xd12b[45],message:e}]};return handleError(_0x4677xc,_0x4677xe)}}});fs[_0xd12b[47]](_0x4677x13[_0xd12b[34]][_0xd12b[4]]);if(!_0x4677x15){var _0x4677xe={errors:[{type:_0xd12b[48],message:_0xd12b[49]}]};return handleError(_0x4677xc,_0x4677xe)}});_0x4677x11[_0xd12b[50]](_0xd12b[51],function(_0x4677x19){var _0x4677xe={errors:[{type:_0xd12b[52],message:_0x4677x19}]};return handleError(_0x4677xc,_0x4677xe)});_0x4677x11[_0xd12b[42]](_0x4677xb)};exports[_0xd12b[53]]= function(_0x4677xb,_0x4677xc){if(_0x4677xb[_0xd12b[54]][_0xd12b[22]]){delete _0x4677xb[_0xd12b[54]][_0xd12b[22]]};return Integration[_0xd12b[24]](_0x4677xb[_0xd12b[23]][_0xd12b[22]])[_0xd12b[16]](function(_0x4677x10){if(!_0x4677x10){return _0x4677xc[_0xd12b[21]](404)};var _0x4677x1a=_[_0xd12b[44]](_0x4677x10,_0x4677xb[_0xd12b[54]]);return _0x4677x1a[_0xd12b[55]]()})[_0xd12b[16]](function(_0x4677x10){return _0x4677xc[_0xd12b[15]](200)[_0xd12b[14]](_0x4677x10)})[_0xd12b[13]](function(_0x4677xe){return handleError(_0x4677xc,_0x4677xe)})};exports[_0xd12b[56]]= function(_0x4677xb,_0x4677xc){return Integration[_0xd12b[57]]({where:{id:_0x4677xb[_0xd12b[23]][_0xd12b[22]]}})[_0xd12b[16]](function(_0x4677x10){if(!_0x4677x10){return _0x4677xc[_0xd12b[21]](404)};return _0x4677x10[_0xd12b[56]]()})[_0xd12b[16]](function(){return _0x4677xc[_0xd12b[21]](204)})[_0xd12b[13]](function(_0x4677xe){return handleError(_0x4677xc,_0x4677xe)})};function handleError(_0x4677xc,_0x4677xe){return _0x4677xc[_0xd12b[15]](500)[_0xd12b[14]](_0x4677xe)} \ No newline at end of file +'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); +} diff --git a/server/api/integration/integration.events.js b/server/api/integration/integration.events.js index d3eafd0..6c9a2bf 100644 --- a/server/api/integration/integration.events.js +++ b/server/api/integration/integration.events.js @@ -1 +1,36 @@ -var _0x12ea=["\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"];_0x12ea[0];const EventEmitter=require(_0x12ea[1]);const Integration=require(_0x12ea[3])[_0x12ea[2]];var IntegrationEvents= new EventEmitter();IntegrationEvents[_0x12ea[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x12ea[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x12ea[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x12ea[6]};for(var e in events){var event=events[e];Integration[_0x12ea[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xcae6x8,_0xcae6x9,_0xcae6xa){IntegrationEvents[_0x12ea[10]](event+ _0x12ea[8]+ _0xcae6x8[_0x12ea[9]],_0xcae6x8);IntegrationEvents[_0x12ea[10]](event,_0xcae6x8);_0xcae6xa(null)}}module[_0x12ea[11]]= IntegrationEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/integration/integration.socket.js b/server/api/integration/integration.socket.js index 63fe932..849c2ef 100644 --- a/server/api/integration/integration.socket.js +++ b/server/api/integration/integration.socket.js @@ -1 +1,28 @@ -var _0x1c21=["\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"];_0x1c21[0];const IntegrationEvents=require(_0x1c21[1]);var events=[_0x1c21[2],_0x1c21[3]];exports[_0x1c21[4]]= function(_0x90c6x3){for(var _0x90c6x4=0,_0x90c6x5=events[_0x1c21[5]];_0x90c6x4< _0x90c6x5;_0x90c6x4++){var _0x90c6x6=events[_0x90c6x4];var _0x90c6x7=createListener(_0x1c21[6]+ _0x90c6x6,_0x90c6x3);IntegrationEvents[_0x1c21[7]](_0x90c6x6,_0x90c6x7);_0x90c6x3[_0x1c21[7]](_0x1c21[8],removeListener(_0x90c6x6,_0x90c6x7))}};function createListener(_0x90c6x6,_0x90c6x3){return function(_0x90c6x9){_0x90c6x3[_0x1c21[9]](_0x90c6x6,_0x90c6x9)}}function removeListener(_0x90c6x6,_0x90c6x7){return function(){IntegrationEvents[_0x1c21[10]](_0x90c6x6,_0x90c6x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/interval/index.js b/server/api/interval/index.js index 42ff967..2fb3ff5 100644 --- a/server/api/interval/index.js +++ b/server/api/interval/index.js @@ -1 +1,201 @@ -var _0x42a7=["\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"];_0x42a7[0];var express=require(_0x42a7[1]);var controller=require(_0x42a7[2]);var auth=require(_0x42a7[3]);var router=express.Router();router[_0x42a7[9]](_0x42a7[4],auth[_0x42a7[5]](),auth[_0x42a7[7]]([13,7,8,9,10,11],[_0x42a7[6]]),controller[_0x42a7[8]]);router[_0x42a7[9]](_0x42a7[10],auth[_0x42a7[5]](),auth[_0x42a7[7]]([13],[_0x42a7[6]]),controller[_0x42a7[11]]);router[_0x42a7[13]](_0x42a7[4],auth[_0x42a7[5]](),auth[_0x42a7[7]]([13],[_0x42a7[6]]),controller[_0x42a7[12]]);router[_0x42a7[15]](_0x42a7[10],auth[_0x42a7[5]](),auth[_0x42a7[7]]([13],[_0x42a7[6]]),controller[_0x42a7[14]]);router[_0x42a7[17]](_0x42a7[4],auth[_0x42a7[5]](),auth[_0x42a7[7]]([13],[_0x42a7[6]]),controller[_0x42a7[16]]);router[_0x42a7[17]](_0x42a7[10],auth[_0x42a7[5]](),auth[_0x42a7[7]]([13],[_0x42a7[6]]),controller[_0x42a7[18]]);module[_0x42a7[19]]= router \ No newline at end of file +'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; diff --git a/server/api/interval/interval.controller.js b/server/api/interval/interval.controller.js index 17f0f05..8931ac2 100644 --- a/server/api/interval/interval.controller.js +++ b/server/api/interval/interval.controller.js @@ -1 +1,195 @@ -var _0x8095=["\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"];_0x8095[0];var _=require(_0x8095[1]);var Interval=require(_0x8095[3])[_0x8095[2]];var VoiceExtension=require(_0x8095[3])[_0x8095[4]];var sequelize=require(_0x8095[3])[_0x8095[5]];var Promise=require(_0x8095[6]);var Util=require(_0x8095[7]);exports[_0x8095[8]]= function(_0x6d45x7,_0x6d45x8,_0x6d45x9){return Interval[_0x8095[19]](_0x8095[17],_0x8095[18])[_0x8095[16]](_[_0x8095[15]](Util[_0x8095[14]](_0x6d45x7[_0x8095[13]]),{distinct:true}))[_0x8095[12]](function(_0x6d45xb){_0x6d45x8[_0x8095[11]](200)[_0x8095[10]](_0x6d45xb)})[_0x8095[9]](function(_0x6d45xa){return handleError(_0x6d45x8,_0x6d45xa)})};exports[_0x8095[20]]= function(_0x6d45x7,_0x6d45x8){return Interval[_0x8095[19]](_0x8095[18])[_0x8095[24]](_0x6d45x7[_0x8095[23]][_0x8095[22]])[_0x8095[12]](function(_0x6d45xc){if(!_0x6d45xc){return _0x6d45x8[_0x8095[21]](404)};return _0x6d45x8[_0x8095[10]](_0x6d45xc)})[_0x8095[9]](function(_0x6d45xa){return handleError(_0x6d45x8,_0x6d45xa)})};exports[_0x8095[25]]= function(_0x6d45x7,_0x6d45x8){return Interval[_0x8095[19]](_0x8095[18])[_0x8095[25]](_0x6d45x7[_0x8095[27]])[_0x8095[12]](function(_0x6d45xc){return _0x6d45x8[_0x8095[11]](201)[_0x8095[10]](_0x6d45xc)})[_0x8095[9]](function(_0x6d45xa){console[_0x8095[26]](_0x6d45xa);return handleError(_0x6d45x8,_0x6d45xa)})};exports[_0x8095[28]]= function(_0x6d45x7,_0x6d45x8){var _0x6d45xd;return sequelize[_0x8095[34]](function(_0x6d45xe){if(_0x6d45x7[_0x8095[27]][_0x8095[22]]){delete _0x6d45x7[_0x8095[27]][_0x8095[22]]};return Interval[_0x8095[19]](_0x8095[18])[_0x8095[24]](_0x6d45x7[_0x8095[23]][_0x8095[22]])[_0x8095[12]](function(_0x6d45xc){if(!_0x6d45xc){return _0x6d45x8[_0x8095[21]](404)};_0x6d45xd= _[_0x8095[32]](_0x6d45xc);return _0x6d45xc[_0x8095[33]](_0x6d45x7[_0x8095[27]],{transaction:_0x6d45xe})})[_0x8095[12]](function(){if(_0x6d45x7[_0x8095[27]][_0x8095[29]]&& !_0x6d45x7[_0x8095[27]][_0x8095[29]][_0x8095[30]]){return Interval[_0x8095[31]]({where:{IntervalId:_0x6d45x7[_0x8095[23]][_0x8095[22]]},transaction:_0x6d45xe})}else {if(_0x6d45x7[_0x8095[27]][_0x8095[29]]&& _0x6d45x7[_0x8095[27]][_0x8095[29]][_0x8095[30]]){return bulkCreateSubIntervals(_0x6d45x7[_0x8095[27]].SubIntervals,_0x6d45xd,_0x6d45xe)}}})})[_0x8095[12]](function(){return _0x6d45x8[_0x8095[21]](200)})[_0x8095[9]](function(_0x6d45xa){console[_0x8095[26]](_0x6d45xa);return handleError(_0x6d45x8,_0x6d45xa)})};function bulkCreateSubIntervals(_0x6d45x10,_0x6d45xd,_0x6d45xe){return Promise[_0x8095[35]]([])[_0x8095[12]](function(){var _0x6d45x11=[];var _0x6d45x12=_[_0x8095[37]](_0x6d45xd.SubIntervals,_0x8095[36]);var _0x6d45x13;_[_0x8095[42]](_0x6d45x12,function(_0x6d45x14,_0x6d45x15){_0x6d45x13= _[_0x8095[38]](_0x6d45x10,{id:_0x6d45x14[_0x8095[22]]});if(_0x6d45x13){_0x6d45x13[_0x8095[39]]= _0x6d45xd[_0x8095[22]];_0x6d45x11[_0x8095[40]](Interval[_0x8095[28]](_[_0x8095[32]](_0x6d45x13),{where:{id:_0x6d45x14[_0x8095[22]]},transaction:_0x6d45xe,individualHooks:true}));_[_0x8095[41]](_0x6d45x10,{id:_0x6d45x14[_0x8095[22]]})}else {_0x6d45x11[_0x8095[40]](Interval[_0x8095[31]]({where:{id:_0x6d45x14[_0x8095[22]]},transaction:_0x6d45xe}))}});_[_0x8095[42]](_0x6d45x10,function(_0x6d45x14){_0x6d45x14[_0x8095[39]]= _0x6d45xd[_0x8095[22]];_0x6d45x11[_0x8095[40]](Interval[_0x8095[25]](_0x6d45x14,{transaction:_0x6d45xe}))});return _0x6d45x11})[_0x8095[35]]()}exports[_0x8095[31]]= function(_0x6d45x7,_0x6d45x8){return sequelize[_0x8095[34]](function(_0x6d45xe){return Interval[_0x8095[31]]({where:{id:_0x6d45x7[_0x8095[23]][_0x8095[22]]},individualHooks:true,transaction:_0x6d45xe})})[_0x8095[12]](function(){return _0x6d45x8[_0x8095[21]](204)})[_0x8095[9]](sequelize.ForeignKeyConstraintError,function(_0x6d45xa){_0x6d45xa[_0x8095[43]]= _0x8095[44];_0x6d45xa[_0x8095[45]]= _0x8095[46];return handleError(_0x6d45x8,_0x6d45xa)})[_0x8095[9]](function(_0x6d45xa){return handleError(_0x6d45x8,_0x6d45xa)})};exports[_0x8095[47]]= function(_0x6d45x7,_0x6d45x8){return sequelize[_0x8095[34]](function(_0x6d45xe){return Interval[_0x8095[31]]({where:{id:_0x6d45x7[_0x8095[13]][_0x8095[48]]},individualHooks:true,transaction:_0x6d45xe})})[_0x8095[12]](function(){return _0x6d45x8[_0x8095[21]](204)})[_0x8095[9]](sequelize.ForeignKeyConstraintError,function(_0x6d45xa){_0x6d45xa[_0x8095[43]]= _0x8095[44];_0x6d45xa[_0x8095[45]]= _0x8095[46];return handleError(_0x6d45x8,_0x6d45xa)})[_0x8095[9]](function(_0x6d45xa){return handleError(_0x6d45x8,_0x6d45xa)})};function handleError(_0x6d45x8,_0x6d45xa){return _0x6d45x8[_0x8095[11]](500)[_0x8095[10]](_0x6d45xa)} \ No newline at end of file +'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); +} diff --git a/server/api/interval/interval.events.js b/server/api/interval/interval.events.js index a7a7a89..cd38713 100644 --- a/server/api/interval/interval.events.js +++ b/server/api/interval/interval.events.js @@ -1 +1,36 @@ -var _0xd349=["\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"];_0xd349[0];const EventEmitter=require(_0xd349[1]);const Interval=require(_0xd349[3])[_0xd349[2]];var IntervalEvents= new EventEmitter();IntervalEvents[_0xd349[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd349[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd349[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd349[6]};for(var e in events){var event=events[e];Interval[_0xd349[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x95bcx8,_0x95bcx9,_0x95bcxa){IntervalEvents[_0xd349[10]](event+ _0xd349[8]+ _0x95bcx8[_0xd349[9]],_0x95bcx8);IntervalEvents[_0xd349[10]](event,_0x95bcx8);_0x95bcxa(null)}}module[_0xd349[11]]= IntervalEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/interval/interval.socket.js b/server/api/interval/interval.socket.js index 1760ed5..8d62dce 100644 --- a/server/api/interval/interval.socket.js +++ b/server/api/interval/interval.socket.js @@ -1 +1,28 @@ -var _0xc9f5=["\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"];_0xc9f5[0];const IntervalEvents=require(_0xc9f5[1]);var events=[_0xc9f5[2],_0xc9f5[3]];exports[_0xc9f5[4]]= function(_0x1b3bx3){for(var _0x1b3bx4=0,_0x1b3bx5=events[_0xc9f5[5]];_0x1b3bx4< _0x1b3bx5;_0x1b3bx4++){var _0x1b3bx6=events[_0x1b3bx4];var _0x1b3bx7=createListener(_0xc9f5[6]+ _0x1b3bx6,_0x1b3bx3);IntervalEvents[_0xc9f5[7]](_0x1b3bx6,_0x1b3bx7);_0x1b3bx3[_0xc9f5[7]](_0xc9f5[8],removeListener(_0x1b3bx6,_0x1b3bx7))}};function createListener(_0x1b3bx6,_0x1b3bx3){return function(_0x1b3bx9){_0x1b3bx3[_0xc9f5[9]](_0x1b3bx6,_0x1b3bx9)}}function removeListener(_0x1b3bx6,_0x1b3bx7){return function(){IntervalEvents[_0xc9f5[10]](_0x1b3bx6,_0x1b3bx7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/jscripty_project/index.js b/server/api/jscripty_project/index.js index 223e7b2..dba0e5b 100644 --- a/server/api/jscripty_project/index.js +++ b/server/api/jscripty_project/index.js @@ -1 +1,33 @@ -var _0x8f19=["\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"];_0x8f19[0];var express=require(_0x8f19[1]);var auth=require(_0x8f19[2]);var controller=require(_0x8f19[3]);var license=require(_0x8f19[4]);var router=express.Router();router[_0x8f19[13]](_0x8f19[5],license[_0x8f19[6]](),license[_0x8f19[7]](),auth[_0x8f19[8]](),auth[_0x8f19[11]]([15],[_0x8f19[9],_0x8f19[10]]),controller[_0x8f19[12]]);router[_0x8f19[13]](_0x8f19[14],license[_0x8f19[6]](),license[_0x8f19[7]](),auth[_0x8f19[8]](),auth[_0x8f19[11]]([15],[_0x8f19[9]]),controller[_0x8f19[15]]);router[_0x8f19[13]](_0x8f19[16],license[_0x8f19[6]](),license[_0x8f19[7]](),auth[_0x8f19[8]](),auth[_0x8f19[11]]([15],[_0x8f19[9],_0x8f19[10]]),controller[_0x8f19[17]]);router[_0x8f19[13]](_0x8f19[18],license[_0x8f19[6]](),license[_0x8f19[7]](),auth[_0x8f19[8]](),auth[_0x8f19[11]]([15],[_0x8f19[9]]),controller[_0x8f19[19]]);router[_0x8f19[13]](_0x8f19[20],license[_0x8f19[6]](),license[_0x8f19[7]](),auth[_0x8f19[8]](),auth[_0x8f19[11]]([15],[_0x8f19[9]]),controller[_0x8f19[21]]);router[_0x8f19[13]](_0x8f19[22],license[_0x8f19[6]](),license[_0x8f19[7]](),auth[_0x8f19[8]](),auth[_0x8f19[11]]([15],[_0x8f19[9]]),controller[_0x8f19[23]]);router[_0x8f19[13]](_0x8f19[24],license[_0x8f19[6]](),license[_0x8f19[7]](),auth[_0x8f19[8]](),auth[_0x8f19[11]]([15],[_0x8f19[9]]),controller[_0x8f19[25]]);router[_0x8f19[13]](_0x8f19[26],license[_0x8f19[6]](),license[_0x8f19[7]](),auth[_0x8f19[8]](),auth[_0x8f19[11]]([15],[_0x8f19[9]]),controller[_0x8f19[27]]);router[_0x8f19[13]](_0x8f19[28],license[_0x8f19[6]](),license[_0x8f19[7]](),auth[_0x8f19[8]](),auth[_0x8f19[11]]([15],[_0x8f19[9]]),controller[_0x8f19[29]]);router[_0x8f19[13]](_0x8f19[30],license[_0x8f19[6]](),license[_0x8f19[7]](),auth[_0x8f19[8]](),auth[_0x8f19[11]]([15],[_0x8f19[9]]),controller[_0x8f19[31]]);router[_0x8f19[33]](_0x8f19[5],license[_0x8f19[6]](),license[_0x8f19[7]](),auth[_0x8f19[8]](),auth[_0x8f19[11]]([15],[_0x8f19[9]]),controller[_0x8f19[32]]);router[_0x8f19[33]](_0x8f19[18],license[_0x8f19[6]](),license[_0x8f19[7]](),auth[_0x8f19[8]](),auth[_0x8f19[11]]([15],[_0x8f19[9],_0x8f19[10]]),controller[_0x8f19[34]]);router[_0x8f19[33]](_0x8f19[35],license[_0x8f19[6]](),license[_0x8f19[7]](),auth[_0x8f19[8]](),auth[_0x8f19[11]]([15],[_0x8f19[9],_0x8f19[10]]),controller[_0x8f19[36]]);router[_0x8f19[38]](_0x8f19[14],license[_0x8f19[6]](),license[_0x8f19[7]](),auth[_0x8f19[8]](),auth[_0x8f19[11]]([15],[_0x8f19[9]]),controller[_0x8f19[37]]);router[_0x8f19[38]](_0x8f19[20],license[_0x8f19[6]](),license[_0x8f19[7]](),auth[_0x8f19[8]](),auth[_0x8f19[11]]([15],[_0x8f19[9],_0x8f19[10]]),controller[_0x8f19[39]]);router[_0x8f19[41]](_0x8f19[20],license[_0x8f19[6]](),license[_0x8f19[7]](),auth[_0x8f19[8]](),auth[_0x8f19[11]]([15],[_0x8f19[9]]),controller[_0x8f19[40]]);router[_0x8f19[41]](_0x8f19[5],license[_0x8f19[6]](),license[_0x8f19[7]](),auth[_0x8f19[8]](),auth[_0x8f19[11]]([15],[_0x8f19[9]]),controller[_0x8f19[42]]);router[_0x8f19[41]](_0x8f19[14],license[_0x8f19[6]](),license[_0x8f19[7]](),auth[_0x8f19[8]](),auth[_0x8f19[11]]([15],[_0x8f19[9]]),controller[_0x8f19[43]]);module[_0x8f19[44]]= router \ No newline at end of file +'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; diff --git a/server/api/jscripty_project/jscripty_project.controller.js b/server/api/jscripty_project/jscripty_project.controller.js index 7a9b0b6..662f2f9 100644 --- a/server/api/jscripty_project/jscripty_project.controller.js +++ b/server/api/jscripty_project/jscripty_project.controller.js @@ -1 +1,1026 @@ -var _0x5711=["\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"];_0x5711[0];var xml=require(_0x5711[1]);var _=require(_0x5711[2]);var JscriptyProject=require(_0x5711[4])[_0x5711[3]];var Util=require(_0x5711[5]);var sequelize=require(_0x5711[4])[_0x5711[6]];var ReportJscriptySession=require(_0x5711[4])[_0x5711[7]];var ReportJscriptyQuestion=require(_0x5711[4])[_0x5711[8]];var ReportJscriptyInput=require(_0x5711[4])[_0x5711[9]];var Promise=require(_0x5711[10]);function handleError(_0x3491xb,_0x3491xc){return _0x3491xb[_0x5711[12]](500)[_0x5711[11]](_0x3491xc)}function responseWithResult(_0x3491xb,_0x3491xe){_0x3491xe= _0x3491xe|| 200;return function(_0x3491xf){if(_0x3491xf){_0x3491xb[_0x5711[12]](_0x3491xe)[_0x5711[13]](_0x3491xf)}}}function handleEntityNotFound(_0x3491xb){return function(_0x3491xf){if(!_0x3491xf){_0x3491xb[_0x5711[12]](404)[_0x5711[14]]();return null};return _0x3491xf}}function saveUpdates(_0x3491x12){return function(_0x3491xf){return _0x3491xf[_0x5711[16]](_0x3491x12)[_0x5711[15]](function(_0x3491x13){return _0x3491x13})}}function removeEntity(_0x3491xb){return function(_0x3491xf){if(_0x3491xf){return _0x3491xf[_0x5711[17]]()[_0x5711[15]](function(){_0x3491xb[_0x5711[12]](204)[_0x5711[14]]()})}}}exports[_0x5711[18]]= function(_0x3491x15,_0x3491xb,_0x3491x16){return JscriptyProject[_0x5711[22]](Util[_0x5711[21]](_0x3491x15[_0x5711[20]]))[_0x5711[15]](function(_0x3491x17){_0x3491xb[_0x5711[12]](200)[_0x5711[11]](_0x3491x17)})[_0x5711[19]](function(_0x3491xc){return handleError(_0x3491xb,_0x3491xc)})};exports[_0x5711[23]]= function(_0x3491x15,_0x3491xb){return JscriptyProject[_0x5711[27]](_0x3491x15[_0x5711[26]][_0x5711[25]])[_0x5711[15]](function(_0x3491x18){if(!_0x3491x18){return _0x3491xb[_0x5711[24]](404)};return _0x3491xb[_0x5711[11]](_0x3491x18)})[_0x5711[19]](function(_0x3491xc){return handleError(_0x3491xb,_0x3491xc)})};exports[_0x5711[28]]= function(_0x3491x15,_0x3491xb){return ReportJscriptySession[_0x5711[31]]({method:[_0x5711[30],_0x3491x15[_0x5711[26]][_0x5711[25]]]})[_0x5711[22]](Util[_0x5711[21]](_0x3491x15[_0x5711[20]]))[_0x5711[15]](handleEntityNotFound(_0x3491xb))[_0x5711[15]](responseWithResult(_0x3491xb))[_0x5711[19]](function(_0x3491xc){console[_0x5711[29]](_0x3491xc);return handleError(_0x3491xb,_0x3491xc)})};exports[_0x5711[32]]= function(_0x3491x15,_0x3491xb){return ReportJscriptySession[_0x5711[34]]({where:{projectId:_0x3491x15[_0x5711[26]][_0x5711[25]],session_id:_0x3491x15[_0x5711[26]][_0x5711[33]]},include:[{model:ReportJscriptyQuestion,include:[{model:ReportJscriptyInput}]}]})[_0x5711[15]](handleEntityNotFound(_0x3491xb))[_0x5711[15]](responseWithResult(_0x3491xb))[_0x5711[19]](function(_0x3491xc){console[_0x5711[29]](_0x3491xc);return handleError(_0x3491xb,_0x3491xc)})};exports[_0x5711[35]]= function(_0x3491x15,_0x3491xb){var _0x3491x19={count:0,rows:[]};return ReportJscriptySession[_0x5711[31]]({method:[_0x5711[48],_0x3491x15[_0x5711[26]][_0x5711[25]]]})[_0x5711[22]](Util[_0x5711[21]](_0x3491x15[_0x5711[20]]))[_0x5711[15]](function(_0x3491x1a){_[_0x5711[45]](_0x3491x1a[_0x5711[36]],function(_0x3491x1b){var _0x3491x1c=_0x3491x1b[_0x5711[37]];_[_0x5711[45]](_0x3491x1b.ReportJscriptyQuestions,function(_0x3491x1d){var _0x3491x1e=_0x3491x1d[_0x5711[38]];var _0x3491x1f=_0x3491x1d[_0x5711[39]];var _0x3491x20=_0x3491x1d[_0x5711[40]];var _0x3491x21=_0x3491x1d[_0x5711[41]];_[_0x5711[45]](_0x3491x1d.ReportJscriptyInputs,function(_0x3491x22){_0x3491x19[_0x5711[36]][_0x5711[44]]({session_id:_0x3491x1c,question_type:_0x3491x1f,question_id:_0x3491x1e,question_label:_0x3491x20,question_text:_0x3491x21,input_label:_0x3491x22[_0x5711[42]],input_value:_0x3491x22[_0x5711[43]]})})})});_0x3491x19[_0x5711[46]]= _0x3491x19[_0x5711[36]][_0x5711[47]];return _0x3491x19})[_0x5711[15]](handleEntityNotFound(_0x3491xb))[_0x5711[15]](responseWithResult(_0x3491xb))[_0x5711[19]](function(_0x3491xc){console[_0x5711[29]](_0x3491xc);return handleError(_0x3491xb,_0x3491xc)})};exports[_0x5711[49]]= function(_0x3491x15,_0x3491xb){return ReportJscriptyQuestion[_0x5711[50]]({where:{projectId:_0x3491x15[_0x5711[26]][_0x5711[25]]},include:[{model:ReportJscriptyInput}]})[_0x5711[15]](function(_0x3491x23){if(!_0x3491x23){return _0x3491xb[_0x5711[24]](404)};return _0x3491xb[_0x5711[12]](200)[_0x5711[11]](_0x3491x23)})[_0x5711[15]](handleEntityNotFound(_0x3491xb))[_0x5711[19]](function(_0x3491xc){console[_0x5711[29]](_0x3491xc);return handleError(_0x3491xb,_0x3491xc)})};exports[_0x5711[51]]= function(_0x3491x15,_0x3491xb){return ReportJscriptyQuestion[_0x5711[31]]({method:[_0x5711[52],_0x3491x15[_0x5711[26]][_0x5711[25]]]})[_0x5711[22]](Util[_0x5711[21]](_0x3491x15[_0x5711[20]]))[_0x5711[15]](handleEntityNotFound(_0x3491xb))[_0x5711[15]](function(_0x3491x24){return _0x3491xb[_0x5711[12]](200)[_0x5711[11]](_0x3491x24)})[_0x5711[19]](function(_0x3491xc){console[_0x5711[29]](_0x3491xc);return handleError(_0x3491xb,_0x3491xc)})};exports[_0x5711[53]]= function(_0x3491x15,_0x3491xb){var _0x3491x25={};var _0x3491x23;var _0x3491x26=0;return ReportJscriptyQuestion[_0x5711[34]]({where:{projectId:_0x3491x15[_0x5711[26]][_0x5711[25]],question_id:_0x3491x15[_0x5711[26]][_0x5711[69]]},attributes:[_0x5711[39]]})[_0x5711[15]](function(_0x3491x27){if(!_0x3491x27){return _0x3491xb[_0x5711[24]](404)};if(_0x3491x27[_0x5711[54]][_0x5711[39]]== _0x5711[55]){return ReportJscriptyQuestion[_0x5711[50]]({where:{projectId:_0x3491x15[_0x5711[26]][_0x5711[25]],question_id:_0x3491x15[_0x5711[26]][_0x5711[69]]},attributes:[_0x5711[39],_0x5711[38],_0x5711[40],_0x5711[41]],include:[{model:ReportJscriptyInput,where:{$or:[{input_type:_0x5711[72],input_value:_0x5711[73]},{input_type:{$ne:_0x5711[72]},input_value:{$ne:null}}]},attributes:[_0x5711[42],_0x5711[43],_0x5711[74],[sequelize[_0x5711[71]](_0x5711[46],sequelize[_0x5711[70]](_0x5711[42])),_0x5711[46]]]}],group:[_0x5711[38],_0x5711[42]]})[_0x5711[15]](function(_0x3491x27){_0x3491x23= _0x3491x27;return ReportJscriptyQuestion[_0x5711[50]]({where:{projectId:_0x3491x15[_0x5711[26]][_0x5711[25]],question_id:_0x3491x15[_0x5711[26]][_0x5711[69]],question_type:_0x5711[55]},attributes:[_0x5711[38],[sequelize[_0x5711[71]](_0x5711[46],sequelize[_0x5711[70]](_0x5711[38])),_0x5711[46]]],group:[_0x5711[38]]})})[_0x5711[15]](function(_0x3491x34){_0x3491x26= _0x3491x34[0][_0x5711[54]][_0x5711[46]];if(_0x3491x23){var _0x3491x29=_[_0x5711[56]](_0x3491x23,_0x5711[38]);_[_0x5711[45]](_0x3491x29,function(_0x3491x35,_0x3491x2a){var _0x3491x30=[];var _0x3491x31=[];var _0x3491x33=[];var _0x3491x36=_0x5711[65];_[_0x5711[45]](_0x3491x35,function(_0x3491x2d){if(_0x3491x2d[_0x5711[66]]){_[_0x5711[45]](_0x3491x2d.ReportJscriptyInputs,function(_0x3491x22){_0x3491x30[_0x5711[44]]({checkbox:true,value:_0x3491x22[_0x5711[42]],count:_0x3491x22[_0x5711[54]][_0x5711[46]]})})}});var _0x3491x32=[];for(var _0x3491x37=0;_0x3491x37< _0x3491x30[_0x5711[47]];_0x3491x37++){_0x3491x32[_0x3491x37]= _0x3491x30[_0x3491x37][_0x5711[46]];_0x3491x33[_0x3491x37]= _0x3491x30[_0x3491x37][_0x5711[67]];_0x3491x30[_0x3491x37][_0x5711[68]]= _0x3491x26?(_0x3491x30[_0x3491x37][_0x5711[46]]/ _0x3491x26)* 100:0};_0x3491x31[0]= _0x3491x32;_0x3491x25= {total:_0x3491x26,question_type:_[_0x5711[59]](_0x3491x35)[_0x5711[39]],question_id:_[_0x5711[59]](_0x3491x35)[_0x5711[38]],question_label:_[_0x5711[59]](_0x3491x35)[_0x5711[40]],question_text:_[_0x5711[59]](_0x3491x35)[_0x5711[41]],choices:_0x3491x30,graphData:_0x3491x31,graphLabels:_0x3491x33,graphType:_0x3491x36}})};return ReportJscriptyQuestion[_0x5711[50]]({where:{projectId:_0x3491x15[_0x5711[26]][_0x5711[25]],question_id:_0x3491x15[_0x5711[26]][_0x5711[69]],question_type:_0x5711[55]},attributes:[_0x5711[39],_0x5711[38],_0x5711[40],_0x5711[41]],include:[{model:ReportJscriptyInput,attributes:[_0x5711[42]]}]})})[_0x5711[15]](function(_0x3491x19){var _0x3491x28=[];if(_0x3491x19){var _0x3491x29=_[_0x5711[56]](_0x3491x19,_0x5711[38]);_[_0x5711[45]](_0x3491x29,function(_0x3491x1d,_0x3491x2a){var _0x3491x2b=[];_[_0x5711[45]](_0x3491x1d,function(_0x3491x2c){_0x3491x2b= _[_0x5711[58]](_0x3491x2b,_[_0x5711[57]](_0x3491x2c.ReportJscriptyInputs,_0x5711[42]))});_0x3491x28[_0x5711[44]]({question_id:_[_0x5711[59]](_0x3491x1d)[_0x5711[38]],labels:_0x3491x2b})});_[_0x5711[45]](_0x3491x28,function(_0x3491x2d){if(Object[_0x5711[60]](_0x3491x25)[_0x5711[47]]){_[_0x5711[45]](_0x3491x2d[_0x5711[61]],function(_0x3491x2e){var _0x3491x2f=_[_0x5711[34]](_0x3491x25[_0x5711[62]],{value:_0x3491x2e});if(!_0x3491x2f){_0x3491x25[_0x5711[62]][_0x5711[44]]({value:_0x3491x2e,count:0,percentage:0});_0x3491x25[_0x5711[63]][0][_0x5711[44]](0);_0x3491x25[_0x5711[64]][_0x5711[44]](_0x3491x2e)}})}else {var _0x3491x30=[];var _0x3491x31=[];var _0x3491x32=[];var _0x3491x33=[];_[_0x5711[45]](_0x3491x2d[_0x5711[61]],function(_0x3491x2e){_0x3491x30[_0x5711[44]]({value:_0x3491x2e,count:0,percentage:0});_0x3491x32[_0x5711[44]](0);_0x3491x33[_0x5711[44]](_0x3491x2e)});_0x3491x31[_0x5711[44]](_0x3491x32);var _0x3491x22=_0x3491x19[0];_0x3491x25= {total:_0x3491x26,question_type:_0x3491x22[_0x5711[39]],question_id:_0x3491x22[_0x5711[38]],question_label:_0x3491x22[_0x5711[40]],question_text:_0x3491x22[_0x5711[41]],choices:_0x3491x30,graphType:_0x5711[65],graphData:_0x3491x31,graphLabels:_0x3491x33}}})};return _0x3491xb[_0x5711[12]](201)[_0x5711[11]](_0x3491x25)})}else {if(_0x3491x27[_0x5711[54]][_0x5711[39]]== _0x5711[75]){return ReportJscriptyQuestion[_0x5711[50]]({where:{projectId:_0x3491x15[_0x5711[26]][_0x5711[25]],question_id:_0x3491x15[_0x5711[26]][_0x5711[69]]},attributes:[_0x5711[39],_0x5711[38],_0x5711[40],_0x5711[41],_0x5711[80],_0x5711[77],[sequelize[_0x5711[71]](_0x5711[46],sequelize[_0x5711[70]](_0x5711[77])),_0x5711[46]]],group:[_0x5711[38],_0x5711[77]]})[_0x5711[15]](function(_0x3491x27){_0x3491x23= _0x3491x27;return ReportJscriptyQuestion[_0x5711[50]]({where:{projectId:_0x3491x15[_0x5711[26]][_0x5711[25]],question_id:_0x3491x15[_0x5711[26]][_0x5711[69]],question_type:_0x5711[75],question_other_answer:{$ne:null}},attributes:[_0x5711[39],_0x5711[38],_0x5711[40],_0x5711[80],_0x5711[41],_0x5711[78],_0x5711[79],[sequelize[_0x5711[71]](_0x5711[46],sequelize[_0x5711[70]](_0x5711[79])),_0x5711[46]]],group:[_0x5711[38],_0x5711[79]]})})[_0x5711[15]](function(_0x3491x1a){if(_0x3491x1a){_[_0x5711[45]](_0x3491x1a,function(_0x3491x2d){_0x3491x23[_0x5711[44]](_0x3491x2d)})};var _0x3491x29=_[_0x5711[56]](_0x3491x23,_0x5711[38]);_[_0x5711[45]](_0x3491x29,function(_0x3491x35,_0x3491x2a){var _0x3491x30=[];var _0x3491x26=0;var _0x3491x31=[];var _0x3491x33=[];var _0x3491x36=_0x5711[76];_[_0x5711[45]](_0x3491x35,function(_0x3491x2d){if(_0x3491x2d[_0x5711[77]]){_0x3491x30[_0x5711[44]]({value:_0x3491x2d[_0x5711[77]],count:_0x3491x2d[_0x5711[54]][_0x5711[46]]});_0x3491x26= _0x3491x26+ _0x3491x2d[_0x5711[54]][_0x5711[46]]};if(_0x3491x2d[_0x5711[78]]){_0x3491x30[_0x5711[44]]({other_option:true,value:_0x3491x2d[_0x5711[79]],count:_0x3491x2d[_0x5711[54]][_0x5711[46]]})}});var _0x3491x38=_[_0x5711[59]](_0x3491x35)[_0x5711[80]]?JSON[_0x5711[81]](_[_0x5711[59]](_0x3491x35)[_0x5711[80]]):null;if(_0x3491x38){_[_0x5711[45]](_0x3491x38[_0x5711[82]],function(_0x3491x39){var _0x3491x3a=_[_0x5711[34]](_0x3491x30,{value:_0x3491x39});if(!_0x3491x3a){_0x3491x30[_0x5711[44]]({value:_0x3491x39,count:0,percentage:0})}})};var _0x3491x32=[];var _0x3491x3b=false;for(var _0x3491x37=0;_0x3491x37< _0x3491x30[_0x5711[47]];_0x3491x37++){if(!_0x3491x30[_0x3491x37][_0x5711[83]]){_0x3491x31[_0x3491x37]= _0x3491x30[_0x3491x37][_0x5711[46]];_0x3491x33[_0x3491x37]= _0x3491x30[_0x3491x37][_0x5711[67]];_0x3491x30[_0x3491x37][_0x5711[68]]= _0x3491x26?(_0x3491x30[_0x3491x37][_0x5711[46]]/ _0x3491x26)* 100:0}};_0x3491x25= {total:_0x3491x26,question_type:_[_0x5711[59]](_0x3491x35)[_0x5711[39]],question_id:_[_0x5711[59]](_0x3491x35)[_0x5711[38]],question_label:_[_0x5711[59]](_0x3491x35)[_0x5711[40]],question_text:_[_0x5711[59]](_0x3491x35)[_0x5711[41]],choices:_0x3491x30,graphData:_0x3491x31,graphLabels:_0x3491x33,graphType:_0x3491x36}});return _0x3491xb[_0x5711[12]](201)[_0x5711[11]](_0x3491x25)})}else {console[_0x5711[29]](_0x5711[84]);return _0x3491xb[_0x5711[24]](404)}}})[_0x5711[19]](function(_0x3491xc){console[_0x5711[29]](_0x3491xc);return handleError(_0x3491xb,_0x3491xc)})};exports[_0x5711[85]]= function(_0x3491x15,_0x3491xb){var _0x3491x3c;var _0x3491x23;var _0x3491x3d;var _0x3491x34;return ReportJscriptyQuestion[_0x5711[50]]({where:{projectId:_0x3491x15[_0x5711[26]][_0x5711[25]],question_type:_0x5711[75]},attributes:[_0x5711[39],_0x5711[38],_0x5711[40],_0x5711[41],_0x5711[77],_0x5711[80],_0x5711[79],[sequelize[_0x5711[71]](_0x5711[46],sequelize[_0x5711[70]](_0x5711[77])),_0x5711[46]]],group:[_0x5711[38],_0x5711[77]]})[_0x5711[15]](function(_0x3491x1a){_0x3491x23= _0x3491x1a;return ReportJscriptyQuestion[_0x5711[50]]({where:{projectId:_0x3491x15[_0x5711[26]][_0x5711[25]],question_type:_0x5711[75],question_other_answer:{$ne:null}},attributes:[_0x5711[39],_0x5711[38],_0x5711[40],_0x5711[41],_0x5711[78],_0x5711[79],_0x5711[80],[sequelize[_0x5711[71]](_0x5711[46],sequelize[_0x5711[70]](_0x5711[78])),_0x5711[46]]],group:[_0x5711[38],_0x5711[78]]})})[_0x5711[15]](function(_0x3491x1a){_[_0x5711[45]](_0x3491x1a,function(_0x3491x2d){_0x3491x23[_0x5711[44]](_0x3491x2d)});var _0x3491x25=[];var _0x3491x36=_0x5711[76];var _0x3491x29=_[_0x5711[56]](_0x3491x23,_0x5711[38]);_[_0x5711[45]](_0x3491x29,function(_0x3491x35,_0x3491x2a){var _0x3491x26=0;var _0x3491x31=[];var _0x3491x33=[];var _0x3491x30=[];_[_0x5711[45]](_0x3491x35,function(_0x3491x2d){if(_0x3491x2d[_0x5711[77]]){_0x3491x30[_0x5711[44]]({value:_0x3491x2d[_0x5711[77]],count:_0x3491x2d[_0x5711[54]][_0x5711[46]]});_0x3491x26= _0x3491x26+ _0x3491x2d[_0x5711[54]][_0x5711[46]]};if(_0x3491x2d[_0x5711[78]]){_0x3491x30[_0x5711[44]]({other_option:true,value:_0x3491x2d[_0x5711[78]],count:_0x3491x2d[_0x5711[54]][_0x5711[46]]})}});var _0x3491x38=JSON[_0x5711[81]](_[_0x5711[59]](_0x3491x35)[_0x5711[80]]);if(_0x3491x38){_[_0x5711[45]](_0x3491x38[_0x5711[82]],function(_0x3491x39){var _0x3491x3a=_[_0x5711[34]](_0x3491x30,{value:_0x3491x39});if(!_0x3491x3a){_0x3491x30[_0x5711[44]]({value:_0x3491x39,count:0,percentage:0})}})};for(var _0x3491x37=0;_0x3491x37< _0x3491x30[_0x5711[47]];_0x3491x37++){if(!_0x3491x30[_0x3491x37][_0x5711[83]]&& (_0x3491x26!= 0)){_0x3491x30[_0x3491x37][_0x5711[68]]= (_0x3491x30[_0x3491x37][_0x5711[46]]/ _0x3491x26)* 100;_0x3491x31[_0x5711[44]](_0x3491x30[_0x3491x37][_0x5711[46]]);_0x3491x33[_0x5711[44]](_0x3491x30[_0x3491x37][_0x5711[67]])}};_0x3491x25[_0x5711[44]]({total:_0x3491x26,question_type:_[_0x5711[59]](_0x3491x35)[_0x5711[39]],question_id:_[_0x5711[59]](_0x3491x35)[_0x5711[38]],question_label:_[_0x5711[59]](_0x3491x35)[_0x5711[40]],question_other_label:_[_0x5711[59]](_0x3491x35)[_0x5711[79]],question_text:_[_0x5711[59]](_0x3491x35)[_0x5711[41]],choices:_0x3491x30,graphData:_0x3491x31,graphLabels:_0x3491x33,graphType:_0x3491x36})});_0x3491x3c= _0x3491x25;return ReportJscriptyQuestion[_0x5711[50]]({where:{projectId:_0x3491x15[_0x5711[26]][_0x5711[25]],question_type:_0x5711[55]},attributes:[_0x5711[25],_0x5711[39],_0x5711[38],_0x5711[40],_0x5711[41],_0x5711[77]],include:[{model:ReportJscriptyInput,where:{$or:[{input_type:_0x5711[72],input_value:_0x5711[73]},{input_type:{$ne:_0x5711[72]},input_value:{$ne:null}}]},attributes:[_0x5711[42],_0x5711[43],_0x5711[74],[sequelize[_0x5711[71]](_0x5711[46],sequelize[_0x5711[70]](_0x5711[42])),_0x5711[46]]]}],group:[_0x5711[38],_0x5711[42]]})})[_0x5711[15]](function(_0x3491x27){_0x3491x23= _0x3491x27;return ReportJscriptyQuestion[_0x5711[50]]({where:{projectId:_0x3491x15[_0x5711[26]][_0x5711[25]],question_type:_0x5711[55]},attributes:[_0x5711[38],[sequelize[_0x5711[71]](_0x5711[46],sequelize[_0x5711[70]](_0x5711[38])),_0x5711[46]]],group:[_0x5711[38]]})})[_0x5711[15]](function(_0x3491x1d){_0x3491x34= _0x3491x1d;var _0x3491x25=[];var _0x3491x29=_[_0x5711[56]](_0x3491x23,_0x5711[38]);_[_0x5711[45]](_0x3491x29,function(_0x3491x35,_0x3491x2a){var _0x3491x30=[];var _0x3491x26=0;_0x3491x26= _[_0x5711[34]](_0x3491x34,function(_0x3491x1d){return _0x3491x1d[_0x5711[38]]== _[_0x5711[59]](_0x3491x35)[_0x5711[38]]})[_0x5711[54]][_0x5711[46]];var _0x3491x31=[];var _0x3491x3f=[];var _0x3491x33=[];var _0x3491x36=_0x5711[65];_[_0x5711[45]](_0x3491x35,function(_0x3491x2d){var _0x3491x40=_0x3491x2d;_[_0x5711[45]](_0x3491x40.ReportJscriptyInputs,function(_0x3491x22){_0x3491x30[_0x5711[44]]({checkbox:true,value:_0x3491x22[_0x5711[42]],count:_0x3491x22[_0x5711[54]][_0x5711[46]]})})});var _0x3491x32=[];for(var _0x3491x37=0;_0x3491x37< _0x3491x30[_0x5711[47]];_0x3491x37++){_0x3491x32[_0x3491x37]= _0x3491x30[_0x3491x37][_0x5711[46]];_0x3491x30[_0x3491x37][_0x5711[68]]= (_0x3491x30[_0x3491x37][_0x5711[46]]/ _0x3491x26)* 100;_0x3491x33[_0x3491x37]= _0x3491x30[_0x3491x37][_0x5711[67]]};_0x3491x31[0]= _0x3491x32;_0x3491x3c[_0x5711[44]]({total:_0x3491x26,question_type:_[_0x5711[59]](_0x3491x35)[_0x5711[39]],question_id:_[_0x5711[59]](_0x3491x35)[_0x5711[38]],question_label:_[_0x5711[59]](_0x3491x35)[_0x5711[40]],question_text:_[_0x5711[59]](_0x3491x35)[_0x5711[41]],choices:_0x3491x30,graphData:_0x3491x31,graphLabels:_0x3491x33,graphType:_0x3491x36})});return ReportJscriptyQuestion[_0x5711[50]]({where:{projectId:_0x3491x15[_0x5711[26]][_0x5711[25]],question_type:_0x5711[55]},attributes:[_0x5711[25],_0x5711[38],_0x5711[40],_0x5711[41],_0x5711[39]],include:[{model:ReportJscriptyInput,attributes:[_0x5711[42]]}]})})[_0x5711[15]](function(_0x3491x19){var _0x3491x29=_[_0x5711[56]](_0x3491x19,_0x5711[38]);var _0x3491x3e=[];_[_0x5711[45]](_0x3491x29,function(_0x3491x1d,_0x3491x2a){var _0x3491x2b=[];_[_0x5711[45]](_0x3491x1d,function(_0x3491x2c){_0x3491x2b= _[_0x5711[58]](_0x3491x2b,_[_0x5711[57]](_0x3491x2c.ReportJscriptyInputs,_0x5711[42]))});_0x3491x3e[_0x5711[44]]({question_text:_[_0x5711[59]](_0x3491x1d)[_0x5711[41]],question_type:_[_0x5711[59]](_0x3491x1d)[_0x5711[39]],question_label:_[_0x5711[59]](_0x3491x1d)[_0x5711[40]],question_id:_[_0x5711[59]](_0x3491x1d)[_0x5711[38]],labels:_0x3491x2b})});_[_0x5711[45]](_0x3491x3e,function(_0x3491x2d){var _0x3491x1d=_[_0x5711[34]](_0x3491x3c,{"\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x69\x64":_0x3491x2d[_0x5711[38]]});if(_0x3491x1d){_[_0x5711[45]](_0x3491x2d[_0x5711[61]],function(_0x3491x2e){var _0x3491x2f=_[_0x5711[34]](_0x3491x1d[_0x5711[62]],{value:_0x3491x2e});if(!_0x3491x2f){_0x3491x1d[_0x5711[62]][_0x5711[44]]({value:_0x3491x2e,count:0,percentage:0});_0x3491x1d[_0x5711[63]][0][_0x5711[44]](0);_0x3491x1d[_0x5711[64]][_0x5711[44]](_0x3491x2e)}})}else {var _0x3491x30=[];var _0x3491x31=[];var _0x3491x32=[];var _0x3491x33=[];_[_0x5711[45]](_0x3491x2d[_0x5711[61]],function(_0x3491x2e){_0x3491x30[_0x5711[44]]({value:_0x3491x2e,count:0,percentage:0})});var _0x3491x26=_[_0x5711[34]](_0x3491x34,function(_0x3491x1d){return _0x3491x1d[_0x5711[38]]== _0x3491x2d[_0x5711[38]]})[_0x5711[54]][_0x5711[46]];_0x3491x3c[_0x5711[44]]({total:_0x3491x26,question_type:_0x3491x2d[_0x5711[39]],question_id:_0x3491x2d[_0x5711[38]],question_label:_0x3491x2d[_0x5711[40]],question_text:_0x3491x2d[_0x5711[41]],choices:_0x3491x30,graphType:_0x5711[65],graphData:_0x3491x31,graphLabels:_0x3491x33})}});return _0x3491xb[_0x5711[12]](201)[_0x5711[11]](_0x3491x3c)})[_0x5711[19]](function(_0x3491xc){console[_0x5711[29]](_0x3491xc);return handleError(_0x3491xb,_0x3491xc)})};exports[_0x5711[86]]= function(_0x3491x15,_0x3491xb){return JscriptyProject[_0x5711[86]](_0x3491x15[_0x5711[93]])[_0x5711[15]](function(_0x3491x18){return _0x3491xb[_0x5711[12]](201)[_0x5711[11]](_0x3491x18)})[_0x5711[19]](sequelize.UniqueConstraintError,function(_0x3491xc){if(_0x3491xc[_0x5711[88]][_0x5711[87]]){_0x3491xc[_0x5711[89]]= _0x5711[90];_0x3491xc[_0x5711[91]]= _0x5711[92]};return handleError(_0x3491xb,_0x3491xc)})[_0x5711[19]](function(_0x3491xc){return handleError(_0x3491xb,_0x3491xc)})};exports[_0x5711[94]]= function(_0x3491x15,_0x3491xb){return ReportJscriptySession[_0x5711[86]](_0x3491x15[_0x5711[93]])[_0x5711[15]](function(_0x3491x41){return _0x3491xb[_0x5711[12]](201)[_0x5711[11]](_0x3491x41)})[_0x5711[19]](function(_0x3491xc){return handleError(_0x3491xb,_0x3491xc)})};exports[_0x5711[95]]= function(_0x3491x15,_0x3491xb){return ReportJscriptyQuestion[_0x5711[17]]({where:{sessionId:_0x3491x15[_0x5711[26]][_0x5711[33]]}})[_0x5711[15]](function(){var _0x3491x42=[];for(var _0x3491x37=0;_0x3491x37< _0x3491x15[_0x5711[93]][_0x5711[47]];_0x3491x37++){_0x3491x42[_0x3491x37]= ReportJscriptyQuestion[_0x5711[86]](_0x3491x15[_0x5711[93]][_0x3491x37],{include:[{model:ReportJscriptyInput}]})};return Promise[_0x5711[96]](_0x3491x42)})[_0x5711[15]](function(_0x3491x27){return _0x3491xb[_0x5711[24]](201)})[_0x5711[19]](function(_0x3491xc){return handleError(_0x3491xb,_0x3491xc)})};exports[_0x5711[97]]= function(_0x3491x15,_0x3491xb){if(_0x3491x15[_0x5711[93]][_0x5711[25]]){delete _0x3491x15[_0x5711[93]][_0x5711[25]]};return JscriptyProject[_0x5711[27]](_0x3491x15[_0x5711[26]][_0x5711[25]])[_0x5711[15]](function(_0x3491x18){if(!_0x3491x18){return _0x3491xb[_0x5711[24]](404)};var _0x3491x13=_[_0x5711[98]](_0x3491x18,_0x3491x15[_0x5711[93]]);return _0x3491x13[_0x5711[99]]()})[_0x5711[15]](function(_0x3491x18){return _0x3491xb[_0x5711[12]](200)[_0x5711[11]](_0x3491x18)})[_0x5711[19]](function(_0x3491xc){return handleError(_0x3491xb,_0x3491xc)})};exports[_0x5711[100]]= function(_0x3491x15,_0x3491xb){return ReportJscriptySession[_0x5711[27]](_0x3491x15[_0x5711[26]][_0x5711[33]])[_0x5711[15]](function(_0x3491x1b){if(!_0x3491x1b){return _0x3491xb[_0x5711[24]](404)};var _0x3491x13=_[_0x5711[98]](_0x3491x1b,_0x3491x15[_0x5711[93]]);return _0x3491x13[_0x5711[99]]()})[_0x5711[15]](function(_0x3491x41){return _0x3491xb[_0x5711[12]](200)[_0x5711[11]](_0x3491x41)})[_0x5711[19]](function(_0x3491xc){return handleError(_0x3491xb,_0x3491xc)})};exports[_0x5711[17]]= function(_0x3491x15,_0x3491xb){return JscriptyProject[_0x5711[27]](_0x3491x15[_0x5711[26]][_0x5711[25]])[_0x5711[15]](function(_0x3491x18){if(!_0x3491x18){return _0x3491xb[_0x5711[24]](404)};return _0x3491x18[_0x5711[17]]()})[_0x5711[15]](function(){return _0x3491xb[_0x5711[24]](204)})[_0x5711[19]](function(_0x3491xc){return handleError(_0x3491xb,_0x3491xc)})};exports[_0x5711[101]]= function(_0x3491x15,_0x3491xb){return ReportJscriptySession[_0x5711[34]]({where:{session_id:_0x3491x15[_0x5711[26]][_0x5711[33]]}})[_0x5711[15]](function(_0x3491x1b){if(!_0x3491x1b){return _0x3491xb[_0x5711[24]](404)};return _0x3491x1b[_0x5711[17]]()})[_0x5711[15]](function(){return _0x3491xb[_0x5711[24]](204)})[_0x5711[19]](function(_0x3491xc){return handleError(_0x3491xb,_0x3491xc)})};exports[_0x5711[102]]= function(_0x3491x15,_0x3491xb){return JscriptyProject[_0x5711[17]]({where:{id:_0x3491x15[_0x5711[20]][_0x5711[103]]},individualHooks:true})[_0x5711[15]](function(){return _0x3491xb[_0x5711[24]](204)})[_0x5711[19]](function(_0x3491xc){return handleError(_0x3491xb,_0x3491xc)})};exports[_0x5711[104]]= function(_0x3491x15,_0x3491xb,_0x3491x16){return JscriptyProject[_0x5711[27]](_0x3491x15[_0x5711[26]][_0x5711[25]])[_0x5711[15]](function(_0x3491x18){if(!_0x3491x18){return _0x3491xb[_0x5711[24]](404)};_0x3491xb[_0x5711[109]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E":_0x5711[105]+ _0x3491x15[_0x5711[20]][_0x5711[106]]+ _0x5711[107],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x5711[108]});return _0x3491xb[_0x5711[11]](_0x3491x18[_0x5711[110]])})[_0x5711[19]](function(_0x3491xc){return handleError(_0x3491xb,_0x3491xc)})} \ No newline at end of file +/** + * 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); +// }); +// }; diff --git a/server/api/jscripty_project/jscripty_project.events.js b/server/api/jscripty_project/jscripty_project.events.js index 2f0efc1..fe91bd8 100644 --- a/server/api/jscripty_project/jscripty_project.events.js +++ b/server/api/jscripty_project/jscripty_project.events.js @@ -1 +1,36 @@ -var _0x41a5=["\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"];_0x41a5[0];const EventEmitter=require(_0x41a5[1]);const JscriptyProject=require(_0x41a5[3])[_0x41a5[2]];var JscriptyProjectEvents= new EventEmitter();JscriptyProjectEvents[_0x41a5[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x41a5[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x41a5[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x41a5[6]};for(var e in events){var event=events[e];JscriptyProject[_0x41a5[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x9657x8,_0x9657x9,_0x9657xa){JscriptyProjectEvents[_0x41a5[10]](event+ _0x41a5[8]+ _0x9657x8[_0x41a5[9]],_0x9657x8);JscriptyProjectEvents[_0x41a5[10]](event,_0x9657x8);_0x9657xa(null)}}module[_0x41a5[11]]= JscriptyProjectEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/jscripty_project/jscripty_project.socket.js b/server/api/jscripty_project/jscripty_project.socket.js index bbac198..9911b1a 100644 --- a/server/api/jscripty_project/jscripty_project.socket.js +++ b/server/api/jscripty_project/jscripty_project.socket.js @@ -1 +1,28 @@ -var _0xaeba=["\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"];_0xaeba[0];const JscriptyProjectEvents=require(_0xaeba[1]);var events=[_0xaeba[2],_0xaeba[3]];exports[_0xaeba[4]]= function(_0x6008x3){for(var _0x6008x4=0,_0x6008x5=events[_0xaeba[5]];_0x6008x4< _0x6008x5;_0x6008x4++){var _0x6008x6=events[_0x6008x4];var _0x6008x7=createListener(_0xaeba[6]+ _0x6008x6,_0x6008x3);JscriptyProjectEvents[_0xaeba[7]](_0x6008x6,_0x6008x7);_0x6008x3[_0xaeba[7]](_0xaeba[8],removeListener(_0x6008x6,_0x6008x7))}};function createListener(_0x6008x6,_0x6008x3){return function(_0x6008x9){_0x6008x3[_0xaeba[9]](_0x6008x6,_0x6008x9)}}function removeListener(_0x6008x6,_0x6008x7){return function(){JscriptyProjectEvents[_0xaeba[10]](_0x6008x6,_0x6008x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/license/index.js b/server/api/license/index.js index 7a5093f..f0a2983 100644 --- a/server/api/license/index.js +++ b/server/api/license/index.js @@ -1 +1,12 @@ -var _0xcd5b=["\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"];_0xcd5b[0];var express=require(_0xcd5b[1]);var auth=require(_0xcd5b[2]);var controller=require(_0xcd5b[3]);var router=express.Router();router[_0xcd5b[6]](_0xcd5b[4],controller[_0xcd5b[5]]);router[_0xcd5b[10]](_0xcd5b[7],auth[_0xcd5b[8]](),controller[_0xcd5b[9]]);module[_0xcd5b[11]]= router \ No newline at end of file +'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; diff --git a/server/api/license/license.controller.js b/server/api/license/license.controller.js index 830f7cd..a5d47ec 100644 --- a/server/api/license/license.controller.js +++ b/server/api/license/license.controller.js @@ -1 +1,135 @@ -var _0x735f=["\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"];_0x735f[0];var _=require(_0x735f[1]);var crypto=require(_0x735f[2]);var moment=require(_0x735f[3]);var rp=require(_0x735f[4]);var config=require(_0x735f[5]);var license=require(_0x735f[6]);var License=require(_0x735f[8])[_0x735f[7]];var Setting=require(_0x735f[8])[_0x735f[9]];const expirationTh=7;function handleError(_0xe515xb,_0xe515xc){_0xe515xc= _0xe515xc|| 500;return function(_0xe515xd){console[_0x735f[10]](_0xe515xd);_0xe515xb[_0x735f[12]](_0xe515xc)[_0x735f[11]](_0xe515xd)}}function handleEntityNotFound(_0xe515xb){return function(_0xe515xf){if(!_0xe515xf){_0xe515xf= {dataValues:{license:license[_0x735f[13]]}};_0xe515xf[_0x735f[16]][_0x735f[15]][_0x735f[14]]= license[_0x735f[17]]();_0xe515xb[_0x735f[12]](201)[_0x735f[18]](_0xe515xf);return null};return _0xe515xf}}function saveUpdates(_0xe515x11){return function(_0xe515xf){return _0xe515xf[_0x735f[20]](_0xe515x11)[_0x735f[19]](function(_0xe515x12){return _0xe515x12})}}function removeEntity(_0xe515xb){return function(_0xe515xf){if(_0xe515xf){return _0xe515xf[_0x735f[22]]()[_0x735f[19]](function(){_0xe515xb[_0x735f[12]](204)[_0x735f[21]]()})}}}exports[_0x735f[23]]= function(_0xe515x14,_0xe515xb,_0xe515x15){var _0xe515x16;var _0xe515x17;return Setting[_0x735f[43]](1)[_0x735f[19]](function(_0xe515x1a){_0xe515x16= _0xe515x1a;return License[_0x735f[43]](1)})[_0x735f[19]](handleEntityNotFound(_0xe515xb))[_0x735f[19]](function(_0xe515x17){if(!_0xe515x17){_0xe515x17= {}};try{if(_0xe515x17[_0x735f[15]]){_0xe515x17[_0x735f[15]]= license[_0x735f[26]](_0xe515x17[_0x735f[15]],_0xe515x17[_0x735f[25]]);_0xe515x17[_0x735f[15]]= JSON[_0x735f[27]](_0xe515x17[_0x735f[15]])}else {_0xe515x17[_0x735f[15]]= license[_0x735f[13]]}}catch(err){console[_0x735f[10]](_0x735f[28],err);_0xe515x17[_0x735f[15]]= license[_0x735f[13]]};if(_0xe515x17[_0x735f[29]]){var _0xe515x18=crypto[_0x735f[33]](_0x735f[30],config[_0x735f[32]][_0x735f[31]]);var _0xe515x19=_0xe515x18[_0x735f[36]](_0xe515x17[_0x735f[29]],_0x735f[34],_0x735f[35]);_0xe515x19+= _0xe515x18[_0x735f[37]](_0x735f[35]);_0xe515x17[_0x735f[15]][_0x735f[38]]= expirationTh- moment()[_0x735f[40]](_0xe515x19,_0x735f[39])};_0xe515x17[_0x735f[15]][_0x735f[14]]= _0xe515x17[_0x735f[25]];_0xe515x17[_0x735f[15]][_0x735f[41]]= license[_0x735f[17]]();_[_0x735f[42]](_0xe515x17[_0x735f[16]],_0xe515x16[_0x735f[16]]);_0xe515xb[_0x735f[12]](200)[_0x735f[18]](_0xe515x17[_0x735f[16]])})[_0x735f[24]](handleError(_0xe515xb))};exports[_0x735f[44]]= function(_0xe515x14,_0xe515xb){return rp({method:_0x735f[46],uri:config[_0x735f[47]]+ _0x735f[48]+ license[_0x735f[17]]()+ _0x735f[49],body:_0xe515x14[_0x735f[50]],json:true})[_0x735f[19]](function(_0xe515x1b){_0xe515xb[_0x735f[12]](201)[_0x735f[11]](_0xe515x1b)})[_0x735f[24]](function(_0xe515xd){console[_0x735f[10]](_0xe515xd);return _0xe515xb[_0x735f[12]](_0xe515xd[_0x735f[45]]|| 500)[_0x735f[11]](_0xe515xd)})} \ No newline at end of file +'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); + }); +} diff --git a/server/api/list/index.js b/server/api/list/index.js index 66ec6fa..2336f13 100644 --- a/server/api/list/index.js +++ b/server/api/list/index.js @@ -1 +1,28 @@ -var _0x1120=["\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"];_0x1120[0];var express=require(_0x1120[1]);var controller=require(_0x1120[2]);var auth=require(_0x1120[3]);var license=require(_0x1120[4]);var router=express.Router();router[_0x1120[12]](_0x1120[5],auth[_0x1120[6]](),license[_0x1120[7]](),auth[_0x1120[10]]([5],[_0x1120[8],_0x1120[9]]),controller[_0x1120[11]]);router[_0x1120[12]](_0x1120[13],auth[_0x1120[6]](),license[_0x1120[7]](),auth[_0x1120[10]]([5],[_0x1120[8],_0x1120[9]]),controller[_0x1120[14]]);router[_0x1120[12]](_0x1120[15],auth[_0x1120[6]](),license[_0x1120[7]](),auth[_0x1120[10]]([5],[_0x1120[8],_0x1120[9]]),controller[_0x1120[16]]);router[_0x1120[12]](_0x1120[17],auth[_0x1120[6]](),license[_0x1120[7]](),auth[_0x1120[10]]([5],[_0x1120[8],_0x1120[9]]),controller[_0x1120[18]]);router[_0x1120[12]](_0x1120[19],auth[_0x1120[6]](),license[_0x1120[7]](),auth[_0x1120[10]]([5],[_0x1120[8],_0x1120[9]]),controller[_0x1120[20]]);router[_0x1120[12]](_0x1120[21],auth[_0x1120[6]](),license[_0x1120[7]](),auth[_0x1120[10]]([5],[_0x1120[8],_0x1120[9]]),controller[_0x1120[22]]);router[_0x1120[24]](_0x1120[5],auth[_0x1120[6]](),license[_0x1120[7]](),auth[_0x1120[10]]([5],[_0x1120[8]]),controller[_0x1120[23]]);router[_0x1120[24]](_0x1120[17],auth[_0x1120[6]](),license[_0x1120[7]](),auth[_0x1120[10]]([5],[_0x1120[8]]),controller[_0x1120[25]]);router[_0x1120[24]](_0x1120[19],auth[_0x1120[6]](),license[_0x1120[7]](),auth[_0x1120[10]]([5],[_0x1120[8],_0x1120[9]]),controller[_0x1120[26]]);router[_0x1120[24]](_0x1120[15],auth[_0x1120[6]](),license[_0x1120[7]](),auth[_0x1120[10]]([5],[_0x1120[8]]),controller[_0x1120[27]]);router[_0x1120[29]](_0x1120[13],auth[_0x1120[6]](),license[_0x1120[7]](),auth[_0x1120[10]]([5],[_0x1120[8]]),controller[_0x1120[28]]);router[_0x1120[29]](_0x1120[21],auth[_0x1120[6]](),license[_0x1120[7]](),auth[_0x1120[10]]([5],[_0x1120[8]]),controller[_0x1120[30]]);router[_0x1120[32]](_0x1120[17],auth[_0x1120[6]](),license[_0x1120[7]](),auth[_0x1120[10]]([5],[_0x1120[8]]),controller[_0x1120[31]]);router[_0x1120[32]](_0x1120[5],auth[_0x1120[6]](),license[_0x1120[7]](),auth[_0x1120[10]]([5],[_0x1120[8]]),controller[_0x1120[33]]);router[_0x1120[32]](_0x1120[21],auth[_0x1120[6]](),license[_0x1120[7]](),auth[_0x1120[10]]([5],[_0x1120[8]]),controller[_0x1120[34]]);router[_0x1120[32]](_0x1120[13],auth[_0x1120[6]](),license[_0x1120[7]](),auth[_0x1120[10]]([5],[_0x1120[8]]),controller[_0x1120[35]]);router[_0x1120[32]](_0x1120[36],auth[_0x1120[6]](),license[_0x1120[7]](),auth[_0x1120[10]]([5],[_0x1120[8]]),controller[_0x1120[37]]);module[_0x1120[38]]= router \ No newline at end of file +'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; diff --git a/server/api/list/list.controller.js b/server/api/list/list.controller.js index 3c3a5f6..18caabc 100644 --- a/server/api/list/list.controller.js +++ b/server/api/list/list.controller.js @@ -1 +1,463 @@ -var _0xde6f=["\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"];_0xde6f[0];var _=require(_0xde6f[1]);var util=require(_0xde6f[2]);var User=require(_0xde6f[4])[_0xde6f[3]];var List=require(_0xde6f[4])[_0xde6f[5]];var UserHasList=require(_0xde6f[4])[_0xde6f[6]];var CustomField=require(_0xde6f[4])[_0xde6f[7]];var Contact=require(_0xde6f[4])[_0xde6f[8]];var Util=require(_0xde6f[9]);var sequelize=require(_0xde6f[4])[_0xde6f[10]];exports[_0xde6f[11]]= function(_0xf370xa,_0xf370xb,_0xf370xc){switch(_0xf370xa[_0xde6f[25]][_0xde6f[28]]){case _0xde6f[27]:return User[_0xde6f[26]](_0xf370xa[_0xde6f[25]][_0xde6f[16]])[_0xde6f[15]](function(_0xf370x11){return _0xf370x11[_0xde6f[24]]()})[_0xde6f[15]](function(_0xf370xf){var _0xf370x10=_[_0xde6f[17]](_0xf370xf,_0xde6f[16]);return List[_0xde6f[23]](_0xde6f[22])[_0xde6f[21]](_[_0xde6f[20]](Util[_0xde6f[19]](_0xf370xa[_0xde6f[18]],{$or:[{defaultEntry:true},{id:_0xf370x10}]}),{distinct:true}))})[_0xde6f[15]](function(_0xf370xe){_0xf370xb[_0xde6f[14]](200)[_0xde6f[13]](_0xf370xe)})[_0xde6f[12]](function(_0xf370xd){return handleError(_0xf370xb,_0xf370xd)});default:return List[_0xde6f[23]](_0xde6f[22])[_0xde6f[21]](_[_0xde6f[20]](Util[_0xde6f[19]](_0xf370xa[_0xde6f[18]]),{distinct:true}))[_0xde6f[15]](function(_0xf370xe){_0xf370xb[_0xde6f[14]](200)[_0xde6f[13]](_0xf370xe)})[_0xde6f[12]](function(_0xf370xd){return handleError(_0xf370xb,_0xf370xd)})}};exports[_0xde6f[29]]= function(_0xf370xa,_0xf370xb){return CustomField[_0xde6f[21]]({where:{ListId:_0xf370xa[_0xde6f[31]][_0xde6f[16]]}})[_0xde6f[15]](function(_0xf370x12){return _0xf370xb[_0xde6f[14]](200)[_0xde6f[13]](_0xf370x12)})[_0xde6f[12]](function(_0xf370xd){console[_0xde6f[30]](_0xf370xd);return handleError(_0xf370xb,_0xf370xd)})};exports[_0xde6f[32]]= function(_0xf370xa,_0xf370xb){var _0xf370x13=_[_0xde6f[20]](_0xf370xa[_0xde6f[33]],{ListId:_0xf370xa[_0xde6f[31]][_0xde6f[16]]});return Contact[_0xde6f[35]]({where:_0xf370x13,default:_0xf370xa[_0xde6f[33]]})[_0xde6f[34]](function(_0xf370x14){return _0xf370xb[_0xde6f[14]](200)[_0xde6f[13]](_0xf370x14)})[_0xde6f[12]](function(_0xf370xd){return handleError(_0xf370xb,_0xf370xd)})};exports[_0xde6f[36]]= function(_0xf370xa,_0xf370xb){var _0xf370x15={where:{ListId:_0xf370xa[_0xde6f[31]][_0xde6f[16]]},attributes:[_0xde6f[37],_0xde6f[38],_0xde6f[39],_0xde6f[40]]};_[_0xde6f[43]](_0xf370xa[_0xde6f[18]],function(_0xf370x16,_0xf370x17){_0xf370x15[_0xde6f[41]][_0xf370x17]= {$like:_0xde6f[42]+ _0xf370x16+ _0xde6f[42]}});return Contact[_0xde6f[45]](_0xf370x15)[_0xde6f[15]](function(_0xf370x18){return _0xf370xb[_0xde6f[14]](200)[_0xde6f[13]]({rows:_0xf370x18,length:_0xf370x18[_0xde6f[44]]})})[_0xde6f[12]](function(_0xf370xd){return handleError(_0xf370xb,_0xf370xd)})};exports[_0xde6f[46]]= function(_0xf370xa,_0xf370xb){return CustomField[_0xde6f[26]](_0xf370xa[_0xde6f[31]][_0xde6f[16]])[_0xde6f[15]](function(_0xf370x19){if(!_0xf370x19){return _0xf370xb[_0xde6f[47]](404)};return _0xf370xb[_0xde6f[14]](200)[_0xde6f[13]](_0xf370x19)})[_0xde6f[12]](function(_0xf370xd){return handleError(_0xf370xb,_0xf370xd)})};exports[_0xde6f[48]]= function(_0xf370xa,_0xf370xb){return CustomField[_0xde6f[26]](_0xf370xa[_0xde6f[31]][_0xde6f[16]])[_0xde6f[15]](function(_0xf370x19){if(!_0xf370x19){return _0xf370xb[_0xde6f[47]](404)};var _0xf370x1a=_[_0xde6f[20]](_0xf370x19,_0xf370xa[_0xde6f[33]]);return _0xf370x1a[_0xde6f[49]]()})[_0xde6f[15]](function(_0xf370x19){return _0xf370xb[_0xde6f[14]](200)[_0xde6f[13]](_0xf370x19)})[_0xde6f[12]](function(_0xf370xd){return handleError(_0xf370xb,_0xf370xd)})};exports[_0xde6f[50]]= function(_0xf370xa,_0xf370xb){var _0xf370x1b;_0xf370xa[_0xde6f[33]][_0xde6f[51]]= _0xf370xa[_0xde6f[31]][_0xde6f[16]];return sequelize[_0xde6f[57]](function(_0xf370x1c){return CustomField[_0xde6f[56]](_0xf370xa[_0xde6f[33]])[_0xde6f[15]](function(_0xf370x19){_0xf370x1b= _0xf370x19;_0xf370x19[_0xde6f[53]]= _0xde6f[55]+ _0xf370x19[_0xde6f[16]];return _0xf370x19[_0xde6f[49]]()})[_0xde6f[15]](function(){return sequelize[_0xde6f[18]](util[_0xde6f[54]](_0xde6f[52],_0xf370x1b[_0xde6f[53]]))})[_0xde6f[15]](function(){return _0xf370xb[_0xde6f[47]](201)})})[_0xde6f[12]](function(_0xf370xd){return handleError(_0xf370xb,_0xf370xd)})};exports[_0xde6f[58]]= function(_0xf370xa,_0xf370xb){return List[_0xde6f[26]](_0xf370xa[_0xde6f[31]][_0xde6f[16]])[_0xde6f[15]](function(_0xf370x1d){if(!_0xf370x1d){return _0xf370xb[_0xde6f[47]](404)};return _0xf370xb[_0xde6f[13]](_0xf370x1d)})[_0xde6f[12]](function(_0xf370xd){return handleError(_0xf370xb,_0xf370xd)})};exports[_0xde6f[56]]= function(_0xf370xa,_0xf370xb){return sequelize[_0xde6f[57]](function(_0xf370x1c){return List[_0xde6f[56]](_0xf370xa[_0xde6f[33]])[_0xde6f[15]](function(_0xf370x1d){return _0xf370xb[_0xde6f[14]](201)[_0xde6f[13]](_0xf370x1d)})})[_0xde6f[12]](sequelize.UniqueConstraintError,function(_0xf370xd){_0xf370xd[_0xde6f[59]]= _0xde6f[60];_0xf370xd[_0xde6f[61]]= _0xde6f[62];return _0xf370xb[_0xde6f[14]](500)[_0xde6f[13]](_0xf370xd)})[_0xde6f[12]](function(_0xf370xd){return handleError(_0xf370xb,_0xf370xd)})};exports[_0xde6f[63]]= function(_0xf370xa,_0xf370xb){return List[_0xde6f[26]](_0xf370xa[_0xde6f[31]][_0xde6f[16]])[_0xde6f[15]](function(_0xf370x1d){if(!_0xf370x1d){return _0xf370xb[_0xde6f[47]](404)};if(_0xf370xa[_0xde6f[33]][_0xde6f[16]]){delete _0xf370xa[_0xde6f[33]][_0xde6f[16]]};var _0xf370x1a=_[_0xde6f[20]](_0xf370x1d,_0xf370xa[_0xde6f[33]]);return _0xf370x1a[_0xde6f[49]]()})[_0xde6f[15]](function(_0xf370x1d){return _0xf370xb[_0xde6f[14]](200)[_0xde6f[13]](_0xf370x1d)})[_0xde6f[12]](sequelize.UniqueConstraintError,function(_0xf370xd){_0xf370xd[_0xde6f[59]]= _0xde6f[60];_0xf370xd[_0xde6f[61]]= _0xde6f[62];return _0xf370xb[_0xde6f[14]](500)[_0xde6f[13]](_0xf370xd)})[_0xde6f[12]](function(_0xf370xd){return handleError(_0xf370xb,_0xf370xd)})};exports[_0xde6f[64]]= function(_0xf370xa,_0xf370xb){return List[_0xde6f[26]](_0xf370xa[_0xde6f[31]][_0xde6f[16]])[_0xde6f[15]](function(_0xf370x1d){if(!_0xf370x1d){return _0xf370xb[_0xde6f[47]](404)};return _0xf370x1d[_0xde6f[66]]({where:{role:_0xde6f[27]},attributes:[_0xde6f[16],_0xde6f[53],_0xde6f[65],_0xde6f[40]]})})[_0xde6f[15]](function(_0xf370x1e){return _0xf370xb[_0xde6f[14]](200)[_0xde6f[13]]({rows:_0xf370x1e,count:_0xf370x1e[_0xde6f[44]]})})[_0xde6f[12]](function(_0xf370xd){return handleError(_0xf370xb,_0xf370xd)})};exports[_0xde6f[67]]= function(_0xf370xa,_0xf370xb,_0xf370xc){return User[_0xde6f[45]]({where:{id:_0xf370xa[_0xde6f[33]][_0xde6f[69]]}})[_0xde6f[15]](function(_0xf370x1f){var _0xf370x20=_[_0xde6f[17]](_0xf370x1f,function(_0xf370x21){return {list:_0xf370xa[_0xde6f[31]][_0xde6f[16]],membername:_0xf370x21[_0xde6f[53]],UserId:_0xf370x21[_0xde6f[16]]}});return UserHasList[_0xde6f[68]](_0xf370x20,{individualHooks:true})})[_0xde6f[15]](function(){return _0xf370xb[_0xde6f[47]](200)})[_0xde6f[12]](function(_0xf370xd){console[_0xde6f[30]](_0xf370xd);return _0xf370xc(_0xf370xd)})};exports[_0xde6f[70]]= function(_0xf370xa,_0xf370xb,_0xf370xc){return UserHasList[_0xde6f[71]]({where:{UserId:_0xf370xa[_0xde6f[18]][_0xde6f[69]],list:_0xf370xa[_0xde6f[31]][_0xde6f[16]]},individualHooks:true})[_0xde6f[15]](function(){return _0xf370xb[_0xde6f[47]](202)})[_0xde6f[12]](function(_0xf370xd){return _0xf370xc(_0xf370xd)})};exports[_0xde6f[71]]= function(_0xf370xa,_0xf370xb){return destroyList(_0xf370xa[_0xde6f[31]][_0xde6f[16]],_0xf370xb)};exports[_0xde6f[72]]= function(_0xf370xa,_0xf370xb){return destroyList(_0xf370xa[_0xde6f[18]][_0xde6f[16]],_0xf370xb)};function destroyList(_0xf370x23,_0xf370xb){return delCf(_0xf370x23,_0xf370xb)[_0xde6f[73]]()[_0xde6f[15]](function(){return List[_0xde6f[71]]({where:{id:_0xf370x23},individualHooks:true})})[_0xde6f[15]](function(){return _0xf370xb[_0xde6f[47]](204)})[_0xde6f[12]](function(_0xf370xd){console[_0xde6f[30]](_0xf370xd);return handleError(_0xf370xb,_0xf370xd)})}function delCf(_0xf370x23,_0xf370xb){var _0xf370x25;return CustomField[_0xde6f[45]]({where:{ListId:_0xf370x23}})[_0xde6f[15]](function(_0xf370x2a){if(!_0xf370x2a){return _0xf370xb[_0xde6f[47]](404)};_0xf370x25= _0xf370x2a;return CustomField[_0xde6f[71]]({where:{id:_0xf370x23}})})[_0xde6f[15]](function(){return Contact[_0xde6f[79]]()})[_0xde6f[15]](function(_0xf370x29){return _[_0xde6f[78]](_0xf370x29)})[_0xde6f[15]](function(_0xf370x26){var _0xf370x27=[];_[_0xde6f[77]](_0xf370x25,function(_0xf370x28){if(_[_0xde6f[74]](_0xf370x26,_0xf370x28[_0xde6f[53]])){_0xf370x27[_0xde6f[76]](sequelize[_0xde6f[18]](util[_0xde6f[54]](_0xde6f[75],_0xf370x28[_0xde6f[53]])))}});return _0xf370x27})}exports[_0xde6f[80]]= function(_0xf370xa,_0xf370xb){var _0xf370x2b;return CustomField[_0xde6f[26]](_0xf370xa[_0xde6f[31]][_0xde6f[16]])[_0xde6f[15]](function(_0xf370x2c){if(!_0xf370x2c){return _0xf370xb[_0xde6f[47]](404)};_0xf370x2b= _0xf370x2c;return CustomField[_0xde6f[71]]({where:{id:_0xf370xa[_0xde6f[31]][_0xde6f[16]]}})})[_0xde6f[15]](function(){return Contact[_0xde6f[79]]()})[_0xde6f[15]](function(_0xf370x29){return _[_0xde6f[78]](_0xf370x29)})[_0xde6f[15]](function(_0xf370x26){if(_[_0xde6f[74]](_0xf370x26,_0xf370x2b[_0xde6f[53]])){return sequelize[_0xde6f[18]](util[_0xde6f[54]](_0xde6f[75],_0xf370x2b[_0xde6f[53]]))}})[_0xde6f[15]](function(){return _0xf370xb[_0xde6f[47]](204)})[_0xde6f[12]](function(_0xf370xd){return handleError(_0xf370xb,_0xf370xd)})};exports[_0xde6f[81]]= function(_0xf370xa,_0xf370xb){var _0xf370x25;return CustomField[_0xde6f[45]]({where:{id:_0xf370xa[_0xde6f[18]][_0xde6f[82]]}})[_0xde6f[15]](function(_0xf370x2a){if(!_0xf370x2a){return _0xf370xb[_0xde6f[47]](404)};_0xf370x25= _0xf370x2a;return CustomField[_0xde6f[71]]({where:{id:_0xf370xa[_0xde6f[18]][_0xde6f[82]]}})})[_0xde6f[15]](function(){return Contact[_0xde6f[79]]()})[_0xde6f[15]](function(_0xf370x29){return _[_0xde6f[78]](_0xf370x29)})[_0xde6f[15]](function(_0xf370x26){var _0xf370x27=[];_0xf370x25[_0xde6f[77]](function(_0xf370x28){if(_[_0xde6f[74]](_0xf370x26,_0xf370x28[_0xde6f[53]])){_0xf370x27[_0xde6f[76]](sequelize[_0xde6f[18]](util[_0xde6f[54]](_0xde6f[75],_0xf370x28[_0xde6f[53]])))}});return _0xf370x27})[_0xde6f[73]]()[_0xde6f[15]](function(){return _0xf370xb[_0xde6f[47]](204)})[_0xde6f[12]](function(_0xf370xd){return handleError(_0xf370xb,_0xf370xd)})};function handleError(_0xf370xb,_0xf370xd){return _0xf370xb[_0xde6f[14]](500)[_0xde6f[13]](_0xf370xd)} \ No newline at end of file +'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); +} diff --git a/server/api/list/list.events.js b/server/api/list/list.events.js index b35c4f4..0cb87f0 100644 --- a/server/api/list/list.events.js +++ b/server/api/list/list.events.js @@ -1 +1,36 @@ -var _0x1f76=["\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"];_0x1f76[0];const EventEmitter=require(_0x1f76[1]);const List=require(_0x1f76[3])[_0x1f76[2]];var ListEvents= new EventEmitter();ListEvents[_0x1f76[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x1f76[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x1f76[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x1f76[6]};for(var e in events){var event=events[e];List[_0x1f76[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6ab8x8,_0x6ab8x9,_0x6ab8xa){ListEvents[_0x1f76[10]](event+ _0x1f76[8]+ _0x6ab8x8[_0x1f76[9]],_0x6ab8x8);ListEvents[_0x1f76[10]](event,_0x6ab8x8);_0x6ab8xa(null)}}module[_0x1f76[11]]= ListEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/list/list.socket.js b/server/api/list/list.socket.js index 7664931..c79e17b 100644 --- a/server/api/list/list.socket.js +++ b/server/api/list/list.socket.js @@ -1 +1,28 @@ -var _0x5d32=["\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"];_0x5d32[0];const ListEvents=require(_0x5d32[1]);var events=[_0x5d32[2],_0x5d32[3]];exports[_0x5d32[4]]= function(_0x8b58x3){for(var _0x8b58x4=0,_0x8b58x5=events[_0x5d32[5]];_0x8b58x4< _0x8b58x5;_0x8b58x4++){var _0x8b58x6=events[_0x8b58x4];var _0x8b58x7=createListener(_0x5d32[6]+ _0x8b58x6,_0x8b58x3);ListEvents[_0x5d32[7]](_0x8b58x6,_0x8b58x7);_0x8b58x3[_0x5d32[7]](_0x5d32[8],removeListener(_0x8b58x6,_0x8b58x7))}};function createListener(_0x8b58x6,_0x8b58x3){return function(_0x8b58x9){_0x8b58x3[_0x5d32[9]](_0x8b58x6,_0x8b58x9)}}function removeListener(_0x8b58x6,_0x8b58x7){return function(){ListEvents[_0x5d32[10]](_0x8b58x6,_0x8b58x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/mail_account/index.js b/server/api/mail_account/index.js index ce6efc6..1a22334 100644 --- a/server/api/mail_account/index.js +++ b/server/api/mail_account/index.js @@ -1 +1,29 @@ -var _0x3bc9=["\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\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","\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","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x2F\x3A\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","\x65\x78\x70\x6F\x72\x74\x73"];_0x3bc9[0];var express=require(_0x3bc9[1]);var controller=require(_0x3bc9[2]);var auth=require(_0x3bc9[3]);var license=require(_0x3bc9[4]);var router=express.Router();router[_0x3bc9[13]](_0x3bc9[5],license[_0x3bc9[6]](),license[_0x3bc9[7]](),auth[_0x3bc9[8]](),auth[_0x3bc9[11]]([9],[_0x3bc9[9],_0x3bc9[10]]),controller[_0x3bc9[12]]);router[_0x3bc9[13]](_0x3bc9[14],license[_0x3bc9[6]](),license[_0x3bc9[7]](),auth[_0x3bc9[8]](),auth[_0x3bc9[11]]([9],[_0x3bc9[9],_0x3bc9[10]]),controller[_0x3bc9[15]]);router[_0x3bc9[13]](_0x3bc9[16],license[_0x3bc9[6]](),license[_0x3bc9[7]](),auth[_0x3bc9[8]](),auth[_0x3bc9[11]]([9],[_0x3bc9[9],_0x3bc9[10]]),controller[_0x3bc9[17]]);router[_0x3bc9[13]](_0x3bc9[18],license[_0x3bc9[6]](),license[_0x3bc9[7]](),auth[_0x3bc9[8]](),auth[_0x3bc9[11]]([9],[_0x3bc9[9]]),controller[_0x3bc9[19]]);router[_0x3bc9[13]](_0x3bc9[20],license[_0x3bc9[6]](),license[_0x3bc9[7]](),auth[_0x3bc9[8]](),auth[_0x3bc9[11]]([9],[_0x3bc9[9],_0x3bc9[10]]),controller[_0x3bc9[21]]);router[_0x3bc9[13]](_0x3bc9[22],license[_0x3bc9[6]](),license[_0x3bc9[7]](),auth[_0x3bc9[8]](),auth[_0x3bc9[11]]([9],[_0x3bc9[9],_0x3bc9[10]]),controller[_0x3bc9[23]]);router[_0x3bc9[25]](_0x3bc9[5],license[_0x3bc9[6]](),license[_0x3bc9[7]](),auth[_0x3bc9[8]](),auth[_0x3bc9[11]]([9],[_0x3bc9[9]]),controller[_0x3bc9[24]]);router[_0x3bc9[25]](_0x3bc9[18],license[_0x3bc9[6]](),license[_0x3bc9[7]](),auth[_0x3bc9[8]](),auth[_0x3bc9[11]]([9],[_0x3bc9[9]]),controller[_0x3bc9[26]]);router[_0x3bc9[25]](_0x3bc9[22],license[_0x3bc9[6]](),license[_0x3bc9[7]](),auth[_0x3bc9[8]](),auth[_0x3bc9[11]]([9],[_0x3bc9[9]]),controller[_0x3bc9[27]]);router[_0x3bc9[29]](_0x3bc9[14],license[_0x3bc9[6]](),license[_0x3bc9[7]](),auth[_0x3bc9[8]](),auth[_0x3bc9[11]]([9],[_0x3bc9[9]]),controller[_0x3bc9[28]]);router[_0x3bc9[29]](_0x3bc9[18],license[_0x3bc9[6]](),license[_0x3bc9[7]](),auth[_0x3bc9[8]](),auth[_0x3bc9[11]]([9],[_0x3bc9[9]]),controller[_0x3bc9[30]]);router[_0x3bc9[29]](_0x3bc9[31],license[_0x3bc9[6]](),license[_0x3bc9[7]](),auth[_0x3bc9[8]](),auth[_0x3bc9[11]]([9],[_0x3bc9[9]]),controller[_0x3bc9[32]]);router[_0x3bc9[34]](_0x3bc9[5],license[_0x3bc9[6]](),license[_0x3bc9[7]](),auth[_0x3bc9[8]](),auth[_0x3bc9[11]]([9],[_0x3bc9[9]]),controller[_0x3bc9[33]]);router[_0x3bc9[34]](_0x3bc9[14],license[_0x3bc9[6]](),license[_0x3bc9[7]](),auth[_0x3bc9[8]](),auth[_0x3bc9[11]]([9],[_0x3bc9[9]]),controller[_0x3bc9[35]]);router[_0x3bc9[34]](_0x3bc9[18],license[_0x3bc9[6]](),license[_0x3bc9[7]](),auth[_0x3bc9[8]](),auth[_0x3bc9[11]]([9],[_0x3bc9[9]]),controller[_0x3bc9[36]]);router[_0x3bc9[34]](_0x3bc9[37],license[_0x3bc9[6]](),license[_0x3bc9[7]](),auth[_0x3bc9[8]](),auth[_0x3bc9[11]]([9],[_0x3bc9[9]]),controller[_0x3bc9[38]]);router[_0x3bc9[34]](_0x3bc9[31],license[_0x3bc9[6]](),license[_0x3bc9[7]](),auth[_0x3bc9[8]](),auth[_0x3bc9[11]]([9],[_0x3bc9[9]]),controller[_0x3bc9[39]]);module[_0x3bc9[40]]= router \ No newline at end of file +'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/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/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; diff --git a/server/api/mail_account/mail_account.controller.js b/server/api/mail_account/mail_account.controller.js index 6567e67..21b4a2f 100644 --- a/server/api/mail_account/mail_account.controller.js +++ b/server/api/mail_account/mail_account.controller.js @@ -1 +1,487 @@ -var _0x92c7=["\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","\x6C\x6F\x67"];_0x92c7[0];var _=require(_0x92c7[1]);var util=require(_0x92c7[2]);var async=require(_0x92c7[3]);var Util=require(_0x92c7[4]);var sequelize=require(_0x92c7[6])[_0x92c7[5]];var User=require(_0x92c7[6])[_0x92c7[7]];var MailAttachment=require(_0x92c7[6])[_0x92c7[8]];var MailQueue=require(_0x92c7[6])[_0x92c7[9]];var MailRoom=require(_0x92c7[6])[_0x92c7[10]];var MailAccount=require(_0x92c7[6])[_0x92c7[11]];var MailServerIn=require(_0x92c7[6])[_0x92c7[12]];var MailServerOut=require(_0x92c7[6])[_0x92c7[13]];var MailApplication=require(_0x92c7[6])[_0x92c7[14]];var MailDisposition=require(_0x92c7[6])[_0x92c7[15]];var Interval=require(_0x92c7[6])[_0x92c7[16]];exports[_0x92c7[17]]= function(_0xd3e0x10,_0xd3e0x11){return MailAccount[_0x92c7[26]](_0x92c7[25])[_0x92c7[24]](Util[_0x92c7[23]](_0xd3e0x10[_0x92c7[22]]))[_0x92c7[21]](function(_0xd3e0x13){_0xd3e0x11[_0x92c7[20]](200)[_0x92c7[19]](_0xd3e0x13)})[_0x92c7[18]](function(_0xd3e0x12){return handleError(_0xd3e0x11,_0xd3e0x12)})};exports[_0x92c7[27]]= function(_0xd3e0x10,_0xd3e0x11,_0xd3e0x14){var _0xd3e0x15={include:[],where:{MailAccountId:_0xd3e0x10[_0x92c7[29]][_0x92c7[28]],$and:[]},attributes:[_0x92c7[28],_0x92c7[30],_0x92c7[31],_0x92c7[32],_0x92c7[33],_0x92c7[34],_0x92c7[35],_0x92c7[36],_0x92c7[37]]};if(_0xd3e0x10[_0x92c7[22]]){if(_0xd3e0x10[_0x92c7[22]][_0x92c7[34]]){if(_[_0x92c7[38]](_0xd3e0x10[_0x92c7[22]][_0x92c7[34]])){for(var _0xd3e0x16=0;_0xd3e0x16< _0xd3e0x10[_0x92c7[22]][_0x92c7[34]][_0x92c7[39]];_0xd3e0x16++){_0xd3e0x15[_0x92c7[44]][_0x92c7[43]][_0x92c7[42]]({tags:{$like:_0x92c7[40]+ _0xd3e0x10[_0x92c7[22]][_0x92c7[34]][_0xd3e0x16]+ _0x92c7[41]}})}}else {_0xd3e0x15[_0x92c7[44]][_0x92c7[43]][_0x92c7[42]]({tags:{$like:_0x92c7[40]+ _0xd3e0x10[_0x92c7[22]][_0x92c7[34]]+ _0x92c7[41]}})};delete _0xd3e0x10[_0x92c7[22]][_0x92c7[34]]};_[_0x92c7[45]](_0xd3e0x15[_0x92c7[44]],_0xd3e0x10[_0x92c7[22]])};switch(_0xd3e0x10[_0x92c7[55]][_0x92c7[60]]){case _0x92c7[48]:_0xd3e0x15[_0x92c7[46]][_0x92c7[42]]({model:User,attributes:[_0x92c7[28]]});var _0xd3e0x17;var _0xd3e0x18;var _0xd3e0x19;return User[_0x92c7[58]](_0xd3e0x10[_0x92c7[55]][_0x92c7[28]])[_0x92c7[21]](function(_0xd3e0x1e){if(_0xd3e0x1e){return _0xd3e0x1e[_0x92c7[59]]()}else {return []}})[_0x92c7[21]](function(_0xd3e0x1d){_0xd3e0x18= _[_0x92c7[51]](_0xd3e0x1d,_0x92c7[28]);return MailAccount[_0x92c7[58]](_0xd3e0x10[_0x92c7[29]][_0x92c7[28]])})[_0x92c7[21]](function(_0xd3e0x1c){return _0xd3e0x1c[_0x92c7[57]]({where:{$or:[{app:_0x92c7[52]},{app:_0x92c7[48]}]}})})[_0x92c7[21]](function(_0xd3e0x1a){_0xd3e0x17= _[_0x92c7[51]](_[_0x92c7[49]](_0xd3e0x1a,{"\x61\x70\x70":_0x92c7[48]}),_0x92c7[50]);_0xd3e0x19= _[_0x92c7[51]](_[_0x92c7[49]](_0xd3e0x1a,{"\x61\x70\x70":_0x92c7[52]}),_0x92c7[53]);if(_[_0x92c7[54]](_0xd3e0x18,_0xd3e0x19)[_0x92c7[39]]|| _[_0x92c7[54]](_0xd3e0x17,[_0xd3e0x10[_0x92c7[55]][_0x92c7[28]]])[_0x92c7[39]]){return MailRoom[_0x92c7[56]](_0xd3e0x15)[_0x92c7[21]](function(_0xd3e0x1b){return _0xd3e0x11[_0x92c7[20]](200)[_0x92c7[19]](_0xd3e0x1b)})[_0x92c7[18]](function(_0xd3e0x12){console[_0x92c7[47]](_0xd3e0x12);return handleError(_0xd3e0x11,_0xd3e0x12)})}else {return _0xd3e0x11[_0x92c7[20]](200)[_0x92c7[19]]([])}})[_0x92c7[18]](function(_0xd3e0x12){console[_0x92c7[47]](_0xd3e0x12)});default:return MailRoom[_0x92c7[56]](_0xd3e0x15)[_0x92c7[21]](function(_0xd3e0x1b){return _0xd3e0x11[_0x92c7[20]](200)[_0x92c7[19]](_0xd3e0x1b)})[_0x92c7[18]](function(_0xd3e0x12){console[_0x92c7[47]](_0xd3e0x12);return handleError(_0xd3e0x11,_0xd3e0x12)})}};exports[_0x92c7[61]]= function(_0xd3e0x10,_0xd3e0x11,_0xd3e0x14){return MailAccount[_0x92c7[58]](_0xd3e0x10[_0x92c7[29]][_0x92c7[28]])[_0x92c7[21]](function(_0xd3e0x20){if(!_0xd3e0x20){return _0xd3e0x11[_0x92c7[62]](404)};return _0xd3e0x20[_0x92c7[63]]()})[_0x92c7[21]](function(_0xd3e0x1f){return _0xd3e0x11[_0x92c7[20]](200)[_0x92c7[19]]({rows:_0xd3e0x1f,count:_0xd3e0x1f[_0x92c7[39]]})})[_0x92c7[18]](function(_0xd3e0x12){return handleError(_0xd3e0x11,_0xd3e0x12)})};exports[_0x92c7[64]]= function(_0xd3e0x10,_0xd3e0x11,_0xd3e0x14){return MailAccount[_0x92c7[26]](_0x92c7[25])[_0x92c7[58]](_0xd3e0x10[_0x92c7[29]][_0x92c7[28]])[_0x92c7[21]](function(_0xd3e0x20){if(!_0xd3e0x20){return _0xd3e0x11[_0x92c7[62]](404)};return _0xd3e0x11[_0x92c7[19]](_0xd3e0x20)})[_0x92c7[18]](function(_0xd3e0x12){return handleError(_0xd3e0x11,_0xd3e0x12)})};exports[_0x92c7[65]]= function(_0xd3e0x10,_0xd3e0x11,_0xd3e0x14){return MailAccount[_0x92c7[67]]({where:{address:_0xd3e0x10[_0x92c7[29]][_0x92c7[66]]}})[_0x92c7[21]](function(_0xd3e0x20){if(!_0xd3e0x20){return _0xd3e0x11[_0x92c7[62]](404)};return _0xd3e0x11[_0x92c7[19]](_0xd3e0x20)})[_0x92c7[18]](function(_0xd3e0x12){return handleError(_0xd3e0x11,_0xd3e0x12)})};exports[_0x92c7[68]]= function(_0xd3e0x10,_0xd3e0x11,_0xd3e0x14){return MailAccount[_0x92c7[26]](_0x92c7[25])[_0x92c7[58]](_0xd3e0x10[_0x92c7[29]][_0x92c7[28]])[_0x92c7[21]](function(_0xd3e0x20){if(!_0xd3e0x20){return _0xd3e0x11[_0x92c7[62]](404)};return _0xd3e0x20[_0x92c7[57]](_[_0x92c7[45]](Util[_0x92c7[23]](_0xd3e0x10[_0x92c7[22]]),{include:[{model:MailQueue,attributes:[_0x92c7[28],_0x92c7[69]]},{model:User,attributes:[_0x92c7[28],_0x92c7[69],_0x92c7[70]]},{model:Interval,attributes:[_0x92c7[28],_0x92c7[69]]}]}))})[_0x92c7[21]](function(_0xd3e0x21){return _0xd3e0x11[_0x92c7[19]]({count:_0xd3e0x21[_0x92c7[39]],rows:_0xd3e0x21})})[_0x92c7[18]](function(_0xd3e0x12){return handleError(_0xd3e0x11,_0xd3e0x12)})};exports[_0x92c7[71]]= function(_0xd3e0x10,_0xd3e0x11,_0xd3e0x14){return sequelize[_0x92c7[75]](function(_0xd3e0x22){return MailAccount[_0x92c7[71]](_0xd3e0x10[_0x92c7[74]],{include:[{model:MailServerIn},{model:MailServerOut}],transaction:_0xd3e0x22})})[_0x92c7[21]](function(_0xd3e0x20){return _0xd3e0x11[_0x92c7[20]](201)[_0x92c7[19]](_0xd3e0x20)})[_0x92c7[18]](sequelize.UniqueConstraintError,function(_0xd3e0x12){return Util[_0x92c7[73]][_0x92c7[72]](_0xd3e0x11,_0xd3e0x12)})[_0x92c7[18]](function(_0xd3e0x12){return handleError(_0xd3e0x11,_0xd3e0x12)})};exports[_0x92c7[76]]= function(_0xd3e0x10,_0xd3e0x11,_0xd3e0x14){return MailApplication[_0x92c7[79]](_0x92c7[77],{where:{MailAccountId:_0xd3e0x10[_0x92c7[29]][_0x92c7[28]]}})[_0x92c7[21]](function(_0xd3e0x24){_0xd3e0x10[_0x92c7[74]][_0x92c7[77]]= _0xd3e0x24?++_0xd3e0x24:1;_0xd3e0x10[_0x92c7[74]][_0x92c7[78]]= _0xd3e0x10[_0x92c7[29]][_0x92c7[28]];return MailApplication[_0x92c7[71]](_0xd3e0x10[_0x92c7[74]])})[_0x92c7[21]](function(_0xd3e0x23){return _0xd3e0x11[_0x92c7[20]](201)[_0x92c7[19]](_0xd3e0x23)})[_0x92c7[18]](function(_0xd3e0x12){return handleError(_0xd3e0x11,_0xd3e0x12)})};exports[_0x92c7[80]]= function(_0xd3e0x10,_0xd3e0x11,_0xd3e0x14){_0xd3e0x10[_0x92c7[74]][_0x92c7[78]]= _0xd3e0x10[_0x92c7[29]][_0x92c7[28]];return MailDisposition[_0x92c7[71]](_0xd3e0x10[_0x92c7[74]])[_0x92c7[21]](function(_0xd3e0x25){return _0xd3e0x11[_0x92c7[20]](201)[_0x92c7[19]](_0xd3e0x25)})[_0x92c7[18]](function(_0xd3e0x12){return handleError(_0xd3e0x11,_0xd3e0x12)})};exports[_0x92c7[81]]= function(_0xd3e0x10,_0xd3e0x11){if(_0xd3e0x10[_0x92c7[74]][_0x92c7[28]]){delete _0xd3e0x10[_0x92c7[74]][_0x92c7[28]]};return MailAccount[_0x92c7[58]](_0xd3e0x10[_0x92c7[29]][_0x92c7[28]])[_0x92c7[21]](function(_0xd3e0x20){if(!_0xd3e0x20){return _0xd3e0x11[_0x92c7[62]](404)};var _0xd3e0x26=_[_0x92c7[45]](_0xd3e0x20,_0xd3e0x10[_0x92c7[74]]);return _0xd3e0x26[_0x92c7[82]]()})[_0x92c7[21]](function(_0xd3e0x20){return _0xd3e0x11[_0x92c7[20]](200)[_0x92c7[19]](_0xd3e0x20)})[_0x92c7[18]](sequelize.UniqueConstraintError,function(_0xd3e0x12){return Util[_0x92c7[73]][_0x92c7[72]](_0xd3e0x11,_0xd3e0x12)})[_0x92c7[18]](function(_0xd3e0x12){return handleError(_0xd3e0x11,_0xd3e0x12)})};exports[_0x92c7[83]]= function(_0xd3e0x10,_0xd3e0x11){if(_0xd3e0x10[_0x92c7[74]][_0x92c7[28]]){delete _0xd3e0x10[_0x92c7[74]][_0x92c7[28]]};return MailDisposition[_0x92c7[58]](_0xd3e0x10[_0x92c7[29]][_0x92c7[84]])[_0x92c7[21]](function(_0xd3e0x27){if(!_0xd3e0x27){return _0xd3e0x11[_0x92c7[62]](404)};var _0xd3e0x26=_[_0x92c7[45]](_0xd3e0x27,_0xd3e0x10[_0x92c7[74]]);return _0xd3e0x26[_0x92c7[82]]()})[_0x92c7[21]](function(_0xd3e0x20){return _0xd3e0x11[_0x92c7[20]](200)[_0x92c7[19]](_0xd3e0x20)})[_0x92c7[18]](function(_0xd3e0x12){return handleError(_0xd3e0x11,_0xd3e0x12)})};exports[_0x92c7[85]]= function(_0xd3e0x10,_0xd3e0x11){var _0xd3e0x28=0;var _0xd3e0x1a=_0xd3e0x10[_0x92c7[74]];_0xd3e0x1a[_0x92c7[87]](function(_0xd3e0x29){delete _0xd3e0x29[_0x92c7[28]];delete _0xd3e0x29[_0x92c7[86]];delete _0xd3e0x29[_0x92c7[37]];_0xd3e0x29[_0x92c7[77]]= ++_0xd3e0x28});return sequelize[_0x92c7[75]](function(_0xd3e0x22){return MailApplication[_0x92c7[89]]({where:{MailAccountId:_0xd3e0x10[_0x92c7[29]][_0x92c7[28]]},individualHooks:true,transaction:_0xd3e0x22})[_0x92c7[21]](function(_0xd3e0x23){return MailApplication[_0x92c7[88]](_0xd3e0x1a,{individualHooks:true,transaction:_0xd3e0x22})})})[_0x92c7[21]](function(_0xd3e0x2a){return _0xd3e0x11[_0x92c7[20]](200)[_0x92c7[19]]({count:_0xd3e0x2a[_0x92c7[39]],rows:_0xd3e0x2a})})[_0x92c7[18]](function(_0xd3e0x12){return handleError(_0xd3e0x11,_0xd3e0x12)})};exports[_0x92c7[89]]= function(_0xd3e0x10,_0xd3e0x11,_0xd3e0x14){return MailAccount[_0x92c7[58]](_0xd3e0x10[_0x92c7[29]][_0x92c7[28]])[_0x92c7[21]](function(_0xd3e0x20){if(!_0xd3e0x20){return _0xd3e0x11[_0x92c7[62]](404)};return _0xd3e0x20[_0x92c7[89]]()})[_0x92c7[21]](function(){return _0xd3e0x11[_0x92c7[62]](204)})[_0x92c7[18]](function(_0xd3e0x12){return handleError(_0xd3e0x11,_0xd3e0x12)})};exports[_0x92c7[90]]= function(_0xd3e0x10,_0xd3e0x11,_0xd3e0x14){return MailApplication[_0x92c7[58]](_0xd3e0x10[_0x92c7[29]][_0x92c7[91]])[_0x92c7[21]](function(_0xd3e0x23){if(!_0xd3e0x23){return _0xd3e0x11[_0x92c7[62]](404)};return _0xd3e0x23[_0x92c7[89]]()})[_0x92c7[21]](function(){return _0xd3e0x11[_0x92c7[62]](204)})[_0x92c7[18]](function(_0xd3e0x12){return handleError(_0xd3e0x11,_0xd3e0x12)})};exports[_0x92c7[92]]= function(_0xd3e0x10,_0xd3e0x11,_0xd3e0x14){return MailDisposition[_0x92c7[58]](_0xd3e0x10[_0x92c7[29]][_0x92c7[84]])[_0x92c7[21]](function(_0xd3e0x25){if(!_0xd3e0x25){return _0xd3e0x11[_0x92c7[62]](404)};return _0xd3e0x25[_0x92c7[89]]()})[_0x92c7[21]](function(){return _0xd3e0x11[_0x92c7[62]](204)})[_0x92c7[18]](function(_0xd3e0x12){return handleError(_0xd3e0x11,_0xd3e0x12)})};exports[_0x92c7[93]]= function(_0xd3e0x10,_0xd3e0x11){return MailAccount[_0x92c7[89]]({where:{id:_0xd3e0x10[_0x92c7[22]][_0x92c7[94]]},individualHooks:true})[_0x92c7[21]](function(){return _0xd3e0x11[_0x92c7[62]](204)})[_0x92c7[18]](function(_0xd3e0x12){return handleError(_0xd3e0x11,_0xd3e0x12)})};exports[_0x92c7[95]]= function(_0xd3e0x10,_0xd3e0x11){return MailApplication[_0x92c7[89]]({where:{id:_0xd3e0x10[_0x92c7[22]][_0x92c7[94]]},individualHooks:true})[_0x92c7[21]](function(){return _0xd3e0x11[_0x92c7[62]](204)})[_0x92c7[18]](function(_0xd3e0x12){return handleError(_0xd3e0x11,_0xd3e0x12)})};function handleError(_0xd3e0x11,_0xd3e0x12){console[_0x92c7[96]](_0xd3e0x12);return _0xd3e0x11[_0x92c7[20]](500)[_0x92c7[19]](_0xd3e0x12)} \ No newline at end of file +'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); + }); +}; + +function handleError(res, err) { + console.log(err); + return res.status(500).send(err); +} diff --git a/server/api/mail_account/mail_account.events.js b/server/api/mail_account/mail_account.events.js index 330f73a..b5d3ffa 100644 --- a/server/api/mail_account/mail_account.events.js +++ b/server/api/mail_account/mail_account.events.js @@ -1 +1,36 @@ -var _0xeca0=["\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"];_0xeca0[0];const EventEmitter=require(_0xeca0[1]);const MailAccount=require(_0xeca0[3])[_0xeca0[2]];var MailAccountEvents= new EventEmitter();MailAccountEvents[_0xeca0[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xeca0[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xeca0[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xeca0[6]};for(var e in events){var event=events[e];MailAccount[_0xeca0[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x3f94x8,_0x3f94x9,_0x3f94xa){MailAccountEvents[_0xeca0[10]](event+ _0xeca0[8]+ _0x3f94x8[_0xeca0[9]],_0x3f94x8);MailAccountEvents[_0xeca0[10]](event,_0x3f94x8);_0x3f94xa(null)}}module[_0xeca0[11]]= MailAccountEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/mail_account/mail_account.socket.js b/server/api/mail_account/mail_account.socket.js index 56cce1f..64b2c78 100644 --- a/server/api/mail_account/mail_account.socket.js +++ b/server/api/mail_account/mail_account.socket.js @@ -1 +1,28 @@ -var _0x4987=["\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"];_0x4987[0];const MailAccountEvents=require(_0x4987[1]);var events=[_0x4987[2],_0x4987[3]];exports[_0x4987[4]]= function(_0x969fx3){for(var _0x969fx4=0,_0x969fx5=events[_0x4987[5]];_0x969fx4< _0x969fx5;_0x969fx4++){var _0x969fx6=events[_0x969fx4];var _0x969fx7=createListener(_0x4987[6]+ _0x969fx6,_0x969fx3);MailAccountEvents[_0x4987[7]](_0x969fx6,_0x969fx7);_0x969fx3[_0x4987[7]](_0x4987[8],removeListener(_0x969fx6,_0x969fx7))}};function createListener(_0x969fx6,_0x969fx3){return function(_0x969fx9){_0x969fx3[_0x4987[9]](_0x969fx6,_0x969fx9)}}function removeListener(_0x969fx6,_0x969fx7){return function(){MailAccountEvents[_0x4987[10]](_0x969fx6,_0x969fx7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/mail_application/index.js b/server/api/mail_application/index.js index 8486ab0..7f53439 100644 --- a/server/api/mail_application/index.js +++ b/server/api/mail_application/index.js @@ -1 +1,17 @@ -var _0x8a48=["\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"];_0x8a48[0];var express=require(_0x8a48[1]);var controller=require(_0x8a48[2]);var auth=require(_0x8a48[3]);var license=require(_0x8a48[4]);var router=express.Router();router[_0x8a48[12]](_0x8a48[5],license[_0x8a48[6]](),license[_0x8a48[7]](),auth[_0x8a48[8]](),auth[_0x8a48[10]]([9],[_0x8a48[9]]),controller[_0x8a48[11]]);router[_0x8a48[12]](_0x8a48[13],license[_0x8a48[6]](),license[_0x8a48[7]](),auth[_0x8a48[8]](),auth[_0x8a48[10]]([9],[_0x8a48[9]]),controller[_0x8a48[14]]);router[_0x8a48[16]](_0x8a48[5],license[_0x8a48[6]](),license[_0x8a48[7]](),auth[_0x8a48[8]](),auth[_0x8a48[10]]([9],[_0x8a48[9]]),controller[_0x8a48[15]]);router[_0x8a48[18]](_0x8a48[13],license[_0x8a48[6]](),license[_0x8a48[7]](),auth[_0x8a48[8]](),auth[_0x8a48[10]]([9],[_0x8a48[9]]),controller[_0x8a48[17]]);router[_0x8a48[20]](_0x8a48[13],license[_0x8a48[6]](),license[_0x8a48[7]](),auth[_0x8a48[8]](),auth[_0x8a48[10]]([9],[_0x8a48[9]]),controller[_0x8a48[19]]);module[_0x8a48[21]]= router \ No newline at end of file +'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; diff --git a/server/api/mail_application/mail_application.controller.js b/server/api/mail_application/mail_application.controller.js index 48409cc..0a75c15 100644 --- a/server/api/mail_application/mail_application.controller.js +++ b/server/api/mail_application/mail_application.controller.js @@ -1 +1,102 @@ -var _0x3fe4=["\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"];_0x3fe4[0];var _=require(_0x3fe4[1]);var MailApplication=require(_0x3fe4[3])[_0x3fe4[2]];exports[_0x3fe4[4]]= function(_0xa552x3,_0xa552x4,_0xa552x5){return MailApplication[_0x3fe4[11]]({where:_0xa552x3[_0x3fe4[9]],order:_0x3fe4[10],include:[{all:true}]})[_0x3fe4[8]](function(_0xa552x7){return _0xa552x4[_0x3fe4[7]](200)[_0x3fe4[6]](_0xa552x7)})[_0x3fe4[5]](function(_0xa552x6){return handleError(_0xa552x4,_0xa552x6)})};exports[_0x3fe4[12]]= function(_0xa552x3,_0xa552x4,_0xa552x5){return MailApplication[_0x3fe4[16]](_0xa552x3[_0x3fe4[15]][_0x3fe4[14]],{include:[{all:true}]})[_0x3fe4[8]](function(_0xa552x8){if(!_0xa552x8){return _0xa552x4[_0x3fe4[13]](404)};return _0xa552x4[_0x3fe4[6]](_0xa552x8)})[_0x3fe4[5]](function(_0xa552x6){return handleError(_0xa552x4,_0xa552x6)})};exports[_0x3fe4[17]]= function(_0xa552x3,_0xa552x4,_0xa552x5){return MailApplication[_0x3fe4[20]](_0x3fe4[10],{where:{MailAccountId:_0xa552x3[_0x3fe4[18]][_0x3fe4[19]]}})[_0x3fe4[8]](function(_0xa552x9){_0xa552x3[_0x3fe4[18]][_0x3fe4[10]]= _0xa552x9?++_0xa552x9:1;return MailApplication[_0x3fe4[17]](_0xa552x3[_0x3fe4[18]])})[_0x3fe4[8]](function(_0xa552x8){return _0xa552x4[_0x3fe4[7]](201)[_0x3fe4[6]](_0xa552x8)})[_0x3fe4[5]](function(_0xa552x6){return handleError(_0xa552x4,_0xa552x6)})};exports[_0x3fe4[21]]= function(_0xa552x3,_0xa552x4,_0xa552x5){if(_0xa552x3[_0x3fe4[18]][_0x3fe4[14]]){delete _0xa552x3[_0x3fe4[18]][_0x3fe4[14]]};return MailApplication[_0x3fe4[16]](_0xa552x3[_0x3fe4[15]][_0x3fe4[14]])[_0x3fe4[8]](function(_0xa552x8){if(!_0xa552x8){return _0xa552x4[_0x3fe4[13]](404)};var _0xa552xa=_[_0x3fe4[22]](_0xa552x8,_0xa552x3[_0x3fe4[18]]);return _0xa552xa[_0x3fe4[23]]()})[_0x3fe4[8]](function(_0xa552x8){return _0xa552x4[_0x3fe4[7]](200)[_0x3fe4[6]](_0xa552x8)})[_0x3fe4[5]](function(_0xa552x6){return handleError(_0xa552x4,_0xa552x6)})};exports[_0x3fe4[24]]= function(_0xa552x3,_0xa552x4,_0xa552x5){return MailApplication[_0x3fe4[16]](_0xa552x3[_0x3fe4[15]][_0x3fe4[14]])[_0x3fe4[8]](function(_0xa552x8){if(!_0xa552x8){return _0xa552x4[_0x3fe4[13]](404)};return _0xa552x8[_0x3fe4[24]]()})[_0x3fe4[8]](function(){return _0xa552x4[_0x3fe4[13]](204)})[_0x3fe4[5]](function(_0xa552x6){return handleError(_0xa552x4,_0xa552x6)})};function handleError(_0xa552x4,_0xa552x6){return _0xa552x4[_0x3fe4[7]](500)[_0x3fe4[6]](_0xa552x6)} \ No newline at end of file +'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); +} diff --git a/server/api/mail_application/mail_application.events.js b/server/api/mail_application/mail_application.events.js index a1b50a0..99d6421 100644 --- a/server/api/mail_application/mail_application.events.js +++ b/server/api/mail_application/mail_application.events.js @@ -1 +1,36 @@ -var _0x3fa3=["\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"];_0x3fa3[0];const EventEmitter=require(_0x3fa3[1]);const MailApplication=require(_0x3fa3[3])[_0x3fa3[2]];var MailApplicationEvents= new EventEmitter();MailApplicationEvents[_0x3fa3[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x3fa3[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x3fa3[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x3fa3[6]};for(var e in events){var event=events[e];MailApplication[_0x3fa3[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x108cx8,_0x108cx9,_0x108cxa){MailApplicationEvents[_0x3fa3[10]](event+ _0x3fa3[8]+ _0x108cx8[_0x3fa3[9]],_0x108cx8);MailApplicationEvents[_0x3fa3[10]](event,_0x108cx8);_0x108cxa(null)}}module[_0x3fa3[11]]= MailApplicationEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/mail_application/mail_application.socket.js b/server/api/mail_application/mail_application.socket.js index d1e9747..4243448 100644 --- a/server/api/mail_application/mail_application.socket.js +++ b/server/api/mail_application/mail_application.socket.js @@ -1 +1,28 @@ -var _0x91ab=["\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"];_0x91ab[0];const MailApplicationEvents=require(_0x91ab[1]);var events=[_0x91ab[2],_0x91ab[3]];exports[_0x91ab[4]]= function(_0x4058x3){for(var _0x4058x4=0,_0x4058x5=events[_0x91ab[5]];_0x4058x4< _0x4058x5;_0x4058x4++){var _0x4058x6=events[_0x4058x4];var _0x4058x7=createListener(_0x91ab[6]+ _0x4058x6,_0x4058x3);MailApplicationEvents[_0x91ab[7]](_0x4058x6,_0x4058x7);_0x4058x3[_0x91ab[7]](_0x91ab[8],removeListener(_0x4058x6,_0x4058x7))}};function createListener(_0x4058x6,_0x4058x3){return function(_0x4058x9){_0x4058x3[_0x91ab[9]](_0x4058x6,_0x4058x9)}}function removeListener(_0x4058x6,_0x4058x7){return function(){MailApplicationEvents[_0x91ab[10]](_0x4058x6,_0x4058x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/mail_attachment/index.js b/server/api/mail_attachment/index.js index 1f9c3b2..8118efb 100644 --- a/server/api/mail_attachment/index.js +++ b/server/api/mail_attachment/index.js @@ -1 +1,17 @@ -var _0xf717=["\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"];_0xf717[0];var express=require(_0xf717[1]);var controller=require(_0xf717[2]);var auth=require(_0xf717[3]);var license=require(_0xf717[4]);var router=express.Router();router[_0xf717[13]](_0xf717[5],license[_0xf717[6]](),license[_0xf717[7]](),auth[_0xf717[8]](),auth[_0xf717[11]]([9],[_0xf717[9],_0xf717[10]]),controller[_0xf717[12]]);router[_0xf717[13]](_0xf717[14],license[_0xf717[6]](),license[_0xf717[7]](),controller[_0xf717[15]]);router[_0xf717[17]](_0xf717[5],license[_0xf717[6]](),license[_0xf717[7]](),auth[_0xf717[8]](),auth[_0xf717[11]]([9],[_0xf717[9],_0xf717[10]]),controller[_0xf717[16]]);router[_0xf717[19]](_0xf717[14],license[_0xf717[6]](),license[_0xf717[7]](),auth[_0xf717[8]](),auth[_0xf717[11]]([9],[_0xf717[9],_0xf717[10]]),controller[_0xf717[18]]);router[_0xf717[21]](_0xf717[14],license[_0xf717[6]](),license[_0xf717[7]](),auth[_0xf717[8]](),auth[_0xf717[11]]([9],[_0xf717[9],_0xf717[10]]),controller[_0xf717[20]]);module[_0xf717[22]]= router \ No newline at end of file +'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; diff --git a/server/api/mail_attachment/mail_attachment.controller.js b/server/api/mail_attachment/mail_attachment.controller.js index 4f65e61..2d24f24 100644 --- a/server/api/mail_attachment/mail_attachment.controller.js +++ b/server/api/mail_attachment/mail_attachment.controller.js @@ -1 +1,97 @@ -var _0x210d=["\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"];_0x210d[0];var _=require(_0x210d[1]);var path=require(_0x210d[2]);var fs=require(_0x210d[3]);var formidable=require(_0x210d[4]);var Promise=require(_0x210d[5]);var config=require(_0x210d[6]);var MailAttachment=require(_0x210d[8])[_0x210d[7]];exports[_0x210d[9]]= function(_0xd012x8,_0xd012x9,_0xd012xa){return MailAttachment[_0x210d[14]]()[_0x210d[13]](function(_0xd012xc){return _0xd012x9[_0x210d[12]](200)[_0x210d[11]](_0xd012xc)})[_0x210d[10]](function(_0xd012xb){return handleError(_0xd012x9,_0xd012xb)})};exports[_0x210d[15]]= function(_0xd012x8,_0xd012x9,_0xd012xa){return MailAttachment[_0x210d[19]](_0xd012x8[_0x210d[18]][_0x210d[17]])[_0x210d[13]](function(_0xd012xd){return _0xd012x9[_0x210d[16]](_0xd012xd[_0x210d[2]])})[_0x210d[10]](function(_0xd012xb){return handleError(_0xd012x9,_0xd012xb)})};exports[_0x210d[20]]= function(_0xd012x8,_0xd012x9,_0xd012xa){console[_0x210d[21]](_0xd012x8);var _0xd012xe= new formidable.IncomingForm();_0xd012xe[_0x210d[22]]= path[_0x210d[27]](config[_0x210d[23]],_0x210d[24],_0x210d[25],_0x210d[26]);_0xd012xe[_0x210d[28]]= true;_0xd012xe[_0x210d[29]]= true;_0xd012xe[_0x210d[30]]= true;_0xd012xe[_0x210d[36]](_0xd012x8,function(_0xd012xb,_0xd012xe,_0xd012xf){if(_0xd012xb){return _0xd012x9[_0x210d[12]](500)[_0x210d[11]](_0xd012xb)};return _0xd012x9[_0x210d[12]](201)[_0x210d[11]]({size:_0xd012xf[_0x210d[32]][_0x210d[31]],path:_0xd012xf[_0x210d[32]][_0x210d[2]],name:_0xd012xf[_0x210d[32]][_0x210d[33]],type:_0xd012xf[_0x210d[32]][_0x210d[34]],basename:path[_0x210d[35]](_0xd012xf[_0x210d[32]][_0x210d[2]])})})};exports[_0x210d[37]]= function(_0xd012x8,_0xd012x9,_0xd012xa){if(_0xd012x8[_0x210d[38]][_0x210d[17]]){delete _0xd012x8[_0x210d[38]][_0x210d[17]]};return MailAttachment[_0x210d[19]](_0xd012x8[_0x210d[18]][_0x210d[17]])[_0x210d[13]](function(_0xd012xd){if(!_0xd012xd){return _0xd012x9[_0x210d[39]](404)};var _0xd012x10=_[_0x210d[40]](_0xd012xd,_0xd012x8[_0x210d[38]]);return _0xd012x10[_0x210d[41]]()})[_0x210d[13]](function(_0xd012xd){return _0xd012x9[_0x210d[12]](200)[_0x210d[11]](_0xd012xd)})[_0x210d[10]](function(_0xd012xb){return handleError(_0xd012x9,_0xd012xb)})};exports[_0x210d[42]]= function(_0xd012x8,_0xd012x9,_0xd012xa){var _0xd012x11=Promise[_0x210d[44]](require(_0x210d[3])[_0x210d[43]]);var _0xd012x12=path[_0x210d[27]](config[_0x210d[23]],_0x210d[24],_0x210d[25],_0x210d[26],_0xd012x8[_0x210d[18]][_0x210d[17]]);return _0xd012x11(_0xd012x12)[_0x210d[13]](function(){return _0xd012x9[_0x210d[39]](204)})[_0x210d[10]](function(_0xd012xb){return handleError(_0xd012x9,_0xd012xb)})};function handleError(_0xd012x9,_0xd012xb){return _0xd012x9[_0x210d[12]](500)[_0x210d[11]](_0xd012xb)} \ No newline at end of file +'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); +} diff --git a/server/api/mail_attachment/mail_attachment.events.js b/server/api/mail_attachment/mail_attachment.events.js index c44b231..72cbdbb 100644 --- a/server/api/mail_attachment/mail_attachment.events.js +++ b/server/api/mail_attachment/mail_attachment.events.js @@ -1 +1,36 @@ -var _0x4be2=["\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"];_0x4be2[0];const EventEmitter=require(_0x4be2[1]);const MailAttachment=require(_0x4be2[3])[_0x4be2[2]];var MailAttachmentEvents= new EventEmitter();MailAttachmentEvents[_0x4be2[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x4be2[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x4be2[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x4be2[6]};for(var e in events){var event=events[e];MailAttachment[_0x4be2[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x85c3x8,_0x85c3x9,_0x85c3xa){MailAttachmentEvents[_0x4be2[10]](event+ _0x4be2[8]+ _0x85c3x8[_0x4be2[9]],_0x85c3x8);MailAttachmentEvents[_0x4be2[10]](event,_0x85c3x8);_0x85c3xa(null)}}module[_0x4be2[11]]= MailAttachmentEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/mail_attachment/mail_attachment.socket.js b/server/api/mail_attachment/mail_attachment.socket.js index 5a63cca..4120d58 100644 --- a/server/api/mail_attachment/mail_attachment.socket.js +++ b/server/api/mail_attachment/mail_attachment.socket.js @@ -1 +1,28 @@ -var _0x36ff=["\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"];_0x36ff[0];const MailAttachmentEvents=require(_0x36ff[1]);var events=[_0x36ff[2],_0x36ff[3]];exports[_0x36ff[4]]= function(_0xe820x3){for(var _0xe820x4=0,_0xe820x5=events[_0x36ff[5]];_0xe820x4< _0xe820x5;_0xe820x4++){var _0xe820x6=events[_0xe820x4];var _0xe820x7=createListener(_0x36ff[6]+ _0xe820x6,_0xe820x3);MailAttachmentEvents[_0x36ff[7]](_0xe820x6,_0xe820x7);_0xe820x3[_0x36ff[7]](_0x36ff[8],removeListener(_0xe820x6,_0xe820x7))}};function createListener(_0xe820x6,_0xe820x3){return function(_0xe820x9){_0xe820x3[_0x36ff[9]](_0xe820x6,_0xe820x9)}}function removeListener(_0xe820x6,_0xe820x7){return function(){MailAttachmentEvents[_0x36ff[10]](_0xe820x6,_0xe820x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/mail_disposition/index.js b/server/api/mail_disposition/index.js index 7de6bf2..ef8de1a 100644 --- a/server/api/mail_disposition/index.js +++ b/server/api/mail_disposition/index.js @@ -1 +1,18 @@ -var _0x21e4=["\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"];_0x21e4[0];var express=require(_0x21e4[1]);var auth=require(_0x21e4[2]);var controller=require(_0x21e4[3]);var router=express.Router();router[_0x21e4[7]](_0x21e4[4],auth[_0x21e4[5]](),controller[_0x21e4[6]]);router[_0x21e4[7]](_0x21e4[8],auth[_0x21e4[5]](),controller[_0x21e4[9]]);router[_0x21e4[11]](_0x21e4[4],auth[_0x21e4[5]](),controller[_0x21e4[10]]);router[_0x21e4[13]](_0x21e4[8],auth[_0x21e4[5]](),controller[_0x21e4[12]]);router[_0x21e4[14]](_0x21e4[8],auth[_0x21e4[5]](),controller[_0x21e4[12]]);router[_0x21e4[16]](_0x21e4[8],auth[_0x21e4[5]](),controller[_0x21e4[15]]);module[_0x21e4[17]]= router \ No newline at end of file +'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; diff --git a/server/api/mail_disposition/mail_disposition.controller.js b/server/api/mail_disposition/mail_disposition.controller.js index 82ecf84..193b6af 100644 --- a/server/api/mail_disposition/mail_disposition.controller.js +++ b/server/api/mail_disposition/mail_disposition.controller.js @@ -1 +1,111 @@ -var _0x2aee=["\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"];_0x2aee[0];var _=require(_0x2aee[1]);var MailDisposition=require(_0x2aee[3])[_0x2aee[2]];function handleError(_0x2298x4,_0x2298x5){_0x2298x5= _0x2298x5|| 500;return function(_0x2298x6){_0x2298x4[_0x2aee[5]](_0x2298x5)[_0x2aee[4]](_0x2298x6)}}function responseWithResult(_0x2298x4,_0x2298x5){_0x2298x5= _0x2298x5|| 200;return function(_0x2298x8){if(_0x2298x8){_0x2298x4[_0x2aee[5]](_0x2298x5)[_0x2aee[6]](_0x2298x8)}}}function responseWithoutResult(_0x2298x4,_0x2298x5){_0x2298x5= _0x2298x5|| 200;return function(){_0x2298x4[_0x2aee[7]](_0x2298x5)}}function handleEntityNotFound(_0x2298x4){return function(_0x2298x8){if(!_0x2298x8){_0x2298x4[_0x2aee[5]](404)[_0x2aee[8]]();return null};return _0x2298x8}}function saveUpdates(_0x2298xc){return function(_0x2298x8){return _0x2298x8[_0x2aee[10]](_0x2298xc)[_0x2aee[9]](function(_0x2298xd){return _0x2298xd})}}function removeEntity(_0x2298x4){return function(_0x2298x8){if(_0x2298x8){return _0x2298x8[_0x2aee[11]]()[_0x2aee[9]](function(){_0x2298x4[_0x2aee[5]](204)[_0x2aee[8]]()})}}}exports[_0x2aee[12]]= function(_0x2298xf,_0x2298x4){MailDisposition[_0x2aee[14]]()[_0x2aee[9]](responseWithResult(_0x2298x4))[_0x2aee[13]](handleError(_0x2298x4))};exports[_0x2aee[15]]= function(_0x2298xf,_0x2298x4){MailDisposition[_0x2aee[18]](_0x2298xf[_0x2aee[17]][_0x2aee[16]])[_0x2aee[9]](handleEntityNotFound(_0x2298x4))[_0x2aee[9]](responseWithResult(_0x2298x4))[_0x2aee[13]](handleError(_0x2298x4))};exports[_0x2aee[19]]= function(_0x2298xf,_0x2298x4){MailDisposition[_0x2aee[19]](_0x2298xf[_0x2aee[20]])[_0x2aee[9]](responseWithResult(_0x2298x4,201))[_0x2aee[13]](handleError(_0x2298x4))};exports[_0x2aee[21]]= function(_0x2298xf,_0x2298x4){if(_0x2298xf[_0x2aee[20]][_0x2aee[16]]){delete _0x2298xf[_0x2aee[20]][_0x2aee[16]]};MailDisposition[_0x2aee[18]](_0x2298xf[_0x2aee[17]][_0x2aee[16]])[_0x2aee[9]](handleEntityNotFound(_0x2298x4))[_0x2aee[9]](saveUpdates(_0x2298xf[_0x2aee[20]]))[_0x2aee[9]](responseWithResult(_0x2298x4))[_0x2aee[13]](handleError(_0x2298x4))};exports[_0x2aee[11]]= function(_0x2298xf,_0x2298x4){MailDisposition[_0x2aee[18]](_0x2298xf[_0x2aee[17]][_0x2aee[16]])[_0x2aee[9]](handleEntityNotFound(_0x2298x4))[_0x2aee[9]](removeEntity(_0x2298x4))[_0x2aee[13]](handleError(_0x2298x4))} \ No newline at end of file +/** + * 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)); +} diff --git a/server/api/mail_disposition/mail_disposition.events.js b/server/api/mail_disposition/mail_disposition.events.js index 0eb0358..ece78a2 100644 --- a/server/api/mail_disposition/mail_disposition.events.js +++ b/server/api/mail_disposition/mail_disposition.events.js @@ -1 +1,36 @@ -var _0xe1f9=["\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"];_0xe1f9[0];const EventEmitter=require(_0xe1f9[1]);const MailDisposition=require(_0xe1f9[3])[_0xe1f9[2]];var MailDispositionEvents= new EventEmitter();MailDispositionEvents[_0xe1f9[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xe1f9[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xe1f9[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xe1f9[6]};for(var e in events){var event=events[e];MailDisposition[_0xe1f9[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x7c29x8,_0x7c29x9,_0x7c29xa){MailDispositionEvents[_0xe1f9[10]](event+ _0xe1f9[8]+ _0x7c29x8[_0xe1f9[9]],_0x7c29x8);MailDispositionEvents[_0xe1f9[10]](event,_0x7c29x8);_0x7c29xa(null)}}module[_0xe1f9[11]]= MailDispositionEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/mail_disposition/mail_disposition.socket.js b/server/api/mail_disposition/mail_disposition.socket.js index 8b70275..49ccf9a 100644 --- a/server/api/mail_disposition/mail_disposition.socket.js +++ b/server/api/mail_disposition/mail_disposition.socket.js @@ -1 +1,28 @@ -var _0xb112=["\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"];_0xb112[0];const MailDispositionEvents=require(_0xb112[1]);var events=[_0xb112[2],_0xb112[3]];exports[_0xb112[4]]= function(_0x1ef1x3){for(var _0x1ef1x4=0,_0x1ef1x5=events[_0xb112[5]];_0x1ef1x4< _0x1ef1x5;_0x1ef1x4++){var _0x1ef1x6=events[_0x1ef1x4];var _0x1ef1x7=createListener(_0xb112[6]+ _0x1ef1x6,_0x1ef1x3);MailDispositionEvents[_0xb112[7]](_0x1ef1x6,_0x1ef1x7);_0x1ef1x3[_0xb112[7]](_0xb112[8],removeListener(_0x1ef1x6,_0x1ef1x7))}};function createListener(_0x1ef1x6,_0x1ef1x3){return function(_0x1ef1x9){_0x1ef1x3[_0xb112[9]](_0x1ef1x6,_0x1ef1x9)}}function removeListener(_0x1ef1x6,_0x1ef1x7){return function(){MailDispositionEvents[_0xb112[10]](_0x1ef1x6,_0x1ef1x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/mail_message/index.js b/server/api/mail_message/index.js index 8201adc..9f3d288 100644 --- a/server/api/mail_message/index.js +++ b/server/api/mail_message/index.js @@ -1 +1,21 @@ -var _0x2067=["\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"];_0x2067[0];var express=require(_0x2067[1]);var controller=require(_0x2067[2]);var auth=require(_0x2067[3]);var license=require(_0x2067[4]);var router=express.Router();router[_0x2067[13]](_0x2067[5],license[_0x2067[6]](),license[_0x2067[7]](),auth[_0x2067[8]](),auth[_0x2067[11]]([9],[_0x2067[9],_0x2067[10]]),controller[_0x2067[12]]);router[_0x2067[13]](_0x2067[14],license[_0x2067[6]](),license[_0x2067[7]](),auth[_0x2067[8]](),auth[_0x2067[11]]([9],[_0x2067[9]]),controller[_0x2067[15]]);router[_0x2067[13]](_0x2067[16],license[_0x2067[6]](),license[_0x2067[7]](),auth[_0x2067[8]](),auth[_0x2067[11]]([9],[_0x2067[9],_0x2067[10]]),controller[_0x2067[17]]);router[_0x2067[19]](_0x2067[5],license[_0x2067[6]](),license[_0x2067[7]](),auth[_0x2067[8]](),auth[_0x2067[11]]([9],[_0x2067[9],_0x2067[10]]),controller[_0x2067[18]]);router[_0x2067[21]](_0x2067[5],license[_0x2067[6]](),license[_0x2067[7]](),auth[_0x2067[8]](),auth[_0x2067[11]]([9],[_0x2067[9],_0x2067[10]]),controller[_0x2067[20]]);router[_0x2067[21]](_0x2067[22],license[_0x2067[6]](),license[_0x2067[7]](),auth[_0x2067[8]](),auth[_0x2067[11]]([9],[_0x2067[9]]),controller[_0x2067[23]]);router[_0x2067[21]](_0x2067[24],license[_0x2067[6]](),license[_0x2067[7]](),auth[_0x2067[8]](),auth[_0x2067[11]]([9],[_0x2067[9]]),controller[_0x2067[20]]);router[_0x2067[21]](_0x2067[16],license[_0x2067[6]](),license[_0x2067[7]](),auth[_0x2067[8]](),auth[_0x2067[11]]([9],[_0x2067[9],_0x2067[10]]),controller[_0x2067[20]]);router[_0x2067[26]](_0x2067[16],license[_0x2067[6]](),license[_0x2067[7]](),auth[_0x2067[8]](),auth[_0x2067[11]]([9],[_0x2067[9],_0x2067[10]]),controller[_0x2067[25]]);module[_0x2067[27]]= router \ No newline at end of file +'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; diff --git a/server/api/mail_message/mail_message.controller.js b/server/api/mail_message/mail_message.controller.js index d6aea6b..4a701cd 100644 --- a/server/api/mail_message/mail_message.controller.js +++ b/server/api/mail_message/mail_message.controller.js @@ -1 +1,207 @@ -var _0x829d=["\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"];_0x829d[0];var _=require(_0x829d[1]);var async=require(_0x829d[2]);var htmlToText=require(_0x829d[3]);var formidable=require(_0x829d[4]);var moment=require(_0x829d[5]);var path=require(_0x829d[6]);var config=require(_0x829d[7]);var sequelize=require(_0x829d[9])[_0x829d[8]];var MailMessage=require(_0x829d[9])[_0x829d[10]];var MailAttachment=require(_0x829d[9])[_0x829d[11]];var MailRoom=require(_0x829d[9])[_0x829d[12]];var MailAccount=require(_0x829d[9])[_0x829d[13]];var ContactEmail=require(_0x829d[9])[_0x829d[14]];var Contact=require(_0x829d[9])[_0x829d[15]];var User=require(_0x829d[9])[_0x829d[16]];exports[_0x829d[17]]= function(_0x9981x10,_0x9981x11,_0x9981x12){var _0x9981x13={order:_0x829d[18],include:[{all:true,include:[{all:true}]}]};switch(_0x9981x10[_0x829d[24]][_0x829d[23]]){case _0x829d[21]:_0x9981x13[_0x829d[19]]= _0x9981x10[_0x829d[20]];break;case _0x829d[22]:break;default:};return MailMessage[_0x829d[29]](_0x9981x13)[_0x829d[28]](function(_0x9981x15){return _0x9981x11[_0x829d[27]](200)[_0x829d[26]](_0x9981x15)})[_0x829d[25]](function(_0x9981x14){return handleError(_0x9981x11,_0x9981x14,_0x9981x12)})};exports[_0x829d[30]]= function(_0x9981x10,_0x9981x11){return MailMessage[_0x829d[30]]()[_0x829d[28]](function(_0x9981x16){return _0x9981x11[_0x829d[27]](200)[_0x829d[26]](_0x9981x16)})[_0x829d[25]](function(_0x9981x14){return handleError(_0x9981x11,_0x9981x14)})};exports[_0x829d[31]]= function(_0x9981x10,_0x9981x11,_0x9981x12){return MailMessage[_0x829d[38]](_0x9981x10[_0x829d[34]][_0x829d[33]],{include:[{model:MailAttachment},{model:User,attributes:[_0x829d[33],_0x829d[35],_0x829d[36],_0x829d[37]]}]})[_0x829d[28]](function(_0x9981x17){if(!_0x9981x17){return _0x9981x11[_0x829d[32]](404)};return _0x9981x11[_0x829d[26]](_0x9981x17)})[_0x829d[25]](function(_0x9981x14){return handleError(_0x9981x11,_0x9981x14,_0x9981x12)})};exports[_0x829d[39]]= function(_0x9981x10,_0x9981x11,_0x9981x12){_0x9981x10[_0x829d[41]][_0x829d[40]]= _0x9981x10[_0x829d[24]][_0x829d[33]];_0x9981x10[_0x829d[41]][_0x829d[42]]= _0x9981x10[_0x829d[24]][_0x829d[35]];_0x9981x10[_0x829d[41]][_0x829d[43]]= _0x9981x10[_0x829d[24]][_0x829d[36]];_0x9981x10[_0x829d[41]][_0x829d[44]]= _0x9981x10[_0x829d[41]][_0x829d[44]]|| htmlToText[_0x829d[46]](_0x9981x10[_0x829d[41]][_0x829d[45]],{wordwrap:false});return MailAccount[_0x829d[56]]({where:{address:_0x9981x10[_0x829d[41]][_0x829d[50]][0]}})[_0x829d[28]](function(_0x9981x19){_0x9981x10[_0x829d[41]][_0x829d[48]]= _0x9981x19[_0x829d[33]];_0x9981x10[_0x829d[41]][_0x829d[49]]= _0x9981x19[_0x829d[35]];return MailRoom[_0x829d[39]]({from:_0x9981x10[_0x829d[41]][_0x829d[50]][0],subject:_0x9981x10[_0x829d[41]][_0x829d[51]],account:_0x9981x19[_0x829d[35]],mailIn:0,mailOut:1,status:_0x829d[52],openReason:_0x829d[22],lastEvent:_0x829d[53],lastEventAt:moment()[_0x829d[55]](_0x829d[54]),MailAccountId:_0x9981x19[_0x829d[33]],MailMessages:[_0x9981x10[_0x829d[41]]]},{include:[{model:MailMessage,include:[{model:MailAttachment}]}]})})[_0x829d[28]](function(_0x9981x18){return _0x9981x11[_0x829d[27]](201)[_0x829d[26]](_0x9981x18)})[_0x829d[25]](function(_0x9981x14){console[_0x829d[47]](_0x9981x14);return handleError(_0x9981x11,_0x9981x14)})};exports[_0x829d[57]]= function(_0x9981x10,_0x9981x11,_0x9981x12){return MailMessage[_0x829d[38]](_0x9981x10[_0x829d[34]][_0x829d[33]],{include:[{all:true}]})[_0x829d[28]](function(_0x9981x17){if(!_0x9981x17){return _0x9981x11[_0x829d[32]](404)};var _0x9981x1a=_[_0x829d[58]](_0x9981x17,_0x9981x10[_0x829d[41]]);return _0x9981x1a[_0x829d[59]]()})[_0x829d[28]](function(_0x9981x1a){return _0x9981x11[_0x829d[27]](200)[_0x829d[26]](_0x9981x1a)})[_0x829d[25]](function(_0x9981x14){return handleError(_0x9981x11,_0x9981x14,_0x9981x12)})};exports[_0x829d[60]]= function(_0x9981x10,_0x9981x11,_0x9981x12){return MailMessage[_0x829d[38]](_0x9981x10[_0x829d[34]][_0x829d[33]])[_0x829d[28]](function(_0x9981x17){if(!_0x9981x17){return _0x9981x11[_0x829d[32]](404)};return _0x9981x17[_0x829d[60]]()})[_0x829d[28]](function(){return _0x9981x11[_0x829d[32]](204)})[_0x829d[25]](function(_0x9981x14){return handleError(_0x9981x11,_0x9981x14,_0x9981x12)})};exports[_0x829d[61]]= function(_0x9981x10,_0x9981x11,_0x9981x12){return MailMessage[_0x829d[63]]({where:{id:{$in:_0x9981x10[_0x829d[41]][_0x829d[33]]}},attributes:{directory:_0x829d[62]}})[_0x829d[28]](function(_0x9981x17){if(!_0x9981x17){return _0x9981x11[_0x829d[32]](404)};return _0x9981x17[_0x829d[60]]()})[_0x829d[28]](function(){return _0x9981x11[_0x829d[32]](204)})[_0x829d[25]](function(_0x9981x14){return handleError(_0x9981x11,_0x9981x14,_0x9981x12)})};function handleError(_0x9981x11,_0x9981x14,_0x9981x12){return _0x9981x11[_0x829d[27]](500)[_0x829d[26]](_0x9981x14)} \ No newline at end of file +'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); +} diff --git a/server/api/mail_message/mail_message.events.js b/server/api/mail_message/mail_message.events.js index 95a577a..c7fe99a 100644 --- a/server/api/mail_message/mail_message.events.js +++ b/server/api/mail_message/mail_message.events.js @@ -1 +1,36 @@ -var _0x6ff2=["\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"];_0x6ff2[0];const EventEmitter=require(_0x6ff2[1]);const MailMessage=require(_0x6ff2[3])[_0x6ff2[2]];var MailMessageEvents= new EventEmitter();MailMessageEvents[_0x6ff2[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x6ff2[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x6ff2[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x6ff2[6]};for(var e in events){var event=events[e];MailMessage[_0x6ff2[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x1f90x8,_0x1f90x9,_0x1f90xa){MailMessageEvents[_0x6ff2[10]](event+ _0x6ff2[8]+ _0x1f90x8[_0x6ff2[9]],_0x1f90x8);MailMessageEvents[_0x6ff2[10]](event,_0x1f90x8);_0x1f90xa(null)}}module[_0x6ff2[11]]= MailMessageEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/mail_message/mail_message.socket.js b/server/api/mail_message/mail_message.socket.js index 7db5fa2..bfe4369 100644 --- a/server/api/mail_message/mail_message.socket.js +++ b/server/api/mail_message/mail_message.socket.js @@ -1 +1,28 @@ -var _0x5333=["\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"];_0x5333[0];const MailMessageEvents=require(_0x5333[1]);var events=[_0x5333[2],_0x5333[2],_0x5333[3]];exports[_0x5333[4]]= function(_0xb1d1x3){for(var _0xb1d1x4=0,_0xb1d1x5=events[_0x5333[5]];_0xb1d1x4< _0xb1d1x5;_0xb1d1x4++){var _0xb1d1x6=events[_0xb1d1x4];var _0xb1d1x7=createListener(_0x5333[6]+ _0xb1d1x6,_0xb1d1x3);MailMessageEvents[_0x5333[7]](_0xb1d1x6,_0xb1d1x7);_0xb1d1x3[_0x5333[7]](_0x5333[8],removeListener(_0xb1d1x6,_0xb1d1x7))}};function createListener(_0xb1d1x6,_0xb1d1x3){return function(_0xb1d1x9){_0xb1d1x3[_0x5333[9]](_0xb1d1x6,_0xb1d1x9)}}function removeListener(_0xb1d1x6,_0xb1d1x7){return function(){MailMessageEvents[_0x5333[10]](_0xb1d1x6,_0xb1d1x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/mail_queue/index.js b/server/api/mail_queue/index.js index bd2f9c1..89fd8d9 100644 --- a/server/api/mail_queue/index.js +++ b/server/api/mail_queue/index.js @@ -1 +1,21 @@ -var _0x1065=["\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","\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"];_0x1065[0];var express=require(_0x1065[1]);var controller=require(_0x1065[2]);var auth=require(_0x1065[3]);var license=require(_0x1065[4]);var router=express.Router();router[_0x1065[12]](_0x1065[5],license[_0x1065[6]](),license[_0x1065[7]](),auth[_0x1065[8]](),auth[_0x1065[10]]([9],[_0x1065[9]]),controller[_0x1065[11]]);router[_0x1065[12]](_0x1065[13],license[_0x1065[6]](),license[_0x1065[7]](),auth[_0x1065[8]](),auth[_0x1065[10]]([9],[_0x1065[9]]),controller[_0x1065[14]]);router[_0x1065[12]](_0x1065[15],license[_0x1065[6]](),license[_0x1065[7]](),auth[_0x1065[8]](),auth[_0x1065[10]]([9],[_0x1065[9]]),controller[_0x1065[16]]);router[_0x1065[18]](_0x1065[5],license[_0x1065[6]](),license[_0x1065[7]](),auth[_0x1065[8]](),auth[_0x1065[10]]([9],[_0x1065[9]]),controller[_0x1065[17]]);router[_0x1065[18]](_0x1065[15],license[_0x1065[6]](),license[_0x1065[7]](),auth[_0x1065[8]](),auth[_0x1065[10]]([9],[_0x1065[9]]),controller[_0x1065[19]]);router[_0x1065[21]](_0x1065[13],license[_0x1065[6]](),license[_0x1065[7]](),auth[_0x1065[8]](),auth[_0x1065[10]]([9],[_0x1065[9]]),controller[_0x1065[20]]);router[_0x1065[23]](_0x1065[5],license[_0x1065[6]](),license[_0x1065[7]](),auth[_0x1065[8]](),auth[_0x1065[10]]([9],[_0x1065[9]]),controller[_0x1065[22]]);router[_0x1065[23]](_0x1065[13],license[_0x1065[6]](),license[_0x1065[7]](),auth[_0x1065[8]](),auth[_0x1065[10]]([9],[_0x1065[9]]),controller[_0x1065[24]]);router[_0x1065[23]](_0x1065[15],license[_0x1065[6]](),license[_0x1065[7]](),auth[_0x1065[8]](),auth[_0x1065[10]]([9],[_0x1065[9]]),controller[_0x1065[25]]);module[_0x1065[26]]= router \ No newline at end of file +'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.hasModule([9], ['admin']), controller.create); +router.post('/:id/agents', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.addAgents); +router.put('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.update); +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/agents', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.removeAgents); + +module.exports = router; diff --git a/server/api/mail_queue/mail_queue.controller.js b/server/api/mail_queue/mail_queue.controller.js index 51de03d..8824524 100644 --- a/server/api/mail_queue/mail_queue.controller.js +++ b/server/api/mail_queue/mail_queue.controller.js @@ -1 +1,235 @@ -var _0x7183=["\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"];_0x7183[0];var _=require(_0x7183[1]);var util=require(_0x7183[2]);var Util=require(_0x7183[3]);var sequelize=require(_0x7183[5])[_0x7183[4]];var MailQueue=require(_0x7183[5])[_0x7183[6]];var User=require(_0x7183[5])[_0x7183[7]];var UserHasMailQueue=require(_0x7183[5])[_0x7183[8]];exports[_0x7183[9]]= function(_0x3f00x8,_0x3f00x9){switch(_0x3f00x8[_0x7183[17]][_0x7183[24]]){case _0x7183[17]:return User[_0x7183[18]](_0x3f00x8[_0x7183[17]][_0x7183[16]],{attributes:[_0x7183[16]]})[_0x7183[13]](Util[_0x7183[15]](_0x3f00x8[_0x7183[14]]))[_0x7183[13]](function(_0x3f00xb){_0x3f00x9[_0x7183[12]](200)[_0x7183[11]](_0x3f00xb)})[_0x7183[10]](function(_0x3f00xa){return handleError(_0x3f00x9,_0x3f00xa)});default:return MailQueue[_0x7183[23]](_0x7183[22])[_0x7183[21]](_[_0x7183[20]](Util[_0x7183[19]](_0x3f00x8[_0x7183[14]]),{distinct:true}))[_0x7183[13]](function(_0x3f00xb){_0x3f00x9[_0x7183[12]](200)[_0x7183[11]](_0x3f00xb)})[_0x7183[10]](function(_0x3f00xa){return handleError(_0x3f00x9,_0x3f00xa)})}};exports[_0x7183[25]]= function(_0x3f00x8,_0x3f00x9){return MailQueue[_0x7183[23]](_0x7183[22])[_0x7183[18]](_0x3f00x8[_0x7183[27]][_0x7183[16]])[_0x7183[13]](function(_0x3f00xc){if(!_0x3f00xc){return _0x3f00x9[_0x7183[26]](404)};return _0x3f00x9[_0x7183[11]](_0x3f00xc)})[_0x7183[10]](function(_0x3f00xa){return handleError(_0x3f00x9,_0x3f00xa)})};exports[_0x7183[28]]= function(_0x3f00x8,_0x3f00x9){var _0x3f00xd;return MailQueue[_0x7183[28]](_0x3f00x8[_0x7183[32]])[_0x7183[13]](function(_0x3f00xc){_0x3f00xd= _0x3f00xc;if(_0x3f00x8[_0x7183[32]][_0x7183[31]]){return _0x3f00xd[_0x7183[35]](_0x3f00x8[_0x7183[32]][_0x7183[31]],{penalty:_0x3f00x8[_0x7183[32]][_0x7183[33]]|| 0,queue:_0x3f00xd[_0x7183[34]]})}})[_0x7183[13]](function(){return _0x3f00x9[_0x7183[12]](201)[_0x7183[11]](_0x3f00xd)})[_0x7183[10]](sequelize.UniqueConstraintError,function(_0x3f00xa){return Util[_0x7183[30]][_0x7183[29]](_0x3f00x9,_0x3f00xa)})[_0x7183[10]](function(_0x3f00xa){return handleError(_0x3f00x9,_0x3f00xa)})};exports[_0x7183[36]]= function(_0x3f00x8,_0x3f00x9){if(_0x3f00x8[_0x7183[32]][_0x7183[16]]){delete _0x3f00x8[_0x7183[32]][_0x7183[16]]};return MailQueue[_0x7183[18]](_0x3f00x8[_0x7183[27]][_0x7183[16]])[_0x7183[13]](function(_0x3f00xc){if(!_0x3f00xc){return _0x3f00x9[_0x7183[26]](404)};var _0x3f00xe=_[_0x7183[20]](_0x3f00xc,_0x3f00x8[_0x7183[32]]);return _0x3f00xe[_0x7183[37]]()})[_0x7183[13]](function(_0x3f00xc){return _0x3f00x9[_0x7183[12]](200)[_0x7183[11]](_0x3f00xc)})[_0x7183[10]](sequelize.UniqueConstraintError,function(_0x3f00xa){return Util[_0x7183[30]][_0x7183[29]](_0x3f00x9,_0x3f00xa)})[_0x7183[10]](function(_0x3f00xa){return handleError(_0x3f00x9,_0x3f00xa)})};exports[_0x7183[38]]= function(_0x3f00x8,_0x3f00x9,_0x3f00xf){return MailQueue[_0x7183[18]](_0x3f00x8[_0x7183[27]][_0x7183[16]])[_0x7183[13]](function(_0x3f00xc){if(!_0x3f00xc){return _0x3f00x9[_0x7183[26]](404)};var _0x3f00x10=_[_0x7183[39]](_0x3f00x8[_0x7183[32]][_0x7183[31]],function(_0x3f00x11){return {UserId:_0x3f00x11,penalty:_0x3f00x8[_0x7183[32]][_0x7183[33]],MailQueueId:_0x3f00xc[_0x7183[16]],queue:_0x3f00xc[_0x7183[34]]}});return UserHasMailQueue[_0x7183[40]](_0x3f00x10,{individualHooks:true})})[_0x7183[13]](function(){return _0x3f00x9[_0x7183[26]](200)})[_0x7183[10]](function(_0x3f00xa){return handleError(_0x3f00x9,_0x3f00xa)})};exports[_0x7183[41]]= function(_0x3f00x8,_0x3f00x9){return MailQueue[_0x7183[18]](_0x3f00x8[_0x7183[27]][_0x7183[16]])[_0x7183[13]](function(_0x3f00x12){if(!_0x3f00x12){return _0x3f00x9[_0x7183[26]](404)};return _0x3f00x12[_0x7183[42]](_0x3f00x8[_0x7183[14]][_0x7183[31]],{individualHooks:true})})[_0x7183[13]](function(){return _0x3f00x9[_0x7183[26]](200)})[_0x7183[10]](function(_0x3f00xa){return handleError(_0x3f00x9,_0x3f00xa)})};exports[_0x7183[43]]= function(_0x3f00x8,_0x3f00x9){var _0x3f00xd;return MailQueue[_0x7183[18]](_0x3f00x8[_0x7183[27]][_0x7183[16]])[_0x7183[13]](function(_0x3f00xc){_0x3f00xd= _0x3f00xc;if(!_0x3f00xc){return _0x3f00x9[_0x7183[26]](404)};return _0x3f00xc[_0x7183[43]]()})[_0x7183[13]](function(){return _0x3f00x9[_0x7183[26]](204)})[_0x7183[10]](sequelize.ForeignKeyConstraintError,function(_0x3f00xa){return Util[_0x7183[30]][_0x7183[47]](_0x3f00x9,_0x7183[46],_0x3f00xd[_0x7183[34]],_0x3f00xa)})[_0x7183[10]](function(_0x3f00xa){console[_0x7183[45]](_0x7183[44],_0x3f00xa);return handleError(_0x3f00x9,_0x3f00xa)})};exports[_0x7183[48]]= function(_0x3f00x8,_0x3f00x9){return MailQueue[_0x7183[43]]({where:{id:_0x3f00x8[_0x7183[14]][_0x7183[49]]},individualHooks:true})[_0x7183[13]](function(){return _0x3f00x9[_0x7183[26]](204)})[_0x7183[10]](function(_0x3f00xa){return handleError(_0x3f00x9,_0x3f00xa)})};exports[_0x7183[50]]= function(_0x3f00x8,_0x3f00x9){return MailQueue[_0x7183[18]](_0x3f00x8[_0x7183[27]][_0x7183[16]])[_0x7183[13]](function(_0x3f00x12){if(!_0x3f00x12){return _0x3f00x9[_0x7183[26]](404)};return _0x3f00x12[_0x7183[55]]({where:{role:_0x7183[52]},attributes:[_0x7183[16],_0x7183[34],_0x7183[53],_0x7183[54]]})})[_0x7183[13]](function(_0x3f00x13){return _0x3f00x9[_0x7183[12]](200)[_0x7183[11]]({rows:_0x3f00x13,count:_0x3f00x13[_0x7183[51]]})})[_0x7183[10]](function(_0x3f00xa){return handleError(_0x3f00x9,_0x3f00xa)})};function handleError(_0x3f00x9,_0x3f00xa){return _0x3f00x9[_0x7183[12]](500)[_0x7183[11]](_0x3f00xa)} \ No newline at end of file +'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); +} diff --git a/server/api/mail_queue/mail_queue.events.js b/server/api/mail_queue/mail_queue.events.js index dc2587a..7f926cc 100644 --- a/server/api/mail_queue/mail_queue.events.js +++ b/server/api/mail_queue/mail_queue.events.js @@ -1 +1,36 @@ -var _0xc05e=["\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"];_0xc05e[0];const EventEmitter=require(_0xc05e[1]);const MailQueue=require(_0xc05e[3])[_0xc05e[2]];var MailQueueEvents= new EventEmitter();MailQueueEvents[_0xc05e[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xc05e[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xc05e[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xc05e[6]};for(var e in events){var event=events[e];MailQueue[_0xc05e[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x2701x8,_0x2701x9,_0x2701xa){MailQueueEvents[_0xc05e[10]](event+ _0xc05e[8]+ _0x2701x8[_0xc05e[9]],_0x2701x8);MailQueueEvents[_0xc05e[10]](event,_0x2701x8);_0x2701xa(null)}}module[_0xc05e[11]]= MailQueueEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/mail_queue/mail_queue.socket.js b/server/api/mail_queue/mail_queue.socket.js index 5798f50..dca86ad 100644 --- a/server/api/mail_queue/mail_queue.socket.js +++ b/server/api/mail_queue/mail_queue.socket.js @@ -1 +1,28 @@ -var _0x62ee=["\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"];_0x62ee[0];const MailQueueEvents=require(_0x62ee[1]);var events=[_0x62ee[2],_0x62ee[3]];exports[_0x62ee[4]]= function(_0x70a9x3){for(var _0x70a9x4=0,_0x70a9x5=events[_0x62ee[5]];_0x70a9x4< _0x70a9x5;_0x70a9x4++){var _0x70a9x6=events[_0x70a9x4];var _0x70a9x7=createListener(_0x62ee[6]+ _0x70a9x6,_0x70a9x3);MailQueueEvents[_0x62ee[7]](_0x70a9x6,_0x70a9x7);_0x70a9x3[_0x62ee[7]](_0x62ee[8],removeListener(_0x70a9x6,_0x70a9x7))}};function createListener(_0x70a9x6,_0x70a9x3){return function(_0x70a9x9){_0x70a9x3[_0x62ee[9]](_0x70a9x6,_0x70a9x9)}}function removeListener(_0x70a9x6,_0x70a9x7){return function(){MailQueueEvents[_0x62ee[10]](_0x70a9x6,_0x70a9x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/mail_room/index.js b/server/api/mail_room/index.js index 9cbcc23..376f392 100644 --- a/server/api/mail_room/index.js +++ b/server/api/mail_room/index.js @@ -1 +1,32 @@ -var _0x7124=["\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"];_0x7124[0];var express=require(_0x7124[1]);var controller=require(_0x7124[2]);var auth=require(_0x7124[3]);var license=require(_0x7124[4]);var router=express.Router();router[_0x7124[12]](_0x7124[5],license[_0x7124[6]](),license[_0x7124[7]](),auth[_0x7124[8]](),auth[_0x7124[10]]([9],[_0x7124[9]]),controller[_0x7124[11]]);router[_0x7124[12]](_0x7124[13],license[_0x7124[6]](),license[_0x7124[7]](),auth[_0x7124[8]](),auth[_0x7124[10]]([9],[_0x7124[9],_0x7124[14]]),controller[_0x7124[15]]);router[_0x7124[12]](_0x7124[16],license[_0x7124[6]](),license[_0x7124[7]](),auth[_0x7124[8]](),auth[_0x7124[10]]([9],[_0x7124[9]]),controller[_0x7124[17]]);router[_0x7124[12]](_0x7124[18],license[_0x7124[6]](),license[_0x7124[7]](),auth[_0x7124[8]](),auth[_0x7124[10]]([9,17],[_0x7124[9]]),controller[_0x7124[19]]);router[_0x7124[12]](_0x7124[20],license[_0x7124[6]](),license[_0x7124[7]](),auth[_0x7124[8]](),auth[_0x7124[10]]([9,17],[_0x7124[9]]),controller[_0x7124[21]]);router[_0x7124[12]](_0x7124[22],license[_0x7124[6]](),license[_0x7124[7]](),auth[_0x7124[8]](),auth[_0x7124[10]]([9,17],[_0x7124[9]]),controller[_0x7124[23]]);router[_0x7124[12]](_0x7124[24],license[_0x7124[6]](),license[_0x7124[7]](),auth[_0x7124[8]](),auth[_0x7124[10]]([9,17],[_0x7124[9]]),controller[_0x7124[25]]);router[_0x7124[12]](_0x7124[26],license[_0x7124[6]](),license[_0x7124[7]](),auth[_0x7124[8]](),auth[_0x7124[10]]([9],[_0x7124[9]]),controller[_0x7124[27]]);router[_0x7124[12]](_0x7124[28],license[_0x7124[6]](),license[_0x7124[7]](),auth[_0x7124[8]](),auth[_0x7124[10]]([9],[_0x7124[9],_0x7124[14]]),controller[_0x7124[29]]);router[_0x7124[12]](_0x7124[30],license[_0x7124[6]](),license[_0x7124[7]](),auth[_0x7124[8]](),auth[_0x7124[10]]([9],[_0x7124[9],_0x7124[31],_0x7124[14]]),controller[_0x7124[32]]);router[_0x7124[12]](_0x7124[33],license[_0x7124[6]](),license[_0x7124[7]](),auth[_0x7124[8]](),auth[_0x7124[10]]([9],[_0x7124[9],_0x7124[14]]),controller[_0x7124[34]]);router[_0x7124[36]](_0x7124[5],license[_0x7124[6]](),license[_0x7124[7]](),auth[_0x7124[8]](),auth[_0x7124[10]]([9],[_0x7124[9]]),controller[_0x7124[35]]);router[_0x7124[36]](_0x7124[37],license[_0x7124[6]](),license[_0x7124[7]](),auth[_0x7124[8]](),auth[_0x7124[10]]([9],[_0x7124[9],_0x7124[14]]),controller[_0x7124[38]]);router[_0x7124[40]](_0x7124[30],license[_0x7124[6]](),license[_0x7124[7]](),auth[_0x7124[8]](),auth[_0x7124[10]]([9],[_0x7124[9],_0x7124[14]]),controller[_0x7124[39]]);router[_0x7124[42]](_0x7124[30],license[_0x7124[6]](),license[_0x7124[7]](),auth[_0x7124[8]](),auth[_0x7124[10]]([9],[_0x7124[9],_0x7124[14]]),controller[_0x7124[41]]);router[_0x7124[40]](_0x7124[33],license[_0x7124[6]](),license[_0x7124[7]](),auth[_0x7124[8]](),auth[_0x7124[10]]([9],[_0x7124[9],_0x7124[14]]),controller[_0x7124[43]]);router[_0x7124[45]](_0x7124[5],license[_0x7124[6]](),license[_0x7124[7]](),auth[_0x7124[8]](),auth[_0x7124[10]]([9],[_0x7124[9]]),controller[_0x7124[44]]);router[_0x7124[45]](_0x7124[30],license[_0x7124[6]](),license[_0x7124[7]](),auth[_0x7124[8]](),auth[_0x7124[10]]([9],[_0x7124[9]]),controller[_0x7124[46]]);module[_0x7124[47]]= router \ No newline at end of file +'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; diff --git a/server/api/mail_room/mail_room.controller.js b/server/api/mail_room/mail_room.controller.js index 8abd598..4d07489 100644 --- a/server/api/mail_room/mail_room.controller.js +++ b/server/api/mail_room/mail_room.controller.js @@ -1 +1,479 @@ -var _0xf261=["\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"];_0xf261[0];var _=require(_0xf261[1]);var util=require(_0xf261[2]);var htmlToText=require(_0xf261[3]);var Util=require(_0xf261[4]);var moment=require(_0xf261[5]);var sequelize=require(_0xf261[7])[_0xf261[6]];var User=require(_0xf261[7])[_0xf261[8]];var Agent=require(_0xf261[7])[_0xf261[8]];var Contact=require(_0xf261[7])[_0xf261[9]];var Status=require(_0xf261[7])[_0xf261[10]];var MailRoom=require(_0xf261[7])[_0xf261[11]];var MailMessage=require(_0xf261[7])[_0xf261[12]];var MailAccount=require(_0xf261[7])[_0xf261[13]];var MailApplication=require(_0xf261[7])[_0xf261[14]];var MailQueue=require(_0xf261[7])[_0xf261[15]];var MailAttachment=require(_0xf261[7])[_0xf261[16]];exports[_0xf261[17]]= function(_0xb010x11,_0xb010x12,_0xb010x13){return MailRoom[_0xf261[26]](_0xf261[25])[_0xf261[24]](Util[_0xf261[23]](_0xb010x11[_0xf261[22]]))[_0xf261[21]](function(_0xb010x15){return _0xb010x12[_0xf261[20]](200)[_0xf261[19]](_0xb010x15)})[_0xf261[18]](function(_0xb010x14){return handleError(_0xb010x12,_0xb010x14)})};exports[_0xf261[27]]= function(_0xb010x11,_0xb010x12){return MailRoom[_0xf261[27]]()[_0xf261[21]](function(_0xb010x16){return _0xb010x12[_0xf261[20]](200)[_0xf261[19]](_0xb010x16)})[_0xf261[18]](function(_0xb010x14){return handleError(_0xb010x12,_0xb010x14)})};function getMailQueues(_0xb010x18){return function(){switch(_0xb010x18[_0xf261[33]]){case _0xf261[32]:return User[_0xf261[31]](_0xb010x18[_0xf261[28]],{attributes:[_0xf261[28]]})[_0xf261[21]](Util[_0xf261[30]]({},{attributes:[_0xf261[28]]}))[_0xf261[21]](function(_0xb010x19){return {include:{model:MailAccount,include:{model:MailApplication,include:{model:MailQueue,where:{id:_[_0xf261[29]](_0xb010x19,_0xf261[28])}}}}}});default:return {}}}}exports[_0xf261[34]]= function(_0xb010x11,_0xb010x12){return Promise[_0xf261[41]]([])[_0xf261[21]](getMailQueues(_0xb010x11[_0xf261[32]]))[_0xf261[21]](function(_0xb010x1b){return MailRoom[_0xf261[40]](_[_0xf261[39]](Util[_0xf261[23]](_0xb010x11[_0xf261[22]],{status:_0xf261[36],updatedAt:{$gte:moment()[_0xf261[38]](_0xf261[37])}}),_0xb010x1b))})[_0xf261[21]](function(_0xb010x1a){return _0xb010x12[_0xf261[20]](200)[_0xf261[19]]({value:_0xb010x1a})})[_0xf261[18]](function(_0xb010x14){console[_0xf261[35]](_0xb010x14);return handleError(_0xb010x12,_0xb010x14)})};exports[_0xf261[42]]= function(_0xb010x11,_0xb010x12){return Promise[_0xf261[41]]([])[_0xf261[21]](getMailQueues(_0xb010x11[_0xf261[32]]))[_0xf261[21]](function(_0xb010x1b){return MailRoom[_0xf261[40]](_[_0xf261[39]](Util[_0xf261[23]](_0xb010x11[_0xf261[22]],{status:_0xf261[43],updatedAt:{$gte:moment()[_0xf261[38]](_0xf261[37])}}),_0xb010x1b))})[_0xf261[21]](function(_0xb010x1a){return _0xb010x12[_0xf261[20]](200)[_0xf261[19]]({value:_0xb010x1a})})[_0xf261[18]](function(_0xb010x14){console[_0xf261[35]](_0xb010x14);return handleError(_0xb010x12,_0xb010x14)})};exports[_0xf261[44]]= function(_0xb010x11,_0xb010x12){return Promise[_0xf261[41]]([])[_0xf261[21]](getMailQueues(_0xb010x11[_0xf261[32]]))[_0xf261[21]](function(_0xb010x1b){return MailRoom[_0xf261[40]](_[_0xf261[39]](Util[_0xf261[23]](_0xb010x11[_0xf261[22]],{status:_0xf261[45],updatedAt:{$gte:moment()[_0xf261[38]](_0xf261[37])}}),_0xb010x1b))})[_0xf261[21]](function(_0xb010x1a){return _0xb010x12[_0xf261[20]](200)[_0xf261[19]]({value:_0xb010x1a})})[_0xf261[18]](function(_0xb010x14){console[_0xf261[35]](_0xb010x14);return handleError(_0xb010x12,_0xb010x14)})};exports[_0xf261[46]]= function(_0xb010x11,_0xb010x12){return Promise[_0xf261[41]]([])[_0xf261[21]](getMailQueues(_0xb010x11[_0xf261[32]]))[_0xf261[21]](function(_0xb010x1b){return MailRoom[_0xf261[40]](_[_0xf261[39]](Util[_0xf261[23]](_0xb010x11[_0xf261[22]],{status:_0xf261[47],updatedAt:{$gte:moment()[_0xf261[38]](_0xf261[37])}}),_0xb010x1b))})[_0xf261[21]](function(_0xb010x1a){return _0xb010x12[_0xf261[20]](200)[_0xf261[19]]({value:_0xb010x1a})})[_0xf261[18]](function(_0xb010x14){console[_0xf261[35]](_0xb010x14);return handleError(_0xb010x12,_0xb010x14)})};exports[_0xf261[48]]= function(_0xb010x11,_0xb010x12,_0xb010x13){switch(_0xb010x11[_0xf261[32]][_0xf261[33]]){case _0xf261[54]:return sequelize[_0xf261[22]](_0xf261[50],{replacements:{status:_0xf261[51],id:_0xb010x11[_0xf261[32]][_0xf261[28]]},type:sequelize[_0xf261[53]][_0xf261[52]]})[_0xf261[21]](function(_0xb010x15){return _0xb010x12[_0xf261[20]](200)[_0xf261[19]](_0xb010x15)})[_0xf261[18]](function(_0xb010x14){console[_0xf261[49]](_0xb010x14);return handleError(_0xb010x12,_0xb010x14)});default:return sequelize[_0xf261[22]](_0xf261[55],{replacements:{status:_0xf261[51],id:_0xb010x11[_0xf261[32]][_0xf261[28]]},type:sequelize[_0xf261[53]][_0xf261[52]]})[_0xf261[21]](function(_0xb010x15){return _0xb010x12[_0xf261[20]](200)[_0xf261[19]](_0xb010x15)})[_0xf261[18]](function(_0xb010x14){return handleError(_0xb010x12,_0xb010x14)})}};exports[_0xf261[56]]= function(_0xb010x11,_0xb010x12,_0xb010x13){return MailRoom[_0xf261[58]]({where:{UserId:_0xb010x11[_0xf261[57]][_0xf261[28]]},include:[{all:true}]})[_0xf261[21]](function(_0xb010x1c){return _0xb010x12[_0xf261[20]](200)[_0xf261[19]](_0xb010x1c)})[_0xf261[18]](function(_0xb010x14){return handleError(_0xb010x12,_0xb010x14)})};exports[_0xf261[59]]= function(_0xb010x11,_0xb010x12,_0xb010x13){var _0xb010x1d;var _0xb010x1e=[];console[_0xf261[35]](_0xb010x11[_0xf261[60]]);console[_0xf261[35]](_0xb010x11[_0xf261[57]]);return MailRoom[_0xf261[67]](_0xb010x11[_0xf261[60]],{where:{id:_0xb010x11[_0xf261[57]][_0xf261[28]][_0xf261[63]](_0xf261[62])},individualHooks:true})[_0xf261[21]](function(){return Status[_0xf261[66]](_[_0xf261[29]](_0xb010x11[_0xf261[57]][_0xf261[28]][_0xf261[63]](_0xf261[62]),function(_0xb010x1f){return {status:_0xb010x11[_0xf261[60]][_0xf261[20]],data1:_0xb010x11[_0xf261[32]][_0xf261[64]],data2:_0xb010x11[_0xf261[32]][_0xf261[65]],MailRoomId:_0xb010x1f,UserId:_0xb010x11[_0xf261[32]][_0xf261[28]]}}))})[_0xf261[21]](function(_0xb010x1c){return _0xb010x12[_0xf261[61]](200)})[_0xf261[18]](function(_0xb010x14){return handleError(_0xb010x12,_0xb010x14)})};exports[_0xf261[68]]= function(_0xb010x11,_0xb010x12,_0xb010x13){return MailMessage[_0xf261[31]](_0xb010x11[_0xf261[57]][_0xf261[28]])[_0xf261[21]](function(_0xb010x21){return _0xb010x21[_0xf261[70]]({include:[{model:MailAccount},{model:MailMessage,include:[{model:MailAttachment},{model:User,attributes:[_0xf261[28],_0xf261[64],_0xf261[65],_0xf261[69]]}]},{model:User,attributes:[_0xf261[28],_0xf261[64],_0xf261[65],_0xf261[69]]}]})})[_0xf261[21]](function(_0xb010x20){return _0xb010x12[_0xf261[19]](_0xb010x20)})[_0xf261[18]](function(_0xb010x14){return handleError(_0xb010x12,_0xb010x14)})};exports[_0xf261[71]]= function(_0xb010x11,_0xb010x12,_0xb010x13){return MailRoom[_0xf261[26]](_0xf261[25])[_0xf261[31]](_0xb010x11[_0xf261[57]][_0xf261[28]])[_0xf261[21]](function(_0xb010x20){if(!_0xb010x20){return _0xb010x12[_0xf261[61]](404)};return _0xb010x12[_0xf261[19]](_0xb010x20)})[_0xf261[18]](function(_0xb010x14){console[_0xf261[49]](_0xb010x14);return handleError(_0xb010x12,_0xb010x14)})};exports[_0xf261[72]]= function(_0xb010x11,_0xb010x12,_0xb010x13){return MailRoom[_0xf261[31]](_0xb010x11[_0xf261[57]][_0xf261[28]])[_0xf261[21]](function(_0xb010x20){if(!_0xb010x20){return _0xb010x12[_0xf261[61]](404)};return _0xb010x20[_0xf261[74]]({attributes:[_0xf261[28],_0xf261[64],_0xf261[65],_0xf261[69],_0xf261[33],_0xf261[73]]})})[_0xf261[21]](function(_0xb010x22){return _0xb010x12[_0xf261[19]](_0xb010x22)})[_0xf261[18]](function(_0xb010x14){return handleError(_0xb010x12,_0xb010x14)})};exports[_0xf261[75]]= function(_0xb010x11,_0xb010x12,_0xb010x13){return MailRoom[_0xf261[75]](_0xb010x11[_0xf261[60]])[_0xf261[21]](function(_0xb010x20){return _0xb010x12[_0xf261[20]](201)[_0xf261[19]](_0xb010x20)})[_0xf261[18]](function(_0xb010x14){return handleError(_0xb010x12,_0xb010x14)})};exports[_0xf261[76]]= function(_0xb010x11,_0xb010x12,_0xb010x13){_0xb010x11[_0xf261[60]][_0xf261[77]]= _0xb010x11[_0xf261[32]][_0xf261[28]];_0xb010x11[_0xf261[60]][_0xf261[78]]= _0xb010x11[_0xf261[57]][_0xf261[28]];_0xb010x11[_0xf261[60]][_0xf261[79]]= (_0xb010x11[_0xf261[60]][_0xf261[80]]&& _0xb010x11[_0xf261[60]][_0xf261[80]][_0xf261[81]])?true:false;_0xb010x11[_0xf261[60]][_0xf261[82]]= _0xb010x11[_0xf261[60]][_0xf261[82]]|| htmlToText[_0xf261[84]](_0xb010x11[_0xf261[60]][_0xf261[83]],{wordwrap:false});return MailMessage[_0xf261[75]](_0xb010x11[_0xf261[60]],{include:[{model:MailAttachment}],user:_0xb010x11[_0xf261[32]]})[_0xf261[21]](function(_0xb010x21){return _0xb010x12[_0xf261[20]](201)[_0xf261[19]](_0xb010x21)})[_0xf261[18]](function(_0xb010x14){return handleError(_0xb010x12,_0xb010x14)})};exports[_0xf261[67]]= function(_0xb010x11,_0xb010x12,_0xb010x13){return MailRoom[_0xf261[31]](_0xb010x11[_0xf261[57]][_0xf261[28]])[_0xf261[21]](function(_0xb010x20){if(!_0xb010x20){return _0xb010x12[_0xf261[61]](404)};return _0xb010x20[_0xf261[67]](_0xb010x11[_0xf261[60]])})[_0xf261[21]](function(_0xb010x20){return _0xb010x12[_0xf261[20]](200)[_0xf261[19]](_0xb010x20)})[_0xf261[18]](function(_0xb010x14){return handleError(_0xb010x12,_0xb010x14)})};exports[_0xf261[85]]= function(_0xb010x11,_0xb010x12,_0xb010x13){var _0xb010x23={where:{id:_0xb010x11[_0xf261[57]][_0xf261[28]][_0xf261[63]](_0xf261[62])},user:_0xb010x11[_0xf261[32]],individualHooks:true};return MailRoom[_0xf261[67]](_0xb010x11[_0xf261[60]],_0xb010x23)[_0xf261[21]](function(_0xb010x1c){if(!_0xb010x1c){return _0xb010x12[_0xf261[61]](404)};return _0xb010x1c})[_0xf261[21]](function(_0xb010x1c){return _0xb010x12[_0xf261[61]](200)})[_0xf261[18]](function(_0xb010x14){return handleError(_0xb010x12,_0xb010x14)})};exports[_0xf261[86]]= function(_0xb010x11,_0xb010x12,_0xb010x13){return MailRoom[_0xf261[31]](_0xb010x11[_0xf261[57]][_0xf261[28]])[_0xf261[21]](function(_0xb010x20){if(!_0xb010x20){return _0xb010x12[_0xf261[61]](404)};return _0xb010x20[_0xf261[88]](_0xb010x11[_0xf261[60]][_0xf261[87]],{individualHooks:true})})[_0xf261[21]](function(){return _0xb010x12[_0xf261[61]](200)})[_0xf261[18]](function(_0xb010x14){return handleError(_0xb010x12,_0xb010x14)})};exports[_0xf261[89]]= function(_0xb010x11,_0xb010x12,_0xb010x13){return MailRoom[_0xf261[31]](_0xb010x11[_0xf261[57]][_0xf261[28]])[_0xf261[21]](function(_0xb010x20){if(!_0xb010x20){return _0xb010x12[_0xf261[61]](404)};return _0xb010x20[_0xf261[89]]()})[_0xf261[21]](function(){return _0xb010x12[_0xf261[61]](204)})[_0xf261[18]](function(_0xb010x14){return handleError(_0xb010x12,_0xb010x14)})};exports[_0xf261[90]]= function(_0xb010x11,_0xb010x12){return MailRoom[_0xf261[89]]({where:{id:_0xb010x11[_0xf261[22]][_0xf261[91]]},individualHooks:true})[_0xf261[21]](function(){return _0xb010x12[_0xf261[61]](200)})[_0xf261[18]](function(_0xb010x14){return handleError(_0xb010x12,_0xb010x14)})};function handleError(_0xb010x12,_0xb010x14){return _0xb010x12[_0xf261[20]](500)[_0xf261[19]](_0xb010x14)} \ No newline at end of file +'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); +} diff --git a/server/api/mail_room/mail_room.events.js b/server/api/mail_room/mail_room.events.js index 36068fb..b0fc25b 100644 --- a/server/api/mail_room/mail_room.events.js +++ b/server/api/mail_room/mail_room.events.js @@ -1 +1,36 @@ -var _0x4e31=["\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"];_0x4e31[0];const EventEmitter=require(_0x4e31[1]);const MailRoom=require(_0x4e31[3])[_0x4e31[2]];var MailRoomEvents= new EventEmitter();MailRoomEvents[_0x4e31[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x4e31[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x4e31[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x4e31[6]};for(var e in events){var event=events[e];MailRoom[_0x4e31[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xccf6x8,_0xccf6x9,_0xccf6xa){MailRoomEvents[_0x4e31[10]](event+ _0x4e31[8]+ _0xccf6x8[_0x4e31[9]],_0xccf6x8);MailRoomEvents[_0x4e31[10]](event,_0xccf6x8);_0xccf6xa(null)}}module[_0x4e31[11]]= MailRoomEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/mail_room/mail_room.socket.js b/server/api/mail_room/mail_room.socket.js index 2f1c57f..9d2aefc 100644 --- a/server/api/mail_room/mail_room.socket.js +++ b/server/api/mail_room/mail_room.socket.js @@ -1 +1,28 @@ -var _0x5457=["\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"];_0x5457[0];const MailRoomEvents=require(_0x5457[1]);var events=[_0x5457[2],_0x5457[2],_0x5457[3]];exports[_0x5457[4]]= function(_0xb9c5x3){for(var _0xb9c5x4=0,_0xb9c5x5=events[_0x5457[5]];_0xb9c5x4< _0xb9c5x5;_0xb9c5x4++){var _0xb9c5x6=events[_0xb9c5x4];var _0xb9c5x7=createListener(_0x5457[6]+ _0xb9c5x6,_0xb9c5x3);MailRoomEvents[_0x5457[7]](_0xb9c5x6,_0xb9c5x7);_0xb9c5x3[_0x5457[7]](_0x5457[8],removeListener(_0xb9c5x6,_0xb9c5x7))}};function createListener(_0xb9c5x6,_0xb9c5x3){return function(_0xb9c5x9){_0xb9c5x3[_0x5457[9]](_0xb9c5x6,_0xb9c5x9)}}function removeListener(_0xb9c5x6,_0xb9c5x7){return function(){MailRoomEvents[_0x5457[10]](_0xb9c5x6,_0xb9c5x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/mail_server_in/index.js b/server/api/mail_server_in/index.js index c0d9eb7..58902a3 100644 --- a/server/api/mail_server_in/index.js +++ b/server/api/mail_server_in/index.js @@ -1 +1,17 @@ -var _0x89b1=["\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"];_0x89b1[0];var express=require(_0x89b1[1]);var controller=require(_0x89b1[2]);var auth=require(_0x89b1[3]);var license=require(_0x89b1[4]);var router=express.Router();router[_0x89b1[12]](_0x89b1[5],license[_0x89b1[6]](),license[_0x89b1[7]](),auth[_0x89b1[8]](),auth[_0x89b1[10]]([9],[_0x89b1[9]]),controller[_0x89b1[11]]);router[_0x89b1[12]](_0x89b1[13],license[_0x89b1[6]](),license[_0x89b1[7]](),auth[_0x89b1[8]](),auth[_0x89b1[10]]([9],[_0x89b1[9]]),controller[_0x89b1[14]]);router[_0x89b1[16]](_0x89b1[5],license[_0x89b1[6]](),license[_0x89b1[7]](),auth[_0x89b1[8]](),auth[_0x89b1[10]]([9],[_0x89b1[9]]),controller[_0x89b1[15]]);router[_0x89b1[18]](_0x89b1[13],license[_0x89b1[6]](),license[_0x89b1[7]](),auth[_0x89b1[8]](),auth[_0x89b1[10]]([9],[_0x89b1[9]]),controller[_0x89b1[17]]);router[_0x89b1[20]](_0x89b1[13],license[_0x89b1[6]](),license[_0x89b1[7]](),auth[_0x89b1[8]](),auth[_0x89b1[10]]([9],[_0x89b1[9]]),controller[_0x89b1[19]]);module[_0x89b1[21]]= router \ No newline at end of file +'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; 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 2ac103f..27fda21 100644 --- a/server/api/mail_server_in/mail_server_in.controller.js +++ b/server/api/mail_server_in/mail_server_in.controller.js @@ -1 +1,96 @@ -var _0xb485=["\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"];_0xb485[0];var _=require(_0xb485[1]);var Util=require(_0xb485[2]);var sequelize=require(_0xb485[4])[_0xb485[3]];var MailServerIn=require(_0xb485[4])[_0xb485[5]];exports[_0xb485[6]]= function(_0xe53fx5,_0xe53fx6){return MailServerIn[_0xb485[11]]()[_0xb485[10]](function(_0xe53fx8){return _0xe53fx6[_0xb485[9]](200)[_0xb485[8]](_0xe53fx8)})[_0xb485[7]](function(_0xe53fx7){return handleError(_0xe53fx6,_0xe53fx7)})};exports[_0xb485[12]]= function(_0xe53fx5,_0xe53fx6){return MailServerIn[_0xb485[16]](_0xe53fx5[_0xb485[15]][_0xb485[14]])[_0xb485[10]](function(_0xe53fx9){if(!_0xe53fx9){return _0xe53fx6[_0xb485[13]](404)};return _0xe53fx6[_0xb485[8]](_0xe53fx9)})[_0xb485[7]](function(_0xe53fx7){return handleError(_0xe53fx6,_0xe53fx7)})};exports[_0xb485[17]]= function(_0xe53fx5,_0xe53fx6){return MailServerIn[_0xb485[17]](_0xe53fx5[_0xb485[20]])[_0xb485[10]](function(_0xe53fx9){return _0xe53fx6[_0xb485[9]](201)[_0xb485[8]](_0xe53fx9)})[_0xb485[7]](sequelize.UniqueConstraintError,function(_0xe53fx7){return Util[_0xb485[19]][_0xb485[18]](_0xe53fx6,_0xe53fx7)})[_0xb485[7]](function(_0xe53fx7){return handleError(_0xe53fx6,_0xe53fx7)})};exports[_0xb485[21]]= function(_0xe53fx5,_0xe53fx6){if(_0xe53fx5[_0xb485[20]][_0xb485[14]]){delete _0xe53fx5[_0xb485[20]][_0xb485[14]]};return MailServerIn[_0xb485[16]](_0xe53fx5[_0xb485[15]][_0xb485[14]])[_0xb485[10]](function(_0xe53fx9){if(!_0xe53fx9){return _0xe53fx6[_0xb485[13]](404)};var _0xe53fxa=_[_0xb485[22]](_0xe53fx9,_0xe53fx5[_0xb485[20]]);return _0xe53fxa[_0xb485[23]]()})[_0xb485[10]](function(_0xe53fx9){return _0xe53fx6[_0xb485[9]](200)[_0xb485[8]](_0xe53fx9)})[_0xb485[7]](sequelize.UniqueConstraintError,function(_0xe53fx7){return Util[_0xb485[19]][_0xb485[18]](_0xe53fx6,_0xe53fx7)})[_0xb485[7]](function(_0xe53fx7){return handleError(_0xe53fx6,_0xe53fx7)})};exports[_0xb485[24]]= function(_0xe53fx5,_0xe53fx6){return MailServerIn[_0xb485[16]](_0xe53fx5[_0xb485[15]][_0xb485[14]])[_0xb485[10]](function(_0xe53fx9){if(!_0xe53fx9){return _0xe53fx6[_0xb485[13]](404)};return _0xe53fx9[_0xb485[24]]()})[_0xb485[7]](function(_0xe53fx7){return handleError(_0xe53fx6,_0xe53fx7)})};function handleError(_0xe53fx6,_0xe53fx7){return _0xe53fx6[_0xb485[9]](500)[_0xb485[8]](_0xe53fx7)} \ No newline at end of file +'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); +} 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 f973d02..540e207 100644 --- a/server/api/mail_server_in/mail_server_in.events.js +++ b/server/api/mail_server_in/mail_server_in.events.js @@ -1 +1,36 @@ -var _0x6530=["\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"];_0x6530[0];const EventEmitter=require(_0x6530[1]);const MailServerIn=require(_0x6530[3])[_0x6530[2]];var MailServerInEvents= new EventEmitter();MailServerInEvents[_0x6530[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x6530[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x6530[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x6530[6]};for(var e in events){var event=events[e];MailServerIn[_0x6530[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xa02dx8,_0xa02dx9,_0xa02dxa){MailServerInEvents[_0x6530[10]](event+ _0x6530[8]+ _0xa02dx8[_0x6530[9]],_0xa02dx8);MailServerInEvents[_0x6530[10]](event,_0xa02dx8);_0xa02dxa(null)}}module[_0x6530[11]]= MailServerInEvents \ No newline at end of file +/** + * 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; 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 0211969..b6bcc34 100644 --- a/server/api/mail_server_in/mail_server_in.socket.js +++ b/server/api/mail_server_in/mail_server_in.socket.js @@ -1 +1,42 @@ -var _0x5d7f=["\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"];_0x5d7f[0];const MailServerInEvents=require(_0x5d7f[1]);var events=[_0x5d7f[2],_0x5d7f[3]];exports[_0x5d7f[4]]= function(_0xbf63x3){for(var _0xbf63x4=0,_0xbf63x5=events[_0x5d7f[5]];_0xbf63x4< _0xbf63x5;_0xbf63x4++){var _0xbf63x6=events[_0xbf63x4];var _0xbf63x7=createListener(_0x5d7f[6]+ _0xbf63x6,_0xbf63x3);MailServerInEvents[_0x5d7f[7]](_0xbf63x6,_0xbf63x7);_0xbf63x3[_0x5d7f[7]](_0x5d7f[8],removeListener(_0xbf63x6,_0xbf63x7))}};function createListener(_0xbf63x6,_0xbf63x3){return function(_0xbf63x9){switch(_0xbf63x6){case _0x5d7f[13]:if(_0xbf63x9[_0x5d7f[10]](_0x5d7f[9])){_0xbf63x3[_0x5d7f[12]](_0x5d7f[11],_0xbf63x9)}else {_0xbf63x3[_0x5d7f[12]](_0x5d7f[13],_0xbf63x9)};break;case _0x5d7f[14]:_0xbf63x3[_0x5d7f[12]](_0xbf63x6,_0xbf63x9);break;default:}}}function removeListener(_0xbf63x6,_0xbf63x7){return function(){MailServerInEvents[_0x5d7f[15]](_0xbf63x6,_0xbf63x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/mail_server_out/index.js b/server/api/mail_server_out/index.js index dab92ee..323abb4 100644 --- a/server/api/mail_server_out/index.js +++ b/server/api/mail_server_out/index.js @@ -1 +1,19 @@ -var _0x8986=["\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"];_0x8986[0];var express=require(_0x8986[1]);var controller=require(_0x8986[2]);var auth=require(_0x8986[3]);var license=require(_0x8986[4]);var router=express.Router();router[_0x8986[12]](_0x8986[5],license[_0x8986[6]](),license[_0x8986[7]](),auth[_0x8986[8]](),auth[_0x8986[10]]([9],[_0x8986[9]]),controller[_0x8986[11]]);router[_0x8986[12]](_0x8986[13],license[_0x8986[6]](),license[_0x8986[7]](),auth[_0x8986[8]](),auth[_0x8986[10]]([9],[_0x8986[9]]),controller[_0x8986[14]]);router[_0x8986[12]](_0x8986[15],license[_0x8986[6]](),license[_0x8986[7]](),auth[_0x8986[8]](),auth[_0x8986[10]]([9],[_0x8986[9]]),controller[_0x8986[16]]);router[_0x8986[12]](_0x8986[17],license[_0x8986[6]](),license[_0x8986[7]](),auth[_0x8986[8]](),auth[_0x8986[10]]([9],[_0x8986[9]]),controller[_0x8986[18]]);router[_0x8986[20]](_0x8986[5],license[_0x8986[6]](),license[_0x8986[7]](),auth[_0x8986[8]](),auth[_0x8986[10]]([9],[_0x8986[9]]),controller[_0x8986[19]]);router[_0x8986[22]](_0x8986[15],license[_0x8986[6]](),license[_0x8986[7]](),auth[_0x8986[8]](),auth[_0x8986[10]]([9],[_0x8986[9]]),controller[_0x8986[21]]);router[_0x8986[24]](_0x8986[15],license[_0x8986[6]](),license[_0x8986[7]](),auth[_0x8986[8]](),auth[_0x8986[10]]([9],[_0x8986[9]]),controller[_0x8986[23]]);module[_0x8986[25]]= router \ No newline at end of file +'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; 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 c3a5686..00117cf 100644 --- a/server/api/mail_server_out/mail_server_out.controller.js +++ b/server/api/mail_server_out/mail_server_out.controller.js @@ -1 +1,157 @@ -var _0xdb38=["\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"];_0xdb38[0];var _=require(_0xdb38[1]);var MailServerOut=require(_0xdb38[3])[_0xdb38[2]];var MailMessage=require(_0xdb38[3])[_0xdb38[4]];var MailAccount=require(_0xdb38[3])[_0xdb38[5]];var sequelize=require(_0xdb38[3])[_0xdb38[6]];var Util=require(_0xdb38[7]);exports[_0xdb38[8]]= function(_0x8491x7,_0x8491x8,_0x8491x9){return MailServerOut[_0xdb38[15]](Util[_0xdb38[14]](_0x8491x7[_0xdb38[13]]))[_0xdb38[12]](function(_0x8491xb){return _0x8491x8[_0xdb38[11]](200)[_0xdb38[10]](_0x8491xb)})[_0xdb38[9]](function(_0x8491xa){return handleError(_0x8491x8,_0x8491xa)})};exports[_0xdb38[16]]= function(_0x8491x7,_0x8491x8){return MailServerOut[_0xdb38[19]]({where:{service:true}})[_0xdb38[12]](function(_0x8491xc){if(!_0x8491xc){throw new Error(_0xdb38[18])};return _0x8491x8[_0xdb38[11]](200)[_0xdb38[10]](_0x8491xc)})[_0xdb38[9]](function(_0x8491xa){return handleError(_0x8491x8,{message:_0x8491xa[_0xdb38[17]]})})};exports[_0xdb38[20]]= function(_0x8491x7,_0x8491x8){return MailServerOut[_0xdb38[24]](_0x8491x7[_0xdb38[23]][_0xdb38[22]])[_0xdb38[12]](function(_0x8491xc){if(!_0x8491xc){return _0x8491x8[_0xdb38[21]](404)};return _0x8491x8[_0xdb38[10]](_0x8491xc)})[_0xdb38[9]](function(_0x8491xa){return handleError(_0x8491x8,_0x8491xa)})};exports[_0xdb38[25]]= function(_0x8491x7,_0x8491x8,_0x8491x9){return MailAccount[_0xdb38[19]]({where:{custom:true}})[_0xdb38[12]](function(_0x8491xd){if(!_0x8491xd){return _0x8491x8[_0xdb38[21]](404)};return _0x8491x8[_0xdb38[10]](_0x8491xd)})[_0xdb38[9]](function(_0x8491xa){return handleError(_0x8491x8,_0x8491xa)})};exports[_0xdb38[26]]= function(_0x8491x7,_0x8491x8){return MailServerOut[_0xdb38[26]](_0x8491x7[_0xdb38[27]])[_0xdb38[12]](function(_0x8491xc){return _0x8491x8[_0xdb38[11]](201)[_0xdb38[10]](_0x8491xc)})[_0xdb38[9]](function(_0x8491xa){return handleError(_0x8491x8,_0x8491xa)})};exports[_0xdb38[28]]= function(_0x8491x7,_0x8491x8){if(_0x8491x7[_0xdb38[27]][_0xdb38[22]]){delete _0x8491x7[_0xdb38[27]][_0xdb38[22]]};_0x8491x7[_0xdb38[27]][_0xdb38[29]]= _0xdb38[30];return MailServerOut[_0xdb38[24]](_0x8491x7[_0xdb38[23]][_0xdb38[22]])[_0xdb38[12]](function(_0x8491xc){if(!_0x8491xc){return _0x8491x8[_0xdb38[21]](404)};var _0x8491xe=_[_0xdb38[31]](_0x8491xc,_0x8491x7[_0xdb38[27]]);return _0x8491xe[_0xdb38[32]]()})[_0xdb38[12]](function(_0x8491xc){return _0x8491x8[_0xdb38[11]](200)[_0xdb38[10]](_0x8491xc)})[_0xdb38[9]](function(_0x8491xa){return handleError(_0x8491x8,_0x8491xa)})};exports[_0xdb38[33]]= function(_0x8491x7,_0x8491x8){return MailServerOut[_0xdb38[24]](_0x8491x7[_0xdb38[23]][_0xdb38[22]])[_0xdb38[12]](function(_0x8491xc){if(!_0x8491xc){return _0x8491x8[_0xdb38[21]](404)};return _0x8491xc[_0xdb38[33]]()})[_0xdb38[12]](function(){return _0x8491x8[_0xdb38[21]](204)})[_0xdb38[9]](function(_0x8491xa){return handleError(_0x8491x8,_0x8491xa)})};exports[_0xdb38[34]]= function(_0x8491x7,_0x8491x8){var _0x8491xf;var _0x8491x10;return MailServerOut[_0xdb38[24]](_0x8491x7[_0xdb38[23]][_0xdb38[22]])[_0xdb38[12]](function(_0x8491xc){if(!_0x8491xc){return _0x8491x8[_0xdb38[21]](404)};return _0x8491xc[_0xdb38[28]]({state:_0xdb38[30]})})[_0xdb38[12]](function(){return _0x8491x8[_0xdb38[11]](201)[_0xdb38[10]](_0x8491x10)})};function handleError(_0x8491x8,_0x8491xa){return _0x8491x8[_0xdb38[11]](500)[_0xdb38[10]](_0x8491xa)} \ No newline at end of file +'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); +} 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 49d895b..997dd0f 100644 --- a/server/api/mail_server_out/mail_server_out.events.js +++ b/server/api/mail_server_out/mail_server_out.events.js @@ -1 +1,36 @@ -var _0x336f=["\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"];_0x336f[0];const EventEmitter=require(_0x336f[1]);const MailServerOut=require(_0x336f[3])[_0x336f[2]];var MailServerOutEvents= new EventEmitter();MailServerOutEvents[_0x336f[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x336f[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x336f[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x336f[6]};for(var e in events){var event=events[e];MailServerOut[_0x336f[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xc23ex8,_0xc23ex9,_0xc23exa){MailServerOutEvents[_0x336f[10]](event+ _0x336f[8]+ _0xc23ex8[_0x336f[9]],_0xc23ex8);MailServerOutEvents[_0x336f[10]](event,_0xc23ex8);_0xc23exa(null)}}module[_0x336f[11]]= MailServerOutEvents \ No newline at end of file +/** + * 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; 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 5865bc1..4b7bf76 100644 --- a/server/api/mail_server_out/mail_server_out.socket.js +++ b/server/api/mail_server_out/mail_server_out.socket.js @@ -1 +1,42 @@ -var _0xe747=["\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"];_0xe747[0];const MailServerOutEvents=require(_0xe747[1]);var events=[_0xe747[2],_0xe747[3]];exports[_0xe747[4]]= function(_0xe23dx3){for(var _0xe23dx4=0,_0xe23dx5=events[_0xe747[5]];_0xe23dx4< _0xe23dx5;_0xe23dx4++){var _0xe23dx6=events[_0xe23dx4];var _0xe23dx7=createListener(_0xe747[6]+ _0xe23dx6,_0xe23dx3);MailServerOutEvents[_0xe747[7]](_0xe23dx6,_0xe23dx7);_0xe23dx3[_0xe747[7]](_0xe747[8],removeListener(_0xe23dx6,_0xe23dx7))}};function createListener(_0xe23dx6,_0xe23dx3){return function(_0xe23dx9){switch(_0xe23dx6){case _0xe747[13]:if(_0xe23dx9[_0xe747[10]](_0xe747[9])){_0xe23dx3[_0xe747[12]](_0xe747[11],_0xe23dx9)}else {_0xe23dx3[_0xe747[12]](_0xe747[13],_0xe23dx9)};break;case _0xe747[14]:_0xe23dx3[_0xe747[12]](_0xe23dx6,_0xe23dx9);break;default:}}}function removeListener(_0xe23dx6,_0xe23dx7){return function(){MailServerOutEvents[_0xe747[15]](_0xe23dx6,_0xe23dx7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/metric/index.js b/server/api/metric/index.js index 2fe8dbb..b802bb1 100644 --- a/server/api/metric/index.js +++ b/server/api/metric/index.js @@ -1 +1,18 @@ -var _0xc681=["\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"];_0xc681[0];var express=require(_0xc681[1]);var controller=require(_0xc681[2]);var auth=require(_0xc681[3]);var router=express.Router();router[_0xc681[9]](_0xc681[4],auth[_0xc681[5]](),auth[_0xc681[7]]([17],[_0xc681[6]]),controller[_0xc681[8]]);router[_0xc681[9]](_0xc681[10],auth[_0xc681[5]](),auth[_0xc681[7]]([17],[_0xc681[6]]),controller[_0xc681[11]]);router[_0xc681[9]](_0xc681[12],auth[_0xc681[5]](),auth[_0xc681[7]]([17],[_0xc681[6]]),controller[_0xc681[13]]);router[_0xc681[15]](_0xc681[4],auth[_0xc681[5]](),auth[_0xc681[7]]([17],[_0xc681[6]]),controller[_0xc681[14]]);router[_0xc681[17]](_0xc681[12],auth[_0xc681[5]](),auth[_0xc681[7]]([17],[_0xc681[6]]),controller[_0xc681[16]]);router[_0xc681[18]](_0xc681[12],auth[_0xc681[5]](),auth[_0xc681[7]]([17],[_0xc681[6]]),controller[_0xc681[16]]);router[_0xc681[20]](_0xc681[4],auth[_0xc681[5]](),auth[_0xc681[7]]([17],[_0xc681[6]]),controller[_0xc681[19]]);router[_0xc681[20]](_0xc681[12],auth[_0xc681[5]](),auth[_0xc681[7]]([17],[_0xc681[6]]),controller[_0xc681[21]]);module[_0xc681[22]]= router \ No newline at end of file +'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; diff --git a/server/api/metric/metric.controller.js b/server/api/metric/metric.controller.js index 56f6a38..0b82a6a 100644 --- a/server/api/metric/metric.controller.js +++ b/server/api/metric/metric.controller.js @@ -1 +1,135 @@ -var _0xbffe=["\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"];_0xbffe[0];var _=require(_0xbffe[1]);var Metric=require(_0xbffe[3])[_0xbffe[2]];var util=require(_0xbffe[4]);var Util=require(_0xbffe[5]);var sequelize=require(_0xbffe[3])[_0xbffe[6]];exports[_0xbffe[7]]= function(_0xac5fx6,_0xac5fx7,_0xac5fx8){return Metric[_0xbffe[14]](Util[_0xbffe[13]](_0xac5fx6[_0xbffe[12]]))[_0xbffe[11]](function(_0xac5fxa){return _0xac5fx7[_0xbffe[10]](200)[_0xbffe[9]](_0xac5fxa)})[_0xbffe[8]](function(_0xac5fx9){return handleError(_0xac5fx7,_0xac5fx9)})};exports[_0xbffe[15]]= function(_0xac5fx6,_0xac5fx7){return Metric[_0xbffe[19]]({where:{table:_0xac5fx6[_0xbffe[12]][_0xbffe[18]]}})[_0xbffe[11]](function(_0xac5fxb){if(!_0xac5fxb){return _0xac5fx7[_0xbffe[16]](404)};return _0xac5fx7[_0xbffe[10]](200)[_0xbffe[9]]({count:_0xac5fxb[_0xbffe[17]],rows:_0xac5fxb})})[_0xbffe[8]](function(_0xac5fx9){return handleError(_0xac5fx7,_0xac5fx9)})};exports[_0xbffe[20]]= function(_0xac5fx6,_0xac5fx7){return Metric[_0xbffe[23]](_0xac5fx6[_0xbffe[22]][_0xbffe[21]])[_0xbffe[11]](function(_0xac5fxc){if(!_0xac5fxc){return _0xac5fx7[_0xbffe[16]](404)};return _0xac5fx7[_0xbffe[9]](_0xac5fxc)})[_0xbffe[8]](function(_0xac5fx9){return handleError(_0xac5fx7,_0xac5fx9)})};exports[_0xbffe[24]]= function(_0xac5fx6,_0xac5fx7){return Metric[_0xbffe[24]](_0xac5fx6[_0xbffe[29]])[_0xbffe[11]](function(_0xac5fxc){return _0xac5fx7[_0xbffe[10]](201)[_0xbffe[9]](_0xac5fxc)})[_0xbffe[8]](sequelize.UniqueConstraintError,function(_0xac5fx9){_0xac5fx9[_0xbffe[25]]= _0xbffe[26];_0xac5fx9[_0xbffe[27]]= _0xbffe[28];return _0xac5fx7[_0xbffe[10]](500)[_0xbffe[9]](_0xac5fx9)})[_0xbffe[8]](function(_0xac5fx9){return handleError(_0xac5fx7,_0xac5fx9)})};exports[_0xbffe[30]]= function(_0xac5fx6,_0xac5fx7){return Metric[_0xbffe[23]](_0xac5fx6[_0xbffe[22]][_0xbffe[21]])[_0xbffe[11]](function(_0xac5fxc){if(!_0xac5fxc){return _0xac5fx7[_0xbffe[16]](404)};var _0xac5fxd=_[_0xbffe[32]](_0xac5fxc,_0xac5fx6[_0xbffe[29]]);return _0xac5fxd[_0xbffe[33]]()})[_0xbffe[11]](function(){return _0xac5fx7[_0xbffe[16]](200)})[_0xbffe[8]](sequelize.UniqueConstraintError,function(_0xac5fx9){_0xac5fx9[_0xbffe[25]]= _0xbffe[26];_0xac5fx9[_0xbffe[27]]= _0xbffe[28];return _0xac5fx7[_0xbffe[10]](500)[_0xbffe[9]](_0xac5fx9)})[_0xbffe[8]](function(_0xac5fx9){console[_0xbffe[31]](_0xac5fx9);return handleError(_0xac5fx7,_0xac5fx9)})};exports[_0xbffe[34]]= function(_0xac5fx6,_0xac5fx7){return Metric[_0xbffe[23]](_0xac5fx6[_0xbffe[22]][_0xbffe[21]])[_0xbffe[11]](function(_0xac5fxc){if(!_0xac5fxc){return _0xac5fx7[_0xbffe[16]](404)};return _0xac5fxc[_0xbffe[34]]()})[_0xbffe[11]](function(){return _0xac5fx7[_0xbffe[16]](204)})[_0xbffe[8]](function(_0xac5fx9){return handleError(_0xac5fx7,_0xac5fx9)})};exports[_0xbffe[35]]= function(_0xac5fx6,_0xac5fx7){return Metric[_0xbffe[34]]({where:{id:_0xac5fx6[_0xbffe[12]][_0xbffe[36]]},individualHooks:true})[_0xbffe[11]](function(){return _0xac5fx7[_0xbffe[16]](204)})[_0xbffe[8]](function(_0xac5fx9){return handleError(_0xac5fx7,_0xac5fx9)})};function handleError(_0xac5fx7,_0xac5fx9){return _0xac5fx7[_0xbffe[10]](500)[_0xbffe[9]](_0xac5fx9)} \ No newline at end of file +'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); +} diff --git a/server/api/metric/metric.events.js b/server/api/metric/metric.events.js index 3ddc077..6aa5669 100644 --- a/server/api/metric/metric.events.js +++ b/server/api/metric/metric.events.js @@ -1 +1,36 @@ -var _0xcddd=["\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"];_0xcddd[0];const EventEmitter=require(_0xcddd[1]);const Metric=require(_0xcddd[3])[_0xcddd[2]];var MetricEvents= new EventEmitter();MetricEvents[_0xcddd[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xcddd[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xcddd[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xcddd[7]};for(var e in events){var event=events[e];Metric[_0xcddd[8]](e,emitEvent(event))};function emitEvent(event){return function(_0xd15ex8,_0xd15ex9,_0xd15exa){MetricEvents[_0xcddd[11]](event+ _0xcddd[9]+ _0xd15ex8[_0xcddd[10]],_0xd15ex8);MetricEvents[_0xcddd[11]](event,_0xd15ex8);_0xd15exa(null)}}module[_0xcddd[12]]= MetricEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/metric/metric.socket.js b/server/api/metric/metric.socket.js index 9a20265..80e152f 100644 --- a/server/api/metric/metric.socket.js +++ b/server/api/metric/metric.socket.js @@ -1 +1,54 @@ -var _0x1b8e=["\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"];_0x1b8e[0];const MetricEvents=require(_0x1b8e[1]);const ReportField=require(_0x1b8e[3])[_0x1b8e[2]];var events=[_0x1b8e[4],_0x1b8e[5]];exports[_0x1b8e[6]]= function(_0x53b9x4){for(var _0x53b9x5=0,_0x53b9x6=events[_0x1b8e[7]];_0x53b9x5< _0x53b9x6;_0x53b9x5++){var _0x53b9x7=events[_0x53b9x5];var _0x53b9x8=createListener(_0x1b8e[8]+ _0x53b9x7,_0x53b9x4);MetricEvents[_0x1b8e[9]](_0x53b9x7,_0x53b9x8);_0x53b9x4[_0x1b8e[9]](_0x1b8e[10],removeListener(_0x53b9x7,_0x53b9x8))}};function createListener(_0x53b9x7,_0x53b9x4){return function(_0x53b9xa){switch(_0x53b9x7){case _0x1b8e[12]:_0x53b9x4[_0x1b8e[11]](_0x53b9x7,_0x53b9xa);break;case _0x1b8e[13]:updateFields(_0x53b9xa);break;case _0x1b8e[14]:_0x53b9x4[_0x1b8e[11]](_0x53b9x7,_0x53b9xa);break;default:}}}function removeListener(_0x53b9x7,_0x53b9x8){return function(){MetricEvents[_0x1b8e[15]](_0x53b9x7,_0x53b9x8)}}function updateFields(_0x53b9xa){return ReportField[_0x1b8e[20]]({field:_0x53b9xa[_0x1b8e[18]]},{where:{MetricId:_0x53b9xa[_0x1b8e[19]]}})[_0x1b8e[17]](function(_0x53b9xd){console[_0x1b8e[16]](_0x53b9xd)})} \ No newline at end of file +'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); + }); +} diff --git a/server/api/module/index.js b/server/api/module/index.js index f39eae2..b57548b 100644 --- a/server/api/module/index.js +++ b/server/api/module/index.js @@ -1 +1,11 @@ -var _0x4f58=["\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"];_0x4f58[0];var express=require(_0x4f58[1]);var controller=require(_0x4f58[2]);var auth=require(_0x4f58[3]);var router=express.Router();router[_0x4f58[9]](_0x4f58[4],auth[_0x4f58[5]](),auth[_0x4f58[7]](_0x4f58[6]),controller[_0x4f58[8]]);module[_0x4f58[10]]= router \ No newline at end of file +'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; diff --git a/server/api/module/module.controller.js b/server/api/module/module.controller.js index 02c8389..5ccc934 100644 --- a/server/api/module/module.controller.js +++ b/server/api/module/module.controller.js @@ -1 +1,28 @@ -var _0x429a=["\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"];_0x429a[0];var _=require(_0x429a[1]);var Module=require(_0x429a[3])[_0x429a[2]];var util=require(_0x429a[4]);var Util=require(_0x429a[5]);var sequelize=require(_0x429a[3])[_0x429a[6]];exports[_0x429a[7]]= function(_0xb636x6,_0xb636x7,_0xb636x8){return Module[_0x429a[12]]({include:[{all:true}]})[_0x429a[11]](function(_0xb636xa){return _0xb636x7[_0x429a[10]](200)[_0x429a[9]](_0xb636xa)})[_0x429a[8]](function(_0xb636x9){return handleError(_0xb636x7,_0xb636x9)})};function handleError(_0xb636x7,_0xb636x9){return _0xb636x7[_0x429a[10]](500)[_0x429a[9]](_0xb636x9)} \ No newline at end of file +'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); +} diff --git a/server/api/module/module.events.js b/server/api/module/module.events.js index 7606131..2dbb456 100644 --- a/server/api/module/module.events.js +++ b/server/api/module/module.events.js @@ -1 +1,36 @@ -var _0xa20a=["\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"];_0xa20a[0];const EventEmitter=require(_0xa20a[1]);const Module=require(_0xa20a[3])[_0xa20a[2]];var ModuleEvents= new EventEmitter();ModuleEvents[_0xa20a[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xa20a[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xa20a[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xa20a[6]};for(var e in events){var event=events[e];Module[_0xa20a[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6393x8,_0x6393x9,_0x6393xa){ModuleEvents[_0xa20a[10]](event+ _0xa20a[8]+ _0x6393x8[_0xa20a[9]],_0x6393x8);ModuleEvents[_0xa20a[10]](event,_0x6393x8);_0x6393xa(null)}}module[_0xa20a[11]]= ModuleEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/module/module.socket.js b/server/api/module/module.socket.js index 1c86a4f..ebccd0c 100644 --- a/server/api/module/module.socket.js +++ b/server/api/module/module.socket.js @@ -1 +1,28 @@ -var _0x1200=["\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"];_0x1200[0];const ModuleEvents=require(_0x1200[1]);var events=[_0x1200[2],_0x1200[3]];exports[_0x1200[4]]= function(_0x6dbcx3){for(var _0x6dbcx4=0,_0x6dbcx5=events[_0x1200[5]];_0x6dbcx4< _0x6dbcx5;_0x6dbcx4++){var _0x6dbcx6=events[_0x6dbcx4];var _0x6dbcx7=createListener(_0x1200[6]+ _0x6dbcx6,_0x6dbcx3);ModuleEvents[_0x1200[7]](_0x6dbcx6,_0x6dbcx7);_0x6dbcx3[_0x1200[7]](_0x1200[8],removeListener(_0x6dbcx6,_0x6dbcx7))}};function createListener(_0x6dbcx6,_0x6dbcx3){return function(_0x6dbcx9){_0x6dbcx3[_0x1200[9]](_0x6dbcx6,_0x6dbcx9)}}function removeListener(_0x6dbcx6,_0x6dbcx7){return function(){ModuleEvents[_0x1200[10]](_0x6dbcx6,_0x6dbcx7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/motionbar/index.js b/server/api/motionbar/index.js index d8051f3..fd9d420 100644 --- a/server/api/motionbar/index.js +++ b/server/api/motionbar/index.js @@ -1 +1,11 @@ -var _0x7113=["\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"];_0x7113[0];var express=require(_0x7113[1]);var controller=require(_0x7113[2]);var auth=require(_0x7113[3]);var router=express.Router();router[_0x7113[7]](_0x7113[4],auth[_0x7113[5]](),controller[_0x7113[6]]);module[_0x7113[8]]= router \ No newline at end of file +'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; diff --git a/server/api/motionbar/motionbar.controller.js b/server/api/motionbar/motionbar.controller.js index 044478d..275d338 100644 --- a/server/api/motionbar/motionbar.controller.js +++ b/server/api/motionbar/motionbar.controller.js @@ -1 +1,32 @@ -var _0xa1fa=["\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"];_0xa1fa[0];var _=require(_0xa1fa[1]);var Motionbar=require(_0xa1fa[3])[_0xa1fa[2]];exports[_0xa1fa[4]]= function(_0x382bx3,_0x382bx4){if(!_0x382bx3[_0xa1fa[6]][_0xa1fa[5]]){return handleError(_0x382bx4,{message:_0xa1fa[7]})};_0x382bx3[_0xa1fa[9]][_0xa1fa[8]]= parseInt(_0x382bx3[_0xa1fa[6]][_0xa1fa[5]],10);_0x382bx3[_0xa1fa[9]][_0xa1fa[4]]= _0x382bx3[_0xa1fa[10]][_0xa1fa[4]];_0x382bx3[_0xa1fa[9]][_0xa1fa[11]]= _0x382bx3[_0xa1fa[10]][_0xa1fa[11]];_0x382bx3[_0xa1fa[9]][_0xa1fa[12]]= _0x382bx3[_0xa1fa[14]][_0xa1fa[13]];return Motionbar[_0xa1fa[19]](_0x382bx3[_0xa1fa[9]])[_0xa1fa[18]](function(_0x382bx6){return _0x382bx4[_0xa1fa[17]](201)[_0xa1fa[16]](_0x382bx6)})[_0xa1fa[15]](function(_0x382bx5){return handleError(_0x382bx4,_0x382bx5)})};function handleError(_0x382bx4,_0x382bx5){return _0x382bx4[_0xa1fa[17]](500)[_0xa1fa[16]](_0x382bx5)} \ No newline at end of file +'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); +} diff --git a/server/api/motionbar/motionbar.events.js b/server/api/motionbar/motionbar.events.js index 94dab39..f84fb17 100644 --- a/server/api/motionbar/motionbar.events.js +++ b/server/api/motionbar/motionbar.events.js @@ -1 +1,36 @@ -var _0xe521=["\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"];_0xe521[0];const EventEmitter=require(_0xe521[1]);const Motionbar=require(_0xe521[3])[_0xe521[2]];var MotionbarEvents= new EventEmitter();MotionbarEvents[_0xe521[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xe521[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xe521[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xe521[6]};for(var e in events){var event=events[e];Motionbar[_0xe521[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xb7bcx8,_0xb7bcx9,_0xb7bcxa){MotionbarEvents[_0xe521[10]](event+ _0xe521[8]+ _0xb7bcx8[_0xe521[9]],_0xb7bcx8);MotionbarEvents[_0xe521[10]](event,_0xb7bcx8);_0xb7bcxa(null)}}module[_0xe521[11]]= MotionbarEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/motionbar/motionbar.socket.js b/server/api/motionbar/motionbar.socket.js index 1f51a86..cf3aa56 100644 --- a/server/api/motionbar/motionbar.socket.js +++ b/server/api/motionbar/motionbar.socket.js @@ -1 +1,30 @@ -var _0xe4fb=["\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"];_0xe4fb[0];const MotionbarEvents=require(_0xe4fb[1]);var events=[_0xe4fb[2],_0xe4fb[3]];exports[_0xe4fb[4]]= function(_0x4704x3){for(var _0x4704x4=0,_0x4704x5=events[_0xe4fb[5]];_0x4704x4< _0x4704x5;_0x4704x4++){var _0x4704x6=events[_0x4704x4];var _0x4704x7=createListener(_0xe4fb[6]+ _0x4704x6,_0x4704x3);MotionbarEvents[_0xe4fb[7]](_0x4704x6,_0x4704x7);_0x4704x3[_0xe4fb[7]](_0xe4fb[8],removeListener(_0x4704x6,_0x4704x7))}};function createListener(_0x4704x6,_0x4704x3){return function(_0x4704x9){if(_0x4704x3[_0xe4fb[9]]== _0x4704x9[_0xe4fb[10]]){_0x4704x3[_0xe4fb[11]](_0x4704x6,_0x4704x9)}}}function removeListener(_0x4704x6,_0x4704x7){return function(){MotionbarEvents[_0xe4fb[12]](_0x4704x6,_0x4704x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/network_externip/index.js b/server/api/network_externip/index.js index ddc9c8a..c9daa97 100644 --- a/server/api/network_externip/index.js +++ b/server/api/network_externip/index.js @@ -1 +1,16 @@ -var _0x6a4f=["\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"];_0x6a4f[0];var express=require(_0x6a4f[1]);var auth=require(_0x6a4f[2]);var controller=require(_0x6a4f[3]);var router=express.Router();router[_0x6a4f[9]](_0x6a4f[4],auth[_0x6a4f[5]](),auth[_0x6a4f[7]](_0x6a4f[6]),controller[_0x6a4f[8]]);router[_0x6a4f[9]](_0x6a4f[10],auth[_0x6a4f[5]](),auth[_0x6a4f[7]](_0x6a4f[6]),controller[_0x6a4f[11]]);router[_0x6a4f[13]](_0x6a4f[4],auth[_0x6a4f[5]](),auth[_0x6a4f[7]](_0x6a4f[6]),controller[_0x6a4f[12]]);router[_0x6a4f[15]](_0x6a4f[10],auth[_0x6a4f[5]](),auth[_0x6a4f[7]](_0x6a4f[6]),controller[_0x6a4f[14]]);router[_0x6a4f[17]](_0x6a4f[4],auth[_0x6a4f[5]](),auth[_0x6a4f[7]](_0x6a4f[6]),controller[_0x6a4f[16]]);router[_0x6a4f[17]](_0x6a4f[10],auth[_0x6a4f[5]](),auth[_0x6a4f[7]](_0x6a4f[6]),controller[_0x6a4f[18]]);module[_0x6a4f[19]]= router \ No newline at end of file +'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; diff --git a/server/api/network_externip/network_externip.controller.js b/server/api/network_externip/network_externip.controller.js index c32d760..ecde7da 100644 --- a/server/api/network_externip/network_externip.controller.js +++ b/server/api/network_externip/network_externip.controller.js @@ -1 +1,131 @@ -var _0xc22a=["\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"];_0xc22a[0];var _=require(_0xc22a[1]);var Util=require(_0xc22a[2]);var NetworkExternip=require(_0xc22a[4])[_0xc22a[3]];function handleError(_0xff22x5,_0xff22x6){_0xff22x6= _0xff22x6|| 500;return function(_0xff22x7){_0xff22x5[_0xc22a[6]](_0xff22x6)[_0xc22a[5]](_0xff22x7)}}function responseWithResult(_0xff22x5,_0xff22x6){_0xff22x6= _0xff22x6|| 200;return function(_0xff22x9){if(_0xff22x9){_0xff22x5[_0xc22a[6]](_0xff22x6)[_0xc22a[7]](_0xff22x9)}}}function responseWithoutResult(_0xff22x5,_0xff22x6){_0xff22x6= _0xff22x6|| 204;return function(){_0xff22x5[_0xc22a[8]](_0xff22x6)}}function handleEntityNotFound(_0xff22x5){return function(_0xff22x9){if(!_0xff22x9){_0xff22x5[_0xc22a[6]](404)[_0xc22a[9]]();return null};return _0xff22x9}}function saveUpdates(_0xff22xd){return function(_0xff22x9){return _0xff22x9[_0xc22a[11]](_0xff22xd)[_0xc22a[10]](function(_0xff22xe){return _0xff22xe})}}function removeEntity(_0xff22x5){return function(_0xff22x9){if(_0xff22x9){return _0xff22x9[_0xc22a[12]]()[_0xc22a[10]](function(){_0xff22x5[_0xc22a[6]](204)[_0xc22a[9]]()})}}}exports[_0xc22a[13]]= function(_0xff22x10,_0xff22x5){return NetworkExternip[_0xc22a[19]](_0xc22a[18])[_0xc22a[17]](Util[_0xc22a[16]](_0xff22x10[_0xc22a[15]]))[_0xc22a[10]](responseWithResult(_0xff22x5))[_0xc22a[14]](handleError(_0xff22x5))};exports[_0xc22a[20]]= function(_0xff22x10,_0xff22x5){return NetworkExternip[_0xc22a[23]](_0xff22x10[_0xc22a[22]][_0xc22a[21]])[_0xc22a[10]](handleEntityNotFound(_0xff22x5))[_0xc22a[10]](responseWithResult(_0xff22x5))[_0xc22a[14]](handleError(_0xff22x5))};exports[_0xc22a[24]]= function(_0xff22x10,_0xff22x5){_0xff22x10[_0xc22a[26]][_0xc22a[25]]= _0xc22a[18];return NetworkExternip[_0xc22a[24]](_0xff22x10[_0xc22a[26]])[_0xc22a[10]](responseWithResult(_0xff22x5,201))[_0xc22a[14]](handleError(_0xff22x5))};exports[_0xc22a[27]]= function(_0xff22x10,_0xff22x5){if(_0xff22x10[_0xc22a[26]][_0xc22a[21]]){delete _0xff22x10[_0xc22a[26]][_0xc22a[21]]};return NetworkExternip[_0xc22a[23]](_0xff22x10[_0xc22a[22]][_0xc22a[21]])[_0xc22a[10]](handleEntityNotFound(_0xff22x5))[_0xc22a[10]](saveUpdates(_0xff22x10[_0xc22a[26]]))[_0xc22a[10]](responseWithResult(_0xff22x5))[_0xc22a[14]](handleError(_0xff22x5))};exports[_0xc22a[12]]= function(_0xff22x10,_0xff22x5){return NetworkExternip[_0xc22a[23]](_0xff22x10[_0xc22a[22]][_0xc22a[21]])[_0xc22a[10]](handleEntityNotFound(_0xff22x5))[_0xc22a[10]](removeEntity(_0xff22x5))[_0xc22a[14]](handleError(_0xff22x5))};exports[_0xc22a[28]]= function(_0xff22x10,_0xff22x5){return NetworkExternip[_0xc22a[12]]({where:{id:_0xff22x10[_0xc22a[15]][_0xc22a[29]]},individualHooks:true})[_0xc22a[10]](responseWithoutResult(_0xff22x5))[_0xc22a[14]](handleError(_0xff22x5))} \ No newline at end of file +/** + * 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)); +}; diff --git a/server/api/network_externip/network_externip.events.js b/server/api/network_externip/network_externip.events.js index 29483dc..c5f5cbe 100644 --- a/server/api/network_externip/network_externip.events.js +++ b/server/api/network_externip/network_externip.events.js @@ -1 +1,36 @@ -var _0x91ec=["\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"];_0x91ec[0];const EventEmitter=require(_0x91ec[1]);const Network=require(_0x91ec[3])[_0x91ec[2]];var NetworkEvents= new EventEmitter();NetworkEvents[_0x91ec[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x91ec[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x91ec[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x91ec[6]};for(var e in events){var event=events[e];Network[_0x91ec[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xc78bx8,_0xc78bx9,_0xc78bxa){NetworkEvents[_0x91ec[10]](event+ _0x91ec[8]+ _0xc78bx8[_0x91ec[9]],_0xc78bx8);NetworkEvents[_0x91ec[10]](event,_0xc78bx8);_0xc78bxa(null)}}module[_0x91ec[11]]= NetworkEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/network_externip/network_externip.socket.js b/server/api/network_externip/network_externip.socket.js index 78fcda3..9903ad0 100644 --- a/server/api/network_externip/network_externip.socket.js +++ b/server/api/network_externip/network_externip.socket.js @@ -1 +1,28 @@ -var _0xee2d=["\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"];_0xee2d[0];const NetworkExternipEvents=require(_0xee2d[1]);var events=[_0xee2d[2],_0xee2d[3]];exports[_0xee2d[4]]= function(_0x2668x3){for(var _0x2668x4=0,_0x2668x5=events[_0xee2d[5]];_0x2668x4< _0x2668x5;_0x2668x4++){var _0x2668x6=events[_0x2668x4];var _0x2668x7=createListener(_0xee2d[6]+ _0x2668x6,_0x2668x3);NetworkExternipEvents[_0xee2d[7]](_0x2668x6,_0x2668x7);_0x2668x3[_0xee2d[7]](_0xee2d[8],removeListener(_0x2668x6,_0x2668x7))}};function createListener(_0x2668x6,_0x2668x3){return function(_0x2668x9){_0x2668x3[_0xee2d[9]](_0x2668x6,_0x2668x9)}}function removeListener(_0x2668x6,_0x2668x7){return function(){NetworkExternipEvents[_0xee2d[10]](_0x2668x6,_0x2668x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/network_localnet/index.js b/server/api/network_localnet/index.js index f669fae..d372448 100644 --- a/server/api/network_localnet/index.js +++ b/server/api/network_localnet/index.js @@ -1 +1,16 @@ -var _0xf950=["\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"];_0xf950[0];var express=require(_0xf950[1]);var auth=require(_0xf950[2]);var controller=require(_0xf950[3]);var router=express.Router();router[_0xf950[9]](_0xf950[4],auth[_0xf950[5]](),auth[_0xf950[7]](_0xf950[6]),controller[_0xf950[8]]);router[_0xf950[9]](_0xf950[10],auth[_0xf950[5]](),auth[_0xf950[7]](_0xf950[6]),controller[_0xf950[11]]);router[_0xf950[13]](_0xf950[4],auth[_0xf950[5]](),auth[_0xf950[7]](_0xf950[6]),controller[_0xf950[12]]);router[_0xf950[15]](_0xf950[10],auth[_0xf950[5]](),auth[_0xf950[7]](_0xf950[6]),controller[_0xf950[14]]);router[_0xf950[17]](_0xf950[4],auth[_0xf950[5]](),auth[_0xf950[7]](_0xf950[6]),controller[_0xf950[16]]);router[_0xf950[17]](_0xf950[10],auth[_0xf950[5]](),auth[_0xf950[7]](_0xf950[6]),controller[_0xf950[18]]);module[_0xf950[19]]= router \ No newline at end of file +'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; diff --git a/server/api/network_localnet/network_localnet.controller.js b/server/api/network_localnet/network_localnet.controller.js index 7e7b17e..85e3150 100644 --- a/server/api/network_localnet/network_localnet.controller.js +++ b/server/api/network_localnet/network_localnet.controller.js @@ -1 +1,128 @@ -var _0x558a=["\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"];_0x558a[0];var _=require(_0x558a[1]);var Util=require(_0x558a[2]);var NetworkLocalnet=require(_0x558a[4])[_0x558a[3]];function handleError(_0xe7c1x5,_0xe7c1x6){_0xe7c1x6= _0xe7c1x6|| 500;return function(_0xe7c1x7){_0xe7c1x5[_0x558a[6]](_0xe7c1x6)[_0x558a[5]](_0xe7c1x7)}}function responseWithResult(_0xe7c1x5,_0xe7c1x6){_0xe7c1x6= _0xe7c1x6|| 200;return function(_0xe7c1x9){if(_0xe7c1x9){_0xe7c1x5[_0x558a[6]](_0xe7c1x6)[_0x558a[7]](_0xe7c1x9)}}}function responseWithoutResult(_0xe7c1x5,_0xe7c1x6){_0xe7c1x6= _0xe7c1x6|| 204;return function(){_0xe7c1x5[_0x558a[8]](_0xe7c1x6)}}function handleEntityNotFound(_0xe7c1x5){return function(_0xe7c1x9){if(!_0xe7c1x9){_0xe7c1x5[_0x558a[6]](404)[_0x558a[9]]();return null};return _0xe7c1x9}}function saveUpdates(_0xe7c1xd){return function(_0xe7c1x9){return _0xe7c1x9[_0x558a[11]](_0xe7c1xd)[_0x558a[10]](function(_0xe7c1xe){return _0xe7c1xe})}}function removeEntity(_0xe7c1x5){return function(_0xe7c1x9){if(_0xe7c1x9){return _0xe7c1x9[_0x558a[12]]()[_0x558a[10]](function(){_0xe7c1x5[_0x558a[6]](204)[_0x558a[9]]()})}}}exports[_0x558a[13]]= function(_0xe7c1x10,_0xe7c1x5){return NetworkLocalnet[_0x558a[19]](_0x558a[18])[_0x558a[17]](Util[_0x558a[16]](_0xe7c1x10[_0x558a[15]]))[_0x558a[10]](responseWithResult(_0xe7c1x5))[_0x558a[14]](handleError(_0xe7c1x5))};exports[_0x558a[20]]= function(_0xe7c1x10,_0xe7c1x5){return NetworkLocalnet[_0x558a[23]](_0xe7c1x10[_0x558a[22]][_0x558a[21]])[_0x558a[10]](handleEntityNotFound(_0xe7c1x5))[_0x558a[10]](responseWithResult(_0xe7c1x5))[_0x558a[14]](handleError(_0xe7c1x5))};exports[_0x558a[24]]= function(_0xe7c1x10,_0xe7c1x5){_0xe7c1x10[_0x558a[26]][_0x558a[25]]= _0x558a[18];return NetworkLocalnet[_0x558a[24]](_0xe7c1x10[_0x558a[26]])[_0x558a[10]](responseWithResult(_0xe7c1x5,201))[_0x558a[14]](handleError(_0xe7c1x5))};exports[_0x558a[27]]= function(_0xe7c1x10,_0xe7c1x5){if(_0xe7c1x10[_0x558a[26]][_0x558a[21]]){delete _0xe7c1x10[_0x558a[26]][_0x558a[21]]};return NetworkLocalnet[_0x558a[23]](_0xe7c1x10[_0x558a[22]][_0x558a[21]])[_0x558a[10]](handleEntityNotFound(_0xe7c1x5))[_0x558a[10]](saveUpdates(_0xe7c1x10[_0x558a[26]]))[_0x558a[10]](responseWithResult(_0xe7c1x5))[_0x558a[14]](handleError(_0xe7c1x5))};exports[_0x558a[12]]= function(_0xe7c1x10,_0xe7c1x5){return NetworkLocalnet[_0x558a[23]](_0xe7c1x10[_0x558a[22]][_0x558a[21]])[_0x558a[10]](handleEntityNotFound(_0xe7c1x5))[_0x558a[10]](removeEntity(_0xe7c1x5))[_0x558a[14]](handleError(_0xe7c1x5))};exports[_0x558a[28]]= function(_0xe7c1x10,_0xe7c1x5){return NetworkLocalnet[_0x558a[12]]({where:{id:_0xe7c1x10[_0x558a[15]][_0x558a[29]]},individualHooks:true})[_0x558a[10]](responseWithoutResult(_0xe7c1x5))[_0x558a[14]](handleError(_0xe7c1x5))} \ No newline at end of file +/** + * 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)); +}; diff --git a/server/api/network_localnet/network_localnet.events.js b/server/api/network_localnet/network_localnet.events.js index 25a6d03..c5f5cbe 100644 --- a/server/api/network_localnet/network_localnet.events.js +++ b/server/api/network_localnet/network_localnet.events.js @@ -1 +1,36 @@ -var _0x21d7=["\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"];_0x21d7[0];const EventEmitter=require(_0x21d7[1]);const Network=require(_0x21d7[3])[_0x21d7[2]];var NetworkEvents= new EventEmitter();NetworkEvents[_0x21d7[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x21d7[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x21d7[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x21d7[6]};for(var e in events){var event=events[e];Network[_0x21d7[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x19a5x8,_0x19a5x9,_0x19a5xa){NetworkEvents[_0x21d7[10]](event+ _0x21d7[8]+ _0x19a5x8[_0x21d7[9]],_0x19a5x8);NetworkEvents[_0x21d7[10]](event,_0x19a5x8);_0x19a5xa(null)}}module[_0x21d7[11]]= NetworkEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/network_localnet/network_localnet.socket.js b/server/api/network_localnet/network_localnet.socket.js index d792dc5..ccc151b 100644 --- a/server/api/network_localnet/network_localnet.socket.js +++ b/server/api/network_localnet/network_localnet.socket.js @@ -1 +1,28 @@ -var _0x4873=["\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"];_0x4873[0];const NetworkLocalnetEvents=require(_0x4873[1]);var events=[_0x4873[2],_0x4873[3]];exports[_0x4873[4]]= function(_0x30d6x3){for(var _0x30d6x4=0,_0x30d6x5=events[_0x4873[5]];_0x30d6x4< _0x30d6x5;_0x30d6x4++){var _0x30d6x6=events[_0x30d6x4];var _0x30d6x7=createListener(_0x4873[6]+ _0x30d6x6,_0x30d6x3);NetworkLocalnetEvents[_0x4873[7]](_0x30d6x6,_0x30d6x7);_0x30d6x3[_0x4873[7]](_0x4873[8],removeListener(_0x30d6x6,_0x30d6x7))}};function createListener(_0x30d6x6,_0x30d6x3){return function(_0x30d6x9){_0x30d6x3[_0x4873[9]](_0x30d6x6,_0x30d6x9)}}function removeListener(_0x30d6x6,_0x30d6x7){return function(){NetworkLocalnetEvents[_0x4873[10]](_0x30d6x6,_0x30d6x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/openchannel_account/index.js b/server/api/openchannel_account/index.js index 5fb6758..72240c7 100644 --- a/server/api/openchannel_account/index.js +++ b/server/api/openchannel_account/index.js @@ -1 +1,29 @@ -var _0x9799=["\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\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"];_0x9799[0];var express=require(_0x9799[1]);var auth=require(_0x9799[2]);var controller=require(_0x9799[3]);var license=require(_0x9799[4]);var router=express.Router();router[_0x9799[13]](_0x9799[5],license[_0x9799[6]](),license[_0x9799[7]](),auth[_0x9799[8]](),auth[_0x9799[11]]([20],[_0x9799[9],_0x9799[10]]),controller[_0x9799[12]]);router[_0x9799[13]](_0x9799[14],license[_0x9799[6]](),license[_0x9799[7]](),auth[_0x9799[8]](),auth[_0x9799[11]]([20],[_0x9799[9]]),controller[_0x9799[15]]);router[_0x9799[13]](_0x9799[16],license[_0x9799[6]](),license[_0x9799[7]](),auth[_0x9799[8]](),auth[_0x9799[11]]([20],[_0x9799[9]]),controller[_0x9799[17]]);router[_0x9799[13]](_0x9799[18],license[_0x9799[6]](),license[_0x9799[7]](),auth[_0x9799[8]](),auth[_0x9799[11]]([20],[_0x9799[9],_0x9799[10]]),controller[_0x9799[19]]);router[_0x9799[13]](_0x9799[20],license[_0x9799[6]](),license[_0x9799[7]](),auth[_0x9799[8]](),auth[_0x9799[11]]([20],[_0x9799[9],_0x9799[10]]),controller[_0x9799[21]]);router[_0x9799[23]](_0x9799[5],license[_0x9799[6]](),license[_0x9799[7]](),auth[_0x9799[8]](),auth[_0x9799[11]]([20],[_0x9799[9]]),controller[_0x9799[22]]);router[_0x9799[23]](_0x9799[20],license[_0x9799[6]](),license[_0x9799[7]](),auth[_0x9799[8]](),auth[_0x9799[11]]([20],[_0x9799[9]]),controller[_0x9799[24]]);router[_0x9799[23]](_0x9799[25],license[_0x9799[6]](),license[_0x9799[7]](),auth[_0x9799[8]](),auth[_0x9799[11]]([20],[_0x9799[9],_0x9799[10]]),controller[_0x9799[26]]);router[_0x9799[23]](_0x9799[27],license[_0x9799[6]](),controller[_0x9799[28]]);router[_0x9799[30]](_0x9799[14],license[_0x9799[6]](),license[_0x9799[7]](),auth[_0x9799[8]](),auth[_0x9799[11]]([20],[_0x9799[9]]),controller[_0x9799[29]]);router[_0x9799[30]](_0x9799[16],license[_0x9799[6]](),license[_0x9799[7]](),auth[_0x9799[8]](),auth[_0x9799[11]]([20],[_0x9799[9]]),controller[_0x9799[31]]);router[_0x9799[30]](_0x9799[32],license[_0x9799[6]](),license[_0x9799[7]](),auth[_0x9799[8]](),auth[_0x9799[11]]([20],[_0x9799[9]]),controller[_0x9799[33]]);router[_0x9799[30]](_0x9799[34],license[_0x9799[6]](),license[_0x9799[7]](),auth[_0x9799[8]](),auth[_0x9799[11]]([20],[_0x9799[9]]),controller[_0x9799[35]]);router[_0x9799[37]](_0x9799[14],license[_0x9799[6]](),license[_0x9799[7]](),auth[_0x9799[8]](),auth[_0x9799[11]]([20],[_0x9799[9]]),auth[_0x9799[11]]([20],[_0x9799[9]]),controller[_0x9799[36]]);router[_0x9799[37]](_0x9799[16],license[_0x9799[6]](),license[_0x9799[7]](),auth[_0x9799[8]](),auth[_0x9799[11]]([20],[_0x9799[9]]),controller[_0x9799[38]]);router[_0x9799[37]](_0x9799[32],license[_0x9799[6]](),license[_0x9799[7]](),auth[_0x9799[8]](),auth[_0x9799[11]]([20],[_0x9799[9]]),controller[_0x9799[39]]);router[_0x9799[37]](_0x9799[34],license[_0x9799[6]](),license[_0x9799[7]](),auth[_0x9799[8]](),auth[_0x9799[11]]([20],[_0x9799[9]]),controller[_0x9799[40]]);module[_0x9799[41]]= router \ No newline at end of file +'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/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; diff --git a/server/api/openchannel_account/openchannel_account.controller.js b/server/api/openchannel_account/openchannel_account.controller.js index 7ac59f1..967beb6 100644 --- a/server/api/openchannel_account/openchannel_account.controller.js +++ b/server/api/openchannel_account/openchannel_account.controller.js @@ -1 +1,523 @@ -var _0xd82b=["\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","\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"];_0xd82b[0];var _=require(_0xd82b[1]);var Util=require(_0xd82b[2]);var OpenchannelAccount=require(_0xd82b[4])[_0xd82b[3]];var sequelize=require(_0xd82b[4])[_0xd82b[5]];var User=require(_0xd82b[4])[_0xd82b[6]];var OpenchannelQueue=require(_0xd82b[4])[_0xd82b[7]];var OpenchannelApplication=require(_0xd82b[4])[_0xd82b[8]];var OpenchannelMessage=require(_0xd82b[4])[_0xd82b[9]];var OpenchannelRoom=require(_0xd82b[4])[_0xd82b[10]];var OpenchannelDisposition=require(_0xd82b[4])[_0xd82b[11]];var Contact=require(_0xd82b[4])[_0xd82b[12]];var Promise=require(_0xd82b[13]);var moment=require(_0xd82b[14]);function handleError(_0x199cxf,_0x199cx10){return _0x199cxf[_0xd82b[16]](500)[_0xd82b[15]](_0x199cx10)}exports[_0xd82b[17]]= function(_0x199cx11,_0x199cxf){return OpenchannelAccount[_0xd82b[22]](Util[_0xd82b[21]](_0x199cx11[_0xd82b[20]]))[_0xd82b[19]](function(_0x199cx12){_0x199cxf[_0xd82b[16]](200)[_0xd82b[15]](_0x199cx12)})[_0xd82b[18]](function(_0x199cx10){return handleError(_0x199cxf,_0x199cx10)})};exports[_0xd82b[23]]= function(_0x199cx11,_0x199cxf){return OpenchannelAccount[_0xd82b[27]](_0x199cx11[_0xd82b[26]][_0xd82b[25]])[_0xd82b[19]](function(_0x199cx13){if(!_0x199cx13){return _0x199cxf[_0xd82b[24]](404)};return _0x199cxf[_0xd82b[15]](_0x199cx13)})[_0xd82b[18]](function(_0x199cx10){return handleError(_0x199cxf,_0x199cx10)})};exports[_0xd82b[28]]= function(_0x199cx11,_0x199cxf,_0x199cx14){return OpenchannelAccount[_0xd82b[27]](_0x199cx11[_0xd82b[26]][_0xd82b[25]])[_0xd82b[19]](function(_0x199cx13){if(!_0x199cx13){return _0x199cxf[_0xd82b[24]](404)};return _0x199cx13[_0xd82b[30]]()})[_0xd82b[19]](function(_0x199cx15){return _0x199cxf[_0xd82b[16]](200)[_0xd82b[15]]({rows:_0x199cx15,count:_0x199cx15[_0xd82b[29]]})})[_0xd82b[18]](function(_0x199cx10){return handleError(_0x199cxf,_0x199cx10)})};exports[_0xd82b[31]]= function(_0x199cx11,_0x199cxf,_0x199cx14){return OpenchannelAccount[_0xd82b[37]](_0xd82b[36])[_0xd82b[27]](_0x199cx11[_0xd82b[26]][_0xd82b[25]])[_0xd82b[19]](function(_0x199cx13){if(!_0x199cx13){return _0x199cxf[_0xd82b[24]](404)};return _0x199cx13[_0xd82b[35]](_[_0xd82b[34]](Util[_0xd82b[21]](_0x199cx11[_0xd82b[20]]),{include:[{model:OpenchannelQueue,attributes:[_0xd82b[25],_0xd82b[32]]},{model:User,attributes:[_0xd82b[25],_0xd82b[32],_0xd82b[33]]}]}))})[_0xd82b[19]](function(_0x199cx16){return _0x199cxf[_0xd82b[15]]({count:_0x199cx16[_0xd82b[29]],rows:_0x199cx16})})[_0xd82b[18]](function(_0x199cx10){return handleError(_0x199cxf,_0x199cx10)})};exports[_0xd82b[38]]= function(_0x199cx11,_0x199cxf){return OpenchannelAccount[_0xd82b[38]](_0x199cx11[_0xd82b[41]])[_0xd82b[19]](function(_0x199cx13){return _0x199cxf[_0xd82b[16]](201)[_0xd82b[15]](_0x199cx13)})[_0xd82b[18]](sequelize.UniqueConstraintError,function(_0x199cx10){return Util[_0xd82b[40]][_0xd82b[39]](_0x199cxf,_0x199cx10)})[_0xd82b[18]](function(_0x199cx10){return handleError(_0x199cxf,_0x199cx10)})};exports[_0xd82b[42]]= function(_0x199cx11,_0x199cxf,_0x199cx14){_0x199cx11[_0xd82b[41]][_0xd82b[43]]= _0x199cx11[_0xd82b[26]][_0xd82b[25]];return OpenchannelDisposition[_0xd82b[38]](_0x199cx11[_0xd82b[41]])[_0xd82b[19]](function(_0x199cx17){return _0x199cxf[_0xd82b[16]](201)[_0xd82b[15]](_0x199cx17)})[_0xd82b[18]](function(_0x199cx10){return handleError(_0x199cxf,_0x199cx10)})};exports[_0xd82b[44]]= function(_0x199cx11,_0x199cxf,_0x199cx14){_0x199cx11[_0xd82b[41]][_0xd82b[43]]= _0x199cx11[_0xd82b[26]][_0xd82b[25]];_0x199cx11[_0xd82b[41]][_0xd82b[45]]= _0x199cx11[_0xd82b[46]][_0xd82b[25]];return OpenchannelMessage[_0xd82b[38]](_0x199cx11[_0xd82b[41]],{user:_0x199cx11[_0xd82b[46]]})[_0xd82b[19]](function(_0x199cx18){return _0x199cxf[_0xd82b[16]](201)[_0xd82b[15]](_0x199cx18)})[_0xd82b[18]](function(_0x199cx10){return handleError(_0x199cxf,_0x199cx10)})};exports[_0xd82b[47]]= function(_0x199cx11,_0x199cxf,_0x199cx14){if(_0x199cx11[_0xd82b[41]][_0xd82b[25]]){delete _0x199cx11[_0xd82b[41]][_0xd82b[25]]};var _0x199cx19=_0x199cx11[_0xd82b[41]];var _0x199cx1a;return OpenchannelAccount[_0xd82b[27]](_0x199cx11[_0xd82b[26]][_0xd82b[25]])[_0xd82b[19]](function(_0x199cx13){if(!_0x199cx13){throw new Error(_0xd82b[60])};_0x199cx1a= _0x199cx13;console[_0xd82b[48]](_0x199cx19);if(!_0x199cx19[_0xd82b[52]]){throw new Error(_0xd82b[61])};return OpenchannelRoom[_0xd82b[64]]({limit:1,where:{contact:_0x199cx19[_0xd82b[52]],OpenchannelAccountId:_0x199cx1a[_0xd82b[25]]},order:[[_0xd82b[62],_0xd82b[63]]]})})[_0xd82b[19]](function(_0x199cx1d){var _0x199cx1c=_0x199cx1d[0];if(!_0x199cx1c|| _0x199cx1c[_0xd82b[16]]== _0xd82b[51]){var _0x199cx1e=_0x199cx1c?_0x199cx1c[_0xd82b[25]]:null;return OpenchannelRoom[_0xd82b[38]]({contact:_0x199cx19[_0xd82b[52]],OpenchannelAccountId:_0x199cx1a[_0xd82b[25]],status:_0xd82b[53],ParentId:_0x199cx1e,lastEvent:_0xd82b[50],lastEventAt:moment()[_0xd82b[55]](_0xd82b[54]),openchannelIn:1})}else {return _0x199cx1c[_0xd82b[59]]({lastEvent:_0xd82b[50],lastEventAt:moment()[_0xd82b[55]](_0xd82b[54]),status:_0xd82b[56],openReason:_0xd82b[57],openchannelIn:++_0x199cx1c[_0xd82b[58]]})}})[_0xd82b[19]](function(_0x199cx1c){_0x199cx19[_0xd82b[43]]= _0x199cx1a[_0xd82b[25]];_0x199cx19[_0xd82b[49]]= _0x199cx1c[_0xd82b[25]];_0x199cx19[_0xd82b[16]]= _0xd82b[50];return OpenchannelMessage[_0xd82b[38]](_0x199cx19)})[_0xd82b[19]](function(_0x199cx1b){return _0x199cxf[_0xd82b[16]](201)[_0xd82b[15]](_0x199cx1b)})[_0xd82b[18]](function(_0x199cx10){console[_0xd82b[48]](_0x199cx10);return handleError(_0x199cxf,_0x199cx10)})};exports[_0xd82b[65]]= function(_0x199cx11,_0x199cxf){if(_0x199cx11[_0xd82b[41]][_0xd82b[25]]){delete _0x199cx11[_0xd82b[41]][_0xd82b[25]]};return OpenchannelAccount[_0xd82b[27]](_0x199cx11[_0xd82b[26]][_0xd82b[25]])[_0xd82b[19]](function(_0x199cx13){if(!_0x199cx13){return _0x199cxf[_0xd82b[24]](404)};var _0x199cx1f=_[_0xd82b[34]](_0x199cx13,_0x199cx11[_0xd82b[41]]);return _0x199cx1f[_0xd82b[67]]()})[_0xd82b[19]](function(_0x199cx13){return _0x199cxf[_0xd82b[16]](200)[_0xd82b[15]](_0x199cx13)})[_0xd82b[18]](sequelize.UniqueConstraintError,function(_0x199cx10){return Util[_0xd82b[40]][_0xd82b[39]](_0x199cxf,_0x199cx10)})[_0xd82b[18]](function(_0x199cx10){console[_0xd82b[48]](_0xd82b[66],_0x199cx10);return handleError(_0x199cxf,_0x199cx10)})};exports[_0xd82b[68]]= function(_0x199cx11,_0x199cxf){if(_0x199cx11[_0xd82b[41]][_0xd82b[25]]){delete _0x199cx11[_0xd82b[41]][_0xd82b[25]]};return OpenchannelDisposition[_0xd82b[27]](_0x199cx11[_0xd82b[26]][_0xd82b[69]])[_0xd82b[19]](function(_0x199cx20){if(!_0x199cx20){return _0x199cxf[_0xd82b[24]](404)};var _0x199cx1f=_[_0xd82b[34]](_0x199cx20,_0x199cx11[_0xd82b[41]]);return _0x199cx1f[_0xd82b[67]]()})[_0xd82b[19]](function(_0x199cx20){return _0x199cxf[_0xd82b[16]](200)[_0xd82b[15]](_0x199cx20)})[_0xd82b[18]](function(_0x199cx10){return handleError(_0x199cxf,_0x199cx10)})};exports[_0xd82b[70]]= function(_0x199cx11,_0x199cxf){var _0x199cx21=0;var _0x199cx22=_0x199cx11[_0xd82b[41]];_0x199cx22[_0xd82b[73]](function(_0x199cx23){delete _0x199cx23[_0xd82b[25]];delete _0x199cx23[_0xd82b[62]];delete _0x199cx23[_0xd82b[71]];_0x199cx23[_0xd82b[72]]= ++_0x199cx21});console[_0xd82b[48]](_0xd82b[74],_0x199cx11[_0xd82b[41]]);return sequelize[_0xd82b[77]](function(_0x199cx25){return OpenchannelApplication[_0xd82b[76]]({where:{OpenchannelAccountId:_0x199cx11[_0xd82b[26]][_0xd82b[25]]},individualHooks:true,transaction:_0x199cx25})[_0xd82b[19]](function(_0x199cx26){return OpenchannelApplication[_0xd82b[75]](_0x199cx22,{individualHooks:true,transaction:_0x199cx25})})})[_0xd82b[19]](function(_0x199cx24){return _0x199cxf[_0xd82b[16]](200)[_0xd82b[15]]({count:_0x199cx24[_0xd82b[29]],rows:_0x199cx24})})[_0xd82b[18]](function(_0x199cx10){return handleError(_0x199cxf,_0x199cx10)})};exports[_0xd82b[78]]= function(_0x199cx11,_0x199cxf){if(_0x199cx11[_0xd82b[41]][_0xd82b[25]]){delete _0x199cx11[_0xd82b[41]][_0xd82b[25]]};return OpenchannelApplication[_0xd82b[27]](_0x199cx11[_0xd82b[26]][_0xd82b[79]])[_0xd82b[19]](function(_0x199cx26){if(!_0x199cx26){return _0x199cxf[_0xd82b[24]](404)};var _0x199cx1f=_[_0xd82b[34]](_0x199cx26,_0x199cx11[_0xd82b[41]]);return _0x199cx1f[_0xd82b[67]]()})[_0xd82b[19]](function(_0x199cx26){return _0x199cxf[_0xd82b[16]](200)[_0xd82b[15]](_0x199cx26)})[_0xd82b[18]](function(_0x199cx10){return handleError(_0x199cxf,_0x199cx10)})};exports[_0xd82b[76]]= function(_0x199cx11,_0x199cxf){return OpenchannelAccount[_0xd82b[27]](_0x199cx11[_0xd82b[26]][_0xd82b[25]])[_0xd82b[19]](function(_0x199cx13){if(!_0x199cx13){return _0x199cxf[_0xd82b[24]](404)};return _0x199cx13[_0xd82b[76]]()})[_0xd82b[19]](function(){return _0x199cxf[_0xd82b[24]](204)})[_0xd82b[18]](function(_0x199cx10){return handleError(_0x199cxf,_0x199cx10)})};exports[_0xd82b[80]]= function(_0x199cx11,_0x199cxf,_0x199cx14){return OpenchannelApplication[_0xd82b[27]](_0x199cx11[_0xd82b[26]][_0xd82b[79]])[_0xd82b[19]](function(_0x199cx26){if(!_0x199cx26){return _0x199cxf[_0xd82b[24]](404)};return _0x199cx26[_0xd82b[76]]()})[_0xd82b[19]](function(){return _0x199cxf[_0xd82b[24]](204)})[_0xd82b[18]](function(_0x199cx10){return handleError(_0x199cxf,_0x199cx10)})};exports[_0xd82b[81]]= function(_0x199cx11,_0x199cxf,_0x199cx14){return OpenchannelDisposition[_0xd82b[27]](_0x199cx11[_0xd82b[26]][_0xd82b[69]])[_0xd82b[19]](function(_0x199cx17){if(!_0x199cx17){return _0x199cxf[_0xd82b[24]](404)};return _0x199cx17[_0xd82b[76]]()})[_0xd82b[19]](function(){return _0x199cxf[_0xd82b[24]](204)})[_0xd82b[18]](function(_0x199cx10){return handleError(_0x199cxf,_0x199cx10)})};exports[_0xd82b[82]]= function(_0x199cx11,_0x199cxf){return OpenchannelApplication[_0xd82b[76]]({where:{id:_0x199cx11[_0xd82b[20]][_0xd82b[83]]},individualHooks:true})[_0xd82b[19]](function(){return _0x199cxf[_0xd82b[24]](204)})[_0xd82b[18]](function(_0x199cx10){return handleError(_0x199cxf,_0x199cx10)})};exports[_0xd82b[84]]= function(_0x199cx11,_0x199cxf,_0x199cx14){var _0x199cx27={where:{OpenchannelAccountId:_0x199cx11[_0xd82b[26]][_0xd82b[25]],$and:[]},attributes:[_0xd82b[25],_0xd82b[85],_0xd82b[71],_0xd82b[86],_0xd82b[87],_0xd82b[88]],include:[]};if(_0x199cx11[_0xd82b[20]]){if(_0x199cx11[_0xd82b[20]][_0xd82b[86]]){if(_[_0xd82b[89]](_0x199cx11[_0xd82b[20]][_0xd82b[86]])){for(var _0x199cx28=0;_0x199cx28< _0x199cx11[_0xd82b[20]][_0xd82b[86]][_0xd82b[29]];_0x199cx28++){_0x199cx27[_0xd82b[93]][_0xd82b[92]][_0xd82b[91]]({tags:{$like:_0xd82b[90]+ _0x199cx11[_0xd82b[20]][_0xd82b[86]][_0x199cx28]+ _0xd82b[90]}})}}else {_0x199cx27[_0xd82b[93]][_0xd82b[92]][_0xd82b[91]]({tags:{$like:_0xd82b[90]+ _0x199cx11[_0xd82b[20]][_0xd82b[86]]+ _0xd82b[90]}})};delete _0x199cx11[_0xd82b[20]][_0xd82b[86]]};_[_0xd82b[34]](_0x199cx27[_0xd82b[93]],_0x199cx11[_0xd82b[20]])};switch(_0x199cx11[_0xd82b[46]][_0xd82b[103]]){case _0xd82b[96]:_0x199cx27[_0xd82b[94]][_0xd82b[91]]({model:User,attributes:[_0xd82b[25]]});var _0x199cx29;var _0x199cx2a;var _0x199cx2b;return User[_0xd82b[27]](_0x199cx11[_0xd82b[46]][_0xd82b[25]])[_0xd82b[19]](function(_0x199cx2e){if(_0x199cx2e){return _0x199cx2e[_0xd82b[102]]()}else {return []}})[_0xd82b[19]](function(_0x199cx2d){_0x199cx2a= _[_0xd82b[98]](_0x199cx2d,_0xd82b[25]);return OpenchannelAccount[_0xd82b[27]](_0x199cx11[_0xd82b[26]][_0xd82b[25]])})[_0xd82b[19]](function(_0x199cx12){return _0x199cx12[_0xd82b[35]]({where:{$or:[{app:_0xd82b[99]},{app:_0xd82b[96]}]}})})[_0xd82b[19]](function(_0x199cx22){_0x199cx29= _[_0xd82b[98]](_[_0xd82b[97]](_0x199cx22,{"\x61\x70\x70":_0xd82b[96]}),_0xd82b[45]);_0x199cx2b= _[_0xd82b[98]](_[_0xd82b[97]](_0x199cx22,{"\x61\x70\x70":_0xd82b[99]}),_0xd82b[100]);if(_[_0xd82b[101]](_0x199cx2a,_0x199cx2b)[_0xd82b[29]]|| _[_0xd82b[101]](_0x199cx29,[_0x199cx11[_0xd82b[46]][_0xd82b[25]]])[_0xd82b[29]]){return OpenchannelRoom[_0xd82b[64]](_0x199cx27)[_0xd82b[19]](function(_0x199cx2c){return _0x199cxf[_0xd82b[16]](200)[_0xd82b[15]](_0x199cx2c)})[_0xd82b[18]](function(_0x199cx10){console[_0xd82b[95]](_0x199cx10);return handleError(_0x199cxf,_0x199cx10)})}else {return _0x199cxf[_0xd82b[16]](200)[_0xd82b[15]]([])}})[_0xd82b[18]](function(_0x199cx10){console[_0xd82b[95]](_0x199cx10)});default:return OpenchannelRoom[_0xd82b[64]](_0x199cx27)[_0xd82b[19]](function(_0x199cx2c){return _0x199cxf[_0xd82b[16]](200)[_0xd82b[15]](_0x199cx2c)})[_0xd82b[18]](function(_0x199cx10){return handleError(_0x199cxf,_0x199cx10)})}} \ No newline at end of file +/** + * 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 Contact = require('../../models').Contact; +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'] + }] + })); + }) + .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); + }); + } + +}; diff --git a/server/api/openchannel_account/openchannel_account.events.js b/server/api/openchannel_account/openchannel_account.events.js index c33a2cc..cc2ccdb 100644 --- a/server/api/openchannel_account/openchannel_account.events.js +++ b/server/api/openchannel_account/openchannel_account.events.js @@ -1 +1,36 @@ -var _0x8eff=["\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"];_0x8eff[0];const EventEmitter=require(_0x8eff[1]);const OpenchannelAccount=require(_0x8eff[3])[_0x8eff[2]];var OpenchannelAccountEvents= new EventEmitter();OpenchannelAccountEvents[_0x8eff[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x8eff[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x8eff[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x8eff[6]};for(var e in events){var event=events[e];OpenchannelAccount[_0x8eff[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xb005x8,_0xb005x9,_0xb005xa){OpenchannelAccountEvents[_0x8eff[10]](event+ _0x8eff[8]+ _0xb005x8[_0x8eff[9]],_0xb005x8);OpenchannelAccountEvents[_0x8eff[10]](event,_0xb005x8);_0xb005xa(null)}}module[_0x8eff[11]]= OpenchannelAccountEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/openchannel_account/openchannel_account.socket.js b/server/api/openchannel_account/openchannel_account.socket.js index 503ff15..15f955e 100644 --- a/server/api/openchannel_account/openchannel_account.socket.js +++ b/server/api/openchannel_account/openchannel_account.socket.js @@ -1 +1,32 @@ -var _0x3016=["\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"];_0x3016[0];const OpenchannelAccountEvents=require(_0x3016[1]);var events=[_0x3016[2],_0x3016[3]];exports[_0x3016[4]]= function(_0xf606x3){for(var _0xf606x4=0,_0xf606x5=events[_0x3016[5]];_0xf606x4< _0xf606x5;_0xf606x4++){var _0xf606x6=events[_0xf606x4];var _0xf606x7=createListener(_0x3016[6]+ _0xf606x6,_0xf606x3);OpenchannelAccountEvents[_0x3016[7]](_0xf606x6,_0xf606x7);_0xf606x3[_0x3016[7]](_0x3016[8],removeListener(_0xf606x6,_0xf606x7))}};function createListener(_0xf606x6,_0xf606x3){return function(_0xf606x9){_0xf606x3[_0x3016[9]](_0xf606x6,_0xf606x9)}}function removeListener(_0xf606x6,_0xf606x7){return function(){OpenchannelAccountEvents[_0x3016[10]](_0xf606x6,_0xf606x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/openchannel_application/index.js b/server/api/openchannel_application/index.js index 9a8e39c..de6d7b3 100644 --- a/server/api/openchannel_application/index.js +++ b/server/api/openchannel_application/index.js @@ -1 +1,15 @@ -var _0xea67=["\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"];_0xea67[0];var express=require(_0xea67[1]);var auth=require(_0xea67[2]);var controller=require(_0xea67[3]);var license=require(_0xea67[4]);var router=express.Router();router[_0xea67[11]](_0xea67[5],auth[_0xea67[6]](),license[_0xea67[7]](),auth[_0xea67[9]]([20],[_0xea67[8]]),controller[_0xea67[10]]);router[_0xea67[11]](_0xea67[12],auth[_0xea67[6]](),license[_0xea67[7]](),auth[_0xea67[9]]([20],[_0xea67[8]]),controller[_0xea67[13]]);router[_0xea67[15]](_0xea67[5],auth[_0xea67[6]](),license[_0xea67[7]](),auth[_0xea67[9]]([20],[_0xea67[8]]),controller[_0xea67[14]]);router[_0xea67[17]](_0xea67[12],auth[_0xea67[6]](),license[_0xea67[7]](),auth[_0xea67[9]]([20],[_0xea67[8]]),controller[_0xea67[16]]);router[_0xea67[19]](_0xea67[12],auth[_0xea67[6]](),license[_0xea67[7]](),auth[_0xea67[9]]([20],[_0xea67[8]]),controller[_0xea67[18]]);module[_0xea67[20]]= router \ No newline at end of file +'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; diff --git a/server/api/openchannel_application/openchannel_application.controller.js b/server/api/openchannel_application/openchannel_application.controller.js index 486c64c..c47b66b 100644 --- a/server/api/openchannel_application/openchannel_application.controller.js +++ b/server/api/openchannel_application/openchannel_application.controller.js @@ -1 +1,129 @@ -var _0xb669=["\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"];_0xb669[0];var _=require(_0xb669[1]);var Util=require(_0xb669[2]);var OpenchannelApplication=require(_0xb669[4])[_0xb669[3]];function handleError(_0x407cx5,_0x407cx6){return _0x407cx5[_0xb669[6]](500)[_0xb669[5]](_0x407cx6)}exports[_0xb669[7]]= function(_0x407cx7,_0x407cx5){return OpenchannelApplication[_0xb669[12]]({where:_0x407cx7[_0xb669[10]],order:_0xb669[11],include:[{all:true}]})[_0xb669[9]](function(_0x407cx8){return _0x407cx5[_0xb669[6]](200)[_0xb669[5]](_0x407cx8)})[_0xb669[8]](function(_0x407cx6){return handleError(_0x407cx5,_0x407cx6)})};exports[_0xb669[13]]= function(_0x407cx7,_0x407cx5){return OpenchannelApplication[_0xb669[17]](_0x407cx7[_0xb669[16]][_0xb669[15]],{include:[{all:true}]})[_0xb669[9]](function(_0x407cx9){if(!_0x407cx9){return _0x407cx5[_0xb669[14]](404)};return _0x407cx5[_0xb669[5]](_0x407cx9)})[_0xb669[8]](function(_0x407cx6){return handleError(_0x407cx5,_0x407cx6)})};exports[_0xb669[18]]= function(_0x407cx7,_0x407cx5){return OpenchannelApplication[_0xb669[21]](_0xb669[11],{where:{OpenchannelAccountId:_0x407cx7[_0xb669[19]][_0xb669[20]]}})[_0xb669[9]](function(_0x407cxa){_0x407cx7[_0xb669[19]][_0xb669[11]]= _0x407cxa?++_0x407cxa:1;return OpenchannelApplication[_0xb669[18]](_0x407cx7[_0xb669[19]])})[_0xb669[9]](function(_0x407cx9){return _0x407cx5[_0xb669[6]](201)[_0xb669[5]](_0x407cx9)})[_0xb669[8]](function(_0x407cx6){return handleError(_0x407cx5,_0x407cx6)})};exports[_0xb669[22]]= function(_0x407cx7,_0x407cx5){if(_0x407cx7[_0xb669[19]][_0xb669[15]]){delete _0x407cx7[_0xb669[19]][_0xb669[15]]};return OpenchannelApplication[_0xb669[17]](_0x407cx7[_0xb669[16]][_0xb669[15]])[_0xb669[9]](function(_0x407cx9){if(!_0x407cx9){return _0x407cx5[_0xb669[14]](404)};var _0x407cxb=_[_0xb669[23]](_0x407cx9,_0x407cx7[_0xb669[19]]);return _0x407cxb[_0xb669[24]]()})[_0xb669[9]](function(_0x407cx9){return _0x407cx5[_0xb669[6]](200)[_0xb669[5]](_0x407cx9)})[_0xb669[8]](function(_0x407cx6){return handleError(_0x407cx5,_0x407cx6)})};exports[_0xb669[25]]= function(_0x407cx7,_0x407cx5){return OpenchannelApplication[_0xb669[17]](_0x407cx7[_0xb669[16]][_0xb669[15]])[_0xb669[9]](function(_0x407cx9){if(!_0x407cx9){return _0x407cx5[_0xb669[14]](404)};return _0x407cx9[_0xb669[25]]()})[_0xb669[9]](function(){return _0x407cx5[_0xb669[14]](204)})[_0xb669[8]](function(_0x407cx6){return handleError(_0x407cx5,_0x407cx6)})} \ No newline at end of file +/** + * 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); + }); +} diff --git a/server/api/openchannel_application/openchannel_application.events.js b/server/api/openchannel_application/openchannel_application.events.js index c996ca2..13b8c25 100644 --- a/server/api/openchannel_application/openchannel_application.events.js +++ b/server/api/openchannel_application/openchannel_application.events.js @@ -1 +1,36 @@ -var _0x936a=["\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"];_0x936a[0];const EventEmitter=require(_0x936a[1]);const OpenchannelApplication=require(_0x936a[3])[_0x936a[2]];var OpenchannelApplicationEvents= new EventEmitter();OpenchannelApplicationEvents[_0x936a[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x936a[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x936a[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x936a[6]};for(var e in events){var event=events[e];OpenchannelApplication[_0x936a[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x9925x8,_0x9925x9,_0x9925xa){OpenchannelApplicationEvents[_0x936a[10]](event+ _0x936a[8]+ _0x9925x8[_0x936a[9]],_0x9925x8);OpenchannelApplicationEvents[_0x936a[10]](event,_0x9925x8);_0x9925xa(null)}}module[_0x936a[11]]= OpenchannelApplicationEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/openchannel_application/openchannel_application.socket.js b/server/api/openchannel_application/openchannel_application.socket.js index 6ed4bc5..d8ab577 100644 --- a/server/api/openchannel_application/openchannel_application.socket.js +++ b/server/api/openchannel_application/openchannel_application.socket.js @@ -1 +1,32 @@ -var _0x3d29=["\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"];_0x3d29[0];const OpenchannelApplicationEvents=require(_0x3d29[1]);var events=[_0x3d29[2],_0x3d29[3]];exports[_0x3d29[4]]= function(_0x56b4x3){for(var _0x56b4x4=0,_0x56b4x5=events[_0x3d29[5]];_0x56b4x4< _0x56b4x5;_0x56b4x4++){var _0x56b4x6=events[_0x56b4x4];var _0x56b4x7=createListener(_0x3d29[6]+ _0x56b4x6,_0x56b4x3);OpenchannelApplicationEvents[_0x3d29[7]](_0x56b4x6,_0x56b4x7);_0x56b4x3[_0x3d29[7]](_0x3d29[8],removeListener(_0x56b4x6,_0x56b4x7))}};function createListener(_0x56b4x6,_0x56b4x3){return function(_0x56b4x9){_0x56b4x3[_0x3d29[9]](_0x56b4x6,_0x56b4x9)}}function removeListener(_0x56b4x6,_0x56b4x7){return function(){OpenchannelApplicationEvents[_0x3d29[10]](_0x56b4x6,_0x56b4x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/openchannel_disposition/index.js b/server/api/openchannel_disposition/index.js index 8ec4616..b10f1c8 100644 --- a/server/api/openchannel_disposition/index.js +++ b/server/api/openchannel_disposition/index.js @@ -1 +1,16 @@ -var _0xd70c=["\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"];_0xd70c[0];var express=require(_0xd70c[1]);var controller=require(_0xd70c[2]);var auth=require(_0xd70c[3]);var router=express.Router();router[_0xd70c[7]](_0xd70c[4],auth[_0xd70c[5]](),controller[_0xd70c[6]]);router[_0xd70c[7]](_0xd70c[8],auth[_0xd70c[5]](),controller[_0xd70c[9]]);router[_0xd70c[11]](_0xd70c[4],auth[_0xd70c[5]](),controller[_0xd70c[10]]);router[_0xd70c[13]](_0xd70c[8],auth[_0xd70c[5]](),controller[_0xd70c[12]]);router[_0xd70c[14]](_0xd70c[8],auth[_0xd70c[5]](),controller[_0xd70c[12]]);router[_0xd70c[16]](_0xd70c[8],auth[_0xd70c[5]](),controller[_0xd70c[15]]);module[_0xd70c[17]]= router \ No newline at end of file +'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; diff --git a/server/api/openchannel_disposition/openchannel_disposition.controller.js b/server/api/openchannel_disposition/openchannel_disposition.controller.js index 350f632..fb1250f 100644 --- a/server/api/openchannel_disposition/openchannel_disposition.controller.js +++ b/server/api/openchannel_disposition/openchannel_disposition.controller.js @@ -1 +1,110 @@ -var _0xfe50=["\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"];_0xfe50[0];var _=require(_0xfe50[1]);var Util=require(_0xfe50[2]);var OpenchannelDisposition=require(_0xfe50[4])[_0xfe50[3]];function handleError(_0x280bx5,_0x280bx6){_0x280bx6= _0x280bx6|| 500;return function(_0x280bx7){_0x280bx5[_0xfe50[6]](_0x280bx6)[_0xfe50[5]](_0x280bx7)}}function responseWithResult(_0x280bx5,_0x280bx6){_0x280bx6= _0x280bx6|| 200;return function(_0x280bx9){if(_0x280bx9){_0x280bx5[_0xfe50[6]](_0x280bx6)[_0xfe50[7]](_0x280bx9)}}}function handleEntityNotFound(_0x280bx5){return function(_0x280bx9){if(!_0x280bx9){_0x280bx5[_0xfe50[6]](404)[_0xfe50[8]]();return null};return _0x280bx9}}function saveUpdates(_0x280bxc){return function(_0x280bx9){return _0x280bx9[_0xfe50[10]](_0x280bxc)[_0xfe50[9]](function(_0x280bxd){return _0x280bxd})}}function removeEntity(_0x280bx5){return function(_0x280bx9){if(_0x280bx9){return _0x280bx9[_0xfe50[11]]()[_0xfe50[9]](function(){_0x280bx5[_0xfe50[6]](204)[_0xfe50[8]]()})}}}exports[_0xfe50[12]]= function(_0x280bxf,_0x280bx5){OpenchannelDisposition[_0xfe50[14]]()[_0xfe50[9]](responseWithResult(_0x280bx5))[_0xfe50[13]](handleError(_0x280bx5))};exports[_0xfe50[15]]= function(_0x280bxf,_0x280bx5){OpenchannelDisposition[_0xfe50[18]](_0x280bxf[_0xfe50[17]][_0xfe50[16]])[_0xfe50[9]](handleEntityNotFound(_0x280bx5))[_0xfe50[9]](responseWithResult(_0x280bx5))[_0xfe50[13]](handleError(_0x280bx5))};exports[_0xfe50[19]]= function(_0x280bxf,_0x280bx5){OpenchannelDisposition[_0xfe50[19]](_0x280bxf[_0xfe50[20]])[_0xfe50[9]](responseWithResult(_0x280bx5,201))[_0xfe50[13]](handleError(_0x280bx5))};exports[_0xfe50[21]]= function(_0x280bxf,_0x280bx5){if(_0x280bxf[_0xfe50[20]][_0xfe50[16]]){delete _0x280bxf[_0xfe50[20]][_0xfe50[16]]};OpenchannelDisposition[_0xfe50[18]](_0x280bxf[_0xfe50[17]][_0xfe50[16]])[_0xfe50[9]](handleEntityNotFound(_0x280bx5))[_0xfe50[9]](saveUpdates(_0x280bxf[_0xfe50[20]]))[_0xfe50[9]](responseWithResult(_0x280bx5))[_0xfe50[13]](handleError(_0x280bx5))};exports[_0xfe50[11]]= function(_0x280bxf,_0x280bx5){OpenchannelDisposition[_0xfe50[18]](_0x280bxf[_0xfe50[17]][_0xfe50[16]])[_0xfe50[9]](handleEntityNotFound(_0x280bx5))[_0xfe50[9]](removeEntity(_0x280bx5))[_0xfe50[13]](handleError(_0x280bx5))} \ No newline at end of file +/** + * 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)); +} diff --git a/server/api/openchannel_disposition/openchannel_disposition.events.js b/server/api/openchannel_disposition/openchannel_disposition.events.js index a11c8bf..178c511 100644 --- a/server/api/openchannel_disposition/openchannel_disposition.events.js +++ b/server/api/openchannel_disposition/openchannel_disposition.events.js @@ -1 +1,36 @@ -var _0xb06e=["\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"];_0xb06e[0];const EventEmitter=require(_0xb06e[1]);const OpenchannelDisposition=require(_0xb06e[3])[_0xb06e[2]];var OpenchannelDispositionEvents= new EventEmitter();OpenchannelDispositionEvents[_0xb06e[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xb06e[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xb06e[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xb06e[6]};for(var e in events){var event=events[e];OpenchannelDisposition[_0xb06e[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x1d8ax8,_0x1d8ax9,_0x1d8axa){OpenchannelDispositionEvents[_0xb06e[10]](event+ _0xb06e[8]+ _0x1d8ax8[_0xb06e[9]],_0x1d8ax8);OpenchannelDispositionEvents[_0xb06e[10]](event,_0x1d8ax8);_0x1d8axa(null)}}module[_0xb06e[11]]= OpenchannelDispositionEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/openchannel_disposition/openchannel_disposition.socket.js b/server/api/openchannel_disposition/openchannel_disposition.socket.js index 2b5a02a..960c110 100644 --- a/server/api/openchannel_disposition/openchannel_disposition.socket.js +++ b/server/api/openchannel_disposition/openchannel_disposition.socket.js @@ -1 +1,32 @@ -var _0xe568=["\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"];_0xe568[0];const OpenchannelDispositionEvents=require(_0xe568[1]);var events=[_0xe568[2],_0xe568[3]];exports[_0xe568[4]]= function(_0x7bdbx3){for(var _0x7bdbx4=0,_0x7bdbx5=events[_0xe568[5]];_0x7bdbx4< _0x7bdbx5;_0x7bdbx4++){var _0x7bdbx6=events[_0x7bdbx4];var _0x7bdbx7=createListener(_0xe568[6]+ _0x7bdbx6,_0x7bdbx3);OpenchannelDispositionEvents[_0xe568[7]](_0x7bdbx6,_0x7bdbx7);_0x7bdbx3[_0xe568[7]](_0xe568[8],removeListener(_0x7bdbx6,_0x7bdbx7))}};function createListener(_0x7bdbx6,_0x7bdbx3){return function(_0x7bdbx9){_0x7bdbx3[_0xe568[9]](_0x7bdbx6,_0x7bdbx9)}}function removeListener(_0x7bdbx6,_0x7bdbx7){return function(){OpenchannelDispositionEvents[_0xe568[10]](_0x7bdbx6,_0x7bdbx7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/openchannel_message/index.js b/server/api/openchannel_message/index.js index 52f96a9..fb26cb8 100644 --- a/server/api/openchannel_message/index.js +++ b/server/api/openchannel_message/index.js @@ -1 +1,18 @@ -var _0x48ec=["\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"];_0x48ec[0];var express=require(_0x48ec[1]);var auth=require(_0x48ec[2]);var controller=require(_0x48ec[3]);var license=require(_0x48ec[4]);var router=express.Router();router[_0x48ec[11]](_0x48ec[5],auth[_0x48ec[6]](),license[_0x48ec[7]](),auth[_0x48ec[9]]([20],[_0x48ec[8]]),controller[_0x48ec[10]]);router[_0x48ec[11]](_0x48ec[12],auth[_0x48ec[6]](),license[_0x48ec[7]](),auth[_0x48ec[9]]([20],[_0x48ec[8]]),controller[_0x48ec[13]]);router[_0x48ec[11]](_0x48ec[14],auth[_0x48ec[6]](),license[_0x48ec[7]](),auth[_0x48ec[9]]([20],[_0x48ec[8],_0x48ec[15]]),controller[_0x48ec[16]]);router[_0x48ec[18]](_0x48ec[5],auth[_0x48ec[6]](),license[_0x48ec[7]](),auth[_0x48ec[9]]([20],[_0x48ec[8]]),controller[_0x48ec[17]]);router[_0x48ec[20]](_0x48ec[14],auth[_0x48ec[6]](),license[_0x48ec[7]](),auth[_0x48ec[9]]([20],[_0x48ec[8]]),controller[_0x48ec[19]]);router[_0x48ec[22]](_0x48ec[14],auth[_0x48ec[6]](),license[_0x48ec[7]](),auth[_0x48ec[9]]([20],[_0x48ec[8]]),controller[_0x48ec[21]]);router[_0x48ec[22]](_0x48ec[5],auth[_0x48ec[6]](),license[_0x48ec[7]](),auth[_0x48ec[9]]([20],[_0x48ec[8]]),controller[_0x48ec[23]]);module[_0x48ec[24]]= router \ No newline at end of file +'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; diff --git a/server/api/openchannel_message/openchannel_message.controller.js b/server/api/openchannel_message/openchannel_message.controller.js index dccdc90..17f68b9 100644 --- a/server/api/openchannel_message/openchannel_message.controller.js +++ b/server/api/openchannel_message/openchannel_message.controller.js @@ -1 +1,170 @@ -var _0xd876=["\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"];_0xd876[0];var _=require(_0xd876[1]);var Util=require(_0xd876[2]);var OpenchannelMessage=require(_0xd876[4])[_0xd876[3]];var OpenchannelRoom=require(_0xd876[4])[_0xd876[5]];var User=require(_0xd876[4])[_0xd876[6]];function handleError(_0x79f4x7,_0x79f4x8){return _0x79f4x7[_0xd876[8]](500)[_0xd876[7]](_0x79f4x8)}exports[_0xd876[9]]= function(_0x79f4x9,_0x79f4x7){var _0x79f4xa={order:_0xd876[10],include:[{all:true,include:[{all:true}]}]};switch(_0x79f4x9[_0xd876[16]][_0xd876[15]]){case _0xd876[13]:_0x79f4xa[_0xd876[11]]= _0x79f4x9[_0xd876[12]];break;case _0xd876[14]:break;default:};return OpenchannelMessage[_0xd876[19]](_0x79f4xa)[_0xd876[18]](function(_0x79f4xb){return _0x79f4x7[_0xd876[8]](200)[_0xd876[7]](_0x79f4xb)})[_0xd876[17]](function(_0x79f4x8){return handleError(_0x79f4x7,_0x79f4x8)})};exports[_0xd876[20]]= function(_0x79f4x9,_0x79f4x7){return OpenchannelMessage[_0xd876[20]]()[_0xd876[18]](function(_0x79f4xc){return _0x79f4x7[_0xd876[8]](200)[_0xd876[7]](_0x79f4xc)})[_0xd876[17]](function(_0x79f4x8){return handleError(_0x79f4x7,_0x79f4x8)})};exports[_0xd876[21]]= function(_0x79f4x9,_0x79f4x7){return OpenchannelMessage[_0xd876[28]](_0x79f4x9[_0xd876[24]][_0xd876[23]],{include:[{model:User,attributes:[_0xd876[23],_0xd876[25],_0xd876[26],_0xd876[27]]}]})[_0xd876[18]](function(_0x79f4xd){if(!_0x79f4xd){return _0x79f4x7[_0xd876[22]](404)};return _0x79f4x7[_0xd876[7]](_0x79f4xd)})[_0xd876[17]](function(_0x79f4x8){return handleError(_0x79f4x7,_0x79f4x8)})};exports[_0xd876[29]]= function(_0x79f4x9,_0x79f4x7){_0x79f4x9[_0xd876[31]][_0xd876[30]]= _0x79f4x9[_0xd876[16]][_0xd876[23]];return OpenchannelMessage[_0xd876[29]](_0x79f4x9[_0xd876[31]])[_0xd876[18]](function(_0x79f4xd){return _0x79f4x7[_0xd876[8]](201)[_0xd876[7]](_0x79f4xd)})[_0xd876[17]](function(_0x79f4x8){return handleError(_0x79f4x7,_0x79f4x8)})};exports[_0xd876[32]]= function(_0x79f4x9,_0x79f4x7){if(_0x79f4x9[_0xd876[31]][_0xd876[23]]){delete _0x79f4x9[_0xd876[31]][_0xd876[23]]};return OpenchannelMessage[_0xd876[28]](_0x79f4x9[_0xd876[24]][_0xd876[23]],{include:[{all:true}]})[_0xd876[18]](function(_0x79f4xd){if(!_0x79f4xd){return _0x79f4x7[_0xd876[22]](404)};var _0x79f4xe=_[_0xd876[33]](_0x79f4xd,_0x79f4x9[_0xd876[31]]);return _0x79f4xe[_0xd876[34]]()})[_0xd876[18]](function(_0x79f4xe){return _0x79f4x7[_0xd876[8]](200)[_0xd876[7]](_0x79f4xe)})[_0xd876[17]](function(_0x79f4x8){return handleError(_0x79f4x7,_0x79f4x8)})};exports[_0xd876[35]]= function(_0x79f4x9,_0x79f4x7){return OpenchannelMessage[_0xd876[28]](_0x79f4x9[_0xd876[24]][_0xd876[23]])[_0xd876[18]](function(_0x79f4xd){if(!_0x79f4xd){return _0x79f4x7[_0xd876[22]](404)};return _0x79f4xd[_0xd876[35]]()})[_0xd876[18]](function(){return _0x79f4x7[_0xd876[22]](204)})[_0xd876[17]](function(_0x79f4x8){return handleError(_0x79f4x7,_0x79f4x8)})};exports[_0xd876[36]]= function(_0x79f4x9,_0x79f4x7){return OpenchannelMessage[_0xd876[38]]({where:{id:{$in:_0x79f4x9[_0xd876[31]][_0xd876[23]]}},attributes:{directory:_0xd876[37]}})[_0xd876[18]](function(_0x79f4xd){if(!_0x79f4xd){return _0x79f4x7[_0xd876[22]](404)};return _0x79f4xd[_0xd876[35]]()})[_0xd876[18]](function(){return _0x79f4x7[_0xd876[22]](204)})[_0xd876[17]](function(_0x79f4x8){return handleError(_0x79f4x7,_0x79f4x8)})} \ No newline at end of file +/** + * 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); + }); +}; diff --git a/server/api/openchannel_message/openchannel_message.events.js b/server/api/openchannel_message/openchannel_message.events.js index 1d21669..5095912 100644 --- a/server/api/openchannel_message/openchannel_message.events.js +++ b/server/api/openchannel_message/openchannel_message.events.js @@ -1 +1,36 @@ -var _0xc02d=["\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"];_0xc02d[0];const EventEmitter=require(_0xc02d[1]);const OpenchannelMessage=require(_0xc02d[3])[_0xc02d[2]];var OpenchannelMessageEvents= new EventEmitter();OpenchannelMessageEvents[_0xc02d[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xc02d[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xc02d[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xc02d[7]};for(var e in events){var event=events[e];OpenchannelMessage[_0xc02d[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x3e90x8,_0x3e90x9,_0x3e90xa){OpenchannelMessageEvents[_0xc02d[11]](event+ _0xc02d[9]+ _0x3e90x8[_0xc02d[10]],_0x3e90x8);OpenchannelMessageEvents[_0xc02d[11]](event,_0x3e90x8);_0x3e90xa(null)}}module[_0xc02d[12]]= OpenchannelMessageEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/openchannel_message/openchannel_message.socket.js b/server/api/openchannel_message/openchannel_message.socket.js index 0030022..0f942a5 100644 --- a/server/api/openchannel_message/openchannel_message.socket.js +++ b/server/api/openchannel_message/openchannel_message.socket.js @@ -1 +1,47 @@ -var _0x2bc2=["\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"];_0x2bc2[0];const OpenchannelMessageEvents=require(_0x2bc2[1]);var events=[_0x2bc2[2],_0x2bc2[3],_0x2bc2[4]];exports[_0x2bc2[5]]= function(_0x47f7x3){for(var _0x47f7x4=0,_0x47f7x5=events[_0x2bc2[6]];_0x47f7x4< _0x47f7x5;_0x47f7x4++){var _0x47f7x6=events[_0x47f7x4];var _0x47f7x7=createListener(_0x2bc2[7]+ _0x47f7x6,_0x47f7x3);OpenchannelMessageEvents[_0x2bc2[8]](_0x47f7x6,_0x47f7x7);_0x47f7x3[_0x2bc2[8]](_0x2bc2[9],removeListener(_0x47f7x6,_0x47f7x7))}};function createListener(_0x47f7x6,_0x47f7x3){return function(_0x47f7x9){switch(_0x47f7x6){case _0x2bc2[11]:_0x47f7x3[_0x2bc2[10]](_0x47f7x6,_0x47f7x9);break;case _0x2bc2[14]:if(_0x47f7x9[_0x2bc2[13]](_0x2bc2[12])){_0x47f7x3[_0x2bc2[10]](_0x47f7x6,_0x47f7x9)};break;case _0x2bc2[15]:_0x47f7x3[_0x2bc2[10]](_0x47f7x6,_0x47f7x9);break;default:}}}function removeListener(_0x47f7x6,_0x47f7x7){return function(){OpenchannelMessageEvents[_0x2bc2[16]](_0x47f7x6,_0x47f7x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/openchannel_queue/index.js b/server/api/openchannel_queue/index.js index 842a39d..65d3d56 100644 --- a/server/api/openchannel_queue/index.js +++ b/server/api/openchannel_queue/index.js @@ -1 +1,22 @@ -var _0xdf73=["\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\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","\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"];_0xdf73[0];var express=require(_0xdf73[1]);var auth=require(_0xdf73[2]);var controller=require(_0xdf73[3]);var license=require(_0xdf73[4]);var router=express.Router();router[_0xdf73[11]](_0xdf73[5],auth[_0xdf73[6]](),license[_0xdf73[7]](),auth[_0xdf73[9]]([20],[_0xdf73[8]]),controller[_0xdf73[10]]);router[_0xdf73[11]](_0xdf73[12],auth[_0xdf73[6]](),license[_0xdf73[7]](),auth[_0xdf73[9]]([20],[_0xdf73[8]]),controller[_0xdf73[13]]);router[_0xdf73[11]](_0xdf73[14],auth[_0xdf73[6]](),license[_0xdf73[7]](),auth[_0xdf73[9]]([20],[_0xdf73[8]]),controller[_0xdf73[15]]);router[_0xdf73[17]](_0xdf73[5],auth[_0xdf73[6]](),license[_0xdf73[7]](),auth[_0xdf73[9]]([20],[_0xdf73[8]]),controller[_0xdf73[16]]);router[_0xdf73[17]](_0xdf73[14],auth[_0xdf73[6]](),license[_0xdf73[7]](),auth[_0xdf73[9]]([20],[_0xdf73[8]]),controller[_0xdf73[18]]);router[_0xdf73[20]](_0xdf73[12],auth[_0xdf73[6]](),license[_0xdf73[7]](),auth[_0xdf73[9]]([20],[_0xdf73[8]]),controller[_0xdf73[19]]);router[_0xdf73[21]](_0xdf73[12],auth[_0xdf73[6]](),license[_0xdf73[7]](),auth[_0xdf73[9]]([20],[_0xdf73[8]]),controller[_0xdf73[19]]);router[_0xdf73[23]](_0xdf73[12],auth[_0xdf73[6]](),license[_0xdf73[7]](),auth[_0xdf73[9]]([20],[_0xdf73[8]]),controller[_0xdf73[22]]);router[_0xdf73[23]](_0xdf73[14],auth[_0xdf73[6]](),license[_0xdf73[7]](),auth[_0xdf73[9]]([20],[_0xdf73[8]]),controller[_0xdf73[24]]);router[_0xdf73[23]](_0xdf73[5],auth[_0xdf73[6]](),license[_0xdf73[7]](),auth[_0xdf73[9]]([20],[_0xdf73[8]]),controller[_0xdf73[25]]);module[_0xdf73[26]]= router \ No newline at end of file +'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('/', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.index); +router.get('/:id', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.show); +router.get('/:id/agents', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.showAgents); +router.post('/', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.create); +router.post('/:id/agents', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.addAgents); +router.put('/:id', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.update); +router.patch('/: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('/:id/agents', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.removeAgents); +router.delete('/', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.bulkDestroy); + +module.exports = router; diff --git a/server/api/openchannel_queue/openchannel_queue.controller.js b/server/api/openchannel_queue/openchannel_queue.controller.js index 35453b6..dde6c2b 100644 --- a/server/api/openchannel_queue/openchannel_queue.controller.js +++ b/server/api/openchannel_queue/openchannel_queue.controller.js @@ -1 +1,246 @@ -var _0x7c98=["\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"];_0x7c98[0];var _=require(_0x7c98[1]);var Util=require(_0x7c98[2]);var OpenchannelQueue=require(_0x7c98[4])[_0x7c98[3]];var User=require(_0x7c98[4])[_0x7c98[5]];var sequelize=require(_0x7c98[4])[_0x7c98[6]];var UserHasOpenchannelQueue=require(_0x7c98[4])[_0x7c98[7]];function handleError(_0x18d5x8,_0x18d5x9){return _0x18d5x8[_0x7c98[9]](500)[_0x7c98[8]](_0x18d5x9)}exports[_0x7c98[10]]= function(_0x18d5xa,_0x18d5x8){switch(_0x18d5xa[_0x7c98[16]][_0x7c98[23]]){case _0x7c98[16]:return User[_0x7c98[17]](_0x18d5xa[_0x7c98[16]][_0x7c98[15]],{attributes:[_0x7c98[15]]})[_0x7c98[12]](Util[_0x7c98[14]](_0x18d5xa[_0x7c98[13]]))[_0x7c98[12]](function(_0x18d5xb){_0x18d5x8[_0x7c98[9]](200)[_0x7c98[8]](_0x18d5xb)})[_0x7c98[11]](function(_0x18d5x9){return handleError(_0x18d5x8,_0x18d5x9)});default:return OpenchannelQueue[_0x7c98[22]](_0x7c98[21])[_0x7c98[20]](_[_0x7c98[19]](Util[_0x7c98[18]](_0x18d5xa[_0x7c98[13]]),{distinct:true}))[_0x7c98[12]](function(_0x18d5xb){_0x18d5x8[_0x7c98[9]](200)[_0x7c98[8]](_0x18d5xb)})[_0x7c98[11]](function(_0x18d5x9){return handleError(_0x18d5x8,_0x18d5x9)})}};exports[_0x7c98[24]]= function(_0x18d5xa,_0x18d5x8){return OpenchannelQueue[_0x7c98[22]](_0x7c98[21])[_0x7c98[17]](_0x18d5xa[_0x7c98[26]][_0x7c98[15]])[_0x7c98[12]](function(_0x18d5xc){if(!_0x18d5xc){return _0x18d5x8[_0x7c98[25]](404)};return _0x18d5x8[_0x7c98[8]](_0x18d5xc)})[_0x7c98[11]](function(_0x18d5x9){return handleError(_0x18d5x8,_0x18d5x9)})};exports[_0x7c98[27]]= function(_0x18d5xa,_0x18d5x8){return OpenchannelQueue[_0x7c98[17]](_0x18d5xa[_0x7c98[26]][_0x7c98[15]])[_0x7c98[12]](function(_0x18d5xe){if(!_0x18d5xe){return _0x18d5x8[_0x7c98[25]](404)};return _0x18d5xe[_0x7c98[33]]({where:{role:_0x7c98[29]},attributes:[_0x7c98[15],_0x7c98[30],_0x7c98[31],_0x7c98[32]]})})[_0x7c98[12]](function(_0x18d5xd){return _0x18d5x8[_0x7c98[9]](200)[_0x7c98[8]]({rows:_0x18d5xd,count:_0x18d5xd[_0x7c98[28]]})})[_0x7c98[11]](function(_0x18d5x9){return handleError(_0x18d5x8,_0x18d5x9)})};exports[_0x7c98[34]]= function(_0x18d5xa,_0x18d5x8){var _0x18d5xf;return OpenchannelQueue[_0x7c98[34]](_0x18d5xa[_0x7c98[38]])[_0x7c98[12]](function(_0x18d5x10){_0x18d5xf= _0x18d5x10;if(_0x18d5xa[_0x7c98[38]][_0x7c98[37]]){return _0x18d5xf[_0x7c98[40]](_0x18d5xa[_0x7c98[38]][_0x7c98[37]],{penalty:_0x18d5xa[_0x7c98[38]][_0x7c98[39]]|| 0,queue:_0x18d5xf[_0x7c98[30]]})}})[_0x7c98[12]](function(){return _0x18d5x8[_0x7c98[9]](201)[_0x7c98[8]](_0x18d5xf)})[_0x7c98[11]](sequelize.UniqueConstraintError,function(_0x18d5x9){return Util[_0x7c98[36]][_0x7c98[35]](_0x18d5x8,_0x18d5x9)})[_0x7c98[11]](function(_0x18d5x9){return handleError(_0x18d5x8,_0x18d5x9)})};exports[_0x7c98[41]]= function(_0x18d5xa,_0x18d5x8){if(_0x18d5xa[_0x7c98[38]][_0x7c98[15]]){delete _0x18d5xa[_0x7c98[38]][_0x7c98[15]]};return OpenchannelQueue[_0x7c98[17]](_0x18d5xa[_0x7c98[26]][_0x7c98[15]])[_0x7c98[12]](function(_0x18d5xc){if(!_0x18d5xc){return _0x18d5x8[_0x7c98[25]](404)};var _0x18d5x11=_[_0x7c98[19]](_0x18d5xc,_0x18d5xa[_0x7c98[38]]);return _0x18d5x11[_0x7c98[42]]()})[_0x7c98[12]](function(_0x18d5xc){return _0x18d5x8[_0x7c98[9]](200)[_0x7c98[8]](_0x18d5xc)})[_0x7c98[11]](sequelize.UniqueConstraintError,function(_0x18d5x9){return Util[_0x7c98[36]][_0x7c98[35]](_0x18d5x8,_0x18d5x9)})[_0x7c98[11]](function(_0x18d5x9){return handleError(_0x18d5x8,_0x18d5x9)})};exports[_0x7c98[43]]= function(_0x18d5xa,_0x18d5x8,_0x18d5x12){return OpenchannelQueue[_0x7c98[17]](_0x18d5xa[_0x7c98[26]][_0x7c98[15]])[_0x7c98[12]](function(_0x18d5xc){if(!_0x18d5xc){return _0x18d5x8[_0x7c98[25]](404)};var _0x18d5x13=_[_0x7c98[44]](_0x18d5xa[_0x7c98[38]][_0x7c98[37]],function(_0x18d5x14){return {UserId:_0x18d5x14,penalty:_0x18d5xa[_0x7c98[38]][_0x7c98[39]],OpenchannelQueueId:_0x18d5xc[_0x7c98[15]],queue:_0x18d5xc[_0x7c98[30]]}});return UserHasOpenchannelQueue[_0x7c98[45]](_0x18d5x13,{individualHooks:true})})[_0x7c98[12]](function(){return _0x18d5x8[_0x7c98[25]](200)})[_0x7c98[11]](function(_0x18d5x9){return handleError(_0x18d5x8,_0x18d5x9)})};exports[_0x7c98[46]]= function(_0x18d5xa,_0x18d5x8){return OpenchannelQueue[_0x7c98[17]](_0x18d5xa[_0x7c98[26]][_0x7c98[15]])[_0x7c98[12]](function(_0x18d5xc){if(_0x18d5xc){return _0x18d5xc[_0x7c98[47]](_0x18d5xa[_0x7c98[13]][_0x7c98[37]],{individualHooks:true})}else {throw new Error(_0x7c98[48])}})[_0x7c98[12]](function(){return _0x18d5x8[_0x7c98[25]](202)})[_0x7c98[11]](function(_0x18d5x9){return handleError(_0x18d5x8,_0x18d5x9)})};exports[_0x7c98[49]]= function(_0x18d5xa,_0x18d5x8){var _0x18d5x15;return OpenchannelQueue[_0x7c98[17]](_0x18d5xa[_0x7c98[26]][_0x7c98[15]])[_0x7c98[12]](function(_0x18d5xc){_0x18d5x15= _0x18d5xc;if(!_0x18d5xc){return _0x18d5x8[_0x7c98[25]](404)};return _0x18d5xc[_0x7c98[49]]()})[_0x7c98[12]](function(){return _0x18d5x8[_0x7c98[25]](204)})[_0x7c98[11]](sequelize.ForeignKeyConstraintError,function(_0x18d5x9){return Util[_0x7c98[36]][_0x7c98[53]](_0x18d5x8,_0x7c98[52],_0x18d5x15[_0x7c98[30]],_0x18d5x9)})[_0x7c98[11]](function(_0x18d5x9){console[_0x7c98[51]](_0x7c98[50],_0x18d5x9);return handleError(_0x18d5x8,_0x18d5x9)})};exports[_0x7c98[54]]= function(_0x18d5xa,_0x18d5x8){return OpenchannelQueue[_0x7c98[49]]({where:{id:_0x18d5xa[_0x7c98[13]][_0x7c98[55]]},individualHooks:true})[_0x7c98[12]](function(){return _0x18d5x8[_0x7c98[25]](204)})[_0x7c98[11]](function(_0x18d5x9){return handleError(_0x18d5x8,_0x18d5x9)})} \ No newline at end of file +/** + * 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); + }); +}; diff --git a/server/api/openchannel_queue/openchannel_queue.events.js b/server/api/openchannel_queue/openchannel_queue.events.js index 40d6dc3..a1ca116 100644 --- a/server/api/openchannel_queue/openchannel_queue.events.js +++ b/server/api/openchannel_queue/openchannel_queue.events.js @@ -1 +1,36 @@ -var _0xc268=["\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"];_0xc268[0];const EventEmitter=require(_0xc268[1]);const OpenchannelQueue=require(_0xc268[3])[_0xc268[2]];var OpenchannelQueueEvents= new EventEmitter();OpenchannelQueueEvents[_0xc268[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xc268[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xc268[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xc268[6]};for(var e in events){var event=events[e];OpenchannelQueue[_0xc268[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x7111x8,_0x7111x9,_0x7111xa){OpenchannelQueueEvents[_0xc268[10]](event+ _0xc268[8]+ _0x7111x8[_0xc268[9]],_0x7111x8);OpenchannelQueueEvents[_0xc268[10]](event,_0x7111x8);_0x7111xa(null)}}module[_0xc268[11]]= OpenchannelQueueEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/openchannel_queue/openchannel_queue.socket.js b/server/api/openchannel_queue/openchannel_queue.socket.js index 0afead6..2ef4161 100644 --- a/server/api/openchannel_queue/openchannel_queue.socket.js +++ b/server/api/openchannel_queue/openchannel_queue.socket.js @@ -1 +1,32 @@ -var _0x27dd=["\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"];_0x27dd[0];const OpenchannelQueueEvents=require(_0x27dd[1]);var events=[_0x27dd[2],_0x27dd[3]];exports[_0x27dd[4]]= function(_0x3a71x3){for(var _0x3a71x4=0,_0x3a71x5=events[_0x27dd[5]];_0x3a71x4< _0x3a71x5;_0x3a71x4++){var _0x3a71x6=events[_0x3a71x4];var _0x3a71x7=createListener(_0x27dd[6]+ _0x3a71x6,_0x3a71x3);OpenchannelQueueEvents[_0x27dd[7]](_0x3a71x6,_0x3a71x7);_0x3a71x3[_0x27dd[7]](_0x27dd[8],removeListener(_0x3a71x6,_0x3a71x7))}};function createListener(_0x3a71x6,_0x3a71x3){return function(_0x3a71x9){_0x3a71x3[_0x27dd[9]](_0x3a71x6,_0x3a71x9)}}function removeListener(_0x3a71x6,_0x3a71x7){return function(){OpenchannelQueueEvents[_0x27dd[10]](_0x3a71x6,_0x3a71x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/openchannel_room/index.js b/server/api/openchannel_room/index.js index 6e94989..3466839 100644 --- a/server/api/openchannel_room/index.js +++ b/server/api/openchannel_room/index.js @@ -1 +1,25 @@ -var _0x46fd=["\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"];_0x46fd[0];var express=require(_0x46fd[1]);var auth=require(_0x46fd[2]);var controller=require(_0x46fd[3]);var license=require(_0x46fd[4]);var router=express.Router();router[_0x46fd[13]](_0x46fd[5],license[_0x46fd[6]](),license[_0x46fd[7]](),auth[_0x46fd[8]](),auth[_0x46fd[11]]([20],[_0x46fd[9],_0x46fd[10]]),controller[_0x46fd[12]]);router[_0x46fd[13]](_0x46fd[14],auth[_0x46fd[8]](),license[_0x46fd[6]](),license[_0x46fd[15]](),auth[_0x46fd[11]]([20,17],[_0x46fd[9]]),controller[_0x46fd[16]]);router[_0x46fd[13]](_0x46fd[17],auth[_0x46fd[8]](),license[_0x46fd[6]](),license[_0x46fd[15]](),auth[_0x46fd[11]]([20,17],[_0x46fd[9]]),controller[_0x46fd[18]]);router[_0x46fd[13]](_0x46fd[19],auth[_0x46fd[8]](),license[_0x46fd[6]](),license[_0x46fd[15]](),auth[_0x46fd[11]]([20,17],[_0x46fd[9]]),controller[_0x46fd[20]]);router[_0x46fd[13]](_0x46fd[21],auth[_0x46fd[8]](),license[_0x46fd[6]](),license[_0x46fd[15]](),auth[_0x46fd[11]]([20,17],[_0x46fd[9]]),controller[_0x46fd[22]]);router[_0x46fd[13]](_0x46fd[23],license[_0x46fd[6]](),license[_0x46fd[7]](),auth[_0x46fd[8]](),auth[_0x46fd[11]]([20],[_0x46fd[9],_0x46fd[10]]),controller[_0x46fd[24]]);router[_0x46fd[13]](_0x46fd[25],license[_0x46fd[6]](),license[_0x46fd[7]](),auth[_0x46fd[8]](),auth[_0x46fd[11]]([20],[_0x46fd[9]]),controller[_0x46fd[26]]);router[_0x46fd[13]](_0x46fd[27],license[_0x46fd[6]](),license[_0x46fd[7]](),auth[_0x46fd[8]](),auth[_0x46fd[11]]([20],[_0x46fd[9],_0x46fd[10]]),controller[_0x46fd[28]]);router[_0x46fd[13]](_0x46fd[29],license[_0x46fd[6]](),license[_0x46fd[7]](),auth[_0x46fd[8]](),auth[_0x46fd[11]]([20],[_0x46fd[9],_0x46fd[10]]),controller[_0x46fd[30]]);router[_0x46fd[32]](_0x46fd[5],license[_0x46fd[6]](),license[_0x46fd[7]](),auth[_0x46fd[8]](),auth[_0x46fd[11]]([20],[_0x46fd[9]]),controller[_0x46fd[31]]);router[_0x46fd[32]](_0x46fd[33],license[_0x46fd[6]](),license[_0x46fd[7]](),auth[_0x46fd[8]](),auth[_0x46fd[11]]([20],[_0x46fd[9]]),controller[_0x46fd[34]]);router[_0x46fd[36]](_0x46fd[23],license[_0x46fd[6]](),license[_0x46fd[7]](),auth[_0x46fd[8]](),auth[_0x46fd[11]]([20],[_0x46fd[9],_0x46fd[10]]),controller[_0x46fd[35]]);router[_0x46fd[36]](_0x46fd[27],license[_0x46fd[6]](),license[_0x46fd[7]](),auth[_0x46fd[8]](),auth[_0x46fd[11]]([20],[_0x46fd[9],_0x46fd[10]]),controller[_0x46fd[37]]);router[_0x46fd[39]](_0x46fd[23],license[_0x46fd[6]](),license[_0x46fd[7]](),auth[_0x46fd[8]](),auth[_0x46fd[11]]([20],[_0x46fd[9],_0x46fd[10]]),controller[_0x46fd[38]]);router[_0x46fd[41]](_0x46fd[23],license[_0x46fd[6]](),license[_0x46fd[7]](),auth[_0x46fd[8]](),auth[_0x46fd[11]]([20],[_0x46fd[9]]),controller[_0x46fd[40]]);router[_0x46fd[41]](_0x46fd[5],license[_0x46fd[6]](),license[_0x46fd[7]](),auth[_0x46fd[8]](),auth[_0x46fd[11]]([20],[_0x46fd[9]]),controller[_0x46fd[42]]);module[_0x46fd[43]]= router \ No newline at end of file +'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; diff --git a/server/api/openchannel_room/openchannel_room.controller.js b/server/api/openchannel_room/openchannel_room.controller.js index 858645a..05ee965 100644 --- a/server/api/openchannel_room/openchannel_room.controller.js +++ b/server/api/openchannel_room/openchannel_room.controller.js @@ -1 +1,399 @@ -var _0x912a=["\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"];_0x912a[0];var _=require(_0x912a[1]);var Util=require(_0x912a[2]);var moment=require(_0x912a[3]);var OpenchannelRoom=require(_0x912a[5])[_0x912a[4]];var OpenchannelMessage=require(_0x912a[5])[_0x912a[6]];var OpenchannelAccount=require(_0x912a[5])[_0x912a[7]];var OpenchannelQueue=require(_0x912a[5])[_0x912a[8]];var OpenchannelApplication=require(_0x912a[5])[_0x912a[9]];var User=require(_0x912a[5])[_0x912a[10]];function handleError(_0x4c9cxb,_0x4c9cxc){return _0x4c9cxb[_0x912a[12]](500)[_0x912a[11]](_0x4c9cxc)}exports[_0x912a[13]]= function(_0x4c9cxd,_0x4c9cxb){switch(_0x4c9cxd[_0x912a[22]][_0x912a[24]]){case _0x912a[20]:return OpenchannelRoom[_0x912a[23]](_0x912a[19],{method:[_0x912a[20],_0x4c9cxd[_0x912a[22]][_0x912a[21]]]})[_0x912a[18]](Util[_0x912a[17]](_0x4c9cxd[_0x912a[16]]))[_0x912a[15]](function(_0x4c9cxe){return _0x4c9cxb[_0x912a[12]](200)[_0x912a[11]](_0x4c9cxe)})[_0x912a[14]](function(_0x4c9cxc){return handleError(_0x4c9cxb,_0x4c9cxc)});default:return OpenchannelRoom[_0x912a[23]](_0x912a[19])[_0x912a[18]](Util[_0x912a[17]](_0x4c9cxd[_0x912a[16]]))[_0x912a[15]](function(_0x4c9cxe){return _0x4c9cxb[_0x912a[12]](200)[_0x912a[11]](_0x4c9cxe)})[_0x912a[14]](function(_0x4c9cxc){return handleError(_0x4c9cxb,_0x4c9cxc)})}};exports[_0x912a[25]]= function(_0x4c9cxd,_0x4c9cxb){return OpenchannelRoom[_0x912a[25]]()[_0x912a[15]](function(_0x4c9cxf){return _0x4c9cxb[_0x912a[12]](200)[_0x912a[11]](_0x4c9cxf)})[_0x912a[14]](function(_0x4c9cxc){return handleError(_0x4c9cxb,_0x4c9cxc)})};function getOpenchannelQueues(_0x4c9cx11){return function(){switch(_0x4c9cx11[_0x912a[24]]){case _0x912a[22]:return User[_0x912a[28]](_0x4c9cx11[_0x912a[21]],{attributes:[_0x912a[21]]})[_0x912a[15]](Util[_0x912a[27]]({},{attributes:[_0x912a[21]],include:[{raw:true,model:User,attributes:[_0x912a[21]]}]}))[_0x912a[15]](function(_0x4c9cx12){return {include:{model:OpenchannelAccount,include:{model:OpenchannelApplication,include:{model:OpenchannelQueue,where:{id:_[_0x912a[26]](_0x4c9cx12,_0x912a[21])}}}}}});default:return {}}}}exports[_0x912a[29]]= function(_0x4c9cxd,_0x4c9cxb){return Promise[_0x912a[36]]([])[_0x912a[15]](getOpenchannelQueues(_0x4c9cxd[_0x912a[22]]))[_0x912a[15]](function(_0x4c9cx14){return OpenchannelRoom[_0x912a[35]](_[_0x912a[34]](Util[_0x912a[17]](_0x4c9cxd[_0x912a[16]],{status:_0x912a[31],updatedAt:{$gte:moment()[_0x912a[33]](_0x912a[32])}}),_0x4c9cx14))})[_0x912a[15]](function(_0x4c9cx13){return _0x4c9cxb[_0x912a[12]](200)[_0x912a[11]]({value:_0x4c9cx13})})[_0x912a[14]](function(_0x4c9cxc){console[_0x912a[30]](_0x4c9cxc);return handleError(_0x4c9cxb,_0x4c9cxc)})};exports[_0x912a[37]]= function(_0x4c9cxd,_0x4c9cxb){return Promise[_0x912a[36]]([])[_0x912a[15]](getOpenchannelQueues(_0x4c9cxd[_0x912a[22]]))[_0x912a[15]](function(_0x4c9cx14){return OpenchannelRoom[_0x912a[35]](_[_0x912a[34]](Util[_0x912a[17]](_0x4c9cxd[_0x912a[16]],{status:_0x912a[38],updatedAt:{$gte:moment()[_0x912a[33]](_0x912a[32])}}),_0x4c9cx14))})[_0x912a[15]](function(_0x4c9cx13){return _0x4c9cxb[_0x912a[12]](200)[_0x912a[11]]({value:_0x4c9cx13})})[_0x912a[14]](function(_0x4c9cxc){console[_0x912a[30]](_0x4c9cxc);return handleError(_0x4c9cxb,_0x4c9cxc)})};exports[_0x912a[39]]= function(_0x4c9cxd,_0x4c9cxb){return Promise[_0x912a[36]]([])[_0x912a[15]](getOpenchannelQueues(_0x4c9cxd[_0x912a[22]]))[_0x912a[15]](function(_0x4c9cx14){return OpenchannelRoom[_0x912a[35]](_[_0x912a[34]](Util[_0x912a[17]](_0x4c9cxd[_0x912a[16]],{status:_0x912a[40],updatedAt:{$gte:moment()[_0x912a[33]](_0x912a[32])}}),_0x4c9cx14))})[_0x912a[15]](function(_0x4c9cx13){return _0x4c9cxb[_0x912a[12]](200)[_0x912a[11]]({value:_0x4c9cx13})})[_0x912a[14]](function(_0x4c9cxc){console[_0x912a[30]](_0x4c9cxc);return handleError(_0x4c9cxb,_0x4c9cxc)})};exports[_0x912a[41]]= function(_0x4c9cxd,_0x4c9cxb){return Promise[_0x912a[36]]([])[_0x912a[15]](getOpenchannelQueues(_0x4c9cxd[_0x912a[22]]))[_0x912a[15]](function(_0x4c9cx14){return OpenchannelRoom[_0x912a[35]](_[_0x912a[34]](Util[_0x912a[17]](_0x4c9cxd[_0x912a[16]],{status:_0x912a[42],updatedAt:{$gte:moment()[_0x912a[33]](_0x912a[32])}}),_0x4c9cx14))})[_0x912a[15]](function(_0x4c9cx13){return _0x4c9cxb[_0x912a[12]](200)[_0x912a[11]]({value:_0x4c9cx13})})[_0x912a[14]](function(_0x4c9cxc){console[_0x912a[30]](_0x4c9cxc);return handleError(_0x4c9cxb,_0x4c9cxc)})};exports[_0x912a[43]]= function(_0x4c9cxd,_0x4c9cxb){return OpenchannelRoom[_0x912a[23]](_0x912a[19])[_0x912a[28]](_0x4c9cxd[_0x912a[45]][_0x912a[21]])[_0x912a[15]](function(_0x4c9cx15){if(!_0x4c9cx15){return _0x4c9cxb[_0x912a[44]](404)};return _0x4c9cxb[_0x912a[11]](_0x4c9cx15)})[_0x912a[14]](function(_0x4c9cxc){return handleError(_0x4c9cxb,_0x4c9cxc)})};exports[_0x912a[46]]= function(_0x4c9cxd,_0x4c9cxb,_0x4c9cx16){return OpenchannelRoom[_0x912a[28]](_0x4c9cxd[_0x912a[45]][_0x912a[21]])[_0x912a[15]](function(_0x4c9cx15){if(!_0x4c9cx15){return _0x4c9cxb[_0x912a[44]](404)};return _0x4c9cx15[_0x912a[51]]({attributes:[_0x912a[21],_0x912a[47],_0x912a[48],_0x912a[49],_0x912a[24],_0x912a[50]]})})[_0x912a[15]](function(_0x4c9cx17){return _0x4c9cxb[_0x912a[11]](_0x4c9cx17)})[_0x912a[14]](function(_0x4c9cxc){return handleError(_0x4c9cxb,_0x4c9cxc)})};exports[_0x912a[52]]= function(_0x4c9cxd,_0x4c9cxb,_0x4c9cx16){return OpenchannelMessage[_0x912a[28]](_0x4c9cxd[_0x912a[45]][_0x912a[21]])[_0x912a[15]](function(_0x4c9cx18){return _0x4c9cx18[_0x912a[54]]({include:[{model:OpenchannelAccount},{model:OpenchannelMessage,include:[{model:User,attributes:[_0x912a[21],_0x912a[47],_0x912a[48],_0x912a[49]]}]},{model:User,attributes:[_0x912a[21],_0x912a[47],_0x912a[48],_0x912a[49]]}]})})[_0x912a[15]](function(_0x4c9cx15){return _0x4c9cxb[_0x912a[11]](_0x4c9cx15)})[_0x912a[14]](function(_0x4c9cxc){console[_0x912a[30]](_0x912a[53],_0x4c9cxc);return handleError(_0x4c9cxb,_0x4c9cxc)})};exports[_0x912a[55]]= function(_0x4c9cxd,_0x4c9cxb){return OpenchannelRoom[_0x912a[55]](_0x4c9cxd[_0x912a[56]])[_0x912a[15]](function(_0x4c9cx18){return _0x4c9cxb[_0x912a[12]](201)[_0x912a[11]](_0x4c9cx18)})[_0x912a[14]](function(_0x4c9cxc){return handleError(_0x4c9cxb,_0x4c9cxc)})};exports[_0x912a[57]]= function(_0x4c9cxd,_0x4c9cxb,_0x4c9cx16){_0x4c9cxd[_0x912a[56]][_0x912a[58]]= _0x4c9cxd[_0x912a[22]][_0x912a[21]];_0x4c9cxd[_0x912a[56]][_0x912a[59]]= _0x4c9cxd[_0x912a[45]][_0x912a[21]];return OpenchannelMessage[_0x912a[55]](_0x4c9cxd[_0x912a[56]])[_0x912a[15]](function(_0x4c9cx18){return _0x4c9cxb[_0x912a[12]](201)[_0x912a[11]](_0x4c9cx18)})[_0x912a[14]](function(_0x4c9cxc){return handleError(_0x4c9cxb,_0x4c9cxc)})};exports[_0x912a[60]]= function(_0x4c9cxd,_0x4c9cxb){if(_0x4c9cxd[_0x912a[56]][_0x912a[21]]){delete _0x4c9cxd[_0x912a[56]][_0x912a[21]]};return OpenchannelRoom[_0x912a[28]](_0x4c9cxd[_0x912a[45]][_0x912a[21]])[_0x912a[15]](function(_0x4c9cx15){if(!_0x4c9cx15){return _0x4c9cxb[_0x912a[44]](404)};var _0x4c9cx19=_[_0x912a[34]](_0x4c9cx15,_0x4c9cxd[_0x912a[56]]);return _0x4c9cx19[_0x912a[61]]()})[_0x912a[15]](function(_0x4c9cx15){return _0x4c9cxb[_0x912a[12]](200)[_0x912a[11]](_0x4c9cx15)})[_0x912a[14]](function(_0x4c9cxc){return handleError(_0x4c9cxb,_0x4c9cxc)})};exports[_0x912a[62]]= function(_0x4c9cxd,_0x4c9cxb,_0x4c9cx16){return OpenchannelRoom[_0x912a[28]](_0x4c9cxd[_0x912a[45]][_0x912a[21]])[_0x912a[15]](function(_0x4c9cx15){if(!_0x4c9cx15){return _0x4c9cxb[_0x912a[44]](404)};return _0x4c9cx15[_0x912a[64]](_0x4c9cxd[_0x912a[56]][_0x912a[63]],{individualHooks:true})})[_0x912a[15]](function(){return _0x4c9cxb[_0x912a[44]](200)})[_0x912a[14]](function(_0x4c9cxc){return handleError(_0x4c9cxb,_0x4c9cxc)})};exports[_0x912a[65]]= function(_0x4c9cxd,_0x4c9cxb){return OpenchannelRoom[_0x912a[28]](_0x4c9cxd[_0x912a[45]][_0x912a[21]])[_0x912a[15]](function(_0x4c9cx15){if(!_0x4c9cx15){return _0x4c9cxb[_0x912a[44]](404)};return _0x4c9cx15[_0x912a[65]]()})[_0x912a[15]](function(){return _0x4c9cxb[_0x912a[44]](204)})[_0x912a[14]](function(_0x4c9cxc){return handleError(_0x4c9cxb,_0x4c9cxc)})};exports[_0x912a[66]]= function(_0x4c9cxd,_0x4c9cxb){return OpenchannelRoom[_0x912a[65]]({where:{id:_0x4c9cxd[_0x912a[16]][_0x912a[67]]},individualHooks:true})[_0x912a[15]](function(){return _0x4c9cxb[_0x912a[44]](200)})[_0x912a[14]](function(_0x4c9cxc){return handleError(_0x4c9cxb,_0x4c9cxc)})};exports[_0x912a[68]]= function(_0x4c9cxd,_0x4c9cxb,_0x4c9cx16){var _0x4c9cx1a={where:{id:_0x4c9cxd[_0x912a[45]][_0x912a[21]][_0x912a[70]](_0x912a[69])},user:_0x4c9cxd[_0x912a[22]],individualHooks:true};return OpenchannelRoom[_0x912a[60]](_0x4c9cxd[_0x912a[56]],_0x4c9cx1a)[_0x912a[15]](function(_0x4c9cx1b){if(!_0x4c9cx1b){return _0x4c9cxb[_0x912a[44]](404)};return _0x4c9cx1b})[_0x912a[15]](function(_0x4c9cx1b){return _0x4c9cxb[_0x912a[44]](200)})[_0x912a[14]](function(_0x4c9cxc){return handleError(_0x4c9cxb,_0x4c9cxc)})} \ No newline at end of file +/** + * 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); + }); +}; diff --git a/server/api/openchannel_room/openchannel_room.events.js b/server/api/openchannel_room/openchannel_room.events.js index 67eb60b..1bea005 100644 --- a/server/api/openchannel_room/openchannel_room.events.js +++ b/server/api/openchannel_room/openchannel_room.events.js @@ -1 +1,36 @@ -var _0xa011=["\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"];_0xa011[0];const EventEmitter=require(_0xa011[1]);const OpenchannelRoom=require(_0xa011[3])[_0xa011[2]];var OpenchannelRoomEvents= new EventEmitter();OpenchannelRoomEvents[_0xa011[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xa011[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xa011[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xa011[6]};for(var e in events){var event=events[e];OpenchannelRoom[_0xa011[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xa5dcx8,_0xa5dcx9,_0xa5dcxa){OpenchannelRoomEvents[_0xa011[10]](event+ _0xa011[8]+ _0xa5dcx8[_0xa011[9]],_0xa5dcx8);OpenchannelRoomEvents[_0xa011[10]](event,_0xa5dcx8);_0xa5dcxa(null)}}module[_0xa011[11]]= OpenchannelRoomEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/openchannel_room/openchannel_room.socket.js b/server/api/openchannel_room/openchannel_room.socket.js index 6118124..0868959 100644 --- a/server/api/openchannel_room/openchannel_room.socket.js +++ b/server/api/openchannel_room/openchannel_room.socket.js @@ -1 +1,33 @@ -var _0x66e2=["\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"];_0x66e2[0];const OpenchannelRoomEvents=require(_0x66e2[1]);var events=[_0x66e2[2],_0x66e2[2],_0x66e2[3]];exports[_0x66e2[4]]= function(_0x4a40x3){for(var _0x4a40x4=0,_0x4a40x5=events[_0x66e2[5]];_0x4a40x4< _0x4a40x5;_0x4a40x4++){var _0x4a40x6=events[_0x4a40x4];var _0x4a40x7=createListener(_0x66e2[6]+ _0x4a40x6,_0x4a40x3);OpenchannelRoomEvents[_0x66e2[7]](_0x4a40x6,_0x4a40x7);_0x4a40x3[_0x66e2[7]](_0x66e2[8],removeListener(_0x4a40x6,_0x4a40x7))}};function createListener(_0x4a40x6,_0x4a40x3){return function(_0x4a40x9){_0x4a40x3[_0x66e2[9]](_0x4a40x6,_0x4a40x9)}}function removeListener(_0x4a40x6,_0x4a40x7){return function(){OpenchannelRoomEvents[_0x66e2[10]](_0x4a40x6,_0x4a40x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/pause/index.js b/server/api/pause/index.js index 36f0be2..e7ac19a 100644 --- a/server/api/pause/index.js +++ b/server/api/pause/index.js @@ -1 +1,162 @@ -var _0x34b8=["\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"];_0x34b8[0];var express=require(_0x34b8[1]);var auth=require(_0x34b8[2]);var controller=require(_0x34b8[3]);var router=express.Router();router[_0x34b8[10]](_0x34b8[4],auth[_0x34b8[5]](),auth[_0x34b8[8]]([6,13],[_0x34b8[6],_0x34b8[7]]),controller[_0x34b8[9]]);router[_0x34b8[10]](_0x34b8[11],auth[_0x34b8[5]](),auth[_0x34b8[8]]([13],[_0x34b8[6]]),controller[_0x34b8[12]]);router[_0x34b8[14]](_0x34b8[4],auth[_0x34b8[5]](),auth[_0x34b8[8]]([13],[_0x34b8[6]]),controller[_0x34b8[13]]);router[_0x34b8[16]](_0x34b8[11],auth[_0x34b8[5]](),auth[_0x34b8[8]]([13],[_0x34b8[6]]),controller[_0x34b8[15]]);router[_0x34b8[18]](_0x34b8[4],auth[_0x34b8[5]](),auth[_0x34b8[8]]([13],[_0x34b8[6]]),controller[_0x34b8[17]]);router[_0x34b8[18]](_0x34b8[11],auth[_0x34b8[5]](),auth[_0x34b8[8]]([13],[_0x34b8[6]]),controller[_0x34b8[19]]);module[_0x34b8[20]]= router \ No newline at end of file +'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; diff --git a/server/api/pause/pause.controller.js b/server/api/pause/pause.controller.js index 2f09901..d33093a 100644 --- a/server/api/pause/pause.controller.js +++ b/server/api/pause/pause.controller.js @@ -1 +1,150 @@ -var _0x6865=["\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"];_0x6865[0];var _=require(_0x6865[1]);var Util=require(_0x6865[2]);var Pause=require(_0x6865[4])[_0x6865[3]];function handleError(_0x131bx5,_0x131bx6){_0x131bx6= _0x131bx6|| 500;return function(_0x131bx7){_0x131bx5[_0x6865[6]](_0x131bx6)[_0x6865[5]](_0x131bx7)}}function responseWithResult(_0x131bx5,_0x131bx6){_0x131bx6= _0x131bx6|| 200;return function(_0x131bx9){if(_0x131bx9){_0x131bx5[_0x6865[6]](_0x131bx6)[_0x6865[7]](_0x131bx9)}}}function handleEntityNotFound(_0x131bx5){return function(_0x131bx9){if(!_0x131bx9){_0x131bx5[_0x6865[6]](404)[_0x6865[8]]();return null};return _0x131bx9}}function saveUpdates(_0x131bxc){return function(_0x131bx9){return _0x131bx9[_0x6865[10]](_0x131bxc)[_0x6865[9]](function(_0x131bxd){return _0x131bxd})}}function removeEntity(_0x131bx5){return function(_0x131bx9){if(_0x131bx9){return _0x131bx9[_0x6865[11]]()[_0x6865[9]](function(){_0x131bx5[_0x6865[6]](204)[_0x6865[8]]()})}}}exports[_0x6865[12]]= function(_0x131bxf,_0x131bx5){return Pause[_0x6865[16]](Util[_0x6865[15]](_0x131bxf[_0x6865[14]]))[_0x6865[9]](function(_0x131bx10){_0x131bx5[_0x6865[6]](200)[_0x6865[5]](_0x131bx10)})[_0x6865[13]](function(_0x131bx7){return handleError(_0x131bx5,_0x131bx7)})};exports[_0x6865[17]]= function(_0x131bxf,_0x131bx5){return Pause[_0x6865[20]](_0x131bxf[_0x6865[19]][_0x6865[18]])[_0x6865[9]](handleEntityNotFound(_0x131bx5))[_0x6865[9]](responseWithResult(_0x131bx5))[_0x6865[13]](handleError(_0x131bx5))};exports[_0x6865[21]]= function(_0x131bxf,_0x131bx5){return Pause[_0x6865[21]](_0x131bxf[_0x6865[22]])[_0x6865[9]](responseWithResult(_0x131bx5,201))[_0x6865[13]](handleError(_0x131bx5))};exports[_0x6865[23]]= function(_0x131bxf,_0x131bx5){if(_0x131bxf[_0x6865[22]][_0x6865[18]]){delete _0x131bxf[_0x6865[22]][_0x6865[18]]};return Pause[_0x6865[20]](_0x131bxf[_0x6865[19]][_0x6865[18]])[_0x6865[9]](handleEntityNotFound(_0x131bx5))[_0x6865[9]](saveUpdates(_0x131bxf[_0x6865[22]]))[_0x6865[9]](responseWithResult(_0x131bx5))[_0x6865[13]](handleError(_0x131bx5))};exports[_0x6865[11]]= function(_0x131bxf,_0x131bx5){return Pause[_0x6865[20]](_0x131bxf[_0x6865[19]][_0x6865[18]])[_0x6865[9]](handleEntityNotFound(_0x131bx5))[_0x6865[9]](removeEntity(_0x131bx5))[_0x6865[13]](handleError(_0x131bx5))};exports[_0x6865[24]]= function(_0x131bxf,_0x131bx5){return Pause[_0x6865[11]]({where:{id:_0x131bxf[_0x6865[14]][_0x6865[26]]},individualHooks:true})[_0x6865[9]](function(){return _0x131bx5[_0x6865[25]](204)})[_0x6865[13]](function(_0x131bx7){return handleError(_0x131bx5,_0x131bx7)})};function getQuery(_0x131bx12){var _0x131bx13={where:{}};_[_0x6865[32]](_0x131bx12,function(_0x131bx14,_0x131bx15){switch(_0x131bx15){case _0x6865[27]:;case _0x6865[28]:;case _0x6865[29]:_0x131bx13[_0x131bx15]= _0x131bx14;break;default:_0x131bx13[_0x6865[30]][_0x131bx15]= {$like:_0x6865[31]+ _0x131bx14+ _0x6865[31]}}});return _0x131bx13} \ No newline at end of file +/** + * 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; +} diff --git a/server/api/pause/pause.events.js b/server/api/pause/pause.events.js index cb4c047..034b226 100644 --- a/server/api/pause/pause.events.js +++ b/server/api/pause/pause.events.js @@ -1 +1,36 @@ -var _0x915b=["\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"];_0x915b[0];const EventEmitter=require(_0x915b[1]);const Pause=require(_0x915b[3])[_0x915b[2]];var PauseEvents= new EventEmitter();PauseEvents[_0x915b[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x915b[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x915b[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x915b[6]};for(var e in events){var event=events[e];Pause[_0x915b[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xc1fex8,_0xc1fex9,_0xc1fexa){PauseEvents[_0x915b[10]](event+ _0x915b[8]+ _0xc1fex8[_0x915b[9]],_0xc1fex8);PauseEvents[_0x915b[10]](event,_0xc1fex8);_0xc1fexa(null)}}module[_0x915b[11]]= PauseEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/pause/pause.socket.js b/server/api/pause/pause.socket.js index f59373f..c01be0c 100644 --- a/server/api/pause/pause.socket.js +++ b/server/api/pause/pause.socket.js @@ -1 +1,28 @@ -var _0xad9b=["\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"];_0xad9b[0];const PauseEvents=require(_0xad9b[1]);var events=[_0xad9b[2],_0xad9b[3]];exports[_0xad9b[4]]= function(_0x2418x3){for(var _0x2418x4=0,_0x2418x5=events[_0xad9b[5]];_0x2418x4< _0x2418x5;_0x2418x4++){var _0x2418x6=events[_0x2418x4];var _0x2418x7=createListener(_0xad9b[6]+ _0x2418x6,_0x2418x3);PauseEvents[_0xad9b[7]](_0x2418x6,_0x2418x7);_0x2418x3[_0xad9b[7]](_0xad9b[8],removeListener(_0x2418x6,_0x2418x7))}};function createListener(_0x2418x6,_0x2418x3){return function(_0x2418x9){_0x2418x3[_0xad9b[9]](_0x2418x6,_0x2418x9)}}function removeListener(_0x2418x6,_0x2418x7){return function(){PauseEvents[_0xad9b[10]](_0x2418x6,_0x2418x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/report_agent/index.js b/server/api/report_agent/index.js index 5ee074d..c0ded72 100644 --- a/server/api/report_agent/index.js +++ b/server/api/report_agent/index.js @@ -1 +1,13 @@ -var _0x4177=["\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"];_0x4177[0];var express=require(_0x4177[1]);var controller=require(_0x4177[2]);var auth=require(_0x4177[3]);var router=express.Router();router[_0x4177[10]](_0x4177[4],auth[_0x4177[5]](),auth[_0x4177[8]]([17],[_0x4177[6],_0x4177[7]]),controller[_0x4177[9]]);router[_0x4177[10]](_0x4177[11],auth[_0x4177[5]](),auth[_0x4177[8]]([17],[_0x4177[6]]),controller[_0x4177[12]]);router[_0x4177[10]](_0x4177[13],auth[_0x4177[5]](),auth[_0x4177[8]]([17],[_0x4177[6],_0x4177[7]]),controller[_0x4177[14]]);module[_0x4177[15]]= router \ No newline at end of file +'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; diff --git a/server/api/report_agent/report_agent.controller.js b/server/api/report_agent/report_agent.controller.js index 4321539..4f27797 100644 --- a/server/api/report_agent/report_agent.controller.js +++ b/server/api/report_agent/report_agent.controller.js @@ -1 +1,107 @@ -var _0xbdec=["\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"];_0xbdec[0];var _=require(_0xbdec[1]);var ReportAgent=require(_0xbdec[3])[_0xbdec[2]];var User=require(_0xbdec[3])[_0xbdec[4]];var VoiceQueue=require(_0xbdec[3])[_0xbdec[5]];var ReportAgentHistory=require(_0xbdec[3])[_0xbdec[7]][_0xbdec[6]];var Util=require(_0xbdec[8]);exports[_0xbdec[9]]= function(_0x8513x7,_0x8513x8,_0x8513x9){var _0x8513xa={};if(_0x8513x7[_0xbdec[11]][_0xbdec[10]]=== _0xbdec[12]){_0x8513xa[_0xbdec[13]]= _0x8513x7[_0xbdec[11]][_0xbdec[14]]};return ReportAgent[_0xbdec[21]](Util[_0xbdec[20]](_0x8513x7[_0xbdec[19]],_0x8513xa))[_0xbdec[18]](function(_0x8513xc){return _0x8513x8[_0xbdec[17]](200)[_0xbdec[16]](_0x8513xc)})[_0xbdec[15]](function(_0x8513xb){return handleError(_0x8513x8,_0x8513xb)})};function getVoiceQueues(_0x8513xe){return function(){switch(_0x8513xe[_0xbdec[10]]){case _0xbdec[11]:return User[_0xbdec[26]](_0x8513xe[_0xbdec[25]],{attributes:[_0xbdec[25]]})[_0xbdec[18]](Util[_0xbdec[24]]())[_0xbdec[18]](function(_0x8513xf){return _[_0xbdec[23]](_0x8513xf[_0xbdec[22]],_0xbdec[14])});case _0xbdec[12]:return User[_0xbdec[26]](_0x8513xe[_0xbdec[25]])[_0xbdec[18]](function(_0x8513x10){return _0x8513x10[_0xbdec[27]]({attributes:[_0xbdec[14]]})})[_0xbdec[18]](function(_0x8513xf){return _[_0xbdec[23]](_0x8513xf,_0xbdec[14])});default:return VoiceQueue[_0xbdec[28]]()[_0xbdec[18]](function(_0x8513x11){return {rows:_0x8513x11}})[_0xbdec[18]](function(_0x8513xf){return _[_0xbdec[23]](_0x8513xf[_0xbdec[22]],_0xbdec[14])})}}}exports[_0xbdec[29]]= function(_0x8513x7,_0x8513x8){var _0x8513xa={};if(_0x8513x7[_0xbdec[11]][_0xbdec[10]]=== _0xbdec[12]){_0x8513xa[_0xbdec[13]]= _0x8513x7[_0xbdec[11]][_0xbdec[30]]};return Promise[_0xbdec[33]]([])[_0xbdec[18]](getVoiceQueues(_0x8513x7[_0xbdec[11]]))[_0xbdec[18]](function(_0x8513xf){return ReportAgent[_0xbdec[28]](Util[_0xbdec[20]](_0x8513x7[_0xbdec[19]],_[_0xbdec[32]](_0x8513xa,{agentcomplete:false,agentringnoanswer:false,agentdump:false})))})[_0xbdec[18]](function(_0x8513x12){return _0x8513x8[_0xbdec[17]](200)[_0xbdec[16]]({rows:_0x8513x12,count:_0x8513x12[_0xbdec[31]]})})[_0xbdec[15]](function(_0x8513xb){return handleError(_0x8513x8,_0x8513xb)})};exports[_0xbdec[34]]= function(_0x8513x7,_0x8513x8){return ReportAgentHistory[_0xbdec[34]]()[_0xbdec[18]](function(_0x8513x13){return _0x8513x8[_0xbdec[17]](200)[_0xbdec[16]](_0x8513x13)})[_0xbdec[15]](function(_0x8513xb){return handleError(_0x8513x8,_0x8513xb)})};function handleError(_0x8513x8,_0x8513xb){return _0x8513x8[_0xbdec[17]](500)[_0xbdec[16]](_0x8513xb)} \ No newline at end of file +'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); +} diff --git a/server/api/report_agent/report_agent.events.js b/server/api/report_agent/report_agent.events.js index cc322e7..4a38996 100644 --- a/server/api/report_agent/report_agent.events.js +++ b/server/api/report_agent/report_agent.events.js @@ -1 +1,36 @@ -var _0x6d68=["\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"];_0x6d68[0];const EventEmitter=require(_0x6d68[1]);const ReportAgent=require(_0x6d68[3])[_0x6d68[2]];var ReportAgentEvents= new EventEmitter();ReportAgentEvents[_0x6d68[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x6d68[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x6d68[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x6d68[7]};for(var e in events){var event=events[e];ReportAgent[_0x6d68[8]](e,emitEvent(event))};function emitEvent(event){return function(_0xa987x8,_0xa987x9,_0xa987xa){ReportAgentEvents[_0x6d68[11]](event+ _0x6d68[9]+ _0xa987x8[_0x6d68[10]],_0xa987x8);ReportAgentEvents[_0x6d68[11]](event,_0xa987x8);_0xa987xa(null)}}module[_0x6d68[12]]= ReportAgentEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/report_agent/report_agent.socket.js b/server/api/report_agent/report_agent.socket.js index 0583c31..27b95f5 100644 --- a/server/api/report_agent/report_agent.socket.js +++ b/server/api/report_agent/report_agent.socket.js @@ -1 +1,30 @@ -var _0xf488=["\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"];_0xf488[0];const ReportAgentEvents=require(_0xf488[1]);var events=[_0xf488[2],_0xf488[3],_0xf488[4]];exports[_0xf488[5]]= function(_0x6964x3){for(var _0x6964x4=0,_0x6964x5=events[_0xf488[6]];_0x6964x4< _0x6964x5;_0x6964x4++){var _0x6964x6=events[_0x6964x4];var _0x6964x7=createListener(_0xf488[7]+ _0x6964x6,_0x6964x3);ReportAgentEvents[_0xf488[8]](_0x6964x6,_0x6964x7);_0x6964x3[_0xf488[8]](_0xf488[9],removeListener(_0x6964x6,_0x6964x7))}};function createListener(_0x6964x6,_0x6964x3){return function(_0x6964x9){if(_0x6964x3[_0xf488[10]]=== _0x6964x9[_0xf488[11]]|| _0x6964x3[_0xf488[12]]=== _0xf488[13]){_0x6964x3[_0xf488[14]](_0x6964x6,_0x6964x9)}}}function removeListener(_0x6964x6,_0x6964x7){return function(){ReportAgentEvents[_0xf488[15]](_0x6964x6,_0x6964x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/report_call/index.js b/server/api/report_call/index.js index ef93b49..65350f2 100644 --- a/server/api/report_call/index.js +++ b/server/api/report_call/index.js @@ -1 +1,19 @@ -var _0xecde=["\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"];_0xecde[0];var express=require(_0xecde[1]);var auth=require(_0xecde[2]);var controller=require(_0xecde[3]);var router=express.Router();router[_0xecde[9]](_0xecde[4],auth[_0xecde[5]](),auth[_0xecde[7]]([17],[_0xecde[6]]),controller[_0xecde[8]]);router[_0xecde[9]](_0xecde[10],auth[_0xecde[5]](),auth[_0xecde[7]]([17],[_0xecde[6]]),controller[_0xecde[11]]);router[_0xecde[9]](_0xecde[12],auth[_0xecde[5]](),auth[_0xecde[7]]([1],[_0xecde[6],_0xecde[13]]),controller[_0xecde[14]]);router[_0xecde[9]](_0xecde[15],auth[_0xecde[5]](),auth[_0xecde[7]]([1],[_0xecde[6],_0xecde[13]]),controller[_0xecde[16]]);router[_0xecde[9]](_0xecde[17],auth[_0xecde[5]](),auth[_0xecde[7]]([1],[_0xecde[6],_0xecde[13]]),controller[_0xecde[18]]);router[_0xecde[9]](_0xecde[19],auth[_0xecde[5]](),auth[_0xecde[7]]([1],[_0xecde[6],_0xecde[13]]),controller[_0xecde[20]]);router[_0xecde[9]](_0xecde[21],auth[_0xecde[5]](),auth[_0xecde[7]]([1],[_0xecde[6],_0xecde[13]]),controller[_0xecde[22]]);router[_0xecde[25]](_0xecde[23],auth[_0xecde[5]](),auth[_0xecde[7]]([1],[_0xecde[6],_0xecde[13]]),controller[_0xecde[24]]);module[_0xecde[26]]= router \ No newline at end of file +'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; diff --git a/server/api/report_call/report_call.controller.js b/server/api/report_call/report_call.controller.js index c9d563a..9ba5632 100644 --- a/server/api/report_call/report_call.controller.js +++ b/server/api/report_call/report_call.controller.js @@ -1 +1,176 @@ -var _0xe79a=["\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"];_0xe79a[0];var _=require(_0xe79a[1]);var sequelize=require(_0xe79a[3])[_0xe79a[2]];var ReportCall=require(_0xe79a[3])[_0xe79a[4]];var ReportCallHistory=require(_0xe79a[3])[_0xe79a[6]][_0xe79a[5]];var Util=require(_0xe79a[7]);function handleError(_0xcb77x7,_0xcb77x8){_0xcb77x8= _0xcb77x8|| 500;return function(_0xcb77x9){console[_0xe79a[8]](_0xcb77x9);_0xcb77x7[_0xe79a[10]](_0xcb77x8)[_0xe79a[9]](_0xcb77x9)}}function responseWithResult(_0xcb77x7,_0xcb77x8){_0xcb77x8= _0xcb77x8|| 200;return function(_0xcb77xb){if(_0xcb77xb){_0xcb77x7[_0xe79a[10]](_0xcb77x8)[_0xe79a[11]](_0xcb77xb)}}}function handleEntityNotFound(_0xcb77x7){return function(_0xcb77xb){if(!_0xcb77xb){_0xcb77x7[_0xe79a[10]](404)[_0xe79a[12]]();return null};return _0xcb77xb}}function saveUpdates(_0xcb77xe){return function(_0xcb77xb){return _0xcb77xb[_0xe79a[14]](_0xcb77xe)[_0xe79a[13]](function(_0xcb77xf){return _0xcb77xf})}}function removeEntity(_0xcb77x7){return function(_0xcb77xb){if(_0xcb77xb){return _0xcb77xb[_0xe79a[15]]()[_0xe79a[13]](function(){_0xcb77x7[_0xe79a[10]](204)[_0xe79a[12]]()})}}}exports[_0xe79a[16]]= function(_0xcb77x11,_0xcb77x7,_0xcb77x12){return ReportCall[_0xe79a[20]](Util[_0xe79a[19]](_0xcb77x11[_0xe79a[18]]))[_0xe79a[13]](function(_0xcb77x13){return _0xcb77x7[_0xe79a[10]](200)[_0xe79a[9]](_0xcb77x13)})[_0xe79a[17]](handleError(_0xcb77x7))};exports[_0xe79a[21]]= function(_0xcb77x11,_0xcb77x7){if(_0xcb77x11[_0xe79a[23]][_0xe79a[22]]){delete _0xcb77x11[_0xe79a[23]][_0xe79a[22]]};return ReportCall[_0xe79a[26]]({where:{uniqueid:_0xcb77x11[_0xe79a[25]][_0xe79a[24]]}})[_0xe79a[13]](handleEntityNotFound(_0xcb77x7))[_0xe79a[13]](saveUpdates(_0xcb77x11[_0xe79a[23]]))[_0xe79a[13]](responseWithResult(_0xcb77x7))[_0xe79a[17]](handleError(_0xcb77x7))};exports[_0xe79a[27]]= function(_0xcb77x11,_0xcb77x7){return ReportCall[_0xe79a[29]]({where:{type:_0xe79a[28]}})[_0xe79a[13]](function(_0xcb77x14){return _0xcb77x7[_0xe79a[10]](200)[_0xe79a[9]]({value:_0xcb77x14})})[_0xe79a[17]](handleError(_0xcb77x7))};exports[_0xe79a[30]]= function(_0xcb77x11,_0xcb77x7){return sequelize[_0xe79a[18]](_0xe79a[32],{type:sequelize[_0xe79a[34]][_0xe79a[33]]})[_0xe79a[13]](function(_0xcb77x14){return _0xcb77x7[_0xe79a[10]](200)[_0xe79a[9]]({value:_0xcb77x14[0][_0xe79a[31]]})})[_0xe79a[17]](handleError(_0xcb77x7))};exports[_0xe79a[35]]= function(_0xcb77x11,_0xcb77x7){return sequelize[_0xe79a[18]](_0xe79a[36],{type:sequelize[_0xe79a[34]][_0xe79a[33]]})[_0xe79a[13]](function(_0xcb77x14){return _0xcb77x7[_0xe79a[10]](200)[_0xe79a[9]]({value:_0xcb77x14[0][_0xe79a[31]]})})[_0xe79a[17]](handleError(_0xcb77x7))};exports[_0xe79a[37]]= function(_0xcb77x11,_0xcb77x7){return ReportCall[_0xe79a[29]]({where:{disposition:_0xe79a[38],type:_0xe79a[28]}})[_0xe79a[13]](function(_0xcb77x14){return _0xcb77x7[_0xe79a[10]](200)[_0xe79a[9]]({value:_0xcb77x14})})[_0xe79a[17]](handleError(_0xcb77x7))};exports[_0xe79a[39]]= function(_0xcb77x11,_0xcb77x7){return sequelize[_0xe79a[18]](_0xe79a[40],{type:sequelize[_0xe79a[34]][_0xe79a[33]]})[_0xe79a[13]](function(_0xcb77x14){return _0xcb77x7[_0xe79a[10]](200)[_0xe79a[9]]({value:_0xcb77x14[0][_0xe79a[31]]})})[_0xe79a[17]](handleError(_0xcb77x7))};exports[_0xe79a[41]]= function(_0xcb77x11,_0xcb77x7){return ReportCallHistory[_0xe79a[41]]()[_0xe79a[13]](function(_0xcb77x15){return _0xcb77x7[_0xe79a[10]](200)[_0xe79a[9]](_0xcb77x15)})[_0xe79a[17]](handleError(_0xcb77x7))} \ No newline at end of file +/** + * 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)); +}; diff --git a/server/api/report_call/report_call.events.js b/server/api/report_call/report_call.events.js index 19a6189..6ee64f5 100644 --- a/server/api/report_call/report_call.events.js +++ b/server/api/report_call/report_call.events.js @@ -1 +1,36 @@ -var _0x99dd=["\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"];_0x99dd[0];const EventEmitter=require(_0x99dd[1]);const ReportCall=require(_0x99dd[3])[_0x99dd[2]];var ReportCallEvents= new EventEmitter();ReportCallEvents[_0x99dd[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x99dd[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x99dd[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x99dd[6]};for(var e in events){var event=events[e];ReportCall[_0x99dd[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x23eax8,_0x23eax9,_0x23eaxa){ReportCallEvents[_0x99dd[10]](event+ _0x99dd[8]+ _0x23eax8[_0x99dd[9]],_0x23eax8);ReportCallEvents[_0x99dd[10]](event,_0x23eax8);_0x23eaxa(null)}}module[_0x99dd[11]]= ReportCallEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/report_call/report_call.socket.js b/server/api/report_call/report_call.socket.js index 2d624bb..b76cd89 100644 --- a/server/api/report_call/report_call.socket.js +++ b/server/api/report_call/report_call.socket.js @@ -1 +1,28 @@ -var _0xc39e=["\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"];_0xc39e[0];const ReportCallEvents=require(_0xc39e[1]);var events=[_0xc39e[2],_0xc39e[3]];exports[_0xc39e[4]]= function(_0x6153x3){for(var _0x6153x4=0,_0x6153x5=events[_0xc39e[5]];_0x6153x4< _0x6153x5;_0x6153x4++){var _0x6153x6=events[_0x6153x4];var _0x6153x7=createListener(_0xc39e[6]+ _0x6153x6,_0x6153x3);ReportCallEvents[_0xc39e[7]](_0x6153x6,_0x6153x7);_0x6153x3[_0xc39e[7]](_0xc39e[8],removeListener(_0x6153x6,_0x6153x7))}};function createListener(_0x6153x6,_0x6153x3){return function(_0x6153x9){_0x6153x3[_0xc39e[9]](_0x6153x6,_0x6153x9)}}function removeListener(_0x6153x6,_0x6153x7){return function(){ReportCallEvents[_0xc39e[10]](_0x6153x6,_0x6153x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/report_chat/index.js b/server/api/report_chat/index.js index f5a6da2..b49820f 100644 --- a/server/api/report_chat/index.js +++ b/server/api/report_chat/index.js @@ -1 +1,14 @@ -var _0x67f5=["\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"];_0x67f5[0];var express=require(_0x67f5[1]);var controller=require(_0x67f5[2]);var auth=require(_0x67f5[3]);var license=require(_0x67f5[4]);var router=express.Router();router[_0x67f5[12]](_0x67f5[5],auth[_0x67f5[6]](),license[_0x67f5[7]](),auth[_0x67f5[10]]([17],[_0x67f5[8],_0x67f5[9]]),controller[_0x67f5[11]]);router[_0x67f5[12]](_0x67f5[13],auth[_0x67f5[6]](),license[_0x67f5[7]](),auth[_0x67f5[14]](_0x67f5[9]),controller[_0x67f5[15]]);router[_0x67f5[12]](_0x67f5[16],auth[_0x67f5[6]](),license[_0x67f5[7]](),auth[_0x67f5[14]](_0x67f5[9]),controller[_0x67f5[17]]);module[_0x67f5[18]]= router \ No newline at end of file +'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; diff --git a/server/api/report_chat/report_chat.controller.js b/server/api/report_chat/report_chat.controller.js index 404d109..f45b278 100644 --- a/server/api/report_chat/report_chat.controller.js +++ b/server/api/report_chat/report_chat.controller.js @@ -1 +1,163 @@ -var _0x43e2=["\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"];_0x43e2[0];var _=require(_0x43e2[1]);var md5=require(_0x43e2[2]);var moment=require(_0x43e2[3]);var ReportChat=require(_0x43e2[5])[_0x43e2[4]];var ChatRoom=require(_0x43e2[5])[_0x43e2[6]];var ChatVisitor=require(_0x43e2[5])[_0x43e2[7]];var Agent=require(_0x43e2[5])[_0x43e2[8]];var sequelize=require(_0x43e2[5])[_0x43e2[9]];var Util=require(_0x43e2[10]);exports[_0x43e2[11]]= function(_0x7622xa,_0x7622xb,_0x7622xc){return ReportChat[_0x43e2[18]](Util[_0x43e2[17]](_0x7622xa[_0x43e2[16]]))[_0x43e2[15]](function(_0x7622xe){_0x7622xb[_0x43e2[14]](200)[_0x43e2[13]](_0x7622xe)})[_0x43e2[12]](function(_0x7622xd){return handleError(_0x7622xb,_0x7622xd)})};exports[_0x43e2[19]]= function(_0x7622xa,_0x7622xb){var _0x7622xf=_0x7622xa[_0x43e2[23]][_0x43e2[22]][_0x43e2[21]](_0x43e2[20])[1];var _0x7622x10;return ReportChat[_0x43e2[28]](_0x7622xa[_0x43e2[23]][_0x43e2[30]])[_0x43e2[15]](function(_0x7622x14){if(!_0x7622x14){return _0x7622xb[_0x43e2[24]](404)};var _0x7622x12=_[_0x43e2[26]](_0x7622x14,{connectid:_0x7622xa[_0x43e2[23]][_0x43e2[22]]});return _0x7622x12[_0x43e2[27]]()})[_0x43e2[15]](function(){return ChatRoom[_0x43e2[28]](_0x7622xf)})[_0x43e2[15]](function(_0x7622x13){_0x7622x10= _0x7622x13;return _0x7622x10[_0x43e2[35]](_0x7622xa[_0x43e2[31]][_0x43e2[30]],{individualHooks:true})})[_0x43e2[15]](function(){return _0x7622x10[_0x43e2[34]]({token:md5(JSON[_0x43e2[32]]([_0x7622xa[_0x43e2[31]][_0x43e2[30]]])).toString(_0x43e2[29]),status:_0x43e2[33]})})[_0x43e2[15]](function(){return ChatVisitor[_0x43e2[28]](_0x7622x10.ChatVisitorId)})[_0x43e2[15]](function(_0x7622x11){if(!_0x7622x11){return _0x7622xb[_0x43e2[24]](404)};var _0x7622x12=_[_0x43e2[26]](_0x7622x11,{status:_0x43e2[25]});return _0x7622x12[_0x43e2[27]]()})[_0x43e2[15]](function(){return _0x7622xb[_0x43e2[24]](200)})[_0x43e2[12]](sequelize.UniqueConstraintError,function(_0x7622xd){return _0x7622xb[_0x43e2[24]](504)})[_0x43e2[12]](function(_0x7622xd){return handleError(_0x7622xb,_0x7622xd)})};exports[_0x43e2[36]]= function(_0x7622xa,_0x7622xb){return ReportChat[_0x43e2[36]](_0x7622xa[_0x43e2[37]])[_0x43e2[15]](function(_0x7622x14){return _0x7622xb[_0x43e2[14]](201)[_0x43e2[13]](_0x7622x14)})[_0x43e2[12]](function(_0x7622xd){return handleError(_0x7622xb,_0x7622xd)})};exports[_0x43e2[34]]= function(_0x7622xa,_0x7622xb,_0x7622xc){if(_0x7622xa[_0x43e2[37]][_0x43e2[30]]){delete _0x7622xa[_0x43e2[37]][_0x43e2[30]]};return ReportChat[_0x43e2[28]](_0x7622xa[_0x43e2[23]][_0x43e2[30]])[_0x43e2[15]](function(_0x7622x14){if(!_0x7622x14){return _0x7622xb[_0x43e2[24]](404)};var _0x7622x12=_[_0x43e2[26]](_0x7622x14,_0x7622xa[_0x43e2[37]]);return _0x7622x12[_0x43e2[27]]()})[_0x43e2[15]](function(_0x7622x14){return _0x7622xb[_0x43e2[14]](200)[_0x43e2[13]](_0x7622x14)})[_0x43e2[12]](sequelize.ValidationError,function(_0x7622xd){return handleError(_0x7622xb,_0x7622xd)})[_0x43e2[12]](function(_0x7622xd){return handleError(_0x7622xb,_0x7622xd)})};exports[_0x43e2[38]]= function(_0x7622xa,_0x7622xb){return ReportChat[_0x43e2[28]](_0x7622xa[_0x43e2[23]][_0x43e2[30]])[_0x43e2[15]](function(_0x7622x14){if(!_0x7622x14){return _0x7622xb[_0x43e2[24]](404)};return _0x7622x14[_0x43e2[38]]()})[_0x43e2[15]](function(){return _0x7622xb[_0x43e2[24]](204)})[_0x43e2[12]](function(_0x7622xd){return handleError(_0x7622xb,_0x7622xd)})};exports[_0x43e2[39]]= function(_0x7622xa,_0x7622xb){return ReportChat[_0x43e2[28]](_0x7622xa[_0x43e2[23]][_0x43e2[30]])[_0x43e2[15]](function(_0x7622x14){if(!_0x7622x14){return _0x7622xb[_0x43e2[24]](404)};var _0x7622x12=_[_0x43e2[26]](_0x7622x14,{rejectedAt:moment()[_0x43e2[41]](_0x43e2[40])});return _0x7622x12[_0x43e2[27]]()})[_0x43e2[15]](function(){return _0x7622xb[_0x43e2[24]](200)})[_0x43e2[12]](function(_0x7622xd){return handleError(_0x7622xb,_0x7622xd)})};function handleError(_0x7622xb,_0x7622xd){return _0x7622xb[_0x43e2[14]](500)[_0x43e2[13]](_0x7622xd)} \ No newline at end of file +'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); +} diff --git a/server/api/report_chat/report_chat.events.js b/server/api/report_chat/report_chat.events.js index ea0ef91..dd23889 100644 --- a/server/api/report_chat/report_chat.events.js +++ b/server/api/report_chat/report_chat.events.js @@ -1 +1,36 @@ -var _0x454c=["\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"];_0x454c[0];const EventEmitter=require(_0x454c[1]);const ReportChat=require(_0x454c[3])[_0x454c[2]];var ReportChatEvents= new EventEmitter();ReportChatEvents[_0x454c[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x454c[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x454c[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x454c[7]};for(var e in events){var event=events[e];ReportChat[_0x454c[8]](e,emitEvent(event))};function emitEvent(event){return function(_0xac91x8,_0xac91x9,_0xac91xa){ReportChatEvents[_0x454c[11]](event+ _0x454c[9]+ _0xac91x8[_0x454c[10]],_0xac91x8);ReportChatEvents[_0x454c[11]](event,_0xac91x8);_0xac91xa(null)}}module[_0x454c[12]]= ReportChatEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/report_chat/report_chat.socket.js b/server/api/report_chat/report_chat.socket.js index f4afd19..092868e 100644 --- a/server/api/report_chat/report_chat.socket.js +++ b/server/api/report_chat/report_chat.socket.js @@ -1 +1,42 @@ -var _0x9180=["\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"];_0x9180[0];const ReportChatEvents=require(_0x9180[1]);var events=[_0x9180[2],_0x9180[3]];exports[_0x9180[4]]= function(_0xc257x3){for(var _0xc257x4=0,_0xc257x5=events[_0x9180[5]];_0xc257x4< _0xc257x5;_0xc257x4++){var _0xc257x6=events[_0xc257x4];var _0xc257x7=createListener(_0x9180[6]+ _0xc257x6,_0xc257x3);ReportChatEvents[_0x9180[7]](_0xc257x6,_0xc257x7);_0xc257x3[_0x9180[7]](_0x9180[8],removeListener(_0xc257x6,_0xc257x7))}};function createListener(_0xc257x6,_0xc257x3){return function(_0xc257x9){switch(_0xc257x6){case _0x9180[9]:;case _0x9180[15]:if(_0xc257x3[_0x9180[10]]=== _0xc257x9[_0x9180[11]]|| _0xc257x3[_0x9180[12]]=== _0x9180[13]){_0xc257x3[_0x9180[14]](_0xc257x6,_0xc257x9)};break;case _0x9180[16]:_0xc257x3[_0x9180[14]](_0xc257x6,_0xc257x9);break;default:}}}function removeListener(_0xc257x6,_0xc257x7){return function(){ReportChatEvents[_0x9180[17]](_0xc257x6,_0xc257x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/report_chat_session/index.js b/server/api/report_chat_session/index.js index 394e46c..a90e04c 100644 --- a/server/api/report_chat_session/index.js +++ b/server/api/report_chat_session/index.js @@ -1 +1,19 @@ -var _0xc7bd=["\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"];_0xc7bd[0];var express=require(_0xc7bd[1]);var controller=require(_0xc7bd[2]);var auth=require(_0xc7bd[3]);var license=require(_0xc7bd[4]);var router=express.Router();router[_0xc7bd[12]](_0xc7bd[5],license[_0xc7bd[6]](),auth[_0xc7bd[7]](),license[_0xc7bd[8]](),auth[_0xc7bd[10]]([17],[_0xc7bd[9]]),controller[_0xc7bd[11]]);router[_0xc7bd[12]](_0xc7bd[13],license[_0xc7bd[6]](),auth[_0xc7bd[7]](),license[_0xc7bd[8]](),auth[_0xc7bd[10]]([17],[_0xc7bd[9]]),controller[_0xc7bd[14]]);router[_0xc7bd[12]](_0xc7bd[15],license[_0xc7bd[6]](),auth[_0xc7bd[7]](),license[_0xc7bd[8]](),auth[_0xc7bd[10]]([17],[_0xc7bd[9]]),controller[_0xc7bd[16]]);router[_0xc7bd[12]](_0xc7bd[17],license[_0xc7bd[6]](),auth[_0xc7bd[7]](),license[_0xc7bd[8]](),auth[_0xc7bd[10]]([17],[_0xc7bd[9]]),controller[_0xc7bd[18]]);router[_0xc7bd[12]](_0xc7bd[19],license[_0xc7bd[6]](),auth[_0xc7bd[7]](),license[_0xc7bd[8]](),auth[_0xc7bd[10]]([17],[_0xc7bd[9]]),controller[_0xc7bd[20]]);router[_0xc7bd[12]](_0xc7bd[21],license[_0xc7bd[6]](),auth[_0xc7bd[7]](),license[_0xc7bd[8]](),auth[_0xc7bd[10]]([17],[_0xc7bd[9]]),controller[_0xc7bd[22]]);router[_0xc7bd[12]](_0xc7bd[23],license[_0xc7bd[6]](),auth[_0xc7bd[7]](),license[_0xc7bd[8]](),auth[_0xc7bd[10]]([17],[_0xc7bd[9]]),controller[_0xc7bd[24]]);router[_0xc7bd[12]](_0xc7bd[25],license[_0xc7bd[6]](),auth[_0xc7bd[7]](),license[_0xc7bd[8]](),auth[_0xc7bd[10]]([8],[_0xc7bd[9],_0xc7bd[26]]),controller[_0xc7bd[27]]);module[_0xc7bd[28]]= router \ No newline at end of file +'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; 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 9ec8681..74b5dde 100644 --- a/server/api/report_chat_session/report_chat_session.controller.js +++ b/server/api/report_chat_session/report_chat_session.controller.js @@ -1 +1,225 @@ -var _0xdcc7=["\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"];_0xdcc7[0];var _=require(_0xdcc7[1]);var ReportChatSession=require(_0xdcc7[3])[_0xdcc7[2]];var User=require(_0xdcc7[3])[_0xdcc7[4]];var ReportChatSessionHistory=require(_0xdcc7[3])[_0xdcc7[6]][_0xdcc7[5]];var Promise=require(_0xdcc7[7]);var Util=require(_0xdcc7[8]);exports[_0xdcc7[9]]= function(_0xdc74x7,_0xdc74x8,_0xdc74x9){return ReportChatSession[_0xdcc7[16]](Util[_0xdcc7[15]](_0xdc74x7[_0xdcc7[14]]))[_0xdcc7[13]](function(_0xdc74xb){_0xdc74x8[_0xdcc7[12]](200)[_0xdcc7[11]](_0xdc74xb)})[_0xdcc7[10]](function(_0xdc74xa){return handleError(_0xdc74x8,_0xdc74xa)})};exports[_0xdcc7[17]]= function(_0xdc74x7,_0xdc74x8){return ReportChatSessionHistory[_0xdcc7[17]]()[_0xdcc7[13]](function(_0xdc74xc){return _0xdc74x8[_0xdcc7[12]](200)[_0xdcc7[11]](_0xdc74xc)})[_0xdcc7[10]](function(_0xdc74xa){return handleError(_0xdc74x8,_0xdc74xa)})};function getChatQueues(_0xdc74xe){return function(){switch(_0xdc74xe[_0xdcc7[28]]){case _0xdcc7[25]:return User[_0xdcc7[24]](_0xdc74xe[_0xdcc7[18]],{attributes:[_0xdcc7[18]]})[_0xdcc7[13]](Util[_0xdcc7[23]]({},{attributes:[_0xdcc7[18]],include:[{raw:true,model:User,attributes:[_0xdcc7[18]]}]}))[_0xdcc7[13]](function(_0xdc74xf){var _0xdc74x10=[];_0xdc74xf[_0xdcc7[22]][_0xdcc7[21]](function(_0xdc74x11){_0xdc74x10= _[_0xdcc7[20]](_0xdc74x10,_[_0xdcc7[19]](_0xdc74x11.Users,_0xdcc7[18]))});return {$or:{queue:_[_0xdcc7[19]](_0xdc74xf[_0xdcc7[22]],_0xdcc7[18]),memberid:_0xdc74x10}}});case _0xdcc7[27]:return User[_0xdcc7[24]](_0xdc74xe[_0xdcc7[18]],{attributes:[_0xdcc7[18]]})[_0xdcc7[13]](function(_0xdc74x12){return _0xdc74x12[_0xdcc7[26]]({attributes:[_0xdcc7[18]]})})[_0xdcc7[13]](function(_0xdc74xf){return {$or:{queue:_[_0xdcc7[19]](_0xdc74xf,_0xdcc7[18]),memberid:_0xdc74xe[_0xdcc7[18]]}}});default:return {}}}}exports[_0xdcc7[29]]= function(_0xdc74x7,_0xdc74x8){return Promise[_0xdcc7[33]]([])[_0xdcc7[13]](getChatQueues(_0xdc74x7[_0xdcc7[25]]))[_0xdcc7[13]](function(_0xdc74x14){return ReportChatSession[_0xdcc7[32]](Util[_0xdcc7[15]](_0xdc74x7[_0xdcc7[14]],_[_0xdcc7[31]]({leaveAt:null},_0xdc74x14)))})[_0xdcc7[13]](function(_0xdc74x13){return _0xdc74x8[_0xdcc7[12]](200)[_0xdcc7[11]]({rows:_0xdc74x13})})[_0xdcc7[10]](function(_0xdc74xa){console[_0xdcc7[30]](_0xdc74xa);return handleError(_0xdc74x8,_0xdc74xa)})};exports[_0xdcc7[34]]= function(_0xdc74x7,_0xdc74x8){return Promise[_0xdcc7[33]]([])[_0xdcc7[13]](getChatQueues(_0xdc74x7[_0xdcc7[25]]))[_0xdcc7[13]](function(_0xdc74x14){return ReportChatSession[_0xdcc7[35]](Util[_0xdcc7[15]](_0xdc74x7[_0xdcc7[14]],_[_0xdcc7[31]]({leaveAt:{$ne:null},complete:null,abandon:null,timeout:null},_0xdc74x14)))})[_0xdcc7[13]](function(_0xdc74x13){return _0xdc74x8[_0xdcc7[12]](200)[_0xdcc7[11]]({value:_0xdc74x13})})[_0xdcc7[10]](function(_0xdc74xa){console[_0xdcc7[30]](_0xdc74xa);return handleError(_0xdc74x8,_0xdc74xa)})};exports[_0xdcc7[36]]= function(_0xdc74x7,_0xdc74x8){return Promise[_0xdcc7[33]]([])[_0xdcc7[13]](getChatQueues(_0xdc74x7[_0xdcc7[25]]))[_0xdcc7[13]](function(_0xdc74x14){return ReportChatSession[_0xdcc7[35]](Util[_0xdcc7[15]](_0xdc74x7[_0xdcc7[14]],_[_0xdcc7[31]]({leaveAt:null},_0xdc74x14)))})[_0xdcc7[13]](function(_0xdc74x13){return _0xdc74x8[_0xdcc7[12]](200)[_0xdcc7[11]]({value:_0xdc74x13})})[_0xdcc7[10]](function(_0xdc74xa){console[_0xdcc7[30]](_0xdc74xa);return handleError(_0xdc74x8,_0xdc74xa)})};exports[_0xdcc7[37]]= function(_0xdc74x7,_0xdc74x8){return Promise[_0xdcc7[33]]([])[_0xdcc7[13]](getChatQueues(_0xdc74x7[_0xdcc7[25]]))[_0xdcc7[13]](function(_0xdc74x14){return ReportChatSession[_0xdcc7[35]](Util[_0xdcc7[15]](_0xdc74x7[_0xdcc7[14]],_[_0xdcc7[31]]({complete:true},_0xdc74x14)))})[_0xdcc7[13]](function(_0xdc74x13){return _0xdc74x8[_0xdcc7[12]](200)[_0xdcc7[11]]({value:_0xdc74x13})})[_0xdcc7[10]](function(_0xdc74xa){console[_0xdcc7[30]](_0xdc74xa);return handleError(_0xdc74x8,_0xdc74xa)})};exports[_0xdcc7[38]]= function(_0xdc74x7,_0xdc74x8){return Promise[_0xdcc7[33]]([])[_0xdcc7[13]](getChatQueues(_0xdc74x7[_0xdcc7[25]]))[_0xdcc7[13]](function(_0xdc74x14){return ReportChatSession[_0xdcc7[35]](Util[_0xdcc7[15]](_0xdc74x7[_0xdcc7[14]],_[_0xdcc7[31]]({timeout:true},_0xdc74x14)))})[_0xdcc7[13]](function(_0xdc74x13){return _0xdc74x8[_0xdcc7[12]](200)[_0xdcc7[11]]({value:_0xdc74x13})})[_0xdcc7[10]](function(_0xdc74xa){console[_0xdcc7[30]](_0xdc74xa);return handleError(_0xdc74x8,_0xdc74xa)})};exports[_0xdcc7[39]]= function(_0xdc74x7,_0xdc74x8){return Promise[_0xdcc7[33]]([])[_0xdcc7[13]](getChatQueues(_0xdc74x7[_0xdcc7[25]]))[_0xdcc7[13]](function(_0xdc74x14){return ReportChatSession[_0xdcc7[35]](Util[_0xdcc7[15]](_0xdc74x7[_0xdcc7[14]],_[_0xdcc7[31]]({abandon:true},_0xdc74x14)))})[_0xdcc7[13]](function(_0xdc74x13){return _0xdc74x8[_0xdcc7[12]](200)[_0xdcc7[11]]({value:_0xdc74x13})})[_0xdcc7[10]](function(_0xdc74xa){console[_0xdcc7[30]](_0xdc74xa);return handleError(_0xdc74x8,_0xdc74xa)})};function handleError(_0xdc74x8,_0xdc74xa){return _0xdc74x8[_0xdcc7[12]](500)[_0xdcc7[11]](_0xdc74xa)} \ No newline at end of file +'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); +} 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 f191ed1..5ae9bac 100644 --- a/server/api/report_chat_session/report_chat_session.events.js +++ b/server/api/report_chat_session/report_chat_session.events.js @@ -1 +1,36 @@ -var _0xef6f=["\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"];_0xef6f[0];const EventEmitter=require(_0xef6f[1]);const ReportChatSession=require(_0xef6f[3])[_0xef6f[2]];var ReportChatSessionEvents= new EventEmitter();ReportChatSessionEvents[_0xef6f[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xef6f[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xef6f[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xef6f[6]};for(var e in events){var event=events[e];ReportChatSession[_0xef6f[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x305cx8,_0x305cx9,_0x305cxa){ReportChatSessionEvents[_0xef6f[10]](event+ _0xef6f[8]+ _0x305cx8[_0xef6f[9]],_0x305cx8);ReportChatSessionEvents[_0xef6f[10]](event,_0x305cx8);_0x305cxa(null)}}module[_0xef6f[11]]= ReportChatSessionEvents \ No newline at end of file +/** + * 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; 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 d4ea58f..f9b1796 100644 --- a/server/api/report_chat_session/report_chat_session.socket.js +++ b/server/api/report_chat_session/report_chat_session.socket.js @@ -1 +1,102 @@ -var _0xbf1b=["\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"];_0xbf1b[0];const ReportChatSessionEvents=require(_0xbf1b[1]);const ReportChatSession=require(_0xbf1b[3])[_0xbf1b[2]];const User=require(_0xbf1b[3])[_0xbf1b[4]];const Util=require(_0xbf1b[5]);const _=require(_0xbf1b[6]);const Promise=require(_0xbf1b[7]);var events=[_0xbf1b[8],_0xbf1b[9]];exports[_0xbf1b[10]]= function(_0x8d37x8){for(var _0x8d37x9=0,_0x8d37xa=events[_0xbf1b[11]];_0x8d37x9< _0x8d37xa;_0x8d37x9++){var _0x8d37xb=events[_0x8d37x9];var _0x8d37xc=createListener(_0xbf1b[12]+ _0x8d37xb,_0x8d37x8);ReportChatSessionEvents[_0xbf1b[13]](_0x8d37xb,_0x8d37xc);_0x8d37x8[_0xbf1b[13]](_0xbf1b[14],removeListener(_0x8d37xb,_0x8d37xc))}};function createListener(_0x8d37xb,_0x8d37x8){return function(_0x8d37xe){onSave(_0x8d37x8,_0x8d37xe)}}function removeListener(_0x8d37xb,_0x8d37xc){return function(){ReportChatSessionEvents[_0xbf1b[15]](_0x8d37xb,_0x8d37xc)}}function getChatQueues(_0x8d37x11){return function(){switch(_0x8d37x11[_0xbf1b[28]]){case _0xbf1b[25]:return User[_0xbf1b[24]](_0x8d37x11[_0xbf1b[23]],{attributes:[_0xbf1b[16]]})[_0xbf1b[21]](Util[_0xbf1b[22]]({},{attributes:[_0xbf1b[16]],include:[{raw:true,model:User,attributes:[_0xbf1b[16]]}]}))[_0xbf1b[21]](function(_0x8d37x12){var _0x8d37x13=[];_0x8d37x12[_0xbf1b[20]][_0xbf1b[19]](function(_0x8d37x14){_0x8d37x13= _[_0xbf1b[18]](_0x8d37x13,_[_0xbf1b[17]](_0x8d37x14.Users,_0xbf1b[16]))});return {queue:_[_0xbf1b[17]](_0x8d37x12[_0xbf1b[20]],_0xbf1b[16]),memberid:_0x8d37x13}});case _0xbf1b[27]:return User[_0xbf1b[24]](_0x8d37x11[_0xbf1b[23]],{attributes:[_0xbf1b[16]]})[_0xbf1b[21]](function(_0x8d37x15){return _0x8d37x15[_0xbf1b[26]]({attributes:[_0xbf1b[16]]})})[_0xbf1b[21]](function(_0x8d37x12){return {queue:_[_0xbf1b[17]](_0x8d37x12,_0xbf1b[16]),memberid:_0x8d37x11[_0xbf1b[23]]}});default:return {}}}}function onSave(_0x8d37x8,_0x8d37xe,_0x8d37x17){return Promise[_0xbf1b[38]]([])[_0xbf1b[21]](getChatQueues(_0x8d37x8))[_0xbf1b[21]](function(_0x8d37x19){if(_0x8d37x8[_0xbf1b[28]]=== _0xbf1b[32]|| _[_0xbf1b[34]](_0x8d37x19[_0xbf1b[33]],_0x8d37xe[_0xbf1b[33]])|| _[_0xbf1b[34]](_0x8d37x19[_0xbf1b[35]],_0x8d37xe[_0xbf1b[35]])){_0x8d37x8[_0xbf1b[37]](_0xbf1b[36],_0x8d37xe)}})[_0xbf1b[31]](function(_0x8d37x18){console[_0xbf1b[30]](_0xbf1b[29],_0x8d37x18)})}function onRemove(_0x8d37x8,_0x8d37xe,_0x8d37x17){_0x8d37x8[_0xbf1b[37]](_0xbf1b[39],_0x8d37xe)} \ No newline at end of file +'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); +} diff --git a/server/api/report_dial/index.js b/server/api/report_dial/index.js index 40abd52..ea59483 100644 --- a/server/api/report_dial/index.js +++ b/server/api/report_dial/index.js @@ -1 +1,14 @@ -var _0x413d=["\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"];_0x413d[0];var express=require(_0x413d[1]);var auth=require(_0x413d[2]);var controller=require(_0x413d[3]);var router=express.Router();router[_0x413d[10]](_0x413d[4],auth[_0x413d[5]](),auth[_0x413d[8]]([17],[_0x413d[6],_0x413d[7]]),controller[_0x413d[9]]);router[_0x413d[10]](_0x413d[11],auth[_0x413d[5]](),auth[_0x413d[8]]([17],[_0x413d[6]]),controller[_0x413d[12]]);router[_0x413d[10]](_0x413d[13],auth[_0x413d[5]](),auth[_0x413d[8]]([7],[_0x413d[6],_0x413d[7]]),controller[_0x413d[14]]);module[_0x413d[15]]= router \ No newline at end of file +'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; diff --git a/server/api/report_dial/report_dial.controller.js b/server/api/report_dial/report_dial.controller.js index c36138a..5db39fb 100644 --- a/server/api/report_dial/report_dial.controller.js +++ b/server/api/report_dial/report_dial.controller.js @@ -1 +1,116 @@ -var _0xb319=["\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"];_0xb319[0];var _=require(_0xb319[1]);var sequelize=require(_0xb319[3])[_0xb319[2]];var ReportDial=require(_0xb319[3])[_0xb319[4]];var ReportDialHistory=require(_0xb319[3])[_0xb319[6]][_0xb319[5]];var Util=require(_0xb319[7]);function handleError(_0xd289x7,_0xd289x8){_0xd289x8= _0xd289x8|| 500;return function(_0xd289x9){console[_0xb319[8]](_0xd289x9);_0xd289x7[_0xb319[10]](_0xd289x8)[_0xb319[9]](_0xd289x9)}}function responseWithResult(_0xd289x7,_0xd289x8){_0xd289x8= _0xd289x8|| 200;return function(_0xd289xb){if(_0xd289xb){_0xd289x7[_0xb319[10]](_0xd289x8)[_0xb319[11]](_0xd289xb)}}}function handleEntityNotFound(_0xd289x7){return function(_0xd289xb){if(!_0xd289xb){_0xd289x7[_0xb319[10]](404)[_0xb319[12]]();return null};return _0xd289xb}}function saveUpdates(_0xd289xe){return function(_0xd289xb){return _0xd289xb[_0xb319[14]](_0xd289xe)[_0xb319[13]](function(_0xd289xf){return _0xd289xf})}}function removeEntity(_0xd289x7){return function(_0xd289xb){if(_0xd289xb){return _0xd289xb[_0xb319[15]]()[_0xb319[13]](function(){_0xd289x7[_0xb319[10]](204)[_0xb319[12]]()})}}}exports[_0xb319[16]]= function(_0xd289x11,_0xd289x7,_0xd289x12){return ReportDial[_0xb319[30]](Util[_0xb319[29]](_0xd289x11[_0xb319[28]]))[_0xb319[13]](function(_0xd289x13){if(_0xd289x11[_0xb319[19]][_0xb319[18]]=== _0xb319[20]){var _0xd289x14=[];_[_0xb319[26]](_0xd289x13[_0xb319[21]],function(_0xd289x15){if(_0xd289x15[_0xb319[22]]&& _0xd289x15[_0xb319[22]][_0xb319[23]](/\/|-/)[1]=== _0xd289x11[_0xb319[19]][_0xb319[24]]){_0xd289x14[_0xb319[25]](_0xd289x15)}});return {rows:_0xd289x14,count:_0xd289x14[_0xb319[27]]}};return _0xd289x13})[_0xb319[13]](function(_0xd289x13){return _0xd289x7[_0xb319[10]](200)[_0xb319[9]](_0xd289x13)})[_0xb319[17]](handleError(_0xd289x7))};exports[_0xb319[31]]= function(_0xd289x11,_0xd289x7){return ReportDial[_0xb319[32]](Util[_0xb319[29]](_0xd289x11[_0xb319[28]],{endtime:null}))[_0xb319[13]](function(_0xd289x13){return _0xd289x7[_0xb319[10]](200)[_0xb319[9]]({rows:_0xd289x13,count:_0xd289x13[_0xb319[27]]})})[_0xb319[17]](handleError(_0xd289x7))};exports[_0xb319[33]]= function(_0xd289x11,_0xd289x7){return ReportDialHistory[_0xb319[33]]()[_0xb319[13]](function(_0xd289x16){return _0xd289x7[_0xb319[10]](200)[_0xb319[9]](_0xd289x16)})[_0xb319[17]](handleError(_0xd289x7))} \ No newline at end of file +/** + * 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)); +}; diff --git a/server/api/report_dial/report_dial.events.js b/server/api/report_dial/report_dial.events.js index beb791f..385b3cf 100644 --- a/server/api/report_dial/report_dial.events.js +++ b/server/api/report_dial/report_dial.events.js @@ -1 +1,36 @@ -var _0x52ad=["\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"];_0x52ad[0];const EventEmitter=require(_0x52ad[1]);const ReportDial=require(_0x52ad[3])[_0x52ad[2]];var ReportDialEvents= new EventEmitter();ReportDialEvents[_0x52ad[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x52ad[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x52ad[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x52ad[7]};for(var e in events){var event=events[e];ReportDial[_0x52ad[8]](e,emitEvent(event))};function emitEvent(event){return function(_0xec35x8,_0xec35x9,_0xec35xa){ReportDialEvents[_0x52ad[11]](event+ _0x52ad[9]+ _0xec35x8[_0x52ad[10]],_0xec35x8);ReportDialEvents[_0x52ad[11]](event,_0xec35x8);_0xec35xa(null)}}module[_0x52ad[12]]= ReportDialEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/report_dial/report_dial.socket.js b/server/api/report_dial/report_dial.socket.js index 96836f0..7d9498d 100644 --- a/server/api/report_dial/report_dial.socket.js +++ b/server/api/report_dial/report_dial.socket.js @@ -1 +1,30 @@ -var _0x605c=["\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"];_0x605c[0];const ReportDialEvents=require(_0x605c[1]);var events=[_0x605c[2],_0x605c[3],_0x605c[4]];exports[_0x605c[5]]= function(_0xd933x3){for(var _0xd933x4=0,_0xd933x5=events[_0x605c[6]];_0xd933x4< _0xd933x5;_0xd933x4++){var _0xd933x6=events[_0xd933x4];var _0xd933x7=createListener(_0x605c[7]+ _0xd933x6,_0xd933x3);ReportDialEvents[_0x605c[8]](_0xd933x6,_0xd933x7);_0xd933x3[_0x605c[8]](_0x605c[9],removeListener(_0xd933x6,_0xd933x7))}};function createListener(_0xd933x6,_0xd933x3){return function(_0xd933x9){if(_0xd933x3[_0x605c[10]]=== _0x605c[11]|| (_0xd933x9[_0x605c[12]]&& _0xd933x9[_0x605c[12]][_0x605c[13]](/\/|-/)[1]=== _0xd933x3[_0x605c[14]])){_0xd933x3[_0x605c[15]](_0xd933x6,_0xd933x9)}}}function removeListener(_0xd933x6,_0xd933x7){return function(){ReportDialEvents[_0x605c[16]](_0xd933x6,_0xd933x7)}} \ No newline at end of file +'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); + }; +} diff --git a/server/api/report_fax/index.js b/server/api/report_fax/index.js index 20aff31..e19c074 100644 --- a/server/api/report_fax/index.js +++ b/server/api/report_fax/index.js @@ -1 +1,13 @@ -var _0x7a9b=["\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"];_0x7a9b[0];var express=require(_0x7a9b[1]);var controller=require(_0x7a9b[2]);var auth=require(_0x7a9b[3]);var license=require(_0x7a9b[4]);var router=express.Router();router[_0x7a9b[12]](_0x7a9b[5],auth[_0x7a9b[6]](),license[_0x7a9b[7]](),auth[_0x7a9b[10]]([17],[_0x7a9b[8],_0x7a9b[9]]),controller[_0x7a9b[11]]);router[_0x7a9b[12]](_0x7a9b[13],auth[_0x7a9b[6]](),license[_0x7a9b[7]](),auth[_0x7a9b[14]](_0x7a9b[9]),controller[_0x7a9b[15]]);router[_0x7a9b[12]](_0x7a9b[16],auth[_0x7a9b[6]](),license[_0x7a9b[7]](),auth[_0x7a9b[14]](_0x7a9b[9]),controller[_0x7a9b[17]]);module[_0x7a9b[18]]= router \ No newline at end of file +'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; diff --git a/server/api/report_fax/report_fax.controller.js b/server/api/report_fax/report_fax.controller.js index e5ca8d9..55d6694 100644 --- a/server/api/report_fax/report_fax.controller.js +++ b/server/api/report_fax/report_fax.controller.js @@ -1 +1,127 @@ -var _0x9235=["\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"];_0x9235[0];var _=require(_0x9235[1]);var moment=require(_0x9235[2]);var FaxRoom=require(_0x9235[4])[_0x9235[3]];var FaxRoomStatus=require(_0x9235[4])[_0x9235[5]];var ReportFax=require(_0x9235[4])[_0x9235[6]];var sequelize=require(_0x9235[4])[_0x9235[7]];var Agent=require(_0x9235[4])[_0x9235[8]];var Util=require(_0x9235[9]);exports[_0x9235[10]]= function(_0xb35ax9,_0xb35axa,_0xb35axb){return ReportFax[_0x9235[17]](Util[_0x9235[16]](_0xb35ax9[_0x9235[15]]))[_0x9235[14]](function(_0xb35axd){_0xb35axa[_0x9235[13]](200)[_0x9235[12]](_0xb35axd)})[_0x9235[11]](function(_0xb35axc){return handleError(_0xb35axa,_0xb35axc)})};exports[_0x9235[18]]= function(_0xb35ax9,_0xb35axa){var _0xb35axe;var _0xb35axf=_0xb35ax9[_0x9235[22]][_0x9235[21]][_0x9235[20]](_0x9235[19])[1];return Agent[_0x9235[31]](_0xb35ax9[_0x9235[26]][_0x9235[30]],{attributes:[_0x9235[30],_0x9235[34]]})[_0x9235[14]](function(_0xb35ax13){_0xb35axe= _0xb35ax13;return _0xb35ax13[_0x9235[33]]({where:{status:{$ne:_0x9235[32]},id:{$ne:_0xb35axf}},attributes:[_0x9235[30]]})})[_0x9235[14]](function(_0xb35ax12){return ReportFax[_0x9235[31]](_0xb35ax9[_0x9235[22]][_0x9235[30]])})[_0x9235[14]](function(_0xb35ax10){if(!_0xb35ax10){return _0xb35axa[_0x9235[23]](404)};var _0xb35ax11=_[_0x9235[28]](_0xb35ax10,{connectid:_0xb35ax9[_0x9235[22]][_0x9235[21]]});return _0xb35ax11[_0x9235[29]]()})[_0x9235[14]](function(){return FaxRoom[_0x9235[27]]({status:_0x9235[24],openReason:_0x9235[25]},{where:{id:_0xb35axf},user:_0xb35ax9[_0x9235[26]],individualHooks:true})})[_0x9235[14]](function(){return _0xb35axa[_0x9235[23]](200)})[_0x9235[11]](sequelize.UniqueConstraintError,function(_0xb35axc){return _0xb35axa[_0x9235[23]](504)})[_0x9235[11]](function(_0xb35axc){return handleError(_0xb35axa,_0xb35axc)})};exports[_0x9235[35]]= function(_0xb35ax9,_0xb35axa){var _0xb35ax14;return ReportFax[_0x9235[31]](_0xb35ax9[_0x9235[22]][_0x9235[30]])[_0x9235[14]](function(_0xb35ax10){_0xb35ax14= _0xb35ax10;if(!_0xb35ax10){return _0xb35axa[_0x9235[23]](404)};var _0xb35ax11=_[_0x9235[28]](_0xb35ax10,{rejectedAt:moment()[_0x9235[42]](_0x9235[41])});return _0xb35ax11[_0x9235[29]]()})[_0x9235[14]](function(){return FaxRoomStatus[_0x9235[40]]({status:_0x9235[36],data1:_0xb35ax9[_0x9235[26]][_0x9235[37]],data2:_0xb35ax9[_0x9235[26]][_0x9235[38]],UserId:_0xb35ax9[_0x9235[26]][_0x9235[30]],MailRoomId:_0xb35ax14[_0x9235[39]]})})[_0x9235[14]](function(){return _0xb35axa[_0x9235[23]](200)})[_0x9235[11]](function(_0xb35axc){return handleError(_0xb35axa,_0xb35axc)})};function handleError(_0xb35axa,_0xb35axc){return _0xb35axa[_0x9235[13]](500)[_0x9235[12]](_0xb35axc)} \ No newline at end of file +'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); +} diff --git a/server/api/report_fax/report_fax.events.js b/server/api/report_fax/report_fax.events.js index 59eb076..f0e5f3e 100644 --- a/server/api/report_fax/report_fax.events.js +++ b/server/api/report_fax/report_fax.events.js @@ -1 +1,36 @@ -var _0xd797=["\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"];_0xd797[0];const EventEmitter=require(_0xd797[1]);const ReportFax=require(_0xd797[3])[_0xd797[2]];var ReportFaxEvents= new EventEmitter();ReportFaxEvents[_0xd797[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd797[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd797[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd797[7]};for(var e in events){var event=events[e];ReportFax[_0xd797[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x4ca9x8,_0x4ca9x9,_0x4ca9xa){ReportFaxEvents[_0xd797[11]](event+ _0xd797[9]+ _0x4ca9x8[_0xd797[10]],_0x4ca9x8);ReportFaxEvents[_0xd797[11]](event,_0x4ca9x8);_0x4ca9xa(null)}}module[_0xd797[12]]= ReportFaxEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/report_fax/report_fax.socket.js b/server/api/report_fax/report_fax.socket.js index a0207b3..7d32de9 100644 --- a/server/api/report_fax/report_fax.socket.js +++ b/server/api/report_fax/report_fax.socket.js @@ -1 +1,44 @@ -var _0x7bf8=["\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"];_0x7bf8[0];const ReportFaxEvents=require(_0x7bf8[1]);var events=[_0x7bf8[2],_0x7bf8[3],_0x7bf8[4]];exports[_0x7bf8[5]]= function(_0x90d0x3){for(var _0x90d0x4=0,_0x90d0x5=events[_0x7bf8[6]];_0x90d0x4< _0x90d0x5;_0x90d0x4++){var _0x90d0x6=events[_0x90d0x4];var _0x90d0x7=createListener(_0x7bf8[7]+ _0x90d0x6,_0x90d0x3);ReportFaxEvents[_0x7bf8[8]](_0x90d0x6,_0x90d0x7);_0x90d0x3[_0x7bf8[8]](_0x7bf8[9],removeListener(_0x90d0x6,_0x90d0x7))}};function createListener(_0x90d0x6,_0x90d0x3){return function(_0x90d0x9){switch(_0x90d0x6){case _0x7bf8[10]:;case _0x7bf8[16]:if(_0x90d0x3[_0x7bf8[11]]=== _0x90d0x9[_0x7bf8[12]]|| _0x90d0x3[_0x7bf8[13]]=== _0x7bf8[14]){_0x90d0x3[_0x7bf8[15]](_0x90d0x6,_0x90d0x9)};break;case _0x7bf8[17]:_0x90d0x3[_0x7bf8[15]](_0x90d0x6,_0x90d0x9);break;default:}}}function removeListener(_0x90d0x6,_0x90d0x7){return function(){ReportFaxEvents[_0x7bf8[18]](_0x90d0x6,_0x90d0x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/report_fax_session/index.js b/server/api/report_fax_session/index.js index 7cf4c46..14bf55c 100644 --- a/server/api/report_fax_session/index.js +++ b/server/api/report_fax_session/index.js @@ -1 +1,15 @@ -var _0xcb2e=["\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"];_0xcb2e[0];var express=require(_0xcb2e[1]);var auth=require(_0xcb2e[2]);var controller=require(_0xcb2e[3]);var license=require(_0xcb2e[4]);var router=express.Router();router[_0xcb2e[11]](_0xcb2e[5],auth[_0xcb2e[6]](),license[_0xcb2e[7]](),auth[_0xcb2e[9]]([17],[_0xcb2e[8]]),controller[_0xcb2e[10]]);router[_0xcb2e[11]](_0xcb2e[12],auth[_0xcb2e[6]](),license[_0xcb2e[7]](),auth[_0xcb2e[9]]([17],[_0xcb2e[8]]),controller[_0xcb2e[13]]);router[_0xcb2e[11]](_0xcb2e[14],license[_0xcb2e[15]](),auth[_0xcb2e[6]](),license[_0xcb2e[7]](),auth[_0xcb2e[9]]([17],[_0xcb2e[8]]),controller[_0xcb2e[16]]);router[_0xcb2e[11]](_0xcb2e[17],license[_0xcb2e[15]](),auth[_0xcb2e[6]](),license[_0xcb2e[7]](),auth[_0xcb2e[9]]([17],[_0xcb2e[8]]),controller[_0xcb2e[18]]);router[_0xcb2e[11]](_0xcb2e[19],auth[_0xcb2e[6]](),license[_0xcb2e[7]](),auth[_0xcb2e[9]]([10],[_0xcb2e[8],_0xcb2e[20]]),controller[_0xcb2e[21]]);module[_0xcb2e[22]]= router \ No newline at end of file +'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; 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 69e3a46..29bf8ba 100644 --- a/server/api/report_fax_session/report_fax_session.controller.js +++ b/server/api/report_fax_session/report_fax_session.controller.js @@ -1 +1,238 @@ -var _0xd358=["\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"];_0xd358[0];var _=require(_0xd358[1]);var Util=require(_0xd358[2]);var ReportFaxSession=require(_0xd358[4])[_0xd358[3]];var ReportFaxSessionHistory=require(_0xd358[4])[_0xd358[6]][_0xd358[5]];var User=require(_0xd358[4])[_0xd358[7]];function handleError(_0x1abdx7,_0x1abdx8){_0x1abdx8= _0x1abdx8|| 500;return function(_0x1abdx9){_0x1abdx7[_0xd358[9]](_0x1abdx8)[_0xd358[8]](_0x1abdx9)}}function responseWithResult(_0x1abdx7,_0x1abdx8){_0x1abdx8= _0x1abdx8|| 200;return function(_0x1abdxb){if(_0x1abdxb){_0x1abdx7[_0xd358[9]](_0x1abdx8)[_0xd358[10]](_0x1abdxb)}}}function responseWithoutResult(_0x1abdx7,_0x1abdx8){_0x1abdx8= _0x1abdx8|| 204;return function(){_0x1abdx7[_0xd358[11]](_0x1abdx8)}}function handleEntityNotFound(_0x1abdx7){return function(_0x1abdxb){if(!_0x1abdxb){_0x1abdx7[_0xd358[9]](404)[_0xd358[12]]();return null};return _0x1abdxb}}function saveUpdates(_0x1abdxf){return function(_0x1abdxb){return _0x1abdxb[_0xd358[14]](_0x1abdxf)[_0xd358[13]](function(_0x1abdx10){return _0x1abdx10})}}function removeEntity(_0x1abdx7){return function(_0x1abdxb){if(_0x1abdxb){return _0x1abdxb[_0xd358[15]]()[_0xd358[13]](function(){_0x1abdx7[_0xd358[9]](204)[_0xd358[12]]()})}}}exports[_0xd358[16]]= function(_0x1abdx12,_0x1abdx7){return ReportFaxSession[_0xd358[20]](Util[_0xd358[19]](_0x1abdx12[_0xd358[18]]))[_0xd358[13]](responseWithResult(_0x1abdx7))[_0xd358[17]](handleError(_0x1abdx7))};exports[_0xd358[21]]= function(_0x1abdx12,_0x1abdx7){return ReportFaxSession[_0xd358[24]](_0x1abdx12[_0xd358[23]][_0xd358[22]])[_0xd358[13]](handleEntityNotFound(_0x1abdx7))[_0xd358[13]](responseWithResult(_0x1abdx7))[_0xd358[17]](handleError(_0x1abdx7))};exports[_0xd358[25]]= function(_0x1abdx12,_0x1abdx7){return ReportFaxSession[_0xd358[25]](_0x1abdx12[_0xd358[26]])[_0xd358[13]](responseWithResult(_0x1abdx7,201))[_0xd358[17]](handleError(_0x1abdx7))};exports[_0xd358[27]]= function(_0x1abdx12,_0x1abdx7){if(_0x1abdx12[_0xd358[26]][_0xd358[22]]){delete _0x1abdx12[_0xd358[26]][_0xd358[22]]};return ReportFaxSession[_0xd358[24]](_0x1abdx12[_0xd358[23]][_0xd358[22]])[_0xd358[13]](handleEntityNotFound(_0x1abdx7))[_0xd358[13]](saveUpdates(_0x1abdx12[_0xd358[26]]))[_0xd358[13]](responseWithResult(_0x1abdx7))[_0xd358[17]](handleError(_0x1abdx7))};exports[_0xd358[15]]= function(_0x1abdx12,_0x1abdx7){return ReportFaxSession[_0xd358[24]](_0x1abdx12[_0xd358[23]][_0xd358[22]])[_0xd358[13]](handleEntityNotFound(_0x1abdx7))[_0xd358[13]](removeEntity(_0x1abdx7))[_0xd358[17]](handleError(_0x1abdx7))};exports[_0xd358[28]]= function(_0x1abdx12,_0x1abdx7){return ReportFaxSessionHistory[_0xd358[28]]()[_0xd358[13]](function(_0x1abdx13){return _0x1abdx7[_0xd358[9]](200)[_0xd358[8]](_0x1abdx13)})[_0xd358[17]](handleError(_0x1abdx7))};exports[_0xd358[29]]= function(_0x1abdx12,_0x1abdx7){return Promise[_0xd358[34]]([])[_0xd358[13]](getFaxQueues(_0x1abdx12[_0xd358[33]]))[_0xd358[13]](function(_0x1abdx15){return ReportFaxSession[_0xd358[32]](Util[_0xd358[19]](_0x1abdx12[_0xd358[18]],_[_0xd358[31]]({timeout:true},_0x1abdx15)))})[_0xd358[13]](function(_0x1abdx14){return _0x1abdx7[_0xd358[9]](200)[_0xd358[8]]({value:_0x1abdx14})})[_0xd358[17]](function(_0x1abdx9){console[_0xd358[30]](_0x1abdx9);return handleError(_0x1abdx7,_0x1abdx9)})};exports[_0xd358[35]]= function(_0x1abdx12,_0x1abdx7){return Promise[_0xd358[34]]([])[_0xd358[13]](getFaxQueues(_0x1abdx12[_0xd358[33]]))[_0xd358[13]](function(_0x1abdx15){return ReportFaxSession[_0xd358[32]](Util[_0xd358[19]](_0x1abdx12[_0xd358[18]],_[_0xd358[31]]({leaveAt:null},_0x1abdx15)))})[_0xd358[13]](function(_0x1abdx14){return _0x1abdx7[_0xd358[9]](200)[_0xd358[8]]({value:_0x1abdx14})})[_0xd358[17]](function(_0x1abdx9){console[_0xd358[30]](_0x1abdx9);return handleError(_0x1abdx7,_0x1abdx9)})};exports[_0xd358[36]]= function(_0x1abdx12,_0x1abdx7){return Promise[_0xd358[34]]([])[_0xd358[13]](getFaxQueues(_0x1abdx12[_0xd358[33]]))[_0xd358[13]](function(_0x1abdx15){return ReportFaxSession[_0xd358[20]](Util[_0xd358[19]](_0x1abdx12[_0xd358[18]],_[_0xd358[31]]({leaveAt:null},_0x1abdx15)))})[_0xd358[13]](function(_0x1abdx14){return _0x1abdx7[_0xd358[9]](200)[_0xd358[8]]({rows:_0x1abdx14})})[_0xd358[17]](handleError(_0x1abdx7))};function getFaxQueues(_0x1abdx17){return function(){switch(_0x1abdx17[_0xd358[44]]){case _0xd358[33]:return User[_0xd358[24]](_0x1abdx17[_0xd358[22]],{attributes:[_0xd358[22]]})[_0xd358[13]](Util[_0xd358[41]]({},{attributes:[_0xd358[22]],include:[{raw:true,model:User,attributes:[_0xd358[22]]}]}))[_0xd358[13]](function(_0x1abdx18){var _0x1abdx19=[];_0x1abdx18[_0xd358[40]][_0xd358[39]](function(_0x1abdx1a){_0x1abdx19= _[_0xd358[38]](_0x1abdx19,_[_0xd358[37]](_0x1abdx1a.Users,_0xd358[22]))});return {$or:{queue:_[_0xd358[37]](_0x1abdx18[_0xd358[40]],_0xd358[22]),memberid:_0x1abdx19}}});case _0xd358[43]:return User[_0xd358[24]](_0x1abdx17[_0xd358[22]],{attributes:[_0xd358[22]]})[_0xd358[13]](function(_0x1abdx1b){return _0x1abdx1b[_0xd358[42]]({attributes:[_0xd358[22]]})})[_0xd358[13]](function(_0x1abdx18){return {$or:{queue:_[_0xd358[37]](_0x1abdx18,_0xd358[22]),memberid:_0x1abdx17[_0xd358[22]]}}});default:return {}}}} \ No newline at end of file +/** + * 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 {}; + } + } +} 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 99c5188..6d9b5cc 100644 --- a/server/api/report_fax_session/report_fax_session.events.js +++ b/server/api/report_fax_session/report_fax_session.events.js @@ -1 +1,36 @@ -var _0xfc9b=["\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"];_0xfc9b[0];const EventEmitter=require(_0xfc9b[1]);const ReportFaxSession=require(_0xfc9b[3])[_0xfc9b[2]];var ReportFaxSessionEvents= new EventEmitter();ReportFaxSessionEvents[_0xfc9b[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xfc9b[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xfc9b[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xfc9b[6]};for(var e in events){var event=events[e];ReportFaxSession[_0xfc9b[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6a2dx8,_0x6a2dx9,_0x6a2dxa){ReportFaxSessionEvents[_0xfc9b[10]](event+ _0xfc9b[8]+ _0x6a2dx8[_0xfc9b[9]],_0x6a2dx8);ReportFaxSessionEvents[_0xfc9b[10]](event,_0x6a2dx8);_0x6a2dxa(null)}}module[_0xfc9b[11]]= ReportFaxSessionEvents \ No newline at end of file +/** + * 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; 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 001a72b..53585b9 100644 --- a/server/api/report_fax_session/report_fax_session.socket.js +++ b/server/api/report_fax_session/report_fax_session.socket.js @@ -1 +1,104 @@ -var _0x1f76=["\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"];_0x1f76[0];const ReportFaxSession=require(_0x1f76[1]);const User=require(_0x1f76[3])[_0x1f76[2]];const Util=require(_0x1f76[4]);const _=require(_0x1f76[5]);const Promise=require(_0x1f76[6]);var events=[_0x1f76[7],_0x1f76[8]];exports[_0x1f76[9]]= function(_0x1313x7){for(var _0x1313x8=0,_0x1313x9=events[_0x1f76[10]];_0x1313x8< _0x1313x9;_0x1313x8++){var _0x1313xa=events[_0x1313x8];var _0x1313xb=createListener(_0x1f76[11]+ _0x1313xa,_0x1313x7);ReportFaxSession[_0x1f76[12]](_0x1313xa,_0x1313xb);_0x1313x7[_0x1f76[12]](_0x1f76[13],removeListener(_0x1313xa,_0x1313xb))}};function createListener(_0x1313xa,_0x1313x7){return function(_0x1313xd){switch(_0x1313xa){case _0x1f76[25]:return Promise[_0x1f76[24]]([])[_0x1f76[23]](getFaxQueues(_0x1313x7))[_0x1f76[23]](function(_0x1313xf){if(_0x1313x7[_0x1f76[17]]=== _0x1f76[18]|| _[_0x1f76[20]](_0x1313xf[_0x1f76[19]],_0x1313xd[_0x1f76[19]])|| _[_0x1f76[20]](_0x1313xf[_0x1f76[21]],_0x1313xd[_0x1f76[21]])){_0x1313x7[_0x1f76[22]](_0x1313xa,_0x1313xd)}})[_0x1f76[16]](function(_0x1313xe){console[_0x1f76[15]](_0x1f76[14],_0x1313xe)});case _0x1f76[26]:_0x1313x7[_0x1f76[22]](_0x1313xa,_0x1313xd);break;default:}}}function removeListener(_0x1313xa,_0x1313xb){return function(){ReportFaxSession[_0x1f76[27]](_0x1313xa,_0x1313xb)}}function getFaxQueues(_0x1313x12){return function(){switch(_0x1313x12[_0x1f76[17]]){case _0x1f76[36]:return User[_0x1f76[35]](_0x1313x12[_0x1f76[34]],{attributes:[_0x1f76[28]]})[_0x1f76[23]](Util[_0x1f76[33]]({},{attributes:[_0x1f76[28]],include:[{raw:true,model:User,attributes:[_0x1f76[28]]}]}))[_0x1f76[23]](function(_0x1313x13){var _0x1313x14=[];_0x1313x13[_0x1f76[32]][_0x1f76[31]](function(_0x1313x15){_0x1313x14= _[_0x1f76[30]](_0x1313x14,_[_0x1f76[29]](_0x1313x15.Users,_0x1f76[28]))});return {queue:_[_0x1f76[29]](_0x1313x13[_0x1f76[32]],_0x1f76[28]),memberid:_0x1313x14}});case _0x1f76[38]:return User[_0x1f76[35]](_0x1313x12[_0x1f76[34]],{attributes:[_0x1f76[28]]})[_0x1f76[23]](function(_0x1313x16){return _0x1313x16[_0x1f76[37]]({attributes:[_0x1f76[28]]})})[_0x1f76[23]](function(_0x1313x13){return {queue:_[_0x1f76[29]](_0x1313x13,_0x1f76[28]),memberid:_0x1313x12[_0x1f76[34]]}});default:return {}}}} \ No newline at end of file +/** + * 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 {}; + } + } +} diff --git a/server/api/report_integration/index.js b/server/api/report_integration/index.js index 9b1d2b0..80f013c 100644 --- a/server/api/report_integration/index.js +++ b/server/api/report_integration/index.js @@ -1 +1,13 @@ -var _0xb999=["\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"];_0xb999[0];var express=require(_0xb999[1]);var controller=require(_0xb999[2]);var auth=require(_0xb999[3]);var router=express.Router();router[_0xb999[9]](_0xb999[4],auth[_0xb999[5]](),auth[_0xb999[7]]([17],[_0xb999[6]]),controller[_0xb999[8]]);router[_0xb999[9]](_0xb999[10],auth[_0xb999[5]](),auth[_0xb999[7]]([17],[_0xb999[6]]),controller[_0xb999[11]]);router[_0xb999[13]](_0xb999[4],auth[_0xb999[5]](),controller[_0xb999[12]]);module[_0xb999[14]]= router \ No newline at end of file +'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; diff --git a/server/api/report_integration/report_integration.controller.js b/server/api/report_integration/report_integration.controller.js index 43864f0..ebc479d 100644 --- a/server/api/report_integration/report_integration.controller.js +++ b/server/api/report_integration/report_integration.controller.js @@ -1 +1,46 @@ -var _0x94f4=["\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"];_0x94f4[0];var _=require(_0x94f4[1]);var ReportIntegration=require(_0x94f4[3])[_0x94f4[2]];var ReportIntegrationHistory=require(_0x94f4[3])[_0x94f4[5]][_0x94f4[4]];var Util=require(_0x94f4[6]);exports[_0x94f4[7]]= function(_0xa23dx5,_0xa23dx6,_0xa23dx7){return ReportIntegration[_0x94f4[14]](Util[_0x94f4[13]](_0xa23dx5[_0x94f4[12]]))[_0x94f4[11]](function(_0xa23dx9){return _0xa23dx6[_0x94f4[10]](200)[_0x94f4[9]](_0xa23dx9)})[_0x94f4[8]](function(_0xa23dx8){return handleError(_0xa23dx6,_0xa23dx8)})};exports[_0x94f4[15]]= function(_0xa23dx5,_0xa23dx6){return ReportIntegrationHistory[_0x94f4[15]]()[_0x94f4[11]](function(_0xa23dxa){return _0xa23dx6[_0x94f4[10]](200)[_0x94f4[9]](_0xa23dxa)})[_0x94f4[8]](function(_0xa23dx8){return handleError(_0xa23dx6,_0xa23dx8)})};exports[_0x94f4[16]]= function(_0xa23dx5,_0xa23dx6){return ReportIntegration[_0x94f4[16]](_0xa23dx5[_0x94f4[17]])[_0x94f4[11]](function(_0xa23dxb){return _0xa23dx6[_0x94f4[10]](201)[_0x94f4[9]](_0xa23dxb)})[_0x94f4[8]](function(_0xa23dx8){return handleError(_0xa23dx6,_0xa23dx8)})};function handleError(_0xa23dx6,_0xa23dx8){return _0xa23dx6[_0x94f4[10]](500)[_0x94f4[9]](_0xa23dx8)} \ No newline at end of file +'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); +} diff --git a/server/api/report_integration/report_integration.events.js b/server/api/report_integration/report_integration.events.js index 6aea1bf..ea294b9 100644 --- a/server/api/report_integration/report_integration.events.js +++ b/server/api/report_integration/report_integration.events.js @@ -1 +1,34 @@ -var _0x36f5=["\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"];_0x36f5[0];const EventEmitter=require(_0x36f5[1]);const ReportIntegration=require(_0x36f5[3])[_0x36f5[2]];var ReportIntegrationEvents= new EventEmitter();ReportIntegrationEvents[_0x36f5[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x36f5[5]};for(var e in events){var event=events[e];ReportIntegration[_0x36f5[6]](e,emitEvent(event))};function emitEvent(event){return function(_0x7d6bx8,_0x7d6bx9,_0x7d6bxa){ReportIntegrationEvents[_0x36f5[9]](event+ _0x36f5[7]+ _0x7d6bx8[_0x36f5[8]],_0x7d6bx8);ReportIntegrationEvents[_0x36f5[9]](event,_0x7d6bx8);_0x7d6bxa(null)}}module[_0x36f5[10]]= ReportIntegrationEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/report_integration/report_integration.socket.js b/server/api/report_integration/report_integration.socket.js index c21e0c4..78f2dea 100644 --- a/server/api/report_integration/report_integration.socket.js +++ b/server/api/report_integration/report_integration.socket.js @@ -1 +1,41 @@ -var _0xe149=["\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"];_0xe149[0];const ReportIntegrationEvents=require(_0xe149[1]);const util=require(_0xe149[2]);var events=[_0xe149[3]];exports[_0xe149[4]]= function(_0x9116x4){for(var _0x9116x5=0,_0x9116x6=events[_0xe149[5]];_0x9116x5< _0x9116x6;_0x9116x5++){var _0x9116x7=events[_0x9116x5];var _0x9116x8=createListener(_0xe149[6]+ _0x9116x7,_0x9116x4);ReportIntegrationEvents[_0xe149[7]](_0x9116x7,_0x9116x8);_0x9116x4[_0xe149[7]](_0xe149[8],removeListener(_0x9116x7,_0x9116x8))}};function createListener(_0x9116x7,_0x9116x4){return function(_0x9116xa){switch(_0x9116x7){case _0xe149[15]:if(_0x9116x4[_0xe149[9]]=== _0x9116xa[_0xe149[10]]){_0x9116x4[_0xe149[14]](util[_0xe149[13]](_0xe149[11],_0x9116xa[_0xe149[12]]),_0x9116xa)};break;default:}}}function removeListener(_0x9116x7,_0x9116x8){return function(){ReportIntegrationEvents[_0xe149[16]](_0x9116x7,_0x9116x8)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/report_mail/index.js b/server/api/report_mail/index.js index baedf3b..9256f76 100644 --- a/server/api/report_mail/index.js +++ b/server/api/report_mail/index.js @@ -1 +1,14 @@ -var _0x2340=["\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"];_0x2340[0];var express=require(_0x2340[1]);var controller=require(_0x2340[2]);var auth=require(_0x2340[3]);var license=require(_0x2340[4]);var router=express.Router();router[_0x2340[12]](_0x2340[5],auth[_0x2340[6]](),license[_0x2340[7]](),auth[_0x2340[10]]([17],[_0x2340[8],_0x2340[9]]),controller[_0x2340[11]]);router[_0x2340[12]](_0x2340[13],auth[_0x2340[6]](),license[_0x2340[7]](),auth[_0x2340[14]](_0x2340[9]),controller[_0x2340[15]]);router[_0x2340[12]](_0x2340[16],auth[_0x2340[6]](),license[_0x2340[7]](),auth[_0x2340[14]](_0x2340[9]),controller[_0x2340[17]]);module[_0x2340[18]]= router \ No newline at end of file +'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; diff --git a/server/api/report_mail/report_mail.controller.js b/server/api/report_mail/report_mail.controller.js index 1dcb2ef..c0a5cde 100644 --- a/server/api/report_mail/report_mail.controller.js +++ b/server/api/report_mail/report_mail.controller.js @@ -1 +1,113 @@ -var _0xc2f6=["\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"];_0xc2f6[0];var _=require(_0xc2f6[1]);var moment=require(_0xc2f6[2]);var Report=require(_0xc2f6[4])[_0xc2f6[3]];var Room=require(_0xc2f6[4])[_0xc2f6[5]];var Status=require(_0xc2f6[4])[_0xc2f6[6]];var sequelize=require(_0xc2f6[4])[_0xc2f6[7]];var Util=require(_0xc2f6[8]);exports[_0xc2f6[9]]= function(_0xe73ax8,_0xe73ax9,_0xe73axa){var _0xe73axb={};if(_0xe73ax8[_0xc2f6[11]][_0xc2f6[10]]=== _0xc2f6[12]){_0xe73axb[_0xc2f6[13]]= _0xe73ax8[_0xc2f6[11]][_0xc2f6[14]]};return Report[_0xc2f6[21]](Util[_0xc2f6[20]](_0xe73ax8[_0xc2f6[19]],_0xe73axb))[_0xc2f6[18]](function(_0xe73axd){_0xe73ax9[_0xc2f6[17]](200)[_0xc2f6[16]](_0xe73axd)})[_0xc2f6[15]](function(_0xe73axc){return handleError(_0xe73ax9,_0xe73axc)})};exports[_0xc2f6[22]]= function(_0xe73ax8,_0xe73ax9){var _0xe73axe=_0xe73ax8[_0xc2f6[26]][_0xc2f6[25]][_0xc2f6[24]](_0xc2f6[23])[1];return Report[_0xc2f6[33]](_0xe73ax8[_0xc2f6[26]][_0xc2f6[32]])[_0xc2f6[18]](function(_0xe73axf){if(!_0xe73axf){return _0xe73ax9[_0xc2f6[27]](404)};var _0xe73ax10=_[_0xc2f6[30]](_0xe73axf,{connectid:_0xe73ax8[_0xc2f6[26]][_0xc2f6[25]]});return _0xe73ax10[_0xc2f6[31]]()})[_0xc2f6[18]](function(){return Room[_0xc2f6[29]]({status:_0xc2f6[28],openReason:_0xc2f6[12]},{where:{id:_0xe73axe},user:_0xe73ax8[_0xc2f6[11]],individualHooks:true})})[_0xc2f6[18]](function(){return _0xe73ax9[_0xc2f6[27]](200)})[_0xc2f6[15]](sequelize.UniqueConstraintError,function(_0xe73axc){return _0xe73ax9[_0xc2f6[27]](504)})[_0xc2f6[15]](function(_0xe73axc){return handleError(_0xe73ax9,_0xe73axc)})};exports[_0xc2f6[34]]= function(_0xe73ax8,_0xe73ax9){var _0xe73ax11;return Report[_0xc2f6[33]](_0xe73ax8[_0xc2f6[26]][_0xc2f6[32]])[_0xc2f6[18]](function(_0xe73ax12){_0xe73ax11= _0xe73ax12;if(!_0xe73ax11){return _0xe73ax9[_0xc2f6[27]](404)};var _0xe73ax10=_[_0xc2f6[30]](_0xe73ax12,{rejectedAt:moment()[_0xc2f6[40]](_0xc2f6[39])});return _0xe73ax10[_0xc2f6[31]]()})[_0xc2f6[18]](function(){return Status[_0xc2f6[38]]({status:_0xc2f6[35],data1:_0xe73ax8[_0xc2f6[11]][_0xc2f6[14]],data2:_0xe73ax8[_0xc2f6[11]][_0xc2f6[36]],UserId:_0xe73ax8[_0xc2f6[11]][_0xc2f6[32]],MailRoomId:_0xe73ax11[_0xc2f6[37]]})})[_0xc2f6[18]](function(){return _0xe73ax9[_0xc2f6[27]](200)})[_0xc2f6[15]](function(_0xe73axc){return handleError(_0xe73ax9,_0xe73axc)})};function handleError(_0xe73ax9,_0xe73axc){console[_0xc2f6[41]](_0xe73axc);return _0xe73ax9[_0xc2f6[17]](500)[_0xc2f6[16]](_0xe73axc)} \ No newline at end of file +'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); +} diff --git a/server/api/report_mail/report_mail.events.js b/server/api/report_mail/report_mail.events.js index f003037..4a48caa 100644 --- a/server/api/report_mail/report_mail.events.js +++ b/server/api/report_mail/report_mail.events.js @@ -1 +1,36 @@ -var _0x7cb5=["\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"];_0x7cb5[0];const EventEmitter=require(_0x7cb5[1]);const ReportMail=require(_0x7cb5[3])[_0x7cb5[2]];var ReportMailEvents= new EventEmitter();ReportMailEvents[_0x7cb5[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x7cb5[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x7cb5[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x7cb5[7]};for(var e in events){var event=events[e];ReportMail[_0x7cb5[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x8371x8,_0x8371x9,_0x8371xa){ReportMailEvents[_0x7cb5[11]](event+ _0x7cb5[9]+ _0x8371x8[_0x7cb5[10]],_0x8371x8);ReportMailEvents[_0x7cb5[11]](event,_0x8371x8);_0x8371xa(null)}}module[_0x7cb5[12]]= ReportMailEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/report_mail/report_mail.socket.js b/server/api/report_mail/report_mail.socket.js index 7ad5620..0b9cab3 100644 --- a/server/api/report_mail/report_mail.socket.js +++ b/server/api/report_mail/report_mail.socket.js @@ -1 +1,46 @@ -var _0x582d=["\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"];_0x582d[0];const ReportMailEvents=require(_0x582d[1]);var events=[_0x582d[2],_0x582d[3],_0x582d[4]];exports[_0x582d[5]]= function(_0x2c62x3){for(var _0x2c62x4=0,_0x2c62x5=events[_0x582d[6]];_0x2c62x4< _0x2c62x5;_0x2c62x4++){var _0x2c62x6=events[_0x2c62x4];var _0x2c62x7=createListener(_0x582d[7]+ _0x2c62x6,_0x2c62x3);ReportMailEvents[_0x582d[8]](_0x2c62x6,_0x2c62x7);_0x2c62x3[_0x582d[8]](_0x582d[9],removeListener(_0x2c62x6,_0x2c62x7))}};function createListener(_0x2c62x6,_0x2c62x3){return function(_0x2c62x9){switch(_0x2c62x6){case _0x582d[10]:;case _0x582d[16]:if(_0x2c62x3[_0x582d[11]]=== _0x2c62x9[_0x582d[12]]|| _0x2c62x3[_0x582d[13]]=== _0x582d[14]){_0x2c62x3[_0x582d[15]](_0x2c62x6,_0x2c62x9)};break;case _0x582d[17]:_0x2c62x3[_0x582d[15]](_0x2c62x6,_0x2c62x9);break;default:}}}function removeListener(_0x2c62x6,_0x2c62x7){return function(){ReportMailEvents[_0x582d[18]](_0x2c62x6,_0x2c62x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/report_mail_session/index.js b/server/api/report_mail_session/index.js index 7708e09..3e04193 100644 --- a/server/api/report_mail_session/index.js +++ b/server/api/report_mail_session/index.js @@ -1 +1,16 @@ -var _0x2e75=["\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"];_0x2e75[0];var express=require(_0x2e75[1]);var controller=require(_0x2e75[2]);var auth=require(_0x2e75[3]);var license=require(_0x2e75[4]);var router=express.Router();router[_0x2e75[11]](_0x2e75[5],auth[_0x2e75[6]](),license[_0x2e75[7]](),auth[_0x2e75[9]]([17],[_0x2e75[8]]),controller[_0x2e75[10]]);router[_0x2e75[11]](_0x2e75[12],auth[_0x2e75[6]](),license[_0x2e75[7]](),auth[_0x2e75[9]]([17],[_0x2e75[8]]),controller[_0x2e75[13]]);router[_0x2e75[11]](_0x2e75[14],license[_0x2e75[15]](),auth[_0x2e75[6]](),license[_0x2e75[7]](),auth[_0x2e75[9]]([17],[_0x2e75[8]]),controller[_0x2e75[16]]);router[_0x2e75[11]](_0x2e75[17],license[_0x2e75[15]](),auth[_0x2e75[6]](),license[_0x2e75[7]](),auth[_0x2e75[9]]([17],[_0x2e75[8]]),controller[_0x2e75[18]]);router[_0x2e75[11]](_0x2e75[19],auth[_0x2e75[6]](),license[_0x2e75[7]](),auth[_0x2e75[9]]([9],[_0x2e75[8],_0x2e75[20]]),controller[_0x2e75[21]]);module[_0x2e75[22]]= router \ No newline at end of file +'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; 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 e5092e1..aaa2af8 100644 --- a/server/api/report_mail_session/report_mail_session.controller.js +++ b/server/api/report_mail_session/report_mail_session.controller.js @@ -1 +1,155 @@ -var _0x4bdc=["\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"];_0x4bdc[0];var _=require(_0x4bdc[1]);var ReportMailSession=require(_0x4bdc[3])[_0x4bdc[2]];var ReportMailSessionHistory=require(_0x4bdc[3])[_0x4bdc[5]][_0x4bdc[4]];var Util=require(_0x4bdc[6]);var User=require(_0x4bdc[3])[_0x4bdc[7]];var Promise=require(_0x4bdc[8]);exports[_0x4bdc[9]]= function(_0x4d48x7,_0x4d48x8,_0x4d48x9){return ReportMailSession[_0x4bdc[16]](Util[_0x4bdc[15]](_0x4d48x7[_0x4bdc[14]]))[_0x4bdc[13]](function(_0x4d48xb){_0x4d48x8[_0x4bdc[12]](200)[_0x4bdc[11]](_0x4d48xb)})[_0x4bdc[10]](function(_0x4d48xa){return handleError(_0x4d48x8,_0x4d48xa)})};exports[_0x4bdc[17]]= function(_0x4d48x7,_0x4d48x8){return ReportMailSessionHistory[_0x4bdc[17]]()[_0x4bdc[13]](function(_0x4d48xc){return _0x4d48x8[_0x4bdc[12]](200)[_0x4bdc[11]](_0x4d48xc)})[_0x4bdc[10]](function(_0x4d48xa){return handleError(_0x4d48x8,_0x4d48xa)})};function getMailQueues(_0x4d48xe){return function(){switch(_0x4d48xe[_0x4bdc[28]]){case _0x4bdc[25]:return User[_0x4bdc[24]](_0x4d48xe[_0x4bdc[18]],{attributes:[_0x4bdc[18]]})[_0x4bdc[13]](Util[_0x4bdc[23]]({},{attributes:[_0x4bdc[18]],include:[{raw:true,model:User,attributes:[_0x4bdc[18]]}]}))[_0x4bdc[13]](function(_0x4d48xf){var _0x4d48x10=[];_0x4d48xf[_0x4bdc[22]][_0x4bdc[21]](function(_0x4d48x11){_0x4d48x10= _[_0x4bdc[20]](_0x4d48x10,_[_0x4bdc[19]](_0x4d48x11.Users,_0x4bdc[18]))});return {$or:{queue:_[_0x4bdc[19]](_0x4d48xf[_0x4bdc[22]],_0x4bdc[18]),memberid:_0x4d48x10}}});case _0x4bdc[27]:return User[_0x4bdc[24]](_0x4d48xe[_0x4bdc[18]],{attributes:[_0x4bdc[18]]})[_0x4bdc[13]](function(_0x4d48x12){return _0x4d48x12[_0x4bdc[26]]({attributes:[_0x4bdc[18]]})})[_0x4bdc[13]](function(_0x4d48xf){return {$or:{queue:_[_0x4bdc[19]](_0x4d48xf,_0x4bdc[18]),memberid:_0x4d48xe[_0x4bdc[18]]}}});default:return {}}}}exports[_0x4bdc[29]]= function(_0x4d48x7,_0x4d48x8){return Promise[_0x4bdc[33]]([])[_0x4bdc[13]](getMailQueues(_0x4d48x7[_0x4bdc[25]]))[_0x4bdc[13]](function(_0x4d48x14){return ReportMailSession[_0x4bdc[32]](Util[_0x4bdc[15]](_0x4d48x7[_0x4bdc[14]],_[_0x4bdc[31]]({timeout:true},_0x4d48x14)))})[_0x4bdc[13]](function(_0x4d48x13){return _0x4d48x8[_0x4bdc[12]](200)[_0x4bdc[11]]({value:_0x4d48x13})})[_0x4bdc[10]](function(_0x4d48xa){console[_0x4bdc[30]](_0x4d48xa);return handleError(_0x4d48x8,_0x4d48xa)})};exports[_0x4bdc[34]]= function(_0x4d48x7,_0x4d48x8){return Promise[_0x4bdc[33]]([])[_0x4bdc[13]](getMailQueues(_0x4d48x7[_0x4bdc[25]]))[_0x4bdc[13]](function(_0x4d48x14){return ReportMailSession[_0x4bdc[32]](Util[_0x4bdc[15]](_0x4d48x7[_0x4bdc[14]],_[_0x4bdc[31]]({leaveAt:null},_0x4d48x14)))})[_0x4bdc[13]](function(_0x4d48x13){return _0x4d48x8[_0x4bdc[12]](200)[_0x4bdc[11]]({value:_0x4d48x13})})[_0x4bdc[10]](function(_0x4d48xa){console[_0x4bdc[30]](_0x4d48xa);return handleError(_0x4d48x8,_0x4d48xa)})};exports[_0x4bdc[35]]= function(_0x4d48x7,_0x4d48x8){return Promise[_0x4bdc[33]]([])[_0x4bdc[13]](getMailQueues(_0x4d48x7[_0x4bdc[25]]))[_0x4bdc[13]](function(_0x4d48x14){return ReportMailSession[_0x4bdc[36]](Util[_0x4bdc[15]](_0x4d48x7[_0x4bdc[14]],_[_0x4bdc[31]]({leaveAt:null},_0x4d48x14)))})[_0x4bdc[13]](function(_0x4d48x13){return _0x4d48x8[_0x4bdc[12]](200)[_0x4bdc[11]]({rows:_0x4d48x13})})[_0x4bdc[10]](function(_0x4d48xa){console[_0x4bdc[30]](_0x4d48xa);return handleError(_0x4d48x8,_0x4d48xa)})};function handleError(_0x4d48x8,_0x4d48xa){return _0x4d48x8[_0x4bdc[12]](500)[_0x4bdc[11]](_0x4d48xa)} \ No newline at end of file +'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 ReportMailSessionHistory + .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); +} 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 df036ff..95c4a4e 100644 --- a/server/api/report_mail_session/report_mail_session.events.js +++ b/server/api/report_mail_session/report_mail_session.events.js @@ -1 +1,36 @@ -var _0x1727=["\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"];_0x1727[0];const EventEmitter=require(_0x1727[1]);const ReportMailSession=require(_0x1727[3])[_0x1727[2]];var ReportMailSessionEvents= new EventEmitter();ReportMailSessionEvents[_0x1727[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x1727[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x1727[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x1727[6]};for(var e in events){var event=events[e];ReportMailSession[_0x1727[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xa4e5x8,_0xa4e5x9,_0xa4e5xa){ReportMailSessionEvents[_0x1727[10]](event+ _0x1727[8]+ _0xa4e5x8[_0x1727[9]],_0xa4e5x8);ReportMailSessionEvents[_0x1727[10]](event,_0xa4e5x8);_0xa4e5xa(null)}}module[_0x1727[11]]= ReportMailSessionEvents \ No newline at end of file +/** + * 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; 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 daa4dde..5014a50 100644 --- a/server/api/report_mail_session/report_mail_session.socket.js +++ b/server/api/report_mail_session/report_mail_session.socket.js @@ -1 +1,104 @@ -var _0x9a97=["\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"];_0x9a97[0];const ReportMailSessionEvents=require(_0x9a97[1]);const User=require(_0x9a97[3])[_0x9a97[2]];const Util=require(_0x9a97[4]);const _=require(_0x9a97[5]);const Promise=require(_0x9a97[6]);var events=[_0x9a97[7],_0x9a97[8]];exports[_0x9a97[9]]= function(_0x5a66x7){for(var _0x5a66x8=0,_0x5a66x9=events[_0x9a97[10]];_0x5a66x8< _0x5a66x9;_0x5a66x8++){var _0x5a66xa=events[_0x5a66x8];var _0x5a66xb=createListener(_0x9a97[11]+ _0x5a66xa,_0x5a66x7);ReportMailSessionEvents[_0x9a97[12]](_0x5a66xa,_0x5a66xb);_0x5a66x7[_0x9a97[12]](_0x9a97[13],removeListener(_0x5a66xa,_0x5a66xb))}};function createListener(_0x5a66xa,_0x5a66x7){return function(_0x5a66xd){switch(_0x5a66xa){case _0x9a97[25]:return Promise[_0x9a97[24]]([])[_0x9a97[23]](getMailQueues(_0x5a66x7))[_0x9a97[23]](function(_0x5a66xf){if(_0x5a66x7[_0x9a97[17]]=== _0x9a97[18]|| _[_0x9a97[20]](_0x5a66xf[_0x9a97[19]],_0x5a66xd[_0x9a97[19]])|| _[_0x9a97[20]](_0x5a66xf[_0x9a97[21]],_0x5a66xd[_0x9a97[21]])){_0x5a66x7[_0x9a97[22]](_0x5a66xa,_0x5a66xd)}})[_0x9a97[16]](function(_0x5a66xe){console[_0x9a97[15]](_0x9a97[14],_0x5a66xe)});case _0x9a97[26]:_0x5a66x7[_0x9a97[22]](_0x5a66xa,_0x5a66xd);break;default:}}}function removeListener(_0x5a66xa,_0x5a66xb){return function(){ReportMailSessionEvents[_0x9a97[27]](_0x5a66xa,_0x5a66xb)}}function getMailQueues(_0x5a66x12){return function(){switch(_0x5a66x12[_0x9a97[17]]){case _0x9a97[36]:return User[_0x9a97[35]](_0x5a66x12[_0x9a97[34]],{attributes:[_0x9a97[28]]})[_0x9a97[23]](Util[_0x9a97[33]]({},{attributes:[_0x9a97[28]],include:[{raw:true,model:User,attributes:[_0x9a97[28]]}]}))[_0x9a97[23]](function(_0x5a66x13){var _0x5a66x14=[];_0x5a66x13[_0x9a97[32]][_0x9a97[31]](function(_0x5a66x15){_0x5a66x14= _[_0x9a97[30]](_0x5a66x14,_[_0x9a97[29]](_0x5a66x15.Users,_0x9a97[28]))});return {queue:_[_0x9a97[29]](_0x5a66x13[_0x9a97[32]],_0x9a97[28]),memberid:_0x5a66x14}});case _0x9a97[38]:return User[_0x9a97[35]](_0x5a66x12[_0x9a97[34]],{attributes:[_0x9a97[28]]})[_0x9a97[23]](function(_0x5a66x16){return _0x5a66x16[_0x9a97[37]]({attributes:[_0x9a97[28]]})})[_0x9a97[23]](function(_0x5a66x13){return {queue:_[_0x9a97[29]](_0x5a66x13,_0x9a97[28]),memberid:_0x5a66x12[_0x9a97[34]]}});default:return {}}}} \ No newline at end of file +/** + * 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 {}; + } + } +} diff --git a/server/api/report_member/index.js b/server/api/report_member/index.js index 5e91e34..0afbd74 100644 --- a/server/api/report_member/index.js +++ b/server/api/report_member/index.js @@ -1 +1,12 @@ -var _0x5f1e=["\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"];_0x5f1e[0];var express=require(_0x5f1e[1]);var controller=require(_0x5f1e[2]);var auth=require(_0x5f1e[3]);var router=express.Router();router[_0x5f1e[9]](_0x5f1e[4],auth[_0x5f1e[5]](),auth[_0x5f1e[7]]([17],[_0x5f1e[6]]),controller[_0x5f1e[8]]);router[_0x5f1e[9]](_0x5f1e[10],auth[_0x5f1e[5]](),auth[_0x5f1e[7]]([17],[_0x5f1e[6]]),controller[_0x5f1e[11]]);module[_0x5f1e[12]]= router \ No newline at end of file +'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; diff --git a/server/api/report_member/report_member.controller.js b/server/api/report_member/report_member.controller.js index 22de7b8..6864b80 100644 --- a/server/api/report_member/report_member.controller.js +++ b/server/api/report_member/report_member.controller.js @@ -1 +1,34 @@ -var _0x8e1d=["\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"];_0x8e1d[0];var _=require(_0x8e1d[1]);var ReportMember=require(_0x8e1d[3])[_0x8e1d[2]];var ReportMemberHistory=require(_0x8e1d[3])[_0x8e1d[5]][_0x8e1d[4]];var Util=require(_0x8e1d[6]);exports[_0x8e1d[7]]= function(_0x1818x5,_0x1818x6,_0x1818x7){return ReportMember[_0x8e1d[14]](Util[_0x8e1d[13]](_0x1818x5[_0x8e1d[12]]))[_0x8e1d[11]](function(_0x1818x9){return _0x1818x6[_0x8e1d[10]](200)[_0x8e1d[9]](_0x1818x9)})[_0x8e1d[8]](function(_0x1818x8){return handleError(_0x1818x6,_0x1818x8)})};exports[_0x8e1d[15]]= function(_0x1818x5,_0x1818x6){return ReportMemberHistory[_0x8e1d[15]]()[_0x8e1d[11]](function(_0x1818xa){return _0x1818x6[_0x8e1d[10]](200)[_0x8e1d[9]](_0x1818xa)})[_0x8e1d[8]](function(_0x1818x8){return handleError(_0x1818x6,_0x1818x8)})};function handleError(_0x1818x6,_0x1818x8){return _0x1818x6[_0x8e1d[10]](500)[_0x8e1d[9]](_0x1818x8)} \ No newline at end of file +'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); +} diff --git a/server/api/report_member/report_member.events.js b/server/api/report_member/report_member.events.js index b200960..d42092f 100644 --- a/server/api/report_member/report_member.events.js +++ b/server/api/report_member/report_member.events.js @@ -1 +1,36 @@ -var _0xb48e=["\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"];_0xb48e[0];const EventEmitter=require(_0xb48e[1]);const ReportMember=require(_0xb48e[3])[_0xb48e[2]];var ReportMemberEvents= new EventEmitter();ReportMemberEvents[_0xb48e[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xb48e[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xb48e[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xb48e[6]};for(var e in events){var event=events[e];ReportMember[_0xb48e[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x58cdx8,_0x58cdx9,_0x58cdxa){ReportMemberEvents[_0xb48e[10]](event+ _0xb48e[8]+ _0x58cdx8[_0xb48e[9]],_0x58cdx8);ReportMemberEvents[_0xb48e[10]](event,_0x58cdx8);_0x58cdxa(null)}}module[_0xb48e[11]]= ReportMemberEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/report_member/report_member.socket.js b/server/api/report_member/report_member.socket.js index 0cd9d45..d0b7de2 100644 --- a/server/api/report_member/report_member.socket.js +++ b/server/api/report_member/report_member.socket.js @@ -1 +1,45 @@ -var _0xae55=["\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"];_0xae55[0];const ReportMemberEvents=require(_0xae55[1]);var events=[_0xae55[2],_0xae55[3]];exports[_0xae55[4]]= function(_0x4538x3){for(var _0x4538x4=0,_0x4538x5=events[_0xae55[5]];_0x4538x4< _0x4538x5;_0x4538x4++){var _0x4538x6=events[_0x4538x4];var _0x4538x7=createListener(_0xae55[6]+ _0x4538x6,_0x4538x3);ReportMemberEvents[_0xae55[7]](_0x4538x6,_0x4538x7);_0x4538x3[_0xae55[7]](_0xae55[8],removeListener(_0x4538x6,_0x4538x7))}};function createListener(_0x4538x6,_0x4538x3){return function(_0x4538x9){switch(_0x4538x6){case _0xae55[14]:if(_0x4538x3[_0xae55[9]]=== _0x4538x9[_0xae55[10]]|| _0x4538x3[_0xae55[11]]=== _0xae55[12]){_0x4538x3[_0xae55[13]](_0x4538x6,_0x4538x9)};break;case _0xae55[15]:_0x4538x3[_0xae55[13]](_0x4538x6,_0x4538x9);break;default:}}}function removeListener(_0x4538x6,_0x4538x7){return function(){ReportMemberEvents[_0xae55[16]](_0x4538x6,_0x4538x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/report_openchannel/index.js b/server/api/report_openchannel/index.js index 9932398..3703020 100644 --- a/server/api/report_openchannel/index.js +++ b/server/api/report_openchannel/index.js @@ -1 +1,14 @@ -var _0xc9a3=["\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"];_0xc9a3[0];var express=require(_0xc9a3[1]);var controller=require(_0xc9a3[2]);var auth=require(_0xc9a3[3]);var license=require(_0xc9a3[4]);var router=express.Router();router[_0xc9a3[12]](_0xc9a3[5],auth[_0xc9a3[6]](),license[_0xc9a3[7]](),auth[_0xc9a3[10]]([17],[_0xc9a3[8],_0xc9a3[9]]),controller[_0xc9a3[11]]);router[_0xc9a3[12]](_0xc9a3[13],auth[_0xc9a3[6]](),license[_0xc9a3[7]](),auth[_0xc9a3[14]](_0xc9a3[9]),controller[_0xc9a3[15]]);router[_0xc9a3[12]](_0xc9a3[16],auth[_0xc9a3[6]](),license[_0xc9a3[7]](),auth[_0xc9a3[14]](_0xc9a3[9]),controller[_0xc9a3[17]]);module[_0xc9a3[18]]= router \ No newline at end of file +'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; diff --git a/server/api/report_openchannel/report_openchannel.controller.js b/server/api/report_openchannel/report_openchannel.controller.js index 19b0074..8dd23a3 100644 --- a/server/api/report_openchannel/report_openchannel.controller.js +++ b/server/api/report_openchannel/report_openchannel.controller.js @@ -1 +1,117 @@ -var _0xc4f3=["\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"];_0xc4f3[0];var _=require(_0xc4f3[1]);var ReportOpenchannel=require(_0xc4f3[3])[_0xc4f3[2]];var OpenchannelRoom=require(_0xc4f3[3])[_0xc4f3[4]];var sequelize=require(_0xc4f3[3])[_0xc4f3[5]];var Agent=require(_0xc4f3[3])[_0xc4f3[6]];var Util=require(_0xc4f3[7]);var moment=require(_0xc4f3[8]);function handleError(_0x4c60x9,_0x4c60xa){return _0x4c60x9[_0xc4f3[10]](500)[_0xc4f3[9]](_0x4c60xa)}exports[_0xc4f3[11]]= function(_0x4c60xb,_0x4c60x9){return ReportOpenchannel[_0xc4f3[16]](Util[_0xc4f3[15]](_0x4c60xb[_0xc4f3[14]]))[_0xc4f3[13]](function(_0x4c60xc){_0x4c60x9[_0xc4f3[10]](200)[_0xc4f3[9]](_0x4c60xc)})[_0xc4f3[12]](function(_0x4c60xa){return handleError(_0x4c60x9,_0x4c60xa)})};exports[_0xc4f3[17]]= function(_0x4c60xb,_0x4c60x9){var _0x4c60xd;var _0x4c60xe=_0x4c60xb[_0xc4f3[21]][_0xc4f3[20]][_0xc4f3[19]](_0xc4f3[18])[1];return Agent[_0xc4f3[30]](_0x4c60xb[_0xc4f3[25]][_0xc4f3[29]],{attributes:[_0xc4f3[29],_0xc4f3[33]]})[_0xc4f3[13]](function(_0x4c60x12){_0x4c60xd= _0x4c60x12;return _0x4c60x12[_0xc4f3[32]]({where:{status:{$ne:_0xc4f3[31]},id:{$ne:_0x4c60xe}},attributes:[_0xc4f3[29]]})})[_0xc4f3[13]](function(_0x4c60x11){return ReportOpenchannel[_0xc4f3[30]](_0x4c60xb[_0xc4f3[21]][_0xc4f3[29]])})[_0xc4f3[13]](function(_0x4c60xf){if(!_0x4c60xf){return _0x4c60x9[_0xc4f3[22]](404)};var _0x4c60x10=_[_0xc4f3[27]](_0x4c60xf,{connectid:_0x4c60xb[_0xc4f3[21]][_0xc4f3[20]]});return _0x4c60x10[_0xc4f3[28]]()})[_0xc4f3[13]](function(){return OpenchannelRoom[_0xc4f3[26]]({status:_0xc4f3[23],openReason:_0xc4f3[24]},{where:{id:_0x4c60xe},user:_0x4c60xb[_0xc4f3[25]],individualHooks:true})})[_0xc4f3[13]](function(){return _0x4c60x9[_0xc4f3[22]](200)})[_0xc4f3[12]](sequelize.UniqueConstraintError,function(_0x4c60xa){return _0x4c60x9[_0xc4f3[22]](504)})[_0xc4f3[12]](function(_0x4c60xa){return handleError(_0x4c60x9,_0x4c60xa)})};exports[_0xc4f3[34]]= function(_0x4c60xb,_0x4c60x9){return ReportOpenchannel[_0xc4f3[30]](_0x4c60xb[_0xc4f3[21]][_0xc4f3[29]])[_0xc4f3[13]](function(_0x4c60xf){if(!_0x4c60xf){return _0x4c60x9[_0xc4f3[22]](404)};var _0x4c60x10=_[_0xc4f3[27]](_0x4c60xf,{rejectedAt:moment()[_0xc4f3[36]](_0xc4f3[35])});return _0x4c60x10[_0xc4f3[28]]()})[_0xc4f3[13]](function(){return _0x4c60x9[_0xc4f3[22]](200)})[_0xc4f3[12]](function(_0x4c60xa){return handleError(_0x4c60x9,_0x4c60xa)})} \ No newline at end of file +'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); + }); +}; diff --git a/server/api/report_openchannel/report_openchannel.events.js b/server/api/report_openchannel/report_openchannel.events.js index 88f68be..e0277fc 100644 --- a/server/api/report_openchannel/report_openchannel.events.js +++ b/server/api/report_openchannel/report_openchannel.events.js @@ -1 +1,36 @@ -var _0x4e1e=["\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"];_0x4e1e[0];const EventEmitter=require(_0x4e1e[1]);const ReportOpenchannel=require(_0x4e1e[3])[_0x4e1e[2]];var ReportOpenchannelEvents= new EventEmitter();ReportOpenchannelEvents[_0x4e1e[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x4e1e[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x4e1e[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x4e1e[7]};for(var e in events){var event=events[e];ReportOpenchannel[_0x4e1e[8]](e,emitEvent(event))};function emitEvent(event){return function(_0xedb2x8,_0xedb2x9,_0xedb2xa){ReportOpenchannelEvents[_0x4e1e[11]](event+ _0x4e1e[9]+ _0xedb2x8[_0x4e1e[10]],_0xedb2x8);ReportOpenchannelEvents[_0x4e1e[11]](event,_0xedb2x8);_0xedb2xa(null)}}module[_0x4e1e[12]]= ReportOpenchannelEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/report_openchannel/report_openchannel.socket.js b/server/api/report_openchannel/report_openchannel.socket.js index 96e1ca3..994bcd8 100644 --- a/server/api/report_openchannel/report_openchannel.socket.js +++ b/server/api/report_openchannel/report_openchannel.socket.js @@ -1 +1,45 @@ -var _0x1ed2=["\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"];_0x1ed2[0];const ReportOpenchannelEvents=require(_0x1ed2[1]);var events=[_0x1ed2[2],_0x1ed2[3],_0x1ed2[4]];exports[_0x1ed2[5]]= function(_0x2fe3x3){for(var _0x2fe3x4=0,_0x2fe3x5=events[_0x1ed2[6]];_0x2fe3x4< _0x2fe3x5;_0x2fe3x4++){var _0x2fe3x6=events[_0x2fe3x4];var _0x2fe3x7=createListener(_0x1ed2[7]+ _0x2fe3x6,_0x2fe3x3);ReportOpenchannelEvents[_0x1ed2[8]](_0x2fe3x6,_0x2fe3x7);_0x2fe3x3[_0x1ed2[8]](_0x1ed2[9],removeListener(_0x2fe3x6,_0x2fe3x7))}};function createListener(_0x2fe3x6,_0x2fe3x3){return function(_0x2fe3x9){switch(_0x2fe3x6){case _0x1ed2[10]:;case _0x1ed2[16]:if(_0x2fe3x3[_0x1ed2[11]]=== _0x2fe3x9[_0x1ed2[12]]|| _0x2fe3x3[_0x1ed2[13]]=== _0x1ed2[14]){_0x2fe3x3[_0x1ed2[15]](_0x2fe3x6,_0x2fe3x9)};break;case _0x1ed2[17]:_0x2fe3x3[_0x1ed2[15]](_0x2fe3x6,_0x2fe3x9);break;default:}}}function removeListener(_0x2fe3x6,_0x2fe3x7){return function(){ReportOpenchannelEvents[_0x1ed2[18]](_0x2fe3x6,_0x2fe3x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/report_openchannel_session/index.js b/server/api/report_openchannel_session/index.js index 4ca2f47..832ba1c 100644 --- a/server/api/report_openchannel_session/index.js +++ b/server/api/report_openchannel_session/index.js @@ -1 +1,16 @@ -var _0x2872=["\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"];_0x2872[0];var express=require(_0x2872[1]);var controller=require(_0x2872[2]);var auth=require(_0x2872[3]);var license=require(_0x2872[4]);var router=express.Router();router[_0x2872[11]](_0x2872[5],auth[_0x2872[6]](),license[_0x2872[7]](),auth[_0x2872[9]]([20],[_0x2872[8]]),controller[_0x2872[10]]);router[_0x2872[11]](_0x2872[12],auth[_0x2872[6]](),license[_0x2872[7]](),auth[_0x2872[9]]([20],[_0x2872[8]]),controller[_0x2872[13]]);router[_0x2872[11]](_0x2872[14],license[_0x2872[15]](),auth[_0x2872[6]](),license[_0x2872[7]](),auth[_0x2872[9]]([20],[_0x2872[8]]),controller[_0x2872[16]]);router[_0x2872[11]](_0x2872[17],license[_0x2872[15]](),auth[_0x2872[6]](),license[_0x2872[7]](),auth[_0x2872[9]]([20],[_0x2872[8]]),controller[_0x2872[18]]);router[_0x2872[11]](_0x2872[19],auth[_0x2872[6]](),license[_0x2872[7]](),controller[_0x2872[20]]);module[_0x2872[21]]= router \ No newline at end of file +'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; 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 36b8a24..e6a814a 100644 --- a/server/api/report_openchannel_session/report_openchannel_session.controller.js +++ b/server/api/report_openchannel_session/report_openchannel_session.controller.js @@ -1 +1,155 @@ -var _0xbf29=["\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"];_0xbf29[0];var _=require(_0xbf29[1]);var ReportOpenchannelSession=require(_0xbf29[3])[_0xbf29[2]];var ReportOpenchannelSessionHistory=require(_0xbf29[3])[_0xbf29[5]][_0xbf29[4]];var Util=require(_0xbf29[6]);var User=require(_0xbf29[3])[_0xbf29[7]];var Promise=require(_0xbf29[8]);exports[_0xbf29[9]]= function(_0xe96fx7,_0xe96fx8,_0xe96fx9){return ReportOpenchannelSession[_0xbf29[16]](Util[_0xbf29[15]](_0xe96fx7[_0xbf29[14]]))[_0xbf29[13]](function(_0xe96fxb){_0xe96fx8[_0xbf29[12]](200)[_0xbf29[11]](_0xe96fxb)})[_0xbf29[10]](function(_0xe96fxa){return handleError(_0xe96fx8,_0xe96fxa)})};exports[_0xbf29[17]]= function(_0xe96fx7,_0xe96fx8){return ReportOpenchannelSessionHistory[_0xbf29[17]]()[_0xbf29[13]](function(_0xe96fxc){return _0xe96fx8[_0xbf29[12]](200)[_0xbf29[11]](_0xe96fxc)})[_0xbf29[10]](function(_0xe96fxa){return handleError(_0xe96fx8,_0xe96fxa)})};function getOpenchannelQueues(_0xe96fxe){return function(){switch(_0xe96fxe[_0xbf29[28]]){case _0xbf29[25]:return User[_0xbf29[24]](_0xe96fxe[_0xbf29[18]],{attributes:[_0xbf29[18]]})[_0xbf29[13]](Util[_0xbf29[23]]({},{attributes:[_0xbf29[18]],include:[{raw:true,model:User,attributes:[_0xbf29[18]]}]}))[_0xbf29[13]](function(_0xe96fxf){var _0xe96fx10=[];_0xe96fxf[_0xbf29[22]][_0xbf29[21]](function(_0xe96fx11){_0xe96fx10= _[_0xbf29[20]](_0xe96fx10,_[_0xbf29[19]](_0xe96fx11.Users,_0xbf29[18]))});return {$or:{queue:_[_0xbf29[19]](_0xe96fxf[_0xbf29[22]],_0xbf29[18]),memberid:_0xe96fx10}}});case _0xbf29[27]:return User[_0xbf29[24]](_0xe96fxe[_0xbf29[18]],{attributes:[_0xbf29[18]]})[_0xbf29[13]](function(_0xe96fx12){return _0xe96fx12[_0xbf29[26]]({attributes:[_0xbf29[18]]})})[_0xbf29[13]](function(_0xe96fxf){return {$or:{queue:_[_0xbf29[19]](_0xe96fxf,_0xbf29[18]),memberid:_0xe96fxe[_0xbf29[18]]}}});default:return {}}}}exports[_0xbf29[29]]= function(_0xe96fx7,_0xe96fx8){return Promise[_0xbf29[33]]([])[_0xbf29[13]](getOpenchannelQueues(_0xe96fx7[_0xbf29[25]]))[_0xbf29[13]](function(_0xe96fx14){return ReportOpenchannelSession[_0xbf29[32]](Util[_0xbf29[15]](_0xe96fx7[_0xbf29[14]],_[_0xbf29[31]]({timeout:true},_0xe96fx14)))})[_0xbf29[13]](function(_0xe96fx13){return _0xe96fx8[_0xbf29[12]](200)[_0xbf29[11]]({value:_0xe96fx13})})[_0xbf29[10]](function(_0xe96fxa){console[_0xbf29[30]](_0xe96fxa);return handleError(_0xe96fx8,_0xe96fxa)})};exports[_0xbf29[34]]= function(_0xe96fx7,_0xe96fx8){return Promise[_0xbf29[33]]([])[_0xbf29[13]](getOpenchannelQueues(_0xe96fx7[_0xbf29[25]]))[_0xbf29[13]](function(_0xe96fx14){return ReportOpenchannelSession[_0xbf29[32]](Util[_0xbf29[15]](_0xe96fx7[_0xbf29[14]],_[_0xbf29[31]]({leaveAt:null},_0xe96fx14)))})[_0xbf29[13]](function(_0xe96fx13){return _0xe96fx8[_0xbf29[12]](200)[_0xbf29[11]]({value:_0xe96fx13})})[_0xbf29[10]](function(_0xe96fxa){console[_0xbf29[30]](_0xe96fxa);return handleError(_0xe96fx8,_0xe96fxa)})};exports[_0xbf29[35]]= function(_0xe96fx7,_0xe96fx8){return Promise[_0xbf29[33]]([])[_0xbf29[13]](getOpenchannelQueues(_0xe96fx7[_0xbf29[25]]))[_0xbf29[13]](function(_0xe96fx14){return ReportOpenchannelSession[_0xbf29[36]](Util[_0xbf29[15]](_0xe96fx7[_0xbf29[14]],_[_0xbf29[31]]({leaveAt:null},_0xe96fx14)))})[_0xbf29[13]](function(_0xe96fx13){return _0xe96fx8[_0xbf29[12]](200)[_0xbf29[11]]({rows:_0xe96fx13})})[_0xbf29[10]](function(_0xe96fxa){console[_0xbf29[30]](_0xe96fxa);return handleError(_0xe96fx8,_0xe96fxa)})};function handleError(_0xe96fx8,_0xe96fxa){return _0xe96fx8[_0xbf29[12]](500)[_0xbf29[11]](_0xe96fxa)} \ No newline at end of file +'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); +} 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 e1b7711..0c9e3ff 100644 --- a/server/api/report_openchannel_session/report_openchannel_session.events.js +++ b/server/api/report_openchannel_session/report_openchannel_session.events.js @@ -1 +1,36 @@ -var _0xd4b8=["\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"];_0xd4b8[0];const EventEmitter=require(_0xd4b8[1]);const ReportOpenchannelSession=require(_0xd4b8[3])[_0xd4b8[2]];var ReportOpenchannelSessionEvents= new EventEmitter();ReportOpenchannelSessionEvents[_0xd4b8[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd4b8[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd4b8[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd4b8[6]};for(var e in events){var event=events[e];ReportOpenchannelSession[_0xd4b8[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xa3ccx8,_0xa3ccx9,_0xa3ccxa){ReportOpenchannelSessionEvents[_0xd4b8[10]](event+ _0xd4b8[8]+ _0xa3ccx8[_0xd4b8[9]],_0xa3ccx8);ReportOpenchannelSessionEvents[_0xd4b8[10]](event,_0xa3ccx8);_0xa3ccxa(null)}}module[_0xd4b8[11]]= ReportOpenchannelSessionEvents \ No newline at end of file +/** + * 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; 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 111c39d..36ca924 100644 --- a/server/api/report_openchannel_session/report_openchannel_session.socket.js +++ b/server/api/report_openchannel_session/report_openchannel_session.socket.js @@ -1 +1,90 @@ -var _0x4bbe=["\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"];_0x4bbe[0];var ReportOpenchannelSession=require(_0x4bbe[2])[_0x4bbe[1]];var User=require(_0x4bbe[2])[_0x4bbe[3]];var Util=require(_0x4bbe[4]);var _=require(_0x4bbe[5]);var Promise=require(_0x4bbe[6]);exports[_0x4bbe[7]]= function(_0xdcaex6){ReportOpenchannelSession[_0x4bbe[8]](function(_0xdcaex7){onSave(_0xdcaex6,_0xdcaex7)});ReportOpenchannelSession[_0x4bbe[9]](function(_0xdcaex7){onSave(_0xdcaex6,_0xdcaex7)});ReportOpenchannelSession[_0x4bbe[10]](function(_0xdcaex7){onRemove(_0xdcaex6,_0xdcaex7)})};function getOpenchannelQueues(_0xdcaex9){return function(){switch(_0xdcaex9[_0x4bbe[23]]){case _0x4bbe[20]:return User[_0x4bbe[19]](_0xdcaex9[_0x4bbe[18]],{attributes:[_0x4bbe[11]]})[_0x4bbe[16]](Util[_0x4bbe[17]]({},{attributes:[_0x4bbe[11]],include:[{raw:true,model:User,attributes:[_0x4bbe[11]]}]}))[_0x4bbe[16]](function(_0xdcaexa){var _0xdcaexb=[];_0xdcaexa[_0x4bbe[15]][_0x4bbe[14]](function(_0xdcaexc){_0xdcaexb= _[_0x4bbe[13]](_0xdcaexb,_[_0x4bbe[12]](_0xdcaexc.Users,_0x4bbe[11]))});return {queue:_[_0x4bbe[12]](_0xdcaexa[_0x4bbe[15]],_0x4bbe[11]),memberid:_0xdcaexb}});case _0x4bbe[22]:return User[_0x4bbe[19]](_0xdcaex9[_0x4bbe[18]],{attributes:[_0x4bbe[11]]})[_0x4bbe[16]](function(_0xdcaexd){return _0xdcaexd[_0x4bbe[21]]({attributes:[_0x4bbe[11]]})})[_0x4bbe[16]](function(_0xdcaexa){return {queue:_[_0x4bbe[12]](_0xdcaexa,_0x4bbe[11]),memberid:_0xdcaex9[_0x4bbe[18]]}});default:return {}}}}function onSave(_0xdcaex6,_0xdcaex7,_0xdcaexf){return Promise[_0x4bbe[33]]([])[_0x4bbe[16]](getOpenchannelQueues(_0xdcaex6))[_0x4bbe[16]](function(_0xdcaex11){if(_0xdcaex6[_0x4bbe[23]]=== _0x4bbe[27]|| _[_0x4bbe[29]](_0xdcaex11[_0x4bbe[28]],_0xdcaex7[_0x4bbe[28]])|| _[_0x4bbe[29]](_0xdcaex11[_0x4bbe[30]],_0xdcaex7[_0x4bbe[30]])){_0xdcaex6[_0x4bbe[32]](_0x4bbe[31],_0xdcaex7)}})[_0x4bbe[26]](function(_0xdcaex10){console[_0x4bbe[25]](_0x4bbe[24],_0xdcaex10)})}function onRemove(_0xdcaex6,_0xdcaex7,_0xdcaexf){_0xdcaex6[_0x4bbe[32]](_0x4bbe[34],_0xdcaex7)} \ No newline at end of file +/** + * 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); +} diff --git a/server/api/report_queue/index.js b/server/api/report_queue/index.js index 941f2a3..2a28045 100644 --- a/server/api/report_queue/index.js +++ b/server/api/report_queue/index.js @@ -1 +1,27 @@ -var _0x14c0=["\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"];_0x14c0[0];var express=require(_0x14c0[1]);var controller=require(_0x14c0[2]);var auth=require(_0x14c0[3]);var router=express.Router();router[_0x14c0[9]](_0x14c0[4],auth[_0x14c0[5]](),auth[_0x14c0[7]]([17],[_0x14c0[6]]),controller[_0x14c0[8]]);router[_0x14c0[9]](_0x14c0[10],auth[_0x14c0[5]](),auth[_0x14c0[7]]([17],[_0x14c0[6]]),controller[_0x14c0[11]]);router[_0x14c0[9]](_0x14c0[12],auth[_0x14c0[5]](),auth[_0x14c0[7]]([1],[_0x14c0[6],_0x14c0[13]]),controller[_0x14c0[14]]);router[_0x14c0[9]](_0x14c0[15],auth[_0x14c0[5]](),auth[_0x14c0[7]]([1],[_0x14c0[6]]),controller[_0x14c0[16]]);router[_0x14c0[9]](_0x14c0[17],auth[_0x14c0[5]](),auth[_0x14c0[7]]([7],[_0x14c0[6],_0x14c0[13]]),controller[_0x14c0[18]]);router[_0x14c0[9]](_0x14c0[19],auth[_0x14c0[5]](),auth[_0x14c0[7]]([1],[_0x14c0[6],_0x14c0[13]]),controller[_0x14c0[20]]);router[_0x14c0[9]](_0x14c0[21],auth[_0x14c0[5]](),auth[_0x14c0[7]]([1],[_0x14c0[6],_0x14c0[13]]),controller[_0x14c0[22]]);router[_0x14c0[9]](_0x14c0[23],auth[_0x14c0[5]](),auth[_0x14c0[7]]([1],[_0x14c0[6],_0x14c0[13]]),controller[_0x14c0[24]]);router[_0x14c0[9]](_0x14c0[25],auth[_0x14c0[5]](),auth[_0x14c0[7]]([7],[_0x14c0[6],_0x14c0[13]]),controller[_0x14c0[26]]);router[_0x14c0[9]](_0x14c0[27],auth[_0x14c0[5]](),auth[_0x14c0[7]]([1],[_0x14c0[6],_0x14c0[13]]),controller[_0x14c0[28]]);router[_0x14c0[9]](_0x14c0[29],auth[_0x14c0[5]](),auth[_0x14c0[7]]([1],[_0x14c0[6],_0x14c0[13]]),controller[_0x14c0[30]]);router[_0x14c0[9]](_0x14c0[31],auth[_0x14c0[5]](),auth[_0x14c0[7]]([1],[_0x14c0[6],_0x14c0[13]]),controller[_0x14c0[32]]);router[_0x14c0[9]](_0x14c0[33],auth[_0x14c0[5]](),auth[_0x14c0[7]]([1],[_0x14c0[6],_0x14c0[13]]),controller[_0x14c0[34]]);router[_0x14c0[9]](_0x14c0[35],auth[_0x14c0[5]](),auth[_0x14c0[7]]([1],[_0x14c0[6],_0x14c0[13]]),controller[_0x14c0[36]]);router[_0x14c0[9]](_0x14c0[37],auth[_0x14c0[5]](),auth[_0x14c0[7]]([1],[_0x14c0[6],_0x14c0[13]]),controller[_0x14c0[38]]);router[_0x14c0[9]](_0x14c0[39],auth[_0x14c0[5]](),controller[_0x14c0[40]]);router[_0x14c0[43]](_0x14c0[41],auth[_0x14c0[5]](),controller[_0x14c0[42]]);module[_0x14c0[44]]= router \ No newline at end of file +'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; diff --git a/server/api/report_queue/report_queue.controller.js b/server/api/report_queue/report_queue.controller.js index 102785a..a2757ef 100644 --- a/server/api/report_queue/report_queue.controller.js +++ b/server/api/report_queue/report_queue.controller.js @@ -1 +1,626 @@ -var _0xf0e2=["\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"];_0xf0e2[0];var _=require(_0xf0e2[1]);var sequelize=require(_0xf0e2[3])[_0xf0e2[2]];var Agent=require(_0xf0e2[3])[_0xf0e2[4]];var ReportQueue=require(_0xf0e2[3])[_0xf0e2[5]];var VoiceQueue=require(_0xf0e2[3])[_0xf0e2[6]];var ReportQueueHistory=require(_0xf0e2[3])[_0xf0e2[8]][_0xf0e2[7]];var Util=require(_0xf0e2[9]);var Promise=require(_0xf0e2[10]);exports[_0xf0e2[11]]= function(_0x55bcx9,_0x55bcxa,_0x55bcxb){return ReportQueue[_0xf0e2[18]](Util[_0xf0e2[17]](_0x55bcx9[_0xf0e2[16]]))[_0xf0e2[15]](function(_0x55bcxd){return _0x55bcxa[_0xf0e2[14]](200)[_0xf0e2[13]](_0x55bcxd)})[_0xf0e2[12]](function(_0x55bcxc){return handleError(_0x55bcxa,_0x55bcxc)})};exports[_0xf0e2[19]]= function(_0x55bcx9,_0x55bcxa){return ReportQueue[_0xf0e2[26]](_0x55bcx9[_0xf0e2[25]][_0xf0e2[24]])[_0xf0e2[15]](function(_0x55bcxe){if(!_0x55bcxe){return _0x55bcxa[_0xf0e2[20]](404)};var _0x55bcxf=_[_0xf0e2[22]](_0x55bcxe,_0x55bcx9[_0xf0e2[21]]);return _0x55bcxf[_0xf0e2[23]]()})[_0xf0e2[15]](function(_0x55bcxe){return _0x55bcxa[_0xf0e2[14]](200)[_0xf0e2[13]](_0x55bcxe)})[_0xf0e2[12]](function(_0x55bcxc){return handleError(_0x55bcxa,_0x55bcxc)})};exports[_0xf0e2[27]]= function(_0x55bcx9,_0x55bcxa){return ReportQueueHistory[_0xf0e2[27]]()[_0xf0e2[15]](function(_0x55bcx10){return _0x55bcxa[_0xf0e2[14]](200)[_0xf0e2[13]](_0x55bcx10)})[_0xf0e2[12]](function(_0x55bcxc){return handleError(_0x55bcxa,_0x55bcxc)})};exports[_0xf0e2[28]]= function(_0x55bcx9,_0x55bcxa){return Promise[_0xf0e2[31]]([])[_0xf0e2[15]](getVoiceQueues(_0x55bcx9[_0xf0e2[30]]))[_0xf0e2[15]](function(_0x55bcx12){return ReportQueue[_0xf0e2[29]]({where:{queuecallerleaveAt:null,queue:_0x55bcx12}})})[_0xf0e2[15]](function(_0x55bcx11){return _0x55bcxa[_0xf0e2[14]](200)[_0xf0e2[13]]({value:_0x55bcx11})})[_0xf0e2[12]](function(_0x55bcxc){return handleError(_0x55bcxa,_0x55bcxc)})};function getVoiceQueues(_0x55bcx14){return function(){switch(_0x55bcx14[_0xf0e2[39]]){case _0xf0e2[30]:return Agent[_0xf0e2[26]](_0x55bcx14[_0xf0e2[24]],{attributes:[_0xf0e2[24]]})[_0xf0e2[15]](Util[_0xf0e2[35]]())[_0xf0e2[15]](function(_0x55bcx12){return _[_0xf0e2[34]](_0x55bcx12[_0xf0e2[32]],_0xf0e2[33])});case _0xf0e2[37]:return Agent[_0xf0e2[26]](_0x55bcx14[_0xf0e2[24]])[_0xf0e2[15]](function(_0x55bcx15){return _0x55bcx15[_0xf0e2[36]]({attributes:[_0xf0e2[33]]})})[_0xf0e2[15]](function(_0x55bcx12){return _[_0xf0e2[34]](_0x55bcx12,_0xf0e2[33])});default:return VoiceQueue[_0xf0e2[38]]()[_0xf0e2[15]](function(_0x55bcx16){return {rows:_0x55bcx16}})[_0xf0e2[15]](function(_0x55bcx12){return _[_0xf0e2[34]](_0x55bcx12[_0xf0e2[32]],_0xf0e2[33])})}}}exports[_0xf0e2[40]]= function(_0x55bcx9,_0x55bcxa){var _0x55bcx17={_limit:_0x55bcx9[_0xf0e2[16]][_0xf0e2[41]]?_0x55bcx9[_0xf0e2[16]][_0xf0e2[41]]:null,_offset:_0x55bcx9[_0xf0e2[16]][_0xf0e2[42]]?_0x55bcx9[_0xf0e2[16]][_0xf0e2[42]]:0,_name:_0x55bcx9[_0xf0e2[16]][_0xf0e2[33]]|| undefined,_answeredFrom:_0x55bcx9[_0xf0e2[16]][_0xf0e2[43]]|| _0x55bcx9[_0xf0e2[16]][_0xf0e2[43]]=== 0?_0x55bcx9[_0xf0e2[16]][_0xf0e2[43]]:undefined,_answeredTo:_0x55bcx9[_0xf0e2[16]][_0xf0e2[44]]|| _0x55bcx9[_0xf0e2[16]][_0xf0e2[44]]=== 0?_0x55bcx9[_0xf0e2[16]][_0xf0e2[44]]:undefined,_abandonedFrom:_0x55bcx9[_0xf0e2[16]][_0xf0e2[45]]|| _0x55bcx9[_0xf0e2[16]][_0xf0e2[45]]=== 0?_0x55bcx9[_0xf0e2[16]][_0xf0e2[45]]:undefined,_abandonedTo:_0x55bcx9[_0xf0e2[16]][_0xf0e2[46]]|| _0x55bcx9[_0xf0e2[16]][_0xf0e2[46]]=== 0?_0x55bcx9[_0xf0e2[16]][_0xf0e2[46]]:undefined,_unmanagedFrom:_0x55bcx9[_0xf0e2[16]][_0xf0e2[47]]|| _0x55bcx9[_0xf0e2[16]][_0xf0e2[47]]=== 0?_0x55bcx9[_0xf0e2[16]][_0xf0e2[47]]:undefined,_unmanagedTo:_0x55bcx9[_0xf0e2[16]][_0xf0e2[48]]|| _0x55bcx9[_0xf0e2[16]][_0xf0e2[48]]=== 0?_0x55bcx9[_0xf0e2[16]][_0xf0e2[48]]:undefined};console[_0xf0e2[49]](_0x55bcx17);var _0x55bcx18,_0x55bcx19,_0x55bcx1a,_0x55bcx1b;delete _0x55bcx9[_0xf0e2[16]][_0xf0e2[41]];delete _0x55bcx9[_0xf0e2[16]][_0xf0e2[42]];delete _0x55bcx9[_0xf0e2[16]][_0xf0e2[43]];delete _0x55bcx9[_0xf0e2[16]][_0xf0e2[44]];delete _0x55bcx9[_0xf0e2[16]][_0xf0e2[45]];delete _0x55bcx9[_0xf0e2[16]][_0xf0e2[46]];delete _0x55bcx9[_0xf0e2[16]][_0xf0e2[47]];delete _0x55bcx9[_0xf0e2[16]][_0xf0e2[48]];return Promise[_0xf0e2[31]]([])[_0xf0e2[15]](getVoiceQueues(_0x55bcx9[_0xf0e2[30]]))[_0xf0e2[15]](function(_0x55bcx12){_0x55bcx19= _0x55bcx12;_0x55bcx18= _[_0xf0e2[34]](_0x55bcx12,function(_0x55bcx1f){return {name:_0x55bcx1f}});return ReportQueue[_0xf0e2[38]]({where:{queuecallerleaveAt:null,queue:_0x55bcx19},group:_0xf0e2[84],attributes:[[_0xf0e2[84],_0xf0e2[33]],[sequelize[_0xf0e2[87]](_0xf0e2[85],sequelize[_0xf0e2[86]](_0xf0e2[24])),_0xf0e2[28]]]})})[_0xf0e2[15]](function(_0x55bcx31){_0x55bcx31= _[_0xf0e2[34]](_0x55bcx31,_0xf0e2[82]);_0x55bcx18[_0xf0e2[53]](function(_0x55bcx1f,_0x55bcx32){var _0x55bcx20=_[_0xf0e2[51]](_0x55bcx31,{name:_0x55bcx1f[_0xf0e2[33]]});_0x55bcx1f[_0xf0e2[28]]= _0x55bcx20?_0x55bcx20[_0xf0e2[28]]:0});return ReportQueue[_0xf0e2[38]]({where:{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null},queue:_0x55bcx19},group:_0xf0e2[84],attributes:[[_0xf0e2[84],_0xf0e2[33]],[sequelize[_0xf0e2[87]](_0xf0e2[85],sequelize[_0xf0e2[86]](_0xf0e2[24])),_0xf0e2[88]]]})})[_0xf0e2[15]](function(_0x55bcx30){_0x55bcx30= _[_0xf0e2[34]](_0x55bcx30,_0xf0e2[82]);_0x55bcx18[_0xf0e2[53]](function(_0x55bcx1f){var _0x55bcx20=_[_0xf0e2[51]](_0x55bcx30,{name:_0x55bcx1f[_0xf0e2[33]]});_0x55bcx1f[_0xf0e2[88]]= _0x55bcx20?_0x55bcx20[_0xf0e2[88]]:0});return ReportQueue[_0xf0e2[38]]({where:{queuecallercomplete:true,queue:_0x55bcx19},group:_0xf0e2[84],attributes:[[_0xf0e2[84],_0xf0e2[33]],[sequelize[_0xf0e2[87]](_0xf0e2[85],sequelize[_0xf0e2[86]](_0xf0e2[24])),_0xf0e2[55]]]})})[_0xf0e2[15]](function(_0x55bcx2f){_0x55bcx2f= _[_0xf0e2[34]](_0x55bcx2f,_0xf0e2[82]);_0x55bcx18[_0xf0e2[53]](function(_0x55bcx1f){var _0x55bcx20=_[_0xf0e2[51]](_0x55bcx2f,{name:_0x55bcx1f[_0xf0e2[33]]});_0x55bcx1f[_0xf0e2[55]]= _0x55bcx20?_0x55bcx20[_0xf0e2[55]]:0});return ReportQueue[_0xf0e2[38]]({where:{queuecallerabandon:true,queue:_0x55bcx19},group:_0xf0e2[84],attributes:[[_0xf0e2[84],_0xf0e2[33]],[sequelize[_0xf0e2[87]](_0xf0e2[85],sequelize[_0xf0e2[86]](_0xf0e2[24])),_0xf0e2[58]]]})})[_0xf0e2[15]](function(_0x55bcx2e){_0x55bcx2e= _[_0xf0e2[34]](_0x55bcx2e,_0xf0e2[82]);_0x55bcx18[_0xf0e2[53]](function(_0x55bcx1f){var _0x55bcx20=_[_0xf0e2[51]](_0x55bcx2e,{name:_0x55bcx1f[_0xf0e2[33]]});_0x55bcx1f[_0xf0e2[58]]= _0x55bcx20?_0x55bcx20[_0xf0e2[58]]:0});return ReportQueue[_0xf0e2[38]]({where:{queuecallerexit:true,queue:_0x55bcx19},group:_0xf0e2[84],attributes:[[_0xf0e2[84],_0xf0e2[33]],[sequelize[_0xf0e2[87]](_0xf0e2[85],sequelize[_0xf0e2[86]](_0xf0e2[24])),_0xf0e2[61]]]})})[_0xf0e2[15]](function(_0x55bcx2d){_0x55bcx2d= _[_0xf0e2[34]](_0x55bcx2d,_0xf0e2[82]);_0x55bcx18[_0xf0e2[53]](function(_0x55bcx1f){var _0x55bcx20=_[_0xf0e2[51]](_0x55bcx2d,{name:_0x55bcx1f[_0xf0e2[33]]});_0x55bcx1f[_0xf0e2[61]]= _0x55bcx20?_0x55bcx20[_0xf0e2[61]]:0});return sequelize[_0xf0e2[16]](_0xf0e2[83]+ _0x55bcx19[_0xf0e2[76]](_0xf0e2[75])+ _0xf0e2[77],{type:sequelize[_0xf0e2[79]][_0xf0e2[78]]})})[_0xf0e2[15]](function(_0x55bcx2c){_0x55bcx18[_0xf0e2[53]](function(_0x55bcx1f){var _0x55bcx20=_[_0xf0e2[51]](_0x55bcx2c,{name:_0x55bcx1f[_0xf0e2[33]]});_0x55bcx1f[_0xf0e2[80]]= _0x55bcx20?_0x55bcx20[_0xf0e2[80]]:_0xf0e2[73]});return sequelize[_0xf0e2[16]](_0xf0e2[81]+ _0x55bcx19[_0xf0e2[76]](_0xf0e2[75])+ _0xf0e2[77],{type:sequelize[_0xf0e2[79]][_0xf0e2[78]]})})[_0xf0e2[15]](function(_0x55bcx2b){_0x55bcx18[_0xf0e2[53]](function(_0x55bcx1f){var _0x55bcx20=_[_0xf0e2[51]](_0x55bcx2b,{name:_0x55bcx1f[_0xf0e2[33]]});_0x55bcx1f[_0xf0e2[72]]= _0x55bcx20?_0x55bcx20[_0xf0e2[72]]:_0xf0e2[73]});return sequelize[_0xf0e2[16]](_0xf0e2[74]+ _0x55bcx19[_0xf0e2[76]](_0xf0e2[75])+ _0xf0e2[77],{type:sequelize[_0xf0e2[79]][_0xf0e2[78]]})})[_0xf0e2[15]](function(_0x55bcx1e){_0x55bcx18[_0xf0e2[53]](function(_0x55bcx1f){var _0x55bcx20=_[_0xf0e2[51]](_0x55bcx1e,{name:_0x55bcx1f[_0xf0e2[33]]});_0x55bcx1f[_0xf0e2[52]]= _0x55bcx20?_0x55bcx20[_0xf0e2[52]]:0});var _0x55bcx21=_(_[_0xf0e2[66]](_0x55bcx18,function(_0x55bcx1f){var _0x55bcx22=_0x55bcx17[_0xf0e2[54]]?(_0x55bcx1f[_0xf0e2[55]]>= Number(_0x55bcx17._answeredFrom)):true;var _0x55bcx23=_0x55bcx17[_0xf0e2[56]]?(_0x55bcx1f[_0xf0e2[55]]<= Number(_0x55bcx17._answeredTo)):true;var _0x55bcx24=_0x55bcx17[_0xf0e2[57]]?(_0x55bcx1f[_0xf0e2[58]]>= Number(_0x55bcx17._abandonedFrom)):true;var _0x55bcx25=_0x55bcx17[_0xf0e2[59]]?(_0x55bcx1f[_0xf0e2[58]]<= Number(_0x55bcx17._abandonedTo)):true;var _0x55bcx26=_0x55bcx17[_0xf0e2[60]]?(_0x55bcx1f[_0xf0e2[61]]>= Number(_0x55bcx17._unmanagedFrom)):true;var _0x55bcx27=_0x55bcx17[_0xf0e2[62]]?(_0x55bcx1f[_0xf0e2[61]]<= Number(_0x55bcx17._unmanagedTo)):true;var _0x55bcx28=_0x55bcx17[_0xf0e2[63]]?_[_0xf0e2[64]](_0x55bcx1f[_0xf0e2[33]],_0x55bcx17._name):true;return _[_0xf0e2[65]]([_0x55bcx22,_0x55bcx23,_0x55bcx24,_0x55bcx25,_0x55bcx26,_0x55bcx27,_0x55bcx28],function(_0x55bcx29,_0x55bcx2a){return _0x55bcx29&& _0x55bcx2a})}));if(_0x55bcx17[_0xf0e2[67]]){_0x55bcx21= _0x55bcx21[_0xf0e2[70]](_0x55bcx17._offset)[_0xf0e2[69]](_0x55bcx17._limit)[_0xf0e2[68]]()};return [_0x55bcx18[_0xf0e2[71]],_0x55bcx21]})[_0xf0e2[50]](function(_0x55bcx1c,_0x55bcx1d){return _0x55bcxa[_0xf0e2[14]](200)[_0xf0e2[13]]({rows:_0x55bcx1d,count:_0x55bcx1c})})[_0xf0e2[12]](function(_0x55bcxc){console[_0xf0e2[49]](_0x55bcxc);return handleError(_0x55bcxa,_0x55bcxc)})};exports[_0xf0e2[89]]= function(_0x55bcx9,_0x55bcxa){var _0x55bcx33={};if(_0x55bcx9[_0xf0e2[30]][_0xf0e2[39]]=== _0xf0e2[37]){_0x55bcx33[_0xf0e2[90]]= _0x55bcx9[_0xf0e2[30]][_0xf0e2[91]]};return Promise[_0xf0e2[31]]([])[_0xf0e2[15]](getVoiceQueues(_0x55bcx9[_0xf0e2[30]]))[_0xf0e2[15]](function(_0x55bcx12){return ReportQueue[_0xf0e2[93]](_0xf0e2[28],{method:[_0xf0e2[92],_0x55bcx12]})[_0xf0e2[38]](Util[_0xf0e2[17]](_0x55bcx9[_0xf0e2[16]],_0x55bcx33))})[_0xf0e2[15]](function(_0x55bcx11){return _0x55bcxa[_0xf0e2[14]](200)[_0xf0e2[13]]({rows:_0x55bcx11,count:_0x55bcx11[_0xf0e2[71]]})})[_0xf0e2[12]](function(_0x55bcxc){return handleError(_0x55bcxa,_0x55bcxc)})};exports[_0xf0e2[88]]= function(_0x55bcx9,_0x55bcxa){return Promise[_0xf0e2[31]]([])[_0xf0e2[15]](getVoiceQueues(_0x55bcx9[_0xf0e2[30]]))[_0xf0e2[15]](function(_0x55bcx12){return ReportQueue[_0xf0e2[29]]({where:{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null},queue:_0x55bcx12}})})[_0xf0e2[15]](function(_0x55bcx11){return _0x55bcxa[_0xf0e2[14]](200)[_0xf0e2[13]]({value:_0x55bcx11})})[_0xf0e2[12]](function(_0x55bcxc){return handleError(_0x55bcxa,_0x55bcxc)})};exports[_0xf0e2[55]]= function(_0x55bcx9,_0x55bcxa){return Promise[_0xf0e2[31]]([])[_0xf0e2[15]](getVoiceQueues(_0x55bcx9[_0xf0e2[30]]))[_0xf0e2[15]](function(_0x55bcx12){return ReportQueue[_0xf0e2[29]]({where:{queuecallercomplete:true,queue:_0x55bcx12}})})[_0xf0e2[15]](function(_0x55bcx11){return _0x55bcxa[_0xf0e2[14]](200)[_0xf0e2[13]]({value:_0x55bcx11})})[_0xf0e2[12]](function(_0x55bcxc){return handleError(_0x55bcxa,_0x55bcxc)})};exports[_0xf0e2[58]]= function(_0x55bcx9,_0x55bcxa){return Promise[_0xf0e2[31]]([])[_0xf0e2[15]](getVoiceQueues(_0x55bcx9[_0xf0e2[30]]))[_0xf0e2[15]](function(_0x55bcx12){return ReportQueue[_0xf0e2[29]]({where:{queuecallerabandon:true,queue:_0x55bcx12}})})[_0xf0e2[15]](function(_0x55bcx11){return _0x55bcxa[_0xf0e2[14]](200)[_0xf0e2[13]]({value:_0x55bcx11})})[_0xf0e2[12]](function(_0x55bcxc){return handleError(_0x55bcxa,_0x55bcxc)})};exports[_0xf0e2[94]]= function(_0x55bcx9,_0x55bcxa){return Promise[_0xf0e2[31]]([])[_0xf0e2[15]](getVoiceQueues(_0x55bcx9[_0xf0e2[30]]))[_0xf0e2[15]](function(_0x55bcx12){return sequelize[_0xf0e2[16]](_0xf0e2[95]+ _0x55bcx12[_0xf0e2[76]](_0xf0e2[75])+ _0xf0e2[96],{type:sequelize[_0xf0e2[79]][_0xf0e2[78]]})})[_0xf0e2[15]](function(_0x55bcx11){return _0x55bcxa[_0xf0e2[14]](200)[_0xf0e2[13]]({value:_0x55bcx11[0][_0xf0e2[68]]})})[_0xf0e2[12]](function(_0x55bcxc){return handleError(_0x55bcxa,_0x55bcxc)})};exports[_0xf0e2[97]]= function(_0x55bcx9,_0x55bcxa){return Promise[_0xf0e2[31]]([])[_0xf0e2[15]](getVoiceQueues(_0x55bcx9[_0xf0e2[30]]))[_0xf0e2[15]](function(_0x55bcx12){return sequelize[_0xf0e2[16]](_0xf0e2[98]+ _0x55bcx12[_0xf0e2[76]](_0xf0e2[75])+ _0xf0e2[96],{type:sequelize[_0xf0e2[79]][_0xf0e2[78]]})})[_0xf0e2[15]](function(_0x55bcx11){return _0x55bcxa[_0xf0e2[14]](200)[_0xf0e2[13]]({value:_0x55bcx11[0][_0xf0e2[68]]})})[_0xf0e2[12]](function(_0x55bcxc){return handleError(_0x55bcxa,_0x55bcxc)})};exports[_0xf0e2[99]]= function(_0x55bcx9,_0x55bcxa){return Promise[_0xf0e2[31]]([])[_0xf0e2[15]](getVoiceQueues(_0x55bcx9[_0xf0e2[30]]))[_0xf0e2[15]](function(_0x55bcx12){return sequelize[_0xf0e2[16]](_0xf0e2[100]+ _0x55bcx12[_0xf0e2[76]](_0xf0e2[75])+ _0xf0e2[96],{type:sequelize[_0xf0e2[79]][_0xf0e2[78]]})})[_0xf0e2[15]](function(_0x55bcx11){return _0x55bcxa[_0xf0e2[14]](200)[_0xf0e2[13]]({value:_0x55bcx11[0][_0xf0e2[68]]})})[_0xf0e2[12]](function(_0x55bcxc){return handleError(_0x55bcxa,_0x55bcxc)})};exports[_0xf0e2[101]]= function(_0x55bcx9,_0x55bcxa){return Promise[_0xf0e2[31]]([])[_0xf0e2[15]](getVoiceQueues(_0x55bcx9[_0xf0e2[30]]))[_0xf0e2[15]](function(_0x55bcx12){return sequelize[_0xf0e2[16]](_0xf0e2[102]+ _0x55bcx12[_0xf0e2[76]](_0xf0e2[75])+ _0xf0e2[96],{type:sequelize[_0xf0e2[79]][_0xf0e2[78]]})})[_0xf0e2[15]](function(_0x55bcx11){return _0x55bcxa[_0xf0e2[14]](200)[_0xf0e2[13]]({value:_0x55bcx11[0][_0xf0e2[68]]})})[_0xf0e2[12]](function(_0x55bcxc){return handleError(_0x55bcxa,_0x55bcxc)})};exports[_0xf0e2[103]]= function(_0x55bcx9,_0x55bcxa){return Promise[_0xf0e2[31]]([])[_0xf0e2[15]](getVoiceQueues(_0x55bcx9[_0xf0e2[30]]))[_0xf0e2[15]](function(_0x55bcx12){return sequelize[_0xf0e2[16]](_0xf0e2[104]+ _0x55bcx12[_0xf0e2[76]](_0xf0e2[75])+ _0xf0e2[96],{type:sequelize[_0xf0e2[79]][_0xf0e2[78]]})})[_0xf0e2[15]](function(_0x55bcx11){return _0x55bcxa[_0xf0e2[14]](200)[_0xf0e2[13]]({value:_0x55bcx11[0][_0xf0e2[68]]})})[_0xf0e2[12]](function(_0x55bcxc){return handleError(_0x55bcxa,_0x55bcxc)})};exports[_0xf0e2[61]]= function(_0x55bcx9,_0x55bcxa){return Promise[_0xf0e2[31]]([])[_0xf0e2[15]](getVoiceQueues(_0x55bcx9[_0xf0e2[30]]))[_0xf0e2[15]](function(_0x55bcx12){return ReportQueue[_0xf0e2[29]]({where:{queuecallerexit:true,queue:_0x55bcx12}})})[_0xf0e2[15]](function(_0x55bcx11){return _0x55bcxa[_0xf0e2[14]](200)[_0xf0e2[13]]({value:_0x55bcx11})})[_0xf0e2[12]](function(_0x55bcxc){return handleError(_0x55bcxa,_0x55bcxc)})};exports[_0xf0e2[105]]= function(_0x55bcx9,_0x55bcxa){return Promise[_0xf0e2[31]]([])[_0xf0e2[15]](getVoiceQueues(_0x55bcx9[_0xf0e2[30]]))[_0xf0e2[15]](function(_0x55bcx12){return ReportQueue[_0xf0e2[18]]({where:{queuecallerabandon:true,queue:_0x55bcx12}})})[_0xf0e2[15]](function(_0x55bcx11){return _0x55bcxa[_0xf0e2[14]](200)[_0xf0e2[13]](_0x55bcx11)})[_0xf0e2[12]](function(_0x55bcxc){return handleError(_0x55bcxa,_0x55bcxc)})};exports[_0xf0e2[106]]= function(_0x55bcx9,_0x55bcxa){return ReportQueue[_0xf0e2[38]]({where:{queue:_0x55bcx9[_0xf0e2[25]][_0xf0e2[84]]}})[_0xf0e2[15]](function(_0x55bcx34){if(!_0x55bcx34){return _0x55bcxa[_0xf0e2[20]](404)};return _0x55bcxa[_0xf0e2[13]]({count:_0x55bcx34[_0xf0e2[71]],rows:_0x55bcx34})})[_0xf0e2[12]](function(_0x55bcxc){return handleError(_0x55bcxa,_0x55bcxc)})};function handleError(_0x55bcxa,_0x55bcxc){return _0x55bcxa[_0xf0e2[14]](500)[_0xf0e2[13]](_0x55bcxc)} \ No newline at end of file +'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); +} diff --git a/server/api/report_queue/report_queue.events.js b/server/api/report_queue/report_queue.events.js index 0b977a6..29eace5 100644 --- a/server/api/report_queue/report_queue.events.js +++ b/server/api/report_queue/report_queue.events.js @@ -1 +1,36 @@ -var _0x7c8a=["\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"];_0x7c8a[0];const EventEmitter=require(_0x7c8a[1]);const ReportQueue=require(_0x7c8a[3])[_0x7c8a[2]];var ReportQueueEvents= new EventEmitter();ReportQueueEvents[_0x7c8a[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x7c8a[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x7c8a[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x7c8a[7]};for(var e in events){var event=events[e];ReportQueue[_0x7c8a[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x9614x8,_0x9614x9,_0x9614xa){ReportQueueEvents[_0x7c8a[11]](event+ _0x7c8a[9]+ _0x9614x8[_0x7c8a[10]],_0x9614x8);ReportQueueEvents[_0x7c8a[11]](event,_0x9614x8);_0x9614xa(null)}}module[_0x7c8a[12]]= ReportQueueEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/report_queue/report_queue.socket.js b/server/api/report_queue/report_queue.socket.js index f498462..3c27c94 100644 --- a/server/api/report_queue/report_queue.socket.js +++ b/server/api/report_queue/report_queue.socket.js @@ -1 +1,93 @@ -var _0x2e45=["\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"];_0x2e45[0];const ReportQueueEvents=require(_0x2e45[1]);const VoiceQueue=require(_0x2e45[3])[_0x2e45[2]];const User=require(_0x2e45[3])[_0x2e45[4]];const Util=require(_0x2e45[5]);const _=require(_0x2e45[6]);const Promise=require(_0x2e45[7]);var events=[_0x2e45[8],_0x2e45[9],_0x2e45[10]];exports[_0x2e45[11]]= function(_0xd5ffx8){for(var _0xd5ffx9=0,_0xd5ffxa=events[_0x2e45[12]];_0xd5ffx9< _0xd5ffxa;_0xd5ffx9++){var _0xd5ffxb=events[_0xd5ffx9];var _0xd5ffxc=createListener(_0x2e45[13]+ _0xd5ffxb,_0xd5ffx8);ReportQueueEvents[_0x2e45[14]](_0xd5ffxb,_0xd5ffxc);_0xd5ffx8[_0x2e45[14]](_0x2e45[15],removeListener(_0xd5ffxb,_0xd5ffxc))}};function createListener(_0xd5ffxb,_0xd5ffx8){return function(_0xd5ffxe){switch(_0xd5ffxb){case _0x2e45[16]:;case _0x2e45[25]:return Promise[_0x2e45[24]]([])[_0x2e45[23]](getVoiceQueues(_0xd5ffx8))[_0x2e45[23]](function(_0xd5ffx10){if(_[_0x2e45[21]](_0xd5ffx10,_0xd5ffxe[_0x2e45[20]])){_0xd5ffx8[_0x2e45[22]](_0xd5ffxb,_0xd5ffxe)}})[_0x2e45[19]](function(_0xd5ffxf){console[_0x2e45[18]](_0x2e45[17],_0xd5ffxf)});case _0x2e45[26]:_0xd5ffx8[_0x2e45[22]](_0xd5ffxb,_0xd5ffxe);break;default:}}}function removeListener(_0xd5ffxb,_0xd5ffxc){return function(){ReportQueueEvents[_0x2e45[27]](_0xd5ffxb,_0xd5ffxc)}}function getVoiceQueues(_0xd5ffx13){return function(){switch(_0xd5ffx13[_0x2e45[40]]){case _0x2e45[35]:return User[_0x2e45[34]](_0xd5ffx13[_0x2e45[32]],{attributes:[_0x2e45[33]]})[_0x2e45[23]](Util[_0x2e45[31]]())[_0x2e45[23]](function(_0xd5ffx10){return _[_0x2e45[30]](_0xd5ffx10[_0x2e45[28]],_0x2e45[29])});case _0x2e45[37]:return User[_0x2e45[38]](_0x2e45[37])[_0x2e45[34]](_0xd5ffx13[_0x2e45[32]])[_0x2e45[23]](function(_0xd5ffx15){return _0xd5ffx15[_0x2e45[36]]({attributes:[_0x2e45[29]]})})[_0x2e45[23]](function(_0xd5ffx14){return _[_0x2e45[30]](_0xd5ffx14,_0x2e45[29])});default:return VoiceQueue[_0x2e45[39]]()[_0x2e45[23]](function(_0xd5ffx10){return _[_0x2e45[30]](_0xd5ffx10,_0x2e45[29])})}}} \ No newline at end of file +/** + * 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'); + }); + } + } +} diff --git a/server/api/report_sms/index.js b/server/api/report_sms/index.js index 0a93b65..93dc165 100644 --- a/server/api/report_sms/index.js +++ b/server/api/report_sms/index.js @@ -1 +1,16 @@ -var _0x6221=["\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"];_0x6221[0];var express=require(_0x6221[1]);var controller=require(_0x6221[2]);var auth=require(_0x6221[3]);var license=require(_0x6221[4]);var router=express.Router();router[_0x6221[12]](_0x6221[5],auth[_0x6221[6]](),license[_0x6221[7]](),auth[_0x6221[10]]([17],[_0x6221[8],_0x6221[9]]),controller[_0x6221[11]]);router[_0x6221[12]](_0x6221[13],auth[_0x6221[6]](),license[_0x6221[7]](),auth[_0x6221[14]](_0x6221[9]),controller[_0x6221[15]]);router[_0x6221[12]](_0x6221[16],auth[_0x6221[6]](),license[_0x6221[7]](),auth[_0x6221[14]](_0x6221[9]),controller[_0x6221[17]]);module[_0x6221[18]]= router \ No newline at end of file +'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; diff --git a/server/api/report_sms/report_sms.controller.js b/server/api/report_sms/report_sms.controller.js index fe4d4b4..20e4240 100644 --- a/server/api/report_sms/report_sms.controller.js +++ b/server/api/report_sms/report_sms.controller.js @@ -1 +1,179 @@ -var _0xbfd6=["\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"];_0xbfd6[0];var _=require(_0xbfd6[1]);var ReportSms=require(_0xbfd6[3])[_0xbfd6[2]];var SmsRoom=require(_0xbfd6[3])[_0xbfd6[4]];var sequelize=require(_0xbfd6[3])[_0xbfd6[5]];var Agent=require(_0xbfd6[3])[_0xbfd6[6]];var Util=require(_0xbfd6[7]);var moment=require(_0xbfd6[8]);function handleError(_0x5429x9,_0x5429xa){return _0x5429x9[_0xbfd6[10]](500)[_0xbfd6[9]](_0x5429xa)}exports[_0xbfd6[11]]= function(_0x5429xb,_0x5429x9){return ReportSms[_0xbfd6[16]](Util[_0xbfd6[15]](_0x5429xb[_0xbfd6[14]]))[_0xbfd6[13]](function(_0x5429xc){_0x5429x9[_0xbfd6[10]](200)[_0xbfd6[9]](_0x5429xc)})[_0xbfd6[12]](function(_0x5429xa){return handleError(_0x5429x9,_0x5429xa)})};exports[_0xbfd6[17]]= function(_0x5429xb,_0x5429x9){var _0x5429xd;var _0x5429xe=_0x5429xb[_0xbfd6[21]][_0xbfd6[20]][_0xbfd6[19]](_0xbfd6[18])[1];return Agent[_0xbfd6[30]](_0x5429xb[_0xbfd6[25]][_0xbfd6[29]],{attributes:[_0xbfd6[29],_0xbfd6[33]]})[_0xbfd6[13]](function(_0x5429x12){_0x5429xd= _0x5429x12;return _0x5429x12[_0xbfd6[32]]({where:{status:{$ne:_0xbfd6[31]},id:{$ne:_0x5429xe}},attributes:[_0xbfd6[29]]})})[_0xbfd6[13]](function(_0x5429x11){return ReportSms[_0xbfd6[30]](_0x5429xb[_0xbfd6[21]][_0xbfd6[29]])})[_0xbfd6[13]](function(_0x5429xf){if(!_0x5429xf){return _0x5429x9[_0xbfd6[22]](404)};var _0x5429x10=_[_0xbfd6[27]](_0x5429xf,{connectid:_0x5429xb[_0xbfd6[21]][_0xbfd6[20]]});return _0x5429x10[_0xbfd6[28]]()})[_0xbfd6[13]](function(){return SmsRoom[_0xbfd6[26]]({status:_0xbfd6[23],openReason:_0xbfd6[24]},{where:{id:_0x5429xe},user:_0x5429xb[_0xbfd6[25]],individualHooks:true})})[_0xbfd6[13]](function(){return _0x5429x9[_0xbfd6[22]](200)})[_0xbfd6[12]](sequelize.UniqueConstraintError,function(_0x5429xa){return _0x5429x9[_0xbfd6[22]](504)})[_0xbfd6[12]](function(_0x5429xa){return handleError(_0x5429x9,_0x5429xa)})};exports[_0xbfd6[34]]= function(_0x5429xb,_0x5429x9){return ReportSms[_0xbfd6[30]](_0x5429xb[_0xbfd6[21]][_0xbfd6[29]])[_0xbfd6[13]](function(_0x5429xf){if(!_0x5429xf){return _0x5429x9[_0xbfd6[22]](404)};var _0x5429x10=_[_0xbfd6[27]](_0x5429xf,{rejectedAt:moment()[_0xbfd6[36]](_0xbfd6[35])});return _0x5429x10[_0xbfd6[28]]()})[_0xbfd6[13]](function(){return _0x5429x9[_0xbfd6[22]](200)})[_0xbfd6[12]](function(_0x5429xa){return handleError(_0x5429x9,_0x5429xa)})} \ No newline at end of file +/** + * 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); +// }); +// } diff --git a/server/api/report_sms/report_sms.events.js b/server/api/report_sms/report_sms.events.js index 94f4568..85c8624 100644 --- a/server/api/report_sms/report_sms.events.js +++ b/server/api/report_sms/report_sms.events.js @@ -1 +1,36 @@ -var _0xbf0d=["\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"];_0xbf0d[0];const EventEmitter=require(_0xbf0d[1]);const ReportSms=require(_0xbf0d[3])[_0xbf0d[2]];var ReportSmsEvents= new EventEmitter();ReportSmsEvents[_0xbf0d[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xbf0d[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xbf0d[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xbf0d[7]};for(var e in events){var event=events[e];ReportSms[_0xbf0d[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x907fx8,_0x907fx9,_0x907fxa){ReportSmsEvents[_0xbf0d[11]](event+ _0xbf0d[9]+ _0x907fx8[_0xbf0d[10]],_0x907fx8);ReportSmsEvents[_0xbf0d[11]](event,_0x907fx8);_0x907fxa(null)}}module[_0xbf0d[12]]= ReportSmsEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/report_sms/report_sms.socket.js b/server/api/report_sms/report_sms.socket.js index 3819cf9..f63cd11 100644 --- a/server/api/report_sms/report_sms.socket.js +++ b/server/api/report_sms/report_sms.socket.js @@ -1 +1,46 @@ -var _0xd636=["\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"];_0xd636[0];const ReportSmsEvents=require(_0xd636[1]);var events=[_0xd636[2],_0xd636[3],_0xd636[4]];exports[_0xd636[5]]= function(_0xd47cx3){for(var _0xd47cx4=0,_0xd47cx5=events[_0xd636[6]];_0xd47cx4< _0xd47cx5;_0xd47cx4++){var _0xd47cx6=events[_0xd47cx4];var _0xd47cx7=createListener(_0xd636[7]+ _0xd47cx6,_0xd47cx3);ReportSmsEvents[_0xd636[8]](_0xd47cx6,_0xd47cx7);_0xd47cx3[_0xd636[8]](_0xd636[9],removeListener(_0xd47cx6,_0xd47cx7))}};function createListener(_0xd47cx6,_0xd47cx3){return function(_0xd47cx9){switch(_0xd47cx6){case _0xd636[10]:;case _0xd636[16]:if(_0xd47cx3[_0xd636[11]]=== _0xd47cx9[_0xd636[12]]|| _0xd47cx3[_0xd636[13]]=== _0xd636[14]){_0xd47cx3[_0xd636[15]](_0xd47cx6,_0xd47cx9)};break;case _0xd636[17]:_0xd47cx3[_0xd636[15]](_0xd47cx6,_0xd47cx9);break;default:}}}function removeListener(_0xd47cx6,_0xd47cx7){return function(){ReportSmsEvents[_0xd636[18]](_0xd47cx6,_0xd47cx7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/report_sms_session/index.js b/server/api/report_sms_session/index.js index 7167bf2..eba420d 100644 --- a/server/api/report_sms_session/index.js +++ b/server/api/report_sms_session/index.js @@ -1 +1,16 @@ -var _0xff9d=["\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"];_0xff9d[0];var express=require(_0xff9d[1]);var controller=require(_0xff9d[2]);var auth=require(_0xff9d[3]);var license=require(_0xff9d[4]);var router=express.Router();router[_0xff9d[11]](_0xff9d[5],auth[_0xff9d[6]](),license[_0xff9d[7]](),auth[_0xff9d[9]]([17],[_0xff9d[8]]),controller[_0xff9d[10]]);router[_0xff9d[11]](_0xff9d[12],auth[_0xff9d[6]](),license[_0xff9d[7]](),auth[_0xff9d[9]]([17],[_0xff9d[8]]),controller[_0xff9d[13]]);router[_0xff9d[11]](_0xff9d[14],license[_0xff9d[15]](),auth[_0xff9d[6]](),license[_0xff9d[7]](),auth[_0xff9d[9]]([17],[_0xff9d[8]]),controller[_0xff9d[16]]);router[_0xff9d[11]](_0xff9d[17],license[_0xff9d[15]](),auth[_0xff9d[6]](),license[_0xff9d[7]](),auth[_0xff9d[9]]([17],[_0xff9d[8]]),controller[_0xff9d[18]]);router[_0xff9d[11]](_0xff9d[19],auth[_0xff9d[6]](),license[_0xff9d[7]](),auth[_0xff9d[9]]([11],[_0xff9d[8],_0xff9d[20]]),controller[_0xff9d[21]]);module[_0xff9d[22]]= router \ No newline at end of file +'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; 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 2681070..0b240ac 100644 --- a/server/api/report_sms_session/report_sms_session.controller.js +++ b/server/api/report_sms_session/report_sms_session.controller.js @@ -1 +1,155 @@ -var _0xc1e2=["\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"];_0xc1e2[0];var _=require(_0xc1e2[1]);var ReportSmsSession=require(_0xc1e2[3])[_0xc1e2[2]];var ReportSmsSessionHistory=require(_0xc1e2[3])[_0xc1e2[5]][_0xc1e2[4]];var Util=require(_0xc1e2[6]);var User=require(_0xc1e2[3])[_0xc1e2[7]];var Promise=require(_0xc1e2[8]);exports[_0xc1e2[9]]= function(_0xd8c3x7,_0xd8c3x8,_0xd8c3x9){return ReportSmsSession[_0xc1e2[16]](Util[_0xc1e2[15]](_0xd8c3x7[_0xc1e2[14]]))[_0xc1e2[13]](function(_0xd8c3xb){_0xd8c3x8[_0xc1e2[12]](200)[_0xc1e2[11]](_0xd8c3xb)})[_0xc1e2[10]](function(_0xd8c3xa){return handleError(_0xd8c3x8,_0xd8c3xa)})};exports[_0xc1e2[17]]= function(_0xd8c3x7,_0xd8c3x8){return ReportSmsSessionHistory[_0xc1e2[17]]()[_0xc1e2[13]](function(_0xd8c3xc){return _0xd8c3x8[_0xc1e2[12]](200)[_0xc1e2[11]](_0xd8c3xc)})[_0xc1e2[10]](function(_0xd8c3xa){return handleError(_0xd8c3x8,_0xd8c3xa)})};function getSmsQueues(_0xd8c3xe){return function(){switch(_0xd8c3xe[_0xc1e2[28]]){case _0xc1e2[25]:return User[_0xc1e2[24]](_0xd8c3xe[_0xc1e2[18]],{attributes:[_0xc1e2[18]]})[_0xc1e2[13]](Util[_0xc1e2[23]]({},{attributes:[_0xc1e2[18]],include:[{raw:true,model:User,attributes:[_0xc1e2[18]]}]}))[_0xc1e2[13]](function(_0xd8c3xf){var _0xd8c3x10=[];_0xd8c3xf[_0xc1e2[22]][_0xc1e2[21]](function(_0xd8c3x11){_0xd8c3x10= _[_0xc1e2[20]](_0xd8c3x10,_[_0xc1e2[19]](_0xd8c3x11.Users,_0xc1e2[18]))});return {$or:{queue:_[_0xc1e2[19]](_0xd8c3xf[_0xc1e2[22]],_0xc1e2[18]),memberid:_0xd8c3x10}}});case _0xc1e2[27]:return User[_0xc1e2[24]](_0xd8c3xe[_0xc1e2[18]],{attributes:[_0xc1e2[18]]})[_0xc1e2[13]](function(_0xd8c3x12){return _0xd8c3x12[_0xc1e2[26]]({attributes:[_0xc1e2[18]]})})[_0xc1e2[13]](function(_0xd8c3xf){return {$or:{queue:_[_0xc1e2[19]](_0xd8c3xf,_0xc1e2[18]),memberid:_0xd8c3xe[_0xc1e2[18]]}}});default:return {}}}}exports[_0xc1e2[29]]= function(_0xd8c3x7,_0xd8c3x8){return Promise[_0xc1e2[33]]([])[_0xc1e2[13]](getSmsQueues(_0xd8c3x7[_0xc1e2[25]]))[_0xc1e2[13]](function(_0xd8c3x14){return ReportSmsSession[_0xc1e2[32]](Util[_0xc1e2[15]](_0xd8c3x7[_0xc1e2[14]],_[_0xc1e2[31]]({timeout:true},_0xd8c3x14)))})[_0xc1e2[13]](function(_0xd8c3x13){return _0xd8c3x8[_0xc1e2[12]](200)[_0xc1e2[11]]({value:_0xd8c3x13})})[_0xc1e2[10]](function(_0xd8c3xa){console[_0xc1e2[30]](_0xd8c3xa);return handleError(_0xd8c3x8,_0xd8c3xa)})};exports[_0xc1e2[34]]= function(_0xd8c3x7,_0xd8c3x8){return Promise[_0xc1e2[33]]([])[_0xc1e2[13]](getSmsQueues(_0xd8c3x7[_0xc1e2[25]]))[_0xc1e2[13]](function(_0xd8c3x14){return ReportSmsSession[_0xc1e2[32]](Util[_0xc1e2[15]](_0xd8c3x7[_0xc1e2[14]],_[_0xc1e2[31]]({leaveAt:null},_0xd8c3x14)))})[_0xc1e2[13]](function(_0xd8c3x13){return _0xd8c3x8[_0xc1e2[12]](200)[_0xc1e2[11]]({value:_0xd8c3x13})})[_0xc1e2[10]](function(_0xd8c3xa){console[_0xc1e2[30]](_0xd8c3xa);return handleError(_0xd8c3x8,_0xd8c3xa)})};exports[_0xc1e2[35]]= function(_0xd8c3x7,_0xd8c3x8){return Promise[_0xc1e2[33]]([])[_0xc1e2[13]](getSmsQueues(_0xd8c3x7[_0xc1e2[25]]))[_0xc1e2[13]](function(_0xd8c3x14){return ReportSmsSession[_0xc1e2[36]](Util[_0xc1e2[15]](_0xd8c3x7[_0xc1e2[14]],_[_0xc1e2[31]]({leaveAt:null},_0xd8c3x14)))})[_0xc1e2[13]](function(_0xd8c3x13){return _0xd8c3x8[_0xc1e2[12]](200)[_0xc1e2[11]]({rows:_0xd8c3x13})})[_0xc1e2[10]](function(_0xd8c3xa){console[_0xc1e2[30]](_0xd8c3xa);return handleError(_0xd8c3x8,_0xd8c3xa)})};function handleError(_0xd8c3x8,_0xd8c3xa){return _0xd8c3x8[_0xc1e2[12]](500)[_0xc1e2[11]](_0xd8c3xa)} \ No newline at end of file +'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); +} 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 b40839b..6617408 100644 --- a/server/api/report_sms_session/report_sms_session.events.js +++ b/server/api/report_sms_session/report_sms_session.events.js @@ -1 +1,36 @@ -var _0xe0ca=["\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"];_0xe0ca[0];const EventEmitter=require(_0xe0ca[1]);const ReportSmsSession=require(_0xe0ca[3])[_0xe0ca[2]];var ReportSmsSessionEvents= new EventEmitter();ReportSmsSessionEvents[_0xe0ca[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xe0ca[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xe0ca[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xe0ca[6]};for(var e in events){var event=events[e];ReportSmsSession[_0xe0ca[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xe9cfx8,_0xe9cfx9,_0xe9cfxa){ReportSmsSessionEvents[_0xe0ca[10]](event+ _0xe0ca[8]+ _0xe9cfx8[_0xe0ca[9]],_0xe9cfx8);ReportSmsSessionEvents[_0xe0ca[10]](event,_0xe9cfx8);_0xe9cfxa(null)}}module[_0xe0ca[11]]= ReportSmsSessionEvents \ No newline at end of file +/** + * 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; 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 f189f76..ef20c19 100644 --- a/server/api/report_sms_session/report_sms_session.socket.js +++ b/server/api/report_sms_session/report_sms_session.socket.js @@ -1 +1,104 @@ -var _0x7078=["\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"];_0x7078[0];const ReportSmsSessionEvents=require(_0x7078[1]);const User=require(_0x7078[3])[_0x7078[2]];const Util=require(_0x7078[4]);const _=require(_0x7078[5]);const Promise=require(_0x7078[6]);var events=[_0x7078[7],_0x7078[8]];exports[_0x7078[9]]= function(_0x199cx7){for(var _0x199cx8=0,_0x199cx9=events[_0x7078[10]];_0x199cx8< _0x199cx9;_0x199cx8++){var _0x199cxa=events[_0x199cx8];var _0x199cxb=createListener(_0x7078[11]+ _0x199cxa,_0x199cx7);ReportSmsSessionEvents[_0x7078[12]](_0x199cxa,_0x199cxb);_0x199cx7[_0x7078[12]](_0x7078[13],removeListener(_0x199cxa,_0x199cxb))}};function createListener(_0x199cxa,_0x199cx7){return function(_0x199cxd){switch(_0x199cxa){case _0x7078[25]:return Promise[_0x7078[24]]([])[_0x7078[23]](getSmsQueues(_0x199cx7))[_0x7078[23]](function(_0x199cxf){if(_0x199cx7[_0x7078[17]]=== _0x7078[18]|| _[_0x7078[20]](_0x199cxf[_0x7078[19]],_0x199cxd[_0x7078[19]])|| _[_0x7078[20]](_0x199cxf[_0x7078[21]],_0x199cxd[_0x7078[21]])){_0x199cx7[_0x7078[22]](_0x199cxa,_0x199cxd)}})[_0x7078[16]](function(_0x199cxe){console[_0x7078[15]](_0x7078[14],_0x199cxe)});case _0x7078[26]:_0x199cx7[_0x7078[22]](_0x199cxa,_0x199cxd);break;default:}}}function removeListener(_0x199cxa,_0x199cxb){return function(){ReportSmsSessionEvents[_0x7078[27]](_0x199cxa,_0x199cxb)}}function getSmsQueues(_0x199cx12){return function(){switch(_0x199cx12[_0x7078[17]]){case _0x7078[36]:return User[_0x7078[35]](_0x199cx12[_0x7078[34]],{attributes:[_0x7078[28]]})[_0x7078[23]](Util[_0x7078[33]]({},{attributes:[_0x7078[28]],include:[{raw:true,model:User,attributes:[_0x7078[28]]}]}))[_0x7078[23]](function(_0x199cx13){var _0x199cx14=[];_0x199cx13[_0x7078[32]][_0x7078[31]](function(_0x199cx15){_0x199cx14= _[_0x7078[30]](_0x199cx14,_[_0x7078[29]](_0x199cx15.Users,_0x7078[28]))});return {queue:_[_0x7078[29]](_0x199cx13[_0x7078[32]],_0x7078[28]),memberid:_0x199cx14}});case _0x7078[38]:return User[_0x7078[35]](_0x199cx12[_0x7078[34]],{attributes:[_0x7078[28]]})[_0x7078[23]](function(_0x199cx16){return _0x199cx16[_0x7078[37]]({attributes:[_0x7078[28]]})})[_0x7078[23]](function(_0x199cx13){return {queue:_[_0x7078[29]](_0x199cx13,_0x7078[28]),memberid:_0x199cx12[_0x7078[34]]}});default:return {}}}} \ No newline at end of file +/** + * 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 {}; + } + } +} diff --git a/server/api/report_square/index.js b/server/api/report_square/index.js index 54321a7..ecde7a2 100644 --- a/server/api/report_square/index.js +++ b/server/api/report_square/index.js @@ -1 +1,14 @@ -var _0x2f37=["\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"];_0x2f37[0];var express=require(_0x2f37[1]);var controller=require(_0x2f37[2]);var auth=require(_0x2f37[3]);var router=express.Router();router[_0x2f37[9]](_0x2f37[4],auth[_0x2f37[5]](),auth[_0x2f37[7]]([14],[_0x2f37[6]]),controller[_0x2f37[8]]);router[_0x2f37[9]](_0x2f37[10],auth[_0x2f37[5]](),auth[_0x2f37[7]]([14],[_0x2f37[6]]),controller[_0x2f37[11]]);router[_0x2f37[9]](_0x2f37[12],auth[_0x2f37[5]](),auth[_0x2f37[7]]([14],[_0x2f37[6]]),controller[_0x2f37[13]]);router[_0x2f37[9]](_0x2f37[14],auth[_0x2f37[5]](),auth[_0x2f37[7]]([14],[_0x2f37[6],_0x2f37[15]]),controller[_0x2f37[16]]);module[_0x2f37[17]]= router \ No newline at end of file +'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; diff --git a/server/api/report_square/report_square.controller.js b/server/api/report_square/report_square.controller.js index 28ddf17..b32d3b6 100644 --- a/server/api/report_square/report_square.controller.js +++ b/server/api/report_square/report_square.controller.js @@ -1 +1,72 @@ -var _0x4496=["\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"];_0x4496[0];var _=require(_0x4496[1]);var ReportSquare=require(_0x4496[3])[_0x4496[2]];var ReportSquareHistory=require(_0x4496[3])[_0x4496[5]][_0x4496[4]];var Util=require(_0x4496[6]);exports[_0x4496[7]]= function(_0xaf0fx5,_0xaf0fx6,_0xaf0fx7){return generalIndex(_0xaf0fx5,_0xaf0fx6,_0xaf0fx7)};exports[_0x4496[8]]= function(_0xaf0fx5,_0xaf0fx6,_0xaf0fx7){return generalIndex(_0xaf0fx5,_0xaf0fx6,_0xaf0fx7,{leaveAt:null})};function generalIndex(_0xaf0fx5,_0xaf0fx6,_0xaf0fx7,_0xaf0fx9){return ReportSquare[_0x4496[15]](Util[_0x4496[14]](_0xaf0fx5[_0x4496[13]],_0xaf0fx9|| {}))[_0x4496[12]](function(_0xaf0fxb){return _0xaf0fx6[_0x4496[11]](200)[_0x4496[10]](_0xaf0fxb)})[_0x4496[9]](function(_0xaf0fxa){return handleError(_0xaf0fx6,_0xaf0fxa)})}exports[_0x4496[16]]= function(_0xaf0fx5,_0xaf0fx6){return ReportSquareHistory[_0x4496[16]]()[_0x4496[12]](function(_0xaf0fxc){return _0xaf0fx6[_0x4496[11]](200)[_0x4496[10]](_0xaf0fxc)})[_0x4496[9]](function(_0xaf0fxa){return handleError(_0xaf0fx6,_0xaf0fxa)})};exports[_0x4496[17]]= function(_0xaf0fx5,_0xaf0fx6){return ReportSquare[_0x4496[20]]({where:{uniqueid:_0xaf0fx5[_0x4496[13]][_0x4496[19]]}})[_0x4496[12]](function(_0xaf0fxd){if(_0xaf0fxd){return _0xaf0fxd};return ReportSquareHistory[_0x4496[20]]({where:{uniqueid:_0xaf0fx5[_0x4496[13]][_0x4496[19]]}})})[_0x4496[12]](function(_0xaf0fxd){if(!_0xaf0fxd){return _0xaf0fx6[_0x4496[18]](404)};return _0xaf0fx6[_0x4496[11]](200)[_0x4496[10]](_0xaf0fxd)})[_0x4496[9]](function(_0xaf0fxa){return handleError(_0xaf0fx6,_0xaf0fxa)})};function handleError(_0xaf0fx6,_0xaf0fxa){return _0xaf0fx6[_0x4496[11]](500)[_0x4496[10]](_0xaf0fxa)} \ No newline at end of file +'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); +} diff --git a/server/api/report_square/report_square.events.js b/server/api/report_square/report_square.events.js index 516057a..6dd24aa 100644 --- a/server/api/report_square/report_square.events.js +++ b/server/api/report_square/report_square.events.js @@ -1 +1,36 @@ -var _0x12b1=["\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"];_0x12b1[0];const EventEmitter=require(_0x12b1[1]);const ReportSquare=require(_0x12b1[3])[_0x12b1[2]];var ReportSquareEvents= new EventEmitter();ReportSquareEvents[_0x12b1[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x12b1[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x12b1[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x12b1[6]};for(var e in events){var event=events[e];ReportSquare[_0x12b1[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x84c6x8,_0x84c6x9,_0x84c6xa){ReportSquareEvents[_0x12b1[10]](event+ _0x12b1[8]+ _0x84c6x8[_0x12b1[9]],_0x84c6x8);ReportSquareEvents[_0x12b1[10]](event,_0x84c6x8);_0x84c6xa(null)}}module[_0x12b1[11]]= ReportSquareEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/report_square/report_square.socket.js b/server/api/report_square/report_square.socket.js index e622b25..c919775 100644 --- a/server/api/report_square/report_square.socket.js +++ b/server/api/report_square/report_square.socket.js @@ -1 +1,44 @@ -var _0x6da7=["\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"];_0x6da7[0];const ReportSquareEvents=require(_0x6da7[1]);var events=[_0x6da7[2],_0x6da7[3]];exports[_0x6da7[4]]= function(_0x174ex3){for(var _0x174ex4=0,_0x174ex5=events[_0x6da7[5]];_0x174ex4< _0x174ex5;_0x174ex4++){var _0x174ex6=events[_0x174ex4];var _0x174ex7=createListener(_0x6da7[6]+ _0x174ex6,_0x174ex3);ReportSquareEvents[_0x6da7[7]](_0x174ex6,_0x174ex7);_0x174ex3[_0x6da7[7]](_0x6da7[8],removeListener(_0x174ex6,_0x174ex7))}};function createListener(_0x174ex6,_0x174ex3){return function(_0x174ex9){switch(_0x174ex6){case _0x6da7[12]:if(_0x174ex3[_0x6da7[9]]!== _0x6da7[10]){_0x174ex3[_0x6da7[11]](_0x174ex6,_0x174ex9)};break;case _0x6da7[13]:_0x174ex3[_0x6da7[11]](_0x174ex6,_0x174ex9);break;default:}}}function removeListener(_0x174ex6,_0x174ex7){return function(){ReportSquareEvents[_0x6da7[14]](_0x174ex6,_0x174ex7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/report_square_detail/index.js b/server/api/report_square_detail/index.js index 81a5612..58f916c 100644 --- a/server/api/report_square_detail/index.js +++ b/server/api/report_square_detail/index.js @@ -1 +1,13 @@ -var _0x442e=["\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"];_0x442e[0];var express=require(_0x442e[1]);var controller=require(_0x442e[2]);var auth=require(_0x442e[3]);var router=express.Router();router[_0x442e[9]](_0x442e[4],auth[_0x442e[5]](),auth[_0x442e[7]]([14],[_0x442e[6]]),controller[_0x442e[8]]);router[_0x442e[9]](_0x442e[10],auth[_0x442e[5]](),auth[_0x442e[7]]([14],[_0x442e[6]]),controller[_0x442e[11]]);router[_0x442e[9]](_0x442e[12],auth[_0x442e[5]](),auth[_0x442e[7]]([14],[_0x442e[6]]),controller[_0x442e[13]]);module[_0x442e[14]]= router \ No newline at end of file +'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; 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 bca860f..c903f0f 100644 --- a/server/api/report_square_detail/report_square_detail.controller.js +++ b/server/api/report_square_detail/report_square_detail.controller.js @@ -1 +1,44 @@ -var _0x152c=["\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"];_0x152c[0];var _=require(_0x152c[1]);var ReportSquareDetail=require(_0x152c[3])[_0x152c[2]];var ReportSquareDetailHistory=require(_0x152c[3])[_0x152c[5]][_0x152c[4]];var Util=require(_0x152c[6]);exports[_0x152c[7]]= function(_0xe03bx5,_0xe03bx6,_0xe03bx7){return generalIndex(_0xe03bx5,_0xe03bx6,_0xe03bx7)};exports[_0x152c[8]]= function(_0xe03bx5,_0xe03bx6,_0xe03bx7){return generalIndex(_0xe03bx5,_0xe03bx6,_0xe03bx7,{leaveAt:null})};function generalIndex(_0xe03bx5,_0xe03bx6,_0xe03bx7,_0xe03bx9){return ReportSquareDetail[_0x152c[15]](Util[_0x152c[14]](_0xe03bx5[_0x152c[13]],_0xe03bx9|| {}))[_0x152c[12]](function(_0xe03bxb){return _0xe03bx6[_0x152c[11]](200)[_0x152c[10]](_0xe03bxb)})[_0x152c[9]](function(_0xe03bxa){return handleError(_0xe03bx6,_0xe03bxa)})}exports[_0x152c[16]]= function(_0xe03bx5,_0xe03bx6){return ReportSquareDetailHistory[_0x152c[16]]()[_0x152c[12]](function(_0xe03bxc){return _0xe03bx6[_0x152c[11]](200)[_0x152c[10]](_0xe03bxc)})[_0x152c[9]](function(_0xe03bxa){return handleError(_0xe03bx6,_0xe03bxa)})};function handleError(_0xe03bx6,_0xe03bxa){return _0xe03bx6[_0x152c[11]](500)[_0x152c[10]](_0xe03bxa)} \ No newline at end of file +'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); +} 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 127f3cb..f5cbed4 100644 --- a/server/api/report_square_detail/report_square_detail.events.js +++ b/server/api/report_square_detail/report_square_detail.events.js @@ -1 +1,36 @@ -var _0xaf9b=["\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"];_0xaf9b[0];const EventEmitter=require(_0xaf9b[1]);const ReportSquareDetail=require(_0xaf9b[3])[_0xaf9b[2]];var ReportSquareDetailEvents= new EventEmitter();ReportSquareDetailEvents[_0xaf9b[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xaf9b[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xaf9b[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xaf9b[6]};for(var e in events){var event=events[e];ReportSquareDetail[_0xaf9b[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6811x8,_0x6811x9,_0x6811xa){ReportSquareDetailEvents[_0xaf9b[10]](event+ _0xaf9b[8]+ _0x6811x8[_0xaf9b[9]],_0x6811x8);ReportSquareDetailEvents[_0xaf9b[10]](event,_0x6811x8);_0x6811xa(null)}}module[_0xaf9b[11]]= ReportSquareDetailEvents \ No newline at end of file +/** + * 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; 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 0ad7ea8..ba3a758 100644 --- a/server/api/report_square_detail/report_square_detail.socket.js +++ b/server/api/report_square_detail/report_square_detail.socket.js @@ -1 +1,45 @@ -var _0xc14f=["\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"];_0xc14f[0];const ReportSquareDetailEvents=require(_0xc14f[1]);var events=[_0xc14f[2],_0xc14f[3]];exports[_0xc14f[4]]= function(_0xdca1x3){for(var _0xdca1x4=0,_0xdca1x5=events[_0xc14f[5]];_0xdca1x4< _0xdca1x5;_0xdca1x4++){var _0xdca1x6=events[_0xdca1x4];var _0xdca1x7=createListener(_0xc14f[6]+ _0xdca1x6,_0xdca1x3);ReportSquareDetailEvents[_0xc14f[7]](_0xdca1x6,_0xdca1x7);_0xdca1x3[_0xc14f[7]](_0xc14f[8],removeListener(_0xdca1x6,_0xdca1x7))}};function createListener(_0xdca1x6,_0xdca1x3){return function(_0xdca1x9){switch(_0xdca1x6){case _0xc14f[12]:if(_0xdca1x3[_0xc14f[9]]!== _0xc14f[10]){_0xdca1x3[_0xc14f[11]](_0xdca1x6,_0xdca1x9)};break;case _0xc14f[13]:_0xdca1x3[_0xc14f[11]](_0xdca1x6,_0xdca1x9);break;default:}}}function removeListener(_0xdca1x6,_0xdca1x7){return function(){ReportSquareDetailEvents[_0xc14f[14]](_0xdca1x6,_0xdca1x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/report_tree/index.js b/server/api/report_tree/index.js index e83bc0f..419796c 100644 --- a/server/api/report_tree/index.js +++ b/server/api/report_tree/index.js @@ -1 +1,12 @@ -var _0x3d7a=["\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"];_0x3d7a[0];var express=require(_0x3d7a[1]);var controller=require(_0x3d7a[2]);var auth=require(_0x3d7a[3]);var router=express.Router();router[_0x3d7a[9]](_0x3d7a[4],auth[_0x3d7a[5]](),auth[_0x3d7a[7]]([17],[_0x3d7a[6]]),controller[_0x3d7a[8]]);router[_0x3d7a[12]](_0x3d7a[10],auth[_0x3d7a[5]](),auth[_0x3d7a[7]]([17],[_0x3d7a[6]]),controller[_0x3d7a[11]]);module[_0x3d7a[13]]= router \ No newline at end of file +'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; diff --git a/server/api/report_tree/report_tree.controller.js b/server/api/report_tree/report_tree.controller.js index cf59022..e1f947e 100644 --- a/server/api/report_tree/report_tree.controller.js +++ b/server/api/report_tree/report_tree.controller.js @@ -1 +1,43 @@ -var _0xaeac=["\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"];_0xaeac[0];var _=require(_0xaeac[1]);var util=require(_0xaeac[2]);var ReportTree=require(_0xaeac[4])[_0xaeac[3]];exports[_0xaeac[5]]= function(_0xe04fx4,_0xe04fx5){return ReportTree[_0xaeac[11]]()[_0xaeac[10]](function(_0xe04fx7){if(!_0xe04fx7){return _0xe04fx5[_0xaeac[7]](404)};return _0xe04fx5[_0xaeac[9]](200)[_0xaeac[8]](_0xe04fx7)})[_0xaeac[6]](function(_0xe04fx6){return handleError(_0xe04fx5,_0xe04fx6)})};exports[_0xaeac[12]]= function(_0xe04fx4,_0xe04fx5){return ReportTree[_0xaeac[18]](_0xe04fx4[_0xaeac[17]][_0xaeac[16]])[_0xaeac[10]](function(_0xe04fx8){if(!_0xe04fx8){return _0xe04fx5[_0xaeac[7]](404)};var _0xe04fx9=_[_0xaeac[14]](_0xe04fx8,_0xe04fx4[_0xaeac[13]]);return _0xe04fx9[_0xaeac[15]]()})[_0xaeac[10]](function(_0xe04fx8){return _0xe04fx5[_0xaeac[9]](200)[_0xaeac[8]](_0xe04fx8)})[_0xaeac[6]](function(_0xe04fx6){return handleError(_0xe04fx5,_0xe04fx6)})};function handleError(_0xe04fx5,_0xe04fx6){return _0xe04fx5[_0xaeac[9]](500)[_0xaeac[8]](_0xe04fx6)} \ No newline at end of file +'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); +} diff --git a/server/api/report_tree/report_tree.events.js b/server/api/report_tree/report_tree.events.js index 478f752..650282c 100644 --- a/server/api/report_tree/report_tree.events.js +++ b/server/api/report_tree/report_tree.events.js @@ -1 +1,36 @@ -var _0xd651=["\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"];_0xd651[0];const EventEmitter=require(_0xd651[1]);const ReportTree=require(_0xd651[3])[_0xd651[2]];var ReportTreeEvents= new EventEmitter();ReportTreeEvents[_0xd651[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd651[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd651[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd651[6]};for(var e in events){var event=events[e];ReportTree[_0xd651[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xe5ffx8,_0xe5ffx9,_0xe5ffxa){ReportTreeEvents[_0xd651[10]](event+ _0xd651[8]+ _0xe5ffx8[_0xd651[9]],_0xe5ffx8);ReportTreeEvents[_0xd651[10]](event,_0xe5ffx8);_0xe5ffxa(null)}}module[_0xd651[11]]= ReportTreeEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/report_tree/report_tree.socket.js b/server/api/report_tree/report_tree.socket.js index cdc929d..0209c1a 100644 --- a/server/api/report_tree/report_tree.socket.js +++ b/server/api/report_tree/report_tree.socket.js @@ -1 +1,32 @@ -var _0xf5e1=["\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"];_0xf5e1[0];const ReportTreeEvents=require(_0xf5e1[1]);var events=[_0xf5e1[2],_0xf5e1[3]];exports[_0xf5e1[4]]= function(_0x8605x3){for(var _0x8605x4=0,_0x8605x5=events[_0xf5e1[5]];_0x8605x4< _0x8605x5;_0x8605x4++){var _0x8605x6=events[_0x8605x4];var _0x8605x7=createListener(_0xf5e1[6]+ _0x8605x6,_0x8605x3);ReportTreeEvents[_0xf5e1[7]](_0x8605x6,_0x8605x7);_0x8605x3[_0xf5e1[7]](_0xf5e1[8],removeListener(_0x8605x6,_0x8605x7))}};function createListener(_0x8605x6,_0x8605x3){return function(_0x8605x9){_0x8605x3[_0xf5e1[9]](_0x8605x6,_0x8605x9)}}function removeListener(_0x8605x6,_0x8605x7){return function(){ReportTreeEvents[_0xf5e1[10]](_0x8605x6,_0x8605x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/salesforce_account/index.js b/server/api/salesforce_account/index.js index 5807e81..ec28594 100644 --- a/server/api/salesforce_account/index.js +++ b/server/api/salesforce_account/index.js @@ -1 +1,28 @@ -var _0x5be5=["\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"];_0x5be5[0];var express=require(_0x5be5[1]);var auth=require(_0x5be5[2]);var controller=require(_0x5be5[3]);var router=express.Router();router[_0x5be5[9]](_0x5be5[4],auth[_0x5be5[5]](),auth[_0x5be5[7]]([19,13],[_0x5be5[6]]),controller[_0x5be5[8]]);router[_0x5be5[9]](_0x5be5[10],auth[_0x5be5[5]](),auth[_0x5be5[7]]([19],[_0x5be5[6]]),controller[_0x5be5[11]]);router[_0x5be5[9]](_0x5be5[12],auth[_0x5be5[5]](),auth[_0x5be5[7]]([19],[_0x5be5[6]]),controller[_0x5be5[13]]);router[_0x5be5[9]](_0x5be5[14],auth[_0x5be5[5]](),auth[_0x5be5[7]]([19],[_0x5be5[6]]),controller[_0x5be5[15]]);router[_0x5be5[9]](_0x5be5[16],auth[_0x5be5[5]](),auth[_0x5be5[7]]([19],[_0x5be5[6]]),controller[_0x5be5[17]]);router[_0x5be5[9]](_0x5be5[18],auth[_0x5be5[5]](),auth[_0x5be5[7]]([19],[_0x5be5[6]]),controller[_0x5be5[19]]);router[_0x5be5[22]](_0x5be5[20],auth[_0x5be5[5]](),auth[_0x5be5[7]]([19],[_0x5be5[6]]),controller[_0x5be5[21]]);router[_0x5be5[22]](_0x5be5[4],auth[_0x5be5[5]](),auth[_0x5be5[7]]([19],[_0x5be5[6]]),controller[_0x5be5[23]]);router[_0x5be5[22]](_0x5be5[16],auth[_0x5be5[5]](),auth[_0x5be5[7]]([19],[_0x5be5[6]]),controller[_0x5be5[24]]);router[_0x5be5[22]](_0x5be5[25],auth[_0x5be5[5]](),auth[_0x5be5[7]]([19],[_0x5be5[6]]),controller[_0x5be5[26]]);router[_0x5be5[28]](_0x5be5[10],auth[_0x5be5[5]](),auth[_0x5be5[7]]([19],[_0x5be5[6]]),controller[_0x5be5[27]]);router[_0x5be5[28]](_0x5be5[29],auth[_0x5be5[5]](),auth[_0x5be5[7]]([19],[_0x5be5[6]]),controller[_0x5be5[30]]);router[_0x5be5[32]](_0x5be5[4],auth[_0x5be5[5]](),auth[_0x5be5[7]]([19],[_0x5be5[6]]),controller[_0x5be5[31]]);router[_0x5be5[32]](_0x5be5[10],auth[_0x5be5[5]](),auth[_0x5be5[7]]([19],[_0x5be5[6]]),controller[_0x5be5[33]]);router[_0x5be5[32]](_0x5be5[16],auth[_0x5be5[5]](),auth[_0x5be5[7]]([19],[_0x5be5[6]]),controller[_0x5be5[34]]);router[_0x5be5[32]](_0x5be5[18],auth[_0x5be5[5]](),auth[_0x5be5[7]]([19],[_0x5be5[6]]),controller[_0x5be5[35]]);router[_0x5be5[32]](_0x5be5[29],auth[_0x5be5[5]](),auth[_0x5be5[7]]([19],[_0x5be5[6]]),controller[_0x5be5[36]]);module[_0x5be5[37]]= router \ No newline at end of file +'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; diff --git a/server/api/salesforce_account/salesforce_account.controller.js b/server/api/salesforce_account/salesforce_account.controller.js index 9c09708..008c8f1 100644 --- a/server/api/salesforce_account/salesforce_account.controller.js +++ b/server/api/salesforce_account/salesforce_account.controller.js @@ -1 +1,519 @@ -var _0xc1e0=["\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"];_0xc1e0[0];var _=require(_0xc1e0[1]);var util=require(_0xc1e0[2]);var jsforce=require(_0xc1e0[3]);var Util=require(_0xc1e0[4]);var SalesforceAccount=require(_0xc1e0[6])[_0xc1e0[5]];var SalesforceConfiguration=require(_0xc1e0[6])[_0xc1e0[7]];var SalesforceField=require(_0xc1e0[6])[_0xc1e0[8]];function handleError(_0x2c31x9,_0x2c31xa){_0x2c31xa= _0x2c31xa|| 500;return function(_0x2c31xb){_0x2c31x9[_0xc1e0[10]](_0x2c31xa)[_0xc1e0[9]](_0x2c31xb)}}function responseWithResult(_0x2c31x9,_0x2c31xa){_0x2c31xa= _0x2c31xa|| 200;return function(_0x2c31xd){if(_0x2c31xd){_0x2c31x9[_0xc1e0[10]](_0x2c31xa)[_0xc1e0[11]](_0x2c31xd)}}}function responseWithoutResult(_0x2c31x9,_0x2c31xa){_0x2c31xa= _0x2c31xa|| 200;return function(){_0x2c31x9[_0xc1e0[12]](_0x2c31xa)}}function handleEntityNotFound(_0x2c31x9){return function(_0x2c31xd){if(!_0x2c31xd){_0x2c31x9[_0xc1e0[10]](404)[_0xc1e0[13]]();return null};return _0x2c31xd}}function saveUpdates(_0x2c31x11){return function(_0x2c31xd){return _0x2c31xd[_0xc1e0[15]](_0x2c31x11)[_0xc1e0[14]](function(_0x2c31x12){return _0x2c31x12})}}function removeEntity(_0x2c31x9){return function(_0x2c31xd){if(_0x2c31xd){return _0x2c31xd[_0xc1e0[16]]()[_0xc1e0[14]](function(){_0x2c31x9[_0xc1e0[10]](204)[_0xc1e0[13]]()})}}}exports[_0xc1e0[17]]= function(_0x2c31x14,_0x2c31x9,_0x2c31x15){return SalesforceAccount[_0xc1e0[24]](_0xc1e0[23])[_0xc1e0[22]](_[_0xc1e0[21]](Util[_0xc1e0[20]](_0x2c31x14[_0xc1e0[19]]),{distinct:true}))[_0xc1e0[14]](responseWithResult(_0x2c31x9))[_0xc1e0[18]](handleError(_0x2c31x9))};exports[_0xc1e0[25]]= function(_0x2c31x14,_0x2c31x9){return SalesforceAccount[_0xc1e0[28]](_0x2c31x14[_0xc1e0[27]][_0xc1e0[26]])[_0xc1e0[14]](handleEntityNotFound(_0x2c31x9))[_0xc1e0[14]](responseWithResult(_0x2c31x9))[_0xc1e0[18]](handleError(_0x2c31x9))};exports[_0xc1e0[29]]= function(_0x2c31x14,_0x2c31x9){return SalesforceAccount[_0xc1e0[29]](_0x2c31x14[_0xc1e0[30]])[_0xc1e0[14]](responseWithResult(_0x2c31x9,201))[_0xc1e0[18]](handleError(_0x2c31x9))};exports[_0xc1e0[31]]= function(_0x2c31x14,_0x2c31x9){if(_0x2c31x14[_0xc1e0[30]][_0xc1e0[26]]){delete _0x2c31x14[_0xc1e0[30]][_0xc1e0[26]]};return SalesforceAccount[_0xc1e0[28]](_0x2c31x14[_0xc1e0[27]][_0xc1e0[26]])[_0xc1e0[14]](handleEntityNotFound(_0x2c31x9))[_0xc1e0[14]](saveUpdates(_0x2c31x14[_0xc1e0[30]]))[_0xc1e0[14]](responseWithResult(_0x2c31x9))[_0xc1e0[18]](handleError(_0x2c31x9))};exports[_0xc1e0[16]]= function(_0x2c31x14,_0x2c31x9){return SalesforceAccount[_0xc1e0[28]](_0x2c31x14[_0xc1e0[27]][_0xc1e0[26]])[_0xc1e0[14]](handleEntityNotFound(_0x2c31x9))[_0xc1e0[14]](removeEntity(_0x2c31x9))[_0xc1e0[18]](handleError(_0x2c31x9))};exports[_0xc1e0[32]]= function(_0x2c31x14,_0x2c31x9){return SalesforceAccount[_0xc1e0[16]]({where:{id:_0x2c31x14[_0xc1e0[19]][_0xc1e0[33]]},individualHooks:true})[_0xc1e0[14]](responseWithResult(_0x2c31x9,204))[_0xc1e0[18]](handleError(_0x2c31x9))};exports[_0xc1e0[34]]= function(_0x2c31x14,_0x2c31x9){return SalesforceAccount[_0xc1e0[28]](_0x2c31x14[_0xc1e0[27]][_0xc1e0[26]])[_0xc1e0[14]](handleEntityNotFound(_0x2c31x9))[_0xc1e0[14]](function(_0x2c31x16){var _0x2c31x17= new jsforce.Connection({oauth2:{loginUrl:_0x2c31x16[_0xc1e0[35]],clientId:_0x2c31x16[_0xc1e0[36]],clientSecret:_0x2c31x16[_0xc1e0[37]]}});var _0x2c31x18=_0x2c31x16[_0xc1e0[40]][_0xc1e0[39]](_0x2c31x16[_0xc1e0[38]]);_0x2c31x17[_0xc1e0[42]](_0x2c31x16[_0xc1e0[41]],_0x2c31x18,function(_0x2c31xb,_0x2c31x19){if(_0x2c31xb){return _0x2c31x9[_0xc1e0[10]](400)[_0xc1e0[9]](_0x2c31xb)};return _0x2c31x9[_0xc1e0[12]](200)})})[_0xc1e0[18]](handleError(_0x2c31x9))};exports[_0xc1e0[43]]= function(_0x2c31x14,_0x2c31x9){var _0x2c31x1a={};_0x2c31x1a[_0x2c31x14[_0xc1e0[27]][_0xc1e0[44]]]= _0x2c31x14[_0xc1e0[30]][_0xc1e0[45]];return SalesforceAccount[_0xc1e0[22]]({where:_0x2c31x1a})[_0xc1e0[14]](function(_0x2c31x1b){if(_0x2c31x1b[_0xc1e0[46]]){return _0x2c31x9[_0xc1e0[10]](200)[_0xc1e0[9]]({isValid:false,value:_0x2c31x14[_0xc1e0[30]][_0xc1e0[45]]})};return _0x2c31x9[_0xc1e0[10]](200)[_0xc1e0[9]]({isValid:true,value:_0x2c31x14[_0xc1e0[30]][_0xc1e0[45]]})})[_0xc1e0[18]](function(_0x2c31xb){return handleError(_0x2c31x9,_0x2c31xb)})};exports[_0xc1e0[47]]= function(_0x2c31x14,_0x2c31x9){return SalesforceAccount[_0xc1e0[28]](_0x2c31x14[_0xc1e0[27]][_0xc1e0[26]])[_0xc1e0[14]](handleEntityNotFound(_0x2c31x9))[_0xc1e0[14]](function(_0x2c31x16){var _0x2c31x17= new jsforce.Connection({oauth2:{loginUrl:_0x2c31x16[_0xc1e0[35]],clientId:_0x2c31x16[_0xc1e0[36]],clientSecret:_0x2c31x16[_0xc1e0[37]]}});var _0x2c31x18=_0x2c31x16[_0xc1e0[40]][_0xc1e0[39]](_0x2c31x16[_0xc1e0[38]]);_0x2c31x17[_0xc1e0[42]](_0x2c31x16[_0xc1e0[41]],_0x2c31x18,function(_0x2c31xb,_0x2c31x19){if(_0x2c31xb){return _0x2c31x9[_0xc1e0[10]](400)[_0xc1e0[9]](_0x2c31xb)};_0x2c31x17[_0xc1e0[51]](_0xc1e0[50])[_0xc1e0[49]](function(_0x2c31xb,_0x2c31x1c){if(_0x2c31xb){return _0x2c31x9[_0xc1e0[10]](400)[_0xc1e0[9]](_0x2c31xb)};return _0x2c31x9[_0xc1e0[10]](200)[_0xc1e0[9]](_0x2c31x1c[_0xc1e0[48]])})})})[_0xc1e0[18]](handleError(_0x2c31x9))};exports[_0xc1e0[52]]= function(_0x2c31x14,_0x2c31x9){return SalesforceConfiguration[_0xc1e0[24]]({method:[_0xc1e0[53],_0x2c31x14[_0xc1e0[27]][_0xc1e0[26]]]})[_0xc1e0[22]](_[_0xc1e0[21]](Util[_0xc1e0[20]](_0x2c31x14[_0xc1e0[19]]),{distinct:true}))[_0xc1e0[14]](responseWithResult(_0x2c31x9))[_0xc1e0[18]](handleError(_0x2c31x9))};exports[_0xc1e0[54]]= function(_0x2c31x14,_0x2c31x9){return SalesforceConfiguration[_0xc1e0[24]]({method:[_0xc1e0[53],_0x2c31x14[_0xc1e0[27]][_0xc1e0[26]]]})[_0xc1e0[28]](_0x2c31x14[_0xc1e0[27]][_0xc1e0[55]])[_0xc1e0[14]](handleEntityNotFound(_0x2c31x9))[_0xc1e0[14]](responseWithResult(_0x2c31x9))[_0xc1e0[18]](handleError(_0x2c31x9))};exports[_0xc1e0[56]]= function(_0x2c31x14,_0x2c31x9){return SalesforceConfiguration[_0xc1e0[24]]({method:[_0xc1e0[53],_0x2c31x14[_0xc1e0[27]][_0xc1e0[26]]]})[_0xc1e0[28]](_0x2c31x14[_0xc1e0[27]][_0xc1e0[55]])[_0xc1e0[14]](handleEntityNotFound(_0x2c31x9))[_0xc1e0[14]](removeEntity(_0x2c31x9))[_0xc1e0[18]](handleError(_0x2c31x9))};exports[_0xc1e0[57]]= function(_0x2c31x14,_0x2c31x9){return SalesforceConfiguration[_0xc1e0[16]]({where:{id:_0x2c31x14[_0xc1e0[19]][_0xc1e0[33]]},individualHooks:true})[_0xc1e0[14]](responseWithResult(_0x2c31x9,204))[_0xc1e0[18]](handleError(_0x2c31x9))};exports[_0xc1e0[58]]= function(_0x2c31x14,_0x2c31x9){_0x2c31x14[_0xc1e0[30]][_0xc1e0[59]]= _0x2c31x14[_0xc1e0[27]][_0xc1e0[26]];switch(_0x2c31x14[_0xc1e0[30]][_0xc1e0[108]]){case _0xc1e0[106]:if(_0x2c31x14[_0xc1e0[30]][_0xc1e0[60]]=== _0xc1e0[61]){_0x2c31x14[_0xc1e0[30]][_0xc1e0[62]]= [{"\x74\x79\x70\x65":_0xc1e0[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xc1e0[65],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[67]},{"\x74\x79\x70\x65":_0xc1e0[65],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[68]}];_0x2c31x14[_0xc1e0[30]][_0xc1e0[69]]= [{"\x74\x79\x70\x65":_0xc1e0[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[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":_0xc1e0[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x6B\x65\x79":_0xc1e0[72],"\x6B\x65\x79\x54\x79\x70\x65":_0xc1e0[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[68]},{"\x74\x79\x70\x65":_0xc1e0[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x6B\x65\x79":_0xc1e0[73],"\x6B\x65\x79\x54\x79\x70\x65":_0xc1e0[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[74]},{"\x74\x79\x70\x65":_0xc1e0[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x6B\x65\x79":_0xc1e0[75],"\x6B\x65\x79\x54\x79\x70\x65":_0xc1e0[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[76]},{"\x74\x79\x70\x65":_0xc1e0[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x6B\x65\x79":_0xc1e0[61],"\x6B\x65\x79\x54\x79\x70\x65":_0xc1e0[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[67]},{"\x74\x79\x70\x65":_0xc1e0[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x6B\x65\x79":_0xc1e0[77],"\x6B\x65\x79\x54\x79\x70\x65":_0xc1e0[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[78]},{"\x74\x79\x70\x65":_0xc1e0[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x6B\x65\x79":_0xc1e0[79],"\x6B\x65\x79\x54\x79\x70\x65":_0xc1e0[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[80]},{"\x74\x79\x70\x65":_0xc1e0[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[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":_0xc1e0[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x6B\x65\x79":_0xc1e0[82],"\x6B\x65\x79\x54\x79\x70\x65":_0xc1e0[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[83]},{"\x74\x79\x70\x65":_0xc1e0[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x6B\x65\x79":_0xc1e0[84],"\x6B\x65\x79\x54\x79\x70\x65":_0xc1e0[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[85]},{"\x74\x79\x70\x65":_0xc1e0[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[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":_0xc1e0[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x6B\x65\x79":_0xc1e0[87],"\x6B\x65\x79\x54\x79\x70\x65":_0xc1e0[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[80]},{"\x74\x79\x70\x65":_0xc1e0[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x6B\x65\x79":_0xc1e0[88],"\x6B\x65\x79\x54\x79\x70\x65":_0xc1e0[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[89]},{"\x74\x79\x70\x65":_0xc1e0[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x6B\x65\x79":_0xc1e0[90],"\x6B\x65\x79\x54\x79\x70\x65":_0xc1e0[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[91]},{"\x74\x79\x70\x65":_0xc1e0[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x6B\x65\x79":_0xc1e0[92],"\x6B\x65\x79\x54\x79\x70\x65":_0xc1e0[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[93]},{"\x74\x79\x70\x65":_0xc1e0[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x6B\x65\x79":_0xc1e0[94],"\x6B\x65\x79\x54\x79\x70\x65":_0xc1e0[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[95]}]}else {if(_0x2c31x14[_0xc1e0[30]][_0xc1e0[60]]=== _0xc1e0[96]){_0x2c31x14[_0xc1e0[30]][_0xc1e0[62]]= [{"\x74\x79\x70\x65":_0xc1e0[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xc1e0[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[97],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xc1e0[65],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[85]}];_0x2c31x14[_0xc1e0[30]][_0xc1e0[69]]= [{"\x74\x79\x70\x65":_0xc1e0[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[70],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xc1e0[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x6B\x65\x79":_0xc1e0[98],"\x6B\x65\x79\x54\x79\x70\x65":_0xc1e0[65],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[85]},{"\x74\x79\x70\x65":_0xc1e0[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x6B\x65\x79":_0xc1e0[99],"\x6B\x65\x79\x54\x79\x70\x65":_0xc1e0[65],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[100]},{"\x74\x79\x70\x65":_0xc1e0[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x6B\x65\x79":_0xc1e0[77],"\x6B\x65\x79\x54\x79\x70\x65":_0xc1e0[65],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[78]},{"\x74\x79\x70\x65":_0xc1e0[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x6B\x65\x79":_0xc1e0[79],"\x6B\x65\x79\x54\x79\x70\x65":_0xc1e0[65],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[101]},{"\x74\x79\x70\x65":_0xc1e0[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[86]},{"\x74\x79\x70\x65":_0xc1e0[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x6B\x65\x79":_0xc1e0[102],"\x6B\x65\x79\x54\x79\x70\x65":_0xc1e0[65],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[103]},{"\x74\x79\x70\x65":_0xc1e0[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x6B\x65\x79":_0xc1e0[104],"\x6B\x65\x79\x54\x79\x70\x65":_0xc1e0[65],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0xc1e0[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xc1e0[105]}]}};break;default:console[_0xc1e0[109]](_0xc1e0[107],_0x2c31x14[_0xc1e0[30]][_0xc1e0[108]])};delete _0x2c31x14[_0xc1e0[30]][_0xc1e0[108]];delete _0x2c31x14[_0xc1e0[30]][_0xc1e0[60]];return SalesforceConfiguration[_0xc1e0[29]](_0x2c31x14[_0xc1e0[30]],{include:[{model:SalesforceField,as:_0xc1e0[62]},{model:SalesforceField,as:_0xc1e0[69]}]})[_0xc1e0[14]](responseWithResult(_0x2c31x9,201))[_0xc1e0[18]](handleError(_0x2c31x9))};exports[_0xc1e0[110]]= function(_0x2c31x14,_0x2c31x9){return SalesforceConfiguration[_0xc1e0[24]]({method:[_0xc1e0[53],_0x2c31x14[_0xc1e0[27]][_0xc1e0[26]]]})[_0xc1e0[28]](_0x2c31x14[_0xc1e0[27]][_0xc1e0[55]])[_0xc1e0[14]](handleEntityNotFound(_0x2c31x9))[_0xc1e0[14]](function(_0x2c31x1d){switch(_0x2c31x14[_0xc1e0[27]][_0xc1e0[60]]){case _0xc1e0[112]:_0x2c31x14[_0xc1e0[30]][_0xc1e0[111]]= _0x2c31x14[_0xc1e0[27]][_0xc1e0[55]];break;case _0xc1e0[114]:_0x2c31x14[_0xc1e0[30]][_0xc1e0[113]]= _0x2c31x14[_0xc1e0[27]][_0xc1e0[55]];break;case _0xc1e0[44]:_0x2c31x14[_0xc1e0[30]][_0xc1e0[115]]= _0x2c31x14[_0xc1e0[27]][_0xc1e0[55]];break};return SalesforceField[_0xc1e0[29]](_0x2c31x14[_0xc1e0[30]])})[_0xc1e0[14]](responseWithResult(_0x2c31x9,201))[_0xc1e0[18]](handleError(_0x2c31x9))};exports[_0xc1e0[116]]= function(_0x2c31x14,_0x2c31x9){if(_0x2c31x14[_0xc1e0[30]][_0xc1e0[26]]){delete _0x2c31x14[_0xc1e0[30]][_0xc1e0[26]]};return SalesforceField[_0xc1e0[28]](_0x2c31x14[_0xc1e0[27]][_0xc1e0[117]])[_0xc1e0[14]](handleEntityNotFound(_0x2c31x9))[_0xc1e0[14]](saveUpdates(_0x2c31x14[_0xc1e0[30]]))[_0xc1e0[14]](responseWithResult(_0x2c31x9))[_0xc1e0[18]](handleError(_0x2c31x9))};exports[_0xc1e0[118]]= function(_0x2c31x14,_0x2c31x9){return SalesforceField[_0xc1e0[28]](_0x2c31x14[_0xc1e0[27]][_0xc1e0[117]])[_0xc1e0[14]](handleEntityNotFound(_0x2c31x9))[_0xc1e0[14]](removeEntity(_0x2c31x9))[_0xc1e0[18]](handleError(_0x2c31x9))};exports[_0xc1e0[119]]= function(_0x2c31x14,_0x2c31x9,_0x2c31x15){return SalesforceConfiguration[_0xc1e0[28]](_0x2c31x14[_0xc1e0[27]][_0xc1e0[55]])[_0xc1e0[14]](handleEntityNotFound(_0x2c31x9))[_0xc1e0[14]](function(_0x2c31x1d){return _0x2c31x1d[_0xc1e0[121]](_0x2c31x14[_0xc1e0[30]])})[_0xc1e0[14]](responseWithoutResult(_0x2c31x9,200))[_0xc1e0[18]](function(_0x2c31xb){console[_0xc1e0[120]](_0x2c31xb);return handleError(_0x2c31x9,_0x2c31xb)})} \ No newline at end of file +/** + * 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); + }); +}; diff --git a/server/api/salesforce_account/salesforce_account.events.js b/server/api/salesforce_account/salesforce_account.events.js index e9cba32..13ee57f 100644 --- a/server/api/salesforce_account/salesforce_account.events.js +++ b/server/api/salesforce_account/salesforce_account.events.js @@ -1 +1,36 @@ -var _0x2a04=["\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"];_0x2a04[0];const EventEmitter=require(_0x2a04[1]);const SalesforceAccount=require(_0x2a04[3])[_0x2a04[2]];var SalesforceAccountEvents= new EventEmitter();SalesforceAccountEvents[_0x2a04[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x2a04[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x2a04[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x2a04[6]};for(var e in events){var event=events[e];SalesforceAccount[_0x2a04[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x628bx8,_0x628bx9,_0x628bxa){SalesforceAccountEvents[_0x2a04[10]](event+ _0x2a04[8]+ _0x628bx8[_0x2a04[9]],_0x628bx8);SalesforceAccountEvents[_0x2a04[10]](event,_0x628bx8);_0x628bxa(null)}}module[_0x2a04[11]]= SalesforceAccountEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/salesforce_account/salesforce_account.socket.js b/server/api/salesforce_account/salesforce_account.socket.js index 6843fb8..3ee49f7 100644 --- a/server/api/salesforce_account/salesforce_account.socket.js +++ b/server/api/salesforce_account/salesforce_account.socket.js @@ -1 +1,32 @@ -var _0x6be5=["\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"];_0x6be5[0];const SalesforceAccountEvents=require(_0x6be5[1]);var events=[_0x6be5[2],_0x6be5[3]];exports[_0x6be5[4]]= function(_0x5c28x3){for(var _0x5c28x4=0,_0x5c28x5=events[_0x6be5[5]];_0x5c28x4< _0x5c28x5;_0x5c28x4++){var _0x5c28x6=events[_0x5c28x4];var _0x5c28x7=createListener(_0x6be5[6]+ _0x5c28x6,_0x5c28x3);SalesforceAccountEvents[_0x6be5[7]](_0x5c28x6,_0x5c28x7);_0x5c28x3[_0x6be5[7]](_0x6be5[8],removeListener(_0x5c28x6,_0x5c28x7))}};function createListener(_0x5c28x6,_0x5c28x3){return function(_0x5c28x9){_0x5c28x3[_0x6be5[9]](_0x5c28x6,_0x5c28x9)}}function removeListener(_0x5c28x6,_0x5c28x7){return function(){SalesforceAccountEvents[_0x6be5[10]](_0x5c28x6,_0x5c28x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/salesforce_configuration/index.js b/server/api/salesforce_configuration/index.js index 483a412..e0f8ff7 100644 --- a/server/api/salesforce_configuration/index.js +++ b/server/api/salesforce_configuration/index.js @@ -1 +1,17 @@ -var _0x2a87=["\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"];_0x2a87[0];var express=require(_0x2a87[1]);var auth=require(_0x2a87[2]);var controller=require(_0x2a87[3]);var router=express.Router();router[_0x2a87[7]](_0x2a87[4],auth[_0x2a87[5]](),controller[_0x2a87[6]]);router[_0x2a87[7]](_0x2a87[8],auth[_0x2a87[5]](),auth[_0x2a87[10]]([19],[_0x2a87[9]]),controller[_0x2a87[11]]);router[_0x2a87[13]](_0x2a87[4],auth[_0x2a87[5]](),auth[_0x2a87[10]]([19],[_0x2a87[9]]),controller[_0x2a87[12]]);router[_0x2a87[15]](_0x2a87[8],auth[_0x2a87[5]](),auth[_0x2a87[10]]([19],[_0x2a87[9]]),controller[_0x2a87[14]]);router[_0x2a87[13]](_0x2a87[16],auth[_0x2a87[5]](),auth[_0x2a87[10]]([19],[_0x2a87[9]]),controller[_0x2a87[17]]);router[_0x2a87[19]](_0x2a87[8],auth[_0x2a87[5]](),auth[_0x2a87[10]]([19],[_0x2a87[9]]),controller[_0x2a87[18]]);module[_0x2a87[20]]= router \ No newline at end of file +'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; diff --git a/server/api/salesforce_configuration/salesforce_configuration.controller.js b/server/api/salesforce_configuration/salesforce_configuration.controller.js index c159a26..523aef6 100644 --- a/server/api/salesforce_configuration/salesforce_configuration.controller.js +++ b/server/api/salesforce_configuration/salesforce_configuration.controller.js @@ -1 +1,147 @@ -var _0xd891=["\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"];_0xd891[0];var _=require(_0xd891[1]);var SalesforceConfiguration=require(_0xd891[3])[_0xd891[2]];var SalesforceField=require(_0xd891[3])[_0xd891[4]];function handleError(_0x115fx5,_0x115fx6){_0x115fx6= _0x115fx6|| 500;return function(_0x115fx7){_0x115fx5[_0xd891[6]](_0x115fx6)[_0xd891[5]](_0x115fx7)}}function responseWithResult(_0x115fx5,_0x115fx6){_0x115fx6= _0x115fx6|| 200;return function(_0x115fx9){if(_0x115fx9){_0x115fx5[_0xd891[6]](_0x115fx6)[_0xd891[7]](_0x115fx9)}}}function handleEntityNotFound(_0x115fx5){return function(_0x115fx9){if(!_0x115fx9){_0x115fx5[_0xd891[6]](404)[_0xd891[8]]();return null};return _0x115fx9}}function saveUpdates(_0x115fxc){return function(_0x115fx9){return _0x115fx9[_0xd891[10]](_0x115fxc)[_0xd891[9]](function(_0x115fxd){return _0x115fxd})}}function removeEntity(_0x115fx5){return function(_0x115fx9){if(_0x115fx9){return _0x115fx9[_0xd891[11]]()[_0xd891[9]](function(){_0x115fx5[_0xd891[6]](204)[_0xd891[8]]()})}}}exports[_0xd891[12]]= function(_0x115fxf,_0x115fx5){SalesforceConfiguration[_0xd891[15]]({where:_0x115fxf[_0xd891[14]]})[_0xd891[9]](responseWithResult(_0x115fx5))[_0xd891[13]](handleError(_0x115fx5))};exports[_0xd891[16]]= function(_0x115fxf,_0x115fx5){SalesforceConfiguration[_0xd891[22]]({where:{id:_0x115fxf[_0xd891[18]][_0xd891[17]]},include:[{model:SalesforceField,as:_0xd891[19]},{model:SalesforceField,as:_0xd891[20]},{model:SalesforceField,as:_0xd891[21]}]})[_0xd891[9]](handleEntityNotFound(_0x115fx5))[_0xd891[9]](responseWithResult(_0x115fx5))[_0xd891[13]](handleError(_0x115fx5))};exports[_0xd891[23]]= function(_0x115fxf,_0x115fx5){SalesforceConfiguration[_0xd891[23]](_0x115fxf[_0xd891[24]])[_0xd891[9]](responseWithResult(_0x115fx5,201))[_0xd891[13]](handleError(_0x115fx5))};exports[_0xd891[25]]= function(_0x115fxf,_0x115fx5){if(_0x115fxf[_0xd891[24]][_0xd891[17]]){delete _0x115fxf[_0xd891[24]][_0xd891[17]]};SalesforceConfiguration[_0xd891[26]](_0x115fxf[_0xd891[18]][_0xd891[17]])[_0xd891[9]](handleEntityNotFound(_0x115fx5))[_0xd891[9]](saveUpdates(_0x115fxf[_0xd891[24]]))[_0xd891[9]](responseWithResult(_0x115fx5))[_0xd891[13]](handleError(_0x115fx5))};exports[_0xd891[11]]= function(_0x115fxf,_0x115fx5){SalesforceConfiguration[_0xd891[26]](_0x115fxf[_0xd891[18]][_0xd891[17]])[_0xd891[9]](handleEntityNotFound(_0x115fx5))[_0xd891[9]](removeEntity(_0x115fx5))[_0xd891[13]](handleError(_0x115fx5))};exports[_0xd891[27]]= function(_0x115fxf,_0x115fx5,_0x115fx10){var _0x115fx11;SalesforceConfiguration[_0xd891[26]](_0x115fxf[_0xd891[18]][_0xd891[17]])[_0xd891[9]](handleEntityNotFound(_0x115fx5))[_0xd891[9]](function(_0x115fx14){_0x115fx11= _0x115fx14;return SalesforceField[_0xd891[23]](_0x115fxf[_0xd891[24]])})[_0xd891[9]](function(_0x115fx13){switch(_0x115fxf[_0xd891[18]][_0xd891[35]]){case _0xd891[30]:return [_0x115fx11[_0xd891[29]](_0x115fx13),_0x115fx13];case _0xd891[32]:return [_0x115fx11[_0xd891[31]](_0x115fx13),_0x115fx13];case _0xd891[34]:return [_0x115fx11[_0xd891[33]](_0x115fx13),_0x115fx13]}})[_0xd891[28]](function(_0x115fx12,_0x115fx13){return _0x115fx5[_0xd891[6]](201)[_0xd891[7]](_0x115fx13)})[_0xd891[13]](handleError(_0x115fx5))} \ No newline at end of file +/** + * 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)); +}; diff --git a/server/api/salesforce_configuration/salesforce_configuration.events.js b/server/api/salesforce_configuration/salesforce_configuration.events.js index 970a0f6..0814fbf 100644 --- a/server/api/salesforce_configuration/salesforce_configuration.events.js +++ b/server/api/salesforce_configuration/salesforce_configuration.events.js @@ -1 +1,36 @@ -var _0x5584=["\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"];_0x5584[0];const EventEmitter=require(_0x5584[1]);const SalesforceConfiguration=require(_0x5584[3])[_0x5584[2]];var SalesforceConfigurationEvents= new EventEmitter();SalesforceConfigurationEvents[_0x5584[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x5584[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x5584[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x5584[6]};for(var e in events){var event=events[e];SalesforceConfiguration[_0x5584[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xa4cbx8,_0xa4cbx9,_0xa4cbxa){SalesforceConfigurationEvents[_0x5584[10]](event+ _0x5584[8]+ _0xa4cbx8[_0x5584[9]],_0xa4cbx8);SalesforceConfigurationEvents[_0x5584[10]](event,_0xa4cbx8);_0xa4cbxa(null)}}module[_0x5584[11]]= SalesforceConfigurationEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/salesforce_configuration/salesforce_configuration.socket.js b/server/api/salesforce_configuration/salesforce_configuration.socket.js index afde480..df21994 100644 --- a/server/api/salesforce_configuration/salesforce_configuration.socket.js +++ b/server/api/salesforce_configuration/salesforce_configuration.socket.js @@ -1 +1,32 @@ -var _0x9a19=["\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"];_0x9a19[0];const SalesforceConfigurationEvents=require(_0x9a19[1]);var events=[_0x9a19[2],_0x9a19[3]];exports[_0x9a19[4]]= function(_0xf95ax3){for(var _0xf95ax4=0,_0xf95ax5=events[_0x9a19[5]];_0xf95ax4< _0xf95ax5;_0xf95ax4++){var _0xf95ax6=events[_0xf95ax4];var _0xf95ax7=createListener(_0x9a19[6]+ _0xf95ax6,_0xf95ax3);SalesforceConfigurationEvents[_0x9a19[7]](_0xf95ax6,_0xf95ax7);_0xf95ax3[_0x9a19[7]](_0x9a19[8],removeListener(_0xf95ax6,_0xf95ax7))}};function createListener(_0xf95ax6,_0xf95ax3){return function(_0xf95ax9){_0xf95ax3[_0x9a19[9]](_0xf95ax6,_0xf95ax9)}}function removeListener(_0xf95ax6,_0xf95ax7){return function(){SalesforceConfigurationEvents[_0x9a19[10]](_0xf95ax6,_0xf95ax7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/salesforce_field/index.js b/server/api/salesforce_field/index.js index e4fb2b9..2dd2a9d 100644 --- a/server/api/salesforce_field/index.js +++ b/server/api/salesforce_field/index.js @@ -1 +1,17 @@ -var _0x87f6=["\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"];_0x87f6[0];var express=require(_0x87f6[1]);var auth=require(_0x87f6[2]);var controller=require(_0x87f6[3]);var router=express.Router();router[_0x87f6[7]](_0x87f6[4],auth[_0x87f6[5]](),controller[_0x87f6[6]]);router[_0x87f6[7]](_0x87f6[8],auth[_0x87f6[5]](),auth[_0x87f6[10]]([19],[_0x87f6[9]]),controller[_0x87f6[11]]);router[_0x87f6[13]](_0x87f6[4],auth[_0x87f6[5]](),auth[_0x87f6[10]]([19],[_0x87f6[9]]),controller[_0x87f6[12]]);router[_0x87f6[15]](_0x87f6[8],auth[_0x87f6[5]](),auth[_0x87f6[10]]([19],[_0x87f6[9]]),controller[_0x87f6[14]]);router[_0x87f6[17]](_0x87f6[8],auth[_0x87f6[5]](),auth[_0x87f6[10]]([19],[_0x87f6[9]]),controller[_0x87f6[16]]);module[_0x87f6[18]]= router \ No newline at end of file +'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; diff --git a/server/api/salesforce_field/salesforce_field.controller.js b/server/api/salesforce_field/salesforce_field.controller.js index d075299..bab61d7 100644 --- a/server/api/salesforce_field/salesforce_field.controller.js +++ b/server/api/salesforce_field/salesforce_field.controller.js @@ -1 +1,104 @@ -var _0x21eb=["\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"];_0x21eb[0];var _=require(_0x21eb[1]);var SalesforceField=require(_0x21eb[3])[_0x21eb[2]];function handleError(_0xed87x4,_0xed87x5){_0xed87x5= _0xed87x5|| 500;return function(_0xed87x6){_0xed87x4[_0x21eb[5]](_0xed87x5)[_0x21eb[4]](_0xed87x6)}}function responseWithResult(_0xed87x4,_0xed87x5){_0xed87x5= _0xed87x5|| 200;return function(_0xed87x8){if(_0xed87x8){_0xed87x4[_0x21eb[5]](_0xed87x5)[_0x21eb[6]](_0xed87x8)}}}function handleEntityNotFound(_0xed87x4){return function(_0xed87x8){if(!_0xed87x8){_0xed87x4[_0x21eb[5]](404)[_0x21eb[7]]();return null};return _0xed87x8}}function saveUpdates(_0xed87xb){return function(_0xed87x8){return _0xed87x8[_0x21eb[9]](_0xed87xb)[_0x21eb[8]](function(_0xed87xc){return _0xed87xc})}}function removeEntity(_0xed87x4){return function(_0xed87x8){if(_0xed87x8){return _0xed87x8[_0x21eb[10]]()[_0x21eb[8]](function(){_0xed87x4[_0x21eb[5]](204)[_0x21eb[7]]()})}}}exports[_0x21eb[11]]= function(_0xed87xe,_0xed87x4){SalesforceField[_0x21eb[13]]()[_0x21eb[8]](responseWithResult(_0xed87x4))[_0x21eb[12]](handleError(_0xed87x4))};exports[_0x21eb[14]]= function(_0xed87xe,_0xed87x4){SalesforceField[_0x21eb[17]](_0xed87xe[_0x21eb[16]][_0x21eb[15]])[_0x21eb[8]](handleEntityNotFound(_0xed87x4))[_0x21eb[8]](responseWithResult(_0xed87x4))[_0x21eb[12]](handleError(_0xed87x4))};exports[_0x21eb[18]]= function(_0xed87xe,_0xed87x4){SalesforceField[_0x21eb[18]](_0xed87xe[_0x21eb[19]])[_0x21eb[8]](responseWithResult(_0xed87x4,201))[_0x21eb[12]](handleError(_0xed87x4))};exports[_0x21eb[20]]= function(_0xed87xe,_0xed87x4){if(_0xed87xe[_0x21eb[19]][_0x21eb[15]]){delete _0xed87xe[_0x21eb[19]][_0x21eb[15]]};SalesforceField[_0x21eb[17]](_0xed87xe[_0x21eb[16]][_0x21eb[15]])[_0x21eb[8]](handleEntityNotFound(_0xed87x4))[_0x21eb[8]](saveUpdates(_0xed87xe[_0x21eb[19]]))[_0x21eb[8]](responseWithResult(_0xed87x4))[_0x21eb[12]](handleError(_0xed87x4))};exports[_0x21eb[10]]= function(_0xed87xe,_0xed87x4){SalesforceField[_0x21eb[17]](_0xed87xe[_0x21eb[16]][_0x21eb[15]])[_0x21eb[8]](handleEntityNotFound(_0xed87x4))[_0x21eb[8]](removeEntity(_0xed87x4))[_0x21eb[12]](handleError(_0xed87x4))} \ No newline at end of file +/** + * 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)); +} diff --git a/server/api/salesforce_field/salesforce_field.events.js b/server/api/salesforce_field/salesforce_field.events.js index d1ad844..44a66ad 100644 --- a/server/api/salesforce_field/salesforce_field.events.js +++ b/server/api/salesforce_field/salesforce_field.events.js @@ -1 +1,36 @@ -var _0x74e2=["\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"];_0x74e2[0];const EventEmitter=require(_0x74e2[1]);const SalesforceField=require(_0x74e2[3])[_0x74e2[2]];var SalesforceFieldEvents= new EventEmitter();SalesforceFieldEvents[_0x74e2[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x74e2[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x74e2[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x74e2[6]};for(var e in events){var event=events[e];SalesforceField[_0x74e2[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4c66x8,_0x4c66x9,_0x4c66xa){SalesforceFieldEvents[_0x74e2[10]](event+ _0x74e2[8]+ _0x4c66x8[_0x74e2[9]],_0x4c66x8);SalesforceFieldEvents[_0x74e2[10]](event,_0x4c66x8);_0x4c66xa(null)}}module[_0x74e2[11]]= SalesforceFieldEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/salesforce_field/salesforce_field.socket.js b/server/api/salesforce_field/salesforce_field.socket.js index 784515d..e394e5b 100644 --- a/server/api/salesforce_field/salesforce_field.socket.js +++ b/server/api/salesforce_field/salesforce_field.socket.js @@ -1 +1,32 @@ -var _0xf81f=["\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"];_0xf81f[0];const SalesforceFieldEvents=require(_0xf81f[1]);var events=[_0xf81f[2],_0xf81f[3]];exports[_0xf81f[4]]= function(_0x13abx3){for(var _0x13abx4=0,_0x13abx5=events[_0xf81f[5]];_0x13abx4< _0x13abx5;_0x13abx4++){var _0x13abx6=events[_0x13abx4];var _0x13abx7=createListener(_0xf81f[6]+ _0x13abx6,_0x13abx3);SalesforceFieldEvents[_0xf81f[7]](_0x13abx6,_0x13abx7);_0x13abx3[_0xf81f[7]](_0xf81f[8],removeListener(_0x13abx6,_0x13abx7))}};function createListener(_0x13abx6,_0x13abx3){return function(_0x13abx9){_0x13abx3[_0xf81f[9]](_0x13abx6,_0x13abx9)}}function removeListener(_0x13abx6,_0x13abx7){return function(){SalesforceFieldEvents[_0xf81f[10]](_0x13abx6,_0x13abx7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/scheduler/index.js b/server/api/scheduler/index.js index 542596a..7dd28ad 100644 --- a/server/api/scheduler/index.js +++ b/server/api/scheduler/index.js @@ -1 +1,19 @@ -var _0x149c=["\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"];_0x149c[0];var express=require(_0x149c[1]);var auth=require(_0x149c[2]);var controller=require(_0x149c[3]);var router=express.Router();router[_0x149c[7]](_0x149c[4],auth[_0x149c[5]](),controller[_0x149c[6]]);router[_0x149c[7]](_0x149c[8],auth[_0x149c[5]](),controller[_0x149c[9]]);router[_0x149c[7]](_0x149c[10],auth[_0x149c[5]](),controller[_0x149c[11]]);router[_0x149c[13]](_0x149c[4],auth[_0x149c[5]](),controller[_0x149c[12]]);router[_0x149c[15]](_0x149c[8],auth[_0x149c[5]](),controller[_0x149c[14]]);router[_0x149c[16]](_0x149c[8],auth[_0x149c[5]](),controller[_0x149c[14]]);router[_0x149c[18]](_0x149c[8],auth[_0x149c[5]](),controller[_0x149c[17]]);module[_0x149c[19]]= router \ No newline at end of file +'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; diff --git a/server/api/scheduler/scheduler.controller.js b/server/api/scheduler/scheduler.controller.js index bfd1d83..f25aa6a 100644 --- a/server/api/scheduler/scheduler.controller.js +++ b/server/api/scheduler/scheduler.controller.js @@ -1 +1,130 @@ -var _0x2e1c=["\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"];_0x2e1c[0];var _=require(_0x2e1c[1]);var Schedule=require(_0x2e1c[3])[_0x2e1c[2]];var MailServerOut=require(_0x2e1c[3])[_0x2e1c[4]];var Reports=require(_0x2e1c[5]);function handleError(_0x709ax6,_0x709ax7){_0x709ax7= _0x709ax7|| 500;return function(_0x709ax8){console[_0x2e1c[6]](_0x709ax8);_0x709ax6[_0x2e1c[8]](_0x709ax7)[_0x2e1c[7]](_0x709ax8)}}function responseWithResult(_0x709ax6,_0x709ax7){_0x709ax7= _0x709ax7|| 200;return function(_0x709axa){if(_0x709axa){_0x709ax6[_0x2e1c[8]](_0x709ax7)[_0x2e1c[9]](_0x709axa)}}}function responseWithoutResult(_0x709ax6,_0x709ax7){_0x709ax7= _0x709ax7|| 200;return function(){_0x709ax6[_0x2e1c[10]](_0x709ax7)}}function handleEntityNotFound(_0x709ax6){return function(_0x709axa){if(!_0x709axa){_0x709ax6[_0x2e1c[8]](404)[_0x2e1c[11]]();return null};return _0x709axa}}function saveUpdates(_0x709axe){return function(_0x709axa){return _0x709axa[_0x2e1c[13]](_0x709axe)[_0x2e1c[12]](function(_0x709axf){return _0x709axf})}}function removeEntity(_0x709ax6){return function(_0x709axa){if(_0x709axa){return _0x709axa[_0x2e1c[14]]()[_0x2e1c[12]](function(){_0x709ax6[_0x2e1c[8]](204)[_0x2e1c[11]]()})}}}function runSchedule(_0x709ax12){return function(_0x709axa){if(_0x709axa){switch(_0x709axa[_0x2e1c[18]]){case _0x2e1c[17]:var _0x709ax13= new Reports();_0x709ax13[_0x2e1c[16]](_0x709axa,_0x709ax12[_0x2e1c[15]]);break;default:}}}}exports[_0x2e1c[19]]= function(_0x709ax12,_0x709ax6){Schedule[_0x2e1c[21]]()[_0x2e1c[12]](responseWithResult(_0x709ax6))[_0x2e1c[20]](handleError(_0x709ax6))};exports[_0x2e1c[22]]= function(_0x709ax12,_0x709ax6){Schedule[_0x2e1c[25]](_0x709ax12[_0x2e1c[24]][_0x2e1c[23]])[_0x2e1c[12]](handleEntityNotFound(_0x709ax6))[_0x2e1c[12]](responseWithResult(_0x709ax6))[_0x2e1c[20]](handleError(_0x709ax6))};exports[_0x2e1c[26]]= function(_0x709ax12,_0x709ax6){Schedule[_0x2e1c[25]](_0x709ax12[_0x2e1c[24]][_0x2e1c[23]],{include:[MailServerOut]})[_0x2e1c[12]](handleEntityNotFound(_0x709ax6))[_0x2e1c[12]](runSchedule(_0x709ax12))[_0x2e1c[12]](responseWithoutResult(_0x709ax6))[_0x2e1c[20]](handleError(_0x709ax6))};exports[_0x2e1c[27]]= function(_0x709ax12,_0x709ax6){Schedule[_0x2e1c[27]](_0x709ax12[_0x2e1c[28]])[_0x2e1c[12]](responseWithResult(_0x709ax6,201))[_0x2e1c[20]](handleError(_0x709ax6))};exports[_0x2e1c[29]]= function(_0x709ax12,_0x709ax6){if(_0x709ax12[_0x2e1c[28]][_0x2e1c[23]]){delete _0x709ax12[_0x2e1c[28]][_0x2e1c[23]]};Schedule[_0x2e1c[25]](_0x709ax12[_0x2e1c[24]][_0x2e1c[23]])[_0x2e1c[12]](handleEntityNotFound(_0x709ax6))[_0x2e1c[12]](saveUpdates(_0x709ax12[_0x2e1c[28]]))[_0x2e1c[12]](responseWithResult(_0x709ax6))[_0x2e1c[20]](handleError(_0x709ax6))};exports[_0x2e1c[14]]= function(_0x709ax12,_0x709ax6){Schedule[_0x2e1c[25]](_0x709ax12[_0x2e1c[24]][_0x2e1c[23]])[_0x2e1c[12]](handleEntityNotFound(_0x709ax6))[_0x2e1c[12]](removeEntity(_0x709ax6))[_0x2e1c[20]](handleError(_0x709ax6))} \ No newline at end of file +'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)); +} diff --git a/server/api/scheduler/scheduler.events.js b/server/api/scheduler/scheduler.events.js index 619b804..7718bf6 100644 --- a/server/api/scheduler/scheduler.events.js +++ b/server/api/scheduler/scheduler.events.js @@ -1 +1,36 @@ -var _0xe709=["\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"];_0xe709[0];const EventEmitter=require(_0xe709[1]);const Schedule=require(_0xe709[3])[_0xe709[2]];var SchedulerEvents= new EventEmitter();SchedulerEvents[_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];Schedule[_0xe709[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x25bcx8,_0x25bcx9,_0x25bcxa){SchedulerEvents[_0xe709[10]](event+ _0xe709[8]+ _0x25bcx8[_0xe709[9]],_0x25bcx8);SchedulerEvents[_0xe709[10]](event,_0x25bcx8);_0x25bcxa(null)}}module[_0xe709[11]]= SchedulerEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/scheduler/scheduler.socket.js b/server/api/scheduler/scheduler.socket.js index 14615e9..16264a4 100644 --- a/server/api/scheduler/scheduler.socket.js +++ b/server/api/scheduler/scheduler.socket.js @@ -1 +1,32 @@ -var _0x4244=["\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"];_0x4244[0];const SchedulerEvents=require(_0x4244[1]);var events=[_0x4244[2],_0x4244[3],_0x4244[4]];exports[_0x4244[5]]= function(_0x308dx3){for(var _0x308dx4=0,_0x308dx5=events[_0x4244[6]];_0x308dx4< _0x308dx5;_0x308dx4++){var _0x308dx6=events[_0x308dx4];var _0x308dx7=createListener(_0x4244[7]+ _0x308dx6,_0x308dx3);SchedulerEvents[_0x4244[8]](_0x308dx6,_0x308dx7);_0x308dx3[_0x4244[8]](_0x4244[9],removeListener(_0x308dx6,_0x308dx7))}};function createListener(_0x308dx6,_0x308dx3){return function(_0x308dx9){_0x308dx3[_0x4244[10]](_0x308dx6,_0x308dx9)}}function removeListener(_0x308dx6,_0x308dx7){return function(){SchedulerEvents[_0x4244[11]](_0x308dx6,_0x308dx7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/setting/index.js b/server/api/setting/index.js index e187233..cbca952 100644 --- a/server/api/setting/index.js +++ b/server/api/setting/index.js @@ -1 +1,28 @@ -var _0xf863=["\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"];_0xf863[0];var express=require(_0xf863[1]);var controller=require(_0xf863[2]);var auth=require(_0xf863[3]);var router=express.Router();router[_0xf863[9]](_0xf863[4],auth[_0xf863[5]](),auth[_0xf863[7]](_0xf863[6]),controller[_0xf863[8]]);router[_0xf863[9]](_0xf863[10],auth[_0xf863[5]](),auth[_0xf863[12]]([9],[_0xf863[6],_0xf863[11]]),controller[_0xf863[13]]);router[_0xf863[9]](_0xf863[14],auth[_0xf863[5]](),auth[_0xf863[7]](_0xf863[6]),controller[_0xf863[15]]);router[_0xf863[9]](_0xf863[16],auth[_0xf863[5]](),auth[_0xf863[7]](_0xf863[6]),controller[_0xf863[17]]);router[_0xf863[9]](_0xf863[18],controller[_0xf863[19]]);router[_0xf863[9]](_0xf863[20],controller[_0xf863[21]]);router[_0xf863[9]](_0xf863[22],auth[_0xf863[5]](),auth[_0xf863[7]](_0xf863[6]),controller[_0xf863[23]]);router[_0xf863[9]](_0xf863[24],auth[_0xf863[5]](),auth[_0xf863[7]](_0xf863[6]),controller[_0xf863[25]]);router[_0xf863[9]](_0xf863[26],controller[_0xf863[27]]);router[_0xf863[9]](_0xf863[28],auth[_0xf863[5]](),controller[_0xf863[29]]);router[_0xf863[31]](_0xf863[4],auth[_0xf863[5]](),auth[_0xf863[7]](_0xf863[6]),controller[_0xf863[30]]);router[_0xf863[31]](_0xf863[32],auth[_0xf863[5]](),auth[_0xf863[7]](_0xf863[6]),controller[_0xf863[33]]);router[_0xf863[31]](_0xf863[34],auth[_0xf863[5]](),auth[_0xf863[7]](_0xf863[6]),controller[_0xf863[35]]);router[_0xf863[31]](_0xf863[36],auth[_0xf863[5]](),auth[_0xf863[7]](_0xf863[6]),controller[_0xf863[37]]);router[_0xf863[31]](_0xf863[10],auth[_0xf863[5]](),auth[_0xf863[7]](_0xf863[6]),controller[_0xf863[38]]);router[_0xf863[41]](_0xf863[39],auth[_0xf863[5]](),auth[_0xf863[7]](_0xf863[6]),controller[_0xf863[40]]);router[_0xf863[41]](_0xf863[28],auth[_0xf863[5]](),auth[_0xf863[7]](_0xf863[6]),controller[_0xf863[42]]);router[_0xf863[44]](_0xf863[28],auth[_0xf863[5]](),auth[_0xf863[7]](_0xf863[6]),controller[_0xf863[43]]);module[_0xf863[45]]= router \ No newline at end of file +'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; diff --git a/server/api/setting/setting.controller.js b/server/api/setting/setting.controller.js index abc7acc..f5db6ef 100644 --- a/server/api/setting/setting.controller.js +++ b/server/api/setting/setting.controller.js @@ -1 +1,422 @@ -var _0x1c67=["\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"];_0x1c67[0];var _=require(_0x1c67[1]);var Setting=require(_0x1c67[3])[_0x1c67[2]];var system=require(_0x1c67[4]);var Agent=require(_0x1c67[3])[_0x1c67[5]];var VoiceMail=require(_0x1c67[3])[_0x1c67[6]];var MailAccount=require(_0x1c67[3])[_0x1c67[7]];var MailServerOut=require(_0x1c67[3])[_0x1c67[8]];var Promise=require(_0x1c67[9]);var UploadFile=require(_0x1c67[10]);var path=require(_0x1c67[11]);var sequelize=require(_0x1c67[3])[_0x1c67[12]];var config=require(_0x1c67[13]);var sr=require(_0x1c67[14]);var fs=require(_0x1c67[15]);exports[_0x1c67[16]]= function(_0x8e8exf,_0x8e8ex10){return Setting[_0x1c67[21]]()[_0x1c67[20]](function(_0x8e8ex12){return _0x8e8ex10[_0x1c67[19]](200)[_0x1c67[18]](_0x8e8ex12)})[_0x1c67[17]](function(_0x8e8ex11){return handleError(_0x8e8ex10,_0x8e8ex11)})};exports[_0x1c67[22]]= function(_0x8e8exf,_0x8e8ex10){return Promise[_0x1c67[25]]([])[_0x1c67[20]](system[_0x1c67[24]]())[_0x1c67[20]](function(_0x8e8ex13){return _0x8e8ex10[_0x1c67[19]](200)[_0x1c67[18]](_0x8e8ex13)})[_0x1c67[17]](function(_0x8e8ex11){console[_0x1c67[23]](_0x8e8ex11);return handleError(_0x8e8ex10,_0x8e8ex11)})};exports[_0x1c67[26]]= function(_0x8e8exf,_0x8e8ex10){return Promise[_0x1c67[35]](_0x8e8exf[_0x1c67[34]][_0x1c67[33]][_0x1c67[32]][_0x1c67[31]])({action:_0x1c67[27],command:_0x8e8exf[_0x1c67[30]][_0x1c67[29]][_0x1c67[28]]()})[_0x1c67[20]](function(_0x8e8ex14){return _0x8e8ex10[_0x1c67[19]](200)[_0x1c67[18]](_0x8e8ex14)})[_0x1c67[17]](function(_0x8e8ex11){return handleError(_0x8e8ex10,_0x8e8ex11)})};exports[_0x1c67[36]]= function(_0x8e8exf,_0x8e8ex10){var _0x8e8ex15={output:_0x1c67[37],errors:_0x1c67[37]};var _0x8e8ex16=Promise[_0x1c67[35]](fs[_0x1c67[38]]);var _0x8e8ex17=Promise[_0x1c67[35]](fs[_0x1c67[39]]);return _0x8e8ex16(_0x1c67[48],_0x1c67[45])[_0x1c67[20]](function(_0x8e8ex19){_0x8e8ex15[_0x1c67[46]]= _0x8e8ex19})[_0x1c67[17]](function(_0x8e8ex11){_0x8e8ex15[_0x1c67[46]]= _0x1c67[47]})[_0x1c67[20]](function(){return _0x8e8ex16(_0x1c67[44],_0x1c67[45])})[_0x1c67[20]](function(_0x8e8ex18){_0x8e8ex15[_0x1c67[42]]= _0x8e8ex18})[_0x1c67[17]](function(_0x8e8ex11){_0x8e8ex15[_0x1c67[42]]= _0x1c67[43]})[_0x1c67[20]](function(_0x8e8ex14){return _0x8e8ex10[_0x1c67[19]](200)[_0x1c67[18]](_0x8e8ex15)})[_0x1c67[17]](function(_0x8e8ex11){console[_0x1c67[23]](_0x1c67[40],_0x8e8ex11[_0x1c67[41]]);return handleError(_0x8e8ex10,_0x8e8ex11)})};exports[_0x1c67[49]]= function(_0x8e8exf,_0x8e8ex10){changeLogo(_0x8e8exf,_0x8e8ex10,_0x1c67[50])};exports[_0x1c67[51]]= function(_0x8e8exf,_0x8e8ex10){changeLogo(_0x8e8exf,_0x8e8ex10,_0x1c67[52])};function changeLogo(_0x8e8exf,_0x8e8ex10,_0x8e8ex1b){var _0x8e8ex1c= new UploadFile({dest:path[_0x1c67[57]](config[_0x1c67[53]],_0x1c67[54],_0x1c67[55],_0x1c67[56]),maxNumberOfFiles:1,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(jpeg|png)$/i,rename:function(_0x8e8ex1d,_0x8e8ex1e){return sr()+ path[_0x1c67[59]](_0x8e8ex1e[_0x1c67[58]])},messages:{maxNumberOfFiles:_0x1c67[60],acceptFileTypes:_0x1c67[61],invalidRequest:_0x1c67[62]}});_0x8e8ex1c[_0x1c67[69]](_0x1c67[63],function(_0x8e8ex1f,_0x8e8ex20){if(!_0x8e8ex20[_0x1c67[64]][_0x1c67[58]]){return _0x8e8ex10[_0x1c67[19]](500)[_0x1c67[18]](_0x8e8ex1c)};return sequelize[_0x1c67[68]](function(_0x8e8ex21){return Setting[_0x1c67[67]](1)[_0x1c67[20]](function(_0x8e8ex12){if(!_0x8e8ex12){return _0x8e8ex10[_0x1c67[65]](404)};var _0x8e8ex23={};_0x8e8ex23[_0x8e8ex1b]= _0x8e8ex20[_0x1c67[64]][_0x1c67[58]];return _0x8e8ex12[_0x1c67[66]](_0x8e8ex23,{transaction:_0x8e8ex21})})[_0x1c67[20]](function(_0x8e8ex22){return _0x8e8ex10[_0x1c67[19]](200)[_0x1c67[18]](_0x8e8ex22)})})[_0x1c67[17]](function(_0x8e8ex11){return handleError(_0x8e8ex10,_0x8e8ex11)})});_0x8e8ex1c[_0x1c67[69]](_0x1c67[70],function(_0x8e8ex11){console[_0x1c67[23]](_0x1c67[71],_0x8e8ex11);return handleError(_0x8e8ex10,_0x8e8ex11)});_0x8e8ex1c[_0x1c67[72]](_0x8e8exf)}exports[_0x1c67[73]]= function(_0x8e8exf,_0x8e8ex10){getLogo(_0x8e8exf,_0x8e8ex10,_0x1c67[74])};exports[_0x1c67[75]]= function(_0x8e8exf,_0x8e8ex10){getLogo(_0x8e8exf,_0x8e8ex10,_0x1c67[76])};function getLogo(_0x8e8exf,_0x8e8ex10,_0x8e8ex25){var _0x8e8ex26=path[_0x1c67[57]](config[_0x1c67[53]],_0x1c67[54],_0x1c67[55],_0x1c67[56],_0x8e8exf[_0x1c67[77]][_0x1c67[58]]);fs[_0x1c67[39]](_0x8e8ex26,function(_0x8e8ex17){if(!_0x8e8ex17){_0x8e8ex26= path[_0x1c67[57]](config[_0x1c67[53]],_0x1c67[54],_0x1c67[55],_0x1c67[56],_0x1c67[78],_0x8e8ex25)};return _0x8e8ex10[_0x1c67[79]](_0x8e8ex26)})}exports[_0x1c67[80]]= function(_0x8e8exf,_0x8e8ex10){var _0x8e8ex27;return Setting[_0x1c67[67]](1)[_0x1c67[20]](function(_0x8e8ex12){_0x8e8ex27= _0x8e8ex12;return Agent[_0x1c67[21]]({attributes:[_0x1c67[81]]})})[_0x1c67[20]](function(_0x8e8ex28){var _0x8e8ex29=_[_0x1c67[82]](_0x8e8ex28,_0x1c67[81]);var _0x8e8ex2a={value:0,range:0};var _0x8e8ex2b;if(_0x8e8exf[_0x1c67[83]][_0x1c67[81]]){_0x8e8ex2a[_0x1c67[84]]= Number(_0x8e8exf[_0x1c67[83]][_0x1c67[81]]);while(_[_0x1c67[85]](_0x8e8ex29,_0x8e8ex2a[_0x1c67[84]])){_0x8e8ex2a[_0x1c67[84]]++};_0x8e8ex2b= _[_0x1c67[87]](_0x8e8ex29,function(_0x8e8ex2c){return _0x8e8ex2c> _0x8e8ex2a[_0x1c67[84]]})[_0x1c67[86]]();_0x8e8ex2a[_0x1c67[88]]= _0x8e8ex2b- _0x8e8ex2a[_0x1c67[84]]}else {var _0x8e8ex2d=_[_0x1c67[89]](_0x8e8ex29);_0x8e8ex2a[_0x1c67[84]]= _0x8e8ex27[_0x1c67[90]];if(_0x8e8ex2d&& _0x8e8ex2d>= _0x8e8ex27[_0x1c67[90]]){while(_[_0x1c67[85]](_0x8e8ex29,_0x8e8ex2a[_0x1c67[84]])){_0x8e8ex2a[_0x1c67[84]]++};_0x8e8ex2b= _[_0x1c67[87]](_0x8e8ex29,function(_0x8e8ex2c){return _0x8e8ex2c> _0x8e8ex2a[_0x1c67[84]]})[_0x1c67[86]]();_0x8e8ex2a[_0x1c67[88]]= _0x8e8ex2b- _0x8e8ex2a[_0x1c67[84]]}};return _0x8e8ex10[_0x1c67[19]](200)[_0x1c67[18]](_0x8e8ex2a)})[_0x1c67[17]](function(_0x8e8ex11){return handleError(_0x8e8ex10,_0x8e8ex11)})};exports[_0x1c67[91]]= function(_0x8e8exf,_0x8e8ex10){var _0x8e8ex27;return Setting[_0x1c67[67]](1)[_0x1c67[20]](function(_0x8e8ex12){_0x8e8ex27= _0x8e8ex12;return VoiceMail[_0x1c67[21]]({attributes:[_0x1c67[92]]})})[_0x1c67[20]](function(_0x8e8ex2e){var _0x8e8ex2f=_[_0x1c67[82]](_0x8e8ex2e,function(_0x8e8ex2c){return Number(_0x8e8ex2c[_0x1c67[92]])});var _0x8e8ex30={value:0,range:0};var _0x8e8ex2b;var _0x8e8ex31=_[_0x1c67[89]](_0x8e8ex2f);_0x8e8ex30[_0x1c67[84]]= _0x8e8ex27[_0x1c67[93]];if(_0x8e8ex31&& _0x8e8ex31>= _0x8e8ex27[_0x1c67[93]]){while(_[_0x1c67[85]](_0x8e8ex2f,_0x8e8ex30[_0x1c67[84]])){_0x8e8ex30[_0x1c67[84]]++};_0x8e8ex2b= _[_0x1c67[87]](_0x8e8ex2f,function(_0x8e8ex2c){return _0x8e8ex2c> _0x8e8ex30[_0x1c67[84]]})[_0x1c67[86]]();_0x8e8ex30[_0x1c67[88]]= _0x8e8ex2b- _0x8e8ex30[_0x1c67[84]]};return _0x8e8ex10[_0x1c67[19]](200)[_0x1c67[18]](_0x8e8ex30)})[_0x1c67[17]](function(_0x8e8ex11){console[_0x1c67[23]](_0x8e8ex11);return handleError(_0x8e8ex10,_0x8e8ex11)})};exports[_0x1c67[94]]= function(_0x8e8exf,_0x8e8ex10){var _0x8e8ex32=require(_0x1c67[95]);return _0x8e8ex10[_0x1c67[19]](200)[_0x1c67[18]]({name:_0x8e8ex32[_0x1c67[96]],version:_0x8e8ex32[_0x1c67[97]],engines:_0x8e8ex32[_0x1c67[98]]})};exports[_0x1c67[99]]= function(_0x8e8exf,_0x8e8ex10){return Setting[_0x1c67[67]](_0x8e8exf[_0x1c67[77]][_0x1c67[100]])[_0x1c67[20]](function(_0x8e8ex33){if(!_0x8e8ex33){return _0x8e8ex10[_0x1c67[65]](404)};return _0x8e8ex10[_0x1c67[18]](_0x8e8ex33)})[_0x1c67[17]](function(_0x8e8ex11){return handleError(_0x8e8ex10,_0x8e8ex11)})};exports[_0x1c67[101]]= function(_0x8e8exf,_0x8e8ex10,_0x8e8ex34){return MailAccount[_0x1c67[111]]({where:{service:true},include:[{model:MailServerOut,attributes:[_0x1c67[100],_0x1c67[103],_0x1c67[104],_0x1c67[105],_0x1c67[106],_0x1c67[107],_0x1c67[108],_0x1c67[109],_0x1c67[110]]}]})[_0x1c67[20]](function(_0x8e8ex35){console[_0x1c67[23]](_0x1c67[102],_0x8e8ex35);if(!_0x8e8ex35){return _0x8e8ex10[_0x1c67[65]](404)};return _0x8e8ex10[_0x1c67[18]](_0x8e8ex35)})[_0x1c67[17]](function(_0x8e8ex11){return handleError(_0x8e8ex10,_0x8e8ex11)})};exports[_0x1c67[112]]= function(_0x8e8exf,_0x8e8ex10){return Setting[_0x1c67[112]](_0x8e8exf[_0x1c67[30]])[_0x1c67[20]](function(_0x8e8ex33){return _0x8e8ex10[_0x1c67[19]](201)[_0x1c67[18]](_0x8e8ex33)})[_0x1c67[17]](function(_0x8e8ex11){return handleError(_0x8e8ex10,_0x8e8ex11)})};exports[_0x1c67[113]]= function(_0x8e8exf,_0x8e8ex10,_0x8e8ex34){return MailAccount[_0x1c67[112]](_0x8e8exf[_0x1c67[30]],{include:[{model:MailServerOut}]})[_0x1c67[20]](function(_0x8e8ex35){return _0x8e8ex10[_0x1c67[19]](201)[_0x1c67[18]](_0x8e8ex35)})[_0x1c67[17]](function(_0x8e8ex11){return handleError(_0x8e8ex10,_0x8e8ex11)})};exports[_0x1c67[114]]= function(_0x8e8exf,_0x8e8ex10){var _0x8e8ex36;return MailAccount[_0x1c67[67]](_0x8e8exf[_0x1c67[77]][_0x1c67[100]])[_0x1c67[20]](function(_0x8e8ex35){_0x8e8ex36= _0x8e8ex35;return _0x8e8ex36[_0x1c67[66]]({name:_0x8e8exf[_0x1c67[30]][_0x1c67[96]],address:_0x8e8exf[_0x1c67[30]][_0x1c67[116]],service:_0x8e8exf[_0x1c67[30]][_0x1c67[117]],signature:_0x8e8exf[_0x1c67[30]][_0x1c67[118]],ListId:_0x8e8exf[_0x1c67[30]][_0x1c67[119]],TemplateId:_0x8e8exf[_0x1c67[30]][_0x1c67[120]]})})[_0x1c67[20]](function(_0x8e8ex35){if(_0x8e8exf[_0x1c67[30]][_0x1c67[8]]){_0x8e8exf[_0x1c67[30]][_0x1c67[8]][_0x1c67[108]]= _0x1c67[115];_0x8e8exf[_0x1c67[30]][_0x1c67[8]][_0x1c67[109]]= null;return MailServerOut[_0x1c67[66]](_0x8e8exf[_0x1c67[30]].MailServerOut,{where:{id:_0x8e8exf[_0x1c67[30]][_0x1c67[8]][_0x1c67[100]]},individualHooks:true})}})[_0x1c67[20]](function(_0x8e8ex37){return _0x8e8ex10[_0x1c67[65]](200)})[_0x1c67[17]](function(_0x8e8ex11){return handleError(_0x8e8ex10,_0x8e8ex11)})};exports[_0x1c67[66]]= function(_0x8e8exf,_0x8e8ex10){if(_0x8e8exf[_0x1c67[30]][_0x1c67[100]]){delete _0x8e8exf[_0x1c67[30]][_0x1c67[100]]};return Setting[_0x1c67[67]](_0x8e8exf[_0x1c67[77]][_0x1c67[100]])[_0x1c67[20]](function(_0x8e8ex33){if(!_0x8e8ex33){return _0x8e8ex10[_0x1c67[65]](404)};var _0x8e8ex38=_[_0x1c67[121]](_0x8e8ex33,_0x8e8exf[_0x1c67[30]]);return _0x8e8ex38[_0x1c67[122]]()})[_0x1c67[20]](function(_0x8e8ex33){return _0x8e8ex10[_0x1c67[19]](200)[_0x1c67[18]](_0x8e8ex33)})[_0x1c67[17]](function(_0x8e8ex11){return handleError(_0x8e8ex10,_0x8e8ex11)})};exports[_0x1c67[123]]= function(_0x8e8exf,_0x8e8ex10){return Setting[_0x1c67[67]](_0x8e8exf[_0x1c67[77]][_0x1c67[100]])[_0x1c67[20]](function(_0x8e8ex33){if(!_0x8e8ex33){return _0x8e8ex10[_0x1c67[65]](404)};return _0x8e8ex33[_0x1c67[123]]()})[_0x1c67[20]](function(){return _0x8e8ex10[_0x1c67[65]](204)})[_0x1c67[17]](function(_0x8e8ex11){return handleError(_0x8e8ex10,_0x8e8ex11)})};function handleError(_0x8e8ex10,_0x8e8ex11){return _0x8e8ex10[_0x1c67[19]](500)[_0x1c67[18]](_0x8e8ex11)} \ No newline at end of file +'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); +} diff --git a/server/api/setting/setting.events.js b/server/api/setting/setting.events.js index fa982a1..1aa184d 100644 --- a/server/api/setting/setting.events.js +++ b/server/api/setting/setting.events.js @@ -1 +1,36 @@ -var _0xbc50=["\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"];_0xbc50[0];const EventEmitter=require(_0xbc50[1]);const Setting=require(_0xbc50[3])[_0xbc50[2]];var SettingEvents= new EventEmitter();SettingEvents[_0xbc50[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xbc50[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xbc50[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xbc50[6]};for(var e in events){var event=events[e];Setting[_0xbc50[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6b92x8,_0x6b92x9,_0x6b92xa){SettingEvents[_0xbc50[10]](event+ _0xbc50[8]+ _0x6b92x8[_0xbc50[9]],_0x6b92x8);SettingEvents[_0xbc50[10]](event,_0x6b92x8);_0x6b92xa(null)}}module[_0xbc50[11]]= SettingEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/setting/setting.socket.js b/server/api/setting/setting.socket.js index 29e9eca..6b71535 100644 --- a/server/api/setting/setting.socket.js +++ b/server/api/setting/setting.socket.js @@ -1 +1,32 @@ -var _0xf219=["\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"];_0xf219[0];const SettingEvents=require(_0xf219[1]);var events=[_0xf219[2],_0xf219[3]];exports[_0xf219[4]]= function(_0xc8adx3){for(var _0xc8adx4=0,_0xc8adx5=events[_0xf219[5]];_0xc8adx4< _0xc8adx5;_0xc8adx4++){var _0xc8adx6=events[_0xc8adx4];var _0xc8adx7=createListener(_0xf219[6]+ _0xc8adx6,_0xc8adx3);SettingEvents[_0xf219[7]](_0xc8adx6,_0xc8adx7);_0xc8adx3[_0xf219[7]](_0xf219[8],removeListener(_0xc8adx6,_0xc8adx7))}};function createListener(_0xc8adx6,_0xc8adx3){return function(_0xc8adx9){_0xc8adx3[_0xf219[9]](_0xc8adx6,_0xc8adx9)}}function removeListener(_0xc8adx6,_0xc8adx7){return function(){SettingEvents[_0xf219[10]](_0xc8adx6,_0xc8adx7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/sms_account/index.js b/server/api/sms_account/index.js index 80bc7d0..6870a09 100644 --- a/server/api/sms_account/index.js +++ b/server/api/sms_account/index.js @@ -1 +1,31 @@ -var _0xf040=["\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"];_0xf040[0];var express=require(_0xf040[1]);var auth=require(_0xf040[2]);var controller=require(_0xf040[3]);var license=require(_0xf040[4]);var router=express.Router();router[_0xf040[13]](_0xf040[5],license[_0xf040[6]](),license[_0xf040[7]](),auth[_0xf040[8]](),auth[_0xf040[11]]([11],[_0xf040[9],_0xf040[10]]),controller[_0xf040[12]]);router[_0xf040[13]](_0xf040[14],license[_0xf040[6]](),license[_0xf040[7]](),auth[_0xf040[8]](),auth[_0xf040[11]]([11],[_0xf040[9]]),controller[_0xf040[15]]);router[_0xf040[13]](_0xf040[16],license[_0xf040[6]](),license[_0xf040[7]](),auth[_0xf040[8]](),auth[_0xf040[11]]([11],[_0xf040[9]]),controller[_0xf040[17]]);router[_0xf040[13]](_0xf040[18],license[_0xf040[6]](),license[_0xf040[7]](),auth[_0xf040[8]](),auth[_0xf040[11]]([11],[_0xf040[9]]),controller[_0xf040[19]]);router[_0xf040[13]](_0xf040[20],license[_0xf040[6]](),license[_0xf040[7]](),auth[_0xf040[8]](),auth[_0xf040[11]]([11],[_0xf040[9],_0xf040[10]]),controller[_0xf040[21]]);router[_0xf040[13]](_0xf040[22],license[_0xf040[6]](),license[_0xf040[7]](),auth[_0xf040[8]](),auth[_0xf040[11]]([11],[_0xf040[9],_0xf040[10]]),controller[_0xf040[23]]);router[_0xf040[25]](_0xf040[5],license[_0xf040[6]](),license[_0xf040[7]](),auth[_0xf040[8]](),auth[_0xf040[11]]([11],[_0xf040[9]]),controller[_0xf040[24]]);router[_0xf040[25]](_0xf040[22],license[_0xf040[6]](),license[_0xf040[7]](),auth[_0xf040[8]](),auth[_0xf040[11]]([11],[_0xf040[9]]),controller[_0xf040[26]]);router[_0xf040[25]](_0xf040[16],license[_0xf040[6]](),license[_0xf040[7]](),auth[_0xf040[8]](),auth[_0xf040[11]]([11],[_0xf040[9]]),controller[_0xf040[27]]);router[_0xf040[25]](_0xf040[28],license[_0xf040[6]](),license[_0xf040[7]](),auth[_0xf040[8]](),auth[_0xf040[11]]([11],[_0xf040[9],_0xf040[10]]),controller[_0xf040[29]]);router[_0xf040[25]](_0xf040[30],license[_0xf040[6]](),license[_0xf040[7]](),controller[_0xf040[31]]);router[_0xf040[25]](_0xf040[32],license[_0xf040[6]](),license[_0xf040[7]](),controller[_0xf040[33]]);router[_0xf040[25]](_0xf040[34],license[_0xf040[6]](),license[_0xf040[7]](),controller[_0xf040[35]]);router[_0xf040[37]](_0xf040[14],license[_0xf040[6]](),license[_0xf040[7]](),auth[_0xf040[8]](),auth[_0xf040[11]]([11],[_0xf040[9]]),controller[_0xf040[36]]);router[_0xf040[37]](_0xf040[16],license[_0xf040[6]](),license[_0xf040[7]](),auth[_0xf040[8]](),auth[_0xf040[11]]([11],[_0xf040[9]]),controller[_0xf040[38]]);router[_0xf040[37]](_0xf040[39],license[_0xf040[6]](),license[_0xf040[7]](),auth[_0xf040[8]](),auth[_0xf040[11]]([11],[_0xf040[9]]),controller[_0xf040[40]]);router[_0xf040[37]](_0xf040[41],license[_0xf040[6]](),license[_0xf040[7]](),auth[_0xf040[8]](),auth[_0xf040[11]]([11],[_0xf040[9]]),controller[_0xf040[42]]);router[_0xf040[44]](_0xf040[14],license[_0xf040[6]](),license[_0xf040[7]](),auth[_0xf040[8]](),auth[_0xf040[11]]([11],[_0xf040[9]]),controller[_0xf040[43]]);router[_0xf040[44]](_0xf040[16],license[_0xf040[6]](),license[_0xf040[7]](),auth[_0xf040[8]](),auth[_0xf040[11]]([11],[_0xf040[9]]),controller[_0xf040[45]]);router[_0xf040[44]](_0xf040[39],license[_0xf040[6]](),license[_0xf040[7]](),auth[_0xf040[8]](),auth[_0xf040[11]]([11],[_0xf040[9]]),controller[_0xf040[46]]);router[_0xf040[44]](_0xf040[41],license[_0xf040[6]](),license[_0xf040[7]](),auth[_0xf040[8]](),auth[_0xf040[11]]([11],[_0xf040[9]]),controller[_0xf040[47]]);module[_0xf040[48]]= router \ No newline at end of file +'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; diff --git a/server/api/sms_account/sms_account.controller.js b/server/api/sms_account/sms_account.controller.js index 05f77f4..38277d1 100644 --- a/server/api/sms_account/sms_account.controller.js +++ b/server/api/sms_account/sms_account.controller.js @@ -1 +1,674 @@ -var _0x35ae=["\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","\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"];_0x35ae[0];var _=require(_0x35ae[1]);var Util=require(_0x35ae[2]);var skebby=require(_0x35ae[3]);var sequelize=require(_0x35ae[5])[_0x35ae[4]];var User=require(_0x35ae[5])[_0x35ae[6]];var SmsAccount=require(_0x35ae[5])[_0x35ae[7]];var SmsQueue=require(_0x35ae[5])[_0x35ae[8]];var SmsApplication=require(_0x35ae[5])[_0x35ae[9]];var SmsMessage=require(_0x35ae[5])[_0x35ae[10]];var SmsRoom=require(_0x35ae[5])[_0x35ae[11]];var SmsDisposition=require(_0x35ae[5])[_0x35ae[12]];var Contact=require(_0x35ae[5])[_0x35ae[13]];var Promise=require(_0x35ae[14]);var moment=require(_0x35ae[15]);function handleError(_0xb1d2x10,_0xb1d2x11){return _0xb1d2x10[_0x35ae[17]](500)[_0x35ae[16]](_0xb1d2x11)}exports[_0x35ae[18]]= function(_0xb1d2x12,_0xb1d2x10){return SmsAccount[_0x35ae[23]](Util[_0x35ae[22]](_0xb1d2x12[_0x35ae[21]]))[_0x35ae[20]](function(_0xb1d2x13){_0xb1d2x10[_0x35ae[17]](200)[_0x35ae[16]](_0xb1d2x13)})[_0x35ae[19]](function(_0xb1d2x11){return handleError(_0xb1d2x10,_0xb1d2x11)})};exports[_0x35ae[24]]= function(_0xb1d2x12,_0xb1d2x10){return SmsAccount[_0x35ae[28]](_0xb1d2x12[_0x35ae[27]][_0x35ae[26]])[_0x35ae[20]](function(_0xb1d2x14){if(!_0xb1d2x14){return _0xb1d2x10[_0x35ae[25]](404)};return _0xb1d2x10[_0x35ae[16]](_0xb1d2x14)})[_0x35ae[19]](function(_0xb1d2x11){return handleError(_0xb1d2x10,_0xb1d2x11)})};exports[_0x35ae[29]]= function(_0xb1d2x12,_0xb1d2x10){return SmsAccount[_0x35ae[28]](_0xb1d2x12[_0x35ae[27]][_0x35ae[26]])[_0x35ae[20]](function(_0xb1d2x14){if(!_0xb1d2x14){return _0xb1d2x10[_0x35ae[25]](404)};switch(_0xb1d2x14[_0x35ae[42]]){case _0x35ae[32]:var _0xb1d2x16=require(_0x35ae[32])(_0xb1d2x14[_0x35ae[30]],_0xb1d2x14[_0x35ae[31]]);var _0xb1d2x17=Promise[_0x35ae[35]](_0xb1d2x16[_0x35ae[34]][_0x35ae[33]]);return _0xb1d2x17();break;case _0x35ae[40]:var _0xb1d2x18={from:_0x35ae[36],to:_0x35ae[36],body:_0x35ae[36]};_0xb1d2x14[_0x35ae[37]]= _0x35ae[38];return skebby[_0x35ae[39]](_0xb1d2x18,_0xb1d2x14);break;default:throw new Error(_0x35ae[41])}})[_0x35ae[20]](function(_0xb1d2x15){return _0xb1d2x10[_0x35ae[25]](200)})[_0x35ae[19]](function(_0xb1d2x11){return handleError(_0xb1d2x10,_0xb1d2x11)})};exports[_0x35ae[43]]= function(_0xb1d2x12,_0xb1d2x10,_0xb1d2x19){return SmsAccount[_0x35ae[28]](_0xb1d2x12[_0x35ae[27]][_0x35ae[26]])[_0x35ae[20]](function(_0xb1d2x14){if(!_0xb1d2x14){return _0xb1d2x10[_0x35ae[25]](404)};return _0xb1d2x14[_0x35ae[45]]()})[_0x35ae[20]](function(_0xb1d2x1a){return _0xb1d2x10[_0x35ae[17]](200)[_0x35ae[16]]({rows:_0xb1d2x1a,count:_0xb1d2x1a[_0x35ae[44]]})})[_0x35ae[19]](function(_0xb1d2x11){return handleError(_0xb1d2x10,_0xb1d2x11)})};exports[_0x35ae[46]]= function(_0xb1d2x12,_0xb1d2x10,_0xb1d2x19){return SmsAccount[_0x35ae[52]](_0x35ae[51])[_0x35ae[28]](_0xb1d2x12[_0x35ae[27]][_0x35ae[26]])[_0x35ae[20]](function(_0xb1d2x14){if(!_0xb1d2x14){return _0xb1d2x10[_0x35ae[25]](404)};return _0xb1d2x14[_0x35ae[50]](_[_0x35ae[49]](Util[_0x35ae[22]](_0xb1d2x12[_0x35ae[21]]),{include:[{model:SmsQueue,attributes:[_0x35ae[26],_0x35ae[47]]},{model:User,attributes:[_0x35ae[26],_0x35ae[47],_0x35ae[48]]}]}))})[_0x35ae[20]](function(_0xb1d2x1b){return _0xb1d2x10[_0x35ae[16]]({count:_0xb1d2x1b[_0x35ae[44]],rows:_0xb1d2x1b})})[_0x35ae[19]](function(_0xb1d2x11){return handleError(_0xb1d2x10,_0xb1d2x11)})};exports[_0x35ae[53]]= function(_0xb1d2x12,_0xb1d2x10){return SmsAccount[_0x35ae[53]](_0xb1d2x12[_0x35ae[57]])[_0x35ae[20]](function(_0xb1d2x14){console[_0x35ae[56]](_0xb1d2x14);return _0xb1d2x10[_0x35ae[17]](201)[_0x35ae[16]](_0xb1d2x14)})[_0x35ae[19]](sequelize.UniqueConstraintError,function(_0xb1d2x11){return Util[_0x35ae[55]][_0x35ae[54]](_0xb1d2x10,_0xb1d2x11)})[_0x35ae[19]](function(_0xb1d2x11){return handleError(_0xb1d2x10,_0xb1d2x11)})};exports[_0x35ae[58]]= function(_0xb1d2x12,_0xb1d2x10,_0xb1d2x19){_0xb1d2x12[_0x35ae[57]][_0x35ae[59]]= _0xb1d2x12[_0x35ae[27]][_0x35ae[26]];return SmsDisposition[_0x35ae[53]](_0xb1d2x12[_0x35ae[57]])[_0x35ae[20]](function(_0xb1d2x1c){return _0xb1d2x10[_0x35ae[17]](201)[_0x35ae[16]](_0xb1d2x1c)})[_0x35ae[19]](function(_0xb1d2x11){return handleError(_0xb1d2x10,_0xb1d2x11)})};exports[_0x35ae[39]]= function(_0xb1d2x12,_0xb1d2x10,_0xb1d2x19){_0xb1d2x12[_0x35ae[57]][_0x35ae[59]]= _0xb1d2x12[_0x35ae[27]][_0x35ae[26]];_0xb1d2x12[_0x35ae[57]][_0x35ae[60]]= _0xb1d2x12[_0x35ae[61]][_0x35ae[26]];return SmsMessage[_0x35ae[53]](_0xb1d2x12[_0x35ae[57]],{user:_0xb1d2x12[_0x35ae[61]]})[_0x35ae[20]](function(_0xb1d2x1d){return _0xb1d2x10[_0x35ae[17]](201)[_0x35ae[16]](_0xb1d2x1d)})[_0x35ae[19]](function(_0xb1d2x11){return handleError(_0xb1d2x10,_0xb1d2x11)})};function getMessage(_0xb1d2x1f){var _0xb1d2x20;console[_0x35ae[56]](_0xb1d2x1f);switch(_0xb1d2x1f[_0x35ae[68]]){case _0x35ae[32]:if(_0xb1d2x1f[_0x35ae[62]]&& _0xb1d2x1f[_0x35ae[63]]&& _0xb1d2x1f[_0x35ae[64]]){_0xb1d2x20= {from:_0xb1d2x1f[_0x35ae[62]],to:_0xb1d2x1f[_0x35ae[63]],body:_0xb1d2x1f[_0x35ae[64]]}};break;case _0x35ae[40]:if((_0xb1d2x1f[_0x35ae[65]]&& _0xb1d2x1f[_0x35ae[66]]&& _0xb1d2x1f[_0x35ae[67]])){_0xb1d2x20= {from:_0xb1d2x1f[_0x35ae[65]],to:_0xb1d2x1f[_0x35ae[66]],body:_0xb1d2x1f[_0x35ae[67]]}};break;default:};return _0xb1d2x20}exports[_0x35ae[69]]= function(_0xb1d2x12,_0xb1d2x10,_0xb1d2x19){var _0xb1d2x20;var _0xb1d2x21;return SmsAccount[_0x35ae[28]](_0xb1d2x12[_0x35ae[27]][_0x35ae[26]])[_0x35ae[20]](function(_0xb1d2x14){if(!_0xb1d2x14){throw new Error(_0x35ae[85])};_0xb1d2x21= _0xb1d2x14;_0xb1d2x12[_0x35ae[57]][_0x35ae[68]]= _0xb1d2x21[_0x35ae[42]];_0xb1d2x20= getMessage(_0xb1d2x12[_0x35ae[57]]);if(!_0xb1d2x20){throw new Error(_0x35ae[86])};if(_0xb1d2x21[_0x35ae[87]]){return Contact[_0x35ae[88]]({where:{ListId:_0xb1d2x21[_0x35ae[87]],mobile:_0xb1d2x20[_0x35ae[74]]},defaults:{ListId:_0xb1d2x21[_0x35ae[87]],mobile:_0xb1d2x20[_0x35ae[74]]}})}else {return []}})[_0x35ae[20]](function(_0xb1d2x26){return SmsRoom[_0x35ae[84]]({limit:1,where:{contact:_0xb1d2x20[_0x35ae[74]],SmsAccountId:_0xb1d2x21[_0x35ae[26]]},order:[[_0x35ae[82],_0x35ae[83]]]})})[_0x35ae[20]](function(_0xb1d2x24){var _0xb1d2x23=_0xb1d2x24[0];if(!_0xb1d2x23|| _0xb1d2x23[_0x35ae[17]]=== _0x35ae[73]){var _0xb1d2x25=_0xb1d2x23?_0xb1d2x23[_0x35ae[26]]:null;return SmsRoom[_0x35ae[53]]({contact:_0xb1d2x20[_0x35ae[74]],SmsAccountId:_0xb1d2x21[_0x35ae[26]],status:_0x35ae[75],ParentId:_0xb1d2x25,lastEvent:_0x35ae[72],lastEventAt:moment()[_0x35ae[77]](_0x35ae[76]),smsIn:1})}else {return _0xb1d2x23[_0x35ae[81]]({status:_0x35ae[78],openReason:_0x35ae[79],lastEvent:_0x35ae[72],lastEventAt:moment()[_0x35ae[77]](_0x35ae[76]),smsIn:++_0xb1d2x23[_0x35ae[80]]})}})[_0x35ae[20]](function(_0xb1d2x23){_0xb1d2x20[_0x35ae[59]]= _0xb1d2x21[_0x35ae[26]];_0xb1d2x20[_0x35ae[71]]= _0xb1d2x23[_0x35ae[26]];_0xb1d2x20[_0x35ae[17]]= _0x35ae[72];return SmsMessage[_0x35ae[53]](_0xb1d2x20)})[_0x35ae[20]](function(_0xb1d2x22){return _0xb1d2x10[_0x35ae[17]](201)[_0x35ae[16]](_0xb1d2x22)})[_0x35ae[19]](function(_0xb1d2x11){console[_0x35ae[70]](_0xb1d2x11);return handleError(_0xb1d2x10,_0xb1d2x11)})};exports[_0x35ae[89]]= function(_0xb1d2x12,_0xb1d2x10){if(_0xb1d2x12[_0x35ae[57]][_0x35ae[26]]){delete _0xb1d2x12[_0x35ae[57]][_0x35ae[26]]};return SmsAccount[_0x35ae[28]](_0xb1d2x12[_0x35ae[27]][_0x35ae[26]])[_0x35ae[20]](function(_0xb1d2x14){if(!_0xb1d2x14){return _0xb1d2x10[_0x35ae[25]](404)};var _0xb1d2x27=_[_0x35ae[49]](_0xb1d2x14,_0xb1d2x12[_0x35ae[57]]);return _0xb1d2x27[_0x35ae[91]]()})[_0x35ae[20]](function(_0xb1d2x14){return _0xb1d2x10[_0x35ae[17]](200)[_0x35ae[16]](_0xb1d2x14)})[_0x35ae[19]](sequelize.UniqueConstraintError,function(_0xb1d2x11){return Util[_0x35ae[55]][_0x35ae[54]](_0xb1d2x10,_0xb1d2x11)})[_0x35ae[19]](function(_0xb1d2x11){console[_0x35ae[56]](_0x35ae[90],_0xb1d2x11);return handleError(_0xb1d2x10,_0xb1d2x11)})};exports[_0x35ae[92]]= function(_0xb1d2x12,_0xb1d2x10){if(_0xb1d2x12[_0x35ae[57]][_0x35ae[26]]){delete _0xb1d2x12[_0x35ae[57]][_0x35ae[26]]};return SmsDisposition[_0x35ae[28]](_0xb1d2x12[_0x35ae[27]][_0x35ae[93]])[_0x35ae[20]](function(_0xb1d2x29){if(!_0xb1d2x29){return _0xb1d2x10[_0x35ae[25]](404)};var _0xb1d2x27=_[_0x35ae[49]](_0xb1d2x29,_0xb1d2x12[_0x35ae[57]]);return _0xb1d2x27[_0x35ae[91]]()})[_0x35ae[20]](function(_0xb1d2x28){return _0xb1d2x10[_0x35ae[17]](200)[_0x35ae[16]](_0xb1d2x28)})[_0x35ae[19]](function(_0xb1d2x11){return handleError(_0xb1d2x10,_0xb1d2x11)})};exports[_0x35ae[94]]= function(_0xb1d2x12,_0xb1d2x10){return SmsMessage[_0x35ae[28]](_0xb1d2x12[_0x35ae[27]][_0x35ae[97]])[_0x35ae[20]](function(_0xb1d2x22){if(!_0xb1d2x22){return _0xb1d2x10[_0x35ae[25]](404)};var _0xb1d2x27=_[_0x35ae[49]](_0xb1d2x22,{status:_[_0x35ae[95]](_0xb1d2x12[_0x35ae[57]].MessageStatus),errorcode:_0xb1d2x12[_0x35ae[57]][_0x35ae[96]]});return _0xb1d2x27[_0x35ae[91]]()})[_0x35ae[20]](function(_0xb1d2x22){return _0xb1d2x10[_0x35ae[17]](200)[_0x35ae[16]](_0xb1d2x22)})[_0x35ae[19]](function(_0xb1d2x11){return handleError(_0xb1d2x10,_0xb1d2x11)})};exports[_0x35ae[98]]= function(_0xb1d2x12,_0xb1d2x10){return SmsMessage[_0x35ae[101]]({where:{skebby_message_id:_0xb1d2x12[_0x35ae[57]][_0x35ae[100]]}})[_0x35ae[20]](function(_0xb1d2x22){if(!_0xb1d2x22){return _0xb1d2x10[_0x35ae[25]](404)};var _0xb1d2x27=_[_0x35ae[49]](_0xb1d2x22,{status:_0xb1d2x12[_0x35ae[57]][_0x35ae[17]],errorcode:_0xb1d2x12[_0x35ae[57]][_0x35ae[99]]});return _0xb1d2x27[_0x35ae[91]]()})[_0x35ae[20]](function(_0xb1d2x22){return _0xb1d2x10[_0x35ae[17]](200)[_0x35ae[16]](_0xb1d2x22)})[_0x35ae[19]](function(_0xb1d2x11){return handleError(_0xb1d2x10,_0xb1d2x11)})};exports[_0x35ae[102]]= function(_0xb1d2x12,_0xb1d2x10){var _0xb1d2x2a=0;var _0xb1d2x2b=_0xb1d2x12[_0x35ae[57]];_0xb1d2x2b[_0x35ae[105]](function(_0xb1d2x2c){delete _0xb1d2x2c[_0x35ae[26]];delete _0xb1d2x2c[_0x35ae[82]];delete _0xb1d2x2c[_0x35ae[103]];_0xb1d2x2c[_0x35ae[104]]= ++_0xb1d2x2a});return sequelize[_0x35ae[108]](function(_0xb1d2x2e){return SmsApplication[_0x35ae[107]]({where:{SmsAccountId:_0xb1d2x12[_0x35ae[27]][_0x35ae[26]]},individualHooks:true,transaction:_0xb1d2x2e})[_0x35ae[20]](function(_0xb1d2x2f){return SmsApplication[_0x35ae[106]](_0xb1d2x2b,{individualHooks:true,transaction:_0xb1d2x2e})})})[_0x35ae[20]](function(_0xb1d2x2d){return _0xb1d2x10[_0x35ae[17]](200)[_0x35ae[16]]({count:_0xb1d2x2d[_0x35ae[44]],rows:_0xb1d2x2d})})[_0x35ae[19]](function(_0xb1d2x11){return handleError(_0xb1d2x10,_0xb1d2x11)})};exports[_0x35ae[107]]= function(_0xb1d2x12,_0xb1d2x10){return SmsAccount[_0x35ae[28]](_0xb1d2x12[_0x35ae[27]][_0x35ae[26]])[_0x35ae[20]](function(_0xb1d2x14){if(!_0xb1d2x14){return _0xb1d2x10[_0x35ae[25]](404)};return _0xb1d2x14[_0x35ae[107]]()})[_0x35ae[20]](function(){return _0xb1d2x10[_0x35ae[25]](204)})[_0x35ae[19]](function(_0xb1d2x11){return handleError(_0xb1d2x10,_0xb1d2x11)})};exports[_0x35ae[109]]= function(_0xb1d2x12,_0xb1d2x10,_0xb1d2x19){return SmsApplication[_0x35ae[28]](_0xb1d2x12[_0x35ae[27]][_0x35ae[110]])[_0x35ae[20]](function(_0xb1d2x2f){if(!_0xb1d2x2f){return _0xb1d2x10[_0x35ae[25]](404)};return _0xb1d2x2f[_0x35ae[107]]()})[_0x35ae[20]](function(){return _0xb1d2x10[_0x35ae[25]](204)})[_0x35ae[19]](function(_0xb1d2x11){return handleError(_0xb1d2x10,_0xb1d2x11)})};exports[_0x35ae[111]]= function(_0xb1d2x12,_0xb1d2x10,_0xb1d2x19){return SmsDisposition[_0x35ae[28]](_0xb1d2x12[_0x35ae[27]][_0x35ae[93]])[_0x35ae[20]](function(_0xb1d2x1c){if(!_0xb1d2x1c){return _0xb1d2x10[_0x35ae[25]](404)};return _0xb1d2x1c[_0x35ae[107]]()})[_0x35ae[20]](function(){return _0xb1d2x10[_0x35ae[25]](204)})[_0x35ae[19]](function(_0xb1d2x11){return handleError(_0xb1d2x10,_0xb1d2x11)})};exports[_0x35ae[112]]= function(_0xb1d2x12,_0xb1d2x10){return SmsApplication[_0x35ae[107]]({where:{id:_0xb1d2x12[_0x35ae[21]][_0x35ae[113]]},individualHooks:true})[_0x35ae[20]](function(){return _0xb1d2x10[_0x35ae[25]](204)})[_0x35ae[19]](function(_0xb1d2x11){return handleError(_0xb1d2x10,_0xb1d2x11)})};exports[_0x35ae[114]]= function(_0xb1d2x12,_0xb1d2x10,_0xb1d2x19){var _0xb1d2x30={where:{SmsAccountId:_0xb1d2x12[_0x35ae[27]][_0x35ae[26]],$and:[]},attributes:[_0x35ae[26],_0x35ae[115],_0x35ae[103],_0x35ae[116],_0x35ae[117],_0x35ae[118],_0x35ae[119]],include:[]};if(_0xb1d2x12[_0x35ae[21]]){if(_0xb1d2x12[_0x35ae[21]][_0x35ae[116]]){if(_[_0x35ae[120]](_0xb1d2x12[_0x35ae[21]][_0x35ae[116]])){for(var _0xb1d2x31=0;_0xb1d2x31< _0xb1d2x12[_0x35ae[21]][_0x35ae[116]][_0x35ae[44]];_0xb1d2x31++){_0xb1d2x30[_0x35ae[124]][_0x35ae[123]][_0x35ae[122]]({tags:{$like:_0x35ae[121]+ _0xb1d2x12[_0x35ae[21]][_0x35ae[116]][_0xb1d2x31]+ _0x35ae[121]}})}}else {_0xb1d2x30[_0x35ae[124]][_0x35ae[123]][_0x35ae[122]]({tags:{$like:_0x35ae[121]+ _0xb1d2x12[_0x35ae[21]][_0x35ae[116]]+ _0x35ae[121]}})};delete _0xb1d2x12[_0x35ae[21]][_0x35ae[116]]};_[_0x35ae[49]](_0xb1d2x30[_0x35ae[124]],_0xb1d2x12[_0x35ae[21]])};switch(_0xb1d2x12[_0x35ae[61]][_0x35ae[133]]){case _0x35ae[126]:_0xb1d2x30[_0x35ae[125]][_0x35ae[122]]({model:User,attributes:[_0x35ae[26]]});var _0xb1d2x32;var _0xb1d2x33;var _0xb1d2x34;return User[_0x35ae[28]](_0xb1d2x12[_0x35ae[61]][_0x35ae[26]])[_0x35ae[20]](function(_0xb1d2x38){if(_0xb1d2x38){return _0xb1d2x38[_0x35ae[132]]()}else {return []}})[_0x35ae[20]](function(_0xb1d2x37){_0xb1d2x33= _[_0x35ae[128]](_0xb1d2x37,_0x35ae[26]);return SmsAccount[_0x35ae[28]](_0xb1d2x12[_0x35ae[27]][_0x35ae[26]])})[_0x35ae[20]](function(_0xb1d2x36){return _0xb1d2x36[_0x35ae[50]]({where:{$or:[{app:_0x35ae[129]},{app:_0x35ae[126]}]}})})[_0x35ae[20]](function(_0xb1d2x2b){_0xb1d2x32= _[_0x35ae[128]](_[_0x35ae[127]](_0xb1d2x2b,{"\x61\x70\x70":_0x35ae[126]}),_0x35ae[60]);_0xb1d2x34= _[_0x35ae[128]](_[_0x35ae[127]](_0xb1d2x2b,{"\x61\x70\x70":_0x35ae[129]}),_0x35ae[130]);if(_[_0x35ae[131]](_0xb1d2x33,_0xb1d2x34)[_0x35ae[44]]|| _[_0x35ae[131]](_0xb1d2x32,[_0xb1d2x12[_0x35ae[61]][_0x35ae[26]]])[_0x35ae[44]]){return SmsRoom[_0x35ae[84]](_0xb1d2x30)[_0x35ae[20]](function(_0xb1d2x35){return _0xb1d2x10[_0x35ae[17]](200)[_0x35ae[16]](_0xb1d2x35)})[_0x35ae[19]](function(_0xb1d2x11){console[_0x35ae[70]](_0xb1d2x11);return handleError(_0xb1d2x10,_0xb1d2x11)})}else {return _0xb1d2x10[_0x35ae[17]](200)[_0x35ae[16]]([])}})[_0x35ae[19]](function(_0xb1d2x11){console[_0x35ae[70]](_0xb1d2x11)});default:return SmsRoom[_0x35ae[84]](_0xb1d2x30)[_0x35ae[20]](function(_0xb1d2x35){return _0xb1d2x10[_0x35ae[17]](200)[_0x35ae[16]](_0xb1d2x35)})[_0x35ae[19]](function(_0xb1d2x11){return handleError(_0xb1d2x10,_0xb1d2x11)})}};exports[_0x35ae[134]]= function(_0xb1d2x12,_0xb1d2x10,_0xb1d2x19){return SmsApplication[_0x35ae[136]](_0x35ae[104],{where:{SmsAccountId:_0xb1d2x12[_0x35ae[27]][_0x35ae[26]]}})[_0x35ae[20]](function(_0xb1d2x39){_0xb1d2x12[_0x35ae[57]][_0x35ae[104]]= _0xb1d2x39?++_0xb1d2x39:1;_0xb1d2x12[_0x35ae[57]][_0x35ae[59]]= _0xb1d2x12[_0x35ae[27]][_0x35ae[26]];return SmsApplication[_0x35ae[53]](_0xb1d2x12[_0x35ae[57]])})[_0x35ae[20]](function(_0xb1d2x2f){return _0xb1d2x10[_0x35ae[17]](201)[_0x35ae[16]](_0xb1d2x2f)})[_0x35ae[19]](function(_0xb1d2x11){console[_0x35ae[56]](_0x35ae[135],_0xb1d2x11);return handleError(_0xb1d2x10,_0xb1d2x11)})};exports[_0x35ae[137]]= function(_0xb1d2x12,_0xb1d2x10){if(_0xb1d2x12[_0x35ae[57]][_0x35ae[26]]){delete _0xb1d2x12[_0x35ae[57]][_0x35ae[26]]};return SmsApplication[_0x35ae[28]](_0xb1d2x12[_0x35ae[27]][_0x35ae[110]])[_0x35ae[20]](function(_0xb1d2x2f){if(!_0xb1d2x2f){return _0xb1d2x10[_0x35ae[25]](404)};var _0xb1d2x27=_[_0x35ae[49]](_0xb1d2x2f,_0xb1d2x12[_0x35ae[57]]);return _0xb1d2x27[_0x35ae[91]]()})[_0x35ae[20]](function(_0xb1d2x2f){return _0xb1d2x10[_0x35ae[17]](200)[_0x35ae[16]](_0xb1d2x2f)})[_0x35ae[19]](function(_0xb1d2x11){return handleError(_0xb1d2x10,_0xb1d2x11)})} \ No newline at end of file +/** + * 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 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'] + }] + })); + }) + .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); + }); +} diff --git a/server/api/sms_account/sms_account.events.js b/server/api/sms_account/sms_account.events.js index bf34ff9..932ef04 100644 --- a/server/api/sms_account/sms_account.events.js +++ b/server/api/sms_account/sms_account.events.js @@ -1 +1,36 @@ -var _0xea62=["\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"];_0xea62[0];const EventEmitter=require(_0xea62[1]);const SmsAccount=require(_0xea62[3])[_0xea62[2]];var SmsAccountEvents= new EventEmitter();SmsAccountEvents[_0xea62[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xea62[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xea62[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xea62[6]};for(var e in events){var event=events[e];SmsAccount[_0xea62[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xe692x8,_0xe692x9,_0xe692xa){SmsAccountEvents[_0xea62[10]](event+ _0xea62[8]+ _0xe692x8[_0xea62[9]],_0xe692x8);SmsAccountEvents[_0xea62[10]](event,_0xe692x8);_0xe692xa(null)}}module[_0xea62[11]]= SmsAccountEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/sms_account/sms_account.socket.js b/server/api/sms_account/sms_account.socket.js index db25009..4aa38a4 100644 --- a/server/api/sms_account/sms_account.socket.js +++ b/server/api/sms_account/sms_account.socket.js @@ -1 +1,32 @@ -var _0x4272=["\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"];_0x4272[0];const SmsAccountEvents=require(_0x4272[1]);var events=[_0x4272[2],_0x4272[3]];exports[_0x4272[4]]= function(_0xc53ax3){for(var _0xc53ax4=0,_0xc53ax5=events[_0x4272[5]];_0xc53ax4< _0xc53ax5;_0xc53ax4++){var _0xc53ax6=events[_0xc53ax4];var _0xc53ax7=createListener(_0x4272[6]+ _0xc53ax6,_0xc53ax3);SmsAccountEvents[_0x4272[7]](_0xc53ax6,_0xc53ax7);_0xc53ax3[_0x4272[7]](_0x4272[8],removeListener(_0xc53ax6,_0xc53ax7))}};function createListener(_0xc53ax6,_0xc53ax3){return function(_0xc53ax9){_0xc53ax3[_0x4272[9]](_0xc53ax6,_0xc53ax9)}}function removeListener(_0xc53ax6,_0xc53ax7){return function(){SmsAccountEvents[_0x4272[10]](_0xc53ax6,_0xc53ax7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/sms_application/index.js b/server/api/sms_application/index.js index 0501a15..fd4d4f1 100644 --- a/server/api/sms_application/index.js +++ b/server/api/sms_application/index.js @@ -1 +1,15 @@ -var _0xfb76=["\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"];_0xfb76[0];var express=require(_0xfb76[1]);var auth=require(_0xfb76[2]);var controller=require(_0xfb76[3]);var license=require(_0xfb76[4]);var router=express.Router();router[_0xfb76[11]](_0xfb76[5],auth[_0xfb76[6]](),license[_0xfb76[7]](),auth[_0xfb76[9]]([11],[_0xfb76[8]]),controller[_0xfb76[10]]);router[_0xfb76[11]](_0xfb76[12],auth[_0xfb76[6]](),license[_0xfb76[7]](),auth[_0xfb76[9]]([11],[_0xfb76[8]]),controller[_0xfb76[13]]);router[_0xfb76[15]](_0xfb76[5],auth[_0xfb76[6]](),license[_0xfb76[7]](),auth[_0xfb76[9]]([11],[_0xfb76[8]]),controller[_0xfb76[14]]);router[_0xfb76[17]](_0xfb76[12],auth[_0xfb76[6]](),license[_0xfb76[7]](),auth[_0xfb76[9]]([11],[_0xfb76[8]]),controller[_0xfb76[16]]);router[_0xfb76[19]](_0xfb76[12],auth[_0xfb76[6]](),license[_0xfb76[7]](),auth[_0xfb76[9]]([11],[_0xfb76[8]]),controller[_0xfb76[18]]);module[_0xfb76[20]]= router \ No newline at end of file +'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; diff --git a/server/api/sms_application/sms_application.controller.js b/server/api/sms_application/sms_application.controller.js index f772cd0..e1abd0b 100644 --- a/server/api/sms_application/sms_application.controller.js +++ b/server/api/sms_application/sms_application.controller.js @@ -1 +1,130 @@ -var _0x26f3=["\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"];_0x26f3[0];var _=require(_0x26f3[1]);var Util=require(_0x26f3[2]);var SmsApplication=require(_0x26f3[4])[_0x26f3[3]];function handleError(_0x9c14x5,_0x9c14x6){return _0x9c14x5[_0x26f3[6]](500)[_0x26f3[5]](_0x9c14x6)}exports[_0x26f3[7]]= function(_0x9c14x7,_0x9c14x5){return SmsApplication[_0x26f3[12]]({where:_0x9c14x7[_0x26f3[10]],order:_0x26f3[11],include:[{all:true}]})[_0x26f3[9]](function(_0x9c14x8){return _0x9c14x5[_0x26f3[6]](200)[_0x26f3[5]](_0x9c14x8)})[_0x26f3[8]](function(_0x9c14x6){return handleError(_0x9c14x5,_0x9c14x6)})};exports[_0x26f3[13]]= function(_0x9c14x7,_0x9c14x5){return SmsApplication[_0x26f3[17]](_0x9c14x7[_0x26f3[16]][_0x26f3[15]],{include:[{all:true}]})[_0x26f3[9]](function(_0x9c14x9){if(!_0x9c14x9){return _0x9c14x5[_0x26f3[14]](404)};return _0x9c14x5[_0x26f3[5]](_0x9c14x9)})[_0x26f3[8]](function(_0x9c14x6){return handleError(_0x9c14x5,_0x9c14x6)})};exports[_0x26f3[18]]= function(_0x9c14x7,_0x9c14x5){return SmsApplication[_0x26f3[21]](_0x26f3[11],{where:{SmsAccountId:_0x9c14x7[_0x26f3[19]][_0x26f3[20]]}})[_0x26f3[9]](function(_0x9c14xa){_0x9c14x7[_0x26f3[19]][_0x26f3[11]]= _0x9c14xa?++_0x9c14xa:1;return SmsApplication[_0x26f3[18]](_0x9c14x7[_0x26f3[19]])})[_0x26f3[9]](function(_0x9c14x9){return _0x9c14x5[_0x26f3[6]](201)[_0x26f3[5]](_0x9c14x9)})[_0x26f3[8]](function(_0x9c14x6){return handleError(_0x9c14x5,_0x9c14x6)})};exports[_0x26f3[22]]= function(_0x9c14x7,_0x9c14x5){if(_0x9c14x7[_0x26f3[19]][_0x26f3[15]]){delete _0x9c14x7[_0x26f3[19]][_0x26f3[15]]};return SmsApplication[_0x26f3[17]](_0x9c14x7[_0x26f3[16]][_0x26f3[15]])[_0x26f3[9]](function(_0x9c14x9){if(!_0x9c14x9){return _0x9c14x5[_0x26f3[14]](404)};var _0x9c14xb=_[_0x26f3[23]](_0x9c14x9,_0x9c14x7[_0x26f3[19]]);return _0x9c14xb[_0x26f3[24]]()})[_0x26f3[9]](function(_0x9c14x9){return _0x9c14x5[_0x26f3[6]](200)[_0x26f3[5]](_0x9c14x9)})[_0x26f3[8]](function(_0x9c14x6){return handleError(_0x9c14x5,_0x9c14x6)})};exports[_0x26f3[25]]= function(_0x9c14x7,_0x9c14x5){return SmsApplication[_0x26f3[17]](_0x9c14x7[_0x26f3[16]][_0x26f3[15]])[_0x26f3[9]](function(_0x9c14x9){if(!_0x9c14x9){return _0x9c14x5[_0x26f3[14]](404)};return _0x9c14x9[_0x26f3[25]]()})[_0x26f3[9]](function(){return _0x9c14x5[_0x26f3[14]](204)})[_0x26f3[8]](function(_0x9c14x6){return handleError(_0x9c14x5,_0x9c14x6)})} \ No newline at end of file +/** + * 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); + }); +} diff --git a/server/api/sms_application/sms_application.events.js b/server/api/sms_application/sms_application.events.js index a39aa8f..5d95d05 100644 --- a/server/api/sms_application/sms_application.events.js +++ b/server/api/sms_application/sms_application.events.js @@ -1 +1,36 @@ -var _0xd93f=["\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"];_0xd93f[0];const EventEmitter=require(_0xd93f[1]);const SmsApplication=require(_0xd93f[3])[_0xd93f[2]];var SmsApplicationEvents= new EventEmitter();SmsApplicationEvents[_0xd93f[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd93f[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd93f[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd93f[6]};for(var e in events){var event=events[e];SmsApplication[_0xd93f[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xa02ax8,_0xa02ax9,_0xa02axa){SmsApplicationEvents[_0xd93f[10]](event+ _0xd93f[8]+ _0xa02ax8[_0xd93f[9]],_0xa02ax8);SmsApplicationEvents[_0xd93f[10]](event,_0xa02ax8);_0xa02axa(null)}}module[_0xd93f[11]]= SmsApplicationEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/sms_application/sms_application.socket.js b/server/api/sms_application/sms_application.socket.js index 8033594..9926f52 100644 --- a/server/api/sms_application/sms_application.socket.js +++ b/server/api/sms_application/sms_application.socket.js @@ -1 +1,32 @@ -var _0xfb47=["\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"];_0xfb47[0];const SmsApplicationEvents=require(_0xfb47[1]);var events=[_0xfb47[2],_0xfb47[3]];exports[_0xfb47[4]]= function(_0xed4cx3){for(var _0xed4cx4=0,_0xed4cx5=events[_0xfb47[5]];_0xed4cx4< _0xed4cx5;_0xed4cx4++){var _0xed4cx6=events[_0xed4cx4];var _0xed4cx7=createListener(_0xfb47[6]+ _0xed4cx6,_0xed4cx3);SmsApplicationEvents[_0xfb47[7]](_0xed4cx6,_0xed4cx7);_0xed4cx3[_0xfb47[7]](_0xfb47[8],removeListener(_0xed4cx6,_0xed4cx7))}};function createListener(_0xed4cx6,_0xed4cx3){return function(_0xed4cx9){_0xed4cx3[_0xfb47[9]](_0xed4cx6,_0xed4cx9)}}function removeListener(_0xed4cx6,_0xed4cx7){return function(){SmsApplicationEvents[_0xfb47[10]](_0xed4cx6,_0xed4cx7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/sms_disposition/index.js b/server/api/sms_disposition/index.js index 8aae9bc..6e1022b 100644 --- a/server/api/sms_disposition/index.js +++ b/server/api/sms_disposition/index.js @@ -1 +1,16 @@ -var _0x7d58=["\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"];_0x7d58[0];var express=require(_0x7d58[1]);var controller=require(_0x7d58[2]);var auth=require(_0x7d58[3]);var router=express.Router();router[_0x7d58[7]](_0x7d58[4],auth[_0x7d58[5]](),controller[_0x7d58[6]]);router[_0x7d58[7]](_0x7d58[8],auth[_0x7d58[5]](),controller[_0x7d58[9]]);router[_0x7d58[11]](_0x7d58[4],auth[_0x7d58[5]](),controller[_0x7d58[10]]);router[_0x7d58[13]](_0x7d58[8],auth[_0x7d58[5]](),controller[_0x7d58[12]]);router[_0x7d58[14]](_0x7d58[8],auth[_0x7d58[5]](),controller[_0x7d58[12]]);router[_0x7d58[16]](_0x7d58[8],auth[_0x7d58[5]](),controller[_0x7d58[15]]);module[_0x7d58[17]]= router \ No newline at end of file +'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; diff --git a/server/api/sms_disposition/sms_disposition.controller.js b/server/api/sms_disposition/sms_disposition.controller.js index 3721001..066dd7e 100644 --- a/server/api/sms_disposition/sms_disposition.controller.js +++ b/server/api/sms_disposition/sms_disposition.controller.js @@ -1 +1,95 @@ -var _0xd2be=["\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"];_0xd2be[0];var _=require(_0xd2be[1]);var SmsDisposition=require(_0xd2be[3])[_0xd2be[2]];function handleError(_0xf0bex4,_0xf0bex5){_0xf0bex5= _0xf0bex5|| 500;return function(_0xf0bex6){_0xf0bex4[_0xd2be[5]](_0xf0bex5)[_0xd2be[4]](_0xf0bex6)}}function responseWithResult(_0xf0bex4,_0xf0bex5){_0xf0bex5= _0xf0bex5|| 200;return function(_0xf0bex8){if(_0xf0bex8){_0xf0bex4[_0xd2be[5]](_0xf0bex5)[_0xd2be[6]](_0xf0bex8)}}}function handleEntityNotFound(_0xf0bex4){return function(_0xf0bex8){if(!_0xf0bex8){_0xf0bex4[_0xd2be[5]](404)[_0xd2be[7]]();return null};return _0xf0bex8}}function saveUpdates(_0xf0bexb){return function(_0xf0bex8){return _0xf0bex8[_0xd2be[9]](_0xf0bexb)[_0xd2be[8]](function(_0xf0bexc){return _0xf0bexc})}}function removeEntity(_0xf0bex4){return function(_0xf0bex8){if(_0xf0bex8){return _0xf0bex8[_0xd2be[10]]()[_0xd2be[8]](function(){_0xf0bex4[_0xd2be[5]](204)[_0xd2be[7]]()})}}}exports[_0xd2be[11]]= function(_0xf0bexe,_0xf0bex4){SmsDisposition[_0xd2be[13]]()[_0xd2be[8]](responseWithResult(_0xf0bex4))[_0xd2be[12]](handleError(_0xf0bex4))};exports[_0xd2be[14]]= function(_0xf0bexe,_0xf0bex4){SmsDisposition[_0xd2be[17]](_0xf0bexe[_0xd2be[16]][_0xd2be[15]])[_0xd2be[8]](handleEntityNotFound(_0xf0bex4))[_0xd2be[8]](responseWithResult(_0xf0bex4))[_0xd2be[12]](handleError(_0xf0bex4))};exports[_0xd2be[18]]= function(_0xf0bexe,_0xf0bex4){SmsDisposition[_0xd2be[18]](_0xf0bexe[_0xd2be[19]])[_0xd2be[8]](responseWithResult(_0xf0bex4,201))[_0xd2be[12]](handleError(_0xf0bex4))};exports[_0xd2be[20]]= function(_0xf0bexe,_0xf0bex4){if(_0xf0bexe[_0xd2be[19]][_0xd2be[15]]){delete _0xf0bexe[_0xd2be[19]][_0xd2be[15]]};SmsDisposition[_0xd2be[17]](_0xf0bexe[_0xd2be[16]][_0xd2be[15]])[_0xd2be[8]](handleEntityNotFound(_0xf0bex4))[_0xd2be[8]](saveUpdates(_0xf0bexe[_0xd2be[19]]))[_0xd2be[8]](responseWithResult(_0xf0bex4))[_0xd2be[12]](handleError(_0xf0bex4))};exports[_0xd2be[10]]= function(_0xf0bexe,_0xf0bex4){SmsDisposition[_0xd2be[17]](_0xf0bexe[_0xd2be[16]][_0xd2be[15]])[_0xd2be[8]](handleEntityNotFound(_0xf0bex4))[_0xd2be[8]](removeEntity(_0xf0bex4))[_0xd2be[12]](handleError(_0xf0bex4))} \ No newline at end of file +'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)); +} diff --git a/server/api/sms_disposition/sms_disposition.events.js b/server/api/sms_disposition/sms_disposition.events.js index b1c4c92..5f2d801 100644 --- a/server/api/sms_disposition/sms_disposition.events.js +++ b/server/api/sms_disposition/sms_disposition.events.js @@ -1 +1,36 @@ -var _0xb108=["\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"];_0xb108[0];const EventEmitter=require(_0xb108[1]);const SmsDisposition=require(_0xb108[3])[_0xb108[2]];var SmsDispositionEvents= new EventEmitter();SmsDispositionEvents[_0xb108[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xb108[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xb108[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xb108[6]};for(var e in events){var event=events[e];SmsDisposition[_0xb108[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xca67x8,_0xca67x9,_0xca67xa){SmsDispositionEvents[_0xb108[10]](event+ _0xb108[8]+ _0xca67x8[_0xb108[9]],_0xca67x8);SmsDispositionEvents[_0xb108[10]](event,_0xca67x8);_0xca67xa(null)}}module[_0xb108[11]]= SmsDispositionEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/sms_disposition/sms_disposition.socket.js b/server/api/sms_disposition/sms_disposition.socket.js index 99487ff..577c85f 100644 --- a/server/api/sms_disposition/sms_disposition.socket.js +++ b/server/api/sms_disposition/sms_disposition.socket.js @@ -1 +1,32 @@ -var _0xf6a9=["\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"];_0xf6a9[0];const SmsDispositionEvents=require(_0xf6a9[1]);var events=[_0xf6a9[2],_0xf6a9[3]];exports[_0xf6a9[4]]= function(_0xb3e7x3){for(var _0xb3e7x4=0,_0xb3e7x5=events[_0xf6a9[5]];_0xb3e7x4< _0xb3e7x5;_0xb3e7x4++){var _0xb3e7x6=events[_0xb3e7x4];var _0xb3e7x7=createListener(_0xf6a9[6]+ _0xb3e7x6,_0xb3e7x3);SmsDispositionEvents[_0xf6a9[7]](_0xb3e7x6,_0xb3e7x7);_0xb3e7x3[_0xf6a9[7]](_0xf6a9[8],removeListener(_0xb3e7x6,_0xb3e7x7))}};function createListener(_0xb3e7x6,_0xb3e7x3){return function(_0xb3e7x9){_0xb3e7x3[_0xf6a9[9]](_0xb3e7x6,_0xb3e7x9)}}function removeListener(_0xb3e7x6,_0xb3e7x7){return function(){SmsDispositionEvents[_0xf6a9[10]](_0xb3e7x6,_0xb3e7x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/sms_message/index.js b/server/api/sms_message/index.js index 271f262..5c0b3d0 100644 --- a/server/api/sms_message/index.js +++ b/server/api/sms_message/index.js @@ -1 +1,18 @@ -var _0x3685=["\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"];_0x3685[0];var express=require(_0x3685[1]);var auth=require(_0x3685[2]);var controller=require(_0x3685[3]);var license=require(_0x3685[4]);var router=express.Router();router[_0x3685[11]](_0x3685[5],auth[_0x3685[6]](),license[_0x3685[7]](),auth[_0x3685[9]]([11],[_0x3685[8]]),controller[_0x3685[10]]);router[_0x3685[11]](_0x3685[12],auth[_0x3685[6]](),license[_0x3685[7]](),auth[_0x3685[9]]([11],[_0x3685[8]]),controller[_0x3685[13]]);router[_0x3685[11]](_0x3685[14],auth[_0x3685[6]](),license[_0x3685[7]](),auth[_0x3685[9]]([11],[_0x3685[8],_0x3685[15]]),controller[_0x3685[16]]);router[_0x3685[18]](_0x3685[5],auth[_0x3685[6]](),license[_0x3685[7]](),auth[_0x3685[9]]([11],[_0x3685[8]]),controller[_0x3685[17]]);router[_0x3685[20]](_0x3685[14],auth[_0x3685[6]](),license[_0x3685[7]](),auth[_0x3685[9]]([11],[_0x3685[8]]),controller[_0x3685[19]]);router[_0x3685[22]](_0x3685[14],auth[_0x3685[6]](),license[_0x3685[7]](),auth[_0x3685[9]]([11],[_0x3685[8]]),controller[_0x3685[21]]);router[_0x3685[22]](_0x3685[5],auth[_0x3685[6]](),license[_0x3685[7]](),auth[_0x3685[9]]([11],[_0x3685[8]]),controller[_0x3685[23]]);module[_0x3685[24]]= router \ No newline at end of file +'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; diff --git a/server/api/sms_message/sms_message.controller.js b/server/api/sms_message/sms_message.controller.js index 228de8c..d1dd899 100644 --- a/server/api/sms_message/sms_message.controller.js +++ b/server/api/sms_message/sms_message.controller.js @@ -1 +1,170 @@ -var _0xa0df=["\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"];_0xa0df[0];var _=require(_0xa0df[1]);var Util=require(_0xa0df[2]);var SmsMessage=require(_0xa0df[4])[_0xa0df[3]];var SmsRoom=require(_0xa0df[4])[_0xa0df[5]];var User=require(_0xa0df[4])[_0xa0df[6]];function handleError(_0x1faax7,_0x1faax8){return _0x1faax7[_0xa0df[8]](500)[_0xa0df[7]](_0x1faax8)}exports[_0xa0df[9]]= function(_0x1faax9,_0x1faax7){var _0x1faaxa={order:_0xa0df[10],include:[{all:true,include:[{all:true}]}]};switch(_0x1faax9[_0xa0df[16]][_0xa0df[15]]){case _0xa0df[13]:_0x1faaxa[_0xa0df[11]]= _0x1faax9[_0xa0df[12]];break;case _0xa0df[14]:break;default:};return SmsMessage[_0xa0df[19]](_0x1faaxa)[_0xa0df[18]](function(_0x1faaxb){return _0x1faax7[_0xa0df[8]](200)[_0xa0df[7]](_0x1faaxb)})[_0xa0df[17]](function(_0x1faax8){return handleError(_0x1faax7,_0x1faax8)})};exports[_0xa0df[20]]= function(_0x1faax9,_0x1faax7){return SmsMessage[_0xa0df[20]]()[_0xa0df[18]](function(_0x1faaxc){return _0x1faax7[_0xa0df[8]](200)[_0xa0df[7]](_0x1faaxc)})[_0xa0df[17]](function(_0x1faax8){return handleError(_0x1faax7,_0x1faax8)})};exports[_0xa0df[21]]= function(_0x1faax9,_0x1faax7){return SmsMessage[_0xa0df[28]](_0x1faax9[_0xa0df[24]][_0xa0df[23]],{include:[{model:User,attributes:[_0xa0df[23],_0xa0df[25],_0xa0df[26],_0xa0df[27]]}]})[_0xa0df[18]](function(_0x1faaxd){if(!_0x1faaxd){return _0x1faax7[_0xa0df[22]](404)};return _0x1faax7[_0xa0df[7]](_0x1faaxd)})[_0xa0df[17]](function(_0x1faax8){return handleError(_0x1faax7,_0x1faax8)})};exports[_0xa0df[29]]= function(_0x1faax9,_0x1faax7){_0x1faax9[_0xa0df[31]][_0xa0df[30]]= _0x1faax9[_0xa0df[16]][_0xa0df[23]];return SmsMessage[_0xa0df[29]](_0x1faax9[_0xa0df[31]])[_0xa0df[18]](function(_0x1faaxd){return _0x1faax7[_0xa0df[8]](201)[_0xa0df[7]](_0x1faaxd)})[_0xa0df[17]](function(_0x1faax8){return handleError(_0x1faax7,_0x1faax8)})};exports[_0xa0df[32]]= function(_0x1faax9,_0x1faax7){if(_0x1faax9[_0xa0df[31]][_0xa0df[23]]){delete _0x1faax9[_0xa0df[31]][_0xa0df[23]]};return SmsMessage[_0xa0df[28]](_0x1faax9[_0xa0df[24]][_0xa0df[23]],{include:[{all:true}]})[_0xa0df[18]](function(_0x1faaxd){if(!_0x1faaxd){return _0x1faax7[_0xa0df[22]](404)};var _0x1faaxe=_[_0xa0df[33]](_0x1faaxd,_0x1faax9[_0xa0df[31]]);return _0x1faaxe[_0xa0df[34]]()})[_0xa0df[18]](function(_0x1faaxe){return _0x1faax7[_0xa0df[8]](200)[_0xa0df[7]](_0x1faaxe)})[_0xa0df[17]](function(_0x1faax8){return handleError(_0x1faax7,_0x1faax8)})};exports[_0xa0df[35]]= function(_0x1faax9,_0x1faax7){return SmsMessage[_0xa0df[28]](_0x1faax9[_0xa0df[24]][_0xa0df[23]])[_0xa0df[18]](function(_0x1faaxd){if(!_0x1faaxd){return _0x1faax7[_0xa0df[22]](404)};return _0x1faaxd[_0xa0df[35]]()})[_0xa0df[18]](function(){return _0x1faax7[_0xa0df[22]](204)})[_0xa0df[17]](function(_0x1faax8){return handleError(_0x1faax7,_0x1faax8)})};exports[_0xa0df[36]]= function(_0x1faax9,_0x1faax7){return SmsMessage[_0xa0df[38]]({where:{id:{$in:_0x1faax9[_0xa0df[31]][_0xa0df[23]]}},attributes:{directory:_0xa0df[37]}})[_0xa0df[18]](function(_0x1faaxd){if(!_0x1faaxd){return _0x1faax7[_0xa0df[22]](404)};return _0x1faaxd[_0xa0df[35]]()})[_0xa0df[18]](function(){return _0x1faax7[_0xa0df[22]](204)})[_0xa0df[17]](function(_0x1faax8){return handleError(_0x1faax7,_0x1faax8)})} \ No newline at end of file +/** + * 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); + }); +}; diff --git a/server/api/sms_message/sms_message.events.js b/server/api/sms_message/sms_message.events.js index 00fee92..21dd796 100644 --- a/server/api/sms_message/sms_message.events.js +++ b/server/api/sms_message/sms_message.events.js @@ -1 +1,36 @@ -var _0x9e2d=["\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"];_0x9e2d[0];const EventEmitter=require(_0x9e2d[1]);const SmsMessage=require(_0x9e2d[3])[_0x9e2d[2]];var SmsMessageEvents= new EventEmitter();SmsMessageEvents[_0x9e2d[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x9e2d[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x9e2d[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x9e2d[7]};for(var e in events){var event=events[e];SmsMessage[_0x9e2d[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x9f76x8,_0x9f76x9,_0x9f76xa){SmsMessageEvents[_0x9e2d[11]](event+ _0x9e2d[9]+ _0x9f76x8[_0x9e2d[10]],_0x9f76x8);SmsMessageEvents[_0x9e2d[11]](event,_0x9f76x8);_0x9f76xa(null)}}module[_0x9e2d[12]]= SmsMessageEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/sms_message/sms_message.socket.js b/server/api/sms_message/sms_message.socket.js index cc426da..70931c8 100644 --- a/server/api/sms_message/sms_message.socket.js +++ b/server/api/sms_message/sms_message.socket.js @@ -1 +1,47 @@ -var _0x49ad=["\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"];_0x49ad[0];const SmsMessageEvents=require(_0x49ad[1]);var events=[_0x49ad[2],_0x49ad[3],_0x49ad[4]];exports[_0x49ad[5]]= function(_0x25d0x3){for(var _0x25d0x4=0,_0x25d0x5=events[_0x49ad[6]];_0x25d0x4< _0x25d0x5;_0x25d0x4++){var _0x25d0x6=events[_0x25d0x4];var _0x25d0x7=createListener(_0x49ad[7]+ _0x25d0x6,_0x25d0x3);SmsMessageEvents[_0x49ad[8]](_0x25d0x6,_0x25d0x7);_0x25d0x3[_0x49ad[8]](_0x49ad[9],removeListener(_0x25d0x6,_0x25d0x7))}};function createListener(_0x25d0x6,_0x25d0x3){return function(_0x25d0x9){switch(_0x25d0x6){case _0x49ad[11]:_0x25d0x3[_0x49ad[10]](_0x25d0x6,_0x25d0x9);break;case _0x49ad[14]:if(_0x25d0x9[_0x49ad[13]](_0x49ad[12])){_0x25d0x3[_0x49ad[10]](_0x25d0x6,_0x25d0x9)};break;case _0x49ad[15]:_0x25d0x3[_0x49ad[10]](_0x25d0x6,_0x25d0x9);break;default:}}}function removeListener(_0x25d0x6,_0x25d0x7){return function(){SmsMessageEvents[_0x49ad[16]](_0x25d0x6,_0x25d0x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/sms_queue/index.js b/server/api/sms_queue/index.js index 3689854..6c638b3 100644 --- a/server/api/sms_queue/index.js +++ b/server/api/sms_queue/index.js @@ -1 +1,21 @@ -var _0xa5ff=["\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\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","\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"];_0xa5ff[0];var express=require(_0xa5ff[1]);var auth=require(_0xa5ff[2]);var controller=require(_0xa5ff[3]);var license=require(_0xa5ff[4]);var router=express.Router();router[_0xa5ff[11]](_0xa5ff[5],auth[_0xa5ff[6]](),license[_0xa5ff[7]](),auth[_0xa5ff[9]]([11],[_0xa5ff[8]]),controller[_0xa5ff[10]]);router[_0xa5ff[11]](_0xa5ff[12],auth[_0xa5ff[6]](),license[_0xa5ff[7]](),auth[_0xa5ff[9]]([11],[_0xa5ff[8]]),controller[_0xa5ff[13]]);router[_0xa5ff[11]](_0xa5ff[14],auth[_0xa5ff[6]](),license[_0xa5ff[7]](),auth[_0xa5ff[9]]([11],[_0xa5ff[8]]),controller[_0xa5ff[15]]);router[_0xa5ff[17]](_0xa5ff[5],auth[_0xa5ff[6]](),license[_0xa5ff[7]](),auth[_0xa5ff[9]]([11],[_0xa5ff[8]]),controller[_0xa5ff[16]]);router[_0xa5ff[17]](_0xa5ff[14],auth[_0xa5ff[6]](),license[_0xa5ff[7]](),auth[_0xa5ff[9]]([11],[_0xa5ff[8]]),controller[_0xa5ff[18]]);router[_0xa5ff[20]](_0xa5ff[12],auth[_0xa5ff[6]](),license[_0xa5ff[7]](),auth[_0xa5ff[9]]([11],[_0xa5ff[8]]),controller[_0xa5ff[19]]);router[_0xa5ff[21]](_0xa5ff[12],auth[_0xa5ff[6]](),license[_0xa5ff[7]](),auth[_0xa5ff[9]]([11],[_0xa5ff[8]]),controller[_0xa5ff[19]]);router[_0xa5ff[23]](_0xa5ff[12],auth[_0xa5ff[6]](),license[_0xa5ff[7]](),auth[_0xa5ff[9]]([11],[_0xa5ff[8]]),controller[_0xa5ff[22]]);router[_0xa5ff[23]](_0xa5ff[14],auth[_0xa5ff[6]](),license[_0xa5ff[7]](),auth[_0xa5ff[9]]([11],[_0xa5ff[8]]),controller[_0xa5ff[24]]);router[_0xa5ff[23]](_0xa5ff[5],auth[_0xa5ff[6]](),license[_0xa5ff[7]](),auth[_0xa5ff[9]]([11],[_0xa5ff[8]]),controller[_0xa5ff[25]]);module[_0xa5ff[26]]= router \ No newline at end of file +'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('/', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.index); +router.get('/:id', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.show); +router.get('/:id/agents', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.showAgents); +router.post('/', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.create); +router.post('/:id/agents', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.addAgents); +router.put('/:id', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.update); +router.patch('/: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('/:id/agents', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.removeAgents); +router.delete('/', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.bulkDestroy); + +module.exports = router; diff --git a/server/api/sms_queue/sms_queue.controller.js b/server/api/sms_queue/sms_queue.controller.js index 8a9f4fb..da0bf5b 100644 --- a/server/api/sms_queue/sms_queue.controller.js +++ b/server/api/sms_queue/sms_queue.controller.js @@ -1 +1,242 @@ -var _0x115b=["\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"];_0x115b[0];var _=require(_0x115b[1]);var Util=require(_0x115b[2]);var SmsQueue=require(_0x115b[4])[_0x115b[3]];var User=require(_0x115b[4])[_0x115b[5]];var sequelize=require(_0x115b[4])[_0x115b[6]];var UserHasSmsQueue=require(_0x115b[4])[_0x115b[7]];function handleError(_0x805cx8,_0x805cx9){return _0x805cx8[_0x115b[9]](500)[_0x115b[8]](_0x805cx9)}exports[_0x115b[10]]= function(_0x805cxa,_0x805cx8){switch(_0x805cxa[_0x115b[16]][_0x115b[22]]){case _0x115b[16]:return User[_0x115b[17]](_0x805cxa[_0x115b[16]][_0x115b[15]],{attributes:[_0x115b[15]]})[_0x115b[12]](Util[_0x115b[14]](_0x805cxa[_0x115b[13]]))[_0x115b[12]](function(_0x805cxb){_0x805cx8[_0x115b[9]](200)[_0x115b[8]](_0x805cxb)})[_0x115b[11]](function(_0x805cx9){return handleError(_0x805cx8,_0x805cx9)});default:return SmsQueue[_0x115b[21]](_0x115b[20])[_0x115b[19]](Util[_0x115b[18]](_0x805cxa[_0x115b[13]]))[_0x115b[12]](function(_0x805cxb){_0x805cx8[_0x115b[9]](200)[_0x115b[8]](_0x805cxb)})[_0x115b[11]](function(_0x805cx9){return handleError(_0x805cx8,_0x805cx9)})}};exports[_0x115b[23]]= function(_0x805cxa,_0x805cx8){return SmsQueue[_0x115b[21]](_0x115b[20])[_0x115b[17]](_0x805cxa[_0x115b[25]][_0x115b[15]])[_0x115b[12]](function(_0x805cxc){if(!_0x805cxc){return _0x805cx8[_0x115b[24]](404)};return _0x805cx8[_0x115b[8]](_0x805cxc)})[_0x115b[11]](function(_0x805cx9){return handleError(_0x805cx8,_0x805cx9)})};exports[_0x115b[26]]= function(_0x805cxa,_0x805cx8){return SmsQueue[_0x115b[17]](_0x805cxa[_0x115b[25]][_0x115b[15]])[_0x115b[12]](function(_0x805cxe){if(!_0x805cxe){return _0x805cx8[_0x115b[24]](404)};return _0x805cxe[_0x115b[32]]({where:{role:_0x115b[28]},attributes:[_0x115b[15],_0x115b[29],_0x115b[30],_0x115b[31]]})})[_0x115b[12]](function(_0x805cxd){return _0x805cx8[_0x115b[9]](200)[_0x115b[8]]({rows:_0x805cxd,count:_0x805cxd[_0x115b[27]]})})[_0x115b[11]](function(_0x805cx9){return handleError(_0x805cx8,_0x805cx9)})};exports[_0x115b[33]]= function(_0x805cxa,_0x805cx8){var _0x805cxf;return SmsQueue[_0x115b[33]](_0x805cxa[_0x115b[37]])[_0x115b[12]](function(_0x805cxc){_0x805cxf= _0x805cxc;if(_0x805cxa[_0x115b[37]][_0x115b[36]]){return _0x805cxf[_0x115b[39]](_0x805cxa[_0x115b[37]][_0x115b[36]],{penalty:_0x805cxa[_0x115b[37]][_0x115b[38]]|| 0,queue:_0x805cxf[_0x115b[29]]})}})[_0x115b[12]](function(){return _0x805cx8[_0x115b[9]](201)[_0x115b[8]](_0x805cxf)})[_0x115b[11]](sequelize.UniqueConstraintError,function(_0x805cx9){return Util[_0x115b[35]][_0x115b[34]](_0x805cx8,_0x805cx9)})[_0x115b[11]](function(_0x805cx9){return handleError(_0x805cx8,_0x805cx9)})};exports[_0x115b[40]]= function(_0x805cxa,_0x805cx8){if(_0x805cxa[_0x115b[37]][_0x115b[15]]){delete _0x805cxa[_0x115b[37]][_0x115b[15]]};return SmsQueue[_0x115b[17]](_0x805cxa[_0x115b[25]][_0x115b[15]])[_0x115b[12]](function(_0x805cxc){if(!_0x805cxc){return _0x805cx8[_0x115b[24]](404)};var _0x805cx10=_[_0x115b[41]](_0x805cxc,_0x805cxa[_0x115b[37]]);return _0x805cx10[_0x115b[42]]()})[_0x115b[12]](function(_0x805cxc){return _0x805cx8[_0x115b[9]](200)[_0x115b[8]](_0x805cxc)})[_0x115b[11]](sequelize.UniqueConstraintError,function(_0x805cx9){return Util[_0x115b[35]][_0x115b[34]](_0x805cx8,_0x805cx9)})[_0x115b[11]](function(_0x805cx9){return handleError(_0x805cx8,_0x805cx9)})};exports[_0x115b[43]]= function(_0x805cxa,_0x805cx8,_0x805cx11){return SmsQueue[_0x115b[17]](_0x805cxa[_0x115b[25]][_0x115b[15]])[_0x115b[12]](function(_0x805cxc){if(!_0x805cxc){return _0x805cx8[_0x115b[24]](404)};var _0x805cx12=_[_0x115b[44]](_0x805cxa[_0x115b[37]][_0x115b[36]],function(_0x805cx13){return {UserId:_0x805cx13,penalty:_0x805cxa[_0x115b[37]][_0x115b[38]],SmsQueueId:_0x805cxc[_0x115b[15]],queue:_0x805cxc[_0x115b[29]]}});return UserHasSmsQueue[_0x115b[45]](_0x805cx12,{individualHooks:true})})[_0x115b[12]](function(){return _0x805cx8[_0x115b[24]](200)})[_0x115b[11]](function(_0x805cx9){return handleError(_0x805cx8,_0x805cx9)})};exports[_0x115b[46]]= function(_0x805cxa,_0x805cx8){return SmsQueue[_0x115b[17]](_0x805cxa[_0x115b[25]][_0x115b[15]])[_0x115b[12]](function(_0x805cxc){if(_0x805cxc){return _0x805cxc[_0x115b[47]](_0x805cxa[_0x115b[13]][_0x115b[36]],{individualHooks:true})}else {throw new Error(_0x115b[48])}})[_0x115b[12]](function(){return _0x805cx8[_0x115b[24]](202)})[_0x115b[11]](function(_0x805cx9){return handleError(_0x805cx8,_0x805cx9)})};exports[_0x115b[49]]= function(_0x805cxa,_0x805cx8){var _0x805cxf;return SmsQueue[_0x115b[17]](_0x805cxa[_0x115b[25]][_0x115b[15]])[_0x115b[12]](function(_0x805cxc){_0x805cxf= _0x805cxc;if(!_0x805cxc){return _0x805cx8[_0x115b[24]](404)};return _0x805cxc[_0x115b[49]]()})[_0x115b[12]](function(){return _0x805cx8[_0x115b[24]](204)})[_0x115b[11]](sequelize.ForeignKeyConstraintError,function(_0x805cx9){return Util[_0x115b[35]][_0x115b[53]](_0x805cx8,_0x115b[52],_0x805cxf[_0x115b[29]],_0x805cx9)})[_0x115b[11]](function(_0x805cx9){console[_0x115b[51]](_0x115b[50],_0x805cx9);return handleError(_0x805cx8,_0x805cx9)})};exports[_0x115b[54]]= function(_0x805cxa,_0x805cx8){return SmsQueue[_0x115b[49]]({where:{id:_0x805cxa[_0x115b[13]][_0x115b[55]]},individualHooks:true})[_0x115b[12]](function(){return _0x805cx8[_0x115b[24]](204)})[_0x115b[11]](function(_0x805cx9){return handleError(_0x805cx8,_0x805cx9)})} \ No newline at end of file +/** + * 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); + }); +}; diff --git a/server/api/sms_queue/sms_queue.events.js b/server/api/sms_queue/sms_queue.events.js index 044e144..31beb9a 100644 --- a/server/api/sms_queue/sms_queue.events.js +++ b/server/api/sms_queue/sms_queue.events.js @@ -1 +1,36 @@ -var _0x2bab=["\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"];_0x2bab[0];const EventEmitter=require(_0x2bab[1]);const SmsQueue=require(_0x2bab[3])[_0x2bab[2]];var SmsQueueEvents= new EventEmitter();SmsQueueEvents[_0x2bab[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x2bab[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x2bab[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x2bab[6]};for(var e in events){var event=events[e];SmsQueue[_0x2bab[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x8a9bx8,_0x8a9bx9,_0x8a9bxa){SmsQueueEvents[_0x2bab[10]](event+ _0x2bab[8]+ _0x8a9bx8[_0x2bab[9]],_0x8a9bx8);SmsQueueEvents[_0x2bab[10]](event,_0x8a9bx8);_0x8a9bxa(null)}}module[_0x2bab[11]]= SmsQueueEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/sms_queue/sms_queue.socket.js b/server/api/sms_queue/sms_queue.socket.js index e74d809..2c6c4f1 100644 --- a/server/api/sms_queue/sms_queue.socket.js +++ b/server/api/sms_queue/sms_queue.socket.js @@ -1 +1,32 @@ -var _0xfcde=["\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"];_0xfcde[0];const SmsQueueEvents=require(_0xfcde[1]);var events=[_0xfcde[2],_0xfcde[3]];exports[_0xfcde[4]]= function(_0x53bax3){for(var _0x53bax4=0,_0x53bax5=events[_0xfcde[5]];_0x53bax4< _0x53bax5;_0x53bax4++){var _0x53bax6=events[_0x53bax4];var _0x53bax7=createListener(_0xfcde[6]+ _0x53bax6,_0x53bax3);SmsQueueEvents[_0xfcde[7]](_0x53bax6,_0x53bax7);_0x53bax3[_0xfcde[7]](_0xfcde[8],removeListener(_0x53bax6,_0x53bax7))}};function createListener(_0x53bax6,_0x53bax3){return function(_0x53bax9){_0x53bax3[_0xfcde[9]](_0x53bax6,_0x53bax9)}}function removeListener(_0x53bax6,_0x53bax7){return function(){SmsQueueEvents[_0xfcde[10]](_0x53bax6,_0x53bax7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/sms_room/index.js b/server/api/sms_room/index.js index 150db32..429772f 100644 --- a/server/api/sms_room/index.js +++ b/server/api/sms_room/index.js @@ -1 +1,26 @@ -var _0x1276=["\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"];_0x1276[0];var express=require(_0x1276[1]);var auth=require(_0x1276[2]);var controller=require(_0x1276[3]);var license=require(_0x1276[4]);var router=express.Router();router[_0x1276[13]](_0x1276[5],license[_0x1276[6]](),license[_0x1276[7]](),auth[_0x1276[8]](),auth[_0x1276[11]]([11],[_0x1276[9],_0x1276[10]]),controller[_0x1276[12]]);router[_0x1276[13]](_0x1276[14],auth[_0x1276[8]](),license[_0x1276[6]](),license[_0x1276[7]](),auth[_0x1276[11]]([1,11],[_0x1276[9]]),controller[_0x1276[15]]);router[_0x1276[13]](_0x1276[16],auth[_0x1276[8]](),license[_0x1276[6]](),license[_0x1276[7]](),auth[_0x1276[11]]([11,17],[_0x1276[9]]),controller[_0x1276[17]]);router[_0x1276[13]](_0x1276[18],auth[_0x1276[8]](),license[_0x1276[6]](),license[_0x1276[7]](),auth[_0x1276[11]]([11,17],[_0x1276[9]]),controller[_0x1276[19]]);router[_0x1276[13]](_0x1276[20],auth[_0x1276[8]](),license[_0x1276[6]](),license[_0x1276[7]](),auth[_0x1276[11]]([11,17],[_0x1276[9]]),controller[_0x1276[21]]);router[_0x1276[13]](_0x1276[22],auth[_0x1276[8]](),license[_0x1276[6]](),license[_0x1276[7]](),auth[_0x1276[11]]([11,17],[_0x1276[9]]),controller[_0x1276[23]]);router[_0x1276[13]](_0x1276[24],license[_0x1276[6]](),license[_0x1276[7]](),auth[_0x1276[8]](),auth[_0x1276[11]]([11],[_0x1276[9],_0x1276[10]]),controller[_0x1276[25]]);router[_0x1276[13]](_0x1276[26],license[_0x1276[6]](),license[_0x1276[7]](),auth[_0x1276[8]](),auth[_0x1276[11]]([11],[_0x1276[9],_0x1276[10]]),controller[_0x1276[27]]);router[_0x1276[13]](_0x1276[28],license[_0x1276[6]](),license[_0x1276[7]](),auth[_0x1276[8]](),auth[_0x1276[11]]([11],[_0x1276[9],_0x1276[10]]),controller[_0x1276[29]]);router[_0x1276[31]](_0x1276[5],license[_0x1276[6]](),license[_0x1276[7]](),auth[_0x1276[8]](),auth[_0x1276[11]]([11],[_0x1276[9]]),controller[_0x1276[30]]);router[_0x1276[31]](_0x1276[32],license[_0x1276[6]](),license[_0x1276[7]](),auth[_0x1276[8]](),auth[_0x1276[11]]([11],[_0x1276[9]]),controller[_0x1276[33]]);router[_0x1276[35]](_0x1276[24],license[_0x1276[6]](),license[_0x1276[7]](),auth[_0x1276[8]](),auth[_0x1276[11]]([11],[_0x1276[9],_0x1276[10]]),controller[_0x1276[34]]);router[_0x1276[35]](_0x1276[26],license[_0x1276[6]](),license[_0x1276[7]](),auth[_0x1276[8]](),auth[_0x1276[11]]([11],[_0x1276[9],_0x1276[10]]),controller[_0x1276[36]]);router[_0x1276[38]](_0x1276[24],license[_0x1276[6]](),license[_0x1276[7]](),auth[_0x1276[8]](),auth[_0x1276[11]]([11],[_0x1276[9],_0x1276[10]]),controller[_0x1276[37]]);router[_0x1276[40]](_0x1276[24],license[_0x1276[6]](),license[_0x1276[7]](),auth[_0x1276[8]](),auth[_0x1276[11]]([11],[_0x1276[9]]),controller[_0x1276[39]]);router[_0x1276[40]](_0x1276[5],license[_0x1276[6]](),license[_0x1276[7]](),auth[_0x1276[8]](),auth[_0x1276[11]]([11],[_0x1276[9]]),controller[_0x1276[41]]);module[_0x1276[42]]= router \ No newline at end of file +'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; diff --git a/server/api/sms_room/sms_room.controller.js b/server/api/sms_room/sms_room.controller.js index 5d409ec..e3946f0 100644 --- a/server/api/sms_room/sms_room.controller.js +++ b/server/api/sms_room/sms_room.controller.js @@ -1 +1,399 @@ -var _0x9eaf=["\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"];_0x9eaf[0];var _=require(_0x9eaf[1]);var Util=require(_0x9eaf[2]);var moment=require(_0x9eaf[3]);var SmsRoom=require(_0x9eaf[5])[_0x9eaf[4]];var User=require(_0x9eaf[5])[_0x9eaf[6]];var SmsMessage=require(_0x9eaf[5])[_0x9eaf[7]];var SmsAccount=require(_0x9eaf[5])[_0x9eaf[8]];var User=require(_0x9eaf[5])[_0x9eaf[6]];var SmsApplication=require(_0x9eaf[5])[_0x9eaf[9]];var SmsQueue=require(_0x9eaf[5])[_0x9eaf[10]];function handleError(_0xbf3dxb,_0xbf3dxc){return _0xbf3dxb[_0x9eaf[12]](500)[_0x9eaf[11]](_0xbf3dxc)}exports[_0x9eaf[13]]= function(_0xbf3dxd,_0xbf3dxb){switch(_0xbf3dxd[_0x9eaf[22]][_0x9eaf[24]]){case _0x9eaf[20]:return SmsRoom[_0x9eaf[23]](_0x9eaf[19],{method:[_0x9eaf[20],_0xbf3dxd[_0x9eaf[22]][_0x9eaf[21]]]})[_0x9eaf[18]](Util[_0x9eaf[17]](_0xbf3dxd[_0x9eaf[16]]))[_0x9eaf[15]](function(_0xbf3dxe){return _0xbf3dxb[_0x9eaf[12]](200)[_0x9eaf[11]](_0xbf3dxe)})[_0x9eaf[14]](function(_0xbf3dxc){return handleError(_0xbf3dxb,_0xbf3dxc)});default:return SmsRoom[_0x9eaf[23]](_0x9eaf[19])[_0x9eaf[18]](Util[_0x9eaf[17]](_0xbf3dxd[_0x9eaf[16]]))[_0x9eaf[15]](function(_0xbf3dxe){return _0xbf3dxb[_0x9eaf[12]](200)[_0x9eaf[11]](_0xbf3dxe)})[_0x9eaf[14]](function(_0xbf3dxc){return handleError(_0xbf3dxb,_0xbf3dxc)})}};exports[_0x9eaf[25]]= function(_0xbf3dxd,_0xbf3dxb){return SmsRoom[_0x9eaf[25]]()[_0x9eaf[15]](function(_0xbf3dxf){return _0xbf3dxb[_0x9eaf[12]](200)[_0x9eaf[11]](_0xbf3dxf)})[_0x9eaf[14]](function(_0xbf3dxc){return handleError(_0xbf3dxb,_0xbf3dxc)})};function getSmsQueues(_0xbf3dx11){return function(){switch(_0xbf3dx11[_0x9eaf[24]]){case _0x9eaf[22]:return User[_0x9eaf[28]](_0xbf3dx11[_0x9eaf[21]],{attributes:[_0x9eaf[21]]})[_0x9eaf[15]](Util[_0x9eaf[27]]({},{attributes:[_0x9eaf[21]],include:[{raw:true,model:User,attributes:[_0x9eaf[21]]}]}))[_0x9eaf[15]](function(_0xbf3dx12){return {include:{model:SmsAccount,include:{model:SmsApplication,include:{model:SmsQueue,where:{id:_[_0x9eaf[26]](_0xbf3dx12,_0x9eaf[21])}}}}}});default:return {}}}}exports[_0x9eaf[29]]= function(_0xbf3dxd,_0xbf3dxb){return Promise[_0x9eaf[36]]([])[_0x9eaf[15]](getSmsQueues(_0xbf3dxd[_0x9eaf[22]]))[_0x9eaf[15]](function(_0xbf3dx14){return SmsRoom[_0x9eaf[35]](_[_0x9eaf[34]](Util[_0x9eaf[17]](_0xbf3dxd[_0x9eaf[16]],{status:_0x9eaf[31],updatedAt:{$gte:moment()[_0x9eaf[33]](_0x9eaf[32])}}),_0xbf3dx14))})[_0x9eaf[15]](function(_0xbf3dx13){return _0xbf3dxb[_0x9eaf[12]](200)[_0x9eaf[11]]({value:_0xbf3dx13})})[_0x9eaf[14]](function(_0xbf3dxc){console[_0x9eaf[30]](_0xbf3dxc);return handleError(_0xbf3dxb,_0xbf3dxc)})};exports[_0x9eaf[37]]= function(_0xbf3dxd,_0xbf3dxb){return Promise[_0x9eaf[36]]([])[_0x9eaf[15]](getSmsQueues(_0xbf3dxd[_0x9eaf[22]]))[_0x9eaf[15]](function(_0xbf3dx14){return SmsRoom[_0x9eaf[35]](_[_0x9eaf[34]](Util[_0x9eaf[17]](_0xbf3dxd[_0x9eaf[16]],{status:_0x9eaf[38],updatedAt:{$gte:moment()[_0x9eaf[33]](_0x9eaf[32])}}),_0xbf3dx14))})[_0x9eaf[15]](function(_0xbf3dx13){return _0xbf3dxb[_0x9eaf[12]](200)[_0x9eaf[11]]({value:_0xbf3dx13})})[_0x9eaf[14]](function(_0xbf3dxc){console[_0x9eaf[30]](_0xbf3dxc);return handleError(_0xbf3dxb,_0xbf3dxc)})};exports[_0x9eaf[39]]= function(_0xbf3dxd,_0xbf3dxb){return Promise[_0x9eaf[36]]([])[_0x9eaf[15]](getSmsQueues(_0xbf3dxd[_0x9eaf[22]]))[_0x9eaf[15]](function(_0xbf3dx14){return SmsRoom[_0x9eaf[35]](_[_0x9eaf[34]](Util[_0x9eaf[17]](_0xbf3dxd[_0x9eaf[16]],{status:_0x9eaf[40],updatedAt:{$gte:moment()[_0x9eaf[33]](_0x9eaf[32])}}),_0xbf3dx14))})[_0x9eaf[15]](function(_0xbf3dx13){return _0xbf3dxb[_0x9eaf[12]](200)[_0x9eaf[11]]({value:_0xbf3dx13})})[_0x9eaf[14]](function(_0xbf3dxc){console[_0x9eaf[30]](_0xbf3dxc);return handleError(_0xbf3dxb,_0xbf3dxc)})};exports[_0x9eaf[41]]= function(_0xbf3dxd,_0xbf3dxb){return Promise[_0x9eaf[36]]([])[_0x9eaf[15]](getSmsQueues(_0xbf3dxd[_0x9eaf[22]]))[_0x9eaf[15]](function(_0xbf3dx14){return SmsRoom[_0x9eaf[35]](_[_0x9eaf[34]](Util[_0x9eaf[17]](_0xbf3dxd[_0x9eaf[16]],{status:_0x9eaf[42],updatedAt:{$gte:moment()[_0x9eaf[33]](_0x9eaf[32])}}),_0xbf3dx14))})[_0x9eaf[15]](function(_0xbf3dx13){return _0xbf3dxb[_0x9eaf[12]](200)[_0x9eaf[11]]({value:_0xbf3dx13})})[_0x9eaf[14]](function(_0xbf3dxc){console[_0x9eaf[30]](_0xbf3dxc);return handleError(_0xbf3dxb,_0xbf3dxc)})};exports[_0x9eaf[43]]= function(_0xbf3dxd,_0xbf3dxb){return SmsRoom[_0x9eaf[23]](_0x9eaf[19])[_0x9eaf[28]](_0xbf3dxd[_0x9eaf[45]][_0x9eaf[21]])[_0x9eaf[15]](function(_0xbf3dx15){if(!_0xbf3dx15){return _0xbf3dxb[_0x9eaf[44]](404)};return _0xbf3dxb[_0x9eaf[11]](_0xbf3dx15)})[_0x9eaf[14]](function(_0xbf3dxc){return handleError(_0xbf3dxb,_0xbf3dxc)})};exports[_0x9eaf[46]]= function(_0xbf3dxd,_0xbf3dxb,_0xbf3dx16){return SmsRoom[_0x9eaf[28]](_0xbf3dxd[_0x9eaf[45]][_0x9eaf[21]])[_0x9eaf[15]](function(_0xbf3dx15){if(!_0xbf3dx15){return _0xbf3dxb[_0x9eaf[44]](404)};return _0xbf3dx15[_0x9eaf[51]]({attributes:[_0x9eaf[21],_0x9eaf[47],_0x9eaf[48],_0x9eaf[49],_0x9eaf[24],_0x9eaf[50]]})})[_0x9eaf[15]](function(_0xbf3dx17){return _0xbf3dxb[_0x9eaf[11]](_0xbf3dx17)})[_0x9eaf[14]](function(_0xbf3dxc){return handleError(_0xbf3dxb,_0xbf3dxc)})};exports[_0x9eaf[52]]= function(_0xbf3dxd,_0xbf3dxb,_0xbf3dx16){return SmsMessage[_0x9eaf[28]](_0xbf3dxd[_0x9eaf[45]][_0x9eaf[21]])[_0x9eaf[15]](function(_0xbf3dx19){return _0xbf3dx19[_0x9eaf[54]]({include:[{model:SmsAccount},{model:SmsMessage,include:[{model:User,attributes:[_0x9eaf[21],_0x9eaf[47],_0x9eaf[48],_0x9eaf[49]]}]},{model:User,attributes:[_0x9eaf[21],_0x9eaf[47],_0x9eaf[48],_0x9eaf[49]]}]})})[_0x9eaf[15]](function(_0xbf3dx18){return _0xbf3dxb[_0x9eaf[11]](_0xbf3dx18)})[_0x9eaf[14]](function(_0xbf3dxc){console[_0x9eaf[30]](_0x9eaf[53],_0xbf3dxc);return handleError(_0xbf3dxb,_0xbf3dxc)})};exports[_0x9eaf[55]]= function(_0xbf3dxd,_0xbf3dxb){return SmsRoom[_0x9eaf[55]](_0xbf3dxd[_0x9eaf[56]])[_0x9eaf[15]](function(_0xbf3dx1a){return _0xbf3dxb[_0x9eaf[12]](201)[_0x9eaf[11]](_0xbf3dx1a)})[_0x9eaf[14]](function(_0xbf3dxc){return handleError(_0xbf3dxb,_0xbf3dxc)})};exports[_0x9eaf[57]]= function(_0xbf3dxd,_0xbf3dxb,_0xbf3dx16){_0xbf3dxd[_0x9eaf[56]][_0x9eaf[58]]= _0xbf3dxd[_0x9eaf[22]][_0x9eaf[21]];_0xbf3dxd[_0x9eaf[56]][_0x9eaf[59]]= _0xbf3dxd[_0x9eaf[45]][_0x9eaf[21]];return SmsMessage[_0x9eaf[55]](_0xbf3dxd[_0x9eaf[56]])[_0x9eaf[15]](function(_0xbf3dx1a){return _0xbf3dxb[_0x9eaf[12]](201)[_0x9eaf[11]](_0xbf3dx1a)})[_0x9eaf[14]](function(_0xbf3dxc){return handleError(_0xbf3dxb,_0xbf3dxc)})};exports[_0x9eaf[60]]= function(_0xbf3dxd,_0xbf3dxb){if(_0xbf3dxd[_0x9eaf[56]][_0x9eaf[21]]){delete _0xbf3dxd[_0x9eaf[56]][_0x9eaf[21]]};return SmsRoom[_0x9eaf[28]](_0xbf3dxd[_0x9eaf[45]][_0x9eaf[21]])[_0x9eaf[15]](function(_0xbf3dx15){if(!_0xbf3dx15){return _0xbf3dxb[_0x9eaf[44]](404)};var _0xbf3dx1b=_[_0x9eaf[34]](_0xbf3dx15,_0xbf3dxd[_0x9eaf[56]]);return _0xbf3dx1b[_0x9eaf[61]]()})[_0x9eaf[15]](function(_0xbf3dx15){return _0xbf3dxb[_0x9eaf[12]](200)[_0x9eaf[11]](_0xbf3dx15)})[_0x9eaf[14]](function(_0xbf3dxc){return handleError(_0xbf3dxb,_0xbf3dxc)})};exports[_0x9eaf[62]]= function(_0xbf3dxd,_0xbf3dxb,_0xbf3dx16){return SmsRoom[_0x9eaf[28]](_0xbf3dxd[_0x9eaf[45]][_0x9eaf[21]])[_0x9eaf[15]](function(_0xbf3dx15){if(!_0xbf3dx15){return _0xbf3dxb[_0x9eaf[44]](404)};return _0xbf3dx15[_0x9eaf[64]](_0xbf3dxd[_0x9eaf[56]][_0x9eaf[63]],{individualHooks:true})})[_0x9eaf[15]](function(){return _0xbf3dxb[_0x9eaf[44]](200)})[_0x9eaf[14]](function(_0xbf3dxc){return handleError(_0xbf3dxb,_0xbf3dxc)})};exports[_0x9eaf[65]]= function(_0xbf3dxd,_0xbf3dxb){return SmsRoom[_0x9eaf[28]](_0xbf3dxd[_0x9eaf[45]][_0x9eaf[21]])[_0x9eaf[15]](function(_0xbf3dx15){if(!_0xbf3dx15){return _0xbf3dxb[_0x9eaf[44]](404)};return _0xbf3dx15[_0x9eaf[65]]()})[_0x9eaf[15]](function(){return _0xbf3dxb[_0x9eaf[44]](204)})[_0x9eaf[14]](function(_0xbf3dxc){return handleError(_0xbf3dxb,_0xbf3dxc)})};exports[_0x9eaf[66]]= function(_0xbf3dxd,_0xbf3dxb){return SmsRoom[_0x9eaf[65]]({where:{id:_0xbf3dxd[_0x9eaf[16]][_0x9eaf[67]]},individualHooks:true})[_0x9eaf[15]](function(){return _0xbf3dxb[_0x9eaf[44]](200)})[_0x9eaf[14]](function(_0xbf3dxc){return handleError(_0xbf3dxb,_0xbf3dxc)})};exports[_0x9eaf[68]]= function(_0xbf3dxd,_0xbf3dxb,_0xbf3dx16){var _0xbf3dx1c={where:{id:_0xbf3dxd[_0x9eaf[45]][_0x9eaf[21]][_0x9eaf[70]](_0x9eaf[69])},user:_0xbf3dxd[_0x9eaf[22]],individualHooks:true};return SmsRoom[_0x9eaf[60]](_0xbf3dxd[_0x9eaf[56]],_0xbf3dx1c)[_0x9eaf[15]](function(_0xbf3dx1d){if(!_0xbf3dx1d){return _0xbf3dxb[_0x9eaf[44]](404)};return _0xbf3dx1d})[_0x9eaf[15]](function(_0xbf3dx1d){return _0xbf3dxb[_0x9eaf[44]](200)})[_0x9eaf[14]](function(_0xbf3dxc){return handleError(_0xbf3dxb,_0xbf3dxc)})} \ No newline at end of file +/** + * 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); + }); +}; diff --git a/server/api/sms_room/sms_room.events.js b/server/api/sms_room/sms_room.events.js index 1b698f3..a1390fd 100644 --- a/server/api/sms_room/sms_room.events.js +++ b/server/api/sms_room/sms_room.events.js @@ -1 +1,36 @@ -var _0xf709=["\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"];_0xf709[0];const EventEmitter=require(_0xf709[1]);const SmsRoom=require(_0xf709[3])[_0xf709[2]];var SmsRoomEvents= new EventEmitter();SmsRoomEvents[_0xf709[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xf709[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xf709[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xf709[6]};for(var e in events){var event=events[e];SmsRoom[_0xf709[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x7ca5x8,_0x7ca5x9,_0x7ca5xa){SmsRoomEvents[_0xf709[10]](event+ _0xf709[8]+ _0x7ca5x8[_0xf709[9]],_0x7ca5x8);SmsRoomEvents[_0xf709[10]](event,_0x7ca5x8);_0x7ca5xa(null)}}module[_0xf709[11]]= SmsRoomEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/sms_room/sms_room.socket.js b/server/api/sms_room/sms_room.socket.js index 039596b..fe08042 100644 --- a/server/api/sms_room/sms_room.socket.js +++ b/server/api/sms_room/sms_room.socket.js @@ -1 +1,33 @@ -var _0xa3d7=["\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"];_0xa3d7[0];const SmsRoomEvents=require(_0xa3d7[1]);var events=[_0xa3d7[2],_0xa3d7[2],_0xa3d7[3]];exports[_0xa3d7[4]]= function(_0xc215x3){for(var _0xc215x4=0,_0xc215x5=events[_0xa3d7[5]];_0xc215x4< _0xc215x5;_0xc215x4++){var _0xc215x6=events[_0xc215x4];var _0xc215x7=createListener(_0xa3d7[6]+ _0xc215x6,_0xc215x3);SmsRoomEvents[_0xa3d7[7]](_0xc215x6,_0xc215x7);_0xc215x3[_0xa3d7[7]](_0xa3d7[8],removeListener(_0xc215x6,_0xc215x7))}};function createListener(_0xc215x6,_0xc215x3){return function(_0xc215x9){_0xc215x3[_0xa3d7[9]](_0xc215x6,_0xc215x9)}}function removeListener(_0xc215x6,_0xc215x7){return function(){SmsRoomEvents[_0xa3d7[10]](_0xc215x6,_0xc215x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/sound/index.js b/server/api/sound/index.js index e0a2625..ac4a804 100644 --- a/server/api/sound/index.js +++ b/server/api/sound/index.js @@ -1 +1,17 @@ -var _0x1e50=["\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"];_0x1e50[0];var express=require(_0x1e50[1]);var controller=require(_0x1e50[2]);var auth=require(_0x1e50[3]);var router=express.Router();router[_0x1e50[9]](_0x1e50[4],auth[_0x1e50[5]](),auth[_0x1e50[7]]([13,7],[_0x1e50[6]]),controller[_0x1e50[8]]);router[_0x1e50[9]](_0x1e50[10],auth[_0x1e50[5]](),auth[_0x1e50[7]]([13],[_0x1e50[6]]),controller[_0x1e50[11]]);router[_0x1e50[9]](_0x1e50[12],auth[_0x1e50[5]](),auth[_0x1e50[7]]([13],[_0x1e50[6]]),controller[_0x1e50[13]]);router[_0x1e50[9]](_0x1e50[14],auth[_0x1e50[5]](),auth[_0x1e50[7]]([13],[_0x1e50[6]]),controller[_0x1e50[15]]);router[_0x1e50[17]](_0x1e50[4],auth[_0x1e50[5]](),auth[_0x1e50[7]]([13],[_0x1e50[6]]),controller[_0x1e50[16]]);router[_0x1e50[19]](_0x1e50[10],auth[_0x1e50[5]](),auth[_0x1e50[7]]([13],[_0x1e50[6]]),controller[_0x1e50[18]]);router[_0x1e50[21]](_0x1e50[10],auth[_0x1e50[5]](),auth[_0x1e50[7]]([13],[_0x1e50[6]]),controller[_0x1e50[20]]);module[_0x1e50[22]]= router \ No newline at end of file +'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; diff --git a/server/api/sound/sound.controller.js b/server/api/sound/sound.controller.js index e355f12..9cc2d15 100644 --- a/server/api/sound/sound.controller.js +++ b/server/api/sound/sound.controller.js @@ -1 +1,278 @@ -var _0xc92c=["\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"];_0xc92c[0];var _=require(_0xc92c[1]);var Sound=require(_0xc92c[3])[_0xc92c[2]];var uploadFile=require(_0xc92c[4]);var sr=require(_0xc92c[5]);var sox=require(_0xc92c[6]);var path=require(_0xc92c[7]);var config=require(_0xc92c[8]);var fs=require(_0xc92c[9]);var sequelize=require(_0xc92c[3])[_0xc92c[10]];var base64=require(_0xc92c[11]);var Promise=require(_0xc92c[12]);var Setting=require(_0xc92c[3])[_0xc92c[13]];exports[_0xc92c[14]]= function(_0xd28exd,_0xd28exe){return Sound[_0xc92c[19]]()[_0xc92c[18]](function(_0xd28ex10){return _0xd28exe[_0xc92c[17]](200)[_0xc92c[16]](_0xd28ex10)})[_0xc92c[15]](function(_0xd28exf){return handleError(_0xd28exe,_0xd28exf)})};exports[_0xc92c[20]]= function(_0xd28exd,_0xd28exe){return Sound[_0xc92c[24]](_0xd28exd[_0xc92c[23]][_0xc92c[22]])[_0xc92c[18]](function(Sound){if(!Sound){return _0xd28exe[_0xc92c[21]](404)};return _0xd28exe[_0xc92c[16]](Sound)})[_0xc92c[15]](function(_0xd28exf){return handleError(_0xd28exe,_0xd28exf)})};exports[_0xc92c[25]]= function(_0xd28exd,_0xd28exe){var _0xd28ex11= new uploadFile({dest:path[_0xc92c[27]](config[_0xc92c[26]]),maxFileSize:15* 1000000,maxNumberOfFiles:10,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(wav|mp3|gsm|ogg)$/i,rename:function(_0xd28ex12,_0xd28ex13){return sr()+ path[_0xc92c[29]](_0xd28ex13[_0xc92c[28]])},messages:{maxNumberOfFiles:_0xc92c[30],acceptFileTypes:_0xc92c[31],maxFileSize:_0xc92c[32],invalidRequest:_0xc92c[33]}});_0xd28ex11[_0xc92c[56]](_0xc92c[34],function(_0xd28ex14,_0xd28ex15){if(!_0xd28ex15[_0xc92c[35]][_0xc92c[28]]){return _0xd28exe[_0xc92c[17]](500)[_0xc92c[16]](_0xd28ex11)};return Setting[_0xc92c[24]](1)[_0xc92c[18]](function(_0xd28ex16){var _0xd28ex17={};var _0xd28ex18=path[_0xc92c[29]](_0xd28ex15[_0xc92c[35]][_0xc92c[28]]);_0xd28ex17[_0xc92c[36]]= _0xc92c[37];_0xd28ex17[_0xc92c[38]]= path[_0xc92c[29]](_0xd28ex15[_0xc92c[35]][_0xc92c[28]])[_0xc92c[39]](1);_0xd28ex17[_0xc92c[40]]= _0xc92c[41];_0xd28ex17[_0xc92c[42]]= _0xd28ex17[_0xc92c[43]]= path[_0xc92c[44]](_0xd28ex15[_0xc92c[35]][_0xc92c[7]],_0xd28ex18);_0xd28ex17[_0xc92c[45]]= path[_0xc92c[44]](_0xd28ex15[_0xc92c[35]][_0xc92c[28]],_0xd28ex18);var _0xd28ex19=path[_0xc92c[27]](config[_0xc92c[26]],_0xd28ex17[_0xc92c[45]]+ _0xd28ex18);var _0xd28ex1a=path[_0xc92c[27]](_0xd28ex16[_0xc92c[46]]|| _0xc92c[47],_0xd28ex17[_0xc92c[45]]+ _0xc92c[48]+ _0xd28ex17[_0xc92c[40]]);fs[_0xc92c[50]](_0xd28ex19,parseInt(_0xc92c[49],8));sox[_0xc92c[51]](_0xd28ex19,function(_0xd28exf,_0xd28ex1b){});var _0xd28ex1c=sox[_0xc92c[52]](_0xd28ex19,_0xd28ex1a,{sampleRate:8000,format:_0xc92c[41],channelCount:1,bitRate:192* 1024,compressionQuality:5});_0xd28ex1c[_0xc92c[56]](_0xc92c[53],function(_0xd28exf){console[_0xc92c[53]](_0xc92c[54],_0xd28exf);fs[_0xc92c[55]](_0xd28ex19,function(_0xd28exf){if(_0xd28exf){return handleError(_0xd28exe,_0xd28exf)}});return handleError(_0xd28exe,_0xd28exf)});_0xd28ex1c[_0xc92c[56]](_0xc92c[57],function(_0xd28ex1d,_0xd28ex1e){});_0xd28ex1c[_0xc92c[56]](_0xc92c[58],function(_0xd28ex1f){_0xd28ex17[_0xc92c[59]]= isNaN(_0xd28ex1f[_0xc92c[60]])?null:_0xd28ex1f[_0xc92c[60]]* 1000;_0xd28ex17[_0xc92c[61]]= isNaN(_0xd28ex1f[_0xc92c[62]])?null:_0xd28ex1f[_0xc92c[62]];_0xd28ex17[_0xc92c[63]]= isNaN(_0xd28ex1f[_0xc92c[64]])?null:_0xd28ex1f[_0xc92c[64]];_0xd28ex17[_0xc92c[65]]= isNaN(_0xd28ex1f[_0xc92c[66]])?null:_0xd28ex1f[_0xc92c[66]];_0xd28ex17[_0xc92c[67]]= isNaN(_0xd28ex1f[_0xc92c[68]])?null:_0xd28ex1f[_0xc92c[68]]});_0xd28ex1c[_0xc92c[56]](_0xc92c[69],function(_0xd28ex1f){_0xd28ex17[_0xc92c[70]]= isNaN(_0xd28ex1f[_0xc92c[60]])?null:_0xd28ex1f[_0xc92c[60]]* 1000;_0xd28ex17[_0xc92c[71]]= isNaN(_0xd28ex1f[_0xc92c[62]])?null:_0xd28ex1f[_0xc92c[62]];_0xd28ex17[_0xc92c[72]]= isNaN(_0xd28ex1f[_0xc92c[64]])?null:_0xd28ex1f[_0xc92c[64]];_0xd28ex17[_0xc92c[73]]= isNaN(_0xd28ex1f[_0xc92c[66]])?null:_0xd28ex1f[_0xc92c[66]];_0xd28ex17[_0xc92c[74]]= isNaN(_0xd28ex1f[_0xc92c[68]])?null:_0xd28ex1f[_0xc92c[68]]});_0xd28ex1c[_0xc92c[56]](_0xc92c[34],function(){console[_0xc92c[76]](_0xc92c[75]);fs[_0xc92c[50]](_0xd28ex1a,parseInt(_0xc92c[49],8));return Sound[_0xc92c[25]](_0xd28ex17)[_0xc92c[18]](function(_0xd28ex20){return _0xd28exe[_0xc92c[17]](201)[_0xc92c[16]](_0xd28ex20)})[_0xc92c[15]](function(_0xd28exf){console[_0xc92c[76]](_0xd28exf);return handleError(_0xd28exe,_0xd28exf)})});_0xd28ex1c[_0xc92c[77]]()})[_0xc92c[15]](function(_0xd28exf){return handleError(_0xd28exe,_0xd28exf)})});_0xd28ex11[_0xc92c[56]](_0xc92c[53],function(_0xd28exf){console[_0xc92c[76]](_0xc92c[78],_0xd28exf);return handleError(_0xd28exe,_0xd28exf)});_0xd28ex11[_0xc92c[79]](_0xd28exd)};exports[_0xc92c[80]]= function(_0xd28exd,_0xd28exe){if(_0xd28exd[_0xc92c[81]][_0xc92c[22]]){delete _0xd28exd[_0xc92c[81]][_0xc92c[22]]};return Sound[_0xc92c[24]](_0xd28exd[_0xc92c[23]][_0xc92c[22]])[_0xc92c[18]](function(_0xd28ex20){if(!_0xd28ex20){return _0xd28exe[_0xc92c[21]](404)};var _0xd28ex21=_[_0xc92c[82]](_0xd28ex20,_0xd28exd[_0xc92c[81]]);return _0xd28ex21[_0xc92c[83]]()})[_0xc92c[18]](function(_0xd28ex20){return _0xd28exe[_0xc92c[17]](200)[_0xc92c[16]](_0xd28ex20)})[_0xc92c[15]](function(_0xd28exf){return handleError(_0xd28exe,_0xd28exf)})};exports[_0xc92c[84]]= function(_0xd28exd,_0xd28exe){var _0xd28ex22;return Setting[_0xc92c[24]](1)[_0xc92c[18]](function(_0xd28ex16){_0xd28ex22= _0xd28ex16;return Sound[_0xc92c[24]](_0xd28exd[_0xc92c[23]][_0xc92c[22]])})[_0xc92c[18]](function(_0xd28ex20){if(!_0xd28ex20){return _0xd28exe[_0xc92c[21]](404)};var _0xd28ex23=path[_0xc92c[27]](config[_0xc92c[26]],_0xd28ex20[_0xc92c[45]]+ _0xc92c[48]+ _0xd28ex20[_0xc92c[38]]);var _0xd28ex24=path[_0xc92c[27]](_0xd28ex22[_0xc92c[46]]|| _0xc92c[47],_0xd28ex20[_0xc92c[45]]+ _0xc92c[48]+ _0xd28ex20[_0xc92c[40]]);return sequelize[_0xc92c[85]](function(_0xd28ex25){return _0xd28ex20[_0xc92c[84]]({transaction:_0xd28ex25})[_0xc92c[18]](function(){fs[_0xc92c[55]](_0xd28ex23,function(_0xd28exf){if(_0xd28exf){return handleError(_0xd28exe,_0xd28exf)}});fs[_0xc92c[55]](_0xd28ex24,function(_0xd28exf){if(_0xd28exf){return handleError(_0xd28exe,_0xd28exf)}});return _0xd28exe[_0xc92c[17]](200)[_0xc92c[16]](_0xd28ex20)})})[_0xc92c[15]](function(_0xd28exf){return handleError(_0xd28exe,_0xd28exf)})})[_0xc92c[15]](function(_0xd28exf){return handleError(_0xd28exe,_0xd28exf)})};exports[_0xc92c[86]]= function(_0xd28exd,_0xd28exe){getStream(_0xd28exd,_0xd28exe,_0xc92c[87])};exports[_0xc92c[88]]= function(_0xd28exd,_0xd28exe){getStream(_0xd28exd,_0xd28exe,_0xc92c[89])};function getStream(_0xd28exd,_0xd28exe,_0xd28ex27){return Sound[_0xc92c[24]](_0xd28exd[_0xc92c[23]][_0xc92c[22]])[_0xc92c[18]](function(_0xd28ex20){var _0xd28ex29=Promise[_0xc92c[93]](fs[_0xc92c[92]]);return _0xd28ex29(path[_0xc92c[27]](config[_0xd28ex27+ _0xc92c[94]],_0xd28ex20[_0xc92c[45]]+ _0xc92c[48]+ _0xd28ex20[_0xd28ex27+ _0xc92c[95]]))})[_0xc92c[18]](function(_0xd28ex1b){var _0xd28ex28= new Buffer(_0xd28ex1b,_0xc92c[91]).toString(_0xc92c[90]);return _0xd28ex28})[_0xc92c[18]](function(_0xd28ex28){return _0xd28exe[_0xc92c[17]](200)[_0xc92c[16]]({downloadString:_0xd28ex28})})[_0xc92c[15]](function(_0xd28exf){console[_0xc92c[76]](_0xd28exf);return handleError(_0xd28exe,_0xd28exf)})}function handleError(_0xd28exe,_0xd28exf){return _0xd28exe[_0xc92c[17]](500)[_0xc92c[16]](_0xd28exf)} \ No newline at end of file +'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); +} diff --git a/server/api/sound/sound.events.js b/server/api/sound/sound.events.js index 748a7c5..ce73c5a 100644 --- a/server/api/sound/sound.events.js +++ b/server/api/sound/sound.events.js @@ -1 +1,36 @@ -var _0x1e9a=["\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"];_0x1e9a[0];const EventEmitter=require(_0x1e9a[1]);const Sound=require(_0x1e9a[3])[_0x1e9a[2]];var SoundEvents= new EventEmitter();SoundEvents[_0x1e9a[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x1e9a[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x1e9a[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x1e9a[6]};for(var e in events){var event=events[e];Sound[_0x1e9a[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x7890x8,_0x7890x9,_0x7890xa){SoundEvents[_0x1e9a[10]](event+ _0x1e9a[8]+ _0x7890x8[_0x1e9a[9]],_0x7890x8);SoundEvents[_0x1e9a[10]](event,_0x7890x8);_0x7890xa(null)}}module[_0x1e9a[11]]= SoundEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/sound/sound.socket.js b/server/api/sound/sound.socket.js index 6fbd875..137a669 100644 --- a/server/api/sound/sound.socket.js +++ b/server/api/sound/sound.socket.js @@ -1 +1,32 @@ -var _0x47c3=["\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"];_0x47c3[0];const SoundEvents=require(_0x47c3[1]);var events=[_0x47c3[2],_0x47c3[3]];exports[_0x47c3[4]]= function(_0xc957x3){for(var _0xc957x4=0,_0xc957x5=events[_0x47c3[5]];_0xc957x4< _0xc957x5;_0xc957x4++){var _0xc957x6=events[_0xc957x4];var _0xc957x7=createListener(_0x47c3[6]+ _0xc957x6,_0xc957x3);SoundEvents[_0x47c3[7]](_0xc957x6,_0xc957x7);_0xc957x3[_0x47c3[7]](_0x47c3[8],removeListener(_0xc957x6,_0xc957x7))}};function createListener(_0xc957x6,_0xc957x3){return function(_0xc957x9){_0xc957x3[_0x47c3[9]](_0xc957x6,_0xc957x9)}}function removeListener(_0xc957x6,_0xc957x7){return function(){SoundEvents[_0x47c3[10]](_0xc957x6,_0xc957x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/square_odbc/index.js b/server/api/square_odbc/index.js index cdeb689..b6dd309 100644 --- a/server/api/square_odbc/index.js +++ b/server/api/square_odbc/index.js @@ -1 +1,17 @@ -var _0xc24b=["\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"];_0xc24b[0];var express=require(_0xc24b[1]);var controller=require(_0xc24b[2]);var auth=require(_0xc24b[3]);var router=express.Router();router[_0xc24b[9]](_0xc24b[4],auth[_0xc24b[5]](),auth[_0xc24b[7]]([14],[_0xc24b[6]]),controller[_0xc24b[8]]);router[_0xc24b[9]](_0xc24b[10],auth[_0xc24b[5]](),auth[_0xc24b[7]]([14],[_0xc24b[6]]),controller[_0xc24b[11]]);router[_0xc24b[9]](_0xc24b[12],auth[_0xc24b[5]](),auth[_0xc24b[7]]([14],[_0xc24b[6]]),controller[_0xc24b[13]]);router[_0xc24b[15]](_0xc24b[4],auth[_0xc24b[5]](),auth[_0xc24b[7]]([14],[_0xc24b[6]]),controller[_0xc24b[14]]);router[_0xc24b[17]](_0xc24b[12],auth[_0xc24b[5]](),auth[_0xc24b[7]]([14],[_0xc24b[6]]),controller[_0xc24b[16]]);router[_0xc24b[19]](_0xc24b[4],auth[_0xc24b[5]](),auth[_0xc24b[7]]([14],[_0xc24b[6]]),controller[_0xc24b[18]]);router[_0xc24b[19]](_0xc24b[12],auth[_0xc24b[5]](),auth[_0xc24b[7]]([14],[_0xc24b[6]]),controller[_0xc24b[20]]);module[_0xc24b[21]]= router \ No newline at end of file +'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; diff --git a/server/api/square_odbc/square_odbc.controller.js b/server/api/square_odbc/square_odbc.controller.js index 6b2f8b7..69af149 100644 --- a/server/api/square_odbc/square_odbc.controller.js +++ b/server/api/square_odbc/square_odbc.controller.js @@ -1 +1,135 @@ -var _0x7e3e=["\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"];_0x7e3e[0];var _=require(_0x7e3e[1]);var db=require(_0x7e3e[2])();var SquareOdbc=require(_0x7e3e[4])[_0x7e3e[3]];var Util=require(_0x7e3e[5]);exports[_0x7e3e[6]]= function(_0xb699x5,_0xb699x6){return SquareOdbc[_0x7e3e[13]](Util[_0x7e3e[12]](_0xb699x5[_0x7e3e[11]]))[_0x7e3e[10]](function(_0xb699x8){_0xb699x6[_0x7e3e[9]](200)[_0x7e3e[8]](_0xb699x8)})[_0x7e3e[7]](function(_0xb699x7){return handleError(_0xb699x6,_0xb699x7)})};exports[_0x7e3e[14]]= function(_0xb699x5,_0xb699x6){return SquareOdbc[_0x7e3e[18]](_0xb699x5[_0x7e3e[17]][_0x7e3e[16]])[_0x7e3e[10]](function(_0xb699x9){if(!_0xb699x9){return _0xb699x6[_0x7e3e[15]](404)};return _0xb699x6[_0x7e3e[8]](_0xb699x9)})[_0x7e3e[7]](function(_0xb699x7){return handleError(_0xb699x6,_0xb699x7)})};exports[_0x7e3e[19]]= function(_0xb699x5,_0xb699x6){return SquareOdbc[_0x7e3e[19]](_0xb699x5[_0x7e3e[20]])[_0x7e3e[10]](function(_0xb699x9){return _0xb699x6[_0x7e3e[9]](201)[_0x7e3e[8]](_0xb699x9)})[_0x7e3e[7]](function(_0xb699x7){return handleError(_0xb699x6,_0xb699x7)})};exports[_0x7e3e[21]]= function(_0xb699x5,_0xb699x6){if(_0xb699x5[_0x7e3e[20]][_0x7e3e[16]]){delete _0xb699x5[_0x7e3e[20]][_0x7e3e[16]]};return SquareOdbc[_0x7e3e[18]](_0xb699x5[_0x7e3e[17]][_0x7e3e[16]])[_0x7e3e[10]](function(_0xb699x9){if(!_0xb699x9){return _0xb699x6[_0x7e3e[15]](404)};var _0xb699xa=_[_0x7e3e[22]](_0xb699x9,_0xb699x5[_0x7e3e[20]]);_0xb699xa[_0x7e3e[23]]()[_0x7e3e[10]](function(){return _0xb699x6[_0x7e3e[9]](200)[_0x7e3e[8]](_0xb699x9)})[_0x7e3e[7]](function(_0xb699x7){return handleError(_0xb699x6,_0xb699x7)})})[_0x7e3e[7]](function(_0xb699x7){return handleError(_0xb699x6,_0xb699x7)})};exports[_0x7e3e[24]]= function(_0xb699x5,_0xb699x6){return SquareOdbc[_0x7e3e[18]](_0xb699x5[_0x7e3e[17]][_0x7e3e[16]])[_0x7e3e[10]](function(_0xb699xb){if(!_0xb699xb){return _0xb699x6[_0x7e3e[15]](404)};return _0xb699xb[_0x7e3e[24]]()})[_0x7e3e[10]](function(){return _0xb699x6[_0x7e3e[15]](204)})[_0x7e3e[7]](function(_0xb699x7){return handleError(_0xb699x6,_0xb699x7)})};exports[_0x7e3e[25]]= function(_0xb699x5,_0xb699x6){return SquareOdbc[_0x7e3e[24]]({where:{id:_0xb699x5[_0x7e3e[11]][_0x7e3e[26]]},individualHooks:true})[_0x7e3e[10]](function(){return _0xb699x6[_0x7e3e[15]](204)})[_0x7e3e[7]](function(_0xb699x7){return handleError(_0xb699x6,_0xb699x7)})};exports[_0x7e3e[27]]= function(_0xb699x5,_0xb699x6){return SquareOdbc[_0x7e3e[18]](_0xb699x5[_0x7e3e[17]][_0x7e3e[16]])[_0x7e3e[10]](function(_0xb699x9){if(!_0xb699x9){return _0xb699x6[_0x7e3e[15]](404)};db[_0x7e3e[30]](_0xb699x9[_0x7e3e[28]],function(_0xb699x7){if(_0xb699x7){return handleError(_0xb699x6,_0xb699x7)};db[_0x7e3e[29]](function(_0xb699x7){if(_0xb699x7){return handleError(_0xb699x6,_0xb699x7)};return _0xb699x6[_0x7e3e[15]](200)})})})[_0x7e3e[7]](function(_0xb699x7){return handleError(_0xb699x6,_0xb699x7)})};function handleError(_0xb699x6,_0xb699x7){return _0xb699x6[_0x7e3e[9]](500)[_0x7e3e[8]](_0xb699x7)} \ No newline at end of file +'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); +} diff --git a/server/api/square_odbc/square_odbc.events.js b/server/api/square_odbc/square_odbc.events.js index 8b6f3d2..1f9776a 100644 --- a/server/api/square_odbc/square_odbc.events.js +++ b/server/api/square_odbc/square_odbc.events.js @@ -1 +1,36 @@ -var _0xe85e=["\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"];_0xe85e[0];const EventEmitter=require(_0xe85e[1]);const SquareOdbc=require(_0xe85e[3])[_0xe85e[2]];var SquareOdbcEvents= new EventEmitter();SquareOdbcEvents[_0xe85e[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xe85e[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xe85e[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xe85e[6]};for(var e in events){var event=events[e];SquareOdbc[_0xe85e[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x1024x8,_0x1024x9,_0x1024xa){SquareOdbcEvents[_0xe85e[10]](event+ _0xe85e[8]+ _0x1024x8[_0xe85e[9]],_0x1024x8);SquareOdbcEvents[_0xe85e[10]](event,_0x1024x8);_0x1024xa(null)}}module[_0xe85e[11]]= SquareOdbcEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/square_odbc/square_odbc.socket.js b/server/api/square_odbc/square_odbc.socket.js index 46c5070..34d555e 100644 --- a/server/api/square_odbc/square_odbc.socket.js +++ b/server/api/square_odbc/square_odbc.socket.js @@ -1 +1,32 @@ -var _0xd3a4=["\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"];_0xd3a4[0];const SquareOdbcEvents=require(_0xd3a4[1]);var events=[_0xd3a4[2],_0xd3a4[3]];exports[_0xd3a4[4]]= function(_0x4527x3){for(var _0x4527x4=0,_0x4527x5=events[_0xd3a4[5]];_0x4527x4< _0x4527x5;_0x4527x4++){var _0x4527x6=events[_0x4527x4];var _0x4527x7=createListener(_0xd3a4[6]+ _0x4527x6,_0x4527x3);SquareOdbcEvents[_0xd3a4[7]](_0x4527x6,_0x4527x7);_0x4527x3[_0xd3a4[7]](_0xd3a4[8],removeListener(_0x4527x6,_0x4527x7))}};function createListener(_0x4527x6,_0x4527x3){return function(_0x4527x9){_0x4527x3[_0xd3a4[9]](_0x4527x6,_0x4527x9)}}function removeListener(_0x4527x6,_0x4527x7){return function(){SquareOdbcEvents[_0xd3a4[10]](_0x4527x6,_0x4527x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/square_project/index.js b/server/api/square_project/index.js index 9e52729..0b1c55e 100644 --- a/server/api/square_project/index.js +++ b/server/api/square_project/index.js @@ -1 +1,17 @@ -var _0xe36f=["\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"];_0xe36f[0];var express=require(_0xe36f[1]);var controller=require(_0xe36f[2]);var auth=require(_0xe36f[3]);var router=express.Router();router[_0xe36f[9]](_0xe36f[4],auth[_0xe36f[5]](),auth[_0xe36f[7]]([14,7],[_0xe36f[6]]),controller[_0xe36f[8]]);router[_0xe36f[9]](_0xe36f[10],auth[_0xe36f[5]](),auth[_0xe36f[7]]([14],[_0xe36f[6]]),controller[_0xe36f[11]]);router[_0xe36f[9]](_0xe36f[12],controller[_0xe36f[13]]);router[_0xe36f[15]](_0xe36f[4],auth[_0xe36f[5]](),auth[_0xe36f[7]]([14],[_0xe36f[6]]),controller[_0xe36f[14]]);router[_0xe36f[17]](_0xe36f[10],auth[_0xe36f[5]](),auth[_0xe36f[7]]([14],[_0xe36f[6]]),controller[_0xe36f[16]]);router[_0xe36f[19]](_0xe36f[4],auth[_0xe36f[5]](),auth[_0xe36f[7]]([14],[_0xe36f[6]]),controller[_0xe36f[18]]);router[_0xe36f[19]](_0xe36f[10],auth[_0xe36f[5]](),auth[_0xe36f[7]]([14],[_0xe36f[6]]),controller[_0xe36f[20]]);module[_0xe36f[21]]= router \ No newline at end of file +'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; diff --git a/server/api/square_project/square_project.controller.js b/server/api/square_project/square_project.controller.js index 6844f58..46766e9 100644 --- a/server/api/square_project/square_project.controller.js +++ b/server/api/square_project/square_project.controller.js @@ -1 +1,133 @@ -var _0x31a7=["\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"];_0x31a7[0];var _=require(_0x31a7[1]);var path=require(_0x31a7[2]);var config=require(_0x31a7[3]);var Util=require(_0x31a7[4]);var SquareProject=require(_0x31a7[6])[_0x31a7[5]];exports[_0x31a7[7]]= function(_0x41d7x6,_0x41d7x7){return SquareProject[_0x31a7[14]](Util[_0x31a7[13]](_0x41d7x6[_0x31a7[12]]))[_0x31a7[11]](function(_0x41d7x9){_0x41d7x7[_0x31a7[10]](200)[_0x31a7[9]](_0x41d7x9)})[_0x31a7[8]](function(_0x41d7x8){return handleError(_0x41d7x7,_0x41d7x8)})};exports[_0x31a7[15]]= function(_0x41d7x6,_0x41d7x7){return SquareProject[_0x31a7[19]](_0x41d7x6[_0x31a7[18]][_0x31a7[17]])[_0x31a7[11]](function(_0x41d7xa){if(!_0x41d7xa){return _0x41d7x7[_0x31a7[16]](404)};return _0x41d7x7[_0x31a7[9]](_0x41d7xa)})[_0x31a7[8]](function(_0x41d7x8){return handleError(_0x41d7x7,_0x41d7x8)})};exports[_0x31a7[20]]= function(_0x41d7x6,_0x41d7x7){return SquareProject[_0x31a7[20]](_0x41d7x6[_0x31a7[21]])[_0x31a7[11]](function(_0x41d7xa){return _0x41d7x7[_0x31a7[10]](201)[_0x31a7[9]](_0x41d7xa)})[_0x31a7[8]](function(_0x41d7x8){return handleError(_0x41d7x7,_0x41d7x8)})};exports[_0x31a7[22]]= function(_0x41d7x6,_0x41d7x7){if(_0x41d7x6[_0x31a7[21]][_0x31a7[17]]){delete _0x41d7x6[_0x31a7[21]][_0x31a7[17]]};delete _0x41d7x6[_0x31a7[21]][_0x31a7[23]];return SquareProject[_0x31a7[19]](_0x41d7x6[_0x31a7[18]][_0x31a7[17]])[_0x31a7[11]](function(_0x41d7xa){if(!_0x41d7xa){return _0x41d7x7[_0x31a7[16]](404)};var _0x41d7xb=_[_0x31a7[24]](_0x41d7xa,_0x41d7x6[_0x31a7[21]]);_0x41d7xb[_0x31a7[25]]()[_0x31a7[11]](function(){return _0x41d7x7[_0x31a7[10]](200)[_0x31a7[9]](_0x41d7xa)})[_0x31a7[8]](function(_0x41d7x8){return handleError(_0x41d7x7,_0x41d7x8)})})[_0x31a7[8]](function(_0x41d7x8){return handleError(_0x41d7x7,_0x41d7x8)})};exports[_0x31a7[26]]= function(_0x41d7x6,_0x41d7x7){return SquareProject[_0x31a7[19]](_0x41d7x6[_0x31a7[18]][_0x31a7[17]])[_0x31a7[11]](function(_0x41d7xc){if(!_0x41d7xc){return _0x41d7x7[_0x31a7[16]](404)};return _0x41d7xc[_0x31a7[26]]()})[_0x31a7[11]](function(){return _0x41d7x7[_0x31a7[16]](204)})[_0x31a7[8]](function(_0x41d7x8){return handleError(_0x41d7x7,_0x41d7x8)})};exports[_0x31a7[27]]= function(_0x41d7x6,_0x41d7x7){return SquareProject[_0x31a7[26]]({where:{id:_0x41d7x6[_0x31a7[12]][_0x31a7[28]]},individualHooks:true})[_0x31a7[11]](function(){return _0x41d7x7[_0x31a7[16]](204)})[_0x31a7[8]](function(_0x41d7x8){return handleError(_0x41d7x7,_0x41d7x8)})};exports[_0x31a7[29]]= function(_0x41d7x6,_0x41d7x7,_0x41d7xd){SquareProject[_0x31a7[19]](_0x41d7x6[_0x31a7[18]][_0x31a7[17]])[_0x31a7[11]](function(_0x41d7xa){if(!_0x41d7xa){return _0x41d7x7[_0x31a7[16]](404)};console[_0x31a7[31]](_0x41d7x6[_0x31a7[12]][_0x31a7[30]]);_0x41d7x7[_0x31a7[35]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E":_0x31a7[32]+ _0x41d7x6[_0x31a7[12]][_0x31a7[30]]+ _0x31a7[33],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x31a7[34]});return _0x41d7x7[_0x31a7[9]](_0x41d7xa[_0x31a7[36]])})[_0x31a7[8]](function(_0x41d7x8){return handleError(_0x41d7x7,_0x41d7x8)})};function handleError(_0x41d7x7,_0x41d7x8){return _0x41d7x7[_0x31a7[10]](500)[_0x31a7[9]](_0x41d7x8)} \ No newline at end of file +'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); +} diff --git a/server/api/square_project/square_project.events.js b/server/api/square_project/square_project.events.js index e735984..d592ee2 100644 --- a/server/api/square_project/square_project.events.js +++ b/server/api/square_project/square_project.events.js @@ -1 +1,36 @@ -var _0x8f54=["\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"];_0x8f54[0];const EventEmitter=require(_0x8f54[1]);const SquareProject=require(_0x8f54[3])[_0x8f54[2]];var SquareProjectEvents= new EventEmitter();SquareProjectEvents[_0x8f54[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x8f54[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x8f54[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x8f54[6]};for(var e in events){var event=events[e];SquareProject[_0x8f54[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6017x8,_0x6017x9,_0x6017xa){SquareProjectEvents[_0x8f54[10]](event+ _0x8f54[8]+ _0x6017x8[_0x8f54[9]],_0x6017x8);SquareProjectEvents[_0x8f54[10]](event,_0x6017x8);_0x6017xa(null)}}module[_0x8f54[11]]= SquareProjectEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/square_project/square_project.socket.js b/server/api/square_project/square_project.socket.js index 70762cc..fc240c5 100644 --- a/server/api/square_project/square_project.socket.js +++ b/server/api/square_project/square_project.socket.js @@ -1 +1,32 @@ -var _0xa64f=["\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"];_0xa64f[0];const SquareProjectEvents=require(_0xa64f[1]);var events=[_0xa64f[2],_0xa64f[3]];exports[_0xa64f[4]]= function(_0xdc28x3){for(var _0xdc28x4=0,_0xdc28x5=events[_0xa64f[5]];_0xdc28x4< _0xdc28x5;_0xdc28x4++){var _0xdc28x6=events[_0xdc28x4];var _0xdc28x7=createListener(_0xa64f[6]+ _0xdc28x6,_0xdc28x3);SquareProjectEvents[_0xa64f[7]](_0xdc28x6,_0xdc28x7);_0xdc28x3[_0xa64f[7]](_0xa64f[8],removeListener(_0xdc28x6,_0xdc28x7))}};function createListener(_0xdc28x6,_0xdc28x3){return function(_0xdc28x9){_0xdc28x3[_0xa64f[9]](_0xdc28x6,_0xdc28x9)}}function removeListener(_0xdc28x6,_0xdc28x7){return function(){SquareProjectEvents[_0xa64f[10]](_0xdc28x6,_0xdc28x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/square_recording/index.js b/server/api/square_recording/index.js index 6bb6272..0ac38d5 100644 --- a/server/api/square_recording/index.js +++ b/server/api/square_recording/index.js @@ -1 +1,17 @@ -var _0xc270=["\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"];_0xc270[0];var express=require(_0xc270[1]);var auth=require(_0xc270[2]);var controller=require(_0xc270[3]);var router=express.Router();router[_0xc270[9]](_0xc270[4],auth[_0xc270[5]](),auth[_0xc270[7]]([14],[_0xc270[6]]),controller[_0xc270[8]]);router[_0xc270[9]](_0xc270[10],auth[_0xc270[5]](),auth[_0xc270[7]]([14],[_0xc270[6]]),controller[_0xc270[11]]);router[_0xc270[9]](_0xc270[12],auth[_0xc270[5]](),auth[_0xc270[7]]([14],[_0xc270[6]]),controller[_0xc270[13]]);router[_0xc270[15]](_0xc270[4],auth[_0xc270[5]](),auth[_0xc270[7]]([14],[_0xc270[6]]),controller[_0xc270[14]]);router[_0xc270[17]](_0xc270[10],auth[_0xc270[5]](),auth[_0xc270[7]]([14],[_0xc270[6]]),controller[_0xc270[16]]);router[_0xc270[19]](_0xc270[4],auth[_0xc270[5]](),auth[_0xc270[7]]([14],[_0xc270[6]]),controller[_0xc270[18]]);router[_0xc270[19]](_0xc270[10],auth[_0xc270[5]](),auth[_0xc270[7]]([14],[_0xc270[6]]),controller[_0xc270[20]]);module[_0xc270[21]]= router \ No newline at end of file +'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; diff --git a/server/api/square_recording/square_recording.controller.js b/server/api/square_recording/square_recording.controller.js index d9593f4..12c824a 100644 --- a/server/api/square_recording/square_recording.controller.js +++ b/server/api/square_recording/square_recording.controller.js @@ -1 +1,172 @@ -var _0x9aeb=["\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"];_0x9aeb[0];var _=require(_0x9aeb[1]);var util=require(_0x9aeb[2]);var SquareRecording=require(_0x9aeb[4])[_0x9aeb[3]];var Promise=require(_0x9aeb[5]);var base64=require(_0x9aeb[6]);var fs=require(_0x9aeb[7]);function handleError(_0x9007x8){return function(_0x9007x9){if(_0x9007x9[_0x9aeb[8]]&& _0x9007x9[_0x9aeb[8]][_0x9aeb[9]]=== _0x9aeb[10]){_0x9007x9= {message:_0x9aeb[11],translatedMessage:_0x9aeb[12]}};return _0x9007x8[_0x9aeb[14]](500)[_0x9aeb[13]](_0x9007x9)}}function responseWithResult(_0x9007x8,_0x9007xb){_0x9007xb= _0x9007xb|| 200;return function(_0x9007xc){if(_0x9007xc){_0x9007x8[_0x9aeb[14]](_0x9007xb)[_0x9aeb[15]](_0x9007xc)}}}function handleEntityNotFound(_0x9007x8){return function(_0x9007xc){if(!_0x9007xc){_0x9007x8[_0x9aeb[14]](404)[_0x9aeb[16]]();return null};return _0x9007xc}}function saveUpdates(_0x9007xf){return function(_0x9007xc){return _0x9007xc[_0x9aeb[17]](_0x9007xf)}}function removeEntity(_0x9007x8){return function(_0x9007xc){if(_0x9007xc){return _0x9007xc[_0x9aeb[19]]()[_0x9aeb[18]](function(){_0x9007x8[_0x9aeb[14]](204)[_0x9aeb[16]]()})}}}function getQuery(_0x9007x12){var _0x9007x13={};_0x9007x13[_0x9aeb[20]]= {};_[_0x9aeb[25]](_0x9007x12,function(_0x9007x14,_0x9007x15){switch(_0x9007x15){case _0x9aeb[21]:;case _0x9aeb[22]:_0x9007x13[_0x9007x15]= Number(_0x9007x14);break;case _0x9aeb[23]:_0x9007x13[_0x9007x15]= _0x9007x14;break;default:_0x9007x13[_0x9aeb[20]][_0x9007x15]= {$like:_0x9aeb[24]+ _0x9007x14+ _0x9aeb[24]}}});return _0x9007x13}exports[_0x9aeb[26]]= function(_0x9007x16,_0x9007x8){var _0x9007x13=getQuery(_0x9007x16[_0x9aeb[27]]);return SquareRecording[_0x9aeb[29]](_0x9007x13)[_0x9aeb[18]](responseWithResult(_0x9007x8))[_0x9aeb[28]](handleError(_0x9007x8))};exports[_0x9aeb[30]]= function(_0x9007x16,_0x9007x8){return SquareRecording[_0x9aeb[33]](_0x9007x16[_0x9aeb[32]][_0x9aeb[31]])[_0x9aeb[18]](handleEntityNotFound(_0x9007x8))[_0x9aeb[18]](responseWithResult(_0x9007x8))[_0x9aeb[28]](handleError(_0x9007x8))};exports[_0x9aeb[34]]= function(_0x9007x16,_0x9007x8){return SquareRecording[_0x9aeb[33]](_0x9007x16[_0x9aeb[32]][_0x9aeb[31]])[_0x9aeb[18]](function(_0x9007x19){var _0x9007x1a=Promise[_0x9aeb[38]](fs[_0x9aeb[37]]);return _0x9007x1a(_0x9007x19[_0x9aeb[39]])})[_0x9aeb[18]](function(_0x9007x18){var _0x9007x17= new Buffer(_0x9007x18,_0x9aeb[36]).toString(_0x9aeb[35]);return _0x9007x17})[_0x9aeb[18]](function(_0x9007x17){return _0x9007x8[_0x9aeb[14]](200)[_0x9aeb[13]]({downloadString:_0x9007x17})})[_0x9aeb[28]](handleError(_0x9007x8))};exports[_0x9aeb[40]]= function(_0x9007x16,_0x9007x8){return SquareRecording[_0x9aeb[40]](_0x9007x16[_0x9aeb[41]])[_0x9aeb[18]](responseWithResult(_0x9007x8,201))[_0x9aeb[28]](handleError(_0x9007x8))};exports[_0x9aeb[42]]= function(_0x9007x16,_0x9007x8){if(_0x9007x16[_0x9aeb[41]][_0x9aeb[31]]){delete _0x9007x16[_0x9aeb[41]][_0x9aeb[31]]};return SquareRecording[_0x9aeb[33]](_0x9007x16[_0x9aeb[32]][_0x9aeb[31]])[_0x9aeb[18]](handleEntityNotFound(_0x9007x8))[_0x9aeb[18]](saveUpdates(_0x9007x16[_0x9aeb[41]]))[_0x9aeb[18]](responseWithResult(_0x9007x8))[_0x9aeb[28]](handleError(_0x9007x8))};exports[_0x9aeb[19]]= function(_0x9007x16,_0x9007x8){return SquareRecording[_0x9aeb[33]](_0x9007x16[_0x9aeb[32]][_0x9aeb[31]])[_0x9aeb[18]](handleEntityNotFound(_0x9007x8))[_0x9aeb[18]](removeEntity(_0x9007x8))[_0x9aeb[28]](handleError(_0x9007x8))};exports[_0x9aeb[43]]= function(_0x9007x16,_0x9007x8){return SquareRecording[_0x9aeb[19]]({where:{id:_0x9007x16[_0x9aeb[27]][_0x9aeb[45]]},individualHooks:true})[_0x9aeb[18]](function(){return _0x9007x8[_0x9aeb[44]](204)})[_0x9aeb[28]](handleError(_0x9007x8))} \ No newline at end of file +/** + * 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)); +}; diff --git a/server/api/square_recording/square_recording.events.js b/server/api/square_recording/square_recording.events.js index fb31486..76305fd 100644 --- a/server/api/square_recording/square_recording.events.js +++ b/server/api/square_recording/square_recording.events.js @@ -1 +1,36 @@ -var _0xb821=["\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"];_0xb821[0];const EventEmitter=require(_0xb821[1]);const SquareRecording=require(_0xb821[3])[_0xb821[2]];var SquareRecordingEvents= new EventEmitter();SquareRecordingEvents[_0xb821[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xb821[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xb821[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xb821[6]};for(var e in events){var event=events[e];SquareRecording[_0xb821[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xed67x8,_0xed67x9,_0xed67xa){SquareRecordingEvents[_0xb821[10]](event+ _0xb821[8]+ _0xed67x8[_0xb821[9]],_0xed67x8);SquareRecordingEvents[_0xb821[10]](event,_0xed67x8);_0xed67xa(null)}}module[_0xb821[11]]= SquareRecordingEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/square_recording/square_recording.socket.js b/server/api/square_recording/square_recording.socket.js index 6e5e551..8ca5928 100644 --- a/server/api/square_recording/square_recording.socket.js +++ b/server/api/square_recording/square_recording.socket.js @@ -1 +1,32 @@ -var _0xd1ea=["\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"];_0xd1ea[0];const SquareRecordingEvents=require(_0xd1ea[1]);var events=[_0xd1ea[2],_0xd1ea[3]];exports[_0xd1ea[4]]= function(_0x511ex3){for(var _0x511ex4=0,_0x511ex5=events[_0xd1ea[5]];_0x511ex4< _0x511ex5;_0x511ex4++){var _0x511ex6=events[_0x511ex4];var _0x511ex7=createListener(_0xd1ea[6]+ _0x511ex6,_0x511ex3);SquareRecordingEvents[_0xd1ea[7]](_0x511ex6,_0x511ex7);_0x511ex3[_0xd1ea[7]](_0xd1ea[8],removeListener(_0x511ex6,_0x511ex7))}};function createListener(_0x511ex6,_0x511ex3){return function(_0x511ex9){_0x511ex3[_0xd1ea[9]](_0x511ex6,_0x511ex9)}}function removeListener(_0x511ex6,_0x511ex7){return function(){SquareRecordingEvents[_0xd1ea[10]](_0x511ex6,_0x511ex7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/sugarcrm_account/index.js b/server/api/sugarcrm_account/index.js index efac370..5927151 100644 --- a/server/api/sugarcrm_account/index.js +++ b/server/api/sugarcrm_account/index.js @@ -1 +1,20 @@ -var _0x936f=["\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"];_0x936f[0];var express=require(_0x936f[1]);var auth=require(_0x936f[2]);var controller=require(_0x936f[3]);var router=express.Router();router[_0x936f[9]](_0x936f[4],auth[_0x936f[5]](),auth[_0x936f[7]]([19,13],[_0x936f[6]]),controller[_0x936f[8]]);router[_0x936f[9]](_0x936f[10],auth[_0x936f[5]](),auth[_0x936f[7]]([19],[_0x936f[6]]),controller[_0x936f[11]]);router[_0x936f[9]](_0x936f[12],auth[_0x936f[5]](),auth[_0x936f[7]]([19],[_0x936f[6]]),controller[_0x936f[13]]);router[_0x936f[9]](_0x936f[14],auth[_0x936f[5]](),auth[_0x936f[7]]([19],[_0x936f[6]]),controller[_0x936f[15]]);router[_0x936f[18]](_0x936f[16],auth[_0x936f[5]](),auth[_0x936f[7]]([19],[_0x936f[6]]),controller[_0x936f[17]]);router[_0x936f[18]](_0x936f[4],auth[_0x936f[5]](),auth[_0x936f[7]]([19],[_0x936f[6]]),controller[_0x936f[19]]);router[_0x936f[21]](_0x936f[14],auth[_0x936f[5]](),auth[_0x936f[7]]([19],[_0x936f[6]]),controller[_0x936f[20]]);router[_0x936f[23]](_0x936f[4],auth[_0x936f[5]](),auth[_0x936f[7]]([19],[_0x936f[6]]),controller[_0x936f[22]]);router[_0x936f[23]](_0x936f[14],auth[_0x936f[5]](),auth[_0x936f[7]]([19],[_0x936f[6]]),controller[_0x936f[24]]);module[_0x936f[25]]= router \ No newline at end of file +'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; diff --git a/server/api/sugarcrm_account/sugarcrm_account.controller.js b/server/api/sugarcrm_account/sugarcrm_account.controller.js index aef9e64..344c0ed 100644 --- a/server/api/sugarcrm_account/sugarcrm_account.controller.js +++ b/server/api/sugarcrm_account/sugarcrm_account.controller.js @@ -1 +1,202 @@ -var _0xe134=["\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"];_0xe134[0];var _=require(_0xe134[1]);var Util=require(_0xe134[2]);var SugarcrmAccount=require(_0xe134[4])[_0xe134[3]];function handleError(_0xbf36x5,_0xbf36x6){_0xbf36x6= _0xbf36x6|| 500;return function(_0xbf36x7){_0xbf36x5[_0xe134[6]](_0xbf36x6)[_0xe134[5]](_0xbf36x7)}}function responseWithResult(_0xbf36x5,_0xbf36x6){_0xbf36x6= _0xbf36x6|| 200;return function(_0xbf36x9){if(_0xbf36x9){_0xbf36x5[_0xe134[6]](_0xbf36x6)[_0xe134[7]](_0xbf36x9)}}}function responseWithoutResult(_0xbf36x5,_0xbf36x6){_0xbf36x6= _0xbf36x6|| 200;return function(){_0xbf36x5[_0xe134[8]](_0xbf36x6)}}function handleEntityNotFound(_0xbf36x5){return function(_0xbf36x9){if(!_0xbf36x9){_0xbf36x5[_0xe134[6]](404)[_0xe134[9]]();return null};return _0xbf36x9}}function saveUpdates(_0xbf36xd){return function(_0xbf36x9){return _0xbf36x9[_0xe134[11]](_0xbf36xd)[_0xe134[10]](function(_0xbf36xe){return _0xbf36xe})}}function removeEntity(_0xbf36x5){return function(_0xbf36x9){if(_0xbf36x9){return _0xbf36x9[_0xe134[12]]()[_0xe134[10]](function(){_0xbf36x5[_0xe134[6]](204)[_0xe134[9]]()})}}}exports[_0xe134[13]]= function(_0xbf36x10,_0xbf36x5){return SugarcrmAccount[_0xe134[20]](_0xe134[19])[_0xe134[18]](_[_0xe134[17]](Util[_0xe134[16]](_0xbf36x10[_0xe134[15]]),{distinct:true}))[_0xe134[10]](responseWithResult(_0xbf36x5))[_0xe134[14]](handleError(_0xbf36x5))};exports[_0xe134[21]]= function(_0xbf36x10,_0xbf36x5){return SugarcrmAccount[_0xe134[24]](_0xbf36x10[_0xe134[23]][_0xe134[22]])[_0xe134[10]](handleEntityNotFound(_0xbf36x5))[_0xe134[10]](responseWithResult(_0xbf36x5))[_0xe134[14]](handleError(_0xbf36x5))};exports[_0xe134[25]]= function(_0xbf36x10,_0xbf36x5){return SugarcrmAccount[_0xe134[25]](_0xbf36x10[_0xe134[26]])[_0xe134[10]](responseWithResult(_0xbf36x5,201))[_0xe134[14]](handleError(_0xbf36x5))};exports[_0xe134[27]]= function(_0xbf36x10,_0xbf36x5){if(_0xbf36x10[_0xe134[26]][_0xe134[22]]){delete _0xbf36x10[_0xe134[26]][_0xe134[22]]};return SugarcrmAccount[_0xe134[24]](_0xbf36x10[_0xe134[23]][_0xe134[22]])[_0xe134[10]](handleEntityNotFound(_0xbf36x5))[_0xe134[10]](saveUpdates(_0xbf36x10[_0xe134[26]]))[_0xe134[10]](responseWithResult(_0xbf36x5))[_0xe134[14]](handleError(_0xbf36x5))};exports[_0xe134[12]]= function(_0xbf36x10,_0xbf36x5){return SugarcrmAccount[_0xe134[24]](_0xbf36x10[_0xe134[23]][_0xe134[22]])[_0xe134[10]](handleEntityNotFound(_0xbf36x5))[_0xe134[10]](removeEntity(_0xbf36x5))[_0xe134[14]](handleError(_0xbf36x5))};exports[_0xe134[28]]= function(_0xbf36x10,_0xbf36x5){return SugarcrmAccount[_0xe134[24]](_0xbf36x10[_0xe134[23]][_0xe134[22]])[_0xe134[10]](handleEntityNotFound(_0xbf36x5))[_0xe134[10]](function(_0xbf36x11){var _0xbf36x12=require(_0xe134[29]);_0xbf36x12[_0xe134[35]]({apiURL:Util[_0xe134[31]](_0xbf36x11[_0xe134[30]])+ _0xe134[32],login:_0xbf36x11[_0xe134[33]],passwd:_0xbf36x11[_0xe134[34]]});_0xbf36x12[_0xe134[36]](function(_0xbf36x13){if(!_0xbf36x13){return _0xbf36x5[_0xe134[8]](400)};return _0xbf36x5[_0xe134[8]](200)})})[_0xe134[14]](handleError(_0xbf36x5))};exports[_0xe134[37]]= function(_0xbf36x10,_0xbf36x5){SugarcrmAccount[_0xe134[12]]({where:{id:_0xbf36x10[_0xe134[15]][_0xe134[38]]},individualHooks:true})[_0xe134[10]](function(){return _0xbf36x5[_0xe134[8]](204)})[_0xe134[14]](handleError(_0xbf36x5))};exports[_0xe134[39]]= function(_0xbf36x10,_0xbf36x5){var _0xbf36x14={};_0xbf36x14[_0xbf36x10[_0xe134[23]][_0xe134[40]]]= _0xbf36x10[_0xe134[26]][_0xe134[41]];return SugarcrmAccount[_0xe134[18]]({where:_0xbf36x14})[_0xe134[10]](function(_0xbf36x15){if(_0xbf36x15[_0xe134[42]]){return _0xbf36x5[_0xe134[6]](200)[_0xe134[5]]({isValid:false,value:_0xbf36x10[_0xe134[26]][_0xe134[41]]})};return _0xbf36x5[_0xe134[6]](200)[_0xe134[5]]({isValid:true,value:_0xbf36x10[_0xe134[26]][_0xe134[41]]})})[_0xe134[14]](function(_0xbf36x7){return handleError(_0xbf36x5,_0xbf36x7)})};exports[_0xe134[43]]= function(_0xbf36x10,_0xbf36x5){var _0xbf36x12=require(_0xe134[29]);return SugarcrmAccount[_0xe134[24]](_0xbf36x10[_0xe134[23]][_0xe134[22]])[_0xe134[10]](handleEntityNotFound(_0xbf36x5))[_0xe134[10]](function(_0xbf36x11){_0xbf36x12[_0xe134[35]]({apiURL:Util[_0xe134[31]](_0xbf36x11[_0xe134[30]])+ _0xe134[32],login:_0xbf36x11[_0xe134[33]],passwd:_0xbf36x11[_0xe134[34]]});_0xbf36x12[_0xe134[36]](function(_0xbf36x13){if(!_0xbf36x13){return _0xbf36x5[_0xe134[8]](400)};var _0xbf36x16={session:_0xbf36x13,module_name:_0xe134[44]};_0xbf36x12[_0xe134[47]](_0xe134[45],_0xbf36x16,function(_0xbf36x15,_0xbf36x7){if(_0xbf36x7){return _0xbf36x5[_0xe134[8]](400)};return _0xbf36x5[_0xe134[6]](200)[_0xe134[5]](_0xbf36x15[_0xe134[46]])})})})[_0xe134[14]](handleError(_0xbf36x5))} \ No newline at end of file +/** + * 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)); +}; diff --git a/server/api/sugarcrm_account/sugarcrm_account.events.js b/server/api/sugarcrm_account/sugarcrm_account.events.js index 9c2aac2..b65ac40 100644 --- a/server/api/sugarcrm_account/sugarcrm_account.events.js +++ b/server/api/sugarcrm_account/sugarcrm_account.events.js @@ -1 +1,36 @@ -var _0xfde1=["\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"];_0xfde1[0];const EventEmitter=require(_0xfde1[1]);const SugarcrmAccount=require(_0xfde1[3])[_0xfde1[2]];var SugarcrmAccountEvents= new EventEmitter();SugarcrmAccountEvents[_0xfde1[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xfde1[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xfde1[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xfde1[6]};for(var e in events){var event=events[e];SugarcrmAccount[_0xfde1[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x23bfx8,_0x23bfx9,_0x23bfxa){SugarcrmAccountEvents[_0xfde1[10]](event+ _0xfde1[8]+ _0x23bfx8[_0xfde1[9]],_0x23bfx8);SugarcrmAccountEvents[_0xfde1[10]](event,_0x23bfx8);_0x23bfxa(null)}}module[_0xfde1[11]]= SugarcrmAccountEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/sugarcrm_account/sugarcrm_account.socket.js b/server/api/sugarcrm_account/sugarcrm_account.socket.js index 37232dc..5a94608 100644 --- a/server/api/sugarcrm_account/sugarcrm_account.socket.js +++ b/server/api/sugarcrm_account/sugarcrm_account.socket.js @@ -1 +1,32 @@ -var _0x7885=["\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"];_0x7885[0];const SugarcrmAccountEvents=require(_0x7885[1]);var events=[_0x7885[2],_0x7885[3]];exports[_0x7885[4]]= function(_0xaa0fx3){for(var _0xaa0fx4=0,_0xaa0fx5=events[_0x7885[5]];_0xaa0fx4< _0xaa0fx5;_0xaa0fx4++){var _0xaa0fx6=events[_0xaa0fx4];var _0xaa0fx7=createListener(_0x7885[6]+ _0xaa0fx6,_0xaa0fx3);SugarcrmAccountEvents[_0x7885[7]](_0xaa0fx6,_0xaa0fx7);_0xaa0fx3[_0x7885[7]](_0x7885[8],removeListener(_0xaa0fx6,_0xaa0fx7))}};function createListener(_0xaa0fx6,_0xaa0fx3){return function(_0xaa0fx9){_0xaa0fx3[_0x7885[9]](_0xaa0fx6,_0xaa0fx9)}}function removeListener(_0xaa0fx6,_0xaa0fx7){return function(){SugarcrmAccountEvents[_0x7885[10]](_0xaa0fx6,_0xaa0fx7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/sugarcrm_configuration/index.js b/server/api/sugarcrm_configuration/index.js index 3ed8c66..a7bbe3c 100644 --- a/server/api/sugarcrm_configuration/index.js +++ b/server/api/sugarcrm_configuration/index.js @@ -1 +1,17 @@ -var _0xbed3=["\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"];_0xbed3[0];var express=require(_0xbed3[1]);var auth=require(_0xbed3[2]);var controller=require(_0xbed3[3]);var router=express.Router();router[_0xbed3[9]](_0xbed3[4],auth[_0xbed3[5]](),auth[_0xbed3[7]]([19],[_0xbed3[6]]),controller[_0xbed3[8]]);router[_0xbed3[9]](_0xbed3[10],auth[_0xbed3[5]](),auth[_0xbed3[7]]([19],[_0xbed3[6]]),controller[_0xbed3[11]]);router[_0xbed3[13]](_0xbed3[4],auth[_0xbed3[5]](),auth[_0xbed3[7]]([19],[_0xbed3[6]]),controller[_0xbed3[12]]);router[_0xbed3[15]](_0xbed3[10],auth[_0xbed3[5]](),auth[_0xbed3[7]]([19],[_0xbed3[6]]),controller[_0xbed3[14]]);router[_0xbed3[13]](_0xbed3[16],auth[_0xbed3[5]](),auth[_0xbed3[7]]([19],[_0xbed3[6]]),controller[_0xbed3[17]]);router[_0xbed3[19]](_0xbed3[10],auth[_0xbed3[5]](),auth[_0xbed3[7]]([19],[_0xbed3[6]]),controller[_0xbed3[18]]);module[_0xbed3[20]]= router \ No newline at end of file +'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; diff --git a/server/api/sugarcrm_configuration/sugarcrm_configuration.controller.js b/server/api/sugarcrm_configuration/sugarcrm_configuration.controller.js index 48c678c..5918283 100644 --- a/server/api/sugarcrm_configuration/sugarcrm_configuration.controller.js +++ b/server/api/sugarcrm_configuration/sugarcrm_configuration.controller.js @@ -1 +1,145 @@ -var _0x5421=["\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"];_0x5421[0];var _=require(_0x5421[1]);var SugarcrmConfiguration=require(_0x5421[3])[_0x5421[2]];var SugarcrmField=require(_0x5421[3])[_0x5421[4]];function handleError(_0xf31ex5,_0xf31ex6){_0xf31ex6= _0xf31ex6|| 500;return function(_0xf31ex7){_0xf31ex5[_0x5421[6]](_0xf31ex6)[_0x5421[5]](_0xf31ex7)}}function responseWithResult(_0xf31ex5,_0xf31ex6){_0xf31ex6= _0xf31ex6|| 200;return function(_0xf31ex9){if(_0xf31ex9){_0xf31ex5[_0x5421[6]](_0xf31ex6)[_0x5421[7]](_0xf31ex9)}}}function handleEntityNotFound(_0xf31ex5){return function(_0xf31ex9){if(!_0xf31ex9){_0xf31ex5[_0x5421[6]](404)[_0x5421[8]]();return null};return _0xf31ex9}}function saveUpdates(_0xf31exc){return function(_0xf31ex9){return _0xf31ex9[_0x5421[10]](_0xf31exc)[_0x5421[9]](function(_0xf31exd){return _0xf31exd})}}function removeEntity(_0xf31ex5){return function(_0xf31ex9){if(_0xf31ex9){return _0xf31ex9[_0x5421[11]]()[_0x5421[9]](function(){_0xf31ex5[_0x5421[6]](204)[_0x5421[8]]()})}}}exports[_0x5421[12]]= function(_0xf31exf,_0xf31ex5){SugarcrmConfiguration[_0x5421[15]]({where:_0xf31exf[_0x5421[14]]})[_0x5421[9]](responseWithResult(_0xf31ex5))[_0x5421[13]](handleError(_0xf31ex5))};exports[_0x5421[16]]= function(_0xf31exf,_0xf31ex5){SugarcrmConfiguration[_0x5421[22]]({where:{id:_0xf31exf[_0x5421[18]][_0x5421[17]]},include:[{model:SugarcrmField,as:_0x5421[19]},{model:SugarcrmField,as:_0x5421[20]},{model:SugarcrmField,as:_0x5421[21]}]})[_0x5421[9]](handleEntityNotFound(_0xf31ex5))[_0x5421[9]](responseWithResult(_0xf31ex5))[_0x5421[13]](handleError(_0xf31ex5))};exports[_0x5421[23]]= function(_0xf31exf,_0xf31ex5){SugarcrmConfiguration[_0x5421[23]](_0xf31exf[_0x5421[24]])[_0x5421[9]](responseWithResult(_0xf31ex5,201))[_0x5421[13]](handleError(_0xf31ex5))};exports[_0x5421[25]]= function(_0xf31exf,_0xf31ex5){if(_0xf31exf[_0x5421[24]][_0x5421[17]]){delete _0xf31exf[_0x5421[24]][_0x5421[17]]};SugarcrmConfiguration[_0x5421[26]](_0xf31exf[_0x5421[18]][_0x5421[17]])[_0x5421[9]](handleEntityNotFound(_0xf31ex5))[_0x5421[9]](saveUpdates(_0xf31exf[_0x5421[24]]))[_0x5421[9]](responseWithResult(_0xf31ex5))[_0x5421[13]](handleError(_0xf31ex5))};exports[_0x5421[11]]= function(_0xf31exf,_0xf31ex5){SugarcrmConfiguration[_0x5421[26]](_0xf31exf[_0x5421[18]][_0x5421[17]])[_0x5421[9]](handleEntityNotFound(_0xf31ex5))[_0x5421[9]](removeEntity(_0xf31ex5))[_0x5421[13]](handleError(_0xf31ex5))};exports[_0x5421[27]]= function(_0xf31exf,_0xf31ex5,_0xf31ex10){var _0xf31ex11;SugarcrmConfiguration[_0x5421[26]](_0xf31exf[_0x5421[18]][_0x5421[17]])[_0x5421[9]](handleEntityNotFound(_0xf31ex5))[_0x5421[9]](function(_0xf31ex14){_0xf31ex11= _0xf31ex14;return SugarcrmField[_0x5421[23]](_0xf31exf[_0x5421[24]])})[_0x5421[9]](function(_0xf31ex13){switch(_0xf31exf[_0x5421[18]][_0x5421[35]]){case _0x5421[30]:return [_0xf31ex11[_0x5421[29]](_0xf31ex13),_0xf31ex13];case _0x5421[32]:return [_0xf31ex11[_0x5421[31]](_0xf31ex13),_0xf31ex13];case _0x5421[34]:return [_0xf31ex11[_0x5421[33]](_0xf31ex13),_0xf31ex13]}})[_0x5421[28]](function(_0xf31ex12,_0xf31ex13){return _0xf31ex5[_0x5421[6]](201)[_0x5421[7]](_0xf31ex13)})[_0x5421[13]](handleError(_0xf31ex5))} \ No newline at end of file +/** + * 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)); +}; diff --git a/server/api/sugarcrm_configuration/sugarcrm_configuration.events.js b/server/api/sugarcrm_configuration/sugarcrm_configuration.events.js index f8bbf21..f1764e0 100644 --- a/server/api/sugarcrm_configuration/sugarcrm_configuration.events.js +++ b/server/api/sugarcrm_configuration/sugarcrm_configuration.events.js @@ -1 +1,36 @@ -var _0x8769=["\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"];_0x8769[0];const EventEmitter=require(_0x8769[1]);const SugarcrmConfiguration=require(_0x8769[3])[_0x8769[2]];var SugarcrmConfigurationEvents= new EventEmitter();SugarcrmConfigurationEvents[_0x8769[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x8769[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x8769[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x8769[6]};for(var e in events){var event=events[e];SugarcrmConfiguration[_0x8769[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x3a32x8,_0x3a32x9,_0x3a32xa){SugarcrmConfigurationEvents[_0x8769[10]](event+ _0x8769[8]+ _0x3a32x8[_0x8769[9]],_0x3a32x8);SugarcrmConfigurationEvents[_0x8769[10]](event,_0x3a32x8);_0x3a32xa(null)}}module[_0x8769[11]]= SugarcrmConfigurationEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/sugarcrm_configuration/sugarcrm_configuration.socket.js b/server/api/sugarcrm_configuration/sugarcrm_configuration.socket.js index 8580423..3a1b051 100644 --- a/server/api/sugarcrm_configuration/sugarcrm_configuration.socket.js +++ b/server/api/sugarcrm_configuration/sugarcrm_configuration.socket.js @@ -1 +1,32 @@ -var _0x48ea=["\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"];_0x48ea[0];const SugarcrmConfigurationEvents=require(_0x48ea[1]);var events=[_0x48ea[2],_0x48ea[3]];exports[_0x48ea[4]]= function(_0x3b73x3){for(var _0x3b73x4=0,_0x3b73x5=events[_0x48ea[5]];_0x3b73x4< _0x3b73x5;_0x3b73x4++){var _0x3b73x6=events[_0x3b73x4];var _0x3b73x7=createListener(_0x48ea[6]+ _0x3b73x6,_0x3b73x3);SugarcrmConfigurationEvents[_0x48ea[7]](_0x3b73x6,_0x3b73x7);_0x3b73x3[_0x48ea[7]](_0x48ea[8],removeListener(_0x3b73x6,_0x3b73x7))}};function createListener(_0x3b73x6,_0x3b73x3){return function(_0x3b73x9){_0x3b73x3[_0x48ea[9]](_0x3b73x6,_0x3b73x9)}}function removeListener(_0x3b73x6,_0x3b73x7){return function(){SugarcrmConfigurationEvents[_0x48ea[10]](_0x3b73x6,_0x3b73x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/sugarcrm_field/index.js b/server/api/sugarcrm_field/index.js index 4b3c936..30e2ad2 100644 --- a/server/api/sugarcrm_field/index.js +++ b/server/api/sugarcrm_field/index.js @@ -1 +1,17 @@ -var _0xf628=["\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"];_0xf628[0];var express=require(_0xf628[1]);var auth=require(_0xf628[2]);var controller=require(_0xf628[3]);var router=express.Router();router[_0xf628[7]](_0xf628[4],auth[_0xf628[5]](),controller[_0xf628[6]]);router[_0xf628[7]](_0xf628[8],auth[_0xf628[5]](),auth[_0xf628[10]]([19],[_0xf628[9]]),controller[_0xf628[11]]);router[_0xf628[13]](_0xf628[4],auth[_0xf628[5]](),auth[_0xf628[10]]([19],[_0xf628[9]]),controller[_0xf628[12]]);router[_0xf628[15]](_0xf628[8],auth[_0xf628[5]](),auth[_0xf628[10]]([19],[_0xf628[9]]),controller[_0xf628[14]]);router[_0xf628[17]](_0xf628[8],auth[_0xf628[5]](),auth[_0xf628[10]]([19],[_0xf628[9]]),controller[_0xf628[16]]);module[_0xf628[18]]= router \ No newline at end of file +'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; diff --git a/server/api/sugarcrm_field/sugarcrm_field.controller.js b/server/api/sugarcrm_field/sugarcrm_field.controller.js index 45f0916..eb6fe3d 100644 --- a/server/api/sugarcrm_field/sugarcrm_field.controller.js +++ b/server/api/sugarcrm_field/sugarcrm_field.controller.js @@ -1 +1,104 @@ -var _0xa827=["\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"];_0xa827[0];var _=require(_0xa827[1]);var SugarcrmField=require(_0xa827[3])[_0xa827[2]];function handleError(_0x2537x4,_0x2537x5){_0x2537x5= _0x2537x5|| 500;return function(_0x2537x6){_0x2537x4[_0xa827[5]](_0x2537x5)[_0xa827[4]](_0x2537x6)}}function responseWithResult(_0x2537x4,_0x2537x5){_0x2537x5= _0x2537x5|| 200;return function(_0x2537x8){if(_0x2537x8){_0x2537x4[_0xa827[5]](_0x2537x5)[_0xa827[6]](_0x2537x8)}}}function handleEntityNotFound(_0x2537x4){return function(_0x2537x8){if(!_0x2537x8){_0x2537x4[_0xa827[5]](404)[_0xa827[7]]();return null};return _0x2537x8}}function saveUpdates(_0x2537xb){return function(_0x2537x8){return _0x2537x8[_0xa827[9]](_0x2537xb)[_0xa827[8]](function(_0x2537xc){return _0x2537xc})}}function removeEntity(_0x2537x4){return function(_0x2537x8){if(_0x2537x8){return _0x2537x8[_0xa827[10]]()[_0xa827[8]](function(){_0x2537x4[_0xa827[5]](204)[_0xa827[7]]()})}}}exports[_0xa827[11]]= function(_0x2537xe,_0x2537x4){SugarcrmField[_0xa827[13]]()[_0xa827[8]](responseWithResult(_0x2537x4))[_0xa827[12]](handleError(_0x2537x4))};exports[_0xa827[14]]= function(_0x2537xe,_0x2537x4){SugarcrmField[_0xa827[17]](_0x2537xe[_0xa827[16]][_0xa827[15]])[_0xa827[8]](handleEntityNotFound(_0x2537x4))[_0xa827[8]](responseWithResult(_0x2537x4))[_0xa827[12]](handleError(_0x2537x4))};exports[_0xa827[18]]= function(_0x2537xe,_0x2537x4){SugarcrmField[_0xa827[18]](_0x2537xe[_0xa827[19]])[_0xa827[8]](responseWithResult(_0x2537x4,201))[_0xa827[12]](handleError(_0x2537x4))};exports[_0xa827[20]]= function(_0x2537xe,_0x2537x4){if(_0x2537xe[_0xa827[19]][_0xa827[15]]){delete _0x2537xe[_0xa827[19]][_0xa827[15]]};SugarcrmField[_0xa827[17]](_0x2537xe[_0xa827[16]][_0xa827[15]])[_0xa827[8]](handleEntityNotFound(_0x2537x4))[_0xa827[8]](saveUpdates(_0x2537xe[_0xa827[19]]))[_0xa827[8]](responseWithResult(_0x2537x4))[_0xa827[12]](handleError(_0x2537x4))};exports[_0xa827[10]]= function(_0x2537xe,_0x2537x4){SugarcrmField[_0xa827[17]](_0x2537xe[_0xa827[16]][_0xa827[15]])[_0xa827[8]](handleEntityNotFound(_0x2537x4))[_0xa827[8]](removeEntity(_0x2537x4))[_0xa827[12]](handleError(_0x2537x4))} \ No newline at end of file +/** + * 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)); +} diff --git a/server/api/sugarcrm_field/sugarcrm_field.events.js b/server/api/sugarcrm_field/sugarcrm_field.events.js index 3ce24a0..0845bee 100644 --- a/server/api/sugarcrm_field/sugarcrm_field.events.js +++ b/server/api/sugarcrm_field/sugarcrm_field.events.js @@ -1 +1,36 @@ -var _0xc1fd=["\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"];_0xc1fd[0];const EventEmitter=require(_0xc1fd[1]);const SugarcrmField=require(_0xc1fd[3])[_0xc1fd[2]];var SugarcrmFieldEvents= new EventEmitter();SugarcrmFieldEvents[_0xc1fd[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xc1fd[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xc1fd[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xc1fd[6]};for(var e in events){var event=events[e];SugarcrmField[_0xc1fd[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x9bccx8,_0x9bccx9,_0x9bccxa){SugarcrmFieldEvents[_0xc1fd[10]](event+ _0xc1fd[8]+ _0x9bccx8[_0xc1fd[9]],_0x9bccx8);SugarcrmFieldEvents[_0xc1fd[10]](event,_0x9bccx8);_0x9bccxa(null)}}module[_0xc1fd[11]]= SugarcrmFieldEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/sugarcrm_field/sugarcrm_field.socket.js b/server/api/sugarcrm_field/sugarcrm_field.socket.js index 4711490..8830ac2 100644 --- a/server/api/sugarcrm_field/sugarcrm_field.socket.js +++ b/server/api/sugarcrm_field/sugarcrm_field.socket.js @@ -1 +1,32 @@ -var _0xdd76=["\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"];_0xdd76[0];const SugarcrmFieldEvents=require(_0xdd76[1]);var events=[_0xdd76[2],_0xdd76[3]];exports[_0xdd76[4]]= function(_0x24efx3){for(var _0x24efx4=0,_0x24efx5=events[_0xdd76[5]];_0x24efx4< _0x24efx5;_0x24efx4++){var _0x24efx6=events[_0x24efx4];var _0x24efx7=createListener(_0xdd76[6]+ _0x24efx6,_0x24efx3);SugarcrmFieldEvents[_0xdd76[7]](_0x24efx6,_0x24efx7);_0x24efx3[_0xdd76[7]](_0xdd76[8],removeListener(_0x24efx6,_0x24efx7))}};function createListener(_0x24efx6,_0x24efx3){return function(_0x24efx9){_0x24efx3[_0xdd76[9]](_0x24efx6,_0x24efx9)}}function removeListener(_0x24efx6,_0x24efx7){return function(){SugarcrmFieldEvents[_0xdd76[10]](_0x24efx6,_0x24efx7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/tag/index.js b/server/api/tag/index.js index a13d7c1..1751dda 100644 --- a/server/api/tag/index.js +++ b/server/api/tag/index.js @@ -1 +1,171 @@ -var _0xe9ea=["\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"];_0xe9ea[0];var express=require(_0xe9ea[1]);var controller=require(_0xe9ea[2]);var auth=require(_0xe9ea[3]);var router=express.Router();router[_0xe9ea[10]](_0xe9ea[4],auth[_0xe9ea[5]](),auth[_0xe9ea[8]]([5,9,13],[_0xe9ea[6],_0xe9ea[7]]),controller[_0xe9ea[9]]);router[_0xe9ea[10]](_0xe9ea[11],auth[_0xe9ea[5]](),auth[_0xe9ea[8]]([13],[_0xe9ea[6]]),controller[_0xe9ea[12]]);router[_0xe9ea[10]](_0xe9ea[13],auth[_0xe9ea[5]](),auth[_0xe9ea[8]]([13],[_0xe9ea[6]]),controller[_0xe9ea[14]]);router[_0xe9ea[10]](_0xe9ea[15],auth[_0xe9ea[5]](),auth[_0xe9ea[8]]([13],[_0xe9ea[6]]),controller[_0xe9ea[16]]);router[_0xe9ea[10]](_0xe9ea[17],auth[_0xe9ea[5]](),auth[_0xe9ea[8]]([13],[_0xe9ea[6]]),controller[_0xe9ea[18]]);router[_0xe9ea[10]](_0xe9ea[19],auth[_0xe9ea[5]](),auth[_0xe9ea[8]]([13],[_0xe9ea[6]]),controller[_0xe9ea[20]]);router[_0xe9ea[10]](_0xe9ea[21],auth[_0xe9ea[5]](),auth[_0xe9ea[8]]([13],[_0xe9ea[6]]),controller[_0xe9ea[22]]);router[_0xe9ea[24]](_0xe9ea[4],auth[_0xe9ea[5]](),auth[_0xe9ea[8]]([5,13],[_0xe9ea[6],_0xe9ea[7]]),controller[_0xe9ea[23]]);router[_0xe9ea[26]](_0xe9ea[11],auth[_0xe9ea[5]](),auth[_0xe9ea[8]]([13],[_0xe9ea[6]]),controller[_0xe9ea[25]]);router[_0xe9ea[28]](_0xe9ea[4],auth[_0xe9ea[5]](),auth[_0xe9ea[8]]([13],[_0xe9ea[6]]),controller[_0xe9ea[27]]);router[_0xe9ea[28]](_0xe9ea[11],auth[_0xe9ea[5]](),auth[_0xe9ea[8]]([13],[_0xe9ea[6]]),controller[_0xe9ea[29]]);module[_0xe9ea[30]]= router \ No newline at end of file +'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; diff --git a/server/api/tag/tag.controller.js b/server/api/tag/tag.controller.js index 57c66ac..8caf0e0 100644 --- a/server/api/tag/tag.controller.js +++ b/server/api/tag/tag.controller.js @@ -1 +1,209 @@ -var _0x8b99=["\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"];_0x8b99[0];var _=require(_0x8b99[1]);var Tag=require(_0x8b99[3])[_0x8b99[2]];var ChatRoom=require(_0x8b99[3])[_0x8b99[4]];var ChatWebsite=require(_0x8b99[3])[_0x8b99[5]];var ChatVisitor=require(_0x8b99[3])[_0x8b99[6]];var MailRoom=require(_0x8b99[3])[_0x8b99[7]];var FaxRoom=require(_0x8b99[3])[_0x8b99[8]];var SmsRoom=require(_0x8b99[3])[_0x8b99[9]];var Contact=require(_0x8b99[3])[_0x8b99[10]];var Util=require(_0x8b99[11]);exports[_0x8b99[12]]= function(_0x575dxb,_0x575dxc,_0x575dxd){return Tag[_0x8b99[19]](Util[_0x8b99[18]](_0x575dxb[_0x8b99[17]]))[_0x8b99[16]](function(_0x575dxf){_0x575dxc[_0x8b99[15]](200)[_0x8b99[14]](_0x575dxf)})[_0x8b99[13]](function(_0x575dxe){return handleError(_0x575dxc,_0x575dxe)})};exports[_0x8b99[20]]= function(_0x575dxb,_0x575dxc){return Tag[_0x8b99[24]](_0x575dxb[_0x8b99[23]][_0x8b99[22]])[_0x8b99[16]](function(_0x575dx10){if(!_0x575dx10){return _0x575dxc[_0x8b99[21]](404)};return _0x575dxc[_0x8b99[14]](_0x575dx10)})[_0x8b99[13]](function(_0x575dxe){return handleError(_0x575dxc,_0x575dxe)})};exports[_0x8b99[25]]= function(_0x575dxb,_0x575dxc){return ChatRoom[_0x8b99[19]](_[_0x8b99[29]](Util[_0x8b99[18]](_0x575dxb[_0x8b99[17]],{tags:{$like:_0x8b99[26]+ _0x575dxb[_0x8b99[23]][_0x8b99[27]]+ _0x8b99[28]}}),{include:[ChatWebsite,ChatVisitor]}))[_0x8b99[16]](function(_0x575dxf){_0x575dxc[_0x8b99[15]](200)[_0x8b99[14]](_0x575dxf)})[_0x8b99[13]](function(_0x575dxe){return handleError(_0x575dxc,_0x575dxe)})};exports[_0x8b99[30]]= function(_0x575dxb,_0x575dxc){return MailRoom[_0x8b99[32]](_0x8b99[31])[_0x8b99[19]](Util[_0x8b99[18]](_0x575dxb[_0x8b99[17]],{tags:{$like:_0x8b99[26]+ _0x575dxb[_0x8b99[23]][_0x8b99[27]]+ _0x8b99[28]}}))[_0x8b99[16]](function(_0x575dxf){_0x575dxc[_0x8b99[15]](200)[_0x8b99[14]](_0x575dxf)})[_0x8b99[13]](function(_0x575dxe){return handleError(_0x575dxc,_0x575dxe)})};exports[_0x8b99[33]]= function(_0x575dxb,_0x575dxc){return FaxRoom[_0x8b99[32]](_0x8b99[31])[_0x8b99[19]](Util[_0x8b99[18]](_0x575dxb[_0x8b99[17]],{tags:{$like:_0x8b99[26]+ _0x575dxb[_0x8b99[23]][_0x8b99[27]]+ _0x8b99[28]}}))[_0x8b99[16]](function(_0x575dxf){_0x575dxc[_0x8b99[15]](200)[_0x8b99[14]](_0x575dxf)})[_0x8b99[13]](function(_0x575dxe){return handleError(_0x575dxc,_0x575dxe)})};exports[_0x8b99[34]]= function(_0x575dxb,_0x575dxc){return SmsRoom[_0x8b99[32]](_0x8b99[31])[_0x8b99[19]](Util[_0x8b99[18]](_0x575dxb[_0x8b99[17]],{tags:{$like:_0x8b99[26]+ _0x575dxb[_0x8b99[23]][_0x8b99[27]]+ _0x8b99[28]}}))[_0x8b99[16]](function(_0x575dxf){_0x575dxc[_0x8b99[15]](200)[_0x8b99[14]](_0x575dxf)})[_0x8b99[13]](function(_0x575dxe){return handleError(_0x575dxc,_0x575dxe)})};exports[_0x8b99[35]]= function(_0x575dxb,_0x575dxc){return Contact[_0x8b99[32]](_0x8b99[37],_0x8b99[38],{method:[_0x8b99[39],_0x575dxb[_0x8b99[17]]]})[_0x8b99[19]](Util[_0x8b99[18]](_0x575dxb[_0x8b99[17]],{tags:{$like:_0x8b99[26]+ _0x575dxb[_0x8b99[23]][_0x8b99[27]]+ _0x8b99[28]}}))[_0x8b99[16]](function(_0x575dxf){_0x575dxc[_0x8b99[15]](200)[_0x8b99[14]](_0x575dxf)})[_0x8b99[13]](function(_0x575dxe){console[_0x8b99[36]](_0x575dxe);return handleError(_0x575dxc,_0x575dxe)})};exports[_0x8b99[40]]= function(_0x575dxb,_0x575dxc){return Tag[_0x8b99[40]](_0x575dxb[_0x8b99[41]])[_0x8b99[16]](function(_0x575dx10){return _0x575dxc[_0x8b99[15]](201)[_0x8b99[14]](_0x575dx10)})[_0x8b99[13]](function(_0x575dxe){return handleError(_0x575dxc,_0x575dxe)})};exports[_0x8b99[42]]= function(_0x575dxb,_0x575dxc){if(_0x575dxb[_0x8b99[41]][_0x8b99[22]]){delete _0x575dxb[_0x8b99[41]][_0x8b99[22]]};return Tag[_0x8b99[24]](_0x575dxb[_0x8b99[23]][_0x8b99[22]])[_0x8b99[16]](function(_0x575dx10){if(!_0x575dx10){return _0x575dxc[_0x8b99[21]](404)};var _0x575dx11=_[_0x8b99[29]](_0x575dx10,_0x575dxb[_0x8b99[41]]);return _0x575dx11[_0x8b99[43]]()})[_0x8b99[16]](function(_0x575dx10){return _0x575dxc[_0x8b99[15]](200)[_0x8b99[14]](_0x575dx10)})[_0x8b99[13]](function(_0x575dxe){return handleError(_0x575dxc,_0x575dxe)})};exports[_0x8b99[44]]= function(_0x575dxb,_0x575dxc){return Tag[_0x8b99[32]](_0x8b99[47])[_0x8b99[24]](_0x575dxb[_0x8b99[23]][_0x8b99[22]])[_0x8b99[16]](function(_0x575dx10){if(!_0x575dx10){return _0x575dxc[_0x8b99[21]](404)};if(tagHasAssociation(_0x575dx10)){var _0x575dxe= new Error();_0x575dxe[_0x8b99[45]]= _0x8b99[46];throw _0x575dxe};return _0x575dx10[_0x8b99[44]]()})[_0x8b99[16]](function(){return _0x575dxc[_0x8b99[21]](204)})[_0x8b99[13]](function(_0x575dxe){return handleError(_0x575dxc,_0x575dxe)})};exports[_0x8b99[48]]= function(_0x575dxb,_0x575dxc){return Tag[_0x8b99[44]]({where:{id:_0x575dxb[_0x8b99[17]][_0x8b99[49]]},individualHooks:true})[_0x8b99[16]](function(){return _0x575dxc[_0x8b99[21]](204)})[_0x8b99[13]](function(_0x575dxe){return handleError(_0x575dxc,_0x575dxe)})};function handleError(_0x575dxc,_0x575dxe){return _0x575dxc[_0x8b99[15]](500)[_0x8b99[14]](_0x575dxe)}function tagHasAssociation(_0x575dx10){return ((_0x575dx10[_0x8b99[50]]&& _0x575dx10[_0x8b99[50]][_0x8b99[51]]> 0))} \ No newline at end of file +'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)); +} diff --git a/server/api/tag/tag.events.js b/server/api/tag/tag.events.js index e689571..61d6e17 100644 --- a/server/api/tag/tag.events.js +++ b/server/api/tag/tag.events.js @@ -1 +1,36 @@ -var _0xf653=["\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"];_0xf653[0];const EventEmitter=require(_0xf653[1]);const Tag=require(_0xf653[3])[_0xf653[2]];var TagEvents= new EventEmitter();TagEvents[_0xf653[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xf653[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xf653[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xf653[6]};for(var e in events){var event=events[e];Tag[_0xf653[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6b23x8,_0x6b23x9,_0x6b23xa){TagEvents[_0xf653[10]](event+ _0xf653[8]+ _0x6b23x8[_0xf653[9]],_0x6b23x8);TagEvents[_0xf653[10]](event,_0x6b23x8);_0x6b23xa(null)}}module[_0xf653[11]]= TagEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/tag/tag.socket.js b/server/api/tag/tag.socket.js index 0e27e0b..6fccbd9 100644 --- a/server/api/tag/tag.socket.js +++ b/server/api/tag/tag.socket.js @@ -1 +1,32 @@ -var _0x414b=["\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"];_0x414b[0];const TagEvents=require(_0x414b[1]);var events=[_0x414b[2],_0x414b[3]];exports[_0x414b[4]]= function(_0xc8bcx3){for(var _0xc8bcx4=0,_0xc8bcx5=events[_0x414b[5]];_0xc8bcx4< _0xc8bcx5;_0xc8bcx4++){var _0xc8bcx6=events[_0xc8bcx4];var _0xc8bcx7=createListener(_0x414b[6]+ _0xc8bcx6,_0xc8bcx3);TagEvents[_0x414b[7]](_0xc8bcx6,_0xc8bcx7);_0xc8bcx3[_0x414b[7]](_0x414b[8],removeListener(_0xc8bcx6,_0xc8bcx7))}};function createListener(_0xc8bcx6,_0xc8bcx3){return function(_0xc8bcx9){_0xc8bcx3[_0x414b[9]](_0xc8bcx6,_0xc8bcx9)}}function removeListener(_0xc8bcx6,_0xc8bcx7){return function(){TagEvents[_0x414b[10]](_0xc8bcx6,_0xc8bcx7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/team/index.js b/server/api/team/index.js index 4df27e7..cfc9a7a 100644 --- a/server/api/team/index.js +++ b/server/api/team/index.js @@ -1 +1,247 @@ -var _0x588b=["\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"];_0x588b[0];var express=require(_0x588b[1]);var controller=require(_0x588b[2]);var auth=require(_0x588b[3]);var router=express.Router();router[_0x588b[9]](_0x588b[4],auth[_0x588b[5]](),auth[_0x588b[7]](_0x588b[6]),controller[_0x588b[8]]);router[_0x588b[9]](_0x588b[10],auth[_0x588b[5]](),auth[_0x588b[11]]([5],[_0x588b[6]]),controller[_0x588b[12]]);router[_0x588b[9]](_0x588b[13],auth[_0x588b[5]](),auth[_0x588b[7]](_0x588b[6]),controller[_0x588b[14]]);router[_0x588b[9]](_0x588b[15],auth[_0x588b[5]](),auth[_0x588b[7]](_0x588b[6]),controller[_0x588b[16]]);router[_0x588b[18]](_0x588b[4],auth[_0x588b[5]](),auth[_0x588b[7]](_0x588b[6]),controller[_0x588b[17]]);router[_0x588b[18]](_0x588b[15],auth[_0x588b[5]](),auth[_0x588b[7]](_0x588b[6]),controller[_0x588b[19]]);router[_0x588b[21]](_0x588b[13],auth[_0x588b[5]](),auth[_0x588b[7]](_0x588b[6]),controller[_0x588b[20]]);router[_0x588b[23]](_0x588b[4],auth[_0x588b[5]](),auth[_0x588b[7]](_0x588b[6]),controller[_0x588b[22]]);router[_0x588b[23]](_0x588b[13],auth[_0x588b[5]](),auth[_0x588b[7]](_0x588b[6]),controller[_0x588b[24]]);router[_0x588b[23]](_0x588b[15],auth[_0x588b[5]](),auth[_0x588b[7]](_0x588b[6]),controller[_0x588b[25]]);module[_0x588b[26]]= router \ No newline at end of file +'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; diff --git a/server/api/team/team.controller.js b/server/api/team/team.controller.js index f16417b..cac8024 100644 --- a/server/api/team/team.controller.js +++ b/server/api/team/team.controller.js @@ -1 +1,252 @@ -var _0x1b3c=["\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"];_0x1b3c[0];var _=require(_0x1b3c[1]);var util=require(_0x1b3c[2]);var Util=require(_0x1b3c[3]);var sequelize=require(_0x1b3c[5])[_0x1b3c[4]];var Team=require(_0x1b3c[5])[_0x1b3c[6]];var Agent=require(_0x1b3c[5])[_0x1b3c[7]];var User=require(_0x1b3c[5])[_0x1b3c[7]];exports[_0x1b3c[8]]= function(_0x3aa1x8,_0x3aa1x9){return Team[_0x1b3c[18]](_0x1b3c[17])[_0x1b3c[16]](_[_0x1b3c[15]](Util[_0x1b3c[14]](_0x3aa1x8[_0x1b3c[13]])))[_0x1b3c[12]](function(_0x3aa1xb){_0x3aa1x9[_0x1b3c[11]](200)[_0x1b3c[10]](_0x3aa1xb)})[_0x1b3c[9]](function(_0x3aa1xa){return handleError(_0x3aa1x9,_0x3aa1xa)})};exports[_0x1b3c[19]]= function(_0x3aa1x8,_0x3aa1x9){switch(_0x3aa1x8[_0x1b3c[28]][_0x1b3c[30]]){case _0x1b3c[28]:return User[_0x1b3c[29]](_0x3aa1x8[_0x1b3c[28]][_0x1b3c[24]])[_0x1b3c[12]](function(_0x3aa1xd){if(!_0x3aa1xd){return _0x3aa1x9[_0x1b3c[27]](404)};return _0x3aa1xd})[_0x1b3c[12]](Util[_0x1b3c[26]](_0x3aa1x8[_0x1b3c[13]]))[_0x1b3c[12]](function(_0x3aa1xc){return Team[_0x1b3c[18]]({method:[_0x1b3c[22],_[_0x1b3c[25]](_0x3aa1xc[_0x1b3c[23]],_0x1b3c[24])]})[_0x1b3c[21]](_[_0x1b3c[15]](Util[_0x1b3c[14]](_0x3aa1x8[_0x1b3c[13]])))})[_0x1b3c[12]](function(_0x3aa1xb){_0x3aa1x9[_0x1b3c[11]](200)[_0x1b3c[10]]({rows:_0x3aa1xb,count:_0x3aa1xb[_0x1b3c[20]]})})[_0x1b3c[9]](function(_0x3aa1xa){return handleError(_0x3aa1x9,_0x3aa1xa)});default:return Team[_0x1b3c[18]](_0x1b3c[22])[_0x1b3c[21]](_[_0x1b3c[15]](Util[_0x1b3c[14]](_0x3aa1x8[_0x1b3c[13]])))[_0x1b3c[12]](function(_0x3aa1xb){_0x3aa1x9[_0x1b3c[11]](200)[_0x1b3c[10]]({rows:_0x3aa1xb,count:_0x3aa1xb[_0x1b3c[20]]})})[_0x1b3c[9]](function(_0x3aa1xa){return handleError(_0x3aa1x9,_0x3aa1xa)})}};exports[_0x1b3c[31]]= function(_0x3aa1x8,_0x3aa1x9){return Team[_0x1b3c[29]](_0x3aa1x8[_0x1b3c[32]][_0x1b3c[24]])[_0x1b3c[12]](function(_0x3aa1xe){if(!_0x3aa1xe){return _0x3aa1x9[_0x1b3c[27]](404)};return _0x3aa1x9[_0x1b3c[10]](_0x3aa1xe)})[_0x1b3c[9]](function(_0x3aa1xa){return handleError(_0x3aa1x9,_0x3aa1xa)})};exports[_0x1b3c[33]]= function(_0x3aa1x8,_0x3aa1x9){switch(_0x3aa1x8[_0x1b3c[28]][_0x1b3c[30]]){case _0x1b3c[28]:return User[_0x1b3c[29]](_0x3aa1x8[_0x1b3c[28]][_0x1b3c[24]])[_0x1b3c[12]](function(_0x3aa1xd){if(!_0x3aa1xd){return _0x3aa1x9[_0x1b3c[27]](404)};return _0x3aa1xd})[_0x1b3c[12]](Util[_0x1b3c[26]](_0x3aa1x8[_0x1b3c[13]]))[_0x1b3c[12]](function(_0x3aa1xc){return Team[_0x1b3c[18]]({method:[_0x1b3c[22],_[_0x1b3c[25]](_0x3aa1xc[_0x1b3c[23]],_0x1b3c[24])]})[_0x1b3c[29]](_0x3aa1x8[_0x1b3c[32]][_0x1b3c[24]])})[_0x1b3c[12]](function(_0x3aa1xe){if(!_0x3aa1xe){return _0x3aa1x9[_0x1b3c[27]](404)};return _0x3aa1x9[_0x1b3c[11]](200)[_0x1b3c[10]]({count:_0x3aa1xe[_0x1b3c[34]][_0x1b3c[20]],rows:_0x3aa1xe[_0x1b3c[34]]})})[_0x1b3c[9]](function(_0x3aa1xa){return handleError(_0x3aa1x9,_0x3aa1xa)});default:return Team[_0x1b3c[18]](_0x1b3c[22])[_0x1b3c[29]](_0x3aa1x8[_0x1b3c[32]][_0x1b3c[24]])[_0x1b3c[12]](function(_0x3aa1xe){if(!_0x3aa1xe){return _0x3aa1x9[_0x1b3c[27]](404)};return _0x3aa1x9[_0x1b3c[11]](200)[_0x1b3c[10]]({count:_0x3aa1xe[_0x1b3c[34]][_0x1b3c[20]],rows:_0x3aa1xe[_0x1b3c[34]]})})[_0x1b3c[9]](function(_0x3aa1xa){return handleError(_0x3aa1x9,_0x3aa1xa)})}};exports[_0x1b3c[35]]= function(_0x3aa1x8,_0x3aa1x9){return Team[_0x1b3c[35]](_0x3aa1x8[_0x1b3c[38]])[_0x1b3c[12]](function(_0x3aa1xe){return _0x3aa1x9[_0x1b3c[11]](201)[_0x1b3c[10]](_0x3aa1xe)})[_0x1b3c[9]](sequelize.UniqueConstraintError,function(_0x3aa1xa){return Util[_0x1b3c[37]][_0x1b3c[36]](_0x3aa1x9,_0x3aa1xa)})[_0x1b3c[9]](function(_0x3aa1xa){return handleError(_0x3aa1x9,_0x3aa1xa)})};exports[_0x1b3c[39]]= function(_0x3aa1x8,_0x3aa1x9){if(_0x3aa1x8[_0x1b3c[38]][_0x1b3c[24]]){delete _0x3aa1x8[_0x1b3c[38]][_0x1b3c[24]]};return Team[_0x1b3c[29]](_0x3aa1x8[_0x1b3c[32]][_0x1b3c[24]])[_0x1b3c[12]](function(_0x3aa1xe){if(!_0x3aa1xe){return _0x3aa1x9[_0x1b3c[27]](404)};var _0x3aa1xf=_[_0x1b3c[15]](_0x3aa1xe,_0x3aa1x8[_0x1b3c[38]]);return _0x3aa1xf[_0x1b3c[40]]()})[_0x1b3c[12]](function(_0x3aa1xe){return _0x3aa1x9[_0x1b3c[11]](200)[_0x1b3c[10]](_0x3aa1xe)})[_0x1b3c[9]](function(_0x3aa1xa){return handleError(_0x3aa1x9,_0x3aa1xa)})};exports[_0x1b3c[41]]= function(_0x3aa1x8,_0x3aa1x9){return Team[_0x1b3c[29]](_0x3aa1x8[_0x1b3c[32]][_0x1b3c[24]])[_0x1b3c[12]](function(_0x3aa1xe){if(!_0x3aa1xe){return _0x3aa1x9[_0x1b3c[27]](404)};return _0x3aa1xe[_0x1b3c[41]]()})[_0x1b3c[12]](function(){return _0x3aa1x9[_0x1b3c[27]](204)})[_0x1b3c[9]](function(_0x3aa1xa){return handleError(_0x3aa1x9,_0x3aa1xa)})};exports[_0x1b3c[42]]= function(_0x3aa1x8,_0x3aa1x9){return Team[_0x1b3c[41]]({where:{id:_0x3aa1x8[_0x1b3c[13]][_0x1b3c[43]]},individualHooks:true})[_0x1b3c[12]](function(){return _0x3aa1x9[_0x1b3c[27]](204)})[_0x1b3c[9]](function(_0x3aa1xa){return handleError(_0x3aa1x9,_0x3aa1xa)})};exports[_0x1b3c[44]]= function(_0x3aa1x8,_0x3aa1x9,_0x3aa1x10){return Team[_0x1b3c[29]](_0x3aa1x8[_0x1b3c[32]][_0x1b3c[24]])[_0x1b3c[12]](function(_0x3aa1xe){if(!_0x3aa1xe){return _0x3aa1x9[_0x1b3c[27]](404)};return _0x3aa1xe[_0x1b3c[45]](_0x3aa1x8[_0x1b3c[38]][_0x1b3c[22]])})[_0x1b3c[12]](function(){return _0x3aa1x9[_0x1b3c[27]](204)})[_0x1b3c[9]](function(_0x3aa1xa){return _0x3aa1x10(_0x3aa1xa)})};exports[_0x1b3c[46]]= function(_0x3aa1x8,_0x3aa1x9,_0x3aa1x10){return Team[_0x1b3c[29]](_0x3aa1x8[_0x1b3c[32]][_0x1b3c[24]])[_0x1b3c[12]](function(_0x3aa1xe){if(!_0x3aa1xe){return _0x3aa1x9[_0x1b3c[27]](404)};return _0x3aa1xe[_0x1b3c[47]](_0x3aa1x8[_0x1b3c[13]][_0x1b3c[22]])})[_0x1b3c[12]](function(){return _0x3aa1x9[_0x1b3c[27]](202)})[_0x1b3c[9]](function(_0x3aa1xa){return _0x3aa1x10(_0x3aa1xa)})};function handleError(_0x3aa1x9,_0x3aa1xa){return _0x3aa1x9[_0x1b3c[11]](500)[_0x1b3c[10]](_0x3aa1xa)} \ No newline at end of file +'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); +} diff --git a/server/api/team/team.events.js b/server/api/team/team.events.js index 6684c43..8a9173b 100644 --- a/server/api/team/team.events.js +++ b/server/api/team/team.events.js @@ -1 +1,36 @@ -var _0xf6a4=["\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"];_0xf6a4[0];const EventEmitter=require(_0xf6a4[1]);const Team=require(_0xf6a4[3])[_0xf6a4[2]];var TeamEvents= new EventEmitter();TeamEvents[_0xf6a4[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xf6a4[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xf6a4[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xf6a4[6]};for(var e in events){var event=events[e];Team[_0xf6a4[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x464fx8,_0x464fx9,_0x464fxa){TeamEvents[_0xf6a4[10]](event+ _0xf6a4[8]+ _0x464fx8[_0xf6a4[9]],_0x464fx8);TeamEvents[_0xf6a4[10]](event,_0x464fx8);_0x464fxa(null)}}module[_0xf6a4[11]]= TeamEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/team/team.socket.js b/server/api/team/team.socket.js index 8c86b24..8217583 100644 --- a/server/api/team/team.socket.js +++ b/server/api/team/team.socket.js @@ -1 +1,32 @@ -var _0x668e=["\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"];_0x668e[0];const TeamEvents=require(_0x668e[1]);var events=[_0x668e[2],_0x668e[3]];exports[_0x668e[4]]= function(_0xe2d4x3){for(var _0xe2d4x4=0,_0xe2d4x5=events[_0x668e[5]];_0xe2d4x4< _0xe2d4x5;_0xe2d4x4++){var _0xe2d4x6=events[_0xe2d4x4];var _0xe2d4x7=createListener(_0x668e[6]+ _0xe2d4x6,_0xe2d4x3);TeamEvents[_0x668e[7]](_0xe2d4x6,_0xe2d4x7);_0xe2d4x3[_0x668e[7]](_0x668e[8],removeListener(_0xe2d4x6,_0xe2d4x7))}};function createListener(_0xe2d4x6,_0xe2d4x3){return function(_0xe2d4x9){_0xe2d4x3[_0x668e[9]](_0xe2d4x6,_0xe2d4x9)}}function removeListener(_0xe2d4x6,_0xe2d4x7){return function(){TeamEvents[_0x668e[10]](_0xe2d4x6,_0xe2d4x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/telephone/index.js b/server/api/telephone/index.js index 0bf261c..a545c63 100644 --- a/server/api/telephone/index.js +++ b/server/api/telephone/index.js @@ -1 +1,174 @@ -var _0x1796=["\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"];_0x1796[0];var express=require(_0x1796[1]);var auth=require(_0x1796[2]);var controller=require(_0x1796[3]);var license=require(_0x1796[4]);var router=express.Router();router[_0x1796[10]](_0x1796[5],auth[_0x1796[6]](),auth[_0x1796[8]](_0x1796[7]),controller[_0x1796[9]]);router[_0x1796[10]](_0x1796[11],auth[_0x1796[6]](),auth[_0x1796[8]](_0x1796[7]),controller[_0x1796[12]]);router[_0x1796[16]](_0x1796[5],auth[_0x1796[6]](),license[_0x1796[13]](),license[_0x1796[14]](),auth[_0x1796[8]](_0x1796[7]),controller[_0x1796[15]]);router[_0x1796[18]](_0x1796[11],auth[_0x1796[6]](),auth[_0x1796[8]](_0x1796[7]),controller[_0x1796[17]]);router[_0x1796[20]](_0x1796[5],auth[_0x1796[6]](),auth[_0x1796[8]](_0x1796[7]),controller[_0x1796[19]]);router[_0x1796[20]](_0x1796[11],auth[_0x1796[6]](),auth[_0x1796[8]](_0x1796[7]),controller[_0x1796[21]]);module[_0x1796[22]]= router \ No newline at end of file +'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; diff --git a/server/api/telephone/telephone.controller.js b/server/api/telephone/telephone.controller.js index c5c5409..139df32 100644 --- a/server/api/telephone/telephone.controller.js +++ b/server/api/telephone/telephone.controller.js @@ -1 +1,157 @@ -var _0xa563=["\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"];_0xa563[0];var _=require(_0xa563[1]);var Util=require(_0xa563[2]);var sequelize=require(_0xa563[4])[_0xa563[3]];var Telephone=require(_0xa563[4])[_0xa563[5]];function handleError(_0xca3dx6,_0xca3dx7){_0xca3dx7= _0xca3dx7|| 500;return function(_0xca3dx8){_0xca3dx6[_0xa563[7]](_0xca3dx7)[_0xa563[6]](_0xca3dx8)}}function responseWithResult(_0xca3dx6,_0xca3dx7){_0xca3dx7= _0xca3dx7|| 200;return function(_0xca3dxa){if(_0xca3dxa){_0xca3dx6[_0xa563[7]](_0xca3dx7)[_0xa563[8]](_0xca3dxa)}}}function handleEntityNotFound(_0xca3dx6){return function(_0xca3dxa){if(!_0xca3dxa){_0xca3dx6[_0xa563[7]](404)[_0xa563[9]]();return null};return _0xca3dxa}}function saveUpdates(_0xca3dxd,_0xca3dxe){return function(_0xca3dxa){return _0xca3dxa[_0xa563[11]](_0xca3dxd,{transaction:_0xca3dxe})[_0xa563[10]](function(_0xca3dxf){return _0xca3dxf})}}function removeEntity(_0xca3dx6){return function(_0xca3dxa){if(_0xca3dxa){return _0xca3dxa[_0xa563[12]]()[_0xa563[10]](function(){_0xca3dx6[_0xa563[7]](204)[_0xa563[9]]()})}}}exports[_0xa563[13]]= function(_0xca3dx11,_0xca3dx6){return Telephone[_0xa563[19]](_0xa563[18])[_0xa563[17]](Util[_0xa563[16]](_0xca3dx11[_0xa563[15]]))[_0xa563[10]](function(_0xca3dx12){_0xca3dx6[_0xa563[7]](200)[_0xa563[6]](_0xca3dx12)})[_0xa563[14]](function(_0xca3dx8){return handleError(_0xca3dx6,_0xca3dx8)})};exports[_0xa563[20]]= function(_0xca3dx11,_0xca3dx6){Telephone[_0xa563[23]](_0xca3dx11[_0xa563[22]][_0xa563[21]])[_0xa563[10]](handleEntityNotFound(_0xca3dx6))[_0xa563[10]](responseWithResult(_0xca3dx6))[_0xa563[14]](handleError(_0xca3dx6))};exports[_0xa563[24]]= function(_0xca3dx11,_0xca3dx6){var _0xca3dx13=String(_0xca3dx11[_0xa563[26]][_0xa563[25]]);if(!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/[_0xa563[27]](_0xca3dx13))){throw new Error(_0xa563[28])};_0xca3dx11[_0xa563[26]][_0xa563[29]]= _0xa563[18];return sequelize[_0xa563[32]](function(_0xca3dxe){return Telephone[_0xa563[24]](_0xca3dx11[_0xa563[26]],{transaction:_0xca3dxe})[_0xa563[10]](responseWithResult(_0xca3dx6,201))})[_0xa563[14]](sequelize.UniqueConstraintError,function(_0xca3dx8){return Util[_0xa563[31]][_0xa563[30]](_0xca3dx6,_0xca3dx8)})[_0xa563[14]](handleError(_0xca3dx6))};exports[_0xa563[33]]= function(_0xca3dx11,_0xca3dx6){if(_0xca3dx11[_0xa563[26]][_0xa563[21]]){delete _0xca3dx11[_0xa563[26]][_0xa563[21]]};if(_0xca3dx11[_0xa563[26]][_0xa563[25]]){var _0xca3dx13=String(_0xca3dx11[_0xa563[26]][_0xa563[25]]);if(!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/[_0xa563[27]](_0xca3dx13))){throw new Error(_0xa563[28])}};delete _0xca3dx11[_0xa563[26]][_0xa563[34]];return sequelize[_0xa563[32]](function(_0xca3dxe){return Telephone[_0xa563[23]](_0xca3dx11[_0xa563[22]][_0xa563[21]])[_0xa563[10]](handleEntityNotFound(_0xca3dx6))[_0xa563[10]](saveUpdates(_0xca3dx11[_0xa563[26]],_0xca3dxe))[_0xa563[10]](responseWithResult(_0xca3dx6))})[_0xa563[14]](sequelize.UniqueConstraintError,function(_0xca3dx8){return Util[_0xa563[31]][_0xa563[30]](_0xca3dx6,_0xca3dx8)})[_0xa563[14]](handleError(_0xca3dx6))};exports[_0xa563[12]]= function(_0xca3dx11,_0xca3dx6){return Telephone[_0xa563[23]](_0xca3dx11[_0xa563[22]][_0xa563[21]])[_0xa563[10]](handleEntityNotFound(_0xca3dx6))[_0xa563[10]](removeEntity(_0xca3dx6))[_0xa563[14]](handleError(_0xca3dx6))};exports[_0xa563[35]]= function(_0xca3dx11,_0xca3dx6){return Telephone[_0xa563[12]]({where:{id:_0xca3dx11[_0xa563[15]][_0xa563[37]]},individualHooks:true})[_0xa563[10]](function(){return _0xca3dx6[_0xa563[36]](204)})[_0xa563[14]](function(_0xca3dx8){return handleError(_0xca3dx6,_0xca3dx8)})} \ No newline at end of file +/** + * 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); + }); +}; diff --git a/server/api/telephone/telephone.events.js b/server/api/telephone/telephone.events.js index d93f308..25f4f9a 100644 --- a/server/api/telephone/telephone.events.js +++ b/server/api/telephone/telephone.events.js @@ -1 +1,36 @@ -var _0x3cf3=["\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"];_0x3cf3[0];const EventEmitter=require(_0x3cf3[1]);const Telephone=require(_0x3cf3[3])[_0x3cf3[2]];var TelephoneEvents= new EventEmitter();TelephoneEvents[_0x3cf3[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x3cf3[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x3cf3[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x3cf3[6]};for(var e in events){var event=events[e];Telephone[_0x3cf3[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xf705x8,_0xf705x9,_0xf705xa){TelephoneEvents[_0x3cf3[10]](event+ _0x3cf3[8]+ _0xf705x8[_0x3cf3[9]],_0xf705x8);TelephoneEvents[_0x3cf3[10]](event,_0xf705x8);_0xf705xa(null)}}module[_0x3cf3[11]]= TelephoneEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/telephone/telephone.socket.js b/server/api/telephone/telephone.socket.js index a902a73..66a9a8e 100644 --- a/server/api/telephone/telephone.socket.js +++ b/server/api/telephone/telephone.socket.js @@ -1 +1,32 @@ -var _0x7764=["\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"];_0x7764[0];const TelephoneEvents=require(_0x7764[1]);var events=[_0x7764[2],_0x7764[3]];exports[_0x7764[4]]= function(_0xe04fx3){for(var _0xe04fx4=0,_0xe04fx5=events[_0x7764[5]];_0xe04fx4< _0xe04fx5;_0xe04fx4++){var _0xe04fx6=events[_0xe04fx4];var _0xe04fx7=createListener(_0x7764[6]+ _0xe04fx6,_0xe04fx3);TelephoneEvents[_0x7764[7]](_0xe04fx6,_0xe04fx7);_0xe04fx3[_0x7764[7]](_0x7764[8],removeListener(_0xe04fx6,_0xe04fx7))}};function createListener(_0xe04fx6,_0xe04fx3){return function(_0xe04fx9){_0xe04fx3[_0x7764[9]](_0xe04fx6,_0xe04fx9)}}function removeListener(_0xe04fx6,_0xe04fx7){return function(){TelephoneEvents[_0x7764[10]](_0xe04fx6,_0xe04fx7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/template/index.js b/server/api/template/index.js index 21dbb5a..68e0650 100644 --- a/server/api/template/index.js +++ b/server/api/template/index.js @@ -1 +1,182 @@ -var _0x5c59=["\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"];_0x5c59[0];var express=require(_0x5c59[1]);var controller=require(_0x5c59[2]);var auth=require(_0x5c59[3]);var router=express.Router();router[_0x5c59[11]](_0x5c59[4],auth[_0x5c59[5]](),auth[_0x5c59[9]]([13],[_0x5c59[6],_0x5c59[7],_0x5c59[8]]),controller[_0x5c59[10]]);router[_0x5c59[11]](_0x5c59[12],auth[_0x5c59[5]](),auth[_0x5c59[9]]([13],[_0x5c59[6]]),controller[_0x5c59[13]]);router[_0x5c59[15]](_0x5c59[4],auth[_0x5c59[5]](),auth[_0x5c59[9]]([13],[_0x5c59[6]]),controller[_0x5c59[14]]);router[_0x5c59[17]](_0x5c59[12],auth[_0x5c59[5]](),auth[_0x5c59[9]]([13],[_0x5c59[6]]),controller[_0x5c59[16]]);router[_0x5c59[19]](_0x5c59[12],auth[_0x5c59[5]](),auth[_0x5c59[9]]([13],[_0x5c59[6]]),controller[_0x5c59[18]]);router[_0x5c59[19]](_0x5c59[4],auth[_0x5c59[5]](),auth[_0x5c59[9]]([13],[_0x5c59[6]]),controller[_0x5c59[20]]);module[_0x5c59[21]]= router \ No newline at end of file +'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; diff --git a/server/api/template/template.controller.js b/server/api/template/template.controller.js index 0b04f3d..79f8d99 100644 --- a/server/api/template/template.controller.js +++ b/server/api/template/template.controller.js @@ -1 +1,108 @@ -var _0x2434=["\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"];_0x2434[0];var _=require(_0x2434[1]);var util=require(_0x2434[2]);var Util=require(_0x2434[3]);var Template=require(_0x2434[5])[_0x2434[4]];exports[_0x2434[6]]= function(_0x80d7x5,_0x80d7x6,_0x80d7x7){return Template[_0x2434[13]](Util[_0x2434[12]](_0x80d7x5[_0x2434[11]]))[_0x2434[10]](function(_0x80d7x9){_0x80d7x6[_0x2434[9]](200)[_0x2434[8]](_0x80d7x9)})[_0x2434[7]](function(_0x80d7x8){return handleError(_0x80d7x6,_0x80d7x8)})};exports[_0x2434[14]]= function(_0x80d7x5,_0x80d7x6){return Template[_0x2434[18]](_0x80d7x5[_0x2434[17]][_0x2434[16]])[_0x2434[10]](function(_0x80d7xa){if(!_0x80d7xa){return _0x80d7x6[_0x2434[15]](404)};return _0x80d7x6[_0x2434[8]](_0x80d7xa)})[_0x2434[7]](function(_0x80d7x8){return handleError(_0x80d7x6,_0x80d7x8)})};exports[_0x2434[19]]= function(_0x80d7x5,_0x80d7x6){return Template[_0x2434[19]](_0x80d7x5[_0x2434[20]])[_0x2434[10]](function(_0x80d7xa){return _0x80d7x6[_0x2434[9]](201)[_0x2434[8]](_0x80d7xa)})[_0x2434[7]](function(_0x80d7x8){return handleError(_0x80d7x6,_0x80d7x8)})};exports[_0x2434[21]]= function(_0x80d7x5,_0x80d7x6){if(_0x80d7x5[_0x2434[20]][_0x2434[16]]){delete _0x80d7x5[_0x2434[20]][_0x2434[16]]};return Template[_0x2434[18]](_0x80d7x5[_0x2434[17]][_0x2434[16]])[_0x2434[10]](function(_0x80d7xa){if(!_0x80d7xa){return _0x80d7x6[_0x2434[15]](404)};var _0x80d7xb=_[_0x2434[22]](_0x80d7xa,_0x80d7x5[_0x2434[20]]);return _0x80d7xb[_0x2434[23]]()})[_0x2434[10]](function(_0x80d7xa){return _0x80d7x6[_0x2434[9]](200)[_0x2434[8]](_0x80d7xa)})[_0x2434[7]](function(_0x80d7x8){return handleError(_0x80d7x6,_0x80d7x8)})};exports[_0x2434[24]]= function(_0x80d7x5,_0x80d7x6){return Template[_0x2434[18]](_0x80d7x5[_0x2434[17]][_0x2434[16]])[_0x2434[10]](function(_0x80d7xa){if(!_0x80d7xa){return _0x80d7x6[_0x2434[15]](404)};return _0x80d7xa[_0x2434[24]]()})[_0x2434[10]](function(){return _0x80d7x6[_0x2434[15]](204)})[_0x2434[7]](function(_0x80d7x8){return handleError(_0x80d7x6,_0x80d7x8)})};exports[_0x2434[25]]= function(_0x80d7x5,_0x80d7x6){return Template[_0x2434[24]]({where:{id:_0x80d7x5[_0x2434[11]][_0x2434[26]]},individualHooks:true})[_0x2434[10]](function(){return _0x80d7x6[_0x2434[15]](204)})[_0x2434[7]](function(_0x80d7x8){return handleError(_0x80d7x6,_0x80d7x8)})};function handleError(_0x80d7x6,_0x80d7x8){return _0x80d7x6[_0x2434[9]](500)[_0x2434[8]](_0x80d7x8)} \ No newline at end of file +'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); +} diff --git a/server/api/template/template.events.js b/server/api/template/template.events.js index 3ef1a57..aa7bb8e 100644 --- a/server/api/template/template.events.js +++ b/server/api/template/template.events.js @@ -1 +1,36 @@ -var _0xe3f3=["\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"];_0xe3f3[0];const EventEmitter=require(_0xe3f3[1]);const Template=require(_0xe3f3[3])[_0xe3f3[2]];var TemplateEvents= new EventEmitter();TemplateEvents[_0xe3f3[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xe3f3[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xe3f3[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xe3f3[6]};for(var e in events){var event=events[e];Template[_0xe3f3[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4928x8,_0x4928x9,_0x4928xa){TemplateEvents[_0xe3f3[10]](event+ _0xe3f3[8]+ _0x4928x8[_0xe3f3[9]],_0x4928x8);TemplateEvents[_0xe3f3[10]](event,_0x4928x8);_0x4928xa(null)}}module[_0xe3f3[11]]= TemplateEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/template/template.socket.js b/server/api/template/template.socket.js index cd7ad75..1757712 100644 --- a/server/api/template/template.socket.js +++ b/server/api/template/template.socket.js @@ -1 +1,32 @@ -var _0xdfb8=["\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"];_0xdfb8[0];const TemplateEvents=require(_0xdfb8[1]);var events=[_0xdfb8[2],_0xdfb8[3]];exports[_0xdfb8[4]]= function(_0xf8fax3){for(var _0xf8fax4=0,_0xf8fax5=events[_0xdfb8[5]];_0xf8fax4< _0xf8fax5;_0xf8fax4++){var _0xf8fax6=events[_0xf8fax4];var _0xf8fax7=createListener(_0xdfb8[6]+ _0xf8fax6,_0xf8fax3);TemplateEvents[_0xdfb8[7]](_0xf8fax6,_0xf8fax7);_0xf8fax3[_0xdfb8[7]](_0xdfb8[8],removeListener(_0xf8fax6,_0xf8fax7))}};function createListener(_0xf8fax6,_0xf8fax3){return function(_0xf8fax9){_0xf8fax3[_0xdfb8[9]](_0xf8fax6,_0xf8fax9)}}function removeListener(_0xf8fax6,_0xf8fax7){return function(){TemplateEvents[_0xdfb8[10]](_0xf8fax6,_0xf8fax7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/trigger/index.js b/server/api/trigger/index.js index 4cac4fa..05578f4 100644 --- a/server/api/trigger/index.js +++ b/server/api/trigger/index.js @@ -1 +1,261 @@ -var _0xeb2d=["\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"];_0xeb2d[0];var express=require(_0xeb2d[1]);var controller=require(_0xeb2d[2]);var auth=require(_0xeb2d[3]);var router=express.Router();router[_0xeb2d[9]](_0xeb2d[4],auth[_0xeb2d[5]](),auth[_0xeb2d[7]]([13],[_0xeb2d[6]]),controller[_0xeb2d[8]]);router[_0xeb2d[9]](_0xeb2d[10],auth[_0xeb2d[5]](),auth[_0xeb2d[7]]([13],[_0xeb2d[6]]),controller[_0xeb2d[11]]);router[_0xeb2d[13]](_0xeb2d[4],auth[_0xeb2d[5]](),auth[_0xeb2d[7]]([13],[_0xeb2d[6]]),controller[_0xeb2d[12]]);router[_0xeb2d[15]](_0xeb2d[10],auth[_0xeb2d[5]](),auth[_0xeb2d[7]]([13],[_0xeb2d[6]]),controller[_0xeb2d[14]]);router[_0xeb2d[17]](_0xeb2d[10],auth[_0xeb2d[5]](),auth[_0xeb2d[7]]([13],[_0xeb2d[6]]),controller[_0xeb2d[16]]);router[_0xeb2d[17]](_0xeb2d[4],auth[_0xeb2d[5]](),auth[_0xeb2d[7]]([13],[_0xeb2d[6]]),controller[_0xeb2d[18]]);module[_0xeb2d[19]]= router \ No newline at end of file +'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; diff --git a/server/api/trigger/trigger.controller.js b/server/api/trigger/trigger.controller.js index b427668..f3a4806 100644 --- a/server/api/trigger/trigger.controller.js +++ b/server/api/trigger/trigger.controller.js @@ -1 +1,205 @@ -var _0x1ad1=["\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","\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"];_0x1ad1[0];var _=require(_0x1ad1[1]);var util=require(_0x1ad1[2]);var Util=require(_0x1ad1[3]);var sequelize=require(_0x1ad1[5])[_0x1ad1[4]];var Trigger=require(_0x1ad1[5])[_0x1ad1[6]];var ToolsCondition=require(_0x1ad1[5])[_0x1ad1[7]];var ToolsAction=require(_0x1ad1[5])[_0x1ad1[8]];exports[_0x1ad1[9]]= function(_0x25fax8,_0x25fax9,_0x25faxa){return Trigger[_0x1ad1[19]](_0x1ad1[18])[_0x1ad1[17]](_[_0x1ad1[16]](Util[_0x1ad1[15]](_0x25fax8[_0x1ad1[14]]),{distinct:true}))[_0x1ad1[13]](function(_0x25faxc){return _0x25fax9[_0x1ad1[12]](200)[_0x1ad1[11]](_0x25faxc)})[_0x1ad1[10]](function(_0x25faxb){return handleError(_0x25fax9,_0x25faxb)})};exports[_0x1ad1[20]]= function(_0x25fax8,_0x25fax9){return Trigger[_0x1ad1[19]](_0x1ad1[18])[_0x1ad1[24]](_0x25fax8[_0x1ad1[23]][_0x1ad1[22]])[_0x1ad1[13]](function(_0x25faxd){if(!_0x25faxd){return _0x25fax9[_0x1ad1[21]](404)};return _0x25fax9[_0x1ad1[12]](200)[_0x1ad1[11]](_0x25faxd)})[_0x1ad1[10]](function(_0x25faxb){return handleError(_0x25fax9,_0x25faxb)})};exports[_0x1ad1[25]]= function(_0x25fax8,_0x25fax9){return Trigger[_0x1ad1[25]](_0x25fax8[_0x1ad1[26]],{include:[{model:ToolsCondition,as:_0x1ad1[27]},{model:ToolsCondition,as:_0x1ad1[28]},{model:ToolsAction,as:_0x1ad1[29]}],newTrigger:_0x25fax8[_0x1ad1[26]]})[_0x1ad1[13]](function(_0x25faxd){return _0x25fax9[_0x1ad1[12]](201)[_0x1ad1[11]](_0x25faxd)})[_0x1ad1[10]](function(_0x25faxb){return handleError(_0x25fax9,_0x25faxb)})};exports[_0x1ad1[30]]= function(_0x25fax8,_0x25fax9,_0x25faxa){var _0x25faxe;if(_0x25fax8[_0x1ad1[26]][_0x1ad1[22]]){delete _0x25fax8[_0x1ad1[26]][_0x1ad1[22]]};return sequelize[_0x1ad1[41]](function(_0x25faxf){return Trigger[_0x1ad1[24]](_0x25fax8[_0x1ad1[23]][_0x1ad1[22]])[_0x1ad1[13]](function(_0x25faxd){_0x25faxe= _0x25faxd;if(_0x25fax8[_0x1ad1[26]][_0x1ad1[28]]){return ToolsCondition[_0x1ad1[38]]({where:{TriggerAnyId:_0x25fax8[_0x1ad1[23]][_0x1ad1[22]]},transaction:_0x25faxf})};return})[_0x1ad1[13]](function(){if(_0x25fax8[_0x1ad1[26]][_0x1ad1[28]]&& Array[_0x1ad1[33]](_0x25fax8[_0x1ad1[26]].Any)&& _0x25fax8[_0x1ad1[26]][_0x1ad1[28]][_0x1ad1[34]]){_[_0x1ad1[36]](_0x25fax8[_0x1ad1[26]].Any,function(_0x25fax11){_0x25fax11[_0x1ad1[40]]= _0x25fax8[_0x1ad1[23]][_0x1ad1[22]]});return ToolsCondition[_0x1ad1[37]](_0x25fax8[_0x1ad1[26]].Any,{transaction:_0x25faxf})};return})[_0x1ad1[13]](function(){if(_0x25fax8[_0x1ad1[26]][_0x1ad1[27]]){return ToolsCondition[_0x1ad1[38]]({where:{TriggerAllId:_0x25fax8[_0x1ad1[23]][_0x1ad1[22]]},transaction:_0x25faxf})};return})[_0x1ad1[13]](function(){if(_0x25fax8[_0x1ad1[26]][_0x1ad1[27]]&& Array[_0x1ad1[33]](_0x25fax8[_0x1ad1[26]].All)&& _0x25fax8[_0x1ad1[26]][_0x1ad1[27]][_0x1ad1[34]]){_[_0x1ad1[36]](_0x25fax8[_0x1ad1[26]].All,function(_0x25fax11){_0x25fax11[_0x1ad1[39]]= _0x25fax8[_0x1ad1[23]][_0x1ad1[22]]});return ToolsCondition[_0x1ad1[37]](_0x25fax8[_0x1ad1[26]].All,{transaction:_0x25faxf})};return})[_0x1ad1[13]](function(){if(_0x25fax8[_0x1ad1[26]][_0x1ad1[29]]){return ToolsAction[_0x1ad1[38]]({where:{TriggerId:_0x25fax8[_0x1ad1[23]][_0x1ad1[22]]},transaction:_0x25faxf})};return})[_0x1ad1[13]](function(){if(_0x25fax8[_0x1ad1[26]][_0x1ad1[29]]&& Array[_0x1ad1[33]](_0x25fax8[_0x1ad1[26]].Actions)&& _0x25fax8[_0x1ad1[26]][_0x1ad1[29]][_0x1ad1[34]]){_[_0x1ad1[36]](_0x25fax8[_0x1ad1[26]].Actions,function(_0x25fax11){_0x25fax11[_0x1ad1[35]]= _0x25fax8[_0x1ad1[23]][_0x1ad1[22]]});return ToolsAction[_0x1ad1[37]](_0x25fax8[_0x1ad1[26]].Actions,{transaction:_0x25faxf})};return})[_0x1ad1[13]](function(){var _0x25fax10=_[_0x1ad1[16]](_0x25faxe,_0x25fax8[_0x1ad1[26]]);return _0x25fax10[_0x1ad1[32]]({transaction:_0x25faxf})})})[_0x1ad1[13]](function(){return _0x25fax9[_0x1ad1[21]](200)})[_0x1ad1[10]](function(_0x25faxb){console[_0x1ad1[31]](_0x25faxb);return handleError(_0x25fax9,_0x25faxb)})};exports[_0x1ad1[38]]= function(_0x25fax8,_0x25fax9){return Trigger[_0x1ad1[24]](_0x25fax8[_0x1ad1[23]][_0x1ad1[22]])[_0x1ad1[13]](function(Trigger){if(!Trigger){return _0x25fax9[_0x1ad1[21]](404)};Trigger[_0x1ad1[38]]()[_0x1ad1[13]](function(){return _0x25fax9[_0x1ad1[21]](204)})[_0x1ad1[10]](function(_0x25faxb){return handleError(_0x25fax9,_0x25faxb)})})[_0x1ad1[10]](function(_0x25faxb){return handleError(_0x25fax9,_0x25faxb)})};exports[_0x1ad1[42]]= function(_0x25fax8,_0x25fax9){return Trigger[_0x1ad1[38]]({where:{id:_0x25fax8[_0x1ad1[14]][_0x1ad1[43]]},individualHooks:true})[_0x1ad1[13]](function(){return _0x25fax9[_0x1ad1[21]](204)})[_0x1ad1[10]](function(_0x25faxb){return handleError(_0x25fax9,_0x25faxb)})};function handleError(_0x25fax9,_0x25faxb){return _0x25fax9[_0x1ad1[12]](500)[_0x1ad1[11]](_0x25faxb)} \ No newline at end of file +'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); +} diff --git a/server/api/trigger/trigger.events.js b/server/api/trigger/trigger.events.js index 120f6fe..5978c45 100644 --- a/server/api/trigger/trigger.events.js +++ b/server/api/trigger/trigger.events.js @@ -1 +1,36 @@ -var _0x30f2=["\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"];_0x30f2[0];const EventEmitter=require(_0x30f2[1]);const Trigger=require(_0x30f2[3])[_0x30f2[2]];var TriggerEvents= new EventEmitter();TriggerEvents[_0x30f2[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x30f2[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x30f2[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x30f2[6]};for(var e in events){var event=events[e];Trigger[_0x30f2[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x294dx8,_0x294dx9,_0x294dxa){TriggerEvents[_0x30f2[10]](event+ _0x30f2[8]+ _0x294dx8[_0x30f2[9]],_0x294dx8);TriggerEvents[_0x30f2[10]](event,_0x294dx8);_0x294dxa(null)}}module[_0x30f2[11]]= TriggerEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/trigger/trigger.socket.js b/server/api/trigger/trigger.socket.js index 52b12a9..e83aa13 100644 --- a/server/api/trigger/trigger.socket.js +++ b/server/api/trigger/trigger.socket.js @@ -1 +1,32 @@ -var _0x221e=["\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"];_0x221e[0];const TriggerEvents=require(_0x221e[1]);var events=[_0x221e[2],_0x221e[3]];exports[_0x221e[4]]= function(_0xab7ex3){for(var _0xab7ex4=0,_0xab7ex5=events[_0x221e[5]];_0xab7ex4< _0xab7ex5;_0xab7ex4++){var _0xab7ex6=events[_0xab7ex4];var _0xab7ex7=createListener(_0x221e[6]+ _0xab7ex6,_0xab7ex3);TriggerEvents[_0x221e[7]](_0xab7ex6,_0xab7ex7);_0xab7ex3[_0x221e[7]](_0x221e[8],removeListener(_0xab7ex6,_0xab7ex7))}};function createListener(_0xab7ex6,_0xab7ex3){return function(_0xab7ex9){_0xab7ex3[_0x221e[9]](_0xab7ex6,_0xab7ex9)}}function removeListener(_0xab7ex6,_0xab7ex7){return function(){TriggerEvents[_0x221e[10]](_0xab7ex6,_0xab7ex7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/trunk/index.js b/server/api/trunk/index.js index 7cf7016..fda6e40 100644 --- a/server/api/trunk/index.js +++ b/server/api/trunk/index.js @@ -1 +1,226 @@ -var _0xd59f=["\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"];_0xd59f[0];var express=require(_0xd59f[1]);var controller=require(_0xd59f[2]);var config=require(_0xd59f[3]);var auth=require(_0xd59f[4]);var router=express.Router();router[_0xd59f[10]](_0xd59f[5],auth[_0xd59f[6]](),auth[_0xd59f[8]]([13,7,10],[_0xd59f[7]]),controller[_0xd59f[9]]);router[_0xd59f[10]](_0xd59f[11],auth[_0xd59f[6]](),auth[_0xd59f[8]]([13],[_0xd59f[7]]),controller[_0xd59f[12]]);router[_0xd59f[14]](_0xd59f[5],auth[_0xd59f[6]](),auth[_0xd59f[8]]([13],[_0xd59f[7]]),controller[_0xd59f[13]]);router[_0xd59f[16]](_0xd59f[11],auth[_0xd59f[6]](),auth[_0xd59f[8]]([13],[_0xd59f[7]]),controller[_0xd59f[15]]);router[_0xd59f[18]](_0xd59f[5],auth[_0xd59f[6]](),auth[_0xd59f[8]]([13],[_0xd59f[7]]),controller[_0xd59f[17]]);router[_0xd59f[18]](_0xd59f[11],auth[_0xd59f[6]](),auth[_0xd59f[8]]([13],[_0xd59f[7]]),controller[_0xd59f[19]]);module[_0xd59f[20]]= router \ No newline at end of file +'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; diff --git a/server/api/trunk/trunk.controller.js b/server/api/trunk/trunk.controller.js index 0297555..9ee3289 100644 --- a/server/api/trunk/trunk.controller.js +++ b/server/api/trunk/trunk.controller.js @@ -1 +1,111 @@ -var _0x52cc=["\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"];_0x52cc[0];var _=require(_0x52cc[1]);var Trunk=require(_0x52cc[3])[_0x52cc[2]];var VoiceExtension=require(_0x52cc[3])[_0x52cc[4]];var sequelize=require(_0x52cc[3])[_0x52cc[5]];var util=require(_0x52cc[6]);var Util=require(_0x52cc[7]);exports[_0x52cc[8]]= function(_0x12c0x7,_0x12c0x8,_0x12c0x9){return Trunk[_0x52cc[15]](Util[_0x52cc[14]](_0x12c0x7[_0x52cc[13]]))[_0x52cc[12]](function(_0x12c0xb){_0x12c0x8[_0x52cc[11]](200)[_0x52cc[10]](_0x12c0xb)})[_0x52cc[9]](function(_0x12c0xa){return handleError(_0x12c0x8,_0x12c0xa)})};exports[_0x52cc[16]]= function(_0x12c0x7,_0x12c0x8){return Trunk[_0x52cc[20]](_0x12c0x7[_0x52cc[19]][_0x52cc[18]])[_0x52cc[12]](function(_0x12c0xc){if(!_0x12c0xc){return _0x12c0x8[_0x52cc[17]](404)};return _0x12c0x8[_0x52cc[10]](_0x12c0xc)})[_0x52cc[9]](function(_0x12c0xa){return handleError(_0x12c0x8,_0x12c0xa)})};exports[_0x52cc[21]]= function(_0x12c0x7,_0x12c0x8){return Trunk[_0x52cc[21]](_0x12c0x7[_0x52cc[22]])[_0x52cc[12]](function(_0x12c0xc){return _0x12c0x8[_0x52cc[11]](201)[_0x52cc[10]](_0x12c0xc)})[_0x52cc[9]](function(_0x12c0xa){return handleError(_0x12c0x8,_0x12c0xa)})};exports[_0x52cc[23]]= function(_0x12c0x7,_0x12c0x8){if(_0x12c0x7[_0x52cc[22]][_0x52cc[18]]){delete _0x12c0x7[_0x52cc[22]][_0x52cc[18]]};return Trunk[_0x52cc[20]](_0x12c0x7[_0x52cc[19]][_0x52cc[18]])[_0x52cc[12]](function(_0x12c0xc){if(!_0x12c0xc){return _0x12c0x8[_0x52cc[17]](404)};var _0x12c0xd=_[_0x52cc[26]](_0x12c0xc,_0x12c0x7[_0x52cc[22]]);return _0x12c0xd[_0x52cc[27]]()})[_0x52cc[12]](function(_0x12c0xc){return _0x12c0x8[_0x52cc[11]](200)[_0x52cc[10]](_0x12c0xc)})[_0x52cc[9]](function(_0x12c0xa){console[_0x52cc[25]](_0x52cc[24],_0x12c0xa);return handleError(_0x12c0x8,_0x12c0xa)})};exports[_0x52cc[28]]= function(_0x12c0x7,_0x12c0x8){return Trunk[_0x52cc[20]](_0x12c0x7[_0x52cc[19]][_0x52cc[18]])[_0x52cc[12]](function(_0x12c0xc){if(!_0x12c0xc){return _0x12c0x8[_0x52cc[17]](404)};return _0x12c0xc[_0x52cc[28]]()})[_0x52cc[12]](function(){return _0x12c0x8[_0x52cc[17]](204)})[_0x52cc[9]](function(_0x12c0xa){return handleError(_0x12c0x8,_0x12c0xa)})};exports[_0x52cc[29]]= function(_0x12c0x7,_0x12c0x8){return Trunk[_0x52cc[28]]({where:{id:_0x12c0x7[_0x52cc[13]][_0x52cc[30]]},individualHooks:true})[_0x52cc[12]](function(){return _0x12c0x8[_0x52cc[17]](204)})[_0x52cc[9]](function(_0x12c0xa){return handleError(_0x12c0x8,_0x12c0xa)})};function handleError(_0x12c0x8,_0x12c0xa){return _0x12c0x8[_0x52cc[11]](500)[_0x52cc[10]](_0x12c0xa)} \ No newline at end of file +'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); +} diff --git a/server/api/trunk/trunk.events.js b/server/api/trunk/trunk.events.js index 653dfec..5ceb1a1 100644 --- a/server/api/trunk/trunk.events.js +++ b/server/api/trunk/trunk.events.js @@ -1 +1,36 @@ -var _0x7a6e=["\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"];_0x7a6e[0];const EventEmitter=require(_0x7a6e[1]);const Trunk=require(_0x7a6e[3])[_0x7a6e[2]];var TrunkEvents= new EventEmitter();TrunkEvents[_0x7a6e[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x7a6e[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x7a6e[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x7a6e[7]};for(var e in events){var event=events[e];Trunk[_0x7a6e[8]](e,emitEvent(event))};function emitEvent(event){return function(_0xf98bx8,_0xf98bx9,_0xf98bxa){TrunkEvents[_0x7a6e[11]](event+ _0x7a6e[9]+ _0xf98bx8[_0x7a6e[10]],_0xf98bx8);TrunkEvents[_0x7a6e[11]](event,_0xf98bx8);_0xf98bxa(null)}}module[_0x7a6e[12]]= TrunkEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/trunk/trunk.socket.js b/server/api/trunk/trunk.socket.js index e1dc917..5dda5a9 100644 --- a/server/api/trunk/trunk.socket.js +++ b/server/api/trunk/trunk.socket.js @@ -1 +1,47 @@ -var _0x17cf=["\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"];_0x17cf[0];const TrunkEvents=require(_0x17cf[1]);var events=[_0x17cf[2],_0x17cf[3],_0x17cf[4]];exports[_0x17cf[5]]= function(_0x32e2x3){for(var _0x32e2x4=0,_0x32e2x5=events[_0x17cf[6]];_0x32e2x4< _0x32e2x5;_0x32e2x4++){var _0x32e2x6=events[_0x32e2x4];var _0x32e2x7=createListener(_0x17cf[7]+ _0x32e2x6,_0x32e2x3);TrunkEvents[_0x17cf[8]](_0x32e2x6,_0x32e2x7);_0x32e2x3[_0x17cf[8]](_0x17cf[9],removeListener(_0x32e2x6,_0x32e2x7))}};function createListener(_0x32e2x6,_0x32e2x3){return function(_0x32e2x9){switch(_0x32e2x6){case _0x17cf[11]:_0x32e2x3[_0x17cf[10]](_0x32e2x6,_0x32e2x9);break;case _0x17cf[17]:if(_0x32e2x3[_0x17cf[12]]!== _0x17cf[13]&& (_0x32e2x9[_0x17cf[15]](_0x17cf[14])|| _0x32e2x9[_0x17cf[15]](_0x17cf[16]))){_0x32e2x3[_0x17cf[10]](_0x32e2x6,_0x32e2x9)};break;case _0x17cf[18]:_0x32e2x3[_0x17cf[10]](_0x32e2x6,_0x32e2x9);break;default:}}}function removeListener(_0x32e2x6,_0x32e2x7){return function(){TrunkEvents[_0x17cf[19]](_0x32e2x6,_0x32e2x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/update/index.js b/server/api/update/index.js index 5af2cf7..6c97808 100644 --- a/server/api/update/index.js +++ b/server/api/update/index.js @@ -1 +1,13 @@ -var _0x5ed2=["\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"];_0x5ed2[0];var express=require(_0x5ed2[1]);var controller=require(_0x5ed2[2]);var auth=require(_0x5ed2[3]);var license=require(_0x5ed2[4]);var router=express.Router();router[_0x5ed2[11]](_0x5ed2[5],auth[_0x5ed2[6]](),auth[_0x5ed2[8]](_0x5ed2[7]),license[_0x5ed2[9]](),controller[_0x5ed2[10]]);router[_0x5ed2[11]](_0x5ed2[12],auth[_0x5ed2[6]](),auth[_0x5ed2[8]](_0x5ed2[7]),license[_0x5ed2[9]](),controller[_0x5ed2[13]]);module[_0x5ed2[14]]= router \ No newline at end of file +'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; diff --git a/server/api/update/update.controller.js b/server/api/update/update.controller.js index b62d70e..c6da9ad 100644 --- a/server/api/update/update.controller.js +++ b/server/api/update/update.controller.js @@ -1 +1,48 @@ -var _0xc1af=["\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"];_0xc1af[0];var _=require(_0xc1af[1]);var path=require(_0xc1af[2]);var moment=require(_0xc1af[3]);var config=require(_0xc1af[4]);var Git=require(_0xc1af[7])(path[_0xc1af[6]](config[_0xc1af[5]]));exports[_0xc1af[8]]= function(_0xfed2x6,_0xfed2x7){return Git[_0xc1af[21]](function(_0xfed2x8,_0xfed2x9){if(_0xfed2x8){return handleError(_0xfed2x7,_0xfed2x8)};var _0xfed2xa=[];for(var _0xfed2xb=0;_0xfed2xb< 10&& _0xfed2xb< _0xfed2x9[_0xc1af[10]][_0xc1af[9]];_0xfed2xb++){_0xfed2xa[_0xc1af[18]]({version:_0xfed2x9[_0xc1af[10]][_0xfed2xb][_0xc1af[13]][_0xc1af[12]](_0xc1af[11])[1]|| _0xc1af[14],message:_0xfed2x9[_0xc1af[10]][_0xfed2xb][_0xc1af[13]][_0xc1af[12]](_0xc1af[11])[0],createdAt:moment(_0xfed2x9[_0xc1af[10]][_0xfed2xb][_0xc1af[17]])[_0xc1af[16]](_0xc1af[15])})};return _0xfed2x7[_0xc1af[20]](200)[_0xc1af[19]]({rows:_0xfed2xa,count:_0xfed2xa[_0xc1af[9]]})})};exports[_0xc1af[22]]= function(_0xfed2x6,_0xfed2x7){Git[_0xc1af[22]](_0xc1af[23],_0xc1af[24],function(_0xfed2x8,_0xfed2xc){if(_0xfed2x8){console[_0xc1af[26]](_0xc1af[25],_0xfed2x8)}});return _0xfed2x7[_0xc1af[27]](200)[_0xc1af[19]]()};function handleError(_0xfed2x7,_0xfed2x8){return _0xfed2x7[_0xc1af[20]](500)[_0xc1af[19]](_0xfed2x8)} \ No newline at end of file +'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); +} diff --git a/server/api/user/index.js b/server/api/user/index.js index 501d59a..86e16fb 100644 --- a/server/api/user/index.js +++ b/server/api/user/index.js @@ -1 +1,261 @@ -var _0x5b77=["\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"];_0x5b77[0];var express=require(_0x5b77[1]);var controller=require(_0x5b77[2]);var config=require(_0x5b77[3]);var auth=require(_0x5b77[4]);var license=require(_0x5b77[5]);var router=express.Router();router[_0x5b77[13]](_0x5b77[6],auth[_0x5b77[7]](),auth[_0x5b77[11]]([7],[_0x5b77[8],_0x5b77[9],_0x5b77[10]]),controller[_0x5b77[12]]);router[_0x5b77[13]](_0x5b77[14],auth[_0x5b77[7]](),auth[_0x5b77[11]]([17],[_0x5b77[8]]),controller[_0x5b77[15]]);router[_0x5b77[13]](_0x5b77[16],auth[_0x5b77[7]](),controller[_0x5b77[17]]);router[_0x5b77[13]](_0x5b77[18],auth[_0x5b77[7]](),controller[_0x5b77[19]]);router[_0x5b77[13]](_0x5b77[20],controller[_0x5b77[21]]);router[_0x5b77[13]](_0x5b77[22],auth[_0x5b77[7]](),auth[_0x5b77[11]]([],[_0x5b77[8],_0x5b77[9]]),controller[_0x5b77[23]]);router[_0x5b77[13]](_0x5b77[24],auth[_0x5b77[7]](),controller[_0x5b77[25]]);router[_0x5b77[13]](_0x5b77[26],auth[_0x5b77[7]](),auth[_0x5b77[27]](_0x5b77[8]),controller[_0x5b77[28]]);router[_0x5b77[13]](_0x5b77[29],auth[_0x5b77[7]](),auth[_0x5b77[27]](_0x5b77[8]),controller[_0x5b77[30]]);router[_0x5b77[34]](_0x5b77[6],auth[_0x5b77[7]](),license[_0x5b77[31]](),license[_0x5b77[32]](),auth[_0x5b77[27]](_0x5b77[8]),controller[_0x5b77[33]]);router[_0x5b77[34]](_0x5b77[26],auth[_0x5b77[7]](),auth[_0x5b77[27]](_0x5b77[8]),controller[_0x5b77[35]]);router[_0x5b77[34]](_0x5b77[29],auth[_0x5b77[7]](),auth[_0x5b77[27]](_0x5b77[8]),controller[_0x5b77[36]]);router[_0x5b77[39]](_0x5b77[37],auth[_0x5b77[7]](),controller[_0x5b77[38]]);router[_0x5b77[39]](_0x5b77[22],auth[_0x5b77[7]](),auth[_0x5b77[11]]([],[_0x5b77[8],_0x5b77[9],_0x5b77[10]]),controller[_0x5b77[40]]);router[_0x5b77[42]](_0x5b77[6],auth[_0x5b77[7]](),auth[_0x5b77[27]](_0x5b77[8]),controller[_0x5b77[41]]);router[_0x5b77[42]](_0x5b77[22],auth[_0x5b77[7]](),auth[_0x5b77[27]](_0x5b77[8]),controller[_0x5b77[43]]);router[_0x5b77[42]](_0x5b77[29],auth[_0x5b77[7]](),auth[_0x5b77[27]](_0x5b77[8]),controller[_0x5b77[44]]);router[_0x5b77[39]](_0x5b77[45],auth[_0x5b77[7]](),auth[_0x5b77[27]](_0x5b77[8]),controller[_0x5b77[46]]);router[_0x5b77[34]](_0x5b77[47],auth[_0x5b77[7]](),auth[_0x5b77[27]](_0x5b77[8]),controller[_0x5b77[48]]);router[_0x5b77[34]](_0x5b77[24],auth[_0x5b77[7]](),auth[_0x5b77[27]](_0x5b77[8]),controller[_0x5b77[49]]);module[_0x5b77[50]]= router \ No newline at end of file +'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; diff --git a/server/api/user/user.controller.js b/server/api/user/user.controller.js index 185cfbe..2c37d73 100644 --- a/server/api/user/user.controller.js +++ b/server/api/user/user.controller.js @@ -1 +1,734 @@ -var _0x1171=["\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","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64","\x65\x72\x72\x6F\x72","\x73\x65\x63\x75\x72\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\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"];_0x1171[0];var User=require(_0x1171[2])[_0x1171[1]];var Module=require(_0x1171[2])[_0x1171[3]];var Setting=require(_0x1171[2])[_0x1171[4]];var VoiceQueue=require(_0x1171[2])[_0x1171[5]];var ChatQueue=require(_0x1171[2])[_0x1171[6]];var MailQueue=require(_0x1171[2])[_0x1171[7]];var FaxQueue=require(_0x1171[2])[_0x1171[8]];var SmsQueue=require(_0x1171[2])[_0x1171[9]];var sequelize=require(_0x1171[2])[_0x1171[10]];var config=require(_0x1171[11]);var Util=require(_0x1171[12]);var passport=require(_0x1171[13]);var moment=require(_0x1171[14]);var jwt=require(_0x1171[15]);var uploadFile=require(_0x1171[16]);var path=require(_0x1171[17]);var fs=require(_0x1171[18]);var _=require(_0x1171[19]);var util=require(_0x1171[20]);var sr=require(_0x1171[21]);exports[_0x1171[22]]= function(_0x3b45x15,_0x3b45x16,_0x3b45x17){return User[_0x1171[31]](_0x1171[30])[_0x1171[29]](Util[_0x1171[28]](_0x3b45x15[_0x1171[27]]))[_0x1171[26]](function(_0x3b45x19){_0x3b45x16[_0x1171[25]](200)[_0x1171[24]](_0x3b45x19)})[_0x1171[23]](function(_0x3b45x18){return handleError(_0x3b45x16,_0x3b45x18)})};exports[_0x1171[32]]= function(_0x3b45x15,_0x3b45x16){return User[_0x1171[32]]()[_0x1171[26]](function(_0x3b45x1a){return _0x3b45x16[_0x1171[25]](200)[_0x1171[24]](_0x3b45x1a)})[_0x1171[23]](function(_0x3b45x18){return handleError(_0x3b45x16,_0x3b45x18)})};function handleError(_0x3b45x16,_0x3b45x18){return _0x3b45x16[_0x1171[25]](500)[_0x1171[24]](_0x3b45x18)}exports[_0x1171[33]]= function(_0x3b45x15,_0x3b45x16,_0x3b45x17){return User[_0x1171[34]]()[_0x1171[26]](function(_0x3b45x1c){return _0x3b45x16[_0x1171[25]](200)[_0x1171[24]]({rows:_0x3b45x1c})})[_0x1171[23]](function(_0x3b45x18){return handleError(_0x3b45x16,_0x3b45x18)})};exports[_0x1171[35]]= function(_0x3b45x15,_0x3b45x16,_0x3b45x17){return User[_0x1171[40]](_0x3b45x15[_0x1171[39]][_0x1171[38]])[_0x1171[26]](function(_0x3b45x1e){if(!_0x3b45x1e){return _0x3b45x16[_0x1171[36]](404)};return _0x3b45x1e[_0x1171[37]]()})[_0x1171[26]](function(_0x3b45x1d){return _0x3b45x16[_0x1171[25]](200)[_0x1171[24]](_0x3b45x1d)})[_0x1171[23]](function(_0x3b45x18){return handleError(_0x3b45x16,_0x3b45x18)})};exports[_0x1171[41]]= function(_0x3b45x15,_0x3b45x16,_0x3b45x17){_0x3b45x15[_0x1171[43]][_0x1171[42]]= _0x3b45x15[_0x1171[43]][_0x1171[42]]|| _0x1171[30];var _0x3b45x1f=String(_0x3b45x15[_0x1171[43]][_0x1171[44]]);if(!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/[_0x1171[45]](_0x3b45x1f))){throw new Error(_0x1171[46])};return sequelize[_0x1171[49]](function(_0x3b45x20){return User[_0x1171[41]](_0x3b45x15[_0x1171[43]],{transaction:_0x3b45x20})[_0x1171[26]](function(_0x3b45x1e){return _0x3b45x16[_0x1171[25]](201)[_0x1171[24]](_0x3b45x1e)})})[_0x1171[23]](sequelize.UniqueConstraintError,function(_0x3b45x18){return Util[_0x1171[48]][_0x1171[47]](_0x3b45x16,_0x3b45x18)})[_0x1171[23]](function(_0x3b45x18){return handleError(_0x3b45x16,_0x3b45x18)})};exports[_0x1171[50]]= function(_0x3b45x15,_0x3b45x16,_0x3b45x17){return sequelize[_0x1171[49]](function(_0x3b45x20){return User[_0x1171[40]](_0x3b45x15[_0x1171[39]][_0x1171[38]])[_0x1171[26]](function(_0x3b45x1e){if(!_0x3b45x1e){return _0x3b45x16[_0x1171[36]](404)};return _0x3b45x1e[_0x1171[53]](_0x3b45x15[_0x1171[43]][_0x1171[52]])})[_0x1171[26]](function(){return _0x3b45x16[_0x1171[36]](201)})})[_0x1171[23]](function(_0x3b45x18){console[_0x1171[51]](_0x3b45x18);return handleError(_0x3b45x16,_0x3b45x18)})};exports[_0x1171[54]]= function(_0x3b45x15,_0x3b45x16,_0x3b45x17){return User[_0x1171[40]](_0x3b45x15[_0x1171[39]][_0x1171[38]])[_0x1171[26]](function(_0x3b45x1e){if(!_0x3b45x1e){return _0x3b45x16[_0x1171[36]](404)};return _0x3b45x16[_0x1171[25]](200)[_0x1171[24]](_0x3b45x1e)})[_0x1171[23]](function(_0x3b45x18){return handleError(_0x3b45x16,_0x3b45x18)})};exports[_0x1171[55]]= function(_0x3b45x15,_0x3b45x16,_0x3b45x17){var _0x3b45x21=_0x3b45x15[_0x1171[39]][_0x1171[38]];var _0x3b45x22;return User[_0x1171[40]](_0x3b45x21)[_0x1171[26]](function(_0x3b45x1e){_0x3b45x22= _0x3b45x1e;if(!_0x3b45x1e){return _0x3b45x16[_0x1171[36]](404)};return _0x3b45x1e[_0x1171[55]]()})[_0x1171[26]](function(_0x3b45x1e){return _0x3b45x16[_0x1171[25]](200)[_0x1171[24]](_0x3b45x1e)})[_0x1171[23]](sequelize.ForeignKeyConstraintError,function(_0x3b45x18){return Util[_0x1171[48]][_0x1171[57]](_0x3b45x16,_0x1171[30],_0x3b45x22[_0x1171[56]],_0x3b45x18)})[_0x1171[23]](function(_0x3b45x18){return handleError(_0x3b45x16,_0x3b45x18)})};exports[_0x1171[58]]= function(_0x3b45x15,_0x3b45x16){return User[_0x1171[55]]({where:{id:_0x3b45x15[_0x1171[27]][_0x1171[59]]},individualHooks:true})[_0x1171[26]](function(){return _0x3b45x16[_0x1171[36]](204)})[_0x1171[23]](function(_0x3b45x18){return handleError(_0x3b45x16,_0x3b45x18)})};exports[_0x1171[60]]= function(_0x3b45x15,_0x3b45x16,_0x3b45x17){var _0x3b45x21=_0x3b45x15[_0x1171[30]][_0x1171[38]];var _0x3b45x23=String(_0x3b45x15[_0x1171[43]][_0x1171[61]]);var _0x3b45x24=String(_0x3b45x15[_0x1171[43]][_0x1171[62]]);if(!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/[_0x1171[45]](_0x3b45x24))){throw new Error(_0x1171[46])};return sequelize[_0x1171[49]](function(_0x3b45x20){return User[_0x1171[40]](_0x3b45x21)[_0x1171[26]](function(_0x3b45x1e){if(!_0x3b45x1e[_0x1171[63]](_0x3b45x23)){return _0x3b45x16[_0x1171[36]](403)}else {_0x3b45x1e[_0x1171[44]]= _0x3b45x24;return _0x3b45x1e[_0x1171[64]]({transaction:_0x3b45x20})[_0x1171[26]](function(){return _0x3b45x16[_0x1171[36]](200)})}})})[_0x1171[23]](function(_0x3b45x18){console[_0x1171[51]](_0x3b45x18);return handleError(_0x3b45x16,_0x3b45x18)})};exports[_0x1171[65]]= function(_0x3b45x15,_0x3b45x16,_0x3b45x17){var _0x3b45x25;var _0x3b45x21=_0x3b45x15[_0x1171[39]][_0x1171[38]];var _0x3b45x24=String(_0x3b45x15[_0x1171[43]][_0x1171[62]]);return sequelize[_0x1171[49]](function(_0x3b45x20){return Setting[_0x1171[40]](1)[_0x1171[26]](function(_0x3b45x27){_0x3b45x25= _0x3b45x27;return User[_0x1171[40]](_0x3b45x21)})[_0x1171[26]](function(_0x3b45x1e){var _0x3b45x26=_0x3b45x25[_0x1171[67]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0x3b45x26[_0x1171[45]](_0x3b45x24)){throw new Error(_0x1171[68])};_0x3b45x1e[_0x1171[44]]= _0x3b45x24;return _0x3b45x1e[_0x1171[64]]({transaction:_0x3b45x20})})})[_0x1171[26]](function(){return _0x3b45x16[_0x1171[36]](200)})[_0x1171[23]](function(_0x3b45x18){console[_0x1171[66]](_0x3b45x18);return handleError(_0x3b45x16,_0x3b45x18)})};exports[_0x1171[69]]= function(_0x3b45x15,_0x3b45x16,_0x3b45x17){var _0x3b45x28= new uploadFile({dest:path[_0x1171[74]](config[_0x1171[70]],_0x1171[71],_0x1171[72],_0x1171[73]),maxNumberOfFiles:1,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(jpeg|png)$/i,rename:function(_0x3b45x29,_0x3b45x2a){return sr()+ path[_0x1171[76]](_0x3b45x2a[_0x1171[75]])},messages:{maxNumberOfFiles:_0x1171[77],acceptFileTypes:_0x1171[78],invalidRequest:_0x1171[79]}});_0x3b45x28[_0x1171[83]](_0x1171[80],function(_0x3b45x1a,_0x3b45x2b){if(!_0x3b45x2b[_0x1171[81]][_0x1171[75]]){return _0x3b45x16[_0x1171[25]](500)[_0x1171[24]](_0x3b45x28)};return sequelize[_0x1171[49]](function(_0x3b45x20){return User[_0x1171[40]](_0x3b45x15[_0x1171[39]][_0x1171[38]])[_0x1171[26]](function(_0x3b45x1e){if(!_0x3b45x1e){return _0x3b45x16[_0x1171[36]](404)};return _0x3b45x1e[_0x1171[82]]({userpic:_0x3b45x2b[_0x1171[81]][_0x1171[75]]},{transaction:_0x3b45x20})})[_0x1171[26]](function(_0x3b45x1e){return _0x3b45x16[_0x1171[25]](200)[_0x1171[24]](_0x3b45x1e)})})[_0x1171[23]](function(_0x3b45x18){return handleError(_0x3b45x16,_0x3b45x18)})});_0x3b45x28[_0x1171[83]](_0x1171[66],function(_0x3b45x18){console[_0x1171[51]](_0x1171[84],_0x3b45x18);return handleError(_0x3b45x16,_0x3b45x18)});_0x3b45x28[_0x1171[85]](_0x3b45x15)};exports[_0x1171[86]]= function(_0x3b45x15,_0x3b45x16,_0x3b45x17){var _0x3b45x21=_0x3b45x15[_0x1171[30]][_0x1171[38]];return User[_0x1171[106]]({where:{id:_0x3b45x21},attributes:[_0x1171[38],_0x1171[87],_0x1171[56],_0x1171[88],_0x1171[42],_0x1171[89],_0x1171[90],_0x1171[91],_0x1171[92],_0x1171[93],_0x1171[94],_0x1171[95],_0x1171[96],_0x1171[97],_0x1171[98],_0x1171[99],_0x1171[100]],include:[Module,{model:VoiceQueue,as:_0x1171[101]},{model:ChatQueue,as:_0x1171[102]},{model:MailQueue,as:_0x1171[103]},{model:FaxQueue,as:_0x1171[104]},{model:SmsQueue,as:_0x1171[105]}]})[_0x1171[26]](function(_0x3b45x1e){if(!_0x3b45x1e){return _0x3b45x16[_0x1171[36]](401)};return _0x3b45x16[_0x1171[25]](200)[_0x1171[24]](_0x3b45x1e)})[_0x1171[23]](function(_0x3b45x18){return handleError(_0x3b45x16,_0x3b45x18)})};exports[_0x1171[82]]= function(_0x3b45x15,_0x3b45x16,_0x3b45x17){var _0x3b45x21=_0x3b45x15[_0x1171[30]][_0x1171[38]];delete _0x3b45x15[_0x1171[43]][_0x1171[44]];delete _0x3b45x15[_0x1171[43]][_0x1171[56]];return sequelize[_0x1171[49]](function(_0x3b45x20){return User[_0x1171[40]](_0x3b45x15[_0x1171[39]][_0x1171[38]])[_0x1171[26]](function(_0x3b45x1e){if(!_0x3b45x1e){return _0x3b45x16[_0x1171[36]](500)};return _0x3b45x1e[_0x1171[82]](_0x3b45x15[_0x1171[43]],{transaction:_0x3b45x20})})[_0x1171[26]](function(_0x3b45x1e){return _0x3b45x16[_0x1171[25]](200)[_0x1171[24]](_0x3b45x1e)})})[_0x1171[23]](function(_0x3b45x18){return handleError(_0x3b45x16,_0x3b45x18)})};exports[_0x1171[107]]= function(_0x3b45x15,_0x3b45x16,_0x3b45x17){var _0x3b45x2c=path[_0x1171[74]](config[_0x1171[70]],_0x1171[71],_0x1171[72],_0x1171[73],_0x3b45x15[_0x1171[39]][_0x1171[75]]);fs[_0x1171[110]](_0x3b45x2c,function(_0x3b45x2d){if(!_0x3b45x2d){_0x3b45x2c= path[_0x1171[74]](config[_0x1171[70]],_0x1171[71],_0x1171[72],_0x1171[73],_0x1171[108])};return _0x3b45x16[_0x1171[109]](_0x3b45x2c)})};exports[_0x1171[111]]= function(_0x3b45x15,_0x3b45x16,_0x3b45x17){if(_0x3b45x15[_0x1171[39]][_0x1171[38]]=== _0x1171[112]){var _0x3b45x2c=path[_0x1171[74]](config[_0x1171[70]],_0x1171[71],_0x1171[72],_0x1171[73],_0x1171[113]);fs[_0x1171[110]](_0x3b45x2c,function(_0x3b45x2d){return _0x3b45x16[_0x1171[109]](_0x3b45x2c)})}else {return User[_0x1171[40]](_0x3b45x15[_0x1171[39]][_0x1171[38]])[_0x1171[26]](function(_0x3b45x1e){if(_0x3b45x1e){var _0x3b45x2c=path[_0x1171[74]](config[_0x1171[70]],_0x1171[71],_0x1171[72],_0x1171[73],_0x3b45x1e[_0x1171[89]]?_0x3b45x1e[_0x1171[89]]:_0x1171[108]);fs[_0x1171[110]](_0x3b45x2c,function(_0x3b45x2d){if(!_0x3b45x2d){_0x3b45x2c= path[_0x1171[74]](config[_0x1171[70]],_0x1171[71],_0x1171[72],_0x1171[73],_0x1171[108])};return _0x3b45x16[_0x1171[109]](_0x3b45x2c)})}else {return _0x3b45x16[_0x1171[36]](500)}})[_0x1171[23]](function(_0x3b45x18){return handleError(_0x3b45x16,_0x3b45x18)})}};exports[_0x1171[114]]= function(_0x3b45x15,_0x3b45x16,_0x3b45x17){var _0x3b45x22;return User[_0x1171[40]](_0x3b45x15[_0x1171[39]][_0x1171[38]],{attributes:[_0x1171[38]]})[_0x1171[26]](function(_0x3b45x1e){_0x3b45x22= _0x3b45x1e;if(!_0x3b45x22){return _0x3b45x16[_0x1171[36]](401)};switch(_0x3b45x15[_0x1171[39]][_0x1171[129]]){case _0x1171[117]:return _0x3b45x22[_0x1171[116]]({attributes:[_0x1171[56]]});case _0x1171[119]:return _0x3b45x22[_0x1171[118]]({attributes:[_0x1171[38],_0x1171[56]]});case _0x1171[121]:return _0x3b45x22[_0x1171[120]]({attributes:[_0x1171[38],_0x1171[56]]});case _0x1171[123]:return _0x3b45x22[_0x1171[122]]({attributes:[_0x1171[38],_0x1171[56]]});case _0x1171[125]:return _0x3b45x22[_0x1171[124]]({attributes:[_0x1171[38],_0x1171[56]]});case _0x1171[127]:return _0x3b45x22[_0x1171[126]]({attributes:[_0x1171[38],_0x1171[56]]});default:throw new Error(_0x1171[128])}})[_0x1171[26]](function(_0x3b45x2e){if(_0x3b45x2e){return _0x3b45x16[_0x1171[25]](200)[_0x1171[24]](_[_0x1171[115]](_0x3b45x2e,function(_0x3b45x2f){var _0x3b45x30={name:_0x3b45x2f[_0x1171[56]]};if(_0x3b45x2f[_0x1171[38]]){_0x3b45x30[_0x1171[38]]= _0x3b45x2f[_0x1171[38]]};return _0x3b45x30}))}})[_0x1171[23]](function(_0x3b45x18){console[_0x1171[66]](_0x3b45x18);return handleError(_0x3b45x16,_0x3b45x18)})};exports[_0x1171[130]]= function(_0x3b45x15,_0x3b45x16,_0x3b45x17){var _0x3b45x22;return User[_0x1171[40]](_0x3b45x15[_0x1171[39]][_0x1171[38]],{attributes:[_0x1171[38]]})[_0x1171[26]](function(_0x3b45x1e){_0x3b45x22= _0x3b45x1e;if(!_0x3b45x22){return _0x3b45x16[_0x1171[36]](401)};switch(_0x3b45x15[_0x1171[39]][_0x1171[129]]){case _0x1171[117]:return _0x3b45x22[_0x1171[131]](_0x3b45x15[_0x1171[43]]);case _0x1171[119]:return _0x3b45x22[_0x1171[132]](_0x3b45x15[_0x1171[43]]);case _0x1171[121]:return _0x3b45x22[_0x1171[133]](_0x3b45x15[_0x1171[43]]);case _0x1171[123]:return _0x3b45x22[_0x1171[134]](_0x3b45x15[_0x1171[43]]);case _0x1171[125]:return _0x3b45x22[_0x1171[135]](_0x3b45x15[_0x1171[43]]);case _0x1171[127]:return _0x3b45x22[_0x1171[136]](_0x3b45x15[_0x1171[43]]);default:return null}})[_0x1171[26]](function(_0x3b45x2e){return _0x3b45x16[_0x1171[36]](_0x3b45x2e?200:401)})[_0x1171[23]](function(_0x3b45x18){console[_0x1171[66]](_0x3b45x18)})};exports[_0x1171[137]]= function(_0x3b45x15,_0x3b45x16,_0x3b45x17){var _0x3b45x22;return User[_0x1171[40]](_0x3b45x15[_0x1171[39]][_0x1171[38]],{attributes:[_0x1171[38]]})[_0x1171[26]](function(_0x3b45x1e){_0x3b45x22= _0x3b45x1e;if(!_0x3b45x22){return _0x3b45x16[_0x1171[36]](401)};switch(_0x3b45x15[_0x1171[39]][_0x1171[129]]){case _0x1171[117]:return _0x3b45x22[_0x1171[138]](_0x3b45x15[_0x1171[27]][_0x1171[59]]);case _0x1171[119]:return _0x3b45x22[_0x1171[139]](_0x3b45x15[_0x1171[27]][_0x1171[59]]);case _0x1171[121]:return _0x3b45x22[_0x1171[140]](_0x3b45x15[_0x1171[27]][_0x1171[59]]);case _0x1171[125]:return _0x3b45x22[_0x1171[141]](_0x3b45x15[_0x1171[27]][_0x1171[59]]);case _0x1171[123]:return _0x3b45x22[_0x1171[142]](_0x3b45x15[_0x1171[27]][_0x1171[59]]);case _0x1171[127]:return _0x3b45x22[_0x1171[143]](_0x3b45x15[_0x1171[27]][_0x1171[59]]);default:return null}})[_0x1171[26]](function(_0x3b45x2e){return _0x3b45x16[_0x1171[36]](_0x3b45x2e?200:401)})[_0x1171[23]](function(_0x3b45x18){console[_0x1171[66]](_0x3b45x18)})};exports[_0x1171[144]]= function(_0x3b45x15,_0x3b45x16){var _0x3b45x31={};_0x3b45x31[_0x3b45x15[_0x1171[39]][_0x1171[145]]]= _0x3b45x15[_0x1171[43]][_0x1171[146]];return User[_0x1171[29]]({where:_0x3b45x31})[_0x1171[26]](function(_0x3b45x19){if(_0x3b45x19[_0x1171[147]]){return _0x3b45x16[_0x1171[25]](200)[_0x1171[24]]({isValid:false,value:_0x3b45x15[_0x1171[43]][_0x1171[146]]})};return _0x3b45x16[_0x1171[25]](200)[_0x1171[24]]({isValid:true,value:_0x3b45x15[_0x1171[43]][_0x1171[146]]})})[_0x1171[23]](function(_0x3b45x18){return handleError(_0x3b45x16,_0x3b45x18)})};exports[_0x1171[148]]= function(_0x3b45x15,_0x3b45x16,_0x3b45x17){_0x3b45x16[_0x1171[150]](_0x1171[149])};function handleError(_0x3b45x16,_0x3b45x18){return _0x3b45x16[_0x1171[25]](500)[_0x1171[24]](_0x3b45x18)} \ No newline at end of file +'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); + if (!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/.test(newPass))) { + throw new Error('Wrong password format!'); + } + return sequelize.transaction(function(t) { + 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 (!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); +} diff --git a/server/api/user/user.events.js b/server/api/user/user.events.js index 41c0245..7052b15 100644 --- a/server/api/user/user.events.js +++ b/server/api/user/user.events.js @@ -1 +1,36 @@ -var _0x2674=["\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"];_0x2674[0];const EventEmitter=require(_0x2674[1]);const User=require(_0x2674[3])[_0x2674[2]];var UserEvents= new EventEmitter();UserEvents[_0x2674[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x2674[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x2674[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x2674[6]};for(var e in events){var event=events[e];User[_0x2674[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xad18x8,_0xad18x9,_0xad18xa){UserEvents[_0x2674[10]](event+ _0x2674[8]+ _0xad18x8[_0x2674[9]],_0xad18x8);UserEvents[_0x2674[10]](event,_0xad18x8);_0xad18xa(null)}}module[_0x2674[11]]= UserEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/user/user.socket.js b/server/api/user/user.socket.js index b3d1b7e..a5f1bc9 100644 --- a/server/api/user/user.socket.js +++ b/server/api/user/user.socket.js @@ -1 +1,34 @@ -var _0xaad8=["\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"];_0xaad8[0];const UserEvents=require(_0xaad8[1]);var events=[_0xaad8[2],_0xaad8[3]];exports[_0xaad8[4]]= function(_0x9c9ex3){for(var _0x9c9ex4=0,_0x9c9ex5=events[_0xaad8[5]];_0x9c9ex4< _0x9c9ex5;_0x9c9ex4++){var _0x9c9ex6=events[_0x9c9ex4];var _0x9c9ex7=createListener(_0xaad8[6]+ _0x9c9ex6,_0x9c9ex3);UserEvents[_0xaad8[7]](_0x9c9ex6,_0x9c9ex7);_0x9c9ex3[_0xaad8[7]](_0xaad8[8],removeListener(_0x9c9ex6,_0x9c9ex7))}};function createListener(_0x9c9ex6,_0x9c9ex3){return function(_0x9c9ex9){if(_0x9c9ex9[_0xaad8[9]]=== _0xaad8[10]|| _0x9c9ex9[_0xaad8[9]]=== _0xaad8[11]){_0x9c9ex3[_0xaad8[12]](_0x9c9ex6,_0x9c9ex9)}}}function removeListener(_0x9c9ex6,_0x9c9ex7){return function(){UserEvents[_0xaad8[13]](_0x9c9ex6,_0x9c9ex7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/user_has_chat_queue/index.js b/server/api/user_has_chat_queue/index.js index 338dc5d..bce94e7 100644 --- a/server/api/user_has_chat_queue/index.js +++ b/server/api/user_has_chat_queue/index.js @@ -1 +1,15 @@ -var _0x8fa3=["\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"];_0x8fa3[0];var express=require(_0x8fa3[1]);var controller=require(_0x8fa3[2]);var router=express.Router();router[_0x8fa3[5]](_0x8fa3[3],controller[_0x8fa3[4]]);router[_0x8fa3[5]](_0x8fa3[6],controller[_0x8fa3[7]]);router[_0x8fa3[9]](_0x8fa3[3],controller[_0x8fa3[8]]);router[_0x8fa3[11]](_0x8fa3[6],controller[_0x8fa3[10]]);router[_0x8fa3[12]](_0x8fa3[6],controller[_0x8fa3[10]]);router[_0x8fa3[14]](_0x8fa3[6],controller[_0x8fa3[13]]);module[_0x8fa3[15]]= router \ No newline at end of file +'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 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 3b8c49a..b399892 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 +1,103 @@ -var _0xbb27=["\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"];_0xbb27[0];var _=require(_0xbb27[1]);var UserHasChatQueue=require(_0xbb27[3])[_0xbb27[2]];exports[_0xbb27[4]]= function(_0x914bx3,_0x914bx4){UserHasChatQueue[_0xbb27[10]](_0x914bx3[_0xbb27[9]]?{where:_0x914bx3[_0xbb27[9]]}:{})[_0xbb27[8]](function(_0x914bx6){return _0x914bx4[_0xbb27[7]](200)[_0xbb27[6]](_0x914bx6)})[_0xbb27[5]](function(_0x914bx5){return handleError(_0x914bx4,_0x914bx5)})};exports[_0xbb27[11]]= function(_0x914bx3,_0x914bx4){UserHasChatQueue[_0xbb27[15]](_0x914bx3[_0xbb27[14]][_0xbb27[13]])[_0xbb27[8]](function(_0x914bx7){if(!_0x914bx7){return _0x914bx4[_0xbb27[12]](404)};return _0x914bx4[_0xbb27[6]](_0x914bx7)})[_0xbb27[5]](function(_0x914bx5){return handleError(_0x914bx4,_0x914bx5)})};exports[_0xbb27[16]]= function(_0x914bx3,_0x914bx4){UserHasChatQueue[_0xbb27[16]](_0x914bx3[_0xbb27[17]])[_0xbb27[8]](function(_0x914bx7){return _0x914bx4[_0xbb27[7]](201)[_0xbb27[6]](_0x914bx7)})[_0xbb27[5]](function(_0x914bx5){return handleError(_0x914bx4,_0x914bx5)})};exports[_0xbb27[18]]= function(_0x914bx3,_0x914bx4){if(_0x914bx3[_0xbb27[17]][_0xbb27[13]]){delete _0x914bx3[_0xbb27[17]][_0xbb27[13]]};UserHasChatQueue[_0xbb27[21]]({where:{id:_0x914bx3[_0xbb27[14]][_0xbb27[13]]}})[_0xbb27[8]](function(_0x914bx7){if(!_0x914bx7){return _0x914bx4[_0xbb27[12]](404)};var _0x914bx8=_[_0xbb27[19]](_0x914bx7,_0x914bx3[_0xbb27[17]]);_0x914bx8[_0xbb27[20]]()[_0xbb27[8]](function(){return _0x914bx4[_0xbb27[7]](200)[_0xbb27[6]](_0x914bx7)})[_0xbb27[5]](function(_0x914bx5){return handleError(_0x914bx4,_0x914bx5)})})[_0xbb27[5]](function(_0x914bx5){return handleError(_0x914bx4,_0x914bx5)})};exports[_0xbb27[22]]= function(_0x914bx3,_0x914bx4){UserHasChatQueue[_0xbb27[21]]({where:{id:_0x914bx3[_0xbb27[14]][_0xbb27[13]]}})[_0xbb27[8]](function(_0x914bx7){if(!_0x914bx7){return _0x914bx4[_0xbb27[12]](404)};_0x914bx7[_0xbb27[22]]()[_0xbb27[8]](function(){return _0x914bx4[_0xbb27[12]](204)})[_0xbb27[5]](function(_0x914bx5){return handleError(_0x914bx4,_0x914bx5)})})[_0xbb27[5]](function(_0x914bx5){return handleError(_0x914bx4,_0x914bx5)})};function handleError(_0x914bx4,_0x914bx5){return _0x914bx4[_0xbb27[7]](500)[_0xbb27[6]](_0x914bx5)} \ No newline at end of file +'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); +} 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 5b14225..7289f5f 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 +1,36 @@ -var _0x8205=["\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"];_0x8205[0];const EventEmitter=require(_0x8205[1]);const UserHasChatQueue=require(_0x8205[3])[_0x8205[2]];var UserHasChatQueueEvents= new EventEmitter();UserHasChatQueueEvents[_0x8205[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x8205[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x8205[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x8205[6]};for(var e in events){var event=events[e];UserHasChatQueue[_0x8205[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4428x8,_0x4428x9,_0x4428xa){UserHasChatQueueEvents[_0x8205[10]](event+ _0x8205[8]+ _0x4428x8[_0x8205[9]],_0x4428x8);UserHasChatQueueEvents[_0x8205[10]](event,_0x4428x8);_0x4428xa(null)}}module[_0x8205[11]]= UserHasChatQueueEvents \ No newline at end of file +/** + * 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; 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 1e5e74f..cbe8860 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 +1,32 @@ -var _0x2e1b=["\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"];_0x2e1b[0];const UserHasChatQueueEvents=require(_0x2e1b[1]);var events=[_0x2e1b[2],_0x2e1b[3]];exports[_0x2e1b[4]]= function(_0xb3c8x3){for(var _0xb3c8x4=0,_0xb3c8x5=events[_0x2e1b[5]];_0xb3c8x4< _0xb3c8x5;_0xb3c8x4++){var _0xb3c8x6=events[_0xb3c8x4];var _0xb3c8x7=createListener(_0x2e1b[6]+ _0xb3c8x6,_0xb3c8x3);UserHasChatQueueEvents[_0x2e1b[7]](_0xb3c8x6,_0xb3c8x7);_0xb3c8x3[_0x2e1b[7]](_0x2e1b[8],removeListener(_0xb3c8x6,_0xb3c8x7))}};function createListener(_0xb3c8x6,_0xb3c8x3){return function(_0xb3c8x9){_0xb3c8x3[_0x2e1b[9]](_0xb3c8x6,_0xb3c8x9)}}function removeListener(_0xb3c8x6,_0xb3c8x7){return function(){UserHasChatQueueEvents[_0x2e1b[10]](_0xb3c8x6,_0xb3c8x7)}} \ No newline at end of file +/** + * 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); + }; +} 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 7d8de84..985d823 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 +1,35 @@ -var _0xdb49=["\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"];_0xdb49[0];const EventEmitter=require(_0xdb49[1]);const UserHasChatQueuePermit=require(_0xdb49[3])[_0xdb49[2]];var UserHasChatQueuePermitEvents= new EventEmitter();UserHasChatQueuePermitEvents[_0xdb49[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xdb49[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xdb49[6]};for(var e in events){var event=events[e];UserHasChatQueuePermit[_0xdb49[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xa1e3x8,_0xa1e3x9,_0xa1e3xa){UserHasChatQueuePermitEvents[_0xdb49[10]](event+ _0xdb49[8]+ _0xa1e3x8[_0xdb49[9]],_0xa1e3x8);UserHasChatQueuePermitEvents[_0xdb49[10]](event,_0xa1e3x8);_0xa1e3xa(null)}}module[_0xdb49[11]]= UserHasChatQueuePermitEvents \ No newline at end of file +/** + * 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; 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 fad973c..4ffea53 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 +1,34 @@ -var _0xc772=["\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"];_0xc772[0];const UserHasChatQueuePermitEvents=require(_0xc772[1]);var events=[_0xc772[2],_0xc772[3]];exports[_0xc772[4]]= function(_0x7b5dx3){for(var _0x7b5dx4=0,_0x7b5dx5=events[_0xc772[5]];_0x7b5dx4< _0x7b5dx5;_0x7b5dx4++){var _0x7b5dx6=events[_0x7b5dx4];var _0x7b5dx7=createListener(_0xc772[6]+ _0x7b5dx6,_0x7b5dx3);UserHasChatQueuePermitEvents[_0xc772[7]](_0x7b5dx6,_0x7b5dx7);_0x7b5dx3[_0xc772[7]](_0xc772[8],removeListener(_0x7b5dx6,_0x7b5dx7))}};function createListener(_0x7b5dx6,_0x7b5dx3){return function(_0x7b5dx9){if(_0x7b5dx3[_0xc772[9]]=== _0x7b5dx9[_0xc772[10]]){_0x7b5dx3[_0xc772[12]](_0xc772[11])}}}function removeListener(_0x7b5dx6,_0x7b5dx7){return function(){UserHasChatQueuePermitEvents[_0xc772[13]](_0x7b5dx6,_0x7b5dx7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/user_has_chat_room/index.js b/server/api/user_has_chat_room/index.js index b7e91c0..381448d 100644 --- a/server/api/user_has_chat_room/index.js +++ b/server/api/user_has_chat_room/index.js @@ -1 +1,16 @@ -var _0x708c=["\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"];_0x708c[0];var express=require(_0x708c[1]);var controller=require(_0x708c[2]);var auth=require(_0x708c[3]);var router=express.Router();router[_0x708c[6]](_0x708c[4],controller[_0x708c[5]]);module[_0x708c[7]]= router \ No newline at end of file +'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; 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 f0070f6..d747380 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 +1,96 @@ -var _0xb95a=["\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"];_0xb95a[0];var _=require(_0xb95a[1]);var UserHasChatRoom=require(_0xb95a[3])[_0xb95a[2]];exports[_0xb95a[4]]= function(_0x558dx3,_0x558dx4){UserHasChatRoom[_0xb95a[9]]()[_0xb95a[8]](function(_0x558dx6){return _0x558dx4[_0xb95a[7]](200)[_0xb95a[6]](_0x558dx6)})[_0xb95a[5]](function(_0x558dx5){return handleError(_0x558dx4,_0x558dx5)})};exports[_0xb95a[10]]= function(_0x558dx3,_0x558dx4){UserHasChatRoom[_0xb95a[14]](_0x558dx3[_0xb95a[13]][_0xb95a[12]])[_0xb95a[8]](function(_0x558dx7){if(!_0x558dx7){return _0x558dx4[_0xb95a[11]](404)};return _0x558dx4[_0xb95a[6]](_0x558dx7)})[_0xb95a[5]](function(_0x558dx5){return handleError(_0x558dx4,_0x558dx5)})};exports[_0xb95a[15]]= function(_0x558dx3,_0x558dx4){UserHasChatRoom[_0xb95a[15]](_0x558dx3[_0xb95a[16]])[_0xb95a[8]](function(_0x558dx7){return _0x558dx4[_0xb95a[7]](201)[_0xb95a[6]](_0x558dx7)})[_0xb95a[5]](function(_0x558dx5){return handleError(_0x558dx4,_0x558dx5)})};exports[_0xb95a[17]]= function(_0x558dx3,_0x558dx4){UserHasChatRoom[_0xb95a[21]]({where:{UserId:_0x558dx3[_0xb95a[13]][_0xb95a[19]],ChatRoomId:_0x558dx3[_0xb95a[13]][_0xb95a[20]]},limit:1})[_0xb95a[8]](function(_0x558dx7){if(!_0x558dx7){return _0x558dx4[_0xb95a[11]](404)};_0x558dx7[_0xb95a[18]](_0x558dx3[_0xb95a[16]])[_0xb95a[8]](function(){return _0x558dx4[_0xb95a[7]](200)[_0xb95a[6]](_0x558dx7)})[_0xb95a[5]](function(_0x558dx5){return handleError(_0x558dx4,_0x558dx5)})})[_0xb95a[5]](function(_0x558dx5){return handleError(_0x558dx4,_0x558dx5)})};exports[_0xb95a[22]]= function(_0x558dx3,_0x558dx4){UserHasChatRoom[_0xb95a[14]](_0x558dx3[_0xb95a[13]][_0xb95a[12]])[_0xb95a[8]](function(_0x558dx7){if(!_0x558dx7){return _0x558dx4[_0xb95a[11]](404)};_0x558dx7[_0xb95a[22]]()[_0xb95a[8]](function(){return _0x558dx4[_0xb95a[11]](204)})[_0xb95a[5]](function(_0x558dx5){return handleError(_0x558dx4,_0x558dx5)})})[_0xb95a[5]](function(_0x558dx5){return handleError(_0x558dx4,_0x558dx5)})};function handleError(_0x558dx4,_0x558dx5){return _0x558dx4[_0xb95a[7]](500)[_0xb95a[6]](_0x558dx5)} \ No newline at end of file +'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); +} 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 bcb87cd..619a0ae 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 +1,36 @@ -var _0xbc31=["\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"];_0xbc31[0];const EventEmitter=require(_0xbc31[1]);const UserHasChatRoom=require(_0xbc31[3])[_0xbc31[2]];var UserHasChatRoomEvents= new EventEmitter();UserHasChatRoomEvents[_0xbc31[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xbc31[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xbc31[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xbc31[6]};for(var e in events){var event=events[e];UserHasChatRoom[_0xbc31[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xb92ex8,_0xb92ex9,_0xb92exa){UserHasChatRoomEvents[_0xbc31[10]](event+ _0xbc31[8]+ _0xb92ex8[_0xbc31[9]],_0xb92ex8);UserHasChatRoomEvents[_0xbc31[10]](event,_0xb92ex8);_0xb92exa(null)}}module[_0xbc31[11]]= UserHasChatRoomEvents \ No newline at end of file +/** + * 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; 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 5858367..20d7dd6 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 +1,60 @@ -var _0x8776=["\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"];_0x8776[0];const UserHasChatRoomEvents=require(_0x8776[1]);const ChatRoom=require(_0x8776[3])[_0x8776[2]];const User=require(_0x8776[3])[_0x8776[4]];var events=[_0x8776[5],_0x8776[6]];exports[_0x8776[7]]= function(_0x3277x5){for(var _0x3277x6=0,_0x3277x7=events[_0x8776[8]];_0x3277x6< _0x3277x7;_0x3277x6++){var _0x3277x8=events[_0x3277x6];var _0x3277x9=createListener(_0x8776[9]+ _0x3277x8,_0x3277x5);UserHasChatRoomEvents[_0x8776[10]](_0x3277x8,_0x3277x9);_0x3277x5[_0x8776[10]](_0x8776[11],removeListener(_0x3277x8,_0x3277x9))}};function createListener(_0x3277x8,_0x3277x5){return function(_0x3277xb){switch(_0x3277x8){case _0x8776[21]:return ChatRoom[_0x8776[20]](_0x3277xb.ChatRoomId,{include:[{model:User,attributes:[_0x8776[15]]}]})[_0x8776[19]](function(_0x3277xd){_0x3277xd[_0x8776[18]][_0x8776[17]](function(_0x3277xe){if(_0x3277x5[_0x8776[14]]== _0x3277xe[_0x8776[15]]){_0x3277x5[_0x8776[16]](_0x3277x8,_0x3277xb)}})})[_0x8776[13]](function(_0x3277xc){console[_0x8776[12]](_0x3277xc)});case _0x8776[22]:_0x3277x5[_0x8776[16]](_0x3277x8,_0x3277xb);break;default:}}}function removeListener(_0x3277x8,_0x3277x9){return function(){UserHasChatRoomEvents[_0x8776[23]](_0x3277x8,_0x3277x9)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/user_has_fax_queue/index.js b/server/api/user_has_fax_queue/index.js index 4d7c63d..5805e3d 100644 --- a/server/api/user_has_fax_queue/index.js +++ b/server/api/user_has_fax_queue/index.js @@ -1 +1,15 @@ -var _0x9a3a=["\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"];_0x9a3a[0];var express=require(_0x9a3a[1]);var controller=require(_0x9a3a[2]);var router=express.Router();router[_0x9a3a[5]](_0x9a3a[3],controller[_0x9a3a[4]]);router[_0x9a3a[5]](_0x9a3a[6],controller[_0x9a3a[7]]);router[_0x9a3a[9]](_0x9a3a[3],controller[_0x9a3a[8]]);router[_0x9a3a[11]](_0x9a3a[6],controller[_0x9a3a[10]]);router[_0x9a3a[12]](_0x9a3a[6],controller[_0x9a3a[10]]);router[_0x9a3a[14]](_0x9a3a[6],controller[_0x9a3a[13]]);module[_0x9a3a[15]]= router \ No newline at end of file +'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 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 940c253..f92e570 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 +1,103 @@ -var _0x872d=["\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"];_0x872d[0];var _=require(_0x872d[1]);var UserHasFaxQueue=require(_0x872d[3])[_0x872d[2]];exports[_0x872d[4]]= function(_0x3e5cx3,_0x3e5cx4){UserHasFaxQueue[_0x872d[10]](_0x3e5cx3[_0x872d[9]]?{where:_0x3e5cx3[_0x872d[9]]}:{})[_0x872d[8]](function(_0x3e5cx6){return _0x3e5cx4[_0x872d[7]](200)[_0x872d[6]](_0x3e5cx6)})[_0x872d[5]](function(_0x3e5cx5){return handleError(_0x3e5cx4,_0x3e5cx5)})};exports[_0x872d[11]]= function(_0x3e5cx3,_0x3e5cx4){UserHasFaxQueue[_0x872d[15]](_0x3e5cx3[_0x872d[14]][_0x872d[13]])[_0x872d[8]](function(_0x3e5cx7){if(!_0x3e5cx7){return _0x3e5cx4[_0x872d[12]](404)};return _0x3e5cx4[_0x872d[6]](_0x3e5cx7)})[_0x872d[5]](function(_0x3e5cx5){return handleError(_0x3e5cx4,_0x3e5cx5)})};exports[_0x872d[16]]= function(_0x3e5cx3,_0x3e5cx4){UserHasFaxQueue[_0x872d[16]](_0x3e5cx3[_0x872d[17]])[_0x872d[8]](function(_0x3e5cx7){return _0x3e5cx4[_0x872d[7]](201)[_0x872d[6]](_0x3e5cx7)})[_0x872d[5]](function(_0x3e5cx5){return handleError(_0x3e5cx4,_0x3e5cx5)})};exports[_0x872d[18]]= function(_0x3e5cx3,_0x3e5cx4){if(_0x3e5cx3[_0x872d[17]][_0x872d[13]]){delete _0x3e5cx3[_0x872d[17]][_0x872d[13]]};UserHasFaxQueue[_0x872d[21]]({where:{id:_0x3e5cx3[_0x872d[14]][_0x872d[13]]}})[_0x872d[8]](function(_0x3e5cx7){if(!_0x3e5cx7){return _0x3e5cx4[_0x872d[12]](404)};var _0x3e5cx8=_[_0x872d[19]](_0x3e5cx7,_0x3e5cx3[_0x872d[17]]);_0x3e5cx8[_0x872d[20]]()[_0x872d[8]](function(){return _0x3e5cx4[_0x872d[7]](200)[_0x872d[6]](_0x3e5cx7)})[_0x872d[5]](function(_0x3e5cx5){return handleError(_0x3e5cx4,_0x3e5cx5)})})[_0x872d[5]](function(_0x3e5cx5){return handleError(_0x3e5cx4,_0x3e5cx5)})};exports[_0x872d[22]]= function(_0x3e5cx3,_0x3e5cx4){UserHasFaxQueue[_0x872d[21]]({where:{id:_0x3e5cx3[_0x872d[14]][_0x872d[13]]}})[_0x872d[8]](function(_0x3e5cx7){if(!_0x3e5cx7){return _0x3e5cx4[_0x872d[12]](404)};_0x3e5cx7[_0x872d[22]]()[_0x872d[8]](function(){return _0x3e5cx4[_0x872d[12]](204)})[_0x872d[5]](function(_0x3e5cx5){return handleError(_0x3e5cx4,_0x3e5cx5)})})[_0x872d[5]](function(_0x3e5cx5){return handleError(_0x3e5cx4,_0x3e5cx5)})};function handleError(_0x3e5cx4,_0x3e5cx5){return _0x3e5cx4[_0x872d[7]](500)[_0x872d[6]](_0x3e5cx5)} \ No newline at end of file +'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); +} 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 5df6768..081e428 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 +1,36 @@ -var _0x5323=["\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"];_0x5323[0];const EventEmitter=require(_0x5323[1]);const UserHasFaxQueue=require(_0x5323[3])[_0x5323[2]];var UserHasFaxQueueEvents= new EventEmitter();UserHasFaxQueueEvents[_0x5323[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x5323[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x5323[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x5323[6]};for(var e in events){var event=events[e];UserHasFaxQueue[_0x5323[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6de2x8,_0x6de2x9,_0x6de2xa){UserHasFaxQueueEvents[_0x5323[10]](event+ _0x5323[8]+ _0x6de2x8[_0x5323[9]],_0x6de2x8);UserHasFaxQueueEvents[_0x5323[10]](event,_0x6de2x8);_0x6de2xa(null)}}module[_0x5323[11]]= UserHasFaxQueueEvents \ No newline at end of file +/** + * 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; 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 bfe297e..93b3bcc 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 +1,32 @@ -var _0xf2d9=["\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"];_0xf2d9[0];const UserHasFaxQueueEvents=require(_0xf2d9[1]);var events=[_0xf2d9[2],_0xf2d9[3]];exports[_0xf2d9[4]]= function(_0xf277x3){for(var _0xf277x4=0,_0xf277x5=events[_0xf2d9[5]];_0xf277x4< _0xf277x5;_0xf277x4++){var _0xf277x6=events[_0xf277x4];var _0xf277x7=createListener(_0xf2d9[6]+ _0xf277x6,_0xf277x3);UserHasFaxQueueEvents[_0xf2d9[7]](_0xf277x6,_0xf277x7);_0xf277x3[_0xf2d9[7]](_0xf2d9[8],removeListener(_0xf277x6,_0xf277x7))}};function createListener(_0xf277x6,_0xf277x3){return function(_0xf277x9){_0xf277x3[_0xf2d9[9]](_0xf277x6,_0xf277x9)}}function removeListener(_0xf277x6,_0xf277x7){return function(){UserHasFaxQueueEvents[_0xf2d9[10]](_0xf277x6,_0xf277x7)}} \ No newline at end of file +/** + * 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); + }; +} 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 bc24831..67646f7 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 +1,35 @@ -var _0x1e92=["\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"];_0x1e92[0];const EventEmitter=require(_0x1e92[1]);const UserHasFaxQueuePermit=require(_0x1e92[3])[_0x1e92[2]];var UserHasFaxQueuePermitEvents= new EventEmitter();UserHasFaxQueuePermitEvents[_0x1e92[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x1e92[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x1e92[6]};for(var e in events){var event=events[e];UserHasFaxQueuePermit[_0x1e92[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6b32x8,_0x6b32x9,_0x6b32xa){UserHasFaxQueuePermitEvents[_0x1e92[10]](event+ _0x1e92[8]+ _0x6b32x8[_0x1e92[9]],_0x6b32x8);UserHasFaxQueuePermitEvents[_0x1e92[10]](event,_0x6b32x8);_0x6b32xa(null)}}module[_0x1e92[11]]= UserHasFaxQueuePermitEvents \ No newline at end of file +/** + * 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; 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 89908fa..2a923b2 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 +1,34 @@ -var _0xfc79=["\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"];_0xfc79[0];const UserHasFaxQueuePermitEvents=require(_0xfc79[1]);var events=[_0xfc79[2],_0xfc79[3]];exports[_0xfc79[4]]= function(_0x13e6x3){for(var _0x13e6x4=0,_0x13e6x5=events[_0xfc79[5]];_0x13e6x4< _0x13e6x5;_0x13e6x4++){var _0x13e6x6=events[_0x13e6x4];var _0x13e6x7=createListener(_0xfc79[6]+ _0x13e6x6,_0x13e6x3);UserHasFaxQueuePermitEvents[_0xfc79[7]](_0x13e6x6,_0x13e6x7);_0x13e6x3[_0xfc79[7]](_0xfc79[8],removeListener(_0x13e6x6,_0x13e6x7))}};function createListener(_0x13e6x6,_0x13e6x3){return function(_0x13e6x9){if(_0x13e6x3[_0xfc79[9]]=== _0x13e6x9[_0xfc79[10]]){_0x13e6x3[_0xfc79[12]](_0xfc79[11])}}}function removeListener(_0x13e6x6,_0x13e6x7){return function(){UserHasFaxQueuePermitEvents[_0xfc79[13]](_0x13e6x6,_0x13e6x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/user_has_list/index.js b/server/api/user_has_list/index.js index 36b8c50..ee1b9af 100644 --- a/server/api/user_has_list/index.js +++ b/server/api/user_has_list/index.js @@ -1 +1,15 @@ -var _0xc9ce=["\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"];_0xc9ce[0];var express=require(_0xc9ce[1]);var controller=require(_0xc9ce[2]);var router=express.Router();router[_0xc9ce[5]](_0xc9ce[3],controller[_0xc9ce[4]]);router[_0xc9ce[5]](_0xc9ce[6],controller[_0xc9ce[7]]);router[_0xc9ce[9]](_0xc9ce[3],controller[_0xc9ce[8]]);router[_0xc9ce[11]](_0xc9ce[6],controller[_0xc9ce[10]]);router[_0xc9ce[12]](_0xc9ce[6],controller[_0xc9ce[10]]);router[_0xc9ce[14]](_0xc9ce[6],controller[_0xc9ce[13]]);module[_0xc9ce[15]]= router \ No newline at end of file +'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; 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 36e4b9f..f0a66dd 100644 --- a/server/api/user_has_list/user_has_list.controller.js +++ b/server/api/user_has_list/user_has_list.controller.js @@ -1 +1,98 @@ -var _0xef18=["\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"];_0xef18[0];var _=require(_0xef18[1]);var UserHasList=require(_0xef18[3])[_0xef18[2]];exports[_0xef18[4]]= function(_0xdc42x3,_0xdc42x4){UserHasList[_0xef18[10]](_0xdc42x3[_0xef18[9]]?{where:_0xdc42x3[_0xef18[9]]}:{})[_0xef18[8]](function(_0xdc42x6){return _0xdc42x4[_0xef18[7]](200)[_0xef18[6]](_0xdc42x6)})[_0xef18[5]](function(_0xdc42x5){return handleError(_0xdc42x4,_0xdc42x5)})};exports[_0xef18[11]]= function(_0xdc42x3,_0xdc42x4){UserHasList[_0xef18[15]](_0xdc42x3[_0xef18[14]][_0xef18[13]])[_0xef18[8]](function(_0xdc42x7){if(!_0xdc42x7){return _0xdc42x4[_0xef18[12]](404)};return _0xdc42x4[_0xef18[6]](_0xdc42x7)})[_0xef18[5]](function(_0xdc42x5){return handleError(_0xdc42x4,_0xdc42x5)})};exports[_0xef18[16]]= function(_0xdc42x3,_0xdc42x4,_0xdc42x8){console[_0xef18[18]](_0xdc42x3[_0xef18[17]]);UserHasList[_0xef18[16]](_0xdc42x3[_0xef18[17]])[_0xef18[8]](function(_0xdc42x7){return _0xdc42x4[_0xef18[7]](201)[_0xef18[6]](_0xdc42x7)})[_0xef18[5]](function(_0xdc42x5){console[_0xef18[19]](_0xdc42x5);return _0xdc42x8(_0xdc42x5)})};exports[_0xef18[20]]= function(_0xdc42x3,_0xdc42x4){if(_0xdc42x3[_0xef18[17]][_0xef18[13]]){delete _0xdc42x3[_0xef18[17]][_0xef18[13]]};UserHasList[_0xef18[15]](_0xdc42x3[_0xef18[14]][_0xef18[13]])[_0xef18[8]](function(_0xdc42x7){if(!_0xdc42x7){return _0xdc42x4[_0xef18[12]](404)};var _0xdc42x9=_[_0xef18[21]](_0xdc42x7,_0xdc42x3[_0xef18[17]]);_0xdc42x9[_0xef18[22]]()[_0xef18[8]](function(){return _0xdc42x4[_0xef18[7]](200)[_0xef18[6]](_0xdc42x7)})[_0xef18[5]](function(_0xdc42x5){return handleError(_0xdc42x4,_0xdc42x5)})})[_0xef18[5]](function(_0xdc42x5){return handleError(_0xdc42x4,_0xdc42x5)})};exports[_0xef18[23]]= function(_0xdc42x3,_0xdc42x4){UserHasList[_0xef18[15]](_0xdc42x3[_0xef18[14]][_0xef18[13]])[_0xef18[8]](function(_0xdc42x7){if(!_0xdc42x7){return _0xdc42x4[_0xef18[12]](404)};_0xdc42x7[_0xef18[23]]()[_0xef18[8]](function(){return _0xdc42x4[_0xef18[12]](204)})[_0xef18[5]](function(_0xdc42x5){return handleError(_0xdc42x4,_0xdc42x5)})})[_0xef18[5]](function(_0xdc42x5){return handleError(_0xdc42x4,_0xdc42x5)})};function handleError(_0xdc42x4,_0xdc42x5){return _0xdc42x4[_0xef18[7]](500)[_0xef18[6]](_0xdc42x5)} \ No newline at end of file +'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); +} 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 87fe77c..d0988e3 100644 --- a/server/api/user_has_list/user_has_list.events.js +++ b/server/api/user_has_list/user_has_list.events.js @@ -1 +1,36 @@ -var _0x7a8f=["\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"];_0x7a8f[0];const EventEmitter=require(_0x7a8f[1]);const UserHasList=require(_0x7a8f[3])[_0x7a8f[2]];var UserHasListEvents= new EventEmitter();UserHasListEvents[_0x7a8f[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x7a8f[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x7a8f[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x7a8f[6]};for(var e in events){var event=events[e];UserHasList[_0x7a8f[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x7532x8,_0x7532x9,_0x7532xa){UserHasListEvents[_0x7a8f[10]](event+ _0x7a8f[8]+ _0x7532x8[_0x7a8f[9]],_0x7532x8);UserHasListEvents[_0x7a8f[10]](event,_0x7532x8);_0x7532xa(null)}}module[_0x7a8f[11]]= UserHasListEvents \ No newline at end of file +/** + * 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; 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 bf81d3c..505a97b 100644 --- a/server/api/user_has_list/user_has_list.socket.js +++ b/server/api/user_has_list/user_has_list.socket.js @@ -1 +1,32 @@ -var _0xc34e=["\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"];_0xc34e[0];const UserHasListEvents=require(_0xc34e[1]);var events=[_0xc34e[2],_0xc34e[3]];exports[_0xc34e[4]]= function(_0x2cdcx3){for(var _0x2cdcx4=0,_0x2cdcx5=events[_0xc34e[5]];_0x2cdcx4< _0x2cdcx5;_0x2cdcx4++){var _0x2cdcx6=events[_0x2cdcx4];var _0x2cdcx7=createListener(_0xc34e[6]+ _0x2cdcx6,_0x2cdcx3);UserHasListEvents[_0xc34e[7]](_0x2cdcx6,_0x2cdcx7);_0x2cdcx3[_0xc34e[7]](_0xc34e[8],removeListener(_0x2cdcx6,_0x2cdcx7))}};function createListener(_0x2cdcx6,_0x2cdcx3){return function(_0x2cdcx9){_0x2cdcx3[_0xc34e[9]](_0x2cdcx6,_0x2cdcx9)}}function removeListener(_0x2cdcx6,_0x2cdcx7){return function(){UserHasListEvents[_0xc34e[10]](_0x2cdcx6,_0x2cdcx7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/user_has_mail_queue/index.js b/server/api/user_has_mail_queue/index.js index 6873d5b..50b083e 100644 --- a/server/api/user_has_mail_queue/index.js +++ b/server/api/user_has_mail_queue/index.js @@ -1 +1,15 @@ -var _0x83c6=["\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"];_0x83c6[0];var express=require(_0x83c6[1]);var controller=require(_0x83c6[2]);var router=express.Router();router[_0x83c6[5]](_0x83c6[3],controller[_0x83c6[4]]);router[_0x83c6[5]](_0x83c6[6],controller[_0x83c6[7]]);router[_0x83c6[9]](_0x83c6[3],controller[_0x83c6[8]]);router[_0x83c6[11]](_0x83c6[6],controller[_0x83c6[10]]);router[_0x83c6[12]](_0x83c6[6],controller[_0x83c6[10]]);router[_0x83c6[14]](_0x83c6[6],controller[_0x83c6[13]]);module[_0x83c6[15]]= router \ No newline at end of file +'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; 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 e3de8fe..c15bc9d 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 +1,95 @@ -var _0x524c=["\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"];_0x524c[0];var _=require(_0x524c[1]);var UserHasMailQueue=require(_0x524c[3])[_0x524c[2]];exports[_0x524c[4]]= function(_0x4645x3,_0x4645x4){UserHasMailQueue[_0x524c[10]](_0x4645x3[_0x524c[9]]?{where:_0x4645x3[_0x524c[9]]}:{})[_0x524c[8]](function(_0x4645x6){return _0x4645x4[_0x524c[7]](200)[_0x524c[6]](_0x4645x6)})[_0x524c[5]](function(_0x4645x5){return handleError(_0x4645x4,_0x4645x5)})};exports[_0x524c[11]]= function(_0x4645x3,_0x4645x4){UserHasMailQueue[_0x524c[15]](_0x4645x3[_0x524c[14]][_0x524c[13]])[_0x524c[8]](function(_0x4645x7){if(!_0x4645x7){return _0x4645x4[_0x524c[12]](404)};return _0x4645x4[_0x524c[6]](_0x4645x7)})[_0x524c[5]](function(_0x4645x5){return handleError(_0x4645x4,_0x4645x5)})};exports[_0x524c[16]]= function(_0x4645x3,_0x4645x4){UserHasMailQueue[_0x524c[16]](_0x4645x3[_0x524c[17]])[_0x524c[8]](function(_0x4645x7){return _0x4645x4[_0x524c[7]](201)[_0x524c[6]](_0x4645x7)})[_0x524c[5]](function(_0x4645x5){return handleError(_0x4645x4,_0x4645x5)})};exports[_0x524c[18]]= function(_0x4645x3,_0x4645x4){if(_0x4645x3[_0x524c[17]][_0x524c[13]]){delete _0x4645x3[_0x524c[17]][_0x524c[13]]};UserHasMailQueue[_0x524c[15]](_0x4645x3[_0x524c[14]][_0x524c[13]])[_0x524c[8]](function(_0x4645x7){if(!_0x4645x7){return _0x4645x4[_0x524c[12]](404)};var _0x4645x8=_[_0x524c[19]](_0x4645x7,_0x4645x3[_0x524c[17]]);_0x4645x8[_0x524c[20]]()[_0x524c[8]](function(){return _0x4645x4[_0x524c[7]](200)[_0x524c[6]](_0x4645x7)})[_0x524c[5]](function(_0x4645x5){return handleError(_0x4645x4,_0x4645x5)})})[_0x524c[5]](function(_0x4645x5){return handleError(_0x4645x4,_0x4645x5)})};exports[_0x524c[21]]= function(_0x4645x3,_0x4645x4){UserHasMailQueue[_0x524c[15]](_0x4645x3[_0x524c[14]][_0x524c[13]])[_0x524c[8]](function(_0x4645x7){if(!_0x4645x7){return _0x4645x4[_0x524c[12]](404)};_0x4645x7[_0x524c[21]]()[_0x524c[8]](function(){return _0x4645x4[_0x524c[12]](204)})[_0x524c[5]](function(_0x4645x5){return handleError(_0x4645x4,_0x4645x5)})})[_0x524c[5]](function(_0x4645x5){return handleError(_0x4645x4,_0x4645x5)})};function handleError(_0x4645x4,_0x4645x5){return _0x4645x4[_0x524c[7]](500)[_0x524c[6]](_0x4645x5)} \ No newline at end of file +'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); +} 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 c570819..46a7c73 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 +1,36 @@ -var _0xc885=["\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"];_0xc885[0];const EventEmitter=require(_0xc885[1]);const UserHasMailQueue=require(_0xc885[3])[_0xc885[2]];var UserHasMailQueueEvents= new EventEmitter();UserHasMailQueueEvents[_0xc885[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xc885[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xc885[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xc885[6]};for(var e in events){var event=events[e];UserHasMailQueue[_0xc885[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xe8aax8,_0xe8aax9,_0xe8aaxa){UserHasMailQueueEvents[_0xc885[10]](event+ _0xc885[8]+ _0xe8aax8[_0xc885[9]],_0xe8aax8);UserHasMailQueueEvents[_0xc885[10]](event,_0xe8aax8);_0xe8aaxa(null)}}module[_0xc885[11]]= UserHasMailQueueEvents \ No newline at end of file +/** + * 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; 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 f8e5d1e..1635bbe 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 +1,32 @@ -var _0x9b1e=["\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"];_0x9b1e[0];const UserHasMailQueueEvents=require(_0x9b1e[1]);var events=[_0x9b1e[2],_0x9b1e[3]];exports[_0x9b1e[4]]= function(_0xeaa6x3){for(var _0xeaa6x4=0,_0xeaa6x5=events[_0x9b1e[5]];_0xeaa6x4< _0xeaa6x5;_0xeaa6x4++){var _0xeaa6x6=events[_0xeaa6x4];var _0xeaa6x7=createListener(_0x9b1e[6]+ _0xeaa6x6,_0xeaa6x3);UserHasMailQueueEvents[_0x9b1e[7]](_0xeaa6x6,_0xeaa6x7);_0xeaa6x3[_0x9b1e[7]](_0x9b1e[8],removeListener(_0xeaa6x6,_0xeaa6x7))}};function createListener(_0xeaa6x6,_0xeaa6x3){return function(_0xeaa6x9){_0xeaa6x3[_0x9b1e[9]](_0xeaa6x6,_0xeaa6x9)}}function removeListener(_0xeaa6x6,_0xeaa6x7){return function(){UserHasMailQueueEvents[_0x9b1e[10]](_0xeaa6x6,_0xeaa6x7)}} \ No newline at end of file +/** + * 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); + }; +} 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 a8994af..519ac53 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 +1,35 @@ -var _0x87e6=["\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"];_0x87e6[0];const EventEmitter=require(_0x87e6[1]);const UserHasMailQueuePermit=require(_0x87e6[3])[_0x87e6[2]];var UserHasMailQueuePermitEvents= new EventEmitter();UserHasMailQueuePermitEvents[_0x87e6[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x87e6[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x87e6[6]};for(var e in events){var event=events[e];UserHasMailQueuePermit[_0x87e6[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x67edx8,_0x67edx9,_0x67edxa){UserHasMailQueuePermitEvents[_0x87e6[10]](event+ _0x87e6[8]+ _0x67edx8[_0x87e6[9]],_0x67edx8);UserHasMailQueuePermitEvents[_0x87e6[10]](event,_0x67edx8);_0x67edxa(null)}}module[_0x87e6[11]]= UserHasMailQueuePermitEvents \ No newline at end of file +/** + * 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; 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 1809199..d4786d1 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 +1,34 @@ -var _0x3f99=["\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"];_0x3f99[0];const UserHasMailQueuePermitEvents=require(_0x3f99[1]);var events=[_0x3f99[2],_0x3f99[3]];exports[_0x3f99[4]]= function(_0xdc81x3){for(var _0xdc81x4=0,_0xdc81x5=events[_0x3f99[5]];_0xdc81x4< _0xdc81x5;_0xdc81x4++){var _0xdc81x6=events[_0xdc81x4];var _0xdc81x7=createListener(_0x3f99[6]+ _0xdc81x6,_0xdc81x3);UserHasMailQueuePermitEvents[_0x3f99[7]](_0xdc81x6,_0xdc81x7);_0xdc81x3[_0x3f99[7]](_0x3f99[8],removeListener(_0xdc81x6,_0xdc81x7))}};function createListener(_0xdc81x6,_0xdc81x3){return function(_0xdc81x9){if(_0xdc81x3[_0x3f99[9]]=== _0xdc81x9[_0x3f99[10]]){_0xdc81x3[_0x3f99[12]](_0x3f99[11])}}}function removeListener(_0xdc81x6,_0xdc81x7){return function(){UserHasMailQueuePermitEvents[_0x3f99[13]](_0xdc81x6,_0xdc81x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/user_has_openchannel_queue/index.js b/server/api/user_has_openchannel_queue/index.js index 8dfdaa5..2548a35 100644 --- a/server/api/user_has_openchannel_queue/index.js +++ b/server/api/user_has_openchannel_queue/index.js @@ -1 +1,16 @@ -var _0xe2c2=["\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"];_0xe2c2[0];var express=require(_0xe2c2[1]);var auth=require(_0xe2c2[2]);var controller=require(_0xe2c2[3]);var router=express.Router();router[_0xe2c2[6]](_0xe2c2[4],controller[_0xe2c2[5]]);router[_0xe2c2[6]](_0xe2c2[7],controller[_0xe2c2[8]]);router[_0xe2c2[10]](_0xe2c2[4],controller[_0xe2c2[9]]);router[_0xe2c2[12]](_0xe2c2[7],controller[_0xe2c2[11]]);router[_0xe2c2[13]](_0xe2c2[7],controller[_0xe2c2[11]]);router[_0xe2c2[15]](_0xe2c2[7],controller[_0xe2c2[14]]);module[_0xe2c2[16]]= router \ No newline at end of file +'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; 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 0330ed1..6e3c857 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 +1,109 @@ -var _0xa3a7=["\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"];_0xa3a7[0];var _=require(_0xa3a7[1]);var Util=require(_0xa3a7[2]);var UserHasOpenchannelQueue=require(_0xa3a7[4])[_0xa3a7[3]];exports[_0xa3a7[5]]= function(_0x19a6x4,_0x19a6x5){UserHasOpenchannelQueue[_0xa3a7[11]](_0x19a6x4[_0xa3a7[10]]?{where:_0x19a6x4[_0xa3a7[10]]}:{})[_0xa3a7[9]](function(_0x19a6x7){return _0x19a6x5[_0xa3a7[8]](200)[_0xa3a7[7]](_0x19a6x7)})[_0xa3a7[6]](function(_0x19a6x6){return handleError(_0x19a6x5,_0x19a6x6)})};exports[_0xa3a7[12]]= function(_0x19a6x4,_0x19a6x5){UserHasOpenchannelQueue[_0xa3a7[16]](_0x19a6x4[_0xa3a7[15]][_0xa3a7[14]])[_0xa3a7[9]](function(_0x19a6x7){if(!_0x19a6x7){return _0x19a6x5[_0xa3a7[13]](404)};return _0x19a6x5[_0xa3a7[7]](_0x19a6x7)})[_0xa3a7[6]](function(_0x19a6x6){return handleError(_0x19a6x5,_0x19a6x6)})};exports[_0xa3a7[17]]= function(_0x19a6x4,_0x19a6x5){UserHasOpenchannelQueue[_0xa3a7[17]](_0x19a6x4[_0xa3a7[18]])[_0xa3a7[9]](function(_0x19a6x7){return _0x19a6x5[_0xa3a7[8]](201)[_0xa3a7[7]](_0x19a6x7)})[_0xa3a7[6]](function(_0x19a6x6){return handleError(_0x19a6x5,_0x19a6x6)})};exports[_0xa3a7[19]]= function(_0x19a6x4,_0x19a6x5){if(_0x19a6x4[_0xa3a7[18]][_0xa3a7[14]]){delete _0x19a6x4[_0xa3a7[18]][_0xa3a7[14]]};UserHasOpenchannelQueue[_0xa3a7[16]](_0x19a6x4[_0xa3a7[15]][_0xa3a7[14]])[_0xa3a7[9]](function(_0x19a6x8){if(!_0x19a6x8){return _0x19a6x5[_0xa3a7[13]](404)};var _0x19a6x9=_[_0xa3a7[20]](_0x19a6x8,_0x19a6x4[_0xa3a7[18]]);_0x19a6x9[_0xa3a7[21]]()[_0xa3a7[9]](function(){return _0x19a6x5[_0xa3a7[8]](200)[_0xa3a7[7]](_0x19a6x8)})[_0xa3a7[6]](function(_0x19a6x6){return handleError(_0x19a6x5,_0x19a6x6)})})[_0xa3a7[6]](function(_0x19a6x6){return handleError(_0x19a6x5,_0x19a6x6)})};exports[_0xa3a7[22]]= function(_0x19a6x4,_0x19a6x5){UserHasOpenchannelQueue[_0xa3a7[16]](_0x19a6x4[_0xa3a7[15]][_0xa3a7[14]])[_0xa3a7[9]](function(_0x19a6x8){if(!_0x19a6x8){return _0x19a6x5[_0xa3a7[13]](404)};user_has_mail_queue[_0xa3a7[22]]()[_0xa3a7[9]](function(){return _0x19a6x5[_0xa3a7[13]](204)})[_0xa3a7[6]](function(_0x19a6x6){return handleError(_0x19a6x5,_0x19a6x6)})})[_0xa3a7[6]](function(_0x19a6x6){return handleError(_0x19a6x5,_0x19a6x6)})};function handleError(_0x19a6x5,_0x19a6x6){return _0x19a6x5[_0xa3a7[8]](500)[_0xa3a7[7]](_0x19a6x6)} \ No newline at end of file +/** + * 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); +} 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 dd91501..1be5c74 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 +1,36 @@ -var _0x9617=["\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"];_0x9617[0];const EventEmitter=require(_0x9617[1]);const UserHasOpenchannelQueue=require(_0x9617[3])[_0x9617[2]];var UserHasOpenchannelQueueEvents= new EventEmitter();UserHasOpenchannelQueueEvents[_0x9617[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x9617[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x9617[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x9617[6]};for(var e in events){var event=events[e];UserHasOpenchannelQueue[_0x9617[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xb55dx8,_0xb55dx9,_0xb55dxa){UserHasOpenchannelQueueEvents[_0x9617[10]](event+ _0x9617[8]+ _0xb55dx8[_0x9617[9]],_0xb55dx8);UserHasOpenchannelQueueEvents[_0x9617[10]](event,_0xb55dx8);_0xb55dxa(null)}}module[_0x9617[11]]= UserHasOpenchannelQueueEvents \ No newline at end of file +/** + * 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; 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 0087b05..26d8caa 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 +1,32 @@ -var _0xc80a=["\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"];_0xc80a[0];const UserHasOpenchannelQueueEvents=require(_0xc80a[1]);var events=[_0xc80a[2],_0xc80a[3]];exports[_0xc80a[4]]= function(_0xf890x3){for(var _0xf890x4=0,_0xf890x5=events[_0xc80a[5]];_0xf890x4< _0xf890x5;_0xf890x4++){var _0xf890x6=events[_0xf890x4];var _0xf890x7=createListener(_0xc80a[6]+ _0xf890x6,_0xf890x3);UserHasOpenchannelQueueEvents[_0xc80a[7]](_0xf890x6,_0xf890x7);_0xf890x3[_0xc80a[7]](_0xc80a[8],removeListener(_0xf890x6,_0xf890x7))}};function createListener(_0xf890x6,_0xf890x3){return function(_0xf890x9){_0xf890x3[_0xc80a[9]](_0xf890x6,_0xf890x9)}}function removeListener(_0xf890x6,_0xf890x7){return function(){UserHasOpenchannelQueueEvents[_0xc80a[10]](_0xf890x6,_0xf890x7)}} \ No newline at end of file +/** + * 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); + }; +} 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 9819ee7..0caae70 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 +1,35 @@ -var _0x9ffc=["\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"];_0x9ffc[0];const EventEmitter=require(_0x9ffc[1]);const UserHasOpenchannelQueuePermit=require(_0x9ffc[3])[_0x9ffc[2]];var UserHasOpenchannelQueuePermitEvents= new EventEmitter();UserHasOpenchannelQueuePermitEvents[_0x9ffc[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x9ffc[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x9ffc[6]};for(var e in events){var event=events[e];UserHasOpenchannelQueuePermit[_0x9ffc[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x7bedx8,_0x7bedx9,_0x7bedxa){UserHasOpenchannelQueuePermitEvents[_0x9ffc[10]](event+ _0x9ffc[8]+ _0x7bedx8[_0x9ffc[9]],_0x7bedx8);UserHasOpenchannelQueuePermitEvents[_0x9ffc[10]](event,_0x7bedx8);_0x7bedxa(null)}}module[_0x9ffc[11]]= UserHasOpenchannelQueuePermitEvents \ No newline at end of file +/** + * 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; 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 e372532..1c7289d 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 +1,34 @@ -var _0xc8a2=["\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"];_0xc8a2[0];const UserHasOpenchannelQueuePermitEvents=require(_0xc8a2[1]);var events=[_0xc8a2[2],_0xc8a2[3]];exports[_0xc8a2[4]]= function(_0x27f4x3){for(var _0x27f4x4=0,_0x27f4x5=events[_0xc8a2[5]];_0x27f4x4< _0x27f4x5;_0x27f4x4++){var _0x27f4x6=events[_0x27f4x4];var _0x27f4x7=createListener(_0xc8a2[6]+ _0x27f4x6,_0x27f4x3);UserHasOpenchannelQueuePermitEvents[_0xc8a2[7]](_0x27f4x6,_0x27f4x7);_0x27f4x3[_0xc8a2[7]](_0xc8a2[8],removeListener(_0x27f4x6,_0x27f4x7))}};function createListener(_0x27f4x6,_0x27f4x3){return function(_0x27f4x9){if(_0x27f4x3[_0xc8a2[9]]=== _0x27f4x9[_0xc8a2[10]]){_0x27f4x3[_0xc8a2[12]](_0xc8a2[11])}}}function removeListener(_0x27f4x6,_0x27f4x7){return function(){UserHasOpenchannelQueuePermitEvents[_0xc8a2[13]](_0x27f4x6,_0x27f4x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/user_has_sms_queue/index.js b/server/api/user_has_sms_queue/index.js index 1d10194..5e63266 100644 --- a/server/api/user_has_sms_queue/index.js +++ b/server/api/user_has_sms_queue/index.js @@ -1 +1,15 @@ -var _0xa2df=["\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"];_0xa2df[0];var express=require(_0xa2df[1]);var controller=require(_0xa2df[2]);var router=express.Router();router[_0xa2df[5]](_0xa2df[3],controller[_0xa2df[4]]);router[_0xa2df[5]](_0xa2df[6],controller[_0xa2df[7]]);router[_0xa2df[9]](_0xa2df[3],controller[_0xa2df[8]]);router[_0xa2df[11]](_0xa2df[6],controller[_0xa2df[10]]);router[_0xa2df[12]](_0xa2df[6],controller[_0xa2df[10]]);router[_0xa2df[14]](_0xa2df[6],controller[_0xa2df[13]]);module[_0xa2df[15]]= router \ No newline at end of file +'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; 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 8a847ea..9293afa 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 +1,103 @@ -var _0xdd87=["\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"];_0xdd87[0];var _=require(_0xdd87[1]);var UserHasSmsQueue=require(_0xdd87[3])[_0xdd87[2]];exports[_0xdd87[4]]= function(_0x2a41x3,_0x2a41x4){UserHasSmsQueue[_0xdd87[10]](_0x2a41x3[_0xdd87[9]]?{where:_0x2a41x3[_0xdd87[9]]}:{})[_0xdd87[8]](function(_0x2a41x6){return _0x2a41x4[_0xdd87[7]](200)[_0xdd87[6]](_0x2a41x6)})[_0xdd87[5]](function(_0x2a41x5){return handleError(_0x2a41x4,_0x2a41x5)})};exports[_0xdd87[11]]= function(_0x2a41x3,_0x2a41x4){UserHasSmsQueue[_0xdd87[15]](_0x2a41x3[_0xdd87[14]][_0xdd87[13]])[_0xdd87[8]](function(UserHasSmsQueue){if(!UserHasSmsQueue){return _0x2a41x4[_0xdd87[12]](404)};return _0x2a41x4[_0xdd87[6]](UserHasSmsQueue)})[_0xdd87[5]](function(_0x2a41x5){return handleError(_0x2a41x4,_0x2a41x5)})};exports[_0xdd87[16]]= function(_0x2a41x3,_0x2a41x4){UserHasSmsQueue[_0xdd87[16]](_0x2a41x3[_0xdd87[17]])[_0xdd87[8]](function(UserHasSmsQueue){return _0x2a41x4[_0xdd87[7]](201)[_0xdd87[6]](UserHasSmsQueue)})[_0xdd87[5]](function(_0x2a41x5){return handleError(_0x2a41x4,_0x2a41x5)})};exports[_0xdd87[18]]= function(_0x2a41x3,_0x2a41x4){if(_0x2a41x3[_0xdd87[17]][_0xdd87[13]]){delete _0x2a41x3[_0xdd87[17]][_0xdd87[13]]};UserHasSmsQueue[_0xdd87[21]]({where:{id:_0x2a41x3[_0xdd87[14]][_0xdd87[13]]}})[_0xdd87[8]](function(UserHasSmsQueue){if(!UserHasSmsQueue){return _0x2a41x4[_0xdd87[12]](404)};var _0x2a41x7=_[_0xdd87[19]](UserHasSmsQueue,_0x2a41x3[_0xdd87[17]]);_0x2a41x7[_0xdd87[20]]()[_0xdd87[8]](function(){return _0x2a41x4[_0xdd87[7]](200)[_0xdd87[6]](UserHasSmsQueue)})[_0xdd87[5]](function(_0x2a41x5){return handleError(_0x2a41x4,_0x2a41x5)})})[_0xdd87[5]](function(_0x2a41x5){return handleError(_0x2a41x4,_0x2a41x5)})};exports[_0xdd87[22]]= function(_0x2a41x3,_0x2a41x4){UserHasSmsQueue[_0xdd87[21]]({where:{id:_0x2a41x3[_0xdd87[14]][_0xdd87[13]]}})[_0xdd87[8]](function(UserHasSmsQueue){if(!UserHasSmsQueue){return _0x2a41x4[_0xdd87[12]](404)};UserHasSmsQueue[_0xdd87[22]]()[_0xdd87[8]](function(){return _0x2a41x4[_0xdd87[12]](204)})[_0xdd87[5]](function(_0x2a41x5){return handleError(_0x2a41x4,_0x2a41x5)})})[_0xdd87[5]](function(_0x2a41x5){return handleError(_0x2a41x4,_0x2a41x5)})};function handleError(_0x2a41x4,_0x2a41x5){return _0x2a41x4[_0xdd87[7]](500)[_0xdd87[6]](_0x2a41x5)} \ No newline at end of file +'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); +} 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 7fd7859..2104253 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 +1,36 @@ -var _0x8e89=["\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"];_0x8e89[0];const EventEmitter=require(_0x8e89[1]);const UserHasSmsQueue=require(_0x8e89[3])[_0x8e89[2]];var UserHasSmsQueueEvents= new EventEmitter();UserHasSmsQueueEvents[_0x8e89[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x8e89[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x8e89[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x8e89[6]};for(var e in events){var event=events[e];UserHasSmsQueue[_0x8e89[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xe80dx8,_0xe80dx9,_0xe80dxa){UserHasSmsQueueEvents[_0x8e89[10]](event+ _0x8e89[8]+ _0xe80dx8[_0x8e89[9]],_0xe80dx8);UserHasSmsQueueEvents[_0x8e89[10]](event,_0xe80dx8);_0xe80dxa(null)}}module[_0x8e89[11]]= UserHasSmsQueueEvents \ No newline at end of file +/** + * 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; 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 7c63308..7dfde5c 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 +1,32 @@ -var _0xfde5=["\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"];_0xfde5[0];const UserHasSmsQueueEvents=require(_0xfde5[1]);var events=[_0xfde5[2],_0xfde5[3]];exports[_0xfde5[4]]= function(_0xeaebx3){for(var _0xeaebx4=0,_0xeaebx5=events[_0xfde5[5]];_0xeaebx4< _0xeaebx5;_0xeaebx4++){var _0xeaebx6=events[_0xeaebx4];var _0xeaebx7=createListener(_0xfde5[6]+ _0xeaebx6,_0xeaebx3);UserHasSmsQueueEvents[_0xfde5[7]](_0xeaebx6,_0xeaebx7);_0xeaebx3[_0xfde5[7]](_0xfde5[8],removeListener(_0xeaebx6,_0xeaebx7))}};function createListener(_0xeaebx6,_0xeaebx3){return function(_0xeaebx9){_0xeaebx3[_0xfde5[9]](_0xeaebx6,_0xeaebx9)}}function removeListener(_0xeaebx6,_0xeaebx7){return function(){UserHasSmsQueueEvents[_0xfde5[10]](_0xeaebx6,_0xeaebx7)}} \ No newline at end of file +/** + * 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); + }; +} 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 882f93e..b6b7a01 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 +1,35 @@ -var _0x65e5=["\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"];_0x65e5[0];const EventEmitter=require(_0x65e5[1]);const UserHasSmsQueuePermit=require(_0x65e5[3])[_0x65e5[2]];var UserHasSmsQueuePermitEvents= new EventEmitter();UserHasSmsQueuePermitEvents[_0x65e5[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x65e5[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x65e5[6]};for(var e in events){var event=events[e];UserHasSmsQueuePermit[_0x65e5[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xd7e0x8,_0xd7e0x9,_0xd7e0xa){UserHasSmsQueuePermitEvents[_0x65e5[10]](event+ _0x65e5[8]+ _0xd7e0x8[_0x65e5[9]],_0xd7e0x8);UserHasSmsQueuePermitEvents[_0x65e5[10]](event,_0xd7e0x8);_0xd7e0xa(null)}}module[_0x65e5[11]]= UserHasSmsQueuePermitEvents \ No newline at end of file +/** + * 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; 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 0897b13..2c2b49c 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 +1,34 @@ -var _0x17e7=["\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"];_0x17e7[0];const UserHasSmsQueuePermitEvents=require(_0x17e7[1]);var events=[_0x17e7[2],_0x17e7[3]];exports[_0x17e7[4]]= function(_0xefc2x3){for(var _0xefc2x4=0,_0xefc2x5=events[_0x17e7[5]];_0xefc2x4< _0xefc2x5;_0xefc2x4++){var _0xefc2x6=events[_0xefc2x4];var _0xefc2x7=createListener(_0x17e7[6]+ _0xefc2x6,_0xefc2x3);UserHasSmsQueuePermitEvents[_0x17e7[7]](_0xefc2x6,_0xefc2x7);_0xefc2x3[_0x17e7[7]](_0x17e7[8],removeListener(_0xefc2x6,_0xefc2x7))}};function createListener(_0xefc2x6,_0xefc2x3){return function(_0xefc2x9){if(_0xefc2x3[_0x17e7[9]]=== _0xefc2x9[_0x17e7[10]]){_0xefc2x3[_0x17e7[12]](_0x17e7[11])}}}function removeListener(_0xefc2x6,_0xefc2x7){return function(){UserHasSmsQueuePermitEvents[_0x17e7[13]](_0xefc2x6,_0xefc2x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/user_has_team/index.js b/server/api/user_has_team/index.js index 1b3a17a..723bdc1 100644 --- a/server/api/user_has_team/index.js +++ b/server/api/user_has_team/index.js @@ -1 +1,15 @@ -var _0x9d23=["\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"];_0x9d23[0];var express=require(_0x9d23[1]);var controller=require(_0x9d23[2]);var router=express.Router();router[_0x9d23[5]](_0x9d23[3],controller[_0x9d23[4]]);router[_0x9d23[5]](_0x9d23[6],controller[_0x9d23[7]]);router[_0x9d23[9]](_0x9d23[3],controller[_0x9d23[8]]);router[_0x9d23[11]](_0x9d23[6],controller[_0x9d23[10]]);router[_0x9d23[12]](_0x9d23[6],controller[_0x9d23[10]]);router[_0x9d23[14]](_0x9d23[6],controller[_0x9d23[13]]);module[_0x9d23[15]]= router \ No newline at end of file +'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 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 cdb6153..7f0f426 100644 --- a/server/api/user_has_team/user_has_team.controller.js +++ b/server/api/user_has_team/user_has_team.controller.js @@ -1 +1,96 @@ -var _0x2bf4=["\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"];_0x2bf4[0];var _=require(_0x2bf4[1]);var UserHasTeam=require(_0x2bf4[3])[_0x2bf4[2]];exports[_0x2bf4[4]]= function(_0xf2a9x3,_0xf2a9x4){console[_0x2bf4[6]](_0xf2a9x3[_0x2bf4[5]]);UserHasTeam[_0x2bf4[11]]({where:_0xf2a9x3[_0x2bf4[5]]})[_0x2bf4[10]](function(_0xf2a9x6){return _0xf2a9x4[_0x2bf4[9]](200)[_0x2bf4[8]](_0xf2a9x6)})[_0x2bf4[7]](function(_0xf2a9x5){return handleError(_0xf2a9x4,_0xf2a9x5)})};exports[_0x2bf4[12]]= function(_0xf2a9x3,_0xf2a9x4){UserHasTeam[_0x2bf4[16]](_0xf2a9x3[_0x2bf4[15]][_0x2bf4[14]])[_0x2bf4[10]](function(_0xf2a9x7){if(!_0xf2a9x7){return _0xf2a9x4[_0x2bf4[13]](404)};return _0xf2a9x4[_0x2bf4[8]](_0xf2a9x7)})[_0x2bf4[7]](function(_0xf2a9x5){return handleError(_0xf2a9x4,_0xf2a9x5)})};exports[_0x2bf4[17]]= function(_0xf2a9x3,_0xf2a9x4){UserHasTeam[_0x2bf4[17]](_0xf2a9x3[_0x2bf4[18]])[_0x2bf4[10]](function(_0xf2a9x7){return _0xf2a9x4[_0x2bf4[9]](201)[_0x2bf4[8]](_0xf2a9x7)})[_0x2bf4[7]](function(_0xf2a9x5){return handleError(_0xf2a9x4,_0xf2a9x5)})};exports[_0x2bf4[19]]= function(_0xf2a9x3,_0xf2a9x4){if(_0xf2a9x3[_0x2bf4[18]][_0x2bf4[14]]){delete _0xf2a9x3[_0x2bf4[18]][_0x2bf4[14]]};UserHasTeam[_0x2bf4[16]](_0xf2a9x3[_0x2bf4[15]][_0x2bf4[14]])[_0x2bf4[10]](function(_0xf2a9x7){if(!_0xf2a9x7){return _0xf2a9x4[_0x2bf4[13]](404)};var _0xf2a9x8=_[_0x2bf4[20]](_0xf2a9x7,_0xf2a9x3[_0x2bf4[18]]);_0xf2a9x8[_0x2bf4[21]]()[_0x2bf4[10]](function(){return _0xf2a9x4[_0x2bf4[9]](200)[_0x2bf4[8]](_0xf2a9x7)})[_0x2bf4[7]](function(_0xf2a9x5){return handleError(_0xf2a9x4,_0xf2a9x5)})})[_0x2bf4[7]](function(_0xf2a9x5){return handleError(_0xf2a9x4,_0xf2a9x5)})};exports[_0x2bf4[22]]= function(_0xf2a9x3,_0xf2a9x4){UserHasTeam[_0x2bf4[16]](_0xf2a9x3[_0x2bf4[15]][_0x2bf4[14]])[_0x2bf4[10]](function(_0xf2a9x7){if(!_0xf2a9x7){return _0xf2a9x4[_0x2bf4[13]](404)};_0xf2a9x7[_0x2bf4[22]]()[_0x2bf4[10]](function(){return _0xf2a9x4[_0x2bf4[13]](204)})[_0x2bf4[7]](function(_0xf2a9x5){return handleError(_0xf2a9x4,_0xf2a9x5)})})[_0x2bf4[7]](function(_0xf2a9x5){return handleError(_0xf2a9x4,_0xf2a9x5)})};function handleError(_0xf2a9x4,_0xf2a9x5){return _0xf2a9x4[_0x2bf4[9]](500)[_0x2bf4[8]](_0xf2a9x5)} \ No newline at end of file +'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); +} 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 89cf843..ce02e87 100644 --- a/server/api/user_has_team/user_has_team.events.js +++ b/server/api/user_has_team/user_has_team.events.js @@ -1 +1,36 @@ -var _0xb3ab=["\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"];_0xb3ab[0];const EventEmitter=require(_0xb3ab[1]);const UserHasTeam=require(_0xb3ab[3])[_0xb3ab[2]];var UserHasTeamEvents= new EventEmitter();UserHasTeamEvents[_0xb3ab[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xb3ab[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xb3ab[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xb3ab[6]};for(var e in events){var event=events[e];UserHasTeam[_0xb3ab[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x5620x8,_0x5620x9,_0x5620xa){UserHasTeamEvents[_0xb3ab[10]](event+ _0xb3ab[8]+ _0x5620x8[_0xb3ab[9]],_0x5620x8);UserHasTeamEvents[_0xb3ab[10]](event,_0x5620x8);_0x5620xa(null)}}module[_0xb3ab[11]]= UserHasTeamEvents \ No newline at end of file +/** + * 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; 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 22663dd..423b31f 100644 --- a/server/api/user_has_team/user_has_team.socket.js +++ b/server/api/user_has_team/user_has_team.socket.js @@ -1 +1,32 @@ -var _0x98fc=["\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"];_0x98fc[0];const UserHasTeamEvents=require(_0x98fc[1]);var events=[_0x98fc[2],_0x98fc[3]];exports[_0x98fc[4]]= function(_0xfaf6x3){for(var _0xfaf6x4=0,_0xfaf6x5=events[_0x98fc[5]];_0xfaf6x4< _0xfaf6x5;_0xfaf6x4++){var _0xfaf6x6=events[_0xfaf6x4];var _0xfaf6x7=createListener(_0x98fc[6]+ _0xfaf6x6,_0xfaf6x3);UserHasTeamEvents[_0x98fc[7]](_0xfaf6x6,_0xfaf6x7);_0xfaf6x3[_0x98fc[7]](_0x98fc[8],removeListener(_0xfaf6x6,_0xfaf6x7))}};function createListener(_0xfaf6x6,_0xfaf6x3){return function(_0xfaf6x9){_0xfaf6x3[_0x98fc[9]](_0xfaf6x6,_0xfaf6x9)}}function removeListener(_0xfaf6x6,_0xfaf6x7){return function(){UserHasTeamEvents[_0x98fc[10]](_0xfaf6x6,_0xfaf6x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/user_has_voice_queue/index.js b/server/api/user_has_voice_queue/index.js index abe225d..72551d5 100644 --- a/server/api/user_has_voice_queue/index.js +++ b/server/api/user_has_voice_queue/index.js @@ -1 +1,15 @@ -var _0xb221=["\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"];_0xb221[0];var express=require(_0xb221[1]);var controller=require(_0xb221[2]);var router=express.Router();router[_0xb221[5]](_0xb221[3],controller[_0xb221[4]]);router[_0xb221[5]](_0xb221[6],controller[_0xb221[7]]);router[_0xb221[9]](_0xb221[3],controller[_0xb221[8]]);router[_0xb221[11]](_0xb221[6],controller[_0xb221[10]]);router[_0xb221[12]](_0xb221[6],controller[_0xb221[10]]);router[_0xb221[14]](_0xb221[6],controller[_0xb221[13]]);module[_0xb221[15]]= router \ No newline at end of file +'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 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 d26284b..f3e5d22 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 +1,98 @@ -var _0x5540=["\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"];_0x5540[0];var _=require(_0x5540[1]);var UserHasVoiceQueue=require(_0x5540[3])[_0x5540[2]];exports[_0x5540[4]]= function(_0x8278x3,_0x8278x4){UserHasVoiceQueue[_0x5540[10]](_0x8278x3[_0x5540[9]]?{where:_0x8278x3[_0x5540[9]]}:{})[_0x5540[8]](function(_0x8278x6){return _0x8278x4[_0x5540[7]](200)[_0x5540[6]](_0x8278x6)})[_0x5540[5]](function(_0x8278x5){return handleError(_0x8278x4,_0x8278x5)})};exports[_0x5540[11]]= function(_0x8278x3,_0x8278x4){UserHasVoiceQueue[_0x5540[15]](_0x8278x3[_0x5540[14]][_0x5540[13]])[_0x5540[8]](function(_0x8278x7){if(!_0x8278x7){return _0x8278x4[_0x5540[12]](404)};return _0x8278x4[_0x5540[6]](_0x8278x7)})[_0x5540[5]](function(_0x8278x5){return handleError(_0x8278x4,_0x8278x5)})};exports[_0x5540[16]]= function(_0x8278x3,_0x8278x4,_0x8278x8){console[_0x5540[18]](_0x8278x3[_0x5540[17]]);UserHasVoiceQueue[_0x5540[16]](_0x8278x3[_0x5540[17]])[_0x5540[8]](function(_0x8278x7){return _0x8278x4[_0x5540[7]](201)[_0x5540[6]](_0x8278x7)})[_0x5540[5]](function(_0x8278x5){console[_0x5540[19]](_0x8278x5);return _0x8278x8(_0x8278x5)})};exports[_0x5540[20]]= function(_0x8278x3,_0x8278x4){if(_0x8278x3[_0x5540[17]][_0x5540[13]]){delete _0x8278x3[_0x5540[17]][_0x5540[13]]};UserHasVoiceQueue[_0x5540[15]](_0x8278x3[_0x5540[14]][_0x5540[13]])[_0x5540[8]](function(_0x8278x7){if(!_0x8278x7){return _0x8278x4[_0x5540[12]](404)};var _0x8278x9=_[_0x5540[21]](_0x8278x7,_0x8278x3[_0x5540[17]]);_0x8278x9[_0x5540[22]]()[_0x5540[8]](function(){return _0x8278x4[_0x5540[7]](200)[_0x5540[6]](_0x8278x7)})[_0x5540[5]](function(_0x8278x5){return handleError(_0x8278x4,_0x8278x5)})})[_0x5540[5]](function(_0x8278x5){return handleError(_0x8278x4,_0x8278x5)})};exports[_0x5540[23]]= function(_0x8278x3,_0x8278x4){UserHasVoiceQueue[_0x5540[15]](_0x8278x3[_0x5540[14]][_0x5540[13]])[_0x5540[8]](function(_0x8278x7){if(!_0x8278x7){return _0x8278x4[_0x5540[12]](404)};_0x8278x7[_0x5540[23]]()[_0x5540[8]](function(){return _0x8278x4[_0x5540[12]](204)})[_0x5540[5]](function(_0x8278x5){return handleError(_0x8278x4,_0x8278x5)})})[_0x5540[5]](function(_0x8278x5){return handleError(_0x8278x4,_0x8278x5)})};function handleError(_0x8278x4,_0x8278x5){return _0x8278x4[_0x5540[7]](500)[_0x5540[6]](_0x8278x5)} \ No newline at end of file +'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); +} 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 90c9c00..aacd9a7 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 +1,36 @@ -var _0x2e07=["\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"];_0x2e07[0];const EventEmitter=require(_0x2e07[1]);const UserHasVoiceQueue=require(_0x2e07[3])[_0x2e07[2]];var UserHasVoiceQueueEvents= new EventEmitter();UserHasVoiceQueueEvents[_0x2e07[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x2e07[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x2e07[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x2e07[6]};for(var e in events){var event=events[e];UserHasVoiceQueue[_0x2e07[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x3beax8,_0x3beax9,_0x3beaxa){UserHasVoiceQueueEvents[_0x2e07[10]](event+ _0x2e07[8]+ _0x3beax8[_0x2e07[9]],_0x3beax8);UserHasVoiceQueueEvents[_0x2e07[10]](event,_0x3beax8);_0x3beaxa(null)}}module[_0x2e07[11]]= UserHasVoiceQueueEvents \ No newline at end of file +/** + * 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; 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 4327732..5056bed 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 +1,58 @@ -var _0x7629=["\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"];_0x7629[0];const UserHasVoiceQueueEvents=require(_0x7629[1]);var events=[_0x7629[2],_0x7629[3]];exports[_0x7629[4]]= function(_0x26e5x3){for(var _0x26e5x4=0,_0x26e5x5=events[_0x7629[5]];_0x26e5x4< _0x26e5x5;_0x26e5x4++){var _0x26e5x6=events[_0x26e5x4];var _0x26e5x7=createListener(_0x7629[6]+ _0x26e5x6,_0x26e5x3);UserHasVoiceQueueEvents[_0x7629[7]](_0x26e5x6,_0x26e5x7);_0x26e5x3[_0x7629[7]](_0x7629[8],removeListener(_0x26e5x6,_0x26e5x7))}};function createListener(_0x26e5x6,_0x26e5x3){return function(_0x26e5x9){switch(_0x26e5x6){case _0x7629[24]:_0x26e5x3[_0x7629[23]](_0x26e5x6,{logged:_0x26e5x9[_0x7629[9]],loggedAt:_0x26e5x9[_0x7629[10]],queue:_0x26e5x9[_0x7629[11]],membername:_0x26e5x9[_0x7629[12]],interface:_0x26e5x9[_0x7629[13]],callstaken:_0x26e5x9[_0x7629[14]],lastcall:_0x26e5x9[_0x7629[15]],status:_0x26e5x9[_0x7629[16]],statusdesc:_0x26e5x9[_0x7629[17]],statusAt:_0x26e5x9[_0x7629[18]],paused:_0x26e5x9[_0x7629[19]],pausedAt:_0x26e5x9[_0x7629[20]],reason:_0x26e5x9[_0x7629[21]],UserId:_0x26e5x9[_0x7629[22]]});break;case _0x7629[25]:_0x26e5x3[_0x7629[23]](_0x26e5x6,_0x26e5x9);break;default:}}}function removeListener(_0x26e5x6,_0x26e5x7){return function(){UserHasVoiceQueueEvents[_0x7629[26]](_0x26e5x6,_0x26e5x7)}} \ No newline at end of file +/** + * 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); + }; +} 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 806e994..edcd78c 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 +1,35 @@ -var _0xe76f=["\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"];_0xe76f[0];const EventEmitter=require(_0xe76f[1]);const UserHasVoiceQueuePermit=require(_0xe76f[3])[_0xe76f[2]];var UserHasVoiceQueuePermitEvents= new EventEmitter();UserHasVoiceQueuePermitEvents[_0xe76f[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xe76f[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xe76f[6]};for(var e in events){var event=events[e];UserHasVoiceQueuePermit[_0xe76f[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xb372x8,_0xb372x9,_0xb372xa){UserHasVoiceQueuePermitEvents[_0xe76f[10]](event+ _0xe76f[8]+ _0xb372x8[_0xe76f[9]],_0xb372x8);UserHasVoiceQueuePermitEvents[_0xe76f[10]](event,_0xb372x8);_0xb372xa(null)}}module[_0xe76f[11]]= UserHasVoiceQueuePermitEvents \ No newline at end of file +/** + * 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; 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 1f36a16..877e1e4 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 +1,34 @@ -var _0x2b3a=["\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"];_0x2b3a[0];const UserHasVoiceQueuePermitEvents=require(_0x2b3a[1]);var events=[_0x2b3a[2],_0x2b3a[3]];exports[_0x2b3a[4]]= function(_0xc1b7x3){for(var _0xc1b7x4=0,_0xc1b7x5=events[_0x2b3a[5]];_0xc1b7x4< _0xc1b7x5;_0xc1b7x4++){var _0xc1b7x6=events[_0xc1b7x4];var _0xc1b7x7=createListener(_0x2b3a[6]+ _0xc1b7x6,_0xc1b7x3);UserHasVoiceQueuePermitEvents[_0x2b3a[7]](_0xc1b7x6,_0xc1b7x7);_0xc1b7x3[_0x2b3a[7]](_0x2b3a[8],removeListener(_0xc1b7x6,_0xc1b7x7))}};function createListener(_0xc1b7x6,_0xc1b7x3){return function(_0xc1b7x9){if(_0xc1b7x3[_0x2b3a[9]]=== _0xc1b7x9[_0x2b3a[10]]){_0xc1b7x3[_0x2b3a[12]](_0x2b3a[11])}}}function removeListener(_0xc1b7x6,_0xc1b7x7){return function(){UserHasVoiceQueuePermitEvents[_0x2b3a[13]](_0xc1b7x6,_0xc1b7x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/variable/index.js b/server/api/variable/index.js index f6b755b..3af9541 100644 --- a/server/api/variable/index.js +++ b/server/api/variable/index.js @@ -1 +1,166 @@ -var _0x77ca=["\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"];_0x77ca[0];var express=require(_0x77ca[1]);var controller=require(_0x77ca[2]);var auth=require(_0x77ca[3]);var router=express.Router();router[_0x77ca[9]](_0x77ca[4],auth[_0x77ca[5]](),auth[_0x77ca[7]]([13,14],[_0x77ca[6]]),controller[_0x77ca[8]]);router[_0x77ca[9]](_0x77ca[10],auth[_0x77ca[5]](),auth[_0x77ca[7]]([13],[_0x77ca[6]]),controller[_0x77ca[11]]);router[_0x77ca[13]](_0x77ca[4],auth[_0x77ca[5]](),auth[_0x77ca[7]]([13],[_0x77ca[6]]),controller[_0x77ca[12]]);router[_0x77ca[15]](_0x77ca[10],auth[_0x77ca[5]](),auth[_0x77ca[7]]([13],[_0x77ca[6]]),controller[_0x77ca[14]]);router[_0x77ca[17]](_0x77ca[4],auth[_0x77ca[5]](),auth[_0x77ca[7]]([13],[_0x77ca[6]]),controller[_0x77ca[16]]);router[_0x77ca[17]](_0x77ca[10],auth[_0x77ca[5]](),auth[_0x77ca[7]]([13],[_0x77ca[6]]),controller[_0x77ca[18]]);module[_0x77ca[19]]= router \ No newline at end of file +'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; diff --git a/server/api/variable/variable.controller.js b/server/api/variable/variable.controller.js index 3bf840d..2378a95 100644 --- a/server/api/variable/variable.controller.js +++ b/server/api/variable/variable.controller.js @@ -1 +1,117 @@ -var _0xb7c2=["\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"];_0xb7c2[0];var _=require(_0xb7c2[1]);var Variable=require(_0xb7c2[3])[_0xb7c2[2]];var Util=require(_0xb7c2[4]);exports[_0xb7c2[5]]= function(_0x4da5x4,_0x4da5x5,_0x4da5x6){return Variable[_0xb7c2[12]](Util[_0xb7c2[11]](_0x4da5x4[_0xb7c2[10]]))[_0xb7c2[9]](function(_0x4da5x8){_0x4da5x5[_0xb7c2[8]](200)[_0xb7c2[7]](_0x4da5x8)})[_0xb7c2[6]](function(_0x4da5x7){return handleError(_0x4da5x5,_0x4da5x7)})};exports[_0xb7c2[13]]= function(_0x4da5x4,_0x4da5x5){return Variable[_0xb7c2[17]](_0x4da5x4[_0xb7c2[16]][_0xb7c2[15]])[_0xb7c2[9]](function(_0x4da5x9){if(!_0x4da5x9){return _0x4da5x5[_0xb7c2[14]](404)};return _0x4da5x5[_0xb7c2[7]](_0x4da5x9)})[_0xb7c2[6]](function(_0x4da5x7){return handleError(_0x4da5x5,_0x4da5x7)})};exports[_0xb7c2[18]]= function(_0x4da5x4,_0x4da5x5){return Variable[_0xb7c2[18]](_0x4da5x4[_0xb7c2[19]])[_0xb7c2[9]](function(_0x4da5x9){return _0x4da5x5[_0xb7c2[8]](201)[_0xb7c2[7]](_0x4da5x9)})[_0xb7c2[6]](function(_0x4da5x7){return handleError(_0x4da5x5,_0x4da5x7)})};exports[_0xb7c2[20]]= function(_0x4da5x4,_0x4da5x5){if(_0x4da5x4[_0xb7c2[19]][_0xb7c2[15]]){delete _0x4da5x4[_0xb7c2[19]][_0xb7c2[15]]};return Variable[_0xb7c2[17]](_0x4da5x4[_0xb7c2[16]][_0xb7c2[15]])[_0xb7c2[9]](function(_0x4da5x9){if(!_0x4da5x9){return _0x4da5x5[_0xb7c2[14]](404)};var _0x4da5xa=_[_0xb7c2[21]](_0x4da5x9,_0x4da5x4[_0xb7c2[19]]);return _0x4da5xa[_0xb7c2[22]]()})[_0xb7c2[9]](function(_0x4da5x9){return _0x4da5x5[_0xb7c2[8]](200)[_0xb7c2[7]](_0x4da5x9)})[_0xb7c2[6]](function(_0x4da5x7){return handleError(_0x4da5x5,_0x4da5x7)})};exports[_0xb7c2[23]]= function(_0x4da5x4,_0x4da5x5){return Variable[_0xb7c2[27]](_0xb7c2[26])[_0xb7c2[17]](_0x4da5x4[_0xb7c2[16]][_0xb7c2[15]])[_0xb7c2[9]](function(_0x4da5x9){if(!_0x4da5x9){return _0x4da5x5[_0xb7c2[14]](404)};if(variableHasAssociation(_0x4da5x9)){var _0x4da5x7= new Error();_0x4da5x7[_0xb7c2[24]]= _0xb7c2[25];throw _0x4da5x7};return _0x4da5x9[_0xb7c2[23]]()})[_0xb7c2[9]](function(){return _0x4da5x5[_0xb7c2[14]](204)})[_0xb7c2[6]](function(_0x4da5x7){return handleError(_0x4da5x5,_0x4da5x7)})};exports[_0xb7c2[28]]= function(_0x4da5x4,_0x4da5x5){return Variable[_0xb7c2[23]]({where:{id:_0x4da5x4[_0xb7c2[10]][_0xb7c2[29]]},individualHooks:true})[_0xb7c2[9]](function(){return _0x4da5x5[_0xb7c2[14]](204)})[_0xb7c2[6]](function(_0x4da5x7){return handleError(_0x4da5x5,_0x4da5x7)})};function handleError(_0x4da5x5,_0x4da5x7){return _0x4da5x5[_0xb7c2[8]](500)[_0xb7c2[7]](_0x4da5x7)}function variableHasAssociation(_0x4da5x9){return ((_0x4da5x9[_0xb7c2[30]]&& _0x4da5x9[_0xb7c2[30]][_0xb7c2[31]]> 0)|| (_0x4da5x9[_0xb7c2[32]]&& _0x4da5x9[_0xb7c2[32]][_0xb7c2[31]]> 0)|| (_0x4da5x9[_0xb7c2[33]]&& _0x4da5x9[_0xb7c2[33]][_0xb7c2[31]]> 0)|| (_0x4da5x9[_0xb7c2[34]]&& _0x4da5x9[_0xb7c2[34]][_0xb7c2[31]]> 0)|| (_0x4da5x9[_0xb7c2[35]]&& _0x4da5x9[_0xb7c2[35]][_0xb7c2[31]]> 0))} \ No newline at end of file +'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)); +} diff --git a/server/api/variable/variable.events.js b/server/api/variable/variable.events.js index 4dd5900..2f51fee 100644 --- a/server/api/variable/variable.events.js +++ b/server/api/variable/variable.events.js @@ -1 +1,36 @@ -var _0x8463=["\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"];_0x8463[0];const EventEmitter=require(_0x8463[1]);const Variable=require(_0x8463[3])[_0x8463[2]];var VariableEvents= new EventEmitter();VariableEvents[_0x8463[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x8463[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x8463[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x8463[6]};for(var e in events){var event=events[e];Variable[_0x8463[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xf115x8,_0xf115x9,_0xf115xa){VariableEvents[_0x8463[10]](event+ _0x8463[8]+ _0xf115x8[_0x8463[9]],_0xf115x8);VariableEvents[_0x8463[10]](event,_0xf115x8);_0xf115xa(null)}}module[_0x8463[11]]= VariableEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/variable/variable.socket.js b/server/api/variable/variable.socket.js index e419808..32f14e8 100644 --- a/server/api/variable/variable.socket.js +++ b/server/api/variable/variable.socket.js @@ -1 +1,32 @@ -var _0x8345=["\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"];_0x8345[0];const VariableEvents=require(_0x8345[1]);var events=[_0x8345[2],_0x8345[3]];exports[_0x8345[4]]= function(_0x6581x3){for(var _0x6581x4=0,_0x6581x5=events[_0x8345[5]];_0x6581x4< _0x6581x5;_0x6581x4++){var _0x6581x6=events[_0x6581x4];var _0x6581x7=createListener(_0x8345[6]+ _0x6581x6,_0x6581x3);VariableEvents[_0x8345[7]](_0x6581x6,_0x6581x7);_0x6581x3[_0x8345[7]](_0x8345[8],removeListener(_0x6581x6,_0x6581x7))}};function createListener(_0x6581x6,_0x6581x3){return function(_0x6581x9){_0x6581x3[_0x8345[9]](_0x6581x6,_0x6581x9)}}function removeListener(_0x6581x6,_0x6581x7){return function(){VariableEvents[_0x8345[10]](_0x6581x6,_0x6581x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/voice_context/index.js b/server/api/voice_context/index.js index 3a8624b..8f14e04 100644 --- a/server/api/voice_context/index.js +++ b/server/api/voice_context/index.js @@ -1 +1,16 @@ -var _0xbf01=["\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"];_0xbf01[0];var express=require(_0xbf01[1]);var controller=require(_0xbf01[2]);var auth=require(_0xbf01[3]);var router=express.Router();router[_0xbf01[9]](_0xbf01[4],auth[_0xbf01[5]](),auth[_0xbf01[7]]([7],[_0xbf01[6]]),controller[_0xbf01[8]]);router[_0xbf01[9]](_0xbf01[10],auth[_0xbf01[5]](),auth[_0xbf01[7]]([7],[_0xbf01[6]]),controller[_0xbf01[11]]);router[_0xbf01[13]](_0xbf01[4],auth[_0xbf01[5]](),auth[_0xbf01[7]]([7],[_0xbf01[6]]),controller[_0xbf01[12]]);router[_0xbf01[13]](_0xbf01[14],auth[_0xbf01[5]](),auth[_0xbf01[7]]([7],[_0xbf01[6]]),controller[_0xbf01[15]]);router[_0xbf01[17]](_0xbf01[10],auth[_0xbf01[5]](),auth[_0xbf01[7]]([7],[_0xbf01[6]]),controller[_0xbf01[16]]);router[_0xbf01[19]](_0xbf01[4],auth[_0xbf01[5]](),auth[_0xbf01[7]]([7],[_0xbf01[6]]),controller[_0xbf01[18]]);router[_0xbf01[19]](_0xbf01[10],auth[_0xbf01[5]](),auth[_0xbf01[7]]([7],[_0xbf01[6]]),controller[_0xbf01[20]]);module[_0xbf01[21]]= router \ No newline at end of file +'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; diff --git a/server/api/voice_context/voice_context.controller.js b/server/api/voice_context/voice_context.controller.js index a773acd..c6ec224 100644 --- a/server/api/voice_context/voice_context.controller.js +++ b/server/api/voice_context/voice_context.controller.js @@ -1 +1,227 @@ -var _0xa59d=["\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"];_0xa59d[0];var _=require(_0xa59d[1]);var util=require(_0xa59d[2]);var Util=require(_0xa59d[3]);var sequelize=require(_0xa59d[5])[_0xa59d[4]];var VoiceContext=require(_0xa59d[5])[_0xa59d[6]];var VoiceExtension=require(_0xa59d[5])[_0xa59d[7]];exports[_0xa59d[8]]= function(_0x1c15x7,_0x1c15x8,_0x1c15x9){return VoiceContext[_0xa59d[15]](Util[_0xa59d[14]](_0x1c15x7[_0xa59d[13]]))[_0xa59d[12]](function(_0x1c15xb){_0x1c15x8[_0xa59d[11]](200)[_0xa59d[10]](_0x1c15xb)})[_0xa59d[9]](function(_0x1c15xa){return handleError(_0x1c15x8,_0x1c15xa)})};exports[_0xa59d[16]]= function(_0x1c15x7,_0x1c15x8){return VoiceContext[_0xa59d[20]](_0x1c15x7[_0xa59d[19]][_0xa59d[18]])[_0xa59d[12]](function(_0x1c15xc){if(!_0x1c15xc){return _0x1c15x8[_0xa59d[17]](404)};return _0x1c15x8[_0xa59d[10]](_0x1c15xc)})[_0xa59d[9]](function(_0x1c15xa){return handleError(_0x1c15x8,_0x1c15xa)})};exports[_0xa59d[21]]= function(_0x1c15x7,_0x1c15x8){return VoiceContext[_0xa59d[24]]({where:{name:_0x1c15x7[_0xa59d[23]][_0xa59d[22]]}})[_0xa59d[12]](function(_0x1c15xd){if(!_0x1c15xd){return _0x1c15x8[_0xa59d[17]](404)};return _0x1c15x8[_0xa59d[10]](_0x1c15xd)})[_0xa59d[9]](function(_0x1c15xa){return handleError(_0x1c15x8,_0x1c15xa)})};exports[_0xa59d[25]]= function(_0x1c15x7,_0x1c15x8){return VoiceContext[_0xa59d[25]](_0x1c15x7[_0xa59d[23]])[_0xa59d[12]](function(_0x1c15xc){return _0x1c15x8[_0xa59d[11]](201)[_0xa59d[10]](_0x1c15xc)})[_0xa59d[9]](sequelize.UniqueConstraintError,function(_0x1c15xa){_0x1c15xa[_0xa59d[26]]= _0xa59d[27];_0x1c15xa[_0xa59d[28]]= _0xa59d[29];return handleError(_0x1c15x8,_0x1c15xa)})[_0xa59d[9]](function(_0x1c15xa){return handleError(_0x1c15x8,_0x1c15xa)})};exports[_0xa59d[30]]= function(_0x1c15x7,_0x1c15x8){return VoiceContext[_0xa59d[24]]({where:{name:_0x1c15x7[_0xa59d[23]][_0xa59d[22]],id:{$ne:_0x1c15x7[_0xa59d[23]][_0xa59d[18]]}}})[_0xa59d[12]](function(_0x1c15xf){if(!_0x1c15xf){return _0x1c15x8[_0xa59d[17]](404)};if(_0x1c15xf[_0xa59d[33]]> 0){return _0x1c15x8[_0xa59d[11]](500)[_0xa59d[10]]({message:_0xa59d[29]})};if(_0x1c15x7[_0xa59d[23]][_0xa59d[18]]){delete _0x1c15x7[_0xa59d[23]][_0xa59d[18]]};return VoiceContext[_0xa59d[20]](_0x1c15x7[_0xa59d[19]][_0xa59d[18]])})[_0xa59d[12]](function(_0x1c15xc){if(!_0x1c15xc){return _0x1c15x8[_0xa59d[17]](404)};var _0x1c15xe=_[_0xa59d[31]](_0x1c15xc,_0x1c15x7[_0xa59d[23]]);return _0x1c15xe[_0xa59d[32]]()})[_0xa59d[12]](function(_0x1c15xc){return _0x1c15x8[_0xa59d[11]](200)[_0xa59d[10]](_0x1c15xc)})[_0xa59d[9]](function(_0x1c15xa){return handleError(_0x1c15x8,_0x1c15xa)})};exports[_0xa59d[34]]= function(_0x1c15x7,_0x1c15x8){var _0x1c15x10;return VoiceContext[_0xa59d[20]](_0x1c15x7[_0xa59d[19]][_0xa59d[18]])[_0xa59d[12]](function(_0x1c15xc){_0x1c15x10= _0x1c15xc;if(!_0x1c15x10){return _0x1c15x8[_0xa59d[17]](404)};if(_0x1c15x10[_0xa59d[39]]){return _0x1c15x8[_0xa59d[11]](500)[_0xa59d[10]]({message:_0xa59d[40],translatedMessage:_0xa59d[41]})};return VoiceExtension[_0xa59d[24]]({where:{context:_0x1c15x10[_0xa59d[22]],VoiceContextId:null}})})[_0xa59d[12]](function(_0x1c15x11){console[_0xa59d[36]](_0x1c15x11);if(_0x1c15x11[_0xa59d[33]]> 0){return _0x1c15x8[_0xa59d[11]](500)[_0xa59d[10]]({message:_0xa59d[37],translatedMessage:_0xa59d[38]})};return _0x1c15x10[_0xa59d[34]]()})[_0xa59d[12]](function(){return _0x1c15x8[_0xa59d[17]](204)})[_0xa59d[9]](function(_0x1c15xa){console[_0xa59d[36]](_0xa59d[35],_0x1c15xa);return handleError(_0x1c15x8,_0x1c15xa)})};exports[_0xa59d[42]]= function(_0x1c15x7,_0x1c15x8){var _0x1c15x12;return VoiceContext[_0xa59d[24]]({where:{id:_0x1c15x7[_0xa59d[13]][_0xa59d[43]]}})[_0xa59d[12]](function(_0x1c15xd){_0x1c15x12= _0x1c15xd;var _0x1c15x13=_[_0xa59d[44]](_0x1c15x12,{defaultEntry:true});if(_0x1c15x13){return _0x1c15x8[_0xa59d[11]](500)[_0xa59d[10]]({message:_0xa59d[40],translatedMessage:_0xa59d[41]})};if(!_0x1c15x12){return _0x1c15x8[_0xa59d[17]](404)};var _0x1c15x14=_[_0xa59d[46]](_[_0xa59d[46]](_0x1c15x12,_0xa59d[45]),_0xa59d[22]);return VoiceExtension[_0xa59d[24]]({where:{context:_0x1c15x14,VoiceContextId:null}})})[_0xa59d[12]](function(_0x1c15x11){if(_0x1c15x11[_0xa59d[33]]> _0x1c15x12[_0xa59d[33]]){return _0x1c15x8[_0xa59d[11]](500)[_0xa59d[10]]({message:_0xa59d[37],translatedMessage:_0xa59d[38]})};return VoiceContext[_0xa59d[34]]({where:{id:_0x1c15x7[_0xa59d[13]][_0xa59d[43]]},individualHooks:true})})[_0xa59d[12]](function(){return _0x1c15x8[_0xa59d[17]](204)})[_0xa59d[9]](function(_0x1c15xa){console[_0xa59d[36]](_0x1c15xa);return handleError(_0x1c15x8,_0x1c15xa)})};function handleError(_0x1c15x8,_0x1c15xa){return _0x1c15x8[_0xa59d[11]](500)[_0xa59d[10]](_0x1c15xa)} \ No newline at end of file +'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); +} diff --git a/server/api/voice_context/voice_context.events.js b/server/api/voice_context/voice_context.events.js index ea9a1b7..c7c0711 100644 --- a/server/api/voice_context/voice_context.events.js +++ b/server/api/voice_context/voice_context.events.js @@ -1 +1,36 @@ -var _0xe6cd=["\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"];_0xe6cd[0];const EventEmitter=require(_0xe6cd[1]);const VoiceContext=require(_0xe6cd[3])[_0xe6cd[2]];var VoiceContextEvents= new EventEmitter();VoiceContextEvents[_0xe6cd[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xe6cd[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xe6cd[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xe6cd[6]};for(var e in events){var event=events[e];VoiceContext[_0xe6cd[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xd35dx8,_0xd35dx9,_0xd35dxa){VoiceContextEvents[_0xe6cd[10]](event+ _0xe6cd[8]+ _0xd35dx8[_0xe6cd[9]],_0xd35dx8);VoiceContextEvents[_0xe6cd[10]](event,_0xd35dx8);_0xd35dxa(null)}}module[_0xe6cd[11]]= VoiceContextEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/voice_context/voice_context.socket.js b/server/api/voice_context/voice_context.socket.js index 9549cdd..34a2d6e 100644 --- a/server/api/voice_context/voice_context.socket.js +++ b/server/api/voice_context/voice_context.socket.js @@ -1 +1,32 @@ -var _0xcf43=["\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"];_0xcf43[0];const VoiceContextEvents=require(_0xcf43[1]);var events=[_0xcf43[2],_0xcf43[3]];exports[_0xcf43[4]]= function(_0xe543x3){for(var _0xe543x4=0,_0xe543x5=events[_0xcf43[5]];_0xe543x4< _0xe543x5;_0xe543x4++){var _0xe543x6=events[_0xe543x4];var _0xe543x7=createListener(_0xcf43[6]+ _0xe543x6,_0xe543x3);VoiceContextEvents[_0xcf43[7]](_0xe543x6,_0xe543x7);_0xe543x3[_0xcf43[7]](_0xcf43[8],removeListener(_0xe543x6,_0xe543x7))}};function createListener(_0xe543x6,_0xe543x3){return function(_0xe543x9){_0xe543x3[_0xcf43[9]](_0xe543x6,_0xe543x9)}}function removeListener(_0xe543x6,_0xe543x7){return function(){VoiceContextEvents[_0xcf43[10]](_0xe543x6,_0xe543x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/voice_disposition/index.js b/server/api/voice_disposition/index.js index bb77324..2c15433 100644 --- a/server/api/voice_disposition/index.js +++ b/server/api/voice_disposition/index.js @@ -1 +1,18 @@ -var _0x2d45=["\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"];_0x2d45[0];var express=require(_0x2d45[1]);var auth=require(_0x2d45[2]);var controller=require(_0x2d45[3]);var router=express.Router();router[_0x2d45[7]](_0x2d45[4],auth[_0x2d45[5]](),controller[_0x2d45[6]]);router[_0x2d45[7]](_0x2d45[8],auth[_0x2d45[5]](),controller[_0x2d45[9]]);router[_0x2d45[11]](_0x2d45[4],auth[_0x2d45[5]](),controller[_0x2d45[10]]);router[_0x2d45[13]](_0x2d45[8],auth[_0x2d45[5]](),controller[_0x2d45[12]]);router[_0x2d45[14]](_0x2d45[8],auth[_0x2d45[5]](),controller[_0x2d45[12]]);router[_0x2d45[16]](_0x2d45[8],auth[_0x2d45[5]](),controller[_0x2d45[15]]);module[_0x2d45[17]]= router \ No newline at end of file +'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; diff --git a/server/api/voice_disposition/voice_disposition.controller.js b/server/api/voice_disposition/voice_disposition.controller.js index b4dfe9e..96b0f15 100644 --- a/server/api/voice_disposition/voice_disposition.controller.js +++ b/server/api/voice_disposition/voice_disposition.controller.js @@ -1 +1,112 @@ -var _0xd6cf=["\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"];_0xd6cf[0];var _=require(_0xd6cf[1]);var VoiceDisposition=require(_0xd6cf[3])[_0xd6cf[2]];function handleError(_0xd941x4,_0xd941x5){_0xd941x5= _0xd941x5|| 500;return function(_0xd941x6){console[_0xd6cf[4]](_0xd941x6);_0xd941x4[_0xd6cf[6]](_0xd941x5)[_0xd6cf[5]](_0xd941x6)}}function responseWithResult(_0xd941x4,_0xd941x5){_0xd941x5= _0xd941x5|| 200;return function(_0xd941x8){if(_0xd941x8){_0xd941x4[_0xd6cf[6]](_0xd941x5)[_0xd6cf[7]](_0xd941x8)}}}function responseWithoutResult(_0xd941x4,_0xd941x5){_0xd941x5= _0xd941x5|| 200;return function(){_0xd941x4[_0xd6cf[8]](_0xd941x5)}}function handleEntityNotFound(_0xd941x4){return function(_0xd941x8){if(!_0xd941x8){_0xd941x4[_0xd6cf[6]](404)[_0xd6cf[9]]();return null};return _0xd941x8}}function saveUpdates(_0xd941xc){return function(_0xd941x8){return _0xd941x8[_0xd6cf[11]](_0xd941xc)[_0xd6cf[10]](function(_0xd941xd){return _0xd941xd})}}function removeEntity(_0xd941x4){return function(_0xd941x8){if(_0xd941x8){return _0xd941x8[_0xd6cf[12]]()[_0xd6cf[10]](function(){_0xd941x4[_0xd6cf[6]](204)[_0xd6cf[9]]()})}}}exports[_0xd6cf[13]]= function(_0xd941xf,_0xd941x4){VoiceDisposition[_0xd6cf[15]]()[_0xd6cf[10]](responseWithResult(_0xd941x4))[_0xd6cf[14]](handleError(_0xd941x4))};exports[_0xd6cf[16]]= function(_0xd941xf,_0xd941x4){VoiceDisposition[_0xd6cf[19]](_0xd941xf[_0xd6cf[18]][_0xd6cf[17]])[_0xd6cf[10]](handleEntityNotFound(_0xd941x4))[_0xd6cf[10]](responseWithResult(_0xd941x4))[_0xd6cf[14]](handleError(_0xd941x4))};exports[_0xd6cf[20]]= function(_0xd941xf,_0xd941x4){VoiceDisposition[_0xd6cf[20]](_0xd941xf[_0xd6cf[21]])[_0xd6cf[10]](responseWithResult(_0xd941x4,201))[_0xd6cf[14]](handleError(_0xd941x4))};exports[_0xd6cf[22]]= function(_0xd941xf,_0xd941x4){if(_0xd941xf[_0xd6cf[21]][_0xd6cf[17]]){delete _0xd941xf[_0xd6cf[21]][_0xd6cf[17]]};VoiceDisposition[_0xd6cf[19]](_0xd941xf[_0xd6cf[18]][_0xd6cf[17]])[_0xd6cf[10]](handleEntityNotFound(_0xd941x4))[_0xd6cf[10]](saveUpdates(_0xd941xf[_0xd6cf[21]]))[_0xd6cf[10]](responseWithResult(_0xd941x4))[_0xd6cf[14]](handleError(_0xd941x4))};exports[_0xd6cf[12]]= function(_0xd941xf,_0xd941x4){VoiceDisposition[_0xd6cf[19]](_0xd941xf[_0xd6cf[18]][_0xd6cf[17]])[_0xd6cf[10]](handleEntityNotFound(_0xd941x4))[_0xd6cf[10]](removeEntity(_0xd941x4))[_0xd6cf[14]](handleError(_0xd941x4))} \ No newline at end of file +/** + * 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)); +} diff --git a/server/api/voice_disposition/voice_disposition.events.js b/server/api/voice_disposition/voice_disposition.events.js index b3a6eaf..8436878 100644 --- a/server/api/voice_disposition/voice_disposition.events.js +++ b/server/api/voice_disposition/voice_disposition.events.js @@ -1 +1,36 @@ -var _0x43a7=["\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"];_0x43a7[0];const EventEmitter=require(_0x43a7[1]);const VoiceDisposition=require(_0x43a7[3])[_0x43a7[2]];var VoiceDispositionEvents= new EventEmitter();VoiceDispositionEvents[_0x43a7[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x43a7[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x43a7[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x43a7[6]};for(var e in events){var event=events[e];VoiceDisposition[_0x43a7[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6882x8,_0x6882x9,_0x6882xa){VoiceDispositionEvents[_0x43a7[10]](event+ _0x43a7[8]+ _0x6882x8[_0x43a7[9]],_0x6882x8);VoiceDispositionEvents[_0x43a7[10]](event,_0x6882x8);_0x6882xa(null)}}module[_0x43a7[11]]= VoiceDispositionEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/voice_disposition/voice_disposition.socket.js b/server/api/voice_disposition/voice_disposition.socket.js index c21f413..6cfaf1c 100644 --- a/server/api/voice_disposition/voice_disposition.socket.js +++ b/server/api/voice_disposition/voice_disposition.socket.js @@ -1 +1,32 @@ -var _0x1e79=["\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"];_0x1e79[0];const VoiceDispositionEvents=require(_0x1e79[1]);var events=[_0x1e79[2],_0x1e79[3]];exports[_0x1e79[4]]= function(_0xd8dcx3){for(var _0xd8dcx4=0,_0xd8dcx5=events[_0x1e79[5]];_0xd8dcx4< _0xd8dcx5;_0xd8dcx4++){var _0xd8dcx6=events[_0xd8dcx4];var _0xd8dcx7=createListener(_0x1e79[6]+ _0xd8dcx6,_0xd8dcx3);VoiceDispositionEvents[_0x1e79[7]](_0xd8dcx6,_0xd8dcx7);_0xd8dcx3[_0x1e79[7]](_0x1e79[8],removeListener(_0xd8dcx6,_0xd8dcx7))}};function createListener(_0xd8dcx6,_0xd8dcx3){return function(_0xd8dcx9){_0xd8dcx3[_0x1e79[9]](_0xd8dcx6,_0xd8dcx9)}}function removeListener(_0xd8dcx6,_0xd8dcx7){return function(){VoiceDispositionEvents[_0x1e79[10]](_0xd8dcx6,_0xd8dcx7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/voice_extension/index.js b/server/api/voice_extension/index.js index 1dc5e0e..29591db 100644 --- a/server/api/voice_extension/index.js +++ b/server/api/voice_extension/index.js @@ -1 +1,16 @@ -var _0x6762=["\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"];_0x6762[0];var express=require(_0x6762[1]);var controller=require(_0x6762[2]);var auth=require(_0x6762[3]);var router=express.Router();router[_0x6762[9]](_0x6762[4],auth[_0x6762[5]](),auth[_0x6762[7]]([7],[_0x6762[6]]),controller[_0x6762[8]]);router[_0x6762[9]](_0x6762[10],auth[_0x6762[5]](),auth[_0x6762[7]]([7],[_0x6762[6]]),controller[_0x6762[11]]);router[_0x6762[13]](_0x6762[4],auth[_0x6762[5]](),auth[_0x6762[7]]([7],[_0x6762[6]]),controller[_0x6762[12]]);router[_0x6762[15]](_0x6762[10],auth[_0x6762[5]](),auth[_0x6762[7]]([7],[_0x6762[6]]),controller[_0x6762[14]]);router[_0x6762[17]](_0x6762[4],auth[_0x6762[5]](),auth[_0x6762[7]]([7],[_0x6762[6]]),controller[_0x6762[16]]);router[_0x6762[17]](_0x6762[10],auth[_0x6762[5]](),auth[_0x6762[7]]([7],[_0x6762[6]]),controller[_0x6762[18]]);module[_0x6762[19]]= router \ No newline at end of file +'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; diff --git a/server/api/voice_extension/voice_extension.controller.js b/server/api/voice_extension/voice_extension.controller.js index 2a45961..8a6ec34 100644 --- a/server/api/voice_extension/voice_extension.controller.js +++ b/server/api/voice_extension/voice_extension.controller.js @@ -1 +1,148 @@ -var _0xc714=["\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"];_0xc714[0];var _=require(_0xc714[1]);var VoiceExtension=require(_0xc714[3])[_0xc714[2]];var Interval=require(_0xc714[3])[_0xc714[4]];var sequelize=require(_0xc714[3])[_0xc714[5]];var Sequelize=require(_0xc714[3])[_0xc714[6]];var util=require(_0xc714[7]);var async=require(_0xc714[8]);var veUtil=require(_0xc714[9]);var Util=require(_0xc714[10]);var Applications=veUtil[_0xc714[11]];exports[_0xc714[12]]= function(_0xe782xb,_0xe782xc,_0xe782xd){return VoiceExtension[_0xc714[24]](_0xc714[22],_0xc714[23])[_0xc714[21]](_[_0xc714[20]](Util[_0xc714[19]](_0xe782xb[_0xc714[18]]),{distinct:true}))[_0xc714[17]](function(_0xe782xf){_0xe782xc[_0xc714[16]](200)[_0xc714[15]](_0xe782xf)})[_0xc714[14]](function(_0xe782xe){console[_0xc714[13]](_0xe782xe);return handleError(_0xe782xc,_0xe782xe)})};exports[_0xc714[25]]= function(_0xe782xb,_0xe782xc){return VoiceExtension[_0xc714[24]](_0xc714[23])[_0xc714[29]]({where:{id:_0xe782xb[_0xc714[28]][_0xc714[27]],VoiceExtensionId:null}})[_0xc714[17]](function(_0xe782x10){if(!_0xe782x10){return _0xe782xc[_0xc714[26]](404)};return _0xe782xc[_0xc714[15]](_0xe782x10)})[_0xc714[14]](function(_0xe782xe){return handleError(_0xe782xc,_0xe782xe)})};exports[_0xc714[30]]= function(_0xe782xb,_0xe782xc){var _0xe782x11;return sequelize[_0xc714[40]](function(_0xe782x12){return VoiceExtension[_0xc714[30]](_0xe782xb[_0xc714[36]],{transaction:_0xe782x12})[_0xc714[17]](function(_0xe782x13){_0xe782x11= _0xe782x13;if(_0xe782xb[_0xc714[36]][_0xc714[11]]&& Array[_0xc714[38]](_0xe782xb[_0xc714[36]].Applications)&& _0xe782xb[_0xc714[36]][_0xc714[11]][_0xc714[39]]){return _0xe782x13}})[_0xc714[17]](veUtil[_0xc714[37]](_0xe782xb[_0xc714[36]].Applications,_0xe782x12,_0xe782xc))})[_0xc714[17]](function(){return _0xe782xc[_0xc714[16]](201)[_0xc714[15]](_0xe782x11)})[_0xc714[14]](sequelize.UniqueConstraintError,function(_0xe782xe){_0xe782xe[_0xc714[32]]= _0xc714[33];_0xe782xe[_0xc714[34]]= _0xc714[35];return handleError(_0xe782xc,_0xe782xe)})[_0xc714[14]](sequelize.ValidationError,function(_0xe782xe){_0xe782xe[_0xc714[32]]= _0xc714[33];_0xe782xe[_0xc714[34]]= _0xc714[35];return handleError(_0xe782xc,_0xe782xe)})[_0xc714[14]](function(_0xe782xe){console[_0xc714[13]](_0xc714[31],_0xe782xe);return handleError(_0xe782xc,_0xe782xe)})};exports[_0xc714[41]]= function(_0xe782xb,_0xe782xc){return sequelize[_0xc714[40]](function(_0xe782x12){return veUtil[_0xc714[42]](_0xe782xb,_0xe782x12)})[_0xc714[17]](function(){return _0xe782xc[_0xc714[26]](200)})[_0xc714[14]](sequelize.UniqueConstraintError,function(_0xe782xe){_0xe782xe[_0xc714[32]]= _0xc714[33];_0xe782xe[_0xc714[34]]= _0xc714[35];console[_0xc714[13]](_0xe782xe);return handleError(_0xe782xc,_0xe782xe)})[_0xc714[14]](function(_0xe782xe){console[_0xc714[13]](_0xe782xe);return handleError(_0xe782xc,_0xe782xe)})};exports[_0xc714[43]]= function(_0xe782xb,_0xe782xc,_0xe782xd){return sequelize[_0xc714[40]](function(_0xe782x12){return VoiceExtension[_0xc714[44]](_0xe782xb[_0xc714[28]][_0xc714[27]])[_0xc714[17]](function(_0xe782x10){if(!_0xe782x10){return _0xe782xc[_0xc714[26]](404)};return _0xe782x10[_0xc714[43]]()})})[_0xc714[17]](function(){return _0xe782xc[_0xc714[26]](204)})[_0xc714[14]](function(_0xe782xe){console[_0xc714[13]](_0xe782xe);return handleError(_0xe782xc,_0xe782xe)})};exports[_0xc714[45]]= function(_0xe782xb,_0xe782xc){return VoiceExtension[_0xc714[43]]({where:{id:_0xe782xb[_0xc714[18]][_0xc714[46]]},individualHooks:true})[_0xc714[17]](function(){return _0xe782xc[_0xc714[26]](204)})[_0xc714[14]](function(_0xe782xe){return handleError(_0xe782xc,_0xe782xe)})};function handleError(_0xe782xc,_0xe782xe){return _0xe782xc[_0xc714[16]](500)[_0xc714[15]](_0xe782xe)} \ No newline at end of file +'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); +} diff --git a/server/api/voice_extension/voice_extension.events.js b/server/api/voice_extension/voice_extension.events.js index 64767e2..2facad8 100644 --- a/server/api/voice_extension/voice_extension.events.js +++ b/server/api/voice_extension/voice_extension.events.js @@ -1 +1,36 @@ -var _0xae60=["\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"];_0xae60[0];const EventEmitter=require(_0xae60[1]);const VoiceExtension=require(_0xae60[3])[_0xae60[2]];var VoiceExtensionEvents= new EventEmitter();VoiceExtensionEvents[_0xae60[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xae60[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xae60[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xae60[7]};for(var e in events){var event=events[e];VoiceExtension[_0xae60[8]](e,emitEvent(event))};function emitEvent(event){return function(_0xccfex8,_0xccfex9,_0xccfexa){VoiceExtensionEvents[_0xae60[11]](event+ _0xae60[9]+ _0xccfex8[_0xae60[10]],_0xccfex8);VoiceExtensionEvents[_0xae60[11]](event,_0xccfex8);_0xccfexa(null)}}module[_0xae60[12]]= VoiceExtensionEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/voice_extension/voice_extension.socket.js b/server/api/voice_extension/voice_extension.socket.js index 2e055f5..7f2dca6 100644 --- a/server/api/voice_extension/voice_extension.socket.js +++ b/server/api/voice_extension/voice_extension.socket.js @@ -1 +1,32 @@ -var _0x5a36=["\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"];_0x5a36[0];const VoiceExtensionEvents=require(_0x5a36[1]);var events=[_0x5a36[2],_0x5a36[3],_0x5a36[4]];exports[_0x5a36[5]]= function(_0x6cc1x3){for(var _0x6cc1x4=0,_0x6cc1x5=events[_0x5a36[6]];_0x6cc1x4< _0x6cc1x5;_0x6cc1x4++){var _0x6cc1x6=events[_0x6cc1x4];var _0x6cc1x7=createListener(_0x5a36[7]+ _0x6cc1x6,_0x6cc1x3);VoiceExtensionEvents[_0x5a36[8]](_0x6cc1x6,_0x6cc1x7);_0x6cc1x3[_0x5a36[8]](_0x5a36[9],removeListener(_0x6cc1x6,_0x6cc1x7))}};function createListener(_0x6cc1x6,_0x6cc1x3){return function(_0x6cc1x9){_0x6cc1x3[_0x5a36[10]](_0x6cc1x6,_0x6cc1x9)}}function removeListener(_0x6cc1x6,_0x6cc1x7){return function(){VoiceExtensionEvents[_0x5a36[11]](_0x6cc1x6,_0x6cc1x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/voice_musiconhold/index.js b/server/api/voice_musiconhold/index.js index 0387c2b..8bcbd0e 100644 --- a/server/api/voice_musiconhold/index.js +++ b/server/api/voice_musiconhold/index.js @@ -1 +1,21 @@ -var _0xd77d=["\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"];_0xd77d[0];var express=require(_0xd77d[1]);var controller=require(_0xd77d[2]);var auth=require(_0xd77d[3]);var router=express.Router();router[_0xd77d[9]](_0xd77d[4],auth[_0xd77d[5]](),auth[_0xd77d[7]]([7],[_0xd77d[6]]),controller[_0xd77d[8]]);router[_0xd77d[9]](_0xd77d[10],auth[_0xd77d[5]](),auth[_0xd77d[7]]([7],[_0xd77d[6]]),controller[_0xd77d[11]]);router[_0xd77d[9]](_0xd77d[12],auth[_0xd77d[5]](),auth[_0xd77d[7]]([7],[_0xd77d[6]]),controller[_0xd77d[13]]);router[_0xd77d[9]](_0xd77d[14],auth[_0xd77d[5]](),auth[_0xd77d[7]]([7],[_0xd77d[6]]),controller[_0xd77d[15]]);router[_0xd77d[17]](_0xd77d[4],auth[_0xd77d[5]](),auth[_0xd77d[7]]([7],[_0xd77d[6]]),controller[_0xd77d[16]]);router[_0xd77d[17]](_0xd77d[18],auth[_0xd77d[5]](),auth[_0xd77d[7]]([7],[_0xd77d[6]]),controller[_0xd77d[19]]);router[_0xd77d[17]](_0xd77d[14],auth[_0xd77d[5]](),auth[_0xd77d[7]]([7],[_0xd77d[6]]),controller[_0xd77d[20]]);router[_0xd77d[22]](_0xd77d[12],auth[_0xd77d[5]](),auth[_0xd77d[7]]([7],[_0xd77d[6]]),controller[_0xd77d[21]]);router[_0xd77d[24]](_0xd77d[4],auth[_0xd77d[5]](),auth[_0xd77d[7]]([7],[_0xd77d[6]]),controller[_0xd77d[23]]);router[_0xd77d[24]](_0xd77d[12],auth[_0xd77d[5]](),auth[_0xd77d[7]]([7],[_0xd77d[6]]),controller[_0xd77d[25]]);router[_0xd77d[24]](_0xd77d[14],auth[_0xd77d[5]](),auth[_0xd77d[7]]([7],[_0xd77d[6]]),controller[_0xd77d[26]]);module[_0xd77d[27]]= router \ No newline at end of file +'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; diff --git a/server/api/voice_musiconhold/voice_musiconhold.controller.js b/server/api/voice_musiconhold/voice_musiconhold.controller.js index afca12d..83c6288 100644 --- a/server/api/voice_musiconhold/voice_musiconhold.controller.js +++ b/server/api/voice_musiconhold/voice_musiconhold.controller.js @@ -1 +1,290 @@ -var _0x4f9c=["\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"];_0x4f9c[0];var fs=require(_0x4f9c[1]);var _=require(_0x4f9c[2]);var path=require(_0x4f9c[3]);var util=require(_0x4f9c[4]);var fse=require(_0x4f9c[5]);var remove=require(_0x4f9c[6]);var base64=require(_0x4f9c[7]);var config=require(_0x4f9c[8]);var Util=require(_0x4f9c[9]);var Sound=require(_0x4f9c[11])[_0x4f9c[10]];var Setting=require(_0x4f9c[11])[_0x4f9c[12]];var sequelize=require(_0x4f9c[11])[_0x4f9c[13]];var VoiceMusicOnHold=require(_0x4f9c[11])[_0x4f9c[14]];exports[_0x4f9c[15]]= function(_0x75a3xe,_0x75a3xf){return VoiceMusicOnHold[_0x4f9c[22]](Util[_0x4f9c[21]](_0x75a3xe[_0x4f9c[20]]))[_0x4f9c[19]](function(_0x75a3x11){_0x75a3xf[_0x4f9c[18]](200)[_0x4f9c[17]](_0x75a3x11)})[_0x4f9c[16]](function(_0x75a3x10){return handleError(_0x75a3xf,_0x75a3x10)})};exports[_0x4f9c[23]]= function(_0x75a3xe,_0x75a3xf){return VoiceMusicOnHold[_0x4f9c[27]](_0x75a3xe[_0x4f9c[26]][_0x4f9c[25]])[_0x4f9c[19]](function(_0x75a3x12){if(!_0x75a3x12){return _0x75a3xf[_0x4f9c[24]](404)};return _0x75a3xf[_0x4f9c[17]](_0x75a3x12)})[_0x4f9c[16]](function(_0x75a3x10){return handleError(_0x75a3xf,_0x75a3x10)})};exports[_0x4f9c[28]]= function(_0x75a3xe,_0x75a3xf){var _0x75a3x13,_0x75a3x14;return VoiceMusicOnHold[_0x4f9c[27]](_0x75a3xe[_0x4f9c[26]][_0x4f9c[25]])[_0x4f9c[19]](function(_0x75a3x12){if(!_0x75a3x12){return _0x75a3xf[_0x4f9c[24]](404)};_0x75a3x13= _0x75a3x12;return Sound[_0x4f9c[42]]({where:{id:_0x75a3xe[_0x4f9c[41]][_0x4f9c[40]]}})})[_0x4f9c[19]](function(_0x75a3x18){_0x75a3x14= _0x75a3x18;return Setting[_0x4f9c[27]](1)})[_0x4f9c[19]](function(_0x75a3x15){var _0x75a3x16;_0x75a3x14[_0x4f9c[37]](function(_0x75a3x17){_0x75a3x16= path[_0x4f9c[32]](_0x75a3x13[_0x4f9c[29]],_0x75a3x17[_0x4f9c[30]]+ _0x4f9c[31]);fse[_0x4f9c[36]](path[_0x4f9c[32]](_0x75a3x15[_0x4f9c[33]]|| _0x4f9c[34],_0x75a3x17[_0x4f9c[35]]+ _0x4f9c[31]),_0x75a3x16)});fs[_0x4f9c[39]](_0x75a3x16,parseInt(_0x4f9c[38],8));_0x75a3xf[_0x4f9c[24]](200)})[_0x4f9c[16]](function(_0x75a3x10){return handleError(_0x75a3xf,_0x75a3x10)})};exports[_0x4f9c[43]]= function(_0x75a3xe,_0x75a3xf){var _0x75a3x19={};VoiceMusicOnHold[_0x4f9c[27]](_0x75a3xe[_0x4f9c[26]][_0x4f9c[25]])[_0x4f9c[19]](function(_0x75a3x12){if(!_0x75a3x12){return _0x75a3xf[_0x4f9c[24]](404)};_0x75a3x19[_0x4f9c[3]]= _0x75a3x12[_0x4f9c[29]];fs[_0x4f9c[45]](_0x75a3x12[_0x4f9c[29]],function(_0x75a3x10,_0x75a3x1a){if(!_0x75a3x10){_0x75a3x19[_0x4f9c[44]]= _0x75a3x1a;return _0x75a3xf[_0x4f9c[17]](_0x75a3x19)}else {throw _0x75a3x10}})})[_0x4f9c[16]](function(_0x75a3x10){return handleError(_0x75a3xf,_0x75a3x10)})};exports[_0x4f9c[46]]= function(_0x75a3xe,_0x75a3xf){return VoiceMusicOnHold[_0x4f9c[27]](_0x75a3xe[_0x4f9c[26]][_0x4f9c[25]])[_0x4f9c[19]](function(_0x75a3x12){if(!_0x75a3x12){return _0x75a3xf[_0x4f9c[24]](404)};var _0x75a3x1b=_0x75a3x12[_0x4f9c[29]]+ _0x4f9c[47]+ _0x75a3xe[_0x4f9c[20]][_0x4f9c[48]];fs[_0x4f9c[49]](_0x75a3x1b,function(_0x75a3x10){if(_0x75a3x10){return handleError(_0x75a3xf,_0x75a3x10)}else {return _0x75a3xf[_0x4f9c[24]](204)}})})[_0x4f9c[16]](function(_0x75a3x10){return handleError(_0x75a3xf,_0x75a3x10)})};exports[_0x4f9c[50]]= function(_0x75a3xe,_0x75a3xf){console[_0x4f9c[51]](_0x75a3xe[_0x4f9c[41]]);return VoiceMusicOnHold[_0x4f9c[42]]({where:{name:_0x75a3xe[_0x4f9c[41]][_0x4f9c[52]]}})[_0x4f9c[19]](function(_0x75a3x1c){if(!_0x75a3x1c){return _0x75a3xf[_0x4f9c[24]](404)};return _0x75a3xf[_0x4f9c[17]](_0x75a3x1c)})[_0x4f9c[16]](function(_0x75a3x10){return handleError(_0x75a3xf,_0x75a3x10)})};exports[_0x4f9c[53]]= function(_0x75a3xe,_0x75a3xf){return sequelize[_0x4f9c[62]]()[_0x4f9c[19]](function(_0x75a3x1d){_0x75a3xe[_0x4f9c[41]][_0x4f9c[29]]= path[_0x4f9c[32]](config[_0x4f9c[54]],_0x4f9c[55],_0x75a3xe[_0x4f9c[41]][_0x4f9c[52]]);return VoiceMusicOnHold[_0x4f9c[53]](_0x75a3xe[_0x4f9c[41]],{transaction:_0x75a3x1d})[_0x4f9c[19]](function(_0x75a3x12){fs[_0x4f9c[61]](_0x75a3x12[_0x4f9c[29]],parseInt(_0x4f9c[38],8),function(_0x75a3x10){if(_0x75a3x10){console[_0x4f9c[51]](_0x4f9c[57]);_0x75a3x1d[_0x4f9c[56]]();return _0x75a3xf[_0x4f9c[18]](500)[_0x4f9c[17]]({message:_0x4f9c[58]})};_0x75a3x1d[_0x4f9c[59]]();console[_0x4f9c[51]](_0x4f9c[60]);return _0x75a3xf[_0x4f9c[18]](201)[_0x4f9c[17]](_0x75a3x12)})})[_0x4f9c[16]](function(_0x75a3x10){_0x75a3x1d[_0x4f9c[56]]()})})};exports[_0x4f9c[63]]= function(_0x75a3xe,_0x75a3xf){if(_0x75a3xe[_0x4f9c[41]][_0x4f9c[25]]){delete _0x75a3xe[_0x4f9c[41]][_0x4f9c[25]]};return VoiceMusicOnHold[_0x4f9c[27]](_0x75a3xe[_0x4f9c[26]][_0x4f9c[25]])[_0x4f9c[19]](function(_0x75a3x12){if(!_0x75a3x12){return _0x75a3xf[_0x4f9c[24]](404)};var _0x75a3x1e=_[_0x4f9c[64]](_0x75a3x12,_0x75a3xe[_0x4f9c[41]]);return _0x75a3x1e[_0x4f9c[65]]()})[_0x4f9c[19]](function(_0x75a3x12){return _0x75a3xf[_0x4f9c[18]](200)[_0x4f9c[17]](_0x75a3x12)})[_0x4f9c[16]](function(_0x75a3x10){return handleError(_0x75a3xf,_0x75a3x10)})};exports[_0x4f9c[66]]= function(_0x75a3xe,_0x75a3xf){var _0x75a3x1f;return sequelize[_0x4f9c[62]](function(_0x75a3x1d){return VoiceMusicOnHold[_0x4f9c[27]](_0x75a3xe[_0x4f9c[26]][_0x4f9c[25]])[_0x4f9c[19]](function(_0x75a3x12){if(!_0x75a3x12){return _0x75a3xf[_0x4f9c[24]](404)};_0x75a3x1f= _0x75a3x12;return _0x75a3x12[_0x4f9c[66]]({transaction:_0x75a3x1d})})[_0x4f9c[19]](function(){remove(_0x75a3x1f[_0x4f9c[29]],function(_0x75a3x10){if(_0x75a3x10){console[_0x4f9c[51]](_0x75a3x10)};return _0x75a3xf[_0x4f9c[24]](204)})})})[_0x4f9c[16]](function(_0x75a3x10){return handleError(_0x75a3xf,_0x75a3x10)})};exports[_0x4f9c[67]]= function(_0x75a3xe,_0x75a3xf){var _0x75a3x20;return sequelize[_0x4f9c[62]](function(_0x75a3x1d){return VoiceMusicOnHold[_0x4f9c[42]]({where:{id:_0x75a3xe[_0x4f9c[20]][_0x4f9c[70]]}})[_0x4f9c[19]](function(_0x75a3x22){if(!_0x75a3x22){return _0x75a3xf[_0x4f9c[24]](404)};_0x75a3x20= _0x75a3x22;var _0x75a3x23=[];_0x75a3x22[_0x4f9c[37]](function(_0x75a3x21){_0x75a3x23[_0x4f9c[69]](_0x75a3x21[_0x4f9c[66]]({transaction:_0x75a3x1d}))});return _0x75a3x23})[_0x4f9c[68]]()[_0x4f9c[19]](function(){_0x75a3x20[_0x4f9c[37]](function(_0x75a3x21){remove(_0x75a3x21[_0x4f9c[29]],function(_0x75a3x10){if(_0x75a3x10){console[_0x4f9c[51]](_0x75a3x10);throw _0x75a3x10}})})})})[_0x4f9c[19]](function(){return _0x75a3xf[_0x4f9c[24]](204)})[_0x4f9c[16]](function(_0x75a3x10){return handleError(_0x75a3xf,_0x75a3x10)})};exports[_0x4f9c[71]]= function(_0x75a3xe,_0x75a3xf){var _0x75a3x24=decodeURI(_0x75a3xe[_0x4f9c[20]][_0x4f9c[3]]);base64[_0x4f9c[72]](_0x75a3x24,function(_0x75a3x10,_0x75a3x25){if(_0x75a3x10){return handleError(_0x75a3xf,_0x75a3x10)}else {return _0x75a3xf[_0x4f9c[18]](200)[_0x4f9c[17]](_0x75a3x25)}})};function handleError(_0x75a3xf,_0x75a3x10){console[_0x4f9c[51]](_0x75a3x10);return _0x75a3xf[_0x4f9c[18]](500)[_0x4f9c[17]](_0x75a3x10)} \ No newline at end of file +'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); +} diff --git a/server/api/voice_musiconhold/voice_musiconhold.events.js b/server/api/voice_musiconhold/voice_musiconhold.events.js index c490874..e3d8587 100644 --- a/server/api/voice_musiconhold/voice_musiconhold.events.js +++ b/server/api/voice_musiconhold/voice_musiconhold.events.js @@ -1 +1,36 @@ -var _0xfb36=["\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"];_0xfb36[0];const EventEmitter=require(_0xfb36[1]);const VoiceMusicOnHold=require(_0xfb36[3])[_0xfb36[2]];var VoiceMusicOnHoldEvents= new EventEmitter();VoiceMusicOnHoldEvents[_0xfb36[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xfb36[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xfb36[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xfb36[6]};for(var e in events){var event=events[e];VoiceMusicOnHold[_0xfb36[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xe1c0x8,_0xe1c0x9,_0xe1c0xa){VoiceMusicOnHoldEvents[_0xfb36[10]](event+ _0xfb36[8]+ _0xe1c0x8[_0xfb36[9]],_0xe1c0x8);VoiceMusicOnHoldEvents[_0xfb36[10]](event,_0xe1c0x8);_0xe1c0xa(null)}}module[_0xfb36[11]]= VoiceMusicOnHoldEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/voice_musiconhold/voice_musiconhold.socket.js b/server/api/voice_musiconhold/voice_musiconhold.socket.js index fcd29cc..cbc19a2 100644 --- a/server/api/voice_musiconhold/voice_musiconhold.socket.js +++ b/server/api/voice_musiconhold/voice_musiconhold.socket.js @@ -1 +1,32 @@ -var _0xb867=["\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"];_0xb867[0];const VoiceMusicOnHoldEvents=require(_0xb867[1]);var events=[_0xb867[2],_0xb867[3]];exports[_0xb867[4]]= function(_0x66b4x3){for(var _0x66b4x4=0,_0x66b4x5=events[_0xb867[5]];_0x66b4x4< _0x66b4x5;_0x66b4x4++){var _0x66b4x6=events[_0x66b4x4];var _0x66b4x7=createListener(_0xb867[6]+ _0x66b4x6,_0x66b4x3);VoiceMusicOnHoldEvents[_0xb867[7]](_0x66b4x6,_0x66b4x7);_0x66b4x3[_0xb867[7]](_0xb867[8],removeListener(_0x66b4x6,_0x66b4x7))}};function createListener(_0x66b4x6,_0x66b4x3){return function(_0x66b4x9){_0x66b4x3[_0xb867[9]](_0x66b4x6,_0x66b4x9)}}function removeListener(_0x66b4x6,_0x66b4x7){return function(){VoiceMusicOnHoldEvents[_0xb867[10]](_0x66b4x6,_0x66b4x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/voice_queue/index.js b/server/api/voice_queue/index.js index 72c59ee..f1f9c3f 100644 --- a/server/api/voice_queue/index.js +++ b/server/api/voice_queue/index.js @@ -1 +1,20 @@ -var _0x33c1=["\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"];_0x33c1[0];var express=require(_0x33c1[1]);var controller=require(_0x33c1[2]);var auth=require(_0x33c1[3]);var router=express.Router();router[_0x33c1[9]](_0x33c1[4],auth[_0x33c1[5]](),auth[_0x33c1[7]]([7,13],[_0x33c1[6]]),controller[_0x33c1[8]]);router[_0x33c1[9]](_0x33c1[10],auth[_0x33c1[5]](),auth[_0x33c1[7]]([7],[_0x33c1[6]]),controller[_0x33c1[11]]);router[_0x33c1[9]](_0x33c1[12],auth[_0x33c1[5]](),auth[_0x33c1[7]]([7],[_0x33c1[6]]),controller[_0x33c1[13]]);router[_0x33c1[9]](_0x33c1[14],auth[_0x33c1[5]](),auth[_0x33c1[7]]([7],[_0x33c1[6]]),controller[_0x33c1[15]]);router[_0x33c1[17]](_0x33c1[4],auth[_0x33c1[5]](),auth[_0x33c1[7]]([7],[_0x33c1[6]]),controller[_0x33c1[16]]);router[_0x33c1[17]](_0x33c1[14],auth[_0x33c1[5]](),auth[_0x33c1[7]]([7],[_0x33c1[6]]),controller[_0x33c1[18]]);router[_0x33c1[20]](_0x33c1[10],auth[_0x33c1[5]](),auth[_0x33c1[7]]([7],[_0x33c1[6]]),controller[_0x33c1[19]]);router[_0x33c1[22]](_0x33c1[14],auth[_0x33c1[5]](),auth[_0x33c1[7]]([7],[_0x33c1[6]]),controller[_0x33c1[21]]);router[_0x33c1[22]](_0x33c1[4],auth[_0x33c1[5]](),auth[_0x33c1[7]]([7],[_0x33c1[6]]),controller[_0x33c1[23]]);router[_0x33c1[22]](_0x33c1[10],auth[_0x33c1[5]](),auth[_0x33c1[7]]([7],[_0x33c1[6]]),controller[_0x33c1[24]]);module[_0x33c1[25]]= router \ No newline at end of file +'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; diff --git a/server/api/voice_queue/voice_queue.controller.js b/server/api/voice_queue/voice_queue.controller.js index 8877ee5..2f70952 100644 --- a/server/api/voice_queue/voice_queue.controller.js +++ b/server/api/voice_queue/voice_queue.controller.js @@ -1 +1,304 @@ -var _0xbb2d=["\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"];_0xbb2d[0];var _=require(_0xbb2d[1]);var util=require(_0xbb2d[2]);var Util=require(_0xbb2d[3]);var sequelize=require(_0xbb2d[5])[_0xbb2d[4]];var User=require(_0xbb2d[5])[_0xbb2d[6]];var VoiceQueue=require(_0xbb2d[5])[_0xbb2d[7]];var UserHasVoiceQueue=require(_0xbb2d[5])[_0xbb2d[8]];var VoiceExtension=require(_0xbb2d[5])[_0xbb2d[9]];exports[_0xbb2d[10]]= function(_0x78dcx9,_0x78dcxa){switch(_0x78dcx9[_0xbb2d[18]][_0xbb2d[23]]){case _0xbb2d[18]:return User[_0xbb2d[19]](_0x78dcx9[_0xbb2d[18]][_0xbb2d[17]],{attributes:[_0xbb2d[17]]})[_0xbb2d[14]](Util[_0xbb2d[16]](_0x78dcx9[_0xbb2d[15]]))[_0xbb2d[14]](function(_0x78dcxc){_0x78dcxa[_0xbb2d[13]](200)[_0xbb2d[12]](_0x78dcxc)})[_0xbb2d[11]](function(_0x78dcxb){return handleError(_0x78dcxa,_0x78dcxb)});default:return VoiceQueue[_0xbb2d[22]](Util[_0xbb2d[21]](_0x78dcx9[_0xbb2d[15]]))[_0xbb2d[14]](function(_0x78dcxc){_0x78dcxa[_0xbb2d[13]](200)[_0xbb2d[12]](_0x78dcxc)})[_0xbb2d[11]](function(_0x78dcxb){console[_0xbb2d[20]](_0x78dcxb);return handleError(_0x78dcxa,_0x78dcxb)})}};exports[_0xbb2d[24]]= function(_0x78dcx9,_0x78dcxa,_0x78dcxd){switch(_0x78dcx9[_0xbb2d[18]][_0xbb2d[23]]){case _0xbb2d[18]:var _0x78dcxe=[];return User[_0xbb2d[19]](_0x78dcx9[_0xbb2d[18]][_0xbb2d[17]],{attributes:[_0xbb2d[17]]})[_0xbb2d[14]](Util[_0xbb2d[16]]({},{attributes:[_0xbb2d[26]],include:[{raw:true,model:User,attributes:[_0xbb2d[17]]}]}))[_0xbb2d[14]](function(_0x78dcxf){var _0x78dcx10=_[_0xbb2d[27]](_0x78dcxf[_0xbb2d[25]],_0xbb2d[26]);_0x78dcxf[_0xbb2d[25]][_0xbb2d[29]](function(_0x78dcx11){_0x78dcxe= _[_0xbb2d[28]](_0x78dcxe,_[_0xbb2d[27]](_0x78dcx11.Users,_0xbb2d[17]))});return VoiceQueue[_0xbb2d[22]](_[_0xbb2d[30]](Util[_0xbb2d[21]](_0x78dcx9[_0xbb2d[15]],{name:_0x78dcx10}),{include:[{model:User,where:{id:_0x78dcxe},required:false}]}))})[_0xbb2d[14]](function(_0x78dcxc){return _0x78dcxa[_0xbb2d[13]](200)[_0xbb2d[12]](_0x78dcxc)})[_0xbb2d[11]](function(_0x78dcxb){console[_0xbb2d[20]](_0x78dcxb);return handleError(_0x78dcxa,_0x78dcxb)});default:return VoiceQueue[_0xbb2d[22]](_[_0xbb2d[30]](Util[_0xbb2d[21]](_0x78dcx9[_0xbb2d[15]]),{include:[{model:User,required:false}]}))[_0xbb2d[14]](function(_0x78dcxc){return _0x78dcxa[_0xbb2d[13]](200)[_0xbb2d[12]](_0x78dcxc)})[_0xbb2d[11]](function(_0x78dcxb){console[_0xbb2d[20]](_0x78dcxb);return handleError(_0x78dcxa,_0x78dcxb)})}};exports[_0xbb2d[31]]= function(_0x78dcx9,_0x78dcxa){return VoiceQueue[_0xbb2d[19]](_0x78dcx9[_0xbb2d[33]][_0xbb2d[26]])[_0xbb2d[14]](function(_0x78dcx12){if(!_0x78dcx12){return _0x78dcxa[_0xbb2d[32]](404)};return _0x78dcxa[_0xbb2d[12]](_0x78dcx12)})[_0xbb2d[11]](function(_0x78dcxb){return handleError(_0x78dcxa,_0x78dcxb)})};exports[_0xbb2d[34]]= function(_0x78dcx9,_0x78dcxa){return VoiceQueue[_0xbb2d[19]](_0x78dcx9[_0xbb2d[33]][_0xbb2d[26]])[_0xbb2d[14]](function(_0x78dcx11){if(!_0x78dcx11){return _0x78dcxa[_0xbb2d[32]](404)};return _0x78dcx11[_0xbb2d[39]]({where:{role:_0xbb2d[36]},attributes:[_0xbb2d[17],_0xbb2d[26],_0xbb2d[37],_0xbb2d[38]]})})[_0xbb2d[14]](function(_0x78dcxe){return _0x78dcxa[_0xbb2d[13]](200)[_0xbb2d[12]]({rows:_0x78dcxe,count:_0x78dcxe[_0xbb2d[35]]})})[_0xbb2d[11]](function(_0x78dcxb){return handleError(_0x78dcxa,_0x78dcxb)})};exports[_0xbb2d[40]]= function(_0x78dcx9,_0x78dcxa){var _0x78dcx13;return VoiceQueue[_0xbb2d[40]](_0x78dcx9[_0xbb2d[51]])[_0xbb2d[14]](function(_0x78dcx12){_0x78dcx13= _0x78dcx12;if(_0x78dcx9[_0xbb2d[51]][_0xbb2d[50]]){return _0x78dcx13[_0xbb2d[53]](_0x78dcx9[_0xbb2d[51]][_0xbb2d[50]],{penalty:_0x78dcx9[_0xbb2d[51]][_0xbb2d[52]]|| 0})}})[_0xbb2d[14]](function(){return _0x78dcxa[_0xbb2d[13]](201)[_0xbb2d[12]](_0x78dcx13)})[_0xbb2d[11]](sequelize.UniqueConstraintError,function(_0x78dcxb){var _0x78dcx14=[];_0x78dcxb[_0xbb2d[44]][_0xbb2d[29]](function(_0x78dcx15){switch(_0x78dcx15[_0xbb2d[43]]){case _0xbb2d[42]:_0x78dcx14[_0xbb2d[41]](_0xbb2d[26]);break;default:_0x78dcx14[_0xbb2d[41]](_0x78dcx15[_0xbb2d[43]])}});_0x78dcx14[_0xbb2d[41]](_0xbb2d[45]);_0x78dcxb[_0xbb2d[46]]= _0x78dcx14[_0xbb2d[47]]();_0x78dcxb[_0xbb2d[48]]= _0xbb2d[49];return _0x78dcxa[_0xbb2d[13]](500)[_0xbb2d[12]](_0x78dcxb)})[_0xbb2d[11]](function(_0x78dcxb){return handleError(_0x78dcxa,_0x78dcxb)})};exports[_0xbb2d[54]]= function(_0x78dcx9,_0x78dcxa){if(_0x78dcx9[_0xbb2d[51]][_0xbb2d[26]]){delete _0x78dcx9[_0xbb2d[51]][_0xbb2d[26]]};return VoiceQueue[_0xbb2d[19]](_0x78dcx9[_0xbb2d[33]][_0xbb2d[26]])[_0xbb2d[14]](function(_0x78dcx12){if(!_0x78dcx12){return _0x78dcxa[_0xbb2d[32]](404)};var _0x78dcx16=_[_0xbb2d[30]](_0x78dcx12,_0x78dcx9[_0xbb2d[51]]);return _0x78dcx16[_0xbb2d[55]]()})[_0xbb2d[14]](function(_0x78dcx12){return _0x78dcxa[_0xbb2d[13]](200)[_0xbb2d[12]](_0x78dcx12)})[_0xbb2d[11]](function(_0x78dcxb){console[_0xbb2d[20]](_0x78dcxb);return handleError(_0x78dcxa,_0x78dcxb)})};exports[_0xbb2d[56]]= function(_0x78dcx9,_0x78dcxa,_0x78dcxd){return User[_0xbb2d[60]]({where:{id:{$in:_0x78dcx9[_0xbb2d[51]][_0xbb2d[50]]}}})[_0xbb2d[14]](function(_0x78dcx17){var _0x78dcx18=_[_0xbb2d[27]](_0x78dcx17,function(_0x78dcx19){return {queue:_0x78dcx9[_0xbb2d[33]][_0xbb2d[26]],interface:util[_0xbb2d[58]](_0xbb2d[57],_0x78dcx19[_0xbb2d[26]]),stateinterface:util[_0xbb2d[58]](_0xbb2d[57],_0x78dcx19[_0xbb2d[26]]),membername:_0x78dcx19[_0xbb2d[26]],UserId:_0x78dcx19[_0xbb2d[17]],penalty:_0x78dcx9[_0xbb2d[51]][_0xbb2d[52]]}});return UserHasVoiceQueue[_0xbb2d[59]](_0x78dcx18,{individualHooks:true})})[_0xbb2d[14]](function(){return _0x78dcxa[_0xbb2d[32]](200)})[_0xbb2d[11]](function(_0x78dcxb){console[_0xbb2d[20]](_0x78dcxb);return _0x78dcxd(_0x78dcxb)})};exports[_0xbb2d[61]]= function(_0x78dcx9,_0x78dcxa,_0x78dcxd){return UserHasVoiceQueue[_0xbb2d[62]]({where:{UserId:_0x78dcx9[_0xbb2d[15]][_0xbb2d[50]],queue:_0x78dcx9[_0xbb2d[33]][_0xbb2d[26]]},individualHooks:true})[_0xbb2d[14]](function(){return _0x78dcxa[_0xbb2d[32]](202)})[_0xbb2d[11]](function(_0x78dcxb){return _0x78dcxd(_0x78dcxb)})};exports[_0xbb2d[62]]= function(_0x78dcx9,_0x78dcxa){return VoiceQueue[_0xbb2d[62]]({where:{name:_0x78dcx9[_0xbb2d[33]][_0xbb2d[26]]},individualHooks:true})[_0xbb2d[14]](function(){return _0x78dcxa[_0xbb2d[32]](204)})[_0xbb2d[11]](function(_0x78dcxb){return handleError(_0x78dcxa,_0x78dcxb)})};exports[_0xbb2d[63]]= function(_0x78dcx9,_0x78dcxa){return VoiceQueue[_0xbb2d[62]]({where:{name:_0x78dcx9[_0xbb2d[15]][_0xbb2d[64]]},individualHooks:true})[_0xbb2d[14]](function(){return _0x78dcxa[_0xbb2d[32]](204)})[_0xbb2d[11]](function(_0x78dcxb){return handleError(_0x78dcxa,_0x78dcxb)})};function handleError(_0x78dcxa,_0x78dcxb){return _0x78dcxa[_0xbb2d[13]](500)[_0xbb2d[12]](_0x78dcxb)} \ No newline at end of file +'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); +} diff --git a/server/api/voice_queue/voice_queue.events.js b/server/api/voice_queue/voice_queue.events.js index c5200f5..47e7ba6 100644 --- a/server/api/voice_queue/voice_queue.events.js +++ b/server/api/voice_queue/voice_queue.events.js @@ -1 +1,36 @@ -var _0x8b70=["\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"];_0x8b70[0];const EventEmitter=require(_0x8b70[1]);const VoiceQueue=require(_0x8b70[3])[_0x8b70[2]];var VoiceQueueEvents= new EventEmitter();VoiceQueueEvents[_0x8b70[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x8b70[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x8b70[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x8b70[6]};for(var e in events){var event=events[e];VoiceQueue[_0x8b70[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x41ebx8,_0x41ebx9,_0x41ebxa){VoiceQueueEvents[_0x8b70[10]](event+ _0x8b70[8]+ _0x41ebx8[_0x8b70[9]],_0x41ebx8);VoiceQueueEvents[_0x8b70[10]](event,_0x41ebx8);_0x41ebxa(null)}}module[_0x8b70[11]]= VoiceQueueEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/voice_queue/voice_queue.socket.js b/server/api/voice_queue/voice_queue.socket.js index 7d8207a..1036ff9 100644 --- a/server/api/voice_queue/voice_queue.socket.js +++ b/server/api/voice_queue/voice_queue.socket.js @@ -1 +1,86 @@ -var _0x812a=["\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"];_0x812a[0];const VoiceQueueEvents=require(_0x812a[1]);const VoiceQueue=require(_0x812a[3])[_0x812a[2]];const User=require(_0x812a[3])[_0x812a[4]];const Util=require(_0x812a[5]);const _=require(_0x812a[6]);const Promise=require(_0x812a[7]);var events=[_0x812a[8],_0x812a[9]];exports[_0x812a[10]]= function(_0x7192x8){for(var _0x7192x9=0,_0x7192xa=events[_0x812a[11]];_0x7192x9< _0x7192xa;_0x7192x9++){var _0x7192xb=events[_0x7192x9];var _0x7192xc=createListener(_0x812a[12]+ _0x7192xb,_0x7192x8);VoiceQueueEvents[_0x812a[13]](_0x7192xb,_0x7192xc);_0x7192x8[_0x812a[13]](_0x812a[14],removeListener(_0x7192xb,_0x7192xc))}};function createListener(_0x7192xb,_0x7192x8){return function(_0x7192xe){switch(_0x7192xb){case _0x812a[23]:return Promise[_0x812a[22]]([])[_0x812a[21]](getVoiceQueues(_0x7192x8))[_0x812a[21]](function(_0x7192x10){if(_[_0x812a[19]](_0x7192x10,_0x7192xe[_0x812a[18]])){_0x7192x8[_0x812a[20]](_0x7192xb,_0x7192xe)}})[_0x812a[17]](function(_0x7192xf){console[_0x812a[16]](_0x812a[15],_0x7192xf)});break;case _0x812a[24]:_0x7192x8[_0x812a[20]](_0x7192xb,_0x7192xe);break;default:}}}function removeListener(_0x7192xb,_0x7192xc){return function(){VoiceQueueEvents[_0x812a[25]](_0x7192xb,_0x7192xc)}}function getVoiceQueues(_0x7192x13){return function(){switch(_0x7192x13[_0x812a[35]]){case _0x812a[32]:return User[_0x812a[31]](_0x7192x13[_0x812a[29]],{attributes:[_0x812a[30]]})[_0x812a[21]](Util[_0x812a[28]]())[_0x812a[21]](function(_0x7192x10){return _[_0x812a[27]](_0x7192x10[_0x812a[26]],_0x812a[18])});case _0x812a[34]:return VoiceQueue[_0x812a[33]]()[_0x812a[21]](function(_0x7192x14){return {rows:_0x7192x14}})[_0x812a[21]](function(_0x7192x10){return _[_0x812a[27]](_0x7192x10[_0x812a[26]],_0x812a[18])});default:return []}}} \ No newline at end of file +/** + * 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 []; + } + } +} diff --git a/server/api/voice_recording/index.js b/server/api/voice_recording/index.js index 87e5b6e..bc07dc3 100644 --- a/server/api/voice_recording/index.js +++ b/server/api/voice_recording/index.js @@ -1 +1,19 @@ -var _0xea47=["\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"];_0xea47[0];var express=require(_0xea47[1]);var auth=require(_0xea47[2]);var controller=require(_0xea47[3]);var router=express.Router();router[_0xea47[10]](_0xea47[4],auth[_0xea47[5]](),auth[_0xea47[8]]([7],[_0xea47[6],_0xea47[7]]),controller[_0xea47[9]]);router[_0xea47[10]](_0xea47[11],auth[_0xea47[5]](),auth[_0xea47[8]]([7],[_0xea47[6]]),controller[_0xea47[12]]);router[_0xea47[10]](_0xea47[13],auth[_0xea47[5]](),auth[_0xea47[8]]([7],[_0xea47[6]]),controller[_0xea47[14]]);router[_0xea47[10]](_0xea47[15],controller[_0xea47[16]]);router[_0xea47[10]](_0xea47[17],auth[_0xea47[5]](),auth[_0xea47[8]]([7],[_0xea47[6],_0xea47[7]]),controller[_0xea47[18]]);router[_0xea47[20]](_0xea47[4],auth[_0xea47[5]](),auth[_0xea47[8]]([7],[_0xea47[6]]),controller[_0xea47[19]]);router[_0xea47[22]](_0xea47[13],auth[_0xea47[5]](),auth[_0xea47[8]]([7],[_0xea47[6]]),controller[_0xea47[21]]);router[_0xea47[24]](_0xea47[4],auth[_0xea47[5]](),auth[_0xea47[8]]([7],[_0xea47[6]]),controller[_0xea47[23]]);router[_0xea47[24]](_0xea47[13],auth[_0xea47[5]](),auth[_0xea47[8]]([7],[_0xea47[6]]),controller[_0xea47[25]]);module[_0xea47[26]]= router \ No newline at end of file +'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; diff --git a/server/api/voice_recording/voice_recording.controller.js b/server/api/voice_recording/voice_recording.controller.js index c210fa2..032e36d 100644 --- a/server/api/voice_recording/voice_recording.controller.js +++ b/server/api/voice_recording/voice_recording.controller.js @@ -1 +1,215 @@ -var _0x4aa0=["\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"];_0x4aa0[0];var _=require(_0x4aa0[1]);var util=require(_0x4aa0[2]);var Util=require(_0x4aa0[3]);var VoiceRecording=require(_0x4aa0[5])[_0x4aa0[4]];var User=require(_0x4aa0[5])[_0x4aa0[6]];var Promise=require(_0x4aa0[7]);var base64=require(_0x4aa0[8]);var fs=require(_0x4aa0[9]);var path=require(_0x4aa0[10]);function handleError(_0x83ddxb){return function(_0x83ddxc){if(_0x83ddxc[_0x4aa0[11]]&& _0x83ddxc[_0x4aa0[11]][_0x4aa0[12]]=== _0x4aa0[13]){_0x83ddxc= {message:_0x4aa0[14],translatedMessage:_0x4aa0[15]}};return _0x83ddxb[_0x4aa0[17]](500)[_0x4aa0[16]](_0x83ddxc)}}function responseWithResult(_0x83ddxb,_0x83ddxe){_0x83ddxe= _0x83ddxe|| 200;return function(_0x83ddxf){if(_0x83ddxf){_0x83ddxb[_0x4aa0[17]](_0x83ddxe)[_0x4aa0[18]](_0x83ddxf)}}}function handleEntityNotFound(_0x83ddxb){return function(_0x83ddxf){if(!_0x83ddxf){_0x83ddxb[_0x4aa0[17]](404)[_0x4aa0[19]]();return null};return _0x83ddxf}}function saveUpdates(_0x83ddx12){return function(_0x83ddxf){return _0x83ddxf[_0x4aa0[20]](_0x83ddx12)}}function removeEntity(_0x83ddxb){return function(_0x83ddxf){if(_0x83ddxf){return _0x83ddxf[_0x4aa0[22]]()[_0x4aa0[21]](function(){_0x83ddxb[_0x4aa0[17]](204)[_0x4aa0[19]]()})}}}exports[_0x4aa0[23]]= function(_0x83ddx14,_0x83ddxb){switch(_0x83ddx14[_0x4aa0[35]][_0x4aa0[38]]){case _0x4aa0[35]:return User[_0x4aa0[36]](_0x83ddx14[_0x4aa0[35]][_0x4aa0[34]],{attributes:[_0x4aa0[34]]})[_0x4aa0[21]](Util[_0x4aa0[33]]())[_0x4aa0[21]](function(_0x83ddx15){var _0x83ddx16=[];var _0x83ddx17=_[_0x4aa0[27]](_0x83ddx15[_0x4aa0[25]],_0x4aa0[26]);_0x83ddx15[_0x4aa0[25]][_0x4aa0[29]](function(_0x83ddx18){_0x83ddx16= _[_0x4aa0[28]](_0x83ddx16,_[_0x4aa0[27]](_0x83ddx18.Users,_0x4aa0[26]))});return VoiceRecording[_0x4aa0[32]](Util[_0x4aa0[31]](_0x83ddx14[_0x4aa0[30]],{$or:{queue:_0x83ddx17,membername:_0x83ddx16}}))})[_0x4aa0[21]](responseWithResult(_0x83ddxb))[_0x4aa0[24]](handleError(_0x83ddxb));case _0x4aa0[37]:return VoiceRecording[_0x4aa0[32]](Util[_0x4aa0[31]](_0x83ddx14[_0x4aa0[30]],{membername:_0x83ddx14[_0x4aa0[35]][_0x4aa0[26]]}))[_0x4aa0[21]](responseWithResult(_0x83ddxb))[_0x4aa0[24]](handleError(_0x83ddxb));default:return VoiceRecording[_0x4aa0[32]](Util[_0x4aa0[31]](_0x83ddx14[_0x4aa0[30]]))[_0x4aa0[21]](responseWithResult(_0x83ddxb))[_0x4aa0[24]](handleError(_0x83ddxb))}};exports[_0x4aa0[39]]= function(_0x83ddx14,_0x83ddxb){return VoiceRecording[_0x4aa0[36]](_0x83ddx14[_0x4aa0[40]][_0x4aa0[34]])[_0x4aa0[21]](handleEntityNotFound(_0x83ddxb))[_0x4aa0[21]](responseWithResult(_0x83ddxb))[_0x4aa0[24]](handleError(_0x83ddxb))};exports[_0x4aa0[41]]= function(_0x83ddx14,_0x83ddxb){return VoiceRecording[_0x4aa0[41]]()[_0x4aa0[21]](function(_0x83ddx19){return _0x83ddxb[_0x4aa0[17]](200)[_0x4aa0[16]](_0x83ddx19)})[_0x4aa0[24]](handleError(_0x83ddxb))};exports[_0x4aa0[42]]= function(_0x83ddx14,_0x83ddxb){return VoiceRecording[_0x4aa0[36]](_0x83ddx14[_0x4aa0[40]][_0x4aa0[34]])[_0x4aa0[21]](function(_0x83ddx1c){var _0x83ddx1d=Promise[_0x4aa0[46]](fs[_0x4aa0[45]]);return _0x83ddx1d(_0x83ddx1c[_0x4aa0[47]])})[_0x4aa0[21]](function(_0x83ddx1b){var _0x83ddx1a= new Buffer(_0x83ddx1b,_0x4aa0[44]).toString(_0x4aa0[43]);return _0x83ddx1a})[_0x4aa0[21]](function(_0x83ddx1a){return _0x83ddxb[_0x4aa0[17]](200)[_0x4aa0[16]]({downloadString:_0x83ddx1a})})[_0x4aa0[24]](handleError(_0x83ddxb))};exports[_0x4aa0[48]]= function(_0x83ddx14,_0x83ddxb){var _0x83ddx1e={};if(_0x83ddx14[_0x4aa0[30]]&& _0x83ddx14[_0x4aa0[30]][_0x4aa0[50]](_0x4aa0[49])&& _0x83ddx14[_0x4aa0[30]][_0x4aa0[49]]=== _0x4aa0[51]){_0x83ddx1e[_0x4aa0[51]]= _0x83ddx14[_0x4aa0[40]][_0x4aa0[34]]}else {_0x83ddx1e[_0x4aa0[34]]= _0x83ddx14[_0x4aa0[40]][_0x4aa0[34]]};return VoiceRecording[_0x4aa0[54]]({where:_0x83ddx1e})[_0x4aa0[21]](handleEntityNotFound(_0x83ddxb))[_0x4aa0[21]](function(_0x83ddx1c){return _0x83ddxb[_0x4aa0[53]](_0x83ddx1c[_0x4aa0[47]],path[_0x4aa0[52]](_0x83ddx1c[_0x4aa0[47]]))})[_0x4aa0[24]](handleError(_0x83ddxb))};exports[_0x4aa0[55]]= function(_0x83ddx14,_0x83ddxb){return VoiceRecording[_0x4aa0[55]](_0x83ddx14[_0x4aa0[56]])[_0x4aa0[21]](responseWithResult(_0x83ddxb,201))[_0x4aa0[24]](handleError(_0x83ddxb))};exports[_0x4aa0[57]]= function(_0x83ddx14,_0x83ddxb){if(_0x83ddx14[_0x4aa0[56]][_0x4aa0[34]]){delete _0x83ddx14[_0x4aa0[56]][_0x4aa0[34]]};return VoiceRecording[_0x4aa0[36]](_0x83ddx14[_0x4aa0[40]][_0x4aa0[34]])[_0x4aa0[21]](handleEntityNotFound(_0x83ddxb))[_0x4aa0[21]](saveUpdates(_0x83ddx14[_0x4aa0[56]]))[_0x4aa0[21]](responseWithResult(_0x83ddxb))[_0x4aa0[24]](handleError(_0x83ddxb))};exports[_0x4aa0[22]]= function(_0x83ddx14,_0x83ddxb){return VoiceRecording[_0x4aa0[36]](_0x83ddx14[_0x4aa0[40]][_0x4aa0[34]])[_0x4aa0[21]](handleEntityNotFound(_0x83ddxb))[_0x4aa0[21]](removeEntity(_0x83ddxb))[_0x4aa0[24]](handleError(_0x83ddxb))};exports[_0x4aa0[58]]= function(_0x83ddx14,_0x83ddxb){return VoiceRecording[_0x4aa0[22]]({where:{id:_0x83ddx14[_0x4aa0[30]][_0x4aa0[60]]},individualHooks:true})[_0x4aa0[21]](function(){return _0x83ddxb[_0x4aa0[59]](204)})[_0x4aa0[24]](handleError(_0x83ddxb))} \ No newline at end of file +/** + * 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)); +}; diff --git a/server/api/voice_recording/voice_recording.events.js b/server/api/voice_recording/voice_recording.events.js index 66f9ae5..ac0c175 100644 --- a/server/api/voice_recording/voice_recording.events.js +++ b/server/api/voice_recording/voice_recording.events.js @@ -1 +1,36 @@ -var _0x14a5=["\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"];_0x14a5[0];const EventEmitter=require(_0x14a5[1]);const VoiceRecording=require(_0x14a5[3])[_0x14a5[2]];var VoiceRecordingEvents= new EventEmitter();VoiceRecordingEvents[_0x14a5[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x14a5[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x14a5[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x14a5[6]};for(var e in events){var event=events[e];VoiceRecording[_0x14a5[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x9943x8,_0x9943x9,_0x9943xa){VoiceRecordingEvents[_0x14a5[10]](event+ _0x14a5[8]+ _0x9943x8[_0x14a5[9]],_0x9943x8);VoiceRecordingEvents[_0x14a5[10]](event,_0x9943x8);_0x9943xa(null)}}module[_0x14a5[11]]= VoiceRecordingEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/voice_recording/voice_recording.socket.js b/server/api/voice_recording/voice_recording.socket.js index afbf35f..6b7ee22 100644 --- a/server/api/voice_recording/voice_recording.socket.js +++ b/server/api/voice_recording/voice_recording.socket.js @@ -1 +1,32 @@ -var _0x6f63=["\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"];_0x6f63[0];const VoiceRecordingEvents=require(_0x6f63[1]);var events=[_0x6f63[2],_0x6f63[3]];exports[_0x6f63[4]]= function(_0xf902x3){for(var _0xf902x4=0,_0xf902x5=events[_0x6f63[5]];_0xf902x4< _0xf902x5;_0xf902x4++){var _0xf902x6=events[_0xf902x4];var _0xf902x7=createListener(_0x6f63[6]+ _0xf902x6,_0xf902x3);VoiceRecordingEvents[_0x6f63[7]](_0xf902x6,_0xf902x7);_0xf902x3[_0x6f63[7]](_0x6f63[8],removeListener(_0xf902x6,_0xf902x7))}};function createListener(_0xf902x6,_0xf902x3){return function(_0xf902x9){_0xf902x3[_0x6f63[9]](_0xf902x6,_0xf902x9)}}function removeListener(_0xf902x6,_0xf902x7){return function(){VoiceRecordingEvents[_0x6f63[10]](_0xf902x6,_0xf902x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/voice_voicemail/index.js b/server/api/voice_voicemail/index.js index 56e6295..db2e635 100644 --- a/server/api/voice_voicemail/index.js +++ b/server/api/voice_voicemail/index.js @@ -1 +1,17 @@ -var _0xf29a=["\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"];_0xf29a[0];var express=require(_0xf29a[1]);var controller=require(_0xf29a[2]);var auth=require(_0xf29a[3]);var router=express.Router();router[_0xf29a[9]](_0xf29a[4],auth[_0xf29a[5]](),auth[_0xf29a[7]]([7],[_0xf29a[6]]),controller[_0xf29a[8]]);router[_0xf29a[9]](_0xf29a[10],auth[_0xf29a[5]](),auth[_0xf29a[7]]([7],[_0xf29a[6]]),controller[_0xf29a[11]]);router[_0xf29a[13]](_0xf29a[4],auth[_0xf29a[5]](),auth[_0xf29a[7]]([7],[_0xf29a[6]]),controller[_0xf29a[12]]);router[_0xf29a[13]](_0xf29a[14],auth[_0xf29a[5]](),auth[_0xf29a[7]]([7],[_0xf29a[6]]),controller[_0xf29a[15]]);router[_0xf29a[17]](_0xf29a[10],auth[_0xf29a[5]](),auth[_0xf29a[7]]([7],[_0xf29a[6]]),controller[_0xf29a[16]]);router[_0xf29a[19]](_0xf29a[4],auth[_0xf29a[5]](),auth[_0xf29a[7]]([7],[_0xf29a[6]]),controller[_0xf29a[18]]);router[_0xf29a[19]](_0xf29a[10],auth[_0xf29a[5]](),auth[_0xf29a[7]]([7],[_0xf29a[6]]),controller[_0xf29a[20]]);module[_0xf29a[21]]= router \ No newline at end of file +'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; diff --git a/server/api/voice_voicemail/voice_voicemail.controller.js b/server/api/voice_voicemail/voice_voicemail.controller.js index df51031..69a1139 100644 --- a/server/api/voice_voicemail/voice_voicemail.controller.js +++ b/server/api/voice_voicemail/voice_voicemail.controller.js @@ -1 +1,190 @@ -var _0xb3d6=["\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"];_0xb3d6[0];var _=require(_0xb3d6[1]);var stream=require(_0xb3d6[2]);var Util=require(_0xb3d6[3]);var VoiceVoicemail=require(_0xb3d6[5])[_0xb3d6[4]];var VoiceVoicemailMessages=require(_0xb3d6[5])[_0xb3d6[6]];exports[_0xb3d6[7]]= function(_0x57a2x6,_0x57a2x7){return VoiceVoicemail[_0xb3d6[14]](Util[_0xb3d6[13]](_0x57a2x6[_0xb3d6[12]]))[_0xb3d6[11]](function(_0x57a2x9){_0x57a2x7[_0xb3d6[10]](200)[_0xb3d6[9]](_0x57a2x9)})[_0xb3d6[8]](function(_0x57a2x8){return handleError(_0x57a2x7,_0x57a2x8)})};exports[_0xb3d6[15]]= function(_0x57a2x6,_0x57a2x7){VoiceVoicemail[_0xb3d6[19]]({where:{uniqueid:_0x57a2x6[_0xb3d6[18]][_0xb3d6[17]]}})[_0xb3d6[11]](function(_0x57a2xa){if(!_0x57a2xa){return _0x57a2x7[_0xb3d6[16]](404)};return _0x57a2x7[_0xb3d6[9]](_0x57a2xa)})[_0xb3d6[8]](function(_0x57a2x8){return handleError(_0x57a2x7,_0x57a2x8)})};exports[_0xb3d6[20]]= function(_0x57a2x6,_0x57a2x7){console[_0xb3d6[22]](_0x57a2x6[_0xb3d6[21]]);VoiceVoicemail[_0xb3d6[25]]({where:{mailbox:_0x57a2x6[_0xb3d6[21]][_0xb3d6[23]],context:_0x57a2x6[_0xb3d6[21]][_0xb3d6[24]]}})[_0xb3d6[11]](function(_0x57a2xb){if(!_0x57a2xb){return _0x57a2x7[_0xb3d6[16]](404)};return _0x57a2x7[_0xb3d6[9]](_0x57a2xb)})[_0xb3d6[8]](function(_0x57a2x8){return handleError(_0x57a2x7,_0x57a2x8)})};exports[_0xb3d6[26]]= function(_0x57a2x6,_0x57a2x7){VoiceVoicemail[_0xb3d6[25]]({where:{mailbox:_0x57a2x6[_0xb3d6[21]][_0xb3d6[23]],context:_0x57a2x6[_0xb3d6[21]][_0xb3d6[24]]}})[_0xb3d6[11]](function(_0x57a2xb){if(!_0x57a2xb){return _0x57a2x7[_0xb3d6[16]](404)};if(_0x57a2xb[_0xb3d6[27]]> 0){return _0x57a2x7[_0xb3d6[10]](500)[_0xb3d6[9]]({message:_0xb3d6[28]})};VoiceVoicemail[_0xb3d6[26]](_0x57a2x6[_0xb3d6[21]])[_0xb3d6[11]](function(_0x57a2xa){return _0x57a2x7[_0xb3d6[10]](201)[_0xb3d6[9]](_0x57a2xa)})[_0xb3d6[8]](function(_0x57a2x8){return handleError(_0x57a2x7,_0x57a2x8)})[_0xb3d6[8]](function(_0x57a2x8){return handleError(_0x57a2x7,_0x57a2x8)})})};exports[_0xb3d6[29]]= function(_0x57a2x6,_0x57a2x7){VoiceVoicemail[_0xb3d6[25]]({where:{mailbox:_0x57a2x6[_0xb3d6[21]][_0xb3d6[23]],context:_0x57a2x6[_0xb3d6[21]][_0xb3d6[24]],uniqueid:{$ne:_0x57a2x6[_0xb3d6[21]][_0xb3d6[17]]}}})[_0xb3d6[11]](function(_0x57a2xb){if(!_0x57a2xb){return _0x57a2x7[_0xb3d6[16]](404)};if(_0x57a2xb[_0xb3d6[27]]> 0){return _0x57a2x7[_0xb3d6[10]](500)[_0xb3d6[9]]({message:_0xb3d6[28]})};if(_0x57a2x6[_0xb3d6[21]][_0xb3d6[17]]){delete _0x57a2x6[_0xb3d6[21]][_0xb3d6[17]]};VoiceVoicemail[_0xb3d6[19]]({where:{uniqueid:_0x57a2x6[_0xb3d6[18]][_0xb3d6[17]]}})[_0xb3d6[11]](function(_0x57a2xa){if(!_0x57a2xa){return _0x57a2x7[_0xb3d6[16]](404)};var _0x57a2xc=_[_0xb3d6[30]](_0x57a2xa,_0x57a2x6[_0xb3d6[21]]);_0x57a2xc[_0xb3d6[31]]()[_0xb3d6[11]](function(){return _0x57a2x7[_0xb3d6[10]](200)[_0xb3d6[9]](_0x57a2xa)})[_0xb3d6[8]](function(_0x57a2x8){return handleError(_0x57a2x7,_0x57a2x8)})})[_0xb3d6[8]](function(_0x57a2x8){return handleError(_0x57a2x7,_0x57a2x8)})})[_0xb3d6[8]](function(_0x57a2x8){return handleError(_0x57a2x7,_0x57a2x8)})};exports[_0xb3d6[32]]= function(_0x57a2x6,_0x57a2x7){VoiceVoicemail[_0xb3d6[19]]({where:{uniqueid:_0x57a2x6[_0xb3d6[18]][_0xb3d6[17]]}})[_0xb3d6[11]](function(_0x57a2xa){if(!_0x57a2xa){return _0x57a2x7[_0xb3d6[16]](404)};_0x57a2xa[_0xb3d6[32]]()[_0xb3d6[11]](function(){return _0x57a2x7[_0xb3d6[16]](204)})[_0xb3d6[8]](function(_0x57a2x8){return handleError(_0x57a2x7,_0x57a2x8)})})[_0xb3d6[8]](function(_0x57a2x8){return handleError(_0x57a2x7,_0x57a2x8)})};exports[_0xb3d6[33]]= function(_0x57a2x6,_0x57a2x7){VoiceVoicemail[_0xb3d6[32]]({where:{uniqueid:_0x57a2x6[_0xb3d6[12]][_0xb3d6[17]]},individualHooks:true})[_0xb3d6[11]](function(){return _0x57a2x7[_0xb3d6[16]](204)})[_0xb3d6[8]](function(_0x57a2x8){return handleError(_0x57a2x7,_0x57a2x8)})};function handleError(_0x57a2x7,_0x57a2x8){return _0x57a2x7[_0xb3d6[10]](500)[_0xb3d6[9]](_0x57a2x8)} \ No newline at end of file +'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); +} diff --git a/server/api/voice_voicemail/voice_voicemail.events.js b/server/api/voice_voicemail/voice_voicemail.events.js index 2e3f900..7f8360b 100644 --- a/server/api/voice_voicemail/voice_voicemail.events.js +++ b/server/api/voice_voicemail/voice_voicemail.events.js @@ -1 +1,36 @@ -var _0x4203=["\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"];_0x4203[0];const EventEmitter=require(_0x4203[1]);const VoiceVoicemail=require(_0x4203[3])[_0x4203[2]];var VoiceVoicemailEvents= new EventEmitter();VoiceVoicemailEvents[_0x4203[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x4203[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x4203[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x4203[6]};for(var e in events){var event=events[e];VoiceVoicemail[_0x4203[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x1cb7x8,_0x1cb7x9,_0x1cb7xa){VoiceVoicemailEvents[_0x4203[10]](event+ _0x4203[8]+ _0x1cb7x8[_0x4203[9]],_0x1cb7x8);VoiceVoicemailEvents[_0x4203[10]](event,_0x1cb7x8);_0x1cb7xa(null)}}module[_0x4203[11]]= VoiceVoicemailEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/voice_voicemail/voice_voicemail.socket.js b/server/api/voice_voicemail/voice_voicemail.socket.js index 8714eb4..1c63f6d 100644 --- a/server/api/voice_voicemail/voice_voicemail.socket.js +++ b/server/api/voice_voicemail/voice_voicemail.socket.js @@ -1 +1,32 @@ -var _0x7b2a=["\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"];_0x7b2a[0];const VoiceVoicemailEvents=require(_0x7b2a[1]);var events=[_0x7b2a[2],_0x7b2a[3]];exports[_0x7b2a[4]]= function(_0x3a85x3){for(var _0x3a85x4=0,_0x3a85x5=events[_0x7b2a[5]];_0x3a85x4< _0x3a85x5;_0x3a85x4++){var _0x3a85x6=events[_0x3a85x4];var _0x3a85x7=createListener(_0x7b2a[6]+ _0x3a85x6,_0x3a85x3);VoiceVoicemailEvents[_0x7b2a[7]](_0x3a85x6,_0x3a85x7);_0x3a85x3[_0x7b2a[7]](_0x7b2a[8],removeListener(_0x3a85x6,_0x3a85x7))}};function createListener(_0x3a85x6,_0x3a85x3){return function(_0x3a85x9){_0x3a85x3[_0x7b2a[9]](_0x3a85x6,_0x3a85x9)}}function removeListener(_0x3a85x6,_0x3a85x7){return function(){VoiceVoicemailEvents[_0x7b2a[10]](_0x3a85x6,_0x3a85x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/voice_voicemail_messages/index.js b/server/api/voice_voicemail_messages/index.js index e63465a..94f57a6 100644 --- a/server/api/voice_voicemail_messages/index.js +++ b/server/api/voice_voicemail_messages/index.js @@ -1 +1,15 @@ -var _0x3480=["\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"];_0x3480[0];var express=require(_0x3480[1]);var controller=require(_0x3480[2]);var auth=require(_0x3480[3]);var router=express.Router();router[_0x3480[9]](_0x3480[4],auth[_0x3480[5]](),auth[_0x3480[7]]([7],[_0x3480[6]]),controller[_0x3480[8]]);router[_0x3480[9]](_0x3480[10],auth[_0x3480[5]](),auth[_0x3480[7]]([7],[_0x3480[6]]),controller[_0x3480[11]]);router[_0x3480[9]](_0x3480[12],auth[_0x3480[5]](),auth[_0x3480[7]]([7],[_0x3480[6]]),controller[_0x3480[13]]);router[_0x3480[15]](_0x3480[4],auth[_0x3480[5]](),auth[_0x3480[7]]([7],[_0x3480[6]]),controller[_0x3480[14]]);router[_0x3480[15]](_0x3480[10],auth[_0x3480[5]](),auth[_0x3480[7]]([7],[_0x3480[6]]),controller[_0x3480[16]]);module[_0x3480[17]]= router \ No newline at end of file +'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; 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 80dfa54..f97d1a1 100644 --- a/server/api/voice_voicemail_messages/voice_voicemail_messages.controller.js +++ b/server/api/voice_voicemail_messages/voice_voicemail_messages.controller.js @@ -1 +1,106 @@ -var _0x28b6=["\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"];_0x28b6[0];var _=require(_0x28b6[1]);var stream=require(_0x28b6[2]);var Util=require(_0x28b6[3]);var VoiceVoicemailMessages=require(_0x28b6[5])[_0x28b6[4]];exports[_0x28b6[6]]= function(_0xe3acx5,_0xe3acx6){return VoiceVoicemailMessages[_0x28b6[16]]({method:[_0x28b6[15],_0xe3acx5[_0x28b6[12]]]})[_0x28b6[14]](Util[_0x28b6[13]](_0xe3acx5[_0x28b6[12]]))[_0x28b6[11]](function(_0xe3acx8){_0xe3acx6[_0x28b6[10]](200)[_0x28b6[9]](_0xe3acx8)})[_0x28b6[8]](function(_0xe3acx7){console[_0x28b6[7]](_0xe3acx7);return handleError(_0xe3acx6,_0xe3acx7)})};exports[_0x28b6[17]]= function(_0xe3acx5,_0xe3acx6){return VoiceVoicemailMessages[_0x28b6[21]](_0xe3acx5[_0x28b6[20]][_0x28b6[19]])[_0x28b6[11]](function(_0xe3acx9){if(!_0xe3acx9){return _0xe3acx6[_0x28b6[18]](404)};return _0xe3acx6[_0x28b6[9]](_0xe3acx9)})[_0x28b6[8]](function(_0xe3acx7){return handleError(_0xe3acx6,_0xe3acx7)})};exports[_0x28b6[22]]= function(_0xe3acx5,_0xe3acx6){return VoiceVoicemailMessages[_0x28b6[21]](_0xe3acx5[_0x28b6[20]][_0x28b6[19]])[_0x28b6[11]](function(_0xe3acx9){if(!_0xe3acx9){return _0xe3acx6[_0x28b6[18]](404)};_0xe3acx9[_0x28b6[23]]= null;_0xe3acx9[_0x28b6[22]]()})[_0x28b6[11]](function(){return _0xe3acx6[_0x28b6[18]](204)})[_0x28b6[8]](function(_0xe3acx7){return handleError(_0xe3acx6,_0xe3acx7)})};exports[_0x28b6[24]]= function(_0xe3acx5,_0xe3acx6){return VoiceVoicemailMessages[_0x28b6[29]]({where:{id:_0xe3acx5[_0x28b6[12]][_0x28b6[28]]},individualHooks:true})[_0x28b6[11]](function(_0xe3acxa){var _0xe3acxb=[];_0xe3acxa[_0x28b6[27]](function(_0xe3acxc){_0xe3acxc[_0x28b6[23]]= null;_0xe3acxb[_0x28b6[26]](_0xe3acxc[_0x28b6[22]]())});return _0xe3acxb})[_0x28b6[25]]()[_0x28b6[11]](function(){return _0xe3acx6[_0x28b6[18]](204)})[_0x28b6[8]](function(_0xe3acx7){return handleError(_0xe3acx6,_0xe3acx7)})};exports[_0x28b6[30]]= function(_0xe3acx5,_0xe3acx6){return VoiceVoicemailMessages[_0x28b6[21]](_0xe3acx5[_0x28b6[20]][_0x28b6[19]])[_0x28b6[11]](function(_0xe3acxc){var _0xe3acxd= new Buffer(_0xe3acxc[_0x28b6[23]],_0x28b6[32]).toString(_0x28b6[31]);return _0xe3acxd})[_0x28b6[11]](function(_0xe3acxd){return _0xe3acx6[_0x28b6[10]](200)[_0x28b6[9]]({downloadString:_0xe3acxd})})[_0x28b6[8]](function(_0xe3acx7){console[_0x28b6[7]](_0xe3acx7);return handleError(_0xe3acx6,_0xe3acx7)})};function handleError(_0xe3acx6,_0xe3acx7){return _0xe3acx6[_0x28b6[10]](500)[_0x28b6[9]](_0xe3acx7)} \ No newline at end of file +'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); +} 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 354e3c6..aa3edd9 100644 --- a/server/api/voice_voicemail_messages/voice_voicemail_messages.events.js +++ b/server/api/voice_voicemail_messages/voice_voicemail_messages.events.js @@ -1 +1,36 @@ -var _0x31eb=["\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"];_0x31eb[0];const EventEmitter=require(_0x31eb[1]);const VoiceVoicemailMessages=require(_0x31eb[3])[_0x31eb[2]];var VoiceVoicemailMessagesEvents= new EventEmitter();VoiceVoicemailMessagesEvents[_0x31eb[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x31eb[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x31eb[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x31eb[6]};for(var e in events){var event=events[e];VoiceVoicemailMessages[_0x31eb[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xcb90x8,_0xcb90x9,_0xcb90xa){VoiceVoicemailMessagesEvents[_0x31eb[10]](event+ _0x31eb[8]+ _0xcb90x8[_0x31eb[9]],_0xcb90x8);VoiceVoicemailMessagesEvents[_0x31eb[10]](event,_0xcb90x8);_0xcb90xa(null)}}module[_0x31eb[11]]= VoiceVoicemailMessagesEvents \ No newline at end of file +/** + * 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; 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 4224a12..3e1dac1 100644 --- a/server/api/voice_voicemail_messages/voice_voicemail_messages.socket.js +++ b/server/api/voice_voicemail_messages/voice_voicemail_messages.socket.js @@ -1 +1,32 @@ -var _0x4cb4=["\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"];_0x4cb4[0];const VoiceVoicemailMessagesEvents=require(_0x4cb4[1]);var events=[_0x4cb4[2],_0x4cb4[3]];exports[_0x4cb4[4]]= function(_0xb4a6x3){for(var _0xb4a6x4=0,_0xb4a6x5=events[_0x4cb4[5]];_0xb4a6x4< _0xb4a6x5;_0xb4a6x4++){var _0xb4a6x6=events[_0xb4a6x4];var _0xb4a6x7=createListener(_0x4cb4[6]+ _0xb4a6x6,_0xb4a6x3);VoiceVoicemailMessagesEvents[_0x4cb4[7]](_0xb4a6x6,_0xb4a6x7);_0xb4a6x3[_0x4cb4[7]](_0x4cb4[8],removeListener(_0xb4a6x6,_0xb4a6x7))}};function createListener(_0xb4a6x6,_0xb4a6x3){return function(_0xb4a6x9){_0xb4a6x3[_0x4cb4[9]](_0xb4a6x6,_0xb4a6x9)}}function removeListener(_0xb4a6x6,_0xb4a6x7){return function(){VoiceVoicemailMessagesEvents[_0x4cb4[10]](_0xb4a6x6,_0xb4a6x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/widget/index.js b/server/api/widget/index.js index 58ba106..8fec508 100644 --- a/server/api/widget/index.js +++ b/server/api/widget/index.js @@ -1 +1,13 @@ -var _0x3547=["\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"];_0x3547[0];var express=require(_0x3547[1]);var controller=require(_0x3547[2]);var auth=require(_0x3547[3]);var router=express.Router();router[_0x3547[9]](_0x3547[4],auth[_0x3547[5]](),auth[_0x3547[7]]([2],[_0x3547[6]]),controller[_0x3547[8]]);router[_0x3547[9]](_0x3547[10],auth[_0x3547[5]](),auth[_0x3547[7]]([2],[_0x3547[6]]),controller[_0x3547[11]]);router[_0x3547[9]](_0x3547[12],auth[_0x3547[5]](),auth[_0x3547[7]]([2],[_0x3547[6]]),controller[_0x3547[13]]);module[_0x3547[14]]= router \ No newline at end of file +'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; diff --git a/server/api/widget/widget.controller.js b/server/api/widget/widget.controller.js index 7ec8e9b..dbcb701 100644 --- a/server/api/widget/widget.controller.js +++ b/server/api/widget/widget.controller.js @@ -1 +1,147 @@ -var _0xff35=["\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"];_0xff35[0];var _=require(_0xff35[1]);var util=require(_0xff35[2]);var sequelize=require(_0xff35[4])[_0xff35[3]];var reportBuildUtils=require(_0xff35[5]);var Promise=require(_0xff35[6]);exports[_0xff35[7]]= function(_0x3773x6,_0x3773x7){return Promise[_0xff35[30]]([])[_0xff35[12]](function(){return _0x3773x6[_0xff35[15]][_0xff35[16]]})[_0xff35[12]](reportBuildUtils[_0xff35[29]](_0x3773x6[_0xff35[28]]))[_0xff35[12]](function(_0x3773xa){var _0x3773xb=util[_0xff35[17]](_0xff35[13],_0x3773x6[_0xff35[15]][_0xff35[14]],_0x3773x6[_0xff35[15]][_0xff35[16]]);if(_0x3773x6[_0xff35[15]][_0xff35[18]]){_0x3773xb+= util[_0xff35[17]](_0xff35[19],decodeURIComponent(_0x3773x6[_0xff35[15]][_0xff35[18]]))};if(!_0x3773xa|| _0x3773xa!== _0xff35[20]){if(_0x3773xa){_0x3773xb+= _0x3773x6[_0xff35[15]][_0xff35[18]]?_0xff35[21]+ _0x3773xa:_0xff35[22]+ _0x3773xa};console[_0xff35[8]](_0xff35[23]);console[_0xff35[8]](_0x3773xb);console[_0xff35[8]](_0xff35[24]);return sequelize[_0xff35[15]](_0x3773xb,{type:sequelize[_0xff35[26]][_0xff35[25]]})}else {console[_0xff35[8]](_0xff35[23]);console[_0xff35[8]](_0xff35[27]);console[_0xff35[8]](_0xff35[24]);return []}})[_0xff35[12]](function(_0x3773x9){return _0x3773x7[_0xff35[11]](200)[_0xff35[10]]({result:_0x3773x9})})[_0xff35[9]](function(_0x3773x8){console[_0xff35[8]](_0x3773x8);return handleError(_0x3773x7,_0x3773x8)})};exports[_0xff35[16]]= function(_0x3773x6,_0x3773x7){var _0x3773xc=[];var _0x3773xd;if(_0x3773x6[_0xff35[15]][_0xff35[31]]){if(_[_0xff35[32]](_0x3773x6[_0xff35[15]][_0xff35[31]])){_0x3773x6[_0xff35[15]][_0xff35[31]][_0xff35[39]](function(_0x3773xe){_0x3773xd= JSON[_0xff35[33]](_0x3773xe);if(_0x3773xd[_0xff35[34]]&& _0x3773xd[_0xff35[35]]){_0x3773xc[_0xff35[38]](_0x3773xd[_0xff35[34]]+ _0xff35[36]+ _0x3773xd[_0xff35[35]]+ _0xff35[37])}})}else {if(_[_0xff35[40]](_0x3773x6[_0xff35[15]][_0xff35[31]])){_0x3773xd= JSON[_0xff35[33]](_0x3773x6[_0xff35[15]][_0xff35[31]]);if(_0x3773xd[_0xff35[34]]&& _0x3773xd[_0xff35[35]]){_0x3773xc[_0xff35[38]](_0x3773xd[_0xff35[34]]+ _0xff35[36]+ _0x3773xd[_0xff35[35]]+ _0xff35[37])}}}};var _0x3773xf=_0x3773xc[_0xff35[41]]?_0x3773xc[_0xff35[43]](_0xff35[42]):_0xff35[44];sequelize[_0xff35[15]](util[_0xff35[17]](_0xff35[45],_0x3773xf,_0xff35[46]+ _0x3773x6[_0xff35[15]][_0xff35[16]],decodeURIComponent(_0x3773x6[_0xff35[15]][_0xff35[18]])),{type:sequelize[_0xff35[26]][_0xff35[25]]})[_0xff35[12]](function(_0x3773x9){return _0x3773x7[_0xff35[11]](200)[_0xff35[10]](_0x3773x9)})[_0xff35[9]](function(_0x3773x8){return handleError(_0x3773x7,_0x3773x8)})};exports[_0xff35[47]]= function(_0x3773x6,_0x3773x7){return Promise[_0xff35[30]]([])[_0xff35[12]](function(){return _0x3773x6[_0xff35[15]][_0xff35[16]]})[_0xff35[12]](reportBuildUtils[_0xff35[29]](_0x3773x6[_0xff35[28]]))[_0xff35[12]](function(_0x3773xa){var _0x3773xc=[];var _0x3773xd;if(_0x3773x6[_0xff35[15]][_0xff35[31]]){if(_[_0xff35[32]](_0x3773x6[_0xff35[15]][_0xff35[31]])){_0x3773x6[_0xff35[15]][_0xff35[31]][_0xff35[39]](function(_0x3773xe){_0x3773xd= JSON[_0xff35[33]](_0x3773xe);if(_0x3773xd[_0xff35[34]]&& _0x3773xd[_0xff35[35]]){_0x3773xc[_0xff35[38]](_0x3773xd[_0xff35[34]]+ _0xff35[36]+ _0x3773xd[_0xff35[35]]+ _0xff35[37])}})}else {if(_[_0xff35[40]](_0x3773x6[_0xff35[15]][_0xff35[31]])){_0x3773xd= JSON[_0xff35[33]](_0x3773x6[_0xff35[15]][_0xff35[31]]);if(_0x3773xd[_0xff35[34]]&& _0x3773xd[_0xff35[35]]){_0x3773xc[_0xff35[38]](_0x3773xd[_0xff35[34]]+ _0xff35[36]+ _0x3773xd[_0xff35[35]]+ _0xff35[37])}}}};var _0x3773xf=_0x3773xc[_0xff35[41]]?_0x3773xc[_0xff35[43]](_0xff35[42]):_0xff35[44];var _0x3773x10=_0xff35[48];if(_0x3773x6[_0xff35[15]][_0xff35[18]]!== _0xff35[49]){_0x3773x10= util[_0xff35[17]](_0xff35[19],decodeURIComponent(_0x3773x6[_0xff35[15]][_0xff35[18]]))};if(!_0x3773xa|| _0x3773xa!== _0xff35[20]){if(_0x3773xa){_0x3773x10+= _0xff35[21]+ _0x3773xa};var _0x3773xb=util[_0xff35[17]](_0xff35[50],_0x3773xf,_0x3773x6[_0xff35[15]][_0xff35[16]],_0x3773x10);console[_0xff35[8]](_0xff35[23]);console[_0xff35[8]](_0x3773xb);console[_0xff35[8]](_0xff35[24]);return sequelize[_0xff35[15]](_0x3773xb,{type:sequelize[_0xff35[26]][_0xff35[25]]})}else {console[_0xff35[8]](_0xff35[23]);console[_0xff35[8]](_0xff35[27]);console[_0xff35[8]](_0xff35[24]);return []}})[_0xff35[12]](function(_0x3773x9){return _0x3773x7[_0xff35[11]](200)[_0xff35[10]]({result:_0x3773x9})})[_0xff35[9]](function(_0x3773x8){return handleError(_0x3773x7,_0x3773x8)})};function handleError(_0x3773x7,_0x3773x8){return _0x3773x7[_0xff35[11]](500)[_0xff35[10]](_0x3773x8)} \ No newline at end of file +'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); +} diff --git a/server/api/xchatty/index.js b/server/api/xchatty/index.js index 5ab2e5a..d408579 100644 --- a/server/api/xchatty/index.js +++ b/server/api/xchatty/index.js @@ -1 +1,28 @@ -var _0x85b9=["\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"];_0x85b9[0];var express=require(_0x85b9[1]);var controller=require(_0x85b9[2]);var license=require(_0x85b9[3]);var router=express.Router();router[_0x85b9[6]](_0x85b9[4],controller[_0x85b9[5]]);router[_0x85b9[6]](_0x85b9[7],controller[_0x85b9[8]]);router[_0x85b9[6]](_0x85b9[9],controller[_0x85b9[10]]);router[_0x85b9[6]](_0x85b9[11],controller[_0x85b9[12]]);router[_0x85b9[6]](_0x85b9[13],license[_0x85b9[14]](),license[_0x85b9[15]](),controller[_0x85b9[16]]);router[_0x85b9[6]](_0x85b9[17],license[_0x85b9[14]](),license[_0x85b9[15]](),controller[_0x85b9[18]]);router[_0x85b9[6]](_0x85b9[19],license[_0x85b9[14]](),license[_0x85b9[15]](),controller[_0x85b9[20]]);router[_0x85b9[6]](_0x85b9[21],license[_0x85b9[14]](),license[_0x85b9[15]](),controller[_0x85b9[22]]);router[_0x85b9[6]](_0x85b9[23],license[_0x85b9[14]](),license[_0x85b9[15]](),controller[_0x85b9[24]]);router[_0x85b9[6]](_0x85b9[25],license[_0x85b9[14]](),license[_0x85b9[15]](),controller[_0x85b9[26]]);router[_0x85b9[6]](_0x85b9[27],license[_0x85b9[14]](),license[_0x85b9[15]](),controller[_0x85b9[28]]);router[_0x85b9[6]](_0x85b9[29],license[_0x85b9[14]](),license[_0x85b9[15]](),controller[_0x85b9[30]]);router[_0x85b9[6]](_0x85b9[31],license[_0x85b9[14]](),license[_0x85b9[15]](),controller[_0x85b9[32]]);router[_0x85b9[6]](_0x85b9[33],license[_0x85b9[14]](),license[_0x85b9[15]](),controller[_0x85b9[34]]);router[_0x85b9[6]](_0x85b9[35],license[_0x85b9[14]](),license[_0x85b9[15]](),controller[_0x85b9[36]]);router[_0x85b9[6]](_0x85b9[37],license[_0x85b9[14]](),license[_0x85b9[15]](),controller[_0x85b9[38]]);module[_0x85b9[39]]= router \ No newline at end of file +'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; diff --git a/server/api/xchatty/xchatty.controller.js b/server/api/xchatty/xchatty.controller.js index 38f3009..44ed89c 100644 --- a/server/api/xchatty/xchatty.controller.js +++ b/server/api/xchatty/xchatty.controller.js @@ -1 +1,1126 @@ -var _0x785f=["\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","\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"];_0x785f[0];var _=require(_0x785f[1]);var jsmin=require(_0x785f[2])[_0x785f[2]];var Mustache=require(_0x785f[3]);var querystring=require(_0x785f[4]);var path=require(_0x785f[5]);var md5=require(_0x785f[6]);var fs=require(_0x785f[7]);var UAParser=require(_0x785f[8]);var uaParser= new UAParser();var languageParser=require(_0x785f[9]);var ipaddr=require(_0x785f[10]);var geoip=require(_0x785f[11]);var csv=require(_0x785f[12]);var util=require(_0x785f[13]);var moment=require(_0x785f[14]);var Scheduler=require(_0x785f[15]);var config=require(_0x785f[16]);var xchatty_components=require(_0x785f[17]);var Util=require(_0x785f[18]);var license=require(_0x785f[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:_0x785f[20]};var sequelize=require(_0x785f[22])[_0x785f[21]];var User=require(_0x785f[22])[_0x785f[23]];var Agent=require(_0x785f[22])[_0x785f[23]];var ChatRoom=require(_0x785f[22])[_0x785f[24]];var ChatEnquiry=require(_0x785f[22])[_0x785f[25]];var ChatVisitor=require(_0x785f[22])[_0x785f[26]];var ChatMessage=require(_0x785f[22])[_0x785f[27]];var ChatWebsite=require(_0x785f[22])[_0x785f[28]];var ChatWebsitesField=require(_0x785f[22])[_0x785f[29]];var ChatProactiveAction=require(_0x785f[22])[_0x785f[30]];var ReportChatSession=require(_0x785f[22])[_0x785f[31]];var ChatQueue=require(_0x785f[22])[_0x785f[32]];var License=require(_0x785f[22])[_0x785f[33]];var Xchatty=require(_0x785f[22])[_0x785f[34]];var Setting=require(_0x785f[22])[_0x785f[35]];const Contact=require(_0x785f[22])[_0x785f[36]];var id=1;exports[_0x785f[37]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){return Xchatty[_0x785f[42]]()[_0x785f[41]](function(_0x19e8x2b){return _0x19e8x28[_0x785f[40]](200)[_0x785f[39]](_0x19e8x2b)})[_0x785f[38]](function(_0x19e8x2a){return _0x19e8x29(_0x19e8x2a)})};exports[_0x785f[43]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){ChatWebsite[_0x785f[78]](_0x19e8x27[_0x785f[49]][_0x785f[48]])[_0x785f[41]](function(_0x19e8x2c){_0x19e8x28[_0x785f[46]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x785f[44],"\x78\x2D\x74\x69\x6D\x65\x73\x74\x61\x6D\x70":Date[_0x785f[45]](),"\x78\x2D\x73\x65\x6E\x74":true});var _0x19e8x2d=xchatty_components[_0x785f[47]];var _0x19e8x2e={websiteId:_0x19e8x27[_0x785f[49]][_0x785f[48]],rootPath:Util[_0x785f[51]](_0x19e8x2c[_0x785f[50]])+ _0x785f[52],signedUp:_0x785f[53],windowFocused:_0x785f[53],isNewPage:_0x785f[54],processingSignUp:_0x785f[53],processingEnquiry:_0x785f[53],processingSend:_0x785f[53],processingRating:_0x785f[53],visitorFullname:_0x785f[55],visitorAvatar:_0x785f[55],timerReadMessages:_0x785f[56],timerCheckStatus:_0x785f[56],isOnline:_0x785f[53],decayHistory:0,defaultTimeout:5000,isInitialStatusCheck:_0x785f[54],muteNotificationSoundOnce:_0x785f[53],assetBase:Util[_0x785f[51]](_0x19e8x2c[_0x785f[50]])+ _0x785f[57],hasSessionSaf:_0x785f[53],restoreOpenState:_0x785f[53],animateHover:_0x19e8x2c[_0x785f[58]],hideEmail:_0x785f[53],hideOffline:_0x785f[53],headerShape:_0x19e8x2c[_0x785f[59]],HeaderOnline:_0x19e8x2c[_0x785f[60]],OnlineMessage:_0x19e8x2c[_0x785f[61]],UsernamePlaceholder:_0x19e8x2c[_0x785f[62]],EmailPlaceholder:_0x19e8x2c[_0x785f[63]],StartChatButtonText:_0x19e8x2c[_0x785f[64]],OfflineMessage:_0x19e8x2c[_0x785f[65]],HeaderOffline:_0x19e8x2c[_0x785f[66]],EnquiryMessagePlaceholder:_0x19e8x2c[_0x785f[67]],EnquiryButtonText:_0x19e8x2c[_0x785f[68]],downloadTranscript:_0x19e8x2c[_0x785f[69]],RatingMessage:_0x19e8x2c[_0x785f[70]],RatingSend:_0x19e8x2c[_0x785f[71]],RatingSkip:_0x19e8x2c[_0x785f[72]],MessageAgentsBusy:_0x19e8x2c[_0x785f[73]],NameTitle:_0x19e8x2c[_0x785f[74]],EmailTitle:_0x19e8x2c[_0x785f[75]],MessageTitle:_0x19e8x2c[_0x785f[76]]};_0x19e8x2d= Mustache[_0x785f[77]](_0x19e8x2d,_0x19e8x2e);_0x19e8x28[_0x785f[39]](_0x19e8x2d)})[_0x785f[38]](function(_0x19e8x2a){_0x19e8x29(_0x19e8x2a)})};exports[_0x785f[79]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){ChatWebsite[_0x785f[78]](_0x19e8x27[_0x785f[49]][_0x785f[48]])[_0x785f[41]](function(_0x19e8x2c){_0x19e8x28[_0x785f[46]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x785f[80],"\x78\x2D\x74\x69\x6D\x65\x73\x74\x61\x6D\x70":Date[_0x785f[45]](),"\x78\x2D\x73\x65\x6E\x74":true});var _0x19e8x2f=xchatty_components[_0x785f[81]];var _0x19e8x30={assetBase:Util[_0x785f[51]](_0x19e8x2c[_0x785f[50]])+ _0x785f[57],color:_0x19e8x2c[_0x785f[82]],colorFocus:_0x19e8x2c[_0x785f[83]],colorButton:_0x19e8x2c[_0x785f[84]]};_0x19e8x2f= Mustache[_0x785f[77]](_0x19e8x2f,_0x19e8x30);_0x19e8x28[_0x785f[39]](_0x19e8x2f)})[_0x785f[38]](function(_0x19e8x2a){_0x19e8x29(_0x19e8x2a)})};exports[_0x785f[85]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){if(_0x19e8x27[_0x785f[88]][_0x785f[87]](_0x785f[86])){_0x19e8x28[_0x785f[94]](path[_0x785f[93]](config[_0x785f[89]],_0x785f[90],_0x785f[91],_0x19e8x27[_0x785f[88]][_0x785f[92]]))}else {_0x19e8x28[_0x785f[94]](path[_0x785f[93]](config[_0x785f[89]],_0x785f[90],_0x785f[95],_0x785f[96],_0x785f[97],_0x19e8x27[_0x785f[88]][_0x785f[92]]))}};exports[_0x785f[98]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){_0x19e8x28[_0x785f[46]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x785f[44],"\x78\x2D\x74\x69\x6D\x65\x73\x74\x61\x6D\x70":Date[_0x785f[45]](),"\x78\x2D\x73\x65\x6E\x74":true});var _0x19e8x31=xchatty_components[_0x785f[99]];_0x19e8x28[_0x785f[39]](_0x19e8x31)};exports[_0x785f[100]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){if(!_0x19e8x27[_0x785f[101]][_0x785f[96]]){_0x19e8x27[_0x785f[101]][_0x785f[96]]= {}};var _0x19e8x32={};return Agent[_0x785f[42]]({where:{online:true,role:_0x785f[120]}})[_0x785f[41]](function(_0x19e8x35){if(_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[114]]){_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x785f[114]]= _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[114]]=== _0x785f[54]?true:false};_0x19e8x32= {success:true,has_session_saf:null,signed_up:_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x785f[110]]?true:false,fullname:_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x785f[116]]?_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x785f[116]]:_0x785f[113],email:_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x785f[117]]?_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x785f[117]]:_0x785f[113],avatar:_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x785f[118]]?_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x785f[118]]:_0x785f[113],open_state:_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x785f[114]]|| _0x19e8x27[_0x785f[101]][_0x785f[96]][_0x785f[110]]?true:false,online:_0x19e8x35[_0x785f[119]]?true:false,is_unserved:false,room_id:0};return})[_0x785f[41]](function(){if(_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x785f[107]]){return ChatRoom[_0x785f[109]]({where:{ChatVisitorId:_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x785f[107]],status:_0x785f[112],token:{$ne:_0x785f[113]}}})};return})[_0x785f[41]](function(_0x19e8x34){if(_0x19e8x34){_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x785f[110]]= _0x19e8x34[_0x785f[48]];_0x19e8x32[_0x785f[110]]= _0x19e8x34[_0x785f[48]];_0x19e8x32[_0x785f[111]]= true}else {_0x19e8x32[_0x785f[111]]= false};return})[_0x785f[41]](function(){if(_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x785f[107]]){return ChatVisitor[_0x785f[109]]({where:{id:_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x785f[107]],status:_0x785f[108]}})};return})[_0x785f[41]](function(_0x19e8x33){if(_0x19e8x33){_0x19e8x32[_0x785f[102]]= true};return _0x19e8x28[_0x785f[39]](_0x19e8x27[_0x785f[88]][_0x785f[103]]+ _0x785f[104]+ JSON[_0x785f[105]](_0x19e8x32)+ _0x785f[106])})[_0x785f[38]](function(_0x19e8x2a){return _0x19e8x29(_0x19e8x2a)})};exports[_0x785f[121]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){var _0x19e8x36=_0x19e8x27[_0x785f[49]][_0x785f[48]];var _0x19e8x37={where:{ChatRoomId:_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[110]]},include:[{model:User,attributes:[_0x785f[48],_0x785f[122],_0x785f[116],_0x785f[117]]},{model:ChatVisitor,attributes:[_0x785f[48],_0x785f[116],_0x785f[117]]}]};if(_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[123]]=== _0x785f[53]){_0x19e8x37[_0x785f[124]][_0x785f[48]]= {$gt:_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[125]]}};ChatMessage[_0x785f[42]](_0x19e8x37)[_0x785f[41]](function(_0x19e8x38){var _0x19e8x39={success:true,messages:_0x19e8x38,composing:false,composing_fullname:null};_0x19e8x28[_0x785f[39]](_0x19e8x27[_0x785f[88]][_0x785f[103]]+ _0x785f[104]+ JSON[_0x785f[105]](_0x19e8x39)+ _0x785f[106])})[_0x785f[38]](function(_0x19e8x2a){_0x19e8x29(_0x19e8x2a)})};exports[_0x785f[126]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){var _0x19e8x36=_0x19e8x27[_0x785f[49]][_0x785f[48]];var _0x19e8x37={where:{ChatRoomId:_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[110]]},include:[{model:User,attributes:[_0x785f[48],_0x785f[122],_0x785f[116],_0x785f[117]]},{model:ChatVisitor,attributes:[_0x785f[48],_0x785f[116],_0x785f[117]]}]};if(_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[123]]=== _0x785f[53]){_0x19e8x37[_0x785f[124]][_0x785f[48]]= {$gt:_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[125]]}};ChatMessage[_0x785f[129]]({body:_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[128]][_0x785f[127]],ChatRoomId:_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[110]],ChatVisitorId:_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[107]]})[_0x785f[41]](function(_0x19e8x3a){ChatMessage[_0x785f[42]](_0x19e8x37)[_0x785f[41]](function(_0x19e8x38){var _0x19e8x39={errors:[],success:true,data:_0x19e8x3a,messages:_0x19e8x38};_0x19e8x28[_0x785f[39]](_0x19e8x27[_0x785f[88]][_0x785f[103]]+ _0x785f[104]+ JSON[_0x785f[105]](_0x19e8x39)+ _0x785f[106])})[_0x785f[38]](function(_0x19e8x2a){_0x19e8x29(_0x19e8x2a)})})[_0x785f[38]](function(_0x19e8x2a){_0x19e8x29(_0x19e8x2a)})};exports[_0x785f[130]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){var _0x19e8x36=_0x19e8x27[_0x785f[49]][_0x785f[48]];return ChatRoom[_0x785f[78]](_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[110]])[_0x785f[41]](function(_0x19e8x34){return _0x19e8x34[_0x785f[133]]({status:_0x785f[131],completeReason:_0x785f[132]})})[_0x785f[41]](function(){var _0x19e8x39={success:true,errors:[]};_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36]= {};_0x19e8x28[_0x785f[39]](_0x19e8x27[_0x785f[88]][_0x785f[103]]+ _0x785f[104]+ JSON[_0x785f[105]](_0x19e8x39)+ _0x785f[106])})[_0x785f[38]](function(_0x19e8x2a){_0x19e8x29(_0x19e8x2a)})};exports[_0x785f[134]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){var _0x19e8x36=_0x19e8x27[_0x785f[49]][_0x785f[48]];var _0x19e8x3b=uaParser[_0x785f[138]](_0x19e8x27[_0x785f[137]][_0x785f[136]])[_0x785f[135]]();var _0x19e8x3c=languageParser[_0x785f[140]](_0x19e8x27[_0x785f[137]][_0x785f[139]]);var _0x19e8x3d=_0x19e8x27[_0x785f[137]][_0x785f[141]]?_0x19e8x27[_0x785f[137]][_0x785f[141]]:_0x19e8x27[_0x785f[143]][_0x785f[142]]|| _0x19e8x27[_0x785f[144]];var _0x19e8x3e={fullname:_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[145]][_0x785f[116]],email:_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[145]][_0x785f[117]],remote_address:_0x19e8x3d,user_agent:_0x19e8x27[_0x785f[137]][_0x785f[136]],visitor_language:_0x19e8x27[_0x785f[137]][_0x785f[139]],referer:_0x19e8x27[_0x785f[137]][_0x785f[146]],origin:_0x785f[147],browser:_0x19e8x3b[_0x785f[148]][_0x785f[122]]+ _0x785f[149]+ _0x19e8x3b[_0x785f[148]][_0x785f[150]],engine:_0x19e8x3b[_0x785f[151]][_0x785f[122]]+ _0x785f[149]+ _0x19e8x3b[_0x785f[151]][_0x785f[150]],os:_0x19e8x3b[_0x785f[152]][_0x785f[122]]+ _0x785f[149]+ _0x19e8x3b[_0x785f[152]][_0x785f[150]],device:_0x19e8x3b[_0x785f[154]][_0x785f[153]]?_0x19e8x3b[_0x785f[154]][_0x785f[153]]+ _0x785f[149]+ _0x19e8x3b[_0x785f[154]][_0x785f[155]]+ _0x785f[149]+ _0x19e8x3b[_0x785f[154]][_0x785f[156]]:null,ChatWebsiteId:_0x19e8x27[_0x785f[88]][_0x785f[157]]};if(_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[145]][_0x785f[158]]&& _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[145]][_0x785f[159]]){_0x19e8x3e[_0x785f[158]]= _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[145]][_0x785f[158]];if(_[_0x785f[160]](_0x19e8x3e[_0x785f[158]])){_0x19e8x3e[_0x785f[158]]= _[_0x785f[93]](_0x19e8x3e[_0x785f[158]],_0x785f[161])};_0x19e8x3e[_0x785f[159]]= _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[145]][_0x785f[159]]};if(_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[145]][_0x785f[162]]&& _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[145]][_0x785f[163]]){_0x19e8x3e[_0x785f[162]]= _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[145]][_0x785f[162]];if(_[_0x785f[160]](_0x19e8x3e[_0x785f[162]])){_0x19e8x3e[_0x785f[162]]= _[_0x785f[93]](_0x19e8x3e[_0x785f[162]],_0x785f[161])};_0x19e8x3e[_0x785f[163]]= _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[145]][_0x785f[163]]};if(_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[145]][_0x785f[164]]&& _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[145]][_0x785f[165]]){_0x19e8x3e[_0x785f[164]]= _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[145]][_0x785f[164]];if(_[_0x785f[160]](_0x19e8x3e[_0x785f[164]])){_0x19e8x3e[_0x785f[164]]= _[_0x785f[93]](_0x19e8x3e[_0x785f[164]],_0x785f[161])};_0x19e8x3e[_0x785f[165]]= _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[145]][_0x785f[165]]};var _0x19e8x3f,_0x19e8x40,_0x19e8x41;return ChatVisitor[_0x785f[129]](_0x19e8x3e)[_0x785f[41]](function(_0x19e8x44){_0x19e8x3f= _0x19e8x44;return ChatWebsite[_0x785f[78]](_0x19e8x3f.ChatWebsiteId)})[_0x785f[41]](function(_0x19e8x43){_0x19e8x40= _0x19e8x43;if(_0x19e8x40[_0x785f[174]]){return Contact[_0x785f[175]]({where:{email:_0x19e8x3f[_0x785f[117]]},defaults:{email:_0x19e8x3f[_0x785f[117]],firstName:_0x19e8x3f[_0x785f[116]],ListId:_0x19e8x40[_0x785f[174]]}})}})[_0x785f[41]](function(){return ChatRoom[_0x785f[129]]({type:_0x785f[173],ChatVisitorId:_0x19e8x3f[_0x785f[48]],ChatWebsiteId:_0x19e8x40[_0x785f[48]],contact:_0x19e8x3f[_0x785f[117]],website:_0x19e8x40[_0x785f[122]]})})[_0x785f[41]](function(_0x19e8x34){_0x19e8x41= _0x19e8x34;var _0x19e8x42= new Scheduler({channel:_0x785f[166],uniqueid:util[_0x785f[169]](_0x785f[167],moment()[_0x785f[168]](),_0x19e8x41[_0x785f[48]]),roomid:_0x19e8x41[_0x785f[48]],websiteid:_0x19e8x40[_0x785f[48]],websitename:_0x19e8x40[_0x785f[122]],websiteaddress:_0x19e8x40[_0x785f[170]],accountid:_0x19e8x40[_0x785f[48]],accountname:_0x19e8x40[_0x785f[122]],accountaddress:_0x19e8x40[_0x785f[170]],visitorid:_0x19e8x3f[_0x785f[48]],visitorname:_0x19e8x3f[_0x785f[116]],visitoremail:_0x19e8x3f[_0x785f[117]]});_0x19e8x42[_0x785f[171]]();_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[116]]= _0x19e8x3f[_0x785f[116]];_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[117]]= _0x19e8x3f[_0x785f[117]];_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[118]]= md5(_0x19e8x3f[_0x785f[117]]).toString(_0x785f[172]);_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[107]]= _0x19e8x3f[_0x785f[48]];var _0x19e8x39={success:true,errors:[],chatVisitor:{id:_0x19e8x3f[_0x785f[48]]}};_0x19e8x28[_0x785f[39]](_0x19e8x27[_0x785f[88]][_0x785f[103]]+ _0x785f[104]+ JSON[_0x785f[105]](_0x19e8x39)+ _0x785f[106])})[_0x785f[38]](function(_0x19e8x2a){_0x19e8x29(_0x19e8x2a)})};exports[_0x785f[176]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){var _0x19e8x36=_0x19e8x27[_0x785f[49]][_0x785f[48]];return ChatVisitor[_0x785f[78]](_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[107]])[_0x785f[41]](function(_0x19e8x44){return _0x19e8x44[_0x785f[133]]({status:_0x785f[108]})})[_0x785f[41]](function(){var _0x19e8x39={success:true,errors:[]};_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36]= {};_0x19e8x28[_0x785f[39]](_0x19e8x27[_0x785f[88]][_0x785f[103]]+ _0x785f[104]+ JSON[_0x785f[105]](_0x19e8x39)+ _0x785f[106])})[_0x785f[38]](function(_0x19e8x2a){_0x19e8x29(_0x19e8x2a)})};exports[_0x785f[177]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){return sequelize[_0x785f[189]]()[_0x785f[41]](function(_0x19e8x45){var _0x19e8x3d=_0x19e8x27[_0x785f[137]][_0x785f[141]]?_0x19e8x27[_0x785f[137]][_0x785f[141]]:_0x19e8x27[_0x785f[143]][_0x785f[142]]|| _0x19e8x27[_0x785f[144]];var _0x19e8x3b=uaParser[_0x785f[138]](_0x19e8x27[_0x785f[137]][_0x785f[136]])[_0x785f[135]]();var _0x19e8x3c=languageParser[_0x785f[140]](_0x19e8x27[_0x785f[137]][_0x785f[139]]);var _0x19e8x3e={fullname:_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[178]][_0x785f[116]],email:_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[178]][_0x785f[117]],remote_address:_0x19e8x3d,user_agent:_0x19e8x27[_0x785f[137]][_0x785f[136]],visitor_language:_0x19e8x27[_0x785f[137]][_0x785f[139]],browser:_0x19e8x3b[_0x785f[148]][_0x785f[122]]+ _0x785f[149]+ _0x19e8x3b[_0x785f[148]][_0x785f[150]],engine:_0x19e8x3b[_0x785f[151]][_0x785f[122]]+ _0x785f[149]+ _0x19e8x3b[_0x785f[151]][_0x785f[150]],os:_0x19e8x3b[_0x785f[152]][_0x785f[122]]+ _0x785f[149]+ _0x19e8x3b[_0x785f[152]][_0x785f[150]],device:_0x19e8x3b[_0x785f[154]][_0x785f[153]]?_0x19e8x3b[_0x785f[154]][_0x785f[153]]+ _0x785f[149]+ _0x19e8x3b[_0x785f[154]][_0x785f[155]]+ _0x785f[149]+ _0x19e8x3b[_0x785f[154]][_0x785f[156]]:null,referer:_0x19e8x27[_0x785f[137]][_0x785f[146]],origin:_0x785f[179],status:_0x785f[108],ChatWebsiteId:parseInt(_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[178]][_0x785f[180]],10),ChatEnquiry:{username:_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[178]][_0x785f[116]],email:_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[178]][_0x785f[117]],text:_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[178]][_0x785f[127]],ChatWebsiteId:parseInt(_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[178]][_0x785f[180]],10)}};if(_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[178]][_0x785f[181]]&& _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[178]][_0x785f[182]]){_0x19e8x3e[_0x785f[181]]= _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[178]][_0x785f[181]];if(_[_0x785f[160]](_0x19e8x3e[_0x785f[181]])){_0x19e8x3e[_0x785f[181]]= _[_0x785f[93]](_0x19e8x3e[_0x785f[181]],_0x785f[161])};_0x19e8x3e[_0x785f[182]]= _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[178]][_0x785f[182]]};if(_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[178]][_0x785f[183]]&& _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[178]][_0x785f[184]]){_0x19e8x3e[_0x785f[183]]= _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[178]][_0x785f[183]];if(_[_0x785f[160]](_0x19e8x3e[_0x785f[183]])){_0x19e8x3e[_0x785f[183]]= _[_0x785f[93]](_0x19e8x3e[_0x785f[183]],_0x785f[161])};_0x19e8x3e[_0x785f[184]]= _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[178]][_0x785f[184]]};if(_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[178]][_0x785f[185]]&& _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[178]][_0x785f[186]]){_0x19e8x3e[_0x785f[185]]= _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[178]][_0x785f[185]];if(_[_0x785f[160]](_0x19e8x3e[_0x785f[185]])){_0x19e8x3e[_0x785f[185]]= _[_0x785f[93]](_0x19e8x3e[_0x785f[185]],_0x785f[161])};_0x19e8x3e[_0x785f[186]]= _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[178]][_0x785f[186]]};var _0x19e8x3f;return ChatVisitor[_0x785f[129]](_0x19e8x3e,{transaction:_0x19e8x45,include:[{model:ChatEnquiry}]})[_0x785f[41]](function(_0x19e8x44){_0x19e8x3f= _0x19e8x44;return ChatWebsite[_0x785f[78]](_0x19e8x3f.ChatWebsiteId)})[_0x785f[41]](function(_0x19e8x43){if(_0x19e8x43[_0x785f[174]]){return Contact[_0x785f[175]]({where:{email:_0x19e8x3f[_0x785f[117]]},defaults:{email:_0x19e8x3f[_0x785f[117]],firstName:_0x19e8x3f[_0x785f[116]],ListId:_0x19e8x43[_0x785f[174]]}})}})[_0x785f[41]](function(){_0x19e8x45[_0x785f[188]]();_0x19e8x28[_0x785f[39]](_0x19e8x27[_0x785f[88]][_0x785f[103]]+ _0x785f[104]+ JSON[_0x785f[105]]({success:true,errors:[]})+ _0x785f[106])})[_0x785f[38]](function(_0x19e8x2a){_0x19e8x45[_0x785f[187]]();_0x19e8x29(_0x19e8x2a)})})};exports[_0x785f[190]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){var _0x19e8x36=_0x19e8x27[_0x785f[49]][_0x785f[48]];if(_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36]&& _0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[107]]&& _0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[110]]){ChatMessage[_0x785f[42]]({where:{ChatRoomId:_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[110]]},include:[{model:Agent,attributes:[_0x785f[48],_0x785f[116]]},{model:ChatVisitor,attributes:[_0x785f[48],_0x785f[116]]}]})[_0x785f[41]](function(_0x19e8x38){var _0x19e8x46=[];_0x19e8x38[_0x785f[196]](function(_0x19e8x3a){var _0x19e8x47={name:_0x19e8x3a[_0x785f[191]]?_0x19e8x3a[_0x785f[23]][_0x785f[116]]:_0x19e8x3a[_0x785f[26]][_0x785f[116]],text:_0x19e8x3a[_0x785f[193]][_0x785f[192]](/(\r\n|\n|\r)/gm,_0x785f[149]),date:_0x19e8x3a[_0x785f[194]]};_0x19e8x46[_0x785f[195]](_0x19e8x47)});var _0x19e8x48=csv(_0x19e8x46);_0x19e8x28[_0x785f[156]](_0x785f[197])[_0x785f[40]](200)[_0x785f[39]](_0x19e8x48)})[_0x785f[38]](function(_0x19e8x2a){_0x19e8x29(_0x19e8x2a)})}};exports[_0x785f[198]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){return Xchatty[_0x785f[78]](_0x19e8x27[_0x785f[49]][_0x785f[48]])[_0x785f[41]](function(_0x19e8x49){if(!_0x19e8x49){return _0x19e8x28[_0x785f[199]](404)};return _0x19e8x28[_0x785f[39]](_0x19e8x49)})[_0x785f[38]](function(_0x19e8x2a){return _0x19e8x29(_0x19e8x2a)})};exports[_0x785f[129]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){return Xchatty[_0x785f[129]](_0x19e8x27[_0x785f[193]])[_0x785f[41]](function(_0x19e8x49){return _0x19e8x28[_0x785f[40]](201)[_0x785f[39]](_0x19e8x49)})[_0x785f[38]](function(_0x19e8x2a){return _0x19e8x29(_0x19e8x2a)})};exports[_0x785f[133]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){if(_0x19e8x27[_0x785f[193]][_0x785f[48]]){delete _0x19e8x27[_0x785f[193]][_0x785f[48]]};return Xchatty[_0x785f[78]](_0x19e8x27[_0x785f[49]][_0x785f[48]])[_0x785f[41]](function(_0x19e8x49){if(!_0x19e8x49){return _0x19e8x28[_0x785f[199]](404)};var _0x19e8x4a=_[_0x785f[200]](_0x19e8x49,_0x19e8x27[_0x785f[193]]);_0x19e8x4a[_0x785f[201]]()[_0x785f[41]](function(){return _0x19e8x28[_0x785f[40]](200)[_0x785f[39]](_0x19e8x49)})[_0x785f[38]](function(_0x19e8x2a){return _0x19e8x29(_0x19e8x2a)})})[_0x785f[38]](function(_0x19e8x2a){return _0x19e8x29(_0x19e8x2a)})};exports[_0x785f[202]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){return Xchatty[_0x785f[78]](_0x19e8x27[_0x785f[49]][_0x785f[48]])[_0x785f[41]](function(_0x19e8x49){if(!_0x19e8x49){return _0x19e8x28[_0x785f[199]](404)};_0x19e8x49[_0x785f[202]]()[_0x785f[41]](function(){return _0x19e8x28[_0x785f[199]](204)})[_0x785f[38]](function(_0x19e8x2a){return _0x19e8x29(_0x19e8x2a)})})[_0x785f[38]](function(_0x19e8x2a){return _0x19e8x29(_0x19e8x2a)})};exports[_0x785f[203]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){var _0x19e8x2c,_0x19e8x4b,_0x19e8x4c;var _0x19e8x4d=xchatty_components[_0x785f[204]];return ChatWebsite[_0x785f[78]](_0x19e8x27[_0x785f[49]][_0x785f[48]],{include:[{all:true}]})[_0x785f[41]](function(_0x19e8x40){_0x19e8x2c= _0x19e8x40;return Setting[_0x785f[78]](1)})[_0x785f[41]](function(_0x19e8x53){_0x19e8x4c= _0x19e8x53;return License[_0x785f[78]](1)})[_0x785f[41]](function(_0x19e8x4e){if(_0x19e8x4e){_0x19e8x4b= JSON[_0x785f[140]](license[_0x785f[207]](_0x19e8x4e[_0x785f[206]][_0x785f[205]],_0x19e8x4e[_0x785f[158]]))}else {_0x19e8x4b= demoLicense};var _0x19e8x4f={rootPath:Util[_0x785f[51]](_0x19e8x2c[_0x785f[50]])+ _0x785f[52],assetBase:Util[_0x785f[51]](_0x19e8x2c[_0x785f[50]])+ _0x785f[57],websiteId:_0x19e8x2c[_0x785f[48]],headerShape:_0x19e8x2c[_0x785f[59]],enquiryEnable:_0x19e8x2c[_0x785f[208]],onlineFields:_0x19e8x2c[_0x785f[209]],logo:function(){if(_0x19e8x4b[_0x785f[210]]&& !_0x19e8x2c[_0x785f[211]]&& _0x19e8x2c[_0x785f[212]]){return _0x785f[213]+ _0x19e8x2c[_0x785f[212]]+ _0x785f[214]}else {return _0x785f[215]}},whiteLabel:function(){if(_0x19e8x4b[_0x785f[210]]&& !_0x19e8x2c[_0x785f[216]]){return _0x19e8x2c[_0x785f[217]]}else {return _0x785f[218]}},renderedOnlineField:function(){var _0x19e8x50=_0x785f[113];var _0x19e8x51=this;switch(this[_0x785f[243]]){case _0x785f[227]:_0x19e8x50= _0x785f[219];_0x19e8x50+= util[_0x785f[169]](_0x785f[220],_0x19e8x51[_0x785f[37]],_0x19e8x51[_0x785f[221]],_0x19e8x51[_0x785f[222]]?_0x785f[223]:_0x785f[113]);_0x19e8x50+= util[_0x785f[169]](_0x785f[224],_0x19e8x51[_0x785f[221]],_0x19e8x51[_0x785f[37]],_0x19e8x51[_0x785f[37]]+ 1,_0x19e8x51[_0x785f[225]],_0x19e8x51[_0x785f[222]]?_0x785f[222]:_0x785f[113]);_0x19e8x50+= _0x785f[226];break;case _0x785f[229]:_0x19e8x50= _0x785f[219];_0x19e8x50+= util[_0x785f[169]](_0x785f[220],_0x19e8x51[_0x785f[37]],_0x19e8x51[_0x785f[221]],_0x19e8x51[_0x785f[222]]?_0x785f[223]:_0x785f[113]);_0x19e8x50+= util[_0x785f[169]](_0x785f[228],_0x19e8x51[_0x785f[37]],_0x19e8x51[_0x785f[221]],_0x19e8x51[_0x785f[37]]+ 1,_0x19e8x51[_0x785f[225]],_0x19e8x51[_0x785f[222]]?_0x785f[222]:_0x785f[113]);_0x19e8x50+= _0x785f[226];break;case _0x785f[235]:_0x19e8x50= _0x785f[219];_0x19e8x50+= util[_0x785f[169]](_0x785f[230],_0x19e8x51[_0x785f[221]]);_[_0x785f[196]](_0x19e8x51[_0x785f[231]],function(_0x19e8x52){_0x19e8x50+= _0x785f[232];_0x19e8x50+= util[_0x785f[169]](_0x785f[233],_0x19e8x51[_0x785f[37]]+ 1,_0x19e8x52,_0x19e8x52);_0x19e8x50+= _0x785f[234]});_0x19e8x50+= _0x785f[226];break;case _0x785f[237]:_0x19e8x50= _0x785f[219];_0x19e8x50+= util[_0x785f[169]](_0x785f[230],_0x19e8x51[_0x785f[221]]);_[_0x785f[196]](_0x19e8x51[_0x785f[231]],function(_0x19e8x52){_0x19e8x50+= _0x785f[232];_0x19e8x50+= util[_0x785f[169]](_0x785f[236],_0x19e8x51[_0x785f[37]]+ 1,_0x19e8x52,_0x19e8x52);_0x19e8x50+= _0x785f[234]});_0x19e8x50+= _0x785f[226];break;case _0x785f[242]:_0x19e8x50= _0x785f[219];_0x19e8x50+= util[_0x785f[169]](_0x785f[238],_0x19e8x51[_0x785f[37]],_0x19e8x51[_0x785f[221]]);_0x19e8x50+= util[_0x785f[169]](_0x785f[239],_0x19e8x51[_0x785f[37]]+ 1);_[_0x785f[196]](_0x19e8x51[_0x785f[231]],function(_0x19e8x52){_0x19e8x50+= util[_0x785f[169]](_0x785f[240],_0x19e8x52,_0x19e8x52)});_0x19e8x50+= _0x785f[241];break};_0x19e8x50+= _0x785f[244];_0x19e8x50+= util[_0x785f[169]](_0x785f[245],_0x19e8x51[_0x785f[37]]+ 1,_0x19e8x51[_0x785f[221]]);return _0x19e8x50},offlineFields:_0x19e8x2c[_0x785f[246]],renderedOfflineField:function(){var _0x19e8x50=_0x785f[113];var _0x19e8x51=this;switch(this[_0x785f[243]]){case _0x785f[227]:_0x19e8x50= _0x785f[219];_0x19e8x50+= util[_0x785f[169]](_0x785f[247],_0x19e8x51[_0x785f[37]],_0x19e8x51[_0x785f[221]],_0x19e8x51[_0x785f[222]]?_0x785f[223]:_0x785f[113]);_0x19e8x50+= util[_0x785f[169]](_0x785f[248],_0x19e8x51[_0x785f[221]],_0x19e8x51[_0x785f[37]],_0x19e8x51[_0x785f[37]]+ 1,_0x19e8x51[_0x785f[225]],_0x19e8x51[_0x785f[222]]?_0x785f[222]:_0x785f[113]);_0x19e8x50+= _0x785f[226];break;case _0x785f[229]:_0x19e8x50= _0x785f[219];_0x19e8x50+= util[_0x785f[169]](_0x785f[247],_0x19e8x51[_0x785f[37]],_0x19e8x51[_0x785f[221]],_0x19e8x51[_0x785f[222]]?_0x785f[223]:_0x785f[113]);_0x19e8x50+= util[_0x785f[169]](_0x785f[249],_0x19e8x51[_0x785f[37]],_0x19e8x51[_0x785f[221]],_0x19e8x51[_0x785f[37]]+ 1,_0x19e8x51[_0x785f[225]],_0x19e8x51[_0x785f[222]]?_0x785f[222]:_0x785f[113]);_0x19e8x50+= _0x785f[226];break;case _0x785f[235]:_0x19e8x50= _0x785f[219];_0x19e8x50+= util[_0x785f[169]](_0x785f[230],_0x19e8x51[_0x785f[221]]);_[_0x785f[196]](_0x19e8x51[_0x785f[231]],function(_0x19e8x52){_0x19e8x50+= _0x785f[232];_0x19e8x50+= util[_0x785f[169]](_0x785f[250],_0x19e8x51[_0x785f[37]]+ 1,_0x19e8x52,_0x19e8x52);_0x19e8x50+= _0x785f[234]});_0x19e8x50+= _0x785f[226];break;case _0x785f[237]:_0x19e8x50= _0x785f[219];_0x19e8x50+= util[_0x785f[169]](_0x785f[230],_0x19e8x51[_0x785f[221]]);_[_0x785f[196]](_0x19e8x51[_0x785f[231]],function(_0x19e8x52){_0x19e8x50+= _0x785f[232];_0x19e8x50+= util[_0x785f[169]](_0x785f[251],_0x19e8x51[_0x785f[37]]+ 1,_0x19e8x52,_0x19e8x52);_0x19e8x50+= _0x785f[234]});_0x19e8x50+= _0x785f[226];break;case _0x785f[242]:_0x19e8x50= _0x785f[219];_0x19e8x50+= util[_0x785f[169]](_0x785f[230],_0x19e8x51[_0x785f[221]]);_0x19e8x50+= util[_0x785f[169]](_0x785f[252],_0x19e8x51[_0x785f[37]]+ 1);_[_0x785f[196]](_0x19e8x51[_0x785f[231]],function(_0x19e8x52){_0x19e8x50+= util[_0x785f[169]](_0x785f[240],_0x19e8x52,_0x19e8x52)});_0x19e8x50+= _0x785f[241];break};_0x19e8x50+= _0x785f[244];_0x19e8x50+= util[_0x785f[169]](_0x785f[253],_0x19e8x51[_0x785f[37]]+ 1,_0x19e8x51[_0x785f[221]]);return _0x19e8x50}};_0x19e8x4d= Mustache[_0x785f[77]](_0x19e8x4d,_0x19e8x4f);return _0x19e8x28[_0x785f[40]](200)[_0x785f[254]](_0x19e8x4d)})[_0x785f[38]](function(_0x19e8x2a){return _0x19e8x29(_0x19e8x2a)})};exports[_0x785f[255]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){return ChatWebsite[_0x785f[78]](_0x19e8x27[_0x785f[49]][_0x785f[48]],{include:[{model:ChatProactiveAction}]})[_0x785f[41]](function(_0x19e8x2c){if(!_0x19e8x2c){return _0x19e8x28[_0x785f[40]](400)[_0x785f[254]]({})};return _0x19e8x28[_0x785f[40]](200)[_0x785f[254]](_0x19e8x2c.ChatProactiveActions)})[_0x785f[38]](function(_0x19e8x2a){return _0x19e8x29(_0x19e8x2a)})};exports[_0x785f[256]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){return ChatRoom[_0x785f[78]](_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[258]][_0x785f[110]])[_0x785f[41]](function(_0x19e8x34){if(!_0x19e8x34){return _0x19e8x28[_0x785f[40]](400)[_0x785f[254]]({})};if(_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[258]][_0x785f[87]](_0x785f[257])&& _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[258]][_0x785f[87]](_0x785f[127])){return _0x19e8x34[_0x785f[133]]({rating:_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[258]][_0x785f[257]],ratingMessage:_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[258]][_0x785f[127]]})};return})[_0x785f[41]](function(){return _0x19e8x28[_0x785f[40]](200)[_0x785f[254]]({})})[_0x785f[38]](function(_0x19e8x2a){return _0x19e8x28[_0x785f[40]](400)[_0x785f[254]](_0x19e8x2a)})};exports[_0x785f[259]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){var _0x19e8x36=_0x19e8x27[_0x785f[49]][_0x785f[48]];if(_0x19e8x27[_0x785f[101]]&& _0x19e8x27[_0x785f[101]][_0x785f[96]]){if(_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x785f[87]](_0x19e8x36)&& _0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[87]](_0x785f[107])&& _0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[107]]> 0){return ReportChatSession[_0x785f[261]]({where:{visitorid:_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[107]],leaveAt:null}})[_0x785f[41]](function(_0x19e8x54){if(!_0x19e8x54){return};return _0x19e8x54[_0x785f[133]]({abandon:true,leaveAt:moment()[_0x785f[169]](_0x785f[260])})})[_0x785f[41]](function(){return _0x19e8x28[_0x785f[40]](200)[_0x785f[254]]({})})[_0x785f[38]](function(_0x19e8x2a){_0x19e8x28[_0x785f[40]](500)[_0x785f[254]]({})})}};return _0x19e8x28[_0x785f[40]](200)[_0x785f[254]]({})};exports[_0x785f[262]]= function(_0x19e8x27,_0x19e8x28,_0x19e8x29){if(!_0x19e8x27[_0x785f[101]][_0x785f[96]]){_0x19e8x27[_0x785f[101]][_0x785f[96]]= {}};if(!_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x27[_0x785f[49]][_0x785f[48]]]){_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x27[_0x785f[49]][_0x785f[48]]]= {}};var _0x19e8x36=_0x19e8x27[_0x785f[49]][_0x785f[48]];var _0x19e8x55;var _0x19e8x32={};var _0x19e8x56=[];return ChatWebsite[_0x785f[78]](_0x19e8x36)[_0x785f[41]](function(_0x19e8x43){if(!_0x19e8x43){return _0x19e8x28[_0x785f[199]](500)};_0x19e8x55= _0x19e8x43;return _0x19e8x55[_0x785f[272]]({include:[{model:ChatQueue,include:[{model:Agent}]},{model:Agent}]})})[_0x785f[41]](function(_0x19e8x58){_[_0x785f[196]](_0x19e8x58,function(_0x19e8x59){if(_0x19e8x59[_0x785f[266]]=== _0x785f[267]){if(_0x19e8x59[_0x785f[32]][_0x785f[87]](_0x785f[268])&& _0x19e8x59[_0x785f[32]][_0x785f[268]][_0x785f[119]]> 0){_0x19e8x56= _[_0x785f[270]](_[_0x785f[200]](_0x19e8x56,_[_0x785f[269]](_0x19e8x59[_0x785f[32]].Users,_0x785f[48])))}}else {if(_0x19e8x59[_0x785f[266]]=== _0x785f[120]){_0x19e8x56[_0x785f[195]](_0x19e8x59[_0x785f[23]][_0x785f[48]]);_0x19e8x56= _[_0x785f[270]](_0x19e8x56)}}});return Agent[_0x785f[271]]({where:{online:true,id:{$in:_0x19e8x56}}})})[_0x785f[41]](function(_0x19e8x57){if(_0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[114]]){_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[114]]= _0x19e8x27[_0x785f[88]][_0x785f[115]][_0x785f[114]]=== _0x785f[54]?true:false};_0x19e8x32= {success:true,has_session_saf:null,signed_up:_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[110]]?true:false,fullname:_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[116]]|| _0x785f[113],email:_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[117]]|| _0x785f[113],avatar:_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[118]]|| _0x785f[113],open_state:_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[114]]|| _0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[110]]?true:false,online:_0x19e8x57[_0x785f[265]]?true:false,is_unserved:false,room_id:0};if(_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[107]]){return ChatRoom[_0x785f[109]]({where:{ChatVisitorId:_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[107]],status:_0x785f[112],token:{$ne:_0x785f[113]}}})};return})[_0x785f[41]](function(_0x19e8x34){if(_0x19e8x34){_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[110]]= _0x19e8x34[_0x785f[48]];_0x19e8x32[_0x785f[110]]= _0x19e8x34[_0x785f[48]];_0x19e8x32[_0x785f[111]]= true}else {_0x19e8x32[_0x785f[111]]= false};if(_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[107]]){return ChatVisitor[_0x785f[109]]({where:{id:_0x19e8x27[_0x785f[101]][_0x785f[96]][_0x19e8x36][_0x785f[107]],status:_0x785f[108]}})};return})[_0x785f[41]](function(_0x19e8x33){if(_0x19e8x33){_0x19e8x32[_0x785f[102]]= true};return _0x19e8x28[_0x785f[40]](200)[_0x785f[254]](_0x19e8x32)})[_0x785f[38]](function(_0x19e8x2a){console[_0x785f[264]](_0x785f[263],_0x19e8x2a);return _0x19e8x28[_0x785f[40]](500)[_0x785f[254]]({})})} \ No newline at end of file +'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 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 + }] + }); + }) + .then(function(chatApplications) { + _.forEach(chatApplications, function(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({}); + }); +} diff --git a/server/api/zendesk_account/index.js b/server/api/zendesk_account/index.js index 7c75281..46ca688 100644 --- a/server/api/zendesk_account/index.js +++ b/server/api/zendesk_account/index.js @@ -1 +1,28 @@ -var _0x4642=["\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"];_0x4642[0];var express=require(_0x4642[1]);var auth=require(_0x4642[2]);var controller=require(_0x4642[3]);var router=express.Router();router[_0x4642[9]](_0x4642[4],auth[_0x4642[5]](),auth[_0x4642[7]]([19,13],[_0x4642[6]]),controller[_0x4642[8]]);router[_0x4642[9]](_0x4642[10],auth[_0x4642[5]](),auth[_0x4642[7]]([19],[_0x4642[6]]),controller[_0x4642[11]]);router[_0x4642[9]](_0x4642[12],auth[_0x4642[5]](),auth[_0x4642[7]]([19],[_0x4642[6]]),controller[_0x4642[13]]);router[_0x4642[9]](_0x4642[14],auth[_0x4642[5]](),auth[_0x4642[7]]([19],[_0x4642[6]]),controller[_0x4642[15]]);router[_0x4642[9]](_0x4642[16],auth[_0x4642[5]](),auth[_0x4642[7]]([19],[_0x4642[6]]),controller[_0x4642[17]]);router[_0x4642[9]](_0x4642[18],auth[_0x4642[5]](),auth[_0x4642[7]]([19],[_0x4642[6]]),controller[_0x4642[19]]);router[_0x4642[22]](_0x4642[20],auth[_0x4642[5]](),auth[_0x4642[7]]([19],[_0x4642[6]]),controller[_0x4642[21]]);router[_0x4642[22]](_0x4642[4],auth[_0x4642[5]](),auth[_0x4642[7]]([19],[_0x4642[6]]),controller[_0x4642[23]]);router[_0x4642[22]](_0x4642[16],auth[_0x4642[5]](),auth[_0x4642[7]]([19],[_0x4642[6]]),controller[_0x4642[24]]);router[_0x4642[22]](_0x4642[25],auth[_0x4642[5]](),auth[_0x4642[7]]([19],[_0x4642[6]]),controller[_0x4642[26]]);router[_0x4642[28]](_0x4642[10],auth[_0x4642[5]](),auth[_0x4642[7]]([19],[_0x4642[6]]),controller[_0x4642[27]]);router[_0x4642[28]](_0x4642[29],auth[_0x4642[5]](),auth[_0x4642[7]]([19],[_0x4642[6]]),controller[_0x4642[30]]);router[_0x4642[28]](_0x4642[31],auth[_0x4642[5]](),auth[_0x4642[7]]([19],[_0x4642[6]]),controller[_0x4642[32]]);router[_0x4642[34]](_0x4642[4],auth[_0x4642[5]](),auth[_0x4642[7]]([19],[_0x4642[6]]),controller[_0x4642[33]]);router[_0x4642[34]](_0x4642[10],auth[_0x4642[5]](),auth[_0x4642[7]]([19],[_0x4642[6]]),controller[_0x4642[35]]);router[_0x4642[34]](_0x4642[16],auth[_0x4642[5]](),auth[_0x4642[7]]([19],[_0x4642[6]]),controller[_0x4642[36]]);router[_0x4642[34]](_0x4642[18],auth[_0x4642[5]](),auth[_0x4642[7]]([19],[_0x4642[6]]),controller[_0x4642[37]]);router[_0x4642[34]](_0x4642[31],auth[_0x4642[5]](),auth[_0x4642[7]]([19],[_0x4642[6]]),controller[_0x4642[38]]);module[_0x4642[39]]= router \ No newline at end of file +'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; diff --git a/server/api/zendesk_account/zendesk_account.controller.js b/server/api/zendesk_account/zendesk_account.controller.js index e2a22f8..22ceb99 100644 --- a/server/api/zendesk_account/zendesk_account.controller.js +++ b/server/api/zendesk_account/zendesk_account.controller.js @@ -1 +1,515 @@ -var _0x38ff=["\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"];_0x38ff[0];var _=require(_0x38ff[1]);var Util=require(_0x38ff[2]);var zendesk=require(_0x38ff[3]);var ZendeskAccount=require(_0x38ff[5])[_0x38ff[4]];var ZendeskConfiguration=require(_0x38ff[5])[_0x38ff[6]];var ZendeskField=require(_0x38ff[5])[_0x38ff[7]];function handleError(_0x5e1fx8,_0x5e1fx9){_0x5e1fx9= _0x5e1fx9|| 500;return function(_0x5e1fxa){_0x5e1fx8[_0x38ff[9]](_0x5e1fx9)[_0x38ff[8]](_0x5e1fxa)}}function responseWithResult(_0x5e1fx8,_0x5e1fx9){_0x5e1fx9= _0x5e1fx9|| 200;return function(_0x5e1fxc){if(_0x5e1fxc){_0x5e1fx8[_0x38ff[9]](_0x5e1fx9)[_0x38ff[10]](_0x5e1fxc)}}}function responseWithoutResult(_0x5e1fx8,_0x5e1fx9){_0x5e1fx9= _0x5e1fx9|| 200;return function(){_0x5e1fx8[_0x38ff[11]](_0x5e1fx9)}}function handleEntityNotFound(_0x5e1fx8){return function(_0x5e1fxc){if(!_0x5e1fxc){_0x5e1fx8[_0x38ff[9]](404)[_0x38ff[12]]();return null};return _0x5e1fxc}}function saveUpdates(_0x5e1fx10){return function(_0x5e1fxc){return _0x5e1fxc[_0x38ff[14]](_0x5e1fx10)[_0x38ff[13]](function(_0x5e1fx11){return _0x5e1fx11})}}function removeEntity(_0x5e1fx8){return function(_0x5e1fxc){if(_0x5e1fxc){return _0x5e1fxc[_0x38ff[15]]()[_0x38ff[13]](function(){_0x5e1fx8[_0x38ff[9]](204)[_0x38ff[12]]()})}}}exports[_0x38ff[16]]= function(_0x5e1fx13,_0x5e1fx8,_0x5e1fx14){return ZendeskAccount[_0x38ff[23]](_0x38ff[22])[_0x38ff[21]](_[_0x38ff[20]](Util[_0x38ff[19]](_0x5e1fx13[_0x38ff[18]]),{distinct:true}))[_0x38ff[13]](responseWithResult(_0x5e1fx8))[_0x38ff[17]](handleError(_0x5e1fx8))};exports[_0x38ff[24]]= function(_0x5e1fx13,_0x5e1fx8){return ZendeskAccount[_0x38ff[27]](_0x5e1fx13[_0x38ff[26]][_0x38ff[25]])[_0x38ff[13]](handleEntityNotFound(_0x5e1fx8))[_0x38ff[13]](responseWithResult(_0x5e1fx8))[_0x38ff[17]](handleError(_0x5e1fx8))};exports[_0x38ff[28]]= function(_0x5e1fx13,_0x5e1fx8){return ZendeskAccount[_0x38ff[28]](_0x5e1fx13[_0x38ff[29]])[_0x38ff[13]](responseWithResult(_0x5e1fx8,201))[_0x38ff[17]](handleError(_0x5e1fx8))};exports[_0x38ff[30]]= function(_0x5e1fx13,_0x5e1fx8){if(_0x5e1fx13[_0x38ff[29]][_0x38ff[25]]){delete _0x5e1fx13[_0x38ff[29]][_0x38ff[25]]};return ZendeskAccount[_0x38ff[27]](_0x5e1fx13[_0x38ff[26]][_0x38ff[25]])[_0x38ff[13]](handleEntityNotFound(_0x5e1fx8))[_0x38ff[13]](saveUpdates(_0x5e1fx13[_0x38ff[29]]))[_0x38ff[13]](responseWithResult(_0x5e1fx8))[_0x38ff[17]](handleError(_0x5e1fx8))};exports[_0x38ff[15]]= function(_0x5e1fx13,_0x5e1fx8){return ZendeskAccount[_0x38ff[27]](_0x5e1fx13[_0x38ff[26]][_0x38ff[25]])[_0x38ff[13]](handleEntityNotFound(_0x5e1fx8))[_0x38ff[13]](removeEntity(_0x5e1fx8))[_0x38ff[17]](handleError(_0x5e1fx8))};exports[_0x38ff[31]]= function(_0x5e1fx13,_0x5e1fx8){return ZendeskAccount[_0x38ff[15]]({where:{id:_0x5e1fx13[_0x38ff[18]][_0x38ff[32]]},individualHooks:true})[_0x38ff[13]](responseWithResult(_0x5e1fx8,204))[_0x38ff[17]](handleError(_0x5e1fx8))};exports[_0x38ff[33]]= function(_0x5e1fx13,_0x5e1fx8){var _0x5e1fx15={};_0x5e1fx15[_0x5e1fx13[_0x38ff[26]][_0x38ff[34]]]= _0x5e1fx13[_0x38ff[29]][_0x38ff[35]];return ZendeskAccount[_0x38ff[21]]({where:_0x5e1fx15})[_0x38ff[13]](function(_0x5e1fx16){if(_0x5e1fx16[_0x38ff[36]]){return _0x5e1fx8[_0x38ff[9]](200)[_0x38ff[8]]({isValid:false,value:_0x5e1fx13[_0x38ff[29]][_0x38ff[35]]})};return _0x5e1fx8[_0x38ff[9]](200)[_0x38ff[8]]({isValid:true,value:_0x5e1fx13[_0x38ff[29]][_0x38ff[35]]})})[_0x38ff[17]](handleError(_0x5e1fx8))};exports[_0x38ff[37]]= function(_0x5e1fx13,_0x5e1fx8){return ZendeskAccount[_0x38ff[27]](_0x5e1fx13[_0x38ff[26]][_0x38ff[25]])[_0x38ff[13]](function(_0x5e1fx17){var _0x5e1fx18={username:_0x5e1fx17[_0x38ff[38]],remoteUri:_0x5e1fx17[_0x38ff[39]]};if(_0x5e1fx17[_0x38ff[40]]=== _0x38ff[41]){_0x5e1fx18[_0x38ff[41]]= _0x5e1fx17[_0x38ff[41]]}else {if(_0x5e1fx17[_0x38ff[40]]=== _0x38ff[42]){_0x5e1fx18[_0x38ff[42]]= _0x5e1fx17[_0x38ff[42]]}};var _0x5e1fx19=zendesk[_0x38ff[43]](_0x5e1fx18);_0x5e1fx19[_0x38ff[47]][_0x38ff[46]](function(_0x5e1fxa,_0x5e1fx1a,_0x5e1fx16){if(_0x5e1fxa){console[_0x38ff[44]](_0x5e1fxa);return handleError(_0x5e1fx8,_0x5e1fxa)};if(!_0x5e1fx16[_0x38ff[45]]){return _0x5e1fx8[_0x38ff[11]](500)};return _0x5e1fx8[_0x38ff[11]](204)})})[_0x38ff[17]](handleError(_0x5e1fx8))};exports[_0x38ff[48]]= function(_0x5e1fx13,_0x5e1fx8){return ZendeskAccount[_0x38ff[27]](_0x5e1fx13[_0x38ff[26]][_0x38ff[25]])[_0x38ff[13]](function(_0x5e1fx17){var _0x5e1fx18={username:_0x5e1fx17[_0x38ff[38]],remoteUri:_0x5e1fx17[_0x38ff[39]]};if(_0x5e1fx17[_0x38ff[40]]=== _0x38ff[41]){_0x5e1fx18[_0x38ff[41]]= _0x5e1fx17[_0x38ff[41]]}else {if(_0x5e1fx17[_0x38ff[40]]=== _0x38ff[42]){_0x5e1fx18[_0x38ff[42]]= _0x5e1fx17[_0x38ff[42]]}};var _0x5e1fx19=zendesk[_0x38ff[43]](_0x5e1fx18);_0x5e1fx19[_0x38ff[50]][_0x38ff[49]](function(_0x5e1fxa,_0x5e1fx1a,_0x5e1fx16){if(_0x5e1fxa){console[_0x38ff[44]](_0x5e1fxa);return handleError(_0x5e1fx8,_0x5e1fxa)};return _0x5e1fx8[_0x38ff[9]](200)[_0x38ff[8]](_0x5e1fx16)})})[_0x38ff[17]](handleError(_0x5e1fx8))};exports[_0x38ff[51]]= function(_0x5e1fx13,_0x5e1fx8){return ZendeskConfiguration[_0x38ff[23]]({method:[_0x38ff[52],_0x5e1fx13[_0x38ff[26]][_0x38ff[25]]]})[_0x38ff[21]](_[_0x38ff[20]](Util[_0x38ff[19]](_0x5e1fx13[_0x38ff[18]]),{distinct:true}))[_0x38ff[13]](responseWithResult(_0x5e1fx8))[_0x38ff[17]](handleError(_0x5e1fx8))};exports[_0x38ff[53]]= function(_0x5e1fx13,_0x5e1fx8){return ZendeskConfiguration[_0x38ff[23]]({method:[_0x38ff[52],_0x5e1fx13[_0x38ff[26]][_0x38ff[25]]]})[_0x38ff[27]](_0x5e1fx13[_0x38ff[26]][_0x38ff[54]])[_0x38ff[13]](handleEntityNotFound(_0x5e1fx8))[_0x38ff[13]](responseWithResult(_0x5e1fx8))[_0x38ff[17]](handleError(_0x5e1fx8))};exports[_0x38ff[55]]= function(_0x5e1fx13,_0x5e1fx8){return ZendeskConfiguration[_0x38ff[23]]({method:[_0x38ff[52],_0x5e1fx13[_0x38ff[26]][_0x38ff[25]]]})[_0x38ff[27]](_0x5e1fx13[_0x38ff[26]][_0x38ff[54]])[_0x38ff[13]](handleEntityNotFound(_0x5e1fx8))[_0x38ff[13]](removeEntity(_0x5e1fx8))[_0x38ff[17]](handleError(_0x5e1fx8))};exports[_0x38ff[56]]= function(_0x5e1fx13,_0x5e1fx8){return ZendeskConfiguration[_0x38ff[15]]({where:{id:_0x5e1fx13[_0x38ff[18]][_0x38ff[32]]},individualHooks:true})[_0x38ff[13]](responseWithResult(_0x5e1fx8,204))[_0x38ff[17]](handleError(_0x5e1fx8))};exports[_0x38ff[57]]= function(_0x5e1fx13,_0x5e1fx8){_0x5e1fx13[_0x38ff[29]][_0x38ff[58]]= _0x5e1fx13[_0x38ff[26]][_0x38ff[25]];switch(_0x5e1fx13[_0x38ff[29]][_0x38ff[107]]){case _0x38ff[105]:if(_0x5e1fx13[_0x38ff[29]][_0x38ff[59]]=== _0x38ff[60]){_0x5e1fx13[_0x38ff[29]][_0x38ff[61]]= [{"\x74\x79\x70\x65":_0x38ff[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[63],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0x38ff[64],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[66]},{"\x74\x79\x70\x65":_0x38ff[64],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[67]}];_0x5e1fx13[_0x38ff[29]][_0x38ff[68]]= [{"\x74\x79\x70\x65":_0x38ff[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[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":_0x38ff[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x6B\x65\x79":_0x38ff[71],"\x6B\x65\x79\x54\x79\x70\x65":_0x38ff[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[67]},{"\x74\x79\x70\x65":_0x38ff[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x6B\x65\x79":_0x38ff[72],"\x6B\x65\x79\x54\x79\x70\x65":_0x38ff[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[73]},{"\x74\x79\x70\x65":_0x38ff[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x6B\x65\x79":_0x38ff[74],"\x6B\x65\x79\x54\x79\x70\x65":_0x38ff[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[75]},{"\x74\x79\x70\x65":_0x38ff[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x6B\x65\x79":_0x38ff[60],"\x6B\x65\x79\x54\x79\x70\x65":_0x38ff[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[66]},{"\x74\x79\x70\x65":_0x38ff[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x6B\x65\x79":_0x38ff[76],"\x6B\x65\x79\x54\x79\x70\x65":_0x38ff[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[77]},{"\x74\x79\x70\x65":_0x38ff[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x6B\x65\x79":_0x38ff[78],"\x6B\x65\x79\x54\x79\x70\x65":_0x38ff[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[79]},{"\x74\x79\x70\x65":_0x38ff[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[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":_0x38ff[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x6B\x65\x79":_0x38ff[81],"\x6B\x65\x79\x54\x79\x70\x65":_0x38ff[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[82]},{"\x74\x79\x70\x65":_0x38ff[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x6B\x65\x79":_0x38ff[83],"\x6B\x65\x79\x54\x79\x70\x65":_0x38ff[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[84]},{"\x74\x79\x70\x65":_0x38ff[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[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":_0x38ff[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x6B\x65\x79":_0x38ff[86],"\x6B\x65\x79\x54\x79\x70\x65":_0x38ff[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[79]},{"\x74\x79\x70\x65":_0x38ff[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x6B\x65\x79":_0x38ff[87],"\x6B\x65\x79\x54\x79\x70\x65":_0x38ff[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[88]},{"\x74\x79\x70\x65":_0x38ff[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x6B\x65\x79":_0x38ff[89],"\x6B\x65\x79\x54\x79\x70\x65":_0x38ff[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[90]},{"\x74\x79\x70\x65":_0x38ff[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x6B\x65\x79":_0x38ff[91],"\x6B\x65\x79\x54\x79\x70\x65":_0x38ff[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[92]},{"\x74\x79\x70\x65":_0x38ff[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x6B\x65\x79":_0x38ff[93],"\x6B\x65\x79\x54\x79\x70\x65":_0x38ff[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[94]}]}else {if(_0x5e1fx13[_0x38ff[29]][_0x38ff[59]]=== _0x38ff[95]){_0x5e1fx13[_0x38ff[29]][_0x38ff[61]]= [{"\x74\x79\x70\x65":_0x38ff[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[63],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0x38ff[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[96],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0x38ff[64],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[84]}];_0x5e1fx13[_0x38ff[29]][_0x38ff[68]]= [{"\x74\x79\x70\x65":_0x38ff[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[69],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0x38ff[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x6B\x65\x79":_0x38ff[97],"\x6B\x65\x79\x54\x79\x70\x65":_0x38ff[64],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[84]},{"\x74\x79\x70\x65":_0x38ff[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x6B\x65\x79":_0x38ff[98],"\x6B\x65\x79\x54\x79\x70\x65":_0x38ff[64],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[99]},{"\x74\x79\x70\x65":_0x38ff[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x6B\x65\x79":_0x38ff[76],"\x6B\x65\x79\x54\x79\x70\x65":_0x38ff[64],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[77]},{"\x74\x79\x70\x65":_0x38ff[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x6B\x65\x79":_0x38ff[78],"\x6B\x65\x79\x54\x79\x70\x65":_0x38ff[64],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[100]},{"\x74\x79\x70\x65":_0x38ff[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[85]},{"\x74\x79\x70\x65":_0x38ff[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x6B\x65\x79":_0x38ff[101],"\x6B\x65\x79\x54\x79\x70\x65":_0x38ff[64],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[102]},{"\x74\x79\x70\x65":_0x38ff[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x6B\x65\x79":_0x38ff[103],"\x6B\x65\x79\x54\x79\x70\x65":_0x38ff[64],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0x38ff[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x38ff[104]}]}};break;default:console[_0x38ff[108]](_0x38ff[106],_0x5e1fx13[_0x38ff[29]][_0x38ff[107]])};delete _0x5e1fx13[_0x38ff[29]][_0x38ff[107]];delete _0x5e1fx13[_0x38ff[29]][_0x38ff[59]];return ZendeskConfiguration[_0x38ff[28]](_0x5e1fx13[_0x38ff[29]],{include:[{model:ZendeskField,as:_0x38ff[61]},{model:ZendeskField,as:_0x38ff[68]}]})[_0x38ff[13]](responseWithResult(_0x5e1fx8,201))[_0x38ff[17]](handleError(_0x5e1fx8))};exports[_0x38ff[109]]= function(_0x5e1fx13,_0x5e1fx8){return ZendeskConfiguration[_0x38ff[23]]({method:[_0x38ff[52],_0x5e1fx13[_0x38ff[26]][_0x38ff[25]]]})[_0x38ff[27]](_0x5e1fx13[_0x38ff[26]][_0x38ff[54]])[_0x38ff[13]](handleEntityNotFound(_0x5e1fx8))[_0x38ff[13]](function(_0x5e1fx1b){switch(_0x5e1fx13[_0x38ff[26]][_0x38ff[59]]){case _0x38ff[111]:_0x5e1fx13[_0x38ff[29]][_0x38ff[110]]= _0x5e1fx13[_0x38ff[26]][_0x38ff[54]];break;case _0x38ff[113]:_0x5e1fx13[_0x38ff[29]][_0x38ff[112]]= _0x5e1fx13[_0x38ff[26]][_0x38ff[54]];break;case _0x38ff[34]:_0x5e1fx13[_0x38ff[29]][_0x38ff[114]]= _0x5e1fx13[_0x38ff[26]][_0x38ff[54]];break};return ZendeskField[_0x38ff[28]](_0x5e1fx13[_0x38ff[29]])})[_0x38ff[13]](responseWithResult(_0x5e1fx8,201))[_0x38ff[17]](handleError(_0x5e1fx8))};exports[_0x38ff[115]]= function(_0x5e1fx13,_0x5e1fx8){if(_0x5e1fx13[_0x38ff[29]][_0x38ff[25]]){delete _0x5e1fx13[_0x38ff[29]][_0x38ff[25]]};return ZendeskField[_0x38ff[27]](_0x5e1fx13[_0x38ff[26]][_0x38ff[116]])[_0x38ff[13]](handleEntityNotFound(_0x5e1fx8))[_0x38ff[13]](saveUpdates(_0x5e1fx13[_0x38ff[29]]))[_0x38ff[13]](responseWithResult(_0x5e1fx8))[_0x38ff[17]](handleError(_0x5e1fx8))};exports[_0x38ff[117]]= function(_0x5e1fx13,_0x5e1fx8){return ZendeskField[_0x38ff[27]](_0x5e1fx13[_0x38ff[26]][_0x38ff[116]])[_0x38ff[13]](handleEntityNotFound(_0x5e1fx8))[_0x38ff[13]](removeEntity(_0x5e1fx8))[_0x38ff[17]](handleError(_0x5e1fx8))};exports[_0x38ff[118]]= function(_0x5e1fx13,_0x5e1fx8,_0x5e1fx14){return ZendeskConfiguration[_0x38ff[27]](_0x5e1fx13[_0x38ff[26]][_0x38ff[54]])[_0x38ff[13]](handleEntityNotFound(_0x5e1fx8))[_0x38ff[13]](function(_0x5e1fx1b){return _0x5e1fx1b[_0x38ff[119]](_0x5e1fx13[_0x38ff[29]])})[_0x38ff[13]](responseWithoutResult(_0x5e1fx8,200))[_0x38ff[17]](function(_0x5e1fxa){console[_0x38ff[44]](_0x5e1fxa);return handleError(_0x5e1fx8,_0x5e1fxa)})} \ No newline at end of file +'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); + }); +}; diff --git a/server/api/zendesk_account/zendesk_account.events.js b/server/api/zendesk_account/zendesk_account.events.js index 7cbdba3..cf5855e 100644 --- a/server/api/zendesk_account/zendesk_account.events.js +++ b/server/api/zendesk_account/zendesk_account.events.js @@ -1 +1,36 @@ -var _0x26d3=["\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"];_0x26d3[0];const EventEmitter=require(_0x26d3[1]);const ZendeskAccount=require(_0x26d3[3])[_0x26d3[2]];var ZendeskAccountEvents= new EventEmitter();ZendeskAccountEvents[_0x26d3[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x26d3[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x26d3[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x26d3[6]};for(var e in events){var event=events[e];ZendeskAccount[_0x26d3[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x7e6bx8,_0x7e6bx9,_0x7e6bxa){ZendeskAccountEvents[_0x26d3[10]](event+ _0x26d3[8]+ _0x7e6bx8[_0x26d3[9]],_0x7e6bx8);ZendeskAccountEvents[_0x26d3[10]](event,_0x7e6bx8);_0x7e6bxa(null)}}module[_0x26d3[11]]= ZendeskAccountEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/zendesk_account/zendesk_account.socket.js b/server/api/zendesk_account/zendesk_account.socket.js index 1ba32de..c2f0be2 100644 --- a/server/api/zendesk_account/zendesk_account.socket.js +++ b/server/api/zendesk_account/zendesk_account.socket.js @@ -1 +1,32 @@ -var _0x2ae1=["\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"];_0x2ae1[0];const ZendeskAccountEvents=require(_0x2ae1[1]);var events=[_0x2ae1[2],_0x2ae1[3]];exports[_0x2ae1[4]]= function(_0x7219x3){for(var _0x7219x4=0,_0x7219x5=events[_0x2ae1[5]];_0x7219x4< _0x7219x5;_0x7219x4++){var _0x7219x6=events[_0x7219x4];var _0x7219x7=createListener(_0x2ae1[6]+ _0x7219x6,_0x7219x3);ZendeskAccountEvents[_0x2ae1[7]](_0x7219x6,_0x7219x7);_0x7219x3[_0x2ae1[7]](_0x2ae1[8],removeListener(_0x7219x6,_0x7219x7))}};function createListener(_0x7219x6,_0x7219x3){return function(_0x7219x9){_0x7219x3[_0x2ae1[9]](_0x7219x6,_0x7219x9)}}function removeListener(_0x7219x6,_0x7219x7){return function(){ZendeskAccountEvents[_0x2ae1[10]](_0x7219x6,_0x7219x7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/zendesk_configuration/index.js b/server/api/zendesk_configuration/index.js index 291a783..f91b034 100644 --- a/server/api/zendesk_configuration/index.js +++ b/server/api/zendesk_configuration/index.js @@ -1 +1,16 @@ -var _0xa9f0=["\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"];_0xa9f0[0];var express=require(_0xa9f0[1]);var controller=require(_0xa9f0[2]);var auth=require(_0xa9f0[3]);var router=express.Router();router[_0xa9f0[9]](_0xa9f0[4],auth[_0xa9f0[5]](),auth[_0xa9f0[7]]([19],[_0xa9f0[6]]),controller[_0xa9f0[8]]);router[_0xa9f0[9]](_0xa9f0[10],auth[_0xa9f0[5]](),auth[_0xa9f0[7]]([19],[_0xa9f0[6]]),controller[_0xa9f0[11]]);router[_0xa9f0[13]](_0xa9f0[4],auth[_0xa9f0[5]](),auth[_0xa9f0[7]]([19],[_0xa9f0[6]]),controller[_0xa9f0[12]]);router[_0xa9f0[15]](_0xa9f0[10],auth[_0xa9f0[5]](),auth[_0xa9f0[7]]([19],[_0xa9f0[6]]),controller[_0xa9f0[14]]);router[_0xa9f0[13]](_0xa9f0[16],auth[_0xa9f0[5]](),auth[_0xa9f0[7]]([19],[_0xa9f0[6]]),controller[_0xa9f0[17]]);router[_0xa9f0[13]](_0xa9f0[18],auth[_0xa9f0[5]](),auth[_0xa9f0[7]]([19],[_0xa9f0[6]]),controller[_0xa9f0[19]]);router[_0xa9f0[21]](_0xa9f0[10],auth[_0xa9f0[5]](),auth[_0xa9f0[7]]([19],[_0xa9f0[6]]),controller[_0xa9f0[20]]);module[_0xa9f0[22]]= router \ No newline at end of file +'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; diff --git a/server/api/zendesk_configuration/zendesk_configuration.controller.js b/server/api/zendesk_configuration/zendesk_configuration.controller.js index 9150b49..e299424 100644 --- a/server/api/zendesk_configuration/zendesk_configuration.controller.js +++ b/server/api/zendesk_configuration/zendesk_configuration.controller.js @@ -1 +1,181 @@ -var _0x85f8=["\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"];_0x85f8[0];var _=require(_0x85f8[1]);var ZendeskConfiguration=require(_0x85f8[3])[_0x85f8[2]];var ZendeskField=require(_0x85f8[3])[_0x85f8[4]];exports[_0x85f8[5]]= function(_0x364bx4,_0x364bx5){ZendeskConfiguration[_0x85f8[11]]({where:_0x364bx4[_0x85f8[10]]})[_0x85f8[9]](function(_0x364bx7){return _0x364bx5[_0x85f8[8]](200)[_0x85f8[7]](_0x364bx7)})[_0x85f8[6]](function(_0x364bx6){return handleError(_0x364bx5,_0x364bx6)})};exports[_0x85f8[12]]= function(_0x364bx4,_0x364bx5){ZendeskConfiguration[_0x85f8[16]]({where:{id:_0x364bx4[_0x85f8[15]][_0x85f8[14]]},include:[{all:true}]})[_0x85f8[9]](function(_0x364bx8){if(!_0x364bx8){return _0x364bx5[_0x85f8[13]](404)};return _0x364bx5[_0x85f8[7]](_0x364bx8)})[_0x85f8[6]](function(_0x364bx6){return handleError(_0x364bx5,_0x364bx6)})};exports[_0x85f8[17]]= function(_0x364bx4,_0x364bx5){ZendeskConfiguration[_0x85f8[17]](_0x364bx4[_0x85f8[18]])[_0x85f8[9]](function(_0x364bx8){return _0x364bx5[_0x85f8[8]](201)[_0x85f8[7]](_0x364bx8)})[_0x85f8[6]](function(_0x364bx6){return handleError(_0x364bx5,_0x364bx6)})};exports[_0x85f8[19]]= function(_0x364bx4,_0x364bx5){if(_0x364bx4[_0x85f8[18]][_0x85f8[14]]){delete _0x364bx4[_0x85f8[18]][_0x85f8[14]]};ZendeskConfiguration[_0x85f8[22]](_0x364bx4[_0x85f8[15]][_0x85f8[14]])[_0x85f8[9]](function(_0x364bx8){if(!_0x364bx8){return _0x364bx5[_0x85f8[13]](404)};var _0x364bx9=_[_0x85f8[20]](_0x364bx8,_0x364bx4[_0x85f8[18]]);_0x364bx9[_0x85f8[21]]()[_0x85f8[9]](function(){return _0x364bx5[_0x85f8[8]](200)[_0x85f8[7]](_0x364bx8)})[_0x85f8[6]](function(_0x364bx6){return handleError(_0x364bx5,_0x364bx6)})})[_0x85f8[6]](function(_0x364bx6){return handleError(_0x364bx5,_0x364bx6)})};exports[_0x85f8[23]]= function(_0x364bx4,_0x364bx5){ZendeskConfiguration[_0x85f8[22]](_0x364bx4[_0x85f8[15]][_0x85f8[14]])[_0x85f8[9]](function(_0x364bx8){if(!_0x364bx8){return _0x364bx5[_0x85f8[13]](404)};_0x364bx8[_0x85f8[23]]()[_0x85f8[9]](function(){return _0x364bx5[_0x85f8[13]](204)})[_0x85f8[6]](function(_0x364bx6){return handleError(_0x364bx5,_0x364bx6)})})[_0x85f8[6]](function(_0x364bx6){return handleError(_0x364bx5,_0x364bx6)})};exports[_0x85f8[24]]= function(_0x364bx4,_0x364bx5,_0x364bxa){ZendeskConfiguration[_0x85f8[22]](_0x364bx4[_0x85f8[15]][_0x85f8[14]])[_0x85f8[9]](function(_0x364bxb){if(!_0x364bxb){return _0x364bx5[_0x85f8[13]](500)};ZendeskField[_0x85f8[17]](_0x364bx4[_0x85f8[18]])[_0x85f8[9]](function(_0x364bxc){switch(_0x364bx4[_0x85f8[15]][_0x85f8[31]]){case _0x85f8[26]:_0x364bxb[_0x85f8[25]](_0x364bxc)[_0x85f8[9]](function(){return _0x364bx5[_0x85f8[8]](200)[_0x85f8[7]](_0x364bxc)})[_0x85f8[6]](function(_0x364bx6){return handleError(_0x364bx5,_0x364bx6)});break;case _0x85f8[28]:_0x364bxb[_0x85f8[27]](_0x364bxc)[_0x85f8[9]](function(){return _0x364bx5[_0x85f8[8]](200)[_0x85f8[7]](_0x364bxc)})[_0x85f8[6]](function(_0x364bx6){return handleError(_0x364bx5,_0x364bx6)});break;case _0x85f8[30]:_0x364bxb[_0x85f8[29]](_0x364bxc)[_0x85f8[9]](function(){return _0x364bx5[_0x85f8[8]](200)[_0x85f8[7]](_0x364bxc)})[_0x85f8[6]](function(_0x364bx6){return handleError(_0x364bx5,_0x364bx6)});break}})[_0x85f8[6]](function(_0x364bx6){return handleError(_0x364bx5,_0x364bx6)})})[_0x85f8[6]](function(_0x364bx6){return handleError(_0x364bx5,_0x364bx6)})};exports[_0x85f8[32]]= function(_0x364bx4,_0x364bx5,_0x364bxa){ZendeskConfiguration[_0x85f8[22]](_0x364bx4[_0x85f8[15]][_0x85f8[14]])[_0x85f8[9]](handleEntityNotFound(_0x364bx5))[_0x85f8[9]](function(_0x364bxb){return _0x364bxb[_0x85f8[34]](_0x364bx4[_0x85f8[18]])})[_0x85f8[9]](function(_0x364bxd){return _0x364bx5[_0x85f8[13]](200)})[_0x85f8[6]](function(_0x364bx6){console[_0x85f8[33]](_0x364bx6);return handleError(_0x364bx5,_0x364bx6)})};function handleEntityNotFound(_0x364bx5){return function(_0x364bxf){if(!_0x364bxf){_0x364bx5[_0x85f8[8]](404)[_0x85f8[35]]();return null};return _0x364bxf}}function handleError(_0x364bx5,_0x364bx6){return _0x364bx5[_0x85f8[8]](500)[_0x85f8[7]](_0x364bx6)} \ No newline at end of file +'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); +} diff --git a/server/api/zendesk_configuration/zendesk_configuration.events.js b/server/api/zendesk_configuration/zendesk_configuration.events.js index e64bbc5..f745627 100644 --- a/server/api/zendesk_configuration/zendesk_configuration.events.js +++ b/server/api/zendesk_configuration/zendesk_configuration.events.js @@ -1 +1,36 @@ -var _0x3432=["\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"];_0x3432[0];const EventEmitter=require(_0x3432[1]);const ZendeskConfiguration=require(_0x3432[3])[_0x3432[2]];var ZendeskConfigurationEvents= new EventEmitter();ZendeskConfigurationEvents[_0x3432[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x3432[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x3432[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x3432[6]};for(var e in events){var event=events[e];ZendeskConfiguration[_0x3432[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xa0f5x8,_0xa0f5x9,_0xa0f5xa){ZendeskConfigurationEvents[_0x3432[10]](event+ _0x3432[8]+ _0xa0f5x8[_0x3432[9]],_0xa0f5x8);ZendeskConfigurationEvents[_0x3432[10]](event,_0xa0f5x8);_0xa0f5xa(null)}}module[_0x3432[11]]= ZendeskConfigurationEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/zendesk_configuration/zendesk_configuration.socket.js b/server/api/zendesk_configuration/zendesk_configuration.socket.js index 2f08c05..e6e6b68 100644 --- a/server/api/zendesk_configuration/zendesk_configuration.socket.js +++ b/server/api/zendesk_configuration/zendesk_configuration.socket.js @@ -1 +1,32 @@ -var _0xd40a=["\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"];_0xd40a[0];const ZendeskConfigurationEvents=require(_0xd40a[1]);var events=[_0xd40a[2],_0xd40a[3]];exports[_0xd40a[4]]= function(_0x63afx3){for(var _0x63afx4=0,_0x63afx5=events[_0xd40a[5]];_0x63afx4< _0x63afx5;_0x63afx4++){var _0x63afx6=events[_0x63afx4];var _0x63afx7=createListener(_0xd40a[6]+ _0x63afx6,_0x63afx3);ZendeskConfigurationEvents[_0xd40a[7]](_0x63afx6,_0x63afx7);_0x63afx3[_0xd40a[7]](_0xd40a[8],removeListener(_0x63afx6,_0x63afx7))}};function createListener(_0x63afx6,_0x63afx3){return function(_0x63afx9){_0x63afx3[_0xd40a[9]](_0x63afx6,_0x63afx9)}}function removeListener(_0x63afx6,_0x63afx7){return function(){ZendeskConfigurationEvents[_0xd40a[10]](_0x63afx6,_0x63afx7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/api/zendesk_field/index.js b/server/api/zendesk_field/index.js index 4f6d72d..e84b58d 100644 --- a/server/api/zendesk_field/index.js +++ b/server/api/zendesk_field/index.js @@ -1 +1,14 @@ -var _0x45fa=["\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"];_0x45fa[0];var express=require(_0x45fa[1]);var controller=require(_0x45fa[2]);var auth=require(_0x45fa[3]);var router=express.Router();router[_0x45fa[9]](_0x45fa[4],auth[_0x45fa[5]](),auth[_0x45fa[7]]([19],[_0x45fa[6]]),controller[_0x45fa[8]]);router[_0x45fa[9]](_0x45fa[10],auth[_0x45fa[5]](),auth[_0x45fa[7]]([19],[_0x45fa[6]]),controller[_0x45fa[11]]);router[_0x45fa[13]](_0x45fa[4],auth[_0x45fa[5]](),auth[_0x45fa[7]]([19],[_0x45fa[6]]),controller[_0x45fa[12]]);router[_0x45fa[15]](_0x45fa[10],auth[_0x45fa[5]](),auth[_0x45fa[7]]([19],[_0x45fa[6]]),controller[_0x45fa[14]]);router[_0x45fa[17]](_0x45fa[10],auth[_0x45fa[5]](),auth[_0x45fa[7]]([19],[_0x45fa[6]]),controller[_0x45fa[16]]);module[_0x45fa[18]]= router \ No newline at end of file +'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; diff --git a/server/api/zendesk_field/zendesk_field.controller.js b/server/api/zendesk_field/zendesk_field.controller.js index d70be9c..48d0c38 100644 --- a/server/api/zendesk_field/zendesk_field.controller.js +++ b/server/api/zendesk_field/zendesk_field.controller.js @@ -1 +1,93 @@ -var _0xafe6=["\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"];_0xafe6[0];var _=require(_0xafe6[1]);var ZendeskField=require(_0xafe6[3])[_0xafe6[2]];exports[_0xafe6[4]]= function(_0xc125x3,_0xc125x4){ZendeskField[_0xafe6[9]]()[_0xafe6[8]](function(_0xc125x6){return _0xc125x4[_0xafe6[7]](200)[_0xafe6[6]](_0xc125x6)})[_0xafe6[5]](function(_0xc125x5){return handleError(_0xc125x4,_0xc125x5)})};exports[_0xafe6[10]]= function(_0xc125x3,_0xc125x4){ZendeskField[_0xafe6[14]](_0xc125x3[_0xafe6[13]][_0xafe6[12]])[_0xafe6[8]](function(_0xc125x7){if(!_0xc125x7){return _0xc125x4[_0xafe6[11]](404)};return _0xc125x4[_0xafe6[6]](_0xc125x7)})[_0xafe6[5]](function(_0xc125x5){return handleError(_0xc125x4,_0xc125x5)})};exports[_0xafe6[15]]= function(_0xc125x3,_0xc125x4){ZendeskField[_0xafe6[15]](_0xc125x3[_0xafe6[16]])[_0xafe6[8]](function(_0xc125x7){return _0xc125x4[_0xafe6[7]](201)[_0xafe6[6]](_0xc125x7)})[_0xafe6[5]](function(_0xc125x5){return handleError(_0xc125x4,_0xc125x5)})};exports[_0xafe6[17]]= function(_0xc125x3,_0xc125x4){if(_0xc125x3[_0xafe6[16]][_0xafe6[12]]){delete _0xc125x3[_0xafe6[16]][_0xafe6[12]]};ZendeskField[_0xafe6[14]](_0xc125x3[_0xafe6[13]][_0xafe6[12]])[_0xafe6[8]](function(_0xc125x7){if(!_0xc125x7){return _0xc125x4[_0xafe6[11]](404)};var _0xc125x8=_[_0xafe6[18]](_0xc125x7,_0xc125x3[_0xafe6[16]]);_0xc125x8[_0xafe6[19]]()[_0xafe6[8]](function(){return _0xc125x4[_0xafe6[7]](200)[_0xafe6[6]](_0xc125x7)})[_0xafe6[5]](function(_0xc125x5){return handleError(_0xc125x4,_0xc125x5)})})[_0xafe6[5]](function(_0xc125x5){return handleError(_0xc125x4,_0xc125x5)})};exports[_0xafe6[20]]= function(_0xc125x3,_0xc125x4){ZendeskField[_0xafe6[14]](_0xc125x3[_0xafe6[13]][_0xafe6[12]])[_0xafe6[8]](function(_0xc125x7){if(!_0xc125x7){return _0xc125x4[_0xafe6[11]](404)};_0xc125x7[_0xafe6[20]]()[_0xafe6[8]](function(){return _0xc125x4[_0xafe6[11]](204)})[_0xafe6[5]](function(_0xc125x5){return handleError(_0xc125x4,_0xc125x5)})})[_0xafe6[5]](function(_0xc125x5){return handleError(_0xc125x4,_0xc125x5)})};function handleError(_0xc125x4,_0xc125x5){return _0xc125x4[_0xafe6[7]](500)[_0xafe6[6]](_0xc125x5)} \ No newline at end of file +'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); +} diff --git a/server/api/zendesk_field/zendesk_field.events.js b/server/api/zendesk_field/zendesk_field.events.js index ebf00fa..3b68978 100644 --- a/server/api/zendesk_field/zendesk_field.events.js +++ b/server/api/zendesk_field/zendesk_field.events.js @@ -1 +1,36 @@ -var _0xa6f6=["\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"];_0xa6f6[0];const EventEmitter=require(_0xa6f6[1]);const ZendeskField=require(_0xa6f6[3])[_0xa6f6[2]];var ZendeskFieldEvents= new EventEmitter();ZendeskFieldEvents[_0xa6f6[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xa6f6[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xa6f6[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xa6f6[6]};for(var e in events){var event=events[e];ZendeskField[_0xa6f6[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xaa9bx8,_0xaa9bx9,_0xaa9bxa){ZendeskFieldEvents[_0xa6f6[10]](event+ _0xa6f6[8]+ _0xaa9bx8[_0xa6f6[9]],_0xaa9bx8);ZendeskFieldEvents[_0xa6f6[10]](event,_0xaa9bx8);_0xaa9bxa(null)}}module[_0xa6f6[11]]= ZendeskFieldEvents \ No newline at end of file +/** + * 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; diff --git a/server/api/zendesk_field/zendesk_field.socket.js b/server/api/zendesk_field/zendesk_field.socket.js index 44f3e54..891c45b 100644 --- a/server/api/zendesk_field/zendesk_field.socket.js +++ b/server/api/zendesk_field/zendesk_field.socket.js @@ -1 +1,32 @@ -var _0x2396=["\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"];_0x2396[0];const ZendeskFieldEvents=require(_0x2396[1]);var events=[_0x2396[2],_0x2396[3]];exports[_0x2396[4]]= function(_0x682ex3){for(var _0x682ex4=0,_0x682ex5=events[_0x2396[5]];_0x682ex4< _0x682ex5;_0x682ex4++){var _0x682ex6=events[_0x682ex4];var _0x682ex7=createListener(_0x2396[6]+ _0x682ex6,_0x682ex3);ZendeskFieldEvents[_0x2396[7]](_0x682ex6,_0x682ex7);_0x682ex3[_0x2396[7]](_0x2396[8],removeListener(_0x682ex6,_0x682ex7))}};function createListener(_0x682ex6,_0x682ex3){return function(_0x682ex9){_0x682ex3[_0x2396[9]](_0x682ex6,_0x682ex9)}}function removeListener(_0x682ex6,_0x682ex7){return function(){ZendeskFieldEvents[_0x2396[10]](_0x682ex6,_0x682ex7)}} \ No newline at end of file +/** + * 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); + }; +} diff --git a/server/app.js b/server/app.js index 1907245..c27c4a6 100644 --- a/server/app.js +++ b/server/app.js @@ -1 +1,113 @@ -var _0x2e8c=["\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","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x53\x65\x72\x76\x65\x72","\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","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F","\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","\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","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x68\x69\x73\x74\x6F\x72\x79\x2F\x68\x69\x73\x74\x6F\x72\x79","\x74\x68\x65\x6E","\x73\x79\x6E\x63","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\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\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\x6D\x69","\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","\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","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2e8c[0];process[_0x2e8c[2]][_0x2e8c[1]]= process[_0x2e8c[2]][_0x2e8c[1]]|| _0x2e8c[3];process[_0x2e8c[2]][_0x2e8c[4]]= 0;process[_0x2e8c[14]](_0x2e8c[5],function(_0x9135x1){if( typeof _0x9135x1=== _0x2e8c[6]){if(_0x9135x1[_0x2e8c[7]]){console[_0x2e8c[9]](_0x2e8c[8]+ _0x9135x1[_0x2e8c[7]])};if(_0x9135x1[_0x2e8c[10]]){console[_0x2e8c[9]](_0x2e8c[11]);console[_0x2e8c[9]](_0x2e8c[12]);console[_0x2e8c[9]](_0x9135x1[_0x2e8c[10]])}}else {console[_0x2e8c[9]](_0x2e8c[13])}});var os=require(_0x2e8c[15]);var http=require(_0x2e8c[16]);var util=require(_0x2e8c[17]);var crypto=require(_0x2e8c[18]);var cronjob=require(_0x2e8c[20])[_0x2e8c[19]];var shelljs=require(_0x2e8c[21]);var express=require(_0x2e8c[22]);var models=require(_0x2e8c[23]);var config=require(_0x2e8c[24]);var app=express();var server=require(_0x2e8c[16])[_0x2e8c[25]](app);var io=require(_0x2e8c[28])(server,{serveClient:(config[_0x2e8c[2]]=== _0x2e8c[26])?false:true,path:_0x2e8c[27]});var ami=require(_0x2e8c[34])(config[_0x2e8c[30]][_0x2e8c[29]],config[_0x2e8c[30]][_0x2e8c[31]],config[_0x2e8c[30]][_0x2e8c[32]],config[_0x2e8c[30]][_0x2e8c[33]],true);ami[_0x2e8c[35]]();require(_0x2e8c[36])(app);require(_0x2e8c[37])(app,ami);models[_0x2e8c[67]][_0x2e8c[42]]()[_0x2e8c[41]](function(){if(config[_0x2e8c[44]]){require(_0x2e8c[45])};if(config[_0x2e8c[46]]){require(_0x2e8c[47])};require(_0x2e8c[48])(io);require(_0x2e8c[49])();require(_0x2e8c[50])();require(_0x2e8c[51])();require(_0x2e8c[52])(ami);require(_0x2e8c[53])();require(_0x2e8c[54])();require(_0x2e8c[55])();require(_0x2e8c[56])();require(_0x2e8c[57])();require(_0x2e8c[58])();require(_0x2e8c[59])();require(_0x2e8c[60])(ami);require(_0x2e8c[61])();require(_0x2e8c[62])();server[_0x2e8c[66]](config[_0x2e8c[29]],config[_0x2e8c[63]],function(){console[_0x2e8c[9]](_0x2e8c[64],config[_0x2e8c[29]],app[_0x2e8c[65]](_0x2e8c[2]))})})[_0x2e8c[41]](function(){return models[_0x2e8c[43]][_0x2e8c[42]]()})[_0x2e8c[41]](function(){require(_0x2e8c[40])(cronjob)})[_0x2e8c[39]](function(_0x9135x1){console[_0x2e8c[38]](_0x9135x1)});exports= module[_0x2e8c[68]]= app \ No newline at end of file +'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 express = require('express'); +var models = require('./models'); +var config = require('./config/environment'); + +// Setup server +var app = express(); +var server = require('http').createServer(app); + +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 +})); + +var ami = require('asterisk-manager')(config.asterisk.port, + config.asterisk.host, + config.asterisk.username, + config.asterisk.password, + true); + +ami.keepConnected(); + +require('./config/express')(app); +require('./routes')(app, ami); + +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'); + } + + // Start Cally Square Projects + require('./config/socketio')(io, require('./services/dashboard')(io)); + require('./config/automations/mail')(); + require('./config/automations/fax')(); + require('./config/automations/chat')(); + require('./config/triggers')(ami); + require('./config/scheduler')(); + require('./config/imap')(); + require('./config/smtp')() + require('./config/sms')(); + require('./config/chat')(); + require('./config/openchannel')(); + require('./config/tools')(); + require('./config/ami')(ami); + require('./config/agi')(); + require('./config/license')(); + + // Start server + server.listen(config.port, config.ip, function() { + console.log('Express server listening on %d, in %s mode', config.port, app.get('env')); + }); + }) + .then(function() { + // Connect to database history + return models + .sequelize_history + .sync(); + }) + .then(function() { + require('./config/history/history')(cronjob); + }) + .catch(function(err) { + console.error(err); + }); + +// Expose app +exports = module.exports = app; diff --git a/server/auth/auth.service.js b/server/auth/auth.service.js index f8bdaa5..e82ba59 100644 --- a/server/auth/auth.service.js +++ b/server/auth/auth.service.js @@ -1 +1,150 @@ -var _0xd275=["\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"];_0xd275[0];var passport=require(_0xd275[1]);var config=require(_0xd275[2]);var jwt=require(_0xd275[3]);var expressJwt=require(_0xd275[4]);var compose=require(_0xd275[5]);var User=require(_0xd275[7])[_0xd275[6]];var List=require(_0xd275[7])[_0xd275[8]];var validateJwt=expressJwt({secret:config[_0xd275[10]][_0xd275[9]]});var Promise=require(_0xd275[11]);var _=require(_0xd275[12]);function isAuthenticated(){return compose()[_0xd275[19]](function(_0x744exc,_0x744exd,_0x744exe){if(_0x744exc[_0xd275[20]]&& _0x744exc[_0xd275[20]][_0xd275[22]](_0xd275[21])){_0x744exc[_0xd275[24]][_0xd275[23]]= _0xd275[25]+ _0x744exc[_0xd275[20]][_0xd275[21]]};if(_0x744exc[_0xd275[24]]&& _0x744exc[_0xd275[24]][_0xd275[23]]&& _[_0xd275[27]](_0x744exc[_0xd275[24]][_0xd275[23]],_0xd275[26])){var _0x744ex11=_[_0xd275[29]](_0x744exc[_0xd275[24]][_0xd275[23]],_0xd275[28]);var _0x744ex12= new Buffer(_0x744ex11[1],_0xd275[31]).toString(_0xd275[30]);var _0x744ex13=_[_0xd275[29]](_0x744ex12,_0xd275[32])[0];var _0x744ex14=_[_0xd275[29]](_0x744ex12,_0xd275[32])[1];return User[_0xd275[35]]({where:{name:_0x744ex13}})[_0xd275[16]](function(_0x744ex10){if(!_0x744ex10|| !_0x744ex10[_0xd275[33]](_0x744ex14)){_0x744exe( new Error(_0xd275[34]))};_0x744exc[_0xd275[15]]= {id:_0x744ex10[_0xd275[17]]};_0x744exe()})}else {validateJwt(_0x744exc,_0x744exd,_0x744exe)}})[_0xd275[19]](function(_0x744exc,_0x744exd,_0x744exe){User[_0xd275[18]](_0x744exc[_0xd275[15]][_0xd275[17]],{include:[{model:List}]})[_0xd275[16]](function(_0x744ex10){if(!_0x744ex10){return _0x744exd[_0xd275[14]](401)};_0x744exc[_0xd275[15]]= _0x744ex10;return _0x744exe()})[_0xd275[13]](function(_0x744exf){return _0x744exe(_0x744exf)})})}function hasModule(_0x744ex16,_0x744ex17){return compose()[_0xd275[19]](function(_0x744exc,_0x744exd,_0x744exe){return User[_0xd275[18]](_0x744exc[_0xd275[15]][_0xd275[17]])[_0xd275[16]](function(_0x744ex10){var _0x744ex1b=[];_0x744ex16[_0xd275[41]](function(_0x744ex1c){_0x744ex1b[_0xd275[40]](_0x744ex10[_0xd275[39]](_0x744ex1c))});return Promise[_0xd275[42]](_0x744ex1b)})[_0xd275[16]](function(_0x744ex18){var hasModule=(_[_0xd275[36]](_0x744ex18,function(_0x744ex19,_0x744ex1a){return _0x744ex19|| _0x744ex1a}));if(_[_0xd275[38]](_0x744ex17,_0x744exc[_0xd275[15]][_0xd275[37]])|| hasModule){return _0x744exe()}else {_0x744exd[_0xd275[14]](403)}})[_0xd275[13]](function(_0x744exf){return _0x744exe(_0x744exf)})})}function hasRole(_0x744ex1e){if(!_0x744ex1e){throw new Error(_0xd275[43])};return compose()[_0xd275[19]](isAuthenticated())[_0xd275[19]](function _0x744ex1f(_0x744exc,_0x744exd,_0x744exe){if(config[_0xd275[45]][_0xd275[44]](_0x744exc[_0xd275[15]][_0xd275[37]])>= config[_0xd275[45]][_0xd275[44]](_0x744ex1e)){return _0x744exe()}else {return _0x744exd[_0xd275[14]](403)}})}function signToken(_0x744ex21,_0x744ex22,_0x744ex23){var _0x744ex24=60* 24* 365* 5;if(!_0x744ex23){_0x744ex24= _0xd275[46]};return jwt[_0xd275[47]]({id:_0x744ex21},config[_0xd275[10]][_0xd275[9]],{expiresIn:_0x744ex24})}function setTokenCookie(_0x744exc,_0x744exd){if(!_0x744exc[_0xd275[15]]){return _0x744exd[_0xd275[49]](404,{message:_0xd275[48]})};var _0x744ex26=signToken(_0x744exc[_0xd275[15]][_0xd275[17]],_0x744exc[_0xd275[15]][_0xd275[37]]);_0x744exd[_0xd275[52]](_0xd275[50],JSON[_0xd275[51]](_0x744ex26));_0x744exd[_0xd275[54]](_0xd275[53])}exports[_0xd275[55]]= isAuthenticated;exports[_0xd275[56]]= hasRole;exports[_0xd275[39]]= hasModule;exports[_0xd275[57]]= signToken;exports[_0xd275[58]]= setTokenCookie \ No newline at end of file +'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; diff --git a/server/auth/facebook/index.js b/server/auth/facebook/index.js index bfce7c7..4a6f878 100644 --- a/server/auth/facebook/index.js +++ b/server/auth/facebook/index.js @@ -1 +1,21 @@ -var _0xbee0=["\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"];_0xbee0[0];var express=require(_0xbee0[1]);var passport=require(_0xbee0[2]);var auth=require(_0xbee0[3]);var router=express.Router();router[_0xbee0[9]](_0xbee0[10],passport[_0xbee0[7]](_0xbee0[5],{scope:[_0xbee0[11],_0xbee0[12]],failureRedirect:_0xbee0[6],session:false}))[_0xbee0[9]](_0xbee0[4],passport[_0xbee0[7]](_0xbee0[5],{failureRedirect:_0xbee0[6],session:false}),auth[_0xbee0[8]]);module[_0xbee0[13]]= router \ No newline at end of file +'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 diff --git a/server/auth/facebook/passport.js b/server/auth/facebook/passport.js index 73d7c4c..90ae489 100644 --- a/server/auth/facebook/passport.js +++ b/server/auth/facebook/passport.js @@ -1 +1,37 @@ -var _0x193a=["\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(_0x193a[0]);var FacebookStrategy=require(_0x193a[2])[_0x193a[1]];exports[_0x193a[3]]= function(_0x9c5dx3,_0x9c5dx4){passport[_0x193a[17]]( new FacebookStrategy({clientID:_0x9c5dx4[_0x193a[5]][_0x193a[4]],clientSecret:_0x9c5dx4[_0x193a[5]][_0x193a[6]],callbackURL:_0x9c5dx4[_0x193a[5]][_0x193a[7]]},function(_0x9c5dx5,_0x9c5dx6,_0x9c5dx7,_0x9c5dx8){_0x9c5dx3[_0x193a[16]]({"\x66\x61\x63\x65\x62\x6F\x6F\x6B\x2E\x69\x64":_0x9c5dx7[_0x193a[8]]},function(_0x9c5dx9,_0x9c5dxa){if(_0x9c5dx9){return _0x9c5dx8(_0x9c5dx9)};if(!_0x9c5dxa){_0x9c5dxa= new _0x9c5dx3({name:_0x9c5dx7[_0x193a[9]],email:_0x9c5dx7[_0x193a[11]][0][_0x193a[10]],role:_0x193a[12],username:_0x9c5dx7[_0x193a[13]],provider:_0x193a[5],facebook:_0x9c5dx7[_0x193a[14]]});_0x9c5dxa[_0x193a[15]](function(_0x9c5dx9){if(_0x9c5dx9){_0x9c5dx8(_0x9c5dx9)};return _0x9c5dx8(_0x9c5dx9,_0x9c5dxa)})}else {return _0x9c5dx8(_0x9c5dx9,_0x9c5dxa)}})}))} \ No newline at end of file +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 diff --git a/server/auth/google/index.js b/server/auth/google/index.js index 2568cff..9b1ce39 100644 --- a/server/auth/google/index.js +++ b/server/auth/google/index.js @@ -1 +1,24 @@ -var _0xfddd=["\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"];_0xfddd[0];var express=require(_0xfddd[1]);var passport=require(_0xfddd[2]);var auth=require(_0xfddd[3]);var router=express.Router();router[_0xfddd[9]](_0xfddd[10],passport[_0xfddd[7]](_0xfddd[5],{failureRedirect:_0xfddd[6],scope:[_0xfddd[11],_0xfddd[12]],session:false}))[_0xfddd[9]](_0xfddd[4],passport[_0xfddd[7]](_0xfddd[5],{failureRedirect:_0xfddd[6],session:false}),auth[_0xfddd[8]]);module[_0xfddd[13]]= router \ No newline at end of file +'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 diff --git a/server/auth/google/passport.js b/server/auth/google/passport.js index b8b087f..d304e8a 100644 --- a/server/auth/google/passport.js +++ b/server/auth/google/passport.js @@ -1 +1,33 @@ -var _0x4ac9=["\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(_0x4ac9[0]);var GoogleStrategy=require(_0x4ac9[2])[_0x4ac9[1]];exports[_0x4ac9[3]]= function(_0xa661x3,_0xa661x4){passport[_0x4ac9[17]]( new GoogleStrategy({clientID:_0xa661x4[_0x4ac9[5]][_0x4ac9[4]],clientSecret:_0xa661x4[_0x4ac9[5]][_0x4ac9[6]],callbackURL:_0xa661x4[_0x4ac9[5]][_0x4ac9[7]]},function(_0xa661x5,_0xa661x6,_0xa661x7,_0xa661x8){_0xa661x3[_0x4ac9[16]]({"\x67\x6F\x6F\x67\x6C\x65\x2E\x69\x64":_0xa661x7[_0x4ac9[8]]},function(_0xa661x9,_0xa661xa){if(!_0xa661xa){_0xa661xa= new _0xa661x3({name:_0xa661x7[_0x4ac9[9]],email:_0xa661x7[_0x4ac9[11]][0][_0x4ac9[10]],role:_0x4ac9[12],username:_0xa661x7[_0x4ac9[13]],provider:_0x4ac9[5],google:_0xa661x7[_0x4ac9[14]]});_0xa661xa[_0x4ac9[15]](function(_0xa661x9){if(_0xa661x9){_0xa661x8(_0xa661x9)};return _0xa661x8(_0xa661x9,_0xa661xa)})}else {return _0xa661x8(_0xa661x9,_0xa661xa)}})}))} \ No newline at end of file +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); + } + }); + } + )); +}; diff --git a/server/auth/index.js b/server/auth/index.js index 6bb092b..42c323f 100644 --- a/server/auth/index.js +++ b/server/auth/index.js @@ -1 +1,22 @@ -var _0xa9cd=["\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"];_0xa9cd[0];var express=require(_0xa9cd[1]);var passport=require(_0xa9cd[2]);var config=require(_0xa9cd[3]);var User=require(_0xa9cd[5])[_0xa9cd[4]];require(_0xa9cd[7])[_0xa9cd[6]](User,config);require(_0xa9cd[8])[_0xa9cd[6]](User,config);require(_0xa9cd[9])[_0xa9cd[6]](User,config);require(_0xa9cd[10])[_0xa9cd[6]](User,config);var router=express.Router();router[_0xa9cd[13]](_0xa9cd[11],require(_0xa9cd[12]));router[_0xa9cd[13]](_0xa9cd[14],require(_0xa9cd[15]));router[_0xa9cd[13]](_0xa9cd[16],require(_0xa9cd[17]));router[_0xa9cd[13]](_0xa9cd[18],require(_0xa9cd[19]));module[_0xa9cd[20]]= router \ No newline at end of file +'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; diff --git a/server/auth/local/index.js b/server/auth/local/index.js index 72415ef..54f86ad 100644 --- a/server/auth/local/index.js +++ b/server/auth/local/index.js @@ -1 +1,213 @@ -var _0x79de=["\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"];_0x79de[0];var express=require(_0x79de[1]);var passport=require(_0x79de[2]);var async=require(_0x79de[3]);var Promise=require(_0x79de[4]);var nodemailer=require(_0x79de[5]);var smtpTransport=require(_0x79de[6]);var crypto=require(_0x79de[7]);var moment=require(_0x79de[8]);var auth=require(_0x79de[9]);var User=require(_0x79de[11])[_0x79de[10]];var Action=require(_0x79de[11])[_0x79de[12]];var ReportMember=require(_0x79de[11])[_0x79de[13]];var MailServerOut=require(_0x79de[11])[_0x79de[14]];var license=require(_0x79de[15]);var channels=[_0x79de[16],_0x79de[17],_0x79de[18],_0x79de[19]];var router=express.Router();router[_0x79de[40]](_0x79de[20],function(_0x5a27x11,_0x5a27x12,_0x5a27x13){passport[_0x79de[39]](_0x79de[21],function(_0x5a27x14,_0x5a27x15,_0x5a27x16){if(_0x5a27x14){return _0x5a27x12[_0x79de[24]](401)[_0x79de[23]]({message:_0x5a27x14[_0x79de[22]]})};if(!_0x5a27x15){return _0x5a27x12[_0x79de[24]](404)[_0x79de[23]]({message:_0x79de[25]})};return Promise[_0x79de[38]]([])[_0x79de[32]](function(){if(_0x5a27x11[_0x79de[30]][_0x79de[34]](_0x79de[33])&& _0x5a27x11[_0x79de[30]][_0x79de[33]]=== false){return};return Action[_0x79de[37]]({name:_0x79de[35],data1:_0x5a27x15[_0x79de[28]],data2:_0x5a27x15[_0x79de[36]],UserId:_0x5a27x15[_0x79de[28]]})})[_0x79de[32]](function(){return _0x5a27x12[_0x79de[23]]({role:_0x5a27x15[_0x79de[27]],token:auth[_0x79de[31]](_0x5a27x15[_0x79de[28]],_0x5a27x15[_0x79de[27]],_0x5a27x11[_0x79de[30]][_0x79de[29]]|| false),userId:_0x5a27x15[_0x79de[28]]})})[_0x79de[26]](function(_0x5a27x14){return _0x5a27x13(_0x5a27x14)})})(_0x5a27x11,_0x5a27x12,_0x5a27x13)});router[_0x79de[40]](_0x79de[41],function(_0x5a27x11,_0x5a27x12,_0x5a27x13){var _0x5a27x17,_0x5a27x18,_0x5a27x19;return User[_0x79de[70]]({where:{email:_0x5a27x11[_0x79de[30]][_0x79de[49]]}})[_0x79de[32]](function(_0x5a27x15){if(!_0x5a27x15){throw new Error(_0x79de[69])};_0x5a27x18= _0x5a27x15;return MailServerOut[_0x79de[70]]({where:{service:true}})})[_0x79de[32]](function(_0x5a27x1d){if(!_0x5a27x1d){throw new Error(_0x79de[66])};_0x5a27x19= _0x5a27x1d;return Promise[_0x79de[68]](crypto[_0x79de[67]])(20)})[_0x79de[32]](function(_0x5a27x1c){_0x5a27x17= _0x5a27x1c.toString(_0x79de[60]);_0x5a27x18[_0x79de[61]]= _0x5a27x17;_0x5a27x18[_0x79de[62]]= moment()[_0x79de[64]](1,_0x79de[63]);return _0x5a27x18[_0x79de[65]]()})[_0x79de[32]](function(){var _0x5a27x1a=nodemailer[_0x79de[48]](smtpTransport({host:_0x5a27x19[_0x79de[43]],port:_0x5a27x19[_0x79de[44]],secure:_0x5a27x19[_0x79de[45]],pool:true,auth:{user:_0x5a27x19[_0x79de[46]],pass:_0x5a27x19[_0x79de[47]]}}));var _0x5a27x1b={to:_0x5a27x18[_0x79de[49]],from:_0x5a27x19[_0x79de[43]],subject:_0x79de[50],text:_0x79de[51]+ _0x79de[52]+ _0x79de[53]+ _0x5a27x11[_0x79de[54]][_0x79de[43]]+ _0x79de[55]+ _0x5a27x17+ _0x79de[56]+ _0x79de[57]+ _0x79de[58]};return _0x5a27x1a[_0x79de[59]](_0x5a27x1b)})[_0x79de[32]](function(_0x5a27x16){_0x5a27x12[_0x79de[42]](200)})[_0x79de[26]](function(_0x5a27x14){return handleError(_0x5a27x12,_0x5a27x14)})});router[_0x79de[40]](_0x79de[71],function(_0x5a27x11,_0x5a27x12,_0x5a27x13){var _0x5a27x18,_0x5a27x19;return User[_0x79de[70]]({where:{resetPasswordToken:_0x5a27x11[_0x79de[80]][_0x79de[79]],resetPasswordExpires:{$gt:moment()}}})[_0x79de[32]](function(_0x5a27x15){if(!_0x5a27x15){throw new Error(_0x79de[76])};var _0x5a27x1e=String(_0x5a27x11[_0x79de[30]][_0x79de[47]]);if(!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/[_0x79de[77]](_0x5a27x1e))){throw new Error(_0x79de[78])};_0x5a27x15[_0x79de[47]]= _0x5a27x1e;_0x5a27x15[_0x79de[61]]= null;_0x5a27x15[_0x79de[62]]= null;return _0x5a27x15[_0x79de[65]]()})[_0x79de[32]](function(_0x5a27x15){_0x5a27x18= _0x5a27x15;return MailServerOut[_0x79de[70]]({where:{service:true}})})[_0x79de[32]](function(_0x5a27x1d){if(!_0x5a27x1d){throw new Error(_0x79de[66])};var _0x5a27x1a=nodemailer[_0x79de[48]](smtpTransport({host:_0x5a27x1d[_0x79de[43]],port:_0x5a27x1d[_0x79de[44]],secure:_0x5a27x1d[_0x79de[45]],pool:true,auth:{user:_0x5a27x1d[_0x79de[46]],pass:_0x5a27x1d[_0x79de[47]]}}));var _0x5a27x1b={to:_0x5a27x18[_0x79de[49]],from:_0x5a27x1d[_0x79de[43]],subject:_0x79de[72],text:_0x79de[73]+ _0x79de[74]+ _0x5a27x18[_0x79de[49]]+ _0x79de[75]};return _0x5a27x1a[_0x79de[59]](_0x5a27x1b)})[_0x79de[32]](function(_0x5a27x16){_0x5a27x12[_0x79de[42]](200)})[_0x79de[26]](function(_0x5a27x14){return handleError(_0x5a27x12,_0x5a27x14)})});router[_0x79de[86]](_0x79de[81],auth[_0x79de[82]](),function(_0x5a27x11,_0x5a27x12,_0x5a27x13){return Action[_0x79de[37]]({name:_0x79de[83],data1:_0x5a27x11[_0x79de[85]][_0x79de[28]],data2:_0x5a27x11[_0x79de[85]][_0x79de[36]],UserId:_0x5a27x11[_0x79de[85]][_0x79de[28]]})[_0x79de[32]](function(){_0x5a27x11[_0x79de[83]]();_0x5a27x12[_0x79de[84]](_0x79de[20])})[_0x79de[26]](function(_0x5a27x14){return _0x5a27x13(_0x5a27x14)})});function handleError(_0x5a27x12,_0x5a27x14){return _0x5a27x12[_0x79de[24]](500)[_0x79de[87]]({message:_0x5a27x14[_0x79de[22]]})}module[_0x79de[88]]= router \ No newline at end of file +'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; diff --git a/server/auth/local/local.ami.js b/server/auth/local/local.ami.js index c12e324..bfb533d 100644 --- a/server/auth/local/local.ami.js +++ b/server/auth/local/local.ami.js @@ -1 +1,51 @@ -var _0xb4da=["\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"];_0xb4da[0];var util=require(_0xb4da[1]);var amiController=require(_0xb4da[2]);exports[_0xb4da[3]]= function(_0xea1dx3,_0xea1dx4,_0xea1dx5,_0xea1dx6){var _0xea1dx7={action:_0xb4da[4],queue:_0xea1dx5,interface:util[_0xb4da[6]](_0xb4da[5],_0xea1dx4),paused:false};_0xea1dx7[_0xb4da[7]]= JSON[_0xb4da[8]](_0xea1dx7);_0xea1dx7[_0xb4da[9]]= _0xea1dx3;amiController[_0xb4da[12]](_0xea1dx7,function(_0xea1dx8,_0xea1dx9){if(_0xea1dx8){console[_0xb4da[10]](_0xea1dx8)};var _0xea1dx7={action:_0xb4da[11],queue:_0xea1dx5,interface:util[_0xb4da[6]](_0xb4da[5],_0xea1dx4)};_0xea1dx7[_0xb4da[7]]= JSON[_0xb4da[8]](_0xea1dx7);_0xea1dx7[_0xb4da[9]]= _0xea1dx3;amiController[_0xb4da[12]](_0xea1dx7,_0xea1dx6)})};exports[_0xb4da[13]]= function(_0xea1dx3,_0xea1dx4,_0xea1dx5,_0xea1dx6){var _0xea1dx7={action:_0xb4da[14],queue:_0xea1dx5,interface:util[_0xb4da[6]](_0xb4da[5],_0xea1dx4),penalty:0,paused:false,membername:_0xea1dx4};_0xea1dx7[_0xb4da[7]]= JSON[_0xb4da[8]](_0xea1dx7);_0xea1dx7[_0xb4da[9]]= _0xea1dx3;amiController[_0xb4da[12]](_0xea1dx7,_0xea1dx6)} \ No newline at end of file +/** + * 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); +} diff --git a/server/auth/local/passport.js b/server/auth/local/passport.js index 94bc961..ab09929 100644 --- a/server/auth/local/passport.js +++ b/server/auth/local/passport.js @@ -1 +1,42 @@ -var _0xd530=["\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(_0xd530[0]);var LocalStrategy=require(_0xd530[2])[_0xd530[1]];var license=require(_0xd530[3]);exports[_0xd530[4]]= function(_0xee29x4,_0xee29x5){passport[_0xd530[15]](_0xd530[5], new LocalStrategy({usernameField:_0xd530[6],passwordField:_0xd530[7]},function(_0xee29x6,_0xee29x7,_0xee29x8){var _0xee29x9;return _0xee29x4[_0xd530[14]]({where:{name:_0xee29x6}})[_0xd530[10]](function(_0xee29xc){_0xee29x9= _0xee29xc;if(!_0xee29x9|| !_0xee29xc[_0xd530[12]](_0xee29x7)){throw new Error(_0xd530[13])};return _0xee29x9})[_0xd530[10]](license[_0xd530[11]]())[_0xd530[10]](function(_0xee29xb){if(_0xee29xb){return _0xee29x8(null,_0xee29x9)}else {return _0xee29x8(null,false,{message:_0xd530[9]})}})[_0xd530[8]](function(_0xee29xa){return _0xee29x8(_0xee29xa,false,null)})}))} \ No newline at end of file +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); + }); + } + )); +}; diff --git a/server/auth/twitter/index.js b/server/auth/twitter/index.js index c3fb83f..8360247 100644 --- a/server/auth/twitter/index.js +++ b/server/auth/twitter/index.js @@ -1 +1,20 @@ -var _0x2f52=["\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"];_0x2f52[0];var express=require(_0x2f52[1]);var passport=require(_0x2f52[2]);var auth=require(_0x2f52[3]);var router=express.Router();router[_0x2f52[9]](_0x2f52[10],passport[_0x2f52[7]](_0x2f52[5],{failureRedirect:_0x2f52[6],session:false}))[_0x2f52[9]](_0x2f52[4],passport[_0x2f52[7]](_0x2f52[5],{failureRedirect:_0x2f52[6],session:false}),auth[_0x2f52[8]]);module[_0x2f52[11]]= router \ No newline at end of file +'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 diff --git a/server/auth/twitter/passport.js b/server/auth/twitter/passport.js index ba1e0e6..a2eb4a5 100644 --- a/server/auth/twitter/passport.js +++ b/server/auth/twitter/passport.js @@ -1 +1,35 @@ -var _0xbf06=["\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[_0xbf06[0]]= function(_0xab1dx1,_0xab1dx2){var _0xab1dx3=require(_0xbf06[1]);var _0xab1dx4=require(_0xbf06[3])[_0xbf06[2]];_0xab1dx3[_0xbf06[15]]( new _0xab1dx4({consumerKey:_0xab1dx2[_0xbf06[5]][_0xbf06[4]],consumerSecret:_0xab1dx2[_0xbf06[5]][_0xbf06[6]],callbackURL:_0xab1dx2[_0xbf06[5]][_0xbf06[7]]},function(_0xab1dx5,_0xab1dx6,_0xab1dx7,_0xab1dx8){_0xab1dx1[_0xbf06[14]]({"\x74\x77\x69\x74\x74\x65\x72\x2E\x69\x64\x5F\x73\x74\x72":_0xab1dx7[_0xbf06[8]]},function(_0xab1dx9,_0xab1dxa){if(_0xab1dx9){return _0xab1dx8(_0xab1dx9)};if(!_0xab1dxa){_0xab1dxa= new _0xab1dx1({name:_0xab1dx7[_0xbf06[9]],username:_0xab1dx7[_0xbf06[10]],role:_0xbf06[11],provider:_0xbf06[5],twitter:_0xab1dx7[_0xbf06[12]]});_0xab1dxa[_0xbf06[13]](function(_0xab1dx9){if(_0xab1dx9){return _0xab1dx8(_0xab1dx9)};return _0xab1dx8(_0xab1dx9,_0xab1dxa)})}else {return _0xab1dx8(_0xab1dx9,_0xab1dxa)}})}))} \ No newline at end of file +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 diff --git a/server/config/agi/agi.js b/server/config/agi/agi.js index 3575904..589efd2 100644 --- a/server/config/agi/agi.js +++ b/server/config/agi/agi.js @@ -1 +1,1959 @@ -var _0x6e43=["\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"];_0x6e43[0];var _=require(_0x6e43[1]);var agi=require(_0x6e43[2]);var util=require(_0x6e43[3]);var moment=require(_0x6e43[4]);var xml=require(_0x6e43[5]);var wait=require(_0x6e43[6]);var sr=require(_0x6e43[7]);var path=require(_0x6e43[8]);var config=require(_0x6e43[9]);var sh=require(_0x6e43[10]);var Promise=require(_0x6e43[11]);var rp=require(_0x6e43[12]);const googleTTS=require(_0x6e43[13]);const fs=require(_0x6e43[14]);const sox=require(_0x6e43[15]);const request=require(_0x6e43[16]);const base64=require(_0x6e43[17]);var db=require(_0x6e43[18])();var SquareProject=require(_0x6e43[20])[_0x6e43[19]];var Variable=require(_0x6e43[20])[_0x6e43[21]];var SquareOdbc=require(_0x6e43[20])[_0x6e43[22]];var Setting=require(_0x6e43[20])[_0x6e43[23]];var User=require(_0x6e43[20])[_0x6e43[24]];var VoiceQueue=require(_0x6e43[20])[_0x6e43[25]];var Interval=require(_0x6e43[20])[_0x6e43[26]];var Sound=require(_0x6e43[20])[_0x6e43[27]];var SquareRecording=require(_0x6e43[20])[_0x6e43[28]];var SmsAccount=require(_0x6e43[20])[_0x6e43[29]];var MailServerOut=require(_0x6e43[20])[_0x6e43[30]];var Mustache=require(_0x6e43[31]);var Template=require(_0x6e43[20])[_0x6e43[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[_0x6e43[34]](_0x6e43[35],function(_0x6761x25){console[_0x6e43[39]](util[_0x6e43[38]](_0x6e43[36],_0x6761x25,process[_0x6e43[37]]))})[_0x6e43[34]](_0x6e43[33],function(_0x6761x24){console[_0x6e43[33]](_0x6761x24)});console[_0x6e43[39]](util[_0x6e43[38]](_0x6e43[40],process[_0x6e43[37]]));methods[_0x6e43[41]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[42]);console[_0x6e43[39]](_0x6e43[43]);_0x6761x26[_0x6e43[45]](_0x6e43[44],function(_0x6761x24,_0x6761x29){_0x6761x28(_0x6761x24,_0x6761x29)})};methods[_0x6e43[46]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[47]);console[_0x6e43[39]](_0x6e43[48]+ _0x6761x27[_0x6e43[49]]+ _0x6e43[50]);_0x6761x26[_0x6e43[52]](_0x6761x27[_0x6e43[49]],_0x6761x27[_0x6e43[51]],function(_0x6761x24,_0x6761x29){if(_0x6761x28){_0x6761x28(_0x6761x24,_0x6761x29)}})};methods[_0x6e43[53]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[54]);if(!collections[_0x6e43[55]]){getUsers(false)};var _0x6761x2a=_[_0x6e43[57]](collections[_0x6e43[55]],{id:parseInt(_0x6761x27[_0x6e43[56]])});console[_0x6e43[39]](_0x6e43[58]+ util[_0x6e43[38]](_0x6e43[59],_0x6761x2a[_0x6e43[60]])+ _0x6e43[61]);var _0x6761x2b=[util[_0x6e43[38]](_0x6e43[59],_0x6761x2a[_0x6e43[60]]),_0x6761x27[_0x6e43[62]],_0x6761x27[_0x6e43[63]],_0x6761x27[_0x6e43[64]]];_0x6761x26[_0x6e43[52]](_0x6e43[65],_0x6761x2b[_0x6e43[67]](_0x6e43[66]),function(_0x6761x24,_0x6761x29){_0x6761x28(_0x6761x24,_0x6761x29)})};methods[_0x6e43[68]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[69]);if(_0x6761x27[_0x6e43[41]]=== _0x6e43[70]){_0x6761x26[_0x6e43[45]](_0x6e43[44],function(_0x6761x24,_0x6761x29){_0x6761x28(_0x6761x24,_0x6761x29)})}else {_0x6761x28(null,{code:200,result:1})}};methods[_0x6e43[71]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[72]);console[_0x6e43[39]](_0x6e43[58]+ util[_0x6e43[38]](_0x6e43[59],_0x6761x27[_0x6e43[73]])+ _0x6e43[61]);var _0x6761x2b=[util[_0x6e43[38]](_0x6e43[74],_0x6761x27[_0x6e43[73]],_0x6761x27[_0x6e43[75]]),_0x6761x27[_0x6e43[62]],_0x6761x27[_0x6e43[63]],_0x6761x27[_0x6e43[64]]];_0x6761x26[_0x6e43[52]](_0x6e43[65],_0x6761x2b[_0x6e43[67]](_0x6e43[66]),function(_0x6761x24,_0x6761x29){_0x6761x28(_0x6761x24,_0x6761x29)})};methods[_0x6e43[76]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[77]);if(!collections[_0x6e43[78]]){getQueues(false)};var _0x6761x2c=_[_0x6e43[57]](collections[_0x6e43[78]],{name:_0x6761x27[_0x6e43[79]]});var _0x6761x2d={uniqueid:_0x6761x26[_0x6e43[80]],node:_0x6761x27[_0x6e43[81]],application:_0x6761x27[_0x6e43[82]],data:_0x6761x2c[_0x6e43[60]],project_name:_0x6761x26[_0x6e43[83]],callerid:_0x6761x26[_0x6e43[84]],message:_0x6e43[85]};process[_0x6e43[45]](_0x6761x2d);getFilePath(_0x6761x27[_0x6e43[94]])[_0x6e43[93]](function(_0x6761x2e){var _0x6761x2b=[_0x6761x2c[_0x6e43[60]],_0x6761x27[_0x6e43[63]],_0x6761x27[_0x6e43[64]],_0x6761x2e,_0x6761x27[_0x6e43[62]],_0x6761x27[_0x6e43[2]],_0x6761x27[_0x6e43[86]],_0x6761x27[_0x6e43[87]],_0x6e43[88],_0x6761x27[_0x6e43[89]]];console[_0x6e43[39]](_0x6e43[90]+ _0x6761x2c[_0x6e43[60]]+ _0x6e43[91]);_0x6761x26[_0x6e43[52]](_0x6e43[92],_0x6761x2b[_0x6e43[67]](_0x6e43[66]),function(_0x6761x24,_0x6761x29){_0x6761x28(_0x6761x24,_0x6761x29)})})};methods[_0x6e43[95]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[96]);var _0x6761x2b=[_0x6761x27[_0x6e43[97]],_0x6761x27[_0x6e43[63]]];var _0x6761x2d={uniqueid:_0x6761x26[_0x6e43[80]],node:_0x6761x27[_0x6e43[81]],application:_0x6761x27[_0x6e43[82]],data:_0x6761x2b[_0x6e43[67]](_0x6e43[66])|| null,project_name:_0x6761x26[_0x6e43[83]],callerid:_0x6761x26[_0x6e43[84]],message:_0x6e43[85]};process[_0x6e43[45]](_0x6761x2d);console[_0x6e43[39]](_0x6e43[98]);_0x6761x26[_0x6e43[52]](_0x6e43[99],_0x6761x2b[_0x6e43[67]](_0x6e43[66]),function(_0x6761x24,_0x6761x29){_0x6761x28(_0x6761x24,_0x6761x29)})};methods[_0x6e43[100]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[101]);var _0x6761x2f={method:_0x6e43[102],uri:_0x6e43[103],body:{id_list:parseInt(_0x6761x27[_0x6e43[104]]),name:_0x6761x27[_0x6e43[60]]|| _0x6e43[88],phones:_0x6761x27[_0x6e43[75]][_0x6e43[106]]()[_0x6e43[105]](_0x6e43[66]),description:_0x6761x27[_0x6e43[81]]|| _0x6e43[88],planningtime:moment()[_0x6e43[110]](_0x6761x27[_0x6e43[108]]|| 5,_0x6e43[109])[_0x6e43[38]](_0x6e43[107])},json:true};rp(_0x6761x2f)[_0x6e43[93]](function(_0x6761x30){if(_0x6761x30[_0x6e43[116]]> 0){console[_0x6e43[39]](_0x6761x30[_0x6e43[117]].RMI)}else {console[_0x6e43[39]](_0x6761x30[_0x6e43[117]][_0x6e43[119]][_0x6e43[118]])}})[_0x6e43[115]](function(_0x6761x24){console[_0x6e43[33]](_0x6e43[113],_0x6761x24[_0x6e43[114]])})[_0x6e43[112]](function(){console[_0x6e43[39]](_0x6e43[111]);_0x6761x28(null,{code:200,result:1})})};methods[_0x6e43[120]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[121]);console[_0x6e43[39]](_0x6e43[122]);try{var _0x6761x31=eval(_0x6761x27[_0x6e43[123]]);console[_0x6e43[39]](_0x6e43[124]);var _0x6761x32=getVariableName(_0x6761x27[_0x6e43[125]]);if(_[_0x6e43[126]](_0x6761x31)){_0x6761x31[_0x6e43[131]](function(_0x6761x33,_0x6761x34){wait[_0x6e43[130]](setVariable,_0x6761x26,_0x6761x32+ _0x6e43[127]+ _0x6761x34+ _0x6e43[128],_0x6e43[129]+ _0x6761x33+ _0x6e43[129])})}else {wait[_0x6e43[130]](setVariable,_0x6761x26,_0x6761x32,_0x6e43[129]+ _0x6761x31+ _0x6e43[129])}}catch(err){console[_0x6e43[39]](_0x6e43[132]);_0x6761x28(null,{code:200,result:1})}};methods[_0x6e43[133]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[134]);getFilePath(_0x6761x27[_0x6e43[94]])[_0x6e43[93]](function(_0x6761x35){var _0x6761x2b=[_0x6761x35,_0x6761x27[_0x6e43[63]]];console[_0x6e43[39]](_0x6e43[135]);_0x6761x26[_0x6e43[52]](_0x6e43[136],_0x6761x2b[_0x6e43[67]](_0x6e43[66]),function(_0x6761x24,_0x6761x29){_0x6761x28(_0x6761x24,_0x6761x29)})})};methods[_0x6e43[137]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[138]);var _0x6761x29={};console[_0x6e43[39]](_0x6e43[139]+ _0x6761x27[_0x6e43[140]]+ _0x6e43[141]);if(_0x6761x27[_0x6e43[140]]> 0){_0x6761x27[_0x6e43[140]]--;getFilePath(_0x6761x27[_0x6e43[94]])[_0x6e43[93]](function(_0x6761x36){console[_0x6e43[39]](_0x6e43[142]);_0x6761x26[_0x6e43[45]](util[_0x6e43[38]](_0x6e43[143],_0x6761x36,parseInt(_0x6761x27[_0x6e43[117]])* 1000,_0x6761x27[_0x6e43[144]]),function(_0x6761x24,_0x6761x29){var _0x6761x2d={uniqueid:_0x6761x26[_0x6e43[80]],node:_0x6761x27[_0x6e43[81]],application:_0x6761x27[_0x6e43[82]],data:_0x6761x29[_0x6e43[145]]|| null,project_name:_0x6761x26[_0x6e43[83]],callerid:_0x6761x26[_0x6e43[84]],message:_0x6e43[85]};process[_0x6e43[45]](_0x6761x2d);_0x6761x29[_0x6e43[145]]= _0x6761x29[_0x6e43[145]][_0x6e43[147]](_0x6e43[146],_0x6e43[88])[_0x6e43[106]]();if(_0x6761x29[_0x6e43[145]][_0x6e43[148]]){if(_0x6761x29[_0x6e43[145]]=== _0x6e43[149]){_0x6761x28(null,_0x6761x29)}else {_0x6761x29[_0x6e43[150]]= _0x6761x29[_0x6e43[145]];if(_0x6761x27[_0x6e43[125]]!== _0x6e43[149]){console[_0x6e43[39]](_0x6e43[151]);var _0x6761x32=getVariableName(_0x6761x27[_0x6e43[125]]);setVariable(_0x6761x26,_0x6761x32,_0x6e43[129]+ _0x6761x29[_0x6e43[150]]+ _0x6e43[129],function(){_0x6761x28(null,_0x6761x29)})}else {_0x6761x28(null,_0x6761x29)}}}else {console[_0x6e43[39]](_0x6e43[152]);_0x6761x29= {code:200,result:_0x6e43[153],data:_0x6e43[154]};_0x6761x28(null,_0x6761x29)}})})}else {console[_0x6e43[39]](_0x6e43[155]);_0x6761x29= {code:200,result:_0x6e43[153],data:_0x6e43[156]};_0x6761x28(null,_0x6761x29)}};methods[_0x6e43[157]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[158]);console[_0x6e43[39]](_0x6e43[159]);_0x6761x26[_0x6e43[45]](util[_0x6e43[38]](_0x6e43[160],_0x6761x27[_0x6e43[161]],_0x6761x27[_0x6e43[162]]),function(_0x6761x24,_0x6761x29){_0x6761x28(_0x6761x24,_0x6761x29)})};methods[_0x6e43[163]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[164]);console[_0x6e43[39]](_0x6e43[165]);_0x6761x26[_0x6e43[45]](util[_0x6e43[38]](_0x6e43[166],_0x6761x27[_0x6e43[167]],_0x6761x27[_0x6e43[162]]),function(_0x6761x24,_0x6761x29){_0x6761x28(_0x6761x24,_0x6761x29)})};methods[_0x6e43[168]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[169]);googleTTS(_0x6761x27[_0x6e43[167]],_0x6761x27[_0x6e43[172]],1)[_0x6e43[93]](function(_0x6761x37){console[_0x6e43[39]](_0x6e43[171]);saveAndPlayTTS(_0x6761x26,_0x6761x27,_0x6761x37,_0x6e43[133],_0x6761x28)})[_0x6e43[115]](function(_0x6761x24){console[_0x6e43[33]](_0x6e43[170],_0x6761x24[_0x6e43[114]]);_0x6761x28(_0x6761x24,{code:200,result:_0x6e43[153]})})};function saveAndPlayTTS(_0x6761x26,_0x6761x27,_0x6761x37,_0x6761x39,_0x6761x28){var _0x6761x3a={_saveName:_0x6e43[88],_savePath:_0x6e43[88],_convertedPath:_0x6e43[88]};var _0x6761x2f={url:_0x6761x37};_0x6761x3a[_0x6e43[173]]= sr({length:6});_0x6761x3a[_0x6e43[174]]= util[_0x6e43[38]](_0x6e43[175],_0x6761x3a._saveName);var _0x6761x3b=fs[_0x6e43[176]](_0x6761x3a._savePath);request[_0x6e43[202]](_0x6761x2f)[_0x6e43[34]](_0x6e43[33],function(_0x6761x24){console[_0x6e43[39]](_0x6e43[201],_0x6761x24)})[_0x6e43[34]](_0x6e43[150],function(_0x6761x3d){_0x6761x3b[_0x6e43[200]](_0x6761x3d)})[_0x6e43[34]](_0x6e43[177],function(){console[_0x6e43[39]](_0x6e43[178]);_0x6761x3b[_0x6e43[177]]();console[_0x6e43[39]](_0x6e43[179],_0x6761x3a._savePath);_0x6761x3a[_0x6e43[180]]= util[_0x6e43[38]](_0x6e43[181],_0x6761x3a._saveName);console[_0x6e43[39]](_0x6e43[182]);fs[_0x6e43[184]](_0x6761x3a._savePath,parseInt(_0x6e43[183],8));console[_0x6e43[39]](_0x6e43[185],_0x6761x3a._convertedPath);var _0x6761x3c=sox[_0x6e43[187]](_0x6761x3a._savePath,_0x6761x3a._convertedPath,{sampleRate:8000,format:_0x6e43[186],channelCount:1,bitRate:192* 1024,compressionQuality:5});_0x6761x3c[_0x6e43[34]](_0x6e43[33],function(_0x6761x24){console[_0x6e43[33]](_0x6e43[188],_0x6761x24);deleteTempFile(_0x6761x3a._savePath);_0x6761x28(_0x6761x24,{code:200,result:_0x6e43[153]})});_0x6761x3c[_0x6e43[34]](_0x6e43[177],function(){console[_0x6e43[39]](_0x6e43[189]);console[_0x6e43[39]](_0x6e43[190]);fs[_0x6e43[184]](_0x6761x3a._convertedPath,parseInt(_0x6e43[183],8));switch(_0x6761x39){case _0x6e43[133]:console[_0x6e43[39]](_0x6e43[191]);_0x6761x26[_0x6e43[52]](_0x6e43[136],util[_0x6e43[38]](_0x6e43[192],_0x6761x3a._saveName),function(_0x6761x24,_0x6761x29){if(_0x6761x24){console[_0x6e43[39]](_0x6e43[193],_0x6761x24)};console[_0x6e43[39]](_0x6e43[194]);deleteTempFile(_0x6761x3a._savePath);deleteTempFile(_0x6761x3a._convertedPath);_0x6761x28(_0x6761x24,{code:200,result:_0x6e43[153]})});break;case _0x6e43[199]:console[_0x6e43[39]](_0x6e43[195]);_0x6761x26[_0x6e43[45]](util[_0x6e43[38]](_0x6e43[196],util[_0x6e43[38]](_0x6e43[192],_0x6761x3a._saveName),_0x6761x27[_0x6e43[197]]),function(_0x6761x24,_0x6761x29){if(_0x6761x24){console[_0x6e43[39]](_0x6e43[198],_0x6761x24)};console[_0x6e43[39]](_0x6e43[194]);deleteTempFile(_0x6761x3a._savePath);deleteTempFile(_0x6761x3a._convertedPath);_0x6761x28(_0x6761x24,{code:200,result:_0x6e43[153]})});break;default:console[_0x6e43[39]](_0x6e43[191]);_0x6761x26[_0x6e43[52]](_0x6e43[136],util[_0x6e43[38]](_0x6e43[192],_0x6761x3a._saveName),function(_0x6761x24,_0x6761x29){if(_0x6761x24){console[_0x6e43[39]](_0x6e43[193],_0x6761x24)};console[_0x6e43[39]](_0x6e43[194]);deleteTempFile(_0x6761x3a._savePath);deleteTempFile(_0x6761x3a._convertedPath);_0x6761x28(_0x6761x24,{code:200,result:_0x6e43[153]})})}});_0x6761x3c[_0x6e43[68]]()})}function deleteTempFile(_0x6761x3f){Promise[_0x6e43[206]](fs[_0x6e43[205]])(_0x6761x3f)[_0x6e43[93]](function(){console[_0x6e43[39]](_0x6e43[203]+ _0x6761x3f+ _0x6e43[204])})[_0x6e43[115]](function(_0x6761x24){})}methods[_0x6e43[207]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[208]);var _0x6761x37=util[_0x6e43[38]](_0x6e43[209],_0x6761x27[_0x6e43[210]],encodeURIComponent(_0x6761x27[_0x6e43[167]]),_0x6761x27[_0x6e43[211]],_0x6761x27[_0x6e43[212]]);try{console[_0x6e43[39]](_0x6e43[213],_0x6761x37);console[_0x6e43[39]](_0x6e43[214]);saveAndPlayTTS(_0x6761x26,_0x6761x27,_0x6761x37,_0x6e43[199],_0x6761x28)}catch(err){console[_0x6e43[33]](_0x6e43[215],err);_0x6761x28(err,{code:200,result:_0x6e43[153]})}};methods[_0x6e43[216]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[217]);var _0x6761x29={};console[_0x6e43[39]](_0x6e43[139]+ _0x6761x27[_0x6e43[140]]+ _0x6e43[141]);if(_0x6761x27[_0x6e43[140]]> 0){_0x6761x27[_0x6e43[140]]--;getFilePath(_0x6761x27[_0x6e43[94]])[_0x6e43[93]](function(_0x6761x36){console[_0x6e43[39]](_0x6e43[142]);_0x6761x26[_0x6e43[45]](util[_0x6e43[38]](_0x6e43[143],_0x6761x36,parseInt(_0x6761x27[_0x6e43[117]])* 1000,_0x6761x27[_0x6e43[218]]),function(_0x6761x24,_0x6761x29){var _0x6761x2d={uniqueid:_0x6761x26[_0x6e43[80]],node:_0x6761x27[_0x6e43[81]],application:_0x6761x27[_0x6e43[82]],data:_0x6761x29[_0x6e43[145]]|| null,project_name:_0x6761x26[_0x6e43[83]],callerid:_0x6761x26[_0x6e43[84]],message:_0x6e43[85]};process[_0x6e43[45]](_0x6761x2d);_0x6761x29[_0x6e43[145]]= _0x6761x29[_0x6e43[145]][_0x6e43[147]](_0x6e43[146],_0x6e43[88])[_0x6e43[106]]();if(_0x6761x29[_0x6e43[145]][_0x6e43[148]]>= parseInt(_0x6761x27[_0x6e43[219]])){if(_0x6761x29[_0x6e43[145]]!== _0x6e43[149]){console[_0x6e43[39]](_0x6e43[220]);if(_0x6761x27[_0x6e43[125]]!== _0x6e43[149]){console[_0x6e43[39]](_0x6e43[151]);var _0x6761x32=getVariableName(_0x6761x27[_0x6e43[125]]);setVariable(_0x6761x26,_0x6761x32,_0x6e43[129]+ _0x6761x29[_0x6e43[145]]+ _0x6e43[129],function(){_0x6761x29= {code:200,result:_0x6e43[153],data:_0x6e43[221]};_0x6761x28(null,_0x6761x29)})}else {console[_0x6e43[39]](_0x6e43[222]);_0x6761x29= {code:200,result:_0x6e43[153],data:_0x6e43[223]};_0x6761x28(null,_0x6761x29)}}else {console[_0x6e43[39]](_0x6e43[224]);_0x6761x29= {code:500,result:_0x6e43[149]};_0x6761x28(null,_0x6761x29)}}else {console[_0x6e43[39]](_0x6e43[225]);_0x6761x29= {code:200,result:_0x6e43[153],data:_0x6e43[223]};_0x6761x28(null,_0x6761x29)}})})}else {console[_0x6e43[39]](_0x6e43[155]);_0x6761x29= {code:500,result:_0x6e43[149]};_0x6761x28(null,_0x6761x29)}};methods[_0x6e43[226]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[227]);var _0x6761x29={};console[_0x6e43[39]](_0x6e43[139]+ _0x6761x27[_0x6e43[140]]+ _0x6e43[141]);if(_0x6761x27[_0x6e43[140]]> 0){_0x6761x27[_0x6e43[140]]--;getFilePath(_0x6761x27[_0x6e43[94]])[_0x6e43[93]](function(_0x6761x36){console[_0x6e43[39]](_0x6e43[142]);_0x6761x26[_0x6e43[45]](util[_0x6e43[38]](_0x6e43[143],_0x6761x36,parseInt(_0x6761x27[_0x6e43[117]])* 1000,_0x6761x27[_0x6e43[218]]),function(_0x6761x24,_0x6761x29){var _0x6761x2d={uniqueid:_0x6761x26[_0x6e43[80]],node:_0x6761x27[_0x6e43[81]],application:_0x6761x27[_0x6e43[82]],data:_0x6761x29[_0x6e43[145]]|| null,project_name:_0x6761x26[_0x6e43[83]],callerid:_0x6761x26[_0x6e43[84]],message:_0x6e43[85]};_0x6761x29[_0x6e43[145]]= _0x6761x29[_0x6e43[145]][_0x6e43[147]](_0x6e43[146],_0x6e43[88])[_0x6e43[106]]();if(_0x6761x29[_0x6e43[145]][_0x6e43[148]]>= parseInt(_0x6761x27[_0x6e43[219]])){if(_0x6761x29[_0x6e43[145]]!== _0x6e43[149]){console[_0x6e43[39]](_0x6e43[220]);if(_0x6761x27[_0x6e43[125]]!== _0x6e43[149]){var _0x6761x40=_0x6761x29[_0x6e43[145]][_0x6e43[105]](_0x6e43[88]);var _0x6761x41=_0x6761x40[_0x6e43[148]];var _0x6761x42;var _0x6761x43=Number(_0x6761x27[_0x6e43[228]]);if(_0x6761x27[_0x6e43[229]]=== _0x6e43[230]){for(_0x6761x42= 0;_0x6761x42< _0x6761x43&& _0x6761x42< _0x6761x41;_0x6761x42++){_0x6761x40[_0x6761x42]= _0x6e43[231]}}else {for(_0x6761x42= _0x6761x41- 1;_0x6761x42>= 0&& _0x6761x43> 0;_0x6761x42--,_0x6761x43--){_0x6761x40[_0x6761x42]= _0x6e43[231]}};_0x6761x2d[_0x6e43[150]]= _0x6761x40[_0x6e43[67]](_0x6e43[88]);process[_0x6e43[45]](_0x6761x2d);console[_0x6e43[39]](_0x6e43[151]);var _0x6761x32=getVariableName(_0x6761x27[_0x6e43[125]]);setVariable(_0x6761x26,_0x6761x32,_0x6e43[129]+ _0x6761x29[_0x6e43[145]]+ _0x6e43[129],function(){_0x6761x29= {code:200,result:_0x6e43[153],data:_0x6e43[221]};_0x6761x28(null,_0x6761x29)})}else {process[_0x6e43[45]](_0x6761x2d);console[_0x6e43[39]](_0x6e43[222]);_0x6761x29= {code:200,result:_0x6e43[153]};_0x6761x28(null,_0x6761x29)}}else {process[_0x6e43[45]](_0x6761x2d);console[_0x6e43[39]](_0x6e43[224]);_0x6761x29= {code:500,result:_0x6e43[149]};_0x6761x28(null,_0x6761x29)}}else {process[_0x6e43[45]](_0x6761x2d);console[_0x6e43[39]](_0x6e43[225]);_0x6761x29= {code:200,result:_0x6e43[153],data:_0x6e43[223]};_0x6761x28(null,_0x6761x29)}})})}else {console[_0x6e43[39]](_0x6e43[155]);_0x6761x29= {code:500,result:_0x6e43[149]};_0x6761x28(null,_0x6761x29)}};methods[_0x6e43[232]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[233]);var _0x6761x44=sr({length:4});console[_0x6e43[39]](_0x6e43[234]);_0x6761x26[_0x6e43[45]](util[_0x6e43[38]](_0x6e43[235],path[_0x6e43[67]](config[_0x6e43[236]],_0x6e43[237],_0x6761x26[_0x6e43[80]]+ _0x6e43[238]+ _0x6761x44),_0x6761x27[_0x6e43[239]]|| _0x6e43[186],_0x6761x27[_0x6e43[162]],_0x6761x27[_0x6e43[62]]* 1000,null,true,null),function(_0x6761x24,_0x6761x29){if(_0x6761x29[_0x6e43[240]]=== 200&& _0x6761x29[_0x6e43[145]]!== _0x6e43[149]){SquareRecording[_0x6e43[252]]({uniqueid:_0x6761x26[_0x6e43[80]],callerid:_0x6761x26[_0x6e43[84]],calleridname:_0x6761x26[_0x6e43[244]],context:_0x6761x26[_0x6e43[245]],extension:_0x6761x26[_0x6e43[246]],priority:_0x6761x26[_0x6e43[247]],accountcode:_0x6761x26[_0x6e43[248]],dnid:_0x6761x26[_0x6e43[249]],project_name:_0x6761x26[_0x6e43[83]],saveName:_0x6761x26[_0x6e43[80]]+ _0x6e43[238]+ _0x6761x44,filename:_0x6761x27[_0x6e43[250]]|| null,savePath:path[_0x6e43[67]](config[_0x6e43[236]],_0x6e43[237],_0x6761x26[_0x6e43[80]]+ _0x6e43[238]+ _0x6761x44+ _0x6e43[251])})[_0x6e43[115]](function(_0x6761x24){console[_0x6e43[39]](_0x6e43[241]+ _0x6761x27[_0x6e43[82]]+ _0x6e43[242]+ _0x6761x27[_0x6e43[81]]+ _0x6e43[243],_0x6761x24)});console[_0x6e43[39]](_0x6e43[253]);_0x6761x26[_0x6e43[45]](util[_0x6e43[38]](_0x6e43[254],_0x6e43[255],_0x6761x26[_0x6e43[80]]+ _0x6e43[238]+ _0x6761x44),function(_0x6761x24,_0x6761x29){_0x6761x28(_0x6761x24,_0x6761x29)})}else {_0x6761x28(_0x6761x24,_0x6761x29)}})};methods[_0x6e43[256]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[257]);var _0x6761x29;var _0x6761x45=_0x6e43[258];var _0x6761x46;if(!collections[_0x6e43[259]]){getIntervals(false)};var _0x6761x47=_[_0x6e43[57]](collections[_0x6e43[259]],{id:parseInt(_0x6761x27[_0x6e43[260]])});if(!_0x6761x47[_0x6e43[261]]){_0x6761x46= _[_0x6e43[263]](collections[_0x6e43[259]],{IntervalId:parseInt(_0x6761x47[_0x6e43[262]])})};if(_0x6761x46){console[_0x6e43[39]](_0x6e43[264]);if(_0x6761x46[_0x6e43[148]]){console[_0x6e43[39]](_0x6e43[139]+ _0x6761x46[_0x6e43[148]]+ _0x6e43[265]);var _0x6761x48;console[_0x6e43[39]](_0x6e43[266]);_0x6761x46[_0x6e43[131]](function(_0x6761x33,_0x6761x34){_0x6761x48= splitInterval(_0x6761x33[_0x6e43[267]]);if(isIntervalValid(_0x6761x48)){console[_0x6e43[39]](_0x6e43[268]+ _0x6761x34+ _0x6e43[269]);_0x6761x45= _0x6e43[270]}})}else {console[_0x6e43[39]](_0x6e43[271]);_0x6761x45= _0x6e43[270]}}else {console[_0x6e43[39]](_0x6e43[272]);var _0x6761x49=splitInterval(_0x6761x47[_0x6e43[267]]);if(isIntervalValid(_0x6761x49)){console[_0x6e43[39]](_0x6e43[273]);_0x6761x45= _0x6e43[270]}};console[_0x6e43[39]](_0x6e43[274]+ _0x6761x45+ _0x6e43[275]);_0x6761x29= {code:200,result:_0x6e43[153],data:_0x6761x45};_0x6761x28(null,_0x6761x29)};methods[_0x6e43[276]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[277]);console[_0x6e43[39]](_0x6e43[278]);var _0x6761x32=getVariableName(_0x6761x27[_0x6e43[125]]);getVariable(_0x6761x26,_0x6761x32,function(_0x6761x24,_0x6761x29){if(!_0x6761x29[_0x6e43[150]]){_0x6761x29[_0x6e43[150]]= _0x6e43[156]};_0x6761x28(null,_0x6761x29)})};methods[_0x6e43[279]]= function(_0x6761x26,_0x6761x27,_0x6761x28){var _0x6761x2d={uniqueid:_0x6761x26[_0x6e43[80]],node:_0x6761x27[_0x6e43[81]],application:_0x6761x27[_0x6e43[82]],data:_0x6761x27[_0x6e43[280]]|| null,project_name:_0x6761x26[_0x6e43[83]],callerid:_0x6761x26[_0x6e43[84]],message:_0x6e43[85]};process[_0x6e43[45]](_0x6761x2d);var _0x6761x29={code:200,result:_0x6e43[281]};_0x6761x28(null,_0x6761x29)};methods[_0x6e43[282]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[283]);var _0x6761x2d={uniqueid:_0x6761x26[_0x6e43[80]],node:_0x6761x27[_0x6e43[81]],application:_0x6761x27[_0x6e43[82]],data:_0x6761x27[_0x6e43[284]],project_name:_0x6761x26[_0x6e43[83]],callerid:_0x6761x26[_0x6e43[84]],message:_0x6e43[85]};process[_0x6e43[45]](_0x6761x2d);var _0x6761x29;if(_0x6761x27[_0x6e43[284]]!== _0x6e43[149]){var _0x6761x4a=_[_0x6e43[57]](collections[_0x6e43[285]],{id:Number(_0x6761x27[_0x6e43[284]])});if(_0x6761x4a){var _0x6761x4b={from:[_0x6761x4a[_0x6e43[286]]],to:_0x6761x27[_0x6e43[287]][_0x6e43[105]](_0x6e43[66]),cc:_0x6761x27[_0x6e43[288]]?_0x6761x27[_0x6e43[288]][_0x6e43[105]](_0x6e43[66]):[],subject:_0x6761x27[_0x6e43[289]],html:_0x6761x27[_0x6e43[167]],voiceSource:_0x6761x26[_0x6e43[80]],auto:true,message:_0x6e43[290]};if(_0x6761x27[_0x6e43[291]]!== _0x6e43[149]){var _0x6761x4c=_[_0x6e43[57]](collections[_0x6e43[292]],{id:Number(_0x6761x27[_0x6e43[291]])});if(_0x6761x4c){var _0x6761x4d={from:_0x6761x4b[_0x6e43[293]],to:_0x6761x4b[_0x6e43[287]],cc:_0x6761x4b[_0x6e43[288]],subject:_0x6761x4b[_0x6e43[289]],body:_0x6761x4b[_0x6e43[294]]};_0x6761x4b[_0x6e43[289]]= _0x6761x4c[_0x6e43[289]]?Mustache[_0x6e43[295]](_0x6761x4c[_0x6e43[289]],_0x6761x4d):null;_0x6761x4b[_0x6e43[294]]= _0x6761x4c[_0x6e43[294]]?Mustache[_0x6e43[295]](_0x6761x4c[_0x6e43[294]],_0x6761x4d):null;process[_0x6e43[45]](_0x6761x4b);_0x6761x29= {code:200,result:_0x6e43[281]};_0x6761x28(null,_0x6761x29)}else {console[_0x6e43[39]](_0x6e43[296]);_0x6761x29= {code:200,result:_0x6e43[281]};_0x6761x28(null,_0x6761x29)}}else {process[_0x6e43[45]](_0x6761x4b);_0x6761x29= {code:200,result:_0x6e43[281]};_0x6761x28(null,_0x6761x29)}}else {console[_0x6e43[39]](_0x6761x27[_0x6e43[284]]?_0x6e43[297]:_0x6e43[298]);_0x6761x29= {code:200,result:_0x6e43[281]};_0x6761x28(null,_0x6761x29)}}else {console[_0x6e43[39]](_0x6e43[299]);_0x6761x29= {code:200,result:_0x6e43[281]};_0x6761x28(null,_0x6761x29)}};methods[_0x6e43[300]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[301]);var _0x6761x2d={uniqueid:_0x6761x26[_0x6e43[80]],node:_0x6761x27[_0x6e43[81]],application:_0x6761x27[_0x6e43[82]],data:_0x6761x27[_0x6e43[284]],project_name:_0x6761x26[_0x6e43[83]],callerid:_0x6761x26[_0x6e43[84]],message:_0x6e43[85]};process[_0x6e43[45]](_0x6761x2d);var _0x6761x4b={body:_0x6761x27[_0x6e43[302]],SmsAccountId:_0x6761x27[_0x6e43[284]],source:_0x6761x26[_0x6e43[80]],auto:true,message:_0x6e43[303]};var _0x6761x29;if(_0x6761x27[_0x6e43[284]]!== _0x6e43[149]){var _0x6761x4a=_[_0x6e43[57]](collections[_0x6e43[304]],{id:Number(_0x6761x27[_0x6e43[284]])});if(_0x6761x4a){if(_0x6761x4a[_0x6e43[305]]=== _0x6e43[306]){_0x6761x4b[_0x6e43[293]]= /^[\+][0-9]+$/[_0x6e43[307]](_0x6761x4a[_0x6e43[75]])?_0x6761x4a[_0x6e43[75]]:_0x6e43[308]+ _0x6761x4a[_0x6e43[75]];_0x6761x4b[_0x6e43[287]]= /^[\+][0-9]+$/[_0x6e43[307]](_0x6761x27[_0x6e43[287]])?_0x6761x27[_0x6e43[287]]:_0x6e43[308]+ _0x6761x27[_0x6e43[287]]}else {_0x6761x4b[_0x6e43[293]]= /^[\+][0-9]+$/[_0x6e43[307]](_0x6761x4a[_0x6e43[75]])?_0x6761x4a[_0x6e43[75]][_0x6e43[147]](_0x6e43[308],_0x6e43[88]):_0x6761x4a[_0x6e43[75]];_0x6761x4b[_0x6e43[287]]= /^[\+][0-9]+$/[_0x6e43[307]](_0x6761x27[_0x6e43[287]])?_0x6761x27[_0x6e43[287]][_0x6e43[147]](_0x6e43[308],_0x6e43[88]):_0x6761x27[_0x6e43[287]]};process[_0x6e43[45]](_0x6761x4b);_0x6761x29= {code:200,result:_0x6e43[281]};_0x6761x28(null,_0x6761x29)}else {console[_0x6e43[39]](_0x6e43[309]);_0x6761x29= {code:200,result:_0x6e43[281]};_0x6761x28(null,_0x6761x29)}}else {console[_0x6e43[39]](_0x6e43[299]);_0x6761x29= {code:200,result:_0x6e43[281]};_0x6761x28(null,_0x6761x29)}};methods[_0x6e43[310]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[311]);var _0x6761x2d={uniqueid:_0x6761x26[_0x6e43[80]],node:_0x6761x27[_0x6e43[81]],application:_0x6761x27[_0x6e43[82]],data:_[_0x6e43[106]](_0x6761x27[_0x6e43[312]])|| null,project_name:_0x6761x26[_0x6e43[83]],callerid:_0x6761x26[_0x6e43[84]],message:_0x6e43[85]};process[_0x6e43[45]](_0x6761x2d);console[_0x6e43[39]](_0x6e43[313]);sh[_0x6e43[52]](_[_0x6e43[106]](_0x6761x27[_0x6e43[312]]),function(_0x6761x25,_0x6761x4e){var _0x6761x4f=_0x6761x4e[_0x6e43[147]](/(\r\n|\n|\r)/gm,_0x6e43[88]);console[_0x6e43[39]](_0x6e43[314],_0x6761x4f);console[_0x6e43[39]](_0x6e43[315]);var _0x6761x32=getVariableName(_0x6761x27[_0x6e43[125]]);setVariable(_0x6761x26,_0x6761x32,_0x6e43[129]+ _0x6761x4f+ _0x6e43[129],_0x6761x28)})};methods[_0x6e43[2]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[316]);console[_0x6e43[39]](_0x6e43[317]);_0x6761x26[_0x6e43[52]](_0x6e43[318],_0x6761x27[_0x6e43[312]],_0x6761x27[_0x6e43[319]],function(_0x6761x24,_0x6761x29){_0x6761x28(_0x6761x24,_0x6761x29)})};methods[_0x6e43[320]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[321]);if(!collections[_0x6e43[322]]){getProjects(false)};var _0x6761x50=_[_0x6e43[57]](collections[_0x6e43[322]],{id:parseInt(_0x6761x27[_0x6e43[323]])});console[_0x6e43[39]](_0x6e43[324]+ _0x6761x50[_0x6e43[60]]+ _0x6e43[50]);_0x6761x26[_0x6e43[52]](_0x6e43[318],util[_0x6e43[38]](_0x6e43[325],_0x6761x50[_0x6e43[60]]),function(_0x6761x24,_0x6761x29){_0x6761x28(_0x6761x24,_0x6761x29)})};methods[_0x6e43[326]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[327]);wait[_0x6e43[130]](setVariable,_0x6761x26,_0x6e43[328],_0x6e43[329]);wait[_0x6e43[130]](setVariable,_0x6761x26,_0x6e43[116],_0x6e43[329]);wait[_0x6e43[130]](setVariable,_0x6761x26,_0x6e43[330],_0x6e43[329]);var _0x6761x51=wait[_0x6e43[130]](asr,_0x6761x26,_0x6761x27);if(!_[_0x6e43[331]](_0x6761x51)){console[_0x6e43[39]](_0x6e43[332]);_[_0x6e43[333]](_0x6761x51,function(_0x6761x52,_0x6761x53){wait[_0x6e43[130]](setVariable,_0x6761x26,_0x6761x53,_0x6e43[129]+ _0x6761x52+ _0x6e43[129])})}else {console[_0x6e43[39]](_0x6e43[334]);wait[_0x6e43[130]](setVariable,_0x6761x26,_0x6e43[335],_0x6e43[336])}};function asr(_0x6761x26,_0x6761x27,_0x6761x28){var _0x6761x3a={_saveName:_0x6e43[88],_savePath:_0x6e43[88],_convertedPath:_0x6e43[88]};var _0x6761x51={};_0x6761x3a[_0x6e43[173]]= sr({length:6});_0x6761x3a[_0x6e43[174]]= util[_0x6e43[38]](_0x6e43[181],_0x6761x3a._saveName);var _0x6761x55=util[_0x6e43[38]](_0x6e43[337],_0x6761x3a._savePath,_0x6761x27[_0x6e43[62]]?_0x6761x27[_0x6e43[62]]:_0x6e43[88]);if(_0x6761x27[_0x6e43[338]]&& _0x6761x27[_0x6e43[338]]!== _0x6e43[339]){_0x6761x55+= _0x6e43[340]};if(_0x6761x27[_0x6e43[197]]&& _0x6761x27[_0x6e43[197]]!== _0x6e43[341]){_0x6761x55+= _0x6e43[154]};_0x6761x26[_0x6e43[52]](_0x6e43[342],_0x6761x55,function(_0x6761x24,_0x6761x29){if(_0x6761x24){console[_0x6e43[39]](_0x6e43[343],_0x6761x24);_0x6761x28(_0x6761x24,null)}else {console[_0x6e43[39]](_0x6e43[344]);var _0x6761x37=util[_0x6e43[38]](_0x6e43[345],_0x6761x27[_0x6e43[210]],_0x6761x27[_0x6e43[346]]);if(_0x6761x27[_0x6e43[347]]&& _0x6761x27[_0x6e43[347]]!== _0x6e43[153]){_0x6761x37+= util[_0x6e43[38]](_0x6e43[348],encodeURIComponent(_0x6761x27[_0x6e43[347]]))}else {_0x6761x37+= _0x6e43[349]};console[_0x6e43[39]](_0x6e43[350]);Promise[_0x6e43[206]](fs[_0x6e43[363]])(_0x6761x3a._savePath)[_0x6e43[93]](function(_0x6761x31){console[_0x6e43[39]](_0x6e43[358]);var _0x6761x59= new Buffer(_0x6761x31,_0x6e43[360]).toString(_0x6e43[359]);_0x6761x37+= util[_0x6e43[38]](_0x6e43[361],_0x6761x59);var _0x6761x2f={url:_0x6761x37};console[_0x6e43[39]](_0x6e43[362]);return rp(_0x6761x2f)})[_0x6e43[93]](function(_0x6761x56){console[_0x6e43[39]](_0x6e43[353]);_0x6761x56= _0x6761x56[_0x6e43[105]](_0x6e43[354]);var _0x6761x57,_0x6761x58;_[_0x6e43[131]](_0x6761x56,function(_0x6761x33){_0x6761x57= _0x6761x33[_0x6e43[105]](_0x6e43[355]);if(_0x6761x57[_0x6e43[148]]=== 2){switch(_0x6761x57[0]){case _0x6e43[167]:_0x6761x51[_0x6e43[328]]= _0x6761x57[1][_0x6e43[147]](/\+/g,_0x6e43[356]);break;case _0x6e43[145]:if(_0x6761x57[1]=== _0x6e43[357]){_0x6761x51[_0x6e43[116]]= 0};break;case _0x6e43[330]:_0x6761x51[_0x6e43[330]]= decodeURIComponent(_0x6761x57[1]);break;case _0x6e43[114]:_0x6761x51[_0x6e43[335]]= decodeURIComponent(_0x6761x57[1][_0x6e43[147]](/\+/g,_0x6e43[356]));break;default:}}})})[_0x6e43[115]](function(_0x6761x24){console[_0x6e43[39]](_0x6e43[352],_0x6761x24)})[_0x6e43[112]](function(){console[_0x6e43[39]](_0x6e43[351]);deleteTempFile(_0x6761x3a._savePath);_0x6761x28(null,_0x6761x51)})}})}methods[_0x6e43[364]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[365]);if(!collections[_0x6e43[366]]){getDbConnections(false)};var _0x6761x5a=_[_0x6e43[57]](collections[_0x6e43[366]],{id:parseInt(_0x6761x27[_0x6e43[367]])});console[_0x6e43[39]](_0x6e43[368]);var _0x6761x2d={uniqueid:_0x6761x26[_0x6e43[80]],node:_0x6761x27[_0x6e43[81]],application:_0x6761x27[_0x6e43[82]],data:_0x6761x27[_0x6e43[369]]|| null,project_name:_0x6761x26[_0x6e43[83]],callerid:_0x6761x26[_0x6e43[84]],message:_0x6e43[85]};process[_0x6e43[45]](_0x6761x2d);try{db[_0x6e43[371]](_0x6761x5a[_0x6e43[370]]);var _0x6761x3d=db[_0x6e43[372]](_0x6761x27[_0x6e43[369]]);db[_0x6e43[373]]();setVariablesMatrix(_0x6761x26,_0x6761x27,_0x6761x28,_0x6761x3d)}catch(e){console[_0x6e43[39]](e[_0x6e43[114]]);wait[_0x6e43[130]](setVariable,_0x6761x26,_0x6e43[374],_0x6e43[270]);wait[_0x6e43[130]](setVariable,_0x6761x26,_0x6e43[375],_0x6e43[129]+ e[_0x6e43[114]]+ _0x6e43[129])}};methods[_0x6e43[376]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[377]);console[_0x6e43[39]](_0x6e43[378]+ _0x6761x27[_0x6e43[246]]+ _0x6e43[379]);_0x6761x26[_0x6e43[52]](_0x6e43[65],util[_0x6e43[38]](_0x6e43[380],_0x6761x27[_0x6e43[246]],_0x6761x27[_0x6e43[245]]),function(_0x6761x24,_0x6761x29){_0x6761x28(_0x6761x24,_0x6761x29)})};methods[_0x6e43[381]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[382]);var _0x6761x29={code:200,result:_0x6e43[153]};_0x6761x26[_0x6e43[52]](_0x6e43[383],_0x6e43[384]+ _0x6761x27[_0x6e43[385]]+ _0x6e43[129],function(_0x6761x24,_0x6761x29){console[_0x6e43[39]](_0x6e43[386]);try{_0x6761x29[_0x6e43[150]]= String(eval(_0x6761x27[_0x6e43[385]])?_0x6e43[270]:_0x6e43[258])}catch(_0x6761x24){console[_0x6e43[39]](_0x6e43[387]);_0x6761x29[_0x6e43[150]]= _0x6e43[258]};console[_0x6e43[39]](_0x6e43[388]+ _0x6761x29[_0x6e43[150]]);_0x6761x28(null,_0x6761x29)})};methods[_0x6e43[389]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[390]);console[_0x6e43[39]](_0x6e43[391]);_0x6761x26[_0x6e43[389]]()};methods[_0x6e43[392]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[393]);var _0x6761x4e=(_0x6761x27[_0x6e43[394]])?_0x6e43[129]+ _0x6761x27[_0x6e43[394]]+ _0x6e43[129]:_0x6e43[129]+ _0x6761x27[_0x6e43[81]]+ _0x6e43[129];console[_0x6e43[39]](_0x6e43[395]+ _0x6761x4e);_0x6761x26[_0x6e43[52]](_0x6e43[383],_0x6761x4e,function(_0x6761x24,_0x6761x29){_0x6761x28(_0x6761x24,_0x6761x29)})};methods[_0x6e43[396]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[397]);console[_0x6e43[39]](_0x6e43[398]);_0x6761x26[_0x6e43[45]](util[_0x6e43[38]](_0x6e43[399],_0x6761x27[_0x6e43[400]],_0x6761x27[_0x6e43[162]]),function(_0x6761x24,_0x6761x29){_0x6761x28(_0x6761x24,_0x6761x29)})};methods[_0x6e43[401]]= function(_0x6761x26,_0x6761x27,_0x6761x28){console[_0x6e43[39]](_0x6e43[402]);console[_0x6e43[39]](_0x6e43[403]);var _0x6761x32=getVariableName(_0x6761x27[_0x6e43[125]]);wait[_0x6e43[130]](setVariable,_0x6761x26,_0x6761x32,_0x6e43[129]+ _0x6761x27[_0x6e43[404]]+ _0x6e43[129])};function getVertices(_0x6761x5c){return _[_0x6e43[408]](_0x6761x5c,function(_0x6761x31,_0x6761x5d,_0x6761x5e){if(_0x6761x5e=== _0x6e43[405]){return _0x6761x31};if(_[_0x6e43[126]](_0x6761x5d)){_[_0x6e43[407]](_0x6761x5d,function(_0x6761x52,_0x6761x53){_0x6761x31[_0x6761x52[_0x6e43[406]][_0x6e43[262]]]= _0x6761x52[_0x6e43[406]];_0x6761x31[_0x6761x52[_0x6e43[406]][_0x6e43[262]]][_0x6e43[82]]= _0x6761x5e});return _0x6761x31};_0x6761x31[_0x6761x5d[_0x6e43[406]][_0x6e43[262]]]= _0x6761x5d[_0x6e43[406]];_0x6761x31[_0x6761x5d[_0x6e43[406]][_0x6e43[262]]][_0x6e43[82]]= _0x6761x5e;return _0x6761x31},{})}function getTargetBySource(_0x6761x5c,_0x6761x60,_0x6761x52,_0x6761x61){return _[_0x6e43[145]](_[_0x6e43[57]](_0x6761x5c[_0x6e43[405]],function(_0x6761x5d){if(_0x6761x5d[_0x6e43[406]][_0x6e43[409]]&& _0x6761x5d[_0x6e43[406]][_0x6e43[410]]){if(_0x6761x5d[_0x6e43[406]][_0x6e43[410]]=== _0x6761x60){if(_0x6761x5d[_0x6e43[406]][_0x6e43[411]]&& _0x6761x5d[_0x6e43[406]][_0x6e43[411]]!== _0x6761x52){if(_0x6761x61){var _0x6761x62=_0x6761x5d[_0x6e43[406]][_0x6e43[411]][_0x6e43[105]](_0x6e43[66]);if(_[_0x6e43[412]](_0x6761x62,_0x6761x52)){return true}};return false};return true}};return false}),_0x6e43[413])}function recurReplace(_0x6761x64,_0x6761x26,_0x6761x65){var _0x6761x66=0,_0x6761x67={},_0x6761x42;var _0x6761x68=0;for(_0x6761x42= 0;_0x6761x42< _0x6761x64[_0x6e43[148]];_0x6761x42++){if(_0x6761x64[_0x6e43[414]](_0x6761x42)=== _0x6e43[415]){if(_0x6761x68=== 0){_0x6761x66= _0x6761x42};_0x6761x68++};if(_0x6761x64[_0x6e43[414]](_0x6761x42)=== _0x6e43[416]){_0x6761x68--;if(_0x6761x68=== 0){_0x6761x67[_0x6761x64[_0x6e43[417]](_0x6761x66+ 1,_0x6761x42)]= _0x6761x64[_0x6e43[417]](_0x6761x66+ 1,_0x6761x42)}}};if(Object[_0x6e43[418]](_0x6761x67)[_0x6e43[148]]!== 0){for(var _0x6761x53 in _0x6761x67){_0x6761x67[_0x6761x53]= recurReplace(_0x6761x53,_0x6761x26)};for(var _0x6761x69 in _0x6761x67){_0x6761x64= _0x6761x64[_0x6e43[147]]( new RegExp(_0x6e43[415]+ _0x6761x69[_0x6e43[147]](/[.*+?^${}()|[\]\\]/g,_0x6e43[419])+ _0x6e43[416],_0x6e43[420]),_0x6761x67[_0x6761x69])}};if(_0x6761x65){return _0x6761x64}else {var _0x6761x52=wait[_0x6e43[130]](getVariable,_0x6761x26,_0x6761x64);return _0x6761x52[_0x6e43[150]]|| _0x6e43[415]+ _0x6761x64+ _0x6e43[416]}}function replaceAllVariables(_0x6761x26,_0x6761x27,_0x6761x28){var _0x6761x6b=_[_0x6e43[421]](_0x6761x27);for(var _0x6761x53 in _0x6761x6b){_0x6761x6b[_0x6761x53]= recurReplace(_0x6761x6b[_0x6761x53],_0x6761x26,true);console[_0x6e43[39]](_0x6e43[422],_0x6761x6b[_0x6761x53])};return _0x6761x6b}function xstart(_0x6761x26){var _0x6761x5c=_0x6761x26[_0x6e43[236]];var _0x6761x6d=_0x6761x26[_0x6e43[423]];if(_0x6761x5c[_0x6e43[68]]){if(!_[_0x6e43[126]](_0x6761x5c[_0x6e43[68]])){var _0x6761x60=_0x6761x5c[_0x6e43[68]][_0x6e43[406]][_0x6e43[262]];var _0x6761x29={};do{try{var _0x6761x27=replaceAllVariables(_0x6761x26,_0x6761x6d[_0x6761x60]);if(_0x6761x27){if(_[_0x6e43[424]](methods[_0x6761x27[_0x6e43[82]]])){_0x6761x29= wait[_0x6e43[130]](methods[_0x6761x27[_0x6e43[82]]],_0x6761x26,_0x6761x27)}else {_0x6761x29= wait[_0x6e43[130]](methods[_0x6e43[392]],_0x6761x26,_0x6761x27)};if(_0x6761x29[_0x6e43[240]]=== 200&& _0x6761x29[_0x6e43[145]]!== _0x6e43[149]){if(_0x6761x27[_0x6e43[82]]=== _0x6e43[137]|| _0x6761x27[_0x6e43[82]]=== _0x6e43[216]|| _0x6761x27[_0x6e43[82]]=== _0x6e43[226]){_0x6761x6d[_0x6761x60][_0x6e43[140]]= _0x6761x27[_0x6e43[140]]};var _0x6761x6e=getTargetBySource(_0x6761x5c,_0x6761x60,_0x6761x29[_0x6e43[150]],_0x6761x27[_0x6e43[82]]=== _0x6e43[137]);if(!_0x6761x6e){if(_0x6761x27[_0x6e43[82]]=== _0x6e43[137]){if(_0x6761x27[_0x6e43[140]]> 0){_0x6761x6e= getTargetBySource(_0x6761x5c,_0x6761x60,_0x6e43[223],true);if(!_0x6761x6e){_0x6761x6e= _0x6761x60}}else {_0x6761x6e= getTargetBySource(_0x6761x5c,_0x6761x60,_0x6e43[156],true)}};if((_0x6761x27[_0x6e43[82]]=== _0x6e43[216]|| _0x6761x27[_0x6e43[82]]=== _0x6e43[226])&& _0x6761x27[_0x6e43[140]]> 0){_0x6761x6e= _0x6761x60};if(_0x6761x27[_0x6e43[82]]=== _0x6e43[276]&& _0x6761x29[_0x6e43[150]]!== _0x6e43[156]){_0x6761x6e= getTargetBySource(_0x6761x5c,_0x6761x60,_0x6e43[156])}};_0x6761x60= _0x6761x6e}else {_0x6761x60= null}}else {_0x6761x60= null}}catch(err){console[_0x6e43[39]](err)}}while(_0x6761x60);;console[_0x6e43[39]](_0x6e43[425]);_0x6761x26[_0x6e43[389]]()}}}function xfinally(_0x6761x26){var _0x6761x5c=_0x6761x26[_0x6e43[236]];var _0x6761x6d=_0x6761x26[_0x6e43[423]];if(_0x6761x5c[_0x6e43[112]]){if(!_[_0x6e43[126]](_0x6761x5c[_0x6e43[112]])){var _0x6761x60=_0x6761x5c[_0x6e43[112]][_0x6e43[406]][_0x6e43[262]];var _0x6761x29={};do{try{var _0x6761x27=_0x6761x6d[_0x6761x60][_0x6e43[426]]?_0x6761x6d[_0x6761x60]:replaceAllVariables(_0x6761x26,_0x6761x6d[_0x6761x60]);if(_0x6761x27){if(_[_0x6e43[424]](methods[_0x6761x27[_0x6e43[82]]])){_0x6761x29= wait[_0x6e43[130]](methods[_0x6761x27[_0x6e43[82]]],_0x6761x26,_0x6761x27)}else {_0x6761x29= wait[_0x6e43[130]](methods[_0x6e43[392]],_0x6761x26,_0x6761x27)};if(_0x6761x29[_0x6e43[240]]=== 200&& _0x6761x29[_0x6e43[145]]!== _0x6e43[149]){var _0x6761x6e=getTargetBySource(_0x6761x5c,_0x6761x60,_0x6761x29[_0x6e43[150]],_0x6761x27[_0x6e43[82]]=== _0x6e43[137]);if(!_0x6761x6e){if(_0x6761x27[_0x6e43[82]]=== _0x6e43[137]){if(_0x6761x27[_0x6e43[140]]> 0){_0x6761x6e= getTargetBySource(_0x6761x5c,_0x6761x60,_0x6e43[223],true);if(!_0x6761x6e){_0x6761x6e= _0x6761x60}}else {_0x6761x6e= getTargetBySource(_0x6761x5c,_0x6761x60,_0x6e43[156],true)}};if(_0x6761x27[_0x6e43[82]]=== _0x6e43[216]&& _0x6761x27[_0x6e43[140]]> 0){_0x6761x6e= _0x6761x60};if(_0x6761x27[_0x6e43[82]]=== _0x6e43[276]&& _0x6761x29[_0x6e43[150]]!== _0x6e43[156]){_0x6761x6e= getTargetBySource(_0x6761x5c,_0x6761x60,_0x6e43[156])}};_0x6761x60= _0x6761x6e}else {_0x6761x60= null}}else {_0x6761x60= null}}catch(err){console[_0x6e43[39]](err)}}while(_0x6761x60);;_0x6761x26[_0x6e43[389]]();console[_0x6e43[39]](_0x6e43[427])}};_0x6761x26[_0x6e43[177]]()}function main(_0x6761x26){_0x6761x26[_0x6e43[34]](_0x6e43[33],function(_0x6761x24){console[_0x6e43[39]](_0x6e43[428],_0x6761x24)});_0x6761x26[_0x6e43[34]](_0x6e43[35],function(){console[_0x6e43[39]](_0x6e43[429])});_0x6761x26[_0x6e43[34]](_0x6e43[389],function(){if(_0x6761x26[_0x6e43[112]]){_0x6761x26[_0x6e43[112]]= false;console[_0x6e43[39]](_0x6e43[430]);wait[_0x6e43[431]](xfinally,_0x6761x26)}else {process[_0x6e43[45]]({message:_0x6e43[432],uniqueid:_0x6761x26[_0x6e43[80]],leaveAt:moment()[_0x6e43[38]](_0x6e43[107])});console[_0x6e43[39]](_0x6e43[433])}});_0x6761x26[_0x6e43[34]](_0x6e43[117],function(_0x6761x29){});_0x6761x26[_0x6e43[34]](_0x6e43[434],function(_0x6761x51){console[_0x6e43[39]](_0x6761x51);console[_0x6e43[39]](_0x6e43[435]+ _0x6761x51[_0x6e43[436]]+ _0x6e43[437]+ _0x6761x51[_0x6e43[438]]);var _0x6761x71={network:_0x6761x51[_0x6e43[439]],network_script:_0x6761x51[_0x6e43[440]],request:_0x6761x51[_0x6e43[441]],channel:_0x6761x51[_0x6e43[442]],language:_0x6761x51[_0x6e43[443]],type:_0x6761x51[_0x6e43[444]],uniqueid:_0x6761x51[_0x6e43[438]],version:_0x6761x51[_0x6e43[445]],callerid:_0x6761x51[_0x6e43[436]],calleridname:_0x6761x51[_0x6e43[446]],callingpres:_0x6761x51[_0x6e43[447]],callingani2:_0x6761x51[_0x6e43[448]],callington:_0x6761x51[_0x6e43[449]],callingtns:_0x6761x51[_0x6e43[450]],dnid:_0x6761x51[_0x6e43[451]],rdnis:_0x6761x51[_0x6e43[452]],context:_0x6761x51[_0x6e43[453]],extension:_0x6761x51[_0x6e43[454]],priority:_0x6761x51[_0x6e43[455]],enhanced:_0x6761x51[_0x6e43[456]],accountcode:_0x6761x51[_0x6e43[457]],threadid:_0x6761x51[_0x6e43[458]],project_name:_0x6761x51[_0x6e43[459]],joinAt:moment()[_0x6e43[38]](_0x6e43[107]),message:_0x6e43[252]};process[_0x6e43[45]](_0x6761x71);if(_0x6761x51[_0x6e43[459]]){SquareProject[_0x6e43[467]]({where:{name:_0x6761x51[_0x6e43[459]]},attributes:[_0x6e43[262],_0x6e43[461]]})[_0x6e43[93]](function(_0x6761x50){if(_0x6761x50){if(_0x6761x50[_0x6e43[461]]){xml[_0x6e43[464]](_0x6761x50[_0x6e43[461]],{normalizeTags:true,explicitArray:false},function(_0x6761x24,_0x6761x31){var _0x6761x5c=_0x6761x31[_0x6e43[462]][_0x6e43[236]];if(_0x6761x5c){_0x6761x26[_0x6e43[236]]= _0x6761x5c;_0x6761x26[_0x6e43[112]]= true;_0x6761x26[_0x6e43[80]]= _0x6761x51[_0x6e43[438]];_0x6761x26[_0x6e43[84]]= _0x6761x51[_0x6e43[436]];_0x6761x26[_0x6e43[244]]= _0x6761x51[_0x6e43[446]];_0x6761x26[_0x6e43[245]]= _0x6761x51[_0x6e43[453]];_0x6761x26[_0x6e43[246]]= _0x6761x51[_0x6e43[454]];_0x6761x26[_0x6e43[247]]= _0x6761x51[_0x6e43[455]];_0x6761x26[_0x6e43[248]]= _0x6761x51[_0x6e43[457]];_0x6761x26[_0x6e43[249]]= _0x6761x51[_0x6e43[451]];_0x6761x26[_0x6e43[83]]= _0x6761x51[_0x6e43[459]];_0x6761x26[_0x6e43[423]]= getVertices(_0x6761x5c);wait[_0x6e43[431]](xstart,_0x6761x26)}else {console[_0x6e43[39]](_0x6e43[463]);_0x6761x26[_0x6e43[177]]()}})}else {console[_0x6e43[39]](_0x6e43[465]);_0x6761x26[_0x6e43[177]]()}}else {console[_0x6e43[39]](_0x6e43[466]);_0x6761x26[_0x6e43[177]]()}})[_0x6e43[115]](function(_0x6761x24){console[_0x6e43[39]](_0x6e43[460],_0x6761x24);_0x6761x26[_0x6e43[177]]()})}else {console[_0x6e43[39]](_0x6e43[468]);_0x6761x26[_0x6e43[177]]()}})}function splitInterval(_0x6761x47){var _0x6761x73={};var _0x6761x49=_0x6761x47[_0x6e43[105]](_0x6e43[66]);var _0x6761x74;_0x6761x49[_0x6e43[131]](function(_0x6761x75,_0x6761x34){switch(_0x6761x34){case 0:if(_0x6761x75!== _0x6e43[231]){_0x6761x74= _0x6761x75[_0x6e43[105]](_0x6e43[156]);_0x6761x73[_0x6e43[469]]= moment(_0x6761x74[0],_0x6e43[470]);_0x6761x73[_0x6e43[471]]= moment(_0x6761x74[1],_0x6e43[470])}else {_0x6761x73[_0x6e43[469]]= null;_0x6761x73[_0x6e43[471]]= null};break;case 1:if(_0x6761x75!== _0x6e43[231]){_0x6761x74= _0x6761x75[_0x6e43[105]](_0x6e43[156]);_0x6761x73[_0x6e43[472]]= weekDaysCollection[_0x6761x74[0]];_0x6761x73[_0x6e43[473]]= _0x6761x74[1]?weekDaysCollection[_0x6761x74[1]]:null}else {_0x6761x73[_0x6e43[472]]= null;_0x6761x73[_0x6e43[473]]= null};break;case 2:if(_0x6761x75!== _0x6e43[231]){_0x6761x74= _0x6761x75[_0x6e43[105]](_0x6e43[156]);_0x6761x73[_0x6e43[474]]= _0x6761x74[0];_0x6761x73[_0x6e43[475]]= _0x6761x74[1]?_0x6761x74[1]:null}else {_0x6761x73[_0x6e43[474]]= null;_0x6761x73[_0x6e43[475]]= null};break;case 3:if(_0x6761x75!== _0x6e43[231]){_0x6761x74= _0x6761x75[_0x6e43[105]](_0x6e43[156]);_0x6761x73[_0x6e43[476]]= monthsCollection[_0x6761x74[0]];_0x6761x73[_0x6e43[477]]= _0x6761x74[1]?monthsCollection[_0x6761x74[1]]:null}else {_0x6761x73[_0x6e43[476]]= null;_0x6761x73[_0x6e43[477]]= null};break;default:}});return _0x6761x73}function isIntervalValid(_0x6761x47){var _0x6761x77=moment()[_0x6e43[38]](_0x6e43[470]);var _0x6761x78=moment()[_0x6e43[38]](_0x6e43[478]);var _0x6761x79=moment()[_0x6e43[38]](_0x6e43[479]);var _0x6761x7a=moment()[_0x6e43[38]](_0x6e43[480]);console[_0x6e43[39]](_0x6e43[481],_0x6761x77,_0x6e43[482],_0x6761x78,_0x6e43[483],_0x6761x79,_0x6e43[484],_0x6761x7a);console[_0x6e43[39]](_0x6e43[485]);console[_0x6e43[39]](_0x6e43[486],moment(_0x6761x47[_0x6e43[469]],_0x6e43[470])[_0x6e43[38]](_0x6e43[470]),_0x6e43[487],moment(_0x6761x47[_0x6e43[471]],_0x6e43[470])[_0x6e43[38]](_0x6e43[470]));console[_0x6e43[39]](_0x6e43[488],_0x6761x47[_0x6e43[472]],_0x6e43[487],_0x6761x47[_0x6e43[473]]);console[_0x6e43[39]](_0x6e43[489],_0x6761x47[_0x6e43[474]],_0x6e43[487],_0x6761x47[_0x6e43[475]]);console[_0x6e43[39]](_0x6e43[490],_0x6761x47[_0x6e43[476]],_0x6e43[487],_0x6761x47[_0x6e43[477]]);var _0x6761x7b,_0x6761x7c,_0x6761x7d,_0x6761x7e;var _0x6761x7f=[1,2,3,4,5,6,7,8,9,10,11,12];var _0x6761x80=[1,2,3,4,5,6,7];var _0x6761x81=[];for(var _0x6761x42=1;_0x6761x42<= 31;_0x6761x42++){_0x6761x81[_0x6e43[491]](_0x6761x42)};_0x6761x7b= (_0x6761x47[_0x6e43[469]]&& _0x6761x47[_0x6e43[471]])?moment(_0x6761x77,_0x6e43[470])[_0x6e43[492]](moment(_0x6761x47[_0x6e43[469]],_0x6e43[470]),moment(_0x6761x47[_0x6e43[471]],_0x6e43[470])):true;if(_0x6761x47[_0x6e43[472]]){if(_0x6761x47[_0x6e43[473]]){var _0x6761x82=_[_0x6e43[263]](_0x6761x80,function(_0x6761x33){return (_0x6761x33>= _0x6761x47[_0x6e43[472]])&& (_0x6761x33<= _0x6761x47[_0x6e43[473]])});console[_0x6e43[39]](_0x6e43[493],_0x6761x82);_0x6761x7c= (_0x6761x82[_0x6e43[494]](parseInt(_0x6761x78))!== -1)?true:false}else {_0x6761x7c= (parseInt(_0x6761x78)=== _0x6761x47[_0x6e43[472]])?true:false}}else {_0x6761x7c= true};if(_0x6761x47[_0x6e43[474]]){if(_0x6761x47[_0x6e43[475]]){var _0x6761x83=_[_0x6e43[263]](_0x6761x81,function(_0x6761x33){return (_0x6761x33>= _0x6761x47[_0x6e43[474]])&& (_0x6761x33<= _0x6761x47[_0x6e43[475]])});console[_0x6e43[39]](_0x6e43[495],_0x6761x83);_0x6761x7d= (_0x6761x83[_0x6e43[494]](parseInt(_0x6761x79))!== -1)?true:false}else {_0x6761x7d= (parseInt(_0x6761x79)=== _0x6761x47[_0x6e43[474]])?true:false}}else {_0x6761x7d= true};if(_0x6761x47[_0x6e43[476]]){if(_0x6761x47[_0x6e43[477]]){var _0x6761x84=_[_0x6e43[263]](_0x6761x7f,function(_0x6761x33){return (_0x6761x33>= _0x6761x47[_0x6e43[476]])&& (_0x6761x33<= _0x6761x47[_0x6e43[477]])});console[_0x6e43[39]](_0x6e43[496],_0x6761x84);_0x6761x7e= (_0x6761x84[_0x6e43[494]](parseInt(_0x6761x7a))!== -1)?true:false}else {_0x6761x7e= (parseInt(_0x6761x7a)=== _0x6761x47[_0x6e43[476]])?true:false}}else {_0x6761x7e= true};console[_0x6e43[39]](_0x6e43[497],_0x6761x7b,_0x6e43[498],_0x6761x7c,_0x6e43[499],_0x6761x7d,_0x6e43[500],_0x6761x7e);return _0x6761x7b&& _0x6761x7c&& _0x6761x7d&& _0x6761x7e}function setVariable(_0x6761x26,_0x6761x86,_0x6761x52,_0x6761x28){console[_0x6e43[39]](_0x6e43[501]);console[_0x6e43[39]](_0x6e43[502]+ _0x6761x86+ _0x6e43[503],_0x6761x52);_0x6761x26[_0x6e43[45]](util[_0x6e43[38]](_0x6e43[254],_0x6761x86,_0x6761x52),function(_0x6761x24,_0x6761x29){if(_0x6761x28){_0x6761x28(_0x6761x24,_0x6761x29)}})}function getVariableName(_0x6761x88){if(!collections[_0x6e43[434]]){getVariables(false)};var _0x6761x89={name:_0x6e43[504]};var _0x6761x8a;if(_0x6761x88){_0x6761x8a= _[_0x6e43[57]](collections[_0x6e43[434]],{id:parseInt(_0x6761x88)})};return _0x6761x8a?_0x6761x8a[_0x6e43[60]]:_0x6761x89[_0x6e43[60]]}function setVariablesMatrix(_0x6761x26,_0x6761x27,_0x6761x28,_0x6761x3d){if(_0x6761x3d&& _0x6761x3d[_0x6e43[148]]){var _0x6761x32=getVariableName(_0x6761x27[_0x6e43[125]]);_[_0x6e43[131]](_0x6761x3d,function(_0x6761x8c,_0x6761x34){_[_0x6e43[333]](_0x6761x8c,function(_0x6761x52,_0x6761x53){wait[_0x6e43[130]](setVariable,_0x6761x26,_0x6761x32+ _0x6e43[127]+ _0x6761x34+ _0x6e43[505]+ _0x6761x53+ _0x6e43[128],_0x6e43[129]+ _0x6761x52+ _0x6e43[129])})});wait[_0x6e43[130]](setVariable,_0x6761x26,_0x6761x32+ _0x6e43[506],_0x6761x3d[_0x6e43[148]])}else {_0x6761x28(null,{code:200,result:0})}}function getVariable(_0x6761x26,_0x6761x86,_0x6761x28){_0x6761x26[_0x6e43[510]](_0x6761x86,function(_0x6761x24,_0x6761x29){if(_0x6761x29[_0x6e43[240]]=== 200&& _0x6761x29[_0x6e43[145]]!== _0x6e43[153]){_0x6761x29[_0x6e43[150]]= _0x6761x29[_0x6e43[145]][_0x6e43[417]](_0x6761x29[_0x6e43[145]][_0x6e43[508]](_0x6e43[507])+ 1,_0x6761x29[_0x6e43[145]][_0x6e43[508]](_0x6e43[509]))}else {_0x6761x29[_0x6e43[150]]= _0x6e43[88]};_0x6761x28(null,_0x6761x29)})}function getFilePath(_0x6761x88){if(!collections[_0x6e43[511]]){getSounds(false)};return Setting[_0x6e43[467]]()[_0x6e43[93]](function(_0x6761x31){if(_0x6761x88!== _0x6e43[149]){if(_0x6761x31){var _0x6761x3f=_[_0x6e43[57]](collections[_0x6e43[511]],{id:parseInt(_0x6761x88)});return util[_0x6e43[38]](_0x6e43[512],_0x6761x31[_0x6e43[513]]|| _0x6e43[514],_0x6761x3f[_0x6e43[515]])};return _0x6e43[88]}else {return _0x6e43[88]}})[_0x6e43[115]](function(_0x6761x24){console[_0x6e43[39]](_0x6761x24)})}function getUsers(_0x6761x90){return User[_0x6e43[516]]()[_0x6e43[93]](function(_0x6761x31){collections[_0x6e43[55]]= _[_0x6e43[421]](_0x6761x31);if(_0x6761x90){synchUpdates(_0x6e43[24],_0x6e43[55],_0x6e43[262])}})[_0x6e43[115]](function(_0x6761x24){console[_0x6e43[39]](_0x6761x24)})}function getQueues(_0x6761x90){return VoiceQueue[_0x6e43[516]]()[_0x6e43[93]](function(_0x6761x31){collections[_0x6e43[78]]= _[_0x6e43[421]](_0x6761x31);if(_0x6761x90){synchUpdates(_0x6e43[25],_0x6e43[78],_0x6e43[60])}})[_0x6e43[115]](function(_0x6761x24){console[_0x6e43[39]](_0x6761x24)})}function getVariables(_0x6761x90){return Variable[_0x6e43[516]]()[_0x6e43[93]](function(_0x6761x31){collections[_0x6e43[434]]= _[_0x6e43[421]](_0x6761x31);if(_0x6761x90){synchUpdates(_0x6e43[21],_0x6e43[434],_0x6e43[262])}})[_0x6e43[115]](function(_0x6761x24){console[_0x6e43[39]](_0x6761x24)})}function getDbConnections(_0x6761x90){return SquareOdbc[_0x6e43[516]]()[_0x6e43[93]](function(_0x6761x31){collections[_0x6e43[366]]= _[_0x6e43[421]](_0x6761x31);if(_0x6761x90){synchUpdates(_0x6e43[22],_0x6e43[366],_0x6e43[262])}})[_0x6e43[115]](function(_0x6761x24){console[_0x6e43[39]](_0x6761x24)})}function getIntervals(_0x6761x90){return Interval[_0x6e43[516]]()[_0x6e43[93]](function(_0x6761x31){collections[_0x6e43[259]]= _[_0x6e43[421]](_0x6761x31);if(_0x6761x90){synchUpdates(_0x6e43[26],_0x6e43[259])}})[_0x6e43[115]](function(_0x6761x24){console[_0x6e43[39]](_0x6761x24)})}function getProjects(_0x6761x90){return SquareProject[_0x6e43[516]]()[_0x6e43[93]](function(_0x6761x31){collections[_0x6e43[322]]= _[_0x6e43[421]](_0x6761x31);if(_0x6761x90){synchUpdates(_0x6e43[19],_0x6e43[322],_0x6e43[262])}})[_0x6e43[115]](function(_0x6761x24){console[_0x6e43[39]](_0x6761x24)})}function getSounds(_0x6761x90){return Sound[_0x6e43[516]]()[_0x6e43[93]](function(_0x6761x31){collections[_0x6e43[511]]= _[_0x6e43[421]](_0x6761x31);if(_0x6761x90){synchUpdates(_0x6e43[27],_0x6e43[511],_0x6e43[262])}})[_0x6e43[115]](function(_0x6761x24){console[_0x6e43[39]](_0x6761x24)})}function getMailServerOut(_0x6761x90){return MailServerOut[_0x6e43[516]]()[_0x6e43[93]](function(_0x6761x31){collections[_0x6e43[285]]= _[_0x6e43[421]](_0x6761x31);if(_0x6761x90){synchUpdates(_0x6e43[30],_0x6e43[285],_0x6e43[262])}})[_0x6e43[115]](function(_0x6761x24){console[_0x6e43[39]](_0x6761x24)})}function getTemplates(_0x6761x90){return Template[_0x6e43[516]]()[_0x6e43[93]](function(_0x6761x31){collections[_0x6e43[292]]= _[_0x6e43[421]](_0x6761x31);if(_0x6761x90){synchUpdates(_0x6e43[32],_0x6e43[292],_0x6e43[262])}})[_0x6e43[115]](function(_0x6761x24){console[_0x6e43[39]](_0x6761x24)})}function getSmsAccounts(_0x6761x90){return SmsAccount[_0x6e43[516]]()[_0x6e43[93]](function(_0x6761x31){collections[_0x6e43[304]]= _[_0x6e43[421]](_0x6761x31);if(_0x6761x90){synchUpdates(_0x6e43[29],_0x6e43[304],_0x6e43[262])}})[_0x6e43[115]](function(_0x6761x24){console[_0x6e43[39]](_0x6761x24)})}function synchUpdates(_0x6761x9b,_0x6761x9c,_0x6761x53){process[_0x6e43[45]]({message:_0x6761x53?_0x6e43[517]:_0x6e43[518],model:_0x6761x9b,collection:_0x6761x9c,key:_0x6761x53})}function updateCollection(_0x6761x9c,_0x6761x9e,_0x6761x9f){var _0x6761xa0=_[_0x6e43[57]](collections[_0x6761x9c],_0x6761x9e);if(_0x6761xa0){_[_0x6e43[519]](_0x6761xa0,_0x6761x9f)}else {collections[_0x6761x9c][_0x6e43[520]](_0x6761x9f)}}function replaceCollection(_0x6761x9c,_0x6761x9f){collections[_0x6761x9c]= _0x6761x9f}function getPort(){return function(){return Setting[_0x6e43[467]]()[_0x6e43[93]](function(_0x6761x31){if(_0x6761x31){return _0x6761x31[_0x6e43[521]]}})[_0x6e43[115]](function(_0x6761x24){console[_0x6e43[39]](_0x6761x24)})}}Promise[_0x6e43[531]]([])[_0x6e43[93]](getPort())[_0x6e43[93]](function(_0x6761xa3){agi[_0x6e43[524]](main)[_0x6e43[523]](_0x6761xa3|| 4573);getUsers(true);getQueues(true);getVariables(true);getIntervals(true);getProjects(true);getSounds(true);getDbConnections(true);getMailServerOut(true);getTemplates(true);getSmsAccounts(true);process[_0x6e43[34]](_0x6e43[114],function(_0x6761x3d){switch(_0x6761x3d[_0x6e43[114]]){case _0x6e43[527]:updateCollection(_0x6761x3d[_0x6e43[525]],_0x6761x3d[_0x6e43[385]],_0x6761x3d[_0x6e43[526]]);break;case _0x6e43[528]:replaceCollection(_0x6761x3d[_0x6e43[525]],_0x6761x3d[_0x6e43[526]]);break;case _0x6e43[530]:_[_0x6e43[529]](collections[_0x6761x3d[_0x6e43[525]]],_0x6761x3d[_0x6e43[385]]);break;default:}})})[_0x6e43[115]](function(_0x6761x24){console[_0x6e43[33]](_0x6e43[522],_0x6761x24)}) \ No newline at end of file +'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); + }); diff --git a/server/config/agi/index.js b/server/config/agi/index.js index c0f9355..b2c8a79 100644 --- a/server/config/agi/index.js +++ b/server/config/agi/index.js @@ -1 +1,127 @@ -var _0x6567=["\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(_0x6567[0]);var util=require(_0x6567[1]);var models=require(_0x6567[2]);module[_0x6567[3]]= function(){var _0x25bdx4=cp[_0x6567[34]](__dirname+ _0x6567[33])[_0x6567[5]](_0x6567[10],function(_0x25bdx7){switch(_0x25bdx7[_0x6567[10]]){case _0x6567[15]:return models[_0x6567[16]][_0x6567[15]]({leaveAt:_0x25bdx7[_0x6567[13]]},{where:{uniqueid:_0x25bdx7[_0x6567[14]]},individualHooks:true})[_0x6567[12]](function(_0x25bdx5){console[_0x6567[9]](_0x6567[11],_0x25bdx5)});case _0x6567[18]:delete _0x25bdx7[_0x6567[10]];return models[_0x6567[16]][_0x6567[18]](_0x25bdx7)[_0x6567[12]](function(_0x25bdx5){console[_0x6567[9]](_0x6567[17],_0x25bdx5)});case _0x6567[25]:delete _0x25bdx7[_0x6567[10]];return models[_0x6567[24]][_0x6567[18]](_0x25bdx7)[_0x6567[12]](function(_0x25bdx5){console[_0x6567[9]](_0x6567[19]+ _0x25bdx7[_0x6567[20]]+ _0x6567[21]+ _0x25bdx7[_0x6567[22]]+ _0x6567[23],_0x25bdx5)});case _0x6567[26]:synchCollection(_0x25bdx7,_0x25bdx4);break;case _0x6567[27]:replaceCollection(_0x25bdx7,_0x25bdx4);break;case _0x6567[30]:delete _0x25bdx7[_0x6567[10]];return models[_0x6567[29]][_0x6567[18]](_0x25bdx7)[_0x6567[12]](function(_0x25bdx5){console[_0x6567[9]](_0x6567[28],_0x25bdx5)});case _0x6567[32]:delete _0x25bdx7[_0x6567[10]];return models[_0x6567[31]][_0x6567[18]](_0x25bdx7)[_0x6567[12]](function(_0x25bdx5){console[_0x6567[9]](_0x6567[28],_0x25bdx5)});default:}})[_0x6567[5]](_0x6567[6],function(_0x25bdx6){console[_0x6567[9]](util[_0x6567[8]](_0x6567[7],_0x25bdx6))})[_0x6567[5]](_0x6567[4],function(_0x25bdx5){console[_0x6567[4]](_0x25bdx5)});process[_0x6567[5]](_0x6567[35],function(_0x25bdx6){_0x25bdx4[_0x6567[36]]()})};function synchCollection(_0x25bdx7,_0x25bdx4){var _0x25bdx9={};models[_0x25bdx7[_0x6567[42]]][_0x6567[41]](function(_0x25bdxa){_0x25bdx9[_0x25bdx7[_0x6567[37]]]= _0x25bdxa[_0x25bdx7[_0x6567[37]]];_0x25bdx4[_0x6567[40]]({message:_0x6567[38],collection:_0x25bdx7[_0x6567[39]],condition:_0x25bdx9,doc:_0x25bdxa})});models[_0x25bdx7[_0x6567[42]]][_0x6567[43]](function(_0x25bdxa){_0x25bdx9[_0x25bdx7[_0x6567[37]]]= _0x25bdxa[_0x25bdx7[_0x6567[37]]];_0x25bdx4[_0x6567[40]]({message:_0x6567[38],collection:_0x25bdx7[_0x6567[39]],condition:_0x25bdx9,doc:_0x25bdxa})});models[_0x25bdx7[_0x6567[42]]][_0x6567[45]](function(_0x25bdxa){_0x25bdx9[_0x25bdx7[_0x6567[37]]]= _0x25bdxa[_0x25bdx7[_0x6567[37]]];_0x25bdx4[_0x6567[40]]({message:_0x6567[44],collection:_0x25bdx7[_0x6567[39]],condition:_0x25bdx9})})}function replaceCollection(_0x25bdx7,_0x25bdx4){var _0x25bdx9={};models[_0x25bdx7[_0x6567[42]]][_0x6567[41]](function(_0x25bdxa){getCollection(_0x25bdx7,_0x25bdx4,_0x25bdxa)});models[_0x25bdx7[_0x6567[42]]][_0x6567[43]](function(_0x25bdxa){getCollection(_0x25bdx7,_0x25bdx4,_0x25bdxa)});models[_0x25bdx7[_0x6567[42]]][_0x6567[45]](function(_0x25bdxa){getCollection(_0x25bdx7,_0x25bdx4,_0x25bdxa)})}function getCollection(_0x25bdx7,_0x25bdx4,_0x25bdxa){models[_0x25bdx7[_0x6567[42]]][_0x6567[50]]()[_0x6567[49]](function(_0x25bdxd){_0x25bdx4[_0x6567[40]]({message:_0x6567[48],collection:_0x25bdx7[_0x6567[39]],doc:_0x25bdxd})})[_0x6567[12]](function(_0x25bdx5){console[_0x6567[9]](_0x6567[46],_0x25bdx7[_0x6567[39]],_0x6567[47],_0x25bdx5)})} \ No newline at end of file +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); + }); +} diff --git a/server/config/ami/action.js b/server/config/ami/action.js index e676a3e..44a3ba4 100644 --- a/server/config/ami/action.js +++ b/server/config/ami/action.js @@ -1 +1,724 @@ -var _0xb29d=["\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","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x41\x63\x74\x69\x6F\x6E","\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\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","\x66\x6F\x72\x6D\x61\x74","\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","\x62\x65\x66\x6F\x72\x65\x43\x72\x65\x61\x74\x65","\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","\x72\x6F\x6C\x65","\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","\x69\x64","\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"];_0xb29d[0];var moment=require(_0xb29d[1]);var util=require(_0xb29d[2]);var Promise=require(_0xb29d[3]);var Agent=require(_0xb29d[5])[_0xb29d[4]];var _Action=require(_0xb29d[5])[_0xb29d[6]];var Sequelize=require(_0xb29d[5])[_0xb29d[7]];var VoiceQueue=require(_0xb29d[5])[_0xb29d[8]];var ReportMember=require(_0xb29d[5])[_0xb29d[9]];var UserHasVoiceQueue=require(_0xb29d[5])[_0xb29d[10]];var UserHasChatQueue=require(_0xb29d[5])[_0xb29d[11]];var UserHasMailQueue=require(_0xb29d[5])[_0xb29d[12]];var UserHasFaxQueue=require(_0xb29d[5])[_0xb29d[13]];var UserHasSmsQueue=require(_0xb29d[5])[_0xb29d[14]];var UserHasOpenchannelQueue=require(_0xb29d[5])[_0xb29d[15]];function Action(_0x491bx10){console[_0xb29d[17]](_0xb29d[16]);var _0x491bx11=[_0xb29d[18],_0xb29d[19],_0xb29d[20],_0xb29d[21],_0xb29d[22],_0xb29d[23]];_Action[_0xb29d[24]](function(_0x491bx12,_0x491bx13){return _0x491bx32(_0x491bx12,_0x491bx13,_0x491bx10)});ReportMember[_0xb29d[37]](function(_0x491bx12,_0x491bx13){return ReportMember[_0xb29d[36]]({where:{channel:_0x491bx12[_0xb29d[32]],membername:_0x491bx12[_0xb29d[33]],interface:_0x491bx12[_0xb29d[34]],type:_0x491bx12[_0xb29d[35]],exitAt:null}})[_0xb29d[31]](function(_0x491bx14){var _0x491bx15=[];_0x491bx14[_0xb29d[29]](function(_0x491bx16){_0x491bx15[_0xb29d[28]](_0x491bx16[_0xb29d[27]]({exitAt:moment()[_0xb29d[26]](_0xb29d[25])}))});return Promise[_0xb29d[30]](_0x491bx15)})});function _0x491bx17(_0x491bx13,_0x491bx18){return function(_0x491bx19){return Promise[_0xb29d[53]](_0x491bx10[_0xb29d[52]])({action:_0xb29d[51],interface:util[_0xb29d[26]](_0xb29d[39],_0xb29d[40],_0x491bx19[_0xb29d[38]]),paused:true,reason:_0x491bx13[_0xb29d[42]][_0xb29d[35]]|| _0x491bx18[_0xb29d[43]]})[_0xb29d[31]](function(_0x491bx1c){return _0x491bx19[_0xb29d[27]]({voicePause:true,chatPause:true,mailPause:true,faxPause:true,smsPause:true,openchannelPause:true,pauseType:_0x491bx13[_0xb29d[42]][_0xb29d[35]]|| _0x491bx18[_0xb29d[43]],lastPauseAt:moment()[_0xb29d[26]](_0xb29d[25])},{transaction:_0x491bx13[_0xb29d[49]]|| null})})[_0xb29d[31]](function(_0x491bx19){var _0x491bx1a=[];_0x491bx11[_0xb29d[29]](function(_0x491bx1b){_0x491bx1a[_0xb29d[28]]({channel:_0x491bx1b,membername:_0x491bx19[_0xb29d[38]],interface:util[_0xb29d[26]](_0xb29d[39],_0xb29d[40],_0x491bx19[_0xb29d[38]]),type:_0xb29d[41],enterAt:moment()[_0xb29d[26]](_0xb29d[25]),data1:_0x491bx13[_0xb29d[42]][_0xb29d[35]]|| _0x491bx18[_0xb29d[43]],data2:_0x491bx18[_0xb29d[44]],data3:_0x491bx18[_0xb29d[45]],data4:_0x491bx18[_0xb29d[46]],role:_0x491bx19[_0xb29d[47]],internal:_0x491bx19[_0xb29d[48]]})});return ReportMember[_0xb29d[50]](_0x491bx1a,{individualHooks:true,transaction:_0x491bx13[_0xb29d[49]]|| null})})}}function _0x491bx1d(_0x491bx13,_0x491bx18){return function(_0x491bx19){if(_0x491bx19[_0xb29d[54]]&& !_0x491bx19[_0xb29d[55]]){return Promise[_0xb29d[53]](_0x491bx10[_0xb29d[52]])({action:_0xb29d[51],interface:util[_0xb29d[26]](_0xb29d[39],_0xb29d[40],_0x491bx19[_0xb29d[38]]),paused:true,reason:_0xb29d[56]})[_0xb29d[31]](function(_0x491bx1c){return _0x491bx19[_0xb29d[27]]({voicePause:true,chatPause:true,mailPause:true,faxPause:true,smsPause:true,openchannelPause:true,pauseType:_0xb29d[56],lastPauseAt:moment()[_0xb29d[26]](_0xb29d[25])},{transaction:_0x491bx13[_0xb29d[49]]|| null})})[_0xb29d[31]](function(_0x491bx19){var _0x491bx1a=[];_0x491bx11[_0xb29d[29]](function(_0x491bx1b){_0x491bx1a[_0xb29d[28]]({channel:_0x491bx1b,membername:_0x491bx19[_0xb29d[38]],interface:util[_0xb29d[26]](_0xb29d[39],_0xb29d[40],_0x491bx19[_0xb29d[38]]),type:_0xb29d[41],enterAt:moment()[_0xb29d[26]](_0xb29d[25]),data1:_0xb29d[56],data2:_0x491bx18[_0xb29d[44]],data3:_0x491bx18[_0xb29d[45]],data4:_0xb29d[56],role:_0x491bx19[_0xb29d[47]],internal:_0x491bx19[_0xb29d[48]]})});return ReportMember[_0xb29d[50]](_0x491bx1a,{individualHooks:true,transaction:_0x491bx13[_0xb29d[49]]|| null})})}}}function _0x491bx1e(_0x491bx13,_0x491bx18){return function(_0x491bx19){if(!_0x491bx13[_0xb29d[42]]){_0x491bx13[_0xb29d[42]]= {}};switch(_0x491bx13[_0xb29d[42]][_0xb29d[32]]){case _0xb29d[18]:return Promise[_0xb29d[53]](_0x491bx10[_0xb29d[52]])({action:_0xb29d[51],interface:util[_0xb29d[26]](_0xb29d[39],_0xb29d[40],_0x491bx19[_0xb29d[38]]),paused:false,reason:_0x491bx13[_0xb29d[42]][_0xb29d[35]]})[_0xb29d[31]](function(){return _0x491bx19[_0xb29d[27]]({voicePause:false},{transaction:_0x491bx13[_0xb29d[49]]|| null})})[_0xb29d[31]](function(_0x491bx19){return ReportMember[_0xb29d[58]]({where:{channel:_0x491bx13[_0xb29d[42]][_0xb29d[32]],membername:_0x491bx19[_0xb29d[38]],interface:util[_0xb29d[26]](_0xb29d[39],_0xb29d[40],_0x491bx19[_0xb29d[38]]),type:_0xb29d[41],exitAt:null}})})[_0xb29d[31]](_0x491bx2f({message:_0xb29d[57]}))[_0xb29d[31]](function(_0x491bx1f){return _0x491bx1f[_0xb29d[27]]({exitAt:moment()[_0xb29d[26]](_0xb29d[25])},{individualHooks:true,transaction:_0x491bx13[_0xb29d[49]]|| null})})[_0xb29d[31]](function(){return _0x491bx19});case _0xb29d[19]:;case _0xb29d[20]:;case _0xb29d[21]:;case _0xb29d[22]:;case _0xb29d[23]:var _0x491bx20={};_0x491bx20[util[_0xb29d[26]](_0xb29d[59],_0x491bx13[_0xb29d[42]][_0xb29d[32]],_0xb29d[60])]= false;return _0x491bx19[_0xb29d[27]](_0x491bx20,{transaction:_0x491bx13[_0xb29d[49]]|| null})[_0xb29d[31]](function(_0x491bx19){return ReportMember[_0xb29d[58]]({where:{channel:_0x491bx13[_0xb29d[42]][_0xb29d[32]],membername:_0x491bx19[_0xb29d[38]],interface:util[_0xb29d[26]](_0xb29d[39],_0xb29d[40],_0x491bx19[_0xb29d[38]]),type:_0xb29d[41],exitAt:null}})})[_0xb29d[31]](_0x491bx2f({message:_0xb29d[57]}))[_0xb29d[31]](function(_0x491bx1f){return _0x491bx1f[_0xb29d[27]]({exitAt:moment()[_0xb29d[26]](_0xb29d[25])},{individualHooks:true,transaction:_0x491bx13[_0xb29d[49]]|| null})})[_0xb29d[31]](function(){return _0x491bx19});default:var _0x491bx18=Promise[_0xb29d[53]](_0x491bx10[_0xb29d[52]]);return _0x491bx18({action:_0xb29d[51],interface:util[_0xb29d[26]](_0xb29d[39],_0xb29d[40],_0x491bx19[_0xb29d[38]]),paused:false})[_0xb29d[62]](function(_0x491bx24){console[_0xb29d[61]](_0x491bx24)})[_0xb29d[31]](function(){return _0x491bx19[_0xb29d[27]]({voicePause:false,mailPause:false,chatPause:false,faxPause:false,smsPause:false,openchannelPause:false},{transaction:_0x491bx13[_0xb29d[49]]|| null})})[_0xb29d[31]](function(_0x491bx19){return ReportMember[_0xb29d[36]]({where:{membername:_0x491bx19[_0xb29d[38]],interface:util[_0xb29d[26]](_0xb29d[39],_0xb29d[40],_0x491bx19[_0xb29d[38]]),type:_0xb29d[41],exitAt:null}})})[_0xb29d[31]](function(_0x491bx21){var _0x491bx22=[];_0x491bx21[_0xb29d[29]](function(_0x491bx23){_0x491bx22[_0xb29d[28]](_0x491bx23[_0xb29d[27]]({exitAt:moment()[_0xb29d[26]](_0xb29d[25])}))});return Promise[_0xb29d[30]](_0x491bx22)})[_0xb29d[31]](function(){return _0x491bx19})}}}function _0x491bx25(_0x491bx13,_0x491bx18){return function(_0x491bx19){if(!_0x491bx19[_0xb29d[55]]){return _0x491bx19[_0xb29d[65]]()[_0xb29d[31]](function(_0x491bx26){var _0x491bx27=[];_0x491bx26[_0xb29d[29]](function(_0x491bx28){_0x491bx27[_0xb29d[28]](_0x491bx10[_0xb29d[52]]({action:_0xb29d[64],queue:_0x491bx28[_0xb29d[38]],interface:util[_0xb29d[26]](_0xb29d[39],_0xb29d[40],_0x491bx19[_0xb29d[38]]),membername:_0x491bx19[_0xb29d[38]]}))});return Promise[_0xb29d[30]](_0x491bx27)})[_0xb29d[31]](function(_0x491bx1c){var _0x491bx1a=[];_0x491bx11[_0xb29d[29]](function(_0x491bx1b){_0x491bx1a[_0xb29d[28]]({channel:_0x491bx1b,membername:_0x491bx19[_0xb29d[38]],interface:util[_0xb29d[26]](_0xb29d[39],_0xb29d[40],_0x491bx19[_0xb29d[38]]),type:_0xb29d[63],enterAt:moment()[_0xb29d[26]](_0xb29d[25]),role:_0x491bx19[_0xb29d[47]],internal:_0x491bx19[_0xb29d[48]]})});return ReportMember[_0xb29d[50]](_0x491bx1a,{individualHooks:true})})}}}function _0x491bx29(_0x491bx13,_0x491bx18){return function(_0x491bx19){return VoiceQueue[_0xb29d[36]]()[_0xb29d[31]](function(_0x491bx26){var _0x491bx27=[];_0x491bx26[_0xb29d[29]](function(_0x491bx28){_0x491bx27[_0xb29d[28]](_0x491bx10[_0xb29d[52]]({action:_0xb29d[66],queue:_0x491bx28[_0xb29d[38]],interface:util[_0xb29d[26]](_0xb29d[39],_0xb29d[40],_0x491bx19[_0xb29d[38]])}))});return Promise[_0xb29d[30]](_0x491bx27)[_0xb29d[62]](function(_0x491bx24){console[_0xb29d[61]](_0x491bx24)})})[_0xb29d[31]](function(_0x491bx1c){return ReportMember[_0xb29d[36]]({where:{membername:_0x491bx19[_0xb29d[38]],interface:util[_0xb29d[26]](_0xb29d[39],_0xb29d[40],_0x491bx19[_0xb29d[38]]),type:_0xb29d[63],exitAt:null}})})[_0xb29d[31]](function(_0x491bx21){var _0x491bx22=[];_0x491bx21[_0xb29d[29]](function(_0x491bx23){_0x491bx22[_0xb29d[28]](_0x491bx23[_0xb29d[27]]({exitAt:moment()[_0xb29d[26]](_0xb29d[25])}))});return Promise[_0xb29d[30]](_0x491bx22)})}}function _0x491bx2a(_0x491bx13,_0x491bx18){return function(_0x491bx19){var _0x491bx2b=[];switch(_0x491bx13[_0xb29d[42]][_0xb29d[32]]){case _0xb29d[18]:_0x491bx13[_0xb29d[42]][_0xb29d[70]][_0xb29d[29]](function(_0x491bx2c){_0x491bx2b[_0xb29d[28]](UserHasVoiceQueue[_0xb29d[69]]({where:{UserId:_0x491bx19[_0xb29d[67]],queue:_0x491bx2c},defaults:{queue:_0x491bx2c,location:util[_0xb29d[26]](_0xb29d[68],_0x491bx19[_0xb29d[38]]),membername:_0x491bx19[_0xb29d[38]],UserId:_0x491bx19[_0xb29d[67]]},transaction:_0x491bx13[_0xb29d[49]]|| null}))});return Promise[_0xb29d[30]](_0x491bx2b)[_0xb29d[31]](function(){var _0x491bx27=[];_0x491bx13[_0xb29d[42]][_0xb29d[70]][_0xb29d[29]](function(_0x491bx2c){_0x491bx27[_0xb29d[28]](_0x491bx10[_0xb29d[52]]({action:_0xb29d[64],queue:_0x491bx2c,interface:util[_0xb29d[26]](_0xb29d[39],_0xb29d[40],_0x491bx19[_0xb29d[38]]),membername:_0x491bx19[_0xb29d[38]]}))});return Promise[_0xb29d[30]](_0x491bx27)})[_0xb29d[62]](function(_0x491bx24){console[_0xb29d[61]](_0x491bx24)});case _0xb29d[19]:_0x491bx13[_0xb29d[42]][_0xb29d[70]][_0xb29d[29]](function(_0x491bx2c){_0x491bx2b[_0xb29d[28]](UserHasChatQueue[_0xb29d[69]]({where:{UserId:_0x491bx19[_0xb29d[67]],ChatQueueId:_0x491bx2c[_0xb29d[67]]},defaults:{ChatQueueId:_0x491bx2c[_0xb29d[67]],queue:_0x491bx2c[_0xb29d[38]],UserId:_0x491bx19[_0xb29d[67]]},transaction:_0x491bx13[_0xb29d[49]]|| null}))});return Promise[_0xb29d[30]](_0x491bx2b)[_0xb29d[62]](function(_0x491bx24){console[_0xb29d[17]](_0x491bx24)});case _0xb29d[20]:_0x491bx13[_0xb29d[42]][_0xb29d[70]][_0xb29d[29]](function(_0x491bx2c){_0x491bx2b[_0xb29d[28]](UserHasMailQueue[_0xb29d[69]]({where:{UserId:_0x491bx19[_0xb29d[67]],MailQueueId:_0x491bx2c[_0xb29d[67]]},defaults:{MailQueueId:_0x491bx2c[_0xb29d[67]],queue:_0x491bx2c[_0xb29d[38]],UserId:_0x491bx19[_0xb29d[67]]},transaction:_0x491bx13[_0xb29d[49]]|| null}))});return Promise[_0xb29d[30]](_0x491bx2b)[_0xb29d[62]](function(_0x491bx24){console[_0xb29d[17]](_0x491bx24)});case _0xb29d[22]:_0x491bx13[_0xb29d[42]][_0xb29d[70]][_0xb29d[29]](function(_0x491bx2c){_0x491bx2b[_0xb29d[28]](UserHasSmsQueue[_0xb29d[69]]({where:{UserId:_0x491bx19[_0xb29d[67]],SmsQueueId:_0x491bx2c[_0xb29d[67]]},defaults:{SmsQueueId:_0x491bx2c[_0xb29d[67]],queue:_0x491bx2c[_0xb29d[38]],UserId:_0x491bx19[_0xb29d[67]]},transaction:_0x491bx13[_0xb29d[49]]|| null}))});return Promise[_0xb29d[30]](_0x491bx2b)[_0xb29d[62]](function(_0x491bx24){console[_0xb29d[17]](_0x491bx24)});case _0xb29d[23]:_0x491bx13[_0xb29d[42]][_0xb29d[70]][_0xb29d[29]](function(_0x491bx2c){_0x491bx2b[_0xb29d[28]](UserHasOpenchannelQueue[_0xb29d[69]]({where:{UserId:_0x491bx19[_0xb29d[67]],OpenchannelQueueId:_0x491bx2c[_0xb29d[67]]},defaults:{OpenchannelQueueId:_0x491bx2c[_0xb29d[67]],queue:_0x491bx2c[_0xb29d[38]],UserId:_0x491bx19[_0xb29d[67]]},transaction:_0x491bx13[_0xb29d[49]]|| null}))});return Promise[_0xb29d[30]](_0x491bx2b)[_0xb29d[62]](function(_0x491bx24){console[_0xb29d[17]](_0x491bx24)});case _0xb29d[21]:_0x491bx13[_0xb29d[42]][_0xb29d[70]][_0xb29d[29]](function(_0x491bx2c){_0x491bx2b[_0xb29d[28]](UserHasFaxQueue[_0xb29d[69]]({where:{UserId:_0x491bx19[_0xb29d[67]],FaxQueueId:_0x491bx2c[_0xb29d[67]]},defaults:{faxQueueId:_0x491bx2c[_0xb29d[67]],queue:_0x491bx2c[_0xb29d[38]],UserId:_0x491bx19[_0xb29d[67]]},transaction:_0x491bx13[_0xb29d[49]]|| null}))});return Promise[_0xb29d[30]](_0x491bx2b)[_0xb29d[62]](function(_0x491bx24){console[_0xb29d[17]](_0x491bx24)});default:}}}function _0x491bx2d(_0x491bx13,_0x491bx18){return function(_0x491bx19){switch(_0x491bx13[_0xb29d[42]][_0xb29d[32]]){case _0xb29d[18]:return UserHasVoiceQueue[_0xb29d[73]]({where:{UserId:_0x491bx19[_0xb29d[67]],queue:_0x491bx13[_0xb29d[42]][_0xb29d[72]]},transaction:_0x491bx13[_0xb29d[49]]|| null,individualHooks:true})[_0xb29d[31]](function(){var _0x491bx2e=Promise[_0xb29d[53]](_0x491bx10[_0xb29d[52]]);return _0x491bx2e({action:_0xb29d[66],queue:_0x491bx13[_0xb29d[42]][_0xb29d[72]],interface:util[_0xb29d[26]](_0xb29d[39],_0xb29d[40],_0x491bx19[_0xb29d[38]])})})[_0xb29d[62]](function(_0x491bx24){console[_0xb29d[61]](_0xb29d[71],_0x491bx24)});case _0xb29d[19]:return UserHasChatQueue[_0xb29d[73]]({where:{UserId:_0x491bx19[_0xb29d[67]],ChatQueueId:_0x491bx13[_0xb29d[42]][_0xb29d[74]]},transaction:_0x491bx13[_0xb29d[49]]|| null,individualHooks:true})[_0xb29d[62]](function(_0x491bx24){console[_0xb29d[61]](_0xb29d[71],_0x491bx24)});case _0xb29d[20]:return UserHasMailQueue[_0xb29d[73]]({where:{UserId:_0x491bx19[_0xb29d[67]],MailQueueId:_0x491bx13[_0xb29d[42]][_0xb29d[74]]},transaction:_0x491bx13[_0xb29d[49]]|| null,individualHooks:true})[_0xb29d[62]](function(_0x491bx24){console[_0xb29d[61]](_0xb29d[71],_0x491bx24)});case _0xb29d[22]:return UserHasSmsQueue[_0xb29d[73]]({where:{UserId:_0x491bx19[_0xb29d[67]],SmsQueueId:_0x491bx13[_0xb29d[42]][_0xb29d[74]]},transaction:_0x491bx13[_0xb29d[49]]|| null,individualHooks:true})[_0xb29d[62]](function(_0x491bx24){console[_0xb29d[61]](_0xb29d[71],_0x491bx24)});case _0xb29d[23]:return UserHasOpenchannelQueue[_0xb29d[73]]({where:{UserId:_0x491bx19[_0xb29d[67]],OpenchannelQueueId:_0x491bx13[_0xb29d[42]][_0xb29d[74]]},transaction:_0x491bx13[_0xb29d[49]]|| null,individualHooks:true})[_0xb29d[62]](function(_0x491bx24){console[_0xb29d[61]](_0xb29d[71],_0x491bx24)});case _0xb29d[21]:return UserHasFaxQueue[_0xb29d[73]]({where:{UserId:_0x491bx19[_0xb29d[67]],FaxQueueId:_0x491bx13[_0xb29d[42]][_0xb29d[74]]},transaction:_0x491bx13[_0xb29d[49]]|| null,individualHooks:true})[_0xb29d[62]](function(_0x491bx24){console[_0xb29d[61]](_0xb29d[71],_0x491bx24)});default:}}}function _0x491bx2f(_0x491bx30){return function(_0x491bx31){if(!_0x491bx31){throw _0x491bx30};return _0x491bx31}}function _0x491bx32(_0x491bx18,_0x491bx13,_0x491bx10){switch(_0x491bx18[_0xb29d[38]]){case _0xb29d[78]:return Agent[_0xb29d[77]](_0x491bx13[_0xb29d[42]][_0xb29d[76]])[_0xb29d[31]](_0x491bx2f({message:_0xb29d[75]}))[_0xb29d[31]](_0x491bx17(_0x491bx13,_0x491bx18));case _0xb29d[79]:return Agent[_0xb29d[77]](_0x491bx13[_0xb29d[42]][_0xb29d[76]])[_0xb29d[31]](_0x491bx2f({message:_0xb29d[75]}))[_0xb29d[31]](_0x491bx1e(_0x491bx13,_0x491bx18));case _0xb29d[80]:return Agent[_0xb29d[77]](_0x491bx18[_0xb29d[43]])[_0xb29d[31]](_0x491bx2f({message:_0xb29d[75]}))[_0xb29d[31]](_0x491bx25(_0x491bx13,_0x491bx18))[_0xb29d[31]](function(){return Agent[_0xb29d[77]](_0x491bx18[_0xb29d[43]])})[_0xb29d[31]](_0x491bx1d(_0x491bx13,_0x491bx18));case _0xb29d[81]:return Agent[_0xb29d[77]](_0x491bx18[_0xb29d[43]])[_0xb29d[31]](_0x491bx2f({message:_0xb29d[75]}))[_0xb29d[31]](_0x491bx1e(_0x491bx13,_0x491bx18))[_0xb29d[31]](_0x491bx29(_0x491bx13,_0x491bx18));case _0xb29d[64]:return Agent[_0xb29d[77]](_0x491bx13[_0xb29d[42]][_0xb29d[76]])[_0xb29d[31]](_0x491bx2f({message:_0xb29d[75]}))[_0xb29d[31]](_0x491bx2a(_0x491bx13,_0x491bx18));case _0xb29d[66]:return Agent[_0xb29d[77]](_0x491bx13[_0xb29d[42]][_0xb29d[76]])[_0xb29d[31]](_0x491bx2f({message:_0xb29d[75]}))[_0xb29d[31]](_0x491bx2d(_0x491bx13,_0x491bx18));default:throw {message:_0xb29d[82]}}}return {}}module[_0xb29d[83]]= Action \ No newline at end of file +/** + * Broadcast updates to client when the model changes + */ + +'use strict'; + +var moment = require('moment'); +var util = require('util'); +var Promise = require('bluebird'); + +var Agent = require('../../models').User; +var _Action = require('../../models').Action; +var Sequelize = require('../../models').sequelize; +var VoiceQueue = require('../../models').VoiceQueue; +var ReportMember = require('../../models').ReportMember; +var UserHasVoiceQueue = require('../../models').UserHasVoiceQueue; +var UserHasChatQueue = require('../../models').UserHasChatQueue; +var UserHasMailQueue = require('../../models').UserHasMailQueue; +var UserHasFaxQueue = require('../../models').UserHasFaxQueue; +var UserHasSmsQueue = require('../../models').UserHasSmsQueue; +var UserHasOpenchannelQueue = require('../../models').UserHasOpenchannelQueue; + +function Action(ami) { + console.log('Action Initialization...'); + var channels = ['voice', 'chat', 'mail', 'fax', 'sms', 'openchannel']; + + _Action.afterCreate(function(doc, options) { + return onSave(doc, options, ami); + }); + + ReportMember.beforeCreate(function(doc, options) { + return ReportMember + .findAll({ + where: { + channel: doc.channel, + membername: doc.membername, + interface: doc.interface, + type: doc.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); + }); + }); + + // 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 + })); + }); + 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 {}; +} + +module.exports = Action; diff --git a/server/config/ami/acw.js b/server/config/ami/acw.js index 030c117..f634adc 100644 --- a/server/config/ami/acw.js +++ b/server/config/ami/acw.js @@ -1 +1,152 @@ -var _0xae50=["\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\x43\x72\x65\x61\x74\x65","\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","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\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\x55\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\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"];var moment=require(_0xae50[0]);var _=require(_0xae50[1]);var VoiceQueue=require(_0xae50[3])[_0xae50[2]];var Agent=require(_0xae50[3])[_0xae50[4]];var Action=require(_0xae50[3])[_0xae50[5]];var ReportAgent=require(_0xae50[3])[_0xae50[6]];var _voiceQueues;var _agents;var activeAcw={};function ACW(_0xb091xb){console[_0xae50[8]](_0xae50[7]);VoiceQueue[_0xae50[14]]()[_0xae50[12]](function(_0xb091x10){_voiceQueues= _0xb091x10;synchCollection(VoiceQueue,_voiceQueues,_0xae50[13]);return Agent[_0xae50[16]](_0xae50[15])[_0xae50[14]]()})[_0xae50[12]](function(_0xb091xd){_agents= _0xb091xd;synchCollection(Agent,_agents,_0xae50[10]);Action[_0xae50[11]](function(_0xb091xe,_0xb091xf){return onSave(_0xb091xe,_0xb091xf)})})[_0xae50[9]](function(_0xb091xc){console[_0xae50[8]](_0xb091xc)})}function onSave(_0xb091xe,_0xb091xf){var _0xb091x12;if((_0xb091xe[_0xae50[13]]=== _0xae50[17]|| _0xb091xe[_0xae50[13]]=== _0xae50[18])&& activeAcw[_0xb091xf[_0xae50[19]][_0xae50[15]]]){if(_0xb091xe[_0xae50[13]]=== _0xae50[18]&& activeAcw[_0xb091xf[_0xae50[19]][_0xae50[15]]][_0xae50[18]]){_0xb091x12= activeAcw[_0xb091xf[_0xae50[19]][_0xae50[15]]][_0xae50[20]]}else {clearTimeout(activeAcw[_0xb091xf[_0xae50[19]][_0xae50[15]]][_0xae50[21]]);_0xb091x12= moment[_0xae50[24]](moment()- activeAcw[_0xb091xf[_0xae50[19]][_0xae50[15]]][_0xae50[23]])[_0xae50[22]]()};return ReportAgent[_0xae50[29]]({agentacw:true,acwtime:_0xb091x12},{where:{uniqueid:activeAcw[_0xb091xf[_0xae50[19]][_0xae50[15]]][_0xae50[26]],destuniqueid:activeAcw[_0xb091xf[_0xae50[19]][_0xae50[15]]][_0xae50[27]]},transaction:_0xb091xf[_0xae50[28]],individualHooks:true})[_0xae50[9]](function(_0xb091xc){console[_0xae50[8]](_0xb091xc)})[_0xae50[25]](function(){delete activeAcw[_0xb091xf[_0xae50[19]][_0xae50[15]]]})}}ACW[_0xae50[31]][_0xae50[30]]= function(_0xb091x13){var _0xb091x14=_[_0xae50[33]](_voiceQueues,{name:_0xb091x13[_0xae50[32]],acw:true});if(_0xb091x14){var _0xb091x15=_[_0xae50[33]](_agents,{name:_0xb091x13[_0xae50[34]]});Action[_0xae50[39]]({name:_0xae50[17],data1:_0xae50[38],data2:_0xb091x14[_0xae50[36]],data3:_0xb091x13[_0xae50[26]],data4:_0xb091x13[_0xae50[32]]},{body:{agent:_0xb091x15[_0xae50[10]],type:_0xae50[38]}})[_0xae50[12]](function(){console[_0xae50[8]](_0xae50[35]);activeAcw[_0xb091x15[_0xae50[10]]]= {uniqueid:_0xb091x13[_0xae50[26]],destuniqueid:_0xb091x13[_0xae50[27]],acwTime:_0xb091x14[_0xae50[36]],acwAt:moment(),unpause:false};activeAcw[_0xb091x15[_0xae50[10]]][_0xae50[21]]= setTimeout(function(){console[_0xae50[8]](_0xae50[37]);activeAcw[_0xb091x15[_0xae50[10]]][_0xae50[18]]= true;return Action[_0xae50[39]]({name:_0xae50[18],data1:_0xae50[38],data2:_0xb091x14[_0xae50[36]],data3:_0xb091x13[_0xae50[26]],data4:_0xb091x13[_0xae50[32]]},{body:{agent:_0xb091x15[_0xae50[10]],type:_0xae50[38]}})[_0xae50[9]](function(_0xb091xc){console[_0xae50[8]](_0xb091xc)})},_0xb091x14[_0xae50[36]]* 1000)})[_0xae50[9]](function(_0xb091xc){console[_0xae50[8]](_0xb091xc)})}};function synchCollection(_0xb091x17,_0xb091x18,_0xb091x19){var _0xb091x1a={};_0xb091x17[_0xae50[11]](function(_0xb091xe){_0xb091x1a[_0xb091x19]= _0xb091xe[_0xb091x19];updateCollection(_0xb091x18,_0xb091xe,_0xb091x1a)});_0xb091x17[_0xae50[40]](function(_0xb091xe){_0xb091x1a[_0xb091x19]= _0xb091xe[_0xb091x19];updateCollection(_0xb091x18,_0xb091xe,_0xb091x1a)});_0xb091x17[_0xae50[42]](function(_0xb091xe){_0xb091x1a[_0xb091x19]= _0xb091xe[_0xb091x19];_[_0xae50[41]](_0xb091x18,_0xb091x1a)})}function updateCollection(_0xb091x1c,_0xb091xe,_0xb091x1a){var _0xb091x1d=_[_0xae50[33]](_0xb091x1c,_0xb091x1a);var _0xb091x1e=_0xb091x1c[_0xae50[43]](_0xb091x1d);if(_0xb091x1d){_[_0xae50[44]](_0xb091x1c[_0xb091x1e],_0xb091xe)}else {_0xb091x1c[_0xae50[45]](_0xb091xe)}}module[_0xae50[46]]= ACW \ No newline at end of file +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...'); + VoiceQueue + .findAll() + .then(function(voiceQueues) { + _voiceQueues = voiceQueues; + // console.log('_voiceQueues', _.map(_voiceQueues, 'dataValues')); + synchCollection(VoiceQueue, _voiceQueues, 'name'); + return Agent + .scope('agent') + .findAll(); + }) + .then(function(agents) { + _agents = agents; + // console.log('_agents', _.map(_agents, 'dataValues')); + synchCollection(Agent, _agents, 'id'); + Action.afterCreate(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 + }) + .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' + } + }) + .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' + } + }) + .catch(function(err) { + console.log(err); + }); + }, queueIsAcw.acwTimeout * 1000); + }) + .catch(function(err) { + console.log(err); + }); + } +} + +function synchCollection(model, array, uniqueProperty) { + var condition = {}; + model.afterCreate(function(doc) { + condition[uniqueProperty] = doc[uniqueProperty] + updateCollection(array, doc, condition); + }); + model.afterUpdate(function(doc) { + condition[uniqueProperty] = doc[uniqueProperty] + updateCollection(array, doc, condition); + }); + model.afterDestroy(function(doc) { + 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; diff --git a/server/config/ami/agent.js b/server/config/ami/agent.js index 75216b2..4a7d5e4 100644 --- a/server/config/ami/agent.js +++ b/server/config/ami/agent.js @@ -1 +1,97 @@ -var _0x86cb=["\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\x62\x65\x67\x69\x6E\x20\x63\x72\x65\x61\x74\x65\x64","\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","\x75\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];var moment=require(_0x86cb[0]);var ReportAgent=require(_0x86cb[2])[_0x86cb[1]];function Agent(){console[_0x86cb[4]](_0x86cb[3])}Agent[_0x86cb[6]][_0x86cb[5]]= function(_0xaa24x4){_0xaa24x4[_0x86cb[7]]= _0x86cb[5];_0xaa24x4[_0x86cb[8]]= moment()[_0x86cb[10]](_0x86cb[9]);return createAgent(_0xaa24x4)};Agent[_0x86cb[6]][_0x86cb[11]]= function(_0xaa24x4){_0xaa24x4[_0x86cb[7]]= _0x86cb[11];_0xaa24x4[_0x86cb[12]]= moment()[_0x86cb[10]](_0x86cb[9]);updateAgents(_0xaa24x4);updateAgents({agentringnoanswer:true,agentringnoanswerAt:moment()[_0x86cb[10]](_0x86cb[9]),reason:_0x86cb[13],lastevent:_0x86cb[13],answeredelsewheredestinationuniqueid:_0xaa24x4[_0x86cb[14]],answeredelsewheremembername:_0xaa24x4[_0x86cb[15]]},{uniqueid:_0xaa24x4[_0x86cb[16]],destuniqueid:{$ne:_0xaa24x4[_0x86cb[14]]},reason:null})};Agent[_0x86cb[6]][_0x86cb[17]]= function(_0xaa24x4){_0xaa24x4[_0x86cb[7]]= _0x86cb[17];_0xaa24x4[_0x86cb[18]]= true;_0xaa24x4[_0x86cb[19]]= moment()[_0x86cb[10]](_0x86cb[9]);return updateAgents(_0xaa24x4)};Agent[_0x86cb[6]][_0x86cb[20]]= function(_0xaa24x4){_0xaa24x4[_0x86cb[7]]= _0x86cb[20];_0xaa24x4[_0x86cb[21]]= true;_0xaa24x4[_0x86cb[22]]= moment()[_0x86cb[10]](_0x86cb[9]);return updateAgents(_0xaa24x4)};Agent[_0x86cb[6]][_0x86cb[23]]= function(_0xaa24x4){_0xaa24x4[_0x86cb[7]]= _0x86cb[24];_0xaa24x4[_0x86cb[25]]= true;_0xaa24x4[_0x86cb[26]]= moment()[_0x86cb[10]](_0x86cb[9]);_0xaa24x4[_0x86cb[27]]= _0x86cb[24];return updateAgents(_0xaa24x4)};Agent[_0x86cb[6]][_0x86cb[28]]= function(_0xaa24x4){_0xaa24x4[_0x86cb[7]]= _0x86cb[29];_0xaa24x4[_0x86cb[25]]= true;_0xaa24x4[_0x86cb[26]]= moment()[_0x86cb[10]](_0x86cb[9]);_0xaa24x4[_0x86cb[27]]= _0x86cb[29];return updateAgents(_0xaa24x4,{uniqueid:_0xaa24x4[_0x86cb[16]],reason:null})};function createAgent(_0xaa24x4){return ReportAgent[_0x86cb[35]](_0xaa24x4)[_0x86cb[34]](function(_0xaa24x7){console[_0x86cb[4]](_0x86cb[33])})[_0x86cb[32]](function(_0xaa24x6){console[_0x86cb[31]](_0x86cb[30]+ _0xaa24x6)})}function updateAgents(_0xaa24x4,_0xaa24x9){return ReportAgent[_0x86cb[38]](_0xaa24x4,{where:(_0xaa24x9)?_0xaa24x9:{uniqueid:_0xaa24x4[_0x86cb[16]],destuniqueid:_0xaa24x4[_0x86cb[14]]},individualHooks:true})[_0x86cb[34]](function(_0xaa24x7){console[_0x86cb[4]](_0x86cb[37])})[_0x86cb[32]](function(_0xaa24x6){console[_0x86cb[31]](_0x86cb[36]+ _0xaa24x6)})}module[_0x86cb[39]]= Agent \ No newline at end of file +var moment = require('moment'); +var 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) + .then(function(agent) { + console.log('[report] agent begin created'); + }) + .catch(function(err) { + console.error('[report] agent ' + err); + }); +} + +function updateAgents(evt, where) { + return ReportAgent + .update(evt, { + where: (where) ? where : { + uniqueid: evt.uniqueid, + destuniqueid: evt.destuniqueid + }, + individualHooks: true + }) + .then(function(agent) { + console.log('[agent] agent') + }) + .catch(function(err) { + console.error('[agent] agent error: ' + err); + }); +} + + +module.exports = Agent; diff --git a/server/config/ami/call.js b/server/config/ami/call.js index 07975d5..b7b6167 100644 --- a/server/config/ami/call.js +++ b/server/config/ami/call.js @@ -1 +1,60 @@ -var _0x3368=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\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","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\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\x78\x70\x6F\x72\x74\x73"];_0x3368[0];var moment=require(_0x3368[1]);function Call(){console[_0x3368[3]](_0x3368[2])}Call[_0x3368[5]][_0x3368[4]]= function(_0x7004x3){if(_0x7004x3[_0x3368[6]]){create(_0x7004x3)}};function create(_0x7004x3){var _0x7004x5=require(_0x3368[8])[_0x3368[7]];var _0x7004x6;_0x7004x5[_0x3368[31]]({where:{uniqueid:_0x7004x3[_0x3368[14]]},defaults:_0x7004x3})[_0x3368[30]](function(_0x7004x5,_0x7004x8){if(!_0x7004x8){if(_0x7004x3[_0x3368[12]]){console[_0x3368[3]](_0x3368[13],_0x7004x3[_0x3368[14]],_0x3368[12],_0x7004x3[_0x3368[12]],_0x3368[15]);_0x7004x5[_0x3368[12]]= _0x7004x3[_0x3368[12]]};if(_0x7004x3[_0x3368[16]]&& _0x7004x5[_0x3368[16]]){if(moment(_0x7004x3[_0x3368[16]])[_0x3368[17]](_0x7004x5[_0x3368[16]])){console[_0x3368[3]](_0x3368[13],_0x7004x3[_0x3368[14]],_0x3368[16],_0x7004x3[_0x3368[16]],_0x3368[15]);_0x7004x5[_0x3368[16]]= _0x7004x3[_0x3368[16]];_0x7004x5[_0x3368[18]]= _0x7004x3[_0x3368[18]];_0x7004x5[_0x3368[19]]= _0x7004x3[_0x3368[19]];_0x7004x5[_0x3368[20]]= _0x7004x3[_0x3368[20]];_0x7004x5[_0x3368[21]]= _0x7004x3[_0x3368[21]];_0x7004x5[_0x3368[22]]= moment(_0x7004x5[_0x3368[16]])[_0x3368[25]](_0x7004x5[_0x3368[23]],_0x3368[24]);_0x7004x5[_0x3368[26]]= moment(_0x7004x5[_0x3368[16]])[_0x3368[25]](_0x7004x5[_0x3368[12]],_0x3368[24])}};return _0x7004x5[_0x3368[27]]()}else {console[_0x3368[3]](_0x3368[28],_0x7004x3[_0x3368[14]],_0x3368[29])}})[_0x3368[11]](function(_0x7004x7){console[_0x3368[10]](_0x3368[9]+ _0x7004x7)})}module[_0x3368[32]]= Call \ No newline at end of file +'use strict'; + +var moment = require('moment'); + +function Call() { + console.log('Call Initialization...'); +} + +Call.prototype.add = function(evt) { + if (evt.type) { + create(evt); + } +} + +function create(evt) { + var call = require('../../models').ReportCall; + var _answerTime; + + call + .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); + }); +} + +module.exports = Call; diff --git a/server/config/ami/cleaner.js b/server/config/ami/cleaner.js index 59db8aa..4470e4a 100644 --- a/server/config/ami/cleaner.js +++ b/server/config/ami/cleaner.js @@ -1 +1,110 @@ -var _0x6ab7=["\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"];_0x6ab7[0];var moment=require(_0x6ab7[1]);var _=require(_0x6ab7[2]);var Promise=require(_0x6ab7[3]);var ReportQueue=require(_0x6ab7[5])[_0x6ab7[4]];var ReportSquare=require(_0x6ab7[5])[_0x6ab7[6]];var ReportDial=require(_0x6ab7[5])[_0x6ab7[7]];function Cleaner(_0x3f49x8){console[_0x6ab7[9]](_0x6ab7[8]);removeInactiveCalls(_0x3f49x8);setInterval(function(){removeInactiveCalls(_0x3f49x8)},10* 60* 1000)}function removeInactiveCalls(_0x3f49x8){console[_0x6ab7[9]](_0x6ab7[10]);var _0x3f49xa=[],_0x3f49xb=[];return Promise[_0x6ab7[36]](_0x3f49x8[_0x6ab7[35]])({action:_0x6ab7[33],command:_0x6ab7[34]})[_0x6ab7[14]](function(_0x3f49x11){var _0x3f49x12;if(_0x3f49x11&& _0x3f49x11[_0x6ab7[27]]){var _0x3f49x13=_0x3f49x11[_0x6ab7[27]][_0x6ab7[29]](_0x6ab7[28]);_[_0x6ab7[23]](_0x3f49x13,function(_0x3f49x14){if(_0x3f49x14){_0x3f49x12= _0x3f49x14[_0x6ab7[29]](_0x6ab7[30]);_0x3f49x12[_0x6ab7[31]]=== 14&& _0x3f49xb[_0x6ab7[22]](_0x3f49x12[_0x6ab7[32]]())}})};return ReportQueue[_0x6ab7[25]]({where:{$or:[{queuecallerleaveAt:null},{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null}}]}})})[_0x6ab7[14]](function(_0x3f49x10){_[_0x6ab7[23]](_0x3f49x10,function(_0x3f49xe){if(!_[_0x6ab7[17]](_0x3f49xb,_0x3f49xe[_0x6ab7[16]])){_0x3f49xa[_0x6ab7[22]](_0x3f49xe[_0x6ab7[21]]({queuecallerleaveAt:moment()[_0x6ab7[19]](_0x6ab7[18]),queuecallerexitAt:moment()[_0x6ab7[19]](_0x6ab7[18]),queuecallerexit:true,queuecallerexitreason:_0x6ab7[26]}))}});return ReportSquare[_0x6ab7[25]]({where:{leaveAt:null}})})[_0x6ab7[14]](function(_0x3f49xf){_[_0x6ab7[23]](_0x3f49xf,function(_0x3f49xe){if(!_[_0x6ab7[17]](_0x3f49xb,_0x3f49xe[_0x6ab7[16]])){_0x3f49xa[_0x6ab7[22]](_0x3f49xe[_0x6ab7[21]]({leaveAt:moment()[_0x6ab7[19]](_0x6ab7[18]),network:_0x6ab7[24]}))}});return ReportDial[_0x6ab7[25]]({where:{endtime:null}})})[_0x6ab7[14]](function(_0x3f49xd){_[_0x6ab7[23]](_0x3f49xd,function(_0x3f49xe){if(!_[_0x6ab7[17]](_0x3f49xb,_0x3f49xe[_0x6ab7[16]])){_0x3f49xa[_0x6ab7[22]](_0x3f49xe[_0x6ab7[21]]({endtime:moment()[_0x6ab7[19]](_0x6ab7[18]),dialstatus:_0x6ab7[20]}))}});return _0x3f49xa})[_0x6ab7[15]]()[_0x6ab7[14]](function(){console[_0x6ab7[9]](_0x6ab7[13])})[_0x6ab7[12]](function(_0x3f49xc){console[_0x6ab7[9]](_0x6ab7[11],_0x3f49xc)})}module[_0x6ab7[37]]= Cleaner \ No newline at end of file +'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; diff --git a/server/config/ami/dial.js b/server/config/ami/dial.js index ae7f7ec..eb6ed61 100644 --- a/server/config/ami/dial.js +++ b/server/config/ami/dial.js @@ -1 +1,84 @@ -var _0x50cd=["\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\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x78\x70\x6F\x72\x74\x73"];var moment=require(_0x50cd[0]);var ReportDial=require(_0x50cd[2])[_0x50cd[1]];function Dial(){console[_0x50cd[4]](_0x50cd[3])}Dial[_0x50cd[6]][_0x50cd[5]]= function(_0xdaebx4){return createDial(_0xdaebx4)};Dial[_0x50cd[6]][_0x50cd[7]]= function(_0xdaebx4){if(_0xdaebx4[_0x50cd[8]]){var _0xdaebx5=_0xdaebx4[_0x50cd[8]][_0x50cd[10]](_0x50cd[9]);if(_0xdaebx5[_0x50cd[11]]> 1&& _0xdaebx5[0]!== _0x50cd[12]){_0xdaebx4[_0x50cd[13]]= moment()[_0x50cd[15]](_0x50cd[14]);_0xdaebx4[_0x50cd[16]]= _0x50cd[17];return updateDial(_0xdaebx4)}}};Dial[_0x50cd[6]][_0x50cd[18]]= function(_0xdaebx4){_0xdaebx4[_0x50cd[19]]= moment()[_0x50cd[15]](_0x50cd[14]);if(_0xdaebx4[_0x50cd[20]]=== _0x50cd[21]){_0xdaebx4[_0x50cd[16]]= _0x50cd[22];_0xdaebx4[_0x50cd[23]]= moment()[_0x50cd[15]](_0x50cd[14])}else {_0xdaebx4[_0x50cd[16]]= _0x50cd[24]};return updateDial(_0xdaebx4)};Dial[_0x50cd[6]][_0x50cd[25]]= function(_0xdaebx4){return ReportDial[_0x50cd[30]]({where:{uniqueid:_0xdaebx4[_0x50cd[28]]},order:_0x50cd[29]})[_0x50cd[27]](function(_0xdaebx6){if(_0xdaebx6){_0xdaebx4[_0x50cd[19]]= moment()[_0x50cd[15]](_0x50cd[14]);_0xdaebx4[_0x50cd[16]]= _0xdaebx6[_0x50cd[23]]?_0x50cd[26]:_0x50cd[24];return updateDial(_0xdaebx4)}})};function createDial(_0xdaebx4){return ReportDial[_0x50cd[35]](_0xdaebx4)[_0x50cd[27]](function(_0xdaebx6){console[_0x50cd[4]](_0x50cd[34])})[_0x50cd[33]](function(_0xdaebx8){console[_0x50cd[32]](_0x50cd[31]+ _0xdaebx8)})}function updateDial(_0xdaebx4,_0xdaebxa){return ReportDial[_0x50cd[30]]({where:(_0xdaebxa)?_0xdaebxa:{uniqueid:_0xdaebx4[_0x50cd[28]]},order:_0x50cd[29]})[_0x50cd[27]](function(_0xdaebxb){if(_0xdaebxb){return _0xdaebxb[_0x50cd[38]](_0xdaebx4)}})[_0x50cd[27]](function(_0xdaebx6){console[_0x50cd[4]](_0x50cd[37])})[_0x50cd[33]](function(_0xdaebx8){console[_0x50cd[32]](_0x50cd[36]+ _0xdaebx8)})}module[_0x50cd[39]]= Dial \ No newline at end of file +var moment = require('moment'); +var 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(dial) { + console.log('[dial] begin') + }) + .catch(function(err) { + console.error('[dial] dial creation error: ' + err); + }); +} + +function updateDial(evt, where) { + return ReportDial + .findOne({ + where: (where) ? where : { + uniqueid: evt.uniqueid + }, + order: 'createdAt DESC' + }) + .then(function(row) { + if (row) { + return row + .updateAttributes(evt); + } + }) + .then(function(dial) { + console.log('[dial] update') + }) + .catch(function(err) { + console.error('[dial] update error: ' + err); + }); +} + +module.exports = Dial; diff --git a/server/config/ami/fax.js b/server/config/ami/fax.js index 9a08271..7bc697b 100644 --- a/server/config/ami/fax.js +++ b/server/config/ami/fax.js @@ -1 +1,582 @@ -var _0x9196=["\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","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\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","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\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","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x43\x4C\x4F\x53\x45\x44","\x63\x6C\x6F\x73\x65","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x70\x75\x73\x68","\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","\x72\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\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"];var fs=require(_0x9196[0]);var util=require(_0x9196[1]);var path=require(_0x9196[2]);var config=require(_0x9196[3]);var _=require(_0x9196[4]);var Promise=require(_0x9196[5]);var exec=require(_0x9196[7])[_0x9196[6]];var fse=require(_0x9196[8]);var moment=require(_0x9196[9]);var FaxAccount=require(_0x9196[11])[_0x9196[10]];var FaxRoom=require(_0x9196[11])[_0x9196[12]];var FaxMessage=require(_0x9196[11])[_0x9196[13]];var FaxAttachment=require(_0x9196[11])[_0x9196[14]];var Trunk=require(_0x9196[11])[_0x9196[15]];var User=require(_0x9196[11])[_0x9196[16]];var Contact=require(_0x9196[11])[_0x9196[17]];var ReportFax=require(_0x9196[11])[_0x9196[18]];var Util=require(_0x9196[19]);var Scheduler=require(_0x9196[20]);var faxaccounts;function Fax(_0x854dx16){console[_0x9196[22]](_0x9196[21]);FaxMessage[_0x9196[23]](function(_0x854dx17,_0x854dx18){sendfax(_0x854dx17,_0x854dx16,0,_0x854dx18)});FaxMessage[_0x9196[28]](function(_0x854dx17,_0x854dx18){if(_0x854dx17[_0x9196[25]](_0x9196[24])&& _0x854dx17[_0x9196[24]]=== _0x9196[26]){sendfax(_0x854dx17,_0x854dx16,_0x854dx17[_0x9196[27]]+ 1,_0x854dx18)}});FaxAccount[_0x9196[41]]()[_0x9196[40]](function(_0x854dx1a){faxaccounts= _0x854dx1a;synch(faxaccounts);ReportFax[_0x9196[28]](function(_0x854dx17){var _0x854dx1b=_[_0x9196[32]](faxaccounts,{id:parseInt(_0x854dx17[_0x9196[31]])});if(_0x854dx1b&& _0x854dx17[_0x9196[25]](_0x9196[33])){webhook(_0x854dx17,_0x854dx1b,_0x9196[34])};if(_0x854dx1b&& _0x854dx17[_0x9196[25]](_0x9196[35])){webhook(_0x854dx17,_0x854dx1b,_0x9196[36])}});FaxRoom[_0x9196[28]](function(_0x854dx17){var _0x854dx1b=_[_0x9196[32]](faxaccounts,{id:_0x854dx17[_0x9196[37]]});if(_0x854dx1b&& _0x854dx17[_0x9196[25]](_0x9196[24])&& _0x854dx17[_0x9196[24]]=== _0x9196[38]){webhook(_0x854dx17,_0x854dx1b,_0x9196[39])}})})[_0x9196[30]](function(_0x854dx19){console[_0x9196[29]](_0x854dx19)})}function synch(faxaccounts){FaxAccount[_0x9196[23]](function(_0x854dx17){faxaccounts[_0x9196[42]](_0x854dx17)});FaxAccount[_0x9196[28]](function(_0x854dx17){var _0x854dx1d=_[_0x9196[32]](faxaccounts,{id:_0x854dx17[_0x9196[43]]});if(_0x854dx1d){console[_0x9196[22]](_0x9196[44]+ _0x854dx1d[_0x9196[45]]+ _0x9196[46]);_[_0x9196[47]](_0x854dx1d,_0x854dx17)}else {faxaccounts[_0x9196[48]](_0x854dx17)}});FaxAccount[_0x9196[50]](function(_0x854dx17){_[_0x9196[49]](faxaccounts,{id:_0x854dx17[_0x9196[43]]})})}function webhook(_0x854dx17,_0x854dx1b,_0x854dx1f){var _0x854dx20=_0x854dx1b;switch(_0x854dx1f){case _0x9196[34]:if(_0x854dx20[_0x9196[51]]&& _0x854dx20[_0x9196[52]]){console[_0x9196[22]](_0x9196[53]+ _0x854dx20[_0x9196[45]]+ _0x9196[54]);execRequest(_0x854dx17[_0x9196[55]],_0x854dx20[_0x9196[51]],_0x854dx20[_0x9196[52]])};if(_0x854dx20[_0x9196[57]][_0x9196[56]]){_[_0x9196[60]](_0x854dx20[_0x9196[57]],function(_0x854dx21){if(_0x854dx21[_0x9196[58]]){Util[_0x9196[59]](_0x854dx21,_0x854dx17)}})};break;case _0x9196[36]:if(_0x854dx20[_0x9196[61]]&& _0x854dx20[_0x9196[62]]){console[_0x9196[22]](_0x9196[53]+ _0x854dx20[_0x9196[45]]+ _0x9196[63]);execRequest(_0x854dx17[_0x9196[55]],_0x854dx20[_0x9196[61]],_0x854dx20[_0x9196[62]])};break;case _0x9196[39]:if(_0x854dx20[_0x9196[64]]&& _0x854dx20[_0x9196[65]]){console[_0x9196[22]](_0x9196[53]+ _0x854dx20[_0x9196[45]]+ _0x9196[66]);execRequest(_0x854dx17[_0x9196[55]],_0x854dx20[_0x9196[64]],_0x854dx20[_0x9196[65]])};break;default:console[_0x9196[22]](_0x9196[67])}}function execRequest(_0x854dx17,_0x854dx23,_0x854dx24){Util[_0x9196[70]](_0x854dx17,_0x854dx23,_0x854dx24)[_0x9196[40]](function(_0x854dx25){console[_0x9196[22]](_0x9196[69])})[_0x9196[30]](function(_0x854dx19){console[_0x9196[22]](_0x9196[68])})}Fax[_0x9196[72]][_0x9196[71]]= function(_0x854dx26){return FaxMessage[_0x9196[78]]({where:{channel:_0x854dx26[_0x9196[77]]}})[_0x9196[40]](function(_0x854dx27){if(!_0x854dx27){throw new Error(_0x9196[74])};return _0x854dx27[_0x9196[76]]({error:_0x854dx26[_0x9196[75]]})})[_0x9196[30]](function(_0x854dx19){console[_0x9196[22]](_0x9196[73],_0x854dx19)})};Fax[_0x9196[72]][_0x9196[79]]= function(_0x854dx26){return FaxMessage[_0x9196[78]]({where:{filename:_0x854dx26[_0x9196[92]],localstationid:_0x854dx26[_0x9196[93]]}})[_0x9196[40]](function(_0x854dx27){if(!_0x854dx27){throw new Error(_0x9196[74])};return _0x854dx27[_0x9196[76]]({channel:_0x854dx26[_0x9196[77]],channelstate:_0x854dx26[_0x9196[80]],channelstatedesc:_0x854dx26[_0x9196[81]],calleridnum:_0x854dx26[_0x9196[82]],calleridname:_0x854dx26[_0x9196[83]],connectedlinenum:_0x854dx26[_0x9196[84]],connectedlinename:_0x854dx26[_0x9196[85]],accountcode:_0x854dx26[_0x9196[86]],context:_0x854dx26[_0x9196[87]],exten:_0x854dx26[_0x9196[88]],priority:_0x854dx26[_0x9196[89]],uniqueid:_0x854dx26[_0x9196[90]],linkedid:_0x854dx26[_0x9196[91]],lastStatus:_0x854dx26[_0x9196[24]]})})[_0x9196[30]](function(_0x854dx19){console[_0x9196[22]](_0x9196[73],_0x854dx19)})};Fax[_0x9196[72]][_0x9196[94]]= function(_0x854dx26){var _0x854dx28;return FaxMessage[_0x9196[78]]({where:{filename:_0x854dx26[_0x9196[92]],localstationid:_0x854dx26[_0x9196[93]]}})[_0x9196[40]](function(_0x854dx27){if(!_0x854dx27){throw new Error(_0x9196[74])};_0x854dx28= _0x854dx27;var _0x854dx2a=_0x9196[96];if(_0x854dx26[_0x9196[98]]== _0x9196[99]){_0x854dx2a= _0x9196[100]};return _0x854dx28[_0x9196[76]]({remotestationid:_0x854dx26[_0x9196[101]],pagestransferred:_0x854dx26[_0x9196[98]],resolution:_0x854dx26[_0x9196[102]],transferrate:_0x854dx26[_0x9196[103]],status:_0x854dx2a})})[_0x9196[40]](function(){return _0x854dx28[_0x9196[97]]()})[_0x9196[40]](function(_0x854dx29){if(!_0x854dx29){throw new Error(_0x9196[95])};return _0x854dx29[_0x9196[76]]({lastEvent:_0x9196[96]},{individualHooks:true})})[_0x9196[30]](function(_0x854dx19){console[_0x9196[22]](_0x9196[73],_0x854dx19)})};Fax[_0x9196[72]][_0x9196[104]]= function(_0x854dx26){console[_0x9196[22]](util[_0x9196[106]](_0x9196[105],_0x854dx26[_0x9196[82]]));var _0x854dx2b=_[_0x9196[107]](_0x854dx26);var _0x854dx2c;var _0x854dx28,_0x854dx2d;return FaxAccount[_0x9196[78]]({where:{localstationid:_0x854dx26[_0x9196[93]]}})[_0x9196[40]](function(_0x854dx37){if(!_0x854dx37){throw new Error(_0x9196[138])};console[_0x9196[22]](_0x9196[139],_0x854dx26[_0x9196[93]]);_0x854dx2c= _0x854dx37;if(_0x854dx2c[_0x9196[140]]){return Contact[_0x9196[141]]({where:{ListId:_0x854dx2c[_0x9196[140]],$or:[{phone:_0x854dx26[_0x9196[82]]},{fax:_0x854dx26[_0x9196[82]]}]},defaults:{phone:_0x854dx26[_0x9196[82]],fax:_0x854dx26[_0x9196[82]],firstName:_0x854dx26[_0x9196[82]],ListId:_0x854dx2c[_0x9196[140]]}})}else {return []}})[_0x9196[137]](function(_0x854dx35,_0x854dx36){if(_0x854dx36!= undefined&& !_0x854dx36){return _0x854dx35[_0x9196[76]]({fax:_0x854dx26[_0x9196[82]]})};return})[_0x9196[40]](function(){return FaxRoom[_0x9196[41]]({limit:1,where:{contact:_0x854dx2b[_0x9196[82]],FaxAccountId:_0x854dx2c[_0x9196[43]],status:{$ne:_0x9196[38]}},order:[[_0x9196[135],_0x9196[136]]]})})[_0x9196[40]](function(_0x854dx34){if(_0x854dx34[_0x9196[56]]){_0x854dx34= _[_0x9196[129]](_0x854dx34);return _0x854dx34[_0x9196[76]]({lastEvent:_0x9196[127],lastEventAt:moment()[_0x9196[106]](_0x9196[130]),status:_0x9196[131],openReason:_0x9196[132],faxIn:++_0x854dx34[_0x9196[133]]})}else {return FaxRoom[_0x9196[124]]({contact:_0x854dx2b[_0x9196[82]],account:_0x854dx2c[_0x9196[45]],status:_0x9196[134],lastEvent:_0x9196[127],lastEventAt:moment()[_0x9196[106]](_0x9196[130]),FaxAccountId:_0x854dx2c[_0x9196[43]],faxIn:1})}})[_0x9196[40]](function(_0x854dx34){if(!_0x854dx34){throw new Error(_0x9196[125])};_0x854dx2d= _0x854dx34;_0x854dx2b[_0x9196[126]]= _0x854dx34[_0x9196[43]];_0x854dx2b[_0x9196[24]]= _0x9196[127];_0x854dx2b[_0x9196[112]]= _0x854dx2b[_0x9196[82]];_0x854dx2b[_0x9196[128]]= _0x854dx2b[_0x9196[93]];return FaxMessage[_0x9196[124]](_0x854dx2b)})[_0x9196[40]](function(_0x854dx30){_0x854dx28= _0x854dx30;var _0x854dx31=[];var _0x854dx32=path[_0x9196[116]](_0x854dx26[_0x9196[92]])[_0x9196[45]];var _0x854dx33=_0x854dx32+ _0x9196[117];return FaxAttachment[_0x9196[124]]({path:path[_0x9196[123]](config[_0x9196[118]],_0x9196[119],_0x9196[120],_0x9196[109],_0x9196[121],_0x9196[122],_0x854dx33),basename:_0x854dx33,name:_0x854dx32,FaxMessageId:_0x854dx30[_0x9196[43]]})})[_0x9196[40]](function(_0x854dx2f){return exec(_0x9196[114]+ _0x854dx2f[_0x9196[2]]+ _0x9196[115]+ _0x854dx26[_0x9196[92]])})[_0x9196[40]](function(){var _0x854dx2e= new Scheduler({channel:_0x9196[109],uniqueid:util[_0x9196[106]](_0x9196[110],moment()[_0x9196[111]](),_0x854dx2d[_0x9196[43]]),messageid:_0x854dx28[_0x9196[43]],roomid:_0x854dx2d[_0x9196[43]],accountid:_0x854dx2c[_0x9196[43]],accountname:_0x854dx2c[_0x9196[45]],accountphone:_0x854dx2c[_0x9196[93]],from:_0x854dx28[_0x9196[112]]});_0x854dx2e[_0x9196[113]]()})[_0x9196[30]](function(_0x854dx19){console[_0x9196[22]](_0x9196[108],_0x854dx19)})};function sendfax(_0x854dx30,_0x854dx16,_0x854dx39,_0x854dx18){if(_0x854dx30[_0x9196[24]]=== _0x9196[26]){var _0x854dx2d;var _0x854dx28=_0x854dx30;var _0x854dx3a=_0x854dx30[_0x9196[112]];var _0x854dx3b=_0x854dx30[_0x9196[128]];var _0x854dx3c;var _0x854dx3d;var _0x854dx3e,_0x854dx3f;return FaxAccount[_0x9196[78]]({where:{localstationid:_0x854dx28[_0x9196[112]]}})[_0x9196[40]](function(_0x854dx37){if(!_0x854dx37){throw new Error(_0x9196[138])};_0x854dx3c= _[_0x9196[107]](_0x854dx37[_0x9196[55]]);return Trunk[_0x9196[78]]({where:{name:_0x854dx3c[_0x9196[178]]},attributes:[_0x9196[45]]})})[_0x9196[40]](function(_0x854dx41){if(!_0x854dx41){throw new Error(_0x9196[177])};_0x854dx3d= _[_0x9196[107]](_0x854dx41[_0x9196[55]]);return})[_0x9196[40]](function(){return _0x854dx3c})[_0x9196[40]](getFaxRoom(_0x854dx28))[_0x9196[40]](function(_0x854dx29){_0x854dx2d= _0x854dx29;return _0x854dx2d[_0x9196[176]](_0x854dx28[_0x9196[43]])})[_0x9196[40]](function(){return _0x854dx2d[_0x9196[76]]({status:_0x9196[173],lastEvent:_0x9196[26],lastEventAt:moment()[_0x9196[106]](_0x9196[130]),faxOut:++_0x854dx2d[_0x9196[174]]},{individualHooks:true,user:_0x854dx18[_0x9196[175]]})})[_0x9196[40]](function(){return _0x854dx2d[_0x9196[172]](_0x854dx28.UserId)})[_0x9196[40]](function(){return User[_0x9196[171]](_0x854dx28.UserId)})[_0x9196[40]](function(){if(_0x854dx3c[_0x9196[140]]){return Contact[_0x9196[141]]({where:{ListId:_0x854dx3c[_0x9196[140]],$or:[{phone:_0x854dx3b},{fax:_0x854dx3b}]},defaults:{fax:_0x854dx3b,phone:_0x854dx3b,firstName:_0x854dx3b,ListId:_0x854dx3c[_0x9196[140]]}})}else {return []}})[_0x9196[137]](function(_0x854dx35,_0x854dx36){if(_0x854dx36!= undefined&& !_0x854dx36){return _0x854dx35[_0x9196[76]]({fax:_0x854dx3b})};return})[_0x9196[40]](function(){_0x854dx3e= _0x854dx28[_0x9196[162]][0][_0x9196[2]];if(_0x854dx28[_0x9196[162]][0][_0x9196[163]]=== _0x9196[164]){_0x854dx3f= path[_0x9196[123]](config[_0x9196[118]],_0x9196[119],_0x9196[120],_0x9196[109],_0x9196[165],_0x9196[122],_0x9196[166],path[_0x9196[116]](_0x854dx3e)[_0x9196[45]]+ _0x9196[167]);return exec(_0x9196[168]+ _0x854dx3f+ _0x9196[115]+ _0x854dx3e)}else {_0x854dx3f= path[_0x9196[123]](config[_0x9196[118]],_0x9196[119],_0x9196[120],_0x9196[109],_0x9196[165],_0x9196[122],_0x9196[166],path[_0x9196[116]](_0x854dx3e)[_0x9196[169]]);fse[_0x9196[170]](_0x854dx3e,_0x854dx3f);return}})[_0x9196[40]](function(){fs[_0x9196[161]](_0x854dx3f,511);return _0x854dx28[_0x9196[76]]({filename:_0x854dx3f,localstationid:_0x854dx28[_0x9196[112]],retry:_0x854dx39})})[_0x9196[40]](function(){return Promise[_0x9196[160]](_0x854dx16[_0x9196[159]])({action:_0x9196[146],channel:util[_0x9196[106]](_0x9196[147],_0x854dx3c[_0x9196[148]],_0x854dx3d[_0x9196[45]],_0x854dx3b),exten:_0x854dx3b,context:_0x9196[149],priority:1,callerid:util[_0x9196[106]](_0x9196[150],_0x854dx3c[_0x9196[93]],_0x854dx3c[_0x9196[93]]),variable:{FAXNAME:_0x854dx3c[_0x9196[45]],FAXNUMBER:_0x854dx3b,FAXECM:_0x854dx3c[_0x9196[151]],FAXHEADERINFO:_0x854dx3c[_0x9196[152]],FAXLOCALSTATIONID:_0x854dx3c[_0x9196[93]],FAXMINRATE:_0x854dx3c[_0x9196[153]],FAXMAXRATE:_0x854dx3c[_0x9196[154]],FAXMODEM:util[_0x9196[106]](_0x9196[155],_0x854dx3c[_0x9196[156]]),FAXGATEWAY:_0x854dx3c[_0x9196[157]],FAXT38TIMEOUT:_0x854dx3c[_0x9196[158]],FAXOUTFILE:_0x854dx3f},account:_0x854dx3c[_0x9196[93]]})})[_0x9196[40]](function(_0x854dx40){console[_0x9196[22]](_0x9196[145],_0x854dx40)})[_0x9196[30]](function(_0x854dx19){console[_0x9196[22]](_0x9196[142],_0x854dx19);return _0x854dx28[_0x9196[144]]({status:_0x9196[100]})[_0x9196[40]](function(){if(_0x854dx2d){return _0x854dx2d[_0x9196[76]]({lastEvent:_0x9196[100]})};return})[_0x9196[30]](function(_0x854dx19){console[_0x9196[22]](_0x9196[143])})})}}function getFaxRoom(_0x854dx28){return function(_0x854dx1b){if(_0x854dx28[_0x9196[126]]){return FaxRoom[_0x9196[171]](_0x854dx28.FaxRoomId)}else {return FaxRoom[_0x9196[41]]({limit:1,where:{contact:_0x854dx28[_0x9196[128]],FaxAccountId:_0x854dx1b[_0x9196[43]]},order:[[_0x9196[135],_0x9196[136]]]})[_0x9196[40]](function(_0x854dx43){var _0x854dx34=_[_0x9196[129]](_0x854dx43);if(!_0x854dx34|| _0x854dx34[_0x9196[24]]=== _0x9196[38]){return FaxRoom[_0x9196[124]]({contact:_0x854dx28[_0x9196[128]],account:_0x854dx1b[_0x9196[45]],status:_0x9196[173],FaxAccountId:_0x854dx1b[_0x9196[43]]})}else {return _0x854dx34}})}}}module[_0x9196[179]]= Fax \ No newline at end of file +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...'); + + FaxMessage.afterCreate(function(doc, opt) { + sendfax(doc, ami, 0, opt); + }); + + FaxMessage.afterUpdate(function(doc, opt) { + if (doc.changed('status') && doc.status === 'SENDING') { + sendfax(doc, ami, doc.retry + 1, opt); + } + }); + + FaxAccount + .findAll() + .then(function(accounts) { + faxaccounts = accounts; + synch(faxaccounts); + ReportFax.afterUpdate(function(doc) { + var account = _.find(faxaccounts, { + id: parseInt(doc.accountid) + }); + if (account && doc.changed('connectid')) { + webhook(doc, account, 'accept'); + } + if (account && doc.changed('rejectedAt')) { + webhook(doc, account, 'reject'); + } + }); + FaxRoom.afterUpdate(function(doc) { + var account = _.find(faxaccounts, { + id: doc.FaxAccountId + }); + if (account && doc.changed('status') && doc.status === 'CLOSED') { + webhook(doc, account, 'close'); + } + }) + }) + .catch(function(err) { + console.error(err); + }); +} + +function synch(faxaccounts) { + FaxAccount.afterCreate(function(doc) { + faxaccounts.push(doc); + }); + FaxAccount.afterUpdate(function(doc) { + var oldItem = _.find(faxaccounts, { + id: doc.id + }); + if (oldItem) { + console.log('Fax account: ' + oldItem.name + ' Update'); + _.merge(oldItem, doc); + } else { + faxaccounts.unshift(doc); + } + }); + 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, _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, _Account.rejectMethod, _Account.rejectUrl); + } + break; + case 'close': + if (_Account.closeMethod && _Account.closeUrl) { + console.log('Fax account <' + _Account.name + '> executing close webhook'); + execRequest(doc.dataValues, _Account.closeMethod, _Account.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!'); + + }) +} +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; diff --git a/server/config/ami/index.js b/server/config/ami/index.js index 9934b8b..70a48c4 100644 --- a/server/config/ami/index.js +++ b/server/config/ami/index.js @@ -1 +1,331 @@ -var _0xec8d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\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","\x76\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x65\x78\x70\x6F\x72\x74\x73","\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","\x68\x6F\x73\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x70\x6F\x72\x74","\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","\x6C\x6F\x67","\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","\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","\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","\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","\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","\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","\x73\x65\x6E\x64","\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","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6D\x69\x2F\x61\x6D\x69\x2E\x61\x6D\x69"];_0xec8d[0];var Agent=require(_0xec8d[1]);var Action=require(_0xec8d[2]);var Call=require(_0xec8d[3]);var Member=require(_0xec8d[4]);var QueueCaller=require(_0xec8d[5]);var QueueMember=require(_0xec8d[6]);var Recording=require(_0xec8d[7]);var Trunk=require(_0xec8d[8]);var Context=require(_0xec8d[9]);var ACW=require(_0xec8d[10]);var User=require(_0xec8d[11]);var Transfer=require(_0xec8d[12]);var Network=require(_0xec8d[13]);var Fax=require(_0xec8d[14]);var Dial=require(_0xec8d[15]);var Cleaner=require(_0xec8d[16]);function onDisconnect(_0x3dc5x12){}function onConnect(_0x3dc5x12){}function getVariable(_0x3dc5x15){var _0x3dc5x16=Object[_0xec8d[18]](_0x3dc5x15[_0xec8d[17]]);_0x3dc5x15[_0xec8d[17]]= _0x3dc5x16[0];return _0x3dc5x15}module[_0xec8d[19]]= function(_0x3dc5x12){var _0x3dc5x17= new Agent();var _0x3dc5x18= new Call();var _0x3dc5x19= new Member();var _0x3dc5x1a= new QueueMember();var _0x3dc5x1b= new QueueCaller();var _0x3dc5x1c= new Recording();var _0x3dc5x1d= new Trunk(_0x3dc5x12);var _0x3dc5x1e= new Context(_0x3dc5x12);var _0x3dc5x1f= new Action(_0x3dc5x12);var _0x3dc5x20= new ACW(_0x3dc5x12);var _0x3dc5x21= new User();var _0x3dc5x22= new Transfer();var _0x3dc5x23= new Network(_0x3dc5x12);var _0x3dc5x24= new Fax(_0x3dc5x12);var _0x3dc5x25= new Dial();var _0x3dc5x26= new Cleaner(_0x3dc5x12);_0x3dc5x12[_0xec8d[27]](_0xec8d[20],function(){console[_0xec8d[25]](_0xec8d[21],_0x3dc5x12[_0xec8d[23]][_0xec8d[22]],_0x3dc5x12[_0xec8d[23]][_0xec8d[24]]);_0x3dc5x12[_0xec8d[23]][_0xec8d[26]]= new Date();onConnect(_0x3dc5x12)});_0x3dc5x12[_0xec8d[27]](_0xec8d[28],function(){onDisconnect(_0x3dc5x12);console[_0xec8d[25]](_0xec8d[29],_0x3dc5x12[_0xec8d[23]][_0xec8d[22]],_0x3dc5x12[_0xec8d[23]][_0xec8d[24]])});_0x3dc5x12[_0xec8d[27]](_0xec8d[30],function(_0x3dc5x27){console[_0xec8d[32]](_0xec8d[31],_0x3dc5x12[_0xec8d[23]][_0xec8d[22]],_0x3dc5x12[_0xec8d[23]][_0xec8d[24]],_0x3dc5x27)});_0x3dc5x12[_0xec8d[27]](_0xec8d[33],function(_0x3dc5x28){console[_0xec8d[32]](_0xec8d[34],_0x3dc5x12[_0xec8d[23]][_0xec8d[22]],_0x3dc5x12[_0xec8d[23]][_0xec8d[24]],_0x3dc5x28)});_0x3dc5x12[_0xec8d[27]](_0xec8d[35],function(_0x3dc5x29){if(_0x3dc5x29[_0xec8d[36]]=== _0xec8d[37]){console[_0xec8d[32]](_0xec8d[38],_0x3dc5x29[_0xec8d[39]])};if(_0x3dc5x29[_0xec8d[36]][_0xec8d[41]](_0xec8d[40])=== 0){_0x3dc5x21[_0xec8d[42]](_0x3dc5x29)}});_0x3dc5x12[_0xec8d[27]](_0xec8d[43],function(_0x3dc5x29){_0x3dc5x17[_0xec8d[44]](_0x3dc5x29);_0x3dc5x21[_0xec8d[45]](_0xec8d[44],_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[46],function(_0x3dc5x29){_0x3dc5x1c[_0xec8d[47]](_0x3dc5x29);_0x3dc5x20[_0xec8d[46]](_0x3dc5x29);_0x3dc5x17[_0xec8d[48]](_0x3dc5x29);_0x3dc5x19[_0xec8d[49]](_0x3dc5x29);_0x3dc5x1b[_0xec8d[48]](_0x3dc5x29);_0x3dc5x21[_0xec8d[45]](_0xec8d[48],_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[50],function(_0x3dc5x29){_0x3dc5x17[_0xec8d[20]](_0x3dc5x29);_0x3dc5x19[_0xec8d[51]](_0x3dc5x29);_0x3dc5x21[_0xec8d[45]](_0xec8d[20],_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[52],function(_0x3dc5x29){_0x3dc5x17[_0xec8d[53]](_0x3dc5x29);_0x3dc5x21[_0xec8d[45]](_0xec8d[48],_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[54],function(_0x3dc5x29){_0x3dc5x17[_0xec8d[55]](_0x3dc5x29);_0x3dc5x21[_0xec8d[45]](_0xec8d[48],_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[56],function(_0x3dc5x29){_0x3dc5x1a[_0xec8d[57]](_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[58],function(_0x3dc5x29){_0x3dc5x1a[_0xec8d[59]](_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[60],function(_0x3dc5x29){_0x3dc5x1a[_0xec8d[61]](_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[62],function(_0x3dc5x29){_0x3dc5x1a[_0xec8d[63]](_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[64],function(_0x3dc5x29){_0x3dc5x1a[_0xec8d[65]](_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[66],function(_0x3dc5x29){_0x3dc5x1a[_0xec8d[67]](_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[68],function(_0x3dc5x29){_0x3dc5x1b[_0xec8d[69]](_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[70],function(_0x3dc5x29){_0x3dc5x1b[_0xec8d[71]](_0x3dc5x29);_0x3dc5x21[_0xec8d[45]](_0xec8d[48],_0x3dc5x29);_0x3dc5x17[_0xec8d[72]](_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[73],function(_0x3dc5x29){_0x3dc5x1b[_0xec8d[74]](_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[75],function(_0x3dc5x29){_0x3dc5x18[_0xec8d[76]](_0x3dc5x29);_0x3dc5x1c[_0xec8d[77]](_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[78],function(_0x3dc5x29){_0x3dc5x25[_0xec8d[78]](_0x3dc5x29);_0x3dc5x19[_0xec8d[79]](_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[80],function(_0x3dc5x29){_0x3dc5x29[_0xec8d[81]]= _0xec8d[82];_0x3dc5x22[_0xec8d[83]](_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[84],function(_0x3dc5x29){_0x3dc5x29[_0xec8d[81]]= _0xec8d[85];_0x3dc5x22[_0xec8d[86]](_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[87],function(_0x3dc5x29){var _0x3dc5x15=getVariable(_0x3dc5x29);switch(_0x3dc5x15[_0xec8d[17]]){case _0xec8d[89]:_0x3dc5x1c[_0xec8d[88]](_0x3dc5x15);break;case _0xec8d[91]:_0x3dc5x1b[_0xec8d[90]](_0x3dc5x15);break;case _0xec8d[95]:console[_0xec8d[32]](_0xec8d[92],_0x3dc5x29);if(_0x3dc5x29[_0xec8d[93]]){_0x3dc5x24[_0xec8d[94]](_0x3dc5x29)};break;case _0xec8d[97]:console[_0xec8d[32]](_0xec8d[96],_0x3dc5x29);break;case _0xec8d[99]:console[_0xec8d[32]](_0xec8d[98],_0x3dc5x29);break;case _0xec8d[102]:if(_0x3dc5x29[_0xec8d[93]]){_0x3dc5x25[_0xec8d[101]]({uniqueid:_0x3dc5x29[_0xec8d[100]],routeId:_0x3dc5x29[_0xec8d[93]]})};break;default:break}});_0x3dc5x12[_0xec8d[27]](_0xec8d[103],function(_0x3dc5x29){_0x3dc5x1d[_0xec8d[104]](_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[105],function(_0x3dc5x29){_0x3dc5x1d[_0xec8d[106]](_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[107],function(_0x3dc5x29){_0x3dc5x24[_0xec8d[107]](_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[108],function(_0x3dc5x29){if(_0x3dc5x29[_0xec8d[109]]=== _0xec8d[110]){console[_0xec8d[32]](_0xec8d[111],_0x3dc5x29);_0x3dc5x24[_0xec8d[112]](_0x3dc5x29)}});_0x3dc5x12[_0xec8d[27]](_0xec8d[113],function(_0x3dc5x29){_0x3dc5x25[_0xec8d[114]](_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[115],function(_0x3dc5x29){_0x3dc5x25[_0xec8d[116]](_0x3dc5x29);_0x3dc5x19[_0xec8d[117]](_0x3dc5x29)});_0x3dc5x12[_0xec8d[27]](_0xec8d[118],function(_0x3dc5x29){console[_0xec8d[32]](_0xec8d[119],_0x3dc5x29);_0x3dc5x24[_0xec8d[120]](_0x3dc5x29)});require(_0xec8d[122])[_0xec8d[121]](_0x3dc5x12)} \ No newline at end of file +'use strict'; + +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'); + +// When the ami disconnects.. perform this +function onDisconnect(ami) {} + +// When the ami connects.. perform this +function onConnect(ami) {} + +function getVariable(event) { + var _event = _.clone(event) + var keys = _.keys(_event.variable); + _event.variable = keys[0]; + return _event; +} + +module.exports = function(ami) { + + 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); + 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. + onConnect(ami); + }); + + // Raised when asterisk is disconnected + ami.on('disconnect', function() { + // Call onDisconnect. + onDisconnect(ami); + 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) { + console.log('abandon evt', 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) { + // console.log(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); +}; diff --git a/server/config/ami/member.js b/server/config/ami/member.js index c33c5b7..22bba44 100644 --- a/server/config/ami/member.js +++ b/server/config/ami/member.js @@ -1 +1,98 @@ -var _0x4b28=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\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","\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","\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\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4b28[0];var moment=require(_0x4b28[1]);var ReportMember=require(_0x4b28[3])[_0x4b28[2]];function Member(){console[_0x4b28[5]](_0x4b28[4])}Member[_0x4b28[7]][_0x4b28[6]]= function(_0xb3f1x4){return createMember({channel:_0x4b28[8],membername:_0xb3f1x4[_0x4b28[9]],interface:_0xb3f1x4[_0x4b28[10]],type:_0x4b28[11],enterAt:moment()[_0x4b28[13]](_0x4b28[12]),data1:_0x4b28[14],role:_0x4b28[15],internal:_0xb3f1x4[_0x4b28[16]]})};Member[_0x4b28[7]][_0x4b28[17]]= function(_0xb3f1x4){return updateMember({channel:_0x4b28[8],type:_0x4b28[11],membername:_0xb3f1x4[_0x4b28[9]],interface:_0xb3f1x4[_0x4b28[10]],exitAt:null})};Member[_0x4b28[7]][_0x4b28[18]]= function(_0xb3f1x4){if(_0xb3f1x4[_0x4b28[19]]){var _0xb3f1x5=_0xb3f1x4[_0x4b28[19]][_0x4b28[21]](_0x4b28[20]);if(_0xb3f1x4[_0x4b28[22]]=== _0x4b28[23]&& _0xb3f1x4[_0x4b28[25]][_0x4b28[24]]> 1&& _0xb3f1x5[0]!== _0x4b28[26]){return createMember({channel:_0x4b28[8],membername:_0xb3f1x4[_0x4b28[27]][_0x4b28[21]](/\/|-/)[1],interface:_0xb3f1x4[_0x4b28[29]][_0x4b28[21]](_0x4b28[28])[0],type:_0x4b28[11],enterAt:moment()[_0x4b28[13]](_0x4b28[12]),data1:_0x4b28[30],role:_0x4b28[15],internal:_0xb3f1x4[_0x4b28[31]],uniqueid:_0xb3f1x4[_0x4b28[32]]})}}};Member[_0x4b28[7]][_0x4b28[33]]= function(_0xb3f1x4){return updateMember({uniqueid:_0xb3f1x4[_0x4b28[34]]})};function createMember(_0xb3f1x4){return ReportMember[_0x4b28[40]](_0xb3f1x4)[_0x4b28[39]](function(_0xb3f1x8){console[_0x4b28[5]](_0x4b28[38])})[_0x4b28[37]](function(_0xb3f1x7){console[_0x4b28[36]](_0x4b28[35]+ _0xb3f1x7)})}function updateMember(_0xb3f1xa){return ReportMember[_0x4b28[45]]({where:_0xb3f1xa})[_0x4b28[39]](function(_0xb3f1xb){if(_0xb3f1xb){return _0xb3f1xb[_0x4b28[44]]({exitAt:moment()[_0x4b28[13]](_0x4b28[12]),duration:moment[_0x4b28[43]](moment()- moment(_0xb3f1xb[_0x4b28[42]]))[_0x4b28[41]]()})}})[_0x4b28[37]](function(_0xb3f1x7){console[_0x4b28[36]](_0x4b28[35]+ _0xb3f1x7)})}module[_0x4b28[46]]= Member \ No newline at end of file +'use strict'; + +/* + * + * Service deprecated! + * Please see action.js file in order to manage Login and Pause status. + * + */ + +var moment = require('moment'); + +var 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(agent) { + console.log('[report] member talking created'); + }) + .catch(function(err) { + console.error('[report] member ' + err); + }); +} + +function updateMember(where) { + return ReportMember + .findOne({ + where: where + }) + .then(function(member) { + if (member) { + return member.updateAttributes({ + exitAt: moment().format("YYYY-MM-DD HH:mm:ss"), + duration: moment.duration(moment() - moment(member.enterAt)).asSeconds() + }); + } + }) + // .then(function() { + // console.log('[report] member outbound talking updated'); + // }) + .catch(function(err) { + console.error('[report] member ' + err); + }); +} + +module.exports = Member; diff --git a/server/config/ami/network.js b/server/config/ami/network.js index 99c3d70..1e23db2 100644 --- a/server/config/ami/network.js +++ b/server/config/ami/network.js @@ -1 +1,84 @@ -var _0x7c54=["\x4E\x65\x74\x77\x6F\x72\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","\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\x6C\x65\x74\x65","\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"];var NetwokModel=require(_0x7c54[1])[_0x7c54[0]];var fs=require(_0x7c54[2]);var util=require(_0x7c54[3]);var path=require(_0x7c54[4]);var config=require(_0x7c54[5]);var _=require(_0x7c54[6]);function Network(_0x25abx8){console[_0x7c54[8]](_0x7c54[7]);NetwokModel[_0x7c54[9]](function(_0x25abx9){networkRewrite(_0x25abx9,_0x25abx8)});NetwokModel[_0x7c54[10]](function(_0x25abx9){networkRewrite(_0x25abx9,_0x25abx8)});NetwokModel[_0x7c54[11]](function(_0x25abx9){networkRewrite(_0x25abx9,_0x25abx8)})}function networkRewrite(_0x25abx9,_0x25abx8){switch(_0x25abx9[_0x7c54[36]]){case _0x7c54[28]:return NetwokModel[_0x7c54[29]](_0x7c54[28])[_0x7c54[27]]()[_0x7c54[26]](function(_0x25abxc){var _0x25abxd=_0x7c54[14];var _0x25abxe=_0x7c54[15];_0x25abxc[_0x7c54[19]](function(_0x25abxf){_0x25abxd+= util[_0x7c54[18]](_0x7c54[16],_0x25abxf[_0x7c54[17]])});fs[_0x7c54[25]](path[_0x7c54[21]](config[_0x7c54[20]],_0x25abxe),_0x25abxd,{flags:_0x7c54[22],mode:parseInt(_0x7c54[23],8)},function(_0x25abxb){if(_0x25abxb){throw _0x25abxb};reload(_0x25abx8);console[_0x7c54[8]](_0x7c54[24])})})[_0x7c54[13]](function(_0x25abxb){console[_0x7c54[8]](_0x7c54[12],_0x25abxb)});case _0x7c54[34]:return NetwokModel[_0x7c54[29]](_0x7c54[34])[_0x7c54[27]]()[_0x7c54[26]](function(_0x25abx10){var _0x25abx11=_0x7c54[14];var _0x25abx12=_0x7c54[31];_0x25abx10[_0x7c54[19]](function(_0x25abx13){_0x25abx11+= util[_0x7c54[18]](_0x7c54[32],_0x25abx13[_0x7c54[17]])});fs[_0x7c54[25]](path[_0x7c54[21]](config[_0x7c54[20]],_0x25abx12),_0x25abx11,{flags:_0x7c54[22],mode:parseInt(_0x7c54[23],8)},function(_0x25abxb){if(_0x25abxb){throw _0x25abxb};reload(_0x25abx8);console[_0x7c54[8]](_0x7c54[33])})})[_0x7c54[13]](function(_0x25abxb){console[_0x7c54[8]](_0x7c54[30],_0x25abxb)});default:console[_0x7c54[8]](_0x7c54[35],_0x25abx9[_0x7c54[36]])}}function reload(_0x25abx8){_0x25abx8[_0x7c54[39]]({Action:_0x7c54[37]},function(_0x25abxb,_0x25abx15){if(_0x25abxb){console[_0x7c54[38]](_0x25abxb)}else {console[_0x7c54[8]](_0x25abx15)}})}module[_0x7c54[40]]= Network \ No newline at end of file +var NetwokModel = require('../../models').Network; +var fs = require('fs'); +var util = require('util'); +var path = require('path'); +var config = require('../../config/environment'); +var _ = require('lodash'); + +function Network(ami) { + console.log('Network Initialization...'); + NetwokModel.afterCreate(function(doc) { + networkRewrite(doc, ami); + }) + NetwokModel.afterUpdate(function(doc) { + networkRewrite(doc, ami); + }) + NetwokModel.afterDelete(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; diff --git a/server/config/ami/queue_caller.js b/server/config/ami/queue_caller.js index 8b23c98..a143290 100644 --- a/server/config/ami/queue_caller.js +++ b/server/config/ami/queue_caller.js @@ -1 +1,73 @@ -var _0xe8f4=["\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","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\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","\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\x71\x75\x65\x75\x65\x5F\x63\x61\x6C\x6C\x65\x72\x20\x65\x72\x72\x6F\x72\x3A\x20","\x5B\x71\x75\x65\x75\x65\x5F\x63\x61\x6C\x6C\x65\x72\x5D\x20\x71\x75\x65\x75\x65\x5F\x63\x61\x6C\x6C\x65\x72\x20\x75\x70\x64\x61\x74\x65\x64","\x69\x6E\x66\x6F","\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];var moment=require(_0xe8f4[0]);var ReportQueue=require(_0xe8f4[2])[_0xe8f4[1]];function QueueCaller(){console[_0xe8f4[4]](_0xe8f4[3])}QueueCaller[_0xe8f4[6]][_0xe8f4[5]]= function(_0xe8d2x4){_0xe8d2x4[_0xe8f4[7]]= moment()[_0xe8f4[9]](_0xe8f4[8]);return create(_0xe8d2x4)};QueueCaller[_0xe8f4[6]][_0xe8f4[10]]= function(_0xe8d2x4){_0xe8d2x4[_0xe8f4[11]]= moment()[_0xe8f4[9]](_0xe8f4[8]);return findAndUpdate(_0xe8d2x4)};QueueCaller[_0xe8f4[6]][_0xe8f4[12]]= function(_0xe8d2x4){_0xe8d2x4[_0xe8f4[13]]= true;_0xe8d2x4[_0xe8f4[14]]= moment()[_0xe8f4[9]](_0xe8f4[8]);return findAndUpdate(_0xe8d2x4)};QueueCaller[_0xe8f4[6]][_0xe8f4[15]]= function(_0xe8d2x4){_0xe8d2x4[_0xe8f4[16]]= true;_0xe8d2x4[_0xe8f4[17]]= moment()[_0xe8f4[9]](_0xe8f4[8]);return findAndUpdate(_0xe8d2x4)};QueueCaller[_0xe8f4[6]][_0xe8f4[18]]= function(_0xe8d2x4){_0xe8d2x4[_0xe8f4[13]]= false;_0xe8d2x4[_0xe8f4[14]]= null;_0xe8d2x4[_0xe8f4[19]]= true;_0xe8d2x4[_0xe8f4[20]]= moment()[_0xe8f4[9]](_0xe8f4[8]);_0xe8d2x4[_0xe8f4[21]]= _0xe8d2x4[_0xe8f4[23]][_0xe8f4[22]]();return findAndUpdate(_0xe8d2x4)};function create(_0xe8d2x4){return ReportQueue[_0xe8f4[29]](_0xe8d2x4)[_0xe8f4[28]](function(_0xe8d2x7){console[_0xe8f4[4]](_0xe8f4[27])})[_0xe8f4[26]](function(_0xe8d2x6){console[_0xe8f4[25]](_0xe8f4[24]+ _0xe8d2x6)})}function findAndUpdate(_0xe8d2x4){return ReportQueue[_0xe8f4[34]](_0xe8d2x4,{where:{uniqueid:_0xe8d2x4[_0xe8f4[33]]},individualHooks:true})[_0xe8f4[28]](function(_0xe8d2x7){console[_0xe8f4[32]](_0xe8f4[31])})[_0xe8f4[26]](function(_0xe8d2x6){console[_0xe8f4[25]](_0xe8f4[30]+ _0xe8d2x6)})}module[_0xe8f4[35]]= QueueCaller \ No newline at end of file +var moment = require('moment'); + +var 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(queue) { + console.log('[report] queue created'); + }) + .catch(function(err) { + console.error('[report] queue ' + err); + }); +} + +function findAndUpdate(evt) { + return ReportQueue + .update(evt, { + where: { + uniqueid: evt.uniqueid + }, + individualHooks: true, + raw: true + }) + .then(function() { + console.info('[queue_caller] queue_caller updated'); + }) + .catch(function(err) { + console.error('[queue_caller] queue_caller error: ' + err); + }); +} + +module.exports = QueueCaller; diff --git a/server/config/ami/queue_member.js b/server/config/ami/queue_member.js index 98c797f..e3d2467 100644 --- a/server/config/ami/queue_member.js +++ b/server/config/ami/queue_member.js @@ -1 +1,55 @@ -var _0x1390=["\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\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\x78\x70\x6F\x72\x74\x73"];var moment=require(_0x1390[0]);var UserHasVoiceQueue=require(_0x1390[2])[_0x1390[1]];function QueueMember(){console[_0x1390[4]](_0x1390[3])}QueueMember[_0x1390[6]][_0x1390[5]]= function(_0xf97ax4){_0xf97ax4[_0x1390[7]]= true;_0xf97ax4[_0x1390[8]]= moment()[_0x1390[10]](_0x1390[9]);return findAndUpdate(_0xf97ax4)};QueueMember[_0x1390[6]][_0x1390[11]]= function(_0xf97ax4){_0xf97ax4[_0x1390[12]]= (parseInt(_0xf97ax4[_0x1390[13]],10))?moment()[_0x1390[10]](_0x1390[9]):null;return findAndUpdate(_0xf97ax4)};QueueMember[_0x1390[6]][_0x1390[14]]= function(_0xf97ax4){return findAndUpdate(_0xf97ax4)};QueueMember[_0x1390[6]][_0x1390[15]]= function(_0xf97ax4){_0xf97ax4[_0x1390[7]]= false;_0xf97ax4[_0x1390[8]]= null;return findAndUpdate(_0xf97ax4)};QueueMember[_0x1390[6]][_0x1390[16]]= function(_0xf97ax4){return findAndUpdate(_0xf97ax4)};QueueMember[_0x1390[6]][_0x1390[17]]= function(_0xf97ax4){return findAndUpdate(_0xf97ax4)};function findAndUpdate(_0xf97ax4,_0xf97ax6){return UserHasVoiceQueue[_0x1390[25]](_0xf97ax4,{where:{queue:_0xf97ax4[_0x1390[23]],membername:_0xf97ax4[_0x1390[24]]},individualHooks:true})[_0x1390[22]](function(_0xf97ax8){console[_0x1390[4]](_0x1390[21])})[_0x1390[20]](function(_0xf97ax7){console[_0x1390[19]](_0x1390[18]+ _0xf97ax7)})}module[_0x1390[26]]= QueueMember \ No newline at end of file +var moment = require('moment'); +var UserHasVoiceQueue = require('../../models').UserHasVoiceQueue; + +function QueueMember() { + console.log('QueueMember Initialization...'); +} + +QueueMember.prototype.added = function(evt) { + 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) { + evt.logged = false; + evt.loggedAt = null; + 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); + }); +} + +module.exports = QueueMember; diff --git a/server/config/ami/recording.js b/server/config/ami/recording.js index 7c7f38e..cbe3fa6 100644 --- a/server/config/ami/recording.js +++ b/server/config/ami/recording.js @@ -1 +1,58 @@ -var _0xb990=["\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","\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","\x65\x78\x70\x6F\x72\x74\x73"];var VoiceRecording=require(_0xb990[1])[_0xb990[0]];function Recording(){console[_0xb990[3]](_0xb990[2])}Recording[_0xb990[5]][_0xb990[4]]= function(_0x52cex3){create(_0x52cex3)};Recording[_0xb990[5]][_0xb990[6]]= function(_0x52cex3){updateQueue(_0x52cex3)};Recording[_0xb990[5]][_0xb990[7]]= function(_0x52cex3){updateType(_0x52cex3)};function create(_0x52cex3){_0x52cex3[_0xb990[8]]= _0xb990[9];return VoiceRecording[_0xb990[4]](_0x52cex3)[_0xb990[12]](function(_0x52cex5){console[_0xb990[11]](_0xb990[10],_0x52cex5)})}function updateQueue(_0x52cex3){return VoiceRecording[_0xb990[17]]({queue:_0x52cex3[_0xb990[14]],membername:_0x52cex3[_0xb990[15]]},{where:{uniqueid:_0x52cex3[_0xb990[16]]}})[_0xb990[12]](function(_0x52cex5){console[_0xb990[11]](_0xb990[13],_0x52cex5)})}function updateType(_0x52cex3){return VoiceRecording[_0xb990[17]]({type:_0x52cex3[_0xb990[8]]},{where:{uniqueid:_0x52cex3[_0xb990[16]]}})[_0xb990[12]](function(_0x52cex5){console[_0xb990[11]](_0xb990[13],_0x52cex5)})}module[_0xb990[18]]= Recording \ No newline at end of file +var 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'; + + return VoiceRecording + .create(evt) + .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 + } + }) + .catch(function(err) { + console.error('Recording queue update error:', err); + }); +} + +function updateType(evt) { + return VoiceRecording + .update({ + type: evt.type, + }, { + where: { + uniqueid: evt.uniqueid + } + }) + .catch(function(err) { + console.error('Recording queue update error:', err); + }); +} + +module.exports = Recording; diff --git a/server/config/ami/socket.js b/server/config/ami/socket.js index afc050b..0a82a2b 100644 --- a/server/config/ami/socket.js +++ b/server/config/ami/socket.js @@ -1 +1,19 @@ -var _0x6296=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4E\x65\x77\x20\x73\x6F\x63\x6B\x65\x74\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x6C\x6F\x67","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x74\x65\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x6296[0];function Socket(_0x1779x2,_0x1779x3){console[_0x6296[2]](_0x6296[1]);var _0x1779x4=require(_0x6296[4])[_0x6296[3]];return {test:function(){console[_0x6296[2]](_0x6296[5])}}}module[_0x6296[6]]= Socket \ No newline at end of file +/** + * Broadcast updates to client when the model changes + */ + +'use strict'; + +function Socket(socket, ami) { + console.log('New socket connection'); + + var ReportAgent = require('../../models').ReportAgent; + + return { + test: function () { + console.log('test'); + } + } +} + +module.exports = Socket; diff --git a/server/config/ami/transfer.js b/server/config/ami/transfer.js index c18e390..057c9a0 100644 --- a/server/config/ami/transfer.js +++ b/server/config/ami/transfer.js @@ -1 +1,54 @@ -var _0xafa5=["\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(_0xafa5[0]);var ReportCallTransfer=require(_0xafa5[2])[_0xafa5[1]];function Transfer(){console[_0xafa5[4]](_0xafa5[3])}Transfer[_0xafa5[6]][_0xafa5[5]]= function(_0x3257x4){return ReportCallTransfer[_0xafa5[12]](_0x3257x4)[_0xafa5[11]](function(_0x3257x6){console[_0xafa5[4]](_0xafa5[10])})[_0xafa5[9]](function(_0x3257x5){console[_0xafa5[8]](_0xafa5[7]+ _0x3257x5)})};Transfer[_0xafa5[6]][_0xafa5[13]]= function(_0x3257x4){return ReportCallTransfer[_0xafa5[12]]({result:_0x3257x4[_0xafa5[16]],transfererchannel:_0x3257x4[_0xafa5[17]],transferercalleridnum:_0x3257x4[_0xafa5[18]],transferercalleridname:_0x3257x4[_0xafa5[19]],transfererconnectedlinenum:_0x3257x4[_0xafa5[20]],transfererconnectedlinename:_0x3257x4[_0xafa5[21]],transfereraccountcode:_0x3257x4[_0xafa5[22]],transferercontext:_0x3257x4[_0xafa5[23]],transfererexten:_0x3257x4[_0xafa5[24]],transfererlinkedid:_0x3257x4[_0xafa5[25]],transfereechannel:_0x3257x4[_0xafa5[26]],transfereecalleridnum:_0x3257x4[_0xafa5[27]],transfereecalleridname:_0x3257x4[_0xafa5[28]],transfereeconnectedlinenum:_0x3257x4[_0xafa5[29]],transfereeconnectedlinename:_0x3257x4[_0xafa5[30]],transfereeaccountcode:_0x3257x4[_0xafa5[31]],transfereecontext:_0x3257x4[_0xafa5[32]],transfereeexten:_0x3257x4[_0xafa5[33]],transfereelinkedid:_0x3257x4[_0xafa5[34]],isexternal:_0x3257x4[_0xafa5[35]],context:_0x3257x4[_0xafa5[36]],extension:_0x3257x4[_0xafa5[37]],type:_0xafa5[38]})[_0xafa5[11]](function(){console[_0xafa5[4]](_0xafa5[15])})[_0xafa5[9]](function(_0x3257x5){console[_0xafa5[8]](_0xafa5[14]+ _0x3257x5)})};module[_0xafa5[39]]= Transfer \ No newline at end of file +var moment = require('moment'); +var ReportCallTransfer = require('../../models').ReportCallTransfer; + +function Transfer() { + console.log('Transfer Initialization...'); +} + +Transfer.prototype.createBlind = function(evt) { + return ReportCallTransfer + .create(evt) + .then(function(member) { + 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; diff --git a/server/config/ami/trunk.js b/server/config/ami/trunk.js index 771a709..764f6e0 100644 --- a/server/config/ami/trunk.js +++ b/server/config/ami/trunk.js @@ -1 +1,174 @@ -var _0xba95=["\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","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","\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","\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"];var TrunkModel=require(_0xba95[1])[_0xba95[0]];var fs=require(_0xba95[2]);var util=require(_0xba95[3]);var path=require(_0xba95[4]);var config=require(_0xba95[5]);var _=require(_0xba95[6]);function Trunk(_0xc49ax8){console[_0xba95[8]](_0xba95[7]);TrunkModel[_0xba95[10]](function(_0xc49ax9){if(_0xc49ax9[_0xba95[9]]){trunksRewrite(_0xc49ax9,_0xc49ax8,false)}});TrunkModel[_0xba95[15]](function(_0xc49ax9){if(!_0xc49ax9[_0xba95[12]](_0xba95[11])&& !_0xc49ax9[_0xba95[12]](_0xba95[13])&& !_0xc49ax9[_0xba95[12]](_0xba95[14])){trunksRewrite(_0xc49ax9,_0xc49ax8,false)}});TrunkModel[_0xba95[16]](function(_0xc49ax9){trunksRewrite(_0xc49ax9,_0xc49ax8,true)})}Trunk[_0xba95[18]][_0xba95[17]]= function(_0xc49axa){return TrunkModel[_0xba95[24]]({status:_0xc49axa[_0xba95[11]]},{where:{defaultuser:_0xc49axa[_0xba95[21]],host:_0xc49axa[_0xba95[22]],active:true,$and:[{registry:{$ne:_0xba95[23]}},{registry:{$ne:null}}]},individualHooks:true})[_0xba95[20]](function(_0xc49axb){console[_0xba95[8]](_0xba95[19],_0xc49axb)})};Trunk[_0xba95[18]][_0xba95[25]]= function(_0xc49axa){return TrunkModel[_0xba95[24]]({peerstatus:_0xc49axa[_0xba95[13]]},{where:{name:_0xc49axa[_0xba95[29]][_0xba95[28]](_0xba95[27])[1]},individualHooks:true})[_0xba95[20]](function(_0xc49axb){console[_0xba95[8]](_0xba95[26],_0xc49axb)})};function trunksRewrite(_0xc49ax9,_0xc49ax8,_0xc49axd){var _0xc49axe=_0xba95[23];var _0xc49axf=_0xba95[23];var _0xc49ax10=_0xba95[30];if(!_0xc49axd&& _0xc49ax9[_0xba95[9]]){var _0xc49ax11=_[_0xba95[32]](_0xc49ax9[_0xba95[31]]);delete _0xc49ax11[_0xba95[33]];delete _0xc49ax11[_0xba95[14]];delete _0xc49ax11[_0xba95[9]];delete _0xc49ax11[_0xba95[11]];_0xc49axe+= util[_0xba95[36]](_0xba95[34],_0xc49ax11[_0xba95[35]]);if(_0xc49ax11[_0xba95[37]]){_0xc49axe+= util[_0xba95[36]](_0xba95[38],_0xc49ax11[_0xba95[37]]);delete _0xc49ax11[_0xba95[37]]};for(var _0xc49ax12 in _0xc49ax11){if(_0xc49ax11[_0xc49ax12]){switch(_0xc49ax12){case _0xba95[42]:var _0xc49ax13=_0xc49ax11[_0xc49ax12][_0xba95[28]](_0xba95[39]);_0xc49ax13[_0xba95[41]](function(_0xc49ax14){_0xc49axe+= util[_0xba95[36]](_0xba95[40],_0xc49ax12,_0xc49ax14)});break;default:_0xc49axe+= util[_0xba95[36]](_0xba95[40],_0xc49ax12,_0xc49ax11[_0xc49ax12])}}};if(_0xc49ax11[_0xba95[43]]){_0xc49axf+= util[_0xba95[36]](_0xc49ax10,_0xc49ax11[_0xba95[43]])}};return TrunkModel[_0xba95[55]]({where:{name:{$ne:_0xc49ax9[_0xba95[35]]},active:true}})[_0xba95[54]](function(_0xc49ax15){var _0xc49ax16=_[_0xba95[44]](_0xc49ax15,_0xba95[31]);_0xc49ax16[_0xba95[41]](function(_0xc49ax17){delete _0xc49ax17[_0xba95[33]];delete _0xc49ax17[_0xba95[14]];delete _0xc49ax17[_0xba95[9]];delete _0xc49ax17[_0xba95[11]];_0xc49axe+= util[_0xba95[36]](_0xba95[34],_0xc49ax17[_0xba95[35]]);if(_0xc49ax17[_0xba95[37]]){_0xc49axe+= util[_0xba95[36]](_0xba95[38],_0xc49ax17[_0xba95[37]]);delete _0xc49ax17[_0xba95[37]]};for(var _0xc49ax12 in _0xc49ax17){if(_0xc49ax17[_0xc49ax12]){switch(_0xc49ax12){case _0xba95[42]:var _0xc49ax13=_0xc49ax17[_0xc49ax12][_0xba95[28]](_0xba95[39]);_0xc49ax13[_0xba95[41]](function(_0xc49ax14){_0xc49axe+= util[_0xba95[36]](_0xba95[40],_0xc49ax12,_0xc49ax14)});break;default:_0xc49axe+= util[_0xba95[36]](_0xba95[40],_0xc49ax12,_0xc49ax17[_0xc49ax12])}}};if(_0xc49ax17[_0xba95[43]]){_0xc49axf+= util[_0xba95[36]](_0xc49ax10,_0xc49ax17[_0xba95[43]])}});fs[_0xba95[53]](path[_0xba95[47]](config[_0xba95[45]],_0xba95[46]),_0xc49axe,{flags:_0xba95[48],mode:parseInt(_0xba95[49],8)},function(_0xc49axb){if(_0xc49axb){throw _0xc49axb};console[_0xba95[8]](_0xba95[50]);fs[_0xba95[53]](path[_0xba95[47]](config[_0xba95[45]],_0xba95[51]),_0xc49axf,{flags:_0xba95[48],mode:parseInt(_0xba95[49],8)},function(_0xc49axb){if(_0xc49axb){throw _0xc49axb};reload(_0xc49ax8);console[_0xba95[8]](_0xba95[52])})})})[_0xba95[20]](function(_0xc49axb){console[_0xba95[8]](_0xc49axb)})}function reload(_0xc49ax8){_0xc49ax8[_0xba95[58]]({Action:_0xba95[56]},function(_0xc49axb,_0xc49ax19){if(_0xc49axb){console[_0xba95[57]](_0xc49axb)}else {console[_0xba95[8]](_0xc49ax19)}})}module[_0xba95[59]]= Trunk \ No newline at end of file +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.changed('status') && !doc.changed('peerstatus') && !doc.changed('updatedAt')) { + trunksRewrite(doc, ami, false); + } + }) + TrunkModel.afterDelete(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 + }) + .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 + }) + .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; diff --git a/server/config/ami/user.js b/server/config/ami/user.js index 30fef69..8a317b4 100644 --- a/server/config/ami/user.js +++ b/server/config/ami/user.js @@ -1 +1,62 @@ -var _0x1d8f=["\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","\x65\x78\x70\x6F\x72\x74\x73"];var moment=require(_0x1d8f[0]);var UserModel=require(_0x1d8f[2])[_0x1d8f[1]];function User(){console[_0x1d8f[4]](_0x1d8f[3])}User[_0x1d8f[6]][_0x1d8f[5]]= function(_0x1e26x4){var _0x1e26x5={status:_0x1e26x4[_0x1d8f[7]],statusAt:moment()[_0x1d8f[9]](_0x1d8f[8])};var _0x1e26x6={name:_0x1e26x4[_0x1d8f[13]][_0x1d8f[12]](_0x1d8f[10],_0x1d8f[11])};return findAndUpdate(_0x1e26x5,_0x1e26x6)};User[_0x1d8f[6]][_0x1d8f[14]]= function(_0x1e26x7,_0x1e26x4){var _0x1e26x5={queueStatus:_0x1e26x7,queueStatusAt:moment()[_0x1d8f[9]](_0x1d8f[8]),lastQueue:_0x1e26x4[_0x1d8f[15]]};var _0x1e26x6=(_0x1e26x4[_0x1d8f[16]]=== _0x1d8f[17])?{lastQueue:_0x1e26x4[_0x1d8f[15]]}:{name:_0x1e26x4[_0x1d8f[18]]};findAndUpdate(_0x1e26x5,_0x1e26x6);if(_0x1e26x7=== _0x1d8f[19]){findAndUpdate({queueStatus:_0x1d8f[20],queueStatusAt:moment()[_0x1d8f[9]](_0x1d8f[8])},{lastQueue:_0x1e26x4[_0x1d8f[15]],name:{$ne:_0x1e26x4[_0x1d8f[18]]}})}};function findAndUpdate(_0x1e26x5,_0x1e26x6){return UserModel[_0x1d8f[26]](_0x1e26x5,{where:_0x1e26x6,individualHooks:true})[_0x1d8f[25]](function(_0x1e26xa){console[_0x1d8f[4]](_0x1d8f[24])})[_0x1d8f[23]](function(_0x1e26x9){console[_0x1d8f[22]](_0x1d8f[21]+ _0x1e26x9)})}module[_0x1d8f[27]]= User \ No newline at end of file +var moment = require('moment'); +var 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) { + // console.log(obj); + // console.log('userupdate', condition); + // console.log('status', obj.status); + return UserModel + .update(obj, { + where: condition, + individualHooks: true + }) + .then(function(member) { + console.log('[user] status update'); + }) + .catch(function(err) { + console.error('[user] status update error: ' + err); + }); +} + +module.exports = User; diff --git a/server/config/ami/voice_context.js b/server/config/ami/voice_context.js index eef4629..b6dfaf7 100644 --- a/server/config/ami/voice_context.js +++ b/server/config/ami/voice_context.js @@ -1 +1,100 @@ -var _0x7f87=["\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","\x6E\x61\x6D\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\x61\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x6E\x61\x6D\x65","\x64\x65\x66\x61\x75\x6C\x74\x45\x6E\x74\x72\x79","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x6D\x6F\x64\x69\x66\x79\x20\x61\x20\x64\x65\x66\x61\x75\x6C\x74\x20\x63\x6F\x6E\x74\x65\x78\x74","\x62\x65\x66\x6F\x72\x65\x55\x70\x64\x61\x74\x65","\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\x63\x6F\x6E\x74\x65\x78\x74","\x62\x65\x66\x6F\x72\x65\x44\x65\x6C\x65\x74\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","","\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","\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"];var VoiceContext=require(_0x7f87[1])[_0x7f87[0]];var VoiceExtension=require(_0x7f87[1])[_0x7f87[2]];var fs=require(_0x7f87[3]);var util=require(_0x7f87[4]);var path=require(_0x7f87[5]);var config=require(_0x7f87[6]);function Context(_0x169bx8){VoiceContext[_0x7f87[12]](function(_0x169bx9){if(_0x169bx9[_0x7f87[8]](_0x7f87[7])){throw new Error(_0x7f87[9])};if(_0x169bx9[_0x7f87[10]]){throw new Error(_0x7f87[11])}});VoiceContext[_0x7f87[14]](function(_0x169bxa){if(_0x169bxa[_0x7f87[10]]){throw new Error(_0x7f87[13])}});VoiceContext[_0x7f87[15]](function(_0x169bxb){rewriteContexts(_0x169bxb,_0x169bx8,false);createHangup(_0x169bxb)});VoiceContext[_0x7f87[16]](function(_0x169bxb){rewriteContexts(_0x169bxb,_0x169bx8,true)})}function rewriteContexts(_0x169bxb,_0x169bx8,_0x169bxd){var _0x169bxe=_0x7f87[17];if(!_0x169bxd){_0x169bxe= util[_0x7f87[19]](_0x7f87[18],_0x169bxb[_0x7f87[7]],_0x169bxb[_0x7f87[7]])};VoiceContext[_0x7f87[35]]({where:{id:{$ne:_0x169bxb[_0x7f87[34]]}}})[_0x7f87[33]](function(_0x169bx10){_0x169bx10[_0x7f87[22]](function(_0x169bx11){_0x169bxe+= util[_0x7f87[19]](_0x7f87[18],_0x169bx11[_0x7f87[7]],_0x169bx11[_0x7f87[7]])});fs[_0x7f87[32]](path[_0x7f87[25]](config[_0x7f87[23]],_0x7f87[24]),_0x169bxe,{flags:_0x7f87[26],mode:parseInt(_0x7f87[27],8)},function(_0x169bxf){if(_0x169bxf){throw _0x169bxf};console[_0x7f87[20]](_0x7f87[28]);_0x169bx8[_0x7f87[31]]({Action:_0x7f87[29]},function(_0x169bxf,_0x169bx12){if(_0x169bxf){console[_0x7f87[30]](_0x169bxf)}else {console[_0x7f87[20]](_0x169bx12)}})})})[_0x7f87[21]](function(_0x169bxf){console[_0x7f87[20]](_0x169bxf)})}function createHangup(_0x169bxb){console[_0x7f87[20]](_0x7f87[36],_0x169bxb[_0x7f87[7]]);var _0x169bx14=[{context:_0x169bxb[_0x7f87[7]],exten:_0x7f87[37],priority:_0x7f87[38],VoiceContextId:_0x169bxb[_0x7f87[34]],type:_0x7f87[39],app:_0x7f87[40]},{context:_0x169bxb[_0x7f87[7]],exten:_0x7f87[41],priority:_0x7f87[38],VoiceContextId:_0x169bxb[_0x7f87[34]],type:_0x7f87[39],app:_0x7f87[40]}];return VoiceExtension[_0x7f87[43]](_0x169bx14)[_0x7f87[33]](function(_0x169bx12){console[_0x7f87[20]](_0x7f87[42])})[_0x7f87[21]](function(_0x169bxf){console[_0x7f87[20]](_0x169bxf)})}module[_0x7f87[44]]= Context \ No newline at end of file +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) { + VoiceContext.beforeUpdate(function(updatedContext) { + if (updatedContext.changed('name')) { + throw new Error("You can't modify a context name"); + } + if (updatedContext.defaultEntry) { + throw new Error("You can't modify a default context"); + } + }); + + VoiceContext.beforeDelete(function(context) { + if (context.defaultEntry) { + throw new Error("You can't delete a default context"); + } + }); + VoiceContext.afterCreate(function(doc) { + rewriteContexts(doc, ami, false); + createHangup(doc); + }) + + VoiceContext.afterDelete(function(doc) { + 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) + .then(function(res) { + console.log('hangup extension created'); + }) + .catch(function(err) { + console.log(err); + }); +} + +module.exports = Context; diff --git a/server/config/analytics.js b/server/config/analytics.js index 79a0afa..e69de29 100644 --- a/server/config/analytics.js +++ b/server/config/analytics.js @@ -1 +0,0 @@ -var _0xd43f=[] \ No newline at end of file diff --git a/server/config/autodialer/index.js b/server/config/autodialer/index.js index 7695f7f..a47295f 100644 --- a/server/config/autodialer/index.js +++ b/server/config/autodialer/index.js @@ -1 +1,125 @@ -var _0xc14d=["\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"];_0xc14d[0];var util=require(_0xc14d[1]);var Process=require(_0xc14d[2]);module[_0xc14d[3]]= function(_0x2cf5x3){console[_0xc14d[5]](_0xc14d[4]);var _0x2cf5x4= new Process();_0x2cf5x4[_0xc14d[6]](function(_0x2cf5x5,_0x2cf5x6){if(_0x2cf5x6){console[_0xc14d[5]](_0x2cf5x6);return}})} \ No newline at end of file +'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(); +// }); +// }; diff --git a/server/config/autodialer/process.js b/server/config/autodialer/process.js index 44bf7f5..7974168 100644 --- a/server/config/autodialer/process.js +++ b/server/config/autodialer/process.js @@ -1 +1,26 @@ -var _0x827d=["\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(_0x827d[1])[_0x827d[0]];var Contact=require(_0x827d[1])[_0x827d[2]];function Process(){console[_0x827d[4]](_0x827d[3])}Process[_0x827d[6]][_0x827d[5]]= function(_0x4845x4){AutodialerProcess[_0x827d[9]]({where:{enable:true},include:[Contact]})[_0x827d[8]](function(_0x4845x6){_0x4845x4(_0x4845x6)})[_0x827d[7]](function(_0x4845x5){_0x4845x4(null,_0x4845x5)})};module[_0x827d[10]]= Process \ No newline at end of file +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; diff --git a/server/config/automations/chat.js b/server/config/automations/chat.js index 825677f..bf45b45 100644 --- a/server/config/automations/chat.js +++ b/server/config/automations/chat.js @@ -1 +1,174 @@ -var _0x296a=["\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","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x43\x68\x61\x74\x20\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x20","\x6C\x6F\x67","\x43\x68\x61\x74\x20\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x20\x65\x78\x65\x63\x20\x65\x72\x72\x6F\x72","\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","\x41\x75\x74\x6F\x6D\x61\x74\x69\x63\x20\x63\x68\x61\x74\x20\x73\x74\x61\x74\x75\x73\x20\x65\x72\x72\x6F\x72","\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","\x43\x68\x61\x74\x20\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x20","\x20\x73\x65\x74\x20\x77\x69\x74\x68\x20\x74\x69\x6D\x65\x6F\x75\x74\x20","\x74\x69\x6D\x65\x6F\x75\x74","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x20\x63\x72\x65\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73\x20","\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x68\x61\x74","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x20\x75\x70\x64\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73\x20","\x43\x68\x61\x74\x20\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\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","\x43\x68\x61\x74\x20\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x20\x69\x6E\x69\x74\x20\x65\x72\x72\x6F\x72"];_0x296a[0];var _=require(_0x296a[1]);var moment=require(_0x296a[2]);var Automation=require(_0x296a[4])[_0x296a[3]];var ChatRoom=require(_0x296a[4])[_0x296a[5]];var automationTimeout;var activeChatAutomations={};function executeAutomation(_0x8299x8){console[_0x296a[7]](_0x296a[6],_0x8299x8);var _0x8299x9;return Automation[_0x296a[28]](_0x296a[27])[_0x296a[26]](_0x8299x8)[_0x296a[16]](function(_0x8299xe){_0x8299x9= _0x8299xe;var _0x8299xf=[];var _0x8299x10=[];var _0x8299x11={where:{}};_0x8299xe[_0x296a[19]][_0x296a[14]](function(_0x8299x12){_0x8299x10[_0x296a[18]](getCondition(_0x8299x12[_0x296a[17]]))});_0x8299xe[_0x296a[20]][_0x296a[14]](function(_0x8299x12){_0x8299xf[_0x296a[18]](getCondition(_0x8299x12[_0x296a[17]]))});if(_0x8299x10[_0x296a[21]]){_0x8299x11[_0x296a[23]][_0x296a[22]]= _0x8299x10};if(_0x8299xf[_0x296a[21]]){_0x8299x11[_0x296a[23]][_0x296a[24]]= _0x8299xf};return ChatRoom[_0x296a[25]](_0x8299x11)})[_0x296a[16]](function(_0x8299xb){_0x8299xb[_0x296a[14]](function(_0x8299xc){_0x8299x9[_0x296a[15]][_0x296a[14]](function(_0x8299xd){switch(_0x8299xd[_0x296a[13]]){case _0x296a[12]:setStatus(_0x8299xc[_0x296a[10]],_0x8299xd[_0x296a[11]]);break;default:}})})})[_0x296a[9]](function(_0x8299xa){console[_0x296a[7]](_0x296a[8],_0x8299xa)})}function setStatus(_0x8299x14,_0x8299x15){return ChatRoom[_0x296a[30]]({status:_0x8299x15},{where:{id:_0x8299x14}})[_0x296a[9]](function(_0x8299xa){console[_0x296a[7]](_0x296a[29],_0x8299xa)})}function getCondition(_0x8299x12){var _0x8299x17={};switch(_0x8299x12[_0x296a[31]]){case _0x296a[12]:switch(_0x8299x12[_0x296a[35]]){case _0x296a[33]:_0x8299x17[_0x8299x12[_0x296a[31]]]= _0x8299x12[_0x296a[32]];break;case _0x296a[34]:_0x8299x17[_0x8299x12[_0x296a[31]]]= {$ne:_0x8299x12[_0x296a[32]]};break;default:};break;case _0x296a[44]:var _0x8299x18=moment()[_0x296a[39]](parseInt(_0x8299x12[_0x296a[32]],10),_0x296a[38])[_0x296a[37]](_0x296a[36]);switch(_0x8299x12[_0x296a[35]]){case _0x296a[40]:_0x8299x17[_0x8299x12[_0x296a[31]]]= {lt:_0x8299x18};break;case _0x296a[41]:_0x8299x17[_0x8299x12[_0x296a[31]]]= {$lte:_0x8299x18};break;case _0x296a[42]:_0x8299x17[_0x8299x12[_0x296a[31]]]= {$gt:_0x8299x18};break;case _0x296a[43]:_0x8299x17[_0x8299x12[_0x296a[31]]]= {$gte:_0x8299x18};break;default:};break;default:};return _0x8299x17}function createInterval(_0x8299xe){console[_0x296a[7]](_0x296a[45],_0x8299xe[_0x296a[10]],_0x296a[46],_0x8299xe[_0x296a[47]]* 60* 1000);activeChatAutomations[_0x296a[48]+ _0x8299xe[_0x296a[10]]]= setInterval(function(){executeAutomation(_0x8299xe[_0x296a[10]])},_0x8299xe[_0x296a[47]]* 60* 1000)}module[_0x296a[49]]= function(){Automation[_0x296a[53]](function(_0x8299x1a,_0x8299x1b){console[_0x296a[7]](_0x296a[45],_0x8299x1a[_0x296a[10]],_0x296a[50],_0x8299x1a[_0x296a[12]]);if(_0x8299x1a[_0x296a[12]]&& _0x8299x1a[_0x296a[51]]=== _0x296a[52]){createInterval(_0x8299x1a)}});Automation[_0x296a[56]](function(_0x8299x1a,_0x8299x1b){console[_0x296a[7]](_0x296a[45],_0x8299x1a[_0x296a[10]],_0x296a[54],_0x8299x1a[_0x296a[12]]);if(activeChatAutomations[_0x296a[48]+ _0x8299x1a[_0x296a[10]]]){console[_0x296a[7]](_0x296a[55],_0x8299x1a[_0x296a[10]]);clearInterval(activeChatAutomations[_0x296a[48]+ _0x8299x1a[_0x296a[10]]]);delete activeChatAutomations[_0x296a[48]+ _0x8299x1a[_0x296a[10]]]};if(_0x8299x1a[_0x296a[12]]&& _0x8299x1a[_0x296a[51]]=== _0x296a[52]){createInterval(_0x8299x1a)}});Automation[_0x296a[58]](function(_0x8299x1a,_0x8299x1b){console[_0x296a[7]](_0x296a[45],_0x8299x1a[_0x296a[10]],_0x296a[57]);if(activeChatAutomations[_0x296a[48]+ _0x8299x1a[_0x296a[10]]]){console[_0x296a[7]](_0x296a[55],_0x8299x1a[_0x296a[10]]);clearInterval(activeChatAutomations[_0x296a[48]+ _0x8299x1a[_0x296a[10]]]);delete activeChatAutomations[_0x296a[48]+ _0x8299x1a[_0x296a[10]]]}});return Automation[_0x296a[28]](_0x296a[27])[_0x296a[25]]({where:{status:true,channel:_0x296a[52]},attributes:[_0x296a[10],_0x296a[47]]})[_0x296a[16]](function(_0x8299x1c){_0x8299x1c[_0x296a[14]](function(_0x8299xe){createInterval(_0x8299xe)})})[_0x296a[9]](function(_0x8299xa){console[_0x296a[7]](_0x296a[59],_0x8299xa)})} \ No newline at end of file +'use strict'; + +var _ = require('lodash'); +var moment = require('moment'); + +var Automation = require('../../models').Automation; +var ChatRoom = require('../../models').ChatRoom; +var automationTimeout; +var activeChatAutomations = {}; + +function executeAutomation(id) { + console.log('Executing Chat Automation ', 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.log('Chat Automation exec error', err); + }); +} + +function setStatus(ticketId, newStatus) { + return ChatRoom.update({ + status: newStatus, + }, { + where: { + id: ticketId + } + }) + .catch(function(err) { + console.log('Automatic chat status error', err); + }); +} + +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('Chat Automation ', 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() { + + Automation.afterCreate(function(doc, options) { + console.log('Chat Automation ', doc.id, ' created, the status is ', doc.status); + if (doc.status && doc.channel === 'chat') { + createInterval(doc); + } + }); + + Automation.afterUpdate(function(doc, options) { + console.log('Chat Automation ', doc.id, ' updated, the status is ', doc.status); + if (activeChatAutomations['interval' + doc.id]) { + console.log('Chat automation unset ', doc.id); + clearInterval(activeChatAutomations['interval' + doc.id]); + delete activeChatAutomations['interval' + doc.id]; + } + if (doc.status && doc.channel === 'chat') { + createInterval(doc); + } + }); + + Automation.afterDelete(function(doc, options) { + console.log('Chat Automation ', doc.id, ' deleted'); + if (activeChatAutomations['interval' + doc.id]) { + console.log('Chat automation 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) { + + chatAutomations.forEach(function(chatAutomation) { + createInterval(chatAutomation); + }); + }) + .catch(function(err) { + console.log('Chat Automation init error', err); + }); +}; diff --git a/server/config/automations/fax.js b/server/config/automations/fax.js index b8bafd4..e7f0b74 100644 --- a/server/config/automations/fax.js +++ b/server/config/automations/fax.js @@ -1 +1,178 @@ -var _0xe079=["\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","\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","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x46\x61\x78\x52\x6F\x6F\x6D","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x4D\x61\x69\x6C\x20\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x20","\x6C\x6F\x67","\x46\x61\x78\x20\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x20\x65\x78\x65\x63\x20\x65\x72\x72\x6F\x72","\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","\x41\x75\x74\x6F\x6D\x61\x74\x69\x63\x20\x6D\x61\x69\x6C\x20\x73\x74\x61\x74\x75\x73\x20\x65\x72\x72\x6F\x72","\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","\x46\x61\x78\x20\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x20","\x20\x73\x65\x74\x20\x77\x69\x74\x68\x20\x74\x69\x6D\x65\x6F\x75\x74\x20","\x74\x69\x6D\x65\x6F\x75\x74","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x20\x63\x72\x65\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73\x20","\x63\x68\x61\x6E\x6E\x65\x6C","\x66\x61\x78","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x20\x75\x70\x64\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73\x20","\x46\x61\x78\x20\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\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","\x46\x61\x78\x20\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x20\x69\x6E\x69\x74\x20\x65\x72\x72\x6F\x72"];_0xe079[0];var _=require(_0xe079[1]);var config=require(_0xe079[2]);var moment=require(_0xe079[3]);var sequelize=require(_0xe079[5])[_0xe079[4]];var Automation=require(_0xe079[5])[_0xe079[6]];var FaxRoom=require(_0xe079[5])[_0xe079[7]];var automationTimeout;var activeFaxAutomations={};function executeAutomation(_0xb41dxa){console[_0xe079[9]](_0xe079[8],_0xb41dxa);var _0xb41dxb;return Automation[_0xe079[30]](_0xe079[29])[_0xe079[28]](_0xb41dxa)[_0xe079[18]](function(_0xb41dx10){_0xb41dxb= _0xb41dx10;var _0xb41dx11=[];var _0xb41dx12=[];var _0xb41dx13={where:{}};_0xb41dx10[_0xe079[21]][_0xe079[16]](function(_0xb41dx14){_0xb41dx12[_0xe079[20]](getCondition(_0xb41dx14[_0xe079[19]]))});_0xb41dx10[_0xe079[22]][_0xe079[16]](function(_0xb41dx14){_0xb41dx11[_0xe079[20]](getCondition(_0xb41dx14[_0xe079[19]]))});if(_0xb41dx12[_0xe079[23]]){_0xb41dx13[_0xe079[25]][_0xe079[24]]= _0xb41dx12};if(_0xb41dx11[_0xe079[23]]){_0xb41dx13[_0xe079[25]][_0xe079[26]]= _0xb41dx11};return FaxRoom[_0xe079[27]](_0xb41dx13)})[_0xe079[18]](function(_0xb41dxd){_0xb41dxd[_0xe079[16]](function(_0xb41dxe){_0xb41dxb[_0xe079[17]][_0xe079[16]](function(_0xb41dxf){switch(_0xb41dxf[_0xe079[15]]){case _0xe079[14]:setStatus(_0xb41dxe[_0xe079[12]],_0xb41dxf[_0xe079[13]]);break;default:}})})})[_0xe079[11]](function(_0xb41dxc){console[_0xe079[9]](_0xe079[10],_0xb41dxc)})}function setStatus(_0xb41dx16,_0xb41dx17){return FaxRoom[_0xe079[32]]({status:_0xb41dx17},{where:{id:_0xb41dx16}})[_0xe079[11]](function(_0xb41dxc){console[_0xe079[9]](_0xe079[31],_0xb41dxc)})}function getCondition(_0xb41dx14){var _0xb41dx19={};switch(_0xb41dx14[_0xe079[33]]){case _0xe079[14]:switch(_0xb41dx14[_0xe079[37]]){case _0xe079[35]:_0xb41dx19[_0xb41dx14[_0xe079[33]]]= _0xb41dx14[_0xe079[34]];break;case _0xe079[36]:_0xb41dx19[_0xb41dx14[_0xe079[33]]]= {$ne:_0xb41dx14[_0xe079[34]]};break;default:};break;case _0xe079[46]:var _0xb41dx1a=moment()[_0xe079[41]](parseInt(_0xb41dx14[_0xe079[34]],10),_0xe079[40])[_0xe079[39]](_0xe079[38]);switch(_0xb41dx14[_0xe079[37]]){case _0xe079[42]:_0xb41dx19[_0xb41dx14[_0xe079[33]]]= {lt:_0xb41dx1a};break;case _0xe079[43]:_0xb41dx19[_0xb41dx14[_0xe079[33]]]= {$lte:_0xb41dx1a};break;case _0xe079[44]:_0xb41dx19[_0xb41dx14[_0xe079[33]]]= {$gt:_0xb41dx1a};break;case _0xe079[45]:_0xb41dx19[_0xb41dx14[_0xe079[33]]]= {$gte:_0xb41dx1a};break;default:};break;default:};return _0xb41dx19}function createInterval(_0xb41dx10){console[_0xe079[9]](_0xe079[47],_0xb41dx10[_0xe079[12]],_0xe079[48],_0xb41dx10[_0xe079[49]]* 60* 1000);activeFaxAutomations[_0xe079[50]+ _0xb41dx10[_0xe079[12]]]= setInterval(function(){executeAutomation(_0xb41dx10[_0xe079[12]])},_0xb41dx10[_0xe079[49]]* 60* 1000)}module[_0xe079[51]]= function(){Automation[_0xe079[55]](function(_0xb41dx1c,_0xb41dx1d){console[_0xe079[9]](_0xe079[47],_0xb41dx1c[_0xe079[12]],_0xe079[52],_0xb41dx1c[_0xe079[14]]);if(_0xb41dx1c[_0xe079[14]]&& _0xb41dx1c[_0xe079[53]]=== _0xe079[54]){createInterval(_0xb41dx1c)}});Automation[_0xe079[58]](function(_0xb41dx1c,_0xb41dx1d){console[_0xe079[9]](_0xe079[47],_0xb41dx1c[_0xe079[12]],_0xe079[56],_0xb41dx1c[_0xe079[14]]);if(activeFaxAutomations[_0xe079[50]+ _0xb41dx1c[_0xe079[12]]]){console[_0xe079[9]](_0xe079[57],_0xb41dx1c[_0xe079[12]]);clearInterval(activeFaxAutomations[_0xe079[50]+ _0xb41dx1c[_0xe079[12]]]);delete activeFaxAutomations[_0xe079[50]+ _0xb41dx1c[_0xe079[12]]]};if(_0xb41dx1c[_0xe079[14]]&& _0xb41dx1c[_0xe079[53]]=== _0xe079[54]){createInterval(_0xb41dx1c)}});Automation[_0xe079[60]](function(_0xb41dx1c,_0xb41dx1d){console[_0xe079[9]](_0xe079[47],_0xb41dx1c[_0xe079[12]],_0xe079[59]);if(activeFaxAutomations[_0xe079[50]+ _0xb41dx1c[_0xe079[12]]]){console[_0xe079[9]](_0xe079[57],_0xb41dx1c[_0xe079[12]]);clearInterval(activeFaxAutomations[_0xe079[50]+ _0xb41dx1c[_0xe079[12]]]);delete activeFaxAutomations[_0xe079[50]+ _0xb41dx1c[_0xe079[12]]]}});return Automation[_0xe079[30]](_0xe079[29])[_0xe079[27]]({where:{status:true,channel:_0xe079[54]},attributes:[_0xe079[12],_0xe079[49]]})[_0xe079[18]](function(_0xb41dx1e){_0xb41dx1e[_0xe079[16]](function(_0xb41dx10){createInterval(_0xb41dx10)})})[_0xe079[11]](function(_0xb41dxc){console[_0xe079[9]](_0xe079[61],_0xb41dxc)})} \ No newline at end of file +'use strict'; + +var _ = require('lodash'); +var config = require('../environment'); +var moment = require('moment'); +// var stringifyObject = require('stringify-object'); + +var sequelize = require('../../models').sequelize; +var Automation = require('../../models').Automation; +var FaxRoom = require('../../models').FaxRoom; +var automationTimeout; +var activeFaxAutomations = {}; + +function executeAutomation(id) { + console.log('Executing Mail Automation ', 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.log('Fax Automation exec error', err); + }); +} + +function setStatus(ticketId, newStatus) { + return FaxRoom.update({ + status: newStatus, + }, { + where: { + id: ticketId + } + }) + .catch(function(err) { + console.log('Automatic mail status error', err); + }); +} + +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('Fax Automation ', 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() { + + Automation.afterCreate(function(doc, options) { + console.log('Fax Automation ', doc.id, ' created, the status is ', doc.status); + if (doc.status && doc.channel === 'fax') { + createInterval(doc); + } + }); + + Automation.afterUpdate(function(doc, options) { + console.log('Fax Automation ', doc.id, ' updated, the status is ', doc.status); + if (activeFaxAutomations['interval' + doc.id]) { + console.log('Fax automation unset ', doc.id); + clearInterval(activeFaxAutomations['interval' + doc.id]); + delete activeFaxAutomations['interval' + doc.id]; + } + if (doc.status && doc.channel === 'fax') { + createInterval(doc); + } + }); + + Automation.afterDelete(function(doc, options) { + console.log('Fax Automation ', doc.id, ' deleted'); + if (activeFaxAutomations['interval' + doc.id]) { + console.log('Fax automation 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) { + + faxAutomations.forEach(function(faxAutomation) { + createInterval(faxAutomation); + }); + }) + .catch(function(err) { + console.log('Fax Automation init error', err); + }); +}; diff --git a/server/config/automations/mail.js b/server/config/automations/mail.js index 99daa2e..14f8d17 100644 --- a/server/config/automations/mail.js +++ b/server/config/automations/mail.js @@ -1 +1,177 @@ -var _0x4fd8=["\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","\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","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x4D\x61\x69\x6C\x20\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x20","\x6C\x6F\x67","\x4D\x61\x69\x6C\x20\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x20\x65\x78\x65\x63\x20\x65\x72\x72\x6F\x72","\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","\x41\x75\x74\x6F\x6D\x61\x74\x69\x63\x20\x6D\x61\x69\x6C\x20\x73\x74\x61\x74\x75\x73\x20\x65\x72\x72\x6F\x72","\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","\x4D\x61\x69\x6C\x20\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x20","\x20\x73\x65\x74\x20\x77\x69\x74\x68\x20\x74\x69\x6D\x65\x6F\x75\x74\x20","\x74\x69\x6D\x65\x6F\x75\x74","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x20\x63\x72\x65\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73\x20","\x63\x68\x61\x6E\x6E\x65\x6C","\x6D\x61\x69\x6C","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x20\x75\x70\x64\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73\x20","\x4D\x61\x69\x6C\x20\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\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","\x4D\x61\x69\x6C\x20\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x20\x69\x6E\x69\x74\x20\x65\x72\x72\x6F\x72"];_0x4fd8[0];var _=require(_0x4fd8[1]);var config=require(_0x4fd8[2]);var moment=require(_0x4fd8[3]);var sequelize=require(_0x4fd8[5])[_0x4fd8[4]];var Automation=require(_0x4fd8[5])[_0x4fd8[6]];var MailRoom=require(_0x4fd8[5])[_0x4fd8[7]];var activeMailAutomations={};function executeAutomation(_0xe7c5x9){console[_0x4fd8[9]](_0x4fd8[8],_0xe7c5x9);var _0xe7c5xa;return Automation[_0x4fd8[30]](_0x4fd8[29])[_0x4fd8[28]](_0xe7c5x9)[_0x4fd8[18]](function(_0xe7c5xf){_0xe7c5xa= _0xe7c5xf;var _0xe7c5x10=[];var _0xe7c5x11=[];var _0xe7c5x12={where:{}};_0xe7c5xf[_0x4fd8[21]][_0x4fd8[16]](function(_0xe7c5x13){_0xe7c5x11[_0x4fd8[20]](getCondition(_0xe7c5x13[_0x4fd8[19]]))});_0xe7c5xf[_0x4fd8[22]][_0x4fd8[16]](function(_0xe7c5x13){_0xe7c5x10[_0x4fd8[20]](getCondition(_0xe7c5x13[_0x4fd8[19]]))});if(_0xe7c5x11[_0x4fd8[23]]){_0xe7c5x12[_0x4fd8[25]][_0x4fd8[24]]= _0xe7c5x11};if(_0xe7c5x10[_0x4fd8[23]]){_0xe7c5x12[_0x4fd8[25]][_0x4fd8[26]]= _0xe7c5x10};return MailRoom[_0x4fd8[27]](_0xe7c5x12)})[_0x4fd8[18]](function(_0xe7c5xc){_0xe7c5xc[_0x4fd8[16]](function(_0xe7c5xd){_0xe7c5xa[_0x4fd8[17]][_0x4fd8[16]](function(_0xe7c5xe){switch(_0xe7c5xe[_0x4fd8[15]]){case _0x4fd8[14]:setStatus(_0xe7c5xd[_0x4fd8[12]],_0xe7c5xe[_0x4fd8[13]]);break;default:}})})})[_0x4fd8[11]](function(_0xe7c5xb){console[_0x4fd8[9]](_0x4fd8[10],_0xe7c5xb)})}function setStatus(_0xe7c5x15,_0xe7c5x16){return MailRoom[_0x4fd8[32]]({status:_0xe7c5x16},{where:{id:_0xe7c5x15}})[_0x4fd8[11]](function(_0xe7c5xb){console[_0x4fd8[9]](_0x4fd8[31],_0xe7c5xb)})}function getCondition(_0xe7c5x13){var _0xe7c5x18={};switch(_0xe7c5x13[_0x4fd8[33]]){case _0x4fd8[14]:switch(_0xe7c5x13[_0x4fd8[37]]){case _0x4fd8[35]:_0xe7c5x18[_0xe7c5x13[_0x4fd8[33]]]= _0xe7c5x13[_0x4fd8[34]];break;case _0x4fd8[36]:_0xe7c5x18[_0xe7c5x13[_0x4fd8[33]]]= {$ne:_0xe7c5x13[_0x4fd8[34]]};break;default:};break;case _0x4fd8[46]:var _0xe7c5x19=moment()[_0x4fd8[41]](parseInt(_0xe7c5x13[_0x4fd8[34]],10),_0x4fd8[40])[_0x4fd8[39]](_0x4fd8[38]);switch(_0xe7c5x13[_0x4fd8[37]]){case _0x4fd8[42]:_0xe7c5x18[_0xe7c5x13[_0x4fd8[33]]]= {lt:_0xe7c5x19};break;case _0x4fd8[43]:_0xe7c5x18[_0xe7c5x13[_0x4fd8[33]]]= {$lte:_0xe7c5x19};break;case _0x4fd8[44]:_0xe7c5x18[_0xe7c5x13[_0x4fd8[33]]]= {$gt:_0xe7c5x19};break;case _0x4fd8[45]:_0xe7c5x18[_0xe7c5x13[_0x4fd8[33]]]= {$gte:_0xe7c5x19};break;default:};break;default:};return _0xe7c5x18}function createInterval(_0xe7c5xf){console[_0x4fd8[9]](_0x4fd8[47],_0xe7c5xf[_0x4fd8[12]],_0x4fd8[48],_0xe7c5xf[_0x4fd8[49]]* 60* 1000);activeMailAutomations[_0x4fd8[50]+ _0xe7c5xf[_0x4fd8[12]]]= setInterval(function(){executeAutomation(_0xe7c5xf[_0x4fd8[12]])},_0xe7c5xf[_0x4fd8[49]]* 60* 1000)}module[_0x4fd8[51]]= function(){Automation[_0x4fd8[55]](function(_0xe7c5x1b,_0xe7c5x1c){console[_0x4fd8[9]](_0x4fd8[47],_0xe7c5x1b[_0x4fd8[12]],_0x4fd8[52],_0xe7c5x1b[_0x4fd8[14]]);if(_0xe7c5x1b[_0x4fd8[14]]&& _0xe7c5x1b[_0x4fd8[53]]=== _0x4fd8[54]){createInterval(_0xe7c5x1b)}});Automation[_0x4fd8[58]](function(_0xe7c5x1b,_0xe7c5x1c){console[_0x4fd8[9]](_0x4fd8[47],_0xe7c5x1b[_0x4fd8[12]],_0x4fd8[56],_0xe7c5x1b[_0x4fd8[14]]);if(activeMailAutomations[_0x4fd8[50]+ _0xe7c5x1b[_0x4fd8[12]]]){console[_0x4fd8[9]](_0x4fd8[57],_0xe7c5x1b[_0x4fd8[12]]);clearInterval(activeMailAutomations[_0x4fd8[50]+ _0xe7c5x1b[_0x4fd8[12]]]);delete activeMailAutomations[_0x4fd8[50]+ _0xe7c5x1b[_0x4fd8[12]]]};if(_0xe7c5x1b[_0x4fd8[14]]&& _0xe7c5x1b[_0x4fd8[53]]=== _0x4fd8[54]){createInterval(_0xe7c5x1b)}});Automation[_0x4fd8[60]](function(_0xe7c5x1b,_0xe7c5x1c){console[_0x4fd8[9]](_0x4fd8[47],_0xe7c5x1b[_0x4fd8[12]],_0x4fd8[59]);if(activeMailAutomations[_0x4fd8[50]+ _0xe7c5x1b[_0x4fd8[12]]]){console[_0x4fd8[9]](_0x4fd8[57],_0xe7c5x1b[_0x4fd8[12]]);clearInterval(activeMailAutomations[_0x4fd8[50]+ _0xe7c5x1b[_0x4fd8[12]]]);delete activeMailAutomations[_0x4fd8[50]+ _0xe7c5x1b[_0x4fd8[12]]]}});return Automation[_0x4fd8[30]](_0x4fd8[29])[_0x4fd8[27]]({where:{status:true,channel:_0x4fd8[54]},attributes:[_0x4fd8[12],_0x4fd8[49]]})[_0x4fd8[18]](function(_0xe7c5x1d){_0xe7c5x1d[_0x4fd8[16]](function(_0xe7c5xf){createInterval(_0xe7c5xf)})})[_0x4fd8[11]](function(_0xe7c5xb){console[_0x4fd8[9]](_0x4fd8[61],_0xe7c5xb)})} \ No newline at end of file +'use strict'; + +var _ = require('lodash'); +var config = require('../environment'); +var moment = require('moment'); +// var stringifyObject = require('stringify-object'); + +var sequelize = require('../../models').sequelize; +var Automation = require('../../models').Automation; +var MailRoom = require('../../models').MailRoom; +var activeMailAutomations = {}; + +function executeAutomation(id) { + console.log('Executing Mail Automation ', 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.log('Mail Automation exec error', err); + }); +} + +function setStatus(ticketId, newStatus) { + return MailRoom.update({ + status: newStatus, + }, { + where: { + id: ticketId + } + }) + .catch(function(err) { + console.log('Automatic mail status error', err); + }); +} + +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('Mail Automation ', 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() { + + Automation.afterCreate(function(doc, options) { + console.log('Mail Automation ', doc.id, ' created, the status is ', doc.status); + if (doc.status && doc.channel === 'mail') { + createInterval(doc); + } + }); + + Automation.afterUpdate(function(doc, options) { + console.log('Mail Automation ', doc.id, ' updated, the status is ', doc.status); + if (activeMailAutomations['interval' + doc.id]) { + console.log('Mail automation unset ', doc.id); + clearInterval(activeMailAutomations['interval' + doc.id]); + delete activeMailAutomations['interval' + doc.id]; + } + if (doc.status && doc.channel === 'mail') { + createInterval(doc); + } + }); + + Automation.afterDelete(function(doc, options) { + console.log('Mail Automation ', doc.id, ' deleted'); + if (activeMailAutomations['interval' + doc.id]) { + console.log('Mail automation 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) { + + mailAutomations.forEach(function(mailAutomation) { + createInterval(mailAutomation); + }); + }) + .catch(function(err) { + console.log('Mail Automation init error', err); + }); +}; diff --git a/server/config/chat.js b/server/config/chat.js index afcbe1a..eff997c 100644 --- a/server/config/chat.js +++ b/server/config/chat.js @@ -1 +1,109 @@ -var _0x819a=["\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"];_0x819a[0];var ChatWebsite=require(_0x819a[2])[_0x819a[1]];var ChatRoom=require(_0x819a[2])[_0x819a[3]];var Website=require(_0x819a[4]);var ReportChat=require(_0x819a[2])[_0x819a[5]];var _=require(_0x819a[6]);var Util=require(_0x819a[7]);var chatwebsites;module[_0x819a[8]]= function(){return ChatWebsite[_0x819a[26]]()[_0x819a[25]](function(_0x48b5x9){console[_0x819a[12]](_0x819a[11]);chatwebsites= _0x48b5x9;synch(chatwebsites);ReportChat[_0x819a[20]](function(_0x48b5xa){var _0x48b5xb=_[_0x819a[14]](chatwebsites,{id:_0x48b5xa[_0x819a[13]]});if(_0x48b5xb&& _0x48b5xa[_0x819a[16]](_0x819a[15])){webhook(_0x48b5xa,_0x48b5xb,_0x819a[17])};if(_0x48b5xb&& _0x48b5xa[_0x819a[16]](_0x819a[18])){webhook(_0x48b5xa,_0x48b5xb,_0x819a[19])}});ChatRoom[_0x819a[20]](function(_0x48b5xa){var _0x48b5xb=_[_0x819a[14]](chatwebsites,{id:_0x48b5xa[_0x819a[21]]});if(_0x48b5xb&& _0x48b5xa[_0x819a[16]](_0x819a[22])&& _0x48b5xa[_0x819a[22]]=== _0x819a[23]){webhook(_0x48b5xa,_0x48b5xb,_0x819a[24])}})})[_0x819a[10]](function(_0x48b5x8){console[_0x819a[9]](_0x48b5x8)})};function webhook(_0x48b5xa,_0x48b5xb,_0x48b5xd){var _0x48b5xe=_0x48b5xb;switch(_0x48b5xd){case _0x819a[17]:if(_0x48b5xe[_0x819a[27]]&& _0x48b5xe[_0x819a[28]]){console[_0x819a[12]](_0x819a[29]+ _0x48b5xe[_0x819a[30]]+ _0x819a[31]);execRequest(_0x48b5xa[_0x819a[32]],_0x48b5xe[_0x819a[27]],_0x48b5xe[_0x819a[28]])};if(_0x48b5xe[_0x819a[34]][_0x819a[33]]){_[_0x819a[37]](_0x48b5xe[_0x819a[34]],function(_0x48b5xf){if(_0x48b5xf[_0x819a[35]]){Util[_0x819a[36]](_0x48b5xf,_0x48b5xa)}})};break;case _0x819a[19]:if(_0x48b5xe[_0x819a[38]]&& _0x48b5xe[_0x819a[39]]){console[_0x819a[12]](_0x819a[29]+ _0x48b5xe[_0x819a[30]]+ _0x819a[40]);execRequest(_0x48b5xa[_0x819a[32]],_0x48b5xe[_0x819a[38]],_0x48b5xe[_0x819a[39]])};break;case _0x819a[24]:if(_0x48b5xe[_0x819a[41]]&& _0x48b5xe[_0x819a[42]]){console[_0x819a[12]](_0x819a[29]+ _0x48b5xe[_0x819a[30]]+ _0x819a[43]);execRequest(_0x48b5xa[_0x819a[32]],_0x48b5xe[_0x819a[41]],_0x48b5xe[_0x819a[42]])};break;default:console[_0x819a[12]](_0x819a[44])}}function execRequest(_0x48b5xa,_0x48b5x11,_0x48b5x12){Util[_0x819a[47]](_0x48b5xa,_0x48b5x11,_0x48b5x12)[_0x819a[25]](function(_0x48b5x13){console[_0x819a[12]](_0x819a[46])})[_0x819a[10]](function(_0x48b5x8){console[_0x819a[12]](_0x819a[45])})}function synch(chatwebsites){ChatWebsite[_0x819a[51]](function(_0x48b5xa){console[_0x819a[12]](_0x819a[48]+ _0x48b5xa[_0x819a[30]]+ _0x819a[49]);chatwebsites[_0x819a[50]](_0x48b5xa)});ChatWebsite[_0x819a[20]](function(_0x48b5xa){var _0x48b5x15=_[_0x819a[14]](chatwebsites,{id:_0x48b5xa[_0x819a[52]]});if(_0x48b5x15){console[_0x819a[12]](_0x819a[48]+ _0x48b5x15[_0x819a[30]]+ _0x819a[53]);_[_0x819a[54]](_0x48b5x15,_0x48b5xa)}else {chatwebsites[_0x819a[55]](_0x48b5xa)}});ChatWebsite[_0x819a[57]](function(_0x48b5xa){_[_0x819a[56]](chatwebsites,{id:_0x48b5xa[_0x819a[52]]})})} \ No newline at end of file +'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 + }); + }); + +} diff --git a/server/config/express.js b/server/config/express.js index a0d8f9d..30258e5 100644 --- a/server/config/express.js +++ b/server/config/express.js @@ -1 +1,80 @@ -var _0x372e=["\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"];_0x372e[0];var express=require(_0x372e[1]);var favicon=require(_0x372e[2]);var morgan=require(_0x372e[3]);var compression=require(_0x372e[4]);var bodyParser=require(_0x372e[5]);var queryParser=require(_0x372e[6]);var methodOverride=require(_0x372e[7]);var cookieParser=require(_0x372e[8]);var errorHandler=require(_0x372e[9]);var path=require(_0x372e[10]);var passport=require(_0x372e[11]);var session=require(_0x372e[12]);var flash=require(_0x372e[13]);var SessionStore=require(_0x372e[14])(session);var config=require(_0x372e[15]);module[_0x372e[16]]= function(_0xe7a2x10){var _0xe7a2x11=_0xe7a2x10[_0x372e[18]](_0x372e[17]);_0xe7a2x10[_0x372e[22]](_0x372e[19],config[_0x372e[20]]+ _0x372e[21]);_0xe7a2x10[_0x372e[26]](_0x372e[23],require(_0x372e[25])[_0x372e[24]]);_0xe7a2x10[_0x372e[22]](_0x372e[27],_0x372e[23]);_0xe7a2x10[_0x372e[28]](compression());_0xe7a2x10[_0x372e[28]](bodyParser[_0x372e[30]]({limit:_0x372e[29],extended:false}));_0xe7a2x10[_0x372e[28]](bodyParser[_0x372e[31]]());_0xe7a2x10[_0x372e[28]](methodOverride());_0xe7a2x10[_0x372e[28]](cookieParser());_0xe7a2x10[_0x372e[28]](passport[_0x372e[32]]());_0xe7a2x10[_0x372e[28]](session({secret:config[_0x372e[34]][_0x372e[33]],store: new SessionStore({host:config[_0x372e[36]][_0x372e[35]],port:config[_0x372e[36]][_0x372e[37]],user:config[_0x372e[36]][_0x372e[38]],password:config[_0x372e[36]][_0x372e[39]],database:config[_0x372e[36]][_0x372e[40]]}),cookie:config[_0x372e[34]][_0x372e[41]],name:config[_0x372e[34]][_0x372e[42]],resave:true,saveUninitialized:true}));if(_0x372e[43]=== _0xe7a2x11){_0xe7a2x10[_0x372e[28]](favicon(path[_0x372e[46]](config[_0x372e[20]],_0x372e[44],_0x372e[45])));_0xe7a2x10[_0x372e[28]](express[_0x372e[47]](path[_0x372e[46]](config[_0x372e[20]],_0x372e[44])));_0xe7a2x10[_0x372e[22]](_0x372e[48],config[_0x372e[20]]+ _0x372e[49]);morgan[_0x372e[56]](_0x372e[50],function(_0xe7a2x12,_0xe7a2x13){return _0xe7a2x12[_0x372e[52]][_0x372e[51]]?_0xe7a2x12[_0x372e[52]][_0x372e[51]]:_0xe7a2x12[_0x372e[54]][_0x372e[53]]|| _0xe7a2x12[_0x372e[55]]});_0xe7a2x10[_0x372e[28]](morgan(_0x372e[57]))};if(_0x372e[58]=== _0xe7a2x11|| _0x372e[59]=== _0xe7a2x11){_0xe7a2x10[_0x372e[28]](require(_0x372e[60])());_0xe7a2x10[_0x372e[28]](express[_0x372e[47]](path[_0x372e[46]](config[_0x372e[20]],_0x372e[61])));_0xe7a2x10[_0x372e[28]](express[_0x372e[47]](path[_0x372e[46]](config[_0x372e[20]],_0x372e[62])));_0xe7a2x10[_0x372e[22]](_0x372e[48],_0x372e[62]);morgan[_0x372e[56]](_0x372e[50],function(_0xe7a2x12,_0xe7a2x13){return _0xe7a2x12[_0x372e[52]][_0x372e[51]]?_0xe7a2x12[_0x372e[52]][_0x372e[51]]:_0xe7a2x12[_0x372e[54]][_0x372e[53]]|| _0xe7a2x12[_0x372e[55]]});_0xe7a2x10[_0x372e[28]](morgan(_0x372e[57]));_0xe7a2x10[_0x372e[28]](errorHandler())};_0xe7a2x10[_0x372e[28]](flash())} \ No newline at end of file +/** + * 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()); +}; diff --git a/server/config/fax.js b/server/config/fax.js index 586a51f..c64343b 100644 --- a/server/config/fax.js +++ b/server/config/fax.js @@ -1 +1,240 @@ -var _0xfa04=["\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"];_0xfa04[0];var _=require(_0xfa04[1]);var uuidLib=require(_0xfa04[2]);var ConvertTiff=require(_0xfa04[3]);var exec=require(_0xfa04[5])[_0xfa04[4]];var fs=require(_0xfa04[6]);var path=require(_0xfa04[7]);var FaxMessage=require(_0xfa04[9])[_0xfa04[8]];var FaxRoom=require(_0xfa04[9])[_0xfa04[10]];var Contact=require(_0xfa04[9])[_0xfa04[11]];var Event=require(_0xfa04[9])[_0xfa04[12]];var config=require(_0xfa04[13]);exports[_0xfa04[14]]= function(_0x4cc3xc){_0x4cc3xc[_0xfa04[50]](_0xfa04[15],function(_0x4cc3xd){FaxRoom[_0xfa04[24]]({status:_0xfa04[49],from:_0x4cc3xd[_0xfa04[27]],FaxAccountId:1})[_0xfa04[45]](function(_0x4cc3xf){_0x4cc3xd[_0xfa04[18]]= _0xfa04[19];_0x4cc3xd[_0xfa04[20]]= _0x4cc3xf[_0xfa04[21]];FaxMessage[_0xfa04[24]](_0x4cc3xd)[_0xfa04[45]](function(_0x4cc3x10){Event[_0xfa04[24]]({name:_0xfa04[22],channel:_0xfa04[23],FaxRoomId:_0x4cc3xf[_0xfa04[21]],FaxAccountId:1})[_0xfa04[17]](function(_0x4cc3xe){console[_0xfa04[16]](_0x4cc3xe)});Contact[_0xfa04[28]]({where:{phone:_0x4cc3xd[_0xfa04[27]]},defaults:{phone:_0x4cc3xd[_0xfa04[27]],fullname:_0x4cc3xd[_0xfa04[27]]}})[_0xfa04[26]](function(_0x4cc3x11,_0x4cc3x12){_0x4cc3x10[_0xfa04[25]](_0x4cc3x11)});Contact[_0xfa04[28]]({where:{phone:_0x4cc3xd[_0xfa04[30]]},defaults:{phone:_0x4cc3xd[_0xfa04[30]],fullname:_0x4cc3xd[_0xfa04[30]]}})[_0xfa04[26]](function(_0x4cc3x11,_0x4cc3x12){_0x4cc3x10[_0xfa04[29]](_0x4cc3x11)});var _0x4cc3x13=uuidLib[_0xfa04[31]]();var _0x4cc3x14=_0x4cc3xd[_0xfa04[32]];var _0x4cc3x15=path[_0xfa04[39]](config[_0xfa04[33]],_0xfa04[34],_0xfa04[35],_0xfa04[36],_0xfa04[37],_0x4cc3x13+ _0xfa04[38]);var _0x4cc3x16=_0xfa04[40]+ _0x4cc3x14+ _0xfa04[41]+ _0x4cc3x15;fs[_0xfa04[48]](_0x4cc3x14,function(_0x4cc3x17){if(_0x4cc3x17){console[_0xfa04[16]](_0xfa04[42]+ _0x4cc3x14+ _0xfa04[43]);exec(_0x4cc3x16,function(_0x4cc3xe){if(_0x4cc3xe){console[_0xfa04[16]](_0x4cc3xe)}else {_0x4cc3x10[_0xfa04[46]]({filenamePDF:_0x4cc3x13+ _0xfa04[38]})[_0xfa04[45]](function(){console[_0xfa04[16]](_0xfa04[42]+ _0x4cc3x14+ _0xfa04[44])})[_0xfa04[17]](function(_0x4cc3xe){console[_0xfa04[16]](_0x4cc3xe)})}})}else {console[_0xfa04[16]](_0xfa04[42]+ _0x4cc3x14+ _0xfa04[47])}})})[_0xfa04[17]](function(_0x4cc3xe){console[_0xfa04[16]](_0x4cc3xe)})})[_0xfa04[17]](function(_0x4cc3xe){console[_0xfa04[16]](_0x4cc3xe)})});_0x4cc3xc[_0xfa04[50]](_0xfa04[51],function(_0x4cc3xd){console[_0xfa04[53]](_0xfa04[52]);FaxMessage[_0xfa04[55]]({where:{uniqueid:_0x4cc3xd[_0xfa04[54]]}})[_0xfa04[45]](function(_0x4cc3x10){if(_0x4cc3x10){_0x4cc3x10[_0xfa04[46]](_0x4cc3xd)}})[_0xfa04[17]](function(_0x4cc3xe){console[_0xfa04[16]](_0x4cc3xe)})});_0x4cc3xc[_0xfa04[50]](_0xfa04[56],function(_0x4cc3xd){if(_0x4cc3xd[_0xfa04[59]][_0xfa04[58]](_0xfa04[57])){FaxMessage[_0xfa04[55]]({where:{uniqueid:_0x4cc3xd[_0xfa04[54]]}})[_0xfa04[45]](function(_0x4cc3x10){if(_0x4cc3x10){console[_0xfa04[53]](_0xfa04[60],_0xfa04[18],_0x4cc3xd[_0xfa04[61]]);_0x4cc3x10[_0xfa04[46]]({status:_0x4cc3xd[_0xfa04[61]]== _0xfa04[62]?_0xfa04[62]:_0xfa04[63]})}})[_0xfa04[17]](function(_0x4cc3xe){console[_0xfa04[16]](_0x4cc3xe)})}else {if(_0x4cc3xd[_0xfa04[59]][_0xfa04[58]](_0xfa04[64])){FaxMessage[_0xfa04[55]]({where:{uniqueid:_0x4cc3xd[_0xfa04[54]]}})[_0xfa04[45]](function(_0x4cc3x10){if(_0x4cc3x10){console[_0xfa04[53]](_0xfa04[60],_0xfa04[16],_0x4cc3xd[_0xfa04[61]]);_0x4cc3x10[_0xfa04[46]]({error:_0x4cc3xd[_0xfa04[61]]})}})[_0xfa04[17]](function(_0x4cc3xe){console[_0xfa04[16]](_0x4cc3xe)})}else {if(_0x4cc3xd[_0xfa04[59]][_0xfa04[58]](_0xfa04[65])){FaxMessage[_0xfa04[55]]({where:{uniqueid:_0x4cc3xd[_0xfa04[54]]}})[_0xfa04[45]](function(_0x4cc3x10){if(_0x4cc3x10){console[_0xfa04[53]](_0xfa04[60],_0xfa04[66],_0x4cc3xd[_0xfa04[61]]);_0x4cc3x10[_0xfa04[46]]({laststatus:_0x4cc3xd[_0xfa04[61]]})}})[_0xfa04[17]](function(_0x4cc3xe){console[_0xfa04[16]](_0x4cc3xe)})}}}});_0x4cc3xc[_0xfa04[50]](_0xfa04[67],function(_0x4cc3xd){if(_0x4cc3xd[_0xfa04[67]]=== _0xfa04[68]){FaxMessage[_0xfa04[55]]({where:{uuid:_0x4cc3xd[_0xfa04[70]]}})[_0xfa04[45]](function(_0x4cc3x10){if(_0x4cc3x10){_0x4cc3xd[_0xfa04[18]]= _0xfa04[69];_0x4cc3x10[_0xfa04[46]](_0x4cc3xd)}})[_0xfa04[17]](function(_0x4cc3xe){console[_0xfa04[16]](_0x4cc3xe)})}});_0x4cc3xc[_0xfa04[50]](_0xfa04[57],function(_0x4cc3xd){FaxMessage[_0xfa04[55]]({where:{uniqueid:_0x4cc3xd[_0xfa04[54]]}})[_0xfa04[45]](function(_0x4cc3x10){if(_0x4cc3x10){console[_0xfa04[53]](_0xfa04[71],_0x4cc3xd[_0xfa04[54]],_0x4cc3xd[_0xfa04[18]]);_0x4cc3x10[_0xfa04[46]]({operation:_0x4cc3xd[_0xfa04[72]],laststatus:_0x4cc3xd[_0xfa04[18]]})}})[_0xfa04[17]](function(_0x4cc3xe){console[_0xfa04[16]](_0x4cc3xe)})});require(_0xfa04[73])[_0xfa04[14]](_0x4cc3xc)} \ No newline at end of file +'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); + +}; diff --git a/server/config/history/history.js b/server/config/history/history.js index 6f0d1a4..d21aec2 100644 --- a/server/config/history/history.js +++ b/server/config/history/history.js @@ -1 +1,131 @@ -var _0x5547=["\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"];_0x5547[0];var sequelize=require(_0x5547[2])[_0x5547[1]];var moment=require(_0x5547[3]);var async=require(_0x5547[4]);var ReportMove=require(_0x5547[5]);var Models=require(_0x5547[2]);var HistoryModels=require(_0x5547[2])[_0x5547[6]];var moment=require(_0x5547[3]);var defaultCondition={where:{createdAt:{$lte:moment()[_0x5547[8]](_0x5547[7])}},raw:true};module[_0x5547[9]]= function(_0x4718x8){var _0x4718x9= new _0x4718x8({cronTime:_0x5547[10],onTick:function(){console[_0x5547[12]](_0x5547[11]);return Promise[_0x5547[17]]([])[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportIntegration,HistoryModels.ReportIntegrationHistory))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportCall,HistoryModels.ReportCallHistory))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportSquareDetail,HistoryModels.ReportSquareDetailHistory))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportTigerDial,HistoryModels.ReportTigerDialHistory))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportDial,HistoryModels.ReportDialHistory))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportCallTransfer,HistoryModels.ReportCallTransferHistory))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportAgent,HistoryModels.ReportAgentHistory,{reason:{$ne:null}}))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportMember,HistoryModels.ReportMemberHistory,{exitAt:{$ne:null}}))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportQueue,HistoryModels.ReportQueueHistory,{queuecallerleaveAt:{$ne:null}}))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportChat,HistoryModels.ReportChatHistory,{reason:{$ne:null}}))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportChatSession,HistoryModels.ReportChatSessionHistory,{leaveAt:{$ne:null}}))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportChatRoom,HistoryModels.ReportChatRoomHistory,{leaveAt:{$ne:null}}))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportMail,HistoryModels.ReportMailHistory,{reason:{$ne:null}}))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportMailSession,HistoryModels.ReportMailSessionHistory,{leaveAt:{$ne:null}}))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportMailRoom,HistoryModels.ReportMailRoomHistory,{leaveAt:{$ne:null}}))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportSms,HistoryModels.ReportSmsHistory,{reason:{$ne:null}}))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportSmsSession,HistoryModels.ReportSmsSessionHistory,{leaveAt:{$ne:null}}))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportSquare,HistoryModels.ReportSquareHistory,{leaveAt:{$ne:null}}))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportFax,HistoryModels.ReportFaxHistory,{reason:{$ne:null}}))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportFaxSession,HistoryModels.ReportFaxSessionHistory,{leaveAt:{$ne:null}}))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportFaxRoom,HistoryModels.ReportFaxRoomHistory,{leaveAt:{$ne:null}}))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportOpenchannel,HistoryModels.ReportOpenchannelHistory,{reason:{$ne:null}}))[_0x5547[16]](ReportMove[_0x5547[15]](Models.ReportOpenchannelSession,HistoryModels.ReportOpenchannelSessionHistory,{leaveAt:{$ne:null}}))[_0x5547[14]](function(_0x4718xa){console[_0x5547[13]](_0x4718xa)})}});_0x4718x9[_0x5547[18]]()} \ No newline at end of file +'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(); +} diff --git a/server/config/history/reportMove.js b/server/config/history/reportMove.js index 5d64ac3..de5d2c8 100644 --- a/server/config/history/reportMove.js +++ b/server/config/history/reportMove.js @@ -1 +1,50 @@ -var _0x6fa4=["\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"];_0x6fa4[0];var _=require(_0x6fa4[1]);var moment=require(_0x6fa4[2]);var sequelize=require(_0x6fa4[4])[_0x6fa4[3]];var util=require(_0x6fa4[5]);exports[_0x6fa4[6]]= function(_0xb27bx5,_0xb27bx6,_0xb27bx7){var _0xb27bx8;var _0xb27bx9={createdAt:{$lte:moment()[_0x6fa4[8]](_0x6fa4[7])}};return function(){return sequelize[_0x6fa4[26]](function(_0xb27bxb){return _0xb27bx5[_0x6fa4[25]]({where:_0xb27bx7?_[_0x6fa4[24]](_0xb27bx9,_0xb27bx7):_0xb27bx9,raw:true})[_0x6fa4[20]](function(_0xb27bxc){_0xb27bx8= _0xb27bxc;return _0xb27bx6[_0x6fa4[23]](_0xb27bxc,{individualHooks:true,transaction:_0xb27bxb})})[_0x6fa4[20]](function(){return _0xb27bx5[_0x6fa4[22]]({where:{id:_[_0x6fa4[15]](_0xb27bx8,_0x6fa4[21])}},{individualHooks:true,transaction:_0xb27bxb})})})[_0x6fa4[20]](function(){console[_0x6fa4[19]](util[_0x6fa4[8]](_0x6fa4[18],_0xb27bx5[_0x6fa4[10]]))})[_0x6fa4[17]](function(_0xb27bxa){console[_0x6fa4[16]](util[_0x6fa4[8]](_0x6fa4[9],_0xb27bx5[_0x6fa4[10]],_[_0x6fa4[15]](_0xb27bxa[_0x6fa4[13]],_0x6fa4[14])[_0x6fa4[12]](_0x6fa4[11])))})}} \ No newline at end of file +'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('; '))); + }); + } +} diff --git a/server/config/imap/imap.js b/server/config/imap/imap.js index 0fe2598..93bfa0d 100644 --- a/server/config/imap/imap.js +++ b/server/config/imap/imap.js @@ -1 +1,105 @@ -var _0xcecd=["\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"];_0xcecd[0];var util=require(_0xcecd[1]);var path=require(_0xcecd[2]);var _=require(_0xcecd[3]);var Promise=require(_0xcecd[4]);var ImapListener=require(_0xcecd[5]);var writeFile=Promise[_0xcecd[8]](require(_0xcecd[7])[_0xcecd[6]]);var config=require(_0xcecd[9]);var Server=require(_0xcecd[11])[_0xcecd[10]];var Room=require(_0xcecd[11])[_0xcecd[12]];var Message=require(_0xcecd[11])[_0xcecd[13]];var Account=require(_0xcecd[11])[_0xcecd[14]];var Attachment=require(_0xcecd[11])[_0xcecd[15]];var imap;var timeout;process[_0xcecd[17]](_0xcecd[18],function(_0xa439x10){console[_0xcecd[23]](util[_0xcecd[22]](_0xcecd[19],process[_0xcecd[20]][3],_0xa439x10,process[_0xcecd[21]]))})[_0xcecd[17]](_0xcecd[16],function(_0xa439xf){console[_0xcecd[16]](_0xa439xf)});console[_0xcecd[23]](util[_0xcecd[22]](_0xcecd[24],process[_0xcecd[20]][3],process[_0xcecd[21]]));process[_0xcecd[27]]({type:_0xcecd[25],state:_0xcecd[26]});function onSave(_0xa439x12){imap= new ImapListener({username:_0xa439x12[_0xcecd[40]],password:_0xa439x12[_0xcecd[50]],host:_0xa439x12[_0xcecd[51]],port:_0xa439x12[_0xcecd[52]],tls:_0xa439x12[_0xcecd[53]],tlsOptions:{rejectUnauthorized:false},mailbox:_0xa439x12[_0xcecd[54]],searchFilter:[_0xa439x12[_0xcecd[55]]],markSeen:true,fetchUnreadOnStart:true,connTimeout:_0xa439x12[_0xcecd[56]]* 1000,authTimeout:_0xa439x12[_0xcecd[57]]* 1000,keepalive:_0xa439x12[_0xcecd[58]]})[_0xcecd[17]](_0xcecd[47],function(){console[_0xcecd[23]](util[_0xcecd[22]](_0xcecd[48],_0xa439x12[_0xcecd[40]],process[_0xcecd[21]]));process[_0xcecd[27]]({type:_0xcecd[25],state:_0xcecd[49]})})[_0xcecd[17]](_0xcecd[43],function(_0xa439xf){console[_0xcecd[16]](util[_0xcecd[22]](_0xcecd[44],_0xa439x12[_0xcecd[40]],process[_0xcecd[21]]),_0xa439xf);imap[_0xcecd[45]]();imap= null;process[_0xcecd[27]]({type:_0xcecd[25],state:_0xcecd[46]})})[_0xcecd[17]](_0xcecd[16],function(_0xa439xf){console[_0xcecd[16]](util[_0xcecd[22]](_0xcecd[39],_0xa439x12[_0xcecd[40]],process[_0xcecd[21]]),_0xa439xf);process[_0xcecd[27]]({type:_0xcecd[25],state:_0xcecd[41],source:JSON[_0xcecd[42]](_0xa439xf)})})[_0xcecd[17]](_0xcecd[28],function(_0xa439x13,_0xa439x14,_0xa439x15){console[_0xcecd[23]](util[_0xcecd[22]](_0xcecd[29],process[_0xcecd[20]][3],_[_0xcecd[34]](_0xa439x13[_0xcecd[32]],_0xcecd[33])[_0xcecd[31]](_0xcecd[30])));_0xa439x13[_0xcecd[35]]= _0xcecd[36];_0xa439x13[_0xcecd[37]]= imap[_0xcecd[37]];_0xa439x13[_0xcecd[38]]= imap[_0xcecd[38]];process[_0xcecd[27]](_0xa439x13)});imap[_0xcecd[37]]= _0xa439x12[_0xcecd[59]];imap[_0xcecd[38]]= _0xa439x12[_0xcecd[60]];imap[_0xcecd[61]]()}Server[_0xcecd[64]](process[_0xcecd[20]][2])[_0xcecd[63]](function(_0xa439x12){onSave(_0xa439x12)})[_0xcecd[62]](function(_0xa439xf){console[_0xcecd[16]](_0xa439xf)}) \ No newline at end of file +'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); + }); diff --git a/server/config/imap/index.js b/server/config/imap/index.js index 7b62f5c..053702c 100644 --- a/server/config/imap/index.js +++ b/server/config/imap/index.js @@ -1 +1,600 @@ -var _0x341e=["\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","\x68\x61\x6E\x64\x6C\x65\x53\x74\x61\x74\x65","\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"];_0x341e[0];const _=require(_0x341e[1]);const util=require(_0x341e[2]);const path=require(_0x341e[3]);const cp=require(_0x341e[4]);const ms=require(_0x341e[6])[_0x341e[5]];const msg=require(_0x341e[6])[_0x341e[7]];const Room=require(_0x341e[6])[_0x341e[8]];const Status=require(_0x341e[6])[_0x341e[9]];const Message=require(_0x341e[6])[_0x341e[7]];const Account=require(_0x341e[6])[_0x341e[10]];const Contact=require(_0x341e[6])[_0x341e[11]];const Company=require(_0x341e[6])[_0x341e[12]];const Attachment=require(_0x341e[6])[_0x341e[13]];const ReportMail=require(_0x341e[6])[_0x341e[14]];const ReportMailRoom=require(_0x341e[6])[_0x341e[15]];const ReportMailSession=require(_0x341e[6])[_0x341e[16]];const Promise=require(_0x341e[17]);const moment=require(_0x341e[18]);const open=Promise[_0x341e[21]](require(_0x341e[20])[_0x341e[19]]);const close=Promise[_0x341e[21]](require(_0x341e[20])[_0x341e[22]]);const write=Promise[_0x341e[21]](require(_0x341e[20])[_0x341e[23]]);const config=require(_0x341e[24]);var mailaccounts;var Scheduler=require(_0x341e[25]);var Util=require(_0x341e[26]);function handleMessage(msg){var _0x89ddx1b;var _0x89ddx1c;var _0x89ddx1d;var _0x89ddx1e;var _0x89ddx1f;var _0x89ddx20,_0x89ddx21,_0x89ddx22,_0x89ddx23;if(msg[_0x341e[27]]){return Message[_0x341e[79]]({where:{messageId:msg[_0x341e[27]][0]}})[_0x341e[51]](function(_0x89ddx2f){if(_0x89ddx2f){return _0x89ddx2f[_0x341e[86]]()[_0x341e[51]](function(_0x89ddx2e){_0x89ddx1b= _0x89ddx2e;if(_0x89ddx2e[_0x341e[72]]!== _0x341e[73]){return _0x89ddx1b[_0x341e[71]]({status:_0x341e[82],openReason:_0x341e[83]},{individualHooks:true})[_0x341e[51]](function(){return Account[_0x341e[81]](msg[_0x341e[80]])[_0x341e[51]](function(_0x89ddx31){_0x89ddx1d= _0x89ddx31;if(_0x89ddx1d[_0x341e[75]]){return Company[_0x341e[79]]({where:{emailDomain:msg[_0x341e[38]][0][_0x341e[37]][_0x341e[77]](_0x341e[76])[1]}})[_0x341e[51]](function(_0x89ddx32){return Contact[_0x341e[78]]({where:{email:msg[_0x341e[38]][0][_0x341e[37]]},defaults:{email:msg[_0x341e[38]][0][_0x341e[37]],firstName:msg[_0x341e[38]][0][_0x341e[36]]|| msg[_0x341e[38]][0][_0x341e[37]][_0x341e[77]](_0x341e[76])[0],ListId:_0x89ddx1d[_0x341e[75]],CompanyId:_0x89ddx32?_0x89ddx32[_0x341e[33]]:null}})})}else {return []}})[_0x341e[74]](function(_0x89ddx30){_0x89ddx1e= _0x89ddx30})})}else {return Account[_0x341e[81]](msg[_0x341e[80]])[_0x341e[51]](function(_0x89ddx31){_0x89ddx1d= _0x89ddx31;if(_0x89ddx1d[_0x341e[75]]){return Company[_0x341e[79]]({where:{emailDomain:msg[_0x341e[38]][0][_0x341e[37]][_0x341e[77]](_0x341e[76])[1]}})[_0x341e[51]](function(_0x89ddx32){return Contact[_0x341e[78]]({where:{email:msg[_0x341e[38]][0][_0x341e[37]]},defaults:{email:msg[_0x341e[38]][0][_0x341e[37]],firstName:msg[_0x341e[38]][0][_0x341e[36]]|| msg[_0x341e[38]][0][_0x341e[37]][_0x341e[77]](_0x341e[76])[0],ListId:_0x89ddx1d[_0x341e[75]],CompanyId:_0x89ddx32?_0x89ddx32[_0x341e[33]]:null}})})}else {return []}})[_0x341e[74]](function(_0x89ddx30){_0x89ddx1e= _0x89ddx30;return Room[_0x341e[61]]({subject:msg[_0x341e[35]],from:_[_0x341e[40]](msg[_0x341e[38]],_0x341e[37])[_0x341e[59]](_0x341e[84]),account:_0x89ddx1d[_0x341e[36]],attachment:msg[_0x341e[43]]&& msg[_0x341e[43]][_0x341e[44]],lastEvent:_0x341e[66],lastEventAt:moment()[_0x341e[34]](_0x341e[85]),arrivedAt:moment()[_0x341e[34]](_0x341e[85]),MailAccountId:_0x89ddx1d[_0x341e[33]],ParentId:_0x89ddx2e[_0x341e[33]]})})[_0x341e[51]](function(_0x89ddx2e){_0x89ddx1b= _0x89ddx2e})}})}else {return Account[_0x341e[81]](msg[_0x341e[80]])[_0x341e[51]](function(_0x89ddx31){_0x89ddx1d= _0x89ddx31;if(_0x89ddx1d[_0x341e[75]]){return Company[_0x341e[79]]({where:{emailDomain:msg[_0x341e[38]][0][_0x341e[37]][_0x341e[77]](_0x341e[76])[1]}})[_0x341e[51]](function(_0x89ddx32){return Contact[_0x341e[78]]({where:{email:msg[_0x341e[38]][0][_0x341e[37]]},defaults:{email:msg[_0x341e[38]][0][_0x341e[37]],firstName:msg[_0x341e[38]][0][_0x341e[36]]|| msg[_0x341e[38]][0][_0x341e[37]][_0x341e[77]](_0x341e[76])[0],ListId:_0x89ddx1d[_0x341e[75]],CompanyId:_0x89ddx32?_0x89ddx32[_0x341e[33]]:null}})})}else {return []}})[_0x341e[74]](function(_0x89ddx30){_0x89ddx1e= _0x89ddx30;return Room[_0x341e[61]]({subject:msg[_0x341e[35]],from:_[_0x341e[40]](msg[_0x341e[38]],_0x341e[37])[_0x341e[59]](_0x341e[84]),account:_0x89ddx1d[_0x341e[36]],attachment:msg[_0x341e[43]]&& msg[_0x341e[43]][_0x341e[44]],lastEvent:_0x341e[66],lastEventAt:moment()[_0x341e[34]](_0x341e[85]),arrivedAt:moment()[_0x341e[34]](_0x341e[85]),MailAccountId:_0x89ddx1d[_0x341e[33]]})})[_0x341e[51]](function(_0x89ddx2e){_0x89ddx1b= _0x89ddx2e})}})[_0x341e[51]](function(){return _0x89ddx1b[_0x341e[71]]({lastEvent:_0x341e[66],mailIn:++_0x89ddx1b[_0x341e[70]]})})[_0x341e[51]](function(_0x89ddx2e){return Message[_0x341e[61]]({fromId:_0x89ddx1e?_0x89ddx1e[_0x341e[33]]:null,messageId:msg[_0x341e[65]],status:_0x341e[66],subject:msg[_0x341e[35]],from:_[_0x341e[40]](msg[_0x341e[38]],_0x341e[37]),to:msg[_0x341e[67]]?_[_0x341e[40]](msg[_0x341e[67]],_0x341e[37]):[],cc:msg[_0x341e[39]]?_[_0x341e[40]](msg[_0x341e[39]],_0x341e[37]):[],bcc:msg[_0x341e[68]]?_[_0x341e[40]](msg[_0x341e[68]],_0x341e[37]):[],text:msg[_0x341e[69]]|| null,MailRoomId:_0x89ddx1b[_0x341e[33]],accountName:_0x89ddx1d[_0x341e[36]],accountId:_0x89ddx1d[_0x341e[33]]})})[_0x341e[51]](function(_0x89ddx25){var _0x89ddx26=[];var _0x89ddx27=_0x89ddx25;var _0x89ddx28= new Scheduler({channel:_0x341e[30],uniqueid:util[_0x341e[34]](_0x341e[31],moment()[_0x341e[32]](),_0x89ddx1b[_0x341e[33]]),subject:msg[_0x341e[35]],messageid:_0x89ddx27[_0x341e[33]],roomid:_0x89ddx1b[_0x341e[33]],accountid:_0x89ddx1d[_0x341e[33]],accountname:_0x89ddx1d[_0x341e[36]],accountaddress:_0x89ddx1d[_0x341e[37]],from:msg[_0x341e[38]][0][_0x341e[37]],cc:msg[_0x341e[39]]?_[_0x341e[40]](msg[_0x341e[39]],_0x341e[37]):[]},_0x89ddx27[_0x341e[41]]);_0x89ddx28[_0x341e[42]]();if(msg[_0x341e[43]]&& msg[_0x341e[43]][_0x341e[44]]){msg[_0x341e[43]][_0x341e[63]](function(_0x89ddx29){var _0x89ddx2a=_0x341e[45]+ Math[_0x341e[46]](32);var _0x89ddx2b;_0x89ddx26[_0x341e[62]](Attachment[_0x341e[61]]({name:_0x89ddx29[_0x341e[48]],basename:_0x89ddx2a,path:path[_0x341e[59]](config[_0x341e[55]],_0x341e[56],_0x341e[57],_0x341e[43],_0x341e[58],_0x89ddx2a),type:_0x89ddx29[_0x341e[60]],size:_0x89ddx29[_0x341e[44]],MailMessageId:_0x89ddx27[_0x341e[33]]})[_0x341e[51]](function(_0x89ddx2d){return open(_0x89ddx2d[_0x341e[3]],_0x341e[54])})[_0x341e[51]](function(_0x89ddx2c){_0x89ddx2b= _0x89ddx2c;return write(_0x89ddx2b, new Buffer(_0x89ddx29[_0x341e[53]][_0x341e[52]]),0,_0x89ddx29[_0x341e[44]])})[_0x341e[51]](function(){return close(_0x89ddx2b)})[_0x341e[51]](function(){console[_0x341e[50]](_0x341e[47],_0x89ddx29[_0x341e[48]],_0x341e[49])})[_0x341e[29]](function(_0x89ddx24){console[_0x341e[28]](_0x89ddx24)}))})};return Promise[_0x341e[64]](_0x89ddx26)})[_0x341e[29]](function(_0x89ddx24){console[_0x341e[28]](_0x89ddx24)})}else {return Account[_0x341e[81]](msg[_0x341e[80]])[_0x341e[51]](function(_0x89ddx31){_0x89ddx1d= _0x89ddx31;if(_0x89ddx1d[_0x341e[75]]){return Company[_0x341e[79]]({where:{emailDomain:msg[_0x341e[38]][0][_0x341e[37]][_0x341e[77]](_0x341e[76])[1]}})[_0x341e[51]](function(_0x89ddx32){return Contact[_0x341e[78]]({where:{email:msg[_0x341e[38]][0][_0x341e[37]]},defaults:{email:msg[_0x341e[38]][0][_0x341e[37]],firstName:msg[_0x341e[38]][0][_0x341e[36]]|| msg[_0x341e[38]][0][_0x341e[37]][_0x341e[77]](_0x341e[76])[0],ListId:_0x89ddx1d[_0x341e[75]],CompanyId:_0x89ddx32?_0x89ddx32[_0x341e[33]]:null}})})}else {return []}})[_0x341e[74]](function(_0x89ddx30){_0x89ddx1e= _0x89ddx30;return Room[_0x341e[61]]({mailIn:1,account:_0x89ddx1d[_0x341e[36]],subject:msg[_0x341e[35]],from:_[_0x341e[40]](msg[_0x341e[38]],_0x341e[37])[_0x341e[59]](_0x341e[84]),status:_0x341e[88],lastEvent:_0x341e[66],lastEventAt:moment()[_0x341e[34]](_0x341e[85]),arrivedAt:moment()[_0x341e[34]](_0x341e[85]),attachment:msg[_0x341e[43]]&& msg[_0x341e[43]][_0x341e[44]],MailMessages:[{messageId:msg[_0x341e[65]],subject:msg[_0x341e[35]],from:_[_0x341e[40]](msg[_0x341e[38]],_0x341e[37]),fromId:_0x89ddx1e?_0x89ddx1e[_0x341e[33]]:null,to:msg[_0x341e[67]]?_[_0x341e[40]](msg[_0x341e[67]],_0x341e[37]):[],cc:msg[_0x341e[39]]?_[_0x341e[40]](msg[_0x341e[39]],_0x341e[37]):[],bcc:msg[_0x341e[68]]?_[_0x341e[40]](msg[_0x341e[68]],_0x341e[37]):[],status:_0x341e[66],text:msg[_0x341e[69]]|| null,accountName:_0x89ddx1d[_0x341e[36]],accountId:_0x89ddx1d[_0x341e[33]]}],MailAccountId:msg[_0x341e[80]]},{include:[{model:Message}]})})[_0x341e[51]](function(_0x89ddx33){var _0x89ddx26=[];var _0x89ddx34=_0x89ddx33;var _0x89ddx28= new Scheduler({channel:_0x341e[30],uniqueid:util[_0x341e[34]](_0x341e[31],moment()[_0x341e[32]](),_0x89ddx34[_0x341e[33]]),subject:msg[_0x341e[35]],messageid:_0x89ddx34[_0x341e[87]][0][_0x341e[33]],roomid:_0x89ddx34[_0x341e[33]],accountid:_0x89ddx1d[_0x341e[33]],accountname:_0x89ddx1d[_0x341e[36]],accountaddress:_0x89ddx1d[_0x341e[37]],from:msg[_0x341e[38]][0][_0x341e[37]],cc:msg[_0x341e[39]]?_[_0x341e[40]](msg[_0x341e[39]],_0x341e[37]):[]},_0x89ddx34[_0x341e[87]][0][_0x341e[41]]);_0x89ddx28[_0x341e[42]]();if(msg[_0x341e[43]]&& msg[_0x341e[43]][_0x341e[44]]){msg[_0x341e[43]][_0x341e[63]](function(_0x89ddx29){var _0x89ddx2a=_0x341e[45]+ Math[_0x341e[46]](32);var _0x89ddx2b;_0x89ddx26[_0x341e[62]](Attachment[_0x341e[61]]({name:_0x89ddx29[_0x341e[48]],basename:_0x89ddx2a,path:path[_0x341e[59]](config[_0x341e[55]],_0x341e[56],_0x341e[57],_0x341e[43],_0x341e[58],_0x89ddx2a),type:_0x89ddx29[_0x341e[60]],size:_0x89ddx29[_0x341e[44]],MailMessageId:_0x89ddx34[_0x341e[87]][0][_0x341e[33]]})[_0x341e[51]](function(_0x89ddx2d){return open(_0x89ddx2d[_0x341e[3]],_0x341e[54])})[_0x341e[51]](function(_0x89ddx2c){_0x89ddx2b= _0x89ddx2c;return write(_0x89ddx2b, new Buffer(_0x89ddx29[_0x341e[53]][_0x341e[52]]),0,_0x89ddx29[_0x341e[44]])})[_0x341e[51]](function(){return close(_0x89ddx2b)})[_0x341e[51]](function(){console[_0x341e[50]](_0x341e[47],_0x89ddx29[_0x341e[48]],_0x341e[49])})[_0x341e[29]](function(_0x89ddx24){console[_0x341e[28]](_0x89ddx24)}))})};return Promise[_0x341e[64]](_0x89ddx26)})[_0x341e[29]](function(_0x89ddx24){console[_0x341e[28]](_0x89ddx24)})}}function handleState(_0x89ddx36,_0x89ddx37){return ms[_0x341e[81]](_0x89ddx36)[_0x341e[51]](function(_0x89ddx38){return _0x89ddx38[_0x341e[71]]({state:_0x89ddx37[_0x341e[89]],source:_0x89ddx37[_0x341e[90]]|| null})})[_0x341e[29]](function(_0x89ddx24){console[_0x341e[28]](_0x89ddx24)})}function fork(_0x89ddx36,_0x89ddx3a){return cp[_0x341e[98]](__dirname+ _0x341e[97],[_0x89ddx36,_0x89ddx3a])[_0x341e[91]](_0x341e[93],function(_0x89ddx37){switch(_0x89ddx37[_0x341e[96]]){case _0x341e[94]:handleMessage(_0x89ddx37);break;case _0x341e[89]:console[_0x341e[50]](_0x341e[95],_0x89ddx36,_0x89ddx37);handleState(_0x89ddx36,_0x89ddx37);break;default:}})[_0x341e[91]](_0x341e[22],function(_0x89ddx3b){console[_0x341e[50]](util[_0x341e[34]](_0x341e[92],_0x89ddx3a,_0x89ddx3b))})[_0x341e[91]](_0x341e[28],function(_0x89ddx24){console[_0x341e[28]](_0x89ddx24)})}function execRequest(_0x89ddx3d,_0x89ddx3e,_0x89ddx3f){Util[_0x341e[101]](_0x89ddx3d,_0x89ddx3e,_0x89ddx3f)[_0x341e[51]](function(_0x89ddx40){console[_0x341e[50]](_0x341e[100])})[_0x341e[29]](function(_0x89ddx24){console[_0x341e[50]](_0x341e[99])})}function webhook(_0x89ddx3d,_0x89ddx42,_0x89ddx43){var _0x89ddx44=_0x89ddx42;switch(_0x89ddx43){case _0x341e[109]:if(_0x89ddx44[_0x341e[102]]&& _0x89ddx44[_0x341e[103]]){console[_0x341e[50]](_0x341e[104]+ _0x89ddx44[_0x341e[36]]+ _0x341e[105]);execRequest(_0x89ddx3d[_0x341e[41]],_0x89ddx44[_0x341e[102]],_0x89ddx44[_0x341e[103]])};if(_0x89ddx44[_0x341e[106]][_0x341e[44]]){_[_0x341e[63]](_0x89ddx44[_0x341e[106]],function(_0x89ddx45){if(_0x89ddx45[_0x341e[107]]){Util[_0x341e[108]](_0x89ddx45,_0x89ddx3d)}})};break;case _0x341e[113]:if(_0x89ddx44[_0x341e[110]]&& _0x89ddx44[_0x341e[111]]){console[_0x341e[50]](_0x341e[104]+ _0x89ddx44[_0x341e[36]]+ _0x341e[112]);execRequest(_0x89ddx3d[_0x341e[41]],_0x89ddx44[_0x341e[110]],_0x89ddx44[_0x341e[111]])};break;case _0x341e[22]:if(_0x89ddx44[_0x341e[114]]&& _0x89ddx44[_0x341e[115]]){console[_0x341e[50]](_0x341e[104]+ _0x89ddx44[_0x341e[36]]+ _0x341e[116]);execRequest(_0x89ddx3d[_0x341e[41]],_0x89ddx44[_0x341e[114]],_0x89ddx44[_0x341e[115]])};break;default:console[_0x341e[50]](_0x341e[117])}}function synch(mailaccounts){Account[_0x341e[119]](function(_0x89ddx3d){_[_0x341e[118]](mailaccounts,{id:_0x89ddx3d[_0x341e[33]]})});Account[_0x341e[122]](function(_0x89ddx3d){console[_0x341e[50]](_0x341e[120]+ _0x89ddx3d[_0x341e[36]]+ _0x341e[121]);mailaccounts[_0x341e[62]](_0x89ddx3d)});Account[_0x341e[127]](function(_0x89ddx3d){var _0x89ddx47=_[_0x341e[123]](mailaccounts,{id:_0x89ddx3d[_0x341e[33]]});if(_0x89ddx47){console[_0x341e[50]](_0x341e[120]+ _0x89ddx47[_0x341e[36]]+ _0x341e[124]);_[_0x341e[125]](_0x89ddx47,_0x89ddx3d)}else {mailaccounts[_0x341e[126]](_0x89ddx3d)}})}module[_0x341e[128]]= function(){var _0x89ddx48={};var _0x89ddx49;process[_0x341e[91]](_0x341e[129],function(_0x89ddx3b){for(var _0x89ddx4a in _0x89ddx48){if(_0x89ddx48[_0x89ddx4a]){_0x89ddx48[_0x89ddx4a][_0x341e[130]]()}}});Account[_0x341e[136]]()[_0x341e[51]](function(_0x89ddx4b){mailaccounts= _0x89ddx4b;synch(mailaccounts);ReportMail[_0x341e[127]](function(_0x89ddx3d){var _0x89ddx42=_[_0x341e[123]](mailaccounts,{id:parseInt(_0x89ddx3d[_0x341e[131]])});if(_0x89ddx42&& _0x89ddx3d[_0x341e[133]](_0x341e[132])){webhook(_0x89ddx3d,_0x89ddx42,_0x341e[109])};if(_0x89ddx42&& _0x89ddx3d[_0x341e[133]](_0x341e[134])){webhook(_0x89ddx3d,_0x89ddx42,_0x341e[113])}});Room[_0x341e[127]](function(_0x89ddx3d){var _0x89ddx42=_[_0x341e[123]](mailaccounts,{id:_0x89ddx3d[_0x341e[135]]});if(_0x89ddx42&& _0x89ddx3d[_0x341e[133]](_0x341e[72])&& _0x89ddx3d[_0x341e[72]]=== _0x341e[73]){webhook(_0x89ddx3d,_0x89ddx42,_0x341e[22])}})})[_0x341e[29]](function(_0x89ddx24){console[_0x341e[28]](_0x89ddx24)});ms[_0x341e[122]](function(_0x89ddx38){_0x89ddx48[_0x89ddx38[_0x341e[33]]]= fork(_0x89ddx38[_0x341e[33]],_0x89ddx38[_0x341e[137]])});ms[_0x341e[127]](function(_0x89ddx38){if(_0x89ddx48[_0x89ddx38[_0x341e[33]]]){if(_0x89ddx38[_0x341e[133]](_0x341e[89])|| _0x89ddx38[_0x341e[133]](_0x341e[90])){console[_0x341e[50]](util[_0x341e[34]](_0x341e[138],_0x89ddx38[_0x341e[33]],_0x89ddx48[_0x89ddx38[_0x341e[33]]][_0x341e[139]]));clearTimeout(_0x89ddx49);switch(_0x89ddx38[_0x341e[89]]){case _0x341e[140]:_0x89ddx49= setTimeout(function(){_0x89ddx48[_0x89ddx38[_0x341e[33]]]= fork(_0x89ddx38[_0x341e[33]],_0x89ddx38[_0x341e[137]])},10000);break;default:}}else {_0x89ddx48[_0x89ddx38[_0x341e[33]]][_0x341e[130]]();_0x89ddx48[_0x89ddx38[_0x341e[33]]]= null;_0x89ddx48[_0x89ddx38[_0x341e[33]]]= fork(_0x89ddx38[_0x341e[33]],_0x89ddx38[_0x341e[137]])}}});ms[_0x341e[119]](function(_0x89ddx38){if(_0x89ddx48[_0x89ddx38[_0x341e[33]]]){console[_0x341e[50]](util[_0x341e[34]](_0x341e[141],_0x89ddx38[_0x341e[33]],_0x89ddx48[_0x89ddx38[_0x341e[33]]][_0x341e[139]]));_0x89ddx48[_0x89ddx38[_0x341e[33]]][_0x341e[130]]();_0x89ddx48[_0x89ddx38[_0x341e[33]]]= null}});ms[_0x341e[136]]()[_0x341e[51]](function(_0x89ddx4c){_0x89ddx4c[_0x341e[63]](function(_0x89ddx38){_0x89ddx48[_0x89ddx38[_0x341e[33]]]= fork(_0x89ddx38[_0x341e[33]],_0x89ddx38[_0x341e[137]])})})[_0x341e[29]](function(_0x89ddx24){console[_0x341e[28]](_0x89ddx24)})} \ No newline at end of file +'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); + }); +}; diff --git a/server/config/integration.js b/server/config/integration.js index e8af7b6..8b87bc5 100644 --- a/server/config/integration.js +++ b/server/config/integration.js @@ -1 +1,24 @@ -var _0x1f5d=["\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"];_0x1f5d[0];var path=require(_0x1f5d[1]);var fs=require(_0x1f5d[2]);var Integration=require(_0x1f5d[4])[_0x1f5d[3]];module[_0x1f5d[5]]= function(_0xa82ex4,_0xa82ex5){Integration[_0x1f5d[16]]()[_0x1f5d[15]](function(_0xa82ex7){_0xa82ex7[_0x1f5d[14]](function(_0xa82ex8){var _0xa82ex9=path[_0x1f5d[8]](_0xa82ex8[_0x1f5d[1]]);var _0xa82exa=path[_0x1f5d[12]](_0xa82ex9[_0x1f5d[9]],_0xa82ex9[_0x1f5d[10]],_0xa82ex8[_0x1f5d[11]]);if(fs[_0x1f5d[13]](_0xa82exa)){require(_0xa82exa)(_0xa82ex4,_0xa82ex5)}})})[_0x1f5d[7]](function(_0xa82ex6){console[_0x1f5d[6]](_0xa82ex6)})} \ No newline at end of file +'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); + }); +}; diff --git a/server/config/integrations/index.js b/server/config/integrations/index.js index e325e01..1fa5f58 100644 --- a/server/config/integrations/index.js +++ b/server/config/integrations/index.js @@ -1 +1,87 @@ -var _0xb802=["\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","\x76\x61\x72\x73\x65\x74","\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","\x70\x75\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x73\x68\x69\x66\x74","\x6F\x6E","\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","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\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","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\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","\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","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xb802[0];var _=require(_0xb802[1]);var IntegrationModel=require(_0xb802[3])[_0xb802[2]];var Variable=require(_0xb802[3])[_0xb802[4]];var Zendesk=require(_0xb802[5]);var Salesforce=require(_0xb802[6]);var Motionbar=require(_0xb802[7]);var MAX_CALLS=200;function Integration(_0x1f79x9){console[_0xb802[9]](_0xb802[8]);var _0x1f79xa= new Zendesk();var _0x1f79xb= new Salesforce();var _0x1f79xc= new Motionbar();var _0x1f79xd=[];var _0x1f79xe=[];var _0x1f79xf=[];_0x1f79x9[_0xb802[24]](_0xb802[10],function(_0x1f79x10){if(_0x1f79x10[_0xb802[12]](_0xb802[11])&& _0x1f79x10[_0xb802[12]](_0xb802[13])){var _0x1f79x11=_[_0xb802[18]](_0x1f79xe,function(_0x1f79x12){return (_0x1f79x12[_0xb802[14]]=== _[_0xb802[16]](_[_0xb802[15]](_0x1f79x10[_0xb802[11]])))|| (_[_0xb802[17]](_0x1f79x12[_0xb802[14]])=== _[_0xb802[16]](_[_0xb802[15]](_0x1f79x10[_0xb802[11]])))});if(_0x1f79x11){var _0x1f79x13=_[_0xb802[18]](_0x1f79xf,function(_0x1f79x12){return _0x1f79x12[_0xb802[19]]=== _0x1f79x10[_0xb802[19]]});if(_0x1f79x13){_0x1f79x13[_0xb802[21]][_0xb802[20]]({name:_0x1f79x11[_0xb802[14]],value:_0x1f79x10[_0xb802[13]]})}else {if(_0x1f79xf[_0xb802[22]]>= MAX_CALLS){_0x1f79xf[_0xb802[23]]()};var _0x1f79x14={uniqueid:_0x1f79x10[_0xb802[19]],variables:[{name:_0x1f79x11[_0xb802[14]],value:_0x1f79x10[_0xb802[13]]}]};_0x1f79xf[_0xb802[20]](_0x1f79x14)}}}});Variable[_0xb802[26]]()[_0xb802[25]](function(_0x1f79x15){_0x1f79xe= _0x1f79x15;synchVariables(_0x1f79xe)});IntegrationModel[_0xb802[26]]({where:{active:1}})[_0xb802[25]](function(_0x1f79x16){_0x1f79xd= _0x1f79x16;synchIntegrations(_0x1f79xd)});this[_0xb802[27]]= function(_0x1f79x17,_0x1f79x18,_0x1f79x19,_0x1f79x1a){var _0x1f79x13=_[_0xb802[18]](_0x1f79xf,function(_0x1f79x12){return _0x1f79x12[_0xb802[19]]=== _0x1f79x18[_0xb802[19]]});var _0x1f79x15=_0x1f79x13?_0x1f79x13[_0xb802[21]]:[];if(integrationIsActive(_0x1f79x17[_0xb802[28]],_0x1f79xd)){switch(_0x1f79x17[_0xb802[28]]){case _0xb802[32]:_0x1f79xa[_0xb802[31]](_0x1f79x17[_0xb802[29]],_0x1f79x17[_0xb802[30]],_0x1f79x19,_0x1f79x1a,_0x1f79x18,_0x1f79x15);break;case _0xb802[33]:_0x1f79xb[_0xb802[31]](_0x1f79x17[_0xb802[29]],_0x1f79x17[_0xb802[30]],_0x1f79x19,_0x1f79x1a,_0x1f79x18,_0x1f79x15);break;default:console[_0xb802[9]](_0xb802[34],_0x1f79x17[_0xb802[28]])}};if(_0x1f79x17[_0xb802[35]]=== _0xb802[36]){_0x1f79xc[_0xb802[31]](_0x1f79x17,_0x1f79x19,_0x1f79x18,_0x1f79x15)}}}function integrationIsActive(_0x1f79x1c,_0x1f79x1d){var _0x1f79x1e=_[_0xb802[38]](_0x1f79x1d,_0xb802[37]);if(_[_0xb802[39]](_0x1f79x1e,_0x1f79x1c)>= 0){return true};return false}function synchIntegrations(_0x1f79x1d){IntegrationModel[_0xb802[44]](function(_0x1f79x18){if(_0x1f79x18[_0xb802[40]]){updateCollection(_0x1f79x1d,_0x1f79x18)}else {_[_0xb802[42]](_0x1f79x1d,{id:_0x1f79x18[_0xb802[41]]})};console[_0xb802[9]](_0xb802[43],_0x1f79x1d[_0xb802[22]])})}function synchVariables(_0x1f79x1d){Variable[_0xb802[46]](function(_0x1f79x18){updateCollection(_0x1f79x1d,_0x1f79x18);console[_0xb802[9]](_0xb802[45],_0x1f79x1d[_0xb802[22]])});Variable[_0xb802[44]](function(_0x1f79x18){updateCollection(_0x1f79x1d,_0x1f79x18);console[_0xb802[9]](_0xb802[47],_0x1f79x1d[_0xb802[22]])});Variable[_0xb802[49]](function(_0x1f79x18){_[_0xb802[42]](_0x1f79x1d,{id:_0x1f79x18[_0xb802[41]]});console[_0xb802[9]](_0xb802[48],_0x1f79x1d[_0xb802[22]])})}function updateCollection(_0x1f79x22,_0x1f79x18){var _0x1f79x23=_[_0xb802[18]](_0x1f79x22,{id:_0x1f79x18[_0xb802[41]]});var _0x1f79x24=_0x1f79x22[_0xb802[39]](_0x1f79x23);if(_0x1f79x23){_[_0xb802[50]](_0x1f79x22[_0x1f79x24],_0x1f79x18)}else {_0x1f79x22[_0xb802[51]](_0x1f79x18)}}module[_0xb802[52]]= Integration \ No newline at end of file +'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(ami) { + 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; diff --git a/server/config/integrations/motionbar.js b/server/config/integrations/motionbar.js index bf2bf6a..a8e6195 100644 --- a/server/config/integrations/motionbar.js +++ b/server/config/integrations/motionbar.js @@ -1 +1,101 @@ -var _0x1473=["\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","\x6E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x72\x65\x64\x75\x63\x65","\x69\x64","\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"];_0x1473[0];var _=require(_0x1473[1]);var util=require(_0x1473[2]);var Mustache=require(_0x1473[3]);var ReportIntegration=require(_0x1473[5])[_0x1473[4]];var Template=require(_0x1473[5])[_0x1473[6]];function Motionbar(){console[_0x1473[8]](_0x1473[7])}Motionbar[_0x1473[10]][_0x1473[9]]= function(_0x1130x7,_0x1130x8,_0x1130x9,_0x1130xa){if(!_0x1130x7[_0x1473[11]]|| !_0x1130x7[_0x1473[12]]){console[_0x1473[14]](_0x1473[13]);return};_0x1130xa= _[_0x1473[17]](_0x1130xa,function(_0x1130xb,_0x1130xc,_0x1130xd){_0x1130xb[_0x1130xc[_0x1473[15]]]= _0x1130xc[_0x1473[16]];return _0x1130xb},{});delete _0x1130x9[_0x1473[18]];var _0x1130xe=_[_0x1473[19]](_0x1130x9,_0x1130xa);console[_0x1473[8]](_0x1473[20],_0x1130x7[_0x1473[11]]);switch(_0x1130x7[_0x1473[11]]){case _0x1473[37]:return Template[_0x1473[36]](_0x1130x7[_0x1473[12]])[_0x1473[23]](function(_0x1130xf){_0x1130x9[_0x1473[24]]= _0x1130xf[_0x1473[24]]?Mustache[_0x1473[25]](_0x1130xf[_0x1473[24]],_0x1130xe):_0x1473[26];_0x1130x9[_0x1473[27]]= _0x1130xf[_0x1473[27]]?Mustache[_0x1473[25]](_0x1130xf[_0x1473[27]].toString(),_0x1130xe):_0x1473[28];_0x1130x9[_0x1473[29]]= _0x1473[30];_0x1130x9[_0x1473[31]]= _0x1130x8;_0x1130x9[_0x1473[32]]= _0x1473[33];_0x1130x9[_0x1473[34]]= _0x1130x7[_0x1473[11]];return ReportIntegration[_0x1473[35]](_0x1130x9)})[_0x1473[23]](function(){console[_0x1473[8]](_0x1473[22])})[_0x1473[21]](handleError(_0x1130x8,_0x1130x9,_0x1130x7[_0x1473[11]]));case _0x1473[41]:_0x1130x9[_0x1473[38]]= _0x1130x7[_0x1473[12]]?Mustache[_0x1473[25]](_0x1130x7[_0x1473[12]],_0x1130xe):_0x1473[39];_0x1130x9[_0x1473[29]]= _0x1473[30];_0x1130x9[_0x1473[31]]= _0x1130x8;_0x1130x9[_0x1473[32]]= _0x1473[33];_0x1130x9[_0x1473[34]]= _0x1130x7[_0x1473[11]];return ReportIntegration[_0x1473[35]](_0x1130x9)[_0x1473[23]](function(){console[_0x1473[8]](_0x1473[40])})[_0x1473[21]](handleError(_0x1130x8,_0x1130x9,_0x1130x7[_0x1473[11]]));case _0x1473[47]:_0x1130x9[_0x1473[42]]= _0x1130x7[_0x1473[12]];_0x1130x9[_0x1473[43]]= _0x1130x7[_0x1473[44]]?Mustache[_0x1473[25]](_0x1130x7[_0x1473[44]],_0x1130xe):_0x1473[45];_0x1130x9[_0x1473[29]]= _0x1473[30];_0x1130x9[_0x1473[31]]= _0x1130x8;_0x1130x9[_0x1473[32]]= _0x1473[33];_0x1130x9[_0x1473[34]]= _0x1130x7[_0x1473[11]];return ReportIntegration[_0x1473[35]](_0x1130x9)[_0x1473[23]](function(){console[_0x1473[8]](_0x1473[46])})[_0x1473[21]](handleError(_0x1130x8,_0x1130x9,_0x1130x7[_0x1473[11]]));default:console[_0x1473[8]](_0x1473[48],_0x1130x7[_0x1473[11]])}};function handleError(_0x1130x8,_0x1130x9,_0x1130x11){return function(_0x1130x12){console[_0x1473[14]](_0x1473[49]);console[_0x1473[14]](_0x1473[50],_0x1130x12[_0x1473[51]]);console[_0x1473[14]](_0x1473[52],_0x1130x12[_0x1473[53]]);_0x1130x9[_0x1473[29]]= _0x1473[30];_0x1130x9[_0x1473[31]]= _0x1130x8;_0x1130x9[_0x1473[32]]= _0x1473[54];_0x1130x9[_0x1473[34]]= _0x1130x11;ReportIntegration[_0x1473[35]](_0x1130x9)[_0x1473[23]](function(){return})[_0x1473[21]](function(_0x1130x12){console[_0x1473[14]](_0x1473[55]);return})}}module[_0x1473[56]]= Motionbar \ No newline at end of file +'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; diff --git a/server/config/integrations/salesforce.js b/server/config/integrations/salesforce.js index 0ee9a8d..ae05aa5 100644 --- a/server/config/integrations/salesforce.js +++ b/server/config/integrations/salesforce.js @@ -1 +1,583 @@ -var _0xe912=["\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"];_0xe912[0];var _=require(_0xe912[1]);var util=require(_0xe912[2]);var jsforce=require(_0xe912[3]);var moment=require(_0xe912[4]);var SalesforceIntegration=require(_0xe912[6])[_0xe912[5]];var SalesforceConfiguration=require(_0xe912[6])[_0xe912[7]];var ReportIntegration=require(_0xe912[6])[_0xe912[8]];var VoiceQueue=require(_0xe912[6])[_0xe912[9]];var VoiceExtension=require(_0xe912[6])[_0xe912[10]];function Salesforce(){console[_0xe912[12]](_0xe912[11])}Salesforce[_0xe912[14]][_0xe912[13]]= function(_0xe4adxb,_0xe4adxc,_0xe4adxd,_0xe4adxe,_0xe4adxf,_0xe4adx10){var _0xe4adx11={connection:undefined,configuration:undefined,agent:undefined,enduser:undefined,taskId:undefined,recordEnable:false,serverURL:undefined};if(!_0xe4adxb|| !_0xe4adxc){console[_0xe912[16]](_0xe912[15]);return};SalesforceConfiguration[_0xe912[19]]({where:{id:_0xe4adxc,AccountId:_0xe4adxb},include:[{all:true,include:[{all:true}]}]})[_0xe912[18]](handleEntityNotFound())[_0xe912[18]](handleConnection(_0xe4adx11))[_0xe912[18]](searchQueue(_0xe4adxf))[_0xe912[18]](handleQueueRecordings(_0xe4adx11,_0xe4adxf))[_0xe912[18]](searchRoute(_0xe4adxf))[_0xe912[18]](handleOutboundRecordings(_0xe4adx11,_0xe4adxf))[_0xe912[18]](searchAgent(_0xe4adx11,_0xe4adxd,_0xe4adxf))[_0xe912[18]](handleAgent(_0xe4adx11,_0xe4adxd,_0xe4adxf))[_0xe912[18]](searchAdmin(_0xe4adx11))[_0xe912[18]](handleAdmin(_0xe4adx11))[_0xe912[18]](searchContact(_0xe4adx11,_0xe4adxd,_0xe4adxf,_0xe4adxe))[_0xe912[18]](handleContact(_0xe4adx11,_0xe4adxd,_0xe4adxf,_0xe4adxe))[_0xe912[18]](searchLead(_0xe4adx11,_0xe4adxd,_0xe4adxf,_0xe4adxe))[_0xe912[18]](handleLead(_0xe4adx11,_0xe4adxd,_0xe4adxf,_0xe4adxe))[_0xe912[18]](leadCreation(_0xe4adx11,_0xe4adxd,_0xe4adxf,_0xe4adxe))[_0xe912[18]](handleLeadCreation(_0xe4adx11,_0xe4adxd,_0xe4adxf,_0xe4adxe))[_0xe912[18]](taskCreation(_0xe4adx11,_0xe4adxf,_0xe4adx10))[_0xe912[18]](handleTaskDisplay(_0xe4adx11))[_0xe912[18]](handleReportIntegration(_0xe4adx11,_0xe4adxd,_0xe4adxf,_0xe4adxb))[_0xe912[18]](handleEnd(_0xe4adx11))[_0xe912[17]](handleError(_0xe4adx11,_0xe4adxd,_0xe4adxf,_0xe4adxb))};function handleEntityNotFound(){return function(_0xe4adx13){if(!_0xe4adx13){return null};return _0xe4adx13}}function handleConnection(_0xe4adx11){return function(_0xe4adx15){_0xe4adx11[_0xe912[20]]= new jsforce.Connection({oauth2:{loginUrl:_0xe4adx15[_0xe912[22]][_0xe912[21]]?_0xe4adx15[_0xe912[22]][_0xe912[21]]:_0xe912[23],clientId:_0xe4adx15[_0xe912[22]][_0xe912[24]],clientSecret:_0xe4adx15[_0xe912[22]][_0xe912[25]]}});var _0xe4adx16=_0xe4adx15[_0xe912[22]][_0xe912[28]][_0xe912[27]](_0xe4adx15[_0xe912[22]][_0xe912[26]]);_0xe4adx11[_0xe912[29]]= _0xe4adx15;_0xe4adx11[_0xe912[30]]= _0xe4adx15[_0xe912[22]][_0xe912[31]];return _0xe4adx11[_0xe912[20]][_0xe912[33]](_0xe4adx15[_0xe912[22]][_0xe912[32]],_0xe4adx16)}}function searchQueue(_0xe4adxf){return function(){if(_0xe4adxf[_0xe912[34]]){return VoiceQueue[_0xe912[37]]({where:{name:_0xe4adxf[_0xe912[34]]},attributes:[_0xe912[35],_0xe912[36]]})}else {return}}}function handleQueueRecordings(_0xe4adx11,_0xe4adxf){return function(_0xe4adx19){if(_0xe4adxf[_0xe912[34]]){if(_0xe4adx19&& _0xe4adx19[_0xe912[36]]){console[_0xe912[12]](_0xe912[38],_0xe4adx19[_0xe912[35]]);_0xe4adx11[_0xe912[39]]= true}else {_0xe4adx11[_0xe912[39]]= false;console[_0xe912[12]](_0xe912[40])}};return}}function searchRoute(_0xe4adxf){return function(){if(_0xe4adxf[_0xe912[41]]){return VoiceExtension[_0xe912[37]]({where:{id:_0xe4adxf[_0xe912[41]]},attributes:[_0xe912[42],_0xe912[43]]})}else {return}}}function handleOutboundRecordings(_0xe4adx11,_0xe4adxf){return function(_0xe4adx1c){if(_0xe4adxf[_0xe912[41]]){if(_0xe4adx1c&& _0xe4adx1c[_0xe912[43]]){console[_0xe912[12]](_0xe912[44],_0xe4adx1c[_0xe912[42]]);_0xe4adx11[_0xe912[39]]= true}else {_0xe4adx11[_0xe912[39]]= false;console[_0xe912[12]](_0xe912[45])}};return}}function searchAgent(_0xe4adx11,_0xe4adxd,_0xe4adxf){return function(){console[_0xe912[12]](_0xe912[46],getValueFromPropertyName(_0xe4adxf,getAgentSearchPropertyFromChannel(_0xe4adxd)));return _0xe4adx11[_0xe912[20]][_0xe912[49]](_0xe912[48])[_0xe912[19]]({Name:getValueFromPropertyName(_0xe4adxf,getAgentSearchPropertyFromChannel(_0xe4adxd))},{Id:1,Username:1,Name:1})[_0xe912[47]]()}}function getAgentSearchPropertyFromChannel(_0xe4adxd){var _0xe4adx1f=_0xe912[50];if(_0xe4adxd){switch(_0xe4adxd){case _0xe912[52]:_0xe4adx1f= _0xe912[51];break;default:_0xe4adx1f= _0xe912[51];console[_0xe912[16]](_0xe912[53],_0xe4adxd)}};return _0xe4adx1f}function getValueFromPropertyName(_0xe4adxf,_0xe4adx1f,_0xe4adx11){if(_0xe4adx1f=== _0xe912[54]){if(_0xe4adx11&& _0xe4adx11[_0xe912[39]]&& _0xe4adx11[_0xe912[30]]){return util[_0xe912[57]](_0xe912[55],stripTrailingSlash(_0xe4adx11[_0xe912[30]]),_0xe4adxf[_0xe912[56]])}else {return null}}else {return _[_0xe912[58]](_0xe4adxf,_0xe4adx1f)}}function handleAgent(_0xe4adx11,_0xe4adxd,_0xe4adx22){return function(_0xe4adxf){if(_0xe4adxf[_0xe912[59]]> 0){console[_0xe912[12]](_0xe912[60],getValueFromPropertyName(_0xe4adx22,getAgentSearchPropertyFromChannel(_0xe4adxd)));_0xe4adx11[_0xe912[61]]= getMatchObject(_0xe4adxf,_0xe912[62],getValueFromPropertyName(_0xe4adx22,getAgentSearchPropertyFromChannel(_0xe4adxd)));return _0xe4adx11[_0xe912[61]]};return}}function getMatchObject(_0xe4adx24,_0xe4adx1f,_0xe4adx25){var _0xe4adx26=_[_0xe912[19]](_0xe4adx24,{property:_0xe4adx25});if(_0xe4adx26){return _0xe4adx26};return _[_0xe912[63]](_0xe4adx24)}function searchAdmin(_0xe4adx11){return function(_0xe4adxf){if(_0xe4adxf){return};console[_0xe912[12]](_0xe912[64]);return _0xe4adx11[_0xe912[20]][_0xe912[65]]()}}function handleAdmin(_0xe4adx11){return function(_0xe4adxf){if(!_0xe4adxf){return};if(_0xe4adxf){console[_0xe912[12]](_0xe912[66]);_0xe4adx11[_0xe912[61]]= {Id:_0xe4adxf[_0xe912[67]],Name:_0xe4adxf[_0xe912[68]],Username:_0xe4adxf[_0xe912[32]]}};return}}function searchContact(_0xe4adx11,_0xe4adxd,_0xe4adxf,_0xe4adxe){return function(){console[_0xe912[12]](_0xe912[69],getValueFromPropertyName(_0xe4adxf,getEndUserSearchPropertyFromChannel(_0xe4adxd,_0xe4adxe)));var _0xe4adx2a={};_0xe4adx2a[getEndUserSearchQueryFromChannel(_0xe4adxd)]= getValueFromPropertyName(_0xe4adxf,getEndUserSearchPropertyFromChannel(_0xe4adxd,_0xe4adxe));return _0xe4adx11[_0xe912[20]][_0xe912[49]](_0xe912[70])[_0xe912[19]](_0xe4adx2a,{Id:1,Name:1})[_0xe912[47]]()}}function getEndUserSearchQueryFromChannel(_0xe4adxd){var _0xe4adx1f=_0xe912[50];if(_0xe4adxd){switch(_0xe4adxd){case _0xe912[52]:_0xe4adx1f= _0xe912[71];break;default:_0xe4adx1f= _0xe912[71];console[_0xe912[16]](_0xe912[53],_0xe4adxd)}};return _0xe4adx1f}function getEndUserSearchPropertyFromChannel(_0xe4adxd,_0xe4adxe){var _0xe4adx1f=_0xe912[50];if(_0xe4adxd){switch(_0xe4adxd){case _0xe912[52]:if(_0xe4adxe=== _0xe912[72]){_0xe4adx1f= _0xe912[73]}else {if(_0xe4adxe=== _0xe912[34]){_0xe4adx1f= _0xe912[74]}};break;default:_0xe4adx1f= _0xe912[74];console[_0xe912[16]](_0xe912[53],_0xe4adxd)}};return _0xe4adx1f}function getEndUserNamePropertyFromChannel(_0xe4adxd,_0xe4adxe){var _0xe4adx1f=_0xe912[50];if(_0xe4adxd){switch(_0xe4adxd){case _0xe912[52]:if(_0xe4adxe=== _0xe912[72]){_0xe4adx1f= _0xe912[75]}else {if(_0xe4adxe=== _0xe912[34]){_0xe4adx1f= _0xe912[76]}};break;default:_0xe4adx1f= _0xe912[76];console[_0xe912[16]](_0xe912[53],_0xe4adxd)}};return _0xe4adx1f}function handleContact(_0xe4adx11,_0xe4adxd,_0xe4adx22,_0xe4adxe){return function(_0xe4adxf){if(_0xe4adxf[_0xe912[59]]> 0){console[_0xe912[12]](_0xe912[77],getValueFromPropertyName(_0xe4adx22,getEndUserSearchPropertyFromChannel(_0xe4adxd,_0xe4adxe)));_0xe4adx11[_0xe912[78]]= _0xe4adxf[0];return _0xe4adx11[_0xe912[78]]};console[_0xe912[12]](_0xe912[79],getValueFromPropertyName(_0xe4adx22,getEndUserSearchPropertyFromChannel(_0xe4adxd,_0xe4adxe)));return}}function searchLead(_0xe4adx11,_0xe4adxd,_0xe4adx22,_0xe4adxe){return function(_0xe4adxf){if(!_0xe4adxf){console[_0xe912[12]](_0xe912[80],getValueFromPropertyName(_0xe4adx22,getEndUserSearchPropertyFromChannel(_0xe4adxd,_0xe4adxe)));var _0xe4adx2a={};_0xe4adx2a[getEndUserSearchQueryFromChannel(_0xe4adxd)]= getValueFromPropertyName(_0xe4adx22,getEndUserSearchPropertyFromChannel(_0xe4adxd,_0xe4adxe));return _0xe4adx11[_0xe912[20]][_0xe912[49]](_0xe912[81])[_0xe912[19]](_0xe4adx2a,{Id:1,Name:1})[_0xe912[47]]()};return}}function handleLead(_0xe4adx11,_0xe4adxd,_0xe4adx22,_0xe4adxe){return function(_0xe4adxf){if(_0xe4adxf&& _0xe4adxf[_0xe912[59]]> 0){console[_0xe912[12]](_0xe912[82],getValueFromPropertyName(_0xe4adx22,getEndUserSearchPropertyFromChannel(_0xe4adxd,_0xe4adxe)));_0xe4adx11[_0xe912[78]]= _0xe4adxf[0];return _0xe4adx11[_0xe912[78]]};return}}function leadCreation(_0xe4adx11,_0xe4adxd,_0xe4adx22,_0xe4adxe){return function(_0xe4adxf){if(_0xe4adxf|| _0xe4adx11[_0xe912[78]]){return};console[_0xe912[12]](_0xe912[83],getValueFromPropertyName(_0xe4adx22,getEndUserSearchPropertyFromChannel(_0xe4adxd,_0xe4adxe)));return _0xe4adx11[_0xe912[20]][_0xe912[49]](_0xe912[81])[_0xe912[84]](getJsonForEndUserCreation(_0xe4adxd,_0xe4adx22,_0xe4adxe))}}function getJsonForEndUserCreation(_0xe4adxd,_0xe4adxf,_0xe4adxe){var _0xe4adx33={Company:_0xe912[85]};switch(_0xe4adxd){case _0xe912[52]:if(_0xe4adxe=== _0xe912[34]){if(isValidName(_0xe4adxf[_0xe912[76]])){_0xe4adx33[_0xe912[86]]= getValueFromPropertyName(_0xe4adxf,getEndUserNamePropertyFromChannel(_0xe4adxd,_0xe4adxe))}else {_0xe4adx33[_0xe912[86]]= util[_0xe912[57]](_0xe912[87],getValueFromPropertyName(_0xe4adxf,getEndUserSearchPropertyFromChannel(_0xe4adxd,_0xe4adxe)))}}else {if(_0xe4adxe=== _0xe912[72]){if(isValidName(_0xe4adxf[_0xe912[75]])){_0xe4adx33[_0xe912[86]]= getValueFromPropertyName(_0xe4adxf,getEndUserNamePropertyFromChannel(_0xe4adxd,_0xe4adxe))}else {_0xe4adx33[_0xe912[86]]= util[_0xe912[57]](_0xe912[87],getValueFromPropertyName(_0xe4adxf,getEndUserSearchPropertyFromChannel(_0xe4adxd,_0xe4adxe)))}}};_0xe4adx33[_0xe912[71]]= getValueFromPropertyName(_0xe4adxf,getEndUserSearchPropertyFromChannel(_0xe4adxd,_0xe4adxe));break;default:console[_0xe912[16]](_0xe912[53],_0xe4adxd)};return _0xe4adx33}function isValidName(_0xe4adx35){return _0xe4adx35&& _0xe4adx35!== _0xe912[88]}function handleLeadCreation(_0xe4adx11,_0xe4adxd,_0xe4adx22,_0xe4adxe){return function(_0xe4adxf){if(!_0xe4adxf){return};if(_0xe4adxf&& _0xe4adxf[_0xe912[89]]){console[_0xe912[12]](_0xe912[90],getValueFromPropertyName(_0xe4adx22,getEndUserSearchPropertyFromChannel(_0xe4adxd,_0xe4adxe)));_0xe4adx11[_0xe912[78]]= {Id:_0xe4adxf[_0xe912[42]]}};return}}function taskCreation(_0xe4adx11,_0xe4adx22,_0xe4adx10){return function(){var _0xe4adx38={WhoId:_0xe4adx11[_0xe912[78]][_0xe912[91]],OwnerId:_0xe4adx11[_0xe912[61]][_0xe912[91]],ActivityDate:moment[_0xe912[92]](),IsReminderSet:false,IsRecurrence:false,Subject:createSubjectFromConfiguration(_0xe4adx11,_0xe4adx22,_0xe4adx10),Description:createDescriptionFromConfiguration(_0xe4adx11,_0xe4adx22,_0xe4adx10)};var _0xe4adx39=createCustomFieldsFromConfiguration(_0xe4adx11,_0xe4adx22,_0xe4adx10);if(_0xe4adx39[_0xe912[59]]> 0){_[_0xe912[94]](_0xe4adx39,function(_0xe4adx3a){_0xe4adx38[_0xe4adx3a[_0xe912[42]]]= _0xe4adx3a[_0xe912[93]]})};return _0xe4adx11[_0xe912[20]][_0xe912[49]](_0xe912[95])[_0xe912[84]](_0xe4adx38)}}function createSubjectFromConfiguration(_0xe4adx11,_0xe4adx22,_0xe4adx10){var _0xe4adx3c=_0xe912[50];var _0xe4adx3d=[];if(_0xe4adx11[_0xe912[29]][_0xe912[96]][_0xe912[59]]> 0){var _0xe4adx3e=_[_0xe912[97]](_0xe4adx11[_0xe912[29]].Subject,[_0xe912[42]]);_[_0xe912[94]](_0xe4adx3e,function(_0xe4adx3f){if(_0xe4adx3f[_0xe912[98]]=== _0xe912[99]){_0xe4adx3d[_0xe912[101]](_0xe4adx3f[_0xe912[100]])}else {if(_0xe4adx3f[_0xe912[98]]=== _0xe912[102]&& _0xe4adx3f[_0xe912[103]]){var _0xe4adx40=getValueFromPropertyName(_0xe4adx22,_0xe4adx3f[_0xe912[103]],_0xe4adx11);if(_0xe4adx40){_0xe4adx3d[_0xe912[101]](_0xe4adx40.toString())}}else {if(_0xe4adx3f[_0xe912[98]]=== _0xe912[104]){var _0xe4adx41=_[_0xe912[19]](_0xe4adx10,{"\x6E\x61\x6D\x65":_0xe4adx3f[_0xe912[105]][_0xe912[35]]});if(_0xe4adx41){_0xe4adx3d[_0xe912[101]](_0xe4adx41[_0xe912[93]].toString())}}}}});_0xe4adx3c= _0xe4adx3d[_0xe912[107]](_0xe912[106])};return _0xe4adx3c}function createDescriptionFromConfiguration(_0xe4adx11,_0xe4adx22,_0xe4adx10){var _0xe4adx43=_0xe912[50];var _0xe4adx3d=[];if(_0xe4adx11[_0xe912[29]][_0xe912[108]][_0xe912[59]]> 0){var _0xe4adx44=_[_0xe912[97]](_0xe4adx11[_0xe912[29]].Description,[_0xe912[42]]);_[_0xe912[94]](_0xe4adx44,function(_0xe4adx3f){if(_0xe4adx3f[_0xe912[98]]=== _0xe912[99]){_0xe4adx3d[_0xe912[101]](_0xe4adx3f[_0xe912[100]])}else {if(_0xe4adx3f[_0xe912[98]]=== _0xe912[109]){if(_0xe4adx3f[_0xe912[110]]=== _0xe912[99]){_0xe4adx3d[_0xe912[101]](util[_0xe912[57]](_0xe912[111],_0xe4adx3f[_0xe912[112]],_0xe4adx3f[_0xe912[113]]))}else {if(_0xe4adx3f[_0xe912[110]]=== _0xe912[102]&& _0xe4adx3f[_0xe912[103]]){var _0xe4adx40=getValueFromPropertyName(_0xe4adx22,_0xe4adx3f[_0xe912[103]],_0xe4adx11);if(_0xe4adx40){_0xe4adx3d[_0xe912[101]](util[_0xe912[57]](_0xe912[111],_0xe4adx3f[_0xe912[112]],_0xe4adx40.toString()))}}else {if(_0xe4adx3f[_0xe912[110]]=== _0xe912[104]){var _0xe4adx41=_[_0xe912[19]](_0xe4adx10,{"\x6E\x61\x6D\x65":_0xe4adx3f[_0xe912[105]][_0xe912[35]]});if(_0xe4adx41){_0xe4adx3d[_0xe912[101]](util[_0xe912[57]](_0xe912[111],_0xe4adx3f[_0xe912[112]],_0xe4adx41[_0xe912[93]].toString()))}}}}}}});_0xe4adx43= _0xe4adx3d[_0xe912[107]](_0xe912[114])};return _0xe4adx43}function createCustomFieldsFromConfiguration(_0xe4adx11,_0xe4adx22,_0xe4adx10){var _0xe4adx46=[];var _0xe4adx47=[];if(_0xe4adx11[_0xe912[29]][_0xe912[115]][_0xe912[59]]> 0){_0xe4adx46= _0xe4adx11[_0xe912[29]][_0xe912[115]];_[_0xe912[94]](_0xe4adx46,function(_0xe4adx3a){if(_0xe4adx3a[_0xe912[98]]=== _0xe912[99]){_0xe4adx47[_0xe912[101]]({id:_0xe4adx3a[_0xe912[116]],value:_0xe4adx3a[_0xe912[100]]})}else {if(_0xe4adx3a[_0xe912[98]]=== _0xe912[102]){var _0xe4adx40=getValueFromPropertyName(_0xe4adx22,_0xe4adx3a[_0xe912[103]],_0xe4adx11);if(_0xe4adx40){_0xe4adx47[_0xe912[101]]({id:_0xe4adx3a[_0xe912[116]],value:_0xe4adx40.toString()})}}else {if(_0xe4adx3a[_0xe912[98]]=== _0xe912[104]){var _0xe4adx41=_[_0xe912[19]](_0xe4adx10,{"\x6E\x61\x6D\x65":_0xe4adx3a[_0xe912[105]][_0xe912[35]]});if(_0xe4adx41){_0xe4adx47[_0xe912[101]]({id:_0xe4adx3a[_0xe912[116]],value:_0xe4adx41[_0xe912[93]].toString()})}}}}})};return _0xe4adx47}function handleTaskDisplay(_0xe4adx11){return function(_0xe4adxf){if(_0xe4adxf&& _0xe4adxf[_0xe912[89]]){console[_0xe912[12]](_0xe912[117],_0xe4adxf[_0xe912[42]]);_0xe4adx11[_0xe912[118]]= _0xe4adxf[_0xe912[42]];return};return}}function handleReportIntegration(_0xe4adx11,_0xe4adxd,_0xe4adxf,_0xe4adxb){return function(){delete _0xe4adxf[_0xe912[42]];_0xe4adxf[_0xe912[119]]= _0xe912[120];_0xe4adxf[_0xe912[121]]= _0xe4adxd;_0xe4adxf[_0xe912[122]]= _0xe912[89];_0xe4adxf[_0xe912[123]]= _0xe4adx11[_0xe912[118]];_0xe4adxf[_0xe912[124]]= _0xe4adxb;_0xe4adxf[_0xe912[125]]= util[_0xe912[57]](_0xe912[126],_0xe4adx11[_0xe912[20]][_0xe912[127]],_0xe4adx11[_0xe912[118]]);return ReportIntegration[_0xe912[84]](_0xe4adxf)}}function handleEnd(_0xe4adx11,_0xe4adxf,_0xe4adxd){return function(){console[_0xe912[12]](util[_0xe912[57]](_0xe912[128],_0xe4adx11[_0xe912[118]],_0xe4adx11[_0xe912[61]].Id));_0xe4adx11= undefined;return}}function handleError(_0xe4adx11,_0xe4adxd,_0xe4adxf,_0xe4adxb){return function(_0xe4adx4c){console[_0xe912[16]](_0xe912[129]);console[_0xe912[16]](_0xe912[130],_0xe4adx4c[_0xe912[131]]);console[_0xe912[16]](_0xe912[132],_0xe4adx4c[_0xe912[133]]);_0xe4adx11= undefined;delete _0xe4adxf[_0xe912[42]];_0xe4adxf[_0xe912[119]]= _0xe912[120];_0xe4adxf[_0xe912[121]]= _0xe4adxd;_0xe4adxf[_0xe912[122]]= _0xe912[134];_0xe4adxf[_0xe912[124]]= _0xe4adxb;ReportIntegration[_0xe912[84]](_0xe4adxf)[_0xe912[18]](function(){return})[_0xe912[17]](function(_0xe4adx4c){console[_0xe912[16]](_0xe912[135]);return})}}function stripTrailingSlash(_0xe4adx4e){if(_0xe4adx4e[_0xe912[136]](-1) === _0xe912[137]){return _0xe4adx4e[_0xe912[136]](0,_0xe4adx4e[_0xe912[59]]- 1)};return _0xe4adx4e}module[_0xe912[138]]= Salesforce \ No newline at end of file +'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; diff --git a/server/config/integrations/zendesk.js b/server/config/integrations/zendesk.js index 41cf35b..a96b6a6 100644 --- a/server/config/integrations/zendesk.js +++ b/server/config/integrations/zendesk.js @@ -1 +1,637 @@ -var _0x4a0d=["\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"];_0x4a0d[0];var _=require(_0x4a0d[1]);var util=require(_0x4a0d[2]);var rp=require(_0x4a0d[3]);var ZendeskIntegration=require(_0x4a0d[5])[_0x4a0d[4]];var ZendeskConfiguration=require(_0x4a0d[5])[_0x4a0d[6]];var ReportIntegration=require(_0x4a0d[5])[_0x4a0d[7]];var VoiceQueue=require(_0x4a0d[5])[_0x4a0d[8]];var VoiceExtension=require(_0x4a0d[5])[_0x4a0d[9]];var Agent=require(_0x4a0d[5])[_0x4a0d[10]];function Zendesk(){console[_0x4a0d[12]](_0x4a0d[11])}Zendesk[_0x4a0d[14]][_0x4a0d[13]]= function(_0xded1xb,_0xded1xc,_0xded1xd,_0xded1xe,_0xded1xf,_0xded1x10){var _0xded1x11={uri:undefined,headers:undefined,agent:undefined,enduser:undefined,ticket:undefined,configuration:undefined,recordEnable:false,serverURL:undefined,agentName:undefined};if(!_0xded1xb|| !_0xded1xc){console[_0x4a0d[16]](_0x4a0d[15]);return};ZendeskConfiguration[_0x4a0d[19]]({where:{id:_0xded1xc,AccountId:_0xded1xb},include:[{all:true,include:[{all:true}]}]})[_0x4a0d[18]](handleEntityNotFound())[_0x4a0d[18]](handleConnection(_0xded1x11))[_0x4a0d[18]](searchMotionAgent(_0xded1xd,_0xded1xf))[_0x4a0d[18]](handleMotionAgent(_0xded1x11))[_0x4a0d[18]](searchQueue(_0xded1xf))[_0x4a0d[18]](handleQueueRecordings(_0xded1x11,_0xded1xf))[_0x4a0d[18]](searchRoute(_0xded1xf))[_0x4a0d[18]](handleOutboundRecordings(_0xded1x11,_0xded1xf))[_0x4a0d[18]](searchAgent(_0xded1x11))[_0x4a0d[18]](handleAgent(_0xded1x11))[_0x4a0d[18]](searchAdmin(_0xded1x11))[_0x4a0d[18]](handleAdmin(_0xded1x11))[_0x4a0d[18]](searchEndUser(_0xded1x11,_0xded1xd,_0xded1xf,_0xded1xe))[_0x4a0d[18]](handleEndUser(_0xded1x11,_0xded1xd,_0xded1xf,_0xded1xe))[_0x4a0d[18]](endUserCreation(_0xded1x11,_0xded1xd,_0xded1xf,_0xded1xe))[_0x4a0d[18]](handleEndUserCreation(_0xded1x11,_0xded1xd,_0xded1xf,_0xded1xe))[_0x4a0d[18]](ticketCreation(_0xded1x11,_0xded1xf,_0xded1x10))[_0x4a0d[18]](handleTicketDisplay(_0xded1x11))[_0x4a0d[18]](handleReportIntegration(_0xded1x11,_0xded1xd,_0xded1xf,_0xded1xb))[_0x4a0d[18]](handleEnd(_0xded1x11))[_0x4a0d[17]](handleError(_0xded1x11,_0xded1xd,_0xded1xf,_0xded1xb))};function handleEntityNotFound(){return function(_0xded1x13){if(!_0xded1x13){return null};return _0xded1x13}}function handleConnection(_0xded1x11){return function(_0xded1x15){var _0xded1x16=getAccountConfiguration(_0xded1x15.ZendeskAccount);_0xded1x11[_0x4a0d[20]]= _0xded1x15;_0xded1x11[_0x4a0d[21]]= _0xded1x16[_0x4a0d[21]];_0xded1x11[_0x4a0d[22]]= _0xded1x16[_0x4a0d[22]];_0xded1x11[_0x4a0d[23]]= _0xded1x15[_0x4a0d[25]][_0x4a0d[24]]}}function searchMotionAgent(_0xded1xd,_0xded1xf){return function(){return Agent[_0x4a0d[29]](_0x4a0d[28])[_0x4a0d[27]]({where:{name:getValueFromPropertyName(_0xded1xf,getAgentSearchPropertyFromChannel(_0xded1xd))},attributes:[_0x4a0d[26]]})}}function handleMotionAgent(_0xded1x11){return function(_0xded1x19){if(_0xded1x19&& _0xded1x19[_0x4a0d[26]]){_0xded1x11[_0x4a0d[30]]= _0xded1x19[_0x4a0d[26]]};return}}function searchQueue(_0xded1xf){return function(){console[_0x4a0d[12]](_0x4a0d[31]);if(_0xded1xf[_0x4a0d[32]]){return VoiceQueue[_0x4a0d[27]]({where:{name:_0xded1xf[_0x4a0d[32]]},attributes:[_0x4a0d[33],_0x4a0d[34]]})}else {return}}}function handleQueueRecordings(_0xded1x11,_0xded1xf){return function(_0xded1x1c){if(_0xded1xf[_0x4a0d[32]]){if(_0xded1x1c&& _0xded1x1c[_0x4a0d[34]]){console[_0x4a0d[12]](_0x4a0d[35],_0xded1x1c[_0x4a0d[33]]);_0xded1x11[_0x4a0d[36]]= true}else {_0xded1x11[_0x4a0d[36]]= false;console[_0x4a0d[12]](_0x4a0d[37])}};return}}function searchRoute(_0xded1xf){return function(){if(_0xded1xf[_0x4a0d[38]]){return VoiceExtension[_0x4a0d[27]]({where:{id:_0xded1xf[_0x4a0d[38]]},attributes:[_0x4a0d[39],_0x4a0d[40]]})}else {return}}}function handleOutboundRecordings(_0xded1x11,_0xded1xf){return function(_0xded1x1f){if(_0xded1xf[_0x4a0d[38]]){if(_0xded1x1f&& _0xded1x1f[_0x4a0d[40]]){console[_0x4a0d[12]](_0x4a0d[41],_0xded1x1f[_0x4a0d[39]]);_0xded1x11[_0x4a0d[36]]= true}else {_0xded1x11[_0x4a0d[36]]= false;console[_0x4a0d[12]](_0x4a0d[42])}};return}}function getAccountConfiguration(_0xded1x21){var _0xded1x22={uri:stripTrailingSlash(_0xded1x21[_0x4a0d[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":_0x4a0d[44],"\x41\x63\x63\x65\x70\x74":_0x4a0d[44]}};var _0xded1x23=_0xded1x21[_0x4a0d[45]];if(_0xded1x21[_0x4a0d[46]]=== _0x4a0d[47]){_0xded1x23= _0xded1x23+ _0x4a0d[48]+ _0xded1x21[_0x4a0d[47]]}else {if(_0xded1x21[_0x4a0d[46]]=== _0x4a0d[49]){_0xded1x23= _0xded1x23+ _0x4a0d[50]+ _0xded1x21[_0x4a0d[49]]}};_0xded1x22[_0x4a0d[22]][_0x4a0d[51]]= _0x4a0d[52]+ new Buffer(_0xded1x23).toString(_0x4a0d[53]);return _0xded1x22}function searchAgent(_0xded1x11){return function(){console[_0x4a0d[12]](_0x4a0d[54],_0xded1x11[_0x4a0d[30]]);return rp({uri:_0xded1x11[_0x4a0d[21]]+ _0x4a0d[55],qs:{"\x71\x75\x65\x72\x79":util[_0x4a0d[57]](_0x4a0d[56],_0xded1x11[_0x4a0d[30]])},headers:_0xded1x11[_0x4a0d[22]],json:true})}}function getAgentSearchPropertyFromChannel(_0xded1xd){var _0xded1x26=_0x4a0d[58];if(_0xded1xd){switch(_0xded1xd){case _0x4a0d[60]:_0xded1x26= _0x4a0d[59];break;default:_0xded1x26= _0x4a0d[59];console[_0x4a0d[16]](_0x4a0d[61],_0xded1xd)}};return _0xded1x26}function getValueFromPropertyName(_0xded1xf,_0xded1x26,_0xded1x11){if(_0xded1x26=== _0x4a0d[62]){if(_0xded1x11&& _0xded1x11[_0x4a0d[36]]&& _0xded1x11[_0x4a0d[23]]){return util[_0x4a0d[57]](_0x4a0d[63],stripTrailingSlash(_0xded1x11[_0x4a0d[23]]),_0xded1xf[_0x4a0d[64]])}else {return null}}else {return _[_0x4a0d[65]](_0xded1xf,_0xded1x26)}}function handleAgent(_0xded1x11){return function(_0xded1xf){if(_0xded1xf[_0x4a0d[67]][_0x4a0d[66]]> 0&& _0xded1xf[_0x4a0d[68]]> 0){console[_0x4a0d[12]](_0x4a0d[69],_0xded1x11[_0x4a0d[30]]);_0xded1x11[_0x4a0d[28]]= getMatchObject(_0xded1xf[_0x4a0d[67]],_0x4a0d[33],_0xded1x11[_0x4a0d[30]]);return _0xded1x11[_0x4a0d[28]]};return}}function getMatchObject(_0xded1x2a,_0xded1x26,_0xded1x2b){var _0xded1x2c=_[_0x4a0d[19]](_0xded1x2a,{property:_0xded1x2b});if(_0xded1x2c){return _0xded1x2c};return _[_0x4a0d[70]](_0xded1x2a)}function searchAdmin(_0xded1x11){return function(_0xded1xf){if(_0xded1xf){return};console[_0x4a0d[12]](_0x4a0d[71]);return rp({uri:_0xded1x11[_0x4a0d[21]]+ _0x4a0d[72],headers:_0xded1x11[_0x4a0d[22]],json:true})}}function handleAdmin(_0xded1x11){return function(_0xded1xf){if(!_0xded1xf){return};if(_0xded1xf[_0x4a0d[73]]){console[_0x4a0d[12]](_0x4a0d[74]);_0xded1x11[_0x4a0d[28]]= _0xded1xf[_0x4a0d[73]]};return}}function searchEndUser(_0xded1x11,_0xded1xd,_0xded1xf,_0xded1xe){return function(){console[_0x4a0d[12]](_0x4a0d[75],getValueFromPropertyName(_0xded1xf,getEndUserSearchPropertyFromChannel(_0xded1xd,_0xded1xe)));return rp({uri:_0xded1x11[_0x4a0d[21]]+ _0x4a0d[55],qs:{"\x71\x75\x65\x72\x79":util[_0x4a0d[57]](_0x4a0d[76],getEndUserSearchQueryFromChannel(_0xded1xd),getValueFromPropertyName(_0xded1xf,getEndUserSearchPropertyFromChannel(_0xded1xd,_0xded1xe)))},headers:_0xded1x11[_0x4a0d[22]],json:true})}}function getEndUserSearchQueryFromChannel(_0xded1xd){var _0xded1x26=_0x4a0d[58];if(_0xded1xd){switch(_0xded1xd){case _0x4a0d[60]:_0xded1x26= _0x4a0d[77];break;default:_0xded1x26= _0x4a0d[77];console[_0x4a0d[16]](_0x4a0d[61],_0xded1xd)}};return _0xded1x26}function getEndUserSearchPropertyFromChannel(_0xded1xd,_0xded1xe){var _0xded1x26=_0x4a0d[58];if(_0xded1xd){switch(_0xded1xd){case _0x4a0d[60]:if(_0xded1xe=== _0x4a0d[78]){_0xded1x26= _0x4a0d[79]}else {if(_0xded1xe=== _0x4a0d[32]){_0xded1x26= _0x4a0d[80]}};break;default:_0xded1x26= _0x4a0d[80];console[_0x4a0d[16]](_0x4a0d[61],_0xded1xd)}};return _0xded1x26}function getEndUserNamePropertyFromChannel(_0xded1xd,_0xded1xe){var _0xded1x26=_0x4a0d[58];if(_0xded1xd){switch(_0xded1xd){case _0x4a0d[60]:if(_0xded1xe=== _0x4a0d[78]){_0xded1x26= _0x4a0d[81]}else {if(_0xded1xe=== _0x4a0d[32]){_0xded1x26= _0x4a0d[82]}};break;default:_0xded1x26= _0x4a0d[82];console[_0x4a0d[16]](_0x4a0d[61],_0xded1xd)}};return _0xded1x26}function handleEndUser(_0xded1x11,_0xded1xd,_0xded1x34,_0xded1xe){return function(_0xded1xf){if(_0xded1xf[_0x4a0d[67]][_0x4a0d[66]]> 0&& _0xded1xf[_0x4a0d[68]]> 0){console[_0x4a0d[12]](_0x4a0d[83],getValueFromPropertyName(_0xded1x34,getEndUserSearchPropertyFromChannel(_0xded1xd,_0xded1xe)));_0xded1x11[_0x4a0d[84]]= _0xded1xf[_0x4a0d[67]][0];return _0xded1x11[_0x4a0d[84]]};return}}function endUserCreation(_0xded1x11,_0xded1xd,_0xded1x34,_0xded1xe){return function(_0xded1xf){if(_0xded1xf){return};console[_0x4a0d[12]](_0x4a0d[85],getValueFromPropertyName(_0xded1x34,getEndUserSearchPropertyFromChannel(_0xded1xd,_0xded1xe)));console[_0x4a0d[12]](getJsonForEndUserCreation(_0xded1xd,_0xded1x34,_0xded1xe));return rp({uri:_0xded1x11[_0x4a0d[21]]+ _0x4a0d[86],method:_0x4a0d[87],body:{user:getJsonForEndUserCreation(_0xded1xd,_0xded1x34,_0xded1xe)},headers:_0xded1x11[_0x4a0d[22]],json:true})}}function getJsonForEndUserCreation(_0xded1xd,_0xded1xf,_0xded1xe){var _0xded1x37={role:_0x4a0d[88]};switch(_0xded1xd){case _0x4a0d[60]:if(_0xded1xe=== _0x4a0d[32]){if(isValidName(_0xded1xf[_0x4a0d[82]])){_0xded1x37[_0x4a0d[33]]= getValueFromPropertyName(_0xded1xf,getEndUserNamePropertyFromChannel(_0xded1xd,_0xded1xe))}else {_0xded1x37[_0x4a0d[33]]= util[_0x4a0d[57]](_0x4a0d[89],getValueFromPropertyName(_0xded1xf,getEndUserSearchPropertyFromChannel(_0xded1xd,_0xded1xe)))}}else {if(_0xded1xe=== _0x4a0d[78]){if(isValidName(_0xded1xf[_0x4a0d[81]])){_0xded1x37[_0x4a0d[33]]= getValueFromPropertyName(_0xded1xf,getEndUserNamePropertyFromChannel(_0xded1xd,_0xded1xe))}else {_0xded1x37[_0x4a0d[33]]= util[_0x4a0d[57]](_0x4a0d[89],getValueFromPropertyName(_0xded1xf,getEndUserSearchPropertyFromChannel(_0xded1xd,_0xded1xe)))}}};_0xded1x37[_0x4a0d[77]]= getValueFromPropertyName(_0xded1xf,getEndUserSearchPropertyFromChannel(_0xded1xd,_0xded1xe));break;default:console[_0x4a0d[16]](_0x4a0d[61],_0xded1xd)};return _0xded1x37}function isValidName(_0xded1x39){return _0xded1x39&& _0xded1x39!== _0x4a0d[90]}function handleEndUserCreation(_0xded1x11,_0xded1xd,_0xded1x34,_0xded1xe){return function(_0xded1xf){if(!_0xded1xf){return};if(_0xded1xf[_0x4a0d[73]]){console[_0x4a0d[12]](_0x4a0d[91],getValueFromPropertyName(_0xded1x34,getEndUserSearchPropertyFromChannel(_0xded1xd,_0xded1xe)));_0xded1x11[_0x4a0d[84]]= _0xded1xf[_0x4a0d[73]]};return}}function ticketCreation(_0xded1x11,_0xded1x34,_0xded1x10){return function(){var _0xded1x3c={requester_id:_0xded1x11[_0x4a0d[28]][_0x4a0d[39]],submitter_id:_0xded1x11[_0x4a0d[84]][_0x4a0d[39]],assignee_id:_0xded1x11[_0x4a0d[84]][_0x4a0d[39]],tags:createTagsFromConfiguration(_0xded1x11),subject:createSubjectFromConfiguration(_0xded1x11,_0xded1x34,_0xded1x10),description:createDescriptionFromConfiguration(_0xded1x11,_0xded1x34,_0xded1x10),custom_fields:createCustomFieldsFromConfiguration(_0xded1x11,_0xded1x34,_0xded1x10)};var _0xded1x3d=createFieldsFromConfiguration(_0xded1x11);if(_0xded1x3d[_0x4a0d[66]]> 0){_[_0x4a0d[93]](_0xded1x3d,function(_0xded1x3e){_0xded1x3c[_0xded1x3e[_0x4a0d[39]]]= _0xded1x3e[_0x4a0d[92]]})};console[_0x4a0d[12]](_0x4a0d[94],_0xded1x3c);return rp({uri:_0xded1x11[_0x4a0d[21]]+ _0x4a0d[95],method:_0x4a0d[87],body:{ticket:_0xded1x3c},headers:_0xded1x11[_0x4a0d[22]],json:true})}}function createTagsFromConfiguration(_0xded1x11){var _0xded1x40=[];if(_0xded1x11[_0x4a0d[20]][_0x4a0d[96]][_0x4a0d[66]]> 0){_0xded1x40= _[_0x4a0d[97]](_0xded1x11[_0x4a0d[20]].Tags,_0x4a0d[33])};return _0xded1x40}function createSubjectFromConfiguration(_0xded1x11,_0xded1x34,_0xded1x10){var _0xded1x42=_0x4a0d[58];var _0xded1x43=[];if(_0xded1x11[_0x4a0d[20]][_0x4a0d[98]][_0x4a0d[66]]> 0){var _0xded1x44=_[_0x4a0d[99]](_0xded1x11[_0x4a0d[20]].Subject,[_0x4a0d[39]]);_[_0x4a0d[93]](_0xded1x44,function(_0xded1x45){if(_0xded1x45[_0x4a0d[100]]=== _0x4a0d[101]){_0xded1x43[_0x4a0d[103]](_0xded1x45[_0x4a0d[102]])}else {if(_0xded1x45[_0x4a0d[100]]=== _0x4a0d[104]&& _0xded1x45[_0x4a0d[105]]){var _0xded1x46=getValueFromPropertyName(_0xded1x34,_0xded1x45[_0x4a0d[105]],_0xded1x11);if(_0xded1x46){_0xded1x43[_0x4a0d[103]](_0xded1x46.toString())}}else {if(_0xded1x45[_0x4a0d[100]]=== _0x4a0d[106]){var _0xded1x47=_[_0x4a0d[19]](_0xded1x10,{"\x6E\x61\x6D\x65":_0xded1x45[_0x4a0d[107]][_0x4a0d[33]]});if(_0xded1x47){_0xded1x43[_0x4a0d[103]](_0xded1x47[_0x4a0d[92]].toString())}}}}});_0xded1x42= _0xded1x43[_0x4a0d[109]](_0x4a0d[108])};return _0xded1x42}function createDescriptionFromConfiguration(_0xded1x11,_0xded1x34,_0xded1x10){var _0xded1x49=_0x4a0d[58];var _0xded1x43=[];if(_0xded1x11[_0x4a0d[20]][_0x4a0d[110]][_0x4a0d[66]]> 0){var _0xded1x4a=_[_0x4a0d[99]](_0xded1x11[_0x4a0d[20]].Description,[_0x4a0d[39]]);_[_0x4a0d[93]](_0xded1x4a,function(_0xded1x45){if(_0xded1x45[_0x4a0d[100]]=== _0x4a0d[101]){_0xded1x43[_0x4a0d[103]](_0xded1x45[_0x4a0d[102]])}else {if(_0xded1x45[_0x4a0d[100]]=== _0x4a0d[111]){if(_0xded1x45[_0x4a0d[112]]=== _0x4a0d[101]){_0xded1x43[_0x4a0d[103]](util[_0x4a0d[57]](_0x4a0d[113],_0xded1x45[_0x4a0d[114]],_0xded1x45[_0x4a0d[115]]))}else {if(_0xded1x45[_0x4a0d[112]]=== _0x4a0d[104]&& _0xded1x45[_0x4a0d[105]]){var _0xded1x46=getValueFromPropertyName(_0xded1x34,_0xded1x45[_0x4a0d[105]],_0xded1x11);if(_0xded1x46){_0xded1x43[_0x4a0d[103]](util[_0x4a0d[57]](_0x4a0d[113],_0xded1x45[_0x4a0d[114]],_0xded1x46.toString()))}}else {if(_0xded1x45[_0x4a0d[112]]=== _0x4a0d[106]){var _0xded1x47=_[_0x4a0d[19]](_0xded1x10,{"\x6E\x61\x6D\x65":_0xded1x45[_0x4a0d[107]][_0x4a0d[33]]});if(_0xded1x47){_0xded1x43[_0x4a0d[103]](util[_0x4a0d[57]](_0x4a0d[113],_0xded1x45[_0x4a0d[114]],_0xded1x47[_0x4a0d[92]].toString()))}}}}}}});_0xded1x49= _0xded1x43[_0x4a0d[109]](_0x4a0d[116])};return _0xded1x49}function createCustomFieldsFromConfiguration(_0xded1x11,_0xded1x34,_0xded1x10){var _0xded1x4c=[];var _0xded1x4d=[];if(_0xded1x11[_0x4a0d[20]][_0x4a0d[117]][_0x4a0d[66]]> 0){_0xded1x4c= _[_0x4a0d[118]](_0xded1x11[_0x4a0d[20]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":true});_[_0x4a0d[93]](_0xded1x4c,function(_0xded1x3e){if(_0xded1x3e[_0x4a0d[100]]=== _0x4a0d[101]){_0xded1x4d[_0x4a0d[103]]({id:_0xded1x3e[_0x4a0d[119]],value:_0xded1x3e[_0x4a0d[102]]})}else {if(_0xded1x3e[_0x4a0d[100]]=== _0x4a0d[104]){var _0xded1x46=getValueFromPropertyName(_0xded1x34,_0xded1x3e[_0x4a0d[105]],_0xded1x11);if(_0xded1x46){_0xded1x4d[_0x4a0d[103]]({id:_0xded1x3e[_0x4a0d[119]],value:_0xded1x46.toString()})}}else {if(_0xded1x3e[_0x4a0d[100]]=== _0x4a0d[106]){var _0xded1x47=_[_0x4a0d[19]](_0xded1x10,{"\x6E\x61\x6D\x65":_0xded1x3e[_0x4a0d[107]][_0x4a0d[33]]});if(_0xded1x47){_0xded1x4d[_0x4a0d[103]]({id:_0xded1x3e[_0x4a0d[119]],value:_0xded1x47[_0x4a0d[92]].toString()})}}}}})};return _0xded1x4d}function createFieldsFromConfiguration(_0xded1x11){var _0xded1x3d=[];var _0xded1x4d=[];if(_0xded1x11[_0x4a0d[20]][_0x4a0d[117]][_0x4a0d[66]]> 0){_0xded1x3d= _[_0x4a0d[118]](_0xded1x11[_0x4a0d[20]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":false});_[_0x4a0d[93]](_0xded1x3d,function(_0xded1x3e){if(_0xded1x3e[_0x4a0d[100]]=== _0x4a0d[101]){_0xded1x4d[_0x4a0d[103]]({id:_0xded1x3e[_0x4a0d[120]],value:_0xded1x3e[_0x4a0d[102]]})}})};return _0xded1x4d}function handleTicketDisplay(_0xded1x11){return function(_0xded1xf){if(_0xded1xf[_0x4a0d[121]]){console[_0x4a0d[12]](_0x4a0d[122]);_0xded1x11[_0x4a0d[121]]= _0xded1xf[_0x4a0d[121]];var _0xded1x50=util[_0x4a0d[57]](_0x4a0d[123],_0xded1x11[_0x4a0d[28]][_0x4a0d[39]],_0xded1x11[_0x4a0d[121]][_0x4a0d[39]]);return rp({uri:_0xded1x11[_0x4a0d[21]]+ _0xded1x50,method:_0x4a0d[87],headers:_0xded1x11[_0x4a0d[22]],json:true})};return}}function handleReportIntegration(_0xded1x11,_0xded1xd,_0xded1xf,_0xded1xb){return function(){delete _0xded1xf[_0x4a0d[39]];_0xded1xf[_0x4a0d[124]]= _0x4a0d[125];_0xded1xf[_0x4a0d[126]]= _0xded1xd;_0xded1xf[_0x4a0d[127]]= _0x4a0d[128];_0xded1xf[_0x4a0d[129]]= _0xded1x11[_0x4a0d[121]][_0x4a0d[39]];_0xded1xf[_0x4a0d[130]]= _0xded1x11[_0x4a0d[121]][_0x4a0d[130]];_0xded1xf[_0x4a0d[131]]= _0xded1xb;return ReportIntegration[_0x4a0d[132]](_0xded1xf)}}function handleEnd(_0xded1x11,_0xded1xf,_0xded1xd){return function(){console[_0x4a0d[12]](util[_0x4a0d[57]](_0x4a0d[133],_0xded1x11[_0x4a0d[121]][_0x4a0d[39]],_0xded1x11[_0x4a0d[28]][_0x4a0d[39]]));_0xded1x11= undefined;return}}function handleError(_0xded1x11,_0xded1xd,_0xded1xf,_0xded1xb){return function(_0xded1x54){console[_0x4a0d[16]](_0x4a0d[134]);console[_0x4a0d[16]](_0x4a0d[135],_0xded1x54[_0x4a0d[136]]);console[_0x4a0d[16]](_0x4a0d[137],_0xded1x54[_0x4a0d[138]]);_0xded1x11= undefined;delete _0xded1xf[_0x4a0d[39]];_0xded1xf[_0x4a0d[124]]= _0x4a0d[125];_0xded1xf[_0x4a0d[126]]= _0xded1xd;_0xded1xf[_0x4a0d[127]]= _0x4a0d[139];_0xded1xf[_0x4a0d[131]]= _0xded1xb;ReportIntegration[_0x4a0d[132]](_0xded1xf)[_0x4a0d[18]](function(){return})[_0x4a0d[17]](function(_0xded1x54){console[_0x4a0d[16]](_0x4a0d[140]);return})}}function stripTrailingSlash(_0xded1x56){if(_0xded1x56[_0x4a0d[141]](-1) === _0x4a0d[142]){return _0xded1x56[_0x4a0d[141]](0,_0xded1x56[_0x4a0d[66]]- 1)};return _0xded1x56}module[_0x4a0d[143]]= Zendesk \ No newline at end of file +'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; diff --git a/server/config/license/hardware.js b/server/config/license/hardware.js index 382f632..57ddc35 100644 --- a/server/config/license/hardware.js +++ b/server/config/license/hardware.js @@ -1 +1,59 @@ -var _0xd654=["\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"];_0xd654[0];var os=require(_0xd654[1]),crypto=require(_0xd654[2]),path=require(_0xd654[3]),machineId=require(_0xd654[4]),machine=require(_0xd654[5]),async=require(_0xd654[6]);function getInterfaces(){var _0xf8acx8=[];var _0xf8acx9=os[_0xd654[7]]();for(var _0xf8acxa in _0xf8acx9){var _0xf8acxb=_0xf8acx9[_0xf8acxa][_0xd654[11]](function(_0xf8acxc){return _0xf8acxc[_0xd654[8]]=== _0xd654[9]&& _0xf8acxc[_0xd654[10]]=== false});_0xf8acx8= _0xf8acx8[_0xd654[12]](_0xf8acxb)};return _0xf8acx8}function macAddress(){var _0xf8acx8=getInterfaces();return (_0xf8acx8[_0xd654[13]]> 0)?_0xf8acx8[0][_0xd654[14]]:_0xd654[15]}function ipAddress(){var _0xf8acx8=getInterfaces();return (_0xf8acx8[_0xd654[13]]> 0)?_0xf8acx8[0][_0xd654[16]]:_0xd654[17]}module[_0xd654[18]]= function(_0xf8acxf){var _0xf8acx10=machine[_0xd654[19]]+ _0xd654[20]+ macAddress()+ _0xd654[20]+ ipAddress();var _0xf8acx11=crypto[_0xd654[25]](_0xd654[24])[_0xd654[23]](_0xf8acx10)[_0xd654[22]](_0xd654[21]);var _0xf8acx12=_0xf8acx11[_0xd654[26]](0,8)+ _0xd654[27]+ _0xf8acx11[_0xd654[26]](8,12)+ _0xd654[27]+ _0xf8acx11[_0xd654[26]](12,16)+ _0xd654[27]+ _0xf8acx11[_0xd654[26]](16,20)+ _0xd654[27]+ _0xf8acx11[_0xd654[26]](20);return _0xf8acxf=== true?_0xf8acx12:_0xf8acx11} \ No newline at end of file +'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; +}; diff --git a/server/config/license/index.js b/server/config/license/index.js index 0546005..a134cf7 100644 --- a/server/config/license/index.js +++ b/server/config/license/index.js @@ -1 +1,87 @@ -var _0xc115=["\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"];_0xc115[0];var rp=require(_0xc115[1]);var util=require(_0xc115[2]);var url=require(_0xc115[3]);var crypto=require(_0xc115[4]);var moment=require(_0xc115[5]);var CronJob=require(_0xc115[7])[_0xc115[6]];var licenseService=require(_0xc115[8]);var config=require(_0xc115[9]);var License=require(_0xc115[11])[_0xc115[10]];var session=require(_0xc115[9])[_0xc115[12]];const expirationTh=7;function licenseManager(){var _0x2aa5xd= new CronJob({cronTime:_0xc115[13],onTick:function(){return License[_0xc115[38]]({where:{id:1}})[_0xc115[37]](function(_0x2aa5xf){var _0x2aa5x10={};if(_0x2aa5xf[_0xc115[16]]){var _0x2aa5x11=crypto[_0xc115[19]](_0xc115[17],session[_0xc115[18]]);var _0x2aa5x12=_0x2aa5x11[_0xc115[22]](_0x2aa5xf[_0xc115[16]],_0xc115[20],_0xc115[21]);_0x2aa5x12+= _0x2aa5x11[_0xc115[23]](_0xc115[21]);if(moment()[_0xc115[25]](_0x2aa5x12,_0xc115[24])> expirationTh){_0x2aa5x10[_0xc115[26]]= licenseService[_0xc115[27]]();_0x2aa5x10[_0xc115[16]]= null}};if(!_0x2aa5xf[_0xc115[26]]){_0x2aa5x10[_0xc115[26]]= licenseService[_0xc115[27]]()}else {if((_0x2aa5x10[_0xc115[26]]!== licenseService[_0xc115[27]]())&& !_0x2aa5xf[_0xc115[16]]){var _0x2aa5x13=crypto[_0xc115[28]](_0xc115[17],session[_0xc115[18]]);_0x2aa5x10[_0xc115[16]]= _0x2aa5x13[_0xc115[22]](moment()[_0xc115[30]](_0xc115[29]),_0xc115[21],_0xc115[20]);_0x2aa5x10[_0xc115[16]]+= _0x2aa5x13[_0xc115[23]](_0xc115[20])}};return _0x2aa5xf[_0xc115[22]](_0x2aa5x10)[_0xc115[33]](function(_0x2aa5x10){return rp({uri:config[_0xc115[34]]+ _0xc115[35]+ licenseService[_0xc115[27]]()+ _0xc115[36],json:true})})[_0xc115[33]](function(_0x2aa5x10){if(_0x2aa5xf[_0xc115[26]]=== _0x2aa5x10[_0xc115[31]]){return _0x2aa5xf[_0xc115[22]]({license:_0x2aa5x10[_0xc115[32]],data2:null})}})})[_0xc115[15]](function(_0x2aa5xe){console[_0xc115[14]](_0x2aa5xe)})},start:true});_0x2aa5xd[_0xc115[39]]();return {}}module[_0xc115[40]]= licenseManager \ No newline at end of file +'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; diff --git a/server/config/license/license.service.js b/server/config/license/license.service.js index ea444e2..8a052d0 100644 --- a/server/config/license/license.service.js +++ b/server/config/license/license.service.js @@ -1 +1,365 @@ -var _0x3787=["\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"];_0x3787[0];var compose=require(_0x3787[1]);var moment=require(_0x3787[2]);var crypto=require(_0x3787[3]);var util=require(_0x3787[4]);var os=require(_0x3787[5]);var exec=require(_0x3787[7])[_0x3787[6]];var config=require(_0x3787[8]);var User=require(_0x3787[10])[_0x3787[9]];var Telephone=require(_0x3787[10])[_0x3787[11]];var Setting=require(_0x3787[10])[_0x3787[12]];var License=require(_0x3787[10])[_0x3787[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:_0x3787[14]};function getUuid(){switch(os[_0x3787[22]]()){case _0x3787[20]:return exec(_0x3787[18],{encoding:_0x3787[19]})[_0x3787[17]](_0x3787[15],_0x3787[16]);default:return require(_0x3787[21])(true)}}function checkLicense(_0x4759xf){return compose()[_0x3787[32]](function(_0x4759x10,_0x4759x11,_0x4759x12){return License[_0x3787[31]]({where:{id:1}})[_0x3787[30]](function(_0x4759x14){var _0x4759x15=null;var _0x4759x16=false;try{if(_0x4759x14[_0x3787[24]]){_0x4759x15= decrypt(_0x4759x14[_0x3787[24]],_0x4759x14[_0x3787[25]]);_0x4759x15= JSON[_0x3787[26]](_0x4759x15)}else {_0x4759x15= demoLicense}}catch(err){console[_0x3787[28]](_0x3787[27],err);_0x4759x15= demoLicense};_0x4759x16= _0x4759x15[_0x4759xf];if(!_0x4759x16){return _0x4759x11[_0x3787[29]](403)};return _0x4759x12()})[_0x3787[23]](function(_0x4759x13){return _0x4759x12(_0x4759x13)})})}function hasChat(){return checkLicense(_0x3787[33])}function hasSms(){return checkLicense(_0x3787[34])}function hasCm(){return checkLicense(_0x3787[35])}function hasUpdate(){return checkLicense(_0x3787[36])}function hasMail(){return checkLicense(_0x3787[37])}function hasFax(){return checkLicense(_0x3787[38])}function hasJscripty(){return checkLicense(_0x3787[39])}function hasCustom(){return checkLicense(_0x3787[40])}function hasOpenchannel(){return checkLicense(_0x3787[41])}function isValidDate(){return compose()[_0x3787[32]](function(_0x4759x10,_0x4759x11,_0x4759x12){return License[_0x3787[31]]({where:{id:1}})[_0x3787[30]](function(_0x4759x14){var _0x4759x15=null,_0x4759x21=false;try{if(_0x4759x14[_0x3787[24]]){_0x4759x15= decrypt(_0x4759x14[_0x3787[24]],_0x4759x14[_0x3787[25]]);_0x4759x15= JSON[_0x3787[26]](_0x4759x15);if(moment()[_0x3787[43]](_0x4759x15[_0x3787[42]])){_0x4759x21= true}}}catch(err){console[_0x3787[28]](_0x3787[27],err)};if(!_0x4759x21){return _0x4759x11[_0x3787[29]](403)};return _0x4759x12()})[_0x3787[23]](function(_0x4759x13){return _0x4759x12(_0x4759x13)})})}function isUsersLimit(){return compose()[_0x3787[32]](function(_0x4759x10,_0x4759x11,_0x4759x12){var _0x4759x14;return License[_0x3787[31]]({where:{id:1}})[_0x3787[30]](function(_0x4759x25){_0x4759x14= _0x4759x25;return User[_0x3787[51]]({where:{$or:[{role:_0x3787[49]},{role:_0x3787[50]}]}})})[_0x3787[48]](function(_0x4759x23){var _0x4759x15=null,_0x4759x24=false;try{if(_0x4759x14[_0x3787[24]]){_0x4759x15= decrypt(_0x4759x14[_0x3787[24]],_0x4759x14[_0x3787[25]]);_0x4759x15= JSON[_0x3787[26]](_0x4759x15)}else {_0x4759x15= demoLicense}}catch(err){console[_0x3787[28]](_0x3787[27],err);_0x4759x15= demoLicense};if(_0x4759x15[_0x3787[44]]> _0x4759x23){_0x4759x24= true};if(!_0x4759x24){return _0x4759x11[_0x3787[47]](403)[_0x3787[46]]({message:_0x3787[45]})};return _0x4759x12()})[_0x3787[23]](function(_0x4759x13){return _0x4759x12(_0x4759x13)})})}function isTelephonesLimit(){return compose()[_0x3787[32]](function(_0x4759x10,_0x4759x11,_0x4759x12){var _0x4759x14;return License[_0x3787[31]]({where:{id:1}})[_0x3787[30]](function(_0x4759x25){_0x4759x14= _0x4759x25;return User[_0x3787[51]]({where:{role:_0x3787[54]}})})[_0x3787[48]](function(_0x4759x27){var _0x4759x15=null,_0x4759x24=false;try{if(_0x4759x14[_0x3787[24]]){_0x4759x15= decrypt(_0x4759x14[_0x3787[24]],_0x4759x14[_0x3787[25]]);_0x4759x15= JSON[_0x3787[26]](_0x4759x15)}else {_0x4759x15= demoLicense}}catch(err){console[_0x3787[28]](_0x3787[27],err);_0x4759x15= demoLicense};if(_0x4759x15[_0x3787[52]]> _0x4759x27){_0x4759x24= true};if(!_0x4759x24){return _0x4759x11[_0x3787[47]](403)[_0x3787[46]]({message:_0x3787[53]})};return _0x4759x12()})[_0x3787[23]](function(_0x4759x13){return _0x4759x12(_0x4759x13)})})}function isValidAgent(){return function(_0x4759x29){var _0x4759x14;var _0x4759x2a=false;if(_0x4759x29[_0x3787[55]]=== _0x3787[49]|| _0x4759x29[_0x3787[55]]=== _0x3787[50]|| (_0x4759x29[_0x3787[55]]=== _0x3787[56]&& _0x4759x29[_0x3787[57]])){_0x4759x2a= true};return License[_0x3787[31]]({where:{id:1}})[_0x3787[30]](function(_0x4759x25){_0x4759x14= _0x4759x25;return User[_0x3787[51]]({where:{role:_0x3787[56],online:true}})})[_0x3787[48]](function(_0x4759x2b){var _0x4759x15=null;try{if(_0x4759x14[_0x3787[24]]){_0x4759x15= decrypt(_0x4759x14[_0x3787[24]],_0x4759x14[_0x3787[25]]);_0x4759x15= JSON[_0x3787[26]](_0x4759x15)}else {_0x4759x15= demoLicense}}catch(err){console[_0x3787[28]](_0x3787[27],err);_0x4759x15= demoLicense};if(_0x4759x15[_0x3787[58]]> _0x4759x2b){_0x4759x2a= true};return _0x4759x2a})}}function decrypt(_0x4759x2d,_0x4759x2e){var _0x4759x2f=_0x4759x2e[_0x3787[60]](_0x3787[59])[4];var _0x4759x30=_0x4759x2e[_0x3787[60]](_0x3787[59])[0];var _0x4759x31=crypto[_0x3787[64]](_0x3787[61],util[_0x3787[63]](_0x3787[62],_0x4759x2f,_0x4759x2e,_0x4759x30));var _0x4759x14=_0x4759x31[_0x3787[36]](_0x4759x2d,_0x3787[65],_0x3787[19]);_0x4759x14+= _0x4759x31[_0x3787[66]](_0x3787[19]);return _0x4759x14}exports[_0x3787[67]]= getUuid;exports[_0x3787[68]]= isValidDate;exports[_0x3787[69]]= isUsersLimit;exports[_0x3787[70]]= isTelephonesLimit;exports[_0x3787[71]]= hasChat;exports[_0x3787[72]]= hasMail;exports[_0x3787[73]]= hasFax;exports[_0x3787[74]]= hasOpenchannel;exports[_0x3787[75]]= hasSms;exports[_0x3787[76]]= hasJscripty;exports[_0x3787[77]]= hasCm;exports[_0x3787[78]]= hasUpdate;exports[_0x3787[79]]= isValidAgent;exports[_0x3787[80]]= demoLicense;exports[_0x3787[81]]= decrypt \ No newline at end of file +'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; diff --git a/server/config/local.env.sample.js b/server/config/local.env.sample.js index 7a93abb..58ae668 100644 --- a/server/config/local.env.sample.js +++ b/server/config/local.env.sample.js @@ -1 +1,23 @@ -var _0xcbeb=["\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",""];_0xcbeb[0];module[_0xcbeb[1]]= {DOMAIN:_0xcbeb[2],SESSION_SECRET:_0xcbeb[3],FACEBOOK_ID:_0xcbeb[4],FACEBOOK_SECRET:_0xcbeb[5],TWITTER_ID:_0xcbeb[4],TWITTER_SECRET:_0xcbeb[5],GOOGLE_ID:_0xcbeb[4],GOOGLE_SECRET:_0xcbeb[5],DEBUG:_0xcbeb[6]} \ No newline at end of file +'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: '' +}; diff --git a/server/config/logger.js b/server/config/logger.js index ab11e46..1542f7e 100644 --- a/server/config/logger.js +++ b/server/config/logger.js @@ -1 +1,120 @@ -var _0x36d2=["\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(_0x36d2[0]);var path=require(_0x36d2[1]);var config=require(_0x36d2[2]);winston[_0x36d2[3]]= true;var debug= new winston.Logger({transports:[ new winston[_0x36d2[5]].Console({level:_0x36d2[4],handleExceptions:true,json:false,colorize:true})]});if(config[_0x36d2[7]][_0x36d2[6]]){debug[_0x36d2[9]](winston[_0x36d2[5]].File,{name:_0x36d2[8],level:_0x36d2[4],filename:config[_0x36d2[7]][_0x36d2[4]],handleExceptions:true,json:true,maxsize:5242880,maxFiles:5,colorize:false})};var info= new winston.Logger({transports:[ new winston[_0x36d2[5]].File({name:_0x36d2[10],level:_0x36d2[11],filename:config[_0x36d2[7]][_0x36d2[11]],handleExceptions:true,json:true,maxsize:5242880,maxFiles:5,colorize:false}), new winston[_0x36d2[5]].Console({level:_0x36d2[11],handleExceptions:true,json:false,colorize:true})]});var warn= new winston.Logger({transports:[ new winston[_0x36d2[5]].File({name:_0x36d2[12],level:_0x36d2[13],filename:config[_0x36d2[7]][_0x36d2[13]],handleExceptions:true,json:true,maxsize:5242880,maxFiles:5,colorize:false}), new winston[_0x36d2[5]].Console({level:_0x36d2[13],handleExceptions:true,json:false,colorize:true})]});var error= new winston.Logger({transports:[ new winston[_0x36d2[5]].File({name:_0x36d2[14],level:_0x36d2[15],filename:config[_0x36d2[7]][_0x36d2[15]],handleExceptions:true,json:true,maxsize:5242880,maxFiles:5,colorize:false}), new winston[_0x36d2[5]].Console({level:_0x36d2[15],handleExceptions:true,json:false,colorize:true})]});var loggers={debug:function(_0xa54dx9,_0xa54dxa){debug[_0x36d2[4]](_0xa54dx9,_0xa54dxa)},info:function(_0xa54dx9,_0xa54dxa){info[_0x36d2[11]](_0xa54dx9,_0xa54dxa)},warn:function(_0xa54dx9,_0xa54dxa){warn[_0x36d2[13]](_0xa54dx9,_0xa54dxa)},error:function(_0xa54dx9,_0xa54dxa){error[_0x36d2[15]](_0xa54dx9,_0xa54dxa)},log:function(_0xa54dxb,_0xa54dx9,_0xa54dxa){var _0xa54dxc=exports[_0xa54dxb];_0xa54dxc(_0xa54dx9,_0xa54dxa)}};module[_0x36d2[16]]= loggers;module[_0x36d2[16]][_0x36d2[17]]= {write:function(_0xa54dxd,_0xa54dxe){loggers[_0x36d2[11]](_0xa54dxd)}} \ No newline at end of file +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); + } +}; diff --git a/server/config/openchannel/custom.js b/server/config/openchannel/custom.js index 10c36c4..ba3c589 100644 --- a/server/config/openchannel/custom.js +++ b/server/config/openchannel/custom.js @@ -1 +1,274 @@ -var _0xe61d=["\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"];_0xe61d[0];var _=require(_0xe61d[1]);var Promise=require(_0xe61d[2]);var Util=require(_0xe61d[3]);var moment=require(_0xe61d[4]);var path=require(_0xe61d[5]);var util=require(_0xe61d[6]);var fs=require(_0xe61d[7]);var Agent=require(_0xe61d[9])[_0xe61d[8]];var OpenchannelRoom=require(_0xe61d[9])[_0xe61d[10]];var OpenchannelMessage=require(_0xe61d[9])[_0xe61d[11]];var OpenchannelAccount=require(_0xe61d[9])[_0xe61d[12]];var ReportOpenchannel=require(_0xe61d[9])[_0xe61d[13]];var Action=require(_0xe61d[9])[_0xe61d[14]];var path=require(_0xe61d[5]);var fs=require(_0xe61d[7]);var Contact=require(_0xe61d[9])[_0xe61d[15]];var Scheduler=require(_0xe61d[16]);function Custom(){console[_0xe61d[18]](_0xe61d[17]);this[_0xe61d[19]]= null}Custom[_0xe61d[21]][_0xe61d[20]]= function(_0xd2d8x11){var _0xd2d8x12=this;console[_0xe61d[18]](_0xe61d[22]+ _0xd2d8x11[_0xe61d[23]]+ _0xe61d[24]);_0xd2d8x12[_0xe61d[19]]= _0xd2d8x11;OpenchannelAccount[_0xe61d[27]](function(_0xd2d8x11){if(_0xd2d8x12[_0xe61d[19]]&& _0xd2d8x11[_0xe61d[25]]=== _0xd2d8x12[_0xe61d[19]][_0xe61d[25]]){_0xd2d8x12[_0xe61d[26]](_0xd2d8x11)}});ReportOpenchannel[_0xe61d[27]](function(_0xd2d8x11){if(_0xd2d8x12[_0xe61d[19]]&& _0xd2d8x11[_0xe61d[28]]== _0xd2d8x12[_0xe61d[19]][_0xe61d[25]]){if(_0xd2d8x11[_0xe61d[30]](_0xe61d[29])){_0xd2d8x12[_0xe61d[32]](_0xd2d8x11,_0xe61d[31])};if(_0xd2d8x11[_0xe61d[30]](_0xe61d[33])){_0xd2d8x12[_0xe61d[32]](_0xd2d8x11,_0xe61d[34])}}});OpenchannelRoom[_0xe61d[27]](function(_0xd2d8x11){if(_0xd2d8x12[_0xe61d[19]]&& _0xd2d8x11[_0xe61d[35]]== _0xd2d8x12[_0xe61d[19]][_0xe61d[25]]){if(_0xd2d8x11[_0xe61d[30]](_0xe61d[36])&& _0xd2d8x11[_0xe61d[36]]=== _0xe61d[37]){_0xd2d8x12[_0xe61d[32]](_0xd2d8x11,_0xe61d[38])}}});OpenchannelAccount[_0xe61d[40]](function(_0xd2d8x11){if(_0xd2d8x12[_0xe61d[19]]&& _0xd2d8x11[_0xe61d[25]]=== _0xd2d8x12[_0xe61d[19]][_0xe61d[25]]){_0xd2d8x12[_0xe61d[39]](_0xd2d8x11)}});OpenchannelMessage[_0xe61d[50]](function(_0xd2d8x11,_0xd2d8x13){if(_0xd2d8x12[_0xe61d[19]]&& _0xd2d8x12[_0xe61d[19]][_0xe61d[25]]== _0xd2d8x11[_0xe61d[41]][_0xe61d[35]]){if(_0xd2d8x11[_0xe61d[36]]=== _0xe61d[42]){var _0xd2d8x14= new Scheduler({channel:_0xe61d[43],uniqueid:util[_0xe61d[46]](_0xe61d[44],moment()[_0xe61d[45]](),_0xd2d8x11.OpenchannelRoomId),messageid:_0xd2d8x11[_0xe61d[25]],roomid:_0xd2d8x11[_0xe61d[47]],accountid:_0xd2d8x12[_0xe61d[19]][_0xe61d[25]],accountname:_0xd2d8x12[_0xe61d[19]][_0xe61d[23]],from:_0xd2d8x11[_0xe61d[48]]});_0xd2d8x14[_0xe61d[20]]()};_0xd2d8x12[_0xe61d[49]](_0xd2d8x11,_0xd2d8x13)}})};Custom[_0xe61d[21]][_0xe61d[26]]= function(_0xd2d8x11){if(!_0xd2d8x11[_0xe61d[30]](_0xe61d[51])){console[_0xe61d[18]](_0xe61d[22]+ _0xd2d8x11[_0xe61d[23]]+ _0xe61d[52]);this[_0xe61d[19]]= null;this[_0xe61d[19]]= _0xd2d8x11}};Custom[_0xe61d[21]][_0xe61d[39]]= function(_0xd2d8x11){console[_0xe61d[18]](_0xe61d[53]+ _0xd2d8x11[_0xe61d[23]]+ _0xe61d[54]);this[_0xe61d[19]]= null};Custom[_0xe61d[21]][_0xe61d[49]]= function(_0xd2d8x15,_0xd2d8x13){var _0xd2d8x16=this[_0xe61d[19]];var _0xd2d8x17=_0xd2d8x15;var _0xd2d8x18;var _0xd2d8x19;if(_0xd2d8x17[_0xe61d[36]]=== _0xe61d[55]){return Promise[_0xe61d[82]]([])[_0xe61d[62]](getRoom(_0xd2d8x17))[_0xe61d[62]](function(_0xd2d8x1e){_0xd2d8x18= _0xd2d8x1e;return _0xd2d8x17[_0xe61d[81]](_0xd2d8x1e[_0xe61d[25]])})[_0xe61d[62]](function(){return _0xd2d8x18[_0xe61d[61]]({status:_0xe61d[78],lastEvent:_0xe61d[55],lastEventAt:moment()[_0xe61d[46]](_0xe61d[60]),openchannelOut:++_0xd2d8x18[_0xe61d[79]]},{individualHooks:true,user:_0xd2d8x13[_0xe61d[80]]})})[_0xe61d[62]](function(_0xd2d8x1c){return Agent[_0xe61d[77]](_0xd2d8x17.UserId)})[_0xe61d[62]](function(_0xd2d8x1d){_0xd2d8x19= _0xd2d8x1d;return _0xd2d8x18[_0xe61d[76]](_0xd2d8x19)})[_0xe61d[62]](function(){console[_0xe61d[18]](_0xe61d[67]);if(_0xd2d8x16[_0xe61d[68]]&& _0xd2d8x16[_0xe61d[69]]){var _0xd2d8x1c={from:_0xd2d8x17[_0xe61d[48]],to:_0xd2d8x17[_0xe61d[70]],body:_0xd2d8x17[_0xe61d[71]],UserId:_0xd2d8x17[_0xe61d[72]],OpenchannelAccountId:_0xd2d8x17[_0xe61d[35]],OpenchannelRoomId:_0xd2d8x17[_0xe61d[47]]};return Util[_0xe61d[73]](_0xd2d8x1c,_0xd2d8x16[_0xe61d[68]],_0xd2d8x16[_0xe61d[69]])}else {throw {name:_0xe61d[74],message:_0xe61d[75]}}})[_0xe61d[62]](function(_0xd2d8x1b){console[_0xe61d[18]](_0xe61d[66]);return _0xd2d8x17[_0xe61d[64]]({status:_0xe61d[65],res_data:JSON[_0xe61d[63]](_0xd2d8x1b)})})[_0xe61d[62]](function(){return _0xd2d8x18[_0xe61d[61]]({lastEvent:_0xe61d[65],lastEventAt:moment()[_0xe61d[46]](_0xe61d[60])})})[_0xe61d[58]](function(_0xd2d8x1a){console[_0xe61d[18]](_0xe61d[56],_0xd2d8x1a);_0xd2d8x17[_0xe61d[64]]({status:_0xe61d[59],res_data:JSON[_0xe61d[63]](_0xd2d8x1a)})[_0xe61d[62]](function(){return _0xd2d8x18[_0xe61d[61]]({lastEvent:_0xe61d[59],lastEventAt:moment()[_0xe61d[46]](_0xe61d[60])})})[_0xe61d[58]](function(_0xd2d8x1a){console[_0xe61d[18]](_0xe61d[57])})})}};function getRoom(_0xd2d8x17){return function(){if(_0xd2d8x17[_0xe61d[47]]){return OpenchannelRoom[_0xe61d[77]](_0xd2d8x17.OpenchannelRoomId)}else {return OpenchannelRoom[_0xe61d[86]]({limit:1,where:{contact:_0xd2d8x17[_0xe61d[70]],OpenchannelAccountId:_0xd2d8x17[_0xe61d[35]]},order:[[_0xe61d[84],_0xe61d[85]]]})[_0xe61d[62]](function(_0xd2d8x20){var _0xd2d8x20=_0xd2d8x20[0];if(!_0xd2d8x20|| _0xd2d8x20[_0xe61d[36]]=== _0xe61d[37]){var _0xd2d8x21=_0xd2d8x20?_0xd2d8x20[_0xe61d[25]]:null;return OpenchannelRoom[_0xe61d[83]]({contact:_0xd2d8x17[_0xe61d[70]],OpenchannelAccountId:_0xd2d8x17[_0xe61d[35]],status:_0xe61d[78],ParentId:_0xd2d8x21})};return _0xd2d8x20})}}}function execRequest(_0xd2d8x11,_0xd2d8x23,_0xd2d8x24){Util[_0xe61d[73]](_0xd2d8x11,_0xd2d8x23,_0xd2d8x24)[_0xe61d[62]](function(_0xd2d8x25){console[_0xe61d[18]](_0xe61d[88])})[_0xe61d[58]](function(_0xd2d8x1a){console[_0xe61d[18]](_0xe61d[87])})}Custom[_0xe61d[21]][_0xe61d[32]]= function(_0xd2d8x11,_0xd2d8x26){var _0xd2d8x16=this[_0xe61d[19]];switch(_0xd2d8x26){case _0xe61d[31]:if(_0xd2d8x16[_0xe61d[89]]&& _0xd2d8x16[_0xe61d[90]]){console[_0xe61d[18]](_0xe61d[91]+ _0xd2d8x16[_0xe61d[23]]+ _0xe61d[92]);execRequest(_0xd2d8x11[_0xe61d[41]],_0xd2d8x16[_0xe61d[89]],_0xd2d8x16[_0xe61d[90]])};if(_0xd2d8x16[_0xe61d[94]][_0xe61d[93]]){_[_0xe61d[97]](_0xd2d8x16[_0xe61d[94]],function(_0xd2d8x27){if(_0xd2d8x27[_0xe61d[95]]){Util[_0xe61d[96]](_0xd2d8x27,_0xd2d8x11)}})};break;case _0xe61d[34]:if(_0xd2d8x16[_0xe61d[98]]&& _0xd2d8x16[_0xe61d[99]]){console[_0xe61d[18]](_0xe61d[91]+ _0xd2d8x16[_0xe61d[23]]+ _0xe61d[100]);execRequest(_0xd2d8x11[_0xe61d[41]],_0xd2d8x16[_0xe61d[98]],_0xd2d8x16[_0xe61d[99]])};break;case _0xe61d[38]:if(_0xd2d8x16[_0xe61d[101]]&& _0xd2d8x16[_0xe61d[102]]){console[_0xe61d[18]](_0xe61d[91]+ _0xd2d8x16[_0xe61d[23]]+ _0xe61d[103]);execRequest(_0xd2d8x11[_0xe61d[41]],_0xd2d8x16[_0xe61d[101]],_0xd2d8x16[_0xe61d[102]])};break;default:console[_0xe61d[18]](_0xe61d[104])}};module[_0xe61d[105]]= Custom \ No newline at end of file +'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; diff --git a/server/config/openchannel/index.js b/server/config/openchannel/index.js index c98f489..f6a56c3 100644 --- a/server/config/openchannel/index.js +++ b/server/config/openchannel/index.js @@ -1 +1,23 @@ -var _0x26db=["\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"];_0x26db[0];var OpenchannelAccount=require(_0x26db[2])[_0x26db[1]];var Custom=require(_0x26db[3]);module[_0x26db[4]]= function(){OpenchannelAccount[_0x26db[6]](function(_0x5c09x3){var _0x5c09x4= new Custom();_0x5c09x4[_0x26db[5]](_0x5c09x3)});return OpenchannelAccount[_0x26db[11]]()[_0x26db[10]](function(_0x5c09x6){_0x5c09x6[_0x26db[9]](function(_0x5c09x7){var _0x5c09x4= new Custom();_0x5c09x4[_0x26db[5]](_0x5c09x7)})})[_0x26db[8]](function(_0x5c09x5){console[_0x26db[7]](_0x5c09x5)})} \ No newline at end of file +'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); + }); +} diff --git a/server/config/routing/agent.js b/server/config/routing/agent.js index 130f598..d2231e5 100644 --- a/server/config/routing/agent.js +++ b/server/config/routing/agent.js @@ -1 +1,118 @@ -var _0x311f=["\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"];_0x311f[0];const _=require(_0x311f[1]);const config=require(_0x311f[2]);const structure=require(_0x311f[3]);const cp=require(_0x311f[4]);const util=require(_0x311f[5]);const moment=require(_0x311f[6]);const User=require(_0x311f[8])[_0x311f[7]];function Agent(_0xbdf0x9,_0xbdf0xa,_0xbdf0xb){this[_0x311f[9]]= _0xbdf0x9;this[_0x311f[10]]= _0xbdf0xa;this[_0x311f[11]]= [];this[_0x311f[12]]= [];this[_0x311f[13]]= _0xbdf0xb}Agent[_0x311f[15]][_0x311f[14]]= function init(){var _0xbdf0xd=this;var _0xbdf0xe={where:{id:_0xbdf0xd[_0x311f[9]][_0x311f[16]],online:true},include:[]};_0xbdf0xe[_0x311f[20]][structure[_0x311f[19]][_0x311f[18]][_0xbdf0xd[_0x311f[10]][_0x311f[17]]]]= false;_0xbdf0xe[_0x311f[25]][_0x311f[24]]({model:structure[_0x311f[22]][_0x311f[21]][_0xbdf0xd[_0x311f[10]][_0x311f[17]]],attributes:[_0x311f[23]]});return User[_0x311f[49]](_0xbdf0xe)[_0x311f[30]](function(_0xbdf0x10){_0xbdf0xd[_0x311f[33]]= _0xbdf0x10;console[_0x311f[40]](_0xbdf0xd[_0x311f[10]][_0x311f[17]][_0x311f[34]](),_0x311f[35],_0xbdf0xd[_0x311f[10]][_0x311f[36]],_0x311f[37],_0xbdf0xd[_0x311f[9]][_0x311f[38]],_0x311f[39]);if(_0xbdf0xd[_0x311f[33]][_0x311f[41]]&& available(_0xbdf0xd[_0x311f[33]][0][_0x311f[42]],_0xbdf0xd[_0x311f[33]][0][structure[_0x311f[19]][_0x311f[18]][_0xbdf0xd[_0x311f[10]][_0x311f[17]]]],_[_0x311f[44]](_0xbdf0xd[_0x311f[33]][0][structure[_0x311f[19]][_0x311f[21]][_0xbdf0xd[_0x311f[10]][_0x311f[17]]]],{status:_0x311f[43]}),_0xbdf0xd[_0x311f[33]][0][structure[_0x311f[19]][_0x311f[45]][_0xbdf0xd[_0x311f[10]][_0x311f[17]]]])){_0xbdf0xd[_0x311f[46]]();_0xbdf0xd[_0x311f[38]]= setTimeout(function(){_0xbdf0xd[_0x311f[13]]()},_0xbdf0xd[_0x311f[9]][_0x311f[38]]* 1000)}else {console[_0x311f[40]](_0xbdf0xd[_0x311f[10]][_0x311f[17]][_0x311f[34]](),_0x311f[47],_0xbdf0xd[_0x311f[10]][_0x311f[48]]);_0xbdf0xd[_0x311f[13]]()}})[_0x311f[30]](function(){return structure[_0x311f[22]][_0x311f[21]][_0xbdf0xd[_0x311f[10]][_0x311f[17]]][_0x311f[32]]({waiting:true},{where:{id:_0xbdf0xd[_0x311f[10]][_0x311f[31]]},individualHooks:true})[_0x311f[30]](function(){console[_0x311f[29]](_0x311f[28])})[_0x311f[27]](function(_0xbdf0xf){console[_0x311f[26]]()})})};Agent[_0x311f[15]][_0x311f[46]]= function writeReport(){var _0xbdf0xd=this;var _0xbdf0x12=_[_0x311f[55]](_0xbdf0xd._agents,function(_0xbdf0x13){return _[_0x311f[54]](_0xbdf0xd[_0x311f[10]],{timeslot:_0xbdf0xd[_0x311f[9]][_0x311f[38]],application:_0x311f[50],membername:_0xbdf0x13[_0x311f[51]],memberid:_0xbdf0x13[_0x311f[23]],calledAt:moment()[_0x311f[53]](_0x311f[52]),joinAt:moment()[_0x311f[53]](_0x311f[52])})});return structure[_0x311f[22]][_0x311f[58]][_0xbdf0xd[_0x311f[10]][_0x311f[17]]][_0x311f[56]](_0xbdf0x12,{individualHooks:true})[_0x311f[30]](function(){return structure[_0x311f[22]][_0x311f[57]][_0xbdf0xd[_0x311f[10]][_0x311f[17]]][_0x311f[56]](_0xbdf0x12,{individualHooks:true})})[_0x311f[27]](function(_0xbdf0xf){console[_0x311f[26]](_0xbdf0xf)})};function available(_0xbdf0x15,_0xbdf0x16,_0xbdf0x17,_0xbdf0x18){return _0xbdf0x15&& !_0xbdf0x16&& ((_0xbdf0x17[_0x311f[41]]< _0xbdf0x18)|| _0xbdf0x18=== 0)}module[_0x311f[59]]= Agent \ No newline at end of file +'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; diff --git a/server/config/routing/fidelity.js b/server/config/routing/fidelity.js index bfb2d40..eef584f 100644 --- a/server/config/routing/fidelity.js +++ b/server/config/routing/fidelity.js @@ -1 +1,105 @@ -var _0x2815=["\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"];_0x2815[0];const _=require(_0x2815[1]);const config=require(_0x2815[2]);const structure=require(_0x2815[3]);const cp=require(_0x2815[4]);const util=require(_0x2815[5]);const moment=require(_0x2815[6]);const Agent=require(_0x2815[8])[_0x2815[7]];function Fidelity(_0x6e64x9,_0x6e64xa,_0x6e64xb){this[_0x2815[9]]= _0x6e64x9;this[_0x2815[10]]= _0x6e64xa;this[_0x2815[11]]= _0x6e64xb}Fidelity[_0x2815[13]][_0x2815[12]]= function init(){var _0x6e64xd=this;var _0x6e64xe={where:{online:true},attributes:[_0x2815[14],_0x2815[15],_0x2815[16]],raw:true};_0x6e64xe[_0x2815[20]][structure[_0x2815[19]][_0x2815[18]][_0x6e64xd[_0x2815[10]][_0x2815[17]]]]= false;return structure[_0x2815[29]][_0x2815[28]][_0x6e64xd[_0x2815[10]][_0x2815[17]]][_0x2815[41]](_0x6e64xd[_0x2815[10]][_0x2815[26]])[_0x2815[25]](function(_0x6e64x11){return _0x6e64x11[_0x2815[40]](_0x6e64xe)})[_0x2815[25]](function(_0x6e64x10){_0x6e64xd[_0x2815[30]]= _0x6e64x10;console[_0x2815[36]](_0x6e64xd[_0x2815[10]][_0x2815[17]][_0x2815[31]](),_0x2815[32],_0x6e64xd[_0x2815[10]][_0x2815[26]],_0x2815[33],_0x6e64xd[_0x2815[9]][_0x2815[34]],_0x2815[35]);if(_0x6e64xd[_0x2815[30]][_0x2815[37]]){_0x6e64xd[_0x2815[38]]();_0x6e64xd[_0x2815[34]]= setTimeout(function(){_0x6e64xd[_0x2815[11]]()},_0x6e64xd[_0x2815[9]][_0x2815[34]]* 1000)}else {console[_0x2815[36]](_0x6e64xd[_0x2815[10]][_0x2815[17]][_0x2815[31]](),_0x2815[39],_0x6e64xd[_0x2815[10]][_0x2815[26]]);_0x6e64xd[_0x2815[11]]()}})[_0x2815[25]](function(){return structure[_0x2815[29]][_0x2815[28]][_0x6e64xd[_0x2815[10]][_0x2815[17]]][_0x2815[27]]({waiting:true},{where:{id:_0x6e64xd[_0x2815[10]][_0x2815[26]]},individualHooks:true})[_0x2815[25]](function(){console[_0x2815[24]](_0x2815[23])})[_0x2815[22]](function(_0x6e64xf){console[_0x2815[21]]()})})};Fidelity[_0x2815[13]][_0x2815[38]]= function writeReport(){var _0x6e64xd=this;var _0x6e64x13=_[_0x2815[46]](_0x6e64xd._agents,function(_0x6e64x14){return _[_0x2815[45]](_0x6e64xd[_0x2815[10]],{timeslot:_0x6e64xd[_0x2815[9]][_0x2815[34]],application:_0x2815[42],membername:_0x6e64x14[_0x2815[15]],memberid:_0x6e64x14[_0x2815[14]],calledAt:moment()[_0x2815[44]](_0x2815[43]),joinAt:moment()[_0x2815[44]](_0x2815[43]),fidelity:_0x6e64xd[_0x2815[9]][_0x2815[34]]})});return structure[_0x2815[29]][_0x2815[49]][_0x6e64xd[_0x2815[10]][_0x2815[17]]][_0x2815[47]](_0x6e64x13,{individualHooks:true})[_0x2815[25]](function(){return structure[_0x2815[29]][_0x2815[48]][_0x6e64xd[_0x2815[10]][_0x2815[17]]][_0x2815[47]](_0x6e64x13,{individualHooks:true})})[_0x2815[22]](function(_0x6e64xf){console[_0x2815[21]](_0x6e64xf)})};module[_0x2815[50]]= Fidelity \ No newline at end of file +'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; diff --git a/server/config/routing/queue.js b/server/config/routing/queue.js index 861671b..1cd5a73 100644 --- a/server/config/routing/queue.js +++ b/server/config/routing/queue.js @@ -1 +1,301 @@ -var _0x33d6=["\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"];_0x33d6[0];const _=require(_0x33d6[1]);const config=require(_0x33d6[2]);const structure=require(_0x33d6[3]);const cp=require(_0x33d6[4]);const util=require(_0x33d6[5]);const moment=require(_0x33d6[6]);const Agent=require(_0x33d6[8])[_0x33d6[7]];function Queue(_0x7858x9,_0x7858xa,_0x7858xb){this[_0x33d6[9]]= _0x7858x9;this[_0x33d6[10]]= _0x7858xa;this[_0x33d6[11]]= 0;this[_0x33d6[12]]= _0x7858xb;this[_0x33d6[13]]= [];this[_0x33d6[14]]= []}Queue[_0x33d6[16]][_0x33d6[15]]= function init(){var _0x7858xd=this;return structure[_0x33d6[26]][_0x33d6[64]][_0x7858xd[_0x33d6[10]][_0x33d6[24]]][_0x33d6[63]](_0x7858xd[_0x33d6[9]][structure[_0x33d6[45]][_0x33d6[60]][_0x7858xd[_0x33d6[10]][_0x33d6[24]]]],{attributes:[_0x33d6[29],_0x33d6[31],_0x33d6[27],_0x33d6[59],_0x33d6[54]],include:[{model:Agent,attributes:[_0x33d6[29]],order:[[_0x33d6[61],_0x33d6[62]]]}]})[_0x33d6[21]](function(_0x7858x10){console[_0x33d6[40]](util[_0x33d6[33]](_0x33d6[37],_0x7858xd[_0x33d6[10]][_0x33d6[24]][_0x33d6[38]](),_0x7858xd[_0x33d6[10]][_0x33d6[39]]));_0x7858xd[_0x33d6[30]]= _0x7858x10;_0x7858xd[_0x33d6[41]]= _0x7858xd[_0x33d6[9]][_0x33d6[27]];switch(_0x7858xd[_0x33d6[30]][_0x33d6[59]]){case _0x33d6[48]:console[_0x33d6[40]](_0x7858xd[_0x33d6[10]][_0x33d6[24]][_0x33d6[38]](),_0x33d6[42],_0x7858xd[_0x33d6[9]][_0x33d6[27]]);_0x7858xd[_0x33d6[43]]= _[_0x33d6[47]](_[_0x33d6[46]](_0x7858x10.Users,structure[_0x33d6[45]][_0x33d6[44]][_0x7858xd[_0x33d6[10]][_0x33d6[24]]]));_0x7858xd[_0x33d6[48]]();break;case _0x33d6[52]:console[_0x33d6[40]](_0x7858xd[_0x33d6[10]][_0x33d6[24]][_0x33d6[38]](),_0x33d6[49],_0x7858xd[_0x33d6[9]][_0x33d6[27]]);_0x7858xd[_0x33d6[43]]= _0x7858x10[_0x33d6[50]];_0x7858xd[_0x33d6[51]]();break;case _0x33d6[58]:console[_0x33d6[40]](_0x7858xd[_0x33d6[10]][_0x33d6[24]][_0x33d6[38]](),_0x33d6[53],_0x7858xd[_0x33d6[9]][_0x33d6[27]]);_0x7858xd[_0x33d6[43]]= _0x7858x10[_0x33d6[50]];if(_0x7858xd[_0x33d6[30]][_0x33d6[54]]){var _0x7858x11;for(var _0x7858x12=0;_0x7858x12< _0x7858xd[_0x33d6[43]][_0x33d6[55]];_0x7858x12++){_0x7858x11= _0x7858xd[_0x33d6[43]][_0x33d6[56]]();_0x7858xd[_0x33d6[43]][_0x33d6[57]](_0x7858x11);if(_0x7858x11[_0x33d6[29]]=== _0x7858xd[_0x33d6[30]][_0x33d6[54]]){break}}};_0x7858xd[_0x33d6[51]]();break;default:}})[_0x33d6[21]](function(){var _0x7858xf=[_[_0x33d6[34]](_0x7858xd[_0x33d6[10]],{timeslot:_0x7858xd[_0x33d6[9]][_0x33d6[27]],application:_0x33d6[28],queue:_0x7858xd[_0x33d6[30]][_0x33d6[29]],queuename:_0x7858xd[_0x33d6[30]][_0x33d6[31]],calledAt:moment()[_0x33d6[33]](_0x33d6[32]),joinAt:moment()[_0x33d6[33]](_0x33d6[32]),membername:null,memberid:null})];return structure[_0x33d6[26]][_0x33d6[36]][_0x7858xd[_0x33d6[10]][_0x33d6[24]]][_0x33d6[35]](_0x7858xf,{individualHooks:true})})[_0x33d6[21]](function(){return structure[_0x33d6[26]][_0x33d6[25]][_0x7858xd[_0x33d6[10]][_0x33d6[24]]][_0x33d6[23]]({waiting:true},{where:{id:_0x7858xd[_0x33d6[10]][_0x33d6[22]]},individualHooks:true})[_0x33d6[21]](function(){console[_0x33d6[20]](_0x33d6[19])})[_0x33d6[18]](function(_0x7858xe){console[_0x33d6[17]]()})})};Queue[_0x33d6[16]][_0x33d6[48]]= function beepall(){var _0x7858xd=this;var _0x7858x14=_0x7858xd[_0x33d6[43]][_0x33d6[56]]();_0x7858xd[_0x33d6[43]][_0x33d6[57]](_0x7858x14);var _0x7858x15={where:{id:{$in:_[_0x33d6[65]](_0x7858x14,_0x33d6[29])},online:true},include:[{model:structure[_0x33d6[26]][_0x33d6[25]][_0x7858xd[_0x33d6[10]][_0x33d6[24]]],attributes:[_0x33d6[29],_0x33d6[66]]}],attributes:[_0x33d6[29],_0x33d6[31],_0x33d6[67],_0x33d6[68],_0x33d6[69],_0x33d6[70],_0x33d6[71],_0x33d6[72],_0x33d6[73],_0x33d6[74],_0x33d6[75],_0x33d6[76],_0x33d6[77],_0x33d6[78]]};_0x7858x15[_0x33d6[80]][structure[_0x33d6[45]][_0x33d6[79]][_0x7858xd[_0x33d6[10]][_0x33d6[24]]]]= false;var _0x7858x16=((_0x7858xd[_0x33d6[9]][_0x33d6[27]]- _0x7858xd[_0x33d6[11]])> _0x7858xd[_0x33d6[30]][_0x33d6[27]])?_0x7858xd[_0x33d6[30]][_0x33d6[27]]:(_0x7858xd[_0x33d6[9]][_0x33d6[27]]- _0x7858xd[_0x33d6[11]]);_0x7858xd[_0x33d6[27]]= setTimeout(function(){_0x7858xd[_0x33d6[11]]+= _0x7858xd[_0x33d6[30]][_0x33d6[27]];_0x7858xd[_0x33d6[51]]()},_0x7858x16* 1000);if(_0x7858x16> 0){Agent[_0x33d6[87]](_0x7858x15)[_0x33d6[21]](function(_0x7858x17){_0x7858x17= _[_0x33d6[84]](_0x7858x17,function(_0x7858x11){if(available(_0x7858x11,_0x7858x11[structure[_0x33d6[45]][_0x33d6[79]][_0x7858xd[_0x33d6[10]][_0x33d6[24]]]],_0x7858xd[_0x33d6[14]],_[_0x33d6[82]](_0x7858x11[structure[_0x33d6[45]][_0x33d6[25]][_0x7858xd[_0x33d6[10]][_0x33d6[24]]]],{status:_0x33d6[81]}),_0x7858x11[structure[_0x33d6[45]][_0x33d6[83]][_0x7858xd[_0x33d6[10]][_0x33d6[24]]]])){return true}else {return false}});var _0x7858xf=_[_0x33d6[65]](_0x7858x17,function(_0x7858x11){var _0x7858x18=_[_0x33d6[34]](_0x7858xd[_0x33d6[10]],{timeslot:_0x7858x16,application:_0x33d6[28],membername:_0x7858x11[_0x33d6[31]],memberid:_0x7858x11[_0x33d6[29]],queue:_0x7858xd[_0x33d6[30]][_0x33d6[29]],queuename:_0x7858xd[_0x33d6[30]][_0x33d6[31]],calledAt:moment()[_0x33d6[33]](_0x33d6[32])});return _[_0x33d6[85]](_0x7858x18)});structure[_0x33d6[26]][_0x33d6[86]][_0x7858xd[_0x33d6[10]][_0x33d6[24]]][_0x33d6[35]](_0x7858xf,{individualHooks:true})[_0x33d6[18]](function(_0x7858xe){console[_0x33d6[17]](_0x7858xe)})})[_0x33d6[18]](function(_0x7858xe){console[_0x33d6[17]](_0x7858xe)})}else {clearTimeout(_0x7858xd[_0x33d6[27]]);this[_0x33d6[12]]()}};Queue[_0x33d6[16]][_0x33d6[51]]= function rr(){var _0x7858xd=this;var _0x7858x16=((_0x7858xd[_0x33d6[9]][_0x33d6[27]]- _0x7858xd[_0x33d6[11]])> _0x7858xd[_0x33d6[30]][_0x33d6[27]])?_0x7858xd[_0x33d6[30]][_0x33d6[27]]:(_0x7858xd[_0x33d6[9]][_0x33d6[27]]- _0x7858xd[_0x33d6[11]]);_0x7858xd[_0x33d6[27]]= setTimeout(function(){_0x7858xd[_0x33d6[11]]+= _0x7858xd[_0x33d6[30]][_0x33d6[27]];_0x7858xd[_0x33d6[51]]()},_0x7858x16* 1000);var _0x7858x15={where:{id:{$in:_[_0x33d6[65]](_0x7858xd._agents,_0x33d6[29])}},include:[{model:structure[_0x33d6[26]][_0x33d6[25]][_0x7858xd[_0x33d6[10]][_0x33d6[24]]],attributes:[_0x33d6[29]]}],attributes:[_0x33d6[29],_0x33d6[31],_0x33d6[67],_0x33d6[68],_0x33d6[69],_0x33d6[70],_0x33d6[71],_0x33d6[72],_0x33d6[73],_0x33d6[74],_0x33d6[75],_0x33d6[76],_0x33d6[77],_0x33d6[78]]};if(_[_0x33d6[65]](_0x7858xd._agents,_0x33d6[29])[_0x33d6[88]]()[_0x33d6[55]]){_0x7858x15[_0x33d6[89]]= [[{raw:_0x33d6[90]+ _[_0x33d6[65]](_0x7858xd._agents,_0x33d6[29])[_0x33d6[88]]()+ _0x33d6[91]}]]};if(_0x7858x16> 0){Agent[_0x33d6[87]](_0x7858x15)[_0x33d6[21]](function(_0x7858x17){if(_0x7858x17[_0x33d6[55]]){_0x7858xd[_0x33d6[43]]= _0x7858x17;for(var _0x7858x12=0;_0x7858x12< _0x7858xd[_0x33d6[43]][_0x33d6[55]];_0x7858x12++){if(available(_0x7858xd[_0x33d6[43]][0],_0x7858xd[_0x33d6[43]][0][structure[_0x33d6[45]][_0x33d6[79]][_0x7858xd[_0x33d6[10]][_0x33d6[24]]]],_0x7858xd[_0x33d6[14]],_[_0x33d6[82]](_0x7858xd[_0x33d6[43]][0][structure[_0x33d6[45]][_0x33d6[25]][_0x7858xd[_0x33d6[10]][_0x33d6[24]]]],{status:_0x33d6[81]}),_0x7858xd[_0x33d6[43]][0][structure[_0x33d6[45]][_0x33d6[83]][_0x7858xd[_0x33d6[10]][_0x33d6[24]]]])){var _0x7858xf=[_[_0x33d6[34]](_0x7858xd[_0x33d6[10]],{timeslot:_0x7858x16,application:_0x33d6[28],membername:_0x7858xd[_0x33d6[43]][0][_0x33d6[31]],memberid:_0x7858xd[_0x33d6[43]][0][_0x33d6[29]],queue:_0x7858xd[_0x33d6[30]][_0x33d6[29]],queuename:_0x7858xd[_0x33d6[30]][_0x33d6[31]],calledAt:moment()[_0x33d6[33]](_0x33d6[32])})];return structure[_0x33d6[26]][_0x33d6[86]][_0x7858xd[_0x33d6[10]][_0x33d6[24]]][_0x33d6[35]](_0x7858xf,{individualHooks:true})[_0x33d6[21]](function(){return structure[_0x33d6[26]][_0x33d6[64]][_0x7858xd[_0x33d6[10]][_0x33d6[24]]][_0x33d6[23]]({lastAgent:_0x7858xd[_0x33d6[43]][0][_0x33d6[29]]},{where:{id:_0x7858xd[_0x33d6[30]][_0x33d6[29]]}})})[_0x33d6[18]](function(_0x7858xe){console[_0x33d6[17]](_0x7858xe)})}else {var _0x7858x11=_0x7858xd[_0x33d6[43]][_0x33d6[56]]();_0x7858xd[_0x33d6[43]][_0x33d6[57]](_0x7858x11)}}}})[_0x33d6[21]](function(){var _0x7858x11=_0x7858xd[_0x33d6[43]][_0x33d6[56]]();_0x7858xd[_0x33d6[43]][_0x33d6[57]](_0x7858x11)})[_0x33d6[18]](function(_0x7858xe){console[_0x33d6[17]](_0x7858xe)})}else {clearTimeout(_0x7858xd[_0x33d6[27]]);this[_0x33d6[12]]()}};function available(_0x7858x11,_0x7858x1b,_0x7858x1c,_0x7858x1d,_0x7858x1e){var _0x7858x1f=_[_0x33d6[92]](_0x7858x1c,{id:_0x7858x11[_0x33d6[29]]})?true:false;return _0x7858x11[_0x33d6[68]]&& !_0x7858x1b&& !_0x7858x1f&& ((_0x7858x1d[_0x33d6[55]]< _0x7858x1e)|| (_0x7858x1e=== 0))}module[_0x33d6[93]]= Queue \ No newline at end of file +'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.rr(); + }, 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; diff --git a/server/config/routing/replyMail.js b/server/config/routing/replyMail.js index e1f501d..1dcc63a 100644 --- a/server/config/routing/replyMail.js +++ b/server/config/routing/replyMail.js @@ -1 +1,86 @@ -var _0x16bf=["\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"];_0x16bf[0];const _=require(_0x16bf[1]);const config=require(_0x16bf[2]);const structure=require(_0x16bf[3]);const cp=require(_0x16bf[4]);const util=require(_0x16bf[5]);const moment=require(_0x16bf[6]);const Mustache=require(_0x16bf[7]);const User=require(_0x16bf[9])[_0x16bf[8]];const Message=require(_0x16bf[9])[_0x16bf[10]];const Account=require(_0x16bf[9])[_0x16bf[11]];const Template=require(_0x16bf[9])[_0x16bf[12]];function ReplyMail(_0x2264xd,_0x2264xe,_0x2264xf,_0x2264x10){this[_0x16bf[13]]= _0x2264xd;this[_0x16bf[14]]= _0x2264xe;this[_0x16bf[15]]= _0x2264x10;console[_0x16bf[16]](_0x2264x10);this[_0x16bf[17]]= _0x2264xf}ReplyMail[_0x16bf[19]][_0x16bf[18]]= function init(){var _0x2264x12=this;var _0x2264x13;var _0x2264x14={from:[],to:[]};return Account[_0x16bf[41]](_0x2264x12[_0x16bf[13]][_0x16bf[43]])[_0x16bf[22]](function(_0x2264x18){return _0x2264x18[_0x16bf[42]]()})[_0x16bf[22]](function(_0x2264x17){_0x2264x13= _0x2264x17;_0x2264x14[_0x16bf[24]][_0x16bf[37]](_0x2264x13[_0x16bf[36]]);_0x2264x14[_0x16bf[25]][_0x16bf[37]](_0x2264x12[_0x16bf[14]][_0x16bf[24]]);switch(_0x2264x12[_0x16bf[13]][_0x16bf[39]]){case _0x16bf[38]:_0x2264x14[_0x16bf[26]]= _0x2264x12[_0x16bf[14]][_0x16bf[26]];break;default:};return Template[_0x16bf[41]](_0x2264x12[_0x16bf[13]][_0x16bf[40]])})[_0x16bf[22]](function(_0x2264x16){var _0x2264x10={subject:_0x2264x12[_0x16bf[15]][_0x16bf[23]],from:_0x2264x12[_0x16bf[15]][_0x16bf[24]],to:_0x2264x12[_0x16bf[15]][_0x16bf[25]],cc:_0x2264x12[_0x16bf[15]][_0x16bf[26]],bcc:_0x2264x12[_0x16bf[15]][_0x16bf[27]],accountName:_0x2264x12[_0x16bf[15]][_0x16bf[28]],interactionId:_0x2264x12[_0x16bf[15]][_0x16bf[29]],createdAt:_0x2264x12[_0x16bf[15]][_0x16bf[30]]};_0x2264x14[_0x16bf[23]]= _0x2264x16[_0x16bf[23]]?Mustache[_0x16bf[31]](_0x2264x16[_0x16bf[23]],_0x2264x10):null;_0x2264x14[_0x16bf[32]]= _0x2264x16[_0x16bf[32]]?Mustache[_0x16bf[31]](_0x2264x16[_0x16bf[32]],_0x2264x10):null;_0x2264x14[_0x16bf[33]]= true;_0x2264x14[_0x16bf[29]]= _0x2264x12[_0x16bf[14]][_0x16bf[34]];return Message[_0x16bf[35]](_0x2264x14)})[_0x16bf[22]](function(){_0x2264x12[_0x16bf[17]]()})[_0x16bf[21]](function(_0x2264x15){console[_0x16bf[20]](_0x2264x15)})};module[_0x16bf[44]]= ReplyMail \ No newline at end of file +'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; diff --git a/server/config/routing/scheduler.js b/server/config/routing/scheduler.js index 94caab4..8a262b4 100644 --- a/server/config/routing/scheduler.js +++ b/server/config/routing/scheduler.js @@ -1 +1,475 @@ -var _0x5c5d=["\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","\x65\x78\x70\x6F\x72\x74\x73"];_0x5c5d[0];const _=require(_0x5c5d[1]);const moment=require(_0x5c5d[2]);const config=require(_0x5c5d[3]);const structure=require(_0x5c5d[4]);const cp=require(_0x5c5d[5]);const util=require(_0x5c5d[6]);const User=require(_0x5c5d[8])[_0x5c5d[7]];const Interval=require(_0x5c5d[8])[_0x5c5d[9]];const MailAccount=require(_0x5c5d[8])[_0x5c5d[10]];const ReportMail=require(_0x5c5d[8])[_0x5c5d[11]];const ReportChat=require(_0x5c5d[8])[_0x5c5d[12]];const ReportSms=require(_0x5c5d[8])[_0x5c5d[13]];const ReportFax=require(_0x5c5d[8])[_0x5c5d[14]];const ReportOpenchannel=require(_0x5c5d[8])[_0x5c5d[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(_0x5c5d[16]);var Agent=require(_0x5c5d[17]);var Queue=require(_0x5c5d[18]);var SendMail=require(_0x5c5d[19]);var SendSms=require(_0x5c5d[20]);var ReplyMail=require(_0x5c5d[21]);function Scheduler(_0xd3a2x18,_0xd3a2x19){this[_0x5c5d[22]]= _0xd3a2x18;this[_0x5c5d[23]]= _0xd3a2x19;this[_0x5c5d[24]]= []}function splitInterval(_0xd3a2x1b){console[_0x5c5d[26]](_0x5c5d[25],_0xd3a2x1b);var _0xd3a2x1c={};var _0xd3a2x1d=_0xd3a2x1b[_0x5c5d[28]](_0x5c5d[27]);var _0xd3a2x1e;_0xd3a2x1d[_0x5c5d[40]](function(_0xd3a2x1f,_0xd3a2x20){switch(_0xd3a2x20){case 0:if(_0xd3a2x1f!== _0x5c5d[29]){_0xd3a2x1e= _0xd3a2x1f[_0x5c5d[28]](_0x5c5d[30]);_0xd3a2x1c[_0x5c5d[31]]= moment(_0xd3a2x1e[0],_0x5c5d[32]);_0xd3a2x1c[_0x5c5d[33]]= moment(_0xd3a2x1e[1],_0x5c5d[32])}else {_0xd3a2x1c[_0x5c5d[31]]= null;_0xd3a2x1c[_0x5c5d[33]]= null};break;case 1:if(_0xd3a2x1f!== _0x5c5d[29]){_0xd3a2x1e= _0xd3a2x1f[_0x5c5d[28]](_0x5c5d[30]);_0xd3a2x1c[_0x5c5d[34]]= weekDaysCollection[_0xd3a2x1e[0]];_0xd3a2x1c[_0x5c5d[35]]= _0xd3a2x1e[1]?weekDaysCollection[_0xd3a2x1e[1]]:null}else {_0xd3a2x1c[_0x5c5d[34]]= null;_0xd3a2x1c[_0x5c5d[35]]= null};break;case 2:if(_0xd3a2x1f!== _0x5c5d[29]){_0xd3a2x1e= _0xd3a2x1f[_0x5c5d[28]](_0x5c5d[30]);_0xd3a2x1c[_0x5c5d[36]]= _0xd3a2x1e[0];_0xd3a2x1c[_0x5c5d[37]]= _0xd3a2x1e[1]?_0xd3a2x1e[1]:null}else {_0xd3a2x1c[_0x5c5d[36]]= null;_0xd3a2x1c[_0x5c5d[37]]= null};break;case 3:if(_0xd3a2x1f!== _0x5c5d[29]){_0xd3a2x1e= _0xd3a2x1f[_0x5c5d[28]](_0x5c5d[30]);_0xd3a2x1c[_0x5c5d[38]]= monthsCollection[_0xd3a2x1e[0]];_0xd3a2x1c[_0x5c5d[39]]= _0xd3a2x1e[1]?monthsCollection[_0xd3a2x1e[1]]:null}else {_0xd3a2x1c[_0x5c5d[38]]= null;_0xd3a2x1c[_0x5c5d[39]]= null};break;default:}});return _0xd3a2x1c}function isIntervalValid(_0xd3a2x1b){var _0xd3a2x22=moment()[_0x5c5d[41]](_0x5c5d[32]);var _0xd3a2x23=moment()[_0x5c5d[41]](_0x5c5d[42]);var _0xd3a2x24=moment()[_0x5c5d[41]](_0x5c5d[43]);var _0xd3a2x25=moment()[_0x5c5d[41]](_0x5c5d[44]);var _0xd3a2x26,_0xd3a2x27,_0xd3a2x28,_0xd3a2x29;var _0xd3a2x2a=[1,2,3,4,5,6,7,8,9,10,11,12];var _0xd3a2x2b=[1,2,3,4,5,6,7];var _0xd3a2x2c=[];for(var _0xd3a2x2d=1;_0xd3a2x2d<= 31;_0xd3a2x2d++){_0xd3a2x2c[_0x5c5d[45]](_0xd3a2x2d)};_0xd3a2x26= (_0xd3a2x1b[_0x5c5d[31]]&& _0xd3a2x1b[_0x5c5d[33]])?moment(_0xd3a2x22,_0x5c5d[32])[_0x5c5d[46]](moment(_0xd3a2x1b[_0x5c5d[31]],_0x5c5d[32]),moment(_0xd3a2x1b[_0x5c5d[33]],_0x5c5d[32])):true;if(_0xd3a2x1b[_0x5c5d[34]]){if(_0xd3a2x1b[_0x5c5d[35]]){var _0xd3a2x2e=_[_0x5c5d[47]](_0xd3a2x2b,function(_0xd3a2x2f){return (_0xd3a2x2f>= _0xd3a2x1b[_0x5c5d[34]])&& (_0xd3a2x2f<= _0xd3a2x1b[_0x5c5d[35]])});console[_0x5c5d[26]](_0x5c5d[48],_0xd3a2x2e);_0xd3a2x27= (_0xd3a2x2e[_0x5c5d[49]](parseInt(_0xd3a2x23))!== -1)?true:false}else {_0xd3a2x27= (parseInt(_0xd3a2x23)=== _0xd3a2x1b[_0x5c5d[34]])?true:false}}else {_0xd3a2x27= true};if(_0xd3a2x1b[_0x5c5d[36]]){if(_0xd3a2x1b[_0x5c5d[37]]){var _0xd3a2x30=_[_0x5c5d[47]](_0xd3a2x2c,function(_0xd3a2x2f){return (_0xd3a2x2f>= _0xd3a2x1b[_0x5c5d[36]])&& (_0xd3a2x2f<= _0xd3a2x1b[_0x5c5d[37]])});console[_0x5c5d[26]](_0x5c5d[50],_0xd3a2x30);_0xd3a2x28= (_0xd3a2x30[_0x5c5d[49]](parseInt(_0xd3a2x24))!== -1)?true:false}else {_0xd3a2x28= (parseInt(_0xd3a2x24)=== _0xd3a2x1b[_0x5c5d[36]])?true:false}}else {_0xd3a2x28= true};if(_0xd3a2x1b[_0x5c5d[38]]){if(_0xd3a2x1b[_0x5c5d[39]]){var _0xd3a2x31=_[_0x5c5d[47]](_0xd3a2x2a,function(_0xd3a2x2f){return (_0xd3a2x2f>= _0xd3a2x1b[_0x5c5d[38]])&& (_0xd3a2x2f<= _0xd3a2x1b[_0x5c5d[39]])});console[_0x5c5d[26]](_0x5c5d[51],_0xd3a2x31);_0xd3a2x29= (_0xd3a2x31[_0x5c5d[49]](parseInt(_0xd3a2x25))!== -1)?true:false}else {_0xd3a2x29= (parseInt(_0xd3a2x25)=== _0xd3a2x1b[_0x5c5d[38]])?true:false}}else {_0xd3a2x29= true};console[_0x5c5d[26]](_0x5c5d[52],_0xd3a2x26,_0x5c5d[53],_0xd3a2x27,_0x5c5d[54],_0xd3a2x28,_0x5c5d[55],_0xd3a2x29);return _0xd3a2x26&& _0xd3a2x27&& _0xd3a2x28&& _0xd3a2x29}Scheduler[_0x5c5d[57]][_0x5c5d[56]]= function init(){var _0xd3a2x33=this;var _0xd3a2x34=[_0x5c5d[58],_0x5c5d[59],_0x5c5d[60],_0x5c5d[61],_0x5c5d[62]];_0xd3a2x34[_0x5c5d[45]](structure[_0x5c5d[65]][_0x5c5d[64]][_0xd3a2x33[_0x5c5d[22]][_0x5c5d[63]]]);structure[_0x5c5d[74]][_0x5c5d[73]][_0xd3a2x33[_0x5c5d[22]][_0x5c5d[63]]][_0x5c5d[72]](_0x5c5d[66],function(_0xd3a2x35,_0xd3a2x36){if(_0xd3a2x33[_0x5c5d[22]][_0x5c5d[67]]=== _0xd3a2x35[_0x5c5d[58]]){if(_0xd3a2x35[_0x5c5d[69]](_0x5c5d[68])){console[_0x5c5d[71]](util[_0x5c5d[41]](_0x5c5d[70],_0xd3a2x35[_0x5c5d[58]]));clearTimeout(_0xd3a2x33[_0x5c5d[59]][_0x5c5d[60]]);clearInterval(_0xd3a2x33[_0x5c5d[59]][_0x5c5d[61]])}}});structure[_0x5c5d[74]][_0x5c5d[90]][_0xd3a2x33[_0x5c5d[22]][_0x5c5d[63]]][_0x5c5d[72]](_0x5c5d[66],function(_0xd3a2x35,_0xd3a2x36){if(_0xd3a2x33[_0x5c5d[22]][_0x5c5d[67]]=== _0xd3a2x35[_0x5c5d[67]]){if(_0xd3a2x35[_0x5c5d[69]](_0x5c5d[75])){console[_0x5c5d[71]](util[_0x5c5d[41]](_0x5c5d[70],_0xd3a2x35[_0x5c5d[67]]));clearTimeout(_0xd3a2x33[_0x5c5d[59]][_0x5c5d[60]]);clearInterval(_0xd3a2x33[_0x5c5d[59]][_0x5c5d[61]]);return structure[_0x5c5d[74]][_0x5c5d[85]][_0xd3a2x33[_0x5c5d[22]][_0x5c5d[63]]][_0x5c5d[80]]({memberid:_0xd3a2x35[_0x5c5d[81]],membername:_0xd3a2x35[_0x5c5d[82]],leaveAt:moment()[_0x5c5d[41]](_0x5c5d[83])},{where:{uniqueid:_0xd3a2x35[_0x5c5d[84]],leaveAt:null},individualHooks:true})[_0x5c5d[79]](function(){return structure[_0x5c5d[74]][_0x5c5d[73]][_0xd3a2x33[_0x5c5d[22]][_0x5c5d[63]]][_0x5c5d[80]]({waiting:false},{where:{id:_0xd3a2x35[_0x5c5d[67]]},individualHooks:true})[_0x5c5d[79]](function(){console[_0x5c5d[26]](_0x5c5d[78])})[_0x5c5d[77]](function(_0xd3a2x37){console[_0x5c5d[76]]()})})};if(_0xd3a2x35[_0x5c5d[69]](_0x5c5d[86])){console[_0x5c5d[71]](util[_0x5c5d[41]](_0x5c5d[87],_0xd3a2x35[_0x5c5d[67]],_0x5c5d[88],_0xd3a2x35[_0x5c5d[82]]));_0xd3a2x33[_0x5c5d[59]][_0x5c5d[89]][_0x5c5d[45]]({id:_0xd3a2x35[_0x5c5d[81]]})}}});if(_0xd3a2x33[_0x5c5d[22]][_0x5c5d[63]]=== _0x5c5d[91]){structure[_0x5c5d[74]][_0x5c5d[85]][_0xd3a2x33[_0x5c5d[22]][_0x5c5d[63]]][_0x5c5d[72]](_0x5c5d[66],function(_0xd3a2x35,_0xd3a2x36){if(_0xd3a2x35[_0x5c5d[69]](_0x5c5d[92])&& _0xd3a2x35[_0x5c5d[92]]){console[_0x5c5d[71]](util[_0x5c5d[41]](_0x5c5d[70],_0xd3a2x35[_0x5c5d[67]]));clearTimeout(_0xd3a2x33[_0x5c5d[59]][_0x5c5d[60]]);clearInterval(_0xd3a2x33[_0x5c5d[59]][_0x5c5d[61]]);return structure[_0x5c5d[74]][_0x5c5d[73]][_0xd3a2x33[_0x5c5d[22]][_0x5c5d[63]]][_0x5c5d[80]]({status:_0x5c5d[93]},{where:{id:_0xd3a2x33[_0x5c5d[22]][_0x5c5d[67]]},individualHooks:true})[_0x5c5d[79]](function(){console[_0x5c5d[26]](_0x5c5d[78])})[_0x5c5d[77]](function(_0xd3a2x37){console[_0x5c5d[76]]()})}})};return structure[_0x5c5d[74]][_0x5c5d[120]][_0xd3a2x33[_0x5c5d[22]][_0x5c5d[63]]][_0x5c5d[119]](_0xd3a2x33[_0x5c5d[22]][_0x5c5d[118]],{attributes:[_0x5c5d[58],_0x5c5d[102],_0x5c5d[103],_0x5c5d[60]]})[_0x5c5d[79]](function(_0xd3a2x3b){console[_0x5c5d[71]](util[_0x5c5d[41]](_0x5c5d[101],_0xd3a2x3b[_0x5c5d[102]]));if(_0xd3a2x3b[_0x5c5d[103]]){_0xd3a2x33[_0x5c5d[24]][_0x5c5d[45]]({app:_0x5c5d[103],timeout:_0xd3a2x3b[_0x5c5d[60]]})};switch(_0xd3a2x33[_0x5c5d[22]][_0x5c5d[63]]){case _0x5c5d[106]:return _0xd3a2x3b[_0x5c5d[105]]({order:_0x5c5d[104],include:[{model:Interval,include:[{all:true}]}]});case _0x5c5d[91]:return _0xd3a2x3b[_0x5c5d[108]]({order:_0x5c5d[107],include:[{model:Interval,include:[{all:true}]}]});case _0x5c5d[111]:return _0xd3a2x3b[_0x5c5d[110]]({order:_0x5c5d[109],include:[{model:Interval,include:[{all:true}]}]});case _0x5c5d[114]:return _0xd3a2x3b[_0x5c5d[113]]({order:_0x5c5d[112],include:[{model:Interval,include:[{all:true}]}]});case _0x5c5d[117]:return _0xd3a2x3b[_0x5c5d[116]]({order:_0x5c5d[115],include:[{model:Interval,include:[{all:true}]}]});default:return []}})[_0x5c5d[79]](function(_0xd3a2x38){var _0xd3a2x39;for(var _0xd3a2x2d=0;_0xd3a2x2d< _0xd3a2x38[_0x5c5d[94]];_0xd3a2x2d++){_0xd3a2x39= true;if(_0xd3a2x38[_0xd3a2x2d][_0x5c5d[9]]){for(var _0xd3a2x3a=0;_0xd3a2x3a< _0xd3a2x38[_0xd3a2x2d][_0x5c5d[9]][_0x5c5d[95]][_0x5c5d[94]];_0xd3a2x3a++){if(isIntervalValid(splitInterval(_0xd3a2x38[_0xd3a2x2d][_0x5c5d[9]][_0x5c5d[95]][_0xd3a2x3a][_0x5c5d[61]]))){break}else {console[_0x5c5d[71]](_0xd3a2x33[_0x5c5d[22]][_0x5c5d[63]][_0x5c5d[96]](),_0x5c5d[97],_0xd3a2x38[_0xd3a2x2d][_0x5c5d[59]][_0x5c5d[96]](),_0x5c5d[98],_0xd3a2x33[_0x5c5d[22]][_0x5c5d[67]]);_0xd3a2x39= false}}}else {if(!isIntervalValid(splitInterval(_0xd3a2x38[_0xd3a2x2d][_0x5c5d[61]]))){_0xd3a2x39= false;console[_0x5c5d[71]](_0xd3a2x33[_0x5c5d[22]][_0x5c5d[63]][_0x5c5d[96]](),_0x5c5d[97],_0xd3a2x38[_0xd3a2x2d][_0x5c5d[59]][_0x5c5d[96]](),_0x5c5d[98],_0xd3a2x33[_0x5c5d[22]][_0x5c5d[67]])}};if(_0xd3a2x39){_0xd3a2x33[_0x5c5d[24]][_0x5c5d[45]](_0xd3a2x38[_0xd3a2x2d][_0x5c5d[99]])}};_0xd3a2x33[_0x5c5d[100]]()})};Scheduler[_0x5c5d[57]][_0x5c5d[100]]= function next(){var _0xd3a2x33=this;var _0xd3a2x3d=_0xd3a2x33[_0x5c5d[24]][_0x5c5d[121]]();if(_0xd3a2x3d){structure[_0x5c5d[74]][_0x5c5d[90]][_0xd3a2x33[_0x5c5d[22]][_0x5c5d[63]]][_0x5c5d[122]](_0x5c5d[66],structure[_0x5c5d[65]][_0x5c5d[90]][_0xd3a2x33[_0x5c5d[22]][_0x5c5d[63]]]);switch(_0xd3a2x3d[_0x5c5d[59]]){case _0x5c5d[103]:_0xd3a2x33[_0x5c5d[59]]= new Fidelity(_0xd3a2x3d,_0xd3a2x33[_0x5c5d[22]],function(){return structure[_0x5c5d[74]][_0x5c5d[85]][_0xd3a2x33[_0x5c5d[22]][_0x5c5d[63]]][_0x5c5d[80]]({leaveAt:moment()[_0x5c5d[41]](_0x5c5d[83]),timeout:true},{where:{leaveAt:null,uniqueid:_0xd3a2x33[_0x5c5d[22]][_0x5c5d[84]]},individualHooks:true})[_0x5c5d[79]](function(){_0xd3a2x33[_0x5c5d[100]]()})});break;case _0x5c5d[123]:_0xd3a2x33[_0x5c5d[59]]= new Agent(_0xd3a2x3d,_0xd3a2x33[_0x5c5d[22]],function(){return structure[_0x5c5d[74]][_0x5c5d[85]][_0xd3a2x33[_0x5c5d[22]][_0x5c5d[63]]][_0x5c5d[80]]({leaveAt:moment()[_0x5c5d[41]](_0x5c5d[83]),timeout:true},{where:{leaveAt:null,uniqueid:_0xd3a2x33[_0x5c5d[22]][_0x5c5d[84]]},individualHooks:true})[_0x5c5d[79]](function(){_0xd3a2x33[_0x5c5d[100]]()})});break;case _0x5c5d[124]:_0xd3a2x33[_0x5c5d[59]]= new Queue(_0xd3a2x3d,_0xd3a2x33[_0x5c5d[22]],function(){return structure[_0x5c5d[74]][_0x5c5d[85]][_0xd3a2x33[_0x5c5d[22]][_0x5c5d[63]]][_0x5c5d[80]]({leaveAt:moment()[_0x5c5d[41]](_0x5c5d[83]),timeout:true},{where:{leaveAt:null,uniqueid:_0xd3a2x33[_0x5c5d[22]][_0x5c5d[84]]},individualHooks:true})[_0x5c5d[79]](function(){_0xd3a2x33[_0x5c5d[100]]()})});break;case _0x5c5d[125]:_0xd3a2x33[_0x5c5d[59]]= new SendMail(_0xd3a2x3d,_0xd3a2x33[_0x5c5d[22]],function(){_0xd3a2x33[_0x5c5d[100]]()});break;case _0x5c5d[126]:_0xd3a2x33[_0x5c5d[59]]= new ReplyMail(_0xd3a2x3d,_0xd3a2x33[_0x5c5d[22]],function(){_0xd3a2x33[_0x5c5d[100]]()},_0xd3a2x33[_0x5c5d[23]]);break;case _0x5c5d[127]:_0xd3a2x33[_0x5c5d[59]]= new SendSms(_0xd3a2x3d,_0xd3a2x33[_0x5c5d[22]],function(){_0xd3a2x33[_0x5c5d[100]]()});break;default:console[_0x5c5d[26]](_0x5c5d[128])};_0xd3a2x33[_0x5c5d[59]][_0x5c5d[56]]()}else {structure[_0x5c5d[74]][_0x5c5d[73]][_0xd3a2x33[_0x5c5d[22]][_0x5c5d[63]]][_0x5c5d[80]]({waiting:false},{where:{id:_0xd3a2x33[_0x5c5d[22]][_0x5c5d[67]]},individualHooks:true})[_0x5c5d[77]](function(_0xd3a2x37){console[_0x5c5d[76]]()})}};module[_0x5c5d[129]]= Scheduler \ No newline at end of file +'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 { + structure.models.rooms[self.data.channel] + .update({ + waiting: false + }, { + where: { + id: self.data.roomid, + }, + individualHooks: true + }) + .catch(function(err) { + console.error(); + }); + } +}; + +// Export this file as a module +module.exports = Scheduler; diff --git a/server/config/routing/sendMail.js b/server/config/routing/sendMail.js index 3cfafb2..a726daa 100644 --- a/server/config/routing/sendMail.js +++ b/server/config/routing/sendMail.js @@ -1 +1,86 @@ -var _0x2a19=["\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"];_0x2a19[0];const _=require(_0x2a19[1]);const config=require(_0x2a19[2]);const structure=require(_0x2a19[3]);const cp=require(_0x2a19[4]);const util=require(_0x2a19[5]);const moment=require(_0x2a19[6]);const Mustache=require(_0x2a19[7]);const User=require(_0x2a19[9])[_0x2a19[8]];const Message=require(_0x2a19[9])[_0x2a19[10]];const Account=require(_0x2a19[9])[_0x2a19[11]];const Template=require(_0x2a19[9])[_0x2a19[12]];function SendMail(_0xde67xd,_0xde67xe,_0xde67xf){this[_0x2a19[13]]= _0xde67xd;this[_0x2a19[14]]= _0xde67xe;this[_0x2a19[15]]= _0xde67xf}SendMail[_0x2a19[17]][_0x2a19[16]]= function init(){var _0xde67x11=this;var _0xde67x12;var _0xde67x13={from:[],to:[]};return Account[_0x2a19[35]](_0xde67x11[_0x2a19[13]][_0x2a19[43]])[_0x2a19[20]](function(_0xde67x17){return _0xde67x17[_0x2a19[42]]()})[_0x2a19[20]](function(_0xde67x16){_0xde67x12= _0xde67x16;_0xde67x13[_0x2a19[29]][_0x2a19[39]](_0xde67x12[_0x2a19[38]]);_0xde67x13[_0x2a19[30]][_0x2a19[39]](_0xde67x11[_0x2a19[13]][_0x2a19[40]]);return Template[_0x2a19[35]](_0xde67x11[_0x2a19[13]][_0x2a19[41]])})[_0x2a19[20]](function(_0xde67x15){switch(_0xde67x11[_0x2a19[14]][_0x2a19[37]]){case _0x2a19[36]:_0xde67x13[_0x2a19[22]]= _0xde67x15[_0x2a19[22]];return Message[_0x2a19[35]](_0xde67x11[_0x2a19[14]][_0x2a19[34]])[_0x2a19[20]](function(_0xde67xe){_0xde67x13[_0x2a19[23]]= Mustache[_0x2a19[33]](_0xde67x15[_0x2a19[23]],{interactionId:_0xde67x11[_0x2a19[14]][_0x2a19[24]],subject:_0xde67x11[_0x2a19[14]][_0x2a19[22]],body:_0xde67xe[_0x2a19[25]],accountName:_0xde67x11[_0x2a19[14]][_0x2a19[26]],from:_0xde67x13[_0x2a19[29]][_0x2a19[28]](_0x2a19[27]),to:_0xde67x13[_0x2a19[30]][_0x2a19[28]](_0x2a19[27]),cc:_0xde67x11[_0x2a19[14]][_0x2a19[31]][_0x2a19[28]](_0x2a19[27]),createdAt:_0xde67x11[_0x2a19[13]][_0x2a19[32]]})});default:}})[_0x2a19[20]](function(){return Message[_0x2a19[21]](_0xde67x13)})[_0x2a19[20]](function(){_0xde67x11[_0x2a19[15]]()})[_0x2a19[19]](function(_0xde67x14){console[_0x2a19[18]](_0xde67x14)})};module[_0x2a19[44]]= SendMail \ No newline at end of file +'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; diff --git a/server/config/routing/sendSms.js b/server/config/routing/sendSms.js index 6d650cc..133849f 100644 --- a/server/config/routing/sendSms.js +++ b/server/config/routing/sendSms.js @@ -1 +1,54 @@ -var _0xc9c3=["\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"];_0xc9c3[0];const _=require(_0xc9c3[1]);const config=require(_0xc9c3[2]);const structure=require(_0xc9c3[3]);const cp=require(_0xc9c3[4]);const util=require(_0xc9c3[5]);const moment=require(_0xc9c3[6]);const Mustache=require(_0xc9c3[7]);const User=require(_0xc9c3[9])[_0xc9c3[8]];const Message=require(_0xc9c3[9])[_0xc9c3[10]];const Account=require(_0xc9c3[9])[_0xc9c3[11]];function SendSms(_0x8e72xc,_0x8e72xd,_0x8e72xe){this[_0xc9c3[12]]= _0x8e72xc;this[_0xc9c3[13]]= _0x8e72xd;this[_0xc9c3[14]]= _0x8e72xe}SendSms[_0xc9c3[16]][_0xc9c3[15]]= function init(){var _0x8e72x10=this;var _0x8e72x11;var _0x8e72x12={from:_0xc9c3[17],to:_0xc9c3[17],body:_0xc9c3[17]};return Account[_0xc9c3[31]](_0x8e72x10[_0xc9c3[12]][_0xc9c3[30]])[_0xc9c3[20]](function(_0x8e72x15){_0x8e72x12[_0xc9c3[21]]= _0x8e72x15[_0xc9c3[22]];_0x8e72x12[_0xc9c3[23]]= _0x8e72x15[_0xc9c3[24]];_0x8e72x12[_0xc9c3[25]]= _0x8e72x10[_0xc9c3[12]][_0xc9c3[26]];_0x8e72x12[_0xc9c3[27]]= _0x8e72x10[_0xc9c3[12]][_0xc9c3[28]];return Message[_0xc9c3[29]](_0x8e72x12)})[_0xc9c3[20]](function(_0x8e72x14){_0x8e72x10[_0xc9c3[14]]()})[_0xc9c3[19]](function(_0x8e72x13){console[_0xc9c3[18]](_0x8e72x13)})};module[_0xc9c3[32]]= SendSms \ No newline at end of file +'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; diff --git a/server/config/routing/structure.js b/server/config/routing/structure.js index b5bf9bc..1feb304 100644 --- a/server/config/routing/structure.js +++ b/server/config/routing/structure.js @@ -1 +1,127 @@ -var _0xfa63=["\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"];_0xfa63[0];const _=require(_0xfa63[1]);const moment=require(_0xfa63[2]);const config=require(_0xfa63[3]);const cp=require(_0xfa63[4]);const util=require(_0xfa63[5]);const User=require(_0xfa63[7])[_0xfa63[6]];const Interval=require(_0xfa63[7])[_0xfa63[8]];const ReportMail=require(_0xfa63[7])[_0xfa63[9]];const ReportChat=require(_0xfa63[7])[_0xfa63[10]];const ReportSms=require(_0xfa63[7])[_0xfa63[11]];const ReportFax=require(_0xfa63[7])[_0xfa63[12]];const ReportOpenchannel=require(_0xfa63[7])[_0xfa63[13]];const MailAccount=require(_0xfa63[7])[_0xfa63[14]];const ChatWebsite=require(_0xfa63[7])[_0xfa63[15]];const SmsAccount=require(_0xfa63[7])[_0xfa63[16]];const FaxAccount=require(_0xfa63[7])[_0xfa63[17]];const OpenchannelAccount=require(_0xfa63[7])[_0xfa63[18]];const MailQueue=require(_0xfa63[7])[_0xfa63[19]];const ChatQueue=require(_0xfa63[7])[_0xfa63[20]];const SmsQueue=require(_0xfa63[7])[_0xfa63[21]];const FaxQueue=require(_0xfa63[7])[_0xfa63[22]];const OpenchannelQueue=require(_0xfa63[7])[_0xfa63[23]];const MailRoom=require(_0xfa63[7])[_0xfa63[24]];const ChatRoom=require(_0xfa63[7])[_0xfa63[25]];const SmsRoom=require(_0xfa63[7])[_0xfa63[26]];const FaxRoom=require(_0xfa63[7])[_0xfa63[27]];const OpenchannelRoom=require(_0xfa63[7])[_0xfa63[28]];const MailSession=require(_0xfa63[7])[_0xfa63[29]];const ChatSession=require(_0xfa63[7])[_0xfa63[30]];const SmsSession=require(_0xfa63[7])[_0xfa63[31]];const FaxSession=require(_0xfa63[7])[_0xfa63[32]];const OpenchannelSession=require(_0xfa63[7])[_0xfa63[33]];module[_0xfa63[34]]= {labels:{rooms:{mail:_0xfa63[35],chat:_0xfa63[36],sms:_0xfa63[37],fax:_0xfa63[38],openchannel:_0xfa63[39]},pauses:{mail:_0xfa63[40],chat:_0xfa63[41],sms:_0xfa63[42],fax:_0xfa63[43],openchannel:_0xfa63[44]},capacities:{mail:_0xfa63[45],chat:_0xfa63[46],sms:_0xfa63[47],fax:_0xfa63[48],openchannel:_0xfa63[49]},appQueues:{mail:_0xfa63[50],chat:_0xfa63[51],sms:_0xfa63[52],fax:_0xfa63[53],openchannel:_0xfa63[54]},penaltyTables:{mail:_0xfa63[55],chat:_0xfa63[56],sms:_0xfa63[57],fax:_0xfa63[58],openchannel:_0xfa63[59]},reports:{mail:_0xfa63[60],chat:_0xfa63[61],sms:_0xfa63[62],fax:_0xfa63[63],openchannel:_0xfa63[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 +'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 + } + } +}; diff --git a/server/config/scheduler/index.js b/server/config/scheduler/index.js index dba3bf4..429d7a2 100644 --- a/server/config/scheduler/index.js +++ b/server/config/scheduler/index.js @@ -1 +1,103 @@ -var _0x348b=["\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(_0x348b[1])[_0x348b[0]];var MailServerOut=require(_0x348b[1])[_0x348b[2]];var CronJobManager=require(_0x348b[3]);var _=require(_0x348b[4]);var Reports=require(_0x348b[5]);function deleteSchedule(_0xb5c7x7,_0xb5c7x8){console[_0x348b[9]](_0x348b[6]+ _0xb5c7x7[_0x348b[7]]+ _0x348b[8]);if(_0xb5c7x8[_0x348b[11]](_0xb5c7x7[_0x348b[10]].toString())){_0xb5c7x8[_0x348b[12]](_0xb5c7x7[_0x348b[10]].toString());console[_0x348b[9]](_0x348b[13]+ _0xb5c7x8)}else {console[_0x348b[9]](_0x348b[14]+ _0xb5c7x7[_0x348b[7]]+ _0x348b[15])}}function updateSchedule(_0xb5c7x7,_0xb5c7x8,_0xb5c7xa){console[_0x348b[9]](_0x348b[16]+ _0xb5c7x7[_0x348b[7]]+ _0x348b[8]);if(_0xb5c7x7[_0x348b[17]]){createJob(_0xb5c7x7,_0xb5c7x8,_0xb5c7xa)}else {deleteSchedule(_0xb5c7x7,_0xb5c7x8)}}module[_0x348b[18]]= function(){var _0xb5c7x8= new CronJobManager();var _0xb5c7xa= new Reports();Schedule[_0x348b[26]]({where:{active:true},attributes:[_0x348b[10],_0x348b[7],_0x348b[25],_0x348b[17]]})[_0x348b[24]](function(_0xb5c7xc){_[_0x348b[23]](_0xb5c7xc[_0x348b[22]],function(_0xb5c7xd){createJob(_0xb5c7xd,_0xb5c7x8,_0xb5c7xa)})})[_0x348b[21]](function(){synchSchedules(_0xb5c7x8,_0xb5c7xa)})[_0x348b[20]](function(_0xb5c7xb){console[_0x348b[9]](_0x348b[19])})};function createJob(_0xb5c7xd,_0xb5c7x8,_0xb5c7xa){console[_0x348b[9]](_0x348b[27]+ _0xb5c7xd[_0x348b[7]]+ _0x348b[28]);_0xb5c7x8[_0x348b[32]](_0xb5c7xd[_0x348b[10]].toString(),_0x348b[29]+ _0xb5c7xd[_0x348b[30]],function(){executeSchedule(_0xb5c7xd[_0x348b[10]],_0xb5c7xa)},{start:true,completion:function(){console[_0x348b[9]](_0x348b[14]+ _0xb5c7xd[_0x348b[7]]+ _0x348b[31])}});console[_0x348b[9]](_0x348b[33]+ _0xb5c7xd[_0x348b[7]]+ _0x348b[34]);console[_0x348b[9]](_0x348b[13]+ _0xb5c7x8)}function executeSchedule(_0xb5c7x10,_0xb5c7xa){console[_0x348b[9]](_0x348b[35],_0xb5c7x10);return Schedule[_0x348b[40]](_0xb5c7x10,{include:[MailServerOut]})[_0x348b[24]](function(_0xb5c7xd){if(!_0xb5c7xd){console[_0x348b[9]](_0x348b[37]);return};switch(_0xb5c7xd[_0x348b[25]]){case _0x348b[39]:_0xb5c7xa[_0x348b[38]](_0xb5c7xd);break;default:}})[_0x348b[20]](function(_0xb5c7xb){console[_0x348b[9]](_0x348b[36])})}function synchSchedules(_0xb5c7x8,_0xb5c7xa){Schedule[_0x348b[42]](function(_0xb5c7x12,_0xb5c7x13){if(_0xb5c7x12[_0x348b[17]]){createJob(_0xb5c7x12[_0x348b[41]],_0xb5c7x8,_0xb5c7xa)}});Schedule[_0x348b[43]](function(_0xb5c7x12,_0xb5c7x13){updateSchedule(_0xb5c7x12[_0x348b[41]],_0xb5c7x8,_0xb5c7xa)});Schedule[_0x348b[44]](function(_0xb5c7x12){deleteSchedule(_0xb5c7x12[_0x348b[41]],_0xb5c7x8)})} \ No newline at end of file +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); + }); +} diff --git a/server/config/scheduler/reports.js b/server/config/scheduler/reports.js index 7646cab..70e212f 100644 --- a/server/config/scheduler/reports.js +++ b/server/config/scheduler/reports.js @@ -1 +1,228 @@ -var _0xa428=["\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(_0xa428[0]);var moment=require(_0xa428[1]);require(_0xa428[2]);var CustomReport=require(_0xa428[4])[_0xa428[3]];var DefaultReport=require(_0xa428[4])[_0xa428[5]];var ExtractedReport=require(_0xa428[4])[_0xa428[6]];var MailAttachment=require(_0xa428[4])[_0xa428[7]];var MailServerOut=require(_0xa428[4])[_0xa428[8]];var MailMessage=require(_0xa428[4])[_0xa428[9]];var path=require(_0xa428[10]);var config=require(_0xa428[11]);var fs=require(_0xa428[12]);var _=require(_0xa428[13]);var ReportTree=require(_0xa428[4])[_0xa428[14]];function Reports(){console[_0xa428[16]](_0xa428[15])}Reports[_0xa428[18]][_0xa428[17]]= function(_0xf5c9xf,_0xf5c9x10){console[_0xa428[16]](_0xa428[19]);extract(_0xf5c9xf,_0xf5c9x10)};function extract(_0xf5c9xf,_0xf5c9x10){switch(_0xf5c9xf[_0xa428[21]]){case _0xa428[20]:extractTodayReport(_0xf5c9xf,_0xf5c9x10);break;default:extractRangeReport(_0xf5c9xf,_0xf5c9x10);break}}function extractTodayReport(_0xf5c9xf,_0xf5c9x10){console[_0xa428[16]](_0xa428[22]);if(_0xf5c9x10|| checkValidity(_0xf5c9xf[_0xa428[23]],_0xf5c9xf[_0xa428[24]])){console[_0xa428[16]](_0xa428[25]);docExtract(_0xf5c9xf,moment()[_0xa428[27]](_0xa428[26]),moment()[_0xa428[27]](_0xa428[26]),_0xf5c9x10,_0xa428[28],_0xa428[29])}else {console[_0xa428[16]](_0xa428[30])}}function extractRangeReport(_0xf5c9xf,_0xf5c9x10){switch(_0xf5c9xf[_0xa428[41]]){case _0xa428[33]:docExtract(_0xf5c9xf,moment()[_0xa428[32]](1,_0xa428[31])[_0xa428[27]](_0xa428[26]),moment()[_0xa428[32]](1,_0xa428[31])[_0xa428[27]](_0xa428[26]),_0xf5c9x10);break;case _0xa428[34]:docExtract(_0xf5c9xf,moment()[_0xa428[32]](7,_0xa428[31])[_0xa428[27]](_0xa428[26]),moment()[_0xa428[32]](1,_0xa428[31])[_0xa428[27]](_0xa428[26]),_0xf5c9x10);break;case _0xa428[35]:docExtract(_0xf5c9xf,moment()[_0xa428[32]](30,_0xa428[31])[_0xa428[27]](_0xa428[26]),moment()[_0xa428[32]](1,_0xa428[31])[_0xa428[27]](_0xa428[26]),_0xf5c9x10);break;case _0xa428[40]:docExtract(_0xf5c9xf,moment()[_0xa428[32]](1,_0xa428[38])[_0xa428[37]](_0xa428[36])[_0xa428[27]](_0xa428[26]),moment()[_0xa428[32]](1,_0xa428[38])[_0xa428[39]](_0xa428[36])[_0xa428[27]](_0xa428[26]),_0xf5c9x10);break}}function checkValidity(_0xf5c9x15,_0xf5c9x16){return moment()[_0xa428[44]](moment(_0xf5c9x15,_0xa428[43]),moment(_0xf5c9x16,_0xa428[43]))[_0xa428[42]](moment())}function getReportPath(_0xf5c9x18,_0xf5c9x19,path){path= _0xf5c9x18[_0xa428[45]]+ _0xa428[46]+ path;if(_0xf5c9x18[_0xa428[47]]=== _0xa428[48]){return path}else {return getReportPath(_[_0xa428[49]](_0xf5c9x19,{id:_0xf5c9x18[_0xa428[47]]}),_0xf5c9x19,path)}}function docExtract(_0xf5c9xf,_0xf5c9x1b,_0xf5c9x1c,_0xf5c9x10,_0xf5c9x1d,_0xf5c9x1e){var _0xf5c9x1f=_0xf5c9xf[_0xa428[50]]=== _0xa428[51]?DefaultReport:CustomReport;var _0xf5c9x20;_0xf5c9x1f[_0xa428[88]](_0xa428[87])[_0xa428[85]](_0xf5c9xf[_0xa428[86]])[_0xa428[83]](function(_0xf5c9x25){if(!_0xf5c9x25){console[_0xa428[16]](_0xa428[84]);return};_0xf5c9x20= _0xf5c9x25;return ReportTree[_0xa428[85]](_0xf5c9xf[_0xa428[50]]=== _0xa428[51]?1:2)})[_0xa428[83]](function(_0xf5c9x19){_0xf5c9x19= JSON[_0xa428[73]](_0xf5c9x19[_0xa428[72]]);var _0xf5c9x18=_[_0xa428[49]](_0xf5c9x19,{id:_0xf5c9x20[_0xa428[47]]});var path=getReportPath(_0xf5c9x18,_0xf5c9x19,_0xf5c9x20[_0xa428[74]]);if(_0xf5c9xf[_0xa428[21]]=== _0xa428[20]){_0xf5c9x20[_0xa428[76]][_0xa428[75]]= _0xf5c9x20[_0xa428[76]][_0xa428[75]][_0xa428[79]](_0xa428[77],_0xa428[78])};return [_0xf5c9x20,ExtractedReport[_0xa428[82]]({name:_0xf5c9x20[_0xa428[74]],startDate:_0xf5c9x1b,endDate:_0xf5c9x1c,output:_0xf5c9xf[_0xa428[69]],type:_0xf5c9x10?_0xa428[80]:_0xa428[81],UserId:_0xf5c9x10?_0xf5c9x10[_0xa428[66]]:null})]})[_0xa428[71]](function(_0xf5c9x20,_0xf5c9x22){var _0xf5c9x23=cp[_0xa428[55]](__dirname+ _0xa428[54]);_0xf5c9x23[_0xa428[58]](_0xa428[61],function(_0xf5c9x24){console[_0xa428[16]](_0xa428[62],_0xf5c9x24);if(_0xf5c9xf[_0xa428[63]]&& _0xf5c9x24[_0xa428[64]]=== _0xa428[65]){sendReportByMail(_0xf5c9xf,_0xf5c9x22[_0xa428[66]],_0xf5c9x10,_0xf5c9x23)}else {_0xf5c9x23[_0xa428[67]]()}})[_0xa428[58]](_0xa428[59],function(){console[_0xa428[16]](_0xa428[60])})[_0xa428[58]](_0xa428[56],function(_0xf5c9x21){console[_0xa428[16]](_0xa428[57],_0xf5c9x21)});_0xf5c9x23[_0xa428[70]]({report:_0xf5c9x20,query:{startDate:_0xf5c9x1b,endDate:_0xf5c9x1c,startTime:_0xf5c9x1d|| null,endTime:_0xf5c9x1e|| null},extractedId:_0xf5c9x22[_0xa428[66]],user:_0xf5c9x10?_0xf5c9x10:{role:_0xa428[68]},type:_0xf5c9xf[_0xa428[69]]})})[_0xa428[53]](function(_0xf5c9x21){console[_0xa428[16]](_0xa428[52],_0xf5c9x21)})}function sendReportByMail(_0xf5c9xf,_0xf5c9x27,_0xf5c9x10,_0xf5c9x23){var _0xf5c9x28;return ExtractedReport[_0xa428[85]](_0xf5c9x27)[_0xa428[83]](function(extract){if(!extract){console[_0xa428[16]](_0xa428[93]);return};_0xf5c9x28= extract;if(_0xf5c9xf[_0xa428[8]]&& _0xf5c9xf[_0xa428[8]][_0xa428[94]]){var _0xf5c9x2a=getAttachment(_0xf5c9x28);var _0xf5c9x2b={subject:_0xa428[95],from:[_0xf5c9xf[_0xa428[8]][_0xa428[94]]],to:[_0xf5c9xf[_0xa428[96]]],cc:[],html:null,text:null,inReplyTo:null,status:_0xa428[97],attachment:true,UserId:_0xf5c9x10?_0xf5c9x10[_0xa428[66]]:null,MailAttachments:[_0xf5c9x2a]};return MailMessage[_0xa428[82]](_0xf5c9x2b,{include:[{model:MailAttachment}]})}else {throw new Error(_0xa428[98])}})[_0xa428[83]](function(_0xf5c9x29){return _0xf5c9x28[_0xa428[92]](_0xf5c9x29)})[_0xa428[83]](function(){console[_0xa428[16]](_0xa428[91])})[_0xa428[53]](function(_0xf5c9x21){console[_0xa428[16]](_0xa428[90],_0xf5c9x21)})[_0xa428[89]](function(){_0xf5c9x23[_0xa428[67]]()})}function getAttachment(extract){var _0xf5c9x2d=path[_0xa428[104]](config[_0xa428[99]],_0xa428[100],_0xa428[101],_0xa428[102],extract[_0xa428[103]]);var _0xf5c9x2e=path[_0xa428[104]](config[_0xa428[99]],_0xa428[100],_0xa428[101],_0xa428[105]);var _0xf5c9x2f=path[_0xa428[109]](extract[_0xa428[103]],_0xa428[106]+ extract[_0xa428[108]][_0xa428[107]]());try{fs[_0xa428[110]](_0xf5c9x2d,path[_0xa428[104]](_0xf5c9x2e,_0xf5c9x2f));console[_0xa428[16]](_0xa428[111])}catch(err){console[_0xa428[56]](_0xa428[112]);return null};return {size:getFilesizeInBytes(_0xf5c9x2d),path:path[_0xa428[104]](_0xf5c9x2e,_0xf5c9x2f),name:extract[_0xa428[74]]+ _0xa428[113]+ moment(extract[_0xa428[115]])[_0xa428[27]](_0xa428[114])+ _0xa428[113]+ moment(extract[_0xa428[116]])[_0xa428[27]](_0xa428[114])+ _0xa428[106]+ extract[_0xa428[108]][_0xa428[107]](),type:_0xa428[117]+ extract[_0xa428[108]][_0xa428[107]](),basename:_0xf5c9x2f}}function getFilesizeInBytes(_0xf5c9x31){try{var _0xf5c9x32=fs[_0xa428[118]](_0xf5c9x31);var _0xf5c9x33=_0xf5c9x32[_0xa428[119]];return _0xf5c9x33}catch(err){return 0}}module[_0xa428[120]]= Reports \ No newline at end of file +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; diff --git a/server/config/seed.js b/server/config/seed.js index b1a028a..33e666d 100644 --- a/server/config/seed.js +++ b/server/config/seed.js @@ -1 +1,3957 @@ -var _0x83ea=["\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"];_0x83ea[0];var _=require(_0x83ea[1]);var models=require(_0x83ea[2]);var sequelize=require(_0x83ea[2])[_0x83ea[3]];models[_0x83ea[70]][_0x83ea[69]]([{provider:_0x83ea[7],role:_0x83ea[8],fullname:_0x83ea[9],email:_0x83ea[10],name:_0x83ea[11],password:_0x83ea[12],defaultuser:_0x83ea[11],host:_0x83ea[13],type:_0x83ea[14],transport:_0x83ea[15],allow:_0x83ea[16],qualify:_0x83ea[17],nat:_0x83ea[18],disallow:_0x83ea[19],context:_0x83ea[20],internal:1000},{provider:_0x83ea[7],role:_0x83ea[8],fullname:_0x83ea[21],email:_0x83ea[22],name:_0x83ea[23],password:_0x83ea[12],defaultuser:_0x83ea[23],host:_0x83ea[13],type:_0x83ea[14],transport:_0x83ea[15],allow:_0x83ea[16],qualify:_0x83ea[17],nat:_0x83ea[18],disallow:_0x83ea[19],context:_0x83ea[20],internal:1001},{provider:_0x83ea[7],role:_0x83ea[8],fullname:_0x83ea[24],email:_0x83ea[25],name:_0x83ea[26],password:_0x83ea[12],defaultuser:_0x83ea[26],host:_0x83ea[13],type:_0x83ea[14],transport:_0x83ea[15],allow:_0x83ea[16],qualify:_0x83ea[17],nat:_0x83ea[18],disallow:_0x83ea[19],context:_0x83ea[20],internal:1002},{provider:_0x83ea[7],role:_0x83ea[8],fullname:_0x83ea[27],email:_0x83ea[28],name:_0x83ea[29],password:_0x83ea[12],defaultuser:_0x83ea[29],host:_0x83ea[13],type:_0x83ea[14],transport:_0x83ea[15],allow:_0x83ea[16],qualify:_0x83ea[17],nat:_0x83ea[18],disallow:_0x83ea[19],context:_0x83ea[20],internal:1003},{provider:_0x83ea[7],role:_0x83ea[8],fullname:_0x83ea[30],email:_0x83ea[31],name:_0x83ea[32],password:_0x83ea[12],defaultuser:_0x83ea[32],host:_0x83ea[13],type:_0x83ea[14],transport:_0x83ea[15],allow:_0x83ea[16],qualify:_0x83ea[17],nat:_0x83ea[18],disallow:_0x83ea[19],context:_0x83ea[20],internal:1004},{provider:_0x83ea[7],role:_0x83ea[33],fullname:_0x83ea[34],email:_0x83ea[35],name:_0x83ea[36],password:_0x83ea[36],defaultuser:_0x83ea[36],host:_0x83ea[13],type:_0x83ea[14],transport:_0x83ea[15],allow:_0x83ea[16],qualify:_0x83ea[17],nat:_0x83ea[18],disallow:_0x83ea[19],context:_0x83ea[20],internal:1005},{provider:_0x83ea[7],role:_0x83ea[8],fullname:_0x83ea[37],email:_0x83ea[38],name:_0x83ea[39],password:_0x83ea[12],defaultuser:_0x83ea[39],host:_0x83ea[13],type:_0x83ea[14],transport:_0x83ea[15],allow:_0x83ea[16],qualify:_0x83ea[17],nat:_0x83ea[18],disallow:_0x83ea[19],context:_0x83ea[20],internal:1006},{provider:_0x83ea[7],role:_0x83ea[8],fullname:_0x83ea[40],email:_0x83ea[41],name:_0x83ea[42],password:_0x83ea[36],defaultuser:_0x83ea[42],host:_0x83ea[13],type:_0x83ea[14],transport:_0x83ea[15],allow:_0x83ea[16],qualify:_0x83ea[17],nat:_0x83ea[18],disallow:_0x83ea[19],context:_0x83ea[20],internal:1007},{provider:_0x83ea[7],role:_0x83ea[8],fullname:_0x83ea[43],email:_0x83ea[44],name:_0x83ea[45],password:_0x83ea[36],defaultuser:_0x83ea[45],host:_0x83ea[13],type:_0x83ea[14],transport:_0x83ea[15],allow:_0x83ea[16],qualify:_0x83ea[17],nat:_0x83ea[18],disallow:_0x83ea[19],context:_0x83ea[20],internal:1008},{provider:_0x83ea[7],role:_0x83ea[8],fullname:_0x83ea[46],email:_0x83ea[47],name:_0x83ea[48],password:_0x83ea[12],defaultuser:_0x83ea[48],host:_0x83ea[13],type:_0x83ea[14],transport:_0x83ea[15],allow:_0x83ea[16],qualify:_0x83ea[17],nat:_0x83ea[18],disallow:_0x83ea[19],context:_0x83ea[20],internal:1009},{provider:_0x83ea[7],role:_0x83ea[8],fullname:_0x83ea[49],email:_0x83ea[50],name:_0x83ea[51],password:_0x83ea[12],defaultuser:_0x83ea[51],host:_0x83ea[13],type:_0x83ea[14],transport:_0x83ea[52],allow:_0x83ea[16],qualify:_0x83ea[17],nat:_0x83ea[18],disallow:_0x83ea[19],context:_0x83ea[20],internal:1010},{provider:_0x83ea[7],role:_0x83ea[8],fullname:_0x83ea[53],email:_0x83ea[54],name:_0x83ea[55],password:_0x83ea[12],defaultuser:_0x83ea[55],host:_0x83ea[13],type:_0x83ea[14],transport:_0x83ea[52],allow:_0x83ea[16],qualify:_0x83ea[17],nat:_0x83ea[18],disallow:_0x83ea[19],context:_0x83ea[20],internal:1011},{provider:_0x83ea[7],role:_0x83ea[8],fullname:_0x83ea[56],email:_0x83ea[57],name:_0x83ea[58],password:_0x83ea[12],defaultuser:_0x83ea[58],host:_0x83ea[13],type:_0x83ea[14],transport:_0x83ea[52],allow:_0x83ea[16],qualify:_0x83ea[17],nat:_0x83ea[18],disallow:_0x83ea[19],context:_0x83ea[20],internal:1012},{provider:_0x83ea[7],role:_0x83ea[33],fullname:_0x83ea[59],email:_0x83ea[60],name:_0x83ea[61],password:_0x83ea[62],defaultuser:_0x83ea[61],host:_0x83ea[13],type:_0x83ea[14],transport:_0x83ea[15],allow:_0x83ea[16],qualify:_0x83ea[17],nat:_0x83ea[18],disallow:_0x83ea[19],context:_0x83ea[20],internal:1013},{provider:_0x83ea[7],role:_0x83ea[8],fullname:_0x83ea[63],email:_0x83ea[64],name:_0x83ea[65],password:_0x83ea[12],defaultuser:_0x83ea[65],host:_0x83ea[13],type:_0x83ea[14],transport:_0x83ea[15],allow:_0x83ea[16],qualify:_0x83ea[17],nat:_0x83ea[18],disallow:_0x83ea[19],context:_0x83ea[20],internal:1014},{provider:_0x83ea[7],role:_0x83ea[8],fullname:_0x83ea[66],email:_0x83ea[67],name:_0x83ea[68],password:_0x83ea[12],defaultuser:_0x83ea[68],host:_0x83ea[13],type:_0x83ea[14],transport:_0x83ea[15],allow:_0x83ea[16],qualify:_0x83ea[17],nat:_0x83ea[18],disallow:_0x83ea[19],context:_0x83ea[20],internal:1015}],{ignoreDuplicates:true,individualHooks:true})[_0x83ea[6]](function(){console[_0x83ea[5]](_0x83ea[4])});models[_0x83ea[84]][_0x83ea[69]]([{name:_0x83ea[72],type:_0x83ea[73],insecure:_0x83ea[74],defaultuser:_0x83ea[75],secret:_0x83ea[76],password:_0x83ea[76],context:_0x83ea[77],language:_0x83ea[78],host:_0x83ea[79],fromdomain:_0x83ea[79],dtmfmode:_0x83ea[80],qualify:_0x83ea[17],nat:_0x83ea[18],callerid:_0x83ea[81],limitonpeers:_0x83ea[17],callcounter:_0x83ea[17],disallow:_0x83ea[19],allow:_0x83ea[82],canreinvite:_0x83ea[83],directmedia:_0x83ea[83]}],{ignoreDuplicates:true,individualHooks:true})[_0x83ea[6]](function(){console[_0x83ea[5]](_0x83ea[71])});var newModules=[{id:1,name:_0x83ea[85],title:_0x83ea[86],ModuleId:null,path:_0x83ea[87]},{id:2,name:_0x83ea[88],title:_0x83ea[89],ModuleId:null,path:_0x83ea[90]},{id:3,name:_0x83ea[91],title:_0x83ea[92],ModuleId:null,path:_0x83ea[93]},{id:4,name:_0x83ea[94],title:_0x83ea[95],ModuleId:3,path:_0x83ea[93]},{id:5,name:_0x83ea[96],title:_0x83ea[97],ModuleId:null,path:_0x83ea[98]},{id:6,name:_0x83ea[99],title:_0x83ea[100],ModuleId:null,path:_0x83ea[101]},{id:7,name:_0x83ea[102],title:_0x83ea[103],ModuleId:6,path:_0x83ea[101]},{id:8,name:_0x83ea[104],title:_0x83ea[105],ModuleId:6,path:_0x83ea[106]},{id:9,name:_0x83ea[107],title:_0x83ea[108],ModuleId:6,path:_0x83ea[109]},{id:10,name:_0x83ea[110],title:_0x83ea[111],ModuleId:6,path:_0x83ea[112]},{id:11,name:_0x83ea[113],title:_0x83ea[114],ModuleId:6,path:_0x83ea[115]},{id:12,name:_0x83ea[116],title:_0x83ea[117],ModuleId:6,path:_0x83ea[118]},{id:13,name:_0x83ea[119],title:_0x83ea[120],ModuleId:null,path:_0x83ea[121]},{id:14,name:_0x83ea[122],title:_0x83ea[123],ModuleId:null,path:_0x83ea[124]},{id:15,name:_0x83ea[125],title:_0x83ea[126],ModuleId:null,path:_0x83ea[127]},{id:16,name:_0x83ea[128],title:_0x83ea[129],ModuleId:null,path:_0x83ea[130]},{id:17,name:_0x83ea[131],title:_0x83ea[132],ModuleId:null,path:_0x83ea[133]},{id:18,name:_0x83ea[134],title:_0x83ea[135],ModuleId:null,path:_0x83ea[136]},{id:19,name:_0x83ea[137],title:_0x83ea[138],ModuleId:null,path:_0x83ea[139]},{id:20,name:_0x83ea[140],title:_0x83ea[141],ModuleId:6,path:_0x83ea[142]}];models[_0x83ea[150]][_0x83ea[154]]()[_0x83ea[6]](function(_0x7627x6){var _0x7627x7=[];_0x7627x6= _[_0x83ea[147]](_0x7627x6,_0x83ea[146]);newModules[_0x83ea[153]](function(_0x7627x8){if(_[_0x83ea[148]](_0x7627x6,_0x7627x8[_0x83ea[146]])){_0x7627x7[_0x83ea[151]](models[_0x83ea[150]][_0x83ea[149]](_0x7627x8,{where:{id:_0x7627x8[_0x83ea[146]]}}))}else {_0x7627x7[_0x83ea[151]](models[_0x83ea[150]][_0x83ea[152]](_0x7627x8))}});return _0x7627x7})[_0x83ea[19]]()[_0x83ea[6]](function(){console[_0x83ea[5]](_0x83ea[145])})[_0x83ea[144]](function(_0x7627x5){console[_0x83ea[5]](_0x83ea[143],_0x7627x5)});models[_0x83ea[159]][_0x83ea[152]]({name:_0x83ea[157],description:_0x83ea[174],defaultEntry:true})[_0x83ea[6]](function(_0x7627x9){models[_0x83ea[70]][_0x83ea[154]]({where:{role:_0x83ea[8]}})[_0x83ea[6]](function(_0x7627xa){_0x7627x9[_0x83ea[156]](_[_0x83ea[147]](_0x7627xa,_0x83ea[146]))[_0x83ea[6]](function(){models[_0x83ea[163]][_0x83ea[152]]({name:_0x83ea[160],description:_0x83ea[161],timeout:5,strategy:_0x83ea[162]})[_0x83ea[6]](function(_0x7627xb){console[_0x83ea[5]](_0x83ea[155]);models[_0x83ea[159]][_0x83ea[158]]({where:{name:_0x83ea[157]},include:[{all:true}]})[_0x83ea[6]](function(_0x7627x9){_0x7627xb[_0x83ea[156]](_[_0x83ea[147]](_0x7627x9.Users,_0x83ea[146]))[_0x83ea[144]](function(_0x7627x5){})})[_0x83ea[144]](function(_0x7627x5){})});models[_0x83ea[169]][_0x83ea[152]]({name:_0x83ea[167],description:_0x83ea[168],timeout:5,strategy:_0x83ea[162]})[_0x83ea[6]](function(_0x7627xc){console[_0x83ea[5]](_0x83ea[164]);models[_0x83ea[159]][_0x83ea[158]]({where:{name:_0x83ea[157]},include:[{all:true}]})[_0x83ea[6]](function(_0x7627x9){if(_0x7627x9){console[_0x83ea[5]](_0x83ea[165])}else {console[_0x83ea[5]](_0x83ea[166])};_0x7627xc[_0x83ea[156]](_[_0x83ea[147]](_0x7627x9.Users,_0x83ea[146]))[_0x83ea[144]](function(_0x7627x5){})})[_0x83ea[144]](function(_0x7627x5){})});models[_0x83ea[173]][_0x83ea[152]]({name:_0x83ea[171],description:_0x83ea[172],timeout:5,strategy:_0x83ea[162]})[_0x83ea[6]](function(_0x7627xd){console[_0x83ea[5]](_0x83ea[170]);models[_0x83ea[159]][_0x83ea[158]]({where:{name:_0x83ea[157]},include:[{all:true}]})[_0x83ea[6]](function(_0x7627x9){_0x7627xd[_0x83ea[156]](_[_0x83ea[147]](_0x7627x9.Users,_0x83ea[146]))[_0x83ea[144]](function(_0x7627x5){})})[_0x83ea[144]](function(_0x7627x5){})})})[_0x83ea[144]](function(_0x7627x5){})})[_0x83ea[144]](function(_0x7627x5){})})[_0x83ea[144]](function(_0x7627x5){});models[_0x83ea[188]][_0x83ea[152]]({name:_0x83ea[187],description:_0x83ea[187],address:_0x83ea[179]})[_0x83ea[6]](function(_0x7627xe){console[_0x83ea[5]](_0x83ea[175]);models[_0x83ea[186]][_0x83ea[152]]({description:_0x83ea[61],host:_0x83ea[182],username:_0x83ea[179],password:_0x83ea[180],port:143,mailbox:_0x83ea[183],ssl:false,delete:false,filter:_0x83ea[184],protocol:_0x83ea[185],MailAccountId:_0x7627xe[_0x83ea[146]]})[_0x83ea[6]](function(){console[_0x83ea[5]](_0x83ea[176]);models[_0x83ea[181]][_0x83ea[152]]({description:_0x83ea[61],host:_0x83ea[178],username:_0x83ea[179],password:_0x83ea[180],port:587,ssl:false,MailAccountId:_0x7627xe[_0x83ea[146]]})[_0x83ea[6]](function(){console[_0x83ea[5]](_0x83ea[177])})[_0x83ea[144]](function(_0x7627x5){})})[_0x83ea[144]](function(_0x7627x5){})});models[_0x83ea[192]][_0x83ea[69]]([{name:_0x83ea[190],description:_0x83ea[191]}],{ignoreDuplicates:true})[_0x83ea[6]](function(){console[_0x83ea[5]](_0x83ea[189])});models[_0x83ea[212]][_0x83ea[152]]({name:_0x83ea[198],description:_0x83ea[198],address:_0x83ea[199],color:_0x83ea[200],color_focus:_0x83ea[200],color_button:_0x83ea[200],remote:_0x83ea[201],animation:true,header_shape:_0x83ea[202],header_online:_0x83ea[203],online_message:_0x83ea[204],username_placeholder:_0x83ea[205],email_placeholder:_0x83ea[206],start_chat_button:_0x83ea[207],header_offline:_0x83ea[208],offline_message:_0x83ea[209],enquiry_message_placeholder:_0x83ea[210],enquiry_button:_0x83ea[211],download_transcript:true})[_0x83ea[6]](function(_0x7627xf){console[_0x83ea[5]](_0x83ea[193]);models[_0x83ea[163]][_0x83ea[154]]()[_0x83ea[6]](function(_0x7627x10){models[_0x83ea[196]][_0x83ea[152]]({app:_0x83ea[195],appdata:_0x7627x10[0][_0x83ea[146]],priority:1,timeout:30,ChatWebsiteId:_0x7627xf[_0x83ea[146]],ChatQueueId:_0x7627x10[0][_0x83ea[146]]})[_0x83ea[6]](function(){console[_0x83ea[5]](_0x83ea[194])})[_0x83ea[144]](function(_0x7627x5){});models[_0x83ea[196]][_0x83ea[152]]({app:_0x83ea[195],appdata:_0x7627x10[1][_0x83ea[146]],priority:2,timeout:30,ChatWebsiteId:_0x7627xf[_0x83ea[146]],ChatQueueId:_0x7627x10[1][_0x83ea[146]]})[_0x83ea[6]](function(){console[_0x83ea[5]](_0x83ea[197])})[_0x83ea[144]](function(_0x7627x5){})})[_0x83ea[144]](function(_0x7627x5){})})[_0x83ea[144]](function(_0x7627x5){});models[_0x83ea[215]][_0x83ea[69]]([{name:_0x83ea[214],description:_0x83ea[191]}],{ignoreDuplicates:true})[_0x83ea[6]](function(){console[_0x83ea[5]](_0x83ea[213])});models[_0x83ea[221]][_0x83ea[69]]([{name:_0x83ea[20],description:_0x83ea[217],defaultEntry:true},{name:_0x83ea[77],description:_0x83ea[217],defaultEntry:true},{name:_0x83ea[218],description:_0x83ea[217],defaultEntry:true},{name:_0x83ea[219],description:_0x83ea[217],defaultEntry:true},{name:_0x83ea[220],description:_0x83ea[217],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x83ea[6]](function(){console[_0x83ea[5]](_0x83ea[216])});models[_0x83ea[228]][_0x83ea[69]]([{name:_0x83ea[223],mode:_0x83ea[224],directory:_0x83ea[225],sort:_0x83ea[226],format:_0x83ea[227],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x83ea[6]](function(){console[_0x83ea[5]](_0x83ea[222])});models[_0x83ea[230]][_0x83ea[69]]([{id:1,min_internal:1000,soundPath:_0x83ea[229]}],{ignoreDuplicates:true,individualHooks:true})[_0x83ea[6]](function(){console[_0x83ea[5]](_0x83ea[222])});models[_0x83ea[242]][_0x83ea[69]]([{id:1,name:_0x83ea[231],model:JSON[_0x83ea[241]]({title:_0x83ea[231],rows:[{columns:[{styleClass:_0x83ea[232],widgets:[{type:_0x83ea[233],title:_0x83ea[234],config:{timePattern:_0x83ea[235],datePattern:_0x83ea[236]}}]},{styleClass:_0x83ea[237],widgets:[{type:_0x83ea[238],title:_0x83ea[239],config:{url:_0x83ea[240]}}]}]}]}),defaultEntry:true,editable:false}],{ignoreDuplicates:true,individualHooks:true})[_0x83ea[6]](function(){console[_0x83ea[5]](_0x83ea[222])});var newIntegrations=[{name:_0x83ea[243],version:_0x83ea[244],author:_0x83ea[245],logo:_0x83ea[246],state:_0x83ea[247],description:_0x83ea[248],link:_0x83ea[249]},{name:_0x83ea[250],version:_0x83ea[244],author:_0x83ea[245],logo:_0x83ea[251],state:_0x83ea[252],description:_0x83ea[253],link:_0x83ea[254]},{name:_0x83ea[255],version:_0x83ea[244],author:_0x83ea[245],logo:_0x83ea[256],state:_0x83ea[238],description:_0x83ea[257],link:_0x83ea[258]},{name:_0x83ea[259],version:_0x83ea[244],author:_0x83ea[245],logo:_0x83ea[260],state:_0x83ea[261],description:_0x83ea[262]},{name:_0x83ea[263],version:_0x83ea[244],author:_0x83ea[245],logo:_0x83ea[264],state:_0x83ea[265],description:_0x83ea[266]},{name:_0x83ea[267],version:_0x83ea[244],author:_0x83ea[245],logo:_0x83ea[268],state:_0x83ea[269],description:_0x83ea[270]}];models[_0x83ea[274]][_0x83ea[154]]()[_0x83ea[6]](function(_0x7627x12){var _0x7627x13=[];_0x7627x12= _[_0x83ea[147]](_0x7627x12,_0x83ea[273]);newIntegrations[_0x83ea[153]](function(_0x7627x14){if(_[_0x83ea[148]](_0x7627x12,_0x7627x14[_0x83ea[273]])){_0x7627x13[_0x83ea[151]](models[_0x83ea[274]][_0x83ea[149]](_0x7627x14,{where:{state:_0x7627x14[_0x83ea[273]]}}))}else {_0x7627x13[_0x83ea[151]](models[_0x83ea[274]][_0x83ea[152]](_0x7627x14))}});return _0x7627x13})[_0x83ea[19]]()[_0x83ea[6]](function(){console[_0x83ea[5]](_0x83ea[272])})[_0x83ea[144]](function(_0x7627x5){console[_0x83ea[5]](_0x83ea[271],_0x7627x5)});var newDefaulReports=[{"\x69\x64":1,"\x6E\x61\x6D\x65":_0x83ea[275],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[276],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[278]},{"\x69\x64":2,"\x6E\x61\x6D\x65":_0x83ea[279],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[280],"\x70\x61\x72\x65\x6E\x74":_0x83ea[281],"\x74\x61\x62\x6C\x65":_0x83ea[282],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[278]},{"\x69\x64":3,"\x6E\x61\x6D\x65":_0x83ea[283],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[284],"\x70\x61\x72\x65\x6E\x74":_0x83ea[281],"\x74\x61\x62\x6C\x65":_0x83ea[282],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[285]},{"\x69\x64":4,"\x6E\x61\x6D\x65":_0x83ea[286],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[287],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[278]},{"\x69\x64":5,"\x6E\x61\x6D\x65":_0x83ea[279],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[288],"\x74\x61\x62\x6C\x65":_0x83ea[289],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[290]},{"\x69\x64":6,"\x6E\x61\x6D\x65":_0x83ea[291],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[288],"\x74\x61\x62\x6C\x65":_0x83ea[289],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[278]},{"\x69\x64":7,"\x6E\x61\x6D\x65":_0x83ea[286],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[288],"\x74\x61\x62\x6C\x65":_0x83ea[289],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[290]},{"\x69\x64":8,"\x6E\x61\x6D\x65":_0x83ea[292],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[288],"\x74\x61\x62\x6C\x65":_0x83ea[289],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[290]},{"\x69\x64":9,"\x6E\x61\x6D\x65":_0x83ea[293],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[288],"\x74\x61\x62\x6C\x65":_0x83ea[289],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[290]},{"\x69\x64":10,"\x6E\x61\x6D\x65":_0x83ea[279],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[294],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[295]},{"\x69\x64":11,"\x6E\x61\x6D\x65":_0x83ea[296],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[294],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[295]},{"\x69\x64":12,"\x6E\x61\x6D\x65":_0x83ea[297],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[294],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[298]},{"\x69\x64":13,"\x6E\x61\x6D\x65":_0x83ea[299],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[294],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[300]},{"\x69\x64":14,"\x6E\x61\x6D\x65":_0x83ea[301],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[287],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[278]},{"\x69\x64":15,"\x6E\x61\x6D\x65":_0x83ea[302],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[287],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[278]},{"\x69\x64":16,"\x6E\x61\x6D\x65":_0x83ea[303],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[287],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[278]},{"\x69\x64":17,"\x6E\x61\x6D\x65":_0x83ea[304],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[281],"\x74\x61\x62\x6C\x65":_0x83ea[282],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[278]},{"\x69\x64":18,"\x6E\x61\x6D\x65":_0x83ea[305],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[306],"\x70\x61\x72\x65\x6E\x74":_0x83ea[281],"\x74\x61\x62\x6C\x65":_0x83ea[282],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[285]},{"\x69\x64":19,"\x6E\x61\x6D\x65":_0x83ea[307],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[308],"\x74\x61\x62\x6C\x65":_0x83ea[309],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[310]},{"\x69\x64":20,"\x6E\x61\x6D\x65":_0x83ea[311],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[308],"\x74\x61\x62\x6C\x65":_0x83ea[309],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[312]},{"\x69\x64":21,"\x6E\x61\x6D\x65":_0x83ea[313],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[314],"\x74\x61\x62\x6C\x65":_0x83ea[315],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[278]},{"\x69\x64":22,"\x6E\x61\x6D\x65":_0x83ea[316],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[314],"\x74\x61\x62\x6C\x65":_0x83ea[315],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[278]},{"\x69\x64":23,"\x6E\x61\x6D\x65":_0x83ea[317],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[314],"\x74\x61\x62\x6C\x65":_0x83ea[315],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[318]},{"\x69\x64":24,"\x6E\x61\x6D\x65":_0x83ea[319],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[314],"\x74\x61\x62\x6C\x65":_0x83ea[315],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[320]},{"\x69\x64":25,"\x6E\x61\x6D\x65":_0x83ea[279],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[321],"\x70\x61\x72\x65\x6E\x74":_0x83ea[308],"\x74\x61\x62\x6C\x65":_0x83ea[309],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[322]},{"\x69\x64":26,"\x6E\x61\x6D\x65":_0x83ea[323],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[324],"\x70\x61\x72\x65\x6E\x74":_0x83ea[325],"\x74\x61\x62\x6C\x65":_0x83ea[326],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[278]},{"\x69\x64":27,"\x6E\x61\x6D\x65":_0x83ea[327],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[328],"\x70\x61\x72\x65\x6E\x74":_0x83ea[325],"\x74\x61\x62\x6C\x65":_0x83ea[329],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[278]},{"\x69\x64":28,"\x6E\x61\x6D\x65":_0x83ea[330],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[321],"\x70\x61\x72\x65\x6E\x74":_0x83ea[331],"\x74\x61\x62\x6C\x65":_0x83ea[309],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[332]},{"\x69\x64":29,"\x6E\x61\x6D\x65":_0x83ea[333],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[334],"\x70\x61\x72\x65\x6E\x74":_0x83ea[331],"\x74\x61\x62\x6C\x65":_0x83ea[309],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[335]},{"\x69\x64":30,"\x6E\x61\x6D\x65":_0x83ea[336],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[321],"\x70\x61\x72\x65\x6E\x74":_0x83ea[308],"\x74\x61\x62\x6C\x65":_0x83ea[309],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[337]},{"\x69\x64":31,"\x6E\x61\x6D\x65":_0x83ea[338],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[339],"\x74\x61\x62\x6C\x65":_0x83ea[340],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[278]},{"\x69\x64":32,"\x6E\x61\x6D\x65":_0x83ea[341],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[339],"\x74\x61\x62\x6C\x65":_0x83ea[340],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[342]},{"\x69\x64":33,"\x6E\x61\x6D\x65":_0x83ea[343],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[276],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[278]},{"\x69\x64":34,"\x6E\x61\x6D\x65":_0x83ea[344],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x83ea[288],"\x74\x61\x62\x6C\x65":_0x83ea[289],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[290]},{"\x69\x64":35,"\x6E\x61\x6D\x65":_0x83ea[345],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[346],"\x70\x61\x72\x65\x6E\x74":_0x83ea[347],"\x74\x61\x62\x6C\x65":_0x83ea[348],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[278]},{"\x69\x64":36,"\x6E\x61\x6D\x65":_0x83ea[349],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[350],"\x70\x61\x72\x65\x6E\x74":_0x83ea[347],"\x74\x61\x62\x6C\x65":_0x83ea[348],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[351]},{"\x69\x64":37,"\x6E\x61\x6D\x65":_0x83ea[352],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[353],"\x70\x61\x72\x65\x6E\x74":_0x83ea[347],"\x74\x61\x62\x6C\x65":_0x83ea[348],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[354]},{"\x69\x64":38,"\x6E\x61\x6D\x65":_0x83ea[355],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[356],"\x70\x61\x72\x65\x6E\x74":_0x83ea[347],"\x74\x61\x62\x6C\x65":_0x83ea[357],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[358]},{"\x69\x64":39,"\x6E\x61\x6D\x65":_0x83ea[359],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[360],"\x70\x61\x72\x65\x6E\x74":_0x83ea[347],"\x74\x61\x62\x6C\x65":_0x83ea[361],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[278]},{"\x69\x64":40,"\x6E\x61\x6D\x65":_0x83ea[362],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[363],"\x70\x61\x72\x65\x6E\x74":_0x83ea[347],"\x74\x61\x62\x6C\x65":_0x83ea[361],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[364]},{"\x69\x64":41,"\x6E\x61\x6D\x65":_0x83ea[365],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[366],"\x70\x61\x72\x65\x6E\x74":_0x83ea[347],"\x74\x61\x62\x6C\x65":_0x83ea[361],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x83ea[367]}];var newDefaultMetrics=[{"\x69\x64":1,"\x6E\x61\x6D\x65":_0x83ea[368],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x6D\x65\x74\x72\x69\x63":_0x83ea[369]},{"\x69\x64":2,"\x6E\x61\x6D\x65":_0x83ea[370],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x6D\x65\x74\x72\x69\x63":_0x83ea[371]},{"\x69\x64":3,"\x6E\x61\x6D\x65":_0x83ea[372],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x6D\x65\x74\x72\x69\x63":_0x83ea[373],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[374]},{"\x69\x64":4,"\x6E\x61\x6D\x65":_0x83ea[375],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x6D\x65\x74\x72\x69\x63":_0x83ea[376]},{"\x69\x64":5,"\x6E\x61\x6D\x65":_0x83ea[377],"\x74\x61\x62\x6C\x65":_0x83ea[289],"\x6D\x65\x74\x72\x69\x63":_0x83ea[378],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[379]},{"\x69\x64":6,"\x6E\x61\x6D\x65":_0x83ea[380],"\x74\x61\x62\x6C\x65":_0x83ea[289],"\x6D\x65\x74\x72\x69\x63":_0x83ea[381],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[382]},{"\x69\x64":7,"\x6E\x61\x6D\x65":_0x83ea[383],"\x74\x61\x62\x6C\x65":_0x83ea[289],"\x6D\x65\x74\x72\x69\x63":_0x83ea[384],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[385]},{"\x69\x64":8,"\x6E\x61\x6D\x65":_0x83ea[386],"\x74\x61\x62\x6C\x65":_0x83ea[289],"\x6D\x65\x74\x72\x69\x63":_0x83ea[387],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[388]},{"\x69\x64":9,"\x6E\x61\x6D\x65":_0x83ea[389],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x6D\x65\x74\x72\x69\x63":_0x83ea[390]},{"\x69\x64":10,"\x6E\x61\x6D\x65":_0x83ea[391],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x6D\x65\x74\x72\x69\x63":_0x83ea[392],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[393]},{"\x69\x64":11,"\x6E\x61\x6D\x65":_0x83ea[394],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x6D\x65\x74\x72\x69\x63":_0x83ea[395],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[396]},{"\x69\x64":12,"\x6E\x61\x6D\x65":_0x83ea[397],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x6D\x65\x74\x72\x69\x63":_0x83ea[398],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[399]},{"\x69\x64":13,"\x6E\x61\x6D\x65":_0x83ea[400],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x6D\x65\x74\x72\x69\x63":_0x83ea[401],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[402]},{"\x69\x64":14,"\x6E\x61\x6D\x65":_0x83ea[403],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x6D\x65\x74\x72\x69\x63":_0x83ea[404],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[405]},{"\x69\x64":15,"\x6E\x61\x6D\x65":_0x83ea[406],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x6D\x65\x74\x72\x69\x63":_0x83ea[407],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[408]},{"\x69\x64":16,"\x6E\x61\x6D\x65":_0x83ea[409],"\x74\x61\x62\x6C\x65":_0x83ea[309],"\x6D\x65\x74\x72\x69\x63":_0x83ea[410],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[411]},{"\x69\x64":17,"\x6E\x61\x6D\x65":_0x83ea[412],"\x74\x61\x62\x6C\x65":_0x83ea[309],"\x6D\x65\x74\x72\x69\x63":_0x83ea[413],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[414]},{"\x69\x64":18,"\x6E\x61\x6D\x65":_0x83ea[415],"\x74\x61\x62\x6C\x65":_0x83ea[315],"\x6D\x65\x74\x72\x69\x63":_0x83ea[416],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[417]},{"\x69\x64":19,"\x6E\x61\x6D\x65":_0x83ea[418],"\x74\x61\x62\x6C\x65":_0x83ea[315],"\x6D\x65\x74\x72\x69\x63":_0x83ea[419],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[420]},{"\x69\x64":20,"\x6E\x61\x6D\x65":_0x83ea[421],"\x74\x61\x62\x6C\x65":_0x83ea[315],"\x6D\x65\x74\x72\x69\x63":_0x83ea[422],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[423]},{"\x69\x64":21,"\x6E\x61\x6D\x65":_0x83ea[424],"\x74\x61\x62\x6C\x65":_0x83ea[315],"\x6D\x65\x74\x72\x69\x63":_0x83ea[425],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[426]},{"\x69\x64":22,"\x6E\x61\x6D\x65":_0x83ea[427],"\x74\x61\x62\x6C\x65":_0x83ea[309],"\x6D\x65\x74\x72\x69\x63":_0x83ea[428],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[429]},{"\x69\x64":23,"\x6E\x61\x6D\x65":_0x83ea[430],"\x74\x61\x62\x6C\x65":_0x83ea[326],"\x6D\x65\x74\x72\x69\x63":_0x83ea[431],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[432]},{"\x69\x64":24,"\x6E\x61\x6D\x65":_0x83ea[433],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x6D\x65\x74\x72\x69\x63":_0x83ea[434],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null},{"\x69\x64":25,"\x6E\x61\x6D\x65":_0x83ea[435],"\x74\x61\x62\x6C\x65":_0x83ea[277],"\x6D\x65\x74\x72\x69\x63":_0x83ea[436],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x83ea[437]}];models[_0x83ea[675]][_0x83ea[670]]({where:{id:1}})[_0x83ea[6]](function(){return models[_0x83ea[675]][_0x83ea[152]]({id:1,tree:_0x83ea[676]})})[_0x83ea[6]](function(){return models[_0x83ea[675]][_0x83ea[674]]({where:{id:2},defaults:{id:2,tree:_0x83ea[673]}})})[_0x83ea[6]](function(){return models[_0x83ea[672]][_0x83ea[154]]()})[_0x83ea[6]](function(_0x7627x1a){var _0x7627x1b=[];_0x7627x1a= _[_0x83ea[147]](_0x7627x1a,_0x83ea[146]);newDefaultMetrics[_0x83ea[153]](function(_0x7627x1c){if(_[_0x83ea[148]](_0x7627x1a,_0x7627x1c[_0x83ea[146]])){_0x7627x1b[_0x83ea[151]](models[_0x83ea[672]][_0x83ea[149]](_0x7627x1c,{where:{id:_0x7627x1c[_0x83ea[146]]}}))}else {_0x7627x1b[_0x83ea[151]](models[_0x83ea[672]][_0x83ea[152]](_0x7627x1c))}});return _0x7627x1b})[_0x83ea[19]]()[_0x83ea[6]](function(){return models[_0x83ea[671]][_0x83ea[154]]()})[_0x83ea[6]](function(_0x7627x17){var _0x7627x18=[];_0x7627x17= _[_0x83ea[147]](_0x7627x17,_0x83ea[146]);newDefaulReports[_0x83ea[153]](function(_0x7627x19){if(_[_0x83ea[148]](_0x7627x17,_0x7627x19[_0x83ea[146]])){_0x7627x18[_0x83ea[151]](models[_0x83ea[671]][_0x83ea[149]](_0x7627x19,{where:{id:_0x7627x19[_0x83ea[146]]}}))}else {_0x7627x18[_0x83ea[151]](models[_0x83ea[671]][_0x83ea[152]](_0x7627x19))}});return _0x7627x18})[_0x83ea[19]]()[_0x83ea[6]](function(){return models[_0x83ea[669]][_0x83ea[670]]({where:{DefaultReportId:{$gt:0}}})})[_0x83ea[6]](function(){return models[_0x83ea[669]][_0x83ea[69]]([{"\x66\x69\x65\x6C\x64":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[442],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[444],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[195],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[447],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[449],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[451],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[453],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[455],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[457],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[459],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[461],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[463],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[465],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[369],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[376],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[371],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[471],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[473],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[475],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[477],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[479],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[481],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[483],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[485],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[487],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[489],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[490],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[492],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[494],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[496],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[475],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[477],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[479],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[487],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[489],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[490],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[492],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[500],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[494],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[473],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[195],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[502],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[455],"\x61\x6C\x69\x61\x73":_0x83ea[504],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[451],"\x61\x6C\x69\x61\x73":_0x83ea[506],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[459],"\x61\x6C\x69\x61\x73":_0x83ea[507],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[369],"\x61\x6C\x69\x61\x73":_0x83ea[508],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[371],"\x61\x6C\x69\x61\x73":_0x83ea[510],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[376],"\x61\x6C\x69\x61\x73":_0x83ea[511],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[442],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[444],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[195],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[512],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[514],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[516],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[518],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[520],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[521],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[522],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[524],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[526],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[528],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[530],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[465],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[512],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[526],"\x61\x6C\x69\x61\x73":_0x83ea[504],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[532],"\x61\x6C\x69\x61\x73":_0x83ea[533],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[521],"\x61\x6C\x69\x61\x73":_0x83ea[534],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[524],"\x61\x6C\x69\x61\x73":_0x83ea[535],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[521],"\x61\x6C\x69\x61\x73":_0x83ea[508],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[524],"\x61\x6C\x69\x61\x73":_0x83ea[536],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[195],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[526],"\x61\x6C\x69\x61\x73":_0x83ea[504],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[521],"\x61\x6C\x69\x61\x73":_0x83ea[537],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[521],"\x61\x6C\x69\x61\x73":_0x83ea[538],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[520],"\x61\x6C\x69\x61\x73":_0x83ea[539],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[520],"\x61\x6C\x69\x61\x73":_0x83ea[540],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[524],"\x61\x6C\x69\x61\x73":_0x83ea[541],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[524],"\x61\x6C\x69\x61\x73":_0x83ea[542],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[195],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[526],"\x61\x6C\x69\x61\x73":_0x83ea[543],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[378],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[381],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[384],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[387],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[528],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[546],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[442],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[195],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[447],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[449],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[451],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[453],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[371],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[459],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[461],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[463],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[390],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[549],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[465],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[195],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[451],"\x61\x6C\x69\x61\x73":_0x83ea[506],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[371],"\x61\x6C\x69\x61\x73":_0x83ea[510],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[371],"\x61\x6C\x69\x61\x73":_0x83ea[551],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[459],"\x61\x6C\x69\x61\x73":_0x83ea[552],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[390],"\x61\x6C\x69\x61\x73":_0x83ea[553],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[390],"\x61\x6C\x69\x61\x73":_0x83ea[554],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[463],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[459],"\x61\x6C\x69\x61\x73":_0x83ea[546],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[390],"\x61\x6C\x69\x61\x73":_0x83ea[555],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[195],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[451],"\x61\x6C\x69\x61\x73":_0x83ea[556],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[373],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[392],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[395],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[398],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[401],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[502],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[455],"\x61\x6C\x69\x61\x73":_0x83ea[504],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[451],"\x61\x6C\x69\x61\x73":_0x83ea[506],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[459],"\x61\x6C\x69\x61\x73":_0x83ea[507],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[369],"\x61\x6C\x69\x61\x73":_0x83ea[508],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[371],"\x61\x6C\x69\x61\x73":_0x83ea[510],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[376],"\x61\x6C\x69\x61\x73":_0x83ea[511],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[404],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[502],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[455],"\x61\x6C\x69\x61\x73":_0x83ea[504],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[451],"\x61\x6C\x69\x61\x73":_0x83ea[506],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[459],"\x61\x6C\x69\x61\x73":_0x83ea[507],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[369],"\x61\x6C\x69\x61\x73":_0x83ea[508],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[371],"\x61\x6C\x69\x61\x73":_0x83ea[510],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[376],"\x61\x6C\x69\x61\x73":_0x83ea[511],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[407],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[502],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[455],"\x61\x6C\x69\x61\x73":_0x83ea[504],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[451],"\x61\x6C\x69\x61\x73":_0x83ea[506],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[459],"\x61\x6C\x69\x61\x73":_0x83ea[507],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[369],"\x61\x6C\x69\x61\x73":_0x83ea[508],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[371],"\x61\x6C\x69\x61\x73":_0x83ea[510],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[376],"\x61\x6C\x69\x61\x73":_0x83ea[511],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[471],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[546],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[492],"\x61\x6C\x69\x61\x73":_0x83ea[562],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[492],"\x61\x6C\x69\x61\x73":_0x83ea[563],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[494],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[546],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[492],"\x61\x6C\x69\x61\x73":_0x83ea[562],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[492],"\x61\x6C\x69\x61\x73":_0x83ea[563],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[512],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[564],"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":19},{"\x66\x69\x65\x6C\x64":_0x83ea[565],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[564],"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":19},{"\x66\x69\x65\x6C\x64":_0x83ea[413],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[512],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[564],"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":20},{"\x66\x69\x65\x6C\x64":_0x83ea[413],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[567],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[569],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[571],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[512],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[574],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[576],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[578],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[580],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[581],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[582],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[584],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[586],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[512],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[581],"\x61\x6C\x69\x61\x73":_0x83ea[588],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[419],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[590],"\x75\x70\x64\x61\x74\x65\x64\x41\x74":_0x83ea[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":_0x83ea[422],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[416],"\x61\x6C\x69\x61\x73":_0x83ea[592],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[593]},{"\x66\x69\x65\x6C\x64":_0x83ea[416],"\x61\x6C\x69\x61\x73":_0x83ea[594],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[593]},{"\x66\x69\x65\x6C\x64":_0x83ea[567],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[596],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[581],"\x61\x6C\x69\x61\x73":_0x83ea[504],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[584],"\x61\x6C\x69\x61\x73":_0x83ea[506],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[416],"\x61\x6C\x69\x61\x73":_0x83ea[417],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[593]},{"\x66\x69\x65\x6C\x64":_0x83ea[425],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[593]},{"\x66\x69\x65\x6C\x64":_0x83ea[574],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[596],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[581],"\x61\x6C\x69\x61\x73":_0x83ea[504],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[584],"\x61\x6C\x69\x61\x73":_0x83ea[506],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[586],"\x61\x6C\x69\x61\x73":_0x83ea[507],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[416],"\x61\x6C\x69\x61\x73":_0x83ea[417],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[593]},{"\x66\x69\x65\x6C\x64":_0x83ea[425],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[593]},{"\x66\x69\x65\x6C\x64":_0x83ea[512],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[598],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[471],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[565],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[602],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[604],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[428],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[606],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[479],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[608],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[576],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[564],"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26},{"\x66\x69\x65\x6C\x64":_0x83ea[578],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[431],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[593]},{"\x66\x69\x65\x6C\x64":_0x83ea[606],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[479],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[613],"\x61\x6C\x69\x61\x73":_0x83ea[327],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[512],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[602],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[604],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[492],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[593]},{"\x66\x69\x65\x6C\x64":_0x83ea[615],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[565],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[492],"\x61\x6C\x69\x61\x73":_0x83ea[493],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[593]},{"\x66\x69\x65\x6C\x64":_0x83ea[512],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[602],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[604],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[565],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[492],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[593]},{"\x66\x69\x65\x6C\x64":_0x83ea[618],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[619],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[620],"\x61\x6C\x69\x61\x73":_0x83ea[621],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[620],"\x61\x6C\x69\x61\x73":_0x83ea[622],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[195],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[619],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[620],"\x61\x6C\x69\x61\x73":_0x83ea[621],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[620],"\x61\x6C\x69\x61\x73":_0x83ea[622],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[442],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[195],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[447],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[434],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[436],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[516],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[624]},{"\x66\x69\x65\x6C\x64":_0x83ea[526],"\x61\x6C\x69\x61\x73":_0x83ea[543],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[378],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[381],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[384],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[387],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[625],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[627],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[628],"\x61\x6C\x69\x61\x73":_0x83ea[629],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[630],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[632],"\x61\x6C\x69\x61\x73":_0x83ea[633],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[634],"\x61\x6C\x69\x61\x73":_0x83ea[635],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[636],"\x61\x6C\x69\x61\x73":_0x83ea[637],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[574],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[627],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[638],"\x61\x6C\x69\x61\x73":_0x83ea[629],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[639],"\x61\x6C\x69\x61\x73":_0x83ea[640],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[641],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[642],"\x61\x6C\x69\x61\x73":_0x83ea[643],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x66\x6F\x72\x6D\x61\x74":_0x83ea[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":_0x83ea[512],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[440],"\x61\x6C\x69\x61\x73":_0x83ea[644],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[645],"\x61\x6C\x69\x61\x73":_0x83ea[646],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[647],"\x61\x6C\x69\x61\x73":_0x83ea[513],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[648],"\x61\x6C\x69\x61\x73":_0x83ea[446],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[649],"\x61\x6C\x69\x61\x73":_0x83ea[559],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x63\x75\x73\x74\x6F\x6D":0,"\x66\x6F\x72\x6D\x61\x74":_0x83ea[650],"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38},{"\x66\x69\x65\x6C\x64":_0x83ea[651],"\x61\x6C\x69\x61\x73":_0x83ea[627],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[652],"\x61\x6C\x69\x61\x73":_0x83ea[653],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[146],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[654],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[655],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[656],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[649],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[657],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[658],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[659],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[660],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[661],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[662],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[494],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[663],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[494],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[664],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[659],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[650],"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x83ea[146],"\x61\x6C\x69\x61\x73":_0x83ea[666],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x83ea[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":_0x83ea[667],"\x61\x6C\x69\x61\x73":_0x83ea[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":_0x83ea[593],"\x63\x75\x73\x74\x6F\x6D":1}],{ignoreDuplicates:true,individualHooks:true})})[_0x83ea[6]](function(){console[_0x83ea[5]](_0x83ea[439])})[_0x83ea[144]](function(_0x7627x5){console[_0x83ea[5]](_0x83ea[438],_0x7627x5)});models[_0x83ea[678]][_0x83ea[69]]([{id:1,name:_0x83ea[677],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x83ea[6]](function(){console[_0x83ea[5]](_0x83ea[272])});models[_0x83ea[701]][_0x83ea[670]]({where:{context:_0x83ea[219]}})[_0x83ea[6]](function(){models[_0x83ea[701]][_0x83ea[69]]([{context:_0x83ea[219],exten:_0x83ea[680],priority:1,app:_0x83ea[681],appdata:_0x83ea[682],type:_0x83ea[683]},{context:_0x83ea[219],exten:_0x83ea[680],priority:2,app:_0x83ea[681],appdata:_0x83ea[684],type:_0x83ea[683]},{context:_0x83ea[219],exten:_0x83ea[680],priority:3,app:_0x83ea[685],appdata:_0x83ea[686],type:_0x83ea[683]},{context:_0x83ea[219],exten:_0x83ea[680],priority:4,app:_0x83ea[687],appdata:_0x83ea[334],type:_0x83ea[683]},{context:_0x83ea[219],exten:_0x83ea[680],priority:5,app:_0x83ea[688],appdata:_0x83ea[689],type:_0x83ea[683]},{context:_0x83ea[219],exten:_0x83ea[680],priority:6,app:_0x83ea[685],appdata:_0x83ea[690],type:_0x83ea[683]},{context:_0x83ea[219],exten:_0x83ea[680],priority:7,app:_0x83ea[685],appdata:_0x83ea[691],type:_0x83ea[683]},{context:_0x83ea[219],exten:_0x83ea[680],priority:8,app:_0x83ea[685],appdata:_0x83ea[692],type:_0x83ea[683]},{context:_0x83ea[219],exten:_0x83ea[680],priority:9,app:_0x83ea[685],appdata:_0x83ea[693],type:_0x83ea[683]},{context:_0x83ea[219],exten:_0x83ea[680],priority:10,app:_0x83ea[685],appdata:_0x83ea[694],type:_0x83ea[683]},{context:_0x83ea[219],exten:_0x83ea[680],priority:11,app:_0x83ea[685],appdata:_0x83ea[695],type:_0x83ea[683]},{context:_0x83ea[219],exten:_0x83ea[680],priority:12,app:_0x83ea[685],appdata:_0x83ea[696],type:_0x83ea[683]},{context:_0x83ea[219],exten:_0x83ea[680],priority:13,app:_0x83ea[685],appdata:_0x83ea[697],type:_0x83ea[683]},{context:_0x83ea[219],exten:_0x83ea[680],priority:14,app:_0x83ea[698],appdata:_0x83ea[699],type:_0x83ea[683]},{context:_0x83ea[219],exten:_0x83ea[680],priority:15,app:_0x83ea[700],appdata:_0x83ea[334],type:_0x83ea[683]}],{ignoreDuplicates:true,individualHooks:true})})[_0x83ea[6]](function(){console[_0x83ea[5]](_0x83ea[679])});models[_0x83ea[70]][_0x83ea[154]]({include:[{model:models[_0x83ea[701]],as:_0x83ea[708],where:{app:_0x83ea[709]}}]})[_0x83ea[6]](function(_0x7627xa){console[_0x83ea[5]](_0x83ea[702]);var _0x7627x1d=[];_[_0x83ea[153]](_0x7627xa,function(_0x7627x1e){_[_0x83ea[153]](_0x7627x1e.UserExtensions,function(_0x7627x1f){_0x7627x1f[_0x83ea[703]]= _0x83ea[704]+ _0x7627x1e[_0x83ea[705]]+ _0x83ea[706];_0x7627x1d[_0x83ea[151]](_0x7627x1f[_0x83ea[707]]())})});return _0x7627x1d})[_0x83ea[19]]()[_0x83ea[144]](function(_0x7627x5){console[_0x83ea[5]](_0x7627x5)}) \ No newline at end of file +/** + * 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); + }); diff --git a/server/config/seedp.js b/server/config/seedp.js index cc6686d..7ccf0d8 100644 --- a/server/config/seedp.js +++ b/server/config/seedp.js @@ -1 +1,5819 @@ -var _0xf78a=["\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","\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","\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","\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","\x51\x75\x65\x75\x65\x20\x2D\x20\x44\x65\x74\x61\x69\x6C\x73","\x6A\x34\x5F\x33","\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","\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\x27\x6F\x75\x74\x62\x6F\x75\x6E\x64\x27\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","\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\x27\x50\x41\x55\x53\x45\x27\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\x27\x76\x6F\x69\x63\x65\x27\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\x27\x4C\x4F\x47\x49\x4E\x27\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\x27\x76\x6F\x69\x63\x65\x27\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\x27\x71\x75\x65\x75\x65\x27\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\x27\x76\x6F\x69\x63\x65\x27\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\x27\x76\x6F\x69\x63\x65\x27\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\x27\x4C\x4F\x47\x49\x4E\x27\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\x27\x50\x41\x55\x53\x45\x27\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\x27\x76\x6F\x69\x63\x65\x27\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\x27\x50\x41\x55\x53\x45\x27\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\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","\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","\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","\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","\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","\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\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","\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","\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","\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","\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","\x66\x69\x6E\x64\x42\x79\x49\x64"];_0xf78a[0];var _=require(_0xf78a[1]);var util=require(_0xf78a[2]);var models=require(_0xf78a[3]);var sequelize=require(_0xf78a[3])[_0xf78a[4]];var _agents=[];var _voiceQueues=[];var _mailQueues=[];var _chatQueues=[];var _miller,_doe;var _setting;models[_0xf78a[380]][_0xf78a[858]](1)[_0xf78a[11]](function(_0xc319xd){_setting= _0xc319xd;if(_setting[_0xf78a[7]]){models[_0xf78a[43]][_0xf78a[22]]([{role:_0xf78a[46],fullname:_0xf78a[47],email:_0xf78a[48],name:_0xf78a[46],password:_0xf78a[49],defaultuser:_0xf78a[46],internal:1000}],{ignoreDuplicates:true,individualHooks:true})[_0xf78a[11]](function(_0xc319x12){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[35],_[_0xf78a[15]](_0xc319x12,_0xf78a[14])[_0xf78a[13]]()));return models[_0xf78a[45]][_0xf78a[44]]({name:_0xf78a[36],description:_0xf78a[36],defaultEntry:true,Users:[{role:_0xf78a[37],fullname:_0xf78a[38],email:_0xf78a[39],name:_0xf78a[28],password:_0xf78a[40],defaultuser:_0xf78a[28],internal:1001},{role:_0xf78a[37],fullname:_0xf78a[41],email:_0xf78a[42],name:_0xf78a[26],password:_0xf78a[40],defaultuser:_0xf78a[26],internal:1002}]},{include:[{model:models[_0xf78a[43]]}]})})[_0xf78a[11]](function(_0xc319x11){_agents= _0xc319x11[_0xf78a[29]];console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[30],_[_0xf78a[15]](_0xc319x11.Users,_0xf78a[14])[_0xf78a[13]]()));console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[31],_0xc319x11[_0xf78a[14]]));return models[_0xf78a[34]][_0xf78a[22]]([{name:_0xf78a[18],musiconhold:_0xf78a[32],strategy:_0xf78a[19]},{name:_0xf78a[20],musiconhold:_0xf78a[32],strategy:_0xf78a[33]}],{ignoreDuplicates:true,individualHooks:true})})[_0xf78a[11]](function(_0xc319x10){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[25],_[_0xf78a[15]](_0xc319x10,_0xf78a[14])[_0xf78a[13]]()));_voiceQueues= _0xc319x10;_miller= _[_0xf78a[27]](_agents,{name:_0xf78a[26]});_doe= _[_0xf78a[27]](_agents,{name:_0xf78a[28]});return _voiceQueues[0][_0xf78a[17]](_miller[_0xf78a[9]])})[_0xf78a[11]](function(){return _voiceQueues[1][_0xf78a[10]]([_miller[_0xf78a[9]],_doe[_0xf78a[9]]])})[_0xf78a[11]](function(){return models[_0xf78a[24]][_0xf78a[22]]([{name:_0xf78a[18],timeout:5,strategy:_0xf78a[19]},{name:_0xf78a[20],timeout:5,strategy:_0xf78a[21]}],{ignoreDuplicates:true,individualHooks:true})})[_0xf78a[11]](function(_0xc319xf){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[12],_[_0xf78a[15]](_0xc319xf,_0xf78a[14])[_0xf78a[13]]()));_mailQueues= _0xc319xf;return _mailQueues[0][_0xf78a[17]](_miller[_0xf78a[9]])})[_0xf78a[11]](function(){return _mailQueues[1][_0xf78a[10]]([_miller[_0xf78a[9]],_doe[_0xf78a[9]]])})[_0xf78a[11]](function(){return models[_0xf78a[23]][_0xf78a[22]]([{name:_0xf78a[18],timeout:5,strategy:_0xf78a[19]},{name:_0xf78a[20],timeout:5,strategy:_0xf78a[21]}],{ignoreDuplicates:true,individualHooks:true})})[_0xf78a[11]](function(_0xc319xe){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[12],_[_0xf78a[15]](_0xc319xe,_0xf78a[14])[_0xf78a[13]]()));_chatQueues= _0xc319xe;return _chatQueues[0][_0xf78a[17]](_miller[_0xf78a[9]])})[_0xf78a[11]](function(){return _chatQueues[1][_0xf78a[10]]([_miller[_0xf78a[9]],_doe[_0xf78a[9]]])})[_0xf78a[6]](function(_0xc319xc){console[_0xf78a[8]](_0xc319xc)});models[_0xf78a[63]][_0xf78a[22]]([{name:_0xf78a[51],prefix:_0xf78a[52],description:_0xf78a[53],options:_0xf78a[54]},{name:_0xf78a[55],prefix:_0xf78a[56],description:_0xf78a[57],options:_0xf78a[58]},{name:_0xf78a[59],prefix:_0xf78a[60],description:_0xf78a[61],options:_0xf78a[62]}],{ignoreDuplicates:true,individualHooks:true})[_0xf78a[11]](function(_0xc319x13){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[50],_[_0xf78a[15]](_0xc319x13,_0xf78a[14])[_0xf78a[13]]()))});models[_0xf78a[67]][_0xf78a[44]]({name:_0xf78a[65],description:_0xf78a[66],defaultEntry:true})[_0xf78a[11]](function(_0xc319x14){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[64],_0xc319x14[_0xf78a[14]]))});models[_0xf78a[73]][_0xf78a[44]]({name:_0xf78a[32],directory:_0xf78a[69],mode:_0xf78a[70],sort:_0xf78a[71],format:_0xf78a[72],defaultEntry:true})[_0xf78a[11]](function(_0xc319x15){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[68],_0xc319x15[_0xf78a[14]]))});models[_0xf78a[81]][_0xf78a[22]]([{name:_0xf78a[75]},{description:_0xf78a[76],name:_0xf78a[77]},{description:_0xf78a[78],name:_0xf78a[79]},{name:_0xf78a[80]}],{ignoreDuplicates:true,individualHooks:true})[_0xf78a[11]](function(_0xc319x16){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[74],_[_0xf78a[15]](_0xc319x16,_0xf78a[14])[_0xf78a[13]]()))});models[_0xf78a[85]][_0xf78a[22]]([{name:_0xf78a[83]},{name:_0xf78a[84]}],{ignoreDuplicates:true,individualHooks:true})[_0xf78a[11]](function(_0xc319x17){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[82],_[_0xf78a[15]](_0xc319x17,_0xf78a[14])[_0xf78a[13]]()))});models[_0xf78a[92]][_0xf78a[44]]({name:_0xf78a[87],context:_0xf78a[88],callingpres:_0xf78a[89],deny:_0xf78a[90],permit:_0xf78a[90],secret:_0xf78a[91]})[_0xf78a[11]](function(_0xc319x18){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[86],_0xc319x18[_0xf78a[14]]))});models[_0xf78a[99]][_0xf78a[22]]([{name:_0xf78a[94],description:_0xf78a[95]},{name:_0xf78a[88],description:_0xf78a[95]},{name:_0xf78a[96],description:_0xf78a[95]},{name:_0xf78a[97],description:_0xf78a[95]},{name:_0xf78a[98],description:_0xf78a[95]}],{ignoreDuplicates:true,individualHooks:true})[_0xf78a[11]](function(_0xc319x17){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[93],_[_0xf78a[15]](_0xc319x17,_0xf78a[14])[_0xf78a[13]]()))});models[_0xf78a[149]][_0xf78a[44]]({context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[104],app:_0xf78a[105],appdata:_0xf78a[106],type:_0xf78a[107],description:_0xf78a[108],Applications:[{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[109],app:_0xf78a[110],appdata:_0xf78a[111],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[112],app:_0xf78a[113],appdata:_0xf78a[114],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[115],app:_0xf78a[116],appdata:_0xf78a[117],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[118],app:_0xf78a[116],appdata:_0xf78a[119],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[120],app:_0xf78a[116],appdata:_0xf78a[121],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[122],app:_0xf78a[123],appdata:_0xf78a[124],type:_0xf78a[107],interval:_0xf78a[125],isApp:true},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[126],app:_0xf78a[116],appdata:_0xf78a[127],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[128],app:_0xf78a[116],appdata:_0xf78a[129],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[130],app:_0xf78a[113],appdata:_0xf78a[131],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[132],app:_0xf78a[116],appdata:_0xf78a[117],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[133],app:_0xf78a[116],appdata:_0xf78a[119],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[134],app:_0xf78a[116],appdata:_0xf78a[121],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[135],app:_0xf78a[136],appdata:_0xf78a[137],type:_0xf78a[107],interval:_0xf78a[125],isApp:true},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[138],app:_0xf78a[116],appdata:_0xf78a[127],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[139],app:_0xf78a[116],appdata:_0xf78a[140],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[141],app:_0xf78a[113],appdata:_0xf78a[142],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[143],app:_0xf78a[116],appdata:_0xf78a[117],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[144],app:_0xf78a[116],appdata:_0xf78a[119],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[145],app:_0xf78a[116],appdata:_0xf78a[121],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[146],app:_0xf78a[123],appdata:_0xf78a[124],type:_0xf78a[107],interval:_0xf78a[125],isApp:true},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[147],app:_0xf78a[116],appdata:_0xf78a[127],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[103],priority:_0xf78a[148],app:_0xf78a[116],appdata:_0xf78a[129],type:_0xf78a[107]}]},{include:[{model:models[_0xf78a[149]],as:_0xf78a[150]}]})[_0xf78a[11]](function(_0xc319x19){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[100],_0xc319x19[_0xf78a[101]],_0xc319x19[_0xf78a[102]]))});models[_0xf78a[149]][_0xf78a[44]]({context:_0xf78a[94],exten:_0xf78a[151],priority:_0xf78a[104],app:_0xf78a[105],appdata:_0xf78a[106],type:_0xf78a[107],description:_0xf78a[152],Applications:[{context:_0xf78a[94],exten:_0xf78a[151],priority:_0xf78a[109],app:_0xf78a[110],appdata:_0xf78a[111],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[151],priority:_0xf78a[112],app:_0xf78a[113],appdata:_0xf78a[114],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[151],priority:_0xf78a[115],app:_0xf78a[116],appdata:_0xf78a[117],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[151],priority:_0xf78a[118],app:_0xf78a[116],appdata:_0xf78a[119],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[151],priority:_0xf78a[120],app:_0xf78a[153],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[151],priority:_0xf78a[122],app:_0xf78a[154],appdata:_0xf78a[155],type:_0xf78a[107],interval:_0xf78a[125],isApp:true},{context:_0xf78a[94],exten:_0xf78a[151],priority:_0xf78a[126],app:_0xf78a[116],appdata:_0xf78a[127],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[151],priority:_0xf78a[128],app:_0xf78a[116],appdata:_0xf78a[156],type:_0xf78a[107]}]},{include:[{model:models[_0xf78a[149]],as:_0xf78a[150]}]})[_0xf78a[11]](function(_0xc319x19){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[100],_0xc319x19[_0xf78a[101]],_0xc319x19[_0xf78a[102]]))});models[_0xf78a[149]][_0xf78a[44]]({context:_0xf78a[94],exten:_0xf78a[157],priority:_0xf78a[104],app:_0xf78a[105],appdata:_0xf78a[106],type:_0xf78a[107],description:_0xf78a[152],Applications:[{context:_0xf78a[94],exten:_0xf78a[157],priority:_0xf78a[109],app:_0xf78a[110],appdata:_0xf78a[111],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[157],priority:_0xf78a[112],app:_0xf78a[113],appdata:_0xf78a[114],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[157],priority:_0xf78a[115],app:_0xf78a[116],appdata:_0xf78a[117],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[157],priority:_0xf78a[118],app:_0xf78a[116],appdata:_0xf78a[119],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[157],priority:_0xf78a[120],app:_0xf78a[116],appdata:_0xf78a[121],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[157],priority:_0xf78a[122],app:_0xf78a[158],appdata:_0xf78a[159],type:_0xf78a[107],interval:_0xf78a[125],isApp:true},{context:_0xf78a[94],exten:_0xf78a[157],priority:_0xf78a[126],app:_0xf78a[116],appdata:_0xf78a[127],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[157],priority:_0xf78a[128],app:_0xf78a[116],appdata:_0xf78a[160],type:_0xf78a[107]}]},{include:[{model:models[_0xf78a[149]],as:_0xf78a[150]}]})[_0xf78a[11]](function(_0xc319x19){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[100],_0xc319x19[_0xf78a[101]],_0xc319x19[_0xf78a[102]]))});models[_0xf78a[149]][_0xf78a[44]]({context:_0xf78a[94],exten:_0xf78a[161],priority:_0xf78a[104],app:_0xf78a[105],appdata:_0xf78a[106],type:_0xf78a[107],description:_0xf78a[152],Applications:[{context:_0xf78a[94],exten:_0xf78a[161],priority:_0xf78a[109],app:_0xf78a[110],appdata:_0xf78a[111],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[161],priority:_0xf78a[112],app:_0xf78a[113],appdata:_0xf78a[114],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[161],priority:_0xf78a[115],app:_0xf78a[116],appdata:_0xf78a[117],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[161],priority:_0xf78a[118],app:_0xf78a[116],appdata:_0xf78a[119],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[161],priority:_0xf78a[120],app:_0xf78a[116],appdata:_0xf78a[121],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[161],priority:_0xf78a[122],app:_0xf78a[158],appdata:_0xf78a[162],type:_0xf78a[107],interval:_0xf78a[125],isApp:true},{context:_0xf78a[94],exten:_0xf78a[161],priority:_0xf78a[126],app:_0xf78a[116],appdata:_0xf78a[127],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[161],priority:_0xf78a[128],app:_0xf78a[116],appdata:_0xf78a[160],type:_0xf78a[107]}]},{include:[{model:models[_0xf78a[149]],as:_0xf78a[150]}]})[_0xf78a[11]](function(_0xc319x19){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[100],_0xc319x19[_0xf78a[101]],_0xc319x19[_0xf78a[102]]))});models[_0xf78a[149]][_0xf78a[44]]({context:_0xf78a[94],exten:_0xf78a[163],priority:_0xf78a[104],app:_0xf78a[105],appdata:_0xf78a[106],type:_0xf78a[107],description:_0xf78a[152],Applications:[{context:_0xf78a[94],exten:_0xf78a[163],priority:_0xf78a[109],app:_0xf78a[110],appdata:_0xf78a[111],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[163],priority:_0xf78a[112],app:_0xf78a[113],appdata:_0xf78a[114],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[163],priority:_0xf78a[115],app:_0xf78a[116],appdata:_0xf78a[117],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[163],priority:_0xf78a[118],app:_0xf78a[116],appdata:_0xf78a[119],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[163],priority:_0xf78a[120],app:_0xf78a[116],appdata:_0xf78a[121],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[163],priority:_0xf78a[122],app:_0xf78a[158],appdata:_0xf78a[164],type:_0xf78a[107],interval:_0xf78a[125],isApp:true},{context:_0xf78a[94],exten:_0xf78a[163],priority:_0xf78a[126],app:_0xf78a[116],appdata:_0xf78a[127],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[163],priority:_0xf78a[128],app:_0xf78a[116],appdata:_0xf78a[160],type:_0xf78a[107]}]},{include:[{model:models[_0xf78a[149]],as:_0xf78a[150]}]})[_0xf78a[11]](function(_0xc319x19){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[100],_0xc319x19[_0xf78a[101]],_0xc319x19[_0xf78a[102]]))});models[_0xf78a[149]][_0xf78a[44]]({context:_0xf78a[94],exten:_0xf78a[165],priority:_0xf78a[104],app:_0xf78a[105],appdata:_0xf78a[166],type:_0xf78a[167],description:_0xf78a[152],Applications:[{context:_0xf78a[94],exten:_0xf78a[165],priority:_0xf78a[109],app:_0xf78a[110],appdata:_0xf78a[168],type:_0xf78a[167]},{context:_0xf78a[94],exten:_0xf78a[165],priority:_0xf78a[112],app:_0xf78a[110],appdata:_0xf78a[169],type:_0xf78a[167]},{context:_0xf78a[94],exten:_0xf78a[165],priority:_0xf78a[115],app:_0xf78a[113],appdata:_0xf78a[170],type:_0xf78a[167]},{context:_0xf78a[94],exten:_0xf78a[165],priority:_0xf78a[118],app:_0xf78a[116],appdata:_0xf78a[117],type:_0xf78a[167]},{context:_0xf78a[94],exten:_0xf78a[165],priority:_0xf78a[120],app:_0xf78a[116],appdata:_0xf78a[119],type:_0xf78a[167]},{context:_0xf78a[94],exten:_0xf78a[165],priority:_0xf78a[122],app:_0xf78a[116],appdata:_0xf78a[121],type:_0xf78a[167]},{context:_0xf78a[94],exten:_0xf78a[165],priority:_0xf78a[126],app:_0xf78a[171],appdata:_0xf78a[172],type:_0xf78a[167],interval:_0xf78a[125],isApp:true},{context:_0xf78a[94],exten:_0xf78a[165],priority:_0xf78a[128],app:_0xf78a[116],appdata:_0xf78a[127],type:_0xf78a[167]},{context:_0xf78a[94],exten:_0xf78a[165],priority:_0xf78a[130],app:_0xf78a[116],appdata:_0xf78a[173],type:_0xf78a[167]}]},{include:[{model:models[_0xf78a[149]],as:_0xf78a[150]}]})[_0xf78a[11]](function(_0xc319x19){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[100],_0xc319x19[_0xf78a[101]],_0xc319x19[_0xf78a[102]]))});models[_0xf78a[149]][_0xf78a[44]]({context:_0xf78a[94],exten:_0xf78a[174],priority:_0xf78a[104],app:_0xf78a[105],appdata:_0xf78a[106],type:_0xf78a[107],description:_0xf78a[175],Applications:[{context:_0xf78a[94],exten:_0xf78a[174],priority:_0xf78a[109],app:_0xf78a[110],appdata:_0xf78a[111],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[174],priority:_0xf78a[112],app:_0xf78a[113],appdata:_0xf78a[114],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[174],priority:_0xf78a[115],app:_0xf78a[116],appdata:_0xf78a[117],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[174],priority:_0xf78a[118],app:_0xf78a[116],appdata:_0xf78a[119],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[174],priority:_0xf78a[120],app:_0xf78a[153],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[174],priority:_0xf78a[122],app:_0xf78a[154],appdata:_0xf78a[176],type:_0xf78a[107],interval:_0xf78a[125],isApp:true},{context:_0xf78a[94],exten:_0xf78a[174],priority:_0xf78a[126],app:_0xf78a[116],appdata:_0xf78a[127],type:_0xf78a[107]},{context:_0xf78a[94],exten:_0xf78a[174],priority:_0xf78a[128],app:_0xf78a[116],appdata:_0xf78a[156],type:_0xf78a[107]}]},{include:[{model:models[_0xf78a[149]],as:_0xf78a[150]}]})[_0xf78a[11]](function(_0xc319x19){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[100],_0xc319x19[_0xf78a[101]],_0xc319x19[_0xf78a[102]]))});models[_0xf78a[190]][_0xf78a[22]]([{name:_0xf78a[178],description:_0xf78a[179],preproduction:_0xf78a[180],production:_0xf78a[180]},{name:_0xf78a[181],description:_0xf78a[182],preproduction:_0xf78a[183],production:_0xf78a[183]},{name:_0xf78a[184],description:_0xf78a[185],preproduction:_0xf78a[186],production:_0xf78a[186]},{name:_0xf78a[187],description:_0xf78a[188],preproduction:_0xf78a[189],production:_0xf78a[189]}])[_0xf78a[11]](function(_0xc319x1a){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[177],_[_0xf78a[15]](_0xc319x1a,_0xf78a[14])[_0xf78a[13]]()))});models[_0xf78a[194]][_0xf78a[44]]({name:_0xf78a[192],dsn:_0xf78a[193]})[_0xf78a[11]](function(_0xc319x1b){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[191],_0xc319x1b[_0xf78a[14]]))});var _0xc319x1c=[{name:_0xf78a[195],version:_0xf78a[196],author:_0xf78a[197],logo:_0xf78a[198],state:_0xf78a[199],description:_0xf78a[200],link:_0xf78a[201]},{name:_0xf78a[202],version:_0xf78a[196],author:_0xf78a[197],logo:_0xf78a[203],state:_0xf78a[204],description:_0xf78a[205],link:_0xf78a[206]},{name:_0xf78a[207],version:_0xf78a[196],author:_0xf78a[197],logo:_0xf78a[208],state:_0xf78a[209],description:_0xf78a[210],link:_0xf78a[211]}];models[_0xf78a[218]][_0xf78a[221]]()[_0xf78a[11]](function(_0xc319x1d){var _0xc319x1e=[];_0xc319x1d= _[_0xf78a[15]](_0xc319x1d,_0xf78a[215]);_0xc319x1c[_0xf78a[220]](function(_0xc319x1f){if(_[_0xf78a[216]](_0xc319x1d,_0xc319x1f[_0xf78a[215]])){_0xc319x1e[_0xf78a[219]](models[_0xf78a[218]][_0xf78a[217]](_0xc319x1f,{where:{state:_0xc319x1f[_0xf78a[215]]}}))}else {_0xc319x1e[_0xf78a[219]](models[_0xf78a[218]][_0xf78a[44]](_0xc319x1f))}});return _0xc319x1e})[_0xf78a[214]]()[_0xf78a[11]](function(){console[_0xf78a[8]](_0xf78a[213])})[_0xf78a[6]](function(_0xc319xc){console[_0xf78a[8]](_0xf78a[212],_0xc319xc)});models[_0xf78a[237]][_0xf78a[22]]([{name:_0xf78a[223],type:_0xf78a[224],street:_0xf78a[225]},{name:_0xf78a[226],type:_0xf78a[227],street:_0xf78a[228],postalCode:_0xf78a[229],country:_0xf78a[230],city:_0xf78a[231],vat:_0xf78a[232],website:_0xf78a[233],phone:_0xf78a[234],fax:_0xf78a[235],email:_0xf78a[236]}])[_0xf78a[11]](function(_0xc319x20){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[222],_[_0xf78a[15]](_0xc319x20,_0xf78a[14])[_0xf78a[13]]()))});models[_0xf78a[376]][_0xf78a[377]]({where:{defaultEntry:true}})[_0xf78a[11]](function(){return models[_0xf78a[376]][_0xf78a[22]]([{name:_0xf78a[239],model:JSON[_0xf78a[347]]({"\x74\x69\x74\x6C\x65":_0xf78a[240],"\x72\x6F\x77\x73":[{"\x63\x6F\x6C\x75\x6D\x6E\x73":[{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xf78a[241],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[243],"\x69\x63\x6F\x6E":_0xf78a[244],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x72\x65\x70\x6F\x72\x74":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[279],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[280],"\x73\x65\x6C\x65\x63\x74":_0xf78a[281]},"\x74\x69\x74\x6C\x65":_0xf78a[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[284]},{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[243],"\x69\x63\x6F\x6E":_0xf78a[244],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x72\x65\x70\x6F\x72\x74":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[285],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[286],"\x73\x65\x6C\x65\x63\x74":_0xf78a[281]},"\x74\x69\x74\x6C\x65":_0xf78a[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[287]},{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[243],"\x69\x63\x6F\x6E":_0xf78a[244],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[288],"\x72\x65\x70\x6F\x72\x74":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[104],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[289]},"\x74\x69\x74\x6C\x65":_0xf78a[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[290]},{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[243],"\x69\x63\x6F\x6E":_0xf78a[244],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[291],"\x72\x65\x70\x6F\x72\x74":_0xf78a[292],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[293],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[294]},"\x74\x69\x74\x6C\x65":_0xf78a[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[295]},{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[264],"\x69\x63\x6F\x6E":_0xf78a[244],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[296],"\x72\x65\x70\x6F\x72\x74":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[104],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[297]},"\x74\x69\x74\x6C\x65":_0xf78a[298],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[299]}],"\x63\x69\x64":_0xf78a[300]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xf78a[241],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[262],"\x69\x63\x6F\x6E":_0xf78a[244],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x72\x65\x70\x6F\x72\x74":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[301],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[302],"\x73\x65\x6C\x65\x63\x74":_0xf78a[281]},"\x74\x69\x74\x6C\x65":_0xf78a[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[303]},{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[262],"\x69\x63\x6F\x6E":_0xf78a[244],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x72\x65\x70\x6F\x72\x74":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[304],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[305],"\x73\x65\x6C\x65\x63\x74":_0xf78a[281]},"\x74\x69\x74\x6C\x65":_0xf78a[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[306]},{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[262],"\x69\x63\x6F\x6E":_0xf78a[244],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[307],"\x72\x65\x70\x6F\x72\x74":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[104],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[308]},"\x74\x69\x74\x6C\x65":_0xf78a[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[309]},{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[268],"\x69\x63\x6F\x6E":_0xf78a[244],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[310],"\x72\x65\x70\x6F\x72\x74":_0xf78a[292],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[293],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[311]},"\x74\x69\x74\x6C\x65":_0xf78a[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[312]},{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[104],"\x63\x6F\x6C\x6F\x72":_0xf78a[264],"\x69\x63\x6F\x6E":_0xf78a[244],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[313],"\x72\x65\x70\x6F\x72\x74":_0xf78a[278],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[314]},"\x74\x69\x74\x6C\x65":_0xf78a[315],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[316]}],"\x63\x69\x64":_0xf78a[317]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xf78a[241],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[243],"\x69\x63\x6F\x6E":_0xf78a[244],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[318],"\x72\x65\x70\x6F\x72\x74":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[279],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[319]},"\x74\x69\x74\x6C\x65":_0xf78a[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[320]},{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[268],"\x69\x63\x6F\x6E":_0xf78a[273],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[321],"\x72\x65\x70\x6F\x72\x74":_0xf78a[278],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[322],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[104]},"\x74\x69\x74\x6C\x65":_0xf78a[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[323]},{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[268],"\x69\x63\x6F\x6E":_0xf78a[273],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[324],"\x72\x65\x70\x6F\x72\x74":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[104],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[325]},"\x74\x69\x74\x6C\x65":_0xf78a[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[326]},{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[262],"\x69\x63\x6F\x6E":_0xf78a[244],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[327],"\x72\x65\x70\x6F\x72\x74":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[304],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[328]},"\x74\x69\x74\x6C\x65":_0xf78a[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[329]},{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[104],"\x63\x6F\x6C\x6F\x72":_0xf78a[264],"\x69\x63\x6F\x6E":_0xf78a[244],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[330],"\x72\x65\x70\x6F\x72\x74":_0xf78a[278],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[331]},"\x74\x69\x74\x6C\x65":_0xf78a[332],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[333]}],"\x63\x69\x64":_0xf78a[334]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xf78a[241],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[262],"\x69\x63\x6F\x6E":_0xf78a[244],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[335],"\x72\x65\x70\x6F\x72\x74":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[301],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[336]},"\x74\x69\x74\x6C\x65":_0xf78a[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[337]},{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[262],"\x69\x63\x6F\x6E":_0xf78a[244],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[281],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[338],"\x72\x65\x70\x6F\x72\x74":_0xf78a[278],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[339]},"\x74\x69\x74\x6C\x65":_0xf78a[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[340]},{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[270],"\x69\x63\x6F\x6E":_0xf78a[244],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[341],"\x72\x65\x70\x6F\x72\x74":_0xf78a[292],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[293],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[342]},"\x74\x69\x74\x6C\x65":_0xf78a[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[343]}],"\x63\x69\x64":_0xf78a[344]}]}],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[345],"\x73\x74\x72\x75\x63\x74\x75\x72\x65":_0xf78a[346]}),defaultEntry:true,editable:true},{name:_0xf78a[348],model:JSON[_0xf78a[347]]({"\x74\x69\x74\x6C\x65":_0xf78a[348],"\x72\x6F\x77\x73":[{"\x63\x6F\x6C\x75\x6D\x6E\x73":[{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xf78a[241],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[266],"\x69\x63\x6F\x6E":_0xf78a[277],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[281],"\x72\x65\x70\x6F\x72\x74":_0xf78a[349],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[350],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[351]},"\x74\x69\x74\x6C\x65":_0xf78a[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[352]},{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[353],"\x63\x6F\x6C\x6F\x72":_0xf78a[264],"\x69\x63\x6F\x6E":_0xf78a[277],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[281],"\x72\x65\x70\x6F\x72\x74":_0xf78a[349],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[354]},"\x74\x69\x74\x6C\x65":_0xf78a[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[355]}],"\x63\x69\x64":_0xf78a[300]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xf78a[241],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[266],"\x69\x63\x6F\x6E":_0xf78a[277],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[356],"\x72\x65\x70\x6F\x72\x74":_0xf78a[349],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[350],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[357]},"\x74\x69\x74\x6C\x65":_0xf78a[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[358]},{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[350],"\x63\x6F\x6C\x6F\x72":_0xf78a[268],"\x69\x63\x6F\x6E":_0xf78a[244],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[359],"\x72\x65\x70\x6F\x72\x74":_0xf78a[349],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[360]},"\x74\x69\x74\x6C\x65":_0xf78a[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[361]}],"\x63\x69\x64":_0xf78a[317]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xf78a[241],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[350],"\x63\x6F\x6C\x6F\x72":_0xf78a[243],"\x69\x63\x6F\x6E":_0xf78a[244],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[362],"\x72\x65\x70\x6F\x72\x74":_0xf78a[349],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[363]},"\x74\x69\x74\x6C\x65":_0xf78a[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[364]}],"\x63\x69\x64":_0xf78a[334]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xf78a[241],"\x77\x69\x64\x67\x65\x74\x73":[],"\x63\x69\x64":_0xf78a[344]}]}],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[345],"\x73\x74\x72\x75\x63\x74\x75\x72\x65":_0xf78a[346]}),defaultEntry:true,editable:true},{name:_0xf78a[365],model:JSON[_0xf78a[347]]({"\x74\x69\x74\x6C\x65":_0xf78a[365],"\x72\x6F\x77\x73":[{"\x63\x6F\x6C\x75\x6D\x6E\x73":[{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xf78a[241],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[266],"\x69\x63\x6F\x6E":_0xf78a[277],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[281],"\x72\x65\x70\x6F\x72\x74":_0xf78a[255],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[366],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[367]},"\x74\x69\x74\x6C\x65":_0xf78a[368],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[369]}],"\x63\x69\x64":_0xf78a[300]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xf78a[241],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[270],"\x69\x63\x6F\x6E":_0xf78a[277],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[281],"\x72\x65\x70\x6F\x72\x74":_0xf78a[255],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[370],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[371]},"\x74\x69\x74\x6C\x65":_0xf78a[368],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[372]}],"\x63\x69\x64":_0xf78a[317]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xf78a[241],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0xf78a[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xf78a[268],"\x69\x63\x6F\x6E":_0xf78a[244],"\x6C\x69\x6E\x6B":_0xf78a[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xf78a[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xf78a[247],"\x76\x61\x6C\x75\x65":_0xf78a[248]},{"\x6E\x61\x6D\x65":_0xf78a[249],"\x76\x61\x6C\x75\x65":_0xf78a[250]},{"\x6E\x61\x6D\x65":_0xf78a[251],"\x76\x61\x6C\x75\x65":_0xf78a[252]},{"\x6E\x61\x6D\x65":_0xf78a[253],"\x76\x61\x6C\x75\x65":_0xf78a[254]},{"\x6E\x61\x6D\x65":_0xf78a[29],"\x76\x61\x6C\x75\x65":_0xf78a[255]},{"\x6E\x61\x6D\x65":_0xf78a[256],"\x76\x61\x6C\x75\x65":_0xf78a[257]},{"\x6E\x61\x6D\x65":_0xf78a[258],"\x76\x61\x6C\x75\x65":_0xf78a[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xf78a[260],"\x76\x61\x6C\x75\x65":_0xf78a[243]},{"\x6E\x61\x6D\x65":_0xf78a[261],"\x76\x61\x6C\x75\x65":_0xf78a[262]},{"\x6E\x61\x6D\x65":_0xf78a[263],"\x76\x61\x6C\x75\x65":_0xf78a[264]},{"\x6E\x61\x6D\x65":_0xf78a[265],"\x76\x61\x6C\x75\x65":_0xf78a[266]},{"\x6E\x61\x6D\x65":_0xf78a[267],"\x76\x61\x6C\x75\x65":_0xf78a[268]},{"\x6E\x61\x6D\x65":_0xf78a[269],"\x76\x61\x6C\x75\x65":_0xf78a[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xf78a[271],"\x76\x61\x6C\x75\x65":_0xf78a[244]},{"\x6E\x61\x6D\x65":_0xf78a[272],"\x76\x61\x6C\x75\x65":_0xf78a[273]},{"\x6E\x61\x6D\x65":_0xf78a[274],"\x76\x61\x6C\x75\x65":_0xf78a[275]},{"\x6E\x61\x6D\x65":_0xf78a[276],"\x76\x61\x6C\x75\x65":_0xf78a[277]}],"\x73\x65\x6C\x65\x63\x74":_0xf78a[281],"\x72\x65\x70\x6F\x72\x74":_0xf78a[255],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xf78a[373],"\x64\x65\x74\x61\x69\x6C\x73":_0xf78a[374]},"\x74\x69\x74\x6C\x65":_0xf78a[368],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[283],"\x77\x69\x64":_0xf78a[375]}],"\x63\x69\x64":_0xf78a[334]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xf78a[241],"\x77\x69\x64\x67\x65\x74\x73":[],"\x63\x69\x64":_0xf78a[344]}]}],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xf78a[345],"\x73\x74\x72\x75\x63\x74\x75\x72\x65":_0xf78a[346]}),defaultEntry:true,editable:true}],{ignoreDuplicates:true,individualHooks:true})})[_0xf78a[11]](function(_0xc319x21){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[238],_[_0xf78a[15]](_0xc319x21,_0xf78a[14])[_0xf78a[13]]()))});models[_0xf78a[380]][_0xf78a[22]]([{id:1,min_internal:1000,min_mailbox:1000,agi_port:4573,automation_timeout:3600,soundPath:_0xf78a[379]}],{ignoreDuplicates:true,individualHooks:true})[_0xf78a[11]](function(){console[_0xf78a[8]](util[_0xf78a[16]](_0xf78a[378]))});var _0xc319x22=[{id:1,name:_0xf78a[381],title:_0xf78a[382],ModuleId:null,path:_0xf78a[383]},{id:2,name:_0xf78a[384],title:_0xf78a[385],ModuleId:null,path:_0xf78a[386]},{id:3,name:_0xf78a[387],title:_0xf78a[388],ModuleId:null,path:_0xf78a[389]},{id:4,name:_0xf78a[390],title:_0xf78a[391],ModuleId:3,path:_0xf78a[389]},{id:5,name:_0xf78a[392],title:_0xf78a[393],ModuleId:null,path:_0xf78a[394]},{id:6,name:_0xf78a[395],title:_0xf78a[396],ModuleId:null,path:null},{id:7,name:_0xf78a[397],title:_0xf78a[398],ModuleId:6,path:_0xf78a[399]},{id:8,name:_0xf78a[400],title:_0xf78a[401],ModuleId:6,path:_0xf78a[402]},{id:9,name:_0xf78a[403],title:_0xf78a[404],ModuleId:6,path:_0xf78a[405]},{id:10,name:_0xf78a[406],title:_0xf78a[407],ModuleId:6,path:_0xf78a[408]},{id:11,name:_0xf78a[409],title:_0xf78a[410],ModuleId:6,path:_0xf78a[411]},{id:12,name:_0xf78a[412],title:_0xf78a[413],ModuleId:6,path:_0xf78a[414]},{id:13,name:_0xf78a[415],title:_0xf78a[416],ModuleId:null,path:_0xf78a[417]},{id:14,name:_0xf78a[418],title:_0xf78a[419],ModuleId:null,path:_0xf78a[420]},{id:15,name:_0xf78a[421],title:_0xf78a[422],ModuleId:null,path:_0xf78a[423]},{id:16,name:_0xf78a[424],title:_0xf78a[425],ModuleId:null,path:_0xf78a[426]},{id:17,name:_0xf78a[427],title:_0xf78a[428],ModuleId:null,path:_0xf78a[429]},{id:18,name:_0xf78a[430],title:_0xf78a[431],ModuleId:null,path:_0xf78a[432]},{id:19,name:_0xf78a[433],title:_0xf78a[434],ModuleId:null,path:_0xf78a[435]},{id:20,name:_0xf78a[436],title:_0xf78a[437],ModuleId:6,path:_0xf78a[438]}];models[_0xf78a[441]][_0xf78a[221]]()[_0xf78a[11]](function(_0xc319x23){var _0xc319x24=[];_0xc319x23= _[_0xf78a[15]](_0xc319x23,_0xf78a[9]);_0xc319x22[_0xf78a[220]](function(_0xc319x25){if(_[_0xf78a[216]](_0xc319x23,_0xc319x25[_0xf78a[9]])){_0xc319x24[_0xf78a[219]](models[_0xf78a[441]][_0xf78a[217]](_0xc319x25,{where:{id:_0xc319x25[_0xf78a[9]]}}))}else {_0xc319x24[_0xf78a[219]](models[_0xf78a[441]][_0xf78a[44]](_0xc319x25))}});return _0xc319x24})[_0xf78a[214]]()[_0xf78a[11]](function(){console[_0xf78a[8]](_0xf78a[440])})[_0xf78a[6]](function(_0xc319xc){console[_0xf78a[8]](_0xf78a[439],_0xc319xc)});var _0xc319x26=[{"\x69\x64":1,"\x6E\x61\x6D\x65":_0xf78a[442],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[443],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[444]},{"\x69\x64":2,"\x6E\x61\x6D\x65":_0xf78a[445],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[446],"\x70\x61\x72\x65\x6E\x74":_0xf78a[447],"\x74\x61\x62\x6C\x65":_0xf78a[349],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[444]},{"\x69\x64":3,"\x6E\x61\x6D\x65":_0xf78a[448],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[449],"\x70\x61\x72\x65\x6E\x74":_0xf78a[447],"\x74\x61\x62\x6C\x65":_0xf78a[349],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[450]},{"\x69\x64":4,"\x6E\x61\x6D\x65":_0xf78a[451],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[452],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[444]},{"\x69\x64":5,"\x6E\x61\x6D\x65":_0xf78a[445],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[453],"\x74\x61\x62\x6C\x65":_0xf78a[292],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[454]},{"\x69\x64":6,"\x6E\x61\x6D\x65":_0xf78a[455],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[453],"\x74\x61\x62\x6C\x65":_0xf78a[292],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[444]},{"\x69\x64":7,"\x6E\x61\x6D\x65":_0xf78a[451],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[453],"\x74\x61\x62\x6C\x65":_0xf78a[292],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[454]},{"\x69\x64":8,"\x6E\x61\x6D\x65":_0xf78a[456],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[453],"\x74\x61\x62\x6C\x65":_0xf78a[292],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[454]},{"\x69\x64":9,"\x6E\x61\x6D\x65":_0xf78a[457],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[453],"\x74\x61\x62\x6C\x65":_0xf78a[292],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[454]},{"\x69\x64":10,"\x6E\x61\x6D\x65":_0xf78a[445],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[458],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[459]},{"\x69\x64":11,"\x6E\x61\x6D\x65":_0xf78a[460],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[458],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[459]},{"\x69\x64":12,"\x6E\x61\x6D\x65":_0xf78a[461],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[458],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[462]},{"\x69\x64":13,"\x6E\x61\x6D\x65":_0xf78a[463],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[458],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[464]},{"\x69\x64":14,"\x6E\x61\x6D\x65":_0xf78a[465],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[452],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[444]},{"\x69\x64":15,"\x6E\x61\x6D\x65":_0xf78a[466],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[452],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[444]},{"\x69\x64":16,"\x6E\x61\x6D\x65":_0xf78a[467],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[452],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[444]},{"\x69\x64":17,"\x6E\x61\x6D\x65":_0xf78a[468],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[447],"\x74\x61\x62\x6C\x65":_0xf78a[349],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[444]},{"\x69\x64":18,"\x6E\x61\x6D\x65":_0xf78a[469],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[470],"\x70\x61\x72\x65\x6E\x74":_0xf78a[447],"\x74\x61\x62\x6C\x65":_0xf78a[349],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[450]},{"\x69\x64":19,"\x6E\x61\x6D\x65":_0xf78a[471],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[472],"\x74\x61\x62\x6C\x65":_0xf78a[473],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[474]},{"\x69\x64":20,"\x6E\x61\x6D\x65":_0xf78a[475],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[472],"\x74\x61\x62\x6C\x65":_0xf78a[473],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[476]},{"\x69\x64":21,"\x6E\x61\x6D\x65":_0xf78a[477],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[478],"\x74\x61\x62\x6C\x65":_0xf78a[479],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[444]},{"\x69\x64":22,"\x6E\x61\x6D\x65":_0xf78a[480],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[478],"\x74\x61\x62\x6C\x65":_0xf78a[479],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[444]},{"\x69\x64":23,"\x6E\x61\x6D\x65":_0xf78a[481],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[478],"\x74\x61\x62\x6C\x65":_0xf78a[479],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[482]},{"\x69\x64":24,"\x6E\x61\x6D\x65":_0xf78a[483],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[478],"\x74\x61\x62\x6C\x65":_0xf78a[479],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[484]},{"\x69\x64":25,"\x6E\x61\x6D\x65":_0xf78a[445],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[485],"\x70\x61\x72\x65\x6E\x74":_0xf78a[472],"\x74\x61\x62\x6C\x65":_0xf78a[473],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[486]},{"\x69\x64":26,"\x6E\x61\x6D\x65":_0xf78a[487],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[488],"\x70\x61\x72\x65\x6E\x74":_0xf78a[489],"\x74\x61\x62\x6C\x65":_0xf78a[490],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[444]},{"\x69\x64":27,"\x6E\x61\x6D\x65":_0xf78a[491],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[492],"\x70\x61\x72\x65\x6E\x74":_0xf78a[489],"\x74\x61\x62\x6C\x65":_0xf78a[493],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[444]},{"\x69\x64":28,"\x6E\x61\x6D\x65":_0xf78a[494],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[485],"\x70\x61\x72\x65\x6E\x74":_0xf78a[495],"\x74\x61\x62\x6C\x65":_0xf78a[473],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[496]},{"\x69\x64":29,"\x6E\x61\x6D\x65":_0xf78a[497],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[137],"\x70\x61\x72\x65\x6E\x74":_0xf78a[495],"\x74\x61\x62\x6C\x65":_0xf78a[473],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[498]},{"\x69\x64":30,"\x6E\x61\x6D\x65":_0xf78a[499],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[485],"\x70\x61\x72\x65\x6E\x74":_0xf78a[472],"\x74\x61\x62\x6C\x65":_0xf78a[473],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[500]},{"\x69\x64":31,"\x6E\x61\x6D\x65":_0xf78a[501],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[502],"\x74\x61\x62\x6C\x65":_0xf78a[503],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[444]},{"\x69\x64":32,"\x6E\x61\x6D\x65":_0xf78a[504],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[502],"\x74\x61\x62\x6C\x65":_0xf78a[503],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[505]},{"\x69\x64":33,"\x6E\x61\x6D\x65":_0xf78a[506],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[443],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[444]},{"\x69\x64":34,"\x6E\x61\x6D\x65":_0xf78a[507],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xf78a[453],"\x74\x61\x62\x6C\x65":_0xf78a[292],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[454]},{"\x69\x64":35,"\x6E\x61\x6D\x65":_0xf78a[508],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[509],"\x70\x61\x72\x65\x6E\x74":_0xf78a[510],"\x74\x61\x62\x6C\x65":_0xf78a[511],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[444]},{"\x69\x64":36,"\x6E\x61\x6D\x65":_0xf78a[512],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[513],"\x70\x61\x72\x65\x6E\x74":_0xf78a[510],"\x74\x61\x62\x6C\x65":_0xf78a[511],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[514]},{"\x69\x64":37,"\x6E\x61\x6D\x65":_0xf78a[515],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[516],"\x70\x61\x72\x65\x6E\x74":_0xf78a[510],"\x74\x61\x62\x6C\x65":_0xf78a[511],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[517]},{"\x69\x64":38,"\x6E\x61\x6D\x65":_0xf78a[518],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[519],"\x70\x61\x72\x65\x6E\x74":_0xf78a[510],"\x74\x61\x62\x6C\x65":_0xf78a[520],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[521]},{"\x69\x64":39,"\x6E\x61\x6D\x65":_0xf78a[522],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[523],"\x70\x61\x72\x65\x6E\x74":_0xf78a[510],"\x74\x61\x62\x6C\x65":_0xf78a[524],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[444]},{"\x69\x64":40,"\x6E\x61\x6D\x65":_0xf78a[525],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[526],"\x70\x61\x72\x65\x6E\x74":_0xf78a[510],"\x74\x61\x62\x6C\x65":_0xf78a[524],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[527]},{"\x69\x64":41,"\x6E\x61\x6D\x65":_0xf78a[528],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[529],"\x70\x61\x72\x65\x6E\x74":_0xf78a[510],"\x74\x61\x62\x6C\x65":_0xf78a[524],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xf78a[530]}];var _0xc319x27=[{"\x69\x64":1,"\x6E\x61\x6D\x65":_0xf78a[531],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x6D\x65\x74\x72\x69\x63":_0xf78a[532]},{"\x69\x64":2,"\x6E\x61\x6D\x65":_0xf78a[533],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x6D\x65\x74\x72\x69\x63":_0xf78a[534]},{"\x69\x64":3,"\x6E\x61\x6D\x65":_0xf78a[535],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x6D\x65\x74\x72\x69\x63":_0xf78a[536],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[537]},{"\x69\x64":4,"\x6E\x61\x6D\x65":_0xf78a[538],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x6D\x65\x74\x72\x69\x63":_0xf78a[539]},{"\x69\x64":5,"\x6E\x61\x6D\x65":_0xf78a[540],"\x74\x61\x62\x6C\x65":_0xf78a[292],"\x6D\x65\x74\x72\x69\x63":_0xf78a[541],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[542]},{"\x69\x64":6,"\x6E\x61\x6D\x65":_0xf78a[543],"\x74\x61\x62\x6C\x65":_0xf78a[292],"\x6D\x65\x74\x72\x69\x63":_0xf78a[544],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[545]},{"\x69\x64":7,"\x6E\x61\x6D\x65":_0xf78a[546],"\x74\x61\x62\x6C\x65":_0xf78a[292],"\x6D\x65\x74\x72\x69\x63":_0xf78a[547],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[548]},{"\x69\x64":8,"\x6E\x61\x6D\x65":_0xf78a[549],"\x74\x61\x62\x6C\x65":_0xf78a[292],"\x6D\x65\x74\x72\x69\x63":_0xf78a[550],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[551]},{"\x69\x64":9,"\x6E\x61\x6D\x65":_0xf78a[552],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x6D\x65\x74\x72\x69\x63":_0xf78a[553]},{"\x69\x64":10,"\x6E\x61\x6D\x65":_0xf78a[554],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x6D\x65\x74\x72\x69\x63":_0xf78a[555],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[556]},{"\x69\x64":11,"\x6E\x61\x6D\x65":_0xf78a[557],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x6D\x65\x74\x72\x69\x63":_0xf78a[558],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[559]},{"\x69\x64":12,"\x6E\x61\x6D\x65":_0xf78a[560],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x6D\x65\x74\x72\x69\x63":_0xf78a[561],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[562]},{"\x69\x64":13,"\x6E\x61\x6D\x65":_0xf78a[563],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x6D\x65\x74\x72\x69\x63":_0xf78a[564],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[565]},{"\x69\x64":14,"\x6E\x61\x6D\x65":_0xf78a[566],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x6D\x65\x74\x72\x69\x63":_0xf78a[567],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[568]},{"\x69\x64":15,"\x6E\x61\x6D\x65":_0xf78a[569],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x6D\x65\x74\x72\x69\x63":_0xf78a[570],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[571]},{"\x69\x64":16,"\x6E\x61\x6D\x65":_0xf78a[572],"\x74\x61\x62\x6C\x65":_0xf78a[473],"\x6D\x65\x74\x72\x69\x63":_0xf78a[573],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[574]},{"\x69\x64":17,"\x6E\x61\x6D\x65":_0xf78a[575],"\x74\x61\x62\x6C\x65":_0xf78a[473],"\x6D\x65\x74\x72\x69\x63":_0xf78a[576],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[577]},{"\x69\x64":18,"\x6E\x61\x6D\x65":_0xf78a[578],"\x74\x61\x62\x6C\x65":_0xf78a[479],"\x6D\x65\x74\x72\x69\x63":_0xf78a[579],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[580]},{"\x69\x64":19,"\x6E\x61\x6D\x65":_0xf78a[581],"\x74\x61\x62\x6C\x65":_0xf78a[479],"\x6D\x65\x74\x72\x69\x63":_0xf78a[582],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[583]},{"\x69\x64":20,"\x6E\x61\x6D\x65":_0xf78a[584],"\x74\x61\x62\x6C\x65":_0xf78a[479],"\x6D\x65\x74\x72\x69\x63":_0xf78a[585],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[586]},{"\x69\x64":21,"\x6E\x61\x6D\x65":_0xf78a[587],"\x74\x61\x62\x6C\x65":_0xf78a[479],"\x6D\x65\x74\x72\x69\x63":_0xf78a[588],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[589]},{"\x69\x64":22,"\x6E\x61\x6D\x65":_0xf78a[590],"\x74\x61\x62\x6C\x65":_0xf78a[473],"\x6D\x65\x74\x72\x69\x63":_0xf78a[591],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[592]},{"\x69\x64":23,"\x6E\x61\x6D\x65":_0xf78a[593],"\x74\x61\x62\x6C\x65":_0xf78a[490],"\x6D\x65\x74\x72\x69\x63":_0xf78a[594],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[595]},{"\x69\x64":24,"\x6E\x61\x6D\x65":_0xf78a[596],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x6D\x65\x74\x72\x69\x63":_0xf78a[597],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null},{"\x69\x64":25,"\x6E\x61\x6D\x65":_0xf78a[598],"\x74\x61\x62\x6C\x65":_0xf78a[278],"\x6D\x65\x74\x72\x69\x63":_0xf78a[599],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xf78a[600]}];models[_0xf78a[831]][_0xf78a[377]]({where:{id:1}})[_0xf78a[11]](function(){return models[_0xf78a[831]][_0xf78a[44]]({id:1,tree:_0xf78a[832]})})[_0xf78a[11]](function(){return models[_0xf78a[831]][_0xf78a[830]]({where:{id:2},defaults:{id:2,tree:_0xf78a[829]}})})[_0xf78a[11]](function(){return models[_0xf78a[828]][_0xf78a[221]]()})[_0xf78a[11]](function(_0xc319x2b){var _0xc319x2c=[];_0xc319x2b= _[_0xf78a[15]](_0xc319x2b,_0xf78a[9]);_0xc319x27[_0xf78a[220]](function(_0xc319x2d){if(_[_0xf78a[216]](_0xc319x2b,_0xc319x2d[_0xf78a[9]])){_0xc319x2c[_0xf78a[219]](models[_0xf78a[828]][_0xf78a[217]](_0xc319x2d,{where:{id:_0xc319x2d[_0xf78a[9]]}}))}else {_0xc319x2c[_0xf78a[219]](models[_0xf78a[828]][_0xf78a[44]](_0xc319x2d))}});return _0xc319x2c})[_0xf78a[214]]()[_0xf78a[11]](function(){return models[_0xf78a[827]][_0xf78a[221]]()})[_0xf78a[11]](function(_0xc319x28){var _0xc319x29=[];_0xc319x28= _[_0xf78a[15]](_0xc319x28,_0xf78a[9]);_0xc319x26[_0xf78a[220]](function(_0xc319x2a){if(_[_0xf78a[216]](_0xc319x28,_0xc319x2a[_0xf78a[9]])){_0xc319x29[_0xf78a[219]](models[_0xf78a[827]][_0xf78a[217]](_0xc319x2a,{where:{id:_0xc319x2a[_0xf78a[9]]}}))}else {_0xc319x29[_0xf78a[219]](models[_0xf78a[827]][_0xf78a[44]](_0xc319x2a))}});return _0xc319x29})[_0xf78a[214]]()[_0xf78a[11]](function(){return models[_0xf78a[826]][_0xf78a[377]]({where:{DefaultReportId:{$gt:0}}})})[_0xf78a[11]](function(){return models[_0xf78a[826]][_0xf78a[22]]([{"\x66\x69\x65\x6C\x64":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[604],"\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":_0xf78a[605],"\x61\x6C\x69\x61\x73":_0xf78a[606],"\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":_0xf78a[607],"\x61\x6C\x69\x61\x73":_0xf78a[608],"\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":_0xf78a[609],"\x61\x6C\x69\x61\x73":_0xf78a[154],"\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":_0xf78a[610],"\x61\x6C\x69\x61\x73":_0xf78a[611],"\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":_0xf78a[612],"\x61\x6C\x69\x61\x73":_0xf78a[613],"\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":_0xf78a[614],"\x61\x6C\x69\x61\x73":_0xf78a[615],"\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":_0xf78a[616],"\x61\x6C\x69\x61\x73":_0xf78a[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":1},{"\x66\x69\x65\x6C\x64":_0xf78a[618],"\x61\x6C\x69\x61\x73":_0xf78a[619],"\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":_0xf78a[620],"\x61\x6C\x69\x61\x73":_0xf78a[621],"\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":_0xf78a[622],"\x61\x6C\x69\x61\x73":_0xf78a[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":1},{"\x66\x69\x65\x6C\x64":_0xf78a[624],"\x61\x6C\x69\x61\x73":_0xf78a[625],"\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":_0xf78a[626],"\x61\x6C\x69\x61\x73":_0xf78a[627],"\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":_0xf78a[102],"\x61\x6C\x69\x61\x73":_0xf78a[628],"\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":_0xf78a[532],"\x61\x6C\x69\x61\x73":_0xf78a[629],"\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":_0xf78a[539],"\x61\x6C\x69\x61\x73":_0xf78a[630],"\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":_0xf78a[534],"\x61\x6C\x69\x61\x73":_0xf78a[631],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[632],"\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":_0xf78a[633],"\x61\x6C\x69\x61\x73":_0xf78a[634],"\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":_0xf78a[635],"\x61\x6C\x69\x61\x73":_0xf78a[636],"\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":_0xf78a[637],"\x61\x6C\x69\x61\x73":_0xf78a[638],"\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":_0xf78a[639],"\x61\x6C\x69\x61\x73":_0xf78a[640],"\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":_0xf78a[641],"\x61\x6C\x69\x61\x73":_0xf78a[642],"\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":_0xf78a[643],"\x61\x6C\x69\x61\x73":_0xf78a[644],"\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":_0xf78a[645],"\x61\x6C\x69\x61\x73":_0xf78a[646],"\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":_0xf78a[647],"\x61\x6C\x69\x61\x73":_0xf78a[648],"\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":_0xf78a[649],"\x61\x6C\x69\x61\x73":_0xf78a[650],"\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":_0xf78a[651],"\x61\x6C\x69\x61\x73":_0xf78a[630],"\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":_0xf78a[652],"\x61\x6C\x69\x61\x73":_0xf78a[653],"\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":_0xf78a[654],"\x61\x6C\x69\x61\x73":_0xf78a[655],"\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":_0xf78a[656],"\x61\x6C\x69\x61\x73":_0xf78a[657],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[632],"\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":_0xf78a[658],"\x61\x6C\x69\x61\x73":_0xf78a[659],"\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":_0xf78a[637],"\x61\x6C\x69\x61\x73":_0xf78a[638],"\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":_0xf78a[639],"\x61\x6C\x69\x61\x73":_0xf78a[640],"\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":_0xf78a[641],"\x61\x6C\x69\x61\x73":_0xf78a[660],"\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":_0xf78a[649],"\x61\x6C\x69\x61\x73":_0xf78a[650],"\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":_0xf78a[651],"\x61\x6C\x69\x61\x73":_0xf78a[630],"\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":_0xf78a[652],"\x61\x6C\x69\x61\x73":_0xf78a[661],"\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":_0xf78a[654],"\x61\x6C\x69\x61\x73":_0xf78a[655],"\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":_0xf78a[662],"\x61\x6C\x69\x61\x73":_0xf78a[663],"\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":_0xf78a[656],"\x61\x6C\x69\x61\x73":_0xf78a[657],"\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":_0xf78a[635],"\x61\x6C\x69\x61\x73":_0xf78a[636],"\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":_0xf78a[609],"\x61\x6C\x69\x61\x73":_0xf78a[154],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[664],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[665],"\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":_0xf78a[618],"\x61\x6C\x69\x61\x73":_0xf78a[666],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[614],"\x61\x6C\x69\x61\x73":_0xf78a[668],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[622],"\x61\x6C\x69\x61\x73":_0xf78a[339],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[532],"\x61\x6C\x69\x61\x73":_0xf78a[669],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[534],"\x61\x6C\x69\x61\x73":_0xf78a[671],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[539],"\x61\x6C\x69\x61\x73":_0xf78a[672],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[604],"\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":_0xf78a[605],"\x61\x6C\x69\x61\x73":_0xf78a[606],"\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":_0xf78a[607],"\x61\x6C\x69\x61\x73":_0xf78a[608],"\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":_0xf78a[609],"\x61\x6C\x69\x61\x73":_0xf78a[154],"\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":_0xf78a[673],"\x61\x6C\x69\x61\x73":_0xf78a[674],"\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":_0xf78a[675],"\x61\x6C\x69\x61\x73":_0xf78a[676],"\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":_0xf78a[677],"\x61\x6C\x69\x61\x73":_0xf78a[678],"\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":_0xf78a[679],"\x61\x6C\x69\x61\x73":_0xf78a[680],"\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":_0xf78a[681],"\x61\x6C\x69\x61\x73":_0xf78a[630],"\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":_0xf78a[682],"\x61\x6C\x69\x61\x73":_0xf78a[629],"\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":_0xf78a[683],"\x61\x6C\x69\x61\x73":_0xf78a[684],"\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":_0xf78a[685],"\x61\x6C\x69\x61\x73":_0xf78a[686],"\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":_0xf78a[687],"\x61\x6C\x69\x61\x73":_0xf78a[688],"\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":_0xf78a[689],"\x61\x6C\x69\x61\x73":_0xf78a[690],"\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":_0xf78a[691],"\x61\x6C\x69\x61\x73":_0xf78a[692],"\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":_0xf78a[102],"\x61\x6C\x69\x61\x73":_0xf78a[628],"\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":_0xf78a[673],"\x61\x6C\x69\x61\x73":_0xf78a[674],"\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":_0xf78a[687],"\x61\x6C\x69\x61\x73":_0xf78a[666],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[693],"\x61\x6C\x69\x61\x73":_0xf78a[694],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[682],"\x61\x6C\x69\x61\x73":_0xf78a[695],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[685],"\x61\x6C\x69\x61\x73":_0xf78a[696],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[682],"\x61\x6C\x69\x61\x73":_0xf78a[669],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[685],"\x61\x6C\x69\x61\x73":_0xf78a[697],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[609],"\x61\x6C\x69\x61\x73":_0xf78a[154],"\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":_0xf78a[687],"\x61\x6C\x69\x61\x73":_0xf78a[666],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[682],"\x61\x6C\x69\x61\x73":_0xf78a[698],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[682],"\x61\x6C\x69\x61\x73":_0xf78a[699],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[681],"\x61\x6C\x69\x61\x73":_0xf78a[700],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[681],"\x61\x6C\x69\x61\x73":_0xf78a[701],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[685],"\x61\x6C\x69\x61\x73":_0xf78a[702],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[685],"\x61\x6C\x69\x61\x73":_0xf78a[703],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[609],"\x61\x6C\x69\x61\x73":_0xf78a[154],"\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":_0xf78a[687],"\x61\x6C\x69\x61\x73":_0xf78a[704],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[541],"\x61\x6C\x69\x61\x73":_0xf78a[705],"\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":_0xf78a[544],"\x61\x6C\x69\x61\x73":_0xf78a[543],"\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":_0xf78a[547],"\x61\x6C\x69\x61\x73":_0xf78a[546],"\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":_0xf78a[550],"\x61\x6C\x69\x61\x73":_0xf78a[549],"\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":_0xf78a[689],"\x61\x6C\x69\x61\x73":_0xf78a[706],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[249],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[665],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[604],"\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":_0xf78a[605],"\x61\x6C\x69\x61\x73":_0xf78a[606],"\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":_0xf78a[609],"\x61\x6C\x69\x61\x73":_0xf78a[154],"\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":_0xf78a[610],"\x61\x6C\x69\x61\x73":_0xf78a[611],"\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":_0xf78a[612],"\x61\x6C\x69\x61\x73":_0xf78a[613],"\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":_0xf78a[614],"\x61\x6C\x69\x61\x73":_0xf78a[615],"\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":_0xf78a[616],"\x61\x6C\x69\x61\x73":_0xf78a[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":10},{"\x66\x69\x65\x6C\x64":_0xf78a[534],"\x61\x6C\x69\x61\x73":_0xf78a[707],"\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":_0xf78a[622],"\x61\x6C\x69\x61\x73":_0xf78a[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":10},{"\x66\x69\x65\x6C\x64":_0xf78a[624],"\x61\x6C\x69\x61\x73":_0xf78a[625],"\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":_0xf78a[626],"\x61\x6C\x69\x61\x73":_0xf78a[627],"\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":_0xf78a[553],"\x61\x6C\x69\x61\x73":_0xf78a[708],"\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":_0xf78a[709],"\x61\x6C\x69\x61\x73":_0xf78a[710],"\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":_0xf78a[102],"\x61\x6C\x69\x61\x73":_0xf78a[628],"\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":_0xf78a[609],"\x61\x6C\x69\x61\x73":_0xf78a[154],"\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":_0xf78a[614],"\x61\x6C\x69\x61\x73":_0xf78a[668],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[534],"\x61\x6C\x69\x61\x73":_0xf78a[671],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[534],"\x61\x6C\x69\x61\x73":_0xf78a[711],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[622],"\x61\x6C\x69\x61\x73":_0xf78a[712],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[553],"\x61\x6C\x69\x61\x73":_0xf78a[713],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[553],"\x61\x6C\x69\x61\x73":_0xf78a[714],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[626],"\x61\x6C\x69\x61\x73":_0xf78a[706],"\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":_0xf78a[622],"\x61\x6C\x69\x61\x73":_0xf78a[249],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[553],"\x61\x6C\x69\x61\x73":_0xf78a[715],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[609],"\x61\x6C\x69\x61\x73":_0xf78a[154],"\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":_0xf78a[614],"\x61\x6C\x69\x61\x73":_0xf78a[716],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[536],"\x61\x6C\x69\x61\x73":_0xf78a[717],"\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":_0xf78a[555],"\x61\x6C\x69\x61\x73":_0xf78a[554],"\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":_0xf78a[558],"\x61\x6C\x69\x61\x73":_0xf78a[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":11,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":13},{"\x66\x69\x65\x6C\x64":_0xf78a[561],"\x61\x6C\x69\x61\x73":_0xf78a[718],"\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":_0xf78a[564],"\x61\x6C\x69\x61\x73":_0xf78a[719],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[664],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[665],"\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":_0xf78a[618],"\x61\x6C\x69\x61\x73":_0xf78a[666],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[614],"\x61\x6C\x69\x61\x73":_0xf78a[668],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[622],"\x61\x6C\x69\x61\x73":_0xf78a[339],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[532],"\x61\x6C\x69\x61\x73":_0xf78a[669],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[534],"\x61\x6C\x69\x61\x73":_0xf78a[671],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[539],"\x61\x6C\x69\x61\x73":_0xf78a[672],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[567],"\x61\x6C\x69\x61\x73":_0xf78a[720],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[664],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[665],"\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":_0xf78a[618],"\x61\x6C\x69\x61\x73":_0xf78a[666],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[614],"\x61\x6C\x69\x61\x73":_0xf78a[668],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[622],"\x61\x6C\x69\x61\x73":_0xf78a[339],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[532],"\x61\x6C\x69\x61\x73":_0xf78a[669],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[534],"\x61\x6C\x69\x61\x73":_0xf78a[671],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[539],"\x61\x6C\x69\x61\x73":_0xf78a[672],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[570],"\x61\x6C\x69\x61\x73":_0xf78a[721],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[664],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[665],"\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":_0xf78a[618],"\x61\x6C\x69\x61\x73":_0xf78a[666],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[614],"\x61\x6C\x69\x61\x73":_0xf78a[668],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[622],"\x61\x6C\x69\x61\x73":_0xf78a[339],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[532],"\x61\x6C\x69\x61\x73":_0xf78a[669],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[534],"\x61\x6C\x69\x61\x73":_0xf78a[671],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[539],"\x61\x6C\x69\x61\x73":_0xf78a[672],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[633],"\x61\x6C\x69\x61\x73":_0xf78a[634],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[249],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[665],"\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":_0xf78a[654],"\x61\x6C\x69\x61\x73":_0xf78a[722],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[654],"\x61\x6C\x69\x61\x73":_0xf78a[363],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[656],"\x61\x6C\x69\x61\x73":_0xf78a[657],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[249],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[665],"\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":_0xf78a[654],"\x61\x6C\x69\x61\x73":_0xf78a[722],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[654],"\x61\x6C\x69\x61\x73":_0xf78a[363],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[673],"\x61\x6C\x69\x61\x73":_0xf78a[674],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":_0xf78a[723],"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":19},{"\x66\x69\x65\x6C\x64":_0xf78a[724],"\x61\x6C\x69\x61\x73":_0xf78a[725],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":_0xf78a[723],"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":19},{"\x66\x69\x65\x6C\x64":_0xf78a[576],"\x61\x6C\x69\x61\x73":_0xf78a[655],"\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":_0xf78a[673],"\x61\x6C\x69\x61\x73":_0xf78a[674],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":_0xf78a[723],"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":20},{"\x66\x69\x65\x6C\x64":_0xf78a[576],"\x61\x6C\x69\x61\x73":_0xf78a[655],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[604],"\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":_0xf78a[726],"\x61\x6C\x69\x61\x73":_0xf78a[727],"\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":_0xf78a[728],"\x61\x6C\x69\x61\x73":_0xf78a[729],"\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":_0xf78a[730],"\x61\x6C\x69\x61\x73":_0xf78a[731],"\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":_0xf78a[673],"\x61\x6C\x69\x61\x73":_0xf78a[732],"\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":_0xf78a[733],"\x61\x6C\x69\x61\x73":_0xf78a[734],"\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":_0xf78a[735],"\x61\x6C\x69\x61\x73":_0xf78a[736],"\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":_0xf78a[737],"\x61\x6C\x69\x61\x73":_0xf78a[738],"\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":_0xf78a[739],"\x61\x6C\x69\x61\x73":_0xf78a[621],"\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":_0xf78a[740],"\x61\x6C\x69\x61\x73":_0xf78a[619],"\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":_0xf78a[741],"\x61\x6C\x69\x61\x73":_0xf78a[742],"\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":_0xf78a[743],"\x61\x6C\x69\x61\x73":_0xf78a[744],"\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":_0xf78a[745],"\x61\x6C\x69\x61\x73":_0xf78a[746],"\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":_0xf78a[673],"\x61\x6C\x69\x61\x73":_0xf78a[674],"\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":_0xf78a[740],"\x61\x6C\x69\x61\x73":_0xf78a[747],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[582],"\x61\x6C\x69\x61\x73":_0xf78a[748],"\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":_0xf78a[749],"\x75\x70\x64\x61\x74\x65\x64\x41\x74":_0xf78a[749],"\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":_0xf78a[585],"\x61\x6C\x69\x61\x73":_0xf78a[750],"\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":_0xf78a[579],"\x61\x6C\x69\x61\x73":_0xf78a[751],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[752]},{"\x66\x69\x65\x6C\x64":_0xf78a[579],"\x61\x6C\x69\x61\x73":_0xf78a[753],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[752]},{"\x66\x69\x65\x6C\x64":_0xf78a[726],"\x61\x6C\x69\x61\x73":_0xf78a[754],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[755],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[756],"\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":_0xf78a[740],"\x61\x6C\x69\x61\x73":_0xf78a[666],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[743],"\x61\x6C\x69\x61\x73":_0xf78a[668],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[579],"\x61\x6C\x69\x61\x73":_0xf78a[580],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[752]},{"\x66\x69\x65\x6C\x64":_0xf78a[588],"\x61\x6C\x69\x61\x73":_0xf78a[753],"\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":_0xf78a[752]},{"\x66\x69\x65\x6C\x64":_0xf78a[733],"\x61\x6C\x69\x61\x73":_0xf78a[154],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[755],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[665],"\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":_0xf78a[740],"\x61\x6C\x69\x61\x73":_0xf78a[666],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[743],"\x61\x6C\x69\x61\x73":_0xf78a[668],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[745],"\x61\x6C\x69\x61\x73":_0xf78a[339],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[579],"\x61\x6C\x69\x61\x73":_0xf78a[580],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[752]},{"\x66\x69\x65\x6C\x64":_0xf78a[588],"\x61\x6C\x69\x61\x73":_0xf78a[753],"\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":_0xf78a[752]},{"\x66\x69\x65\x6C\x64":_0xf78a[673],"\x61\x6C\x69\x61\x73":_0xf78a[674],"\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":_0xf78a[757],"\x61\x6C\x69\x61\x73":_0xf78a[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,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25},{"\x66\x69\x65\x6C\x64":_0xf78a[633],"\x61\x6C\x69\x61\x73":_0xf78a[759],"\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":_0xf78a[724],"\x61\x6C\x69\x61\x73":_0xf78a[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,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25},{"\x66\x69\x65\x6C\x64":_0xf78a[761],"\x61\x6C\x69\x61\x73":_0xf78a[762],"\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":_0xf78a[763],"\x61\x6C\x69\x61\x73":_0xf78a[764],"\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":_0xf78a[591],"\x61\x6C\x69\x61\x73":_0xf78a[655],"\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":_0xf78a[765],"\x61\x6C\x69\x61\x73":_0xf78a[766],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[632],"\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":_0xf78a[641],"\x61\x6C\x69\x61\x73":_0xf78a[642],"\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":_0xf78a[767],"\x61\x6C\x69\x61\x73":_0xf78a[628],"\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":_0xf78a[735],"\x61\x6C\x69\x61\x73":_0xf78a[768],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":_0xf78a[723],"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26},{"\x66\x69\x65\x6C\x64":_0xf78a[737],"\x61\x6C\x69\x61\x73":_0xf78a[769],"\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":_0xf78a[594],"\x61\x6C\x69\x61\x73":_0xf78a[655],"\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":_0xf78a[752]},{"\x66\x69\x65\x6C\x64":_0xf78a[765],"\x61\x6C\x69\x61\x73":_0xf78a[766],"\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":_0xf78a[641],"\x61\x6C\x69\x61\x73":_0xf78a[770],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[771],"\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":_0xf78a[772],"\x61\x6C\x69\x61\x73":_0xf78a[491],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[773],"\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":_0xf78a[673],"\x61\x6C\x69\x61\x73":_0xf78a[674],"\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":_0xf78a[761],"\x61\x6C\x69\x61\x73":_0xf78a[762],"\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":_0xf78a[763],"\x61\x6C\x69\x61\x73":_0xf78a[764],"\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":_0xf78a[654],"\x61\x6C\x69\x61\x73":_0xf78a[655],"\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":_0xf78a[752]},{"\x66\x69\x65\x6C\x64":_0xf78a[774],"\x61\x6C\x69\x61\x73":_0xf78a[775],"\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":_0xf78a[724],"\x61\x6C\x69\x61\x73":_0xf78a[634],"\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":_0xf78a[654],"\x61\x6C\x69\x61\x73":_0xf78a[655],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[752]},{"\x66\x69\x65\x6C\x64":_0xf78a[673],"\x61\x6C\x69\x61\x73":_0xf78a[674],"\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":_0xf78a[761],"\x61\x6C\x69\x61\x73":_0xf78a[762],"\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":_0xf78a[763],"\x61\x6C\x69\x61\x73":_0xf78a[764],"\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":_0xf78a[724],"\x61\x6C\x69\x61\x73":_0xf78a[85],"\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":_0xf78a[654],"\x61\x6C\x69\x61\x73":_0xf78a[655],"\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":_0xf78a[752]},{"\x66\x69\x65\x6C\x64":_0xf78a[776],"\x61\x6C\x69\x61\x73":_0xf78a[674],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[777],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[665],"\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":_0xf78a[778],"\x61\x6C\x69\x61\x73":_0xf78a[779],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[778],"\x61\x6C\x69\x61\x73":_0xf78a[780],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[609],"\x61\x6C\x69\x61\x73":_0xf78a[154],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[777],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[665],"\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":_0xf78a[778],"\x61\x6C\x69\x61\x73":_0xf78a[779],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[778],"\x61\x6C\x69\x61\x73":_0xf78a[780],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[670],"\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":_0xf78a[605],"\x61\x6C\x69\x61\x73":_0xf78a[606],"\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":_0xf78a[609],"\x61\x6C\x69\x61\x73":_0xf78a[154],"\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":_0xf78a[610],"\x61\x6C\x69\x61\x73":_0xf78a[650],"\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":_0xf78a[597],"\x61\x6C\x69\x61\x73":_0xf78a[653],"\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":_0xf78a[599],"\x61\x6C\x69\x61\x73":_0xf78a[354],"\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":_0xf78a[677],"\x61\x6C\x69\x61\x73":_0xf78a[720],"\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":_0xf78a[781]},{"\x66\x69\x65\x6C\x64":_0xf78a[687],"\x61\x6C\x69\x61\x73":_0xf78a[704],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[541],"\x61\x6C\x69\x61\x73":_0xf78a[705],"\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":_0xf78a[544],"\x61\x6C\x69\x61\x73":_0xf78a[543],"\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":_0xf78a[547],"\x61\x6C\x69\x61\x73":_0xf78a[546],"\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":_0xf78a[550],"\x61\x6C\x69\x61\x73":_0xf78a[549],"\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":_0xf78a[782],"\x61\x6C\x69\x61\x73":_0xf78a[783],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[784],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[756],"\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":_0xf78a[785],"\x61\x6C\x69\x61\x73":_0xf78a[786],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[787],"\x61\x6C\x69\x61\x73":_0xf78a[788],"\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":_0xf78a[789],"\x61\x6C\x69\x61\x73":_0xf78a[790],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[791],"\x61\x6C\x69\x61\x73":_0xf78a[792],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[793],"\x61\x6C\x69\x61\x73":_0xf78a[794],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[733],"\x61\x6C\x69\x61\x73":_0xf78a[154],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[784],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[665],"\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":_0xf78a[795],"\x61\x6C\x69\x61\x73":_0xf78a[786],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[796],"\x61\x6C\x69\x61\x73":_0xf78a[797],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[798],"\x61\x6C\x69\x61\x73":_0xf78a[788],"\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":_0xf78a[799],"\x61\x6C\x69\x61\x73":_0xf78a[800],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x66\x6F\x72\x6D\x61\x74":_0xf78a[752],"\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":_0xf78a[673],"\x61\x6C\x69\x61\x73":_0xf78a[673],"\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":_0xf78a[603],"\x61\x6C\x69\x61\x73":_0xf78a[801],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[665],"\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":_0xf78a[802],"\x61\x6C\x69\x61\x73":_0xf78a[803],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[804],"\x61\x6C\x69\x61\x73":_0xf78a[674],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[805],"\x61\x6C\x69\x61\x73":_0xf78a[154],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[806],"\x61\x6C\x69\x61\x73":_0xf78a[719],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x63\x75\x73\x74\x6F\x6D":0,"\x66\x6F\x72\x6D\x61\x74":_0xf78a[807],"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38},{"\x66\x69\x65\x6C\x64":_0xf78a[808],"\x61\x6C\x69\x61\x73":_0xf78a[784],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[809],"\x61\x6C\x69\x61\x73":_0xf78a[810],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[667],"\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":_0xf78a[9],"\x61\x6C\x69\x61\x73":_0xf78a[9],"\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":_0xf78a[811],"\x61\x6C\x69\x61\x73":_0xf78a[811],"\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":_0xf78a[812],"\x61\x6C\x69\x61\x73":_0xf78a[812],"\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":_0xf78a[813],"\x61\x6C\x69\x61\x73":_0xf78a[813],"\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":_0xf78a[806],"\x61\x6C\x69\x61\x73":_0xf78a[806],"\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":_0xf78a[814],"\x61\x6C\x69\x61\x73":_0xf78a[814],"\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":_0xf78a[815],"\x61\x6C\x69\x61\x73":_0xf78a[815],"\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":_0xf78a[816],"\x61\x6C\x69\x61\x73":_0xf78a[816],"\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":_0xf78a[817],"\x61\x6C\x69\x61\x73":_0xf78a[817],"\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":_0xf78a[818],"\x61\x6C\x69\x61\x73":_0xf78a[818],"\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":_0xf78a[819],"\x61\x6C\x69\x61\x73":_0xf78a[819],"\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":_0xf78a[656],"\x61\x6C\x69\x61\x73":_0xf78a[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":_0xf78a[820],"\x61\x6C\x69\x61\x73":_0xf78a[820],"\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":_0xf78a[656],"\x61\x6C\x69\x61\x73":_0xf78a[656],"\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":_0xf78a[821],"\x61\x6C\x69\x61\x73":_0xf78a[822],"\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":_0xf78a[816],"\x61\x6C\x69\x61\x73":_0xf78a[816],"\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":_0xf78a[807],"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0xf78a[9],"\x61\x6C\x69\x61\x73":_0xf78a[823],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xf78a[665],"\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":_0xf78a[824],"\x61\x6C\x69\x61\x73":_0xf78a[825],"\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":_0xf78a[752],"\x63\x75\x73\x74\x6F\x6D":1}],{ignoreDuplicates:true,individualHooks:true})})[_0xf78a[11]](function(){console[_0xf78a[8]](_0xf78a[602])})[_0xf78a[6]](function(_0xc319xc){console[_0xf78a[8]](_0xf78a[601],_0xc319xc)});models[_0xf78a[149]][_0xf78a[377]]({where:{context:_0xf78a[97]}})[_0xf78a[11]](function(){models[_0xf78a[149]][_0xf78a[22]]([{context:_0xf78a[97],exten:_0xf78a[834],priority:1,app:_0xf78a[105],appdata:_0xf78a[835],type:_0xf78a[836]},{context:_0xf78a[97],exten:_0xf78a[834],priority:2,app:_0xf78a[105],appdata:_0xf78a[837],type:_0xf78a[836]},{context:_0xf78a[97],exten:_0xf78a[834],priority:3,app:_0xf78a[110],appdata:_0xf78a[838],type:_0xf78a[836]},{context:_0xf78a[97],exten:_0xf78a[834],priority:4,app:_0xf78a[839],appdata:_0xf78a[137],type:_0xf78a[836]},{context:_0xf78a[97],exten:_0xf78a[834],priority:5,app:_0xf78a[840],appdata:_0xf78a[109],type:_0xf78a[836]},{context:_0xf78a[97],exten:_0xf78a[834],priority:6,app:_0xf78a[110],appdata:_0xf78a[841],type:_0xf78a[836]},{context:_0xf78a[97],exten:_0xf78a[834],priority:7,app:_0xf78a[110],appdata:_0xf78a[842],type:_0xf78a[836]},{context:_0xf78a[97],exten:_0xf78a[834],priority:8,app:_0xf78a[110],appdata:_0xf78a[843],type:_0xf78a[836]},{context:_0xf78a[97],exten:_0xf78a[834],priority:9,app:_0xf78a[110],appdata:_0xf78a[844],type:_0xf78a[836]},{context:_0xf78a[97],exten:_0xf78a[834],priority:10,app:_0xf78a[110],appdata:_0xf78a[845],type:_0xf78a[836]},{context:_0xf78a[97],exten:_0xf78a[834],priority:11,app:_0xf78a[110],appdata:_0xf78a[846],type:_0xf78a[836]},{context:_0xf78a[97],exten:_0xf78a[834],priority:12,app:_0xf78a[110],appdata:_0xf78a[847],type:_0xf78a[836]},{context:_0xf78a[97],exten:_0xf78a[834],priority:13,app:_0xf78a[110],appdata:_0xf78a[848],type:_0xf78a[836]},{context:_0xf78a[97],exten:_0xf78a[834],priority:14,app:_0xf78a[849],appdata:_0xf78a[850],type:_0xf78a[836]},{context:_0xf78a[97],exten:_0xf78a[834],priority:15,app:_0xf78a[851],appdata:_0xf78a[137],type:_0xf78a[836]}],{ignoreDuplicates:true,individualHooks:true})})[_0xf78a[11]](function(){console[_0xf78a[8]](_0xf78a[833])});models[_0xf78a[43]][_0xf78a[221]]({include:[{model:models[_0xf78a[149]],as:_0xf78a[857],where:{app:_0xf78a[171]}}]})[_0xf78a[11]](function(_0xc319x12){console[_0xf78a[8]](_0xf78a[852]);var _0xc319x2e=[];_[_0xf78a[220]](_0xc319x12,function(_0xc319x2f){_[_0xf78a[220]](_0xc319x2f.UserExtensions,function(_0xc319x30){_0xc319x30[_0xf78a[853]]= _0xf78a[854]+ _0xc319x2f[_0xf78a[14]]+ _0xf78a[855];_0xc319x2e[_0xf78a[219]](_0xc319x30[_0xf78a[856]]())})});return _0xc319x2e})[_0xf78a[214]]()[_0xf78a[6]](function(_0xc319xc){console[_0xf78a[8]](_0xc319xc)});_setting[_0xf78a[217]]({firstSetup:false})}})[_0xf78a[6]](function(_0xc319xc){console[_0xf78a[5]](_0xc319xc)}) \ No newline at end of file +/** + * 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; + +models.Setting + .findById(1) + .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())); + }); + + models.Setting + .bulkCreate([{ + id: 1, + min_internal: 1000, + min_mailbox: 1000, + agi_port: 4573, + automation_timeout: 3600, + soundPath: '/var/opt/motion/server/files/sounds/converted' + }], { + ignoreDuplicates: true, + individualHooks: true + }).then(function() { + console.log(util.format('Populating Setting - DONE ')); + }); + + // 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: 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 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.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 + }); + } + }) + .catch(function(err) { + console.error(err); + }); diff --git a/server/config/sms/index.js b/server/config/sms/index.js index a04a7fa..81fbf23 100644 --- a/server/config/sms/index.js +++ b/server/config/sms/index.js @@ -1 +1,23 @@ -var _0xaad2=["\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"];_0xaad2[0];var SmsAccount=require(_0xaad2[2])[_0xaad2[1]];var Sms=require(_0xaad2[3]);module[_0xaad2[4]]= function(){SmsAccount[_0xaad2[6]](function(_0x4903x3){var _0x4903x4= new Sms();_0x4903x4[_0xaad2[5]](_0x4903x3)});return SmsAccount[_0xaad2[11]]()[_0xaad2[10]](function(_0x4903x6){_0x4903x6[_0xaad2[9]](function(_0x4903x3){var _0x4903x4= new Sms();_0x4903x4[_0xaad2[5]](_0x4903x3)})})[_0xaad2[8]](function(_0x4903x5){console[_0xaad2[7]](_0x4903x5)})} \ No newline at end of file +'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); + }); +} diff --git a/server/config/sms/skebby.js b/server/config/sms/skebby.js index ac5b9c7..4f65a2d 100644 --- a/server/config/sms/skebby.js +++ b/server/config/sms/skebby.js @@ -1 +1,110 @@ -var _0x7a08=["\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(_0x7a08[0]);var https=require(_0x7a08[1]);var rp=require(_0x7a08[2]);var Promise=require(_0x7a08[3]);var skebbyMessage=function(_0x32e5x6,_0x32e5x7){var _0x32e5x8=_0x32e5x6[_0x7a08[4]];var _0x32e5x9=_0x32e5x6[_0x7a08[5]]|| _0x7a08[6];var _0x32e5xa=_0x32e5x6[_0x7a08[7]]|| _0x7a08[6];var _0x32e5xb=_0x32e5x6[_0x7a08[8]];var _0x32e5xc=_0x32e5x6[_0x7a08[9]]|| [];var _0x32e5xd=_0x32e5x6[_0x7a08[10]];var _0x32e5xe=_0x32e5x6[_0x7a08[11]];switch(_0x32e5xb){case _0x7a08[13]:_0x32e5xb= _0x7a08[12];break;case _0x7a08[15]:_0x32e5xb= _0x7a08[14];break;case _0x7a08[17]:_0x32e5xb= _0x7a08[16];break;case _0x7a08[18]:;default:_0x32e5xb= _0x7a08[19]};var _0x32e5xf=_0x32e5x6[_0x7a08[17]]|| false;var _0x32e5x10={method:_0x32e5xb,username:_0x32e5xd,password:_0x32e5xe,"\x72\x65\x63\x69\x70\x69\x65\x6E\x74\x73\x5B\x5D":_0x32e5xc,text:_0x32e5x8,charset:_0x7a08[20]};if(_0x32e5x9){_0x32e5x10[_0x7a08[5]]= _0x32e5x9}else {if(_0x32e5xa){_0x32e5x10[_0x7a08[7]]= _0x32e5xa}};if(_0x32e5xf){_0x32e5x10[_0x7a08[8]]= _0x7a08[21]+ _0x32e5x10[_0x7a08[8]]};var _0x32e5x11=false;var _0x32e5x12=qs[_0x7a08[22]](_0x32e5x10);var _0x32e5x13=https[_0x7a08[35]]({port:443,path:_0x7a08[23],host:_0x7a08[24],method:_0x7a08[25],headers:{"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x7a08[26],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68":_0x32e5x12[_0x7a08[27]],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67":_0x7a08[28]}},function(_0x32e5x14){var _0x32e5x15=_0x7a08[6];_0x32e5x14[_0x7a08[30]](_0x7a08[29],function(_0x32e5x12){_0x32e5x15+= _0x32e5x12});_0x32e5x14[_0x7a08[30]](_0x7a08[31],function(){if(!_0x32e5x11){var _0x32e5x16=qs[_0x7a08[32]](_0x32e5x15);if(_0x32e5x16[_0x7a08[33]]== _0x7a08[34]){_0x32e5x7(null,{data:_0x32e5x16})}else {_0x32e5x7(_0x32e5x16)};_0x32e5x11= true}})});_0x32e5x13[_0x7a08[31]](_0x32e5x12);_0x32e5x13[_0x7a08[30]](_0x7a08[36],function(_0x32e5x17){if(!_0x32e5x11){_0x32e5x7(_0x32e5x17);_0x32e5x11= true}})};var sendMessage=function(_0x32e5x19,_0x32e5x1a){var _0x32e5x1b={method:_0x32e5x1a[_0x7a08[37]],username:_0x32e5x1a[_0x7a08[10]],password:_0x32e5x1a[_0x7a08[11]],sender_number:/^[\+][0-9]+$/[_0x7a08[17]](_0x32e5x19[_0x7a08[38]])?_0x32e5x19[_0x7a08[38]][_0x7a08[40]](_0x7a08[39],_0x7a08[6]):_0x32e5x19[_0x7a08[38]],recipients:/^[\+][0-9]+$/[_0x7a08[17]](_0x32e5x19[_0x7a08[41]])?_0x32e5x19[_0x7a08[41]][_0x7a08[40]](_0x7a08[39],_0x7a08[6]):_0x32e5x19[_0x7a08[41]],text:_0x32e5x19[_0x7a08[42]]};var _0x32e5x1c=Promise[_0x7a08[43]](skebbyMessage);return _0x32e5x1c(_0x32e5x1b)};module[_0x7a08[45]][_0x7a08[44]]= sendMessage \ No newline at end of file +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; diff --git a/server/config/sms/sms.js b/server/config/sms/sms.js index 77c7903..8bc5bd9 100644 --- a/server/config/sms/sms.js +++ b/server/config/sms/sms.js @@ -1 +1,284 @@ -var _0x3e83=["\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"];_0x3e83[0];var _=require(_0x3e83[1]);var Promise=require(_0x3e83[2]);var Util=require(_0x3e83[3]);var moment=require(_0x3e83[4]);var path=require(_0x3e83[5]);var util=require(_0x3e83[6]);var fs=require(_0x3e83[7]);var Agent=require(_0x3e83[9])[_0x3e83[8]];var SmsRoom=require(_0x3e83[9])[_0x3e83[10]];var SmsMessage=require(_0x3e83[9])[_0x3e83[11]];var SmsAccount=require(_0x3e83[9])[_0x3e83[12]];var ReportSms=require(_0x3e83[9])[_0x3e83[13]];var Action=require(_0x3e83[9])[_0x3e83[14]];var path=require(_0x3e83[5]);var fs=require(_0x3e83[7]);var Contact=require(_0x3e83[9])[_0x3e83[15]];var Scheduler=require(_0x3e83[16]);function Sms(){console[_0x3e83[18]](_0x3e83[17]);this[_0x3e83[19]]= null}Sms[_0x3e83[21]][_0x3e83[20]]= function(_0x3dd3x11){var _0x3dd3x12=this;console[_0x3e83[18]](_0x3e83[22]+ _0x3dd3x11[_0x3e83[23]]+ _0x3e83[24]);_0x3dd3x12[_0x3e83[19]]= _0x3dd3x11;SmsAccount[_0x3e83[27]](function(_0x3dd3x11){if(_0x3dd3x12[_0x3e83[19]]&& _0x3dd3x11[_0x3e83[25]]=== _0x3dd3x12[_0x3e83[19]][_0x3e83[25]]){_0x3dd3x12[_0x3e83[26]](_0x3dd3x11)}});ReportSms[_0x3e83[27]](function(_0x3dd3x11){if(_0x3dd3x12[_0x3e83[19]]&& _0x3dd3x11[_0x3e83[28]]== _0x3dd3x12[_0x3e83[19]][_0x3e83[25]]){if(_0x3dd3x11[_0x3e83[30]](_0x3e83[29])){_0x3dd3x12[_0x3e83[32]](_0x3dd3x11,_0x3e83[31])};if(_0x3dd3x11[_0x3e83[30]](_0x3e83[33])){_0x3dd3x12[_0x3e83[32]](_0x3dd3x11,_0x3e83[34])}}});SmsRoom[_0x3e83[27]](function(_0x3dd3x11){if(_0x3dd3x12[_0x3e83[19]]&& _0x3dd3x11[_0x3e83[35]]== _0x3dd3x12[_0x3e83[19]][_0x3e83[25]]){if(_0x3dd3x11[_0x3e83[30]](_0x3e83[36])&& _0x3dd3x11[_0x3e83[36]]=== _0x3e83[37]){_0x3dd3x12[_0x3e83[32]](_0x3dd3x11,_0x3e83[38])}}});SmsAccount[_0x3e83[40]](function(_0x3dd3x11){if(_0x3dd3x12[_0x3e83[19]]&& _0x3dd3x11[_0x3e83[25]]=== _0x3dd3x12[_0x3e83[19]][_0x3e83[25]]){_0x3dd3x12[_0x3e83[39]](_0x3dd3x11)}});SmsMessage[_0x3e83[51]](function(_0x3dd3x11,_0x3dd3x13){if(_0x3dd3x12[_0x3e83[19]]&& _0x3dd3x12[_0x3e83[19]][_0x3e83[25]]== _0x3dd3x11[_0x3e83[41]][_0x3e83[35]]){if(_0x3dd3x11[_0x3e83[36]]=== _0x3e83[42]){var _0x3dd3x14= new Scheduler({channel:_0x3e83[43],uniqueid:util[_0x3e83[46]](_0x3e83[44],moment()[_0x3e83[45]](),_0x3dd3x11.SmsRoomId),messageid:_0x3dd3x11[_0x3e83[25]],roomid:_0x3dd3x11[_0x3e83[47]],accountid:_0x3dd3x12[_0x3e83[19]][_0x3e83[25]],accountname:_0x3dd3x12[_0x3e83[19]][_0x3e83[23]],accountnumber:_0x3dd3x12[_0x3e83[19]][_0x3e83[48]],from:_0x3dd3x11[_0x3e83[49]]});_0x3dd3x14[_0x3e83[20]]()};_0x3dd3x12[_0x3e83[50]](_0x3dd3x11,_0x3dd3x13)}})};Sms[_0x3e83[21]][_0x3e83[26]]= function(_0x3dd3x11){if(!_0x3dd3x11[_0x3e83[30]](_0x3e83[52])){console[_0x3e83[18]](_0x3e83[22]+ _0x3dd3x11[_0x3e83[23]]+ _0x3e83[53]);this[_0x3e83[19]]= null;this[_0x3e83[19]]= _0x3dd3x11}};Sms[_0x3e83[21]][_0x3e83[39]]= function(_0x3dd3x11){console[_0x3e83[18]](_0x3e83[54]+ _0x3dd3x11[_0x3e83[23]]+ _0x3e83[55]);this[_0x3e83[19]]= null};Sms[_0x3e83[21]][_0x3e83[50]]= function(_0x3dd3x15,_0x3dd3x13){var _0x3dd3x16=this[_0x3e83[19]];var _0x3dd3x17=_0x3dd3x15;var _0x3dd3x18;var _0x3dd3x19;if(_0x3dd3x17[_0x3e83[36]]=== _0x3e83[56]){return Promise[_0x3e83[88]]([])[_0x3e83[63]](getSmsRoom(_0x3dd3x17))[_0x3e83[63]](function(_0x3dd3x1f){_0x3dd3x18= _0x3dd3x1f;return _0x3dd3x17[_0x3e83[87]](_0x3dd3x1f[_0x3e83[25]])})[_0x3e83[63]](function(){return _0x3dd3x18[_0x3e83[62]]({voiceSource:_0x3dd3x17[_0x3e83[83]]?_0x3dd3x17[_0x3e83[83]]:_0x3dd3x18[_0x3e83[84]],lastEvent:_0x3e83[56],lastEventAt:moment()[_0x3e83[46]](_0x3e83[61]),smsOut:++_0x3dd3x18[_0x3e83[85]]},{individualHooks:true,user:_0x3dd3x13[_0x3e83[86]]})})[_0x3e83[63]](function(_0x3dd3x1e){return Agent[_0x3e83[82]](_0x3dd3x17.UserId)})[_0x3e83[63]](function(_0x3dd3x1d){_0x3dd3x19= _0x3dd3x1d;return _0x3dd3x18[_0x3e83[81]](_0x3dd3x19)})[_0x3e83[63]](function(){if(_0x3dd3x16[_0x3e83[79]]){return Contact[_0x3e83[80]]({where:{ListId:_0x3dd3x16[_0x3e83[79]],mobile:_0x3dd3x17[_0x3e83[49]]},defaults:{ListId:_0x3dd3x16[_0x3e83[79]],mobile:_0x3dd3x17[_0x3e83[49]]}})}else {return []}})[_0x3e83[63]](function(){console[_0x3e83[18]](_0x3e83[72]);var _0x3dd3x1c=path[_0x3e83[74]](__dirname,_0x3dd3x16[_0x3e83[69]]+ _0x3e83[73]);if(fs[_0x3e83[75]](_0x3dd3x1c)){return require(_0x3dd3x1c)[_0x3e83[76]](_0x3dd3x17,_0x3dd3x16)}else {throw new Error(_0x3e83[77]+ _0x3dd3x16[_0x3e83[69]]+ _0x3e83[78])}})[_0x3e83[63]](function(_0x3dd3x1b){console[_0x3e83[18]](_0x3e83[68]);return _0x3dd3x17[_0x3e83[66]]({status:(_0x3dd3x16[_0x3e83[69]]== _0x3e83[70])?_0x3e83[67]:_0x3dd3x1b[_0x3e83[36]],skebby_message_id:(_0x3dd3x16[_0x3e83[69]]== _0x3e83[70])?_0x3dd3x1b[_0x3e83[71]][_0x3e83[25]]:null,res_data:JSON[_0x3e83[65]](_0x3dd3x1b)})})[_0x3e83[63]](function(){return _0x3dd3x18[_0x3e83[62]]({lastEvent:_0x3e83[67],lastEventAt:moment()[_0x3e83[46]](_0x3e83[61])})})[_0x3e83[59]](function(_0x3dd3x1a){console[_0x3e83[18]](_0x3e83[57],_0x3dd3x1a);_0x3dd3x17[_0x3e83[66]]({status:_0x3e83[60],errorcode:_0x3dd3x1a[_0x3e83[64]],res_data:JSON[_0x3e83[65]](_0x3dd3x1a)})[_0x3e83[63]](function(){return _0x3dd3x18[_0x3e83[62]]({lastEvent:_0x3e83[60],lastEventAt:moment()[_0x3e83[46]](_0x3e83[61])})})[_0x3e83[59]](function(_0x3dd3x1a){console[_0x3e83[18]](_0x3e83[58])})})}};function getSmsRoom(_0x3dd3x17){return function(){if(_0x3dd3x17[_0x3e83[47]]){return SmsRoom[_0x3e83[82]](_0x3dd3x17.SmsRoomId)}else {return SmsRoom[_0x3e83[94]]({limit:1,where:{contact:_0x3dd3x17[_0x3e83[89]],SmsAccountId:_0x3dd3x17[_0x3e83[35]]},order:[[_0x3e83[92],_0x3e83[93]]]})[_0x3e83[63]](function(_0x3dd3x21){var _0x3dd3x22=_0x3dd3x21[0];if(!_0x3dd3x22|| _0x3dd3x22[_0x3e83[36]]=== _0x3e83[37]){var _0x3dd3x23=_0x3dd3x22?_0x3dd3x22[_0x3e83[25]]:null;return SmsRoom[_0x3e83[91]]({contact:_0x3dd3x17[_0x3e83[89]],SmsAccountId:_0x3dd3x17[_0x3e83[35]],status:_0x3dd3x17[_0x3e83[83]]?_0x3e83[37]:_0x3e83[90],ParentId:_0x3dd3x23})}else {return _0x3dd3x22}})}}}function execRequest(_0x3dd3x11,_0x3dd3x25,_0x3dd3x26){Util[_0x3e83[97]](_0x3dd3x11,_0x3dd3x25,_0x3dd3x26)[_0x3e83[63]](function(_0x3dd3x27){console[_0x3e83[18]](_0x3e83[96])})[_0x3e83[59]](function(_0x3dd3x1a){console[_0x3e83[18]](_0x3e83[95])})}Sms[_0x3e83[21]][_0x3e83[32]]= function(_0x3dd3x11,_0x3dd3x28){var _0x3dd3x16=this[_0x3e83[19]];switch(_0x3dd3x28){case _0x3e83[31]:if(_0x3dd3x16[_0x3e83[98]]&& _0x3dd3x16[_0x3e83[99]]){console[_0x3e83[18]](_0x3e83[100]+ _0x3dd3x16[_0x3e83[23]]+ _0x3e83[101]);execRequest(_0x3dd3x11[_0x3e83[41]],_0x3dd3x16[_0x3e83[98]],_0x3dd3x16[_0x3e83[99]])};if(_0x3dd3x16[_0x3e83[103]][_0x3e83[102]]){_[_0x3e83[106]](_0x3dd3x16[_0x3e83[103]],function(_0x3dd3x29){if(_0x3dd3x29[_0x3e83[104]]){Util[_0x3e83[105]](_0x3dd3x29,_0x3dd3x11)}})};break;case _0x3e83[34]:if(_0x3dd3x16[_0x3e83[107]]&& _0x3dd3x16[_0x3e83[108]]){console[_0x3e83[18]](_0x3e83[100]+ _0x3dd3x16[_0x3e83[23]]+ _0x3e83[109]);execRequest(_0x3dd3x11[_0x3e83[41]],_0x3dd3x16[_0x3e83[107]],_0x3dd3x16[_0x3e83[108]])};break;case _0x3e83[38]:if(_0x3dd3x16[_0x3e83[110]]&& _0x3dd3x16[_0x3e83[111]]){console[_0x3e83[18]](_0x3e83[100]+ _0x3dd3x16[_0x3e83[23]]+ _0x3e83[112]);execRequest(_0x3dd3x11[_0x3e83[41]],_0x3dd3x16[_0x3e83[110]],_0x3dd3x16[_0x3e83[111]])};break;default:console[_0x3e83[18]](_0x3e83[113])}};module[_0x3e83[114]]= Sms \ No newline at end of file +'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; diff --git a/server/config/sms/twilio.js b/server/config/sms/twilio.js index 387854f..b4949ef 100644 --- a/server/config/sms/twilio.js +++ b/server/config/sms/twilio.js @@ -1 +1,22 @@ -var _0xec01=["\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"];_0xec01[0];var twilio=require(_0xec01[1]);var SmsMessage=require(_0xec01[3])[_0xec01[2]];var Promise=require(_0xec01[4]);var sendMessage=function(_0x6886x5,_0x6886x6){var _0x6886x7=twilio(_0x6886x6[_0xec01[5]],_0x6886x6[_0xec01[6]]);var _0x6886x8=_0x6886x6[_0xec01[7]]+ _0xec01[8]+ _0x6886x6[_0xec01[9]]+ _0xec01[10]+ _0x6886x5[_0xec01[9]]+ _0xec01[11];var _0x6886x9=Promise[_0xec01[13]](_0x6886x7[_0xec01[12]]);return _0x6886x9({to:/^[\+][0-9]+$/[_0xec01[15]](_0x6886x5[_0xec01[14]])?_0x6886x5[_0xec01[14]]:_0xec01[16]+ _0x6886x5[_0xec01[14]],from:/^[\+][0-9]+$/[_0xec01[15]](_0x6886x5[_0xec01[17]])?_0x6886x5[_0xec01[17]]:_0xec01[16]+ _0x6886x5[_0xec01[17]],body:_0x6886x5[_0xec01[18]],StatusCallback:_0x6886x8})};module[_0xec01[19]][_0xec01[12]]= sendMessage \ No newline at end of file +'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; diff --git a/server/config/smtp/index.js b/server/config/smtp/index.js index 3511f4d..0d7b947 100644 --- a/server/config/smtp/index.js +++ b/server/config/smtp/index.js @@ -1 +1,130 @@ -var _0x9ba2=["\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"];_0x9ba2[0];const util=require(_0x9ba2[1]);const cp=require(_0x9ba2[2]);const ms=require(_0x9ba2[4])[_0x9ba2[3]];const msg=require(_0x9ba2[4])[_0x9ba2[5]];const rm=require(_0x9ba2[4])[_0x9ba2[6]];function fork(_0xee13x7,_0xee13x8){return cp[_0x9ba2[25]](__dirname+ _0x9ba2[24],[_0xee13x7,_0xee13x8])[_0x9ba2[8]](_0x9ba2[13],function(_0xee13xb){if(_0xee13xb[_0x9ba2[14]]=== _0x9ba2[15]){return msg[_0x9ba2[19]](_0xee13xb[_0x9ba2[20]])[_0x9ba2[17]](function(_0xee13xd){return _0xee13xd[_0x9ba2[15]](_0xee13xb)})[_0x9ba2[17]](function(){return rm[_0x9ba2[19]](_0xee13xb[_0x9ba2[18]])})[_0x9ba2[17]](function(_0xee13xc){return _0xee13xc[_0x9ba2[15]]({lastEvent:_0xee13xb[_0x9ba2[16]]})})};if(_0xee13xb[_0x9ba2[14]]=== _0x9ba2[21]){return ms[_0x9ba2[19]](_0xee13x7)[_0x9ba2[17]](function(_0xee13xe){return _0xee13xe[_0x9ba2[15]]({state:_0xee13xb[_0x9ba2[21]],source:_0xee13xb[_0x9ba2[23]]|| null})})[_0x9ba2[17]](function(){console[_0x9ba2[12]](_0xee13xb[_0x9ba2[12]])})[_0x9ba2[22]](function(_0xee13x9){console[_0x9ba2[7]](_0xee13x9)})}})[_0x9ba2[8]](_0x9ba2[9],function(_0xee13xa){console[_0x9ba2[12]](util[_0x9ba2[11]](_0x9ba2[10],_0xee13x8,_0xee13xa))})[_0x9ba2[8]](_0x9ba2[7],function(_0xee13x9){console[_0x9ba2[7]](_0xee13x9)})}module[_0x9ba2[26]]= function(){var _0xee13xf={};process[_0x9ba2[8]](_0x9ba2[27],function(_0xee13xa){for(var _0xee13x10 in _0xee13xf){if(_0xee13xf[_0xee13x10]){_0xee13xf[_0xee13x10][_0x9ba2[28]]()}}});msg[_0x9ba2[33]](function(_0xee13xd){if(_0xee13xf[_0xee13xd[_0x9ba2[29]]]){_0xee13xd[_0x9ba2[30]][_0x9ba2[14]]= _0x9ba2[13];_0xee13xd[_0x9ba2[30]][_0x9ba2[31]]= 0;_0xee13xf[_0xee13xd[_0x9ba2[29]]][_0x9ba2[32]](_0xee13xd[_0x9ba2[30]])}});msg[_0x9ba2[37]](function(_0xee13xd){if(_0xee13xd[_0x9ba2[34]](_0x9ba2[16])&& _0xee13xd[_0x9ba2[16]]=== _0x9ba2[35]){if(_0xee13xf[_0xee13xd[_0x9ba2[29]]]){_0xee13xd[_0x9ba2[30]][_0x9ba2[14]]= _0x9ba2[13];_0xee13xd[_0x9ba2[30]][_0x9ba2[31]]= _0xee13xd[_0x9ba2[30]][_0x9ba2[36]]+ 1;_0xee13xf[_0xee13xd[_0x9ba2[29]]][_0x9ba2[32]](_0xee13xd[_0x9ba2[30]])}}});ms[_0x9ba2[33]](function(_0xee13xe){_0xee13xf[_0xee13xe[_0x9ba2[38]]]= fork(_0xee13xe[_0x9ba2[39]],_0xee13xe[_0x9ba2[38]])});ms[_0x9ba2[37]](function(_0xee13xe){if(_0xee13xf[_0xee13xe[_0x9ba2[38]]]){if(!_0xee13xe[_0x9ba2[34]](_0x9ba2[21])&& !_0xee13xe[_0x9ba2[34]](_0x9ba2[23])){_0xee13xf[_0xee13xe[_0x9ba2[38]]][_0x9ba2[28]]();_0xee13xf[_0xee13xe[_0x9ba2[38]]]= null;_0xee13xf[_0xee13xe[_0x9ba2[38]]]= fork(_0xee13xe[_0x9ba2[39]],_0xee13xe[_0x9ba2[38]]);console[_0x9ba2[12]](util[_0x9ba2[11]](_0x9ba2[40],_0xee13xe[_0x9ba2[39]],_0xee13xf[_0xee13xe[_0x9ba2[38]]][_0x9ba2[41]]))}else {_0xee13xf[_0xee13xe[_0x9ba2[38]]][_0x9ba2[32]]({type:_0x9ba2[21],state:_0xee13xe[_0x9ba2[21]],source:_0xee13xe[_0x9ba2[23]],username:_0xee13xe[_0x9ba2[38]]})}}});ms[_0x9ba2[43]](function(_0xee13xe){if(_0xee13xf[_0xee13xe[_0x9ba2[38]]]){console[_0x9ba2[12]](util[_0x9ba2[11]](_0x9ba2[42],_0xee13xe[_0x9ba2[39]],_0xee13xf[_0xee13xe[_0x9ba2[38]]][_0x9ba2[41]]));_0xee13xf[_0xee13xe[_0x9ba2[38]]][_0x9ba2[28]]();_0xee13xf[_0xee13xe[_0x9ba2[38]]]= null}});ms[_0x9ba2[45]]()[_0x9ba2[17]](function(_0xee13x11){_0xee13x11[_0x9ba2[44]](function(_0xee13xe){_0xee13xf[_0xee13xe[_0x9ba2[38]]]= fork(_0xee13xe[_0x9ba2[39]],_0xee13xe[_0x9ba2[38]])})})[_0x9ba2[22]](function(_0xee13x9){console[_0x9ba2[7]](_0xee13x9)})} \ No newline at end of file +'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); + }); +} diff --git a/server/config/smtp/smtp.js b/server/config/smtp/smtp.js index 9ab6ca6..7ca6c7f 100644 --- a/server/config/smtp/smtp.js +++ b/server/config/smtp/smtp.js @@ -1 +1,384 @@ -var _0x37a7=["\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"];_0x37a7[0];var util=require(_0x37a7[1]);var promise=require(_0x37a7[2]);var _=require(_0x37a7[3]);var moment=require(_0x37a7[4]);var Mustache=require(_0x37a7[5]);var nodemailer=require(_0x37a7[6]);var smtpTransport=require(_0x37a7[7]);var htmlToText=require(_0x37a7[8]);var Agent=require(_0x37a7[10])[_0x37a7[9]];var Room=require(_0x37a7[10])[_0x37a7[11]];var Template=require(_0x37a7[10])[_0x37a7[12]];var Account=require(_0x37a7[10])[_0x37a7[13]];var Message=require(_0x37a7[10])[_0x37a7[14]];var Server=require(_0x37a7[10])[_0x37a7[15]];var Status=require(_0x37a7[10])[_0x37a7[16]];var Attachment=require(_0x37a7[10])[_0x37a7[17]];var smtp;var timeout;process[_0x37a7[19]](_0x37a7[25],function(_0x2bdbx15){if(_0x2bdbx15[_0x37a7[26]]=== _0x37a7[25]){onSend(_0x2bdbx15)};if(_0x2bdbx15[_0x37a7[26]]=== _0x37a7[27]){switch(_0x2bdbx15[_0x37a7[27]]){case _0x37a7[29]:onVerify(_0x2bdbx15[_0x37a7[28]]);break;default:}}})[_0x37a7[19]](_0x37a7[20],function(_0x2bdbx14){console[_0x37a7[24]](util[_0x37a7[23]](_0x37a7[21],process[_0x37a7[22]][3],_0x2bdbx14))})[_0x37a7[19]](_0x37a7[18],function(_0x2bdbx13){console[_0x37a7[18]](_0x2bdbx13)});console[_0x37a7[24]](util[_0x37a7[23]](_0x37a7[30],process[_0x37a7[22]][3],process[_0x37a7[31]]));function onVerify(_0x2bdbx17){smtp[_0x37a7[40]]()[_0x37a7[39]](function(){process[_0x37a7[35]]({type:_0x37a7[27],state:_0x37a7[37],source:null,log:util[_0x37a7[23]](_0x37a7[38],_0x2bdbx17,process[_0x37a7[31]])})})[_0x37a7[36]](function(_0x2bdbx13){process[_0x37a7[35]]({type:_0x37a7[27],state:_0x37a7[32],source:JSON[_0x37a7[33]](_0x2bdbx13),log:util[_0x37a7[23]](_0x37a7[34],_0x2bdbx17,process[_0x37a7[31]])})})}function onSave(_0x2bdbx19){smtp= nodemailer[_0x37a7[45]](smtpTransport({host:_0x2bdbx19[_0x37a7[41]],port:_0x2bdbx19[_0x37a7[42]],secure:_0x2bdbx19[_0x37a7[43]],pool:true,auth:{user:_0x2bdbx19[_0x37a7[28]],pass:_0x2bdbx19[_0x37a7[44]]}}));smtp[_0x37a7[46]]= _0x2bdbx19[_0x37a7[47]];smtp[_0x37a7[48]]= _0x2bdbx19[_0x37a7[49]];smtp[_0x37a7[28]]= _0x2bdbx19[_0x37a7[28]];onVerify(_0x2bdbx19[_0x37a7[28]])}function onSend(_0x2bdbx1b){console[_0x37a7[24]](util[_0x37a7[23]](_0x37a7[50],process[_0x37a7[22]][3],process[_0x37a7[31]]));if(_0x2bdbx1b[_0x37a7[51]]=== _0x37a7[52]){var _0x2bdbx1c;var _0x2bdbx1d;var _0x2bdbx1e;var _0x2bdbx1f=_0x2bdbx1b;var _0x2bdbx20,_0x2bdbx21,_0x2bdbx22,_0x2bdbx23;if(_0x2bdbx1f[_0x37a7[53]]){return Message[_0x37a7[94]]({where:{messageId:_0x2bdbx1f[_0x37a7[53]]}})[_0x37a7[39]](function(_0x2bdbx2e){return _0x2bdbx2e[_0x37a7[93]]({include:{model:Account,include:[{model:Template}]}})})[_0x37a7[39]](function(_0x2bdbx2d){_0x2bdbx1c= _0x2bdbx2d;_0x2bdbx1d= _0x2bdbx2d[_0x37a7[13]];return _0x2bdbx1c[_0x37a7[92]](_0x2bdbx1f[_0x37a7[49]])})[_0x37a7[39]](function(){var _0x2bdbx15={lastEvent:_0x37a7[52],attachment:_0x2bdbx1f[_0x37a7[82]]&& _0x2bdbx1f[_0x37a7[82]][_0x37a7[89]],mailOut:++_0x2bdbx1c[_0x37a7[90]]};if(!_0x2bdbx1b[_0x37a7[69]]){_0x2bdbx15[_0x37a7[51]]= _0x37a7[91]};return _0x2bdbx1c[_0x37a7[54]](_0x2bdbx15)})[_0x37a7[39]](function(){return Agent[_0x37a7[88]](_0x2bdbx1f.UserId)})[_0x37a7[39]](function(_0x2bdbx2c){_0x2bdbx1e= _0x2bdbx2c;return _0x2bdbx1c[_0x37a7[87]](_0x2bdbx1e)})[_0x37a7[39]](function(){_0x2bdbx1f[_0x37a7[59]]= _0x2bdbx1f[_0x37a7[59]]?_0x2bdbx1f[_0x37a7[59]].toString(_0x37a7[60]):null;_0x2bdbx1f[_0x37a7[61]]= _0x2bdbx1f[_0x37a7[61]]?_0x2bdbx1f[_0x37a7[61]].toString(_0x37a7[60]):null;var _0x2bdbx25=_0x2bdbx1f[_0x37a7[62]]?_[_0x37a7[66]](_0x2bdbx1f[_0x37a7[62]][_0x37a7[64]](_0x37a7[63]),_0x2bdbx1d[_0x37a7[65]]):[];var _0x2bdbx26=_0x2bdbx1f[_0x37a7[67]]?_[_0x37a7[66]](_0x2bdbx1f[_0x37a7[67]][_0x37a7[64]](_0x37a7[63]),_0x2bdbx1d[_0x37a7[65]]):[];var _0x2bdbx27=_0x2bdbx1f[_0x37a7[68]]?_[_0x37a7[66]](_0x2bdbx1f[_0x37a7[68]][_0x37a7[64]](_0x37a7[63]),_0x2bdbx1d[_0x37a7[65]]):[];var _0x2bdbx28=(_0x2bdbx1d[_0x37a7[12]]&& !_0x2bdbx1b[_0x37a7[69]])?Mustache[_0x37a7[77]](_0x2bdbx1d[_0x37a7[12]][_0x37a7[59]],{interactionId:_0x2bdbx1c[_0x37a7[49]],subject:_0x2bdbx1f[_0x37a7[70]],body:_0x2bdbx1f[_0x37a7[59]]?_0x2bdbx1f[_0x37a7[59]]:_0x2bdbx1f[_0x37a7[61]],accountName:_0x2bdbx1d[_0x37a7[71]],from:_0x2bdbx1f[_0x37a7[72]],to:_0x2bdbx25[_0x37a7[73]](_0x37a7[63]),cc:_0x2bdbx26[_0x37a7[73]](_0x37a7[63]),bcc:_0x2bdbx27[_0x37a7[73]](_0x37a7[63]),agentName:_0x2bdbx1e[_0x37a7[74]],agentEmail:_0x2bdbx1e[_0x37a7[75]],createdAt:_0x2bdbx1f[_0x37a7[76]]}):_0x2bdbx1f[_0x37a7[59]];var _0x2bdbx29;if(_0x2bdbx1f[_0x37a7[61]]){_0x2bdbx29= _0x2bdbx1f[_0x37a7[61]]}else {_0x2bdbx29= _0x2bdbx1f[_0x37a7[59]]?htmlToText[_0x37a7[78]](_0x2bdbx1f[_0x37a7[59]],{wordwrap:false}):null};if(_0x2bdbx1d[_0x37a7[79]]){_0x2bdbx28+= _0x37a7[80]+ _0x2bdbx1d[_0x37a7[79]];_0x2bdbx29+= _0x37a7[80]+ _0x2bdbx1d[_0x37a7[79]]}else {_0x2bdbx28+= _0x37a7[81];_0x2bdbx29+= _0x37a7[81]};var _0x2bdbx2a={status:_0x2bdbx1f[_0x37a7[51]],from:{name:_0x2bdbx1d[_0x37a7[71]],address:_0x2bdbx1d[_0x37a7[65]]},to:_0x2bdbx25[_0x37a7[73]](_0x37a7[63]),cc:_0x2bdbx26[_0x37a7[73]](_0x37a7[63]),bcc:_0x2bdbx27[_0x37a7[73]](_0x37a7[63]),subject:_0x2bdbx1f[_0x37a7[70]],html:_0x2bdbx28,text:_0x2bdbx29};if(_0x2bdbx1f[_0x37a7[82]]){_0x2bdbx2a[_0x37a7[83]]= _[_0x37a7[85]](_0x2bdbx1f.MailAttachments,function(_0x2bdbx2b){return {path:_0x2bdbx2b[_0x37a7[84]],filename:_0x2bdbx2b[_0x37a7[71]]}})};return smtp[_0x37a7[86]](_0x2bdbx2a)})[_0x37a7[39]](function(_0x2bdbx24){process[_0x37a7[35]]({msgId:_0x2bdbx1f[_0x37a7[49]],roomId:_0x2bdbx1c[_0x37a7[49]],type:_0x37a7[54],messageId:_0x2bdbx24[_0x37a7[57]],status:_0x37a7[58],retry:_0x2bdbx1f[_0x37a7[56]]})})[_0x37a7[36]](function(_0x2bdbx13){console[_0x37a7[18]](_0x2bdbx13);process[_0x37a7[35]]({msgId:_0x2bdbx1f[_0x37a7[49]],roomId:_0x2bdbx1c[_0x37a7[49]],type:_0x37a7[54],status:_0x37a7[55],retry:_0x2bdbx1f[_0x37a7[56]]})})}else {return Account[_0x37a7[88]](smtp[_0x37a7[46]],{include:[{model:Template}]})[_0x37a7[39]](function(_0x2bdbx30){_0x2bdbx1d= _0x2bdbx30;return Room[_0x37a7[88]](_0x2bdbx1f.MailRoomId)})[_0x37a7[39]](function(_0x2bdbx2d){if(!_0x2bdbx2d){return Agent[_0x37a7[88]](_0x2bdbx1b.UserId)[_0x37a7[39]](function(_0x2bdbx2f){return Room[_0x37a7[97]]({subject:_0x2bdbx1f[_0x37a7[70]],from:_0x2bdbx1f[_0x37a7[72]],account:_0x2bdbx1d?_0x2bdbx1d[_0x37a7[71]]:null,status:_0x37a7[91],lastEvent:_0x37a7[52],attachment:_0x2bdbx1f[_0x37a7[82]]&& _0x2bdbx1f[_0x37a7[82]][_0x37a7[89]],MailAccountId:_0x2bdbx1d?_0x2bdbx1d[_0x37a7[49]]:null,mailOut:1,arrivedAt:moment()[_0x37a7[23]](_0x37a7[96]),MailRoomStatuses:[{status:_0x37a7[91],data1:_0x2bdbx2f?_0x2bdbx2f[_0x37a7[71]]:null,data2:_0x2bdbx2f?_0x2bdbx2f[_0x37a7[74]]:null,UserId:_0x2bdbx2f?_0x2bdbx2f[_0x37a7[49]]:null}]},{include:[{model:Message},{model:Status}]})})}else {return _0x2bdbx2d}})[_0x37a7[39]](function(_0x2bdbx2d){_0x2bdbx1c= _0x2bdbx2d;return Agent[_0x37a7[88]](_0x2bdbx1f.UserId)})[_0x37a7[39]](function(_0x2bdbx2c){_0x2bdbx1e= _0x2bdbx2c;return _0x2bdbx1c[_0x37a7[87]](_0x2bdbx1e)})[_0x37a7[39]](function(){_0x2bdbx1f[_0x37a7[59]]= _0x2bdbx1f[_0x37a7[59]]?_0x2bdbx1f[_0x37a7[59]].toString(_0x37a7[60]):null;_0x2bdbx1f[_0x37a7[61]]= _0x2bdbx1f[_0x37a7[61]]?_0x2bdbx1f[_0x37a7[61]].toString(_0x37a7[60]):null;var _0x2bdbx25=_0x2bdbx1f[_0x37a7[62]]?_[_0x37a7[66]](_0x2bdbx1f[_0x37a7[62]][_0x37a7[64]](_0x37a7[63]),_0x2bdbx1d[_0x37a7[65]]):[];var _0x2bdbx26=_0x2bdbx1f[_0x37a7[67]]?_[_0x37a7[66]](_0x2bdbx1f[_0x37a7[67]][_0x37a7[64]](_0x37a7[63]),_0x2bdbx1d[_0x37a7[65]]):[];var _0x2bdbx27=_0x2bdbx1f[_0x37a7[68]]?_[_0x37a7[66]](_0x2bdbx1f[_0x37a7[68]][_0x37a7[64]](_0x37a7[63]),_0x2bdbx1d[_0x37a7[65]]):[];var _0x2bdbx28=(_0x2bdbx1d[_0x37a7[12]]&& !_0x2bdbx1b[_0x37a7[69]])?Mustache[_0x37a7[77]](_0x2bdbx1d[_0x37a7[12]][_0x37a7[59]],{interactionId:_0x2bdbx1c[_0x37a7[49]],subject:_0x2bdbx1f[_0x37a7[70]],body:_0x2bdbx1f[_0x37a7[59]]?_0x2bdbx1f[_0x37a7[59]]:_0x2bdbx1f[_0x37a7[61]],accountName:_0x2bdbx1d[_0x37a7[71]],from:_0x2bdbx1f[_0x37a7[72]],to:_0x2bdbx25[_0x37a7[73]](_0x37a7[63]),cc:_0x2bdbx26[_0x37a7[73]](_0x37a7[63]),bcc:_0x2bdbx27[_0x37a7[73]](_0x37a7[63]),agentName:_0x2bdbx1e?_0x2bdbx1e[_0x37a7[74]]:_0x37a7[95],agentEmail:_0x2bdbx1e?_0x2bdbx1e[_0x37a7[75]]:_0x37a7[95],createdAt:_0x2bdbx1f[_0x37a7[76]]}):_0x2bdbx1f[_0x37a7[59]];var _0x2bdbx29;if(_0x2bdbx1f[_0x37a7[61]]){_0x2bdbx29= _0x2bdbx1f[_0x37a7[61]]}else {_0x2bdbx29= _0x2bdbx1f[_0x37a7[59]]?htmlToText[_0x37a7[78]](_0x2bdbx1f[_0x37a7[59]],{wordwrap:false}):null};if(_0x2bdbx1d[_0x37a7[79]]){_0x2bdbx28+= _0x37a7[80]+ _0x2bdbx1d[_0x37a7[79]];_0x2bdbx29+= _0x37a7[80]+ _0x2bdbx1d[_0x37a7[79]]}else {_0x2bdbx28+= _0x37a7[81];_0x2bdbx29+= _0x37a7[81]};var _0x2bdbx2a={status:_0x2bdbx1f[_0x37a7[51]],from:{name:_0x2bdbx1d[_0x37a7[71]],address:_0x2bdbx1d[_0x37a7[65]]},to:_0x2bdbx25[_0x37a7[73]](_0x37a7[63]),cc:_0x2bdbx26[_0x37a7[73]](_0x37a7[63]),bcc:_0x2bdbx27[_0x37a7[73]](_0x37a7[63]),subject:_0x2bdbx1f[_0x37a7[70]],html:_0x2bdbx28,text:_0x2bdbx29};if(_0x2bdbx1f[_0x37a7[82]]){_0x2bdbx2a[_0x37a7[83]]= _[_0x37a7[85]](_0x2bdbx1f.MailAttachments,function(_0x2bdbx2b){return {path:_0x2bdbx2b[_0x37a7[84]],filename:_0x2bdbx2b[_0x37a7[71]]}})};return smtp[_0x37a7[86]](_0x2bdbx2a)})[_0x37a7[39]](function(_0x2bdbx24){process[_0x37a7[35]]({msgId:_0x2bdbx1f[_0x37a7[49]],roomId:_0x2bdbx1c[_0x37a7[49]],type:_0x37a7[54],messageId:_0x2bdbx24[_0x37a7[57]],status:_0x37a7[58],retry:_0x2bdbx1f[_0x37a7[56]]})})[_0x37a7[36]](function(_0x2bdbx13){console[_0x37a7[18]](_0x2bdbx13);process[_0x37a7[35]]({msgId:_0x2bdbx1f[_0x37a7[49]],roomId:_0x2bdbx1c[_0x37a7[49]],type:_0x37a7[54],status:_0x37a7[55],retry:_0x2bdbx1f[_0x37a7[56]]})})}}}Server[_0x37a7[88]](process[_0x37a7[22]][2])[_0x37a7[39]](function(_0x2bdbx19){onSave(_0x2bdbx19)})[_0x37a7[36]](function(_0x2bdbx13){console[_0x37a7[18]](_0x2bdbx13)}) \ No newline at end of file +'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); + }); diff --git a/server/config/socketio.js b/server/config/socketio.js index 00ec3ca..0593115 100644 --- a/server/config/socketio.js +++ b/server/config/socketio.js @@ -1 +1,286 @@ -var _0x2454=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\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","\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","\x73\x6F\x63\x6B\x65\x74\x3A\x20\x75\x73\x65\x72\x20\x6F\x6E\x6C\x69\x6E\x65","\x72\x6F\x6C\x65","\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","\x2E\x2F\x74\x6F\x6F\x6C\x73\x2F\x71\x75\x65\x75\x65\x50\x61\x72\x61\x6D\x65\x74\x65\x72\x73","\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","\x66\x6F\x72\x6D\x61\x74","\x69\x6E\x66\x6F","\x5B\x25\x73\x5D\x20\x25\x73","\x61\x64\x64\x72\x65\x73\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","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x68\x61\x6E\x64\x73\x68\x61\x6B\x65","\x3A","\x70\x6F\x72\x74","\x44\x4F\x4D\x41\x49\x4E","\x65\x6E\x76","\x71\x75\x65\x72\x79","\x73\x6F\x75\x72\x63\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x41\x74","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x5B\x25\x73\x5D\x20\x53\x4F\x43\x4B\x45\x54\x20\x44\x49\x53\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x5B\x25\x73\x5D\x20\x53\x4F\x43\x4B\x45\x54\x20\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44"];_0x2454[0];var moment=require(_0x2454[1]);var config=require(_0x2454[2]);var User=require(_0x2454[4])[_0x2454[3]];function onDisconnect(_0x6620x5){if(_0x6620x5[_0x2454[5]]){return User[_0x2454[14]](_0x6620x5[_0x2454[5]])[_0x2454[11]](function(_0x6620x7){if(!_0x6620x7){throw new Error(_0x2454[12])};return _0x6620x7[_0x2454[13]]({online:false})})[_0x2454[11]](function(_0x6620x7){console[_0x2454[10]](_0x2454[8],_0x6620x7[_0x2454[9]])})[_0x2454[7]](function(_0x6620x6){console[_0x2454[6]](_0x6620x6)})}else {console[_0x2454[10]](_0x2454[12])}}function onConnect(_0x6620x5){if(_0x6620x5[_0x2454[5]]){return User[_0x2454[14]](_0x6620x5[_0x2454[5]])[_0x2454[11]](function(_0x6620x7){if(!_0x6620x7){throw new Error(_0x2454[12])};return _0x6620x7[_0x2454[13]]({online:true,lastLoginAt:moment()[_0x2454[149]](_0x2454[148])})})[_0x2454[11]](function(_0x6620x7){console[_0x2454[10]](_0x2454[15],_0x6620x7[_0x2454[9]]);if(_0x6620x7[_0x2454[16]]!== _0x2454[17]){require(_0x2454[19])[_0x2454[18]](_0x6620x5);require(_0x2454[20])[_0x2454[18]](_0x6620x5)};require(_0x2454[21])[_0x2454[18]](_0x6620x5);require(_0x2454[22])[_0x2454[18]](_0x6620x5);require(_0x2454[23])[_0x2454[18]](_0x6620x5);require(_0x2454[24])[_0x2454[18]](_0x6620x5);require(_0x2454[25])[_0x2454[18]](_0x6620x5);require(_0x2454[26])[_0x2454[18]](_0x6620x5);require(_0x2454[27])[_0x2454[18]](_0x6620x5);require(_0x2454[28])[_0x2454[18]](_0x6620x5);require(_0x2454[29])[_0x2454[18]](_0x6620x5);require(_0x2454[30])[_0x2454[18]](_0x6620x5);require(_0x2454[31])[_0x2454[18]](_0x6620x5);require(_0x2454[32])[_0x2454[18]](_0x6620x5);require(_0x2454[33])[_0x2454[18]](_0x6620x5);require(_0x2454[34])[_0x2454[18]](_0x6620x5);require(_0x2454[35])[_0x2454[18]](_0x6620x5);require(_0x2454[36])[_0x2454[18]](_0x6620x5);require(_0x2454[37])[_0x2454[18]](_0x6620x5);require(_0x2454[38])[_0x2454[18]](_0x6620x5);require(_0x2454[39])[_0x2454[18]](_0x6620x5);require(_0x2454[40])[_0x2454[18]](_0x6620x5);require(_0x2454[41])[_0x2454[18]](_0x6620x5);require(_0x2454[42])[_0x2454[18]](_0x6620x5);require(_0x2454[43])[_0x2454[18]](_0x6620x5);require(_0x2454[44])[_0x2454[18]](_0x6620x5);require(_0x2454[45])[_0x2454[18]](_0x6620x5);require(_0x2454[46])[_0x2454[18]](_0x6620x5);require(_0x2454[47])[_0x2454[18]](_0x6620x5);require(_0x2454[48])[_0x2454[18]](_0x6620x5);require(_0x2454[49])[_0x2454[18]](_0x6620x5);require(_0x2454[50])[_0x2454[18]](_0x6620x5);require(_0x2454[51])[_0x2454[18]](_0x6620x5);require(_0x2454[52])[_0x2454[18]](_0x6620x5);require(_0x2454[53])[_0x2454[18]](_0x6620x5);require(_0x2454[54])[_0x2454[18]](_0x6620x5);require(_0x2454[55])[_0x2454[18]](_0x6620x5);require(_0x2454[56])[_0x2454[18]](_0x6620x5);require(_0x2454[57])[_0x2454[18]](_0x6620x5);require(_0x2454[58])[_0x2454[18]](_0x6620x5);require(_0x2454[59])[_0x2454[18]](_0x6620x5);require(_0x2454[60])[_0x2454[18]](_0x6620x5);require(_0x2454[61])[_0x2454[18]](_0x6620x5);require(_0x2454[62])[_0x2454[18]](_0x6620x5);require(_0x2454[63])[_0x2454[18]](_0x6620x5);require(_0x2454[64])[_0x2454[18]](_0x6620x5);require(_0x2454[65])[_0x2454[18]](_0x6620x5);require(_0x2454[66])[_0x2454[18]](_0x6620x5);require(_0x2454[67])[_0x2454[18]](_0x6620x5);require(_0x2454[68])[_0x2454[18]](_0x6620x5);require(_0x2454[69])[_0x2454[18]](_0x6620x5);require(_0x2454[70])[_0x2454[18]](_0x6620x5);require(_0x2454[71])[_0x2454[18]](_0x6620x5);require(_0x2454[72])[_0x2454[18]](_0x6620x5);require(_0x2454[73])[_0x2454[18]](_0x6620x5);require(_0x2454[74])[_0x2454[18]](_0x6620x5);require(_0x2454[75])[_0x2454[18]](_0x6620x5);require(_0x2454[76])[_0x2454[18]](_0x6620x5);require(_0x2454[77])[_0x2454[18]](_0x6620x5);require(_0x2454[78])[_0x2454[18]](_0x6620x5);require(_0x2454[79])[_0x2454[18]](_0x6620x5);require(_0x2454[80])[_0x2454[18]](_0x6620x5);require(_0x2454[81])[_0x2454[18]](_0x6620x5);require(_0x2454[82])[_0x2454[18]](_0x6620x5);require(_0x2454[83])[_0x2454[18]](_0x6620x5);require(_0x2454[84])[_0x2454[18]](_0x6620x5);require(_0x2454[85])[_0x2454[18]](_0x6620x5);require(_0x2454[86])[_0x2454[18]](_0x6620x5);require(_0x2454[87])[_0x2454[18]](_0x6620x5);require(_0x2454[88])[_0x2454[18]](_0x6620x5);require(_0x2454[89])[_0x2454[18]](_0x6620x5);require(_0x2454[90])[_0x2454[18]](_0x6620x5);require(_0x2454[91])[_0x2454[18]](_0x6620x5);require(_0x2454[92])[_0x2454[18]](_0x6620x5);require(_0x2454[93])[_0x2454[18]](_0x6620x5);require(_0x2454[94])[_0x2454[18]](_0x6620x5);require(_0x2454[95])[_0x2454[18]](_0x6620x5);require(_0x2454[96])[_0x2454[18]](_0x6620x5);require(_0x2454[97])[_0x2454[18]](_0x6620x5);require(_0x2454[98])[_0x2454[18]](_0x6620x5);require(_0x2454[99])[_0x2454[18]](_0x6620x5);require(_0x2454[100])[_0x2454[18]](_0x6620x5);require(_0x2454[101])[_0x2454[18]](_0x6620x5);require(_0x2454[102])[_0x2454[18]](_0x6620x5);require(_0x2454[103])[_0x2454[18]](_0x6620x5);require(_0x2454[104])[_0x2454[18]](_0x6620x5);require(_0x2454[105])[_0x2454[18]](_0x6620x5);require(_0x2454[106])[_0x2454[18]](_0x6620x5);require(_0x2454[107])[_0x2454[18]](_0x6620x5);require(_0x2454[108])[_0x2454[18]](_0x6620x5);require(_0x2454[109])[_0x2454[18]](_0x6620x5);require(_0x2454[110])[_0x2454[18]](_0x6620x5);require(_0x2454[111])[_0x2454[18]](_0x6620x5);require(_0x2454[112])[_0x2454[18]](_0x6620x5);require(_0x2454[113])[_0x2454[18]](_0x6620x5);require(_0x2454[114])[_0x2454[18]](_0x6620x5);require(_0x2454[115])[_0x2454[18]](_0x6620x5);require(_0x2454[116])[_0x2454[18]](_0x6620x5);require(_0x2454[117])[_0x2454[18]](_0x6620x5);require(_0x2454[118])[_0x2454[18]](_0x6620x5);require(_0x2454[119])[_0x2454[18]](_0x6620x5);require(_0x2454[120])[_0x2454[18]](_0x6620x5);require(_0x2454[121])[_0x2454[18]](_0x6620x5);require(_0x2454[122])[_0x2454[18]](_0x6620x5);require(_0x2454[123])[_0x2454[18]](_0x6620x5);require(_0x2454[124])[_0x2454[18]](_0x6620x5);require(_0x2454[125])[_0x2454[18]](_0x6620x5);require(_0x2454[126])[_0x2454[18]](_0x6620x5);require(_0x2454[127])[_0x2454[18]](_0x6620x5);require(_0x2454[128])[_0x2454[18]](_0x6620x5);require(_0x2454[129])[_0x2454[18]](_0x6620x5);require(_0x2454[130])[_0x2454[18]](_0x6620x5);require(_0x2454[131])[_0x2454[18]](_0x6620x5);require(_0x2454[132])[_0x2454[18]](_0x6620x5);require(_0x2454[133])[_0x2454[18]](_0x6620x5);require(_0x2454[134])[_0x2454[18]](_0x6620x5);require(_0x2454[135])[_0x2454[18]](_0x6620x5);require(_0x2454[136])[_0x2454[18]](_0x6620x5);require(_0x2454[137])[_0x2454[18]](_0x6620x5);require(_0x2454[138])[_0x2454[18]](_0x6620x5);require(_0x2454[139])[_0x2454[18]](_0x6620x5);require(_0x2454[140])[_0x2454[18]](_0x6620x5);require(_0x2454[141])[_0x2454[18]](_0x6620x5);require(_0x2454[142])[_0x2454[18]](_0x6620x5);require(_0x2454[143])[_0x2454[18]](_0x6620x5);require(_0x2454[144])[_0x2454[18]](_0x6620x5);require(_0x2454[145])[_0x2454[18]](_0x6620x5);require(_0x2454[146])[_0x2454[18]](_0x6620x5);require(_0x2454[147])[_0x2454[18]](_0x6620x5)})[_0x2454[7]](function(_0x6620x6){console[_0x2454[6]](_0x6620x6)})}else {console[_0x2454[10]](_0x2454[12])};_0x6620x5[_0x2454[154]](_0x2454[150],function(_0x6620x9){console[_0x2454[150]](_0x2454[151],_0x6620x5[_0x2454[152]],JSON[_0x2454[153]](_0x6620x9,null,2))})}module[_0x2454[155]]= function(_0x6620xa){_0x6620xa[_0x2454[160]](require(_0x2454[159])[_0x2454[158]]({secret:config[_0x2454[157]][_0x2454[156]],handshake:true}));_0x6620xa[_0x2454[154]](_0x2454[161],function(_0x6620x5){_0x6620x5[_0x2454[162]](0);_0x6620x5[_0x2454[152]]= _0x6620x5[_0x2454[163]][_0x2454[152]]!== null?_0x6620x5[_0x2454[163]][_0x2454[152]][_0x2454[152]]+ _0x2454[164]+ _0x6620x5[_0x2454[163]][_0x2454[152]][_0x2454[165]]:process[_0x2454[167]][_0x2454[166]];_0x6620x5[_0x2454[5]]= _0x6620x5[_0x2454[163]][_0x2454[168]][_0x2454[5]];_0x6620x5[_0x2454[16]]= _0x6620x5[_0x2454[163]][_0x2454[168]][_0x2454[16]];_0x6620x5[_0x2454[9]]= _0x6620x5[_0x2454[163]][_0x2454[168]][_0x2454[9]];_0x6620x5[_0x2454[169]]= _0x6620x5[_0x2454[163]][_0x2454[168]][_0x2454[169]];_0x6620x5[_0x2454[170]]= new Date();_0x6620x5[_0x2454[154]](_0x2454[171],function(){onDisconnect(_0x6620x5);console[_0x2454[150]](_0x2454[172],_0x6620x5[_0x2454[163]][_0x2454[152]])});onConnect(_0x6620x5);console[_0x2454[150]](_0x2454[173],_0x6620x5[_0x2454[163]][_0x2454[152]])})} \ No newline at end of file +/** + * 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); + require('./tools/queueParameters').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); + }); +}; diff --git a/server/config/tools/channelSpy.js b/server/config/tools/channelSpy.js index df06218..d46a052 100644 --- a/server/config/tools/channelSpy.js +++ b/server/config/tools/channelSpy.js @@ -1 +1,109 @@ -var _0x5023=["\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"];_0x5023[0];var fs=require(_0x5023[1]);var util=require(_0x5023[2]);var path=require(_0x5023[3]);var config=require(_0x5023[4]);var ChanSpyModel=require(_0x5023[6])[_0x5023[5]];var User=require(_0x5023[6])[_0x5023[7]];var VoiceExtension=require(_0x5023[6])[_0x5023[8]];var sequelize=require(_0x5023[6])[_0x5023[9]];var Promise=require(_0x5023[10]);function ChanSpy(){ChanSpyModel[_0x5023[13]](function(_0x9cacxb,_0x9cacxc){return Promise[_0x5023[12]]([])[_0x5023[11]](createSpyExtensions(_0x9cacxb,_0x9cacxc))});ChanSpyModel[_0x5023[14]](function(_0x9cacxb,_0x9cacxc){return Promise[_0x5023[12]]([])[_0x5023[11]](deleteSpyExtensions(_0x9cacxb,_0x9cacxc))[_0x5023[11]](createSpyExtensions(_0x9cacxb,_0x9cacxc))});ChanSpyModel[_0x5023[15]](function(_0x9cacxb,_0x9cacxc){return deleteSpyExtensions(_0x9cacxb,_0x9cacxc)})}function deleteSpyExtensions(_0x9cacxb,_0x9cacxc){return VoiceExtension[_0x5023[18]]({where:{ChanSpyId:_0x9cacxb[_0x5023[16]]},transaction:_0x9cacxc[_0x5023[17]]})}function createSpyExtensions(_0x9cacxb,_0x9cacxc){return User[_0x5023[36]](_0x5023[35])[_0x5023[34]]({where:{chanspy:true}})[_0x5023[11]](function(_0x9cacxf){var _0x9cacx10=[];_0x9cacxf[_0x5023[33]](function(_0x9cacx11){var _0x9cacx12=[];var _0x9cacx13=1;if(_0x9cacxb[_0x5023[19]]){_0x9cacx12[_0x5023[28]]({context:_0x5023[20],exten:util[_0x5023[24]](_0x5023[21],_0x9cacxb[_0x5023[22]],_0x9cacx11[_0x5023[23]]),priority:_0x9cacx13,app:_0x5023[25],appdata:_0x9cacxb[_0x5023[26]],UserId:_0x9cacx11[_0x5023[16]],ChanSpyId:_0x9cacxb[_0x5023[16]],type:_0x5023[27]});_0x9cacx13++};_0x9cacx12[_0x5023[28]]({context:_0x5023[20],exten:util[_0x5023[24]](_0x5023[21],_0x9cacxb[_0x5023[22]],_0x9cacx11[_0x5023[23]]),priority:_0x9cacx13,app:_0x5023[5],appdata:util[_0x5023[24]](_0x5023[29],_0x9cacx11[_0x5023[23]],_0x9cacxb[_0x5023[30]]),UserId:_0x9cacx11[_0x5023[16]],ChanSpyId:_0x9cacxb[_0x5023[16]],type:_0x5023[27]});_0x9cacx13= 1;if(_0x9cacxb[_0x5023[19]]){_0x9cacx12[_0x5023[28]]({context:_0x5023[20],exten:util[_0x5023[24]](_0x5023[21],_0x9cacxb[_0x5023[22]],_0x9cacx11[_0x5023[31]]),priority:_0x9cacx13,app:_0x5023[25],appdata:_0x9cacxb[_0x5023[26]],UserId:_0x9cacx11[_0x5023[16]],ChanSpyId:_0x9cacxb[_0x5023[16]],type:_0x5023[27]});_0x9cacx13++};_0x9cacx12[_0x5023[28]]({context:_0x5023[20],exten:util[_0x5023[24]](_0x5023[21],_0x9cacxb[_0x5023[22]],_0x9cacx11[_0x5023[31]]),priority:_0x9cacx13,app:_0x5023[5],appdata:util[_0x5023[24]](_0x5023[29],_0x9cacx11[_0x5023[23]],_0x9cacxb[_0x5023[30]]),UserId:_0x9cacx11[_0x5023[16]],ChanSpyId:_0x9cacxb[_0x5023[16]],type:_0x5023[27]});_0x9cacx10[_0x5023[28]](VoiceExtension[_0x5023[32]](_0x9cacx12,{transaction:_0x9cacxc[_0x5023[17]]}))});return _0x9cacx10})[_0x5023[12]]()}module[_0x5023[37]]= ChanSpy \ No newline at end of file +'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; diff --git a/server/config/tools/chatRoom.js b/server/config/tools/chatRoom.js index 983d83b..69714fe 100644 --- a/server/config/tools/chatRoom.js +++ b/server/config/tools/chatRoom.js @@ -1 +1,104 @@ -var _0x73c8=["\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"];_0x73c8[0];var _=require(_0x73c8[1]);var moment=require(_0x73c8[2]);var ChatRoomModel=require(_0x73c8[4])[_0x73c8[3]];var ChatVisitorModel=require(_0x73c8[4])[_0x73c8[5]];var ReportChatSessionModel=require(_0x73c8[4])[_0x73c8[6]];var ReportChatRoomModel=require(_0x73c8[4])[_0x73c8[7]];function ChatRoom(){ChatRoomModel[_0x73c8[31]](function(_0x866fx8){if(_0x866fx8[_0x73c8[9]](_0x73c8[8])&& _0x866fx8[_0x73c8[8]]=== _0x73c8[10]){if(_0x866fx8[_0x73c8[11]]){return ChatVisitorModel[_0x73c8[24]](_0x866fx8.ChatVisitorId)[_0x73c8[20]](function(_0x866fxa){if(_0x866fxa){var _0x866fxb=_[_0x73c8[22]](_0x866fxa,{status:_0x73c8[21]});return _0x866fxb[_0x73c8[23]]()}})[_0x73c8[20]](function(){return ReportChatSessionModel[_0x73c8[19]]({complete:true,completeReason:_0x866fx8[_0x73c8[15]],completeAt:moment()[_0x73c8[17]](_0x73c8[16])},{where:{roomid:_0x866fx8[_0x73c8[18]],complete:false,abandon:false,timeout:false},individualHooks:true})})[_0x73c8[14]](function(_0x866fx9){console[_0x73c8[13]](_0x73c8[12],_0x866fx9)})}};if(_0x866fx8[_0x73c8[9]](_0x73c8[8])&& _0x866fx8[_0x73c8[8]]=== _0x73c8[25]){if(_0x866fx8[_0x73c8[11]]){return ChatVisitorModel[_0x73c8[24]](_0x866fx8.ChatVisitorId)[_0x73c8[20]](function(_0x866fxa){if(_0x866fxa){return _0x866fxa[_0x73c8[19]]({status:_0x73c8[26]})}})[_0x73c8[14]](function(_0x866fx9){console[_0x73c8[13]](_0x73c8[12],_0x866fx9)})}};if(_0x866fx8[_0x73c8[9]](_0x73c8[8])&& _0x866fx8[_0x73c8[8]]=== _0x73c8[27]){if(_0x866fx8[_0x73c8[11]]){return ChatVisitorModel[_0x73c8[24]](_0x866fx8.ChatVisitorId)[_0x73c8[20]](function(_0x866fxa){if(_0x866fxa){return _0x866fxa[_0x73c8[19]]({status:_0x73c8[28]})}})[_0x73c8[14]](function(_0x866fx9){console[_0x73c8[13]](_0x73c8[12],_0x866fx9)})}};if(_0x866fx8[_0x73c8[9]](_0x73c8[29])){if(_0x866fx8[_0x73c8[18]]){return ReportChatRoomModel[_0x73c8[19]]({crating:_0x866fx8[_0x73c8[29]],cratingMessage:_0x866fx8[_0x73c8[30]]},{where:{roomid:_0x866fx8[_0x73c8[18]]},individualHooks:true})[_0x73c8[14]](function(_0x866fx9){console[_0x73c8[13]](_0x73c8[12],_0x866fx9)})}}})}module[_0x73c8[32]]= ChatRoom \ No newline at end of file +'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; diff --git a/server/config/tools/dashboard.js b/server/config/tools/dashboard.js index b304427..849d844 100644 --- a/server/config/tools/dashboard.js +++ b/server/config/tools/dashboard.js @@ -1 +1,1248 @@ -var _0x54f1=["\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\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","\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","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C","\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\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","\x72\x6F\x77\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x74\x68\x65\x6E","\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","\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","\x72\x6F\x6C\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x77\x61\x69\x74\x69\x6E\x67","\x65\x6D\x69\x74","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x61\x63\x74\x69\x76\x65","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x61\x6E\x73\x77\x65\x72\x65\x64","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x61\x76\x67\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x76\x61\x6C\x75\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\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x27\x2C\x27","\x6A\x6F\x69\x6E","\x27\x29","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x71\x75\x65\x72\x79","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\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\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\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","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\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","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\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","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x6C\x6F\x67","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\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","\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","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\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","\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","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64\x61\x6E\x73\x77\x65\x72\x65\x64","\x41\x4E\x53\x57\x45\x52\x45\x44","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64\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\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","\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","\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","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\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","\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","\x4F\x50\x45\x4E","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\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"];_0x54f1[0];var sequelize=require(_0x54f1[2])[_0x54f1[1]];var models=require(_0x54f1[2]);var Util=require(_0x54f1[3]);var _=require(_0x54f1[4]);var moment=require(_0x54f1[5]);var Promise=require(_0x54f1[6]);exports[_0x54f1[7]]= function(_0x6d25x7){models[_0x54f1[9]][_0x54f1[8]](function(_0x6d25x8){onWaiting(_0x6d25x7,_0x6d25x8);onAbandon(_0x6d25x7,_0x6d25x8);onComplete(_0x6d25x7,_0x6d25x8);onActive(_0x6d25x7,_0x6d25x8);onAvgAnswerTime(_0x6d25x7,_0x6d25x8);onAvgTalkTime(_0x6d25x7,_0x6d25x8);onAbandonRate(_0x6d25x7,_0x6d25x8);onAnswerRate(_0x6d25x7,_0x6d25x8);onTotalOffered(_0x6d25x7,_0x6d25x8);onUnmanaged(_0x6d25x7,_0x6d25x8)});models[_0x54f1[9]][_0x54f1[14]](function(_0x6d25x8){if(_0x6d25x8[_0x54f1[11]](_0x54f1[10])|| _0x6d25x8[_0x54f1[11]](_0x54f1[12])|| _0x6d25x8[_0x54f1[11]](_0x54f1[13])){onWaiting(_0x6d25x7,_0x6d25x8);onAbandon(_0x6d25x7,_0x6d25x8);onComplete(_0x6d25x7,_0x6d25x8);onActive(_0x6d25x7,_0x6d25x8);onAvgAnswerTime(_0x6d25x7,_0x6d25x8);onAvgTalkTime(_0x6d25x7,_0x6d25x8);onAbandonRate(_0x6d25x7,_0x6d25x8);onAnswerRate(_0x6d25x7,_0x6d25x8);onTotalOffered(_0x6d25x7,_0x6d25x8);onUnmanaged(_0x6d25x7,_0x6d25x8)}});models[_0x54f1[15]][_0x54f1[8]](function(_0x6d25x8){manualOutboundAnswerRate(_0x6d25x7,_0x6d25x8);manualOutboundAnswered(_0x6d25x7,_0x6d25x8);manualOutbound(_0x6d25x7,_0x6d25x8);manualOutboundAvgDuration(_0x6d25x7,_0x6d25x8);manualOutboundGlobalDuration(_0x6d25x7,_0x6d25x8)});models[_0x54f1[15]][_0x54f1[14]](function(_0x6d25x8){manualOutboundAnswerRate(_0x6d25x7,_0x6d25x8);manualOutboundAnswered(_0x6d25x7,_0x6d25x8);manualOutbound(_0x6d25x7,_0x6d25x8);manualOutboundAvgDuration(_0x6d25x7,_0x6d25x8);manualOutboundGlobalDuration(_0x6d25x7,_0x6d25x8)});models[_0x54f1[16]][_0x54f1[8]](function(_0x6d25x8){_0x6d25x9(_0x6d25x8)});models[_0x54f1[16]][_0x54f1[14]](function(_0x6d25x8){_0x6d25x9(_0x6d25x8)});models[_0x54f1[17]][_0x54f1[8]](function(_0x6d25x8){_0x6d25x9(_0x6d25x8)});models[_0x54f1[17]][_0x54f1[14]](function(_0x6d25x8){_0x6d25x9(_0x6d25x8)});function _0x6d25x9(_0x6d25x8){onNewMail(_0x6d25x7,_0x6d25x8);onOpenMail(_0x6d25x7,_0x6d25x8);onClosedMail(_0x6d25x7,_0x6d25x8);onTimeoutMail(_0x6d25x7,_0x6d25x8);onPendingMail(_0x6d25x7,_0x6d25x8);onWaitingMail(_0x6d25x7,_0x6d25x8)}models[_0x54f1[18]][_0x54f1[8]](function(_0x6d25x8){_0x6d25xa(_0x6d25x8)});models[_0x54f1[18]][_0x54f1[14]](function(_0x6d25x8){_0x6d25xa(_0x6d25x8)});models[_0x54f1[19]][_0x54f1[8]](function(_0x6d25x8){_0x6d25xa(_0x6d25x8)});models[_0x54f1[19]][_0x54f1[14]](function(_0x6d25x8){_0x6d25xa(_0x6d25x8)});function _0x6d25xa(_0x6d25x8){onNewChat(_0x6d25x7,_0x6d25x8);onOpenChat(_0x6d25x7,_0x6d25x8);onClosedChat(_0x6d25x7,_0x6d25x8);onTimeoutChat(_0x6d25x7,_0x6d25x8);onAbandonedChat(_0x6d25x7,_0x6d25x8);onUnmanagedChat(_0x6d25x7,_0x6d25x8)}models[_0x54f1[20]][_0x54f1[8]](function(_0x6d25x8){_0x6d25xb(_0x6d25x8)});models[_0x54f1[20]][_0x54f1[14]](function(_0x6d25x8){_0x6d25xb(_0x6d25x8)});models[_0x54f1[21]][_0x54f1[8]](function(_0x6d25x8){_0x6d25xb(_0x6d25x8)});models[_0x54f1[21]][_0x54f1[14]](function(_0x6d25x8){_0x6d25xb(_0x6d25x8)});function _0x6d25xb(_0x6d25x8){onNewFax(_0x6d25x7,_0x6d25x8);onOpenFax(_0x6d25x7,_0x6d25x8);onClosedFax(_0x6d25x7,_0x6d25x8);onTimeoutFax(_0x6d25x7,_0x6d25x8);onPendingFax(_0x6d25x7,_0x6d25x8);onWaitingFax(_0x6d25x7,_0x6d25x8)}models[_0x54f1[22]][_0x54f1[8]](function(_0x6d25x8){_0x6d25xc(_0x6d25x8)});models[_0x54f1[22]][_0x54f1[14]](function(_0x6d25x8){_0x6d25xc(_0x6d25x8)});models[_0x54f1[23]][_0x54f1[8]](function(_0x6d25x8){_0x6d25xc(_0x6d25x8)});models[_0x54f1[23]][_0x54f1[14]](function(_0x6d25x8){_0x6d25xc(_0x6d25x8)});function _0x6d25xc(_0x6d25x8){onNewSms(_0x6d25x7,_0x6d25x8);onOpenSms(_0x6d25x7,_0x6d25x8);onClosedSms(_0x6d25x7,_0x6d25x8);onTimeoutSms(_0x6d25x7,_0x6d25x8);onPendingSms(_0x6d25x7,_0x6d25x8);onWaitingSms(_0x6d25x7,_0x6d25x8)}models[_0x54f1[24]][_0x54f1[8]](function(_0x6d25x8){_0x6d25xd(_0x6d25x8)});models[_0x54f1[24]][_0x54f1[14]](function(_0x6d25x8){_0x6d25xd(_0x6d25x8)});models[_0x54f1[25]][_0x54f1[8]](function(_0x6d25x8){_0x6d25xd(_0x6d25x8)});models[_0x54f1[25]][_0x54f1[14]](function(_0x6d25x8){_0x6d25xd(_0x6d25x8)});function _0x6d25xd(_0x6d25x8){onNewOpenchannel(_0x6d25x7,_0x6d25x8);onOpenOpenchannel(_0x6d25x7,_0x6d25x8);onClosedOpenchannel(_0x6d25x7,_0x6d25x8);onTimeoutOpenchannel(_0x6d25x7,_0x6d25x8);onPendingOpenchannel(_0x6d25x7,_0x6d25x8);onWaitingOpenchannel(_0x6d25x7,_0x6d25x8)}};function getVoiceQueues(_0x6d25xf){return function(){switch(_0x6d25xf[_0x54f1[38]]){case _0x54f1[35]:return models[_0x54f1[34]][_0x54f1[33]](_0x6d25xf[_0x54f1[31]],{attributes:[_0x54f1[32]]})[_0x54f1[29]](Util[_0x54f1[30]]())[_0x54f1[29]](function(_0x6d25x10){return _[_0x54f1[28]](_0x6d25x10[_0x54f1[26]],_0x54f1[27])});default:return models[_0x54f1[37]][_0x54f1[36]]()[_0x54f1[29]](function(_0x6d25x11){return {rows:_0x6d25x11}})[_0x54f1[29]](function(_0x6d25x10){return _[_0x54f1[28]](_0x6d25x10[_0x54f1[26]],_0x54f1[27])})}}}function onWaiting(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getVoiceQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x10){return models[_0x54f1[9]][_0x54f1[43]]({where:{queuecallerleaveAt:null,queue:_0x6d25x10}})})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[41],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onActive(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getVoiceQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x10){return models[_0x54f1[9]][_0x54f1[43]]({where:{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null},queue:_0x6d25x10}})})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[45],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onAbandon(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getVoiceQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x10){return models[_0x54f1[9]][_0x54f1[43]]({where:{queuecallerabandon:true,queue:_0x6d25x10}})})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[46],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onComplete(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getVoiceQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x10){return models[_0x54f1[9]][_0x54f1[43]]({where:{queuecallercomplete:true,queue:_0x6d25x10}})})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[47],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onAvgAnswerTime(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getVoiceQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x10){return sequelize[_0x54f1[56]](_0x54f1[50]+ _0x6d25x10[_0x54f1[52]](_0x54f1[51])+ _0x54f1[53],{type:sequelize[_0x54f1[55]][_0x54f1[54]]})})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[48],{value:_0x6d25x14[0][_0x54f1[49]]})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onAvgTalkTime(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getVoiceQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x10){return sequelize[_0x54f1[56]](_0x54f1[58]+ _0x6d25x10[_0x54f1[52]](_0x54f1[51])+ _0x54f1[53],{type:sequelize[_0x54f1[55]][_0x54f1[54]]})})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[57],{value:_0x6d25x14[0][_0x54f1[49]]})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onAnswerRate(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getVoiceQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x10){return sequelize[_0x54f1[56]](_0x54f1[60]+ _0x6d25x10[_0x54f1[52]](_0x54f1[51])+ _0x54f1[53],{type:sequelize[_0x54f1[55]][_0x54f1[54]]})})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[59],{value:_0x6d25x14[0][_0x54f1[49]]})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onAbandonRate(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getVoiceQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x10){return sequelize[_0x54f1[56]](_0x54f1[62]+ _0x6d25x10[_0x54f1[52]](_0x54f1[51])+ _0x54f1[53],{type:sequelize[_0x54f1[55]][_0x54f1[54]]})})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[61],{value:_0x6d25x14[0][_0x54f1[49]]})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onTotalOffered(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getVoiceQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x10){return sequelize[_0x54f1[56]](_0x54f1[64]+ _0x6d25x10[_0x54f1[52]](_0x54f1[51])+ _0x54f1[53],{type:sequelize[_0x54f1[55]][_0x54f1[54]]})})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[63],{value:_0x6d25x14[0][_0x54f1[49]]})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onUnmanaged(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getVoiceQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x10){return models[_0x54f1[9]][_0x54f1[43]]({where:{queuecallerexit:true,queue:_0x6d25x10}})})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[65],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function manualOutbound(_0x6d25x7,_0x6d25x8){console[_0x54f1[67]](_0x54f1[66]);return models[_0x54f1[15]][_0x54f1[43]]({where:{type:_0x54f1[69]}})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[68],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function manualOutboundGlobalDuration(_0x6d25x7,_0x6d25x8){return sequelize[_0x54f1[56]](_0x54f1[71],{type:sequelize[_0x54f1[55]][_0x54f1[54]]})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[70],{value:_0x6d25x14[0][_0x54f1[49]]})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function manualOutboundAvgDuration(_0x6d25x7,_0x6d25x8){return sequelize[_0x54f1[56]](_0x54f1[73],{type:sequelize[_0x54f1[55]][_0x54f1[54]]})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[72],{value:_0x6d25x14[0][_0x54f1[49]]})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function manualOutboundAnswered(_0x6d25x7,_0x6d25x8){return models[_0x54f1[15]][_0x54f1[43]]({where:{disposition:_0x54f1[75],type:_0x54f1[69]}})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[74],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function manualOutboundAnswerRate(_0x6d25x7,_0x6d25x8){return sequelize[_0x54f1[56]](_0x54f1[77],{type:sequelize[_0x54f1[55]][_0x54f1[54]]})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[76],{value:_0x6d25x14[0][_0x54f1[49]]})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function getMailQueues(_0x6d25xf,_0x6d25x24){return function(){switch(_0x6d25xf[_0x54f1[38]]){case _0x54f1[35]:return models[_0x54f1[34]][_0x54f1[33]](_0x6d25xf[_0x54f1[32]],{attributes:[_0x54f1[32]]})[_0x54f1[29]](Util[_0x54f1[83]]({},{attributes:[_0x54f1[32]],include:[{raw:true,model:models[_0x54f1[34]],attributes:[_0x54f1[32]]}]}))[_0x54f1[29]](function(_0x6d25x10){if(_0x6d25x24){return {include:{model:models[_0x54f1[78]],include:{model:models[_0x54f1[79]],include:{model:models[_0x54f1[80]],where:{id:_[_0x54f1[28]](_0x6d25x10,_0x54f1[32])}}}}}}else {var _0x6d25x25=[];_0x6d25x10[_0x54f1[26]][_0x54f1[82]](function(_0x6d25x26){_0x6d25x25= _[_0x54f1[81]](_0x6d25x25,_[_0x54f1[28]](_0x6d25x26.Users,_0x54f1[32]))});return {where:{$or:{queue:_[_0x54f1[28]](_0x6d25x10[_0x54f1[26]],_0x54f1[32]),memberid:_0x6d25x25}}}}});case _0x54f1[85]:return models[_0x54f1[34]][_0x54f1[33]](_0x6d25xf[_0x54f1[32]],{attributes:[_0x54f1[32]]})[_0x54f1[29]](function(_0x6d25x27){return _0x6d25x27[_0x54f1[84]]({attributes:[_0x54f1[32]]})})[_0x54f1[29]](function(_0x6d25x10){return {where:{$or:{queue:_[_0x54f1[28]](_0x6d25x10,_0x54f1[32]),memberid:_0x6d25xf[_0x54f1[32]]}}}});default:return {}}}}function getChatQueues(_0x6d25xf,_0x6d25x24){return function(){switch(_0x6d25xf[_0x54f1[38]]){case _0x54f1[35]:return models[_0x54f1[34]][_0x54f1[33]](_0x6d25xf[_0x54f1[32]],{attributes:[_0x54f1[32]]})[_0x54f1[29]](Util[_0x54f1[89]]({},{attributes:[_0x54f1[32]],include:[{raw:true,model:models[_0x54f1[34]],attributes:[_0x54f1[32]]}]}))[_0x54f1[29]](function(_0x6d25x10){if(_0x6d25x24){return {include:{model:models[_0x54f1[86]],include:{model:models[_0x54f1[87]],include:{model:models[_0x54f1[88]],where:{id:_[_0x54f1[28]](_0x6d25x10,_0x54f1[32])}}}}}}else {var _0x6d25x25=[];_0x6d25x10[_0x54f1[26]][_0x54f1[82]](function(_0x6d25x26){_0x6d25x25= _[_0x54f1[81]](_0x6d25x25,_[_0x54f1[28]](_0x6d25x26.Users,_0x54f1[32]))});return {where:{$or:{queue:_[_0x54f1[28]](_0x6d25x10[_0x54f1[26]],_0x54f1[32]),memberid:_0x6d25x25}}}}});case _0x54f1[85]:return models[_0x54f1[34]][_0x54f1[33]](_0x6d25xf[_0x54f1[32]],{attributes:[_0x54f1[32]]})[_0x54f1[29]](function(_0x6d25x27){return _0x6d25x27[_0x54f1[90]]({attributes:[_0x54f1[32]]})})[_0x54f1[29]](function(_0x6d25x10){return {where:{$or:{queue:_[_0x54f1[28]](_0x6d25x10,_0x54f1[32]),memberid:_0x6d25xf[_0x54f1[32]]}}}});default:return {}}}}function getFaxQueues(_0x6d25xf,_0x6d25x24){return function(){switch(_0x6d25xf[_0x54f1[38]]){case _0x54f1[35]:return models[_0x54f1[34]][_0x54f1[33]](_0x6d25xf[_0x54f1[32]],{attributes:[_0x54f1[32]]})[_0x54f1[29]](Util[_0x54f1[94]]({},{attributes:[_0x54f1[32]],include:[{raw:true,model:models[_0x54f1[34]],attributes:[_0x54f1[32]]}]}))[_0x54f1[29]](function(_0x6d25x10){if(_0x6d25x24){return {include:{model:models[_0x54f1[91]],include:{model:models[_0x54f1[92]],include:{model:models[_0x54f1[93]],where:{id:_[_0x54f1[28]](_0x6d25x10,_0x54f1[32])}}}}}}else {var _0x6d25x25=[];_0x6d25x10[_0x54f1[26]][_0x54f1[82]](function(_0x6d25x26){_0x6d25x25= _[_0x54f1[81]](_0x6d25x25,_[_0x54f1[28]](_0x6d25x26.Users,_0x54f1[32]))});return {where:{$or:{queue:_[_0x54f1[28]](_0x6d25x10[_0x54f1[26]],_0x54f1[32]),memberid:_0x6d25x25}}}}});case _0x54f1[85]:return models[_0x54f1[34]][_0x54f1[33]](_0x6d25xf[_0x54f1[32]],{attributes:[_0x54f1[32]]})[_0x54f1[29]](function(_0x6d25x27){return _0x6d25x27[_0x54f1[95]]({attributes:[_0x54f1[32]]})})[_0x54f1[29]](function(_0x6d25x10){return {where:{$or:{queue:_[_0x54f1[28]](_0x6d25x10,_0x54f1[32]),memberid:_0x6d25xf[_0x54f1[32]]}}}});default:return {}}}}function getSmsQueues(_0x6d25xf,_0x6d25x24){return function(){switch(_0x6d25xf[_0x54f1[38]]){case _0x54f1[35]:return models[_0x54f1[34]][_0x54f1[33]](_0x6d25xf[_0x54f1[32]],{attributes:[_0x54f1[32]]})[_0x54f1[29]](Util[_0x54f1[99]]({},{attributes:[_0x54f1[32]],include:[{raw:true,model:models[_0x54f1[34]],attributes:[_0x54f1[32]]}]}))[_0x54f1[29]](function(_0x6d25x10){if(_0x6d25x24){return {include:{model:models[_0x54f1[96]],include:{model:models[_0x54f1[97]],include:{model:models[_0x54f1[98]],where:{id:_[_0x54f1[28]](_0x6d25x10,_0x54f1[32])}}}}}}else {var _0x6d25x25=[];_0x6d25x10[_0x54f1[26]][_0x54f1[82]](function(_0x6d25x26){_0x6d25x25= _[_0x54f1[81]](_0x6d25x25,_[_0x54f1[28]](_0x6d25x26.Users,_0x54f1[32]))});return {where:{$or:{queue:_[_0x54f1[28]](_0x6d25x10[_0x54f1[26]],_0x54f1[32]),memberid:_0x6d25x25}}}}});case _0x54f1[85]:return models[_0x54f1[34]][_0x54f1[33]](_0x6d25xf[_0x54f1[32]],{attributes:[_0x54f1[32]]})[_0x54f1[29]](function(_0x6d25x27){return _0x6d25x27[_0x54f1[100]]({attributes:[_0x54f1[32]]})})[_0x54f1[29]](function(_0x6d25x10){return {where:{$or:{queue:_[_0x54f1[28]](_0x6d25x10,_0x54f1[32]),memberid:_0x6d25xf[_0x54f1[32]]}}}});default:return {}}}}function getOpenchannelQueues(_0x6d25xf,_0x6d25x24){return function(){switch(_0x6d25xf[_0x54f1[38]]){case _0x54f1[35]:return models[_0x54f1[34]][_0x54f1[33]](_0x6d25xf[_0x54f1[32]],{attributes:[_0x54f1[32]]})[_0x54f1[29]](Util[_0x54f1[104]]({},{attributes:[_0x54f1[32]],include:[{raw:true,model:models[_0x54f1[34]],attributes:[_0x54f1[32]]}]}))[_0x54f1[29]](function(_0x6d25x10){if(_0x6d25x24){return {include:{model:models[_0x54f1[101]],include:{model:models[_0x54f1[102]],include:{model:models[_0x54f1[103]],where:{id:_[_0x54f1[28]](_0x6d25x10,_0x54f1[32])}}}}}}else {var _0x6d25x25=[];_0x6d25x10[_0x54f1[26]][_0x54f1[82]](function(_0x6d25x26){_0x6d25x25= _[_0x54f1[81]](_0x6d25x25,_[_0x54f1[28]](_0x6d25x26.Users,_0x54f1[32]))});return {where:{$or:{queue:_[_0x54f1[28]](_0x6d25x10[_0x54f1[26]],_0x54f1[32]),memberid:_0x6d25x25}}}}});case _0x54f1[85]:return models[_0x54f1[34]][_0x54f1[33]](_0x6d25xf[_0x54f1[32]],{attributes:[_0x54f1[32]]})[_0x54f1[29]](function(_0x6d25x27){return _0x6d25x27[_0x54f1[105]]({attributes:[_0x54f1[32]]})})[_0x54f1[29]](function(_0x6d25x10){return {where:{$or:{queue:_[_0x54f1[28]](_0x6d25x10,_0x54f1[32]),memberid:_0x6d25xf[_0x54f1[32]]}}}});default:return {}}}}function onOpenMail(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getMailQueues(_0x6d25x7,true))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[17]][_0x54f1[43]](_[_0x54f1[110]]({where:{status:_0x54f1[107],updatedAt:{$gte:moment()[_0x54f1[109]](_0x54f1[108])}}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[106],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onClosedMail(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getMailQueues(_0x6d25x7,true))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[17]][_0x54f1[43]](_[_0x54f1[110]]({where:{status:_0x54f1[112],updatedAt:{$gte:moment()[_0x54f1[109]](_0x54f1[108])}}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[111],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onNewMail(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getMailQueues(_0x6d25x7,true))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[17]][_0x54f1[43]](_[_0x54f1[110]]({where:{status:_0x54f1[114],updatedAt:{$gte:moment()[_0x54f1[109]](_0x54f1[108])}}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[113],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onWaitingMail(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getMailQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[16]][_0x54f1[43]](_[_0x54f1[110]]({where:{leaveAt:null}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[115],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onTimeoutMail(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getMailQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[16]][_0x54f1[43]](_[_0x54f1[110]]({where:{timeout:true}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[116],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onPendingMail(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getMailQueues(_0x6d25x7,true))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[17]][_0x54f1[43]](_[_0x54f1[110]]({where:{status:_0x54f1[118],updatedAt:{$gte:moment()[_0x54f1[109]](_0x54f1[108])}}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[117],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onOpenChat(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getChatQueues(_0x6d25x7,true))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[18]][_0x54f1[43]](_[_0x54f1[110]]({where:{leaveAt:{$ne:null},complete:null,timeout:null}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[119],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onClosedChat(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getChatQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[18]][_0x54f1[43]](_[_0x54f1[110]]({where:{complete:true}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[120],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onNewChat(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getChatQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[18]][_0x54f1[43]](_[_0x54f1[110]]({where:{leaveAt:null}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[121],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onTimeoutChat(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getChatQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[18]][_0x54f1[43]](_[_0x54f1[110]]({where:{timeout:true}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[122],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onAbandonedChat(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getChatQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[18]][_0x54f1[43]](_[_0x54f1[110]]({where:{abandon:true}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[123],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onUnmanagedChat(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getChatQueues(_0x6d25x7,true))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[19]][_0x54f1[43]](_[_0x54f1[110]]({where:{status:_0x54f1[125],updatedAt:{$gte:moment()[_0x54f1[109]](_0x54f1[108])}}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[124],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onOpenFax(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getFaxQueues(_0x6d25x7,true))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[21]][_0x54f1[43]](_[_0x54f1[110]]({where:{status:_0x54f1[107],updatedAt:{$gte:moment()[_0x54f1[109]](_0x54f1[108])}}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[126],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onClosedFax(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getFaxQueues(_0x6d25x7,true))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[21]][_0x54f1[43]](_[_0x54f1[110]]({where:{status:_0x54f1[112],updatedAt:{$gte:moment()[_0x54f1[109]](_0x54f1[108])}}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[127],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onNewFax(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getFaxQueues(_0x6d25x7,true))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[21]][_0x54f1[43]](_[_0x54f1[110]]({where:{status:_0x54f1[114],updatedAt:{$gte:moment()[_0x54f1[109]](_0x54f1[108])}}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[128],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onTimeoutFax(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getFaxQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[20]][_0x54f1[43]](_[_0x54f1[110]]({where:{timeout:true}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[129],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onPendingFax(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getFaxQueues(_0x6d25x7,true))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[21]][_0x54f1[43]](_[_0x54f1[110]]({where:{status:_0x54f1[118],updatedAt:{$gte:moment()[_0x54f1[109]](_0x54f1[108])}}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[130],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onWaitingFax(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getFaxQueues(_0x6d25x7,true))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[20]][_0x54f1[43]](_[_0x54f1[110]]({where:{leaveAt:true}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[131],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onOpenSms(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getSmsQueues(_0x6d25x7,true))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[23]][_0x54f1[43]](_[_0x54f1[110]]({where:{status:_0x54f1[107],updatedAt:{$gte:moment()[_0x54f1[109]](_0x54f1[108])}}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[132],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onClosedSms(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getSmsQueues(_0x6d25x7,true))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[23]][_0x54f1[43]](_[_0x54f1[110]]({where:{status:_0x54f1[112],updatedAt:{$gte:moment()[_0x54f1[109]](_0x54f1[108])}}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[133],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onNewSms(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getSmsQueues(_0x6d25x7,true))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[23]][_0x54f1[43]](_[_0x54f1[110]]({where:{status:_0x54f1[114],updatedAt:{$gte:moment()[_0x54f1[109]](_0x54f1[108])}}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[134],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onTimeoutSms(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getSmsQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[22]][_0x54f1[43]](_[_0x54f1[110]]({where:{timeout:true}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[135],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onPendingSms(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getSmsQueues(_0x6d25x7,true))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[23]][_0x54f1[43]](_[_0x54f1[110]]({where:{status:_0x54f1[118],updatedAt:{$gte:moment()[_0x54f1[109]](_0x54f1[108])}}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[136],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onWaitingSms(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getSmsQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[22]][_0x54f1[43]](_[_0x54f1[110]]({where:{leaveAt:null}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[136],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onOpenOpenchannel(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getOpenchannelQueues(_0x6d25x7,true))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[25]][_0x54f1[43]](_[_0x54f1[110]]({where:{status:_0x54f1[107],updatedAt:{$gte:moment()[_0x54f1[109]](_0x54f1[108])}}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[137],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onClosedOpenchannel(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getOpenchannelQueues(_0x6d25x7,true))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[25]][_0x54f1[43]](_[_0x54f1[110]]({where:{status:_0x54f1[112],updatedAt:{$gte:moment()[_0x54f1[109]](_0x54f1[108])}}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[138],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onNewOpenchannel(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getOpenchannelQueues(_0x6d25x7,true))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[25]][_0x54f1[43]](_[_0x54f1[110]]({where:{status:_0x54f1[114],updatedAt:{$gte:moment()[_0x54f1[109]](_0x54f1[108])}}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[139],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onTimeoutOpenchannel(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getOpenchannelQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[24]][_0x54f1[43]](_[_0x54f1[110]]({where:{timeout:true}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[140],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onPendingOpenchannel(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getOpenchannelQueues(_0x6d25x7,true))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[25]][_0x54f1[43]](_[_0x54f1[110]]({where:{status:_0x54f1[118],updatedAt:{$gte:moment()[_0x54f1[109]](_0x54f1[108])}}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[141],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})}function onWaitingOpenchannel(_0x6d25x7,_0x6d25x8){return Promise[_0x54f1[44]]([])[_0x54f1[29]](getOpenchannelQueues(_0x6d25x7))[_0x54f1[29]](function(_0x6d25x2d){return models[_0x54f1[24]][_0x54f1[43]](_[_0x54f1[110]]({where:{leaveAt:null}},_0x6d25x2d))})[_0x54f1[29]](function(_0x6d25x14){_0x6d25x7[_0x54f1[42]](_0x54f1[141],{value:_0x6d25x14})})[_0x54f1[40]](function(_0x6d25x13){console[_0x54f1[39]](_0x6d25x13)})} \ No newline at end of file +/** + * 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); + }); +} diff --git a/server/config/tools/faxAccount.js b/server/config/tools/faxAccount.js index b7cc5b2..ccc342d 100644 --- a/server/config/tools/faxAccount.js +++ b/server/config/tools/faxAccount.js @@ -1 +1,257 @@ -var _0x42d6=["\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"];_0x42d6[0];var util=require(_0x42d6[1]);var VoiceExtension=require(_0x42d6[3])[_0x42d6[2]];var FaxAccountModel=require(_0x42d6[3])[_0x42d6[4]];var sequelize=require(_0x42d6[3])[_0x42d6[5]];var veUtil=require(_0x42d6[6]);var Promise=require(_0x42d6[7]);function FaxAccount(){FaxAccountModel[_0x42d6[18]](function(_0x6909x8,_0x6909x9){var _0x6909xa=util[_0x42d6[10]](_0x42d6[8],_0x6909x8[_0x42d6[9]]);var _0x6909xb=_0x6909x8[_0x42d6[11]];var _0x6909xc=util[_0x42d6[10]](_0x42d6[12],_0x6909x8[_0x42d6[13]]);var _0x6909xd=generateExtensionArray(_0x6909x8);var _0x6909xe;return VoiceExtension[_0x42d6[17]](_0x6909xd,{transaction:_0x6909x9[_0x42d6[14]]})[_0x42d6[16]](function(_0x6909xf){_0x6909xe= _0x6909xf;return _0x6909xf})[_0x42d6[16]](veUtil[_0x42d6[15]](_0x6909xd.Applications,_0x6909x9[_0x42d6[14]]))});FaxAccountModel[_0x42d6[21]](function(_0x6909x8,_0x6909x9){var _0x6909xa=util[_0x42d6[10]](_0x42d6[8],_0x6909x8[_0x42d6[9]]);var _0x6909xb=_0x6909x8[_0x42d6[11]];var _0x6909xc=util[_0x42d6[10]](_0x42d6[12],_0x6909x8[_0x42d6[13]]);return VoiceExtension[_0x42d6[20]]({where:{FaxAccountId:_0x6909x8[_0x42d6[11]]}})[_0x42d6[16]](function(_0x6909x10){if(!_0x6909x10){return};var _0x6909x11={params:{id:_0x6909x10[_0x42d6[11]]},body:generateExtensionArray(_0x6909x8)};return veUtil[_0x42d6[19]](_0x6909x11,_0x6909x9[_0x42d6[14]])})});FaxAccountModel[_0x42d6[22]](function(_0x6909x8,_0x6909x9){return deleteVoiceExtensions(_0x6909x8,_0x6909x9)})}function generateExtensionArray(_0x6909x8){var _0x6909xa=util[_0x42d6[10]](_0x42d6[8],_0x6909x8[_0x42d6[9]]);var _0x6909xb=_0x6909x8[_0x42d6[11]];var _0x6909xc=util[_0x42d6[10]](_0x42d6[12],_0x6909x8[_0x42d6[13]]);return {"\x61\x70\x70\x64\x61\x74\x61":_0x42d6[23],"\x63\x6F\x6E\x74\x65\x78\x74":_0x42d6[24],"\x65\x78\x74\x65\x6E":_0x6909xa,"\x70\x72\x69\x6F\x72\x69\x74\x79":_0x42d6[25],"\x74\x61\x67":_0x42d6[26],"\x61\x70\x70":_0x42d6[27],"\x74\x79\x70\x65":_0x42d6[28],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x6909xc,"\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":_0x6909xb,"\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73":[{"\x61\x70\x70\x64\x61\x74\x61":[_0x42d6[29]],"\x61\x70\x70":_0x42d6[27],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x42d6[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":_0x42d6[28],"\x61\x70\x70\x54\x79\x70\x65":_0x42d6[31]},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0x42d6[10]](_0x42d6[32],_0x6909x8[_0x42d6[13]])],"\x61\x70\x70":_0x42d6[27],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x42d6[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":_0x42d6[28],"\x61\x70\x70\x54\x79\x70\x65":_0x42d6[31]},{"\x61\x70\x70\x64\x61\x74\x61":[_0x42d6[33]],"\x61\x70\x70":_0x42d6[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x42d6[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":_0x42d6[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[_0x42d6[35]],"\x61\x70\x70":_0x42d6[36],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x42d6[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":_0x42d6[28],"\x61\x70\x70\x54\x79\x70\x65":_0x42d6[31]},{"\x61\x70\x70\x64\x61\x74\x61":[_0x42d6[37]],"\x61\x70\x70":_0x42d6[38],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x42d6[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":_0x42d6[28],"\x61\x70\x70\x54\x79\x70\x65":_0x42d6[31]},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0x42d6[10]](_0x42d6[39],_0x6909x8[_0x42d6[40]])],"\x61\x70\x70":_0x42d6[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x42d6[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":_0x42d6[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0x42d6[10]](_0x42d6[41],_0x6909x8[_0x42d6[42]])],"\x61\x70\x70":_0x42d6[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x42d6[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":_0x42d6[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0x42d6[10]](_0x42d6[43],_0x6909x8[_0x42d6[9]])],"\x61\x70\x70":_0x42d6[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x42d6[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":_0x42d6[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0x42d6[10]](_0x42d6[44],_0x6909x8[_0x42d6[45]])],"\x61\x70\x70":_0x42d6[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x42d6[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":_0x42d6[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0x42d6[10]](_0x42d6[46],_0x6909x8[_0x42d6[47]])],"\x61\x70\x70":_0x42d6[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x42d6[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":_0x42d6[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0x42d6[10]](_0x42d6[48],_0x6909x8[_0x42d6[49]])],"\x61\x70\x70":_0x42d6[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x42d6[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":_0x42d6[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0x42d6[10]](_0x42d6[50],_0x6909x8[_0x42d6[51]])],"\x61\x70\x70":_0x42d6[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x42d6[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":_0x42d6[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0x42d6[10]](_0x42d6[52],_0x6909x8[_0x42d6[53]])],"\x61\x70\x70":_0x42d6[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x42d6[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":_0x42d6[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0x42d6[10]](_0x42d6[54],_0x6909x8[_0x42d6[55]])],"\x61\x70\x70":_0x42d6[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x42d6[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":_0x42d6[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[_0x42d6[56]],"\x61\x70\x70":_0x42d6[57],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x42d6[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":_0x42d6[28],"\x61\x70\x70\x54\x79\x70\x65":_0x42d6[31]},{"\x61\x70\x70\x64\x61\x74\x61":[_0x42d6[35]],"\x61\x70\x70":_0x42d6[58],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0x42d6[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":_0x42d6[28],"\x61\x70\x70\x54\x79\x70\x65":null}]}}function deleteVoiceExtensions(_0x6909x8,_0x6909x9){return VoiceExtension[_0x42d6[59]]({where:{FaxAccountId:_0x6909x8[_0x42d6[11]]},transaction:_0x6909x9[_0x42d6[14]]})}module[_0x42d6[60]]= FaxAccount \ No newline at end of file +'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; diff --git a/server/config/tools/faxRoom.js b/server/config/tools/faxRoom.js index 93bc705..3c52a65 100644 --- a/server/config/tools/faxRoom.js +++ b/server/config/tools/faxRoom.js @@ -1 +1,35 @@ -var _0x1add=["\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"];_0x1add[0];const _=require(_0x1add[1]);const moment=require(_0x1add[2]);const Room=require(_0x1add[4])[_0x1add[3]];const Status=require(_0x1add[4])[_0x1add[5]];function FaxRoom(){Room[_0x1add[12]](function(_0xd3c0x6,_0xd3c0x7){return Status[_0x1add[11]]({status:_0xd3c0x6[_0x1add[6]],data1:_0xd3c0x7[_0x1add[7]]?_0xd3c0x7[_0x1add[7]][_0x1add[8]]:null,data2:_0xd3c0x7[_0x1add[7]]?_0xd3c0x7[_0x1add[7]][_0x1add[9]]:null,FaxRoomId:_0xd3c0x6[_0x1add[10]],UserId:_0xd3c0x7[_0x1add[7]]?_0xd3c0x7[_0x1add[7]][_0x1add[10]]:null})});Room[_0x1add[15]](function(_0xd3c0x6,_0xd3c0x7){if(_0xd3c0x6[_0x1add[13]](_0x1add[6])|| _0xd3c0x6[_0x1add[13]](_0x1add[14])){return Status[_0x1add[11]]({status:_0xd3c0x6[_0x1add[6]],data1:_0xd3c0x7[_0x1add[7]]?_0xd3c0x7[_0x1add[7]][_0x1add[8]]:null,data2:_0xd3c0x7[_0x1add[7]]?_0xd3c0x7[_0x1add[7]][_0x1add[9]]:null,FaxRoomId:_0xd3c0x6[_0x1add[10]],UserId:_0xd3c0x7[_0x1add[7]]?_0xd3c0x7[_0x1add[7]][_0x1add[10]]:null})}})}module[_0x1add[16]]= FaxRoom \ No newline at end of file +'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; diff --git a/server/config/tools/index.js b/server/config/tools/index.js index ec4027a..f9c1659 100644 --- a/server/config/tools/index.js +++ b/server/config/tools/index.js @@ -1 +1,26 @@ -var _0xa478=["\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"];_0xa478[0];var Interval=require(_0xa478[1]);var User=require(_0xa478[2]);var ChanSpy=require(_0xa478[3]);var MailRoom=require(_0xa478[4]);var MailAccount=require(_0xa478[5]);var ChatRoom=require(_0xa478[6]);var FaxRoom=require(_0xa478[7]);var SmsRoom=require(_0xa478[8]);var OpenchannelRoom=require(_0xa478[9]);var FaxAccount=require(_0xa478[10]);module[_0xa478[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 +'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(); +} diff --git a/server/config/tools/interval.js b/server/config/tools/interval.js index 8548561..223b7bf 100644 --- a/server/config/tools/interval.js +++ b/server/config/tools/interval.js @@ -1 +1,74 @@ -var _0xee90=["\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"];_0xee90[0];var _=require(_0xee90[1]);var util=require(_0xee90[2]);var IntervalModel=require(_0xee90[4])[_0xee90[3]];var VoiceExtension=require(_0xee90[4])[_0xee90[5]];var veUtil=require(_0xee90[6]);var sequelize=require(_0xee90[4])[_0xee90[7]];var Applications=veUtil[_0xee90[8]];function Interval(){console[_0xee90[10]](_0xee90[9]);IntervalModel[_0xee90[11]](function(_0x5de2x9){updatevoiceExtension(_0x5de2x9)});IntervalModel[_0xee90[13]](function(_0x5de2x9){if(_0x5de2x9[_0xee90[12]]!== null){updatevoiceExtension(_0x5de2x9)}});IntervalModel[_0xee90[14]](function(_0x5de2x9){if(_0x5de2x9[_0xee90[12]]!== null){updatevoiceExtension(_0x5de2x9)}})}function updatevoiceExtension(_0x5de2x9){var _0x5de2xb=_0x5de2x9[_0xee90[12]]=== null?_0x5de2x9[_0xee90[15]]:_0x5de2x9[_0xee90[12]];return VoiceExtension[_0xee90[33]]({where:{VoiceExtensionId:null},include:[{model:VoiceExtension,as:_0xee90[8],where:{IntervalId:_0x5de2xb},attributes:[_0xee90[28],_0xee90[29],_0xee90[12],_0xee90[30],_0xee90[31],_0xee90[32]]}]})[_0xee90[27]](function(_0x5de2xd){_0x5de2xd[_0xee90[26]](function(_0x5de2xe){return sequelize[_0xee90[25]](function(_0x5de2xf){return veUtil[_0xee90[24]]({body:_0x5de2xe[_0xee90[23]],params:{id:_0x5de2xe[_0xee90[15]]}},_0x5de2xf)})[_0xee90[16]](sequelize.UniqueConstraintError,function(_0x5de2xc){if(_0x5de2xc[_0xee90[18]][_0xee90[17]]){_0x5de2xc[_0xee90[19]]= _0xee90[20];_0x5de2xc[_0xee90[21]]= _0xee90[22]};console[_0xee90[10]](_0x5de2xc)})[_0xee90[16]](function(_0x5de2xc){console[_0xee90[10]](_0x5de2xc)})})})[_0xee90[16]](function(_0x5de2xc){console[_0xee90[10]](_0x5de2xc)})}module[_0xee90[34]]= Interval \ No newline at end of file +'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; diff --git a/server/config/tools/mailAccount.js b/server/config/tools/mailAccount.js index 1c777b4..e2da0c5 100644 --- a/server/config/tools/mailAccount.js +++ b/server/config/tools/mailAccount.js @@ -1 +1,40 @@ -var _0x4fe4=["\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"];_0x4fe4[0];const _=require(_0x4fe4[1]);const moment=require(_0x4fe4[2]);const Account=require(_0x4fe4[4])[_0x4fe4[3]];function MailAccount(){Account[_0x4fe4[8]](function(_0xb90bx5,_0xb90bx6){if(_0xb90bx5[_0x4fe4[5]]){return Account[_0x4fe4[7]]({service:false},{where:{id:{$ne:_0xb90bx5[_0x4fe4[6]]}}})}});Account[_0x4fe4[10]](function(_0xb90bx5,_0xb90bx6){if(_0xb90bx5[_0x4fe4[9]](_0x4fe4[5])&& _0xb90bx5[_0x4fe4[5]]){return Account[_0x4fe4[7]]({service:false},{where:{id:{$ne:_0xb90bx5[_0x4fe4[6]]}}})}})}module[_0x4fe4[11]]= MailAccount \ No newline at end of file +'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; diff --git a/server/config/tools/mailRoom.js b/server/config/tools/mailRoom.js index 559e712..697cbbb 100644 --- a/server/config/tools/mailRoom.js +++ b/server/config/tools/mailRoom.js @@ -1 +1,35 @@ -var _0xcce1=["\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"];_0xcce1[0];const _=require(_0xcce1[1]);const moment=require(_0xcce1[2]);const Room=require(_0xcce1[4])[_0xcce1[3]];const Status=require(_0xcce1[4])[_0xcce1[5]];function MailRoom(){Room[_0xcce1[12]](function(_0x6cd0x6,_0x6cd0x7){return Status[_0xcce1[11]]({status:_0x6cd0x6[_0xcce1[6]],data1:_0x6cd0x7[_0xcce1[7]]?_0x6cd0x7[_0xcce1[7]][_0xcce1[8]]:null,data2:_0x6cd0x7[_0xcce1[7]]?_0x6cd0x7[_0xcce1[7]][_0xcce1[9]]:null,MailRoomId:_0x6cd0x6[_0xcce1[10]],UserId:_0x6cd0x7[_0xcce1[7]]?_0x6cd0x7[_0xcce1[7]][_0xcce1[10]]:null})});Room[_0xcce1[15]](function(_0x6cd0x6,_0x6cd0x7){if(_0x6cd0x6[_0xcce1[13]](_0xcce1[6])|| _0x6cd0x6[_0xcce1[13]](_0xcce1[14])){return Status[_0xcce1[11]]({status:_0x6cd0x6[_0xcce1[6]],data1:_0x6cd0x7[_0xcce1[7]]?_0x6cd0x7[_0xcce1[7]][_0xcce1[8]]:null,data2:_0x6cd0x7[_0xcce1[7]]?_0x6cd0x7[_0xcce1[7]][_0xcce1[9]]:null,MailRoomId:_0x6cd0x6[_0xcce1[10]],UserId:_0x6cd0x7[_0xcce1[7]]?_0x6cd0x7[_0xcce1[7]][_0xcce1[10]]:null})}})}module[_0xcce1[16]]= MailRoom \ No newline at end of file +'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; diff --git a/server/config/tools/openchannelRoom.js b/server/config/tools/openchannelRoom.js index b9e2c35..6cd41af 100644 --- a/server/config/tools/openchannelRoom.js +++ b/server/config/tools/openchannelRoom.js @@ -1 +1,26 @@ -var _0x3380=["\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"];_0x3380[0];const _=require(_0x3380[1]);const moment=require(_0x3380[2]);const Room=require(_0x3380[4])[_0x3380[3]];const Status=require(_0x3380[4])[_0x3380[5]];function OpenchannelRoom(){Room[_0x3380[6]](function(_0x77a9x6,_0x77a9x7){});Room[_0x3380[15]](function(_0x77a9x6,_0x77a9x7){if(_0x77a9x6[_0x3380[8]](_0x3380[7])|| _0x77a9x6[_0x3380[8]](_0x3380[9])){return Status[_0x3380[14]]({status:_0x77a9x6[_0x3380[7]],data1:_0x77a9x7[_0x3380[10]]?_0x77a9x7[_0x3380[10]][_0x3380[11]]:null,data2:_0x77a9x7[_0x3380[10]]?_0x77a9x7[_0x3380[10]][_0x3380[12]]:null,OpenchannelRoomId:_0x77a9x6[_0x3380[13]],UserId:_0x77a9x7[_0x3380[10]]?_0x77a9x7[_0x3380[10]][_0x3380[13]]:null})}})}module[_0x3380[16]]= OpenchannelRoom \ No newline at end of file +'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; diff --git a/server/config/tools/queueParameters.js b/server/config/tools/queueParameters.js index f4e944e..81ea345 100644 --- a/server/config/tools/queueParameters.js +++ b/server/config/tools/queueParameters.js @@ -1 +1,384 @@ -var _0x6a16=["\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"];_0x6a16[0];var sequelize=require(_0x6a16[2])[_0x6a16[1]];var models=require(_0x6a16[2]);var Util=require(_0x6a16[3]);var Promise=require(_0x6a16[4]);var _=require(_0x6a16[5]);var util=require(_0x6a16[6]);exports[_0x6a16[7]]= function(_0xc544x7){models[_0x6a16[9]][_0x6a16[8]](function(_0xc544x8){onWaiting(_0xc544x7,_0xc544x8)});models[_0x6a16[9]][_0x6a16[12]](function(_0xc544x8){if(_0xc544x8[_0x6a16[11]](_0x6a16[10])){onWaiting(_0xc544x7,_0xc544x8);onActive(_0xc544x7,_0xc544x8)}});models[_0x6a16[9]][_0x6a16[12]](function(_0xc544x8){if(_0xc544x8[_0x6a16[11]](_0x6a16[13])|| _0xc544x8[_0x6a16[11]](_0x6a16[14])){onAbandon(_0xc544x7,_0xc544x8);onComplete(_0xc544x7,_0xc544x8);onActive(_0xc544x7,_0xc544x8);onAvgAnswerTime(_0xc544x7,_0xc544x8);onAvgTalkTime(_0xc544x7,_0xc544x8);onTotalOffered(_0xc544x7,_0xc544x8);onUnmanaged(_0xc544x7,_0xc544x8)}})};function getQueues(_0xc544xa,_0xc544xb){return function(){switch(_0xc544xb){case _0x6a16[20]:return models[_0x6a16[19]][_0x6a16[18]](_0xc544xa,{attributes:[_0x6a16[17]]})[_0x6a16[16]](Util[_0x6a16[15]]());default:return models[_0x6a16[22]][_0x6a16[21]]()[_0x6a16[16]](function(_0xc544xc){return {rows:_0xc544xc}})}}}function onWaiting(_0xc544x7,_0xc544x8){return Promise[_0x6a16[40]]([])[_0x6a16[16]](getQueues(_0xc544x7[_0x6a16[38]],_0xc544x7[_0x6a16[39]]))[_0x6a16[16]](function(_0xc544x11){if(_0xc544x11[_0x6a16[31]][_0x6a16[26]]){return models[_0x6a16[9]][_0x6a16[21]]({where:{queuecallerleaveAt:null,queue:_[_0x6a16[32]](_0xc544x11[_0x6a16[31]],{name:_0xc544x8[_0x6a16[28]]})?_0xc544x8[_0x6a16[28]]:[]},group:_0x6a16[28],attributes:[[_0x6a16[28],_0x6a16[33]],[sequelize[_0x6a16[36]](_0x6a16[34],sequelize[_0x6a16[35]](_0x6a16[17])),_0x6a16[37]]]})};return null})[_0x6a16[16]](function(_0xc544xf){if(_0xc544xf){var _0xc544x10;if(_0xc544xf[_0x6a16[26]]){_0xc544x10= _0xc544xf[0][_0x6a16[27]]}else {_0xc544x10= {name:_0xc544x8[_0x6a16[28]],waiting:0}};_0xc544x7[_0x6a16[30]](_0x6a16[29],_0xc544x10)}})[_0x6a16[25]](function(_0xc544xe){console[_0x6a16[24]](_0x6a16[23],_0xc544xe)})}function onActive(_0xc544x7,_0xc544x8){return Promise[_0x6a16[40]]([])[_0x6a16[16]](getQueues(_0xc544x7[_0x6a16[38]],_0xc544x7[_0x6a16[39]]))[_0x6a16[16]](function(_0xc544x11){if(_0xc544x11[_0x6a16[31]][_0x6a16[26]]){return models[_0x6a16[9]][_0x6a16[21]]({where:{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null},queue:_[_0x6a16[32]](_0xc544x11[_0x6a16[31]],{name:_0xc544x8[_0x6a16[28]]})?_0xc544x8[_0x6a16[28]]:[]},group:_0x6a16[28],attributes:[[_0x6a16[28],_0x6a16[33]],[sequelize[_0x6a16[36]](_0x6a16[34],sequelize[_0x6a16[35]](_0x6a16[17])),_0x6a16[42]]]})};return null})[_0x6a16[16]](function(_0xc544x13){if(_0xc544x13){var _0xc544x10;if(_0xc544x13[_0x6a16[26]]){_0xc544x10= _0xc544x13[0][_0x6a16[27]]}else {_0xc544x10= {name:_0xc544x8[_0x6a16[28]],active:0}};_0xc544x7[_0x6a16[30]](_0x6a16[29],_0xc544x10)}})[_0x6a16[25]](function(_0xc544xe){console[_0x6a16[24]](_0x6a16[41],_0xc544xe)})}function onAbandon(_0xc544x7,_0xc544x8){return Promise[_0x6a16[40]]([])[_0x6a16[16]](getQueues(_0xc544x7[_0x6a16[38]],_0xc544x7[_0x6a16[39]]))[_0x6a16[16]](function(_0xc544x11){if(_0xc544x11[_0x6a16[31]][_0x6a16[26]]){return models[_0x6a16[9]][_0x6a16[21]]({where:{queuecallerabandon:true,queue:_[_0x6a16[32]](_0xc544x11[_0x6a16[31]],{name:_0xc544x8[_0x6a16[28]]})?_0xc544x8[_0x6a16[28]]:[]},group:_0x6a16[28],attributes:[[_0x6a16[28],_0x6a16[33]],[sequelize[_0x6a16[36]](_0x6a16[34],sequelize[_0x6a16[35]](_0x6a16[17])),_0x6a16[44]]]})};return null})[_0x6a16[16]](function(_0xc544x15){if(_0xc544x15){var _0xc544x10;if(_0xc544x15[_0x6a16[26]]){_0xc544x10= _0xc544x15[0][_0x6a16[27]]}else {_0xc544x10= {name:_0xc544x8[_0x6a16[28]],abandoned:0}};_0xc544x7[_0x6a16[30]](_0x6a16[29],_0xc544x10)}})[_0x6a16[25]](function(_0xc544xe){console[_0x6a16[24]](_0x6a16[43],_0xc544xe)})}function onComplete(_0xc544x7,_0xc544x8){return Promise[_0x6a16[40]]([])[_0x6a16[16]](getQueues(_0xc544x7[_0x6a16[38]],_0xc544x7[_0x6a16[39]]))[_0x6a16[16]](function(_0xc544x11){if(_0xc544x11[_0x6a16[31]][_0x6a16[26]]){return models[_0x6a16[9]][_0x6a16[21]]({where:{queuecallercomplete:true,queue:_[_0x6a16[32]](_0xc544x11[_0x6a16[31]],{name:_0xc544x8[_0x6a16[28]]})?_0xc544x8[_0x6a16[28]]:[]},group:_0x6a16[28],attributes:[[_0x6a16[28],_0x6a16[33]],[sequelize[_0x6a16[36]](_0x6a16[34],sequelize[_0x6a16[35]](_0x6a16[17])),_0x6a16[46]]]})};return null})[_0x6a16[16]](function(_0xc544x17){if(_0xc544x17){var _0xc544x10;if(_0xc544x17[_0x6a16[26]]){_0xc544x10= _0xc544x17[0][_0x6a16[27]]}else {_0xc544x10= {name:_0xc544x8[_0x6a16[28]],answered:0}};_0xc544x7[_0x6a16[30]](_0x6a16[29],_0xc544x10)}})[_0x6a16[25]](function(_0xc544xe){console[_0x6a16[24]](_0x6a16[45],_0xc544xe)})}function onAvgAnswerTime(_0xc544x7,_0xc544x8){return Promise[_0x6a16[40]]([])[_0x6a16[16]](getQueues(_0xc544x7[_0x6a16[38]],_0xc544x7[_0x6a16[39]]))[_0x6a16[16]](function(_0xc544x11){if(_0xc544x11[_0x6a16[31]][_0x6a16[26]]){var _0xc544x1a=_[_0x6a16[32]](_0xc544x11[_0x6a16[31]],{name:_0xc544x8[_0x6a16[28]]})?_0xc544x8[_0x6a16[28]]:_0x6a16[49];var _0xc544x1b=util[_0x6a16[51]](_0x6a16[50],_0xc544x1a);return sequelize[_0x6a16[54]](_0xc544x1b,{type:sequelize[_0x6a16[53]][_0x6a16[52]]})};return null})[_0x6a16[16]](function(_0xc544x19){if(_0xc544x19){var _0xc544x10;if(_0xc544x19[_0x6a16[26]]){_0xc544x10= _0xc544x19[0]}else {_0xc544x10= {name:_0xc544x8[_0x6a16[28]],holdtime:_0x6a16[48]}};_0xc544x7[_0x6a16[30]](_0x6a16[29],_0xc544x10)}})[_0x6a16[25]](function(_0xc544xe){console[_0x6a16[24]](_0x6a16[47],_0xc544xe)})}function onAvgTalkTime(_0xc544x7,_0xc544x8){return Promise[_0x6a16[40]]([])[_0x6a16[16]](getQueues(_0xc544x7[_0x6a16[38]],_0xc544x7[_0x6a16[39]]))[_0x6a16[16]](function(_0xc544x11){if(_0xc544x11[_0x6a16[31]][_0x6a16[26]]){var _0xc544x1a=_[_0x6a16[32]](_0xc544x11[_0x6a16[31]],{name:_0xc544x8[_0x6a16[28]]})?_0xc544x8[_0x6a16[28]]:_0x6a16[49];return sequelize[_0x6a16[54]](util[_0x6a16[51]](_0x6a16[56],_0xc544x1a),{type:sequelize[_0x6a16[53]][_0x6a16[52]]})};return null})[_0x6a16[16]](function(_0xc544x1d){if(_0xc544x1d){var _0xc544x10;if(_0xc544x1d[_0x6a16[26]]){_0xc544x10= _0xc544x1d[0]}else {_0xc544x10= {name:_0xc544x8[_0x6a16[28]],talktime:_0x6a16[48]}};_0xc544x7[_0x6a16[30]](_0x6a16[29],_0xc544x10)}})[_0x6a16[25]](function(_0xc544xe){console[_0x6a16[24]](_0x6a16[55],_0xc544xe)})}function onTotalOffered(_0xc544x7,_0xc544x8){return Promise[_0x6a16[40]]([])[_0x6a16[16]](getQueues(_0xc544x7[_0x6a16[38]],_0xc544x7[_0x6a16[39]]))[_0x6a16[16]](function(_0xc544x11){if(_0xc544x11[_0x6a16[31]][_0x6a16[26]]){var _0xc544x1a=_[_0x6a16[32]](_0xc544x11[_0x6a16[31]],{name:_0xc544x8[_0x6a16[28]]})?_0xc544x8[_0x6a16[28]]:_0x6a16[49];return sequelize[_0x6a16[54]](util[_0x6a16[51]](_0x6a16[58],_0xc544x1a),{type:sequelize[_0x6a16[53]][_0x6a16[52]]})};return null})[_0x6a16[16]](function(_0xc544x1f){if(_0xc544x1f){var _0xc544x10;if(_0xc544x1f[_0x6a16[26]]){_0xc544x10= _0xc544x1f[0]}else {_0xc544x10= {name:_0xc544x8[_0x6a16[28]],totalcalls:0}};_0xc544x7[_0x6a16[30]](_0x6a16[29],_0xc544x10)}})[_0x6a16[25]](function(_0xc544xe){console[_0x6a16[24]](_0x6a16[57],_0xc544xe)})}function onUnmanaged(_0xc544x7,_0xc544x8){return Promise[_0x6a16[40]]([])[_0x6a16[16]](getQueues(_0xc544x7[_0x6a16[38]],_0xc544x7[_0x6a16[39]]))[_0x6a16[16]](function(_0xc544x11){if(_0xc544x11[_0x6a16[31]][_0x6a16[26]]){return models[_0x6a16[9]][_0x6a16[21]]({where:{queuecallerexit:true,queue:_[_0x6a16[32]](_0xc544x11[_0x6a16[31]],{name:_0xc544x8[_0x6a16[28]]})?_0xc544x8[_0x6a16[28]]:[]},group:_0x6a16[28],attributes:[[_0x6a16[28],_0x6a16[33]],[sequelize[_0x6a16[36]](_0x6a16[34],sequelize[_0x6a16[35]](_0x6a16[17])),_0x6a16[60]]]})};return null})[_0x6a16[16]](function(_0xc544x21){if(_0xc544x21){var _0xc544x10;if(_0xc544x21[_0x6a16[26]]){_0xc544x10= _0xc544x21[0][_0x6a16[27]]}else {_0xc544x10= {name:_0xc544x8[_0x6a16[28]],_parameters:0}};_0xc544x7[_0x6a16[30]](_0x6a16[29],_0xc544x10)}})[_0x6a16[25]](function(_0xc544xe){console[_0x6a16[24]](_0x6a16[59],_0xc544xe)})} \ No newline at end of file +/** + * 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); + }); +} diff --git a/server/config/tools/smsRoom.js b/server/config/tools/smsRoom.js index 5d6fccf..632af77 100644 --- a/server/config/tools/smsRoom.js +++ b/server/config/tools/smsRoom.js @@ -1 +1,26 @@ -var _0x9f47=["\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"];_0x9f47[0];const _=require(_0x9f47[1]);const moment=require(_0x9f47[2]);const Room=require(_0x9f47[4])[_0x9f47[3]];const Status=require(_0x9f47[4])[_0x9f47[5]];function SmsRoom(){Room[_0x9f47[6]](function(_0x3e4ax6,_0x3e4ax7){});Room[_0x9f47[15]](function(_0x3e4ax6,_0x3e4ax7){if(_0x3e4ax6[_0x9f47[8]](_0x9f47[7])|| _0x3e4ax6[_0x9f47[8]](_0x9f47[9])){return Status[_0x9f47[14]]({status:_0x3e4ax6[_0x9f47[7]],data1:_0x3e4ax7[_0x9f47[10]]?_0x3e4ax7[_0x9f47[10]][_0x9f47[11]]:null,data2:_0x3e4ax7[_0x9f47[10]]?_0x3e4ax7[_0x9f47[10]][_0x9f47[12]]:null,SmsRoomId:_0x3e4ax6[_0x9f47[13]],UserId:_0x3e4ax7[_0x9f47[10]]?_0x3e4ax7[_0x9f47[10]][_0x9f47[13]]:null})}})}module[_0x9f47[16]]= SmsRoom \ No newline at end of file +'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; diff --git a/server/config/tools/system.js b/server/config/tools/system.js index 5e50883..ee4b3d3 100644 --- a/server/config/tools/system.js +++ b/server/config/tools/system.js @@ -1 +1,60 @@ -var _0xca46=["\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"];_0xca46[0];var Promise=require(_0xca46[1]),_=require(_0xca46[2]),pidStat=Promise[_0xca46[5]](require(_0xca46[4])[_0xca46[3]]),os=require(_0xca46[6]),df=Promise[_0xca46[5]](require(_0xca46[7]));exports[_0xca46[8]]= function(){return function(){var _0x3d81x6={};return pidStat(process[_0xca46[27]])[_0xca46[16]](function(_0x3d81x9){_0x3d81x6[_0xca46[17]]= {motion:_0x3d81x9[_0xca46[17]]};var _0x3d81xa=_0x3d81x9[_0xca46[18]]/ 1024;_0x3d81x6[_0xca46[18]]= {Total:os[_0xca46[19]]()/ 1024,details:{}};_0x3d81x6[_0xca46[18]][_0xca46[21]][_0xca46[20]]= os[_0xca46[22]]()/ 1024;_0x3d81x6[_0xca46[18]][_0xca46[21]][_0xca46[23]]= _0x3d81x6[_0xca46[18]][_0xca46[24]]- _0x3d81xa- _0x3d81x6[_0xca46[18]][_0xca46[21]][_0xca46[20]];_0x3d81x6[_0xca46[18]][_0xca46[21]][_0xca46[25]]= _0x3d81xa;_0x3d81x6[_0xca46[17]][_0xca46[26]]= oscpu();return df()})[_0xca46[16]](function(_0x3d81x7){_0x3d81x6[_0xca46[9]]= [];_[_0xca46[15]](_0x3d81x7,function(_0x3d81x8){_0x3d81x6[_0xca46[9]][_0xca46[14]]({mount:_0x3d81x8[_0xca46[10]],size:_0x3d81x8[_0xca46[11]],details:{Used:_0x3d81x8[_0xca46[12]],Available:_0x3d81x8[_0xca46[13]]}})});return _0x3d81x6})}};function oscpu(){var _0x3d81xc=os[_0xca46[28]]();var _0x3d81xd=[],_0x3d81xe,_0x3d81xf;_[_0xca46[15]](_0x3d81xc,function(_0x3d81x10){_0x3d81xe= {};_0x3d81xf= _[_0xca46[31]](_[_0xca46[30]](_0x3d81x10[_0xca46[29]]));_[_0xca46[33]](_0x3d81x10[_0xca46[29]],function(_0x3d81x11,_0x3d81x12){_0x3d81xe[_0x3d81x12]= Math[_0xca46[32]](100* _0x3d81x11/ _0x3d81xf)});_0x3d81xd[_0xca46[14]](_0x3d81xe)});return _0x3d81xd} \ No newline at end of file +'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; +} diff --git a/server/config/tools/user.js b/server/config/tools/user.js index a2c7cc8..50b0908 100644 --- a/server/config/tools/user.js +++ b/server/config/tools/user.js @@ -1 +1,219 @@ -var _0x1c93=["\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"];_0x1c93[0];var fs=require(_0x1c93[1]);var util=require(_0x1c93[2]);var path=require(_0x1c93[3]);var config=require(_0x1c93[4]);var UserModel=require(_0x1c93[6])[_0x1c93[5]];var VoiceExtension=require(_0x1c93[6])[_0x1c93[7]];var ChanSpy=require(_0x1c93[6])[_0x1c93[8]];var sequelize=require(_0x1c93[6])[_0x1c93[9]];var Promise=require(_0x1c93[10]);function User(){UserModel[_0x1c93[16]](function(_0x4865xb,_0x4865xc){delete _0x4865xb[_0x1c93[12]][_0x1c93[11]];return Promise[_0x1c93[15]]([])[_0x1c93[14]](createCallerID(_0x4865xb,_0x4865xc))[_0x1c93[14]](createExtension(_0x4865xb,_0x4865xc))[_0x1c93[14]](function(){if(_0x4865xb[_0x1c93[13]]){createChanspy(_0x4865xb,_0x4865xc)}})});UserModel[_0x1c93[19]](function(_0x4865xb,_0x4865xc){if(_0x4865xb[_0x1c93[17]](_0x1c93[11])){throw new sequelize.Error(_0x1c93[18])}});UserModel[_0x1c93[26]](function(_0x4865xb,_0x4865xc){if(!_0x4865xb[_0x1c93[17]](_0x1c93[20])&& !_0x4865xb[_0x1c93[17]](_0x1c93[21])&& !_0x4865xb[_0x1c93[17]](_0x1c93[22])&& !_0x4865xb[_0x1c93[17]](_0x1c93[23])&& !_0x4865xb[_0x1c93[17]](_0x1c93[24])){return Promise[_0x1c93[15]]([])[_0x1c93[14]](createCallerID(_0x4865xb,_0x4865xc))[_0x1c93[14]](function(){if((_0x4865xb[_0x1c93[13]]&& _0x4865xb[_0x1c93[17]](_0x1c93[13]))){return createChanspy(_0x4865xb,_0x4865xc)}})[_0x1c93[14]](function(){if(_0x4865xb[_0x1c93[13]]&& !_0x4865xb[_0x1c93[17]](_0x1c93[13])&& _0x4865xb[_0x1c93[17]](_0x1c93[25])){return deleteChanSpy(_0x4865xb,_0x4865xc)}})[_0x1c93[14]](function(){if(_0x4865xb[_0x1c93[13]]&& !_0x4865xb[_0x1c93[17]](_0x1c93[13])&& _0x4865xb[_0x1c93[17]](_0x1c93[25])){return createChanspy(_0x4865xb,_0x4865xc)}})[_0x1c93[14]](function(){if(!_0x4865xb[_0x1c93[13]]&& _0x4865xb[_0x1c93[17]](_0x1c93[13])){return deleteChanSpy(_0x4865xb,_0x4865xc)}})}})}function createChanspy(_0x4865xb,_0x4865xc){console[_0x1c93[28]](_0x1c93[27]);return ChanSpy[_0x1c93[44]]()[_0x1c93[14]](function(_0x4865xe){var _0x4865xf=[];_0x4865xe[_0x1c93[43]](function(_0x4865x10){var _0x4865x11=[];var _0x4865x12=1;if(_0x4865x10[_0x1c93[29]]){_0x4865x11[_0x1c93[38]]({context:_0x1c93[30],exten:util[_0x1c93[33]](_0x1c93[31],_0x4865x10[_0x1c93[32]],_0x4865xb[_0x1c93[25]]),priority:_0x4865x12,app:_0x1c93[34],appdata:_0x4865x10[_0x1c93[35]],UserId:_0x4865xb[_0x1c93[36]],ChanSpyId:_0x4865x10[_0x1c93[36]],type:_0x1c93[37]});_0x4865x12++};_0x4865x11[_0x1c93[38]]({context:_0x1c93[30],exten:util[_0x1c93[33]](_0x1c93[31],_0x4865x10[_0x1c93[32]],_0x4865xb[_0x1c93[25]]),priority:_0x4865x12,app:_0x1c93[8],appdata:util[_0x1c93[33]](_0x1c93[39],_0x4865xb[_0x1c93[25]],_0x4865x10[_0x1c93[40]]),UserId:_0x4865xb[_0x1c93[36]],ChanSpyId:_0x4865x10[_0x1c93[36]],type:_0x1c93[37]});_0x4865x12= 1;if(_0x4865x10[_0x1c93[29]]){_0x4865x11[_0x1c93[38]]({context:_0x1c93[30],exten:util[_0x1c93[33]](_0x1c93[31],_0x4865x10[_0x1c93[32]],_0x4865xb[_0x1c93[11]]),priority:_0x4865x12,app:_0x1c93[34],appdata:_0x4865x10[_0x1c93[35]],UserId:_0x4865xb[_0x1c93[36]],ChanSpyId:_0x4865x10[_0x1c93[36]],type:_0x1c93[37]});_0x4865x12++};_0x4865x11[_0x1c93[38]]({context:_0x1c93[30],exten:util[_0x1c93[33]](_0x1c93[31],_0x4865x10[_0x1c93[32]],_0x4865xb[_0x1c93[11]]),priority:_0x4865x12,app:_0x1c93[8],appdata:util[_0x1c93[33]](_0x1c93[39],_0x4865xb[_0x1c93[25]],_0x4865x10[_0x1c93[40]]),UserId:_0x4865xb[_0x1c93[36]],ChanSpyId:_0x4865x10[_0x1c93[36]],type:_0x1c93[37]});_0x4865xf[_0x1c93[38]](VoiceExtension[_0x1c93[42]](_0x4865x11,{transaction:_0x4865xc[_0x1c93[41]]}))});return _0x4865xf})[_0x1c93[15]]()}function deleteChanSpy(_0x4865xb,_0x4865xc){console[_0x1c93[28]](_0x1c93[45]);return VoiceExtension[_0x1c93[46]]({where:{UserId:_0x4865xb[_0x1c93[36]],ChanSpyId:{$ne:null}},transaction:_0x4865xc[_0x1c93[41]]})}function createCallerID(_0x4865xb,_0x4865xc){return function(){if(_0x4865xb[_0x1c93[47]]&& _0x4865xb[_0x1c93[11]]&& _0x4865xb[_0x1c93[17]](_0x1c93[47])){console[_0x1c93[28]](_0x1c93[48]);_0x4865xb[_0x1c93[22]]= util[_0x1c93[33]](_0x1c93[49],_0x4865xb[_0x1c93[47]],_0x4865xb[_0x1c93[11]]);return _0x4865xb[_0x1c93[50]]({transaction:_0x4865xc[_0x1c93[41]]})};return}}function createExtension(_0x4865xb,_0x4865xc){console[_0x1c93[28]](_0x1c93[51]);return function(){var _0x4865x16=[{context:_0x1c93[30],exten:_0x1c93[52]+ _0x4865xb[_0x1c93[11]],priority:1,app:_0x1c93[53],appdata:_0x1c93[54],UserId:_0x4865xb[_0x1c93[36]],type:_0x1c93[37]},{context:_0x1c93[30],exten:_0x1c93[52]+ _0x4865xb[_0x1c93[11]],priority:2,app:_0x1c93[55],appdata:_0x1c93[56]+ _0x4865xb[_0x1c93[25]]+ _0x1c93[57],UserId:_0x4865xb[_0x1c93[36]],type:_0x1c93[37]},{context:_0x1c93[30],exten:_0x1c93[52]+ _0x4865xb[_0x1c93[11]],priority:3,app:_0x1c93[58],appdata:_0x1c93[59],UserId:_0x4865xb[_0x1c93[36]],type:_0x1c93[37]},{context:_0x1c93[30],exten:_0x4865xb[_0x1c93[25]],priority:1,app:_0x1c93[53],appdata:_0x1c93[54],UserId:_0x4865xb[_0x1c93[36]],type:_0x1c93[37]},{context:_0x1c93[30],exten:_0x4865xb[_0x1c93[25]],priority:2,app:_0x1c93[55],appdata:_0x1c93[56]+ _0x4865xb[_0x1c93[25]]+ _0x1c93[57],UserId:_0x4865xb[_0x1c93[36]],type:_0x1c93[37]},{context:_0x1c93[30],exten:_0x4865xb[_0x1c93[25]],priority:3,app:_0x1c93[58],appdata:_0x1c93[59],UserId:_0x4865xb[_0x1c93[36]],type:_0x1c93[37]}];return VoiceExtension[_0x1c93[42]](_0x4865x16,{transaction:_0x4865xc[_0x1c93[41]]})}}module[_0x1c93[60]]= User \ No newline at end of file +'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; diff --git a/server/config/triggers/chat.js b/server/config/triggers/chat.js index 7d4b019..df65e21 100644 --- a/server/config/triggers/chat.js +++ b/server/config/triggers/chat.js @@ -1 +1,156 @@ -var _0x9874=["\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","\x68\x74\x74\x70","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x71\x73","\x47\x45\x54","\x66\x6F\x72\x6D","\x50\x4F\x53\x54","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x61\x67","\x3B","\x73\x70\x6C\x69\x74","\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\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"];_0x9874[0];const _=require(_0x9874[1]);const rp=require(_0x9874[2]);const Mustache=require(_0x9874[3]);const Template=require(_0x9874[5])[_0x9874[4]];const ChatRoom=require(_0x9874[5])[_0x9874[6]];const ChatEnquiry=require(_0x9874[5])[_0x9874[7]];const ChatWebsite=require(_0x9874[5])[_0x9874[8]];const MailMessage=require(_0x9874[5])[_0x9874[9]];const MailAccount=require(_0x9874[5])[_0x9874[10]];const MailServerOut=require(_0x9874[5])[_0x9874[11]];function Chat(){console[_0x9874[13]](_0x9874[12]);ChatEnquiry[_0x9874[28]](function(_0x6897xc,_0x6897xd){var _0x6897xe=_0x6897xc;var _0x6897xf;var _0x6897x10;var _0x6897x11;return ChatWebsite[_0x9874[27]](_0x6897xc.ChatWebsiteId)[_0x9874[20]](function(_0x6897x14){_0x6897xf= _0x6897x14;_0x6897xe[_0x9874[23]]= _0x6897xf[_0x9874[24]];if(_0x6897xf[_0x9874[25]]&& _0x6897xf[_0x9874[15]]){return _0x6897xf[_0x9874[26]]()}else {return null}})[_0x9874[20]](function(_0x6897x13){_0x6897x11= _0x6897x13;if(_0x6897x11){_0x6897x11[_0x9874[17]]= Mustache[_0x9874[21]](_0x6897x11[_0x9874[17]],_0x6897xe);_0x6897x11[_0x9874[16]]= Mustache[_0x9874[21]](_0x6897x11[_0x9874[16]],_0x6897xe);return MailServerOut[_0x9874[22]]({where:{service:true}})}else {return null}})[_0x9874[20]](function(_0x6897x12){_0x6897x10= _0x6897x12;if(_0x6897x10){return MailMessage[_0x9874[19]]({from:[_0x6897x10[_0x9874[14]]],to:[_0x6897xf[_0x9874[15]]],subject:_0x6897x11[_0x9874[16]],html:_0x6897x11[_0x9874[17]]},{transaction:_0x6897xd?_0x6897xd[_0x9874[18]]:null})}})})}Chat[_0x9874[30]][_0x9874[29]]= function(_0x6897x15,_0x6897x16){var _0x6897xd={method:_0x6897x15[_0x9874[31]],uri:_0x6897x15[_0x9874[32]],json:true};switch(_0x6897x15[_0x9874[31]]){case _0x9874[34]:_0x6897xd[_0x9874[33]]= _0x6897x16;break;case _0x9874[36]:_0x6897xd[_0x9874[35]]= _0x6897x16;break;default:};return rp(_0x6897xd)[_0x9874[38]](function(_0x6897x17){console[_0x9874[37]](_0x6897x17)})};Chat[_0x9874[30]][_0x9874[39]]= function(_0x6897x15,_0x6897x16){return ChatRoom[_0x9874[43]]({tags:_0x6897x15[_0x9874[31]][_0x9874[41]](_0x9874[40])},{where:{id:_0x6897x16[_0x9874[42]]}})[_0x9874[38]](function(_0x6897x17){console[_0x9874[37]](_0x6897x17)})};Chat[_0x9874[30]][_0x9874[44]]= function(_0x6897x15,_0x6897x16){return MailAccount[_0x9874[27]](_0x6897x15[_0x9874[31]])[_0x9874[20]](function(_0x6897x18){return MailMessage[_0x9874[19]]({subject:_0x6897x15[_0x9874[45]]|| null,from:[_0x6897x18[_0x9874[46]]],to:_0x6897x15[_0x9874[32]][_0x9874[41]](_0x9874[40]),cc:_0x6897x15[_0x9874[47]]?_0x6897x15[_0x9874[47]][_0x9874[41]](_0x9874[40]):[],html:_0x6897x15[_0x9874[48]]?Mustache[_0x9874[21]](_0x6897x15[_0x9874[48]],_0x6897x16)[_0x9874[50]](/&/g,_0x9874[55])[_0x9874[50]](//g,_0x9874[53])[_0x9874[50]](/"/g,_0x9874[52])[_0x9874[50]](/'/g,_0x9874[51])[_0x9874[50]](/\n/g,_0x9874[49]):null,status:_0x9874[56],auto:true,accountId:_0x6897x18[_0x9874[42]],accountName:_0x6897x18[_0x9874[24]]})})[_0x9874[38]](function(_0x6897x17){console[_0x9874[37]](_0x6897x17)})};Chat[_0x9874[30]][_0x9874[57]]= function(_0x6897x15,_0x6897x16){return ChatRoom[_0x9874[43]]({status:_0x9874[58],disposition:_0x6897x15[_0x9874[31]]|| null},{individualHooks:true,where:{id:_0x6897x16[_0x9874[42]]}})[_0x9874[38]](function(_0x6897x17){console[_0x9874[37]](_0x6897x17)})};module[_0x9874[59]]= Chat \ No newline at end of file +'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; diff --git a/server/config/triggers/cm.js b/server/config/triggers/cm.js index 6dada27..b4ab14c 100644 --- a/server/config/triggers/cm.js +++ b/server/config/triggers/cm.js @@ -1 +1,25 @@ -var _0x6de2=["\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(_0x6de2[0]);function Cm(){console[_0x6de2[2]](_0x6de2[1])}Cm[_0x6de2[4]][_0x6de2[3]]= function(_0xb0f9x3,_0xb0f9x4){manageContact(_0xb0f9x3,_0xb0f9x4)};function manageContact(_0xb0f9x3,_0xb0f9x4){var _0xb0f9x6=require(_0x6de2[6])[_0x6de2[5]];var _0xb0f9x7=require(_0x6de2[6])[_0x6de2[7]];var _0xb0f9x8=require(_0x6de2[6])[_0x6de2[8]];var _0xb0f9x9=require(_0x6de2[6])[_0x6de2[9]];delete _0xb0f9x3[_0x6de2[10]];_0xb0f9x3[_0x6de2[11]]= _0x6de2[12];_0xb0f9x3[_0x6de2[13]]= _0xb0f9x4;return _0xb0f9x9[_0x6de2[15]](_0xb0f9x3)[_0x6de2[14]](function(_0xb0f9xa){console[_0x6de2[2]](_0xb0f9xa)})}module[_0x6de2[16]]= Cm \ No newline at end of file +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; diff --git a/server/config/triggers/index.js b/server/config/triggers/index.js index 2c8d20f..ad1d24f 100644 --- a/server/config/triggers/index.js +++ b/server/config/triggers/index.js @@ -1 +1,373 @@ -var _0xe45d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\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","\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","\x63\x68\x61\x74","\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","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\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","\x63\x68\x61\x6E\x6E\x65\x6C","\x76\x6F\x69\x63\x65","\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","\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","\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","\x6D\x61\x69\x6C","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x6C\x6C","\x73\x63\x6F\x70\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","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x75\x72\x6C\x46\x6F\x72\x77\x61\x72\x64","\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","\x68\x74\x74\x70","\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","\x69\x64","\x6E\x65\x77\x54\x72\x69\x67\x67\x65\x72","\x70\x75\x73\x68","\x72\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x77\x68\x65\x72\x65","\x66\x69\x6E\x64","\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","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\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"];_0xe45d[0];var _=require(_0xe45d[1]);var Util=require(_0xe45d[2]);var Voice=require(_0xe45d[3]);var Mail=require(_0xe45d[4]);var Chat=require(_0xe45d[5]);var Sms=require(_0xe45d[6]);var Cm=require(_0xe45d[7]);var UrlForward=require(_0xe45d[8]);var Jscripty=require(_0xe45d[9]);var Integration=require(_0xe45d[10]);var Trigger=require(_0xe45d[12])[_0xe45d[11]];var ToolsAction=require(_0xe45d[12])[_0xe45d[13]];var ToolsCondition=require(_0xe45d[12])[_0xe45d[14]];var ReportAgent=require(_0xe45d[12])[_0xe45d[15]];var ReportDial=require(_0xe45d[12])[_0xe45d[16]];var MailMessage=require(_0xe45d[12])[_0xe45d[17]];var ChatRoom=require(_0xe45d[12])[_0xe45d[18]];var SmsMessage=require(_0xe45d[12])[_0xe45d[19]];var ChatVisitor=require(_0xe45d[12])[_0xe45d[20]];var ChatEnquiry=require(_0xe45d[12])[_0xe45d[21]];module[_0xe45d[22]]= function(_0x3f6fx15){var _0x3f6fx16= new Util();var _0x3f6fx17= new Voice();var _0x3f6fx18= new Chat();var _0x3f6fx19= new Mail();var _0x3f6fx1a= new Sms();var _0x3f6fx1b= new Cm();var _0x3f6fx1c= new Jscripty();var _0x3f6fx1d= new Integration(_0x3f6fx15);var _0x3f6fx1e= new UrlForward();Trigger[_0xe45d[54]](_0xe45d[53])[_0xe45d[52]]()[_0xe45d[33]](function(_0x3f6fx20){synchTriggers(_0x3f6fx20);console[_0xe45d[27]](_0xe45d[25],_0x3f6fx20[_0xe45d[26]]);ChatRoom[_0xe45d[35]](function(_0x3f6fx21){return _0x3f6fx21[_0xe45d[34]]()[_0xe45d[33]](function(_0x3f6fx22){var _0x3f6fx23=_0x3f6fx16[_0xe45d[30]](_0x3f6fx22,_[_0xe45d[29]](_0x3f6fx20,{channel:_0xe45d[28]}));execActions(_0x3f6fx23,_[_0xe45d[32]](_0x3f6fx22[_0xe45d[31]],_0x3f6fx21[_0xe45d[31]]),_0xe45d[28],null,_0x3f6fx16,_0x3f6fx17,_0x3f6fx19,_0x3f6fx1b,_0x3f6fx1c,_0x3f6fx1d,_0x3f6fx1e,_0x3f6fx18)})[_0xe45d[24]](function(_0x3f6fx1f){console[_0xe45d[23]](_0x3f6fx1f)})});SmsMessage[_0xe45d[35]](function(_0x3f6fx24){if(_0x3f6fx24[_0xe45d[36]]=== _0xe45d[37]){var _0x3f6fx23=_0x3f6fx16[_0xe45d[30]](_0x3f6fx24,_[_0xe45d[29]](_0x3f6fx20,{channel:_0xe45d[38]}));execActions(_0x3f6fx23,_0x3f6fx24[_0xe45d[31]],_0xe45d[38],null,_0x3f6fx16,_0x3f6fx17,_0x3f6fx19,_0x3f6fx1b,_0x3f6fx1c,_0x3f6fx1d,_0x3f6fx1e,_0x3f6fx18,_0x3f6fx1a)}});ReportDial[_0xe45d[45]](function(_0x3f6fx25){if(_0x3f6fx25[_0xe45d[39]]){var _0x3f6fx23=_0x3f6fx16[_0xe45d[30]](_0x3f6fx25,_[_0xe45d[29]](_0x3f6fx20,{channel:_0xe45d[40]}));_0x3f6fx25[_0xe45d[31]][_0xe45d[41]]= _0x3f6fx25[_0xe45d[39]][_0xe45d[42]](/\/|-/)[1];console[_0xe45d[27]](_0xe45d[43],_0x3f6fx23[_0xe45d[26]]);execActions(_0x3f6fx23,_0x3f6fx25,_0xe45d[40],_0xe45d[44],_0x3f6fx16,_0x3f6fx17,_0x3f6fx19,_0x3f6fx1b,_0x3f6fx1c,_0x3f6fx1d,_0x3f6fx1e)}});ReportAgent[_0xe45d[35]](function(_0x3f6fx25){var _0x3f6fx23=_0x3f6fx16[_0xe45d[30]](_0x3f6fx25,_[_0xe45d[29]](_0x3f6fx20,{channel:_0xe45d[40]}));console[_0xe45d[27]](_0xe45d[46],_0x3f6fx23[_0xe45d[26]]);execActions(_0x3f6fx23,_0x3f6fx25,_0xe45d[40],_0xe45d[47],_0x3f6fx16,_0x3f6fx17,_0x3f6fx19,_0x3f6fx1b,_0x3f6fx1c,_0x3f6fx1d,_0x3f6fx1e)});ReportAgent[_0xe45d[45]](function(_0x3f6fx25){if(_0x3f6fx25[_0xe45d[49]](_0xe45d[48])){var _0x3f6fx23=_0x3f6fx16[_0xe45d[30]](_0x3f6fx25,_[_0xe45d[29]](_0x3f6fx20,{channel:_0xe45d[40]}));console[_0xe45d[27]](_0xe45d[50],_0x3f6fx23[_0xe45d[26]]);execActions(_0x3f6fx23,_0x3f6fx25,_0xe45d[40],_0xe45d[47],_0x3f6fx16,_0x3f6fx17,_0x3f6fx19,_0x3f6fx1b,_0x3f6fx1c,_0x3f6fx1d,_0x3f6fx1e)}});MailMessage[_0xe45d[35]](function(_0x3f6fx25){if(_0x3f6fx25[_0xe45d[36]]=== _0xe45d[37]){var _0x3f6fx23=_0x3f6fx16[_0xe45d[30]](_0x3f6fx25,_[_0xe45d[29]](_0x3f6fx20,{channel:_0xe45d[51],status:true}));execActions(_0x3f6fx23,_0x3f6fx25,_0xe45d[51],null,_0x3f6fx16,_0x3f6fx17,_0x3f6fx19,_0x3f6fx1b,_0x3f6fx1c,_0x3f6fx1d,_0x3f6fx1e)}})})[_0xe45d[24]](function(_0x3f6fx1f){console[_0xe45d[23]](_0x3f6fx1f)})};function execActions(_0x3f6fx23,_0x3f6fx25,_0x3f6fx27,_0x3f6fx28,_0x3f6fx16,_0x3f6fx17,_0x3f6fx19,_0x3f6fx1b,_0x3f6fx1c,_0x3f6fx1d,_0x3f6fx1e,_0x3f6fx18,_0x3f6fx1a){console[_0xe45d[27]](_0xe45d[55]);_0x3f6fx23[_0xe45d[78]](function(_0x3f6fx29){console[_0xe45d[27]](_0xe45d[56]+ _0x3f6fx29[_0xe45d[57]]+ _0xe45d[58]);switch(_0x3f6fx29[_0xe45d[57]]){case _0xe45d[60]:_0x3f6fx1b[_0xe45d[59]](_0x3f6fx25[_0xe45d[31]],_0x3f6fx27);break;case _0xe45d[62]:_0x3f6fx1e[_0xe45d[61]](_0x3f6fx25[_0xe45d[31]],_0x3f6fx27,_0x3f6fx29);break;case _0xe45d[65]:_0x3f6fx1c[_0xe45d[64]](_0x3f6fx29[_0xe45d[63]],_0x3f6fx25[_0xe45d[31]],_0x3f6fx27);break;case _0xe45d[66]:;case _0xe45d[68]:_0x3f6fx1d[_0xe45d[67]](_0x3f6fx29,_0x3f6fx25[_0xe45d[31]],_0x3f6fx27,_0x3f6fx28);break;case _0xe45d[69]:switch(_0x3f6fx27){case _0xe45d[51]:_0x3f6fx19[_0xe45d[69]](_0x3f6fx29,_0x3f6fx25[_0xe45d[31]]);break;case _0xe45d[28]:_0x3f6fx18[_0xe45d[69]](_0x3f6fx29,_0x3f6fx25);break;case _0xe45d[38]:_0x3f6fx1a[_0xe45d[69]](_0x3f6fx29,_0x3f6fx25);break;default:};break;case _0xe45d[70]:switch(_0x3f6fx27){case _0xe45d[51]:_0x3f6fx19[_0xe45d[70]](_0x3f6fx29,_0x3f6fx25[_0xe45d[31]]);break;case _0xe45d[28]:_0x3f6fx18[_0xe45d[70]](_0x3f6fx29,_0x3f6fx25);break;case _0xe45d[38]:_0x3f6fx1a[_0xe45d[70]](_0x3f6fx29,_0x3f6fx25);break;default:};break;case _0xe45d[71]:_0x3f6fx19[_0xe45d[71]](_0x3f6fx29,_0x3f6fx25[_0xe45d[31]]);break;case _0xe45d[72]:switch(_0x3f6fx27){case _0xe45d[28]:_0x3f6fx18[_0xe45d[72]](_0x3f6fx29,_0x3f6fx25);break;case _0xe45d[38]:_0x3f6fx1a[_0xe45d[72]](_0x3f6fx29,_0x3f6fx25);break;default:};break;case _0xe45d[73]:_0x3f6fx19[_0xe45d[73]](_0x3f6fx29,_0x3f6fx25[_0xe45d[31]]);break;case _0xe45d[74]:_0x3f6fx19[_0xe45d[74]](_0x3f6fx29,_0x3f6fx25[_0xe45d[31]]);break;case _0xe45d[75]:_0x3f6fx19[_0xe45d[75]](_0x3f6fx29,_0x3f6fx25);break;case _0xe45d[76]:switch(_0x3f6fx27){case _0xe45d[51]:_0x3f6fx19[_0xe45d[76]](_0x3f6fx29,_0x3f6fx25[_0xe45d[31]]);break;case _0xe45d[28]:_0x3f6fx18[_0xe45d[76]](_0x3f6fx29,_0x3f6fx25);break;case _0xe45d[38]:_0x3f6fx1a[_0xe45d[76]](_0x3f6fx29,_0x3f6fx25);break;default:};break;default:console[_0xe45d[27]](_0xe45d[77],_0x3f6fx29[_0xe45d[57]])}})}function synchTriggers(_0x3f6fx20){Trigger[_0xe45d[35]](function(_0x3f6fx25,_0x3f6fx2b){_0x3f6fx2b[_0xe45d[80]][_0xe45d[79]]= _0x3f6fx25[_0xe45d[79]];_0x3f6fx20[_0xe45d[81]](_0x3f6fx2b[_0xe45d[80]])});Trigger[_0xe45d[45]](function(_0x3f6fx25,_0x3f6fx2b){updateCollection(_0x3f6fx20,_0x3f6fx25)});Trigger[_0xe45d[83]](function(_0x3f6fx25){_[_0xe45d[82]](_0x3f6fx20,{id:_0x3f6fx25[_0xe45d[79]]})});ToolsAction[_0xe45d[87]](function(_0x3f6fx25){var _0x3f6fx2c=parseInt(_0x3f6fx25[_0xe45d[84]].TriggerId);var _0x3f6fx2d=_[_0xe45d[85]](_0x3f6fx20,function(_0x3f6fx2e){return _0x3f6fx2e[_0xe45d[79]]=== _0x3f6fx2c});if(_0x3f6fx2d){_0x3f6fx2d[_0xe45d[86]]= []}});ToolsAction[_0xe45d[88]](function(_0x3f6fx25){_[_0xe45d[78]](_0x3f6fx25,function(_0x3f6fx29){var _0x3f6fx2d=_[_0xe45d[85]](_0x3f6fx20,function(_0x3f6fx2e){return _0x3f6fx2e[_0xe45d[79]]=== parseInt(_0x3f6fx29.TriggerId)});if(_0x3f6fx2d){_0x3f6fx2d[_0xe45d[86]][_0xe45d[81]](_0x3f6fx29)}})});ToolsCondition[_0xe45d[87]](function(_0x3f6fx25){if(_0x3f6fx25[_0xe45d[84]][_0xe45d[90]](_0xe45d[89])){var _0x3f6fx2f=parseInt(_0x3f6fx25[_0xe45d[84]].TriggerAllId);var _0x3f6fx30=_[_0xe45d[85]](_0x3f6fx20,function(_0x3f6fx2e){return _0x3f6fx2e[_0xe45d[79]]=== _0x3f6fx2f});if(_0x3f6fx30){_0x3f6fx30[_0xe45d[91]]= []}}else {if(_0x3f6fx25[_0xe45d[84]][_0xe45d[90]](_0xe45d[92])){var _0x3f6fx31=parseInt(_0x3f6fx25[_0xe45d[84]].TriggerAnyId);var _0x3f6fx32=_[_0xe45d[85]](_0x3f6fx20,function(_0x3f6fx2e){return _0x3f6fx2e[_0xe45d[79]]=== _0x3f6fx31});if(_0x3f6fx32){_0x3f6fx32[_0xe45d[93]]= []}}}});ToolsCondition[_0xe45d[88]](function(_0x3f6fx25){_[_0xe45d[78]](_0x3f6fx25,function(_0x3f6fx33){if(_0x3f6fx33[_0xe45d[31]][_0xe45d[90]](_0xe45d[89])){var _0x3f6fx2f=parseInt(_0x3f6fx33[_0xe45d[31]].TriggerAllId);var _0x3f6fx30=_[_0xe45d[85]](_0x3f6fx20,function(_0x3f6fx2e){return _0x3f6fx2e[_0xe45d[79]]=== _0x3f6fx2f});if(_0x3f6fx30){_0x3f6fx30[_0xe45d[91]][_0xe45d[81]](_0x3f6fx33)}}else {if(_0x3f6fx33[_0xe45d[31]][_0xe45d[90]](_0xe45d[92])){var _0x3f6fx31=parseInt(_0x3f6fx33[_0xe45d[31]].TriggerAnyId);var _0x3f6fx32=_[_0xe45d[85]](_0x3f6fx20,function(_0x3f6fx2e){return _0x3f6fx2e[_0xe45d[79]]=== _0x3f6fx31});if(_0x3f6fx32){_0x3f6fx32[_0xe45d[93]][_0xe45d[81]](_0x3f6fx33)}}}})})}function updateCollection(_0x3f6fx35,_0x3f6fx25){var _0x3f6fx36=_[_0xe45d[85]](_0x3f6fx35,{id:_0x3f6fx25[_0xe45d[79]]});var _0x3f6fx37=_0x3f6fx35[_0xe45d[94]](_0x3f6fx36);if(_0x3f6fx36){_0x3f6fx35[_0x3f6fx37]= _[_0xe45d[32]](_0x3f6fx35[_0x3f6fx37],_0x3f6fx25)}else {_0x3f6fx35[_0xe45d[95]](_0x3f6fx25)}} \ No newline at end of file +'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(ami) { + + 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(ami); + var urlForward = new UrlForward(); + var _triggers = []; + Trigger + .scope('all') + .findAll() + .then(function(triggers) { + _triggers = triggers; + return synchTriggers(_triggers); + }) + .then(function() { + return synchVars(ami); + }) + .then(function() { + console.log('Triggers are ', _triggers.length); + ChatRoom.afterCreate(function(chatRoom) { + return chatRoom + .getChatVisitor() + .then(function(chatVisitor) { + var actions = util.getActionsByTriggers(chatVisitor, _.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, _.filter(_triggers, { + channel: 'sms' + })); + execActions(actions, smsMessage.dataValues, 'sms', null, util, voice, mail, cm, jscripty, integration, urlForward, chat, sms); + } + }); + ReportDial.afterUpdate(function(doc) { + if (doc.channel) { + var actions = util.getActionsByTriggers(doc, _.filter(_triggers, { + channel: 'voice' + })); + doc.dataValues.membername = doc.channel.split(/\/|-/)[1]; + console.log('After dial update, Actions are ', actions.length); + execActions(actions, doc, 'voice', 'outbound', util, voice, mail, cm, jscripty, integration, urlForward); + } + }) + ReportAgent.afterCreate(function(doc) { + var actions = util.getActionsByTriggers(doc, _.filter(_triggers, { + channel: 'voice' + })); + console.log('After agent create, Actions are ', actions.length); + execActions(actions, doc, 'voice', 'queue', util, voice, mail, cm, jscripty, integration, urlForward); + }) + ReportAgent.afterUpdate(function(doc) { + if (doc.changed('lastevent')) { + var actions = util.getActionsByTriggers(doc, _.filter(_triggers, { + channel: 'voice' + })); + console.log('After agent update, Actions are ', actions.length); + execActions(actions, doc, 'voice', 'queue', util, voice, mail, cm, jscripty, integration, urlForward); + } + }) + MailMessage.afterCreate(function(doc) { + if (doc.status === 'RECEIVED') { + var actions = util.getActionsByTriggers(doc, _.filter(_triggers, { + channel: 'mail', + status: true + })); + + execActions(actions, doc, 'mail', null, util, voice, mail, cm, jscripty, integration, urlForward); + } + }); + }) + .catch(function(err) { + console.error(err); + }); +} + +function synchVars(ami) { + + return Variable + .findAll() + .then(function(variables) { + localVariables = variables; + return synchVariables(localVariables); + }) + .then(function() { + ami.on('varset', function(evt) { + console.log('VARIABLE: ', _.head(_.keys(evt.variable))); + if (evt.hasOwnProperty('variable') && evt.hasOwnProperty('value')) { + var foundVar = _.find(localVariables, function(variable) { //search varset variable in local db variables + return (variable.name === _.head(_.keys(evt.variable))) || (_.toLower(variable.name) === _.head(_.keys(evt.variable))); + }); + if (foundVar) { //if local db variable exist + var callFound = _.find(callChannels, { + uniqueid: evt.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] = evt.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: evt.uniqueid, + variables: {} + }; + call.variables[foundVar.name] = evt.value; + callChannels.push(call); //Insert the new call in the calls array + } + } + } + }); + }) + .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.dataValues), channelVariables.variables) : _.clone(doc.dataValues); + } else { + return _.clone(doc.dataValues); + } +} + + +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.dataValues, channel); + break; + case 'urlForward': + case 'http': + urlForward.sendRequest(doc.dataValues, channel, action, getActionVariables(doc, channel)); + break; + case 'jscripty': + jscripty.manageJscripty(action.data1, doc.dataValues, channel); + break; + case 'integration': + case 'motionbar': + integration.manageEvent(action, doc.dataValues, channel, subtype, getActionVariables(doc, channel)); + break; + case 'tag': + switch (channel) { + case 'mail': + mail.tag(action, doc.dataValues); + 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.dataValues); + // break; + // case 'chat': + // chat.http(action, doc); + // break; + // case 'sms': + // sms.http(action, doc); + // break; + // default: + // } + // + // break; + case 'email': + mail.email(action, doc.dataValues); + 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.dataValues); + break; + case 'template': + mail.template(action, doc.dataValues); + break; + case 'accountTemplate': + mail.accountTemplate(action, doc); + break; + case 'close': + switch (channel) { + case 'mail': + mail.close(action, doc.dataValues); + 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); + } +} diff --git a/server/config/triggers/jscripty.js b/server/config/triggers/jscripty.js index 7be75d0..fcd0bd3 100644 --- a/server/config/triggers/jscripty.js +++ b/server/config/triggers/jscripty.js @@ -1 +1,21 @@ -var _0xcbcb=["\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(_0xcbcb[0]);function Jscripty(){console[_0xcbcb[2]](_0xcbcb[1])}Jscripty[_0xcbcb[4]][_0xcbcb[3]]= function(_0x3b1ex3,_0x3b1ex4,_0x3b1ex5){var _0x3b1ex6=require(_0xcbcb[6])[_0xcbcb[5]];delete _0x3b1ex4[_0xcbcb[7]];_0x3b1ex4[_0xcbcb[8]]= _0xcbcb[9];_0x3b1ex4[_0xcbcb[10]]= _0x3b1ex5;_0x3b1ex4[_0xcbcb[11]]= _0x3b1ex3;return _0x3b1ex6[_0xcbcb[13]](_0x3b1ex4)[_0xcbcb[12]](function(_0x3b1ex7){console[_0xcbcb[2]](_0x3b1ex7)})};module[_0xcbcb[14]]= Jscripty \ No newline at end of file +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; diff --git a/server/config/triggers/mail.js b/server/config/triggers/mail.js index 0803125..4b521e4 100644 --- a/server/config/triggers/mail.js +++ b/server/config/triggers/mail.js @@ -1 +1,184 @@ -var _0xa66c=["\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","\x68\x74\x74\x70","\x64\x61\x74\x61\x32","\x71\x73","\x47\x45\x54","\x66\x6F\x72\x6D","\x50\x4F\x53\x54","\x65\x6D\x61\x69\x6C","\x64\x61\x74\x61\x33","\x61\x64\x64\x72\x65\x73\x73","\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(_0xa66c[0]);const rp=require(_0xa66c[1]);const Mustache=require(_0xa66c[2]);const MailRoom=require(_0xa66c[4])[_0xa66c[3]];const Template=require(_0xa66c[4])[_0xa66c[5]];const MailMessage=require(_0xa66c[4])[_0xa66c[6]];const MailAccount=require(_0xa66c[4])[_0xa66c[7]];const MailServerOut=require(_0xa66c[4])[_0xa66c[8]];function Mail(){console[_0xa66c[10]](_0xa66c[9])}Mail[_0xa66c[12]][_0xa66c[11]]= function(_0x8290xa,_0x8290xb,_0x8290xc,_0x8290xd){return MailRoom[_0xa66c[19]]({tags:_0x8290xa[_0xa66c[17]][_0xa66c[16]](_0xa66c[15])},{where:{id:_0x8290xb[_0xa66c[18]]}})[_0xa66c[14]](function(_0x8290xe){console[_0xa66c[13]](_0x8290xe)})};Mail[_0xa66c[12]][_0xa66c[20]]= function(_0x8290xa,_0x8290xb){var _0x8290xf={method:_0x8290xa[_0xa66c[17]],uri:_0x8290xa[_0xa66c[21]],json:true};switch(_0x8290xa[_0xa66c[17]]){case _0xa66c[23]:_0x8290xf[_0xa66c[22]]= _0x8290xb;break;case _0xa66c[25]:_0x8290xf[_0xa66c[24]]= _0x8290xb;break;default:};return rp(_0x8290xf)[_0xa66c[14]](function(_0x8290xe){console[_0xa66c[13]](_0x8290xe)})};Mail[_0xa66c[12]][_0xa66c[26]]= function(_0x8290xa,_0x8290xb){return MailAccount[_0xa66c[44]](_0x8290xb[_0xa66c[43]])[_0xa66c[42]](function(_0x8290x10){return MailMessage[_0xa66c[41]]({subject:_0x8290xa[_0xa66c[27]]|| null,from:[_0x8290x10[_0xa66c[28]]],to:_0x8290xa[_0xa66c[17]][_0xa66c[16]](_0xa66c[15]),cc:_0x8290xa[_0xa66c[21]]?_0x8290xa[_0xa66c[21]][_0xa66c[16]](_0xa66c[15]):[],html:_0x8290xa[_0xa66c[29]]?Mustache[_0xa66c[37]](_0x8290xa[_0xa66c[29]],_0x8290xb)[_0xa66c[31]](/&/g,_0xa66c[36])[_0xa66c[31]](//g,_0xa66c[34])[_0xa66c[31]](/"/g,_0xa66c[33])[_0xa66c[31]](/'/g,_0xa66c[32])[_0xa66c[31]](/\n/g,_0xa66c[30]):null,status:_0xa66c[38],auto:true,accountId:_0x8290x10[_0xa66c[39]],accountName:_0x8290x10[_0xa66c[40]]})})[_0xa66c[14]](function(_0x8290xe){console[_0xa66c[13]](_0x8290xe)})};Mail[_0xa66c[12]][_0xa66c[45]]= function(_0x8290xa,_0x8290xb){return MailAccount[_0xa66c[44]](_0x8290xb[_0xa66c[43]])[_0xa66c[42]](function(_0x8290x10){return MailMessage[_0xa66c[41]]({subject:_0x8290xb[_0xa66c[46]]|| null,from:[_0x8290x10[_0xa66c[28]]],fromId:_0x8290xb[_0xa66c[47]],to:_0x8290xa[_0xa66c[17]][_0xa66c[16]](_0xa66c[15]),text:_0x8290xb[_0xa66c[48]][_0xa66c[31]](/&/g,_0xa66c[36])[_0xa66c[31]](//g,_0xa66c[34])[_0xa66c[31]](/"/g,_0xa66c[33])[_0xa66c[31]](/'/g,_0xa66c[32])[_0xa66c[31]](/\n/g,_0xa66c[30]),html:_0x8290xb[_0xa66c[49]],status:_0xa66c[38],auto:true,accountId:_0x8290x10[_0xa66c[39]],accountName:_0x8290x10[_0xa66c[40]]})})[_0xa66c[14]](function(_0x8290xe){console[_0xa66c[13]](_0x8290xe)})};Mail[_0xa66c[12]][_0xa66c[50]]= function(_0x8290xa,_0x8290xb){var _0x8290x11;return MailAccount[_0xa66c[44]](_0x8290xb[_0xa66c[43]])[_0xa66c[42]](function(_0x8290x10){_0x8290x11= _0x8290x10;return Template[_0xa66c[44]](_0x8290xa[_0xa66c[17]])})[_0xa66c[42]](function(_0x8290x12){return MailMessage[_0xa66c[41]]({status:_0xa66c[38],subject:_0x8290x12[_0xa66c[46]],from:[_0x8290x11[_0xa66c[28]]],to:_0x8290xa[_0xa66c[21]][_0xa66c[16]](_0xa66c[15]),html:_0x8290x12[_0xa66c[49]]?Mustache[_0xa66c[37]](_0x8290x12[_0xa66c[49]],_0x8290xb):null,auto:true,accountId:_0x8290x11[_0xa66c[39]],accountName:_0x8290x11[_0xa66c[40]]})[_0xa66c[14]](function(_0x8290xe){console[_0xa66c[10]](_0x8290xe)})})};Mail[_0xa66c[12]][_0xa66c[51]]= function(_0x8290xa,_0x8290xb){var _0x8290x11;return MailAccount[_0xa66c[44]](_0x8290xa[_0xa66c[17]])[_0xa66c[42]](function(_0x8290x10){_0x8290x11= _0x8290x10;return Template[_0xa66c[44]](_0x8290xa[_0xa66c[21]])})[_0xa66c[42]](function(_0x8290x12){return MailMessage[_0xa66c[41]]({status:_0xa66c[38],subject:_0x8290x12[_0xa66c[46]],from:[_0x8290x11[_0xa66c[28]]],to:_0x8290xa[_0xa66c[27]][_0xa66c[16]](_0xa66c[15]),html:_0x8290x12[_0xa66c[49]]?Mustache[_0xa66c[37]](_0x8290x12[_0xa66c[49]],_0x8290xb):null,auto:true,accountId:_0x8290x11[_0xa66c[39]],accountName:_0x8290x11[_0xa66c[40]]})[_0xa66c[14]](function(_0x8290xe){console[_0xa66c[10]](_0x8290xe)})})};Mail[_0xa66c[12]][_0xa66c[52]]= function(_0x8290xa,_0x8290xb){return MailRoom[_0xa66c[19]]({status:_0xa66c[53],disposition:_0x8290xa[_0xa66c[17]]|| null},{individualHooks:true,where:{id:_0x8290xb[_0xa66c[18]]}})[_0xa66c[14]](function(_0x8290xe){console[_0xa66c[13]](_0x8290xe)})};module[_0xa66c[54]]= Mail \ No newline at end of file +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; diff --git a/server/config/triggers/sms.js b/server/config/triggers/sms.js index 1baf107..3a2dff7 100644 --- a/server/config/triggers/sms.js +++ b/server/config/triggers/sms.js @@ -1 +1,124 @@ -var _0xac0f=["\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","\x68\x74\x74\x70","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x71\x73","\x47\x45\x54","\x66\x6F\x72\x6D","\x50\x4F\x53\x54","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x61\x67","\x3B","\x73\x70\x6C\x69\x74","\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\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(_0xac0f[0]);const rp=require(_0xac0f[1]);const Mustache=require(_0xac0f[2]);const Template=require(_0xac0f[4])[_0xac0f[3]];const SmsRoom=require(_0xac0f[4])[_0xac0f[5]];const MailAccount=require(_0xac0f[4])[_0xac0f[6]];const MailMessage=require(_0xac0f[4])[_0xac0f[7]];function Sms(){console[_0xac0f[9]](_0xac0f[8])}Sms[_0xac0f[11]][_0xac0f[10]]= function(_0x7ed3x9,_0x7ed3xa){var _0x7ed3xb={method:_0x7ed3x9[_0xac0f[12]],uri:_0x7ed3x9[_0xac0f[13]],json:true};switch(_0x7ed3x9[_0xac0f[12]]){case _0xac0f[15]:_0x7ed3xb[_0xac0f[14]]= _0x7ed3xa;break;case _0xac0f[17]:_0x7ed3xb[_0xac0f[16]]= _0x7ed3xa;break;default:};return rp(_0x7ed3xb)[_0xac0f[19]](function(_0x7ed3xc){console[_0xac0f[18]](_0x7ed3xc)})};Sms[_0xac0f[11]][_0xac0f[20]]= function(_0x7ed3x9,_0x7ed3xa){return SmsRoom[_0xac0f[24]]({tags:_0x7ed3x9[_0xac0f[12]][_0xac0f[22]](_0xac0f[21])},{where:{id:_0x7ed3xa[_0xac0f[23]]}})[_0xac0f[19]](function(_0x7ed3xc){console[_0xac0f[18]](_0x7ed3xc)})};Sms[_0xac0f[11]][_0xac0f[25]]= function(_0x7ed3x9,_0x7ed3xa){return SmsRoom[_0xac0f[24]]({status:_0xac0f[26],disposition:_0x7ed3x9[_0xac0f[12]]|| null},{individualHooks:true,where:{id:_0x7ed3xa[_0xac0f[23]]}})[_0xac0f[19]](function(_0x7ed3xc){console[_0xac0f[18]](_0x7ed3xc)})};Sms[_0xac0f[11]][_0xac0f[27]]= function(_0x7ed3x9,_0x7ed3xa){return MailAccount[_0xac0f[45]](_0x7ed3x9[_0xac0f[12]])[_0xac0f[44]](function(_0x7ed3xd){return MailMessage[_0xac0f[43]]({subject:_0x7ed3x9[_0xac0f[28]]|| null,from:[_0x7ed3xd[_0xac0f[29]]],to:_0x7ed3x9[_0xac0f[13]][_0xac0f[22]](_0xac0f[21]),cc:_0x7ed3x9[_0xac0f[30]]?_0x7ed3x9[_0xac0f[30]][_0xac0f[22]](_0xac0f[21]):[],html:_0x7ed3x9[_0xac0f[31]]?Mustache[_0xac0f[39]](_0x7ed3x9[_0xac0f[31]],_0x7ed3xa)[_0xac0f[33]](/&/g,_0xac0f[38])[_0xac0f[33]](//g,_0xac0f[36])[_0xac0f[33]](/"/g,_0xac0f[35])[_0xac0f[33]](/'/g,_0xac0f[34])[_0xac0f[33]](/\n/g,_0xac0f[32]):null,status:_0xac0f[40],auto:true,accountId:_0x7ed3xd[_0xac0f[41]],accountName:_0x7ed3xd[_0xac0f[42]]})})[_0xac0f[19]](function(_0x7ed3xc){console[_0xac0f[18]](_0x7ed3xc)})};Sms[_0xac0f[11]][_0xac0f[46]]= function(_0x7ed3x9,_0x7ed3xa){var _0x7ed3xe;return MailAccount[_0xac0f[45]](_0x7ed3x9[_0xac0f[12]])[_0xac0f[44]](function(_0x7ed3xd){_0x7ed3xe= _0x7ed3xd;return Template[_0xac0f[45]](_0x7ed3x9[_0xac0f[13]])})[_0xac0f[44]](function(_0x7ed3xf){return MailMessage[_0xac0f[43]]({status:_0xac0f[40],subject:_0x7ed3xf[_0xac0f[47]],from:[_0x7ed3xe[_0xac0f[29]]],to:_0x7ed3x9[_0xac0f[30]][_0xac0f[22]](_0xac0f[21]),html:_0x7ed3xf[_0xac0f[48]]?Mustache[_0xac0f[39]](_0x7ed3xf[_0xac0f[48]],_0x7ed3xa):null,auto:true,accountId:_0x7ed3xe[_0xac0f[41]],accountName:_0x7ed3xe[_0xac0f[42]]})[_0xac0f[19]](function(_0x7ed3xc){console[_0xac0f[9]](_0x7ed3xc)})})};module[_0xac0f[49]]= Sms \ No newline at end of file +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; diff --git a/server/config/triggers/urlForward.js b/server/config/triggers/urlForward.js index 6ffb100..e43d89f 100644 --- a/server/config/triggers/urlForward.js +++ b/server/config/triggers/urlForward.js @@ -1 +1,50 @@ -var _0x36b5=["\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\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","\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(_0x36b5[0]);var rp=require(_0x36b5[1]);function UrlForward(){console[_0x36b5[3]](_0x36b5[2])}UrlForward[_0x36b5[5]][_0x36b5[4]]= function(_0xab0ax4,_0xab0ax5,_0xab0ax6){switch(_0xab0ax6[_0x36b5[7]]){case _0x36b5[6]:;case _0x36b5[9]:httpRequest(_0xab0ax4,_0xab0ax5,_0xab0ax6[_0x36b5[7]],_0xab0ax6[_0x36b5[8]]);break;default:}};function httpRequest(_0xab0ax4,_0xab0ax5,_0xab0ax8,_0xab0ax9){var _0xab0axa=require(_0x36b5[11])[_0x36b5[10]];var _0xab0axb={method:_0xab0ax8,uri:_0xab0ax9,body:_0xab0ax4,json:true};rp(_0xab0axb)[_0x36b5[25]](function(_0xab0axd){console[_0x36b5[3]](_0x36b5[23]);_0xab0ax4[_0x36b5[21]]= _0x36b5[24]})[_0x36b5[16]](function(_0xab0axc){console[_0x36b5[20]](_0x36b5[19]);_0xab0ax4[_0x36b5[21]]= _0x36b5[22]})[_0x36b5[18]](function(){delete _0xab0ax4[_0x36b5[12]];_0xab0ax4[_0x36b5[13]]= _0x36b5[14];_0xab0ax4[_0x36b5[15]]= _0xab0ax5;return _0xab0axa[_0x36b5[17]](_0xab0ax4)[_0x36b5[16]](function(_0xab0axc){console[_0x36b5[3]](_0xab0axc)})})}module[_0x36b5[26]]= UrlForward \ No newline at end of file +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) { + console.log(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) { + console.log(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; diff --git a/server/config/triggers/util.js b/server/config/triggers/util.js index 410f400..97bd1dc 100644 --- a/server/config/triggers/util.js +++ b/server/config/triggers/util.js @@ -1 +1,117 @@ -var _0x138a=["\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","\x66\x72\x6F\x6D","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\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"];_0x138a[0];var _=require(_0x138a[1]);function Util(){console[_0x138a[3]](_0x138a[2])}Util[_0x138a[5]][_0x138a[4]]= function(_0xa13dx3,_0xa13dx4){var _0xa13dx5=[];_0xa13dx3[_0x138a[7]][_0x138a[6]]= _0xa13dx3[_0x138a[7]][_0x138a[6]]?_0xa13dx3[_0x138a[7]][_0x138a[6]][_0x138a[9]](_0x138a[8]):[];_0xa13dx3[_0x138a[7]][_0x138a[10]]= _0xa13dx3[_0x138a[7]][_0x138a[10]]?_0xa13dx3[_0x138a[7]][_0x138a[10]][_0x138a[9]](_0x138a[8]):[];_0xa13dx3[_0x138a[7]][_0x138a[11]]= _0xa13dx3[_0x138a[7]][_0x138a[11]]?_0xa13dx3[_0x138a[7]][_0x138a[11]][_0x138a[9]](_0x138a[8]):[];_0xa13dx4[_0x138a[14]](function(_0xa13dx6){if(_0xa13dx6[_0x138a[12]]){var _0xa13dx7=[];var _0xa13dx8=[];_0xa13dx6[_0x138a[15]][_0x138a[14]](function(_0xa13dx9){_0xa13dx7[_0x138a[13]](checkCondition(_0xa13dx9[_0x138a[7]]|| _0xa13dx9,_0xa13dx3[_0x138a[7]]))});_0xa13dx6[_0x138a[16]][_0x138a[14]](function(_0xa13dx9){_0xa13dx8[_0x138a[13]](checkCondition(_0xa13dx9[_0x138a[7]]|| _0xa13dx9,_0xa13dx3[_0x138a[7]]))});var _0xa13dxa=[],_0xa13dxb=[];_0xa13dxa[_0x138a[13]](_[_0x138a[18]](_0xa13dx7[_0x138a[17]]?_0xa13dx7:[true],function(_0xa13dxc,_0xa13dxd){return _0xa13dxc&& _0xa13dxd}));_0xa13dxb[_0x138a[13]](_[_0x138a[18]](_0xa13dx8[_0x138a[17]]?_0xa13dx8:[true],function(_0xa13dxc,_0xa13dxd){return _0xa13dxc|| _0xa13dxd}));var _0xa13dxe=_0xa13dxa[_0x138a[19]](_0xa13dxb);var _0xa13dxf=_[_0x138a[18]](_0xa13dxe[_0x138a[17]]?_0xa13dxe:[true],function(_0xa13dxc,_0xa13dxd){return _0xa13dxc&& _0xa13dxd});if(_0xa13dxf){_0xa13dx5= _0xa13dx5[_0x138a[19]](_0xa13dx6.Actions)}}});_0xa13dx3[_0x138a[7]][_0x138a[6]]= _0xa13dx3[_0x138a[7]][_0x138a[6]][_0x138a[20]](_0x138a[8]);_0xa13dx3[_0x138a[7]][_0x138a[10]]= _0xa13dx3[_0x138a[7]][_0x138a[10]][_0x138a[20]](_0x138a[8]);_0xa13dx3[_0x138a[7]][_0x138a[11]]= _0xa13dx3[_0x138a[7]][_0x138a[11]][_0x138a[20]](_0x138a[8]);return _0xa13dx5};function checkCondition(_0xa13dx9,_0xa13dx3){var _0xa13dx11=false;var _0xa13dx12=0;if(_0xa13dx3[_0xa13dx9[_0x138a[21]]]){switch(_0xa13dx9[_0x138a[33]]){case _0x138a[23]:_0xa13dx11= (_0xa13dx3[_0xa13dx9[_0x138a[21]]]== _0xa13dx9[_0x138a[22]]);break;case _0x138a[24]:_0xa13dx11= (_0xa13dx3[_0xa13dx9[_0x138a[21]]]!= _0xa13dx9[_0x138a[22]]);break;case _0x138a[27]:_0xa13dx11= false;if(_[_0x138a[25]](_0xa13dx3[_0xa13dx9[_0x138a[21]]])){for(_0xa13dx12= 0;_0xa13dx12< _0xa13dx3[_0xa13dx9[_0x138a[21]]][_0x138a[17]];_0xa13dx12++){if(_0xa13dx3[_0xa13dx9[_0x138a[21]]][_0xa13dx12][_0x138a[26]](_0xa13dx9[_0x138a[22]])){_0xa13dx11= true;break}}}else {_0xa13dx11= _0xa13dx3[_0xa13dx9[_0x138a[21]]][_0x138a[26]](_0xa13dx9[_0x138a[22]])};break;case _0x138a[28]:_0xa13dx11= true;if(_[_0x138a[25]](_0xa13dx3[_0xa13dx9[_0x138a[21]]])){for(_0xa13dx12= 0;_0xa13dx12< _0xa13dx3[_0xa13dx9[_0x138a[21]]][_0x138a[17]];_0xa13dx12++){if(_0xa13dx3[_0xa13dx9[_0x138a[21]]][_0xa13dx12][_0x138a[26]](_0xa13dx9[_0x138a[22]])){_0xa13dx11= false;break}}}else {_0xa13dx11= !(_0xa13dx3[_0xa13dx9[_0x138a[21]]][_0x138a[26]](_0xa13dx9[_0x138a[22]]))};break;case _0x138a[29]:_0xa13dx11= (_0xa13dx3[_0xa13dx9[_0x138a[21]]]>= Number(_0xa13dx9[_0x138a[22]]));break;case _0x138a[30]:_0xa13dx11= (_0xa13dx3[_0xa13dx9[_0x138a[21]]]<= Number(_0xa13dx9[_0x138a[22]]));break;case _0x138a[31]:_0xa13dx11= (_0xa13dx3[_0xa13dx9[_0x138a[21]]]> Number(_0xa13dx9[_0x138a[22]]));break;case _0x138a[32]:_0xa13dx11= (_0xa13dx3[_0xa13dx9[_0x138a[21]]]< Number(_0xa13dx9[_0x138a[22]]));break;default:}};return _0xa13dx11}module[_0x138a[34]]= Util \ No newline at end of file +'use strict'; + +var _ = require('lodash'); + +function Util() { + console.log('Trigger Utils Initialization...'); +} + +Util.prototype.getActionsByTriggers = function(doc, triggers) { + var actions = []; + doc.dataValues.from = doc.dataValues.from ? doc.dataValues.from.split(';') : []; + doc.dataValues.cc = doc.dataValues.cc ? doc.dataValues.cc.split(';') : []; + doc.dataValues.to = doc.dataValues.to ? doc.dataValues.to.split(';') : []; + triggers.forEach(function(trigger) { + if (trigger.status) { + var All = []; + var Any = []; + trigger.All.forEach(function(condition) { + All.push(checkCondition(condition.dataValues || condition, doc.dataValues)); + }); + trigger.Any.forEach(function(condition) { + Any.push(checkCondition(condition.dataValues || condition, doc.dataValues)); + }); + + 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.dataValues.from = doc.dataValues.from.join(';'); + doc.dataValues.cc = doc.dataValues.cc.join(';'); + doc.dataValues.to = doc.dataValues.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; diff --git a/server/config/triggers/voice.js b/server/config/triggers/voice.js index e07972d..2465c50 100644 --- a/server/config/triggers/voice.js +++ b/server/config/triggers/voice.js @@ -1 +1,7 @@ -var _0xb554=["\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(_0xb554[0]);function Voice(){console[_0xb554[2]](_0xb554[1])}module[_0xb554[3]]= Voice \ No newline at end of file +var _ = require('lodash'); + +function Voice() { + console.log('Trigger Voice Initialization...'); +} + +module.exports = Voice; diff --git a/server/config/util/error.js b/server/config/util/error.js index e903a00..e265f76 100644 --- a/server/config/util/error.js +++ b/server/config/util/error.js @@ -1 +1,24 @@ -var _0x6f01=["\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"];_0x6f01[0];var util=require(_0x6f01[1]);module[_0x6f01[2]]= {handleUniqueConstraintError:function(_0xf116x2,_0xf116x3){var _0xf116x4=[];_0xf116x3[_0x6f01[6]][_0x6f01[5]](function(_0xf116x5){switch(_0xf116x5[_0x6f01[3]]){default:_0xf116x4[_0x6f01[4]](_0xf116x5[_0x6f01[3]])}});_0xf116x4[_0x6f01[4]](_0x6f01[7]);_0xf116x3[_0x6f01[8]]= _0xf116x4[_0x6f01[9]]();return _0xf116x2[_0x6f01[11]](500)[_0x6f01[10]](_0xf116x3)},handleForeignKeyConstraintError:function(_0xf116x2,_0xf116x6,_0xf116x7,_0xf116x3){_0xf116x3[_0x6f01[8]]= util[_0x6f01[13]](_0x6f01[12],_0xf116x6,_0xf116x7);return _0xf116x2[_0x6f01[11]](500)[_0x6f01[10]](_0xf116x3)}} \ No newline at end of file +'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); + } +}; diff --git a/server/config/util/index.js b/server/config/util/index.js index d11f049..5a2ccc7 100644 --- a/server/config/util/index.js +++ b/server/config/util/index.js @@ -1 +1,621 @@ -var _0xab17=["\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"];_0xab17[0];var _=require(_0xab17[1]);var moment=require(_0xab17[2]);var request=require(_0xab17[3]);var User=require(_0xab17[5])[_0xab17[4]];var VoiceQueue=require(_0xab17[5])[_0xab17[6]];var ChatQueue=require(_0xab17[5])[_0xab17[7]];var MailQueue=require(_0xab17[5])[_0xab17[8]];var FaxQueue=require(_0xab17[5])[_0xab17[9]];var SmsQueue=require(_0xab17[5])[_0xab17[10]];var OpenchannelQueue=require(_0xab17[5])[_0xab17[11]];var Action=require(_0xab17[5])[_0xab17[12]];var checkInterval=function(_0x3cbexd){var _0x3cbexe=[_0xab17[13],_0xab17[14],_0xab17[15],_0xab17[16],_0xab17[17],_0xab17[18],_0xab17[19]];var _0x3cbexf=[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 _0x3cbex10=[_0xab17[20],_0xab17[21],_0xab17[22],_0xab17[23],_0xab17[24],_0xab17[25],_0xab17[26],_0xab17[27],_0xab17[28],_0xab17[29],_0xab17[30],_0xab17[31]];var _0x3cbex11,_0x3cbex12;var _0x3cbex13=_0x3cbexd[_0xab17[33]](_0xab17[32])[0];var _0x3cbex14=_0x3cbexd[_0xab17[33]](_0xab17[32])[1];var _0x3cbex15=_0x3cbexd[_0xab17[33]](_0xab17[32])[2];var _0x3cbex16=_0x3cbexd[_0xab17[33]](_0xab17[32])[3];if(_0x3cbex13!== _0xab17[34]){var _0x3cbex17=moment()[_0xab17[36]](_0xab17[35]);var _0x3cbex18=_0x3cbex13[_0xab17[33]](_0xab17[37])[0];var _0x3cbex19=_0x3cbex13[_0xab17[33]](_0xab17[37])[1];if((_0x3cbex17< _0x3cbex18)|| (_0x3cbex17> _0x3cbex19)){console[_0xab17[39]](_0xab17[38]);return false}};if(_0x3cbex14!== _0xab17[34]){var _0x3cbex1a=_0x3cbexe[moment()[_0xab17[40]]()];var _0x3cbex1b=_[_0xab17[41]](_0x3cbexe,_0x3cbex14[_0xab17[33]](_0xab17[37])[0]);var _0x3cbex1c=_[_0xab17[41]](_0x3cbexe,_0x3cbex14[_0xab17[33]](_0xab17[37])[1]);for(_0x3cbex11= 0;_0x3cbex11< _0x3cbex1b;_0x3cbex11++){_0x3cbex12= _0x3cbexe[_0xab17[42]]();_0x3cbexe[_0xab17[43]](_0x3cbex12)};_0x3cbex1b= _[_0xab17[41]](_0x3cbexe,_0x3cbex14[_0xab17[33]](_0xab17[37])[0]);_0x3cbex1c= _[_0xab17[41]](_0x3cbexe,_0x3cbex14[_0xab17[33]](_0xab17[37])[1])+ 1;_0x3cbexe= _0x3cbexe[_0xab17[44]](_0x3cbex1b,_0x3cbex1c);if(!_[_0xab17[45]](_0x3cbexe,_0x3cbex1a)){console[_0xab17[39]](_0xab17[46]);return false}};if(_0x3cbex15!== _0xab17[34]){var _0x3cbex1d=moment()[_0xab17[47]]();var _0x3cbex1e=_[_0xab17[41]](_0x3cbexf,parseInt(_0x3cbex15[_0xab17[33]](_0xab17[37])[0],10));var _0x3cbex1f=_[_0xab17[41]](_0x3cbexf,parseInt(_0x3cbex15[_0xab17[33]](_0xab17[37])[1]));for(_0x3cbex11= 0;_0x3cbex11< _0x3cbex1e;_0x3cbex11++){_0x3cbex12= _0x3cbexf[_0xab17[42]]();_0x3cbexf[_0xab17[43]](_0x3cbex12)};_0x3cbex1e= _[_0xab17[41]](_0x3cbexf,parseInt(_0x3cbex15[_0xab17[33]](_0xab17[37])[0],10));_0x3cbex1f= _[_0xab17[41]](_0x3cbexf,parseInt(_0x3cbex15[_0xab17[33]](_0xab17[37])[1]),10)+ 1;_0x3cbexf= _0x3cbexf[_0xab17[44]](_0x3cbex1e,_0x3cbex1f);if(!_[_0xab17[45]](_0x3cbexf,_0x3cbex1d)){console[_0xab17[39]](_0xab17[48]);return false}};if(_0x3cbex16!== _0xab17[34]){var _0x3cbex20=_0x3cbex10[moment()[_0xab17[49]]()];var _0x3cbex21=_[_0xab17[41]](_0x3cbex10,_0x3cbex16[_0xab17[33]](_0xab17[37])[0]);var _0x3cbex22=_[_0xab17[41]](_0x3cbex10,_0x3cbex16[_0xab17[33]](_0xab17[37])[1]);for(_0x3cbex11= 0;_0x3cbex11< _0x3cbex21;_0x3cbex11++){_0x3cbex12= _0x3cbex10[_0xab17[42]]();_0x3cbex10[_0xab17[43]](_0x3cbex12)};_0x3cbex21= _[_0xab17[41]](_0x3cbex10,_0x3cbex16[_0xab17[33]](_0xab17[37])[0]);_0x3cbex22= _[_0xab17[41]](_0x3cbex10,_0x3cbex16[_0xab17[33]](_0xab17[37])[1])+ 1;_0x3cbex10= _0x3cbex10[_0xab17[44]](_0x3cbex21,_0x3cbex22);if(!_[_0xab17[45]](_0x3cbex10,_0x3cbex20)){console[_0xab17[39]](_0xab17[50]);return false}};console[_0xab17[39]](_0xab17[51]);return true};var isValidInterval=function(_0x3cbexd){if(_[_0xab17[52]](_0x3cbexd)){for(var _0x3cbex11=0;_0x3cbex11< _0x3cbexd[_0xab17[54]][_0xab17[53]];_0x3cbex11++){if(!checkInterval(_0x3cbexd[_0xab17[54]][_0x3cbex11][_0xab17[55]])){return false}};return true}else {return checkInterval(_0x3cbexd)}};var getDate=function(_0x3cbex25,_0x3cbex26){var _0x3cbex27=_0xab17[56];if(moment(_0x3cbex25,_0x3cbex27,true)[_0xab17[57]]()){return moment(_0x3cbex25)}else {switch(_0x3cbex26){case _0xab17[59]:return moment(_0x3cbex25)[_0xab17[58]](_0xab17[40]);case _0xab17[61]:return moment(_0x3cbex25)[_0xab17[60]](_0xab17[40]);default:return moment(_0x3cbex25)}}};var getQuery=function(_0x3cbex29,_0x3cbex2a){var _0x3cbex2b={where:{}};if(_0x3cbex29){var _0x3cbex2c,_0x3cbex2d={};for(var _0x3cbex2e in _0x3cbex29){if(_[_0xab17[45]](_0x3cbex2e,_0xab17[62])){_0x3cbex2c= _0x3cbex2e[_0xab17[64]](_0xab17[62],_0xab17[63]);if(_0x3cbex29[_0x3cbex2c+ _0xab17[65]]){_0x3cbex2b[_0xab17[67]][_0xab17[66]]= _0x3cbex2b[_0xab17[67]][_0xab17[66]]|| [];_0x3cbex2d= {};_0x3cbex2d[_0x3cbex2c]= {$gte:getDate(_0x3cbex29[_0x3cbex2e],_0xab17[59])};_0x3cbex2b[_0xab17[67]][_0xab17[66]][_0xab17[43]](_0x3cbex2d);_0x3cbex2d= {};_0x3cbex2d[_0x3cbex2c]= {$lte:getDate(_0x3cbex29[_0x3cbex2c+ _0xab17[65]],_0xab17[61])};_0x3cbex2b[_0xab17[67]][_0xab17[66]][_0xab17[43]](_0x3cbex2d);delete _0x3cbex29[_0x3cbex2c+ _0xab17[65]]}else {_0x3cbex2b[_0xab17[67]][_0x3cbex2e[_0xab17[64]](_0xab17[62],_0xab17[63])]= {$gte:getDate(_0x3cbex29[_0x3cbex2e],_0xab17[59])}};delete _0x3cbex29[_0x3cbex2e]}else {if(_[_0xab17[45]](_0x3cbex2e,_0xab17[65])){_0x3cbex2c= _0x3cbex2e[_0xab17[64]](_0xab17[65],_0xab17[63]);if(_0x3cbex29[_0x3cbex2c+ _0xab17[62]]){_0x3cbex2b[_0xab17[67]][_0xab17[66]]= _0x3cbex2b[_0xab17[67]][_0xab17[66]]|| [];_0x3cbex2d= {};_0x3cbex2d[_0x3cbex2c]= {$lte:getDate(_0x3cbex29[_0x3cbex2e],_0xab17[61])};_0x3cbex2b[_0xab17[67]][_0xab17[66]][_0xab17[43]](_0x3cbex2d);_0x3cbex2d[_0x3cbex2c]= {$gte:getDate(_0x3cbex29[_0x3cbex2c+ _0xab17[62]],_0xab17[59])};_0x3cbex2b[_0xab17[67]][_0xab17[66]][_0xab17[43]](_0x3cbex2d);delete _0x3cbex29[_0x3cbex2c+ _0xab17[62]]}else {_0x3cbex2b[_0xab17[67]][_0x3cbex2e[_0xab17[64]](_0xab17[65],_0xab17[63])]= {$lte:getDate(_0x3cbex29[_0x3cbex2e],_0xab17[61])}};delete _0x3cbex29[_0x3cbex2e]}}};_[_0xab17[74]](_0x3cbex29,function(_0x3cbex2f,_0x3cbex2e){switch(_0x3cbex2e){case _0xab17[68]:;case _0xab17[69]:_0x3cbex2b[_0x3cbex2e]= Number(_0x3cbex2f);break;case _0xab17[70]:_0x3cbex2b[_0x3cbex2e]= _0x3cbex2f;break;case _0xab17[71]:;case _0xab17[72]:_0x3cbex2b[_0xab17[67]][_0x3cbex2e]= _0x3cbex2f;break;default:_0x3cbex2b[_0xab17[67]][_0x3cbex2e]= {$like:_0xab17[73]+ _0x3cbex2f+ _0xab17[73]}}})};if(_0x3cbex2a){_[_0xab17[75]](_0x3cbex2b[_0xab17[67]],_0x3cbex2a)};return _0x3cbex2b};var getVoiceQueuesIdByUser=function(_0x3cbex29,_0x3cbex31){return function(_0x3cbex32){var _0x3cbex33=[];var _0x3cbex34=_0x3cbex32;var _0x3cbex2b=_0x3cbex29|| {};var _0x3cbex35=_0x3cbex31|| {};return _0x3cbex34[_0xab17[80]]({attributes:[_0xab17[78]]})[_0xab17[77]](function(_0x3cbex36){_0x3cbex33= _[_0xab17[79]](_0x3cbex36,_0xab17[78])})[_0xab17[77]](function(){return VoiceQueue[_0xab17[76]](_[_0xab17[75]](getQuery(_0x3cbex29,{name:{$in:_0x3cbex33}}),_0x3cbex35))})}};var getChatQueuesIdByUser=function(_0x3cbex29,_0x3cbex31){return function(_0x3cbex32){var _0x3cbex33=[];var _0x3cbex34=_0x3cbex32;var _0x3cbex2b=_0x3cbex29|| {};var _0x3cbex35=_[_0xab17[75]](_0x3cbex31|| {},{distinct:true});return _0x3cbex34[_0xab17[84]]({attributes:[_0xab17[83]]})[_0xab17[77]](function(_0x3cbex36){_0x3cbex33= _[_0xab17[79]](_0x3cbex36,_0xab17[83])})[_0xab17[77]](function(){return ChatQueue[_0xab17[82]](_0xab17[81])[_0xab17[76]](_[_0xab17[75]](getQuery(_0x3cbex2b,{id:{$in:_0x3cbex33}}),_0x3cbex35))})}};var getMailQueuesIdByUser=function(_0x3cbex29,_0x3cbex31){return function(_0x3cbex32){var _0x3cbex33=[];var _0x3cbex34=_0x3cbex32;var _0x3cbex2b=_0x3cbex29|| {};var _0x3cbex35=_[_0xab17[75]](_0x3cbex31|| {},{distinct:true});return _0x3cbex34[_0xab17[85]]({attributes:[_0xab17[83]]})[_0xab17[77]](function(_0x3cbex36){_0x3cbex33= _[_0xab17[79]](_0x3cbex36,_0xab17[83])})[_0xab17[77]](function(){return MailQueue[_0xab17[82]](_0xab17[81])[_0xab17[76]](_[_0xab17[75]](getQuery(_0x3cbex2b,{id:{$in:_0x3cbex33}}),_0x3cbex35))})}};var getSmsQueuesIdByUser=function(_0x3cbex29,_0x3cbex31){return function(_0x3cbex32){var _0x3cbex33=[];var _0x3cbex34=_0x3cbex32;var _0x3cbex2b=_0x3cbex29|| {};var _0x3cbex35=_[_0xab17[75]](_0x3cbex31|| {},{distinct:true});return _0x3cbex34[_0xab17[86]]({attributes:[_0xab17[83]]})[_0xab17[77]](function(_0x3cbex36){_0x3cbex33= _[_0xab17[79]](_0x3cbex36,_0xab17[83])})[_0xab17[77]](function(){return SmsQueue[_0xab17[82]](_0xab17[81])[_0xab17[76]](_[_0xab17[75]](getQuery(_0x3cbex2b,{id:{$in:_0x3cbex33}}),_0x3cbex35))})}};var getFaxQueuesIdByUser=function(_0x3cbex29,_0x3cbex31){return function(_0x3cbex32){var _0x3cbex33=[];var _0x3cbex34=_0x3cbex32;var _0x3cbex2b=_0x3cbex29|| {};var _0x3cbex35=_[_0xab17[75]](_0x3cbex31|| {},{distinct:true});return _0x3cbex34[_0xab17[87]]({attributes:[_0xab17[83]]})[_0xab17[77]](function(_0x3cbex36){_0x3cbex33= _[_0xab17[79]](_0x3cbex36,_0xab17[83])})[_0xab17[77]](function(){return FaxQueue[_0xab17[82]](_0xab17[81])[_0xab17[76]](_[_0xab17[75]](getQuery(_0x3cbex2b,{id:{$in:_0x3cbex33}}),_0x3cbex35))})}};var getOpenchannelQueuesIdByUser=function(_0x3cbex29,_0x3cbex31){return function(_0x3cbex32){var _0x3cbex33=[];var _0x3cbex34=_0x3cbex32;var _0x3cbex2b=_0x3cbex29|| {};var _0x3cbex35=_[_0xab17[75]](_0x3cbex31|| {},{distinct:true});return _0x3cbex34[_0xab17[88]]({attributes:[_0xab17[83]]})[_0xab17[77]](function(_0x3cbex36){_0x3cbex33= _[_0xab17[79]](_0x3cbex36,_0xab17[83])})[_0xab17[77]](function(){return OpenchannelQueue[_0xab17[82]](_0xab17[81])[_0xab17[76]](_[_0xab17[75]](getQuery(_0x3cbex2b,{id:{$in:_0x3cbex33}}),_0x3cbex35))})}};var getAgentsIdByUser=function(_0x3cbex29){return function(_0x3cbex32){var _0x3cbex3d=[];var _0x3cbex34=_0x3cbex32;var _0x3cbex2b=_0x3cbex29|| {};var _0x3cbex3e=[],_0x3cbex3f=[],_0x3cbex40=[],_0x3cbex41=[],_0x3cbex42=[],_0x3cbex43=[];return _0x3cbex34[_0xab17[80]]({attributes:[_0xab17[78]],include:[{raw:true,model:User,attributes:[_0xab17[83]]}]})[_0xab17[77]](function(_0x3cbex36){_0x3cbex3e= _[_0xab17[79]](_0x3cbex36,_0xab17[78]);_0x3cbex36[_0xab17[74]](function(_0x3cbex44){_0x3cbex3d= _[_0xab17[94]](_0x3cbex3d,_[_0xab17[79]](_0x3cbex44.Users,_0xab17[83]))})})[_0xab17[77]](function(){return _0x3cbex34[_0xab17[84]]({attributes:[_0xab17[83]],include:[{raw:true,model:User,attributes:[_0xab17[83]]}]})})[_0xab17[77]](function(_0x3cbex36){_0x3cbex3f= _[_0xab17[79]](_0x3cbex36,_0xab17[83]);_0x3cbex36[_0xab17[74]](function(_0x3cbex44){_0x3cbex3d= _[_0xab17[94]](_0x3cbex3d,_[_0xab17[79]](_0x3cbex44.Users,_0xab17[83]))})})[_0xab17[77]](function(){return _0x3cbex34[_0xab17[85]]({attributes:[_0xab17[83]],include:[{raw:true,model:User,attributes:[_0xab17[83]]}]})})[_0xab17[77]](function(_0x3cbex36){_0x3cbex40= _[_0xab17[79]](_0x3cbex36,_0xab17[83]);_0x3cbex36[_0xab17[74]](function(_0x3cbex44){_0x3cbex3d= _[_0xab17[94]](_0x3cbex3d,_[_0xab17[79]](_0x3cbex44.Users,_0xab17[83]))})})[_0xab17[77]](function(){return _0x3cbex34[_0xab17[87]]({attributes:[_0xab17[83]],include:[{raw:true,model:User,attributes:[_0xab17[83]]}]})})[_0xab17[77]](function(_0x3cbex36){_0x3cbex41= _[_0xab17[79]](_0x3cbex36,_0xab17[83]);_0x3cbex36[_0xab17[74]](function(_0x3cbex44){_0x3cbex3d= _[_0xab17[94]](_0x3cbex3d,_[_0xab17[79]](_0x3cbex44.Users,_0xab17[83]))})})[_0xab17[77]](function(){return _0x3cbex34[_0xab17[86]]({attributes:[_0xab17[83]],include:[{raw:true,model:User,attributes:[_0xab17[83]]}]})})[_0xab17[77]](function(_0x3cbex36){_0x3cbex43= _[_0xab17[79]](_0x3cbex36,_0xab17[83]);_0x3cbex36[_0xab17[74]](function(_0x3cbex44){_0x3cbex3d= _[_0xab17[94]](_0x3cbex3d,_[_0xab17[79]](_0x3cbex44.Users,_0xab17[83]))})})[_0xab17[77]](function(){return _0x3cbex34[_0xab17[88]]({attributes:[_0xab17[83]],include:[{raw:true,model:User,attributes:[_0xab17[83]]}]})})[_0xab17[77]](function(_0x3cbex36){_0x3cbex42= _[_0xab17[79]](_0x3cbex36,_0xab17[83]);_0x3cbex36[_0xab17[74]](function(_0x3cbex44){_0x3cbex3d= _[_0xab17[94]](_0x3cbex3d,_[_0xab17[79]](_0x3cbex44.Users,_0xab17[83]))})})[_0xab17[77]](function(){return User[_0xab17[82]](_0xab17[89],{method:[_0xab17[90],_0x3cbex2b]},{method:[_0xab17[91],_0x3cbex2b]},{method:[_0xab17[92],_0x3cbex2b]},{method:[_0xab17[93],_0x3cbex2b]})[_0xab17[76]](_[_0xab17[75]](getQuery(_0x3cbex2b,{id:{$in:_0x3cbex3d}}),{include:[{model:VoiceQueue,where:{name:{$in:_0x3cbex3e}},required:false},{model:ChatQueue,where:{id:{$in:_0x3cbex3f}},required:false},{model:MailQueue,where:{id:{$in:_0x3cbex40}},required:false},{model:FaxQueue,where:{id:{$in:_0x3cbex41}},required:false},{model:SmsQueue,where:{id:{$in:_0x3cbex43}},required:false},{model:OpenchannelQueue,where:{id:{$in:_0x3cbex42}},required:false}]}))})}};var stripTrailingSlash=function(_0x3cbex46){if(_0x3cbex46[_0xab17[95]](-1) === _0xab17[96]){return _0x3cbex46[_0xab17[95]](0,_0x3cbex46[_0xab17[53]]- 1)};return _0x3cbex46};var sendRequest=function(_0x3cbex48,_0x3cbex49,_0x3cbex4a){if(_0x3cbex49== _0xab17[97]|| _0x3cbex49== _0xab17[98]){var _0x3cbex4b={method:_0x3cbex49,uri:_0x3cbex4a,body:_0x3cbex48,json:true};return request(_0x3cbex4b)}else {console[_0xab17[39]](_0xab17[99])}};var execAction=function(_0x3cbex4d,_0x3cbex48){switch(_0x3cbex4d[_0xab17[103]]){case _0xab17[107]:Action[_0xab17[106]]({name:_0x3cbex4d[_0xab17[103]],data4:_0x3cbex4d[_0xab17[71]]|| _0xab17[104]},{body:{name:_0x3cbex4d[_0xab17[103]],agent:_0x3cbex48[_0xab17[105]],type:_0x3cbex4d[_0xab17[71]]|| _0xab17[104]}})[_0xab17[77]](function(){console[_0xab17[39]](_0xab17[102])})[_0xab17[101]](function(_0x3cbex4e){console[_0xab17[39]](_0xab17[100],_0x3cbex4e)});break;default:console[_0xab17[39]](_0xab17[108])}};module[_0xab17[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(_0xab17[110])} \ No newline at end of file +'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') +}; diff --git a/server/files/images/GFaRDyYiCsV7eNHw.jpg b/server/files/images/GFaRDyYiCsV7eNHw.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1f8049c3f20d4ddb5d8edea6b89a42dd14989fb4 GIT binary patch literal 10337 zcmb_>byQr-((i`Bb#V9KHaLXfmf&uK&EW2u;5I;j;1+^AAxN-<5FCONTml3F2@b&t z32!*(-h1v_>-+wAYrUQ|yJ}b0-rd!^yZTqvcMEsx09aM|i86qK3IHg`A8>a7ywrAZ z_i^`jaQ9#o;)4L<@=r9-(180AMvH0>kSg24pLh#c>YK_73+fs?@qt+eD$t^G0B~h_ z4Mm6m1OkDm1xsyRE#)WbN&pJ7$EbKN)~?>DU;uD+^YPMEk!LhE zF=fPDL0UrvfB;TF0%q;)A*Zda{+A8^0dg3^KF0W=<6yVbw-iA zto?uS@c-if)h<#609gy(lmEZP$2I`je*jRH2Y~xA{rm0zjMYCf5IM37Ldb7X`j5=L z7y!i2k@6S+$ly5u&>9T@luQ4}9uxuqVH5zgOj!GR`TgAnK#im$D4#&q=&4xFxEEj< zG94OWrW4K=f|Qb}%IG@&<_FFmLFjP}xzB1HKL$_t?m+JD?v?=s00Rvj104+m104es z69WqejDv%XjYCR6hzF)1rKF@FB`2q*V`ZSGVWA}_XXIgIVPogy;-q5Wh46AfSUEU3 z?q7m}iHV7Wg+qdaL&8B#PR;TET<&@RA}nAW7zY8&016QbDiO+EA3%c~AP~y^oc(t} zLq`Q+pkM;XN(yAfe^((tK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FqnNOuh*0?gjroUhQS4Z5d~8GgT+yiQ9w zVUK$cQ1;&w1^wCb3@UKXn{7OV7+7;{>s__gnh$Vc3dGhQwuH~$3JtO{cZpEaIV12s z7NfQQP8R+w@$+fgEfb7u_Pkh={a7Y%u_vlwKGoL0_S&fmc>(+UXc5TO(J*(kbzaS)&kBncE_B2mKT~}K>4lHy*RP^$G~E6MeaY`-$ky(P&r}CwXWV_8&3Fl#3eFOK!wM( zmrrp97K5w6AVWhX=G;2>=L66@AfcsP5TRm1yG~$YP%*F=T;R+o*3Z{3i2;6p27X)1 z!n|eVV+J`YB>(*a2Ez05mBE?$V^Fb`tf8#=nYEpU+3k>dn?KuW_ZZdj>B`1-%`o}& z4F<%#+3;Ab=hKpnO|81HXy9Rn#++}5-QS+o6dPN}SQok@dl@DL+xEJ@aSNYr^V>M+ zUVO?6gY@k%&x7^z+`Qm<%Dv^>DFznX9N1bHUf#w469X#c+ql9f1B-2*0Ibc0R~tku zn7#SviSUI61hsl5e2s~Z= KT-G@yGywoGB^I>+ literal 0 HcmV?d00001 diff --git a/server/files/reports/report_Pippo_dCPRPfdeVvaixjks63nh.csv b/server/files/reports/report_Pippo_dCPRPfdeVvaixjks63nh.csv deleted file mode 100644 index 8f72755..0000000 --- a/server/files/reports/report_Pippo_dCPRPfdeVvaixjks63nh.csv +++ /dev/null @@ -1,5 +0,0 @@ -name,fullname -giuseppe.careri,Giuseppe Careri -tony.russell,Tony Russell -john.doe,John Doe -xcally.team,xCALLY Team diff --git a/server/files/reports/report_Prova_FgpIOapfEnLcjrgVEvXz.csv b/server/files/reports/report_Prova_FgpIOapfEnLcjrgVEvXz.csv new file mode 100644 index 0000000..2d0c146 --- /dev/null +++ b/server/files/reports/report_Prova_FgpIOapfEnLcjrgVEvXz.csv @@ -0,0 +1,4 @@ +name,fullname +giuseppe.careri,Giuseppe Careri +valerio.ciotta,Valerio Ciotta +colin.fair,Colin Fair diff --git a/server/files/reports/report_Prova_H7rtxarQ7NFEguy2syyW.csv b/server/files/reports/report_Prova_H7rtxarQ7NFEguy2syyW.csv new file mode 100644 index 0000000..7d07f28 --- /dev/null +++ b/server/files/reports/report_Prova_H7rtxarQ7NFEguy2syyW.csv @@ -0,0 +1,3 @@ +name,fullname +daniele.cinti,Daniele Cinti +colin.fair,Colin Fair diff --git a/server/files/reports/report_Prova_LfTHdNiXeXtwLPt7UTYV.csv b/server/files/reports/report_Prova_LfTHdNiXeXtwLPt7UTYV.csv new file mode 100644 index 0000000..2d0c146 --- /dev/null +++ b/server/files/reports/report_Prova_LfTHdNiXeXtwLPt7UTYV.csv @@ -0,0 +1,4 @@ +name,fullname +giuseppe.careri,Giuseppe Careri +valerio.ciotta,Valerio Ciotta +colin.fair,Colin Fair diff --git a/server/files/reports/report_Prova_ku1CULYjGIxckD9PES5f.csv b/server/files/reports/report_Prova_ku1CULYjGIxckD9PES5f.csv new file mode 100644 index 0000000..7d07f28 --- /dev/null +++ b/server/files/reports/report_Prova_ku1CULYjGIxckD9PES5f.csv @@ -0,0 +1,3 @@ +name,fullname +daniele.cinti,Daniele Cinti +colin.fair,Colin Fair diff --git a/server/files/reports/report_Prova_um7RdOOmVreyIlmXP7QG.csv b/server/files/reports/report_Prova_um7RdOOmVreyIlmXP7QG.csv new file mode 100644 index 0000000..7d07f28 --- /dev/null +++ b/server/files/reports/report_Prova_um7RdOOmVreyIlmXP7QG.csv @@ -0,0 +1,3 @@ +name,fullname +daniele.cinti,Daniele Cinti +colin.fair,Colin Fair diff --git a/server/files/reports/report_Prova_vbQu5m4AmnrKrffFHPEY.csv b/server/files/reports/report_Prova_vbQu5m4AmnrKrffFHPEY.csv new file mode 100644 index 0000000..7d07f28 --- /dev/null +++ b/server/files/reports/report_Prova_vbQu5m4AmnrKrffFHPEY.csv @@ -0,0 +1,3 @@ +name,fullname +daniele.cinti,Daniele Cinti +colin.fair,Colin Fair diff --git a/server/files/reports/report_Prova_zUmaublsfQVYnmqsmFM1.csv b/server/files/reports/report_Prova_zUmaublsfQVYnmqsmFM1.csv new file mode 100644 index 0000000..2d0c146 --- /dev/null +++ b/server/files/reports/report_Prova_zUmaublsfQVYnmqsmFM1.csv @@ -0,0 +1,4 @@ +name,fullname +giuseppe.careri,Giuseppe Careri +valerio.ciotta,Valerio Ciotta +colin.fair,Colin Fair diff --git a/server/migrations-history/20160801125118-placeholder.js b/server/migrations-history/20160801125118-placeholder.js index f1faaaf..f9b590d 100644 --- a/server/migrations-history/20160801125118-placeholder.js +++ b/server/migrations-history/20160801125118-placeholder.js @@ -1 +1,23 @@ -var _0x9dfc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x9dfc[0];module[_0x9dfc[1]]= {up:function(_0x2984x1,_0x2984x2){},down:function(_0x2984x1,_0x2984x2){}} \ No newline at end of file +'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'); + */ + } +}; diff --git a/server/routes.js b/server/routes.js index 2beec63..f4b8fe8 100644 --- a/server/routes.js +++ b/server/routes.js @@ -1 +1,169 @@ -var _0xa0ac=["\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","\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x73","\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"];_0xa0ac[0];var config=require(_0xa0ac[1]);var errors=require(_0xa0ac[2]);var path=require(_0xa0ac[3]);var moment=require(_0xa0ac[4]);module[_0xa0ac[5]]= function(_0xb22bx5,_0xb22bx6){var _0xb22bx7=_0xb22bx5[_0xa0ac[7]](_0xa0ac[6]);_0xb22bx5[_0xa0ac[9]][_0xa0ac[8]]= _0xb22bx6;_0xb22bx5[_0xa0ac[12]](_0xa0ac[10],require(_0xa0ac[11]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[13],require(_0xa0ac[14]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[15],require(_0xa0ac[16]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[17],require(_0xa0ac[18]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[19],require(_0xa0ac[20]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[21],require(_0xa0ac[22]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[23],require(_0xa0ac[24]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[25],require(_0xa0ac[26]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[27],require(_0xa0ac[28]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[29],require(_0xa0ac[30]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[31],require(_0xa0ac[32]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[33],require(_0xa0ac[34]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[35],require(_0xa0ac[36]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[37],require(_0xa0ac[38]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[39],require(_0xa0ac[40]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[41],require(_0xa0ac[42]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[43],require(_0xa0ac[44]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[45],require(_0xa0ac[46]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[47],require(_0xa0ac[48]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[49],require(_0xa0ac[50]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[51],require(_0xa0ac[52]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[53],require(_0xa0ac[54]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[55],require(_0xa0ac[56]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[57],require(_0xa0ac[58]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[59],require(_0xa0ac[60]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[61],require(_0xa0ac[62]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[63],require(_0xa0ac[64]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[65],require(_0xa0ac[66]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[67],require(_0xa0ac[68]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[69],require(_0xa0ac[70]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[71],require(_0xa0ac[72]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[73],require(_0xa0ac[74]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[75],require(_0xa0ac[76]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[77],require(_0xa0ac[78]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[79],require(_0xa0ac[80]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[81],require(_0xa0ac[82]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[83],require(_0xa0ac[84]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[85],require(_0xa0ac[86]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[87],require(_0xa0ac[88]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[89],require(_0xa0ac[90]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[91],require(_0xa0ac[92]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[93],require(_0xa0ac[94]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[95],require(_0xa0ac[96]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[97],require(_0xa0ac[98]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[99],require(_0xa0ac[100]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[101],require(_0xa0ac[102]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[103],require(_0xa0ac[104]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[105],require(_0xa0ac[106]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[107],require(_0xa0ac[108]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[109],require(_0xa0ac[110]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[111],require(_0xa0ac[112]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[113],require(_0xa0ac[114]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[115],require(_0xa0ac[116]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[117],require(_0xa0ac[118]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[119],require(_0xa0ac[120]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[121],require(_0xa0ac[122]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[123],require(_0xa0ac[124]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[125],require(_0xa0ac[126]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[127],require(_0xa0ac[128]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[129],require(_0xa0ac[130]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[131],require(_0xa0ac[132]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[133],require(_0xa0ac[134]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[135],require(_0xa0ac[136]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[137],require(_0xa0ac[138]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[139],require(_0xa0ac[140]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[141],require(_0xa0ac[142]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[143],require(_0xa0ac[144]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[145],require(_0xa0ac[146]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[147],require(_0xa0ac[148]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[149],require(_0xa0ac[150]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[151],require(_0xa0ac[152]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[153],require(_0xa0ac[154]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[155],require(_0xa0ac[156]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[157],require(_0xa0ac[158]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[159],require(_0xa0ac[160]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[161],require(_0xa0ac[162]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[163],require(_0xa0ac[164]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[165],require(_0xa0ac[166]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[167],require(_0xa0ac[168]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[169],require(_0xa0ac[170]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[171],require(_0xa0ac[172]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[173],require(_0xa0ac[174]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[175],require(_0xa0ac[176]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[177],require(_0xa0ac[178]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[179],require(_0xa0ac[180]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[181],require(_0xa0ac[182]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[183],require(_0xa0ac[184]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[185],require(_0xa0ac[186]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[187],require(_0xa0ac[188]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[189],require(_0xa0ac[190]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[191],require(_0xa0ac[192]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[193],require(_0xa0ac[194]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[195],require(_0xa0ac[196]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[197],require(_0xa0ac[198]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[199],require(_0xa0ac[200]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[201],require(_0xa0ac[202]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[203],require(_0xa0ac[204]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[205],require(_0xa0ac[206]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[207],require(_0xa0ac[208]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[209],require(_0xa0ac[210]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[211],require(_0xa0ac[212]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[213],require(_0xa0ac[214]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[215],require(_0xa0ac[216]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[217],require(_0xa0ac[218]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[219],require(_0xa0ac[220]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[221],require(_0xa0ac[222]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[223],require(_0xa0ac[224]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[225],require(_0xa0ac[226]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[227],require(_0xa0ac[228]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[229],require(_0xa0ac[230]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[231],require(_0xa0ac[232]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[233],require(_0xa0ac[234]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[235],require(_0xa0ac[236]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[237],require(_0xa0ac[238]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[239],require(_0xa0ac[240]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[241],require(_0xa0ac[242]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[243],require(_0xa0ac[244]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[225],require(_0xa0ac[226]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[245],require(_0xa0ac[246]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[247],require(_0xa0ac[248]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[249],require(_0xa0ac[250]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[251],require(_0xa0ac[252]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[253],require(_0xa0ac[254]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[255],require(_0xa0ac[256]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[257],require(_0xa0ac[258]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[259],require(_0xa0ac[260]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[261],require(_0xa0ac[262]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[263],require(_0xa0ac[264]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[265],require(_0xa0ac[266]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[267],require(_0xa0ac[268]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[269],require(_0xa0ac[270]));_0xb22bx5[_0xa0ac[12]](_0xa0ac[271],require(_0xa0ac[272]));_0xb22bx5[_0xa0ac[274]](_0xa0ac[273])[_0xa0ac[7]](errors[404]);_0xb22bx5[_0xa0ac[285]](_0xa0ac[275],function(_0xb22bx8,_0xb22bx9,_0xb22bxa){var _0xb22bxb={};if(_0xa0ac[276]=== _0xb22bx7){_0xb22bxb[_0xa0ac[277]]= path[_0xa0ac[279]](config[_0xa0ac[277]],_0xa0ac[278])};if(_0xa0ac[280]=== _0xb22bx7|| _0xa0ac[281]=== _0xb22bx7){_0xb22bxb[_0xa0ac[277]]= path[_0xa0ac[279]](config[_0xa0ac[277]],_0xa0ac[282])};_0xb22bx9[_0xa0ac[284]](_0xa0ac[283],_0xb22bxb)})} \ No newline at end of file +/** + * 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, ami) { + var env = app.get('env'); + app.locals.ami = ami; + + // 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); + }); +}; diff --git a/server/services/dashboard/hooks/index.js b/server/services/dashboard/hooks/index.js new file mode 100644 index 0000000..8d5258f --- /dev/null +++ b/server/services/dashboard/hooks/index.js @@ -0,0 +1,12 @@ +'use strict'; + +const User = require('../../../models').User; +const VoiceQueue = require('../../../models').VoiceQueue; + +const _ = require('lodash'); + +module.exports = function(n) { + console.log('services/dashboard/hooks'); + + require('./voice')(n); +}; diff --git a/server/services/dashboard/hooks/voice.js b/server/services/dashboard/hooks/voice.js new file mode 100644 index 0000000..0057bb8 --- /dev/null +++ b/server/services/dashboard/hooks/voice.js @@ -0,0 +1,85 @@ +'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.dataValues.type = type; + process.send(doc.dataValues); +} + +module.exports = function(n) { + // START REPORT AGENT HOOKS + ReportAgent.afterUpdate(function(doc) { + if (doc.changed('holdtime')) { + onSend(n, 'holdtime', doc); + } + }); + + ReportAgent.afterUpdate(function(doc) { + if (doc.changed('talktime')) { + onSend(n, 'talktime', doc); + } + }); + // END REPORT AGENT HOOKS + + // START REPORT QUEUE HOOKS + ReportQueue.afterCreate(function(doc) { + onSend(n, 'waiting:up', doc) + }); + + ReportQueue.afterUpdate(function(doc) { + 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); + } + }); + // END REPORT QUEUE HOOKS + + // START REPORT CALLS HOOKS + ReportCall.afterCreate(function(doc) { + if (doc.type === 'outbound') { + onSend(n, 'outbound:up', doc); + } + }); + // END REPORT QUEUE HOOKS + + UserHasVoiceQueue.afterCreate(function(doc) { + onSend(n, 'agent:join', doc); + }); + + UserHasVoiceQueue.afterDestroy(function(doc) { + onSend(n, 'agent:leave', doc); + }); + + UserHasVoiceQueue.afterUpdate(function(doc) { + if (doc.changed('lastcall')) { + onSend(n, 'lastcall', doc); + } + }); +}; diff --git a/server/services/dashboard/index.js b/server/services/dashboard/index.js new file mode 100644 index 0000000..d317e36 --- /dev/null +++ b/server/services/dashboard/index.js @@ -0,0 +1,20 @@ +'use strict'; + +const util = require('util'); +const cp = require('child_process'); + +module.exports = function(io) { + 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); + + return n; +}; diff --git a/server/services/dashboard/workers/index.js b/server/services/dashboard/workers/index.js new file mode 100644 index 0000000..9048c74 --- /dev/null +++ b/server/services/dashboard/workers/index.js @@ -0,0 +1,188 @@ +'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); + }); diff --git a/server/services/dashboard/workers/voice.js b/server/services/dashboard/workers/voice.js new file mode 100644 index 0000000..c4540c7 --- /dev/null +++ b/server/services/dashboard/workers/voice.js @@ -0,0 +1,216 @@ +'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) {} + + function onAgentLeave(data) {} + + 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: + } + }); +}; diff --git a/server/utils/report_build.js b/server/utils/report_build.js index 87825de..6071e7f 100644 --- a/server/utils/report_build.js +++ b/server/utils/report_build.js @@ -1 +1,508 @@ -var _0x7128=["\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","\x67\x65\x74\x54\x61\x62\x6C\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","\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\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E\x48\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\x5F\x68\x69\x73\x74\x6F\x72\x79","\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","\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","\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","\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","\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","\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","\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","\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","\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","\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","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E","\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\x6D\x65\x6D\x62\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","\x72\x65\x70\x6F\x72\x74\x5F\x71\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","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\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","\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","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C","\x75\x73\x65\x72","\x72\x6F\x6C\x65","\x62\x75\x69\x6C\x64\x51\x75\x65\x72\x79","\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\x69\x65\x6C\x64","\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","\x74\x61\x62\x6C\x65","\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","\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","\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"];var _=require(_0x7128[0]);var util=require(_0x7128[1]);var User=require(_0x7128[3])[_0x7128[2]];var Promise=require(_0x7128[4]);var Util=require(_0x7128[5]);var sequelize=require(_0x7128[3])[_0x7128[6]];exports[_0x7128[7]]= function(_0x4bc3x7){var _0x4bc3x8;switch(_0x4bc3x7){case _0x7128[10]:_0x4bc3x8= require(_0x7128[3])[_0x7128[9]][_0x7128[8]];break;case _0x7128[12]:_0x4bc3x8= require(_0x7128[3])[_0x7128[9]][_0x7128[11]];break;case _0x7128[14]:_0x4bc3x8= require(_0x7128[3])[_0x7128[9]][_0x7128[13]];break;case _0x7128[16]:_0x4bc3x8= require(_0x7128[3])[_0x7128[9]][_0x7128[15]];break;case _0x7128[18]:_0x4bc3x8= require(_0x7128[3])[_0x7128[9]][_0x7128[17]];break;case _0x7128[20]:_0x4bc3x8= require(_0x7128[3])[_0x7128[9]][_0x7128[19]];break;case _0x7128[22]:_0x4bc3x8= require(_0x7128[3])[_0x7128[9]][_0x7128[21]];break;case _0x7128[24]:_0x4bc3x8= require(_0x7128[3])[_0x7128[9]][_0x7128[23]];break;case _0x7128[26]:_0x4bc3x8= require(_0x7128[3])[_0x7128[25]];break;case _0x7128[28]:_0x4bc3x8= require(_0x7128[3])[_0x7128[27]];break;case _0x7128[30]:_0x4bc3x8= require(_0x7128[3])[_0x7128[9]][_0x7128[29]];break;case _0x7128[32]:_0x4bc3x8= require(_0x7128[3])[_0x7128[9]][_0x7128[31]];break;case _0x7128[33]:_0x4bc3x8= require(_0x7128[3])[_0x7128[2]];break;case _0x7128[35]:_0x4bc3x8= require(_0x7128[3])[_0x7128[9]][_0x7128[34]];break;case _0x7128[37]:_0x4bc3x8= require(_0x7128[3])[_0x7128[36]];break;case _0x7128[39]:_0x4bc3x8= require(_0x7128[3])[_0x7128[38]];break;case _0x7128[41]:_0x4bc3x8= require(_0x7128[3])[_0x7128[40]];break;case _0x7128[43]:_0x4bc3x8= require(_0x7128[3])[_0x7128[42]];break;case _0x7128[45]:_0x4bc3x8= require(_0x7128[3])[_0x7128[44]];break;case _0x7128[47]:_0x4bc3x8= require(_0x7128[3])[_0x7128[46]];break;case _0x7128[49]:_0x4bc3x8= require(_0x7128[3])[_0x7128[48]];break;case _0x7128[51]:_0x4bc3x8= require(_0x7128[3])[_0x7128[50]];break;case _0x7128[53]:_0x4bc3x8= require(_0x7128[3])[_0x7128[52]];break;case _0x7128[55]:_0x4bc3x8= require(_0x7128[3])[_0x7128[54]];break;default:};return _0x4bc3x8};exports[_0x7128[56]]= function(_0x4bc3x9){return function(_0x4bc3x7){switch(_0x4bc3x9[_0x7128[101]]){case _0x7128[100]:var _0x4bc3xa=_0x7128[57];var _0x4bc3xb=_0x4bc3x7[_0x7128[59]](_0x7128[58],_0x7128[57]);switch(_0x4bc3xb){case _0x7128[80]:var _0x4bc3xc;return User[_0x7128[79]](_0x4bc3x9[_0x7128[74]],{attributes:[_0x7128[74]]})[_0x7128[72]](Util[_0x7128[78]]({},{attributes:[_0x7128[74]],include:[{raw:true,model:User,attributes:[_0x7128[74]]}]}))[_0x7128[72]](function(_0x4bc3xe){var _0x4bc3xf=[];_0x4bc3xc= _[_0x7128[75]](_0x4bc3xe[_0x7128[73]],_0x7128[74]);_0x4bc3xe[_0x7128[73]][_0x7128[77]](function(_0x4bc3x10){_0x4bc3xf= _[_0x7128[76]](_0x4bc3xf,_[_0x7128[75]](_0x4bc3x10.Users,_0x7128[74]))});return _0x4bc3xf})[_0x7128[72]](function(_0x4bc3xd){if(_0x4bc3xc[_0x7128[60]]&& _0x4bc3xd[_0x7128[60]]){_0x4bc3xa= _0x7128[61]+ _0x4bc3xc[_0x7128[63]](_0x7128[62])+ _0x7128[64];_0x4bc3xa+= _0x7128[65]+ _0x4bc3xd[_0x7128[63]](_0x7128[66])+ _0x7128[67]}else {if(_0x4bc3xc[_0x7128[60]]){_0x4bc3xa= _0x7128[68]+ _0x4bc3xc[_0x7128[63]](_0x7128[62])+ _0x7128[64]}else {_0x4bc3xa= _0x7128[69]}};console[_0x7128[71]](_0x7128[70],_0x4bc3xa);return _0x4bc3xa});case _0x7128[85]:var _0x4bc3x11;return User[_0x7128[79]](_0x4bc3x9[_0x7128[74]],{attributes:[_0x7128[74]]})[_0x7128[72]](Util[_0x7128[84]]({},{attributes:[_0x7128[83]],include:[{raw:true,model:User,attributes:[_0x7128[83]]}]}))[_0x7128[72]](function(_0x4bc3xe){var _0x4bc3xf=[];_0x4bc3xe[_0x7128[73]][_0x7128[77]](function(_0x4bc3x10){_0x4bc3xf= _[_0x7128[76]](_0x4bc3xf,_[_0x7128[75]](_0x4bc3x10.Users,_0x7128[83]))});return _0x4bc3xf})[_0x7128[72]](function(_0x4bc3xd){if(_0x4bc3xd[_0x7128[60]]){_0x4bc3xa= _0x7128[81]+ _0x4bc3xd[_0x7128[63]](_0x7128[66])+ _0x7128[82]}else {_0x4bc3xa= _0x7128[69]};console[_0x7128[71]](_0x7128[70],_0x4bc3xa);return _0x4bc3xa});case _0x7128[86]:;case _0x7128[88]:return User[_0x7128[79]](_0x4bc3x9[_0x7128[74]],{attributes:[_0x7128[74]]})[_0x7128[72]](Util[_0x7128[84]]())[_0x7128[72]](function(_0x4bc3x12){if(_0x4bc3x12[_0x7128[73]][_0x7128[60]]){_0x4bc3x12= _[_0x7128[75]](_0x4bc3x12[_0x7128[73]],_0x7128[83]);_0x4bc3xa= _0x7128[87]+ _0x4bc3x12[_0x7128[63]](_0x7128[66])+ _0x7128[82]}else {_0x4bc3xa= _0x7128[69]};console[_0x7128[71]](_0x7128[70],_0x4bc3xa);return _0x4bc3xa});case _0x7128[90]:var _0x4bc3x13;return User[_0x7128[79]](_0x4bc3x9[_0x7128[74]],{attributes:[_0x7128[74]]})[_0x7128[72]](Util[_0x7128[89]]({},{attributes:[_0x7128[74]],include:[{raw:true,model:User,attributes:[_0x7128[74]]}]}))[_0x7128[72]](function(_0x4bc3xe){var _0x4bc3xf=[];_0x4bc3x13= _[_0x7128[75]](_0x4bc3xe[_0x7128[73]],_0x7128[74]);_0x4bc3xe[_0x7128[73]][_0x7128[77]](function(_0x4bc3x10){_0x4bc3xf= _[_0x7128[76]](_0x4bc3xf,_[_0x7128[75]](_0x4bc3x10.Users,_0x7128[74]))});return _0x4bc3xf})[_0x7128[72]](function(_0x4bc3xd){if(_0x4bc3x13[_0x7128[60]]&& _0x4bc3xd[_0x7128[60]]){_0x4bc3xa= _0x7128[61]+ _0x4bc3x13[_0x7128[63]](_0x7128[62])+ _0x7128[64];_0x4bc3xa+= _0x7128[65]+ _0x4bc3xd[_0x7128[63]](_0x7128[66])+ _0x7128[67]}else {if(_0x4bc3x13[_0x7128[60]]){_0x4bc3xa= _0x7128[68]+ _0x4bc3x13[_0x7128[63]](_0x7128[62])+ _0x7128[64]}else {_0x4bc3xa= _0x7128[69]}};console[_0x7128[71]](_0x7128[70],_0x4bc3xa);return _0x4bc3xa});case _0x7128[92]:var _0x4bc3x14;return User[_0x7128[79]](_0x4bc3x9[_0x7128[74]],{attributes:[_0x7128[74]]})[_0x7128[72]](Util[_0x7128[91]]({},{attributes:[_0x7128[74]],include:[{raw:true,model:User,attributes:[_0x7128[74]]}]}))[_0x7128[72]](function(_0x4bc3xe){var _0x4bc3xf=[];_0x4bc3x14= _[_0x7128[75]](_0x4bc3xe[_0x7128[73]],_0x7128[74]);_0x4bc3xe[_0x7128[73]][_0x7128[77]](function(_0x4bc3x10){_0x4bc3xf= _[_0x7128[76]](_0x4bc3xf,_[_0x7128[75]](_0x4bc3x10.Users,_0x7128[74]))});return _0x4bc3xf})[_0x7128[72]](function(_0x4bc3xd){if(_0x4bc3x14[_0x7128[60]]&& _0x4bc3xd[_0x7128[60]]){_0x4bc3xa= _0x7128[61]+ _0x4bc3x14[_0x7128[63]](_0x7128[62])+ _0x7128[64];_0x4bc3xa+= _0x7128[65]+ _0x4bc3xd[_0x7128[63]](_0x7128[66])+ _0x7128[67]}else {if(_0x4bc3x14[_0x7128[60]]){_0x4bc3xa= _0x7128[68]+ _0x4bc3x14[_0x7128[63]](_0x7128[62])+ _0x7128[64]}else {_0x4bc3xa= _0x7128[69]}};console[_0x7128[71]](_0x7128[70],_0x4bc3xa);return _0x4bc3xa});case _0x7128[94]:var _0x4bc3x15;return User[_0x7128[79]](_0x4bc3x9[_0x7128[74]],{attributes:[_0x7128[74]]})[_0x7128[72]](Util[_0x7128[93]]({},{attributes:[_0x7128[74]],include:[{raw:true,model:User,attributes:[_0x7128[74]]}]}))[_0x7128[72]](function(_0x4bc3xe){var _0x4bc3xf=[];_0x4bc3x15= _[_0x7128[75]](_0x4bc3xe[_0x7128[73]],_0x7128[74]);_0x4bc3xe[_0x7128[73]][_0x7128[77]](function(_0x4bc3x10){_0x4bc3xf= _[_0x7128[76]](_0x4bc3xf,_[_0x7128[75]](_0x4bc3x10.Users,_0x7128[74]))});return _0x4bc3xf})[_0x7128[72]](function(_0x4bc3xd){if(_0x4bc3x15[_0x7128[60]]&& _0x4bc3xd[_0x7128[60]]){_0x4bc3xa= _0x7128[61]+ _0x4bc3x15[_0x7128[63]](_0x7128[62])+ _0x7128[64];_0x4bc3xa+= _0x7128[65]+ _0x4bc3xd[_0x7128[63]](_0x7128[66])+ _0x7128[67]}else {if(_0x4bc3x15[_0x7128[60]]){_0x4bc3xa= _0x7128[68]+ _0x4bc3x15[_0x7128[63]](_0x7128[62])+ _0x7128[64]}else {_0x4bc3xa= _0x7128[69]}};console[_0x7128[71]](_0x7128[70],_0x4bc3xa);return _0x4bc3xa});case _0x7128[96]:var _0x4bc3x16;return User[_0x7128[79]](_0x4bc3x9[_0x7128[74]],{attributes:[_0x7128[74]]})[_0x7128[72]](Util[_0x7128[95]]({},{attributes:[_0x7128[74]],include:[{raw:true,model:User,attributes:[_0x7128[74]]}]}))[_0x7128[72]](function(_0x4bc3xe){var _0x4bc3xf=[];_0x4bc3x16= _[_0x7128[75]](_0x4bc3xe[_0x7128[73]],_0x7128[74]);_0x4bc3xe[_0x7128[73]][_0x7128[77]](function(_0x4bc3x10){_0x4bc3xf= _[_0x7128[76]](_0x4bc3xf,_[_0x7128[75]](_0x4bc3x10.Users,_0x7128[74]))});return _0x4bc3xf})[_0x7128[72]](function(_0x4bc3xd){if(_0x4bc3x16[_0x7128[60]]&& _0x4bc3xd[_0x7128[60]]){_0x4bc3xa= _0x7128[61]+ _0x4bc3x16[_0x7128[63]](_0x7128[62])+ _0x7128[64];_0x4bc3xa+= _0x7128[65]+ _0x4bc3xd[_0x7128[63]](_0x7128[66])+ _0x7128[67]}else {if(_0x4bc3x16[_0x7128[60]]){_0x4bc3xa= _0x7128[68]+ _0x4bc3x16[_0x7128[63]](_0x7128[62])+ _0x7128[64]}else {_0x4bc3xa= _0x7128[69]}};console[_0x7128[71]](_0x7128[70],_0x4bc3xa);return _0x4bc3xa});case _0x7128[97]:;case _0x7128[99]:return Promise[_0x7128[98]]([])[_0x7128[72]](function(){return null});default:return Promise[_0x7128[98]]([])[_0x7128[72]](function(){return null})};break;default:return Promise[_0x7128[98]]([])[_0x7128[72]](function(){return null})}}};exports[_0x7128[102]]= function(_0x4bc3x17){return function(_0x4bc3x18,_0x4bc3x19){var _0x4bc3x1a=[],_0x4bc3x1b=[],_0x4bc3x1c=[];_[_0x7128[77]](_0x4bc3x19.Fields,function(_0x4bc3x1d){var _0x4bc3x1e=_0x7128[57];if(_0x4bc3x1d[_0x7128[103]]){switch(_0x4bc3x1d[_0x7128[103]]){case _0x7128[107]:_0x4bc3x1e= util[_0x7128[106]](_0x7128[104],_0x4bc3x1d[_0x7128[105]]);break;case _0x7128[109]:_0x4bc3x1e= util[_0x7128[106]](_0x7128[108],_0x4bc3x1d[_0x7128[105]],_0x4bc3x1d[_0x7128[105]]);break;case _0x7128[111]:_0x4bc3x1e= util[_0x7128[106]](_0x7128[110],_0x4bc3x1d[_0x7128[105]],_0x4bc3x1d[_0x7128[105]]);break;default:_0x4bc3x1e= util[_0x7128[106]](_0x7128[112],_0x4bc3x1d[_0x7128[103]],_0x4bc3x1d[_0x7128[105]])}}else {_0x4bc3x1e= _0x4bc3x1d[_0x7128[105]]};if(_0x4bc3x1e[_0x7128[114]](_0x7128[113])=== 0){_0x4bc3x1e= util[_0x7128[106]](_0x7128[115],_0x4bc3x1e)};if(_0x4bc3x1d[_0x7128[106]]){switch(_0x4bc3x1d[_0x7128[106]]){case _0x7128[117]:_0x4bc3x1e= util[_0x7128[106]](_0x7128[116],_0x4bc3x1d[_0x7128[106]],_0x4bc3x1e);break;default:_0x4bc3x1e= util[_0x7128[106]](_0x7128[112],_0x4bc3x1d[_0x7128[106]],_0x4bc3x1e)}};_0x4bc3x1a[_0x7128[120]](util[_0x7128[106]](_0x7128[118],_0x4bc3x1e,_0x4bc3x1d[_0x7128[119]]));if(_0x4bc3x1d[_0x7128[121]]){_0x4bc3x1b[_0x7128[120]](_0x4bc3x1e)};if(_0x4bc3x1d[_0x7128[122]]){_0x4bc3x1c[_0x7128[120]](util[_0x7128[106]](_0x7128[123],_0x4bc3x1e,_0x4bc3x1d[_0x7128[122]]))}});var _0x4bc3x1f=_0x4bc3x19[_0x7128[124]]?getConditions(JSON[_0x7128[126]](_0x4bc3x19[_0x7128[124]])[_0x7128[125]]):_0x7128[127];var _0x4bc3x20=_0x7128[128];_0x4bc3x20+= _0x7128[129]+ _0x4bc3x1a[_0x7128[63]](_0x7128[62]);_0x4bc3x20+= _0x7128[130]+ _0x4bc3x19[_0x7128[131]];_0x4bc3x20+= _0x4bc3x1f!== _0x7128[127]?_0x7128[132]+ _0x4bc3x1f:_0x7128[57];var _0x4bc3x21,_0x4bc3x22,_0x4bc3x23,_0x4bc3x24;var _0x4bc3x25=[];if(_0x4bc3x17){_[_0x7128[142]](_0x4bc3x17,function(_0x4bc3x26,_0x4bc3x27){switch(_0x4bc3x27){case _0x7128[133]:_0x4bc3x21= _0x4bc3x26;break;case _0x7128[134]:_0x4bc3x22= _0x4bc3x26;break;case _0x7128[135]:_0x4bc3x23= _0x4bc3x26;break;case _0x7128[136]:_0x4bc3x24= _0x4bc3x26;break;case _0x7128[137]:;case _0x7128[138]:break;default:var _0x4bc3x28=_[_0x7128[139]](_0x4bc3x19.Fields,{alias:_0x4bc3x27});if(_0x4bc3x28){_0x4bc3x25[_0x7128[120]](_0x4bc3x28[_0x7128[105]]+ _0x7128[140]+ _0x4bc3x26+ _0x7128[141])}else {_0x4bc3x25[_0x7128[120]](_0x4bc3x27+ _0x7128[140]+ _0x4bc3x26+ _0x7128[141])}}})};var _0x4bc3x29=_0x7128[143];console[_0x7128[71]](_0x4bc3x21,_0x4bc3x22,_0x4bc3x23,_0x4bc3x24);if(_0x4bc3x21&& _0x4bc3x22){if(_0x4bc3x21=== _0x4bc3x22){if(_0x4bc3x23|| _0x4bc3x24){console[_0x7128[71]](_0x4bc3x21,_0x4bc3x22,_0x4bc3x23,_0x4bc3x24);_0x4bc3x25[_0x7128[120]](util[_0x7128[106]](_0x7128[144],_0x4bc3x29,_0x4bc3x21+ (_0x4bc3x23?_0x7128[129]+ _0x4bc3x23:_0x7128[145]),_0x4bc3x22+ (_0x4bc3x24?_0x7128[129]+ _0x4bc3x24:_0x7128[146])))}else {_0x4bc3x25[_0x7128[120]](util[_0x7128[106]](_0x7128[147],_0x4bc3x29,_0x4bc3x21))}}else {_0x4bc3x25[_0x7128[120]](util[_0x7128[106]](_0x7128[144],_0x4bc3x29,_0x4bc3x21+ (_0x4bc3x23?_0x7128[129]+ _0x4bc3x23:_0x7128[145]),_0x4bc3x22+ (_0x4bc3x24?_0x7128[129]+ _0x4bc3x24:_0x7128[146])))}}else {if(_0x4bc3x21){_0x4bc3x25[_0x7128[120]](util[_0x7128[106]](_0x7128[148],_0x4bc3x29,_0x4bc3x21+ (_0x4bc3x23?_0x7128[129]+ _0x4bc3x23:_0x7128[145])))}else {if(_0x4bc3x22){_0x4bc3x25[_0x7128[120]](util[_0x7128[106]](_0x7128[149],_0x4bc3x29,_0x4bc3x22+ (_0x4bc3x24?_0x7128[129]+ _0x4bc3x24:_0x7128[146])))}}};if(_0x4bc3x25[_0x7128[60]]){_0x4bc3x20+= ((_0x4bc3x1f!== _0x7128[127])?_0x7128[150]:_0x7128[132])+ _0x4bc3x25[_0x7128[63]](_0x7128[150])};if(_0x4bc3x18){if(_0x4bc3x18=== _0x7128[69]){console[_0x7128[71]](_0x7128[151]);console[_0x7128[71]](_0x7128[152]);console[_0x7128[71]](_0x7128[153]);return _0x7128[154]};_0x4bc3x20+= ((_0x4bc3x1f!== _0x7128[127]|| _0x4bc3x25[_0x7128[60]])?_0x7128[150]:_0x7128[132])+ _0x4bc3x18};_0x4bc3x20+= _0x4bc3x1b[_0x7128[60]]?_0x7128[155]+ _0x4bc3x1b[_0x7128[63]](_0x7128[62]):_0x7128[57];_0x4bc3x20+= _0x4bc3x1c[_0x7128[60]]?_0x7128[156]+ _0x4bc3x1c[_0x7128[63]](_0x7128[62]):_0x7128[57];console[_0x7128[71]](_0x7128[151]);console[_0x7128[71]](_0x4bc3x20);console[_0x7128[71]](_0x7128[153]);return _0x4bc3x20}};exports[_0x7128[157]]= function(){return function(_0x4bc3x17){if(_0x4bc3x17){var _0x4bc3x2a=_0x7128[57];switch(_0x4bc3x17){case _0x7128[154]:_0x4bc3x2a= _0x7128[158];break;default:_0x4bc3x2a= sequelize[_0x7128[160]](_0x4bc3x17,{type:sequelize[_0x7128[159]][_0x7128[128]]})};return _0x4bc3x2a};return _0x4bc3x17}};function getConditions(_0x4bc3x2c){if(!_0x4bc3x2c){return _0x7128[127]};for(var _0x4bc3x2d=_0x7128[161],_0x4bc3x2e=0;_0x4bc3x2e< _0x4bc3x2c[_0x7128[162]][_0x7128[60]];_0x4bc3x2e++){_0x4bc3x2e> 0&& (_0x4bc3x2d+= _0x7128[129]+ _0x4bc3x2c[_0x7128[163]]+ _0x7128[129]);if(_0x4bc3x2c[_0x7128[162]][_0x4bc3x2e][_0x7128[125]]){_0x4bc3x2d+= getConditions(_0x4bc3x2c[_0x7128[162]][_0x4bc3x2e][_0x7128[125]])}else {_0x4bc3x2d+= _0x4bc3x2c[_0x7128[162]][_0x4bc3x2e][_0x7128[105]];switch(_0x4bc3x2c[_0x7128[162]][_0x4bc3x2e][_0x7128[165]]){case _0x7128[164]:;case _0x7128[166]:_0x4bc3x2d+= _0x7128[129]+ _0x4bc3x2c[_0x7128[162]][_0x4bc3x2e][_0x7128[165]];break;case _0x7128[168]:_0x4bc3x2d+= _0x7128[167];break;case _0x7128[170]:_0x4bc3x2d+= _0x7128[169];break;default:_0x4bc3x2d+= _0x7128[129]+ _0x4bc3x2c[_0x7128[162]][_0x4bc3x2e][_0x7128[165]]+ _0x7128[129]+ _0x4bc3x2c[_0x7128[162]][_0x4bc3x2e][_0x7128[171]]+ _0x7128[57]}}};return _0x4bc3x2d+ _0x7128[64]} \ No newline at end of file +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; + +exports.getTable = function(table) { + var tableModel; + switch (table) { + case 'report_agent_history': + tableModel = require('../models').history.ReportAgentHistory; + break; + case 'report_mail_session_history': + tableModel = require('../models').history.ReportMailSessionHistory; + break; + case 'report_queue_history': + tableModel = require('../models').history.ReportQueueHistory; + break; + case 'report_chat_session_history': + tableModel = require('../models').history.ReportChatSessionHistory; + break; + case 'report_call_history': + tableModel = require('../models').history.ReportCallHistory; + break; + case 'report_member_history': + tableModel = require('../models').history.ReportMemberHistory; + break; + case 'report_integration_history': + tableModel = require('../models').history.ReportIntegrationHistory; + break; + 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_history': + tableModel = require('../models').history.ReportSquareHistory; + break; + case 'report_square_details_history': + tableModel = require('../models').history.ReportSquareDetailHistory; + break; + case 'users': + tableModel = require('../models').User; + break; + 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.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 fields = [], + groupBy = [], + orderBy = []; + _.forEach(report.Fields, function(elem) { + 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) : '()'; + 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 + 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) { + 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); + } else { + str += 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 + ')'; +} diff --git a/server/utils/report_extraction.js b/server/utils/report_extraction.js index 53b998d..86c2005 100644 --- a/server/utils/report_extraction.js +++ b/server/utils/report_extraction.js @@ -1 +1,295 @@ -var _0xe7a1=["\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","\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"];var csv=require(_0xe7a1[0]);var PdfMake=require(_0xe7a1[1]);var _=require(_0xe7a1[2]);var util=require(_0xe7a1[3]);var ExtractedReport=require(_0xe7a1[5])[_0xe7a1[4]];var License=require(_0xe7a1[5])[_0xe7a1[6]];var Setting=require(_0xe7a1[5])[_0xe7a1[7]];var sequelize=require(_0xe7a1[5])[_0xe7a1[8]];var fs=require(_0xe7a1[9]);var moment=require(_0xe7a1[10]);var Promise=require(_0xe7a1[11]);var base64=Promise[_0xe7a1[14]](require(_0xe7a1[13])[_0xe7a1[12]]);var sr=require(_0xe7a1[15]);var path=require(_0xe7a1[16]);var config=require(_0xe7a1[17]);var reportBuildUtils=require(_0xe7a1[18]);var license=require(_0xe7a1[19]);var fonts={Roboto:{normal:path[_0xe7a1[22]](config[_0xe7a1[20]],_0xe7a1[21]),bold:path[_0xe7a1[22]](config[_0xe7a1[20]],_0xe7a1[23]),italics:path[_0xe7a1[22]](config[_0xe7a1[20]],_0xe7a1[24]),bolditalics:path[_0xe7a1[22]](config[_0xe7a1[20]],_0xe7a1[24])}};process[_0xe7a1[32]](_0xe7a1[25],function(_0xd719x13){general(_0xd719x13[_0xe7a1[26]],_0xd719x13[_0xe7a1[27]],_0xd719x13[_0xe7a1[28]],_0xd719x13[_0xe7a1[30]][_0xe7a1[29]](),_0xd719x13[_0xe7a1[31]])});function general(_0xd719x15,_0xd719x16,_0xd719x17,_0xd719x18,_0xd719x19){extract(_0xd719x15,_0xd719x16,_0xd719x17,_0xd719x18,_0xd719x19)}function extract(_0xd719x15,_0xd719x1b,_0xd719x17,_0xd719x18,_0xd719x19){var _0xd719x1c,_0xd719x1d;return License[_0xe7a1[68]](1)[_0xe7a1[58]](function(_0xd719x23){_0xd719x1c= _0xd719x23;return Setting[_0xe7a1[68]](1)})[_0xe7a1[58]](function(_0xd719x28){_0xd719x1d= _0xd719x28;return _0xd719x15[_0xe7a1[67]]})[_0xe7a1[58]](reportBuildUtils[_0xe7a1[66]](_0xd719x19))[_0xe7a1[58]](function(_0xd719x27){return [_0xd719x27,_0xd719x15]})[_0xe7a1[65]](reportBuildUtils[_0xe7a1[64]](_0xd719x1b))[_0xe7a1[58]](reportBuildUtils[_0xe7a1[63]]())[_0xe7a1[58]](function(_0xd719x1f){if(_0xd719x1f){if(_[_0xe7a1[36]](_0xd719x1f)){if(_0xd719x1f[_0xe7a1[37]]){_[_0xe7a1[41]](_0xd719x1f,function(_0xd719x20){_[_0xe7a1[40]](_0xd719x20,function(_0xd719x21,_0xd719x22){if(_0xd719x21 instanceof Date){_0xd719x20[_0xd719x22]= moment(_0xd719x21)[_0xe7a1[39]](_0xe7a1[38]).toString()}})});switch(_0xd719x18){case _0xe7a1[59]:var _0xd719x23=_0xd719x1c?JSON[_0xe7a1[45]](license[_0xe7a1[44]](_0xd719x1c[_0xe7a1[42]],_0xd719x1d[_0xe7a1[43]])):null;var _0xd719x24=(_0xd719x1d&& !_0xd719x1d[_0xe7a1[46]]&& _0xd719x1d[_0xe7a1[47]]&& _0xd719x23&& _0xd719x23[_0xe7a1[48]])?path[_0xe7a1[22]](config[_0xe7a1[49]],_0xe7a1[50],_0xe7a1[51],_0xe7a1[52],_0xd719x1d[_0xe7a1[47]]):path[_0xe7a1[22]](config[_0xe7a1[49]],_0xe7a1[50],_0xe7a1[51],_0xe7a1[52],_0xe7a1[53],_0xe7a1[54]);return base64(_0xd719x24)[_0xe7a1[58]](function(_0xd719x25){var _0xd719x26=_0xd719x24[_0xe7a1[57]](_0xe7a1[56])[_0xe7a1[55]]();return createPdf(_0xd719x1f,_0xd719x15,_0xd719x1b,_0xd719x17,_0xd719x25,_0xd719x26)});case _0xe7a1[60]:return createCsv(_0xd719x1f,_0xd719x15,_0xd719x1b,_0xd719x17);default:return createCsv(_0xd719x1f,_0xd719x15,_0xd719x1b,_0xd719x17)}}else {return updateExtracted(_0xd719x17,null,_0xe7a1[61])}}else {return updateExtracted(_0xd719x17,null,_0xd719x1f)}}else {return updateExtracted(_0xd719x17,null,_0xe7a1[62])}})[_0xe7a1[35]](function(_0xd719x1e){console[_0xe7a1[33]](_0xd719x1e);return updateExtracted(_0xd719x17,null,_0xe7a1[34])})}function createPdf(_0xd719x1f,_0xd719x15,_0xd719x1b,_0xd719x2a,_0xd719x2b,_0xd719x26){switch(_0xd719x26){case _0xe7a1[70]:_0xd719x26= _0xe7a1[69];break;default:};var _0xd719x2c=sr({length:20,prefix:_0xe7a1[71]+ _0xd719x15[_0xe7a1[72]]+ _0xe7a1[73],suffix:_0xe7a1[74]});var _0xd719x2d=[];_[_0xe7a1[41]](_0xd719x15.Fields,function(_0xd719x2e){_0xd719x2d[_0xe7a1[77]]({text:String(_0xd719x2e[_0xe7a1[75]]),style:_0xe7a1[76]})});var _0xd719x2f=[_0xd719x2d];_[_0xe7a1[41]](_0xd719x1f,function(_0xd719x2e){var _0xd719x20=[];_[_0xe7a1[40]](_0xd719x2e,function(_0xd719x30,_0xd719x22){_0xd719x20[_0xe7a1[77]](_0xd719x30?String(_0xd719x30):_0xe7a1[78])});_0xd719x2f[_0xe7a1[77]](_0xd719x20)});var _0xd719x31=[{text:_0xd719x15[_0xe7a1[72]],style:_0xe7a1[79]}];if(_0xd719x15[_0xe7a1[80]]){_0xd719x31[_0xe7a1[77]]({text:_0xd719x15[_0xe7a1[80]]|| _0xe7a1[78],color:_0xe7a1[81],margin:[0,0,0,5]})};if(_0xd719x1b[_0xe7a1[82]]){_0xd719x31[_0xe7a1[77]]({text:[{text:_0xe7a1[83],style:_0xe7a1[84]},moment(_0xd719x1b[_0xe7a1[82]])[_0xe7a1[87]](_0xe7a1[86])[_0xe7a1[39]](_0xe7a1[85]).toString(),{text:_0xe7a1[88],style:_0xe7a1[84]},moment(_0xd719x1b[_0xe7a1[90]]|| _0xd719x1b[_0xe7a1[82]])[_0xe7a1[89]](_0xe7a1[86])[_0xe7a1[39]](_0xe7a1[85]).toString()]})};var _0xd719x32=[];_0xd719x32[_0xe7a1[77]]({style:_0xe7a1[91],table:{headerRows:1,dontBreakRows:true,body:_0xd719x2f}});var _0xd719x33={pageOrientation:_0xe7a1[92],pageMargins:[15,90,15,25],header:function(){return {margin:[15,15,0,0],columns:[{table:{widths:[100,_0xe7a1[93]],body:[[{image:_0xe7a1[94]+ _0xd719x26+ _0xe7a1[95]+ _0xd719x2b,fit:[100,60]},_0xd719x31]]},layout:_0xe7a1[96]}]}},content:_0xd719x32,footer:function(_0xd719x34,_0xd719x35){return {columns:[{text:_0xd719x34.toString()+ _0xe7a1[97]+ _0xd719x35,alignment:_0xe7a1[98]}]}},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:_0xe7a1[99],wordWrap:_0xe7a1[100]},label:{bold:true,color:_0xe7a1[99]}}};var _0xd719x36= new PdfMake(fonts);var _0xd719x37=_0xd719x36[_0xe7a1[101]](_0xd719x33);if(_0xd719x37){var _0xd719x38=fs[_0xe7a1[103]](config[_0xe7a1[102]]+ _0xd719x2c);_0xd719x38[_0xe7a1[32]](_0xe7a1[104],function(){return updateExtracted(_0xd719x2a,null,_0xe7a1[105])});_0xd719x38[_0xe7a1[32]](_0xe7a1[106],function(){return updateExtracted(_0xd719x2a,_0xd719x2c,_0xe7a1[107])});_0xd719x37[_0xe7a1[108]](_0xd719x38);_0xd719x37[_0xe7a1[109]]()}else {return updateExtracted(_0xd719x2a,null,_0xe7a1[110])}}function createCsv(_0xd719x1f,_0xd719x15,_0xd719x1b,_0xd719x2a){var _0xd719x2c=sr({length:20,prefix:_0xe7a1[71]+ _0xd719x15[_0xe7a1[72]]+ _0xe7a1[73],suffix:_0xe7a1[111]});var _0xd719x3a=csv(_0xd719x1f);if(_0xd719x3a){fs[_0xe7a1[113]](config[_0xe7a1[102]]+ _0xd719x2c,_0xd719x3a,function(_0xd719x1e){if(_0xd719x1e){console[_0xe7a1[33]](_0xd719x1e);return updateExtracted(_0xd719x2a,null,_0xe7a1[112])}else {return updateExtracted(_0xd719x2a,_0xd719x2c,_0xe7a1[107])}})}else {return updateExtracted(_0xd719x2a,null,_0xe7a1[114])}}function updateExtracted(_0xd719x2a,_0xd719x2c,_0xd719x3c){return ExtractedReport[_0xe7a1[120]]({status:_0xd719x3c,savename:_0xd719x2c},{where:{id:_0xd719x2a}})[_0xe7a1[58]](function(){console[_0xe7a1[33]](_0xe7a1[119])})[_0xe7a1[35]](function(_0xd719x1e){console[_0xe7a1[33]](_0xe7a1[118]+ _0xd719x1e)})[_0xe7a1[117]](function(){process[_0xe7a1[116]]({message:_0xe7a1[115],status:_0xd719x3c})})} \ No newline at end of file +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) { + 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 + }); + }); +} diff --git a/server/utils/voice_extension.js b/server/utils/voice_extension.js index 38e90dd..a59c64b 100644 --- a/server/utils/voice_extension.js +++ b/server/utils/voice_extension.js @@ -1 +1,290 @@ -var _0x84c9=["\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"];var _=require(_0x84c9[0]);var util=require(_0x84c9[1]);var Interval=require(_0x84c9[3])[_0x84c9[2]];var sequelize=require(_0x84c9[3])[_0x84c9[4]];var VoiceExtension=require(_0x84c9[3])[_0x84c9[5]];exports[_0x84c9[6]]= createApplications;exports[_0x84c9[7]]= function(_0x6621x6,_0x6621x7){var sequelize=require(_0x84c9[3])[_0x84c9[4]];var VoiceExtension=require(_0x84c9[3])[_0x84c9[5]];if(_0x6621x6[_0x84c9[9]][_0x84c9[8]]){delete _0x6621x6[_0x84c9[9]][_0x84c9[8]]};return VoiceExtension[_0x84c9[16]](_0x6621x6[_0x84c9[9]],{where:{id:_0x6621x6[_0x84c9[14]][_0x84c9[8]]},transaction:_0x6621x7})[_0x84c9[10]](function(_0x6621x8){if(_0x6621x6[_0x84c9[9]][_0x84c9[11]]){_0x6621x6[_0x84c9[9]][_0x84c9[8]]= _0x6621x6[_0x84c9[14]][_0x84c9[8]];return VoiceExtension[_0x84c9[15]]({where:{VoiceExtensionId:_0x6621x6[_0x84c9[14]][_0x84c9[8]]},transaction:_0x6621x7})}})[_0x84c9[10]](function(){if(_0x6621x6[_0x84c9[9]][_0x84c9[11]]&& Array[_0x84c9[12]](_0x6621x6[_0x84c9[9]].Applications)&& _0x6621x6[_0x84c9[9]][_0x84c9[11]][_0x84c9[13]]){return _0x6621x6[_0x84c9[9]]}})[_0x84c9[10]](createApplications(_0x6621x6[_0x84c9[9]].Applications,_0x6621x7))};function createApplications(_0x6621xa,_0x6621x7){var Interval=require(_0x84c9[3])[_0x84c9[2]];var VoiceExtension=require(_0x84c9[3])[_0x84c9[5]];return function(_0x6621x8){if(_0x6621x8){return Interval[_0x84c9[82]]()[_0x84c9[10]](function(_0x6621xb){var _0x6621xc=2;var _0x6621xd={exten:_0x6621x8[_0x84c9[18]],type:_0x6621x8[_0x84c9[19]],context:_0x6621x8[_0x84c9[20]],VoiceExtensionId:_0x6621x8[_0x84c9[8]]};var _0x6621xe=[];var _0x6621xf=7;var _0x6621x10=[],_0x6621x11=[];_0x6621x10[_0x84c9[25]](_[_0x84c9[24]]({app:_0x84c9[21],appdata:util[_0x84c9[23]](_0x84c9[22],_0x6621x8[_0x84c9[19]]),priority:_0x6621xc},_0x6621xd));_0x6621xc++;if(_0x6621x8[_0x84c9[19]]=== _0x84c9[26]){_0x6621x10[_0x84c9[25]](_[_0x84c9[24]]({app:_0x84c9[21],appdata:util[_0x84c9[23]](_0x84c9[27],_0x6621x8[_0x84c9[28]]|| _0x84c9[29]),priority:_0x6621xc},_0x6621xd));_0x6621xc++};_0x6621xe[_0x84c9[25]](VoiceExtension[_0x84c9[30]](_0x6621x10,{transaction:_0x6621x7}));_0x6621xa[_0x84c9[43]](function(_0x6621x12){var _0x6621x13=[];var _0x6621x14=[];if(_0x6621x12[_0x84c9[31]]){var _0x6621x15=_[_0x84c9[32]](_0x6621xb,{IntervalId:_0x6621x12[_0x84c9[31]]});_0x6621x13= _0x6621x15[_0x84c9[13]]?_[_0x84c9[34]](_0x6621x15,_0x84c9[33]):[_0x84c9[35]];var _0x6621x16=_[_0x84c9[36]](_0x6621xb,{id:_0x6621x12[_0x84c9[31]]});_0x6621x12[_0x84c9[33]]= _0x6621x16?_0x6621x16[_0x84c9[37]]:_0x84c9[35]}else {_0x6621x13= [_0x6621x12[_0x84c9[33]]]};_0x6621x14[_0x84c9[25]](_[_0x84c9[24]]({app:_0x84c9[38],appdata:_0x6621x12[_0x84c9[39]]+ _0x84c9[40],priority:_0x6621xc},_0x6621xd));_0x6621xc++;var _0x6621x17=_0x6621x13[_0x84c9[13]];_0x6621x13[_0x84c9[43]](function(_0x6621x18,_0x6621x19){_0x6621x14[_0x84c9[25]](_[_0x84c9[24]]({app:_0x84c9[41],appdata:util[_0x84c9[23]](_0x84c9[42],_0x6621x18,_0x6621x8[_0x84c9[20]],_0x6621xc+ (_0x6621x17- _0x6621x19),_0x6621x8[_0x84c9[20]],((_0x6621x19+ 1)< _0x6621x17)?_0x6621xc+ 1:_0x6621xc+ _0x6621xf),priority:_0x6621xc},_0x6621xd));_0x6621xc++});if(_0x6621x12[_0x84c9[39]][_0x84c9[44]]()=== _0x84c9[45]&& _0x6621x8[_0x84c9[19]]=== _0x84c9[26]&& _0x6621x12[_0x84c9[46]][1]){_0x6621x14[_0x84c9[25]](_[_0x84c9[24]]({app:_0x84c9[21],appdata:util[_0x84c9[23]](_0x84c9[47],_0x6621x12[_0x84c9[46]][1]),priority:_0x6621xc},_0x6621xd))}else {_0x6621x14[_0x84c9[25]](_[_0x84c9[24]]({app:_0x84c9[38],appdata:_0x84c9[48],priority:_0x6621xc},_0x6621xd))};_0x6621xc++;if(_0x6621x12[_0x84c9[39]][_0x84c9[44]]()=== _0x84c9[45]&& _0x6621x8[_0x84c9[49]]&& _0x6621x8[_0x84c9[19]]=== _0x84c9[26]){_0x6621x14[_0x84c9[25]](_[_0x84c9[24]]({app:_0x84c9[50],appdata:_0x84c9[51]+ (_0x6621x8[_0x84c9[52]]|| _0x84c9[53])+ _0x84c9[54],priority:_0x6621xc},_0x6621xd))}else {_0x6621x14[_0x84c9[25]](_[_0x84c9[24]]({app:_0x84c9[38],appdata:_0x84c9[55],priority:_0x6621xc},_0x6621xd))};_0x6621xc++;if(_0x6621x12[_0x84c9[39]][_0x84c9[44]]()=== _0x84c9[56]&& _0x6621x12[_0x84c9[57]]!== _0x84c9[58]){_0x6621x14[_0x84c9[25]](_[_0x84c9[24]]({app:_0x84c9[59],appdata:_0x84c9[60],priority:_0x6621xc},_0x6621xd))}else {_0x6621x14[_0x84c9[25]](_[_0x84c9[24]]({app:_0x84c9[38],appdata:_0x84c9[61],priority:_0x6621xc},_0x6621xd))};_0x6621xc++;if(_0x6621x12[_0x84c9[39]][_0x84c9[44]]()=== _0x84c9[45]&& _0x6621x8[_0x84c9[19]]=== _0x84c9[26]){_0x6621x14[_0x84c9[25]](_[_0x84c9[24]]({app:_0x84c9[21],appdata:util[_0x84c9[23]](_0x84c9[62],_0x6621x8[_0x84c9[8]]|| _0x84c9[60]),priority:_0x6621xc},_0x6621xd))}else {_0x6621x14[_0x84c9[25]](_[_0x84c9[24]]({app:_0x84c9[38],appdata:_0x84c9[63],priority:_0x6621xc},_0x6621xd))};_0x6621xc++;if(_0x6621x12[_0x84c9[39]][_0x84c9[44]]()=== _0x84c9[45]&& _0x6621x12[_0x84c9[57]]=== _0x84c9[64]){_0x6621x12[_0x84c9[46]][4]= _0x6621x12[_0x84c9[46]][4]|| _0x84c9[60];_0x6621x12[_0x84c9[46]][4]+= (_[_0x84c9[66]](_0x6621x12[_0x84c9[46]][4],_0x84c9[65])?_0x84c9[60]:_0x84c9[65])+ (_[_0x84c9[66]](_0x6621x12[_0x84c9[46]][4],_0x84c9[67])?_0x84c9[60]:_0x84c9[67]);_0x6621x14[_0x84c9[25]](_[_0x84c9[24]]({app:_0x6621x12[_0x84c9[39]],appdata:util[_0x84c9[23]](_0x84c9[68],_0x6621x12[_0x84c9[46]][0],_0x6621x12[_0x84c9[46]][2]|| _0x84c9[60],_0x6621x8[_0x84c9[69]]|| 0,_0x6621x12[_0x84c9[46]][3]|| _0x84c9[60],_0x6621x12[_0x84c9[46]][4]|| _0x84c9[60],_0x6621x12[_0x84c9[46]][5]|| _0x84c9[60]),priority:_0x6621xc,IntervalId:_0x6621x12[_0x84c9[31]]|| null,interval:_0x6621x12[_0x84c9[33]]|| _0x84c9[35],isApp:true,callerID:_0x6621x12[_0x84c9[46]][1]|| null,appType:_0x6621x12[_0x84c9[57]]},_0x6621xd))}else {if(_0x6621x12[_0x84c9[39]][_0x84c9[44]]()=== _0x84c9[45]&& _0x6621x12[_0x84c9[57]]=== _0x84c9[70]){_0x6621x12[_0x84c9[46]][3]= _0x6621x12[_0x84c9[46]][3]|| _0x84c9[60];_0x6621x12[_0x84c9[46]][3]+= (_[_0x84c9[66]](_0x6621x12[_0x84c9[46]][3],_0x84c9[65])?_0x84c9[60]:_0x84c9[65])+ (_[_0x84c9[66]](_0x6621x12[_0x84c9[46]][3],_0x84c9[67])?_0x84c9[60]:_0x84c9[67]);_0x6621x14[_0x84c9[25]](_[_0x84c9[24]]({app:_0x6621x12[_0x84c9[39]],appdata:util[_0x84c9[23]](_0x84c9[71],_0x6621x12[_0x84c9[46]][0],_0x6621x12[_0x84c9[46]][1],_0x6621x12[_0x84c9[46]][2]|| _0x84c9[60],_0x6621x12[_0x84c9[46]][3]|| _0x84c9[60],_0x6621x12[_0x84c9[46]][4]|| _0x84c9[60]),priority:_0x6621xc,IntervalId:_0x6621x12[_0x84c9[31]]|| null,interval:_0x6621x12[_0x84c9[33]]|| _0x84c9[35],isApp:true,appType:_0x6621x12[_0x84c9[57]]},_0x6621xd))}else {if(_0x6621x12[_0x84c9[39]][_0x84c9[44]]()=== _0x84c9[45]&& _0x6621x12[_0x84c9[57]]=== _0x84c9[72]){_0x6621x12[_0x84c9[46]][2]= _0x6621x12[_0x84c9[46]][2]|| _0x84c9[60];_0x6621x12[_0x84c9[46]][2]+= (_[_0x84c9[66]](_0x6621x12[_0x84c9[46]][2],_0x84c9[65])?_0x84c9[60]:_0x84c9[65])+ (_[_0x84c9[66]](_0x6621x12[_0x84c9[46]][2],_0x84c9[67])?_0x84c9[60]:_0x84c9[67]);_0x6621x14[_0x84c9[25]](_[_0x84c9[24]]({app:_0x6621x12[_0x84c9[39]],appdata:util[_0x84c9[23]](_0x84c9[73],_0x6621x12[_0x84c9[46]][0],_0x6621x12[_0x84c9[46]][1]|| _0x84c9[60],_0x6621x12[_0x84c9[46]][2]|| _0x84c9[60],_0x6621x12[_0x84c9[46]][3]|| _0x84c9[60]),priority:_0x6621xc,IntervalId:_0x6621x12[_0x84c9[31]]|| null,interval:_0x6621x12[_0x84c9[33]]|| _0x84c9[35],isApp:true,appType:_0x6621x12[_0x84c9[57]]},_0x6621xd))}else {if((_0x6621x12[_0x84c9[39]][_0x84c9[44]]()=== _0x84c9[45]|| _0x6621x12[_0x84c9[39]][_0x84c9[44]]()=== _0x84c9[56])&& _0x6621x12[_0x84c9[57]]!== _0x84c9[58]){var _0x6621x1a=_0x6621x12[_0x84c9[39]][_0x84c9[44]]()=== _0x84c9[45]?2:1;_0x6621x12[_0x84c9[46]][_0x6621x1a]= _0x6621x12[_0x84c9[46]][_0x6621x1a]|| _0x84c9[60];_0x6621x12[_0x84c9[46]][_0x6621x1a]+= (_[_0x84c9[66]](_0x6621x12[_0x84c9[46]][_0x6621x1a],_0x84c9[65])?_0x84c9[60]:_0x84c9[65])+ (_[_0x84c9[66]](_0x6621x12[_0x84c9[46]][_0x6621x1a],_0x84c9[67])?_0x84c9[60]:_0x84c9[67])};_0x6621x14[_0x84c9[25]](_[_0x84c9[24]]({app:_0x6621x12[_0x84c9[39]],appdata:_0x6621x12[_0x84c9[46]][_0x84c9[75]](_0x84c9[74]),priority:_0x6621xc,IntervalId:_0x6621x12[_0x84c9[31]],interval:_0x6621x12[_0x84c9[33]]|| _0x84c9[35],isApp:true,appType:_0x6621x12[_0x84c9[57]]|| null},_0x6621xd))}}};_0x6621xc++;if(_0x6621x12[_0x84c9[39]][_0x84c9[44]]()=== _0x84c9[45]&& _0x6621x8[_0x84c9[49]]&& _0x6621x8[_0x84c9[19]]=== _0x84c9[26]){_0x6621x14[_0x84c9[25]](_[_0x84c9[24]]({app:_0x84c9[76],appdata:_0x84c9[60],priority:_0x6621xc},_0x6621xd))}else {_0x6621x14[_0x84c9[25]](_[_0x84c9[24]]({app:_0x84c9[38],appdata:_0x84c9[77],priority:_0x6621xc},_0x6621xd))};_0x6621xc++;_0x6621x14[_0x84c9[25]](_[_0x84c9[24]]({app:_0x84c9[38],appdata:_0x6621x12[_0x84c9[39]]+ _0x84c9[78],priority:_0x6621xc},_0x6621xd));_0x6621xc++;_0x6621xe[_0x84c9[25]](VoiceExtension[_0x84c9[30]](_0x6621x14,{transaction:_0x6621x7}))});_0x6621x11[_0x84c9[25]](_[_0x84c9[24]]({app:_0x84c9[38],appdata:_0x6621x8[_0x84c9[19]]+ _0x84c9[79],priority:_0x6621xc},_0x6621xd));_0x6621xc++;if(_0x6621x8[_0x84c9[19]]=== _0x84c9[80]|| _0x6621x8[_0x84c9[19]]=== _0x84c9[26]){_0x6621x11[_0x84c9[25]](_[_0x84c9[24]]({app:_0x84c9[81],appdata:_0x84c9[60],priority:_0x6621xc},_0x6621xd));_0x6621xc++};_0x6621xe[_0x84c9[25]](VoiceExtension[_0x84c9[30]](_0x6621x11,{transaction:_0x6621x7}));return _0x6621xe})[_0x84c9[17]]()}}} \ No newline at end of file +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(); + } + } +} -- 1.7.1