├── .gitignore ├── public ├── images │ └── effect.gif ├── css │ ├── fonts │ │ ├── element-icons.ttf │ │ └── element-icons.woff │ ├── ch-menu.css │ ├── common.css │ └── frame.css ├── pages │ ├── test │ │ ├── index.html │ │ └── index.js │ ├── charts │ │ ├── index.html │ │ └── index.js │ ├── table │ │ ├── editable │ │ │ ├── index.js │ │ │ └── index.html │ │ ├── multheader │ │ │ ├── index.html │ │ │ └── index.js │ │ ├── draggable │ │ │ ├── index.html │ │ │ └── index.js │ │ └── pagination │ │ │ ├── index.html │ │ │ └── index.js │ ├── menu │ │ ├── index.html │ │ └── index.js │ ├── permission │ │ ├── index.html │ │ └── index.js │ ├── form │ │ ├── validate │ │ │ ├── index.html │ │ │ └── index.js │ │ └── dialog │ │ │ ├── index.js │ │ │ └── index.html │ ├── list │ │ ├── index.html │ │ └── index.js │ ├── encrypt │ │ ├── index.html │ │ └── index.js │ └── index.js └── js │ ├── libs │ ├── utils.js │ ├── http.js │ ├── cryptool.js │ ├── vuedraggable.min.js │ ├── sortable.min.js │ ├── require.js │ └── crypto-js.min.js │ └── components │ ├── menu │ ├── ch-vertical-menu-item.js │ ├── ch-horizonal-menu.js │ └── ch-horizonal-menu-item.js │ └── permission.js ├── views ├── error.ejs └── index.ejs ├── README.md ├── .github └── workflows │ └── ci.yml ├── package.json ├── app.js ├── bin └── www └── routes └── index.js /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | node_modules/ -------------------------------------------------------------------------------- /public/images/effect.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/K-walker/vue-web-frame/HEAD/public/images/effect.gif -------------------------------------------------------------------------------- /views/error.ejs: -------------------------------------------------------------------------------- 1 |

<%= message %>

2 |

<%= error.status %>

