33235b33 by zhen

init project

0 parents
Showing 107 changed files with 6842 additions and 0 deletions
# just a flag
ENV = 'development'
# base api
# VUE_APP_BASE_API = 'http://192.168.11.94:8081'
# VUE_APP_BASE_API = 'http://192.168.252.25:8081'
VUE_APP_BASE_API = 'https://pre-web-chery.situdata.com'
VUE_APP_WEBRTC_URL = 'pre-jitsi-chery.situdata.com'
# VUE_APP_WEBRTC_URL = 'srtc.situdata.com'
\ No newline at end of file
# just a flag
VUE_APP_BASE_API = 'https://ft.cheryfs.cn:8100'
VUE_APP_WEBRTC_URL = 'vc.cheryfs.cn:8443'
\ No newline at end of file
node_modules
dist
.DS_Store
.idea
\ No newline at end of file
# 云霄后台管理
module.exports = {
presets: [
'@vue/app'
]
}
This diff could not be displayed because it is too large.
{
"name": "yunxiao-admin-fe",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve --mode development",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"test:unit": "vue-cli-service test:unit",
"commit": "cz"
},
"dependencies": {
"animate.css": "^4.1.0",
"axios": "^0.18.1",
"captcha-mini": "^1.1.0",
"core-js": "^2.6.11",
"echarts": "^4.8.0",
"element-ui": "^2.13.2",
"js-cookie": "^2.2.1",
"nprogress": "^0.2.0",
"pug": "^2.0.4",
"pug-plain-loader": "^1.0.0",
"uuid": "^8.3.0",
"v-charts": "^1.19.0",
"video.js": "^7.8.4",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
"vue-simple-uploader": "^0.7.4",
"vuex": "^3.1.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.12.1",
"@vue/cli-plugin-eslint": "^3.12.1",
"@vue/cli-plugin-unit-mocha": "^3.12.1",
"@vue/cli-service": "^3.12.1",
"@vue/eslint-config-standard": "^4.0.0",
"@vue/test-utils": "1.0.0-beta.29",
"babel-eslint": "^10.0.3",
"chai": "^4.1.2",
"commitizen": "^4.2.0",
"cz-conventional-changelog": "^3.2.1",
"cz-emoji": "^1.2.2",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.2.3",
"filemanager-webpack-plugin": "^2.0.5",
"node-sass": "^4.13.0",
"qr-image": "^3.2.0",
"sass-loader": "^7.3.1",
"svg-sprite-loader": "^4.3.0",
"vue-particles": "^1.0.9",
"vue-template-compiler": "^2.5.21"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"@vue/standard"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {
"no-tabs": "off",
"space-before-function-paren": "off"
}
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions"
],
"config": {
"cz-emoji": {
"types": [
{
"emoji": "🌟",
"code": "🌟feat:",
"description": "A new feature",
"name": "feature"
},
{
"emoji": "🐞",
"code": "🐞fix:",
"description": "A bug fix",
"name": "fix"
},
{
"emoji": "📝",
"code": "📝docs:",
"description": "update docs",
"name": "docs"
},
{
"emoji": "💰",
"code": "💰perf:",
"description": "Improves performance with this change",
"name": "perf"
},
{
"emoji": "🎨",
"code": "🎨style:",
"description": "Doesn't affect the meaning of the code (white-space, semi-colons, etc)",
"name": "style"
},
{
"emoji": "🚓",
"code": "🚓test:",
"description": "Testing improved with new or fixed tests",
"name": "test"
},
{
"emoji": "🔨",
"code": "🔨build-conf:",
"description": "更新一些配置文件",
"name": "build-conf"
},
{
"emoji": "💊",
"code": "💊revert:",
"description": "Reverts a previous commit",
"name": "revert"
}
]
},
"commitizen": {
"path": "./node_modules/cz-emoji"
}
}
}
module.exports = {
// tab缩进大小,默认为2
tabWidth: 2,
// 使用tab缩进,默认false
useTabs: false,
// 使用分号, 默认true
semi: false,
// 使用单引号, 默认false(在jsx中配置无效, 默认都是双引号)
singleQuote: true,
// 行尾逗号,默认none,可选 none|es5|all
// es5 包括es5中的数组、对象
// all 包括函数对象等所有可选
TrailingCooma: 'none',
// 对象中的空格 默认true
// true: { foo: bar }
// false: {foo: bar}
bracketSpacing: true,
// JSX标签闭合位置 默认false
// false: <div
// className=""
// style={{}}
// >
// true: <div
// className=""
// style={{}} >
jsxBracketSameLine: false,
// 箭头函数参数括号 默认avoid 可选 avoid| always
// avoid 能省略括号的时候就省略 例如x => x
// always 总是有括号
arrowParens: 'avoid'
}
No preview for this file type
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<title>云销</title>
<!-- strophe删除待定 -->
<!-- <script src="./libs/strophe/strophe.js"></script>
<script src="./libs/strophe/strophe.disco.min.js?v=1"></script>
<script src="./libs/jquery-2.1.1.min.js"></script>
<script src="./libs/lib-jitsi-meet.min.js"></script> -->
</head>
<body>
<noscript>
<strong
>We're sorry but smartimageplatform doesn't work properly without
JavaScript enabled. Please enable it to continue.</strong
>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
This diff could not be displayed because it is too large.
/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)
},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))
},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \t]*([^\r\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\/\//,mc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\[\]$/,yc=/\r?\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\r\n")}}):{name:b.name,value:c.replace(yc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});
This diff could not be displayed because it is too large.
Strophe.addConnectionPlugin("disco",{_connection:null,_identities:[],_features:[],_items:[],init:function(conn){this._connection=conn;this._identities=[];this._features=[];this._items=[];conn.addHandler(this._onDiscoInfo.bind(this),Strophe.NS.DISCO_INFO,"iq","get",null,null);conn.addHandler(this._onDiscoItems.bind(this),Strophe.NS.DISCO_ITEMS,"iq","get",null,null)},addIdentity:function(category,type,name,lang){for(var i=0;i<this._identities.length;i++){if(this._identities[i].category==category&&this._identities[i].type==type&&this._identities[i].name==name&&this._identities[i].lang==lang){return false}}this._identities.push({category:category,type:type,name:name,lang:lang});return true},addFeature:function(var_name){for(var i=0;i<this._features.length;i++){if(this._features[i]==var_name){return false}}this._features.push(var_name);return true},removeFeature:function(var_name){for(var i=0;i<this._features.length;i++){if(this._features[i]===var_name){this._features.splice(i,1);return true}}return false},addItem:function(jid,name,node,call_back){if(node&&!call_back){return false}this._items.push({jid:jid,name:name,node:node,call_back:call_back});return true},info:function(jid,node,success,error,timeout){var attrs={xmlns:Strophe.NS.DISCO_INFO};if(node){attrs.node=node}var info=$iq({from:this._connection.jid,to:jid,type:"get"}).c("query",attrs);this._connection.sendIQ(info,success,error,timeout)},items:function(jid,node,success,error,timeout){var attrs={xmlns:Strophe.NS.DISCO_ITEMS};if(node){attrs.node=node}var items=$iq({from:this._connection.jid,to:jid,type:"get"}).c("query",attrs);this._connection.sendIQ(items,success,error,timeout)},_buildIQResult:function(stanza,query_attrs){var id=stanza.getAttribute("id");var from=stanza.getAttribute("from");var iqresult=$iq({type:"result",id:id});if(from!==null){iqresult.attrs({to:from})}return iqresult.c("query",query_attrs)},_onDiscoInfo:function(stanza){var node=stanza.getElementsByTagName("query")[0].getAttribute("node");var attrs={xmlns:Strophe.NS.DISCO_INFO};if(node){attrs.node=node}var iqresult=this._buildIQResult(stanza,attrs);for(var i=0;i<this._identities.length;i++){var attrs={category:this._identities[i].category,type:this._identities[i].type};if(this._identities[i].name){attrs.name=this._identities[i].name}if(this._identities[i].lang){attrs["xml:lang"]=this._identities[i].lang}iqresult.c("identity",attrs).up()}for(var i=0;i<this._features.length;i++){iqresult.c("feature",{"var":this._features[i]}).up()}this._connection.send(iqresult.tree());return true},_onDiscoItems:function(stanza){var query_attrs={xmlns:Strophe.NS.DISCO_ITEMS};var node=stanza.getElementsByTagName("query")[0].getAttribute("node");if(node){query_attrs.node=node;var items=[];for(var i=0;i<this._items.length;i++){if(this._items[i].node==node){items=this._items[i].call_back(stanza);break}}}else{var items=this._items}var iqresult=this._buildIQResult(stanza,query_attrs);for(var i=0;i<items.length;i++){var attrs={jid:items[i].jid};if(items[i].name){attrs.name=items[i].name}if(items[i].node){attrs.node=items[i].node}iqresult.c("item",attrs).up()}this._connection.send(iqresult.tree());return true}});
\ No newline at end of file
This diff could not be displayed because it is too large.
/*! strophe.js v1.2.2 - built on 20-06-2015 */
!function(a){return function(a,b){"function"==typeof define&&define.amd?define("strophe-base64",function(){return b()}):a.Base64=b()}(this,function(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",b={encode:function(b){var c,d,e,f,g,h,i,j="",k=0;do c=b.charCodeAt(k++),d=b.charCodeAt(k++),e=b.charCodeAt(k++),f=c>>2,g=(3&c)<<4|d>>4,h=(15&d)<<2|e>>6,i=63&e,isNaN(d)?(g=(3&c)<<4,h=i=64):isNaN(e)&&(i=64),j=j+a.charAt(f)+a.charAt(g)+a.charAt(h)+a.charAt(i);while(k<b.length);return j},decode:function(b){var c,d,e,f,g,h,i,j="",k=0;b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");do f=a.indexOf(b.charAt(k++)),g=a.indexOf(b.charAt(k++)),h=a.indexOf(b.charAt(k++)),i=a.indexOf(b.charAt(k++)),c=f<<2|g>>4,d=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(c),64!=h&&(j+=String.fromCharCode(d)),64!=i&&(j+=String.fromCharCode(e));while(k<b.length);return j}};return b}),function(a,b){"function"==typeof define&&define.amd?define("strophe-sha1",function(){return b()}):a.SHA1=b()}(this,function(){function a(a,d){a[d>>5]|=128<<24-d%32,a[(d+64>>9<<4)+15]=d;var g,h,i,j,k,l,m,n,o=new Array(80),p=1732584193,q=-271733879,r=-1732584194,s=271733878,t=-1009589776;for(g=0;g<a.length;g+=16){for(j=p,k=q,l=r,m=s,n=t,h=0;80>h;h++)16>h?o[h]=a[g+h]:o[h]=f(o[h-3]^o[h-8]^o[h-14]^o[h-16],1),i=e(e(f(p,5),b(h,q,r,s)),e(e(t,o[h]),c(h))),t=s,s=r,r=f(q,30),q=p,p=i;p=e(p,j),q=e(q,k),r=e(r,l),s=e(s,m),t=e(t,n)}return[p,q,r,s,t]}function b(a,b,c,d){return 20>a?b&c|~b&d:40>a?b^c^d:60>a?b&c|b&d|c&d:b^c^d}function c(a){return 20>a?1518500249:40>a?1859775393:60>a?-1894007588:-899497514}function d(b,c){var d=g(b);d.length>16&&(d=a(d,8*b.length));for(var e=new Array(16),f=new Array(16),h=0;16>h;h++)e[h]=909522486^d[h],f[h]=1549556828^d[h];var i=a(e.concat(g(c)),512+8*c.length);return a(f.concat(i),672)}function e(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c}function f(a,b){return a<<b|a>>>32-b}function g(a){for(var b=[],c=255,d=0;d<8*a.length;d+=8)b[d>>5]|=(a.charCodeAt(d/8)&c)<<24-d%32;return b}function h(a){for(var b="",c=255,d=0;d<32*a.length;d+=8)b+=String.fromCharCode(a[d>>5]>>>24-d%32&c);return b}function i(a){for(var b,c,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e="",f=0;f<4*a.length;f+=3)for(b=(a[f>>2]>>8*(3-f%4)&255)<<16|(a[f+1>>2]>>8*(3-(f+1)%4)&255)<<8|a[f+2>>2]>>8*(3-(f+2)%4)&255,c=0;4>c;c++)e+=8*f+6*c>32*a.length?"=":d.charAt(b>>6*(3-c)&63);return e}return{b64_hmac_sha1:function(a,b){return i(d(a,b))},b64_sha1:function(b){return i(a(g(b),8*b.length))},binb2str:h,core_hmac_sha1:d,str_hmac_sha1:function(a,b){return h(d(a,b))},str_sha1:function(b){return h(a(g(b),8*b.length))}}}),function(a,b){"function"==typeof define&&define.amd?define("strophe-md5",function(){return b()}):a.MD5=b()}(this,function(a){var b=function(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c},c=function(a,b){return a<<b|a>>>32-b},d=function(a){for(var b=[],c=0;c<8*a.length;c+=8)b[c>>5]|=(255&a.charCodeAt(c/8))<<c%32;return b},e=function(a){for(var b="",c=0;c<32*a.length;c+=8)b+=String.fromCharCode(a[c>>5]>>>c%32&255);return b},f=function(a){for(var b="0123456789abcdef",c="",d=0;d<4*a.length;d++)c+=b.charAt(a[d>>2]>>d%4*8+4&15)+b.charAt(a[d>>2]>>d%4*8&15);return c},g=function(a,d,e,f,g,h){return b(c(b(b(d,a),b(f,h)),g),e)},h=function(a,b,c,d,e,f,h){return g(b&c|~b&d,a,b,e,f,h)},i=function(a,b,c,d,e,f,h){return g(b&d|c&~d,a,b,e,f,h)},j=function(a,b,c,d,e,f,h){return g(b^c^d,a,b,e,f,h)},k=function(a,b,c,d,e,f,h){return g(c^(b|~d),a,b,e,f,h)},l=function(a,c){a[c>>5]|=128<<c%32,a[(c+64>>>9<<4)+14]=c;for(var d,e,f,g,l=1732584193,m=-271733879,n=-1732584194,o=271733878,p=0;p<a.length;p+=16)d=l,e=m,f=n,g=o,l=h(l,m,n,o,a[p+0],7,-680876936),o=h(o,l,m,n,a[p+1],12,-389564586),n=h(n,o,l,m,a[p+2],17,606105819),m=h(m,n,o,l,a[p+3],22,-1044525330),l=h(l,m,n,o,a[p+4],7,-176418897),o=h(o,l,m,n,a[p+5],12,1200080426),n=h(n,o,l,m,a[p+6],17,-1473231341),m=h(m,n,o,l,a[p+7],22,-45705983),l=h(l,m,n,o,a[p+8],7,1770035416),o=h(o,l,m,n,a[p+9],12,-1958414417),n=h(n,o,l,m,a[p+10],17,-42063),m=h(m,n,o,l,a[p+11],22,-1990404162),l=h(l,m,n,o,a[p+12],7,1804603682),o=h(o,l,m,n,a[p+13],12,-40341101),n=h(n,o,l,m,a[p+14],17,-1502002290),m=h(m,n,o,l,a[p+15],22,1236535329),l=i(l,m,n,o,a[p+1],5,-165796510),o=i(o,l,m,n,a[p+6],9,-1069501632),n=i(n,o,l,m,a[p+11],14,643717713),m=i(m,n,o,l,a[p+0],20,-373897302),l=i(l,m,n,o,a[p+5],5,-701558691),o=i(o,l,m,n,a[p+10],9,38016083),n=i(n,o,l,m,a[p+15],14,-660478335),m=i(m,n,o,l,a[p+4],20,-405537848),l=i(l,m,n,o,a[p+9],5,568446438),o=i(o,l,m,n,a[p+14],9,-1019803690),n=i(n,o,l,m,a[p+3],14,-187363961),m=i(m,n,o,l,a[p+8],20,1163531501),l=i(l,m,n,o,a[p+13],5,-1444681467),o=i(o,l,m,n,a[p+2],9,-51403784),n=i(n,o,l,m,a[p+7],14,1735328473),m=i(m,n,o,l,a[p+12],20,-1926607734),l=j(l,m,n,o,a[p+5],4,-378558),o=j(o,l,m,n,a[p+8],11,-2022574463),n=j(n,o,l,m,a[p+11],16,1839030562),m=j(m,n,o,l,a[p+14],23,-35309556),l=j(l,m,n,o,a[p+1],4,-1530992060),o=j(o,l,m,n,a[p+4],11,1272893353),n=j(n,o,l,m,a[p+7],16,-155497632),m=j(m,n,o,l,a[p+10],23,-1094730640),l=j(l,m,n,o,a[p+13],4,681279174),o=j(o,l,m,n,a[p+0],11,-358537222),n=j(n,o,l,m,a[p+3],16,-722521979),m=j(m,n,o,l,a[p+6],23,76029189),l=j(l,m,n,o,a[p+9],4,-640364487),o=j(o,l,m,n,a[p+12],11,-421815835),n=j(n,o,l,m,a[p+15],16,530742520),m=j(m,n,o,l,a[p+2],23,-995338651),l=k(l,m,n,o,a[p+0],6,-198630844),o=k(o,l,m,n,a[p+7],10,1126891415),n=k(n,o,l,m,a[p+14],15,-1416354905),m=k(m,n,o,l,a[p+5],21,-57434055),l=k(l,m,n,o,a[p+12],6,1700485571),o=k(o,l,m,n,a[p+3],10,-1894986606),n=k(n,o,l,m,a[p+10],15,-1051523),m=k(m,n,o,l,a[p+1],21,-2054922799),l=k(l,m,n,o,a[p+8],6,1873313359),o=k(o,l,m,n,a[p+15],10,-30611744),n=k(n,o,l,m,a[p+6],15,-1560198380),m=k(m,n,o,l,a[p+13],21,1309151649),l=k(l,m,n,o,a[p+4],6,-145523070),o=k(o,l,m,n,a[p+11],10,-1120210379),n=k(n,o,l,m,a[p+2],15,718787259),m=k(m,n,o,l,a[p+9],21,-343485551),l=b(l,d),m=b(m,e),n=b(n,f),o=b(o,g);return[l,m,n,o]},m={hexdigest:function(a){return f(l(d(a),8*a.length))},hash:function(a){return e(l(d(a),8*a.length))}};return m}),Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=Array.prototype.slice,d=Array.prototype.concat,e=c.call(arguments,1);return function(){return b.apply(a?a:this,d.call(e,c.call(arguments,0)))}}),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length,c=Number(arguments[1])||0;for(c=0>c?Math.ceil(c):Math.floor(c),0>c&&(c+=b);b>c;c++)if(c in this&&this[c]===a)return c;return-1}),function(a,b){if("function"==typeof define&&define.amd)define("strophe-core",["strophe-sha1","strophe-base64","strophe-md5","strophe-polyfill"],function(){return b.apply(this,arguments)});else{var c=b(a.SHA1,a.Base64,a.MD5);window.Strophe=c.Strophe,window.$build=c.$build,window.$iq=c.$iq,window.$msg=c.$msg,window.$pres=c.$pres,window.SHA1=c.SHA1,window.Base64=c.Base64,window.MD5=c.MD5,window.b64_hmac_sha1=c.SHA1.b64_hmac_sha1,window.b64_sha1=c.SHA1.b64_sha1,window.str_hmac_sha1=c.SHA1.str_hmac_sha1,window.str_sha1=c.SHA1.str_sha1}}(this,function(a,b,c){function d(a,b){return new h.Builder(a,b)}function e(a){return new h.Builder("message",a)}function f(a){return new h.Builder("iq",a)}function g(a){return new h.Builder("presence",a)}var h;return h={VERSION:"1.2.2",NS:{HTTPBIND:"http://jabber.org/protocol/httpbind",BOSH:"urn:xmpp:xbosh",CLIENT:"jabber:client",AUTH:"jabber:iq:auth",ROSTER:"jabber:iq:roster",PROFILE:"jabber:iq:profile",DISCO_INFO:"http://jabber.org/protocol/disco#info",DISCO_ITEMS:"http://jabber.org/protocol/disco#items",MUC:"http://jabber.org/protocol/muc",SASL:"urn:ietf:params:xml:ns:xmpp-sasl",STREAM:"http://etherx.jabber.org/streams",FRAMING:"urn:ietf:params:xml:ns:xmpp-framing",BIND:"urn:ietf:params:xml:ns:xmpp-bind",SESSION:"urn:ietf:params:xml:ns:xmpp-session",VERSION:"jabber:iq:version",STANZAS:"urn:ietf:params:xml:ns:xmpp-stanzas",XHTML_IM:"http://jabber.org/protocol/xhtml-im",XHTML:"http://www.w3.org/1999/xhtml"},XHTML:{tags:["a","blockquote","br","cite","em","img","li","ol","p","span","strong","ul","body"],attributes:{a:["href"],blockquote:["style"],br:[],cite:["style"],em:[],img:["src","alt","style","height","width"],li:["style"],ol:["style"],p:["style"],span:["style"],strong:[],ul:["style"],body:[]},css:["background-color","color","font-family","font-size","font-style","font-weight","margin-left","margin-right","text-align","text-decoration"],validTag:function(a){for(var b=0;b<h.XHTML.tags.length;b++)if(a==h.XHTML.tags[b])return!0;return!1},validAttribute:function(a,b){if("undefined"!=typeof h.XHTML.attributes[a]&&h.XHTML.attributes[a].length>0)for(var c=0;c<h.XHTML.attributes[a].length;c++)if(b==h.XHTML.attributes[a][c])return!0;return!1},validCSS:function(a){for(var b=0;b<h.XHTML.css.length;b++)if(a==h.XHTML.css[b])return!0;return!1}},Status:{ERROR:0,CONNECTING:1,CONNFAIL:2,AUTHENTICATING:3,AUTHFAIL:4,CONNECTED:5,DISCONNECTED:6,DISCONNECTING:7,ATTACHED:8,REDIRECT:9},LogLevel:{DEBUG:0,INFO:1,WARN:2,ERROR:3,FATAL:4},ElementType:{NORMAL:1,TEXT:3,CDATA:4,FRAGMENT:11},TIMEOUT:1.1,SECONDARY_TIMEOUT:.1,addNamespace:function(a,b){h.NS[a]=b},forEachChild:function(a,b,c){var d,e;for(d=0;d<a.childNodes.length;d++)e=a.childNodes[d],e.nodeType!=h.ElementType.NORMAL||b&&!this.isTagEqual(e,b)||c(e)},isTagEqual:function(a,b){return a.tagName==b},_xmlGenerator:null,_makeGenerator:function(){var a;return void 0===document.implementation.createDocument||document.implementation.createDocument&&document.documentMode&&document.documentMode<10?(a=this._getIEXmlDom(),a.appendChild(a.createElement("strophe"))):a=document.implementation.createDocument("jabber:client","strophe",null),a},xmlGenerator:function(){return h._xmlGenerator||(h._xmlGenerator=h._makeGenerator()),h._xmlGenerator},_getIEXmlDom:function(){for(var a=null,b=["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.5.0","Msxml2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"],c=0;c<b.length&&null===a;c++)try{a=new ActiveXObject(b[c])}catch(d){a=null}return a},xmlElement:function(a){if(!a)return null;var b,c,d,e=h.xmlGenerator().createElement(a);for(b=1;b<arguments.length;b++){var f=arguments[b];if(f)if("string"==typeof f||"number"==typeof f)e.appendChild(h.xmlTextNode(f));else if("object"==typeof f&&"function"==typeof f.sort)for(c=0;c<f.length;c++){var g=f[c];"object"==typeof g&&"function"==typeof g.sort&&void 0!==g[1]&&e.setAttribute(g[0],g[1])}else if("object"==typeof f)for(d in f)f.hasOwnProperty(d)&&void 0!==f[d]&&e.setAttribute(d,f[d])}return e},xmlescape:function(a){return a=a.replace(/\&/g,"&amp;"),a=a.replace(/</g,"&lt;"),a=a.replace(/>/g,"&gt;"),a=a.replace(/'/g,"&apos;"),a=a.replace(/"/g,"&quot;")},xmlunescape:function(a){return a=a.replace(/\&amp;/g,"&"),a=a.replace(/&lt;/g,"<"),a=a.replace(/&gt;/g,">"),a=a.replace(/&apos;/g,"'"),a=a.replace(/&quot;/g,'"')},xmlTextNode:function(a){return h.xmlGenerator().createTextNode(a)},xmlHtmlNode:function(a){var b;if(window.DOMParser){var c=new DOMParser;b=c.parseFromString(a,"text/xml")}else b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a);return b},getText:function(a){if(!a)return null;var b="";0===a.childNodes.length&&a.nodeType==h.ElementType.TEXT&&(b+=a.nodeValue);for(var c=0;c<a.childNodes.length;c++)a.childNodes[c].nodeType==h.ElementType.TEXT&&(b+=a.childNodes[c].nodeValue);return h.xmlescape(b)},copyElement:function(a){var b,c;if(a.nodeType==h.ElementType.NORMAL){for(c=h.xmlElement(a.tagName),b=0;b<a.attributes.length;b++)c.setAttribute(a.attributes[b].nodeName,a.attributes[b].value);for(b=0;b<a.childNodes.length;b++)c.appendChild(h.copyElement(a.childNodes[b]))}else a.nodeType==h.ElementType.TEXT&&(c=h.xmlGenerator().createTextNode(a.nodeValue));return c},createHtml:function(a){var b,c,d,e,f,g,i,j,k,l,m;if(a.nodeType==h.ElementType.NORMAL)if(e=a.nodeName.toLowerCase(),h.XHTML.validTag(e))try{for(c=h.xmlElement(e),b=0;b<h.XHTML.attributes[e].length;b++)if(f=h.XHTML.attributes[e][b],g=a.getAttribute(f),"undefined"!=typeof g&&null!==g&&""!==g&&g!==!1&&0!==g)if("style"==f&&"object"==typeof g&&"undefined"!=typeof g.cssText&&(g=g.cssText),"style"==f){for(i=[],j=g.split(";"),d=0;d<j.length;d++)k=j[d].split(":"),l=k[0].replace(/^\s*/,"").replace(/\s*$/,"").toLowerCase(),h.XHTML.validCSS(l)&&(m=k[1].replace(/^\s*/,"").replace(/\s*$/,""),i.push(l+": "+m));i.length>0&&(g=i.join("; "),c.setAttribute(f,g))}else c.setAttribute(f,g);for(b=0;b<a.childNodes.length;b++)c.appendChild(h.createHtml(a.childNodes[b]))}catch(n){c=h.xmlTextNode("")}else for(c=h.xmlGenerator().createDocumentFragment(),b=0;b<a.childNodes.length;b++)c.appendChild(h.createHtml(a.childNodes[b]));else if(a.nodeType==h.ElementType.FRAGMENT)for(c=h.xmlGenerator().createDocumentFragment(),b=0;b<a.childNodes.length;b++)c.appendChild(h.createHtml(a.childNodes[b]));else a.nodeType==h.ElementType.TEXT&&(c=h.xmlTextNode(a.nodeValue));return c},escapeNode:function(a){return"string"!=typeof a?a:a.replace(/^\s+|\s+$/g,"").replace(/\\/g,"\\5c").replace(/ /g,"\\20").replace(/\"/g,"\\22").replace(/\&/g,"\\26").replace(/\'/g,"\\27").replace(/\//g,"\\2f").replace(/:/g,"\\3a").replace(/</g,"\\3c").replace(/>/g,"\\3e").replace(/@/g,"\\40")},unescapeNode:function(a){return"string"!=typeof a?a:a.replace(/\\20/g," ").replace(/\\22/g,'"').replace(/\\26/g,"&").replace(/\\27/g,"'").replace(/\\2f/g,"/").replace(/\\3a/g,":").replace(/\\3c/g,"<").replace(/\\3e/g,">").replace(/\\40/g,"@").replace(/\\5c/g,"\\")},getNodeFromJid:function(a){return a.indexOf("@")<0?null:a.split("@")[0]},getDomainFromJid:function(a){var b=h.getBareJidFromJid(a);if(b.indexOf("@")<0)return b;var c=b.split("@");return c.splice(0,1),c.join("@")},getResourceFromJid:function(a){var b=a.split("/");return b.length<2?null:(b.splice(0,1),b.join("/"))},getBareJidFromJid:function(a){return a?a.split("/")[0]:null},log:function(a,b){},debug:function(a){this.log(this.LogLevel.DEBUG,a)},info:function(a){this.log(this.LogLevel.INFO,a)},warn:function(a){this.log(this.LogLevel.WARN,a)},error:function(a){this.log(this.LogLevel.ERROR,a)},fatal:function(a){this.log(this.LogLevel.FATAL,a)},serialize:function(a){var b;if(!a)return null;"function"==typeof a.tree&&(a=a.tree());var c,d,e=a.nodeName;for(a.getAttribute("_realname")&&(e=a.getAttribute("_realname")),b="<"+e,c=0;c<a.attributes.length;c++)"_realname"!=a.attributes[c].nodeName&&(b+=" "+a.attributes[c].nodeName+"='"+a.attributes[c].value.replace(/&/g,"&amp;").replace(/\'/g,"&apos;").replace(/>/g,"&gt;").replace(/</g,"&lt;")+"'");if(a.childNodes.length>0){for(b+=">",c=0;c<a.childNodes.length;c++)switch(d=a.childNodes[c],d.nodeType){case h.ElementType.NORMAL:b+=h.serialize(d);break;case h.ElementType.TEXT:b+=h.xmlescape(d.nodeValue);break;case h.ElementType.CDATA:b+="<![CDATA["+d.nodeValue+"]]>"}b+="</"+e+">"}else b+="/>";return b},_requestId:0,_connectionPlugins:{},addConnectionPlugin:function(a,b){h._connectionPlugins[a]=b}},h.Builder=function(a,b){("presence"==a||"message"==a||"iq"==a)&&(b&&!b.xmlns?b.xmlns=h.NS.CLIENT:b||(b={xmlns:h.NS.CLIENT})),this.nodeTree=h.xmlElement(a,b),this.node=this.nodeTree},h.Builder.prototype={tree:function(){return this.nodeTree},toString:function(){return h.serialize(this.nodeTree)},up:function(){return this.node=this.node.parentNode,this},attrs:function(a){for(var b in a)a.hasOwnProperty(b)&&(void 0===a[b]?this.node.removeAttribute(b):this.node.setAttribute(b,a[b]));return this},c:function(a,b,c){var d=h.xmlElement(a,b,c);return this.node.appendChild(d),"string"!=typeof c&&(this.node=d),this},cnode:function(a){var b,c=h.xmlGenerator();try{b=void 0!==c.importNode}catch(d){b=!1}var e=b?c.importNode(a,!0):h.copyElement(a);return this.node.appendChild(e),this.node=e,this},t:function(a){var b=h.xmlTextNode(a);return this.node.appendChild(b),this},h:function(a){var b=document.createElement("body");b.innerHTML=a;for(var c=h.createHtml(b);c.childNodes.length>0;)this.node.appendChild(c.childNodes[0]);return this}},h.Handler=function(a,b,c,d,e,f,g){this.handler=a,this.ns=b,this.name=c,this.type=d,this.id=e,this.options=g||{matchBare:!1},this.options.matchBare||(this.options.matchBare=!1),this.options.matchBare?this.from=f?h.getBareJidFromJid(f):null:this.from=f,this.user=!0},h.Handler.prototype={isMatch:function(a){var b,c=null;if(c=this.options.matchBare?h.getBareJidFromJid(a.getAttribute("from")):a.getAttribute("from"),b=!1,this.ns){var d=this;h.forEachChild(a,null,function(a){a.getAttribute("xmlns")==d.ns&&(b=!0)}),b=b||a.getAttribute("xmlns")==this.ns}else b=!0;var e=a.getAttribute("type");return!b||this.name&&!h.isTagEqual(a,this.name)||this.type&&(Array.isArray(this.type)?-1==this.type.indexOf(e):e!=this.type)||this.id&&a.getAttribute("id")!=this.id||this.from&&c!=this.from?!1:!0},run:function(a){var b=null;try{b=this.handler(a)}catch(c){throw c.sourceURL?h.fatal("error: "+this.handler+" "+c.sourceURL+":"+c.line+" - "+c.name+": "+c.message):c.fileName?("undefined"!=typeof console&&(console.trace(),console.error(this.handler," - error - ",c,c.message)),h.fatal("error: "+this.handler+" "+c.fileName+":"+c.lineNumber+" - "+c.name+": "+c.message)):h.fatal("error: "+c.message+"\n"+c.stack),c}return b},toString:function(){return"{Handler: "+this.handler+"("+this.name+","+this.id+","+this.ns+")}"}},h.TimedHandler=function(a,b){this.period=a,this.handler=b,this.lastCalled=(new Date).getTime(),this.user=!0},h.TimedHandler.prototype={run:function(){return this.lastCalled=(new Date).getTime(),this.handler()},reset:function(){this.lastCalled=(new Date).getTime()},toString:function(){return"{TimedHandler: "+this.handler+"("+this.period+")}"}},h.Connection=function(a,b){this.service=a,this.options=b||{};var c=this.options.protocol||"";0===a.indexOf("ws:")||0===a.indexOf("wss:")||0===c.indexOf("ws")?this._proto=new h.Websocket(this):this._proto=new h.Bosh(this),this.jid="",this.domain=null,this.features=null,this._sasl_data={},this.do_session=!1,this.do_bind=!1,this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this._authentication={},this._idleTimeout=null,this._disconnectTimeout=null,this.authenticated=!1,this.connected=!1,this.disconnecting=!1,this.do_authentication=!0,this.paused=!1,this.restored=!1,this._data=[],this._uniqueId=0,this._sasl_success_handler=null,this._sasl_failure_handler=null,this._sasl_challenge_handler=null,this.maxRetries=5,this._idleTimeout=setTimeout(this._onIdle.bind(this),100);for(var d in h._connectionPlugins)if(h._connectionPlugins.hasOwnProperty(d)){var e=h._connectionPlugins[d],f=function(){};f.prototype=e,this[d]=new f,this[d].init(this)}},h.Connection.prototype={reset:function(){this._proto._reset(),this.do_session=!1,this.do_bind=!1,this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this._authentication={},this.authenticated=!1,this.connected=!1,this.disconnecting=!1,this.restored=!1,this._data=[],this._requests=[],this._uniqueId=0},pause:function(){this.paused=!0},resume:function(){this.paused=!1},getUniqueId:function(a){return"string"==typeof a||"number"==typeof a?++this._uniqueId+":"+a:++this._uniqueId+""},connect:function(a,b,c,d,e,f,g){this.jid=a,this.authzid=h.getBareJidFromJid(this.jid),this.authcid=g||h.getNodeFromJid(this.jid),this.pass=b,this.servtype="xmpp",this.connect_callback=c,this.disconnecting=!1,this.connected=!1,this.authenticated=!1,this.restored=!1,this.domain=h.getDomainFromJid(this.jid),this._changeConnectStatus(h.Status.CONNECTING,null),this._proto._connect(d,e,f)},attach:function(a,b,c,d,e,f,g){if(!(this._proto instanceof h.Bosh))throw{name:"StropheSessionError",message:'The "attach" method can only be used with a BOSH connection.'};this._proto._attach(a,b,c,d,e,f,g)},restore:function(a,b,c,d,e){if(!this._sessionCachingSupported())throw{name:"StropheSessionError",message:'The "restore" method can only be used with a BOSH connection.'};this._proto._restore(a,b,c,d,e)},_sessionCachingSupported:function(){if(this._proto instanceof h.Bosh){if(!JSON)return!1;try{window.sessionStorage.setItem("_strophe_","_strophe_"),window.sessionStorage.removeItem("_strophe_")}catch(a){return!1}return!0}return!1},xmlInput:function(a){},xmlOutput:function(a){},rawInput:function(a){},rawOutput:function(a){},send:function(a){if(null!==a){if("function"==typeof a.sort)for(var b=0;b<a.length;b++)this._queueData(a[b]);else this._queueData("function"==typeof a.tree?a.tree():a);this._proto._send()}},flush:function(){clearTimeout(this._idleTimeout),this._onIdle()},sendIQ:function(a,b,c,d){var e=null,f=this;"function"==typeof a.tree&&(a=a.tree());var g=a.getAttribute("id");g||(g=this.getUniqueId("sendIQ"),a.setAttribute("id",g));var i=a.getAttribute("to"),j=this.jid,k=this.addHandler(function(a){e&&f.deleteTimedHandler(e);var d=!1,g=a.getAttribute("from");if((g===i||null===i&&(g===h.getBareJidFromJid(j)||g===h.getDomainFromJid(j)||g===j))&&(d=!0),!d)throw{name:"StropheError",message:"Got answer to IQ from wrong jid:"+g+"\nExpected jid: "+i};var k=a.getAttribute("type");if("result"==k)b&&b(a);else{if("error"!=k)throw{name:"StropheError",message:"Got bad IQ type of "+k};c&&c(a)}},null,"iq",["error","result"],g);return d&&(e=this.addTimedHandler(d,function(){return f.deleteHandler(k),c&&c(null),!1})),this.send(a),g},_queueData:function(a){if(null===a||!a.tagName||!a.childNodes)throw{name:"StropheError",message:"Cannot queue non-DOMElement."};this._data.push(a)},_sendRestart:function(){this._data.push("restart"),this._proto._sendRestart(),this._idleTimeout=setTimeout(this._onIdle.bind(this),100)},addTimedHandler:function(a,b){var c=new h.TimedHandler(a,b);return this.addTimeds.push(c),c},deleteTimedHandler:function(a){this.removeTimeds.push(a)},addHandler:function(a,b,c,d,e,f,g){var i=new h.Handler(a,b,c,d,e,f,g);return this.addHandlers.push(i),i},deleteHandler:function(a){this.removeHandlers.push(a);var b=this.addHandlers.indexOf(a);b>=0&&this.addHandlers.splice(b,1)},disconnect:function(a){if(this._changeConnectStatus(h.Status.DISCONNECTING,a),h.info("Disconnect was called because: "+a),this.connected){var b=!1;this.disconnecting=!0,this.authenticated&&(b=g({xmlns:h.NS.CLIENT,type:"unavailable"})),this._disconnectTimeout=this._addSysTimedHandler(3e3,this._onDisconnectTimeout.bind(this)),this._proto._disconnect(b)}else h.info("Disconnect was called before Strophe connected to the server"),this._proto._abortAllRequests()},_changeConnectStatus:function(a,b){for(var c in h._connectionPlugins)if(h._connectionPlugins.hasOwnProperty(c)){var d=this[c];if(d.statusChanged)try{d.statusChanged(a,b)}catch(e){h.error(""+c+" plugin caused an exception changing status: "+e)}}if(this.connect_callback)try{this.connect_callback(a,b)}catch(f){h.error("User connection callback caused an exception: "+f)}},_doDisconnect:function(a){"number"==typeof this._idleTimeout&&clearTimeout(this._idleTimeout),null!==this._disconnectTimeout&&(this.deleteTimedHandler(this._disconnectTimeout),this._disconnectTimeout=null),h.info("_doDisconnect was called"),this._proto._doDisconnect(),this.authenticated=!1,this.disconnecting=!1,this.restored=!1,this.handlers=[],this.timedHandlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this._changeConnectStatus(h.Status.DISCONNECTED,a),this.connected=!1},_dataRecv:function(a,b){h.info("_dataRecv called");var c=this._proto._reqToData(a);if(null!==c){this.xmlInput!==h.Connection.prototype.xmlInput&&this.xmlInput(c.nodeName===this._proto.strip&&c.childNodes.length?c.childNodes[0]:c),this.rawInput!==h.Connection.prototype.rawInput&&this.rawInput(b?b:h.serialize(c));for(var d,e;this.removeHandlers.length>0;)e=this.removeHandlers.pop(),d=this.handlers.indexOf(e),d>=0&&this.handlers.splice(d,1);for(;this.addHandlers.length>0;)this.handlers.push(this.addHandlers.pop());if(this.disconnecting&&this._proto._emptyQueue())return void this._doDisconnect();var f,g,i=c.getAttribute("type");if(null!==i&&"terminate"==i){if(this.disconnecting)return;return f=c.getAttribute("condition"),g=c.getElementsByTagName("conflict"),null!==f?("remote-stream-error"==f&&g.length>0&&(f="conflict"),this._changeConnectStatus(h.Status.CONNFAIL,f)):this._changeConnectStatus(h.Status.CONNFAIL,"unknown"),void this._doDisconnect(f)}var j=this;h.forEachChild(c,null,function(a){var b,c;for(c=j.handlers,j.handlers=[],b=0;b<c.length;b++){var d=c[b];try{!d.isMatch(a)||!j.authenticated&&d.user?j.handlers.push(d):d.run(a)&&j.handlers.push(d)}catch(e){h.warn("Removing Strophe handlers due to uncaught exception: "+e.message)}}})}},mechanisms:{},_connect_cb:function(a,b,c){h.info("_connect_cb was called"),this.connected=!0;var d=this._proto._reqToData(a);if(d){this.xmlInput!==h.Connection.prototype.xmlInput&&this.xmlInput(d.nodeName===this._proto.strip&&d.childNodes.length?d.childNodes[0]:d),this.rawInput!==h.Connection.prototype.rawInput&&this.rawInput(c?c:h.serialize(d));var e=this._proto._connect_cb(d);if(e!==h.Status.CONNFAIL){this._authentication.sasl_scram_sha1=!1,this._authentication.sasl_plain=!1,this._authentication.sasl_digest_md5=!1,this._authentication.sasl_anonymous=!1,this._authentication.legacy_auth=!1;var f;f=d.getElementsByTagNameNS?d.getElementsByTagNameNS(h.NS.STREAM,"features").length>0:d.getElementsByTagName("stream:features").length>0||d.getElementsByTagName("features").length>0;var g,i,j=d.getElementsByTagName("mechanism"),k=[],l=!1;if(!f)return void this._proto._no_auth_received(b);if(j.length>0)for(g=0;g<j.length;g++)i=h.getText(j[g]),this.mechanisms[i]&&k.push(this.mechanisms[i]);return this._authentication.legacy_auth=d.getElementsByTagName("auth").length>0,(l=this._authentication.legacy_auth||k.length>0)?void(this.do_authentication!==!1&&this.authenticate(k)):void this._proto._no_auth_received(b)}}},authenticate:function(a){var c;for(c=0;c<a.length-1;++c){for(var e=c,g=c+1;g<a.length;++g)a[g].prototype.priority>a[e].prototype.priority&&(e=g);if(e!=c){var i=a[c];a[c]=a[e],a[e]=i}}var j=!1;for(c=0;c<a.length;++c)if(a[c].test(this)){this._sasl_success_handler=this._addSysHandler(this._sasl_success_cb.bind(this),null,"success",null,null),this._sasl_failure_handler=this._addSysHandler(this._sasl_failure_cb.bind(this),null,"failure",null,null),this._sasl_challenge_handler=this._addSysHandler(this._sasl_challenge_cb.bind(this),null,"challenge",null,null),this._sasl_mechanism=new a[c],this._sasl_mechanism.onStart(this);var k=d("auth",{xmlns:h.NS.SASL,mechanism:this._sasl_mechanism.name});if(this._sasl_mechanism.isClientFirst){var l=this._sasl_mechanism.onChallenge(this,null);k.t(b.encode(l))}this.send(k.tree()),j=!0;break}j||(null===h.getNodeFromJid(this.jid)?(this._changeConnectStatus(h.Status.CONNFAIL,"x-strophe-bad-non-anon-jid"),this.disconnect("x-strophe-bad-non-anon-jid")):(this._changeConnectStatus(h.Status.AUTHENTICATING,null),this._addSysHandler(this._auth1_cb.bind(this),null,null,null,"_auth_1"),this.send(f({type:"get",to:this.domain,id:"_auth_1"}).c("query",{xmlns:h.NS.AUTH}).c("username",{}).t(h.getNodeFromJid(this.jid)).tree())))},_sasl_challenge_cb:function(a){var c=b.decode(h.getText(a)),e=this._sasl_mechanism.onChallenge(this,c),f=d("response",{xmlns:h.NS.SASL});return""!==e&&f.t(b.encode(e)),this.send(f.tree()),!0},_auth1_cb:function(a){var b=f({type:"set",id:"_auth_2"}).c("query",{xmlns:h.NS.AUTH}).c("username",{}).t(h.getNodeFromJid(this.jid)).up().c("password").t(this.pass);return h.getResourceFromJid(this.jid)||(this.jid=h.getBareJidFromJid(this.jid)+"/strophe"),b.up().c("resource",{}).t(h.getResourceFromJid(this.jid)),this._addSysHandler(this._auth2_cb.bind(this),null,null,null,"_auth_2"),this.send(b.tree()),!1},_sasl_success_cb:function(a){if(this._sasl_data["server-signature"]){var c,d=b.decode(h.getText(a)),e=/([a-z]+)=([^,]+)(,|$)/,f=d.match(e);if("v"==f[1]&&(c=f[2]),c!=this._sasl_data["server-signature"])return this.deleteHandler(this._sasl_failure_handler),this._sasl_failure_handler=null,this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null),this._sasl_data={},this._sasl_failure_cb(null)}h.info("SASL authentication succeeded."),this._sasl_mechanism&&this._sasl_mechanism.onSuccess(),this.deleteHandler(this._sasl_failure_handler),this._sasl_failure_handler=null,this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null);var g=[],i=function(a,b){for(;a.length;)this.deleteHandler(a.pop());return this._sasl_auth1_cb.bind(this)(b),!1};return g.push(this._addSysHandler(function(a){i.bind(this)(g,a)}.bind(this),null,"stream:features",null,null)),g.push(this._addSysHandler(function(a){i.bind(this)(g,a)}.bind(this),h.NS.STREAM,"features",null,null)),this._sendRestart(),!1},_sasl_auth1_cb:function(a){this.features=a;var b,c;for(b=0;b<a.childNodes.length;b++)c=a.childNodes[b],"bind"==c.nodeName&&(this.do_bind=!0),"session"==c.nodeName&&(this.do_session=!0);if(!this.do_bind)return this._changeConnectStatus(h.Status.AUTHFAIL,null),!1;this._addSysHandler(this._sasl_bind_cb.bind(this),null,null,null,"_bind_auth_2");var d=h.getResourceFromJid(this.jid);return this.send(d?f({type:"set",id:"_bind_auth_2"}).c("bind",{xmlns:h.NS.BIND}).c("resource",{}).t(d).tree():f({type:"set",id:"_bind_auth_2"}).c("bind",{xmlns:h.NS.BIND}).tree()),!1},_sasl_bind_cb:function(a){if("error"==a.getAttribute("type")){h.info("SASL binding failed.");var b,c=a.getElementsByTagName("conflict");return c.length>0&&(b="conflict"),this._changeConnectStatus(h.Status.AUTHFAIL,b),!1}var d,e=a.getElementsByTagName("bind");return e.length>0?(d=e[0].getElementsByTagName("jid"),void(d.length>0&&(this.jid=h.getText(d[0]),this.do_session?(this._addSysHandler(this._sasl_session_cb.bind(this),null,null,null,"_session_auth_2"),this.send(f({type:"set",id:"_session_auth_2"}).c("session",{xmlns:h.NS.SESSION}).tree())):(this.authenticated=!0,this._changeConnectStatus(h.Status.CONNECTED,null))))):(h.info("SASL binding failed."),this._changeConnectStatus(h.Status.AUTHFAIL,null),!1)},_sasl_session_cb:function(a){if("result"==a.getAttribute("type"))this.authenticated=!0,this._changeConnectStatus(h.Status.CONNECTED,null);else if("error"==a.getAttribute("type"))return h.info("Session creation failed."),this._changeConnectStatus(h.Status.AUTHFAIL,null),!1;return!1},_sasl_failure_cb:function(a){return this._sasl_success_handler&&(this.deleteHandler(this._sasl_success_handler),this._sasl_success_handler=null),this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null),this._sasl_mechanism&&this._sasl_mechanism.onFailure(),this._changeConnectStatus(h.Status.AUTHFAIL,null),!1},_auth2_cb:function(a){return"result"==a.getAttribute("type")?(this.authenticated=!0,this._changeConnectStatus(h.Status.CONNECTED,null)):"error"==a.getAttribute("type")&&(this._changeConnectStatus(h.Status.AUTHFAIL,null),this.disconnect("authentication failed")),!1},_addSysTimedHandler:function(a,b){var c=new h.TimedHandler(a,b);return c.user=!1,this.addTimeds.push(c),c},_addSysHandler:function(a,b,c,d,e){var f=new h.Handler(a,b,c,d,e);return f.user=!1,this.addHandlers.push(f),f},_onDisconnectTimeout:function(){return h.info("_onDisconnectTimeout was called"),this._proto._onDisconnectTimeout(),this._doDisconnect(),!1},_onIdle:function(){for(var a,b,c,d;this.addTimeds.length>0;)this.timedHandlers.push(this.addTimeds.pop());for(;this.removeTimeds.length>0;)b=this.removeTimeds.pop(),a=this.timedHandlers.indexOf(b),a>=0&&this.timedHandlers.splice(a,1);var e=(new Date).getTime();for(d=[],a=0;a<this.timedHandlers.length;a++)b=this.timedHandlers[a],(this.authenticated||!b.user)&&(c=b.lastCalled+b.period,0>=c-e?b.run()&&d.push(b):d.push(b));this.timedHandlers=d,clearTimeout(this._idleTimeout),this._proto._onIdle(),this.connected&&(this._idleTimeout=setTimeout(this._onIdle.bind(this),100))}},h.SASLMechanism=function(a,b,c){this.name=a,this.isClientFirst=b,
this.priority=c},h.SASLMechanism.prototype={test:function(a){return!0},onStart:function(a){this._connection=a},onChallenge:function(a,b){throw new Error("You should implement challenge handling!")},onFailure:function(){this._connection=null},onSuccess:function(){this._connection=null}},h.SASLAnonymous=function(){},h.SASLAnonymous.prototype=new h.SASLMechanism("ANONYMOUS",!1,10),h.SASLAnonymous.test=function(a){return null===a.authcid},h.Connection.prototype.mechanisms[h.SASLAnonymous.prototype.name]=h.SASLAnonymous,h.SASLPlain=function(){},h.SASLPlain.prototype=new h.SASLMechanism("PLAIN",!0,20),h.SASLPlain.test=function(a){return null!==a.authcid},h.SASLPlain.prototype.onChallenge=function(a){var b=a.authzid;return b+="\x00",b+=a.authcid,b+="\x00",b+=a.pass},h.Connection.prototype.mechanisms[h.SASLPlain.prototype.name]=h.SASLPlain,h.SASLSHA1=function(){},h.SASLSHA1.prototype=new h.SASLMechanism("SCRAM-SHA-1",!0,40),h.SASLSHA1.test=function(a){return null!==a.authcid},h.SASLSHA1.prototype.onChallenge=function(d,e,f){var g=f||c.hexdigest(1234567890*Math.random()),h="n="+d.authcid;return h+=",r=",h+=g,d._sasl_data.cnonce=g,d._sasl_data["client-first-message-bare"]=h,h="n,,"+h,this.onChallenge=function(c,d){for(var e,f,g,h,i,j,k,l,m,n,o,p="c=biws,",q=c._sasl_data["client-first-message-bare"]+","+d+",",r=c._sasl_data.cnonce,s=/([a-z]+)=([^,]+)(,|$)/;d.match(s);){var t=d.match(s);switch(d=d.replace(t[0],""),t[1]){case"r":e=t[2];break;case"s":f=t[2];break;case"i":g=t[2]}}if(e.substr(0,r.length)!==r)return c._sasl_data={},c._sasl_failure_cb();for(p+="r="+e,q+=p,f=b.decode(f),f+="\x00\x00\x00",h=j=a.core_hmac_sha1(c.pass,f),k=1;g>k;k++){for(i=a.core_hmac_sha1(c.pass,a.binb2str(j)),l=0;5>l;l++)h[l]^=i[l];j=i}for(h=a.binb2str(h),m=a.core_hmac_sha1(h,"Client Key"),n=a.str_hmac_sha1(h,"Server Key"),o=a.core_hmac_sha1(a.str_sha1(a.binb2str(m)),q),c._sasl_data["server-signature"]=a.b64_hmac_sha1(n,q),l=0;5>l;l++)m[l]^=o[l];return p+=",p="+b.encode(a.binb2str(m))}.bind(this),h},h.Connection.prototype.mechanisms[h.SASLSHA1.prototype.name]=h.SASLSHA1,h.SASLMD5=function(){},h.SASLMD5.prototype=new h.SASLMechanism("DIGEST-MD5",!1,30),h.SASLMD5.test=function(a){return null!==a.authcid},h.SASLMD5.prototype._quote=function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'},h.SASLMD5.prototype.onChallenge=function(a,b,d){for(var e,f=/([a-z]+)=("[^"]+"|[^,"]+)(?:,|$)/,g=d||c.hexdigest(""+1234567890*Math.random()),h="",i=null,j="",k="";b.match(f);)switch(e=b.match(f),b=b.replace(e[0],""),e[2]=e[2].replace(/^"(.+)"$/,"$1"),e[1]){case"realm":h=e[2];break;case"nonce":j=e[2];break;case"qop":k=e[2];break;case"host":i=e[2]}var l=a.servtype+"/"+a.domain;null!==i&&(l=l+"/"+i);var m=c.hash(a.authcid+":"+h+":"+this._connection.pass)+":"+j+":"+g,n="AUTHENTICATE:"+l,o="";return o+="charset=utf-8,",o+="username="+this._quote(a.authcid)+",",o+="realm="+this._quote(h)+",",o+="nonce="+this._quote(j)+",",o+="nc=00000001,",o+="cnonce="+this._quote(g)+",",o+="digest-uri="+this._quote(l)+",",o+="response="+c.hexdigest(c.hexdigest(m)+":"+j+":00000001:"+g+":auth:"+c.hexdigest(n))+",",o+="qop=auth",this.onChallenge=function(){return""}.bind(this),o},h.Connection.prototype.mechanisms[h.SASLMD5.prototype.name]=h.SASLMD5,{Strophe:h,$build:d,$msg:e,$iq:f,$pres:g,SHA1:a,Base64:b,MD5:c}}),function(a,b){return"function"==typeof define&&define.amd?void define("strophe-bosh",["strophe-core"],function(a){return b(a.Strophe,a.$build)}):b(Strophe,$build)}(this,function(a,b){return a.Request=function(b,c,d,e){this.id=++a._requestId,this.xmlData=b,this.data=a.serialize(b),this.origFunc=c,this.func=c,this.rid=d,this.date=0/0,this.sends=e||0,this.abort=!1,this.dead=null,this.age=function(){if(!this.date)return 0;var a=new Date;return(a-this.date)/1e3},this.timeDead=function(){if(!this.dead)return 0;var a=new Date;return(a-this.dead)/1e3},this.xhr=this._newXHR()},a.Request.prototype={getResponse:function(){var b=null;if(this.xhr.responseXML&&this.xhr.responseXML.documentElement){if(b=this.xhr.responseXML.documentElement,"parsererror"==b.tagName)throw a.error("invalid response received"),a.error("responseText: "+this.xhr.responseText),a.error("responseXML: "+a.serialize(this.xhr.responseXML)),"parsererror"}else this.xhr.responseText&&(a.error("invalid response received"),a.error("responseText: "+this.xhr.responseText),a.error("responseXML: "+a.serialize(this.xhr.responseXML)));return b},_newXHR:function(){var a=null;return window.XMLHttpRequest?(a=new XMLHttpRequest,a.overrideMimeType&&a.overrideMimeType("text/xml; charset=utf-8")):window.ActiveXObject&&(a=new ActiveXObject("Microsoft.XMLHTTP")),a.onreadystatechange=this.func.bind(null,this),a}},a.Bosh=function(a){this._conn=a,this.rid=Math.floor(4294967295*Math.random()),this.sid=null,this.hold=1,this.wait=60,this.window=5,this.errors=0,this._requests=[]},a.Bosh.prototype={strip:null,_buildBody:function(){var c=b("body",{rid:this.rid++,xmlns:a.NS.HTTPBIND});return null!==this.sid&&c.attrs({sid:this.sid}),this._conn.options.keepalive&&this._cacheSession(),c},_reset:function(){this.rid=Math.floor(4294967295*Math.random()),this.sid=null,this.errors=0,window.sessionStorage.removeItem("strophe-bosh-session")},_connect:function(b,c,d){this.wait=b||this.wait,this.hold=c||this.hold,this.errors=0;var e=this._buildBody().attrs({to:this._conn.domain,"xml:lang":"en",wait:this.wait,hold:this.hold,content:"text/xml; charset=utf-8",ver:"1.6","xmpp:version":"1.0","xmlns:xmpp":a.NS.BOSH});d&&e.attrs({route:d});var f=this._conn._connect_cb;this._requests.push(new a.Request(e.tree(),this._onRequestStateChange.bind(this,f.bind(this._conn)),e.tree().getAttribute("rid"))),this._throttledRequestHandler()},_attach:function(b,c,d,e,f,g,h){this._conn.jid=b,this.sid=c,this.rid=d,this._conn.connect_callback=e,this._conn.domain=a.getDomainFromJid(this._conn.jid),this._conn.authenticated=!0,this._conn.connected=!0,this.wait=f||this.wait,this.hold=g||this.hold,this.window=h||this.window,this._conn._changeConnectStatus(a.Status.ATTACHED,null)},_restore:function(b,c,d,e,f){var g=JSON.parse(window.sessionStorage.getItem("strophe-bosh-session"));if(!("undefined"!=typeof g&&null!==g&&g.rid&&g.sid&&g.jid)||"undefined"!=typeof b&&a.getBareJidFromJid(g.jid)!=a.getBareJidFromJid(b))throw{name:"StropheSessionError",message:"_restore: no restoreable session."};this._conn.restored=!0,this._attach(g.jid,g.sid,g.rid,c,d,e,f)},_cacheSession:function(){this._conn.authenticated?this._conn.jid&&this.rid&&this.sid&&window.sessionStorage.setItem("strophe-bosh-session",JSON.stringify({jid:this._conn.jid,rid:this.rid,sid:this.sid})):window.sessionStorage.removeItem("strophe-bosh-session")},_connect_cb:function(b){var c,d,e=b.getAttribute("type");if(null!==e&&"terminate"==e)return c=b.getAttribute("condition"),a.error("BOSH-Connection failed: "+c),d=b.getElementsByTagName("conflict"),null!==c?("remote-stream-error"==c&&d.length>0&&(c="conflict"),this._conn._changeConnectStatus(a.Status.CONNFAIL,c)):this._conn._changeConnectStatus(a.Status.CONNFAIL,"unknown"),this._conn._doDisconnect(c),a.Status.CONNFAIL;this.sid||(this.sid=b.getAttribute("sid"));var f=b.getAttribute("requests");f&&(this.window=parseInt(f,10));var g=b.getAttribute("hold");g&&(this.hold=parseInt(g,10));var h=b.getAttribute("wait");h&&(this.wait=parseInt(h,10))},_disconnect:function(a){this._sendTerminate(a)},_doDisconnect:function(){this.sid=null,this.rid=Math.floor(4294967295*Math.random()),window.sessionStorage.removeItem("strophe-bosh-session")},_emptyQueue:function(){return 0===this._requests.length},_hitError:function(b){this.errors++,a.warn("request errored, status: "+b+", number of errors: "+this.errors),this.errors>4&&this._conn._onDisconnectTimeout()},_no_auth_received:function(b){b=b?b.bind(this._conn):this._conn._connect_cb.bind(this._conn);var c=this._buildBody();this._requests.push(new a.Request(c.tree(),this._onRequestStateChange.bind(this,b.bind(this._conn)),c.tree().getAttribute("rid"))),this._throttledRequestHandler()},_onDisconnectTimeout:function(){this._abortAllRequests()},_abortAllRequests:function(){for(var a;this._requests.length>0;)a=this._requests.pop(),a.abort=!0,a.xhr.abort(),a.xhr.onreadystatechange=function(){}},_onIdle:function(){var b=this._conn._data;if(this._conn.authenticated&&0===this._requests.length&&0===b.length&&!this._conn.disconnecting&&(a.info("no requests during idle cycle, sending blank request"),b.push(null)),!this._conn.paused){if(this._requests.length<2&&b.length>0){for(var c=this._buildBody(),d=0;d<b.length;d++)null!==b[d]&&("restart"===b[d]?c.attrs({to:this._conn.domain,"xml:lang":"en","xmpp:restart":"true","xmlns:xmpp":a.NS.BOSH}):c.cnode(b[d]).up());delete this._conn._data,this._conn._data=[],this._requests.push(new a.Request(c.tree(),this._onRequestStateChange.bind(this,this._conn._dataRecv.bind(this._conn)),c.tree().getAttribute("rid"))),this._throttledRequestHandler()}if(this._requests.length>0){var e=this._requests[0].age();null!==this._requests[0].dead&&this._requests[0].timeDead()>Math.floor(a.SECONDARY_TIMEOUT*this.wait)&&this._throttledRequestHandler(),e>Math.floor(a.TIMEOUT*this.wait)&&(a.warn("Request "+this._requests[0].id+" timed out, over "+Math.floor(a.TIMEOUT*this.wait)+" seconds since last activity"),this._throttledRequestHandler())}}},_onRequestStateChange:function(b,c){if(a.debug("request id "+c.id+"."+c.sends+" state changed to "+c.xhr.readyState),c.abort)return void(c.abort=!1);var d;if(4==c.xhr.readyState){d=0;try{d=c.xhr.status}catch(e){}if("undefined"==typeof d&&(d=0),this.disconnecting&&d>=400)return void this._hitError(d);var f=this._requests[0]==c,g=this._requests[1]==c;(d>0&&500>d||c.sends>5)&&(this._removeRequest(c),a.debug("request id "+c.id+" should now be removed")),200==d?((g||f&&this._requests.length>0&&this._requests[0].age()>Math.floor(a.SECONDARY_TIMEOUT*this.wait))&&this._restartRequest(0),a.debug("request id "+c.id+"."+c.sends+" got 200"),b(c),this.errors=0):(a.error("request id "+c.id+"."+c.sends+" error "+d+" happened"),(0===d||d>=400&&600>d||d>=12e3)&&(this._hitError(d),d>=400&&500>d&&(this._conn._changeConnectStatus(a.Status.DISCONNECTING,null),this._conn._doDisconnect()))),d>0&&500>d||c.sends>5||this._throttledRequestHandler()}},_processRequest:function(b){var c=this,d=this._requests[b],e=-1;try{4==d.xhr.readyState&&(e=d.xhr.status)}catch(f){a.error("caught an error in _requests["+b+"], reqStatus: "+e)}if("undefined"==typeof e&&(e=-1),d.sends>this._conn.maxRetries)return void this._conn._onDisconnectTimeout();var g=d.age(),h=!isNaN(g)&&g>Math.floor(a.TIMEOUT*this.wait),i=null!==d.dead&&d.timeDead()>Math.floor(a.SECONDARY_TIMEOUT*this.wait),j=4==d.xhr.readyState&&(1>e||e>=500);if((h||i||j)&&(i&&a.error("Request "+this._requests[b].id+" timed out (secondary), restarting"),d.abort=!0,d.xhr.abort(),d.xhr.onreadystatechange=function(){},this._requests[b]=new a.Request(d.xmlData,d.origFunc,d.rid,d.sends),d=this._requests[b]),0===d.xhr.readyState){a.debug("request id "+d.id+"."+d.sends+" posting");try{d.xhr.open("POST",this._conn.service,this._conn.options.sync?!1:!0),d.xhr.setRequestHeader("Content-Type","text/xml; charset=utf-8")}catch(k){return a.error("XHR open failed."),this._conn.connected||this._conn._changeConnectStatus(a.Status.CONNFAIL,"bad-service"),void this._conn.disconnect()}var l=function(){if(d.date=new Date,c._conn.options.customHeaders){var a=c._conn.options.customHeaders;for(var b in a)a.hasOwnProperty(b)&&d.xhr.setRequestHeader(b,a[b])}d.xhr.send(d.data)};if(d.sends>1){var m=1e3*Math.min(Math.floor(a.TIMEOUT*this.wait),Math.pow(d.sends,3));setTimeout(l,m)}else l();d.sends++,this._conn.xmlOutput!==a.Connection.prototype.xmlOutput&&this._conn.xmlOutput(d.xmlData.nodeName===this.strip&&d.xmlData.childNodes.length?d.xmlData.childNodes[0]:d.xmlData),this._conn.rawOutput!==a.Connection.prototype.rawOutput&&this._conn.rawOutput(d.data)}else a.debug("_processRequest: "+(0===b?"first":"second")+" request has readyState of "+d.xhr.readyState)},_removeRequest:function(b){a.debug("removing request");var c;for(c=this._requests.length-1;c>=0;c--)b==this._requests[c]&&this._requests.splice(c,1);b.xhr.onreadystatechange=function(){},this._throttledRequestHandler()},_restartRequest:function(a){var b=this._requests[a];null===b.dead&&(b.dead=new Date),this._processRequest(a)},_reqToData:function(a){try{return a.getResponse()}catch(b){if("parsererror"!=b)throw b;this._conn.disconnect("strophe-parsererror")}},_sendTerminate:function(b){a.info("_sendTerminate was called");var c=this._buildBody().attrs({type:"terminate"});b&&c.cnode(b.tree());var d=new a.Request(c.tree(),this._onRequestStateChange.bind(this,this._conn._dataRecv.bind(this._conn)),c.tree().getAttribute("rid"));this._requests.push(d),this._throttledRequestHandler()},_send:function(){clearTimeout(this._conn._idleTimeout),this._throttledRequestHandler(),this._conn._idleTimeout=setTimeout(this._conn._onIdle.bind(this._conn),100)},_sendRestart:function(){this._throttledRequestHandler(),clearTimeout(this._conn._idleTimeout)},_throttledRequestHandler:function(){a.debug(this._requests?"_throttledRequestHandler called with "+this._requests.length+" requests":"_throttledRequestHandler called with undefined requests"),this._requests&&0!==this._requests.length&&(this._requests.length>0&&this._processRequest(0),this._requests.length>1&&Math.abs(this._requests[0].rid-this._requests[1].rid)<this.window&&this._processRequest(1))}},a}),function(a,b){return"function"==typeof define&&define.amd?void define("strophe-websocket",["strophe-core"],function(a){return b(a.Strophe,a.$build)}):b(Strophe,$build)}(this,function(a,b){return a.Websocket=function(a){this._conn=a,this.strip="wrapper";var b=a.service;if(0!==b.indexOf("ws:")&&0!==b.indexOf("wss:")){var c="";c+="ws"===a.options.protocol&&"https:"!==window.location.protocol?"ws":"wss",c+="://"+window.location.host,c+=0!==b.indexOf("/")?window.location.pathname+b:b,a.service=c}},a.Websocket.prototype={_buildStream:function(){return b("open",{xmlns:a.NS.FRAMING,to:this._conn.domain,version:"1.0"})},_check_streamerror:function(b,c){var d;if(d=b.getElementsByTagNameNS?b.getElementsByTagNameNS(a.NS.STREAM,"error"):b.getElementsByTagName("stream:error"),0===d.length)return!1;for(var e=d[0],f="",g="",h="urn:ietf:params:xml:ns:xmpp-streams",i=0;i<e.childNodes.length;i++){var j=e.childNodes[i];if(j.getAttribute("xmlns")!==h)break;"text"===j.nodeName?g=j.textContent:f=j.nodeName}var k="WebSocket stream error: ";return k+=f?f:"unknown",g&&(k+=" - "+f),a.error(k),this._conn._changeConnectStatus(c,f),this._conn._doDisconnect(),!0},_reset:function(){},_connect:function(){this._closeSocket(),this.socket=new WebSocket(this._conn.service,"xmpp"),this.socket.onopen=this._onOpen.bind(this),this.socket.onerror=this._onError.bind(this),this.socket.onclose=this._onClose.bind(this),this.socket.onmessage=this._connect_cb_wrapper.bind(this)},_connect_cb:function(b){var c=this._check_streamerror(b,a.Status.CONNFAIL);return c?a.Status.CONNFAIL:void 0},_handleStreamStart:function(b){var c=!1,d=b.getAttribute("xmlns");"string"!=typeof d?c="Missing xmlns in <open />":d!==a.NS.FRAMING&&(c="Wrong xmlns in <open />: "+d);var e=b.getAttribute("version");return"string"!=typeof e?c="Missing version in <open />":"1.0"!==e&&(c="Wrong version in <open />: "+e),c?(this._conn._changeConnectStatus(a.Status.CONNFAIL,c),this._conn._doDisconnect(),!1):!0},_connect_cb_wrapper:function(b){if(0===b.data.indexOf("<open ")||0===b.data.indexOf("<?xml")){var c=b.data.replace(/^(<\?.*?\?>\s*)*/,"");if(""===c)return;var d=(new DOMParser).parseFromString(c,"text/xml").documentElement;this._conn.xmlInput(d),this._conn.rawInput(b.data),this._handleStreamStart(d)&&this._connect_cb(d)}else if(0===b.data.indexOf("<close ")){this._conn.rawInput(b.data),this._conn.xmlInput(b);var e=b.getAttribute("see-other-uri");e?(this._conn._changeConnectStatus(a.Status.REDIRECT,"Received see-other-uri, resetting connection"),this._conn.reset(),this._conn.service=e,this._connect()):(this._conn._changeConnectStatus(a.Status.CONNFAIL,"Received closing stream"),this._conn._doDisconnect())}else{var f=this._streamWrap(b.data),g=(new DOMParser).parseFromString(f,"text/xml").documentElement;this.socket.onmessage=this._onMessage.bind(this),this._conn._connect_cb(g,null,b.data)}},_disconnect:function(c){if(this.socket&&this.socket.readyState!==WebSocket.CLOSED){c&&this._conn.send(c);var d=b("close",{xmlns:a.NS.FRAMING});this._conn.xmlOutput(d);var e=a.serialize(d);this._conn.rawOutput(e);try{this.socket.send(e)}catch(f){a.info("Couldn't send <close /> tag.")}}this._conn._doDisconnect()},_doDisconnect:function(){a.info("WebSockets _doDisconnect was called"),this._closeSocket()},_streamWrap:function(a){return"<wrapper>"+a+"</wrapper>"},_closeSocket:function(){if(this.socket)try{this.socket.close()}catch(a){}this.socket=null},_emptyQueue:function(){return!0},_onClose:function(){this._conn.connected&&!this._conn.disconnecting?(a.error("Websocket closed unexcectedly"),this._conn._doDisconnect()):a.info("Websocket closed")},_no_auth_received:function(b){a.error("Server did not send any auth methods"),this._conn._changeConnectStatus(a.Status.CONNFAIL,"Server did not send any auth methods"),b&&(b=b.bind(this._conn))(),this._conn._doDisconnect()},_onDisconnectTimeout:function(){},_abortAllRequests:function(){},_onError:function(b){a.error("Websocket error "+b),this._conn._changeConnectStatus(a.Status.CONNFAIL,"The WebSocket connection could not be established was disconnected."),this._disconnect()},_onIdle:function(){var b=this._conn._data;if(b.length>0&&!this._conn.paused){for(var c=0;c<b.length;c++)if(null!==b[c]){var d,e;d="restart"===b[c]?this._buildStream().tree():b[c],e=a.serialize(d),this._conn.xmlOutput(d),this._conn.rawOutput(e),this.socket.send(e)}this._conn._data=[]}},_onMessage:function(b){var c,d,e='<close xmlns="urn:ietf:params:xml:ns:xmpp-framing" />';if(b.data===e)return this._conn.rawInput(e),this._conn.xmlInput(b),void(this._conn.disconnecting||this._conn._doDisconnect());if(0===b.data.search("<open ")){if(c=(new DOMParser).parseFromString(b.data,"text/xml").documentElement,!this._handleStreamStart(c))return}else d=this._streamWrap(b.data),c=(new DOMParser).parseFromString(d,"text/xml").documentElement;return this._check_streamerror(c,a.Status.ERROR)?void 0:this._conn.disconnecting&&"presence"===c.firstChild.nodeName&&"unavailable"===c.firstChild.getAttribute("type")?(this._conn.xmlInput(c),void this._conn.rawInput(a.serialize(c))):void this._conn._dataRecv(c,b.data)},_onOpen:function(){a.info("Websocket open");var b=this._buildStream();this._conn.xmlOutput(b.tree());var c=a.serialize(b);this._conn.rawOutput(c),this.socket.send(c)},_reqToData:function(a){return a},_send:function(){this._conn.flush()},_sendRestart:function(){clearTimeout(this._conn._idleTimeout),this._conn._onIdle.bind(this._conn)()}},a}),a?a(Strophe,$build,$msg,$iq,$pres):void 0}(function(a,b,c,d,e){window.Strophe=a,window.$build=b,window.$msg=c,window.$iq=d,window.$pres=e});
\ No newline at end of file
<template>
<div id="app">
<router-view />
</div>
</template>
<script>
export default {
methods: {
onlineMethod() {
this.$notify({ title: '网络恢复正常', type: 'success' })
},
offlineMethod() {
this.$notify.error({ title: '网络连接异常' })
}
},
beforeMount() {
window.addEventListener('online', this.onlineMethod)
window.addEventListener('offline', this.offlineMethod)
},
beforeDestroy() {
window.removeEventListener('online', this.onlineMethod)
window.removeEventListener('offline', this.offlineMethod)
}
}
</script>
<style lang="scss">
@mixin cover {
width: 100%;
height: 100%;
}
html,
body {
@include cover;
padding: 0;
margin: 0;
}
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
@include cover;
}
#nav {
padding: 30px;
a {
font-weight: bold;
color: #2c3e50;
&.router-link-exact-active {
color: #42b983;
}
}
}
.el-main {
text-align: left;
}
a:focus,
a:active {
outline: none;
}
a,
a:focus,
a:hover {
cursor: pointer;
color: inherit;
text-decoration: none;
}
</style>
import request from '@/utils/request'
/**
* 7天业务量
* @param {*} data
*/
export function volumeCalls(data) {
return request({
url: '/chery/homepage/volumeCalls',
method: 'post',
data
})
}
/**
* 通话时长
* @param {*} data
*/
export function durationsCalls(data) {
return request({
url: '/chery/homepage/durationsCalls',
method: 'post',
data
})
}
import request from '@/utils/request'
/**
* 删除订单
*/
export function deleteOrder(data) {
return request({
url: '/chery/order/delete',
method: 'post',
data
})
}
/**
* 全部订单列表查询
*/
export function queryOrderList(data) {
return request({
url: '/chery/order/query/list',
method: 'post',
data
})
}
/**
* 全部订单列表查询
*/
export function queryMyOrderList(data) {
return request({
url: '/chery/order/query/mylist',
method: 'post',
data
})
}
/**
* 订单详情
*/
export function getOrderDetail(data) {
return request({
url: '/chery/order/detail/get',
method: 'post',
data
})
}
import request from '@/utils/request'
/**
* 创建合作商
* @param {*} data
*/
export function createPattern(data) {
return request({
url: '/chery/partner/create',
method: 'post',
data
})
}
/**
* 删除合作商
* @param {*} data
*/
export function deletePattern(data) {
return request({
url: '/chery/partner/delete',
method: 'post',
data
})
}
/**
* 查询合作商
* @param {*} data
*/
export function queryPattern(data) {
return request({
url: '/chery/partner/query',
method: 'post',
data
})
}
/**
* 合作商code是否存在
* @param {*} data
*/
export function validateCode(data) {
return request({
url: '/chery/partner/valid-code',
method: 'post',
data
})
}
/**
* 报表列表查询
* @param {*} data
*/
export function reportList(data) {
return request({
url: '/chery/order/report/list',
method: 'post',
data
})
}
/**
* 报表下载接口
* @param {*} data
*/
export function reportDownload(data) {
return request({
url: '/chery/order/report/download',
method: 'post',
responseType: 'blob',
data
})
}
import request from '@/utils/request'
/**
* tts开关
* @param {*} data
*/
export function ttsSwitch(data) {
return request({
url: '/chery/tts/option/switch',
method: 'post',
data
})
}
/**
* web查询话术结果
* @param {*} data
*/
export function getTtsResult(data) {
return request({
url: '/chery/tts/result',
method: 'post',
data
})
}
/**
* 保存tts
* @param {*} data
*/
export function saveTts(data) {
return request({
url: '/chery/tts/save',
method: 'post',
data
})
}
/**
* web查询话术配置
* @param {*} data
*/
export function getTtsTemplate(data) {
return request({
url: '/chery/tts/getTemplate',
method: 'post',
data
})
}
/**
* 查询tts是否开放
* @param {*} data
*/
export function getTtsStatus(data) {
return request({
url: '/chery/call/workTimeStatus',
method: 'post',
data
})
}
import request from '@/utils/request'
/**
* 登录
* @param {*} data
*/
export function login(data) {
return request({
url: '/chery/account/login',
method: 'post',
data
})
}
/**
* 登出
*/
export function logout() {
return request({
url: '/chery/account/logout',
method: 'post'
})
}
/**
* 注册
* @param {*} data
*/
export function registry(data) {
return request({
url: '/chery/account/registry',
method: 'post',
data
})
}
/**
* 重置密码
* @param {*} data
*/
export function resetPassword(data) {
return request({
url: '/chery/account/reset-password',
method: 'post',
data
})
}
/**
* 删除
* @param {*} data
*/
export function deleteUser(data) {
return request({
url: '/chery/account/delete',
method: 'post',
data
})
}
/**
* 禁用账号
* @param {*} data
*/
export function accountAvailable(data) {
return request({
url: '/chery/account/available',
method: 'post',
data
})
}
/**
* 账号列表查询
* @param {*} data
*/
export function accountList(data) {
return request({
url: '/chery/account/list',
method: 'post',
data
})
}
/**
* 验证工号是否已存在
* @param {*} data
*/
export function validUsername(data) {
return request({
url: '/chery/account/valid-username',
method: 'post',
data
})
}
/**
* 监控开启关闭
* @param {*} data
*/
export function switchMonitor(data) {
return request({
url: '/chery/account/switch-monitor',
method: 'post',
data
})
}
import request from '@/utils/request'
/**
* 确认接通
* @param {*} data
*/
export function callWebConfirm(data) {
return request({
url: '/chery/call/web/confirm',
method: 'post',
data
})
}
/**
* 挂断电话
* @param {*} data
*/
export function callWebDisconnect(data) {
return request({
url: '/chery/call/web/disconnect',
method: 'post',
data
})
}
/**
* 拨打电话
* @param {*} data
*/
export function callWebIn(data) {
return request({
url: '/chery/call/web/in',
method: 'post',
data
})
}
/**
* 创建订单
* @param {*} data
*/
export function createOrder(data) {
return request({
url: 'chery/order/create',
method: 'post',
data
})
}
/**
* 删除订单
* @param {*} data
*/
export function deleteOrder(data) {
return request({
url: '/chery/order-system/delete',
method: 'post',
data
})
}
/**
* web-推送消息到app
* @param {*} data
*/
export function notifyApp(data) {
return request({
url: '/chery/notify/app',
method: 'post',
data
})
}
/**
* 工作台未沟通/已沟通列表
* @param {*} data
*/
export function getCommunicationList(data) {
return request({
url: '/chery/order/web/list',
method: 'post',
data
})
}
/**
* WEB-获取排队列表
* @param {*} data
*/
export function getQueueQuery(data) {
return request({
url: '/chery/call/web/queue/query',
method: 'post',
data
})
}
/**
*WEB-查询订单信息
* @param {*} data
*/
export function getOrderInfo(data) {
return request({
url: '/chery/order/fetch/order-info',
method: 'post',
data
})
}
/**
* 二要素比图身份认证接口
* @param {*} data
*/
export function twoElementFace(data) {
return request({
url: '/chery/external/two-element-face/verify',
method: 'post',
data
})
}
/**
*情绪程度识别
* @param {*} data
*/
export function emotionRecognize(data) {
return request({
url: '/chery/external/emotion/recognize',
method: 'post',
data
})
}
/**
* WEB-等待接通
* @param {*} data
*/
export function callWebWait(data) {
return request({
url: '/chery/call/web/wait',
method: 'post',
data
})
}
/**
* WEB-等待接通
* @param {*} data
*/
export function callWebPoll(data) {
return request({
url: '/chery/call/web/poll',
method: 'post',
data
})
}
No preview for this file type
No preview for this file type
h1,
h2,
h3,
h4,
h5,
h6 {
padding: 0;
margin: 0;
}
.upload-cropper {
display: inline-block;
width: 300px;
background: #f2f2f2;
}
// 外边距
.mb5 {
margin-bottom: 5px;
}
.mb10 {
margin-bottom: 10px;
}
.mb20 {
margin-bottom: 20px;
}
.mr5 {
margin-right: 5px;
}
.text-align-center {
text-align: center;
}
.forbid {
background-color: #f5f7fa;
border-color: #e4e7ed;
color: #c0c4cc;
cursor: not-allowed;
}
// 全局修改card样式
.el-card .el-card__body {
padding: 5px;
}
// color
.white {
color: white;
}
// 图片资源
.username-icon {
background: center no-repeat url('./assets/image/username.png');
}
.password-icon {
background: center no-repeat url('./assets/image/password.png');
}
.validate-icon {
background: center no-repeat url('./assets/image/validate.png');
}
.login-form-bg {
background: center / cover no-repeat url('./assets/image/login-form-bg.png');
}
<template>
<div class="bread">
<div>
<slot name="title"></slot>
<span class="btn">
<slot name="btn"></slot>
</span>
</div>
<el-button
v-if="isShowBack"
type="text"
style="margin-right:50px;"
@click="handleClick"
>返回</el-button
>
</div>
</template>
<script>
export default {
name: 'Bread',
props: {
isShowBack: {
type: Boolean,
default: false
}
},
methods: {
handleClick() {
this.$router.go(-1)
}
}
}
</script>
<style lang="scss" scoped>
.bread {
display: flex;
align-items: center;
justify-content: space-between;
height: 50px;
border-left: 5px solid #3f51b5;
padding-left: 15px;
font-size: 16px;
font-weight: 700;
.btn {
display: inline-block;
color: #3f51b5;
margin-left: 15px;
font-size: 20px;
cursor: pointer;
}
}
</style>
import Bread from './Bread.vue'
export default Bread
<template>
<div class="card-com">
<div><slot name="title"></slot></div>
<slot></slot>
</div>
</template>
<script>
export default {}
</script>
<style lang="scss" scoped>
.card-com {
padding: 28px 24px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
box-sizing: border-box;
background-color: #fff;
}
</style>
<template lang="pug">
span(ref="countUp")
</template>
<script>
import { CountUp } from 'countup.js'
export default {
name: 'CountUp',
props: {
// 目标数字
end: {
type: Number,
default: 0
},
// 默认配置
options: {
type: Object,
default: () => {
return {
startVal: 0,
decimalPlaces: 0,
duration: 1,
separator: ',',
decimal: '.'
}
}
}
},
data() {
return {
numAnim: null
}
},
watch: {
end: {
handler(newVal, oldVal) {
this.numAnim.update(newVal)
}
}
},
mounted() {
this.initCountUp()
},
beforeDestroy() {
this.numAnim = null
},
methods: {
initCountUp() {
this.numAnim = new CountUp(this.$refs.countUp, this.end, this.options)
if (!this.numAnim.error) {
this.numAnim.start()
} else {
console.error(this.numAnim.error)
}
}
}
}
</script>
<template>
<svg :class="svgClass" aria-hidden="true">
<use :xlink:href="iconName"></use>
</svg>
</template>
<script>
export default {
name: 'icon-svg',
props: {
iconClass: {
type: String,
required: true
},
className: {
type: String
}
},
computed: {
iconName() {
return `#icon-${this.iconClass}`
},
svgClass() {
if (this.className) {
return `svg-icon ${this.className}`
} else {
return `svg-icon`
}
}
}
}
</script>
<style>
.svg-icon {
width: 1em;
height: 1em;
fill: currentColor;
overflow: hidden;
}
</style>
<template lang="pug">
div(class="login-main login-form-bg")
div(class="title")
.main-content
el-form(:model="loginForm" ref="form" :rules="rules" @keydown.enter.native="login")
el-form-item(prop="username")
el-input(
ref="username"
size="medium"
class="login-input"
placeholder="请输入工号"
v-model.trim="loginForm.username"
)
i(slot="prefix" class="icon username-icon")
el-form-item(prop="password")
el-input(
ref="password"
type="password"
size="medium"
placeholder="请输入密码"
class="login-input"
v-model.trim="loginForm.password"
)
i(slot="prefix" class="icon password-icon")
el-form-item(prop="verificationCode")
.captcha
el-input(
size="medium"
placeholder="请输入验证码"
class="captcha-input"
v-model.trim="loginForm.verificationCode"
)
i(slot="prefix" class="icon validate-icon")
<canvas width="93" height="36" id="captcha1"></canvas>
el-form-item
.buton-warp
el-button(class="login-btn" type="primary" @click="login" :loading="loading")
span(class="login-btn-text") 登&nbsp;&nbsp;&nbsp;&nbsp;录
</template>
<script>
import Captcha from 'captcha-mini'
import { maxSizeValidate } from '@/views/validate'
export default {
name: 'LoginForm',
props: {
usernameRules: {
type: Array,
default: () => {
return [
{ required: true, message: '账号不能为空', trigger: 'blur' },
maxSizeValidate
]
}
},
passwordRules: {
type: Array,
default: () => {
return [
{ required: true, message: '密码不能为空', trigger: 'blur' },
maxSizeValidate
]
}
},
loading: {
type: Boolean,
default: false
}
},
data() {
return {
verCode: '',
captcha1: null,
loginForm: {
username: '',
password: '',
verificationCode: ''
}
}
},
computed: {
rules() {
return {
username: this.usernameRules,
password: this.passwordRules,
verificationCode: [
{
validator: (rule, value, callback) => {
if (value === '') {
return callback(new Error('验证码不能为空'))
}
if (value.toLowerCase() !== this.verCode.toLowerCase()) {
return callback(new Error('请输入正确的验证码'))
} else {
callback()
}
},
trigger: 'blur'
},
maxSizeValidate
]
}
}
},
mounted() {
if (this.loginForm.username === '') {
this.$refs.username.focus()
}
this.captcha1 = new Captcha()
this.updateCaptcha()
},
methods: {
login() {
this.$refs.form.validate(valid => {
if (valid) {
this.$emit('on-success-valid', {
username: this.loginForm.username,
password: this.loginForm.password
})
} else {
this.updateCaptcha()
}
})
},
updateCaptcha() {
this.captcha1.draw(document.querySelector('#captcha1'), r => {
this.verCode = r
})
}
}
}
</script>
<style lang="scss">
.login-main {
height: 420px;
width: 420px;
display: flex;
flex-flow: column nowrap;
align-items: center;
padding: 0 48px;
box-sizing: border-box;
.title {
width: 292px;
height: 36px;
margin: 32px 0 36px 0;
}
.main-content {
.captcha {
display: flex;
}
.login-btn {
width: 100%;
height: 48px;
.login-btn-text {
font-size: 18px;
}
}
}
}
// 重置输入框 图标
.login-input {
.el-input__prefix {
display: inline-flex;
align-items: center;
}
.el-input__inner {
height: 44px;
width: 324px;
}
}
.captcha-input {
margin-right: 7px;
.el-input__prefix {
display: inline-flex;
align-items: center;
}
.el-input__inner {
height: 44px;
}
}
.login-input,
.captcha-input {
.el-input__inner {
background: #0f1f3b;
padding-left: 46px;
color: rgba(255, 255, 255, 1);
background: rgba(193, 225, 253, 0.03);
border-radius: 4px;
border: 1px solid rgba(24, 144, 255, 0.2);
}
.el-input__inner:active,
.el-input__inner:focus {
background: rgba(193, 225, 253, 0.03);
border-radius: 4px;
border: 1px solid rgba(94, 178, 255, 0.8);
}
.el-input__prefix {
left: 14px;
}
}
.icon {
width: 20px;
height: 20px;
display: inline-block;
}
</style>
import LoginForm from './LoginForm.vue'
export default LoginForm
<template>
<div
class="wrapper"
ref="wrapper"
@mousemove="mousemove"
@mouseenter="mouseenter"
@mouseleave="mouseleave"
@wheel="zoom"
>
<transition name="fade">
<div class="zoomed-container" v-show="isShow">
<div
class="transform-view"
:style="{
transform: `scale(${tempScale}, ${tempScale}) translate(${translateX}%, ${translateY}%)`
}"
>
<img :src="url" alt="" />
</div>
</div>
</transition>
<div class="view">
<img :src="url" alt="" />
</div>
</div>
</template>
<script>
import url from '@/assets/test.jpg'
export default {
props: {
scale: {
type: Number,
default: 2,
validator: val => {
if (val >= 1 && val <= 10) {
return val
} else {
return 1
}
}
}
},
data() {
return {
url,
translateX: 0,
translateY: 0,
tempScale: this.scale,
isShow: false
}
},
methods: {
zoom(e) {
e.preventDefault()
this.tempScale += e.deltaY * -0.01
this.tempScale = Math.min(Math.max(1, this.tempScale), 10)
},
mousemove(e) {
const {
left,
top,
width,
height
} = this.$refs.wrapper.getBoundingClientRect()
const x = e.clientX
const y = e.clientY
const percentW = (x - left) / width
const percentH = (y - top) / height
this.translateX = (0.4 - percentW) * 100
this.translateY = (0.4 - percentH) * 100
},
mouseenter() {
this.isShow = true
},
mouseleave() {
this.isShow = false
}
}
}
</script>
<style lang="scss" scoped>
// 过度效果
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.5s;
}
.fade-enter,
.fade-leave-to {
opacity: 0;
}
.wrapper {
width: 400px;
height: 357px;
position: relative;
overflow: hidden;
box-sizing: border-box;
.zoomed-container {
background: #000;
position: absolute;
left: 5px;
top: 5px;
right: 5px;
bottom: 5px;
z-index: 9999;
overflow: hidden;
.transform-view {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
text-align: center;
img {
height: 100%;
}
}
}
.view {
position: absolute;
left: 5px;
top: 5px;
right: 5px;
bottom: 5px;
text-align: center;
img {
height: 100%;
}
}
}
</style>
<template lang="pug">
.play-audio
audio(ref="audio" :src="mp3")
</template>
<script>
import mp3 from '@/assets/ding.mp3'
export default {
name: 'PlayAudio',
props: {
mp3: {
type: [String, Blob, null],
default: mp3
}
},
data() {
return {
audioStatus: 'pause',
audioDuration: 0
}
},
methods: {
/**
* 播放提示音
* */
playMusic() {
if (this.audioStatus === 'pause') {
this.$refs.audio.play()
this.audioStatus = 'play'
} else {
this.$refs.audio.pause()
this.$refs.audio.currentTime = 0
this.audioStatus = 'pause'
}
}
},
mounted() {
this.$refs.audio.addEventListener('ended', () => {
this.$refs.audio.pause()
this.audioStatus = 'pause'
})
}
}
</script>
<template lang="pug">
.start-step
el-button(type="primary" icon="el-icon-caret-right" class="btn" v-on="buttonListeners") 开始
</template>
<script>
export default {
computed: {
buttonListeners() {
return Object.assign({}, this.$listeners)
}
}
}
</script>
<style lang="scss" scoped>
.start-step {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
background-color: #eee;
.btn {
display: flex;
justify-content: flex-start;
align-items: center;
width: 100px;
height: 70px;
font-size: 23px;
font-weight: 900;
padding: 0 10px;
border-radius: 13px;
box-shadow: 4px 5px 3px;
.el-icon-caret-right {
font-size: 50px;
}
}
}
</style>
<style lang="scss">
.start-step {
.btn {
.el-icon-caret-right {
font-size: 50px;
margin-left: -20px;
}
}
}
</style>
<template lang="pug">
.title-line
.header-wrapper
.left
slot(name="title")
.info
slot(name="info")
.right
slot(name="right")
.main
slot
</template>
<script>
export default {
name: 'TitleLine'
}
</script>
<style lang="scss" scoped>
.title-line{
width: 100%;
font-size: 18px;
.header-wrapper{
color: #fff;
display: flex;
justify-content: flex-start;
align-items: center;
background: #a3add8;
height: 30px;
padding: 5px 10px;
.left{
padding-right: 5px;
}
.right{
flex: auto;
display: flex;
justify-content: flex-end;
}
}
.main{
padding: 10px 5px;
}
}
</style>
<template lang="pug">
.top-tesk-detail
.status-text {{statusText}}
el-switch(
:value="copyValue"
@change="change"
)
template(v-if="isOpen")
.task-info
.over-task.mr5 剩余任务
.mr5 已完成
.already.mr5 {{completed}}
.mr5 待质检
.wait.mr5 {{wait}}
.countDown(v-if="copyCountDownTime !== 0") {{countDownText}}
</template>
<script>
export default {
name: 'TopTeskDetails',
props: {
isOpen: {
type: Boolean,
required: true
},
completed: {
type: [Number, String],
default: 0
},
wait: {
type: [Number, String],
default: 0
},
countDownTime: {
type: Number,
default: 0
}
},
data() {
return {
timer: null, // 计时器
second: this.timeout, // 倒计时时间
copyValue: this.isOpen,
copyCountDownTime: this.countDownTime
}
},
computed: {
statusText() {
return this.isOpen ? '进行中' : '开始'
},
countDownText() {
return this.copyCountDownTime === 0 ? '-' : this.copyCountDownTime
}
},
watch: {
isOpen: {
handler(val) {
if (val && this.copyCountDownTime) {
this.startTimeout()
}
},
immediate: true
}
},
methods: {
startTimeout() {
setTimeout(this.nextSecond, 1000)
},
nextSecond() {
this.copyCountDownTime--
if (this.copyCountDownTime === 0) {
this.$emit('update:isOpen', false)
return
}
setTimeout(this.nextSecond, 1000)
},
change(val) {
this.$nextTick(() => {
this.$emit('update:isOpen', val)
})
}
}
}
</script>
<style lang="scss" scoped>
.top-tesk-detail {
height: 35px;
display: flex;
flex-flow: row nowrap;
justify-content: flex-start;
align-items: center;
.status-text {
width: 70px;
text-align: center;
font-size: 16px;
color: #333;
font-weight: 600;
}
.task-info {
margin: 0 5px;
font-size: 14px;
display: flex;
align-items: center;
.over-task {
font-weight: 500;
}
.already {
padding: 0 5px;
border-radius: 3px;
background-color: #52c3f1;
}
.wait {
padding: 0 5px;
border-radius: 3px;
background-color: #f19b12;
}
}
/* 倒计时*/
.countDown {
width: 35px;
height: 35px;
display: flex;
justify-content: center;
align-items: center;
font-size: 12px;
border-radius: 50%;
border: 3px solid #3f51b5;
box-sizing: border-box;
}
}
</style>
<template>
<div class="upload-wrapper">
<label>{{ placeholderCopy }}</label>
<div class="uw-right">
<el-button class="uw-btn">
<slot></slot>
</el-button>
<input
class="uw-input"
type="file"
id="image_uploads"
name="image_uploads"
:accept="accept"
:multiple="multiple"
@change="handleChange"
/>
</div>
</div>
</template>
<script>
export default {
props: {
placeholder: {
type: String,
default: '上传图片,可多选'
},
accept: {
type: String,
default: '.jpg, .jpeg, .png, .JPG, .JPEG, .PNG, .bmp, .BMP'
},
multiple: {
type: Boolean,
default: false
},
onExceed: {
type: Function,
default: () => {}
},
limit: {
type: Number
},
onChange: {
type: Function,
default: () => {}
}
},
data() {
return {
placeholderCopy: this.placeholder
}
},
methods: {
handleChange(e) {
const files = e.currentTarget.files
const length = files.length
if (!this.isValidator(files)) {
this.$emit('onFail', files)
return
}
if (this.limit && length > this.limit) {
this.onExceed()
return
}
if (files.length > 0) {
this.placeholderCopy = files[0].name
this.onChange(Array.from(files))
}
},
getAcceptType() {
const arr = this.accept
.toLowerCase()
.split(',')
.map(item => `image/${item.slice(item.indexOf('.') + 1)}`)
return Array.from(new Set(arr))
},
isValidator(files) {
return Array.from(files).every(file =>
this.getAcceptType().includes(file.type)
)
}
},
mounted() {
this.getAcceptType()
}
}
</script>
<style lang="scss" scoped>
.upload-wrapper {
width: 300px;
height: 42px;
background: #f2f2f2;
display: inline-block;
position: relative;
label {
font-size: 12px;
line-height: 42px;
width: 100%;
display: inline-block;
height: 100%;
overflow: hidden;
}
.uw-right {
position: absolute;
top: 0;
bottom: 0;
right: 0;
width: 70px;
}
input {
position: absolute;
top: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
}
</style>
<template>
<div class="video-player">
<video
id="my-player"
ref="videoPlayer"
class="video-js vjs-big-play-centered"
controlslist="nodownload"
crossorigin="anonymous"
oncontextmenu="return false;"
controls
></video>
</div>
</template>
<script>
import videojs from 'video.js'
import { throttle } from '@/utils/util'
const mirrerIcon =
'<svg t="1594374364946" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2814" width="16" height="16"><path d="M424.2 230.4c0.6 0.2 1.2 0.4 1.6 0.5L160.6 148c-2.9-0.6-6-0.9-9.2-0.9-24.5 0-44.4 19.9-44.4 44.4v634.8c0 24.6 19.9 44.5 44.4 44.5 3.2 0 6.2-0.4 9.2-0.9L432.4 785c17.9-9.2 30.1-27.9 30.1-49.3V283.2c-0.1-24.6-16.1-45.6-38.3-52.8z m-28.4 485.9l-222.1 59.2V242.3l222.1 59.2v414.8z m466.4-569.2c-3.2 0-6.2 0.4-9.2 0.9l-262 82c0.4-0.1 0.7-0.1 0.9-0.2-23.5 6.5-40.8 28-40.8 53.5v452.3c0 21.5 12.2 40.1 30.1 49.4l271.6 84.9c2.9 0.6 6.1 0.9 9.3 0.9 24.5 0 44.4-19.9 44.4-44.5V191.5c0.2-24.5-19.7-44.4-44.3-44.4z" p-id="2815" fill="#ffffff"></path></svg>'
// 热键
const leftKey = 37
const rightKey = 39
const spaceKey = 32
const enterKey = 13
export default {
props: {
singHoldingTime: {
type: Object,
default: () => {
return {
// signing: {
// beginTime: 3,
// endTime: 5
// },
// holding: [
// {
// beginTime: 20,
// endTime: 25
// }
// ]
}
}
},
pointList: {
type: Array,
default: () => {
return [
// {
// text: '沙和尚',
// time: 3
// },
// {
// text: '沙和尚',
// time: 5
// },
// {
// text: '沙和尚',
// time: 7
// }
]
}
},
url: {
type: String,
default: ''
},
// 快进快退的s
fastSeconds: {
type: Number,
default: 5
},
previewImage: {
type: Array,
default: () => {
return [
// {
// img: 'https://tupian.sioe.cn/b/bing-home-image/pic/20140801.jpg',
// time: 3
// },
]
}
}
},
data() {
return {
player: null,
duration: 0,
signingColor: '#e11920',
holdingColor: '#ffd800'
}
},
computed: {
videoEle() {
return this.$refs.videoPlayer
}
},
watch: {
url: {
handler(val) {
// 重新设置video的视频来源
if (this.player) {
this.player.pause()
this.player.src(val)
this.player.load()
}
}
}
},
mounted() {
this.init()
},
beforeDestroy() {
if (this.player) {
this.player.dispose()
}
},
// TODO 确认是否删除
// beforeRouteLeave(to, from, next) {
// this.stopVideo()
// next()
// },
methods: {
init() {
this.player = videojs(
'my-player',
{
playbackRates: [1, 1.25, 1.5, 2, 2.5],
userActions: {
// doubleClick: this.myDoubleClickHandler,
hotkeys: this.hotkeys
},
controlBar: {
fullscreenToggle: false,
volumePanel: {
inline: false
}
},
notSupportedMessage: '视频加载失败'
},
() => {
this.player.on('loadedmetadata', () => {
this.duration = this.player.duration() // 获取视频长度
this.createProgress()
})
this.player.on('timeupdate', throttle(this.timeupdate, 1000, true))
// this.addMirrorComponents()
}
)
// this.player.on('pause', () => {
// // Modals are temporary by default. They dispose themselves when they are
// // closed; so, we can create a new one each time the player is paused and
// // not worry about leaving extra nodes hanging around.
// var modal = this.player.createModal('This is a modal!')
// // When the modal closes, resume playback.
// modal.on('modalclose', () => {
// this.player.play()
// })
// })
this.player.src(this.url)
},
timeupdate() {
// 获取视频当前播放时间
this.$emit('timeupdate', this.videoEle.currentTime)
},
myDoubleClickHandler() {
// console.log('doubleclick')
},
hotkeys(e) {
if (e.which === spaceKey || e.which === enterKey) {
this.playVideo()
}
if (e.which === leftKey) {
this.fastForward(-this.fastSeconds)
}
if (e.which === rightKey) {
this.fastForward(this.fastSeconds)
}
},
/**
* 暂停或播放视频
*/
playVideo() {
if (this.videoEle) {
if (this.videoEle.paused) {
this.videoEle.play()
} else {
this.videoEle.pause()
}
}
},
/**
* 强制暂停
*/
stopVideo() {
this.videoEle.pause()
},
/**
* 快进视频
*/
fastForward(time) {
this.videoEle.play()
if (this.videoEle.currentTime !== 0) this.videoEle.currentTime += time
},
// 设置视频时间
setVideoCurrentTime(time) {
this.videoEle.currentTime = time - 0
},
// 添加Mirror镜像控件
addMirrorComponents() {
const domTemp = `<button class="vjs-picture-in-picture-control vjs-control vjs-button" type="button" title="Picture-in-Picture" aria-disabled="false">
${mirrerIcon}
<span class="vjs-control-text" aria-live="polite">Picture-in-Picture</span>
</button>`
const control = document.getElementsByClassName('vjs-control-bar')[0]
const span = document.createElement('span')
span.innerHTML = domTemp
control.appendChild(span)
let bool = true
span.addEventListener('click', () => {
const video = document.getElementsByTagName('video')[0]
bool = !bool
bool
? (video.style.transform = 'rotateY(0)')
: (video.style.transform = 'rotateY(180deg)')
})
},
createProgress() {
// 视频进度条做标记
const progress = document.getElementsByClassName('vjs-progress-holder')[0]
const delDotDiv = document.getElementsByClassName(
'video-face-pair-list'
)[0]
delDotDiv && progress.removeChild(delDotDiv)
const dotDiv = document.createElement('div')
dotDiv.setAttribute('class', 'video-face-pair-list')
// 视频人脸对比标记
Object.keys(this.singHoldingTime).forEach(a => {
const item = this.singHoldingTime[a]
const colorDiv = document.createElement('div')
colorDiv.setAttribute('class', 'face-pair')
if (Array.isArray(item)) {
item.forEach(sonItem => {
if (sonItem.beginTime < 0) return
colorDiv.style.width =
((sonItem.endTime - sonItem.beginTime) / this.duration) * 100 +
'%'
colorDiv.style.left =
(sonItem.beginTime / this.duration) * 100 + '%'
colorDiv.style.background = this.holdingColor
})
} else {
if (item.beginTime < 0) return
colorDiv.style.width =
((item.endTime - item.beginTime) / this.duration) * 100 + '%'
colorDiv.style.left = (item.beginTime / this.duration) * 100 + '%'
colorDiv.style.background = this.signingColor
}
dotDiv.appendChild(colorDiv)
})
// 视频预览图
this.previewImage.forEach(item => {
const spanDom = document.createElement('span')
spanDom.classList.add('preview-image-dot')
spanDom.style.left = `${(item.time / this.duration) * 100}%`
spanDom.innerHTML = `<div class="preview-wrapper">
<img
src="${item.img}"
alt=""
/>
</div>`
dotDiv.appendChild(spanDom)
})
// 视频关键打点
this.pointList.forEach(item => {
const spanDom = document.createElement('span')
spanDom.classList.add('video-dot')
spanDom.style.left = `${(item.time / this.duration) * 100}%`
spanDom.innerHTML = `<div class="video-dot-tip">
${item.text}
</div>`
dotDiv.appendChild(spanDom)
})
progress.appendChild(dotDiv)
}
}
}
</script>
<style lang="scss" scope>
.video-player {
width: 100%;
height: 100%;
position: relative;
.video-js {
height: 100%;
width: 100%;
}
// .color-span {
// background: black;
// width: 130px;
// height: 70px;
// padding: 5px;
// position: absolute;
// top: 0;
// left: 10px;
// color: white;
// font-size: 13px;
// display: flex;
// flex-direction: column;
// justify-content: space-around;
// align-items: flex-start;
// .holding,
// .signing {
// display: flex;
// justify-content: center;
// align-items: center;
// span:first-child {
// display: inline-block;
// width: 40px;
// height: 20px;
// background: red;
// margin-right: 10px;
// }
// span:last-child {
// line-height: 20px;
// }
// }
// .holding {
// span:first-child {
// background: yellow;
// }
// }
// }
#my-player.video-js {
.video-face-pair-list {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
.face-pair {
position: absolute;
height: inherit;
}
.video-dot {
position: absolute;
top: -2px;
width: 8px;
height: 8px;
border-radius: 50%;
background-color: #fff;
overflow: visible;
z-index: 1000;
box-shadow: 0 0 2px 2px #999;
}
.video-dot:hover {
cursor: pointer;
}
.video-dot-tip {
position: absolute;
display: none;
top: -76px;
left: -75px;
max-width: 250px;
min-width: 150px;
max-height: 60px;
min-height: 25px;
line-height: 25px;
padding: 5px;
background-color: #fff;
box-shadow: 0 0 -2px 3px #adadad;
overflow: auto;
letter-spacing: 1px;
color: #3d3d3d;
border-radius: 5px;
z-index: 10;
font-size: 12px;
font-family: 'Microsoft YaHei';
}
.video-dot:hover {
.video-dot-tip {
display: block;
}
}
.preview-image-dot {
display: inline-block;
position: absolute;
left: 0;
top: -11px;
width: 0;
height: 0;
border-right: 5px solid #1a1f26;
border-left: 5px solid #1a1f26;
// border-top: 4px solid #3248a8;
border-top: 5px solid #fff;
.preview-wrapper {
display: none;
position: absolute;
bottom: 18px;
left: -50px;
width: 130px;
height: 80px;
object-fit: contain;
img {
width: 100%;
height: 100%;
}
}
}
.preview-image-dot:hover {
background-color: lightblue;
.preview-wrapper {
display: block;
}
}
}
}
}
</style>
<style lang="scss">
.vjs-paused .vjs-big-play-button,
.vjs-paused.vjs-has-started .vjs-big-play-button {
display: block;
}
</style>
/* eslint-disable */
const Exif = {}
Exif.getData = img =>
new Promise((reslove, reject) => {
let obj = {}
getImageData(img)
.then(data => {
obj.arrayBuffer = data
obj.orientation = getOrientation(data)
reslove(obj)
})
.catch(error => {
reject(error)
})
})
// 这里的获取exif要将图片转ArrayBuffer对象,这里假设获取了图片的baes64
// 步骤一
// base64转ArrayBuffer对象
function getImageData(img) {
let data = null
return new Promise((reslove, reject) => {
if (img.src) {
if (/^data\:/i.test(img.src)) {
// Data URI
data = base64ToArrayBuffer(img.src)
reslove(data)
} else if (/^blob\:/i.test(img.src)) {
// Object URL
var fileReader = new FileReader()
fileReader.onload = function(e) {
data = e.target.result
reslove(data)
}
objectURLToBlob(img.src, function(blob) {
fileReader.readAsArrayBuffer(blob)
})
} else {
var http = new XMLHttpRequest()
http.onload = function() {
if (this.status == 200 || this.status === 0) {
data = http.response
reslove(data)
} else {
throw 'Could not load image'
}
http = null
}
http.open('GET', img.src, true)
http.responseType = 'arraybuffer'
http.send(null)
}
} else {
reject('img error')
}
})
}
function objectURLToBlob(url, callback) {
var http = new XMLHttpRequest()
http.open('GET', url, true)
http.responseType = 'blob'
http.onload = function(e) {
if (this.status == 200 || this.status === 0) {
callback(this.response)
}
}
http.send()
}
function base64ToArrayBuffer(base64) {
base64 = base64.replace(/^data\:([^\;]+)\;base64,/gim, '')
var binary = atob(base64)
var len = binary.length
var buffer = new ArrayBuffer(len)
var view = new Uint8Array(buffer)
for (var i = 0; i < len; i++) {
view[i] = binary.charCodeAt(i)
}
return buffer
}
// 步骤二,Unicode码转字符串
// ArrayBuffer对象 Unicode码转字符串
function getStringFromCharCode(dataView, start, length) {
var str = ''
var i
for (i = start, length += start; i < length; i++) {
str += String.fromCharCode(dataView.getUint8(i))
}
return str
}
// 步骤三,获取jpg图片的exif的角度(在ios体现最明显)
function getOrientation(arrayBuffer) {
var dataView = new DataView(arrayBuffer)
var length = dataView.byteLength
var orientation
var exifIDCode
var tiffOffset
var firstIFDOffset
var littleEndian
var endianness
var app1Start
var ifdStart
var offset
var i
// Only handle JPEG image (start by 0xFFD8)
if (dataView.getUint8(0) === 0xff && dataView.getUint8(1) === 0xd8) {
offset = 2
while (offset < length) {
if (
dataView.getUint8(offset) === 0xff &&
dataView.getUint8(offset + 1) === 0xe1
) {
app1Start = offset
break
}
offset++
}
}
if (app1Start) {
exifIDCode = app1Start + 4
tiffOffset = app1Start + 10
if (getStringFromCharCode(dataView, exifIDCode, 4) === 'Exif') {
endianness = dataView.getUint16(tiffOffset)
littleEndian = endianness === 0x4949
if (littleEndian || endianness === 0x4d4d /* bigEndian */) {
if (dataView.getUint16(tiffOffset + 2, littleEndian) === 0x002a) {
firstIFDOffset = dataView.getUint32(tiffOffset + 4, littleEndian)
if (firstIFDOffset >= 0x00000008) {
ifdStart = tiffOffset + firstIFDOffset
}
}
}
}
}
if (ifdStart) {
length = dataView.getUint16(ifdStart, littleEndian)
for (i = 0; i < length; i++) {
offset = ifdStart + i * 12 + 2
if (
dataView.getUint16(offset, littleEndian) === 0x0112 /* Orientation */
) {
// 8 is the offset of the current tag's value
offset += 8
// Get the original orientation value
orientation = dataView.getUint16(offset, littleEndian)
// Override the orientation with its default value for Safari (#120)
// if (IS_SAFARI_OR_UIWEBVIEW) {
// dataView.setUint16(offset, 1, littleEndian);
// }
break
}
}
}
return orientation
}
export default Exif
import VueCropper from './vueCropper.vue'
export default VueCropper
<template>
<div
class="vue-cropper"
ref="cropper"
@mouseover="scaleImg"
@mouseout="cancelScale"
>
<!-- :style="{width:w+'px',height:h+'px'}" -->
<div class="cropper-box">
<div
class="cropper-box-canvas"
v-show="!loading"
:style="{
width: trueWidth + 'px',
height: trueHeight + 'px',
transform:
'scale(' +
scale +
',' +
scale +
') ' +
'translate3d(' +
x / scale +
'px,' +
y / scale +
'px,' +
'0)' +
'rotateZ(' +
rotate * 90 +
'deg)'
}"
>
<img :src="imgs" alt="cropper-img" ref="cropperImg" />
</div>
</div>
<div
class="cropper-drag-box"
:class="{
'cropper-move': move && !crop,
'cropper-crop': crop,
'cropper-modal': cropping
}"
@mousedown="startMove"
@touchstart="startMove"
></div>
<div
v-show="cropping"
class="cropper-crop-box"
:style="{
width: cropW + 'px',
height: cropH + 'px',
transform:
'translate3d(' + cropOffsertX + 'px,' + cropOffsertY + 'px,' + '0)'
}"
>
<span class="cropper-view-box">
<img
:style="{
width: trueWidth + 'px',
height: trueHeight + 'px',
transform:
'scale(' +
scale +
',' +
scale +
') ' +
'translate3d(' +
(x - cropOffsertX) / scale +
'px,' +
(y - cropOffsertY) / scale +
'px,' +
'0)' +
'rotateZ(' +
rotate * 90 +
'deg)'
}"
:src="imgs"
alt="cropper-img"
/>
</span>
<span
class="cropper-face cropper-move"
@mousedown="cropMove"
@touchstart="cropMove"
></span>
<span class="crop-info" v-if="info" :style="{ top: cropInfo.top }"
>{{ this.cropInfo.width }} × {{ this.cropInfo.height }}</span
>
<span v-if="!fixedBox">
<span
class="crop-line line-w"
@mousedown="changeCropSize($event, false, true, 0, 1)"
@touchstart="changeCropSize($event, false, true, 0, 1)"
></span>
<span
class="crop-line line-a"
@mousedown="changeCropSize($event, true, false, 1, 0)"
@touchstart="changeCropSize($event, true, false, 1, 0)"
></span>
<span
class="crop-line line-s"
@mousedown="changeCropSize($event, false, true, 0, 2)"
@touchstart="changeCropSize($event, false, true, 0, 2)"
></span>
<span
class="crop-line line-d"
@mousedown="changeCropSize($event, true, false, 2, 0)"
@touchstart="changeCropSize($event, true, false, 2, 0)"
></span>
<span
class="crop-point point1"
@mousedown="changeCropSize($event, true, true, 1, 1)"
@touchstart="changeCropSize($event, true, true, 1, 1)"
></span>
<span
class="crop-point point2"
@mousedown="changeCropSize($event, false, true, 0, 1)"
@touchstart="changeCropSize($event, false, true, 0, 1)"
></span>
<span
class="crop-point point3"
@mousedown="changeCropSize($event, true, true, 2, 1)"
@touchstart="changeCropSize($event, true, true, 2, 1)"
></span>
<span
class="crop-point point4"
@mousedown="changeCropSize($event, true, false, 1, 0)"
@touchstart="changeCropSize($event, true, false, 1, 0)"
></span>
<span
class="crop-point point5"
@mousedown="changeCropSize($event, true, false, 2, 0)"
@touchstart="changeCropSize($event, true, false, 2, 0)"
></span>
<span
class="crop-point point6"
@mousedown="changeCropSize($event, true, true, 1, 2)"
@touchstart="changeCropSize($event, true, true, 1, 2)"
></span>
<span
class="crop-point point7"
@mousedown="changeCropSize($event, false, true, 0, 2)"
@touchstart="changeCropSize($event, false, true, 0, 2)"
></span>
<span
class="crop-point point8"
@mousedown="changeCropSize($event, true, true, 2, 2)"
@touchstart="changeCropSize($event, true, true, 2, 2)"
></span>
</span>
</div>
</div>
</template>
<script>
import exifmin from './exif-js-min'
export default {
data: function() {
return {
// 容器高宽
w: 0,
h: 0,
// 图片缩放比例
scale: 1,
// 图片偏移x轴
x: 0,
// 图片偏移y轴
y: 0,
// 图片加载
loading: true,
// 图片真实宽度
trueWidth: 0,
// 图片真实高度
trueHeight: 0,
move: true,
// 移动的x
moveX: 0,
// 移动的y
moveY: 0,
// 开启截图
crop: false,
// 正在截图
cropping: false,
// 裁剪框大小
cropW: 0,
cropH: 0,
cropOldW: 0,
cropOldH: 0,
// 判断是否能够改变
canChangeX: false,
canChangeY: false,
// 改变的基准点
changeCropTypeX: 1,
changeCropTypeY: 1,
// 裁剪框的坐标轴
cropX: 0,
cropY: 0,
cropChangeX: 0,
cropChangeY: 0,
cropOffsertX: 0,
cropOffsertY: 0,
// 支持的滚动事件
support: '',
// 移动端手指缩放
touches: [],
touchNow: false,
// 图片旋转
rotate: 0,
isIos: false,
orientation: 0,
imgs: '',
// 图片缩放系数
coe: 0.2,
// 是否正在多次缩放
scaling: false,
scalingSet: '',
coeStatus: '',
// 控制emit触发频率
isCanShow: true
}
},
props: {
img: {
type: [String, Blob, null, File],
default: ''
},
// 输出图片压缩比
outputSize: {
type: Number,
default: 1
},
outputType: {
type: String,
default: 'jpeg'
},
info: {
type: Boolean,
default: true
},
// 是否开启滚轮放大缩小
canScale: {
type: Boolean,
default: true
},
// 是否自成截图框
autoCrop: {
type: Boolean,
default: false
},
autoCropWidth: {
type: [Number, String],
default: 0
},
autoCropHeight: {
type: [Number, String],
default: 0
},
// 是否开启固定宽高比
fixed: {
type: Boolean,
default: false
},
// 宽高比 w/h
fixedNumber: {
type: Array,
default: () => {
return [1, 1]
}
},
// 固定大小 禁止改变截图框大小
fixedBox: {
type: Boolean,
default: false
},
// 输出截图是否缩放
full: {
type: Boolean,
default: false
},
// 是否可以拖动图片
canMove: {
type: Boolean,
default: true
},
// 是否可以拖动截图框
canMoveBox: {
type: Boolean,
default: true
},
// 上传图片按照原始比例显示
original: {
type: Boolean,
default: false
},
// 截图框能否超过图片
centerBox: {
type: Boolean,
default: false
},
// 是否根据dpr输出高清图片
high: {
type: Boolean,
default: true
},
// 截图框展示宽高类型
infoTrue: {
type: Boolean,
default: false
},
// 可以压缩图片宽高 默认不超过10000
maxImgSize: {
type: Number,
default: 10000
},
// 倍数 可渲染当前截图框的n倍 0 - 1000;
enlarge: {
type: [Number, String],
default: 1
},
// 自动预览的固定宽度
preW: {
type: [Number, String],
default: 0
},
/*
图片布局方式 mode 实现和css背景一样的效果
contain 居中布局 默认不会缩放 保证图片在容器里面 mode: 'contain'
cover 拉伸布局 填充整个容器 mode: 'cover'
如果仅有一个数值被给定,这个数值将作为宽度值大小,高度值将被设定为auto。 mode: '50px'
如果有两个数值被给定,第一个将作为宽度值大小,第二个作为高度值大小。 mode: '50px 60px'
*/
mode: {
type: String,
default: 'contain'
}
},
computed: {
cropInfo() {
let obj = {}
obj.top = this.cropOffsertY > 21 ? '-21px' : '0px'
obj.width = this.cropW > 0 ? this.cropW : 0
obj.height = this.cropH > 0 ? this.cropH : 0
if (this.infoTrue) {
let dpr = 1
if (this.high && !this.full) {
dpr = window.devicePixelRatio
}
if ((this.enlarge !== 1) & !this.full) {
dpr = Math.abs(Number(this.enlarge))
}
obj.width = obj.width * dpr
obj.height = obj.height * dpr
if (this.full) {
obj.width = obj.width / this.scale
obj.height = obj.height / this.scale
}
}
obj.width = obj.width.toFixed(0)
obj.height = obj.height.toFixed(0)
return obj
},
isIE() {
var userAgent = navigator.userAgent // 取得浏览器的userAgent字符串
var isIE =
userAgent.indexOf('compatible') > -1 && userAgent.indexOf('MSIE') > -1 // 判断是否IE浏览器
return isIE
}
},
watch: {
// 如果图片改变, 重新布局
img() {
// 当传入图片时, 读取图片信息同时展示
this.checkedImg()
},
imgs(val) {
if (val === '') {
return
}
this.reload()
},
cropW() {
this.showPreview()
},
cropH() {
this.showPreview()
},
cropOffsertX() {
this.showPreview()
},
cropOffsertY() {
this.showPreview()
},
scale(val, oldVal) {
this.showPreview()
},
x() {
this.showPreview()
},
y() {
this.showPreview()
},
autoCrop(val) {
if (val) {
this.goAutoCrop()
}
},
// 修改了自动截图框
autoCropWidth() {
if (this.autoCrop) {
this.goAutoCrop()
}
},
autoCropHeight() {
if (this.autoCrop) {
this.goAutoCrop()
}
},
mode() {
this.checkedImg()
},
rotate() {
this.showPreview()
if (this.autoCrop) {
this.goAutoCrop(this.cropW, this.cropH)
} else {
if (this.cropW > 0 || this.cropH > 0) {
this.goAutoCrop(this.cropW, this.cropH)
}
}
}
},
methods: {
checkOrientationImage(img, orientation, width, height) {
let canvas = document.createElement('canvas')
let ctx = canvas.getContext('2d')
ctx.save()
switch (orientation) {
case 2:
canvas.width = width
canvas.height = height
// horizontal flip
ctx.translate(width, 0)
ctx.scale(-1, 1)
break
case 3:
canvas.width = width
canvas.height = height
// 180 graus
ctx.translate(width / 2, height / 2)
ctx.rotate((180 * Math.PI) / 180)
ctx.translate(-width / 2, -height / 2)
break
case 4:
canvas.width = width
canvas.height = height
// vertical flip
ctx.translate(0, height)
ctx.scale(1, -1)
break
case 5:
// vertical flip + 90 rotate right
canvas.height = width
canvas.width = height
ctx.rotate(0.5 * Math.PI)
ctx.scale(1, -1)
break
case 6:
canvas.width = height
canvas.height = width
// 90 graus
ctx.translate(height / 2, width / 2)
ctx.rotate((90 * Math.PI) / 180)
ctx.translate(-width / 2, -height / 2)
break
case 7:
// horizontal flip + 90 rotate right
canvas.height = width
canvas.width = height
ctx.rotate(0.5 * Math.PI)
ctx.translate(width, -height)
ctx.scale(-1, 1)
break
case 8:
canvas.height = width
canvas.width = height
// -90 graus
ctx.translate(height / 2, width / 2)
ctx.rotate((-90 * Math.PI) / 180)
ctx.translate(-width / 2, -height / 2)
break
default:
canvas.width = width
canvas.height = height
}
ctx.drawImage(img, 0, 0, width, height)
ctx.restore()
canvas.toBlob(
blob => {
let data = URL.createObjectURL(blob)
this.imgs = data
},
'image/' + this.outputType,
1
)
},
// checkout img
checkedImg() {
if (this.img === '') return
this.loading = true
this.scale = 1
this.rotate = 0
this.clearCrop()
let img = new Image()
img.onload = () => {
if (this.img === '') {
this.$emit('imgLoad', 'error')
return false
}
let width = img.width
let height = img.height
exifmin.getData(img).then(data => {
this.orientation = data.orientation || 1
let max = this.maxImgSize
if (!this.orientation && (width < max) & (height < max)) {
this.imgs = this.img
return
}
if (width > max) {
height = (height / width) * max
width = max
}
if (height > max) {
width = (width / height) * max
height = max
}
this.checkOrientationImage(img, this.orientation, width, height)
})
}
img.onerror = () => {
this.$emit('imgLoad', 'error')
}
// 判断如果不是base64图片 再添加crossOrigin属性,否则会导致iOS低版本(10.2)无法显示图片
if (this.img.substr(0, 4) !== 'data') {
img.crossOrigin = ''
}
if (this.isIE) {
var xhr = new XMLHttpRequest()
xhr.onload = function() {
var url = URL.createObjectURL(this.response)
img.src = url
}
xhr.open('GET', this.img, true)
xhr.responseType = 'blob'
xhr.send()
} else {
img.src = this.img
}
},
// 当按下鼠标键
startMove(e) {
e.preventDefault()
// 如果move 为true 表示当前可以拖动
if (this.move && !this.crop) {
if (!this.canMove) {
return false
}
// 开始移动
this.moveX = (e.clientX ? e.clientX : e.touches[0].clientX) - this.x
this.moveY = (e.clientY ? e.clientY : e.touches[0].clientY) - this.y
if (e.touches) {
window.addEventListener('touchmove', this.moveImg)
window.addEventListener('touchend', this.leaveImg)
if (e.touches.length == 2) {
// 记录手指刚刚放上去
this.touches = e.touches
window.addEventListener('touchmove', this.touchScale)
window.addEventListener('touchend', this.cancelTouchScale)
}
} else {
window.addEventListener('mousemove', this.moveImg)
window.addEventListener('mouseup', this.leaveImg)
}
// 触发图片移动事件
this.$emit('imgMoving', {
moving: true,
axis: this.getImgAxis()
})
} else {
// 截图ing
this.cropping = true
// 绑定截图事件
window.addEventListener('mousemove', this.createCrop)
window.addEventListener('mouseup', this.endCrop)
window.addEventListener('touchmove', this.createCrop)
window.addEventListener('touchend', this.endCrop)
this.cropOffsertX = e.offsetX
? e.offsetX
: e.touches[0].pageX - this.$refs.cropper.offsetLeft
this.cropOffsertY = e.offsetY
? e.offsetY
: e.touches[0].pageY - this.$refs.cropper.offsetTop
this.cropX = e.clientX ? e.clientX : e.touches[0].clientX
this.cropY = e.clientY ? e.clientY : e.touches[0].clientY
this.cropChangeX = this.cropOffsertX
this.cropChangeY = this.cropOffsertY
this.cropW = 0
this.cropH = 0
console.log(
'cropOffsertX',
this.cropOffsertX,
'cropOffsertY',
this.cropOffsertY,
'cropX',
this.cropX,
'cropY',
this.cropY
)
}
},
// 移动端缩放
// touchScale(e) {
// e.preventDefault()
// let scale = this.scale
// // 记录变化量
// // 第一根手指
// var oldTouch1 = {
// x: this.touches[0].clientX,
// y: this.touches[0].clientY
// }
// var newTouch1 = {
// x: e.touches[0].clientX,
// y: e.touches[0].clientY
// }
// // 第二根手指
// var oldTouch2 = {
// x: this.touches[1].clientX,
// y: this.touches[1].clientY
// }
// var newTouch2 = {
// x: e.touches[1].clientX,
// y: e.touches[1].clientY
// }
// var oldL = Math.sqrt(
// Math.pow(oldTouch1.x - oldTouch2.x, 2) +
// Math.pow(oldTouch1.y - oldTouch2.y, 2)
// )
// var newL = Math.sqrt(
// Math.pow(newTouch1.x - newTouch2.x, 2) +
// Math.pow(newTouch1.y - newTouch2.y, 2)
// )
// var cha = newL - oldL
// // 根据图片本身大小 决定每次改变大小的系数, 图片越大系数越小
// // 1px - 0.2
// var coe = 1
// coe =
// coe / this.trueWidth > coe / this.trueHeight
// ? coe / this.trueHeight
// : coe / this.trueWidth
// coe = coe > 0.1 ? 0.1 : coe
// var num = coe * cha
// if (!this.touchNow) {
// this.touchNow = true
// if (cha > 0) {
// scale += Math.abs(num)
// } else if (cha < 0) {
// scale > Math.abs(num) ? (scale -= Math.abs(num)) : scale
// }
// this.touches = e.touches
// setTimeout(() => {
// this.touchNow = false
// }, 8)
// if (!this.checkoutImgAxis(this.x, this.y, scale)) {
// return false
// }
// this.scale = scale
// }
// },
// cancelTouchScale(e) {
// window.removeEventListener('touchmove', this.touchScale)
// },
// 移动图片
moveImg(e) {
e.preventDefault()
if (e.touches && e.touches.length === 2) {
this.touches = e.touches
window.addEventListener('touchmove', this.touchScale)
window.addEventListener('touchend', this.cancelTouchScale)
window.removeEventListener('touchmove', this.moveImg)
return false
}
let nowX = e.clientX ? e.clientX : e.touches[0].clientX
let nowY = e.clientY ? e.clientY : e.touches[0].clientY
let changeX, changeY
changeX = nowX - this.moveX
changeY = nowY - this.moveY
this.$nextTick(() => {
if (this.centerBox) {
let axis = this.getImgAxis(changeX, changeY, this.scale)
let cropAxis = this.getCropAxis()
let imgW = this.trueHeight * this.scale
let imgH = this.trueWidth * this.scale
let maxLeft, maxTop, maxRight, maxBottom
switch (this.rotate) {
case 1:
case -1:
case 3:
case -3:
maxLeft =
this.cropOffsertX -
(this.trueWidth * (1 - this.scale)) / 2 +
(imgW - imgH) / 2
maxTop =
this.cropOffsertY -
(this.trueHeight * (1 - this.scale)) / 2 +
(imgH - imgW) / 2
maxRight = maxLeft - imgW + this.cropW
maxBottom = maxTop - imgH + this.cropH
break
default:
maxLeft =
this.cropOffsertX - (this.trueWidth * (1 - this.scale)) / 2
maxTop =
this.cropOffsertY - (this.trueHeight * (1 - this.scale)) / 2
maxRight = maxLeft - imgH + this.cropW
maxBottom = maxTop - imgW + this.cropH
break
}
// 图片左边 图片不能超过截图框
if (axis.x1 >= cropAxis.x1) {
changeX = maxLeft
}
// 图片上边 图片不能超过截图框
if (axis.y1 >= cropAxis.y1) {
changeY = maxTop
}
// 图片右边
if (axis.x2 <= cropAxis.x2) {
changeX = maxRight
}
// 图片下边
if (axis.y2 <= cropAxis.y2) {
changeY = maxBottom
}
}
this.x = changeX
this.y = changeY
// 触发图片移动事件
this.$emit('imgMoving', {
moving: true,
axis: this.getImgAxis()
})
})
},
// 移动图片结束
leaveImg(e) {
window.removeEventListener('mousemove', this.moveImg)
window.removeEventListener('touchmove', this.moveImg)
window.removeEventListener('mouseup', this.leaveImg)
window.removeEventListener('touchend', this.leaveImg)
// 触发图片移动事件
this.$emit('imgMoving', {
moving: false,
axis: this.getImgAxis()
})
},
// 缩放图片
scaleImg() {
if (this.canScale) {
window.addEventListener(this.support, this.changeSize, {
passive: false
})
}
},
// 移出框
cancelScale() {
if (this.canScale) {
window.removeEventListener(this.support, this.changeSize)
}
},
// 改变大小函数
changeSize(e) {
e.preventDefault()
let scale = this.scale
var change = e.deltaY || e.wheelDelta
// 根据图片本身大小 决定每次改变大小的系数, 图片越大系数越小
var isFirefox = navigator.userAgent.indexOf('Firefox')
change = isFirefox > 0 ? change * 30 : change
// 修复ie的滚动缩放
if (this.isIE) {
change = -change
}
// 1px - 0.2
var coe = this.coe
coe =
coe / this.trueWidth > coe / this.trueHeight
? coe / this.trueHeight
: coe / this.trueWidth
var num = coe * change
num < 0
? (scale += Math.abs(num))
: scale > Math.abs(num)
? (scale -= Math.abs(num))
: scale
// 延迟0.1s 每次放大大或者缩小的范围
let status = num < 0 ? 'add' : 'reduce'
if (status !== this.coeStatus) {
this.coeStatus = status
this.coe = 0.2
}
if (!this.scaling) {
this.scalingSet = setTimeout(() => {
this.scaling = false
this.coe = this.coe += 0.01
}, 50)
}
this.scaling = true
if (!this.checkoutImgAxis(this.x, this.y, scale)) {
return false
}
this.scale = scale
},
// 修改图片大小函数
changeScale(num) {
let scale = this.scale
num = num || 1
var coe = 20
coe =
coe / this.trueWidth > coe / this.trueHeight
? coe / this.trueHeight
: coe / this.trueWidth
num = num * coe
num > 0
? (scale += Math.abs(num))
: scale > Math.abs(num)
? (scale -= Math.abs(num))
: scale
if (!this.checkoutImgAxis(this.x, this.y, scale)) {
return false
}
this.scale = scale
},
// 创建截图框
createCrop(e) {
e.preventDefault()
// 移动生成大小
var nowX = e.clientX ? e.clientX : e.touches ? e.touches[0].clientX : 0
var nowY = e.clientY ? e.clientY : e.touches ? e.touches[0].clientY : 0
this.$nextTick(() => {
// 截图框大小
var fw = nowX - this.cropX
var fh = nowY - this.cropY
if (fw > 0) {
this.cropW =
fw + this.cropChangeX > this.w ? this.w - this.cropChangeX : fw
this.cropOffsertX = this.cropChangeX
} else {
this.cropW =
this.w - this.cropChangeX + Math.abs(fw) > this.w
? this.cropChangeX
: Math.abs(fw)
this.cropOffsertX =
this.cropChangeX + fw > 0 ? this.cropChangeX + fw : 0
}
if (!this.fixed) {
if (fh > 0) {
this.cropH =
fh + this.cropChangeY > this.h ? this.h - this.cropChangeY : fh
this.cropOffsertY = this.cropChangeY
} else {
this.cropH =
this.h - this.cropChangeY + Math.abs(fh) > this.h
? this.cropChangeY
: Math.abs(fh)
this.cropOffsertY =
this.cropChangeY + fh > 0 ? this.cropChangeY + fh : 0
}
} else {
var fixedHeight =
(this.cropW / this.fixedNumber[0]) * this.fixedNumber[1]
if (fixedHeight + this.cropOffsertY > this.h) {
this.cropH = this.h - this.cropOffsertY
this.cropW =
(this.cropH / this.fixedNumber[1]) * this.fixedNumber[0]
if (fw > 0) {
this.cropOffsertX = this.cropChangeX
} else {
this.cropOffsertX = this.cropChangeX - this.cropW
}
} else {
this.cropH = fixedHeight
}
this.cropOffsertY = this.cropOffsertY
}
})
},
// 改变截图框大小
changeCropSize(e, w, h, typeW, typeH) {
e.preventDefault()
window.addEventListener('mousemove', this.changeCropNow)
window.addEventListener('mouseup', this.changeCropEnd)
window.addEventListener('touchmove', this.changeCropNow)
window.addEventListener('touchend', this.changeCropEnd)
this.canChangeX = w
this.canChangeY = h
this.changeCropTypeX = typeW
this.changeCropTypeY = typeH
this.cropX = e.clientX ? e.clientX : e.touches[0].clientX
this.cropY = e.clientY ? e.clientY : e.touches[0].clientY
this.cropOldW = this.cropW
this.cropOldH = this.cropH
this.cropChangeX = this.cropOffsertX
this.cropChangeY = this.cropOffsertY
if (this.fixed) {
if (this.canChangeX && this.canChangeY) {
this.canChangeY = 0
}
}
},
// 正在改变
changeCropNow(e) {
e.preventDefault()
var nowX = e.clientX ? e.clientX : e.touches ? e.touches[0].clientX : 0
var nowY = e.clientY ? e.clientY : e.touches ? e.touches[0].clientY : 0
// 容器的宽高
let wrapperW = this.w
let wrapperH = this.h
// 不能超过的坐标轴
let minX = 0
let minY = 0
if (this.centerBox) {
let axis = this.getImgAxis()
let imgW = axis.x2
let imgH = axis.y2
minX = axis.x1 > 0 ? axis.x1 : 0
minY = axis.y1 > 0 ? axis.y1 : 0
if (wrapperW > imgW) {
wrapperW = imgW
}
if (wrapperH > imgH) {
wrapperH = imgH
}
}
this.$nextTick(() => {
var fw = nowX - this.cropX
var fh = nowY - this.cropY
if (this.canChangeX) {
if (this.changeCropTypeX === 1) {
if (this.cropOldW - fw > 0) {
this.cropW =
wrapperW - this.cropChangeX - fw <= wrapperW - minX
? this.cropOldW - fw
: this.cropOldW + this.cropChangeX - minX
this.cropOffsertX =
wrapperW - this.cropChangeX - fw <= wrapperW - minX
? this.cropChangeX + fw
: minX
} else {
this.cropW =
Math.abs(fw) + this.cropChangeX <= wrapperW
? Math.abs(fw) - this.cropOldW
: wrapperW - this.cropOldW - this.cropChangeX
this.cropOffsertX = this.cropChangeX + this.cropOldW
}
} else if (this.changeCropTypeX === 2) {
if (this.cropOldW + fw > 0) {
this.cropW =
this.cropOldW + fw + this.cropOffsertX <= wrapperW
? this.cropOldW + fw
: wrapperW - this.cropOffsertX
this.cropOffsertX = this.cropChangeX
} else {
// 右侧坐标抽 超过左侧
this.cropW =
wrapperW - this.cropChangeX + Math.abs(fw + this.cropOldW) <=
wrapperW - minX
? Math.abs(fw + this.cropOldW)
: this.cropChangeX - minX
this.cropOffsertX =
wrapperW - this.cropChangeX + Math.abs(fw + this.cropOldW) <=
wrapperW - minX
? this.cropChangeX - Math.abs(fw + this.cropOldW)
: minX
}
}
}
if (this.canChangeY) {
if (this.changeCropTypeY === 1) {
if (this.cropOldH - fh > 0) {
this.cropH =
wrapperH - this.cropChangeY - fh <= wrapperH - minY
? this.cropOldH - fh
: this.cropOldH + this.cropChangeY - minY
this.cropOffsertY =
wrapperH - this.cropChangeY - fh <= wrapperH - minY
? this.cropChangeY + fh
: minY
} else {
this.cropH =
Math.abs(fh) + this.cropChangeY <= wrapperH
? Math.abs(fh) - this.cropOldH
: wrapperH - this.cropOldH - this.cropChangeY
this.cropOffsertY = this.cropChangeY + this.cropOldH
}
} else if (this.changeCropTypeY === 2) {
if (this.cropOldH + fh > 0) {
this.cropH =
this.cropOldH + fh + this.cropOffsertY <= wrapperH
? this.cropOldH + fh
: wrapperH - this.cropOffsertY
this.cropOffsertY = this.cropChangeY
} else {
this.cropH =
wrapperH - this.cropChangeY + Math.abs(fh + this.cropOldH) <=
wrapperH - minY
? Math.abs(fh + this.cropOldH)
: this.cropChangeY - minY
this.cropOffsertY =
wrapperH - this.cropChangeY + Math.abs(fh + this.cropOldH) <=
wrapperH - minY
? this.cropChangeY - Math.abs(fh + this.cropOldH)
: minY
}
}
}
if (this.canChangeX && this.fixed) {
var fixedHeight =
(this.cropW / this.fixedNumber[0]) * this.fixedNumber[1]
if (fixedHeight + this.cropOffsertY > wrapperH) {
this.cropH = wrapperH - this.cropOffsertY
this.cropW =
(this.cropH / this.fixedNumber[1]) * this.fixedNumber[0]
} else {
this.cropH = fixedHeight
}
}
if (this.canChangeY && this.fixed) {
var fixedWidth =
(this.cropH / this.fixedNumber[1]) * this.fixedNumber[0]
if (fixedWidth + this.cropOffsertX > wrapperW) {
this.cropW = wrapperW - this.cropOffsertX
this.cropH =
(this.cropW / this.fixedNumber[0]) * this.fixedNumber[1]
} else {
this.cropW = fixedWidth
}
}
})
},
// 结束改变
changeCropEnd(e) {
// 抛出改变后截图的大小
this.$emit('changeCropEnd', this.getCropAxis())
window.removeEventListener('mousemove', this.changeCropNow)
window.removeEventListener('mouseup', this.changeCropEnd)
window.removeEventListener('touchmove', this.changeCropNow)
window.removeEventListener('touchend', this.changeCropEnd)
},
// 创建完成
endCrop() {
if (this.cropW === 0 && this.cropH === 0) {
this.cropping = false
}
// 截图完成 截图有效范围是10×10
if (this.cropInfo.width >= 10 && this.cropInfo.height >= 10) {
this.$emit('cropFinishd', 'end')
}
window.removeEventListener('mousemove', this.createCrop)
window.removeEventListener('mouseup', this.endCrop)
window.removeEventListener('touchmove', this.createCrop)
window.removeEventListener('touchend', this.endCrop)
},
// 开始截图
startCrop() {
this.crop = true
// console.log('开始截图')
},
// 停止截图
stopCrop() {
this.crop = false
// console.log('停止截图')
},
// 清除截图
clearCrop() {
this.cropping = false
this.cropW = 0
this.cropH = 0
// console.log('清除截图')
},
// 截图移动
cropMove(e) {
e.preventDefault()
if (!this.canMoveBox) {
this.crop = false
this.startMove(e)
return false
}
if (e.touches && e.touches.length === 2) {
this.crop = false
this.startMove(e)
this.leaveCrop()
return false
}
window.addEventListener('mousemove', this.moveCrop)
window.addEventListener('mouseup', this.leaveCrop)
window.addEventListener('touchmove', this.moveCrop)
window.addEventListener('touchend', this.leaveCrop)
let x = e.clientX ? e.clientX : e.touches[0].clientX
let y = e.clientY ? e.clientY : e.touches[0].clientY
let newX, newY
newX = x - this.cropOffsertX
newY = y - this.cropOffsertY
this.cropX = newX
this.cropY = newY
// 触发截图框移动事件
this.$emit('cropMoving', {
moving: true,
axis: this.getCropAxis()
})
},
moveCrop(e, isMove) {
let nowX = 0
let nowY = 0
if (e) {
e.preventDefault()
nowX = e.clientX ? e.clientX : e.touches[0].clientX
nowY = e.clientY ? e.clientY : e.touches[0].clientY
}
this.$nextTick(() => {
let cx, cy
let fw = nowX - this.cropX
let fh = nowY - this.cropY
if (isMove) {
fw = this.cropOffsertX
fh = this.cropOffsertY
}
// 不能超过外层容器
if (fw <= 0) {
cx = 0
} else if (fw + this.cropW > this.w) {
cx = this.w - this.cropW
} else {
cx = fw
}
if (fh <= 0) {
cy = 0
} else if (fh + this.cropH > this.h) {
cy = this.h - this.cropH
} else {
cy = fh
}
// 不能超过图片
if (this.centerBox) {
let axis = this.getImgAxis()
// 横坐标判断
if (cx <= axis.x1) {
cx = axis.x1
}
if (cx + this.cropW > axis.x2) {
cx = axis.x2 - this.cropW
}
// 纵坐标纵轴
if (cy <= axis.y1) {
cy = axis.y1
}
if (cy + this.cropH > axis.y2) {
cy = axis.y2 - this.cropH
}
}
this.cropOffsertX = cx
this.cropOffsertY = cy
// 触发截图框移动事件
this.$emit('cropMoving', {
moving: true,
axis: this.getCropAxis()
})
})
},
// 算出不同场景下面 图片相对于外层容器的坐标轴
getImgAxis(x, y, scale) {
x = x || this.x
y = y || this.y
scale = scale || this.scale
// 如果设置了截图框在图片内, 那么限制截图框不能超过图片的坐标
// 图片的坐标
let obj = {
x1: 0,
x2: 0,
y1: 0,
y2: 0
}
let imgW = this.trueWidth * scale
let imgH = this.trueHeight * scale
switch (this.rotate) {
case 0:
obj.x1 = x + (this.trueWidth * (1 - scale)) / 2
obj.x2 = obj.x1 + this.trueWidth * scale
obj.y1 = y + (this.trueHeight * (1 - scale)) / 2
obj.y2 = obj.y1 + this.trueHeight * scale
break
case 1:
case -1:
case 3:
case -3:
obj.x1 = x + (this.trueWidth * (1 - scale)) / 2 + (imgW - imgH) / 2
obj.x2 = obj.x1 + this.trueHeight * scale
obj.y1 = y + (this.trueHeight * (1 - scale)) / 2 + (imgH - imgW) / 2
obj.y2 = obj.y1 + this.trueWidth * scale
break
default:
obj.x1 = x + (this.trueWidth * (1 - scale)) / 2
obj.x2 = obj.x1 + this.trueWidth * scale
obj.y1 = y + (this.trueHeight * (1 - scale)) / 2
obj.y2 = obj.y1 + this.trueHeight * scale
break
}
return obj
},
// 获取截图框的坐标轴以及缩放率
getCropAxis() {
let obj = {
x1: 0,
x2: 0,
y1: 0,
y2: 0,
//以下宽高偏移量用于自动截图
cropW: 0,
cropH: 0,
cropOffsertX: 0,
cropOffsertY: 0,
scale: this.scale
}
obj.x1 = this.cropOffsertX
obj.x2 = obj.x1 + this.cropW
obj.cropW = this.cropW
obj.cropOffsertX = this.cropOffsertX
obj.y1 = this.cropOffsertY
obj.y2 = obj.y1 + this.cropH
obj.cropH = this.cropH
obj.cropOffsertY = this.cropOffsertY
return obj
},
leaveCrop(e) {
window.removeEventListener('mousemove', this.moveCrop)
window.removeEventListener('mouseup', this.leaveCrop)
// window.removeEventListener('touchmove', this.moveCrop)
// window.removeEventListener('touchend', this.leaveCrop)
// 触发截图框移动事件
this.$emit('cropMoving', {
moving: false,
axis: this.getCropAxis()
})
},
getCropChecked(cb) {
let canvas = document.createElement('canvas')
let img = new Image()
let rotate = this.rotate
let trueWidth = this.trueWidth
let trueHeight = this.trueHeight
let cropOffsertX = this.cropOffsertX
let cropOffsertY = this.cropOffsertY
img.onload = () => {
if (this.cropW !== 0) {
let ctx = canvas.getContext('2d')
let dpr = 1
if (this.high & !this.full) {
dpr = window.devicePixelRatio
}
if ((this.enlarge !== 1) & !this.full) {
dpr = Math.abs(Number(this.enlarge))
console.log(dpr)
}
let width = this.cropW * dpr
let height = this.cropH * dpr
let imgW = trueWidth * this.scale * dpr
let imgH = trueHeight * this.scale * dpr
// 图片x轴偏移
let dx =
(this.x - cropOffsertX + (this.trueWidth * (1 - this.scale)) / 2) *
dpr
// 图片y轴偏移
let dy =
(this.y - cropOffsertY + (this.trueHeight * (1 - this.scale)) / 2) *
dpr
// console.log(dx, dy)
// 保存状态
setCanvasSize(width, height)
ctx.save()
switch (rotate) {
case 0:
if (!this.full) {
ctx.drawImage(img, dx, dy, imgW, imgH)
} else {
// 输出原图比例截图
setCanvasSize(width / this.scale, height / this.scale)
ctx.drawImage(
img,
dx / this.scale,
dy / this.scale,
imgW / this.scale,
imgH / this.scale
)
}
break
case 1:
case -3:
if (!this.full) {
// 换算图片旋转后的坐标弥补
dx = dx + (imgW - imgH) / 2
dy = dy + (imgH - imgW) / 2
ctx.rotate((rotate * 90 * Math.PI) / 180)
ctx.drawImage(img, dy, -dx - imgH, imgW, imgH)
} else {
setCanvasSize(width / this.scale, height / this.scale)
// 换算图片旋转后的坐标弥补
dx =
dx / this.scale + (imgW / this.scale - imgH / this.scale) / 2
dy =
dy / this.scale + (imgH / this.scale - imgW / this.scale) / 2
ctx.rotate((rotate * 90 * Math.PI) / 180)
ctx.drawImage(
img,
dy,
-dx - imgH / this.scale,
imgW / this.scale,
imgH / this.scale
)
}
break
case 2:
case -2:
if (!this.full) {
ctx.rotate((rotate * 90 * Math.PI) / 180)
ctx.drawImage(img, -dx - imgW, -dy - imgH, imgW, imgH)
} else {
setCanvasSize(width / this.scale, height / this.scale)
ctx.rotate((rotate * 90 * Math.PI) / 180)
dx = dx / this.scale
dy = dy / this.scale
ctx.drawImage(
img,
-dx - imgW / this.scale,
-dy - imgH / this.scale,
imgW / this.scale,
imgH / this.scale
)
}
break
case 3:
case -1:
if (!this.full) {
// 换算图片旋转后的坐标弥补
dx = dx + (imgW - imgH) / 2
dy = dy + (imgH - imgW) / 2
ctx.rotate((rotate * 90 * Math.PI) / 180)
ctx.drawImage(img, -dy - imgW, dx, imgW, imgH)
} else {
setCanvasSize(width / this.scale, height / this.scale)
// 换算图片旋转后的坐标弥补
dx =
dx / this.scale + (imgW / this.scale - imgH / this.scale) / 2
dy =
dy / this.scale + (imgH / this.scale - imgW / this.scale) / 2
ctx.rotate((rotate * 90 * Math.PI) / 180)
ctx.drawImage(
img,
-dy - imgW / this.scale,
dx,
imgW / this.scale,
imgH / this.scale
)
}
break
default:
if (!this.full) {
ctx.drawImage(img, dx, dy, imgW, imgH)
} else {
// 输出原图比例截图
setCanvasSize(width / this.scale, height / this.scale)
ctx.drawImage(
img,
dx / this.scale,
dy / this.scale,
imgW / this.scale,
imgH / this.scale
)
}
}
ctx.restore()
} else {
let width = trueWidth * this.scale
let height = trueHeight * this.scale
let ctx = canvas.getContext('2d')
ctx.save()
switch (rotate) {
case 0:
setCanvasSize(width, height)
ctx.drawImage(img, 0, 0, width, height)
break
case 1:
case -3:
// 旋转90度 或者-270度 宽度和高度对调
setCanvasSize(height, width)
ctx.rotate((rotate * 90 * Math.PI) / 180)
ctx.drawImage(img, 0, -height, width, height)
break
case 2:
case -2:
setCanvasSize(width, height)
ctx.rotate((rotate * 90 * Math.PI) / 180)
ctx.drawImage(img, -width, -height, width, height)
break
case 3:
case -1:
setCanvasSize(height, width)
ctx.rotate((rotate * 90 * Math.PI) / 180)
ctx.drawImage(img, -width, 0, width, height)
break
default:
setCanvasSize(width, height)
ctx.drawImage(img, 0, 0, width, height)
}
ctx.restore()
}
cb(canvas)
}
// 判断图片是否是base64
var s = this.img.substr(0, 4)
if (s !== 'data') {
img.crossOrigin = 'Anonymous'
}
img.src = this.imgs
function setCanvasSize(width, height) {
canvas.width = Math.round(width)
canvas.height = Math.round(height)
}
},
// 获取转换成base64 的图片信息
getCropData(cb) {
this.getCropChecked(data => {
cb(data.toDataURL('image/' + this.outputType, this.outputSize))
})
},
//canvas获取为blob对象
getCropBlob(cb) {
this.getCropChecked(data => {
data.toBlob(
blob => cb(blob),
'image/' + this.outputType,
this.outputSize
)
})
},
// 自动预览函数
showPreview() {
// 优化不要多次触发
if (this.isCanShow) {
this.isCanShow = false
setTimeout(() => {
this.isCanShow = true
}, 16)
} else {
return false
}
let w = this.cropW
let h = this.cropH
let scale = this.scale
var obj = {}
obj.div = {
width: `${w}px`,
height: `${h}px`
}
let transformX = (this.x - this.cropOffsertX) / scale
let transformY = (this.y - this.cropOffsertY) / scale
let transformZ = 0
obj.w = w
obj.h = h
obj.cropOffsertX = this.cropOffsertX
obj.cropOffsertY = this.cropOffsertY
obj.url = this.imgs
obj.img = {
width: `${this.trueWidth}px`,
height: `${this.trueHeight}px`,
transform: `scale(${scale})translate3d(${transformX}px, ${transformY}px, ${transformZ}px)rotateZ(${this
.rotate * 90}deg)`
}
obj.html = `
<div class="show-preview" style="width: ${obj.w}px; height: ${
obj.h
}px,; overflow: hidden">
<div style="width: ${w}px; height: ${h}px">
<img src=${obj.url} style="width: ${this.trueWidth}px; height: ${
this.trueHeight
}px; transform:
scale(${scale})translate3d(${transformX}px, ${transformY}px, ${transformZ}px)rotateZ(${this
.rotate * 90}deg)">
</div>
</div>`
this.$emit('realTime', obj)
},
// reload 图片布局函数
reload() {
let img = new Image()
img.onload = () => {
// 读取图片的信息原始信息, 解析是否需要旋转
// 读取图片的旋转信息
// 得到外层容器的宽度高度
this.w = parseFloat(window.getComputedStyle(this.$refs.cropper).width)
this.h = parseFloat(window.getComputedStyle(this.$refs.cropper).height)
//将容器宽高等于图片宽高
// this.w = img.width
// this.h = img.height
// 存入图片真实高度
this.trueWidth = img.width
this.trueHeight = img.height
// 判断是否需要压缩大图
if (!this.original) {
// 判断布局方式 mode
this.scale = this.checkedMode()
} else {
this.scale = 1
}
this.$nextTick(() => {
this.x =
-(this.trueWidth - this.trueWidth * this.scale) / 2 +
(this.w - this.trueWidth * this.scale) / 2
this.y =
-(this.trueHeight - this.trueHeight * this.scale) / 2 +
(this.h - this.trueHeight * this.scale) / 2
this.loading = false
// // 获取是否开启了自动截图
if (this.autoCrop) {
this.goAutoCrop()
}
// 图片加载成功的回调
this.$emit('imgLoad', 'success')
setTimeout(() => {
this.showPreview()
}, 20)
})
}
img.onerror = () => {
this.$emit('imgLoad', 'error')
}
img.src = this.imgs
},
// 背景布局的函数
checkedMode() {
let scale = 1
// 通过字符串分割
let imgW = this.trueWidth
let imgH = this.trueHeight
const arr = this.mode.split(' ')
switch (arr[0]) {
case 'contain':
if (this.trueWidth > this.w) {
// 如果图片宽度大于容器宽度
scale = this.w / this.trueWidth
}
if (this.trueHeight * scale > this.h) {
scale = this.h / this.trueHeight
}
break
case 'cover':
// 扩展布局 默认填充满整个容器
// 图片宽度大于容器
imgW = this.w
scale = imgW / this.trueWidth
imgH = imgH * scale
// 如果扩展之后高度小于容器的外层高度 继续扩展高度
if (imgH < this.h) {
imgH = this.h
scale = imgH / this.trueHeight
}
break
default:
try {
let str = arr[0]
if (str.search('px') !== -1) {
str = str.replace('px', '')
imgW = parseFloat(str)
scale = imgW / this.trueWidth
}
if (str.search('%') !== -1) {
str = str.replace('%', '')
imgW = (parseFloat(str) / 100) * this.w
scale = imgW / this.trueWidth
}
if (arr.length === 2 && str === 'auto') {
let str2 = arr[1]
if (str2.search('px') !== -1) {
str2 = str2.replace('px', '')
imgH = parseFloat(str2)
scale = imgH / this.trueHeight
}
if (str2.search('%') !== -1) {
str2 = str2.replace('%', '')
imgH = (parseFloat(str2) / 100) * this.h
scale = imgH / this.trueHeight
}
}
} catch (error) {
scale = 1
}
}
return scale
},
// 自动截图函数
goAutoCrop(cw, ch, offX, offY) {
this.clearCrop()
this.cropping = true
let maxWidth = this.w
let maxHeight = this.h
if (this.centerBox) {
let imgW = this.trueWidth * this.scale
let imgH = this.trueHeight * this.scale
maxWidth = imgW < maxWidth ? imgW : maxWidth
maxHeight = imgH < maxHeight ? imgH : maxHeight
}
// 截图框默认大小
// 如果为0 那么计算容器大小 默认为80%
var w = cw ? cw : parseFloat(this.autoCropWidth)
var h = ch ? ch : parseFloat(this.autoCropHeight)
if (w === 0 || h === 0) {
w = maxWidth * 0.8
h = maxHeight * 0.8
}
w = w > maxWidth ? maxWidth : w
h = h > maxHeight ? maxHeight : h
if (this.fixed) {
h = (w / this.fixedNumber[0]) * this.fixedNumber[1]
}
// 如果比例之后 高度大于h
if (h > this.h) {
h = this.h
w = (h / this.fixedNumber[1]) * this.fixedNumber[0]
}
this.changeCrop(w, h, offX, offY)
},
// 手动改变截图框大小函数
changeCrop(w, h, offX, offY) {
let whRate = w / h
if (Number.isNaN(whRate))
whRate = this.fixedNumber[0] / this.fixedNumber[1]
if (this.centerBox) {
// 修复初始化时候在centerBox=true情况下
let axis = this.getImgAxis()
if (w > axis.x2 - axis.x1) {
// 宽度超标
w = axis.x2 - axis.x1
h = w / whRate
}
if (h > axis.y2 - axis.y1) {
// 高度超标
h = axis.y2 - axis.y1
w = h * whRate
}
}
// 判断是否大于容器
this.cropW = w
this.cropH = h
// 居中走一走 (修改后,以传入的cropOffsertX、Y为准)
// this.cropOffsertX = (this.w - w) / 2
// this.cropOffsertY = (this.h - h) / 2
offX ? (this.cropOffsertX = offX) : (this.cropOffsertX = (this.w - w) / 2)
offY ? (this.cropOffsertY = offY) : (this.cropOffsertY = (this.h - h) / 2)
if (this.centerBox) {
this.$nextTick(() => {
this.moveCrop(null, true)
})
}
},
// 重置函数, 恢复组件置初始状态
refresh() {
// console.log('refresh')
let img = this.img
this.imgs = ''
this.scale = 1
this.crop = false
this.rotate = 0
this.w = 0
this.h = 0
this.trueWidth = 0
this.trueHeight = 0
this.clearCrop()
this.$nextTick(() => {
this.checkedImg()
})
},
// 向左边旋转
rotateLeft() {
this.rotate = this.rotate <= -3 ? 0 : this.rotate - 1
},
// 向右边旋转
rotateRight() {
this.rotate = this.rotate >= 3 ? 0 : this.rotate + 1
},
// 清除旋转
rotateClear() {
this.rotate = 0
},
// 图片坐标点校验
checkoutImgAxis(x, y, scale) {
x = x || this.x
y = y || this.y
scale = scale || this.scale
let canGo = true
// 开始校验 如果说缩放之后的坐标在截图框外 则阻止缩放
if (this.centerBox) {
let axis = this.getImgAxis(x, y, scale)
let cropAxis = this.getCropAxis()
// 左边的横坐标 图片不能超过截图框
if (axis.x1 >= cropAxis.x1) {
canGo = false
}
// 右边横坐标
if (axis.x2 <= cropAxis.x2) {
canGo = false
}
// 纵坐标上面
if (axis.y1 >= cropAxis.y1) {
canGo = false
}
// 纵坐标下面
if (axis.y2 <= cropAxis.y2) {
canGo = false
}
}
return canGo
}
},
mounted() {
this.support =
'onwheel' in document.createElement('div')
? 'wheel'
: document.onmousewheel !== undefined
? 'mousewheel'
: 'DOMMouseScroll'
let that = this
var u = navigator.userAgent
this.isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)
// 兼容blob
if (!HTMLCanvasElement.prototype.toBlob) {
Object.defineProperty(HTMLCanvasElement.prototype, 'toBlob', {
value: function(callback, type, quality) {
var binStr = atob(this.toDataURL(type, quality).split(',')[1]),
len = binStr.length,
arr = new Uint8Array(len)
for (var i = 0; i < len; i++) {
arr[i] = binStr.charCodeAt(i)
}
callback(new Blob([arr], { type: that.type || 'image/png' }))
}
})
}
this.showPreview()
this.checkedImg()
},
destroyed() {
window.removeEventListener('mousemove', this.moveCrop)
window.removeEventListener('mouseup', this.leaveCrop)
window.removeEventListener('touchmove', this.moveCrop)
window.removeEventListener('touchend', this.leaveCrop)
}
}
</script>
<style scoped lang="css">
.vue-cropper {
position: relative;
width: 100%;
height: 100%;
box-sizing: border-box;
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
direction: ltr;
touch-action: none;
text-align: left;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC');
}
.cropper-box,
.cropper-box-canvas,
.cropper-drag-box,
.cropper-crop-box,
.cropper-face {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
user-select: none;
}
.cropper-box-canvas img {
position: relative;
text-align: left;
user-select: none;
transform: none;
max-width: none;
max-height: none;
}
.cropper-box {
overflow: hidden;
}
.cropper-move {
cursor: move;
}
.cropper-crop {
cursor: crosshair;
}
.cropper-modal {
background: rgba(0, 0, 0, 0.5);
}
.cropper-crop-box {
/*border: 2px solid #39f;*/
}
.cropper-view-box {
display: block;
overflow: hidden;
width: 100%;
height: 100%;
outline: 1px solid #39f;
outline-color: rgba(51, 153, 255, 0.75);
user-select: none;
}
.cropper-view-box img {
user-select: none;
text-align: left;
max-width: none;
max-height: none;
}
.cropper-face {
top: 0;
left: 0;
background-color: #fff;
opacity: 0.1;
}
.crop-info {
position: absolute;
left: 0px;
min-width: 65px;
text-align: center;
color: white;
line-height: 20px;
background-color: rgba(0, 0, 0, 0.8);
font-size: 12px;
}
.crop-line {
position: absolute;
display: block;
width: 100%;
height: 100%;
opacity: 0.1;
}
.line-w {
top: -3px;
left: 0;
height: 5px;
cursor: n-resize;
}
.line-a {
top: 0;
left: -3px;
width: 5px;
cursor: w-resize;
}
.line-s {
bottom: -3px;
left: 0;
height: 5px;
cursor: s-resize;
}
.line-d {
top: 0;
right: -3px;
width: 5px;
cursor: e-resize;
}
.crop-point {
position: absolute;
width: 8px;
height: 8px;
opacity: 0.75;
background-color: #39f;
border-radius: 100%;
}
.point1 {
top: -4px;
left: -4px;
cursor: nw-resize;
}
.point2 {
top: -5px;
left: 50%;
margin-left: -3px;
cursor: n-resize;
}
.point3 {
top: -4px;
right: -4px;
cursor: ne-resize;
}
.point4 {
top: 50%;
left: -4px;
margin-top: -3px;
cursor: w-resize;
}
.point5 {
top: 50%;
right: -4px;
margin-top: -3px;
cursor: e-resize;
}
.point6 {
bottom: -5px;
left: -4px;
cursor: sw-resize;
}
.point7 {
bottom: -5px;
left: 50%;
margin-left: -3px;
cursor: s-resize;
}
.point8 {
bottom: -5px;
right: -4px;
cursor: se-resize;
}
@media screen and (max-width: 500px) {
.crop-point {
position: absolute;
width: 20px;
height: 20px;
opacity: 0.45;
background-color: #39f;
border-radius: 100%;
}
.point1 {
top: -10px;
left: -10px;
}
.point2,
.point4,
.point5,
.point7 {
display: none;
}
.point3 {
top: -10px;
right: -10px;
}
.point4 {
top: 0;
left: 0;
}
.point6 {
bottom: -10px;
left: -10px;
}
.point8 {
bottom: -10px;
right: -10px;
}
}
</style>
import permission from './permission'
const install = function(Vue) {
Vue.directive('permission', permission)
}
if (window.Vue) {
window['permission'] = permission
Vue.use(install) // eslint-disable-line
}
permission.install = install
export default permission
import store from '@/store'
export default {
inserted(el, binding, vnode) {
const { value } = binding
const roles = store.state.roles
if (value && value instanceof Array && value.length > 0) {
const permissionRoles = value
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
if (!hasPermission) {
el.parentNode && el.parentNode.removeChild(el)
}
} else {
throw new Error(`need roles! Like v-permission="['factory','normal']"`)
}
}
}
/* 改变主题色变量 */
$--color-primary: #409eff;
/* 改变 icon 字体路径变量,必需 */
$--font-path: '~element-ui/lib/theme-chalk/fonts';
@import '~element-ui/packages/theme-chalk/src/index';
import Vue from 'vue'
import SvgIcon from '@/components/iconComponent'
Vue.component('svg-icon', SvgIcon)
const req = require.context('./svg', false, /\.svg$/)
const requireAll = requireContext => requireContext.keys().map(requireContext)
requireAll(req)
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55.1 (78136) - https://sketchapp.com -->
<title>账号管理-白</title>
<desc>Created with Sketch.</desc>
<g id="奇瑞后台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="图标" transform="translate(-23.000000, -131.000000)">
<g id="编组-4" transform="translate(23.000000, 131.000000)">
<g id="账号管理" fill="#FFFFFF" fill-rule="nonzero">
<path d="M10.2230216,8.05755396 C9.4851496,8.02906906 8.80393552,8.45160855 8.50160716,9.12530285 C8.19927879,9.79899715 8.33644267,10.5887935 8.84821755,11.1211026 C9.35999242,11.6534116 10.1437849,11.8215235 10.8288455,11.545918 C11.5139061,11.2703125 11.9629036,10.6062391 11.9634532,9.86781775 C11.9494922,9.39289432 11.7753247,8.93665107 11.4692566,8.57323741 C11.129455,8.25694548 10.6869616,8.07384474 10.2230216,8.05755396 L10.2230216,8.05755396 Z M10.2230216,10.6467146 C9.81930162,10.6131005 9.50875278,10.2756205 9.50875278,9.8705036 C9.50875278,9.46538668 9.81930162,9.12790668 10.2230216,9.09429257 C10.4178006,9.11007026 10.6040891,9.18085988 10.7601918,9.29841727 C10.9065942,9.44997563 10.9792327,9.65807506 10.9589448,9.86781775 C10.9431396,10.2702783 10.6250454,10.595338 10.2230216,10.6198561 L10.2230216,10.6467146 Z" id="形状"></path>
<path d="M13.7790887,8.96 C13.3974741,8.86313379 13.0711026,8.61635671 12.873916,8.27557784 C12.6767294,7.93479897 12.625418,7.52886251 12.7316067,7.14973621 C12.7397811,7.07569471 12.7206831,7.00121265 12.6778897,6.94023981 C12.331848,6.62256644 11.9266321,6.37615136 11.4853717,6.21505995 C11.4130369,6.20722007 11.340353,6.22634744 11.281247,6.26877698 C11.0209363,6.57522731 10.6357013,6.7471014 10.233765,6.73611511 C9.83422948,6.73546094 9.45365256,6.56566509 9.18628297,6.26877698 C9.12953599,6.225711 9.05824525,6.20644323 8.98752998,6.21505995 C8.54460609,6.37602801 8.13760745,6.62241732 7.78964029,6.94023981 C7.72248855,6.98754531 7.70166323,7.07778837 7.74129496,7.14973621 C7.84086816,7.53447 7.78693155,7.94284719 7.59088729,8.28853717 C7.40923551,8.63687962 7.07923085,8.88388909 6.69381295,8.96 C6.64546763,8.96 6.5971223,9.01371703 6.54340528,9.11577938 C6.44660599,9.59438721 6.44660599,10.0875313 6.54340528,10.5661391 C6.54340528,10.6198561 6.5971223,10.6682014 6.69381295,10.7219185 C7.07608824,10.8050007 7.40343248,11.0500189 7.59088729,11.3933813 C7.78725971,11.7409174 7.84117696,12.1510736 7.74129496,12.537554 C7.73460668,12.6090549 7.75159257,12.6807731 7.78964029,12.7416787 C8.13760745,13.0595011 8.54460609,13.3058905 8.98752998,13.4668585 L9.041247,13.4668585 C9.0944142,13.4734903 9.14772828,13.4557189 9.18628297,13.4185132 C9.44559503,13.1168804 9.82528379,12.9457254 10.2230216,12.9511751 C10.634041,12.9446659 11.0270554,13.1195573 11.2973621,13.4292566 C11.3510791,13.4776019 11.3994245,13.4776019 11.5014868,13.4776019 C11.9427472,13.3165105 12.3479631,13.0700954 12.6940048,12.7524221 C12.7477218,12.698705 12.7960671,12.6503597 12.7477218,12.5482974 C12.6182907,12.1794361 12.6506553,11.7730677 12.8368394,11.4293432 C13.0230235,11.0856187 13.3457101,10.8365079 13.7253717,10.7434053 C13.7790887,10.7434053 13.8274341,10.6896882 13.8757794,10.5876259 C13.9779384,10.1095695 13.9779384,9.61532259 13.8757794,9.13726619 C13.8757794,9.06743405 13.8274341,9.01371703 13.7790887,8.96 Z M12.9088729,10.2545803 C12.5570203,10.3738745 12.2571941,10.6110788 12.0601439,10.9260432 C11.8674513,11.2354631 11.812917,11.6113602 11.9097362,11.9627818 C11.6995825,12.1612408 11.4427762,12.3035004 11.1630695,12.3764029 C10.9001251,12.1084012 10.539367,11.9590551 10.1639329,11.9627818 C9.79228538,11.9773991 9.4380279,12.124054 9.16479616,12.3764029 C8.90552032,12.2581748 8.65587259,12.1198807 8.4181295,11.9627818 C8.52125061,11.6117806 8.46633703,11.2332691 8.26772182,10.9260432 C8.07378679,10.6083049 7.77282806,10.3702047 7.41899281,10.2545803 C7.37050545,9.96292879 7.37050545,9.66527265 7.41899281,9.3736211 C7.78078559,9.26252636 8.0899869,9.0239451 8.28920863,8.70215827 C8.48447126,8.39368341 8.53916815,8.01666554 8.43961631,7.66541966 C8.65057904,7.46806986 8.90708761,7.32597519 9.18628297,7.25179856 C9.44922742,7.51980025 9.80998552,7.66914635 10.1854197,7.66541966 C10.5570671,7.65080237 10.9113246,7.50414739 11.1845564,7.25179856 C11.4444148,7.36886747 11.6941537,7.50721202 11.931223,7.66541966 C11.8309713,8.01661891 11.8857103,8.393927 12.0816307,8.70215827 C12.2702379,9.01594747 12.5630021,9.25358071 12.9088729,9.3736211 C12.9573603,9.66527265 12.9573603,9.96292879 12.9088729,10.2545803 L12.9088729,10.2545803 Z M1.51545602,10.8776978 L2.50925659,10.8776978 C2.485191,9.19597558 3.81990192,7.80854717 5.50129496,7.76748201 C5.95305398,7.76791383 6.39837238,7.87464303 6.801247,8.07904077 C6.98750594,7.78214723 7.20348599,7.50497283 7.44585132,7.25179856 C7.35677722,7.2113638 7.27364289,7.15895303 7.198753,7.09601918 C7.74475372,6.60874162 8.06220635,5.9154095 8.07434053,5.18369305 C8.07434053,4.29321926 7.59927844,3.47038755 6.82810553,3.02515066 C6.05693261,2.57991376 5.1068084,2.57991376 4.33563548,3.02515066 C3.56446257,3.47038755 3.08940047,4.29321926 3.08940048,5.18369305 C3.0690725,5.91658356 3.38100313,6.61941459 3.9381295,7.09601918 C2.45694705,7.77021525 1.50876239,9.25030837 1.51545602,10.8776978 L1.51545602,10.8776978 Z M5.50129496,3.63125663 C5.90873661,3.62948611 6.2992156,3.79426079 6.58220695,4.08739519 C6.86519829,4.3805296 7.01612586,4.77656673 7,5.18369305 C7.03332384,5.73956249 6.75569599,6.26807752 6.27908764,6.55608065 C5.80247929,6.84408378 5.20548234,6.84408378 4.72887399,6.55608065 C4.25226564,6.26807752 3.97463779,5.73956249 4.00796163,5.18369305 C3.99340666,4.7779193 4.14411589,4.38360482 4.42560278,4.09097996 C4.70708967,3.7983551 5.09526202,3.63246535 5.50129496,3.63125663 L5.50129496,3.63125663 Z" id="形状"></path>
<path d="M12.978705,0 L1.01592326,0 C0.74521743,0.00563905362 0.487846369,0.118615445 0.30045916,0.314062318 C0.113071952,0.509509191 0.0110275373,0.771407006 0.0167865707,1.04211031 L0.0167865707,11.3933813 C0.0077943878,11.9550253 0.454330229,12.4183663 1.01592326,12.4301199 L6.24796163,12.4301199 C6.15347803,12.0905554 6.08700419,11.7438135 6.04920863,11.3933813 L1.51549161,11.3933813 C1.23359784,11.3736011 1.01523013,11.1387971 1.01592326,10.856211 L1.01592326,1.55779376 C1.01523013,1.27520772 1.23359784,1.04040373 1.51549161,1.0206235 L12.4791367,1.0206235 C12.7610305,1.04040373 12.9793982,1.27520772 12.978705,1.55779376 L12.978705,6.1129976 C13.3416127,6.27160518 13.6798936,6.48144788 13.9832134,6.73611511 L13.9832134,1.04211031 C13.9889659,0.770492956 13.8861881,0.507791018 13.6976439,0.312188988 C13.5090997,0.116586957 13.2503504,0.00422874936 12.978705,0 Z" id="路径"></path>
<path d="M9.48709832,3.63127098 L11.9795683,3.63127098 C12.1204387,3.63685572 12.2567289,3.58067135 12.3527387,3.47743498 C12.4487485,3.37419862 12.4949119,3.23419632 12.4791367,3.09410072 C12.4968375,2.95359324 12.4513335,2.81246879 12.3548898,2.70876591 C12.2584461,2.60506303 12.120989,2.54945504 11.9795683,2.55693046 L9.48709832,2.55693046 C9.34659209,2.55109685 9.21064377,2.60742026 9.11543115,2.71091224 C9.02021852,2.81440422 8.97539973,2.9545668 8.99290168,3.09410072 C8.97728866,3.23323418 9.02275873,3.37230344 9.1175512,3.47533874 C9.21234368,3.57837404 9.3471483,3.63525552 9.48709832,3.63127098 L9.48709832,3.63127098 Z M9.48709832,5.6993765 L10.9858034,5.6993765 C11.1266737,5.70496124 11.2629639,5.64877687 11.3589737,5.5455405 C11.4549835,5.44230413 11.5011469,5.30230183 11.4853717,5.16220624 C11.5011469,5.02211064 11.4549835,4.88210834 11.3589737,4.77887197 C11.2629639,4.6756356 11.1266737,4.61945123 10.9858034,4.62503597 L9.48709832,4.62503597 C9.3471483,4.62105144 9.21234368,4.67793291 9.1175512,4.78096821 C9.02275873,4.88400351 8.97728866,5.02307277 8.99290168,5.16220624 C8.97539973,5.30174015 9.02021852,5.44190273 9.11543115,5.54539471 C9.21064377,5.64888669 9.34659209,5.70521011 9.48709832,5.6993765 L9.48709832,5.6993765 Z" id="形状"></path>
</g>
<rect id="账号管理-灰" x="0" y="0" width="14" height="14"></rect>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55.1 (78136) - https://sketchapp.com -->
<title>账号管理-灰</title>
<desc>Created with Sketch.</desc>
<g id="奇瑞后台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="图标" transform="translate(-57.000000, -131.000000)">
<g id="编组-4" transform="translate(57.000000, 131.000000)">
<g id="账号管理" fill="#A6ADB4" fill-rule="nonzero">
<path d="M10.2230216,8.05755396 C9.4851496,8.02906906 8.80393552,8.45160855 8.50160716,9.12530285 C8.19927879,9.79899715 8.33644267,10.5887935 8.84821755,11.1211026 C9.35999242,11.6534116 10.1437849,11.8215235 10.8288455,11.545918 C11.5139061,11.2703125 11.9629036,10.6062391 11.9634532,9.86781775 C11.9494922,9.39289432 11.7753247,8.93665107 11.4692566,8.57323741 C11.129455,8.25694548 10.6869616,8.07384474 10.2230216,8.05755396 L10.2230216,8.05755396 Z M10.2230216,10.6467146 C9.81930162,10.6131005 9.50875278,10.2756205 9.50875278,9.8705036 C9.50875278,9.46538668 9.81930162,9.12790668 10.2230216,9.09429257 C10.4178006,9.11007026 10.6040891,9.18085988 10.7601918,9.29841727 C10.9065942,9.44997563 10.9792327,9.65807506 10.9589448,9.86781775 C10.9431396,10.2702783 10.6250454,10.595338 10.2230216,10.6198561 L10.2230216,10.6467146 Z" id="形状"></path>
<path d="M13.7790887,8.96 C13.3974741,8.86313379 13.0711026,8.61635671 12.873916,8.27557784 C12.6767294,7.93479897 12.625418,7.52886251 12.7316067,7.14973621 C12.7397811,7.07569471 12.7206831,7.00121265 12.6778897,6.94023981 C12.331848,6.62256644 11.9266321,6.37615136 11.4853717,6.21505995 C11.4130369,6.20722007 11.340353,6.22634744 11.281247,6.26877698 C11.0209363,6.57522731 10.6357013,6.7471014 10.233765,6.73611511 C9.83422948,6.73546094 9.45365256,6.56566509 9.18628297,6.26877698 C9.12953599,6.225711 9.05824525,6.20644323 8.98752998,6.21505995 C8.54460609,6.37602801 8.13760745,6.62241732 7.78964029,6.94023981 C7.72248855,6.98754531 7.70166323,7.07778837 7.74129496,7.14973621 C7.84086816,7.53447 7.78693155,7.94284719 7.59088729,8.28853717 C7.40923551,8.63687962 7.07923085,8.88388909 6.69381295,8.96 C6.64546763,8.96 6.5971223,9.01371703 6.54340528,9.11577938 C6.44660599,9.59438721 6.44660599,10.0875313 6.54340528,10.5661391 C6.54340528,10.6198561 6.5971223,10.6682014 6.69381295,10.7219185 C7.07608824,10.8050007 7.40343248,11.0500189 7.59088729,11.3933813 C7.78725971,11.7409174 7.84117696,12.1510736 7.74129496,12.537554 C7.73460668,12.6090549 7.75159257,12.6807731 7.78964029,12.7416787 C8.13760745,13.0595011 8.54460609,13.3058905 8.98752998,13.4668585 L9.041247,13.4668585 C9.0944142,13.4734903 9.14772828,13.4557189 9.18628297,13.4185132 C9.44559503,13.1168804 9.82528379,12.9457254 10.2230216,12.9511751 C10.634041,12.9446659 11.0270554,13.1195573 11.2973621,13.4292566 C11.3510791,13.4776019 11.3994245,13.4776019 11.5014868,13.4776019 C11.9427472,13.3165105 12.3479631,13.0700954 12.6940048,12.7524221 C12.7477218,12.698705 12.7960671,12.6503597 12.7477218,12.5482974 C12.6182907,12.1794361 12.6506553,11.7730677 12.8368394,11.4293432 C13.0230235,11.0856187 13.3457101,10.8365079 13.7253717,10.7434053 C13.7790887,10.7434053 13.8274341,10.6896882 13.8757794,10.5876259 C13.9779384,10.1095695 13.9779384,9.61532259 13.8757794,9.13726619 C13.8757794,9.06743405 13.8274341,9.01371703 13.7790887,8.96 Z M12.9088729,10.2545803 C12.5570203,10.3738745 12.2571941,10.6110788 12.0601439,10.9260432 C11.8674513,11.2354631 11.812917,11.6113602 11.9097362,11.9627818 C11.6995825,12.1612408 11.4427762,12.3035004 11.1630695,12.3764029 C10.9001251,12.1084012 10.539367,11.9590551 10.1639329,11.9627818 C9.79228538,11.9773991 9.4380279,12.124054 9.16479616,12.3764029 C8.90552032,12.2581748 8.65587259,12.1198807 8.4181295,11.9627818 C8.52125061,11.6117806 8.46633703,11.2332691 8.26772182,10.9260432 C8.07378679,10.6083049 7.77282806,10.3702047 7.41899281,10.2545803 C7.37050545,9.96292879 7.37050545,9.66527265 7.41899281,9.3736211 C7.78078559,9.26252636 8.0899869,9.0239451 8.28920863,8.70215827 C8.48447126,8.39368341 8.53916815,8.01666554 8.43961631,7.66541966 C8.65057904,7.46806986 8.90708761,7.32597519 9.18628297,7.25179856 C9.44922742,7.51980025 9.80998552,7.66914635 10.1854197,7.66541966 C10.5570671,7.65080237 10.9113246,7.50414739 11.1845564,7.25179856 C11.4444148,7.36886747 11.6941537,7.50721202 11.931223,7.66541966 C11.8309713,8.01661891 11.8857103,8.393927 12.0816307,8.70215827 C12.2702379,9.01594747 12.5630021,9.25358071 12.9088729,9.3736211 C12.9573603,9.66527265 12.9573603,9.96292879 12.9088729,10.2545803 L12.9088729,10.2545803 Z M1.51545602,10.8776978 L2.50925659,10.8776978 C2.485191,9.19597558 3.81990192,7.80854717 5.50129496,7.76748201 C5.95305398,7.76791383 6.39837238,7.87464303 6.801247,8.07904077 C6.98750594,7.78214723 7.20348599,7.50497283 7.44585132,7.25179856 C7.35677722,7.2113638 7.27364289,7.15895303 7.198753,7.09601918 C7.74475372,6.60874162 8.06220635,5.9154095 8.07434053,5.18369305 C8.07434053,4.29321926 7.59927844,3.47038755 6.82810553,3.02515066 C6.05693261,2.57991376 5.1068084,2.57991376 4.33563548,3.02515066 C3.56446257,3.47038755 3.08940047,4.29321926 3.08940048,5.18369305 C3.0690725,5.91658356 3.38100313,6.61941459 3.9381295,7.09601918 C2.45694705,7.77021525 1.50876239,9.25030837 1.51545602,10.8776978 L1.51545602,10.8776978 Z M5.50129496,3.63125663 C5.90873661,3.62948611 6.2992156,3.79426079 6.58220695,4.08739519 C6.86519829,4.3805296 7.01612586,4.77656673 7,5.18369305 C7.03332384,5.73956249 6.75569599,6.26807752 6.27908764,6.55608065 C5.80247929,6.84408378 5.20548234,6.84408378 4.72887399,6.55608065 C4.25226564,6.26807752 3.97463779,5.73956249 4.00796163,5.18369305 C3.99340666,4.7779193 4.14411589,4.38360482 4.42560278,4.09097996 C4.70708967,3.7983551 5.09526202,3.63246535 5.50129496,3.63125663 L5.50129496,3.63125663 Z" id="形状"></path>
<path d="M12.978705,0 L1.01592326,0 C0.74521743,0.00563905362 0.487846369,0.118615445 0.30045916,0.314062318 C0.113071952,0.509509191 0.0110275373,0.771407006 0.0167865707,1.04211031 L0.0167865707,11.3933813 C0.0077943878,11.9550253 0.454330229,12.4183663 1.01592326,12.4301199 L6.24796163,12.4301199 C6.15347803,12.0905554 6.08700419,11.7438135 6.04920863,11.3933813 L1.51549161,11.3933813 C1.23359784,11.3736011 1.01523013,11.1387971 1.01592326,10.856211 L1.01592326,1.55779376 C1.01523013,1.27520772 1.23359784,1.04040373 1.51549161,1.0206235 L12.4791367,1.0206235 C12.7610305,1.04040373 12.9793982,1.27520772 12.978705,1.55779376 L12.978705,6.1129976 C13.3416127,6.27160518 13.6798936,6.48144788 13.9832134,6.73611511 L13.9832134,1.04211031 C13.9889659,0.770492956 13.8861881,0.507791018 13.6976439,0.312188988 C13.5090997,0.116586957 13.2503504,0.00422874936 12.978705,0 Z" id="路径"></path>
<path d="M9.48709832,3.63127098 L11.9795683,3.63127098 C12.1204387,3.63685572 12.2567289,3.58067135 12.3527387,3.47743498 C12.4487485,3.37419862 12.4949119,3.23419632 12.4791367,3.09410072 C12.4968375,2.95359324 12.4513335,2.81246879 12.3548898,2.70876591 C12.2584461,2.60506303 12.120989,2.54945504 11.9795683,2.55693046 L9.48709832,2.55693046 C9.34659209,2.55109685 9.21064377,2.60742026 9.11543115,2.71091224 C9.02021852,2.81440422 8.97539973,2.9545668 8.99290168,3.09410072 C8.97728866,3.23323418 9.02275873,3.37230344 9.1175512,3.47533874 C9.21234368,3.57837404 9.3471483,3.63525552 9.48709832,3.63127098 L9.48709832,3.63127098 Z M9.48709832,5.6993765 L10.9858034,5.6993765 C11.1266737,5.70496124 11.2629639,5.64877687 11.3589737,5.5455405 C11.4549835,5.44230413 11.5011469,5.30230183 11.4853717,5.16220624 C11.5011469,5.02211064 11.4549835,4.88210834 11.3589737,4.77887197 C11.2629639,4.6756356 11.1266737,4.61945123 10.9858034,4.62503597 L9.48709832,4.62503597 C9.3471483,4.62105144 9.21234368,4.67793291 9.1175512,4.78096821 C9.02275873,4.88400351 8.97728866,5.02307277 8.99290168,5.16220624 C8.97539973,5.30174015 9.02021852,5.44190273 9.11543115,5.54539471 C9.21064377,5.64888669 9.34659209,5.70521011 9.48709832,5.6993765 L9.48709832,5.6993765 Z" id="形状"></path>
</g>
<rect id="账号管理-灰" x="0" y="0" width="14" height="14"></rect>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55.1 (78136) - https://sketchapp.com -->
<title>首页-白</title>
<desc>Created with Sketch.</desc>
<g id="奇瑞后台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="图标" transform="translate(-23.000000, -263.000000)">
<g id="编组" transform="translate(23.000000, 263.000000)">
<path d="M13.8237634,5.9772172 L7.90871505,1.30222645 C7.39952808,0.899009055 6.60060637,0.899506723 6.09185284,1.30222645 L0.177318171,5.9772172 C-0.0247159515,6.1373194 -0.0592632085,6.43084278 0.100325266,6.6328769 C0.259913757,6.83497523 0.54696755,6.86952251 0.749081932,6.70995006 L0.933376855,6.55869338 L0.933376855,12.2114426 C0.933376855,13.0127402 1.77769805,13.6115061 2.52014332,13.6115061 L11.8542158,13.6115061 C12.5879118,13.6115061 13.0676887,13.0487002 13.0676887,12.2114426 L13.0676887,6.58062254 L13.238017,6.70995006 C13.3239196,6.77759978 13.4293755,6.81028485 13.5306414,6.81028485 C13.6683007,6.81028485 13.8064577,6.74961843 13.8983804,6.6328769 C14.0584826,6.43084278 14.0262952,6.1373194 13.8237634,5.9772172 L13.8237634,5.9772172 Z M6.53379144,12.6781036 L6.53379144,10.0907185 C6.53379144,9.96193677 6.76716211,9.89754593 7.00053278,9.89754593 C7.23390345,9.89754593 7.46725807,9.96193677 7.46725807,10.0907185 L7.46725807,12.6781036 L6.53379144,12.6781036 L6.53379144,12.6781036 Z M12.1342863,12.2114265 C12.1342863,12.5208429 12.0488331,12.6781036 11.8542158,12.6781036 L8.40997157,12.6781036 C8.40997157,12.6711043 8.40064444,12.6655176 8.40064444,12.6585344 L8.40064444,10.0907185 C8.40064444,9.54794743 7.96289584,8.96361372 7.00053278,8.96361372 C6.03821788,8.96361372 5.60040506,9.54794743 5.60040506,10.0907185 L5.60040506,12.6585504 C5.60040506,12.6655337 5.61302317,12.6711203 5.61302317,12.6781036 L2.52014335,12.6781036 C2.22755107,12.6781036 1.86676326,12.4251637 1.86676326,12.2114426 L1.86676326,5.82083943 L6.66405007,2.03452587 C6.8362406,1.89821505 7.14706974,1.89821505 7.31977399,2.03452587 L12.1342863,5.84276861 L12.1342863,12.2114265 L12.1342863,12.2114265 Z" id="形状" fill="#FFFFFF" fill-rule="nonzero"></path>
<rect id="首页-白" x="0" y="0" width="14" height="14"></rect>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55.1 (78136) - https://sketchapp.com -->
<title>首页-灰</title>
<desc>Created with Sketch.</desc>
<g id="奇瑞后台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="图标" transform="translate(-57.000000, -263.000000)">
<g id="编组" transform="translate(57.000000, 263.000000)">
<path d="M13.8237634,5.9772172 L7.90871505,1.30222645 C7.39952808,0.899009055 6.60060637,0.899506723 6.09185284,1.30222645 L0.177318171,5.9772172 C-0.0247159515,6.1373194 -0.0592632085,6.43084278 0.100325266,6.6328769 C0.259913757,6.83497523 0.54696755,6.86952251 0.749081932,6.70995006 L0.933376855,6.55869338 L0.933376855,12.2114426 C0.933376855,13.0127402 1.77769805,13.6115061 2.52014332,13.6115061 L11.8542158,13.6115061 C12.5879118,13.6115061 13.0676887,13.0487002 13.0676887,12.2114426 L13.0676887,6.58062254 L13.238017,6.70995006 C13.3239196,6.77759978 13.4293755,6.81028485 13.5306414,6.81028485 C13.6683007,6.81028485 13.8064577,6.74961843 13.8983804,6.6328769 C14.0584826,6.43084278 14.0262952,6.1373194 13.8237634,5.9772172 L13.8237634,5.9772172 Z M6.53379144,12.6781036 L6.53379144,10.0907185 C6.53379144,9.96193677 6.76716211,9.89754593 7.00053278,9.89754593 C7.23390345,9.89754593 7.46725807,9.96193677 7.46725807,10.0907185 L7.46725807,12.6781036 L6.53379144,12.6781036 L6.53379144,12.6781036 Z M12.1342863,12.2114265 C12.1342863,12.5208429 12.0488331,12.6781036 11.8542158,12.6781036 L8.40997157,12.6781036 C8.40997157,12.6711043 8.40064444,12.6655176 8.40064444,12.6585344 L8.40064444,10.0907185 C8.40064444,9.54794743 7.96289584,8.96361372 7.00053278,8.96361372 C6.03821788,8.96361372 5.60040506,9.54794743 5.60040506,10.0907185 L5.60040506,12.6585504 C5.60040506,12.6655337 5.61302317,12.6711203 5.61302317,12.6781036 L2.52014335,12.6781036 C2.22755107,12.6781036 1.86676326,12.4251637 1.86676326,12.2114426 L1.86676326,5.82083943 L6.66405007,2.03452587 C6.8362406,1.89821505 7.14706974,1.89821505 7.31977399,2.03452587 L12.1342863,5.84276861 L12.1342863,12.2114265 L12.1342863,12.2114265 Z" id="形状" fill="#A6ADB4" fill-rule="nonzero"></path>
<rect id="首页-灰" x="0" y="0" width="14" height="14"></rect>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55.1 (78136) - https://sketchapp.com -->
<title>角色权限-白</title>
<desc>Created with Sketch.</desc>
<g id="奇瑞后台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="图标" transform="translate(-23.000000, -87.000000)" fill="#FFFFFF" fill-rule="nonzero">
<g id="角色权限-白" transform="translate(23.000000, 87.000000)">
<path d="M11.6451085,6.69136043 C10.6179505,6.69136043 9.78247041,7.52752414 9.78247043,8.55563911 C9.78247043,9.02540014 9.95828902,9.45387252 10.2458057,9.78213104 L9.2224759,10.8062812 L8.6996685,10.2863449 C8.5089477,10.0974014 8.20188039,10.0983584 8.01252677,10.2885323 C7.82344659,10.4791164 7.82467704,10.787004 8.01471424,10.9763577 L8.53533417,11.4941065 L8.02633523,12.0035156 L6.91058441,10.8868078 C6.72082064,10.6969073 6.41347988,10.6969073 6.22371612,10.8868078 C6.03395235,11.0767082 6.03395235,11.3843224 6.22371612,11.5742229 L7.33946694,12.6909308 L6.86068255,13.1701253 C6.67091879,13.3600258 6.67091879,13.66764 6.86068255,13.8575405 C6.95556444,13.9525591 7.07984056,14 7.20411669,14 C7.32839282,14 7.45266895,13.9525591 7.54755084,13.8575405 L11.0729461,10.3290007 C11.2534131,10.387379 11.4453643,10.4197811 11.6449718,10.4197811 C12.6721297,10.4197811 13.5076098,9.58361734 13.5076098,8.55550239 C13.5076098,7.52738744 12.6722664,6.69136043 11.6451085,6.69136043 L11.6451085,6.69136043 Z M11.6451085,9.4474468 C11.1536094,9.4474468 10.7539844,9.04741165 10.7539844,8.55550239 C10.7539844,8.06359313 11.1537461,7.66355797 11.6451085,7.66355797 C12.1366076,7.66355797 12.5362326,8.06359313 12.5362326,8.55550239 C12.5362326,9.04741165 12.1364709,9.4474468 11.6451085,9.4474468 Z" id="形状"></path>
<path d="M5.08841471,13.0200096 L0.992497666,13.0200096 C1.23722184,10.1929669 3.59395664,7.96789094 6.45558885,7.96789094 C6.51752184,7.96789094 6.57631033,7.95517622 6.63086058,7.93398502 C8.7374025,7.84060703 10.4238118,6.09062412 10.4238118,3.94703177 C10.4238118,1.77049052 8.64361436,0 6.45558885,0 C4.26770006,0 2.48763931,1.77049052 2.48763931,3.94689505 C2.48763931,5.38393181 3.24737798,6.64241561 4.38117552,7.346647 C1.8374113,8.22081816 6.5953125e-05,10.648646 6.5953125e-05,13.50604 C6.5953125e-05,13.7744163 0.217583365,13.9922071 0.485822928,13.9922071 L5.08841471,13.9922071 C5.35665427,13.9922071 5.57417168,13.7744163 5.57417168,13.50604 C5.57417168,13.2376637 5.35665427,13.0200096 5.08841471,13.0200096 Z M3.45915326,3.94689505 C3.45915326,2.30669623 4.80322217,0.972334248 6.45558885,0.972334248 C8.10795553,0.972334248 9.45229787,2.30669622 9.45229787,3.94689505 C9.45229787,5.61430064 8.10795553,6.9705374 6.45558885,6.9705374 C4.80322217,6.9705374 3.45915326,5.61430064 3.45915326,3.94689505 Z" id="形状"></path>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55.1 (78136) - https://sketchapp.com -->
<title>角色权限-灰</title>
<desc>Created with Sketch.</desc>
<g id="奇瑞后台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="图标" transform="translate(-57.000000, -87.000000)" fill="#A6ADB4" fill-rule="nonzero">
<g id="角色权限-灰" transform="translate(57.000000, 87.000000)">
<path d="M11.6451085,6.69136043 C10.6179505,6.69136043 9.78247041,7.52752414 9.78247043,8.55563911 C9.78247043,9.02540014 9.95828902,9.45387252 10.2458057,9.78213104 L9.2224759,10.8062812 L8.6996685,10.2863449 C8.5089477,10.0974014 8.20188039,10.0983584 8.01252677,10.2885323 C7.82344659,10.4791164 7.82467704,10.787004 8.01471424,10.9763577 L8.53533417,11.4941065 L8.02633523,12.0035156 L6.91058441,10.8868078 C6.72082064,10.6969073 6.41347988,10.6969073 6.22371612,10.8868078 C6.03395235,11.0767082 6.03395235,11.3843224 6.22371612,11.5742229 L7.33946694,12.6909308 L6.86068255,13.1701253 C6.67091879,13.3600258 6.67091879,13.66764 6.86068255,13.8575405 C6.95556444,13.9525591 7.07984056,14 7.20411669,14 C7.32839282,14 7.45266895,13.9525591 7.54755084,13.8575405 L11.0729461,10.3290007 C11.2534131,10.387379 11.4453643,10.4197811 11.6449718,10.4197811 C12.6721297,10.4197811 13.5076098,9.58361734 13.5076098,8.55550239 C13.5076098,7.52738744 12.6722664,6.69136043 11.6451085,6.69136043 L11.6451085,6.69136043 Z M11.6451085,9.4474468 C11.1536094,9.4474468 10.7539844,9.04741165 10.7539844,8.55550239 C10.7539844,8.06359313 11.1537461,7.66355797 11.6451085,7.66355797 C12.1366076,7.66355797 12.5362326,8.06359313 12.5362326,8.55550239 C12.5362326,9.04741165 12.1364709,9.4474468 11.6451085,9.4474468 Z" id="形状"></path>
<path d="M5.08841471,13.0200096 L0.992497666,13.0200096 C1.23722184,10.1929669 3.59395664,7.96789094 6.45558885,7.96789094 C6.51752184,7.96789094 6.57631033,7.95517622 6.63086058,7.93398502 C8.7374025,7.84060703 10.4238118,6.09062412 10.4238118,3.94703177 C10.4238118,1.77049052 8.64361436,0 6.45558885,0 C4.26770006,0 2.48763931,1.77049052 2.48763931,3.94689505 C2.48763931,5.38393181 3.24737798,6.64241561 4.38117552,7.346647 C1.8374113,8.22081816 6.5953125e-05,10.648646 6.5953125e-05,13.50604 C6.5953125e-05,13.7744163 0.217583365,13.9922071 0.485822928,13.9922071 L5.08841471,13.9922071 C5.35665427,13.9922071 5.57417168,13.7744163 5.57417168,13.50604 C5.57417168,13.2376637 5.35665427,13.0200096 5.08841471,13.0200096 Z M3.45915326,3.94689505 C3.45915326,2.30669623 4.80322217,0.972334248 6.45558885,0.972334248 C8.10795553,0.972334248 9.45229787,2.30669622 9.45229787,3.94689505 C9.45229787,5.61430064 8.10795553,6.9705374 6.45558885,6.9705374 C4.80322217,6.9705374 3.45915326,5.61430064 3.45915326,3.94689505 Z" id="形状"></path>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55.1 (78136) - https://sketchapp.com -->
<title>合作商管理-白</title>
<desc>Created with Sketch.</desc>
<g id="奇瑞后台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="图标" transform="translate(-23.000000, -175.000000)">
<g id="编组-5" transform="translate(23.000000, 175.000000)">
<g id="二级-管理员首页" fill="#FFFFFF" fill-rule="nonzero">
<path d="M8.75273438,7 C9.80273438,6.3 10.5902344,5.1625 10.5902344,3.7625 C10.5027344,1.6625 8.84023437,0 6.74023438,0 C4.64023437,0 2.97773437,1.6625 2.97773437,3.7625 C2.97773437,5.1625 3.67773438,6.3 4.81523438,7 C2.01523438,7.875 0.002734375,10.5 0.002734375,13.5625 C0.002734375,13.825 0.177734375,14 0.440234375,14 C0.702734375,14 0.877734375,13.825 0.877734375,13.5625 C0.877734375,10.4125 3.32773438,7.875 6.30273438,7.6125 C6.04023438,8.225 5.42773438,9.8875 5.42773438,11.2 C5.42773438,13.0375 6.56523438,13.5625 6.65273437,13.5625 L7.00273438,13.5625 C7.09023437,13.5625 8.22773438,13.0375 8.22773438,11.2 C8.22773438,9.8875 7.61523438,8.225 7.35273438,7.6125 C10.4152344,7.875 12.7777344,10.4125 12.7777344,13.5625 C12.7777344,13.825 12.9527344,14 13.2152344,14 C13.4777344,14 13.6527344,13.825 13.6527344,13.5625 C13.5652344,10.5 11.5527344,7.875 8.75273438,7 Z M3.85273438,3.7625 C3.85273438,2.1875 5.16523438,0.875 6.74023438,0.875 C8.31523438,0.875 9.62773438,2.1875 9.62773438,3.7625 C9.62773438,5.3375 8.31523438,6.7375 6.74023438,6.7375 C5.16523438,6.7375 3.85273438,5.425 3.85273438,3.7625 Z M6.74023438,12.6875 C6.56523438,12.5125 6.21523438,12.075 6.21523438,11.2875 C6.21523438,10.5 6.47773438,9.5375 6.74023438,8.8375 C7.00273438,9.5375 7.26523438,10.5 7.26523438,11.2875 C7.26523438,12.075 6.91523437,12.5125 6.74023438,12.6875 L6.74023438,12.6875 Z" id="形状"></path>
</g>
<rect id="合作商管理-灰" x="0" y="0" width="14" height="14"></rect>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55.1 (78136) - https://sketchapp.com -->
<title>合作商管理-灰</title>
<desc>Created with Sketch.</desc>
<g id="奇瑞后台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="图标" transform="translate(-57.000000, -175.000000)">
<g id="编组-5" transform="translate(57.000000, 175.000000)">
<g id="二级-管理员首页" fill="#A6ADB4" fill-rule="nonzero">
<path d="M8.75273438,7 C9.80273438,6.3 10.5902344,5.1625 10.5902344,3.7625 C10.5027344,1.6625 8.84023437,0 6.74023438,0 C4.64023437,0 2.97773437,1.6625 2.97773437,3.7625 C2.97773437,5.1625 3.67773438,6.3 4.81523438,7 C2.01523438,7.875 0.002734375,10.5 0.002734375,13.5625 C0.002734375,13.825 0.177734375,14 0.440234375,14 C0.702734375,14 0.877734375,13.825 0.877734375,13.5625 C0.877734375,10.4125 3.32773438,7.875 6.30273438,7.6125 C6.04023438,8.225 5.42773438,9.8875 5.42773438,11.2 C5.42773438,13.0375 6.56523438,13.5625 6.65273437,13.5625 L7.00273438,13.5625 C7.09023437,13.5625 8.22773438,13.0375 8.22773438,11.2 C8.22773438,9.8875 7.61523438,8.225 7.35273438,7.6125 C10.4152344,7.875 12.7777344,10.4125 12.7777344,13.5625 C12.7777344,13.825 12.9527344,14 13.2152344,14 C13.4777344,14 13.6527344,13.825 13.6527344,13.5625 C13.5652344,10.5 11.5527344,7.875 8.75273438,7 Z M3.85273438,3.7625 C3.85273438,2.1875 5.16523438,0.875 6.74023438,0.875 C8.31523438,0.875 9.62773438,2.1875 9.62773438,3.7625 C9.62773438,5.3375 8.31523438,6.7375 6.74023438,6.7375 C5.16523438,6.7375 3.85273438,5.425 3.85273438,3.7625 Z M6.74023438,12.6875 C6.56523438,12.5125 6.21523438,12.075 6.21523438,11.2875 C6.21523438,10.5 6.47773438,9.5375 6.74023438,8.8375 C7.00273438,9.5375 7.26523438,10.5 7.26523438,11.2875 C7.26523438,12.075 6.91523437,12.5125 6.74023438,12.6875 L6.74023438,12.6875 Z" id="形状"></path>
</g>
<rect id="合作商管理-灰" x="0" y="0" width="14" height="14"></rect>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55.1 (78136) - https://sketchapp.com -->
<title>报表管理-白</title>
<desc>Created with Sketch.</desc>
<g id="奇瑞后台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="图标" transform="translate(-23.000000, -219.000000)">
<g id="编组-6" transform="translate(23.000000, 219.000000)">
<g id="Group-5-Copy" transform="translate(0.000000, 1.000000)" fill="#FFFFFF" fill-rule="nonzero">
<g id="列表" transform="translate(0.000000, 1.000000)">
<path d="M13.015625,0 L0.984375,0 C0.440234375,0 0,0.461197917 0,1.03125 L0,4.23958333 L0,5.15625 L0,7.10416667 L0,8.02083333 L0,9.96875 C0,10.5388021 0.440234375,11 0.984375,11 L4.375,11 L5.25,11 L8.75,11 L9.625,11 L13.015625,11 C13.5597656,11 14,10.5388021 14,9.96875 L14,8.02083333 L14,7.10416667 L14,5.15625 L14,4.23958333 L14,1.03125 C14,0.461197917 13.5597656,0 13.015625,0 Z M5.25,4.23958333 L5.25,2.29166667 L8.75,2.29166667 L8.75,4.23958333 L5.25,4.23958333 Z M8.75,5.15625 L8.75,7.10416667 L5.25,7.10416667 L5.25,5.15625 L8.75,5.15625 Z M0.984375,2.29166667 L4.375,2.29166667 L4.375,4.23958333 L0.984375,4.23958333 L0.984375,2.29166667 Z M0.984375,5.15625 L4.375,5.15625 L4.375,7.10416667 L0.984375,7.10416667 L0.984375,5.15625 Z M0.984375,9.96875 L0.984375,8.02083333 L4.375,8.02083333 L4.375,9.96875 L0.984375,9.96875 Z M5.25,9.96875 L5.25,8.02083333 L8.75,8.02083333 L8.75,9.96875 L5.25,9.96875 Z M13.015625,9.96875 L9.625,9.96875 L9.625,8.02083333 L13.015625,8.02083333 L13.015625,9.96875 Z M13.015625,7.10416667 L9.625,7.10416667 L9.625,5.15625 L13.015625,5.15625 L13.015625,7.10416667 Z M9.625,4.23958333 L9.625,2.29166667 L13.015625,2.29166667 L13.015625,4.23958333 L9.625,4.23958333 Z" id="Shape"></path>
</g>
</g>
<rect id="报表管理-灰" x="0" y="0" width="14" height="14"></rect>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55.1 (78136) - https://sketchapp.com -->
<title>报表管理-灰</title>
<desc>Created with Sketch.</desc>
<g id="奇瑞后台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="图标" transform="translate(-57.000000, -219.000000)">
<g id="编组-6" transform="translate(57.000000, 219.000000)">
<g id="Group-5-Copy" opacity="0.65" transform="translate(0.000000, 1.000000)" fill="#FFFFFF" fill-rule="nonzero">
<g id="列表" transform="translate(0.000000, 1.000000)">
<path d="M13.015625,0 L0.984375,0 C0.440234375,0 0,0.461197917 0,1.03125 L0,4.23958333 L0,5.15625 L0,7.10416667 L0,8.02083333 L0,9.96875 C0,10.5388021 0.440234375,11 0.984375,11 L4.375,11 L5.25,11 L8.75,11 L9.625,11 L13.015625,11 C13.5597656,11 14,10.5388021 14,9.96875 L14,8.02083333 L14,7.10416667 L14,5.15625 L14,4.23958333 L14,1.03125 C14,0.461197917 13.5597656,0 13.015625,0 Z M5.25,4.23958333 L5.25,2.29166667 L8.75,2.29166667 L8.75,4.23958333 L5.25,4.23958333 Z M8.75,5.15625 L8.75,7.10416667 L5.25,7.10416667 L5.25,5.15625 L8.75,5.15625 Z M0.984375,2.29166667 L4.375,2.29166667 L4.375,4.23958333 L0.984375,4.23958333 L0.984375,2.29166667 Z M0.984375,5.15625 L4.375,5.15625 L4.375,7.10416667 L0.984375,7.10416667 L0.984375,5.15625 Z M0.984375,9.96875 L0.984375,8.02083333 L4.375,8.02083333 L4.375,9.96875 L0.984375,9.96875 Z M5.25,9.96875 L5.25,8.02083333 L8.75,8.02083333 L8.75,9.96875 L5.25,9.96875 Z M13.015625,9.96875 L9.625,9.96875 L9.625,8.02083333 L13.015625,8.02083333 L13.015625,9.96875 Z M13.015625,7.10416667 L9.625,7.10416667 L9.625,5.15625 L13.015625,5.15625 L13.015625,7.10416667 Z M9.625,4.23958333 L9.625,2.29166667 L13.015625,2.29166667 L13.015625,4.23958333 L9.625,4.23958333 Z" id="Shape"></path>
</g>
</g>
<rect id="报表管理-灰" x="0" y="0" width="14" height="14"></rect>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="48px" height="20px" viewBox="0 0 48 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55.1 (78136) - https://sketchapp.com -->
<title>近7天</title>
<desc>Created with Sketch.</desc>
<g id="奇瑞后台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="标准列表" transform="translate(-1324.000000, -172.000000)" fill="#1890FF">
<g id="编组-7" transform="translate(280.000000, 142.000000)">
<g id="近7天" transform="translate(1044.000000, 30.000000)">
<rect id="矩形" stroke="#1890FF" stroke-width="0.5" fill-opacity="0.04" x="0.25" y="0.25" width="47.5" height="19.5" rx="2"></rect>
<text font-family="PingFangSC-Regular, PingFang SC" font-size="13" font-weight="normal" line-spacing="14" letter-spacing="1">
<tspan x="5.0085" y="16.624">近7天</tspan>
</text>
</g>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="18px" height="16px" viewBox="0 0 18 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55.1 (78136) - https://sketchapp.com -->
<title>Group</title>
<desc>Created with Sketch.</desc>
<g id="奇瑞后台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="标准列表" transform="translate(-281.000000, -24.000000)">
<g id="Group" transform="translate(290.000000, 32.000000) scale(-1, 1) translate(-290.000000, -32.000000) translate(280.000000, 22.000000)">
<rect id="Rectangle-9" x="0" y="0" width="20" height="20"></rect>
<rect id="Combined-Shape" fill-opacity="0.65" fill="#000000" x="1.25" y="2.5" width="17.5" height="1.875" rx="0.9375"></rect>
<rect id="Rectangle-Copy" fill-opacity="0.65" fill="#000000" x="1.25" y="9.0625" width="11.25" height="1.875" rx="0.9375"></rect>
<path d="M13.0947111,7.8250177 L17.3692475,7.53744049 C17.5414472,7.52585544 17.6904342,7.65605936 17.7020193,7.82825908 C17.7029688,7.8423724 17.7029589,7.85653391 17.7019898,7.87064589 L17.4088387,12.1393768 C17.4029264,12.2254685 17.3283424,12.2904668 17.2422507,12.2845545 C17.2045995,12.2819688 17.1691565,12.2658432 17.1424704,12.2391571 L12.994714,8.09140072 C12.9336946,8.0303813 12.9336946,7.93144927 12.994714,7.87042985 C13.021453,7.84369083 13.0569817,7.82755601 13.0947111,7.8250177 Z" id="Rectangle-6" fill-opacity="0.65" fill="#000000"></path>
<rect id="Rectangle-Copy-2" fill-opacity="0.65" fill="#000000" x="1.25" y="15.625" width="17.5" height="1.875" rx="0.9375"></rect>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55.1 (78136) - https://sketchapp.com -->
<title>用户</title>
<desc>Created with Sketch.</desc>
<defs>
<rect id="path-1" x="0" y="0" width="20.5333333" height="20.5333333" rx="10.2666667"></rect>
<filter x="-73.1%" y="-73.1%" width="246.1%" height="246.1%" filterUnits="objectBoundingBox" id="filter-3">
<feOffset dx="0" dy="0" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0.839215686 0 0 0 0 0.839215686 0 0 0 0 0.839215686 0 0 0 0.56173514 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
<path d="M9.12592593,0 C14.1660356,-9.25853135e-16 18.2518519,4.08581621 18.2518519,9.12592593 C18.2518519,14.1660356 14.1660356,18.2518519 9.12592593,18.2518519 C4.08581621,18.2518519 6.17235423e-16,14.1660356 0,9.12592593 C-6.17235423e-16,4.08581621 4.08581621,9.25853135e-16 9.12592593,0 Z" id="path-4"></path>
<linearGradient x1="37.9394531%" y1="0%" x2="50%" y2="137.329102%" id="linearGradient-6">
<stop stop-color="#E4E8F0" offset="0%"></stop>
<stop stop-color="#D4DDE6" offset="100%"></stop>
</linearGradient>
<linearGradient x1="36.9648438%" y1="30.46875%" x2="56.9830204%" y2="68.7200429%" id="linearGradient-7">
<stop stop-color="#DFE5EC" offset="0%"></stop>
<stop stop-color="#D6DDED" offset="100%"></stop>
</linearGradient>
</defs>
<g id="奇瑞后台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="标准列表" transform="translate(-1305.000000, -18.000000)">
<g id="编组-5" transform="translate(1305.000000, 18.000000)">
<g id="编组-3" transform="translate(3.733333, 3.733333)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="Mask">
<use fill="black" fill-opacity="1" filter="url(#filter-3)" xlink:href="#path-1"></use>
<use fill="#FFFFFF" fill-rule="evenodd" xlink:href="#path-1"></use>
</g>
<g id="Group" mask="url(#mask-2)">
<g transform="translate(1.140741, 1.140741)">
<mask id="mask-5" fill="white">
<use xlink:href="#path-4"></use>
</mask>
<use id="Rectangle-16" stroke="none" fill="#F2F4F9" fill-rule="evenodd" xlink:href="#path-4"></use>
<g id="通用" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" mask="url(#mask-5)">
<g transform="translate(2.281481, 3.137037)" id="编组-2">
<g transform="translate(0.095062, 0.095062)">
<path d="M6.70185182,0 C8.07732435,0 9.34831338,0.73380583 10.0360497,1.92499998 C10.7237859,3.11619414 10.7237859,4.58380586 10.0360497,5.77500002 C9.34831338,6.96619417 8.07732435,7.7 6.70185182,7.7 C4.57555555,7.7 2.85185185,5.97629629 2.85185185,3.85 C2.85185185,1.72370371 4.57555555,0 6.70185182,0 Z" id="路径" fill="url(#linearGradient-6)" fill-rule="nonzero"></path>
<path d="M0.000589300402,15.2355823 C-0.0387694808,11.3476639 1.89836705,8.9336627 4.32663273,7.98518519 L6.81992595,12.0661566 L9.44669678,8.07919358 C11.7893999,9.08642633 13.6512414,11.4718892 13.6888889,15.2389398 C9.38166923,16.9143036 4.84171938,17.0351715 0.000589300402,15.2355823 L0.000589300402,15.2355823 Z" id="路径" fill="url(#linearGradient-7)" fill-rule="nonzero"></path>
</g>
</g>
</g>
</g>
</g>
</g>
<rect id="客户" x="0" y="0" width="28" height="28"></rect>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55.1 (78136) - https://sketchapp.com -->
<title>任务管理-白</title>
<desc>Created with Sketch.</desc>
<g id="奇瑞后台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="图标" transform="translate(-23.000000, -42.000000)">
<g id="编组-3" transform="translate(23.000000, 42.000000)">
<g id="任务" transform="translate(1.000000, 0.000000)" fill="#FFFFFF" fill-rule="nonzero">
<path d="M8.17930744,8.04981368 C8.13130606,7.87535135 8.06135226,7.71009841 7.97349567,7.55611875 C8.07323534,7.4212771 8.41800092,6.91859168 8.16951953,6.67036046 L8.04226116,6.53597224 C7.83011697,6.32364042 7.28793596,6.65510009 7.15623707,6.74098659 C7.00053749,6.65253584 6.8329392,6.58248823 6.65624098,6.53481521 C6.6280343,6.36627878 6.50426268,5.77745669 6.15507221,5.77745669 L6.01525843,5.77745669 C5.71525765,5.77745669 5.54321884,6.38632365 5.50498973,6.53902119 C5.33038668,6.58761672 5.165337,6.65788323 5.01196713,6.74600562 C4.89077539,6.65591314 4.37142239,6.29695041 4.11804705,6.55032575 L3.98331485,6.66349642 C3.76257106,6.88449038 4.12947669,7.46710512 4.19683497,7.56908068 C4.11177716,7.72062118 4.04371527,7.88273137 3.99660513,8.05416039 C3.85025566,8.07723857 3.22503383,8.19797689 3.22503383,8.55789339 L3.22503383,8.69761336 C3.22503383,9.00938777 3.88097967,9.18258361 4.00076421,9.21149389 C4.04810889,9.38128116 4.11638967,9.54248448 4.20149439,9.69271159 C4.13108716,9.8031773 3.77815978,10.3832591 3.99705856,10.6023768 L4.1245671,10.7083081 C4.41266917,10.9961757 5.01454701,10.5231354 5.01454701,10.5231354 L4.98655924,10.4933026 C5.14792218,10.5889706 5.32111447,10.6631036 5.50172189,10.7138119 C5.5317892,10.8366454 5.70473487,11.4879005 6.01525843,11.4879005 L6.15507221,11.4879005 C6.56253666,11.4879005 6.66346464,10.7273367 6.66346464,10.7273367 L6.62617366,10.7266174 C6.81079915,10.6796324 6.98609017,10.6083183 7.14809091,10.5174128 C7.27559945,10.6019077 7.80869616,10.9358221 8.02126251,10.7229118 L8.16298384,10.5812843 C8.4471301,10.2972475 7.98489404,9.71600867 7.97207283,9.6998258 C8.05996069,9.54609631 8.13010212,9.38117171 8.17857256,9.20681883 C8.33758689,9.1663851 8.93544637,8.99492481 8.93544637,8.69761336 L8.93544637,8.55789339 C8.93544637,8.16323452 8.2238377,8.05645882 8.17930744,8.04981368 Z M6.0811626,9.78898015 C5.4427443,9.78898015 4.92547084,9.27186304 4.92547084,8.63349165 C4.92547084,7.99512026 5.4427443,7.4778937 6.08117824,7.4778937 C6.71917438,7.4778937 7.23641656,7.99515153 7.23641656,8.63350729 C7.23641656,9.27186304 6.71919001,9.78898015 6.08117824,9.78898015 L6.0811626,9.78898015 Z M10.6902641,1.99694963 L10.6902641,1.24392218 C10.6902641,0.502449457 10.2222116,0.0595703125 9.43852268,0.0595703125 C8.65533411,0.0595703125 8.18725033,0.502465093 8.18725033,1.24392218 L8.18725033,1.99693399 L7.33923645,1.99693399 L7.33923645,1.24392218 C7.33923645,0.502449457 6.87163738,0.0595703125 6.08794846,0.0595703125 C5.30429082,0.0595703125 4.83667612,0.502465093 4.83667612,1.24392218 L4.83667612,1.99693399 L3.98819316,1.99693399 L3.98819316,1.24392218 C3.98819316,0.502449457 3.52060973,0.0595703125 2.73692081,0.0595703125 C1.95373224,0.0595703125 1.4856641,0.502465093 1.4856641,1.24392218 L1.4856641,1.99693399 L0.048828125,1.99693399 L0.048828125,14.0595703 L12.1117146,14.0595703 L12.1117146,1.99694963 L10.6902485,1.99694963 L10.6902641,1.99694963 Z M8.85762786,1.24392218 C8.85762786,0.878079768 9.02546068,0.7297133 9.43852268,0.7297133 C9.85249155,0.7297133 10.0198709,0.878064133 10.0198709,1.24392218 L10.0198709,3.25826005 C10.0198709,3.62397737 9.85249155,3.77248456 9.43853832,3.77248456 C9.02547632,3.77248456 8.85762786,3.62400864 8.85762786,3.25826005 L8.85762786,1.24392218 L8.85762786,1.24392218 Z M5.50706927,1.24392218 C5.50706927,0.878079768 5.67443303,0.7297133 6.08793283,0.7297133 C6.50147954,0.7297133 6.66931236,0.878064133 6.66931236,1.24392218 L6.66931236,3.25826005 C6.66931236,3.62397737 6.50147954,3.77248456 6.08794846,3.77248456 C5.67443303,3.77248456 5.50706927,3.62400864 5.50706927,3.25826005 L5.50706927,1.24392218 L5.50706927,1.24392218 Z M2.15557255,1.24392218 C2.15557255,0.878079768 2.32340538,0.7297133 2.73690518,0.7297133 C3.15045188,0.7297133 3.31873814,0.878064133 3.31873814,1.24392218 L3.31873814,3.25826005 C3.31873814,3.62397737 3.15043625,3.77248456 2.73690518,3.77248456 C2.32340538,3.77248456 2.15557255,3.62400864 2.15557255,3.25826005 L2.15557255,1.24392218 Z M11.106594,13.054606 L1.05394879,13.054606 L1.05394879,4.67758412 L11.106594,4.67758412 L11.106594,13.054606 L11.106594,13.054606 Z" id="形状"></path>
</g>
<rect id="矩形" x="0" y="0" width="14" height="14"></rect>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<svg width="14px" height="14px" viewBox="0 0 14 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 55.1 (78136) - https://sketchapp.com -->
<title>任务管理-灰</title>
<desc>Created with Sketch.</desc>
<g id="奇瑞后台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="图标" transform="translate(-57.000000, -42.000000)">
<g id="编组-3" transform="translate(57.000000, 42.000000)">
<g id="任务" transform="translate(1.000000, 0.000000)" fill="#A6ADB4" fill-rule="nonzero">
<path d="M8.17930744,8.04981368 C8.13130606,7.87535135 8.06135226,7.71009841 7.97349567,7.55611875 C8.07323534,7.4212771 8.41800092,6.91859168 8.16951953,6.67036046 L8.04226116,6.53597224 C7.83011697,6.32364042 7.28793596,6.65510009 7.15623707,6.74098659 C7.00053749,6.65253584 6.8329392,6.58248823 6.65624098,6.53481521 C6.6280343,6.36627878 6.50426268,5.77745669 6.15507221,5.77745669 L6.01525843,5.77745669 C5.71525765,5.77745669 5.54321884,6.38632365 5.50498973,6.53902119 C5.33038668,6.58761672 5.165337,6.65788323 5.01196713,6.74600562 C4.89077539,6.65591314 4.37142239,6.29695041 4.11804705,6.55032575 L3.98331485,6.66349642 C3.76257106,6.88449038 4.12947669,7.46710512 4.19683497,7.56908068 C4.11177716,7.72062118 4.04371527,7.88273137 3.99660513,8.05416039 C3.85025566,8.07723857 3.22503383,8.19797689 3.22503383,8.55789339 L3.22503383,8.69761336 C3.22503383,9.00938777 3.88097967,9.18258361 4.00076421,9.21149389 C4.04810889,9.38128116 4.11638967,9.54248448 4.20149439,9.69271159 C4.13108716,9.8031773 3.77815978,10.3832591 3.99705856,10.6023768 L4.1245671,10.7083081 C4.41266917,10.9961757 5.01454701,10.5231354 5.01454701,10.5231354 L4.98655924,10.4933026 C5.14792218,10.5889706 5.32111447,10.6631036 5.50172189,10.7138119 C5.5317892,10.8366454 5.70473487,11.4879005 6.01525843,11.4879005 L6.15507221,11.4879005 C6.56253666,11.4879005 6.66346464,10.7273367 6.66346464,10.7273367 L6.62617366,10.7266174 C6.81079915,10.6796324 6.98609017,10.6083183 7.14809091,10.5174128 C7.27559945,10.6019077 7.80869616,10.9358221 8.02126251,10.7229118 L8.16298384,10.5812843 C8.4471301,10.2972475 7.98489404,9.71600867 7.97207283,9.6998258 C8.05996069,9.54609631 8.13010212,9.38117171 8.17857256,9.20681883 C8.33758689,9.1663851 8.93544637,8.99492481 8.93544637,8.69761336 L8.93544637,8.55789339 C8.93544637,8.16323452 8.2238377,8.05645882 8.17930744,8.04981368 Z M6.0811626,9.78898015 C5.4427443,9.78898015 4.92547084,9.27186304 4.92547084,8.63349165 C4.92547084,7.99512026 5.4427443,7.4778937 6.08117824,7.4778937 C6.71917438,7.4778937 7.23641656,7.99515153 7.23641656,8.63350729 C7.23641656,9.27186304 6.71919001,9.78898015 6.08117824,9.78898015 L6.0811626,9.78898015 Z M10.6902641,1.99694963 L10.6902641,1.24392218 C10.6902641,0.502449457 10.2222116,0.0595703125 9.43852268,0.0595703125 C8.65533411,0.0595703125 8.18725033,0.502465093 8.18725033,1.24392218 L8.18725033,1.99693399 L7.33923645,1.99693399 L7.33923645,1.24392218 C7.33923645,0.502449457 6.87163738,0.0595703125 6.08794846,0.0595703125 C5.30429082,0.0595703125 4.83667612,0.502465093 4.83667612,1.24392218 L4.83667612,1.99693399 L3.98819316,1.99693399 L3.98819316,1.24392218 C3.98819316,0.502449457 3.52060973,0.0595703125 2.73692081,0.0595703125 C1.95373224,0.0595703125 1.4856641,0.502465093 1.4856641,1.24392218 L1.4856641,1.99693399 L0.048828125,1.99693399 L0.048828125,14.0595703 L12.1117146,14.0595703 L12.1117146,1.99694963 L10.6902485,1.99694963 L10.6902641,1.99694963 Z M8.85762786,1.24392218 C8.85762786,0.878079768 9.02546068,0.7297133 9.43852268,0.7297133 C9.85249155,0.7297133 10.0198709,0.878064133 10.0198709,1.24392218 L10.0198709,3.25826005 C10.0198709,3.62397737 9.85249155,3.77248456 9.43853832,3.77248456 C9.02547632,3.77248456 8.85762786,3.62400864 8.85762786,3.25826005 L8.85762786,1.24392218 L8.85762786,1.24392218 Z M5.50706927,1.24392218 C5.50706927,0.878079768 5.67443303,0.7297133 6.08793283,0.7297133 C6.50147954,0.7297133 6.66931236,0.878064133 6.66931236,1.24392218 L6.66931236,3.25826005 C6.66931236,3.62397737 6.50147954,3.77248456 6.08794846,3.77248456 C5.67443303,3.77248456 5.50706927,3.62400864 5.50706927,3.25826005 L5.50706927,1.24392218 L5.50706927,1.24392218 Z M2.15557255,1.24392218 C2.15557255,0.878079768 2.32340538,0.7297133 2.73690518,0.7297133 C3.15045188,0.7297133 3.31873814,0.878064133 3.31873814,1.24392218 L3.31873814,3.25826005 C3.31873814,3.62397737 3.15043625,3.77248456 2.73690518,3.77248456 C2.32340538,3.77248456 2.15557255,3.62400864 2.15557255,3.25826005 L2.15557255,1.24392218 Z M11.106594,13.054606 L1.05394879,13.054606 L1.05394879,4.67758412 L11.106594,4.67758412 L11.106594,13.054606 L11.106594,13.054606 Z" id="形状"></path>
</g>
<rect id="矩形" x="0" y="0" width="14" height="14"></rect>
</g>
</g>
</g>
</svg>
\ No newline at end of file
<template>
<section class="app-main">
<transition name="fade-transform" mode="out-in">
<router-view :key="key" />
</transition>
<ResetPassDialog></ResetPassDialog>
</section>
</template>
<script>
import ResetPassDialog from '@/views/components/ResetPassDialog'
export default {
name: 'AppMain',
components: {
ResetPassDialog
},
data() {
return {
visible: true
}
},
computed: {
key() {
return this.$route.fullPath
}
}
}
</script>
<style scoped>
.app-main {
/* height: calc(100% - 35px); */
padding: 24px 24px 0 24px;
background-color: #f0f2f5;
}
/* 定义过渡时间 */
.fade-transform-enter-active,
.fade-transform-live-active {
transition: all 0.5s;
}
.fade-transform-enter,
.fade-transform-live-to {
opacity: 0;
}
</style>
<template lang="pug">
div(class="header")
.logo
span(@click="expanMenu")
<svg-icon className="toggle-icon" icon-class='togglemenu' />
.right-menu
el-dropdown(trigger="click" @command="handleCommand")
span(class="el-dropdown-link")
<svg-icon className="icon" icon-class='user' />
span(class="userInfo-name userInfo-discription") {{name}}
i(class="el-icon-arrow-down el-icon-caret-bottom")
el-dropdown-menu(slot="dropdown")
el-dropdown-item(command="pass")
span(class="userInfo-operation userInfo-discription") 修改密码
el-dropdown-item(command="logout")
span(class="userInfo-operation userInfo-discription") 退出
</template>
<script>
import { mapState, mapActions, mapMutations } from 'vuex'
export default {
name: 'CommHeader',
computed: {
...mapState('app', ['sidebar']),
...mapState(['name', 'userId']),
isCollapse() {
return this.sidebar.opened
}
},
data() {
return {
visible: true,
resetObj: null
}
},
mounted() {},
methods: {
...mapMutations(['TOGGLE_UPDATEPASS_DIALOG']),
...mapActions(['logout']),
...mapActions('app', ['toggleSideBar']),
handleLogout() {
try {
this.logout()
this.$router.push('/login')
} catch (error) {
console.log(error)
}
},
handleUpdatepass() {
this.TOGGLE_UPDATEPASS_DIALOG({
name: this.name,
username: this.userId
})
},
expanMenu() {
this.toggleSideBar()
},
handleCommand(data) {
if (data === 'pass') {
this.handleUpdatepass()
} else if (data === 'logout') {
this.handleLogout()
}
}
}
}
</script>
<style lang="scss" scoped>
.header {
display: flex;
justify-content: space-between;
align-items: center;
height: 64px;
box-shadow: 0px 1px 4px 0px rgba(0, 21, 41, 0.12);
padding: 0 20px 0 24px;
}
.logo {
display: flex;
justify-content: flex-start;
align-items: center;
.toggle-icon {
width: 20px;
height: 20px;
}
span {
font-size: 14px;
cursor: pointer;
.rotate {
transform: rotate(90deg);
}
}
}
.right-menu {
.el-dropdown-link {
display: flex;
flex-flow: row nowrap;
justify-content: center;
align-items: center;
height: 100%;
.icon {
height: 28px;
width: 28px;
margin-right: 6px;
}
}
.user-icon {
font-size: 20px;
margin-right: 10px;
}
.userInfo-name {
margin-right: 10px;
color: #666666;
}
}
</style>
<template>
<span>
<svg-icon v-if="icon" className="icon" :icon-class="ComIcon" />
<span v-if="title" slot="title">{{ title }}</span>
</span>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'MenuItem',
props: {
icon: {
type: String,
default: ''
},
title: {
type: String,
default: ''
},
item: {
type: Object
}
},
computed: {
...mapState('permission', ['routes']),
ComIcon() {
const { path } = this.$route
if (path.indexOf(this.item.path) > -1) {
return `${this.icon}-active`
} else {
return this.icon
}
}
}
}
</script>
<style lang="scss" scoped>
.icon {
width: 14px;
height: 14px;
}
</style>
<template>
<!-- eslint-disable vue/require-component-is -->
<component v-bind="linkProps(to)">
<slot/>
</component>
</template>
<script>
import { isExternal } from '@/utils/validate'
export default {
props: {
to: {
type: String,
required: true
}
},
methods: {
linkProps(url) {
if (isExternal(url)) {
return {
is: 'a',
href: url,
target: '_blank',
rel: 'noopener'
}
}
return {
is: 'router-link',
to: url
}
}
}
}
</script>
<template>
<div v-if="!item.hidden">
<template
v-if="hasOneShowingChild(item.children, item) && !item.alwaysShow"
>
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
<el-menu-item :index="resolvePath(onlyOneChild.path)">
<item
:icon="onlyOneChild.meta.icon || (item.meta && item.meta.icon)"
:title="onlyOneChild.meta.title"
:item="onlyOneChild"
/>
</el-menu-item>
</app-link>
</template>
<el-submenu v-else :index="resolvePath(item.path)" popper-append-to-body>
<template slot="title">
<item
v-if="item.meta"
:icon="item.meta && item.meta.icon"
:title="item.meta.title"
:item="item"
/>
</template>
<sidebar-item
v-for="child in item.children"
:key="child.path"
:is-nest="true"
:item="child"
:base-path="resolvePath(child.path)"
/>
</el-submenu>
</div>
</template>
<script>
import path from 'path'
import Item from './Item'
import { isExternal } from '@/utils/validate'
import AppLink from './Link'
export default {
name: 'SidebarItem',
components: {
Item,
AppLink
},
props: {
item: {
type: Object,
require: true
},
basePath: {
type: String,
default: ''
}
},
data() {
// To fix https://github.com/PanJiaChen/vue-admin-template/issues/237
this.onlyOneChild = null
return {}
},
methods: {
hasOneShowingChild(children = [], parent) {
const showingChildren = children.filter(item => {
if (item.hidden) {
return false
} else {
// Temp set(will be used if only has one showing child)
this.onlyOneChild = item
return true
}
})
// When there is only one child router, the child router is displayed by default
if (showingChildren.length === 1) {
return true
}
// Show parent if there are no child router to display
if (showingChildren.length === 0) {
this.onlyOneChild = { ...parent, path: '', noShowingChildren: true }
return true
}
return false
},
resolvePath(routePath) {
if (isExternal(routePath)) {
return routePath
}
if (isExternal(this.basePath)) {
return this.basePath
}
return path.resolve(this.basePath, routePath)
}
}
}
</script>
<style lang="scss"></style>
<template>
<div class="sidebar-container">
<div class="home-title">
<div class="title title-icon" v-if="!isCollapse"></div>
</div>
<el-scrollbar>
<el-menu
mode="vertical"
:default-active="activeMenu"
:collapse="isCollapse"
:unique-opened="false"
:collapse-transition="false"
>
<sidebar-item
v-for="route in routes"
:key="route.path"
:item="route"
:base-path="route.path"
/>
</el-menu>
</el-scrollbar>
</div>
</template>
<script>
import SidebarItem from './SidebarItem'
import { mapState, mapMutations } from 'vuex'
export default {
components: {
SidebarItem
},
data() {
return {
menuBg: '#304156',
menuText: '#bfcbd9',
menuActiveText: '#409EFF'
}
},
computed: {
...mapState('app', ['sidebar']),
...mapState('permission', ['routes']),
activeMenu() {
const route = this.$route
const { meta, path } = route
if (meta.activeMenu) {
return meta.activeMenu
}
return path
},
isCollapse() {
return this.sidebar.opened
}
},
methods: {
...mapMutations('app', ['SET_IS_COLLAPSE'])
}
}
</script>
<style lang="scss">
.sidebar-container {
width: 100%;
height: 100%;
.home-title {
background: #002140;
height: 64px;
display: flex;
justify-content: center;
align-items: center;
.title {
width: 166px;
height: 24px;
background-size: contain;
}
}
.el-scrollbar {
height: calc(100% - 64px);
background-color: #001529;
.el-scrollbar__wrap {
overflow-x: hidden !important;
// 导航栏间距
.el-scrollbar__view {
> .el-menu {
> div {
margin: 10px 0;
}
}
}
.el-menu {
width: 100%;
background: #001529;
border-right: 0;
.el-submenu.is-active {
.el-submenu__title {
span {
color: #fff;
}
}
}
.el-submenu,
.el-menu-item > span {
.icon {
margin-right: 14px;
}
}
.el-menu-item,
.el-submenu__title {
color: #999;
background: #001529;
text-align: left;
}
.el-menu-item.is-active {
color: #fff;
background: #1890ff;
}
span {
font-size: 14px;
font-weight: 500;
}
}
.el-menu--collapse {
.el-submenu > .el-submenu__title > span {
display: inline-flex;
flex-flow: row nowrap;
justify-content: center;
align-items: center;
height: 20px;
width: 20px;
overflow: visible;
visibility: visible;
.icon {
margin: 0;
}
span {
display: none;
}
}
.el-menu-item > span {
span {
display: none;
}
}
}
}
}
}
.el-menu--collapse {
.el-submenu {
& > .el-submenu__title {
& > span {
height: 0;
width: 0;
overflow: hidden;
visibility: hidden;
display: inline-block;
}
.el-submenu__icon-arrow {
display: none;
}
}
}
}
</style>
<template lang="pug">
el-breadcrumb(separator="/" class="app-breadcrumb")
transition-group(name="breadcrumb")
el-breadcrumb-item(v-for="(item,index) in levelList" :key="item.path")
span(v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect") {{ item.meta.title }}
a(v-else @click.prevent="handleLink(item)") {{ item.meta.title }}
</template>
<script>
import pathToRegexp from 'path-to-regexp'
export default {
data() {
return {
levelList: null
}
},
watch: {
$route() {
this.getBreadcrumb()
}
},
created() {
this.getBreadcrumb()
},
methods: {
getBreadcrumb() {
// only show routes with meta.title
let matched = this.$route.matched.filter(
item => item.meta && item.meta.title
)
// const first = matched[0]
// if (this.isWhoRoute(first, 'dayBillingInquiry')) {
// matched = [{ path: '/billing', meta: { title: '账单查询' } }].concat(
// matched
// )
// }
// if (this.isWhoRoute(first, 'billingDetail')) {
// matched = [
// { path: '/billing', meta: { title: '账单查询' } },
// { path: '/billing/dayBillingInquiry', meta: { title: '日调用量' } }
// ].concat(matched)
// }
this.levelList = matched.filter(
item => item.meta && item.meta.title && item.meta.breadcrumb !== false
)
},
isWhoRoute(route, str) {
const name = route && route.name
if (!name) {
return false
}
return name.trim().toLocaleLowerCase() === str.toLocaleLowerCase()
},
pathCompile(path) {
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
const { params } = this.$route
const toPath = pathToRegexp.compile(path)
return toPath(params)
},
handleLink(item) {
const { redirect, path } = item
if (redirect) {
this.$router.push(redirect)
return
}
this.$router.push(this.pathCompile(path))
}
}
}
</script>
<style lang="scss" scoped>
.app-breadcrumb.el-breadcrumb {
height: 54px;
font-size: 14px;
padding-left: 32px;
display: flex;
align-items: center;
.no-redirect {
color: #666;
cursor: text;
}
}
/* breadcrumb transition */
.breadcrumb-enter-active,
.breadcrumb-leave-active {
transition: all 0.5s;
}
.breadcrumb-enter,
.breadcrumb-leave-active {
opacity: 0;
transform: translateX(20px);
}
.breadcrumb-move {
transition: all 0.5s;
}
.breadcrumb-leave-active {
position: absolute;
}
</style>
<style lang="scss" scoped>
.app-breadcrumb {
.el-breadcrumb__inner.is-link,
.el-breadcrumb__inner a {
color: rgba(0, 0, 0, 0.45);
}
.el-breadcrumb__inner .no-redirect {
color: rgba(0, 0, 0, 0.65);
font-weight: 400;
}
.el-breadcrumb__inner.is-link:hover,
.el-breadcrumb__inner a:hover {
cursor: auto;
color: rgba(0, 0, 0, 0.45);
}
}
</style>
export { default as Sidebar } from './Sidebar'
export { default as AppMain } from './AppMain'
export { default as Header } from './Header'
<template lang="pug">
.app
el-container
el-aside(:width="asideWidth")
sidebar
el-container
el-header(height='118px')
Header
Breadcrumb
el-main
AppMain
</template>
<script>
import { Sidebar, AppMain, Header } from './components'
import Breadcrumb from './components/breadcrumb'
import { mapState } from 'vuex'
export default {
name: 'Layout',
components: {
Sidebar,
Header,
AppMain,
Breadcrumb
},
computed: {
...mapState('app', ['sidebar']),
siderbar() {
return this.$store.state.app.siderbar
},
asideWidth() {
return this.sidebar.opened ? '64px' : '256px'
}
}
}
</script>
<style lang="scss" scope>
.app {
height: 100%;
> .el-container {
height: 100%;
}
.el-header {
padding: 0;
}
.el-main {
padding: 0;
}
.el-aside {
transition: width 0.2s ease-in;
box-shadow: 2px 0px 6px 0px rgba(0, 21, 41, 0.35);
}
}
</style>
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import VueParticles from 'vue-particles'
import ElementUI from 'element-ui'
import './element-variables.scss'
import './base.scss'
import './permission'
import '@/icons'
import 'animate.css'
import 'video.js/dist/video-js.css'
import VeLine from 'v-charts/lib/line.common'
import VeHistogram from 'v-charts/lib/histogram.common'
import Card from '_c/card'
Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.use(VueParticles)
Vue.component('Card', Card)
Vue.component(VeLine.name, VeLine)
Vue.component(VeHistogram.name, VeHistogram)
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
import router from './router'
import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style
import { getToken } from '@/utils/auth' // get token from cookie
import store from './store'
NProgress.configure({ showSpinner: false }) // NProgress Configuration
const whiteList = ['/login']
router.beforeEach((to, from, next) => {
let routerTemp = store.state.resetRouterTemp
// start progress bar
NProgress.start()
// determine whether the user has logged in
const hasToken = getToken()
if (hasToken) {
if (routerTemp) {
next()
} else {
store.commit('SET_ROUTER_TEMP', 'TEMP')
let roles = store.state.roles
store.commit('permission/SET_ROUTES', { roles })
router.addRoutes(store.state.permission.routes)
// hack method to ensure that addRoutes is complete
// set the replace: true, so the navigation will not leave a history record
next({ ...to, replace: true })
}
} else {
// other pages that do not have permission to access are redirected to the login page.
if (whiteList.indexOf(to.path) !== -1) {
next()
} else {
next(`/login?redirect=${to.path}`) // 重定向到登录页
NProgress.done()
}
}
})
router.afterEach(() => {
// finish progress bar
NProgress.done()
})
import Vue from 'vue'
import Router from 'vue-router'
import Layout from '@/layout'
import { PERMISSION_USER_MAP } from '@/utils/mappingData'
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
Vue.use(Router)
/**
* Note: sub-menu only appear when route children.length >= 1
* Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
*
* hidden: true if set true, item will not show in the sidebar(default is false)
* alwaysShow: true if set true, will always show the root menu
* if not set alwaysShow, when item has more than one children route,
* it will becomes nested mode, otherwise not show the root menu
* redirect: noRedirect if set noRedirect will no redirect in the breadcrumb
* name:'router-name' the name is used by <keep-alive> (must set!!!)
* meta : {
roles: ['admin','editor'] control the page roles (you can set multiple roles)
title: 'title' the name show in sidebar and breadcrumb (recommend set)
icon: 'svg-name' the icon show in the sidebar
noCache: true if set true, the page will no be cached(default is false)
affix: true if set true, the tag will affix in the tags-view
breadcrumb: false if set false, the item will hidden in breadcrumb(default is true)
activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
}
*/
/**
* constantRoutes
* a base page that does not have permission requirements
* all roles can be accessed
*/
export const constantRoutes = [
{
path: '/login',
component: () => import('@/views/login/index'),
hidden: true
}
]
/**
* asyncRoutes
* the routes that need to be dynamically loaded based on user roles
*/
export const asyncRoutes = [
{
path: '/',
component: Layout,
redirect: '/monitor',
meta: {
roles: [
PERMISSION_USER_MAP.admin.code,
PERMISSION_USER_MAP.dataAnalyst.code
]
},
children: [
{
path: 'monitor',
name: 'monitor',
component: () => import('@/views/monitor'),
meta: {
title: '资源监控',
icon: 'home'
}
},
{
path: 'monitor-details',
name: 'monitor-details',
hidden: true,
component: () => import('@/views/monitor'),
meta: {
title: '远程订单详情',
icon: 'home'
}
}
]
},
{
path: '/404',
component: () => import('@/views/404'),
hidden: true
}
// { path: '*', redirect: '/404', hidden: true }
]
const createRouter = () =>
new Router({
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes
})
const router = createRouter()
export default router
import Vue from 'vue'
import Vuex from 'vuex'
import app from './modules/app'
import permission from './modules/permisssion'
import { login, logout } from '@/api/user'
import { getToken, setToken, removeToken } from '@/utils/auth'
import { NAME, USER_TYPE, USER_ID, USER_PASS } from '@/utils/mappingData'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
token: getToken(),
name: sessionStorage.getItem(NAME),
roles: JSON.parse(sessionStorage.getItem(USER_TYPE)) || '',
userId: sessionStorage.getItem(USER_ID),
resetRouterTemp: '',
userpass: JSON.parse(sessionStorage.getItem(USER_PASS)) || ''
},
mutations: {
SET_TOKEN: (state, token) => {
state.token = token
setToken(token)
},
SET_NAME: (state, name) => {
sessionStorage.setItem(NAME, name)
state.name = name
},
SET_USER_ID: (state, userId) => {
sessionStorage.setItem(USER_ID, userId)
state.userId = userId
},
SET_ROLES: (state, userType) => {
state.roles = userType
sessionStorage.setItem(USER_TYPE, JSON.stringify(userType))
},
SET_ROUTER_TEMP(state, payload) {
state.resetRouterTemp = payload
},
SET_USERPASS(state, payload) {
state.userpass = payload
sessionStorage.setItem(USER_PASS, payload)
}
},
actions: {
async login({ dispatch, commit }, userinfo) {
try {
const { username, password } = userinfo
const res = await login({
username: username.trim(),
password: password
})
if (res.code === 0) {
commit('SET_ROLES', res.result.roleCode)
commit('SET_NAME', res.result.name)
commit('SET_USER_ID', res.result.username)
commit('SET_TOKEN', res.result.token)
}
return res
} catch (error) {
console.log(error)
}
},
// remove token
resetToken({ commit }) {
return new Promise(resolve => {
removeToken()
sessionStorage.clear()
resolve()
})
},
async logout({ dispatch, commit }) {
try {
const res = await logout()
dispatch('resetToken')
return res
} catch (error) {
console.log(error)
}
}
},
modules: {
app,
permission
}
})
// import Cookies from 'js-cookie'
const state = {
sidebar: {
// string => num => boolean
opened: !!+sessionStorage.getItem('sidebarStatus'),
withoutAnimation: false
}
}
const mutations = {
TOGGLE_SIDEBAR: state => {
state.sidebar.opened = !state.sidebar.opened
state.sidebar.withoutAnimation = false
if (state.sidebar.opened) {
sessionStorage.setItem('sidebarStatus', 1)
} else {
sessionStorage.setItem('sidebarStatus', 0)
}
},
CLOSE_SIDEBAR: (state, withoutAnimation) => {
sessionStorage.setItem('sidebarStatus', 0)
state.sidebar.opened = false
state.sidebar.withoutAnimation = withoutAnimation
}
}
const actions = {
toggleSideBar({ commit }) {
commit('TOGGLE_SIDEBAR')
},
closeSideBar({ commit }, { withoutAnimation }) {
commit('CLOSE_SIDEBAR', withoutAnimation)
}
}
export default {
namespaced: true,
state,
mutations,
actions
}
import { constantRoutes, asyncRoutes } from '@/router'
function hasPermission(roles, route) {
if (route.meta && route.meta.roles) {
return route.meta.roles.includes(roles)
} else {
return true
}
}
function filterAsyncRoutes(routes, roles) {
const res = []
routes.forEach(route => {
const temp = { ...route }
if (hasPermission(roles, temp)) {
if (temp.children) {
temp.children = filterAsyncRoutes(temp.children, roles)
}
res.push(temp)
}
})
return res
}
const state = {
routes: [],
addRoutes: []
}
const mutations = {
SET_ROUTES: (state, payload) => {
state.addRoutes = filterAsyncRoutes(asyncRoutes, payload.roles)
state.routes = constantRoutes.concat(state.addRoutes)
}
}
export default {
namespaced: true,
state,
mutations
}
import Cookies from 'js-cookie'
import { USER_ID } from '@/utils/mappingData'
export function getToken() {
if (sessionStorage.getItem(USER_ID) === null) {
return ''
} else {
return Cookies.get(sessionStorage.getItem(USER_ID))
}
}
export function setToken(token) {
let expires = new Date(new Date().getTime() + 60 * 60 * 24 * 1000)
return Cookies.set(sessionStorage.getItem(USER_ID), token, {
expires: expires
})
}
export function removeToken() {
return Cookies.remove(sessionStorage.getItem(USER_ID))
}
// session key
export const NAME = 'name'
export const USER_ID = 'userId'
export const USER_TYPE = 'userType'
export const USER_PASS = 'userpass'
// 权限字段
export const PERMISSION_USER_MAP = {
admin: {
code: 'admin',
name: '管理员'
},
auditor: {
code: 'auditor',
name: '初级审核员'
},
dataAnalyst: {
code: 'dataAnalyst',
name: '数据分析员'
}
}
// contactCard const
export const CONTACT_CARD = {
ANSWER_END: 'answerEnd', // 接听挂断
ANSWER: 'answer', // 接听
CALL: 'call', // 呼叫
CALL_END: 'callEnd' // 呼叫挂断
}
import store from '@/store'
export default function checkPermission(value) {
if (value && value instanceof Array && value.length > 0) {
const roles = store.state.roles
const permissionRoles = value
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
if (hasPermission) {
return true
} else {
return false
}
} else {
console.error(`need roles! Like v-permission="['admin','editor']"`)
return false
}
}
import axios from 'axios'
// MessageBox
import { Message } from 'element-ui'
import store from '@/store'
import { getToken, removeToken } from '@/utils/auth'
import router from '@/router'
// create an axios instance
const service = axios.create({
// baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
withCredentials: false // send cookies when cross-domain requests
// timeout: 10000 // request timeout
})
// request interceptor
service.interceptors.request.use(
config => {
// do something before request is sent
if (store.state.token) {
// let each request carry token --['X-Token'] as a custom key.
// please modify it according to the actual situation.
config.headers['X-Source'] = 'web'
config.headers['x-auth-token'] = getToken()
}
return config
},
error => {
// do something with request error
console.log(error) // for debug
return Promise.reject(error)
}
)
// response interceptor
service.interceptors.response.use(
/**
* If you want to get information such as headers or status
* Please return response => response
*/
/**
* Determine the request status by custom code
* Here is just an example
* You can also judge the status by HTTP Status Code.
*/
response => {
const res = response.data
if (response.config.url.includes('download')) {
return res
}
if (response.config.url.includes('recognize')) {
return res
}
if (response.config.url.includes('verify')) {
return res
}
// 3703图片未识别 3730报表无数据
if (
(res && res.code === 0) ||
res.code === 2926 ||
res.code === 4001 ||
res.code === 3703 ||
res.code === 3730
) {
return res
} else if (res && res.code === 2909) {
// 2909 登录超时
// cookie失效
Message({
message: res.msg || 'error',
type: 'error',
duration: 5 * 1000
})
removeToken()
router.push('/login')
} else if (res && res.code) {
Message({
message: res.msg || 'error',
type: 'error',
duration: 5 * 1000
})
}
return res
},
error => {
Message({
message: '网络连接异常',
type: 'error',
duration: 5 * 1000
})
console.log('err' + error) // for debug
return Promise.reject(error)
}
)
export default service
/**
* Parse the time to string
* @param {(Object|string|number)} time
* @param {string} cFormat
* @returns {string}
*/
export function parseTime(time, cFormat) {
if (arguments.length === 0) {
return null
}
const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
let date
if (typeof time === 'object' && time) {
date = time
} else {
if (typeof time === 'string' && /^[0-9]+$/.test(time)) {
time = parseInt(time)
}
if (typeof time === 'number' && time.toString().length === 10) {
time = time * 1000
}
date = new Date(time)
}
const formatObj = {
y: date.getFullYear(),
m: date.getMonth() + 1,
d: date.getDate(),
h: date.getHours(),
i: date.getMinutes(),
s: date.getSeconds(),
a: date.getDay()
}
const timeStr = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
let value = formatObj[key]
// Note: getDay() returns 0 on Sunday
if (key === 'a') {
return ['日', '一', '二', '三', '四', '五', '六'][value]
}
if (result.length > 0 && value < 10) {
value = '0' + value
}
return value || 0
})
return timeStr
}
/**
* @param {string} url
* @returns {Object}
*/
export function getQueryObject(url) {
url = url == null ? window.location.href : url
const search = url.substring(url.lastIndexOf('?') + 1)
const obj = {}
const reg = /([^?&=]+)=([^?&=]*)/g
search.replace(reg, (rs, $1, $2) => {
const name = decodeURIComponent($1)
let val = decodeURIComponent($2)
val = String(val)
obj[name] = val
return rs
})
return obj
}
/**
* @param {string} input value
* @returns {number} output value
*/
export function byteLength(str) {
// returns the byte length of an utf8 string
let s = str.length
for (var i = str.length - 1; i >= 0; i--) {
const code = str.charCodeAt(i)
if (code > 0x7f && code <= 0x7ff) s++
else if (code > 0x7ff && code <= 0xffff) s += 2
if (code >= 0xdc00 && code <= 0xdfff) i--
}
return s
}
/**
* @param {Array} actual
* @returns {Array}
*/
export function cleanArray(actual) {
const newArray = []
for (let i = 0; i < actual.length; i++) {
if (actual[i]) {
newArray.push(actual[i])
}
}
return newArray
}
/**
* @param {Object} json
* @returns {Array}
*/
export function param(json) {
if (!json) return ''
return cleanArray(
Object.keys(json).map(key => {
if (json[key] === undefined) return ''
return encodeURIComponent(key) + '=' + encodeURIComponent(json[key])
})
).join('&')
}
/**
* @param {string} url
* @returns {Object}
*/
export function param2Obj(url) {
const search = url.split('?')[1]
if (!search) {
return {}
}
return JSON.parse(
'{"' +
decodeURIComponent(search)
.replace(/"/g, '\\"')
.replace(/&/g, '","')
.replace(/=/g, '":"')
.replace(/\+/g, ' ') +
'"}'
)
}
/**
* Merges two objects, giving the last one precedence
* @param {Object} target
* @param {(Object|Array)} source
* @returns {Object}
*/
export function objectMerge(target, source) {
if (typeof target !== 'object') {
target = {}
}
if (Array.isArray(source)) {
return source.slice()
}
Object.keys(source).forEach(property => {
const sourceProperty = source[property]
if (typeof sourceProperty === 'object') {
target[property] = objectMerge(target[property], sourceProperty)
} else {
target[property] = sourceProperty
}
})
return target
}
/**
* @param {string} type
* @returns {Date}
*/
export function getTime(type) {
if (type === 'start') {
return new Date().getTime() - 3600 * 1000 * 24 * 90
} else {
return new Date(new Date().toDateString())
}
}
/**
* @param {Function} func
* @param {number} wait
* @param {boolean} immediate
* @return {*}
*/
export function debounce(func, wait, immediate) {
let timeout, args, context, timestamp, result
const later = function() {
// 据上一次触发时间间隔
const last = +new Date() - timestamp
// 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait
if (last < wait && last > 0) {
timeout = setTimeout(later, wait - last)
} else {
timeout = null
// 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
if (!immediate) {
result = func.apply(context, args)
if (!timeout) context = args = null
}
}
}
return function(...args) {
context = this
timestamp = +new Date()
const callNow = immediate && !timeout
// 如果延时不存在,重新设定延时
if (!timeout) timeout = setTimeout(later, wait)
if (callNow) {
result = func.apply(context, args)
context = args = null
}
return result
}
}
/**
* 节流
* @param {*} func
* @param {*} wait
* @param {*} immediate
*/
export function throttle(fn, wait = 1000, immediate) {
let timer = null
let callNow = immediate
return function(...args) {
let context = this
if (callNow) {
fn.apply(context, args)
callNow = null
}
if (!timer) {
timer = setTimeout(() => {
fn.apply(context, args)
timer = null
}, wait)
}
}
}
/**
* @param {Array} arr
* @returns {Array}
*/
export function uniqueArr(arr) {
return Array.from(new Set(arr))
}
/**
* @returns {string}
*/
export function createUniqueString() {
const timestamp = +new Date() + ''
const randomNum = parseInt((1 + Math.random()) * 65536) + ''
return (+(randomNum + timestamp)).toString(32)
}
/**
* 延迟执行某个操作
* @param {} ms
*/
export function timeout(ms) {
return new Promise((resolve, reject) => {
setTimeout(resolve, ms, 'done')
})
}
/**
* 二进制转文件
* @param {*} blobs blob对象
* @param {*} fileName 文件名
*/
export function blob2File(blobs, fileName) {
const blob = new Blob([blobs])
const href = window.URL.createObjectURL(blob) // 创建下载的链接
const aEle = document.createElement('a') // 创建a标签
aEle.href = href
aEle.download = fileName // 下载后文件名
document.body.appendChild(aEle)
aEle.click() // 点击下载
document.body.removeChild(aEle) // 下载完成移除元素
window.URL.revokeObjectURL(href) // 释放掉blob对象
}
/**
* url下载文件
* @param {*} url
* @param {*} name
*/
export function downFile(url, name) {
const a = document.createElement('a')
a.href = url
a.download = name
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
}
/**
* 对象转换成formdata形式
* @param {*} data
*/
export function obj2FormData(data) {
const form = new FormData()
Object.keys(data).forEach(key => {
if (data[key] !== undefined) {
form.append(key, data[key])
}
})
return form
}
function typeOf(obj) {
const toString = Object.prototype.toString
const map = {
'[object Boolean]': 'boolean',
'[object Number]': 'number',
'[object String]': 'string',
'[object Null]': 'null',
'[object Undefined]': 'undefined',
'[object Symbol]': 'symbol',
'[object Object]': 'object',
'[object Function]': 'function',
'[object Array]': 'array',
'[object Date]': 'date',
'[object RegExp]': 'regexp'
}
return map[toString.call(obj)]
}
/**
* 深克隆
* @param {*} data
*/
export function deepClone(data) {
const type = typeOf(data)
let copy
if (type === 'array') {
copy = []
} else if (type === 'object') {
copy = {}
} else {
return data
}
if (type === 'array') {
for (let i = 0; i < data.length; i++) {
copy.push(deepClone(data[i]))
}
}
if (type === 'object') {
for (let key in data) {
copy[key] = deepClone(data[key])
}
}
return copy
}
/**
* filter undefined
* @param {*} temp
*/
export function parseUndefined(temp) {
// 判断是否为0
if (temp === 0 || temp === '0') {
return temp
}
if (temp) {
return temp
} else {
return undefined
}
}
/**
* 获取目标的元素的截图
* @param {*} target
* @param {*} format
*/
export function shotTargetToImage(target, format) {
const canvas = document.createElement('canvas') // 创建画布
canvas.width = target.videoWidth
canvas.height = target.videoHeight // 设定宽高比
canvas.getContext('2d').drawImage(target, 0, 0, canvas.width, canvas.height) // 将视频此刻帧数画入画布
return canvas.toDataURL(format)
}
// 去掉base头部
export function substringBasehead(base64) {
let length = 'data:image/png;base64,'.length
return base64.substring(length)
}
export function parseTimeSecond(time) {
let minutes = parseInt((time % (1000 * 60 * 60)) / (1000 * 60))
let second = parseInt((time % (1000 * 60)) / 1000)
if (minutes < 10) {
minutes = `0${minutes}`
}
if (second < 10) {
second = `0${second}`
}
return `${minutes}:${second}`
}
export function sleep(time) {
return new Promise(resolve => {
setTimeout(resolve, time)
})
}
/**
* Created by PanJiaChen on 16/11/18.
*/
/**
* @param {string} path
* @returns {Boolean}
*/
export function isExternal(path) {
return /^(https?:|mailto:|tel:)/.test(path)
}
/**
* @param {string} str
* @returns {Boolean}
*/
export function validUsername(str) {
const validMap = ['admin', 'editor']
return validMap.indexOf(str.trim()) >= 0
}
/**
* 模型名称校验函数
* @param {*} rule
* @param {*} value
* @param {*} callback
*/
export function validateName(rule, value, callback) {
if (!value) {
return callback(new Error('模型名称不能为空'))
}
if (/(^\s+)|(\s+$)/.test(value)) {
return callback(new Error('首字符和尾字符不得为空格'))
}
if (value.length < 2 || value.length > 10) {
return callback(new Error('长度在 2 到 10 个字符'))
}
callback()
}
/**
* 模型描述校验函数
* @param {*} rule
* @param {*} value
* @param {*} callback
*/
export function validateDes(rule, value, callback) {
if (!value) {
return callback(new Error('模型描述不能为空'))
}
if (/(^\s+)|(\s+$)/.test(value)) {
return callback(new Error('首字符和尾字符不得为空格'))
}
if (value.length < 2 || value.length > 20) {
return callback(new Error('长度在 2 到 20 个字符'))
}
callback()
}
<template>
<div class="page">
<div class="image-404"></div>
<div class="right">
<div class="text-404"></div>
<div class="text">抱歉,你访问的页面不存在</div>
<el-button type="primary" size="medium" @click="handleClick"
>返回首页</el-button
>
</div>
</div>
</template>
<script>
import { mapState } from 'vuex'
import { PERMISSION_USER_MAP } from '@/utils/mappingData'
export default {
computed: {
...mapState(['roles'])
},
methods: {
handleClick() {
if (this.roles === PERMISSION_USER_MAP.auditor.code) {
this.$router.push({ path: '/task/work' })
} else {
this.$router.push({ path: '/' })
}
}
}
}
</script>
<style lang="scss" scoped>
.page {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
background-color: #f0f2f5;
.image-404 {
width: 443px;
height: 342px;
margin-right: 121px;
background-image: url('../assets/image/404image.png');
background-repeat: no-repeat;
}
.right {
height: 342px;
display: flex;
flex-flow: column nowrap;
justify-content: center;
align-items: flex-start;
.text-404 {
width: 161px;
height: 74px;
background-image: url('../assets/image/404.png');
background-repeat: no-repeat;
}
.text {
margin: 24px 0 16px 0;
width: 240px;
height: 28px;
font-size: 20px;
font-weight: 400;
color: rgba(0, 0, 0, 0.45);
line-height: 28px;
}
}
}
</style>
<template lang="pug">
.login
LoginForm(class="login-card" ref="loginRef" @on-success-valid="handleLogin" :loading="btnLoading")
</template>
<script>
import LoginForm from '_c/loginForm'
import { mapActions, mapState, mapMutations } from 'vuex'
export default {
components: {
LoginForm
},
data() {
return {
isRegister: false,
btnLoading: false
}
},
computed: {
...mapState(['roles'])
},
mounted() {
this.SET_ROUTER_TEMP('')
},
methods: {
...mapActions(['login']),
...mapMutations(['SET_ROUTER_TEMP', 'SET_USERPASS']),
async handleLogin({ username, password }) {
try {
this.btnLoading = true
const { code } = await this.login({ username, password })
if (code === 0) {
this.SET_USERPASS(password)
this.$router.push({ path: '/' })
} else {
this.$refs.loginRef.updateCaptcha()
}
} catch (error) {
console.log(error)
} finally {
this.btnLoading = false
}
}
}
}
</script>
<style lang="scss">
.login {
width: 100%;
height: 100%;
background: center / cover no-repeat url('../../assets/image/login-bg.png');
position: relative;
.login-card {
position: absolute;
top: 195px;
bottom: 195px;
right: 188px;
}
}
</style>
<template>
<div class="order-list">
<Card class="order-list-card">
<div class="search">
<el-form
class="count-form"
ref="ruleForm"
size="mini"
inline
:model="ruleForm"
:rules="rules"
>
<el-form-item label="客户姓名" prop="customerName">
<el-input
v-model.trim="ruleForm.customerName"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="客户电话" prop="customerPhoneNo">
<el-input
v-model.trim="ruleForm.customerPhoneNo"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="呼叫类型" prop="callType">
<el-select clearable v-model="ruleForm.callType">
<el-option label="呼入" :value="1"></el-option>
<el-option label="呼出" :value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item label="合作商" prop="partnerDesc">
<el-input
v-model.trim="ruleForm.partnerDesc"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="状态" prop="orderStatus">
<el-select clearable v-model="ruleForm.orderStatus">
<el-option label="待沟通" :value="0"></el-option>
<el-option label="已沟通" :value="1"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" size="mini" @click="onSubmit"
>搜索</el-button
>
<el-button size="mini" @click="onReset">重置</el-button>
</el-form-item>
</el-form>
</div>
<el-table
class="mb10"
:data="tableData"
border
style="width: 100%"
v-loading="loading"
>
<el-table-column align="center" prop="orderId" label="订单号" fixed>
</el-table-column>
<el-table-column
align="center"
prop="createTime"
label="创建时间"
width="160"
>
<template v-slot="scope">
<span>{{
scope.row.createTime ? parseTime(scope.row.createTime) : ''
}}</span>
</template>
</el-table-column>
<el-table-column
align="center"
prop="callTime"
label="呼叫时间"
width="160"
>
<template v-slot="scope">
<span>{{
scope.row.callTime ? parseTime(scope.row.callTime) : ''
}}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="partnerDesc" label="合作商">
</el-table-column>
<el-table-column align="center" prop="customerName" label="客户姓名">
</el-table-column>
<el-table-column
align="center"
prop="customerPhoneNo"
label="客户电话"
width="160"
>
</el-table-column>
<el-table-column align="center" prop="callType" label="呼叫类型">
</el-table-column>
<el-table-column align="center" prop="auditorName" label="坐席姓名">
</el-table-column>
<el-table-column align="center" prop="username" label="坐席工号">
</el-table-column>
<el-table-column align="center" prop="meetTimes" label="面核次数">
</el-table-column>
<el-table-column align="center" prop="durationTimeStr" label="通话时长">
</el-table-column>
<el-table-column
align="center"
prop="orderStatus"
fixed="right"
label="状态"
>
<template v-slot="scope">
<span class="status">
<span
class="dot"
:class="{ yellow: scope.row.orderStatus === '待沟通' }"
></span>
<span>{{ scope.row.orderStatus }}</span>
</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right" width="50">
<template v-slot="scope">
<div>
<el-button
type="text"
size="small"
v-if="scope.row.orderStatus === '已沟通'"
@click="handleDetail(scope.row)"
>查看</el-button
>
</div>
</template>
</el-table-column>
</el-table>
<FooterPaginationfrom
@pager="handleGetPager"
:total="total"
></FooterPaginationfrom>
</Card>
</div>
</template>
<script>
import { maxSizeValidate } from '@/views/validate'
import FooterPaginationfrom from './components/FooterPagination'
import { queryOrderList } from '@/api/orderList'
import { parseTime } from '@/utils/util'
export default {
components: {
FooterPaginationfrom
},
data() {
return {
parseTime,
ruleForm: {
customerName: '',
customerPhoneNo: '',
callType: '',
orderStatus: '',
partnerDesc: ''
},
rules: {
customerName: [maxSizeValidate],
customerPhoneNo: [maxSizeValidate]
},
tableData: [],
pagination: null,
loading: false,
total: 0
}
},
methods: {
onSubmit() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.handleQueryOrderList()
} else {
return false
}
})
},
onReset() {
this.ruleForm = {
customerName: '',
customerPhoneNo: '',
callType: '',
orderStatus: '',
partnerDesc: ''
}
this.onSubmit()
},
handleGetPager(data) {
this.pagination = data
this.onSubmit()
},
async handleQueryOrderList() {
try {
this.loading = true
const {
customerName,
customerPhoneNo,
callType,
partnerDesc,
orderStatus
} = this.ruleForm
const {
code,
result: { orderInfoList, totalCount }
} = await queryOrderList({
customerName,
customerPhoneNo,
callType,
partnerDesc,
orderStatus,
pageNo: this.pagination.page,
pageSize: this.pagination.size
})
if (code === 0) {
this.tableData = orderInfoList
this.total = totalCount
}
} catch (error) {
console.log(error)
} finally {
this.loading = false
}
},
handleDetail(row) {
this.$router.push({
path: 'order-detail',
query: { id: row.orderId }
})
}
}
}
</script>
<style lang="scss" scoped>
.order-list {
.order-list-card {
.search {
.count-form {
margin-top: 20px;
margin-left: 20px;
}
}
.status {
display: flex;
justify-content: center;
align-items: center;
.dot {
margin-right: 6px;
display: inline-block;
width: 4px;
height: 4px;
border-radius: 50%;
background-color: #34c780;
}
.yellow {
background-color: #ffaa00;
}
}
}
}
.flex-end {
display: flex;
justify-content: flex-end;
}
</style>
export const maxSizeValidate = {
min: 1,
max: 30,
message: '最多输入30个字符',
trigger: 'blur'
}
module.exports = {
env: {
mocha: true
}
}
import { expect } from 'chai'
import { shallowMount } from '@vue/test-utils'
import HelloWorld from '@/components/HelloWorld.vue'
describe('HelloWorld.vue', () => {
it('renders props.msg when passed', () => {
const msg = 'new message'
const wrapper = shallowMount(HelloWorld, {
propsData: { msg }
})
expect(wrapper.text()).to.include(msg)
})
})
/* eslint-disable indent */
const FilemanagerWebpackPlugin = require('filemanager-webpack-plugin')
const path = require('path')
// 匹配路径方法
const resolve = dir => path.join(__dirname, dir)
const BASE_URL = process.env.NODE_ENV === 'production' ? '' : '/'
const plugins =
process.env.NODE_ENV === 'production'
? [
new FilemanagerWebpackPlugin({
onEnd: [
{ delete: [resolve('dist.zip')] },
{
archive: [
{ source: resolve('dist'), destination: resolve('dist.zip') }
]
}
]
})
]
: []
module.exports = {
lintOnSave: undefined,
assetsDir: 'static',
// 打包时不生成map文件,减少打包体积,加快打包速度
productionSourceMap: false,
devServer: {
https: true,
inline: true,
proxy: {
'/chery': {
target: process.env.VUE_APP_BASE_API
}
// '/': {
// bypass: devServerProxyBypass,
// secure: false,
// target: serverTarget,
// headers: {
// Host: new URL(serverTarget).host
// }
// }
}
},
configureWebpack: {},
chainWebpack: config => {
config.resolve.alias
.set('@', resolve('src'))
.set('_c', resolve('src/components'))
// set svg-sprite-loader
config.module
.rule('svg')
.exclude.add(resolve('src/icons'))
.end()
config.module
.rule('icons')
.test(/\.svg$/)
.include.add(resolve('src/icons'))
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.options({
symbolId: 'icon-[name]'
})
.end()
}
}
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!