From f09b864e300d6de32b856fc4ee7f913ca038ac18 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Sat, 22 Jan 2022 09:02:28 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BB=85=E5=AE=A2=E6=88=B7=E7=AB=AF?= =?UTF-8?q?=E6=88=96Chrome=E6=B5=8F=E8=A7=88=E5=99=A8=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E4=B8=BB=E9=A2=98=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/package.json | 2 +- package.json | 2 +- public/js/app.js | 2 +- public/js/build/{412.js => 845.js} | 2 +- resources/assets/js/functions/common.js | 9 +++++++++ resources/assets/js/functions/web.js | 3 +++ resources/assets/js/pages/manage.vue | 4 ++++ resources/assets/js/store/state.js | 3 ++- 8 files changed, 22 insertions(+), 5 deletions(-) rename public/js/build/{412.js => 845.js} (83%) diff --git a/electron/package.json b/electron/package.json index 3f5ddeaac..b85456de8 100644 --- a/electron/package.json +++ b/electron/package.json @@ -1,6 +1,6 @@ { "name": "DooTask", - "version": "0.6.79", + "version": "0.6.80", "description": "DooTask is task management system.", "main": "main.js", "license": "MIT", diff --git a/package.json b/package.json index 901faf200..578abab94 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "DooTask", - "version": "0.6.79", + "version": "0.6.80", "description": "DooTask is task management system.", "scripts": { "start": "./cmd dev", diff --git a/public/js/app.js b/public/js/app.js index 2d6417313..af7f534ab 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1,2 +1,2 @@ /*! For license information please see app.js.LICENSE.txt */ -(()=>{var e,t,n,i,r,a={36890:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>k});var i=n(88239),r=n(72444),a=/%[sdj%]/g;function o(){for(var e=arguments.length,t=Array(e),n=0;n=o)return e;switch(e){case"%s":return String(t[i++]);case"%d":return Number(t[i++]);case"%j":try{return JSON.stringify(t[i++])}catch(e){return"[Circular]"}break;default:return e}})),l=t[i];i()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},m={integer:function(e){return m.number(e)&&parseInt(e,10)===e},float:function(e){return m.number(e)&&!m.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(e){return!1}},date:function(e){return"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear},number:function(e){return!isNaN(e)&&"number"==typeof e},object:function(e){return"object"===(void 0===e?"undefined":(0,r.Z)(e))&&!m.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&!!e.match(p.email)&&e.length<255},url:function(e){return"string"==typeof e&&!!e.match(p.url)},hex:function(e){return"string"==typeof e&&!!e.match(p.hex)}};const v=function(e,t,n,i,a){if(e.required&&void 0===t)h(e,t,n,i,a);else{var s=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(s)>-1?m[s](t)||i.push(o(a.messages.types[s],e.fullField,e.type)):s&&(void 0===t?"undefined":(0,r.Z)(t))!==e.type&&i.push(o(a.messages.types[s],e.fullField,e.type))}};const g={required:h,whitespace:f,type:v,range:function(e,t,n,i,r){var a="number"==typeof e.len,s="number"==typeof e.min,l="number"==typeof e.max,u=t,c=null,d="number"==typeof t,h="string"==typeof t,f=Array.isArray(t);if(d?c="number":h?c="string":f&&(c="array"),!c)return!1;f&&(u=t.length),h&&(u=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),a?u!==e.len&&i.push(o(r.messages[c].len,e.fullField,e.len)):s&&!l&&ue.max?i.push(o(r.messages[c].max,e.fullField,e.max)):s&&l&&(ue.max)&&i.push(o(r.messages[c].range,e.fullField,e.min,e.max))},enum:function(e,t,n,i,r){e.enum=Array.isArray(e.enum)?e.enum:[],-1===e.enum.indexOf(t)&&i.push(o(r.messages.enum,e.fullField,e.enum.join(", ")))},pattern:function(e,t,n,i,r){if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||i.push(o(r.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"==typeof e.pattern){new RegExp(e.pattern).test(t)||i.push(o(r.messages.pattern.mismatch,e.fullField,t,e.pattern))}}};const b=function(e,t,n,i,a){var o=[],s=Array.isArray(t)?"array":void 0===t?"undefined":(0,r.Z)(t);g.required(e,t,i,o,a,s),n(o)};const y=function(e,t,n,i,r){var a=e.type,o=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t,a)&&!e.required)return n();g.required(e,t,i,o,r,a),s(t,a)||g.type(e,t,i,o,r)}n(o)},w={string:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t,"string")&&!e.required)return n();g.required(e,t,i,a,r,"string"),s(t,"string")||(g.type(e,t,i,a,r),g.range(e,t,i,a,r),g.pattern(e,t,i,a,r),!0===e.whitespace&&g.whitespace(e,t,i,a,r))}n(a)},method:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t)&&!e.required)return n();g.required(e,t,i,a,r),void 0!==t&&g.type(e,t,i,a,r)}n(a)},number:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t)&&!e.required)return n();g.required(e,t,i,a,r),void 0!==t&&(g.type(e,t,i,a,r),g.range(e,t,i,a,r))}n(a)},boolean:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t)&&!e.required)return n();g.required(e,t,i,a,r),void 0!==t&&g.type(e,t,i,a,r)}n(a)},regexp:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t)&&!e.required)return n();g.required(e,t,i,a,r),s(t)||g.type(e,t,i,a,r)}n(a)},integer:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t)&&!e.required)return n();g.required(e,t,i,a,r),void 0!==t&&(g.type(e,t,i,a,r),g.range(e,t,i,a,r))}n(a)},float:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t)&&!e.required)return n();g.required(e,t,i,a,r),void 0!==t&&(g.type(e,t,i,a,r),g.range(e,t,i,a,r))}n(a)},array:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t,"array")&&!e.required)return n();g.required(e,t,i,a,r,"array"),s(t,"array")||(g.type(e,t,i,a,r),g.range(e,t,i,a,r))}n(a)},object:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t)&&!e.required)return n();g.required(e,t,i,a,r),void 0!==t&&g.type(e,t,i,a,r)}n(a)},enum:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t)&&!e.required)return n();g.required(e,t,i,a,r),t&&g.enum(e,t,i,a,r)}n(a)},pattern:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t,"string")&&!e.required)return n();g.required(e,t,i,a,r),s(t,"string")||g.pattern(e,t,i,a,r)}n(a)},date:function(e,t,n,i,r){var a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(s(t)&&!e.required)return n();if(g.required(e,t,i,a,r),!s(t)){var o=void 0;o="number"==typeof t?new Date(t):t,g.type(e,o,i,a,r),o&&g.range(e,o.getTime(),i,a,r)}}n(a)},url:y,hex:y,email:y,required:b};function _(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var x=_();function C(e){this.rules=null,this._messages=x,this.define(e)}C.prototype={messages:function(e){return e&&(this._messages=d(_(),e)),this._messages},define:function(e){if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!==(void 0===e?"undefined":(0,r.Z)(e))||Array.isArray(e))throw new Error("Rules must be an object");this.rules={};var t=void 0,n=void 0;for(t in e)e.hasOwnProperty(t)&&(n=e[t],this.rules[t]=Array.isArray(n)?n:[n])},validate:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments[2],s=e,l=n,h=a;if("function"==typeof l&&(h=l,l={}),this.rules&&0!==Object.keys(this.rules).length){if(l.messages){var f=this.messages();f===x&&(f=_()),d(f,l.messages),l.messages=f}else l.messages=this.messages();var p=void 0,m=void 0,v={},g=l.keys||Object.keys(this.rules);g.forEach((function(n){p=t.rules[n],m=s[n],p.forEach((function(r){var a=r;"function"==typeof a.transform&&(s===e&&(s=(0,i.Z)({},s)),m=s[n]=a.transform(m)),(a="function"==typeof a?{validator:a}:(0,i.Z)({},a)).validator=t.getValidationMethod(a),a.field=n,a.fullField=a.fullField||n,a.type=t.getType(a),a.validator&&(v[n]=v[n]||[],v[n].push({rule:a,value:m,source:s,field:n}))}))}));var b={};u(v,l,(function(e,t){var n=e.rule,a=!("object"!==n.type&&"array"!==n.type||"object"!==(0,r.Z)(n.fields)&&"object"!==(0,r.Z)(n.defaultField));function s(e,t){return(0,i.Z)({},t,{fullField:n.fullField+"."+e})}function u(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],u=r;if(Array.isArray(u)||(u=[u]),u.length,u.length&&n.message&&(u=[].concat(n.message)),u=u.map(c(n)),l.first&&u.length)return b[n.field]=1,t(u);if(a){if(n.required&&!e.value)return u=n.message?[].concat(n.message).map(c(n)):l.error?[l.error(n,o(l.messages.required,n.field))]:[],t(u);var d={};if(n.defaultField)for(var h in e.value)e.value.hasOwnProperty(h)&&(d[h]=n.defaultField);for(var f in d=(0,i.Z)({},d,e.rule.fields))if(d.hasOwnProperty(f)){var p=Array.isArray(d[f])?d[f]:[d[f]];d[f]=p.map(s.bind(null,f))}var m=new C(d);m.messages(l.messages),e.rule.options&&(e.rule.options.messages=l.messages,e.rule.options.error=l.error),m.validate(e.value,e.rule.options||l,(function(e){t(e&&e.length?u.concat(e):e)}))}else t(u)}a=a&&(n.required||!n.required&&e.value),n.field=e.field;var d=n.validator(n,e.value,u,e.source,l);d&&d.then&&d.then((function(){return u()}),(function(e){return u(e)}))}),(function(e){y(e)}))}else h&&h();function y(e){var t,n=void 0,i=void 0,r=[],a={};for(n=0;n{e.exports=n(51609)},55448:(e,t,n)=>{"use strict";var i=n(64867),r=n(36026),a=n(4372),o=n(15327),s=n(94097),l=n(84109),u=n(67985),c=n(85061),d=n(45655),h=n(65263);e.exports=function(e){return new Promise((function(t,n){var f,p=e.data,m=e.headers,v=e.responseType;function g(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}i.isFormData(p)&&delete m["Content-Type"];var b=new XMLHttpRequest;if(e.auth){var y=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(y+":"+w)}var _=s(e.baseURL,e.url);function x(){if(b){var i="getAllResponseHeaders"in b?l(b.getAllResponseHeaders()):null,a={data:v&&"text"!==v&&"json"!==v?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:i,config:e,request:b};r((function(e){t(e),g()}),(function(e){n(e),g()}),a),b=null}}if(b.open(e.method.toUpperCase(),o(_,e.params,e.paramsSerializer),!0),b.timeout=e.timeout,"onloadend"in b?b.onloadend=x:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(x)},b.onabort=function(){b&&(n(c("Request aborted",e,"ECONNABORTED",b)),b=null)},b.onerror=function(){n(c("Network Error",e,null,b)),b=null},b.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",i=e.transitional||d.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(c(t,e,i.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",b)),b=null},i.isStandardBrowserEnv()){var C=(e.withCredentials||u(_))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;C&&(m[e.xsrfHeaderName]=C)}"setRequestHeader"in b&&i.forEach(m,(function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete m[t]:b.setRequestHeader(t,e)})),i.isUndefined(e.withCredentials)||(b.withCredentials=!!e.withCredentials),v&&"json"!==v&&(b.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&b.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(e){b&&(n(!e||e&&e.type?new h("canceled"):e),b.abort(),b=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),p||(p=null),b.send(p)}))}},51609:(e,t,n)=>{"use strict";var i=n(64867),r=n(91849),a=n(30321),o=n(47185);var s=function e(t){var n=new a(t),s=r(a.prototype.request,n);return i.extend(s,a.prototype,n),i.extend(s,n),s.create=function(n){return e(o(t,n))},s}(n(45655));s.Axios=a,s.Cancel=n(65263),s.CancelToken=n(14972),s.isCancel=n(26502),s.VERSION=n(97288).version,s.all=function(e){return Promise.all(e)},s.spread=n(8713),s.isAxiosError=n(16268),e.exports=s,e.exports.default=s},65263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},14972:(e,t,n)=>{"use strict";var i=n(65263);function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,i=n._listeners.length;for(t=0;t{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},30321:(e,t,n)=>{"use strict";var i=n(64867),r=n(15327),a=n(80782),o=n(13572),s=n(47185),l=n(54875),u=l.validators;function c(e){this.defaults=e,this.interceptors={request:new a,response:new a}}c.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&l.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var n=[],i=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(i=i&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var r,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!i){var c=[o,void 0];for(Array.prototype.unshift.apply(c,n),c=c.concat(a),r=Promise.resolve(e);c.length;)r=r.then(c.shift(),c.shift());return r}for(var d=e;n.length;){var h=n.shift(),f=n.shift();try{d=h(d)}catch(e){f(e);break}}try{r=o(d)}catch(e){return Promise.reject(e)}for(;a.length;)r=r.then(a.shift(),a.shift());return r},c.prototype.getUri=function(e){return e=s(this.defaults,e),r(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},i.forEach(["delete","get","head","options"],(function(e){c.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),i.forEach(["post","put","patch"],(function(e){c.prototype[e]=function(t,n,i){return this.request(s(i||{},{method:e,url:t,data:n}))}})),e.exports=c},80782:(e,t,n)=>{"use strict";var i=n(64867);function r(){this.handlers=[]}r.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){i.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=r},94097:(e,t,n)=>{"use strict";var i=n(91793),r=n(7303);e.exports=function(e,t){return e&&!i(t)?r(e,t):t}},85061:(e,t,n)=>{"use strict";var i=n(80481);e.exports=function(e,t,n,r,a){var o=new Error(e);return i(o,t,n,r,a)}},13572:(e,t,n)=>{"use strict";var i=n(64867),r=n(18527),a=n(26502),o=n(45655),s=n(65263);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=r.call(e,e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),i.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||o.adapter)(e).then((function(t){return l(e),t.data=r.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(l(e),t&&t.response&&(t.response.data=r.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},80481:e=>{"use strict";e.exports=function(e,t,n,i,r){return e.config=t,n&&(e.code=n),e.request=i,e.response=r,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},47185:(e,t,n)=>{"use strict";var i=n(64867);e.exports=function(e,t){t=t||{};var n={};function r(e,t){return i.isPlainObject(e)&&i.isPlainObject(t)?i.merge(e,t):i.isPlainObject(t)?i.merge({},t):i.isArray(t)?t.slice():t}function a(n){return i.isUndefined(t[n])?i.isUndefined(e[n])?void 0:r(void 0,e[n]):r(e[n],t[n])}function o(e){if(!i.isUndefined(t[e]))return r(void 0,t[e])}function s(n){return i.isUndefined(t[n])?i.isUndefined(e[n])?void 0:r(void 0,e[n]):r(void 0,t[n])}function l(n){return n in t?r(e[n],t[n]):n in e?r(void 0,e[n]):void 0}var u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return i.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||a,r=t(e);i.isUndefined(r)&&t!==l||(n[e]=r)})),n}},36026:(e,t,n)=>{"use strict";var i=n(85061);e.exports=function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(i("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},18527:(e,t,n)=>{"use strict";var i=n(64867),r=n(45655);e.exports=function(e,t,n){var a=this||r;return i.forEach(n,(function(n){e=n.call(a,e,t)})),e}},45655:(e,t,n)=>{"use strict";var i=n(34155),r=n(64867),a=n(16016),o=n(80481),s={"Content-Type":"application/x-www-form-urlencoded"};function l(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==i&&"[object process]"===Object.prototype.toString.call(i))&&(u=n(55448)),u),transformRequest:[function(e,t){return a(t,"Accept"),a(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(l(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(l(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||c.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw o(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){c.headers[e]=r.merge(s)})),e.exports=c},97288:e=>{e.exports={version:"0.24.0"}},91849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),i=0;i{"use strict";var i=n(64867);function r(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(i.isURLSearchParams(t))a=t.toString();else{var o=[];i.forEach(t,(function(e,t){null!=e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,(function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),o.push(r(t)+"="+r(e))})))})),a=o.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{"use strict";var i=n(64867);e.exports=i.isStandardBrowserEnv()?{write:function(e,t,n,r,a,o){var s=[];s.push(e+"="+encodeURIComponent(t)),i.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),i.isString(r)&&s.push("path="+r),i.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},91793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},16268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},67985:(e,t,n)=>{"use strict";var i=n(64867);e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=i.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},16016:(e,t,n)=>{"use strict";var i=n(64867);e.exports=function(e,t){i.forEach(e,(function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])}))}},84109:(e,t,n)=>{"use strict";var i=n(64867),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,o={};return e?(i.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=i.trim(e.substr(0,a)).toLowerCase(),n=i.trim(e.substr(a+1)),t){if(o[t]&&r.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},54875:(e,t,n)=>{"use strict";var i=n(97288).version,r={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){r[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={};r.transitional=function(e,t,n){function r(e,t){return"[Axios v"+i+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,o){if(!1===e)throw new Error(r(i," has been removed"+(t?" in "+t:"")));return t&&!a[i]&&(a[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var i=Object.keys(e),r=i.length;r-- >0;){var a=i[r],o=t[a];if(o){var s=e[a],l=void 0===s||o(s,a,e);if(!0!==l)throw new TypeError("option "+a+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+a)}},validators:r}},64867:(e,t,n)=>{"use strict";var i=n(91849),r=Object.prototype.toString;function a(e){return"[object Array]"===r.call(e)}function o(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function l(e){if("[object Object]"!==r.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===r.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,i=e.length;n{var t=/^(attrs|props|on|nativeOn|class|style|hook)$/;function n(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}}e.exports=function(e){return e.reduce((function(e,i){var r,a,o,s,l;for(o in i)if(r=e[o],a=i[o],r&&t.test(o))if("class"===o&&("string"==typeof r&&(l=r,e[o]=r={},r[l]=!0),"string"==typeof a&&(l=a,i[o]=a={},a[l]=!0)),"on"===o||"nativeOn"===o||"hook"===o)for(s in a)r[s]=n(r[s],a[s]);else if(Array.isArray(r))e[o]=r.concat(a);else if(Array.isArray(a))e[o]=[r].concat(a);else for(s in a)r[s]=a[s];else e[o]=i[o];return e}),{})}},38809:(e,t,n)=>{"use strict";n(90091),n(92693);var i=n(70538),r=n(20629);const a={name:"Spinner"};var o=n(51900);const s=(0,o.Z)(a,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"common-spinner",attrs:{id:"common-spinner"}},[t("Loading",{staticClass:"common-circular"})],1)}),[],!1,null,null,null).exports;var l=n(71905),u=n(9669),c=n.n(u);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function h(e){for(var t=1;tl?1:-1;n=a+1,i=o+1}for(;n0)return 1;n=u+1}for(;i0)return-1;i=c+1}return 0},getReleases:function(){var e=this;if(!(this.repoStatus>0||this.loadIng>0)){var t=$A.getStorageJson("cacheAppdown"),n=600;if(t.time&&t.time+n>Math.round((new Date).getTime()/1e3))return this.repoReleases=t.data,this.chackReleases(),void setTimeout(this.getReleases,6e5);this.loadIng++,c().get("https://api.github.com/repos/"+this.repoName+"/releases/latest").then((function(n){var i=n.status,r=n.data;e.loadIng--,200===i&&(t={time:Math.round((new Date).getTime()/1e3),data:r},$A.setStorage("cacheAppdown",t),e.repoReleases=t.data,e.chackReleases()),setTimeout(e.getReleases,6e5)})).catch((function(){e.loadIng--,setTimeout(e.getReleases,6e5)}))}},chackReleases:function(){var e=$A.getDomain(window.systemInfo.apiUrl);if((""==e||$A.leftExists(e,"127.0.0.1"))&&(e="public"),this.$Electron){var t=(window.navigator.userAgent+"").match(/\s+(Main|Sub)TaskWindow\/(.*?)\/(.*?)\//);if(!t)return;var n=null;if("darwin"===t[2])n="".concat(e,"-").concat(this.repoReleases.tag_name,"-mac-").concat(t[3],".pkg");else{if("win32"!==t[2])return;n="".concat(e,"-").concat(this.repoReleases.tag_name,"-win-").concat(t[3],".exe")}if(this.repoData=(this.repoReleases.assets||[]).find((function(e){return e.name==n})),!this.repoData)return;var i=window.systemInfo.version,r=$A.leftDelete(this.repoReleases.tag_name.toLowerCase(),"v");1===this.compareVersion(r,i)&&(console.log("New version: "+r),this.$Electron.ipcRenderer.send("downloadFile",{url:this.repoData.browser_download_url}))}else if(this.repoData=(this.repoReleases.assets||[]).find((function(t){var n=t.name;return $A.strExists(n,e)})),this.repoData){var a=$A.leftDelete(this.repoReleases.tag_name.toLowerCase(),"v");console.log("Exist client: "+a),this.repoStatus=1}},releasesNotification:function(){var e=this;$A.modalConfirm({okText:this.$L("立即更新"),onOk:function(){e.installApplication()},onCancel:function(){e.repoStatus=2},render:function(t){return t("div",{class:"common-app-down-notification"},[t("div",{class:"notification-head"},[t("div",{class:"notification-title"},e.$L("发现新版本")),t("Tag",{props:{color:"volcano"}},e.repoReleases.tag_name)]),t("MarkdownPreview",{class:"notification-body",props:{initialValue:e.repoReleases.body}})])}})},installApplication:function(){this.$Electron&&(this.$Electron.ipcRenderer.send("openFile",{path:this.downloadResult.savePath}),this.$Electron.ipcRenderer.send("windowQuit"))}}};function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const g={components:{AppDown:(0,o.Z)(p,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.showButton?n("div",{staticClass:"common-app-down",class:{"on-client":!!e.$Electron},attrs:{"data-route":e.$route.name}},[e.$Electron?n("div",{staticClass:"common-app-down-link",on:{click:e.releasesNotification}},[n("Icon",{attrs:{type:"md-download"}}),e._v(" "+e._s(e.$L(e.repoTitle))+"\n ")],1):n("a",{staticClass:"common-app-down-link",attrs:{href:e.repoReleases.html_url,target:"_blank"}},[n("Icon",{attrs:{type:"md-download"}}),e._v(" "+e._s(e.$L(e.repoTitle))+"\n ")],1)]):e._e()}),[],!1,null,null,null).exports,Spinner:s},data:function(){return{transitionName:null}},created:function(){this.electronEvents()},mounted:function(){var e=this,t=window.location.hash;0===t.indexOf("#")&&(t=t.substr(1))&&this.$nextTick((function(){t=$A.removeURLParameter(t,"token"),e.goForward({path:t})})),this.sessionStorage("/",1);var n=window.location.pathname;n&&0===this.sessionStorage(n)&&this.sessionStorage(n,this.sessionStorage("::count")+1),setInterval(this.searchEnter,1e3),window.addEventListener("resize",this.windowSizeListener)},beforeDestroy:function(){window.removeEventListener("resize",this.windowSizeListener)},computed:function(e){for(var t=1;t0?e.cacheDrawerOverlay[e.cacheDrawerOverlay.length-1].close():t.send("windowHidden"))})),t.on("dispatch",(function(t,n){if($A.isJson(n)){var i=n.action,r=n.data;e.$store.dispatch(i,r)}}))}}}};var b=n(93379),y=n.n(b),w=n(72362),_={insert:"head",singleton:!1};y()(w.Z,_);w.Z.locals;const x=(0,o.Z)(g,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"app"}},[n("transition",{attrs:{name:e.transitionName}},[n("keep-alive",[n("router-view",{staticClass:"child-view",class:{"view-768":e.$store.state.windowMax768}})],1)],1),e._v(" "),n("Spinner"),e._v(" "),n("AppDown")],1)}),[],!1,null,"e57308e4",null).exports,C=[{name:"index",path:"/",component:function(){return n.e(855).then(n.bind(n,45855))}},{name:"manage",path:"/manage",meta:{slide:!1},component:function(){return n.e(412).then(n.bind(n,93412))},children:[{name:"manage-dashboard",path:"dashboard",component:function(){return n.e(603).then(n.bind(n,8603))}},{name:"manage-calendar",path:"calendar",component:function(){return n.e(357).then(n.bind(n,48357))}},{name:"manage-messenger",path:"messenger",component:function(){return n.e(639).then(n.bind(n,58639))}},{path:"setting",component:function(){return n.e(76).then(n.bind(n,20076))},children:[{name:"manage-setting",path:"",redirect:"personal"},{name:"manage-setting-personal",path:"personal",component:function(){return n.e(252).then(n.bind(n,32252))}},{name:"manage-setting-password",path:"password",component:function(){return n.e(607).then(n.bind(n,60607))}},{name:"manage-setting-system",path:"system",component:function(){return n.e(189).then(n.bind(n,31189))}},{name:"manage-setting-priority",path:"priority",component:function(){return n.e(805).then(n.bind(n,80805))}}]},{name:"manage-project-invite",path:"project/invite",component:function(){return n.e(481).then(n.bind(n,49481))}},{name:"manage-project",path:"project/:id",component:function(){return n.e(196).then(n.bind(n,21196))}},{name:"manage-file",path:"file",component:function(){return n.e(328).then(n.bind(n,17328))}}]},{name:"single-file",path:"/single/file/:id",component:function(){return n.e(954).then(n.bind(n,29954))}},{name:"single-task",path:"/single/task/:id",component:function(){return n.e(700).then(n.bind(n,66700))}},{name:"login",path:"/login",component:function(){return n.e(10).then(n.bind(n,63010))}},{name:"404",path:"*",component:function(){return n.e(418).then(n.bind(n,54418))}}];function k(e,t){for(var n in t)e[n]=t[n];return e}var S=/[!'()*]/g,O=function(e){return"%"+e.charCodeAt(0).toString(16)},T=/%2C/g,D=function(e){return encodeURIComponent(e).replace(S,O).replace(T,",")};function E(e){try{return decodeURIComponent(e)}catch(e){0}return e}var $=function(e){return null==e||"object"==typeof e?e:String(e)};function M(e){var t={};return(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach((function(e){var n=e.replace(/\+/g," ").split("="),i=E(n.shift()),r=n.length>0?E(n.join("=")):null;void 0===t[i]?t[i]=r:Array.isArray(t[i])?t[i].push(r):t[i]=[t[i],r]})),t):t}function P(e){var t=e?Object.keys(e).map((function(t){var n=e[t];if(void 0===n)return"";if(null===n)return D(t);if(Array.isArray(n)){var i=[];return n.forEach((function(e){void 0!==e&&(null===e?i.push(D(t)):i.push(D(t)+"="+D(e)))})),i.join("&")}return D(t)+"="+D(n)})).filter((function(e){return e.length>0})).join("&"):null;return t?"?"+t:""}var I=/\/?$/;function j(e,t,n,i){var r=i&&i.options.stringifyQuery,a=t.query||{};try{a=A(a)}catch(e){}var o={name:t.name||e&&e.name,meta:e&&e.meta||{},path:t.path||"/",hash:t.hash||"",query:a,params:t.params||{},fullPath:F(t,r),matched:e?L(e):[]};return n&&(o.redirectedFrom=F(n,r)),Object.freeze(o)}function A(e){if(Array.isArray(e))return e.map(A);if(e&&"object"==typeof e){var t={};for(var n in e)t[n]=A(e[n]);return t}return e}var N=j(null,{path:"/"});function L(e){for(var t=[];e;)t.unshift(e),e=e.parent;return t}function F(e,t){var n=e.path,i=e.query;void 0===i&&(i={});var r=e.hash;return void 0===r&&(r=""),(n||"/")+(t||P)(i)+r}function R(e,t,n){return t===N?e===t:!!t&&(e.path&&t.path?e.path.replace(I,"")===t.path.replace(I,"")&&(n||e.hash===t.hash&&B(e.query,t.query)):!(!e.name||!t.name)&&(e.name===t.name&&(n||e.hash===t.hash&&B(e.query,t.query)&&B(e.params,t.params))))}function B(e,t){if(void 0===e&&(e={}),void 0===t&&(t={}),!e||!t)return e===t;var n=Object.keys(e).sort(),i=Object.keys(t).sort();return n.length===i.length&&n.every((function(n,r){var a=e[n];if(i[r]!==n)return!1;var o=t[n];return null==a||null==o?a===o:"object"==typeof a&&"object"==typeof o?B(a,o):String(a)===String(o)}))}function V(e){for(var t=0;t=0&&(t=e.slice(i),e=e.slice(0,i));var r=e.indexOf("?");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{path:e,query:n,hash:t}}(r.path||""),u=t&&t.path||"/",c=l.path?W(l.path,u,n||r.append):u,d=function(e,t,n){void 0===t&&(t={});var i,r=n||M;try{i=r(e||"")}catch(e){i={}}for(var a in t){var o=t[a];i[a]=Array.isArray(o)?o.map($):$(o)}return i}(l.query,r.query,i&&i.options.parseQuery),h=r.hash||l.hash;return h&&"#"!==h.charAt(0)&&(h="#"+h),{_normalized:!0,path:c,query:d,hash:h}}var de,he=function(){},fe={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(e){var t=this,n=this.$router,i=this.$route,r=n.resolve(this.to,i,this.append),a=r.location,o=r.route,s=r.href,l={},u=n.options.linkActiveClass,c=n.options.linkExactActiveClass,d=null==u?"router-link-active":u,h=null==c?"router-link-exact-active":c,f=null==this.activeClass?d:this.activeClass,p=null==this.exactActiveClass?h:this.exactActiveClass,m=o.redirectedFrom?j(null,ce(o.redirectedFrom),null,n):o;l[p]=R(i,m,this.exactPath),l[f]=this.exact||this.exactPath?l[p]:function(e,t){return 0===e.path.replace(I,"/").indexOf(t.path.replace(I,"/"))&&(!t.hash||e.hash===t.hash)&&function(e,t){for(var n in t)if(!(n in e))return!1;return!0}(e.query,t.query)}(i,m);var v=l[p]?this.ariaCurrentValue:null,g=function(e){pe(e)&&(t.replace?n.replace(a,he):n.push(a,he))},b={click:pe};Array.isArray(this.event)?this.event.forEach((function(e){b[e]=g})):b[this.event]=g;var y={class:l},w=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:s,route:o,navigate:g,isActive:l[f],isExactActive:l[p]});if(w){if(1===w.length)return w[0];if(w.length>1||!w.length)return 0===w.length?e():e("span",{},w)}if("a"===this.tag)y.on=b,y.attrs={href:s,"aria-current":v};else{var _=me(this.$slots.default);if(_){_.isStatic=!1;var x=_.data=k({},_.data);for(var C in x.on=x.on||{},x.on){var S=x.on[C];C in b&&(x.on[C]=Array.isArray(S)?S:[S])}for(var O in b)O in x.on?x.on[O].push(b[O]):x.on[O]=g;var T=_.data.attrs=k({},_.data.attrs);T.href=s,T["aria-current"]=v}else y.on=b}return e(this.tag,y,this.$slots.default)}};function pe(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||e.defaultPrevented||void 0!==e.button&&0!==e.button)){if(e.currentTarget&&e.currentTarget.getAttribute){var t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function me(e){if(e)for(var t,n=0;n-1&&(s.params[h]=n.params[h]);return s.path=ue(c.path,s.params),l(c,s,o)}if(s.path){s.params={};for(var f=0;f=e.length?n():e[r]?t(e[r],(function(){i(r+1)})):i(r+1)};i(0)}var ze={redirected:2,aborted:4,cancelled:8,duplicated:16};function He(e,t){return qe(e,t,ze.redirected,'Redirected when going from "'+e.fullPath+'" to "'+function(e){if("string"==typeof e)return e;if("path"in e)return e.path;var t={};return Ue.forEach((function(n){n in e&&(t[n]=e[n])})),JSON.stringify(t,null,2)}(t)+'" via a navigation guard.')}function We(e,t){return qe(e,t,ze.cancelled,'Navigation cancelled from "'+e.fullPath+'" to "'+t.fullPath+'" with a new navigation.')}function qe(e,t,n,i){var r=new Error(i);return r._isRouter=!0,r.from=e,r.to=t,r.type=n,r}var Ue=["params","query","hash"];function Ke(e){return Object.prototype.toString.call(e).indexOf("Error")>-1}function Ge(e,t){return Ke(e)&&e._isRouter&&(null==t||e.type===t)}function Ye(e){return function(t,n,i){var r=!1,a=0,o=null;Ze(e,(function(e,t,n,s){if("function"==typeof e&&void 0===e.cid){r=!0,a++;var l,u=Qe((function(t){var r;((r=t).__esModule||Je&&"Module"===r[Symbol.toStringTag])&&(t=t.default),e.resolved="function"==typeof t?t:de.extend(t),n.components[s]=t,--a<=0&&i()})),c=Qe((function(e){var t="Failed to resolve async component "+s+": "+e;o||(o=Ke(e)?e:new Error(t),i(o))}));try{l=e(u,c)}catch(e){c(e)}if(l)if("function"==typeof l.then)l.then(u,c);else{var d=l.component;d&&"function"==typeof d.then&&d.then(u,c)}}})),r||i()}}function Ze(e,t){return Xe(e.map((function(e){return Object.keys(e.components).map((function(n){return t(e.components[n],e.instances[n],e,n)}))})))}function Xe(e){return Array.prototype.concat.apply([],e)}var Je="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Qe(e){var t=!1;return function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];if(!t)return t=!0,e.apply(this,n)}}var et=function(e,t){this.router=e,this.base=function(e){if(!e)if(ve){var t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else e="/";"/"!==e.charAt(0)&&(e="/"+e);return e.replace(/\/$/,"")}(t),this.current=N,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function tt(e,t,n,i){var r=Ze(e,(function(e,i,r,a){var o=function(e,t){"function"!=typeof e&&(e=de.extend(e));return e.options[t]}(e,t);if(o)return Array.isArray(o)?o.map((function(e){return n(e,i,r,a)})):n(o,i,r,a)}));return Xe(i?r.reverse():r)}function nt(e,t){if(t)return function(){return e.apply(t,arguments)}}et.prototype.listen=function(e){this.cb=e},et.prototype.onReady=function(e,t){this.ready?e():(this.readyCbs.push(e),t&&this.readyErrorCbs.push(t))},et.prototype.onError=function(e){this.errorCbs.push(e)},et.prototype.transitionTo=function(e,t,n){var i,r=this;try{i=this.router.match(e,this.current)}catch(e){throw this.errorCbs.forEach((function(t){t(e)})),e}var a=this.current;this.confirmTransition(i,(function(){r.updateRoute(i),t&&t(i),r.ensureURL(),r.router.afterHooks.forEach((function(e){e&&e(i,a)})),r.ready||(r.ready=!0,r.readyCbs.forEach((function(e){e(i)})))}),(function(e){n&&n(e),e&&!r.ready&&(Ge(e,ze.redirected)&&a===N||(r.ready=!0,r.readyErrorCbs.forEach((function(t){t(e)}))))}))},et.prototype.confirmTransition=function(e,t,n){var i=this,r=this.current;this.pending=e;var a,o,s=function(e){!Ge(e)&&Ke(e)&&(i.errorCbs.length?i.errorCbs.forEach((function(t){t(e)})):console.error(e)),n&&n(e)},l=e.matched.length-1,u=r.matched.length-1;if(R(e,r)&&l===u&&e.matched[l]===r.matched[u])return this.ensureURL(),e.hash&&Ee(this.router,r,e,!1),s(((o=qe(a=r,e,ze.duplicated,'Avoided redundant navigation to current location: "'+a.fullPath+'".')).name="NavigationDuplicated",o));var c=function(e,t){var n,i=Math.max(e.length,t.length);for(n=0;n0)){var t=this.router,n=t.options.scrollBehavior,i=Fe&&n;i&&this.listeners.push(De());var r=function(){var n=e.current,r=rt(e.base);e.current===N&&r===e._startLocation||e.transitionTo(r,(function(e){i&&Ee(t,e,n,!0)}))};window.addEventListener("popstate",r),this.listeners.push((function(){window.removeEventListener("popstate",r)}))}},t.prototype.go=function(e){window.history.go(e)},t.prototype.push=function(e,t,n){var i=this,r=this.current;this.transitionTo(e,(function(e){Re(q(i.base+e.fullPath)),Ee(i.router,e,r,!1),t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var i=this,r=this.current;this.transitionTo(e,(function(e){Be(q(i.base+e.fullPath)),Ee(i.router,e,r,!1),t&&t(e)}),n)},t.prototype.ensureURL=function(e){if(rt(this.base)!==this.current.fullPath){var t=q(this.base+this.current.fullPath);e?Re(t):Be(t)}},t.prototype.getCurrentLocation=function(){return rt(this.base)},t}(et);function rt(e){var t=window.location.pathname,n=t.toLowerCase(),i=e.toLowerCase();return!e||n!==i&&0!==n.indexOf(q(i+"/"))||(t=t.slice(e.length)),(t||"/")+window.location.search+window.location.hash}var at=function(e){function t(t,n,i){e.call(this,t,n),i&&function(e){var t=rt(e);if(!/^\/#/.test(t))return window.location.replace(q(e+"/#"+t)),!0}(this.base)||ot()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setupListeners=function(){var e=this;if(!(this.listeners.length>0)){var t=this.router.options.scrollBehavior,n=Fe&&t;n&&this.listeners.push(De());var i=function(){var t=e.current;ot()&&e.transitionTo(st(),(function(i){n&&Ee(e.router,i,t,!0),Fe||ct(i.fullPath)}))},r=Fe?"popstate":"hashchange";window.addEventListener(r,i),this.listeners.push((function(){window.removeEventListener(r,i)}))}},t.prototype.push=function(e,t,n){var i=this,r=this.current;this.transitionTo(e,(function(e){ut(e.fullPath),Ee(i.router,e,r,!1),t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var i=this,r=this.current;this.transitionTo(e,(function(e){ct(e.fullPath),Ee(i.router,e,r,!1),t&&t(e)}),n)},t.prototype.go=function(e){window.history.go(e)},t.prototype.ensureURL=function(e){var t=this.current.fullPath;st()!==t&&(e?ut(t):ct(t))},t.prototype.getCurrentLocation=function(){return st()},t}(et);function ot(){var e=st();return"/"===e.charAt(0)||(ct("/"+e),!1)}function st(){var e=window.location.href,t=e.indexOf("#");return t<0?"":e=e.slice(t+1)}function lt(e){var t=window.location.href,n=t.indexOf("#");return(n>=0?t.slice(0,n):t)+"#"+e}function ut(e){Fe?Re(lt(e)):window.location.hash=e}function ct(e){Fe?Be(lt(e)):window.location.replace(lt(e))}var dt=function(e){function t(t,n){e.call(this,t,n),this.stack=[],this.index=-1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.push=function(e,t,n){var i=this;this.transitionTo(e,(function(e){i.stack=i.stack.slice(0,i.index+1).concat(e),i.index++,t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var i=this;this.transitionTo(e,(function(e){i.stack=i.stack.slice(0,i.index).concat(e),t&&t(e)}),n)},t.prototype.go=function(e){var t=this,n=this.index+e;if(!(n<0||n>=this.stack.length)){var i=this.stack[n];this.confirmTransition(i,(function(){var e=t.current;t.index=n,t.updateRoute(i),t.router.afterHooks.forEach((function(t){t&&t(i,e)}))}),(function(e){Ge(e,ze.duplicated)&&(t.index=n)}))}},t.prototype.getCurrentLocation=function(){var e=this.stack[this.stack.length-1];return e?e.fullPath:"/"},t.prototype.ensureURL=function(){},t}(et),ht=function(e){void 0===e&&(e={}),this.app=null,this.apps=[],this.options=e,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=we(e.routes||[],this);var t=e.mode||"hash";switch(this.fallback="history"===t&&!Fe&&!1!==e.fallback,this.fallback&&(t="hash"),ve||(t="abstract"),this.mode=t,t){case"history":this.history=new it(this,e.base);break;case"hash":this.history=new at(this,e.base,this.fallback);break;case"abstract":this.history=new dt(this,e.base)}},ft={currentRoute:{configurable:!0}};function pt(e,t){return e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}ht.prototype.match=function(e,t,n){return this.matcher.match(e,t,n)},ft.currentRoute.get=function(){return this.history&&this.history.current},ht.prototype.init=function(e){var t=this;if(this.apps.push(e),e.$once("hook:destroyed",(function(){var n=t.apps.indexOf(e);n>-1&&t.apps.splice(n,1),t.app===e&&(t.app=t.apps[0]||null),t.app||t.history.teardown()})),!this.app){this.app=e;var n=this.history;if(n instanceof it||n instanceof at){var i=function(e){n.setupListeners(),function(e){var i=n.current,r=t.options.scrollBehavior;Fe&&r&&"fullPath"in e&&Ee(t,e,i,!1)}(e)};n.transitionTo(n.getCurrentLocation(),i,i)}n.listen((function(e){t.apps.forEach((function(t){t._route=e}))}))}},ht.prototype.beforeEach=function(e){return pt(this.beforeHooks,e)},ht.prototype.beforeResolve=function(e){return pt(this.resolveHooks,e)},ht.prototype.afterEach=function(e){return pt(this.afterHooks,e)},ht.prototype.onReady=function(e,t){this.history.onReady(e,t)},ht.prototype.onError=function(e){this.history.onError(e)},ht.prototype.push=function(e,t,n){var i=this;if(!t&&!n&&"undefined"!=typeof Promise)return new Promise((function(t,n){i.history.push(e,t,n)}));this.history.push(e,t,n)},ht.prototype.replace=function(e,t,n){var i=this;if(!t&&!n&&"undefined"!=typeof Promise)return new Promise((function(t,n){i.history.replace(e,t,n)}));this.history.replace(e,t,n)},ht.prototype.go=function(e){this.history.go(e)},ht.prototype.back=function(){this.go(-1)},ht.prototype.forward=function(){this.go(1)},ht.prototype.getMatchedComponents=function(e){var t=e?e.matched?e:this.resolve(e).route:this.currentRoute;return t?[].concat.apply([],t.matched.map((function(e){return Object.keys(e.components).map((function(t){return e.components[t]}))}))):[]},ht.prototype.resolve=function(e,t,n){var i=ce(e,t=t||this.history.current,n,this),r=this.match(i,t),a=r.redirectedFrom||r.fullPath,o=function(e,t,n){var i="hash"===n?"#"+t:t;return e?q(e+"/"+i):i}(this.history.base,a,this.mode);return{location:i,route:r,href:o,normalizedTo:i,resolved:r}},ht.prototype.getRoutes=function(){return this.matcher.getRoutes()},ht.prototype.addRoute=function(e,t){this.matcher.addRoute(e,t),this.history.current!==N&&this.history.transitionTo(this.history.getCurrentLocation())},ht.prototype.addRoutes=function(e){this.matcher.addRoutes(e),this.history.current!==N&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(ht.prototype,ft),ht.install=function e(t){if(!e.installed||de!==t){e.installed=!0,de=t;var n=function(e){return void 0!==e},i=function(e,t){var i=e.$options._parentVnode;n(i)&&n(i=i.data)&&n(i=i.registerRouteInstance)&&i(e,t)};t.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),t.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,i(this,this)},destroyed:function(){i(this)}}),Object.defineProperty(t.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(t.prototype,"$route",{get:function(){return this._routerRoot._route}}),t.component("RouterView",z),t.component("RouterLink",fe);var r=t.config.optionMergeStrategies;r.beforeRouteEnter=r.beforeRouteLeave=r.beforeRouteUpdate=r.created}},ht.version="3.5.3",ht.isNavigationFailure=Ge,ht.NavigationFailureType=ze,ht.START_LOCATION=N,ve&&window.Vue&&window.Vue.use(ht);const mt=ht;var vt=n(40158),gt=n.n(vt);function bt(e){return function(e){if(Array.isArray(e))return yt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return yt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n0){window.__projectId=t;var n=e.cacheProjects.find((function(e){return e.id==t}));if(n)return n}return{}},projectParameter:function(e){return function(t){if(!e.projectId)return!1;var n=e.cacheProjectParameter.find((function(t){return t.project_id==e.projectId}));return n||(n=$A.projectParameterTemplate(e.projectId),e.cacheProjectParameter.push(n)),n&&!!n[t]}},taskData:function(e){var t=e.taskId;if(0==t&&(t=$A.runNum(window.__taskId)),t>0){window.__taskId=t;var n=e.cacheTasks.find((function(e){return e.id==t}));if(n)return n}return{}},transforTasks:function(e){return function(t){return t.filter((function(e){var n=e.parent_id;return!(n>0&&t.find((function(e){return e.id==n})))})).map((function(n){if(n.parent_id>0){var i=e.cacheTasks.find((function(e){return e.id==n.parent_id}));return i?Object.assign({},i,{id:n.id,parent_id:n.parent_id,name:n.name,start_at:n.start_at,end_at:n.end_at,complete_at:n.complete_at,_time:n._time,flow_item_id:n.flow_item_id,flow_item_name:n.flow_item_name,flow_item_status:n.flow_item_status,sub_top:!0,sub_my:[]}):Object.assign({},n,{sub_top:!0,sub_my:[]})}return Object.assign({},n,{sub_top:!1,sub_my:t.filter((function(e){return e.parent_id==n.id}))})}))}},dashboardTask:function(e){var t,n=$A.Date($A.formatDate("Y-m-d 00:00:00")),i=$A.Date($A.formatDate("Y-m-d 23:59:59")),r=$A.Date($A.formatDate("Y-m-d H:i:s")),a=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return(!e.complete_at||!0!==t)&&(!!e.end_at&&e.owner)},o=e.cacheTasks.filter((function(e){return a(e)})),s=e.taskCompleteTemps.filter((function(e){return a(e,!1)}));s.length>0&&(t=o=$A.cloneJSON(o)).push.apply(t,Ot(s));return{today:o.filter((function(e){var t=$A.Date(e.start_at),r=$A.Date(e.end_at);return t<=n&&n<=r||t<=i&&i<=r||t>n&&i>r})),overdue:o.filter((function(e){return $A.Date(e.end_at)<=r}))}}};var Et=n(80641);function $t(e){return function(e){if(Array.isArray(e))return It(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Pt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var i,r,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(a.push(i.value),!t||a.length!==t);o=!0);}catch(e){s=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw r}}return a}(e,t)||Pt(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pt(e,t){if(e){if("string"==typeof e)return It(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?It(e,t):void 0}}function It(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n0?r.token||n.userToken:"",n.userInfo=r,n.userId=r.userid,n.userToken=r.token,n.userIsAdmin=$A.inArray("admin",r.identity),$A.setStorage("userInfo",n.userInfo),i("getBasicData"),i("websocketConnection"),e()}))},saveUserOnlineStatus:function(e,t){var n=e.state,i=t.userid,r=t.online;n.userOnline[i]!==r&&(n.userOnline=Object.assign({},n.userOnline,jt({},i,r)))},getUserBasic:function(e,t){var n=e.state,i=e.dispatch;if(!0!==n.cacheLoading.loadUserBasic){var r=$A.Time(),a=$A.cloneJSON(n.cacheUserWait);t&&t.userid&&a.push(t),n.cacheUserWait=[];var o=[],s=0;a.some((function(e){var t=n.cacheUserBasic.find((function(t){return t.userid==e.userid}));if(t&&r-t._time<=30)return setTimeout((function(){n.cacheUserActive=Object.assign(t,{__:Math.random()}),Et.Store.set("cacheUserActive",t)}),s+=5),!1;o.push(e)})),0!==o.length&&(o.length>30&&(n.cacheUserWait=o.slice(30),o=o.slice(0,30)),n.cacheLoading.loadUserBasic=!0,i("call",{url:"users/basic",data:{userid:o.map((function(e){return e.userid}))}}).then((function(e){r=$A.Time(),o.forEach((function(t){var n=e.data.find((function(e){return e.userid==t.userid}))||Object.assign(t,{email:""});n._time=r,i("saveUserBasic",n)})),n.cacheLoading.loadUserBasic=!1,i("getUserBasic")})).catch((function(e){console.warn(e),n.cacheLoading.loadUserBasic=!1,i("getUserBasic")})))}else t&&n.cacheUserWait.push(t)},saveUserBasic:function(e,t){var n=e.state;$A.execMainDispatch("saveUserBasic",t);var i=n.cacheUserBasic.findIndex((function(e){return e.userid==t.userid}));i>-1?(t=Object.assign({},n.cacheUserBasic[i],t),n.cacheUserBasic.splice(i,1,t)):n.cacheUserBasic.push(t),n.cacheUserActive=Object.assign(t,{__:Math.random()}),Et.Store.set("cacheUserActive",t),setTimeout((function(){$A.setStorage("cacheUserBasic",n.cacheUserBasic)}))},userNickNameInput:function(e){var t=e.dispatch;return new Promise((function(e,n){var i=function(t,i){"function"==typeof t&&t(),!0===i?setTimeout(e,301):setTimeout(n,301)};$A.modalInput({title:"设置昵称",placeholder:"请输入昵称",okText:"保存",onOk:function(e,n){e?t("call",{url:"users/editdata",data:{nickname:e},checkNick:!1}).then((function(){t("getUserInfo").then((function(){i(n,!0)})).catch((function(){i(n,!1)}))})).catch((function(e){var t=e.msg;$A.modalError(t,301),i(n,!1)})):i(n,!1)},onCancel:function(){i(null,!1)}})}))},logout:function(e){e.state;(0,e.dispatch)("handleClearCache",{}).then((function(){var e=["/","/login"].includes(window.location.pathname)?"":encodeURIComponent(window.location.href);$A.goForward({name:"login",query:e?{from:e}:{}},!0)}))},handleClearCache:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e){try{var r=$A.getStorageString("cacheLoginEmail"),a=$A.getStorageString("cacheThemeMode");window.localStorage.clear(),n.cacheUserBasic=[],n.cacheDialogs=[],n.cacheProjects=[],n.cacheColumns=[],n.cacheTasks=[],$A.setStorage("cacheProjectParameter",n.cacheProjectParameter),$A.setStorage("cacheServerUrl",n.cacheServerUrl),$A.setStorage("cacheLoginEmail",r),$A.setStorage("cacheThemeMode",a),i("saveUserInfo",$A.isJson(t)?t:n.userInfo),e()}catch(t){e()}}))},saveFile:function(e,t){var n=e.state,i=e.dispatch;if($A.execMainDispatch("saveFile",t),$A.isArray(t))t.forEach((function(e){i("saveFile",e)}));else if($A.isJson(t)){var r=n.files.findIndex((function(e){return e.id==t.id}));r>-1?n.files.splice(r,1,Object.assign({},n.files[r],t)):n.files.push(t)}},forgetFile:function(e,t){var n=e.state,i=e.dispatch;$A.execMainDispatch("forgetFile",t),($A.isArray(t)?t:[t]).some((function(e){n.files=n.files.filter((function(t){return t.id!=e})),n.files.some((function(t){t.pid==e&&i("forgetFile",t.id)}))}))},getFiles:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){i("call",{url:"file/lists",data:{pid:t}}).then((function(r){var a=r.data.map((function(e){return e.id}));n.files=n.files.filter((function(e){return e.pid!=t||a.includes(e.id)})),i("saveFile",r.data),e(r)})).catch((function(e){console.warn(e),r(e)}))}))},searchFiles:function(e,t){e.state;var n=e.dispatch;return new Promise((function(e,i){n("call",{url:"file/search",data:{key:t}}).then((function(t){n("saveFile",t.data),e(t)})).catch((function(e){console.warn(e),i(e)}))}))},saveProject:function(e,t){var n=e.state,i=e.dispatch;if($A.execMainDispatch("saveProject",t),$A.isArray(t))t.forEach((function(e){i("saveProject",e)}));else if($A.isJson(t)){void 0!==t.project_column&&(i("saveColumn",t.project_column),delete t.project_column);var r=n.cacheProjects.findIndex((function(e){return e.id==t.id}));r>-1?n.cacheProjects.splice(r,1,Object.assign({},n.cacheProjects[r],t)):(void 0===t.project_user&&(t.project_user=[]),n.cacheProjects.push(t)),setTimeout((function(){$A.setStorage("cacheProjects",n.cacheProjects)}))}},forgetProject:function(e,t){var n=e.state;$A.execMainDispatch("forgetProject",t);var i=$A.isArray(t)?t:[t];if(i.some((function(e){var t=n.cacheProjects.findIndex((function(t){return t.id==e}));t>-1&&n.cacheProjects.splice(t,1)})),i.includes(n.projectId)){var r=n.cacheProjects.find((function(e){var n=e.id;return n&&n!=t}));r?$A.goForward({path:"/manage/project/"+r.id}):$A.goForward({path:"/manage/dashboard"})}setTimeout((function(){$A.setStorage("cacheProjects",n.cacheProjects)}))},getProjects:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){if(0===n.userId)return n.cacheProjects=[],void r({msg:"Parameter error"});i("call",{url:"project/lists",data:t||{}}).then((function(t){var r=t.data;n.projectTotal=r.total_all,i("saveProject",r.data),e(r)})).catch((function(e){console.warn(e),r(e)}))}))},getProjectOne:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){0!==$A.runNum(t)?(n.projectLoad++,i("call",{url:"project/one",data:{project_id:t}}).then((function(t){n.projectLoad--,i("saveProject",t.data),e(t)})).catch((function(e){console.warn(e),n.projectLoad--,r(e)}))):r({msg:"Parameter error"})}))},archivedProject:function(e,t){e.state;var n=e.dispatch;return new Promise((function(e,i){0!==$A.runNum(t)?n("call",{url:"project/archived",data:{project_id:t}}).then((function(i){n("forgetProject",t),e(i)})).catch((function(e){console.warn(e),n("getProjectOne",t).catch((function(){})),i(e)})):i({msg:"Parameter error"})}))},removeProject:function(e,t){e.state;var n=e.dispatch;return new Promise((function(e,i){0!==$A.runNum(t)?n("call",{url:"project/remove",data:{project_id:t}}).then((function(i){n("forgetProject",t),e(i)})).catch((function(e){console.warn(e),n("getProjectOne",t).catch((function(){})),i(e)})):i({msg:"Parameter error"})}))},exitProject:function(e,t){e.state;var n=e.dispatch;return new Promise((function(e,i){0!==$A.runNum(t)?n("call",{url:"project/exit",data:{project_id:t}}).then((function(i){n("forgetProject",t),e(i)})).catch((function(e){console.warn(e),n("getProjectOne",t).catch((function(){})),i(e)})):i({msg:"Parameter error"})}))},saveColumn:function(e,t){var n=e.state,i=e.dispatch;if($A.execMainDispatch("saveColumn",t),$A.isArray(t))t.forEach((function(e){i("saveColumn",e)}));else if($A.isJson(t)){var r=n.cacheColumns.findIndex((function(e){return e.id==t.id}));r>-1?n.cacheColumns.splice(r,1,Object.assign({},n.cacheColumns[r],t)):n.cacheColumns.push(t),setTimeout((function(){$A.setStorage("cacheColumns",n.cacheColumns)}))}},forgetColumn:function(e,t){var n=e.state,i=e.dispatch;$A.execMainDispatch("forgetColumn",t);var r=$A.isArray(t)?t:[t],a=[];r.some((function(e){var t=n.cacheColumns.findIndex((function(t){return t.id==e}));t>-1&&(a.push(n.cacheColumns[t].project_id),i("getProjectOne",n.cacheColumns[t].project_id).catch((function(){})),n.cacheColumns.splice(t,1))})),Array.from(new Set(a)).some((function(e){return i("getProjectOne",e).catch((function(){}))})),setTimeout((function(){$A.setStorage("cacheColumns",n.cacheColumns)}))},getColumns:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){if(0===n.userId)return n.cacheColumns=[],void r({msg:"Parameter error"});n.projectLoad++,i("call",{url:"project/column/lists",data:{project_id:t}}).then((function(r){var a=r.data;n.projectLoad--;var o=a.data.map((function(e){return e.id}));if(n.cacheColumns=n.cacheColumns.filter((function(e){return e.project_id!=t||o.includes(e.id)})),i("saveColumn",a.data),e(a.data),1===n.cacheColumns.filter((function(e){return e.project_id==t})).length){var s=n.cacheProjectParameter.find((function(e){return e.project_id==t}))||{};void 0!==s.cardInit&&!1!==s.cardInit||i("toggleProjectParameter",{project_id:t,key:{card:!1,cardInit:!0}})}})).catch((function(e){console.warn(e),n.projectLoad--,r(e)}))}))},removeColumn:function(e,t){e.state;var n=e.dispatch;return new Promise((function(e,i){0!==$A.runNum(t)?n("call",{url:"project/column/remove",data:{column_id:t}}).then((function(i){n("forgetColumn",t),e(i)})).catch((function(e){console.warn(e),i(e)})):i({msg:"Parameter error"})}))},saveTask:function(e,t){var n=e.state,i=e.dispatch;if($A.execMainDispatch("saveTask",t),$A.isArray(t))t.forEach((function(e){i("saveTask",e)}));else if($A.isJson(t)){if(t._time=$A.Time(),t.flow_item_name&&-1!==t.flow_item_name.indexOf("|")){var r=Mt(t.flow_item_name.split("|"),2);t.flow_item_status=r[0],t.flow_item_name=r[1]}var a={};void 0!==t.update_marking&&(a=$A.isJson(t.update_marking)?t.update_marking:{},delete t.update_marking);var o=n.cacheTasks.findIndex((function(e){return e.id==t.id}));o>-1?n.cacheTasks.splice(o,1,Object.assign({},n.cacheTasks[o],t)):n.cacheTasks.push(t),(!0===a.is_update_maintask||t.parent_id>0&&-1===n.cacheTasks.findIndex((function(e){return e.id==t.parent_id})))&&i("getTaskOne",t.parent_id).catch((function(){})),!0===a.is_update_project&&i("getProjectOne",t.project_id).catch((function(){})),!0===a.is_update_content&&i("getTaskContent",t.id),!0===a.is_update_subtask&&i("getTaskForParent",t.id).catch((function(){})),setTimeout((function(){$A.setStorage("cacheTasks",n.cacheTasks)}))}},forgetTask:function(e,t){var n=e.state,i=e.dispatch;$A.execMainDispatch("forgetTask",t);var r=$A.isArray(t)?t:[t],a=[],o=[];r.some((function(e){var t=n.cacheTasks.findIndex((function(t){return t.id==e}));t>-1&&(n.cacheTasks[t].parent_id&&a.push(n.cacheTasks[t].parent_id),o.push(n.cacheTasks[t].project_id),n.cacheTasks.splice(t,1))})),Array.from(new Set(a)).some((function(e){return i("getTaskOne",e).catch((function(){}))})),Array.from(new Set(o)).some((function(e){return i("getProjectOne",e).catch((function(){}))})),r.includes(n.taskId)&&(n.taskId=0),setTimeout((function(){$A.setStorage("cacheTasks",n.cacheTasks)}))},increaseTaskMsgNum:function(e,t){var n=e.state;$A.execMainDispatch("increaseTaskMsgNum",t);var i=n.cacheTasks.find((function(e){return e.dialog_id===t}));i&&i.msg_num++},getTasks:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){if(0===n.userId)return n.cacheTasks=[],void r({msg:"Parameter error"});t.project_id&&n.projectLoad++,i("call",{url:"project/task/lists",data:t}).then((function(a){t.project_id&&n.projectLoad--;var o=a.data;if(i("saveTask",o.data),o.next_page_url){var s=Object.assign(t,{page:o.current_page+1});o.current_page%5==0?$A.modalWarning({content:"数据已超过"+o.to+"条,是否继续加载?",onOk:function(){i("getTasks",s).then(e).catch(r)},onCancel:function(){e()}}):i("getTasks",s).then(e).catch(r)}else e()})).catch((function(e){console.warn(e),r(e),t.project_id&&n.projectLoad--}))}))},getTaskOne:function(e,t){e.state;var n=e.dispatch;return new Promise((function(e,i){0!==$A.runNum(t)?n("call",{url:"project/task/one",data:{task_id:t}}).then((function(t){n("saveTask",t.data),e(t)})).catch((function(e){console.warn(e),i(e)})):i({msg:"Parameter error"})}))},getTaskForDashboard:function(e){var t=e.state,n=e.dispatch,i=e.getters;if(!0!==t.cacheLoading.loadDashboardTasks){t.cacheLoading.loadDashboardTasks=!0;var r=$A.Time(),a=i.dashboardTask,o=a.today,s=a.overdue,l=o.map((function(e){return e.id}));l.push.apply(l,$t(s.map((function(e){return e.id}))));var u=2;!function e(){if(u<=0){t.cacheLoading.loadDashboardTasks=!1;var a=i.dashboardTask,o=a.today,s=a.overdue,c=o.filter((function(e){return e._time>=r})).map((function(e){return e.id}));return c.push.apply(c,$t(s.filter((function(e){return e._time>=r})).map((function(e){return e.id})))),void n("forgetTask",l.filter((function(e){return-1==c.indexOf(e)})))}1==--u?n("getTasks",{complete:"no",time:[$A.formatDate("Y-m-d 00:00:00"),$A.formatDate("Y-m-d 23:59:59")]}).then(e).catch(e):0==u&&n("getTasks",{complete:"no",time_before:$A.formatDate("Y-m-d H:i:s")}).then(e).catch(e)}()}},getTaskForProject:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){var a=$A.Time(),o=n.cacheTasks.filter((function(e){return e.project_id==t})).map((function(e){return e.id})),s=function(){var e=n.cacheTasks.filter((function(e){return e.project_id==t&&e._time>=a})).map((function(e){return e.id}));i("forgetTask",o.filter((function(t){return-1==e.indexOf(t)})))};i("getTasks",{project_id:t}).then((function(){s(),e()})).catch((function(){s(),r()}))}))},getTaskForParent:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){var a=$A.Time(),o=n.cacheTasks.filter((function(e){return e.parent_id==t})).map((function(e){return e.id})),s=function(){var e=n.cacheTasks.filter((function(e){return e.parent_id==t&&e._time>=a})).map((function(e){return e.id}));i("forgetTask",o.filter((function(t){return-1==e.indexOf(t)})))};i("getTasks",{parent_id:t}).then((function(){s(),e()})).catch((function(){s(),r()}))}))},removeTask:function(e,t){e.state;var n=e.dispatch;return new Promise((function(e,i){0!==$A.runNum(t)?(n("taskLoadStart",t),n("call",{url:"project/task/remove",data:{task_id:t}}).then((function(i){n("forgetTask",t),n("taskLoadEnd",t),e(i)})).catch((function(e){console.warn(e),n("getTaskOne",t).catch((function(){})),n("taskLoadEnd",t),i(e)}))):i({msg:"Parameter error"})}))},archivedTask:function(e,t){e.state;var n=e.dispatch;return new Promise((function(e,i){0!==$A.runNum(t)?(n("taskLoadStart",t),n("call",{url:"project/task/archived",data:{task_id:t}}).then((function(i){n("forgetTask",t),n("taskLoadEnd",t),e(i)})).catch((function(e){console.warn(e),n("getTaskOne",t).catch((function(){})),n("taskLoadEnd",t),i(e)}))):i({msg:"Parameter error"})}))},getTaskContent:function(e,t){var n=e.state,i=e.dispatch;0!==$A.runNum(t)&&i("call",{url:"project/task/content",data:{task_id:t}}).then((function(e){var t=n.taskContents.findIndex((function(t){return t.id==e.data.id}));t>-1?n.taskContents.splice(t,1,e.data):n.taskContents.push(e.data)})).catch((function(e){console.warn(e)}))},getTaskFiles:function(e,t){var n=e.state,i=e.dispatch;0!==$A.runNum(t)&&i("call",{url:"project/task/files",data:{task_id:t}}).then((function(e){e.data.forEach((function(e){var t=n.taskFiles.findIndex((function(t){return t.id==e.id}));t>-1?n.taskFiles.splice(t,1,e):n.taskFiles.push(e)})),i("saveTask",{id:t,file_num:e.data.length})})).catch((function(e){console.warn(e)}))},forgetTaskFile:function(e,t){var n=e.state;e.dispatch;($A.isArray(t)?t:[t]).some((function(e){var t=n.taskFiles.findIndex((function(t){return t.id==e}));t>-1&&n.taskFiles.splice(t,1)}))},openTask:function(e,t){var n=e.state,i=e.dispatch,r=t;$A.isJson(t)&&(r=t.parent_id>0?t.parent_id:t.id),n.taskId=r,r>0&&i("getTaskOne",r).then((function(){i("getTaskContent",r),i("getTaskFiles",r),i("getTaskForParent",r).catch((function(){}))})).catch((function(e){var t=e.msg;$A.modalWarning({content:t,onOk:function(){n.taskId=0}})}))},taskAdd:function(e,t){e.state;var n=e.dispatch;return new Promise((function(e,i){var r=$A.cloneJSON($A.date2string(t));$A.isArray(r.column_id)&&(r.column_id=r.column_id.find((function(e){return e}))),n("call",{url:"project/task/add",data:r,method:"post"}).then((function(t){n("addTaskSuccess",t.data),e(t)})).catch((function(e){console.warn(e),i(e)}))}))},taskAddSub:function(e,t){var n=e.dispatch;return new Promise((function(e,i){n("call",{url:"project/task/addsub",data:t}).then((function(t){n("addTaskSuccess",t.data),e(t)})).catch((function(e){console.warn(e),i(e)}))}))},addTaskSuccess:function(e,t){var n=e.dispatch;void 0!==t.new_column&&(n("saveColumn",t.new_column),delete t.new_column),n("saveTask",t),n("getProjectOne",t.project_id).catch((function(){}))},taskUpdate:function(e,t){e.state;var n=e.dispatch;return new Promise((function(e,i){n("taskBeforeUpdate",t).then((function(t){n("taskLoadStart",t.task_id),n("call",{url:"project/task/update",data:t,method:"post"}).then((function(i){n("taskLoadEnd",t.task_id),n("saveTask",i.data),e(i)})).catch((function(e){console.warn(e),n("taskLoadEnd",t.task_id),n("getTaskOne",t.task_id).catch((function(){})),i(e)}))})).catch(i)}))},taskBeforeUpdate:function(e,t){var n=e.state;e.dispatch;return new Promise((function(e,i){var r=$A.cloneJSON($A.date2string(t)),a="温馨提示",o=null;if(void 0!==r.times){!1===t.times[0]&&(o="你确定要取消任务时间吗?");var s=n.cacheTasks.find((function(e){return e.id==r.task_id}));a=s.parent_id>0?"更新子任务":"更新主任务",s&&(s.parent_id>0?r.times[0]&&n.cacheTasks.some((function(e){if(e.id!=s.parent_id)return!1;if(!e.end_at)return o="主任务没有设置时间,设置子任务将同步设置主任务",!0;var t=$A.Date(r.times[0],!0),n=$A.Date(r.times[1],!0),i=$A.Date(e.start_at,!0),a=$A.Date(e.end_at,!0);return ta?(o="新设置的子任务结束时间在主任务时间之外,修改后将同步修改主任务",!0):void 0})):n.cacheTasks.some((function(e){if(e.parent_id!=s.id)return!1;if(!e.end_at)return!1;var t=$A.Date(r.times[0],!0),n=$A.Date(r.times[1],!0),i=$A.Date(s.start_at,!0),a=$A.Date(s.end_at,!0),l=$A.Date(e.start_at,!0),u=$A.Date(e.end_at,!0);return(i!=l||a!=u)&&(r.times[0]?t>l?(o="新设置的开始时间在子任务(".concat(e.name,")时间之内,修改后将同步修改子任务"),!0):n-1?n.taskFlowItems.splice(t,1,e):n.taskFlowItems.push(e)})),delete i.turns;var r=n.taskFlows.findIndex((function(e){return e.task_id==i.task_id}));r>-1?n.taskFlows.splice(r,1,i):n.taskFlows.push(i),e(t)})).catch((function(e){console.warn(e),r(e)}))}))},getTaskPriority:function(e){var t=e.state,n=e.dispatch;return new Promise((function(e,i){n("call",{url:"system/priority"}).then((function(n){t.taskPriority=n.data,e(n)})).catch((function(e){console.warn(e),i(e)}))}))},saveTaskCompleteTemp:function(e,t){var n=e.state;if($A.isJson(t)){var i=n.taskCompleteTemps.findIndex((function(e){return e.id==t.id}));i>-1?n.taskCompleteTemps.splice(i,1,t):n.taskCompleteTemps.push(t)}},forgetTaskCompleteTemp:function(e,t){var n=e.state;if(!0!==t){var i=n.taskCompleteTemps.findIndex((function(e){return e.id==t}));i>-1&&n.taskCompleteTemps.splice(i,1)}else n.taskCompleteTemps=[]},saveDialog:function(e,t){var n=e.state,i=e.dispatch;if($A.execMainDispatch("saveDialog",t),$A.isArray(t))t.forEach((function(e){i("saveDialog",e)}));else if($A.isJson(t)){var r=n.cacheDialogs.findIndex((function(e){return e.id==t.id}));r>-1?n.cacheDialogs.splice(r,1,Object.assign({},n.cacheDialogs[r],t)):n.cacheDialogs.push(t),setTimeout((function(){$A.setStorage("cacheDialogs",n.cacheDialogs)}))}},updateDialogLastMsg:function(e,t){var n=e.state,i=e.dispatch;$A.execMainDispatch("updateDialogLastMsg",t),n.cacheDialogs.find((function(e){return e.id==t.dialog_id}))?i("saveDialog",{id:t.dialog_id,last_msg:t,last_at:$A.formatDate("Y-m-d H:i:s")}):i("getDialogOne",t.dialog_id).catch((function(){}))},getDialogs:function(e){var t=e.state,n=e.dispatch;0!==t.userId?n("call",{url:"dialog/lists"}).then((function(e){n("saveDialog",e.data.data)})).catch((function(e){console.warn(e)})):t.cacheDialogs=[]},getDialogOne:function(e,t){e.state;var n=e.dispatch;return new Promise((function(e,i){0!==$A.runNum(t)?n("call",{url:"dialog/one",data:{dialog_id:t}}).then((function(t){n("saveDialog",t.data),e(t)})).catch((function(e){console.warn(e),i(e)})):i({msg:"Parameter error"})}))},openDialogUserid:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){t!==n.userId?i("call",{url:"dialog/open/user",data:{userid:t}}).then((function(t){i("saveDialog",t.data),$A.setStorage("messenger::dialogId",t.data.id),n.dialogOpenId=t.data.id,e(t)})).catch((function(e){console.warn(e),r(e)})):r({msg:"Parameter error"})}))},moveDialogTop:function(e,t){var n=e.state;$A.execMainDispatch("moveDialogTop",t);var i=n.cacheDialogs.findIndex((function(e){return e.id==t}));if(i>-1){var r=$A.cloneJSON(n.cacheDialogs[i]);n.cacheDialogs.splice(i,1),n.cacheDialogs.unshift(r)}},forgetDialog:function(e,t){var n=e.state;$A.execMainDispatch("forgetDialog",t);var i=$A.isArray(t)?t:[t];i.some((function(e){var t=n.cacheDialogs.findIndex((function(t){return t.id==e}));t>-1&&n.cacheDialogs.splice(t,1)})),i.includes($A.getStorageInt("messenger::dialogId"))&&$A.setStorage("messenger::dialogId",0),setTimeout((function(){$A.setStorage("cacheDialogs",n.cacheDialogs)}))},saveDialogMsg:function(e,t){var n=e.state,i=e.dispatch;if($A.execMainDispatch("saveDialogMsg",t),$A.isArray(t))t.forEach((function(e){i("saveDialogMsg",e)}));else if($A.isJson(t)){var r=n.dialogMsgs.findIndex((function(e){return e.id==t.id}));r>-1?n.dialogMsgs.splice(r,1,Object.assign({},n.dialogMsgs[r],t)):n.dialogMsgs.push(t)}},getDialogMsgs:function(e,t){var n=e.state,i=e.dispatch,r=n.cacheDialogs.find((function(e){return e.id==t}));r||(r={id:t},n.cacheDialogs.push(r)),r.loading||(r.loading=!0,r.currentPage=1,r.hasMorePages=!1,i("call",{url:"dialog/msg/lists",data:{dialog_id:t,page:r.currentPage}}).then((function(e){r.loading=!1,r.currentPage=e.data.current_page,r.hasMorePages=!!e.data.next_page_url,i("saveDialog",r);var a=e.data.data.map((function(e){return e.id}));n.dialogMsgs=n.dialogMsgs.filter((function(e){return e.dialog_id!=t||a.includes(e.id)})),i("saveDialog",e.data.dialog),i("saveDialogMsg",e.data.data)})).catch((function(e){console.warn(e),r.loading=!1})))},getDialogMoreMsgs:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e,r){var a=n.cacheDialogs.find((function(e){return e.id==t}));a?a.hasMorePages?a.loading?r({msg:"Loading"}):(a.loading=!0,a.currentPage++,i("call",{url:"dialog/msg/lists",data:{dialog_id:t,page:a.currentPage}}).then((function(t){a.loading=!1,a.currentPage=t.data.current_page,a.hasMorePages=!!t.data.next_page_url,i("saveDialogMsg",t.data.data),e(t)})).catch((function(e){console.warn(e),a.loading=!1,r(e)}))):r({msg:"No more page"}):r({msg:"Parameter error"})}))},dialogMsgRead:function(e,t){var n=e.state,i=e.dispatch;if(t.userid!=n.userId&&!0!==t.is_read){t.is_read=!0;var r=n.cacheDialogs.find((function(e){return e.id==t.dialog_id}));r&&r.unread>0&&r.unread--,n.wsReadWaitList.push(t.id),clearTimeout(n.wsReadTimeout),n.wsReadTimeout=setTimeout((function(){i("websocketSend",{type:"readMsg",data:{id:$A.cloneJSON(n.wsReadWaitList)}}),n.wsReadWaitList=[]}),20)}},websocketConnection:function(e){var t=e.state,n=e.dispatch;e.commit;if(clearTimeout(t.wsTimeout),0!==t.userId){var i=$A.apiUrl("../ws");i=(i=i.replace("https://","wss://")).replace("http://","ws://"),i+="?action=web&token="+t.userToken,t.ws=new WebSocket(i),t.ws.onopen=function(e){t.wsOpenNum++},t.ws.onclose=function(e){t.ws=null,clearTimeout(t.wsTimeout),t.wsTimeout=setTimeout((function(){n("websocketConnection")}),3e3)},t.ws.onerror=function(e){t.ws=null,clearTimeout(t.wsTimeout),t.wsTimeout=setTimeout((function(){n("websocketConnection")}),3e3)},t.ws.onmessage=function(e){var i=$A.formatWebsocketMessageDetail($A.jsonParse(e.data)),r=i.type,a=i.msgId;switch(r){case"open":$A.setStorage("userWsFd",i.data.fd);break;case"receipt":"function"==typeof t.wsCall[a]&&t.wsCall[a](i.body,!0),delete t.wsCall[a];break;case"line":n("saveUserOnlineStatus",i.data);break;default:switch(a&&n("websocketSend",{type:"receipt",msgId:a}),t.wsMsg=i,Object.values(t.wsListener).forEach((function(e){if("function"==typeof e)try{e(i)}catch(e){}})),r){case"dialog":!function(e){var i=e.mode,r=e.data,a=r.dialog_id;if(["add","chat"].includes(i)&&!t.dialogMsgs.find((function(e){return e.id==r.id}))){if(n("increaseTaskMsgNum",a),"chat"===i)return;var o=t.cacheDialogs.find((function(e){return e.id==r.dialog_id}));o&&(o.unread++,n("moveDialogTop",a)),Et.Store.set("dialogMsgPush",r)}n("saveDialogMsg",r),n("updateDialogLastMsg",r)}(i);break;case"project":!function(e){var t=e.action,i=e.data;switch(t){case"add":case"update":n("saveProject",i);break;case"detail":n("getProjectOne",i.id).catch((function(){})),n("getTaskForProject",i.id).catch((function(){}));break;case"archived":case"delete":n("forgetProject",i.id);break;case"sort":n("getTaskForProject",i.id).catch((function(){}))}}(i);break;case"projectColumn":!function(e){var t=e.action,i=e.data;switch(t){case"add":case"update":n("saveColumn",i);break;case"delete":n("forgetColumn",i.id)}}(i);break;case"projectTask":!function(e){var t=e.action,i=e.data;switch(t){case"add":n("addTaskSuccess",i);break;case"update":n("saveTask",i);break;case"dialog":n("saveTask",i),n("getDialogOne",i.dialog_id).catch((function(){}));break;case"upload":n("getTaskFiles",i.task_id);break;case"filedelete":n("forgetTaskFile",i.id);break;case"archived":case"delete":n("forgetTask",i.id)}}(i);break;case"file":!function(e){var t=e.action,i=e.data;switch(t){case"add":case"update":n("saveFile",i);break;case"delete":n("forgetFile",i.id)}}(i)}}}}else t.ws&&(t.ws.close(),t.ws=null)},websocketSend:function(e,t){var n=e.state;if($A.isJson(t)){var i=t.type,r=t.data,a=t.callback,o=void 0;if(n.ws){"function"==typeof a&&(o=$A.randomString(16),n.wsCall[o]=a);try{n.ws.send(JSON.stringify({type:i,msgId:o,data:r}))}catch(e){"function"==typeof a&&a(null,!1)}}else"function"==typeof a&&a(null,!1)}else"function"==typeof a&&a(null,!1)},websocketPath:function(e,t){var n=e.state,i=e.dispatch;clearTimeout(n.wsPathTimeout),n.wsPathValue=t,n.wsPathTimeout=setTimeout((function(){n.wsPathValue==t&&i("websocketSend",{type:"path",data:{path:t}})}),1e3)},websocketMsgListener:function(e,t){var n=e.state,i=t.name,r=t.callback;"function"==typeof r?n.wsListener[i]=r:n.wsListener[i]&&delete n.wsListener[i]},websocketClose:function(e){var t=e.state;t.ws&&t.ws.close()}};i.default.use(r.ZP);const Nt=new r.ZP.Store({state:St.Z,getters:Dt,mutations:{},actions:At});function Lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Ft(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Rt={name:"PageTitle",props:{title:{type:[String,Number],default:""}},data:function(){return{pagePath:""}},activated:function(){this.updateTitle()},computed:function(e){for(var t=1;tMath.floor(e.offsetWidth),this.showTooltip&&this.existSlot){var i=this.$slots.default.map((function(e){return e.text?e.text:e.elm.innerText?e.elm.innerText:""}));this.tooltipContent=i.join("")}t=null},onClick:function(e){this.$emit("on-click",e)}}};const Wt=(0,o.Z)(Ht,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("ETooltip",{attrs:{content:e.tipText,placement:e.placement,effect:e.tooltipTheme,delay:e.delay,disabled:!e.showTooltip,"max-width":e.tooltipMaxWidth,transfer:""}},[n("span",{ref:"content",staticClass:"common-auto-tip",on:{mouseenter:e.handleTooltipIn,click:e.onClick}},[e.existSlot?[e._t("default")]:[e._v(e._s(e.content))]],2)])}),[],!1,null,null,null).exports;const qt={name:"TagInput",props:{value:{default:""},cut:{default:","},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},placeholder:{default:""},max:{default:0}},data:function(){var e=[];return this.value.split(",").forEach((function(t){t&&e.push(t)})),{minWidth:80,tis:"",tisTimeout:null,showPlaceholder:!0,content:"",disSource:e,isFocus:!1}},mounted:function(){this.wayMinWidth()},watch:{placeholder:function(){this.wayMinWidth()},value:function(e){var t=[];$A.count(e)>0&&e.split(",").forEach((function(e){e&&t.push(e)})),this.disSource=t},disSource:function(e){var t=this,n="";e.forEach((function(e){""!=n&&(n+=t.cut),n+=e})),this.$emit("input",n),this.$emit("on-change")}},computed:{placeholderText:function(){return this.disSource.length>0?"":this.placeholder}},methods:{focus:function(e){var t=this.$refs.myTextarea;t.focus(e);var n=(e||{}).cursor;if(n){var i=t.value.length;switch(n){case"start":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(i,i);break;default:t.setSelectionRange(0,i)}}},wayMinWidth:function(){var e=this;this.showPlaceholder=!0,this.$nextTick((function(){e.$refs.myPlaceholder&&(e.minWidth=Math.max(e.minWidth,e.$refs.myPlaceholder.offsetWidth)),setTimeout((function(){try{e.minWidth=Math.max(e.minWidth,e.$refs.myPlaceholder.offsetWidth),e.showPlaceholder=!1}catch(e){}$A(e.$refs.myPlaceholder).is(":visible")||e.wayMinWidth()}),500)}))},pasteText:function(e){e.preventDefault();var t=(e.clipboardData||window.clipboardData).getData("text");this.addTag(!1,t)},downEnter:function(e){e.preventDefault()},onFocus:function(){this.isFocus=!0},onBlur:function(){this.isFocus=!1,this.addTag(!1,this.content)},addTag:function(e,t){var n=this;if(!1===e||13===e.keyCode)return""!=t.trim()&&-1===this.disSource.indexOf(t.trim())&&this.disSource.push(t.trim()),this.content="",void(13===e.keyCode&&this.$nextTick((function(){n.$emit("on-enter",e)})));if(this.max>0&&this.disSource.length>=this.max)return this.content="",this.tis="最多只能添加"+this.max+"个",clearInterval(this.tisTimeout),void(this.tisTimeout=setTimeout((function(){n.tis=""}),2e3));var i=t.trim(),r=i.length-this.cut.length;""!=i&&i.substring(r)===this.cut&&(""!=(i=i.substring(0,r)).trim()&&-1===this.disSource.indexOf(i.trim())&&this.disSource.push(i.trim()),this.content="")},delTag:function(e){if(!1===e){if(""!==this.content)return;e=this.disSource.length-1}this.disSource.splice(e,1),this.focus()}}};const Ut=(0,o.Z)(qt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"common-tag-input",class:{focus:e.isFocus},on:{paste:function(t){return e.pasteText(t)},click:e.focus}},[e._l(e.disSource,(function(t,i){return n("div",{staticClass:"tags-item"},[n("span",{staticClass:"tags-content",on:{click:function(e){e.stopPropagation()}}},[e._v(e._s(t))]),n("span",{staticClass:"tags-del",on:{click:function(t){return t.stopPropagation(),e.delTag(i)}}},[e._v("×")])])})),e._v(" "),n("textarea",{directives:[{name:"model",rawName:"v-model",value:e.content,expression:"content"}],ref:"myTextarea",staticClass:"tags-input",style:{minWidth:e.minWidth+"px"},attrs:{placeholder:e.tis||e.placeholderText,disabled:e.disabled,readonly:e.readonly},domProps:{value:e.content},on:{keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.downEnter(t)},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"delete",[8,46],t.key,["Backspace","Delete","Del"])?null:e.delTag(!1)}],keyup:function(t){return e.addTag(t,e.content)},focus:e.onFocus,blur:e.onBlur,input:function(t){t.target.composing||(e.content=t.target.value)}}}),e._v(" "),e.showPlaceholder||""!==e.tis?n("span",{ref:"myPlaceholder",staticClass:"tags-placeholder"},[e._v(e._s(e.tis||e.placeholderText))]):e._e()],2)}),[],!1,null,null,null).exports;var Kt=n(3869),Gt=n.n(Kt);i.default.use(Gt());const Yt={name:"TableAction",props:{column:{type:Object,default:function(){return{}}},autoWidth:{type:Boolean,default:!0},minWidth:{type:Number,default:80},align:{type:String,default:""},menu:{type:Array,default:function(){return[]}}},data:function(){return{width:0,height:0}},mounted:function(){this.onUpdate()},activated:function(){this.onUpdate()},beforeUpdate:function(){this.onUpdate()},computed:{tdStyle:function(){var e={};switch(this.align.toLowerCase()){case"left":e.justifyContent="flex-start";break;case"center":e.justifyContent="center";break;case"right":e.justifyContent="flex-end"}return e}},methods:{handleIn:function(){this.$refs.action.offsetWidth!=this.width&&this.onUpdate()},onUpdate:function(){this.onResize({width:this.$refs.action.offsetWidth,height:this.$refs.action.offsetHeight})},onResize:function(e){var t=this,n=e.width,i=e.height;if(this.autoWidth){$A(".ivu-table-column-"+this.column.__id).each((function(e,t){var r=$A(t).find(".td-action-container");r.length>0&&(n=Math.max(n,r[0].offsetWidth),i=Math.max(i,r[0].offsetHeight))})),this.width=n,this.height=i;var r=Math.max(this.minWidth,this.width+26);this.column.minWidth&&(r=Math.max(this.column.minWidth,r)),this.column.maxWidth&&(r=Math.min(this.column.maxWidth,r)),r!=this.column.width&&this.$nextTick((function(){t.$set(t.column,"width",r)}))}},onClick:function(e){this.$emit("action",e)}}};const Zt=(0,o.Z)(Yt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"td-action",style:e.tdStyle,attrs:{"data-width":e.width,"data-height":e.height}},[n("div",{directives:[{name:"resize",rawName:"v-resize",value:e.onResize,expression:"onResize"}],ref:"action",staticClass:"td-action-container",class:{"td-action-menu":e.menu.length>0},on:{mouseenter:e.handleIn}},[e._t("default"),e._v(" "),e._l(e.menu,(function(t,i){return n("ETooltip",{key:i,attrs:{placement:"top",disabled:!t.title,content:t.title,enterable:!1,"open-delay":600}},[t.children&&t.children.length>0?n("EDropdown",{staticClass:"menu-dropdown",attrs:{size:"medium",trigger:"click"},on:{command:e.onClick}},[n("i",{staticClass:"aliicon menu-icon",style:t.style||{},domProps:{innerHTML:e._s(t.icon)}}),e._v(" "),n("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(t.children,(function(t,i){return n("EDropdownItem",{key:i,style:t.style||{},attrs:{command:t.action,divided:!!t.divided}},[n("div",[e._v(e._s(t.title))])])})),1)],1):n("i",{staticClass:"aliicon menu-icon",style:t.style||{},domProps:{innerHTML:e._s(t.icon)},on:{click:function(n){return e.onClick(t.action)}}})],1)}))],2)])}),[],!1,null,null,null).exports;const Xt={name:"QuickEdit",directives:{clickoutside:{bind:function(e,t,n){function i(n){if(e.contains(n.target))return!1;t.expression&&t.value(n)}e.__vueClickOutside__=i,document.addEventListener("click",i)},update:function(){},unbind:function(e,t){document.removeEventListener("click",e.__vueClickOutside__),delete e.__vueClickOutside__}}},props:{value:{},autoEdit:{},isTag:{type:Boolean,default:!1},alwaysIcon:{type:Boolean,default:!1}},data:function(){return{isLoad:!1,isEdit:!1,content:""}},mounted:function(){!0===this.autoEdit&&this.onEdit()},watch:{isEdit:function(e){this.$emit("on-edit-change",e)},autoEdit:function(e){!0===e&&this.onEdit()}},methods:{onEdit:function(){var e=this;this.content=this.value,this.isEdit=!0,this.$nextTick((function(){e.$refs.input.focus({cursor:"all"})}))},onEnter:function(){var e=this;this.content!=this.value?this.isLoad||(this.isLoad=!0,this.$emit("input",this.content),this.$emit("on-update",this.content,(function(){e.isEdit=!1,e.isLoad=!1}))):this.isEdit=!1}}};const Jt=(0,o.Z)(Xt,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"quick-edit",class:[e.alwaysIcon?"quick-always":""]},[e.isEdit?n("div",{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:e.onEnter,expression:"onEnter"}],staticClass:"quick-input"},[e.isTag?n("TagInput",{ref:"input",attrs:{disabled:e.isLoad},on:{"on-enter":e.onEnter},model:{value:e.content,callback:function(t){e.content=t},expression:"content"}}):n("Input",{ref:"input",attrs:{disabled:e.isLoad},on:{"on-enter":e.onEnter},model:{value:e.content,callback:function(t){e.content=t},expression:"content"}}),e._v(" "),e.isLoad?n("div",{staticClass:"quick-loading"},[n("Loading")],1):e._e()],1):[n("div",{staticClass:"quick-text"},[e._t("default")],2),e._v(" "),n("Icon",{staticClass:"quick-icon",attrs:{type:"ios-create-outline"},on:{click:function(t){return t.stopPropagation(),e.onEdit.apply(null,arguments)}}})]],2)}),[],!1,null,null,null).exports;function Qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function en(e){for(var t=1;t0&&(e.border=t+"px solid "+(n||"#ffffff")),e},spotStyle:function(){var e=this.borderWitdh,t=this.size;return"default"===t&&(t=32),e>0&&(t-=e),32==t?{}:{transform:"scale("+Math.min(1.25,t/32)+")"}},nameStyle:function(){return this.showIcon?{}:{paddingLeft:0}},avatarSize:function(){var e=this.borderWitdh,t=this.size;return"default"===t&&(t=32),e>0?t-2*e:t},showImg:function(){var e=this.user.userimg;return!!e&&!$A.rightExists(e,"/avatar.png")},isDefault:function(){var e=this.user.userimg;return $A.strExists(e,"/avatar/default_")},nickname:function(){var e=this.user.nickname;if(!e)return"D";var t=e.substring(0,2);return/^[\u4e00-\u9fa5]+$/.test(t)&&(t=t.substring(0,1)),t||"D"}}),watch:{userid:function(){this.getData()},userInfo:function(e){e.userid==this.userid&&(this.user=e)},userOnline:function(e){this.user&&void 0!==e[this.user.userid]&&this.$set(this.user,"online",e[this.user.userid])}},methods:{getData:function(){this.userid&&(this.userid!=this.userInfo.userid?this.$store.dispatch("getUserBasic",{userid:this.userid}):this.user=this.userInfo)},openDialog:function(){this.goForward({path:"/manage/messenger"}),this.$store.dispatch("openDialogUserid",this.userid).catch((function(){}))}}};const rn=(0,o.Z)(nn,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.user?n("ETooltip",{staticClass:"common-avatar",attrs:{"open-delay":e.openDelay,disabled:e.tooltipDisabled,placement:e.tooltipPlacement}},[n("div",{staticClass:"common-avatar-transfer",attrs:{slot:"content"},slot:"content"},[e._t("default"),e._v(" "),n("p",[e._v(e._s(e.$L("昵称"))+": "+e._s(e.user.nickname))]),e._v(" "),n("p",[e._v(e._s(e.$L("职位/职称"))+": "+e._s(e.user.profession||"-"))]),e._v(" "),e.userId!=e.userid&&e.showIconMenu?n("div",{staticClass:"avatar-icons"},[n("Icon",{attrs:{type:"ios-chatbubbles"},on:{click:e.openDialog}})],1):e._e()],2),e._v(" "),n("div",{staticClass:"avatar-wrapper"},[e.showIcon?n("div",{class:["avatar-box",e.userId===e.userid||e.user.online?"online":""],style:e.boxStyle},[n("em",{style:e.spotStyle}),e._v(" "),e.showImg?n("EAvatar",{class:{"avatar-default":e.isDefault},attrs:{src:e.user.userimg,size:e.avatarSize}}):n("EAvatar",{staticClass:"avatar-text",attrs:{size:e.avatarSize}},[n("span",{style:e.spotStyle},[e._v(e._s(e.nickname))])])],1):e._e(),e._v(" "),e.showName?n("div",{staticClass:"avatar-name",style:e.nameStyle},[e._v(e._s(e.user.nickname))]):e._e()])]):e._e()}),[],!1,null,null,null).exports;var an=n(64720);function on(e){return on="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},on(e)}i.default.use(r.ZP),i.default.use(gt()),i.default.use(mt),i.default.use(kt),i.default.component("PageTitle",Bt),i.default.component("Loading",zt),i.default.component("AutoTip",Wt),i.default.component("TagInput",Ut),i.default.component("TableAction",Zt),i.default.component("QuickEdit",Jt),i.default.component("UserAvatar",rn),i.default.component("EAvatar",an.Avatar),i.default.component("ETooltip",an.Tooltip),i.default.component("EPopover",an.Popover),i.default.component("EDropdown",an.Dropdown),i.default.component("EDropdownMenu",an.DropdownMenu),i.default.component("EDropdownItem",an.DropdownItem);var sn=mt.prototype.push;mt.prototype.push=function(e){return sn.call(this,e).catch((function(e){return e}))};var ln=new mt({mode:"history",routes:C});gt().LoadingBar.config({color:"#3fcc25",failedColor:"#ff0000"}),ln.beforeEach((function(e,t,n){gt().LoadingBar.start(),n()})),ln.afterEach((function(){gt().LoadingBar.finish()})),i.default.prototype.goForward=function(e,t){"string"==typeof e&&(e={name:e}),!0===t?un.$router.replace(e).then((function(){})):un.$router.push(e).then((function(){}))},i.default.prototype.goBack=function(e){var t=$A.jsonParse(window.sessionStorage.__history__||"{}");$A.runNum(t["::count"])>2?un.$router.go("number"==typeof e?e:-1):un.$router.replace("object"===on(e)?e:{path:"/"}).then((function(){}))},i.default.prototype.$A=$A,i.default.prototype.$Electron=null,i.default.prototype.$Platform="web",i.default.prototype.$isMainElectron=!1,i.default.prototype.$isSubElectron=!1,i.default.config.productionTip=!1;var un=new i.default({el:"#app",router:ln,store:Nt,template:"",components:{App:x}});$A.goForward=un.goForward,$A.goBack=un.goBack,$A.getLanguage=un.getLanguage,$A.Message=un.$Message,$A.Notice=un.$Notice,$A.Modal=un.$Modal,$A.store=un.$store,$A.L=un.$L,$A.Electron=un.$Electron,$A.Platform=un.$Platform,$A.isMainElectron=un.$isMainElectron,$A.isSubElectron=un.$isSubElectron,$A.execMainDispatch=function(e,t){$A.isSubElectron&&$A.Electron.ipcRenderer.send("sendForwardMain",{channel:"dispatch",data:{action:e,data:t}})}},4142:e=>{e.exports=function(e){var t={begin:"`[\\s\\S]"};return{case_insensitive:!0,aliases:["ahk"],keywords:{keyword:"Break Continue Critical Exit ExitApp Gosub Goto New OnExit Pause return SetBatchLines SetTimer Suspend Thread Throw Until ahk_id ahk_class ahk_pid ahk_exe ahk_group",literal:"true false NOT AND OR",built_in:"ComSpec Clipboard ClipboardAll ErrorLevel"},contains:[t,e.inherit(e.QUOTE_STRING_MODE,{contains:[t]}),e.COMMENT(";","$",{relevance:0}),e.C_BLOCK_COMMENT_MODE,{className:"number",begin:e.NUMBER_RE,relevance:0},{className:"variable",begin:"%[a-zA-Z0-9#_$@]+%"},{className:"built_in",begin:"^\\s*\\w+\\s*(,|%)"},{className:"title",variants:[{begin:'^[^\\n";]+::(?!=)'},{begin:'^[^\\n";]+:(?!=)',relevance:0}]},{className:"meta",begin:"^\\s*#\\w+",end:"$",relevance:0},{className:"built_in",begin:"A_[a-zA-Z0-9]+"},{begin:",\\s*,"}]}}},52423:e=>{e.exports=function(e){var t={variants:[e.COMMENT(";","$",{relevance:0}),e.COMMENT("#cs","#ce"),e.COMMENT("#comments-start","#comments-end")]},n={begin:"\\$[A-z0-9_]+"},i={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},r={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:"ByRef Case Const ContinueCase ContinueLoop Default Dim Do Else ElseIf EndFunc EndIf EndSelect EndSwitch EndWith Enum Exit ExitLoop For Func Global If In Local Next ReDim Return Select Static Step Switch Then To Until Volatile WEnd While With",built_in:"Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown, UDPShutdown TCPStartup, UDPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent TrayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait",literal:"True False And Null Not Or"},contains:[t,n,i,r,{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"comments include include-once NoTrayIcon OnAutoItStartRegister pragma compile RequireAdmin"},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",keywords:{"meta-keyword":"include"},end:"$",contains:[i,{className:"meta-string",variants:[{begin:"<",end:">"},{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]}]},i,t]},{className:"symbol",begin:"@[A-z0-9_]+"},{className:"function",beginKeywords:"Func",end:"$",illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[n,i,r]}]}]}}},40349:e=>{e.exports=function(e){var t={begin:/(?:[A-Z\_\.\-]+|--[a-zA-Z0-9_-]+)\s*:/,returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",excludeEnd:!0,starts:{endsWithParent:!0,excludeEnd:!0,contains:[{begin:/[\w-]+\(/,returnBegin:!0,contains:[{className:"built_in",begin:/[\w-]+/},{begin:/\(/,end:/\)/,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}]},e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",begin:"#[0-9A-Fa-f]+"},{className:"meta",begin:"!important"}]}}]};return{case_insensitive:!0,illegal:/[=\/|'\$]/,contains:[e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/},{className:"selector-class",begin:/\.[A-Za-z0-9_-]+/},{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$"},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"@(font-face|page)",lexemes:"[a-z-]+",keywords:"font-face page"},{begin:"@",end:"[{;]",illegal:/:/,contains:[{className:"keyword",begin:/\w+/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},{begin:"{",end:"}",illegal:/\S/,contains:[e.C_BLOCK_COMMENT_MODE,t]}]}}},8650:e=>{e.exports=function(e){var t={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",literal:"true false iota nil",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{aliases:["golang"],keywords:t,illegal:"{e.exports=function(e){var t="false synchronized int abstract float private char boolean var static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",n={className:"number",begin:"\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",relevance:0};return{aliases:["jsp"],keywords:t,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"([À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(<[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(\\s*,\\s*[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*)*>)?\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:t,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,keywords:t,relevance:0,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},n,{className:"meta",begin:"@[A-Za-z]+"}]}}},5489:e=>{e.exports=function(e){var t="[A-Za-z$_][0-9A-Za-z$_]*",n={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},i={className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},r={className:"subst",begin:"\\$\\{",end:"\\}",keywords:n,contains:[]},a={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,r],subLanguage:"xml"}},o={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,r],subLanguage:"css"}},s={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,r]};r.contains=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,o,s,i,e.REGEXP_MODE];var l=r.contains.concat([e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]);return{aliases:["js","jsx"],keywords:n,contains:[{className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},{className:"meta",begin:/^#!/,end:/$/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,o,s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i,{begin:/[{,]\s*/,relevance:0,contains:[{begin:t+"\\s*:",returnBegin:!0,relevance:0,contains:[{className:"attr",begin:t,relevance:0}]}]},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+t+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t},{begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,contains:l}]}]},{className:"",begin:/\s/,end:/\s*/,skip:!0},{begin://,subLanguage:"xml",contains:[{begin:/<[A-Za-z0-9\\._:-]+\s*\/>/,skip:!0},{begin:/<[A-Za-z0-9\\._:-]+/,end:/(\/[A-Za-z0-9\\._:-]+|[A-Za-z0-9\\._:-]+\/)>/,skip:!0,contains:[{begin:/<[A-Za-z0-9\\._:-]+\s*\/>/,skip:!0},"self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:t}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:l}],illegal:/\[|%/},{begin:/\$[(.]/},e.METHOD_GUARD,{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"constructor get set",end:/\{/,excludeEnd:!0}],illegal:/#(?!!)/}}},17410:e=>{e.exports=function(e){var t="([\\w-]+|@{[\\w-]+})",n=[],i=[],r=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},a=function(e,t,n){return{className:e,begin:t,relevance:n}},o={begin:"\\(",end:"\\)",contains:i,relevance:0};i.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r("'"),r('"'),e.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},a("number","#[0-9A-Fa-f]+\\b"),o,a("variable","@@?[\\w-]+",10),a("variable","@{[\\w-]+}"),a("built_in","~?`[^`]*?`"),{className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0},{className:"meta",begin:"!important"});var s=i.concat({begin:"{",end:"}",contains:n}),l={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(i)},u={begin:t+"\\s*:",returnBegin:!0,end:"[;}]",relevance:0,contains:[{className:"attribute",begin:t,end:":",excludeEnd:!0,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:i}}]},c={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",returnEnd:!0,contains:i,relevance:0}},d={className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:s}},h={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:t,end:"{"}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l,a("keyword","all\\b"),a("variable","@{[\\w-]+}"),a("selector-tag",t+"%?",0),a("selector-id","#"+t),a("selector-class","\\."+t,0),a("selector-tag","&",0),{className:"selector-attr",begin:"\\[",end:"\\]"},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"\\(",end:"\\)",contains:s},{begin:"!important"}]};return n.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,c,d,u,h),{case_insensitive:!0,illegal:"[=>'/<($\"]",contains:n}}},67020:e=>{e.exports=function(e){return{aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$"},{begin:"^.+?\\n[=-]{2,}$"}]},{begin:"<",end:">",subLanguage:"xml",relevance:0},{className:"bullet",begin:"^\\s*([*+-]|(\\d+\\.))\\s+"},{className:"strong",begin:"[*_]{2}.+?[*_]{2}"},{className:"emphasis",variants:[{begin:"\\*.+?\\*"},{begin:"_.+?_",relevance:0}]},{className:"quote",begin:"^>\\s+",end:"$"},{className:"code",variants:[{begin:"^```w*s*$",end:"^```s*$"},{begin:"`.+?`"},{begin:"^( {4}|\t)",end:"$",relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},{begin:"\\[.+?\\][\\(\\[].*?[\\)\\]]",returnBegin:!0,contains:[{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0,relevance:0},{className:"link",begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}],relevance:10},{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}},51988:e=>{e.exports=function(e){var t={begin:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},n={className:"meta",begin:/<\?(php)?|\?>/},i={className:"string",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},r={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{aliases:["php","php3","php4","php5","php6","php7"],case_insensitive:!0,keywords:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",contains:[e.HASH_COMMENT_MODE,e.COMMENT("//","$",{contains:[n]}),e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler",lexemes:e.UNDERSCORE_IDENT_RE}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;?$/,contains:[e.BACKSLASH_ESCAPE,{className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]}]},n,{className:"keyword",begin:/\$this\b/},t,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function",end:/[;{]/,excludeEnd:!0,illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:["self",t,e.C_BLOCK_COMMENT_MODE,i,r]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"=>"},i,r]}}},15350:e=>{e.exports=function(e){var t={keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10",built_in:"Ellipsis NotImplemented",literal:"False None True"},n={className:"meta",begin:/^(>>>|\.\.\.) /},i={className:"subst",begin:/\{/,end:/\}/,keywords:t,illegal:/#/},r={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,n],relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,n],relevance:10},{begin:/(fr|rf|f)'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,n,i]},{begin:/(fr|rf|f)"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,n,i]},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},{begin:/(fr|rf|f)'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,i]},{begin:/(fr|rf|f)"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},a={className:"number",relevance:0,variants:[{begin:e.BINARY_NUMBER_RE+"[lLjJ]?"},{begin:"\\b(0o[0-7]+)[lLjJ]?"},{begin:e.C_NUMBER_RE+"[lLjJ]?"}]},o={className:"params",begin:/\(/,end:/\)/,contains:["self",n,a,r]};return i.contains=[r,a,n],{aliases:["py","gyp","ipython"],keywords:t,illegal:/(<\/|->|\?)|=>/,contains:[n,a,r,e.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,o,{begin:/->/,endsWithParent:!0,keywords:"None"}]},{className:"meta",begin:/^[\t ]*@/,end:/$/},{begin:/\b(print|exec)\(/}]}}},86507:e=>{e.exports=function(e){var t="[A-Za-z$_][0-9A-Za-z$_]*",n={keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class public private protected get set super static implements enum export import declare type namespace abstract as from extends async await",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document any number boolean string void Promise"},i={className:"meta",begin:"@"+t},r={begin:"\\(",end:/\)/,keywords:n,contains:["self",e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.NUMBER_MODE]},a={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i,r]},o={className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},s={className:"subst",begin:"\\$\\{",end:"\\}",keywords:n,contains:[]},l={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,s],subLanguage:"xml"}},u={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,s],subLanguage:"css"}},c={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,s]};return s.contains=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,u,c,o,e.REGEXP_MODE],{aliases:["ts"],keywords:n,contains:[{className:"meta",begin:/^\s*['"]use strict['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,u,c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,o,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+e.IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.IDENT_RE},{begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,contains:["self",e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}]}]}],relevance:0},{className:"function",begin:"function",end:/[\{;]/,excludeEnd:!0,keywords:n,contains:["self",e.inherit(e.TITLE_MODE,{begin:t}),a],illegal:/%/,relevance:0},{beginKeywords:"constructor",end:/\{/,excludeEnd:!0,contains:["self",a]},{begin:/module\./,keywords:{built_in:"module"},relevance:0},{beginKeywords:"module",end:/\{/,excludeEnd:!0},{beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},{begin:/\$[(.]/},{begin:"\\."+e.IDENT_RE,relevance:0},i,r]}}},283:e=>{e.exports=function(e){var t={endsWithParent:!0,illegal:/`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf"],case_insensitive:!0,contains:[{className:"meta",begin:"",relevance:10,contains:[{begin:"\\[",end:"\\]"}]},e.COMMENT("\x3c!--","--\x3e",{relevance:10}),{begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{begin:/<\?(php)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]},{className:"tag",begin:"|$)",end:">",keywords:{name:"style"},contains:[t],starts:{end:"",returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:"|$)",end:">",keywords:{name:"script"},contains:[t],starts:{end:"<\/script>",returnEnd:!0,subLanguage:["actionscript","javascript","handlebars","xml","vbscript"]}},{className:"tag",begin:"",contains:[{className:"name",begin:/[^\/><\s]+/,relevance:0},t]}]}}},43705:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i={add:function(e,t){var n="toc".concat(t).concat(++this.index),i={anchor:n,level:t,text:e},r=this.tocItems;return i.level<=5&&r.push(i),n},reset:function(){this.tocItems=[],this.index=0},tocItems:[],index:0}},37352:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ke});var i={},r=[],a=Object.keys,o={},s={},l=/^(no-?highlight|plain|text)$/i,u=/\blang(?:uage)?-([\w-]+)\b/i,c=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,d="",h={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};function f(e){return e.replace(/&/g,"&").replace(//g,">")}function p(e){return e.nodeName.toLowerCase()}function m(e,t){var n=e&&e.exec(t);return n&&0===n.index}function v(e){return l.test(e)}function g(e){var t,n={},i=Array.prototype.slice.call(arguments,1);for(t in e)n[t]=e[t];return i.forEach((function(e){for(t in e)n[t]=e[t]})),n}function b(e){var t=[];return function e(n,i){for(var r=n.firstChild;r;r=r.nextSibling)3===r.nodeType?i+=r.nodeValue.length:1===r.nodeType&&(t.push({event:"start",offset:i,node:r}),i=e(r,i),p(r).match(/br|hr|img|input/)||t.push({event:"stop",offset:i,node:r}));return i}(e,0),t}function y(e){function t(e){return e&&e.source||e}function n(n,i){return new RegExp(t(n),"m"+(e.case_insensitive?"i":"")+(i?"g":""))}!function i(r,o){if(!r.compiled){if(r.compiled=!0,r.keywords=r.keywords||r.beginKeywords,r.keywords){var s={},l=function(t,n){e.case_insensitive&&(n=n.toLowerCase()),n.split(" ").forEach((function(e){var n=e.split("|");s[n[0]]=[t,n[1]?Number(n[1]):1]}))};"string"==typeof r.keywords?l("keyword",r.keywords):a(r.keywords).forEach((function(e){l(e,r.keywords[e])})),r.keywords=s}r.lexemesRe=n(r.lexemes||/\w+/,!0),o&&(r.beginKeywords&&(r.begin="\\b("+r.beginKeywords.split(" ").join("|")+")\\b"),r.begin||(r.begin=/\B|\b/),r.beginRe=n(r.begin),r.endSameAsBegin&&(r.end=r.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(r.endRe=n(r.end)),r.terminator_end=t(r.end)||"",r.endsWithParent&&o.terminator_end&&(r.terminator_end+=(r.end?"|":"")+o.terminator_end)),r.illegal&&(r.illegalRe=n(r.illegal)),null==r.relevance&&(r.relevance=1),r.contains||(r.contains=[]),r.contains=Array.prototype.concat.apply([],r.contains.map((function(e){return function(e){return e.variants&&!e.cached_variants&&(e.cached_variants=e.variants.map((function(t){return g(e,{variants:null},t)}))),e.cached_variants||e.endsWithParent&&[g(e)]||[e]}("self"===e?r:e)}))),r.contains.forEach((function(e){i(e,r)})),r.starts&&i(r.starts,o);var u=r.contains.map((function(e){return e.beginKeywords?"\\.?(?:"+e.begin+")\\.?":e.begin})).concat([r.terminator_end,r.illegal]).map(t).filter(Boolean);r.terminators=u.length?n(function(e,n){for(var i=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,r=0,a="",o=0;o0&&(a+=n);l.length>0;){var u=i.exec(l);if(null==u){a+=l;break}a+=l.substring(0,u.index),l=l.substring(u.index+u[0].length),"\\"==u[0][0]&&u[1]?a+="\\"+String(Number(u[1])+s):(a+=u[0],"("==u[0]&&r++)}}return a}(u,"|"),!0):{exec:function(){return null}}}}(e)}function w(e,t,n,i){function r(e){return new RegExp(e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}function a(e,t){if(m(e.endRe,t)){for(;e.endsParent&&e.parent;)e=e.parent;return e}if(e.endsWithParent)return a(e.parent,t)}function s(e,t){var n=v.case_insensitive?t[0].toLowerCase():t[0];return e.keywords.hasOwnProperty(n)&&e.keywords[n]}function l(e,t,n,i){var r='')+t+(n?"":d):t}function u(){C+=null!=b.subLanguage?function(){var e="string"==typeof b.subLanguage;if(e&&!o[b.subLanguage])return f(k);var t=e?w(b.subLanguage,k,!0,x[b.subLanguage]):_(k,b.subLanguage.length?b.subLanguage:void 0);return b.relevance>0&&(O+=t.relevance),e&&(x[b.subLanguage]=t.top),l(t.language,t.value,!1,!0)}():function(){var e,t,n,i;if(!b.keywords)return f(k);for(i="",t=0,b.lexemesRe.lastIndex=0,n=b.lexemesRe.exec(k);n;)i+=f(k.substring(t,n.index)),(e=s(b,n))?(O+=e[1],i+=l(e[0],f(n[0]))):i+=f(n[0]),t=b.lexemesRe.lastIndex,n=b.lexemesRe.exec(k);return i+f(k.substr(t))}(),k=""}function c(e){C+=e.className?l(e.className,"",!0):"",b=Object.create(e,{parent:{value:b}})}function p(e,t){if(k+=e,null==t)return u(),0;var i=function(e,t){var n,i;for(n=0,i=t.contains.length;n")+'"');return k+=t,t.length||1}var v=S(e);if(!v)throw new Error('Unknown language: "'+e+'"');y(v);var g,b=i||v,x={},C="";for(g=b;g!==v;g=g.parent)g.className&&(C=l(g.className,"",!0)+C);var k="",O=0;try{for(var T,D,E=0;b.terminators.lastIndex=E,T=b.terminators.exec(t);)D=p(t.substring(E,T.index),T[0]),E=T.index+D;for(p(t.substr(E)),g=b;g.parent;g=g.parent)g.className&&(C+=d);return{relevance:O,value:C,language:e,top:b}}catch(e){if(e.message&&-1!==e.message.indexOf("Illegal"))return{relevance:0,value:f(t)};throw e}}function _(e,t){t=t||h.languages||a(o);var n={relevance:0,value:f(e)},i=n;return t.filter(S).filter(O).forEach((function(t){var r=w(t,e,!1);r.language=t,r.relevance>i.relevance&&(i=r),r.relevance>n.relevance&&(i=n,n=r)})),i.language&&(n.second_best=i),n}function x(e){return h.tabReplace||h.useBR?e.replace(c,(function(e,t){return h.useBR&&"\n"===e?"
":h.tabReplace?t.replace(/\t/g,h.tabReplace):""})):e}function C(e){var t,n,i,a,o,l=function(e){var t,n,i,r,a=e.className+" ";if(a+=e.parentNode?e.parentNode.className:"",n=u.exec(a))return S(n[1])?n[1]:"no-highlight";for(t=0,i=(a=a.split(/\s+/)).length;t/g,"\n"):t=e,o=t.textContent,i=l?w(l,o,!0):_(o),(n=b(t)).length&&((a=document.createElementNS("http://www.w3.org/1999/xhtml","div")).innerHTML=i.value,i.value=function(e,t,n){var i=0,a="",o=[];function s(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset"}function u(e){a+=""}function c(e){("start"===e.event?l:u)(e.node)}for(;e.length||t.length;){var d=s();if(a+=f(n.substring(i,d[0].offset)),i=d[0].offset,d===e){o.reverse().forEach(u);do{c(d.splice(0,1)[0]),d=s()}while(d===e&&d.length&&d[0].offset===i);o.reverse().forEach(l)}else"start"===d[0].event?o.push(d[0].node):o.pop(),c(d.splice(0,1)[0])}return a+f(n.substr(i))}(n,b(a),o)),i.value=x(i.value),e.innerHTML=i.value,e.className=function(e,t,n){var i=t?s[t]:n,r=[e.trim()];return e.match(/\bhljs\b/)||r.push("hljs"),-1===e.indexOf(i)&&r.push(i),r.join(" ").trim()}(e.className,l,i.language),e.result={language:i.language,re:i.relevance},i.second_best&&(e.second_best={language:i.second_best.language,re:i.second_best.relevance}))}function k(){if(!k.called){k.called=!0;var e=document.querySelectorAll("pre code");r.forEach.call(e,C)}}function S(e){return e=(e||"").toLowerCase(),o[e]||o[s[e]]}function O(e){var t=S(e);return t&&!t.disableAutodetect}i.highlight=w,i.highlightAuto=_,i.fixMarkup=x,i.highlightBlock=C,i.configure=function(e){h=g(h,e)},i.initHighlighting=k,i.initHighlightingOnLoad=function(){addEventListener("DOMContentLoaded",k,!1),addEventListener("load",k,!1)},i.registerLanguage=function(e,t){var n=o[e]=t(i);n.aliases&&n.aliases.forEach((function(t){s[t]=e}))},i.listLanguages=function(){return a(o)},i.getLanguage=S,i.autoDetection=O,i.inherit=g,i.IDENT_RE="[a-zA-Z]\\w*",i.UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",i.NUMBER_RE="\\b\\d+(\\.\\d+)?",i.C_NUMBER_RE="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",i.BINARY_NUMBER_RE="\\b(0b[01]+)",i.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",i.BACKSLASH_ESCAPE={begin:"\\\\[\\s\\S]",relevance:0},i.APOS_STRING_MODE={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[i.BACKSLASH_ESCAPE]},i.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[i.BACKSLASH_ESCAPE]},i.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},i.COMMENT=function(e,t,n){var r=i.inherit({className:"comment",begin:e,end:t,contains:[]},n||{});return r.contains.push(i.PHRASAL_WORDS_MODE),r.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|XXX):",relevance:0}),r},i.C_LINE_COMMENT_MODE=i.COMMENT("//","$"),i.C_BLOCK_COMMENT_MODE=i.COMMENT("/\\*","\\*/"),i.HASH_COMMENT_MODE=i.COMMENT("#","$"),i.NUMBER_MODE={className:"number",begin:i.NUMBER_RE,relevance:0},i.C_NUMBER_MODE={className:"number",begin:i.C_NUMBER_RE,relevance:0},i.BINARY_NUMBER_MODE={className:"number",begin:i.BINARY_NUMBER_RE,relevance:0},i.CSS_NUMBER_MODE={className:"number",begin:i.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},i.REGEXP_MODE={className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[i.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[i.BACKSLASH_ESCAPE]}]},i.TITLE_MODE={className:"title",begin:i.IDENT_RE,relevance:0},i.UNDERSCORE_TITLE_MODE={className:"title",begin:i.UNDERSCORE_IDENT_RE,relevance:0},i.METHOD_GUARD={begin:"\\.\\s*"+i.UNDERSCORE_IDENT_RE,relevance:0};const T=i;var D=n(5489),E=n.n(D),$=n(53049),M=n.n($),P=n(40349),I=n.n(P),j=n(17410),A=n.n(j),N=n(8650),L=n.n(N),F=n(67020),R=n.n(F),B=n(51988),V=n.n(B),z=n(15350),H=n.n(z),W=n(86507),q=n.n(W),U=n(283),K=n.n(U),G=n(4142),Y=n.n(G),Z=n(52423),X=n.n(Z),J={javascript:E(),java:M(),css:I(),less:A(),markdown:R(),go:L(),php:V(),python:H(),typescript:q(),xml:K(),autohotkey:Y(),auto:X()};Object.keys(J).forEach((function(e){T.registerLanguage(e,J[e])}));const Q=T;var ee=n(43705);void 0===window._goTocAction&&(window._goTocAction=function(e,t,n){var i=$A(e).parents(".markdown-preview");if(i){var r=i.find("h"+t+'[toc-id="'+n+'"]');r&&i.animate({scrollTop:r.offset().top-i.offset().top+i.scrollTop()})}});var te={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}|~{3,})([^`~\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:me,table:me,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};function ne(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||_e.defaults,this.rules=te.normal,this.options.pedantic?this.rules=te.pedantic:this.options.gfm&&(this.rules=te.gfm)}te._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,te._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,te.def=de(te.def).replace("label",te._label).replace("title",te._title).getRegex(),te.bullet=/(?:[*+-]|\d{1,9}\.)/,te.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,te.item=de(te.item,"gm").replace(/bull/g,te.bullet).getRegex(),te.list=de(te.list).replace(/bull/g,te.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+te.def.source+")").getRegex(),te._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",te._comment=//,te.html=de(te.html,"i").replace("comment",te._comment).replace("tag",te._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),te.paragraph=de(te._paragraph).replace("hr",te.hr).replace("heading"," {0,3}#{1,6} +").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}|~{3,})[^`\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",te._tag).getRegex(),te.blockquote=de(te.blockquote).replace("paragraph",te.paragraph).getRegex(),te.normal=ve({},te),te.gfm=ve({},te.normal,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),te.pedantic=ve({},te.normal,{html:de("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",te._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:me,paragraph:de(te.normal._paragraph).replace("hr",te.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",te.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()}),ne.rules=te,ne.lex=function(e,t){return new ne(t).lex(e)},ne.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},ne.prototype.token=function(e,t){var n,i,r,a,o,s,l,u,c,d,h,f,p,m,v,g;for(e=e.replace(/^ +$/gm,"");e;)if((r=this.rules.newline.exec(e))&&(e=e.substring(r[0].length),r[0].length>1&&this.tokens.push({type:"space"})),r=this.rules.code.exec(e)){var b=this.tokens[this.tokens.length-1];e=e.substring(r[0].length),b&&"paragraph"===b.type?b.text+="\n"+r[0].trimRight():(r=r[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",codeBlockStyle:"indented",text:this.options.pedantic?r:be(r,"\n")}))}else if(r=this.rules.fences.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"code",lang:r[2]?r[2].trim():r[2],text:r[3]||""});else if(r=this.rules.heading.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"heading",depth:r[1].length,text:r[2]});else if((r=this.rules.nptable.exec(e))&&(s={type:"table",header:ge(r[1].replace(/^ *| *\| *$/g,"")),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3]?r[3].replace(/\n$/,"").split("\n"):[]}).header.length===s.align.length){for(e=e.substring(r[0].length),h=0;h ?/gm,""),this.token(r,t),this.tokens.push({type:"blockquote_end"});else if(r=this.rules.list.exec(e)){for(e=e.substring(r[0].length),l={type:"list_start",ordered:m=(a=r[2]).length>1,start:m?+a:"",loose:!1},this.tokens.push(l),u=[],n=!1,p=(r=r[0].match(this.rules.item)).length,h=0;h1?1===o.length:o.length>1||this.options.smartLists&&o!==a)&&(e=r.slice(h+1).join("\n")+e,h=p-1)),i=n||/\n\n(?!\s*$)/.test(s),h!==p-1&&(n="\n"===s.charAt(s.length-1),i||(i=n)),i&&(l.loose=!0),g=void 0,(v=/^\[[ xX]\] /.test(s))&&(g=" "!==s[1],s=s.replace(/^\[[ xX]\] +/,"")),c={type:"list_item_start",task:v,checked:g,loose:i},u.push(c),this.tokens.push(c),this.token(s,!1),this.tokens.push({type:"list_item_end"});if(l.loose)for(p=u.length,h=0;h?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:me,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:me,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[^_{|}~",ie.em=de(ie.em).replace(/punctuation/g,ie._punctuation).getRegex(),ie._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ie._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ie._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,ie.autolink=de(ie.autolink).replace("scheme",ie._scheme).replace("email",ie._email).getRegex(),ie._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ie.tag=de(ie.tag).replace("comment",te._comment).replace("attribute",ie._attribute).getRegex(),ie._label=/(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ie._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ie._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ie.link=de(ie.link).replace("label",ie._label).replace("href",ie._href).replace("title",ie._title).getRegex(),ie.reflink=de(ie.reflink).replace("label",ie._label).getRegex(),ie.normal=ve({},ie),ie.pedantic=ve({},ie.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:de(/^!?\[(label)\]\((.*?)\)/).replace("label",ie._label).getRegex(),reflink:de(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ie._label).getRegex()}),ie.gfm=ve({},ie.normal,{escape:de(ie.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\/i.test(a[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(a[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(a[0])&&(this.inRawBlock=!1),e=e.substring(a[0].length),s+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(a[0]):ue(a[0]):a[0];else if(a=this.rules.link.exec(e)){var l=ye(a[2],"()");if(l>-1){var u=4+a[1].length+l;a[2]=a[2].substring(0,l),a[0]=a[0].substring(0,u).trim(),a[3]=""}e=e.substring(a[0].length),this.inLink=!0,i=a[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i))?(i=t[1],r=t[3]):r="":r=a[3]?a[3].slice(1,-1):"",i=i.trim().replace(/^<([\s\S]*)>$/,"$1"),s+=this.outputLink(a,{href:re.escapes(i),title:re.escapes(r)}),this.inLink=!1}else if((a=this.rules.reflink.exec(e))||(a=this.rules.nolink.exec(e))){if(e=e.substring(a[0].length),t=(a[2]||a[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){s+=a[0].charAt(0),e=a[0].substring(1)+e;continue}this.inLink=!0,s+=this.outputLink(a,t),this.inLink=!1}else if(a=this.rules.strong.exec(e))e=e.substring(a[0].length),s+=this.renderer.strong(this.output(a[4]||a[3]||a[2]||a[1]));else if(a=this.rules.em.exec(e))e=e.substring(a[0].length),s+=this.renderer.em(this.output(a[6]||a[5]||a[4]||a[3]||a[2]||a[1]));else if(a=this.rules.code.exec(e))e=e.substring(a[0].length),s+=this.renderer.codespan(ue(a[2].trim(),!0));else if(a=this.rules.br.exec(e))e=e.substring(a[0].length),s+=this.renderer.br();else if(a=this.rules.del.exec(e))e=e.substring(a[0].length),s+=this.renderer.del(this.output(a[1]));else if(a=this.rules.autolink.exec(e))e=e.substring(a[0].length),i="@"===a[2]?"mailto:"+(n=ue(this.mangle(a[1]))):n=ue(a[1]),s+=this.renderer.link(i,null,n);else if(this.inLink||!(a=this.rules.url.exec(e))){if(a=this.rules.text.exec(e))e=e.substring(a[0].length),this.inRawBlock?s+=this.renderer.text(this.options.sanitize?this.options.sanitizer?this.options.sanitizer(a[0]):ue(a[0]):a[0]):s+=this.renderer.text(ue(this.smartypants(a[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===a[2])i="mailto:"+(n=ue(a[0]));else{do{o=a[0],a[0]=this.rules._backpedal.exec(a[0])[0]}while(o!==a[0]);n=ue(a[0]),i="www."===a[1]?"http://"+n:n}e=e.substring(a[0].length),s+=this.renderer.link(i,null,n)}return s},re.escapes=function(e){return e?e.replace(re.rules._escapes,"$1"):e},re.prototype.outputLink=function(e,t){var n=t.href,i=t.title?ue(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,i,this.output(e[1])):this.renderer.image(n,i,ue(e[1]))},re.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},re.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",i=e.length,r=0;r.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},ae.prototype.code=function(e,t,n){var i=(t||"").match(/\S*/)[0];if(this.options.highlight){var r=this.options.highlight(e,i);null!=r&&r!==e&&(n=!0,e=r)}return i?'
'+(n?e:ue(e,!0))+"
\n":"
"+(n?e:ue(e,!0))+"
"},ae.prototype.blockquote=function(e){return"
\n"+e+"
\n"},ae.prototype.html=function(e){return e},ae.prototype.heading=function(e,t,n,i){var r=ee.Z.add(e,t);return this.options.headerIds?"'+e+"\n":"'+e+"\n"},ae.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},ae.prototype.list=function(e,t,n){var i=t?"ol":"ul";return"<"+i+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},ae.prototype.listitem=function(e){var t="";return/\/.test(e)&&(t="list-item-checkbox",/checked/.test(e)&&(t+=" list-item-checkbox-checked")),'
  • ').concat(e,"
  • \n")},ae.prototype.checkbox=function(e){return" "},ae.prototype.paragraph=function(e){return"

    "+e+"

    \n"},ae.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},ae.prototype.tablerow=function(e){return"\n"+e+"\n"},ae.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},ae.prototype.strong=function(e){return""+e+""},ae.prototype.em=function(e){return""+e+""},ae.prototype.codespan=function(e){return""+e+""},ae.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},ae.prototype.del=function(e){return""+e+""},ae.prototype.link=function(e,t,n){if(null===(e=he(this.options.sanitize,this.options.baseUrl,e)))return n;var i='"},ae.prototype.image=function(e,t,n){if(null===(e=he(this.options.sanitize,this.options.baseUrl,e)))return n;var i=''+n+'":">"},ae.prototype.text=function(e){return e},oe.prototype.strong=oe.prototype.em=oe.prototype.codespan=oe.prototype.del=oe.prototype.text=function(e){return e},oe.prototype.link=oe.prototype.image=function(e,t,n){return""+n},oe.prototype.br=function(){return""},se.parse=function(e,t){return new se(t).parse(e)},se.prototype.parse=function(e){this.inline=new re(e.links,this.options),this.inlineText=new re(e.links,ve({},this.options,{renderer:new oe})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},se.prototype.next=function(){return this.token=this.tokens.pop(),this.token},se.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},se.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},se.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,ce(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,i,r="",a="";for(n="",e=0;e?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},ue.escapeTest=/[&<>"']/,ue.escapeReplace=/[&<>"']/g,ue.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"},ue.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,ue.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var fe={},pe=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function me(){}function ve(e){for(var t,n,i=1;i=0&&"\\"===n[r];)i=!i;return i?"|":" |"})).split(/ \|/),i=0;if(n.length>t)n.splice(t);else for(;n.lengthAn error occurred:

    "+ue(e.message+"",!0)+"
    ";throw e}}me.exec=me,_e.options=_e.setOptions=function(e){return ve(_e.defaults,e),_e},_e.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new ae,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1}},_e.defaults=_e.getDefaults(),_e.Parser=se,_e.parser=se.parse,_e.Renderer=ae,_e.TextRenderer=oe,_e.Lexer=ne,_e.lexer=ne.lex,_e.InlineLexer=re,_e.inlineLexer=re.output,_e.Slugger=le,_e.parse=_e;const xe=_e;Q.initHighlightingOnLoad();var Ce=new xe.Renderer;const ke=xe.setOptions({renderer:Ce,gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,smartLists:!0,highlight:function(e){return Q.highlightAuto(e).value}})},90091:(e,t,n)=>{function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}!function(e,t,n){e.systemInfo=e.systemInfo||{},t.extend({isArray:function(e){return"object"==i(e)&&"[object array]"==Object.prototype.toString.call(e).toLowerCase()&&"number"==typeof e.length},isJson:function(e){return"object"==i(e)&&"[object object]"==Object.prototype.toString.call(e).toLowerCase()&&void 0===e.length},inArray:function(e,t){return!!this.isArray(t)&&t.includes(e)},randNum:function(e,t){var n=t-e,i=Math.random();return e+Math.round(i*n)},last:function(e){var t=!1;return"object"===i(e)&&e.length>0&&(t=e[e.length-1]),t},strExists:function(e,t){var i=arguments.length>2&&arguments[2]!==n&&arguments[2];return e+="",t+="",!0!==i&&(e=e.toLowerCase(),t=t.toLowerCase()),-1!==e.indexOf(t)},leftExists:function(e,t){var i=arguments.length>2&&arguments[2]!==n&&arguments[2];return e+="",t+="",!0!==i&&(e=e.toLowerCase(),t=t.toLowerCase()),e.substring(0,t.length)===t},leftDelete:function(e,t){var i=arguments.length>2&&arguments[2]!==n&&arguments[2];return e+="",t+="",this.leftExists(e,t,i)&&(e=e.substring(t.length)),e||""},rightExists:function(e,t){var i=arguments.length>2&&arguments[2]!==n&&arguments[2];return e+="",t+="",!0!==i&&(e=e.toLowerCase(),t=t.toLowerCase()),e.substring(e.length-t.length)===t},getMiddle:function(e){var t=arguments.length>1&&arguments[1]!==n?arguments[1]:null,i=arguments.length>2&&arguments[2]!==n?arguments[2]:null;return e=e.toString(),this.isHave(t)&&this.strExists(e,t)&&(e=e.substring(e.indexOf(t)+t.length)),this.isHave(i)&&this.strExists(e,i)&&(e=e.substring(0,e.indexOf(i))),e},subString:function(e,t,n){return e+="",this.isHave(n)||(n=e.length),e.substring(t,n)},randomString:function(e){e=e||32;for(var t="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678oOLl9gqVvUuI1",n=t.length,i="",r=0;r1&&arguments[1]!==n?arguments[1]:null,i=Number(e);if(i+""=="NaN"&&(i=0),t&&/^[0-9]*[1-9][0-9]*$/.test(t)){var r=(i=i.toFixed(t)).indexOf(".");if(r<0){i+=".";for(var a=0;a1&&arguments[1]!==n&&arguments[1];return"string"==typeof e&&this.strExists(e,"-")&&(e=e.replace(/-/g,"/")),!0===t?Math.round(new Date(e).getTime()/1e3):new Date(e)})),zeroFill:function(e,t,n){if((e+="").length>=t)return e;for(var i="",r=0;r86400){var i=Math.floor(n/86400),r=Math.ceil((n-86400*i)/3600);return r>0?i+"天"+r+"小时":i+"天"}return n>3600?Math.ceil(n/3600)+"小时":n>60?Math.ceil(n/60)+"分钟":n>10?n+"秒":"刚刚"},isMobile:function(e){return/^1([3456789])\d{9}$/.test(e)},getDistance:function(e,t,n,i){var r,a,o,s,l,u=3.14159265359,c=6.28318530712,d=.01745329252,h=6370693.5;return r=t*d,a=i*d,(l=e*d-n*d)>u?l=c-l:l<-u&&(l=c+l),o=h*Math.cos(r)*l,s=h*(r-a),Math.sqrt(o*o+s*s).toFixed(0)},setTile:function(e){document.title=e;var t=navigator.userAgent.toLowerCase();if(/iphone|ipad|ipod/.test(t)){var n=document.createElement("iframe");n.style.display="none",n.setAttribute("src","/favicon.ico");n.addEventListener("load",(function e(){setTimeout((function(){n.removeEventListener("load",e),document.body.removeChild(n)}),0)})),document.body.appendChild(n)}},cloneJSON:function(e){return"object"!==i(e)||null===e?e:$A.jsonParse($A.jsonStringify(e))},jsonParse:function(e){var t=arguments.length>1&&arguments[1]!==n?arguments[1]:n;if(null===e)return t||{};if("object"===i(e))return e;try{return JSON.parse(e.replace(/\n/g,"\\n").replace(/\r/g,"\\r"))}catch(e){return t||{}}},jsonStringify:function(e){var t=arguments.length>1&&arguments[1]!==n?arguments[1]:n;if("object"!==i(e))return e;try{return JSON.stringify(e)}catch(e){return t||""}},resize:function(e,t){var n=$A(e);if(0!==n.length)var i=parseInt(n.outerHeight()),r=parseInt(n.outerWidth()),a=setInterval((function(){0===n.length&&clearInterval(a);var e=parseInt(n.outerHeight()),o=parseInt(n.outerWidth());i===e&&r===o||(i=e,r=o,console.log(r,i),"function"==typeof t&&t())}),250)},isIos:function(){var t=void 0!==e&&e.navigator.userAgent.toLowerCase();return t&&/iphone|ipad|ipod|ios/.test(t)},isAndroid:function(){var t=void 0!==e&&e.navigator.userAgent.toLowerCase();return t&&t.indexOf("android")>0},isWeixin:function(){return(void 0!==e&&e.navigator.userAgent.toLowerCase()).match(/MicroMessenger/i)+""=="micromessenger"},getObject:function(e,t){var n=e;return 0===this.count(e)||0===this.count(t)?"":(t.replace(/,/g,"|").replace(/\./g,"|").split("|").some((function(e){n=void 0===n[e]?"":n[e]})),n)},count:function(e){try{if(void 0===e)return 0;if("number"==typeof e&&(e+=""),"number"==typeof e.length)return e.length;var t,n=0;for(t in e)n++;return n}catch(e){return 0}},objImplode:function(e){var t=this;if(null===e)return"";var n="";return $A.each(e,(function(e,r){null!==r&&("object"===i(r)&&t.count(r)>0?n+=t.objImplode(r):n+=String(r))})),n.replace(/\s/g,"").replace(/undefined/g,"")},urlParameter:function(e){var t=this.urlParameterAll();return void 0===e?t:t[e]},urlParameterAll:function(){var t=e.location.search||"",n=[];this.strExists(t,"?")&&(n=this.getMiddle(t,"?").split("&"));for(var i={},r=0;r=2){for(var i=encodeURIComponent(t)+"=",r=n[1].split(/[&;]/g),a=r.length;a-- >0;)-1!==r[a].lastIndexOf(i,0)&&r.splice(a,1);return n[0]+(r.length>0?"?"+r.join("&"):"")}return e},urlAddParams:function(e,t){if($A.isJson(t))for(var n in e&&(e=this.removeURLParameter(e,Object.keys(t))),e+="",e+=-1===e.indexOf("?")?"?":"",t)t.hasOwnProperty(n)&&(e+="&"+n+"="+t[n]);return e.replace("?&","?")},stringConnect:function(){for(var e=null,t="",n=arguments.length,i=new Array(n),r=0;r0&&(e=e[0]);var n="object"===i(e.$el)?$A(e.$el):$A(e);if(0!==n.length){var r=n[0];if("INPUT"!=r.tagName&&"TEXTAREA"!=r.tagName&&(n=0===n.find("input").length?n.find("textarea"):n.find("input")),0!==n.length&&("INPUT"==(r=n[0]).tagName||"TEXTAREA"==r.tagName)){var a=n.val(),o=r,s=o.selectionStart,l=o.selectionEnd;n.val("".concat(a.substring(0,s)).concat(t).concat(a.substring(l,a.length))),r.dispatchEvent(new Event("input")),setTimeout((function(){if(r.setSelectionRange){var e=a.substring(0,s).length+t.length;r.focus(),r.setSelectionRange(e,e)}}),10)}}}},iOSKeyboardFixer:function(){this.isIos()&&(document.body.scrollTop=document.body.scrollTop+1,document.body.scrollTop=document.body.scrollTop-1)},loadScript:function(t,n){var i=this;if(t=$A.originUrl(t),this.rightExists(t,".css"))this.loadCss(t,n);else if(!0!==this.__loadScript[t]){var r=document.createElement("script");r.type="text/javascript",r.readyState?r.onreadystatechange=function(){"loaded"!==r.readyState&&"complete"!==r.readyState||(r.onreadystatechange=null,i.__loadScript[t]=!0,"function"==typeof n&&n(null))}:(r.onload=function(){i.__loadScript[t]=!0,"function"==typeof n&&n(null)},r.onerror=function(e){"function"==typeof n&&n(e)}),this.rightExists(t,".js")?r.src=t+"?hash="+e.systemInfo.version:r.src=t,document.body.appendChild(r)}else"function"==typeof n&&n(null)},loadScriptS:function(e,t){var n=this,i=0;this.loadScript(e[0],(function r(){++i&"]/g,(function(e){return{"<":"<",">":">","&":"&",'"':"""}[e]})):""},getDomain:function(e){var t=(e+"").match(/http(s)?:\/\/([^\/]+)/i);return null!=t&&t.length>0?t[2]:""}}),t.extend({setStorage:function(e,t){return this.storage(e,t)},getStorage:function(e){var t=arguments.length>1&&arguments[1]!==n?arguments[1]:null,i=this.storage(e);return i||t},getStorageString:function(e){var t=arguments.length>1&&arguments[1]!==n?arguments[1]:"",i=this.storage(e);return"string"==typeof i||"number"==typeof i?i:t},getStorageInt:function(e){var t=arguments.length>1&&arguments[1]!==n?arguments[1]:0,i=this.storage(e);return"number"==typeof i?i:t},getStorageBoolean:function(e){var t=arguments.length>1&&arguments[1]!==n&&arguments[1],i=this.storage(e);return"boolean"==typeof i?i:t},getStorageArray:function(e){var t=arguments.length>1&&arguments[1]!==n?arguments[1]:[],i=this.storage(e);return this.isArray(i)?i:t},getStorageJson:function(e){var t=arguments.length>1&&arguments[1]!==n?arguments[1]:{},i=this.storage(e);return this.isJson(i)?i:t},storage:function(e,t){if(e){var n="__state__";if("cache"===e.substring(0,5)&&(n="__state:"+e+"__"),void 0===t)return this.loadFromlLocal(e,"",n);this.savaToLocal(e,t,n)}},savaToLocal:function(t,n,i){try{void 0===i&&(i="__seller__");var r=e.localStorage[i];(r=r?JSON.parse(r):{})[t]=n,e.localStorage[i]=JSON.stringify(r)}catch(e){}},loadFromlLocal:function(t,n,i){try{void 0===i&&(i="__seller__");var r=e.localStorage[i];return r&&((r=JSON.parse(r))&&void 0!==r[t])?r[t]:n}catch(e){return n}}}),t.extend({serializeObject:function(e,n){if("string"==typeof e)return e;var r,a=[];function o(e){if(n.length>0){for(var t="",i=0;i0&&a.push(u.join("&"))}else null===e[l]?a.push(o(l)+"="):"object"===i(e[l])?((r=n.slice()).push(l),""!==(u=t.serializeObject(e[l],r))&&a.push(u)):void 0!==e[l]&&""!==e[l]?a.push(o(l)+"="+s(e[l])):""===e[l]&&a.push(o(l))}return a.join("&")},globalAjaxOptions:{},ajaxSetup:function(e){e.type&&(e.method=e.type),t.each(e,(function(e,n){t.globalAjaxOptions[e]=n}))},_jsonpRequests:0,ihttp:function(i){var r={method:"GET",data:!1,async:!0,cache:!0,user:"",password:"",headers:{},xhrFields:{},statusCode:{},processData:!0,dataType:"text",contentType:"application/x-www-form-urlencoded",timeout:0},a=["beforeSend","error","complete","success","statusCode"];function o(e,n,r){var a=arguments;e&&t(document).trigger(e,n),r&&(r in t.globalAjaxOptions&&t.globalAjaxOptions[r](a[3],a[4],a[5],a[6]),i[r]&&i[r](a[3],a[4],a[5],a[6]))}i.type&&(i.method=i.type),t.each(t.globalAjaxOptions,(function(e,t){a.indexOf(e)<0&&(r[e]=t)})),t.each(r,(function(e,t){e in i||(i[e]=t)})),i.url||(i.url=e.location.toString());var s,l=i.url.indexOf("?")>=0?"&":"?",u=i.method.toUpperCase();"GET"!==u&&"HEAD"!==u&&"OPTIONS"!==u&&"DELETE"!==u||!i.data||(s="string"==typeof i.data?i.data.indexOf("?")>=0?i.data.split("?")[1]:i.data:t.serializeObject(i.data)).length&&(i.url+=l+s,"?"===l&&(l="&"));if("json"===i.dataType&&i.url.indexOf("callback=")>=0){var c,d="f7jsonp_"+Date.now()+t._jsonpRequests++,h=i.url.split("callback="),f=h[0]+"callback="+d;if(h[1].indexOf("&")>=0){var p=h[1].split("&").filter((function(e){return e.indexOf("=")>0})).join("&");p.length>0&&(f+="&"+p)}var m=document.createElement("script");return m.type="text/javascript",m.onerror=function(){clearTimeout(c),o(n,n,"error",null,"scripterror"),o("ajaxComplete ajax:complete",{scripterror:!0},"complete",null,"scripterror")},m.src=f,e[d]=function(t){clearTimeout(c),o(n,n,"success",t),m.parentNode.removeChild(m),m=null,delete e[d]},document.querySelector("head").appendChild(m),void(i.timeout>0&&(c=setTimeout((function(){m.parentNode.removeChild(m),m=null,o(n,n,"error",null,"timeout")}),i.timeout)))}"GET"!==u&&"HEAD"!==u&&"OPTIONS"!==u&&"DELETE"!==u||!1===i.cache&&(i.url+=l+"_nocache="+Date.now());var v=new XMLHttpRequest;v.requestUrl=i.url,v.requestParameters=i,v.open(u,i.url,i.async,i.user,i.password);var g,b=null;if(("POST"===u||"PUT"===u||"PATCH"===u)&&i.data)if(i.processData)if([ArrayBuffer,Blob,Document,FormData].indexOf(i.data.constructor)>=0)b=i.data;else{var y="---------------------------"+Date.now().toString(16);"multipart/form-data"===i.contentType?v.setRequestHeader("Content-Type","multipart/form-data; boundary="+y):v.setRequestHeader("Content-Type",i.contentType),b="";var w=t.serializeObject(i.data);if("multipart/form-data"===i.contentType){y="---------------------------"+Date.now().toString(16),w=w.split("&");for(var _=[],x=0;x=200&&v.status<300||0===v.status)if("json"===i.dataType)try{n=JSON.parse(v.responseText),o("ajaxSuccess ajax:success",{xhr:v},"success",n,v.status,v)}catch(e){console.error(e),o("ajaxError ajax:error",{xhr:v,parseerror:!0},"error",v,"parseerror")}else n="text"===v.responseType||""===v.responseType?v.responseText:v.response,o("ajaxSuccess ajax:success",{xhr:v},"success",n,v.status,v);else o("ajaxError ajax:error",{xhr:v},"error",v,v.status);i.statusCode&&(t.globalAjaxOptions.statusCode&&t.globalAjaxOptions.statusCode[v.status]&&t.globalAjaxOptions.statusCode[v.status](v),i.statusCode[v.status]&&i.statusCode[v.status](v)),o("ajaxComplete ajax:complete",{xhr:v},"complete",v,v.status)},v.onerror=function(e){g&&clearTimeout(g),o("ajaxError ajax:error",{xhr:v},"error",v,v.status),o("ajaxComplete ajax:complete",{xhr:v,error:!0},"complete",v,"error")},o("ajaxStart ajax:start",{xhr:v},"start",v),o(n,n,"beforeSend",v),i.timeout>0&&(v.onabort=function(){g&&clearTimeout(g)},g=setTimeout((function(){v.abort(),o("ajaxError ajax:error",{xhr:v,timeout:!0},"error",v,"timeout"),o("ajaxComplete ajax:complete",{xhr:v,timeout:!0},"complete",v,"timeout")}),i.timeout)),v.send(b),v}}),t.extend({ajaxc:function(e){return!!e&&(void 0!==e.url&&(void 0===e.data&&(e.data={}),void 0===e.cache&&(e.cache=!1),void 0===e.method&&(e.method="GET"),void 0===e.timeout&&(e.timeout=3e4),void 0===e.dataType&&(e.dataType="json"),void 0===e.before&&(e.before=function(){}),void 0===e.complete&&(e.complete=function(){}),void 0===e.after&&(e.after=function(){}),void 0===e.success&&(e.success=function(){}),void 0===e.error&&(e.error=function(){}),void 0===e.header&&(e.header={}),e.before(),void $A.ihttp({url:e.url,data:e.data,cache:e.cache,headers:e.header,method:e.method.toUpperCase(),contentType:"OPTIONS",crossDomain:!0,dataType:e.dataType,timeout:e.timeout,success:function(t,n,i){e.complete(),e.success(t,n,i),e.after(!0)},error:function(t,n){e.complete(),e.error(t,n),e.after(!1)}})))}}),e.$A=t}(window,window.$=window.jQuery=n(19755))},92693:()=>{!function(e){var t=e.$A;t.extend({apiUrl:function(t){if("//"===t.substring(0,2)||"http://"===t.substring(0,7)||"https://"===t.substring(0,8)||"ftp://"===t.substring(0,6)||"/"===t.substring(0,1))return t;for(t="string"==typeof e.systemInfo.apiUrl?e.systemInfo.apiUrl+t:e.location.origin+"/api/"+t;-1!==t.indexOf("/../");)t=t.replace(/\/(((?!\/).)*)\/\.\.\//,"/");return t},originUrl:function(t){if("//"===t.substring(0,2)||"http://"===t.substring(0,7)||"https://"===t.substring(0,8)||"ftp://"===t.substring(0,6)||"/"===t.substring(0,1))return t;for(t="string"==typeof e.systemInfo.origin?e.systemInfo.origin+t:e.location.origin+"/"+t;-1!==t.indexOf("/../");)t=t.replace(/\/(((?!\/).)*)\/\.\.\//,"/");return t},projectParameterTemplate:function(e){return{project_id:e,card:!0,cardInit:!1,chat:!1,showMy:!0,showHelp:!0,showUndone:!0,showCompleted:!1,completedTask:!1}},formatWebsocketMessageDetail:function(e){if($A.isJson(e))for(var t in e)e.hasOwnProperty(t)&&(e[t]=$A.formatWebsocketMessageDetail(e[t]));else $A.isArray(e)?e.forEach((function(t,n){e[n]=$A.formatWebsocketMessageDetail(t)})):"string"==typeof e&&(e=e.replace(/\{\{RemoteURL\}\}/g,this.apiUrl("../")));return e},formatTime:function(e){var t=Math.round($A.Date(e).getTime()/1e3);return($A.formatDate("Ymd")===$A.formatDate("Ymd",t)?$A.formatDate("H:i",t):$A.formatDate("Y")===$A.formatDate("Y",t)?$A.formatDate("m-d",t):$A.formatDate("Y-m-d",t))||""},formatBit:function(e){return(e=+e)>9?e:"0"+e},formatSeconds:function(e){var t,n=Math.floor(e/86400),i=Math.floor(e%86400/3600),r=Math.floor(e%86400%3600/60),a=Math.floor(e%86400%3600%60);return n>0?t=i>0?n+"d,"+this.formatBit(i)+"h":r>0?n+"d,"+this.formatBit(r)+"min":a>0?n+"d,"+this.formatBit(a)+"s":n+"d":i>0?t=this.formatBit(i)+":"+this.formatBit(r)+":"+this.formatBit(a):r>0?t=this.formatBit(r)+":"+this.formatBit(a):a>0&&(t=this.formatBit(a)+"s"),t},countDownFormat:function(e,t){var n=Math.round(this.Date(e).getTime()/1e3)-t;return n<604800&&n>0?this.formatSeconds(n):n<=0?"-"+this.formatSeconds(-1*n):this.formatTime(e)},getData:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new Date,i=n.getDay(),r=n.getDate(),a=n.getMonth(),o=n.getYear();o+=o<2e3?1900:0;var s=new Date;s.setDate(1),s.setMonth(s.getMonth()-1);var l=s.getMonth(),u=function(){var e=0;return a<3&&(e=0),28&&(e=9),e},c=function(e){var t=new Date(o,e,1);return(new Date(o,e+1,1)-t)/864e5},d=n.getTime();switch(e){case"今天":d=n;break;case"昨天":d=n-864e5;break;case"前天":d=n-1728e5;break;case"本周":d=new Date(o,a,r-i);break;case"本周结束":d=new Date(o,a,r+(6-i));break;case"上周":d=new Date(o,a,r-i-7);break;case"上周结束":d=new Date(o,a,r-i-1);break;case"本周2":d=new Date(o,a,r-i+1);break;case"本周结束2":d=new Date(o,a,r+(6-i)+1);break;case"上周2":d=new Date(o,a,r-i-7+1);break;case"上周结束2":d=new Date(o,a,r-i-1+1);break;case"本月":d=new Date(o,a,1);break;case"本月结束":d=new Date(o,a,c(a));break;case"上个月":d=new Date(o,l,1);break;case"上个月结束":d=new Date(o,l,c(l));break;case"本季度":d=new Date(o,u(),1);break;case"本季度结束":var h=u()+2;d=new Date(o,h,c(h))}return!0===t?d:$A.formatDate("Y-m-d",parseInt(d/1e3))},timeOptionShortcuts:function(){var e=function(e){return $A.Date($A.formatDate("Y-m-d 23:59:29",Math.round(e/1e3)))};return[{text:$A.L("今天"),value:function(){return[new Date,e((new Date).getTime())]}},{text:$A.L("明天"),value:function(){var t=new Date;return t.setDate(t.getDate()+1),[new Date,e(t.getTime())]}},{text:$A.L("本周"),value:function(){return[$A.getData("今天",!0),e($A.getData("本周结束2",!0))]}},{text:$A.L("本月"),value:function(){return[$A.getData("今天",!0),e($A.getData("本月结束",!0))]}},{text:$A.L("3天"),value:function(){var t=new Date;return t.setDate(t.getDate()+2),[new Date,e(t.getTime())]}},{text:$A.L("5天"),value:function(){var t=new Date;return t.setDate(t.getDate()+4),[new Date,e(t.getTime())]}},{text:$A.L("7天"),value:function(){var t=new Date;return t.setDate(t.getDate()+6),[new Date,e(t.getTime())]}}]}}),t.extend({spinnerShow:function(){if($A.spinnerLoadNum++,$A.spinnerLoadNum>0){var e=document.getElementById("common-spinner");e&&(e.style.display="block")}},spinnerHide:function(){if($A.spinnerLoadNum--,$A.spinnerLoadNum<=0){var e=document.getElementById("common-spinner");e&&(e.style.display="none")}},spinnerLoadNum:0,modalConfig:function(e){return void 0===e?e={content:"Undefined"}:"string"==typeof e&&(e={content:e}),e.title=$A.L(e.title||(void 0===e.render?"温馨提示":"")),e.content=$A.L(e.content||""),e.okText=$A.L(e.okText||"确定"),e.cancelText=$A.L(e.cancelText||"取消"),e},modalInput:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t>0)setTimeout((function(){$A.modalInput(e)}),t);else{"string"==typeof e&&(e={title:e});var n="modalInput_"+$A.randomString(6);$A.Modal.confirm({render:function(t){return t("div",[t("div",{style:{fontSize:"16px",fontWeight:"500",marginBottom:"20px"}},$A.L(e.title)),t("Input",{props:{value:e.value,placeholder:$A.L(e.placeholder),elementId:n},on:{input:function(t){e.value=t}}})])},onOk:function(){"function"==typeof e.onOk?!0===e.onOk(e.value,(function(){$A.Modal.remove()}))&&$A.Modal.remove():$A.Modal.remove()},onCancel:function(){"function"==typeof e.onCancel&&e.onCancel()},loading:!0,okText:$A.L(e.okText||"确定"),cancelText:$A.L(e.cancelText||"取消")}),setTimeout((function(){document.getElementById(n)&&document.getElementById(n).focus()}))}},modalConfirm:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;!1!==e&&(t>0?setTimeout((function(){$A.modalConfirm(e)}),t):$A.Modal.confirm($A.modalConfig(e)))},modalSuccess:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;!1!==e&&(t>0?setTimeout((function(){$A.modalSuccess(e)}),t):$A.Modal.success($A.modalConfig(e)))},modalInfo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;!1!==e&&(t>0?setTimeout((function(){$A.modalInfo(e)}),t):$A.Modal.info($A.modalConfig(e)))},modalWarning:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;!1!==e&&(t>0?setTimeout((function(){$A.modalWarning(e)}),t):$A.Modal.warning($A.modalConfig(e)))},modalError:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;!1!==e&&(t>0?setTimeout((function(){$A.modalError(e)}),t):$A.Modal.error($A.modalConfig(e)))},modalAlert:function(e){!1!==e&&alert($A.L(e))},messageSuccess:function(e){$A.Message.success($A.L(e))},messageWarning:function(e){$A.Message.warning($A.L(e))},messageError:function(e){$A.Message.error($A.L(e))},noticeConfig:function(e){return void 0===e?e={desc:"Undefined"}:"string"==typeof e&&(e={desc:e}),e.title=$A.L(e.title||(void 0===e.render?"温馨提示":"")),e.desc=$A.L(e.desc||""),e},noticeSuccess:function(e){$A.Notice.success($A.noticeConfig(e))},noticeWarning:function(e){$A.Notice.warning($A.noticeConfig(e))},noticeError:function(e){"string"==typeof e&&(e={desc:e,duration:6}),$A.Notice.error($A.noticeConfig(e))}}),t.extend({dark:{utils:{filter:"-webkit-filter: url(#dark-mode-filter) !important; filter: url(#dark-mode-filter) !important;",reverseFilter:"-webkit-filter: url(#dark-mode-reverse-filter) !important; filter: url(#dark-mode-reverse-filter) !important;",noneFilter:"-webkit-filter: none !important; filter: none !important;",addExtraStyle:function(){try{return""}catch(e){return""}},addStyle:function(e,t,n){t=t||"style";var i=document;if(!i.getElementById(e)){var r=i.createElement(t);r.rel="stylesheet",r.id=e,"style"===t?r.innerHTML=n:r.href=n,document.head.appendChild(r)}},getClassList:function(e){return e.classList||[]},addClass:function(e,t){return this.getClassList(e).add(t),this},removeClass:function(e,t){return this.getClassList(e).remove(t),this},hasClass:function(e,t){return this.getClassList(e).contains(t)},hasElementById:function(e){return document.getElementById(e)},removeElementById:function(e){var t=document.getElementById(e);t&&t.parentNode.removeChild(t)}},createDarkFilter:function(){if(!this.utils.hasElementById("dark-mode-svg")){var e=document.createElementNS("http://www.w3.org/1999/xhtml","div");e.innerHTML='';for(var t=document.createDocumentFragment();e.firstChild;)t.appendChild(e.firstChild);document.head.appendChild(t)}},createDarkStyle:function(){this.utils.addStyle("dark-mode-style","style","\n @media screen {\n html {\n ".concat(this.utils.filter,'\n }\n\n /* Default Reverse rule */\n img,\n video,\n iframe,\n canvas,\n :not(object):not(body) > embed,\n object,\n svg image,\n [style*="background:url"],\n [style*="background-image:url"],\n [style*="background: url"],\n [style*="background-image: url"],\n [background],\n twitterwidget,\n .sr-reader,\n .no-dark-mode,\n .no-dark-mode-before:before,\n .sr-backdrop {\n ').concat(this.utils.reverseFilter,'\n }\n\n [style*="background:url"] *,\n [style*="background-image:url"] *,\n [style*="background: url"] *,\n [style*="background-image: url"] *,\n input,\n [background] *,\n twitterwidget .NaturalImage-image {\n ').concat(this.utils.noneFilter,"\n }\n\n /* Text contrast */\n html {\n text-shadow: 0 0 0 !important;\n }\n\n /* Full screen */\n .no-filter,\n :-webkit-full-screen,\n :-webkit-full-screen *,\n :-moz-full-screen,\n :-moz-full-screen *,\n :fullscreen,\n :fullscreen * {\n ").concat(this.utils.noneFilter,"\n }\n\n /* Page background */\n html {\n background: #fff !important;\n }\n ").concat(this.utils.addExtraStyle(),"\n }\n\n @media print {\n .no-print {\n display: none !important;\n }\n }"))},enableDarkMode:function(){this.isDarkEnabled()||(this.createDarkFilter(),this.createDarkStyle(),this.utils.addClass(document.body,"dark-mode-reverse"))},disableDarkMode:function(){this.isDarkEnabled()&&(this.utils.removeElementById("dark-mode-svg"),this.utils.removeElementById("dark-mode-style"),this.utils.removeClass(document.body,"dark-mode-reverse"))},autoDarkMode:function(){e.matchMedia&&e.matchMedia("(prefers-color-scheme: dark)").matches?this.enableDarkMode():this.disableDarkMode()},isDarkEnabled:function(){return this.utils.hasClass(document.body,"dark-mode-reverse")}}}),e.$A=t}(window)},31108:(e,t)=>{t.Z=[]},33301:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var i={windowWidth:window.innerWidth,windowMax768:window.innerWidth<=768,cacheLoading:{},cacheDrawerIndex:0,cacheDrawerOverlay:[],cacheUserActive:{},cacheUserWait:[],cacheUserBasic:$A.getStorageArray("cacheUserBasic"),cacheDialogs:$A.getStorageArray("cacheDialogs"),cacheProjects:$A.getStorageArray("cacheProjects"),cacheColumns:$A.getStorageArray("cacheColumns"),cacheTasks:$A.getStorageArray("cacheTasks"),cacheProjectParameter:$A.getStorageArray("cacheProjectParameter"),cacheServerUrl:$A.getStorageString("cacheServerUrl"),ajaxWsReady:!1,ajaxWsListener:[],ws:null,wsMsg:{},wsCall:{},wsTimeout:null,wsOpenNum:0,wsListener:{},wsReadTimeout:null,wsReadWaitList:[],userInfo:$A.getStorageJson("userInfo"),userId:0,userToken:"",userIsAdmin:!1,userOnline:{},dialogMsgs:[],dialogOpenId:0,files:[],fileContent:{},projectId:0,projectTotal:0,projectLoad:0,taskId:0,taskCompleteTemps:[],taskContents:[],taskFiles:[],taskLogs:[],taskLoading:[],taskFlows:[],taskFlowItems:[],taskPriority:[],columnColorList:[{name:"默认",color:""},{name:"灰色",color:"#444444"},{name:"棕色",color:"#947364"},{name:"橘色",color:"#faaa6c"},{name:"黄色",color:"#f2d86d"},{name:"绿色",color:"#73b45c"},{name:"蓝色",color:"#51abea"},{name:"紫色",color:"#b583e3"},{name:"粉色",color:"#ff819c"},{name:"红色",color:"#ff7070"}],taskColorList:[{name:"默认",color:""},{name:"黄色",color:"#fffae6"},{name:"蓝色",color:"#e5f5ff"},{name:"绿色",color:"#ecffe5"},{name:"粉色",color:"#ffeaee"},{name:"紫色",color:"#f6ecff"},{name:"灰色",color:"#f3f3f3"}],themeMode:$A.getStorageString("cacheThemeMode","auto"),themeList:[{name:"跟随系统",value:"auto"},{name:"明亮",value:"light"},{name:"暗黑",value:"dark"}],themeIsDark:!1};switch(i.userInfo.userid&&(i.userId=i.userInfo.userid=$A.runNum(i.userInfo.userid),i.userToken=i.userInfo.token,i.userIsAdmin=$A.inArray("admin",i.userInfo.identity)),i.cacheServerUrl&&(window.systemInfo.apiUrl=i.cacheServerUrl),i.themeMode){case"dark":$A.dark.enableDarkMode();break;case"light":$A.dark.disableDarkMode();break;default:$A.dark.autoDarkMode()}i.themeIsDark=$A.dark.isDarkEnabled();const r=i},52945:(e,t,n)=>{e.exports={default:n(56981),__esModule:!0}},93516:(e,t,n)=>{e.exports={default:n(80025),__esModule:!0}},64275:(e,t,n)=>{e.exports={default:n(52392),__esModule:!0}},88239:(e,t,n)=>{"use strict";var i,r=n(52945),a=(i=r)&&i.__esModule?i:{default:i};t.Z=a.default||function(e){for(var t=1;t{"use strict";var i=o(n(64275)),r=o(n(93516)),a="function"==typeof r.default&&"symbol"==typeof i.default?function(e){return typeof e}:function(e){return e&&"function"==typeof r.default&&e.constructor===r.default&&e!==r.default.prototype?"symbol":typeof e};function o(e){return e&&e.__esModule?e:{default:e}}t.Z="function"==typeof r.default&&"symbol"===a(i.default)?function(e){return void 0===e?"undefined":a(e)}:function(e){return e&&"function"==typeof r.default&&e.constructor===r.default&&e!==r.default.prototype?"symbol":void 0===e?"undefined":a(e)}},56981:(e,t,n)=>{n(72699),e.exports=n(34579).Object.assign},80025:(e,t,n)=>{n(46840),n(94058),n(8174),n(36461),e.exports=n(34579).Symbol},52392:(e,t,n)=>{n(91867),n(73871),e.exports=n(25103).f("iterator")},85663:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},79003:e=>{e.exports=function(){}},12159:(e,t,n)=>{var i=n(36727);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},57428:(e,t,n)=>{var i=n(7932),r=n(78728),a=n(16531);e.exports=function(e){return function(t,n,o){var s,l=i(t),u=r(l.length),c=a(o,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}}},32894:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},34579:e=>{var t=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=t)},19216:(e,t,n)=>{var i=n(85663);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},8333:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},89666:(e,t,n)=>{e.exports=!n(7929)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},97467:(e,t,n)=>{var i=n(36727),r=n(33938).document,a=i(r)&&i(r.createElement);e.exports=function(e){return a?r.createElement(e):{}}},73338:e=>{e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},70337:(e,t,n)=>{var i=n(46162),r=n(48195),a=n(86274);e.exports=function(e){var t=i(e),n=r.f;if(n)for(var o,s=n(e),l=a.f,u=0;s.length>u;)l.call(e,o=s[u++])&&t.push(o);return t}},83856:(e,t,n)=>{var i=n(33938),r=n(34579),a=n(19216),o=n(41818),s=n(27069),l=function(e,t,n){var u,c,d,h=e&l.F,f=e&l.G,p=e&l.S,m=e&l.P,v=e&l.B,g=e&l.W,b=f?r:r[t]||(r[t]={}),y=b.prototype,w=f?i:p?i[t]:(i[t]||{}).prototype;for(u in f&&(n=t),n)(c=!h&&w&&void 0!==w[u])&&s(b,u)||(d=c?w[u]:n[u],b[u]=f&&"function"!=typeof w[u]?n[u]:v&&c?a(d,i):g&&w[u]==d?function(e){var t=function(t,n,i){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(d):m&&"function"==typeof d?a(Function.call,d):d,m&&((b.virtual||(b.virtual={}))[u]=d,e&l.R&&y&&!y[u]&&o(y,u,d)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},7929:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},33938:e=>{var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},27069:e=>{var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},41818:(e,t,n)=>{var i=n(4743),r=n(83101);e.exports=n(89666)?function(e,t,n){return i.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},54881:(e,t,n)=>{var i=n(33938).document;e.exports=i&&i.documentElement},33758:(e,t,n)=>{e.exports=!n(89666)&&!n(7929)((function(){return 7!=Object.defineProperty(n(97467)("div"),"a",{get:function(){return 7}}).a}))},50799:(e,t,n)=>{var i=n(32894);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},71421:(e,t,n)=>{var i=n(32894);e.exports=Array.isArray||function(e){return"Array"==i(e)}},36727:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},33945:(e,t,n)=>{"use strict";var i=n(98989),r=n(83101),a=n(25378),o={};n(41818)(o,n(22939)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=i(o,{next:r(1,n)}),a(e,t+" Iterator")}},45700:(e,t,n)=>{"use strict";var i=n(16227),r=n(83856),a=n(57470),o=n(41818),s=n(15449),l=n(33945),u=n(25378),c=n(95089),d=n(22939)("iterator"),h=!([].keys&&"next"in[].keys()),f="keys",p="values",m=function(){return this};e.exports=function(e,t,n,v,g,b,y){l(n,t,v);var w,_,x,C=function(e){if(!h&&e in T)return T[e];switch(e){case f:case p:return function(){return new n(this,e)}}return function(){return new n(this,e)}},k=t+" Iterator",S=g==p,O=!1,T=e.prototype,D=T[d]||T["@@iterator"]||g&&T[g],E=D||C(g),$=g?S?C("entries"):E:void 0,M="Array"==t&&T.entries||D;if(M&&(x=c(M.call(new e)))!==Object.prototype&&x.next&&(u(x,k,!0),i||"function"==typeof x[d]||o(x,d,m)),S&&D&&D.name!==p&&(O=!0,E=function(){return D.call(this)}),i&&!y||!h&&!O&&T[d]||o(T,d,E),s[t]=E,s[k]=m,g)if(w={values:S?E:C(p),keys:b?E:C(f),entries:$},y)for(_ in w)_ in T||a(T,_,w[_]);else r(r.P+r.F*(h||O),t,w);return w}},85084:e=>{e.exports=function(e,t){return{value:t,done:!!e}}},15449:e=>{e.exports={}},16227:e=>{e.exports=!0},77177:(e,t,n)=>{var i=n(65730)("meta"),r=n(36727),a=n(27069),o=n(4743).f,s=0,l=Object.isExtensible||function(){return!0},u=!n(7929)((function(){return l(Object.preventExtensions({}))})),c=function(e){o(e,i,{value:{i:"O"+ ++s,w:{}}})},d=e.exports={KEY:i,NEED:!1,fastKey:function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,i)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[i].i},getWeak:function(e,t){if(!a(e,i)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[i].w},onFreeze:function(e){return u&&d.NEED&&l(e)&&!a(e,i)&&c(e),e}}},88082:(e,t,n)=>{"use strict";var i=n(89666),r=n(46162),a=n(48195),o=n(86274),s=n(66530),l=n(50799),u=Object.assign;e.exports=!u||n(7929)((function(){var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=i}))?function(e,t){for(var n=s(e),u=arguments.length,c=1,d=a.f,h=o.f;u>c;)for(var f,p=l(arguments[c++]),m=d?r(p).concat(d(p)):r(p),v=m.length,g=0;v>g;)f=m[g++],i&&!h.call(p,f)||(n[f]=p[f]);return n}:u},98989:(e,t,n)=>{var i=n(12159),r=n(57856),a=n(73338),o=n(58989)("IE_PROTO"),s=function(){},l=function(){var e,t=n(97467)("iframe"),i=a.length;for(t.style.display="none",n(54881).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("
    '},oD=function(t,e){var n,r,o,i,a=t.translate("Rich Text Area"),s=(n=t.id,r=a,e.height,o=function(t){return t.getParam("iframe_attrs",{})}(t),i=Ae.fromTag("iframe"),tr(i,o),tr(i,{id:n+"_ifr",frameBorder:"0",allowTransparency:"true",title:r}),Ps(i,"tox-edit-area__iframe"),i).dom;s.onload=function(){s.onload=null,t.fire("load")};var u=function(t,e){if(document.domain!==window.location.hostname&&ke.browser.isIE()){var n=Py("mce");t[n]=function(){eD(t)};var r='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return nD.setAttrib(e,"src",r),!0}return!1}(t,s);return t.contentAreaContainer=e.iframeContainer,t.iframeElement=s,t.iframeHTML=rD(t),nD.add(e.iframeContainer,s),u},iD=gs.DOM,aD=function(t,e,n){var r=Cy.get(n),o=Cy.urls[n]||t.documentBaseUrl.replace(/\/$/,"");if(n=Ee.trim(n),r&&-1===Ee.inArray(e,n)){if(Ee.each(Cy.dependencies(n),(function(n){aD(t,e,n)})),t.plugins[n])return;try{var i=new r(t,o,t.$);t.plugins[n]=i,i.init&&(i.init(t,o),e.push(n))}catch(e){!function(t,e,n){var r=Ds.translate(["Failed to initialize plugin: {0}",e]);ef(t,"PluginLoadError",{message:r}),Ey(r,n),xy(t,r)}(t,n,e)}}},sD=function(t){return t.replace(/^\-/,"")},uD=function(t){return{editorContainer:t,iframeContainer:t,api:{}}},cD=function(t){var e=t.getElement();return t.inline?uD(null):function(t){var e=iD.create("div");return iD.insertAfter(e,t),uD(e)}(e)},lD=function(t){var e=t.getElement();return t.orgDisplay=e.style.display,f(bc(t))?function(t){return t.theme.renderUI()}(t):C(bc(t))?function(t){var e=t.getElement(),n=bc(t)(t,e);return n.editorContainer.nodeType&&(n.editorContainer.id=n.editorContainer.id||t.id+"_parent"),n.iframeContainer&&n.iframeContainer.nodeType&&(n.iframeContainer.id=n.iframeContainer.id||t.id+"_iframecontainer"),n.height=n.iframeHeight?n.iframeHeight:e.offsetHeight,n}(t):cD(t)},dD=function(t){t.fire("ScriptsLoaded"),function(t){var e=Ee.trim(ac(t)),n=t.ui.registry.getAll().icons,r=At(At({},ly.get("default").icons),ly.get(e).icons);ft(r,(function(e,r){Ct(n,r)||t.ui.registry.addIcon(r,e)}))}(t),function(t){var e=bc(t);if(f(e)){t.settings.theme=sD(e);var n=wy.get(e);t.theme=new n(t,wy.urls[e]),t.theme.init&&t.theme.init(t,wy.urls[e]||t.documentBaseUrl.replace(/\/$/,""),t.$)}else t.theme={}}(t),function(t){var e=[];Ee.each(_c(t).split(/[ ,]/),(function(n){aD(t,e,sD(n))}))}(t);var e=lD(t);!function(t,e){var n={show:B.from(e.show).getOr(_),hide:B.from(e.hide).getOr(_),disable:B.from(e.disable).getOr(_),isDisabled:B.from(e.isDisabled).getOr(N),enable:function(){t.mode.isReadOnly()||B.from(e.enable).map(L)}};t.ui=At(At({},t.ui),n)}(t,B.from(e.api).getOr({}));var n={editorContainer:e.editorContainer,iframeContainer:e.iframeContainer};return t.editorContainer=n.editorContainer?n.editorContainer:null,Ly(t),t.inline?eD(t):function(t,e){var n=oD(t,e);e.editorContainer&&(nD.get(e.editorContainer).style.display=t.orgDisplay,t.hidden=nD.isHidden(e.editorContainer)),t.getElement().style.display="none",nD.setAttrib(t.id,"aria-hidden","true"),n||eD(t)}(t,n)},fD=gs.DOM,mD=function(t){return"-"===t.charAt(0)},pD=function(t,e){var n=mc(e),r=function(t){return t.getParam("language_url","","string")}(e);if(!1===Ds.hasCode(n)&&"en"!==n){var o=""!==r?r:e.editorManager.baseURL+"/langs/"+n+".js";t.add(o,_,void 0,(function(){!function(t,e,n){Dy(t,"LanguageLoadError",Sy("language",e,n))}(e,o,n)}))}},hD=function(t,e,n){return B.from(e).filter((function(t){return t.length>0&&!ly.has(t)})).map((function(e){return{url:t.editorManager.baseURL+"/icons/"+e+"/icons"+n+".js",name:B.some(e)}}))},gD=function(t,e,n){var r=hD(e,"default",n),o=function(t){return B.from(function(t){return t.getParam("icons_url","","string")}(t)).filter((function(t){return t.length>0})).map((function(t){return{url:t,name:B.none()}}))}(e).orThunk((function(){return hD(e,ac(e),"")}));W(function(t){for(var e=[],n=function(t){e.push(t)},r=0;r=1&&n<=7){var r=function(t){return Ee.explode(t.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))}(t),o=function(t){return Ee.explode(t.getParam("font_size_classes",""))}(t);return o?o[n-1]||e:r[n-1]||e}return e}return e},OD=function(t){var e=t.split(/\s*,\s*/);return V(e,(function(t){return-1===t.indexOf(" ")||Mt(t,'"')||Mt(t,"'")?t:"'"+t+"'"})).join(",")},AD=function(t,e){var n=function(t){if("string"!=typeof t){var e=Ee.extend({paste:t.paste,data:{paste:t.paste}},t);return{content:t.content,details:e}}return{content:t,details:{}}}(e);!function(t,e,n){Qv(t).editor.insertContent(e,n)}(t,n.content,n.details)},LD=Ee.each,ND=Ee.map,$D=Ee.inArray,PD=function(){function t(t){this.commands={state:{},exec:{},value:{}},this.editor=t,this.setupCommands(t)}return t.prototype.execCommand=function(t,e,n,r){var o,i=!1,a=this;if(!a.editor.removed){var s;if("mcefocus"!==t.toLowerCase()&&(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)||r&&r.skip_focus?(s=a.editor,um(s).each((function(t){return s.selection.setRng(t)}))):a.editor.focus()),(r=a.editor.fire("BeforeExecCommand",{command:t,ui:e,value:n})).isDefaultPrevented())return!1;var u=t.toLowerCase();if(o=a.commands.exec[u])return o(u,e,n),a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0;if(LD(this.editor.plugins,(function(r){if(r.execCommand&&r.execCommand(t,e,n))return a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),i=!0,!1})),i)return i;if(a.editor.theme&&a.editor.theme.execCommand&&a.editor.theme.execCommand(t,e,n))return a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0;try{i=a.editor.getDoc().execCommand(t,e,n)}catch(t){}return!!i&&(a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0)}},t.prototype.queryCommandState=function(t){var e;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(t=t.toLowerCase(),e=this.commands.state[t])return e(t);try{return this.editor.getDoc().queryCommandState(t)}catch(t){}return!1}},t.prototype.queryCommandValue=function(t){var e;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(t=t.toLowerCase(),e=this.commands.value[t])return e(t);try{return this.editor.getDoc().queryCommandValue(t)}catch(t){}}},t.prototype.addCommands=function(t,e){void 0===e&&(e="exec");var n=this;LD(t,(function(t,r){LD(r.toLowerCase().split(","),(function(r){n.commands[e][r]=t}))}))},t.prototype.addCommand=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.exec[t]=function(t,o,i,a){return e.call(n||r.editor,o,i,a)}},t.prototype.queryCommandSupported=function(t){if(t=t.toLowerCase(),this.commands.exec[t])return!0;try{return this.editor.getDoc().queryCommandSupported(t)}catch(t){}return!1},t.prototype.addQueryStateHandler=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.state[t]=function(){return e.call(n||r.editor)}},t.prototype.addQueryValueHandler=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.value[t]=function(){return e.call(n||r.editor)}},t.prototype.hasCustomCommand=function(t){return t=t.toLowerCase(),!!this.commands.exec[t]},t.prototype.execNativeCommand=function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=null),this.editor.getDoc().execCommand(t,e,n)},t.prototype.isFormatMatch=function(t){return this.editor.formatter.match(t)},t.prototype.toggleFormat=function(t,e){this.editor.formatter.toggle(t,e),this.editor.nodeChanged()},t.prototype.storeSelection=function(t){this.selectionBookmark=this.editor.selection.getBookmark(t)},t.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},t.prototype.setupCommands=function(t){var e=this;this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":_,"mceEndUndoLevel,mceAddUndoLevel":function(){t.undoManager.add()},mceFocus:function(e,n,r){km(t,r)},"Cut,Copy,Paste":function(n){var r,o=t.getDoc();try{e.execNativeCommand(n)}catch(t){r=!0}if("paste"!==n||o.queryCommandEnabled(n)||(r=!0),r||!o.queryCommandSupported(n)){var i=t.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");ke.mac&&(i=i.replace(/Ctrl\+/g,"⌘+")),t.notificationManager.open({text:i,type:"error"})}},unlink:function(){if(t.selection.isCollapsed()){var e=t.dom.getParent(t.selection.getStart(),"a");e&&t.dom.remove(e,!0)}else t.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(n){var r=n.substring(7);"full"===r&&(r="justify"),LD("left,center,right,justify".split(","),(function(e){r!==e&&t.formatter.remove("align"+e)})),"none"!==r&&e.toggleFormat("align"+r)},"InsertUnorderedList,InsertOrderedList":function(n){var r;e.execNativeCommand(n);var o=t.dom.getParent(t.selection.getNode(),"ol,ul");o&&(r=o.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(r.nodeName)&&(e.storeSelection(),t.dom.split(r,o),e.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(t){e.toggleFormat(t)},"ForeColor,HiliteColor":function(t,n,r){e.toggleFormat(t,{value:r})},FontName:function(e,n,r){!function(t,e){var n=ED(t,e);t.formatter.toggle("fontname",{value:OD(n)}),t.nodeChanged()}(t,r)},FontSize:function(e,n,r){!function(t,e){t.formatter.toggle("fontsize",{value:ED(t,e)}),t.nodeChanged()}(t,r)},LineHeight:function(e,n,r){!function(t,e){t.formatter.toggle("lineheight",{value:String(e)}),t.nodeChanged()}(t,r)},Lang:function(t,n,r){e.toggleFormat(t,{value:r.code,customValue:r.customCode})},RemoveFormat:function(e){t.formatter.remove(e)},mceBlockQuote:function(){e.toggleFormat("blockquote")},FormatBlock:function(t,n,r){return e.toggleFormat(r||"p")},mceCleanup:function(){var e=t.selection.getBookmark();t.setContent(t.getContent()),t.selection.moveToBookmark(e)},mceRemoveNode:function(n,r,o){var i=o||t.selection.getNode();i!==t.getBody()&&(e.storeSelection(),t.dom.remove(i,!0),e.restoreSelection())},mceSelectNodeDepth:function(e,n,r){var o=0;t.dom.getParent(t.selection.getNode(),(function(e){if(1===e.nodeType&&o++===r)return t.selection.select(e),!1}),t.getBody())},mceSelectNode:function(e,n,r){t.selection.select(r)},mceInsertContent:function(e,n,r){AD(t,r)},mceInsertRawHTML:function(e,n,r){t.selection.setContent("tiny_mce_marker");var o=t.getContent();t.setContent(o.replace(/tiny_mce_marker/g,(function(){return r})))},mceInsertNewLine:function(e,n,r){ux(t,r)},mceToggleFormat:function(t,n,r){e.toggleFormat(r)},mceSetContent:function(e,n,r){t.setContent(r)},"Indent,Outdent":function(e){L_(t,e)},mceRepaint:_,InsertHorizontalRule:function(){t.execCommand("mceInsertContent",!1,"
    ")},mceToggleVisualAid:function(){t.hasVisual=!t.hasVisual,t.addVisual()},mceReplaceContent:function(e,n,r){t.execCommand("mceInsertContent",!1,r.replace(/\{\$selection\}/g,t.selection.getContent({format:"text"})))},mceInsertLink:function(e,n,r){"string"==typeof r&&(r={href:r});var o=t.dom.getParent(t.selection.getNode(),"a");r.href=r.href.replace(/ /g,"%20"),o&&r.href||t.formatter.remove("link"),r.href&&t.formatter.apply("link",r,o)},selectAll:function(){var e=t.dom.getParent(t.selection.getStart(),Wn);if(e){var n=t.dom.createRng();n.selectNodeContents(e),t.selection.setRng(n)}},mceNewDocument:function(){t.setContent("")},InsertLineBreak:function(e,n,r){return Xk(t,r),!0}});var n=function(e){return function(){var n=t.selection,r=n.isCollapsed()?[t.dom.getParent(n.getNode(),t.dom.isBlock)]:n.getSelectedBlocks(),o=ND(r,(function(n){return!!t.formatter.matchNode(n,e)}));return-1!==$D(o,!0)}};e.addCommands({JustifyLeft:n("alignleft"),JustifyCenter:n("aligncenter"),JustifyRight:n("alignright"),JustifyFull:n("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(t){return e.isFormatMatch(t)},mceBlockQuote:function(){return e.isFormatMatch("blockquote")},Outdent:function(){return E_(t)},"InsertUnorderedList,InsertOrderedList":function(e){var n=t.dom.getParent(t.selection.getNode(),"ul,ol");return n&&("insertunorderedlist"===e&&"UL"===n.tagName||"insertorderedlist"===e&&"OL"===n.tagName)}},"state"),e.addCommands({Undo:function(){t.undoManager.undo()},Redo:function(){t.undoManager.redo()}}),e.addQueryValueHandler("FontName",(function(){return function(t){return TD(t,(function(e){return xD(t.getBody(),e.dom)})).getOr("")}(t)}),this),e.addQueryValueHandler("FontSize",(function(){return function(t){return TD(t,(function(e){return kD(t.getBody(),e.dom)})).getOr("")}(t)}),this),e.addQueryValueHandler("LineHeight",(function(){return function(t){return TD(t,(function(e){var n=Ae.fromDom(t.getBody()),r=fg(e,(function(t){return sr(t,"line-height")}),E(Pe,n));return r.getOrThunk((function(){var t=parseFloat(ir(e,"line-height")),n=parseFloat(ir(e,"font-size"));return String(t/n)}))})).getOr("")}(t)}),this)},t}(),ID="data-mce-contenteditable",RD=function(t,e,n){var r,o;Rs(t,e)&&!1===n?(o=e,Ls(r=t)?r.dom.classList.remove(o):$s(r,o),Is(r)):n&&Ps(t,e)},BD=function(t,e,n){try{t.getDoc().execCommand(e,!1,String(n))}catch(t){}},MD=function(t,e){t.dom.contentEditable=e?"true":"false"},jD=function(t,e){var n=Ae.fromDom(t.getBody());RD(n,"mce-content-readonly",e),e?(t.selection.controlSelection.hideResizeRect(),t._selectionOverrides.hideFakeCaret(),function(t){B.from(t.selection.getNode()).each((function(t){t.removeAttribute("data-mce-selected")}))}(t),t.readonly=!0,MD(n,!1),W(Ms(n,'*[contenteditable="true"]'),(function(t){Qn(t,ID,"true"),MD(t,!1)}))):(t.readonly=!1,MD(n,!0),function(t){W(Ms(t,'*[data-mce-contenteditable="true"]'),(function(t){rr(t,ID),MD(t,!0)}))}(n),BD(t,"StyleWithCSS",!1),BD(t,"enableInlineTableEditing",!1),BD(t,"enableObjectResizing",!1),wm(t)&&t.focus(),function(t){t.selection.setRng(t.selection.getRng())}(t),t.nodeChanged())},zD=function(t){return t.readonly},FD=function(t){t.parser.addAttributeFilter("contenteditable",(function(e){zD(t)&&W(e,(function(t){t.attr(ID,t.attr("contenteditable")),t.attr("contenteditable","false")}))})),t.serializer.addAttributeFilter(ID,(function(e){zD(t)&&W(e,(function(t){t.attr("contenteditable",t.attr(ID))}))})),t.serializer.addTempAttr(ID)},UD=function(t,e){if(function(t){return"click"===t.type}(e)&&!of.metaKeyPressed(e)){var n=Ae.fromDom(e.target);(function(t,e){return Qr(e,"a",(function(e){return Pe(e,Ae.fromDom(t.getBody()))})).bind((function(t){return nr(t,"href")}))})(t,n).each((function(n){if(e.preventDefault(),/^#/.test(n)){var r=t.dom.select(n+',[name="'+((Mt(o=n,i="#")?function(t,e){return t.substring(e)}(o,i.length):o)+'"]'));r.length&&t.selection.scrollIntoView(r[0],!0)}else window.open(n,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes");var o,i}))}},HD=Ee.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," "),VD=function(){function t(t){this.bindings={},this.settings=t||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||N}return t.isNative=function(t){return!!HD[t.toLowerCase()]},t.prototype.fire=function(t,e){var n=t.toLowerCase(),r=Pi(n,e||{},this.scope);this.settings.beforeFire&&this.settings.beforeFire(r);var o=this.bindings[n];if(o)for(var i=0,a=o.length;i"),iS);return o[o.length-1]=Ee.extend(o[o.length-1],{func:n,scope:r||this.editor}),Ee.extend(o[0],{desc:this.editor.translate(e),subpatterns:o.slice(1)})},t.prototype.hasModifier=function(t){return t.altKey||t.ctrlKey||t.metaKey},t.prototype.isFunctionKey=function(t){return"keydown"===t.type&&t.keyCode>=112&&t.keyCode<=123},t.prototype.matchShortcut=function(t,e){return!!e&&(e.ctrl===t.ctrlKey&&e.meta===t.metaKey&&(e.alt===t.altKey&&e.shift===t.shiftKey&&(!!(t.keyCode===e.keyCode||t.charCode&&t.charCode===e.charCode)&&(t.preventDefault(),!0))))},t.prototype.executeShortcutAction=function(t){return t.func?t.func.call(t.scope):null},t}(),sS=function(){var t=function(){var t={},e={},n={},r={},o={},i={},a={},s=function(t,e){return function(n,r){return t[n.toLowerCase()]=At(At({},r),{type:e})}};return{addButton:s(t,"button"),addGroupToolbarButton:s(t,"grouptoolbarbutton"),addToggleButton:s(t,"togglebutton"),addMenuButton:s(t,"menubutton"),addSplitButton:s(t,"splitbutton"),addMenuItem:s(e,"menuitem"),addNestedMenuItem:s(e,"nestedmenuitem"),addToggleMenuItem:s(e,"togglemenuitem"),addAutocompleter:s(n,"autocompleter"),addContextMenu:s(o,"contextmenu"),addContextToolbar:s(i,"contexttoolbar"),addContextForm:s(i,"contextform"),addSidebar:s(a,"sidebar"),addIcon:function(t,e){return r[t.toLowerCase()]=e},getAll:function(){return{buttons:t,menuItems:e,icons:r,popups:n,contextMenus:o,contextToolbars:i,sidebars:a}}}}();return{addAutocompleter:t.addAutocompleter,addButton:t.addButton,addContextForm:t.addContextForm,addContextMenu:t.addContextMenu,addContextToolbar:t.addContextToolbar,addIcon:t.addIcon,addMenuButton:t.addMenuButton,addMenuItem:t.addMenuItem,addNestedMenuItem:t.addNestedMenuItem,addSidebar:t.addSidebar,addSplitButton:t.addSplitButton,addToggleButton:t.addToggleButton,addGroupToolbarButton:t.addGroupToolbarButton,addToggleMenuItem:t.addToggleMenuItem,getAll:t.getAll}},uS=gs.DOM,cS=Ee.extend,lS=Ee.each,dS=Ee.resolve,fS=ke.ie,mS=function(){function t(t,e,n){var r=this;this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.editorManager=n,this.documentBaseUrl=n.documentBaseURL,cS(this,GD),this.settings=sy(this,t,this.documentBaseUrl,n.defaultSettings,e),this.settings.suffix&&(n.suffix=this.settings.suffix),this.suffix=n.suffix,this.settings.base_url&&n._setBaseUrl(this.settings.base_url),this.baseUri=n.baseURI,this.settings.referrer_policy&&(Cs.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),gs.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),Ss.languageLoad=this.settings.language_load,Ss.baseURL=n.baseURL,this.id=t,this.setDirty(!1),this.documentBaseURI=new Fm(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new aS(this),this.editorCommands=new PD(this),this.settings.cache_suffix&&(ke.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:sS(),styleSheetLoader:void 0,show:_,hide:_,enable:_,disable:_,isDisabled:N};var o=tS(this);this.mode=o,this.setMode=o.set,n.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=cs.overrideDefaults((function(){return{context:r.inline?r.getBody():r.getDoc(),element:r.getBody()}}))}return t.prototype.render=function(){bD(this)},t.prototype.focus=function(t){this.execCommand("mceFocus",!1,t)},t.prototype.hasFocus=function(){return Cm(this)},t.prototype.execCallback=function(t){for(var e=[],n=1;n0?wS[0]:null),SS.focusedEditor===t&&(SS.focusedEditor=null),e.length!==wS.length},DS="CSS1Compat"!==document.compatMode,SS=At(At({},qD),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:cs,majorVersion:"5",minorVersion:"10.2",releaseDate:"2021-11-17",editors:CS,i18n:Ds,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var t,e,n=this,r="";e=Fm.getDocumentBaseUrl(document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(e)&&(e=e.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(e)||(e+="/"));var o,i=window.tinymce||window.tinyMCEPreInit;if(i)t=i.base||i.baseURL,r=i.suffix;else{for(var a=document.getElementsByTagName("script"),s=0;s0&&gS(hS(n),(function(t){var n=pS.get(t);n?e.push(n):gS(document.forms,(function(n){gS(n.elements,(function(n){n.name===t&&(t="mce_editor_"+bS++,pS.setAttrib(n,"id",t),e.push(n))}))}))}));break;case"textareas":case"specific_textareas":gS(pS.select("textarea"),(function(n){t.editor_deselector&&i(n,t.editor_deselector)||t.editor_selector&&!i(n,t.editor_selector)||e.push(n)}))}return e}(t)),t.types?gS(t.types,(function(n){Ee.each(e,(function(e){return!pS.is(e,n.selector)||(l(o(e),vS({},t,n),e),!1)}))})):(Ee.each(e,(function(t){var e;(e=n.get(t.id))&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(xS(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null)})),0===(e=Ee.grep(e,(function(t){return!n.get(t.id)}))).length?a([]):gS(e,(function(e){!function(t,e){return t.inline&&e.tagName.toLowerCase()in r}(t,e)?l(o(e),t,e):Ey("Could not initialize inline editor on invalid inline target element",e)})))};return n.settings=t,pS.bind(window,"ready",s),new to((function(t){e?t(e):a=function(e){t(e)}}))},get:function(t){return 0===arguments.length?wS.slice(0):f(t)?J(wS,(function(e){return e.id===t})).getOr(null):w(t)&&wS[t]?wS[t]:null},add:function(t){var e=this;return CS[t.id]===t||(null===e.get(t.id)&&("length"!==t.id&&(CS[t.id]=t),CS.push(t),wS.push(t)),kS(!0),e.activeEditor=t,e.fire("AddEditor",{editor:t}),jw||(jw=function(t){var n=e.fire("BeforeUnload");if(n.returnValue)return t.preventDefault(),t.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",jw))),t},createEditor:function(t,e){return this.add(new mS(t,e,this))},remove:function(t){var e,n,r=this;if(t){if(!f(t))return n=t,h(r.get(n.id))?null:(xS(n)&&r.fire("RemoveEditor",{editor:n}),0===wS.length&&window.removeEventListener("beforeunload",jw),n.remove(),kS(wS.length>0),n);gS(pS.select(t),(function(t){(n=r.get(t.id))&&r.remove(n)}))}else for(e=wS.length-1;e>=0;e--)r.remove(wS[e])},execCommand:function(t,e,n){var r=this,o=r.get(n);switch(t){case"mceAddEditor":return r.get(n)||new mS(n,r.settings,r).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(r.execCommand("mceAddEditor",!1,n),!0)}return!!r.activeEditor&&r.activeEditor.execCommand(t,e,n)},triggerSave:function(){gS(wS,(function(t){t.save()}))},addI18n:function(t,e){Ds.add(t,e)},translate:function(t){return Ds.translate(t)},setActive:function(t){var e=this.activeEditor;this.activeEditor!==t&&(e&&e.fire("deactivate",{relatedTarget:t}),t.fire("activate",{relatedTarget:e})),this.activeEditor=t},_setBaseUrl:function(t){this.baseURL=new Fm(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new Fm(this.baseURL)}});SS.setup();var TS,ES,OS,AS,LS=Math.min,NS=Math.max,$S=Math.round,PS=function(t,e,n){var r=e.x,o=e.y,i=t.w,a=t.h,s=e.w,u=e.h,c=(n||"").split("");return"b"===c[0]&&(o+=u),"r"===c[1]&&(r+=s),"c"===c[0]&&(o+=$S(u/2)),"c"===c[1]&&(r+=$S(s/2)),"b"===c[3]&&(o-=a),"r"===c[4]&&(r-=i),"c"===c[3]&&(o-=$S(a/2)),"c"===c[4]&&(r-=$S(i/2)),IS(r,o,i,a)},IS=function(t,e,n,r){return{x:t,y:e,w:n,h:r}},RS={inflate:function(t,e,n){return IS(t.x-e,t.y-n,t.w+2*e,t.h+2*n)},relativePosition:PS,findBestRelativePosition:function(t,e,n,r){var o,i;for(i=0;i=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(t,e){var n=NS(t.x,e.x),r=NS(t.y,e.y),o=LS(t.x+t.w,e.x+e.w),i=LS(t.y+t.h,e.y+e.h);return o-n<0||i-r<0?null:IS(n,r,o-n,i-r)},clamp:function(t,e,n){var r=t.x,o=t.y,i=t.x+t.w,a=t.y+t.h,s=e.x+e.w,u=e.y+e.h,c=NS(0,e.x-r),l=NS(0,e.y-o),d=NS(0,i-s),f=NS(0,a-u);return r+=c,o+=l,n&&(i+=c,a+=l,r-=d,o-=f),IS(r,o,(i-=d)-r,(a-=f)-o)},create:IS,fromClientRect:function(t){return IS(t.left,t.top,t.width,t.height)}},BS=(TS={},ES={},{load:function(t,e){var n='Script at URL "'+e+'" failed to load',r='Script at URL "'+e+"\" did not call `tinymce.Resource.add('"+t+"', data)` within 1 second";if(void 0!==TS[t])return TS[t];var o=new to((function(o,i){var a=function(t,e,n){void 0===n&&(n=1e3);var r=!1,o=null,i=function(t){return function(){for(var e=[],n=0;n1e4?(t.success&&n<1e4&&200===e.status?t.success.call(t.success_scope,""+e.responseText,e,t):t.error&&t.error.call(t.error_scope,n>1e4?"TIMED_OUT":"GENERAL",e,t),e=null):oo.setTimeout(r,10)};if(t.scope=t.scope||this,t.success_scope=t.success_scope||t.scope,t.error_scope=t.error_scope||t.scope,t.async=!1!==t.async,t.data=t.data||"",KS.fire("beforeInitialize",{settings:t}),(e=new XMLHttpRequest).overrideMimeType&&e.overrideMimeType(t.content_type),e.open(t.type||(t.data?"POST":"GET"),t.url,t.async),t.crossDomain&&(e.withCredentials=!0),t.content_type&&e.setRequestHeader("Content-Type",t.content_type),t.requestheaders&&Ee.each(t.requestheaders,(function(t){e.setRequestHeader(t.key,t.value)})),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),(e=KS.fire("beforeSend",{xhr:e,settings:t}).xhr).send(t.data),!t.async)return r();oo.setTimeout(r,10)}}),YS=Ee.extend,XS=function(){function t(t){this.settings=YS({},t),this.count=0}return t.sendRPC=function(e){return(new t).send(e)},t.prototype.send=function(t){var e=t.error,n=t.success,r=YS(this.settings,t);r.success=function(t,o){void 0===(t=WS.parse(t))&&(t={error:"JSON Parse error."}),t.error?e.call(r.error_scope||r.scope,t.error,o):n.call(r.success_scope||r.scope,t.result)},r.error=function(t,n){e&&e.call(r.error_scope||r.scope,t,n)},r.data=WS.serialize({id:t.id||"c"+this.count++,method:t.method,params:t.params}),r.content_type="application/json",KS.send(r)},t}();try{var ZS="__storage_test__";(FS=window.localStorage).setItem(ZS,ZS),FS.removeItem(ZS)}catch(t){FS=function(){var t={},e=[],n={getItem:function(e){return t[e]||null},setItem:function(n,r){e.push(n),t[n]=String(r)},key:function(t){return e[t]},removeItem:function(n){e=e.filter((function(t){return t===n})),delete t[n]},clear:function(){e=[],t={}},length:0};return Object.defineProperty(n,"length",{get:function(){return e.length},configurable:!1,enumerable:!1}),n}()}var GS={geom:{Rect:RS},util:{Promise:to,Delay:oo,Tools:Ee,VK:of,URI:Fm,Class:zS,EventDispatcher:VD,Observable:qD,I18n:Ds,XHR:KS,JSON:WS,JSONRequest:XS,JSONP:qS,LocalStorage:FS,Color:function(t){var e={},n=0,r=0,o=0,i=function(t){var i;return"object"==typeof t?"r"in t?(n=t.r,r=t.g,o=t.b):"v"in t&&function(t,e,i){if(t=(parseInt(t,10)||0)%360,e=parseInt(e,10)/100,i=parseInt(i,10)/100,e=HS(0,US(e,1)),i=HS(0,US(i,1)),0!==e){var a=t/60,s=i*e,u=s*(1-Math.abs(a%2-1)),c=i-s;switch(Math.floor(a)){case 0:n=s,r=u,o=0;break;case 1:n=u,r=s,o=0;break;case 2:n=0,r=s,o=u;break;case 3:n=0,r=u,o=s;break;case 4:n=u,r=0,o=s;break;case 5:n=s,r=0,o=u;break;default:n=r=o=0}n=VS(255*(n+c)),r=VS(255*(r+c)),o=VS(255*(o+c))}else n=r=o=VS(255*i)}(t.h,t.s,t.v):(i=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(t))?(n=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10)):(i=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(t))?(n=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16)):(i=/#([0-F])([0-F])([0-F])/gi.exec(t))&&(n=parseInt(i[1]+i[1],16),r=parseInt(i[2]+i[2],16),o=parseInt(i[3]+i[3],16)),n=n<0?0:n>255?255:n,r=r<0?0:r>255?255:r,o=o<0?0:o>255?255:o,e};return t&&i(t),e.toRgb=function(){return{r:n,g:r,b:o}},e.toHsv=function(){return function(t,e,n){var r,o;o=0;var i=US(t/=255,US(e/=255,n/=255)),a=HS(t,HS(e,n));return i===a?{h:0,s:0,v:100*(o=i)}:(r=(a-i)/a,o=a,{h:VS(60*((t===i?3:n===i?1:5)-(t===i?e-n:n===i?t-e:n-t)/(a-i))),s:VS(100*r),v:VS(100*o)})}(n,r,o)},e.toHex=function(){var t=function(t){return(t=parseInt(t,10).toString(16)).length>1?t:"0"+t};return"#"+t(n)+t(r)+t(o)},e.parse=i,e},ImageUploader:function(t){var e=Ny(),n=By(t,e);return{upload:function(e,r){return void 0===r&&(r=!0),n.upload(e,r?Ry(t):void 0)}}}},dom:{EventUtils:zi,Sizzle:ka,DomQuery:cs,TreeWalker:so,TextSeeker:Qs,DOMUtils:gs,ScriptLoader:Cs,RangeUtils:_f,Serializer:$b,StyleSheetLoader:io,ControlSelection:sf,BookmarkManager:Jd,Selection:lb,Event:zi.Event},html:{Styles:Li,Entities:yi,Node:$m,Schema:Oi,SaxParser:qm,DomParser:Eb,Writer:Qm,Serializer:tp},Env:ke,AddOnManager:Ss,Annotator:Gd,Formatter:Wy,UndoManager:Ky,EditorCommands:PD,WindowManager:_y,NotificationManager:yy,EditorObservable:GD,Shortcuts:aS,Editor:mS,FocusManager:cm,EditorManager:SS,DOM:gs.DOM,ScriptLoader:Cs.ScriptLoader,PluginManager:Cy,ThemeManager:wy,IconManager:ly,Resource:BS,trim:Ee.trim,isArray:Ee.isArray,is:Ee.is,toArray:Ee.toArray,makeMap:Ee.makeMap,each:Ee.each,map:Ee.map,grep:Ee.grep,inArray:Ee.inArray,extend:Ee.extend,create:Ee.create,walk:Ee.walk,createNS:Ee.createNS,resolve:Ee.resolve,explode:Ee.explode,_addCacheSuffix:Ee._addCacheSuffix,isOpera:ke.opera,isWebKit:ke.webkit,isIE:ke.ie,isGecko:ke.gecko,isMac:ke.mac},JS=Ee.extend(SS,GS);!function(t){window.tinymce=t,window.tinyMCE=t}(JS),function(e){try{t.exports=e}catch(t){}}(JS)}()},47933:(t,e,n)=>{"use strict";n.d(e,{Z:()=>v});const r={name:"ResizeLine",props:{value:{},min:{type:Number,default:100},max:{type:Number,default:600},placement:{validator:function(t){return["right","bottom"].includes(t)},default:"bottom"},reverse:{type:Boolean,default:!1}},data:function(){return{resizing:!1,mouseX:0,mouseY:0,offset:{},tmpSize:void 0}},mounted:function(){document.documentElement.addEventListener("mousemove",this.handleMove,!0),document.documentElement.addEventListener("mouseup",this.handleUp,!0)},methods:{resizeDown:function(t){this.mouseX=t.pageX||t.clientX+document.documentElement.scrollLeft,this.mouseY=t.pageY||t.clientY+document.documentElement.scrollTop,this.offset={left:t.target.offsetLeft,top:t.target.offsetTop},this.resizing=!0,"number"==typeof this.value&&(this.tmpSize=this.value),this.$emit("on-change",{event:"down"})},handleMove:function(t){if(this.resizing){var e,n=(t.pageX||t.clientX+document.documentElement.scrollLeft)-this.mouseX,r=(t.pageY||t.clientY+document.documentElement.scrollTop)-this.mouseY;if("number"==typeof this.tmpSize)e="bottom"==this.placement?this.reverse?this.tmpSize-r:this.tmpSize+r:this.reverse?this.tmpSize-n:this.tmpSize+n,this.min>0&&(e=Math.max(this.min,e)),this.max>0&&(e=Math.min(this.max,e)),this.$emit("input",e);this.$emit("on-change",{event:"move",diff:{x:n,y:r},offset:this.offset})}},handleUp:function(){this.resizing=!1,this.tmpSize=void 0,this.$emit("on-change",{event:"up"})}}};var o=n(93379),i=n.n(o),a=n(26167),s={insert:"head",singleton:!1};i()(a.Z,s);a.Z.locals;var u=n(51900);const c=(0,u.Z)(r,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"component-resize-line",class:[t.resizing?"resizing":"",t.placement],on:{mousedown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button?null:(e.stopPropagation(),e.preventDefault(),t.resizeDown.apply(null,arguments))}}})}),[],!1,null,"eaab078e",null).exports;function l(t){return void 0===t&&(t=document.body),!0===t?document.body:t instanceof window.Node?t:document.querySelector(t)}const d={inserted:function(t,e,n){var r=e.value;if(t.dataset&&"true"!==t.dataset.transfer)return!1;t.className=t.className?t.className+" v-transfer-dom":"v-transfer-dom";var o=t.parentNode;if(o){var i=document.createComment(""),a=!1;!1!==r&&(o.replaceChild(i,t),l(r).appendChild(t),a=!0),t.__transferDomData||(t.__transferDomData={parentNode:o,home:i,target:l(r),hasMovedOut:a})}},componentUpdated:function(t,e){var n=e.value;if(t.dataset&&"true"!==t.dataset.transfer)return!1;var r=t.__transferDomData;if(r){var o=r.parentNode,i=r.home,a=r.hasMovedOut;!a&&n?(o.replaceChild(i,t),l(n).appendChild(t),t.__transferDomData=Object.assign({},t.__transferDomData,{hasMovedOut:!0,target:l(n)})):a&&!1===n?(o.replaceChild(t,i),t.__transferDomData=Object.assign({},t.__transferDomData,{hasMovedOut:!1,target:l(n)})):n&&l(n).appendChild(t)}},unbind:function(t){if(t.dataset&&"true"!==t.dataset.transfer)return!1;t.className=t.className.replace("v-transfer-dom",""),t.__transferDomData&&(!0===t.__transferDomData.hasMovedOut&&t.__transferDomData.parentNode&&t.__transferDomData.parentNode.appendChild(t),t.__transferDomData=null)}};var f=n(20629);function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e-1&&this.$store.state.cacheDrawerOverlay.splice(n,1)}t?this.zIndex=this.$store.state.cacheDrawerIndex++:0===this.$store.state.cacheDrawerOverlay.length&&(this.$store.state.cacheDrawerIndex=0)},size:{handler:function(t){this.dynamicSize=parseInt(t)},immediate:!0}},methods:{mask:function(){this.maskClosable&&this.close()},close:function(){this.$emit("input",!1)},escClose:function(t){if(this.value&&this.escClosable&&27===t.keyCode){if(this.$Modal.visibles().length>0)return;var e=this.$store.state.cacheDrawerOverlay;if(e.length>0)e[e.length-1].close()}}}};const v=(0,u.Z)(g,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"transfer-dom",rawName:"v-transfer-dom"}],class:["drawer-overlay",t.placement,t.value?"overlay-visible":"overlay-hide"],style:t.overlayStyle,attrs:{"data-transfer":t.transfer}},[n("div",{staticClass:"overlay-mask",on:{click:t.mask}}),t._v(" "),n("div",{staticClass:"overlay-body",style:t.bodyStyle},[n("div",{staticClass:"overlay-close"},[n("a",{attrs:{href:"javascript:void(0)"},on:{click:function(e){return e.stopPropagation(),t.close.apply(null,arguments)}}},[n("svg",{staticClass:"icon fill-current",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 26 26",fill:"none",role:"img"}},[n("path",{attrs:{d:"M8.28596 6.51819C7.7978 6.03003 7.00634 6.03003 6.51819 6.51819C6.03003 7.00634 6.03003 7.7978 6.51819 8.28596L11.2322 13L6.51819 17.714C6.03003 18.2022 6.03003 18.9937 6.51819 19.4818C7.00634 19.97 7.7978 19.97 8.28596 19.4818L13 14.7678L17.714 19.4818C18.2022 19.97 18.9937 19.97 19.4818 19.4818C19.97 18.9937 19.97 18.2022 19.4818 17.714L14.7678 13L19.4818 8.28596C19.97 7.7978 19.97 7.00634 19.4818 6.51819C18.9937 6.03003 18.2022 6.03003 17.714 6.51819L13 11.2322L8.28596 6.51819Z",fill:"currentColor"}})])])]),t._v(" "),t.resize?n("ResizeLine",{staticClass:"overlay-resize",attrs:{placement:t.placement,min:t.minSize,max:0,reverse:""},model:{value:t.dynamicSize,callback:function(e){t.dynamicSize=e},expression:"dynamicSize"}}):t._e(),t._v(" "),n("div",{staticClass:"overlay-content"},[t._t("default")],2)],1)])}),[],!1,null,null,null).exports},55305:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(20629);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e1,visible:!1,browseVisible:!1,isLoading:!1,browseList:[],browseListNext:[],imgVisible:"",defaultList:this.initItems(this.value),uploadList:[],maxNum:Math.min(Math.max($A.runNum(this.num),1),99),httpValue:"",httpType:"",maxSize:2048}},mounted:function(){var t=this;this.uploadList=this.$refs.upload.fileList,this.$emit("input",this.uploadList);var e=$A(this.$refs.browselistbox);e.scroll((function(){var n=e[0].scrollHeight;if(e[0].scrollTop+e.height()>=n&&t.browseListNext.length>0){var r=t.browseListNext;t.browseListNext=[],t.browsePictureFor(r)}}))},watch:{value:function(t){"string"!=typeof t?t!==this.$refs.upload.fileList&&(this.$refs.upload.fileList=this.initItems(t),this.uploadList=this.$refs.upload.fileList):this.$emit("input",this.initItems(t))},browseVisible:function(){this.httpType="",this.httpValue=""}},computed:a(a({},(0,r.rn)(["userToken"])),{},{uploadHeaders:function(){return{fd:$A.getStorageString("userWsFd"),token:this.userToken}},uploadParams:function(){return Object.keys(this.otherParams).length>0?Object.assign(this.params,this.otherParams):this.params}}),methods:{handleCallback:function(t){"callback"===this.type&&(!0===t?(this.$emit("on-callback",this.uploadList),this.$refs.upload.fileList=[],this.uploadList=this.$refs.upload.fileList):"object"===o(t)&&this.$emit("on-callback",[t])),this.browseVisible=!1},initItems:function(t){"string"==typeof t&&(t=[{url:t}]);var e=[];return $A.each(t,(function(t,n){"string"==typeof n&&(n={url:n}),n.url&&(n.active=!0,n.status="finished",void 0===n.path&&(n.path=n.url),void 0===n.thumb&&(n.thumb=n.url),e.push(n))})),e},handleView:function(t){this.visible=!0,this.imgVisible=t.url},handleRemove:function(t){var e=this.$refs.upload.fileList;this.$refs.upload.fileList.splice(e.indexOf(t),1),this.$emit("input",this.$refs.upload.fileList)},handleProgress:function(){this.$emit("update:uploadIng",this.uploadIng+1)},handleSuccess:function(t,e){this.$emit("update:uploadIng",this.uploadIng-1),1===t.ret?(e.url=t.data.url,e.path=t.data.path,e.thumb=t.data.thumb,this.handleCallback(e)):($A.noticeWarning({title:this.$L("上传失败"),desc:this.$L("文件 "+e.name+" 上传失败 "+t.msg)}),this.$refs.upload.fileList.pop()),this.$emit("input",this.$refs.upload.fileList)},handleError:function(){this.$emit("update:uploadIng",this.uploadIng-1)},handleFormatError:function(t){$A.noticeWarning({title:this.$L("文件格式不正确"),desc:this.$L("文件 "+t.name+" 格式不正确,请上传 jpg、jpeg、gif、png 格式的图片。")})},handleMaxSize:function(t){$A.noticeWarning({title:this.$L("超出文件大小限制"),desc:this.$L("文件 "+t.name+" 太大,不能超过:"+$A.bytesToSize(1024*this.maxSize))})},handleBeforeUpload:function(){var t=this.uploadList.length{"use strict";n.d(e,{Z:()=>o});const r={name:"ScrollerY",props:{static:{type:Boolean,default:!1},autoBottom:{type:Boolean,default:!1},autoRecovery:{type:Boolean,default:!0},autoRecoveryAnimate:{type:Boolean,default:!1}},data:function(){return{scrollY:0,scrollDiff:0,autoInterval:null}},mounted:function(){this.openInterval(),this.$nextTick(this.initScroll)},activated:function(){this.openInterval(),this.recoveryScroll()},destroyed:function(){this.closeInterval()},deactivated:function(){this.closeInterval()},methods:{initScroll:function(){var t=this;this.autoToBottom();var e="function"==typeof this.$listeners["on-scroll"],n=$A(this.$refs.scrollerView);n.scroll((function(){var r=Math.round(n.innerHeight()),o=n.scrollTop(),i=t.$refs.scrollerView.scrollHeight;if(t.scrollY=o,e){var a="static",s="static";t.scrollDiff-o>50?(t.scrollDiff=o,a="down"):t.scrollDiff-o<-100&&(t.scrollDiff=o,a="up"),t.scrollDiff-o>1?(t.scrollDiff=o,s="down"):t.scrollDiff-o<-1&&(t.scrollDiff=o,s="up"),t.$emit("on-scroll",{scale:o/(i-r),scrollY:o,scrollE:i-r-o,direction:a,directionreal:s})}}))},recoveryScroll:function(){var t=this;this.autoRecovery&&(this.scrollY>0||this.autoBottom)&&this.$nextTick((function(){t.autoBottom?t.autoToBottom():t.scrollTo(t.scrollY,t.autoRecoveryAnimate)}))},openInterval:function(){this.autoToBottom(),this.autoInterval&&clearInterval(this.autoInterval),this.autoInterval=setInterval(this.autoToBottom,300)},closeInterval:function(){clearInterval(this.autoInterval),this.autoInterval=null},scrollTo:function(t,e){!1===e?$A(this.$refs.scrollerView).stop().scrollTop(t):$A(this.$refs.scrollerView).stop().animate({scrollTop:t})},autoToBottom:function(){if(this.autoBottom&&this.$refs.bottom)try{this.$refs.bottom.scrollIntoView(!1)}catch(t){scrollIntoView(this.$refs.bottom,{behavior:"instant",inline:"end"})}},scrollInfo:function(){var t=$A(this.$refs.scrollerView),e=Math.round(t.innerHeight()),n=t.scrollTop(),r=this.$refs.scrollerView.scrollHeight;return this.scrollY=n,{scale:n/(r-e),scrollY:n,scrollE:r-e-n}},querySelector:function(t){return this.$refs.scrollerView&&this.$refs.scrollerView.querySelector(t)}}};const o=(0,n(51900).Z)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"scrollerView",staticClass:"app-scroller-y",class:[t.static?"static":""]},[t._t("default"),t._v(" "),n("div",{ref:"bottom",staticClass:"app-scroller-bottom"})],2)}),[],!1,null,null,null).exports},72593:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>f});var r=n(47575),o=n.n(r),i=n(55305),a=n(20629);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function c(t){for(var e=1;e0&&(n.min_height=this.minHeight),n},closeFull:function(){this.content=this.getContent(),this.$emit("input",this.content),this.$emit("on-blur"),this.transfer=!1,null!=this.editorT&&(this.editorT.destroy(),this.editorT=null)},transferChange:function(t){t||null==this.editorT||(this.content=this.editorT.getContent(),this.$emit("input",this.content),this.editorT.destroy(),this.editorT=null)},getEditor:function(){return this.transfer?this.editorT:this.editor},concatAssciativeArrays:function(t,e){if(0===e.length)return t;if(0===t.length)return e;var n=[];for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);return n},submitNewContent:function(){var t=this;this.isTyping=!0,null!==this.checkerTimeout&&clearTimeout(this.checkerTimeout),this.checkerTimeout=setTimeout((function(){t.isTyping=!1}),300),this.$emit("input",this.getContent())},insertContent:function(t){null!==this.getEditor()?this.getEditor().insertContent(t):this.content+=t},getContent:function(){return null===this.getEditor()?"":this.getEditor().getContent()},insertImage:function(t){this.insertContent('')},editorImage:function(t){for(var e=0;e').concat(t.data.name," (").concat($A.bytesToSize(1024*t.data.size),")
    ")):$A.noticeWarning({title:this.$L("上传失败"),desc:this.$L("文件 "+e.name+" 上传失败,"+t.msg)})},handleError:function(){this.uploadIng--},handleFormatError:function(t){$A.noticeWarning({title:this.$L("文件格式不正确"),desc:this.$L("文件 "+t.name+" 格式不正确,仅支持上传:"+this.uploadFormat.join(","))})},handleMaxSize:function(t){$A.noticeWarning({title:this.$L("超出文件大小限制"),desc:this.$L("文件 "+t.name+" 太大,不能超过:"+$A.bytesToSize(1024*this.maxSize))})},handleBeforeUpload:function(){return!0}}};const f=(0,n(51900).Z)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"teditor-wrapper"},[n("div",{staticClass:"teditor-box",class:[!t.inline&&t.spinShow?"teditor-loadstyle":"teditor-loadedstyle"]},[t.inline?[n("div",{ref:"myTextarea",attrs:{id:t.id},domProps:{innerHTML:t._s(t.content)}}),t._v(" "),t.spinShow?n("Icon",{staticClass:"icon-loading icon-inline",attrs:{type:"ios-loading",size:18}}):t._e()]:[n("textarea",{ref:"myTextarea",attrs:{id:t.id}},[t._v(t._s(t.content))]),t._v(" "),t.spinShow?n("Spin",{attrs:{fix:""}},[n("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading",size:18}}),t._v(" "),n("div",[t._v(t._s(t.$L("加载组件中...")))])],1):t._e()],t._v(" "),n("ImgUpload",{ref:"myUpload",staticClass:"upload-control",attrs:{type:"callback",uploadIng:t.uploadIng,num:"50"},on:{"update:uploadIng":function(e){t.uploadIng=e},"update:upload-ing":function(e){t.uploadIng=e},"on-callback":t.editorImage}}),t._v(" "),n("Upload",{ref:"fileUpload",staticClass:"upload-control",attrs:{name:"files",action:t.actionUrl,headers:t.headers,multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-progress":t.handleProgress,"on-success":t.handleSuccess,"on-error":t.handleError,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize,"before-upload":t.handleBeforeUpload}})],2),t._v(" "),t.uploadIng>0?n("Spin",{attrs:{fix:""}},[n("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}),t._v(" "),n("div",[t._v(t._s(t.$L("正在上传文件...")))])],1):t._e(),t._v(" "),n("Modal",{staticClass:"teditor-transfer",attrs:{"footer-hide":"",fullscreen:"",transfer:""},on:{"on-visible-change":t.transferChange},model:{value:t.transfer,callback:function(e){t.transfer=e},expression:"transfer"}},[n("div",{attrs:{slot:"close"},slot:"close"},[n("Button",{attrs:{type:"primary",size:"small"}},[t._v(t._s(t.$L("完成")))])],1),t._v(" "),n("div",{staticClass:"teditor-transfer-body"},[n("textarea",{attrs:{id:"T_"+t.id}},[t._v(t._s(t.content))])]),t._v(" "),t.uploadIng>0?n("Spin",{attrs:{fix:""}},[n("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}),t._v(" "),n("div",[t._v(t._s(t.$L("正在上传文件...")))])],1):t._e()],1)],1)}),[],!1,null,null,null).exports},96921:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(80641);const o={name:"UserInput",props:{value:{type:[String,Number,Array],default:""},uncancelable:{type:Array,default:function(){return[]}},disabledChoice:{type:Array,default:function(){return[]}},placeholder:{default:""},size:{default:"default"},transfer:{type:Boolean,default:!0},multipleMax:{type:Number},maxHiddenInput:{type:Boolean,default:!0},projectId:{type:Number,default:0},noProjectId:{type:Number,default:0}},data:function(){return{ready:!1,initialized:!1,loading:!1,openLoad:!1,values:[],list:[],options:[],subscribe:null}},mounted:function(){var t=this;$A.isArray(this.value)?this.values=$A.cloneJSON(this.value):this.$emit("input",this.value?[this.value]:[]),this.$nextTick((function(){t.ready=!0})),this.subscribe=r.Store.subscribe("cacheUserActive",(function(e){var n=t.list.findIndex((function(t){return t.userid==e.userid}));n>-1&&(t.initialized=!0,t.$set(t.list,n,Object.assign({},t.list[n],e)));var r=t.options.find((function(t){return t.value==e.userid}));r&&(t.$set(r,"label",e.nickname),t.$set(r,"avatar",e.userimg))}))},beforeDestroy:function(){this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},computed:{maxHiddenClass:function(){var t=this.multipleMax,e=this.maxHiddenInput,n=this.values;return t&&e&&n.length>=t?"hidden-input":""}},watch:{value:function(t){this.values=t},values:function(t){this.$emit("input",t)}},methods:{openChange:function(t){t&&!this.openLoad&&(this.openLoad=!0,(this.list.length==this.values.length||this.list.length<=1)&&this.$nextTick(this.searchUser))},setDefaultOptions:function(t){var e=this;this.options=t,t.forEach((function(t){var n=t.value,r=t.label;e.list.push({userid:n,nickname:r}),e.$store.dispatch("getUserBasic",{userid:n})})),0==this.list.length&&(this.initialized=!0)},searchUser:function(t){var e=this;""!==t?(this.loading=!0,this.$store.dispatch("call",{url:"users/search",data:{keys:{key:t||"",project_id:this.projectId,no_project_id:this.noProjectId},take:30}}).then((function(t){var n=t.data;e.loading=!1,e.list=n})).catch((function(t){var n=t.msg;e.loading=!1,e.list=[],$A.messageWarning(n)}))):this.list=[]},isDisabled:function(t){return 0!==this.disabledChoice.length&&this.disabledChoice.includes(t)}}};const i=(0,n(51900).Z)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.ready?n("div",{class:["common-user",t.maxHiddenClass]},[n("Select",{attrs:{transfer:t.transfer,"remote-method":t.searchUser,placeholder:t.placeholder,size:t.size,loading:t.loading,"loading-text":t.$L("加载中..."),"default-label":t.value,"default-event-object":!0,multipleMax:t.multipleMax,multipleUncancelable:t.uncancelable,multiple:"",filterable:"","transfer-class-name":"common-user-transfer"},on:{"on-open-change":t.openChange,"on-set-default-options":t.setDefaultOptions},model:{value:t.values,callback:function(e){t.values=e},expression:"values"}},[t.multipleMax?n("div",{staticClass:"user-drop-prepend",attrs:{slot:"drop-prepend"},slot:"drop-prepend"},[t._v(t._s(t.$L("最多只能选择"+t.multipleMax+"个")))]):t._e(),t._v(" "),t._t("option-prepend"),t._v(" "),t._l(t.list,(function(e,r){return n("Option",{key:r,attrs:{value:e.userid,label:e.nickname,avatar:e.userimg,disabled:t.isDisabled(e.userid)}},[n("div",{staticClass:"user-input-option"},[n("div",{staticClass:"user-input-avatar"},[n("EAvatar",{staticClass:"avatar",attrs:{src:e.userimg}})],1),t._v(" "),n("div",{staticClass:"user-input-nickname"},[t._v(t._s(e.nickname))]),t._v(" "),n("div",{staticClass:"user-input-userid"},[t._v("ID: "+t._s(e.userid))])])])}))],2),t._v(" "),t.initialized?t._e():n("div",{staticClass:"common-user-loading"},[n("Loading")],1)],1):t._e()}),[],!1,null,null,null).exports},93412:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>V});var r=n(20629),o=n(36323);function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const s={name:"ProjectArchived",data:function(){return{loadIng:0,keys:{},columns:[],list:[],page:1,pageSize:20,total:0,noText:""}},mounted:function(){this.getLists()},computed:function(t){for(var e=1;e0?n("Loading"):t._e()],1)]),t._v(" "),n("div",{staticClass:"search-container lr"},[n("ul",[n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("项目名"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Input",{attrs:{clearable:""},model:{value:t.keys.name,callback:function(e){t.$set(t.keys,"name",e)},expression:"keys.name"}})],1)]),t._v(" "),n("li",{staticClass:"search-button"},[n("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[n("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.getLists}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.refresh}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1)])]),t._v(" "),n("Table",{attrs:{columns:t.columns,data:t.list,"no-data-text":t.$L(t.noText)}}),t._v(" "),n("Page",{staticClass:"page-container",attrs:{total:t.total,current:t.page,pageSize:t.pageSize,disabled:t.loadIng>0,simple:t.windowMax768,showTotal:""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)}),[],!1,null,null,null).exports,l=(t,e)=>!(!t||!e)&&("String"===t?"string"==typeof e:"Object"===t?"[object Object]"===Object.prototype.toString.call(e):"number"===t?"number"==typeof e:"function"===t&&"[object Function]"===Object.prototype.toString.call(e)),d=(t,e,n)=>t.findIndex((t=>t[e]===n));const f=class{constructor(t="默认标题",e={}){this.title=t,this.options=e,this.support=!1,this.supportFn()}supportFn(){window.Notification?(this.initStatus(),this.support=!0):this.support=!1}initStatus(){this.notification=null,this.state=Notification.permission,this.msg=null,this.callBackObj={},this.notificationAll=[],this.requireInteractionTimeout=!1,this.timeout=null}initNotification(t){if(this.checkStatus("support")){if(!l("function",t))return console.error("initNotification的参数必须为函数");if("granted"===this.state)this.msg="already granted";else if("default"===this.state){const e=e=>(this.state=e,this.msg="granted"===e?"granted":"default"===e?"close":"denied",t(this.msg));try{Notification.requestPermission().then(e)}catch(t){Notification.requestPermission(e)}}else this.msg="already denied";return"default"!==this.state?t(this.msg):void 0}}userAgreed(){if(this.checkStatus("userAgreed")){this.notification=new Notification(this.title,this.options),this.notificationWatch();for(const t in this.callBackObj)this.notification[t]=e=>{this.callBackObj[t](e)}}}notificationTimeoutFn(t){t&&l("number",t)?this.timeout=t:this.timeout=5e3}notificationWatch(){this.notificationAll.push(this.notification),this.notification.requireInteraction?this.everyTimeout():this.autoClose(),this.watchClose()}everyTimeout(){l("number",this.timeout)&&(this.options.timeOut&&l("number",this.options.timeOut)?this.timeoutCloseFn(this.options.timeOut):this.timeoutCloseFn(this.timeout))}timeoutCloseFn(t){const e=this.notification.timestamp;setTimeout((()=>{const t=d(this.notificationAll,"timestamp",e);-1!==t&&this.notificationAll[t].close()}),t)}watchClose(){const t=this.notification.timestamp;this.notification.addEventListener("close",(e=>{const n=d(this.notificationAll,"timestamp",t);-1!==n&&this.notificationAll.splice(n,1)}))}autoClose(){const t=this.notification.timestamp;setTimeout((()=>{const e=d(this.notificationAll,"timestamp",t);-1!==e&&this.notificationAll.splice(e,1)}),6e3)}notificationEvent(t){if(this.checkStatus("support")){if(!l("Object",t))return console.error("callObj必须为对象");for(const e in t)if(!l("function",t[e]))return console.error("callObj对象中的每个value必须为函数");this.callBackObj=t}}closeAll(){for(let t of this.notificationAll.values())t.close();this.notificationAll=[]}close(){if(!this.notification)return console.warn("this.notification为null,通知尚未调用/用户未同意显示通知");this.notification.close()}updateOptions(t){if(t&&l("Object",t))for(const e in t)this.options[e]=t[e];else console.warn("updateOptions参数错误:options为必填对象")}replaceTitle(t){t&&l("String",t)?this.title=t:console.warn("replaceTitle: title(通知标题)为必填字符串")}replaceOptions(t){t&&l("Object",t)?this.options=t:console.warn("replaceOptions参数错误:options为必填对象")}checkStatus(t){if("support"===t){if(!this.support)return console.warn("用户浏览器不支持"),!1}else if("userAgreed"===t){if("granted"!==this.state)return!1;if(!this.checkStatus("support"))return!1}return!0}};function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const h={name:"TeamManagement",data:function(){return{loadIng:0,keys:{},columns:[],list:[],page:1,pageSize:20,total:0,noText:""}},mounted:function(){this.getLists()},computed:function(t){for(var e=1;e0?n("Loading"):t._e()],1)]),t._v(" "),n("div",{staticClass:"search-container lr"},[n("ul",[n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("邮箱"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Input",{attrs:{clearable:""},model:{value:t.keys.email,callback:function(e){t.$set(t.keys,"email",e)},expression:"keys.email"}})],1)]),t._v(" "),n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("昵称"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Input",{attrs:{clearable:""},model:{value:t.keys.nickname,callback:function(e){t.$set(t.keys,"nickname",e)},expression:"keys.nickname"}})],1)]),t._v(" "),n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("职位/职称"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Input",{attrs:{clearable:""},model:{value:t.keys.position,callback:function(e){t.$set(t.keys,"position",e)},expression:"keys.position"}})],1)]),t._v(" "),n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("身份"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Select",{model:{value:t.keys.identity,callback:function(e){t.$set(t.keys,"identity",e)},expression:"keys.identity"}},[n("Option",{attrs:{value:""}},[t._v(t._s(t.$L("全部")))]),t._v(" "),n("Option",{attrs:{value:"admin"}},[t._v(t._s(t.$L("管理员")))]),t._v(" "),n("Option",{attrs:{value:"disable"}},[t._v(t._s(t.$L("禁用")))])],1)],1)]),t._v(" "),n("li",{staticClass:"search-button"},[n("Tooltip",{attrs:{theme:"light",placement:"bottom","transfer-class-name":"search-button-clear",transfer:""}},[n("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.getLists}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1)])]),t._v(" "),n("Table",{attrs:{columns:t.columns,data:t.list,"no-data-text":t.$L(t.noText)}}),t._v(" "),n("Page",{staticClass:"page-container",attrs:{total:t.total,current:t.page,pageSize:t.pageSize,disabled:t.loadIng>0,simple:t.windowMax768,showTotal:""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)}),[],!1,null,null,null).exports;function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function b(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const y={name:"ProjectManagement",data:function(){return{loadIng:0,keys:{},columns:[],list:[],page:1,pageSize:20,total:0,noText:""}},mounted:function(){this.getLists()},computed:function(t){for(var e=1;e0?n("Loading"):t._e()],1)]),t._v(" "),n("div",{staticClass:"search-container lr"},[n("ul",[n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("项目名"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Input",{attrs:{clearable:""},model:{value:t.keys.name,callback:function(e){t.$set(t.keys,"name",e)},expression:"keys.name"}})],1)]),t._v(" "),n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("项目状态"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Select",{model:{value:t.keys.status,callback:function(e){t.$set(t.keys,"status",e)},expression:"keys.status"}},[n("Option",{attrs:{value:""}},[t._v(t._s(t.$L("全部")))]),t._v(" "),n("Option",{attrs:{value:"unarchived"}},[t._v(t._s(t.$L("未归档")))]),t._v(" "),n("Option",{attrs:{value:"archived"}},[t._v(t._s(t.$L("已归档")))])],1)],1)]),t._v(" "),n("li",{staticClass:"search-button"},[n("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[n("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.getLists}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1)])]),t._v(" "),n("Table",{attrs:{columns:t.columns,data:t.list,"no-data-text":t.$L(t.noText)}}),t._v(" "),n("Page",{staticClass:"page-container",attrs:{total:t.total,current:t.page,pageSize:t.pageSize,disabled:t.loadIng>0,simple:t.windowMax768,showTotal:""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)}),[],!1,null,null,null).exports;var w=n(47933);const _={name:"DragBallComponent",props:{id:{type:String,default:""},distanceLeft:{type:Number,default:-1},distanceRight:{type:Number,default:0},distanceTop:{type:Number,default:-1},distanceBottom:{type:Number,default:100},isScrollHidden:{type:Boolean,default:!1},isCanDraggable:{type:Boolean,default:!0},zIndex:{type:Number,default:50}},data:function(){return{clientWidth:null,clientHeight:null,top:0,left:0,timer:null,currentTop:0,isMoving:!1,record:{}}},created:function(){this.clientWidth=document.documentElement.clientWidth,this.clientHeight=document.documentElement.clientHeight},mounted:function(){var t=this;this.id&&($A.isJson(window._DragBallComponent)||(window._DragBallComponent={})),this.isCanDraggable&&this.$nextTick((function(){t.id&&$A.isJson(window._DragBallComponent[t.id])?(t.left=window._DragBallComponent[t.id].left,t.top=window._DragBallComponent[t.id].top):(t.distanceLeft>-1?t.left=t.distanceLeft:t.left=t.clientWidth-t.floatDrag.offsetWidth-t.distanceRight,t.distanceTop>-1?t.top=t.distanceTop:t.top=t.clientHeight-t.floatDrag.offsetHeight-t.distanceBottom),t.initDraggable()})),this.isScrollHidden&&window.addEventListener("scroll",this.handleScroll),window.addEventListener("resize",this.handleResize)},beforeDestroy:function(){this.id&&(window._DragBallComponent[this.id]={left:this.left,top:this.top}),window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("resize",this.handleResize)},computed:{dragStyle:function(){return{left:this.left+"px",top:this.top+"px",zIndex:this.zIndex,position:"fixed"}},floatDrag:function(){return this.$refs.floatDrag}},methods:{handleScroll:function(){var t=this;this.timer&&clearTimeout(this.timer),this.timer=setTimeout((function(){t.handleScrollEnd()}),200),this.currentTop=document.documentElement.scrollTop||document.body.scrollTop,this.left>this.clientWidth/2?this.left=this.clientWidth+this.floatDrag.offsetWidth:this.left=-this.floatDrag.offsetWidth},handleScrollEnd:function(){(document.documentElement.scrollTop||document.body.scrollTop)===this.currentTop&&(this.left>this.clientWidth/2?this.left=this.clientWidth-this.floatDrag.offsetWidth:this.left=0,clearTimeout(this.timer))},handleResize:function(){this.clientWidth=document.documentElement.clientWidth,this.clientHeight=document.documentElement.clientHeight,this.checkDraggablePosition()},initDraggable:function(){this.floatDrag.addEventListener("touchstart",this.toucheStart),this.floatDrag.addEventListener("touchmove",this.touchMove),this.floatDrag.addEventListener("touchend",this.touchEnd)},mouseDown:function(t){var e=this;this.record={time:(new Date).getTime(),top:this.floatDrag.offsetTop,left:this.floatDrag.offsetLeft,x:t.clientX-this.floatDrag.offsetLeft,y:t.clientY-this.floatDrag.offsetTop},this.floatDrag.style.transition="none",this.canClick=!1,document.onmousemove=function(t){var n=t.clientX-e.record.x,r=t.clientY-e.record.y;n<0?n=0:n>window.innerWidth-e.floatDrag.offsetWidth&&(n=window.innerWidth-e.floatDrag.offsetWidth),r<0?r=0:r>window.innerHeight-e.floatDrag.offsetHeight&&(r=window.innerHeight-e.floatDrag.offsetHeight),e.left=n,e.top=r},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null,e.checkDraggablePosition(),e.floatDrag.style.transition="all 0.3s",(Math.abs(e.record.top-e.floatDrag.offsetTop)<5&&Math.abs(e.record.left-e.floatDrag.offsetLeft)<5||(new Date).getTime()-e.record.time<200)&&e.$emit("on-click")}},toucheStart:function(){this.canClick=!1,this.floatDrag.style.transition="none"},touchMove:function(t){if(this.canClick=!0,1===t.targetTouches.length){var e=event.targetTouches[0],n=e.clientX-this.floatDrag.offsetWidth/2,r=e.clientY-this.floatDrag.offsetHeight/2;n<0?n=0:n>window.innerWidth-this.floatDrag.offsetWidth&&(n=window.innerWidth-this.floatDrag.offsetWidth),r<0?r=0:r>window.innerHeight-this.floatDrag.offsetHeight&&(r=window.innerHeight-this.floatDrag.offsetHeight),this.left=n,this.top=r}},touchEnd:function(){this.canClick&&(this.floatDrag.style.transition="all 0.3s",this.checkDraggablePosition())},checkDraggablePosition:function(){this.left+this.floatDrag.offsetWidth/2>=this.clientWidth/2?this.left=this.clientWidth-this.floatDrag.offsetWidth:this.left=0,this.top<0&&(this.top=0),this.top+this.floatDrag.offsetHeight>=this.clientHeight&&(this.top=this.clientHeight-this.floatDrag.offsetHeight)}}};const k=(0,u.Z)(_,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{ref:"floatDrag",style:t.dragStyle,on:{mousedown:function(e){return e.stopPropagation(),e.preventDefault(),t.mouseDown.apply(null,arguments)}}},[t._t("default")],2)}),[],!1,null,null,null).exports;var x=n(86014);function D(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function S(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const T={name:"ReportEdit",components:{TEditor:function(){return Promise.resolve().then(n.bind(n,72593))},UserInput:n(96921).Z},props:{id:{default:0}},data:function(){return{reportData:{title:"",content:"",type:"weekly",receive:[],id:0,offset:0},disabledType:!1,userInputShow:!0,prevCycleText:"",nextCycleText:""}},watch:{id:function(t){this.id>0?this.getDetail(t):(this.reportData.offset=0,this.reportData.type="weekly",this.reportData.receive=[],this.getTemplate())}},computed:function(t){for(var e=1;e1?$A.modalConfirm({title:"覆盖提交",content:"你已提交过此日期的报告,是否覆盖提交?",loading:!0,zIndex:2e3,onOk:function(){t.doSubmit()}}):this.doSubmit()},doSubmit:function(){var t=this;this.$store.dispatch("call",{url:"report/store",data:this.reportData,method:"post"}).then((function(e){e.data;var n=e.msg;t.reportData.offset=0,t.reportData.type="weekly",t.reportData.receive=[],t.getTemplate(),t.disabledType=!1,t.$Modal.remove(),$A.messageSuccess(n),t.$emit("saveSuccess")})).catch((function(e){var n=e.msg;t.$Modal.remove(),$A.messageError(n)}))},getTemplate:function(){var t=this;this.$store.dispatch("call",{url:"report/template",data:{type:this.reportData.type,offset:this.reportData.offset,id:this.id}}).then((function(e){var n=e.data;e.msg;n.id?(t.reportData.id=n.id,t.id>0?t.getDetail(n.id):(t.reportData.title=n.title,t.reportData.content=n.content)):(t.reportData.id=0,t.reportData.title=n.title,t.reportData.content=n.content)})).catch((function(t){var e=t.msg;$A.messageError(e)}))},typeChange:function(t){this.reportData.offset=0,"weekly"===t?(this.prevCycleText=this.$L("上一周"),this.nextCycleText=this.$L("下一周")):(this.prevCycleText=this.$L("上一天"),this.nextCycleText=this.$L("下一天")),this.getTemplate()},getDetail:function(t){var e=this;this.userInputShow=!1,this.$store.dispatch("call",{url:"report/detail",data:{id:t}}).then((function(n){var r=n.data;n.msg;e.reportData.title=r.title,e.reportData.content=r.content,e.reportData.receive=r.receives_user.map((function(t){return t.userid})),e.reportData.type=r.type_val,e.reportData.id=t,e.disabledType=!0,e.userInputShow=!0})).catch((function(t){var n=t.msg;$A.messageError(n),e.userInputShow=!0}))},prevCycle:function(){this.reportData.offset-=1,this.disabledType=!1,this.reReportData(),this.getTemplate()},nextCycle:function(){this.reportData.offset<0&&(this.reportData.offset+=1),this.disabledType=!1,this.reReportData(),this.getTemplate()},getLastSubmitter:function(){var t=this;this.userInputShow=!1,this.$store.dispatch("call",{url:"report/last_submitter"}).then((function(e){var n=e.data;e.msg;t.reportData.receive=n,t.userInputShow=!0})).catch((function(e){var n=e.msg;$A.messageError(n),t.userInputShow=!0}))},reReportData:function(){this.reportData.title="",this.reportData.content="",this.reportData.receive=[],this.reportData.id=0}}};const E=(0,u.Z)(T,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Form",{staticClass:"report-box",attrs:{"label-position":"top"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("Row",{staticClass:"report-row"},[n("Col",{attrs:{span:"2"}},[n("p",{staticClass:"report-titles"},[t._v(t._s(t.$L("汇报类型")))])]),t._v(" "),n("Col",{attrs:{span:"12"}},[n("RadioGroup",{staticClass:"report-radiogroup",attrs:{type:"button","button-style":"solid",readonly:t.id>0},on:{"on-change":t.typeChange},model:{value:t.reportData.type,callback:function(e){t.$set(t.reportData,"type",e)},expression:"reportData.type"}},[n("Radio",{attrs:{label:"weekly",disabled:t.id>0&&"daily"==t.reportData.type}},[t._v(t._s(t.$L("周报")))]),t._v(" "),n("Radio",{attrs:{label:"daily",disabled:t.id>0&&"weekly"==t.reportData.type}},[t._v(t._s(t.$L("日报")))])],1),t._v(" "),0===t.id?n("ButtonGroup",{staticClass:"report-buttongroup"},[n("ETooltip",{staticClass:"report-poptip",attrs:{content:t.prevCycleText,placement:"bottom"}},[n("Button",{attrs:{type:"primary"},on:{click:t.prevCycle}},[n("Icon",{attrs:{type:"ios-arrow-back"}})],1)],1),t._v(" "),n("div",{staticClass:"report-buttongroup-vertical"}),t._v(" "),n("ETooltip",{staticClass:"report-poptip",attrs:{disabled:t.reportData.offset>=0,content:t.nextCycleText,placement:"bottom"}},[n("Button",{attrs:{type:"primary",disabled:t.reportData.offset>=0},on:{click:t.nextCycle}},[n("Icon",{attrs:{type:"ios-arrow-forward"}})],1)],1)],1):t._e()],1)],1),t._v(" "),n("Row",{staticClass:"report-row"},[n("Col",{attrs:{span:"2"}},[n("p",{staticClass:"report-titles"},[t._v(t._s(t.$L("汇报名称")))])]),t._v(" "),n("Col",{attrs:{span:"22"}},[n("Input",{attrs:{disabled:""},model:{value:t.reportData.title,callback:function(e){t.$set(t.reportData,"title",e)},expression:"reportData.title"}})],1)],1),t._v(" "),n("Row",{staticClass:"report-row"},[n("Col",{attrs:{span:"2"}},[n("p",{staticClass:"report-titles"},[t._v(t._s(t.$L("汇报对象")))])]),t._v(" "),n("Col",{attrs:{span:"22"}},[n("div",{staticClass:"report-users"},[t.userInputShow?n("UserInput",{attrs:{disabledChoice:[t.userId],placeholder:t.$L("选择接收人")},model:{value:t.reportData.receive,callback:function(e){t.$set(t.reportData,"receive",e)},expression:"reportData.receive"}}):t._e(),t._v(" "),n("a",{staticClass:"report-row-a",attrs:{href:"javascript:void(0);"},on:{click:t.getLastSubmitter}},[n("Icon",{staticClass:"report-row-a-icon",attrs:{type:"ios-share-outline"}}),t._v(t._s(t.$L("使用我上次的汇报对象"))+"\n ")],1)],1)])],1),t._v(" "),n("Row",{staticClass:"report-row report-row-content"},[n("Col",{attrs:{span:"2"}},[n("p",{staticClass:"report-titles"},[t._v(t._s(t.$L("汇报内容")))])]),t._v(" "),n("Col",{attrs:{span:"22"}},[n("FormItem",{staticClass:"report-row-content-editor"},[n("TEditor",{attrs:{height:"100%"},model:{value:t.reportData.content,callback:function(e){t.$set(t.reportData,"content",e)},expression:"reportData.content"}})],1)],1)],1),t._v(" "),n("Row",{staticClass:"report-row report-row-foot"},[n("Col",{attrs:{span:"2"}}),t._v(" "),n("Col",{attrs:{span:"4"}},[n("Button",{staticClass:"report-bottom",attrs:{type:"primary"},on:{click:t.handleSubmit}},[t._v(t._s(t.$L(t.id>0?"修改":"提交")))])],1)],1)],1)}),[],!1,null,"c7774572",null).exports;const O={name:"ReportMy",data:function(){return{loadIng:0,columns:[],lists:[],listPage:1,listTotal:0,listPageSize:10,noDataText:"",createAt:[],reportType:"",reportTypeList:[]}},mounted:function(){this.getLists()},methods:{initLanguage:function(){var t=this;this.noDataText=this.noDataText||"数据加载中.....",this.columns=[{title:this.$L("名称"),key:"title",sortable:!0,minWidth:120},{title:this.$L("类型"),key:"type",align:"center",sortable:!0,maxWidth:80},{title:this.$L("汇报时间"),key:"created_at",align:"center",sortable:!0,maxWidth:180},{title:this.$L("操作"),align:"center",width:100,minWidth:100,render:function(e,n){var r=n.column,o=n.row;if(!o.id)return null;var i=[e("ETooltip",{props:{content:t.$L("编辑"),transfer:!0,delay:600}},[e("Icon",{props:{type:"md-create",size:16},style:{margin:"0 3px",cursor:"pointer"},on:{click:function(){t.$emit("on-edit",o.id)}}})]),e("ETooltip",{props:{content:t.$L("查看"),transfer:!0,delay:600},style:{position:"relative",marginLeft:"6px"}},[e("Icon",{props:{type:"md-eye",size:16},style:{margin:"0 3px",cursor:"pointer"},on:{click:function(){t.$emit("on-view",o)}}})])];return e("TableAction",{props:{column:r}},i)}}],this.reportTypeList=[{value:"",label:this.$L("全部")},{value:"weekly",label:this.$L("周报")},{value:"daily",label:this.$L("日报")}]},getLists:function(){var t=this;this.loadIng=1,this.$store.dispatch("call",{url:"report/my",data:{page:this.listPage,pagesize:this.listPageSize,created_at:this.createAt,type:this.reportType}}).then((function(e){var n=e.data;e.msg;t.lists=n.data,t.listTotal=n.total,t.lists.length<=0&&(t.noDataText=t.$L("无数据"))})).catch((function(t){var e=t.msg;$A.messageError(e)})).finally((function(){t.loadIng=0}))},setPage:function(t){this.listPage=t,this.getLists()},setPageSize:function(t){Math.max($A.runNum(this.listPageSize),10)!==t&&(this.listPageSize=t,this.getLists())},searchTab:function(){this.getLists()},addReport:function(){this.$emit("on-edit",0)}}};const A=(0,u.Z)(O,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"report-list-wrap"},[n("div",{staticClass:"search-expand"},[n("div",{staticClass:"search-container lr"},[n("ul",[n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("汇报类型"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Select",{attrs:{placeholder:t.$L("全部")},model:{value:t.reportType,callback:function(e){t.reportType=e},expression:"reportType"}},t._l(t.reportTypeList,(function(e){return n("Option",{key:e.value,attrs:{value:e.value}},[t._v(t._s(e.label))])})),1)],1)]),t._v(" "),n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("汇报时间"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("DatePicker",{attrs:{type:"daterange","split-panels":"",placeholder:t.$L("请选择时间")},model:{value:t.createAt,callback:function(e){t.createAt=e},expression:"createAt"}})],1)]),t._v(" "),n("li",{staticClass:"search-button"},[n("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[n("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.searchTab}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1)])]),t._v(" "),n("div",{staticClass:"expand-button-group"},[n("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:t.addReport}},[t._v(t._s(t.$L("新增报告")))])],1)]),t._v(" "),n("Table",{ref:"tableRef",staticClass:"tableFill report-row-content",attrs:{columns:t.columns,data:t.lists,loading:t.loadIng>0,"no-data-text":t.$L(t.noDataText),stripe:""}}),t._v(" "),n("Page",{staticClass:"page-box report-row-foot",attrs:{total:t.listTotal,current:t.listPage,disabled:t.loadIng>0,"page-size-opts":[10,20,30,50,100],placement:"top","show-elevator":"","show-sizer":"","show-total":"",transfer:""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)}),[],!1,null,"1d9ad226",null).exports;function L(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function N(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const $={name:"ReportReceive",data:function(){return{loadIng:0,columns:[],lists:[],listPage:1,listTotal:0,listPageSize:10,noDataText:"",username:"",reportType:"",createAt:[],reportTypeList:[]}},mounted:function(){this.getLists()},computed:function(t){for(var e=1;e0,type:"primary",icon:"ios-search"},on:{click:t.searchTab}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1)])]),t._v(" "),n("Table",{ref:"tableRef",staticClass:"tableFill report-row-content",attrs:{columns:t.columns,data:t.lists,loading:t.loadIng>0,"no-data-text":t.$L(t.noDataText),stripe:""}}),t._v(" "),n("Page",{staticClass:"page-box report-row-foot",attrs:{total:t.listTotal,current:t.listPage,disabled:t.loadIng>0,"page-size-opts":[10,20,30,50,100],placement:"top","show-elevator":"","show-sizer":"","show-total":"",transfer:""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)}),[],!1,null,"8f6b5f4c",null).exports;const I={name:"ReportDetail",props:{data:{default:{}}},mounted:function(){this.data.id>0&&this.sendRead()},watch:{data:function(){this.data.id>0&&this.sendRead()}},methods:{sendRead:function(){this.$store.dispatch("call",{url:"report/read",data:{ids:[this.data.id]}}).then((function(t){t.data,t.msg})).catch((function(t){t.msg}))}}};const R=(0,u.Z)(I,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"report-detail"},[n("div",{staticClass:"report-title"},[t._v(t._s(t.data.title))]),t._v(" "),n("div",{staticClass:"report-detail-context"},[n("div",{staticClass:"report-profile"},[n("Row",[n("Col",{attrs:{span:"2"}},[n("div",{staticClass:"report-submitter"},[n("p",[t._v(t._s(t.$L("汇报人")))])])]),t._v(" "),n("Col",{attrs:{span:"6"}},[n("div",{staticClass:"report-submitter"},[n("UserAvatar",{attrs:{userid:t.data.userid,size:28}})],1)]),t._v(" "),n("Col",{attrs:{span:"2"}},[n("div",{staticClass:"report-submitter"},[n("p",[t._v(t._s(t.$L("提交时间")))])])]),t._v(" "),n("Col",{attrs:{span:"6"}},[n("div",{staticClass:"report-submitter"},[n("div",[t._v(t._s(t.data.created_at))])])]),t._v(" "),n("Col",{attrs:{span:"2"}},[n("div",{staticClass:"report-submitter"},[n("p",[t._v(t._s(t.$L("汇报对象")))])])]),t._v(" "),n("Col",{attrs:{span:"6"}},[n("div",{staticClass:"report-submitter"},t._l(t.data.receives_user,(function(t,e){return n("UserAvatar",{key:e,attrs:{userid:t.userid,size:28}})})),1)])],1)],1),t._v(" "),n("Row",{staticClass:"report-main"},[n("Col",{attrs:{span:"2"}},[n("div",{staticClass:"report-submitter"},[n("p",[t._v(t._s(t.$L("汇报内容")))])])]),t._v(" "),n("Col",{attrs:{span:"22"}},[n("div",{staticClass:"report-content",domProps:{innerHTML:t._s(t.data.content)}})])],1)],1)])}),[],!1,null,"50c4f848",null).exports,B={name:"Report",components:{DrawerOverlay:w.Z,ReportEdit:E,ReportMy:A,ReportReceive:P,ReportDetail:R},props:{reportUnreadNumber:{type:Number,default:0},reportType:{default:"my"}},data:function(){return{reportTabs:"my",showDetailDrawer:!1,showEditDrawer:!1,detailData:{},reportId:0}},mounted:function(){this.reportTabs=this.reportType},methods:{tabRebder:function(t){var e=this;return function(n){return n("div",t>0?[n("span",{class:"navbar-item-content"},e.$L("收到的汇报")),n("Badge",{class:"manage-box-report",props:{count:t}})]:[n("span",{class:"navbar-item-content"},e.$L("收到的汇报"))])}},onView:function(t){this.showDetailDrawer=!0,this.detailData=t,this.$emit("on-read")},onEditReport:function(t){this.reportId=t,this.showEditDrawer=!0},saveSuccess:function(){this.reportId=0,this.reportTabs="my",this.showEditDrawer=!1,this.$refs.report&&this.$refs.report.getLists()}}};const M=(0,u.Z)(B,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"report"},[n("Tabs",{model:{value:t.reportTabs,callback:function(e){t.reportTabs=e},expression:"reportTabs"}},[n("TabPane",{attrs:{label:t.$L("我的汇报"),name:"my"}},["my"===t.reportTabs?n("ReportMy",{ref:"report",on:{"on-view":t.onView,"on-edit":t.onEditReport}}):t._e()],1),t._v(" "),n("TabPane",{attrs:{label:t.tabRebder(t.reportUnreadNumber),name:"receive"}},["receive"===t.reportTabs?n("ReportReceive",{on:{"on-view":t.onView}}):t._e()],1)],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:950,transfer:""},model:{value:t.showDetailDrawer,callback:function(e){t.showDetailDrawer=e},expression:"showDetailDrawer"}},[n("ReportDetail",{attrs:{data:t.detailData}})],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:1e3,transfer:""},model:{value:t.showEditDrawer,callback:function(e){t.showEditDrawer=e},expression:"showEditDrawer"}},[n("ReportEdit",{attrs:{id:t.reportId},on:{saveSuccess:t.saveSuccess}})],1)],1)}),[],!1,null,"4cc721de",null).exports;var j=n(80641);n(33301);function z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function F(t){for(var e=1;e-1})):e},taskStyle:function(){var t=this.innerHeight;return{maxHeight:t-(t>900?200:70)-20+"px"}}}),watch:{$route:function(t){this.curPath=t.path,this.chackPass()},userInfo:function(){this.chackPass()},taskId:function(t){t>0&&this.$Modal.resetIndex()},msgAllUnread:function(){this.$Electron&&this.$Electron.ipcRenderer.send("setDockBadge",this.msgAllUnread+this.dashboardTotal+this.reportUnreadNumber)},dashboardTotal:function(){this.$Electron&&this.$Electron.ipcRenderer.send("setDockBadge",this.msgAllUnread+this.dashboardTotal+this.reportUnreadNumber)},reportUnreadNumber:function(){this.$Electron&&this.$Electron.ipcRenderer.send("setDockBadge",this.msgAllUnread+this.dashboardTotal+this.reportUnreadNumber)},projectKeyValue:function(t){var e=this;""!=t&&setTimeout((function(){e.projectKeyValue==t&&e.searchProject()}),600)},natificationHidden:function(t){var e=this;clearTimeout(this.notificationTimeout),t||(this.notificationTimeout=setTimeout((function(){e.notificationClass.close()}),6e3))},wsOpenNum:function(t){var e=this;t<=1||(this.wsOpenTimeout&&clearTimeout(this.wsOpenTimeout),this.wsOpenTimeout=setTimeout((function(){e.$store.dispatch("getBasicData"),e.getReportUnread()}),5e3))},wsMsg:{handler:function(t){var e=t.type,n=t.action;if("report"===e)"unreadUpdate"==n&&this.getReportUnread()},deep:!0}},methods:{initLanguage:function(){this.columns=[{label:this.$L("空白模板"),value:[]},{label:this.$L("软件开发"),value:[this.$L("产品规划"),this.$L("前端开发"),this.$L("后端开发"),this.$L("测试"),this.$L("发布"),this.$L("其它")]},{label:this.$L("产品开发"),value:[this.$L("产品计划"),this.$L("正在设计"),this.$L("正在研发"),this.$L("测试"),this.$L("准备发布"),this.$L("发布成功")]}],this.addRule={name:[{required:!0,message:this.$L("请填写项目名称!"),trigger:"change"},{type:"string",min:2,message:this.$L("项目名称至少2个字!"),trigger:"change"}]}},innerHeightListener:function(){this.innerHeight=window.innerHeight},chackPass:function(){1===this.userInfo.changepass&&this.goForward({path:"/manage/setting/password"})},setTheme:function(t){switch(t){case"dark":$A.dark.enableDarkMode();break;case"light":$A.dark.disableDarkMode();break;default:$A.dark.autoDarkMode()}this.$store.state.themeMode=t,this.$store.state.themeIsDark=$A.dark.isDarkEnabled(),$A.setStorage("cacheThemeMode",t)},toggleRoute:function(t){this.show768Menu=!1,this.goForward({path:"/manage/"+t})},toggleOpenMenu:function(t){this.$set(this.openMenu,t,!this.openMenu[t])},settingRoute:function(t){var e=this;switch(t){case"allUser":return void(this.allUserShow=!0);case"allProject":return void(this.allProjectShow=!0);case"archivedProject":return void(this.archivedProjectShow=!0);case"workReport":return this.reportUnreadNumber>0&&(this.reportTabs="receive"),void(this.workReportShow=!0);case"clearCache":return void this.$store.dispatch("handleClearCache",null).then((function(){$A.setStorage("clearCache",$A.randomString(6)),window.location.reload()})).catch((function(){window.location.reload()}));case"signout":return void $A.modalConfirm({title:"退出登录",content:"你确定要登出系统?",onOk:function(){e.$store.dispatch("logout")}})}this.menu.findIndex((function(e){return e.path==t}))>-1&&this.toggleRoute("setting/"+t)},menuVisibleChange:function(t){this.visibleMenu=t},classNameRoute:function(t,e){return{active:this.curPath=="/manage/"+t,"open-menu":!0===e}},onAddShow:function(){var t=this;this.addShow=!0,this.$nextTick((function(){t.$refs.projectName.focus()}))},onAddProject:function(){var t=this;this.$refs.addProject.validate((function(e){e&&(t.loadIng++,t.$store.dispatch("call",{url:"project/add",data:t.addData}).then((function(e){var n=e.data,r=e.msg;$A.messageSuccess(r),t.loadIng--,t.addShow=!1,t.$refs.addProject.resetFields(),t.$store.dispatch("saveProject",n),t.toggleRoute("project/"+n.id)})).catch((function(e){var n=e.msg;$A.modalError(n),t.loadIng--})))}))},searchProject:function(){var t=this;!0!==this.projectKeyAlready[this.projectKeyValue]&&(this.projectKeyAlready[this.projectKeyValue]=!0,setTimeout((function(){t.projectKeyLoading++}),1e3),this.$store.dispatch("getProjects",{keys:{name:this.projectKeyValue}}).then((function(){t.projectKeyLoading--})).catch((function(){t.projectKeyLoading--})))},selectChange:function(t){var e=this;this.$nextTick((function(){e.$set(e.addData,"columns",e.columns[t].value.join(","))}))},shortcutEvent:function(t){75!==t.keyCode&&78!==t.keyCode||(t.metaKey||t.ctrlKey)&&(t.preventDefault(),this.onAddTask(0))},onAddTask:function(t){this.$refs.addTask.defaultPriority(),this.$refs.addTask.setData($A.isJson(t)?t:{owner:this.userId,column_id:t}),this.addTaskShow=!0},addDialogMsg:function(t){var e=this;if(this.natificationHidden&&this.natificationReady){var n=t.id,r=t.dialog_id,o=t.type,i=t.msg,a="";switch(o){case"text":a=i.text;break;case"file":a="["+this.$L("img"==i.type?"图片信息":"文件信息")+"]";break;default:return}this._notificationId=n,this.notificationClass.replaceOptions({icon:$A.originUrl("images/logo.png"),body:a,data:t,tag:"dialog",requireInteraction:!0});var s=this.cacheDialogs.find((function(t){return t.id==r}));s?(this.notificationClass.replaceTitle(s.name),this.notificationClass.userAgreed()):this.$store.dispatch("getDialogOne",r).then((function(t){var r=t.data;e._notificationId===n&&(e.notificationClass.replaceTitle(r.name),e.notificationClass.userAgreed())})).catch((function(){}))}},taskVisibleChange:function(t){t||this.$store.dispatch("openTask",0)},getReportUnread:function(t){var e=this;this.reportUnreadTimeout&&clearTimeout(this.reportUnreadTimeout),this.reportUnreadTimeout=setTimeout((function(){e.$store.dispatch("call",{url:"report/unread"}).then((function(t){var n=t.data;e.reportUnreadNumber=n.total?n.total:0})).catch((function(){}))}),"number"==typeof t?t:1e3)},notificationInit:function(){var t=this;this.notificationClass=new f(this.$L("打开通知成功")),this.notificationClass.support&&(this.notificationClass.notificationEvent({onclick:function(e){var n=e.target;console.log("[Notification] Click",n),t.notificationClass.close(),window.focus();var r=n.tag,o=n.data;if("dialog"==r){if(!$A.isJson(o))return;t.goForward({path:"/manage/messenger"}),o.dialog_id&&($A.setStorage("messenger::dialogId",o.dialog_id),t.$store.state.dialogOpenId=o.dialog_id)}}}),this.notificationPermission())},notificationPermission:function(){var t=this;this.notificationClass.initNotification((function e(n){switch(n){case"already granted":case"granted":return t.natificationReady=!0;case"close":return t.notificationClass.initNotification(e);case"denied":case"already denied":"denied"===n?console.log("您刚刚拒绝显示通知 请在设置中更改设置"):console.log("您曾级拒绝显示通知 请在设置中更改设置")}}))},onVisibilityChange:function(){var t=this,e="hidden"in document?"hidden":"webkitHidden"in document?"webkitHidden":"mozHidden"in document?"mozHidden":null,n=e.replace(/hidden/i,"visibilitychange");document.addEventListener(n,(function(){t.natificationHidden=!!document[e]}))}}};const V=(0,u.Z)(H,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"show",rawName:"v-show",value:t.userId>0,expression:"userId > 0"}],staticClass:"page-manage"},[n("div",{staticClass:"manage-box-menu",class:{"show768-menu":t.show768Menu}},[n("Dropdown",{staticClass:"manage-box-dropdown",attrs:{trigger:"click"},on:{"on-click":t.settingRoute,"on-visible-change":t.menuVisibleChange}},[n("div",{class:["manage-box-title",t.visibleMenu?"menu-visible":""]},[n("div",{staticClass:"manage-box-avatar"},[n("UserAvatar",{attrs:{userid:t.userId,size:36,tooltipDisabled:""}})],1),t._v(" "),n("span",[t._v(t._s(t.userInfo.nickname))]),t._v(" "),n("Badge",{staticClass:"manage-box-top-report",attrs:{count:t.reportUnreadNumber}}),t._v(" "),n("div",{staticClass:"manage-box-arrow"},[n("Icon",{attrs:{type:"ios-arrow-up"}}),t._v(" "),n("Icon",{attrs:{type:"ios-arrow-down"}})],1)],1),t._v(" "),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[t._l(t.menu,(function(e,r){return n("DropdownItem",{key:r,attrs:{divided:!!e.divided,name:e.path}},[t._v("\n "+t._s(t.$L(e.name))+"\n "),"workReport"===e.path?n("Badge",{staticClass:"manage-menu-report-badge",attrs:{count:t.reportUnreadNumber}}):t._e()],1)})),t._v(" "),n("Dropdown",{attrs:{placement:"right-start"},on:{"on-click":t.setTheme}},[n("DropdownItem",{attrs:{divided:""}},[n("div",{staticClass:"manage-menu-language"},[t._v("\n "+t._s(t.$L("主题皮肤"))+"\n "),n("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),t._v(" "),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},t._l(t.themeList,(function(e,r){return n("Dropdown-item",{key:r,attrs:{name:e.value,selected:t.themeMode===e.value}},[t._v(t._s(t.$L(e.name)))])})),1)],1),t._v(" "),n("Dropdown",{attrs:{placement:"right-start"},on:{"on-click":t.setLanguage}},[n("DropdownItem",{attrs:{divided:""}},[n("div",{staticClass:"manage-menu-language"},[t._v("\n "+t._s(t.currentLanguage)+"\n "),n("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),t._v(" "),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},t._l(t.languageList,(function(e,r){return n("Dropdown-item",{key:r,attrs:{name:r,selected:t.getLanguage()===r}},[t._v(t._s(e))])})),1)],1),t._v(" "),n("DropdownItem",{staticStyle:{color:"#f40"},attrs:{divided:"",name:"signout"}},[t._v(t._s(t.$L("退出登录")))])],2)],1),t._v(" "),n("ul",{staticClass:"overlay-y"},[n("li",{class:t.classNameRoute("dashboard"),on:{click:function(e){return t.toggleRoute("dashboard")}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),n("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("仪表盘")))]),t._v(" "),n("Badge",{staticClass:"menu-badge",attrs:{type:t.dashboardTask.overdue.length>0?"error":"primary",count:t.dashboardTotal}})],1),t._v(" "),n("li",{class:t.classNameRoute("calendar"),on:{click:function(e){return t.toggleRoute("calendar")}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),n("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("日历")))])]),t._v(" "),n("li",{class:t.classNameRoute("messenger"),on:{click:function(e){return t.toggleRoute("messenger")}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),n("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("消息")))]),t._v(" "),n("Badge",{staticClass:"menu-badge",attrs:{count:t.msgAllUnread}})],1),t._v(" "),n("li",{class:t.classNameRoute("file"),on:{click:function(e){return t.toggleRoute("file")}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),n("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("文件")))])]),t._v(" "),n("li",{staticClass:"menu-project"},[n("ul",t._l(t.projectLists,(function(e,r){return n("li",{key:r,class:t.classNameRoute("project/"+e.id,t.openMenu[e.id]),on:{click:function(n){return t.toggleRoute("project/"+e.id)}}},[n("div",{staticClass:"project-h1"},[n("em",{on:{click:function(n){return n.stopPropagation(),t.toggleOpenMenu(e.id)}}}),t._v(" "),n("div",{staticClass:"title"},[t._v(t._s(e.name))]),t._v(" "),e.task_my_num-e.task_my_complete>0?n("div",{staticClass:"num"},[t._v(t._s(e.task_my_num-e.task_my_complete))]):t._e()]),t._v(" "),n("div",{staticClass:"project-h2"},[n("p",[n("em",[t._v(t._s(t.$L("我的"))+":")]),t._v(" "),n("span",[t._v(t._s(e.task_my_complete)+"/"+t._s(e.task_my_num))]),t._v(" "),n("Progress",{attrs:{percent:e.task_my_percent,"stroke-width":6}})],1),t._v(" "),n("p",[n("em",[t._v(t._s(t.$L("全部"))+":")]),t._v(" "),n("span",[t._v(t._s(e.task_complete)+"/"+t._s(e.task_num))]),t._v(" "),n("Progress",{attrs:{percent:e.task_percent,"stroke-width":6}})],1)])])})),0),t._v(" "),t.loadIng>0?n("Loading"):t._e()],1)]),t._v(" "),t.projectTotal>50?n("div",{staticClass:"manage-project-search",class:{loading:t.projectKeyLoading>0}},[n("Input",{attrs:{prefix:"ios-search",placeholder:t.$L("共"+t.projectTotal+"个项目,搜索..."),clearable:""},model:{value:t.projectKeyValue,callback:function(e){t.projectKeyValue=e},expression:"projectKeyValue"}})],1):t._e(),t._v(" "),n("ButtonGroup",{staticClass:"manage-box-new-group"},[n("Button",{staticClass:"manage-box-new",attrs:{type:"primary",icon:"md-add"},on:{click:t.onAddShow}},[t._v(t._s(t.$L("新建项目")))]),t._v(" "),n("Dropdown",{on:{"on-click":function(e){return t.onAddTask(0)}}},[n("Button",{attrs:{type:"primary"}},[n("Icon",{attrs:{type:"ios-arrow-down"}})],1),t._v(" "),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[n("DropdownItem",[t._v(t._s(t.$L("新建任务"))+" ("+t._s(t.mateName)+"+K)")])],1)],1)],1)],1),t._v(" "),n("div",{staticClass:"manage-box-main"},[n("keep-alive",[n("router-view",{staticClass:"manage-box-view overlay"})],1)],1),t._v(" "),n("Modal",{attrs:{title:t.$L("新建项目"),"mask-closable":!1},model:{value:t.addShow,callback:function(e){t.addShow=e},expression:"addShow"}},[n("Form",{ref:"addProject",attrs:{model:t.addData,rules:t.addRule,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{prop:"name",label:t.$L("项目名称")}},[n("Input",{ref:"projectName",attrs:{type:"text"},model:{value:t.addData.name,callback:function(e){t.$set(t.addData,"name",e)},expression:"addData.name"}})],1),t._v(" "),t.addData.columns?n("FormItem",{attrs:{label:t.$L("任务列表")}},[n("TagInput",{model:{value:t.addData.columns,callback:function(e){t.$set(t.addData,"columns",e)},expression:"addData.columns"}})],1):n("FormItem",{attrs:{label:t.$L("项目模板")}},[n("Select",{attrs:{value:0,placeholder:t.$L("请选择模板")},on:{"on-change":t.selectChange}},t._l(t.columns,(function(e,r){return n("Option",{key:r,attrs:{value:r}},[t._v(t._s(e.label))])})),1)],1)],1),t._v(" "),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(e){t.addShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onAddProject}},[t._v(t._s(t.$L("添加")))])],1)],1),t._v(" "),n("Modal",{attrs:{"mask-closable":!1,styles:{width:"90%",maxWidth:"640px"},"footer-hide":""},model:{value:t.addTaskShow,callback:function(e){t.addTaskShow=e},expression:"addTaskShow"}},[n("TaskAdd",{ref:"addTask",model:{value:t.addTaskShow,callback:function(e){t.addTaskShow=e},expression:"addTaskShow"}})],1),t._v(" "),n("Modal",{attrs:{value:t.taskId>0,"mask-closable":!1,styles:{width:"90%",maxWidth:t.taskData.dialog_id?"1200px":"700px"},"footer-hide":""},on:{"on-visible-change":t.taskVisibleChange}},[n("div",{staticClass:"page-manage-task-modal",style:t.taskStyle},[n("TaskDetail",{attrs:{"task-id":t.taskId,"open-task":t.taskData}})],1)]),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:1100},model:{value:t.workReportShow,callback:function(e){t.workReportShow=e},expression:"workReportShow"}},[t.workReportShow?n("Report",{attrs:{reportType:t.reportTabs,reportUnreadNumber:t.reportUnreadNumber},on:{"on-read":t.getReportUnread}}):t._e()],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:1100},model:{value:t.allUserShow,callback:function(e){t.allUserShow=e},expression:"allUserShow"}},[t.allUserShow?n("TeamManagement"):t._e()],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:1100},model:{value:t.allProjectShow,callback:function(e){t.allProjectShow=e},expression:"allProjectShow"}},[t.allProjectShow?n("ProjectManagement"):t._e()],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:1100},model:{value:t.archivedProjectShow,callback:function(e){t.archivedProjectShow=e},expression:"archivedProjectShow"}},[t.archivedProjectShow?n("ProjectArchived"):t._e()],1),t._v(" "),n("DragBallComponent",{attrs:{distanceLeft:0,distanceTop:60},on:{"on-click":function(e){t.show768Menu=!t.show768Menu}}},[n("div",{staticClass:"manage-mini-menu"},[n("Icon",{attrs:{type:t.show768Menu?"md-close":"md-menu"}})],1)])],1)}),[],!1,null,null,null).exports},80887:(t,e,n)=>{"use strict";n.d(e,{Z:()=>L});const r=n(70538).default.prototype.$isServer;function o(t,e){for(let n=0;n`${t}:${r.getPropertyValue(t)}`)).join(";"),paddingSize:i,borderSize:s,boxSizing:o};return e&&n&&(u[n]=c),c}(t,r);s.setAttribute("style",`${l};\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n`),s.value=t.value||t.placeholder||"";let d,f=Number.MIN_SAFE_INTEGER,m=Number.MAX_SAFE_INTEGER,p=s.scrollHeight;if("border-box"===c?p+=i:"content-box"===c&&(p-=o),null!==e||null!==n){s.value=" ";let t=s.scrollHeight-o;null!==e&&(f=t*e,"border-box"===c&&(f=f+o+i),p=Math.max(f,p)),null!==n&&(m=t*n,"border-box"===c&&(m=m+o+i),d=p>m?"":"hidden",p=Math.min(m,p))}return n||(d="hidden"),{height:`${p}px`,minHeight:`${f}px`,maxHeight:`${m}px`,overflowY:d}}function l(t,e,n){this.$children.forEach((r=>{r.$options.name===t?r.$emit.apply(r,[e].concat(n)):l.apply(r,[t,e].concat([n]))}))}function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var f="ivu-input";const m={name:"DragInput",mixins:[{methods:{dispatch(t,e,n){let r=this.$parent||this.$root,o=r.$options.name;for(;r&&(!o||o!==t);)r=r.$parent,r&&(o=r.$options.name);r&&r.$emit.apply(r,[e].concat(n))},broadcast(t,e,n){l.call(this,t,e,n)}}},{inject:{FormInstance:{default:""}},computed:{itemDisabled(){let t=this.disabled;return!t&&this.FormInstance&&(t=this.FormInstance.disabled),t}}}],props:{type:{validator:function(t){return o(t,["text","textarea","password","url","email","date","number","tel"])},default:"text"},value:{type:[String,Number],default:""},size:{validator:function(t){return o(t,["small","large","default"])},default:function(){return this.$IVIEW&&""!==this.$IVIEW.size?this.$IVIEW.size:"default"}},placeholder:{type:String,default:""},maxlength:{type:[String,Number]},disabled:{type:Boolean,default:!1},icon:String,autosize:{type:[Boolean,Object],default:!1},rows:{type:Number,default:2},readonly:{type:Boolean,default:!1},name:{type:String},number:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},spellcheck:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},clearable:{type:Boolean,default:!1},elementId:{type:String},wrap:{validator:function(t){return o(t,["hard","soft"])},default:"soft"},prefix:{type:String,default:""},suffix:{type:String,default:""},search:{type:Boolean,default:!1},enterButton:{type:[Boolean,String],default:!1},showWordLimit:{type:Boolean,default:!1},password:{type:Boolean,default:!1}},data:function(){return{currentValue:this.value,prefixCls:f,slotReady:!1,textareaStyles:{},isOnComposition:!1,showPassword:!1}},computed:{currentType:function(){var t=this.type;return"password"===t&&this.password&&this.showPassword&&(t="text"),t},prepend:function(){var t=!1;return"textarea"!==this.type&&(t=void 0!==this.$slots.prepend),t},append:function(){var t=!1;return"textarea"!==this.type&&(t=void 0!==this.$slots.append),t},showPrefix:function(){var t=!1;return"textarea"!==this.type&&(t=""!==this.prefix||void 0!==this.$slots.prefix),t},showSuffix:function(){var t=!1;return"textarea"!==this.type&&(t=""!==this.suffix||void 0!==this.$slots.suffix),t},wrapClasses:function(){var t;return["".concat(f,"-wrapper"),(t={},d(t,"".concat(f,"-wrapper-").concat(this.size),!!this.size),d(t,"".concat(f,"-type-").concat(this.type),this.type),d(t,"".concat(f,"-group"),this.prepend||this.append||this.search&&this.enterButton),d(t,"".concat(f,"-group-").concat(this.size),(this.prepend||this.append||this.search&&this.enterButton)&&!!this.size),d(t,"".concat(f,"-group-with-prepend"),this.prepend),d(t,"".concat(f,"-group-with-append"),this.append||this.search&&this.enterButton),d(t,"".concat(f,"-hide-icon"),this.append),d(t,"".concat(f,"-with-search"),this.search&&this.enterButton),t)]},inputClasses:function(){var t;return["".concat(f),(t={},d(t,"".concat(f,"-").concat(this.size),!!this.size),d(t,"".concat(f,"-disabled"),this.itemDisabled),d(t,"".concat(f,"-with-prefix"),this.showPrefix),d(t,"".concat(f,"-with-suffix"),this.showSuffix||this.search&&!1===this.enterButton),t)]},textareaClasses:function(){return["".concat(f),d({},"".concat(f,"-disabled"),this.itemDisabled)]},upperLimit:function(){return this.maxlength},textLength:function(){return"number"==typeof this.value?String(this.value).length:(this.value||"").length}},methods:{handleEnter:function(t){this.$emit("on-enter",t),this.search&&this.$emit("on-search",this.currentValue)},handleKeydown:function(t){this.$emit("on-keydown",t)},handleKeypress:function(t){this.$emit("on-keypress",t)},handleKeyup:function(t){this.$emit("on-keyup",t)},handleIconClick:function(t){this.$emit("on-click",t)},handleFocus:function(t){this.$emit("on-focus",t)},handleBlur:function(t){this.$emit("on-blur",t),i(this,["DatePicker","TimePicker","Cascader","Search"])||this.dispatch("FormItem","on-form-blur",this.currentValue)},handleComposition:function(t){"compositionstart"===t.type&&(this.isOnComposition=!0),"compositionend"===t.type&&(this.isOnComposition=!1,this.handleInput(t))},handleInput:function(t){if(!this.isOnComposition){var e=t.target.value;this.number&&""!==e&&(e=Number.isNaN(Number(e))?e:Number(e)),this.$emit("input",e),this.setCurrentValue(e),this.$emit("on-change",t)}},handleChange:function(t){this.$emit("on-input-change",t)},handlePaste:function(t){this.$emit("on-input-paste",t)},setCurrentValue:function(t){var e=this;t!==this.currentValue&&(this.$nextTick((function(){e.resizeTextarea()})),this.currentValue=t,i(this,["DatePicker","TimePicker","Cascader","Search"])||this.dispatch("FormItem","on-form-change",t))},resizeTextarea:function(){var t=this.autosize;if(!t||"textarea"!==this.type)return!1;var e=t.minRows,n=t.maxRows;this.textareaStyles=c(this.$refs.textarea,e,n)},focus:function(){"textarea"===this.type?this.$refs.textarea.focus():this.$refs.input.focus()},blur:function(){"textarea"===this.type?this.$refs.textarea.blur():this.$refs.input.blur()},handleClear:function(){this.$emit("input",""),this.setCurrentValue(""),this.$emit("on-change",{target:{value:""}}),this.$emit("on-clear")},handleSearch:function(){if(this.itemDisabled)return!1;this.$refs.input.focus(),this.$emit("on-search",this.currentValue)},handleToggleShowPassword:function(){var t=this;if(this.itemDisabled)return!1;this.showPassword=!this.showPassword,this.focus();var e=this.currentValue.length;setTimeout((function(){t.$refs.input.setSelectionRange(e,e)}),0)}},watch:{value:function(t){this.setCurrentValue(t)}},mounted:function(){this.slotReady=!0,this.resizeTextarea()}};var p=n(51900);const h=(0,p.Z)(m,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.wrapClasses},["textarea"!==t.type?[t.prepend?n("div",{directives:[{name:"show",rawName:"v-show",value:t.slotReady,expression:"slotReady"}],class:[t.prefixCls+"-group-prepend"]},[t._t("prepend")],2):t._e(),t._v(" "),t.clearable&&t.currentValue&&!t.itemDisabled?n("i",{staticClass:"ivu-icon",class:["ivu-icon-ios-close-circle",t.prefixCls+"-icon",t.prefixCls+"-icon-clear",t.prefixCls+"-icon-normal"],on:{click:t.handleClear}}):t.icon?n("i",{staticClass:"ivu-icon",class:["ivu-icon-"+t.icon,t.prefixCls+"-icon",t.prefixCls+"-icon-normal"],on:{click:t.handleIconClick}}):t.search&&!1===t.enterButton?n("i",{staticClass:"ivu-icon ivu-icon-ios-search",class:[t.prefixCls+"-icon",t.prefixCls+"-icon-normal",t.prefixCls+"-search-icon"],on:{click:t.handleSearch}}):t.showSuffix?n("span",{staticClass:"ivu-input-suffix"},[t._t("suffix",(function(){return[t.suffix?n("i",{staticClass:"ivu-icon",class:["ivu-icon-"+t.suffix]}):t._e()]}))],2):t.showWordLimit?n("span",{staticClass:"ivu-input-word-count"},[t._v(t._s(t.textLength)+"/"+t._s(t.upperLimit))]):t.password?n("span",{staticClass:"ivu-input-suffix",on:{click:t.handleToggleShowPassword}},[t.showPassword?n("i",{staticClass:"ivu-icon ivu-icon-ios-eye-off-outline"}):n("i",{staticClass:"ivu-icon ivu-icon-ios-eye-outline"})]):t._e(),t._v(" "),n("transition",{attrs:{name:"fade"}},[t.icon?t._e():n("i",{staticClass:"ivu-icon ivu-icon-ios-loading ivu-load-loop",class:[t.prefixCls+"-icon",t.prefixCls+"-icon-validate"]})]),t._v(" "),n("input",{ref:"input",class:t.inputClasses,attrs:{id:t.elementId,autocomplete:t.autocomplete,spellcheck:t.spellcheck,type:t.currentType,placeholder:t.placeholder,disabled:t.itemDisabled,maxlength:t.maxlength,readonly:t.readonly,name:t.name,number:t.number,autofocus:t.autofocus},domProps:{value:t.currentValue},on:{keyup:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleEnter.apply(null,arguments)},t.handleKeyup],keypress:t.handleKeypress,keydown:t.handleKeydown,focus:t.handleFocus,blur:t.handleBlur,compositionstart:t.handleComposition,compositionupdate:t.handleComposition,compositionend:t.handleComposition,input:t.handleInput,change:t.handleChange,paste:t.handlePaste}}),t._v(" "),t.append?n("div",{directives:[{name:"show",rawName:"v-show",value:t.slotReady,expression:"slotReady"}],class:[t.prefixCls+"-group-append"]},[t._t("append")],2):t.search&&t.enterButton?n("div",{class:[t.prefixCls+"-group-append",t.prefixCls+"-search"],on:{click:t.handleSearch}},[!0===t.enterButton?n("i",{staticClass:"ivu-icon ivu-icon-ios-search"}):[t._v(t._s(t.enterButton))]],2):t.showPrefix?n("span",{staticClass:"ivu-input-prefix"},[t._t("prefix",(function(){return[t.prefix?n("i",{staticClass:"ivu-icon",class:["ivu-icon-"+t.prefix]}):t._e()]}))],2):t._e()]:[n("textarea",{ref:"textarea",class:t.textareaClasses,style:t.textareaStyles,attrs:{id:t.elementId,wrap:t.wrap,autocomplete:t.autocomplete,spellcheck:t.spellcheck,placeholder:t.placeholder,disabled:t.itemDisabled,rows:t.rows,maxlength:t.maxlength,readonly:t.readonly,name:t.name,autofocus:t.autofocus},domProps:{value:t.currentValue},on:{keyup:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleEnter.apply(null,arguments)},t.handleKeyup],keypress:t.handleKeypress,keydown:t.handleKeydown,focus:t.handleFocus,blur:t.handleBlur,compositionstart:t.handleComposition,compositionupdate:t.handleComposition,compositionend:t.handleComposition,input:t.handleInput,paste:t.handlePaste}}),t._v(" "),t.showWordLimit?n("span",{staticClass:"ivu-input-word-count"},[t._v(t._s(t.textLength)+"/"+t._s(t.upperLimit))]):t._e()]],2)}),[],!1,null,null,null).exports;var g=n(85166),v=n(20629);const b={name:"WCircle",props:{percent:{type:Number,default:0},size:{type:Number,default:120}},computed:{style:function(){var t=this.size;return this.isNumeric(t)&&(t+="px"),{width:t,height:t}},args:function(){var t=this.percent,e=Math.min(360,3.6*t);return 360==e?e=0:0==e&&(e=360),{x:14,y:14,r:14,start:360,end:e}}},methods:{isNumeric:function(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)},point:function(t,e,n,r){return[(t+Math.sin(r)*n).toFixed(2),(e-Math.cos(r)*n).toFixed(2)]},full:function(t,e,n,r){return r<=0?"M ".concat(t-n," ").concat(e," A ").concat(n," ").concat(n," 0 1 1 ").concat(t+n," ").concat(e," A ").concat(n," ").concat(n," 1 1 1 ").concat(t-n," ").concat(e," Z"):"M ".concat(t-n," ").concat(e," A ").concat(n," ").concat(n," 0 1 1 ").concat(t+n," ").concat(e," A ").concat(n," ").concat(n," 1 1 1 ").concat(t-n," ").concat(e," M ").concat(t-r," ").concat(e," A ").concat(r," ").concat(r," 0 1 1 ").concat(t+r," ").concat(e," A ").concat(r," ").concat(r," 1 1 1 ").concat(t-r," ").concat(e," Z")},part:function(t,e,n,r,o,i){var a=o/360*2*Math.PI,s=i/360*2*Math.PI,u=[this.point(t,e,r,a),this.point(t,e,n,a),this.point(t,e,n,s),this.point(t,e,r,s)],c=s-a>Math.PI?"1":"0";return"M ".concat(u[0][0]," ").concat(u[0][1]," L ").concat(u[1][0]," ").concat(u[1][1]," A ").concat(n," ").concat(n," 0 ").concat(c," 1 ").concat(u[2][0]," ").concat(u[2][1]," L ").concat(u[3][0]," ").concat(u[3][1]," A ").concat(r," ").concat(r," 0 ").concat(c," 0 ").concat(u[0][0]," ").concat(u[0][1]," Z")},arc:function(t){var e=t.x,n=void 0===e?0:e,r=t.y,o=void 0===r?0:r,i=t.R,a=void 0===i?0:i,s=t.r,u=void 0===s?0:s,c=t.start,l=t.end,d=[Math.max(a,u),Math.min(a,u)];if(u=d[1],(a=d[0])<=0)return"";if(c!==+c||l!==+l)return this.full(n,o,a,u);if(Math.abs(c-l)<1e-6)return"";if(Math.abs(c-l)%360<1e-6)return this.full(n,o,a,u);var f=[c%360,l%360];return(c=f[0])>(l=f[1])&&(l+=360),this.part(n,o,a,u,c,l)}}};const y={name:"DialogView",components:{WCircle:(0,p.Z)(b,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"common-circle",style:t.style,attrs:{"data-id":t.percent}},[n("svg",{attrs:{viewBox:"0 0 28 28"}},[n("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[n("path",{staticClass:"common-circle-path",attrs:{d:"M-500-100h997V48h-997z"}}),t._v(" "),n("g",{attrs:{"fill-rule":"nonzero"}},[n("path",{staticClass:"common-circle-g-path-ring",attrs:{"stroke-width":"3",d:"M14 25.5c6.351 0 11.5-5.149 11.5-11.5S20.351 2.5 14 2.5 2.5 7.649 2.5 14 7.649 25.5 14 25.5z"}}),t._v(" "),n("path",{staticClass:"common-circle-g-path-core",attrs:{d:t.arc(t.args)}})])])])])}),[],!1,null,null,null).exports},props:{msgData:{type:Object,default:function(){return{}}},dialogType:{type:String,default:""}},data:function(){return{read_list:[]}},activated:function(){this.msgRead()},computed:{readList:function(){return this.read_list.filter((function(t){return t.read_at}))},unreadList:function(){return this.read_list.filter((function(t){return!t.read_at}))}},watch:{msgData:{handler:function(){this.msgRead()},immediate:!0}},methods:{msgRead:function(){var t=this;!0!==this.msgData._r&&(this.msgData._r=!0,this.$nextTick((function(){t.$el.offsetParent?t.$store.dispatch("dialogMsgRead",t.msgData):t.msgData._r=!1})))},popperShow:function(){var t=this;this.$store.dispatch("call",{url:"dialog/msg/readlist",data:{msg_id:this.msgData.id}}).then((function(e){var n=e.data;t.read_list=n})).catch((function(){t.read_list=[]}))},textMsg:function(t){return t?t=(t=t.trim().replace(/(\n\x20*){3,}/g,"

    ")).trim().replace(/\n/g,"
    "):""},imageStyle:function(t){var e=t.width,n=t.height;if(e&&n){var r=e,o=n;return(e>220||n>220)&&(e>n?(r=220,o=n*(220/e)):(r=e*(220/n),o=220)),{width:r+"px",height:o+"px"}}return{}}}};const C=(0,p.Z)(y,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dialog-view",attrs:{"data-id":t.msgData.id}},["text"===t.msgData.type?n("div",{staticClass:"dialog-content"},[n("pre",{staticClass:"no-dark-mode",domProps:{innerHTML:t._s(t.textMsg(t.msgData.msg.text))}})]):"loading"===t.msgData.type?n("div",{staticClass:"dialog-content loading"},[n("Loading")],1):"file"===t.msgData.type?n("div",{class:["dialog-content",t.msgData.msg.type]},[n("a",{attrs:{href:t.msgData.msg.path,target:"_blank"}},["img"===t.msgData.msg.type?n("img",{staticClass:"file-img",style:t.imageStyle(t.msgData.msg),attrs:{src:t.msgData.msg.thumb}}):n("div",{staticClass:"file-box"},[n("img",{staticClass:"file-thumb",attrs:{src:t.msgData.msg.thumb}}),t._v(" "),n("div",{staticClass:"file-info"},[n("div",{staticClass:"file-name"},[t._v(t._s(t.msgData.msg.name))]),t._v(" "),n("div",{staticClass:"file-size"},[t._v(t._s(t.$A.bytesToSize(t.msgData.msg.size)))])])])])]):n("div",{staticClass:"dialog-content unknown"},[t._v(t._s(t.$L("未知的消息类型")))]),t._v(" "),t.msgData.created_at?n("div",{staticClass:"dialog-foot"},[n("div",{staticClass:"time"},[t._v(t._s(t.$A.formatTime(t.msgData.created_at)))]),t._v(" "),t.msgData.send>1||"group"==t.dialogType?n("Poptip",{staticClass:"percent",attrs:{placement:"left-end",transfer:"",width:360,offset:8},on:{"on-popper-show":t.popperShow}},[n("div",{staticClass:"dialog-wrapper-read-poptip-content",attrs:{slot:"content"},slot:"content"},[n("ul",{staticClass:"read"},[n("li",{staticClass:"read-title"},[n("em",[t._v(t._s(t.readList.length))]),t._v(t._s(t.$L("已读")))]),t._v(" "),t._l(t.readList,(function(t){return n("li",[n("UserAvatar",{attrs:{userid:t.userid,size:26,showName:""}})],1)}))],2),t._v(" "),n("ul",{staticClass:"unread"},[n("li",{staticClass:"read-title"},[n("em",[t._v(t._s(t.unreadList.length))]),t._v(t._s(t.$L("未读")))]),t._v(" "),t._l(t.unreadList,(function(t){return n("li",[n("UserAvatar",{attrs:{userid:t.userid,size:26,showName:""}})],1)}))],2)]),t._v(" "),n("WCircle",{attrs:{percent:t.msgData.percentage,size:14}})],1):100===t.msgData.percentage?n("Icon",{staticClass:"done",attrs:{type:"md-done-all"}}):n("Icon",{staticClass:"done",attrs:{type:"md-checkmark"}})],1):n("div",{staticClass:"dialog-foot"},[n("Loading")],1)])}),[],!1,null,null,null).exports;function w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _(t){for(var e=1;e0&&(t.preventDefault(),o.forEach((function(t){n.$refs.chatUpload.upload(t)})))},chatDragOver:function(t,e){var n=this,r=this.__dialogDrag=$A.randomString(8);if(t){if("move"===e.dataTransfer.effectAllowed)return;this.dialogDrag=!0}else setTimeout((function(){r===n.__dialogDrag&&(n.dialogDrag=t)}),150)},chatPasteDrag:function(t,e){var n=this;this.dialogDrag=!1;var r="drag"===e?t.dataTransfer.files:t.clipboardData.files,o=Array.prototype.slice.call(r);o.length>0&&(t.preventDefault(),o.forEach((function(t){n.$refs.chatUpload.upload(t)})))},chatFile:function(t,e){switch(t){case"progress":this.tempMsgs.push({id:e.tempId,dialog_id:this.dialogData.id,type:"loading",userid:this.userId,msg:{}}),this.windowMax768&&this.$refs.input.blur(),this.autoToBottom(),this.onActive();break;case"error":this.tempMsgs=this.tempMsgs.filter((function(t){return t.id!=e.tempId}));break;case"success":this.tempMsgs=this.tempMsgs.filter((function(t){return t.id!=e.tempId})),this.sendSuccess(e.data)}},sendSuccess:function(t){this.$store.dispatch("saveDialogMsg",t),this.$store.dispatch("increaseTaskMsgNum",this.dialogId),this.$store.dispatch("moveDialogTop",this.dialogId),this.$store.dispatch("updateDialogLastMsg",t),this.onActive()},chatScroll:function(t){switch(t.directionreal){case"up":t.scrollE<10&&(this.msgNew=0,this.autoBottom=!0);break;case"down":this.autoBottom=!1}1===t.scale&&(this.msgNew=0,this.autoBottom=!0)},onEventFocus:function(t){this.inputFocus=!0,this.$emit("on-focus",t)},onEventblur:function(t){this.inputFocus=!1,this.$emit("on-blur",t)},onActive:function(){this.$emit("on-active")},autoToBottom:function(){this.$refs.scroller&&this.$refs.scroller.autoToBottom()},openProject:function(){this.dialogData.group_info&&this.goForward({path:"/manage/project/"+this.dialogData.group_info.id})},openTask:function(){this.dialogData.group_info&&this.$store.dispatch("openTask",this.dialogData.group_info.id)},loadNextPage:function(){var t=this,e=this.dialogMsgList[0].id;this.$store.dispatch("getDialogMoreMsgs",this.dialogId).then((function(){t.$nextTick((function(){t.topId=e;var n=document.getElementById("view_"+e);if(n)try{n.scrollIntoView(!0)}catch(t){scrollIntoView(n,{behavior:"instant",inline:"start"})}}))})).catch((function(){}))},addDialogMsg:function(){var t=this;this.isAutoBottom?this.$nextTick(this.autoToBottom):this.$nextTick((function(){t.$refs.scroller&&t.$refs.scroller.scrollInfo().scrollE>10&&t.msgNew++}))}}};const L=(0,p.Z)(A,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.dialogData&&t.dialogData.id?n("div",{staticClass:"dialog-wrapper",on:{drop:function(e){return e.preventDefault(),t.chatPasteDrag(e,"drag")},dragover:function(e){return e.preventDefault(),t.chatDragOver(!0,e)},dragleave:function(e){return e.preventDefault(),t.chatDragOver(!1,e)}}},[t._t("head",(function(){return[n("div",{staticClass:"dialog-title"},[n("div",{staticClass:"main-title"},[n("h2",[t._v(t._s(t.dialogData.name))]),t._v(" "),t.peopleNum>0?n("em",[t._v("("+t._s(t.peopleNum)+")")]):t._e()]),t._v(" "),"group"===t.dialogData.type?["project"===t.dialogData.group_type?n("div",{staticClass:"sub-title pointer",on:{click:t.openProject}},[t._v("\n "+t._s(t.$L("项目聊天室"))+" "+t._s(t.$L("打开项目管理"))+"\n ")]):"task"===t.dialogData.group_type?n("div",{staticClass:"sub-title pointer",on:{click:t.openTask}},[t._v("\n "+t._s(t.$L("任务聊天室"))+" "+t._s(t.$L("查看任务详情"))+"\n ")]):t._e()]:t._e()],2)]})),t._v(" "),n("ScrollerY",{ref:"scroller",staticClass:"dialog-scroller overlay-y",attrs:{"auto-bottom":t.isAutoBottom,static:""},on:{"on-scroll":t.chatScroll}},[n("div",{ref:"manageList",staticClass:"dialog-list"},[n("ul",[t.dialogData.hasMorePages?n("li",{staticClass:"history",on:{click:t.loadNextPage}},[t._v(t._s(t.$L("加载历史消息")))]):t.dialogData.loading>0&&0===t.dialogMsgList.length?n("li",{staticClass:"loading"},[n("Loading")],1):0===t.dialogMsgList.length?n("li",{staticClass:"nothing"},[t._v(t._s(t.$L("暂无消息")))]):t._e(),t._v(" "),t._l(t.dialogMsgList,(function(e){return n("li",{key:e.id,class:{self:e.userid==t.userId,"history-tip":t.topId==e.id},attrs:{id:"view_"+e.id}},[t.topId==e.id?n("em",{staticClass:"history-text"},[t._v(t._s(t.$L("历史消息")))]):t._e(),t._v(" "),n("div",{staticClass:"dialog-avatar"},[n("UserAvatar",{attrs:{userid:e.userid,tooltipDisabled:e.userid==t.userId,size:30}})],1),t._v(" "),n("DialogView",{attrs:{"msg-data":e,"dialog-type":t.dialogData.type}})],1)})),t._v(" "),t._l(t.tempMsgList,(function(e){return n("li",{key:"tmp_"+e.id,class:{self:e.userid==t.userId},attrs:{id:"tmp_"+e.id}},[n("div",{staticClass:"dialog-avatar"},[n("UserAvatar",{attrs:{userid:e.userid,tooltipDisabled:e.userid==t.userId,size:30}})],1),t._v(" "),n("DialogView",{attrs:{"msg-data":e,"dialog-type":t.dialogData.type}})],1)}))],2)])]),t._v(" "),n("div",{class:["dialog-footer",t.msgNew>0&&t.dialogMsgList.length>0?"newmsg":""],on:{click:t.onActive}},[n("div",{staticClass:"dialog-newmsg",on:{click:t.autoToBottom}},[t._v(t._s(t.$L("有"+t.msgNew+"条新消息")))]),t._v(" "),t._t("inputBefore"),t._v(" "),n("DragInput",{ref:"input",staticClass:"dialog-input",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:3},maxlength:255,placeholder:t.$L("输入消息...")},on:{"on-focus":t.onEventFocus,"on-blur":t.onEventblur,"on-keydown":t.chatKeydown,"on-input-paste":t.pasteDrag},model:{value:t.msgText,callback:function(e){t.msgText=e},expression:"msgText"}}),t._v(" "),""!=t.msgText?n("div",{staticClass:"dialog-send",on:{click:t.sendMsg}},[n("Icon",{attrs:{type:"md-send"}})],1):t._e(),t._v(" "),n("DialogUpload",{ref:"chatUpload",staticClass:"chat-upload",attrs:{"dialog-id":t.dialogId},on:{"on-progress":function(e){return t.chatFile("progress",e)},"on-success":function(e){return t.chatFile("success",e)},"on-error":function(e){return t.chatFile("error",e)}}})],2),t._v(" "),t.dialogDrag?n("div",{staticClass:"drag-over",on:{click:function(e){t.dialogDrag=!1}}},[n("div",{staticClass:"drag-text"},[t._v(t._s(t.$L("拖动到这里发送")))])]):t._e()],2):t._e()}),[],!1,null,null,null).exports},63481:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0)}},methods:{logDate:function(t){return $A.formatDate("m-d")==t.ymd?t.ymd+" "+this.$L("今天"):t.key},getLists:function(t){var e=this;!0===t&&(this.listPage=1),this.loadIng++,this.$store.dispatch("call",{url:"project/log/lists",data:{project_id:this.projectId,task_id:this.taskId,page:Math.max(this.listPage,1),pagesize:this.pagesize}}).then((function(n){var r=n.data;e.loadIng--,!0===t&&(e.lists=[]),r.data.some((function(t){var n=t.time,r=n.ymd+" "+n.week,o=e.lists.find((function(t){return t.key==r}));if(o){var i=o.lists.find((function(e){return e.userid==t.userid}));i?i.lists.push(t):o.lists.push({userid:t.userid,lists:[t]})}else e.lists.push({key:r,ymd:t.ymd,lists:[{userid:t.userid,lists:[t]}]})})),e.hasMorePages=r.current_page ").concat(u))):i.push(t("span",u))}if(o.userid){var c=$A.isArray(o.userid)?o.userid:[o.userid],l=[];c.some((function(e){l.push(t("UserAvatar",{props:{size:18,userid:e}}))})),l.length>0&&i.push(t("div",{class:"detail-user"},[t("div",{class:"detail-user-wrap"},l)]))}}return t("span",{class:"log-text"},i)},operationList:function(t){var e=t.id,n=t.record,r=[];return $A.isJson(n)?(this.taskId>0&&$A.isJson(n.flow)&&r.push({id:e,button:"重置",content:"确定重置为【".concat($A.getMiddle(n.flow.flow_item_name,"|"),"】吗?")}),r):r},onOperation:function(t){var e=this;$A.modalConfirm({content:t.content,loading:!0,onOk:function(){e.$store.dispatch("call",{url:"project/task/resetfromlog",data:{id:t.id}}).then((function(t){var n=t.data,r=t.msg;$A.messageSuccess(r),e.$Modal.remove(),e.$store.dispatch("saveTask",n),e.getLists(!0)})).catch((function(t){var n=t.msg;$A.modalError(n,301),e.$Modal.remove()}))}})},openTask:function(t){this.$store.dispatch("openTask",t)}}};const a=(0,n(51900).Z)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:["project-log",0==t.taskId?"is-drawer":""]},[n("div",{staticClass:"log-title"},[t._v(t._s(t.$L("项目动态")))]),t._v(" "),n("ul",{staticClass:"logs-activity"},[t._l(t.lists,(function(e){return n("li",[n("div",{staticClass:"logs-date"},[t._v(t._s(t.logDate(e)))]),t._v(" "),n("div",{staticClass:"logs-section"},[n("Timeline",t._l(e.lists,(function(e,r){return n("TimelineItem",{key:r},[n("div",{staticClass:"logs-dot",attrs:{slot:"dot"},slot:"dot"},[e.userid?n("UserAvatar",{attrs:{userid:e.userid,size:18,showName:""}}):n("div",{staticClass:"avatar-wrapper common-avatar"},[n("EAvatar",{attrs:{size:18}},[t._v("A")]),t._v(" "),n("div",{staticClass:"avatar-name auto"},[t._v(t._s(t.$L("系统")))])],1)],1),t._v(" "),t._l(e.lists,(function(e){return[n("div",{staticClass:"log-summary"},[n("ProjectLogDetail",{attrs:{render:t.logDetail,item:e}}),t._v(" "),t.operationList(e).length>0?n("span",{staticClass:"log-operation"},t._l(t.operationList(e),(function(e,r){return n("Button",{key:r,attrs:{size:"small"},on:{click:function(n){return t.onOperation(e)}}},[t._v(t._s(e.button))])})),1):t._e(),t._v(" "),n("span",{staticClass:"log-time"},[t._v(t._s(e.time.ymd)+" "+t._s(e.time.segment)+" "+t._s(e.time.hi))])],1),t._v(" "),e.project_task?n("div",{staticClass:"log-task"},[n("em",{on:{click:function(n){return t.openTask(e.project_task)}}},[t._v(t._s(t.$L("关联任务"))+": "+t._s(e.project_task.name))])]):t._e()]}))],2)})),1)],1)])})),t._v(" "),t.loadIng>0?n("li",{staticClass:"logs-loading"},[n("Loading")],1):t.hasMorePages?n("li",{staticClass:"logs-more",on:{click:t.getMore}},[t._v(t._s(t.$L("加载更多")))]):0==t.totalNum?n("li",{staticClass:"logs-none",on:{click:function(e){return t.getLists(!0)}}},[t._v(t._s(t.$L("没有任何动态")))]):t._e()],2)])}),[],!1,null,null,null).exports},86014:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(72593),o=n(20629);function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e0)return n}return 0}}),watch:{value:function(t){var e=this;t?(this.ready=!0,this.initCascaderData(),this.initProjectData(),this.$nextTick((function(){e.$refs.input.focus()}))):(this.beforeClose.some((function(t){"function"==typeof t&&t()})),this.beforeClose=[],this.taskTimeOpen=!1)},"addData.project_id":function(t){$A.setStorage("cacheAddTaskProjectId",t)},"addData.column_id":function(t){var e=this,n=this.addData,r=n.project_id,o=n.column_id;this.$nextTick((function(){r&&o?e.$set(e.addData,"cascader",[r,o]):e.$set(e.addData,"cascader",[])})),$A.setStorage("cacheAddTaskColumnId",t)}},methods:{initLanguage:function(){},initCascaderData:function(){var t=this;this.cascaderData=this.cacheProjects.map((function(e){var n=t.cacheColumns.filter((function(t){return t.project_id==e.id})).map((function(t){return{value:t.id,label:t.name}})),r={value:e.id,label:e.name,children:n};return 0==n.length&&(r.loading=!1),r}))},initProjectData:function(){var t=this,e=this.addData.column_id;if(e){var n=this.cacheColumns.find((function(t){return t.id==e}));n&&(this.addData.project_id=n.project_id,this.addData.column_id=n.id)}else{var r=$A.getStorageInt("cacheAddTaskProjectId"),o=$A.getStorageInt("cacheAddTaskColumnId"),i=this.cacheProjects.find((function(e){return e.id==t.projectId}))||this.cacheProjects.find((function(t){return t.id==r}))||this.cacheProjects.find((function(t){return t.id>0}));if(i){var a=this.cacheColumns.find((function(t){var e=t.project_id,n=t.id;return e==i.id&&n==o}))||this.cacheColumns.find((function(t){return t.project_id==i.id}));a?(this.addData.project_id=a.project_id,this.addData.column_id=a.id):this.$store.dispatch("getColumns",i.id).then((function(){(a=t.cacheColumns.find((function(t){var e=t.project_id,n=t.id;return e==i.id&&n==o}))||t.cacheColumns.find((function(t){return t.project_id==i.id})))&&(t.addData.project_id=a.project_id,t.addData.column_id=a.id)})).catch((function(){}))}}},taskTimeOpenChange:function(t){this.taskTimeOpen=t},taskTimeChange:function(t){var e=$A.date2string(t,"Y-m-d H:i");e[0]&&e[1]&&$A.rightExists(e[0],"00:00")&&$A.rightExists(e[1],"00:00")&&this.$set(t,1,e[1].replace("00:00","23:59"))},onKeydown:function(t){if(13===t.keyCode){if(t.shiftKey)return;t.preventDefault(),this.onAdd()}},addSubTask:function(){""!==this.subName.trim()&&(this.addData.subtasks.push({name:this.subName.trim(),times:[],owner:this.userId}),this.subName="")},taskPriorityContent:function(t){var e=$A.runNum(t.days);return e<=0?t.name+" ("+this.$L("无时间限制")+")":t.name+" ("+e+this.$L("天")+")"},choosePriority:function(t){var e=new Date,n=$A.runNum(t.days);if(n>0){var r=new Date((new Date).setDate(e.getDate()+n));this.$set(this.addData,"times",$A.date2string([e,r]))}else this.$set(this.addData,"times",[]);this.$set(this.addData,"p_level",t.priority),this.$set(this.addData,"p_name",t.name),this.$set(this.addData,"p_color",t.color)},defaultPriority:function(){0!==this.taskPriority.length&&(this.addData.p_name||this.choosePriority(this.taskPriority[0]))},cascaderLoadData:function(t,e){t.loading=!0,this.$store.dispatch("getColumns",t.value).then((function(n){t.children=n.map((function(t){return{value:t.id,label:t.name}})),t.loading=!1,e()})).catch((function(){t.loading=!1,e()}))},cascaderInputChange:function(t){var e=this;this.cascaderValue=t||"",!0!==this.cascaderAlready[this.cascaderValue]&&(this.cascaderAlready[this.cascaderValue]=!0,setTimeout((function(){e.cascaderLoading++}),1e3),this.$store.dispatch("getProjects",{keys:{name:this.cascaderValue},getcolumn:"yes"}).then((function(){e.cascaderLoading--,e.initCascaderData()})).catch((function(){e.cascaderLoading--})))},setData:function(t){void 0!==t.beforeClose&&(this.beforeClose.push(t.beforeClose),delete t.beforeClose),this.addData=Object.assign({},this.addData,t)},onAdd:function(t){var e=this;this.addData.name?(this.loadIng++,this.$store.dispatch("taskAdd",this.addData).then((function(n){var r=n.msg;e.loadIng--,$A.messageSuccess(r),!0===t?(e.addData=Object.assign({},e.addData,{name:"",content:"",subtasks:[]}),e.$refs.input.focus()):(e.addData={cascader:[],name:"",content:"",owner:0,column_id:0,times:[],subtasks:[],p_level:0,p_name:"",p_color:""},e.close())})).catch((function(t){var n=t.msg;e.loadIng--,$A.modalError(n)}))):$A.messageError("任务描述不能为空")},close:function(){this.$emit("input",!this.value)}}};const c=(0,n(51900).Z)(u,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.ready?n("div",{staticClass:"task-add"},[n("div",{staticClass:"head",class:{empty:0==t.addData.cascader.length,visible:t.cascaderShow}},[n("Cascader",{attrs:{data:t.cascaderData,clearable:!1,placeholder:t.$L("请选择项目"),"load-data":t.cascaderLoadData,filterable:""},on:{"on-input-change":t.cascaderInputChange,"on-visible-change":function(e){t.cascaderShow=!t.cascaderShow}},model:{value:t.addData.cascader,callback:function(e){t.$set(t.addData,"cascader",e)},expression:"addData.cascader"}})],1),t._v(" "),n("div",{staticClass:"task-add-form"},[n("div",{staticClass:"title"},[n("Input",{ref:"input",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255,placeholder:t.$L("任务描述")},on:{"on-keydown":t.onKeydown},model:{value:t.addData.name,callback:function(e){t.$set(t.addData,"name",e)},expression:"addData.name"}})],1),t._v(" "),n("div",{staticClass:"desc"},[n("TEditor",{attrs:{plugins:t.taskPlugins,options:t.taskOptions,"option-full":t.taskOptionFull,placeholder:t.$L(t.$store.state.windowMax768?"详细描述,选填...":"详细描述,选填...(点击右键使用工具栏)"),placeholderFull:t.$L("详细描述..."),inline:""},model:{value:t.addData.content,callback:function(e){t.$set(t.addData,"content",e)},expression:"addData.content"}})],1),t._v(" "),n("div",{staticClass:"advanced-option"},[n("Button",{class:{advanced:t.advanced},on:{click:function(e){t.advanced=!t.advanced}}},[t._v(t._s(t.$L("高级选项")))]),t._v(" "),n("ul",{staticClass:"advanced-priority"},t._l(t.taskPriority,(function(e,r){return n("li",{key:r},[n("ETooltip",{attrs:{content:t.taskPriorityContent(e)}},[n("i",{staticClass:"taskfont",style:{color:e.color},domProps:{innerHTML:t._s(t.addData.p_name==e.name?"":"")},on:{click:function(n){return t.choosePriority(e)}}})])],1)})),0),t._v(" "),t.taskDays>0?n("DatePicker",{attrs:{open:t.taskTimeOpen,options:t.timeOptions,placeholder:t.$L("选择计划范围"),format:"yyyy/MM/dd HH:mm",type:"datetimerange",placement:"bottom"},on:{"on-change":function(e){return t.taskTimeChange(t.addData.times)},"on-open-change":t.taskTimeOpenChange},model:{value:t.addData.times,callback:function(e){t.$set(t.addData,"times",e)},expression:"addData.times"}},[n("div",{staticClass:"advanced-time",on:{click:function(e){return t.taskTimeOpenChange(!t.taskTimeOpen)}}},[n("Icon",{attrs:{type:"ios-clock-outline"}}),t._v(" "),n("em",{style:t.addData.p_color?{backgroundColor:t.addData.p_color}:{},attrs:{type:"primary"}},[t._v(t._s(t.taskDays))])],1)]):t._e()],1)]),t._v(" "),t.advanced?n("Form",{staticClass:"task-add-advanced",attrs:{"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{label:t.$L("计划时间")}},[n("DatePicker",{attrs:{options:t.timeOptions,editable:!1,placeholder:t.$L("选择计划范围"),format:"yyyy/MM/dd HH:mm",type:"datetimerange"},on:{"on-change":function(e){return t.taskTimeChange(t.addData.times)}},model:{value:t.addData.times,callback:function(e){t.$set(t.addData,"times",e)},expression:"addData.times"}})],1),t._v(" "),n("FormItem",{attrs:{label:t.$L("任务负责人")}},[n("UserInput",{attrs:{"multiple-max":10,placeholder:t.$L("选择任务负责人"),"project-id":t.addData.project_id},model:{value:t.addData.owner,callback:function(e){t.$set(t.addData,"owner",e)},expression:"addData.owner"}})],1),t._v(" "),n("div",{staticClass:"subtasks"},[t.addData.subtasks.length>0?n("div",{staticClass:"sublist"},[n("Row",[n("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("任务描述")))]),t._v(" "),n("Col",{attrs:{span:"6"}},[t._v(t._s(t.$L("计划时间")))]),t._v(" "),n("Col",{attrs:{span:"6"}},[t._v(t._s(t.$L("负责人")))])],1),t._v(" "),t._l(t.addData.subtasks,(function(e,r){return n("Row",{key:r},[n("Col",{attrs:{span:"12"}},[n("Input",{attrs:{maxlength:255,clearable:""},on:{"on-clear":function(e){return t.addData.subtasks.splice(r,1)}},model:{value:e.name,callback:function(n){t.$set(e,"name",n)},expression:"item.name"}})],1),t._v(" "),n("Col",{attrs:{span:"6"}},[n("DatePicker",{attrs:{options:t.timeOptions,editable:!1,placeholder:t.$L("选择时间"),format:"yyyy/MM/dd HH:mm",type:"datetimerange"},on:{"on-change":function(n){return t.taskTimeChange(e.times)}},model:{value:e.times,callback:function(n){t.$set(e,"times",n)},expression:"item.times"}})],1),t._v(" "),n("Col",{attrs:{span:"6"}},[n("UserInput",{attrs:{"multiple-max":1,placeholder:t.$L("选择负责人"),"project-id":t.addData.project_id},model:{value:e.owner,callback:function(n){t.$set(e,"owner",n)},expression:"item.owner"}})],1)],1)}))],2):t._e(),t._v(" "),n("Input",{class:["enter-input",""==t.subName?"empty":""],attrs:{type:"text",placeholder:t.$L("+ 输入子任务,回车添加子任务")},on:{"on-enter":t.addSubTask},model:{value:t.subName,callback:function(e){t.subName=e},expression:"subName"}})],1)],1):t._e(),t._v(" "),n("div",{staticClass:"ivu-modal-footer"},[n("div",{staticClass:"adaption"},[n("Button",{attrs:{type:"default"},on:{click:t.close}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("ButtonGroup",{staticClass:"page-manage-add-task-button-group"},[n("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onAdd}},[t._v(t._s(t.$L("添加任务")))]),t._v(" "),n("Dropdown",{on:{"on-click":function(e){return t.onAdd(!0)}}},[n("Button",{attrs:{type:"primary"}},[n("Icon",{attrs:{type:"ios-arrow-down"}})],1),t._v(" "),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[n("DropdownItem",{attrs:{disabled:t.loadIng>0}},[t._v(t._s(t.$L("提交继续添加")))])],1)],1)],1)],1)])],1):t._e()}),[],!1,null,null,null).exports},36323:(t,e,n)=>{"use strict";n.d(e,{Z:()=>C});var r=n(20629),o=n(72593),i=n(25199),a=n(96921);function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e-1&&this.taskFiles.splice(i,1),1===n?this.taskFiles.push(r):(this.$refs.upload.fileList.pop(),$A.modalWarning({title:"发送失败",content:"文件 "+e.name+" 发送失败,"+o}))},handleFormatError:function(t){$A.modalWarning({title:"文件格式不正确",content:"文件 "+t.name+" 格式不正确,仅支持发送:"+this.uploadFormat.join(",")})},handleMaxSize:function(t){$A.modalWarning({title:"超出文件大小限制",content:"文件 "+t.name+" 太大,不能发送超过"+$A.bytesToSize(1024*this.maxSize)+"。"})},handleClick:function(){this.$refs.upload.handleClick()},upload:function(t){this.$refs.upload.upload(t)}}};var d=n(51900);const f=(0,d.Z)(l,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("Upload",{ref:"upload",attrs:{name:"files",action:t.actionUrl,headers:t.headers,data:t.params,multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-progress":t.handleProgress,"on-success":t.handleSuccess,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize}})}),[],!1,null,null,null).exports;var m=n(80887),p=n(63481),h=n(80641);function g(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function v(t){for(var e=1;e0&&!this.$store.state.windowMax768},dialogStyle:function(){var t=this.innerHeight,e=this.hasOpenDialog;return t&&e?{minHeight:t-(t>900?200:70)-48+"px"}:{}},cutTime:function(){var t=this.taskDetail,e=Math.round($A.Date(t.start_at).getTime()/1e3),n=Math.round($A.Date(t.end_at).getTime()/1e3);return $A.formatDate("Y/m/d",e)==$A.formatDate("Y/m/d",n)?$A.formatDate("Y/m/d H:i",e)+" ~ "+$A.formatDate("H:i",n):$A.formatDate("Y",e)==$A.formatDate("Y",n)?($A.formatDate("Y/m/d H:i",e)+" ~ "+$A.formatDate("m/d H:i",n)).replace(/( 00:00| 23:59)/g,""):($A.formatDate("Y/m/d H:i",e)+" ~ "+$A.formatDate("Y/m/d H:i",n)).replace(/( 00:00| 23:59)/g,"")},getOwner:function(){var t=this.taskDetail;return $A.isArray(t.task_user)?t.task_user.filter((function(t){return 1===t.owner})).sort((function(t,e){return t.id-e.id})):[]},getAssist:function(){var t=this.taskDetail;return $A.isArray(t.task_user)?t.task_user.filter((function(t){return 1!==t.owner})).sort((function(t,e){return t.id-e.id})):[]},menuList:function(){var t=this.taskDetail,e=[];return t.p_name||e.push({command:"priority",icon:"",name:"优先级"}),$A.isArray(t.task_user)&&t.task_user.find((function(t){return 1!==t.owner}))||e.push({command:"assist",icon:"",name:"协助人员"}),t.end_at||e.push({command:"times",icon:"",name:"截止时间"}),0==this.fileList.length&&e.push({command:"file",icon:"",name:"附件"}),0==this.subList.length&&e.push({command:"subtask",icon:"",name:"子任务"}),e}}),watch:{openTask:{handler:function(t){this.taskDetail=$A.cloneJSON(t)},immediate:!0,deep:!0},taskId:{handler:function(t){t>0?this.ready=!0:(this.timeOpen=!1,this.timeForce=!1,this.assistForce=!1,this.addsubForce=!1,this.receiveShow=!1,this.$refs.owner&&this.$refs.owner.handleClose(),this.$refs.assist&&this.$refs.assist.handleClose())},immediate:!0},receiveShow:function(t){t&&(this.timeValue=this.taskDetail.end_at?[this.taskDetail.start_at,this.taskDetail.end_at]:[])}},methods:{initLanguage:function(){},innerHeightListener:function(){this.innerHeight=Math.min(1100,window.innerHeight)},expiresFormat:function(t){return $A.countDownFormat(t,this.nowTime)},onNameKeydown:function(t){83===t.keyCode?(t.metaKey||t.ctrlKey)&&(t.preventDefault(),this.updateData("name")):13===t.keyCode&&(t.shiftKey||(t.preventDefault(),this.updateData("name")))},updateData:function(t,e){var n=this;switch(t){case"priority":this.$set(this.taskDetail,"p_level",e.priority),this.$set(this.taskDetail,"p_name",e.name),this.$set(this.taskDetail,"p_color",e.color),t=["p_level","p_name","p_color"];break;case"times":this.$set(this.taskDetail,"times",[e.start_at,e.end_at]);break;case"content":if(this.$refs.desc.getContent()==this.taskContent)return;this.$set(this.taskDetail,"content",this.$refs.desc.getContent())}var r={task_id:this.taskDetail.id};($A.isArray(t)?t:[t]).forEach((function(t){var e=n.taskDetail[t],o=n.openTask[t];$A.jsonStringify(e)!=$A.jsonStringify(o)&&(r[t]=e)})),Object.keys(r).length<=1||this.$store.dispatch("taskUpdate",r).then((function(t){var e=t.msg;$A.messageSuccess(e)})).catch((function(t){var e=t.msg;$A.modalError(e)}))},archivedOrRemoveTask:function(t){var e=this,n="remove"==t?"removeTask":"archivedTask",r="remove"==t?"删除":"归档",o=this.taskDetail.parent_id>0?"子任务":"任务";$A.modalConfirm({title:r+o,content:"你确定要"+r+o+"【"+this.taskDetail.name+"】吗?",loading:!0,onOk:function(){!0!==e.taskDetail.loading?(e.$set(e.taskDetail,"loading",!0),e.$store.dispatch(n,e.taskDetail.id).then((function(t){var n=t.msg;$A.messageSuccess(n),e.$Modal.remove()})).catch((function(t){var n=t.msg;$A.modalError(n,301),e.$Modal.remove()}))):e.$Modal.remove()}})},openOwner:function(){var t=this.getOwner.map((function(t){return t.userid}));this.$set(this.taskDetail,"owner_userid",t),this.$set(this.ownerData,"owner_userid",t),this.ownerShow=!0},onOwner:function(t){var e=this,n={task_id:this.taskDetail.id,owner:this.ownerData.owner_userid};if(!0===t){if(this.getOwner.length>0)return this.receiveShow=!1,void $A.messageError("任务已被领取");var r=$A.date2string(this.timeValue,"Y-m-d H:i");if(!r[0]||!r[1])return void $A.messageError("请设置计划时间");$A.rightExists(r[0],"00:00")&&$A.rightExists(r[1],"00:00")&&(r[1]=r[1].replace("00:00","23:59")),n.times=r,n.owner=this.ownerData.owner_userid=[this.userId]}$A.jsonStringify(this.taskDetail.owner_userid)!==$A.jsonStringify(this.ownerData.owner_userid)&&(0==$A.count(n.owner)&&(n.owner=""),this.ownerLoad++,this.$store.dispatch("taskUpdate",n).then((function(t){var n=t.msg;$A.messageSuccess(n),e.ownerLoad--,e.ownerShow=!1,e.receiveShow=!1,e.$store.dispatch("getTaskOne",e.taskDetail.id).catch((function(){}))})).catch((function(t){var n=t.msg;$A.modalError(n),e.ownerLoad--,e.ownerShow=!1,e.receiveShow=!1})))},openAssist:function(){var t=this.getAssist.map((function(t){return t.userid}));this.$set(this.taskDetail,"assist_userid",t),this.$set(this.assistData,"assist_userid",t),this.$set(this.assistData,"disabled",this.getOwner.map((function(t){return t.userid}))),this.assistShow=!0},onAssist:function(){var t=this;if($A.jsonStringify(this.taskDetail.assist_userid)!==$A.jsonStringify(this.assistData.assist_userid)){var e=this.assistData.assist_userid;0===e.length&&(e=!1),this.assistLoad++,this.$store.dispatch("taskUpdate",{task_id:this.taskDetail.id,assist:e}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.assistLoad--,t.assistShow=!1,t.$store.dispatch("getTaskOne",t.taskDetail.id).catch((function(){}))})).catch((function(e){var n=e.msg;$A.modalError(n),t.assistLoad--,t.assistShow=!1}))}},openTime:function(){this.timeOpen=!this.timeOpen,this.timeOpen&&(this.timeValue=this.taskDetail.end_at?[this.taskDetail.start_at,this.taskDetail.end_at]:[])},timeChange:function(t){t||(this.timeOpen=!1)},timeClear:function(){this.updateData("times",{start_at:!1,end_at:!1}),this.timeOpen=!1},timeOk:function(){var t=$A.date2string(this.timeValue,"Y-m-d H:i");t[0]&&t[1]&&$A.rightExists(t[0],"00:00")&&$A.rightExists(t[1],"00:00")&&(t[1]=t[1].replace("00:00","23:59")),this.updateData("times",{start_at:t[0],end_at:t[1]}),this.timeOpen=!1},addsubOpen:function(){var t=this;this.addsubShow=!0,this.$nextTick((function(){t.$refs.addsub.focus()}))},addsubChackClose:function(){""==this.addsubName&&(this.addsubShow=!1)},addsubKeydown:function(t){if(13===t.keyCode){if(t.shiftKey)return;t.preventDefault(),this.onAddsub()}},onAddsub:function(){var t=this;""!=this.addsubName?(this.addsubLoad++,this.$store.dispatch("taskAddSub",{task_id:this.taskDetail.id,name:this.addsubName}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.addsubLoad--,t.addsubName=""})).catch((function(e){var n=e.msg;$A.modalError(n),t.addsubLoad--}))):$A.messageSuccess("任务描述不能为空")},getLogLists:function(){"log"==this.navActive&&this.$refs.log.getLists(!0)},logLoadChange:function(t){this.logLoadIng=t},dropAdd:function(t){var e=this;switch(t){case"priority":this.$set(this.taskDetail,"p_name",this.$L("未设置")),this.$nextTick((function(){e.$refs.priority.show()}));break;case"assist":this.assistForce=!0,this.openAssist(),this.$nextTick((function(){e.$refs.assist.handleClick()}));break;case"times":this.timeForce=!0,this.$nextTick((function(){e.openTime()}));break;case"file":this.$refs.upload.handleClick();break;case"subtask":this.addsubForce=!0,this.$nextTick((function(){e.addsubOpen()}))}},msgKeydown:function(t){if(13===t.keyCode){if(t.shiftKey)return;t.preventDefault(),this.msgDialog()}},msgDialog:function(){var t=this;this.msgText&&(this.sendLoad>0||(this.sendLoad++,this.$store.dispatch("call",{url:"project/task/dialog",data:{task_id:this.taskDetail.id}}).then((function(e){var n=e.data;t.$store.dispatch("saveTask",n),t.$store.dispatch("getDialogOne",n.dialog_id).then((function(){t.sendLoad--,$A.isSubElectron?t.resizeDialog():t.$nextTick((function(){t.$store.state.windowMax768?(t.goForward({path:"/manage/messenger",query:{sendmsg:t.msgText}}),$A.setStorage("messenger::dialogId",n.dialog_id),t.$store.state.dialogOpenId=n.dialog_id,t.$store.dispatch("openTask",0)):t.$refs.dialog.sendMsg(t.msgText),t.msgText=""}))})).catch((function(e){var n=e.msg;t.sendLoad--,$A.modalError(n)}))})).catch((function(e){var n=e.msg;t.sendLoad--,$A.modalError(n)}))))},openSend:function(){var t=this;this.sendLoad>0||(this.sendLoad++,this.$store.dispatch("call",{url:"project/task/dialog",data:{task_id:this.taskDetail.id}}).then((function(e){var n=e.data;t.sendLoad--,t.$store.dispatch("saveTask",n),t.$store.dispatch("getDialogOne",n.dialog_id).catch((function(){})),$A.isSubElectron?t.resizeDialog():t.$nextTick((function(){t.goForward({path:"/manage/messenger",query:{sendmsg:t.msgText}}),$A.setStorage("messenger::dialogId",n.dialog_id),t.$store.state.dialogOpenId=n.dialog_id,t.$store.dispatch("openTask",0)}))})).catch((function(e){var n=e.msg;t.sendLoad--,$A.modalError(n)})))},deleteFile:function(t){var e=this;this.$set(t,"_deling",!1),this.$store.dispatch("forgetTaskFile",t.id),this.$store.dispatch("call",{url:"project/task/filedelete",data:{file_id:t.id}}).catch((function(t){var n=t.msg;$A.modalError(n),e.$store.dispatch("getTaskFiles",e.taskDetail.id)}))},openMenu:function(t){var e=this.$refs["taskMenu_".concat(t.id)];e&&e.handleClick()},openNewWin:function(){var t={parent:null,width:Math.min(window.screen.availWidth,this.$el.clientWidth+72),height:Math.min(window.screen.availHeight,this.$el.clientHeight+72),minWidth:600,minHeight:450};this.hasOpenDialog&&(t.minWidth=800,t.minHeight=600),this.$Electron.ipcRenderer.send("windowRouter",{title:this.taskDetail.name,titleFixed:!0,name:"task-"+this.taskDetail.id,path:"/single/task/"+this.taskDetail.id,force:!1,config:t}),this.$store.dispatch("openTask",0)},resizeDialog:function(){var t=this;if(this.$Electron.ipcRenderer.sendSync("windowSize",{width:Math.max(1100,window.innerWidth),height:Math.max(720,window.innerHeight),minWidth:800,minHeight:600,autoZoom:!0}),this.msgText)var e=0,n=setInterval((function(){e++,(t.$refs.dialog||e>20)&&(clearInterval(n),t.$refs.dialog&&(t.$refs.dialog.sendMsg(t.msgText),t.msgText=""))}),100)}}};const C=(0,d.Z)(y,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.ready&&t.taskDetail.parent_id>0?n("li",[n("div",{staticClass:"subtask-icon"},[n("TaskMenu",{ref:"taskMenu_"+t.taskDetail.id,attrs:{task:t.taskDetail,"load-status":!0===t.taskDetail.loading},on:{"on-update":t.getLogLists}})],1),t._v(" "),t.taskDetail.flow_item_name?n("div",{staticClass:"subtask-flow"},[n("span",{class:t.taskDetail.flow_item_status,on:{click:function(e){return e.stopPropagation(),t.openMenu(t.taskDetail)}}},[t._v(t._s(t.taskDetail.flow_item_name))])]):t._e(),t._v(" "),n("div",{staticClass:"subtask-name"},[n("Input",{attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255},on:{"on-blur":function(e){return t.updateData("name")},"on-keydown":t.onNameKeydown},model:{value:t.taskDetail.name,callback:function(e){t.$set(t.taskDetail,"name",e)},expression:"taskDetail.name"}})],1),t._v(" "),n("DatePicker",{staticClass:"subtask-time",attrs:{open:t.timeOpen,options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",placement:"bottom-end",transfer:""},on:{"on-open-change":t.timeChange,"on-clear":t.timeClear,"on-ok":t.timeOk},model:{value:t.timeValue,callback:function(e){t.timeValue=e},expression:"timeValue"}},[t.taskDetail.end_at&&t.taskDetail.end_at!=t.mainEndAt?n("div",{class:["time",t.taskDetail.today?"today":"",t.taskDetail.overdue?"overdue":""],on:{click:t.openTime}},[t._v("\n "+t._s(t.expiresFormat(t.taskDetail.end_at))+"\n ")]):n("Icon",{staticClass:"clock",attrs:{type:"ios-clock-outline"},on:{click:t.openTime}})],1),t._v(" "),n("Poptip",{ref:"owner",staticClass:"subtask-avatar",attrs:{title:t.$L("修改负责人"),width:240,placement:"bottom",transfer:""},on:{"on-popper-show":t.openOwner,"on-popper-hide":function(e){t.ownerShow=!1},"on-ok":t.onOwner}},[n("div",{attrs:{slot:"content"},slot:"content"},[t.ownerShow?n("UserInput",{attrs:{"multiple-max":1,"project-id":t.taskDetail.project_id,placeholder:t.$L("选择任务负责人")},model:{value:t.ownerData.owner_userid,callback:function(e){t.$set(t.ownerData,"owner_userid",e)},expression:"ownerData.owner_userid"}}):t._e(),t._v(" "),n("div",{staticClass:"task-detail-avatar-buttons"},[n("Button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.$refs.owner.ok()}}},[t._v(t._s(t.$L("确定")))])],1)],1),t._v(" "),t.getOwner.length>0?t._l(t.getOwner,(function(t){return n("UserAvatar",{key:t.userid,attrs:{userid:t.userid,size:20,tooltipDisabled:""}})})):n("div",[t._v("--")])],2)],1):t.ready?n("div",{class:{"task-detail":!0,"open-dialog":t.hasOpenDialog,completed:t.taskDetail.complete_at}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.taskDetail.id>0,expression:"taskDetail.id > 0"}],staticClass:"task-info"},[n("div",{staticClass:"head"},[n("TaskMenu",{ref:"taskMenu_"+t.taskDetail.id,staticClass:"icon",attrs:{task:t.taskDetail,size:"medium","color-show":!1},on:{"on-update":t.getLogLists}}),t._v(" "),t.taskDetail.flow_item_name?n("div",{staticClass:"flow"},[n("span",{class:t.taskDetail.flow_item_status,on:{click:function(e){return e.stopPropagation(),t.openMenu(t.taskDetail)}}},[t._v(t._s(t.taskDetail.flow_item_name))])]):t._e(),t._v(" "),n("div",{staticClass:"nav"},[t.projectName?n("p",[n("span",[t._v(t._s(t.projectName))])]):t._e(),t._v(" "),t.columnName?n("p",[n("span",[t._v(t._s(t.columnName))])]):t._e(),t._v(" "),t.taskDetail.id?n("p",[n("span",[t._v(t._s(t.taskDetail.id))])]):t._e()]),t._v(" "),n("div",{staticClass:"function"},[0===t.getOwner.length?n("EPopover",{attrs:{placement:"bottom"},model:{value:t.receiveShow,callback:function(e){t.receiveShow=e},expression:"receiveShow"}},[n("div",{staticClass:"task-detail-receive"},[n("div",{staticClass:"receive-title"},[n("Icon",{attrs:{type:"ios-help-circle"}}),t._v("\n "+t._s(t.$L("确认计划时间领取任务"))+"\n ")],1),t._v(" "),n("div",{staticClass:"receive-time"},[n("DatePicker",{attrs:{options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",placeholder:t.$L("请设置计划时间"),clearable:!1,editable:!1},model:{value:t.timeValue,callback:function(e){t.timeValue=e},expression:"timeValue"}})],1),t._v(" "),n("div",{staticClass:"receive-bottom"},[n("Button",{attrs:{size:"small",type:"text"},on:{click:function(e){t.receiveShow=!1}}},[t._v("取消")]),t._v(" "),n("Button",{attrs:{loading:t.ownerLoad>0,size:"small",type:"primary"},on:{click:function(e){return t.onOwner(!0)}}},[t._v("确定")])],1)]),t._v(" "),n("Button",{staticClass:"pick",attrs:{slot:"reference",loading:t.ownerLoad>0,type:"primary"},slot:"reference"},[t._v(t._s(t.$L("我要领取任务")))])],1):t._e(),t._v(" "),t.$Electron?n("ETooltip",{attrs:{content:t.$L("新窗口打开")}},[n("i",{staticClass:"taskfont open",on:{click:t.openNewWin}},[t._v("")])]):t._e(),t._v(" "),n("div",{staticClass:"menu"},[n("TaskMenu",{attrs:{task:t.taskDetail,icon:"ios-more","completed-icon":"ios-more",size:"medium","color-show":!1},on:{"on-update":t.getLogLists}})],1)],1)],1),t._v(" "),n("div",{staticClass:"scroller overlay-y"},[n("div",{staticClass:"title"},[n("Input",{attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255},on:{"on-blur":function(e){return t.updateData("name")},"on-keydown":t.onNameKeydown},model:{value:t.taskDetail.name,callback:function(e){t.$set(t.taskDetail,"name",e)},expression:"taskDetail.name"}})],1),t._v(" "),n("div",{staticClass:"desc"},[n("TEditor",{ref:"desc",attrs:{value:t.taskContent,plugins:t.taskPlugins,options:t.taskOptions,"option-full":t.taskOptionFull,placeholder:t.$L("详细描述..."),inline:""},on:{"on-blur":function(e){return t.updateData("content")},editorSave:function(e){return t.updateData("content")}}})],1),t._v(" "),n("Form",{staticClass:"items",attrs:{"label-position":"left","label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[t.taskDetail.p_name?n("FormItem",[n("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("优先级"))+"\n ")]),t._v(" "),n("ul",{staticClass:"item-content"},[n("li",[n("EDropdown",{ref:"priority",attrs:{trigger:"click",placement:"bottom"},on:{command:function(e){return t.updateData("priority",e)}}},[n("TaskPriority",{attrs:{backgroundColor:t.taskDetail.p_color}},[t._v(t._s(t.taskDetail.p_name))]),t._v(" "),n("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.taskPriority,(function(e,r){return n("EDropdownItem",{key:r,attrs:{command:e}},[n("i",{staticClass:"taskfont",style:{color:e.color},domProps:{innerHTML:t._s(t.taskDetail.p_name==e.name?"":"")}}),t._v("\n "+t._s(e.name)+"\n ")])})),1)],1)],1)])]):t._e(),t._v(" "),t.getOwner.length>0?n("FormItem",[n("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("负责人"))+"\n ")]),t._v(" "),n("Poptip",{ref:"owner",staticClass:"item-content user",attrs:{title:t.$L("修改负责人"),width:240,placement:"bottom",transfer:""},on:{"on-popper-show":t.openOwner,"on-popper-hide":function(e){t.ownerShow=!1},"on-ok":t.onOwner}},[n("div",{attrs:{slot:"content"},slot:"content"},[t.ownerShow?n("UserInput",{attrs:{"multiple-max":10,"project-id":t.taskDetail.project_id,placeholder:t.$L("选择任务负责人")},model:{value:t.ownerData.owner_userid,callback:function(e){t.$set(t.ownerData,"owner_userid",e)},expression:"ownerData.owner_userid"}}):t._e(),t._v(" "),n("div",{staticClass:"task-detail-avatar-buttons"},[n("Button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.$refs.owner.ok()}}},[t._v(t._s(t.$L("确定")))])],1)],1),t._v(" "),n("div",{staticClass:"user-list"},t._l(t.getOwner,(function(e){return n("UserAvatar",{key:e.userid,attrs:{userid:e.userid,size:28,showName:1===t.getOwner.length,tooltipDisabled:""}})})),1)])],1):t._e(),t._v(" "),t.getAssist.length>0||t.assistForce?n("FormItem",[n("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("协助人员"))+"\n ")]),t._v(" "),n("Poptip",{ref:"assist",staticClass:"item-content user",attrs:{title:t.$L(t.getAssist.length>0?"修改协助人员":"添加协助人员"),width:280,placement:"bottom",transfer:""},on:{"on-popper-show":t.openAssist,"on-popper-hide":function(e){t.assistShow=!1},"on-ok":t.onAssist}},[n("div",{attrs:{slot:"content"},slot:"content"},[t.assistShow?n("UserInput",{attrs:{"multiple-max":10,"project-id":t.taskDetail.project_id,"disabled-choice":t.assistData.disabled,placeholder:t.$L("选择任务协助人员")},model:{value:t.assistData.assist_userid,callback:function(e){t.$set(t.assistData,"assist_userid",e)},expression:"assistData.assist_userid"}}):t._e(),t._v(" "),n("div",{staticClass:"task-detail-avatar-buttons"},[n("Button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.$refs.assist.ok()}}},[t._v(t._s(t.$L("确定")))])],1)],1),t._v(" "),t.getAssist.length>0?n("div",{staticClass:"user-list"},t._l(t.getAssist,(function(e){return n("UserAvatar",{key:e.userid,attrs:{userid:e.userid,size:28,showName:1===t.getAssist.length,tooltipDisabled:""}})})),1):n("div",[t._v("--")])])],1):t._e(),t._v(" "),t.taskDetail.end_at||t.timeForce?n("FormItem",[n("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("截止时间"))+"\n ")]),t._v(" "),n("ul",{staticClass:"item-content"},[n("li",[n("DatePicker",{attrs:{open:t.timeOpen,options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",transfer:""},on:{"on-open-change":t.timeChange,"on-clear":t.timeClear,"on-ok":t.timeOk},model:{value:t.timeValue,callback:function(e){t.timeValue=e},expression:"timeValue"}},[n("div",{staticClass:"picker-time"},[n("div",{staticClass:"time",on:{click:t.openTime}},[t._v(t._s(t.taskDetail.end_at?t.cutTime:"--"))]),t._v(" "),!t.taskDetail.complete_at&&t.taskDetail.today?n("Tag",{attrs:{color:"blue"}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.expiresFormat(t.taskDetail.end_at)))]):t._e(),t._v(" "),!t.taskDetail.complete_at&&t.taskDetail.overdue?n("Tag",{attrs:{color:"red"}},[t._v(t._s(t.$L("超期未完成")))]):t._e()],1)])],1)])]):t._e(),t._v(" "),t.fileList.length>0?n("FormItem",[n("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("附件"))+"\n ")]),t._v(" "),n("ul",{staticClass:"item-content file"},t._l(t.fileList,(function(e){return n("li",[e.id?n("img",{staticClass:"file-ext",attrs:{src:e.thumb}}):n("Loading",{staticClass:"file-load"}),t._v(" "),n("a",{staticClass:"file-name",attrs:{href:e.path||"javascript:;",target:"_blank"}},[t._v(t._s(e.name))]),t._v(" "),n("div",{staticClass:"file-size"},[t._v(t._s(t.$A.bytesToSize(e.size)))]),t._v(" "),n("EPopover",{staticClass:"file-delete",model:{value:e._deling,callback:function(n){t.$set(e,"_deling",n)},expression:"file._deling"}},[n("div",{staticClass:"task-detail-delete-file-popover"},[n("p",[t._v(t._s(t.$L("你确定要删除这个文件吗?")))]),t._v(" "),n("div",{staticClass:"buttons"},[n("Button",{attrs:{size:"small",type:"text"},on:{click:function(t){e._deling=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{size:"small",type:"primary"},on:{click:function(n){return t.deleteFile(e)}}},[t._v(t._s(t.$L("确定")))])],1)]),t._v(" "),n("i",{class:["taskfont",e._deling?"deling":""],attrs:{slot:"reference"},slot:"reference"},[t._v("")])])],1)})),0),t._v(" "),n("ul",{staticClass:"item-content"},[n("li",[n("div",{staticClass:"add-button",on:{click:function(e){return t.$refs.upload.handleClick()}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("添加附件"))+"\n ")])])])]):t._e(),t._v(" "),t.subList.length>0||t.addsubForce?n("FormItem",[n("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("子任务"))+"\n ")]),t._v(" "),n("ul",{staticClass:"item-content subtask"},t._l(t.subList,(function(e,r){return n("TaskDetail",{key:r,attrs:{"task-id":e.id,"open-task":e,"main-end-at":t.taskDetail.end_at}})})),1),t._v(" "),n("ul",{class:["item-content",0===t.subList.length?"nosub":""]},[n("li",[t.addsubShow?n("Input",{ref:"addsub",staticClass:"add-input",class:{loading:t.addsubLoad>0},attrs:{placeholder:t.$L("+ 输入子任务,回车添加子任务"),icon:t.addsubLoad>0?"ios-loading":""},on:{"on-blur":t.addsubChackClose,"on-keydown":t.addsubKeydown},model:{value:t.addsubName,callback:function(e){t.addsubName=e},expression:"addsubName"}}):n("div",{staticClass:"add-button",on:{click:t.addsubOpen}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("添加子任务"))+"\n ")])],1)])]):t._e()],1),t._v(" "),t.menuList.length>0?n("div",{staticClass:"add"},[n("EDropdown",{attrs:{trigger:"click",placement:"bottom"},on:{command:t.dropAdd}},[n("div",{staticClass:"add-button"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("添加"))+"\n "),t._l(t.menuList,(function(e){return n("em",[t._v(t._s(t.$L(e.name)))])}))],2),t._v(" "),n("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.menuList,(function(e,r){return n("EDropdownItem",{key:r,attrs:{command:e.command}},[n("div",{staticClass:"item"},[n("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(e.icon)}}),t._v(t._s(t.$L(e.name))+"\n ")])])})),1)],1)],1):t._e()],1),t._v(" "),n("TaskUpload",{ref:"upload",staticClass:"upload"})],1),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.taskDetail.id>0,expression:"taskDetail.id > 0"}],staticClass:"task-dialog",style:t.dialogStyle},[t.hasOpenDialog?[t.taskId>0?n("DialogWrapper",{ref:"dialog",attrs:{"dialog-id":t.taskDetail.dialog_id}},[n("div",{staticClass:"head",attrs:{slot:"head"},slot:"head"},[n("Icon",{staticClass:"icon",attrs:{type:"ios-chatbubbles-outline"}}),t._v(" "),n("div",{staticClass:"nav"},[n("p",{class:{active:"dialog"==t.navActive},on:{click:function(e){t.navActive="dialog"}}},[t._v(t._s(t.$L("聊天")))]),t._v(" "),n("p",{class:{active:"log"==t.navActive},on:{click:function(e){t.navActive="log"}}},[t._v(t._s(t.$L("动态")))]),t._v(" "),"log"==t.navActive?n("div",{staticClass:"refresh"},[t.logLoadIng?n("Loading"):n("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getLogLists}})],1):t._e()])],1)]):t._e(),t._v(" "),"log"==t.navActive&&t.taskId>0?n("ProjectLog",{ref:"log",attrs:{"task-id":t.taskDetail.id},on:{"on-load-change":t.logLoadChange}}):t._e()]:n("div",[n("div",{staticClass:"head"},[n("Icon",{staticClass:"icon",attrs:{type:"ios-chatbubbles-outline"}}),t._v(" "),n("div",{staticClass:"nav"},[n("p",{class:{active:"dialog"==t.navActive},on:{click:function(e){t.navActive="dialog"}}},[t._v(t._s(t.$L("聊天")))]),t._v(" "),n("p",{class:{active:"log"==t.navActive},on:{click:function(e){t.navActive="log"}}},[t._v(t._s(t.$L("动态")))]),t._v(" "),"log"==t.navActive?n("div",{staticClass:"refresh"},[t.logLoadIng?n("Loading"):n("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getLogLists}})],1):t._e()])],1),t._v(" "),"log"==t.navActive&&t.taskId>0?n("ProjectLog",{ref:"log",attrs:{"task-id":t.taskDetail.id},on:{"on-load-change":t.logLoadChange}}):n("div",{staticClass:"no-dialog"},[n("div",{staticClass:"no-tip"},[t._v(t._s(t.$L("暂无消息")))]),t._v(" "),n("div",{staticClass:"no-input"},[n("Input",{staticClass:"dialog-input",attrs:{type:"textarea",disabled:t.sendLoad>0,rows:1,autosize:{minRows:1,maxRows:3},maxlength:255,placeholder:t.$L("输入消息...")},on:{"on-keydown":t.msgKeydown},model:{value:t.msgText,callback:function(e){t.msgText=e},expression:"msgText"}}),t._v(" "),n("div",{staticClass:"no-send",on:{click:t.openSend}},[t.sendLoad>0?n("Loading"):n("Icon",{attrs:{type:"md-send"}})],1)],1)])],1)],2),t._v(" "),t.taskDetail.id?t._e():n("div",{staticClass:"task-load"},[n("Loading")],1)]):t._e()}),[],!1,null,null,null).exports},36813:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(20629);function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t){for(var e=1;e0},flow:function(){var t=this;return this.taskFlows.find((function(e){return e.task_id==t.task.id}))},turns:function(){var t=this;if(!this.flow)return[];var e=this.taskFlowItems.find((function(e){return e.id==t.flow.flow_item_id}));return e?this.taskFlowItems.filter((function(t){var n=t.id;return e.turns.includes(n)})):[]}}),methods:{show:function(){this.$refs.dropdown.show()},hide:function(){this.$refs.dropdown.hide()},handleClick:function(){this.$refs.dropdown.handleClick()},dropTask:function(t){var e=this;if($A.isJson(t))t.name&&this.updateTask({color:t.color}).catch((function(){}));else if($A.leftExists(t,"turn::")){var n=$A.leftDelete(t,"turn::");if(n==this.task.flow_item_id)return;this.updateTask({flow_item_id:n}).catch((function(){}))}else{var r=this.task;switch(t){case"complete":if(this.task.complete_at)return;this.updateBefore&&this.$store.dispatch("saveTaskCompleteTemp",r),this.updateTask({complete_at:$A.formatDate("Y-m-d H:i:s")}).then((function(){e.$store.dispatch("saveTaskCompleteTemp",r)})).catch((function(){e.$store.dispatch("forgetTaskCompleteTemp",r.id)}));break;case"uncomplete":if(!this.task.complete_at)return;this.updateBefore&&this.$store.dispatch("forgetTaskCompleteTemp",r.id),this.updateTask({complete_at:!1}).then((function(){e.$store.dispatch("forgetTaskCompleteTemp",r.id)})).catch((function(){e.$store.dispatch("saveTaskCompleteTemp",r)}));break;case"archived":case"remove":this.archivedOrRemoveTask(t)}}},visibleChange:function(t){t&&this.$store.dispatch("getTaskFlow",this.task.id).catch((function(){}))},updateTask:function(t){var e=this;return new Promise((function(n,r){e.loadIng?r():(Object.keys(t).forEach((function(n){return e.$set(e.task,n,t[n])})),e.$store.dispatch("taskUpdate",Object.assign(t,{task_id:e.task.id})).then((function(t){var r=t.data,o=t.msg;$A.messageSuccess(o),n(),e.$emit("on-update",r)})).catch((function(t){var n=t.msg;$A.modalError(n),e.$store.dispatch("getTaskOne",e.task.id).catch((function(){})),r()})))}))},archivedOrRemoveTask:function(t){var e=this,n="remove"==t?"removeTask":"archivedTask",r="remove"==t?"删除":"归档",o=this.task.parent_id>0?"子任务":"任务";$A.modalConfirm({title:r+o,content:"你确定要"+r+o+"【"+this.task.name+"】吗?",loading:!0,onOk:function(){e.loadIng?e.$Modal.remove():e.$store.dispatch(n,e.task.id).then((function(t){var n=t.msg;$A.messageSuccess(n),e.$Modal.remove()})).catch((function(t){var n=t.msg;$A.modalError(n,301),e.$Modal.remove()}))}})}}};const u=(0,n(51900).Z)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("EDropdown",{ref:"dropdown",attrs:{trigger:"click",size:t.size,placement:"bottom"},on:{command:t.dropTask,"visible-change":t.visibleChange}},[t._t("icon",(function(){return[n("div",{staticClass:"task-menu-icon"},[t.loadIng?n("div",{staticClass:"loading"},[n("Loading")],1):[t.task.complete_at?n("Icon",{staticClass:"completed",attrs:{type:t.completedIcon}}):n("Icon",{staticClass:"uncomplete",attrs:{type:t.icon}})]],2)]})),t._v(" "),n("EDropdownMenu",{staticClass:"task-menu-more-dropdown",attrs:{slot:"dropdown"},slot:"dropdown"},[n("li",{staticClass:"task-menu-more-warp",class:t.size},[n("ul",[t.flow?t.turns.length>0?t._l(t.turns,(function(e){return n("EDropdownItem",{key:e.id,attrs:{command:"turn::"+e.id}},[n("div",{staticClass:"item flow"},[e.id==t.task.flow_item_id&&!0!==t.flow.auto_assign?n("Icon",{staticClass:"check",attrs:{type:"md-checkmark-circle-outline"}}):n("Icon",{attrs:{type:"md-radio-button-off"}}),t._v(" "),n("div",{staticClass:"flow-name",class:e.status},[t._v(t._s(e.name))])],1)])})):[t.task.complete_at?n("EDropdownItem",{attrs:{command:"uncomplete"}},[n("div",{staticClass:"item red"},[n("Icon",{attrs:{type:"md-checkmark-circle-outline"}}),t._v(t._s(t.$L("标记未完成"))+"\n ")],1)]):n("EDropdownItem",{attrs:{command:"complete"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-radio-button-off"}}),t._v(t._s(t.$L("完成"))+"\n ")],1)])]:n("EDropdownItem",{staticClass:"load-flow",attrs:{disabled:""}},[n("div",{staticClass:"load-flow-warp"},[n("Loading")],1)]),t._v(" "),0===t.task.parent_id?[n("EDropdownItem",{attrs:{divided:t.turns.length>0,command:"archived"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"ios-filing"}}),t._v(t._s(t.$L("归档"))+"\n ")],1)]),t._v(" "),n("EDropdownItem",{attrs:{command:"remove"}},[n("div",{staticClass:"item hover-del"},[n("Icon",{attrs:{type:"md-trash"}}),t._v(t._s(t.$L("删除"))+"\n ")],1)]),t._v(" "),t.colorShow?t._l(t.taskColorList,(function(e,r){return n("EDropdownItem",{key:"c_"+r,attrs:{divided:0==r,command:e}},[n("div",{staticClass:"item"},[n("i",{staticClass:"taskfont",style:{color:e.color||"#f9f9f9"},domProps:{innerHTML:t._s(e.color==t.task.color?"":"")}}),t._v(t._s(t.$L(e.name))+"\n ")])])})):t._e()]:n("EDropdownItem",{attrs:{command:"remove",divided:t.turns.length>0}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-trash"}}),t._v(t._s(t.$L("删除"))+"\n ")],1)])],2)])])],2)}),[],!1,null,null,null).exports},25199:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e{"use strict";n.d(e,{Z:()=>i});var r=n(1519),o=n.n(r)()((function(t){return t[1]}));o.push([t.id,'.component-resize-line[data-v-eaab078e]{cursor:col-resize}@media (max-width:768px){.component-resize-line[data-v-eaab078e]{display:none}}.component-resize-line.resizing[data-v-eaab078e]:after{bottom:0;content:"";cursor:col-resize;left:0;position:fixed;right:0;top:0;z-index:99999}.component-resize-line.bottom[data-v-eaab078e],.component-resize-line.bottom[data-v-eaab078e]:after{cursor:row-resize}',""]);const i=o},47575:(t,e,n)=>{!function(){"use strict";var e=function(t){if(null===t)return"null";if(void 0===t)return"undefined";var e=typeof t;return"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e},r=function(t){return{eq:t}},o=r((function(t,e){return t===e})),i=function(t){return r((function(e,n){if(e.length!==n.length)return!1;for(var r=e.length,o=0;o-1},H=function(t,e){for(var n=0,r=t.length;n=0;n--){e(t[n],n)}},K=function(t,e){for(var n=[],r=[],o=0,i=t.length;o=0&&e=e.length&&t.substr(n,n+e.length)===e}(t,e,0)},jt=function(t){return function(e){return e.replace(t,"")}},zt=jt(/^\s+|\s+$/g),Ft=jt(/^\s+/g),Ut=jt(/\s+$/g),Ht=function(t){return t.length>0},Vt=function(t){return!Ht(t)},Wt=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,qt=function(t){return function(e){return Bt(e,t)}},Kt=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return Bt(t,"edge/")&&Bt(t,"chrome")&&Bt(t,"safari")&&Bt(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Wt],search:function(t){return Bt(t,"chrome")&&!Bt(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return Bt(t,"msie")||Bt(t,"trident")}},{name:"Opera",versionRegexes:[Wt,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:qt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:qt("firefox")},{name:"Safari",versionRegexes:[Wt,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(Bt(t,"safari")||Bt(t,"mobile/"))&&Bt(t,"applewebkit")}}],Yt=[{name:"Windows",search:qt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return Bt(t,"iphone")||Bt(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:qt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:qt("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:qt("linux"),versionRegexes:[]},{name:"Solaris",search:qt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:qt("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:qt("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Xt={browsers:D(Kt),oses:D(Yt)},Zt="Edge",Gt="Chrome",Jt="Opera",Qt="Firefox",te="Safari",ee=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isEdge:r(Zt),isChrome:r(Gt),isIE:r("IE"),isOpera:r(Jt),isFirefox:r(Qt),isSafari:r(te)}},ne={unknown:function(){return ee({current:void 0,version:It.unknown()})},nu:ee,edge:D(Zt),chrome:D(Gt),ie:D("IE"),opera:D(Jt),firefox:D(Qt),safari:D(te)},re="Windows",oe="Android",ie="Linux",ae="Solaris",se="FreeBSD",ue="ChromeOS",ce=function(t){var e=t.current,n=t.version,r=function(t){return function(){return e===t}};return{current:e,version:n,isWindows:r(re),isiOS:r("iOS"),isAndroid:r(oe),isOSX:r("OSX"),isLinux:r(ie),isSolaris:r(ae),isFreeBSD:r(se),isChromeOS:r(ue)}},le={unknown:function(){return ce({current:void 0,version:It.unknown()})},nu:ce,windows:D(re),ios:D("iOS"),android:D(oe),linux:D(ie),osx:D("OSX"),solaris:D(ae),freebsd:D(se),chromeos:D(ue)},de=function(t,e,n){var r=Xt.browsers(),o=Xt.oses(),i=e.bind((function(t){return function(t,e){return ct(e.brands,(function(e){var n=e.brand.toLowerCase();return J(t,(function(t){var e;return n===(null===(e=t.brand)||void 0===e?void 0:e.toLowerCase())})).map((function(t){return{current:t.name,version:It.nu(parseInt(e.version,10),0)}}))}))}(r,t)})).orThunk((function(){return function(t,e){return Rt(t,e).map((function(t){var n=It.detect(t.versionRegexes,e);return{current:t.name,version:n}}))}(r,t)})).fold(ne.unknown,ne.nu),a=function(t,e){return Rt(t,e).map((function(t){var n=It.detect(t.versionRegexes,e);return{current:t.name,version:n}}))}(o,t).fold(le.unknown,le.nu),s=function(t,e,n,r){var o=t.isiOS()&&!0===/ipad/i.test(n),i=t.isiOS()&&!o,a=t.isiOS()||t.isAndroid(),s=a||r("(pointer:coarse)"),u=o||!i&&a&&r("(min-device-width:768px)"),c=i||a&&!u,l=e.isSafari()&&t.isiOS()&&!1===/safari/i.test(n),d=!c&&!u&&!l;return{isiPad:D(o),isiPhone:D(i),isTablet:D(u),isPhone:D(c),isTouch:D(s),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:D(l),isDesktop:D(d)}}(a,i,t,n);return{browser:i,os:a,deviceType:s}},fe=function(t){return window.matchMedia(t).matches},me=Nt((function(){return de(navigator.userAgent,B.from(navigator.userAgentData),fe)})),pe=function(){return me()},he=navigator.userAgent,ge=pe(),ve=ge.browser,be=ge.os,ye=ge.deviceType,Ce=/WebKit/.test(he)&&!ve.isEdge(),we="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,_e=-1!==he.indexOf("Windows Phone"),ke={opera:ve.isOpera(),webkit:Ce,ie:!(!ve.isIE()&&!ve.isEdge())&&ve.version.major,gecko:ve.isFirefox(),mac:be.isOSX()||be.isiOS(),iOS:ye.isiPad()||ye.isiPhone(),android:be.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:window.getSelection&&"Range"in window,documentMode:ve.isIE()?document.documentMode||7:10,fileApi:we,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!ve.isIE(),desktop:ye.isDesktop(),windowsPhone:_e,browser:{current:ve.current,version:ve.version,isChrome:ve.isChrome,isEdge:ve.isEdge,isFirefox:ve.isFirefox,isIE:ve.isIE,isOpera:ve.isOpera,isSafari:ve.isSafari},os:{current:be.current,version:be.version,isAndroid:be.isAndroid,isChromeOS:be.isChromeOS,isFreeBSD:be.isFreeBSD,isiOS:be.isiOS,isLinux:be.isLinux,isOSX:be.isOSX,isSolaris:be.isSolaris,isWindows:be.isWindows},deviceType:{isDesktop:ye.isDesktop,isiPad:ye.isiPad,isiPhone:ye.isiPhone,isPhone:ye.isPhone,isTablet:ye.isTablet,isTouch:ye.isTouch,isWebView:ye.isWebView}},xe=/^\s*|\s*$/g,De=function(t){return null==t?"":(""+t).replace(xe,"")},Se=function(t,e){return e?!("array"!==e||!_t(t))||typeof t===e:void 0!==t},Te=function(t,e,n,r){r=r||this,t&&(n&&(t=t[n]),kt(t,(function(t,o){if(!1===e.call(r,t,o,n))return!1;Te(t,e,n,r)})))},Ee={trim:De,isArray:_t,is:Se,toArray:function(t){if(_t(t))return t;for(var e=[],n=0,r=t.length;n1)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return Oe(n.childNodes[0])},fromTag:function(t,e){var n=(e||document).createElement(t);return Oe(n)},fromText:function(t,e){var n=(e||document).createTextNode(t);return Oe(n)},fromDom:Oe,fromPoint:function(t,e,n){return B.from(t.dom.elementFromPoint(e,n)).map(Oe)}},Le=function(t,e){var n=[],r=function(t){return n.push(t),e(t)},o=e(t);do{o=o.bind(r)}while(o.isSome());return n},Ne=function(t,e){var n=t.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")},$e=function(t){return 1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType||0===t.childElementCount},Pe=function(t,e){return t.dom===e.dom},Ie=function(t,e){return n=t.dom,r=e.dom,function(t,e,n){return 0!=(t.compareDocumentPosition(e)&n)}(n,r,Node.DOCUMENT_POSITION_CONTAINED_BY);var n,r},Re=function(t,e){return pe().browser.isIE()?Ie(t,e):function(t,e){var n=t.dom,r=e.dom;return n!==r&&n.contains(r)}(t,e)};"undefined"!=typeof window?window:Function("return this;")();var Be=function(t){return t.dom.nodeName.toLowerCase()},Me=function(t){return t.dom.nodeType},je=function(t){return function(e){return Me(e)===t}},ze=je(1),Fe=je(3),Ue=je(9),He=je(11),Ve=function(t){return Ae.fromDom(t.dom.ownerDocument)},We=function(t){return Ue(t)?t:Ve(t)},qe=function(t){return Ae.fromDom(We(t).dom.defaultView)},Ke=function(t){return B.from(t.dom.parentNode).map(Ae.fromDom)},Ye=function(t){return B.from(t.dom.previousSibling).map(Ae.fromDom)},Xe=function(t){return B.from(t.dom.nextSibling).map(Ae.fromDom)},Ze=function(t){return nt(Le(t,Ye))},Ge=function(t){return Le(t,Xe)},Je=function(t){return V(t.dom.childNodes,Ae.fromDom)},Qe=function(t,e){var n=t.dom.childNodes;return B.from(n[e]).map(Ae.fromDom)},tn=function(t){return Qe(t,0)},en=function(t){return Qe(t,t.dom.childNodes.length-1)},nn=function(t){return t.dom.childNodes.length},rn=function(t){return He(t)&&y(t.dom.host)},on=C(Element.prototype.attachShadow)&&C(Node.prototype.getRootNode),an=D(on),sn=on?function(t){return Ae.fromDom(t.dom.getRootNode())}:We,un=function(t){return rn(t)?t:function(t){var e=t.dom.head;if(null==e)throw new Error("Head is not available yet");return Ae.fromDom(e)}(We(t))},cn=function(t){return Ae.fromDom(t.dom.host)},ln=function(t){return y(t.dom.shadowRoot)},dn=function(t,e){Ke(t).each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},fn=function(t,e){Xe(t).fold((function(){Ke(t).each((function(t){pn(t,e)}))}),(function(t){dn(t,e)}))},mn=function(t,e){tn(t).fold((function(){pn(t,e)}),(function(n){t.dom.insertBefore(e.dom,n.dom)}))},pn=function(t,e){t.dom.appendChild(e.dom)},hn=function(t,e){W(e,(function(e){pn(t,e)}))},gn=function(t){t.dom.textContent="",W(Je(t),(function(t){vn(t)}))},vn=function(t){var e=t.dom;null!==e.parentNode&&e.parentNode.removeChild(e)},bn=function(t){var e,n=Je(t);n.length>0&&(e=t,W(n,(function(t){dn(e,t)}))),vn(t)},yn=function(t){var e=Fe(t)?t.dom.parentNode:t.dom;if(null==e||null===e.ownerDocument)return!1;var n=e.ownerDocument;return function(t){var e=sn(t);return rn(e)?B.some(e):B.none()}(Ae.fromDom(e)).fold((function(){return n.body.contains(e)}),x(yn,cn))},Cn=function(t,e){return{left:t,top:e,translate:function(n,r){return Cn(t+n,e+r)}}},wn=Cn,_n=function(t,e){return void 0!==t?t:void 0!==e?e:0},kn=function(t){var e=t.dom,n=e.ownerDocument.body;return n===e?wn(n.offsetLeft,n.offsetTop):yn(t)?function(t){var e=t.getBoundingClientRect();return wn(e.left,e.top)}(e):wn(0,0)},xn=function(t){var e=void 0!==t?t.dom:document,n=e.body.scrollLeft||e.documentElement.scrollLeft,r=e.body.scrollTop||e.documentElement.scrollTop;return wn(n,r)},Dn=function(t,e,n){var r=(void 0!==n?n.dom:document).defaultView;r&&r.scrollTo(t,e)},Sn=function(t,e){pe().browser.isSafari()&&C(t.dom.scrollIntoViewIfNeeded)?t.dom.scrollIntoViewIfNeeded(!1):t.dom.scrollIntoView(e)},Tn=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},En=function(t){var e=void 0===t?window:t,n=e.document,r=xn(Ae.fromDom(n));return function(t){var e=void 0===t?window:t;return pe().browser.isFirefox()?B.none():B.from(e.visualViewport)}(e).fold((function(){var t=e.document.documentElement,n=t.clientWidth,o=t.clientHeight;return Tn(r.left,r.top,n,o)}),(function(t){return Tn(Math.max(t.pageLeft,r.left),Math.max(t.pageTop,r.top),t.width,t.height)}))},On=function(t){return function(e){return!!e&&e.nodeType===t}},An=function(t){return!!t&&!Object.getPrototypeOf(t)},Ln=On(1),Nn=function(t){var e=t.map((function(t){return t.toLowerCase()}));return function(t){if(t&&t.nodeName){var n=t.nodeName.toLowerCase();return U(e,n)}return!1}},$n=function(t,e){var n=e.toLowerCase().split(" ");return function(e){if(Ln(e))for(var r=0;r0}))},ur=function(t){var e={},n=t.dom;if(Gn(n))for(var r=0;r=t.length&&e(n)}}(i))}))}))},_r=function(t){return{isValue:$,isError:N,getOr:D(t),getOrThunk:D(t),getOrDie:D(t),or:function(e){return _r(t)},orThunk:function(e){return _r(t)},fold:function(e,n){return n(t)},map:function(e){return _r(e(t))},mapError:function(e){return _r(t)},each:function(e){e(t)},bind:function(e){return e(t)},exists:function(e){return e(t)},forall:function(e){return e(t)},toOptional:function(){return B.some(t)}}},kr=function(t){return{isValue:N,isError:$,getOr:S,getOrThunk:function(t){return t()},getOrDie:function(){return(e=String(t),function(){throw new Error(e)})();var e},or:S,orThunk:function(t){return t()},fold:function(e,n){return e(t)},map:function(e){return kr(t)},mapError:function(e){return kr(e(t))},each:_,bind:function(e){return kr(t)},exists:N,forall:$,toOptional:B.none}},xr={value:_r,error:kr,fromOption:function(t,e){return t.fold((function(){return kr(e)}),_r)}},Dr=function(t){if(!p(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var e=[],n={};return W(t,(function(r,o){var i=lt(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],s=r[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!p(s))throw new Error("case arguments must be an array");e.push(a),n[a]=function(){for(var n=[],r=0;r0?n(r.fail.map(Sr)):e(r.pass.map(Sr))}))},unload:c,unloadAll:function(t){W(t,(function(t){c(t)}))},_setReferrerPolicy:function(t){e.referrerPolicy=t}}},ao=function(){var t=new WeakMap;return{forElement:function(e,n){var r=sn(e).dom;return B.from(t.get(r)).getOrThunk((function(){var e=io(r,n);return t.set(r,e),e}))}}}(),so=function(){function t(t,e){this.node=t,this.rootNode=e,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}return t.prototype.current=function(){return this.node},t.prototype.next=function(t){return this.node=this.findSibling(this.node,"firstChild","nextSibling",t),this.node},t.prototype.prev=function(t){return this.node=this.findSibling(this.node,"lastChild","previousSibling",t),this.node},t.prototype.prev2=function(t){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",t),this.node},t.prototype.findSibling=function(t,e,n,r){var o,i;if(t){if(!r&&t[e])return t[e];if(t!==this.rootNode){if(o=t[n])return o;for(i=t.parentNode;i&&i!==this.rootNode;i=i.parentNode)if(o=i[n])return o}}},t.prototype.findPreviousNode=function(t,e,n,r){var o,i,a;if(t){if(o=t[n],this.rootNode&&o===this.rootNode)return;if(o){if(!r)for(a=o[e];a;a=a[e])if(!a[e])return a;return o}if((i=t.parentNode)&&i!==this.rootNode)return i}},t}(),uo=function(t){var e;return function(n){return e=e||function(t,e){for(var n={},r=0,o=t.length;r0&&function(t,e){var n=new so(t,e).prev(!1),r=new so(t,e).next(!1),o=v(n)||ni(n,e),i=v(r)||ni(r,e);return o&&i}(t,e)},ii=function(t,e,n){var r=n||e;if(Ln(e)&&ri(e))return e;for(var o=e.childNodes,i=o.length-1;i>=0;i--)ii(t,o[i],r);if(Ln(e)){var a=e.childNodes;1===a.length&&ri(a[0])&&e.parentNode.insertBefore(a[0],e)}return function(t){return Un(t)||Fn(t)}(e)||Go(e,r)||function(t){return!!Ln(t)&&t.childNodes.length>0}(e)||oi(e,r)||t.remove(e),e},ai=Ee.makeMap,si=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ui=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ci=/[<>&\"\']/g,li=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,di={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},fi={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},mi={"<":"<",">":">","&":"&",""":'"',"'":"'"},pi=function(t,e){var n,r,o,i={};if(t){for(t=t.split(","),e=e||10,n=0;n1?"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";":fi[t]||"&#"+t.charCodeAt(0)+";"}))},bi=function(t,e,n){return n=n||hi,t.replace(e?si:ui,(function(t){return fi[t]||n[t]||t}))},yi={encodeRaw:gi,encodeAllRaw:function(t){return(""+t).replace(ci,(function(t){return fi[t]||t}))},encodeNumeric:vi,encodeNamed:bi,getEncodeFunc:function(t,e){var n=pi(e)||hi,r=ai(t.replace(/\+/g,","));return r.named&&r.numeric?function(t,e){return t.replace(e?si:ui,(function(t){return void 0!==fi[t]?fi[t]:void 0!==n[t]?n[t]:t.length>1?"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";":"&#"+t.charCodeAt(0)+";"}))}:r.named?e?function(t,e){return bi(t,e,n)}:bi:r.numeric?vi:gi},decode:function(t){return t.replace(li,(function(t,e){return e?(e="x"===e.charAt(0).toLowerCase()?parseInt(e.substr(1),16):parseInt(e,10))>65535?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e))):di[e]||String.fromCharCode(e):mi[t]||hi[t]||function(t){var e=Ae.fromTag("div").dom;return e.innerHTML=t,e.textContent||e.innerText||t}(t)}))}},Ci={},wi={},_i=Ee.makeMap,ki=Ee.each,xi=Ee.extend,Di=Ee.explode,Si=Ee.inArray,Ti=function(t,e){return(t=Ee.trim(t))?t.split(e||" "):[]},Ei=function(t,e){var n;return t&&(n={},"string"==typeof t&&(t={"*":t}),ki(t,(function(t,r){n[r]=n[r.toUpperCase()]="map"===e?_i(t,/[, ]/):Di(t,/[, ]/)}))),n},Oi=function(t){var e={},n={},r=[],o={},i={},a=function(e,n,r){var o=t[e];return o?o=_i(o,/[, ]/,_i(o.toUpperCase(),/[, ]/)):(o=Ci[e])||(o=_i(n," ",_i(n.toUpperCase()," ")),o=xi(o,r),Ci[e]=o),o},s=function(t){var e,n,r,o,i,a,s={},u=function(t,n,r){var o,i,a,u=function(t,e){var n,r,o={};for(n=0,r=t.length;n
    ');return dn(n.element,r),Of(r,(function(){return vn(r)}))},Lf=function(t,e,n,r){If(t,(function(o,i){return $f(t,e,n,r)}),n)},Nf=function(t,e,n,r,o){var i={elm:r.element.dom,alignToTop:o};(function(t,e){return t.fire("ScrollIntoView",e).isDefaultPrevented()})(t,i)||(n(e,xn(e).top,r,o),function(t,e){t.fire("AfterScrollIntoView",e)}(t,i))},$f=function(t,e,n,r){var o=Ae.fromDom(t.getBody()),i=Ae.fromDom(t.getDoc());o.dom.offsetWidth;var a=Af(Ae.fromDom(n.startContainer),n.startOffset);Nf(t,i,e,a,r),a.cleanup()},Pf=function(t,e,n,r){var o=Ae.fromDom(t.getDoc());Nf(t,o,n,function(t){return Of(Ae.fromDom(t),_)}(e),r)},If=function(t,e,n){var r=n.startContainer,o=n.startOffset,i=n.endContainer,a=n.endOffset;e(Ae.fromDom(r),Ae.fromDom(i));var s=t.dom.createRng();s.setStart(r,o),s.setEnd(i,a),t.selection.setRng(n)},Rf=function(t,e,n,r){var o=t.pos;if(n)Dn(o.left,o.top,r);else{var i=o.top-e+t.height;Dn(o.left,i,r)}},Bf=function(t,e,n,r,o){var i=n+e,a=r.pos.top,s=r.bottom,u=s-a>=n;if(ai){Rf(r,n,u?!1!==o:!0===o,t)}else s>i&&!u&&Rf(r,n,!0===o,t)},Mf=function(t,e,n,r){var o=t.dom.defaultView.innerHeight;Bf(t,e,o,n,r)},jf=function(t,e,n,r){var o=t.dom.defaultView.innerHeight;Bf(t,e,o,n,r);var i=Tf(n.element),a=En(window);i.topa.bottom&&Sn(n.element,!0===r)},zf=function(t,e,n){return Lf(t,Mf,e,n)},Ff=function(t,e,n){return Pf(t,e,Mf,n)},Uf=function(t,e,n){return Lf(t,jf,e,n)},Hf=function(t,e,n){return Pf(t,e,jf,n)},Vf=function(t,e,n){(t.inline?zf:Uf)(t,e,n)},Wf=function(t){var e=sn(t).dom;return t.dom===e.activeElement},qf=function(t){return void 0===t&&(t=Ae.fromDom(document)),B.from(t.dom.activeElement).map(Ae.fromDom)},Kf=function(t,e,n,r){return{start:t,soffset:e,finish:n,foffset:r}},Yf=Dr([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Xf=(Yf.before,Yf.on,Yf.after,function(t){return t.fold(S,S,S)}),Zf=Dr([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Gf={domRange:Zf.domRange,relative:Zf.relative,exact:Zf.exact,exactFromRange:function(t){return Zf.exact(t.start,t.soffset,t.finish,t.foffset)},getWin:function(t){var e=function(t){return t.match({domRange:function(t){return Ae.fromDom(t.startContainer)},relative:function(t,e){return Xf(t)},exact:function(t,e,n,r){return t}})}(t);return qe(e)},range:Kf},Jf=pe().browser,Qf=function(t,e){var n=Fe(e)?qd(e).length:Je(e).length+1;return t>n?n:t<0?0:t},tm=function(t){return Gf.range(t.start,Qf(t.soffset,t.start),t.finish,Qf(t.foffset,t.finish))},em=function(t,e){return!An(e.dom)&&(Re(t,e)||Pe(t,e))},nm=function(t){return function(e){return em(t,e.start)&&em(t,e.finish)}},rm=function(t){return!0===t.inline||Jf.isIE()},om=function(t){return Gf.range(Ae.fromDom(t.startContainer),t.startOffset,Ae.fromDom(t.endContainer),t.endOffset)},im=function(t){return function(t){var e=t.getSelection();return(e&&0!==e.rangeCount?B.from(e.getRangeAt(0)):B.none()).map(om)}(qe(t).dom).filter(nm(t))},am=function(t){var e=document.createRange();try{return e.setStart(t.start.dom,t.soffset),e.setEnd(t.finish.dom,t.foffset),B.some(e)}catch(t){return B.none()}},sm=function(t){var e=rm(t)?im(Ae.fromDom(t.getBody())):B.none();t.bookmark=e.isSome()?e:t.bookmark},um=function(t){return(t.bookmark?t.bookmark:B.none()).bind((function(e){return function(t,e){return B.from(e).filter(nm(t)).map(tm)}(Ae.fromDom(t.getBody()),e)})).bind(am)},cm={isEditorUIElement:function(t){var e=t.className.toString();return-1!==e.indexOf("tox-")||-1!==e.indexOf("mce-")}},lm=function(t,e){pe().browser.isIE()?function(t){t.on("focusout",(function(){sm(t)}))}(t):function(t,e){t.on("mouseup touchend",(function(t){e.throttle()}))}(t,e),t.on("keyup NodeChange",(function(e){(function(t){return"nodechange"===t.type&&t.selectionChange})(e)||sm(t)}))},dm=function(t){var e=Es((function(){sm(t)}),0);t.on("init",(function(){t.inline&&function(t,e){var n=function(){e.throttle()};gs.DOM.bind(document,"mouseup",n),t.on("remove",(function(){gs.DOM.unbind(document,"mouseup",n)}))}(t,e),lm(t,e)})),t.on("remove",(function(){e.cancel()}))},fm=gs.DOM,mm=function(t,e){var n=function(t){return t.getParam("custom_ui_selector","","string")}(t),r=fm.getParent(e,(function(e){return function(t){return cm.isEditorUIElement(t)}(e)||!!n&&t.dom.is(e,n)}));return null!==r},pm=function(t,e){var n=e.editor;dm(n),n.on("focusin",(function(){var e=t.focusedEditor;e!==n&&(e&&e.fire("blur",{focusedEditor:n}),t.setActive(n),t.focusedEditor=n,n.fire("focus",{blurredEditor:e}),n.focus(!0))})),n.on("focusout",(function(){oo.setEditorTimeout(n,(function(){var e=t.focusedEditor;mm(n,function(t){try{var e=sn(Ae.fromDom(t.getElement()));return qf(e).fold((function(){return document.body}),(function(t){return t.dom}))}catch(t){return document.body}}(n))||e!==n||(n.fire("blur",{focusedEditor:null}),t.focusedEditor=null)}))})),kf||(kf=function(e){var n=t.activeEditor;n&&function(t){if(an()&&y(t.target)){var e=Ae.fromDom(t.target);if(ze(e)&&ln(e)&&t.composed&&t.composedPath){var n=t.composedPath();if(n)return at(n)}}return B.from(t.target)}(e).each((function(e){e.ownerDocument===document&&(e===document.body||mm(n,e)||t.focusedEditor!==n||(n.fire("blur",{focusedEditor:null}),t.focusedEditor=null))}))},fm.bind(document,"focusin",kf))},hm=function(t,e){t.focusedEditor===e.editor&&(t.focusedEditor=null),t.activeEditor||(fm.unbind(document,"focusin",kf),kf=null)},gm=function(t,e){return function(t){return t.collapsed?B.from(uu(t.startContainer,t.startOffset)).map(Ae.fromDom):B.none()}(e).bind((function(e){return vo(e)?B.some(e):!1===Re(t,e)?B.some(t):B.none()}))},vm=function(t,e){gm(Ae.fromDom(t.getBody()),e).bind((function(t){return Il(t.dom)})).fold((function(){t.selection.normalize()}),(function(e){return t.selection.setRng(e.toRange())}))},bm=function(t){if(t.setActive)try{t.setActive()}catch(e){t.focus()}else t.focus()},ym=function(t){return Wf(t)||(e=t,qf(sn(e)).filter((function(t){return e.dom.contains(t.dom)}))).isSome();var e},Cm=function(t){return t.inline?function(t){var e=t.getBody();return e&&ym(Ae.fromDom(e))}(t):function(t){return t.iframeElement&&Wf(Ae.fromDom(t.iframeElement))}(t)},wm=function(t){return Cm(t)||function(t){var e=sn(Ae.fromDom(t.getElement()));return qf(e).filter((function(e){return!(void 0!==(n=e.dom.classList)&&(n.contains("tox-edit-area")||n.contains("tox-edit-area__iframe")||n.contains("mce-content-body")))&&mm(t,e.dom);var n})).isSome()}(t)},_m=function(t){return t.editorManager.setActive(t)},km=function(t,e){t.removed||(e?_m(t):function(t){var e=t.selection,n=t.getBody(),r=e.getRng();t.quirks.refreshContentEditable(),void 0!==t.bookmark&&!1===Cm(t)&&um(t).each((function(e){t.selection.setRng(e),r=e}));var o=function(t,e){return t.dom.getParent(e,(function(e){return"true"===t.dom.getContentEditable(e)}))}(t,e.getNode());if(t.$.contains(n,o))return bm(o),vm(t,r),void _m(t);t.inline||(ke.opera||bm(n),t.getWin().focus()),(ke.gecko||t.inline)&&(bm(n),vm(t,r)),_m(t)}(t))},xm=function(t,e,n,r,o){var i=n?e.startContainer:e.endContainer,a=n?e.startOffset:e.endOffset;return B.from(i).map(Ae.fromDom).map((function(t){return r&&e.collapsed?t:Qe(t,o(t,a)).getOr(t)})).bind((function(t){return ze(t)?B.some(t):Ke(t).filter(ze)})).map((function(t){return t.dom})).getOr(t)},Dm=function(t,e,n){return xm(t,e,!0,n,(function(t,e){return Math.min(nn(t),e)}))},Sm=function(t,e,n){return xm(t,e,!1,n,(function(t,e){return e>0?e-1:e}))},Tm=function(t,e){for(var n=t;t&&jn(t)&&0===t.length;)t=e?t.nextSibling:t.previousSibling;return t||n},Em=function(t,e){return V(e,(function(e){var n=t.fire("GetSelectionRange",{range:e});return n.range!==e?n.range:e}))},Om={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},Am=function(t,e,n){var r=n?"lastChild":"firstChild",o=n?"prev":"next";if(t[r])return t[r];if(t!==e){var i=t[o];if(i)return i;for(var a=t.parent;a&&a!==e;a=a.parent)if(i=a[o])return i}},Lm=function(t){if(!Xo(t.value))return!1;var e=t.parent;return!e||"span"===e.name&&!e.attr("style")||!/^[ ]+$/.test(t.value)},Nm=function(t){var e="a"===t.name&&!t.attr("href")&&t.attr("id");return t.attr("name")||t.attr("id")&&!t.firstChild||t.attr("data-mce-bookmark")||e},$m=function(){function t(t,e){this.name=t,this.type=e,1===e&&(this.attributes=[],this.attributes.map={})}return t.create=function(e,n){var r=new t(e,Om[e]||1);return n&&ft(n,(function(t,e){r.attr(e,t)})),r},t.prototype.replace=function(t){var e=this;return t.parent&&t.remove(),e.insert(t,e),e.remove(),e},t.prototype.attr=function(t,e){var n,r=this;if("string"!=typeof t)return null!=t&&ft(t,(function(t,e){r.attr(e,t)})),r;if(n=r.attributes){if(void 0!==e){if(null===e){if(t in n.map){delete n.map[t];for(var o=n.length;o--;)if(n[o].name===t)return n.splice(o,1),r}return r}if(t in n.map){for(o=n.length;o--;)if(n[o].name===t){n[o].value=e;break}}else n.push({name:t,value:e});return n.map[t]=e,r}return n.map[t]}},t.prototype.clone=function(){var e,n=this,r=new t(n.name,n.type);if(e=n.attributes){var o=[];o.map={};for(var i=0,a=e.length;i=s.length)for(n=0,r=a.length;n=s.length||a[n]!==s[n]){o=n+1;break}if(a.length=a.length||a[n]!==s[n]){o=n+1;break}if(1===o)return e;for(n=0,r=a.length-(o-1);n=0;n--)0!==u[n].length&&"."!==u[n]&&(".."!==u[n]?o>0?o--:i.push(u[n]):o++);return 0!==(r=(n=s.length-o)<=0?nt(i).join("/"):s.slice(0,n).join("/")+"/"+nt(i).join("/")).indexOf("/")&&(r="/"+r),a&&r.lastIndexOf("/")!==r.length-1&&(r+=a),r},t.prototype.getURI=function(t){var e;return void 0===t&&(t=!1),this.source&&!t||(e="",t||(this.protocol?e+=this.protocol+"://":e+="//",this.userInfo&&(e+=this.userInfo+"@"),this.host&&(e+=this.host),this.port&&(e+=":"+this.port)),this.path&&(e+=this.path),this.query&&(e+="?"+this.query),this.anchor&&(e+="#"+this.anchor),this.source=e),this.source},t}(),Um=Ee.makeMap("button,fieldset,form,iframe,img,image,input,object,output,select,textarea"),Hm=function(t,e,n){for(var r=/<([!?\/])?([A-Za-z0-9\-_:.]+)/g,o=/(?:\s(?:[^'">]+(?:"[^"]*"|'[^']*'))*[^"'>]*(?:"[^">]*|'[^'>]*)?|\s*|\/)>/g,i=t.getShortEndedElements(),a=1,s=n;0!==a;)for(r.lastIndex=s;;){var u=r.exec(e);if(null===u)return s;if("!"===u[1]){s=Mt(u[2],"--")?Vm(e,!1,u.index+"!--".length):Vm(e,!0,u.index+1);break}o.lastIndex=r.lastIndex;var c=o.exec(e);if(!h(c)&&c.index===r.lastIndex){"/"===u[1]?a-=1:Ct(i,u[2])||(a+=1),s=r.lastIndex+c[0].length;break}}return s},Vm=function(t,e,n){void 0===n&&(n=0);var r=t.toLowerCase();if(-1!==r.indexOf("[if ",n)&&function(t,e){return/^\s*\[if [\w\W]+\]>.*/.test(t.substr(e))}(r,n)){var o=r.indexOf("[endif]",n);return r.indexOf(">",o)}if(e){var i=r.indexOf(">",n);return-1!==i?i:r.length}var a=/--!?>/g;a.lastIndex=n;var s=a.exec(t);return s?s.index+s[0].length:r.length},Wm=function(t,e){var n=t.exec(e);if(n){var r=n[1],o=n[2];return"string"==typeof r&&"data-mce-bogus"===r.toLowerCase()?o:null}return null},qm=function(t,e){var n;void 0===e&&(e=Oi());var r=null!==(n=(t=t||{}).document)&&void 0!==n?n:document,o=r.createElement("form");!1!==t.fix_self_closing&&(t.fix_self_closing=!0);var i=t.comment?t.comment:_,a=t.cdata?t.cdata:_,s=t.text?t.text:_,u=t.start?t.start:_,c=t.end?t.end:_,l=t.pi?t.pi:_,d=t.doctype?t.doctype:_,f=function(n,f){void 0===f&&(f="html");for(var m,p,h,g,v,b,y,C,w,_,k,x,D,S,T,E,O,A,L,N=n.html,$=0,P=[],I=0,R=yi.decode,B=Ee.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),M="html"===f?0:1,j=function(t){var e,n;for(e=P.length;e--&&P[e].name!==t;);if(e>=0){for(n=P.length-1;n>=e;n--)(t=P[n]).valid&&c(t.name);P.length=e}},z=function(t,e){return s(Pm(t,n),e)},F=function(e){""!==e&&(">"===e.charAt(0)&&(e=" "+e),t.allow_conditional_comments||"[if"!==e.substr(0,3).toLowerCase()||(e=" "+e),i(Pm(e,n)))},U=function(t,e){var n=t||"",r=!Mt(n,"--"),o=Vm(N,r,e);return t=N.substr(e,o-e),F(r?n+t:t),o+1},H=function(e,i,a,s,u){if(a=function(t){return Pm(t,n)}((i=i.toLowerCase())in Y?i:R(a||s||u||"")),X&&!C&&!1===function(t){return 0===t.indexOf("data-")||0===t.indexOf("aria-")}(i)){var c=S[i];if(!c&&T){for(var l=T.length;l--&&!(c=T[l]).pattern.test(i););-1===l&&(c=null)}if(!c)return;if(c.validValues&&!(a in c.validValues))return}("name"===i||"id"===i)&&e in Um&&(a in r||a in o)||B[i]&&!Fm.isDomSafe(a,e,t)||C&&(i in B||0===i.indexOf("on"))||(g.map[i]=a,g.push({name:i,value:a}))},V=new RegExp("<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|(?:!(--)?)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_:.]*)(\\s(?:[^'\">]+(?:\"[^\"]*\"|'[^']*'))*[^\"'>]*(?:\"[^\">]*|'[^'>]*)?|\\s*|\\/)>))","g"),W=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,q=e.getShortEndedElements(),K=t.self_closing_elements||e.getSelfClosingElements(),Y=e.getBoolAttrs(),X=t.validate,Z=t.remove_internals,G=t.fix_self_closing,J=e.getSpecialElements(),Q=N+">";m=V.exec(Q);){var tt=m[0];if($N.length){z(R(N.substr(m.index))),$=m.index+tt.length;continue}":"===(p=p.toLowerCase()).charAt(0)&&(p=p.substr(1)),w=p in q,G&&K[p]&&P.length>0&&P[P.length-1].name===p&&j(p);var et=Wm(W,m[9]);if(null!==et){if("all"===et){$=Hm(e,N,V.lastIndex),V.lastIndex=$;continue}k=!1}if(!X||(_=e.getElementRule(p))){if(k=!0,X&&(S=_.attributes,T=_.attributePatterns),(D=m[9])?((C=-1!==D.indexOf("data-mce-type"))&&Z&&(k=!1),(g=[]).map={},D.replace(W,(function(t,e,n,r,o){return H(p,e,n,r,o),""}))):(g=[]).map={},X&&!C){if(E=_.attributesRequired,O=_.attributesDefault,A=_.attributesForced,_.removeEmptyAttrs&&!g.length&&(k=!1),A)for(v=A.length;v--;)y=(x=A[v]).name,"{$uid}"===(L=x.value)&&(L="mce_"+I++),g.map[y]=L,g.push({name:y,value:L});if(O)for(v=O.length;v--;)(y=(x=O[v]).name)in g.map||("{$uid}"===(L=x.value)&&(L="mce_"+I++),g.map[y]=L,g.push({name:y,value:L}));if(E){for(v=E.length;v--&&!(E[v]in g.map););-1===v&&(k=!1)}if(x=g.map["data-mce-bogus"]){if("all"===x){$=Hm(e,N,V.lastIndex),V.lastIndex=$;continue}k=!1}}k&&u(p,g,w)}else k=!1;if(h=J[p]){h.lastIndex=$=m.index+tt.length,(m=h.exec(N))?(k&&(b=N.substr($,m.index-$)),$=m.index+m[0].length):(b=N.substr($),$=N.length),k&&(b.length>0&&z(b,!0),c(p)),V.lastIndex=$;continue}w||(D&&D.indexOf("/")===D.length-1?k&&c(p):P.push({name:p,valid:k}))}else if(p=m[1])F(p);else if(p=m[2]){if(!(1===M||t.preserve_cdata||P.length>0&&e.isValidChild(P[P.length-1].name,"#cdata"))){$=U("",m.index+2),V.lastIndex=$;continue}a(p)}else if(p=m[3])d(p);else{if((p=m[4])||"=0;v--)(p=P[v]).valid&&c(p.name)};return{parse:function(t,e){void 0===e&&(e="html"),f(function(t){for(var e,n=/data:[^;]+;base64,([a-z0-9\+\/=\s]+)/gi,r=[],o={},i=Ks("img"),a=0,s=0;e=n.exec(t);){var u=e[0],c=i+"_"+s++;o[c]=u,a]*data-mce-bogus="all"[^>]*>/g,o=t.schema,i=function(t,e){var n=new RegExp(["\\s?("+t.join("|")+')="[^"]+"'].join("|"),"gi");return e.replace(n,"")}(t.getTempAttrs(),e),a=o.getShortEndedElements();n=r.exec(i);){var s=r.lastIndex,u=n[0].length,c=void 0;c=a[n[1]]?s:qm.findEndTag(o,i,s),i=i.substring(0,s-u)+i.substring(c),r.lastIndex=s-u}return ko(i)},Ym=Km,Xm=function(t,e,n,r){var o,i=function(t,e){return At(At({},t),{format:e,get:!0,getInner:!0})}(e,n),a=e.no_events?i:t.fire("BeforeGetContent",i);return o="raw"===a.format?Ee.trim(Ym(t.serializer,r.innerHTML)):"text"===a.format?t.dom.isEmpty(r)?"":ko(r.innerText||r.textContent):"tree"===a.format?t.serializer.serialize(r,a):function(t,e){var n=nc(t),r=new RegExp("^(<"+n+"[^>]*>( | |\\s| |
    |)<\\/"+n+">[\r\n]*|
    [\r\n]*)$");return e.replace(r,"")}(t,t.serializer.serialize(r,a)),U(["text","tree"],a.format)||yo(Ae.fromDom(r))?a.content=o:a.content=Ee.trim(o),a.no_events?a.content:t.fire("GetContent",a).content},Zm=Ee.each,Gm=function(t){return{compare:function(e,n){if(e.nodeName!==n.nodeName)return!1;var r=function(e){var n={};return Zm(t.getAttribs(e),(function(r){var o=r.nodeName.toLowerCase();0!==o.indexOf("_")&&"style"!==o&&0!==o.indexOf("data-")&&(n[o]=t.getAttrib(e,o))})),n},o=function(t,e){var n,r;for(r in t)if(Ct(t,r)){if(void 0===(n=e[r]))return!1;if(t[r]!==n)return!1;delete e[r]}for(r in e)if(Ct(e,r))return!1;return!0};return!!o(r(e),r(n))&&(!!o(t.parseStyle(t.getAttrib(e,"style")),t.parseStyle(t.getAttrib(n,"style")))&&(!Zl(e)&&!Zl(n)))}}},Jm=Ee.makeMap,Qm=function(t){var e=[],n=(t=t||{}).indent,r=Jm(t.indent_before||""),o=Jm(t.indent_after||""),i=yi.getEncodeFunc(t.entity_encoding||"raw",t.entities),a="html"===t.element_format;return{start:function(t,s,u){var c,l,d,f;if(n&&r[t]&&e.length>0&&(f=e[e.length-1]).length>0&&"\n"!==f&&e.push("\n"),e.push("<",t),s)for(c=0,l=s.length;c":" />",u&&n&&o[t]&&e.length>0&&(f=e[e.length-1]).length>0&&"\n"!==f&&e.push("\n")},end:function(t){var r;e.push(""),n&&o[t]&&e.length>0&&(r=e[e.length-1]).length>0&&"\n"!==r&&e.push("\n")},text:function(t,n){t.length>0&&(e[e.length]=n?t:i(t))},cdata:function(t){e.push("")},comment:function(t){e.push("\x3c!--",t,"--\x3e")},pi:function(t,r){r?e.push(""):e.push(""),n&&e.push("\n")},doctype:function(t){e.push("",n?"\n":"")},reset:function(){e.length=0},getContent:function(){return e.join("").replace(/\n$/,"")}}},tp=function(t,e){void 0===e&&(e=Oi());var n=Qm(t);(t=t||{}).validate=!("validate"in t)||t.validate;return{serialize:function(r){var o=t.validate,i={3:function(t){n.text(t.value,t.raw)},8:function(t){n.comment(t.value)},7:function(t){n.pi(t.name,t.value)},10:function(t){n.doctype(t.value)},4:function(t){n.cdata(t.value)},11:function(t){if(t=t.firstChild)do{a(t)}while(t=t.next)}};n.reset();var a=function(t){var r=i[t.type];if(r)r(t);else{var s=t.name,u=t.shortEnded,c=t.attributes;if(o&&c&&c.length>1){var l=[];l.map={};var d=e.getElementRule(t.name);if(d){for(var f=0,m=d.attributesOrder.length;f'))},kp=function(t){en(t).each((function(e){Ye(e).each((function(n){lo(t)&&mo(e)&&lo(n)&&vn(e)}))}))},xp=function(t,e,n){return Re(e,t)?(r=function(t,e){for(var n=C(e)?e:N,r=t.dom,o=[];null!==r.parentNode&&void 0!==r.parentNode;){var i=r.parentNode,a=Ae.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(t,(function(t){return n(t)||Pe(t,e)})),r.slice(0,-1)):[];var r},Dp=function(t,e){return xp(t,e,N)},Sp=function(t,e){return[t].concat(Dp(t,e))},Tp=function(t,e,n){return Ll(t,e,n,cp)},Ep=function(t,e){return J(Sp(Ae.fromDom(e.container()),t),lo)},Op=function(t,e,n){return Tp(t,e.dom,n).forall((function(t){return Ep(e,n).fold((function(){return!1===tl(t,n,e.dom)}),(function(r){return!1===tl(t,n,e.dom)&&Re(r,Ae.fromDom(t.container()))}))}))},Ap=function(t,e,n){return Ep(e,n).fold((function(){return Tp(t,e.dom,n).forall((function(t){return!1===tl(t,n,e.dom)}))}),(function(e){return Tp(t,e.dom,n).isNone()}))},Lp=E(Ap,!1),Np=E(Ap,!0),$p=E(Op,!1),Pp=E(Op,!0),Ip=function(t){return ll(t).exists(mo)},Rp=function(t,e,n){var r=Y(Sp(Ae.fromDom(n.container()),e),lo),o=at(r).getOr(e);return Ol(t,o.dom,n).filter(Ip)},Bp=function(t,e){return ll(e).exists(mo)||Rp(!0,t,e).isSome()},Mp=function(t,e){return function(t){return B.from(t.getNode(!0)).map(Ae.fromDom)}(e).exists(mo)||Rp(!1,t,e).isSome()},jp=E(Rp,!1),zp=E(Rp,!0),Fp=function(t){return Ou.isTextPosition(t)&&!t.isAtStart()&&!t.isAtEnd()},Up=function(t,e){var n=Y(Sp(Ae.fromDom(e.container()),t),lo);return at(n).getOr(t)},Hp=function(t,e){return Fp(e)?up(e):up(e)||Pl(Up(t,e).dom,e).exists(up)},Vp=function(t,e){return Fp(e)?sp(e):sp(e)||$l(Up(t,e).dom,e).exists(sp)},Wp=function(t){return ll(t).bind((function(t){return Xr(t,ze)})).exists((function(t){return function(t){return U(["pre","pre-wrap"],t)}(ir(t,"white-space"))}))},qp=function(t,e){return function(t,e){return Pl(t.dom,e).isNone()}(t,e)||function(t,e){return $l(t.dom,e).isNone()}(t,e)||Lp(t,e)||Np(t,e)||Mp(t,e)||Bp(t,e)},Kp=function(t,e){return!Wp(e)&&(Lp(t,e)||$p(t,e)||Mp(t,e)||Hp(t,e))},Yp=function(t,e){return!Wp(e)&&(Np(t,e)||Pp(t,e)||Bp(t,e)||Vp(t,e))},Xp=function(t,e){return Kp(t,e)||Yp(t,function(t){var e=t.container(),n=t.offset();return jn(e)&&n0&&n=t.data.length&&Yp(o,Ou(t,t.data.length)),s=0===e&&Kp(o,Ou(t,0));t.replaceData(e,n,function(t,e,n){return Z(t,(function(r,o){return Jl(o)||Gl(o)?r.previousCharIsSpace||""===r.str&&e||r.str.length===t.length-1&&n?{previousCharIsSpace:!1,str:r.str+Co}:{previousCharIsSpace:!0,str:r.str+" "}:{previousCharIsSpace:!1,str:r.str+o}}),{previousCharIsSpace:!1,str:""}).str}(i,s,a))}},nh=function(t,e){var n=t.data.slice(e),r=n.length-Ft(n).length;eh(t,e,r)},rh=function(t,e){var n=t.data.slice(0,e),r=n.length-Ut(n).length;eh(t,e-r,r)},oh=function(t,e,n,r){void 0===r&&(r=!0);var o=Ut(t.data).length,i=r?t:e,a=r?e:t;return r?i.appendData(a.data):i.insertData(0,a.data),vn(Ae.fromDom(a)),n&&nh(i,o),i},ih=function(t,e){return function(t,e){var n=t.container(),r=t.offset();return!1===Ou.isTextPosition(t)&&n===e.parentNode&&r>Ou.before(e).offset()}(e,t)?Ou(e.container(),e.offset()-1):e},ah=function(t){return Wo(t.previousSibling)?B.some((e=t.previousSibling,jn(e)?Ou(e,e.data.length):Ou.after(e))):t.previousSibling?Rl(t.previousSibling):B.none();var e},sh=function(t){return Wo(t.nextSibling)?B.some((e=t.nextSibling,jn(e)?Ou(e,0):Ou.before(e))):t.nextSibling?Il(t.nextSibling):B.none();var e},uh=function(t,e){return ah(e).orThunk((function(){return sh(e)})).orThunk((function(){return function(t,e){var n=Ou.before(e.previousSibling?e.previousSibling:e.parentNode);return Pl(t,n).fold((function(){return $l(t,Ou.after(e))}),B.some)}(t,e)}))},ch=function(t,e){return sh(e).orThunk((function(){return ah(e)})).orThunk((function(){return function(t,e){return $l(t,Ou.after(e)).fold((function(){return Pl(t,Ou.before(e))}),B.some)}(t,e)}))},lh=function(t,e,n){return function(t,e,n){return t?ch(e,n):uh(e,n)}(t,e,n).map(E(ih,n))},dh=function(t,e,n){n.fold((function(){t.focus()}),(function(n){t.selection.setRng(n.toRange(),e)}))},fh=function(t,e){return e&&Ct(t.schema.getBlockElements(),Be(e))},mh=function(t){if(ei(t)){var e=Ae.fromHtml('
    ');return gn(t),pn(t,e),B.some(Ou.before(e.dom))}return B.none()},ph=function(t,e,n){var r,o,i,a,s=Ye(t).filter(Fe),u=Xe(t).filter(Fe);return vn(t),(r=s,o=u,i=e,a=function(t,e,r){var o=t.dom,i=e.dom,a=o.data.length;return oh(o,i,n),r.container()===i?Ou(o,a):r},r.isSome()&&o.isSome()&&i.isSome()?B.some(a(r.getOrDie(),o.getOrDie(),i.getOrDie())):B.none()).orThunk((function(){return n&&(s.each((function(t){return rh(t.dom,t.dom.length)})),u.each((function(t){return nh(t.dom,0)}))),e}))},hh=function(t,e,n,r){void 0===r&&(r=!0);var o,i=lh(e,t.getBody(),n.dom),a=Yr(n,E(fh,t),(o=t.getBody(),function(t){return t.dom===o})),s=ph(n,i,function(t,e){return Ct(t.schema.getTextInlineElements(),Be(e))}(t,n));t.dom.isEmpty(t.getBody())?(t.setContent(""),t.selection.setCursorLocation()):a.bind(mh).fold((function(){r&&dh(t,e,s)}),(function(n){r&&dh(t,e,B.some(n))}))},gh=function(t){return Ms(t,"td,th")},vh=function(t,e){return{start:t,end:e}},bh=Dr([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),yh=function(t,e){return Qr(Ae.fromDom(t),"td,th",e)},Ch=function(t){return!Pe(t.start,t.end)},wh=function(t,e){return Bd(t.start,e).bind((function(n){return Bd(t.end,e).bind((function(t){return e=Pe(n,t),r=n,e?B.some(r):B.none();var e,r}))}))},_h=function(t){return function(e){return wh(e,t).map((function(t){return function(t,e,n){return{rng:t,table:e,cells:n}}(e,t,gh(t))}))}},kh=function(t,e,n,r){if(n.collapsed||!t.forall(Ch))return B.none();if(e.isSameTable){var o=t.bind(_h(r));return B.some({start:o,end:o})}var i=yh(n.startContainer,r),a=yh(n.endContainer,r),s=i.bind(function(t){return function(e){return Bd(e,t).bind((function(t){return st(gh(t)).map((function(t){return vh(e,t)}))}))}}(r)).bind(_h(r)),u=a.bind(function(t){return function(e){return Bd(e,t).bind((function(t){return at(gh(t)).map((function(t){return vh(t,e)}))}))}}(r)).bind(_h(r));return B.some({start:s,end:u})},xh=function(t,e){return Q(t,(function(t){return Pe(t,e)}))},Dh=function(t){return Zn(xh(t.cells,t.rng.start),xh(t.cells,t.rng.end),(function(e,n){return t.cells.slice(e,n+1)}))},Sh=function(t,e,n){return t.exists((function(t){return function(t,e){return!Ch(t)&&wh(t,e).exists((function(t){var e=t.dom.rows;return 1===e.length&&1===e[0].cells.length}))}(t,n)&&zd(t.start,e)}))},Th=function(t,e){var n=e.startTable,r=e.endTable,o=t.cloneRange();return n.each((function(t){return o.setStartAfter(t.dom)})),r.each((function(t){return o.setEndBefore(t.dom)})),o},Eh=function(t,e){var n=function(t){return function(e){return Pe(t,e)}}(t),r=function(t,e){var n=yh(t.startContainer,e),r=yh(t.endContainer,e);return Zn(n,r,vh)}(e,n),o=function(t,e){var n=function(t){return Bd(Ae.fromDom(t),e)},r=n(t.startContainer),o=n(t.endContainer),i=r.isSome(),a=o.isSome(),s=Zn(r,o,Pe).getOr(!1);return{startTable:r,endTable:o,isStartInTable:i,isEndInTable:a,isSameTable:s,isMultiTable:!s&&i&&a}}(e,n);return Sh(r,e,n)?r.map((function(t){return bh.singleCellTable(e,t.start)})):o.isMultiTable?function(t,e,n,r){return kh(t,e,n,r).bind((function(t){var r=t.start,o=t.end,i=r.bind(Dh).getOr([]),a=o.bind(Dh).getOr([]);if(i.length>0&&a.length>0){var s=Th(n,e);return B.some(bh.multiTable(i,a,s))}return B.none()}))}(r,o,e,n):function(t,e,n,r){return kh(t,e,n,r).bind((function(t){var e=t.start,n=t.end;return e.or(n)})).bind((function(t){var r=e.isSameTable,o=Dh(t).getOr([]);if(r&&t.cells.length===o.length)return B.some(bh.fullTable(t.table));if(o.length>0){if(r)return B.some(bh.partialTable(o,B.none()));var i=Th(n,e);return B.some(bh.partialTable(o,B.some(At(At({},e),{rng:i}))))}return B.none()}))}(r,o,e,n)},Oh=function(t){var e;return(8===Me(e=t)||"#comment"===Be(e)?Ye(t):en(t)).bind(Oh).orThunk((function(){return B.some(t)}))},Ah=function(t){return W(t,(function(t){rr(t,"contenteditable"),_p(t)}))},Lh=function(t,e,n,r){var o=n.cloneRange();r?(o.setStart(n.startContainer,n.startOffset),o.setEndAfter(e.dom.lastChild)):(o.setStartBefore(e.dom.firstChild),o.setEnd(n.endContainer,n.endOffset)),Ih(t,o,e,!1)},Nh=function(t){var e=Rd(t),n=Ae.fromDom(t.selection.getNode());Kn(n.dom)&&ei(n)?t.selection.setCursorLocation(n.dom,0):t.selection.collapse(!0),e.length>1&&H(e,(function(t){return Pe(t,n)}))&&Qn(n,"data-mce-selected","1")},$h=function(t,e,n){var r=t.selection.getRng(),o=n.bind((function(n){var o=n.rng,i=n.isStartInTable,a=function(t,e){return B.from(t.dom.getParent(e,t.dom.isBlock)).map(Ae.fromDom)}(t,i?o.endContainer:o.startContainer);o.deleteContents(),function(t,e,n){n.each((function(n){e?vn(n):(_p(n),t.selection.setCursorLocation(n.dom,0))}))}(t,i,a.filter(ei));var s=i?e[0]:e[e.length-1];return Lh(t,s,r,i),ei(s)?B.none():B.some(i?e.slice(1):e.slice(0,-1))})).getOr(e);return Ah(o),Nh(t),!0},Ph=function(t,e,n,r){var o=t.selection.getRng(),i=e[0],a=n[n.length-1];Lh(t,i,o,!0),Lh(t,a,o,!1);var s=ei(i)?e:e.slice(1),u=ei(a)?n:n.slice(0,-1);return Ah(s.concat(u)),r.deleteContents(),Nh(t),!0},Ih=function(t,e,n,r){void 0===r&&(r=!0),e.deleteContents();var o,i=Oh(n).getOr(n),a=Ae.fromDom(t.dom.getParent(i.dom,t.dom.isBlock));if(ei(a)&&(_p(a),r&&t.selection.setCursorLocation(a.dom,0)),!Pe(n,a)){var s=Xn(Ke(a),n)?[]:Ke(o=a).map(Je).map((function(t){return Y(t,(function(t){return!Pe(o,t)}))})).getOr([]);W(s.concat(Je(n)),(function(t){Pe(t,a)||Re(t,a)||!ei(t)||vn(t)}))}return!0},Rh=function(t,e){return hh(t,!1,e),!0},Bh=function(t,e,n,r){return jh(e,r).fold((function(){return function(t,e,n){return Eh(e,n).map((function(e){return e.fold(E(Ih,t),E(Rh,t),E($h,t),E(Ph,t))}))}(t,e,n)}),(function(e){return function(t,e){return zh(t,e)}(t,e)})).getOr(!1)},Mh=function(t,e){return J(Sp(e,t),bo)},jh=function(t,e){return J(Sp(e,t),(n="caption",function(t){return ze(t)&&Be(t)===n}));var n},zh=function(t,e){return _p(e),t.selection.setCursorLocation(e.dom,0),B.some(!0)},Fh=function(t,e,n,r,o){return Al(n,t.getBody(),o).bind((function(i){return function(t,e,n,r){return Il(t.dom).bind((function(o){return Rl(t.dom).map((function(t){return e?n.isEqual(o)&&r.isEqual(t):n.isEqual(t)&&r.isEqual(o)}))})).getOr(!0)}(r,n,o,i)?function(t,e){return zh(t,e)}(t,r):function(t,e,n){return jh(t,Ae.fromDom(n.getNode())).map((function(t){return!1===Pe(t,e)}))}(e,r,i)})).or(B.some(!0))},Uh=function(t,e,n,r){var o=Ou.fromRangeStart(t.selection.getRng());return Mh(n,r).bind((function(r){return ei(r)?zh(t,r):function(t,e,n,r,o){return Al(n,t.getBody(),o).bind((function(t){return Mh(e,Ae.fromDom(t.getNode())).map((function(t){return!1===Pe(t,r)}))}))}(t,n,e,r,o)})).getOr(!1)},Hh=function(t,e){return t?vp(e):bp(e)},Vh=function(t,e,n){var r=Ae.fromDom(t.getBody());return jh(r,n).fold((function(){return Uh(t,e,r,n)||function(t,e){var n=Ou.fromRangeStart(t.selection.getRng());return Hh(e,n)||Ol(e,t.getBody(),n).exists((function(t){return Hh(e,t)}))}(t,e)}),(function(n){return function(t,e,n,r){var o=Ou.fromRangeStart(t.selection.getRng());return ei(r)?zh(t,r):Fh(t,n,e,r,o)}(t,e,r,n).getOr(!1)}))},Wh=function(t,e){var n=Ae.fromDom(t.selection.getStart(!0)),r=Rd(t);return t.selection.isCollapsed()&&0===r.length?Vh(t,e,n):function(t,e,n){var r=Ae.fromDom(t.getBody()),o=t.selection.getRng();return 0!==n.length?$h(t,n,B.none()):Bh(t,r,o,e)}(t,n,r)},qh=function(t){var e=Ou.fromRangeStart(t),n=Ou.fromRangeEnd(t),r=t.commonAncestorContainer;return Ol(!1,r,n).map((function(o){return!tl(e,n,r)&&tl(e,o,r)?function(t,e,n,r){var o=document.createRange();return o.setStart(t,e),o.setEnd(n,r),o}(e.container(),e.offset(),o.container(),o.offset()):t})).getOr(t)},Kh=function(t){return t.collapsed?t:qh(t)},Yh=function(t,e){return t.getBlockElements()[e.name]&&function(t){return t.firstChild&&t.firstChild===t.lastChild}(e)&&function(t){return"br"===t.name||t.value===Co}(e.firstChild)},Xh=function(t,e){var n=e.firstChild,r=e.lastChild;return n&&"meta"===n.name&&(n=n.next),r&&"mce_marker"===r.attr("id")&&(r=r.prev),function(t,e){var n=t.getNonEmptyElements();return e&&(e.isEmpty(n)||Yh(t,e))}(t,r)&&(r=r.prev),!(!n||n!==r)&&("ul"===n.name||"ol"===n.name)},Zh=function(t){return t&&t.firstChild&&t.firstChild===t.lastChild&&function(t){return t.data===Co||Hn(t)}(t.firstChild)},Gh=function(t){return t.length>0&&(!(e=t[t.length-1]).firstChild||Zh(e))?t.slice(0,-1):t;var e},Jh=function(t,e){var n=t.getParent(e,t.isBlock);return n&&"LI"===n.nodeName?n:null},Qh=function(t,e){var n=Ou.after(t),r=xl(e).prev(n);return r?r.toRange():null},tg=function(t,e,n){var r=t.parentNode;return Ee.each(e,(function(e){r.insertBefore(e,t)})),function(t,e){var n=Ou.before(t),r=xl(e).next(n);return r?r.toRange():null}(t,n)},eg=function(t,e,n,r){var o,i=function(t,e,n){var r=e.serialize(n);return function(t){var e=t.firstChild,n=t.lastChild;return e&&"META"===e.nodeName&&e.parentNode.removeChild(e),n&&"mce_marker"===n.id&&n.parentNode.removeChild(n),t}(t.createFragment(r))}(e,t,r),a=Jh(e,n.startContainer),s=Gh((o=i.firstChild,Y(o.childNodes,(function(t){return"LI"===t.nodeName})))),u=e.getRoot(),c=function(t){var r=Ou.fromRangeStart(n),o=xl(e.getRoot()),i=1===t?o.prev(r):o.next(r);return!i||Jh(e,i.getNode())!==a};return c(1)?tg(a,s,u):c(2)?function(t,e,n,r){return r.insertAfter(e.reverse(),t),Qh(e[0],n)}(a,s,u,e):function(t,e,n,r){var o=function(t,e){var n=e.cloneRange(),r=e.cloneRange();return n.setStartBefore(t),r.setEndAfter(t),[n.cloneContents(),r.cloneContents()]}(t,r),i=t.parentNode;return i.insertBefore(o[0],t),Ee.each(e,(function(e){i.insertBefore(e,t)})),i.insertBefore(o[1],t),i.removeChild(t),Qh(e[e.length-1],n)}(a,s,u,n)},ng=Kn,rg=function(t){var e=t.dom,n=Kh(t.selection.getRng());t.selection.setRng(n);var r=e.getParent(n.startContainer,ng);!function(t,e,n){return null!==n&&n===t.getParent(e.endContainer,ng)&&zd(Ae.fromDom(n),e)}(e,n,r)?t.getDoc().execCommand("Delete",!1,null):Ih(t,n,Ae.fromDom(r))},og=function(t,e,n){var r,o,i,a=t.selection,s=t.dom;/^ | $/.test(e)&&(e=function(t,e,n){var r=Ae.fromDom(t.getRoot());return n=Kp(r,Ou.fromRangeStart(e))?n.replace(/^ /," "):n.replace(/^ /," "),Yp(r,Ou.fromRangeEnd(e))?n.replace(/( | )()?$/," "):n.replace(/ ()?$/," ")}(s,a.getRng(),e));var u=t.parser,c=n.merge,l=tp({validate:yc(t)},t.schema),d='',f=t.fire("BeforeSetContent",{content:e,format:"html",selection:!0,paste:n.paste});if(f.isDefaultPrevented())t.fire("SetContent",{content:f.content,format:"html",selection:!0,paste:n.paste});else{-1===(e=f.content).indexOf("{$caret}")&&(e+="{$caret}"),e=e.replace(/\{\$caret\}/,d);var m=(o=a.getRng()).startContainer||(o.parentElement?o.parentElement():null),p=t.getBody();m===p&&a.isCollapsed()&&s.isBlock(p.firstChild)&&function(t,e){return e&&!t.schema.getShortEndedElements()[e.nodeName]}(t,p.firstChild)&&s.isEmpty(p.firstChild)&&((o=s.createRng()).setStart(p.firstChild,0),o.setEnd(p.firstChild,0),a.setRng(o)),a.isCollapsed()||rg(t);var h,g={context:(r=a.getNode()).nodeName.toLowerCase(),data:n.data,insert:!0},v=u.parse(e,g);if(!0===n.paste&&Xh(t.schema,v)&&function(t,e){return!!Jh(t,e)}(s,r))return o=eg(l,s,a.getRng(),v),a.setRng(o),void t.fire("SetContent",f);if(function(t){for(var e=t;e=e.walk();)1===e.type&&e.attr("data-mce-fragment","1")}(v),"mce_marker"===(i=v.lastChild).attr("id")){var b=i;for(i=i.prev;i;i=i.walk(!0))if(3===i.type||!s.isBlock(i.name)){t.schema.isValidChild(i.parent.name,"span")&&i.parent.insert(b,i,"br"===i.name);break}}if(t._selectionOverrides.showBlockCaretContainer(r),g.invalid){t.selection.setContent(d),r=a.getNode();var C=t.getBody();for(9===r.nodeType?r=i=C:i=r;i!==C;)r=i,i=i.parentNode;e=r===C?C.innerHTML:s.getOuterHTML(r),e=l.serialize(u.parse(e.replace(//i,(function(){return l.serialize(v)})))),r===C?s.setHTML(C,e):s.setOuterHTML(r,e)}else!function(t,e,n){if("all"===n.getAttribute("data-mce-bogus"))n.parentNode.insertBefore(t.dom.createFragment(e),n);else{var r=n.firstChild,o=n.lastChild;!r||r===o&&"BR"===r.nodeName?t.dom.setHTML(n,e):t.selection.setContent(e)}}(t,e=l.serialize(v),r);!function(t,e){var n=t.schema.getTextInlineElements(),r=t.dom;if(e){var o=t.getBody(),i=Gm(r);Ee.each(r.select("*[data-mce-fragment]"),(function(t){if(y(n[t.nodeName.toLowerCase()])&&op(r,t))for(var e=t.parentNode;y(e)&&e!==o&&!ip(r,t,e);e=e.parentNode)if(i.compare(e,t)){r.remove(t,!0);break}}))}}(t,c),function(t,e){var n,r=t.dom,o=t.selection;if(e){o.scrollIntoView(e);var i=Qd(t.getBody(),e);if("false"===r.getContentEditable(i))return r.remove(e),void o.select(i);var a=r.createRng(),s=e.previousSibling;if(jn(s)){if(a.setStart(s,s.nodeValue.length),!ke.ie){var u=e.nextSibling;jn(u)&&(s.appendData(u.data),u.parentNode.removeChild(u))}}else a.setStartBefore(e),a.setEndBefore(e);var c=r.getParent(e,r.isBlock);r.remove(e),c&&r.isEmpty(c)&&(t.$(c).empty(),a.setStart(c,0),a.setEnd(c,0),ng(c)||function(t){return!!t.getAttribute("data-mce-fragment")}(c)||!(n=function(e){var n=Ou.fromRangeStart(e);if(n=xl(t.getBody()).next(n))return n.toRange()}(a))?r.add(c,r.create("br",{"data-mce-bogus":"1"})):(a=n,r.remove(c))),o.setRng(a)}}(t,s.get("mce_marker")),h=t.getBody(),Ee.each(h.getElementsByTagName("*"),(function(t){t.removeAttribute("data-mce-fragment")})),function(t,e){B.from(t.getParent(e,"td,th")).map(Ae.fromDom).each(kp)}(s,a.getStart()),t.fire("SetContent",f),t.addVisual()}},ig=function(t,e){e(t),t.firstChild&&ig(t.firstChild,e),t.next&&ig(t.next,e)},ag=function(t,e,n){var r=function(t,e,n){var r={},o={},i=[];for(var a in n.firstChild&&ig(n.firstChild,(function(n){W(t,(function(t){t.name===n.name&&(r[t.name]?r[t.name].nodes.push(n):r[t.name]={filter:t,nodes:[n]})})),W(e,(function(t){"string"==typeof n.attr(t.name)&&(o[t.name]?o[t.name].nodes.push(n):o[t.name]={filter:t,nodes:[n]})}))})),r)Ct(r,a)&&i.push(r[a]);for(var s in o)Ct(o,s)&&i.push(o[s]);return i}(t,e,n);W(r,(function(t){W(t.filter.callbacks,(function(e){e(t.nodes,t.filter.name,{})}))}))},sg=function(t){return t instanceof $m},ug=function(t,e,n){t.dom.setHTML(t.getBody(),e),!0!==n&&function(t){Cm(t)&&Il(t.getBody()).each((function(e){var n=e.getNode(),r=Rn(n)?Il(n).getOr(e):e;t.selection.setRng(r.toRange())}))}(t)},cg=function(t,e,n){var r=function(t,e){return At(At({format:"html"},t),{set:!0,content:sg(e)?"":e})}(n,e),o=n.no_events?r:t.fire("BeforeSetContent",r);return sg(e)||(e=o.content),B.from(t.getBody()).fold(D(e),(function(n){return sg(e)?function(t,e,n,r){ag(t.parser.getNodeFilters(),t.parser.getAttributeFilters(),n);var o=tp({validate:t.validate},t.schema).serialize(n);return r.content=yo(Ae.fromDom(e))?o:Ee.trim(o),ug(t,r.content,r.no_selection),r.no_events||t.fire("SetContent",r),n}(t,n,e,o):function(t,e,n,r){if(0===n.length||/^\s+$/.test(n)){var o='
    ';"TABLE"===e.nodeName?n=""+o+"":/^(UL|OL)$/.test(e.nodeName)&&(n="
  • "+o+"
  • ");var i=nc(t);i&&t.schema.isValidChild(e.nodeName.toLowerCase(),i.toLowerCase())?(n=o,n=t.dom.createHTML(i,rc(t),n)):n||(n='
    '),ug(t,n,r.no_selection),t.fire("SetContent",r)}else"raw"!==r.format&&(n=tp({validate:t.validate},t.schema).serialize(t.parser.parse(n,{isRootContent:!0,insert:!0}))),r.content=yo(Ae.fromDom(e))?n:Ee.trim(n),ug(t,r.content,r.no_selection),r.no_events||t.fire("SetContent",r);return r.content}(t,n,e,o)}))},lg=function(t,e){return function(t,e){var n=t.dom;return n.parentNode?Zr(Ae.fromDom(n.parentNode),(function(n){return!Pe(t,n)&&e(n)})):B.none()}(t,e).isSome()},dg=function(t){return C(t)?t:N},fg=function(t,e,n){var r=e(t),o=dg(n);return r.orThunk((function(){return o(t)?B.none():function(t,e,n){for(var r=t.dom,o=dg(n);r.parentNode;){r=r.parentNode;var i=Ae.fromDom(r),a=e(i);if(a.isSome())return a;if(o(i))break}return B.none()}(t,e,o)}))},mg=sd,pg=function(t,e,n){var r=t.formatter.get(n);if(r)for(var o=0;o1&&"%"===t.charAt(0)};return H(["styles","attributes"],(function(n){return yt(t,n).exists((function(t){var n=p(t)?t:bt(t);return H(n,e)}))}))}))}(t,r);return t.formatter.matchNode(e,r,{},o)?n.concat([r]):n}),[])},_g=wo,kg="_mce_caret",xg=function(t){return function(t){for(var e=[];t;){if(3===t.nodeType&&t.nodeValue!==_g||t.childNodes.length>1)return[];1===t.nodeType&&e.push(t),t=t.firstChild}return e}(t).length>0},Dg=function(t){if(t){var e=new so(t,t);for(t=e.current();t;t=e.next())if(jn(t))return t}return null},Sg=function(t){var e=Ae.fromTag("span");return tr(e,{id:kg,"data-mce-bogus":"1","data-mce-type":"format-caret"}),t&&pn(e,Ae.fromText(_g)),e},Tg=function(t,e,n){void 0===n&&(n=!0);var r=t.dom,o=t.selection;if(xg(e))hh(t,!1,Ae.fromDom(e),n);else{var i=o.getRng(),a=r.getParent(e,r.isBlock),s=i.startContainer,u=i.startOffset,c=i.endContainer,l=i.endOffset,d=function(t){var e=Dg(t);return e&&e.nodeValue.charAt(0)===_g&&e.deleteData(0,1),e}(e);r.remove(e,!0),s===d&&u>0&&i.setStart(d,u-1),c===d&&l>0&&i.setEnd(d,l-1),a&&r.isEmpty(a)&&_p(Ae.fromDom(a)),o.setRng(i)}},Eg=function(t,e,n){void 0===n&&(n=!0);var r=t.dom,o=t.selection;if(e)Tg(t,e,n);else if(!(e=jl(t.getBody(),o.getStart())))for(;e=r.get(kg);)Tg(t,e,!1)},Og=function(t,e){return t.appendChild(e),e},Ag=function(t,e){var n=X(t,(function(t,e){return Og(t,e.cloneNode(!1))}),e);return Og(n,n.ownerDocument.createTextNode(_g))},Lg=function(t,e,n,r){var o,i,a,s=t.dom,u=t.selection,c=[],l=u.getRng(),d=l.startContainer,f=l.startOffset;for(i=d,3===d.nodeType&&(f!==d.nodeValue.length&&(o=!0),i=i.parentNode);i;){if(bg(t,i,e,n,r)){a=i;break}i.nextSibling&&(o=!0),c.push(i),i=i.parentNode}if(a)if(o){var m=u.getBookmark();l.collapse(!0);var p=Ld(t,l,t.formatter.get(e),!0);p=wf(p),t.formatter.remove(e,n,p,r),u.moveToBookmark(m)}else{var h=jl(t.getBody(),a),g=Sg(!1).dom;!function(t,e,n){var r=t.dom,o=r.getParent(n,E(rd,t));o&&r.isEmpty(o)?n.parentNode.replaceChild(e,n):(wp(Ae.fromDom(n)),r.isEmpty(n)?n.parentNode.replaceChild(e,n):r.insertAfter(e,n))}(t,g,null!==h?h:a);var v=function(t,e,n,r,o,i){var a=t.formatter,s=t.dom,u=Y(lt(a.get()),(function(t){return t!==r&&!Bt(t,"removeformat")})),c=wg(t,n,u);if(Y(c,(function(e){return!fd(t,e,r)})).length>0){var l=n.cloneNode(!1);return s.add(e,l),a.remove(r,o,l,i),s.remove(l),B.some(l)}return B.none()}(t,g,a,e,n,r),b=Ag(c.concat(v.toArray()),g);Tg(t,h,!1),u.setCursorLocation(b,1),s.isEmpty(a)&&s.remove(a)}},Ng=function(t){t.on("mouseup keydown",(function(e){!function(t,e){var n=t.selection,r=t.getBody();Eg(t,null,!1),8!==e&&46!==e||!n.isCollapsed()||n.getStart().innerHTML!==_g||Eg(t,jl(r,n.getStart())),37!==e&&39!==e||Eg(t,jl(r,n.getStart()))}(t,e.keyCode)}))},$g=function(t,e){var n=t.schema.getTextInlineElements();return Ct(n,Be(e))&&!Ml(e.dom)&&!In(e.dom)},Pg={},Ig=Dt,Rg=kt;!function(t,e){Pg[t]||(Pg[t]=[]),Pg[t].push(e)}("pre",(function(t){var e,n=t.selection.getRng(),r=Nn(["pre"]);n.collapsed||(e=t.selection.getSelectedBlocks(),Rg(Ig(Ig(e,r),(function(t){return r(t.previousSibling)&&-1!==St(e,t.previousSibling)})),(function(t){var e,n;e=t.previousSibling,cs(n=t).remove(),cs(e).append("

    ").append(n.childNodes)})))}));var Bg=Ee.each,Mg=function(t){return Ln(t)&&!Zl(t)&&!Ml(t)&&!In(t)},jg=function(t,e){for(var n=t;n;n=n[e]){if(jn(n)&&Ht(n.data))return t;if(Ln(n)&&!Zl(n))return n}return t},zg=function(t,e,n){var r=Gm(t);if(e&&n&&(e=jg(e,"previousSibling"),n=jg(n,"nextSibling"),r.compare(e,n))){for(var o=e.nextSibling;o&&o!==n;){var i=o;o=o.nextSibling,e.appendChild(i)}return t.remove(n),Ee.each(Ee.grep(n.childNodes),(function(t){e.appendChild(t)})),e}return n},Fg=function(t,e,n,r){if(r&&!1!==e.merge_siblings){var o=zg(t,nd(r),r);zg(t,o,nd(o,!0))}},Ug=function(t,e,n){Bg(t.childNodes,(function(t){Mg(t)&&(e(t)&&n(t),t.hasChildNodes()&&Ug(t,e,n))}))},Hg=function(t,e){return function(n){return!(!n||!cd(t,n,e))}},Vg=function(t,e,n){return function(r){t.setStyle(r,e,n),""===r.getAttribute("style")&&r.removeAttribute("style"),function(t,e){"SPAN"===e.nodeName&&0===t.getAttribs(e).length&&t.remove(e,!0)}(t,r)}},Wg=Dr([{keep:[]},{rename:["name"]},{removed:[]}]),qg=/^(src|href|style)$/,Kg=Ee.each,Yg=sd,Xg=function(t,e,n){return t.isChildOf(e,n)&&e!==n&&!t.isBlock(n)},Zg=function(t,e,n){var r=e[n?"startContainer":"endContainer"],o=e[n?"startOffset":"endOffset"];if(Ln(r)){var i=r.childNodes.length-1;!n&&o&&o--,r=r.childNodes[o>i?i:o]}return jn(r)&&n&&o>=r.nodeValue.length&&(r=new so(r,t.getBody()).next()||r),jn(r)&&!n&&0===o&&(r=new so(r,t.getBody()).prev()||r),r},Gg=function(t,e){var n=e?"firstChild":"lastChild";if(function(t){return/^(TR|TH|TD)$/.test(t.nodeName)}(t)&&t[n]){var r=t[n];return"TR"===t.nodeName&&r[n]||r}return t},Jg=function(t,e,n,r){var o=t.create(n,r);return e.parentNode.insertBefore(o,e),o.appendChild(e),o},Qg=function(t,e,n,r,o){var i=Ae.fromDom(e),a=Ae.fromDom(t.create(r,o)),s=n?Ge(i):Ze(i);return hn(a,s),n?(dn(i,a),mn(a,i)):(fn(i,a),pn(a,i)),a.dom},tv=function(t,e,n,r){var o=nd(e,n,r);return b(o)||"BR"===o.nodeName||t.isBlock(o)},ev=function(t,e,n){var r,o=e.parentNode,i=t.dom,a=nc(t);md(n)&&(a?o===i.getRoot()&&(n.list_block&&Yg(e,n.list_block)||W(ut(e.childNodes),(function(e){od(t,a,e.nodeName.toLowerCase())?r?r.appendChild(e):(r=Jg(i,e,a),i.setAttribs(r,t.settings.forced_root_block_attrs)):r=null}))):i.isBlock(e)&&!i.isBlock(o)&&(tv(i,e,!1)||tv(i,e.firstChild,!0,!0)||e.insertBefore(i.create("br"),e.firstChild),tv(i,e,!0)||tv(i,e.lastChild,!1,!0)||e.appendChild(i.create("br")))),function(t){return pd(t)&&hd(t)&&Xn(yt(t,"mixed"),!0)}(n)&&!Yg(n.inline,e)||i.remove(e,!0)},nv=function(t,e,n,r,o){var i,a=t.dom;if(!function(t,e,n){return!(!hd(n)||!Yg(e,n.inline))||!(!md(n)||!Yg(e,n.block))||(pd(n)?Ln(e)&&t.is(e,n.selector):void 0)}(a,r,e)&&!function(t,e){return e.links&&"A"===t.nodeName}(r,e))return Wg.keep();var s=r;if(hd(e)&&"all"===e.remove&&p(e.preserve_attributes)){var u=Y(a.getAttribs(s),(function(t){return U(e.preserve_attributes,t.name.toLowerCase())}));if(a.removeAllAttribs(s),W(u,(function(t){return a.setAttrib(s,t.name,t.value)})),u.length>0)return Wg.rename("span")}if("all"!==e.remove){Kg(e.styles,(function(t,r){t=ud(a,ad(t,n),r+""),w(r)&&(r=t,o=null),(e.remove_similar||!o||Yg(cd(a,o,r),t))&&a.setStyle(s,r,""),i=!0})),i&&""===a.getAttrib(s,"style")&&(s.removeAttribute("style"),s.removeAttribute("data-mce-style")),Kg(e.attributes,(function(t,r){var i;if(t=ad(t,n),w(r)&&(r=t,o=null),e.remove_similar||!o||Yg(a.getAttrib(o,r),t)){if("class"===r&&(t=a.getAttrib(s,r))&&(i="",W(t.split(/\s+/),(function(t){/mce\-\w+/.test(t)&&(i+=(i?" ":"")+t)})),i))return void a.setAttrib(s,r,i);if(qg.test(r)&&s.removeAttribute("data-mce-"+r),"style"===r&&Nn(["li"])(s)&&"none"===a.getStyle(s,"list-style-type"))return s.removeAttribute(r),void a.setStyle(s,"list-style-type","none");"class"===r&&s.removeAttribute("className"),s.removeAttribute(r)}})),Kg(e.classes,(function(t){t=ad(t,n),o&&!a.hasClass(o,t)||a.removeClass(s,t)}));for(var c=a.getAttribs(s),l=0;l1)&&r.isBlock(a)||0!==s?(hd(i)||md(i)&&i.wrapper)&&(i.exact||1!==s||(a=function(t){var e=J(t.childNodes,cv).filter((function(t){return gg(r,t,i)}));return e.map((function(e){var n=r.clone(e,!1);return c(n),r.replace(n,t,!0),r.remove(e,!0),n})).getOr(t)}(a)),sv(t,o,n,a),function(t,e,n,r,o){bg(t,o.parentNode,n,r)&&rv(t,e,r,o)||e.merge_with_parents&&t.dom.getParent(o.parentNode,(function(i){if(bg(t,i,n,r))return rv(t,e,r,o),!0}))}(t,i,e,n,a),function(t,e,n,r){e.styles&&e.styles.backgroundColor&&Ug(r,Hg(t,"fontSize"),Vg(t,"backgroundColor",ad(e.styles.backgroundColor,n)))}(r,i,n,a),function(t,e,n,r){var o=function(e){if(1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType){var n=ld(t,e.parentNode);t.getStyle(e,"color")&&n?t.setStyle(e,"text-decoration",n):t.getStyle(e,"text-decoration")===n&&t.setStyle(e,"text-decoration",null)}};e.styles&&(e.styles.color||e.styles.textDecoration)&&(Ee.walk(r,o,"childNodes"),o(r))}(r,i,0,a),function(t,e,n,r){!hd(e)||"sub"!==e.inline&&"sup"!==e.inline||(Ug(r,Hg(t,"fontSize"),Vg(t,"fontSize","")),t.remove(t.select("sup"===e.inline?"sub":"sup",r),!0))}(r,i,0,a),Fg(r,i,0,a)):r.remove(a,!0)}))};if("false"!==s.getContentEditable(u.getNode())){if(i){if(r)if(td(r)){if(!l(o,r)){var p=s.createRng();p.setStartBefore(r),p.setEndAfter(r),m(s,Ld(t,p,o),!0)}}else m(s,r,!0);else if(a&&hd(i)&&!Rd(t).length)!function(t,e,n){var r,o,i=t.selection,a=i.getRng(),s=a.startOffset,u=a.startContainer.nodeValue;(r=jl(t.getBody(),i.getStart()))&&(o=Dg(r));var c,l,d=/[^\s\u00a0\u00ad\u200b\ufeff]/;if(u&&s>0&&st?e.cells.length:t}),0)},xv=function(t,e){for(var n=t.rows,r=0;r0?vv([o]):o;var n,r,o},$v=function(t,e){return(n=t,r=e[0],Gr(r,"table",E(Pe,n))).bind((function(t){var n=e[0],r=e[e.length-1],o=Sv(t);return Ev(o,n,r).map((function(t){return vv([Tv(t)])}))})).getOrThunk(Lv);var n,r},Pv=function(t,e){var n=Id(e,t);return n.length>0?$v(t,n):function(t,e){return e.length>0&&e[0].collapsed?Lv():Nv(t,e[0])}(t,e)},Iv=function(t,e){return e>=0&&ei-o?(a.push([2,n[l]]),++l):(a.push([1,r[d]]),++d);else{s(t,u.start,o,u.start-u.diag,a);for(var f=u.start;f=t&&h>=o&&n[p]===r[h];)a[m]=p--,h--;if(g%2==0&&-d<=f&&f<=d&&a[m]<=i[m+g])return u(a[m],f+t-o,e,s)}}},l=[],s(0,n.length,0,r.length,l),l),e),e},Fv=Nt((function(){return document.implementation.createHTMLDocument("undo")})),Uv=function(t){var e,n=(e=t.getBody(),Y(V(ut(e.childNodes),Mv),(function(t){return t.length>0}))),r=tt(n,(function(e){var n=Km(t.serializer,e);return n.length>0?[n]:[]})),o=r.join("");return-1!==o.indexOf("")?function(t){return{type:"fragmented",fragments:t,content:"",bookmark:null,beforeBookmark:null}}(r):function(t){return{type:"complete",fragments:null,content:t,bookmark:null,beforeBookmark:null}}(o)},Hv=function(t,e,n){var r=n?e.beforeBookmark:e.bookmark;"fragmented"===e.type?zv(e.fragments,t.getBody()):t.setContent(e.content,{format:"raw",no_selection:!y(r)||!zl(r)||!r.isFakeCaret}),t.selection.moveToBookmark(r)},Vv=function(t){return"fragmented"===t.type?t.fragments.join(""):t.content},Wv=function(t){var e=Ae.fromTag("body",Fv());return Ys(e,Vv(t)),W(Ms(e,"*[data-mce-bogus]"),bn),e.dom.innerHTML},qv=function(t,e){return!(!t||!e)&&(!!function(t,e){return Vv(t)===Vv(e)}(t,e)||function(t,e){return Wv(t)===Wv(e)}(t,e))},Kv=function(t){return 0===t.get()},Yv=function(t,e,n){Kv(n)&&(t.typing=e)},Xv=function(t,e){t.typing&&(Yv(t,!1,e),t.add())},Zv=function(t){return{undoManager:{beforeChange:function(e,n){return function(t,e,n){Kv(e)&&n.set(Ju(t.selection))}(t,e,n)},add:function(e,n,r,o,i,a){return function(t,e,n,r,o,i,a){var s=Uv(t);if(i=i||{},i=Ee.extend(i,s),!1===Kv(r)||t.removed)return null;var u=e.data[n.get()];if(t.fire("BeforeAddUndo",{level:i,lastLevel:u,originalEvent:a}).isDefaultPrevented())return null;if(u&&qv(u,i))return null;e.data[n.get()]&&o.get().each((function(t){e.data[n.get()].beforeBookmark=t}));var c=function(t){return t.getParam("custom_undo_redo_levels",0,"number")}(t);if(c&&e.data.length>c){for(var l=0;l0?(t.setDirty(!0),t.fire("AddUndo",d),t.fire("change",d)):t.fire("AddUndo",d),i}(t,e,n,r,o,i,a)},undo:function(e,n,r){return function(t,e,n,r){var o;return e.typing&&(e.add(),e.typing=!1,Yv(e,!1,n)),r.get()>0&&(r.set(r.get()-1),o=e.data[r.get()],Hv(t,o,!0),t.setDirty(!0),t.fire("Undo",{level:o})),o}(t,e,n,r)},redo:function(e,n){return function(t,e,n){var r;return e.get()0||e.typing&&e.data[0]&&!qv(Uv(t),e.data[0])}(t,e,n)},hasRedo:function(t,e){return function(t,e){return e.get()=0;a--){var s=n[a];if(!pd(s)||y(s.defaultBlock))return!0;for(var u=i.length-1;u>=0;u--)if(r.is(i[u],s.selector))return!0}return!1}(t,e)},closest:function(e){return Cg(t,e)},apply:function(e,n,r){return lv(t,e,n,r)},remove:function(e,n,r,o){return iv(t,e,n,r,o)},toggle:function(e,n,r){return function(t,e,n,r){var o=t.formatter.get(e);!yg(t,e,n,r)||"toggle"in o[0]&&!o[0].toggle?lv(t,e,n,r):iv(t,e,n,r)}(t,e,n,r)},formatChanged:function(e,n,r,o,i){return gv(t,e,n,r,o,i)}},editor:{getContent:function(e,n){return function(t,e,n){return B.from(t.getBody()).fold(D("tree"===e.format?new $m("body",11):""),(function(r){return Xm(t,e,n,r)}))}(t,e,n)},setContent:function(e,n){return cg(t,e,n)},insertContent:function(e,n){return og(t,e,n)},addVisual:function(e){return function(t,e){var n=t.dom,r=y(e)?e:t.getBody();v(t.hasVisual)&&(t.hasVisual=function(t){return t.getParam("visual",!0,"boolean")}(t)),W(n.select("table,a",r),(function(e){switch(e.nodeName){case"TABLE":var r=function(t){return t.getParam("visual_table_class","mce-item-table","string")}(t),o=n.getAttrib(e,"border");o&&"0"!==o||!t.hasVisual?n.removeClass(e,r):n.addClass(e,r);break;case"A":if(!n.getAttrib(e,"href")){var i=n.getAttrib(e,"name")||e.id,a=function(t){return t.getParam("visual_anchor_class","mce-item-anchor","string")}(t);i&&t.hasVisual?n.addClass(e,a):n.removeClass(e,a)}}})),t.fire("VisualAid",{element:e,hasVisual:t.hasVisual})}(t,e)}},selection:{getContent:function(e,n){return Bv(t,e,n)}},raw:{getModel:function(){return B.none()}}}},Gv=function(t){return Ct(t.plugins,"rtc")},Jv=function(t){var e=t;return function(t){return yt(t.plugins,"rtc").bind((function(t){return B.from(t.setup)}))}(t).fold((function(){return e.rtcInstance=Zv(t),B.none()}),(function(t){return e.rtcInstance=function(){var t=D(null),e=D("");return{undoManager:{beforeChange:_,add:t,undo:t,redo:t,clear:_,reset:_,hasUndo:N,hasRedo:N,transact:t,ignore:_,extra:_},formatter:{match:N,matchAll:D([]),matchNode:D(void 0),canApply:N,closest:e,apply:_,remove:_,toggle:_,formatChanged:D({unbind:_})},editor:{getContent:e,setContent:e,insertContent:_,addVisual:_},selection:{getContent:e},raw:{getModel:D(B.none())}}}(),B.some((function(){return t().then((function(t){return e.rtcInstance=function(t){var e=function(t){return m(t)?t:{}},n=t.undoManager,r=t.formatter,o=t.editor,i=t.selection,a=t.raw;return{undoManager:{beforeChange:n.beforeChange,add:n.add,undo:n.undo,redo:n.redo,clear:n.clear,reset:n.reset,hasUndo:n.hasUndo,hasRedo:n.hasRedo,transact:function(t,e,r){return n.transact(r)},ignore:function(t,e){return n.ignore(e)},extra:function(t,e,r,o){return n.extra(r,o)}},formatter:{match:function(t,n,o,i){return r.match(t,e(n),i)},matchAll:r.matchAll,matchNode:r.matchNode,canApply:function(t){return r.canApply(t)},closest:function(t){return r.closest(t)},apply:function(t,n,o){return r.apply(t,e(n))},remove:function(t,n,o,i){return r.remove(t,e(n))},toggle:function(t,n,o){return r.toggle(t,e(n))},formatChanged:function(t,e,n,o,i){return r.formatChanged(e,n,o,i)}},editor:{getContent:function(t,e){return o.getContent(t)},setContent:function(t,e){return o.setContent(t,e)},insertContent:function(t,e){return o.insertContent(t)},addVisual:o.addVisual},selection:{getContent:function(t,e){return i.getContent(e)}},raw:{getModel:function(){return B.some(a.getRawModel())}}}}(t),t.rtc.isRemote}))}))}))},Qv=function(t){return t.rtcInstance?t.rtcInstance:Zv(t)},tb=function(t){var e=t.rtcInstance;if(e)return e;throw new Error("Failed to get RTC instance not yet initialized.")},eb=function(t,e){return void 0===e&&(e={}),function(t,e,n){return tb(t).selection.getContent(e,n)}(t,e.format?e.format:"html",e)},nb=function(t){return 0===t.dom.length?(vn(t),B.none()):B.some(t)},rb=function(t,e,n,r){t.bind((function(t){return(r?rh:nh)(t.dom,r?t.dom.length:0),e.filter(Fe).map((function(e){return function(t,e,n,r){var o=t.dom,i=e.dom,a=r?o.length:i.length;r?(oh(o,i,!1,!r),n.setStart(i,a)):(oh(i,o,!1,!r),n.setEnd(i,a))}(t,e,n,r)}))})).orThunk((function(){var t=function(t,e){return t.filter((function(t){return Jd.isBookmarkNode(t.dom)})).bind(e?Xe:Ye)}(e,r).or(e).filter(Fe);return t.map((function(t){return function(t,e){Ke(t).each((function(n){var r=t.dom;e&&Kp(n,Ou(r,0))?nh(r,0):!e&&Yp(n,Ou(r,r.length))&&rh(r,r.length)}))}(t,r)}))}))},ob=function(t,e,n){void 0===n&&(n={});var r=function(t,e){return At(At({format:"html"},t),{set:!0,selection:!0,content:e})}(n,e),o=r;if(!r.no_events){var i=t.fire("BeforeSetContent",r);if(i.isDefaultPrevented())return void t.fire("SetContent",i);o=i}o.content=function(t,e){if("raw"!==e.format){var n=t.selection.getRng(),r=t.dom.getParent(n.commonAncestorContainer,t.dom.isBlock),o=r?{context:r.nodeName.toLowerCase()}:{},i=t.parser.parse(e.content,At(At({isRootContent:!0,forced_root_block:!1},o),e));return tp({validate:t.validate},t.schema).serialize(i)}return e.content}(t,o);var a=t.selection.getRng();!function(t,e){var n=B.from(e.firstChild).map(Ae.fromDom),r=B.from(e.lastChild).map(Ae.fromDom);t.deleteContents(),t.insertNode(e);var o=n.bind(Ye).filter(Fe).bind(nb),i=r.bind(Xe).filter(Fe).bind(nb);rb(o,n,t,!0),rb(i,r,t,!1),t.collapse(!1)}(a,a.createContextualFragment(o.content)),t.selection.setRng(a),Vf(t,a),o.no_events||t.fire("SetContent",o)},ib=function(t,e,n){if(t&&Ct(t,e)){var r=Y(t[e],(function(t){return t!==n}));0===r.length?delete t[e]:t[e]=r}};var ab,sb,ub=function(t){return!!t.select},cb=function(t){return!(!t||!t.ownerDocument)&&Re(Ae.fromDom(t.ownerDocument),Ae.fromDom(t))},lb=function(t,e,n,r){var o,i,a=function(t,e){var n,r,o=function(e,n){return J(n,(function(n){return t.is(n,e)}))},i=function(e){return t.getParents(e,null,t.getRoot())};return{selectorChangedWithUnbind:function(t,a){return n||(n={},r={},e.on("NodeChange",(function(t){var e=t.element,a=i(e),s={};Ee.each(n,(function(t,e){o(e,a).each((function(n){r[e]||(W(t,(function(t){t(!0,{node:n,selector:e,parents:a})})),r[e]=t),s[e]=t}))})),Ee.each(r,(function(t,n){s[n]||(delete r[n],Ee.each(t,(function(t){t(!1,{node:e,selector:n,parents:a})})))}))}))),n[t]||(n[t]=[]),n[t].push(a),o(t,i(e.selection.getStart())).each((function(){r[t]=n[t]})),{unbind:function(){ib(n,t,a),ib(r,t,a)}}}}}(t,r).selectorChangedWithUnbind,s=function(t,e){return ob(r,t,e)},u=function(t){var e=l();e.collapse(!!t),d(e)},c=function(){return e.getSelection?e.getSelection():e.document.selection},l=function(){var n,a,s,u=function(t,e,n){try{return e.compareBoundaryPoints(t,n)}catch(t){return-1}},l=e.document;if(void 0!==r.bookmark&&!1===Cm(r)){var d=um(r);if(d.isSome())return d.map((function(t){return Em(r,[t])[0]})).getOr(l.createRange())}try{(n=c())&&!An(n.anchorNode)&&(a=n.rangeCount>0?n.getRangeAt(0):n.createRange?n.createRange():l.createRange(),a=Em(r,[a])[0])}catch(t){}return a||(a=l.createRange?l.createRange():l.body.createTextRange()),a.setStart&&9===a.startContainer.nodeType&&a.collapsed&&(s=t.getRoot(),a.setStart(s,0),a.setEnd(s,0)),o&&i&&(0===u(a.START_TO_START,a,o)&&0===u(a.END_TO_END,a,o)?a=i:(o=null,i=null)),a},d=function(t,e){var n;if(function(t){return!!t&&(!!ub(t)||cb(t.startContainer)&&cb(t.endContainer))}(t)){var a=ub(t)?t:null;if(a){i=null;try{a.select()}catch(t){}}else{var s=c();if(t=r.fire("SetSelectionRange",{range:t,forward:e}).range,s){i=t;try{s.removeAllRanges(),s.addRange(t)}catch(t){}!1===e&&s.extend&&(s.collapse(t.endContainer,t.endOffset),s.extend(t.startContainer,t.startOffset)),o=s.rangeCount>0?s.getRangeAt(0):null}t.collapsed||t.startContainer!==t.endContainer||!s.setBaseAndExtent||ke.ie||t.endOffset-t.startOffset<2&&t.startContainer.hasChildNodes()&&(n=t.startContainer.childNodes[t.startOffset])&&"IMG"===n.tagName&&(s.setBaseAndExtent(t.startContainer,t.startOffset,t.endContainer,t.endOffset),s.anchorNode===t.startContainer&&s.focusNode===t.endContainer||s.setBaseAndExtent(n,0,n,1)),r.fire("AfterSetSelectionRange",{range:t,forward:e})}}},f=function(){var e=c(),n=null==e?void 0:e.anchorNode,r=null==e?void 0:e.focusNode;if(!e||!n||!r||An(n)||An(r))return!0;var o=t.createRng();o.setStart(n,e.anchorOffset),o.collapse(!0);var i=t.createRng();return i.setStart(r,e.focusOffset),i.collapse(!0),o.compareBoundaryPoints(o.START_TO_START,i)<=0},m={bookmarkManager:null,controlSelection:null,dom:t,win:e,serializer:n,editor:r,collapse:u,setCursorLocation:function(e,n){var o=t.createRng();y(e)&&y(n)?(o.setStart(e,n),o.setEnd(e,n),d(o),u(!1)):(Fd(t,o,r.getBody(),!0),d(o))},getContent:function(t){return eb(r,t)},setContent:s,getBookmark:function(t,e){return p.getBookmark(t,e)},moveToBookmark:function(t){return p.moveToBookmark(t)},select:function(e,n){return function(t,e,n){return B.from(e).map((function(e){var r=t.nodeIndex(e),o=t.createRng();return o.setStart(e.parentNode,r),o.setEnd(e.parentNode,r+1),n&&(Fd(t,o,e,!0),Fd(t,o,e,!1)),o}))}(t,e,n).each(d),e},isCollapsed:function(){var t=l(),e=c();return!(!t||t.item)&&(t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!e||t.collapsed)},isForward:f,setNode:function(e){return s(t.getOuterHTML(e)),e},getNode:function(){return function(t,e){var n,r,o;if(!e)return t;r=e.startContainer,o=e.endContainer;var i=e.startOffset,a=e.endOffset;return n=e.commonAncestorContainer,!e.collapsed&&(r===o&&a-i<2&&r.hasChildNodes()&&(n=r.childNodes[i]),3===r.nodeType&&3===o.nodeType&&(r=r.length===i?Tm(r.nextSibling,!0):r.parentNode,o=0===a?Tm(o.previousSibling,!1):o.parentNode,r&&r===o))?r:n&&3===n.nodeType?n.parentNode:n}(r.getBody(),l())},getSel:c,setRng:d,getRng:l,getStart:function(t){return Dm(r.getBody(),l(),t)},getEnd:function(t){return Sm(r.getBody(),l(),t)},getSelectedBlocks:function(e,n){return function(t,e,n,r){var o,i=[],a=t.getRoot();if(n=t.getParent(n||Dm(a,e,e.collapsed),t.isBlock),r=t.getParent(r||Sm(a,e,e.collapsed),t.isBlock),n&&n!==a&&i.push(n),n&&r&&n!==r){o=n;for(var s=new so(n,a);(o=s.next())&&o!==r;)t.isBlock(o)&&i.push(o)}return r&&n!==r&&r!==a&&i.push(r),i}(t,l(),e,n)},normalize:function(){var e=l(),n=c();if(!($d(n).length>1)&&Ud(r)){var o=yf(t,e);return o.each((function(t){d(t,f())})),o.getOr(e)}return e},selectorChanged:function(t,e){return a(t,e),m},selectorChangedWithUnbind:a,getScrollContainer:function(){for(var e,n=t.getRoot();n&&"BODY"!==n.nodeName;){if(n.scrollHeight>n.clientHeight){e=n;break}n=n.parentNode}return e},scrollIntoView:function(t,e){y(t)?function(t,e,n){(t.inline?Ff:Hf)(t,e,n)}(r,t,e):Vf(r,l(),e)},placeCaretAt:function(t,e){return d(cf(t,e,r.getDoc()))},getBoundingClientRect:function(){var t=l();return t.collapsed?Ou.fromRangeStart(t).getClientRects()[0]:t.getBoundingClientRect()},destroy:function(){e=o=i=null,h.destroy()}},p=Jd(m),h=sf(m,r);return m.bookmarkManager=p,m.controlSelection=h,m},db=function(t,e,n){t.addNodeFilter("font",(function(t){W(t,(function(t){var r=e.parse(t.attr("style")),o=t.attr("color"),i=t.attr("face"),a=t.attr("size");o&&(r.color=o),i&&(r["font-family"]=i),a&&(r["font-size"]=n[parseInt(t.attr("size"),10)-1]),t.name="span",t.attr("style",e.serialize(r)),function(t,e){W(e,(function(e){t.attr(e,null)}))}(t,["color","face","size"])}))}))},fb=function(t,e){var n=Li();e.convert_fonts_to_spans&&db(t,n,Ee.explode(e.font_size_legacy_values)),function(t,e){t.addNodeFilter("strike",(function(t){W(t,(function(t){var n=e.parse(t.attr("style"));n["text-decoration"]="line-through",t.name="span",t.attr("style",e.serialize(n))}))}))}(t,n)},mb=function(t){var e,n=decodeURIComponent(t).split(","),r=/data:([^;]+)/.exec(n[0]);return r&&(e=r[1]),{type:e,data:n[1]}},pb=function(t,e){var n;try{n=atob(e)}catch(t){return B.none()}for(var r=new Uint8Array(n.length),o=0;o0)return void(r.value=o);var i=r.next;if(i){if(3===i.type&&i.value.length){r=r.prev;continue}if(!n[i.name]&&"script"!==i.name&&"style"!==i.name){r=r.prev;continue}}var a=r.prev;r.remove(),r=a}},L=qm({validate:w,document:t.document,allow_html_data_urls:t.allow_html_data_urls,allow_svg_data_urls:t.allow_svg_data_urls,allow_script_urls:t.allow_script_urls,allow_conditional_comments:t.allow_conditional_comments,preserve_cdata:t.preserve_cdata,self_closing_elements:function(t){var e={};for(var n in t)"li"!==n&&"p"!==n&&(e[n]=t[n]);return e}(e.getSelfClosingElements()),cdata:function(t){g.append(O("#cdata",4)).value=t},text:function(t,e){var n;E||(t=t.replace(S," "),function(t,e){return t&&(Ct(e,t.name)||"br"===t.name)}(g.lastChild,b)&&(t=t.replace(x,""))),0!==t.length&&((n=O("#text",3)).raw=!!e,g.append(n).value=t)},comment:function(t){g.append(O("#comment",8)).value=t},pi:function(t,e){g.append(O(t,7)).value=e,A(g)},doctype:function(t){g.append(O("#doctype",10)).value=t,A(g)},start:function(t,n,o){var a=w?e.getElementRule(t):{};if(a){var s=O(a.outputName||t,1);s.attributes=n,s.shortEnded=o,g.append(s);var u=C[g.name];u&&C[s.name]&&!u[s.name]&&v.push(s);for(var c=r.length;c--;){var l=r[c].name;l in n.map&&((p=i[l])?p.push(s):i[l]=[s])}b[t]&&A(s),o||(g=s),!E&&k[t]&&(E=!0)}},end:function(n){var r,o,i,a,s=w?e.getElementRule(n):{};if(s){if(b[n]&&!E){if((r=g.firstChild)&&3===r.type)if((o=r.value.replace(x,"")).length>0)r.value=o,r=r.next;else for(i=r.next,r.remove(),r=i;r&&3===r.type;)o=r.value,i=r.next,(0===o.length||T.test(o))&&(r.remove(),r=i),r=i;if((r=g.lastChild)&&3===r.type)if((o=r.value.replace(D,"")).length>0)r.value=o,r=r.prev;else for(i=r.prev,r.remove(),r=i;r&&3===r.type;)o=r.value,i=r.prev,(0===o.length||T.test(o))&&(r.remove(),r=i),r=i}if(E&&k[n]&&(E=!1),s.removeEmpty&&_b(e,y,k,g))return a=g.parent,b[g.name]?g.empty().remove():g.unwrap(),void(g=a);s.paddEmpty&&(function(t){return wb(t,"#text")&&t.firstChild.value===Co}(g)||_b(e,y,k,g))&&Cb(t,u,b,g),g=g.parent}}},e),N=g=new $m(u.context||t.root_name,11);if(L.parse(s,u.format),w&&v.length&&(u.context?u.invalid=!0:function(t){for(var n=xb("tr,td,th,tbody,thead,tfoot,table"),r=e.getNonEmptyElements(),o=e.getWhiteSpaceElements(),i=e.getTextBlockElements(),s=e.getSpecialElements(),u=function(t,n){if(void 0===n&&(n=t.parent),s[t.name])t.empty().remove();else{for(var r=0,o=t.children();r1)if(e.isValidChild(d.name,l.name)){h.reverse();for(var g=f=a(h[0].clone()),v=0;v0})).concat(["noopener"]).sort().join(" ")}(r)))}})),e.allow_html_in_named_anchor||t.addAttributeFilter("id,name",(function(t){for(var e,n,r,o,i=t.length;i--;)if("a"===(o=t[i]).name&&o.firstChild&&!o.attr("href")){r=o.parent,e=o.lastChild;do{n=e.prev,r.insert(e,o),e=n}while(e)}})),e.fix_list_elements&&t.addNodeFilter("ul,ol",(function(t){for(var e,n,r=t.length;r--;)if("ul"===(n=(e=t[r]).parent).name||"ol"===n.name)if(e.prev&&"li"===e.prev.name)e.prev.append(e);else{var o=new $m("li",1);o.attr("style","list-style-type: none"),e.wrap(o)}})),e.validate&&n.getValidClasses()&&t.addAttributeFilter("class",(function(t){for(var e=n.getValidClasses(),r=t.length;r--;){for(var o=t[r],i=o.attr("class").split(" "),a="",s=0;s0?c:null),u.attr(o,null)):(c=u.attr(r),"style"===r?c=n.serializeStyle(n.parseStyle(c),u.name):i&&(c=i.call(a,c,r,u.name)),u.attr(r,c.length>0?c:null))}})),t.addAttributeFilter("class",(function(t){for(var e=t.length;e--;){var n=t[e],r=n.attr("class");r&&(r=n.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),n.attr("class",r.length>0?r:null))}})),t.addAttributeFilter("data-mce-type",(function(t,e,n){for(var r=t.length;r--;){var o=t[r];if("bookmark"===o.attr("data-mce-type")&&!n.cleanup){var i=B.from(o.firstChild).exists((function(t){return!_o(t.value)}));i?o.unwrap():o.remove()}}})),t.addNodeFilter("noscript",(function(t){for(var e=t.length;e--;){var n=t[e].firstChild;n&&(n.value=yi.decode(n.value))}})),t.addNodeFilter("script,style",(function(t,n){for(var r=function(t){return t.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")},o=t.length;o--;){var i=t[o],a=i.firstChild?i.firstChild.value:"";if("script"===n){var s=i.attr("type");s&&i.attr("type","mce-no/type"===s?null:s.replace(/^mce\-/,"")),"xhtml"===e.element_format&&a.length>0&&(i.firstChild.value="// ")}else"xhtml"===e.element_format&&a.length>0&&(i.firstChild.value="\x3c!--\n"+r(a)+"\n--\x3e")}})),t.addNodeFilter("#comment",(function(t){for(var r=t.length;r--;){var o=t[r];e.preserve_cdata&&0===o.value.indexOf("[CDATA[")?(o.name="#cdata",o.type=4,o.value=n.decode(o.value.replace(/^\[CDATA\[|\]\]$/g,""))):0===o.value.indexOf("mce:protected ")&&(o.name="#text",o.type=3,o.raw=!0,o.value=unescape(o.value).substr(14))}})),t.addNodeFilter("xml:namespace,input",(function(t,e){for(var n=t.length;n--;){var r=t[n];7===r.type?r.remove():1===r.type&&("input"!==e||r.attr("type")||r.attr("type","text"))}})),t.addAttributeFilter("data-mce-type",(function(e){W(e,(function(e){"format-caret"===e.attr("data-mce-type")&&(e.isEmpty(t.schema.getNonEmptyElements())?e.remove():e.unwrap())}))})),t.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize,data-mce-placeholder",(function(t,e){for(var n=t.length;n--;)t[n].attr(e,null)}))}(i,t,r);return{schema:o,addNodeFilter:i.addNodeFilter,addAttributeFilter:i.addAttributeFilter,serialize:function(n,a){void 0===a&&(a={});var s=At({format:"html"},a),u=Ob(e,n,s),c=function(t,e,n){var r=ko(n.getInner?e.innerHTML:t.getOuterHTML(e));return n.selection||yo(Ae.fromDom(e))?r:Ee.trim(r)}(r,u,s),l=function(t,e,n){var r=n.selection?At({forced_root_block:!1},n):n,o=t.parse(e,r);return function(t){var e=function(t){return t&&"br"===t.name},n=t.lastChild;if(e(n)){var r=n.prev;e(r)&&(n.remove(),r.remove())}}(o),o}(i,c,s);return"tree"===s.format?l:Lb(e,t,o,l,s)},addRules:o.addValidElements,setRules:o.setValidElements,addTempAttr:E(Ab,i,n),getTempAttrs:D(n),getNodeFilters:i.getNodeFilters,getAttributeFilters:i.getAttributeFilters}},$b=function(t,e){var n=Nb(t,e);return{schema:n.schema,addNodeFilter:n.addNodeFilter,addAttributeFilter:n.addAttributeFilter,serialize:n.serialize,addRules:n.addRules,setRules:n.setRules,addTempAttr:n.addTempAttr,getTempAttrs:n.getTempAttrs,getNodeFilters:n.getNodeFilters,getAttributeFilters:n.getAttributeFilters}},Pb=function(t,e){return void 0===e&&(e={}),function(t,e,n){return Qv(t).editor.getContent(e,n)}(t,e,e.format?e.format:"html")},Ib=function(t,e,n){return void 0===n&&(n={}),function(t,e,n){return Qv(t).editor.setContent(e,n)}(t,e,n)},Rb=gs.DOM,Bb=function(t){return B.from(t).each((function(t){return t.destroy()}))},Mb=function(t){if(!t.removed){var e=t._selectionOverrides,n=t.editorUpload,r=t.getBody(),o=t.getElement();r&&t.save({is_removing:!0}),t.removed=!0,t.unbindAllNativeEvents(),t.hasHiddenInput&&o&&Rb.remove(o.nextSibling),function(t){t.fire("remove")}(t),t.editorManager.remove(t),!t.inline&&r&&function(t){Rb.setStyle(t.id,"display",t.orgDisplay)}(t),function(t){t.fire("detach")}(t),Rb.remove(t.getContainer()),Bb(e),Bb(n),t.destroy()}},jb=function(t,e){var n=t.selection,r=t.dom;t.destroyed||(e||t.removed?(e||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),Bb(n),Bb(r)),function(t){var e=t.formElement;e&&(e._mceOldSubmit&&(e.submit=e._mceOldSubmit,e._mceOldSubmit=null),Rb.unbind(e,"submit reset",t.formEventDelegate))}(t),function(t){t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null)}(t),t.destroyed=!0):t.remove())},zb=(ab=function(t,e){return m(t)&&m(e)?zb(t,e):e},function(){for(var t=[],e=0;e0}))},Qb=function(t,e){var n,r,o=(r={},gt(e,(function(e,n){return U(t,n)}),ht(n={}),ht(r)),{t:n,f:r});return function(t,e){return{sections:D(t),settings:D(e)}}(o.t,o.f)},ty=function(t,e){return Ct(t.sections(),e)},ey=function(t,e){return yt(t,"toolbar_mode").orThunk((function(){return yt(t,"toolbar_drawer").map((function(t){return!1===t?"wrap":t}))})).getOr(e)},ny=function(t,e){var n={resize:!1,toolbar_mode:ey(t,"scrolling"),toolbar_sticky:!1};return At(At(At({},Gb),n),e?{menubar:!1}:{})},ry=function(t,e){var n=e.external_plugins?e.external_plugins:{};return t&&t.external_plugins?Ee.extend({},t.external_plugins,n):n},oy=function(t,e,n,r){return t&&function(t,e,n){var r=t.sections();return ty(t,e)&&r[e].theme===n}(e,"mobile","mobile")?Y(r,E(U,Zb)):t&&ty(e,"mobile")?r:n},iy=function(t,e,n,r){var o=Jb(n.forced_plugins),i=Jb(r.plugins),a=function(t,e){return ty(t,e)?t.sections()[e]:{}}(e,"mobile"),s=a.plugins?Jb(a.plugins):i,u=function(t,e){return[].concat(Jb(t)).concat(Jb(e))}(o,oy(t,e,i,s));if(ke.browser.isIE()&&U(u,"rtc"))throw new Error("RTC plugin is not supported on IE 11.");return Ee.extend(r,{plugins:u.join(" ")})},ay=function(t,e,n,r,o){var i=t?{mobile:ny(o.mobile||{},e)}:{},a=Qb(["mobile"],zb(i,o)),s=Ee.extend(n,r,a.settings(),function(t,e){return t&&ty(e,"mobile")}(t,a)?function(t,e,n){void 0===n&&(n={});var r=t.sections(),o=yt(r,e).getOr({});return Ee.extend({},n,o)}(a,"mobile"):{},{validate:!0,external_plugins:ry(r,a.settings())});return iy(t,a,r,s)},sy=function(t,e,n,r,o){var i=function(t,e,n,r,o){var i={id:e,theme:"silver",toolbar_mode:ey(t,"floating"),plugins:"",document_base_url:n,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"",visual:!0,font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,inline_styles:!0,convert_fonts_to_spans:!0,indent:!0,indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",entity_encoding:"named",url_converter:o.convertURL,url_converter_scope:o};return At(At({},i),r?Gb:{})}(o,e,n,Kb,t),a=ay(Yb||Xb,Yb,i,r,o);return!1!==a.deprecation_warnings&&function(t,e){var n=Vb(t),r=Wb(e),o=r.length>0,i=n.length>0,a="mobile"===e.theme;if(o||i||a){var s="\n- ",u=a?"\n\nThemes:\n- mobile":"",c=o?"\n\nPlugins:\n- "+r.join(s):"",l=i?"\n\nSettings:\n- "+n.join(s):"";console.warn("The following deprecated features are currently enabled, these will be removed in TinyMCE 6.0. See https://www.tiny.cloud/docs/release-notes/6.0-upcoming-changes/ for more information."+u+c+l)}}(o,a),a},uy=function(t,e,n){return B.from(e.settings[n]).filter(t)},cy=function(t,e,n,r){var o,i=e in t.settings?t.settings[e]:n;return"hash"===r?function(t){var e={};return"string"==typeof t?W(t.indexOf("=")>0?t.split(/[;,](?![^=;,]*(?:[;,]|$))/):t.split(","),(function(t){var n=t.split("=");n.length>1?e[Ee.trim(n[0])]=Ee.trim(n[1]):e[Ee.trim(n[0])]=Ee.trim(n[0])})):e=t,e}(i):"string"===r?uy(f,t,e).getOr(n):"number"===r?uy(w,t,e).getOr(n):"boolean"===r?uy(g,t,e).getOr(n):"object"===r?uy(m,t,e).getOr(n):"array"===r?uy(p,t,e).getOr(n):"string[]"===r?uy((o=f,function(t){return p(t)&&et(t,o)}),t,e).getOr(n):"function"===r?uy(C,t,e).getOr(n):i},ly=(sb={},{add:function(t,e){sb[t]=e},get:function(t){return sb[t]?sb[t]:{icons:{}}},has:function(t){return Ct(sb,t)}}),dy=function(t,e){return e.dom[t]},fy=function(t,e){return parseInt(ir(e,t),10)},my=E(dy,"clientWidth"),py=E(dy,"clientHeight"),hy=E(fy,"margin-top"),gy=E(fy,"margin-left"),vy=function(t,e,n){var r,o=Ae.fromDom(t.getBody()),i=t.inline?o:(r=o,Ae.fromDom(We(r).dom.documentElement)),a=function(t,e,n,r){var o=function(t){return t.dom.getBoundingClientRect()}(e);return{x:n-(t?o.left+e.dom.clientLeft+gy(e):0),y:r-(t?o.top+e.dom.clientTop+hy(e):0)}}(t.inline,i,e,n);return function(t,e,n){var r=my(t),o=py(t);return e>=0&&n>=0&&e<=r&&n<=o}(i,a.x,a.y)},by=function(t){var e,n=t.inline?t.getBody():t.getContentAreaContainer();return(e=n,B.from(e).map(Ae.fromDom)).map(yn).getOr(!1)},yy=function(t){var e=[],n=function(){var e,n=t.theme;return n&&n.getNotificationManagerImpl?n.getNotificationManagerImpl():{open:e=function(){throw new Error("Theme did not provide a NotificationManager implementation.")},close:e,reposition:e,getArgs:e}},r=function(){return B.from(e[0])},o=function(){e.length>0&&n().reposition(e)},i=function(t){Q(e,(function(e){return e===t})).each((function(t){e.splice(t,1)}))},a=function(a,s){if(void 0===s&&(s=!0),!t.removed&&by(t))return s&&t.fire("BeforeOpenNotification",{notification:a}),J(e,(function(t){return e=n().getArgs(t),r=a,!(e.type!==r.type||e.text!==r.text||e.progressBar||e.timeout||r.progressBar||r.timeout);var e,r})).getOrThunk((function(){t.editorManager.setActive(t);var s=n().open(a,(function(){i(s),o(),r().fold((function(){return t.focus()}),(function(t){return Ae.fromDom(t.getEl()).dom.focus()}))}));return function(t){e.push(t)}(s),o(),t.fire("OpenNotification",{notification:At({},s)}),s}))},s=D(e);return function(t){t.on("SkinLoaded",(function(){var e=function(t){return t.getParam("service_message")}(t);e&&a({text:e,type:"warning",timeout:0},!1),o()})),t.on("show ResizeEditor ResizeWindow NodeChange",(function(){oo.requestAnimationFrame(o)})),t.on("remove",(function(){W(e.slice(),(function(t){n().close(t)}))}))}(t),{open:a,close:function(){r().each((function(t){n().close(t),i(t),o()}))},getNotifications:s}},Cy=Ss.PluginManager,wy=Ss.ThemeManager;var _y=function(t){var e=[],n=function(){var e,n=t.theme;return n&&n.getWindowManagerImpl?n.getWindowManagerImpl():{open:e=function(){throw new Error("Theme did not provide a WindowManager implementation.")},openUrl:e,alert:e,confirm:e,close:e,getParams:e,setParams:e}},r=function(t,e){return function(){for(var n=[],r=0;r=300)r("HTTP Error: "+i.status);else{var t,o,a=JSON.parse(i.responseText);if(a&&"string"==typeof a.location)n((t=e.basePath,o=a.location,t?t.replace(/\/$/,"")+"/"+o.replace(/^\//,""):o));else r("Invalid JSON: "+i.responseText)}};var a=new FormData;a.append("file",t.blob(),t.filename()),i.send(a)},o=function(t,e){return{url:e,blobInfo:t,status:!0}},i=function(t,e,n){return{url:"",blobInfo:t,status:!1,error:{message:e,options:n}}},a=function(t,e){Ee.each(n[t],(function(t){t(e)})),delete n[t]},s=function(r,s){return r=Ee.grep(r,(function(e){return!t.isUploaded(e.blobUri())})),to.all(Ee.map(r,(function(r){return t.isPending(r.blobUri())?function(t){var e=t.blobUri();return new to((function(t){n[e]=n[e]||[],n[e].push(t)}))}(r):function(e,n,r){return t.markPending(e.blobUri()),new to((function(s){var u;try{var c=function(){u&&u.close()};n(e,(function(n){c(),t.markUploaded(e.blobUri(),n),a(e.blobUri(),o(e,n)),s(o(e,n))}),(function(n,r){var o=r||{};c(),t.removeFailed(e.blobUri()),a(e.blobUri(),i(e,n,o)),s(i(e,n,o))}),(function(t){t<0||t>100||B.from(u).orThunk((function(){return B.from(r).map(A)})).each((function(e){u=e,e.progressBar.value(t)}))}))}catch(t){s(i(e,t.message,{}))}}))}(r,e.handler,s)})))};return!1===C(e.handler)&&(e.handler=r),{upload:function(t,n){return e.url||e.handler!==r?s(t,n):new to((function(t){t([])}))}}},Ry=function(t){return function(){return t.notificationManager.open({text:t.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}},By=function(t,e){return Iy(e,{url:sc(t),basePath:uc(t),credentials:cc(t),handler:lc(t)})},My=function(t){var e,n,r=function(){var t=[],e=function(t){if(!t.blob||!t.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");var e,n=t.id||Py("blobid"),r=t.name||n,o=t.blob;return{id:D(n),name:D(r),filename:D(t.filename||r+"."+(e=o.type,{"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png","image/apng":"apng","image/avif":"avif","image/svg+xml":"svg","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"}[e.toLowerCase()]||"dat")),blob:D(o),base64:D(t.base64),blobUri:D(t.blobUri||URL.createObjectURL(o)),uri:D(t.uri)}},n=function(e){return J(t,e).getOrUndefined()},r=function(t){return n((function(e){return e.id()===t}))};return{create:function(t,n,r,o,i){if(f(t))return e({id:t,name:o,filename:i,blob:n,base64:r});if(m(t))return e(t);throw new Error("Unknown input type")},add:function(e){r(e.id())||t.push(e)},get:r,getByUri:function(t){return n((function(e){return e.blobUri()===t}))},getByData:function(t,e){return n((function(n){return n.base64()===t&&n.blob().type===e}))},findFirst:n,removeByUri:function(e){t=Y(t,(function(t){return t.blobUri()!==e||(URL.revokeObjectURL(t.blobUri()),!1)}))},destroy:function(){W(t,(function(t){URL.revokeObjectURL(t.blobUri())})),t=[]}}}(),o=Ny(),i=[],a=function(t){var e=ws(null);return t.on("change AddUndo",(function(t){e.set(At({},t.level))})),{fireIfChanged:function(){var n=t.undoManager.data;st(n).filter((function(t){return!qv(e.get(),t)})).each((function(e){t.setDirty(!0),t.fire("change",{level:e,lastLevel:it(n,n.length-2).getOrNull()})}))}}}(t),s=function(e){return function(n){return t.selection?e(n):[]}},u=function(t,e,n){var r=0;do{-1!==(r=t.indexOf(e,r))&&(t=t.substring(0,r)+n+t.substr(r+e.length),r+=n.length-e.length+1)}while(-1!==r);return t},c=function(t,e,n){var r='src="'+n+'"'+(n===ke.transparentSrc?' data-mce-placeholder="1"':"");return t=u(t,'src="'+e+'"',r),t=u(t,'data-mce-src="'+e+'"','data-mce-src="'+n+'"')},l=function(e,n){W(t.undoManager.data,(function(t){"fragmented"===t.type?t.fragments=V(t.fragments,(function(t){return c(t,e,n)})):t.content=c(t.content,e,n)}))},d=function(n){return e||(e=By(t,o)),g().then(s((function(o){var i=V(o,(function(t){return t.blobInfo}));return e.upload(i,Ry(t)).then(s((function(e){var i=[],s=V(e,(function(e,n){var a=o[n].blobInfo,s=o[n].image;return e.status&&function(t){return t.getParam("images_replace_blob_uris",!0,"boolean")}(t)?(r.removeByUri(s.src),Gv(t)||function(e,n){var r,o=t.convertURL(n,"src");l(e.src,n),t.$(e).attr({src:ic(t)?(r=n,r+(-1===r.indexOf("?")?"?":"&")+(new Date).getTime()):n,"data-mce-src":o})}(s,e.url)):e.error&&(e.error.options.remove&&(l(s.getAttribute("src"),ke.transparentSrc),i.push(s)),function(t,e){xy(t,Ds.translate(["Failed to upload image: {0}",e]))}(t,e.error.message)),{element:s,status:e.status,uploadUri:e.url,blobInfo:a}}));return s.length>0&&a.fireIfChanged(),i.length>0&&(Gv(t)?console.error("Removing images on failed uploads is currently unsupported for RTC"):t.undoManager.transact((function(){W(i,(function(e){t.dom.remove(e),r.removeByUri(e.src)}))}))),n&&n(s),s})))})))},p=function(e){if(oc(t))return d(e)},h=function(e){if(!1===et(i,(function(t){return t(e)})))return!1;if(0===e.getAttribute("src").indexOf("data:")){var n=function(t){return t.getParam("images_dataimg_filter",$,"function")}(t);return n(e)}return!0},g=function(){return n||(n=yb(o,r)),n.findAll(t.getBody(),h).then(s((function(e){return e=Y(e,(function(e){return"string"!=typeof e||(xy(t,e),!1)})),Gv(t)||W(e,(function(t){l(t.image.src,t.blobInfo.blobUri()),t.image.src=t.blobInfo.blobUri(),t.image.removeAttribute("data-mce-src")})),e})))},v=function(e){return e.replace(/src="(blob:[^"]+)"/g,(function(e,n){var i=o.getResultUri(n);if(i)return'src="'+i+'"';var a=r.getByUri(n);return a||(a=Z(t.editorManager.get(),(function(t,e){return t||e.editorUpload&&e.editorUpload.blobCache.getByUri(n)}),null)),a?'src="data:'+a.blob().type+";base64,"+a.base64()+'"':e}))};return t.on("SetContent",(function(){oc(t)?p():g()})),t.on("RawSaveContent",(function(t){t.content=v(t.content)})),t.on("GetContent",(function(t){t.source_view||"raw"===t.format||"tree"===t.format||(t.content=v(t.content))})),t.on("PostRender",(function(){t.parser.addNodeFilter("img",(function(t){W(t,(function(t){var e=t.attr("src");if(!r.getByUri(e)){var n=o.getResultUri(e);n&&t.attr("src",n)}}))}))})),{blobCache:r,addFilter:function(t){i.push(t)},uploadImages:d,uploadImagesAuto:p,scanForImages:g,destroy:function(){r.destroy(),o.destroy(),n=e=null}}},jy=function(t){var e={},n=function(t,r){t&&(f(t)?(p(r)||(r=[r]),W(r,(function(t){v(t.deep)&&(t.deep=!pd(t)),v(t.split)&&(t.split=!pd(t)||hd(t)),v(t.remove)&&pd(t)&&!hd(t)&&(t.remove="none"),pd(t)&&hd(t)&&(t.mixed=!0,t.block_expand=!0),f(t.classes)&&(t.classes=t.classes.split(/\s+/))})),e[t]=r):ft(t,(function(t,e){n(e,t)})))};return n(function(t){var e={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,preview:!1,defaultBlock:"div"},{selector:"img,table,audio,video",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size",defaultBlock:"div"},{selector:"img,table,audio,video",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div",preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all",preserve_attributes:["class","style"]}],italic:[{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all",preserve_attributes:["class","style"]}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all",preserve_attributes:["class","style"]}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all",preserve_attributes:["class","style"]},{inline:"s",remove:"all",preserve_attributes:["class","style"]}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},lineheight:{selector:"h1,h2,h3,h4,h5,h6,p,li,td,th,div",defaultBlock:"p",styles:{lineHeight:"%value"}},fontsize_class:{inline:"span",attributes:{class:"%value"}},blockquote:{block:"blockquote",wrapper:!0,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(t,e,n){return Ln(t)&&t.hasAttribute("href")},onformat:function(e,n,r){Ee.each(r,(function(n,r){t.setAttrib(e,r,n)}))}},lang:{inline:"span",clear_child_styles:!0,remove_similar:!0,attributes:{lang:"%value","data-mce-lang":function(t){var e;return null!==(e=null==t?void 0:t.customValue)&&void 0!==e?e:null}}},removeformat:[{selector:"b,strong,em,i,font,u,strike,s,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins,small",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]};return Ee.each("p h1 h2 h3 h4 h5 h6 div address pre dt dd samp".split(/\s/),(function(t){e[t]={block:t,remove:"all"}})),e}(t.dom)),n(function(t){return t.getParam("formats")}(t)),{get:function(t){return y(t)?e[t]:e},has:function(t){return Ct(e,t)},register:n,unregister:function(t){return t&&e[t]&&delete e[t],e}}},zy=Ee.each,Fy=gs.DOM,Uy=function(t,e){var n,r,o,i=e&&e.schema||Oi({}),a=function(t){r="string"==typeof t?{name:t,classes:[],attrs:{}}:t;var e=Fy.create(r.name);return function(t,e){e.classes.length&&Fy.addClass(t,e.classes.join(" ")),Fy.setAttribs(t,e.attrs)}(e,r),e},s=function(t,e,n){var r,o,u=e.length>0&&e[0],c=u&&u.name,l=function(t,e){var n="string"!=typeof t?t.nodeName.toLowerCase():t,r=i.getElementRule(n),o=r&&r.parentsRequired;return!(!o||!o.length)&&(e&&-1!==Ee.inArray(o,e)?e:o[0])}(t,c);if(l)c===l?(o=e[0],e=e.slice(1)):o=l;else if(u)o=e[0],e=e.slice(1);else if(!n)return t;return o&&(r=a(o)).appendChild(t),n&&(r||(r=Fy.create("div")).appendChild(t),Ee.each(n,(function(e){var n=a(e);r.insertBefore(n,t)}))),s(r,e,o&&o.siblings)};return t&&t.length?(r=t[0],n=a(r),(o=Fy.create("div")).appendChild(s(n,t.slice(1),r.siblings)),o):""},Hy=function(t){var e,n={classes:[],attrs:{}};return"*"!==(t=n.selector=Ee.trim(t))&&(e=t.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,(function(t,e,r,o,i){switch(e){case"#":n.attrs.id=r;break;case".":n.classes.push(r);break;case":":-1!==Ee.inArray("checked disabled enabled read-only required".split(" "),r)&&(n.attrs[r]=r)}if("["===o){var a=i.match(/([\w\-]+)(?:\=\"([^\"]+))?/);a&&(n.attrs[a[1]]=a[2])}return""}))),n.name=e||"div",n},Vy=function(t,e){var n,r,o,i="",a=function(t){var e=t.getParam("preview_styles","font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow");return f(e)?e:""}(t);if(""===a)return"";var s=function(t){return t.replace(/%(\w+)/g,"")};if("string"==typeof e){if(!(e=t.formatter.get(e)))return;e=e[0]}if("preview"in e){var u=yt(e,"preview");if(Xn(u,!1))return"";a=u.getOr(a)}n=e.block||e.inline||"span";var c,l=(c=e.selector)&&"string"==typeof c?(c=(c=c.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),Ee.map(c.split(/(?:>|\s+(?![^\[\]]+\]))/),(function(t){var e=Ee.map(t.split(/(?:~\+|~|\+)/),Hy),n=e.pop();return e.length&&(n.siblings=e),n})).reverse()):[];l.length?(l[0].name||(l[0].name=n),n=e.selector,r=Uy(l,t)):r=Uy([n],t);var d=Fy.select(n,r)[0]||r.firstChild;return zy(e.styles,(function(t,e){var n=s(t);n&&Fy.setStyle(d,e,n)})),zy(e.attributes,(function(t,e){var n=s(t);n&&Fy.setAttrib(d,e,n)})),zy(e.classes,(function(t){var e=s(t);Fy.hasClass(d,e)||Fy.addClass(d,e)})),t.fire("PreviewFormats"),Fy.setStyles(r,{position:"absolute",left:-65535}),t.getBody().appendChild(r),o=Fy.getStyle(t.getBody(),"fontSize",!0),o=/px$/.test(o)?parseInt(o,10):0,zy(a.split(" "),(function(e){var n=Fy.getStyle(d,e,!0);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=Fy.getStyle(t.getBody(),e,!0),"#ffffff"===Fy.toHex(n).toLowerCase())||"color"===e&&"#000000"===Fy.toHex(n).toLowerCase())){if("font-size"===e&&/em|%$/.test(n)){if(0===o)return;n=parseFloat(n)/(/%$/.test(n)?100:1)*o+"px"}"border"===e&&n&&(i+="padding:0 2px;"),i+=e+":"+n+";"}})),t.fire("AfterPreviewFormats"),Fy.remove(r),i},Wy=function(t){var e=jy(t),n=ws(null);return function(t){t.addShortcut("meta+b","","Bold"),t.addShortcut("meta+i","","Italic"),t.addShortcut("meta+u","","Underline");for(var e=1;e<=6;e++)t.addShortcut("access+"+e,"",["FormatBlock",!1,"h"+e]);t.addShortcut("access+7","",["FormatBlock",!1,"p"]),t.addShortcut("access+8","",["FormatBlock",!1,"div"]),t.addShortcut("access+9","",["FormatBlock",!1,"address"])}(t),Ng(t),{get:e.get,has:e.has,register:e.register,unregister:e.unregister,apply:function(e,n,r){!function(t,e,n,r){tb(t).formatter.apply(e,n,r)}(t,e,n,r)},remove:function(e,n,r,o){!function(t,e,n,r,o){tb(t).formatter.remove(e,n,r,o)}(t,e,n,r,o)},toggle:function(e,n,r){!function(t,e,n,r){tb(t).formatter.toggle(e,n,r)}(t,e,n,r)},match:function(e,n,r,o){return function(t,e,n,r,o){return tb(t).formatter.match(e,n,r,o)}(t,e,n,r,o)},closest:function(e){return function(t,e){return tb(t).formatter.closest(e)}(t,e)},matchAll:function(e,n){return function(t,e,n){return tb(t).formatter.matchAll(e,n)}(t,e,n)},matchNode:function(e,n,r,o){return function(t,e,n,r,o){return tb(t).formatter.matchNode(e,n,r,o)}(t,e,n,r,o)},canApply:function(e){return function(t,e){return tb(t).formatter.canApply(e)}(t,e)},formatChanged:function(e,r,o,i){return function(t,e,n,r,o,i){return tb(t).formatter.formatChanged(e,n,r,o,i)}(t,n,e,r,o,i)},getCssText:E(Vy,t)}},qy=function(t){switch(t.toLowerCase()){case"undo":case"redo":case"mcerepaint":case"mcefocus":return!0;default:return!1}},Ky=function(t){var e=Ts(),n=ws(0),r=ws(0),o={data:[],typing:!1,beforeChange:function(){!function(t,e,n){tb(t).undoManager.beforeChange(e,n)}(t,n,e)},add:function(i,a){return function(t,e,n,r,o,i,a){return tb(t).undoManager.add(e,n,r,o,i,a)}(t,o,r,n,e,i,a)},undo:function(){return function(t,e,n,r){return tb(t).undoManager.undo(e,n,r)}(t,o,n,r)},redo:function(){return function(t,e,n){return tb(t).undoManager.redo(e,n)}(t,r,o.data)},clear:function(){!function(t,e,n){tb(t).undoManager.clear(e,n)}(t,o,r)},reset:function(){!function(t,e){tb(t).undoManager.reset(e)}(t,o)},hasUndo:function(){return function(t,e,n){return tb(t).undoManager.hasUndo(e,n)}(t,o,r)},hasRedo:function(){return function(t,e,n){return tb(t).undoManager.hasRedo(e,n)}(t,o,r)},transact:function(e){return function(t,e,n,r){return tb(t).undoManager.transact(e,n,r)}(t,o,n,e)},ignore:function(e){!function(t,e,n){tb(t).undoManager.ignore(e,n)}(t,n,e)},extra:function(e,n){!function(t,e,n,r,o){tb(t).undoManager.extra(e,n,r,o)}(t,o,r,e,n)}};return Gv(t)||function(t,e,n){var r=ws(!1),o=function(t){Yv(e,!1,n),e.add({},t)};t.on("init",(function(){e.add()})),t.on("BeforeExecCommand",(function(t){var r=t.command;qy(r)||(Xv(e,n),e.beforeChange())})),t.on("ExecCommand",(function(t){var e=t.command;qy(e)||o(t)})),t.on("ObjectResizeStart cut",(function(){e.beforeChange()})),t.on("SaveContent ObjectResized blur",o),t.on("dragend",o),t.on("keyup",(function(n){var i=n.keyCode;n.isDefaultPrevented()||((i>=33&&i<=36||i>=37&&i<=40||45===i||n.ctrlKey)&&(o(),t.nodeChanged()),46!==i&&8!==i||t.nodeChanged(),r.get()&&e.typing&&!1===qv(Uv(t),e.data[0])&&(!1===t.isDirty()&&(t.setDirty(!0),t.fire("change",{level:e.data[0],lastLevel:null})),t.fire("TypingUndo"),r.set(!1),t.nodeChanged()))})),t.on("keydown",(function(t){var i=t.keyCode;if(!t.isDefaultPrevented())if(i>=33&&i<=36||i>=37&&i<=40||45===i)e.typing&&o(t);else{var a=t.ctrlKey&&!t.altKey||t.metaKey;!(i<16||i>20)||224===i||91===i||e.typing||a||(e.beforeChange(),Yv(e,!0,n),e.add({},t),r.set(!0))}})),t.on("mousedown",(function(t){e.typing&&o(t)})),t.on("input",(function(t){t.inputType&&(function(t){return"insertReplacementText"===t.inputType}(t)||function(t){return"insertText"===t.inputType&&null===t.data}(t)||function(t){return"insertFromPaste"===t.inputType||"insertFromDrop"===t.inputType}(t))&&o(t)})),t.on("AddUndo Undo Redo ClearUndos",(function(e){e.isDefaultPrevented()||t.nodeChanged()}))}(t,o,n),function(t){t.addShortcut("meta+z","","Undo"),t.addShortcut("meta+y,meta+shift+z","","Redo")}(t),o},Yy=[9,27,of.HOME,of.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,of.DOWN,of.UP,of.LEFT,of.RIGHT].concat(ke.browser.isFirefox()?[224]:[]),Xy="data-mce-placeholder",Zy=function(t){return"keydown"===t.type||"keyup"===t.type},Gy=function(t){var e=t.keyCode;return e===of.BACKSPACE||e===of.DELETE},Jy=function(t){var e=t.dom,n=nc(t),r=function(t){return t.getParam("placeholder",Qu.getAttrib(t.getElement(),"placeholder"),"string")}(t),o=function(i,a){if(!function(t){if(Zy(t)){var e=t.keyCode;return!Gy(t)&&(of.metaKeyPressed(t)||t.altKey||e>=112&&e<=123||U(Yy,e))}return!1}(i)){var s=t.getBody(),u=!function(t){return Zy(t)&&!(Gy(t)||"keyup"===t.type&&229===t.keyCode)}(i)&&function(t,e,n){if(ei(Ae.fromDom(e),!1)){var r=""===n,o=e.firstElementChild;return!o||!t.getStyle(e.firstElementChild,"padding-left")&&!t.getStyle(e.firstElementChild,"padding-right")&&(r?!t.isBlock(o):n===o.nodeName.toLowerCase())}return!1}(e,s,n);(""!==e.getAttrib(s,Xy)!==u||a)&&(e.setAttrib(s,Xy,u?r:null),e.setAttrib(s,"aria-placeholder",u?r:null),function(t,e){t.fire("PlaceholderToggle",{state:e})}(t,u),t.on(u?"keydown":"keyup",o),t.off(u?"keyup":"keydown",o))}};r&&t.on("init",(function(e){o(e,!0),t.on("change SetContent ExecCommand",o),t.on("paste",(function(e){return oo.setEditorTimeout(t,(function(){return o(e)}))}))}))},Qy=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,tC=function(t,e){return Ne(Ae.fromDom(e),function(t){return t.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")}(t))},eC=function(t){return"rtl"===gs.DOM.getStyle(t,"direction",!0)||(e=t.textContent,Qy.test(e));var e},nC=function(t,e,n){var r=function(t,e,n){return Y(gs.DOM.getParents(n.container(),"*",e),t)}(t,e,n);return B.from(r[r.length-1])},rC=function(t,e){if(!e)return e;var n=e.container(),r=e.offset();return t?To(n)?jn(n.nextSibling)?Ou(n.nextSibling,0):Ou.after(n):Ao(e)?Ou(n,r+1):e:To(n)?jn(n.previousSibling)?Ou(n.previousSibling,n.previousSibling.data.length):Ou.before(n):Lo(e)?Ou(n,r-1):e},oC=E(rC,!0),iC=E(rC,!1),aC=function(t){return po(t)||go(t)},sC=function(t,e){return Re(t,e)?Xr(e,aC,function(t){return function(e){return Pe(t,Ae.fromDom(e.dom.parentNode))}}(t)):B.none()},uC=function(t){t.dom.isEmpty(t.getBody())&&(t.setContent(""),function(t){var e=t.getBody(),n=e.firstChild&&t.dom.isBlock(e.firstChild)?e.firstChild:e;t.selection.setCursorLocation(n,0)}(t))},cC=function(t,e){return{from:t,to:e}},lC=function(t,e){var n=Ae.fromDom(t),r=Ae.fromDom(e.container());return sC(n,r).map((function(t){return function(t,e){return{block:t,position:e}}(t,e)}))},dC=function(t,e,n){var r=lC(t,Ou.fromRangeStart(n)),o=r.bind((function(n){return Ol(e,t,n.position).bind((function(n){return lC(t,n).map((function(n){return function(t,e,n){return Hn(n.position.getNode())&&!1===ei(n.block)?Nl(!1,n.block.dom).bind((function(r){return r.isEqual(n.position)?Ol(e,t,r).bind((function(e){return lC(t,e)})):B.some(n)})).getOr(n):n}(t,e,n)}))}))}));return Zn(r,o,cC).filter((function(t){return function(t){return!1===Pe(t.from.block,t.to.block)}(t)&&function(t){return Ke(t.from.block).bind((function(e){return Ke(t.to.block).filter((function(t){return Pe(e,t)}))})).isSome()}(t)&&function(t){return!1===qn(t.from.block.dom)&&!1===qn(t.to.block.dom)}(t)}))},fC=function(t){var e=Je(t);return Q(e,lo).fold(D(e),(function(t){return e.slice(0,t)}))},mC=function(t){var e=fC(t);return W(e,vn),e},pC=function(t,e){var n=Sp(e,t);return J(n.reverse(),(function(t){return ei(t)})).each(vn)},hC=function(t,e,n,r){if(ei(n))return _p(n),Il(n.dom);0===Y(Ze(r),(function(t){return!ei(t)})).length&&ei(e)&&dn(r,Ae.fromTag("br"));var o=Pl(n.dom,Ou.before(r.dom));return W(mC(e),(function(t){dn(r,t)})),pC(t,e),o},gC=function(t,e,n){if(ei(n))return vn(n),ei(e)&&_p(e),Il(e.dom);var r=Rl(n.dom);return W(mC(e),(function(t){pn(n,t)})),pC(t,e),r},vC=function(t,e){return Re(e,t)?function(t,e){var n=Sp(e,t);return B.from(n[n.length-1])}(e,t):B.none()},bC=function(t,e){Nl(t,e.dom).map((function(t){return t.getNode()})).map(Ae.fromDom).filter(mo).each(vn)},yC=function(t,e,n){return bC(!0,e),bC(!1,n),vC(e,n).fold(E(gC,t,e,n),E(hC,t,e,n))},CC=function(t,e,n,r){return e?yC(t,r,n):yC(t,n,r)},wC=function(t,e){var n=Ae.fromDom(t.getBody()),r=function(t,e,n){return n.collapsed?dC(t,e,n):B.none()}(n.dom,e,t.selection.getRng()).bind((function(t){return CC(n,e,t.from.block,t.to.block)}));return r.each((function(e){t.selection.setRng(e.toRange())})),r.isSome()},_C=function(t,e){var n=Ae.fromDom(e),r=E(Pe,t);return Yr(n,bo,r).isSome()},kC=function(t,e){var n=Pl(t.dom,Ou.fromRangeStart(e)).isNone(),r=$l(t.dom,Ou.fromRangeEnd(e)).isNone();return!function(t,e){return _C(t,e.startContainer)||_C(t,e.endContainer)}(t,e)&&n&&r},xC=function(t){var e=Ae.fromDom(t.getBody()),n=t.selection.getRng();return kC(e,n)?function(t){return t.setContent(""),t.selection.setCursorLocation(),!0}(t):function(t,e){var n=e.getRng();return Zn(sC(t,Ae.fromDom(n.startContainer)),sC(t,Ae.fromDom(n.endContainer)),(function(r,o){return!1===Pe(r,o)&&(n.deleteContents(),CC(t,!0,r,o).each((function(t){e.setRng(t.toRange())})),!0)})).getOr(!1)}(e,t.selection)},DC=function(t,e){return!t.selection.isCollapsed()&&xC(t)},SC=Wn,TC=qn,EC=function(t,e,n,r,o){return B.from(e._selectionOverrides.showCaret(t,n,r,o))},OC=function(t,e){return t.fire("BeforeObjectSelected",{target:e}).isDefaultPrevented()?B.none():B.some(function(t){var e=t.ownerDocument.createRange();return e.selectNode(t),e}(e))},AC=function(t,e,n){var r=sl(1,t.getBody(),e),o=Ou.fromRangeStart(r),i=o.getNode();if(zc(i))return EC(1,t,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(zc(a))return EC(1,t,a,!1,!1);var s=t.dom.getParent(o.getNode(),(function(t){return TC(t)||SC(t)}));return zc(s)?EC(1,t,s,!1,n):B.none()},LC=function(t,e,n){return e.collapsed?AC(t,e,n).getOr(e):e},NC=function(t){return yp(t)||hp(t)},$C=function(t){return Cp(t)||gp(t)},PC=function(t,e,n,r,o,i){return EC(r,t,i.getNode(!o),o,!0).each((function(n){if(e.collapsed){var r=e.cloneRange();o?r.setEnd(n.startContainer,n.startOffset):r.setStart(n.endContainer,n.endOffset),r.deleteContents()}else e.deleteContents();t.selection.setRng(n)})),function(t,e){jn(e)&&0===e.data.length&&t.remove(e)}(t.dom,n),!0},IC=function(t,e){return function(t,e){var n=t.selection.getRng();if(!jn(n.commonAncestorContainer))return!1;var r=e?Au.Forwards:Au.Backwards,o=xl(t.getBody()),i=E(dl,e?o.next:o.prev),a=e?NC:$C,s=cl(r,t.getBody(),n),u=rC(e,i(s));if(!u||!fl(s,u))return!1;if(a(u))return PC(t,n,s.getNode(),r,e,u);var c=i(u);return!!(c&&a(c)&&fl(u,c))&&PC(t,n,s.getNode(),r,e,c)}(t,e)},RC=Dr([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),BC=function(t,e,n,r){var o=r.getNode(!1===e);return sC(Ae.fromDom(t),Ae.fromDom(n.getNode())).map((function(t){return ei(t)?RC.remove(t.dom):RC.moveToElement(o)})).orThunk((function(){return B.some(RC.moveToElement(o))}))},MC=function(t,e,n){return Ol(e,t,n).bind((function(r){return o=r.getNode(),bo(Ae.fromDom(o))||go(Ae.fromDom(o))||function(t,e,n,r){var o=function(e){return fo(Ae.fromDom(e))&&!tl(n,r,t)};return ul(!e,n).fold((function(){return ul(e,r).fold(N,o)}),o)}(t,e,n,r)?B.none():e&&qn(r.getNode())||!1===e&&qn(r.getNode(!0))?BC(t,e,n,r):e&&Cp(n)||!1===e&&yp(n)?B.some(RC.moveToPosition(r)):B.none();var o}))},jC=function(t,e,n){return function(t,e){var n=e.getNode(!1===t),r=t?"after":"before";return Ln(n)&&n.getAttribute("data-mce-caret")===r}(e,n)?function(t,e){return t&&qn(e.nextSibling)?B.some(RC.moveToElement(e.nextSibling)):!1===t&&qn(e.previousSibling)?B.some(RC.moveToElement(e.previousSibling)):B.none()}(e,n.getNode(!1===e)).fold((function(){return MC(t,e,n)}),B.some):MC(t,e,n).bind((function(e){return function(t,e,n){return n.fold((function(t){return B.some(RC.remove(t))}),(function(t){return B.some(RC.moveToElement(t))}),(function(n){return tl(e,n,t)?B.none():B.some(RC.moveToPosition(n))}))}(t,n,e)}))},zC=function(t,e){return B.from(Qd(t.getBody(),e))},FC=function(t,e){var n=t.selection.getNode();return zC(t,n).filter(qn).fold((function(){return function(t,e,n){var r=sl(e?1:-1,t,n),o=Ou.fromRangeStart(r),i=Ae.fromDom(t);return!1===e&&Cp(o)?B.some(RC.remove(o.getNode(!0))):e&&yp(o)?B.some(RC.remove(o.getNode())):!1===e&&yp(o)&&Mp(i,o)?jp(i,o).map((function(t){return RC.remove(t.getNode())})):e&&Cp(o)&&Bp(i,o)?zp(i,o).map((function(t){return RC.remove(t.getNode())})):jC(t,e,o)}(t.getBody(),e,t.selection.getRng()).exists((function(n){return n.fold(function(t,e){return function(n){return t._selectionOverrides.hideFakeCaret(),hh(t,e,Ae.fromDom(n)),!0}}(t,e),function(t,e){return function(n){var r=e?Ou.before(n):Ou.after(n);return t.selection.setRng(r.toRange()),!0}}(t,e),function(t){return function(e){return t.selection.setRng(e.toRange()),!0}}(t))}))}),$)},UC=function(t,e){var n=t.selection.getNode();return!(!qn(n)||Kn(n))&&zC(t,n.parentNode).filter(qn).fold((function(){var n;return n=Ae.fromDom(t.getBody()),W(Ms(n,".mce-offscreen-selection"),vn),hh(t,e,Ae.fromDom(t.selection.getNode())),uC(t),!0}),$)},HC=function(t){var e=t.dom,n=t.selection,r=Qd(t.getBody(),n.getNode());if(Wn(r)&&e.isBlock(r)&&e.isEmpty(r)){var o=e.create("br",{"data-mce-bogus":"1"});e.setHTML(r,""),r.appendChild(o),n.setRng(Ou.before(o).toRange())}return!0},VC=function(t,e){return t.selection.isCollapsed()?FC(t,e):UC(t,e)},WC=function(t,e){return!!t.selection.isCollapsed()&&function(t,e){var n=Ou.fromRangeStart(t.selection.getRng());return Ol(e,t.getBody(),n).filter((function(t){return e?mp(t):pp(t)})).bind((function(t){return B.from(el(e?0:-1,t))})).exists((function(e){return t.selection.select(e),!0}))}(t,e)},qC=jn,KC=function(t){return qC(t)&&t.data[0]===wo},YC=function(t){return qC(t)&&t.data[t.data.length-1]===wo},XC=function(t){return t.ownerDocument.createTextNode(wo)},ZC=function(t,e){return t?function(t){if(qC(t.previousSibling))return YC(t.previousSibling)||t.previousSibling.appendData(wo),t.previousSibling;if(qC(t))return KC(t)||t.insertData(0,wo),t;var e=XC(t);return t.parentNode.insertBefore(e,t),e}(e):function(t){if(qC(t.nextSibling))return KC(t.nextSibling)||t.nextSibling.insertData(0,wo),t.nextSibling;if(qC(t))return YC(t)||t.appendData(wo),t;var e=XC(t);return t.nextSibling?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.appendChild(e),e}(e)},GC=E(ZC,!0),JC=E(ZC,!1),QC=function(t,e){return jn(t.container())?ZC(e,t.container()):ZC(e,t.getNode())},tw=function(t,e){var n=e.get();return n&&t.container()===n&&To(n)},ew=function(t,e){return e.fold((function(e){Nc(t.get());var n=GC(e);return t.set(n),B.some(Ou(n,n.length-1))}),(function(e){return Il(e).map((function(e){if(tw(e,t))return Ou(t.get(),1);Nc(t.get());var n=QC(e,!0);return t.set(n),Ou(n,1)}))}),(function(e){return Rl(e).map((function(e){if(tw(e,t))return Ou(t.get(),t.get().length-1);Nc(t.get());var n=QC(e,!1);return t.set(n),Ou(n,n.length-1)}))}),(function(e){Nc(t.get());var n=JC(e);return t.set(n),B.some(Ou(n,1))}))},nw=function(t,e){for(var n=0;n0&&e(l,Ot(s))&&a++,l.line=a,o(l))return!0;s.push(l)}}},c=Ot(i.getClientRects());if(!c)return s;var l=i.getNode();return u(l),function(t,e,n,r){for(;r=Jc(r,t,Ko,e);)if(n(r))return}(t,r,u,l),s},Fw=E(zw,xw.Up,ou,iu),Uw=E(zw,xw.Down,iu,ou),Hw=function(t){return function(e){return function(t,e){return e.line>t}(t,e)}},Vw=function(t){return function(e){return function(t,e){return e.line===t}(t,e)}},Ww=qn,qw=Jc,Kw=function(t,e){return Math.abs(t.left-e)},Yw=function(t,e){return Math.abs(t.right-e)},Xw=function(t,e){return t>=e.left&&t<=e.right},Zw=function(t,e){return t>=e.top&&t<=e.bottom},Gw=function(t,e,n){return void 0===n&&(n=$),Tt(t,(function(t,r){if(Xw(e,r))return n(r)?r:t;if(Xw(e,t))return n(t)?t:r;var o=Math.min(Kw(t,e),Yw(t,e)),i=Math.min(Kw(r,e),Yw(r,e));return i===o&&wt(r,"node")&&Ww(r.node)||i0&&i(m,Ot(c))&&l++;var p=eu(m);if(p.position=s,p.line=l,n(p))return c;c.push(p)}}}while(s=o(s));return c}(e,t.getBody(),Hw(1),c),v=Gw(Y(g,Vw(1)),f);if(v)return e_(t,v.position.toRange(),!1);if(v=Ot(Y(g,Vw(0))))return e_(t,v.position.toRange(),!1)}return 0===d.length?o_(t,u).filter(u?o:r).map((function(e){return LC(t,e.toRange(),!1)})):B.none()},o_=function(t,e){var n=t.selection.getRng(),r=t.getBody();if(e){var o=Ou.fromRangeEnd(n),i=$w(r,o);return st(i.positions)}o=Ou.fromRangeStart(n),i=Nw(r,o);return at(i.positions)},i_=function(t,e,n){return o_(t,e).filter(n).exists((function(e){return t.selection.setRng(e.toRange()),!0}))},a_=function(t,e){var n=t.dom.createRng();n.setStart(e.container(),e.offset()),n.setEnd(e.container(),e.offset()),t.selection.setRng(n)},s_=function(t,e){t?e.setAttribute("data-mce-selected","inline-boundary"):e.removeAttribute("data-mce-selected")},u_=function(t,e,n){return ew(e,n).map((function(e){return a_(t,e),n}))},c_=function(t,e){if(t.selection.isCollapsed()&&!0!==t.composing&&e.get()){var n=Ou.fromRangeStart(t.selection.getRng());Ou.isTextPosition(n)&&!1===function(t){return Ao(t)||Lo(t)}(n)&&(a_(t,Lc(e.get(),n)),e.set(null))}},l_=function(t,e,n){return!!Cc(t)&&function(t,e,n){var r=t.getBody(),o=Ou.fromRangeStart(t.selection.getRng()),i=E(tC,t);return Cw(n,i,r,o).bind((function(n){return u_(t,e,n)}))}(t,e,n).isSome()},d_=function(t,e,n){return!!Cc(e)&&kw(t,e)},f_=function(t){var e=ws(null),n=E(tC,t);return t.on("NodeChange",(function(r){!Cc(t)||ke.browser.isIE()&&r.initial||(function(t,e,n){var r=V(Ms(Ae.fromDom(e.getRoot()),'*[data-mce-selected="inline-boundary"]'),(function(t){return t.dom})),o=Y(r,t),i=Y(n,t);W(rt(o,i),E(s_,!1)),W(rt(i,o),E(s_,!0))}(n,t.dom,r.parents),c_(t,e),function(t,e,n,r){if(e.selection.isCollapsed()){var o=Y(r,t);W(o,(function(r){var o=Ou.fromRangeStart(e.selection.getRng());fw(t,e.getBody(),o).bind((function(t){return u_(e,n,t)}))}))}}(n,t,e,r.parents))})),e},m_=E(d_,!0),p_=E(d_,!1),h_=function(t,e,n){if(Cc(t)){var r=o_(t,e).getOrThunk((function(){var n=t.selection.getRng();return e?Ou.fromRangeEnd(n):Ou.fromRangeStart(n)}));return fw(E(tC,t),t.getBody(),r).exists((function(e){var r=hw(e);return ew(n,r).exists((function(e){return a_(t,e),!0}))}))}return!1},g_=function(t,e){return function(n){return ew(e,n).exists((function(e){return a_(t,e),!0}))}},v_=function(t,e,n,r){var o=t.getBody(),i=E(tC,t);t.undoManager.ignore((function(){t.selection.setRng(function(t,e){var n=document.createRange();return n.setStart(t.container(),t.offset()),n.setEnd(e.container(),e.offset()),n}(n,r)),t.execCommand("Delete"),fw(i,o,Ou.fromRangeStart(t.selection.getRng())).map(gw).map(g_(t,e))})),t.nodeChanged()},b_=function(t,e,n,r){var o=function(t,e){return Qc(e,t)||t}(t.getBody(),r.container()),i=E(tC,t),a=fw(i,o,r);return a.bind((function(t){return n?t.fold(D(B.some(gw(t))),B.none,D(B.some(hw(t))),B.none):t.fold(B.none,D(B.some(hw(t))),B.none,D(B.some(gw(t))))})).map(g_(t,e)).getOrThunk((function(){var s=Al(n,o,r),u=s.bind((function(t){return fw(i,o,t)}));return Zn(a,u,(function(){return nC(i,o,r).exists((function(e){return!!function(t){return Zn(Il(t),Rl(t),(function(e,n){var r=rC(!0,e),o=rC(!1,n);return $l(t,r).forall((function(t){return t.isEqual(o)}))})).getOr(!0)}(e)&&(hh(t,n,Ae.fromDom(e)),!0)}))})).orThunk((function(){return u.bind((function(o){return s.map((function(o){return n?v_(t,e,r,o):v_(t,e,o,r),!0}))}))})).getOr(!1)}))},y_=function(t,e,n){if(t.selection.isCollapsed()&&Cc(t)){var r=Ou.fromRangeStart(t.selection.getRng());return b_(t,e,n,r)}return!1},C_=function(t){return 1===nn(t)},w_=function(t,e,n,r){var o=E($g,e),i=V(Y(r,o),(function(t){return t.dom}));if(0===i.length)hh(e,t,n);else{var a=function(t,e){var n=Sg(!1),r=Ag(e,n.dom);return dn(Ae.fromDom(t),n),vn(Ae.fromDom(t)),Ou(r,0)}(n.dom,i);e.selection.setRng(a.toRange())}},__=function(t,e){var n=Ae.fromDom(t.getBody()),r=Ae.fromDom(t.selection.getStart()),o=Y(function(t,e){var n=Sp(e,t);return Q(n,lo).fold(D(n),(function(t){return n.slice(0,t)}))}(n,r),C_);return st(o).exists((function(n){var r,i=Ou.fromRangeStart(t.selection.getRng());return!(!function(t,e,n){return Zn(Il(n),Rl(n),(function(r,o){var i=rC(!0,r),a=rC(!1,o),s=rC(!1,e);return t?$l(n,s).exists((function(t){return t.isEqual(a)&&e.isEqual(i)})):Pl(n,s).exists((function(t){return t.isEqual(i)&&e.isEqual(a)}))})).getOr(!0)}(e,i,n.dom)||(r=n,Ml(r.dom)&&xg(r.dom)))&&(w_(e,t,n,o),!0)}))},k_=function(t,e){return!!t.selection.isCollapsed()&&__(t,e)},x_=function(t,e,n){return t._selectionOverrides.hideFakeCaret(),hh(t,e,Ae.fromDom(n)),!0},D_=function(t,e){return t.selection.isCollapsed()?function(t,e){var n=e?hp:gp,r=e?Au.Forwards:Au.Backwards,o=cl(r,t.getBody(),t.selection.getRng());return n(o)?x_(t,e,o.getNode(!e)):B.from(rC(e,o)).filter((function(t){return n(t)&&fl(o,t)})).exists((function(n){return x_(t,e,n.getNode(!e))}))}(t,e):function(t,e){var n=t.selection.getNode();return!!Yn(n)&&x_(t,e,n)}(t,e)},S_=function(t){var e=parseInt(t,10);return isNaN(e)?0:e},T_=function(t,e){return(t||"table"===Be(e)?"margin":"padding")+("rtl"===ir(e,"direction")?"-right":"-left")},E_=function(t){var e=A_(t);return!t.mode.isReadOnly()&&(e.length>1||function(t,e){return et(e,(function(e){var n=T_(pc(t),e),r=sr(e,n).map(S_).getOr(0);return"false"!==t.dom.getContentEditable(e.dom)&&r>0}))}(t,e))},O_=function(t){return ho(t)||go(t)},A_=function(t){return Y((e=t.selection.getSelectedBlocks(),V(e,Ae.fromDom)),(function(t){return!O_(t)&&!function(t){return Ke(t).exists(O_)}(t)&&Xr(t,(function(t){return Wn(t.dom)||qn(t.dom)})).exists((function(t){return Wn(t.dom)}))}));var e},L_=function(t,e){var n=t.dom,r=t.selection,o=t.formatter,i=function(t){return t.getParam("indentation","40px","string")}(t),a=/[a-z%]+$/i.exec(i)[0],s=parseInt(i,10),u=pc(t),c=nc(t);t.queryCommandState("InsertUnorderedList")||t.queryCommandState("InsertOrderedList")||""!==c||n.getParent(r.getNode(),n.isBlock)||o.apply("div"),W(A_(t),(function(t){!function(t,e,n,r,o,i){var a=T_(n,Ae.fromDom(i));if("outdent"===e){var s=Math.max(0,S_(i.style[a])-r);t.setStyle(i,a,s?s+o:"")}else s=S_(i.style[a])+r+o,t.setStyle(i,a,s)}(n,e,u,s,a,t.dom)}))},N_=function(t,e){if(t.selection.isCollapsed()&&E_(t)){var n=t.dom,r=t.selection.getRng(),o=Ou.fromRangeStart(r),i=n.getParent(r.startContainer,n.isBlock);if(null!==i&&Lp(Ae.fromDom(i),o))return L_(t,"outdent"),!0}return!1},$_=function(t,e){t.getDoc().execCommand(e,!1,null)},P_=function(t,e){t.addCommand("delete",(function(){!function(t,e){N_(t)||VC(t,!1)||IC(t,!1)||y_(t,e,!1)||wC(t,!1)||Wh(t)||WC(t,!1)||D_(t,!1)||DC(t)||k_(t,!1)||($_(t,"Delete"),uC(t))}(t,e)})),t.addCommand("forwardDelete",(function(){!function(t,e){VC(t,!0)||IC(t,!0)||y_(t,e,!0)||wC(t,!0)||Wh(t)||WC(t,!0)||D_(t,!0)||DC(t)||k_(t,!0)||$_(t,"ForwardDelete")}(t,e)}))},I_=function(t){return void 0===t.touches||1!==t.touches.length?B.none():B.some(t.touches[0])},R_=function(t){var e=Ts(),n=ws(!1),r=Os((function(e){t.fire("longpress",At(At({},e),{type:"longpress"})),n.set(!0)}),400);t.on("touchstart",(function(t){I_(t).each((function(o){r.cancel();var i={x:o.clientX,y:o.clientY,target:t.target};r.throttle(t),n.set(!1),e.set(i)}))}),!0),t.on("touchmove",(function(o){r.cancel(),I_(o).each((function(r){e.on((function(o){(function(t,e){var n=Math.abs(t.clientX-e.x),r=Math.abs(t.clientY-e.y);return n>5||r>5})(r,o)&&(e.clear(),n.set(!1),t.fire("longpresscancel"))}))}))}),!0),t.on("touchend touchcancel",(function(o){r.cancel(),"touchcancel"!==o.type&&e.get().filter((function(t){return t.target.isEqualNode(o.target)})).each((function(){n.get()?o.preventDefault():t.fire("tap",At(At({},o),{type:"tap"}))}))}),!0)},B_=function(t,e){return Ct(t,e.nodeName)},M_=function(t,e){return!!jn(e)||!!Ln(e)&&(!B_(t,e)&&!Zl(e))},j_=function(t,e){if(jn(e)){if(0===e.nodeValue.length)return!0;if(/^\s+$/.test(e.nodeValue)&&(!e.nextSibling||B_(t,e.nextSibling)))return!0}return!1},z_=function(t){var e,n,r,o=t.dom,i=t.selection,a=t.schema,s=a.getBlockElements(),u=i.getStart(),c=t.getBody(),l=nc(t);if(u&&Ln(u)&&l){var d=c.nodeName.toLowerCase();if(a.isValidChild(d,l.toLowerCase())&&!function(t,e,n){return H(Dp(Ae.fromDom(n),Ae.fromDom(e)),(function(e){return B_(t,e.dom)}))}(s,c,u)){var f=i.getRng(),m=f.startContainer,p=f.startOffset,h=f.endContainer,g=f.endOffset,v=Cm(t);for(u=c.firstChild;u;)if(M_(s,u)){if(j_(s,u)){n=u,u=u.nextSibling,o.remove(n);continue}e||(e=o.create(l,rc(t)),u.parentNode.insertBefore(e,u),r=!0),n=u,u=u.nextSibling,e.appendChild(n)}else e=null,u=u.nextSibling;r&&v&&(f.setStart(m,p),f.setEnd(h,g),i.setRng(f),t.nodeChanged())}}},F_=function(t,e){e.hasAttribute("data-mce-caret")&&(Io(e),function(t){t.selection.setRng(t.selection.getRng())}(t),t.selection.scrollIntoView(e))},U_=function(t,e){var n=function(t){return Jr(Ae.fromDom(t.getBody()),"*[data-mce-caret]").map((function(t){return t.dom})).getOrNull()}(t);if(n)return"compositionstart"===e.type?(e.preventDefault(),e.stopPropagation(),void F_(t,n)):void(Oo(n)&&(F_(t,n),t.undoManager.add()))},H_=qn,V_=function(t,e,n){var r=xl(t.getBody()),o=E(dl,1===e?r.next:r.prev);if(n.collapsed&&function(t){return""!==nc(t)}(t)){var i=t.dom.getParent(n.startContainer,"PRE");if(!i)return;if(!o(Ou.fromRangeStart(n))){var a=function(t){var e=t.dom.create(nc(t));return(!ke.ie||ke.ie>=11)&&(e.innerHTML='
    '),e}(t);1===e?t.$(i).after(a):t.$(i).before(a),t.selection.select(a,!0),t.selection.collapse()}}},W_=function(t,e){var n=e?Au.Forwards:Au.Backwards,r=t.selection.getRng();return function(t,e,n){return n_(e,t,n,yp,Cp,H_)}(n,t,r).orThunk((function(){return V_(t,n,r),B.none()}))},q_=function(t,e){var n=e?1:-1,r=t.selection.getRng();return function(t,e,n){return r_(e,t,n,(function(t){return yp(t)||vp(t)}),(function(t){return Cp(t)||bp(t)}),H_)}(n,t,r).orThunk((function(){return V_(t,n,r),B.none()}))},K_=function(t,e){return W_(t,e).exists((function(e){return t_(t,e),!0}))},Y_=function(t,e){return q_(t,e).exists((function(e){return t_(t,e),!0}))},X_=function(t,e){return i_(t,e,e?Cp:yp)},Z_=function(t){return U(["figcaption"],Be(t))},G_=function(t){var e=document.createRange();return e.setStartBefore(t.dom),e.setEndBefore(t.dom),e},J_=function(t,e,n){n?pn(t,e):mn(t,e)},Q_=function(t,e,n,r){return""===e?function(t,e){var n=Ae.fromTag("br");return J_(t,n,e),G_(n)}(t,r):function(t,e,n,r){var o=Ae.fromTag(n),i=Ae.fromTag("br");return tr(o,r),pn(o,i),J_(t,o,e),G_(i)}(t,r,e,n)},tk=function(t,e,n){return e?function(t,e){return $w(t,e).breakAt.isNone()}(t.dom,n):function(t,e){return Nw(t,e).breakAt.isNone()}(t.dom,n)},ek=function(t,e){var n=Ae.fromDom(t.getBody()),r=Ou.fromRangeStart(t.selection.getRng()),o=nc(t),i=rc(t);return function(t,e){var n=E(Pe,e);return Xr(Ae.fromDom(t.container()),lo,n).filter(Z_)}(r,n).exists((function(){if(tk(n,e,r)){var a=Q_(n,o,i,e);return t.selection.setRng(a),!0}return!1}))},nk=function(t,e){return!!t.selection.isCollapsed()&&ek(t,e)},rk=function(t,e){return tt(function(t){return V(t,(function(t){return At({shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0,action:_},t)}))}(t),(function(t){return function(t,e){return e.keyCode===t.keyCode&&e.shiftKey===t.shiftKey&&e.altKey===t.altKey&&e.ctrlKey===t.ctrlKey&&e.metaKey===t.metaKey}(t,e)?[t]:[]}))},ok=function(t){for(var e=[],n=1;ne})),fk=function(t,e){return at(e.getClientRects()).bind((function(e){return lk(t,e.left,e.top)})).bind((function(t){return Lw(Rl(n=t).map((function(t){return Nw(n,t).positions.concat(t)})).getOr([]),e);var n}))},mk=function(t,e){return st(e.getClientRects()).bind((function(e){return dk(t,e.left,e.top)})).bind((function(t){return Lw(Il(n=t).map((function(t){return[t].concat($w(n,t).positions)})).getOr([]),e);var n}))},pk=function(t,e,n){var r=t(e,n);return function(t){return t.breakType===ww.Wrap&&0===t.positions.length}(r)||!Hn(n.getNode())&&function(t){return t.breakType===ww.Br&&1===t.positions.length}(r)?!function(t,e,n){return n.breakAt.exists((function(n){return t(e,n).breakAt.isSome()}))}(t,e,r):r.breakAt.isNone()},hk=E(pk,Nw),gk=E(pk,$w),vk=function(t,e,n,r){var o=t.selection.getRng(),i=e?1:-1;return!(!jc()||!function(t,e,n){var r=Ou.fromRangeStart(e);return Nl(!t,n).exists((function(t){return t.isEqual(r)}))}(e,o,n))&&(EC(i,t,n,!e,!1).each((function(e){t_(t,e)})),!0)},bk=function(t,e){var n=e.getNode(t);return Ln(n)&&"TABLE"===n.nodeName?B.some(n):B.none()},yk=function(t,e,n){var r=bk(!!e,n),o=!1===e;r.fold((function(){return t_(t,n.toRange())}),(function(r){return Nl(o,t.getBody()).filter((function(t){return t.isEqual(n)})).fold((function(){return t_(t,n.toRange())}),(function(o){return function(t,e,n,r){var o=nc(e);o?e.undoManager.transact((function(){var r=Ae.fromTag(o);tr(r,rc(e)),pn(r,Ae.fromTag("br")),t?fn(Ae.fromDom(n),r):dn(Ae.fromDom(n),r);var i=e.dom.createRng();i.setStart(r.dom,0),i.setEnd(r.dom,0),t_(e,i)})):t_(e,r.toRange())}(e,t,r,n)}))}))},Ck=function(t,e,n,r){var o=t.selection.getRng(),i=Ou.fromRangeStart(o),a=t.getBody();if(!e&&hk(r,i)){var s=function(t,e,n){return fk(e,n).orThunk((function(){return at(n.getClientRects()).bind((function(n){return Aw(Pw(t,Ou.before(e)),n.left)}))})).getOr(Ou.before(e))}(a,n,i);return yk(t,e,s),!0}if(e&&gk(r,i)){s=function(t,e,n){return mk(e,n).orThunk((function(){return at(n.getClientRects()).bind((function(n){return Aw(Iw(t,Ou.after(e)),n.left)}))})).getOr(Ou.after(e))}(a,n,i);return yk(t,e,s),!0}return!1},wk=function(t,e,n){return B.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind((function(r){return B.from(t.dom.getParent(r,"table")).map((function(o){return n(t,e,o,r)}))})).getOr(!1)},_k=function(t,e){return wk(t,e,vk)},kk=function(t,e){return wk(t,e,Ck)},xk=function(t,e){t.on("keydown",(function(n){!1===n.isDefaultPrevented()&&function(t,e,n){var r=pe().os;ik([{keyCode:of.RIGHT,action:ok(K_,t,!0)},{keyCode:of.LEFT,action:ok(K_,t,!1)},{keyCode:of.UP,action:ok(Y_,t,!1)},{keyCode:of.DOWN,action:ok(Y_,t,!0)},{keyCode:of.RIGHT,action:ok(_k,t,!0)},{keyCode:of.LEFT,action:ok(_k,t,!1)},{keyCode:of.UP,action:ok(kk,t,!1)},{keyCode:of.DOWN,action:ok(kk,t,!0)},{keyCode:of.RIGHT,action:ok(ak,t,!0)},{keyCode:of.LEFT,action:ok(ak,t,!1)},{keyCode:of.UP,action:ok(sk,t,!1)},{keyCode:of.DOWN,action:ok(sk,t,!0)},{keyCode:of.RIGHT,action:ok(l_,t,e,!0)},{keyCode:of.LEFT,action:ok(l_,t,e,!1)},{keyCode:of.RIGHT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:ok(m_,t,e)},{keyCode:of.LEFT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:ok(p_,t,e)},{keyCode:of.UP,action:ok(nk,t,!1)},{keyCode:of.DOWN,action:ok(nk,t,!0)}],n).each((function(t){n.preventDefault()}))}(t,e,n)}))},Dk=function(t,e){t.on("keydown",(function(n){!1===n.isDefaultPrevented()&&function(t,e,n){ik([{keyCode:of.BACKSPACE,action:ok(N_,t,!1)},{keyCode:of.BACKSPACE,action:ok(VC,t,!1)},{keyCode:of.DELETE,action:ok(VC,t,!0)},{keyCode:of.BACKSPACE,action:ok(IC,t,!1)},{keyCode:of.DELETE,action:ok(IC,t,!0)},{keyCode:of.BACKSPACE,action:ok(y_,t,e,!1)},{keyCode:of.DELETE,action:ok(y_,t,e,!0)},{keyCode:of.BACKSPACE,action:ok(Wh,t,!1)},{keyCode:of.DELETE,action:ok(Wh,t,!0)},{keyCode:of.BACKSPACE,action:ok(WC,t,!1)},{keyCode:of.DELETE,action:ok(WC,t,!0)},{keyCode:of.BACKSPACE,action:ok(D_,t,!1)},{keyCode:of.DELETE,action:ok(D_,t,!0)},{keyCode:of.BACKSPACE,action:ok(DC,t,!1)},{keyCode:of.DELETE,action:ok(DC,t,!0)},{keyCode:of.BACKSPACE,action:ok(wC,t,!1)},{keyCode:of.DELETE,action:ok(wC,t,!0)},{keyCode:of.BACKSPACE,action:ok(k_,t,!1)},{keyCode:of.DELETE,action:ok(k_,t,!0)}],n).each((function(t){n.preventDefault()}))}(t,e,n)})),t.on("keyup",(function(e){!1===e.isDefaultPrevented()&&function(t,e){ik([{keyCode:of.BACKSPACE,action:ok(HC,t)},{keyCode:of.DELETE,action:ok(HC,t)}],e)}(t,e)}))},Sk=function(t,e){var n,r=e,o=t.dom,i=t.schema.getMoveCaretBeforeOnEnterElements();if(e){if(/^(LI|DT|DD)$/.test(e.nodeName)){var a=function(t){for(;t;){if(1===t.nodeType||3===t.nodeType&&t.data&&/[\r\n\s]/.test(t.data))return t;t=t.nextSibling}}(e.firstChild);a&&/^(UL|OL|DL)$/.test(a.nodeName)&&e.insertBefore(o.doc.createTextNode(Co),e.firstChild)}var s=o.createRng();if(e.normalize(),e.hasChildNodes()){for(var u=new so(e,e);n=u.current();){if(jn(n)){s.setStart(n,0),s.setEnd(n,0);break}if(i[n.nodeName.toLowerCase()]){s.setStartBefore(n),s.setEndBefore(n);break}r=n,n=u.next()}n||(s.setStart(r,0),s.setEnd(r,0))}else Hn(e)?e.nextSibling&&o.isBlock(e.nextSibling)?(s.setStartBefore(e),s.setEndBefore(e)):(s.setStartAfter(e),s.setEndAfter(e)):(s.setStart(e,0),s.setEnd(e,0));t.selection.setRng(s),Vf(t,s)}},Tk=function(t){return B.from(t.dom.getParent(t.selection.getStart(!0),t.dom.isBlock))},Ek=function(t,e){return t&&t.parentNode&&t.parentNode.nodeName===e},Ok=function(t){return t&&/^(OL|UL|LI)$/.test(t.nodeName)},Ak=function(t){var e=t.parentNode;return/^(LI|DT|DD)$/.test(e.nodeName)?e:t},Lk=function(t,e,n){for(var r=t[n?"firstChild":"lastChild"];r&&!Ln(r);)r=r[n?"nextSibling":"previousSibling"];return r===e},Nk=function(t,e,n,r,o){var i=t.dom,a=t.selection.getRng();if(n!==t.getBody()){var s;Ok(s=n)&&Ok(s.parentNode)&&(o="LI");var u=o?e(o):i.create("BR");if(Lk(n,r,!0)&&Lk(n,r,!1))if(Ek(n,"LI")){var c=Ak(n);i.insertAfter(u,c),!function(t){var e;return(null===(e=t.parentNode)||void 0===e?void 0:e.firstChild)===t}(n)?i.remove(n):i.remove(c)}else i.replace(u,n);else if(Lk(n,r,!0))Ek(n,"LI")?(i.insertAfter(u,Ak(n)),u.appendChild(i.doc.createTextNode(" ")),u.appendChild(n)):n.parentNode.insertBefore(u,n),i.remove(r);else if(Lk(n,r,!1))i.insertAfter(u,Ak(n)),i.remove(r);else{n=Ak(n);var l=a.cloneRange();l.setStartAfter(r),l.setEndAfter(n);var d=l.extractContents();"LI"===o&&function(t,e){return t.firstChild&&t.firstChild.nodeName===e}(d,"LI")?(u=d.firstChild,i.insertAfter(d,n)):(i.insertAfter(d,n),i.insertAfter(u,n)),i.remove(r)}Sk(t,u)}},$k=function(t,e){return e&&"A"===e.nodeName&&t.isEmpty(e)},Pk=function(t){t.innerHTML='
    '},Ik=function(t,e){return t.nodeName===e||t.previousSibling&&t.previousSibling.nodeName===e},Rk=function(t,e){return e&&t.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&!/^(fixed|absolute)/i.test(e.style.position)&&"true"!==t.getContentEditable(e)},Bk=function(t,e,n){return!1===jn(e)?n:t?1===n&&e.data.charAt(n-1)===wo?0:n:n===e.data.length-1&&e.data.charAt(n)===wo?e.data.length:n},Mk=function(t,e){var n,r,o=t.getRoot();for(n=e;n!==o&&"false"!==t.getContentEditable(n);)"true"===t.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o},jk=function(t,e){var n=nc(t);n&&n.toLowerCase()===e.tagName.toLowerCase()&&function(t,e,n){var r=t.dom;B.from(n.style).map(r.parseStyle).each((function(t){var n=ur(Ae.fromDom(e)),o=At(At({},n),t);r.setStyles(e,o)}));var o=B.from(n.class).map((function(t){return t.split(/\s+/)})),i=B.from(e.className).map((function(t){return Y(t.split(/\s+/),(function(t){return""!==t}))}));Zn(o,i,(function(t,n){var o=Y(n,(function(e){return!U(t,e)})),i=Lt(Lt([],t,!0),o,!0);r.setAttrib(e,"class",i.join(" "))}));var a=["style","class"],s=vt(n,(function(t,e){return!U(a,e)}));r.setAttribs(e,s)}(t,e,rc(t))},zk=function(t,e){var n,r,o,i,a,s,u,c,l,d,f=t.dom,m=t.schema,p=m.getNonEmptyElements(),h=t.selection.getRng(),g=function(e){var n,o,a,s=r,u=m.getTextInlineElements();if(a=n=e||"TABLE"===c||"HR"===c?f.create(e||l):i.cloneNode(!1),!1===function(t){return t.getParam("keep_styles",!0)}(t))f.setAttrib(n,"style",null),f.setAttrib(n,"class",null);else do{if(u[s.nodeName]){if(Ml(s)||Zl(s))continue;o=s.cloneNode(!1),f.setAttrib(o,"id",""),n.hasChildNodes()?(o.appendChild(n.firstChild),n.appendChild(o)):(a=o,n.appendChild(o))}}while((s=s.parentNode)&&s!==w);return jk(t,n),Pk(a),n},v=function(t){var e,n,a=Bk(t,r,o);if(jn(r)&&(t?a>0:ar.childNodes.length-1,r=r.childNodes[Math.min(o,r.childNodes.length-1)]||r,o=d&&jn(r)?r.nodeValue.length:0);var w=Mk(f,r);if(w){(l&&!y||!l&&y)&&(r=function(t,e,n,r,o){var i,a,s,u,c,l,d=e||"P",f=t.dom,m=Mk(f,r);if(!(a=f.getParent(r,f.isBlock))||!Rk(f,a)){if(l=(a=a||m)===t.getBody()||function(t){return t&&/^(TD|TH|CAPTION)$/.test(t.nodeName)}(a)?a.nodeName.toLowerCase():a.parentNode.nodeName.toLowerCase(),!a.hasChildNodes())return i=f.create(d),jk(t,i),a.appendChild(i),n.setStart(i,0),n.setEnd(i,0),i;for(u=r;u.parentNode!==a;)u=u.parentNode;for(;u&&!f.isBlock(u);)s=u,u=u.previousSibling;if(s&&t.schema.isValidChild(l,d.toLowerCase())){for(i=f.create(d),jk(t,i),s.parentNode.insertBefore(i,s),u=s;u&&!f.isBlock(u);)c=u.nextSibling,i.appendChild(u),u=c;n.setStart(r,o),n.setEnd(r,o)}}return r}(t,l,h,r,o)),i=f.getParent(r,f.isBlock),u=i?f.getParent(i.parentNode,f.isBlock):null,c=i?i.nodeName.toUpperCase():"";var _=u?u.nodeName.toUpperCase():"";"LI"!==_||C||(i=u,u=u.parentNode,c=_),/^(LI|DT|DD)$/.test(c)&&f.isEmpty(i)?Nk(t,g,u,i,l):l&&i===t.getBody()||(l=l||"P",So(i)?(a=Io(i),f.isEmpty(i)&&Pk(i),jk(t,a),Sk(t,a)):v()?b():v(!0)?(a=i.parentNode.insertBefore(g(),i),Sk(t,Ik(i,"HR")?a:i)):(n=function(t){var e=t.cloneRange();return e.setStart(t.startContainer,Bk(!0,t.startContainer,t.startOffset)),e.setEnd(t.endContainer,Bk(!1,t.endContainer,t.endOffset)),e}(h).cloneRange(),n.setEndAfter(i),function(t){W(Bs(Ae.fromDom(t),Fe),(function(t){var e=t.dom;e.nodeValue=ko(e.nodeValue)}))}(s=n.extractContents()),function(t){do{jn(t)&&(t.nodeValue=t.nodeValue.replace(/^[\r\n]+/,"")),t=t.firstChild}while(t)}(s),a=s.firstChild,f.insertAfter(s,i),function(t,e,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(t.isBlock(o))return;Ln(o)&&!e[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)(!(o=i[r]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue||$k(t,o))&&t.remove(o)}}(f,p,a),function(t,e){e.normalize();var n=e.lastChild;n&&!/^(left|right)$/gi.test(t.getStyle(n,"float",!0))||t.add(e,"br")}(f,i),f.isEmpty(i)&&Pk(i),a.normalize(),f.isEmpty(a)?(f.remove(a),b()):(jk(t,a),Sk(t,a))),f.setAttrib(a,"id",""),t.fire("NewBlock",{newBlock:a}))}},Fk=function(t,e,n){var r=t.dom.createRng();n?(r.setStartBefore(e),r.setEndBefore(e)):(r.setStartAfter(e),r.setEndAfter(e)),t.selection.setRng(r),Vf(t,r)},Uk=function(t,e){var n,r,o=t.selection,i=t.dom,a=o.getRng();yf(i,a).each((function(t){a.setStart(t.startContainer,t.startOffset),a.setEnd(t.endContainer,t.endOffset)}));var s=a.startOffset,u=a.startContainer;if(1===u.nodeType&&u.hasChildNodes()){var c=s>u.childNodes.length-1;u=u.childNodes[Math.min(s,u.childNodes.length-1)]||u,s=c&&3===u.nodeType?u.nodeValue.length:0}var l=i.getParent(u,i.isBlock),d=l?i.getParent(l.parentNode,i.isBlock):null,f=d?d.nodeName.toUpperCase():"",m=!(!e||!e.ctrlKey);"LI"!==f||m||(l=d),u&&3===u.nodeType&&s>=u.nodeValue.length&&(function(t,e,n){for(var r,o=new so(e,n),i=t.getNonEmptyElements();r=o.next();)if(i[r.nodeName.toLowerCase()]||r.length>0)return!0}(t.schema,u,l)||(n=i.create("br"),a.insertNode(n),a.setStartAfter(n),a.setEndAfter(n),r=!0)),n=i.create("br"),Nu(i,a,n),Fk(t,n,r),t.undoManager.add()},Hk=function(t,e){var n=Ae.fromTag("br");dn(Ae.fromDom(e),n),t.undoManager.add()},Vk=function(t,e){Wk(t.getBody(),e)||fn(Ae.fromDom(e),Ae.fromTag("br"));var n=Ae.fromTag("br");fn(Ae.fromDom(e),n),Fk(t,n.dom,!1),t.undoManager.add()},Wk=function(t,e){return n=Ou.after(e),!!Hn(n.getNode())||$l(t,Ou.after(e)).map((function(t){return Hn(t.getNode())})).getOr(!1);var n},qk=function(t){return t&&"A"===t.nodeName&&"href"in t},Kk=function(t){return t.fold(N,qk,qk,N)},Yk=function(t,e){e.fold(_,E(Hk,t),E(Vk,t),_)},Xk=function(t,e){var n=function(t){var e=E(tC,t),n=Ou.fromRangeStart(t.selection.getRng());return fw(e,t.getBody(),n).filter(Kk)}(t);n.isSome()?n.each(E(Yk,t)):Uk(t,e)},Zk=function(t,e){return Tk(t).filter((function(t){return e.length>0&&Ne(Ae.fromDom(t),e)})).isSome()},Gk=Dr([{br:[]},{block:[]},{none:[]}]),Jk=function(t,e){return function(t){return Zk(t,function(t){return t.getParam("no_newline_selector","")}(t))}(t)},Qk=function(t){return function(e,n){return""===nc(e)===t}},tx=function(t){return function(e,n){return function(t){return Tk(t).filter((function(t){return go(Ae.fromDom(t))})).isSome()}(e)===t}},ex=function(t,e){return function(n,r){var o=function(t){return Tk(t).fold(D(""),(function(t){return t.nodeName.toUpperCase()}))}(n)===t.toUpperCase();return o===e}},nx=function(t){return ex("pre",t)},rx=function(t){return function(e,n){return function(t){return t.getParam("br_in_pre",!0)}(e)===t}},ox=function(t,e){return function(t){return Zk(t,function(t){return t.getParam("br_newline_selector",".mce-toc h2,figcaption,caption")}(t))}(t)},ix=function(t,e){return e},ax=function(t){var e=nc(t),n=function(t,e){var n,r,o=t.getRoot();for(n=e;n!==o&&"false"!==t.getContentEditable(n);)"true"===t.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==o?r:o}(t.dom,t.selection.getStart());return n&&t.schema.isValidChild(n.nodeName,e||"P")},sx=function(t,e){return function(n,r){return Z(t,(function(t,e){return t&&e(n,r)}),!0)?B.some(e):B.none()}},ux=function(t,e){(function(t,e){return nw([sx([Jk],Gk.none()),sx([ex("summary",!0)],Gk.br()),sx([nx(!0),rx(!1),ix],Gk.br()),sx([nx(!0),rx(!1)],Gk.block()),sx([nx(!0),rx(!0),ix],Gk.block()),sx([nx(!0),rx(!0)],Gk.br()),sx([tx(!0),ix],Gk.br()),sx([tx(!0)],Gk.block()),sx([Qk(!0),ix,ax],Gk.block()),sx([Qk(!0)],Gk.br()),sx([ox],Gk.br()),sx([Qk(!1),ix],Gk.br()),sx([ax],Gk.block())],[t,!(!e||!e.shiftKey)]).getOr(Gk.none())})(t,e).fold((function(){Xk(t,e)}),(function(){zk(t,e)}),_)},cx=function(t){t.on("keydown",(function(e){e.keyCode===of.ENTER&&function(t,e){var n;e.isDefaultPrevented()||(e.preventDefault(),(n=t.undoManager).typing&&(n.typing=!1,n.add()),t.undoManager.transact((function(){!1===t.selection.isCollapsed()&&t.execCommand("Delete"),ux(t,e)})))}(t,e)}))},lx=function(t,e){t.on("keydown",(function(n){!1===n.isDefaultPrevented()&&function(t,e,n){ik([{keyCode:of.END,action:ok(X_,t,!0)},{keyCode:of.HOME,action:ok(X_,t,!1)},{keyCode:of.END,action:ok(uk,t,!0)},{keyCode:of.HOME,action:ok(uk,t,!1)},{keyCode:of.END,action:ok(h_,t,!0,e)},{keyCode:of.HOME,action:ok(h_,t,!1,e)}],n).each((function(t){n.preventDefault()}))}(t,e,n)}))},dx=pe().browser,fx=function(t){!function(t){var e=Es((function(){t.composing||th(t)}),0);dx.isIE()&&(t.on("keypress",(function(t){e.throttle()})),t.on("remove",(function(t){e.cancel()})))}(t),t.on("input",(function(e){!1===e.isComposing&&th(t)}))},mx=pe(),px=function(t){return t.stopImmediatePropagation()},hx=function(t){return t.keyCode===of.PAGE_UP||t.keyCode===of.PAGE_DOWN},gx=function(t,e,n){n&&!t.get()?e.on("NodeChange",px,!0):!n&&t.get()&&e.off("NodeChange",px),t.set(n)},vx=function(t,e){if(!mx.os.isOSX()){var n=ws(!1);t.on("keydown",(function(e){hx(e)&&gx(n,t,!0)})),t.on("keyup",(function(r){!1===r.isDefaultPrevented()&&function(t,e,n){ik([{keyCode:of.PAGE_UP,action:ok(h_,t,!1,e)},{keyCode:of.PAGE_DOWN,action:ok(h_,t,!0,e)}],n)}(t,e,r),hx(r)&&n.get()&&(gx(n,t,!1),t.nodeChanged())}))}},bx=function(t,e){var n=e.container(),r=e.offset();return jn(n)?(n.insertData(r,t),B.some(Ou(n,r+t.length))):ll(e).map((function(n){var r=Ae.fromText(t);return e.isAtEnd()?fn(n,r):dn(n,r),Ou(r.dom,t.length)}))},yx=E(bx,Co),Cx=E(bx," "),wx=function(t,e){return function(n){return function(t,e){return!Wp(e)&&(qp(t,e)||Hp(t,e)||Vp(t,e))}(t,n)?yx(e):Cx(e)}},_x=function(t){var e=Ou.fromRangeStart(t.selection.getRng()),n=Ae.fromDom(t.getBody());if(t.selection.isCollapsed()){var r=E(tC,t),o=Ou.fromRangeStart(t.selection.getRng());return fw(r,t.getBody(),o).bind(function(t){return function(e){return e.fold((function(e){return Pl(t.dom,Ou.before(e))}),(function(t){return Il(t)}),(function(t){return Rl(t)}),(function(e){return $l(t.dom,Ou.after(e))}))}}(n)).bind(wx(n,e)).exists(function(t){return function(e){return t.selection.setRng(e.toRange()),t.nodeChanged(),!0}}(t))}return!1},kx=function(t){t.on("keydown",(function(e){!1===e.isDefaultPrevented()&&function(t,e){ik([{keyCode:of.SPACEBAR,action:ok(_x,t)}],e).each((function(t){e.preventDefault()}))}(t,e)}))},xx=function(t){var e=f_(t);return function(t){t.on("keyup compositionstart",E(U_,t))}(t),xk(t,e),Dk(t,e),cx(t),kx(t),fx(t),lx(t,e),vx(t,e),e},Dx=function(){function t(t){var e;this.lastPath=[],this.editor=t;var n=this;"onselectionchange"in t.getDoc()||t.on("NodeChange click mouseup keyup focus",(function(n){var r=t.selection.getRng(),o={startContainer:r.startContainer,startOffset:r.startOffset,endContainer:r.endContainer,endOffset:r.endOffset};"nodechange"!==n.type&&lf(o,e)||t.fire("SelectionChange"),e=o})),t.on("contextmenu",(function(){t.fire("SelectionChange")})),t.on("SelectionChange",(function(){var e=t.selection.getStart(!0);!e||!ke.range&&t.selection.isCollapsed()||Ud(t)&&!n.isSameElementPath(e)&&t.dom.isChildOf(e,t.getBody())&&t.nodeChanged({selectionChange:!0})})),t.on("mouseup",(function(e){!e.isDefaultPrevented()&&Ud(t)&&("IMG"===t.selection.getNode().nodeName?oo.setEditorTimeout(t,(function(){t.nodeChanged()})):t.nodeChanged())}))}return t.prototype.nodeChanged=function(t){var e,n,r,o=this.editor.selection;this.editor.initialized&&o&&!this.editor.getParam("disable_nodechange")&&!this.editor.mode.isReadOnly()&&(r=this.editor.getBody(),(e=o.getStart(!0)||r).ownerDocument===this.editor.getDoc()&&this.editor.dom.isChildOf(e,r)||(e=r),n=[],this.editor.dom.getParent(e,(function(t){if(t===r)return!0;n.push(t)})),(t=t||{}).element=e,t.parents=n,this.editor.fire("NodeChange",t))},t.prototype.isSameElementPath=function(t){var e,n=this.editor.$(t).parentsUntil(this.editor.getBody()).add(t);if(n.length===this.lastPath.length){for(e=n.length;e>=0&&n[e]===this.lastPath[e];e--);if(-1===e)return this.lastPath=n,!0}return this.lastPath=n,!1},t}(),Sx=function(t){!function(t){t.on("click",(function(e){t.dom.getParent(e.target,"details")&&e.preventDefault()}))}(t),function(t){t.parser.addNodeFilter("details",(function(t){W(t,(function(t){t.attr("data-mce-open",t.attr("open")),t.attr("open","open")}))})),t.serializer.addNodeFilter("details",(function(t){W(t,(function(t){var e=t.attr("data-mce-open");t.attr("open",f(e)?e:null),t.attr("data-mce-open",null)}))}))}(t)},Tx=function(t){return Ln(t)&&po(Ae.fromDom(t))},Ex=function(t){t.on("click",(function(e){e.detail>=3&&function(t){var e=t.selection.getRng(),n=Ou.fromRangeStart(e),r=Ou.fromRangeEnd(e);if(Ou.isElementPosition(n)){var o=n.container();Tx(o)&&Il(o).each((function(t){return e.setStart(t.container(),t.offset())}))}Ou.isElementPosition(r)&&(o=n.container(),Tx(o)&&Rl(o).each((function(t){return e.setEnd(t.container(),t.offset())})));t.selection.setRng(Kh(e))}(t)}))},Ox=function(t){var e=t.getBoundingClientRect(),n=t.ownerDocument,r=n.documentElement,o=n.defaultView;return{top:e.top+o.pageYOffset-r.clientTop,left:e.left+o.pageXOffset-r.clientLeft}},Ax=function(t,e){return n=function(t){return t.inline?Ox(t.getBody()):{left:0,top:0}}(t),r=function(t){var e=t.getBody();return t.inline?{left:e.scrollLeft,top:e.scrollTop}:{left:0,top:0}}(t),o=function(t,e){if(e.target.ownerDocument!==t.getDoc()){var n=Ox(t.getContentAreaContainer()),r=function(t){var e=t.getBody(),n=t.getDoc().documentElement,r={left:e.scrollLeft,top:e.scrollTop},o={left:e.scrollLeft||n.scrollLeft,top:e.scrollTop||n.scrollTop};return t.inline?r:o}(t);return{left:e.pageX-n.left+r.left,top:e.pageY-n.top+r.top}}return{left:e.pageX,top:e.pageY}}(t,e),{pageX:o.left-n.left+r.left,pageY:o.top-n.top+r.top};var n,r,o},Lx=qn,Nx=Wn,$x=function(t,e,n,r){var o=t.dom,i=e.cloneNode(!0);o.setStyles(i,{width:n,height:r}),o.setAttrib(i,"data-mce-selected",null);var a=o.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return o.setStyles(a,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:n,height:r}),o.setStyles(i,{margin:0,boxSizing:"border-box"}),a.appendChild(i),a},Px=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},Ix=function(t,e){return function(n){if(function(t){return 0===t.button}(n)){var r=J(e.dom.getParents(n.target),function(){for(var t=[],e=0;e10){if(e.fire("dragstart",{target:t.element}).isDefaultPrevented())return;t.dragging=!0,e.focus()}if(t.dragging){var s=function(t,e){return{pageX:e.pageX-t.relX,pageY:e.pageY+5}}(t,Ax(e,r));o=t.ghost,i=e.getBody(),o.parentNode!==i&&i.appendChild(o),function(t,e,n,r,o,i){var a=0,s=0;t.style.left=e.pageX+"px",t.style.top=e.pageY+"px",e.pageX+n>o&&(a=e.pageX+n-o),e.pageY+r>i&&(s=e.pageY+r-i),t.style.width=n-a+"px",t.style.height=r-s+"px"}(t.ghost,s,t.width,t.height,t.maxX,t.maxY),n(r.clientX,r.clientY)}}))}}(e,t),a=Rx(e,t),s=function(t,e){return function(){t.on((function(t){t.dragging&&e.fire("dragend")})),Bx(t)}}(e,t);t.on("mousedown",o),t.on("mousemove",i),t.on("mouseup",a),n.bind(r,"mousemove",i),n.bind(r,"mouseup",s),t.on("remove",(function(){n.unbind(r,"mousemove",i),n.unbind(r,"mouseup",s)})),t.on("keydown",(function(t){t.keyCode===of.ESC&&s()}))},jx=function(t){Mx(t),function(t){t.on("drop",(function(e){var n=void 0!==e.clientX?t.getDoc().elementFromPoint(e.clientX,e.clientY):null;(Lx(n)||"false"===t.dom.getContentEditableParent(n))&&e.preventDefault()}))}(t),function(t){return t.getParam("block_unsupported_drop",!0,"boolean")}(t)&&function(t){var e=function(e){if(!e.isDefaultPrevented()){var n=e.dataTransfer;n&&(U(n.types,"Files")||n.files.length>0)&&(e.preventDefault(),"drop"===e.type&&xy(t,"Dropped file type is not supported"))}},n=function(n){mm(t,n.target)&&e(n)},r=function(){var r=gs.DOM,o=t.dom,i=document,a=t.inline?t.getBody():t.getDoc(),s=["drop","dragover"];W(s,(function(t){r.bind(i,t,n),o.bind(a,t,e)})),t.on("remove",(function(){W(s,(function(t){r.unbind(i,t,n),o.unbind(a,t,e)}))}))};t.on("init",(function(){oo.setEditorTimeout(t,r,0)}))}(t)},zx=Wn,Fx=qn,Ux=function(t,e){return Qd(t.getBody(),e)},Hx=function(t){var e,n=t.selection,r=t.dom,o=r.isBlock,i=t.getBody(),a=Mc(t,i,o,(function(){return Cm(t)})),s="sel-"+r.uniqueId(),u="data-mce-selected",c=function(t){return t!==i&&(Fx(t)||Yn(t))&&r.isChildOf(t,i)},l=function(t){return yp(t)||Cp(t)||hp(t)||gp(t)},d=function(t){t&&n.setRng(t)},f=n.getRng,m=function(e,r,o,i){return void 0===i&&(i=!0),t.fire("ShowCaret",{target:r,direction:e,before:o}).isDefaultPrevented()?null:(i&&n.scrollIntoView(r,-1===e),a.show(o,r))},p=function(t){return Eo(t)||$o(t)||Po(t)},h=function(t){return p(t.startContainer)||p(t.endContainer)},g=function(e){var n=t.schema.getShortEndedElements(),o=r.createRng(),i=e.startContainer,a=e.startOffset,s=e.endContainer,u=e.endOffset;return Ct(n,i.nodeName.toLowerCase())?0===a?o.setStartBefore(i):o.setStartAfter(i):o.setStart(i,a),Ct(n,s.nodeName.toLowerCase())?0===u?o.setEndBefore(s):o.setEndAfter(s):o.setEnd(s,u),o},v=function(o){var i=o.cloneNode(!0),a=t.fire("ObjectSelected",{target:o,targetClone:i});if(a.isDefaultPrevented())return null;var c=function(e,o,i){var a=t.$,u=Jr(Ae.fromDom(t.getBody()),"#"+s).fold((function(){return a([])}),(function(t){return a([t.dom])}));0===u.length&&(u=a('
    ').attr("id",s)).appendTo(t.getBody());var c=r.createRng();o===i&&ke.ie?(u.empty().append('

     

    ').append(o),c.setStartAfter(u[0].firstChild.firstChild),c.setEndAfter(o)):(u.empty().append(Co).append(o).append(Co),c.setStart(u[0].firstChild,1),c.setEnd(u[0].lastChild,0)),u.css({top:r.getPos(e,t.getBody()).y}),u[0].focus();var l=n.getSel();return l.removeAllRanges(),l.addRange(c),c}(o,a.targetClone,i),l=Ae.fromDom(o);return W(Ms(Ae.fromDom(t.getBody()),"*[data-mce-selected]"),(function(t){Pe(l,t)||rr(t,u)})),r.getAttrib(o,u)||o.setAttribute(u,"1"),e=o,w(),c},y=function(t,e){if(!t)return null;if(t.collapsed){if(!h(t)){var n=e?1:-1,o=cl(n,i,t),a=o.getNode(!e);if(Fc(a))return m(n,a,!!e&&!o.isAtEnd(),!1);var s=o.getNode(e);if(Fc(s))return m(n,s,!e&&!o.isAtEnd(),!1)}return null}var u=t.startContainer,l=t.startOffset,d=t.endOffset;if(3===u.nodeType&&0===l&&Fx(u.parentNode)&&(u=u.parentNode,l=r.nodeIndex(u),u=u.parentNode),1!==u.nodeType)return null;if(d===l+1&&u===t.endContainer){var f=u.childNodes[l];if(c(f))return v(f)}return null},C=function(){e&&e.removeAttribute(u),Jr(Ae.fromDom(t.getBody()),"#"+s).each(vn),e=null},w=function(){a.hide()};return ke.ceFalse&&!Gv(t)&&function(){t.on("mouseup",(function(e){var n=f();n.collapsed&&vy(t,e.clientX,e.clientY)&&AC(t,n,!1).each(d)})),t.on("click",(function(e){var o=Ux(t,e.target);o&&(Fx(o)&&(e.preventDefault(),t.focus()),zx(o)&&r.isChildOf(o,n.getNode())&&C())})),t.on("blur NewBlock",C),t.on("ResizeWindow FullscreenStateChanged",a.reposition);var u=function(e,n){var i,a,s=r.getParent(e,o),u=r.getParent(n,o);return!b(s)&&(!(e===u||!r.isChildOf(s,u)||!1!==Fx(Ux(t,s)))||!r.isChildOf(u,s)&&(i=s,a=u,!(r.getParent(i,o)===r.getParent(a,o)))&&function(t){var e=t.firstChild;if(b(e))return!1;var n=Ou.before(e);if(Hn(n.getNode())&&1===t.childNodes.length)return!l(n);var r=xl(t).next(n);return r&&!l(r)}(s))};t.on("tap",(function(e){var n=e.target,r=Ux(t,n);Fx(r)?(e.preventDefault(),OC(t,r).each(y)):c(n)&&OC(t,n).each(y)}),!0),t.on("mousedown",(function(e){var o=e.target;if((o===i||"HTML"===o.nodeName||r.isChildOf(o,i))&&!1!==vy(t,e.clientX,e.clientY)){var a=Ux(t,o);if(a)Fx(a)?(e.preventDefault(),OC(t,a).each(y)):(C(),zx(a)&&e.shiftKey||tf(e.clientX,e.clientY,n.getRng())||(w(),n.placeCaretAt(e.clientX,e.clientY)));else if(c(o))OC(t,o).each(y);else if(!1===Fc(o)){C(),w();var s=Qw(i,e.clientX,e.clientY);if(s&&!u(o,s.node)){e.preventDefault();var l=m(1,s.node,s.before,!1);d(l),t.getBody().focus()}}}})),t.on("keypress",(function(t){of.modifierPressed(t)||Fx(n.getNode())&&t.preventDefault()})),t.on("GetSelectionRange",(function(t){var n=t.range;if(e){if(!e.parentNode)return void(e=null);(n=n.cloneRange()).selectNode(e),t.range=n}})),t.on("SetSelectionRange",(function(t){t.range=g(t.range);var e=y(t.range,t.forward);e&&(t.range=e)})),t.on("AfterSetSelectionRange",(function(t){var e,n=t.range,o=n.startContainer.parentNode;h(n)||"mcepastebin"===o.id||w(),e=o,r.hasClass(e,"mce-offscreen-selection")||C()})),t.on("copy",(function(t){var e,n=t.clipboardData;if(!t.isDefaultPrevented()&&t.clipboardData&&!ke.ie){var o=(e=r.get(s))?e.getElementsByTagName("*")[0]:e;o&&(t.preventDefault(),n.clearData(),n.setData("text/html",o.outerHTML),n.setData("text/plain",o.outerText||o.innerText))}})),jx(t),function(t){var e=Es((function(){if(!t.removed&&t.getBody().contains(document.activeElement)){var e=t.selection.getRng();if(e.collapsed){var n=LC(t,e,!1);t.selection.setRng(n)}}}),0);t.on("focus",(function(){e.throttle()})),t.on("blur",(function(){e.cancel()}))}(t),function(t){t.on("init",(function(){t.on("focusin",(function(e){var n=e.target;if(Yn(n)){var r=Qd(t.getBody(),n),o=qn(r)?r:n;t.selection.getNode()!==o&&OC(t,o).each((function(e){return t.selection.setRng(e)}))}}))}))}(t)}(),{showCaret:m,showBlockCaretContainer:function(t){t.hasAttribute("data-mce-caret")&&(Io(t),d(f()),n.scrollIntoView(t))},hideFakeCaret:w,destroy:function(){a.destroy(),e=null}}},Vx=function(t){var e,n,r=Ee.each,o=of.BACKSPACE,i=of.DELETE,a=t.dom,s=t.selection,u=t.parser,c=ke.gecko,l=ke.ie,d=ke.webkit,f="data:text/mce-internal,",m=l?"Text":"URL",p=function(e,n){try{t.getDoc().execCommand(e,!1,n)}catch(t){}},h=function(t){return t.isDefaultPrevented()},g=function(){var e=function(t){var e=a.create("body"),n=t.cloneContents();return e.appendChild(n),s.serializer.serialize(e,{format:"html"})};t.on("keydown",(function(n){var r,s,u=n.keyCode;if(!h(n)&&(u===i||u===o)){if(r=t.selection.isCollapsed(),s=t.getBody(),r&&!a.isEmpty(s))return;if(!r&&!function(n){var r=e(n),o=a.createRng();return o.selectNode(t.getBody()),r===e(o)}(t.selection.getRng()))return;n.preventDefault(),t.setContent(""),s.firstChild&&a.isBlock(s.firstChild)?t.selection.setCursorLocation(s.firstChild,0):t.selection.setCursorLocation(s,0),t.nodeChanged()}}))},v=function(){t.shortcuts.add("meta+a",null,"SelectAll")},b=function(){t.inline||a.bind(t.getDoc(),"mousedown mouseup",(function(e){var n;if(e.target===t.getDoc().documentElement)if(n=s.getRng(),t.getBody().focus(),"mousedown"===e.type){if(Eo(n.startContainer))return;s.placeCaretAt(e.clientX,e.clientY)}else s.setRng(n)}))},y=function(){Range.prototype.getClientRects||t.on("mousedown",(function(e){if(!h(e)&&"HTML"===e.target.nodeName){var n=t.getBody();n.blur(),oo.setEditorTimeout(t,(function(){n.focus()}))}}))},C=function(){t.on("click",(function(e){var n=e.target;/^(IMG|HR)$/.test(n.nodeName)&&"false"!==a.getContentEditableParent(n)&&(e.preventDefault(),t.selection.select(n),t.nodeChanged()),"A"===n.nodeName&&a.hasClass(n,"mce-item-anchor")&&(e.preventDefault(),s.select(n))}))},w=function(){t.on("keydown",(function(t){if(!h(t)&&t.keyCode===o&&s.isCollapsed()&&0===s.getRng().startOffset){var e=s.getNode().previousSibling;if(e&&e.nodeName&&"table"===e.nodeName.toLowerCase())return t.preventDefault(),!1}}))},k=function(){(function(t){return t.getParam("readonly")})(t)||t.on("BeforeExecCommand mousedown",(function(){p("StyleWithCSS",!1),p("enableInlineTableEditing",!1),gc(t)||p("enableObjectResizing",!1)}))},x=function(){t.on("SetContent ExecCommand",(function(t){"setcontent"!==t.type&&"mceInsertLink"!==t.command||r(a.select("a"),(function(t){var e=t.parentNode,n=a.getRoot();if(e.lastChild===t){for(;e&&!a.isBlock(e);){if(e.parentNode.lastChild!==e||e===n)return;e=e.parentNode}a.add(e,"br",{"data-mce-bogus":1})}}))}))},D=function(){t.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")},S=function(){t.inline||t.on("keydown",(function(){document.activeElement===document.body&&t.getWin().focus()}))},T=function(){t.inline||(t.contentStyles.push("body {min-height: 150px}"),t.on("click",(function(e){var n;if("HTML"===e.target.nodeName){if(ke.ie>11)return void t.getBody().focus();n=t.selection.getRng(),t.getBody().focus(),t.selection.setRng(n),t.selection.normalize(),t.nodeChanged()}})))},E=function(){ke.mac&&t.on("keydown",(function(e){!of.metaKeyPressed(e)||e.shiftKey||37!==e.keyCode&&39!==e.keyCode||(e.preventDefault(),t.selection.getSel().modify("move",37===e.keyCode?"backward":"forward","lineboundary"))}))},O=function(){t.on("click",(function(t){var e=t.target;do{if("A"===e.tagName)return void t.preventDefault()}while(e=e.parentNode)})),t.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")},A=function(){t.on("init",(function(){t.dom.bind(t.getBody(),"submit",(function(t){t.preventDefault()}))}))},L=function(){t.on("dragstart",(function(e){!function(e){var n,r;e.dataTransfer&&(t.selection.isCollapsed()&&"IMG"===e.target.tagName&&s.select(e.target),(n=t.selection.getContent()).length>0&&(r=f+escape(t.id)+","+escape(n),e.dataTransfer.setData(m,r)))}(e)})),t.on("drop",(function(e){if(!h(e)){var n=function(t){var e;return t.dataTransfer&&(e=t.dataTransfer.getData(m))&&e.indexOf(f)>=0?(e=e.substr(f.length).split(","),{id:unescape(e[0]),html:unescape(e[1])}):null}(e);if(n&&n.id!==t.id){e.preventDefault();var r=cf(e.x,e.y,t.getDoc());s.setRng(r),o=n.html,i=!0,t.queryCommandSupported("mceInsertClipboardContent")?t.execCommand("mceInsertClipboardContent",!1,{content:o,internal:i}):t.execCommand("mceInsertContent",!1,o)}}var o,i}))},N=_;return Gv(t)?(d&&(b(),C(),A(),v(),ke.iOS&&(S(),T(),O())),c&&(y(),k(),D(),E())):(t.on("keydown",(function(e){var n,r;if(!h(e)&&e.keyCode===of.BACKSPACE){var o=(n=s.getRng()).startContainer,i=n.startOffset,u=a.getRoot();if(r=o,n.collapsed&&0===i){for(;r&&r.parentNode&&r.parentNode.firstChild===r&&r.parentNode!==u;)r=r.parentNode;"BLOCKQUOTE"===r.tagName&&(t.formatter.toggle("blockquote",null,r),(n=a.createRng()).setStart(o,0),n.setEnd(o,0),s.setRng(n))}}})),g(),ke.windowsPhone||t.on("keyup focusin mouseup",(function(t){of.modifierPressed(t)||s.normalize()}),!0),d&&(b(),C(),nc(t)&&t.on("init",(function(){p("DefaultParagraphSeparator",nc(t))})),A(),w(),u.addNodeFilter("br",(function(t){for(var e=t.length;e--;)"Apple-interchange-newline"===t[e].attr("class")&&t[e].remove()})),ke.iOS?(S(),T(),O()):v()),ke.ie>=11&&(T(),w()),ke.ie&&(v(),p("AutoUrlDetect",!1),L()),c&&(t.on("keydown",(function(e){if(!h(e)&&e.keyCode===o){if(!t.getBody().getElementsByTagName("hr").length)return;if(s.isCollapsed()&&0===s.getRng().startOffset){var n=s.getNode(),r=n.previousSibling;if("HR"===n.nodeName)return a.remove(n),void e.preventDefault();r&&r.nodeName&&"hr"===r.nodeName.toLowerCase()&&(a.remove(r),e.preventDefault())}}})),y(),e=function(){var e=a.getAttribs(s.getStart().cloneNode(!1));return function(){var n=s.getStart();n!==t.getBody()&&(a.setAttrib(n,"style",null),r(e,(function(t){n.setAttributeNode(t.cloneNode(!0))})))}},n=function(){return!s.isCollapsed()&&a.getParent(s.getStart(),a.isBlock)!==a.getParent(s.getEnd(),a.isBlock)},t.on("keypress",(function(r){var o;if(!h(r)&&(8===r.keyCode||46===r.keyCode)&&n())return o=e(),t.getDoc().execCommand("delete",!1,null),o(),r.preventDefault(),!1})),a.bind(t.getDoc(),"cut",(function(r){var o;!h(r)&&n()&&(o=e(),oo.setEditorTimeout(t,(function(){o()})))})),k(),x(),D(),E(),w())),{refreshContentEditable:N,isHidden:function(){if(!c||t.removed)return!1;var e=t.selection.getSel();return!e||!e.rangeCount||0===e.rangeCount}}},Wx=gs.DOM,qx=function(t){return t.inline?t.getElement().nodeName.toLowerCase():void 0},Kx=function(t){return vt(t,(function(t){return!1===v(t)}))},Yx=function(t){var e=t.settings,n=t.editorUpload.blobCache;return Kx({allow_conditional_comments:e.allow_conditional_comments,allow_html_data_urls:e.allow_html_data_urls,allow_svg_data_urls:e.allow_svg_data_urls,allow_html_in_named_anchor:e.allow_html_in_named_anchor,allow_script_urls:e.allow_script_urls,allow_unsafe_link_target:e.allow_unsafe_link_target,convert_fonts_to_spans:e.convert_fonts_to_spans,fix_list_elements:e.fix_list_elements,font_size_legacy_values:e.font_size_legacy_values,forced_root_block:e.forced_root_block,forced_root_block_attrs:e.forced_root_block_attrs,padd_empty_with_br:e.padd_empty_with_br,preserve_cdata:e.preserve_cdata,remove_trailing_brs:e.remove_trailing_brs,inline_styles:e.inline_styles,root_name:qx(t),validate:!0,blob_cache:n,document:t.getDoc(),images_dataimg_filter:e.images_dataimg_filter})},Xx=function(t){var e=t.dom.getRoot();t.inline||Ud(t)&&t.selection.getStart(!0)!==e||Il(e).each((function(e){var n=e.getNode(),r=Rn(n)?Il(n).getOr(e):e;ke.browser.isIE()?function(t,e){var n=Ae.fromDom(t.getBody()),r=(rm(t)?B.from(e):B.none()).map(om).filter(nm(n));t.bookmark=r.isSome()?r:t.bookmark}(t,r.toRange()):t.selection.setRng(r.toRange())}))},Zx=function(t){t.bindPendingEventDelegates(),t.initialized=!0,function(t){t.fire("Init")}(t),t.focus(!0),Xx(t),t.nodeChanged({initial:!0}),t.execCallback("init_instance_callback",t),function(t){t.settings.auto_focus&&oo.setEditorTimeout(t,(function(){var e;(e=!0===t.settings.auto_focus?t:t.editorManager.get(t.settings.auto_focus)).destroyed||e.focus()}),100)}(t)},Gx=function(t){return t.inline?t.ui.styleSheetLoader:t.dom.styleSheetLoader},Jx=function(t){var e=Gx(t),n=hc(t),r=t.contentCSS,o=function(){e.unloadAll(r),t.inline||t.ui.styleSheetLoader.unloadAll(n)},i=function(){t.removed?o():t.on("remove",o)};if(t.contentStyles.length>0){var a="";Ee.each(t.contentStyles,(function(t){a+=t+"\r\n"})),t.dom.addStyle(a)}var s=to.all(function(t,e,n){var r=[new to((function(n,r){return Gx(t).loadAll(e,n,r)}))];return t.inline?r:r.concat([new to((function(e,r){return t.ui.styleSheetLoader.loadAll(n,e,r)}))])}(t,r,n)).then(i).catch(i);return t.settings.content_style&&function(t,e){var n=Ae.fromDom(t.getBody()),r=un(sn(n)),o=Ae.fromTag("style");Qn(o,"type","text/css"),pn(o,Ae.fromText(e)),pn(r,o),t.on("remove",(function(){vn(o)}))}(t,t.settings.content_style),s},Qx=function(t){var e=t.settings,n=t.getDoc(),r=t.getBody();!function(t){t.fire("PreInit")}(t),e.browser_spellcheck||e.gecko_spellcheck||(n.body.spellcheck=!1,Wx.setAttrib(r,"spellcheck","false")),t.quirks=Vx(t),function(t){t.fire("PostRender")}(t);var o=function(t){return t.getParam("directionality",Ds.isRtl()?"rtl":void 0)}(t);void 0!==o&&(r.dir=o),e.protect&&t.on("BeforeSetContent",(function(t){Ee.each(e.protect,(function(e){t.content=t.content.replace(e,(function(t){return"\x3c!--mce:protected "+escape(t)+"--\x3e"}))}))})),t.on("SetContent",(function(){t.addVisual(t.getBody())})),t.on("compositionstart compositionend",(function(e){t.composing="compositionstart"===e.type}))},tD=function(t){!0!==t.removed&&(!function(t){Gv(t)||t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"})}(t),Zx(t))},eD=function(t,e){var n=t.settings,r=t.getElement(),o=t.getDoc();n.inline||(t.getElement().style.visibility=t.orgVisibility),e||t.inline||(o.open(),o.write(t.iframeHTML),o.close()),t.inline&&(Wx.addClass(r,"mce-content-body"),t.contentDocument=o=document,t.contentWindow=window,t.bodyElement=r,t.contentAreaContainer=r);var i=t.getBody();i.disabled=!0,t.readonly=!!n.readonly,t.readonly||(t.inline&&"static"===Wx.getStyle(i,"position",!0)&&(i.style.position="relative"),i.contentEditable=t.getParam("content_editable_state",!0)),i.disabled=!1,t.editorUpload=My(t),t.schema=Oi(n),t.dom=gs(o,{keep_values:!0,url_converter:t.convertURL,url_converter_scope:t,hex_colors:n.force_hex_style_colors,update_styles:!0,root_element:t.inline?t.getBody():null,collect:function(){return t.inline},schema:t.schema,contentCssCors:dc(t),referrerPolicy:fc(t),onSetAttrib:function(e){t.fire("SetAttrib",e)}}),t.parser=function(t){var e=Eb(Yx(t),t.schema);return e.addAttributeFilter("src,href,style,tabindex",(function(e,n){for(var r,o,i=e.length,a=t.dom,s="data-mce-"+n;i--;)if((o=(r=e[i]).attr(n))&&!r.attr(s)){if(0===o.indexOf("data:")||0===o.indexOf("blob:"))continue;"style"===n?((o=a.serializeStyle(a.parseStyle(o),r.name)).length||(o=null),r.attr(s,o),r.attr(n,o)):"tabindex"===n?(r.attr(s,o),r.attr(n,null)):r.attr(s,t.convertURL(o,n,r.name))}})),e.addNodeFilter("script",(function(t){for(var e=t.length;e--;){var n=t[e],r=n.attr("type")||"no/type";0!==r.indexOf("mce-")&&n.attr("type","mce-"+r)}})),t.settings.preserve_cdata&&e.addNodeFilter("#cdata",(function(e){for(var n=e.length;n--;){var r=e[n];r.type=8,r.name="#comment",r.value="[CDATA["+t.dom.encode(r.value)+"]]"}})),e.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",(function(e){for(var n=e.length,r=t.schema.getNonEmptyElements();n--;){var o=e[n];o.isEmpty(r)&&0===o.getAll("br").length&&(o.append(new $m("br",1)).shortEnded=!0)}})),e}(t),t.serializer=$b(function(t){var e=t.settings;return At(At({},Yx(t)),Kx({url_converter:e.url_converter,url_converter_scope:e.url_converter_scope,element_format:e.element_format,entities:e.entities,entity_encoding:e.entity_encoding,indent:e.indent,indent_after:e.indent_after,indent_before:e.indent_before,block_elements:e.block_elements,boolean_attributes:e.boolean_attributes,custom_elements:e.custom_elements,extended_valid_elements:e.extended_valid_elements,invalid_elements:e.invalid_elements,invalid_styles:e.invalid_styles,move_caret_before_on_enter_elements:e.move_caret_before_on_enter_elements,non_empty_elements:e.non_empty_elements,schema:e.schema,self_closing_elements:e.self_closing_elements,short_ended_elements:e.short_ended_elements,special:e.special,text_block_elements:e.text_block_elements,text_inline_elements:e.text_inline_elements,valid_children:e.valid_children,valid_classes:e.valid_classes,valid_elements:e.valid_elements,valid_styles:e.valid_styles,verify_html:e.verify_html,whitespace_elements:e.whitespace_elements}))}(t),t),t.selection=lb(t.dom,t.getWin(),t.serializer,t),t.annotator=Gd(t),t.formatter=Wy(t),t.undoManager=Ky(t),t._nodeChangeDispatcher=new Dx(t),t._selectionOverrides=Hx(t),R_(t),Sx(t),Gv(t)||Ex(t);var a=function(t){return Gv(t)?ws(null):xx(t)}(t);P_(t,a),function(t){nc(t)&&t.on("NodeChange",E(z_,t))}(t),Jy(t);var s=Jv(t);Qx(t),s.fold((function(){Jx(t).then((function(){return tD(t)}))}),(function(e){t.setProgressState(!0),Jx(t).then((function(){e().then((function(e){t.setProgressState(!1),tD(t)}),(function(e){t.notificationManager.open({type:"error",text:String(e)}),tD(t)}))}))}))},nD=gs.DOM,rD=function(t){var e=function(t){return t.getParam("doctype","")}(t)+"";(function(t){return t.getParam("document_base_url","")})(t)!==t.documentBaseUrl&&(e+=''),e+='';var n=function(t){return tc(t,"body_id","tinymce")}(t),r=function(t){return tc(t,"body_class","")}(t),o=t.translate(function(t){return t.getParam("iframe_aria_text","Rich Text Area. Press ALT-0 for help.","string")}(t));return ec(t)&&(e+=''),e+='
    '},oD=function(t,e){var n,r,o,i,a=t.translate("Rich Text Area"),s=(n=t.id,r=a,e.height,o=function(t){return t.getParam("iframe_attrs",{})}(t),i=Ae.fromTag("iframe"),tr(i,o),tr(i,{id:n+"_ifr",frameBorder:"0",allowTransparency:"true",title:r}),Ps(i,"tox-edit-area__iframe"),i).dom;s.onload=function(){s.onload=null,t.fire("load")};var u=function(t,e){if(document.domain!==window.location.hostname&&ke.browser.isIE()){var n=Py("mce");t[n]=function(){eD(t)};var r='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.'+n+"(true);})()";return nD.setAttrib(e,"src",r),!0}return!1}(t,s);return t.contentAreaContainer=e.iframeContainer,t.iframeElement=s,t.iframeHTML=rD(t),nD.add(e.iframeContainer,s),u},iD=gs.DOM,aD=function(t,e,n){var r=Cy.get(n),o=Cy.urls[n]||t.documentBaseUrl.replace(/\/$/,"");if(n=Ee.trim(n),r&&-1===Ee.inArray(e,n)){if(Ee.each(Cy.dependencies(n),(function(n){aD(t,e,n)})),t.plugins[n])return;try{var i=new r(t,o,t.$);t.plugins[n]=i,i.init&&(i.init(t,o),e.push(n))}catch(e){!function(t,e,n){var r=Ds.translate(["Failed to initialize plugin: {0}",e]);ef(t,"PluginLoadError",{message:r}),Ey(r,n),xy(t,r)}(t,n,e)}}},sD=function(t){return t.replace(/^\-/,"")},uD=function(t){return{editorContainer:t,iframeContainer:t,api:{}}},cD=function(t){var e=t.getElement();return t.inline?uD(null):function(t){var e=iD.create("div");return iD.insertAfter(e,t),uD(e)}(e)},lD=function(t){var e=t.getElement();return t.orgDisplay=e.style.display,f(bc(t))?function(t){return t.theme.renderUI()}(t):C(bc(t))?function(t){var e=t.getElement(),n=bc(t)(t,e);return n.editorContainer.nodeType&&(n.editorContainer.id=n.editorContainer.id||t.id+"_parent"),n.iframeContainer&&n.iframeContainer.nodeType&&(n.iframeContainer.id=n.iframeContainer.id||t.id+"_iframecontainer"),n.height=n.iframeHeight?n.iframeHeight:e.offsetHeight,n}(t):cD(t)},dD=function(t){t.fire("ScriptsLoaded"),function(t){var e=Ee.trim(ac(t)),n=t.ui.registry.getAll().icons,r=At(At({},ly.get("default").icons),ly.get(e).icons);ft(r,(function(e,r){Ct(n,r)||t.ui.registry.addIcon(r,e)}))}(t),function(t){var e=bc(t);if(f(e)){t.settings.theme=sD(e);var n=wy.get(e);t.theme=new n(t,wy.urls[e]),t.theme.init&&t.theme.init(t,wy.urls[e]||t.documentBaseUrl.replace(/\/$/,""),t.$)}else t.theme={}}(t),function(t){var e=[];Ee.each(_c(t).split(/[ ,]/),(function(n){aD(t,e,sD(n))}))}(t);var e=lD(t);!function(t,e){var n={show:B.from(e.show).getOr(_),hide:B.from(e.hide).getOr(_),disable:B.from(e.disable).getOr(_),isDisabled:B.from(e.isDisabled).getOr(N),enable:function(){t.mode.isReadOnly()||B.from(e.enable).map(L)}};t.ui=At(At({},t.ui),n)}(t,B.from(e.api).getOr({}));var n={editorContainer:e.editorContainer,iframeContainer:e.iframeContainer};return t.editorContainer=n.editorContainer?n.editorContainer:null,Ly(t),t.inline?eD(t):function(t,e){var n=oD(t,e);e.editorContainer&&(nD.get(e.editorContainer).style.display=t.orgDisplay,t.hidden=nD.isHidden(e.editorContainer)),t.getElement().style.display="none",nD.setAttrib(t.id,"aria-hidden","true"),n||eD(t)}(t,n)},fD=gs.DOM,mD=function(t){return"-"===t.charAt(0)},pD=function(t,e){var n=mc(e),r=function(t){return t.getParam("language_url","","string")}(e);if(!1===Ds.hasCode(n)&&"en"!==n){var o=""!==r?r:e.editorManager.baseURL+"/langs/"+n+".js";t.add(o,_,void 0,(function(){!function(t,e,n){Dy(t,"LanguageLoadError",Sy("language",e,n))}(e,o,n)}))}},hD=function(t,e,n){return B.from(e).filter((function(t){return t.length>0&&!ly.has(t)})).map((function(e){return{url:t.editorManager.baseURL+"/icons/"+e+"/icons"+n+".js",name:B.some(e)}}))},gD=function(t,e,n){var r=hD(e,"default",n),o=function(t){return B.from(function(t){return t.getParam("icons_url","","string")}(t)).filter((function(t){return t.length>0})).map((function(t){return{url:t,name:B.none()}}))}(e).orThunk((function(){return hD(e,ac(e),"")}));W(function(t){for(var e=[],n=function(t){e.push(t)},r=0;r=1&&n<=7){var r=function(t){return Ee.explode(t.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))}(t),o=function(t){return Ee.explode(t.getParam("font_size_classes",""))}(t);return o?o[n-1]||e:r[n-1]||e}return e}return e},OD=function(t){var e=t.split(/\s*,\s*/);return V(e,(function(t){return-1===t.indexOf(" ")||Mt(t,'"')||Mt(t,"'")?t:"'"+t+"'"})).join(",")},AD=function(t,e){var n=function(t){if("string"!=typeof t){var e=Ee.extend({paste:t.paste,data:{paste:t.paste}},t);return{content:t.content,details:e}}return{content:t,details:{}}}(e);!function(t,e,n){Qv(t).editor.insertContent(e,n)}(t,n.content,n.details)},LD=Ee.each,ND=Ee.map,$D=Ee.inArray,PD=function(){function t(t){this.commands={state:{},exec:{},value:{}},this.editor=t,this.setupCommands(t)}return t.prototype.execCommand=function(t,e,n,r){var o,i=!1,a=this;if(!a.editor.removed){var s;if("mcefocus"!==t.toLowerCase()&&(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(t)||r&&r.skip_focus?(s=a.editor,um(s).each((function(t){return s.selection.setRng(t)}))):a.editor.focus()),(r=a.editor.fire("BeforeExecCommand",{command:t,ui:e,value:n})).isDefaultPrevented())return!1;var u=t.toLowerCase();if(o=a.commands.exec[u])return o(u,e,n),a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0;if(LD(this.editor.plugins,(function(r){if(r.execCommand&&r.execCommand(t,e,n))return a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),i=!0,!1})),i)return i;if(a.editor.theme&&a.editor.theme.execCommand&&a.editor.theme.execCommand(t,e,n))return a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0;try{i=a.editor.getDoc().execCommand(t,e,n)}catch(t){}return!!i&&(a.editor.fire("ExecCommand",{command:t,ui:e,value:n}),!0)}},t.prototype.queryCommandState=function(t){var e;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(t=t.toLowerCase(),e=this.commands.state[t])return e(t);try{return this.editor.getDoc().queryCommandState(t)}catch(t){}return!1}},t.prototype.queryCommandValue=function(t){var e;if(!this.editor.quirks.isHidden()&&!this.editor.removed){if(t=t.toLowerCase(),e=this.commands.value[t])return e(t);try{return this.editor.getDoc().queryCommandValue(t)}catch(t){}}},t.prototype.addCommands=function(t,e){void 0===e&&(e="exec");var n=this;LD(t,(function(t,r){LD(r.toLowerCase().split(","),(function(r){n.commands[e][r]=t}))}))},t.prototype.addCommand=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.exec[t]=function(t,o,i,a){return e.call(n||r.editor,o,i,a)}},t.prototype.queryCommandSupported=function(t){if(t=t.toLowerCase(),this.commands.exec[t])return!0;try{return this.editor.getDoc().queryCommandSupported(t)}catch(t){}return!1},t.prototype.addQueryStateHandler=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.state[t]=function(){return e.call(n||r.editor)}},t.prototype.addQueryValueHandler=function(t,e,n){var r=this;t=t.toLowerCase(),this.commands.value[t]=function(){return e.call(n||r.editor)}},t.prototype.hasCustomCommand=function(t){return t=t.toLowerCase(),!!this.commands.exec[t]},t.prototype.execNativeCommand=function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=null),this.editor.getDoc().execCommand(t,e,n)},t.prototype.isFormatMatch=function(t){return this.editor.formatter.match(t)},t.prototype.toggleFormat=function(t,e){this.editor.formatter.toggle(t,e),this.editor.nodeChanged()},t.prototype.storeSelection=function(t){this.selectionBookmark=this.editor.selection.getBookmark(t)},t.prototype.restoreSelection=function(){this.editor.selection.moveToBookmark(this.selectionBookmark)},t.prototype.setupCommands=function(t){var e=this;this.addCommands({"mceResetDesignMode,mceBeginUndoLevel":_,"mceEndUndoLevel,mceAddUndoLevel":function(){t.undoManager.add()},mceFocus:function(e,n,r){km(t,r)},"Cut,Copy,Paste":function(n){var r,o=t.getDoc();try{e.execNativeCommand(n)}catch(t){r=!0}if("paste"!==n||o.queryCommandEnabled(n)||(r=!0),r||!o.queryCommandSupported(n)){var i=t.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");ke.mac&&(i=i.replace(/Ctrl\+/g,"⌘+")),t.notificationManager.open({text:i,type:"error"})}},unlink:function(){if(t.selection.isCollapsed()){var e=t.dom.getParent(t.selection.getStart(),"a");e&&t.dom.remove(e,!0)}else t.formatter.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(n){var r=n.substring(7);"full"===r&&(r="justify"),LD("left,center,right,justify".split(","),(function(e){r!==e&&t.formatter.remove("align"+e)})),"none"!==r&&e.toggleFormat("align"+r)},"InsertUnorderedList,InsertOrderedList":function(n){var r;e.execNativeCommand(n);var o=t.dom.getParent(t.selection.getNode(),"ol,ul");o&&(r=o.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(r.nodeName)&&(e.storeSelection(),t.dom.split(r,o),e.restoreSelection()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(t){e.toggleFormat(t)},"ForeColor,HiliteColor":function(t,n,r){e.toggleFormat(t,{value:r})},FontName:function(e,n,r){!function(t,e){var n=ED(t,e);t.formatter.toggle("fontname",{value:OD(n)}),t.nodeChanged()}(t,r)},FontSize:function(e,n,r){!function(t,e){t.formatter.toggle("fontsize",{value:ED(t,e)}),t.nodeChanged()}(t,r)},LineHeight:function(e,n,r){!function(t,e){t.formatter.toggle("lineheight",{value:String(e)}),t.nodeChanged()}(t,r)},Lang:function(t,n,r){e.toggleFormat(t,{value:r.code,customValue:r.customCode})},RemoveFormat:function(e){t.formatter.remove(e)},mceBlockQuote:function(){e.toggleFormat("blockquote")},FormatBlock:function(t,n,r){return e.toggleFormat(r||"p")},mceCleanup:function(){var e=t.selection.getBookmark();t.setContent(t.getContent()),t.selection.moveToBookmark(e)},mceRemoveNode:function(n,r,o){var i=o||t.selection.getNode();i!==t.getBody()&&(e.storeSelection(),t.dom.remove(i,!0),e.restoreSelection())},mceSelectNodeDepth:function(e,n,r){var o=0;t.dom.getParent(t.selection.getNode(),(function(e){if(1===e.nodeType&&o++===r)return t.selection.select(e),!1}),t.getBody())},mceSelectNode:function(e,n,r){t.selection.select(r)},mceInsertContent:function(e,n,r){AD(t,r)},mceInsertRawHTML:function(e,n,r){t.selection.setContent("tiny_mce_marker");var o=t.getContent();t.setContent(o.replace(/tiny_mce_marker/g,(function(){return r})))},mceInsertNewLine:function(e,n,r){ux(t,r)},mceToggleFormat:function(t,n,r){e.toggleFormat(r)},mceSetContent:function(e,n,r){t.setContent(r)},"Indent,Outdent":function(e){L_(t,e)},mceRepaint:_,InsertHorizontalRule:function(){t.execCommand("mceInsertContent",!1,"
    ")},mceToggleVisualAid:function(){t.hasVisual=!t.hasVisual,t.addVisual()},mceReplaceContent:function(e,n,r){t.execCommand("mceInsertContent",!1,r.replace(/\{\$selection\}/g,t.selection.getContent({format:"text"})))},mceInsertLink:function(e,n,r){"string"==typeof r&&(r={href:r});var o=t.dom.getParent(t.selection.getNode(),"a");r.href=r.href.replace(/ /g,"%20"),o&&r.href||t.formatter.remove("link"),r.href&&t.formatter.apply("link",r,o)},selectAll:function(){var e=t.dom.getParent(t.selection.getStart(),Wn);if(e){var n=t.dom.createRng();n.selectNodeContents(e),t.selection.setRng(n)}},mceNewDocument:function(){t.setContent("")},InsertLineBreak:function(e,n,r){return Xk(t,r),!0}});var n=function(e){return function(){var n=t.selection,r=n.isCollapsed()?[t.dom.getParent(n.getNode(),t.dom.isBlock)]:n.getSelectedBlocks(),o=ND(r,(function(n){return!!t.formatter.matchNode(n,e)}));return-1!==$D(o,!0)}};e.addCommands({JustifyLeft:n("alignleft"),JustifyCenter:n("aligncenter"),JustifyRight:n("alignright"),JustifyFull:n("alignjustify"),"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(t){return e.isFormatMatch(t)},mceBlockQuote:function(){return e.isFormatMatch("blockquote")},Outdent:function(){return E_(t)},"InsertUnorderedList,InsertOrderedList":function(e){var n=t.dom.getParent(t.selection.getNode(),"ul,ol");return n&&("insertunorderedlist"===e&&"UL"===n.tagName||"insertorderedlist"===e&&"OL"===n.tagName)}},"state"),e.addCommands({Undo:function(){t.undoManager.undo()},Redo:function(){t.undoManager.redo()}}),e.addQueryValueHandler("FontName",(function(){return function(t){return TD(t,(function(e){return xD(t.getBody(),e.dom)})).getOr("")}(t)}),this),e.addQueryValueHandler("FontSize",(function(){return function(t){return TD(t,(function(e){return kD(t.getBody(),e.dom)})).getOr("")}(t)}),this),e.addQueryValueHandler("LineHeight",(function(){return function(t){return TD(t,(function(e){var n=Ae.fromDom(t.getBody()),r=fg(e,(function(t){return sr(t,"line-height")}),E(Pe,n));return r.getOrThunk((function(){var t=parseFloat(ir(e,"line-height")),n=parseFloat(ir(e,"font-size"));return String(t/n)}))})).getOr("")}(t)}),this)},t}(),ID="data-mce-contenteditable",RD=function(t,e,n){var r,o;Rs(t,e)&&!1===n?(o=e,Ls(r=t)?r.dom.classList.remove(o):$s(r,o),Is(r)):n&&Ps(t,e)},BD=function(t,e,n){try{t.getDoc().execCommand(e,!1,String(n))}catch(t){}},MD=function(t,e){t.dom.contentEditable=e?"true":"false"},jD=function(t,e){var n=Ae.fromDom(t.getBody());RD(n,"mce-content-readonly",e),e?(t.selection.controlSelection.hideResizeRect(),t._selectionOverrides.hideFakeCaret(),function(t){B.from(t.selection.getNode()).each((function(t){t.removeAttribute("data-mce-selected")}))}(t),t.readonly=!0,MD(n,!1),W(Ms(n,'*[contenteditable="true"]'),(function(t){Qn(t,ID,"true"),MD(t,!1)}))):(t.readonly=!1,MD(n,!0),function(t){W(Ms(t,'*[data-mce-contenteditable="true"]'),(function(t){rr(t,ID),MD(t,!0)}))}(n),BD(t,"StyleWithCSS",!1),BD(t,"enableInlineTableEditing",!1),BD(t,"enableObjectResizing",!1),wm(t)&&t.focus(),function(t){t.selection.setRng(t.selection.getRng())}(t),t.nodeChanged())},zD=function(t){return t.readonly},FD=function(t){t.parser.addAttributeFilter("contenteditable",(function(e){zD(t)&&W(e,(function(t){t.attr(ID,t.attr("contenteditable")),t.attr("contenteditable","false")}))})),t.serializer.addAttributeFilter(ID,(function(e){zD(t)&&W(e,(function(t){t.attr("contenteditable",t.attr(ID))}))})),t.serializer.addTempAttr(ID)},UD=function(t,e){if(function(t){return"click"===t.type}(e)&&!of.metaKeyPressed(e)){var n=Ae.fromDom(e.target);(function(t,e){return Qr(e,"a",(function(e){return Pe(e,Ae.fromDom(t.getBody()))})).bind((function(t){return nr(t,"href")}))})(t,n).each((function(n){if(e.preventDefault(),/^#/.test(n)){var r=t.dom.select(n+',[name="'+((Mt(o=n,i="#")?function(t,e){return t.substring(e)}(o,i.length):o)+'"]'));r.length&&t.selection.scrollIntoView(r[0],!0)}else window.open(n,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes");var o,i}))}},HD=Ee.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," "),VD=function(){function t(t){this.bindings={},this.settings=t||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||N}return t.isNative=function(t){return!!HD[t.toLowerCase()]},t.prototype.fire=function(t,e){var n=t.toLowerCase(),r=Pi(n,e||{},this.scope);this.settings.beforeFire&&this.settings.beforeFire(r);var o=this.bindings[n];if(o)for(var i=0,a=o.length;i"),iS);return o[o.length-1]=Ee.extend(o[o.length-1],{func:n,scope:r||this.editor}),Ee.extend(o[0],{desc:this.editor.translate(e),subpatterns:o.slice(1)})},t.prototype.hasModifier=function(t){return t.altKey||t.ctrlKey||t.metaKey},t.prototype.isFunctionKey=function(t){return"keydown"===t.type&&t.keyCode>=112&&t.keyCode<=123},t.prototype.matchShortcut=function(t,e){return!!e&&(e.ctrl===t.ctrlKey&&e.meta===t.metaKey&&(e.alt===t.altKey&&e.shift===t.shiftKey&&(!!(t.keyCode===e.keyCode||t.charCode&&t.charCode===e.charCode)&&(t.preventDefault(),!0))))},t.prototype.executeShortcutAction=function(t){return t.func?t.func.call(t.scope):null},t}(),sS=function(){var t=function(){var t={},e={},n={},r={},o={},i={},a={},s=function(t,e){return function(n,r){return t[n.toLowerCase()]=At(At({},r),{type:e})}};return{addButton:s(t,"button"),addGroupToolbarButton:s(t,"grouptoolbarbutton"),addToggleButton:s(t,"togglebutton"),addMenuButton:s(t,"menubutton"),addSplitButton:s(t,"splitbutton"),addMenuItem:s(e,"menuitem"),addNestedMenuItem:s(e,"nestedmenuitem"),addToggleMenuItem:s(e,"togglemenuitem"),addAutocompleter:s(n,"autocompleter"),addContextMenu:s(o,"contextmenu"),addContextToolbar:s(i,"contexttoolbar"),addContextForm:s(i,"contextform"),addSidebar:s(a,"sidebar"),addIcon:function(t,e){return r[t.toLowerCase()]=e},getAll:function(){return{buttons:t,menuItems:e,icons:r,popups:n,contextMenus:o,contextToolbars:i,sidebars:a}}}}();return{addAutocompleter:t.addAutocompleter,addButton:t.addButton,addContextForm:t.addContextForm,addContextMenu:t.addContextMenu,addContextToolbar:t.addContextToolbar,addIcon:t.addIcon,addMenuButton:t.addMenuButton,addMenuItem:t.addMenuItem,addNestedMenuItem:t.addNestedMenuItem,addSidebar:t.addSidebar,addSplitButton:t.addSplitButton,addToggleButton:t.addToggleButton,addGroupToolbarButton:t.addGroupToolbarButton,addToggleMenuItem:t.addToggleMenuItem,getAll:t.getAll}},uS=gs.DOM,cS=Ee.extend,lS=Ee.each,dS=Ee.resolve,fS=ke.ie,mS=function(){function t(t,e,n){var r=this;this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.editorManager=n,this.documentBaseUrl=n.documentBaseURL,cS(this,GD),this.settings=sy(this,t,this.documentBaseUrl,n.defaultSettings,e),this.settings.suffix&&(n.suffix=this.settings.suffix),this.suffix=n.suffix,this.settings.base_url&&n._setBaseUrl(this.settings.base_url),this.baseUri=n.baseURI,this.settings.referrer_policy&&(Cs.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),gs.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),Ss.languageLoad=this.settings.language_load,Ss.baseURL=n.baseURL,this.id=t,this.setDirty(!1),this.documentBaseURI=new Fm(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new aS(this),this.editorCommands=new PD(this),this.settings.cache_suffix&&(ke.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:sS(),styleSheetLoader:void 0,show:_,hide:_,enable:_,disable:_,isDisabled:N};var o=tS(this);this.mode=o,this.setMode=o.set,n.fire("SetupEditor",{editor:this}),this.execCallback("setup",this),this.$=cs.overrideDefaults((function(){return{context:r.inline?r.getBody():r.getDoc(),element:r.getBody()}}))}return t.prototype.render=function(){bD(this)},t.prototype.focus=function(t){this.execCommand("mceFocus",!1,t)},t.prototype.hasFocus=function(){return Cm(this)},t.prototype.execCallback=function(t){for(var e=[],n=1;n0?wS[0]:null),SS.focusedEditor===t&&(SS.focusedEditor=null),e.length!==wS.length},DS="CSS1Compat"!==document.compatMode,SS=At(At({},qD),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:cs,majorVersion:"5",minorVersion:"10.2",releaseDate:"2021-11-17",editors:CS,i18n:Ds,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var t,e,n=this,r="";e=Fm.getDocumentBaseUrl(document.location),/^[^:]+:\/\/\/?[^\/]+\//.test(e)&&(e=e.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(e)||(e+="/"));var o,i=window.tinymce||window.tinyMCEPreInit;if(i)t=i.base||i.baseURL,r=i.suffix;else{for(var a=document.getElementsByTagName("script"),s=0;s0&&gS(hS(n),(function(t){var n=pS.get(t);n?e.push(n):gS(document.forms,(function(n){gS(n.elements,(function(n){n.name===t&&(t="mce_editor_"+bS++,pS.setAttrib(n,"id",t),e.push(n))}))}))}));break;case"textareas":case"specific_textareas":gS(pS.select("textarea"),(function(n){t.editor_deselector&&i(n,t.editor_deselector)||t.editor_selector&&!i(n,t.editor_selector)||e.push(n)}))}return e}(t)),t.types?gS(t.types,(function(n){Ee.each(e,(function(e){return!pS.is(e,n.selector)||(l(o(e),vS({},t,n),e),!1)}))})):(Ee.each(e,(function(t){var e;(e=n.get(t.id))&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(xS(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null)})),0===(e=Ee.grep(e,(function(t){return!n.get(t.id)}))).length?a([]):gS(e,(function(e){!function(t,e){return t.inline&&e.tagName.toLowerCase()in r}(t,e)?l(o(e),t,e):Ey("Could not initialize inline editor on invalid inline target element",e)})))};return n.settings=t,pS.bind(window,"ready",s),new to((function(t){e?t(e):a=function(e){t(e)}}))},get:function(t){return 0===arguments.length?wS.slice(0):f(t)?J(wS,(function(e){return e.id===t})).getOr(null):w(t)&&wS[t]?wS[t]:null},add:function(t){var e=this;return CS[t.id]===t||(null===e.get(t.id)&&("length"!==t.id&&(CS[t.id]=t),CS.push(t),wS.push(t)),kS(!0),e.activeEditor=t,e.fire("AddEditor",{editor:t}),jw||(jw=function(t){var n=e.fire("BeforeUnload");if(n.returnValue)return t.preventDefault(),t.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",jw))),t},createEditor:function(t,e){return this.add(new mS(t,e,this))},remove:function(t){var e,n,r=this;if(t){if(!f(t))return n=t,h(r.get(n.id))?null:(xS(n)&&r.fire("RemoveEditor",{editor:n}),0===wS.length&&window.removeEventListener("beforeunload",jw),n.remove(),kS(wS.length>0),n);gS(pS.select(t),(function(t){(n=r.get(t.id))&&r.remove(n)}))}else for(e=wS.length-1;e>=0;e--)r.remove(wS[e])},execCommand:function(t,e,n){var r=this,o=r.get(n);switch(t){case"mceAddEditor":return r.get(n)||new mS(n,r.settings,r).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(r.execCommand("mceAddEditor",!1,n),!0)}return!!r.activeEditor&&r.activeEditor.execCommand(t,e,n)},triggerSave:function(){gS(wS,(function(t){t.save()}))},addI18n:function(t,e){Ds.add(t,e)},translate:function(t){return Ds.translate(t)},setActive:function(t){var e=this.activeEditor;this.activeEditor!==t&&(e&&e.fire("deactivate",{relatedTarget:t}),t.fire("activate",{relatedTarget:e})),this.activeEditor=t},_setBaseUrl:function(t){this.baseURL=new Fm(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new Fm(this.baseURL)}});SS.setup();var TS,ES,OS,AS,LS=Math.min,NS=Math.max,$S=Math.round,PS=function(t,e,n){var r=e.x,o=e.y,i=t.w,a=t.h,s=e.w,u=e.h,c=(n||"").split("");return"b"===c[0]&&(o+=u),"r"===c[1]&&(r+=s),"c"===c[0]&&(o+=$S(u/2)),"c"===c[1]&&(r+=$S(s/2)),"b"===c[3]&&(o-=a),"r"===c[4]&&(r-=i),"c"===c[3]&&(o-=$S(a/2)),"c"===c[4]&&(r-=$S(i/2)),IS(r,o,i,a)},IS=function(t,e,n,r){return{x:t,y:e,w:n,h:r}},RS={inflate:function(t,e,n){return IS(t.x-e,t.y-n,t.w+2*e,t.h+2*n)},relativePosition:PS,findBestRelativePosition:function(t,e,n,r){var o,i;for(i=0;i=n.x&&o.x+o.w<=n.w+n.x&&o.y>=n.y&&o.y+o.h<=n.h+n.y)return r[i];return null},intersect:function(t,e){var n=NS(t.x,e.x),r=NS(t.y,e.y),o=LS(t.x+t.w,e.x+e.w),i=LS(t.y+t.h,e.y+e.h);return o-n<0||i-r<0?null:IS(n,r,o-n,i-r)},clamp:function(t,e,n){var r=t.x,o=t.y,i=t.x+t.w,a=t.y+t.h,s=e.x+e.w,u=e.y+e.h,c=NS(0,e.x-r),l=NS(0,e.y-o),d=NS(0,i-s),f=NS(0,a-u);return r+=c,o+=l,n&&(i+=c,a+=l,r-=d,o-=f),IS(r,o,(i-=d)-r,(a-=f)-o)},create:IS,fromClientRect:function(t){return IS(t.left,t.top,t.width,t.height)}},BS=(TS={},ES={},{load:function(t,e){var n='Script at URL "'+e+'" failed to load',r='Script at URL "'+e+"\" did not call `tinymce.Resource.add('"+t+"', data)` within 1 second";if(void 0!==TS[t])return TS[t];var o=new to((function(o,i){var a=function(t,e,n){void 0===n&&(n=1e3);var r=!1,o=null,i=function(t){return function(){for(var e=[],n=0;n1e4?(t.success&&n<1e4&&200===e.status?t.success.call(t.success_scope,""+e.responseText,e,t):t.error&&t.error.call(t.error_scope,n>1e4?"TIMED_OUT":"GENERAL",e,t),e=null):oo.setTimeout(r,10)};if(t.scope=t.scope||this,t.success_scope=t.success_scope||t.scope,t.error_scope=t.error_scope||t.scope,t.async=!1!==t.async,t.data=t.data||"",KS.fire("beforeInitialize",{settings:t}),(e=new XMLHttpRequest).overrideMimeType&&e.overrideMimeType(t.content_type),e.open(t.type||(t.data?"POST":"GET"),t.url,t.async),t.crossDomain&&(e.withCredentials=!0),t.content_type&&e.setRequestHeader("Content-Type",t.content_type),t.requestheaders&&Ee.each(t.requestheaders,(function(t){e.setRequestHeader(t.key,t.value)})),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),(e=KS.fire("beforeSend",{xhr:e,settings:t}).xhr).send(t.data),!t.async)return r();oo.setTimeout(r,10)}}),YS=Ee.extend,XS=function(){function t(t){this.settings=YS({},t),this.count=0}return t.sendRPC=function(e){return(new t).send(e)},t.prototype.send=function(t){var e=t.error,n=t.success,r=YS(this.settings,t);r.success=function(t,o){void 0===(t=WS.parse(t))&&(t={error:"JSON Parse error."}),t.error?e.call(r.error_scope||r.scope,t.error,o):n.call(r.success_scope||r.scope,t.result)},r.error=function(t,n){e&&e.call(r.error_scope||r.scope,t,n)},r.data=WS.serialize({id:t.id||"c"+this.count++,method:t.method,params:t.params}),r.content_type="application/json",KS.send(r)},t}();try{var ZS="__storage_test__";(FS=window.localStorage).setItem(ZS,ZS),FS.removeItem(ZS)}catch(t){FS=function(){var t={},e=[],n={getItem:function(e){return t[e]||null},setItem:function(n,r){e.push(n),t[n]=String(r)},key:function(t){return e[t]},removeItem:function(n){e=e.filter((function(t){return t===n})),delete t[n]},clear:function(){e=[],t={}},length:0};return Object.defineProperty(n,"length",{get:function(){return e.length},configurable:!1,enumerable:!1}),n}()}var GS={geom:{Rect:RS},util:{Promise:to,Delay:oo,Tools:Ee,VK:of,URI:Fm,Class:zS,EventDispatcher:VD,Observable:qD,I18n:Ds,XHR:KS,JSON:WS,JSONRequest:XS,JSONP:qS,LocalStorage:FS,Color:function(t){var e={},n=0,r=0,o=0,i=function(t){var i;return"object"==typeof t?"r"in t?(n=t.r,r=t.g,o=t.b):"v"in t&&function(t,e,i){if(t=(parseInt(t,10)||0)%360,e=parseInt(e,10)/100,i=parseInt(i,10)/100,e=HS(0,US(e,1)),i=HS(0,US(i,1)),0!==e){var a=t/60,s=i*e,u=s*(1-Math.abs(a%2-1)),c=i-s;switch(Math.floor(a)){case 0:n=s,r=u,o=0;break;case 1:n=u,r=s,o=0;break;case 2:n=0,r=s,o=u;break;case 3:n=0,r=u,o=s;break;case 4:n=u,r=0,o=s;break;case 5:n=s,r=0,o=u;break;default:n=r=o=0}n=VS(255*(n+c)),r=VS(255*(r+c)),o=VS(255*(o+c))}else n=r=o=VS(255*i)}(t.h,t.s,t.v):(i=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(t))?(n=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10)):(i=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(t))?(n=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16)):(i=/#([0-F])([0-F])([0-F])/gi.exec(t))&&(n=parseInt(i[1]+i[1],16),r=parseInt(i[2]+i[2],16),o=parseInt(i[3]+i[3],16)),n=n<0?0:n>255?255:n,r=r<0?0:r>255?255:r,o=o<0?0:o>255?255:o,e};return t&&i(t),e.toRgb=function(){return{r:n,g:r,b:o}},e.toHsv=function(){return function(t,e,n){var r,o;o=0;var i=US(t/=255,US(e/=255,n/=255)),a=HS(t,HS(e,n));return i===a?{h:0,s:0,v:100*(o=i)}:(r=(a-i)/a,o=a,{h:VS(60*((t===i?3:n===i?1:5)-(t===i?e-n:n===i?t-e:n-t)/(a-i))),s:VS(100*r),v:VS(100*o)})}(n,r,o)},e.toHex=function(){var t=function(t){return(t=parseInt(t,10).toString(16)).length>1?t:"0"+t};return"#"+t(n)+t(r)+t(o)},e.parse=i,e},ImageUploader:function(t){var e=Ny(),n=By(t,e);return{upload:function(e,r){return void 0===r&&(r=!0),n.upload(e,r?Ry(t):void 0)}}}},dom:{EventUtils:zi,Sizzle:ka,DomQuery:cs,TreeWalker:so,TextSeeker:Qs,DOMUtils:gs,ScriptLoader:Cs,RangeUtils:_f,Serializer:$b,StyleSheetLoader:io,ControlSelection:sf,BookmarkManager:Jd,Selection:lb,Event:zi.Event},html:{Styles:Li,Entities:yi,Node:$m,Schema:Oi,SaxParser:qm,DomParser:Eb,Writer:Qm,Serializer:tp},Env:ke,AddOnManager:Ss,Annotator:Gd,Formatter:Wy,UndoManager:Ky,EditorCommands:PD,WindowManager:_y,NotificationManager:yy,EditorObservable:GD,Shortcuts:aS,Editor:mS,FocusManager:cm,EditorManager:SS,DOM:gs.DOM,ScriptLoader:Cs.ScriptLoader,PluginManager:Cy,ThemeManager:wy,IconManager:ly,Resource:BS,trim:Ee.trim,isArray:Ee.isArray,is:Ee.is,toArray:Ee.toArray,makeMap:Ee.makeMap,each:Ee.each,map:Ee.map,grep:Ee.grep,inArray:Ee.inArray,extend:Ee.extend,create:Ee.create,walk:Ee.walk,createNS:Ee.createNS,resolve:Ee.resolve,explode:Ee.explode,_addCacheSuffix:Ee._addCacheSuffix,isOpera:ke.opera,isWebKit:ke.webkit,isIE:ke.ie,isGecko:ke.gecko,isMac:ke.mac},JS=Ee.extend(SS,GS);!function(t){window.tinymce=t,window.tinyMCE=t}(JS),function(e){try{t.exports=e}catch(t){}}(JS)}()},47933:(t,e,n)=>{"use strict";n.d(e,{Z:()=>v});const r={name:"ResizeLine",props:{value:{},min:{type:Number,default:100},max:{type:Number,default:600},placement:{validator:function(t){return["right","bottom"].includes(t)},default:"bottom"},reverse:{type:Boolean,default:!1}},data:function(){return{resizing:!1,mouseX:0,mouseY:0,offset:{},tmpSize:void 0}},mounted:function(){document.documentElement.addEventListener("mousemove",this.handleMove,!0),document.documentElement.addEventListener("mouseup",this.handleUp,!0)},methods:{resizeDown:function(t){this.mouseX=t.pageX||t.clientX+document.documentElement.scrollLeft,this.mouseY=t.pageY||t.clientY+document.documentElement.scrollTop,this.offset={left:t.target.offsetLeft,top:t.target.offsetTop},this.resizing=!0,"number"==typeof this.value&&(this.tmpSize=this.value),this.$emit("on-change",{event:"down"})},handleMove:function(t){if(this.resizing){var e,n=(t.pageX||t.clientX+document.documentElement.scrollLeft)-this.mouseX,r=(t.pageY||t.clientY+document.documentElement.scrollTop)-this.mouseY;if("number"==typeof this.tmpSize)e="bottom"==this.placement?this.reverse?this.tmpSize-r:this.tmpSize+r:this.reverse?this.tmpSize-n:this.tmpSize+n,this.min>0&&(e=Math.max(this.min,e)),this.max>0&&(e=Math.min(this.max,e)),this.$emit("input",e);this.$emit("on-change",{event:"move",diff:{x:n,y:r},offset:this.offset})}},handleUp:function(){this.resizing=!1,this.tmpSize=void 0,this.$emit("on-change",{event:"up"})}}};var o=n(93379),i=n.n(o),a=n(26167),s={insert:"head",singleton:!1};i()(a.Z,s);a.Z.locals;var u=n(51900);const c=(0,u.Z)(r,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"component-resize-line",class:[t.resizing?"resizing":"",t.placement],on:{mousedown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button?null:(e.stopPropagation(),e.preventDefault(),t.resizeDown.apply(null,arguments))}}})}),[],!1,null,"eaab078e",null).exports;function l(t){return void 0===t&&(t=document.body),!0===t?document.body:t instanceof window.Node?t:document.querySelector(t)}const d={inserted:function(t,e,n){var r=e.value;if(t.dataset&&"true"!==t.dataset.transfer)return!1;t.className=t.className?t.className+" v-transfer-dom":"v-transfer-dom";var o=t.parentNode;if(o){var i=document.createComment(""),a=!1;!1!==r&&(o.replaceChild(i,t),l(r).appendChild(t),a=!0),t.__transferDomData||(t.__transferDomData={parentNode:o,home:i,target:l(r),hasMovedOut:a})}},componentUpdated:function(t,e){var n=e.value;if(t.dataset&&"true"!==t.dataset.transfer)return!1;var r=t.__transferDomData;if(r){var o=r.parentNode,i=r.home,a=r.hasMovedOut;!a&&n?(o.replaceChild(i,t),l(n).appendChild(t),t.__transferDomData=Object.assign({},t.__transferDomData,{hasMovedOut:!0,target:l(n)})):a&&!1===n?(o.replaceChild(t,i),t.__transferDomData=Object.assign({},t.__transferDomData,{hasMovedOut:!1,target:l(n)})):n&&l(n).appendChild(t)}},unbind:function(t){if(t.dataset&&"true"!==t.dataset.transfer)return!1;t.className=t.className.replace("v-transfer-dom",""),t.__transferDomData&&(!0===t.__transferDomData.hasMovedOut&&t.__transferDomData.parentNode&&t.__transferDomData.parentNode.appendChild(t),t.__transferDomData=null)}};var f=n(20629);function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e-1&&this.$store.state.cacheDrawerOverlay.splice(n,1)}t?this.zIndex=this.$store.state.cacheDrawerIndex++:0===this.$store.state.cacheDrawerOverlay.length&&(this.$store.state.cacheDrawerIndex=0)},size:{handler:function(t){this.dynamicSize=parseInt(t)},immediate:!0}},methods:{mask:function(){this.maskClosable&&this.close()},close:function(){this.$emit("input",!1)},escClose:function(t){if(this.value&&this.escClosable&&27===t.keyCode){if(this.$Modal.visibles().length>0)return;var e=this.$store.state.cacheDrawerOverlay;if(e.length>0)e[e.length-1].close()}}}};const v=(0,u.Z)(g,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"transfer-dom",rawName:"v-transfer-dom"}],class:["drawer-overlay",t.placement,t.value?"overlay-visible":"overlay-hide"],style:t.overlayStyle,attrs:{"data-transfer":t.transfer}},[n("div",{staticClass:"overlay-mask",on:{click:t.mask}}),t._v(" "),n("div",{staticClass:"overlay-body",style:t.bodyStyle},[n("div",{staticClass:"overlay-close"},[n("a",{attrs:{href:"javascript:void(0)"},on:{click:function(e){return e.stopPropagation(),t.close.apply(null,arguments)}}},[n("svg",{staticClass:"icon fill-current",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 26 26",fill:"none",role:"img"}},[n("path",{attrs:{d:"M8.28596 6.51819C7.7978 6.03003 7.00634 6.03003 6.51819 6.51819C6.03003 7.00634 6.03003 7.7978 6.51819 8.28596L11.2322 13L6.51819 17.714C6.03003 18.2022 6.03003 18.9937 6.51819 19.4818C7.00634 19.97 7.7978 19.97 8.28596 19.4818L13 14.7678L17.714 19.4818C18.2022 19.97 18.9937 19.97 19.4818 19.4818C19.97 18.9937 19.97 18.2022 19.4818 17.714L14.7678 13L19.4818 8.28596C19.97 7.7978 19.97 7.00634 19.4818 6.51819C18.9937 6.03003 18.2022 6.03003 17.714 6.51819L13 11.2322L8.28596 6.51819Z",fill:"currentColor"}})])])]),t._v(" "),t.resize?n("ResizeLine",{staticClass:"overlay-resize",attrs:{placement:t.placement,min:t.minSize,max:0,reverse:""},model:{value:t.dynamicSize,callback:function(e){t.dynamicSize=e},expression:"dynamicSize"}}):t._e(),t._v(" "),n("div",{staticClass:"overlay-content"},[t._t("default")],2)],1)])}),[],!1,null,null,null).exports},55305:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(20629);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e1,visible:!1,browseVisible:!1,isLoading:!1,browseList:[],browseListNext:[],imgVisible:"",defaultList:this.initItems(this.value),uploadList:[],maxNum:Math.min(Math.max($A.runNum(this.num),1),99),httpValue:"",httpType:"",maxSize:2048}},mounted:function(){var t=this;this.uploadList=this.$refs.upload.fileList,this.$emit("input",this.uploadList);var e=$A(this.$refs.browselistbox);e.scroll((function(){var n=e[0].scrollHeight;if(e[0].scrollTop+e.height()>=n&&t.browseListNext.length>0){var r=t.browseListNext;t.browseListNext=[],t.browsePictureFor(r)}}))},watch:{value:function(t){"string"!=typeof t?t!==this.$refs.upload.fileList&&(this.$refs.upload.fileList=this.initItems(t),this.uploadList=this.$refs.upload.fileList):this.$emit("input",this.initItems(t))},browseVisible:function(){this.httpType="",this.httpValue=""}},computed:a(a({},(0,r.rn)(["userToken"])),{},{uploadHeaders:function(){return{fd:$A.getStorageString("userWsFd"),token:this.userToken}},uploadParams:function(){return Object.keys(this.otherParams).length>0?Object.assign(this.params,this.otherParams):this.params}}),methods:{handleCallback:function(t){"callback"===this.type&&(!0===t?(this.$emit("on-callback",this.uploadList),this.$refs.upload.fileList=[],this.uploadList=this.$refs.upload.fileList):"object"===o(t)&&this.$emit("on-callback",[t])),this.browseVisible=!1},initItems:function(t){"string"==typeof t&&(t=[{url:t}]);var e=[];return $A.each(t,(function(t,n){"string"==typeof n&&(n={url:n}),n.url&&(n.active=!0,n.status="finished",void 0===n.path&&(n.path=n.url),void 0===n.thumb&&(n.thumb=n.url),e.push(n))})),e},handleView:function(t){this.visible=!0,this.imgVisible=t.url},handleRemove:function(t){var e=this.$refs.upload.fileList;this.$refs.upload.fileList.splice(e.indexOf(t),1),this.$emit("input",this.$refs.upload.fileList)},handleProgress:function(){this.$emit("update:uploadIng",this.uploadIng+1)},handleSuccess:function(t,e){this.$emit("update:uploadIng",this.uploadIng-1),1===t.ret?(e.url=t.data.url,e.path=t.data.path,e.thumb=t.data.thumb,this.handleCallback(e)):($A.noticeWarning({title:this.$L("上传失败"),desc:this.$L("文件 "+e.name+" 上传失败 "+t.msg)}),this.$refs.upload.fileList.pop()),this.$emit("input",this.$refs.upload.fileList)},handleError:function(){this.$emit("update:uploadIng",this.uploadIng-1)},handleFormatError:function(t){$A.noticeWarning({title:this.$L("文件格式不正确"),desc:this.$L("文件 "+t.name+" 格式不正确,请上传 jpg、jpeg、gif、png 格式的图片。")})},handleMaxSize:function(t){$A.noticeWarning({title:this.$L("超出文件大小限制"),desc:this.$L("文件 "+t.name+" 太大,不能超过:"+$A.bytesToSize(1024*this.maxSize))})},handleBeforeUpload:function(){var t=this.uploadList.length{"use strict";n.d(e,{Z:()=>o});const r={name:"ScrollerY",props:{static:{type:Boolean,default:!1},autoBottom:{type:Boolean,default:!1},autoRecovery:{type:Boolean,default:!0},autoRecoveryAnimate:{type:Boolean,default:!1}},data:function(){return{scrollY:0,scrollDiff:0,autoInterval:null}},mounted:function(){this.openInterval(),this.$nextTick(this.initScroll)},activated:function(){this.openInterval(),this.recoveryScroll()},destroyed:function(){this.closeInterval()},deactivated:function(){this.closeInterval()},methods:{initScroll:function(){var t=this;this.autoToBottom();var e="function"==typeof this.$listeners["on-scroll"],n=$A(this.$refs.scrollerView);n.scroll((function(){var r=Math.round(n.innerHeight()),o=n.scrollTop(),i=t.$refs.scrollerView.scrollHeight;if(t.scrollY=o,e){var a="static",s="static";t.scrollDiff-o>50?(t.scrollDiff=o,a="down"):t.scrollDiff-o<-100&&(t.scrollDiff=o,a="up"),t.scrollDiff-o>1?(t.scrollDiff=o,s="down"):t.scrollDiff-o<-1&&(t.scrollDiff=o,s="up"),t.$emit("on-scroll",{scale:o/(i-r),scrollY:o,scrollE:i-r-o,direction:a,directionreal:s})}}))},recoveryScroll:function(){var t=this;this.autoRecovery&&(this.scrollY>0||this.autoBottom)&&this.$nextTick((function(){t.autoBottom?t.autoToBottom():t.scrollTo(t.scrollY,t.autoRecoveryAnimate)}))},openInterval:function(){this.autoToBottom(),this.autoInterval&&clearInterval(this.autoInterval),this.autoInterval=setInterval(this.autoToBottom,300)},closeInterval:function(){clearInterval(this.autoInterval),this.autoInterval=null},scrollTo:function(t,e){!1===e?$A(this.$refs.scrollerView).stop().scrollTop(t):$A(this.$refs.scrollerView).stop().animate({scrollTop:t})},autoToBottom:function(){if(this.autoBottom&&this.$refs.bottom)try{this.$refs.bottom.scrollIntoView(!1)}catch(t){scrollIntoView(this.$refs.bottom,{behavior:"instant",inline:"end"})}},scrollInfo:function(){var t=$A(this.$refs.scrollerView),e=Math.round(t.innerHeight()),n=t.scrollTop(),r=this.$refs.scrollerView.scrollHeight;return this.scrollY=n,{scale:n/(r-e),scrollY:n,scrollE:r-e-n}},querySelector:function(t){return this.$refs.scrollerView&&this.$refs.scrollerView.querySelector(t)}}};const o=(0,n(51900).Z)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{ref:"scrollerView",staticClass:"app-scroller-y",class:[t.static?"static":""]},[t._t("default"),t._v(" "),n("div",{ref:"bottom",staticClass:"app-scroller-bottom"})],2)}),[],!1,null,null,null).exports},72593:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>f});var r=n(47575),o=n.n(r),i=n(55305),a=n(20629);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function c(t){for(var e=1;e0&&(n.min_height=this.minHeight),n},closeFull:function(){this.content=this.getContent(),this.$emit("input",this.content),this.$emit("on-blur"),this.transfer=!1,null!=this.editorT&&(this.editorT.destroy(),this.editorT=null)},transferChange:function(t){t||null==this.editorT||(this.content=this.editorT.getContent(),this.$emit("input",this.content),this.editorT.destroy(),this.editorT=null)},getEditor:function(){return this.transfer?this.editorT:this.editor},concatAssciativeArrays:function(t,e){if(0===e.length)return t;if(0===t.length)return e;var n=[];for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);return n},submitNewContent:function(){var t=this;this.isTyping=!0,null!==this.checkerTimeout&&clearTimeout(this.checkerTimeout),this.checkerTimeout=setTimeout((function(){t.isTyping=!1}),300),this.$emit("input",this.getContent())},insertContent:function(t){null!==this.getEditor()?this.getEditor().insertContent(t):this.content+=t},getContent:function(){return null===this.getEditor()?"":this.getEditor().getContent()},insertImage:function(t){this.insertContent('')},editorImage:function(t){for(var e=0;e').concat(t.data.name," (").concat($A.bytesToSize(1024*t.data.size),")")):$A.noticeWarning({title:this.$L("上传失败"),desc:this.$L("文件 "+e.name+" 上传失败,"+t.msg)})},handleError:function(){this.uploadIng--},handleFormatError:function(t){$A.noticeWarning({title:this.$L("文件格式不正确"),desc:this.$L("文件 "+t.name+" 格式不正确,仅支持上传:"+this.uploadFormat.join(","))})},handleMaxSize:function(t){$A.noticeWarning({title:this.$L("超出文件大小限制"),desc:this.$L("文件 "+t.name+" 太大,不能超过:"+$A.bytesToSize(1024*this.maxSize))})},handleBeforeUpload:function(){return!0}}};const f=(0,n(51900).Z)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"teditor-wrapper"},[n("div",{staticClass:"teditor-box",class:[!t.inline&&t.spinShow?"teditor-loadstyle":"teditor-loadedstyle"]},[t.inline?[n("div",{ref:"myTextarea",attrs:{id:t.id},domProps:{innerHTML:t._s(t.content)}}),t._v(" "),t.spinShow?n("Icon",{staticClass:"icon-loading icon-inline",attrs:{type:"ios-loading",size:18}}):t._e()]:[n("textarea",{ref:"myTextarea",attrs:{id:t.id}},[t._v(t._s(t.content))]),t._v(" "),t.spinShow?n("Spin",{attrs:{fix:""}},[n("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading",size:18}}),t._v(" "),n("div",[t._v(t._s(t.$L("加载组件中...")))])],1):t._e()],t._v(" "),n("ImgUpload",{ref:"myUpload",staticClass:"upload-control",attrs:{type:"callback",uploadIng:t.uploadIng,num:"50"},on:{"update:uploadIng":function(e){t.uploadIng=e},"update:upload-ing":function(e){t.uploadIng=e},"on-callback":t.editorImage}}),t._v(" "),n("Upload",{ref:"fileUpload",staticClass:"upload-control",attrs:{name:"files",action:t.actionUrl,headers:t.headers,multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-progress":t.handleProgress,"on-success":t.handleSuccess,"on-error":t.handleError,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize,"before-upload":t.handleBeforeUpload}})],2),t._v(" "),t.uploadIng>0?n("Spin",{attrs:{fix:""}},[n("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}),t._v(" "),n("div",[t._v(t._s(t.$L("正在上传文件...")))])],1):t._e(),t._v(" "),n("Modal",{staticClass:"teditor-transfer",attrs:{"footer-hide":"",fullscreen:"",transfer:""},on:{"on-visible-change":t.transferChange},model:{value:t.transfer,callback:function(e){t.transfer=e},expression:"transfer"}},[n("div",{attrs:{slot:"close"},slot:"close"},[n("Button",{attrs:{type:"primary",size:"small"}},[t._v(t._s(t.$L("完成")))])],1),t._v(" "),n("div",{staticClass:"teditor-transfer-body"},[n("textarea",{attrs:{id:"T_"+t.id}},[t._v(t._s(t.content))])]),t._v(" "),t.uploadIng>0?n("Spin",{attrs:{fix:""}},[n("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}),t._v(" "),n("div",[t._v(t._s(t.$L("正在上传文件...")))])],1):t._e()],1)],1)}),[],!1,null,null,null).exports},96921:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(80641);const o={name:"UserInput",props:{value:{type:[String,Number,Array],default:""},uncancelable:{type:Array,default:function(){return[]}},disabledChoice:{type:Array,default:function(){return[]}},placeholder:{default:""},size:{default:"default"},transfer:{type:Boolean,default:!0},multipleMax:{type:Number},maxHiddenInput:{type:Boolean,default:!0},projectId:{type:Number,default:0},noProjectId:{type:Number,default:0}},data:function(){return{ready:!1,initialized:!1,loading:!1,openLoad:!1,values:[],list:[],options:[],subscribe:null}},mounted:function(){var t=this;$A.isArray(this.value)?this.values=$A.cloneJSON(this.value):this.$emit("input",this.value?[this.value]:[]),this.$nextTick((function(){t.ready=!0})),this.subscribe=r.Store.subscribe("cacheUserActive",(function(e){var n=t.list.findIndex((function(t){return t.userid==e.userid}));n>-1&&(t.initialized=!0,t.$set(t.list,n,Object.assign({},t.list[n],e)));var r=t.options.find((function(t){return t.value==e.userid}));r&&(t.$set(r,"label",e.nickname),t.$set(r,"avatar",e.userimg))}))},beforeDestroy:function(){this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},computed:{maxHiddenClass:function(){var t=this.multipleMax,e=this.maxHiddenInput,n=this.values;return t&&e&&n.length>=t?"hidden-input":""}},watch:{value:function(t){this.values=t},values:function(t){this.$emit("input",t)}},methods:{openChange:function(t){t&&!this.openLoad&&(this.openLoad=!0,(this.list.length==this.values.length||this.list.length<=1)&&this.$nextTick(this.searchUser))},setDefaultOptions:function(t){var e=this;this.options=t,t.forEach((function(t){var n=t.value,r=t.label;e.list.push({userid:n,nickname:r}),e.$store.dispatch("getUserBasic",{userid:n})})),0==this.list.length&&(this.initialized=!0)},searchUser:function(t){var e=this;""!==t?(this.loading=!0,this.$store.dispatch("call",{url:"users/search",data:{keys:{key:t||"",project_id:this.projectId,no_project_id:this.noProjectId},take:30}}).then((function(t){var n=t.data;e.loading=!1,e.list=n})).catch((function(t){var n=t.msg;e.loading=!1,e.list=[],$A.messageWarning(n)}))):this.list=[]},isDisabled:function(t){return 0!==this.disabledChoice.length&&this.disabledChoice.includes(t)}}};const i=(0,n(51900).Z)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.ready?n("div",{class:["common-user",t.maxHiddenClass]},[n("Select",{attrs:{transfer:t.transfer,"remote-method":t.searchUser,placeholder:t.placeholder,size:t.size,loading:t.loading,"loading-text":t.$L("加载中..."),"default-label":t.value,"default-event-object":!0,multipleMax:t.multipleMax,multipleUncancelable:t.uncancelable,multiple:"",filterable:"","transfer-class-name":"common-user-transfer"},on:{"on-open-change":t.openChange,"on-set-default-options":t.setDefaultOptions},model:{value:t.values,callback:function(e){t.values=e},expression:"values"}},[t.multipleMax?n("div",{staticClass:"user-drop-prepend",attrs:{slot:"drop-prepend"},slot:"drop-prepend"},[t._v(t._s(t.$L("最多只能选择"+t.multipleMax+"个")))]):t._e(),t._v(" "),t._t("option-prepend"),t._v(" "),t._l(t.list,(function(e,r){return n("Option",{key:r,attrs:{value:e.userid,label:e.nickname,avatar:e.userimg,disabled:t.isDisabled(e.userid)}},[n("div",{staticClass:"user-input-option"},[n("div",{staticClass:"user-input-avatar"},[n("EAvatar",{staticClass:"avatar",attrs:{src:e.userimg}})],1),t._v(" "),n("div",{staticClass:"user-input-nickname"},[t._v(t._s(e.nickname))]),t._v(" "),n("div",{staticClass:"user-input-userid"},[t._v("ID: "+t._s(e.userid))])])])}))],2),t._v(" "),t.initialized?t._e():n("div",{staticClass:"common-user-loading"},[n("Loading")],1)],1):t._e()}),[],!1,null,null,null).exports},70845:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>V});var r=n(20629),o=n(36323);function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const s={name:"ProjectArchived",data:function(){return{loadIng:0,keys:{},columns:[],list:[],page:1,pageSize:20,total:0,noText:""}},mounted:function(){this.getLists()},computed:function(t){for(var e=1;e0?n("Loading"):t._e()],1)]),t._v(" "),n("div",{staticClass:"search-container lr"},[n("ul",[n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("项目名"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Input",{attrs:{clearable:""},model:{value:t.keys.name,callback:function(e){t.$set(t.keys,"name",e)},expression:"keys.name"}})],1)]),t._v(" "),n("li",{staticClass:"search-button"},[n("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[n("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.getLists}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.refresh}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1)])]),t._v(" "),n("Table",{attrs:{columns:t.columns,data:t.list,"no-data-text":t.$L(t.noText)}}),t._v(" "),n("Page",{staticClass:"page-container",attrs:{total:t.total,current:t.page,pageSize:t.pageSize,disabled:t.loadIng>0,simple:t.windowMax768,showTotal:""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)}),[],!1,null,null,null).exports,l=(t,e)=>!(!t||!e)&&("String"===t?"string"==typeof e:"Object"===t?"[object Object]"===Object.prototype.toString.call(e):"number"===t?"number"==typeof e:"function"===t&&"[object Function]"===Object.prototype.toString.call(e)),d=(t,e,n)=>t.findIndex((t=>t[e]===n));const f=class{constructor(t="默认标题",e={}){this.title=t,this.options=e,this.support=!1,this.supportFn()}supportFn(){window.Notification?(this.initStatus(),this.support=!0):this.support=!1}initStatus(){this.notification=null,this.state=Notification.permission,this.msg=null,this.callBackObj={},this.notificationAll=[],this.requireInteractionTimeout=!1,this.timeout=null}initNotification(t){if(this.checkStatus("support")){if(!l("function",t))return console.error("initNotification的参数必须为函数");if("granted"===this.state)this.msg="already granted";else if("default"===this.state){const e=e=>(this.state=e,this.msg="granted"===e?"granted":"default"===e?"close":"denied",t(this.msg));try{Notification.requestPermission().then(e)}catch(t){Notification.requestPermission(e)}}else this.msg="already denied";return"default"!==this.state?t(this.msg):void 0}}userAgreed(){if(this.checkStatus("userAgreed")){this.notification=new Notification(this.title,this.options),this.notificationWatch();for(const t in this.callBackObj)this.notification[t]=e=>{this.callBackObj[t](e)}}}notificationTimeoutFn(t){t&&l("number",t)?this.timeout=t:this.timeout=5e3}notificationWatch(){this.notificationAll.push(this.notification),this.notification.requireInteraction?this.everyTimeout():this.autoClose(),this.watchClose()}everyTimeout(){l("number",this.timeout)&&(this.options.timeOut&&l("number",this.options.timeOut)?this.timeoutCloseFn(this.options.timeOut):this.timeoutCloseFn(this.timeout))}timeoutCloseFn(t){const e=this.notification.timestamp;setTimeout((()=>{const t=d(this.notificationAll,"timestamp",e);-1!==t&&this.notificationAll[t].close()}),t)}watchClose(){const t=this.notification.timestamp;this.notification.addEventListener("close",(e=>{const n=d(this.notificationAll,"timestamp",t);-1!==n&&this.notificationAll.splice(n,1)}))}autoClose(){const t=this.notification.timestamp;setTimeout((()=>{const e=d(this.notificationAll,"timestamp",t);-1!==e&&this.notificationAll.splice(e,1)}),6e3)}notificationEvent(t){if(this.checkStatus("support")){if(!l("Object",t))return console.error("callObj必须为对象");for(const e in t)if(!l("function",t[e]))return console.error("callObj对象中的每个value必须为函数");this.callBackObj=t}}closeAll(){for(let t of this.notificationAll.values())t.close();this.notificationAll=[]}close(){if(!this.notification)return console.warn("this.notification为null,通知尚未调用/用户未同意显示通知");this.notification.close()}updateOptions(t){if(t&&l("Object",t))for(const e in t)this.options[e]=t[e];else console.warn("updateOptions参数错误:options为必填对象")}replaceTitle(t){t&&l("String",t)?this.title=t:console.warn("replaceTitle: title(通知标题)为必填字符串")}replaceOptions(t){t&&l("Object",t)?this.options=t:console.warn("replaceOptions参数错误:options为必填对象")}checkStatus(t){if("support"===t){if(!this.support)return console.warn("用户浏览器不支持"),!1}else if("userAgreed"===t){if("granted"!==this.state)return!1;if(!this.checkStatus("support"))return!1}return!0}};function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const h={name:"TeamManagement",data:function(){return{loadIng:0,keys:{},columns:[],list:[],page:1,pageSize:20,total:0,noText:""}},mounted:function(){this.getLists()},computed:function(t){for(var e=1;e0?n("Loading"):t._e()],1)]),t._v(" "),n("div",{staticClass:"search-container lr"},[n("ul",[n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("邮箱"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Input",{attrs:{clearable:""},model:{value:t.keys.email,callback:function(e){t.$set(t.keys,"email",e)},expression:"keys.email"}})],1)]),t._v(" "),n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("昵称"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Input",{attrs:{clearable:""},model:{value:t.keys.nickname,callback:function(e){t.$set(t.keys,"nickname",e)},expression:"keys.nickname"}})],1)]),t._v(" "),n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("职位/职称"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Input",{attrs:{clearable:""},model:{value:t.keys.position,callback:function(e){t.$set(t.keys,"position",e)},expression:"keys.position"}})],1)]),t._v(" "),n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("身份"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Select",{model:{value:t.keys.identity,callback:function(e){t.$set(t.keys,"identity",e)},expression:"keys.identity"}},[n("Option",{attrs:{value:""}},[t._v(t._s(t.$L("全部")))]),t._v(" "),n("Option",{attrs:{value:"admin"}},[t._v(t._s(t.$L("管理员")))]),t._v(" "),n("Option",{attrs:{value:"disable"}},[t._v(t._s(t.$L("禁用")))])],1)],1)]),t._v(" "),n("li",{staticClass:"search-button"},[n("Tooltip",{attrs:{theme:"light",placement:"bottom","transfer-class-name":"search-button-clear",transfer:""}},[n("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.getLists}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1)])]),t._v(" "),n("Table",{attrs:{columns:t.columns,data:t.list,"no-data-text":t.$L(t.noText)}}),t._v(" "),n("Page",{staticClass:"page-container",attrs:{total:t.total,current:t.page,pageSize:t.pageSize,disabled:t.loadIng>0,simple:t.windowMax768,showTotal:""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)}),[],!1,null,null,null).exports;function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function b(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const y={name:"ProjectManagement",data:function(){return{loadIng:0,keys:{},columns:[],list:[],page:1,pageSize:20,total:0,noText:""}},mounted:function(){this.getLists()},computed:function(t){for(var e=1;e0?n("Loading"):t._e()],1)]),t._v(" "),n("div",{staticClass:"search-container lr"},[n("ul",[n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("项目名"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Input",{attrs:{clearable:""},model:{value:t.keys.name,callback:function(e){t.$set(t.keys,"name",e)},expression:"keys.name"}})],1)]),t._v(" "),n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("项目状态"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Select",{model:{value:t.keys.status,callback:function(e){t.$set(t.keys,"status",e)},expression:"keys.status"}},[n("Option",{attrs:{value:""}},[t._v(t._s(t.$L("全部")))]),t._v(" "),n("Option",{attrs:{value:"unarchived"}},[t._v(t._s(t.$L("未归档")))]),t._v(" "),n("Option",{attrs:{value:"archived"}},[t._v(t._s(t.$L("已归档")))])],1)],1)]),t._v(" "),n("li",{staticClass:"search-button"},[n("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[n("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.getLists}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1)])]),t._v(" "),n("Table",{attrs:{columns:t.columns,data:t.list,"no-data-text":t.$L(t.noText)}}),t._v(" "),n("Page",{staticClass:"page-container",attrs:{total:t.total,current:t.page,pageSize:t.pageSize,disabled:t.loadIng>0,simple:t.windowMax768,showTotal:""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)}),[],!1,null,null,null).exports;var w=n(47933);const _={name:"DragBallComponent",props:{id:{type:String,default:""},distanceLeft:{type:Number,default:-1},distanceRight:{type:Number,default:0},distanceTop:{type:Number,default:-1},distanceBottom:{type:Number,default:100},isScrollHidden:{type:Boolean,default:!1},isCanDraggable:{type:Boolean,default:!0},zIndex:{type:Number,default:50}},data:function(){return{clientWidth:null,clientHeight:null,top:0,left:0,timer:null,currentTop:0,isMoving:!1,record:{}}},created:function(){this.clientWidth=document.documentElement.clientWidth,this.clientHeight=document.documentElement.clientHeight},mounted:function(){var t=this;this.id&&($A.isJson(window._DragBallComponent)||(window._DragBallComponent={})),this.isCanDraggable&&this.$nextTick((function(){t.id&&$A.isJson(window._DragBallComponent[t.id])?(t.left=window._DragBallComponent[t.id].left,t.top=window._DragBallComponent[t.id].top):(t.distanceLeft>-1?t.left=t.distanceLeft:t.left=t.clientWidth-t.floatDrag.offsetWidth-t.distanceRight,t.distanceTop>-1?t.top=t.distanceTop:t.top=t.clientHeight-t.floatDrag.offsetHeight-t.distanceBottom),t.initDraggable()})),this.isScrollHidden&&window.addEventListener("scroll",this.handleScroll),window.addEventListener("resize",this.handleResize)},beforeDestroy:function(){this.id&&(window._DragBallComponent[this.id]={left:this.left,top:this.top}),window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("resize",this.handleResize)},computed:{dragStyle:function(){return{left:this.left+"px",top:this.top+"px",zIndex:this.zIndex,position:"fixed"}},floatDrag:function(){return this.$refs.floatDrag}},methods:{handleScroll:function(){var t=this;this.timer&&clearTimeout(this.timer),this.timer=setTimeout((function(){t.handleScrollEnd()}),200),this.currentTop=document.documentElement.scrollTop||document.body.scrollTop,this.left>this.clientWidth/2?this.left=this.clientWidth+this.floatDrag.offsetWidth:this.left=-this.floatDrag.offsetWidth},handleScrollEnd:function(){(document.documentElement.scrollTop||document.body.scrollTop)===this.currentTop&&(this.left>this.clientWidth/2?this.left=this.clientWidth-this.floatDrag.offsetWidth:this.left=0,clearTimeout(this.timer))},handleResize:function(){this.clientWidth=document.documentElement.clientWidth,this.clientHeight=document.documentElement.clientHeight,this.checkDraggablePosition()},initDraggable:function(){this.floatDrag.addEventListener("touchstart",this.toucheStart),this.floatDrag.addEventListener("touchmove",this.touchMove),this.floatDrag.addEventListener("touchend",this.touchEnd)},mouseDown:function(t){var e=this;this.record={time:(new Date).getTime(),top:this.floatDrag.offsetTop,left:this.floatDrag.offsetLeft,x:t.clientX-this.floatDrag.offsetLeft,y:t.clientY-this.floatDrag.offsetTop},this.floatDrag.style.transition="none",this.canClick=!1,document.onmousemove=function(t){var n=t.clientX-e.record.x,r=t.clientY-e.record.y;n<0?n=0:n>window.innerWidth-e.floatDrag.offsetWidth&&(n=window.innerWidth-e.floatDrag.offsetWidth),r<0?r=0:r>window.innerHeight-e.floatDrag.offsetHeight&&(r=window.innerHeight-e.floatDrag.offsetHeight),e.left=n,e.top=r},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null,e.checkDraggablePosition(),e.floatDrag.style.transition="all 0.3s",(Math.abs(e.record.top-e.floatDrag.offsetTop)<5&&Math.abs(e.record.left-e.floatDrag.offsetLeft)<5||(new Date).getTime()-e.record.time<200)&&e.$emit("on-click")}},toucheStart:function(){this.canClick=!1,this.floatDrag.style.transition="none"},touchMove:function(t){if(this.canClick=!0,1===t.targetTouches.length){var e=event.targetTouches[0],n=e.clientX-this.floatDrag.offsetWidth/2,r=e.clientY-this.floatDrag.offsetHeight/2;n<0?n=0:n>window.innerWidth-this.floatDrag.offsetWidth&&(n=window.innerWidth-this.floatDrag.offsetWidth),r<0?r=0:r>window.innerHeight-this.floatDrag.offsetHeight&&(r=window.innerHeight-this.floatDrag.offsetHeight),this.left=n,this.top=r}},touchEnd:function(){this.canClick&&(this.floatDrag.style.transition="all 0.3s",this.checkDraggablePosition())},checkDraggablePosition:function(){this.left+this.floatDrag.offsetWidth/2>=this.clientWidth/2?this.left=this.clientWidth-this.floatDrag.offsetWidth:this.left=0,this.top<0&&(this.top=0),this.top+this.floatDrag.offsetHeight>=this.clientHeight&&(this.top=this.clientHeight-this.floatDrag.offsetHeight)}}};const k=(0,u.Z)(_,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{ref:"floatDrag",style:t.dragStyle,on:{mousedown:function(e){return e.stopPropagation(),e.preventDefault(),t.mouseDown.apply(null,arguments)}}},[t._t("default")],2)}),[],!1,null,null,null).exports;var x=n(86014);function D(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function S(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const T={name:"ReportEdit",components:{TEditor:function(){return Promise.resolve().then(n.bind(n,72593))},UserInput:n(96921).Z},props:{id:{default:0}},data:function(){return{reportData:{title:"",content:"",type:"weekly",receive:[],id:0,offset:0},disabledType:!1,userInputShow:!0,prevCycleText:"",nextCycleText:""}},watch:{id:function(t){this.id>0?this.getDetail(t):(this.reportData.offset=0,this.reportData.type="weekly",this.reportData.receive=[],this.getTemplate())}},computed:function(t){for(var e=1;e1?$A.modalConfirm({title:"覆盖提交",content:"你已提交过此日期的报告,是否覆盖提交?",loading:!0,zIndex:2e3,onOk:function(){t.doSubmit()}}):this.doSubmit()},doSubmit:function(){var t=this;this.$store.dispatch("call",{url:"report/store",data:this.reportData,method:"post"}).then((function(e){e.data;var n=e.msg;t.reportData.offset=0,t.reportData.type="weekly",t.reportData.receive=[],t.getTemplate(),t.disabledType=!1,t.$Modal.remove(),$A.messageSuccess(n),t.$emit("saveSuccess")})).catch((function(e){var n=e.msg;t.$Modal.remove(),$A.messageError(n)}))},getTemplate:function(){var t=this;this.$store.dispatch("call",{url:"report/template",data:{type:this.reportData.type,offset:this.reportData.offset,id:this.id}}).then((function(e){var n=e.data;e.msg;n.id?(t.reportData.id=n.id,t.id>0?t.getDetail(n.id):(t.reportData.title=n.title,t.reportData.content=n.content)):(t.reportData.id=0,t.reportData.title=n.title,t.reportData.content=n.content)})).catch((function(t){var e=t.msg;$A.messageError(e)}))},typeChange:function(t){this.reportData.offset=0,"weekly"===t?(this.prevCycleText=this.$L("上一周"),this.nextCycleText=this.$L("下一周")):(this.prevCycleText=this.$L("上一天"),this.nextCycleText=this.$L("下一天")),this.getTemplate()},getDetail:function(t){var e=this;this.userInputShow=!1,this.$store.dispatch("call",{url:"report/detail",data:{id:t}}).then((function(n){var r=n.data;n.msg;e.reportData.title=r.title,e.reportData.content=r.content,e.reportData.receive=r.receives_user.map((function(t){return t.userid})),e.reportData.type=r.type_val,e.reportData.id=t,e.disabledType=!0,e.userInputShow=!0})).catch((function(t){var n=t.msg;$A.messageError(n),e.userInputShow=!0}))},prevCycle:function(){this.reportData.offset-=1,this.disabledType=!1,this.reReportData(),this.getTemplate()},nextCycle:function(){this.reportData.offset<0&&(this.reportData.offset+=1),this.disabledType=!1,this.reReportData(),this.getTemplate()},getLastSubmitter:function(){var t=this;this.userInputShow=!1,this.$store.dispatch("call",{url:"report/last_submitter"}).then((function(e){var n=e.data;e.msg;t.reportData.receive=n,t.userInputShow=!0})).catch((function(e){var n=e.msg;$A.messageError(n),t.userInputShow=!0}))},reReportData:function(){this.reportData.title="",this.reportData.content="",this.reportData.receive=[],this.reportData.id=0}}};const E=(0,u.Z)(T,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Form",{staticClass:"report-box",attrs:{"label-position":"top"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("Row",{staticClass:"report-row"},[n("Col",{attrs:{span:"2"}},[n("p",{staticClass:"report-titles"},[t._v(t._s(t.$L("汇报类型")))])]),t._v(" "),n("Col",{attrs:{span:"12"}},[n("RadioGroup",{staticClass:"report-radiogroup",attrs:{type:"button","button-style":"solid",readonly:t.id>0},on:{"on-change":t.typeChange},model:{value:t.reportData.type,callback:function(e){t.$set(t.reportData,"type",e)},expression:"reportData.type"}},[n("Radio",{attrs:{label:"weekly",disabled:t.id>0&&"daily"==t.reportData.type}},[t._v(t._s(t.$L("周报")))]),t._v(" "),n("Radio",{attrs:{label:"daily",disabled:t.id>0&&"weekly"==t.reportData.type}},[t._v(t._s(t.$L("日报")))])],1),t._v(" "),0===t.id?n("ButtonGroup",{staticClass:"report-buttongroup"},[n("ETooltip",{staticClass:"report-poptip",attrs:{content:t.prevCycleText,placement:"bottom"}},[n("Button",{attrs:{type:"primary"},on:{click:t.prevCycle}},[n("Icon",{attrs:{type:"ios-arrow-back"}})],1)],1),t._v(" "),n("div",{staticClass:"report-buttongroup-vertical"}),t._v(" "),n("ETooltip",{staticClass:"report-poptip",attrs:{disabled:t.reportData.offset>=0,content:t.nextCycleText,placement:"bottom"}},[n("Button",{attrs:{type:"primary",disabled:t.reportData.offset>=0},on:{click:t.nextCycle}},[n("Icon",{attrs:{type:"ios-arrow-forward"}})],1)],1)],1):t._e()],1)],1),t._v(" "),n("Row",{staticClass:"report-row"},[n("Col",{attrs:{span:"2"}},[n("p",{staticClass:"report-titles"},[t._v(t._s(t.$L("汇报名称")))])]),t._v(" "),n("Col",{attrs:{span:"22"}},[n("Input",{attrs:{disabled:""},model:{value:t.reportData.title,callback:function(e){t.$set(t.reportData,"title",e)},expression:"reportData.title"}})],1)],1),t._v(" "),n("Row",{staticClass:"report-row"},[n("Col",{attrs:{span:"2"}},[n("p",{staticClass:"report-titles"},[t._v(t._s(t.$L("汇报对象")))])]),t._v(" "),n("Col",{attrs:{span:"22"}},[n("div",{staticClass:"report-users"},[t.userInputShow?n("UserInput",{attrs:{disabledChoice:[t.userId],placeholder:t.$L("选择接收人")},model:{value:t.reportData.receive,callback:function(e){t.$set(t.reportData,"receive",e)},expression:"reportData.receive"}}):t._e(),t._v(" "),n("a",{staticClass:"report-row-a",attrs:{href:"javascript:void(0);"},on:{click:t.getLastSubmitter}},[n("Icon",{staticClass:"report-row-a-icon",attrs:{type:"ios-share-outline"}}),t._v(t._s(t.$L("使用我上次的汇报对象"))+"\n ")],1)],1)])],1),t._v(" "),n("Row",{staticClass:"report-row report-row-content"},[n("Col",{attrs:{span:"2"}},[n("p",{staticClass:"report-titles"},[t._v(t._s(t.$L("汇报内容")))])]),t._v(" "),n("Col",{attrs:{span:"22"}},[n("FormItem",{staticClass:"report-row-content-editor"},[n("TEditor",{attrs:{height:"100%"},model:{value:t.reportData.content,callback:function(e){t.$set(t.reportData,"content",e)},expression:"reportData.content"}})],1)],1)],1),t._v(" "),n("Row",{staticClass:"report-row report-row-foot"},[n("Col",{attrs:{span:"2"}}),t._v(" "),n("Col",{attrs:{span:"4"}},[n("Button",{staticClass:"report-bottom",attrs:{type:"primary"},on:{click:t.handleSubmit}},[t._v(t._s(t.$L(t.id>0?"修改":"提交")))])],1)],1)],1)}),[],!1,null,"c7774572",null).exports;const O={name:"ReportMy",data:function(){return{loadIng:0,columns:[],lists:[],listPage:1,listTotal:0,listPageSize:10,noDataText:"",createAt:[],reportType:"",reportTypeList:[]}},mounted:function(){this.getLists()},methods:{initLanguage:function(){var t=this;this.noDataText=this.noDataText||"数据加载中.....",this.columns=[{title:this.$L("名称"),key:"title",sortable:!0,minWidth:120},{title:this.$L("类型"),key:"type",align:"center",sortable:!0,maxWidth:80},{title:this.$L("汇报时间"),key:"created_at",align:"center",sortable:!0,maxWidth:180},{title:this.$L("操作"),align:"center",width:100,minWidth:100,render:function(e,n){var r=n.column,o=n.row;if(!o.id)return null;var i=[e("ETooltip",{props:{content:t.$L("编辑"),transfer:!0,delay:600}},[e("Icon",{props:{type:"md-create",size:16},style:{margin:"0 3px",cursor:"pointer"},on:{click:function(){t.$emit("on-edit",o.id)}}})]),e("ETooltip",{props:{content:t.$L("查看"),transfer:!0,delay:600},style:{position:"relative",marginLeft:"6px"}},[e("Icon",{props:{type:"md-eye",size:16},style:{margin:"0 3px",cursor:"pointer"},on:{click:function(){t.$emit("on-view",o)}}})])];return e("TableAction",{props:{column:r}},i)}}],this.reportTypeList=[{value:"",label:this.$L("全部")},{value:"weekly",label:this.$L("周报")},{value:"daily",label:this.$L("日报")}]},getLists:function(){var t=this;this.loadIng=1,this.$store.dispatch("call",{url:"report/my",data:{page:this.listPage,pagesize:this.listPageSize,created_at:this.createAt,type:this.reportType}}).then((function(e){var n=e.data;e.msg;t.lists=n.data,t.listTotal=n.total,t.lists.length<=0&&(t.noDataText=t.$L("无数据"))})).catch((function(t){var e=t.msg;$A.messageError(e)})).finally((function(){t.loadIng=0}))},setPage:function(t){this.listPage=t,this.getLists()},setPageSize:function(t){Math.max($A.runNum(this.listPageSize),10)!==t&&(this.listPageSize=t,this.getLists())},searchTab:function(){this.getLists()},addReport:function(){this.$emit("on-edit",0)}}};const A=(0,u.Z)(O,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"report-list-wrap"},[n("div",{staticClass:"search-expand"},[n("div",{staticClass:"search-container lr"},[n("ul",[n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("汇报类型"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("Select",{attrs:{placeholder:t.$L("全部")},model:{value:t.reportType,callback:function(e){t.reportType=e},expression:"reportType"}},t._l(t.reportTypeList,(function(e){return n("Option",{key:e.value,attrs:{value:e.value}},[t._v(t._s(e.label))])})),1)],1)]),t._v(" "),n("li",[n("div",{staticClass:"search-label"},[t._v("\n "+t._s(t.$L("汇报时间"))+"\n ")]),t._v(" "),n("div",{staticClass:"search-content"},[n("DatePicker",{attrs:{type:"daterange","split-panels":"",placeholder:t.$L("请选择时间")},model:{value:t.createAt,callback:function(e){t.createAt=e},expression:"createAt"}})],1)]),t._v(" "),n("li",{staticClass:"search-button"},[n("Tooltip",{attrs:{theme:"light",placement:"right","transfer-class-name":"search-button-clear",transfer:""}},[n("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.searchTab}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1)])]),t._v(" "),n("div",{staticClass:"expand-button-group"},[n("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:t.addReport}},[t._v(t._s(t.$L("新增报告")))])],1)]),t._v(" "),n("Table",{ref:"tableRef",staticClass:"tableFill report-row-content",attrs:{columns:t.columns,data:t.lists,loading:t.loadIng>0,"no-data-text":t.$L(t.noDataText),stripe:""}}),t._v(" "),n("Page",{staticClass:"page-box report-row-foot",attrs:{total:t.listTotal,current:t.listPage,disabled:t.loadIng>0,"page-size-opts":[10,20,30,50,100],placement:"top","show-elevator":"","show-sizer":"","show-total":"",transfer:""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)}),[],!1,null,"1d9ad226",null).exports;function L(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function N(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const $={name:"ReportReceive",data:function(){return{loadIng:0,columns:[],lists:[],listPage:1,listTotal:0,listPageSize:10,noDataText:"",username:"",reportType:"",createAt:[],reportTypeList:[]}},mounted:function(){this.getLists()},computed:function(t){for(var e=1;e0,type:"primary",icon:"ios-search"},on:{click:t.searchTab}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1)])]),t._v(" "),n("Table",{ref:"tableRef",staticClass:"tableFill report-row-content",attrs:{columns:t.columns,data:t.lists,loading:t.loadIng>0,"no-data-text":t.$L(t.noDataText),stripe:""}}),t._v(" "),n("Page",{staticClass:"page-box report-row-foot",attrs:{total:t.listTotal,current:t.listPage,disabled:t.loadIng>0,"page-size-opts":[10,20,30,50,100],placement:"top","show-elevator":"","show-sizer":"","show-total":"",transfer:""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)}),[],!1,null,"8f6b5f4c",null).exports;const I={name:"ReportDetail",props:{data:{default:{}}},mounted:function(){this.data.id>0&&this.sendRead()},watch:{data:function(){this.data.id>0&&this.sendRead()}},methods:{sendRead:function(){this.$store.dispatch("call",{url:"report/read",data:{ids:[this.data.id]}}).then((function(t){t.data,t.msg})).catch((function(t){t.msg}))}}};const R=(0,u.Z)(I,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"report-detail"},[n("div",{staticClass:"report-title"},[t._v(t._s(t.data.title))]),t._v(" "),n("div",{staticClass:"report-detail-context"},[n("div",{staticClass:"report-profile"},[n("Row",[n("Col",{attrs:{span:"2"}},[n("div",{staticClass:"report-submitter"},[n("p",[t._v(t._s(t.$L("汇报人")))])])]),t._v(" "),n("Col",{attrs:{span:"6"}},[n("div",{staticClass:"report-submitter"},[n("UserAvatar",{attrs:{userid:t.data.userid,size:28}})],1)]),t._v(" "),n("Col",{attrs:{span:"2"}},[n("div",{staticClass:"report-submitter"},[n("p",[t._v(t._s(t.$L("提交时间")))])])]),t._v(" "),n("Col",{attrs:{span:"6"}},[n("div",{staticClass:"report-submitter"},[n("div",[t._v(t._s(t.data.created_at))])])]),t._v(" "),n("Col",{attrs:{span:"2"}},[n("div",{staticClass:"report-submitter"},[n("p",[t._v(t._s(t.$L("汇报对象")))])])]),t._v(" "),n("Col",{attrs:{span:"6"}},[n("div",{staticClass:"report-submitter"},t._l(t.data.receives_user,(function(t,e){return n("UserAvatar",{key:e,attrs:{userid:t.userid,size:28}})})),1)])],1)],1),t._v(" "),n("Row",{staticClass:"report-main"},[n("Col",{attrs:{span:"2"}},[n("div",{staticClass:"report-submitter"},[n("p",[t._v(t._s(t.$L("汇报内容")))])])]),t._v(" "),n("Col",{attrs:{span:"22"}},[n("div",{staticClass:"report-content",domProps:{innerHTML:t._s(t.data.content)}})])],1)],1)])}),[],!1,null,"50c4f848",null).exports,B={name:"Report",components:{DrawerOverlay:w.Z,ReportEdit:E,ReportMy:A,ReportReceive:P,ReportDetail:R},props:{reportUnreadNumber:{type:Number,default:0},reportType:{default:"my"}},data:function(){return{reportTabs:"my",showDetailDrawer:!1,showEditDrawer:!1,detailData:{},reportId:0}},mounted:function(){this.reportTabs=this.reportType},methods:{tabRebder:function(t){var e=this;return function(n){return n("div",t>0?[n("span",{class:"navbar-item-content"},e.$L("收到的汇报")),n("Badge",{class:"manage-box-report",props:{count:t}})]:[n("span",{class:"navbar-item-content"},e.$L("收到的汇报"))])}},onView:function(t){this.showDetailDrawer=!0,this.detailData=t,this.$emit("on-read")},onEditReport:function(t){this.reportId=t,this.showEditDrawer=!0},saveSuccess:function(){this.reportId=0,this.reportTabs="my",this.showEditDrawer=!1,this.$refs.report&&this.$refs.report.getLists()}}};const M=(0,u.Z)(B,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"report"},[n("Tabs",{model:{value:t.reportTabs,callback:function(e){t.reportTabs=e},expression:"reportTabs"}},[n("TabPane",{attrs:{label:t.$L("我的汇报"),name:"my"}},["my"===t.reportTabs?n("ReportMy",{ref:"report",on:{"on-view":t.onView,"on-edit":t.onEditReport}}):t._e()],1),t._v(" "),n("TabPane",{attrs:{label:t.tabRebder(t.reportUnreadNumber),name:"receive"}},["receive"===t.reportTabs?n("ReportReceive",{on:{"on-view":t.onView}}):t._e()],1)],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:950,transfer:""},model:{value:t.showDetailDrawer,callback:function(e){t.showDetailDrawer=e},expression:"showDetailDrawer"}},[n("ReportDetail",{attrs:{data:t.detailData}})],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:1e3,transfer:""},model:{value:t.showEditDrawer,callback:function(e){t.showEditDrawer=e},expression:"showEditDrawer"}},[n("ReportEdit",{attrs:{id:t.reportId},on:{saveSuccess:t.saveSuccess}})],1)],1)}),[],!1,null,"4cc721de",null).exports;var j=n(80641);n(33301);function z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function F(t){for(var e=1;e-1})):e},taskStyle:function(){var t=this.innerHeight;return{maxHeight:t-(t>900?200:70)-20+"px"}}}),watch:{$route:function(t){this.curPath=t.path,this.chackPass()},userInfo:function(){this.chackPass()},taskId:function(t){t>0&&this.$Modal.resetIndex()},msgAllUnread:function(){this.$Electron&&this.$Electron.ipcRenderer.send("setDockBadge",this.msgAllUnread+this.dashboardTotal+this.reportUnreadNumber)},dashboardTotal:function(){this.$Electron&&this.$Electron.ipcRenderer.send("setDockBadge",this.msgAllUnread+this.dashboardTotal+this.reportUnreadNumber)},reportUnreadNumber:function(){this.$Electron&&this.$Electron.ipcRenderer.send("setDockBadge",this.msgAllUnread+this.dashboardTotal+this.reportUnreadNumber)},projectKeyValue:function(t){var e=this;""!=t&&setTimeout((function(){e.projectKeyValue==t&&e.searchProject()}),600)},natificationHidden:function(t){var e=this;clearTimeout(this.notificationTimeout),t||(this.notificationTimeout=setTimeout((function(){e.notificationClass.close()}),6e3))},wsOpenNum:function(t){var e=this;t<=1||(this.wsOpenTimeout&&clearTimeout(this.wsOpenTimeout),this.wsOpenTimeout=setTimeout((function(){e.$store.dispatch("getBasicData"),e.getReportUnread()}),5e3))},wsMsg:{handler:function(t){var e=t.type,n=t.action;if("report"===e)"unreadUpdate"==n&&this.getReportUnread()},deep:!0}},methods:{initLanguage:function(){this.columns=[{label:this.$L("空白模板"),value:[]},{label:this.$L("软件开发"),value:[this.$L("产品规划"),this.$L("前端开发"),this.$L("后端开发"),this.$L("测试"),this.$L("发布"),this.$L("其它")]},{label:this.$L("产品开发"),value:[this.$L("产品计划"),this.$L("正在设计"),this.$L("正在研发"),this.$L("测试"),this.$L("准备发布"),this.$L("发布成功")]}],this.addRule={name:[{required:!0,message:this.$L("请填写项目名称!"),trigger:"change"},{type:"string",min:2,message:this.$L("项目名称至少2个字!"),trigger:"change"}]}},innerHeightListener:function(){this.innerHeight=window.innerHeight},chackPass:function(){1===this.userInfo.changepass&&this.goForward({path:"/manage/setting/password"})},setTheme:function(t){if($A.isChrome()){switch(t){case"dark":$A.dark.enableDarkMode();break;case"light":$A.dark.disableDarkMode();break;default:$A.dark.autoDarkMode()}this.$store.state.themeMode=t,this.$store.state.themeIsDark=$A.dark.isDarkEnabled(),$A.setStorage("cacheThemeMode",t)}else $A.modalWarning("仅客户端或Chrome浏览器支持主题功能")},toggleRoute:function(t){this.show768Menu=!1,this.goForward({path:"/manage/"+t})},toggleOpenMenu:function(t){this.$set(this.openMenu,t,!this.openMenu[t])},settingRoute:function(t){var e=this;switch(t){case"allUser":return void(this.allUserShow=!0);case"allProject":return void(this.allProjectShow=!0);case"archivedProject":return void(this.archivedProjectShow=!0);case"workReport":return this.reportUnreadNumber>0&&(this.reportTabs="receive"),void(this.workReportShow=!0);case"clearCache":return void this.$store.dispatch("handleClearCache",null).then((function(){$A.setStorage("clearCache",$A.randomString(6)),window.location.reload()})).catch((function(){window.location.reload()}));case"signout":return void $A.modalConfirm({title:"退出登录",content:"你确定要登出系统?",onOk:function(){e.$store.dispatch("logout")}})}this.menu.findIndex((function(e){return e.path==t}))>-1&&this.toggleRoute("setting/"+t)},menuVisibleChange:function(t){this.visibleMenu=t},classNameRoute:function(t,e){return{active:this.curPath=="/manage/"+t,"open-menu":!0===e}},onAddShow:function(){var t=this;this.addShow=!0,this.$nextTick((function(){t.$refs.projectName.focus()}))},onAddProject:function(){var t=this;this.$refs.addProject.validate((function(e){e&&(t.loadIng++,t.$store.dispatch("call",{url:"project/add",data:t.addData}).then((function(e){var n=e.data,r=e.msg;$A.messageSuccess(r),t.loadIng--,t.addShow=!1,t.$refs.addProject.resetFields(),t.$store.dispatch("saveProject",n),t.toggleRoute("project/"+n.id)})).catch((function(e){var n=e.msg;$A.modalError(n),t.loadIng--})))}))},searchProject:function(){var t=this;!0!==this.projectKeyAlready[this.projectKeyValue]&&(this.projectKeyAlready[this.projectKeyValue]=!0,setTimeout((function(){t.projectKeyLoading++}),1e3),this.$store.dispatch("getProjects",{keys:{name:this.projectKeyValue}}).then((function(){t.projectKeyLoading--})).catch((function(){t.projectKeyLoading--})))},selectChange:function(t){var e=this;this.$nextTick((function(){e.$set(e.addData,"columns",e.columns[t].value.join(","))}))},shortcutEvent:function(t){75!==t.keyCode&&78!==t.keyCode||(t.metaKey||t.ctrlKey)&&(t.preventDefault(),this.onAddTask(0))},onAddTask:function(t){this.$refs.addTask.defaultPriority(),this.$refs.addTask.setData($A.isJson(t)?t:{owner:this.userId,column_id:t}),this.addTaskShow=!0},addDialogMsg:function(t){var e=this;if(this.natificationHidden&&this.natificationReady){var n=t.id,r=t.dialog_id,o=t.type,i=t.msg,a="";switch(o){case"text":a=i.text;break;case"file":a="["+this.$L("img"==i.type?"图片信息":"文件信息")+"]";break;default:return}this._notificationId=n,this.notificationClass.replaceOptions({icon:$A.originUrl("images/logo.png"),body:a,data:t,tag:"dialog",requireInteraction:!0});var s=this.cacheDialogs.find((function(t){return t.id==r}));s?(this.notificationClass.replaceTitle(s.name),this.notificationClass.userAgreed()):this.$store.dispatch("getDialogOne",r).then((function(t){var r=t.data;e._notificationId===n&&(e.notificationClass.replaceTitle(r.name),e.notificationClass.userAgreed())})).catch((function(){}))}},taskVisibleChange:function(t){t||this.$store.dispatch("openTask",0)},getReportUnread:function(t){var e=this;this.reportUnreadTimeout&&clearTimeout(this.reportUnreadTimeout),this.reportUnreadTimeout=setTimeout((function(){e.$store.dispatch("call",{url:"report/unread"}).then((function(t){var n=t.data;e.reportUnreadNumber=n.total?n.total:0})).catch((function(){}))}),"number"==typeof t?t:1e3)},notificationInit:function(){var t=this;this.notificationClass=new f(this.$L("打开通知成功")),this.notificationClass.support&&(this.notificationClass.notificationEvent({onclick:function(e){var n=e.target;console.log("[Notification] Click",n),t.notificationClass.close(),window.focus();var r=n.tag,o=n.data;if("dialog"==r){if(!$A.isJson(o))return;t.goForward({path:"/manage/messenger"}),o.dialog_id&&($A.setStorage("messenger::dialogId",o.dialog_id),t.$store.state.dialogOpenId=o.dialog_id)}}}),this.notificationPermission())},notificationPermission:function(){var t=this;this.notificationClass.initNotification((function e(n){switch(n){case"already granted":case"granted":return t.natificationReady=!0;case"close":return t.notificationClass.initNotification(e);case"denied":case"already denied":"denied"===n?console.log("您刚刚拒绝显示通知 请在设置中更改设置"):console.log("您曾级拒绝显示通知 请在设置中更改设置")}}))},onVisibilityChange:function(){var t=this,e="hidden"in document?"hidden":"webkitHidden"in document?"webkitHidden":"mozHidden"in document?"mozHidden":null,n=e.replace(/hidden/i,"visibilitychange");document.addEventListener(n,(function(){t.natificationHidden=!!document[e]}))}}};const V=(0,u.Z)(H,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"show",rawName:"v-show",value:t.userId>0,expression:"userId > 0"}],staticClass:"page-manage"},[n("div",{staticClass:"manage-box-menu",class:{"show768-menu":t.show768Menu}},[n("Dropdown",{staticClass:"manage-box-dropdown",attrs:{trigger:"click"},on:{"on-click":t.settingRoute,"on-visible-change":t.menuVisibleChange}},[n("div",{class:["manage-box-title",t.visibleMenu?"menu-visible":""]},[n("div",{staticClass:"manage-box-avatar"},[n("UserAvatar",{attrs:{userid:t.userId,size:36,tooltipDisabled:""}})],1),t._v(" "),n("span",[t._v(t._s(t.userInfo.nickname))]),t._v(" "),n("Badge",{staticClass:"manage-box-top-report",attrs:{count:t.reportUnreadNumber}}),t._v(" "),n("div",{staticClass:"manage-box-arrow"},[n("Icon",{attrs:{type:"ios-arrow-up"}}),t._v(" "),n("Icon",{attrs:{type:"ios-arrow-down"}})],1)],1),t._v(" "),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[t._l(t.menu,(function(e,r){return n("DropdownItem",{key:r,attrs:{divided:!!e.divided,name:e.path}},[t._v("\n "+t._s(t.$L(e.name))+"\n "),"workReport"===e.path?n("Badge",{staticClass:"manage-menu-report-badge",attrs:{count:t.reportUnreadNumber}}):t._e()],1)})),t._v(" "),n("Dropdown",{attrs:{placement:"right-start"},on:{"on-click":t.setTheme}},[n("DropdownItem",{attrs:{divided:""}},[n("div",{staticClass:"manage-menu-language"},[t._v("\n "+t._s(t.$L("主题皮肤"))+"\n "),n("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),t._v(" "),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},t._l(t.themeList,(function(e,r){return n("Dropdown-item",{key:r,attrs:{name:e.value,selected:t.themeMode===e.value}},[t._v(t._s(t.$L(e.name)))])})),1)],1),t._v(" "),n("Dropdown",{attrs:{placement:"right-start"},on:{"on-click":t.setLanguage}},[n("DropdownItem",{attrs:{divided:""}},[n("div",{staticClass:"manage-menu-language"},[t._v("\n "+t._s(t.currentLanguage)+"\n "),n("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),t._v(" "),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},t._l(t.languageList,(function(e,r){return n("Dropdown-item",{key:r,attrs:{name:r,selected:t.getLanguage()===r}},[t._v(t._s(e))])})),1)],1),t._v(" "),n("DropdownItem",{staticStyle:{color:"#f40"},attrs:{divided:"",name:"signout"}},[t._v(t._s(t.$L("退出登录")))])],2)],1),t._v(" "),n("ul",{staticClass:"overlay-y"},[n("li",{class:t.classNameRoute("dashboard"),on:{click:function(e){return t.toggleRoute("dashboard")}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),n("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("仪表盘")))]),t._v(" "),n("Badge",{staticClass:"menu-badge",attrs:{type:t.dashboardTask.overdue.length>0?"error":"primary",count:t.dashboardTotal}})],1),t._v(" "),n("li",{class:t.classNameRoute("calendar"),on:{click:function(e){return t.toggleRoute("calendar")}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),n("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("日历")))])]),t._v(" "),n("li",{class:t.classNameRoute("messenger"),on:{click:function(e){return t.toggleRoute("messenger")}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),n("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("消息")))]),t._v(" "),n("Badge",{staticClass:"menu-badge",attrs:{count:t.msgAllUnread}})],1),t._v(" "),n("li",{class:t.classNameRoute("file"),on:{click:function(e){return t.toggleRoute("file")}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),n("div",{staticClass:"menu-title"},[t._v(t._s(t.$L("文件")))])]),t._v(" "),n("li",{staticClass:"menu-project"},[n("ul",t._l(t.projectLists,(function(e,r){return n("li",{key:r,class:t.classNameRoute("project/"+e.id,t.openMenu[e.id]),on:{click:function(n){return t.toggleRoute("project/"+e.id)}}},[n("div",{staticClass:"project-h1"},[n("em",{on:{click:function(n){return n.stopPropagation(),t.toggleOpenMenu(e.id)}}}),t._v(" "),n("div",{staticClass:"title"},[t._v(t._s(e.name))]),t._v(" "),e.task_my_num-e.task_my_complete>0?n("div",{staticClass:"num"},[t._v(t._s(e.task_my_num-e.task_my_complete))]):t._e()]),t._v(" "),n("div",{staticClass:"project-h2"},[n("p",[n("em",[t._v(t._s(t.$L("我的"))+":")]),t._v(" "),n("span",[t._v(t._s(e.task_my_complete)+"/"+t._s(e.task_my_num))]),t._v(" "),n("Progress",{attrs:{percent:e.task_my_percent,"stroke-width":6}})],1),t._v(" "),n("p",[n("em",[t._v(t._s(t.$L("全部"))+":")]),t._v(" "),n("span",[t._v(t._s(e.task_complete)+"/"+t._s(e.task_num))]),t._v(" "),n("Progress",{attrs:{percent:e.task_percent,"stroke-width":6}})],1)])])})),0),t._v(" "),t.loadIng>0?n("Loading"):t._e()],1)]),t._v(" "),t.projectTotal>50?n("div",{staticClass:"manage-project-search",class:{loading:t.projectKeyLoading>0}},[n("Input",{attrs:{prefix:"ios-search",placeholder:t.$L("共"+t.projectTotal+"个项目,搜索..."),clearable:""},model:{value:t.projectKeyValue,callback:function(e){t.projectKeyValue=e},expression:"projectKeyValue"}})],1):t._e(),t._v(" "),n("ButtonGroup",{staticClass:"manage-box-new-group"},[n("Button",{staticClass:"manage-box-new",attrs:{type:"primary",icon:"md-add"},on:{click:t.onAddShow}},[t._v(t._s(t.$L("新建项目")))]),t._v(" "),n("Dropdown",{on:{"on-click":function(e){return t.onAddTask(0)}}},[n("Button",{attrs:{type:"primary"}},[n("Icon",{attrs:{type:"ios-arrow-down"}})],1),t._v(" "),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[n("DropdownItem",[t._v(t._s(t.$L("新建任务"))+" ("+t._s(t.mateName)+"+K)")])],1)],1)],1)],1),t._v(" "),n("div",{staticClass:"manage-box-main"},[n("keep-alive",[n("router-view",{staticClass:"manage-box-view overlay"})],1)],1),t._v(" "),n("Modal",{attrs:{title:t.$L("新建项目"),"mask-closable":!1},model:{value:t.addShow,callback:function(e){t.addShow=e},expression:"addShow"}},[n("Form",{ref:"addProject",attrs:{model:t.addData,rules:t.addRule,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{prop:"name",label:t.$L("项目名称")}},[n("Input",{ref:"projectName",attrs:{type:"text"},model:{value:t.addData.name,callback:function(e){t.$set(t.addData,"name",e)},expression:"addData.name"}})],1),t._v(" "),t.addData.columns?n("FormItem",{attrs:{label:t.$L("任务列表")}},[n("TagInput",{model:{value:t.addData.columns,callback:function(e){t.$set(t.addData,"columns",e)},expression:"addData.columns"}})],1):n("FormItem",{attrs:{label:t.$L("项目模板")}},[n("Select",{attrs:{value:0,placeholder:t.$L("请选择模板")},on:{"on-change":t.selectChange}},t._l(t.columns,(function(e,r){return n("Option",{key:r,attrs:{value:r}},[t._v(t._s(e.label))])})),1)],1)],1),t._v(" "),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(e){t.addShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onAddProject}},[t._v(t._s(t.$L("添加")))])],1)],1),t._v(" "),n("Modal",{attrs:{"mask-closable":!1,styles:{width:"90%",maxWidth:"640px"},"footer-hide":""},model:{value:t.addTaskShow,callback:function(e){t.addTaskShow=e},expression:"addTaskShow"}},[n("TaskAdd",{ref:"addTask",model:{value:t.addTaskShow,callback:function(e){t.addTaskShow=e},expression:"addTaskShow"}})],1),t._v(" "),n("Modal",{attrs:{value:t.taskId>0,"mask-closable":!1,styles:{width:"90%",maxWidth:t.taskData.dialog_id?"1200px":"700px"},"footer-hide":""},on:{"on-visible-change":t.taskVisibleChange}},[n("div",{staticClass:"page-manage-task-modal",style:t.taskStyle},[n("TaskDetail",{attrs:{"task-id":t.taskId,"open-task":t.taskData}})],1)]),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:1100},model:{value:t.workReportShow,callback:function(e){t.workReportShow=e},expression:"workReportShow"}},[t.workReportShow?n("Report",{attrs:{reportType:t.reportTabs,reportUnreadNumber:t.reportUnreadNumber},on:{"on-read":t.getReportUnread}}):t._e()],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:1100},model:{value:t.allUserShow,callback:function(e){t.allUserShow=e},expression:"allUserShow"}},[t.allUserShow?n("TeamManagement"):t._e()],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:1100},model:{value:t.allProjectShow,callback:function(e){t.allProjectShow=e},expression:"allProjectShow"}},[t.allProjectShow?n("ProjectManagement"):t._e()],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:1100},model:{value:t.archivedProjectShow,callback:function(e){t.archivedProjectShow=e},expression:"archivedProjectShow"}},[t.archivedProjectShow?n("ProjectArchived"):t._e()],1),t._v(" "),n("DragBallComponent",{attrs:{distanceLeft:0,distanceTop:60},on:{"on-click":function(e){t.show768Menu=!t.show768Menu}}},[n("div",{staticClass:"manage-mini-menu"},[n("Icon",{attrs:{type:t.show768Menu?"md-close":"md-menu"}})],1)])],1)}),[],!1,null,null,null).exports},80887:(t,e,n)=>{"use strict";n.d(e,{Z:()=>L});const r=n(70538).default.prototype.$isServer;function o(t,e){for(let n=0;n`${t}:${r.getPropertyValue(t)}`)).join(";"),paddingSize:i,borderSize:s,boxSizing:o};return e&&n&&(u[n]=c),c}(t,r);s.setAttribute("style",`${l};\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n`),s.value=t.value||t.placeholder||"";let d,f=Number.MIN_SAFE_INTEGER,m=Number.MAX_SAFE_INTEGER,p=s.scrollHeight;if("border-box"===c?p+=i:"content-box"===c&&(p-=o),null!==e||null!==n){s.value=" ";let t=s.scrollHeight-o;null!==e&&(f=t*e,"border-box"===c&&(f=f+o+i),p=Math.max(f,p)),null!==n&&(m=t*n,"border-box"===c&&(m=m+o+i),d=p>m?"":"hidden",p=Math.min(m,p))}return n||(d="hidden"),{height:`${p}px`,minHeight:`${f}px`,maxHeight:`${m}px`,overflowY:d}}function l(t,e,n){this.$children.forEach((r=>{r.$options.name===t?r.$emit.apply(r,[e].concat(n)):l.apply(r,[t,e].concat([n]))}))}function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var f="ivu-input";const m={name:"DragInput",mixins:[{methods:{dispatch(t,e,n){let r=this.$parent||this.$root,o=r.$options.name;for(;r&&(!o||o!==t);)r=r.$parent,r&&(o=r.$options.name);r&&r.$emit.apply(r,[e].concat(n))},broadcast(t,e,n){l.call(this,t,e,n)}}},{inject:{FormInstance:{default:""}},computed:{itemDisabled(){let t=this.disabled;return!t&&this.FormInstance&&(t=this.FormInstance.disabled),t}}}],props:{type:{validator:function(t){return o(t,["text","textarea","password","url","email","date","number","tel"])},default:"text"},value:{type:[String,Number],default:""},size:{validator:function(t){return o(t,["small","large","default"])},default:function(){return this.$IVIEW&&""!==this.$IVIEW.size?this.$IVIEW.size:"default"}},placeholder:{type:String,default:""},maxlength:{type:[String,Number]},disabled:{type:Boolean,default:!1},icon:String,autosize:{type:[Boolean,Object],default:!1},rows:{type:Number,default:2},readonly:{type:Boolean,default:!1},name:{type:String},number:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},spellcheck:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},clearable:{type:Boolean,default:!1},elementId:{type:String},wrap:{validator:function(t){return o(t,["hard","soft"])},default:"soft"},prefix:{type:String,default:""},suffix:{type:String,default:""},search:{type:Boolean,default:!1},enterButton:{type:[Boolean,String],default:!1},showWordLimit:{type:Boolean,default:!1},password:{type:Boolean,default:!1}},data:function(){return{currentValue:this.value,prefixCls:f,slotReady:!1,textareaStyles:{},isOnComposition:!1,showPassword:!1}},computed:{currentType:function(){var t=this.type;return"password"===t&&this.password&&this.showPassword&&(t="text"),t},prepend:function(){var t=!1;return"textarea"!==this.type&&(t=void 0!==this.$slots.prepend),t},append:function(){var t=!1;return"textarea"!==this.type&&(t=void 0!==this.$slots.append),t},showPrefix:function(){var t=!1;return"textarea"!==this.type&&(t=""!==this.prefix||void 0!==this.$slots.prefix),t},showSuffix:function(){var t=!1;return"textarea"!==this.type&&(t=""!==this.suffix||void 0!==this.$slots.suffix),t},wrapClasses:function(){var t;return["".concat(f,"-wrapper"),(t={},d(t,"".concat(f,"-wrapper-").concat(this.size),!!this.size),d(t,"".concat(f,"-type-").concat(this.type),this.type),d(t,"".concat(f,"-group"),this.prepend||this.append||this.search&&this.enterButton),d(t,"".concat(f,"-group-").concat(this.size),(this.prepend||this.append||this.search&&this.enterButton)&&!!this.size),d(t,"".concat(f,"-group-with-prepend"),this.prepend),d(t,"".concat(f,"-group-with-append"),this.append||this.search&&this.enterButton),d(t,"".concat(f,"-hide-icon"),this.append),d(t,"".concat(f,"-with-search"),this.search&&this.enterButton),t)]},inputClasses:function(){var t;return["".concat(f),(t={},d(t,"".concat(f,"-").concat(this.size),!!this.size),d(t,"".concat(f,"-disabled"),this.itemDisabled),d(t,"".concat(f,"-with-prefix"),this.showPrefix),d(t,"".concat(f,"-with-suffix"),this.showSuffix||this.search&&!1===this.enterButton),t)]},textareaClasses:function(){return["".concat(f),d({},"".concat(f,"-disabled"),this.itemDisabled)]},upperLimit:function(){return this.maxlength},textLength:function(){return"number"==typeof this.value?String(this.value).length:(this.value||"").length}},methods:{handleEnter:function(t){this.$emit("on-enter",t),this.search&&this.$emit("on-search",this.currentValue)},handleKeydown:function(t){this.$emit("on-keydown",t)},handleKeypress:function(t){this.$emit("on-keypress",t)},handleKeyup:function(t){this.$emit("on-keyup",t)},handleIconClick:function(t){this.$emit("on-click",t)},handleFocus:function(t){this.$emit("on-focus",t)},handleBlur:function(t){this.$emit("on-blur",t),i(this,["DatePicker","TimePicker","Cascader","Search"])||this.dispatch("FormItem","on-form-blur",this.currentValue)},handleComposition:function(t){"compositionstart"===t.type&&(this.isOnComposition=!0),"compositionend"===t.type&&(this.isOnComposition=!1,this.handleInput(t))},handleInput:function(t){if(!this.isOnComposition){var e=t.target.value;this.number&&""!==e&&(e=Number.isNaN(Number(e))?e:Number(e)),this.$emit("input",e),this.setCurrentValue(e),this.$emit("on-change",t)}},handleChange:function(t){this.$emit("on-input-change",t)},handlePaste:function(t){this.$emit("on-input-paste",t)},setCurrentValue:function(t){var e=this;t!==this.currentValue&&(this.$nextTick((function(){e.resizeTextarea()})),this.currentValue=t,i(this,["DatePicker","TimePicker","Cascader","Search"])||this.dispatch("FormItem","on-form-change",t))},resizeTextarea:function(){var t=this.autosize;if(!t||"textarea"!==this.type)return!1;var e=t.minRows,n=t.maxRows;this.textareaStyles=c(this.$refs.textarea,e,n)},focus:function(){"textarea"===this.type?this.$refs.textarea.focus():this.$refs.input.focus()},blur:function(){"textarea"===this.type?this.$refs.textarea.blur():this.$refs.input.blur()},handleClear:function(){this.$emit("input",""),this.setCurrentValue(""),this.$emit("on-change",{target:{value:""}}),this.$emit("on-clear")},handleSearch:function(){if(this.itemDisabled)return!1;this.$refs.input.focus(),this.$emit("on-search",this.currentValue)},handleToggleShowPassword:function(){var t=this;if(this.itemDisabled)return!1;this.showPassword=!this.showPassword,this.focus();var e=this.currentValue.length;setTimeout((function(){t.$refs.input.setSelectionRange(e,e)}),0)}},watch:{value:function(t){this.setCurrentValue(t)}},mounted:function(){this.slotReady=!0,this.resizeTextarea()}};var p=n(51900);const h=(0,p.Z)(m,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:t.wrapClasses},["textarea"!==t.type?[t.prepend?n("div",{directives:[{name:"show",rawName:"v-show",value:t.slotReady,expression:"slotReady"}],class:[t.prefixCls+"-group-prepend"]},[t._t("prepend")],2):t._e(),t._v(" "),t.clearable&&t.currentValue&&!t.itemDisabled?n("i",{staticClass:"ivu-icon",class:["ivu-icon-ios-close-circle",t.prefixCls+"-icon",t.prefixCls+"-icon-clear",t.prefixCls+"-icon-normal"],on:{click:t.handleClear}}):t.icon?n("i",{staticClass:"ivu-icon",class:["ivu-icon-"+t.icon,t.prefixCls+"-icon",t.prefixCls+"-icon-normal"],on:{click:t.handleIconClick}}):t.search&&!1===t.enterButton?n("i",{staticClass:"ivu-icon ivu-icon-ios-search",class:[t.prefixCls+"-icon",t.prefixCls+"-icon-normal",t.prefixCls+"-search-icon"],on:{click:t.handleSearch}}):t.showSuffix?n("span",{staticClass:"ivu-input-suffix"},[t._t("suffix",(function(){return[t.suffix?n("i",{staticClass:"ivu-icon",class:["ivu-icon-"+t.suffix]}):t._e()]}))],2):t.showWordLimit?n("span",{staticClass:"ivu-input-word-count"},[t._v(t._s(t.textLength)+"/"+t._s(t.upperLimit))]):t.password?n("span",{staticClass:"ivu-input-suffix",on:{click:t.handleToggleShowPassword}},[t.showPassword?n("i",{staticClass:"ivu-icon ivu-icon-ios-eye-off-outline"}):n("i",{staticClass:"ivu-icon ivu-icon-ios-eye-outline"})]):t._e(),t._v(" "),n("transition",{attrs:{name:"fade"}},[t.icon?t._e():n("i",{staticClass:"ivu-icon ivu-icon-ios-loading ivu-load-loop",class:[t.prefixCls+"-icon",t.prefixCls+"-icon-validate"]})]),t._v(" "),n("input",{ref:"input",class:t.inputClasses,attrs:{id:t.elementId,autocomplete:t.autocomplete,spellcheck:t.spellcheck,type:t.currentType,placeholder:t.placeholder,disabled:t.itemDisabled,maxlength:t.maxlength,readonly:t.readonly,name:t.name,number:t.number,autofocus:t.autofocus},domProps:{value:t.currentValue},on:{keyup:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleEnter.apply(null,arguments)},t.handleKeyup],keypress:t.handleKeypress,keydown:t.handleKeydown,focus:t.handleFocus,blur:t.handleBlur,compositionstart:t.handleComposition,compositionupdate:t.handleComposition,compositionend:t.handleComposition,input:t.handleInput,change:t.handleChange,paste:t.handlePaste}}),t._v(" "),t.append?n("div",{directives:[{name:"show",rawName:"v-show",value:t.slotReady,expression:"slotReady"}],class:[t.prefixCls+"-group-append"]},[t._t("append")],2):t.search&&t.enterButton?n("div",{class:[t.prefixCls+"-group-append",t.prefixCls+"-search"],on:{click:t.handleSearch}},[!0===t.enterButton?n("i",{staticClass:"ivu-icon ivu-icon-ios-search"}):[t._v(t._s(t.enterButton))]],2):t.showPrefix?n("span",{staticClass:"ivu-input-prefix"},[t._t("prefix",(function(){return[t.prefix?n("i",{staticClass:"ivu-icon",class:["ivu-icon-"+t.prefix]}):t._e()]}))],2):t._e()]:[n("textarea",{ref:"textarea",class:t.textareaClasses,style:t.textareaStyles,attrs:{id:t.elementId,wrap:t.wrap,autocomplete:t.autocomplete,spellcheck:t.spellcheck,placeholder:t.placeholder,disabled:t.itemDisabled,rows:t.rows,maxlength:t.maxlength,readonly:t.readonly,name:t.name,autofocus:t.autofocus},domProps:{value:t.currentValue},on:{keyup:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleEnter.apply(null,arguments)},t.handleKeyup],keypress:t.handleKeypress,keydown:t.handleKeydown,focus:t.handleFocus,blur:t.handleBlur,compositionstart:t.handleComposition,compositionupdate:t.handleComposition,compositionend:t.handleComposition,input:t.handleInput,paste:t.handlePaste}}),t._v(" "),t.showWordLimit?n("span",{staticClass:"ivu-input-word-count"},[t._v(t._s(t.textLength)+"/"+t._s(t.upperLimit))]):t._e()]],2)}),[],!1,null,null,null).exports;var g=n(85166),v=n(20629);const b={name:"WCircle",props:{percent:{type:Number,default:0},size:{type:Number,default:120}},computed:{style:function(){var t=this.size;return this.isNumeric(t)&&(t+="px"),{width:t,height:t}},args:function(){var t=this.percent,e=Math.min(360,3.6*t);return 360==e?e=0:0==e&&(e=360),{x:14,y:14,r:14,start:360,end:e}}},methods:{isNumeric:function(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)},point:function(t,e,n,r){return[(t+Math.sin(r)*n).toFixed(2),(e-Math.cos(r)*n).toFixed(2)]},full:function(t,e,n,r){return r<=0?"M ".concat(t-n," ").concat(e," A ").concat(n," ").concat(n," 0 1 1 ").concat(t+n," ").concat(e," A ").concat(n," ").concat(n," 1 1 1 ").concat(t-n," ").concat(e," Z"):"M ".concat(t-n," ").concat(e," A ").concat(n," ").concat(n," 0 1 1 ").concat(t+n," ").concat(e," A ").concat(n," ").concat(n," 1 1 1 ").concat(t-n," ").concat(e," M ").concat(t-r," ").concat(e," A ").concat(r," ").concat(r," 0 1 1 ").concat(t+r," ").concat(e," A ").concat(r," ").concat(r," 1 1 1 ").concat(t-r," ").concat(e," Z")},part:function(t,e,n,r,o,i){var a=o/360*2*Math.PI,s=i/360*2*Math.PI,u=[this.point(t,e,r,a),this.point(t,e,n,a),this.point(t,e,n,s),this.point(t,e,r,s)],c=s-a>Math.PI?"1":"0";return"M ".concat(u[0][0]," ").concat(u[0][1]," L ").concat(u[1][0]," ").concat(u[1][1]," A ").concat(n," ").concat(n," 0 ").concat(c," 1 ").concat(u[2][0]," ").concat(u[2][1]," L ").concat(u[3][0]," ").concat(u[3][1]," A ").concat(r," ").concat(r," 0 ").concat(c," 0 ").concat(u[0][0]," ").concat(u[0][1]," Z")},arc:function(t){var e=t.x,n=void 0===e?0:e,r=t.y,o=void 0===r?0:r,i=t.R,a=void 0===i?0:i,s=t.r,u=void 0===s?0:s,c=t.start,l=t.end,d=[Math.max(a,u),Math.min(a,u)];if(u=d[1],(a=d[0])<=0)return"";if(c!==+c||l!==+l)return this.full(n,o,a,u);if(Math.abs(c-l)<1e-6)return"";if(Math.abs(c-l)%360<1e-6)return this.full(n,o,a,u);var f=[c%360,l%360];return(c=f[0])>(l=f[1])&&(l+=360),this.part(n,o,a,u,c,l)}}};const y={name:"DialogView",components:{WCircle:(0,p.Z)(b,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"common-circle",style:t.style,attrs:{"data-id":t.percent}},[n("svg",{attrs:{viewBox:"0 0 28 28"}},[n("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[n("path",{staticClass:"common-circle-path",attrs:{d:"M-500-100h997V48h-997z"}}),t._v(" "),n("g",{attrs:{"fill-rule":"nonzero"}},[n("path",{staticClass:"common-circle-g-path-ring",attrs:{"stroke-width":"3",d:"M14 25.5c6.351 0 11.5-5.149 11.5-11.5S20.351 2.5 14 2.5 2.5 7.649 2.5 14 7.649 25.5 14 25.5z"}}),t._v(" "),n("path",{staticClass:"common-circle-g-path-core",attrs:{d:t.arc(t.args)}})])])])])}),[],!1,null,null,null).exports},props:{msgData:{type:Object,default:function(){return{}}},dialogType:{type:String,default:""}},data:function(){return{read_list:[]}},activated:function(){this.msgRead()},computed:{readList:function(){return this.read_list.filter((function(t){return t.read_at}))},unreadList:function(){return this.read_list.filter((function(t){return!t.read_at}))}},watch:{msgData:{handler:function(){this.msgRead()},immediate:!0}},methods:{msgRead:function(){var t=this;!0!==this.msgData._r&&(this.msgData._r=!0,this.$nextTick((function(){t.$el.offsetParent?t.$store.dispatch("dialogMsgRead",t.msgData):t.msgData._r=!1})))},popperShow:function(){var t=this;this.$store.dispatch("call",{url:"dialog/msg/readlist",data:{msg_id:this.msgData.id}}).then((function(e){var n=e.data;t.read_list=n})).catch((function(){t.read_list=[]}))},textMsg:function(t){return t?t=(t=t.trim().replace(/(\n\x20*){3,}/g,"

    ")).trim().replace(/\n/g,"
    "):""},imageStyle:function(t){var e=t.width,n=t.height;if(e&&n){var r=e,o=n;return(e>220||n>220)&&(e>n?(r=220,o=n*(220/e)):(r=e*(220/n),o=220)),{width:r+"px",height:o+"px"}}return{}}}};const C=(0,p.Z)(y,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"dialog-view",attrs:{"data-id":t.msgData.id}},["text"===t.msgData.type?n("div",{staticClass:"dialog-content"},[n("pre",{staticClass:"no-dark-mode",domProps:{innerHTML:t._s(t.textMsg(t.msgData.msg.text))}})]):"loading"===t.msgData.type?n("div",{staticClass:"dialog-content loading"},[n("Loading")],1):"file"===t.msgData.type?n("div",{class:["dialog-content",t.msgData.msg.type]},[n("a",{attrs:{href:t.msgData.msg.path,target:"_blank"}},["img"===t.msgData.msg.type?n("img",{staticClass:"file-img",style:t.imageStyle(t.msgData.msg),attrs:{src:t.msgData.msg.thumb}}):n("div",{staticClass:"file-box"},[n("img",{staticClass:"file-thumb",attrs:{src:t.msgData.msg.thumb}}),t._v(" "),n("div",{staticClass:"file-info"},[n("div",{staticClass:"file-name"},[t._v(t._s(t.msgData.msg.name))]),t._v(" "),n("div",{staticClass:"file-size"},[t._v(t._s(t.$A.bytesToSize(t.msgData.msg.size)))])])])])]):n("div",{staticClass:"dialog-content unknown"},[t._v(t._s(t.$L("未知的消息类型")))]),t._v(" "),t.msgData.created_at?n("div",{staticClass:"dialog-foot"},[n("div",{staticClass:"time"},[t._v(t._s(t.$A.formatTime(t.msgData.created_at)))]),t._v(" "),t.msgData.send>1||"group"==t.dialogType?n("Poptip",{staticClass:"percent",attrs:{placement:"left-end",transfer:"",width:360,offset:8},on:{"on-popper-show":t.popperShow}},[n("div",{staticClass:"dialog-wrapper-read-poptip-content",attrs:{slot:"content"},slot:"content"},[n("ul",{staticClass:"read"},[n("li",{staticClass:"read-title"},[n("em",[t._v(t._s(t.readList.length))]),t._v(t._s(t.$L("已读")))]),t._v(" "),t._l(t.readList,(function(t){return n("li",[n("UserAvatar",{attrs:{userid:t.userid,size:26,showName:""}})],1)}))],2),t._v(" "),n("ul",{staticClass:"unread"},[n("li",{staticClass:"read-title"},[n("em",[t._v(t._s(t.unreadList.length))]),t._v(t._s(t.$L("未读")))]),t._v(" "),t._l(t.unreadList,(function(t){return n("li",[n("UserAvatar",{attrs:{userid:t.userid,size:26,showName:""}})],1)}))],2)]),t._v(" "),n("WCircle",{attrs:{percent:t.msgData.percentage,size:14}})],1):100===t.msgData.percentage?n("Icon",{staticClass:"done",attrs:{type:"md-done-all"}}):n("Icon",{staticClass:"done",attrs:{type:"md-checkmark"}})],1):n("div",{staticClass:"dialog-foot"},[n("Loading")],1)])}),[],!1,null,null,null).exports;function w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _(t){for(var e=1;e0&&(t.preventDefault(),o.forEach((function(t){n.$refs.chatUpload.upload(t)})))},chatDragOver:function(t,e){var n=this,r=this.__dialogDrag=$A.randomString(8);if(t){if("move"===e.dataTransfer.effectAllowed)return;this.dialogDrag=!0}else setTimeout((function(){r===n.__dialogDrag&&(n.dialogDrag=t)}),150)},chatPasteDrag:function(t,e){var n=this;this.dialogDrag=!1;var r="drag"===e?t.dataTransfer.files:t.clipboardData.files,o=Array.prototype.slice.call(r);o.length>0&&(t.preventDefault(),o.forEach((function(t){n.$refs.chatUpload.upload(t)})))},chatFile:function(t,e){switch(t){case"progress":this.tempMsgs.push({id:e.tempId,dialog_id:this.dialogData.id,type:"loading",userid:this.userId,msg:{}}),this.windowMax768&&this.$refs.input.blur(),this.autoToBottom(),this.onActive();break;case"error":this.tempMsgs=this.tempMsgs.filter((function(t){return t.id!=e.tempId}));break;case"success":this.tempMsgs=this.tempMsgs.filter((function(t){return t.id!=e.tempId})),this.sendSuccess(e.data)}},sendSuccess:function(t){this.$store.dispatch("saveDialogMsg",t),this.$store.dispatch("increaseTaskMsgNum",this.dialogId),this.$store.dispatch("moveDialogTop",this.dialogId),this.$store.dispatch("updateDialogLastMsg",t),this.onActive()},chatScroll:function(t){switch(t.directionreal){case"up":t.scrollE<10&&(this.msgNew=0,this.autoBottom=!0);break;case"down":this.autoBottom=!1}1===t.scale&&(this.msgNew=0,this.autoBottom=!0)},onEventFocus:function(t){this.inputFocus=!0,this.$emit("on-focus",t)},onEventblur:function(t){this.inputFocus=!1,this.$emit("on-blur",t)},onActive:function(){this.$emit("on-active")},autoToBottom:function(){this.$refs.scroller&&this.$refs.scroller.autoToBottom()},openProject:function(){this.dialogData.group_info&&this.goForward({path:"/manage/project/"+this.dialogData.group_info.id})},openTask:function(){this.dialogData.group_info&&this.$store.dispatch("openTask",this.dialogData.group_info.id)},loadNextPage:function(){var t=this,e=this.dialogMsgList[0].id;this.$store.dispatch("getDialogMoreMsgs",this.dialogId).then((function(){t.$nextTick((function(){t.topId=e;var n=document.getElementById("view_"+e);if(n)try{n.scrollIntoView(!0)}catch(t){scrollIntoView(n,{behavior:"instant",inline:"start"})}}))})).catch((function(){}))},addDialogMsg:function(){var t=this;this.isAutoBottom?this.$nextTick(this.autoToBottom):this.$nextTick((function(){t.$refs.scroller&&t.$refs.scroller.scrollInfo().scrollE>10&&t.msgNew++}))}}};const L=(0,p.Z)(A,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.dialogData&&t.dialogData.id?n("div",{staticClass:"dialog-wrapper",on:{drop:function(e){return e.preventDefault(),t.chatPasteDrag(e,"drag")},dragover:function(e){return e.preventDefault(),t.chatDragOver(!0,e)},dragleave:function(e){return e.preventDefault(),t.chatDragOver(!1,e)}}},[t._t("head",(function(){return[n("div",{staticClass:"dialog-title"},[n("div",{staticClass:"main-title"},[n("h2",[t._v(t._s(t.dialogData.name))]),t._v(" "),t.peopleNum>0?n("em",[t._v("("+t._s(t.peopleNum)+")")]):t._e()]),t._v(" "),"group"===t.dialogData.type?["project"===t.dialogData.group_type?n("div",{staticClass:"sub-title pointer",on:{click:t.openProject}},[t._v("\n "+t._s(t.$L("项目聊天室"))+" "+t._s(t.$L("打开项目管理"))+"\n ")]):"task"===t.dialogData.group_type?n("div",{staticClass:"sub-title pointer",on:{click:t.openTask}},[t._v("\n "+t._s(t.$L("任务聊天室"))+" "+t._s(t.$L("查看任务详情"))+"\n ")]):t._e()]:t._e()],2)]})),t._v(" "),n("ScrollerY",{ref:"scroller",staticClass:"dialog-scroller overlay-y",attrs:{"auto-bottom":t.isAutoBottom,static:""},on:{"on-scroll":t.chatScroll}},[n("div",{ref:"manageList",staticClass:"dialog-list"},[n("ul",[t.dialogData.hasMorePages?n("li",{staticClass:"history",on:{click:t.loadNextPage}},[t._v(t._s(t.$L("加载历史消息")))]):t.dialogData.loading>0&&0===t.dialogMsgList.length?n("li",{staticClass:"loading"},[n("Loading")],1):0===t.dialogMsgList.length?n("li",{staticClass:"nothing"},[t._v(t._s(t.$L("暂无消息")))]):t._e(),t._v(" "),t._l(t.dialogMsgList,(function(e){return n("li",{key:e.id,class:{self:e.userid==t.userId,"history-tip":t.topId==e.id},attrs:{id:"view_"+e.id}},[t.topId==e.id?n("em",{staticClass:"history-text"},[t._v(t._s(t.$L("历史消息")))]):t._e(),t._v(" "),n("div",{staticClass:"dialog-avatar"},[n("UserAvatar",{attrs:{userid:e.userid,tooltipDisabled:e.userid==t.userId,size:30}})],1),t._v(" "),n("DialogView",{attrs:{"msg-data":e,"dialog-type":t.dialogData.type}})],1)})),t._v(" "),t._l(t.tempMsgList,(function(e){return n("li",{key:"tmp_"+e.id,class:{self:e.userid==t.userId},attrs:{id:"tmp_"+e.id}},[n("div",{staticClass:"dialog-avatar"},[n("UserAvatar",{attrs:{userid:e.userid,tooltipDisabled:e.userid==t.userId,size:30}})],1),t._v(" "),n("DialogView",{attrs:{"msg-data":e,"dialog-type":t.dialogData.type}})],1)}))],2)])]),t._v(" "),n("div",{class:["dialog-footer",t.msgNew>0&&t.dialogMsgList.length>0?"newmsg":""],on:{click:t.onActive}},[n("div",{staticClass:"dialog-newmsg",on:{click:t.autoToBottom}},[t._v(t._s(t.$L("有"+t.msgNew+"条新消息")))]),t._v(" "),t._t("inputBefore"),t._v(" "),n("DragInput",{ref:"input",staticClass:"dialog-input",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:3},maxlength:255,placeholder:t.$L("输入消息...")},on:{"on-focus":t.onEventFocus,"on-blur":t.onEventblur,"on-keydown":t.chatKeydown,"on-input-paste":t.pasteDrag},model:{value:t.msgText,callback:function(e){t.msgText=e},expression:"msgText"}}),t._v(" "),""!=t.msgText?n("div",{staticClass:"dialog-send",on:{click:t.sendMsg}},[n("Icon",{attrs:{type:"md-send"}})],1):t._e(),t._v(" "),n("DialogUpload",{ref:"chatUpload",staticClass:"chat-upload",attrs:{"dialog-id":t.dialogId},on:{"on-progress":function(e){return t.chatFile("progress",e)},"on-success":function(e){return t.chatFile("success",e)},"on-error":function(e){return t.chatFile("error",e)}}})],2),t._v(" "),t.dialogDrag?n("div",{staticClass:"drag-over",on:{click:function(e){t.dialogDrag=!1}}},[n("div",{staticClass:"drag-text"},[t._v(t._s(t.$L("拖动到这里发送")))])]):t._e()],2):t._e()}),[],!1,null,null,null).exports},63481:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0)}},methods:{logDate:function(t){return $A.formatDate("m-d")==t.ymd?t.ymd+" "+this.$L("今天"):t.key},getLists:function(t){var e=this;!0===t&&(this.listPage=1),this.loadIng++,this.$store.dispatch("call",{url:"project/log/lists",data:{project_id:this.projectId,task_id:this.taskId,page:Math.max(this.listPage,1),pagesize:this.pagesize}}).then((function(n){var r=n.data;e.loadIng--,!0===t&&(e.lists=[]),r.data.some((function(t){var n=t.time,r=n.ymd+" "+n.week,o=e.lists.find((function(t){return t.key==r}));if(o){var i=o.lists.find((function(e){return e.userid==t.userid}));i?i.lists.push(t):o.lists.push({userid:t.userid,lists:[t]})}else e.lists.push({key:r,ymd:t.ymd,lists:[{userid:t.userid,lists:[t]}]})})),e.hasMorePages=r.current_page ").concat(u))):i.push(t("span",u))}if(o.userid){var c=$A.isArray(o.userid)?o.userid:[o.userid],l=[];c.some((function(e){l.push(t("UserAvatar",{props:{size:18,userid:e}}))})),l.length>0&&i.push(t("div",{class:"detail-user"},[t("div",{class:"detail-user-wrap"},l)]))}}return t("span",{class:"log-text"},i)},operationList:function(t){var e=t.id,n=t.record,r=[];return $A.isJson(n)?(this.taskId>0&&$A.isJson(n.flow)&&r.push({id:e,button:"重置",content:"确定重置为【".concat($A.getMiddle(n.flow.flow_item_name,"|"),"】吗?")}),r):r},onOperation:function(t){var e=this;$A.modalConfirm({content:t.content,loading:!0,onOk:function(){e.$store.dispatch("call",{url:"project/task/resetfromlog",data:{id:t.id}}).then((function(t){var n=t.data,r=t.msg;$A.messageSuccess(r),e.$Modal.remove(),e.$store.dispatch("saveTask",n),e.getLists(!0)})).catch((function(t){var n=t.msg;$A.modalError(n,301),e.$Modal.remove()}))}})},openTask:function(t){this.$store.dispatch("openTask",t)}}};const a=(0,n(51900).Z)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:["project-log",0==t.taskId?"is-drawer":""]},[n("div",{staticClass:"log-title"},[t._v(t._s(t.$L("项目动态")))]),t._v(" "),n("ul",{staticClass:"logs-activity"},[t._l(t.lists,(function(e){return n("li",[n("div",{staticClass:"logs-date"},[t._v(t._s(t.logDate(e)))]),t._v(" "),n("div",{staticClass:"logs-section"},[n("Timeline",t._l(e.lists,(function(e,r){return n("TimelineItem",{key:r},[n("div",{staticClass:"logs-dot",attrs:{slot:"dot"},slot:"dot"},[e.userid?n("UserAvatar",{attrs:{userid:e.userid,size:18,showName:""}}):n("div",{staticClass:"avatar-wrapper common-avatar"},[n("EAvatar",{attrs:{size:18}},[t._v("A")]),t._v(" "),n("div",{staticClass:"avatar-name auto"},[t._v(t._s(t.$L("系统")))])],1)],1),t._v(" "),t._l(e.lists,(function(e){return[n("div",{staticClass:"log-summary"},[n("ProjectLogDetail",{attrs:{render:t.logDetail,item:e}}),t._v(" "),t.operationList(e).length>0?n("span",{staticClass:"log-operation"},t._l(t.operationList(e),(function(e,r){return n("Button",{key:r,attrs:{size:"small"},on:{click:function(n){return t.onOperation(e)}}},[t._v(t._s(e.button))])})),1):t._e(),t._v(" "),n("span",{staticClass:"log-time"},[t._v(t._s(e.time.ymd)+" "+t._s(e.time.segment)+" "+t._s(e.time.hi))])],1),t._v(" "),e.project_task?n("div",{staticClass:"log-task"},[n("em",{on:{click:function(n){return t.openTask(e.project_task)}}},[t._v(t._s(t.$L("关联任务"))+": "+t._s(e.project_task.name))])]):t._e()]}))],2)})),1)],1)])})),t._v(" "),t.loadIng>0?n("li",{staticClass:"logs-loading"},[n("Loading")],1):t.hasMorePages?n("li",{staticClass:"logs-more",on:{click:t.getMore}},[t._v(t._s(t.$L("加载更多")))]):0==t.totalNum?n("li",{staticClass:"logs-none",on:{click:function(e){return t.getLists(!0)}}},[t._v(t._s(t.$L("没有任何动态")))]):t._e()],2)])}),[],!1,null,null,null).exports},86014:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(72593),o=n(20629);function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e0)return n}return 0}}),watch:{value:function(t){var e=this;t?(this.ready=!0,this.initCascaderData(),this.initProjectData(),this.$nextTick((function(){e.$refs.input.focus()}))):(this.beforeClose.some((function(t){"function"==typeof t&&t()})),this.beforeClose=[],this.taskTimeOpen=!1)},"addData.project_id":function(t){$A.setStorage("cacheAddTaskProjectId",t)},"addData.column_id":function(t){var e=this,n=this.addData,r=n.project_id,o=n.column_id;this.$nextTick((function(){r&&o?e.$set(e.addData,"cascader",[r,o]):e.$set(e.addData,"cascader",[])})),$A.setStorage("cacheAddTaskColumnId",t)}},methods:{initLanguage:function(){},initCascaderData:function(){var t=this;this.cascaderData=this.cacheProjects.map((function(e){var n=t.cacheColumns.filter((function(t){return t.project_id==e.id})).map((function(t){return{value:t.id,label:t.name}})),r={value:e.id,label:e.name,children:n};return 0==n.length&&(r.loading=!1),r}))},initProjectData:function(){var t=this,e=this.addData.column_id;if(e){var n=this.cacheColumns.find((function(t){return t.id==e}));n&&(this.addData.project_id=n.project_id,this.addData.column_id=n.id)}else{var r=$A.getStorageInt("cacheAddTaskProjectId"),o=$A.getStorageInt("cacheAddTaskColumnId"),i=this.cacheProjects.find((function(e){return e.id==t.projectId}))||this.cacheProjects.find((function(t){return t.id==r}))||this.cacheProjects.find((function(t){return t.id>0}));if(i){var a=this.cacheColumns.find((function(t){var e=t.project_id,n=t.id;return e==i.id&&n==o}))||this.cacheColumns.find((function(t){return t.project_id==i.id}));a?(this.addData.project_id=a.project_id,this.addData.column_id=a.id):this.$store.dispatch("getColumns",i.id).then((function(){(a=t.cacheColumns.find((function(t){var e=t.project_id,n=t.id;return e==i.id&&n==o}))||t.cacheColumns.find((function(t){return t.project_id==i.id})))&&(t.addData.project_id=a.project_id,t.addData.column_id=a.id)})).catch((function(){}))}}},taskTimeOpenChange:function(t){this.taskTimeOpen=t},taskTimeChange:function(t){var e=$A.date2string(t,"Y-m-d H:i");e[0]&&e[1]&&$A.rightExists(e[0],"00:00")&&$A.rightExists(e[1],"00:00")&&this.$set(t,1,e[1].replace("00:00","23:59"))},onKeydown:function(t){if(13===t.keyCode){if(t.shiftKey)return;t.preventDefault(),this.onAdd()}},addSubTask:function(){""!==this.subName.trim()&&(this.addData.subtasks.push({name:this.subName.trim(),times:[],owner:this.userId}),this.subName="")},taskPriorityContent:function(t){var e=$A.runNum(t.days);return e<=0?t.name+" ("+this.$L("无时间限制")+")":t.name+" ("+e+this.$L("天")+")"},choosePriority:function(t){var e=new Date,n=$A.runNum(t.days);if(n>0){var r=new Date((new Date).setDate(e.getDate()+n));this.$set(this.addData,"times",$A.date2string([e,r]))}else this.$set(this.addData,"times",[]);this.$set(this.addData,"p_level",t.priority),this.$set(this.addData,"p_name",t.name),this.$set(this.addData,"p_color",t.color)},defaultPriority:function(){0!==this.taskPriority.length&&(this.addData.p_name||this.choosePriority(this.taskPriority[0]))},cascaderLoadData:function(t,e){t.loading=!0,this.$store.dispatch("getColumns",t.value).then((function(n){t.children=n.map((function(t){return{value:t.id,label:t.name}})),t.loading=!1,e()})).catch((function(){t.loading=!1,e()}))},cascaderInputChange:function(t){var e=this;this.cascaderValue=t||"",!0!==this.cascaderAlready[this.cascaderValue]&&(this.cascaderAlready[this.cascaderValue]=!0,setTimeout((function(){e.cascaderLoading++}),1e3),this.$store.dispatch("getProjects",{keys:{name:this.cascaderValue},getcolumn:"yes"}).then((function(){e.cascaderLoading--,e.initCascaderData()})).catch((function(){e.cascaderLoading--})))},setData:function(t){void 0!==t.beforeClose&&(this.beforeClose.push(t.beforeClose),delete t.beforeClose),this.addData=Object.assign({},this.addData,t)},onAdd:function(t){var e=this;this.addData.name?(this.loadIng++,this.$store.dispatch("taskAdd",this.addData).then((function(n){var r=n.msg;e.loadIng--,$A.messageSuccess(r),!0===t?(e.addData=Object.assign({},e.addData,{name:"",content:"",subtasks:[]}),e.$refs.input.focus()):(e.addData={cascader:[],name:"",content:"",owner:0,column_id:0,times:[],subtasks:[],p_level:0,p_name:"",p_color:""},e.close())})).catch((function(t){var n=t.msg;e.loadIng--,$A.modalError(n)}))):$A.messageError("任务描述不能为空")},close:function(){this.$emit("input",!this.value)}}};const c=(0,n(51900).Z)(u,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.ready?n("div",{staticClass:"task-add"},[n("div",{staticClass:"head",class:{empty:0==t.addData.cascader.length,visible:t.cascaderShow}},[n("Cascader",{attrs:{data:t.cascaderData,clearable:!1,placeholder:t.$L("请选择项目"),"load-data":t.cascaderLoadData,filterable:""},on:{"on-input-change":t.cascaderInputChange,"on-visible-change":function(e){t.cascaderShow=!t.cascaderShow}},model:{value:t.addData.cascader,callback:function(e){t.$set(t.addData,"cascader",e)},expression:"addData.cascader"}})],1),t._v(" "),n("div",{staticClass:"task-add-form"},[n("div",{staticClass:"title"},[n("Input",{ref:"input",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255,placeholder:t.$L("任务描述")},on:{"on-keydown":t.onKeydown},model:{value:t.addData.name,callback:function(e){t.$set(t.addData,"name",e)},expression:"addData.name"}})],1),t._v(" "),n("div",{staticClass:"desc"},[n("TEditor",{attrs:{plugins:t.taskPlugins,options:t.taskOptions,"option-full":t.taskOptionFull,placeholder:t.$L(t.$store.state.windowMax768?"详细描述,选填...":"详细描述,选填...(点击右键使用工具栏)"),placeholderFull:t.$L("详细描述..."),inline:""},model:{value:t.addData.content,callback:function(e){t.$set(t.addData,"content",e)},expression:"addData.content"}})],1),t._v(" "),n("div",{staticClass:"advanced-option"},[n("Button",{class:{advanced:t.advanced},on:{click:function(e){t.advanced=!t.advanced}}},[t._v(t._s(t.$L("高级选项")))]),t._v(" "),n("ul",{staticClass:"advanced-priority"},t._l(t.taskPriority,(function(e,r){return n("li",{key:r},[n("ETooltip",{attrs:{content:t.taskPriorityContent(e)}},[n("i",{staticClass:"taskfont",style:{color:e.color},domProps:{innerHTML:t._s(t.addData.p_name==e.name?"":"")},on:{click:function(n){return t.choosePriority(e)}}})])],1)})),0),t._v(" "),t.taskDays>0?n("DatePicker",{attrs:{open:t.taskTimeOpen,options:t.timeOptions,placeholder:t.$L("选择计划范围"),format:"yyyy/MM/dd HH:mm",type:"datetimerange",placement:"bottom"},on:{"on-change":function(e){return t.taskTimeChange(t.addData.times)},"on-open-change":t.taskTimeOpenChange},model:{value:t.addData.times,callback:function(e){t.$set(t.addData,"times",e)},expression:"addData.times"}},[n("div",{staticClass:"advanced-time",on:{click:function(e){return t.taskTimeOpenChange(!t.taskTimeOpen)}}},[n("Icon",{attrs:{type:"ios-clock-outline"}}),t._v(" "),n("em",{style:t.addData.p_color?{backgroundColor:t.addData.p_color}:{},attrs:{type:"primary"}},[t._v(t._s(t.taskDays))])],1)]):t._e()],1)]),t._v(" "),t.advanced?n("Form",{staticClass:"task-add-advanced",attrs:{"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{label:t.$L("计划时间")}},[n("DatePicker",{attrs:{options:t.timeOptions,editable:!1,placeholder:t.$L("选择计划范围"),format:"yyyy/MM/dd HH:mm",type:"datetimerange"},on:{"on-change":function(e){return t.taskTimeChange(t.addData.times)}},model:{value:t.addData.times,callback:function(e){t.$set(t.addData,"times",e)},expression:"addData.times"}})],1),t._v(" "),n("FormItem",{attrs:{label:t.$L("任务负责人")}},[n("UserInput",{attrs:{"multiple-max":10,placeholder:t.$L("选择任务负责人"),"project-id":t.addData.project_id},model:{value:t.addData.owner,callback:function(e){t.$set(t.addData,"owner",e)},expression:"addData.owner"}})],1),t._v(" "),n("div",{staticClass:"subtasks"},[t.addData.subtasks.length>0?n("div",{staticClass:"sublist"},[n("Row",[n("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("任务描述")))]),t._v(" "),n("Col",{attrs:{span:"6"}},[t._v(t._s(t.$L("计划时间")))]),t._v(" "),n("Col",{attrs:{span:"6"}},[t._v(t._s(t.$L("负责人")))])],1),t._v(" "),t._l(t.addData.subtasks,(function(e,r){return n("Row",{key:r},[n("Col",{attrs:{span:"12"}},[n("Input",{attrs:{maxlength:255,clearable:""},on:{"on-clear":function(e){return t.addData.subtasks.splice(r,1)}},model:{value:e.name,callback:function(n){t.$set(e,"name",n)},expression:"item.name"}})],1),t._v(" "),n("Col",{attrs:{span:"6"}},[n("DatePicker",{attrs:{options:t.timeOptions,editable:!1,placeholder:t.$L("选择时间"),format:"yyyy/MM/dd HH:mm",type:"datetimerange"},on:{"on-change":function(n){return t.taskTimeChange(e.times)}},model:{value:e.times,callback:function(n){t.$set(e,"times",n)},expression:"item.times"}})],1),t._v(" "),n("Col",{attrs:{span:"6"}},[n("UserInput",{attrs:{"multiple-max":1,placeholder:t.$L("选择负责人"),"project-id":t.addData.project_id},model:{value:e.owner,callback:function(n){t.$set(e,"owner",n)},expression:"item.owner"}})],1)],1)}))],2):t._e(),t._v(" "),n("Input",{class:["enter-input",""==t.subName?"empty":""],attrs:{type:"text",placeholder:t.$L("+ 输入子任务,回车添加子任务")},on:{"on-enter":t.addSubTask},model:{value:t.subName,callback:function(e){t.subName=e},expression:"subName"}})],1)],1):t._e(),t._v(" "),n("div",{staticClass:"ivu-modal-footer"},[n("div",{staticClass:"adaption"},[n("Button",{attrs:{type:"default"},on:{click:t.close}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("ButtonGroup",{staticClass:"page-manage-add-task-button-group"},[n("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onAdd}},[t._v(t._s(t.$L("添加任务")))]),t._v(" "),n("Dropdown",{on:{"on-click":function(e){return t.onAdd(!0)}}},[n("Button",{attrs:{type:"primary"}},[n("Icon",{attrs:{type:"ios-arrow-down"}})],1),t._v(" "),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[n("DropdownItem",{attrs:{disabled:t.loadIng>0}},[t._v(t._s(t.$L("提交继续添加")))])],1)],1)],1)],1)])],1):t._e()}),[],!1,null,null,null).exports},36323:(t,e,n)=>{"use strict";n.d(e,{Z:()=>C});var r=n(20629),o=n(72593),i=n(25199),a=n(96921);function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e-1&&this.taskFiles.splice(i,1),1===n?this.taskFiles.push(r):(this.$refs.upload.fileList.pop(),$A.modalWarning({title:"发送失败",content:"文件 "+e.name+" 发送失败,"+o}))},handleFormatError:function(t){$A.modalWarning({title:"文件格式不正确",content:"文件 "+t.name+" 格式不正确,仅支持发送:"+this.uploadFormat.join(",")})},handleMaxSize:function(t){$A.modalWarning({title:"超出文件大小限制",content:"文件 "+t.name+" 太大,不能发送超过"+$A.bytesToSize(1024*this.maxSize)+"。"})},handleClick:function(){this.$refs.upload.handleClick()},upload:function(t){this.$refs.upload.upload(t)}}};var d=n(51900);const f=(0,d.Z)(l,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("Upload",{ref:"upload",attrs:{name:"files",action:t.actionUrl,headers:t.headers,data:t.params,multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-progress":t.handleProgress,"on-success":t.handleSuccess,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize}})}),[],!1,null,null,null).exports;var m=n(80887),p=n(63481),h=n(80641);function g(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function v(t){for(var e=1;e0&&!this.$store.state.windowMax768},dialogStyle:function(){var t=this.innerHeight,e=this.hasOpenDialog;return t&&e?{minHeight:t-(t>900?200:70)-48+"px"}:{}},cutTime:function(){var t=this.taskDetail,e=Math.round($A.Date(t.start_at).getTime()/1e3),n=Math.round($A.Date(t.end_at).getTime()/1e3);return $A.formatDate("Y/m/d",e)==$A.formatDate("Y/m/d",n)?$A.formatDate("Y/m/d H:i",e)+" ~ "+$A.formatDate("H:i",n):$A.formatDate("Y",e)==$A.formatDate("Y",n)?($A.formatDate("Y/m/d H:i",e)+" ~ "+$A.formatDate("m/d H:i",n)).replace(/( 00:00| 23:59)/g,""):($A.formatDate("Y/m/d H:i",e)+" ~ "+$A.formatDate("Y/m/d H:i",n)).replace(/( 00:00| 23:59)/g,"")},getOwner:function(){var t=this.taskDetail;return $A.isArray(t.task_user)?t.task_user.filter((function(t){return 1===t.owner})).sort((function(t,e){return t.id-e.id})):[]},getAssist:function(){var t=this.taskDetail;return $A.isArray(t.task_user)?t.task_user.filter((function(t){return 1!==t.owner})).sort((function(t,e){return t.id-e.id})):[]},menuList:function(){var t=this.taskDetail,e=[];return t.p_name||e.push({command:"priority",icon:"",name:"优先级"}),$A.isArray(t.task_user)&&t.task_user.find((function(t){return 1!==t.owner}))||e.push({command:"assist",icon:"",name:"协助人员"}),t.end_at||e.push({command:"times",icon:"",name:"截止时间"}),0==this.fileList.length&&e.push({command:"file",icon:"",name:"附件"}),0==this.subList.length&&e.push({command:"subtask",icon:"",name:"子任务"}),e}}),watch:{openTask:{handler:function(t){this.taskDetail=$A.cloneJSON(t)},immediate:!0,deep:!0},taskId:{handler:function(t){t>0?this.ready=!0:(this.timeOpen=!1,this.timeForce=!1,this.assistForce=!1,this.addsubForce=!1,this.receiveShow=!1,this.$refs.owner&&this.$refs.owner.handleClose(),this.$refs.assist&&this.$refs.assist.handleClose())},immediate:!0},receiveShow:function(t){t&&(this.timeValue=this.taskDetail.end_at?[this.taskDetail.start_at,this.taskDetail.end_at]:[])}},methods:{initLanguage:function(){},innerHeightListener:function(){this.innerHeight=Math.min(1100,window.innerHeight)},expiresFormat:function(t){return $A.countDownFormat(t,this.nowTime)},onNameKeydown:function(t){83===t.keyCode?(t.metaKey||t.ctrlKey)&&(t.preventDefault(),this.updateData("name")):13===t.keyCode&&(t.shiftKey||(t.preventDefault(),this.updateData("name")))},updateData:function(t,e){var n=this;switch(t){case"priority":this.$set(this.taskDetail,"p_level",e.priority),this.$set(this.taskDetail,"p_name",e.name),this.$set(this.taskDetail,"p_color",e.color),t=["p_level","p_name","p_color"];break;case"times":this.$set(this.taskDetail,"times",[e.start_at,e.end_at]);break;case"content":if(this.$refs.desc.getContent()==this.taskContent)return;this.$set(this.taskDetail,"content",this.$refs.desc.getContent())}var r={task_id:this.taskDetail.id};($A.isArray(t)?t:[t]).forEach((function(t){var e=n.taskDetail[t],o=n.openTask[t];$A.jsonStringify(e)!=$A.jsonStringify(o)&&(r[t]=e)})),Object.keys(r).length<=1||this.$store.dispatch("taskUpdate",r).then((function(t){var e=t.msg;$A.messageSuccess(e)})).catch((function(t){var e=t.msg;$A.modalError(e)}))},archivedOrRemoveTask:function(t){var e=this,n="remove"==t?"removeTask":"archivedTask",r="remove"==t?"删除":"归档",o=this.taskDetail.parent_id>0?"子任务":"任务";$A.modalConfirm({title:r+o,content:"你确定要"+r+o+"【"+this.taskDetail.name+"】吗?",loading:!0,onOk:function(){!0!==e.taskDetail.loading?(e.$set(e.taskDetail,"loading",!0),e.$store.dispatch(n,e.taskDetail.id).then((function(t){var n=t.msg;$A.messageSuccess(n),e.$Modal.remove()})).catch((function(t){var n=t.msg;$A.modalError(n,301),e.$Modal.remove()}))):e.$Modal.remove()}})},openOwner:function(){var t=this.getOwner.map((function(t){return t.userid}));this.$set(this.taskDetail,"owner_userid",t),this.$set(this.ownerData,"owner_userid",t),this.ownerShow=!0},onOwner:function(t){var e=this,n={task_id:this.taskDetail.id,owner:this.ownerData.owner_userid};if(!0===t){if(this.getOwner.length>0)return this.receiveShow=!1,void $A.messageError("任务已被领取");var r=$A.date2string(this.timeValue,"Y-m-d H:i");if(!r[0]||!r[1])return void $A.messageError("请设置计划时间");$A.rightExists(r[0],"00:00")&&$A.rightExists(r[1],"00:00")&&(r[1]=r[1].replace("00:00","23:59")),n.times=r,n.owner=this.ownerData.owner_userid=[this.userId]}$A.jsonStringify(this.taskDetail.owner_userid)!==$A.jsonStringify(this.ownerData.owner_userid)&&(0==$A.count(n.owner)&&(n.owner=""),this.ownerLoad++,this.$store.dispatch("taskUpdate",n).then((function(t){var n=t.msg;$A.messageSuccess(n),e.ownerLoad--,e.ownerShow=!1,e.receiveShow=!1,e.$store.dispatch("getTaskOne",e.taskDetail.id).catch((function(){}))})).catch((function(t){var n=t.msg;$A.modalError(n),e.ownerLoad--,e.ownerShow=!1,e.receiveShow=!1})))},openAssist:function(){var t=this.getAssist.map((function(t){return t.userid}));this.$set(this.taskDetail,"assist_userid",t),this.$set(this.assistData,"assist_userid",t),this.$set(this.assistData,"disabled",this.getOwner.map((function(t){return t.userid}))),this.assistShow=!0},onAssist:function(){var t=this;if($A.jsonStringify(this.taskDetail.assist_userid)!==$A.jsonStringify(this.assistData.assist_userid)){var e=this.assistData.assist_userid;0===e.length&&(e=!1),this.assistLoad++,this.$store.dispatch("taskUpdate",{task_id:this.taskDetail.id,assist:e}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.assistLoad--,t.assistShow=!1,t.$store.dispatch("getTaskOne",t.taskDetail.id).catch((function(){}))})).catch((function(e){var n=e.msg;$A.modalError(n),t.assistLoad--,t.assistShow=!1}))}},openTime:function(){this.timeOpen=!this.timeOpen,this.timeOpen&&(this.timeValue=this.taskDetail.end_at?[this.taskDetail.start_at,this.taskDetail.end_at]:[])},timeChange:function(t){t||(this.timeOpen=!1)},timeClear:function(){this.updateData("times",{start_at:!1,end_at:!1}),this.timeOpen=!1},timeOk:function(){var t=$A.date2string(this.timeValue,"Y-m-d H:i");t[0]&&t[1]&&$A.rightExists(t[0],"00:00")&&$A.rightExists(t[1],"00:00")&&(t[1]=t[1].replace("00:00","23:59")),this.updateData("times",{start_at:t[0],end_at:t[1]}),this.timeOpen=!1},addsubOpen:function(){var t=this;this.addsubShow=!0,this.$nextTick((function(){t.$refs.addsub.focus()}))},addsubChackClose:function(){""==this.addsubName&&(this.addsubShow=!1)},addsubKeydown:function(t){if(13===t.keyCode){if(t.shiftKey)return;t.preventDefault(),this.onAddsub()}},onAddsub:function(){var t=this;""!=this.addsubName?(this.addsubLoad++,this.$store.dispatch("taskAddSub",{task_id:this.taskDetail.id,name:this.addsubName}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.addsubLoad--,t.addsubName=""})).catch((function(e){var n=e.msg;$A.modalError(n),t.addsubLoad--}))):$A.messageSuccess("任务描述不能为空")},getLogLists:function(){"log"==this.navActive&&this.$refs.log.getLists(!0)},logLoadChange:function(t){this.logLoadIng=t},dropAdd:function(t){var e=this;switch(t){case"priority":this.$set(this.taskDetail,"p_name",this.$L("未设置")),this.$nextTick((function(){e.$refs.priority.show()}));break;case"assist":this.assistForce=!0,this.openAssist(),this.$nextTick((function(){e.$refs.assist.handleClick()}));break;case"times":this.timeForce=!0,this.$nextTick((function(){e.openTime()}));break;case"file":this.$refs.upload.handleClick();break;case"subtask":this.addsubForce=!0,this.$nextTick((function(){e.addsubOpen()}))}},msgKeydown:function(t){if(13===t.keyCode){if(t.shiftKey)return;t.preventDefault(),this.msgDialog()}},msgDialog:function(){var t=this;this.msgText&&(this.sendLoad>0||(this.sendLoad++,this.$store.dispatch("call",{url:"project/task/dialog",data:{task_id:this.taskDetail.id}}).then((function(e){var n=e.data;t.$store.dispatch("saveTask",n),t.$store.dispatch("getDialogOne",n.dialog_id).then((function(){t.sendLoad--,$A.isSubElectron?t.resizeDialog():t.$nextTick((function(){t.$store.state.windowMax768?(t.goForward({path:"/manage/messenger",query:{sendmsg:t.msgText}}),$A.setStorage("messenger::dialogId",n.dialog_id),t.$store.state.dialogOpenId=n.dialog_id,t.$store.dispatch("openTask",0)):t.$refs.dialog.sendMsg(t.msgText),t.msgText=""}))})).catch((function(e){var n=e.msg;t.sendLoad--,$A.modalError(n)}))})).catch((function(e){var n=e.msg;t.sendLoad--,$A.modalError(n)}))))},openSend:function(){var t=this;this.sendLoad>0||(this.sendLoad++,this.$store.dispatch("call",{url:"project/task/dialog",data:{task_id:this.taskDetail.id}}).then((function(e){var n=e.data;t.sendLoad--,t.$store.dispatch("saveTask",n),t.$store.dispatch("getDialogOne",n.dialog_id).catch((function(){})),$A.isSubElectron?t.resizeDialog():t.$nextTick((function(){t.goForward({path:"/manage/messenger",query:{sendmsg:t.msgText}}),$A.setStorage("messenger::dialogId",n.dialog_id),t.$store.state.dialogOpenId=n.dialog_id,t.$store.dispatch("openTask",0)}))})).catch((function(e){var n=e.msg;t.sendLoad--,$A.modalError(n)})))},deleteFile:function(t){var e=this;this.$set(t,"_deling",!1),this.$store.dispatch("forgetTaskFile",t.id),this.$store.dispatch("call",{url:"project/task/filedelete",data:{file_id:t.id}}).catch((function(t){var n=t.msg;$A.modalError(n),e.$store.dispatch("getTaskFiles",e.taskDetail.id)}))},openMenu:function(t){var e=this.$refs["taskMenu_".concat(t.id)];e&&e.handleClick()},openNewWin:function(){var t={parent:null,width:Math.min(window.screen.availWidth,this.$el.clientWidth+72),height:Math.min(window.screen.availHeight,this.$el.clientHeight+72),minWidth:600,minHeight:450};this.hasOpenDialog&&(t.minWidth=800,t.minHeight=600),this.$Electron.ipcRenderer.send("windowRouter",{title:this.taskDetail.name,titleFixed:!0,name:"task-"+this.taskDetail.id,path:"/single/task/"+this.taskDetail.id,force:!1,config:t}),this.$store.dispatch("openTask",0)},resizeDialog:function(){var t=this;if(this.$Electron.ipcRenderer.sendSync("windowSize",{width:Math.max(1100,window.innerWidth),height:Math.max(720,window.innerHeight),minWidth:800,minHeight:600,autoZoom:!0}),this.msgText)var e=0,n=setInterval((function(){e++,(t.$refs.dialog||e>20)&&(clearInterval(n),t.$refs.dialog&&(t.$refs.dialog.sendMsg(t.msgText),t.msgText=""))}),100)}}};const C=(0,d.Z)(y,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.ready&&t.taskDetail.parent_id>0?n("li",[n("div",{staticClass:"subtask-icon"},[n("TaskMenu",{ref:"taskMenu_"+t.taskDetail.id,attrs:{task:t.taskDetail,"load-status":!0===t.taskDetail.loading},on:{"on-update":t.getLogLists}})],1),t._v(" "),t.taskDetail.flow_item_name?n("div",{staticClass:"subtask-flow"},[n("span",{class:t.taskDetail.flow_item_status,on:{click:function(e){return e.stopPropagation(),t.openMenu(t.taskDetail)}}},[t._v(t._s(t.taskDetail.flow_item_name))])]):t._e(),t._v(" "),n("div",{staticClass:"subtask-name"},[n("Input",{attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255},on:{"on-blur":function(e){return t.updateData("name")},"on-keydown":t.onNameKeydown},model:{value:t.taskDetail.name,callback:function(e){t.$set(t.taskDetail,"name",e)},expression:"taskDetail.name"}})],1),t._v(" "),n("DatePicker",{staticClass:"subtask-time",attrs:{open:t.timeOpen,options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",placement:"bottom-end",transfer:""},on:{"on-open-change":t.timeChange,"on-clear":t.timeClear,"on-ok":t.timeOk},model:{value:t.timeValue,callback:function(e){t.timeValue=e},expression:"timeValue"}},[t.taskDetail.end_at&&t.taskDetail.end_at!=t.mainEndAt?n("div",{class:["time",t.taskDetail.today?"today":"",t.taskDetail.overdue?"overdue":""],on:{click:t.openTime}},[t._v("\n "+t._s(t.expiresFormat(t.taskDetail.end_at))+"\n ")]):n("Icon",{staticClass:"clock",attrs:{type:"ios-clock-outline"},on:{click:t.openTime}})],1),t._v(" "),n("Poptip",{ref:"owner",staticClass:"subtask-avatar",attrs:{title:t.$L("修改负责人"),width:240,placement:"bottom",transfer:""},on:{"on-popper-show":t.openOwner,"on-popper-hide":function(e){t.ownerShow=!1},"on-ok":t.onOwner}},[n("div",{attrs:{slot:"content"},slot:"content"},[t.ownerShow?n("UserInput",{attrs:{"multiple-max":1,"project-id":t.taskDetail.project_id,placeholder:t.$L("选择任务负责人")},model:{value:t.ownerData.owner_userid,callback:function(e){t.$set(t.ownerData,"owner_userid",e)},expression:"ownerData.owner_userid"}}):t._e(),t._v(" "),n("div",{staticClass:"task-detail-avatar-buttons"},[n("Button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.$refs.owner.ok()}}},[t._v(t._s(t.$L("确定")))])],1)],1),t._v(" "),t.getOwner.length>0?t._l(t.getOwner,(function(t){return n("UserAvatar",{key:t.userid,attrs:{userid:t.userid,size:20,tooltipDisabled:""}})})):n("div",[t._v("--")])],2)],1):t.ready?n("div",{class:{"task-detail":!0,"open-dialog":t.hasOpenDialog,completed:t.taskDetail.complete_at}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.taskDetail.id>0,expression:"taskDetail.id > 0"}],staticClass:"task-info"},[n("div",{staticClass:"head"},[n("TaskMenu",{ref:"taskMenu_"+t.taskDetail.id,staticClass:"icon",attrs:{task:t.taskDetail,size:"medium","color-show":!1},on:{"on-update":t.getLogLists}}),t._v(" "),t.taskDetail.flow_item_name?n("div",{staticClass:"flow"},[n("span",{class:t.taskDetail.flow_item_status,on:{click:function(e){return e.stopPropagation(),t.openMenu(t.taskDetail)}}},[t._v(t._s(t.taskDetail.flow_item_name))])]):t._e(),t._v(" "),n("div",{staticClass:"nav"},[t.projectName?n("p",[n("span",[t._v(t._s(t.projectName))])]):t._e(),t._v(" "),t.columnName?n("p",[n("span",[t._v(t._s(t.columnName))])]):t._e(),t._v(" "),t.taskDetail.id?n("p",[n("span",[t._v(t._s(t.taskDetail.id))])]):t._e()]),t._v(" "),n("div",{staticClass:"function"},[0===t.getOwner.length?n("EPopover",{attrs:{placement:"bottom"},model:{value:t.receiveShow,callback:function(e){t.receiveShow=e},expression:"receiveShow"}},[n("div",{staticClass:"task-detail-receive"},[n("div",{staticClass:"receive-title"},[n("Icon",{attrs:{type:"ios-help-circle"}}),t._v("\n "+t._s(t.$L("确认计划时间领取任务"))+"\n ")],1),t._v(" "),n("div",{staticClass:"receive-time"},[n("DatePicker",{attrs:{options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",placeholder:t.$L("请设置计划时间"),clearable:!1,editable:!1},model:{value:t.timeValue,callback:function(e){t.timeValue=e},expression:"timeValue"}})],1),t._v(" "),n("div",{staticClass:"receive-bottom"},[n("Button",{attrs:{size:"small",type:"text"},on:{click:function(e){t.receiveShow=!1}}},[t._v("取消")]),t._v(" "),n("Button",{attrs:{loading:t.ownerLoad>0,size:"small",type:"primary"},on:{click:function(e){return t.onOwner(!0)}}},[t._v("确定")])],1)]),t._v(" "),n("Button",{staticClass:"pick",attrs:{slot:"reference",loading:t.ownerLoad>0,type:"primary"},slot:"reference"},[t._v(t._s(t.$L("我要领取任务")))])],1):t._e(),t._v(" "),t.$Electron?n("ETooltip",{attrs:{content:t.$L("新窗口打开")}},[n("i",{staticClass:"taskfont open",on:{click:t.openNewWin}},[t._v("")])]):t._e(),t._v(" "),n("div",{staticClass:"menu"},[n("TaskMenu",{attrs:{task:t.taskDetail,icon:"ios-more","completed-icon":"ios-more",size:"medium","color-show":!1},on:{"on-update":t.getLogLists}})],1)],1)],1),t._v(" "),n("div",{staticClass:"scroller overlay-y"},[n("div",{staticClass:"title"},[n("Input",{attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255},on:{"on-blur":function(e){return t.updateData("name")},"on-keydown":t.onNameKeydown},model:{value:t.taskDetail.name,callback:function(e){t.$set(t.taskDetail,"name",e)},expression:"taskDetail.name"}})],1),t._v(" "),n("div",{staticClass:"desc"},[n("TEditor",{ref:"desc",attrs:{value:t.taskContent,plugins:t.taskPlugins,options:t.taskOptions,"option-full":t.taskOptionFull,placeholder:t.$L("详细描述..."),inline:""},on:{"on-blur":function(e){return t.updateData("content")},editorSave:function(e){return t.updateData("content")}}})],1),t._v(" "),n("Form",{staticClass:"items",attrs:{"label-position":"left","label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[t.taskDetail.p_name?n("FormItem",[n("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("优先级"))+"\n ")]),t._v(" "),n("ul",{staticClass:"item-content"},[n("li",[n("EDropdown",{ref:"priority",attrs:{trigger:"click",placement:"bottom"},on:{command:function(e){return t.updateData("priority",e)}}},[n("TaskPriority",{attrs:{backgroundColor:t.taskDetail.p_color}},[t._v(t._s(t.taskDetail.p_name))]),t._v(" "),n("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.taskPriority,(function(e,r){return n("EDropdownItem",{key:r,attrs:{command:e}},[n("i",{staticClass:"taskfont",style:{color:e.color},domProps:{innerHTML:t._s(t.taskDetail.p_name==e.name?"":"")}}),t._v("\n "+t._s(e.name)+"\n ")])})),1)],1)],1)])]):t._e(),t._v(" "),t.getOwner.length>0?n("FormItem",[n("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("负责人"))+"\n ")]),t._v(" "),n("Poptip",{ref:"owner",staticClass:"item-content user",attrs:{title:t.$L("修改负责人"),width:240,placement:"bottom",transfer:""},on:{"on-popper-show":t.openOwner,"on-popper-hide":function(e){t.ownerShow=!1},"on-ok":t.onOwner}},[n("div",{attrs:{slot:"content"},slot:"content"},[t.ownerShow?n("UserInput",{attrs:{"multiple-max":10,"project-id":t.taskDetail.project_id,placeholder:t.$L("选择任务负责人")},model:{value:t.ownerData.owner_userid,callback:function(e){t.$set(t.ownerData,"owner_userid",e)},expression:"ownerData.owner_userid"}}):t._e(),t._v(" "),n("div",{staticClass:"task-detail-avatar-buttons"},[n("Button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.$refs.owner.ok()}}},[t._v(t._s(t.$L("确定")))])],1)],1),t._v(" "),n("div",{staticClass:"user-list"},t._l(t.getOwner,(function(e){return n("UserAvatar",{key:e.userid,attrs:{userid:e.userid,size:28,showName:1===t.getOwner.length,tooltipDisabled:""}})})),1)])],1):t._e(),t._v(" "),t.getAssist.length>0||t.assistForce?n("FormItem",[n("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("协助人员"))+"\n ")]),t._v(" "),n("Poptip",{ref:"assist",staticClass:"item-content user",attrs:{title:t.$L(t.getAssist.length>0?"修改协助人员":"添加协助人员"),width:280,placement:"bottom",transfer:""},on:{"on-popper-show":t.openAssist,"on-popper-hide":function(e){t.assistShow=!1},"on-ok":t.onAssist}},[n("div",{attrs:{slot:"content"},slot:"content"},[t.assistShow?n("UserInput",{attrs:{"multiple-max":10,"project-id":t.taskDetail.project_id,"disabled-choice":t.assistData.disabled,placeholder:t.$L("选择任务协助人员")},model:{value:t.assistData.assist_userid,callback:function(e){t.$set(t.assistData,"assist_userid",e)},expression:"assistData.assist_userid"}}):t._e(),t._v(" "),n("div",{staticClass:"task-detail-avatar-buttons"},[n("Button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.$refs.assist.ok()}}},[t._v(t._s(t.$L("确定")))])],1)],1),t._v(" "),t.getAssist.length>0?n("div",{staticClass:"user-list"},t._l(t.getAssist,(function(e){return n("UserAvatar",{key:e.userid,attrs:{userid:e.userid,size:28,showName:1===t.getAssist.length,tooltipDisabled:""}})})),1):n("div",[t._v("--")])])],1):t._e(),t._v(" "),t.taskDetail.end_at||t.timeForce?n("FormItem",[n("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("截止时间"))+"\n ")]),t._v(" "),n("ul",{staticClass:"item-content"},[n("li",[n("DatePicker",{attrs:{open:t.timeOpen,options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",transfer:""},on:{"on-open-change":t.timeChange,"on-clear":t.timeClear,"on-ok":t.timeOk},model:{value:t.timeValue,callback:function(e){t.timeValue=e},expression:"timeValue"}},[n("div",{staticClass:"picker-time"},[n("div",{staticClass:"time",on:{click:t.openTime}},[t._v(t._s(t.taskDetail.end_at?t.cutTime:"--"))]),t._v(" "),!t.taskDetail.complete_at&&t.taskDetail.today?n("Tag",{attrs:{color:"blue"}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.expiresFormat(t.taskDetail.end_at)))]):t._e(),t._v(" "),!t.taskDetail.complete_at&&t.taskDetail.overdue?n("Tag",{attrs:{color:"red"}},[t._v(t._s(t.$L("超期未完成")))]):t._e()],1)])],1)])]):t._e(),t._v(" "),t.fileList.length>0?n("FormItem",[n("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("附件"))+"\n ")]),t._v(" "),n("ul",{staticClass:"item-content file"},t._l(t.fileList,(function(e){return n("li",[e.id?n("img",{staticClass:"file-ext",attrs:{src:e.thumb}}):n("Loading",{staticClass:"file-load"}),t._v(" "),n("a",{staticClass:"file-name",attrs:{href:e.path||"javascript:;",target:"_blank"}},[t._v(t._s(e.name))]),t._v(" "),n("div",{staticClass:"file-size"},[t._v(t._s(t.$A.bytesToSize(e.size)))]),t._v(" "),n("EPopover",{staticClass:"file-delete",model:{value:e._deling,callback:function(n){t.$set(e,"_deling",n)},expression:"file._deling"}},[n("div",{staticClass:"task-detail-delete-file-popover"},[n("p",[t._v(t._s(t.$L("你确定要删除这个文件吗?")))]),t._v(" "),n("div",{staticClass:"buttons"},[n("Button",{attrs:{size:"small",type:"text"},on:{click:function(t){e._deling=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{size:"small",type:"primary"},on:{click:function(n){return t.deleteFile(e)}}},[t._v(t._s(t.$L("确定")))])],1)]),t._v(" "),n("i",{class:["taskfont",e._deling?"deling":""],attrs:{slot:"reference"},slot:"reference"},[t._v("")])])],1)})),0),t._v(" "),n("ul",{staticClass:"item-content"},[n("li",[n("div",{staticClass:"add-button",on:{click:function(e){return t.$refs.upload.handleClick()}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("添加附件"))+"\n ")])])])]):t._e(),t._v(" "),t.subList.length>0||t.addsubForce?n("FormItem",[n("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("子任务"))+"\n ")]),t._v(" "),n("ul",{staticClass:"item-content subtask"},t._l(t.subList,(function(e,r){return n("TaskDetail",{key:r,attrs:{"task-id":e.id,"open-task":e,"main-end-at":t.taskDetail.end_at}})})),1),t._v(" "),n("ul",{class:["item-content",0===t.subList.length?"nosub":""]},[n("li",[t.addsubShow?n("Input",{ref:"addsub",staticClass:"add-input",class:{loading:t.addsubLoad>0},attrs:{placeholder:t.$L("+ 输入子任务,回车添加子任务"),icon:t.addsubLoad>0?"ios-loading":""},on:{"on-blur":t.addsubChackClose,"on-keydown":t.addsubKeydown},model:{value:t.addsubName,callback:function(e){t.addsubName=e},expression:"addsubName"}}):n("div",{staticClass:"add-button",on:{click:t.addsubOpen}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.$L("添加子任务"))+"\n ")])],1)])]):t._e()],1),t._v(" "),t.menuList.length>0?n("div",{staticClass:"add"},[n("EDropdown",{attrs:{trigger:"click",placement:"bottom"},on:{command:t.dropAdd}},[n("div",{staticClass:"add-button"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v("\n "+t._s(t.$L("添加"))+"\n "),t._l(t.menuList,(function(e){return n("em",[t._v(t._s(t.$L(e.name)))])}))],2),t._v(" "),n("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.menuList,(function(e,r){return n("EDropdownItem",{key:r,attrs:{command:e.command}},[n("div",{staticClass:"item"},[n("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(e.icon)}}),t._v(t._s(t.$L(e.name))+"\n ")])])})),1)],1)],1):t._e()],1),t._v(" "),n("TaskUpload",{ref:"upload",staticClass:"upload"})],1),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.taskDetail.id>0,expression:"taskDetail.id > 0"}],staticClass:"task-dialog",style:t.dialogStyle},[t.hasOpenDialog?[t.taskId>0?n("DialogWrapper",{ref:"dialog",attrs:{"dialog-id":t.taskDetail.dialog_id}},[n("div",{staticClass:"head",attrs:{slot:"head"},slot:"head"},[n("Icon",{staticClass:"icon",attrs:{type:"ios-chatbubbles-outline"}}),t._v(" "),n("div",{staticClass:"nav"},[n("p",{class:{active:"dialog"==t.navActive},on:{click:function(e){t.navActive="dialog"}}},[t._v(t._s(t.$L("聊天")))]),t._v(" "),n("p",{class:{active:"log"==t.navActive},on:{click:function(e){t.navActive="log"}}},[t._v(t._s(t.$L("动态")))]),t._v(" "),"log"==t.navActive?n("div",{staticClass:"refresh"},[t.logLoadIng?n("Loading"):n("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getLogLists}})],1):t._e()])],1)]):t._e(),t._v(" "),"log"==t.navActive&&t.taskId>0?n("ProjectLog",{ref:"log",attrs:{"task-id":t.taskDetail.id},on:{"on-load-change":t.logLoadChange}}):t._e()]:n("div",[n("div",{staticClass:"head"},[n("Icon",{staticClass:"icon",attrs:{type:"ios-chatbubbles-outline"}}),t._v(" "),n("div",{staticClass:"nav"},[n("p",{class:{active:"dialog"==t.navActive},on:{click:function(e){t.navActive="dialog"}}},[t._v(t._s(t.$L("聊天")))]),t._v(" "),n("p",{class:{active:"log"==t.navActive},on:{click:function(e){t.navActive="log"}}},[t._v(t._s(t.$L("动态")))]),t._v(" "),"log"==t.navActive?n("div",{staticClass:"refresh"},[t.logLoadIng?n("Loading"):n("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getLogLists}})],1):t._e()])],1),t._v(" "),"log"==t.navActive&&t.taskId>0?n("ProjectLog",{ref:"log",attrs:{"task-id":t.taskDetail.id},on:{"on-load-change":t.logLoadChange}}):n("div",{staticClass:"no-dialog"},[n("div",{staticClass:"no-tip"},[t._v(t._s(t.$L("暂无消息")))]),t._v(" "),n("div",{staticClass:"no-input"},[n("Input",{staticClass:"dialog-input",attrs:{type:"textarea",disabled:t.sendLoad>0,rows:1,autosize:{minRows:1,maxRows:3},maxlength:255,placeholder:t.$L("输入消息...")},on:{"on-keydown":t.msgKeydown},model:{value:t.msgText,callback:function(e){t.msgText=e},expression:"msgText"}}),t._v(" "),n("div",{staticClass:"no-send",on:{click:t.openSend}},[t.sendLoad>0?n("Loading"):n("Icon",{attrs:{type:"md-send"}})],1)],1)])],1)],2),t._v(" "),t.taskDetail.id?t._e():n("div",{staticClass:"task-load"},[n("Loading")],1)]):t._e()}),[],!1,null,null,null).exports},36813:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(20629);function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t){for(var e=1;e0},flow:function(){var t=this;return this.taskFlows.find((function(e){return e.task_id==t.task.id}))},turns:function(){var t=this;if(!this.flow)return[];var e=this.taskFlowItems.find((function(e){return e.id==t.flow.flow_item_id}));return e?this.taskFlowItems.filter((function(t){var n=t.id;return e.turns.includes(n)})):[]}}),methods:{show:function(){this.$refs.dropdown.show()},hide:function(){this.$refs.dropdown.hide()},handleClick:function(){this.$refs.dropdown.handleClick()},dropTask:function(t){var e=this;if($A.isJson(t))t.name&&this.updateTask({color:t.color}).catch((function(){}));else if($A.leftExists(t,"turn::")){var n=$A.leftDelete(t,"turn::");if(n==this.task.flow_item_id)return;this.updateTask({flow_item_id:n}).catch((function(){}))}else{var r=this.task;switch(t){case"complete":if(this.task.complete_at)return;this.updateBefore&&this.$store.dispatch("saveTaskCompleteTemp",r),this.updateTask({complete_at:$A.formatDate("Y-m-d H:i:s")}).then((function(){e.$store.dispatch("saveTaskCompleteTemp",r)})).catch((function(){e.$store.dispatch("forgetTaskCompleteTemp",r.id)}));break;case"uncomplete":if(!this.task.complete_at)return;this.updateBefore&&this.$store.dispatch("forgetTaskCompleteTemp",r.id),this.updateTask({complete_at:!1}).then((function(){e.$store.dispatch("forgetTaskCompleteTemp",r.id)})).catch((function(){e.$store.dispatch("saveTaskCompleteTemp",r)}));break;case"archived":case"remove":this.archivedOrRemoveTask(t)}}},visibleChange:function(t){t&&this.$store.dispatch("getTaskFlow",this.task.id).catch((function(){}))},updateTask:function(t){var e=this;return new Promise((function(n,r){e.loadIng?r():(Object.keys(t).forEach((function(n){return e.$set(e.task,n,t[n])})),e.$store.dispatch("taskUpdate",Object.assign(t,{task_id:e.task.id})).then((function(t){var r=t.data,o=t.msg;$A.messageSuccess(o),n(),e.$emit("on-update",r)})).catch((function(t){var n=t.msg;$A.modalError(n),e.$store.dispatch("getTaskOne",e.task.id).catch((function(){})),r()})))}))},archivedOrRemoveTask:function(t){var e=this,n="remove"==t?"removeTask":"archivedTask",r="remove"==t?"删除":"归档",o=this.task.parent_id>0?"子任务":"任务";$A.modalConfirm({title:r+o,content:"你确定要"+r+o+"【"+this.task.name+"】吗?",loading:!0,onOk:function(){e.loadIng?e.$Modal.remove():e.$store.dispatch(n,e.task.id).then((function(t){var n=t.msg;$A.messageSuccess(n),e.$Modal.remove()})).catch((function(t){var n=t.msg;$A.modalError(n,301),e.$Modal.remove()}))}})}}};const u=(0,n(51900).Z)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("EDropdown",{ref:"dropdown",attrs:{trigger:"click",size:t.size,placement:"bottom"},on:{command:t.dropTask,"visible-change":t.visibleChange}},[t._t("icon",(function(){return[n("div",{staticClass:"task-menu-icon"},[t.loadIng?n("div",{staticClass:"loading"},[n("Loading")],1):[t.task.complete_at?n("Icon",{staticClass:"completed",attrs:{type:t.completedIcon}}):n("Icon",{staticClass:"uncomplete",attrs:{type:t.icon}})]],2)]})),t._v(" "),n("EDropdownMenu",{staticClass:"task-menu-more-dropdown",attrs:{slot:"dropdown"},slot:"dropdown"},[n("li",{staticClass:"task-menu-more-warp",class:t.size},[n("ul",[t.flow?t.turns.length>0?t._l(t.turns,(function(e){return n("EDropdownItem",{key:e.id,attrs:{command:"turn::"+e.id}},[n("div",{staticClass:"item flow"},[e.id==t.task.flow_item_id&&!0!==t.flow.auto_assign?n("Icon",{staticClass:"check",attrs:{type:"md-checkmark-circle-outline"}}):n("Icon",{attrs:{type:"md-radio-button-off"}}),t._v(" "),n("div",{staticClass:"flow-name",class:e.status},[t._v(t._s(e.name))])],1)])})):[t.task.complete_at?n("EDropdownItem",{attrs:{command:"uncomplete"}},[n("div",{staticClass:"item red"},[n("Icon",{attrs:{type:"md-checkmark-circle-outline"}}),t._v(t._s(t.$L("标记未完成"))+"\n ")],1)]):n("EDropdownItem",{attrs:{command:"complete"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-radio-button-off"}}),t._v(t._s(t.$L("完成"))+"\n ")],1)])]:n("EDropdownItem",{staticClass:"load-flow",attrs:{disabled:""}},[n("div",{staticClass:"load-flow-warp"},[n("Loading")],1)]),t._v(" "),0===t.task.parent_id?[n("EDropdownItem",{attrs:{divided:t.turns.length>0,command:"archived"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"ios-filing"}}),t._v(t._s(t.$L("归档"))+"\n ")],1)]),t._v(" "),n("EDropdownItem",{attrs:{command:"remove"}},[n("div",{staticClass:"item hover-del"},[n("Icon",{attrs:{type:"md-trash"}}),t._v(t._s(t.$L("删除"))+"\n ")],1)]),t._v(" "),t.colorShow?t._l(t.taskColorList,(function(e,r){return n("EDropdownItem",{key:"c_"+r,attrs:{divided:0==r,command:e}},[n("div",{staticClass:"item"},[n("i",{staticClass:"taskfont",style:{color:e.color||"#f9f9f9"},domProps:{innerHTML:t._s(e.color==t.task.color?"":"")}}),t._v(t._s(t.$L(e.name))+"\n ")])])})):t._e()]:n("EDropdownItem",{attrs:{command:"remove",divided:t.turns.length>0}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-trash"}}),t._v(t._s(t.$L("删除"))+"\n ")],1)])],2)])])],2)}),[],!1,null,null,null).exports},25199:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e