3 |
<%= error.stack %>
4 | -------------------------------------------------------------------------------- /public/css/fonts/element-icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/K-walker/vue-web-frame/HEAD/public/css/fonts/element-icons.ttf -------------------------------------------------------------------------------- /public/css/fonts/element-icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/K-walker/vue-web-frame/HEAD/public/css/fonts/element-icons.woff -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-web-frame 2 | 3 | 基于vue+element搭建的一个简单web前端通用框架,包含 权限组件,加解密,全局搜索,以及其他组件示例等功能展示 4 | 5 | ![效果图](https://github.com/K-walker/vue-web-frame/blob/master/public/images/effect.gif) 6 | 7 | # 使用 8 | 9 | ```shell 10 | $ npm i 11 | $ npm start 12 | 13 | ``` 14 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Start Vwf Project 2 | # db5e57fe04a6a8f18579f7ed189699024685ae66 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v1 14 | - name: Install and Build 15 | env: 16 | ACTIONS_ACCESS_TOKEN: ${{ secrets.ACTIONS_ACCESS_TOKEN }} 17 | run: | 18 | npm i 19 | npm start 20 | 21 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-web-frame", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "cookie-parser": "~1.4.3", 10 | "debug": "~2.6.9", 11 | "ejs": "~2.5.7", 12 | "express": "~4.16.0", 13 | "http-errors": "~1.6.2", 14 | "morgan": "~1.9.0", 15 | "uuid": "^3.3.2" 16 | }, 17 | "devDependencies": { 18 | "mockjs": "^1.0.1-beta3" 19 | }, 20 | "homepage": "https://K-walker.github.io/vue-web-frame" 21 | } 22 | -------------------------------------------------------------------------------- /public/pages/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 测试 10 | 11 | 12 |
13 |

测试页面

14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /public/pages/test/index.js: -------------------------------------------------------------------------------- 1 | ;(function() { 2 | "use strict"; 3 | 4 | require.config({ 5 | baseUrl:"../../js/", 6 | paths:{ 7 | vue:"libs/vue", 8 | http:"libs/http", 9 | axios:"libs/axios", 10 | ELEMENT:"libs/elm-2.1.0", 11 | } 12 | }); 13 | 14 | require(["vue" , "ELEMENT" , "http"] , function (Vue , ELEMENT , http) { 15 | ELEMENT.install(Vue); 16 | window.vm = new Vue({ 17 | el:"#app", 18 | data:{ 19 | menus:[], 20 | themeColor:"#2e323d" 21 | }, 22 | created:function () { 23 | this.$on("onglobalsearch" , result => { 24 | this.$message("当前页面监听到全局搜索事件:"+result.value); 25 | }); 26 | }, 27 | mounted:function () { 28 | 29 | } 30 | }) 31 | }); 32 | 33 | })() -------------------------------------------------------------------------------- /public/pages/charts/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Charts 10 | 22 | 23 | 24 |
25 | 31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | var createError = require('http-errors'); 2 | var express = require('express'); 3 | var path = require('path'); 4 | var cookieParser = require('cookie-parser'); 5 | var logger = require('morgan'); 6 | 7 | var indexRouter = require('./routes/index'); 8 | 9 | var app = express(); 10 | 11 | // view engine setup 12 | app.set('views', path.join(__dirname, 'views')); 13 | app.set('view engine', 'ejs'); 14 | 15 | app.use(logger('dev')); 16 | app.use(express.json()); 17 | app.use(express.urlencoded({ extended: false })); 18 | app.use(cookieParser()); 19 | app.use(express.static(path.join(__dirname, 'public'))); 20 | 21 | app.use('/', indexRouter); 22 | 23 | // catch 404 and forward to error handler 24 | app.use(function(req, res, next) { 25 | next(createError(404)); 26 | }); 27 | 28 | // error handler 29 | app.use(function(err, req, res, next) { 30 | // set locals, only providing error in development 31 | res.locals.message = err.message; 32 | res.locals.error = req.app.get('env') === 'development' ? err : {}; 33 | 34 | // render the error page 35 | res.status(err.status || 500); 36 | res.render('error'); 37 | }); 38 | 39 | module.exports = app; 40 | -------------------------------------------------------------------------------- /public/pages/table/editable/index.js: -------------------------------------------------------------------------------- 1 | ;(function() { 2 | "use strict"; 3 | 4 | require.config({ 5 | baseUrl:"../../../js/", 6 | paths:{ 7 | vue:"libs/vue", 8 | http:"libs/http", 9 | axios:"libs/axios", 10 | ELEMENT:"libs/elm-2.1.0" 11 | } 12 | }); 13 | 14 | require(["vue" , "ELEMENT" , "http"] , function (Vue , ELEMENT , http) { 15 | ELEMENT.install(Vue); 16 | window.vm = new Vue({ 17 | el:"#app", 18 | data:{ 19 | editableRowIds:[], 20 | tableData:[] 21 | }, 22 | created:function () { 23 | this.$on("onglobalsearch" , result => { 24 | this.$message("当前页面监听到全局搜索事件:"+result.value); 25 | }); 26 | }, 27 | mounted:function () { 28 | this.$get("/editable").then( response => { 29 | this.tableData = response.data; 30 | }).catch( e => {}); 31 | }, 32 | methods:{ 33 | handleEditOk:function (rowId) { 34 | let index = this.editableRowIds.findIndex( id => { 35 | return rowId === id ; 36 | }); 37 | if(index != -1) this.editableRowIds.splice(index , 1); 38 | } 39 | } 40 | }) 41 | }); 42 | 43 | })() -------------------------------------------------------------------------------- /public/pages/table/multheader/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | 9 | 10 |
11 | 33 |
34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /public/pages/menu/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 菜单导航 11 | 12 | 13 |
14 | 35 |
36 | 37 | 38 | -------------------------------------------------------------------------------- /public/pages/permission/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 首页 10 | 11 | 12 |
13 | 34 |
35 | 36 | 37 | -------------------------------------------------------------------------------- /public/css/ch-menu.css: -------------------------------------------------------------------------------- 1 | ul , li {margin: 0;padding: 0;list-style: none;} 2 | .ch-horizonal-menu { 3 | color: #fff; 4 | position: relative; 5 | } 6 | .ch-horizonal-menu::after { 7 | display:block; 8 | clear: both; 9 | content: ''; 10 | } 11 | .ch-horizonal-menu-item { 12 | height: 56px; 13 | line-height: 56px; 14 | padding: 0 20px; 15 | float: left; 16 | position: relative; 17 | box-sizing: border-box; 18 | } 19 | .ch-horizonal-submenu:hover .ch-horizonal-submenu_inner { 20 | display: block; 21 | } 22 | .ch-horizonal-menu-item:hover { 23 | background-color: rgb(37, 40, 49); 24 | cursor: pointer; 25 | } 26 | .ch-horizonal-submenu__title span { 27 | padding-right: 10px; 28 | } 29 | .ch-horizonal-submenu__title i.ch-horizonal-submenu__icon-arrow { 30 | float: right; 31 | position: relative; 32 | top: 20px 33 | } 34 | .ch-horizonal-submenu:hover i.el-icon-arrow-down { 35 | -webkit-animation:rotate180 .3s forwards ; 36 | -moz-animation:rotate180 .3s forwards ; 37 | -o-animation:rotate180 .3s forwards ; 38 | animation:rotate180 .3s forwards ; 39 | } 40 | .ch-horizonal-menu-item .ch-horizonal-submenu_inner { 41 | position: fixed; 42 | width: 200px; 43 | height: 5px; 44 | z-index: 2023; 45 | } 46 | .ch-horizonal-menu__inner { 47 | width: 100%; 48 | position: absolute; 49 | left: -20px; 50 | top:5px; 51 | color: #fff; 52 | overflow: hidden; 53 | } 54 | .ch-horizonal-menu__inner .ch-horizonal-menu-item { 55 | width: 100%; 56 | } -------------------------------------------------------------------------------- /public/pages/form/validate/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Page3 10 | 11 | 12 |
13 | 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /public/js/libs/utils.js: -------------------------------------------------------------------------------- 1 | 2 | /* istanbul ignore next */ 3 | function hasClass(el, cls) { 4 | if (!el || !cls) return false; 5 | if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.'); 6 | if (el.classList) { 7 | return el.classList.contains(cls); 8 | } else { 9 | return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1; 10 | } 11 | }; 12 | 13 | /* istanbul ignore next */ 14 | function addClass(el, cls) { 15 | if (!el) return; 16 | var curClass = el.className; 17 | var classes = (cls || '').split(' '); 18 | 19 | for (var i = 0, j = classes.length; i < j; i++) { 20 | var clsName = classes[i]; 21 | if (!clsName) continue; 22 | 23 | if (el.classList) { 24 | el.classList.add(clsName); 25 | } else { 26 | if (!hasClass(el, clsName)) { 27 | curClass += ' ' + clsName; 28 | } 29 | } 30 | } 31 | if (!el.classList) { 32 | el.className = curClass; 33 | } 34 | }; 35 | 36 | /* istanbul ignore next */ 37 | function removeClass(el, cls) { 38 | if (!el || !cls) return; 39 | var classes = cls.split(' '); 40 | var curClass = ' ' + el.className + ' '; 41 | 42 | for (var i = 0, j = classes.length; i < j; i++) { 43 | var clsName = classes[i]; 44 | if (!clsName) continue; 45 | 46 | if (el.classList) { 47 | el.classList.remove(clsName); 48 | } else { 49 | if (hasClass(el, clsName)) { 50 | curClass = curClass.replace(' ' + clsName + ' ', ' '); 51 | } 52 | } 53 | } 54 | if (!el.classList) { 55 | el.className = trim(curClass); 56 | } 57 | }; 58 | 59 | function getFirstComponentChild(children) { 60 | return children && children.filter(c => c && c.tag)[0]; 61 | } 62 | -------------------------------------------------------------------------------- /public/pages/table/draggable/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Page3 10 | 18 | 19 | 20 |
21 | 53 |
54 | 55 | 56 | -------------------------------------------------------------------------------- /public/js/components/menu/ch-vertical-menu-item.js: -------------------------------------------------------------------------------- 1 | ;(function (root , factory) { 2 | if(typeof exports === 'object') { 3 | module.exports = exports = factory(); 4 | } else if(typeof define === 'function' && define.amd) { 5 | define([] , factory()); 6 | } else { 7 | root.chVerticalMenuItem = factory(); 8 | } 9 | })(this , function () { 10 | var chVerticalMenuItem = { 11 | template: 12 | '
'+ 13 | ''+ 28 | '
', 29 | props:{ 30 | data:{ 31 | type:Array, 32 | default:function () { 33 | return [] ; 34 | } 35 | } 36 | }, 37 | methods:{ 38 | handleMenuItem:function (menu) { 39 | this.$emit("item-click" , menu); 40 | }, 41 | onMenuClick:function (menu) { 42 | this.$emit("item-click" , menu); 43 | } 44 | } 45 | } 46 | return { 47 | name:'ch-vertical-menu-item', 48 | template:chVerticalMenuItem 49 | } 50 | }) -------------------------------------------------------------------------------- /public/pages/table/multheader/index.js: -------------------------------------------------------------------------------- 1 | ;(function() { 2 | "use strict"; 3 | 4 | require.config({ 5 | baseUrl:"../../../js/", 6 | paths:{ 7 | vue:"libs/vue", 8 | ELEMENT:"libs/elm-2.1.0" 9 | } 10 | }); 11 | 12 | require(["vue" , "ELEMENT"] , function (Vue , ELEMENT) { 13 | ELEMENT.install(Vue); 14 | window.vm = new Vue({ 15 | el:"#app", 16 | data: { 17 | tbData:[ 18 | { 19 | id:1, 20 | name:'AAAA', 21 | tel:'12345678910', 22 | score:{ 23 | // 理科 24 | science:[ 25 | {id:11,subject:'数学',score:89,ranking:1}, 26 | {id:12,subject:'物理',score:87,ranking:3}, 27 | {id:13,subject:'化学',score:85,ranking:5} 28 | ], 29 | // 文科 30 | arts:[ 31 | {id:14,subject:'政治',score:83,ranking:7}, 32 | {id:15,subject:'历史',score:81,ranking:9}, 33 | {id:16,subject:'地理',score:79,ranking:11} 34 | ] 35 | } 36 | }, 37 | { 38 | id:2, 39 | name:'BBBB', 40 | tel:'12345678910', 41 | score:{ 42 | // 理科 43 | science:[ 44 | {id:11,subject:'数学',score:89,ranking:1}, 45 | {id:12,subject:'物理',score:87,ranking:3}, 46 | {id:13,subject:'化学',score:85,ranking:5} 47 | ], 48 | // 文科 49 | arts:[ 50 | {id:14,subject:'政治',score:83,ranking:7}, 51 | {id:15,subject:'历史',score:81,ranking:9}, 52 | {id:16,subject:'地理',score:79,ranking:11} 53 | ] 54 | } 55 | } 56 | ], 57 | tbHeader:[ 58 | {id:3,title:'理科', prop:'science', children:[ 59 | {id:31,title:'数学'}, 60 | {id:32,title:'物理'}, 61 | {id:33,title:'化学'} 62 | ]}, 63 | {id:4,title:'文科', prop:'arts', children:[ 64 | {id:41,title:'政治'}, 65 | {id:42,title:'历史'}, 66 | {id:43,title:'地理'} 67 | ]} 68 | ] 69 | } 70 | 71 | }) 72 | }); 73 | 74 | })() -------------------------------------------------------------------------------- /bin/www: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * Module dependencies. 5 | */ 6 | 7 | var app = require('../app'); 8 | var debug = require('debug')('webframe2.0:server'); 9 | var http = require('http'); 10 | 11 | /** 12 | * Get port from environment and store in Express. 13 | */ 14 | 15 | var port = normalizePort(process.env.PORT || '3003'); 16 | app.set('port', port); 17 | 18 | /** 19 | * Create HTTP server. 20 | */ 21 | 22 | var server = http.createServer(app); 23 | 24 | /** 25 | * Listen on provided port, on all network interfaces. 26 | */ 27 | 28 | server.listen(port); 29 | server.on('error', onError); 30 | server.on('listening', onListening); 31 | 32 | /** 33 | * Normalize a port into a number, string, or false. 34 | */ 35 | 36 | function normalizePort(val) { 37 | var port = parseInt(val, 10); 38 | 39 | if (isNaN(port)) { 40 | // named pipe 41 | return val; 42 | } 43 | 44 | if (port >= 0) { 45 | // port number 46 | return port; 47 | } 48 | 49 | return false; 50 | } 51 | 52 | /** 53 | * Event listener for HTTP server "error" event. 54 | */ 55 | 56 | function onError(error) { 57 | if (error.syscall !== 'listen') { 58 | throw error; 59 | } 60 | 61 | var bind = typeof port === 'string' 62 | ? 'Pipe ' + port 63 | : 'Port ' + port; 64 | 65 | // handle specific listen errors with friendly messages 66 | switch (error.code) { 67 | case 'EACCES': 68 | console.error(bind + ' requires elevated privileges'); 69 | process.exit(1); 70 | break; 71 | case 'EADDRINUSE': 72 | console.error(bind + ' is already in use'); 73 | process.exit(1); 74 | break; 75 | default: 76 | throw error; 77 | } 78 | } 79 | 80 | /** 81 | * Event listener for HTTP server "listening" event. 82 | */ 83 | 84 | function onListening() { 85 | var addr = server.address(); 86 | var bind = typeof addr === 'string' 87 | ? 'pipe ' + addr 88 | : 'port ' + addr.port; 89 | debug('Listening on ' + bind); 90 | } 91 | -------------------------------------------------------------------------------- /public/pages/menu/index.js: -------------------------------------------------------------------------------- 1 | ;(function() { 2 | "use strict"; 3 | 4 | require.config({ 5 | baseUrl:"../../js/", 6 | paths:{ 7 | vue:"libs/vue", 8 | http:"libs/http", 9 | axios:"libs/axios", 10 | ELEMENT:"libs/elm-2.1.0", 11 | CHhorizonalMenu:"components/menu/ch-horizonal-menu", 12 | CHhorizonalMenuItem:"components/menu/ch-horizonal-menu-item", 13 | CHVerticalMenuItem:"components/menu/ch-vertical-menu-item", 14 | } 15 | }); 16 | 17 | require(["vue" , "ELEMENT" , "http" , "CHhorizonalMenuItem" , "CHhorizonalMenu" , "CHVerticalMenuItem"] , 18 | function (Vue , ELEMENT , http , CHhorizonalMenuItem , CHhorizonalMenu , CHVerticalMenuItem) { 19 | ELEMENT.install(Vue); 20 | // 注意 CHhorizonalMenuItem 必须在 CHhorizonalMenu 前注册 21 | Vue.component(CHhorizonalMenuItem.name , CHhorizonalMenuItem.template); 22 | Vue.component(CHhorizonalMenu.name , CHhorizonalMenu.template); 23 | Vue.component(CHVerticalMenuItem.name , CHVerticalMenuItem.template); 24 | 25 | window.vm = new Vue({ 26 | el:"#app", 27 | data:{ 28 | menus:[] 29 | }, 30 | created:function () { 31 | this.$on("onglobalsearch" , result => { 32 | this.$message("当前页面监听到全局搜索事件:"+result.value); 33 | }); 34 | }, 35 | mounted:function () { 36 | this.$get("/menus").then( response => { 37 | this.menus = response.data ; 38 | }).catch( e=> {}); 39 | }, 40 | methods:{ 41 | onHorizonalMenuClick:function (obj) { 42 | console.log(obj.name) 43 | }, 44 | onVerticalMenuClick:function (obj) { 45 | console.log(obj.name) 46 | } 47 | } 48 | }) 49 | }); 50 | 51 | })() -------------------------------------------------------------------------------- /public/pages/list/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 列表拖拽 10 | 28 | 29 | 30 |
31 | 48 |
49 | 50 | 51 | -------------------------------------------------------------------------------- /public/pages/list/index.js: -------------------------------------------------------------------------------- 1 | ;(function() { 2 | "use strict"; 3 | 4 | require.config({ 5 | baseUrl:"../../js/", 6 | paths:{ 7 | vue:"libs/vue", 8 | http:"libs/http", 9 | axios:"libs/axios", 10 | vuedraggable:"libs/vuedraggable.min", 11 | sortablejs:"libs/sortable.min", 12 | underscore:"libs/underscore", 13 | ELEMENT:"libs/elm-2.1.0" 14 | } 15 | }); 16 | 17 | require(["vue" , "ELEMENT" , "http" , "vuedraggable" , "underscore"] , 18 | function (Vue , ELEMENT , http , vuedraggable , _) { 19 | ELEMENT.install(Vue); 20 | Vue.component("draggable" , vuedraggable); 21 | window.vm = new Vue({ 22 | el:"#app", 23 | data:{ 24 | list:{ 25 | from:null, 26 | to:null 27 | }, 28 | fromIds:null, 29 | toIds:null, 30 | }, 31 | created:function () { 32 | this.$on("onglobalsearch" , result => { 33 | this.$message("当前页面监听到全局搜索事件:"+result.value); 34 | }); 35 | }, 36 | mounted:function () { 37 | this.$get("/list").then( response => { 38 | this.list.from = response.data.from; 39 | this.list.to = response.data.to; 40 | }).catch( e => {}); 41 | }, 42 | methods:{ 43 | onFromDragEnd:function (evt) { 44 | // 测试:查看打印拖拽后的数据是否正常 45 | this.fromIds = _.pluck(this.list.from , "id"); 46 | this.toIds = _.pluck(this.list.to , "id"); 47 | }, 48 | onToDragEnd:function (evt) { 49 | // 测试:查看打印拖拽后的数据是否正常 50 | this.fromIds = _.pluck(this.list.from , "id"); 51 | this.toIds = _.pluck(this.list.to , "id"); 52 | } 53 | } 54 | }) 55 | }); 56 | 57 | })() -------------------------------------------------------------------------------- /public/pages/form/dialog/index.js: -------------------------------------------------------------------------------- 1 | ;(function() { 2 | "use strict"; 3 | 4 | require.config({ 5 | baseUrl:"../../../js/", 6 | paths:{ 7 | vue:"libs/vue", 8 | http:"libs/http", 9 | axios:"libs/axios", 10 | ELEMENT:"libs/elm-2.1.0", 11 | } 12 | }); 13 | 14 | require(["vue" , "ELEMENT" , "http"] , function (Vue , ELEMENT , http) { 15 | ELEMENT.install(Vue); 16 | window.vm = new Vue({ 17 | el:"#app", 18 | data:{ 19 | dialogVisible:false, 20 | form:{ 21 | name:'aaa', 22 | gender:1, 23 | birth:null, 24 | speciality:[1,2], 25 | marry:1, 26 | desc:'I am is good boy' 27 | } 28 | }, 29 | created:function () { 30 | this.$on("onglobalsearch" , result => { 31 | this.$message("当前页面监听到全局搜索事件:"+result.value); 32 | }); 33 | }, 34 | methods:{ 35 | initForm:function () { 36 | this.form.name = 'aaa' ; 37 | this.form.gender = 1 ; 38 | this.form.birth = null ; 39 | this.form.speciality = [1,2] ; 40 | this.form.marry = 1 ; 41 | this.form.desc = 'I am is good boy' ; 42 | }, 43 | onAdd:function () { 44 | console.log(this.form) 45 | }, 46 | onCancel:function () { 47 | this.reset(); 48 | this.dialogVisible = false ; 49 | }, 50 | handleClose:function (done) { 51 | this.reset(); 52 | done(); 53 | }, 54 | reset:function () { 55 | this.form.name = '' ; 56 | this.form.gender = null ; 57 | this.form.speciality = [] ; 58 | this.form.marry = null ; 59 | this.form.desc = '' ; 60 | } 61 | } 62 | }) 63 | }); 64 | 65 | })() -------------------------------------------------------------------------------- /public/js/components/menu/ch-horizonal-menu.js: -------------------------------------------------------------------------------- 1 | ;(function (root , factory) { 2 | if(typeof exports === 'object') { 3 | module.exports = exports = factory(); 4 | } else if(typeof define === 'function' && define.amd) { 5 | define([] , factory()); 6 | } else { 7 | root.chHorizonalMenu = factory(); 8 | } 9 | })(this , function () { 10 | let chHorizonalMenu = { 11 | template: 12 | '' 21 | , 22 | props:{ 23 | data:{ 24 | type:Array , 25 | default:function () { 26 | return [] 27 | } 28 | }, 29 | backgroundColor:{ 30 | type:String, 31 | default:'rgb(46, 50, 61)' 32 | }, 33 | activeTextColor:{ 34 | type:String, 35 | default:'rgb(255, 208, 75)' 36 | } 37 | }, 38 | data:function () { 39 | return { 40 | activeId:null, 41 | submenuIds:[] 42 | } 43 | }, 44 | methods:{ 45 | itemClick:function (params) { 46 | this.activeId = params.id; 47 | this.removeActive(); 48 | this.$emit('item-click' , params); 49 | }, 50 | removeActive:function () { 51 | var _this = this ; 52 | var activeNodes = this.$el.getElementsByClassName('is_active'); 53 | [].slice.call(activeNodes).forEach(function (el) { 54 | el.className = el.className.replace(/ is_active/ , ''); 55 | el.style.color = '#fff'; 56 | }) 57 | } 58 | } 59 | } 60 | return { 61 | name:'ch-horizonal-menu', 62 | template:chHorizonalMenu 63 | } 64 | }) 65 | -------------------------------------------------------------------------------- /public/css/common.css: -------------------------------------------------------------------------------- 1 | html , body {margin: 0px;overflow: hidden;height: 100%;} 2 | .mt-20 {margin-top: 20px;} 3 | ul , li {margin: 0;padding: 0px;list-style: none;} 4 | 5 | @-webkit-keyframes rotate360 { 6 | from { -webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg);} 7 | to { -webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg);} 8 | } 9 | @-moz-keyframes rotate360 { 10 | from { -webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg);} 11 | to { -webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg);} 12 | } 13 | @-o-keyframes rotate360 { 14 | from { -webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg);} 15 | to { -webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg);} 16 | } 17 | @keyframes rotate360 { 18 | from { -webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg);} 19 | to { -webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg);} 20 | } 21 | 22 | @-webkit-keyframes rotate180 { 23 | from { -webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg);} 24 | to { -webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg);} 25 | } 26 | @-moz-keyframes rotate180 { 27 | from { -webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg);} 28 | to { -webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg);} 29 | } 30 | @-o-keyframes rotate180 { 31 | from { -webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg);} 32 | to { -webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg);} 33 | } 34 | @keyframes rotate180 { 35 | from { -webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg);} 36 | to { -webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg);} 37 | } 38 | -------------------------------------------------------------------------------- /public/pages/encrypt/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Encrypt 10 | 11 | 12 |
13 |
14 |

AES密钥:{{aeskey}}

15 |

原文:{{message}}

16 |

密文:{{encryptStr}}

17 |

解密结果:{{decryptStr}}

18 |
19 | 48 |
49 | 50 | 51 | -------------------------------------------------------------------------------- /public/js/components/permission.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Permission.js v1.0.0 3 | * (c) 2018 运行事业部 4 | * Released under the SPRING License. 5 | */ 6 | define(["http"] , function () { 7 | 8 | // 权限组件 9 | function PermissionCompFactory () { 10 | let PermissionComp = { 11 | render: function (h) { 12 | if(this.show) { 13 | return this.$slots.default[0]; 14 | } else { 15 | return null; 16 | } 17 | }, 18 | props:{ 19 | action:{ 20 | type:String, 21 | default:'' 22 | } 23 | }, 24 | data:function () { 25 | return { 26 | show:false 27 | } 28 | }, 29 | created:function () { 30 | this.$parent.$on("renderpermissioncomp" , this.load); 31 | }, 32 | methods:{ 33 | load:function () { 34 | let actions = window.sessionStorage.getItem(window.location.href); 35 | if(actions) { 36 | this.get(JSON.parse(actions) , this.action); 37 | } 38 | }, 39 | get:function (actions , action) { 40 | if(actions && actions.length > 0) { 41 | this.show = actions.indexOf(action) != -1 ; 42 | } 43 | } 44 | } 45 | } 46 | return PermissionComp ; 47 | } 48 | 49 | // 权限组件实例 50 | function PermissionFactory () { 51 | let Permission = { 52 | data:{ 53 | // 权限地址配置 54 | permissionConfig:{ 55 | url:"/permission", 56 | params:{ 57 | username:"004928", 58 | token:"123" 59 | } 60 | } 61 | }, 62 | components:{ 63 | "permission":PermissionCompFactory() 64 | }, 65 | mounted:function () { 66 | 67 | this.$post(this.permissionConfig.url , this.permissionConfig.params).then(response => { 68 | if(response.status == 200) { 69 | window.sessionStorage.setItem(window.location.href , JSON.stringify(response.data)); 70 | } 71 | this.$emit("renderpermissioncomp"); 72 | }).catch( e => { 73 | console.error(e); 74 | }) 75 | } 76 | } 77 | return Permission ; 78 | } 79 | 80 | return PermissionFactory() ; 81 | }) 82 | 83 | 84 | -------------------------------------------------------------------------------- /public/pages/table/draggable/index.js: -------------------------------------------------------------------------------- 1 | ;(function() { 2 | "use strict"; 3 | 4 | require.config({ 5 | baseUrl:"../../../js/", 6 | paths:{ 7 | vue:"libs/vue", 8 | http:"libs/http", 9 | axios:"libs/axios", 10 | underscore:"libs/underscore", 11 | sortable:"libs/sortable.min", 12 | ELEMENT:"libs/elm-2.1.0" 13 | } 14 | }); 15 | 16 | require(["vue" , "ELEMENT" , "http" , "sortable" , "underscore"] , function (Vue , ELEMENT , http , Sortable , _) { 17 | ELEMENT.install(Vue); 18 | window.vm = new Vue({ 19 | el:"#app", 20 | data:{ 21 | tableData:null, 22 | sortable:null, 23 | loading:true 24 | }, 25 | created:function () { 26 | this.$on("onglobalsearch" , result => { 27 | this.$message("当前页面监听到全局搜索事件:"+result.value); 28 | }); 29 | }, 30 | mounted:function () { 31 | this.$get("/editable").then( response => { 32 | setTimeout(() => { 33 | this.loading = false ; 34 | this.tableData = response.data; 35 | this.$nextTick( () => { 36 | this.setDraggable(); 37 | }) 38 | }, 2000); 39 | }).catch( e => { 40 | this.loading = false ; 41 | }); 42 | }, 43 | methods:{ 44 | setDraggable:function () { 45 | const el = document.querySelector('#app .el-table .el-table__body-wrapper > table > tbody'); 46 | this.sortable = Sortable.create(el , { 47 | ghostClass:"ghost-class", 48 | fallbackClass:"fallback-class", 49 | setData: (dataTransfer) => { 50 | dataTransfer.setData('Text', ''); 51 | }, 52 | // 拖拽结束后的回调 53 | onEnd: (evt) => { 54 | // 更改表格数据顺序 55 | const targetRow = this.tableData.splice(evt.oldIndex , 1)[0]; 56 | this.tableData.splice(evt.newIndex, 0, targetRow); 57 | // 测试:打印拖拽后的数据顺序 58 | console.log(_.pluck(this.tableData , "id")); 59 | } 60 | }); 61 | } 62 | } 63 | }) 64 | }); 65 | })() -------------------------------------------------------------------------------- /public/pages/permission/index.js: -------------------------------------------------------------------------------- 1 | ;(function () { 2 | "use strict"; 3 | require.config({ 4 | baseUrl:"../../js/", 5 | paths:{ 6 | vue:"libs/vue", 7 | http:"libs/http", 8 | axios:"libs/axios", 9 | ELEMENT:"libs/elm-2.1.0", 10 | permission:"components/permission", 11 | } 12 | }); 13 | 14 | require(["vue" , "ELEMENT" , "permission"] , function (Vue , ELEMENT , Permission) { 15 | ELEMENT.install(Vue); 16 | window.vm = new Vue({ 17 | el:"#app", 18 | data:{ 19 | message:"Permission" 20 | }, 21 | extends:Permission, 22 | created:function () { 23 | this.$on("onglobalsearch" , (result) => { 24 | this.$message("当前页面监听到全局搜索事件1:"+result.value); 25 | }); 26 | }, 27 | methods:{ 28 | handlePut:function () { 29 | this.$put("/put" ,{dicId:"1001"}).then( response => { 30 | this.$message({ 31 | type:"success", 32 | duration:1000, 33 | message:response 34 | }); 35 | }).catch( e => { 36 | console.log(e); 37 | }); 38 | }, 39 | handleGet:function () { 40 | this.$get("/test").then(response => { 41 | this.$message({ 42 | type:"success", 43 | message:response 44 | }); 45 | }).catch( err => { 46 | console.log(err); 47 | }); 48 | }, 49 | handlePost:function () { 50 | this.$post("/permission" , {username:"spring",token:"123"}).then(response => { 51 | this.$message({ 52 | type:"success", 53 | message:JSON.stringify(response.data) 54 | }); 55 | }).catch( err => { 56 | console.log(err); 57 | }); 58 | }, 59 | handleAll:function () { 60 | this.$all([ 61 | this.$createGet("/test"), 62 | this.$createPost("/permission"), 63 | ]).then(responses => { 64 | this.$message({ 65 | type:"success", 66 | message:"GET: /test ; POST: /permission ; RESULT: "+responses[0].data + "\n" + JSON.stringify(responses[1].data) 67 | }); 68 | }).catch( err => { 69 | console.log(err); 70 | }) 71 | } 72 | } 73 | }) 74 | }); 75 | })(); -------------------------------------------------------------------------------- /public/pages/form/dialog/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 表单弹框 10 | 11 | 12 |
13 | 59 |
60 | 61 | 62 | -------------------------------------------------------------------------------- /public/pages/table/editable/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Page3 10 | 15 | 16 | 17 |
18 | 78 |
79 | 80 | 81 | -------------------------------------------------------------------------------- /public/js/libs/http.js: -------------------------------------------------------------------------------- 1 | /** 2 | * http 模块 3 | */ 4 | define(["vue","axios"] , function (Vue , axios) { 5 | 6 | // axios.defaults.baseURL="http://192.168.9.165:8080"; 7 | 8 | // 设置拦截器 9 | axios.interceptors.request.use( config => { 10 | // 以表单的方式提交,解决跨域问题 11 | config.headers = { 12 | "Content-Type":"application/x-www-form-urlencoded", 13 | } 14 | // 转换请求参数 15 | config.transformRequest = [data => { 16 | if(data || data == "") return ""; 17 | var param = []; 18 | for(key in data) { 19 | param.push(key+'='+data[key]); 20 | } 21 | return param.join("&"); 22 | }] 23 | return config ; 24 | }) 25 | 26 | /** 27 | * get 请求 28 | * @param {String} url 29 | * @param {Object} params 30 | */ 31 | Vue.prototype.$get = function (url , params) { 32 | return new Promise( (resolve , reject) => { 33 | axios.get(url , params).then(response => { 34 | resolve(response.data); 35 | }).catch( err => { 36 | reject(err); 37 | handleError(err); 38 | }) 39 | }) 40 | } 41 | 42 | /** 43 | * put 请求 44 | * @param {*} url 45 | * @param {*} params 46 | */ 47 | Vue.prototype.$put = function (url , params) { 48 | return new Promise( (resolve , reject) => { 49 | axios.put(url , params).then(response => { 50 | resolve(response.data); 51 | }).catch( err => { 52 | reject(err); 53 | handleError(err); 54 | }) 55 | }) 56 | } 57 | 58 | /** 59 | * post 请求 60 | * @param {String} url 61 | * @param {Object} params 62 | */ 63 | Vue.prototype.$post = function (url , params) { 64 | return new Promise( (resolve , reject) => { 65 | axios.post(url , params).then(response => { 66 | resolve(response); 67 | }).catch( err => { 68 | reject(err); 69 | handleError(err); 70 | }) 71 | }) 72 | } 73 | 74 | /** 75 | * 并发请求 76 | * @param {Array} requests 77 | */ 78 | Vue.prototype.$all = function (requests) { 79 | return new Promise( ( resolve , reject) => { 80 | axios.all(requests).then(axios.spread( (acct , perms) => { 81 | resolve([acct , perms]) 82 | })).catch( err => { 83 | reject(err); 84 | handleError(err); 85 | }) 86 | }); 87 | } 88 | 89 | /** 90 | * 创建get请求 91 | */ 92 | Vue.prototype.$createGet = function (url , params) { 93 | return axios.get(url , params); 94 | } 95 | 96 | /** 97 | * 创建post请求 98 | */ 99 | Vue.prototype.$createPost = function (url , params) { 100 | return axios.post(url , params); 101 | } 102 | 103 | /** 104 | * 提示错误信息 105 | * @param {*} err 106 | */ 107 | function handleError (err) { 108 | new Vue().$message({ 109 | showClose: true, 110 | duration:5000, 111 | message: JSON.stringify(err), 112 | type: 'error' 113 | }); 114 | } 115 | 116 | Vue.prototype.$axios = axios ; 117 | 118 | }) -------------------------------------------------------------------------------- /public/pages/encrypt/index.js: -------------------------------------------------------------------------------- 1 | ;(function() { 2 | "use strict"; 3 | 4 | require.config({ 5 | baseUrl:"../../js/", 6 | paths:{ 7 | vue:"libs/vue", 8 | ELEMENT:"libs/elm-2.1.0", 9 | crypto:"libs/cryptool", 10 | } 11 | }); 12 | 13 | require(["vue" , "ELEMENT" , "crypto"] , function (Vue , ELEMENT , Crypto) { 14 | ELEMENT.install(Vue); 15 | window.vm = new Vue({ 16 | el:"#app", 17 | data:{ 18 | message:"测试源代码abcd", 19 | aeskey:"", 20 | rsakey:{ 21 | publicKey:'', 22 | privateKey:'' 23 | }, 24 | encryptStr:"", 25 | decryptStr:"", 26 | }, 27 | created:function () { 28 | this.aeskey = Crypto.AES.getKey(); 29 | var RSAKEY = Crypto.RSA.getKey(); 30 | this.rsakey.publicKey = RSAKEY.getPublicBaseKeyB64(); 31 | this.rsakey.privateKey = RSAKEY.getPrivateBaseKeyB64(); 32 | this.$on("onglobalsearch" , result => { 33 | this.$message("当前页面监听到全局搜索事件:"+result.value); 34 | }); 35 | }, 36 | methods:{ 37 | // HASH 算法 38 | handleMD5:function () { 39 | this.encryptStr = Crypto.MD5(this.message); 40 | }, 41 | 42 | handleSHA512:function () { 43 | this.encryptStr = Crypto.SHA512(this.message); 44 | }, 45 | handleSHA256:function () { 46 | this.encryptStr = Crypto.SHA256(this.message) 47 | }, 48 | 49 | // 对称加密 AES 50 | handleAESEncrypt:function () { 51 | this.decryptStr = ''; 52 | this.encryptStr = Crypto.AES.encrypt(this.message , this.aeskey); 53 | }, 54 | handleAESDecrypt:function () { 55 | this.decryptStr = Crypto.AES.decrypt(this.encryptStr , this.aeskey); 56 | }, 57 | 58 | // DES 59 | handleDESEncrypt:function () { 60 | this.decryptStr = ''; 61 | this.encryptStr = Crypto.DES.encrypt(this.message , this.aeskey); 62 | }, 63 | handleDESDecrypt:function () { 64 | this.decryptStr = Crypto.DES.decrypt(this.encryptStr, this.aeskey); 65 | }, 66 | 67 | // RSA 68 | handleRSAEncrypt:function () { 69 | this.decryptStr = '' ; 70 | this.encryptStr = Crypto.RSA.encrypt(this.message , this.rsakey.publicKey); 71 | }, 72 | handleRSADecrypt:function () { 73 | this.decryptStr = Crypto.RSA.decrypt(this.encryptStr , this.rsakey.privateKey); 74 | }, 75 | 76 | // 转码 77 | handleStrToBase64:function () { 78 | this.decryptStr = ''; 79 | this.encryptStr = Crypto.Base64.encode(this.message); 80 | }, 81 | handleBase64ToStr:function () { 82 | this.decryptStr = Crypto.Base64.decode(this.encryptStr); 83 | }, 84 | 85 | handleStrToHex:function () { 86 | this.decryptStr = ''; 87 | this.encryptStr = Crypto.Hex.encode(this.message); 88 | }, 89 | handleHexToStr:function () { 90 | this.decryptStr = Crypto.Hex.decode(this.encryptStr); 91 | } 92 | } 93 | }) 94 | }); 95 | 96 | })() -------------------------------------------------------------------------------- /public/pages/form/validate/index.js: -------------------------------------------------------------------------------- 1 | ;(function() { 2 | "use strict"; 3 | 4 | require.config({ 5 | baseUrl:"../../../js/", 6 | paths:{ 7 | vue:"libs/vue", 8 | http:"libs/http", 9 | axios:"libs/axios", 10 | ELEMENT:"libs/elm-2.1.0" 11 | } 12 | }); 13 | 14 | require(["vue" , "ELEMENT" , "http"] , function (Vue , ELEMENT , http) { 15 | ELEMENT.install(Vue); 16 | window.vm = new Vue({ 17 | el:"#app", 18 | data:{ 19 | ruleForm: { 20 | pass: '', 21 | checkPass: '', 22 | age: '' 23 | }, 24 | rules: { 25 | pass: [ 26 | { validator: function (rule,value,callback) { 27 | if (value === '') { 28 | callback(new Error('请输入密码')); 29 | } else { 30 | if (vm.ruleForm.checkPass !== '') { 31 | vm.$refs.ruleForm.validateField('checkPass'); 32 | } 33 | callback(); 34 | } 35 | } , trigger: 'blur' , required:true} 36 | ], 37 | checkPass: [ 38 | { validator: function (rule,value,callback) { 39 | if (value === '') { 40 | callback(new Error('请再次输入密码')); 41 | } else if (value !== vm.ruleForm.pass) { 42 | callback(new Error('两次输入密码不一致!')); 43 | } else { 44 | callback(); 45 | } 46 | }, trigger: 'blur', required:true} 47 | ], 48 | age: [ 49 | { validator: function (rule,value,callback) { 50 | if (!value) { 51 | return callback(new Error('年龄不能为空')); 52 | } 53 | setTimeout(() => { 54 | if (!Number.isInteger(value)) { 55 | callback(new Error('请输入数字值')); 56 | } else { 57 | if (value < 18) { 58 | callback(new Error('必须年满18岁')); 59 | } else { 60 | callback(); 61 | } 62 | } 63 | }, 1000); 64 | }, trigger: 'blur', required:true} 65 | ] 66 | } 67 | }, 68 | created:function () { 69 | this.$on("onglobalsearch" , result => { 70 | this.$message("当前页面监听到全局搜索事件:"+result.value); 71 | }); 72 | }, 73 | methods:{ 74 | submitForm:function (formName) { 75 | this.$refs[formName].validate((valid) => { 76 | if (valid) { 77 | this.$message({ 78 | type:"success", 79 | message:"表单验证通过!" 80 | }); 81 | } else { 82 | this.$message({ 83 | type:"error", 84 | message:"表单验证失败!" 85 | }); 86 | return false; 87 | } 88 | }); 89 | }, 90 | resetForm:function (formName) { 91 | this.$refs[formName].resetFields(); 92 | } 93 | } 94 | }) 95 | }); 96 | 97 | })() -------------------------------------------------------------------------------- /public/pages/table/pagination/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Table 10 | 30 | 31 | 32 |
33 | 83 |
84 | 85 | 86 | -------------------------------------------------------------------------------- /routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | const uuidv4 = require('uuid/v4'); 4 | const mockjs = require('mockjs'); 5 | 6 | /* GET home page. */ 7 | router.get('/', function(req, res, next) { 8 | res.render('index', { title: '前端通用框架' }); 9 | }); 10 | 11 | router.get('/menus', function(req, res, next) { 12 | var data = { 13 | data:[ 14 | { 15 | id:"0", 16 | name:"权限控制0", 17 | icon:"el-icon-star-off", 18 | url:"../../pages/permission/index.html" 19 | }, 20 | { 21 | id:"2", 22 | name:"加解密", 23 | icon:"el-icon-star-off", 24 | url:"../../pages/encrypt/index.html" 25 | }, 26 | { 27 | id:"9", 28 | name:"列表拖拽9", 29 | icon:"el-icon-star-off", 30 | url:"../../pages/list/index.html" 31 | }, 32 | { 33 | id:"10", 34 | name:"表单", 35 | icon:"el-icon-star-off", 36 | children:[{ 37 | id:"101", 38 | name:"自定义表单验证", 39 | url:"../../../pages/form/validate/index.html" 40 | },{ 41 | id:"102", 42 | name:"表单弹框", 43 | url:"../../../pages/form/dialog/index.html", 44 | }] 45 | }, 46 | { 47 | id:"12", 48 | name:"导航菜单", 49 | icon:"el-icon-star-off", 50 | url:"../../pages/menu/index.html" 51 | }, 52 | { 53 | id:"1", 54 | name:"表格", 55 | icon:"el-icon-location", 56 | children:[{ 57 | id:"3", 58 | name:"图表3", 59 | url:"../../pages/charts/index.html" 60 | },{ 61 | id:"6", 62 | name:"表格分页6", 63 | url:"../../pages/table/pagination/index.html" 64 | },{ 65 | id:"7", 66 | name:"表格编辑7", 67 | url:"../../pages/table/editable/index.html" 68 | },{ 69 | id:"8", 70 | name:"表格拖拽8", 71 | url:"../../pages/table/draggable/index.html" 72 | },{ 73 | id:"11", 74 | name:"动态生成多级表头", 75 | url:"../../pages/table/multheader/index.html" 76 | }] 77 | }, 78 | { 79 | id:"4", 80 | name:"测试4", 81 | icon:"el-icon-star-off", 82 | children:[{ 83 | id:'41', 84 | name:'二级菜单', 85 | children:[{ 86 | id:'411', 87 | name:'三级菜单', 88 | url:"../../pages/test/index.html" 89 | }] 90 | }] 91 | } 92 | ] 93 | }; 94 | res.send(data); 95 | }); 96 | 97 | router.get("/search" , function (req , res) { 98 | var data = mockjs.mock({ 99 | "data|10":[{ 100 | "value":"@name", 101 | "address":"@city", 102 | "msg":'@cword(1,15)' 103 | }] 104 | }) 105 | res.send(data); 106 | }) 107 | 108 | router.post("/permission" , function (req , res) { 109 | res.send(["QUERY","DELETE","UPDATE"]); 110 | }); 111 | 112 | router.put("/put" , function (req , res) { 113 | res.send(JSON.stringify(req.body)); 114 | }) 115 | 116 | router.get("/test" , function (req , res) { 117 | res.send("hello vue"); 118 | }); 119 | 120 | router.get("/list" , function (req , res) { 121 | var data = mockjs.mock({ 122 | data:{ 123 | "from|10":[{ 124 | "id|+1":11, 125 | "uuid":function () { 126 | return uuidv4(); 127 | }, 128 | "text":"@title" 129 | }], 130 | "to|4":[{ 131 | "id|+1":21, 132 | "uuid":function () { 133 | return uuidv4(); 134 | }, 135 | "text":"@title" 136 | }] 137 | } 138 | }); 139 | res.send(data); 140 | }); 141 | 142 | router.get("/pagination" , function (req , res) { 143 | var data = mockjs.mock({ 144 | "data|256":[{ 145 | "id|+1":1, 146 | "name":"@name", 147 | "age|10-30":30, 148 | "gender|1":[0,1], 149 | "address":"@province@city@county", 150 | "desc":"@cparagraph" 151 | }] 152 | }); 153 | res.send(data); 154 | }) 155 | 156 | router.get("/editable" , function (req , res) { 157 | var data = mockjs.mock({ 158 | "data|10":[{ 159 | "id|+1":1, 160 | "name":"@name", 161 | "birth":"@date", 162 | "desc":"@title", 163 | "address":"@province@city@county" 164 | }] 165 | }); 166 | res.send(data); 167 | }); 168 | 169 | module.exports = router; 170 | -------------------------------------------------------------------------------- /public/css/frame.css: -------------------------------------------------------------------------------- 1 | html , body {margin: 0px;height: 100%;overflow: hidden;} 2 | #app , .el-container { 3 | height: 100%; 4 | } 5 | .el-header { 6 | background-color: #306ac6; 7 | } 8 | .logo { 9 | width: 200px; 10 | float: left; 11 | height: 50px; 12 | color: #ffffff; 13 | position: relative; 14 | text-align: center; 15 | } 16 | .logo span { 17 | display: block; 18 | line-height: 50px; 19 | opacity:1; 20 | transition: opacity .3s .1s; 21 | -webkit-transition: opacity .3s .1s; 22 | -o-transition: opacity .3s .1s; 23 | -moz-transition: opacity .3s .1s; 24 | } 25 | .logo i { 26 | right: 0px; 27 | position: absolute; 28 | top: 0px; 29 | line-height: 50px; 30 | width: 30px; 31 | transition: width .3s .1s; 32 | -webkit-transition: width .3s .1s; 33 | -o-transition: width .3s .1s; 34 | -moz-transition: width .3s .1s; 35 | cursor: pointer; 36 | } 37 | .el-aside.collapse .logo span { 38 | opacity: 0; 39 | } 40 | .el-aside.collapse .logo i { 41 | width: 100%; 42 | } 43 | .el-menu-vertical-left:not(.el-menu--collapse) { 44 | width: 200px; 45 | } 46 | .el-menu--collapse>div>.el-submenu>.el-submenu__title span, 47 | .el-menu--collapse>div>.el-submenu>.el-submenu__title .el-submenu__icon-arrow { 48 | display: none; 49 | } 50 | 51 | .el-submenu__title:hover i:first-child , 52 | .el-menu-item:hover i { 53 | -webkit-animation:rotate360 .5s forwards ; 54 | -moz-animation:rotate360 .5s forwards ; 55 | -o-animation:rotate360 .5s forwards ; 56 | animation:rotate360 .5s forwards ; 57 | } 58 | .el-aside.collapse { 59 | width: 64px !important; 60 | } 61 | .el-aside { 62 | width: 200px !important; 63 | transition: width .3s ease-in-out; 64 | -webkit-transition: width .3s ease-in-out; 65 | overflow: initial; 66 | background-color: #2e323d; 67 | } 68 | iframe { 69 | width: 100%; 70 | height: 100%; 71 | } 72 | .el-main { 73 | height: 100%; 74 | padding:0; 75 | } 76 | .el-tabs { 77 | height: 100%; 78 | } 79 | .el-tabs__header { 80 | margin: 0px; 81 | } 82 | .el-tabs__content { 83 | height: calc(100% - 41px); 84 | } 85 | .el-tab-pane { 86 | height: 100%; 87 | padding:10px; 88 | } 89 | .el-tabs--card>.el-tabs__header .el-tabs__item { 90 | border-top:4px solid #ffffff; 91 | } 92 | .el-tabs--card>.el-tabs__header .el-tabs__item.is-active.is-closable { 93 | border-top-color: rgb(255, 208, 75); 94 | } 95 | .el-tabs--card>.el-tabs__header .el-tabs__nav { 96 | border-radius: 0px; 97 | border-top: none; 98 | } 99 | 100 | 101 | .ch-expand-arrow { 102 | position: absolute; 103 | z-index: 9999; 104 | left: 200px; 105 | top: calc(50% - 41px); 106 | height: 50px; 107 | border: 16px solid #2e323d; 108 | border-top-color: transparent; 109 | border-right-color: transparent; 110 | border-bottom-color: transparent; 111 | transition: left .3s ease-in-out; 112 | -webkit-transition: left .3s ease-in-out; 113 | display: none; 114 | } 115 | .el-aside:hover .ch-expand-arrow { 116 | display: block; 117 | } 118 | .el-aside.collapse .ch-expand-arrow { 119 | left: 64px; 120 | } 121 | .ch-expand-arrow i { 122 | color: #ffffff; 123 | line-height: 50px; 124 | position: relative; 125 | left: -16px; 126 | font-size: 14px; 127 | } 128 | .ch-expand-arrow i:hover { 129 | color: rgb(255, 208, 75); 130 | cursor: pointer; 131 | font-size: 16px; 132 | } 133 | .el-header { 134 | padding: 0 20px 0 0 ; 135 | } 136 | .el-header .toolbar { 137 | float: right; 138 | height: 100%; 139 | } 140 | 141 | .el-header .toolbar .el-autocomplete { 142 | float: right; 143 | top: 8px; 144 | margin-right: 20px; 145 | } 146 | .el-header .toolbar .el-autocomplete .el-input__inner { 147 | height: 34px; 148 | border-radius: 0px; 149 | } 150 | .el-header .toolbar .el-autocomplete .el-input__icon { 151 | line-height: 34px; 152 | } 153 | .el-header .toolbar .el-dropdown { 154 | color: #ffffff; 155 | top: 16px; 156 | float: right; 157 | cursor: pointer; 158 | } 159 | .el-header .toolbar .el-color-picker--small { 160 | top: 9px; 161 | float: right; 162 | margin-right: 20px; 163 | } -------------------------------------------------------------------------------- /views/index.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | <%= title %> 11 | 12 | 13 |
14 | 85 |
86 | 87 | 88 | -------------------------------------------------------------------------------- /public/js/components/menu/ch-horizonal-menu-item.js: -------------------------------------------------------------------------------- 1 | ;(function (root , factory) { 2 | if(typeof exports === 'object') { 3 | module.exports = exports = factory(); 4 | } else if(typeof define === 'function' && define.amd) { 5 | define([] , factory()); 6 | } else { 7 | root.chHorizonalMenuItem = factory(); 8 | } 9 | })(this , function () { 10 | let chHorizonalMenuItem = { 11 | template: 12 | '
'+ 13 | ''+ 41 | '
' 42 | , 43 | props:{ 44 | menus:{ 45 | type: Array, 46 | default: function () { 47 | return []; 48 | } 49 | }, 50 | level:{ 51 | type: Number, 52 | default:0 53 | }, 54 | activeId:{ 55 | type:[Number , String], 56 | default:'' 57 | }, 58 | activeTextColor:String, 59 | backgroundColor:String 60 | }, 61 | data:function () { 62 | return { 63 | show:false, 64 | floor:this.level, 65 | timeId:0, 66 | current_id:-1, 67 | isActive:false 68 | } 69 | }, 70 | created:function () { 71 | this.floor++; 72 | }, 73 | methods:{ 74 | onMouseEnter:function (event , id) { 75 | clearTimeout(this.timeId); 76 | this.current_id = id ; 77 | this.$nextTick(function () { 78 | if(this.floor > 1) { 79 | var innerMenu = event.target.querySelector('.ch-horizonal-menu__inner'); 80 | var innerMenuItem = event.target.querySelector('.ch-horizonal-menu-item'); 81 | innerMenu.style.left = (innerMenuItem.offsetWidth - 20 + 5) + 'px'; 82 | innerMenu.style.top = (-innerMenuItem.offsetHeight) + 'px'; 83 | } 84 | }) 85 | }, 86 | onMouseLeave:function (event) { 87 | this.timeId = setTimeout(function () { 88 | this.current_id = -1 ; 89 | }.bind(this) , 200) 90 | }, 91 | itemClick:function (menu , event) { 92 | this.current_id = -1 ; 93 | this.$emit('item-click' , menu); 94 | if(event) this.setParentNodeActive(event.target.parentNode , 'ch-horizonal-submenu'); 95 | }, 96 | setParentNodeActive:function (el , cls) { 97 | var classList = el.className.split(' '); 98 | if(classList.indexOf('ch-horizonal-menu') == -1) { 99 | if(classList.indexOf(cls) != -1) { 100 | el.style.color = this.activeTextColor; 101 | el.className = el.className.concat(' is_active'); 102 | } 103 | this.setParentNodeActive(el.parentNode , cls); 104 | } 105 | } 106 | } 107 | } 108 | return { 109 | name:'ch-horizonal-menu-item', 110 | template:chHorizonalMenuItem 111 | } 112 | }) 113 | -------------------------------------------------------------------------------- /public/pages/table/pagination/index.js: -------------------------------------------------------------------------------- 1 | ;(function() { 2 | "use strict"; 3 | 4 | require.config({ 5 | baseUrl:"../../../js/", 6 | paths:{ 7 | vue:"libs/vue", 8 | http:"libs/http", 9 | axios:"libs/axios", 10 | ELEMENT:"libs/elm-2.1.0", 11 | underscore:"libs/underscore", 12 | } 13 | }); 14 | 15 | require(["vue" , "ELEMENT" , "http" , "underscore"] , function (Vue , ELEMENT , Http , _) { 16 | ELEMENT.install(Vue); 17 | window.vm = new Vue({ 18 | el:"#app", 19 | data:{ 20 | rawData:[], 21 | rawFilterData:[], 22 | tableData:[], 23 | currentPage:1, 24 | pageSizes:[15, 30 , 50, 80], 25 | pageSize:15, 26 | searchName:"", 27 | searchGender:"", 28 | selections:[] 29 | }, 30 | created:function () { 31 | this.$on("onglobalsearch" , result => { 32 | this.$message("当前页面监听到全局搜索事件:"+result.value); 33 | }); 34 | }, 35 | mounted:function () { 36 | this.$get("/pagination").then( response => { 37 | this.rawData = response.data; 38 | this.rawFilterData = response.data; 39 | this.getCurrentPageData(); 40 | }).catch( e => { 41 | console.log(e); 42 | }) 43 | }, 44 | methods:{ 45 | handleSelectionChange:function (selection) { 46 | this.selections = selection ; 47 | }, 48 | // 取消选择 49 | handleClearSelection:function () { 50 | this.$refs.tb.clearSelection(); 51 | this.selections = []; 52 | }, 53 | // 查询 54 | handleLocalSearch:function () { 55 | this.rawData = (this.searchName == "" && this.searchGender == "") ? this.rawFilterData 56 | : this.rawFilterData.filter(this.createFilter(this.searchName , this.searchGender)); 57 | this.getCurrentPageData(); 58 | }, 59 | handleDel:function () { 60 | this.showConfirmDialog( () => { 61 | let ids = _.pluck(this.selections , "id"); 62 | let result = this.rawData.filter( item => { 63 | return ids.indexOf(item.id) == -1 ; 64 | }); 65 | this.rawData = result ; 66 | this.rawFilterData = result ; 67 | this.handleClearSelection(); 68 | this.getCurrentPageData(); 69 | }) 70 | }, 71 | handleSizeChange:function (val) { 72 | this.pageSize = val ; 73 | this.getCurrentPageData(); 74 | }, 75 | handleCurrentChange:function (val) { 76 | this.currentPage = val ; 77 | this.getCurrentPageData(); 78 | }, 79 | // 获取当前页的数据 80 | getCurrentPageData:function () { 81 | let start = (this.currentPage - 1) * this.pageSize ; 82 | let end = start + this.pageSize ; 83 | this.tableData = this.rawData.slice( start , end); 84 | }, 85 | // 设置选中行 86 | setSelectionRow:function () { 87 | setTimeout( () => { 88 | this.selectedRows.forEach( row => { 89 | this.$refs.tb.toggleRowSelection(row , true); 90 | }); 91 | },100); 92 | }, 93 | createFilter:function (name , gender) { 94 | return (item) => { 95 | if(name && gender != "") { 96 | return item.name.toLowerCase().indexOf(name.toLowerCase()) != -1 && item.gender == gender ; 97 | } else if(name) { 98 | return item.name.toLowerCase().indexOf(name.toLowerCase()) != -1; 99 | } else if(gender != "") { 100 | return item.gender == gender ; 101 | } 102 | } 103 | }, 104 | showConfirmDialog:function (cb) { 105 | // 如果需要使弹框的遮罩覆盖全屏,则需要通过 parent.top.vm 来调用 106 | parent.top.vm.$confirm('是否删除选中的数据?', '提示', { 107 | confirmButtonText: '确定', 108 | cancelButtonText: '取消', 109 | type: 'warning' 110 | }).then(() => { 111 | cb.call(this); 112 | }).catch(() => {}); 113 | } 114 | } 115 | }) 116 | }); 117 | })() -------------------------------------------------------------------------------- /public/js/libs/cryptool.js: -------------------------------------------------------------------------------- 1 | ;(function (root, factory) { 2 | if (typeof exports === "object") { 3 | // CommonJS 4 | module.exports = exports = factory(require('./crypto-js.min') , require('./jsencrypt')); 5 | } 6 | else if (typeof define === "function" && define.amd) { 7 | // AMD 8 | define(["libs/crypto-js.min",'libs/jsencrypt'], factory); 9 | } 10 | else { 11 | // Global (browser) 12 | root.CrypTool = factory(CryptoJS , JSEncrypt); 13 | } 14 | }(this, function (CryptoJS , JSEncrypt) { 15 | 16 | /** 17 | * 默认随机生成一个16位长度16进制的key 18 | * 由于前端AES采用补0算法,而java补0算法只支持16位长度key 19 | */ 20 | function generatorKey (len) { 21 | var key = ''; 22 | len = len || 16 ; 23 | for(var i = 0 ; i < len ; i ++) { 24 | var num = Math.ceil(Math.random() * 15); 25 | if(num > 9) num = String.fromCharCode(55 + num); 26 | key += num ; 27 | } 28 | return key.toLowerCase() ; 29 | } 30 | 31 | return { 32 | // HASH 33 | MD5:function (str) { 34 | return CryptoJS.MD5(str).toString(); 35 | }, 36 | SHA512:function (str) { 37 | return CryptoJS.SHA512(str).toString(); 38 | }, 39 | SHA256:function (str) { 40 | return CryptoJS.SHA256(str).toString(); 41 | }, 42 | // 对称加解密 AES , DES 43 | // AES 采用补0的算法 参考资料: 44 | AES:{ 45 | encrypt:function (str , key) { 46 | var k = CryptoJS.enc.Latin1.parse(key); 47 | var iv = CryptoJS.enc.Latin1.parse(key); 48 | var encrypted = CryptoJS.AES.encrypt(str,k,{ 49 | iv:iv, 50 | mode:CryptoJS.mode.CBC, 51 | padding:CryptoJS.pad.ZeroPadding 52 | }); 53 | return encrypted.toString(); 54 | }, 55 | decrypt:function (encryptStr , key) { 56 | 57 | var k = CryptoJS.enc.Latin1.parse(key); 58 | var iv = CryptoJS.enc.Latin1.parse(key); 59 | 60 | var decrypted = CryptoJS.AES.decrypt(encryptStr,k,{ 61 | iv:iv, 62 | mode:CryptoJS.mode.CBC, 63 | padding:CryptoJS.pad.ZeroPadding 64 | }); 65 | return decrypted.toString(CryptoJS.enc.Utf8); 66 | }, 67 | getKey:function (len) { 68 | return generatorKey(len); 69 | } 70 | }, 71 | DES:{ 72 | encrypt:function (str , key) { 73 | var k = CryptoJS.enc.Utf8.parse(key); 74 | var encrypted = CryptoJS.DES.encrypt(str ,k,{ 75 | mode:CryptoJS.mode.ECB, 76 | padding:CryptoJS.pad.Pkcs7 77 | }); 78 | return encrypted.toString() ; 79 | }, 80 | decrypt:function (str , key) { 81 | var k = CryptoJS.enc.Utf8.parse(key); 82 | var decrypted = CryptoJS.DES.decrypt(str ,k,{ 83 | mode:CryptoJS.mode.ECB, 84 | padding:CryptoJS.pad.Pkcs7 85 | }); 86 | return decrypted.toString(CryptoJS.enc.Utf8); 87 | }, 88 | getKey:function (len) { 89 | return generatorKey(len); 90 | } 91 | }, 92 | 93 | // 转编码 94 | Base64:{ 95 | encode:function (str) { 96 | var words = CryptoJS.enc.Utf8.parse(str); 97 | return CryptoJS.enc.Base64.stringify(words).toString(); 98 | }, 99 | decode:function (encodeStr) { 100 | return CryptoJS.enc.Base64.parse(encodeStr).toString(CryptoJS.enc.Utf8); 101 | } 102 | }, 103 | Hex:{ 104 | encode:function (strNumber) { 105 | var words = CryptoJS.enc.Utf8.parse(strNumber); 106 | return CryptoJS.enc.Hex.stringify(words).toString(); 107 | }, 108 | decode:function (hexStr) { 109 | var words = CryptoJS.enc.Hex.parse(hexStr); 110 | return CryptoJS.enc.Utf8.stringify(words); 111 | } 112 | }, 113 | 114 | // RSA 115 | RSA:{ 116 | encrypt:function (str , key) { 117 | var jsEncrypt = new JSEncrypt.JSEncrypt(); 118 | jsEncrypt.setPublicKey(key); 119 | return jsEncrypt.encrypt(str); 120 | }, 121 | decrypt:function (str , key) { 122 | var jsEncrypt = new JSEncrypt.JSEncrypt(); 123 | jsEncrypt.setPrivateKey(key); 124 | return jsEncrypt.decrypt(str); 125 | }, 126 | sign:function (str) { 127 | return new JSEncrypt.JSEncrypt().sign(str , CryptoJS.MD5, "md5"); 128 | }, 129 | verify:function (str , signature) { 130 | return new JSEncrypt.JSEncrypt().verify(str , signature , CryptoJS.MD5); 131 | }, 132 | getKey:function (cb) { 133 | return new JSEncrypt.JSEncrypt().getKey(cb); 134 | } 135 | } 136 | } 137 | 138 | })); -------------------------------------------------------------------------------- /public/pages/index.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | require.config({ 4 | baseUrl:"../../js/", 5 | paths:{ 6 | vue:"libs/vue", 7 | http:"libs/http", 8 | axios:"libs/axios", 9 | ELEMENT:"libs/elm-2.1.0", 10 | CHVerticalMenuItem:"components/menu/ch-vertical-menu-item", 11 | } 12 | }); 13 | 14 | require(["vue" , "ELEMENT" , "CHVerticalMenuItem" , "http"] , function (Vue , ELEMENT , CHVerticalMenuItem , Http ) { 15 | ELEMENT.install(Vue); 16 | Vue.component(CHVerticalMenuItem.name , CHVerticalMenuItem.template); 17 | window.vm = new Vue({ 18 | el:"#app", 19 | data:{ 20 | searchWords:"", 21 | activeMenuId:"-1", 22 | isCollapse: false, 23 | tabs:[], 24 | activeTabId:"0", 25 | menus:[], 26 | language:"zh-cn", 27 | themeColor:"#2e323d" // 主题颜色 28 | }, 29 | created:function () { 30 | var lang = localStorage.getItem('language'); 31 | if(lang) { 32 | this.language = lang ; 33 | } 34 | }, 35 | mounted:function () { 36 | this.$get("/menus").then(response => { 37 | this.menus = response.data ; 38 | }).catch(e => { 39 | console.log(e); 40 | }) 41 | }, 42 | methods:{ 43 | onDropdownItemClick:function (command) { 44 | switch (command) { 45 | case 'message': 46 | 47 | break; 48 | case 'setting': 49 | 50 | break; 51 | default: 52 | this.language == command == 'zh-cn' ? 'en-us' : command ; 53 | localStorage.setItem('language' , this.language); 54 | 55 | } 56 | }, 57 | handleCollapseMenu:function () { 58 | this.isCollapse = !this.isCollapse; 59 | }, 60 | onCHMenuClick:function (data) { 61 | this.addTab(data); 62 | }, 63 | clickTab:function (tab) { 64 | this.activeMenuId = tab.$props.name; 65 | }, 66 | removeTab:function (tabId) { 67 | let tabs = this.tabs; 68 | let activeId = this.activeTabId; 69 | if (activeId === tabId) { 70 | tabs.forEach((tab, index) => { 71 | if (tab.id === tabId) { 72 | let nextTab = tabs[index + 1] || tabs[index - 1]; 73 | if (nextTab) { 74 | activeId = nextTab.id; 75 | this.activeMenuId = activeId ; 76 | } else { 77 | activeId = "-1"; 78 | this.activeMenuId = activeId ; 79 | } 80 | } 81 | }); 82 | } 83 | this.activeTabId = activeId; 84 | this.tabs = tabs.filter(tab => tab.id !== tabId); 85 | }, 86 | addTab:function (newTab) { 87 | let tab = this.tabs.find( tab => tab.id === newTab.id); 88 | if(tab) { 89 | this.activeTabId = tab.id ; 90 | } else if(newTab.id !== this.activeMenuId) { 91 | newTab.url +="?"+new Date().getTime(); 92 | this.tabs.push(newTab); 93 | this.activeTabId = newTab.id ; 94 | } else { 95 | this.activeTabId = newTab.id ; 96 | } 97 | this.activeMenuId = newTab.id ; 98 | }, 99 | // 关键词搜索 100 | querySearch:function (queryString , cb) { 101 | this.$get("/search").then( response => { 102 | var results = queryString ? response.data.filter(this.createFilter(queryString)) : response.data; 103 | cb(results); 104 | }).catch( e => { 105 | console.log(e); 106 | }); 107 | }, 108 | // 过滤关键词 109 | createFilter:function (queryString) { 110 | return function (item) { 111 | return (item.value.toLowerCase().indexOf(queryString.toLowerCase()) != -1); 112 | }; 113 | }, 114 | // 选择搜索后的结果 115 | handleSelect:function (item) { 116 | this.sendGlobalEvent("onglobalsearch" , item); 117 | }, 118 | sendGlobalEvent:function (eventName , params) { 119 | let currentIframe = document.querySelector("iframe[name='"+this.activeMenuId+"']"); 120 | if(currentIframe && currentIframe.contentWindow && currentIframe.contentWindow.vm) { 121 | currentIframe.contentWindow.vm.$emit(eventName , params); 122 | } 123 | } 124 | } 125 | }); 126 | }) 127 | })(); 128 | 129 | -------------------------------------------------------------------------------- /public/js/libs/vuedraggable.min.js: -------------------------------------------------------------------------------- 1 | "use strict";function _toConsumableArray(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);en-1?n:e[t]},getComponent:function(){return this.$slots["default"][0].componentInstance},resetTransitionData:function(t){if(this.noTransitionOnDrag&&this.transitionMode){var e=this.getChildrenNodes();e[t].data=null;var n=this.getComponent();n.children=[],n.kept=void 0}},onDragStart:function(t){this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),d=t.item},onDragAdd:function(t){var n=t.item._underlying_vm_;if(void 0!==n){e(t.item);var o=this.getVmIndex(t.newIndex);this.spliceList(o,0,n),this.computeIndexes();var i={element:n,newIndex:o};this.emitChanges({added:i})}},onDragRemove:function(t){if(n(this.rootContainer,t.item,t.oldIndex),this.isCloning)return void e(t.clone);var o=this.context.index;this.spliceList(o,1);var i={element:this.context.element,oldIndex:o};this.resetTransitionData(o),this.emitChanges({removed:i})},onDragUpdate:function(t){e(t.item),n(t.from,t.item,t.oldIndex);var o=this.context.index,i=this.getVmIndex(t.newIndex);this.updatePosition(o,i);var r={element:this.context.element,oldIndex:o,newIndex:i};this.emitChanges({moved:r})},computeFutureIndex:function(t,e){if(!t.element)return 0;var n=[].concat(_toConsumableArray(e.to.children)).filter(function(t){return"none"!==t.style.display}),o=n.indexOf(e.related),i=t.component.getVmIndex(o),r=n.indexOf(d)!=-1;return r||!e.willInsertAfter?i:i+1},onDragMove:function(t,e){var n=this.move;if(!n||!this.realList)return!0;var o=this.getRelatedContextFromMoveEvent(t),i=this.context,r=this.computeFutureIndex(o,t);return _extends(i,{futureIndex:r}),_extends(t,{relatedContext:o,draggedContext:i}),n(t,e)},onDragEnd:function(t){this.computeIndexes(),d=null}}};return f}if(Array.from||(Array.from=function(t){return[].slice.call(t)}),(typeof exports == "object")){var e=require("sortablejs");module.exports=t(e)}else if("function"==typeof define&&define.amd)define(["sortablejs"],function(e){return t(e)});else if(window&&window.Vue&&window.Sortable){var n=t(window.Sortable);Vue.component("draggable",n)}}(); -------------------------------------------------------------------------------- /public/pages/charts/index.js: -------------------------------------------------------------------------------- 1 | ;(function() { 2 | "use strict"; 3 | 4 | require.config({ 5 | baseUrl:"../../js/", 6 | paths:{ 7 | vue:"libs/vue", 8 | echarts:"libs/echarts", 9 | ELEMENT:"libs/elm-2.1.0" 10 | } 11 | }); 12 | 13 | require(["vue" , "ELEMENT" , "echarts"] , function (Vue , ELEMENT , echarts) { 14 | ELEMENT.install(Vue); 15 | window.vm = new Vue({ 16 | el:"#app", 17 | data:{ 18 | 19 | }, 20 | created:function () { 21 | this.$on("onglobalsearch" , result => { 22 | this.$message("当前页面监听到全局搜索事件:"+result.value); 23 | }); 24 | }, 25 | mounted:function () { 26 | const els = document.querySelectorAll(".chart-box"); 27 | this.initLineChart(els[0]); 28 | this.initBarChart(els[1]); 29 | }, 30 | methods:{ 31 | initLineChart:function (el) { 32 | const myChart = echarts.init(el); 33 | let options = { 34 | title: { 35 | text: '一周温度变化情况' 36 | }, 37 | tooltip: { 38 | trigger: 'axis' 39 | }, 40 | legend:{ 41 | data:["max","min"] 42 | }, 43 | xAxis:{ 44 | type: 'category', 45 | boundaryGap: false, 46 | data: ['Mon','Tue','Wed','Thu','Fri','Sat','Sun'] 47 | }, 48 | yAxis: { 49 | type: 'value' 50 | }, 51 | series:[ 52 | { 53 | name:"max", 54 | type:'line', 55 | smooth: true, 56 | data:[25, 16, 17, 27, 30, 16, 32] 57 | }, 58 | { 59 | name:"min", 60 | type:'line', 61 | smooth: true, 62 | data:[9, 5, 10 , 12, 18, 2, 20] 63 | } 64 | ] 65 | } 66 | myChart.setOption(options); 67 | }, 68 | initBarChart:function (el) { 69 | const myChart = echarts.init(el); 70 | let options = { 71 | title: { 72 | text: '一周各营销渠道访问量' 73 | }, 74 | tooltip : { 75 | trigger: 'axis', 76 | axisPointer : { // 坐标轴指示器,坐标轴触发有效 77 | type : 'shadow' // 默认为直线,可选为:'line' | 'shadow' 78 | } 79 | }, 80 | legend: { 81 | data: ['直接访问', '邮件营销','联盟广告','视频广告','搜索引擎'] 82 | }, 83 | grid: { 84 | left: '3%', 85 | right: '4%', 86 | bottom: '3%', 87 | containLabel: true 88 | }, 89 | xAxis: { 90 | type: 'category', 91 | data: ['Mon','Tue','Wed','Thu','Fri','Sat','Sun'] 92 | }, 93 | yAxis: { 94 | type: 'value' 95 | }, 96 | series: [ 97 | { 98 | name: '直接访问', 99 | type: 'bar', 100 | stack: '总量', 101 | label: { 102 | normal: { 103 | show: true, 104 | position: 'insideRight' 105 | } 106 | }, 107 | data: [320, 302, 301, 334, 390, 330, 320] 108 | }, 109 | { 110 | name: '邮件营销', 111 | type: 'bar', 112 | stack: '总量', 113 | label: { 114 | normal: { 115 | show: true, 116 | position: 'insideRight' 117 | } 118 | }, 119 | data: [120, 132, 101, 134, 90, 230, 210] 120 | }, 121 | { 122 | name: '联盟广告', 123 | type: 'bar', 124 | stack: '总量', 125 | label: { 126 | normal: { 127 | show: true, 128 | position: 'insideRight' 129 | } 130 | }, 131 | data: [220, 182, 191, 234, 290, 330, 310] 132 | }, 133 | { 134 | name: '视频广告', 135 | type: 'bar', 136 | stack: '总量', 137 | label: { 138 | normal: { 139 | show: true, 140 | position: 'insideRight' 141 | } 142 | }, 143 | data: [150, 212, 201, 154, 190, 330, 410] 144 | }, 145 | { 146 | name: '搜索引擎', 147 | type: 'bar', 148 | stack: '总量', 149 | label: { 150 | normal: { 151 | show: true, 152 | position: 'insideRight' 153 | } 154 | }, 155 | data: [820, 832, 901, 934, 1290, 1330, 1320] 156 | } 157 | ] 158 | }; 159 | myChart.setOption(options); 160 | } 161 | } 162 | }) 163 | }); 164 | })(); -------------------------------------------------------------------------------- /public/js/libs/sortable.min.js: -------------------------------------------------------------------------------- 1 | /*! Sortable 1.7.0 - MIT | git://github.com/rubaxa/Sortable.git */ 2 | !function(a){"use strict";"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=a():window.Sortable=a()}(function(){"use strict";function a(b,c){if(!b||!b.nodeType||1!==b.nodeType)throw"Sortable: `el` must be HTMLElement, and not "+{}.toString.call(b);this.el=b,this.options=c=t({},c),b[V]=this;var d={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(b.nodeName)?"li":">*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,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,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:a.supportPointer!==!1};for(var e in d)!(e in c)&&(c[e]=d[e]);ka(c);for(var g in this)"_"===g.charAt(0)&&"function"==typeof this[g]&&(this[g]=this[g].bind(this));this.nativeDraggable=!c.forceFallback&&ca,f(b,"mousedown",this._onTapStart),f(b,"touchstart",this._onTapStart),c.supportPointer&&f(b,"pointerdown",this._onTapStart),this.nativeDraggable&&(f(b,"dragover",this),f(b,"dragenter",this)),ia.push(this._onDragOver),c.store&&this.sort(c.store.get(this))}function b(a,b){"clone"!==a.lastPullMode&&(b=!0),B&&B.state!==b&&(i(B,"display",b?"none":""),b||B.state&&(a.options.group.revertClone?(C.insertBefore(B,D),a._animate(y,B)):C.insertBefore(B,y)),B.state=b)}function c(a,b,c){if(a){c=c||X;do if(">*"===b&&a.parentNode===c||r(a,b))return a;while(a=d(a))}return null}function d(a){var b=a.host;return b&&b.nodeType?b:a.parentNode}function e(a){a.dataTransfer&&(a.dataTransfer.dropEffect="move"),a.preventDefault()}function f(a,b,c){a.addEventListener(b,c,aa)}function g(a,b,c){a.removeEventListener(b,c,aa)}function h(a,b,c){if(a)if(a.classList)a.classList[c?"add":"remove"](b);else{var d=(" "+a.className+" ").replace(T," ").replace(" "+b+" "," ");a.className=(d+(c?" "+b:"")).replace(T," ")}}function i(a,b,c){var d=a&&a.style;if(d){if(void 0===c)return X.defaultView&&X.defaultView.getComputedStyle?c=X.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 j(a,b,c){if(a){var d=a.getElementsByTagName(b),e=0,f=d.length;if(c)for(;e5||b.clientX-(d.left+d.width)>5}function p(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 q(a,b){var c=0;if(!a||!a.parentNode)return-1;for(;a&&(a=a.previousElementSibling);)"TEMPLATE"===a.nodeName.toUpperCase()||">*"!==b&&!r(a,b)||c++;return c}function r(a,b){if(a){b=b.split(".");var c=b.shift().toUpperCase(),d=new RegExp("\\s("+b.join("|")+")(?=\\s)","g");return!(""!==c&&a.nodeName.toUpperCase()!=c||b.length&&((" "+a.className+" ").match(d)||[]).length!=b.length)}return!1}function s(a,b){var c,d;return function(){void 0===c&&(c=arguments,d=this,Z(function(){1===c.length?a.call(d,c[0]):a.apply(d,c),c=void 0},b))}}function t(a,b){if(a&&b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function u(a){return _&&_.dom?_.dom(a).cloneNode(!0):$?$(a).clone(!0)[0]:a.cloneNode(!0)}function v(a){for(var b=a.getElementsByTagName("input"),c=b.length;c--;){var d=b[c];d.checked&&ha.push(d)}}function w(a){return Z(a,0)}function x(a){return clearTimeout(a)}if("undefined"==typeof window||!window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S={},T=/\s+/g,U=/left|right|inline/,V="Sortable"+(new Date).getTime(),W=window,X=W.document,Y=W.parseInt,Z=W.setTimeout,$=W.jQuery||W.Zepto,_=W.Polymer,aa=!1,ba=!1,ca="draggable"in X.createElement("div"),da=function(a){return!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\.|msie)/i)&&(a=X.createElement("x"),a.style.cssText="pointer-events:auto","auto"===a.style.pointerEvents)}(),ea=!1,fa=Math.abs,ga=Math.min,ha=[],ia=[],ja=s(function(a,b,c){if(c&&b.scroll){var d,e,f,g,h,i,j=c[V],k=b.scrollSensitivity,l=b.scrollSpeed,m=a.clientX,n=a.clientY,o=window.innerWidth,p=window.innerHeight;if(G!==c&&(F=b.scroll,G=c,H=b.scrollFn,F===!0)){F=c;do if(F.offsetWidth-1:e==a)}}var c={},d=a.group;d&&"object"==typeof d||(d={name:d}),c.name=d.name,c.checkPull=b(d.pull,!0),c.checkPut=b(d.put),c.revertClone=d.revertClone,a.group=c};try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){ba=!1,aa={capture:!1,passive:ba}}}))}catch(a){}return a.prototype={constructor:a,_onTapStart:function(a){var b,d=this,e=this.el,f=this.options,g=f.preventOnFilter,h=a.type,i=a.touches&&a.touches[0],j=(i||a).target,l=a.target.shadowRoot&&a.path&&a.path[0]||j,m=f.filter;if(v(e),!y&&!(/mousedown|pointerdown/.test(h)&&0!==a.button||f.disabled)&&!l.isContentEditable&&(j=c(j,f.draggable,e),j&&E!==j)){if(b=q(j,f.draggable),"function"==typeof m){if(m.call(this,a,j,this))return k(d,l,"filter",j,e,e,b),void(g&&a.preventDefault())}else if(m&&(m=m.split(",").some(function(a){if(a=c(l,a.trim(),e))return k(d,a,"filter",j,e,e,b),!0})))return void(g&&a.preventDefault());f.handle&&!c(l,f.handle,e)||this._prepareDragStart(a,i,j,b)}},_prepareDragStart:function(a,b,c,d){var e,g=this,i=g.el,l=g.options,n=i.ownerDocument;c&&!y&&c.parentNode===i&&(P=a,C=i,y=c,z=y.parentNode,D=y.nextSibling,E=c,N=l.group,L=d,this._lastX=(b||a).clientX,this._lastY=(b||a).clientY,y.style["will-change"]="all",e=function(){g._disableDelayedDrag(),y.draggable=g.nativeDraggable,h(y,l.chosenClass,!0),g._triggerDragStart(a,b),k(g,C,"choose",y,C,C,L)},l.ignore.split(",").forEach(function(a){j(y,a.trim(),m)}),f(n,"mouseup",g._onDrop),f(n,"touchend",g._onDrop),f(n,"touchcancel",g._onDrop),f(n,"selectstart",g),l.supportPointer&&f(n,"pointercancel",g._onDrop),l.delay?(f(n,"mouseup",g._disableDelayedDrag),f(n,"touchend",g._disableDelayedDrag),f(n,"touchcancel",g._disableDelayedDrag),f(n,"mousemove",g._disableDelayedDrag),f(n,"touchmove",g._disableDelayedDrag),l.supportPointer&&f(n,"pointermove",g._disableDelayedDrag),g._dragStartTimer=Z(e,l.delay)):e())},_disableDelayedDrag:function(){var a=this.el.ownerDocument;clearTimeout(this._dragStartTimer),g(a,"mouseup",this._disableDelayedDrag),g(a,"touchend",this._disableDelayedDrag),g(a,"touchcancel",this._disableDelayedDrag),g(a,"mousemove",this._disableDelayedDrag),g(a,"touchmove",this._disableDelayedDrag),g(a,"pointermove",this._disableDelayedDrag)},_triggerDragStart:function(a,b){b=b||("touch"==a.pointerType?a:null),b?(P={target:y,clientX:b.clientX,clientY:b.clientY},this._onDragStart(P,"touch")):this.nativeDraggable?(f(y,"dragend",this),f(C,"dragstart",this._onDragStart)):this._onDragStart(P,!0);try{X.selection?w(function(){X.selection.empty()}):window.getSelection().removeAllRanges()}catch(a){}},_dragStarted:function(){if(C&&y){var b=this.options;h(y,b.ghostClass,!0),h(y,b.dragClass,!1),a.active=this,k(this,C,"start",y,C,C,L)}else this._nulling()},_emulateDragOver:function(){if(Q){if(this._lastX===Q.clientX&&this._lastY===Q.clientY)return;this._lastX=Q.clientX,this._lastY=Q.clientY,da||i(A,"display","none");var a=X.elementFromPoint(Q.clientX,Q.clientY),b=a,c=ia.length;if(a&&a.shadowRoot&&(a=a.shadowRoot.elementFromPoint(Q.clientX,Q.clientY),b=a),b)do{if(b[V]){for(;c--;)ia[c]({clientX:Q.clientX,clientY:Q.clientY,target:a,rootEl:b});break}a=b}while(b=b.parentNode);da||i(A,"display","")}},_onTouchMove:function(b){if(P){var c=this.options,d=c.fallbackTolerance,e=c.fallbackOffset,f=b.touches?b.touches[0]:b,g=f.clientX-P.clientX+e.x,h=f.clientY-P.clientY+e.y,j=b.touches?"translate3d("+g+"px,"+h+"px,0)":"translate("+g+"px,"+h+"px)";if(!a.active){if(d&&ga(fa(f.clientX-this._lastX),fa(f.clientY-this._lastY))y.offsetWidth,x=e.offsetHeight>y.offsetHeight,E=(v?(d.clientX-g.left)/t:(d.clientY-g.top)/u)>.5,F=e.nextElementSibling,G=!1;if(v){var H=y.offsetTop,L=e.offsetTop;G=H===L?e.previousElementSibling===y&&!w||E&&w:e.previousElementSibling===y||y.previousElementSibling===e?(d.clientY-g.top)/u>.5:L>H}else r||(G=F!==y&&!x||E&&x);var M=l(C,j,y,f,e,g,d,G);M!==!1&&(1!==M&&M!==-1||(G=1===M),ea=!0,Z(n,30),b(p,q),y.contains(j)||(G&&!F?j.appendChild(y):e.parentNode.insertBefore(y,G?F:e)),z=y.parentNode,this._animate(f,y),this._animate(g,e))}}},_animate:function(a,b){var c=this.options.animation;if(c){var d=b.getBoundingClientRect();1===a.nodeType&&(a=a.getBoundingClientRect()),i(b,"transition","none"),i(b,"transform","translate3d("+(a.left-d.left)+"px,"+(a.top-d.top)+"px,0)"),b.offsetWidth,i(b,"transition","all "+c+"ms"),i(b,"transform","translate3d(0,0,0)"),clearTimeout(b.animated),b.animated=Z(function(){i(b,"transition",""),i(b,"transform",""),b.animated=!1},c)}},_offUpEvents:function(){var a=this.el.ownerDocument;g(X,"touchmove",this._onTouchMove),g(X,"pointermove",this._onTouchMove),g(a,"mouseup",this._onDrop),g(a,"touchend",this._onDrop),g(a,"pointerup",this._onDrop),g(a,"touchcancel",this._onDrop),g(a,"pointercancel",this._onDrop),g(a,"selectstart",this)},_onDrop:function(b){var c=this.el,d=this.options;clearInterval(this._loopId),clearInterval(S.pid),clearTimeout(this._dragStartTimer),x(this._cloneId),x(this._dragStartId),g(X,"mouseover",this),g(X,"mousemove",this._onTouchMove),this.nativeDraggable&&(g(X,"drop",this),g(c,"dragstart",this._onDragStart)),this._offUpEvents(),b&&(R&&(b.preventDefault(),!d.dropBubble&&b.stopPropagation()),A&&A.parentNode&&A.parentNode.removeChild(A),C!==z&&"clone"===a.active.lastPullMode||B&&B.parentNode&&B.parentNode.removeChild(B),y&&(this.nativeDraggable&&g(y,"dragend",this),m(y),y.style["will-change"]="",h(y,this.options.ghostClass,!1),h(y,this.options.chosenClass,!1),k(this,C,"unchoose",y,z,C,L),C!==z?(M=q(y,d.draggable),M>=0&&(k(null,z,"add",y,z,C,L,M),k(this,C,"remove",y,z,C,L,M),k(null,z,"sort",y,z,C,L,M),k(this,C,"sort",y,z,C,L,M))):y.nextSibling!==D&&(M=q(y,d.draggable),M>=0&&(k(this,C,"update",y,z,C,L,M),k(this,C,"sort",y,z,C,L,M))),a.active&&(null!=M&&M!==-1||(M=L),k(this,C,"end",y,z,C,L,M),this.save()))),this._nulling()},_nulling:function(){C=y=z=A=D=B=E=F=G=P=Q=R=M=I=J=O=N=a.active=null,ha.forEach(function(a){a.checked=!0}),ha.length=0},handleEvent:function(a){switch(a.type){case"drop":case"dragend":this._onDrop(a);break;case"dragover":case"dragenter":y&&(this._onDragOver(a),e(a));break;case"mouseover":this._onDrop(a);break;case"selectstart":a.preventDefault()}},toArray:function(){for(var a,b=[],d=this.el.children,e=0,f=d.length,g=this.options;e-1&&(!e[i]||!t(e[i],i,e));i-=1);}}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(e,t,i,r){return t&&eachProp(t,function(t,n){!i&&hasProp(e,n)||(!r||"object"!=typeof t||!t||isArray(t)||isFunction(t)||t instanceof RegExp?e[n]=t:(e[n]||(e[n]={}),mixin(e[n],t,i,r)))}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeError(e,t,i,r){var n=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return n.requireType=e,n.requireModules=r,i&&(n.originalError=i),n}function newContext(e){function t(e){var t,i;for(t=0;t0&&(e.splice(t-1,2),t-=2)}}function i(e,i,r){var n,o,a,s,u,c,d,p,f,l,h=i&&i.split("/"),m=y.map,g=m&&m["*"];if(e&&(c=(e=e.split("/")).length-1,y.nodeIdCompat&&jsSuffixRegExp.test(e[c])&&(e[c]=e[c].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),t(e),e=e.join("/")),r&&m&&(h||g)){e:for(a=(o=e.split("/")).length;a>0;a-=1){if(u=o.slice(0,a).join("/"),h)for(s=h.length;s>0;s-=1)if((n=getOwn(m,h.slice(0,s).join("/")))&&(n=getOwn(n,u))){d=n,p=a;break e}!f&&g&&getOwn(g,u)&&(f=getOwn(g,u),l=a)}!d&&f&&(d=f,p=l),d&&(o.splice(0,p,d),e=o.join("/"))}return getOwn(y.pkgs,e)||e}function r(e){isBrowser&&each(scripts(),function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===q.contextName)return t.parentNode.removeChild(t),!0})}function n(e){var t=getOwn(y.paths,e);if(t&&isArray(t)&&t.length>1)return t.shift(),q.require.undef(e),q.makeRequire(null,{skipMap:!0})([e]),!0}function o(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function a(e,t,r,n){var a,s,u,c,d=null,p=t?t.name:null,f=e,l=!0,h="";return e||(l=!1,e="_@r"+(T+=1)),c=o(e),d=c[0],e=c[1],d&&(d=i(d,p,n),s=getOwn(j,d)),e&&(d?h=r?e:s&&s.normalize?s.normalize(e,function(e){return i(e,p,n)}):-1===e.indexOf("!")?i(e,p,n):e:(d=(c=o(h=i(e,p,n)))[0],h=c[1],r=!0,a=q.nameToUrl(h))),u=!d||s||r?"":"_unnormalized"+(A+=1),{prefix:d,name:h,parentMap:t,unnormalized:!!u,url:a,originalName:f,isDefine:l,id:(d?d+"!"+h:h)+u}}function s(e){var t=e.id,i=getOwn(S,t);return i||(i=S[t]=new q.Module(e)),i}function u(e,t,i){var r=e.id,n=getOwn(S,r);!hasProp(j,r)||n&&!n.defineEmitComplete?(n=s(e)).error&&"error"===t?i(n.error):n.on(t,i):"defined"===t&&i(j[r])}function c(e,t){var i=e.requireModules,r=!1;t?t(e):(each(i,function(t){var i=getOwn(S,t);i&&(i.error=e,i.events.error&&(r=!0,i.emit("error",e)))}),r||req.onError(e))}function d(){globalDefQueue.length&&(each(globalDefQueue,function(e){var t=e[0];"string"==typeof t&&(q.defQueueMap[t]=!0),O.push(e)}),globalDefQueue=[])}function p(e){delete S[e],delete k[e]}function f(e,t,i){var r=e.map.id;e.error?e.emit("error",e.error):(t[r]=!0,each(e.depMaps,function(r,n){var o=r.id,a=getOwn(S,o);!a||e.depMatched[n]||i[o]||(getOwn(t,o)?(e.defineDep(n,j[o]),e.check()):f(a,t,i))}),i[r]=!0)}function l(){var e,t,i=1e3*y.waitSeconds,o=i&&q.startTime+i<(new Date).getTime(),a=[],s=[],u=!1,d=!0;if(!x){if(x=!0,eachProp(k,function(e){var i=e.map,c=i.id;if(e.enabled&&(i.isDefine||s.push(e),!e.error))if(!e.inited&&o)n(c)?(t=!0,u=!0):(a.push(c),r(c));else if(!e.inited&&e.fetched&&i.isDefine&&(u=!0,!i.prefix))return d=!1}),o&&a.length)return e=makeError("timeout","Load timeout for modules: "+a,null,a),e.contextName=q.contextName,c(e);d&&each(s,function(e){f(e,{},{})}),o&&!t||!u||!isBrowser&&!isWebWorker||w||(w=setTimeout(function(){w=0,l()},50)),x=!1}}function h(e){hasProp(j,e[0])||s(a(e[0],null,!0)).init(e[1],e[2])}function m(e,t,i,r){e.detachEvent&&!isOpera?r&&e.detachEvent(r,t):e.removeEventListener(i,t,!1)}function g(e){var t=e.currentTarget||e.srcElement;return m(t,q.onScriptLoad,"load","onreadystatechange"),m(t,q.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function v(){var e;for(d();O.length;){if(null===(e=O.shift())[0])return c(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));h(e)}q.defQueueMap={}}var x,b,q,E,w,y={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},S={},k={},M={},O=[],j={},P={},R={},T=1,A=1;return E={require:function(e){return e.require?e.require:e.require=q.makeRequire(e.map)},exports:function(e){if(e.usingExports=!0,e.map.isDefine)return e.exports?j[e.map.id]=e.exports:e.exports=j[e.map.id]={}},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(y.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},b=function(e){this.events=getOwn(M,e.id)||{},this.map=e,this.shim=getOwn(y.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},b.prototype={init:function(e,t,i,r){r=r||{},this.inited||(this.factory=t,i?this.on("error",i):this.events.error&&(i=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=i,this.inited=!0,this.ignore=r.ignore,r.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,q.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();q.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()}))}},load:function(){var e=this.map.url;P[e]||(P[e]=!0,q.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,i=this.map.id,r=this.depExports,n=this.exports,o=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(o)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{n=q.execCb(i,o,r,n)}catch(t){e=t}else n=q.execCb(i,o,r,n);if(this.map.isDefine&&void 0===n&&((t=this.module)?n=t.exports:this.usingExports&&(n=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",c(this.error=e)}else n=o;if(this.exports=n,this.map.isDefine&&!this.ignore&&(j[i]=n,req.onResourceLoad)){var a=[];each(this.depMaps,function(e){a.push(e.normalizedMap||e)}),req.onResourceLoad(q,this.map,a)}p(i),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(q.defQueueMap,i)||this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,r=a(e.prefix);this.depMaps.push(r),u(r,"defined",bind(this,function(r){var n,o,d,f=getOwn(R,this.map.id),l=this.map.name,h=this.map.parentMap?this.map.parentMap.name:null,m=q.makeRequire(e.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(r.normalize&&(l=r.normalize(l,function(e){return i(e,h,!0)})||""),o=a(e.prefix+"!"+l,this.map.parentMap,!0),u(o,"defined",bind(this,function(e){this.map.normalizedMap=o,this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),void((d=getOwn(S,o.id))&&(this.depMaps.push(o),this.events.error&&d.on("error",bind(this,function(e){this.emit("error",e)})),d.enable()))):f?(this.map.url=q.nameToUrl(f),void this.load()):((n=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})})).error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(S,function(e){0===e.map.id.indexOf(t+"_unnormalized")&&p(e.map.id)}),c(e)}),n.fromText=bind(this,function(i,r){var o=e.name,u=a(o),d=useInteractive;r&&(i=r),d&&(useInteractive=!1),s(u),hasProp(y.config,t)&&(y.config[o]=y.config[t]);try{req.exec(i)}catch(e){return c(makeError("fromtexteval","fromText eval for "+t+" failed: "+e,e,[t]))}d&&(useInteractive=!0),this.depMaps.push(u),q.completeLoad(o),m([o],n)}),void r.load(e.name,m,n,y))})),q.enable(r,this),this.pluginMaps[r.id]=r},enable:function(){k[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var i,r,n;if("string"==typeof e){if(e=a(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,n=getOwn(E,e.id))return void(this.depExports[t]=n(this));this.depCount+=1,u(e,"defined",bind(this,function(e){this.undefed||(this.defineDep(t,e),this.check())})),this.errback?u(e,"error",bind(this,this.errback)):this.events.error&&u(e,"error",bind(this,function(e){this.emit("error",e)}))}i=e.id,r=S[i],hasProp(E,i)||!r||r.enabled||q.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(S,e.id);t&&!t.enabled&&q.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var i=this.events[e];i||(i=this.events[e]=[]),i.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},q={config:y,contextName:e,registry:S,defined:j,urlFetched:P,defQueue:O,defQueueMap:{},Module:b,makeModuleMap:a,nextTick:req.nextTick,onError:c,configure:function(e){if(e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/"),"string"==typeof e.urlArgs){var t=e.urlArgs;e.urlArgs=function(e,i){return(-1===i.indexOf("?")?"?":"&")+t}}var i=y.shim,r={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){r[t]?(y[t]||(y[t]={}),mixin(y[t],e,!0,!0)):y[t]=e}),e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&(R[e]=t)})}),e.shim&&(eachProp(e.shim,function(e,t){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=q.makeShimExports(e)),i[t]=e}),y.shim=i),e.packages&&each(e.packages,function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(y.paths[t]=e.location),y.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(S,function(e,t){e.inited||e.map.unnormalized||(e.map=a(t,null,!0))}),(e.deps||e.callback)&&q.require(e.deps||[],e.callback)},makeShimExports:function(e){return function(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}},makeRequire:function(t,n){function o(i,r,u){var d,p,f;return n.enableBuildCallback&&r&&isFunction(r)&&(r.__requireJsBuild=!0),"string"==typeof i?isFunction(r)?c(makeError("requireargs","Invalid require call"),u):t&&hasProp(E,i)?E[i](S[t.id]):req.get?req.get(q,i,t,o):(p=a(i,t,!1,!0),d=p.id,hasProp(j,d)?j[d]:c(makeError("notloaded",'Module name "'+d+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(v(),q.nextTick(function(){v(),(f=s(a(null,t))).skipMap=n.skipMap,f.init(i,r,u,{enabled:!0}),l()}),o)}return n=n||{},mixin(o,{isBrowser:isBrowser,toUrl:function(e){var r,n=e.lastIndexOf("."),o=e.split("/")[0],a="."===o||".."===o;return-1!==n&&(!a||n>1)&&(r=e.substring(n,e.length),e=e.substring(0,n)),q.nameToUrl(i(e,t&&t.id,!0),r,!0)},defined:function(e){return hasProp(j,a(e,t,!1,!0).id)},specified:function(e){return e=a(e,t,!1,!0).id,hasProp(j,e)||hasProp(S,e)}}),t||(o.undef=function(e){d();var i=a(e,t,!0),n=getOwn(S,e);n.undefed=!0,r(e),delete j[e],delete P[i.url],delete M[e],eachReverse(O,function(t,i){t[0]===e&&O.splice(i,1)}),delete q.defQueueMap[e],n&&(n.events.defined&&(M[e]=n.events),p(e))}),o},enable:function(e){getOwn(S,e.id)&&s(e).enable()},completeLoad:function(e){var t,i,r,o=getOwn(y.shim,e)||{},a=o.exports;for(d();O.length;){if(null===(i=O.shift())[0]){if(i[0]=e,t)break;t=!0}else i[0]===e&&(t=!0);h(i)}if(q.defQueueMap={},r=getOwn(S,e),!t&&!hasProp(j,e)&&r&&!r.inited){if(!(!y.enforceDefine||a&&getGlobal(a)))return n(e)?void 0:c(makeError("nodefine","No define call for "+e,null,[e]));h([e,o.deps||[],o.exportsFn])}l()},nameToUrl:function(e,t,i){var r,n,o,a,s,u,c,d=getOwn(y.pkgs,e);if(d&&(e=d),c=getOwn(R,e))return q.nameToUrl(c,t,i);if(req.jsExtRegExp.test(e))s=e+(t||"");else{for(r=y.paths,o=(n=e.split("/")).length;o>0;o-=1)if(a=n.slice(0,o).join("/"),u=getOwn(r,a)){isArray(u)&&(u=u[0]),n.splice(0,o,u);break}s=n.join("/"),s=("/"===(s+=t||(/^data\:|^blob\:|\?/.test(s)||i?"":".js")).charAt(0)||s.match(/^[\w\+\.\-]+:/)?"":y.baseUrl)+s}return y.urlArgs&&!/^blob\:/.test(s)?s+y.urlArgs(e,s):s},load:function(e,t){req.load(q,e,t)},execCb:function(e,t,i,r){return t.apply(r,i)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=g(e);q.completeLoad(t.id)}},onScriptError:function(e){var t=g(e);if(!n(t.id)){var i=[];return eachProp(S,function(e,r){0!==r.indexOf("_@r")&&each(e.depMaps,function(e){if(e.id===t.id)return i.push(r),!0})}),c(makeError("scripterror",'Script error for "'+t.id+(i.length?'", needed by: '+i.join(", "):'"'),e,[t.id]))}}},q.require=q.makeRequire(),q}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState?interactiveScript:(eachReverse(scripts(),function(e){if("interactive"===e.readyState)return interactiveScript=e}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.3.5",commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;if(void 0===define){if(void 0!==requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}void 0===require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,i,r){var n,o,a=defContextName;return isArray(e)||"string"==typeof e||(o=e,isArray(t)?(e=t,t=i,i=r):e=[]),o&&o.context&&(a=o.context),(n=getOwn(contexts,a))||(n=contexts[a]=req.s.newContext(a)),o&&n.configure(o),n.require(e,t,i)},req.config=function(e){return req(e)},req.nextTick=void 0!==setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],(baseElement=document.getElementsByTagName("base")[0])&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,i){var r=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return r.type=e.scriptType||"text/javascript",r.charset="utf-8",r.async=!0,r},req.load=function(e,t,i){var r,n=e&&e.config||{};if(isBrowser)return(r=req.createNode(n,t,i)).setAttribute("data-requirecontext",e.contextName),r.setAttribute("data-requiremodule",t),!r.attachEvent||r.attachEvent.toString&&r.attachEvent.toString().indexOf("[native code")<0||isOpera?(r.addEventListener("load",e.onScriptLoad,!1),r.addEventListener("error",e.onScriptError,!1)):(useInteractive=!0,r.attachEvent("onreadystatechange",e.onScriptLoad)),r.src=i,n.onNodeCreated&&n.onNodeCreated(r,n,t,i),currentlyAddingScript=r,baseElement?head.insertBefore(r,baseElement):head.appendChild(r),currentlyAddingScript=null,r;if(isWebWorker)try{setTimeout(function(){},0),importScripts(i),e.completeLoad(t)}catch(r){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+i,r,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){if(head||(head=e.parentNode),dataMain=e.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||-1!==mainScript.indexOf("!")||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(e,t,i){var r,n;"string"!=typeof e&&(i=t,t=e,e=null),isArray(t)||(i=t,t=null),!t&&isFunction(i)&&(t=[],i.length&&(i.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(e,i){t.push(i)}),t=(1===i.length?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(r=currentlyAddingScript||getInteractiveScript())&&(e||(e=r.getAttribute("data-requiremodule")),n=contexts[r.getAttribute("data-requirecontext")]),n?(n.defQueue.push([e,t,i]),n.defQueueMap[e]=!0):globalDefQueue.push([e,t,i])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}}(this,"undefined"==typeof setTimeout?void 0:setTimeout); -------------------------------------------------------------------------------- /public/js/libs/crypto-js.min.js: -------------------------------------------------------------------------------- 1 | !function(t,e){"object"==typeof exports?module.exports=exports=e():"function"==typeof define&&define.amd?define([],e):t.CryptoJS=e()}(this,function(){var l,r,t,e,i,f,n,o,s,a,c,h,u,d,p,_,v,y,g,B,w,k,S,m,x,b,H,z,A,C,D,R,E,M,F,P,W,O,U,I,K,X,L,j,N,T,Z,q,G,J,$,Q,V,Y,tt,et,rt,it,nt,ot,st,at,ct,ht,lt,ft,ut,dt,pt,_t,vt,yt,gt,Bt,wt,kt,St,mt,xt,bt,Ht,zt,At=At||(l=Math,r=Object.create||function(){function r(){}return function(t){var e;return r.prototype=t,e=new r,r.prototype=null,e}}(),e=(t={}).lib={},i=e.Base={extend:function(t){var e=r(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),(e.init.prototype=e).$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},f=e.WordArray=i.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||o).stringify(this)},concat:function(t){var e=this.words,r=t.words,i=this.sigBytes,n=t.sigBytes;if(this.clamp(),i%4)for(var o=0;o>>2]>>>24-o%4*8&255;e[i+o>>>2]|=s<<24-(i+o)%4*8}else for(o=0;o>>2]=r[o>>>2];return this.sigBytes+=n,this},clamp:function(){var t=this.words,e=this.sigBytes;t[e>>>2]&=4294967295<<32-e%4*8,t.length=l.ceil(e/4)},clone:function(){var t=i.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e,r=[],i=function(e){e=e;var r=987654321,i=4294967295;return function(){var t=((r=36969*(65535&r)+(r>>16)&i)<<16)+(e=18e3*(65535&e)+(e>>16)&i)&i;return t/=4294967296,(t+=.5)*(.5>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new f.init(r,e/2)}},s=n.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new f.init(r,e)}},a=n.Utf8={stringify:function(t){try{return decodeURIComponent(escape(s.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return s.parse(unescape(encodeURIComponent(t)))}},c=e.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=a.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(t){var e=this._data,r=e.words,i=e.sigBytes,n=this.blockSize,o=i/(4*n),s=(o=t?l.ceil(o):l.max((0|o)-this._minBufferSize,0))*n,a=l.min(4*s,i);if(s){for(var c=0;c>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a>>6*(3-a)&63));var c=i.charAt(64);if(c)for(;n.length%4;)n.push(c);return n.join("")},parse:function(t){var e=t.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var n=0;n>>6-o%4*2;i[n>>>2]|=(s|a)<<24-n%4*8,n++}return d.create(i,n)}(t,e,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(l){var t=At,e=t.lib,r=e.WordArray,i=e.Hasher,n=t.algo,H=[];!function(){for(var t=0;t<64;t++)H[t]=4294967296*l.abs(l.sin(t+1))|0}();var o=n.MD5=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o=this._hash.words,s=t[e+0],a=t[e+1],c=t[e+2],h=t[e+3],l=t[e+4],f=t[e+5],u=t[e+6],d=t[e+7],p=t[e+8],_=t[e+9],v=t[e+10],y=t[e+11],g=t[e+12],B=t[e+13],w=t[e+14],k=t[e+15],S=o[0],m=o[1],x=o[2],b=o[3];m=D(m=D(m=D(m=D(m=C(m=C(m=C(m=C(m=A(m=A(m=A(m=A(m=z(m=z(m=z(m=z(m,x=z(x,b=z(b,S=z(S,m,x,b,s,7,H[0]),m,x,a,12,H[1]),S,m,c,17,H[2]),b,S,h,22,H[3]),x=z(x,b=z(b,S=z(S,m,x,b,l,7,H[4]),m,x,f,12,H[5]),S,m,u,17,H[6]),b,S,d,22,H[7]),x=z(x,b=z(b,S=z(S,m,x,b,p,7,H[8]),m,x,_,12,H[9]),S,m,v,17,H[10]),b,S,y,22,H[11]),x=z(x,b=z(b,S=z(S,m,x,b,g,7,H[12]),m,x,B,12,H[13]),S,m,w,17,H[14]),b,S,k,22,H[15]),x=A(x,b=A(b,S=A(S,m,x,b,a,5,H[16]),m,x,u,9,H[17]),S,m,y,14,H[18]),b,S,s,20,H[19]),x=A(x,b=A(b,S=A(S,m,x,b,f,5,H[20]),m,x,v,9,H[21]),S,m,k,14,H[22]),b,S,l,20,H[23]),x=A(x,b=A(b,S=A(S,m,x,b,_,5,H[24]),m,x,w,9,H[25]),S,m,h,14,H[26]),b,S,p,20,H[27]),x=A(x,b=A(b,S=A(S,m,x,b,B,5,H[28]),m,x,c,9,H[29]),S,m,d,14,H[30]),b,S,g,20,H[31]),x=C(x,b=C(b,S=C(S,m,x,b,f,4,H[32]),m,x,p,11,H[33]),S,m,y,16,H[34]),b,S,w,23,H[35]),x=C(x,b=C(b,S=C(S,m,x,b,a,4,H[36]),m,x,l,11,H[37]),S,m,d,16,H[38]),b,S,v,23,H[39]),x=C(x,b=C(b,S=C(S,m,x,b,B,4,H[40]),m,x,s,11,H[41]),S,m,h,16,H[42]),b,S,u,23,H[43]),x=C(x,b=C(b,S=C(S,m,x,b,_,4,H[44]),m,x,g,11,H[45]),S,m,k,16,H[46]),b,S,c,23,H[47]),x=D(x,b=D(b,S=D(S,m,x,b,s,6,H[48]),m,x,d,10,H[49]),S,m,w,15,H[50]),b,S,f,21,H[51]),x=D(x,b=D(b,S=D(S,m,x,b,g,6,H[52]),m,x,h,10,H[53]),S,m,v,15,H[54]),b,S,a,21,H[55]),x=D(x,b=D(b,S=D(S,m,x,b,p,6,H[56]),m,x,k,10,H[57]),S,m,u,15,H[58]),b,S,B,21,H[59]),x=D(x,b=D(b,S=D(S,m,x,b,l,6,H[60]),m,x,y,10,H[61]),S,m,c,15,H[62]),b,S,_,21,H[63]),o[0]=o[0]+S|0,o[1]=o[1]+m|0,o[2]=o[2]+x|0,o[3]=o[3]+b|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32;var n=l.floor(r/4294967296),o=r;e[15+(i+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(e.length+1),this._process();for(var s=this._hash,a=s.words,c=0;c<4;c++){var h=a[c];a[c]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return s},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});function z(t,e,r,i,n,o,s){var a=t+(e&r|~e&i)+n+s;return(a<>>32-o)+e}function A(t,e,r,i,n,o,s){var a=t+(e&i|r&~i)+n+s;return(a<>>32-o)+e}function C(t,e,r,i,n,o,s){var a=t+(e^r^i)+n+s;return(a<>>32-o)+e}function D(t,e,r,i,n,o,s){var a=t+(r^(e|~i))+n+s;return(a<>>32-o)+e}t.MD5=i._createHelper(o),t.HmacMD5=i._createHmacHelper(o)}(Math),_=(p=At).lib,v=_.WordArray,y=_.Hasher,g=p.algo,B=[],w=g.SHA1=y.extend({_doReset:function(){this._hash=new v.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],a=r[4],c=0;c<80;c++){if(c<16)B[c]=0|t[e+c];else{var h=B[c-3]^B[c-8]^B[c-14]^B[c-16];B[c]=h<<1|h>>>31}var l=(i<<5|i>>>27)+a+B[c];l+=c<20?1518500249+(n&o|~n&s):c<40?1859775393+(n^o^s):c<60?(n&o|n&s|o&s)-1894007588:(n^o^s)-899497514,a=s,s=o,o=n<<30|n>>>2,n=i,i=l}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+a|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=Math.floor(r/4294967296),e[15+(i+64>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=y.clone.call(this);return t._hash=this._hash.clone(),t}}),p.SHA1=y._createHelper(w),p.HmacSHA1=y._createHmacHelper(w),function(n){var t=At,e=t.lib,r=e.WordArray,i=e.Hasher,o=t.algo,s=[],B=[];!function(){function t(t){for(var e=n.sqrt(t),r=2;r<=e;r++)if(!(t%r))return!1;return!0}function e(t){return 4294967296*(t-(0|t))|0}for(var r=2,i=0;i<64;)t(r)&&(i<8&&(s[i]=e(n.pow(r,.5))),B[i]=e(n.pow(r,1/3)),i++),r++}();var w=[],a=o.SHA256=i.extend({_doReset:function(){this._hash=new r.init(s.slice(0))},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],a=r[4],c=r[5],h=r[6],l=r[7],f=0;f<64;f++){if(f<16)w[f]=0|t[e+f];else{var u=w[f-15],d=(u<<25|u>>>7)^(u<<14|u>>>18)^u>>>3,p=w[f-2],_=(p<<15|p>>>17)^(p<<13|p>>>19)^p>>>10;w[f]=d+w[f-7]+_+w[f-16]}var v=i&n^i&o^n&o,y=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),g=l+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&c^~a&h)+B[f]+w[f];l=h,h=c,c=a,a=s+g|0,s=o,o=n,n=i,i=g+(y+v)|0}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+a|0,r[5]=r[5]+c|0,r[6]=r[6]+h|0,r[7]=r[7]+l|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=n.floor(r/4294967296),e[15+(i+64>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});t.SHA256=i._createHelper(a),t.HmacSHA256=i._createHmacHelper(a)}(Math),function(){var t=At,n=t.lib.WordArray,e=t.enc;e.Utf16=e.Utf16BE={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n>>2]>>>16-n%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i>>1]|=t.charCodeAt(i)<<16-i%2*16;return n.create(r,2*e)}};function s(t){return t<<8&4278255360|t>>>8&16711935}e.Utf16LE={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n>>2]>>>16-n%4*8&65535);i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var e=t.length,r=[],i=0;i>>1]|=s(t.charCodeAt(i)<<16-i%2*16);return n.create(r,2*e)}}}(),function(){if("function"==typeof ArrayBuffer){var t=At.lib.WordArray,n=t.init;(t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var e=t.byteLength,r=[],i=0;i>>2]|=t[i]<<24-i%4*8;n.call(this,r,e)}else n.apply(this,arguments)}).prototype=t}}(),function(t){var e=At,r=e.lib,i=r.WordArray,n=r.Hasher,o=e.algo,m=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),x=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),b=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),H=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),z=i.create([0,1518500249,1859775393,2400959708,2840853838]),A=i.create([1352829926,1548603684,1836072691,2053994217,0]),s=o.RIPEMD160=n.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o,s,a,c,h,l,f,u,d,p,_,v=this._hash.words,y=z.words,g=A.words,B=m.words,w=x.words,k=b.words,S=H.words;l=o=v[0],f=s=v[1],u=a=v[2],d=c=v[3],p=h=v[4];for(r=0;r<80;r+=1)_=o+t[e+B[r]]|0,_+=r<16?C(s,a,c)+y[0]:r<32?D(s,a,c)+y[1]:r<48?R(s,a,c)+y[2]:r<64?E(s,a,c)+y[3]:M(s,a,c)+y[4],_=(_=F(_|=0,k[r]))+h|0,o=h,h=c,c=F(a,10),a=s,s=_,_=l+t[e+w[r]]|0,_+=r<16?M(f,u,d)+g[0]:r<32?E(f,u,d)+g[1]:r<48?R(f,u,d)+g[2]:r<64?D(f,u,d)+g[3]:C(f,u,d)+g[4],_=(_=F(_|=0,S[r]))+p|0,l=p,p=d,d=F(u,10),u=f,f=_;_=v[1]+a+d|0,v[1]=v[2]+c+p|0,v[2]=v[3]+h+l|0,v[3]=v[4]+o+f|0,v[4]=v[0]+s+u|0,v[0]=_},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(e.length+1),this._process();for(var n=this._hash,o=n.words,s=0;s<5;s++){var a=o[s];o[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return n},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});function C(t,e,r){return t^e^r}function D(t,e,r){return t&e|~t&r}function R(t,e,r){return(t|~e)^r}function E(t,e,r){return t&r|e&~r}function M(t,e,r){return t^(e|~r)}function F(t,e){return t<>>32-e}e.RIPEMD160=n._createHelper(s),e.HmacRIPEMD160=n._createHmacHelper(s)}(Math),S=(k=At).lib.Base,m=k.enc.Utf8,k.algo.HMAC=S.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=m.parse(e));var r=t.blockSize,i=4*r;e.sigBytes>i&&(e=t.finalize(e)),e.clamp();for(var n=this._oKey=e.clone(),o=this._iKey=e.clone(),s=n.words,a=o.words,c=0;c>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(x=r[n]).high^=s,x.low^=o}for(var a=0;a<24;a++){for(var c=0;c<5;c++){for(var h=0,l=0,f=0;f<5;f++){h^=(x=r[c+5*f]).high,l^=x.low}var u=E[c];u.high=h,u.low=l}for(c=0;c<5;c++){var d=E[(c+4)%5],p=E[(c+1)%5],_=p.high,v=p.low;for(h=d.high^(_<<1|v>>>31),l=d.low^(v<<1|_>>>31),f=0;f<5;f++){(x=r[c+5*f]).high^=h,x.low^=l}}for(var y=1;y<25;y++){var g=(x=r[y]).high,B=x.low,w=C[y];if(w<32)h=g<>>32-w,l=B<>>32-w;else h=B<>>64-w,l=g<>>64-w;var k=E[D[y]];k.high=h,k.low=l}var S=E[0],m=r[0];S.high=m.high,S.low=m.low;for(c=0;c<5;c++)for(f=0;f<5;f++){var x=r[y=c+5*f],b=E[y],H=E[(c+1)%5+5*f],z=E[(c+2)%5+5*f];x.high=b.high^~H.high&z.high,x.low=b.low^~H.low&z.low}x=r[0];var A=R[a];x.high^=A.high,x.low^=A.low}},_doFinalize:function(){var t=this._data,e=t.words,r=(this._nDataBytes,8*t.sigBytes),i=32*this.blockSize;e[r>>>5]|=1<<24-r%32,e[(u.ceil((r+1)/i)*i>>>5)-1]|=128,t.sigBytes=4*e.length,this._process();for(var n=this._state,o=this.cfg.outputLength/8,s=o/8,a=[],c=0;c>>24)|4278255360&(l<<24|l>>>8),f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),a.push(f),a.push(l)}return new d.init(a,o)},clone:function(){for(var t=i.clone.call(this),e=t._state=this._state.slice(0),r=0;r<25;r++)e[r]=e[r].clone();return t}});t.SHA3=i._createHelper(n),t.HmacSHA3=i._createHmacHelper(n)}(Math),function(){var t=At,e=t.lib.Hasher,r=t.x64,i=r.Word,n=r.WordArray,o=t.algo;function s(){return i.create.apply(i,arguments)}var mt=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],xt=[];!function(){for(var t=0;t<80;t++)xt[t]=s()}();var a=o.SHA512=e.extend({_doReset:function(){this._hash=new n.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],a=r[4],c=r[5],h=r[6],l=r[7],f=i.high,u=i.low,d=n.high,p=n.low,_=o.high,v=o.low,y=s.high,g=s.low,B=a.high,w=a.low,k=c.high,S=c.low,m=h.high,x=h.low,b=l.high,H=l.low,z=f,A=u,C=d,D=p,R=_,E=v,M=y,F=g,P=B,W=w,O=k,U=S,I=m,K=x,X=b,L=H,j=0;j<80;j++){var N=xt[j];if(j<16)var T=N.high=0|t[e+2*j],Z=N.low=0|t[e+2*j+1];else{var q=xt[j-15],G=q.high,J=q.low,$=(G>>>1|J<<31)^(G>>>8|J<<24)^G>>>7,Q=(J>>>1|G<<31)^(J>>>8|G<<24)^(J>>>7|G<<25),V=xt[j-2],Y=V.high,tt=V.low,et=(Y>>>19|tt<<13)^(Y<<3|tt>>>29)^Y>>>6,rt=(tt>>>19|Y<<13)^(tt<<3|Y>>>29)^(tt>>>6|Y<<26),it=xt[j-7],nt=it.high,ot=it.low,st=xt[j-16],at=st.high,ct=st.low;T=(T=(T=$+nt+((Z=Q+ot)>>>0>>0?1:0))+et+((Z=Z+rt)>>>0>>0?1:0))+at+((Z=Z+ct)>>>0>>0?1:0);N.high=T,N.low=Z}var ht,lt=P&O^~P&I,ft=W&U^~W&K,ut=z&C^z&R^C&R,dt=A&D^A&E^D&E,pt=(z>>>28|A<<4)^(z<<30|A>>>2)^(z<<25|A>>>7),_t=(A>>>28|z<<4)^(A<<30|z>>>2)^(A<<25|z>>>7),vt=(P>>>14|W<<18)^(P>>>18|W<<14)^(P<<23|W>>>9),yt=(W>>>14|P<<18)^(W>>>18|P<<14)^(W<<23|P>>>9),gt=mt[j],Bt=gt.high,wt=gt.low,kt=X+vt+((ht=L+yt)>>>0>>0?1:0),St=_t+dt;X=I,L=K,I=O,K=U,O=P,U=W,P=M+(kt=(kt=(kt=kt+lt+((ht=ht+ft)>>>0>>0?1:0))+Bt+((ht=ht+wt)>>>0>>0?1:0))+T+((ht=ht+Z)>>>0>>0?1:0))+((W=F+ht|0)>>>0>>0?1:0)|0,M=R,F=E,R=C,E=D,C=z,D=A,z=kt+(pt+ut+(St>>>0<_t>>>0?1:0))+((A=ht+St|0)>>>0>>0?1:0)|0}u=i.low=u+A,i.high=f+z+(u>>>0>>0?1:0),p=n.low=p+D,n.high=d+C+(p>>>0>>0?1:0),v=o.low=v+E,o.high=_+R+(v>>>0>>0?1:0),g=s.low=g+F,s.high=y+M+(g>>>0>>0?1:0),w=a.low=w+W,a.high=B+P+(w>>>0>>0?1:0),S=c.low=S+U,c.high=k+O+(S>>>0>>0?1:0),x=h.low=x+K,h.high=m+I+(x>>>0>>0?1:0),H=l.low=H+L,l.high=b+X+(H>>>0>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[30+(i+128>>>10<<5)]=Math.floor(r/4294967296),e[31+(i+128>>>10<<5)]=r,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=e._createHelper(a),t.HmacSHA512=e._createHmacHelper(a)}(),$=(J=At).x64,Q=$.Word,V=$.WordArray,Y=J.algo,tt=Y.SHA512,et=Y.SHA384=tt.extend({_doReset:function(){this._hash=new V.init([new Q.init(3418070365,3238371032),new Q.init(1654270250,914150663),new Q.init(2438529370,812702999),new Q.init(355462360,4144912697),new Q.init(1731405415,4290775857),new Q.init(2394180231,1750603025),new Q.init(3675008525,1694076839),new Q.init(1203062813,3204075428)])},_doFinalize:function(){var t=tt._doFinalize.call(this);return t.sigBytes-=16,t}}),J.SHA384=tt._createHelper(et),J.HmacSHA384=tt._createHmacHelper(et),At.lib.Cipher||(it=(rt=At).lib,nt=it.Base,ot=it.WordArray,st=it.BufferedBlockAlgorithm,(at=rt.enc).Utf8,ct=at.Base64,ht=rt.algo.EvpKDF,lt=it.Cipher=st.extend({cfg:nt.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r),this._xformMode=t,this._key=e,this.reset()},reset:function(){st.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function n(t){return"string"==typeof t?Bt:yt}return function(i){return{encrypt:function(t,e,r){return n(e).encrypt(i,t,e,r)},decrypt:function(t,e,r){return n(e).decrypt(i,t,e,r)}}}}()}),it.StreamCipher=lt.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),ft=rt.mode={},ut=it.BlockCipherMode=nt.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),dt=ft.CBC=function(){var t=ut.extend();function o(t,e,r){var i=this._iv;if(i){var n=i;this._iv=void 0}else n=this._prevBlock;for(var o=0;o>>2];t.sigBytes-=e}},it.BlockCipher=lt.extend({cfg:lt.cfg.extend({mode:dt,padding:pt}),reset:function(){lt.reset.call(this);var t=this.cfg,e=t.iv,r=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var i=r.createEncryptor;else{i=r.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==i?this._mode.init(this,e&&e.words):(this._mode=i.call(r,this,e&&e.words),this._mode.__creator=i)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var e=this._process(!0)}else{e=this._process(!0);t.unpad(e)}return e},blockSize:4}),_t=it.CipherParams=nt.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),vt=(rt.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,r=t.salt;if(r)var i=ot.create([1398893684,1701076831]).concat(r).concat(e);else i=e;return i.toString(ct)},parse:function(t){var e=ct.parse(t),r=e.words;if(1398893684==r[0]&&1701076831==r[1]){var i=ot.create(r.slice(2,4));r.splice(0,4),e.sigBytes-=16}return _t.create({ciphertext:e,salt:i})}},yt=it.SerializableCipher=nt.extend({cfg:nt.extend({format:vt}),encrypt:function(t,e,r,i){i=this.cfg.extend(i);var n=t.createEncryptor(r,i),o=n.finalize(e),s=n.cfg;return _t.create({ciphertext:o,key:r,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,e,r,i){return i=this.cfg.extend(i),e=this._parse(e,i.format),t.createDecryptor(r,i).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),gt=(rt.kdf={}).OpenSSL={execute:function(t,e,r,i){i||(i=ot.random(8));var n=ht.create({keySize:e+r}).compute(t,i),o=ot.create(n.words.slice(e),4*r);return n.sigBytes=4*e,_t.create({key:n,iv:o,salt:i})}},Bt=it.PasswordBasedCipher=yt.extend({cfg:yt.cfg.extend({kdf:gt}),encrypt:function(t,e,r,i){var n=(i=this.cfg.extend(i)).kdf.execute(r,t.keySize,t.ivSize);i.iv=n.iv;var o=yt.encrypt.call(this,t,e,n.key,i);return o.mixIn(n),o},decrypt:function(t,e,r,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var n=i.kdf.execute(r,t.keySize,t.ivSize,e.salt);return i.iv=n.iv,yt.decrypt.call(this,t,e,n.key,i)}})),At.mode.CFB=function(){var t=At.lib.BlockCipherMode.extend();function o(t,e,r,i){var n=this._iv;if(n){var o=n.slice(0);this._iv=void 0}else o=this._prevBlock;i.encryptBlock(o,0);for(var s=0;s>>2]|=n<<24-o%4*8,t.sigBytes+=n},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},At.pad.Iso10126={pad:function(t,e){var r=4*e,i=r-t.sigBytes%r;t.concat(At.lib.WordArray.random(i-1)).concat(At.lib.WordArray.create([i<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},At.pad.Iso97971={pad:function(t,e){t.concat(At.lib.WordArray.create([2147483648],1)),At.pad.ZeroPadding.pad(t,e)},unpad:function(t){At.pad.ZeroPadding.unpad(t),t.sigBytes--}},At.mode.OFB=(kt=At.lib.BlockCipherMode.extend(),St=kt.Encryptor=kt.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._keystream;n&&(o=this._keystream=n.slice(0),this._iv=void 0),r.encryptBlock(o,0);for(var s=0;s>>8^255&n^99,h[r]=n;var o=t[l[n]=r],s=t[o],a=t[s],c=257*t[n]^16843008*n;f[r]=c<<24|c>>>8,u[r]=c<<16|c>>>16,d[r]=c<<8|c>>>24,p[r]=c;c=16843009*a^65537*s^257*o^16843008*r;_[n]=c<<24|c>>>8,v[n]=c<<16|c>>>16,y[n]=c<<8|c>>>24,g[n]=c,r?(r=o^t[t[t[a^o]]],i^=t[t[i]]):r=i=1}}();var B=[0,1,2,4,8,16,32,64,128,27,54],i=r.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,r=t.sigBytes/4,i=4*((this._nRounds=r+6)+1),n=this._keySchedule=[],o=0;o>>24]<<24|h[s>>>16&255]<<16|h[s>>>8&255]<<8|h[255&s]):(s=h[(s=s<<8|s>>>24)>>>24]<<24|h[s>>>16&255]<<16|h[s>>>8&255]<<8|h[255&s],s^=B[o/r|0]<<24),n[o]=n[o-r]^s}for(var a=this._invKeySchedule=[],c=0;c>>24]]^v[h[s>>>16&255]]^y[h[s>>>8&255]]^g[h[255&s]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,f,u,d,p,h)},decryptBlock:function(t,e){var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r,this._doCryptBlock(t,e,this._invKeySchedule,_,v,y,g,l);r=t[e+1];t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,i,n,o,s,a){for(var c=this._nRounds,h=t[e]^r[0],l=t[e+1]^r[1],f=t[e+2]^r[2],u=t[e+3]^r[3],d=4,p=1;p>>24]^n[l>>>16&255]^o[f>>>8&255]^s[255&u]^r[d++],v=i[l>>>24]^n[f>>>16&255]^o[u>>>8&255]^s[255&h]^r[d++],y=i[f>>>24]^n[u>>>16&255]^o[h>>>8&255]^s[255&l]^r[d++],g=i[u>>>24]^n[h>>>16&255]^o[l>>>8&255]^s[255&f]^r[d++];h=_,l=v,f=y,u=g}_=(a[h>>>24]<<24|a[l>>>16&255]<<16|a[f>>>8&255]<<8|a[255&u])^r[d++],v=(a[l>>>24]<<24|a[f>>>16&255]<<16|a[u>>>8&255]<<8|a[255&h])^r[d++],y=(a[f>>>24]<<24|a[u>>>16&255]<<16|a[h>>>8&255]<<8|a[255&l])^r[d++],g=(a[u>>>24]<<24|a[h>>>16&255]<<16|a[l>>>8&255]<<8|a[255&f])^r[d++];t[e]=_,t[e+1]=v,t[e+2]=y,t[e+3]=g},keySize:8});t.AES=e._createHelper(i)}(),function(){var t=At,e=t.lib,r=e.WordArray,i=e.BlockCipher,n=t.algo,h=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],l=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],f=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],o=n.DES=i.extend({_doReset:function(){for(var t=this._key.words,e=[],r=0;r<56;r++){var i=h[r]-1;e[r]=t[i>>>5]>>>31-i%32&1}for(var n=this._subKeys=[],o=0;o<16;o++){var s=n[o]=[],a=f[o];for(r=0;r<24;r++)s[r/6|0]|=e[(l[r]-1+a)%28]<<31-r%6,s[4+(r/6|0)]|=e[28+(l[r+24]-1+a)%28]<<31-r%6;s[0]=s[0]<<1|s[0]>>>31;for(r=1;r<7;r++)s[r]=s[r]>>>4*(r-1)+3;s[7]=s[7]<<5|s[7]>>>27}var c=this._invSubKeys=[];for(r=0;r<16;r++)c[r]=n[15-r]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,r){this._lBlock=t[e],this._rBlock=t[e+1],p.call(this,4,252645135),p.call(this,16,65535),_.call(this,2,858993459),_.call(this,8,16711935),p.call(this,1,1431655765);for(var i=0;i<16;i++){for(var n=r[i],o=this._lBlock,s=this._rBlock,a=0,c=0;c<8;c++)a|=u[c][((s^n[c])&d[c])>>>0];this._lBlock=s,this._rBlock=o^a}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,p.call(this,1,1431655765),_.call(this,8,16711935),_.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function p(t,e){var r=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=r,this._lBlock^=r<>>t^this._lBlock)&e;this._lBlock^=r,this._rBlock^=r<>>2]>>>24-s%4*8&255;o=(o+i[n]+a)%256;var c=i[n];i[n]=i[o],i[o]=c}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=n.call(this)},keySize:8,ivSize:0});function n(){for(var t=this._S,e=this._i,r=this._j,i=0,n=0;n<4;n++){r=(r+t[e=(e+1)%256])%256;var o=t[e];t[e]=t[r],t[r]=o,i|=t[(t[e]+t[r])%256]<<24-8*n}return this._i=e,this._j=r,i}t.RC4=e._createHelper(i);var o=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var t=this.cfg.drop;0>24&255)){var e=t>>16&255,r=t>>8&255,i=255&t;255===e?(e=0,255===r?(r=0,255===i?i=0:++i):++r):++e,t=0,t+=e<<16,t+=r<<8,t+=i}else t+=1<<24;return t}var e=t.Encryptor=t.extend({processBlock:function(t,e){var r,i=this._cipher,n=i.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.slice(0),this._iv=void 0),0===((r=s)[0]=h(r[0]))&&(r[1]=h(r[1]));var a=s.slice(0);i.encryptBlock(a,0);for(var c=0;c>>24)|4278255360&(t[r]<<24|t[r]>>>8);var i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(r=this._b=0;r<4;r++)u.call(this);for(r=0;r<8;r++)n[r]^=i[r+4&7];if(e){var o=e.words,s=o[0],a=o[1],c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=c>>>16|4294901760&h,f=h<<16|65535&c;n[0]^=c,n[1]^=l,n[2]^=h,n[3]^=f,n[4]^=c,n[5]^=l,n[6]^=h,n[7]^=f;for(r=0;r<4;r++)u.call(this)}},_doProcessBlock:function(t,e){var r=this._X;u.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)n[i]=16711935&(n[i]<<8|n[i]>>>24)|4278255360&(n[i]<<24|n[i]>>>8),t[e+i]^=n[i]},blockSize:4,ivSize:2});function u(){for(var t=this._X,e=this._C,r=0;r<8;r++)c[r]=e[r];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0;for(r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,a=((4294901760&i)*i|0)+((65535&i)*i|0);h[r]=s^a}t[0]=h[0]+(h[7]<<16|h[7]>>>16)+(h[6]<<16|h[6]>>>16)|0,t[1]=h[1]+(h[0]<<8|h[0]>>>24)+h[7]|0,t[2]=h[2]+(h[1]<<16|h[1]>>>16)+(h[0]<<16|h[0]>>>16)|0,t[3]=h[3]+(h[2]<<8|h[2]>>>24)+h[1]|0,t[4]=h[4]+(h[3]<<16|h[3]>>>16)+(h[2]<<16|h[2]>>>16)|0,t[5]=h[5]+(h[4]<<8|h[4]>>>24)+h[3]|0,t[6]=h[6]+(h[5]<<16|h[5]>>>16)+(h[4]<<16|h[4]>>>16)|0,t[7]=h[7]+(h[6]<<8|h[6]>>>24)+h[5]|0}t.Rabbit=e._createHelper(i)}(),At.mode.CTR=(Ht=At.lib.BlockCipherMode.extend(),zt=Ht.Encryptor=Ht.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._counter;n&&(o=this._counter=n.slice(0),this._iv=void 0);var s=o.slice(0);r.encryptBlock(s,0),o[i-1]=o[i-1]+1|0;for(var a=0;a>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]],n=this._b=0;n<4;n++)u.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var o=e.words,s=o[0],a=o[1],c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=c>>>16|4294901760&h,f=h<<16|65535&c;i[0]^=c,i[1]^=l,i[2]^=h,i[3]^=f,i[4]^=c,i[5]^=l,i[6]^=h,i[7]^=f;for(n=0;n<4;n++)u.call(this)}},_doProcessBlock:function(t,e){var r=this._X;u.call(this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)n[i]=16711935&(n[i]<<8|n[i]>>>24)|4278255360&(n[i]<<24|n[i]>>>8),t[e+i]^=n[i]},blockSize:4,ivSize:2});function u(){for(var t=this._X,e=this._C,r=0;r<8;r++)c[r]=e[r];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0;for(r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,a=((4294901760&i)*i|0)+((65535&i)*i|0);h[r]=s^a}t[0]=h[0]+(h[7]<<16|h[7]>>>16)+(h[6]<<16|h[6]>>>16)|0,t[1]=h[1]+(h[0]<<8|h[0]>>>24)+h[7]|0,t[2]=h[2]+(h[1]<<16|h[1]>>>16)+(h[0]<<16|h[0]>>>16)|0,t[3]=h[3]+(h[2]<<8|h[2]>>>24)+h[1]|0,t[4]=h[4]+(h[3]<<16|h[3]>>>16)+(h[2]<<16|h[2]>>>16)|0,t[5]=h[5]+(h[4]<<8|h[4]>>>24)+h[3]|0,t[6]=h[6]+(h[5]<<16|h[5]>>>16)+(h[4]<<16|h[4]>>>16)|0,t[7]=h[7]+(h[6]<<8|h[6]>>>24)+h[5]|0}t.RabbitLegacy=e._createHelper(i)}(),At.pad.ZeroPadding={pad:function(t,e){var r=4*e;t.clamp(),t.sigBytes+=r-(t.sigBytes%r||r)},unpad:function(t){for(var e=t.words,r=t.sigBytes-1;!(e[r>>>2]>>>24-r%4*8&255);)r--;t.sigBytes=r+1}},At}); --------------------------------------------------------------------------------