From 6c44abded9417343ced298f257d5aff46ef2640a Mon Sep 17 00:00:00 2001 From: kuaifan Date: Fri, 8 Apr 2022 00:29:12 +0800 Subject: [PATCH] build --- package.json | 2 +- public/js/app.js | 2 +- public/js/build/185.js | 1 - public/js/build/483.js | 2 +- public/js/build/{115.js => 626.js} | 4 ++-- public/js/build/{115.js.LICENSE.txt => 626.js.LICENSE.txt} | 0 public/js/build/637.js | 2 +- public/js/build/77.js | 1 + public/js/build/862.js | 2 +- public/js/hash | 2 +- 10 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 public/js/build/185.js rename public/js/build/{115.js => 626.js} (74%) rename public/js/build/{115.js.LICENSE.txt => 626.js.LICENSE.txt} (100%) create mode 100644 public/js/build/77.js diff --git a/package.json b/package.json index 1888016e6..de2cb2f98 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "DooTask", - "version": "0.12.91", + "version": "0.12.95", "description": "DooTask is task management system.", "scripts": { "start": "./cmd dev", diff --git a/public/js/app.js b/public/js/app.js index 2aa83e5bc..3ae2529f0 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:()=>C});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 k(e){this.rules=null,this._messages=x,this.define(e)}k.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 k(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 k=(e.withCredentials||u(_))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;k&&(m[e.xsrfHeaderName]=k)}"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}),{})}},76840:(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),d=n(80641);function h(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 f(e){for(var t=1;tMath.round((new Date).getTime()/1e3))return void(this.downloadUrl=i.data.html_url);if(this.loadIng>0)return;this.loadIng++,c().get("https://api.github.com/repos/".concat(e.owner,"/").concat(e.repo,"/releases")).then((function(e){var r=e.status,a=e.data;t.loadIng--,200===r&&$A.isArray(a)&&(i.time=Math.round((new Date).getTime()/1e3),i.data=a.find((function(e){var n=e.tag_name;return 0===t.compareVersion(t.tagVersion(n),t.apiVersion)}))||{},$A.setStorage(n,i),t.downloadUrl=i.data.html_url)})).catch((function(){t.loadIng--}))}},updateQuitAndInstall:function(){this.$Electron.sendMessage("updateQuitAndInstall")},useSSOLogin:function(){d.Store.set("useSSOLogin",!0)},tagVersion:function(e){return e?$A.leftDelete(e.toLowerCase(),"v"):""},compareVersion:function(e,t){var n=0,i=0;if(e===t)return 0;for(var r=function(e,t){for(var n=t;"."!==e[n]&&nl?1:-1;n=a+1,i=o+1}for(;n0)return 1;n=u+1}for(;i0)return-1;i=c+1}return 0}}};const v=(0,o.Z)(m,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"common-right-bottom"},[e.showSSO?n("div",{staticClass:"common-right-bottom-link",on:{click:e.useSSOLogin}},[n("Icon",{attrs:{type:"ios-globe-outline"}}),e._v("\n "+e._s(e.$L("使用 SSO 登录"))+"\n ")],1):e._e(),e._v(" "),e.showDown?[e.downloadUrl?n("a",{staticClass:"common-right-bottom-link",attrs:{href:e.downloadUrl,target:"_blank"}},[n("Icon",{attrs:{type:"md-download"}}),e._v("\n "+e._s(e.$L("客户端下载"))+"\n ")],1):e.updateVersion&&e.$Electron?n("div",{staticClass:"common-right-bottom-link",on:{click:function(t){e.updateShow=!0}}},[n("Icon",{attrs:{type:"md-download"}}),e._v("\n "+e._s(e.$L("更新客户端"))+"\n ")],1):e._e()]:e._e(),e._v(" "),n("Modal",{attrs:{closable:!1,"mask-closable":!1,"class-name":"common-right-bottom-notification"},model:{value:e.updateShow,callback:function(t){e.updateShow=t},expression:"updateShow"}},[n("div",{attrs:{slot:"header"},slot:"header"},[n("div",{staticClass:"notification-head"},[n("div",{staticClass:"notification-title"},[e._v(e._s(e.$L("发现新版本")))]),e._v(" "),n("Tag",{attrs:{color:"volcano"}},[e._v("v"+e._s(e.systemVersion)+" -> v"+e._s(e.updateVersion))])],1),e._v(" "),"mac"===e.$Platform?n("div",{staticClass:"notification-tip"},[e._v(e._s(e.$L("离最新版本只有一步之遥了!重新启动应用即可完成更新。")))]):e._e()]),e._v(" "),n("MarkdownPreview",{staticClass:"notification-body overlay-y",attrs:{initialValue:e.updateNote}}),e._v(" "),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(t){e.updateShow=!1}}},[e._v(e._s(e.$L("稍后")))]),e._v(" "),n("Button",{attrs:{type:"primary"},on:{click:e.updateQuitAndInstall}},[e._v(e._s(e.$L("mac"===e.$Platform?"重新启动":"立即升级")))])],1)],1)],2)}),[],!1,null,null,null).exports;let g=e=>e&&"[object Function]"==={}.toString.call(e);"object"==typeof Int8Array||!i.default.prototype.$isServer&&document.childNodes;Object.prototype.hasOwnProperty;function b(e){let t=!1;return function(...n){t||(t=!0,window.requestAnimationFrame((i=>{e.apply(this,n),t=!1})))}}const y=i.default.prototype.$isServer,w=(y||Number(document.documentMode),!y&&document.addEventListener?function(e,t,n){e&&t&&n&&e.addEventListener(t,n,!1)}:function(e,t,n){e&&t&&n&&e.attachEvent("on"+t,n)}),_=!y&&document.removeEventListener?function(e,t,n){e&&t&&e.removeEventListener(t,n,!1)}:function(e,t,n){e&&t&&e.detachEvent("on"+t,n)};function x(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 k(e){for(var t=1;t0?e.handleActions("zoomIn",{zoomRate:.015,enableTransition:!1}):e.handleActions("zoomOut",{zoomRate:.015,enableTransition:!1})})),w(document,"keydown",this._keyDownHandler),w(document,O,this._mouseWheelHandler)},deviceSupportUninstall:function(){_(document,"keydown",this._keyDownHandler),_(document,O,this._mouseWheelHandler),this._keyDownHandler=null,this._mouseWheelHandler=null},handleImgLoad:function(e){this.loading=!1},handleImgError:function(e){this.loading=!1,e.target.alt="加载失败"},handleMouseDown:function(e){var t=this;if(!this.loading&&0===e.button){var n=this.transform,i=n.offsetX,r=n.offsetY,a=e.pageX,o=e.pageY;this._dragHandler=b((function(e){t.transform.offsetX=i+e.pageX-a,t.transform.offsetY=r+e.pageY-o})),w(document,"mousemove",this._dragHandler),w(document,"mouseup",(function(e){_(document,"mousemove",t._dragHandler)})),e.preventDefault()}},reset:function(){this.transform={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}},toggleMode:function(){if(!this.loading){var e=Object.keys(S),t=(Object.values(S).indexOf(this.mode)+1)%e.length;this.mode=S[e[t]],this.reset()}},prev:function(){if(!this.isFirst||this.infinite){var e=this.urlList.length;this.index=(this.index-1+e)%e}},next:function(){if(!this.isLast||this.infinite){var e=this.urlList.length;this.index=(this.index+1)%e}},handleActions:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.loading){var n=k({zoomRate:.2,rotateDeg:90,enableTransition:!0},t),i=n.zoomRate,r=n.rotateDeg,a=n.enableTransition,o=this.transform;switch(e){case"zoomOut":o.scale>.2&&(o.scale=parseFloat((o.scale-i).toFixed(3)));break;case"zoomIn":o.scale=parseFloat((o.scale+i).toFixed(3));break;case"clocelise":o.deg+=r;break;case"anticlocelise":o.deg-=r}o.enableTransition=a}}}},D=T;var E=n(93379),$=n.n(E),M=n(64574),P={insert:"head",singleton:!1};$()(M.Z,P);M.Z.locals;function I(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 j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const A={name:"PreviewImage",components:{PreviewImageView:(0,o.Z)(D,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"view",staticClass:"common-preview-view no-dark-mode"},[e.isSingle?e._e():[n("div",{staticClass:"preview-view-prev",class:{"is-disabled":!e.infinite&&e.isFirst},on:{click:e.prev}},[n("i",{staticClass:"taskfont"},[e._v("")])]),e._v(" "),n("div",{staticClass:"preview-view-next",class:{"is-disabled":!e.infinite&&e.isLast},on:{click:e.next}},[n("i",{staticClass:"taskfont"},[e._v("")])])],e._v(" "),n("div",{staticClass:"preview-view-actions"},[n("div",{staticClass:"actions-inner"},[n("i",{staticClass:"taskfont",on:{click:function(t){return e.handleActions("zoomOut")}}},[e._v("")]),e._v(" "),n("i",{staticClass:"taskfont",on:{click:function(t){return e.handleActions("zoomIn")}}},[e._v("")]),e._v(" "),n("i",{staticClass:"actions-divider"}),e._v(" "),n("i",{staticClass:"taskfont",domProps:{innerHTML:e._s(e.mode.icon)},on:{click:e.toggleMode}}),e._v(" "),n("i",{staticClass:"actions-divider"}),e._v(" "),n("i",{staticClass:"taskfont",on:{click:function(t){return e.handleActions("anticlocelise")}}},[e._v("")]),e._v(" "),n("i",{staticClass:"taskfont",on:{click:function(t){return e.handleActions("clocelise")}}},[e._v("")])])]),e._v(" "),n("div",{staticClass:"preview-view-canvas no-dark-mode"},e._l(e.urlList,(function(t,i){return i===e.index?n("img",{key:t,ref:"img",refInFor:!0,staticClass:"preview-view-img",style:e.imgStyle,attrs:{src:e.currentImg},on:{load:e.handleImgLoad,error:e.handleImgError,mousedown:e.handleMouseDown}}):e._e()})),0)],2)}),[],!1,null,"32ebf14c",null).exports},computed:function(e){for(var t=1;t0,mask:!1,"mask-closable":!1,"footer-hide":!0,"transition-names":["",""],fullscreen:"","class-name":"common-preview-image"},on:{"on-visible-change":e.visibleChange}},[e.previewImageList.length>0?n("PreviewImageView",{attrs:{"initial-index":e.previewImageIndex,"url-list":e.previewImageList,infinite:""}}):e._e()],1)}),[],!1,null,null,null).exports,RightBottom:v,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(),!0):void 0)},this.$Electron.registerMsgListener("dispatch",(function(t){if($A.isJson(t)){var n=t.action,i=t.data;e.$store.dispatch(n,i)}})))}}};var V=n(43279),z={insert:"head",singleton:!1};$()(V.Z,z);V.Z.locals;const H=(0,o.Z)(B,(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("RightBottom"),e._v(" "),n("PreviewImage")],1)}),[],!1,null,"1af8fc78",null).exports,W=[{name:"index",path:"/",component:function(){return n.e(736).then(n.bind(n,3736))}},{name:"manage",path:"/manage",meta:{slide:!1},component:function(){return n.e(185).then(n.bind(n,28185))},children:[{name:"manage-dashboard",path:"dashboard",component:function(){return n.e(478).then(n.bind(n,45478))}},{name:"manage-calendar",path:"calendar",component:function(){return n.e(462).then(n.bind(n,83462))}},{name:"manage-messenger",path:"messenger",component:function(){return n.e(347).then(n.bind(n,16347))}},{path:"setting",component:function(){return n.e(963).then(n.bind(n,1963))},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(632).then(n.bind(n,1632))}},{name:"manage-setting-system",path:"system",component:function(){return n.e(200).then(n.bind(n,95200))}}]},{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(115).then(n.bind(n,17115))}},{name:"manage-file",path:"file",component:function(){return n.e(637).then(n.bind(n,15637))}}]},{name:"single-file-msg",path:"/single/file/msg/:id",component:function(){return n.e(408).then(n.bind(n,35408))}},{name:"single-file-task",path:"/single/file/task/:id",component:function(){return n.e(653).then(n.bind(n,15653))}},{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(862).then(n.bind(n,72862))}},{name:"valid-email",path:"/single/valid/email",meta:{title:"验证绑定邮箱"},component:function(){return n.e(349).then(n.bind(n,94349))}},{name:"report-edit",path:"/single/report/edit/:id",component:function(){return n.e(483).then(n.bind(n,94483))}},{name:"report-detail",path:"/single/report/detail/:id",component:function(){return n.e(631).then(n.bind(n,77631))}},{name:"login",path:"/login",component:function(){return n.e(103).then(n.bind(n,34103))}},{name:"404",path:"*",component:function(){return n.e(418).then(n.bind(n,54418))}}];function q(e,t){for(var n in t)e[n]=t[n];return e}var U=/[!'()*]/g,K=function(e){return"%"+e.charCodeAt(0).toString(16)},G=/%2C/g,Y=function(e){return encodeURIComponent(e).replace(U,K).replace(G,",")};function Z(e){try{return decodeURIComponent(e)}catch(e){0}return e}var X=function(e){return null==e||"object"==typeof e?e:String(e)};function J(e){var t={};return(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach((function(e){var n=e.replace(/\+/g," ").split("="),i=Z(n.shift()),r=n.length>0?Z(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 Q(e){var t=e?Object.keys(e).map((function(t){var n=e[t];if(void 0===n)return"";if(null===n)return Y(t);if(Array.isArray(n)){var i=[];return n.forEach((function(e){void 0!==e&&(null===e?i.push(Y(t)):i.push(Y(t)+"="+Y(e)))})),i.join("&")}return Y(t)+"="+Y(n)})).filter((function(e){return e.length>0})).join("&"):null;return t?"?"+t:""}var ee=/\/?$/;function te(e,t,n,i){var r=i&&i.options.stringifyQuery,a=t.query||{};try{a=ne(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:ae(t,r),matched:e?re(e):[]};return n&&(o.redirectedFrom=ae(n,r)),Object.freeze(o)}function ne(e){if(Array.isArray(e))return e.map(ne);if(e&&"object"==typeof e){var t={};for(var n in e)t[n]=ne(e[n]);return t}return e}var ie=te(null,{path:"/"});function re(e){for(var t=[];e;)t.unshift(e),e=e.parent;return t}function ae(e,t){var n=e.path,i=e.query;void 0===i&&(i={});var r=e.hash;return void 0===r&&(r=""),(n||"/")+(t||Q)(i)+r}function oe(e,t,n){return t===ie?e===t:!!t&&(e.path&&t.path?e.path.replace(ee,"")===t.path.replace(ee,"")&&(n||e.hash===t.hash&&se(e.query,t.query)):!(!e.name||!t.name)&&(e.name===t.name&&(n||e.hash===t.hash&&se(e.query,t.query)&&se(e.params,t.params))))}function se(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?se(a,o):String(a)===String(o)}))}function le(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?de(l.path,u,n||r.append):u,d=function(e,t,n){void 0===t&&(t={});var i,r=n||J;try{i=r(e||"")}catch(e){i={}}for(var a in t){var o=t[a];i[a]=Array.isArray(o)?o.map(X):X(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 Pe,Ie=function(){},je={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?te(null,Me(o.redirectedFrom),null,n):o;l[p]=oe(i,m,this.exactPath),l[f]=this.exact||this.exactPath?l[p]:function(e,t){return 0===e.path.replace(ee,"/").indexOf(t.path.replace(ee,"/"))&&(!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){Ae(e)&&(t.replace?n.replace(a,Ie):n.push(a,Ie))},b={click:Ae};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 _=Ne(this.$slots.default);if(_){_.isStatic=!1;var x=_.data=q({},_.data);for(var k in x.on=x.on||{},x.on){var C=x.on[k];k in b&&(x.on[k]=Array.isArray(C)?C:[C])}for(var S in b)S in x.on?x.on[S].push(b[S]):x.on[S]=g;var O=_.data.attrs=q({},_.data.attrs);O.href=s,O["aria-current"]=v}else y.on=b}return e(this.tag,y,this.$slots.default)}};function Ae(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 Ne(e){if(e)for(var t,n=0;n-1&&(s.params[h]=n.params[h]);return s.path=$e(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 ut={redirected:2,aborted:4,cancelled:8,duplicated:16};function ct(e,t){return ht(e,t,ut.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 ft.forEach((function(n){n in e&&(t[n]=e[n])})),JSON.stringify(t,null,2)}(t)+'" via a navigation guard.')}function dt(e,t){return ht(e,t,ut.cancelled,'Navigation cancelled from "'+e.fullPath+'" to "'+t.fullPath+'" with a new navigation.')}function ht(e,t,n,i){var r=new Error(i);return r._isRouter=!0,r.from=e,r.to=t,r.type=n,r}var ft=["params","query","hash"];function pt(e){return Object.prototype.toString.call(e).indexOf("Error")>-1}function mt(e,t){return pt(e)&&e._isRouter&&(null==t||e.type===t)}function vt(e){return function(t,n,i){var r=!1,a=0,o=null;gt(e,(function(e,t,n,s){if("function"==typeof e&&void 0===e.cid){r=!0,a++;var l,u=wt((function(t){var r;((r=t).__esModule||yt&&"Module"===r[Symbol.toStringTag])&&(t=t.default),e.resolved="function"==typeof t?t:Pe.extend(t),n.components[s]=t,--a<=0&&i()})),c=wt((function(e){var t="Failed to resolve async component "+s+": "+e;o||(o=pt(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 gt(e,t){return bt(e.map((function(e){return Object.keys(e.components).map((function(n){return t(e.components[n],e.instances[n],e,n)}))})))}function bt(e){return Array.prototype.concat.apply([],e)}var yt="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function wt(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 _t=function(e,t){this.router=e,this.base=function(e){if(!e)if(Le){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=ie,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function xt(e,t,n,i){var r=gt(e,(function(e,i,r,a){var o=function(e,t){"function"!=typeof e&&(e=Pe.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 bt(i?r.reverse():r)}function kt(e,t){if(t)return function(){return e.apply(t,arguments)}}_t.prototype.listen=function(e){this.cb=e},_t.prototype.onReady=function(e,t){this.ready?e():(this.readyCbs.push(e),t&&this.readyErrorCbs.push(t))},_t.prototype.onError=function(e){this.errorCbs.push(e)},_t.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&&(mt(e,ut.redirected)&&a===ie||(r.ready=!0,r.readyErrorCbs.forEach((function(t){t(e)}))))}))},_t.prototype.confirmTransition=function(e,t,n){var i=this,r=this.current;this.pending=e;var a,o,s=function(e){!mt(e)&&pt(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(oe(e,r)&&l===u&&e.matched[l]===r.matched[u])return this.ensureURL(),e.hash&&Ze(this.router,r,e,!1),s(((o=ht(a=r,e,ut.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=at&&n;i&&this.listeners.push(Ye());var r=function(){var n=e.current,r=St(e.base);e.current===ie&&r===e._startLocation||e.transitionTo(r,(function(e){i&&Ze(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){ot(he(i.base+e.fullPath)),Ze(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){st(he(i.base+e.fullPath)),Ze(i.router,e,r,!1),t&&t(e)}),n)},t.prototype.ensureURL=function(e){if(St(this.base)!==this.current.fullPath){var t=he(this.base+this.current.fullPath);e?ot(t):st(t)}},t.prototype.getCurrentLocation=function(){return St(this.base)},t}(_t);function St(e){var t=window.location.pathname,n=t.toLowerCase(),i=e.toLowerCase();return!e||n!==i&&0!==n.indexOf(he(i+"/"))||(t=t.slice(e.length)),(t||"/")+window.location.search+window.location.hash}var Ot=function(e){function t(t,n,i){e.call(this,t,n),i&&function(e){var t=St(e);if(!/^\/#/.test(t))return window.location.replace(he(e+"/#"+t)),!0}(this.base)||Tt()}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=at&&t;n&&this.listeners.push(Ye());var i=function(){var t=e.current;Tt()&&e.transitionTo(Dt(),(function(i){n&&Ze(e.router,i,t,!0),at||Mt(i.fullPath)}))},r=at?"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){$t(e.fullPath),Ze(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){Mt(e.fullPath),Ze(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;Dt()!==t&&(e?$t(t):Mt(t))},t.prototype.getCurrentLocation=function(){return Dt()},t}(_t);function Tt(){var e=Dt();return"/"===e.charAt(0)||(Mt("/"+e),!1)}function Dt(){var e=window.location.href,t=e.indexOf("#");return t<0?"":e=e.slice(t+1)}function Et(e){var t=window.location.href,n=t.indexOf("#");return(n>=0?t.slice(0,n):t)+"#"+e}function $t(e){at?ot(Et(e)):window.location.hash=e}function Mt(e){at?st(Et(e)):window.location.replace(Et(e))}var Pt=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){mt(e,ut.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}(_t),It=function(e){void 0===e&&(e={}),this.app=null,this.apps=[],this.options=e,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=Ve(e.routes||[],this);var t=e.mode||"hash";switch(this.fallback="history"===t&&!at&&!1!==e.fallback,this.fallback&&(t="hash"),Le||(t="abstract"),this.mode=t,t){case"history":this.history=new Ct(this,e.base);break;case"hash":this.history=new Ot(this,e.base,this.fallback);break;case"abstract":this.history=new Pt(this,e.base)}},jt={currentRoute:{configurable:!0}};function At(e,t){return e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}It.prototype.match=function(e,t,n){return this.matcher.match(e,t,n)},jt.currentRoute.get=function(){return this.history&&this.history.current},It.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 Ct||n instanceof Ot){var i=function(e){n.setupListeners(),function(e){var i=n.current,r=t.options.scrollBehavior;at&&r&&"fullPath"in e&&Ze(t,e,i,!1)}(e)};n.transitionTo(n.getCurrentLocation(),i,i)}n.listen((function(e){t.apps.forEach((function(t){t._route=e}))}))}},It.prototype.beforeEach=function(e){return At(this.beforeHooks,e)},It.prototype.beforeResolve=function(e){return At(this.resolveHooks,e)},It.prototype.afterEach=function(e){return At(this.afterHooks,e)},It.prototype.onReady=function(e,t){this.history.onReady(e,t)},It.prototype.onError=function(e){this.history.onError(e)},It.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)},It.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)},It.prototype.go=function(e){this.history.go(e)},It.prototype.back=function(){this.go(-1)},It.prototype.forward=function(){this.go(1)},It.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]}))}))):[]},It.prototype.resolve=function(e,t,n){var i=Me(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?he(e+"/"+i):i}(this.history.base,a,this.mode);return{location:i,route:r,href:o,normalizedTo:i,resolved:r}},It.prototype.getRoutes=function(){return this.matcher.getRoutes()},It.prototype.addRoute=function(e,t){this.matcher.addRoute(e,t),this.history.current!==ie&&this.history.transitionTo(this.history.getCurrentLocation())},It.prototype.addRoutes=function(e){this.matcher.addRoutes(e),this.history.current!==ie&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(It.prototype,jt),It.install=function e(t){if(!e.installed||Pe!==t){e.installed=!0,Pe=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",ue),t.component("RouterLink",je);var r=t.config.optionMergeStrategies;r.beforeRouteEnter=r.beforeRouteLeave=r.beforeRouteUpdate=r.created}},It.version="3.5.3",It.isNavigationFailure=mt,It.NavigationFailureType=ut,It.START_LOCATION=ie,Le&&window.Vue&&window.Vue.use(It);const Nt=It;var Lt=n(40158),Ft=n.n(Lt);function Rt(e){return function(e){if(Array.isArray(e))return Bt(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 Bt(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 Bt(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 Bt(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)),"menuType"===t&&void 0===n[t]?"column":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=$A.Date($A.formatDate("Y-m-d 00:00:00")),n=$A.Date($A.formatDate("Y-m-d 23:59:59")),i=$A.Date($A.formatDate("Y-m-d H:i:s")),r=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!e.archived_at&&((!e.complete_at||!0!==t)&&e.owner)},a=e.cacheTasks.filter((function(e){return r(e)}));if(e.taskCompleteTemps.length>0){var o,s=e.cacheTasks.filter((function(t){return e.taskCompleteTemps.includes(t.id)&&r(t,!1)}));if(s.length>0)(o=a=$A.cloneJSON(a)).push.apply(o,Gt(s))}return{today:a.filter((function(e){var i=$A.Date(e.start_at),r=$A.Date(e.end_at);return i<=t&&t<=r||i<=n&&n<=r||i>t&&n>r})),overdue:a.filter((function(e){return e.end_at&&$A.Date(e.end_at)<=i})),all:a}}};function Xt(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)||Qt(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 Jt(e){return function(e){if(Array.isArray(e))return en(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Qt(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 Qt(e,t){if(e){if("string"==typeof e)return en(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)?en(e,t):void 0}}function en(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"),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,tn({},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()}),d.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:Jt(new Set(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()}),d.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;var t=e.dispatch,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t("handleClearCache",{}).then((function(){var e=["/","/login"].includes(window.location.pathname)?"":encodeURIComponent(window.location.href);!1===n&&(e=null),$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),$A.setStorage("cacheTaskBrowse",n.cacheTaskBrowse),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={_load:!1,_edit:!1},a=n.files.findIndex((function(e){return e.id==t.id}));a>-1?n.files.splice(a,1,Object.assign(r,n.files[a],t)):n.files.push(Object.assign(r,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)),n.cacheDialogs.some((function(e){if("group"==e.type&&"project"==e.group_type&&e.group_info.id==t.id)for(var n in void 0!==t.name&&(e.name=t.name),e.group_info)e.group_info.hasOwnProperty(n)&&void 0!==t[n]&&(e.group_info[n]=t[n])})),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({name:"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){setTimeout((function(){n.projectLoad--}),10),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.menuInit&&!1!==s.menuInit||i("toggleProjectParameter",{project_id:t,key:{menuInit:!0,menuType:"table"}})}})).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=Xt(t.flow_item_name.split("|"),2);t.flow_item_status=r[0],t.flow_item_name=r[1]}void 0!==t.archived_at&&n.cacheTasks.filter((function(e){return e.parent_id==t.id})).some((function(e){i("saveTask",Object.assign(e,{archived_at:t.archived_at,archived_userid:t.archived_userid}))}));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(){})),n.cacheDialogs.some((function(e){if("group"==e.type&&"task"==e.group_type&&e.group_info.id==t.id)for(var n in void 0!==t.name&&(e.name=t.name),e.group_info)e.group_info.hasOwnProperty(n)&&void 0!==t[n]&&(e.group_info[n]=t[n])})),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)),n.cacheTasks.filter((function(t){return t.parent_id==e})).some((function(e){var t=n.cacheTasks.findIndex((function(t){return t.id==e.id}));t>-1&&(o.push(e.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){/^\d+$/.test(t)&&(t={task_id:t}),0!==$A.runNum(t.task_id)?n("call",{url:"project/task/one",data: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=a.all,u=o.map((function(e){return e.id}));u.push.apply(u,Jt(s.map((function(e){return e.id})))),u.push.apply(u,Jt(l.map((function(e){return e.id}))));var c=3;!function e(){if(c<=0){t.cacheLoading.loadDashboardTasks=!1;var a=i.dashboardTask,o=a.today,s=a.overdue,l=a.all,d=o.filter((function(e){return e._time>=r})).map((function(e){return e.id}));return d.push.apply(d,Jt(s.filter((function(e){return e._time>=r})).map((function(e){return e.id})))),d.push.apply(d,Jt(l.filter((function(e){return e._time>=r})).map((function(e){return e.id})))),void n("forgetTask",u.filter((function(e){return-1==d.indexOf(e)})))}2==--c?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):1==c?n("getTasks",{complete:"no",time_before:$A.formatDate("Y-m-d H:i:s")}).then(e).catch(e):0==c&&n("getTasks",{complete:"no"}).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,archived:"all"}).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.task_id)?(n("taskLoadStart",t.task_id),n("call",{url:"project/task/remove",data:t}).then((function(i){n("forgetTask",t.task_id),n("taskLoadEnd",t.task_id),e(i)})).catch((function(e){console.warn(e),n("getTaskOne",t.task_id).catch((function(){})),n("taskLoadEnd",t.task_id),i(e)}))):i({msg:"Parameter error"})}))},archivedTask:function(e,t){e.state;var n=e.dispatch;return new Promise((function(e,i){/^\d+$/.test(t)&&(t={task_id:t}),0!==$A.runNum(t.task_id)?(n("taskLoadStart",t.task_id),n("call",{url:"project/task/archived",data:t}).then((function(i){n("saveTask",i.data),n("taskLoadEnd",t.task_id),e(i)})).catch((function(e){console.warn(e),n("getTaskOne",t.task_id).catch((function(){})),n("taskLoadEnd",t.task_id),i(e)}))):i({msg:"Parameter error"})}))},getTaskContent:function(e,t){e.state;var n=e.dispatch;0!==$A.runNum(t)&&n("call",{url:"project/task/content",data:{task_id:t}}).then((function(e){n("saveTaskContent",e.data)})).catch((function(e){console.warn(e)}))},saveTaskContent:function(e,t){var n=e.state,i=e.dispatch;if($A.execMainDispatch("saveTaskContent",t),$A.isArray(t))t.forEach((function(e){i("saveTaskContent",e)}));else if($A.isJson(t)){var r=n.taskContents.findIndex((function(e){return e.task_id==t.task_id}));r>-1?n.taskContents.splice(r,1,Object.assign({},n.taskContents[r],t)):n.taskContents.push(t)}},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",{task_id:r,archived:"all"}).then((function(){i("getTaskContent",r),i("getTaskFiles",r),i("getTaskForParent",r).catch((function(){})),i("saveTaskBrowse",r)})).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){var r=t.confirm,a=t.post;n("taskLoadStart",a.task_id),n("call",{url:"project/task/update",data:a,method:"post"}).then((function(t){n("taskLoadEnd",a.task_id),n("saveTask",t.data),e(t)})).catch((function(e){console.warn(e),n("taskLoadEnd",a.task_id),n("getTaskOne",a.task_id).catch((function(){})),setTimeout((function(){i(e)}),!0===r?301:0)}))})).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),a&&a.flow_item_id==e.id&&a.flow_item_name!=e.name&&n.cacheTasks.filter((function(t){return t.flow_item_id==e.id})).some((function(t){i("saveTask",{id:t.id,flow_item_name:"".concat(e.status,"|").concat(e.name)})}))})),delete o.turns;var s=n.taskFlows.findIndex((function(e){return e.task_id==o.task_id}));s>-1?n.taskFlows.splice(s,1,o):n.taskFlows.push(o),e(r)})).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)}))}))},getColumnTemplate:function(e){var t=e.state,n=e.dispatch;return new Promise((function(e,i){n("call",{url:"system/column/template"}).then((function(n){t.columnTemplate=n.data,e(n)})).catch((function(e){console.warn(e),i(e)}))}))},saveTaskCompleteTemp:function(e,t){var n=e.state;/^\d+$/.test(t)&&!n.taskCompleteTemps.includes(t)&&n.taskCompleteTemps.push(t)},forgetTaskCompleteTemp:function(e,t){var n=e.state;!0===t?n.taskCompleteTemps=[]:/^\d+$/.test(t)&&(n.taskCompleteTemps=n.taskCompleteTemps.filter((function(e){return e!=t})))},saveTaskBrowse:function(e,t){var n=e.state,i=n.cacheTaskBrowse.findIndex((function(e){return e.id==t}));i>-1&&n.cacheTaskBrowse.splice(i,1),n.cacheTaskBrowse.unshift({id:t,userid:n.userId}),n.cacheTaskBrowse.length>200&&n.cacheTaskBrowse.splice(200),setTimeout((function(){$A.setStorage("cacheTaskBrowse",n.cacheTaskBrowse)}))},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;return new Promise((function(e,i){if(0===t.userId)return t.cacheDialogs=[],void i({msg:"Parameter error"});n("call",{url:"dialog/lists"}).then((function(t){n("saveDialog",t.data.data),e(t)})).catch((function(e){console.warn(e),i(e)}))}))},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?(n.dialogOpenId=0,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"})}))},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)}},forgetDialogMsg:function(e,t){var n=e.state;$A.execMainDispatch("forgetDialogMsg",t),($A.isArray(t)?t:[t]).some((function(e){var t=n.dialogMsgs.findIndex((function(t){return t.id==e}));t>-1&&n.dialogMsgs.splice(t,1)}))},getDialogMsgs:function(e,t){var n=e.state,i=e.dispatch;return new Promise((function(e){if(t){var r=n.cacheDialogs.find((function(e){return e.id==t}));r||(r={id:t},n.cacheDialogs.push(r)),r.loading?e():(r.loading=!0,r.currentPage=1,r.hasMorePages=!1,i("call",{url:"dialog/msg/lists",data:{dialog_id:t,page:r.currentPage}}).then((function(a){r.loading=!1,r.currentPage=a.data.current_page,r.hasMorePages=!!a.data.next_page_url,i("saveDialog",r);var o=a.data.data.map((function(e){return e.id}));n.dialogMsgs=n.dialogMsgs.filter((function(e){return e.dialog_id!=t||o.includes(e.id)})),i("saveDialog",a.data.dialog),i("saveDialogMsg",a.data.data),e()})).catch((function(t){console.warn(t),r.loading=!1,e()})))}else e()}))},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--,r.mark_unread=0,i("saveDialog",r)),n.wsReadWaitList.push(t.id),clearTimeout(n.wsReadTimeout),n.wsReadTimeout=setTimeout((function(){i("websocketSend",{type:"readMsg",data:{id:$A.cloneJSON(n.wsReadWaitList)}}),n.wsReadWaitList=[]}),50)}},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;var r=$A.randomString(16);t.wsRandom=r,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(){r===t.wsRandom&&n("websocketConnection")}),3e3)},t.ws.onerror=function(e){t.ws=null,clearTimeout(t.wsTimeout),t.wsTimeout=setTimeout((function(){r===t.wsRandom&&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;switch(i){case"delete":n("forgetDialogMsg",r.id);var o=t.cacheDialogs.find((function(e){return e.id==r.dialog_id}));o&&(o.last_at=r.last_msg&&r.last_msg.created_at,o.last_msg=r.last_msg,r.update_read?n("call",{url:"dialog/msg/unread",dialog_id:r.dialog_id}).then((function(e){o.unread=e.data.unread,n("saveDialog",o)})).catch((function(){})):n("saveDialog",o));break;case"add":case"chat":if(!t.dialogMsgs.find((function(e){return e.id==r.id}))){if(n("increaseTaskMsgNum",a),"chat"===i)return;if(r.userid!==t.userId){var s=t.cacheDialogs.find((function(e){return e.id==r.dialog_id}));s&&void 0===t.cacheUnreads[r.id]&&(t.cacheUnreads[r.id]=!0,s.unread++,n("saveDialog",s))}d.Store.set("dialogMsgPush",r)}n("saveDialogMsg",r),n("updateDialogLastMsg",r);break;case"readed":t.dialogMsgs.find((function(e){return e.id==r.id}))&&n("saveDialogMsg",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":case"restore":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"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(),t.ws=null)}};i.default.use(r.ZP);const rn=new r.ZP.Store({state:Kt,getters:Zt,mutations:{},actions:nn});function an(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 on(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const sn={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 hn=(0,o.Z)(dn,(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||e.disabled,"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 fn={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(e){this.isFocus=!0,this.$emit("on-focus",e)},onBlur:function(e){this.isFocus=!1,this.addTag(!1,this.content),this.$emit("on-blur",e)},onKeyup:function(e){var t=this;this.addTag(e,this.content),this.$emit("on-keyup",e),13===e.keyCode&&this.$nextTick((function(){t.$emit("on-enter",e)}))},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()),void(this.content="");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 pn=(0,o.Z)(fn,(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:e.onKeyup,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 mn=n(3869),vn=n.n(mn);i.default.use(vn());const gn={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:{isAliIcon:function(e){return $A.leftExists(e,"&#")},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 bn=(0,o.Z)(gn,(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}},[e.isAliIcon(t.icon)?n("i",{staticClass:"taskfont menu-icon",style:t.style||{},domProps:{innerHTML:e._s(t.icon)}}):n("Icon",{staticClass:"menu-icon",style:t.style||{},attrs:{type: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):e.isAliIcon(t.icon)?n("i",{staticClass:"taskfont menu-icon",style:t.style||{},domProps:{innerHTML:e._s(t.icon)},on:{click:function(n){return e.onClick(t.action)}}}):n("Icon",{staticClass:"menu-icon",style:t.style||{},attrs:{type:t.icon},on:{click:function(n){return e.onClick(t.action)}}})],1)}))],2)])}),[],!1,null,null,null).exports;const yn={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},clickOutSide:{type:Boolean,default:!0}},data:function(){return{isLoad:!1,isEdit:!1,content:""}},mounted:function(){!0===this.autoEdit&&this.onEdit()},watch:{autoEdit:function(e){!0===e&&setTimeout(this.onEdit,0)}},methods:{onEditChange:function(e){this.isEdit=e,this.$emit("on-edit-change",e)},onEdit:function(){var e=this;this.content=this.value,this.onEditChange(!0),this.$nextTick((function(){e.$refs.input.focus({cursor:"all"})}))},onKeydown:function(e){13===e.keyCode?this.onEnter():27===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.isEdit=!1,this.isLoad=!1)},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.onEditChange(!1),e.isLoad=!1}))):this.onEditChange(!1)},onClickOut:function(){this.clickOutSide&&this.onEnter()},onBlur:function(){!this.clickOutSide&&this.isEdit&&this.onEnter()}}};const wn=(0,o.Z)(yn,(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.onClickOut,expression:"onClickOut"}],staticClass:"quick-input"},[e.isTag?n("TagInput",{ref:"input",attrs:{disabled:e.isLoad},on:{"on-keydown":e.onKeydown,"on-blur":e.onBlur},model:{value:e.content,callback:function(t){e.content=t},expression:"content"}}):n("Input",{ref:"input",attrs:{disabled:e.isLoad},on:{"on-keydown":e.onKeydown,"on-blur":e.onBlur},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 _n(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 xn(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.setUser(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.setUser(this.userInfo))},setUser:function(e){try{this.user&&this.user.userimg!=e.userimg&&this.$refs.avatar&&(this.$refs.avatar.$data.isImageExist=!0)}catch(e){}this.user=e},onError:function(){return!0},openDialog:function(){this.goForward({name:"manage-messenger"}),this.$store.dispatch("openDialogUserid",this.userid).catch((function(){}))}}};const Sn=(0,o.Z)(Cn,(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",{ref:"avatar",class:{"avatar-default":e.isDefault},attrs:{src:e.user.userimg,size:e.avatarSize,error:e.onError}},[n("span",{staticClass:"avatar-char",style:e.spotStyle},[e._v(e._s(e.nickname))])]):n("EAvatar",{staticClass:"avatar-text",attrs:{size:e.avatarSize}},[n("span",{staticClass:"avatar-char",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;const On={name:"ImgView",props:{src:{default:""},alt:{default:""}},computed:{srcValue:function(){var e=this.src;return"data:image"===e.substring(0,10)||"//"===e.substring(0,2)||"http://"===e.substring(0,7)||"https://"===e.substring(0,8)||"ftp://"===e.substring(0,6)||"/"===e.substring(0,1)?e:$A.apiUrl("../".concat(e))}}};const Tn=(0,o.Z)(On,(function(){var e=this,t=e.$createElement;return(e._self._c||t)("img",{attrs:{src:e.srcValue,alt:e.alt}})}),[],!1,null,null,null).exports;var Dn=n(64720);function En(e){return En="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},En(e)}var $n=window&&window.process&&window.process.type;i.default.use(r.ZP),i.default.use(Ft(),{modal:{checkEscClose:!0}}),i.default.use(Nt),i.default.use(qt),i.default.component("PageTitle",ln),i.default.component("Loading",cn),i.default.component("AutoTip",hn),i.default.component("TagInput",pn),i.default.component("TableAction",bn),i.default.component("QuickEdit",wn),i.default.component("UserAvatar",Sn),i.default.component("ImgView",Tn),i.default.component("EAvatar",Dn.Avatar),i.default.component("ETooltip",Dn.Tooltip),i.default.component("EPopover",Dn.Popover),i.default.component("EDropdown",Dn.Dropdown),i.default.component("EDropdownMenu",Dn.DropdownMenu),i.default.component("EDropdownItem",Dn.DropdownItem);var Mn=Nt.prototype.push;Nt.prototype.push=function(e){return Mn.call(this,e).catch((function(e){return e}))};var Pn=new Nt({mode:$n?"hash":"history",routes:W});Ft().LoadingBar.config({color:"#3fcc25",failedColor:"#ff0000"}),Pn.beforeEach((function(e,t,n){Ft().LoadingBar.start(),n()})),Pn.afterEach((function(){Ft().LoadingBar.finish()})),i.default.prototype.goForward=function(e,t){"string"==typeof e&&(e={name:e}),!0===t?In.$router.replace(e).then((function(){})).catch((function(){})):In.$router.push(e).then((function(){})).catch((function(){}))},i.default.prototype.goBack=function(e){var t=$A.jsonParse(window.sessionStorage.__history__||"{}");$A.runNum(t["::count"])>2?In.$router.go("number"==typeof e?e:-1):In.$router.replace("object"===En(e)?e:{path:"/"}).then((function(){})).catch((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,$n&&(i.default.prototype.$Electron=electron,i.default.prototype.$Platform=/macintosh|mac os x/i.test(navigator.userAgent)?"mac":"win",i.default.prototype.$isMainElectron=/\s+MainTaskWindow\//.test(window.navigator.userAgent),i.default.prototype.$isSubElectron=/\s+SubTaskWindow\//.test(window.navigator.userAgent)),i.default.config.productionTip=!1;var In=new i.default({el:"#app",router:Pn,store:rn,template:"",components:{App:H}});$A.goForward=In.goForward,$A.goBack=In.goBack,$A.getLanguage=In.getLanguage,$A.Message=In.$Message,$A.Notice=In.$Notice,$A.Modal=In.$Modal,$A.store=In.$store,$A.L=In.$L,$A.Electron=In.$Electron,$A.Platform=In.$Platform,$A.isMainElectron=In.$isMainElectron,$A.isSubElectron=In.$isSubElectron,$A.execMainDispatch=function(e,t){$A.isSubElectron&&$A.Electron.sendMessage("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:()=>Ce});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(){k+=null!=b.subLanguage?function(){var e="string"==typeof b.subLanguage;if(e&&!o[b.subLanguage])return f(C);var t=e?w(b.subLanguage,C,!0,x[b.subLanguage]):_(C,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(C);for(i="",t=0,b.lexemesRe.lastIndex=0,n=b.lexemesRe.exec(C);n;)i+=f(C.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(C);return i+f(C.substr(t))}(),C=""}function c(e){k+=e.className?l(e.className,"",!0):"",b=Object.create(e,{parent:{value:b}})}function p(e,t){if(C+=e,null==t)return u(),0;var i=function(e,t){var n,i;for(n=0,i=t.contains.length;n")+'"');return C+=t,t.length||1}var v=S(e);if(!v)throw new Error('Unknown language: "'+e+'"');y(v);var g,b=i||v,x={},k="";for(g=b;g!==v;g=g.parent)g.className&&(k=l(g.className,"",!0)+k);var C="",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&&(k+=d);return{relevance:O,value:k,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 k(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 C(){if(!C.called){C.called=!0;var e=document.querySelectorAll("pre code");r.forEach.call(e,k)}}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=k,i.configure=function(e){h=g(h,e)},i.initHighlighting=C,i.initHighlightingOnLoad=function(){addEventListener("DOMContentLoaded",C,!1),addEventListener("load",C,!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 ke=new xe.Renderer;const Ce=xe.setOptions({renderer:ke,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},rightDelete:function(e,t){var i=arguments.length>2&&arguments[2]!==n&&arguments[2];return e+="",t+="",this.rightExists(e,t,i)&&(e=e.substring(0,e.length-t.length)),e||""},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)},isEmail:function(e){return/^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*\.)+[a-zA-Z]*)$/i.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"},isChrome:function(){return(void 0!==e&&e.navigator.userAgent.toLowerCase()).match(/Chrome/i)+""=="chrome"},isDesktop:function(){return!(void 0!==e&&e.navigator.userAgent).match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)},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 this.rightDelete(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]:""},scrollToView:function(t,n){if(t)if(void 0===n.scrollMode||"function"!=typeof e.scrollIntoView)try{t.scrollIntoView(n)}catch(i){"function"==typeof e.scrollIntoView&&e.scrollIntoView(t,n)}else e.scrollIntoView(t,n)}}),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,menuInit:!1,menuType:"column",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=$A.Date(e,!0);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):0==n?"0s":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())]}}]},dialogTags:function(e){var t=[];return"group"==e.type&&["project","task"].includes(e.group_type)&&$A.isJson(e.group_info)&&("task"==e.group_type&&e.group_info.complete_at&&t.push({color:"success",text:"已完成"}),e.group_info.deleted_at?t.push({color:"red",text:"已删除"}):e.group_info.archived_at&&t.push({color:"default",text:"已归档"})),t},dialogCompleted:function(e){return this.dialogTags(e).find((function(e){return"success"==e.color}))},getDialogUnread:function(e){return e&&(e.unread||e.mark_unread)||0}}),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),i=function(){"function"==typeof e.onOk?!0===e.onOk(e.value,(function(){$A.Modal.remove()}))&&$A.Modal.remove():$A.Modal.remove()},r=function(){"function"==typeof e.onCancel&&e.onCancel()};$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},"on-enter":function(e){$A(e.target).parents(".ivu-modal-body").find(".ivu-btn-primary").click()}}})])},onOk:i,onCancel:r,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(){$A.isChrome()&&(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=[]},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,k=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)}},C=t+" Iterator",S=g==p,O=!1,T=e.prototype,D=T[d]||T["@@iterator"]||g&&T[g],E=D||k(g),$=g?S?k("entries"):E:void 0,M="Array"==t&&T.entries||D;if(M&&(x=c(M.call(new e)))!==Object.prototype&&x.next&&(u(x,C,!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[C]=m,g)if(w={values:S?E:k(p),keys:b?E:k(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=Le.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=wy.get(n),o=wy.urls[n]||t.documentBaseUrl.replace(/\/$/,"");if(n=Ee.trim(n),r&&-1===Ee.inArray(e,n)){if(Ee.each(wy.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):w(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=Lt(Lt({},ly.get("default").icons),ly.get(e).icons);ft(r,(function(e,r){wt(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=_y.get(e);t.theme=new n(t,_y.urls[e]),t.theme.init&&t.theme.init(t,_y.urls[e]||t.documentBaseUrl.replace(/\/$/,""),t.$)}else t.theme={}}(t),function(t){var e=[];Ee.each(Cc(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(C),hide:B.from(e.hide).getOr(C),disable:B.from(e.disable).getOr(C),isDisabled:B.from(e.isDisabled).getOr($),enable:function(){t.mode.isReadOnly()||B.from(e.enable).map(A)}};t.ui=Lt(Lt({},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,Ay(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,C,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(",")},LD=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)},AD=Ee.each,$D=Ee.map,ND=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(AD(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;AD(t,(function(t,r){AD(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":C,"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"),AD("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){LD(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){AC(t,e)},mceRepaint:C,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=$D(r,(function(n){return!!t.formatter.matchNode(n,e)}));return-1!==ND(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 EC(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=Le.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,As(r=t)?r.dom.classList.remove(o):Ns(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=Le.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),_m(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=Le.fromDom(e.target);(function(t,e){return Qr(e,"a",(function(e){return Pe(e,Le.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||$}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()]=Lt(Lt({},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&&(ws.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:C,hide:C,enable:C,disable:C,isDisabled:$};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 wm(this)},t.prototype.execCallback=function(t){for(var e=[],n=1;n0?_S[0]:null),SS.focusedEditor===t&&(SS.focusedEditor=null),e.length!==_S.length},DS="CSS1Compat"!==document.compatMode,SS=Lt(Lt({},qD),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:cs,majorVersion:"5",minorVersion:"10.3",releaseDate:"2022-02-09",editors:wS,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?_S.slice(0):f(t)?J(_S,(function(e){return e.id===t})).getOr(null):_(t)&&_S[t]?_S[t]:null},add:function(t){var e=this;return wS[t.id]===t||(null===e.get(t.id)&&("length"!==t.id&&(wS[t.id]=t),wS.push(t),_S.push(t)),kS(!0),e.activeEditor=t,e.fire("AddEditor",{editor:t}),j_||(j_=function(t){var n=e.fire("BeforeUnload");if(n.returnValue)return t.preventDefault(),t.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",j_))),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===_S.length&&window.removeEventListener("beforeunload",j_),n.remove(),kS(_S.length>0),n);gS(pS.select(t),(function(t){(n=r.get(t.id))&&r.remove(n)}))}else for(e=_S.length-1;e>=0;e--)r.remove(_S[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(_S,(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,LS,AS=Math.min,$S=Math.max,NS=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+=NS(u/2)),"c"===c[1]&&(r+=NS(s/2)),"b"===c[3]&&(o-=a),"r"===c[4]&&(r-=i),"c"===c[3]&&(o-=NS(a/2)),"c"===c[4]&&(r-=NS(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=$S(t.x,e.x),r=$S(t.y,e.y),o=AS(t.x+t.w,e.x+e.w),i=AS(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=$S(0,e.x-r),l=$S(0,e.y-o),d=$S(0,i-s),f=$S(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=$y(),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:ws,RangeUtils:Cf,Serializer:Nb,StyleSheetLoader:io,ControlSelection:sf,BookmarkManager:Jd,Selection:lb,Event:zi.Event},html:{Styles:Ai,Entities:yi,Node:Nm,Schema:Oi,SaxParser:qm,DomParser:Eb,Writer:Qm,Serializer:tp},Env:ke,AddOnManager:Ss,Annotator:Gd,Formatter:Wy,UndoManager:Ky,EditorCommands:PD,WindowManager:Cy,NotificationManager:yy,EditorObservable:GD,Shortcuts:aS,Editor:mS,FocusManager:cm,EditorManager:SS,DOM:gs.DOM,ScriptLoader:ws.ScriptLoader,PluginManager:wy,ThemeManager:_y,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)}()},30264:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});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()}};const p=(0,n(51900).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},70631:(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(){if(!this.beforeClose)return this.handleClose();var t=this.beforeClose();t&&t.then?t.then(this.handleClose):this.handleClose()},handleClose: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},2749:(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(t,e){void 0===e._uploadIng&&(e._uploadIng=!0,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(){this.autoBottom&&$A.scrollToView(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},89500:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>f});var r=n(47575),o=n.n(r),i=n(2749),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()},setContent:function(t){null===this.getEditor()?this.content=t:t!=this.getEditor().getContent()&&this.getEditor().setContent(t)},focus:function(){return null===this.getEditor()?"":this.getEditor().focus()},insertImage:function(t){this.insertContent('')},editorImage:function(t){for(var e=0;e|\/>)/gi);if(n)for(var r=0;r').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.spinShow?"":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},73701:(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{loadIng:0,selects:[],list:[],searchKey:null,searchHistory:[],subscribe:null}},mounted:function(){var t=this;this.subscribe=r.Store.subscribe("cacheUserActive",(function(e){var n=t.list.findIndex((function(t){return t.userid==e.userid}));n>-1&&(t.$set(t.list,n,Object.assign({},t.list[n],e)),t.handleSelectData())}))},beforeDestroy:function(){this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},computed:{maxHiddenClass:function(){var t=this.multipleMax,e=this.maxHiddenInput,n=this.selects;return t&&e&&n.length>=t?"hidden-input":""}},watch:{value:{handler:function(){this.valueChange()},immediate:!0},selects:function(t){this.$emit("input",t)}},methods:{searchUser:function(t){var e=this;"string"!=typeof t&&(t=""),this.searchKey=t;var n=this.searchHistory.find((function(e){return e.key==t}));n&&(this.list=n.data),n||this.loadIng++,setTimeout((function(){e.searchKey==t?e.$store.dispatch("call",{url:"users/search",data:{keys:{key:t,project_id:e.projectId,no_project_id:e.noProjectId},take:30}}).then((function(r){var o=r.data;n||e.loadIng--,e.list=o;var i=e.searchHistory.findIndex((function(e){return e.key==t})),a={key:t,data:o,time:$A.Time()};i>-1?e.searchHistory.splice(i,1,a):e.searchHistory.push(a)})).catch((function(t){var r=t.msg;n||e.loadIng--,e.list=[],$A.messageWarning(r)})):n||e.loadIng--}),this.searchHistory.length>0?300:0)},isDisabled:function(t){return 0!==this.disabledChoice.length&&this.disabledChoice.includes(t)},openChange:function(t){t&&this.$nextTick(this.searchUser)},remoteMethod:function(){},valueChange:function(){var t=this;this.selects!=this.value&&($A.isArray(this.value)?this.selects=$A.cloneJSON(this.value):this.value?this.selects=[this.value]:this.selects=[],this.selects.some((function(e){t.list.find((function(t){return t.userid==e}))||(t.list.push({userid:e,nickname:e}),t.$store.dispatch("getUserBasic",{userid:e}))})))},handleSelectData:function(){var t=this;this.__handleSelectTimeout&&clearTimeout(this.__handleSelectTimeout),this.__handleSelectTimeout=setTimeout((function(){if(t.$refs.select){var e=t.$refs.select.getValue();e&&e.some((function(e){var n=t.list.find((function(t){return t.userid==e.value}));n&&(t.$set(e,"label",n.nickname),t.$set(e,"avatar",n.userimg))}))}}),100)}}};const i=(0,n(51900).Z)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:["common-user",t.maxHiddenClass]},[n("Select",{ref:"select",attrs:{transfer:t.transfer,placeholder:t.placeholder,size:t.size,loading:t.loadIng>0,"loading-text":t.$L("加载中..."),"default-label":t.value,"default-event-object":!0,"multiple-max":t.multipleMax,"multiple-uncancelable":t.uncancelable,"remote-method":t.remoteMethod,multiple:"",filterable:"","transfer-class-name":"common-user-transfer"},on:{"on-query-change":t.searchUser,"on-open-change":t.openChange},model:{value:t.selects,callback:function(e){t.selects=e},expression:"selects"}},[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,"key-value":e.email,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.loadIng>0?n("div",{staticClass:"common-user-loading"},[n("Loading")],1):t._e()],1)}),[],!1,null,null,null).exports},28185:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>U});var r=n(20629),o=n(66237);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.onSearch}},[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("div",{staticClass:"table-page-box"},[n("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),t._v(" "),n("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowMax768,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])}),[],!1,null,null,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 d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const f={name:"TeamManagement",data:function(){return{loadIng:0,keys:{identity:"nodisable"},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:{placeholder:t.$L("邮箱、昵称、职位"),clearable:""},model:{value:t.keys.key,callback:function(e){t.$set(t.keys,"key",e)},expression:"keys.key"}})],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",{attrs:{placeholder:t.$L("请选择")},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:"noadmin"}},[t._v(t._s(t.$L("非管理员")))]),t._v(" "),n("Option",{attrs:{value:"disable"}},[t._v(t._s(t.$L("禁用")))]),t._v(" "),n("Option",{attrs:{value:"nodisable"}},[t._v(t._s(t.$L("非禁用")))])],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("Select",{attrs:{placeholder:t.$L("请选择")},model:{value:t.keys.email_verity,callback:function(e){t.$set(t.keys,"email_verity",e)},expression:"keys.email_verity"}},[n("Option",{attrs:{value:""}},[t._v(t._s(t.$L("全部")))]),t._v(" "),n("Option",{attrs:{value:"yes"}},[t._v(t._s(t.$L("已邮箱认证")))]),t._v(" "),n("Option",{attrs:{value:"no"}},[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.onSearch}},[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:"table-page-box"},[n("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),t._v(" "),n("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowMax768,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])}),[],!1,null,null,null).exports;function p(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 h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const g={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",{attrs:{placeholder:t.$L("请选择")},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.onSearch}},[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:"table-page-box"},[n("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),t._v(" "),n("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowMax768,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])}),[],!1,null,null,null).exports;var b=n(70631);const y={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 w=(0,u.Z)(y,(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 _=n(19246),C=n(22371);function k(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 x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const D={name:"ReportMy",data:function(){return{loadIng:0,columns:[],lists:[],listPage:1,listTotal:0,listPageSize:20,noDataText:"",createAt:[],reportType:"",reportTypeList:[]}},mounted:function(){this.getLists()},computed:function(t){for(var e=1;e0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[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("div",{staticClass:"table-page-box"},[n("Table",{attrs:{columns:t.columns,data:t.lists,loading:t.loadIng>0,"no-data-text":t.$L(t.noDataText),stripe:""}}),t._v(" "),n("Page",{attrs:{total:t.listTotal,current:t.listPage,"page-size":t.listPageSize,disabled:t.loadIng>0,simple:t.windowMax768,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])}),[],!1,null,"5c19542f",null).exports;function T(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 E(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const O={name:"ReportReceive",data:function(){return{loadIng:0,columns:[],lists:[],listPage:1,listTotal:0,listPageSize:20,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.onSearch}},[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:"table-page-box"},[n("Table",{attrs:{columns:t.columns,data:t.lists,loading:t.loadIng>0,"no-data-text":t.$L(t.noDataText),stripe:""}}),t._v(" "),n("Page",{attrs:{total:t.listTotal,current:t.listPage,"page-size":t.listPageSize,disabled:t.loadIng>0,simple:t.windowMax768,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])}),[],!1,null,"471ba53f",null).exports;var A=n(34910);const $={name:"Report",components:{DrawerOverlay:b.Z,ReportEdit:C.Z,ReportMy:S,ReportReceive:L,ReportDetail:A.Z},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,this.$isMainElectron&&this.$Electron.registerMsgListener("reportSaveSuccess",this.saveSuccess)},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){if(this.detailData=t,this.$emit("on-read"),this.$Electron){var e={title:t.title,titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)};this.$Electron.sendMessage("windowRouter",{name:"report-"+t.id,path:"/single/report/detail/"+t.id,force:!1,config:e})}else this.showDetailDrawer=!0},onEditReport:function(t){if(this.reportId=t,this.$Electron){var e={title:this.$L(t>0?"修改报告":"新增报告"),parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)};this.$Electron.sendMessage("windowRouter",{name:"report-"+t,path:"/single/report/edit/"+t,force:!1,config:e})}else this.showEditDrawer=!0},saveSuccess:function(){this.reportId=0,this.reportTabs="my",this.showEditDrawer=!1,this.$refs.report&&this.$refs.report.getLists()}}};const N=(0,u.Z)($,(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"}},[t.showDetailDrawer?n("ReportDetail",{attrs:{data:t.detailData}}):t._e()],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:1e3,transfer:""},model:{value:t.showEditDrawer,callback:function(e){t.showEditDrawer=e},expression:"showEditDrawer"}},[t.showEditDrawer?n("ReportEdit",{attrs:{id:t.reportId},on:{saveSuccess:t.saveSuccess}}):t._e()],1)],1)}),[],!1,null,null,null).exports,P=(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)),I=(t,e,n)=>t.findIndex((t=>t[e]===n));const R=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(!P("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&&P("number",t)?this.timeout=t:this.timeout=5e3}notificationWatch(){this.notificationAll.push(this.notification),this.notification.requireInteraction?this.everyTimeout():this.autoClose(),this.watchClose()}everyTimeout(){P("number",this.timeout)&&(this.options.timeOut&&P("number",this.options.timeOut)?this.timeoutCloseFn(this.options.timeOut):this.timeoutCloseFn(this.timeout))}timeoutCloseFn(t){const e=this.notification.timestamp;setTimeout((()=>{const t=I(this.notificationAll,"timestamp",e);-1!==t&&this.notificationAll[t].close()}),t)}watchClose(){const t=this.notification.timestamp;this.notification.addEventListener("close",(e=>{const n=I(this.notificationAll,"timestamp",t);-1!==n&&this.notificationAll.splice(n,1)}))}autoClose(){const t=this.notification.timestamp;setTimeout((()=>{const e=I(this.notificationAll,"timestamp",t);-1!==e&&this.notificationAll.splice(e,1)}),6e3)}notificationEvent(t){if(this.checkStatus("support")){if(!P("Object",t))return console.error("callObj必须为对象");for(const e in t)if(!P("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&&P("Object",t))for(const e in t)this.options[e]=t[e];else console.warn("updateOptions参数错误:options为必填对象")}replaceTitle(t){t&&P("String",t)?this.title=t:console.warn("replaceTitle: title(通知标题)为必填字符串")}replaceOptions(t){t&&P("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}};var B=n(80641);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 j(t){for(var e=1;e0?this.msgAllUnread+this.dashboardTask.overdue.length+this.reportUnreadNumber:0},currentLanguage:function(){return this.languageList[this.languageType]||"Language"},menu:function(){return this.userIsAdmin?[{path:"taskBrowse",name:"最近打开的任务"},{path:"personal",name:"个人设置",divided:!0},{path:"password",name:"密码设置"},{path:"clearCache",name:"清除缓存"},{path:"system",name:"系统设置",divided:!0},{path:"version",name:"更新版本",visible:!!this.clientNewVersion},{path:"allProject",name:"所有项目",divided:!0},{path:"archivedProject",name:"已归档的项目"},{path:"team",name:"团队管理",divided:!0},{path:"theme",name:"主题皮肤",divided:!0},{path:"language",name:this.currentLanguage,divided:!0},{path:"logout",name:"退出登录",style:{color:"#f40"},divided:!0}]:[{path:"taskBrowse",name:"最近打开的任务"},{path:"personal",name:"个人设置",divided:!0},{path:"password",name:"密码设置"},{path:"clearCache",name:"清除缓存"},{path:"version",name:"更新版本",divided:!0,visible:!!this.clientNewVersion},{path:"workReport",name:"工作报告",divided:!0},{path:"archivedProject",name:"已归档的项目"},{path:"theme",name:"主题皮肤",divided:!0},{path:"language",name:this.currentLanguage,divided:!0},{path:"logout",name:"退出登录",style:{color:"#f40"},divided:!0}]},columns:function(){var t=$A.cloneJSON(this.columnTemplate);return t.unshift({name:this.$L("空白模板"),columns:[]}),t},projectLists:function(){var t=this.projectKeyValue,e=this.cacheProjects,n=$A.cloneJSON(e).sort((function(t,e){return t.top_at||e.top_at?$A.Date(e.top_at)-$A.Date(t.top_at):e.id-t.id}));return t?n.filter((function(e){return e.name.toLowerCase().indexOf(t.toLowerCase())>-1})):n},taskStyle:function(){var t=this.innerHeight;return{maxHeight:t-(t>900?200:70)-20+"px"}},overlayClass:function(){return{"overlay-y":!0,"overlay-none":!0===this.topOperateVisible}},taskBrowseLists:function(){var t=this.cacheTasks,e=this.cacheTaskBrowse,n=this.userId;return e.filter((function(t){return t.userid===n})).map((function(e){var n=e.id;return t.find((function(t){return t.id===n}))||{}}))}}),watch:{$route:function(t){this.curPath=t.path,this.chackPass()},userInfo:function(){this.chackPass()},taskId:function(t){t>0&&this.$Modal.resetIndex()},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.notificationClass&&(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))},workReportShow:function(t){t&&this.getReportUnread(0)},unreadTotal:{handler:function(t){this.$Electron&&this.$Electron.sendMessage("setDockBadge",t)},immediate:!0},userId:{handler:function(){this.$store.dispatch("websocketConnection")},immediate:!0},wsMsg:{handler:function(t){var e=t.type,n=t.action;if("report"===e)"unreadUpdate"==n&&this.getReportUnread()},deep:!0}},methods:{initLanguage:function(){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({name:"manage-setting-password"})},setTheme:function(t){this.$store.dispatch("setTheme",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"exportTask":return void(this.exportTaskShow=!0);case"workReport":return this.reportUnreadNumber>0&&(this.reportTabs="receive"),void(this.workReportShow=!0);case"version":return void B.Store.set("updateNotification",null);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"logout":return void $A.modalConfirm({title:"退出登录",content:"你确定要登出系统?",onOk:function(){e.$store.dispatch("logout",!1)}})}this.menu.findIndex((function(e){return e.path==t}))>-1&&this.toggleRoute("setting/"+t)},menuVisibleChange:function(t){this.visibleMenu=t},classNameRoute:function(t){return{active:this.curPath=="/manage/"+t}},classNameProject:function(t){var e="project/"+t.id,n=this.openMenu[t.id];return{active:this.curPath=="/manage/"+e,"open-menu":!0===n,operate:t.id==this.topOperateItem.id&&this.topOperateVisible}},onAddShow:function(){var t=this;this.$store.dispatch("getColumnTemplate").catch((function(){})),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].columns.join(","))}))},shortcutEvent:function(t){(t.metaKey||t.ctrlKey)&&(75===t.keyCode||78===t.keyCode?(t.preventDefault(),this.onAddTask(0)):83===t.keyCode&&this.taskId>0&&(t.preventDefault(),this.$refs.taskDetail.checkUpdate(!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},openTask:function(t){this.$store.dispatch("openTask",t)},addDialogMsg:function(t){var e=this;if(this.natificationReady&&(this.natificationHidden||"/manage/messenger"!=this.curPath||this.dialogOpenId!=t.dialog_id)){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.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||0})).catch((function(){}))}),"number"==typeof t?t:1e3)},handleRightClick:function(t,e){var n=this;this.handleClickTopOperateOutside(),this.topOperateItem=e,this.$nextTick((function(){var e=n.$refs.projectWrapper.getBoundingClientRect();n.topOperateStyles={left:"".concat(t.clientX-e.left,"px"),top:"".concat(t.clientY-e.top,"px")},n.topOperateVisible=!0}))},handleClickTopOperateOutside:function(){this.topOperateVisible=!1},handleTopClick:function(){var t=this;this.$store.dispatch("call",{url:"project/top",data:{project_id:this.topOperateItem.id}}).then((function(e){var n=e.data;t.$store.dispatch("saveProject",n),t.$nextTick((function(){var e=t.$refs.projectWrapper.querySelector(".active");e&&$A.scrollToView(e,{behavior:"instant",scrollMode:"if-needed"})}))})).catch((function(t){var e=t.msg;$A.modalError(e)}))},onExportTask:function(){var t=this;this.exportLoadIng>0||(this.exportLoadIng++,this.$store.dispatch("call",{url:"project/task/export",data:this.exportData}).then((function(e){var n=e.data;t.exportLoadIng--,t.exportTaskShow=!1,t.$store.dispatch("downUrl",{url:n.url})})).catch((function(e){var n=e.msg;t.exportLoadIng--,$A.modalError(n)})))},notificationInit:function(){var t=this;this.notificationClass=new R(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({name:"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 U=(0,u.Z)(F,(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:"page-manage-menu-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(" "),t.reportUnreadNumber>0?n("Badge",{staticClass:"manage-box-top-report",attrs:{count:t.reportUnreadNumber}}):t.clientNewVersion?n("Badge",{staticClass:"manage-box-top-report",attrs:{dot:""}}):t._e(),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){return["taskBrowse"===e.path?n("Dropdown",{attrs:{transfer:"","transfer-class-name":"page-manage-menu-dropdown",placement:"right-start"}},[n("DropdownItem",[n("div",{staticClass:"manage-menu-flex"},[t._v("\n "+t._s(t.$L(e.name))+"\n "),n("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),t._v(" "),t.taskBrowseLists.length>0?n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},t._l(t.taskBrowseLists,(function(e,r){return e.id>0&&r<10?n("DropdownItem",{key:r,staticClass:"task-title",attrs:{name:e.name},nativeOn:{click:function(n){return t.openTask(e)}}},[t._v(t._s(e.name))]):t._e()})),1):n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[n("DropdownItem",{staticStyle:{color:"darkgrey"}},[t._v(t._s(t.$L("暂无打开记录")))])],1)],1):"team"===e.path?n("Dropdown",{attrs:{transfer:"","transfer-class-name":"page-manage-menu-dropdown",placement:"right-start"}},[n("DropdownItem",{attrs:{divided:""}},[n("div",{staticClass:"manage-menu-flex"},[t._v("\n "+t._s(t.$L(e.name))+"\n "),t.reportUnreadNumber>0?n("Badge",{staticClass:"manage-menu-report-badge",attrs:{count:t.reportUnreadNumber}}):n("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),t._v(" "),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[n("DropdownItem",{attrs:{name:"allUser"}},[t._v(t._s(t.$L("团队管理")))]),t._v(" "),n("DropdownItem",{attrs:{name:"workReport"}},[n("div",{staticClass:"manage-menu-flex"},[t._v("\n "+t._s(t.$L("工作报告"))+"\n "),t.reportUnreadNumber>0?n("Badge",{staticClass:"manage-menu-report-badge",attrs:{count:t.reportUnreadNumber}}):t._e()],1)]),t._v(" "),n("DropdownItem",{attrs:{name:"exportTask"}},[t._v(t._s(t.$L("导出任务统计")))])],1)],1):"theme"===e.path?n("Dropdown",{attrs:{placement:"right-start",transfer:"","transfer-class-name":"page-manage-menu-dropdown"},on:{"on-click":t.setTheme}},[n("DropdownItem",{attrs:{divided:""}},[n("div",{staticClass:"manage-menu-flex"},[t._v("\n "+t._s(t.$L(e.name))+"\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("DropdownItem",{key:r,attrs:{name:e.value,selected:t.themeMode===e.value}},[t._v(t._s(t.$L(e.name)))])})),1)],1):"language"===e.path?n("Dropdown",{attrs:{placement:"right-start",transfer:"","transfer-class-name":"page-manage-menu-dropdown"},on:{"on-click":t.setLanguage}},[n("DropdownItem",{attrs:{divided:""}},[n("div",{staticClass:"manage-menu-flex"},[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("DropdownItem",{key:r,attrs:{name:r,selected:t.getLanguage()===r}},[t._v(t._s(e))])})),1)],1):!1!==e.visible?n("DropdownItem",{style:e.style||{},attrs:{divided:!!e.divided,name:e.path}},[n("div",{staticClass:"manage-menu-flex"},[t._v("\n "+t._s(t.$L(e.name))+"\n "),"version"===e.path?n("Badge",{staticClass:"manage-menu-report-badge",attrs:{text:t.clientNewVersion}}):"workReport"===e.path&&t.reportUnreadNumber>0?n("Badge",{staticClass:"manage-menu-report-badge",attrs:{count:t.reportUnreadNumber}}):t._e()],1)]):t._e()]}))],2)],1),t._v(" "),n("ul",{class:t.overlayClass,on:{scroll:t.handleClickTopOperateOutside}},[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(" "),t.dashboardTask.overdue.length>0?n("Badge",{staticClass:"menu-badge",attrs:{type:"error",count:t.dashboardTask.overdue.length}}):t.dashboardTask.today.length>0?n("Badge",{staticClass:"menu-badge",attrs:{type:"info",count:t.dashboardTask.today.length}}):t.dashboardTask.all.length>0?n("Badge",{staticClass:"menu-badge",attrs:{type:"primary",count:t.dashboardTask.all.length}}):t._e()],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",{ref:"projectWrapper",staticClass:"menu-project"},[n("ul",{class:t.overlayClass,on:{scroll:t.handleClickTopOperateOutside}},t._l(t.projectLists,(function(e,r){return n("li",{key:r,class:t.classNameProject(e),on:{click:function(n){return t.toggleRoute("project/"+e.id)},contextmenu:function(n){return n.preventDefault(),n.stopPropagation(),t.handleRightClick(n,e)}}},[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.top_at?n("div",{staticClass:"icon-top"}):t._e(),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(),t._v(" "),n("div",{staticClass:"top-operate",style:t.topOperateStyles},[n("Dropdown",{attrs:{trigger:"custom",visible:t.topOperateVisible,"transfer-class-name":"page-file-dropdown-menu",transfer:""},on:{"on-clickoutside":t.handleClickTopOperateOutside}},[n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[n("DropdownItem",{nativeOn:{click:function(e){return t.handleTopClick.apply(null,arguments)}}},[t._v("\n "+t._s(t.$L(t.topOperateItem.top_at?"取消置顶":"置顶该项目"))+"\n ")])],1)],1)],1)],1)]),t._v(" "),t.projectTotal>20?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.name))])})),1)],1),t._v(" "),n("FormItem",{attrs:{prop:"flow",label:t.$L("开启工作流")}},[n("RadioGroup",{model:{value:t.addData.flow,callback:function(e){t.$set(t.addData,"flow",e)},expression:"addData.flow"}},[n("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("开启")))]),t._v(" "),n("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("关闭")))])],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:{title:t.$L("导出任务统计"),"mask-closable":!1},model:{value:t.exportTaskShow,callback:function(e){t.exportTaskShow=e},expression:"exportTaskShow"}},[n("Form",{ref:"exportTask",attrs:{model:t.exportData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{label:t.$L("导出会员")}},[n("UserInput",{attrs:{"multiple-max":20,placeholder:t.$L("请选择会员")},model:{value:t.exportData.userid,callback:function(e){t.$set(t.exportData,"userid",e)},expression:"exportData.userid"}})],1),t._v(" "),n("FormItem",{attrs:{label:t.$L("时间范围")}},[n("DatePicker",{staticStyle:{width:"100%"},attrs:{type:"daterange",format:"yyyy/MM/dd",placeholder:t.$L("请选择时间")},model:{value:t.exportData.time,callback:function(e){t.$set(t.exportData,"time",e)},expression:"exportData.time"}})],1),t._v(" "),n("FormItem",{attrs:{prop:"type",label:t.$L("导出时间类型")}},[n("RadioGroup",{model:{value:t.exportData.type,callback:function(e){t.$set(t.exportData,"type",e)},expression:"exportData.type"}},[n("Radio",{attrs:{label:"taskTime"}},[t._v(t._s(t.$L("任务时间")))]),t._v(" "),n("Radio",{attrs:{label:"createdTime"}},[t._v(t._s(t.$L("创建时间")))])],1)],1)],1),t._v(" "),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(e){t.exportTaskShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{type:"primary",loading:t.exportLoadIng>0},on:{click:t.onExportTask}},[t._v(t._s(t.$L("导出")))])],1)],1),t._v(" "),n("Modal",{attrs:{value:t.taskId>0,styles:{width:"90%",maxWidth:t.taskData.dialog_id?"1200px":"700px"},"mask-closable":!1,"footer-hide":!0},on:{"on-visible-change":t.taskVisibleChange}},[n("div",{staticClass:"page-manage-task-modal",style:t.taskStyle},[n("TaskDetail",{ref:"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"}}),t._v(" "),n("Badge",{attrs:{count:t.unreadTotal}})],1)])],1)}),[],!1,null,null,null).exports},84953:(t,e,n)=>{"use strict";n.d(e,{Z:()=>k});var r=n(30264),o=n(86877),i=n(20629);const a={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)}}};var s=n(51900);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;e180||n>180)&&(e>n?(r=180,o=n*(180/e)):(r=e*(180/n),o=180)),{width:r+"px",height:o+"px"}}return{}},withdraw:function(){var t=this;$A.modalConfirm({content:"确定撤回此信息吗?",okText:"撤回",loading:!0,onOk:function(){t.$store.dispatch("call",{url:"dialog/msg/withdraw",data:{msg_id:t.msgData.id}}).then((function(){$A.messageSuccess("消息已撤回"),t.$store.dispatch("forgetDialogMsg",t.msgData.id),t.$Modal.remove()})).catch((function(e){var n=e.msg;$A.messageError(n,301),t.$Modal.remove()}))}})},viewFile:function(){var t=this.msgData,e=t.id,n=t.dialog_id,r=t.msg;if(["jpg","jpeg","gif","png"].includes(r.ext)){var o=$A.cloneJSON(this.dialogMsgs.filter((function(t){return t.dialog_id===n&&"file"===t.type&&["jpg","jpeg","gif","png"].includes(t.msg.ext)}))).sort((function(t,e){return t.id-e.id})),i=o.findIndex((function(t){return t.id===e}));i>-1?(this.$store.state.previewImageIndex=i,this.$store.state.previewImageList=o.map((function(t){return t.msg.path}))):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=[r.path])}else this.$Electron?this.$Electron.sendMessage("windowRouter",{name:"file-msg-"+this.msgData.id,path:"/single/file/msg/"+this.msgData.id,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:"".concat(this.msgData.msg.name," (").concat($A.bytesToSize(this.msgData.msg.size),")"),titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)}}):window.open($A.apiUrl("../single/file/msg/".concat(this.msgData.id)))},downFile:function(){var t=this;$A.modalConfirm({title:"下载文件",content:"".concat(this.msgData.msg.name," (").concat($A.bytesToSize(this.msgData.msg.size),")"),okText:"立即下载",onOk:function(){t.$store.dispatch("downUrl",$A.apiUrl("dialog/msg/download?msg_id=".concat(t.msgData.id)))}})}}};const f=(0,s.Z)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:"dialog-view "+t.msgData.type,attrs:{"data-id":t.msgData.id}},[n("div",{staticClass:"dialog-head"},[n("div",{staticClass:"dialog-content"},["text"===t.msgData.type?n("div",{staticClass:"content-text"},[n("pre",{staticClass:"no-dark-mode"},[t._v(t._s(t.textMsg(t.msgData.msg.text)))])]):"file"===t.msgData.type?n("div",{class:"content-file "+t.msgData.msg.type},[n("div",{staticClass:"dialog-file"},["img"===t.msgData.msg.type?n("img",{staticClass:"file-img",style:t.imageStyle(t.msgData.msg),attrs:{src:t.msgData.msg.thumb},on:{click:t.viewFile}}):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)))])])])])]):"loading"===t.msgData.type?n("div",{staticClass:"content-loading"},[n("Loading")],1):n("div",{staticClass:"content-unknown"},[t._v(t._s(t.$L("未知的消息类型")))])]),t._v(" "),t.showMenu?n("div",{staticClass:"dialog-menu"},[n("div",{staticClass:"menu-icon"},[t.msgData.userid==t.userId?n("Icon",{attrs:{type:"md-undo",title:t.$L("撤回")},on:{click:t.withdraw}}):t._e(),t._v(" "),"file"===t.msgData.type?[n("Icon",{attrs:{type:"md-eye",title:t.$L("查看")},on:{click:t.viewFile}}),t._v(" "),n("Icon",{attrs:{type:"md-arrow-round-down",title:t.$L("下载")},on:{click:t.downFile}})]:t._e()],2)]):t._e()]),t._v(" "),t.msgData.created_at?n("div",{staticClass:"dialog-foot"},[n("div",{staticClass:"time",attrs:{title:t.msgData.created_at}},[t._v(t._s(t.$A.formatTime(t.msgData.created_at)))]),t._v(" "),t.msgData.send>1||"group"==t.dialogType?n("EPopover",{ref:"percent",staticClass:"percent",attrs:{placement:"left-end",width:360,offset:-8},model:{value:t.popperShow,callback:function(e){t.popperShow=e},expression:"popperShow"}},[n("div",{staticClass:"dialog-wrapper-read-poptip-content"},[n("ul",{staticClass:"read overlay-y"},[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 overlay-y"},[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:{slot:"reference",percent:t.msgData.percentage,size:14},slot:"reference"})],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 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$A.Time()){var n=window.__sendDialogMsg,r=n.msgFile,o=n.msgText;window.__sendDialogMsg=null,this.$nextTick((function(){$A.isArray(r)&&r.length>0?e.sendFileMsg(r):o&&e.sendMsg(o)}))}if(t.query&&t.query._){var i=$A.cloneJSON(t.query);delete i._,this.goForward({query:i},!0)}},immediate:!0},dialogId:{handler:function(t){var e=this;t&&(this.msgNew=0,this.topId=-1,this.visible=!1,this.$store.dispatch("getDialogMsgs",t).then((function(t){e.onToBottom(),e.visible=!0})))},immediate:!0},wsOpenNum:function(t){t<=1||this.$store.dispatch("getDialogMsgs",this.dialogId)}},methods:{sendMsg:function(t){var e=this;if("string"==typeof t&&t&&(this.msgText=t,this.$refs.input.focus()),""!=this.msgText){var n=$A.randomString(16);this.tempMsgs.push({id:n,dialog_id:this.dialogData.id,type:"text",userid:this.userId,msg:{text:this.msgText}}),this.isDesktop||this.$refs.input.blur(),this.onToBottom(),this.onActive(),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:this.dialogId,text:this.msgText},method:"post"}).then((function(t){var r=t.data;e.tempMsgs=e.tempMsgs.filter((function(t){return t.id!=n})),e.sendSuccess(r)})).catch((function(t){var r=t.msg;$A.modalError(r),e.tempMsgs=e.tempMsgs.filter((function(t){return t.id!=n}))})),this.msgText=""}},sendFileMsg:function(t){var e=this;t.length>0&&(this.pasteFile=[],this.pasteItem=[],t.some((function(t){var n=new FileReader;n.readAsDataURL(t),n.onload=function(n){var r=n.target;e.pasteFile.push(t),e.pasteItem.push({type:$A.getMiddle(t.type,null,"/"),name:t.name,size:t.size,result:r.result}),e.pasteShow=!0}})))},chatKeydown:function(t){if(13===t.keyCode){if(t.shiftKey)return;t.preventDefault(),this.sendMsg()}},pasteDrag:function(t,e){var n="drag"===e?t.dataTransfer.files:t.clipboardData.files,r=Array.prototype.slice.call(n);r.length>0&&(t.preventDefault(),this.sendFileMsg(r))},chatPasteDrag:function(t,e){this.dialogDrag=!1,this.pasteDrag(t,e)},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)},pasteSend:function(){var t=this;this.pasteFile.some((function(e){t.$refs.chatUpload.upload(e)}))},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.isDesktop||this.$refs.input.blur(),this.onToBottom(),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){var e=this;$A.isArray(t)?t.some((function(t){e.sendSuccess(t)})):(this.$store.dispatch("saveDialogMsg",t),this.$store.dispatch("increaseTaskMsgNum",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}t.scale>=1&&(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")},onToBottom:function(){this.autoBottom=!0,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,$A.scrollToView(document.getElementById("view_"+e),{behavior:"instant",inline:"start"})}))})).catch((function(){}))},addDialogMsg:function(){var t=this;this.isAutoBottom?this.$nextTick(this.onToBottom):this.$nextTick((function(){t.$refs.scroller&&t.$refs.scroller.scrollInfo().scrollE>10&&t.msgNew++}))}}};const k=(0,s.Z)(C,(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-nav",class:{completed:t.$A.dialogCompleted(t.dialogData)}},[n("div",{staticClass:"dialog-avatar"},["group"==t.dialogData.type?["project"==t.dialogData.group_type?n("i",{staticClass:"taskfont icon-avatar project"},[t._v("")]):"task"==t.dialogData.group_type?n("i",{staticClass:"taskfont icon-avatar task"},[t._v("")]):n("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:t.dialogData.dialog_user?n("div",{staticClass:"user-avatar"},[n("UserAvatar",{attrs:{userid:t.dialogData.dialog_user.userid,size:42}})],1):n("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}})],2),t._v(" "),n("div",{staticClass:"dialog-title"},[n("div",{staticClass:"main-title"},[t._l(t.$A.dialogTags(t.dialogData),(function(e){return"success"!=e.color?[n("Tag",{attrs:{color:e.color,fade:!1}},[t._v(t._s(t.$L(e.text)))])]:t._e()})),t._v(" "),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(" "),t.dialogData.top_at?n("label",{staticClass:"top-text"},[t._v(t._s(t.$L("置顶")))]):t._e()],2),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",style:{opacity:t.visible?1:0},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.onToBottom}},[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:2e4,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(),t._v(" "),n("Modal",{attrs:{title:t.$L(t.pasteTitle),"cancel-text":t.$L("取消"),"ok-text":t.$L("发送"),"enter-ok":!0},on:{"on-ok":t.pasteSend},model:{value:t.pasteShow,callback:function(e){t.pasteShow=e},expression:"pasteShow"}},[n("div",{staticClass:"dialog-wrapper-paste"},[t._l(t.pasteItem,(function(e){return["image"==e.type?n("img",{attrs:{src:e.result}}):n("div",[t._v(t._s(t.$L("文件"))+": "+t._s(e.name)+" ("+t._s(t.$A.bytesToSize(e.size))+")")])]}))],2)])],2):t._e()}),[],!1,null,null,null).exports},85782:(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:Math.max($A.runNum(this.listPageSize),10)}}).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 ")),i.push(t("span",{class:"change-value"},"".concat(u||"-")))):i.push(t("span",{class:"change-value"},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=[];if(!$A.isJson(n))return r;if(this.taskId>0&&$A.isJson(n.flow)){var o=$A.getMiddle(n.flow.flow_item_name,"|");o&&r.push({id:e,button:"重置",content:"确定重置为【".concat(o,"】吗?")})}return 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&&t.showLoad?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},34910:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});const r={name:"ReportDetail",props:{data:{default:{}}},watch:{"data.id":{handler:function(t){t>0&&this.sendRead()},immediate:!0}},methods:{sendRead:function(){this.$store.dispatch("call",{url:"report/read",data:{ids:[this.data.id]}}).then((function(){})).catch((function(){}))}}};const o=(0,n(51900).Z)(r,(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("Form",{staticClass:"report-form",attrs:{"label-width":"auto",inline:""}},[n("FormItem",{attrs:{label:t.$L("汇报人")}},[n("UserAvatar",{attrs:{userid:t.data.userid,size:28}})],1),t._v(" "),n("FormItem",{attrs:{label:t.$L("提交时间")}},[t._v("\n "+t._s(t.data.created_at)+"\n ")]),t._v(" "),n("FormItem",{attrs:{label:t.$L("汇报对象")}},t._l(t.data.receives_user,(function(t,e){return n("UserAvatar",{key:e,attrs:{userid:t.userid,size:28}})})),1)],1),t._v(" "),n("Form",{staticClass:"report-form",attrs:{"label-width":"auto"}},[n("FormItem",{attrs:{label:t.$L("汇报内容")}},[n("div",{staticClass:"report-content",domProps:{innerHTML:t._s(t.data.content)}})])],1)],1)])}),[],!1,null,null,null).exports},22371:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(73701),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,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:"ReportEdit",components:{TEditor:function(){return n.e(500).then(n.bind(n,89500))},UserInput:r.Z},props:{id:{default:0}},data:function(){return{reportData:{title:"",content:"",type:"weekly",receive:[],id:0,offset: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;e0?$A.modalConfirm({title:"覆盖提交",content:"你已提交过此日期的报告,是否覆盖提交?",loading:!0,onOk:function(){t.doSubmit(!0)}}):this.doSubmit()},doSubmit:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$store.dispatch("call",{url:"report/store",data:this.reportData,method:"post"}).then((function(n){var r=n.data,o=n.msg;e&&t.$Modal.remove(),t.reportData.offset=0,t.reportData.type="weekly",t.reportData.receive=[],t.getTemplate(),$A.messageSuccess(o),t.$emit("saveSuccess",r)})).catch((function(n){var r=n.msg;e&&t.$Modal.remove(),$A.messageError(r)}))},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;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.$store.dispatch("call",{url:"report/detail",data:{id:t}}).then((function(n){var r=n.data;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})).catch((function(t){var e=t.msg;$A.messageError(e)}))},prevCycle:function(){this.reportData.offset-=1,this.reReportData(),this.getTemplate()},nextCycle:function(){this.reportData.offset<0&&(this.reportData.offset+=1),this.reReportData(),this.getTemplate()},getLastSubmitter:function(){var t=this;this.$store.dispatch("call",{url:"report/last_submitter"}).then((function(e){var n=e.data;t.reportData.receive=n})).catch((function(t){var e=t.msg;$A.messageError(e)}))},reReportData:function(){this.reportData.title="",this.reportData.content="",this.reportData.receive=[],this.reportData.id=0}}};const u=(0,n(51900).Z)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Form",{staticClass:"report-edit",attrs:{"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{label:t.$L("汇报类型")}},[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",{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",{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),t._v(" "),n("FormItem",{attrs:{label:t.$L("汇报名称")}},[n("Input",{attrs:{disabled:""},model:{value:t.reportData.title,callback:function(e){t.$set(t.reportData,"title",e)},expression:"reportData.title"}})],1),t._v(" "),n("FormItem",{attrs:{label:t.$L("汇报对象")}},[n("div",{staticClass:"report-users"},[n("UserInput",{attrs:{disabledChoice:[t.userId],placeholder:t.$L("选择接收人"),transfer:!1},model:{value:t.reportData.receive,callback:function(e){t.$set(t.reportData,"receive",e)},expression:"reportData.receive"}}),t._v(" "),n("a",{staticClass:"report-user-link",attrs:{href:"javascript:void(0);"},on:{click:t.getLastSubmitter}},[n("Icon",{attrs:{type:"ios-share-outline"}}),t._v(t._s(t.$L("使用我上次的汇报对象"))+"\n ")],1)],1)]),t._v(" "),n("FormItem",{staticClass:"report-content-editor",attrs:{label:t.$L("汇报内容")}},[n("TEditor",{attrs:{height:"100%"},model:{value:t.reportData.content,callback:function(e){t.$set(t.reportData,"content",e)},expression:"reportData.content"}})],1),t._v(" "),n("FormItem",{staticClass:"report-foot"},[n("Button",{staticClass:"report-bottom",attrs:{type:"primary"},on:{click:t.handleSubmit}},[t._v(t._s(t.$L(t.id>0?"修改":"提交")))])],1)],1)}),[],!1,null,null,null).exports},19246:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(89500),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},showAddAssist:function(){return!this.addData.owner.includes(this.userId)}}),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){t>0&&$A.setStorage("cacheAddTaskProjectId",t)},"addData.column_id":function(t){var e=this,n=this.addData.project_id;this.$nextTick((function(){n&&t?e.$set(e.addData,"cascader",[n,t]):e.$set(e.addData,"cascader",[])})),t>0&&$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(this.addData,"times",[e[0],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(),owner:[this.userId],times:[]}),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()}))},cascaderChange:function(t){t[1]&&this.$set(this.addData,"column_id",t[1])},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:[],add_assist:1,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-change":t.cascaderChange,"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.isDesktop?"详细描述,选填...(点击右键使用工具栏)":"详细描述,选填..."),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,transfer:!1},model:{value:t.addData.owner,callback:function(e){t.$set(t.addData,"owner",e)},expression:"addData.owner"}}),t._v(" "),t.showAddAssist?n("div",{staticClass:"task-add-assist"},[n("Checkbox",{attrs:{"true-value":1,"false-value":0},model:{value:t.addData.add_assist,callback:function(e){t.$set(t.addData,"add_assist",e)},expression:"addData.add_assist"}},[t._v(t._s(t.$L("加入任务协助人员列表")))]),t._v(" "),n("ETooltip",{attrs:{content:t.$L("你不是任务负责人时建议加入任务协助人员列表")}},[n("Icon",{attrs:{type:"ios-alert-outline"}})],1)],1):t._e()],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,transfer:!1},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},66237:(t,e,n)=>{"use strict";n.d(e,{Z:()=>b});var r=n(20629),o=n(89500),i=n(25199),a=n(73701);const s={name:"TaskUpload",props:{maxSize:{type:Number,default:204800}},data:function(){return{uploadFormat:["jpg","jpeg","png","gif","doc","docx","xls","xlsx","ppt","pptx","txt","esp","pdf","rar","zip","gz","ai","avi","bmp","cdr","eps","mov","mp3","mp4","pr","psd","svg","tif"]}},methods:{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)+"。"})},handleBeforeUpload:function(t){return this.$emit("on-select-file",t),!1},handleClick:function(){this.$refs.upload.handleClick()}}};var u=n(51900);const c=(0,u.Z)(s,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("Upload",{ref:"upload",attrs:{name:"files",action:"",multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize,"before-upload":t.handleBeforeUpload}})}),[],!1,null,null,null).exports;var l=n(84953),d=n(85782),f=n(80641),m=n(21929);function p(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 h(t){for(var e=1;e0&&!this.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=$A.Date(t.start_at,!0),n=$A.Date(t.end_at,!0);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){var e=this;this.taskDetail=$A.cloneJSON(t),this.$nextTick((function(){e.$refs.name&&e.$refs.name.resizeTextarea()}))},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:{innerHeightListener:function(){this.innerHeight=Math.min(1100,window.innerHeight)},within24Hours:function(t){return $A.Date(t,!0)-this.nowTime<86400},expiresFormat:function(t){return $A.countDownFormat(t,this.nowTime)},isOverdue:function(t){return!!t.overdue||$A.Date(t.end_at,!0)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.receiveShow=!1,e.$store.dispatch("getTaskOne",e.taskDetail.id).catch((function(){}))})).catch((function(t){var n=t.msg;$A.modalError(n),e.ownerLoad--,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})))},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.$store.dispatch("getTaskOne",t.taskDetail.id).catch((function(){}))})).catch((function(e){var n=e.msg;$A.modalError(n),t.assistLoad--}))}},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||this.addsubLoad>0)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.messageError("任务描述不能为空")},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.msgText&&this.msgDialog()}},msgDialog: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.$store.dispatch("saveTask",n),t.$store.dispatch("getDialogOne",n.dialog_id).then((function(){t.sendLoad--,$A.isSubElectron?t.resizeDialog().then((function(){t.sendDialogMsg()})):t.$nextTick((function(){t.windowMax768?(window.__sendDialogMsg={time:$A.Time()+10,msgText:t.msgText,msgFile:t.msgFile},t.msgFile=[],t.msgText="",t.goForward({name:"manage-messenger",query:{_:$A.randomString(6)}}),$A.setStorage("messenger::dialogId",n.dialog_id),t.$store.state.dialogOpenId=n.dialog_id,t.$store.dispatch("openTask",0)):t.sendDialogMsg()}))})).catch((function(e){var n=e.msg;t.sendLoad--,$A.modalError(n)}))})).catch((function(e){var n=e.msg;t.sendLoad--,$A.modalError(n)})))},sendDialogMsg:function(){this.msgFile.length>0?this.$refs.dialog.sendFileMsg(this.msgFile):this.msgText&&this.$refs.dialog.sendMsg(this.msgText),this.msgFile=[],this.msgText=""},msgPasteDrag:function(t,e){var n="drag"===e?t.dataTransfer.files:t.clipboardData.files;this.msgFile=Array.prototype.slice.call(n),this.msgFile.length>0&&(t.preventDefault(),this.msgDialog())},taskPasteDrag:function(t,e){this.dialogDrag=!1,this.msgPasteDrag(t,e)},taskDragOver: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)},onSelectFile:function(t){this.msgFile=[t],this.msgDialog()},deleteFile:function(t){var e=this;this.$set(t,"_show_menu",!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={title:this.taskDetail.name,titleFixed:!0,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.sendMessage("windowRouter",{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;return new Promise((function(e){t.$Electron.sendSyncMessage("windowSize",{width:Math.max(1100,window.innerWidth),height:Math.max(720,window.innerHeight),minWidth:800,minHeight:600,autoZoom:!0});var n=0,r=setInterval((function(){n++,(t.$refs.dialog||n>20)&&(clearInterval(r),t.$refs.dialog&&e())}),100)}))},viewFile:function(t){if(["jpg","jpeg","gif","png"].includes(t.ext)){var e=this.fileList.filter((function(t){return["jpg","jpeg","gif","png"].includes(t.ext)})),n=e.findIndex((function(e){return e.id===t.id}));n>-1?(this.$store.state.previewImageIndex=n,this.$store.state.previewImageList=e.map((function(t){return t.path}))):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=[t.path])}else this.$Electron?this.$Electron.sendMessage("windowRouter",{name:"file-task-"+t.id,path:"/single/file/task/"+t.id,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:"".concat(t.name," (").concat($A.bytesToSize(t.size),")"),titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)}}):window.open($A.apiUrl("../single/file/task/".concat(t.id)))},downFile:function(t){var e=this;$A.modalConfirm({title:"下载文件",content:"".concat(t.name," (").concat($A.bytesToSize(t.size),")"),okText:"立即下载",onOk:function(){e.$store.dispatch("downUrl",$A.apiUrl("project/task/filedown?file_id=".concat(t.id)))}})}}};const b=(0,u.Z)(v,(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:{disabled:0===t.taskId,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",{ref:"name",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255},on:{"on-blur":function(e){return t.updateBlur("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.complete_at&&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:{"popper-class":"task-detail-user-popper",title:t.$L("修改负责人"),width:240,placement:"bottom",transfer:""},on:{"on-popper-show":t.openOwner,"on-ok":t.onOwner}},[n("div",{attrs:{slot:"content"},slot:"content"},[n("UserInput",{attrs:{"multiple-max":1,"project-id":t.taskDetail.project_id,placeholder:t.$L("选择任务负责人"),transfer:!1},model:{value:t.ownerData.owner_userid,callback:function(e){t.$set(t.ownerData,"owner_userid",e)},expression:"ownerData.owner_userid"}}),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:{disabled:0===t.taskId,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(" "),t.taskDetail.archived_at?n("div",{staticClass:"flow"},[n("span",{staticClass:"archived",on:{click:function(e){return e.stopPropagation(),t.openMenu(t.taskDetail)}}},[t._v(t._s(t.$L("已归档")))])]):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:{disabled:0===t.taskId,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",{ref:"name",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255},on:{"on-blur":function(e){return t.updateBlur("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.updateBlur("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,"popper-class":"task-detail-user-popper",placement:"bottom",transfer:""},on:{"on-popper-show":t.openOwner,"on-ok":t.onOwner}},[n("div",{attrs:{slot:"content"},slot:"content"},[n("UserInput",{attrs:{"multiple-max":10,"project-id":t.taskDetail.project_id,placeholder:t.$L("选择任务负责人"),transfer:!1},model:{value:t.ownerData.owner_userid,callback:function(e){t.$set(t.ownerData,"owner_userid",e)},expression:"ownerData.owner_userid"}}),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,"popper-class":"task-detail-user-popper",placement:"bottom",transfer:""},on:{"on-popper-show":t.openAssist,"on-ok":t.onAssist}},[n("div",{attrs:{slot:"content"},slot:"content"},[n("UserInput",{attrs:{"multiple-max":10,"project-id":t.taskDetail.project_id,"disabled-choice":t.assistData.disabled,placeholder:t.$L("选择任务协助人员"),transfer:!1},model:{value:t.assistData.assist_userid,callback:function(e){t.$set(t.assistData,"assist_userid",e)},expression:"assistData.assist_userid"}}),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.end_at?[t.within24Hours(t.taskDetail.end_at)?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.isOverdue(t.taskDetail)?n("Tag",{attrs:{color:"red"}},[t._v(t._s(t.$L("超期未完成")))]):t._e()]:t._e()],2)])],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.taskDetail.file_num>50?n("li",{staticClass:"tip"},[t._v(t._s(t.$L("共"+t.taskDetail.file_num+"个文件,仅显示最新50个")))]):t._e(),t._v(" "),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("div",{staticClass:"file-name"},[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("div",{staticClass:"file-menu",class:{show:e._show_menu}},[n("Icon",{attrs:{type:"md-eye"},on:{click:function(n){return t.viewFile(e)}}}),t._v(" "),n("Icon",{attrs:{type:"md-arrow-round-down"},on:{click:function(n){return t.downFile(e)}}}),t._v(" "),n("EPopover",{staticClass:"file-delete",model:{value:e._show_menu,callback:function(n){t.$set(e,"_show_menu",n)},expression:"file._show_menu"}},[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._show_menu=!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",{staticClass:"taskfont del",attrs:{slot:"reference"},slot:"reference"},[t._v("")])])],1)],1)}))],2),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,ref:"subTask_"+e.id,refInFor:!0,attrs:{"task-id":e.id,"open-task":e,"main-end-at":t.taskDetail.end_at,"can-update-blur":t.canUpdateBlur}})})),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",on:{"on-select-file":t.onSelectFile}})],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,"show-load":!1},on:{"on-load-change":t.logLoadChange}}):n("div",{staticClass:"no-dialog",on:{drop:function(e){return e.preventDefault(),t.taskPasteDrag(e,"drag")},dragover:function(e){return e.preventDefault(),t.taskDragOver(!0,e)},dragleave:function(e){return e.preventDefault(),t.taskDragOver(!1,e)}}},[n("div",{staticClass:"no-tip"},[t._v(t._s(t.$L("暂无消息")))]),t._v(" "),n("div",{staticClass:"no-input"},[n("DragInput",{staticClass:"dialog-input",attrs:{type:"textarea",disabled:t.sendLoad>0,rows:1,autosize:{minRows:1,maxRows:3},maxlength:2e4,placeholder:t.$L("输入消息...")},on:{"on-keydown":t.msgKeydown,"on-input-paste":t.msgPasteDrag},model:{value:t.msgText,callback:function(e){t.msgText=e},expression:"msgText"}}),t._v(" "),n("div",{staticClass:"no-send",on:{click:t.msgDialog}},[t.sendLoad>0?n("Loading"):[n("Badge",{attrs:{count:t.taskDetail.msg_num}}),t._v(" "),n("Icon",{attrs:{type:"md-send"}})]],2)],1),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()])],1)],2),t._v(" "),t.taskDetail.id?t._e():n("div",{staticClass:"task-load"},[n("Loading")],1)]):t._e()}),[],!1,null,null,null).exports},21929:(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,n=this.task,r=function(t){t?e.$store.dispatch("saveTaskCompleteTemp",n.id):e.$store.dispatch("forgetTaskCompleteTemp",n.id)};if($A.isJson(t))t.name&&this.updateTask({color:t.color}).catch((function(){}));else{if($A.leftExists(t,"turn::")){var o=$A.leftDelete(t,"turn::");if(o==this.task.flow_item_id)return;var i=this.taskFlowItems.find((function(t){return t.id==e.flow.flow_item_id}))||{},a=this.taskFlowItems.find((function(t){return t.id==o}))||{},s="end"!==i.status&&"end"===a.status,u="end"===i.status&&"end"!==a.status;return this.updateBefore&&(s?r(!0):u&&r(!1)),void this.updateTask({flow_item_id:o}).then((function(){s?r(!0):u&&r(!1)})).catch((function(){s?r(!1):u&&r(!0)}))}switch(t){case"complete":if(this.task.complete_at)return;this.updateBefore&&r(!0),this.updateTask({complete_at:$A.formatDate("Y-m-d H:i:s")}).then((function(){r(!0)})).catch((function(){r(!1)}));break;case"uncomplete":if(!this.task.complete_at)return;this.updateBefore&&r(!1),this.updateTask({complete_at:!1}).then((function(){r(!1)})).catch((function(){r(!0)}));break;case"archived":case"remove":this.archivedOrRemoveTask(t)}}},visibleChange:function(t){t&&this.$store.dispatch("getTaskFlow",this.task.id).then(this.$refs.dropdownMenu.updatePopper).catch(this.$refs.dropdownMenu.updatePopper)},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="removeTask",r="删除",o={task_id:this.task.id},i=this.task.parent_id>0?"子任务":"任务";"archived"==t&&(n="archivedTask",r="归档",this.task.archived_at&&(r="还原归档",o={task_id:this.task.id,type:"recovery"})),$A.modalConfirm({title:r+i,content:"你确定要"+r+i+"【"+this.task.name+"】吗?",loading:!0,onOk:function(){e.loadIng?e.$Modal.remove():e.$store.dispatch(n,o).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",disabled:t.disabled,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",{ref:"dropdownMenu",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(t.task.archived_at?"还原归档":"归档"))+"\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{r.d(e,{Z:()=>i});var a=r(1519),s=r.n(a)()((function(t){return t[1]}));s.push([t.id,".electron-report[data-v-7231af33]{display:flex;flex-direction:column;height:100%;overflow:auto}",""]);const i=s},73701:(t,e,r)=>{r.d(e,{Z:()=>i});var a=r(80641);const s={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{loadIng:0,selects:[],list:[],searchKey:null,searchHistory:[],subscribe:null}},mounted:function(){var t=this;this.subscribe=a.Store.subscribe("cacheUserActive",(function(e){var r=t.list.findIndex((function(t){return t.userid==e.userid}));r>-1&&(t.$set(t.list,r,Object.assign({},t.list[r],e)),t.handleSelectData())}))},beforeDestroy:function(){this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},computed:{maxHiddenClass:function(){var t=this.multipleMax,e=this.maxHiddenInput,r=this.selects;return t&&e&&r.length>=t?"hidden-input":""}},watch:{value:{handler:function(){this.valueChange()},immediate:!0},selects:function(t){this.$emit("input",t)}},methods:{searchUser:function(t){var e=this;"string"!=typeof t&&(t=""),this.searchKey=t;var r=this.searchHistory.find((function(e){return e.key==t}));r&&(this.list=r.data),r||this.loadIng++,setTimeout((function(){e.searchKey==t?e.$store.dispatch("call",{url:"users/search",data:{keys:{key:t,project_id:e.projectId,no_project_id:e.noProjectId},take:30}}).then((function(a){var s=a.data;r||e.loadIng--,e.list=s;var i=e.searchHistory.findIndex((function(e){return e.key==t})),n={key:t,data:s,time:$A.Time()};i>-1?e.searchHistory.splice(i,1,n):e.searchHistory.push(n)})).catch((function(t){var a=t.msg;r||e.loadIng--,e.list=[],$A.messageWarning(a)})):r||e.loadIng--}),this.searchHistory.length>0?300:0)},isDisabled:function(t){return 0!==this.disabledChoice.length&&this.disabledChoice.includes(t)},openChange:function(t){t&&this.$nextTick(this.searchUser)},remoteMethod:function(){},valueChange:function(){var t=this;this.selects!=this.value&&($A.isArray(this.value)?this.selects=$A.cloneJSON(this.value):this.value?this.selects=[this.value]:this.selects=[],this.selects.some((function(e){t.list.find((function(t){return t.userid==e}))||(t.list.push({userid:e,nickname:e}),t.$store.dispatch("getUserBasic",{userid:e}))})))},handleSelectData:function(){var t=this;this.__handleSelectTimeout&&clearTimeout(this.__handleSelectTimeout),this.__handleSelectTimeout=setTimeout((function(){if(t.$refs.select){var e=t.$refs.select.getValue();e&&e.some((function(e){var r=t.list.find((function(t){return t.userid==e.value}));r&&(t.$set(e,"label",r.nickname),t.$set(e,"avatar",r.userimg))}))}}),100)}}};const i=(0,r(51900).Z)(s,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{class:["common-user",t.maxHiddenClass]},[r("Select",{ref:"select",attrs:{transfer:t.transfer,placeholder:t.placeholder,size:t.size,loading:t.loadIng>0,"loading-text":t.$L("加载中..."),"default-label":t.value,"default-event-object":!0,"multiple-max":t.multipleMax,"multiple-uncancelable":t.uncancelable,"remote-method":t.remoteMethod,multiple:"",filterable:"","transfer-class-name":"common-user-transfer"},on:{"on-query-change":t.searchUser,"on-open-change":t.openChange},model:{value:t.selects,callback:function(e){t.selects=e},expression:"selects"}},[t.multipleMax?r("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,a){return r("Option",{key:a,attrs:{value:e.userid,"key-value":e.email,label:e.nickname,avatar:e.userimg,disabled:t.isDisabled(e.userid)}},[r("div",{staticClass:"user-input-option"},[r("div",{staticClass:"user-input-avatar"},[r("EAvatar",{staticClass:"avatar",attrs:{src:e.userimg}})],1),t._v(" "),r("div",{staticClass:"user-input-nickname"},[t._v(t._s(e.nickname))]),t._v(" "),r("div",{staticClass:"user-input-userid"},[t._v("ID: "+t._s(e.userid))])])])}))],2),t._v(" "),t.loadIng>0?r("div",{staticClass:"common-user-loading"},[r("Loading")],1):t._e()],1)}),[],!1,null,null,null).exports},22371:(t,e,r)=>{r.d(e,{Z:()=>l});var a=r(73701),s=r(20629);function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const o={name:"ReportEdit",components:{TEditor:function(){return r.e(500).then(r.bind(r,89500))},UserInput:a.Z},props:{id:{default:0}},data:function(){return{reportData:{title:"",content:"",type:"weekly",receive:[],id:0,offset: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;e0?$A.modalConfirm({title:"覆盖提交",content:"你已提交过此日期的报告,是否覆盖提交?",loading:!0,onOk:function(){t.doSubmit(!0)}}):this.doSubmit()},doSubmit:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$store.dispatch("call",{url:"report/store",data:this.reportData,method:"post"}).then((function(r){var a=r.data,s=r.msg;e&&t.$Modal.remove(),t.reportData.offset=0,t.reportData.type="weekly",t.reportData.receive=[],t.getTemplate(),$A.messageSuccess(s),t.$emit("saveSuccess",a)})).catch((function(r){var a=r.msg;e&&t.$Modal.remove(),$A.messageError(a)}))},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 r=e.data;r.id?(t.reportData.id=r.id,t.id>0?t.getDetail(r.id):(t.reportData.title=r.title,t.reportData.content=r.content)):(t.reportData.id=0,t.reportData.title=r.title,t.reportData.content=r.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.$store.dispatch("call",{url:"report/detail",data:{id:t}}).then((function(r){var a=r.data;e.reportData.title=a.title,e.reportData.content=a.content,e.reportData.receive=a.receives_user.map((function(t){return t.userid})),e.reportData.type=a.type_val,e.reportData.id=t})).catch((function(t){var e=t.msg;$A.messageError(e)}))},prevCycle:function(){this.reportData.offset-=1,this.reReportData(),this.getTemplate()},nextCycle:function(){this.reportData.offset<0&&(this.reportData.offset+=1),this.reReportData(),this.getTemplate()},getLastSubmitter:function(){var t=this;this.$store.dispatch("call",{url:"report/last_submitter"}).then((function(e){var r=e.data;t.reportData.receive=r})).catch((function(t){var e=t.msg;$A.messageError(e)}))},reReportData:function(){this.reportData.title="",this.reportData.content="",this.reportData.receive=[],this.reportData.id=0}}};const l=(0,r(51900).Z)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("Form",{staticClass:"report-edit",attrs:{"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[r("FormItem",{attrs:{label:t.$L("汇报类型")}},[r("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"}},[r("Radio",{attrs:{label:"weekly",disabled:t.id>0&&"daily"==t.reportData.type}},[t._v(t._s(t.$L("周报")))]),t._v(" "),r("Radio",{attrs:{label:"daily",disabled:t.id>0&&"weekly"==t.reportData.type}},[t._v(t._s(t.$L("日报")))])],1),t._v(" "),0===t.id?r("ButtonGroup",{staticClass:"report-buttongroup"},[r("ETooltip",{attrs:{content:t.prevCycleText,placement:"bottom"}},[r("Button",{attrs:{type:"primary"},on:{click:t.prevCycle}},[r("Icon",{attrs:{type:"ios-arrow-back"}})],1)],1),t._v(" "),r("div",{staticClass:"report-buttongroup-vertical"}),t._v(" "),r("ETooltip",{attrs:{disabled:t.reportData.offset>=0,content:t.nextCycleText,placement:"bottom"}},[r("Button",{attrs:{type:"primary",disabled:t.reportData.offset>=0},on:{click:t.nextCycle}},[r("Icon",{attrs:{type:"ios-arrow-forward"}})],1)],1)],1):t._e()],1),t._v(" "),r("FormItem",{attrs:{label:t.$L("汇报名称")}},[r("Input",{attrs:{disabled:""},model:{value:t.reportData.title,callback:function(e){t.$set(t.reportData,"title",e)},expression:"reportData.title"}})],1),t._v(" "),r("FormItem",{attrs:{label:t.$L("汇报对象")}},[r("div",{staticClass:"report-users"},[r("UserInput",{attrs:{disabledChoice:[t.userId],placeholder:t.$L("选择接收人"),transfer:!1},model:{value:t.reportData.receive,callback:function(e){t.$set(t.reportData,"receive",e)},expression:"reportData.receive"}}),t._v(" "),r("a",{staticClass:"report-user-link",attrs:{href:"javascript:void(0);"},on:{click:t.getLastSubmitter}},[r("Icon",{attrs:{type:"ios-share-outline"}}),t._v(t._s(t.$L("使用我上次的汇报对象"))+"\n ")],1)],1)]),t._v(" "),r("FormItem",{staticClass:"report-content-editor",attrs:{label:t.$L("汇报内容")}},[r("TEditor",{attrs:{height:"100%"},model:{value:t.reportData.content,callback:function(e){t.$set(t.reportData,"content",e)},expression:"reportData.content"}})],1),t._v(" "),r("FormItem",{staticClass:"report-foot"},[r("Button",{staticClass:"report-bottom",attrs:{type:"primary"},on:{click:t.handleSubmit}},[t._v(t._s(t.$L(t.id>0?"修改":"提交")))])],1)],1)}),[],!1,null,null,null).exports},94483:(t,e,r)=>{r.r(e),r.d(e,{default:()=>l});const a={components:{ReportEdit:r(22371).Z},data:function(){return{detail:{}}},computed:{id:function(){return $A.runNum(this.detail.id||this.$route.params.id)},title:function(){return this.$L(this.id>0?"修改报告":"新增报告")}},methods:{saveSuccess:function(t){this.detail=t,this.$isSubElectron&&$A.Electron.sendMessage("sendForwardMain",{channel:"reportSaveSuccess",data:t})}}};var s=r(93379),i=r.n(s),n=r(75091),o={insert:"head",singleton:!1};i()(n.Z,o);n.Z.locals;const l=(0,r(51900).Z)(a,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"electron-report"},[r("PageTitle",{attrs:{title:t.title}}),t._v(" "),r("ReportEdit",{attrs:{id:t.id},on:{saveSuccess:t.saveSuccess}})],1)}),[],!1,null,"7231af33",null).exports}}]); \ No newline at end of file +"use strict";(self.webpackChunkDooTask=self.webpackChunkDooTask||[]).push([[483],{75091:(t,e,r)=>{r.d(e,{Z:()=>i});var a=r(1519),s=r.n(a)()((function(t){return t[1]}));s.push([t.id,".electron-report[data-v-7231af33]{display:flex;flex-direction:column;height:100%;overflow:auto}",""]);const i=s},98668:(t,e,r)=>{r.d(e,{Z:()=>i});var a=r(80641);const s={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{loadIng:0,selects:[],list:[],searchKey:null,searchHistory:[],subscribe:null}},mounted:function(){var t=this;this.subscribe=a.Store.subscribe("cacheUserActive",(function(e){var r=t.list.findIndex((function(t){return t.userid==e.userid}));r>-1&&(t.$set(t.list,r,Object.assign({},t.list[r],e)),t.handleSelectData())}))},beforeDestroy:function(){this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},computed:{maxHiddenClass:function(){var t=this.multipleMax,e=this.maxHiddenInput,r=this.selects;return t&&e&&r.length>=t?"hidden-input":""}},watch:{value:{handler:function(){var t=this,e=this._tmpId=$A.randomString(6);setTimeout((function(){e===t._tmpId&&t.valueChange()}),10)},immediate:!0},selects:function(t){this.$emit("input",t)}},methods:{searchUser:function(t){var e=this;"string"!=typeof t&&(t=""),this.searchKey=t;var r=this.searchHistory.find((function(e){return e.key==t}));r&&(this.list=r.data),r||this.loadIng++,setTimeout((function(){e.searchKey==t?e.$store.dispatch("call",{url:"users/search",data:{keys:{key:t,project_id:e.projectId,no_project_id:e.noProjectId},take:30}}).then((function(a){var s=a.data;r||e.loadIng--,e.list=s;var i=e.searchHistory.findIndex((function(e){return e.key==t})),n={key:t,data:s,time:$A.Time()};i>-1?e.searchHistory.splice(i,1,n):e.searchHistory.push(n)})).catch((function(t){var a=t.msg;r||e.loadIng--,e.list=[],$A.messageWarning(a)})):r||e.loadIng--}),this.searchHistory.length>0?300:0)},isDisabled:function(t){return 0!==this.disabledChoice.length&&this.disabledChoice.includes(t)},openChange:function(t){t&&this.$nextTick(this.searchUser)},remoteMethod:function(){},valueChange:function(){var t=this;this.selects!=this.value&&($A.isArray(this.value)?this.selects=$A.cloneJSON(this.value):this.value?this.selects=[this.value]:this.selects=[],this.selects.some((function(e){t.list.find((function(t){return t.userid==e}))||(t.list.push({userid:e,nickname:e}),t.$store.dispatch("getUserBasic",{userid:e}))})))},handleSelectData:function(){var t=this;this.__handleSelectTimeout&&clearTimeout(this.__handleSelectTimeout),this.__handleSelectTimeout=setTimeout((function(){if(t.$refs.select){var e=t.$refs.select.getValue();e&&e.some((function(e){var r=t.list.find((function(t){return t.userid==e.value}));r&&(t.$set(e,"label",r.nickname),t.$set(e,"avatar",r.userimg))}))}}),100)}}};const i=(0,r(51900).Z)(s,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{class:["common-user",t.maxHiddenClass]},[r("Select",{ref:"select",attrs:{transfer:t.transfer,placeholder:t.placeholder,size:t.size,loading:t.loadIng>0,"loading-text":t.$L("加载中..."),"default-label":t.value,"default-event-object":!0,"multiple-max":t.multipleMax,"multiple-uncancelable":t.uncancelable,"remote-method":t.remoteMethod,multiple:"",filterable:"","transfer-class-name":"common-user-transfer"},on:{"on-query-change":t.searchUser,"on-open-change":t.openChange},model:{value:t.selects,callback:function(e){t.selects=e},expression:"selects"}},[t.multipleMax?r("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,a){return r("Option",{key:a,attrs:{value:e.userid,"key-value":e.email,label:e.nickname,avatar:e.userimg,disabled:t.isDisabled(e.userid)}},[r("div",{staticClass:"user-input-option"},[r("div",{staticClass:"user-input-avatar"},[r("EAvatar",{staticClass:"avatar",attrs:{src:e.userimg}})],1),t._v(" "),r("div",{staticClass:"user-input-nickname"},[t._v(t._s(e.nickname))]),t._v(" "),r("div",{staticClass:"user-input-userid"},[t._v("ID: "+t._s(e.userid))])])])}))],2),t._v(" "),t.loadIng>0?r("div",{staticClass:"common-user-loading"},[r("Loading")],1):t._e()],1)}),[],!1,null,null,null).exports},44346:(t,e,r)=>{r.d(e,{Z:()=>l});var a=r(98668),s=r(20629);function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const o={name:"ReportEdit",components:{TEditor:function(){return r.e(500).then(r.bind(r,89500))},UserInput:a.Z},props:{id:{default:0}},data:function(){return{reportData:{title:"",content:"",type:"weekly",receive:[],id:0,offset:0},prevCycleText:this.$L("上一周"),nextCycleText:this.$L("下一周")}},watch:{id:{handler:function(t){t>0?this.getDetail(t):(this.reportData.offset=0,this.reportData.type="weekly",this.reportData.receive=[],this.getTemplate())},immediate:!0}},computed:function(t){for(var e=1;e0?$A.modalConfirm({title:"覆盖提交",content:"你已提交过此日期的报告,是否覆盖提交?",loading:!0,onOk:function(){t.doSubmit(!0)}}):this.doSubmit()},doSubmit:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$store.dispatch("call",{url:"report/store",data:this.reportData,method:"post"}).then((function(r){var a=r.data,s=r.msg;e&&t.$Modal.remove(),t.reportData.offset=0,t.reportData.type="weekly",t.reportData.receive=[],t.getTemplate(),$A.messageSuccess(s),t.$emit("saveSuccess",a)})).catch((function(r){var a=r.msg;e&&t.$Modal.remove(),$A.messageError(a)}))},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 r=e.data;r.id?(t.reportData.id=r.id,t.id>0?t.getDetail(r.id):(t.reportData.title=r.title,t.reportData.content=r.content)):(t.reportData.id=0,t.reportData.title=r.title,t.reportData.content=r.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.$store.dispatch("call",{url:"report/detail",data:{id:t}}).then((function(r){var a=r.data;e.reportData.title=a.title,e.reportData.content=a.content,e.reportData.receive=a.receives_user.map((function(t){return t.userid})),e.reportData.type=a.type_val,e.reportData.id=t})).catch((function(t){var e=t.msg;$A.messageError(e)}))},prevCycle:function(){this.reportData.offset-=1,this.reReportData(),this.getTemplate()},nextCycle:function(){this.reportData.offset<0&&(this.reportData.offset+=1),this.reReportData(),this.getTemplate()},getLastSubmitter:function(){var t=this;this.$store.dispatch("call",{url:"report/last_submitter"}).then((function(e){var r=e.data;t.reportData.receive=r})).catch((function(t){var e=t.msg;$A.messageError(e)}))},reReportData:function(){this.reportData.title="",this.reportData.content="",this.reportData.receive=[],this.reportData.id=0}}};const l=(0,r(51900).Z)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("Form",{staticClass:"report-edit",attrs:{"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[r("FormItem",{attrs:{label:t.$L("汇报类型")}},[r("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"}},[r("Radio",{attrs:{label:"weekly",disabled:t.id>0&&"daily"==t.reportData.type}},[t._v(t._s(t.$L("周报")))]),t._v(" "),r("Radio",{attrs:{label:"daily",disabled:t.id>0&&"weekly"==t.reportData.type}},[t._v(t._s(t.$L("日报")))])],1),t._v(" "),0===t.id?r("ButtonGroup",{staticClass:"report-buttongroup"},[r("ETooltip",{attrs:{content:t.prevCycleText,placement:"bottom"}},[r("Button",{attrs:{type:"primary"},on:{click:t.prevCycle}},[r("Icon",{attrs:{type:"ios-arrow-back"}})],1)],1),t._v(" "),r("div",{staticClass:"report-buttongroup-vertical"}),t._v(" "),r("ETooltip",{attrs:{disabled:t.reportData.offset>=0,content:t.nextCycleText,placement:"bottom"}},[r("Button",{attrs:{type:"primary",disabled:t.reportData.offset>=0},on:{click:t.nextCycle}},[r("Icon",{attrs:{type:"ios-arrow-forward"}})],1)],1)],1):t._e()],1),t._v(" "),r("FormItem",{attrs:{label:t.$L("汇报名称")}},[r("Input",{attrs:{disabled:""},model:{value:t.reportData.title,callback:function(e){t.$set(t.reportData,"title",e)},expression:"reportData.title"}})],1),t._v(" "),r("FormItem",{attrs:{label:t.$L("汇报对象")}},[r("div",{staticClass:"report-users"},[r("UserInput",{attrs:{disabledChoice:[t.userId],placeholder:t.$L("选择接收人"),transfer:!1},model:{value:t.reportData.receive,callback:function(e){t.$set(t.reportData,"receive",e)},expression:"reportData.receive"}}),t._v(" "),r("a",{staticClass:"report-user-link",attrs:{href:"javascript:void(0);"},on:{click:t.getLastSubmitter}},[r("Icon",{attrs:{type:"ios-share-outline"}}),t._v(t._s(t.$L("使用我上次的汇报对象"))+"\n ")],1)],1)]),t._v(" "),r("FormItem",{staticClass:"report-content-editor",attrs:{label:t.$L("汇报内容")}},[r("TEditor",{attrs:{height:"100%"},model:{value:t.reportData.content,callback:function(e){t.$set(t.reportData,"content",e)},expression:"reportData.content"}})],1),t._v(" "),r("FormItem",{staticClass:"report-foot"},[r("Button",{staticClass:"report-bottom",attrs:{type:"primary"},on:{click:t.handleSubmit}},[t._v(t._s(t.$L(t.id>0?"修改":"提交")))])],1)],1)}),[],!1,null,null,null).exports},94483:(t,e,r)=>{r.r(e),r.d(e,{default:()=>l});const a={components:{ReportEdit:r(44346).Z},data:function(){return{detail:{}}},computed:{id:function(){return $A.runNum(this.detail.id||this.$route.params.id)},title:function(){return this.$L(this.id>0?"修改报告":"新增报告")}},methods:{saveSuccess:function(t){this.detail=t,this.$isSubElectron&&$A.Electron.sendMessage("sendForwardMain",{channel:"reportSaveSuccess",data:t})}}};var s=r(93379),i=r.n(s),n=r(75091),o={insert:"head",singleton:!1};i()(n.Z,o);n.Z.locals;const l=(0,r(51900).Z)(a,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"electron-report"},[r("PageTitle",{attrs:{title:t.title}}),t._v(" "),r("ReportEdit",{attrs:{id:t.id},on:{saveSuccess:t.saveSuccess}})],1)}),[],!1,null,"7231af33",null).exports}}]); \ No newline at end of file diff --git a/public/js/build/115.js b/public/js/build/626.js similarity index 74% rename from public/js/build/115.js rename to public/js/build/626.js index 87b0f594b..c4061b6bd 100644 --- a/public/js/build/115.js +++ b/public/js/build/626.js @@ -1,2 +1,2 @@ -/*! For license information please see 115.js.LICENSE.txt */ -(self.webpackChunkDooTask=self.webpackChunkDooTask||[]).push([[115,500],{81653:function(t){t.exports=function(){return e={686:function(t,e,n){"use strict";n.d(e,{default:function(){return v}}),e=n(279);var r=n.n(e),o=(e=n(370),n.n(e)),i=(e=n(817),n.n(e));function a(t){try{return document.execCommand(t)}catch(t){return}}var s=function(t){return t=i()(t),a("cut"),t},u=function(t){var e,n,r,o=1{"use strict";n.d(e,{Z:()=>i});var r=n(1519),o=n.n(r)()((function(t){return t[1]}));o.push([t.id,'.common-gantt[data-v-53625f84]{align-items:self-start;bottom:0;color:#747a81;display:flex;flex-direction:row;left:0;position:absolute;right:0;top:0}.common-gantt *[data-v-53625f84]{box-sizing:border-box}.common-gantt .gantt-left[data-v-53625f84]{background-color:#fff;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;height:100%;position:relative}.common-gantt .gantt-left[data-v-53625f84]:after{background-color:rgba(237,241,242,.75);bottom:0;content:"";position:absolute;right:0;top:0;width:1px}.common-gantt .gantt-left .gantt-title[data-v-53625f84]{background-color:#f9fafb;flex-grow:0;flex-shrink:0;height:76px;overflow:hidden;padding-left:12px}.common-gantt .gantt-left .gantt-title .gantt-title-text[data-v-53625f84]{font-weight:600;line-height:100px;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.common-gantt .gantt-left .gantt-item[data-v-53625f84]{-ms-overflow-style:none;max-height:100%;overflow:auto;transform:translateZ(0)}.common-gantt .gantt-left .gantt-item[data-v-53625f84]::-webkit-scrollbar{display:none}.common-gantt .gantt-left .gantt-item>li[data-v-53625f84]{align-items:center;border-bottom:1px solid rgba(237,241,242,.75);display:flex;height:40px;padding-left:12px;position:relative}.common-gantt .gantt-left .gantt-item>li:hover .item-icon[data-v-53625f84]{display:flex}.common-gantt .gantt-left .gantt-item>li .item-overdue[data-v-53625f84]{background-color:red;border-radius:3px;color:#fff;flex-grow:0;flex-shrink:0;font-size:12px;line-height:18px;margin-right:4px;padding:1px 3px}.common-gantt .gantt-left .gantt-item>li .item-title[data-v-53625f84]{cursor:default;flex:1;overflow:hidden;padding-right:12px;text-overflow:ellipsis;white-space:nowrap}.common-gantt .gantt-left .gantt-item>li .item-title.complete[data-v-53625f84]{text-decoration:line-through}.common-gantt .gantt-left .gantt-item>li .item-title.overdue[data-v-53625f84]{font-weight:600}.common-gantt .gantt-left .gantt-item>li .item-icon[data-v-53625f84]{align-items:center;color:#888;display:none;font-size:16px;justify-content:center;margin-right:2px;width:32px}.common-gantt .gantt-right[data-v-53625f84]{background-color:#fff;flex:1;height:100%;overflow:hidden;position:relative}.common-gantt .gantt-right .gantt-chart[data-v-53625f84]{bottom:0;left:0;position:absolute;right:0;top:0;transform:translateZ(0)}.common-gantt .gantt-right .gantt-chart .gantt-month[data-v-53625f84]{align-items:center;background-color:#f9fafb;display:flex;font-size:14px;height:26px;left:0;line-height:20px;position:absolute;right:0;top:0;z-index:1}.common-gantt .gantt-right .gantt-chart .gantt-month>li[data-v-53625f84]{flex-grow:0;flex-shrink:0;height:100%;overflow:hidden;position:relative}.common-gantt .gantt-right .gantt-chart .gantt-month>li[data-v-53625f84]:after{background-color:rgba(237,241,242,.75);content:"";height:100%;position:absolute;right:0;top:0;width:1px}.common-gantt .gantt-right .gantt-chart .gantt-month>li .month-format[data-v-53625f84]{overflow:hidden;padding:6px 6px 0;white-space:nowrap}.common-gantt .gantt-right .gantt-chart .gantt-date[data-v-53625f84]{align-items:center;bottom:0;cursor:move;display:flex;left:0;position:absolute;right:0;top:26px;z-index:2}.common-gantt .gantt-right .gantt-chart .gantt-date[data-v-53625f84]:before{background-color:#f9fafb;content:"";height:50px;left:0;position:absolute;right:0;top:0}.common-gantt .gantt-right .gantt-chart .gantt-date>li[data-v-53625f84]{flex-grow:0;flex-shrink:0;height:100%;overflow:hidden;position:relative}.common-gantt .gantt-right .gantt-chart .gantt-date>li[data-v-53625f84]:after{background-color:rgba(237,241,242,.75);content:"";height:100%;position:absolute;right:0;top:0;width:1px}.common-gantt .gantt-right .gantt-chart .gantt-date>li .date-format[data-v-53625f84]{align-items:center;display:flex;flex-direction:column;height:44px;justify-content:center;overflow:hidden;white-space:nowrap}.common-gantt .gantt-right .gantt-chart .gantt-date>li .date-format .format-day[data-v-53625f84]{font-size:18px;line-height:28px}.common-gantt .gantt-right .gantt-chart .gantt-date>li .date-format .format-week[data-v-53625f84]{font-size:13px;font-weight:300;line-height:16px}.common-gantt .gantt-right .gantt-chart .gantt-timeline[data-v-53625f84]{bottom:0;left:0;overflow-x:hidden;overflow-y:auto;position:absolute;right:0;top:76px;z-index:3}.common-gantt .gantt-right .gantt-chart .gantt-timeline>li[data-v-53625f84]{border-bottom:1px solid rgba(237,241,242,.75);cursor:default;height:40px;position:relative}.common-gantt .gantt-right .gantt-chart .gantt-timeline>li .timeline-item[data-v-53625f84]{align-items:center;background:#e74c3c;border-radius:18px;color:#fff;display:flex;height:32px;margin-top:4px;padding:4px;pointer-events:auto;position:absolute;top:0;touch-action:none;will-change:contents}.common-gantt .gantt-right .gantt-chart .gantt-timeline>li .timeline-item .timeline-title[data-v-53625f84]{flex-grow:1;margin-left:4px;margin-right:10px;overflow:hidden;text-overflow:ellipsis;touch-action:none;white-space:nowrap}.common-gantt .gantt-right .gantt-chart .gantt-timeline>li .timeline-item .timeline-resizer[data-v-53625f84]{background:hsla(0,0%,100%,.1);cursor:ew-resize;flex-shrink:0;height:22px;position:absolute;right:5px;top:5px;touch-action:none;width:8px;will-change:visibility}',""]);const i=o},26167:(t,e,n)=>{"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},51474:(t,e,n)=>{"use strict";function r(t){return r="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},r(t)}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(){return i=Object.assign||function(t){for(var e=1;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function u(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);eCe,MultiDrag:()=>ye,Sortable:()=>Ft,Swap:()=>ue});function c(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var l=c(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),d=c(/Edge/i),f=c(/firefox/i),m=c(/safari/i)&&!c(/chrome/i)&&!c(/android/i),p=c(/iP(ad|od|hone)/i),h=c(/chrome/i)&&c(/android/i),g={capture:!1,passive:!1};function v(t,e,n){t.addEventListener(e,n,!l&&g)}function b(t,e,n){t.removeEventListener(e,n,!l&&g)}function y(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function _(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function w(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&y(t,e):y(t,e))||r&&t===n)return t;if(t===n)break}while(t=_(t))}return null}var C,k=/\s+/g;function x(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(k," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(k," ")}}function S(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"==typeof n?"":"px")}}function D(t,e){var n="";if("string"==typeof t)n=t;else do{var r=S(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function E(t,e,n){if(t){var r=t.getElementsByTagName(e),o=0,i=r.length;if(n)for(;o=i:o<=i))return r;if(r===T())break;r=P(r,!1)}return!1}function N(t,e,n){for(var r=0,o=0,i=t.children;o2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=s(n,["evt"]);q.pluginEvent.bind(Ft)(t,e,a({dragEl:G,parentEl:Z,ghostEl:J,rootEl:Q,nextEl:tt,lastDownEl:et,cloneEl:nt,cloneHidden:rt,dragStarted:gt,putSortable:ct,activeSortable:Ft.active,originalEvent:r,oldIndex:ot,oldDraggableIndex:at,newIndex:it,newDraggableIndex:st,hideGhostForTarget:jt,unhideGhostForTarget:Rt,cloneNowHidden:function(){rt=!0},cloneNowShown:function(){rt=!1},dispatchSortableEvent:function(t){K({sortable:e,name:t,originalEvent:r})}},o))};function K(t){Y(a({putSortable:ct,cloneEl:nt,targetEl:G,rootEl:Q,oldIndex:ot,oldDraggableIndex:at,newIndex:it,newDraggableIndex:st},t))}var G,Z,J,Q,tt,et,nt,rt,ot,it,at,st,ut,ct,lt,dt,ft,mt,pt,ht,gt,vt,bt,yt,_t,wt=!1,Ct=!1,kt=[],xt=!1,St=!1,Dt=[],Et=!1,Tt=[],Ot="undefined"!=typeof document,At=p,Nt=d||l?"cssFloat":"float",$t=Ot&&!h&&!p&&"draggable"in document.createElement("div"),It=function(){if(Ot){if(l)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Lt=function(t,e){var n=S(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=N(t,0,e),i=N(t,1,e),a=o&&S(o),s=i&&S(i),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+O(o).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+O(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&"none"!==a.float){var l="left"===a.float?"left":"right";return!i||"both"!==s.clear&&s.clear!==l?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||u>=r&&"none"===n[Nt]||i&&"none"===n[Nt]&&u+c>r)?"vertical":"horizontal"},Pt=function(t){function e(t,n){return function(r,o,i,a){var s=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==t&&(n||s))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(r,o,i,a),n)(r,o,i,a);var u=(n?r:o).options.group.name;return!0===t||"string"==typeof t&&t===u||t.join&&t.indexOf(u)>-1}}var n={},o=t.group;o&&"object"==r(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},jt=function(){!It&&J&&S(J,"display","none")},Rt=function(){!It&&J&&S(J,"display","")};Ot&&document.addEventListener("click",(function(t){if(Ct)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Ct=!1,!1}),!0);var Mt=function(t){if(G){t=t.touches?t.touches[0]:t;var e=(o=t.clientX,i=t.clientY,kt.some((function(t){if(!$(t)){var e=O(t),n=t[U].options.emptyInsertThreshold,r=o>=e.left-n&&o<=e.right+n,s=i>=e.top-n&&i<=e.bottom+n;return n&&r&&s?a=t:void 0}})),a);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[U]._onDragOver(n)}}var o,i,a},Bt=function(t){G&&G.parentNode[U]._isOutsideThisEl(t.target)};function Ft(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=i({},e),t[U]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Lt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ft.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var r in q.initializePlugins(this,t,n),n)!(r in e)&&(e[r]=n[r]);for(var o in Pt(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&$t,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?v(t,"pointerdown",this._onTapStart):(v(t,"mousedown",this._onTapStart),v(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(v(t,"dragover",this),v(t,"dragenter",this)),kt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),i(this,H())}function zt(t,e,n,r,o,i,a,s){var u,c,f=t[U],m=f.options.onMove;return!window.CustomEvent||l||d?(u=document.createEvent("Event")).initEvent("move",!0,!0):u=new CustomEvent("move",{bubbles:!0,cancelable:!0}),u.to=e,u.from=t,u.dragged=n,u.draggedRect=r,u.related=o||e,u.relatedRect=i||O(e),u.willInsertAfter=s,u.originalEvent=a,t.dispatchEvent(u),m&&(c=m.call(f,u,a)),c}function Ut(t){t.draggable=!1}function Ht(){Et=!1}function Vt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function Wt(t){return setTimeout(t,0)}function qt(t){return clearTimeout(t)}Ft.prototype={constructor:Ft,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(vt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,G):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,o=r.preventOnFilter,i=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,s=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=r.filter;if(function(t){Tt.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var r=e[n];r.checked&&Tt.push(r)}}(n),!G&&!(/mousedown|pointerdown/.test(i)&&0!==t.button||r.disabled||u.isContentEditable||(s=w(s,r.draggable,n,!1))&&s.animated||et===s)){if(ot=I(s),at=I(s,r.draggable),"function"==typeof c){if(c.call(this,t,s,this))return K({sortable:e,rootEl:u,name:"filter",targetEl:s,toEl:n,fromEl:n}),X("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(r){if(r=w(u,r.trim(),n,!1))return K({sortable:e,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),X("filter",e,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());r.handle&&!w(u,r.handle,n,!1)||this._prepareDragStart(t,a,s)}}},_prepareDragStart:function(t,e,n){var r,o=this,i=o.el,a=o.options,s=i.ownerDocument;if(n&&!G&&n.parentNode===i){var u=O(n);if(Q=i,Z=(G=n).parentNode,tt=G.nextSibling,et=n,ut=a.group,Ft.dragged=G,lt={target:G,clientX:(e||t).clientX,clientY:(e||t).clientY},pt=lt.clientX-u.left,ht=lt.clientY-u.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,G.style["will-change"]="all",r=function(){X("delayEnded",o,{evt:t}),Ft.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!f&&o.nativeDraggable&&(G.draggable=!0),o._triggerDragStart(t,e),K({sortable:o,name:"choose",originalEvent:t}),x(G,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){E(G,t.trim(),Ut)})),v(s,"dragover",Mt),v(s,"mousemove",Mt),v(s,"touchmove",Mt),v(s,"mouseup",o._onDrop),v(s,"touchend",o._onDrop),v(s,"touchcancel",o._onDrop),f&&this.nativeDraggable&&(this.options.touchStartThreshold=4,G.draggable=!0),X("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(d||l))r();else{if(Ft.eventCanceled)return void this._onDrop();v(s,"mouseup",o._disableDelayedDrag),v(s,"touchend",o._disableDelayedDrag),v(s,"touchcancel",o._disableDelayedDrag),v(s,"mousemove",o._delayedDragTouchMoveHandler),v(s,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&v(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){G&&Ut(G),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;b(t,"mouseup",this._disableDelayedDrag),b(t,"touchend",this._disableDelayedDrag),b(t,"touchcancel",this._disableDelayedDrag),b(t,"mousemove",this._delayedDragTouchMoveHandler),b(t,"touchmove",this._delayedDragTouchMoveHandler),b(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?v(document,"pointermove",this._onTouchMove):v(document,e?"touchmove":"mousemove",this._onTouchMove):(v(G,"dragend",this),v(Q,"dragstart",this._onDragStart));try{document.selection?Wt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(wt=!1,Q&&G){X("dragStarted",this,{evt:e}),this.nativeDraggable&&v(document,"dragover",Bt);var n=this.options;!t&&x(G,n.dragClass,!1),x(G,n.ghostClass,!0),Ft.active=this,t&&this._appendGhost(),K({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(dt){this._lastX=dt.clientX,this._lastY=dt.clientY,jt();for(var t=document.elementFromPoint(dt.clientX,dt.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(dt.clientX,dt.clientY))!==e;)e=t;if(G.parentNode[U]._isOutsideThisEl(t),e)do{if(e[U]){if(e[U]._onDragOver({clientX:dt.clientX,clientY:dt.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Rt()}},_onTouchMove:function(t){if(lt){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,o=t.touches?t.touches[0]:t,i=J&&D(J,!0),a=J&&i&&i.a,s=J&&i&&i.d,u=At&&_t&&L(_t),c=(o.clientX-lt.clientX+r.x)/(a||1)+(u?u[0]-Dt[0]:0)/(a||1),l=(o.clientY-lt.clientY+r.y)/(s||1)+(u?u[1]-Dt[1]:0)/(s||1);if(!Ft.active&&!wt){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))r.right+o||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+o}(t,o,this)&&!g.animated){if(g===G)return B(!1);if(g&&i===t.target&&(s=g),s&&(n=O(s)),!1!==zt(Q,i,G,e,s,n,t,!!s))return R(),i.appendChild(G),Z=i,F(),B(!0)}else if(s.parentNode===i){n=O(s);var v,b,y,_=G.parentNode!==i,C=!function(t,e,n){var r=n?t.left:t.top,o=n?t.right:t.bottom,i=n?t.width:t.height,a=n?e.left:e.top,s=n?e.right:e.bottom,u=n?e.width:e.height;return r===a||o===s||r+i/2===a+u/2}(G.animated&&G.toRect||e,s.animated&&s.toRect||n,o),k=o?"top":"left",D=A(s,"top","top")||A(G,"top","top"),E=D?D.scrollTop:void 0;if(vt!==s&&(b=n[k],xt=!1,St=!C&&u.invertSwap||_),v=function(t,e,n,r,o,i,a,s){var u=r?t.clientY:t.clientX,c=r?n.height:n.width,l=r?n.top:n.left,d=r?n.bottom:n.right,f=!1;if(!a)if(s&&ytl+c*i/2:ud-yt)return-bt}else if(u>l+c*(1-o)/2&&ud-c*i/2))return u>l+c/2?1:-1;return 0}(t,s,n,o,C?1:u.swapThreshold,null==u.invertedSwapThreshold?u.swapThreshold:u.invertedSwapThreshold,St,vt===s),0!==v){var T=I(G);do{T-=v,y=Z.children[T]}while(y&&("none"===S(y,"display")||y===J))}if(0===v||y===s)return B(!1);vt=s,bt=v;var N=s.nextElementSibling,L=!1,P=zt(Q,i,G,e,s,n,t,L=1===v);if(!1!==P)return 1!==P&&-1!==P||(L=1===P),Et=!0,setTimeout(Ht,30),R(),L&&!N?i.appendChild(G):s.parentNode.insertBefore(G,L?N:s),D&&M(D,0,E-D.scrollTop),Z=G.parentNode,void 0===b||St||(yt=Math.abs(b-O(s)[k])),F(),B(!0)}if(i.contains(G))return B(!1)}return!1}function j(u,c){X(u,p,a({evt:t,isOwner:d,axis:o?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:f,fromSortable:m,target:s,completed:B,onMove:function(n,r){return zt(Q,i,G,e,n,O(n),t,r)},changed:F},c))}function R(){j("dragOverAnimationCapture"),p.captureAnimationState(),p!==m&&m.captureAnimationState()}function B(e){return j("dragOverCompleted",{insertion:e}),e&&(d?l._hideClone():l._showClone(p),p!==m&&(x(G,ct?ct.options.ghostClass:l.options.ghostClass,!1),x(G,u.ghostClass,!0)),ct!==p&&p!==Ft.active?ct=p:p===Ft.active&&ct&&(ct=null),m===p&&(p._ignoreWhileAnimating=s),p.animateAll((function(){j("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==m&&(m.animateAll(),m._ignoreWhileAnimating=null)),(s===G&&!G.animated||s===i&&!s.animated)&&(vt=null),u.dragoverBubble||t.rootEl||s===document||(G.parentNode[U]._isOutsideThisEl(t.target),!e&&Mt(t)),!u.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),h=!0}function F(){it=I(G),st=I(G,u.draggable),K({sortable:p,name:"change",toEl:i,newIndex:it,newDraggableIndex:st,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){b(document,"mousemove",this._onTouchMove),b(document,"touchmove",this._onTouchMove),b(document,"pointermove",this._onTouchMove),b(document,"dragover",Mt),b(document,"mousemove",Mt),b(document,"touchmove",Mt)},_offUpEvents:function(){var t=this.el.ownerDocument;b(t,"mouseup",this._onDrop),b(t,"touchend",this._onDrop),b(t,"pointerup",this._onDrop),b(t,"touchcancel",this._onDrop),b(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;it=I(G),st=I(G,n.draggable),X("drop",this,{evt:t}),Z=G&&G.parentNode,it=I(G),st=I(G,n.draggable),Ft.eventCanceled||(wt=!1,St=!1,xt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),qt(this.cloneId),qt(this._dragStartId),this.nativeDraggable&&(b(document,"drop",this),b(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),m&&S(document.body,"user-select",""),S(G,"transform",""),t&&(gt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),J&&J.parentNode&&J.parentNode.removeChild(J),(Q===Z||ct&&"clone"!==ct.lastPutMode)&&nt&&nt.parentNode&&nt.parentNode.removeChild(nt),G&&(this.nativeDraggable&&b(G,"dragend",this),Ut(G),G.style["will-change"]="",gt&&!wt&&x(G,ct?ct.options.ghostClass:this.options.ghostClass,!1),x(G,this.options.chosenClass,!1),K({sortable:this,name:"unchoose",toEl:Z,newIndex:null,newDraggableIndex:null,originalEvent:t}),Q!==Z?(it>=0&&(K({rootEl:Z,name:"add",toEl:Z,fromEl:Q,originalEvent:t}),K({sortable:this,name:"remove",toEl:Z,originalEvent:t}),K({rootEl:Z,name:"sort",toEl:Z,fromEl:Q,originalEvent:t}),K({sortable:this,name:"sort",toEl:Z,originalEvent:t})),ct&&ct.save()):it!==ot&&it>=0&&(K({sortable:this,name:"update",toEl:Z,originalEvent:t}),K({sortable:this,name:"sort",toEl:Z,originalEvent:t})),Ft.active&&(null!=it&&-1!==it||(it=ot,st=at),K({sortable:this,name:"end",toEl:Z,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){X("nulling",this),Q=G=Z=J=tt=nt=et=rt=lt=dt=gt=it=st=ot=at=vt=bt=ct=ut=Ft.dragged=Ft.ghost=Ft.clone=Ft.active=null,Tt.forEach((function(t){t.checked=!0})),Tt.length=ft=mt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":G&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,o=n.length,i=this.options;r1&&(pe.forEach((function(t){r.addAnimationState({target:t,rect:ve?O(t):o}),z(t),t.fromRect=o,e.removeAnimationState(t)})),ve=!1,function(t,e){pe.forEach((function(n,r){var o=e.children[n.sortableIndex+(t?Number(r):0)];o?e.insertBefore(n,o):e.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(t){var e=t.sortable,n=t.isOwner,r=t.insertion,o=t.activeSortable,i=t.parentEl,a=t.putSortable,s=this.options;if(r){if(n&&o._hideClone(),ge=!1,s.animation&&pe.length>1&&(ve||!n&&!o.options.sort&&!a)){var u=O(de,!1,!0,!0);pe.forEach((function(t){t!==de&&(F(t,u),i.appendChild(t))})),ve=!0}if(!n)if(ve||we(),pe.length>1){var c=me;o._showClone(e),o.options.animation&&!me&&c&&he.forEach((function(t){o.addAnimationState({target:t,rect:fe}),t.fromRect=fe,t.thisAnimationDuration=null}))}else o._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,n=t.isOwner,r=t.activeSortable;if(pe.forEach((function(t){t.thisAnimationDuration=null})),r.options.animation&&!n&&r.multiDrag.isMultiDrag){fe=i({},e);var o=D(de,!0);fe.top-=o.f,fe.left-=o.e}},dragOverAnimationComplete:function(){ve&&(ve=!1,we())},drop:function(t){var e=t.originalEvent,n=t.rootEl,r=t.parentEl,o=t.sortable,i=t.dispatchSortableEvent,a=t.oldIndex,s=t.putSortable,u=s||this.sortable;if(e){var c=this.options,l=r.children;if(!be)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),x(de,c.selectedClass,!~pe.indexOf(de)),~pe.indexOf(de))pe.splice(pe.indexOf(de),1),ce=null,Y({sortable:o,rootEl:n,name:"deselect",targetEl:de,originalEvt:e});else{if(pe.push(de),Y({sortable:o,rootEl:n,name:"select",targetEl:de,originalEvt:e}),e.shiftKey&&ce&&o.el.contains(ce)){var d,f,m=I(ce),p=I(de);if(~m&&~p&&m!==p)for(p>m?(f=m,d=p):(f=p,d=m+1);f1){var h=O(de),g=I(de,":not(."+this.options.selectedClass+")");if(!ge&&c.animation&&(de.thisAnimationDuration=null),u.captureAnimationState(),!ge&&(c.animation&&(de.fromRect=h,pe.forEach((function(t){if(t.thisAnimationDuration=null,t!==de){var e=ve?O(t):h;t.fromRect=e,u.addAnimationState({target:t,rect:e})}}))),we(),pe.forEach((function(t){l[g]?r.insertBefore(t,l[g]):r.appendChild(t),g++})),a===I(de))){var v=!1;pe.forEach((function(t){t.sortableIndex===I(t)||(v=!0)})),v&&i("update")}pe.forEach((function(t){z(t)})),u.animateAll()}le=u}(n===r||s&&"clone"!==s.lastPutMode)&&he.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=be=!1,he.length=0},destroyGlobal:function(){this._deselectMultiDrag(),b(document,"pointerup",this._deselectMultiDrag),b(document,"mouseup",this._deselectMultiDrag),b(document,"touchend",this._deselectMultiDrag),b(document,"keydown",this._checkKeyDown),b(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==be&&be||le!==this.sortable||t&&w(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;pe.length;){var e=pe[0];x(e,this.options.selectedClass,!1),pe.shift(),Y({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvt:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},i(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[U];e&&e.options.multiDrag&&!~pe.indexOf(t)&&(le&&le!==e&&(le.multiDrag._deselectMultiDrag(),le=e),x(t,e.options.selectedClass,!0),pe.push(t))},deselect:function(t){var e=t.parentNode[U],n=pe.indexOf(t);e&&e.options.multiDrag&&~n&&(x(t,e.options.selectedClass,!1),pe.splice(n,1))}},eventProperties:function(){var t=this,e=[],n=[];return pe.forEach((function(r){var o;e.push({multiDragElement:r,index:r.sortableIndex}),o=ve&&r!==de?-1:ve?I(r,":not(."+t.options.selectedClass+")"):I(r),n.push({multiDragElement:r,index:o})})),{items:u(pe),clones:[].concat(he),oldIndicies:e,newIndicies:n}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function _e(t,e){he.forEach((function(n,r){var o=e.children[n.sortableIndex+(t?Number(r):0)];o?e.insertBefore(n,o):e.appendChild(n)}))}function we(){pe.forEach((function(t){t!==de&&t.parentNode&&t.parentNode.removeChild(t)}))}Ft.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?v(document,"dragover",this._handleAutoScroll):this.options.supportPointer?v(document,"pointermove",this._handleFallbackAutoScroll):e.touches?v(document,"touchmove",this._handleFallbackAutoScroll):v(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):(b(document,"pointermove",this._handleFallbackAutoScroll),b(document,"touchmove",this._handleFallbackAutoScroll),b(document,"mousemove",this._handleFallbackAutoScroll)),ne(),ee(),clearTimeout(C),C=void 0},nulling:function(){Zt=Xt=Yt=te=Jt=Kt=Gt=null,Qt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,r=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,i=document.elementFromPoint(r,o);if(Zt=t,e||d||l||m){oe(t,this.options,i,e);var a=P(i,!0);!te||Jt&&r===Kt&&o===Gt||(Jt&&ne(),Jt=setInterval((function(){var i=P(document.elementFromPoint(r,o),!0);i!==a&&(a=i,ee()),oe(t,n.options,i,e)}),10),Kt=r,Gt=o)}else{if(!this.options.bubbleScroll||P(i,!0)===T())return void ee();oe(t,this.options,P(i,!1),!1)}}},i(t,{pluginName:"scroll",initializeByDefault:!0})}),Ft.mount(se,ae);const Ce=Ft},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)}},Y=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)},Bt=function(t){return function(e){return e.replace(t,"")}},Ft=Bt(/^\s+|\s+$/g),zt=Bt(/^\s+/g),Ut=Bt(/\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 Rt(e,t)}},Yt=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return Rt(t,"edge/")&&Rt(t,"chrome")&&Rt(t,"safari")&&Rt(t,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Wt],search:function(t){return Rt(t,"chrome")&&!Rt(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return Rt(t,"msie")||Rt(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(Rt(t,"safari")||Rt(t,"mobile/"))&&Rt(t,"applewebkit")}}],Xt=[{name:"Windows",search:qt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return Rt(t,"iphone")||Rt(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]+).*/]}],Kt={browsers:S(Yt),oses:S(Xt)},Gt="Edge",Zt="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(Gt),isChrome:r(Zt),isIE:r("IE"),isOpera:r(Jt),isFirefox:r(Qt),isSafari:r(te)}},ne={unknown:function(){return ee({current:void 0,version:Pt.unknown()})},nu:ee,edge:S(Gt),chrome:S(Zt),ie:S("IE"),opera:S(Jt),firefox:S(Qt),safari:S(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:Pt.unknown()})},nu:ce,windows:S(re),ios:S("iOS"),android:S(oe),linux:S(ie),osx:S("OSX"),solaris:S(ae),freebsd:S(se),chromeos:S(ue)},de=function(t,e,n){var r=Kt.browsers(),o=Kt.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:Pt.nu(parseInt(e.version,10),0)}}))}))}(r,t)})).orThunk((function(){return function(t,e){return jt(t,e).map((function(t){var n=Pt.detect(t.versionRegexes,e);return{current:t.name,version:n}}))}(r,t)})).fold(ne.unknown,ne.nu),a=function(t,e){return jt(t,e).map((function(t){var n=Pt.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:S(o),isiPhone:S(i),isTablet:S(u),isPhone:S(c),isTouch:S(s),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:S(l),isDesktop:S(d)}}(a,i,t,n);return{browser:i,os:a,deviceType:s}},fe=function(t){return window.matchMedia(t).matches},me=$t((function(){return de(navigator.userAgent,R.from(navigator.userAgentData),fe)})),pe=function(){return me()},he=navigator.userAgent,ge=pe(),ve=ge.browser,be=ge.os,ye=ge.deviceType,_e=/WebKit/.test(he)&&!ve.isEdge(),we="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,Ce=-1!==he.indexOf("Windows Phone"),ke={opera:ve.isOpera(),webkit:_e,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:Ce,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,Se=function(t){return null==t?"":(""+t).replace(xe,"")},De=function(t,e){return e?!("array"!==e||!Ct(t))||typeof t===e:void 0!==t},Ee=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;Ee(t,e,n,r)})))},Te={trim:Se,isArray:Ct,is:De,toArray:function(t){if(Ct(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 R.from(t.dom.elementFromPoint(e,n)).map(Oe)}},Ne=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},$e=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")},Ie=function(t){return 1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType||0===t.childElementCount},Le=function(t,e){return t.dom===e.dom},Pe=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},je=function(t,e){return pe().browser.isIE()?Pe(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 Re=function(t){return t.dom.nodeName.toLowerCase()},Me=function(t){return t.dom.nodeType},Be=function(t){return function(e){return Me(e)===t}},Fe=Be(1),ze=Be(3),Ue=Be(9),He=Be(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)},Ye=function(t){return R.from(t.dom.parentNode).map(Ae.fromDom)},Xe=function(t){return R.from(t.dom.previousSibling).map(Ae.fromDom)},Ke=function(t){return R.from(t.dom.nextSibling).map(Ae.fromDom)},Ge=function(t){return nt(Ne(t,Xe))},Ze=function(t){return Ne(t,Ke)},Je=function(t){return V(t.dom.childNodes,Ae.fromDom)},Qe=function(t,e){var n=t.dom.childNodes;return R.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=_(Element.prototype.attachShadow)&&_(Node.prototype.getRootNode),an=S(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){Ye(t).each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},fn=function(t,e){Ke(t).fold((function(){Ye(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=ze(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)?R.some(e):R.none()}(Ae.fromDom(e)).fold((function(){return n.body.contains(e)}),x(yn,cn))},_n=function(t,e){return{left:t,top:e,translate:function(n,r){return _n(t+n,e+r)}}},wn=_n,Cn=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)},Sn=function(t,e,n){var r=(void 0!==n?n.dom:document).defaultView;r&&r.scrollTo(t,e)},Dn=function(t,e){pe().browser.isSafari()&&_(t.dom.scrollIntoViewIfNeeded)?t.dom.scrollIntoViewIfNeeded(!1):t.dom.scrollIntoView(e)},En=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},Tn=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()?R.none():R.from(e.visualViewport)}(e).fold((function(){var t=e.document.documentElement,n=t.clientWidth,o=t.clientHeight;return En(r.left,r.top,n,o)}),(function(t){return En(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)},Nn=On(1),$n=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}},In=function(t,e){var n=e.toLowerCase().split(" ");return function(e){if(Nn(e))for(var r=0;r0}))},ur=function(t){var e={},n=t.dom;if(Zn(n))for(var r=0;r=t.length&&e(n)}}(i))}))}))},Cr=function(t){return{isValue:I,isError:$,getOr:S(t),getOrThunk:S(t),getOrDie:S(t),or:function(e){return Cr(t)},orThunk:function(e){return Cr(t)},fold:function(e,n){return n(t)},map:function(e){return Cr(e(t))},mapError:function(e){return Cr(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 R.some(t)}}},kr=function(t){return{isValue:$,isError:I,getOr:D,getOrThunk:function(t){return t()},getOrDie:function(){return(e=String(t),function(){throw new Error(e)})();var e},or:D,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:C,bind:function(e){return kr(t)},exists:$,forall:I,toOptional:R.none}},xr={value:Cr,error:kr,fromOption:function(t,e){return t.fold((function(){return kr(e)}),Cr)}},Sr=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(Dr)):e(r.pass.map(Dr))}))},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 R.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(Nn(e)&&ri(e))return e;for(var o=e.childNodes,i=o.length-1;i>=0;i--)ii(t,o[i],r);if(Nn(e)){var a=e.childNodes;1===a.length&&ri(a[0])&&e.parentNode.insertBefore(a[0],e)}return function(t){return Un(t)||zn(t)}(e)||Zo(e,r)||function(t){return!!Nn(t)&&t.childNodes.length>0}(e)||oi(e,r)||t.remove(e),e},ai=Te.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)}))}},_i={},wi={},Ci=Te.makeMap,ki=Te.each,xi=Te.extend,Si=Te.explode,Di=Te.inArray,Ei=function(t,e){return(t=Te.trim(t))?t.split(e||" "):[]},Ti=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?Ci(t,/[, ]/):Si(t,/[, ]/)}))),n},Oi=function(t){var e={},n={},r=[],o={},i={},a=function(e,n,r){var o=t[e];return o?o=Ci(o,/[, ]/,Ci(o.toUpperCase(),/[, ]/)):(o=_i[e])||(o=Ci(n," ",Ci(n.toUpperCase()," ")),o=xi(o,r),_i[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)}))},Nf=function(t,e,n,r){Pf(t,(function(o,i){return If(t,e,n,r)}),n)},$f=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))},If=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);$f(t,i,e,a,r),a.cleanup()},Lf=function(t,e,n,r){var o=Ae.fromDom(t.getDoc());$f(t,o,n,function(t){return Of(Ae.fromDom(t),C)}(e),r)},Pf=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)},jf=function(t,e,n,r){var o=t.pos;if(n)Sn(o.left,o.top,r);else{var i=o.top-e+t.height;Sn(o.left,i,r)}},Rf=function(t,e,n,r,o){var i=n+e,a=r.pos.top,s=r.bottom,u=s-a>=n;if(ai){jf(r,n,u?!1!==o:!0===o,t)}else s>i&&!u&&jf(r,n,!0===o,t)},Mf=function(t,e,n,r){var o=t.dom.defaultView.innerHeight;Rf(t,e,o,n,r)},Bf=function(t,e,n,r){var o=t.dom.defaultView.innerHeight;Rf(t,e,o,n,r);var i=Ef(n.element),a=Tn(window);i.topa.bottom&&Dn(n.element,!0===r)},Ff=function(t,e,n){return Nf(t,Mf,e,n)},zf=function(t,e,n){return Lf(t,e,Mf,n)},Uf=function(t,e,n){return Nf(t,Bf,e,n)},Hf=function(t,e,n){return Lf(t,e,Bf,n)},Vf=function(t,e,n){(t.inline?Ff: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)),R.from(t.dom.activeElement).map(Ae.fromDom)},Yf=function(t,e,n,r){return{start:t,soffset:e,finish:n,foffset:r}},Xf=Sr([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Kf=(Xf.before,Xf.on,Xf.after,function(t){return t.fold(D,D,D)}),Gf=Sr([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Zf={domRange:Gf.domRange,relative:Gf.relative,exact:Gf.exact,exactFromRange:function(t){return Gf.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 Kf(t)},exact:function(t,e,n,r){return t}})}(t);return qe(e)},range:Yf},Jf=pe().browser,Qf=function(t,e){var n=ze(e)?qd(e).length:Je(e).length+1;return t>n?n:t<0?0:t},tm=function(t){return Zf.range(t.start,Qf(t.soffset,t.start),t.finish,Qf(t.foffset,t.finish))},em=function(t,e){return!An(e.dom)&&(je(t,e)||Le(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 Zf.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?R.from(e.getRangeAt(0)):R.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),R.some(e)}catch(t){return R.none()}},sm=function(t){var e=rm(t)?im(Ae.fromDom(t.getBody())):R.none();t.bookmark=e.isSome()?e:t.bookmark},um=function(t){return(t.bookmark?t.bookmark:R.none()).bind((function(e){return function(t,e){return R.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=Ts((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(Fe(e)&&ln(e)&&t.composed&&t.composedPath){var n=t.composedPath();if(n)return at(n)}}return R.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?R.from(uu(t.startContainer,t.startOffset)).map(Ae.fromDom):R.none()}(e).bind((function(e){return vo(e)?R.some(e):!1===je(t,e)?R.some(t):R.none()}))},vm=function(t,e){gm(Ae.fromDom(t.getBody()),e).bind((function(t){return Pl(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},_m=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 _m(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)},Cm=function(t){return t.editorManager.setActive(t)},km=function(t,e){t.removed||(e?Cm(t):function(t){var e=t.selection,n=t.getBody(),r=e.getRng();t.quirks.refreshContentEditable(),void 0!==t.bookmark&&!1===_m(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 Cm(t);t.inline||(ke.opera||bm(n),t.getWin().focus()),(ke.gecko||t.inline)&&(bm(n),vm(t,r)),Cm(t)}(t))},xm=function(t,e,n,r,o){var i=n?e.startContainer:e.endContainer,a=n?e.startOffset:e.endOffset;return R.from(i).map(Ae.fromDom).map((function(t){return r&&e.collapsed?t:Qe(t,o(t,a)).getOr(t)})).bind((function(t){return Fe(t)?R.some(t):Ye(t).filter(Fe)})).map((function(t){return t.dom})).getOr(t)},Sm=function(t,e,n){return xm(t,e,!0,n,(function(t,e){return Math.min(nn(t),e)}))},Dm=function(t,e,n){return xm(t,e,!1,n,(function(t,e){return e>0?e-1:e}))},Em=function(t,e){for(var n=t;t&&Bn(t)&&0===t.length;)t=e?t.nextSibling:t.previousSibling;return t||n},Tm=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}},Nm=function(t){if(!Ko(t.value))return!1;var e=t.parent;return!e||"span"===e.name&&!e.attr("style")||!/^[ ]+$/.test(t.value)},$m=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},Im=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=Te.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:_t(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:C,a=t.cdata?t.cdata:C,s=t.text?t.text:C,u=t.start?t.start:C,c=t.end?t.end:C,l=t.pi?t.pi:C,d=t.doctype?t.doctype:C,f=function(n,f){void 0===f&&(f="html");for(var m,p,h,g,v,b,y,_,w,C,k,x,S,D,E,T,O,A,N,$=n.html,I=0,L=[],P=0,j=yi.decode,R=Te.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),M="html"===f?0:1,B=function(t){var e,n;for(e=L.length;e--&&L[e].name!==t;);if(e>=0){for(n=L.length-1;n>=e;n--)(t=L[n]).valid&&c(t.name);L.length=e}},F=function(t,e){return s(Lm(t,n),e)},z=function(e){""!==e&&(">"===e.charAt(0)&&(e=" "+e),t.allow_conditional_comments||"[if"!==e.substr(0,3).toLowerCase()||(e=" "+e),i(Lm(e,n)))},U=function(t,e){var n=t||"",r=!Mt(n,"--"),o=Vm($,r,e);return t=$.substr(e,o-e),z(r?n+t:t),o+1},H=function(e,i,a,s,u){if(a=function(t){return Lm(t,n)}((i=i.toLowerCase())in X?i:j(a||s||u||"")),K&&!_&&!1===function(t){return 0===t.indexOf("data-")||0===t.indexOf("aria-")}(i)){var c=D[i];if(!c&&E){for(var l=E.length;l--&&!(c=E[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)||R[i]&&!zm.isDomSafe(a,e,t)||_&&(i in R||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(),Y=t.self_closing_elements||e.getSelfClosingElements(),X=e.getBoolAttrs(),K=t.validate,G=t.remove_internals,Z=t.fix_self_closing,J=e.getSpecialElements(),Q=$+">";m=V.exec(Q);){var tt=m[0];if(I$.length){F(j($.substr(m.index))),I=m.index+tt.length;continue}":"===(p=p.toLowerCase()).charAt(0)&&(p=p.substr(1)),w=p in q,Z&&Y[p]&&L.length>0&&L[L.length-1].name===p&&B(p);var et=Wm(W,m[9]);if(null!==et){if("all"===et){I=Hm(e,$,V.lastIndex),V.lastIndex=I;continue}k=!1}if(!K||(C=e.getElementRule(p))){if(k=!0,K&&(D=C.attributes,E=C.attributePatterns),(S=m[9])?((_=-1!==S.indexOf("data-mce-type"))&&G&&(k=!1),(g=[]).map={},S.replace(W,(function(t,e,n,r,o){return H(p,e,n,r,o),""}))):(g=[]).map={},K&&!_){if(T=C.attributesRequired,O=C.attributesDefault,A=C.attributesForced,C.removeEmptyAttrs&&!g.length&&(k=!1),A)for(v=A.length;v--;)y=(x=A[v]).name,"{$uid}"===(N=x.value)&&(N="mce_"+P++),g.map[y]=N,g.push({name:y,value:N});if(O)for(v=O.length;v--;)(y=(x=O[v]).name)in g.map||("{$uid}"===(N=x.value)&&(N="mce_"+P++),g.map[y]=N,g.push({name:y,value:N}));if(T){for(v=T.length;v--&&!(T[v]in g.map););-1===v&&(k=!1)}if(x=g.map["data-mce-bogus"]){if("all"===x){I=Hm(e,$,V.lastIndex),V.lastIndex=I;continue}k=!1}}k&&u(p,g,w)}else k=!1;if(h=J[p]){h.lastIndex=I=m.index+tt.length,(m=h.exec($))?(k&&(b=$.substr(I,m.index-I)),I=m.index+m[0].length):(b=$.substr(I),I=$.length),k&&(b.length>0&&F(b,!0),c(p)),V.lastIndex=I;continue}w||(S&&S.indexOf("/")===S.length-1?k&&c(p):L.push({name:p,valid:k}))}else if(p=m[1])z(p);else if(p=m[2]){if(!(1===M||t.preserve_cdata||L.length>0&&e.isValidChild(L[L.length-1].name,"#cdata"))){I=U("",m.index+2),V.lastIndex=I;continue}a(p)}else if(p=m[3])d(p);else{if((p=m[4])||"=0;v--)(p=L[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=Ys("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)},Xm=Ym,Km=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?Te.trim(Xm(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=Te.trim(o),a.no_events?a.content:t.fire("GetContent",a).content},Gm=Te.each,Zm=function(t){return{compare:function(e,n){if(e.nodeName!==n.nodeName)return!1;var r=function(e){var n={};return Gm(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(_t(t,r)){if(void 0===(n=e[r]))return!1;if(t[r]!==n)return!1;delete e[r]}for(r in e)if(_t(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")))&&(!Gl(e)&&!Gl(n)))}}},Jm=Te.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){Xe(e).each((function(n){lo(t)&&mo(e)&&lo(n)&&vn(e)}))}))},xp=function(t,e,n){return je(e,t)?(r=function(t,e){for(var n=_(e)?e:$,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)||Le(t,e)})),r.slice(0,-1)):[];var r},Sp=function(t,e){return xp(t,e,$)},Dp=function(t,e){return[t].concat(Sp(t,e))},Ep=function(t,e,n){return Nl(t,e,n,cp)},Tp=function(t,e){return J(Dp(Ae.fromDom(e.container()),t),lo)},Op=function(t,e,n){return Ep(t,e.dom,n).forall((function(t){return Tp(e,n).fold((function(){return!1===tl(t,n,e.dom)}),(function(r){return!1===tl(t,n,e.dom)&&je(r,Ae.fromDom(t.container()))}))}))},Ap=function(t,e,n){return Tp(e,n).fold((function(){return Ep(t,e.dom,n).forall((function(t){return!1===tl(t,n,e.dom)}))}),(function(e){return Ep(t,e.dom,n).isNone()}))},Np=T(Ap,!1),$p=T(Ap,!0),Ip=T(Op,!1),Lp=T(Op,!0),Pp=function(t){return ll(t).exists(mo)},jp=function(t,e,n){var r=X(Dp(Ae.fromDom(n.container()),e),lo),o=at(r).getOr(e);return Ol(t,o.dom,n).filter(Pp)},Rp=function(t,e){return ll(e).exists(mo)||jp(!0,t,e).isSome()},Mp=function(t,e){return function(t){return R.from(t.getNode(!0)).map(Ae.fromDom)}(e).exists(mo)||jp(!1,t,e).isSome()},Bp=T(jp,!1),Fp=T(jp,!0),zp=function(t){return Ou.isTextPosition(t)&&!t.isAtStart()&&!t.isAtEnd()},Up=function(t,e){var n=X(Dp(Ae.fromDom(e.container()),t),lo);return at(n).getOr(t)},Hp=function(t,e){return zp(e)?up(e):up(e)||Ll(Up(t,e).dom,e).exists(up)},Vp=function(t,e){return zp(e)?sp(e):sp(e)||Il(Up(t,e).dom,e).exists(sp)},Wp=function(t){return ll(t).bind((function(t){return Kr(t,Fe)})).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 Ll(t.dom,e).isNone()}(t,e)||function(t,e){return Il(t.dom,e).isNone()}(t,e)||Np(t,e)||$p(t,e)||Mp(t,e)||Rp(t,e)},Yp=function(t,e){return!Wp(e)&&(Np(t,e)||Ip(t,e)||Mp(t,e)||Hp(t,e))},Xp=function(t,e){return!Wp(e)&&($p(t,e)||Lp(t,e)||Rp(t,e)||Vp(t,e))},Kp=function(t,e){return Yp(t,e)||Xp(t,function(t){var e=t.container(),n=t.offset();return Bn(e)&&n0&&n=t.data.length&&Xp(o,Ou(t,t.data.length)),s=0===e&&Yp(o,Ou(t,0));t.replaceData(e,n,function(t,e,n){return G(t,(function(r,o){return Jl(o)||Zl(o)?r.previousCharIsSpace||""===r.str&&e||r.str.length===t.length-1&&n?{previousCharIsSpace:!1,str:r.str+_o}:{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-zt(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)?R.some((e=t.previousSibling,Bn(e)?Ou(e,e.data.length):Ou.after(e))):t.previousSibling?jl(t.previousSibling):R.none();var e},sh=function(t){return Wo(t.nextSibling)?R.some((e=t.nextSibling,Bn(e)?Ou(e,0):Ou.before(e))):t.nextSibling?Pl(t.nextSibling):R.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 Ll(t,n).fold((function(){return Il(t,Ou.after(e))}),R.some)}(t,e)}))},ch=function(t,e){return sh(e).orThunk((function(){return ah(e)})).orThunk((function(){return function(t,e){return Il(t,Ou.after(e)).fold((function(){return Ll(t,Ou.before(e))}),R.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(T(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&&_t(t.schema.getBlockElements(),Re(e))},mh=function(t){if(ei(t)){var e=Ae.fromHtml('
    ');return gn(t),pn(t,e),R.some(Ou.before(e.dom))}return R.none()},ph=function(t,e,n){var r,o,i,a,s=Xe(t).filter(ze),u=Ke(t).filter(ze);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()?R.some(a(r.getOrDie(),o.getOrDie(),i.getOrDie())):R.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=Xr(n,T(fh,t),(o=t.getBody(),function(t){return t.dom===o})),s=ph(n,i,function(t,e){return _t(t.schema.getTextInlineElements(),Re(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,R.some(n))}))},gh=function(t){return Ms(t,"td,th")},vh=function(t,e){return{start:t,end:e}},bh=Sr([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),yh=function(t,e){return Qr(Ae.fromDom(t),"td,th",e)},_h=function(t){return!Le(t.start,t.end)},wh=function(t,e){return Rd(t.start,e).bind((function(n){return Rd(t.end,e).bind((function(t){return e=Le(n,t),r=n,e?R.some(r):R.none();var e,r}))}))},Ch=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(_h))return R.none();if(e.isSameTable){var o=t.bind(Ch(r));return R.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 Rd(e,t).bind((function(t){return st(gh(t)).map((function(t){return vh(e,t)}))}))}}(r)).bind(Ch(r)),u=a.bind(function(t){return function(e){return Rd(e,t).bind((function(t){return at(gh(t)).map((function(t){return vh(t,e)}))}))}}(r)).bind(Ch(r));return R.some({start:s,end:u})},xh=function(t,e){return Q(t,(function(t){return Le(t,e)}))},Sh=function(t){return Gn(xh(t.cells,t.rng.start),xh(t.cells,t.rng.end),(function(e,n){return t.cells.slice(e,n+1)}))},Dh=function(t,e,n){return t.exists((function(t){return function(t,e){return!_h(t)&&wh(t,e).exists((function(t){var e=t.dom.rows;return 1===e.length&&1===e[0].cells.length}))}(t,n)&&Fd(t.start,e)}))},Eh=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},Th=function(t,e){var n=function(t){return function(e){return Le(t,e)}}(t),r=function(t,e){var n=yh(t.startContainer,e),r=yh(t.endContainer,e);return Gn(n,r,vh)}(e,n),o=function(t,e){var n=function(t){return Rd(Ae.fromDom(t),e)},r=n(t.startContainer),o=n(t.endContainer),i=r.isSome(),a=o.isSome(),s=Gn(r,o,Le).getOr(!1);return{startTable:r,endTable:o,isStartInTable:i,isEndInTable:a,isSameTable:s,isMultiTable:!s&&i&&a}}(e,n);return Dh(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(Sh).getOr([]),a=o.bind(Sh).getOr([]);if(i.length>0&&a.length>0){var s=Eh(n,e);return R.some(bh.multiTable(i,a,s))}return R.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=Sh(t).getOr([]);if(r&&t.cells.length===o.length)return R.some(bh.fullTable(t.table));if(o.length>0){if(r)return R.some(bh.partialTable(o,R.none()));var i=Eh(n,e);return R.some(bh.partialTable(o,R.some(At(At({},e),{rng:i}))))}return R.none()}))}(r,o,e,n)},Oh=function(t){var e;return(8===Me(e=t)||"#comment"===Re(e)?Xe(t):en(t)).bind(Oh).orThunk((function(){return R.some(t)}))},Ah=function(t){return W(t,(function(t){rr(t,"contenteditable"),Cp(t)}))},Nh=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)),Ph(t,o,e,!1)},$h=function(t){var e=jd(t),n=Ae.fromDom(t.selection.getNode());Yn(n.dom)&&ei(n)?t.selection.setCursorLocation(n.dom,0):t.selection.collapse(!0),e.length>1&&H(e,(function(t){return Le(t,n)}))&&Qn(n,"data-mce-selected","1")},Ih=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 R.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):(Cp(n),t.selection.setCursorLocation(n.dom,0))}))}(t,i,a.filter(ei));var s=i?e[0]:e[e.length-1];return Nh(t,s,r,i),ei(s)?R.none():R.some(i?e.slice(1):e.slice(0,-1))})).getOr(e);return Ah(o),$h(t),!0},Lh=function(t,e,n,r){var o=t.selection.getRng(),i=e[0],a=n[n.length-1];Nh(t,i,o,!0),Nh(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(),$h(t),!0},Ph=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)&&(Cp(a),r&&t.selection.setCursorLocation(a.dom,0)),!Le(n,a)){var s=Kn(Ye(a),n)?[]:Ye(o=a).map(Je).map((function(t){return X(t,(function(t){return!Le(o,t)}))})).getOr([]);W(s.concat(Je(n)),(function(t){Le(t,a)||je(t,a)||!ei(t)||vn(t)}))}return!0},jh=function(t,e){return hh(t,!1,e),!0},Rh=function(t,e,n,r){return Bh(e,r).fold((function(){return function(t,e,n){return Th(e,n).map((function(e){return e.fold(T(Ph,t),T(jh,t),T(Ih,t),T(Lh,t))}))}(t,e,n)}),(function(e){return function(t,e){return Fh(t,e)}(t,e)})).getOr(!1)},Mh=function(t,e){return J(Dp(e,t),bo)},Bh=function(t,e){return J(Dp(e,t),(n="caption",function(t){return Fe(t)&&Re(t)===n}));var n},Fh=function(t,e){return Cp(e),t.selection.setCursorLocation(e.dom,0),R.some(!0)},zh=function(t,e,n,r,o){return Al(n,t.getBody(),o).bind((function(i){return function(t,e,n,r){return Pl(t.dom).bind((function(o){return jl(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 Fh(t,e)}(t,r):function(t,e,n){return Bh(t,Ae.fromDom(n.getNode())).map((function(t){return!1===Le(t,e)}))}(e,r,i)})).or(R.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)?Fh(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===Le(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 Bh(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)?Fh(t,r):zh(t,n,e,r,o)}(t,e,r,n).getOr(!1)}))},Wh=function(t,e){var n=Ae.fromDom(t.selection.getStart(!0)),r=jd(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?Ih(t,n,R.none()):Rh(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)},Yh=function(t){return t.collapsed?t:qh(t)},Xh=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===_o}(e.firstChild)},Kh=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)||Xh(t,e))}(t,r)&&(r=r.prev),!(!n||n!==r)&&("ul"===n.name||"ol"===n.name)},Gh=function(t){return t&&t.firstChild&&t.firstChild===t.lastChild&&function(t){return t.data===_o||Hn(t)}(t.firstChild)},Zh=function(t){return t.length>0&&(!(e=t[t.length-1]).firstChild||Gh(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 Te.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=Zh((o=i.firstChild,X(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),Te.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=Yn,rg=function(t){var e=t.dom,n=Yh(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)&&Fd(Ae.fromDom(n),e)}(e,n,r)?t.getDoc().execCommand("Delete",!1,null):Ph(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=Yp(r,Ou.fromRangeStart(e))?n.replace(/^ /," "):n.replace(/^ /," "),Xp(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&&Kh(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 _=t.getBody();for(9===r.nodeType?r=i=_:i=r;i!==_;)r=i,i=i.parentNode;e=r===_?_.innerHTML:s.getOuterHTML(r),e=l.serialize(u.parse(e.replace(//i,(function(){return l.serialize(v)})))),r===_?s.setHTML(_,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=Zm(r);Te.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(Bn(s)){if(a.setStart(s,s.nodeValue.length),!ke.ie){var u=e.nextSibling;Bn(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(),Te.each(h.getElementsByTagName("*"),(function(t){t.removeAttribute("data-mce-fragment")})),function(t,e){R.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)_t(r,a)&&i.push(r[a]);for(var s in o)_t(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 Im},ug=function(t,e,n){t.dom.setHTML(t.getBody(),e),!0!==n&&function(t){_m(t)&&Pl(t.getBody()).each((function(e){var n=e.getNode(),r=jn(n)?Pl(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),R.from(t.getBody()).fold(S(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:Te.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:Te.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?Gr(Ae.fromDom(n.parentNode),(function(n){return!Le(t,n)&&e(n)})):R.none()}(t,e).isSome()},dg=function(t){return _(t)?t:$},fg=function(t,e,n){var r=e(t),o=dg(n);return r.orThunk((function(){return o(t)?R.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 R.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}),[])},Cg=wo,kg="_mce_caret",xg=function(t){return function(t){for(var e=[];t;){if(3===t.nodeType&&t.nodeValue!==Cg||t.childNodes.length>1)return[];1===t.nodeType&&e.push(t),t=t.firstChild}return e}(t).length>0},Sg=function(t){if(t){var e=new so(t,t);for(t=e.current();t;t=e.next())if(Bn(t))return t}return null},Dg=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(Cg)),e},Eg=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=Sg(t);return e&&e.nodeValue.charAt(0)===Cg&&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)&&Cp(Ae.fromDom(a)),o.setRng(i)}},Tg=function(t,e,n){void 0===n&&(n=!0);var r=t.dom,o=t.selection;if(e)Eg(t,e,n);else if(!(e=Bl(t.getBody(),o.getStart())))for(;e=r.get(kg);)Eg(t,e,!1)},Og=function(t,e){return t.appendChild(e),e},Ag=function(t,e){var n=K(t,(function(t,e){return Og(t,e.cloneNode(!1))}),e);return Og(n,n.ownerDocument.createTextNode(Cg))},Ng=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=Nd(t,l,t.formatter.get(e),!0);p=wf(p),t.formatter.remove(e,n,p,r),u.moveToBookmark(m)}else{var h=Bl(t.getBody(),a),g=Dg(!1).dom;!function(t,e,n){var r=t.dom,o=r.getParent(n,T(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=X(lt(a.get()),(function(t){return t!==r&&!Rt(t,"removeformat")})),c=wg(t,n,u);if(X(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),R.some(l)}return R.none()}(t,g,a,e,n,r),b=Ag(c.concat(v.toArray()),g);Eg(t,h,!1),u.setCursorLocation(b,1),s.isEmpty(a)&&s.remove(a)}},$g=function(t){t.on("mouseup keydown",(function(e){!function(t,e){var n=t.selection,r=t.getBody();Tg(t,null,!1),8!==e&&46!==e||!n.isCollapsed()||n.getStart().innerHTML!==Cg||Tg(t,Bl(r,n.getStart())),37!==e&&39!==e||Tg(t,Bl(r,n.getStart()))}(t,e.keyCode)}))},Ig=function(t,e){var n=t.schema.getTextInlineElements();return _t(n,Re(e))&&!Ml(e.dom)&&!Pn(e.dom)},Lg={},Pg=St,jg=kt;!function(t,e){Lg[t]||(Lg[t]=[]),Lg[t].push(e)}("pre",(function(t){var e,n=t.selection.getRng(),r=$n(["pre"]);n.collapsed||(e=t.selection.getSelectedBlocks(),jg(Pg(Pg(e,r),(function(t){return r(t.previousSibling)&&-1!==Dt(e,t.previousSibling)})),(function(t){var e,n;e=t.previousSibling,cs(n=t).remove(),cs(e).append("

    ").append(n.childNodes)})))}));var Rg=Te.each,Mg=function(t){return Nn(t)&&!Gl(t)&&!Ml(t)&&!Pn(t)},Bg=function(t,e){for(var n=t;n;n=n[e]){if(Bn(n)&&Ht(n.data))return t;if(Nn(n)&&!Gl(n))return n}return t},Fg=function(t,e,n){var r=Zm(t);if(e&&n&&(e=Bg(e,"previousSibling"),n=Bg(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),Te.each(Te.grep(n.childNodes),(function(t){e.appendChild(t)})),e}return n},zg=function(t,e,n,r){if(r&&!1!==e.merge_siblings){var o=Fg(t,nd(r),r);Fg(t,o,nd(o,!0))}},Ug=function(t,e,n){Rg(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=Sr([{keep:[]},{rename:["name"]},{removed:[]}]),qg=/^(src|href|style)$/,Yg=Te.each,Xg=sd,Kg=function(t,e,n){return t.isChildOf(e,n)&&e!==n&&!t.isBlock(n)},Gg=function(t,e,n){var r=e[n?"startContainer":"endContainer"],o=e[n?"startOffset":"endOffset"];if(Nn(r)){var i=r.childNodes.length-1;!n&&o&&o--,r=r.childNodes[o>i?i:o]}return Bn(r)&&n&&o>=r.nodeValue.length&&(r=new so(r,t.getBody()).next()||r),Bn(r)&&!n&&0===o&&(r=new so(r,t.getBody()).prev()||r),r},Zg=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?Ze(i):Ge(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&&Xg(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)&&Kn(yt(t,"mixed"),!0)}(n)&&!Xg(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)||!Xg(e,n.inline))||!(!md(n)||!Xg(e,n.block))||(pd(n)?Nn(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=X(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){Yg(e.styles,(function(t,r){t=ud(a,ad(t,n),r+""),w(r)&&(r=t,o=null),(e.remove_similar||!o||Xg(cd(a,o,r),t))&&a.setStyle(s,r,""),i=!0})),i&&""===a.getAttrib(s,"style")&&(s.removeAttribute("style"),s.removeAttribute("data-mce-style")),Yg(e.attributes,(function(t,r){var i;if(t=ad(t,n),w(r)&&(r=t,o=null),e.remove_similar||!o||Xg(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&&$n(["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)}})),Yg(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)&&(Te.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),zg(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,Nd(t,p,o),!0)}}else m(s,r,!0);else if(a&&hd(i)&&!jd(t).length)!function(t,e,n){var r,o,i=t.selection,a=i.getRng(),s=a.startOffset,u=a.startContainer.nodeValue;(r=Bl(t.getBody(),i.getStart()))&&(o=Sg(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},Iv=function(t,e){return(n=t,r=e[0],Zr(r,"table",T(Le,n))).bind((function(t){var n=e[0],r=e[e.length-1],o=Dv(t);return Tv(o,n,r).map((function(t){return vv([Ev(t)])}))})).getOrThunk(Nv);var n,r},Lv=function(t,e){var n=Pd(e,t);return n.length>0?Iv(t,n):function(t,e){return e.length>0&&e[0].collapsed?Nv():$v(t,e[0])}(t,e)},Pv=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},zv=$t((function(){return document.implementation.createHTMLDocument("undo")})),Uv=function(t){var e,n=(e=t.getBody(),X(V(ut(e.childNodes),Mv),(function(t){return t.length>0}))),r=tt(n,(function(e){var n=Ym(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?Fv(e.fragments,t.getBody()):t.setContent(e.content,{format:"raw",no_selection:!y(r)||!Fl(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",zv());return Xs(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))},Yv=function(t){return 0===t.get()},Xv=function(t,e,n){Yv(n)&&(t.typing=e)},Kv=function(t,e){t.typing&&(Xv(t,!1,e),t.add())},Gv=function(t){return{undoManager:{beforeChange:function(e,n){return function(t,e,n){Yv(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=Te.extend(i,s),!1===Yv(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,Xv(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 _g(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 R.from(t.getBody()).fold(S("tree"===e.format?new Im("body",11):""),(function(r){return Km(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 Rv(t,e,n)}},raw:{getModel:function(){return R.none()}}}},Zv=function(t){return _t(t.plugins,"rtc")},Jv=function(t){var e=t;return function(t){return yt(t.plugins,"rtc").bind((function(t){return R.from(t.setup)}))}(t).fold((function(){return e.rtcInstance=Gv(t),R.none()}),(function(t){return e.rtcInstance=function(){var t=S(null),e=S("");return{undoManager:{beforeChange:C,add:t,undo:t,redo:t,clear:C,reset:C,hasUndo:$,hasRedo:$,transact:t,ignore:C,extra:C},formatter:{match:$,matchAll:S([]),matchNode:S(void 0),canApply:$,closest:e,apply:C,remove:C,toggle:C,formatChanged:S({unbind:C})},editor:{getContent:e,setContent:e,insertContent:C,addVisual:C},selection:{getContent:e},raw:{getModel:S(R.none())}}}(),R.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 R.some(a.getRawModel())}}}}(t),t.rtc.isRemote}))}))}))},Qv=function(t){return t.rtcInstance?t.rtcInstance:Gv(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),R.none()):R.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(ze).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?Ke:Xe)}(e,r).or(e).filter(ze);return t.map((function(t){return function(t,e){Ye(t).each((function(n){var r=t.dom;e&&Yp(n,Ou(r,0))?nh(r,0):!e&&Xp(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=R.from(e.firstChild).map(Ae.fromDom),r=R.from(e.lastChild).map(Ae.fromDom);t.deleteContents(),t.insertNode(e);var o=n.bind(Xe).filter(ze).bind(nb),i=r.bind(Ke).filter(ze).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&&_t(t,e)){var r=X(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)&&je(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={};Te.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}))})),Te.each(r,(function(t,n){s[n]||(delete r[n],Te.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===_m(r)){var d=um(r);if(d.isSome())return d.map((function(t){return Tm(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=Tm(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)):(zd(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 R.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&&(zd(t,o,e,!0),zd(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?Em(r.nextSibling,!0):r.parentNode,o=0===a?Em(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 Sm(r.getBody(),l(),t)},getEnd:function(t){return Dm(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||Sm(a,e,e.collapsed),t.isBlock),r=t.getParent(r||Dm(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(!(Id(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?zf: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=Ni();e.convert_fonts_to_spans&&db(t,n,Te.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 R.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}},N=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;T||(t=t.replace(D," "),function(t,e){return t&&(_t(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=_[g.name];u&&_[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),!T&&k[t]&&(T=!0)}},end:function(n){var r,o,i,a,s=w?e.getElementRule(n):{};if(s){if(b[n]&&!T){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||E.test(o))&&(r.remove(),r=i),r=i;if((r=g.lastChild)&&3===r.type)if((o=r.value.replace(S,"")).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||E.test(o))&&(r.remove(),r=i),r=i}if(T&&k[n]&&(T=!1),s.removeEmpty&&Cb(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===_o}(g)||Cb(e,y,k,g))&&_b(t,u,b,g),g=g.parent}}},e),$=g=new Im(u.context||t.root_name,11);if(N.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 Im("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=R.from(o.firstChild).exists((function(t){return!Co(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:Te.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:Nb(e,t,o,l,s)},addRules:o.addValidElements,setRules:o.setValidElements,addTempAttr:T(Ab,i,n),getTempAttrs:S(n),getNodeFilters:i.getNodeFilters,getAttributeFilters:i.getAttributeFilters}},Ib=function(t,e){var n=$b(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}},Lb=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")},Pb=function(t,e,n){return void 0===n&&(n={}),function(t,e,n){return Qv(t).editor.setContent(e,n)}(t,e,n)},jb=gs.DOM,Rb=function(t){return R.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&&jb.remove(o.nextSibling),function(t){t.fire("remove")}(t),t.editorManager.remove(t),!t.inline&&r&&function(t){jb.setStyle(t.id,"display",t.orgDisplay)}(t),function(t){t.fire("detach")}(t),jb.remove(t.getContainer()),Rb(e),Rb(n),t.destroy()}},Bb=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(),Rb(n),Rb(r)),function(t){var e=t.formElement;e&&(e._mceOldSubmit&&(e.submit=e._mceOldSubmit,e._mceOldSubmit=null),jb.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())},Fb=(ab=function(t,e){return m(t)&&m(e)?Fb(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:S(t),settings:S(e)}}(o.t,o.f)},ty=function(t,e){return _t(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({},Zb),n),e?{menubar:!1}:{})},ry=function(t,e){var n=e.external_plugins?e.external_plugins:{};return t&&t.external_plugins?Te.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")?X(r,T(U,Gb)):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 Te.extend(r,{plugins:u.join(" ")})},ay=function(t,e,n,r,o){var i=t?{mobile:ny(o.mobile||{},e)}:{},a=Qb(["mobile"],Fb(i,o)),s=Te.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 Te.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?Zb:{})}(o,e,n,Yb,t),a=ay(Xb||Kb,Xb,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 R.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[Te.trim(n[0])]=Te.trim(n[1]):e[Te.trim(n[0])]=Te.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(_,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 _t(sb,t)}}),dy=function(t,e){return e.dom[t]},fy=function(t,e){return parseInt(ir(e,t),10)},my=T(dy,"clientWidth"),py=T(dy,"clientHeight"),hy=T(fy,"margin-top"),gy=T(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,R.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 R.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=S(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}},_y=Ds.PluginManager,wy=Ds.ThemeManager;var Cy=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){Te.each(n[t],(function(t){t(e)})),delete n[t]},s=function(r,s){return r=Te.grep(r,(function(e){return!t.isUploaded(e.blobUri())})),to.all(Te.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||R.from(u).orThunk((function(){return R.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===_(e.handler)&&(e.handler=r),{upload:function(t,n){return e.url||e.handler!==r?s(t,n):new to((function(t){t([])}))}}},jy=function(t){return function(){return t.notificationManager.open({text:t.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0})}},Ry=function(t,e){return Py(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||Ly("blobid"),r=t.name||n,o=t.blob;return{id:S(n),name:S(r),filename:S(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:S(o),base64:S(t.base64),blobUri:S(t.blobUri||URL.createObjectURL(o)),uri:S(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=X(t,(function(t){return t.blobUri()!==e||(URL.revokeObjectURL(t.blobUri()),!1)}))},destroy:function(){W(t,(function(t){URL.revokeObjectURL(t.blobUri())})),t=[]}}}(),o=$y(),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=Ry(t,o)),g().then(s((function(o){var i=V(o,(function(t){return t.blobInfo}));return e.upload(i,jy(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),Zv(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,Ss.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&&(Zv(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",I,"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=X(e,(function(e){return"string"!=typeof e||(xy(t,e),!1)})),Zv(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=G(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}}},By=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 Nn(t)&&t.hasAttribute("href")},onformat:function(e,n,r){Te.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 Te.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 _t(e,t)},register:n,unregister:function(t){return t&&e[t]&&delete e[t],e}}},Fy=Te.each,zy=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=zy.create(r.name);return function(t,e){e.classes.length&&zy.addClass(t,e.classes.join(" ")),zy.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!==Te.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=zy.create("div")).appendChild(t),Te.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=zy.create("div")).appendChild(s(n,t.slice(1),r.siblings)),o):""},Hy=function(t){var e,n={classes:[],attrs:{}};return"*"!==(t=n.selector=Te.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!==Te.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(Kn(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"),Te.map(c.split(/(?:>|\s+(?![^\[\]]+\]))/),(function(t){var e=Te.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=zy.select(n,r)[0]||r.firstChild;return Fy(e.styles,(function(t,e){var n=s(t);n&&zy.setStyle(d,e,n)})),Fy(e.attributes,(function(t,e){var n=s(t);n&&zy.setAttrib(d,e,n)})),Fy(e.classes,(function(t){var e=s(t);zy.hasClass(d,e)||zy.addClass(d,e)})),t.fire("PreviewFormats"),zy.setStyles(r,{position:"absolute",left:-65535}),t.getBody().appendChild(r),o=zy.getStyle(t.getBody(),"fontSize",!0),o=/px$/.test(o)?parseInt(o,10):0,Fy(a.split(" "),(function(e){var n=zy.getStyle(d,e,!0);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=zy.getStyle(t.getBody(),e,!0),"#ffffff"===zy.toHex(n).toLowerCase())||"color"===e&&"#000000"===zy.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"),zy.remove(r),i},Wy=function(t){var e=By(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),$g(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:T(Vy,t)}},qy=function(t){switch(t.toLowerCase()){case"undo":case"redo":case"mcerepaint":case"mcefocus":return!0;default:return!1}},Yy=function(t){var e=Es(),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 Zv(t)||function(t,e,n){var r=ws(!1),o=function(t){Xv(e,!1,n),e.add({},t)};t.on("init",(function(){e.add()})),t.on("BeforeExecCommand",(function(t){var r=t.command;qy(r)||(Kv(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(),Xv(e,!0,n),e.add({},t),r.set(!0))}})),t.on("mousedown",(function(t){e.typing&&o(t)})),t.on("input",(function(t){var e;t.inputType&&("insertReplacementText"===t.inputType||"insertText"===(e=t).inputType&&null===e.data||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},Xy=[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]:[]),Ky="data-mce-placeholder",Gy=function(t){return"keydown"===t.type||"keyup"===t.type},Zy=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(Gy(t)){var e=t.keyCode;return!Zy(t)&&(of.metaKeyPressed(t)||t.altKey||e>=112&&e<=123||U(Xy,e))}return!1}(i)){var s=t.getBody(),u=!function(t){return Gy(t)&&!(Zy(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,Ky)!==u||a)&&(e.setAttrib(s,Ky,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]/,t_=function(t,e){return $e(Ae.fromDom(e),function(t){return t.getParam("inline_boundaries_selector","a[href],code,.mce-annotation","string")}(t))},e_=function(t){return"rtl"===gs.DOM.getStyle(t,"direction",!0)||(e=t.textContent,Qy.test(e));var e},n_=function(t,e,n){var r=function(t,e,n){return X(gs.DOM.getParents(n.container(),"*",e),t)}(t,e,n);return R.from(r[r.length-1])},r_=function(t,e){if(!e)return e;var n=e.container(),r=e.offset();return t?Eo(n)?Bn(n.nextSibling)?Ou(n.nextSibling,0):Ou.after(n):Ao(e)?Ou(n,r+1):e:Eo(n)?Bn(n.previousSibling)?Ou(n.previousSibling,n.previousSibling.data.length):Ou.before(n):No(e)?Ou(n,r-1):e},o_=T(r_,!0),i_=T(r_,!1),a_=function(t){return po(t)||go(t)},s_=function(t,e){return je(t,e)?Kr(e,a_,function(t){return function(e){return Le(t,Ae.fromDom(e.dom.parentNode))}}(t)):R.none()},u_=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))},c_=function(t,e){return{from:t,to:e}},l_=function(t,e){var n=Ae.fromDom(t),r=Ae.fromDom(e.container());return s_(n,r).map((function(t){return function(t,e){return{block:t,position:e}}(t,e)}))},d_=function(t,e,n){var r=l_(t,Ou.fromRangeStart(n)),o=r.bind((function(n){return Ol(e,t,n.position).bind((function(n){return l_(t,n).map((function(n){return function(t,e,n){return Hn(n.position.getNode())&&!1===ei(n.block)?$l(!1,n.block.dom).bind((function(r){return r.isEqual(n.position)?Ol(e,t,r).bind((function(e){return l_(t,e)})):R.some(n)})).getOr(n):n}(t,e,n)}))}))}));return Gn(r,o,c_).filter((function(t){return function(t){return!1===Le(t.from.block,t.to.block)}(t)&&function(t){return Ye(t.from.block).bind((function(e){return Ye(t.to.block).filter((function(t){return Le(e,t)}))})).isSome()}(t)&&function(t){return!1===qn(t.from.block.dom)&&!1===qn(t.to.block.dom)}(t)}))},f_=function(t){var e=Je(t);return Q(e,lo).fold(S(e),(function(t){return e.slice(0,t)}))},m_=function(t){var e=f_(t);return W(e,vn),e},p_=function(t,e){var n=Dp(e,t);return J(n.reverse(),(function(t){return ei(t)})).each(vn)},h_=function(t,e,n,r){if(ei(n))return Cp(n),Pl(n.dom);0===X(Ge(r),(function(t){return!ei(t)})).length&&ei(e)&&dn(r,Ae.fromTag("br"));var o=Ll(n.dom,Ou.before(r.dom));return W(m_(e),(function(t){dn(r,t)})),p_(t,e),o},g_=function(t,e,n){if(ei(n))return vn(n),ei(e)&&Cp(e),Pl(e.dom);var r=jl(n.dom);return W(m_(e),(function(t){pn(n,t)})),p_(t,e),r},v_=function(t,e){return je(e,t)?function(t,e){var n=Dp(e,t);return R.from(n[n.length-1])}(e,t):R.none()},b_=function(t,e){$l(t,e.dom).map((function(t){return t.getNode()})).map(Ae.fromDom).filter(mo).each(vn)},y_=function(t,e,n){return b_(!0,e),b_(!1,n),v_(e,n).fold(T(g_,t,e,n),T(h_,t,e,n))},__=function(t,e,n,r){return e?y_(t,r,n):y_(t,n,r)},w_=function(t,e){var n=Ae.fromDom(t.getBody()),r=function(t,e,n){return n.collapsed?d_(t,e,n):R.none()}(n.dom,e,t.selection.getRng()).bind((function(t){return __(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=T(Le,t);return Xr(n,bo,r).isSome()},k_=function(t,e){var n=Ll(t.dom,Ou.fromRangeStart(e)).isNone(),r=Il(t.dom,Ou.fromRangeEnd(e)).isNone();return!function(t,e){return C_(t,e.startContainer)||C_(t,e.endContainer)}(t,e)&&n&&r},x_=function(t){var e=Ae.fromDom(t.getBody()),n=t.selection.getRng();return k_(e,n)?function(t){return t.setContent(""),t.selection.setCursorLocation(),!0}(t):function(t,e){var n=e.getRng();return Gn(s_(t,Ae.fromDom(n.startContainer)),s_(t,Ae.fromDom(n.endContainer)),(function(r,o){return!1===Le(r,o)&&(n.deleteContents(),__(t,!0,r,o).each((function(t){e.setRng(t.toRange())})),!0)})).getOr(!1)}(e,t.selection)},S_=function(t,e){return!t.selection.isCollapsed()&&x_(t)},D_=Wn,E_=qn,T_=function(t,e,n,r,o){return R.from(e._selectionOverrides.showCaret(t,n,r,o))},O_=function(t,e){return t.fire("BeforeObjectSelected",{target:e}).isDefaultPrevented()?R.none():R.some(function(t){var e=t.ownerDocument.createRange();return e.selectNode(t),e}(e))},A_=function(t,e,n){var r=sl(1,t.getBody(),e),o=Ou.fromRangeStart(r),i=o.getNode();if(Fc(i))return T_(1,t,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(Fc(a))return T_(1,t,a,!1,!1);var s=t.dom.getParent(o.getNode(),(function(t){return E_(t)||D_(t)}));return Fc(s)?T_(1,t,s,!1,n):R.none()},N_=function(t,e,n){return e.collapsed?A_(t,e,n).getOr(e):e},$_=function(t){return yp(t)||hp(t)},I_=function(t){return _p(t)||gp(t)},L_=function(t,e,n,r,o,i){return T_(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){Bn(e)&&0===e.data.length&&t.remove(e)}(t.dom,n),!0},P_=function(t,e){return function(t,e){var n=t.selection.getRng();if(!Bn(n.commonAncestorContainer))return!1;var r=e?Au.Forwards:Au.Backwards,o=xl(t.getBody()),i=T(dl,e?o.next:o.prev),a=e?$_:I_,s=cl(r,t.getBody(),n),u=r_(e,i(s));if(!u||!fl(s,u))return!1;if(a(u))return L_(t,n,s.getNode(),r,e,u);var c=i(u);return!!(c&&a(c)&&fl(u,c))&&L_(t,n,s.getNode(),r,e,c)}(t,e)},j_=Sr([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),R_=function(t,e,n,r){var o=r.getNode(!1===e);return s_(Ae.fromDom(t),Ae.fromDom(n.getNode())).map((function(t){return ei(t)?j_.remove(t.dom):j_.moveToElement(o)})).orThunk((function(){return R.some(j_.moveToElement(o))}))},M_=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($,o)}),o)}(t,e,n,r)?R.none():e&&qn(r.getNode())||!1===e&&qn(r.getNode(!0))?R_(t,e,n,r):e&&_p(n)||!1===e&&yp(n)?R.some(j_.moveToPosition(r)):R.none();var o}))},B_=function(t,e,n){return function(t,e){var n=e.getNode(!1===t),r=t?"after":"before";return Nn(n)&&n.getAttribute("data-mce-caret")===r}(e,n)?function(t,e){return t&&qn(e.nextSibling)?R.some(j_.moveToElement(e.nextSibling)):!1===t&&qn(e.previousSibling)?R.some(j_.moveToElement(e.previousSibling)):R.none()}(e,n.getNode(!1===e)).fold((function(){return M_(t,e,n)}),R.some):M_(t,e,n).bind((function(e){return function(t,e,n){return n.fold((function(t){return R.some(j_.remove(t))}),(function(t){return R.some(j_.moveToElement(t))}),(function(n){return tl(e,n,t)?R.none():R.some(j_.moveToPosition(n))}))}(t,n,e)}))},F_=function(t,e){return R.from(Qd(t.getBody(),e))},z_=function(t,e){var n=t.selection.getNode();return F_(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&&_p(o)?R.some(j_.remove(o.getNode(!0))):e&&yp(o)?R.some(j_.remove(o.getNode())):!1===e&&yp(o)&&Mp(i,o)?Bp(i,o).map((function(t){return j_.remove(t.getNode())})):e&&_p(o)&&Rp(i,o)?Fp(i,o).map((function(t){return j_.remove(t.getNode())})):B_(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))}))}),I)},U_=function(t,e){var n=t.selection.getNode();return!(!qn(n)||Yn(n))&&F_(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())),u_(t),!0}),I)},H_=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},V_=function(t,e){return t.selection.isCollapsed()?z_(t,e):U_(t,e)},W_=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 R.from(el(e?0:-1,t))})).exists((function(e){return t.selection.select(e),!0}))}(t,e)},q_=Bn,Y_=function(t){return q_(t)&&t.data[0]===wo},X_=function(t){return q_(t)&&t.data[t.data.length-1]===wo},K_=function(t){return t.ownerDocument.createTextNode(wo)},G_=function(t,e){return t?function(t){if(q_(t.previousSibling))return X_(t.previousSibling)||t.previousSibling.appendData(wo),t.previousSibling;if(q_(t))return Y_(t)||t.insertData(0,wo),t;var e=K_(t);return t.parentNode.insertBefore(e,t),e}(e):function(t){if(q_(t.nextSibling))return Y_(t.nextSibling)||t.nextSibling.insertData(0,wo),t.nextSibling;if(q_(t))return X_(t)||t.appendData(wo),t;var e=K_(t);return t.nextSibling?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.appendChild(e),e}(e)},Z_=T(G_,!0),J_=T(G_,!1),Q_=function(t,e){return Bn(t.container())?G_(e,t.container()):G_(e,t.getNode())},tw=function(t,e){var n=e.get();return n&&t.container()===n&&Eo(n)},ew=function(t,e){return e.fold((function(e){$c(t.get());var n=Z_(e);return t.set(n),R.some(Ou(n,n.length-1))}),(function(e){return Pl(e).map((function(e){if(tw(e,t))return Ou(t.get(),1);$c(t.get());var n=Q_(e,!0);return t.set(n),Ou(n,1)}))}),(function(e){return jl(e).map((function(e){if(tw(e,t))return Ou(t.get(),t.get().length-1);$c(t.get());var n=Q_(e,!1);return t.set(n),Ou(n,n.length-1)}))}),(function(e){$c(t.get());var n=J_(e);return t.set(n),R.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,Yo,e);)if(n(r))return}(t,r,u,l),s},zw=T(Fw,xw.Up,ou,iu),Uw=T(Fw,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,Yw=function(t,e){return Math.abs(t.left-e)},Xw=function(t,e){return Math.abs(t.right-e)},Kw=function(t,e){return t>=e.left&&t<=e.right},Gw=function(t,e){return t>=e.top&&t<=e.bottom},Zw=function(t,e,n){return void 0===n&&(n=I),Et(t,(function(t,r){if(Kw(e,r))return n(r)?r:t;if(Kw(e,t))return n(t)?t:r;var o=Math.min(Yw(t,e),Xw(t,e)),i=Math.min(Yw(r,e),Xw(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=Zw(X(g,Vw(1)),f);if(v)return eC(t,v.position.toRange(),!1);if(v=Ot(X(g,Vw(0))))return eC(t,v.position.toRange(),!1)}return 0===d.length?oC(t,u).filter(u?o:r).map((function(e){return N_(t,e.toRange(),!1)})):R.none()},oC=function(t,e){var n=t.selection.getRng(),r=t.getBody();if(e){var o=Ou.fromRangeEnd(n),i=Iw(r,o);return st(i.positions)}o=Ou.fromRangeStart(n),i=$w(r,o);return at(i.positions)},iC=function(t,e,n){return oC(t,e).filter(n).exists((function(e){return t.selection.setRng(e.toRange()),!0}))},aC=function(t,e){var n=t.dom.createRng();n.setStart(e.container(),e.offset()),n.setEnd(e.container(),e.offset()),t.selection.setRng(n)},sC=function(t,e){t?e.setAttribute("data-mce-selected","inline-boundary"):e.removeAttribute("data-mce-selected")},uC=function(t,e,n){return ew(e,n).map((function(e){return aC(t,e),n}))},cC=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)||No(t)}(n)&&(aC(t,Nc(e.get(),n)),e.set(null))}},lC=function(t,e,n){return!!_c(t)&&function(t,e,n){var r=t.getBody(),o=Ou.fromRangeStart(t.selection.getRng()),i=T(t_,t);return _w(n,i,r,o).bind((function(n){return uC(t,e,n)}))}(t,e,n).isSome()},dC=function(t,e,n){return!!_c(e)&&kw(t,e)},fC=function(t){var e=ws(null),n=T(t_,t);return t.on("NodeChange",(function(r){!_c(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=X(r,t),i=X(n,t);W(rt(o,i),T(sC,!1)),W(rt(i,o),T(sC,!0))}(n,t.dom,r.parents),cC(t,e),function(t,e,n,r){if(e.selection.isCollapsed()){var o=X(r,t);W(o,(function(r){var o=Ou.fromRangeStart(e.selection.getRng());fw(t,e.getBody(),o).bind((function(t){return uC(e,n,t)}))}))}}(n,t,e,r.parents))})),e},mC=T(dC,!0),pC=T(dC,!1),hC=function(t,e,n){if(_c(t)){var r=oC(t,e).getOrThunk((function(){var n=t.selection.getRng();return e?Ou.fromRangeEnd(n):Ou.fromRangeStart(n)}));return fw(T(t_,t),t.getBody(),r).exists((function(e){var r=hw(e);return ew(n,r).exists((function(e){return aC(t,e),!0}))}))}return!1},gC=function(t,e){return function(n){return ew(e,n).exists((function(e){return aC(t,e),!0}))}},vC=function(t,e,n,r){var o=t.getBody(),i=T(t_,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(gC(t,e))})),t.nodeChanged()},bC=function(t,e,n,r){var o=function(t,e){return Qc(e,t)||t}(t.getBody(),r.container()),i=T(t_,t),a=fw(i,o,r);return a.bind((function(t){return n?t.fold(S(R.some(gw(t))),R.none,S(R.some(hw(t))),R.none):t.fold(R.none,S(R.some(hw(t))),R.none,S(R.some(gw(t))))})).map(gC(t,e)).getOrThunk((function(){var s=Al(n,o,r),u=s.bind((function(t){return fw(i,o,t)}));return Gn(a,u,(function(){return n_(i,o,r).exists((function(e){return!!function(t){return Gn(Pl(t),jl(t),(function(e,n){var r=r_(!0,e),o=r_(!1,n);return Il(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?vC(t,e,r,o):vC(t,e,o,r),!0}))}))})).getOr(!1)}))},yC=function(t,e,n){if(t.selection.isCollapsed()&&_c(t)){var r=Ou.fromRangeStart(t.selection.getRng());return bC(t,e,n,r)}return!1},_C=function(t){return 1===nn(t)},wC=function(t,e,n,r){var o=T(Ig,e),i=V(X(r,o),(function(t){return t.dom}));if(0===i.length)hh(e,t,n);else{var a=function(t,e){var n=Dg(!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())}},CC=function(t,e){var n=Ae.fromDom(t.getBody()),r=Ae.fromDom(t.selection.getStart()),o=X(function(t,e){var n=Dp(e,t);return Q(n,lo).fold(S(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 Gn(Pl(n),jl(n),(function(r,o){var i=r_(!0,r),a=r_(!1,o),s=r_(!1,e);return t?Il(n,s).exists((function(t){return t.isEqual(a)&&e.isEqual(i)})):Ll(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)))&&(wC(e,t,n,o),!0)}))},kC=function(t,e){return!!t.selection.isCollapsed()&&CC(t,e)},xC=function(t,e,n){return t._selectionOverrides.hideFakeCaret(),hh(t,e,Ae.fromDom(n)),!0},SC=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)?xC(t,e,o.getNode(!e)):R.from(r_(e,o)).filter((function(t){return n(t)&&fl(o,t)})).exists((function(n){return xC(t,e,n.getNode(!e))}))}(t,e):function(t,e){var n=t.selection.getNode();return!!Xn(n)&&xC(t,e,n)}(t,e)},DC=function(t){var e=parseInt(t,10);return isNaN(e)?0:e},EC=function(t,e){return(t||"table"===Re(e)?"margin":"padding")+("rtl"===ir(e,"direction")?"-right":"-left")},TC=function(t){var e=AC(t);return!t.mode.isReadOnly()&&(e.length>1||function(t,e){return et(e,(function(e){var n=EC(pc(t),e),r=sr(e,n).map(DC).getOr(0);return"false"!==t.dom.getContentEditable(e.dom)&&r>0}))}(t,e))},OC=function(t){return ho(t)||go(t)},AC=function(t){return X((e=t.selection.getSelectedBlocks(),V(e,Ae.fromDom)),(function(t){return!OC(t)&&!function(t){return Ye(t).exists(OC)}(t)&&Kr(t,(function(t){return Wn(t.dom)||qn(t.dom)})).exists((function(t){return Wn(t.dom)}))}));var e},NC=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(AC(t),(function(t){!function(t,e,n,r,o,i){var a=EC(n,Ae.fromDom(i));if("outdent"===e){var s=Math.max(0,DC(i.style[a])-r);t.setStyle(i,a,s?s+o:"")}else s=DC(i.style[a])+r+o,t.setStyle(i,a,s)}(n,e,u,s,a,t.dom)}))},$C=function(t,e){if(t.selection.isCollapsed()&&TC(t)){var n=t.dom,r=t.selection.getRng(),o=Ou.fromRangeStart(r),i=n.getParent(r.startContainer,n.isBlock);if(null!==i&&Np(Ae.fromDom(i),o))return NC(t,"outdent"),!0}return!1},IC=function(t,e){t.getDoc().execCommand(e,!1,null)},LC=function(t,e){t.addCommand("delete",(function(){!function(t,e){$C(t)||V_(t,!1)||P_(t,!1)||yC(t,e,!1)||w_(t,!1)||Wh(t)||W_(t,!1)||SC(t,!1)||S_(t)||kC(t,!1)||(IC(t,"Delete"),u_(t))}(t,e)})),t.addCommand("forwardDelete",(function(){!function(t,e){V_(t,!0)||P_(t,!0)||yC(t,e,!0)||w_(t,!0)||Wh(t)||W_(t,!0)||SC(t,!0)||S_(t)||kC(t,!0)||IC(t,"ForwardDelete")}(t,e)}))},PC=function(t){return void 0===t.touches||1!==t.touches.length?R.none():R.some(t.touches[0])},jC=function(t){var e=Es(),n=ws(!1),r=Os((function(e){t.fire("longpress",At(At({},e),{type:"longpress"})),n.set(!0)}),400);t.on("touchstart",(function(t){PC(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(),PC(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)},RC=function(t,e){return _t(t,e.nodeName)},MC=function(t,e){return!!Bn(e)||!!Nn(e)&&(!RC(t,e)&&!Gl(e))},BC=function(t,e){if(Bn(e)){if(0===e.nodeValue.length)return!0;if(/^\s+$/.test(e.nodeValue)&&(!e.nextSibling||RC(t,e.nextSibling)))return!0}return!1},FC=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&&Nn(u)&&l){var d=c.nodeName.toLowerCase();if(a.isValidChild(d,l.toLowerCase())&&!function(t,e,n){return H(Sp(Ae.fromDom(n),Ae.fromDom(e)),(function(e){return RC(t,e.dom)}))}(s,c,u)){var f=i.getRng(),m=f.startContainer,p=f.startOffset,h=f.endContainer,g=f.endOffset,v=_m(t);for(u=c.firstChild;u;)if(MC(s,u)){if(BC(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())}}},zC=function(t,e){e.hasAttribute("data-mce-caret")&&(Po(e),function(t){t.selection.setRng(t.selection.getRng())}(t),t.selection.scrollIntoView(e))},UC=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 zC(t,n)):void(Oo(n)&&(zC(t,n),t.undoManager.add()))},HC=qn,VC=function(t,e,n){var r=xl(t.getBody()),o=T(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()}}},WC=function(t,e){var n=e?Au.Forwards:Au.Backwards,r=t.selection.getRng();return function(t,e,n){return nC(e,t,n,yp,_p,HC)}(n,t,r).orThunk((function(){return VC(t,n,r),R.none()}))},qC=function(t,e){var n=e?1:-1,r=t.selection.getRng();return function(t,e,n){return rC(e,t,n,(function(t){return yp(t)||vp(t)}),(function(t){return _p(t)||bp(t)}),HC)}(n,t,r).orThunk((function(){return VC(t,n,r),R.none()}))},YC=function(t,e){return WC(t,e).exists((function(e){return tC(t,e),!0}))},XC=function(t,e){return qC(t,e).exists((function(e){return tC(t,e),!0}))},KC=function(t,e){return iC(t,e,e?_p:yp)},GC=function(t){return U(["figcaption"],Re(t))},ZC=function(t){var e=document.createRange();return e.setStartBefore(t.dom),e.setEndBefore(t.dom),e},JC=function(t,e,n){n?pn(t,e):mn(t,e)},QC=function(t,e,n,r){return""===e?function(t,e){var n=Ae.fromTag("br");return JC(t,n,e),ZC(n)}(t,r):function(t,e,n,r){var o=Ae.fromTag(n),i=Ae.fromTag("br");return tr(o,r),pn(o,i),JC(t,o,e),ZC(i)}(t,r,e,n)},tk=function(t,e,n){return e?function(t,e){return Iw(t,e).breakAt.isNone()}(t.dom,n):function(t,e){return $w(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=T(Le,e);return Kr(Ae.fromDom(t.container()),lo,n).filter(GC)}(r,n).exists((function(){if(tk(n,e,r)){var a=QC(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:C},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 Nw(jl(n=t).map((function(t){return $w(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 Nw(Pl(n=t).map((function(t){return[t].concat(Iw(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=T(pk,$w),gk=T(pk,Iw),vk=function(t,e,n,r){var o=t.selection.getRng(),i=e?1:-1;return!(!Bc()||!function(t,e,n){var r=Ou.fromRangeStart(e);return $l(!t,n).exists((function(t){return t.isEqual(r)}))}(e,o,n))&&(T_(i,t,n,!e,!1).each((function(e){tC(t,e)})),!0)},bk=function(t,e){var n=e.getNode(t);return Nn(n)&&"TABLE"===n.nodeName?R.some(n):R.none()},yk=function(t,e,n){var r=bk(!!e,n),o=!1===e;r.fold((function(){return tC(t,n.toRange())}),(function(r){return $l(o,t.getBody()).filter((function(t){return t.isEqual(n)})).fold((function(){return tC(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),tC(e,i)})):tC(e,r.toRange())}(e,t,r,n)}))}))},_k=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(Lw(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(Pw(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 R.from(t.dom.getParent(t.selection.getNode(),"td,th")).bind((function(r){return R.from(t.dom.getParent(r,"table")).map((function(o){return n(t,e,o,r)}))})).getOr(!1)},Ck=function(t,e){return wk(t,e,vk)},kk=function(t,e){return wk(t,e,_k)},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(YC,t,!0)},{keyCode:of.LEFT,action:ok(YC,t,!1)},{keyCode:of.UP,action:ok(XC,t,!1)},{keyCode:of.DOWN,action:ok(XC,t,!0)},{keyCode:of.RIGHT,action:ok(Ck,t,!0)},{keyCode:of.LEFT,action:ok(Ck,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(lC,t,e,!0)},{keyCode:of.LEFT,action:ok(lC,t,e,!1)},{keyCode:of.RIGHT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:ok(mC,t,e)},{keyCode:of.LEFT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:ok(pC,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)}))},Sk=function(t,e){t.on("keydown",(function(n){!1===n.isDefaultPrevented()&&function(t,e,n){ik([{keyCode:of.BACKSPACE,action:ok($C,t,!1)},{keyCode:of.BACKSPACE,action:ok(V_,t,!1)},{keyCode:of.DELETE,action:ok(V_,t,!0)},{keyCode:of.BACKSPACE,action:ok(P_,t,!1)},{keyCode:of.DELETE,action:ok(P_,t,!0)},{keyCode:of.BACKSPACE,action:ok(yC,t,e,!1)},{keyCode:of.DELETE,action:ok(yC,t,e,!0)},{keyCode:of.BACKSPACE,action:ok(Wh,t,!1)},{keyCode:of.DELETE,action:ok(Wh,t,!0)},{keyCode:of.BACKSPACE,action:ok(W_,t,!1)},{keyCode:of.DELETE,action:ok(W_,t,!0)},{keyCode:of.BACKSPACE,action:ok(SC,t,!1)},{keyCode:of.DELETE,action:ok(SC,t,!0)},{keyCode:of.BACKSPACE,action:ok(S_,t,!1)},{keyCode:of.DELETE,action:ok(S_,t,!0)},{keyCode:of.BACKSPACE,action:ok(w_,t,!1)},{keyCode:of.DELETE,action:ok(w_,t,!0)},{keyCode:of.BACKSPACE,action:ok(kC,t,!1)},{keyCode:of.DELETE,action:ok(kC,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(H_,t)},{keyCode:of.DELETE,action:ok(H_,t)}],e)}(t,e)}))},Dk=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(_o),e.firstChild)}var s=o.createRng();if(e.normalize(),e.hasChildNodes()){for(var u=new so(e,e);n=u.current();){if(Bn(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)}},Ek=function(t){return R.from(t.dom.getParent(t.selection.getStart(!0),t.dom.isBlock))},Tk=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},Nk=function(t,e,n){for(var r=t[n?"firstChild":"lastChild"];r&&!Nn(r);)r=r[n?"nextSibling":"previousSibling"];return r===e},$k=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(Nk(n,r,!0)&&Nk(n,r,!1))if(Tk(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(Nk(n,r,!0))Tk(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(Nk(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)}Dk(t,u)}},Ik=function(t,e){return e&&"A"===e.nodeName&&t.isEmpty(e)},Lk=function(t){t.innerHTML='
    '},Pk=function(t,e){return t.nodeName===e||t.previousSibling&&t.previousSibling.nodeName===e},jk=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)},Rk=function(t,e,n){return!1===Bn(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},Bk=function(t,e){var n=nc(t);n&&n.toLowerCase()===e.tagName.toLowerCase()&&function(t,e,n){var r=t.dom;R.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=R.from(n.class).map((function(t){return t.split(/\s+/)})),i=R.from(e.className).map((function(t){return X(t.split(/\s+/),(function(t){return""!==t}))}));Gn(o,i,(function(t,n){var o=X(n,(function(e){return!U(t,e)})),i=Nt(Nt([],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))},Fk=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)||Gl(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 Bk(t,n),Lk(a),n},v=function(t){var e,n,a=Rk(t,r,o);if(Bn(r)&&(t?a>0:ar.childNodes.length-1,r=r.childNodes[Math.min(o,r.childNodes.length-1)]||r,o=d&&Bn(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))||!jk(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),Bk(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),Bk(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 C=u?u.nodeName.toUpperCase():"";"LI"!==C||_||(i=u,u=u.parentNode,c=C),/^(LI|DT|DD)$/.test(c)&&f.isEmpty(i)?$k(t,g,u,i,l):l&&i===t.getBody()||(l=l||"P",Do(i)?(a=Po(i),f.isEmpty(i)&&Lk(i),Bk(t,a),Dk(t,a)):v()?b():v(!0)?(a=i.parentNode.insertBefore(g(),i),Dk(t,Pk(i,"HR")?a:i)):(n=function(t){var e=t.cloneRange();return e.setStart(t.startContainer,Rk(!0,t.startContainer,t.startOffset)),e.setEnd(t.endContainer,Rk(!1,t.endContainer,t.endOffset)),e}(h).cloneRange(),n.setEndAfter(i),function(t){W(Rs(Ae.fromDom(t),ze),(function(t){var e=t.dom;e.nodeValue=ko(e.nodeValue)}))}(s=n.extractContents()),function(t){do{Bn(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;Nn(o)&&!e[o.nodeName.toLowerCase()]&&i.push(o)}for(r=i.length;r--;)(!(o=i[r]).hasChildNodes()||o.firstChild===o.lastChild&&""===o.firstChild.nodeValue||Ik(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)&&Lk(i),a.normalize(),f.isEmpty(a)?(f.remove(a),b()):(Bk(t,a),Dk(t,a))),f.setAttrib(a,"id",""),t.fire("NewBlock",{newBlock:a}))}},zk=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"),$u(i,a,n),zk(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),zk(t,n.dom,!1),t.undoManager.add()},Wk=function(t,e){return n=Ou.after(e),!!Hn(n.getNode())||Il(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},Yk=function(t){return t.fold($,qk,qk,$)},Xk=function(t,e){e.fold(C,T(Hk,t),T(Vk,t),C)},Kk=function(t,e){var n=function(t){var e=T(t_,t),n=Ou.fromRangeStart(t.selection.getRng());return fw(e,t.getBody(),n).filter(Yk)}(t);n.isSome()?n.each(T(Xk,t)):Uk(t,e)},Gk=function(t,e){return Ek(t).filter((function(t){return e.length>0&&$e(Ae.fromDom(t),e)})).isSome()},Zk=Sr([{br:[]},{block:[]},{none:[]}]),Jk=function(t,e){return function(t){return Gk(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 Ek(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 Ek(t).fold(S(""),(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 Gk(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 G(t,(function(t,e){return t&&e(n,r)}),!0)?R.some(e):R.none()}},ux=function(t,e){(function(t,e){return nw([sx([Jk],Zk.none()),sx([ex("summary",!0)],Zk.br()),sx([nx(!0),rx(!1),ix],Zk.br()),sx([nx(!0),rx(!1)],Zk.block()),sx([nx(!0),rx(!0),ix],Zk.block()),sx([nx(!0),rx(!0)],Zk.br()),sx([tx(!0),ix],Zk.br()),sx([tx(!0)],Zk.block()),sx([Qk(!0),ix,ax],Zk.block()),sx([Qk(!0)],Zk.br()),sx([ox],Zk.br()),sx([Qk(!1),ix],Zk.br()),sx([ax],Zk.block())],[t,!(!e||!e.shiftKey)]).getOr(Zk.none())})(t,e).fold((function(){Kk(t,e)}),(function(){Fk(t,e)}),C)},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(KC,t,!0)},{keyCode:of.HOME,action:ok(KC,t,!1)},{keyCode:of.END,action:ok(uk,t,!0)},{keyCode:of.HOME,action:ok(uk,t,!1)},{keyCode:of.END,action:ok(hC,t,!0,e)},{keyCode:of.HOME,action:ok(hC,t,!1,e)}],n).each((function(t){n.preventDefault()}))}(t,e,n)}))},dx=pe().browser,fx=function(t){!function(t){var e=Ts((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(hC,t,!1,e)},{keyCode:of.PAGE_DOWN,action:ok(hC,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 Bn(n)?(n.insertData(r,t),R.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=T(bx,_o),_x=T(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):_x(e)}},Cx=function(t){var e=Ou.fromRangeStart(t.selection.getRng()),n=Ae.fromDom(t.getBody());if(t.selection.isCollapsed()){var r=T(t_,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 Ll(t.dom,Ou.before(e))}),(function(t){return Pl(t)}),(function(t){return jl(t)}),(function(e){return Il(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(Cx,t)}],e).each((function(t){e.preventDefault()}))}(t,e)}))},xx=function(t){var e=fC(t);return function(t){t.on("keyup compositionstart",T(UC,t))}(t),xk(t,e),Sk(t,e),cx(t),kx(t),fx(t),lx(t,e),vx(t,e),e},Sx=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}(),Dx=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)},Ex=function(t){return Nn(t)&&po(Ae.fromDom(t))},Tx=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();Ex(o)&&Pl(o).each((function(t){return e.setStart(t.container(),t.offset())}))}Ou.isElementPosition(r)&&(o=n.container(),Ex(o)&&jl(o).each((function(t){return e.setEnd(t.container(),t.offset())})));t.selection.setRng(Yh(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},Nx=qn,$x=Wn,Ix=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},Lx=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},Px=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=jx(e,t),s=function(t,e){return function(){t.on((function(t){t.dragging&&e.fire("dragend")})),Rx(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()}))},Bx=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;(Nx(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)},Fx=Wn,zx=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 _m(t)})),s="sel-"+r.uniqueId(),u="data-mce-selected",c=function(t){return t!==i&&(zx(t)||Xn(t))&&r.isChildOf(t,i)},l=function(t){return yp(t)||_p(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 To(t)||Io(t)||Lo(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 _t(n,i.nodeName.toLowerCase())?0===a?o.setStartBefore(i):o.setStartAfter(i):o.setStart(i,a),_t(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(_o).append(o).append(_o),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){Le(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(zc(a))return m(n,a,!!e&&!o.isAtEnd(),!1);var s=o.getNode(e);if(zc(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&&zx(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},_=function(){e&&e.removeAttribute(u),Jr(Ae.fromDom(t.getBody()),"#"+s).each(vn),e=null},w=function(){a.hide()};return ke.ceFalse&&!Zv(t)&&function(){t.on("mouseup",(function(e){var n=f();n.collapsed&&vy(t,e.clientX,e.clientY)&&A_(t,n,!1).each(d)})),t.on("click",(function(e){var o=Ux(t,e.target);o&&(zx(o)&&(e.preventDefault(),t.focus()),Fx(o)&&r.isChildOf(o,n.getNode())&&_())})),t.on("blur NewBlock",_),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!==zx(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);zx(r)?(e.preventDefault(),O_(t,r).each(y)):c(n)&&O_(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)zx(a)?(e.preventDefault(),O_(t,a).each(y)):(_(),Fx(a)&&e.shiftKey||tf(e.clientX,e.clientY,n.getRng())||(w(),n.placeCaretAt(e.clientX,e.clientY)));else if(c(o))O_(t,o).each(y);else if(!1===zc(o)){_(),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)||zx(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")||_()})),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))}})),Bx(t),function(t){var e=Ts((function(){if(!t.removed&&t.getBody().contains(document.activeElement)){var e=t.selection.getRng();if(e.collapsed){var n=N_(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(Xn(n)){var r=Qd(t.getBody(),n),o=qn(r)?r:n;t.selection.getNode()!==o&&O_(t,o).each((function(e){return t.selection.setRng(e)}))}}))}))}(t)}(),{showCaret:m,showBlockCaretContainer:function(t){t.hasAttribute("data-mce-caret")&&(Po(t),d(f()),n.scrollIntoView(t))},hideFakeCaret:w,destroy:function(){a.destroy(),e=null}}},Vx=function(t){var e,n,r=Te.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(To(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()}))}}))},_=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})}}))}))},S=function(){t.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")},D=function(){t.inline||t.on("keydown",(function(){document.activeElement===document.body&&t.getWin().focus()}))},E=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()}})))},T=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()}))}))},N=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}))},$=C;return Zv(t)?(d&&(b(),_(),A(),v(),ke.iOS&&(D(),E(),O())),c&&(y(),k(),S(),T())):(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(),_(),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?(D(),E(),O()):v()),ke.ie>=11&&(E(),w()),ke.ie&&(v(),p("AutoUrlDetect",!1),N()),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(),S(),T(),w())),{refreshContentEditable:$,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},Yx=function(t){return vt(t,(function(t){return!1===v(t)}))},Xx=function(t){var e=t.settings,n=t.editorUpload.blobCache;return Yx({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})},Kx=function(t){var e=t.dom.getRoot();t.inline||Ud(t)&&t.selection.getStart(!0)!==e||Pl(e).each((function(e){var n=e.getNode(),r=jn(n)?Pl(n).getOr(e):e;ke.browser.isIE()?function(t,e){var n=Ae.fromDom(t.getBody()),r=(rm(t)?R.from(e):R.none()).map(om).filter(nm(n));t.bookmark=r.isSome()?r:t.bookmark}(t,r.toRange()):t.selection.setRng(r.toRange())}))},Gx=function(t){t.bindPendingEventDelegates(),t.initialized=!0,function(t){t.fire("Init")}(t),t.focus(!0),Kx(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)},Zx=function(t){return t.inline?t.ui.styleSheetLoader:t.dom.styleSheetLoader},Jx=function(t){var e=Zx(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="";Te.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 Zx(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",Ss.isRtl()?"rtl":void 0)}(t);void 0!==o&&(r.dir=o),e.protect&&t.on("BeforeSetContent",(function(t){Te.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}))},tS=function(t){!0!==t.removed&&(!function(t){Zv(t)||t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"})}(t),Gx(t))},eS=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=Tb(Xx(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 Im("br",1)).shortEnded=!0)}})),e}(t),t.serializer=Ib(function(t){var e=t.settings;return At(At({},Xx(t)),Yx({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=Zd(t),t.formatter=Wy(t),t.undoManager=Yy(t),t._nodeChangeDispatcher=new Sx(t),t._selectionOverrides=Hx(t),jC(t),Dx(t),Zv(t)||Tx(t);var a=function(t){return Zv(t)?ws(null):xx(t)}(t);LC(t,a),function(t){nc(t)&&t.on("NodeChange",T(FC,t))}(t),Jy(t);var s=Jv(t);Qx(t),s.fold((function(){Jx(t).then((function(){return tS(t)}))}),(function(e){t.setProgressState(!0),Jx(t).then((function(){e().then((function(e){t.setProgressState(!1),tS(t)}),(function(e){t.notificationManager.open({type:"error",text:String(e)}),tS(t)}))}))}))},nS=gs.DOM,rS=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+='
    '},oS=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}),Ls(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=Ly("mce");t[n]=function(){eS(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 nS.setAttrib(e,"src",r),!0}return!1}(t,s);return t.contentAreaContainer=e.iframeContainer,t.iframeElement=s,t.iframeHTML=rS(t),nS.add(e.iframeContainer,s),u},iS=gs.DOM,aS=function(t,e,n){var r=_y.get(n),o=_y.urls[n]||t.documentBaseUrl.replace(/\/$/,"");if(n=Te.trim(n),r&&-1===Te.inArray(e,n)){if(Te.each(_y.dependencies(n),(function(n){aS(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=Ss.translate(["Failed to initialize plugin: {0}",e]);ef(t,"PluginLoadError",{message:r}),Ty(r,n),xy(t,r)}(t,n,e)}}},sS=function(t){return t.replace(/^\-/,"")},uS=function(t){return{editorContainer:t,iframeContainer:t,api:{}}},cS=function(t){var e=t.getElement();return t.inline?uS(null):function(t){var e=iS.create("div");return iS.insertAfter(e,t),uS(e)}(e)},lS=function(t){var e=t.getElement();return t.orgDisplay=e.style.display,f(bc(t))?function(t){return t.theme.renderUI()}(t):_(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):cS(t)},dS=function(t){t.fire("ScriptsLoaded"),function(t){var e=Te.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){_t(n,r)||t.ui.registry.addIcon(r,e)}))}(t),function(t){var e=bc(t);if(f(e)){t.settings.theme=sS(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=[];Te.each(Cc(t).split(/[ ,]/),(function(n){aS(t,e,sS(n))}))}(t);var e=lS(t);!function(t,e){var n={show:R.from(e.show).getOr(C),hide:R.from(e.hide).getOr(C),disable:R.from(e.disable).getOr(C),isDisabled:R.from(e.isDisabled).getOr($),enable:function(){t.mode.isReadOnly()||R.from(e.enable).map(N)}};t.ui=At(At({},t.ui),n)}(t,R.from(e.api).getOr({}));var n={editorContainer:e.editorContainer,iframeContainer:e.iframeContainer};return t.editorContainer=n.editorContainer?n.editorContainer:null,Ny(t),t.inline?eS(t):function(t,e){var n=oS(t,e);e.editorContainer&&(nS.get(e.editorContainer).style.display=t.orgDisplay,t.hidden=nS.isHidden(e.editorContainer)),t.getElement().style.display="none",nS.setAttrib(t.id,"aria-hidden","true"),n||eS(t)}(t,n)},fS=gs.DOM,mS=function(t){return"-"===t.charAt(0)},pS=function(t,e){var n=mc(e),r=function(t){return t.getParam("language_url","","string")}(e);if(!1===Ss.hasCode(n)&&"en"!==n){var o=""!==r?r:e.editorManager.baseURL+"/langs/"+n+".js";t.add(o,C,void 0,(function(){!function(t,e,n){Sy(t,"LanguageLoadError",Dy("language",e,n))}(e,o,n)}))}},hS=function(t,e,n){return R.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:R.some(e)}}))},gS=function(t,e,n){var r=hS(e,"default",n),o=function(t){return R.from(function(t){return t.getParam("icons_url","","string")}(t)).filter((function(t){return t.length>0})).map((function(t){return{url:t,name:R.none()}}))}(e).orThunk((function(){return hS(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 Te.explode(t.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))}(t),o=function(t){return Te.explode(t.getParam("font_size_classes",""))}(t);return o?o[n-1]||e:r[n-1]||e}return e}return e},OS=function(t){var e=t.split(/\s*,\s*/);return V(e,(function(t){return-1===t.indexOf(" ")||Mt(t,'"')||Mt(t,"'")?t:"'"+t+"'"})).join(",")},AS=function(t,e){var n=function(t){if("string"!=typeof t){var e=Te.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)},NS=Te.each,$S=Te.map,IS=Te.inArray,LS=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(NS(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;NS(t,(function(t,r){NS(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":C,"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"),NS("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=TS(t,e);t.formatter.toggle("fontname",{value:OS(n)}),t.nodeChanged()}(t,r)},FontSize:function(e,n,r){!function(t,e){t.formatter.toggle("fontsize",{value:TS(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){AS(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){NC(t,e)},mceRepaint:C,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 Kk(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=$S(r,(function(n){return!!t.formatter.matchNode(n,e)}));return-1!==IS(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 TC(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 ES(t,(function(e){return xS(t.getBody(),e.dom)})).getOr("")}(t)}),this),e.addQueryValueHandler("FontSize",(function(){return function(t){return ES(t,(function(e){return kS(t.getBody(),e.dom)})).getOr("")}(t)}),this),e.addQueryValueHandler("LineHeight",(function(){return function(t){return ES(t,(function(e){var n=Ae.fromDom(t.getBody()),r=fg(e,(function(t){return sr(t,"line-height")}),T(Le,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}(),PS="data-mce-contenteditable",jS=function(t,e,n){var r,o;js(t,e)&&!1===n?(o=e,Ns(r=t)?r.dom.classList.remove(o):Is(r,o),Ps(r)):n&&Ls(t,e)},RS=function(t,e,n){try{t.getDoc().execCommand(e,!1,String(n))}catch(t){}},MS=function(t,e){t.dom.contentEditable=e?"true":"false"},BS=function(t,e){var n=Ae.fromDom(t.getBody());jS(n,"mce-content-readonly",e),e?(t.selection.controlSelection.hideResizeRect(),t._selectionOverrides.hideFakeCaret(),function(t){R.from(t.selection.getNode()).each((function(t){t.removeAttribute("data-mce-selected")}))}(t),t.readonly=!0,MS(n,!1),W(Ms(n,'*[contenteditable="true"]'),(function(t){Qn(t,PS,"true"),MS(t,!1)}))):(t.readonly=!1,MS(n,!0),function(t){W(Ms(t,'*[data-mce-contenteditable="true"]'),(function(t){rr(t,PS),MS(t,!0)}))}(n),RS(t,"StyleWithCSS",!1),RS(t,"enableInlineTableEditing",!1),RS(t,"enableObjectResizing",!1),wm(t)&&t.focus(),function(t){t.selection.setRng(t.selection.getRng())}(t),t.nodeChanged())},FS=function(t){return t.readonly},zS=function(t){t.parser.addAttributeFilter("contenteditable",(function(e){FS(t)&&W(e,(function(t){t.attr(PS,t.attr("contenteditable")),t.attr("contenteditable","false")}))})),t.serializer.addAttributeFilter(PS,(function(e){FS(t)&&W(e,(function(t){t.attr("contenteditable",t.attr(PS))}))})),t.serializer.addTempAttr(PS)},US=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 Le(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}))}},HS=Te.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"," "),VS=function(){function t(t){this.bindings={},this.settings=t||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||$}return t.isNative=function(t){return!!HS[t.toLowerCase()]},t.prototype.fire=function(t,e){var n=t.toLowerCase(),r=Li(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"),iD);return o[o.length-1]=Te.extend(o[o.length-1],{func:n,scope:r||this.editor}),Te.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}(),sD=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}},uD=gs.DOM,cD=Te.extend,lD=Te.each,dD=Te.resolve,fD=ke.ie,mD=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,cD(this,ZS),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&&(_s.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),gs.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),Ds.languageLoad=this.settings.language_load,Ds.baseURL=n.baseURL,this.id=t,this.setDirty(!1),this.documentBaseURI=new zm(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new aD(this),this.editorCommands=new LS(this),this.settings.cache_suffix&&(ke.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:sD(),styleSheetLoader:void 0,show:C,hide:C,enable:C,disable:C,isDisabled:$};var o=tD(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(){bS(this)},t.prototype.focus=function(t){this.execCommand("mceFocus",!1,t)},t.prototype.hasFocus=function(){return _m(this)},t.prototype.execCallback=function(t){for(var e=[],n=1;n0?wD[0]:null),DD.focusedEditor===t&&(DD.focusedEditor=null),e.length!==wD.length},SD="CSS1Compat"!==document.compatMode,DD=At(At({},qS),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:cs,majorVersion:"5",minorVersion:"10.3",releaseDate:"2022-02-09",editors:_D,i18n:Ss,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var t,e,n=this,r="";e=zm.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&&gD(hD(n),(function(t){var n=pD.get(t);n?e.push(n):gD(document.forms,(function(n){gD(n.elements,(function(n){n.name===t&&(t="mce_editor_"+bD++,pD.setAttrib(n,"id",t),e.push(n))}))}))}));break;case"textareas":case"specific_textareas":gD(pD.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?gD(t.types,(function(n){Te.each(e,(function(e){return!pD.is(e,n.selector)||(l(o(e),vD({},t,n),e),!1)}))})):(Te.each(e,(function(t){var e;(e=n.get(t.id))&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(xD(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null)})),0===(e=Te.grep(e,(function(t){return!n.get(t.id)}))).length?a([]):gD(e,(function(e){!function(t,e){return t.inline&&e.tagName.toLowerCase()in r}(t,e)?l(o(e),t,e):Ty("Could not initialize inline editor on invalid inline target element",e)})))};return n.settings=t,pD.bind(window,"ready",s),new to((function(t){e?t(e):a=function(e){t(e)}}))},get:function(t){return 0===arguments.length?wD.slice(0):f(t)?J(wD,(function(e){return e.id===t})).getOr(null):w(t)&&wD[t]?wD[t]:null},add:function(t){var e=this;return _D[t.id]===t||(null===e.get(t.id)&&("length"!==t.id&&(_D[t.id]=t),_D.push(t),wD.push(t)),kD(!0),e.activeEditor=t,e.fire("AddEditor",{editor:t}),Bw||(Bw=function(t){var n=e.fire("BeforeUnload");if(n.returnValue)return t.preventDefault(),t.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",Bw))),t},createEditor:function(t,e){return this.add(new mD(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:(xD(n)&&r.fire("RemoveEditor",{editor:n}),0===wD.length&&window.removeEventListener("beforeunload",Bw),n.remove(),kD(wD.length>0),n);gD(pD.select(t),(function(t){(n=r.get(t.id))&&r.remove(n)}))}else for(e=wD.length-1;e>=0;e--)r.remove(wD[e])},execCommand:function(t,e,n){var r=this,o=r.get(n);switch(t){case"mceAddEditor":return r.get(n)||new mD(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(){gD(wD,(function(t){t.save()}))},addI18n:function(t,e){Ss.add(t,e)},translate:function(t){return Ss.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 zm(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new zm(this.baseURL)}});DD.setup();var ED,TD,OD,AD,ND=Math.min,$D=Math.max,ID=Math.round,LD=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+=ID(u/2)),"c"===c[1]&&(r+=ID(s/2)),"b"===c[3]&&(o-=a),"r"===c[4]&&(r-=i),"c"===c[3]&&(o-=ID(a/2)),"c"===c[4]&&(r-=ID(i/2)),PD(r,o,i,a)},PD=function(t,e,n,r){return{x:t,y:e,w:n,h:r}},jD={inflate:function(t,e,n){return PD(t.x-e,t.y-n,t.w+2*e,t.h+2*n)},relativePosition:LD,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=$D(t.x,e.x),r=$D(t.y,e.y),o=ND(t.x+t.w,e.x+e.w),i=ND(t.y+t.h,e.y+e.h);return o-n<0||i-r<0?null:PD(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=$D(0,e.x-r),l=$D(0,e.y-o),d=$D(0,i-s),f=$D(0,a-u);return r+=c,o+=l,n&&(i+=c,a+=l,r-=d,o-=f),PD(r,o,(i-=d)-r,(a-=f)-o)},create:PD,fromClientRect:function(t){return PD(t.left,t.top,t.width,t.height)}},RD=(ED={},TD={},{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!==ED[t])return ED[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||"",YD.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&&Te.each(t.requestheaders,(function(t){e.setRequestHeader(t.key,t.value)})),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),(e=YD.fire("beforeSend",{xhr:e,settings:t}).xhr).send(t.data),!t.async)return r();oo.setTimeout(r,10)}}),XD=Te.extend,KD=function(){function t(t){this.settings=XD({},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=XD(this.settings,t);r.success=function(t,o){void 0===(t=WD.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=WD.serialize({id:t.id||"c"+this.count++,method:t.method,params:t.params}),r.content_type="application/json",YD.send(r)},t}();try{var GD="__storage_test__";(zD=window.localStorage).setItem(GD,GD),zD.removeItem(GD)}catch(t){zD=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 ZD={geom:{Rect:jD},util:{Promise:to,Delay:oo,Tools:Te,VK:of,URI:zm,Class:FD,EventDispatcher:VS,Observable:qS,I18n:Ss,XHR:YD,JSON:WD,JSONRequest:KD,JSONP:qD,LocalStorage:zD,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=HD(0,UD(e,1)),i=HD(0,UD(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=VD(255*(n+c)),r=VD(255*(r+c)),o=VD(255*(o+c))}else n=r=o=VD(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=UD(t/=255,UD(e/=255,n/=255)),a=HD(t,HD(e,n));return i===a?{h:0,s:0,v:100*(o=i)}:(r=(a-i)/a,o=a,{h:VD(60*((t===i?3:n===i?1:5)-(t===i?e-n:n===i?t-e:n-t)/(a-i))),s:VD(100*r),v:VD(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=$y(),n=Ry(t,e);return{upload:function(e,r){return void 0===r&&(r=!0),n.upload(e,r?jy(t):void 0)}}}},dom:{EventUtils:Fi,Sizzle:ka,DomQuery:cs,TreeWalker:so,TextSeeker:Qs,DOMUtils:gs,ScriptLoader:_s,RangeUtils:Cf,Serializer:Ib,StyleSheetLoader:io,ControlSelection:sf,BookmarkManager:Jd,Selection:lb,Event:Fi.Event},html:{Styles:Ni,Entities:yi,Node:Im,Schema:Oi,SaxParser:qm,DomParser:Tb,Writer:Qm,Serializer:tp},Env:ke,AddOnManager:Ds,Annotator:Zd,Formatter:Wy,UndoManager:Yy,EditorCommands:LS,WindowManager:Cy,NotificationManager:yy,EditorObservable:ZS,Shortcuts:aD,Editor:mD,FocusManager:cm,EditorManager:DD,DOM:gs.DOM,ScriptLoader:_s.ScriptLoader,PluginManager:_y,ThemeManager:wy,IconManager:ly,Resource:RD,trim:Te.trim,isArray:Te.isArray,is:Te.is,toArray:Te.toArray,makeMap:Te.makeMap,each:Te.each,map:Te.map,grep:Te.grep,inArray:Te.inArray,extend:Te.extend,create:Te.create,walk:Te.walk,createNS:Te.createNS,resolve:Te.resolve,explode:Te.explode,_addCacheSuffix:Te._addCacheSuffix,isOpera:ke.opera,isWebKit:ke.webkit,isIE:ke.ie,isGecko:ke.gecko,isMac:ke.mac},JD=Te.extend(DD,ZD);!function(t){window.tinymce=t,window.tinyMCE=t}(JD),function(e){try{t.exports=e}catch(t){}}(JD)}()},54705:(t,e,n)=>{var r=n(81653),o={autoSetContainer:!1,appendToBody:!0},i={install:function(t){var e="3."===t.version.slice(0,2)?t.config.globalProperties:t.prototype;e.$clipboardConfig=o,e.$copyText=function(t,e){return new Promise((function(n,i){var a=document.createElement("button"),s=new r(a,{text:function(){return t},action:function(){return"copy"},container:"object"==typeof e?e:document.body});s.on("success",(function(t){s.destroy(),n(t)})),s.on("error",(function(t){s.destroy(),i(t)})),o.appendToBody&&document.body.appendChild(a),a.click(),o.appendToBody&&document.body.removeChild(a)}))},t.directive("clipboard",{bind:function(t,e,n){if("success"===e.arg)t._vClipboard_success=e.value;else if("error"===e.arg)t._vClipboard_error=e.value;else{var i=new r(t,{text:function(){return e.value},action:function(){return"cut"===e.arg?"cut":"copy"},container:o.autoSetContainer?t:void 0});i.on("success",(function(e){var n=t._vClipboard_success;n&&n(e)})),i.on("error",(function(e){var n=t._vClipboard_error;n&&n(e)})),t._vClipboard=i}},update:function(t,e){"success"===e.arg?t._vClipboard_success=e.value:"error"===e.arg?t._vClipboard_error=e.value:(t._vClipboard.text=function(){return e.value},t._vClipboard.action=function(){return"cut"===e.arg?"cut":"copy"})},unbind:function(t,e){t._vClipboard&&("success"===e.arg?delete t._vClipboard_success:"error"===e.arg?delete t._vClipboard_error:(t._vClipboard.destroy(),delete t._vClipboard))}})},config:o};t.exports=i},30264:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});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()}};const p=(0,n(51900).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},70631:(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(){if(!this.beforeClose)return this.handleClose();var t=this.beforeClose();t&&t.then?t.then(this.handleClose):this.handleClose()},handleClose: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},2749:(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(t,e){void 0===e._uploadIng&&(e._uploadIng=!0,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(){this.autoBottom&&$A.scrollToView(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},89500:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>f});var r=n(47575),o=n.n(r),i=n(2749),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()},setContent:function(t){null===this.getEditor()?this.content=t:t!=this.getEditor().getContent()&&this.getEditor().setContent(t)},focus:function(){return null===this.getEditor()?"":this.getEditor().focus()},insertImage:function(t){this.insertContent('')},editorImage:function(t){for(var e=0;e|\/>)/gi);if(n)for(var r=0;r').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.spinShow?"":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},73701:(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{loadIng:0,selects:[],list:[],searchKey:null,searchHistory:[],subscribe:null}},mounted:function(){var t=this;this.subscribe=r.Store.subscribe("cacheUserActive",(function(e){var n=t.list.findIndex((function(t){return t.userid==e.userid}));n>-1&&(t.$set(t.list,n,Object.assign({},t.list[n],e)),t.handleSelectData())}))},beforeDestroy:function(){this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},computed:{maxHiddenClass:function(){var t=this.multipleMax,e=this.maxHiddenInput,n=this.selects;return t&&e&&n.length>=t?"hidden-input":""}},watch:{value:{handler:function(){this.valueChange()},immediate:!0},selects:function(t){this.$emit("input",t)}},methods:{searchUser:function(t){var e=this;"string"!=typeof t&&(t=""),this.searchKey=t;var n=this.searchHistory.find((function(e){return e.key==t}));n&&(this.list=n.data),n||this.loadIng++,setTimeout((function(){e.searchKey==t?e.$store.dispatch("call",{url:"users/search",data:{keys:{key:t,project_id:e.projectId,no_project_id:e.noProjectId},take:30}}).then((function(r){var o=r.data;n||e.loadIng--,e.list=o;var i=e.searchHistory.findIndex((function(e){return e.key==t})),a={key:t,data:o,time:$A.Time()};i>-1?e.searchHistory.splice(i,1,a):e.searchHistory.push(a)})).catch((function(t){var r=t.msg;n||e.loadIng--,e.list=[],$A.messageWarning(r)})):n||e.loadIng--}),this.searchHistory.length>0?300:0)},isDisabled:function(t){return 0!==this.disabledChoice.length&&this.disabledChoice.includes(t)},openChange:function(t){t&&this.$nextTick(this.searchUser)},remoteMethod:function(){},valueChange:function(){var t=this;this.selects!=this.value&&($A.isArray(this.value)?this.selects=$A.cloneJSON(this.value):this.value?this.selects=[this.value]:this.selects=[],this.selects.some((function(e){t.list.find((function(t){return t.userid==e}))||(t.list.push({userid:e,nickname:e}),t.$store.dispatch("getUserBasic",{userid:e}))})))},handleSelectData:function(){var t=this;this.__handleSelectTimeout&&clearTimeout(this.__handleSelectTimeout),this.__handleSelectTimeout=setTimeout((function(){if(t.$refs.select){var e=t.$refs.select.getValue();e&&e.some((function(e){var n=t.list.find((function(t){return t.userid==e.value}));n&&(t.$set(e,"label",n.nickname),t.$set(e,"avatar",n.userimg))}))}}),100)}}};const i=(0,n(51900).Z)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:["common-user",t.maxHiddenClass]},[n("Select",{ref:"select",attrs:{transfer:t.transfer,placeholder:t.placeholder,size:t.size,loading:t.loadIng>0,"loading-text":t.$L("加载中..."),"default-label":t.value,"default-event-object":!0,"multiple-max":t.multipleMax,"multiple-uncancelable":t.uncancelable,"remote-method":t.remoteMethod,multiple:"",filterable:"","transfer-class-name":"common-user-transfer"},on:{"on-query-change":t.searchUser,"on-open-change":t.openChange},model:{value:t.selects,callback:function(e){t.selects=e},expression:"selects"}},[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,"key-value":e.email,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.loadIng>0?n("div",{staticClass:"common-user-loading"},[n("Loading")],1):t._e()],1)}),[],!1,null,null,null).exports},84953:(t,e,n)=>{"use strict";n.d(e,{Z:()=>k});var r=n(30264),o=n(86877),i=n(20629);const a={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)}}};var s=n(51900);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;e180||n>180)&&(e>n?(r=180,o=n*(180/e)):(r=e*(180/n),o=180)),{width:r+"px",height:o+"px"}}return{}},withdraw:function(){var t=this;$A.modalConfirm({content:"确定撤回此信息吗?",okText:"撤回",loading:!0,onOk:function(){t.$store.dispatch("call",{url:"dialog/msg/withdraw",data:{msg_id:t.msgData.id}}).then((function(){$A.messageSuccess("消息已撤回"),t.$store.dispatch("forgetDialogMsg",t.msgData.id),t.$Modal.remove()})).catch((function(e){var n=e.msg;$A.messageError(n,301),t.$Modal.remove()}))}})},viewFile:function(){var t=this.msgData,e=t.id,n=t.dialog_id,r=t.msg;if(["jpg","jpeg","gif","png"].includes(r.ext)){var o=$A.cloneJSON(this.dialogMsgs.filter((function(t){return t.dialog_id===n&&"file"===t.type&&["jpg","jpeg","gif","png"].includes(t.msg.ext)}))).sort((function(t,e){return t.id-e.id})),i=o.findIndex((function(t){return t.id===e}));i>-1?(this.$store.state.previewImageIndex=i,this.$store.state.previewImageList=o.map((function(t){return t.msg.path}))):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=[r.path])}else this.$Electron?this.$Electron.sendMessage("windowRouter",{name:"file-msg-"+this.msgData.id,path:"/single/file/msg/"+this.msgData.id,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:"".concat(this.msgData.msg.name," (").concat($A.bytesToSize(this.msgData.msg.size),")"),titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)}}):window.open($A.apiUrl("../single/file/msg/".concat(this.msgData.id)))},downFile:function(){var t=this;$A.modalConfirm({title:"下载文件",content:"".concat(this.msgData.msg.name," (").concat($A.bytesToSize(this.msgData.msg.size),")"),okText:"立即下载",onOk:function(){t.$store.dispatch("downUrl",$A.apiUrl("dialog/msg/download?msg_id=".concat(t.msgData.id)))}})}}};const f=(0,s.Z)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:"dialog-view "+t.msgData.type,attrs:{"data-id":t.msgData.id}},[n("div",{staticClass:"dialog-head"},[n("div",{staticClass:"dialog-content"},["text"===t.msgData.type?n("div",{staticClass:"content-text"},[n("pre",{staticClass:"no-dark-mode"},[t._v(t._s(t.textMsg(t.msgData.msg.text)))])]):"file"===t.msgData.type?n("div",{class:"content-file "+t.msgData.msg.type},[n("div",{staticClass:"dialog-file"},["img"===t.msgData.msg.type?n("img",{staticClass:"file-img",style:t.imageStyle(t.msgData.msg),attrs:{src:t.msgData.msg.thumb},on:{click:t.viewFile}}):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)))])])])])]):"loading"===t.msgData.type?n("div",{staticClass:"content-loading"},[n("Loading")],1):n("div",{staticClass:"content-unknown"},[t._v(t._s(t.$L("未知的消息类型")))])]),t._v(" "),t.showMenu?n("div",{staticClass:"dialog-menu"},[n("div",{staticClass:"menu-icon"},[t.msgData.userid==t.userId?n("Icon",{attrs:{type:"md-undo",title:t.$L("撤回")},on:{click:t.withdraw}}):t._e(),t._v(" "),"file"===t.msgData.type?[n("Icon",{attrs:{type:"md-eye",title:t.$L("查看")},on:{click:t.viewFile}}),t._v(" "),n("Icon",{attrs:{type:"md-arrow-round-down",title:t.$L("下载")},on:{click:t.downFile}})]:t._e()],2)]):t._e()]),t._v(" "),t.msgData.created_at?n("div",{staticClass:"dialog-foot"},[n("div",{staticClass:"time",attrs:{title:t.msgData.created_at}},[t._v(t._s(t.$A.formatTime(t.msgData.created_at)))]),t._v(" "),t.msgData.send>1||"group"==t.dialogType?n("EPopover",{ref:"percent",staticClass:"percent",attrs:{placement:"left-end",width:360,offset:-8},model:{value:t.popperShow,callback:function(e){t.popperShow=e},expression:"popperShow"}},[n("div",{staticClass:"dialog-wrapper-read-poptip-content"},[n("ul",{staticClass:"read overlay-y"},[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 overlay-y"},[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:{slot:"reference",percent:t.msgData.percentage,size:14},slot:"reference"})],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 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$A.Time()){var n=window.__sendDialogMsg,r=n.msgFile,o=n.msgText;window.__sendDialogMsg=null,this.$nextTick((function(){$A.isArray(r)&&r.length>0?e.sendFileMsg(r):o&&e.sendMsg(o)}))}if(t.query&&t.query._){var i=$A.cloneJSON(t.query);delete i._,this.goForward({query:i},!0)}},immediate:!0},dialogId:{handler:function(t){var e=this;t&&(this.msgNew=0,this.topId=-1,this.visible=!1,this.$store.dispatch("getDialogMsgs",t).then((function(t){e.onToBottom(),e.visible=!0})))},immediate:!0},wsOpenNum:function(t){t<=1||this.$store.dispatch("getDialogMsgs",this.dialogId)}},methods:{sendMsg:function(t){var e=this;if("string"==typeof t&&t&&(this.msgText=t,this.$refs.input.focus()),""!=this.msgText){var n=$A.randomString(16);this.tempMsgs.push({id:n,dialog_id:this.dialogData.id,type:"text",userid:this.userId,msg:{text:this.msgText}}),this.isDesktop||this.$refs.input.blur(),this.onToBottom(),this.onActive(),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:this.dialogId,text:this.msgText},method:"post"}).then((function(t){var r=t.data;e.tempMsgs=e.tempMsgs.filter((function(t){return t.id!=n})),e.sendSuccess(r)})).catch((function(t){var r=t.msg;$A.modalError(r),e.tempMsgs=e.tempMsgs.filter((function(t){return t.id!=n}))})),this.msgText=""}},sendFileMsg:function(t){var e=this;t.length>0&&(this.pasteFile=[],this.pasteItem=[],t.some((function(t){var n=new FileReader;n.readAsDataURL(t),n.onload=function(n){var r=n.target;e.pasteFile.push(t),e.pasteItem.push({type:$A.getMiddle(t.type,null,"/"),name:t.name,size:t.size,result:r.result}),e.pasteShow=!0}})))},chatKeydown:function(t){if(13===t.keyCode){if(t.shiftKey)return;t.preventDefault(),this.sendMsg()}},pasteDrag:function(t,e){var n="drag"===e?t.dataTransfer.files:t.clipboardData.files,r=Array.prototype.slice.call(n);r.length>0&&(t.preventDefault(),this.sendFileMsg(r))},chatPasteDrag:function(t,e){this.dialogDrag=!1,this.pasteDrag(t,e)},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)},pasteSend:function(){var t=this;this.pasteFile.some((function(e){t.$refs.chatUpload.upload(e)}))},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.isDesktop||this.$refs.input.blur(),this.onToBottom(),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){var e=this;$A.isArray(t)?t.some((function(t){e.sendSuccess(t)})):(this.$store.dispatch("saveDialogMsg",t),this.$store.dispatch("increaseTaskMsgNum",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}t.scale>=1&&(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")},onToBottom:function(){this.autoBottom=!0,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,$A.scrollToView(document.getElementById("view_"+e),{behavior:"instant",inline:"start"})}))})).catch((function(){}))},addDialogMsg:function(){var t=this;this.isAutoBottom?this.$nextTick(this.onToBottom):this.$nextTick((function(){t.$refs.scroller&&t.$refs.scroller.scrollInfo().scrollE>10&&t.msgNew++}))}}};const k=(0,s.Z)(C,(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-nav",class:{completed:t.$A.dialogCompleted(t.dialogData)}},[n("div",{staticClass:"dialog-avatar"},["group"==t.dialogData.type?["project"==t.dialogData.group_type?n("i",{staticClass:"taskfont icon-avatar project"},[t._v("")]):"task"==t.dialogData.group_type?n("i",{staticClass:"taskfont icon-avatar task"},[t._v("")]):n("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:t.dialogData.dialog_user?n("div",{staticClass:"user-avatar"},[n("UserAvatar",{attrs:{userid:t.dialogData.dialog_user.userid,size:42}})],1):n("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}})],2),t._v(" "),n("div",{staticClass:"dialog-title"},[n("div",{staticClass:"main-title"},[t._l(t.$A.dialogTags(t.dialogData),(function(e){return"success"!=e.color?[n("Tag",{attrs:{color:e.color,fade:!1}},[t._v(t._s(t.$L(e.text)))])]:t._e()})),t._v(" "),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(" "),t.dialogData.top_at?n("label",{staticClass:"top-text"},[t._v(t._s(t.$L("置顶")))]):t._e()],2),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",style:{opacity:t.visible?1:0},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.onToBottom}},[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:2e4,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(),t._v(" "),n("Modal",{attrs:{title:t.$L(t.pasteTitle),"cancel-text":t.$L("取消"),"ok-text":t.$L("发送"),"enter-ok":!0},on:{"on-ok":t.pasteSend},model:{value:t.pasteShow,callback:function(e){t.pasteShow=e},expression:"pasteShow"}},[n("div",{staticClass:"dialog-wrapper-paste"},[t._l(t.pasteItem,(function(e){return["image"==e.type?n("img",{attrs:{src:e.result}}):n("div",[t._v(t._s(t.$L("文件"))+": "+t._s(e.name)+" ("+t._s(t.$A.bytesToSize(e.size))+")")])]}))],2)])],2):t._e()}),[],!1,null,null,null).exports},85782:(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:Math.max($A.runNum(this.listPageSize),10)}}).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 ")),i.push(t("span",{class:"change-value"},"".concat(u||"-")))):i.push(t("span",{class:"change-value"},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=[];if(!$A.isJson(n))return r;if(this.taskId>0&&$A.isJson(n.flow)){var o=$A.getMiddle(n.flow.flow_item_name,"|");o&&r.push({id:e,button:"重置",content:"确定重置为【".concat(o,"】吗?")})}return 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&&t.showLoad?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},19246:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(89500),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},showAddAssist:function(){return!this.addData.owner.includes(this.userId)}}),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){t>0&&$A.setStorage("cacheAddTaskProjectId",t)},"addData.column_id":function(t){var e=this,n=this.addData.project_id;this.$nextTick((function(){n&&t?e.$set(e.addData,"cascader",[n,t]):e.$set(e.addData,"cascader",[])})),t>0&&$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(this.addData,"times",[e[0],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(),owner:[this.userId],times:[]}),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()}))},cascaderChange:function(t){t[1]&&this.$set(this.addData,"column_id",t[1])},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:[],add_assist:1,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-change":t.cascaderChange,"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.isDesktop?"详细描述,选填...(点击右键使用工具栏)":"详细描述,选填..."),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,transfer:!1},model:{value:t.addData.owner,callback:function(e){t.$set(t.addData,"owner",e)},expression:"addData.owner"}}),t._v(" "),t.showAddAssist?n("div",{staticClass:"task-add-assist"},[n("Checkbox",{attrs:{"true-value":1,"false-value":0},model:{value:t.addData.add_assist,callback:function(e){t.$set(t.addData,"add_assist",e)},expression:"addData.add_assist"}},[t._v(t._s(t.$L("加入任务协助人员列表")))]),t._v(" "),n("ETooltip",{attrs:{content:t.$L("你不是任务负责人时建议加入任务协助人员列表")}},[n("Icon",{attrs:{type:"ios-alert-outline"}})],1)],1):t._e()],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,transfer:!1},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},21929:(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,n=this.task,r=function(t){t?e.$store.dispatch("saveTaskCompleteTemp",n.id):e.$store.dispatch("forgetTaskCompleteTemp",n.id)};if($A.isJson(t))t.name&&this.updateTask({color:t.color}).catch((function(){}));else{if($A.leftExists(t,"turn::")){var o=$A.leftDelete(t,"turn::");if(o==this.task.flow_item_id)return;var i=this.taskFlowItems.find((function(t){return t.id==e.flow.flow_item_id}))||{},a=this.taskFlowItems.find((function(t){return t.id==o}))||{},s="end"!==i.status&&"end"===a.status,u="end"===i.status&&"end"!==a.status;return this.updateBefore&&(s?r(!0):u&&r(!1)),void this.updateTask({flow_item_id:o}).then((function(){s?r(!0):u&&r(!1)})).catch((function(){s?r(!1):u&&r(!0)}))}switch(t){case"complete":if(this.task.complete_at)return;this.updateBefore&&r(!0),this.updateTask({complete_at:$A.formatDate("Y-m-d H:i:s")}).then((function(){r(!0)})).catch((function(){r(!1)}));break;case"uncomplete":if(!this.task.complete_at)return;this.updateBefore&&r(!1),this.updateTask({complete_at:!1}).then((function(){r(!1)})).catch((function(){r(!0)}));break;case"archived":case"remove":this.archivedOrRemoveTask(t)}}},visibleChange:function(t){t&&this.$store.dispatch("getTaskFlow",this.task.id).then(this.$refs.dropdownMenu.updatePopper).catch(this.$refs.dropdownMenu.updatePopper)},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="removeTask",r="删除",o={task_id:this.task.id},i=this.task.parent_id>0?"子任务":"任务";"archived"==t&&(n="archivedTask",r="归档",this.task.archived_at&&(r="还原归档",o={task_id:this.task.id,type:"recovery"})),$A.modalConfirm({title:r+i,content:"你确定要"+r+i+"【"+this.task.name+"】吗?",loading:!0,onOk:function(){e.loadIng?e.$Modal.remove():e.$store.dispatch(n,o).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",disabled:t.disabled,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",{ref:"dropdownMenu",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(t.task.archived_at?"还原归档":"归档"))+"\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.r(e),n.d(e,{default:()=>ft});var r=n(20629),o=n(70538),i=n(54705),a=n.n(i),s=n(9980),u=n.n(s),c=n(25199),l=n(19246),d=n(80641),f=n(73701);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;e0?"子任务":"任务"}}),watch:{active:function(t){t||this.$emit("on-close")},mouseEnter:function(){this.chackClose()},onFocus:function(){this.chackClose()}},methods:{getData:function(){return this.parentId>0?{task_id:this.parentId,name:this.addData.name}:(this.addData.project_id=this.projectId||this.$store.state.projectId,this.addData.column_id=this.columnId||"",this.addData.owner=[this.userId],this.addData.top=this.addTop?1:0,$A.cloneJSON(this.addData))},openAdd:function(){var t=this;this.active=!0,this.defaultPriority(),this.$nextTick((function(){t.$refs.input.focus()}))},chackClose:function(){this.mouseEnter||this.onFocus||this.addData.name||(this.active=!1)},onPriority:function(){this.$emit("on-priority",this.getData()),this.active=!1},onKeydown:function(t){if(13===t.keyCode){if(t.shiftKey)return;t.preventDefault(),this.onAdd()}},onAdd:function(){var t=this;if(this.addData.name){this.loadIng++;var e=this.parentId>0?"taskAddSub":"taskAdd";this.$store.dispatch(e,this.getData()).then((function(e){var n=e.msg;$A.messageSuccess(n),t.loadIng--,t.active=!1,t.addData={name:"",owner:0,column_id:0,times:[],subtasks:[],p_level:0,p_name:"",p_color:""}})).catch((function(e){var n=e.msg;$A.modalError(n),t.loadIng--}))}else $A.messageWarning("请输入任务描述")},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=this,n=new Date,r=new Date((new Date).setDate(n.getDate()+$A.runNum(t.days)));this.$set(this.addData,"times",$A.date2string([n,r])),this.$set(this.addData,"p_level",t.priority),this.$set(this.addData,"p_name",t.name),this.$set(this.addData,"p_color",t.color),this.$nextTick((function(){e.$refs.input.focus()}))},defaultPriority:function(){0!==this.taskPriority.length&&(this.addData.p_name||this.choosePriority(this.taskPriority[0]))}}};var v=n(51900);const b=(0,v.Z)(g,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.rowMode?n("Row",{staticClass:"task-add-row"},[n("Col",{class:["row-add",t.active?"active":""],attrs:{span:"12"}},[n("div",{staticClass:"add-input",on:{mouseenter:function(e){t.mouseEnter=!0},mouseleave:function(e){t.mouseEnter=!1}}},[n("Input",{ref:"input",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:3},maxlength:255,placeholder:t.$L(t.typeName+"描述,回车创建")},on:{"on-focus":function(e){t.onFocus=!0},"on-blur":function(e){t.onFocus=!1},"on-keydown":t.onKeydown},model:{value:t.addData.name,callback:function(e){t.$set(t.addData,"name",e)},expression:"addData.name"}}),t._v(" "),0==t.parentId?n("div",{staticClass:"priority"},[n("ul",t._l(t.taskPriority,(function(e,r){return n("li",{key:r},[t.active?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)}}})]):t._e()],1)})),0),t._v(" "),n("Icon",{attrs:{type:"md-settings"},on:{click:t.onPriority}})],1):t._e()],1),t._v(" "),n("div",{staticClass:"add-btn",on:{click:t.openAdd}},[n("Icon",{staticClass:"add-icon",attrs:{type:"md-add"}}),t._v(t._s(t.$L("添加"+t.typeName))+"\n ")],1)]),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}})],1):n("div",{class:["task-add-simple",t.active?"active":""],on:{mouseenter:function(e){t.mouseEnter=!0},mouseleave:function(e){t.mouseEnter=!1}}},[n("Input",{ref:"input",attrs:{type:"textarea",rows:2,autosize:{minRows:2,maxRows:3},maxlength:255,placeholder:t.$L(t.typeName+"描述,回车创建")},on:{"on-focus":function(e){t.onFocus=!0},"on-blur":function(e){t.onFocus=!1},"on-keydown":t.onKeydown},model:{value:t.addData.name,callback:function(e){t.$set(t.addData,"name",e)},expression:"addData.name"}}),t._v(" "),n("div",{staticClass:"add-placeholder",on:{click:t.openAdd}},[n("Icon",{attrs:{type:"md-add"}}),t._v(t._s(t.$L("添加"+t.typeName))+"\n ")],1),t._v(" "),n("div",{staticClass:"priority"},[n("ul",t._l(t.taskPriority,(function(e,r){return n("li",{key:r},[t.active?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)}}})]):t._e()],1)})),0),t._v(" "),n("Icon",{attrs:{type:"md-settings"},on:{click:t.onPriority}})],1)],1)}),[],!1,null,null,null).exports;var y=n(21929);function _(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 w(t){for(var e=1;e0&&!0!==e.sub_top||0===e.parent_id&&t.fastAddTask?n("Icon",{class:["sub-icon",t.taskOpen[e.id]?"active":""],attrs:{type:"ios-arrow-forward"},on:{click:function(n){return t.getSublist(e)}}}):t._e(),t._v(" "),n("TaskMenu",{ref:"taskMenu_"+e.id,refInFor:!0,attrs:{task:e}}),t._v(" "),n("div",{staticClass:"item-title",on:{click:function(n){return t.openTask(e)}}},[e.flow_item_name?n("span",{class:e.flow_item_status,on:{click:function(n){return n.stopPropagation(),t.openMenu(e)}}},[t._v(t._s(e.flow_item_name))]):t._e(),t._v(" "),!0===e.sub_top?n("span",[t._v(t._s(t.$L("子任务")))]):t._e(),t._v(" "),e.sub_my&&e.sub_my.length>0?n("span",[t._v("+"+t._s(e.sub_my.length))]):t._e(),t._v(" "),t._v("\n "+t._s(e.name)+"\n ")]),t._v(" "),n("div",{staticClass:"item-icons",on:{click:function(n){return t.openTask(e)}}},[e.desc?n("div",{staticClass:"item-icon"},[n("i",{staticClass:"taskfont"},[t._v("")])]):t._e(),t._v(" "),e.file_num>0?n("div",{staticClass:"item-icon"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),n("em",[t._v(t._s(e.file_num))])]):t._e(),t._v(" "),e.msg_num>0?n("div",{staticClass:"item-icon"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),n("em",[t._v(t._s(e.msg_num))])]):t._e(),t._v(" "),e.sub_num>0?n("div",{staticClass:"item-icon",on:{click:function(n){return n.stopPropagation(),t.getSublist(e)}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),n("em",[t._v(t._s(e.sub_complete)+"/"+t._s(e.sub_num))])]):t._e()])],1),t._v(" "),n("Col",{staticClass:"row-column",attrs:{span:"3"}},[n("EDropdown",{attrs:{trigger:"click",size:"small",placement:"bottom",disabled:!0===e.sub_top},on:{command:function(n){return t.dropTask(e,n)}}},[n("div",{staticClass:"task-column"},[t._v(t._s(t.columnName(e.column_id)))]),t._v(" "),n("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.columnList(e.project_id),(function(e){return n("EDropdownItem",{key:e.id,attrs:{command:"column::"+e.id}},[t._v("\n "+t._s(e.name)+"\n ")])})),1)],1)],1),t._v(" "),n("Col",{staticClass:"row-priority",attrs:{span:"3"}},[n("EDropdown",{attrs:{trigger:"click",size:"small",placement:"bottom",disabled:!0===e.sub_top},on:{command:function(n){return t.dropTask(e,n)}}},[n("TaskPriority",{attrs:{backgroundColor:e.p_color}},[t._v(t._s(e.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:"priority::"+r}},[n("i",{staticClass:"taskfont",style:{color:e.color},domProps:{innerHTML:t._s(e.p_name==e.name?"":"")}}),t._v("\n "+t._s(e.name)+"\n ")])})),1)],1)],1),t._v(" "),n("Col",{staticClass:"row-user",attrs:{span:"3"}},[n("ul",{on:{click:function(n){return t.openTask(e)}}},[t._l(t.ownerUser(e.task_user),(function(r,o){return o<3?n("li",{key:o},[n("UserAvatar",{attrs:{userid:r.userid,size:"32",borderWitdh:2,borderColor:e.color,showName:1===t.ownerUser(e.task_user).length}})],1):t._e()})),t._v(" "),0===t.ownerUser(e.task_user).length?n("li",{staticClass:"no-owner"},[n("Button",{attrs:{type:"primary",size:"small"},on:{click:function(n){return n.stopPropagation(),t.openTask(e,!0)}}},[t._v(t._s(t.$L("领取任务")))])],1):t._e()],2)]),t._v(" "),n("Col",{staticClass:"row-time",attrs:{span:"3"}},[!e.complete_at&&e.end_at?n("ETooltip",{class:["task-time",e.today?"today":"",e.overdue?"overdue":""],attrs:{"open-delay":600,content:e.end_at}},[n("div",{on:{click:function(n){return t.openTask(e)}}},[t._v(t._s(t.expiresFormat(e.end_at)))])]):t.showCompleteAt&&e.complete_at?n("div",{attrs:{title:e.complete_at}},[t._v(t._s(t.completeAtFormat(e.complete_at)))]):t._e()],1)],1),t._v(" "),!0===t.taskOpen[e.id]?n("TaskRow",{attrs:{list:t.subTask(e.id),"parent-id":e.id,"fast-add-task":0===e.parent_id&&t.fastAddTask,"open-key":t.openKey},on:{command:t.dropTask}}):t._e()],1)})),t._v(" "),t.fastAddTask||t.parentId>0?n("TaskAddSimple",{attrs:{"parent-id":t.parentId,"row-mode":""},on:{"on-priority":t.onPriority}}):t._e()],2)}),[],!1,null,null,null).exports;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 D(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const E={name:"TaskArchived",props:{projectId:{type:Number,default:0}},data:function(){return{loadIng:0,keys:{},columns:[],list:[],page:1,pageSize:20,total:0,noText:""}},mounted:function(){},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.onSearch}},[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:"table-page-box"},[n("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),t._v(" "),n("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowMax768,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])}),[],!1,null,null,null).exports;var O=n(85782),A=n(70631);function N(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,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const L={name:"ProjectWorkflow",components:{UserInput:f.Z,Draggable:u()},props:{projectId:{type:Number,default:0}},data:function(){return{loadIng:0,list:[],openIndex:"",userShow:!1,userData:{}}},mounted:function(){},computed:function(t){for(var e=1;e0)e.loadIng++,e.$store.dispatch("call",{url:"project/flow/delete",data:{project_id:e.projectId}}).then((function(n){var r=n.msg;e.loadIng--,$.messageSuccess(r),e.$Modal.remove();var o=e.list.findIndex((function(e){return e.id==t.id}));o>-1&&e.list.splice(o,1)})).catch((function(t){var n=t.msg;e.loadIng--,$A.modalError(n,301),e.$Modal.remove()}));else{var n=e.list.findIndex((function(e){return e.id==t.id}));n>-1&&e.list.splice(n,1),e.$Modal.remove()}}})},onMore:function(t,e){switch(t){case"user":this.$set(this.userData,"id",e.id),this.$set(this.userData,"name",e.name),this.$set(this.userData,"userids",e.userids),this.$set(this.userData,"usertype",e.usertype),this.$set(this.userData,"userlimit",e.userlimit),this.userShow=!0;break;case"name":this.onName(e);break;case"remove":this.onRemove(e)}},onUser:function(){var t=this;this.userShow=!1,this.list.some((function(e){var n=e.project_flow_item.find((function(e){return e.id==t.userData.id}));n&&(t.$set(n,"userids",t.userData.userids),t.$set(n,"usertype",t.userData.usertype),t.$set(n,"userlimit",t.userData.userlimit))}))},onName:function(t){var e=this;$A.modalInput({value:t.name,title:"修改名称",placeholder:"输入流程名称",onOk:function(n){return n&&e.$set(t,"name",n),!0}})},onRemove:function(t){this.list.some((function(e){var n=e.project_flow_item.findIndex((function(e){return e.id==t.id}));n>-1&&e.project_flow_item.splice(n,1)}))},onTurns:function(t){this.$set(t,"turns",t.turns.sort())},onAdd:function(t){$A.modalInput({title:"添加状态",placeholder:"输入状态名称",onOk:function(e){if(e){var n=-1*$A.randNum(1e5,999999),r=t.project_flow_item.map((function(t){return t.id}));t.project_flow_item.push({id:n,name:e,status:"end",turns:r,userids:[],usertype:"add",userlimit:0}),t.project_flow_item.some((function(t){t.turns.push(n)}))}return!0}})},onReduction:function(t){this.$set(t,"project_flow_item",JSON.parse(t.project_flow_bak))},onSave:function(t){var e=this,n=0;t.project_flow_item.some((function(t){t.sort=n++})),this.loadIng++,this.$store.dispatch("call",{url:"project/flow/save",data:{project_id:this.projectId,flows:t.project_flow_item},method:"post"}).then((function(n){var r=n.data,o=n.msg;e.loadIng--,$.messageSuccess(o),r.project_flow_bak=JSON.stringify(r.project_flow_item);var i=e.list.findIndex((function(e){return e.id==t.id}));i>-1?e.list.splice(i,1,r):e.list.push(r),e.openIndex="index_"+r.id,e.$nextTick(e.syncScroller)})).catch((function(t){var n=t.msg;e.loadIng--,$A.modalError(n)}))},saveAll:function(){var t=this;this.list.some((function(e){t.contrast(e.project_flow_item,e.project_flow_bak)&&t.onSave(e)}))}}};const P=(0,v.Z)(L,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"project-workflow"},[n("div",{staticClass:"workflow-title"},[t._v("\n "+t._s(t.$L("工作流设置"))+"\n "),n("div",{staticClass:"title-icon"},[t.loadIng>0?n("Loading"):n("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getData}})],1)]),t._v(" "),t.list.length>0?n("div",{staticClass:"workflow-content"},[n("Collapse",{attrs:{accordion:""},model:{value:t.openIndex,callback:function(e){t.openIndex=e},expression:"openIndex"}},t._l(t.list,(function(e){return n("Panel",{key:e.id,attrs:{name:"index_"+e.id}},[n("div",{staticClass:"workflow-item"},[n("div",{staticClass:"workflow-name"},[t._v(t._s(e.name))]),t._v(" "),n("div",{staticClass:"workflow-status"},t._l(e.project_flow_item,(function(e){return n("div",{class:e.status},[t._v(t._s(e.name))])})),0),t._v(" "),n("div",{staticClass:"workflow-save",on:{click:function(t){t.stopPropagation()}}},[t.contrast(e.project_flow_item,e.project_flow_bak)?[n("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:function(n){return t.onSave(e)}}},[t._v(t._s(t.$L("保存")))]),t._v(" "),e.id>0?n("Button",{attrs:{disabled:t.loadIng>0,type:"primary",ghost:""},on:{click:function(n){return t.onReduction(e,n)}}},[t._v(t._s(t.$L("还原")))]):t._e()]:t._e(),t._v(" "),n("Button",{attrs:{disabled:t.loadIng>0,type:"error",ghost:""},on:{click:function(n){return t.onDelete(e)}}},[t._v(t._s(t.$L("删除")))])],2)]),t._v(" "),n("div",{staticClass:"taskflow-config",attrs:{slot:"content"},slot:"content"},[n("div",{staticClass:"taskflow-config-table"},[n("div",{staticClass:"taskflow-config-table-left-container"},[n("div",{staticClass:"taskflow-config-table-column-header left-header"},[t._v(t._s(t.$L("配置项")))]),t._v(" "),n("div",{ref:"overlay_"+e.id,refInFor:!0,staticClass:"taskflow-config-table-column-body overlay-y"},[n("div",{staticClass:"taskflow-config-table-block"},[n("div",{staticClass:"taskflow-config-table-block-title"},[t._v(t._s(t.$L("设置状态为")))]),t._v(" "),n("div",{staticClass:"taskflow-config-table-block-item"},[n("div",[n("div",{staticClass:"title"},[t._v(t._s(t.$L("开始状态")))]),t._v(" "),n("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("新建任务默认状态")))])])]),t._v(" "),n("div",{staticClass:"taskflow-config-table-block-item"},[n("div",[n("div",{staticClass:"title"},[t._v(t._s(t.$L("进行中")))]),t._v(" "),n("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("可设置多个状态为进行中")))])])]),t._v(" "),n("div",{staticClass:"taskflow-config-table-block-item"},[n("div",[n("div",{staticClass:"title"},[t._v(t._s(t.$L("验收/测试")))]),t._v(" "),n("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("只能设置单个状态为验收/测试")))])])]),t._v(" "),n("div",{staticClass:"taskflow-config-table-block-item"},[n("div",[n("div",{staticClass:"title"},[t._v(t._s(t.$L("结束状态")))]),t._v(" "),n("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("该状态下任务自动标记完成")))])])])]),t._v(" "),n("div",{staticClass:"taskflow-config-table-block hr"},[n("div",{staticClass:"taskflow-config-table-block-title"},[t._v(t._s(t.$L("可流转到")))]),t._v(" "),t._l(e.project_flow_item,(function(e){return n("div",{staticClass:"taskflow-config-table-block-item"},[n("span",{staticClass:"transform-status-name"},[t._v(t._s(e.name))])])}))],2)])]),t._v(" "),n("div",{staticClass:"taskflow-config-table-right-container"},[n("Draggable",{staticClass:"taskflow-config-table-list-wrapper",attrs:{list:e.project_flow_item,animation:150,disabled:!t.isDesktop,tag:"div",draggable:".column-border"},on:{sort:function(t){}}},[t._l(e.project_flow_item,(function(r){return n("div",{staticClass:"taskflow-config-table-status-column column-border",class:r.status},[n("div",{staticClass:"taskflow-config-table-status-item taskflow-config-table-column-header"},[n("div",{staticClass:"status-label-with-menu",class:r.status},[n("div",{staticClass:"name"},[t._v(t._s(t.$L(r.name)))]),t._v(" "),n("EDropdown",{staticClass:"more",class:{opacity:r.userids.length>0},attrs:{trigger:"click"},on:{command:function(e){return t.onMore(e,r)}}},[n("div",{staticClass:"more-icon"},[r.userids.length>1?n("EAvatar",{attrs:{size:20}},[t._v(t._s(r.userids.length))]):r.userids.length>0?n("UserAvatar",{attrs:{userid:r.userids[0],size:20,tooltipDisabled:""}}):n("Icon",{attrs:{type:"ios-more"}})],1),t._v(" "),n("EDropdownMenu",{staticClass:"taskflow-config-more-dropdown-menu",attrs:{slot:"dropdown"},slot:"dropdown"},[r.userids.length>0?n("EDropdownItem",{attrs:{command:"user"}},[n("div",{staticClass:"users"},t._l(r.userids,(function(t,e){return n("UserAvatar",{key:e,attrs:{userid:t,size:28,borderWitdh:1,showName:1===r.userids.length,tooltipDisabled:""}})})),1)]):t._e(),t._v(" "),n("EDropdownItem",{attrs:{command:"user"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-person"}}),t._v("\n "+t._s(t.$L("状态负责人"))+"\n ")],1)]),t._v(" "),n("EDropdownItem",{attrs:{command:"name"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-create"}}),t._v(t._s(t.$L("修改名称"))+"\n ")],1)]),t._v(" "),n("EDropdownItem",{attrs:{command:"remove"}},[n("div",{staticClass:"item delete"},[n("Icon",{attrs:{type:"md-trash"}}),t._v(t._s(t.$L("删除"))+"\n ")],1)])],1)],1)],1)]),t._v(" "),n("div",{ref:"overlay_"+e.id,refInFor:!0,staticClass:"taskflow-config-table-column-body overlay-y"},[n("div",{staticClass:"taskflow-config-table-block"},[n("div",{staticClass:"taskflow-config-table-block-title"}),t._v(" "),n("RadioGroup",{model:{value:r.status,callback:function(e){t.$set(r,"status",e)},expression:"item.status"}},[n("Radio",{attrs:{label:"start"}},[n("span")]),t._v(" "),n("Radio",{attrs:{label:"progress"}},[n("span")]),t._v(" "),n("Radio",{attrs:{label:"test"}},[n("span")]),t._v(" "),n("Radio",{attrs:{label:"end"}},[n("span")])],1)],1),t._v(" "),n("div",{staticClass:"taskflow-config-table-block"},[n("div",{staticClass:"taskflow-config-table-block-title"}),t._v(" "),n("CheckboxGroup",{on:{"on-change":function(e){return t.onTurns(r)}},model:{value:r.turns,callback:function(e){t.$set(r,"turns",e)},expression:"item.turns"}},t._l(e.project_flow_item,(function(t){return n("Checkbox",{key:t.id,attrs:{label:t.id,disabled:t.id==r.id}},[n("span")])})),1)],1)])])})),t._v(" "),n("div",{staticClass:"taskflow-config-table-status-column addnew",on:{click:function(n){return t.onAdd(e)}}},[t._v(t._s(t.$L("添加状态")))])],2)],1)])])])})),1)],1):0==t.loadIng?n("div",{staticClass:"workflow-no"},[t._v("\n "+t._s(t.$L("当前项目还没有创建工作流"))+"\n "),n("Button",{attrs:{type:"primary"},on:{click:t.onCreate}},[t._v(t._s(t.$L("创建工作流")))])],1):t._e(),t._v(" "),n("Modal",{attrs:{title:t.$L("状态负责人")+" ("+t.userData.name+")","mask-closable":!1},model:{value:t.userShow,callback:function(e){t.userShow=e},expression:"userShow"}},[n("Form",{attrs:{model:t.userData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{prop:"userids",label:t.$L("状态负责人")}},[n("UserInput",{attrs:{"project-id":t.projectId,"multiple-max":5,placeholder:t.$L("选择状态负责人")},model:{value:t.userData.userids,callback:function(e){t.$set(t.userData,"userids",e)},expression:"userData.userids"}})],1),t._v(" "),n("FormItem",{attrs:{prop:"usertype",label:t.$L("流转模式")}},[n("RadioGroup",{model:{value:t.userData.usertype,callback:function(e){t.$set(t.userData,"usertype",e)},expression:"userData.usertype"}},[n("Radio",{attrs:{label:"add"}},[t._v(t._s(t.$L("添加模式")))]),t._v(" "),n("Radio",{attrs:{label:"replace"}},[t._v(t._s(t.$L("流转模式")))]),t._v(" "),n("Radio",{attrs:{label:"merge"}},[t._v(t._s(t.$L("剔除模式")))])],1),t._v(" "),"replace"==t.userData.usertype?n("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("流转到此状态时改变任务负责人为状态负责人,原本的任务负责人移至协助人员。")))]):"merge"==t.userData.usertype?n("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("流转到此状态时改变任务负责人为状态负责人(并保留操作状态的人员),原本的任务负责人移至协助人员。")))]):n("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("流转到此状态时添加状态负责人至任务负责人。")))])],1),t._v(" "),n("FormItem",{attrs:{prop:"userlimit",label:t.$L("限制负责人")}},[n("iSwitch",{attrs:{"true-value":1,"false-value":0},model:{value:t.userData.userlimit,callback:function(e){t.$set(t.userData,"userlimit",e)},expression:"userData.userlimit"}}),t._v(" "),1===t.userData.userlimit?n("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("在此状态的任务状态负责人、项目管理员可以修改状态。")))]):n("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("在此状态的任务任务负责人、项目管理员可以修改状态。")))])],1)],1),t._v(" "),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(e){t.userShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{type:"primary"},on:{click:t.onUser}},[t._v(t._s(t.$L("保存")))])],1)],1)],1)}),[],!1,null,null,null).exports;function j(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 R(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const M={name:"TaskDeleted",props:{projectId:{type:Number,default:0}},data:function(){return{loadIng:0,keys:{},columns:[],list:[],page:1,pageSize:20,total:0,noText:""}},mounted:function(){},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.onSearch}},[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:"table-page-box"},[n("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),t._v(" "),n("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowMax768,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])}),[],!1,null,null,null).exports;function F(t){return F="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},F(t)}const z={name:"GanttView",props:{lists:{type:Array},menuWidth:{type:Number,default:300},itemWidth:{type:Number,default:100}},data:function(){return{mouseType:"",mouseWidth:0,mouseScaleWidth:0,dateWidth:100,ganttWidth:0,mouseItem:null,mouseBak:{},dateMove:null}},mounted:function(){this.dateWidth=this.itemWidth,this.$refs.ganttRight.addEventListener("mousewheel",this.handleScroll,!1),document.addEventListener("mousemove",this.itemMouseMove),document.addEventListener("mouseup",this.itemMouseUp),window.addEventListener("resize",this.handleResize,!1),this.handleResize()},beforeDestroy:function(){this.$refs.ganttRight.removeEventListener("mousewheel",this.handleScroll,!1),document.removeEventListener("mousemove",this.itemMouseMove),document.removeEventListener("mouseup",this.itemMouseUp),window.removeEventListener("resize",this.handleResize,!1)},watch:{itemWidth:function(t){this.dateWidth=t}},computed:{monthNum:function(){var t=this.ganttWidth,e=this.dateWidth;return Math.floor(t/e/30)+2},monthStyle:function(){var t=this.mouseWidth,e=this.dateWidth;return function(n){var r=0==t?0:t/e,o=new Date,i=new Date(o.getFullYear(),o.getMonth(),o.getDate(),0,0,0),a=new Date(i.getTime()+864e5*r),s=new Date(a.getFullYear(),a.getMonth()+1,0,23,59,59),u=e*((s-a)/1e3/60/60/24);return n>0&&(u=(s=new Date(a.getFullYear(),a.getMonth()+1+n,0)).getDate()*e),{width:u+"px"}}},monthFormat:function(){var t=this.mouseWidth,e=this.dateWidth;return function(n){var r=0==t?0:t/e,o=new Date,i=new Date(o.getFullYear(),o.getMonth(),o.getDate(),0,0,0),a=new Date(i.getTime()+864e5*r);return n>0&&(a=new Date(a.getFullYear(),a.getMonth()+1+n,0)),$A.formatDate("Y-m",a)}},dateNum:function(){var t=this.ganttWidth,e=this.dateWidth;return Math.floor(t/e)+2},dateStyle:function(){var t=this.mouseWidth,e=this.dateWidth;return function(n){var r={},o=0==t?0:t/e,i=Math.floor(o)+n;o==Math.floor(o)&&i--;var a=0==t?n-1:i,s=new Date((new Date).getTime()+864e5*a);-1!==[0,6].indexOf(s.getDay())&&(r.backgroundColor="#f9fafb");var u=e;return 0==n&&(u=Math.abs((t%u-u)%u)),r.width=u+"px",r}},dateFormat:function(){var t=this.mouseWidth,e=this.dateWidth;return function(n,r){var o=0==t?0:t/e,i=Math.floor(o)+n;o==Math.floor(o)&&i--;var a=0==t?n-1:i,s=new Date((new Date).getTime()+864e5*a);return"day"==r?s.getDate():"week"==r?this.$L("星期".concat("日一二三四五六".charAt(s.getDay()))):s}},itemStyle:function(){var t=this.mouseWidth,e=this.dateWidth,n=this.ganttWidth;return function(r){var o=r.time,i=o.start,a=o.end,s=r.style,u=r.moveX,c=r.moveW,l=new Date,d=new Date(l.getFullYear(),l.getMonth(),l.getDate(),0,0,0).getTime(),f=(i-d)/1e3/60/60/24,m=e*f+-1*t,p=e*((a-d)/1e3/60/60/24-f);"number"==typeof u&&(m+=u),"number"==typeof c&&(p+=c);var h={left:Math.min(Math.max(m,-1.2*p),1.2*n).toFixed(2)+"px",width:p.toFixed(2)+"px"};return m<0&&Math.abs(m)n&&me.scrollHeight-e.clientHeight&&(n=e.scrollHeight-e.clientHeight),e.scrollTop!=n&&(this.mouseType="timeline",e.scrollTop=n)}0!=t.deltaX&&(this.mouseWidth+=t.deltaX,this.mouseScaleWidth+=t.deltaX*(100/this.dateWidth))},handleResize:function(){this.ganttWidth=this.$refs.ganttTimeline.clientWidth},dateMouseDown:function(t){t.preventDefault(),this.mouseItem=null,this.dateMove={clientX:t.clientX}},itemMouseDown:function(t,e){t.preventDefault();var n="moveX";"timeline-resizer"==t.target.className&&(n="moveW"),"number"!=typeof e[n]&&this.$set(e,n,0),this.mouseBak={type:n,clientX:t.clientX,value:e[n]},this.mouseItem=e,this.dateMove=null},itemMouseMove:function(t){if(null!=this.mouseItem){t.preventDefault();var e=this.mouseBak.value+(t.clientX-this.mouseBak.clientX);if("moveW"===this.mouseBak.type){var n=864e5/this.dateWidth,r=this.mouseItem.time,o=r.start;if(r.end+e*n-o<=0)return}this.$set(this.mouseItem,this.mouseBak.type,e)}else if(null!=this.dateMove){t.preventDefault();var i=5*(this.dateMove.clientX-t.clientX);this.dateMove.clientX=t.clientX,this.mouseWidth+=i,this.mouseScaleWidth+=i*(100/this.dateWidth)}},itemMouseUp:function(t){if(null!=this.mouseItem){var e=this.mouseItem.time,n=e.start,r=e.end,o=!1,i=864e5/this.dateWidth;if("number"==typeof this.mouseItem.moveX&&0!=this.mouseItem.moveX){var a=this.mouseItem.moveX*i;this.$set(this.mouseItem.time,"start",n+a),this.$set(this.mouseItem.time,"end",r+a),this.$set(this.mouseItem,"moveX",0),o=!0}if("number"==typeof this.mouseItem.moveW&&0!=this.mouseItem.moveW){var s=this.mouseItem.moveW*i;this.$set(this.mouseItem.time,"end",r+s),this.$set(this.mouseItem,"moveW",0),o=!0}o?this.$emit("on-change",this.mouseItem):"timeline-title"==t.target.className&&this.clickItem(this.mouseItem),this.mouseItem=null}else null!=this.dateMove&&(this.dateMove=null)},scrollPosition:function(t){var e=new Date,n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),r=864e5/this.dateWidth,o=(this.lists[t].time.start-n)/r-this.dateWidth-this.mouseWidth;this.mouseWidth+=o,this.mouseScaleWidth+=o*(100/this.dateWidth)},clickItem:function(t){this.$emit("on-click",t)}}};var U=n(93379),H=n.n(U),V=n(79514),W={insert:"head",singleton:!1};H()(V.Z,W);V.Z.locals;function q(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 Y(t){for(var e=1;e46?n("div",{staticClass:"format-week"},[t._v(t._s(t.dateFormat(r,"week")))]):t._e()])])})),0),t._v(" "),n("ul",{ref:"ganttTimeline",staticClass:"gantt-timeline",on:{scroll:t.timelineScrollListener,mouseenter:function(e){t.mouseType="timeline"}}},t._l(t.lists,(function(e,r){return n("li",{key:r},[n("div",{staticClass:"timeline-item",style:t.itemStyle(e),on:{mousedown:function(n){return t.itemMouseDown(n,e)}}},[n("div",{staticClass:"timeline-title",attrs:{title:e.label}},[t._v(t._s(e.label))]),t._v(" "),n("div",{staticClass:"timeline-resizer"})])])})),0)])])])}),[],!1,null,"53625f84",null).exports},props:{projectColumn:{default:[]},flowInfo:{default:{}}},data:function(){return{lists:[],filtrProjectId:0,editColumns:[{title:this.$L("任务名称"),key:"label",minWidth:150,ellipsis:!0},{title:this.$L("原计划时间"),minWidth:135,align:"center",render:function(t,e){var n=e.row;return!0===n.notime?t("span","-"):t("div",{style:{}},[t("div",$A.formatDate("Y-m-d H:i",Math.round(n.baktime.start/1e3))),t("div",$A.formatDate("Y-m-d H:i",Math.round(n.baktime.end/1e3)))])}},{title:this.$L("新计划时间"),minWidth:135,align:"center",render:function(t,e){var n=e.row;return t("div",{style:{}},[t("div",$A.formatDate("Y-m-d H:i",Math.round(n.newTime.start/1e3))),t("div",$A.formatDate("Y-m-d H:i",Math.round(n.newTime.end/1e3)))])}}],editData:[],editLoad:0,editShowInfo:!1}},mounted:function(){this.initData()},computed:Y(Y(Y({},(0,r.rn)(["userId","windowWidth","taskPriority"])),(0,r.Se)(["projectParameter"])),{},{menuWidth:function(){return this.windowWidth<1440?180:260},dropStyle:function(){return this.windowWidth<1440?{left:"142px"}:{}},completedTask:function(){return this.projectParameter("completedTask")}}),watch:{projectColumn:{handler:function(){this.initData()},deep:!0},flowInfo:{handler:function(){this.initData()},deep:!0},completedTask:function(){this.initData()}},methods:{initData:function(){this.lists=[],this.projectColumn&&this.projectColumn.some(this.checkAdd)},filtrLength:function(t){var e=this;return t.filter((function(t){return!(t.complete_at&&!e.completedTask)&&!(e.flowInfo.value>0&&t.flow_item_id!==e.flowInfo.value)})).length},checkAdd:function(t){var e=this;this.filtrProjectId>0&&t.id!=this.filtrProjectId||t.tasks&&t.tasks.some((function(t){var n=!t.start_at||!t.end_at,r=e.getTimeObj(t),o=r.start,i=r.end;if(t.complete_at&&!e.completedTask)return!1;if(e.flowInfo.value>0&&t.flow_item_id!==e.flowInfo.value)return!1;var a="#058ce4";e.taskPriority.some((function(e){if(e.priority===t.p_level)return a=e.color,!0}));var s={start:o,end:i},u=$A.cloneJSON(s),c=e.editData.find((function(e){return e.id==t.id}));c&&(s=$A.cloneJSON(c.newTime)),e.lists.push({id:t.id,label:t.name,complete:t.complete_at,overdue:t.overdue,time:s,notime:n,baktime:u,style:{background:a}})}))},onChange:function(t){var e=t.time,n=t.baktime;if(Math.abs(n.end-e.end)>1e3||Math.abs(n.start-e.start)>1e3){var r=this.editData.find((function(e){return e.id==t.id}));r?r.newTime=e:this.editData.push({id:t.id,label:t.label,notime:t.notime,baktime:t.baktime,newTime:e})}},onClick:function(t){this.$store.dispatch("openTask",t)},editSubmit:function(t){var e=this;this.editData&&this.editData.forEach((function(n){var r=e.lists.find((function(t){return t.id==n.id}));if(t){e.editLoad++;var o=$A.formatDate("Y-m-d H:i",Math.round(n.newTime.start/1e3)),i=$A.formatDate("Y-m-d H:i",Math.round(n.newTime.end/1e3)),a={task_id:n.id,times:[o,i]};e.$store.dispatch("taskUpdate",a).then((function(t){var n=t.msg;e.editLoad--,0===e.editLoad&&$A.messageSuccess(n),r&&e.$set(r,"baktime",$A.cloneJSON(r.time))})).catch((function(t){var n=t.msg;e.editLoad--,0===e.editLoad&&$A.modalError(n),r&&e.$set(r,"time",$A.cloneJSON(r.baktime))}))}else r&&e.$set(r,"time",$A.cloneJSON(r.baktime))})),this.editData=[]},getRawTime:function(t){var e=this.lists.find((function(e){return e.id==t}));return e?this.getTimeObj(e):null},getTimeObj:function(t){var e=$A.Time(t.start_at)||$A.Time(t.created_at),n=$A.Time(t.end_at)||$A.Time(t.created_at)+86400;return n==e&&(n=Math.round(new Date($A.formatDate("Y-m-d 23:59:59",n)).getTime()/1e3)),n=Math.max(n,e+60),{start:e*=1e3,end:n*=1e3}},onSwitchColumn:function(t){this.filtrProjectId=$A.runNum(t),this.initData()}}};const G=(0,v.Z)(K,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"project-gstc-gantt"},[n("GanttView",{attrs:{lists:t.lists,menuWidth:t.menuWidth,itemWidth:80},on:{"on-change":t.onChange,"on-click":t.onClick}}),t._v(" "),n("Dropdown",{staticClass:"project-gstc-dropdown-filtr",style:t.dropStyle,attrs:{trigger:"click"},on:{"on-click":t.onSwitchColumn}},[n("Icon",{staticClass:"project-gstc-dropdown-icon",class:{filtr:t.filtrProjectId>0},attrs:{type:"md-funnel"}}),t._v(" "),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[n("DropdownItem",{class:{"dropdown-active":0==t.filtrProjectId},attrs:{name:0}},[t._v(t._s(t.$L("全部")))]),t._v(" "),t._l(t.projectColumn,(function(e,r){return n("DropdownItem",{key:r,class:{"dropdown-active":t.filtrProjectId==e.id},attrs:{name:e.id}},[t._v("\n "+t._s(e.name)+"\n "),e.tasks?n("span",[t._v("("+t._s(t.filtrLength(e.tasks))+")")]):t._e()])}))],2)],1),t._v(" "),n("div",{staticClass:"project-gstc-edit",class:{info:t.editShowInfo,visible:t.editData&&t.editData.length>0}},[n("div",{staticClass:"project-gstc-edit-info"},[n("Table",{attrs:{size:"small","max-height":"600",columns:t.editColumns,data:t.editData}}),t._v(" "),n("div",{staticClass:"project-gstc-edit-btns"},[n("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"text"},on:{click:function(e){return t.editSubmit(!1)}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"primary"},on:{click:function(e){return t.editSubmit(!0)}}},[t._v(t._s(t.$L("保存")))]),t._v(" "),n("Icon",{staticClass:"zoom",attrs:{type:"md-arrow-dropright"},on:{click:function(e){t.editShowInfo=!1}}})],1)],1),t._v(" "),n("div",{staticClass:"project-gstc-edit-small"},[n("div",{staticClass:"project-gstc-edit-text",on:{click:function(e){t.editShowInfo=!0}}},[t._v(t._s(t.$L("未保存计划时间"))+": "),t.editData?n("span",[t._v(t._s(t.editData.length))]):t._e()]),t._v(" "),n("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"text"},on:{click:function(e){return t.editSubmit(!1)}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"primary"},on:{click:function(e){return t.editSubmit(!0)}}},[t._v(t._s(t.$L("保存")))])],1)])],1)}),[],!1,null,null,null).exports;function Z(t){return function(t){if(Array.isArray(t))return J(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return J(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 J(t,e)}(t)||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 J(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&(n=n.filter((function(t){return t.flow_item_id===e.value}))),t&&(n=n.filter((function(e){var n=e.name,r=e.desc;return $A.strExists(n,t)||$A.strExists(r,t)}))),n}},projectUser:function(){var t=this.projectData,e=this.windowWidth;if(!t.project_user)return[];var n=e>1200?8:3,r=t.project_user.filter((function(e){return e.userid!=t.owner_userid}));if(r.length<=n)return r;var o=r.slice(0,n-1);return o.push({userid:-1}),o.push(r[r.length-1]),o},allTask:function(){var t=this.cacheTasks,e=this.projectId;return t.filter((function(t){return!t.archived_at&&t.project_id==e}))},columnList:function(){var t=this,e=this.projectId,n=this.cacheColumns,r=this.allTask,o=n.filter((function(t){return t.project_id==e})).sort((function(t,e){return t.sort!=e.sort?t.sort-e.sort:t.id-e.id}));return o.forEach((function(e){e.tasks=t.transforTasks(r.filter((function(t){return t.column_id==e.id}))).sort((function(t,e){return t.complete_at||e.complete_at?$A.Date(t.complete_at)-$A.Date(e.complete_at):t.sort!=e.sort?t.sort-e.sort:t.id-e.id}))})),o},myList:function(){var t=this,e=this.allTask,n=this.taskCompleteTemps,r=this.sortField,o=this.sortType,i=e.filter((function(e){return t.myFilter(e)}));if(n.length>0){var a,s=e.filter((function(e){return n.includes(e.id)&&t.myFilter(e,!1)}));if(s.length>0)(a=i=$A.cloneJSON(i)).push.apply(a,Z(s))}return i.sort((function(t,e){if("asc"==o){var n=[e,t];t=n[0],e=n[1]}return"level"==r?t.p_level-e.p_level:"end_at"==r?t.end_at==e.end_at?t.p_level-e.p_level:$A.Date(t.end_at||"2099-12-31 23:59:59")-$A.Date(e.end_at||"2099-12-31 23:59:59"):void 0}))},helpList:function(){var t=this,e=this.allTask,n=this.taskCompleteTemps,r=this.sortField,o=this.sortType,i=e.filter((function(e){return t.helpFilter(e)}));if(n.length>0){var a,s=e.filter((function(e){return n.includes(e.id)&&t.helpFilter(e,!1)}));if(s.length>0)(a=i=$A.cloneJSON(i)).push.apply(a,Z(s))}return i.sort((function(t,e){if("asc"==o){var n=[e,t];t=n[0],e=n[1]}return"level"==r?t.p_level-e.p_level:"end_at"==r?t.end_at==e.end_at?t.p_level-e.p_level:$A.Date(t.end_at||"2099-12-31 23:59:59")-$A.Date(e.end_at||"2099-12-31 23:59:59"):void 0}))},unList:function(){var t=this.allTask,e=this.searchText,n=this.sortField,r=this.sortType,o=this.flowInfo;return t.filter((function(t){return!(t.parent_id>0)&&(!(o.value>0&&t.flow_item_id!==o.value)&&(!(e&&!$A.strExists(t.name,e)&&!$A.strExists(t.desc,e))&&!t.complete_at))})).sort((function(t,e){if("asc"==r){var o=[e,t];t=o[0],e=o[1]}return"level"==n?t.p_level-e.p_level:"end_at"==n?t.end_at==e.end_at?t.p_level-e.p_level:$A.Date(t.end_at||"2099-12-31 23:59:59")-$A.Date(e.end_at||"2099-12-31 23:59:59"):void 0}))},completedList:function(){var t=this.allTask,e=this.searchText,n=this.flowInfo;return t.filter((function(t){return!(t.parent_id>0)&&(!(n.value>0&&t.flow_item_id!==n.value)&&(!(e&&!$A.strExists(t.name,e)&&!$A.strExists(t.desc,e))&&t.complete_at))})).sort((function(t,e){var n=$A.Date(t.complete_at);return $A.Date(e.complete_at)-n}))},completedCount:function(){return this.allTask.filter((function(t){return!(t.parent_id>0)&&t.complete_at})).length},flowTitle:function(){var t=this.flowInfo,e=this.allTask;return t.value?t.label:"".concat(this.$L("全部")," (").concat(e.length,")")},flowData:function(){var t=this.flowList,e=this.allTask,n=[{value:0,label:"".concat(this.$L("全部")," (").concat(e.length,")"),children:[]}],r=t.map((function(t){return{value:t.id,label:t.name,status:t.status,children:t.project_flow_item.map((function(t){var n=e.filter((function(e){return e.flow_item_id==t.id})).length;return{value:t.id,label:"".concat(t.name," (").concat(n,")"),status:t.status,class:t.status}}))}}));return 1===r.length?n.push.apply(n,Z(r[0].children)):r.length>0&&n.push.apply(n,Z(r)),n}}),watch:{projectData:function(){this.sortData=this.getSort()},projectLoad:function(t){var e=this;this._loadTimeout&&clearTimeout(this._loadTimeout),t>0?this._loadTimeout=setTimeout((function(){e.loading=!0}),1e3):this.loading=!1},projectId:{handler:function(t){t>0&&this.getFlowData()},immediate:!0}},methods:{searchFocus:function(){var t=this;this.$nextTick((function(){t.$refs.searchInput.focus({cursor:"end"})}))},getSort:function(){var t=[];return this.columnList.forEach((function(e){t.push({id:e.id,task:e.tasks.map((function(t){return t.id}))})})),t},sortUpdate:function(t){var e=this,n=this.sortData,r=this.getSort();if(JSON.stringify(n)!==JSON.stringify(r)){this.sortData=r;var o={project_id:this.projectId,sort:this.sortData,only_column:!0===t?1:0};this.sortDisabled=!0,this.$store.dispatch("call",{url:"project/sort",data:o}).then((function(t){var n=t.msg;$A.messageSuccess(n),e.sortDisabled=!1;var r,i=[];o.only_column?(r=-1,o.sort.forEach((function(t){r++,i.push({id:t.id,sort:r})})),e.$store.dispatch("saveColumn",i)):(o.sort.forEach((function(t){r=-1,i.push.apply(i,Z(t.task.map((function(n){return r++,i.push.apply(i,Z(e.allTask.filter((function(t){return t.parent_id==n})).map((function(e){return{id:e.id,sort:r,column_id:t.id}})))),{id:n,sort:r,column_id:t.id}}))))})),e.$store.dispatch("saveTask",i))})).catch((function(t){var n=t.msg;$A.modalError(n),e.sortDisabled=!1,e.$store.dispatch("getTaskForProject",e.projectId).catch((function(){}))}))}},addTopShow:function(t,e){this.$set(this.columnTopShow,t,e),e&&(this.$refs["column_"+t][0].scrollTop=0)},addTaskOpen:function(t){d.Store.set("addTask",t)},addColumnOpen:function(){var t=this;this.addColumnShow=!0,this.$nextTick((function(){t.$refs.addColumnName.focus()}))},addColumnBlur:function(){""===this.addColumnName&&(this.addColumnShow=!1)},addColumnSubmit:function(){var t=this,e=this.addColumnName.trim();""!==e&&this.$store.dispatch("call",{url:"project/column/add",data:{project_id:this.projectId,name:e}}).then((function(e){var n=e.data,r=e.msg;$A.messageSuccess(r),t.addColumnName="",t.$store.dispatch("saveColumn",n)})).catch((function(t){var e=t.msg;$A.modalError(e)}))},dropColumn:function(t,e){"title"===e?this.titleColumn(t):"remove"===e?this.removeColumn(t):e.name&&this.updateColumn(t,{color:e.color})},titleColumn:function(t){var e=this;$A.modalInput({value:t.name,title:"修改列表",placeholder:"输入列表名称",onOk:function(n){return n&&e.updateColumn(t,{name:n}),!0}})},updateColumn:function(t,e){var n=this;!0!==this.columnLoad[t.id]&&(this.$set(this.columnLoad,t.id,!0),Object.keys(e).forEach((function(r){return n.$set(t,r,e[r])})),this.$store.dispatch("call",{url:"project/column/update",data:Object.assign(e,{column_id:t.id})}).then((function(e){var r=e.data;n.$set(n.columnLoad,t.id,!1),n.$store.dispatch("saveColumn",r)})).catch((function(e){var r=e.msg;n.$set(n.columnLoad,t.id,!1),n.$store.dispatch("getColumns",n.projectId).catch((function(){})),$A.modalError(r)})))},removeColumn:function(t){var e=this;$A.modalConfirm({title:"删除列表",content:"你确定要删除列表【"+t.name+"】及列表内的任务吗?",loading:!0,onOk:function(){!0!==e.columnLoad[t.id]&&(e.$set(e.columnLoad,t.id,!0),e.$store.dispatch("removeColumn",t.id).then((function(n){n.data;var r=n.msg;$A.messageSuccess(r),e.$set(e.columnLoad,t.id,!1),e.$Modal.remove()})).catch((function(n){var r=n.msg;$A.modalError(r,301),e.$set(e.columnLoad,t.id,!1),e.$Modal.remove()})))}})},onSort:function(t){this.sortField=t,this.sortType="desc"==this.sortType?"asc":"desc"},onSetting:function(){var t=this;this.settingLoad++,this.$store.dispatch("call",{url:"project/update",data:Object.assign(this.settingData,{project_id:this.projectId})}).then((function(e){var n=e.data,r=e.msg;$A.messageSuccess(r),t.settingLoad--,t.settingShow=!1,t.$store.dispatch("saveProject",n)})).catch((function(e){var n=e.msg;$A.modalError(n),t.settingLoad--}))},onUser:function(){var t=this;this.userLoad++,this.$store.dispatch("call",{url:"project/user",data:{project_id:this.projectId,userid:this.userData.userids}}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.userLoad--,t.userShow=!1,t.$store.dispatch("getProjectOne",t.projectId).catch((function(){})),t.$store.dispatch("getTaskForProject",t.projectId).catch((function(){}))})).catch((function(e){var n=e.msg;$A.modalError(n),t.userLoad--}))},onTransfer:function(){var t=this;this.transferLoad++,this.$store.dispatch("call",{url:"project/transfer",data:{project_id:this.projectId,owner_userid:this.transferData.owner_userid[0]}}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.transferLoad--,t.transferShow=!1,t.$store.dispatch("getProjectOne",t.projectId).catch((function(){})),t.$store.dispatch("getTaskForProject",t.projectId).catch((function(){}))})).catch((function(e){var n=e.msg;$A.modalError(n),t.transferLoad--}))},onArchived:function(){var t=this;$A.modalConfirm({title:"归档项目",content:"你确定要归档项目【"+this.projectData.name+"】吗?",loading:!0,onOk:function(){t.$store.dispatch("archivedProject",t.projectId).then((function(e){var n=e.msg;$A.messageSuccess(n),t.$Modal.remove()})).catch((function(e){var n=e.msg;$A.modalError(n,301),t.$Modal.remove()}))}})},onDelete:function(){var t=this;$A.modalConfirm({title:"删除项目",content:"你确定要删除项目【"+this.projectData.name+"】吗?",loading:!0,onOk:function(){t.$store.dispatch("removeProject",t.projectId).then((function(e){var n=e.msg;$A.messageSuccess(n),t.$Modal.remove()})).catch((function(e){var n=e.msg;$A.modalError(n,301),t.$Modal.remove()}))}})},onExit:function(){var t=this;$A.modalConfirm({title:"退出项目",content:"你确定要退出项目【"+this.projectData.name+"】吗?",loading:!0,onOk:function(){t.$store.dispatch("exitProject",t.projectId).then((function(e){var n=e.msg;$A.messageSuccess(n),t.$Modal.remove()})).catch((function(e){var n=e.msg;$A.modalError(n,301),t.$Modal.remove()}))}})},projectDropdown:function(t){var e=this;switch(t){case"setting":this.$set(this.settingData,"name",this.projectData.name),this.$set(this.settingData,"desc",this.projectData.desc),this.settingShow=!0,this.$nextTick((function(){e.$refs.projectName.focus(),setTimeout(e.$refs.projectDesc.resizeTextarea,0)}));break;case"user":if(this.projectData.owner_userid!==this.userId)return;var n=this.projectData.project_user.map((function(t){return t.userid}));this.$set(this.userData,"userids",n),this.$set(this.userData,"useridbak",n),this.$set(this.userData,"uncancelable",[this.projectData.owner_userid]),this.userShow=!0;break;case"invite":this.inviteData={},this.inviteShow=!0,this.inviteGet();break;case"workflow":this.workflowShow=!0;break;case"log":this.logShow=!0;break;case"archived_task":this.archivedTaskShow=!0;break;case"deleted_task":this.deletedTaskShow=!0;break;case"transfer":this.$set(this.transferData,"owner_userid",[this.projectData.owner_userid]),this.transferShow=!0;break;case"archived":this.onArchived();break;case"delete":this.onDelete();break;case"exit":this.onExit()}},openTask:function(t,e){this.$store.dispatch("openTask",t),!0===e&&setTimeout((function(){d.Store.set("receiveTask",!0)}),300)},openMenu:function(t){var e=this.$refs["taskMenu_".concat(t.id)];e&&e[0].handleClick()},taskIsHidden:function(t){var e=t.name,n=t.desc,r=t.complete_at,o=this.searchText,i=this.flowInfo;return!(this.projectParameter("completedTask")||!r)||(i.value>0&&t.flow_item_id!==i.value||!(!o||$A.strExists(e,o)||$A.strExists(n,o)))},ownerUser:function(t){return t.filter((function(t){return 1==t.owner})).sort((function(t,e){return t.id-e.id}))},inviteGet:function(t){var e=this;this.inviteLoad++,this.$store.dispatch("call",{url:"project/invite",data:{project_id:this.projectId,refresh:!0===t?"yes":"no"}}).then((function(t){var n=t.data;e.inviteLoad--,e.inviteData=n,e.inviteCopy()})).catch((function(t){var n=t.msg;$A.modalError(n),e.inviteLoad--}))},getFlowData:function(){var t=this;this.flowInfo={},this.$store.dispatch("call",{url:"project/flow/list",data:{project_id:this.projectId}}).then((function(e){var n=e.data;t.flowList=n})).catch((function(){t.flowList=[]}))},flowChange:function(t,e){this.flowInfo=e.pop()},inviteCopy:function(){var t=this;this.inviteData.url&&this.$copyText(this.inviteData.url).then((function(){$A.messageSuccess(t.$L("复制成功!"))}),(function(){$A.messageError(t.$L("复制失败!"))}))},inviteFocus:function(){this.$refs.inviteInput.focus({cursor:"all"})},toggleCompleted:function(){this.$store.dispatch("forgetTaskCompleteTemp",!0),this.$store.dispatch("toggleProjectParameter","completedTask")},workflowBeforeClose:function(){var t=this;return new Promise((function(e){t.$refs.workflow.existDiff()?$A.modalConfirm({content:"设置尚未保存,是否放弃修改?",cancelText:"取消",okText:"放弃",onOk:function(){e()}}):e()}))},myFilter:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!(!this.projectParameter("completedTask")&&!0===e&&t.complete_at)&&(!(this.flowInfo.value>0&&t.flow_item_id!==this.flowInfo.value)&&(!(this.searchText&&!$A.strExists(t.name,this.searchText)&&!$A.strExists(t.desc,this.searchText))&&t.owner))},helpFilter:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!(t.parent_id>0)&&(!(!this.projectParameter("completedTask")&&!0===n&&t.complete_at)&&(!(this.flowInfo.value>0&&t.flow_item_id!==this.flowInfo.value)&&(!(this.searchText&&!$A.strExists(t.name,this.searchText)&&!$A.strExists(t.desc,this.searchText))&&(t.task_user&&t.task_user.find((function(t){var n=t.userid,r=t.owner;return n==e.userId&&0==r}))))))},expiresFormat:function(t){return $A.countDownFormat(t,this.nowTime)},tabTypeChange:function(t){switch(t){case"column":this.$store.dispatch("toggleProjectParameter",{project_id:this.projectId,key:"menuType",value:"column"});break;case"table":this.$store.dispatch("toggleProjectParameter",{project_id:this.projectId,key:"menuType",value:"table"});break;case"gantt":this.$store.dispatch("toggleProjectParameter",{project_id:this.projectId,key:"menuType",value:"gantt"})}}}};const rt=(0,v.Z)(nt,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"project-list",class:[t.tabTypeActive]},[n("PageTitle",{attrs:{title:t.projectData.name}}),t._v(" "),n("div",{staticClass:"project-head"},[n("div",{staticClass:"project-titbox"},[n("div",{staticClass:"project-title"},[n("h1",[t._v(t._s(t.projectData.name))]),t._v(" "),t.projectData.top_at?n("label",{staticClass:"top-text"},[t._v(t._s(t.$L("置顶")))]):t._e(),t._v(" "),t.loading?n("div",{staticClass:"project-load"},[n("Loading")],1):t._e()]),t._v(" "),n("ul",{staticClass:"project-icons"},[n("li",{staticClass:"project-avatar",class:{"cursor-default":t.projectData.owner_userid!==t.userId},on:{click:function(e){return t.projectDropdown("user")}}},[n("ul",[n("li",[n("UserAvatar",{attrs:{userid:t.projectData.owner_userid,size:36,borderWitdh:2,openDelay:0}},[n("p",[t._v(t._s(t.$L("项目负责人")))])]),t._v(" "),(t.windowWidth<=980||t.projectParameter("chat"))&&t.projectUser.length>0?n("Badge",{attrs:{type:"normal",count:t.projectData.project_user.length}}):t._e()],1),t._v(" "),t._l(t.projectUser,(function(e){return!(t.windowWidth<=980||t.projectParameter("chat"))&&t.projectUser.length>0?[-1===e.userid?n("li",{staticClass:"more"},[n("ETooltip",{attrs:{content:t.$L("共"+t.projectData.project_user.length+"个成员")}},[n("Icon",{attrs:{type:"ios-more"}})],1)],1):n("li",[n("UserAvatar",{attrs:{userid:e.userid,size:36,borderWitdh:2,openDelay:0}})],1)]:t._e()}))],2)]),t._v(" "),n("li",{staticClass:"project-icon",on:{click:function(e){return t.addTaskOpen(0)}}},[n("ETooltip",{attrs:{content:t.$L("添加任务")}},[n("Icon",{staticClass:"menu-icon",attrs:{type:"md-add"}})],1)],1),t._v(" "),n("li",{class:["project-icon",""!=t.searchText?"active":""]},[n("Tooltip",{attrs:{always:""!=t.searchText,theme:"light",rawIndex:10},on:{"on-popper-show":t.searchFocus}},[n("Icon",{staticClass:"menu-icon",attrs:{type:"ios-search"},on:{click:t.searchFocus}}),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("Input",{ref:"searchInput",staticClass:"search-input",attrs:{placeholder:t.$L("名称、描述..."),clearable:""},model:{value:t.searchText,callback:function(e){t.searchText=e},expression:"searchText"}})],1)],1)],1),t._v(" "),n("li",{class:["project-icon",t.projectParameter("chat")?"active":""],on:{click:function(e){return t.$store.dispatch("toggleProjectParameter","chat")}}},[n("Icon",{staticClass:"menu-icon",attrs:{type:"ios-chatbubbles"}}),t._v(" "),n("Badge",{staticClass:"menu-badge",attrs:{count:t.msgUnread}})],1),t._v(" "),n("li",{staticClass:"project-icon"},[n("EDropdown",{attrs:{trigger:"click",transfer:""},on:{command:t.projectDropdown}},[n("Icon",{staticClass:"menu-icon",attrs:{type:"ios-more"}}),t._v(" "),t.projectData.owner_userid===t.userId?n("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[n("EDropdownItem",{attrs:{command:"setting"}},[t._v(t._s(t.$L("项目设置")))]),t._v(" "),n("EDropdownItem",{attrs:{command:"workflow"}},[t._v(t._s(t.$L("工作流设置")))]),t._v(" "),n("EDropdownItem",{attrs:{command:"user",divided:""}},[t._v(t._s(t.$L("成员管理")))]),t._v(" "),n("EDropdownItem",{attrs:{command:"invite"}},[t._v(t._s(t.$L("邀请链接")))]),t._v(" "),n("EDropdownItem",{attrs:{command:"log",divided:""}},[t._v(t._s(t.$L("项目动态")))]),t._v(" "),n("EDropdownItem",{attrs:{command:"archived_task"}},[t._v(t._s(t.$L("已归档任务")))]),t._v(" "),n("EDropdownItem",{attrs:{command:"deleted_task"}},[t._v(t._s(t.$L("已删除任务")))]),t._v(" "),n("EDropdownItem",{attrs:{command:"transfer",divided:""}},[t._v(t._s(t.$L("移交项目")))]),t._v(" "),n("EDropdownItem",{attrs:{command:"archived"}},[t._v(t._s(t.$L("归档项目")))]),t._v(" "),n("EDropdownItem",{staticStyle:{color:"#f40"},attrs:{command:"delete"}},[t._v(t._s(t.$L("删除项目")))])],1):n("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[n("EDropdownItem",{attrs:{command:"log"}},[t._v(t._s(t.$L("项目动态")))]),t._v(" "),n("EDropdownItem",{attrs:{command:"archived_task"}},[t._v(t._s(t.$L("已归档任务")))]),t._v(" "),n("EDropdownItem",{attrs:{command:"deleted_task"}},[t._v(t._s(t.$L("已删除任务")))]),t._v(" "),n("EDropdownItem",{staticStyle:{color:"#f40"},attrs:{command:"exit",divided:""}},[t._v(t._s(t.$L("退出项目")))])],1)],1)],1)])]),t._v(" "),n("div",{staticClass:"project-subbox clearfix"},[n("div",{staticClass:"project-subtitle"},[t._v(t._s(t.projectData.desc))]),t._v(" "),n("div",{staticClass:"project-switch"},[t.completedCount>0?n("div",{staticClass:"project-checkbox"},[n("Checkbox",{attrs:{value:t.projectParameter("completedTask")},on:{"on-change":t.toggleCompleted}},[t._v(t._s(t.$L("显示已完成")))])],1):t._e(),t._v(" "),t.flowList.length>0?n("div",{staticClass:"project-select"},[n("Cascader",{attrs:{data:t.flowData,"transfer-class-name":"project-list-flow-cascader",transfer:""},on:{"on-change":t.flowChange}},[n("span",{class:"project-flow "+t.flowInfo.status},[t._v(t._s(t.flowTitle))])])],1):t._e(),t._v(" "),n("div",{staticClass:"project-switch-button"},[n("div",{staticClass:"slider",style:t.tabTypeStyle}),t._v(" "),n("div",{class:{active:"column"===t.tabTypeActive},on:{click:function(e){return t.tabTypeChange("column")}}},[n("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),n("div",{class:{active:"table"===t.tabTypeActive},on:{click:function(e){return t.tabTypeChange("table")}}},[n("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),n("div",{class:{active:"gantt"===t.tabTypeActive},on:{click:function(e){return t.tabTypeChange("gantt")}}},[n("i",{staticClass:"taskfont"},[t._v("")])])])])])]),t._v(" "),"column"===t.tabTypeActive?n("div",{staticClass:"project-column"},[n("Draggable",{staticClass:"column-list",attrs:{list:t.columnList,animation:150,disabled:t.sortDisabled||!t.isDesktop,tag:"ul",draggable:".column-item"},on:{sort:function(e){return t.sortUpdate(!0)}}},[t._l(t.columnList,(function(e){return n("li",{staticClass:"column-item"},[n("div",{class:["column-head",e.color?"custom-color":""],style:e.color?{backgroundColor:e.color}:{}},[n("div",{staticClass:"column-head-title"},[n("AutoTip",[t._v(t._s(e.name))]),t._v(" "),n("em",[t._v("("+t._s(t.panelTask(e.tasks).length)+")")])],1),t._v(" "),n("div",{staticClass:"column-head-icon"},[!0===t.columnLoad[e.id]?n("div",{staticClass:"loading"},[n("Loading")],1):n("EDropdown",{attrs:{trigger:"click",size:"small"},on:{command:function(n){return t.dropColumn(e,n)}}},[n("Icon",{attrs:{type:"ios-more"}}),t._v(" "),n("EDropdownMenu",{staticClass:"project-list-more-dropdown-menu",attrs:{slot:"dropdown"},slot:"dropdown"},[n("EDropdownItem",{attrs:{command:"title"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-create"}}),t._v(t._s(t.$L("修改"))+"\n ")],1)]),t._v(" "),n("EDropdownItem",{attrs:{command:"remove"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-trash"}}),t._v(t._s(t.$L("删除"))+"\n ")],1)]),t._v(" "),t._l(t.$store.state.columnColorList,(function(r,o){return n("EDropdownItem",{key:o,attrs:{divided:0==o,command:r}},[n("div",{staticClass:"item"},[n("i",{staticClass:"taskfont",style:{color:r.color},domProps:{innerHTML:t._s(r.color==e.color?"":"")}}),t._v(t._s(t.$L(r.name))+"\n ")])])}))],2)],1),t._v(" "),n("Icon",{staticClass:"last",attrs:{type:"md-add"},on:{click:function(n){return t.addTopShow(e.id,!0)}}})],1)]),t._v(" "),n("div",{ref:"column_"+e.id,refInFor:!0,staticClass:"column-task overlay-y"},[t.columnTopShow[e.id]?n("div",{staticClass:"task-item additem"},[n("TaskAddSimple",{attrs:{"column-id":e.id,"project-id":t.projectId,"add-top":!0,"auto-active":""},on:{"on-close":function(n){return t.addTopShow(e.id,!1)},"on-priority":t.addTaskOpen}})],1):t._e(),t._v(" "),n("Draggable",{staticClass:"task-list",attrs:{list:e.tasks,animation:150,disabled:t.sortDisabled||!t.isDesktop,draggable:".task-draggable",filter:".complete",group:"task"},on:{sort:t.sortUpdate,remove:t.sortUpdate}},[t._l(e.tasks,(function(e){return n("div",{class:["task-item task-draggable",e.complete_at?"complete":"",t.taskIsHidden(e)?"hidden":""],style:e.color?{backgroundColor:e.color}:{},on:{click:function(n){return t.openTask(e)}}},[n("div",{class:["task-head",e.desc?"has-desc":""]},[n("div",{staticClass:"task-title"},[e.flow_item_name?n("span",{class:e.flow_item_status,on:{click:function(n){return n.stopPropagation(),t.openMenu(e)}}},[t._v(t._s(e.flow_item_name))]):t._e(),t._v(" "),n("pre",[t._v(t._s(e.name))])]),t._v(" "),n("div",{staticClass:"task-menu",on:{click:function(t){t.stopPropagation()}}},[n("TaskMenu",{ref:"taskMenu_"+e.id,refInFor:!0,attrs:{task:e,icon:"ios-more"}})],1)]),t._v(" "),e.desc?n("div",{staticClass:"task-desc"},[n("pre",{domProps:{innerHTML:t._s(e.desc)}})]):t._e(),t._v(" "),e.task_tag.length>0?n("div",{staticClass:"task-tags"},t._l(e.task_tag,(function(e,r){return n("Tag",{key:r,attrs:{color:e.color}},[t._v(t._s(e.name))])})),1):t._e(),t._v(" "),n("div",{staticClass:"task-users"},[n("ul",[t._l(t.ownerUser(e.task_user),(function(t,r){return n("li",{key:r},[n("UserAvatar",{attrs:{userid:t.userid,size:"32",borderWitdh:2,borderColor:e.color}})],1)})),t._v(" "),0===t.ownerUser(e.task_user).length?n("li",{staticClass:"no-owner"},[n("Button",{attrs:{type:"primary",size:"small",ghost:""},on:{click:function(n){return n.stopPropagation(),t.openTask(e,!0)}}},[t._v(t._s(t.$L("领取任务")))])],1):t._e()],2),t._v(" "),e.file_num>0?n("div",{staticClass:"task-icon"},[t._v(t._s(e.file_num)),n("Icon",{attrs:{type:"ios-link-outline"}})],1):t._e(),t._v(" "),e.msg_num>0?n("div",{staticClass:"task-icon"},[t._v(t._s(e.msg_num)),n("Icon",{attrs:{type:"ios-chatbubbles-outline"}})],1):t._e()]),t._v(" "),n("div",{staticClass:"task-progress"},[e.sub_num>0?n("div",{staticClass:"task-sub-num"},[t._v(t._s(e.sub_complete)+"/"+t._s(e.sub_num))]):t._e(),t._v(" "),n("Progress",{attrs:{percent:e.percent,"stroke-width":6}}),t._v(" "),e.end_at?n("ETooltip",{class:["task-time",e.today?"today":"",e.overdue?"overdue":""],attrs:{"open-delay":600,content:e.end_at}},[e.complete_at?t._e():n("div",[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.expiresFormat(e.end_at)))])]):t._e()],1),t._v(" "),e.p_name?n("em",{staticClass:"priority-color",style:{backgroundColor:e.p_color}}):t._e()])})),t._v(" "),n("div",{staticClass:"task-item additem"},[n("TaskAddSimple",{attrs:{"column-id":e.id,"project-id":t.projectId},on:{"on-priority":t.addTaskOpen}})],1)],2)],1)])})),t._v(" "),n("li",{class:["add-column",t.addColumnShow?"show-input":""]},[n("div",{staticClass:"add-column-text",on:{click:t.addColumnOpen}},[n("Icon",{attrs:{type:"md-add"}}),t._v(t._s(t.$L("添加列表"))+"\n ")],1),t._v(" "),n("div",{staticClass:"add-column-input"},[n("Input",{ref:"addColumnName",attrs:{placeholder:t.$L("列表名称,回车创建"),clearable:""},on:{"on-blur":t.addColumnBlur,"on-enter":t.addColumnSubmit,"on-clear":function(e){t.addColumnShow=!1}},model:{value:t.addColumnName,callback:function(e){t.addColumnName=e},expression:"addColumnName"}})],1)])],2)],1):"table"===t.tabTypeActive?n("div",{staticClass:"project-table overlay-y"},[n("div",{staticClass:"project-table-head"},[n("Row",{staticClass:"task-row"},[n("Col",{attrs:{span:"12"}},[t._v("# "+t._s(t.$L("任务名称")))]),t._v(" "),n("Col",{attrs:{span:"3"}},[t._v(t._s(t.$L("列表")))]),t._v(" "),n("Col",{attrs:{span:"3"}},[n("div",{staticClass:"sort",on:{click:function(e){return t.onSort("level")}}},[t._v("\n "+t._s(t.$L("优先级"))+"\n "),n("div",{staticClass:"task-sort"},[n("Icon",{class:{on:"level"==t.sortField&&"asc"==t.sortType},attrs:{type:"md-arrow-dropup"}}),t._v(" "),n("Icon",{class:{on:"level"==t.sortField&&"desc"==t.sortType},attrs:{type:"md-arrow-dropdown"}})],1)])]),t._v(" "),n("Col",{attrs:{span:"3"}},[t._v(t._s(t.$L("负责人")))]),t._v(" "),n("Col",{attrs:{span:"3"}},[n("div",{staticClass:"sort",on:{click:function(e){return t.onSort("end_at")}}},[t._v("\n "+t._s(t.$L("到期时间"))+"\n "),n("div",{staticClass:"task-sort"},[n("Icon",{class:{on:"end_at"==t.sortField&&"asc"==t.sortType},attrs:{type:"md-arrow-dropup"}}),t._v(" "),n("Icon",{class:{on:"end_at"==t.sortField&&"desc"==t.sortType},attrs:{type:"md-arrow-dropdown"}})],1)])])],1)],1),t._v(" "),n("div",{class:["project-table-body",t.projectParameter("showMy")?"":"project-table-hide"]},[n("Row",{staticClass:"task-row"},[n("Col",{staticClass:"row-title",attrs:{span:"12"}},[n("i",{staticClass:"taskfont",on:{click:function(e){return t.$store.dispatch("toggleProjectParameter","showMy")}}},[t._v("")]),t._v(" "),n("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("我的任务")))]),t._v(" "),n("div",{staticClass:"row-num"},[t._v("("+t._s(t.myList.length)+")")])]),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}})],1),t._v(" "),t.projectParameter("showMy")?n("TaskRow",{attrs:{list:t.transforTasks(t.myList),"open-key":"my","fast-add-task":""},on:{"on-priority":t.addTaskOpen}}):t._e()],1),t._v(" "),t.helpList.length?n("div",{class:["project-table-body",t.projectParameter("showHelp")?"":"project-table-hide"]},[n("Row",{staticClass:"task-row"},[n("Col",{staticClass:"row-title",attrs:{span:"12"}},[n("i",{staticClass:"taskfont",on:{click:function(e){return t.$store.dispatch("toggleProjectParameter","showHelp")}}},[t._v("")]),t._v(" "),n("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("协助的任务")))]),t._v(" "),n("div",{staticClass:"row-num"},[t._v("("+t._s(t.helpList.length)+")")])]),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}})],1),t._v(" "),t.projectParameter("showHelp")?n("TaskRow",{attrs:{list:t.helpList,"open-key":"help"},on:{"on-priority":t.addTaskOpen}}):t._e()],1):t._e(),t._v(" "),t.projectData.task_num>0?n("div",{class:["project-table-body",t.projectParameter("showUndone")?"":"project-table-hide"]},[n("Row",{staticClass:"task-row"},[n("Col",{staticClass:"row-title",attrs:{span:"12"}},[n("i",{staticClass:"taskfont",on:{click:function(e){return t.$store.dispatch("toggleProjectParameter","showUndone")}}},[t._v("")]),t._v(" "),n("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("未完成任务")))]),t._v(" "),n("div",{staticClass:"row-num"},[t._v("("+t._s(t.unList.length)+")")])]),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}})],1),t._v(" "),t.projectParameter("showUndone")?n("TaskRow",{attrs:{list:t.unList,"open-key":"undone"},on:{"on-priority":t.addTaskOpen}}):t._e()],1):t._e(),t._v(" "),t.projectData.task_num>0?n("div",{class:["project-table-body",t.projectParameter("showCompleted")?"":"project-table-hide"]},[n("Row",{staticClass:"task-row"},[n("Col",{staticClass:"row-title",attrs:{span:"12"}},[n("i",{staticClass:"taskfont",on:{click:function(e){return t.$store.dispatch("toggleProjectParameter","showCompleted")}}},[t._v("")]),t._v(" "),n("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("已完成任务")))]),t._v(" "),n("div",{staticClass:"row-num"},[t._v("("+t._s(t.completedList.length)+")")])]),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}},[t._v(t._s(t.projectData.task_num>0&&t.projectParameter("showCompleted")?t.$L("完成时间"):""))])],1),t._v(" "),t.projectParameter("showCompleted")?n("TaskRow",{attrs:{list:t.completedList,"open-key":"completed",showCompleteAt:""},on:{"on-priority":t.addTaskOpen}}):t._e()],1):t._e()]):"gantt"===t.tabTypeActive?n("div",{staticClass:"project-gantt"},[n("ProjectGantt",{attrs:{projectColumn:t.columnList,flowInfo:t.flowInfo}})],1):t._e(),t._v(" "),n("Modal",{attrs:{title:t.$L("项目设置"),"mask-closable":!1},model:{value:t.settingShow,callback:function(e){t.settingShow=e},expression:"settingShow"}},[n("Form",{attrs:{model:t.settingData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{prop:"name",label:t.$L("项目名称")}},[n("Input",{ref:"projectName",attrs:{type:"text",maxlength:32,placeholder:t.$L("必填")},model:{value:t.settingData.name,callback:function(e){t.$set(t.settingData,"name",e)},expression:"settingData.name"}})],1),t._v(" "),n("FormItem",{attrs:{prop:"desc",label:t.$L("项目介绍")}},[n("Input",{ref:"projectDesc",attrs:{type:"textarea",autosize:{minRows:3,maxRows:5},maxlength:255,placeholder:t.$L("选填")},model:{value:t.settingData.desc,callback:function(e){t.$set(t.settingData,"desc",e)},expression:"settingData.desc"}})],1)],1),t._v(" "),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(e){t.settingShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{type:"primary",loading:t.settingLoad>0},on:{click:t.onSetting}},[t._v(t._s(t.$L("修改")))])],1)],1),t._v(" "),n("Modal",{attrs:{title:t.$L("成员管理"),"mask-closable":!1},model:{value:t.userShow,callback:function(e){t.userShow=e},expression:"userShow"}},[n("Form",{attrs:{model:t.userData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{prop:"userids",label:t.$L("项目成员")}},[n("UserInput",{attrs:{uncancelable:t.userData.uncancelable,"multiple-max":100,placeholder:t.$L("选择项目成员")},model:{value:t.userData.userids,callback:function(e){t.$set(t.userData,"userids",e)},expression:"userData.userids"}})],1)],1),t._v(" "),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(e){t.userShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),t.userWaitRemove.length>0?n("Poptip",{staticStyle:{"margin-left":"8px"},attrs:{confirm:"",placement:"bottom",transfer:""},on:{"on-ok":t.onUser}},[n("div",{attrs:{slot:"title"},slot:"title"},[n("p",[n("strong",[t._v(t._s(t.$L("移除成员负责的任务将变成无负责人,")))])]),t._v(" "),n("p",[t._v(t._s(t.$L("注意此操作不可逆!")))]),t._v(" "),n("ul",{staticClass:"project-list-wait-remove"},[n("li",[t._v(t._s(t.$L("即将移除"))+":")]),t._v(" "),t._l(t.userWaitRemove,(function(t){return n("li",{key:t},[n("UserAvatar",{attrs:{userid:t,size:20,showName:"",tooltipDisabled:""}})],1)}))],2)]),t._v(" "),n("Button",{attrs:{type:"primary",loading:t.userLoad>0}},[t._v(t._s(t.$L("保存")))])],1):n("Button",{attrs:{type:"primary",loading:t.userLoad>0},on:{click:t.onUser}},[t._v(t._s(t.$L("保存")))])],1)],1),t._v(" "),n("Modal",{attrs:{title:t.$L("邀请链接"),"mask-closable":!1},model:{value:t.inviteShow,callback:function(e){t.inviteShow=e},expression:"inviteShow"}},[n("Form",{attrs:{model:t.inviteData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{label:t.$L("链接地址")}},[n("Input",{ref:"inviteInput",attrs:{type:"textarea",rows:3,readonly:""},on:{"on-focus":t.inviteFocus},model:{value:t.inviteData.url,callback:function(e){t.$set(t.inviteData,"url",e)},expression:"inviteData.url"}}),t._v(" "),n("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("可通过此链接直接加入项目。")))])],1)],1),t._v(" "),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(e){t.inviteShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Poptip",{staticStyle:{"margin-left":"8px"},attrs:{confirm:"",placement:"bottom",transfer:""},on:{"on-ok":function(e){return t.inviteGet(!0)}}},[n("div",{attrs:{slot:"title"},slot:"title"},[n("p",[n("strong",[t._v(t._s(t.$L("注意:刷新将导致原来的邀请链接失效!")))])])]),t._v(" "),n("Button",{attrs:{type:"primary",loading:t.inviteLoad>0}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1),t._v(" "),n("Modal",{attrs:{title:t.$L("移交项目"),"mask-closable":!1},model:{value:t.transferShow,callback:function(e){t.transferShow=e},expression:"transferShow"}},[n("Form",{attrs:{model:t.transferData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{prop:"owner_userid",label:t.$L("项目负责人")}},[n("UserInput",{attrs:{"multiple-max":1,placeholder:t.$L("选择项目负责人")},model:{value:t.transferData.owner_userid,callback:function(e){t.$set(t.transferData,"owner_userid",e)},expression:"transferData.owner_userid"}})],1)],1),t._v(" "),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(e){t.transferShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{type:"primary",loading:t.transferLoad>0},on:{click:t.onTransfer}},[t._v(t._s(t.$L("移交")))])],1)],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",beforeClose:t.workflowBeforeClose,size:1280},model:{value:t.workflowShow,callback:function(e){t.workflowShow=e},expression:"workflowShow"}},[t.workflowShow?n("ProjectWorkflow",{ref:"workflow",attrs:{"project-id":t.projectId}}):t._e()],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:768},model:{value:t.logShow,callback:function(e){t.logShow=e},expression:"logShow"}},[t.logShow?n("ProjectLog",{attrs:{"project-id":t.projectId}}):t._e()],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:900},model:{value:t.archivedTaskShow,callback:function(e){t.archivedTaskShow=e},expression:"archivedTaskShow"}},[t.archivedTaskShow?n("TaskArchived",{attrs:{"project-id":t.projectId}}):t._e()],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:900},model:{value:t.deletedTaskShow,callback:function(e){t.deletedTaskShow=e},expression:"deletedTaskShow"}},[t.deletedTaskShow?n("TaskDeleted",{attrs:{"project-id":t.projectId}}):t._e()],1)],1)}),[],!1,null,null,null).exports;function ot(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 it(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const at={name:"ProjectDialog",components:{DialogWrapper:n(84953).Z},data:function(){return{memberShowAll:!1}},computed:function(t){for(var e=1;e=c?t?"":void 0:(i=s.charCodeAt(u))<55296||i>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):i:t?s.slice(u,u+2):a-56320+(i-55296<<10)+65536}}},"0390":function(t,e,n){"use strict";var r=n("02f4")(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"0bfb":function(t,e,n){"use strict";var r=n("cb7c");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0d58":function(t,e,n){var r=n("ce10"),o=n("e11e");t.exports=Object.keys||function(t){return r(t,o)}},1495:function(t,e,n){var r=n("86cc"),o=n("cb7c"),i=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),s=a.length,u=0;s>u;)r.f(t,n=a[u++],e[n]);return t}},"214f":function(t,e,n){"use strict";n("b0c5");var r=n("2aba"),o=n("32e9"),i=n("79e5"),a=n("be13"),s=n("2b4c"),u=n("520a"),c=s("species"),l=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),d=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var f=s(t),m=!i((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),p=m?!i((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[c]=function(){return n}),n[f](""),!e})):void 0;if(!m||!p||"replace"===t&&!l||"split"===t&&!d){var h=/./[f],g=n(a,f,""[t],(function(t,e,n,r,o){return e.exec===u?m&&!o?{done:!0,value:h.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),v=g[0],b=g[1];r(String.prototype,t,v),o(RegExp.prototype,f,2==e?function(t,e){return b.call(t,this,e)}:function(t){return b.call(t,this)})}}},"230e":function(t,e,n){var r=n("d3f4"),o=n("7726").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"23c6":function(t,e,n){var r=n("2d95"),o=n("2b4c")("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},2621:function(t,e){e.f=Object.getOwnPropertySymbols},"2aba":function(t,e,n){var r=n("7726"),o=n("32e9"),i=n("69a8"),a=n("ca5a")("src"),s=n("fa5b"),u="toString",c=(""+s).split(u);n("8378").inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var u="function"==typeof n;u&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(u&&(i(n,a)||o(n,a,t[e]?""+t[e]:c.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,u,(function(){return"function"==typeof this&&this[a]||s.call(this)}))},"2aeb":function(t,e,n){var r=n("cb7c"),o=n("1495"),i=n("e11e"),a=n("613b")("IE_PROTO"),s=function(){},u=function(){var t,e=n("230e")("iframe"),r=i.length;for(e.style.display="none",n("fab2").appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("
    '},oS=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}),Ls(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=Ly("mce");t[n]=function(){eS(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 nS.setAttrib(e,"src",r),!0}return!1}(t,s);return t.contentAreaContainer=e.iframeContainer,t.iframeElement=s,t.iframeHTML=rS(t),nS.add(e.iframeContainer,s),u},iS=gs.DOM,aS=function(t,e,n){var r=_y.get(n),o=_y.urls[n]||t.documentBaseUrl.replace(/\/$/,"");if(n=Te.trim(n),r&&-1===Te.inArray(e,n)){if(Te.each(_y.dependencies(n),(function(n){aS(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=Ss.translate(["Failed to initialize plugin: {0}",e]);ef(t,"PluginLoadError",{message:r}),Ty(r,n),xy(t,r)}(t,n,e)}}},sS=function(t){return t.replace(/^\-/,"")},uS=function(t){return{editorContainer:t,iframeContainer:t,api:{}}},cS=function(t){var e=t.getElement();return t.inline?uS(null):function(t){var e=iS.create("div");return iS.insertAfter(e,t),uS(e)}(e)},lS=function(t){var e=t.getElement();return t.orgDisplay=e.style.display,f(bc(t))?function(t){return t.theme.renderUI()}(t):_(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):cS(t)},dS=function(t){t.fire("ScriptsLoaded"),function(t){var e=Te.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){_t(n,r)||t.ui.registry.addIcon(r,e)}))}(t),function(t){var e=bc(t);if(f(e)){t.settings.theme=sS(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=[];Te.each(Cc(t).split(/[ ,]/),(function(n){aS(t,e,sS(n))}))}(t);var e=lS(t);!function(t,e){var n={show:R.from(e.show).getOr(C),hide:R.from(e.hide).getOr(C),disable:R.from(e.disable).getOr(C),isDisabled:R.from(e.isDisabled).getOr($),enable:function(){t.mode.isReadOnly()||R.from(e.enable).map(N)}};t.ui=At(At({},t.ui),n)}(t,R.from(e.api).getOr({}));var n={editorContainer:e.editorContainer,iframeContainer:e.iframeContainer};return t.editorContainer=n.editorContainer?n.editorContainer:null,Ny(t),t.inline?eS(t):function(t,e){var n=oS(t,e);e.editorContainer&&(nS.get(e.editorContainer).style.display=t.orgDisplay,t.hidden=nS.isHidden(e.editorContainer)),t.getElement().style.display="none",nS.setAttrib(t.id,"aria-hidden","true"),n||eS(t)}(t,n)},fS=gs.DOM,mS=function(t){return"-"===t.charAt(0)},pS=function(t,e){var n=mc(e),r=function(t){return t.getParam("language_url","","string")}(e);if(!1===Ss.hasCode(n)&&"en"!==n){var o=""!==r?r:e.editorManager.baseURL+"/langs/"+n+".js";t.add(o,C,void 0,(function(){!function(t,e,n){Sy(t,"LanguageLoadError",Dy("language",e,n))}(e,o,n)}))}},hS=function(t,e,n){return R.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:R.some(e)}}))},gS=function(t,e,n){var r=hS(e,"default",n),o=function(t){return R.from(function(t){return t.getParam("icons_url","","string")}(t)).filter((function(t){return t.length>0})).map((function(t){return{url:t,name:R.none()}}))}(e).orThunk((function(){return hS(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 Te.explode(t.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))}(t),o=function(t){return Te.explode(t.getParam("font_size_classes",""))}(t);return o?o[n-1]||e:r[n-1]||e}return e}return e},OS=function(t){var e=t.split(/\s*,\s*/);return V(e,(function(t){return-1===t.indexOf(" ")||Mt(t,'"')||Mt(t,"'")?t:"'"+t+"'"})).join(",")},AS=function(t,e){var n=function(t){if("string"!=typeof t){var e=Te.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)},NS=Te.each,$S=Te.map,IS=Te.inArray,LS=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(NS(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;NS(t,(function(t,r){NS(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":C,"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"),NS("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=TS(t,e);t.formatter.toggle("fontname",{value:OS(n)}),t.nodeChanged()}(t,r)},FontSize:function(e,n,r){!function(t,e){t.formatter.toggle("fontsize",{value:TS(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){AS(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){NC(t,e)},mceRepaint:C,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 Kk(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=$S(r,(function(n){return!!t.formatter.matchNode(n,e)}));return-1!==IS(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 TC(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 ES(t,(function(e){return xS(t.getBody(),e.dom)})).getOr("")}(t)}),this),e.addQueryValueHandler("FontSize",(function(){return function(t){return ES(t,(function(e){return kS(t.getBody(),e.dom)})).getOr("")}(t)}),this),e.addQueryValueHandler("LineHeight",(function(){return function(t){return ES(t,(function(e){var n=Ae.fromDom(t.getBody()),r=fg(e,(function(t){return sr(t,"line-height")}),T(Le,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}(),PS="data-mce-contenteditable",jS=function(t,e,n){var r,o;js(t,e)&&!1===n?(o=e,Ns(r=t)?r.dom.classList.remove(o):Is(r,o),Ps(r)):n&&Ls(t,e)},RS=function(t,e,n){try{t.getDoc().execCommand(e,!1,String(n))}catch(t){}},MS=function(t,e){t.dom.contentEditable=e?"true":"false"},BS=function(t,e){var n=Ae.fromDom(t.getBody());jS(n,"mce-content-readonly",e),e?(t.selection.controlSelection.hideResizeRect(),t._selectionOverrides.hideFakeCaret(),function(t){R.from(t.selection.getNode()).each((function(t){t.removeAttribute("data-mce-selected")}))}(t),t.readonly=!0,MS(n,!1),W(Ms(n,'*[contenteditable="true"]'),(function(t){Qn(t,PS,"true"),MS(t,!1)}))):(t.readonly=!1,MS(n,!0),function(t){W(Ms(t,'*[data-mce-contenteditable="true"]'),(function(t){rr(t,PS),MS(t,!0)}))}(n),RS(t,"StyleWithCSS",!1),RS(t,"enableInlineTableEditing",!1),RS(t,"enableObjectResizing",!1),wm(t)&&t.focus(),function(t){t.selection.setRng(t.selection.getRng())}(t),t.nodeChanged())},FS=function(t){return t.readonly},zS=function(t){t.parser.addAttributeFilter("contenteditable",(function(e){FS(t)&&W(e,(function(t){t.attr(PS,t.attr("contenteditable")),t.attr("contenteditable","false")}))})),t.serializer.addAttributeFilter(PS,(function(e){FS(t)&&W(e,(function(t){t.attr("contenteditable",t.attr(PS))}))})),t.serializer.addTempAttr(PS)},US=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 Le(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}))}},HS=Te.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"," "),VS=function(){function t(t){this.bindings={},this.settings=t||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||$}return t.isNative=function(t){return!!HS[t.toLowerCase()]},t.prototype.fire=function(t,e){var n=t.toLowerCase(),r=Li(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"),iD);return o[o.length-1]=Te.extend(o[o.length-1],{func:n,scope:r||this.editor}),Te.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}(),sD=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}},uD=gs.DOM,cD=Te.extend,lD=Te.each,dD=Te.resolve,fD=ke.ie,mD=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,cD(this,ZS),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&&(_s.ScriptLoader._setReferrerPolicy(this.settings.referrer_policy),gs.DOM.styleSheetLoader._setReferrerPolicy(this.settings.referrer_policy)),Ds.languageLoad=this.settings.language_load,Ds.baseURL=n.baseURL,this.id=t,this.setDirty(!1),this.documentBaseURI=new zm(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new aD(this),this.editorCommands=new LS(this),this.settings.cache_suffix&&(ke.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:sD(),styleSheetLoader:void 0,show:C,hide:C,enable:C,disable:C,isDisabled:$};var o=tD(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(){bS(this)},t.prototype.focus=function(t){this.execCommand("mceFocus",!1,t)},t.prototype.hasFocus=function(){return _m(this)},t.prototype.execCallback=function(t){for(var e=[],n=1;n0?wD[0]:null),DD.focusedEditor===t&&(DD.focusedEditor=null),e.length!==wD.length},SD="CSS1Compat"!==document.compatMode,DD=At(At({},qS),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:cs,majorVersion:"5",minorVersion:"10.3",releaseDate:"2022-02-09",editors:_D,i18n:Ss,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var t,e,n=this,r="";e=zm.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&&gD(hD(n),(function(t){var n=pD.get(t);n?e.push(n):gD(document.forms,(function(n){gD(n.elements,(function(n){n.name===t&&(t="mce_editor_"+bD++,pD.setAttrib(n,"id",t),e.push(n))}))}))}));break;case"textareas":case"specific_textareas":gD(pD.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?gD(t.types,(function(n){Te.each(e,(function(e){return!pD.is(e,n.selector)||(l(o(e),vD({},t,n),e),!1)}))})):(Te.each(e,(function(t){var e;(e=n.get(t.id))&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(xD(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null)})),0===(e=Te.grep(e,(function(t){return!n.get(t.id)}))).length?a([]):gD(e,(function(e){!function(t,e){return t.inline&&e.tagName.toLowerCase()in r}(t,e)?l(o(e),t,e):Ty("Could not initialize inline editor on invalid inline target element",e)})))};return n.settings=t,pD.bind(window,"ready",s),new to((function(t){e?t(e):a=function(e){t(e)}}))},get:function(t){return 0===arguments.length?wD.slice(0):f(t)?J(wD,(function(e){return e.id===t})).getOr(null):w(t)&&wD[t]?wD[t]:null},add:function(t){var e=this;return _D[t.id]===t||(null===e.get(t.id)&&("length"!==t.id&&(_D[t.id]=t),_D.push(t),wD.push(t)),kD(!0),e.activeEditor=t,e.fire("AddEditor",{editor:t}),Bw||(Bw=function(t){var n=e.fire("BeforeUnload");if(n.returnValue)return t.preventDefault(),t.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",Bw))),t},createEditor:function(t,e){return this.add(new mD(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:(xD(n)&&r.fire("RemoveEditor",{editor:n}),0===wD.length&&window.removeEventListener("beforeunload",Bw),n.remove(),kD(wD.length>0),n);gD(pD.select(t),(function(t){(n=r.get(t.id))&&r.remove(n)}))}else for(e=wD.length-1;e>=0;e--)r.remove(wD[e])},execCommand:function(t,e,n){var r=this,o=r.get(n);switch(t){case"mceAddEditor":return r.get(n)||new mD(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(){gD(wD,(function(t){t.save()}))},addI18n:function(t,e){Ss.add(t,e)},translate:function(t){return Ss.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 zm(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new zm(this.baseURL)}});DD.setup();var ED,TD,OD,AD,ND=Math.min,$D=Math.max,ID=Math.round,LD=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+=ID(u/2)),"c"===c[1]&&(r+=ID(s/2)),"b"===c[3]&&(o-=a),"r"===c[4]&&(r-=i),"c"===c[3]&&(o-=ID(a/2)),"c"===c[4]&&(r-=ID(i/2)),PD(r,o,i,a)},PD=function(t,e,n,r){return{x:t,y:e,w:n,h:r}},jD={inflate:function(t,e,n){return PD(t.x-e,t.y-n,t.w+2*e,t.h+2*n)},relativePosition:LD,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=$D(t.x,e.x),r=$D(t.y,e.y),o=ND(t.x+t.w,e.x+e.w),i=ND(t.y+t.h,e.y+e.h);return o-n<0||i-r<0?null:PD(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=$D(0,e.x-r),l=$D(0,e.y-o),d=$D(0,i-s),f=$D(0,a-u);return r+=c,o+=l,n&&(i+=c,a+=l,r-=d,o-=f),PD(r,o,(i-=d)-r,(a-=f)-o)},create:PD,fromClientRect:function(t){return PD(t.left,t.top,t.width,t.height)}},RD=(ED={},TD={},{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!==ED[t])return ED[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||"",YD.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&&Te.each(t.requestheaders,(function(t){e.setRequestHeader(t.key,t.value)})),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),(e=YD.fire("beforeSend",{xhr:e,settings:t}).xhr).send(t.data),!t.async)return r();oo.setTimeout(r,10)}}),XD=Te.extend,KD=function(){function t(t){this.settings=XD({},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=XD(this.settings,t);r.success=function(t,o){void 0===(t=WD.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=WD.serialize({id:t.id||"c"+this.count++,method:t.method,params:t.params}),r.content_type="application/json",YD.send(r)},t}();try{var GD="__storage_test__";(zD=window.localStorage).setItem(GD,GD),zD.removeItem(GD)}catch(t){zD=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 ZD={geom:{Rect:jD},util:{Promise:to,Delay:oo,Tools:Te,VK:of,URI:zm,Class:FD,EventDispatcher:VS,Observable:qS,I18n:Ss,XHR:YD,JSON:WD,JSONRequest:KD,JSONP:qD,LocalStorage:zD,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=HD(0,UD(e,1)),i=HD(0,UD(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=VD(255*(n+c)),r=VD(255*(r+c)),o=VD(255*(o+c))}else n=r=o=VD(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=UD(t/=255,UD(e/=255,n/=255)),a=HD(t,HD(e,n));return i===a?{h:0,s:0,v:100*(o=i)}:(r=(a-i)/a,o=a,{h:VD(60*((t===i?3:n===i?1:5)-(t===i?e-n:n===i?t-e:n-t)/(a-i))),s:VD(100*r),v:VD(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=$y(),n=Ry(t,e);return{upload:function(e,r){return void 0===r&&(r=!0),n.upload(e,r?jy(t):void 0)}}}},dom:{EventUtils:Fi,Sizzle:ka,DomQuery:cs,TreeWalker:so,TextSeeker:Qs,DOMUtils:gs,ScriptLoader:_s,RangeUtils:Cf,Serializer:Ib,StyleSheetLoader:io,ControlSelection:sf,BookmarkManager:Jd,Selection:lb,Event:Fi.Event},html:{Styles:Ni,Entities:yi,Node:Im,Schema:Oi,SaxParser:qm,DomParser:Tb,Writer:Qm,Serializer:tp},Env:ke,AddOnManager:Ds,Annotator:Zd,Formatter:Wy,UndoManager:Yy,EditorCommands:LS,WindowManager:Cy,NotificationManager:yy,EditorObservable:ZS,Shortcuts:aD,Editor:mD,FocusManager:cm,EditorManager:DD,DOM:gs.DOM,ScriptLoader:_s.ScriptLoader,PluginManager:_y,ThemeManager:wy,IconManager:ly,Resource:RD,trim:Te.trim,isArray:Te.isArray,is:Te.is,toArray:Te.toArray,makeMap:Te.makeMap,each:Te.each,map:Te.map,grep:Te.grep,inArray:Te.inArray,extend:Te.extend,create:Te.create,walk:Te.walk,createNS:Te.createNS,resolve:Te.resolve,explode:Te.explode,_addCacheSuffix:Te._addCacheSuffix,isOpera:ke.opera,isWebKit:ke.webkit,isIE:ke.ie,isGecko:ke.gecko,isMac:ke.mac},JD=Te.extend(DD,ZD);!function(t){window.tinymce=t,window.tinyMCE=t}(JD),function(e){try{t.exports=e}catch(t){}}(JD)}()},54705:(t,e,n)=>{var r=n(81653),o={autoSetContainer:!1,appendToBody:!0},i={install:function(t){var e="3."===t.version.slice(0,2)?t.config.globalProperties:t.prototype;e.$clipboardConfig=o,e.$copyText=function(t,e){return new Promise((function(n,i){var a=document.createElement("button"),s=new r(a,{text:function(){return t},action:function(){return"copy"},container:"object"==typeof e?e:document.body});s.on("success",(function(t){s.destroy(),n(t)})),s.on("error",(function(t){s.destroy(),i(t)})),o.appendToBody&&document.body.appendChild(a),a.click(),o.appendToBody&&document.body.removeChild(a)}))},t.directive("clipboard",{bind:function(t,e,n){if("success"===e.arg)t._vClipboard_success=e.value;else if("error"===e.arg)t._vClipboard_error=e.value;else{var i=new r(t,{text:function(){return e.value},action:function(){return"cut"===e.arg?"cut":"copy"},container:o.autoSetContainer?t:void 0});i.on("success",(function(e){var n=t._vClipboard_success;n&&n(e)})),i.on("error",(function(e){var n=t._vClipboard_error;n&&n(e)})),t._vClipboard=i}},update:function(t,e){"success"===e.arg?t._vClipboard_success=e.value:"error"===e.arg?t._vClipboard_error=e.value:(t._vClipboard.text=function(){return e.value},t._vClipboard.action=function(){return"cut"===e.arg?"cut":"copy"})},unbind:function(t,e){t._vClipboard&&("success"===e.arg?delete t._vClipboard_success:"error"===e.arg?delete t._vClipboard_error:(t._vClipboard.destroy(),delete t._vClipboard))}})},config:o};t.exports=i},30264:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});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()}};const p=(0,n(51900).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},70631:(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(){if(!this.beforeClose)return this.handleClose();var t=this.beforeClose();t&&t.then?t.then(this.handleClose):this.handleClose()},handleClose: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},2749:(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(t,e){void 0===e._uploadIng&&(e._uploadIng=!0,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(){this.autoBottom&&$A.scrollToView(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},89500:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>f});var r=n(47575),o=n.n(r),i=n(2749),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()},setContent:function(t){null===this.getEditor()?this.content=t:t!=this.getEditor().getContent()&&this.getEditor().setContent(t)},focus:function(){return null===this.getEditor()?"":this.getEditor().focus()},insertImage:function(t){this.insertContent('')},editorImage:function(t){for(var e=0;e|\/>)/gi);if(n)for(var r=0;r').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.spinShow?"":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},98668:(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{loadIng:0,selects:[],list:[],searchKey:null,searchHistory:[],subscribe:null}},mounted:function(){var t=this;this.subscribe=r.Store.subscribe("cacheUserActive",(function(e){var n=t.list.findIndex((function(t){return t.userid==e.userid}));n>-1&&(t.$set(t.list,n,Object.assign({},t.list[n],e)),t.handleSelectData())}))},beforeDestroy:function(){this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},computed:{maxHiddenClass:function(){var t=this.multipleMax,e=this.maxHiddenInput,n=this.selects;return t&&e&&n.length>=t?"hidden-input":""}},watch:{value:{handler:function(){var t=this,e=this._tmpId=$A.randomString(6);setTimeout((function(){e===t._tmpId&&t.valueChange()}),10)},immediate:!0},selects:function(t){this.$emit("input",t)}},methods:{searchUser:function(t){var e=this;"string"!=typeof t&&(t=""),this.searchKey=t;var n=this.searchHistory.find((function(e){return e.key==t}));n&&(this.list=n.data),n||this.loadIng++,setTimeout((function(){e.searchKey==t?e.$store.dispatch("call",{url:"users/search",data:{keys:{key:t,project_id:e.projectId,no_project_id:e.noProjectId},take:30}}).then((function(r){var o=r.data;n||e.loadIng--,e.list=o;var i=e.searchHistory.findIndex((function(e){return e.key==t})),a={key:t,data:o,time:$A.Time()};i>-1?e.searchHistory.splice(i,1,a):e.searchHistory.push(a)})).catch((function(t){var r=t.msg;n||e.loadIng--,e.list=[],$A.messageWarning(r)})):n||e.loadIng--}),this.searchHistory.length>0?300:0)},isDisabled:function(t){return 0!==this.disabledChoice.length&&this.disabledChoice.includes(t)},openChange:function(t){t&&this.$nextTick(this.searchUser)},remoteMethod:function(){},valueChange:function(){var t=this;this.selects!=this.value&&($A.isArray(this.value)?this.selects=$A.cloneJSON(this.value):this.value?this.selects=[this.value]:this.selects=[],this.selects.some((function(e){t.list.find((function(t){return t.userid==e}))||(t.list.push({userid:e,nickname:e}),t.$store.dispatch("getUserBasic",{userid:e}))})))},handleSelectData:function(){var t=this;this.__handleSelectTimeout&&clearTimeout(this.__handleSelectTimeout),this.__handleSelectTimeout=setTimeout((function(){if(t.$refs.select){var e=t.$refs.select.getValue();e&&e.some((function(e){var n=t.list.find((function(t){return t.userid==e.value}));n&&(t.$set(e,"label",n.nickname),t.$set(e,"avatar",n.userimg))}))}}),100)}}};const i=(0,n(51900).Z)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:["common-user",t.maxHiddenClass]},[n("Select",{ref:"select",attrs:{transfer:t.transfer,placeholder:t.placeholder,size:t.size,loading:t.loadIng>0,"loading-text":t.$L("加载中..."),"default-label":t.value,"default-event-object":!0,"multiple-max":t.multipleMax,"multiple-uncancelable":t.uncancelable,"remote-method":t.remoteMethod,multiple:"",filterable:"","transfer-class-name":"common-user-transfer"},on:{"on-query-change":t.searchUser,"on-open-change":t.openChange},model:{value:t.selects,callback:function(e){t.selects=e},expression:"selects"}},[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,"key-value":e.email,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.loadIng>0?n("div",{staticClass:"common-user-loading"},[n("Loading")],1):t._e()],1)}),[],!1,null,null,null).exports},84953:(t,e,n)=>{"use strict";n.d(e,{Z:()=>k});var r=n(30264),o=n(86877),i=n(20629);const a={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)}}};var s=n(51900);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;e180||n>180)&&(e>n?(r=180,o=n*(180/e)):(r=e*(180/n),o=180)),{width:r+"px",height:o+"px"}}return{}},withdraw:function(){var t=this;$A.modalConfirm({content:"确定撤回此信息吗?",okText:"撤回",loading:!0,onOk:function(){t.$store.dispatch("call",{url:"dialog/msg/withdraw",data:{msg_id:t.msgData.id}}).then((function(){$A.messageSuccess("消息已撤回"),t.$store.dispatch("forgetDialogMsg",t.msgData.id),t.$Modal.remove()})).catch((function(e){var n=e.msg;$A.messageError(n,301),t.$Modal.remove()}))}})},viewFile:function(){var t=this.msgData,e=t.id,n=t.dialog_id,r=t.msg;if(["jpg","jpeg","gif","png"].includes(r.ext)){var o=$A.cloneJSON(this.dialogMsgs.filter((function(t){return t.dialog_id===n&&"file"===t.type&&["jpg","jpeg","gif","png"].includes(t.msg.ext)}))).sort((function(t,e){return t.id-e.id})),i=o.findIndex((function(t){return t.id===e}));i>-1?(this.$store.state.previewImageIndex=i,this.$store.state.previewImageList=o.map((function(t){return t.msg.path}))):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=[r.path])}else this.$Electron?this.$Electron.sendMessage("windowRouter",{name:"file-msg-"+this.msgData.id,path:"/single/file/msg/"+this.msgData.id,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:"".concat(this.msgData.msg.name," (").concat($A.bytesToSize(this.msgData.msg.size),")"),titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)}}):window.open($A.apiUrl("../single/file/msg/".concat(this.msgData.id)))},downFile:function(){var t=this;$A.modalConfirm({title:"下载文件",content:"".concat(this.msgData.msg.name," (").concat($A.bytesToSize(this.msgData.msg.size),")"),okText:"立即下载",onOk:function(){t.$store.dispatch("downUrl",$A.apiUrl("dialog/msg/download?msg_id=".concat(t.msgData.id)))}})}}};const f=(0,s.Z)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:"dialog-view "+t.msgData.type,attrs:{"data-id":t.msgData.id}},[n("div",{staticClass:"dialog-head"},[n("div",{staticClass:"dialog-content"},["text"===t.msgData.type?n("div",{staticClass:"content-text"},[n("pre",{staticClass:"no-dark-mode"},[t._v(t._s(t.textMsg(t.msgData.msg.text)))])]):"file"===t.msgData.type?n("div",{class:"content-file "+t.msgData.msg.type},[n("div",{staticClass:"dialog-file"},["img"===t.msgData.msg.type?n("img",{staticClass:"file-img",style:t.imageStyle(t.msgData.msg),attrs:{src:t.msgData.msg.thumb},on:{click:t.viewFile}}):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)))])])])])]):"loading"===t.msgData.type?n("div",{staticClass:"content-loading"},[n("Loading")],1):n("div",{staticClass:"content-unknown"},[t._v(t._s(t.$L("未知的消息类型")))])]),t._v(" "),t.showMenu?n("div",{staticClass:"dialog-menu"},[n("div",{staticClass:"menu-icon"},[t.msgData.userid==t.userId?n("Icon",{attrs:{type:"md-undo",title:t.$L("撤回")},on:{click:t.withdraw}}):t._e(),t._v(" "),"file"===t.msgData.type?[n("Icon",{attrs:{type:"md-eye",title:t.$L("查看")},on:{click:t.viewFile}}),t._v(" "),n("Icon",{attrs:{type:"md-arrow-round-down",title:t.$L("下载")},on:{click:t.downFile}})]:t._e()],2)]):t._e()]),t._v(" "),t.msgData.created_at?n("div",{staticClass:"dialog-foot"},[n("div",{staticClass:"time",attrs:{title:t.msgData.created_at}},[t._v(t._s(t.$A.formatTime(t.msgData.created_at)))]),t._v(" "),t.msgData.send>1||"group"==t.dialogType?n("EPopover",{ref:"percent",staticClass:"percent",attrs:{placement:"left-end",width:360,offset:-8},model:{value:t.popperShow,callback:function(e){t.popperShow=e},expression:"popperShow"}},[n("div",{staticClass:"dialog-wrapper-read-poptip-content"},[n("ul",{staticClass:"read overlay-y"},[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 overlay-y"},[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:{slot:"reference",percent:t.msgData.percentage,size:14},slot:"reference"})],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 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$A.Time()){var n=window.__sendDialogMsg,r=n.msgFile,o=n.msgText;window.__sendDialogMsg=null,this.$nextTick((function(){$A.isArray(r)&&r.length>0?e.sendFileMsg(r):o&&e.sendMsg(o)}))}if(t.query&&t.query._){var i=$A.cloneJSON(t.query);delete i._,this.goForward({query:i},!0)}},immediate:!0},dialogId:{handler:function(t){var e=this;t&&(this.msgNew=0,this.topId=-1,this.visible=!1,this.$store.dispatch("getDialogMsgs",t).then((function(t){e.onToBottom(),e.visible=!0})))},immediate:!0},wsOpenNum:function(t){t<=1||this.$store.dispatch("getDialogMsgs",this.dialogId)}},methods:{sendMsg:function(t){var e=this;if("string"==typeof t&&t&&(this.msgText=t,this.$refs.input.focus()),""!=this.msgText){var n=$A.randomString(16);this.tempMsgs.push({id:n,dialog_id:this.dialogData.id,type:"text",userid:this.userId,msg:{text:this.msgText}}),this.isDesktop||this.$refs.input.blur(),this.onToBottom(),this.onActive(),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:this.dialogId,text:this.msgText},method:"post"}).then((function(t){var r=t.data;e.tempMsgs=e.tempMsgs.filter((function(t){return t.id!=n})),e.sendSuccess(r)})).catch((function(t){var r=t.msg;$A.modalError(r),e.tempMsgs=e.tempMsgs.filter((function(t){return t.id!=n}))})),this.msgText=""}},sendFileMsg:function(t){var e=this;t.length>0&&(this.pasteFile=[],this.pasteItem=[],t.some((function(t){var n=new FileReader;n.readAsDataURL(t),n.onload=function(n){var r=n.target;e.pasteFile.push(t),e.pasteItem.push({type:$A.getMiddle(t.type,null,"/"),name:t.name,size:t.size,result:r.result}),e.pasteShow=!0}})))},chatKeydown:function(t){if(13===t.keyCode){if(t.shiftKey)return;t.preventDefault(),this.sendMsg()}},pasteDrag:function(t,e){var n="drag"===e?t.dataTransfer.files:t.clipboardData.files,r=Array.prototype.slice.call(n);r.length>0&&(t.preventDefault(),this.sendFileMsg(r))},chatPasteDrag:function(t,e){this.dialogDrag=!1,this.pasteDrag(t,e)},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)},pasteSend:function(){var t=this;this.pasteFile.some((function(e){t.$refs.chatUpload.upload(e)}))},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.isDesktop||this.$refs.input.blur(),this.onToBottom(),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){var e=this;$A.isArray(t)?t.some((function(t){e.sendSuccess(t)})):(this.$store.dispatch("saveDialogMsg",t),this.$store.dispatch("increaseTaskMsgNum",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}t.scale>=1&&(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")},onToBottom:function(){this.autoBottom=!0,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,$A.scrollToView(document.getElementById("view_"+e),{behavior:"instant",inline:"start"})}))})).catch((function(){}))},addDialogMsg:function(){var t=this;this.isAutoBottom?this.$nextTick(this.onToBottom):this.$nextTick((function(){t.$refs.scroller&&t.$refs.scroller.scrollInfo().scrollE>10&&t.msgNew++}))}}};const k=(0,s.Z)(C,(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-nav",class:{completed:t.$A.dialogCompleted(t.dialogData)}},[n("div",{staticClass:"dialog-avatar"},["group"==t.dialogData.type?["project"==t.dialogData.group_type?n("i",{staticClass:"taskfont icon-avatar project"},[t._v("")]):"task"==t.dialogData.group_type?n("i",{staticClass:"taskfont icon-avatar task"},[t._v("")]):n("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:t.dialogData.dialog_user?n("div",{staticClass:"user-avatar"},[n("UserAvatar",{attrs:{userid:t.dialogData.dialog_user.userid,size:42}})],1):n("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}})],2),t._v(" "),n("div",{staticClass:"dialog-title"},[n("div",{staticClass:"main-title"},[t._l(t.$A.dialogTags(t.dialogData),(function(e){return"success"!=e.color?[n("Tag",{attrs:{color:e.color,fade:!1}},[t._v(t._s(t.$L(e.text)))])]:t._e()})),t._v(" "),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(" "),t.dialogData.top_at?n("label",{staticClass:"top-text"},[t._v(t._s(t.$L("置顶")))]):t._e()],2),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",style:{opacity:t.visible?1:0},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.onToBottom}},[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:2e4,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(),t._v(" "),n("Modal",{attrs:{title:t.$L(t.pasteTitle),"cancel-text":t.$L("取消"),"ok-text":t.$L("发送"),"enter-ok":!0},on:{"on-ok":t.pasteSend},model:{value:t.pasteShow,callback:function(e){t.pasteShow=e},expression:"pasteShow"}},[n("div",{staticClass:"dialog-wrapper-paste"},[t._l(t.pasteItem,(function(e){return["image"==e.type?n("img",{attrs:{src:e.result}}):n("div",[t._v(t._s(t.$L("文件"))+": "+t._s(e.name)+" ("+t._s(t.$A.bytesToSize(e.size))+")")])]}))],2)])],2):t._e()}),[],!1,null,null,null).exports},85782:(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:Math.max($A.runNum(this.listPageSize),10)}}).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 ")),i.push(t("span",{class:"change-value"},"".concat(u||"-")))):i.push(t("span",{class:"change-value"},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=[];if(!$A.isJson(n))return r;if(this.taskId>0&&$A.isJson(n.flow)){var o=$A.getMiddle(n.flow.flow_item_name,"|");o&&r.push({id:e,button:"重置",content:"确定重置为【".concat(o,"】吗?")})}return 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&&t.showLoad?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},19246:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(89500),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},showAddAssist:function(){return!this.addData.owner.includes(this.userId)}}),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){t>0&&$A.setStorage("cacheAddTaskProjectId",t)},"addData.column_id":function(t){var e=this,n=this.addData.project_id;this.$nextTick((function(){n&&t?e.$set(e.addData,"cascader",[n,t]):e.$set(e.addData,"cascader",[])})),t>0&&$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(this.addData,"times",[e[0],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(),owner:[this.userId],times:[]}),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()}))},cascaderChange:function(t){t[1]&&this.$set(this.addData,"column_id",t[1])},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:[],add_assist:1,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-change":t.cascaderChange,"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.isDesktop?"详细描述,选填...(点击右键使用工具栏)":"详细描述,选填..."),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,transfer:!1},model:{value:t.addData.owner,callback:function(e){t.$set(t.addData,"owner",e)},expression:"addData.owner"}}),t._v(" "),t.showAddAssist?n("div",{staticClass:"task-add-assist"},[n("Checkbox",{attrs:{"true-value":1,"false-value":0},model:{value:t.addData.add_assist,callback:function(e){t.$set(t.addData,"add_assist",e)},expression:"addData.add_assist"}},[t._v(t._s(t.$L("加入任务协助人员列表")))]),t._v(" "),n("ETooltip",{attrs:{content:t.$L("你不是任务负责人时建议加入任务协助人员列表")}},[n("Icon",{attrs:{type:"ios-alert-outline"}})],1)],1):t._e()],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,transfer:!1},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},21929:(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,n=this.task,r=function(t){t?e.$store.dispatch("saveTaskCompleteTemp",n.id):e.$store.dispatch("forgetTaskCompleteTemp",n.id)};if($A.isJson(t))t.name&&this.updateTask({color:t.color}).catch((function(){}));else{if($A.leftExists(t,"turn::")){var o=$A.leftDelete(t,"turn::");if(o==this.task.flow_item_id)return;var i=this.taskFlowItems.find((function(t){return t.id==e.flow.flow_item_id}))||{},a=this.taskFlowItems.find((function(t){return t.id==o}))||{},s="end"!==i.status&&"end"===a.status,u="end"===i.status&&"end"!==a.status;return this.updateBefore&&(s?r(!0):u&&r(!1)),void this.updateTask({flow_item_id:o}).then((function(){s?r(!0):u&&r(!1)})).catch((function(){s?r(!1):u&&r(!0)}))}switch(t){case"complete":if(this.task.complete_at)return;this.updateBefore&&r(!0),this.updateTask({complete_at:$A.formatDate("Y-m-d H:i:s")}).then((function(){r(!0)})).catch((function(){r(!1)}));break;case"uncomplete":if(!this.task.complete_at)return;this.updateBefore&&r(!1),this.updateTask({complete_at:!1}).then((function(){r(!1)})).catch((function(){r(!0)}));break;case"archived":case"remove":this.archivedOrRemoveTask(t)}}},visibleChange:function(t){t&&this.$store.dispatch("getTaskFlow",this.task.id).then(this.$refs.dropdownMenu.updatePopper).catch(this.$refs.dropdownMenu.updatePopper)},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="removeTask",r="删除",o={task_id:this.task.id},i=this.task.parent_id>0?"子任务":"任务";"archived"==t&&(n="archivedTask",r="归档",this.task.archived_at&&(r="还原归档",o={task_id:this.task.id,type:"recovery"})),$A.modalConfirm({title:r+i,content:"你确定要"+r+i+"【"+this.task.name+"】吗?",loading:!0,onOk:function(){e.loadIng?e.$Modal.remove():e.$store.dispatch(n,o).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",disabled:t.disabled,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",{ref:"dropdownMenu",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(t.task.archived_at?"还原归档":"归档"))+"\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.r(e),n.d(e,{default:()=>ft});var r=n(20629),o=n(70538),i=n(54705),a=n.n(i),s=n(9980),u=n.n(s),c=n(25199),l=n(19246),d=n(80641),f=n(98668);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;e0?"子任务":"任务"}}),watch:{active:function(t){t||this.$emit("on-close")},mouseEnter:function(){this.chackClose()},onFocus:function(){this.chackClose()}},methods:{getData:function(){return this.parentId>0?{task_id:this.parentId,name:this.addData.name}:(this.addData.project_id=this.projectId||this.$store.state.projectId,this.addData.column_id=this.columnId||"",this.addData.owner=[this.userId],this.addData.top=this.addTop?1:0,$A.cloneJSON(this.addData))},openAdd:function(){var t=this;this.active=!0,this.defaultPriority(),this.$nextTick((function(){t.$refs.input.focus()}))},chackClose:function(){this.mouseEnter||this.onFocus||this.addData.name||(this.active=!1)},onPriority:function(){this.$emit("on-priority",this.getData()),this.active=!1},onKeydown:function(t){if(13===t.keyCode){if(t.shiftKey)return;t.preventDefault(),this.onAdd()}},onAdd:function(){var t=this;if(this.addData.name){this.loadIng++;var e=this.parentId>0?"taskAddSub":"taskAdd";this.$store.dispatch(e,this.getData()).then((function(e){var n=e.msg;$A.messageSuccess(n),t.loadIng--,t.active=!1,t.addData={name:"",owner:0,column_id:0,times:[],subtasks:[],p_level:0,p_name:"",p_color:""}})).catch((function(e){var n=e.msg;$A.modalError(n),t.loadIng--}))}else $A.messageWarning("请输入任务描述")},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=this,n=new Date,r=new Date((new Date).setDate(n.getDate()+$A.runNum(t.days)));this.$set(this.addData,"times",$A.date2string([n,r])),this.$set(this.addData,"p_level",t.priority),this.$set(this.addData,"p_name",t.name),this.$set(this.addData,"p_color",t.color),this.$nextTick((function(){e.$refs.input.focus()}))},defaultPriority:function(){0!==this.taskPriority.length&&(this.addData.p_name||this.choosePriority(this.taskPriority[0]))}}};var v=n(51900);const b=(0,v.Z)(g,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.rowMode?n("Row",{staticClass:"task-add-row"},[n("Col",{class:["row-add",t.active?"active":""],attrs:{span:"12"}},[n("div",{staticClass:"add-input",on:{mouseenter:function(e){t.mouseEnter=!0},mouseleave:function(e){t.mouseEnter=!1}}},[n("Input",{ref:"input",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:3},maxlength:255,placeholder:t.$L(t.typeName+"描述,回车创建")},on:{"on-focus":function(e){t.onFocus=!0},"on-blur":function(e){t.onFocus=!1},"on-keydown":t.onKeydown},model:{value:t.addData.name,callback:function(e){t.$set(t.addData,"name",e)},expression:"addData.name"}}),t._v(" "),0==t.parentId?n("div",{staticClass:"priority"},[n("ul",t._l(t.taskPriority,(function(e,r){return n("li",{key:r},[t.active?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)}}})]):t._e()],1)})),0),t._v(" "),n("Icon",{attrs:{type:"md-settings"},on:{click:t.onPriority}})],1):t._e()],1),t._v(" "),n("div",{staticClass:"add-btn",on:{click:t.openAdd}},[n("Icon",{staticClass:"add-icon",attrs:{type:"md-add"}}),t._v(t._s(t.$L("添加"+t.typeName))+"\n ")],1)]),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}})],1):n("div",{class:["task-add-simple",t.active?"active":""],on:{mouseenter:function(e){t.mouseEnter=!0},mouseleave:function(e){t.mouseEnter=!1}}},[n("Input",{ref:"input",attrs:{type:"textarea",rows:2,autosize:{minRows:2,maxRows:3},maxlength:255,placeholder:t.$L(t.typeName+"描述,回车创建")},on:{"on-focus":function(e){t.onFocus=!0},"on-blur":function(e){t.onFocus=!1},"on-keydown":t.onKeydown},model:{value:t.addData.name,callback:function(e){t.$set(t.addData,"name",e)},expression:"addData.name"}}),t._v(" "),n("div",{staticClass:"add-placeholder",on:{click:t.openAdd}},[n("Icon",{attrs:{type:"md-add"}}),t._v(t._s(t.$L("添加"+t.typeName))+"\n ")],1),t._v(" "),n("div",{staticClass:"priority"},[n("ul",t._l(t.taskPriority,(function(e,r){return n("li",{key:r},[t.active?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)}}})]):t._e()],1)})),0),t._v(" "),n("Icon",{attrs:{type:"md-settings"},on:{click:t.onPriority}})],1)],1)}),[],!1,null,null,null).exports;var y=n(21929);function _(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 w(t){for(var e=1;e0&&!0!==e.sub_top||0===e.parent_id&&t.fastAddTask?n("Icon",{class:["sub-icon",t.taskOpen[e.id]?"active":""],attrs:{type:"ios-arrow-forward"},on:{click:function(n){return t.getSublist(e)}}}):t._e(),t._v(" "),n("TaskMenu",{ref:"taskMenu_"+e.id,refInFor:!0,attrs:{task:e}}),t._v(" "),n("div",{staticClass:"item-title",on:{click:function(n){return t.openTask(e)}}},[e.flow_item_name?n("span",{class:e.flow_item_status,on:{click:function(n){return n.stopPropagation(),t.openMenu(e)}}},[t._v(t._s(e.flow_item_name))]):t._e(),t._v(" "),!0===e.sub_top?n("span",[t._v(t._s(t.$L("子任务")))]):t._e(),t._v(" "),e.sub_my&&e.sub_my.length>0?n("span",[t._v("+"+t._s(e.sub_my.length))]):t._e(),t._v(" "),t._v("\n "+t._s(e.name)+"\n ")]),t._v(" "),n("div",{staticClass:"item-icons",on:{click:function(n){return t.openTask(e)}}},[e.desc?n("div",{staticClass:"item-icon"},[n("i",{staticClass:"taskfont"},[t._v("")])]):t._e(),t._v(" "),e.file_num>0?n("div",{staticClass:"item-icon"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),n("em",[t._v(t._s(e.file_num))])]):t._e(),t._v(" "),e.msg_num>0?n("div",{staticClass:"item-icon"},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),n("em",[t._v(t._s(e.msg_num))])]):t._e(),t._v(" "),e.sub_num>0?n("div",{staticClass:"item-icon",on:{click:function(n){return n.stopPropagation(),t.getSublist(e)}}},[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(" "),n("em",[t._v(t._s(e.sub_complete)+"/"+t._s(e.sub_num))])]):t._e()])],1),t._v(" "),n("Col",{staticClass:"row-column",attrs:{span:"3"}},[n("EDropdown",{attrs:{trigger:"click",size:"small",placement:"bottom",disabled:!0===e.sub_top},on:{command:function(n){return t.dropTask(e,n)}}},[n("div",{staticClass:"task-column"},[t._v(t._s(t.columnName(e.column_id)))]),t._v(" "),n("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.columnList(e.project_id),(function(e){return n("EDropdownItem",{key:e.id,attrs:{command:"column::"+e.id}},[t._v("\n "+t._s(e.name)+"\n ")])})),1)],1)],1),t._v(" "),n("Col",{staticClass:"row-priority",attrs:{span:"3"}},[n("EDropdown",{attrs:{trigger:"click",size:"small",placement:"bottom",disabled:!0===e.sub_top},on:{command:function(n){return t.dropTask(e,n)}}},[n("TaskPriority",{attrs:{backgroundColor:e.p_color}},[t._v(t._s(e.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:"priority::"+r}},[n("i",{staticClass:"taskfont",style:{color:e.color},domProps:{innerHTML:t._s(e.p_name==e.name?"":"")}}),t._v("\n "+t._s(e.name)+"\n ")])})),1)],1)],1),t._v(" "),n("Col",{staticClass:"row-user",attrs:{span:"3"}},[n("ul",{on:{click:function(n){return t.openTask(e)}}},[t._l(t.ownerUser(e.task_user),(function(r,o){return o<3?n("li",{key:o},[n("UserAvatar",{attrs:{userid:r.userid,size:"32",borderWitdh:2,borderColor:e.color,showName:1===t.ownerUser(e.task_user).length}})],1):t._e()})),t._v(" "),0===t.ownerUser(e.task_user).length?n("li",{staticClass:"no-owner"},[n("Button",{attrs:{type:"primary",size:"small"},on:{click:function(n){return n.stopPropagation(),t.openTask(e,!0)}}},[t._v(t._s(t.$L("领取任务")))])],1):t._e()],2)]),t._v(" "),n("Col",{staticClass:"row-time",attrs:{span:"3"}},[!e.complete_at&&e.end_at?n("ETooltip",{class:["task-time",e.today?"today":"",e.overdue?"overdue":""],attrs:{"open-delay":600,content:e.end_at}},[n("div",{on:{click:function(n){return t.openTask(e)}}},[t._v(t._s(t.expiresFormat(e.end_at)))])]):t.showCompleteAt&&e.complete_at?n("div",{attrs:{title:e.complete_at}},[t._v(t._s(t.completeAtFormat(e.complete_at)))]):t._e()],1)],1),t._v(" "),!0===t.taskOpen[e.id]?n("TaskRow",{attrs:{list:t.subTask(e.id),"parent-id":e.id,"fast-add-task":0===e.parent_id&&t.fastAddTask,"open-key":t.openKey},on:{command:t.dropTask}}):t._e()],1)})),t._v(" "),t.fastAddTask||t.parentId>0?n("TaskAddSimple",{attrs:{"parent-id":t.parentId,"row-mode":""},on:{"on-priority":t.onPriority}}):t._e()],2)}),[],!1,null,null,null).exports;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 D(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const E={name:"TaskArchived",props:{projectId:{type:Number,default:0}},data:function(){return{loadIng:0,keys:{},keyIs:!1,columns:[],list:[],page:1,pageSize:20,total:0,noText:""}},mounted:function(){},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.onSearch}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?n("Button",{attrs:{type:"text"},on:{click:function(e){t.keyIs=!1}}},[t._v(t._s(t.$L("取消筛选")))]):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:"table-page-box"},[n("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),t._v(" "),n("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowMax768,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])}),[],!1,null,null,null).exports;var O=n(85782),A=n(70631);function N(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,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const L={name:"ProjectWorkflow",components:{UserInput:f.Z,Draggable:u()},props:{projectId:{type:Number,default:0}},data:function(){return{loadIng:0,list:[],openIndex:"",userShow:!1,userData:{}}},mounted:function(){},computed:function(t){for(var e=1;e0)e.loadIng++,e.$store.dispatch("call",{url:"project/flow/delete",data:{project_id:e.projectId}}).then((function(n){var r=n.msg;e.loadIng--,$.messageSuccess(r),e.$Modal.remove();var o=e.list.findIndex((function(e){return e.id==t.id}));o>-1&&e.list.splice(o,1)})).catch((function(t){var n=t.msg;e.loadIng--,$A.modalError(n,301),e.$Modal.remove()}));else{var n=e.list.findIndex((function(e){return e.id==t.id}));n>-1&&e.list.splice(n,1),e.$Modal.remove()}}})},onMore:function(t,e){switch(t){case"user":this.$set(this.userData,"id",e.id),this.$set(this.userData,"name",e.name),this.$set(this.userData,"userids",e.userids),this.$set(this.userData,"usertype",e.usertype),this.$set(this.userData,"userlimit",e.userlimit),this.userShow=!0;break;case"name":this.onName(e);break;case"remove":this.onRemove(e)}},onUser:function(){var t=this;this.userShow=!1,this.list.some((function(e){var n=e.project_flow_item.find((function(e){return e.id==t.userData.id}));n&&(t.$set(n,"userids",t.userData.userids),t.$set(n,"usertype",t.userData.usertype),t.$set(n,"userlimit",t.userData.userlimit))}))},onName:function(t){var e=this;$A.modalInput({value:t.name,title:"修改名称",placeholder:"输入流程名称",onOk:function(n){return n&&e.$set(t,"name",n),!0}})},onRemove:function(t){this.list.some((function(e){var n=e.project_flow_item.findIndex((function(e){return e.id==t.id}));n>-1&&e.project_flow_item.splice(n,1)}))},onTurns:function(t){this.$set(t,"turns",t.turns.sort())},onAdd:function(t){$A.modalInput({title:"添加状态",placeholder:"输入状态名称",onOk:function(e){if(e){var n=-1*$A.randNum(1e5,999999),r=t.project_flow_item.map((function(t){return t.id}));t.project_flow_item.push({id:n,name:e,status:"end",turns:r,userids:[],usertype:"add",userlimit:0}),t.project_flow_item.some((function(t){t.turns.push(n)}))}return!0}})},onReduction:function(t){this.$set(t,"project_flow_item",JSON.parse(t.project_flow_bak))},onSave:function(t){var e=this,n=0;t.project_flow_item.some((function(t){t.sort=n++})),this.loadIng++,this.$store.dispatch("call",{url:"project/flow/save",data:{project_id:this.projectId,flows:t.project_flow_item},method:"post"}).then((function(n){var r=n.data,o=n.msg;e.loadIng--,$.messageSuccess(o),r.project_flow_bak=JSON.stringify(r.project_flow_item);var i=e.list.findIndex((function(e){return e.id==t.id}));i>-1?e.list.splice(i,1,r):e.list.push(r),e.openIndex="index_"+r.id,e.$nextTick(e.syncScroller)})).catch((function(t){var n=t.msg;e.loadIng--,$A.modalError(n)}))},saveAll:function(){var t=this;this.list.some((function(e){t.contrast(e.project_flow_item,e.project_flow_bak)&&t.onSave(e)}))}}};const P=(0,v.Z)(L,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"project-workflow"},[n("div",{staticClass:"workflow-title"},[t._v("\n "+t._s(t.$L("工作流设置"))+"\n "),n("div",{staticClass:"title-icon"},[t.loadIng>0?n("Loading"):n("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getData}})],1)]),t._v(" "),t.list.length>0?n("div",{staticClass:"workflow-content"},[n("Collapse",{attrs:{accordion:""},model:{value:t.openIndex,callback:function(e){t.openIndex=e},expression:"openIndex"}},t._l(t.list,(function(e){return n("Panel",{key:e.id,attrs:{name:"index_"+e.id}},[n("div",{staticClass:"workflow-item"},[n("div",{staticClass:"workflow-name"},[t._v(t._s(e.name))]),t._v(" "),n("div",{staticClass:"workflow-status"},t._l(e.project_flow_item,(function(e){return n("div",{class:e.status},[t._v(t._s(e.name))])})),0),t._v(" "),n("div",{staticClass:"workflow-save",on:{click:function(t){t.stopPropagation()}}},[t.contrast(e.project_flow_item,e.project_flow_bak)?[n("Button",{attrs:{loading:t.loadIng>0,type:"primary"},on:{click:function(n){return t.onSave(e)}}},[t._v(t._s(t.$L("保存")))]),t._v(" "),e.id>0?n("Button",{attrs:{disabled:t.loadIng>0,type:"primary",ghost:""},on:{click:function(n){return t.onReduction(e,n)}}},[t._v(t._s(t.$L("还原")))]):t._e()]:t._e(),t._v(" "),n("Button",{attrs:{disabled:t.loadIng>0,type:"error",ghost:""},on:{click:function(n){return t.onDelete(e)}}},[t._v(t._s(t.$L("删除")))])],2)]),t._v(" "),n("div",{staticClass:"taskflow-config",attrs:{slot:"content"},slot:"content"},[n("div",{staticClass:"taskflow-config-table"},[n("div",{staticClass:"taskflow-config-table-left-container"},[n("div",{staticClass:"taskflow-config-table-column-header left-header"},[t._v(t._s(t.$L("配置项")))]),t._v(" "),n("div",{ref:"overlay_"+e.id,refInFor:!0,staticClass:"taskflow-config-table-column-body overlay-y"},[n("div",{staticClass:"taskflow-config-table-block"},[n("div",{staticClass:"taskflow-config-table-block-title"},[t._v(t._s(t.$L("设置状态为")))]),t._v(" "),n("div",{staticClass:"taskflow-config-table-block-item"},[n("div",[n("div",{staticClass:"title"},[t._v(t._s(t.$L("开始状态")))]),t._v(" "),n("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("新建任务默认状态")))])])]),t._v(" "),n("div",{staticClass:"taskflow-config-table-block-item"},[n("div",[n("div",{staticClass:"title"},[t._v(t._s(t.$L("进行中")))]),t._v(" "),n("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("可设置多个状态为进行中")))])])]),t._v(" "),n("div",{staticClass:"taskflow-config-table-block-item"},[n("div",[n("div",{staticClass:"title"},[t._v(t._s(t.$L("验收/测试")))]),t._v(" "),n("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("只能设置单个状态为验收/测试")))])])]),t._v(" "),n("div",{staticClass:"taskflow-config-table-block-item"},[n("div",[n("div",{staticClass:"title"},[t._v(t._s(t.$L("结束状态")))]),t._v(" "),n("div",{staticClass:"subtitle"},[t._v(t._s(t.$L("该状态下任务自动标记完成")))])])])]),t._v(" "),n("div",{staticClass:"taskflow-config-table-block hr"},[n("div",{staticClass:"taskflow-config-table-block-title"},[t._v(t._s(t.$L("可流转到")))]),t._v(" "),t._l(e.project_flow_item,(function(e){return n("div",{staticClass:"taskflow-config-table-block-item"},[n("span",{staticClass:"transform-status-name"},[t._v(t._s(e.name))])])}))],2)])]),t._v(" "),n("div",{staticClass:"taskflow-config-table-right-container"},[n("Draggable",{staticClass:"taskflow-config-table-list-wrapper",attrs:{list:e.project_flow_item,animation:150,disabled:!t.isDesktop,tag:"div",draggable:".column-border"},on:{sort:function(t){}}},[t._l(e.project_flow_item,(function(r){return n("div",{staticClass:"taskflow-config-table-status-column column-border",class:r.status},[n("div",{staticClass:"taskflow-config-table-status-item taskflow-config-table-column-header"},[n("div",{staticClass:"status-label-with-menu",class:r.status},[n("div",{staticClass:"name"},[t._v(t._s(t.$L(r.name)))]),t._v(" "),n("EDropdown",{staticClass:"more",class:{opacity:r.userids.length>0},attrs:{trigger:"click"},on:{command:function(e){return t.onMore(e,r)}}},[n("div",{staticClass:"more-icon"},[r.userids.length>1?n("EAvatar",{attrs:{size:20}},[t._v(t._s(r.userids.length))]):r.userids.length>0?n("UserAvatar",{attrs:{userid:r.userids[0],size:20,tooltipDisabled:""}}):n("Icon",{attrs:{type:"ios-more"}})],1),t._v(" "),n("EDropdownMenu",{staticClass:"taskflow-config-more-dropdown-menu",attrs:{slot:"dropdown"},slot:"dropdown"},[r.userids.length>0?n("EDropdownItem",{attrs:{command:"user"}},[n("div",{staticClass:"users"},t._l(r.userids,(function(t,e){return n("UserAvatar",{key:e,attrs:{userid:t,size:28,borderWitdh:1,showName:1===r.userids.length,tooltipDisabled:""}})})),1)]):t._e(),t._v(" "),n("EDropdownItem",{attrs:{command:"user"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-person"}}),t._v("\n "+t._s(t.$L("状态负责人"))+"\n ")],1)]),t._v(" "),n("EDropdownItem",{attrs:{command:"name"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-create"}}),t._v(t._s(t.$L("修改名称"))+"\n ")],1)]),t._v(" "),n("EDropdownItem",{attrs:{command:"remove"}},[n("div",{staticClass:"item delete"},[n("Icon",{attrs:{type:"md-trash"}}),t._v(t._s(t.$L("删除"))+"\n ")],1)])],1)],1)],1)]),t._v(" "),n("div",{ref:"overlay_"+e.id,refInFor:!0,staticClass:"taskflow-config-table-column-body overlay-y"},[n("div",{staticClass:"taskflow-config-table-block"},[n("div",{staticClass:"taskflow-config-table-block-title"}),t._v(" "),n("RadioGroup",{model:{value:r.status,callback:function(e){t.$set(r,"status",e)},expression:"item.status"}},[n("Radio",{attrs:{label:"start"}},[n("span")]),t._v(" "),n("Radio",{attrs:{label:"progress"}},[n("span")]),t._v(" "),n("Radio",{attrs:{label:"test"}},[n("span")]),t._v(" "),n("Radio",{attrs:{label:"end"}},[n("span")])],1)],1),t._v(" "),n("div",{staticClass:"taskflow-config-table-block"},[n("div",{staticClass:"taskflow-config-table-block-title"}),t._v(" "),n("CheckboxGroup",{on:{"on-change":function(e){return t.onTurns(r)}},model:{value:r.turns,callback:function(e){t.$set(r,"turns",e)},expression:"item.turns"}},t._l(e.project_flow_item,(function(t){return n("Checkbox",{key:t.id,attrs:{label:t.id,disabled:t.id==r.id}},[n("span")])})),1)],1)])])})),t._v(" "),n("div",{staticClass:"taskflow-config-table-status-column addnew",on:{click:function(n){return t.onAdd(e)}}},[t._v(t._s(t.$L("添加状态")))])],2)],1)])])])})),1)],1):0==t.loadIng?n("div",{staticClass:"workflow-no"},[t._v("\n "+t._s(t.$L("当前项目还没有创建工作流"))+"\n "),n("Button",{attrs:{type:"primary"},on:{click:t.onCreate}},[t._v(t._s(t.$L("创建工作流")))])],1):t._e(),t._v(" "),n("Modal",{attrs:{title:t.$L("状态负责人")+" ("+t.userData.name+")","mask-closable":!1},model:{value:t.userShow,callback:function(e){t.userShow=e},expression:"userShow"}},[n("Form",{attrs:{model:t.userData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{prop:"userids",label:t.$L("状态负责人")}},[n("UserInput",{attrs:{"project-id":t.projectId,"multiple-max":5,placeholder:t.$L("选择状态负责人")},model:{value:t.userData.userids,callback:function(e){t.$set(t.userData,"userids",e)},expression:"userData.userids"}})],1),t._v(" "),n("FormItem",{attrs:{prop:"usertype",label:t.$L("流转模式")}},[n("RadioGroup",{model:{value:t.userData.usertype,callback:function(e){t.$set(t.userData,"usertype",e)},expression:"userData.usertype"}},[n("Radio",{attrs:{label:"add"}},[t._v(t._s(t.$L("添加模式")))]),t._v(" "),n("Radio",{attrs:{label:"replace"}},[t._v(t._s(t.$L("流转模式")))]),t._v(" "),n("Radio",{attrs:{label:"merge"}},[t._v(t._s(t.$L("剔除模式")))])],1),t._v(" "),"replace"==t.userData.usertype?n("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("流转到此状态时改变任务负责人为状态负责人,原本的任务负责人移至协助人员。")))]):"merge"==t.userData.usertype?n("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("流转到此状态时改变任务负责人为状态负责人(并保留操作状态的人员),原本的任务负责人移至协助人员。")))]):n("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("流转到此状态时添加状态负责人至任务负责人。")))])],1),t._v(" "),n("FormItem",{attrs:{prop:"userlimit",label:t.$L("限制负责人")}},[n("iSwitch",{attrs:{"true-value":1,"false-value":0},model:{value:t.userData.userlimit,callback:function(e){t.$set(t.userData,"userlimit",e)},expression:"userData.userlimit"}}),t._v(" "),1===t.userData.userlimit?n("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("在此状态的任务状态负责人、项目管理员可以修改状态。")))]):n("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("在此状态的任务任务负责人、项目管理员可以修改状态。")))])],1)],1),t._v(" "),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(e){t.userShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{type:"primary"},on:{click:t.onUser}},[t._v(t._s(t.$L("保存")))])],1)],1)],1)}),[],!1,null,null,null).exports;function j(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 R(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const M={name:"TaskDeleted",props:{projectId:{type:Number,default:0}},data:function(){return{loadIng:0,keys:{},keyIs:!1,columns:[],list:[],page:1,pageSize:20,total:0,noText:""}},mounted:function(){},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.onSearch}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?n("Button",{attrs:{type:"text"},on:{click:function(e){t.keyIs=!1}}},[t._v(t._s(t.$L("取消筛选")))]):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:"table-page-box"},[n("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),t._v(" "),n("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowMax768,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])}),[],!1,null,null,null).exports;function F(t){return F="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},F(t)}const z={name:"GanttView",props:{lists:{type:Array},menuWidth:{type:Number,default:300},itemWidth:{type:Number,default:100}},data:function(){return{mouseType:"",mouseWidth:0,mouseScaleWidth:0,dateWidth:100,ganttWidth:0,mouseItem:null,mouseBak:{},dateMove:null}},mounted:function(){this.dateWidth=this.itemWidth,this.$refs.ganttRight.addEventListener("mousewheel",this.handleScroll,!1),document.addEventListener("mousemove",this.itemMouseMove),document.addEventListener("mouseup",this.itemMouseUp),window.addEventListener("resize",this.handleResize,!1),this.handleResize()},beforeDestroy:function(){this.$refs.ganttRight.removeEventListener("mousewheel",this.handleScroll,!1),document.removeEventListener("mousemove",this.itemMouseMove),document.removeEventListener("mouseup",this.itemMouseUp),window.removeEventListener("resize",this.handleResize,!1)},watch:{itemWidth:function(t){this.dateWidth=t}},computed:{monthNum:function(){var t=this.ganttWidth,e=this.dateWidth;return Math.floor(t/e/30)+2},monthStyle:function(){var t=this.mouseWidth,e=this.dateWidth;return function(n){var r=0==t?0:t/e,o=new Date,i=new Date(o.getFullYear(),o.getMonth(),o.getDate(),0,0,0),a=new Date(i.getTime()+864e5*r),s=new Date(a.getFullYear(),a.getMonth()+1,0,23,59,59),u=e*((s-a)/1e3/60/60/24);return n>0&&(u=(s=new Date(a.getFullYear(),a.getMonth()+1+n,0)).getDate()*e),{width:u+"px"}}},monthFormat:function(){var t=this.mouseWidth,e=this.dateWidth;return function(n){var r=0==t?0:t/e,o=new Date,i=new Date(o.getFullYear(),o.getMonth(),o.getDate(),0,0,0),a=new Date(i.getTime()+864e5*r);return n>0&&(a=new Date(a.getFullYear(),a.getMonth()+1+n,0)),$A.formatDate("Y-m",a)}},dateNum:function(){var t=this.ganttWidth,e=this.dateWidth;return Math.floor(t/e)+2},dateStyle:function(){var t=this.mouseWidth,e=this.dateWidth;return function(n){var r={},o=0==t?0:t/e,i=Math.floor(o)+n;o==Math.floor(o)&&i--;var a=0==t?n-1:i,s=new Date((new Date).getTime()+864e5*a);-1!==[0,6].indexOf(s.getDay())&&(r.backgroundColor="#f9fafb");var u=e;return 0==n&&(u=Math.abs((t%u-u)%u)),r.width=u+"px",r}},dateFormat:function(){var t=this.mouseWidth,e=this.dateWidth;return function(n,r){var o=0==t?0:t/e,i=Math.floor(o)+n;o==Math.floor(o)&&i--;var a=0==t?n-1:i,s=new Date((new Date).getTime()+864e5*a);return"day"==r?s.getDate():"week"==r?this.$L("星期".concat("日一二三四五六".charAt(s.getDay()))):s}},itemStyle:function(){var t=this.mouseWidth,e=this.dateWidth,n=this.ganttWidth;return function(r){var o=r.time,i=o.start,a=o.end,s=r.style,u=r.moveX,c=r.moveW,l=new Date,d=new Date(l.getFullYear(),l.getMonth(),l.getDate(),0,0,0).getTime(),f=(i-d)/1e3/60/60/24,m=e*f+-1*t,p=e*((a-d)/1e3/60/60/24-f);"number"==typeof u&&(m+=u),"number"==typeof c&&(p+=c);var h={left:Math.min(Math.max(m,-1.2*p),1.2*n).toFixed(2)+"px",width:p.toFixed(2)+"px"};return m<0&&Math.abs(m)n&&me.scrollHeight-e.clientHeight&&(n=e.scrollHeight-e.clientHeight),e.scrollTop!=n&&(this.mouseType="timeline",e.scrollTop=n)}0!=t.deltaX&&(this.mouseWidth+=t.deltaX,this.mouseScaleWidth+=t.deltaX*(100/this.dateWidth))},handleResize:function(){this.ganttWidth=this.$refs.ganttTimeline.clientWidth},dateMouseDown:function(t){t.preventDefault(),this.mouseItem=null,this.dateMove={clientX:t.clientX}},itemMouseDown:function(t,e){t.preventDefault();var n="moveX";"timeline-resizer"==t.target.className&&(n="moveW"),"number"!=typeof e[n]&&this.$set(e,n,0),this.mouseBak={type:n,clientX:t.clientX,value:e[n]},this.mouseItem=e,this.dateMove=null},itemMouseMove:function(t){if(null!=this.mouseItem){t.preventDefault();var e=this.mouseBak.value+(t.clientX-this.mouseBak.clientX);if("moveW"===this.mouseBak.type){var n=864e5/this.dateWidth,r=this.mouseItem.time,o=r.start;if(r.end+e*n-o<=0)return}this.$set(this.mouseItem,this.mouseBak.type,e)}else if(null!=this.dateMove){t.preventDefault();var i=5*(this.dateMove.clientX-t.clientX);this.dateMove.clientX=t.clientX,this.mouseWidth+=i,this.mouseScaleWidth+=i*(100/this.dateWidth)}},itemMouseUp:function(t){if(null!=this.mouseItem){var e=this.mouseItem.time,n=e.start,r=e.end,o=!1,i=864e5/this.dateWidth;if("number"==typeof this.mouseItem.moveX&&0!=this.mouseItem.moveX){var a=this.mouseItem.moveX*i;this.$set(this.mouseItem.time,"start",n+a),this.$set(this.mouseItem.time,"end",r+a),this.$set(this.mouseItem,"moveX",0),o=!0}if("number"==typeof this.mouseItem.moveW&&0!=this.mouseItem.moveW){var s=this.mouseItem.moveW*i;this.$set(this.mouseItem.time,"end",r+s),this.$set(this.mouseItem,"moveW",0),o=!0}o?this.$emit("on-change",this.mouseItem):"timeline-title"==t.target.className&&this.clickItem(this.mouseItem),this.mouseItem=null}else null!=this.dateMove&&(this.dateMove=null)},scrollPosition:function(t){var e=new Date,n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),r=864e5/this.dateWidth,o=(this.lists[t].time.start-n)/r-this.dateWidth-this.mouseWidth;this.mouseWidth+=o,this.mouseScaleWidth+=o*(100/this.dateWidth)},clickItem:function(t){this.$emit("on-click",t)}}};var U=n(93379),H=n.n(U),V=n(79514),W={insert:"head",singleton:!1};H()(V.Z,W);V.Z.locals;function q(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 Y(t){for(var e=1;e46?n("div",{staticClass:"format-week"},[t._v(t._s(t.dateFormat(r,"week")))]):t._e()])])})),0),t._v(" "),n("ul",{ref:"ganttTimeline",staticClass:"gantt-timeline",on:{scroll:t.timelineScrollListener,mouseenter:function(e){t.mouseType="timeline"}}},t._l(t.lists,(function(e,r){return n("li",{key:r},[n("div",{staticClass:"timeline-item",style:t.itemStyle(e),on:{mousedown:function(n){return t.itemMouseDown(n,e)}}},[n("div",{staticClass:"timeline-title",attrs:{title:e.label}},[t._v(t._s(e.label))]),t._v(" "),n("div",{staticClass:"timeline-resizer"})])])})),0)])])])}),[],!1,null,"53625f84",null).exports},props:{projectColumn:{default:[]},flowInfo:{default:{}}},data:function(){return{lists:[],filtrProjectId:0,editColumns:[{title:this.$L("任务名称"),key:"label",minWidth:150,ellipsis:!0},{title:this.$L("原计划时间"),minWidth:135,align:"center",render:function(t,e){var n=e.row;return!0===n.notime?t("span","-"):t("div",{style:{}},[t("div",$A.formatDate("Y-m-d H:i",Math.round(n.baktime.start/1e3))),t("div",$A.formatDate("Y-m-d H:i",Math.round(n.baktime.end/1e3)))])}},{title:this.$L("新计划时间"),minWidth:135,align:"center",render:function(t,e){var n=e.row;return t("div",{style:{}},[t("div",$A.formatDate("Y-m-d H:i",Math.round(n.newTime.start/1e3))),t("div",$A.formatDate("Y-m-d H:i",Math.round(n.newTime.end/1e3)))])}}],editData:[],editLoad:0,editShowInfo:!1}},mounted:function(){this.initData()},computed:Y(Y(Y({},(0,r.rn)(["userId","windowWidth","taskPriority"])),(0,r.Se)(["projectParameter"])),{},{menuWidth:function(){return this.windowWidth<1440?180:260},dropStyle:function(){return this.windowWidth<1440?{left:"142px"}:{}},completedTask:function(){return this.projectParameter("completedTask")}}),watch:{projectColumn:{handler:function(){this.initData()},deep:!0},flowInfo:{handler:function(){this.initData()},deep:!0},completedTask:function(){this.initData()}},methods:{initData:function(){this.lists=[],this.projectColumn&&this.projectColumn.some(this.checkAdd)},filtrLength:function(t){var e=this;return t.filter((function(t){return!(t.complete_at&&!e.completedTask)&&!(e.flowInfo.value>0&&t.flow_item_id!==e.flowInfo.value)})).length},checkAdd:function(t){var e=this;this.filtrProjectId>0&&t.id!=this.filtrProjectId||t.tasks&&t.tasks.some((function(t){var n=!t.start_at||!t.end_at,r=e.getTimeObj(t),o=r.start,i=r.end;if(t.complete_at&&!e.completedTask)return!1;if(e.flowInfo.value>0&&t.flow_item_id!==e.flowInfo.value)return!1;var a="#058ce4";e.taskPriority.some((function(e){if(e.priority===t.p_level)return a=e.color,!0}));var s={start:o,end:i},u=$A.cloneJSON(s),c=e.editData.find((function(e){return e.id==t.id}));c&&(s=$A.cloneJSON(c.newTime)),e.lists.push({id:t.id,label:t.name,complete:t.complete_at,overdue:t.overdue,time:s,notime:n,baktime:u,style:{background:a}})}))},onChange:function(t){var e=t.time,n=t.baktime;if(Math.abs(n.end-e.end)>1e3||Math.abs(n.start-e.start)>1e3){var r=this.editData.find((function(e){return e.id==t.id}));r?r.newTime=e:this.editData.push({id:t.id,label:t.label,notime:t.notime,baktime:t.baktime,newTime:e})}},onClick:function(t){this.$store.dispatch("openTask",t)},editSubmit:function(t){var e=this;this.editData&&this.editData.forEach((function(n){var r=e.lists.find((function(t){return t.id==n.id}));if(t){e.editLoad++;var o=$A.formatDate("Y-m-d H:i",Math.round(n.newTime.start/1e3)),i=$A.formatDate("Y-m-d H:i",Math.round(n.newTime.end/1e3)),a={task_id:n.id,times:[o,i]};e.$store.dispatch("taskUpdate",a).then((function(t){var n=t.msg;e.editLoad--,0===e.editLoad&&$A.messageSuccess(n),r&&e.$set(r,"baktime",$A.cloneJSON(r.time))})).catch((function(t){var n=t.msg;e.editLoad--,0===e.editLoad&&$A.modalError(n),r&&e.$set(r,"time",$A.cloneJSON(r.baktime))}))}else r&&e.$set(r,"time",$A.cloneJSON(r.baktime))})),this.editData=[]},getRawTime:function(t){var e=this.lists.find((function(e){return e.id==t}));return e?this.getTimeObj(e):null},getTimeObj:function(t){var e=$A.Time(t.start_at)||$A.Time(t.created_at),n=$A.Time(t.end_at)||$A.Time(t.created_at)+86400;return n==e&&(n=Math.round(new Date($A.formatDate("Y-m-d 23:59:59",n)).getTime()/1e3)),n=Math.max(n,e+60),{start:e*=1e3,end:n*=1e3}},onSwitchColumn:function(t){this.filtrProjectId=$A.runNum(t),this.initData()}}};const G=(0,v.Z)(K,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"project-gstc-gantt"},[n("GanttView",{attrs:{lists:t.lists,menuWidth:t.menuWidth,itemWidth:80},on:{"on-change":t.onChange,"on-click":t.onClick}}),t._v(" "),n("Dropdown",{staticClass:"project-gstc-dropdown-filtr",style:t.dropStyle,attrs:{trigger:"click"},on:{"on-click":t.onSwitchColumn}},[n("Icon",{staticClass:"project-gstc-dropdown-icon",class:{filtr:t.filtrProjectId>0},attrs:{type:"md-funnel"}}),t._v(" "),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[n("DropdownItem",{class:{"dropdown-active":0==t.filtrProjectId},attrs:{name:0}},[t._v(t._s(t.$L("全部")))]),t._v(" "),t._l(t.projectColumn,(function(e,r){return n("DropdownItem",{key:r,class:{"dropdown-active":t.filtrProjectId==e.id},attrs:{name:e.id}},[t._v("\n "+t._s(e.name)+"\n "),e.tasks?n("span",[t._v("("+t._s(t.filtrLength(e.tasks))+")")]):t._e()])}))],2)],1),t._v(" "),n("div",{staticClass:"project-gstc-edit",class:{info:t.editShowInfo,visible:t.editData&&t.editData.length>0}},[n("div",{staticClass:"project-gstc-edit-info"},[n("Table",{attrs:{size:"small","max-height":"600",columns:t.editColumns,data:t.editData}}),t._v(" "),n("div",{staticClass:"project-gstc-edit-btns"},[n("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"text"},on:{click:function(e){return t.editSubmit(!1)}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"primary"},on:{click:function(e){return t.editSubmit(!0)}}},[t._v(t._s(t.$L("保存")))]),t._v(" "),n("Icon",{staticClass:"zoom",attrs:{type:"md-arrow-dropright"},on:{click:function(e){t.editShowInfo=!1}}})],1)],1),t._v(" "),n("div",{staticClass:"project-gstc-edit-small"},[n("div",{staticClass:"project-gstc-edit-text",on:{click:function(e){t.editShowInfo=!0}}},[t._v(t._s(t.$L("未保存计划时间"))+": "),t.editData?n("span",[t._v(t._s(t.editData.length))]):t._e()]),t._v(" "),n("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"text"},on:{click:function(e){return t.editSubmit(!1)}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{loading:t.editLoad>0,size:"small",type:"primary"},on:{click:function(e){return t.editSubmit(!0)}}},[t._v(t._s(t.$L("保存")))])],1)])],1)}),[],!1,null,null,null).exports;function Z(t){return function(t){if(Array.isArray(t))return J(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return J(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 J(t,e)}(t)||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 J(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&(n=n.filter((function(t){return t.flow_item_id===e.value}))),t&&(n=n.filter((function(e){var n=e.name,r=e.desc;return $A.strExists(n,t)||$A.strExists(r,t)}))),n}},projectUser:function(){var t=this.projectData,e=this.windowWidth;if(!t.project_user)return[];var n=e>1200?8:3,r=t.project_user.filter((function(e){return e.userid!=t.owner_userid}));if(r.length<=n)return r;var o=r.slice(0,n-1);return o.push({userid:-1}),o.push(r[r.length-1]),o},allTask:function(){var t=this.cacheTasks,e=this.projectId;return t.filter((function(t){return!t.archived_at&&t.project_id==e}))},columnList:function(){var t=this,e=this.projectId,n=this.cacheColumns,r=this.allTask,o=n.filter((function(t){return t.project_id==e})).sort((function(t,e){return t.sort!=e.sort?t.sort-e.sort:t.id-e.id}));return o.forEach((function(e){e.tasks=t.transforTasks(r.filter((function(t){return t.column_id==e.id}))).sort((function(t,e){return t.complete_at||e.complete_at?$A.Date(t.complete_at)-$A.Date(e.complete_at):t.sort!=e.sort?t.sort-e.sort:t.id-e.id}))})),o},myList:function(){var t=this,e=this.allTask,n=this.taskCompleteTemps,r=this.sortField,o=this.sortType,i=e.filter((function(e){return t.myFilter(e)}));if(n.length>0){var a,s=e.filter((function(e){return n.includes(e.id)&&t.myFilter(e,!1)}));if(s.length>0)(a=i=$A.cloneJSON(i)).push.apply(a,Z(s))}return i.sort((function(t,e){if("asc"==o){var n=[e,t];t=n[0],e=n[1]}return"level"==r?t.p_level-e.p_level:"end_at"==r?t.end_at==e.end_at?t.p_level-e.p_level:$A.Date(t.end_at||"2099-12-31 23:59:59")-$A.Date(e.end_at||"2099-12-31 23:59:59"):void 0}))},helpList:function(){var t=this,e=this.allTask,n=this.taskCompleteTemps,r=this.sortField,o=this.sortType,i=e.filter((function(e){return t.helpFilter(e)}));if(n.length>0){var a,s=e.filter((function(e){return n.includes(e.id)&&t.helpFilter(e,!1)}));if(s.length>0)(a=i=$A.cloneJSON(i)).push.apply(a,Z(s))}return i.sort((function(t,e){if("asc"==o){var n=[e,t];t=n[0],e=n[1]}return"level"==r?t.p_level-e.p_level:"end_at"==r?t.end_at==e.end_at?t.p_level-e.p_level:$A.Date(t.end_at||"2099-12-31 23:59:59")-$A.Date(e.end_at||"2099-12-31 23:59:59"):void 0}))},unList:function(){var t=this.allTask,e=this.searchText,n=this.sortField,r=this.sortType,o=this.flowInfo;return t.filter((function(t){return!(t.parent_id>0)&&(!(o.value>0&&t.flow_item_id!==o.value)&&(!(e&&!$A.strExists(t.name,e)&&!$A.strExists(t.desc,e))&&!t.complete_at))})).sort((function(t,e){if("asc"==r){var o=[e,t];t=o[0],e=o[1]}return"level"==n?t.p_level-e.p_level:"end_at"==n?t.end_at==e.end_at?t.p_level-e.p_level:$A.Date(t.end_at||"2099-12-31 23:59:59")-$A.Date(e.end_at||"2099-12-31 23:59:59"):void 0}))},completedList:function(){var t=this.allTask,e=this.searchText,n=this.flowInfo;return t.filter((function(t){return!(t.parent_id>0)&&(!(n.value>0&&t.flow_item_id!==n.value)&&(!(e&&!$A.strExists(t.name,e)&&!$A.strExists(t.desc,e))&&t.complete_at))})).sort((function(t,e){var n=$A.Date(t.complete_at);return $A.Date(e.complete_at)-n}))},completedCount:function(){return this.allTask.filter((function(t){return!(t.parent_id>0)&&t.complete_at})).length},flowTitle:function(){var t=this.flowInfo,e=this.allTask;return t.value?t.label:"".concat(this.$L("全部")," (").concat(e.length,")")},flowData:function(){var t=this.flowList,e=this.allTask,n=[{value:0,label:"".concat(this.$L("全部")," (").concat(e.length,")"),children:[]}],r=t.map((function(t){return{value:t.id,label:t.name,status:t.status,children:t.project_flow_item.map((function(t){var n=e.filter((function(e){return e.flow_item_id==t.id})).length;return{value:t.id,label:"".concat(t.name," (").concat(n,")"),status:t.status,class:t.status}}))}}));return 1===r.length?n.push.apply(n,Z(r[0].children)):r.length>0&&n.push.apply(n,Z(r)),n}}),watch:{projectData:function(){this.sortData=this.getSort()},projectLoad:function(t){var e=this;this._loadTimeout&&clearTimeout(this._loadTimeout),t>0?this._loadTimeout=setTimeout((function(){e.loading=!0}),1e3):this.loading=!1},projectId:{handler:function(t){t>0&&this.getFlowData()},immediate:!0}},methods:{searchFocus:function(){var t=this;this.$nextTick((function(){t.$refs.searchInput.focus({cursor:"end"})}))},getSort:function(){var t=[];return this.columnList.forEach((function(e){t.push({id:e.id,task:e.tasks.map((function(t){return t.id}))})})),t},sortUpdate:function(t){var e=this,n=this.sortData,r=this.getSort();if(JSON.stringify(n)!==JSON.stringify(r)){this.sortData=r;var o={project_id:this.projectId,sort:this.sortData,only_column:!0===t?1:0};this.sortDisabled=!0,this.$store.dispatch("call",{url:"project/sort",data:o}).then((function(t){var n=t.msg;$A.messageSuccess(n),e.sortDisabled=!1;var r,i=[];o.only_column?(r=-1,o.sort.forEach((function(t){r++,i.push({id:t.id,sort:r})})),e.$store.dispatch("saveColumn",i)):(o.sort.forEach((function(t){r=-1,i.push.apply(i,Z(t.task.map((function(n){return r++,i.push.apply(i,Z(e.allTask.filter((function(t){return t.parent_id==n})).map((function(e){return{id:e.id,sort:r,column_id:t.id}})))),{id:n,sort:r,column_id:t.id}}))))})),e.$store.dispatch("saveTask",i))})).catch((function(t){var n=t.msg;$A.modalError(n),e.sortDisabled=!1,e.$store.dispatch("getTaskForProject",e.projectId).catch((function(){}))}))}},addTopShow:function(t,e){this.$set(this.columnTopShow,t,e),e&&(this.$refs["column_"+t][0].scrollTop=0)},addTaskOpen:function(t){d.Store.set("addTask",t)},addColumnOpen:function(){var t=this;this.addColumnShow=!0,this.$nextTick((function(){t.$refs.addColumnName.focus()}))},addColumnBlur:function(){""===this.addColumnName&&(this.addColumnShow=!1)},addColumnSubmit:function(){var t=this,e=this.addColumnName.trim();""!==e&&this.$store.dispatch("call",{url:"project/column/add",data:{project_id:this.projectId,name:e}}).then((function(e){var n=e.data,r=e.msg;$A.messageSuccess(r),t.addColumnName="",t.$store.dispatch("saveColumn",n)})).catch((function(t){var e=t.msg;$A.modalError(e)}))},dropColumn:function(t,e){"title"===e?this.titleColumn(t):"remove"===e?this.removeColumn(t):e.name&&this.updateColumn(t,{color:e.color})},titleColumn:function(t){var e=this;$A.modalInput({value:t.name,title:"修改列表",placeholder:"输入列表名称",onOk:function(n){return n&&e.updateColumn(t,{name:n}),!0}})},updateColumn:function(t,e){var n=this;!0!==this.columnLoad[t.id]&&(this.$set(this.columnLoad,t.id,!0),Object.keys(e).forEach((function(r){return n.$set(t,r,e[r])})),this.$store.dispatch("call",{url:"project/column/update",data:Object.assign(e,{column_id:t.id})}).then((function(e){var r=e.data;n.$set(n.columnLoad,t.id,!1),n.$store.dispatch("saveColumn",r)})).catch((function(e){var r=e.msg;n.$set(n.columnLoad,t.id,!1),n.$store.dispatch("getColumns",n.projectId).catch((function(){})),$A.modalError(r)})))},removeColumn:function(t){var e=this;$A.modalConfirm({title:"删除列表",content:"你确定要删除列表【"+t.name+"】及列表内的任务吗?",loading:!0,onOk:function(){!0!==e.columnLoad[t.id]&&(e.$set(e.columnLoad,t.id,!0),e.$store.dispatch("removeColumn",t.id).then((function(n){n.data;var r=n.msg;$A.messageSuccess(r),e.$set(e.columnLoad,t.id,!1),e.$Modal.remove()})).catch((function(n){var r=n.msg;$A.modalError(r,301),e.$set(e.columnLoad,t.id,!1),e.$Modal.remove()})))}})},onSort:function(t){this.sortField=t,this.sortType="desc"==this.sortType?"asc":"desc"},onSetting:function(){var t=this;this.settingLoad++,this.$store.dispatch("call",{url:"project/update",data:Object.assign(this.settingData,{project_id:this.projectId})}).then((function(e){var n=e.data,r=e.msg;$A.messageSuccess(r),t.settingLoad--,t.settingShow=!1,t.$store.dispatch("saveProject",n)})).catch((function(e){var n=e.msg;$A.modalError(n),t.settingLoad--}))},onUser:function(){var t=this;this.userLoad++,this.$store.dispatch("call",{url:"project/user",data:{project_id:this.projectId,userid:this.userData.userids}}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.userLoad--,t.userShow=!1,t.$store.dispatch("getProjectOne",t.projectId).catch((function(){})),t.$store.dispatch("getTaskForProject",t.projectId).catch((function(){}))})).catch((function(e){var n=e.msg;$A.modalError(n),t.userLoad--}))},onTransfer:function(){var t=this;this.transferLoad++,this.$store.dispatch("call",{url:"project/transfer",data:{project_id:this.projectId,owner_userid:this.transferData.owner_userid[0]}}).then((function(e){var n=e.msg;$A.messageSuccess(n),t.transferLoad--,t.transferShow=!1,t.$store.dispatch("getProjectOne",t.projectId).catch((function(){})),t.$store.dispatch("getTaskForProject",t.projectId).catch((function(){}))})).catch((function(e){var n=e.msg;$A.modalError(n),t.transferLoad--}))},onArchived:function(){var t=this;$A.modalConfirm({title:"归档项目",content:"你确定要归档项目【"+this.projectData.name+"】吗?",loading:!0,onOk:function(){t.$store.dispatch("archivedProject",t.projectId).then((function(e){var n=e.msg;$A.messageSuccess(n),t.$Modal.remove()})).catch((function(e){var n=e.msg;$A.modalError(n,301),t.$Modal.remove()}))}})},onDelete:function(){var t=this;$A.modalConfirm({title:"删除项目",content:"你确定要删除项目【"+this.projectData.name+"】吗?",loading:!0,onOk:function(){t.$store.dispatch("removeProject",t.projectId).then((function(e){var n=e.msg;$A.messageSuccess(n),t.$Modal.remove()})).catch((function(e){var n=e.msg;$A.modalError(n,301),t.$Modal.remove()}))}})},onExit:function(){var t=this;$A.modalConfirm({title:"退出项目",content:"你确定要退出项目【"+this.projectData.name+"】吗?",loading:!0,onOk:function(){t.$store.dispatch("exitProject",t.projectId).then((function(e){var n=e.msg;$A.messageSuccess(n),t.$Modal.remove()})).catch((function(e){var n=e.msg;$A.modalError(n,301),t.$Modal.remove()}))}})},projectDropdown:function(t){var e=this;switch(t){case"setting":this.$set(this.settingData,"name",this.projectData.name),this.$set(this.settingData,"desc",this.projectData.desc),this.settingShow=!0,this.$nextTick((function(){e.$refs.projectName.focus(),setTimeout(e.$refs.projectDesc.resizeTextarea,0)}));break;case"user":if(this.projectData.owner_userid!==this.userId)return;var n=this.projectData.project_user.map((function(t){return t.userid}));this.$set(this.userData,"userids",n),this.$set(this.userData,"useridbak",n),this.$set(this.userData,"uncancelable",[this.projectData.owner_userid]),this.userShow=!0;break;case"invite":this.inviteData={},this.inviteShow=!0,this.inviteGet();break;case"workflow":this.workflowShow=!0;break;case"log":this.logShow=!0;break;case"archived_task":this.archivedTaskShow=!0;break;case"deleted_task":this.deletedTaskShow=!0;break;case"transfer":this.$set(this.transferData,"owner_userid",[this.projectData.owner_userid]),this.transferShow=!0;break;case"archived":this.onArchived();break;case"delete":this.onDelete();break;case"exit":this.onExit()}},openTask:function(t,e){this.$store.dispatch("openTask",t),!0===e&&setTimeout((function(){d.Store.set("receiveTask",!0)}),300)},openMenu:function(t){var e=this.$refs["taskMenu_".concat(t.id)];e&&e[0].handleClick()},taskIsHidden:function(t){var e=t.name,n=t.desc,r=t.complete_at,o=this.searchText,i=this.flowInfo;return!(this.projectParameter("completedTask")||!r)||(i.value>0&&t.flow_item_id!==i.value||!(!o||$A.strExists(e,o)||$A.strExists(n,o)))},ownerUser:function(t){return t.filter((function(t){return 1==t.owner})).sort((function(t,e){return t.id-e.id}))},inviteGet:function(t){var e=this;this.inviteLoad++,this.$store.dispatch("call",{url:"project/invite",data:{project_id:this.projectId,refresh:!0===t?"yes":"no"}}).then((function(t){var n=t.data;e.inviteLoad--,e.inviteData=n,e.inviteCopy()})).catch((function(t){var n=t.msg;$A.modalError(n),e.inviteLoad--}))},getFlowData:function(){var t=this;this.flowInfo={},this.$store.dispatch("call",{url:"project/flow/list",data:{project_id:this.projectId}}).then((function(e){var n=e.data;t.flowList=n})).catch((function(){t.flowList=[]}))},flowChange:function(t,e){this.flowInfo=e.pop()},inviteCopy:function(){var t=this;this.inviteData.url&&this.$copyText(this.inviteData.url).then((function(){$A.messageSuccess(t.$L("复制成功!"))}),(function(){$A.messageError(t.$L("复制失败!"))}))},inviteFocus:function(){this.$refs.inviteInput.focus({cursor:"all"})},toggleCompleted:function(){this.$store.dispatch("forgetTaskCompleteTemp",!0),this.$store.dispatch("toggleProjectParameter","completedTask")},workflowBeforeClose:function(){var t=this;return new Promise((function(e){t.$refs.workflow.existDiff()?$A.modalConfirm({content:"设置尚未保存,是否放弃修改?",cancelText:"取消",okText:"放弃",onOk:function(){e()}}):e()}))},myFilter:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!(!this.projectParameter("completedTask")&&!0===e&&t.complete_at)&&(!(this.flowInfo.value>0&&t.flow_item_id!==this.flowInfo.value)&&(!(this.searchText&&!$A.strExists(t.name,this.searchText)&&!$A.strExists(t.desc,this.searchText))&&t.owner))},helpFilter:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!(t.parent_id>0)&&(!(!this.projectParameter("completedTask")&&!0===n&&t.complete_at)&&(!(this.flowInfo.value>0&&t.flow_item_id!==this.flowInfo.value)&&(!(this.searchText&&!$A.strExists(t.name,this.searchText)&&!$A.strExists(t.desc,this.searchText))&&(t.task_user&&t.task_user.find((function(t){var n=t.userid,r=t.owner;return n==e.userId&&0==r}))))))},expiresFormat:function(t){return $A.countDownFormat(t,this.nowTime)},tabTypeChange:function(t){switch(t){case"column":this.$store.dispatch("toggleProjectParameter",{project_id:this.projectId,key:"menuType",value:"column"});break;case"table":this.$store.dispatch("toggleProjectParameter",{project_id:this.projectId,key:"menuType",value:"table"});break;case"gantt":this.$store.dispatch("toggleProjectParameter",{project_id:this.projectId,key:"menuType",value:"gantt"})}}}};const rt=(0,v.Z)(nt,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"project-list",class:[t.tabTypeActive]},[n("PageTitle",{attrs:{title:t.projectData.name}}),t._v(" "),n("div",{staticClass:"project-head"},[n("div",{staticClass:"project-titbox"},[n("div",{staticClass:"project-title"},[n("h1",[t._v(t._s(t.projectData.name))]),t._v(" "),t.projectData.top_at?n("label",{staticClass:"top-text"},[t._v(t._s(t.$L("置顶")))]):t._e(),t._v(" "),t.loading?n("div",{staticClass:"project-load"},[n("Loading")],1):t._e()]),t._v(" "),n("ul",{staticClass:"project-icons"},[n("li",{staticClass:"project-avatar",class:{"cursor-default":t.projectData.owner_userid!==t.userId},on:{click:function(e){return t.projectDropdown("user")}}},[n("ul",[n("li",[n("UserAvatar",{attrs:{userid:t.projectData.owner_userid,size:36,borderWitdh:2,openDelay:0}},[n("p",[t._v(t._s(t.$L("项目负责人")))])]),t._v(" "),(t.windowWidth<=980||t.projectParameter("chat"))&&t.projectUser.length>0?n("Badge",{attrs:{type:"normal",count:t.projectData.project_user.length}}):t._e()],1),t._v(" "),t._l(t.projectUser,(function(e){return!(t.windowWidth<=980||t.projectParameter("chat"))&&t.projectUser.length>0?[-1===e.userid?n("li",{staticClass:"more"},[n("ETooltip",{attrs:{content:t.$L("共"+t.projectData.project_user.length+"个成员")}},[n("Icon",{attrs:{type:"ios-more"}})],1)],1):n("li",[n("UserAvatar",{attrs:{userid:e.userid,size:36,borderWitdh:2,openDelay:0}})],1)]:t._e()}))],2)]),t._v(" "),n("li",{staticClass:"project-icon",on:{click:function(e){return t.addTaskOpen(0)}}},[n("ETooltip",{attrs:{content:t.$L("添加任务")}},[n("Icon",{staticClass:"menu-icon",attrs:{type:"md-add"}})],1)],1),t._v(" "),n("li",{class:["project-icon",""!=t.searchText?"active":""]},[n("Tooltip",{attrs:{always:""!=t.searchText,theme:"light",rawIndex:10},on:{"on-popper-show":t.searchFocus}},[n("Icon",{staticClass:"menu-icon",attrs:{type:"ios-search"},on:{click:t.searchFocus}}),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("Input",{ref:"searchInput",staticClass:"search-input",attrs:{placeholder:t.$L("名称、描述..."),clearable:""},model:{value:t.searchText,callback:function(e){t.searchText=e},expression:"searchText"}})],1)],1)],1),t._v(" "),n("li",{class:["project-icon",t.projectParameter("chat")?"active":""],on:{click:function(e){return t.$store.dispatch("toggleProjectParameter","chat")}}},[n("Icon",{staticClass:"menu-icon",attrs:{type:"ios-chatbubbles"}}),t._v(" "),n("Badge",{staticClass:"menu-badge",attrs:{count:t.msgUnread}})],1),t._v(" "),n("li",{staticClass:"project-icon"},[n("EDropdown",{attrs:{trigger:"click",transfer:""},on:{command:t.projectDropdown}},[n("Icon",{staticClass:"menu-icon",attrs:{type:"ios-more"}}),t._v(" "),t.projectData.owner_userid===t.userId?n("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[n("EDropdownItem",{attrs:{command:"setting"}},[t._v(t._s(t.$L("项目设置")))]),t._v(" "),n("EDropdownItem",{attrs:{command:"workflow"}},[t._v(t._s(t.$L("工作流设置")))]),t._v(" "),n("EDropdownItem",{attrs:{command:"user",divided:""}},[t._v(t._s(t.$L("成员管理")))]),t._v(" "),n("EDropdownItem",{attrs:{command:"invite"}},[t._v(t._s(t.$L("邀请链接")))]),t._v(" "),n("EDropdownItem",{attrs:{command:"log",divided:""}},[t._v(t._s(t.$L("项目动态")))]),t._v(" "),n("EDropdownItem",{attrs:{command:"archived_task"}},[t._v(t._s(t.$L("已归档任务")))]),t._v(" "),n("EDropdownItem",{attrs:{command:"deleted_task"}},[t._v(t._s(t.$L("已删除任务")))]),t._v(" "),n("EDropdownItem",{attrs:{command:"transfer",divided:""}},[t._v(t._s(t.$L("移交项目")))]),t._v(" "),n("EDropdownItem",{attrs:{command:"archived"}},[t._v(t._s(t.$L("归档项目")))]),t._v(" "),n("EDropdownItem",{staticStyle:{color:"#f40"},attrs:{command:"delete"}},[t._v(t._s(t.$L("删除项目")))])],1):n("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[n("EDropdownItem",{attrs:{command:"log"}},[t._v(t._s(t.$L("项目动态")))]),t._v(" "),n("EDropdownItem",{attrs:{command:"archived_task"}},[t._v(t._s(t.$L("已归档任务")))]),t._v(" "),n("EDropdownItem",{attrs:{command:"deleted_task"}},[t._v(t._s(t.$L("已删除任务")))]),t._v(" "),n("EDropdownItem",{staticStyle:{color:"#f40"},attrs:{command:"exit",divided:""}},[t._v(t._s(t.$L("退出项目")))])],1)],1)],1)])]),t._v(" "),n("div",{staticClass:"project-subbox clearfix"},[n("div",{staticClass:"project-subtitle"},[t._v(t._s(t.projectData.desc))]),t._v(" "),n("div",{staticClass:"project-switch"},[t.completedCount>0?n("div",{staticClass:"project-checkbox"},[n("Checkbox",{attrs:{value:t.projectParameter("completedTask")},on:{"on-change":t.toggleCompleted}},[t._v(t._s(t.$L("显示已完成")))])],1):t._e(),t._v(" "),t.flowList.length>0?n("div",{staticClass:"project-select"},[n("Cascader",{attrs:{data:t.flowData,"transfer-class-name":"project-list-flow-cascader",transfer:""},on:{"on-change":t.flowChange}},[n("span",{class:"project-flow "+t.flowInfo.status},[t._v(t._s(t.flowTitle))])])],1):t._e(),t._v(" "),n("div",{staticClass:"project-switch-button"},[n("div",{staticClass:"slider",style:t.tabTypeStyle}),t._v(" "),n("div",{class:{active:"column"===t.tabTypeActive},on:{click:function(e){return t.tabTypeChange("column")}}},[n("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),n("div",{class:{active:"table"===t.tabTypeActive},on:{click:function(e){return t.tabTypeChange("table")}}},[n("i",{staticClass:"taskfont"},[t._v("")])]),t._v(" "),n("div",{class:{active:"gantt"===t.tabTypeActive},on:{click:function(e){return t.tabTypeChange("gantt")}}},[n("i",{staticClass:"taskfont"},[t._v("")])])])])])]),t._v(" "),"column"===t.tabTypeActive?n("div",{staticClass:"project-column"},[n("Draggable",{staticClass:"column-list",attrs:{list:t.columnList,animation:150,disabled:t.sortDisabled||!t.isDesktop,tag:"ul",draggable:".column-item"},on:{sort:function(e){return t.sortUpdate(!0)}}},[t._l(t.columnList,(function(e){return n("li",{staticClass:"column-item"},[n("div",{class:["column-head",e.color?"custom-color":""],style:e.color?{backgroundColor:e.color}:{}},[n("div",{staticClass:"column-head-title"},[n("AutoTip",[t._v(t._s(e.name))]),t._v(" "),n("em",[t._v("("+t._s(t.panelTask(e.tasks).length)+")")])],1),t._v(" "),n("div",{staticClass:"column-head-icon"},[!0===t.columnLoad[e.id]?n("div",{staticClass:"loading"},[n("Loading")],1):n("EDropdown",{attrs:{trigger:"click",size:"small"},on:{command:function(n){return t.dropColumn(e,n)}}},[n("Icon",{attrs:{type:"ios-more"}}),t._v(" "),n("EDropdownMenu",{staticClass:"project-list-more-dropdown-menu",attrs:{slot:"dropdown"},slot:"dropdown"},[n("EDropdownItem",{attrs:{command:"title"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-create"}}),t._v(t._s(t.$L("修改"))+"\n ")],1)]),t._v(" "),n("EDropdownItem",{attrs:{command:"remove"}},[n("div",{staticClass:"item"},[n("Icon",{attrs:{type:"md-trash"}}),t._v(t._s(t.$L("删除"))+"\n ")],1)]),t._v(" "),t._l(t.$store.state.columnColorList,(function(r,o){return n("EDropdownItem",{key:o,attrs:{divided:0==o,command:r}},[n("div",{staticClass:"item"},[n("i",{staticClass:"taskfont",style:{color:r.color},domProps:{innerHTML:t._s(r.color==e.color?"":"")}}),t._v(t._s(t.$L(r.name))+"\n ")])])}))],2)],1),t._v(" "),n("Icon",{staticClass:"last",attrs:{type:"md-add"},on:{click:function(n){return t.addTopShow(e.id,!0)}}})],1)]),t._v(" "),n("div",{ref:"column_"+e.id,refInFor:!0,staticClass:"column-task overlay-y"},[t.columnTopShow[e.id]?n("div",{staticClass:"task-item additem"},[n("TaskAddSimple",{attrs:{"column-id":e.id,"project-id":t.projectId,"add-top":!0,"auto-active":""},on:{"on-close":function(n){return t.addTopShow(e.id,!1)},"on-priority":t.addTaskOpen}})],1):t._e(),t._v(" "),n("Draggable",{staticClass:"task-list",attrs:{list:e.tasks,animation:150,disabled:t.sortDisabled||!t.isDesktop,draggable:".task-draggable",filter:".complete",group:"task"},on:{sort:t.sortUpdate,remove:t.sortUpdate}},[t._l(e.tasks,(function(e){return n("div",{class:["task-item task-draggable",e.complete_at?"complete":"",t.taskIsHidden(e)?"hidden":""],style:e.color?{backgroundColor:e.color}:{},on:{click:function(n){return t.openTask(e)}}},[n("div",{class:["task-head",e.desc?"has-desc":""]},[n("div",{staticClass:"task-title"},[e.flow_item_name?n("span",{class:e.flow_item_status,on:{click:function(n){return n.stopPropagation(),t.openMenu(e)}}},[t._v(t._s(e.flow_item_name))]):t._e(),t._v(" "),n("pre",[t._v(t._s(e.name))])]),t._v(" "),n("div",{staticClass:"task-menu",on:{click:function(t){t.stopPropagation()}}},[n("TaskMenu",{ref:"taskMenu_"+e.id,refInFor:!0,attrs:{task:e,icon:"ios-more"}})],1)]),t._v(" "),e.desc?n("div",{staticClass:"task-desc"},[n("pre",{domProps:{innerHTML:t._s(e.desc)}})]):t._e(),t._v(" "),e.task_tag.length>0?n("div",{staticClass:"task-tags"},t._l(e.task_tag,(function(e,r){return n("Tag",{key:r,attrs:{color:e.color}},[t._v(t._s(e.name))])})),1):t._e(),t._v(" "),n("div",{staticClass:"task-users"},[n("ul",[t._l(t.ownerUser(e.task_user),(function(t,r){return n("li",{key:r},[n("UserAvatar",{attrs:{userid:t.userid,size:"32",borderWitdh:2,borderColor:e.color}})],1)})),t._v(" "),0===t.ownerUser(e.task_user).length?n("li",{staticClass:"no-owner"},[n("Button",{attrs:{type:"primary",size:"small",ghost:""},on:{click:function(n){return n.stopPropagation(),t.openTask(e,!0)}}},[t._v(t._s(t.$L("领取任务")))])],1):t._e()],2),t._v(" "),e.file_num>0?n("div",{staticClass:"task-icon"},[t._v(t._s(e.file_num)),n("Icon",{attrs:{type:"ios-link-outline"}})],1):t._e(),t._v(" "),e.msg_num>0?n("div",{staticClass:"task-icon"},[t._v(t._s(e.msg_num)),n("Icon",{attrs:{type:"ios-chatbubbles-outline"}})],1):t._e()]),t._v(" "),n("div",{staticClass:"task-progress"},[e.sub_num>0?n("div",{staticClass:"task-sub-num"},[t._v(t._s(e.sub_complete)+"/"+t._s(e.sub_num))]):t._e(),t._v(" "),n("Progress",{attrs:{percent:e.percent,"stroke-width":6}}),t._v(" "),e.end_at?n("ETooltip",{class:["task-time",e.today?"today":"",e.overdue?"overdue":""],attrs:{"open-delay":600,content:e.end_at}},[e.complete_at?t._e():n("div",[n("i",{staticClass:"taskfont"},[t._v("")]),t._v(t._s(t.expiresFormat(e.end_at)))])]):t._e()],1),t._v(" "),e.p_name?n("em",{staticClass:"priority-color",style:{backgroundColor:e.p_color}}):t._e()])})),t._v(" "),n("div",{staticClass:"task-item additem"},[n("TaskAddSimple",{attrs:{"column-id":e.id,"project-id":t.projectId},on:{"on-priority":t.addTaskOpen}})],1)],2)],1)])})),t._v(" "),n("li",{class:["add-column",t.addColumnShow?"show-input":""]},[n("div",{staticClass:"add-column-text",on:{click:t.addColumnOpen}},[n("Icon",{attrs:{type:"md-add"}}),t._v(t._s(t.$L("添加列表"))+"\n ")],1),t._v(" "),n("div",{staticClass:"add-column-input"},[n("Input",{ref:"addColumnName",attrs:{placeholder:t.$L("列表名称,回车创建"),clearable:""},on:{"on-blur":t.addColumnBlur,"on-enter":t.addColumnSubmit,"on-clear":function(e){t.addColumnShow=!1}},model:{value:t.addColumnName,callback:function(e){t.addColumnName=e},expression:"addColumnName"}})],1)])],2)],1):"table"===t.tabTypeActive?n("div",{staticClass:"project-table overlay-y"},[n("div",{staticClass:"project-table-head"},[n("Row",{staticClass:"task-row"},[n("Col",{attrs:{span:"12"}},[t._v("# "+t._s(t.$L("任务名称")))]),t._v(" "),n("Col",{attrs:{span:"3"}},[t._v(t._s(t.$L("列表")))]),t._v(" "),n("Col",{attrs:{span:"3"}},[n("div",{staticClass:"sort",on:{click:function(e){return t.onSort("level")}}},[t._v("\n "+t._s(t.$L("优先级"))+"\n "),n("div",{staticClass:"task-sort"},[n("Icon",{class:{on:"level"==t.sortField&&"asc"==t.sortType},attrs:{type:"md-arrow-dropup"}}),t._v(" "),n("Icon",{class:{on:"level"==t.sortField&&"desc"==t.sortType},attrs:{type:"md-arrow-dropdown"}})],1)])]),t._v(" "),n("Col",{attrs:{span:"3"}},[t._v(t._s(t.$L("负责人")))]),t._v(" "),n("Col",{attrs:{span:"3"}},[n("div",{staticClass:"sort",on:{click:function(e){return t.onSort("end_at")}}},[t._v("\n "+t._s(t.$L("到期时间"))+"\n "),n("div",{staticClass:"task-sort"},[n("Icon",{class:{on:"end_at"==t.sortField&&"asc"==t.sortType},attrs:{type:"md-arrow-dropup"}}),t._v(" "),n("Icon",{class:{on:"end_at"==t.sortField&&"desc"==t.sortType},attrs:{type:"md-arrow-dropdown"}})],1)])])],1)],1),t._v(" "),n("div",{class:["project-table-body",t.projectParameter("showMy")?"":"project-table-hide"]},[n("Row",{staticClass:"task-row"},[n("Col",{staticClass:"row-title",attrs:{span:"12"}},[n("i",{staticClass:"taskfont",on:{click:function(e){return t.$store.dispatch("toggleProjectParameter","showMy")}}},[t._v("")]),t._v(" "),n("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("我的任务")))]),t._v(" "),n("div",{staticClass:"row-num"},[t._v("("+t._s(t.myList.length)+")")])]),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}})],1),t._v(" "),t.projectParameter("showMy")?n("TaskRow",{attrs:{list:t.transforTasks(t.myList),"open-key":"my","fast-add-task":""},on:{"on-priority":t.addTaskOpen}}):t._e()],1),t._v(" "),t.helpList.length?n("div",{class:["project-table-body",t.projectParameter("showHelp")?"":"project-table-hide"]},[n("Row",{staticClass:"task-row"},[n("Col",{staticClass:"row-title",attrs:{span:"12"}},[n("i",{staticClass:"taskfont",on:{click:function(e){return t.$store.dispatch("toggleProjectParameter","showHelp")}}},[t._v("")]),t._v(" "),n("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("协助的任务")))]),t._v(" "),n("div",{staticClass:"row-num"},[t._v("("+t._s(t.helpList.length)+")")])]),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}})],1),t._v(" "),t.projectParameter("showHelp")?n("TaskRow",{attrs:{list:t.helpList,"open-key":"help"},on:{"on-priority":t.addTaskOpen}}):t._e()],1):t._e(),t._v(" "),t.projectData.task_num>0?n("div",{class:["project-table-body",t.projectParameter("showUndone")?"":"project-table-hide"]},[n("Row",{staticClass:"task-row"},[n("Col",{staticClass:"row-title",attrs:{span:"12"}},[n("i",{staticClass:"taskfont",on:{click:function(e){return t.$store.dispatch("toggleProjectParameter","showUndone")}}},[t._v("")]),t._v(" "),n("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("未完成任务")))]),t._v(" "),n("div",{staticClass:"row-num"},[t._v("("+t._s(t.unList.length)+")")])]),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}})],1),t._v(" "),t.projectParameter("showUndone")?n("TaskRow",{attrs:{list:t.unList,"open-key":"undone"},on:{"on-priority":t.addTaskOpen}}):t._e()],1):t._e(),t._v(" "),t.projectData.task_num>0?n("div",{class:["project-table-body",t.projectParameter("showCompleted")?"":"project-table-hide"]},[n("Row",{staticClass:"task-row"},[n("Col",{staticClass:"row-title",attrs:{span:"12"}},[n("i",{staticClass:"taskfont",on:{click:function(e){return t.$store.dispatch("toggleProjectParameter","showCompleted")}}},[t._v("")]),t._v(" "),n("div",{staticClass:"row-h1"},[t._v(t._s(t.$L("已完成任务")))]),t._v(" "),n("div",{staticClass:"row-num"},[t._v("("+t._s(t.completedList.length)+")")])]),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}}),t._v(" "),n("Col",{attrs:{span:"3"}},[t._v(t._s(t.projectData.task_num>0&&t.projectParameter("showCompleted")?t.$L("完成时间"):""))])],1),t._v(" "),t.projectParameter("showCompleted")?n("TaskRow",{attrs:{list:t.completedList,"open-key":"completed",showCompleteAt:""},on:{"on-priority":t.addTaskOpen}}):t._e()],1):t._e()]):"gantt"===t.tabTypeActive?n("div",{staticClass:"project-gantt"},[n("ProjectGantt",{attrs:{projectColumn:t.columnList,flowInfo:t.flowInfo}})],1):t._e(),t._v(" "),n("Modal",{attrs:{title:t.$L("项目设置"),"mask-closable":!1},model:{value:t.settingShow,callback:function(e){t.settingShow=e},expression:"settingShow"}},[n("Form",{attrs:{model:t.settingData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{prop:"name",label:t.$L("项目名称")}},[n("Input",{ref:"projectName",attrs:{type:"text",maxlength:32,placeholder:t.$L("必填")},model:{value:t.settingData.name,callback:function(e){t.$set(t.settingData,"name",e)},expression:"settingData.name"}})],1),t._v(" "),n("FormItem",{attrs:{prop:"desc",label:t.$L("项目介绍")}},[n("Input",{ref:"projectDesc",attrs:{type:"textarea",autosize:{minRows:3,maxRows:5},maxlength:255,placeholder:t.$L("选填")},model:{value:t.settingData.desc,callback:function(e){t.$set(t.settingData,"desc",e)},expression:"settingData.desc"}})],1)],1),t._v(" "),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(e){t.settingShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{type:"primary",loading:t.settingLoad>0},on:{click:t.onSetting}},[t._v(t._s(t.$L("修改")))])],1)],1),t._v(" "),n("Modal",{attrs:{title:t.$L("成员管理"),"mask-closable":!1},model:{value:t.userShow,callback:function(e){t.userShow=e},expression:"userShow"}},[n("Form",{attrs:{model:t.userData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{prop:"userids",label:t.$L("项目成员")}},[n("UserInput",{attrs:{uncancelable:t.userData.uncancelable,"multiple-max":100,placeholder:t.$L("选择项目成员")},model:{value:t.userData.userids,callback:function(e){t.$set(t.userData,"userids",e)},expression:"userData.userids"}})],1)],1),t._v(" "),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(e){t.userShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),t.userWaitRemove.length>0?n("Poptip",{staticStyle:{"margin-left":"8px"},attrs:{confirm:"",placement:"bottom",transfer:""},on:{"on-ok":t.onUser}},[n("div",{attrs:{slot:"title"},slot:"title"},[n("p",[n("strong",[t._v(t._s(t.$L("移除成员负责的任务将变成无负责人,")))])]),t._v(" "),n("p",[t._v(t._s(t.$L("注意此操作不可逆!")))]),t._v(" "),n("ul",{staticClass:"project-list-wait-remove"},[n("li",[t._v(t._s(t.$L("即将移除"))+":")]),t._v(" "),t._l(t.userWaitRemove,(function(t){return n("li",{key:t},[n("UserAvatar",{attrs:{userid:t,size:20,showName:"",tooltipDisabled:""}})],1)}))],2)]),t._v(" "),n("Button",{attrs:{type:"primary",loading:t.userLoad>0}},[t._v(t._s(t.$L("保存")))])],1):n("Button",{attrs:{type:"primary",loading:t.userLoad>0},on:{click:t.onUser}},[t._v(t._s(t.$L("保存")))])],1)],1),t._v(" "),n("Modal",{attrs:{title:t.$L("邀请链接"),"mask-closable":!1},model:{value:t.inviteShow,callback:function(e){t.inviteShow=e},expression:"inviteShow"}},[n("Form",{attrs:{model:t.inviteData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{label:t.$L("链接地址")}},[n("Input",{ref:"inviteInput",attrs:{type:"textarea",rows:3,readonly:""},on:{"on-focus":t.inviteFocus},model:{value:t.inviteData.url,callback:function(e){t.$set(t.inviteData,"url",e)},expression:"inviteData.url"}}),t._v(" "),n("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("可通过此链接直接加入项目。")))])],1)],1),t._v(" "),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(e){t.inviteShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Poptip",{staticStyle:{"margin-left":"8px"},attrs:{confirm:"",placement:"bottom",transfer:""},on:{"on-ok":function(e){return t.inviteGet(!0)}}},[n("div",{attrs:{slot:"title"},slot:"title"},[n("p",[n("strong",[t._v(t._s(t.$L("注意:刷新将导致原来的邀请链接失效!")))])])]),t._v(" "),n("Button",{attrs:{type:"primary",loading:t.inviteLoad>0}},[t._v(t._s(t.$L("刷新")))])],1)],1)],1),t._v(" "),n("Modal",{attrs:{title:t.$L("移交项目"),"mask-closable":!1},model:{value:t.transferShow,callback:function(e){t.transferShow=e},expression:"transferShow"}},[n("Form",{attrs:{model:t.transferData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{prop:"owner_userid",label:t.$L("项目负责人")}},[n("UserInput",{attrs:{"multiple-max":1,placeholder:t.$L("选择项目负责人")},model:{value:t.transferData.owner_userid,callback:function(e){t.$set(t.transferData,"owner_userid",e)},expression:"transferData.owner_userid"}})],1)],1),t._v(" "),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(e){t.transferShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{type:"primary",loading:t.transferLoad>0},on:{click:t.onTransfer}},[t._v(t._s(t.$L("移交")))])],1)],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",beforeClose:t.workflowBeforeClose,size:1280},model:{value:t.workflowShow,callback:function(e){t.workflowShow=e},expression:"workflowShow"}},[t.workflowShow?n("ProjectWorkflow",{ref:"workflow",attrs:{"project-id":t.projectId}}):t._e()],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:768},model:{value:t.logShow,callback:function(e){t.logShow=e},expression:"logShow"}},[t.logShow?n("ProjectLog",{attrs:{"project-id":t.projectId}}):t._e()],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:900},model:{value:t.archivedTaskShow,callback:function(e){t.archivedTaskShow=e},expression:"archivedTaskShow"}},[t.archivedTaskShow?n("TaskArchived",{attrs:{"project-id":t.projectId}}):t._e()],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:900},model:{value:t.deletedTaskShow,callback:function(e){t.deletedTaskShow=e},expression:"deletedTaskShow"}},[t.deletedTaskShow?n("TaskDeleted",{attrs:{"project-id":t.projectId}}):t._e()],1)],1)}),[],!1,null,null,null).exports;function ot(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 it(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const at={name:"ProjectDialog",components:{DialogWrapper:n(84953).Z},data:function(){return{memberShowAll:!1}},computed:function(t){for(var e=1;e=c?t?"":void 0:(i=s.charCodeAt(u))<55296||i>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):i:t?s.slice(u,u+2):a-56320+(i-55296<<10)+65536}}},"0390":function(t,e,n){"use strict";var r=n("02f4")(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"0bfb":function(t,e,n){"use strict";var r=n("cb7c");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0d58":function(t,e,n){var r=n("ce10"),o=n("e11e");t.exports=Object.keys||function(t){return r(t,o)}},1495:function(t,e,n){var r=n("86cc"),o=n("cb7c"),i=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),s=a.length,u=0;s>u;)r.f(t,n=a[u++],e[n]);return t}},"214f":function(t,e,n){"use strict";n("b0c5");var r=n("2aba"),o=n("32e9"),i=n("79e5"),a=n("be13"),s=n("2b4c"),u=n("520a"),c=s("species"),l=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),d=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var f=s(t),m=!i((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),p=m?!i((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[c]=function(){return n}),n[f](""),!e})):void 0;if(!m||!p||"replace"===t&&!l||"split"===t&&!d){var h=/./[f],g=n(a,f,""[t],(function(t,e,n,r,o){return e.exec===u?m&&!o?{done:!0,value:h.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),v=g[0],b=g[1];r(String.prototype,t,v),o(RegExp.prototype,f,2==e?function(t,e){return b.call(t,this,e)}:function(t){return b.call(t,this)})}}},"230e":function(t,e,n){var r=n("d3f4"),o=n("7726").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"23c6":function(t,e,n){var r=n("2d95"),o=n("2b4c")("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},2621:function(t,e){e.f=Object.getOwnPropertySymbols},"2aba":function(t,e,n){var r=n("7726"),o=n("32e9"),i=n("69a8"),a=n("ca5a")("src"),s=n("fa5b"),u="toString",c=(""+s).split(u);n("8378").inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var u="function"==typeof n;u&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(u&&(i(n,a)||o(n,a,t[e]?""+t[e]:c.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,u,(function(){return"function"==typeof this&&this[a]||s.call(this)}))},"2aeb":function(t,e,n){var r=n("cb7c"),o=n("1495"),i=n("e11e"),a=n("613b")("IE_PROTO"),s=function(){},u=function(){var t,e=n("230e")("iframe"),r=i.length;for(e.style.display="none",n("fab2").appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.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=$e.fromTag("iframe"),tr(i,o),tr(i,{id:n+"_ifr",frameBorder:"0",allowTransparency:"true",title:r}),Is(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=Iy("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=wy.get(n),o=wy.urls[n]||t.documentBaseUrl.replace(/\/$/,"");if(n=Ee.trim(n),r&&-1===Ee.inArray(e,n)){if(Ee.each(wy.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):w(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=$t($t({},ly.get("default").icons),ly.get(e).icons);ft(r,(function(e,r){wt(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=_y.get(e);t.theme=new n(t,_y.urls[e]),t.theme.init&&t.theme.init(t,_y.urls[e]||t.documentBaseUrl.replace(/\/$/,""),t.$)}else t.theme={}}(t),function(t){var e=[];Ee.each(Cc(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(C),hide:B.from(e.hide).getOr(C),disable:B.from(e.disable).getOr(C),isDisabled:B.from(e.isDisabled).getOr(A),enable:function(){t.mode.isReadOnly()||B.from(e.enable).map(L)}};t.ui=$t($t({},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,C,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(",")},$D=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,AD=Ee.map,ND=Ee.inArray,ID=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":C,"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){$D(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){LC(t,e)},mceRepaint:C,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=AD(r,(function(n){return!!t.formatter.matchNode(n,e)}));return-1!==ND(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 EC(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=$e.fromDom(t.getBody()),r=fg(e,(function(t){return sr(t,"line-height")}),E(Ie,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}(),PD="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):Ns(r,o),Ps(r)):n&&Is(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=$e.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,PD,"true"),MD(t,!1)}))):(t.readonly=!1,MD(n,!0),function(t){W(Ms(t,'*[data-mce-contenteditable="true"]'),(function(t){rr(t,PD),MD(t,!0)}))}(n),BD(t,"StyleWithCSS",!1),BD(t,"enableInlineTableEditing",!1),BD(t,"enableObjectResizing",!1),_m(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(PD,t.attr("contenteditable")),t.attr("contenteditable","false")}))})),t.serializer.addAttributeFilter(PD,(function(e){zD(t)&&W(e,(function(t){t.attr("contenteditable",t.attr(PD))}))})),t.serializer.addTempAttr(PD)},UD=function(t,e){if(function(t){return"click"===t.type}(e)&&!of.metaKeyPressed(e)){var n=$e.fromDom(e.target);(function(t,e){return Qr(e,"a",(function(e){return Ie(e,$e.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||A}return t.isNative=function(t){return!!HD[t.toLowerCase()]},t.prototype.fire=function(t,e){var n=t.toLowerCase(),r=Ii(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()]=$t($t({},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&&(ws.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 ID(this),this.settings.cache_suffix&&(ke.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:sS(),styleSheetLoader:void 0,show:C,hide:C,enable:C,disable:C,isDisabled:A};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 wm(this)},t.prototype.execCallback=function(t){for(var e=[],n=1;n0?_S[0]:null),SS.focusedEditor===t&&(SS.focusedEditor=null),e.length!==_S.length},DS="CSS1Compat"!==document.compatMode,SS=$t($t({},qD),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:cs,majorVersion:"5",minorVersion:"10.3",releaseDate:"2022-02-09",editors:wS,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?_S.slice(0):f(t)?J(_S,(function(e){return e.id===t})).getOr(null):_(t)&&_S[t]?_S[t]:null},add:function(t){var e=this;return wS[t.id]===t||(null===e.get(t.id)&&("length"!==t.id&&(wS[t.id]=t),wS.push(t),_S.push(t)),kS(!0),e.activeEditor=t,e.fire("AddEditor",{editor:t}),j_||(j_=function(t){var n=e.fire("BeforeUnload");if(n.returnValue)return t.preventDefault(),t.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",j_))),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===_S.length&&window.removeEventListener("beforeunload",j_),n.remove(),kS(_S.length>0),n);gS(pS.select(t),(function(t){(n=r.get(t.id))&&r.remove(n)}))}else for(e=_S.length-1;e>=0;e--)r.remove(_S[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(_S,(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,$S,LS=Math.min,AS=Math.max,NS=Math.round,IS=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+=NS(u/2)),"c"===c[1]&&(r+=NS(s/2)),"b"===c[3]&&(o-=a),"r"===c[4]&&(r-=i),"c"===c[3]&&(o-=NS(a/2)),"c"===c[4]&&(r-=NS(i/2)),PS(r,o,i,a)},PS=function(t,e,n,r){return{x:t,y:e,w:n,h:r}},RS={inflate:function(t,e,n){return PS(t.x-e,t.y-n,t.w+2*e,t.h+2*n)},relativePosition:IS,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=AS(t.x,e.x),r=AS(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:PS(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=AS(0,e.x-r),l=AS(0,e.y-o),d=AS(0,i-s),f=AS(0,a-u);return r+=c,o+=l,n&&(i+=c,a+=l,r-=d,o-=f),PS(r,o,(i-=d)-r,(a-=f)-o)},create:PS,fromClientRect:function(t){return PS(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=Ay(),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:ws,RangeUtils:Cf,Serializer:Nb,StyleSheetLoader:io,ControlSelection:sf,BookmarkManager:Jd,Selection:lb,Event:zi.Event},html:{Styles:Li,Entities:yi,Node:Nm,Schema:Oi,SaxParser:qm,DomParser:Eb,Writer:Qm,Serializer:tp},Env:ke,AddOnManager:Ss,Annotator:Gd,Formatter:Wy,UndoManager:Ky,EditorCommands:ID,WindowManager:Cy,NotificationManager:yy,EditorObservable:GD,Shortcuts:aS,Editor:mS,FocusManager:cm,EditorManager:SS,DOM:gs.DOM,ScriptLoader:ws.ScriptLoader,PluginManager:wy,ThemeManager:_y,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)}()},30264:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});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()}};const p=(0,n(51900).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},70631:(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(){if(!this.beforeClose)return this.handleClose();var t=this.beforeClose();t&&t.then?t.then(this.handleClose):this.handleClose()},handleClose: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},2749:(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(t,e){void 0===e._uploadIng&&(e._uploadIng=!0,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(){this.autoBottom&&$A.scrollToView(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},89500:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>f});var r=n(47575),o=n.n(r),i=n(2749),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()},setContent:function(t){null===this.getEditor()?this.content=t:t!=this.getEditor().getContent()&&this.getEditor().setContent(t)},focus:function(){return null===this.getEditor()?"":this.getEditor().focus()},insertImage:function(t){this.insertContent('')},editorImage:function(t){for(var e=0;e|\/>)/gi);if(n)for(var r=0;r').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.spinShow?"":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},98668:(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{loadIng:0,selects:[],list:[],searchKey:null,searchHistory:[],subscribe:null}},mounted:function(){var t=this;this.subscribe=r.Store.subscribe("cacheUserActive",(function(e){var n=t.list.findIndex((function(t){return t.userid==e.userid}));n>-1&&(t.$set(t.list,n,Object.assign({},t.list[n],e)),t.handleSelectData())}))},beforeDestroy:function(){this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},computed:{maxHiddenClass:function(){var t=this.multipleMax,e=this.maxHiddenInput,n=this.selects;return t&&e&&n.length>=t?"hidden-input":""}},watch:{value:{handler:function(){var t=this,e=this._tmpId=$A.randomString(6);setTimeout((function(){e===t._tmpId&&t.valueChange()}),10)},immediate:!0},selects:function(t){this.$emit("input",t)}},methods:{searchUser:function(t){var e=this;"string"!=typeof t&&(t=""),this.searchKey=t;var n=this.searchHistory.find((function(e){return e.key==t}));n&&(this.list=n.data),n||this.loadIng++,setTimeout((function(){e.searchKey==t?e.$store.dispatch("call",{url:"users/search",data:{keys:{key:t,project_id:e.projectId,no_project_id:e.noProjectId},take:30}}).then((function(r){var o=r.data;n||e.loadIng--,e.list=o;var i=e.searchHistory.findIndex((function(e){return e.key==t})),a={key:t,data:o,time:$A.Time()};i>-1?e.searchHistory.splice(i,1,a):e.searchHistory.push(a)})).catch((function(t){var r=t.msg;n||e.loadIng--,e.list=[],$A.messageWarning(r)})):n||e.loadIng--}),this.searchHistory.length>0?300:0)},isDisabled:function(t){return 0!==this.disabledChoice.length&&this.disabledChoice.includes(t)},openChange:function(t){t&&this.$nextTick(this.searchUser)},remoteMethod:function(){},valueChange:function(){var t=this;this.selects!=this.value&&($A.isArray(this.value)?this.selects=$A.cloneJSON(this.value):this.value?this.selects=[this.value]:this.selects=[],this.selects.some((function(e){t.list.find((function(t){return t.userid==e}))||(t.list.push({userid:e,nickname:e}),t.$store.dispatch("getUserBasic",{userid:e}))})))},handleSelectData:function(){var t=this;this.__handleSelectTimeout&&clearTimeout(this.__handleSelectTimeout),this.__handleSelectTimeout=setTimeout((function(){if(t.$refs.select){var e=t.$refs.select.getValue();e&&e.some((function(e){var n=t.list.find((function(t){return t.userid==e.value}));n&&(t.$set(e,"label",n.nickname),t.$set(e,"avatar",n.userimg))}))}}),100)}}};const i=(0,n(51900).Z)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:["common-user",t.maxHiddenClass]},[n("Select",{ref:"select",attrs:{transfer:t.transfer,placeholder:t.placeholder,size:t.size,loading:t.loadIng>0,"loading-text":t.$L("加载中..."),"default-label":t.value,"default-event-object":!0,"multiple-max":t.multipleMax,"multiple-uncancelable":t.uncancelable,"remote-method":t.remoteMethod,multiple:"",filterable:"","transfer-class-name":"common-user-transfer"},on:{"on-query-change":t.searchUser,"on-open-change":t.openChange},model:{value:t.selects,callback:function(e){t.selects=e},expression:"selects"}},[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,"key-value":e.email,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.loadIng>0?n("div",{staticClass:"common-user-loading"},[n("Loading")],1):t._e()],1)}),[],!1,null,null,null).exports},82077:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>U});var r=n(20629),o=n(66237);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:{},keyIs:!1,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.onSearch}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?n("Button",{attrs:{type:"text"},on:{click:function(e){t.keyIs=!1}}},[t._v(t._s(t.$L("取消筛选")))]):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:"table-page-box"},[n("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),t._v(" "),n("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowMax768,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])}),[],!1,null,null,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 d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const f={name:"TeamManagement",data:function(){return{loadIng:0,keys:{identity:"nodisable"},keyIs:!1,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:{placeholder:t.$L("邮箱、昵称、职位"),clearable:""},model:{value:t.keys.key,callback:function(e){t.$set(t.keys,"key",e)},expression:"keys.key"}})],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",{attrs:{placeholder:t.$L("请选择")},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:"noadmin"}},[t._v(t._s(t.$L("非管理员")))]),t._v(" "),n("Option",{attrs:{value:"disable"}},[t._v(t._s(t.$L("禁用")))]),t._v(" "),n("Option",{attrs:{value:"nodisable"}},[t._v(t._s(t.$L("非禁用")))])],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("Select",{attrs:{placeholder:t.$L("请选择")},model:{value:t.keys.email_verity,callback:function(e){t.$set(t.keys,"email_verity",e)},expression:"keys.email_verity"}},[n("Option",{attrs:{value:""}},[t._v(t._s(t.$L("全部")))]),t._v(" "),n("Option",{attrs:{value:"yes"}},[t._v(t._s(t.$L("已邮箱认证")))]),t._v(" "),n("Option",{attrs:{value:"no"}},[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.onSearch}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?n("Button",{attrs:{type:"text"},on:{click:function(e){t.keyIs=!1}}},[t._v(t._s(t.$L("取消筛选")))]):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:"table-page-box"},[n("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),t._v(" "),n("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowMax768,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])}),[],!1,null,null,null).exports;function p(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 h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const g={name:"ProjectManagement",data:function(){return{loadIng:0,keys:{},keyIs:!1,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",{attrs:{placeholder:t.$L("请选择")},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.onSearch}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?n("Button",{attrs:{type:"text"},on:{click:function(e){t.keyIs=!1}}},[t._v(t._s(t.$L("取消筛选")))]):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:"table-page-box"},[n("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),t._v(" "),n("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowMax768,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])}),[],!1,null,null,null).exports;var b=n(70631);const y={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 w=(0,u.Z)(y,(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 _=n(19246),C=n(44346);function k(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 x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const D={name:"ReportMy",data:function(){return{loadIng:0,columns:[],lists:[],listPage:1,listTotal:0,listPageSize:20,noDataText:"数据加载中.....",keys:{},keyIs:!1,reportTypeList:[{value:"",label:this.$L("全部")},{value:"weekly",label:this.$L("周报")},{value:"daily",label:this.$L("日报")}]}},mounted:function(){this.getLists()},computed:function(t){for(var e=1;e0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?n("Button",{attrs:{type:"text"},on:{click:function(e){t.keyIs=!1}}},[t._v(t._s(t.$L("取消筛选")))]):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("div",{staticClass:"table-page-box"},[n("Table",{attrs:{columns:t.columns,data:t.lists,loading:t.loadIng>0,"no-data-text":t.$L(t.noDataText),stripe:""}}),t._v(" "),n("Page",{attrs:{total:t.listTotal,current:t.listPage,"page-size":t.listPageSize,disabled:t.loadIng>0,simple:t.windowMax768,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])}),[],!1,null,null,null).exports;function T(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 E(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const O={name:"ReportReceive",data:function(){return{loadIng:0,columns:[],lists:[],listPage:1,listTotal:0,listPageSize:20,noDataText:"数据加载中.....",keys:{},keyIs:!1,reportTypeList:[{value:"",label:this.$L("全部")},{value:"weekly",label:this.$L("周报")},{value:"daily",label:this.$L("日报")}]}},mounted:function(){this.getLists()},computed:function(t){for(var e=1;e0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("搜索")))]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?n("Button",{attrs:{type:"text"},on:{click:function(e){t.keyIs=!1}}},[t._v(t._s(t.$L("取消筛选")))]):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:"table-page-box"},[n("Table",{attrs:{columns:t.columns,data:t.lists,loading:t.loadIng>0,"no-data-text":t.$L(t.noDataText),stripe:""}}),t._v(" "),n("Page",{attrs:{total:t.listTotal,current:t.listPage,"page-size":t.listPageSize,disabled:t.loadIng>0,simple:t.windowMax768,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])}),[],!1,null,null,null).exports;var L=n(34910);const A={name:"Report",components:{DrawerOverlay:b.Z,ReportEdit:C.Z,ReportMy:S,ReportReceive:$,ReportDetail:L.Z},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,this.$isMainElectron&&this.$Electron.registerMsgListener("reportSaveSuccess",this.saveSuccess)},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){if(this.detailData=t,this.$emit("on-read"),this.$Electron){var e={title:t.title,titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)};this.$Electron.sendMessage("windowRouter",{name:"report-"+t.id,path:"/single/report/detail/"+t.id,force:!1,config:e})}else this.showDetailDrawer=!0},onEditReport:function(t){if(this.$Electron){var e={title:this.$L(t>0?"修改报告":"新增报告"),parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)};this.$Electron.sendMessage("windowRouter",{name:"report-"+t,path:"/single/report/edit/"+t,force:!1,config:e})}else 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 N=(0,u.Z)(A,(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"}},[t.showDetailDrawer?n("ReportDetail",{attrs:{data:t.detailData}}):t._e()],1),t._v(" "),n("DrawerOverlay",{attrs:{placement:"right",size:1e3,transfer:""},model:{value:t.showEditDrawer,callback:function(e){t.showEditDrawer=e},expression:"showEditDrawer"}},[t.showEditDrawer?n("ReportEdit",{attrs:{id:t.reportId},on:{saveSuccess:t.saveSuccess}}):t._e()],1)],1)}),[],!1,null,null,null).exports,I=(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)),P=(t,e,n)=>t.findIndex((t=>t[e]===n));const R=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(!I("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&&I("number",t)?this.timeout=t:this.timeout=5e3}notificationWatch(){this.notificationAll.push(this.notification),this.notification.requireInteraction?this.everyTimeout():this.autoClose(),this.watchClose()}everyTimeout(){I("number",this.timeout)&&(this.options.timeOut&&I("number",this.options.timeOut)?this.timeoutCloseFn(this.options.timeOut):this.timeoutCloseFn(this.timeout))}timeoutCloseFn(t){const e=this.notification.timestamp;setTimeout((()=>{const t=P(this.notificationAll,"timestamp",e);-1!==t&&this.notificationAll[t].close()}),t)}watchClose(){const t=this.notification.timestamp;this.notification.addEventListener("close",(e=>{const n=P(this.notificationAll,"timestamp",t);-1!==n&&this.notificationAll.splice(n,1)}))}autoClose(){const t=this.notification.timestamp;setTimeout((()=>{const e=P(this.notificationAll,"timestamp",t);-1!==e&&this.notificationAll.splice(e,1)}),6e3)}notificationEvent(t){if(this.checkStatus("support")){if(!I("Object",t))return console.error("callObj必须为对象");for(const e in t)if(!I("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&&I("Object",t))for(const e in t)this.options[e]=t[e];else console.warn("updateOptions参数错误:options为必填对象")}replaceTitle(t){t&&I("String",t)?this.title=t:console.warn("replaceTitle: title(通知标题)为必填字符串")}replaceOptions(t){t&&I("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}};var B=n(80641);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 j(t){for(var e=1;e0?this.msgAllUnread+this.dashboardTask.overdue.length+this.reportUnreadNumber:0},currentLanguage:function(){return this.languageList[this.languageType]||"Language"},menu:function(){return this.userIsAdmin?[{path:"taskBrowse",name:"最近打开的任务"},{path:"personal",name:"个人设置",divided:!0},{path:"password",name:"密码设置"},{path:"clearCache",name:"清除缓存"},{path:"system",name:"系统设置",divided:!0},{path:"version",name:"更新版本",visible:!!this.clientNewVersion},{path:"allProject",name:"所有项目",divided:!0},{path:"archivedProject",name:"已归档的项目"},{path:"team",name:"团队管理",divided:!0},{path:"theme",name:"主题皮肤",divided:!0},{path:"language",name:this.currentLanguage,divided:!0},{path:"logout",name:"退出登录",style:{color:"#f40"},divided:!0}]:[{path:"taskBrowse",name:"最近打开的任务"},{path:"personal",name:"个人设置",divided:!0},{path:"password",name:"密码设置"},{path:"clearCache",name:"清除缓存"},{path:"version",name:"更新版本",divided:!0,visible:!!this.clientNewVersion},{path:"workReport",name:"工作报告",divided:!0},{path:"archivedProject",name:"已归档的项目"},{path:"theme",name:"主题皮肤",divided:!0},{path:"language",name:this.currentLanguage,divided:!0},{path:"logout",name:"退出登录",style:{color:"#f40"},divided:!0}]},columns:function(){var t=$A.cloneJSON(this.columnTemplate);return t.unshift({name:this.$L("空白模板"),columns:[]}),t},projectLists:function(){var t=this.projectKeyValue,e=this.cacheProjects,n=$A.cloneJSON(e).sort((function(t,e){return t.top_at||e.top_at?$A.Date(e.top_at)-$A.Date(t.top_at):e.id-t.id}));return t?n.filter((function(e){return e.name.toLowerCase().indexOf(t.toLowerCase())>-1})):n},taskStyle:function(){var t=this.innerHeight;return{maxHeight:t-(t>900?200:70)-20+"px"}},overlayClass:function(){return{"overlay-y":!0,"overlay-none":!0===this.topOperateVisible}},taskBrowseLists:function(){var t=this.cacheTasks,e=this.cacheTaskBrowse,n=this.userId;return e.filter((function(t){return t.userid===n})).map((function(e){var n=e.id;return t.find((function(t){return t.id===n}))||{}}))}}),watch:{$route:function(t){this.curPath=t.path,this.chackPass()},userInfo:function(){this.chackPass()},taskId:function(t){t>0&&this.$Modal.resetIndex()},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.notificationClass&&(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))},workReportShow:function(t){t&&this.getReportUnread(0)},unreadTotal:{handler:function(t){this.$Electron&&this.$Electron.sendMessage("setDockBadge",t)},immediate:!0},userId:{handler:function(){this.$store.dispatch("websocketConnection")},immediate:!0},wsMsg:{handler:function(t){var e=t.type,n=t.action;if("report"===e)"unreadUpdate"==n&&this.getReportUnread()},deep:!0}},methods:{initLanguage:function(){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({name:"manage-setting-password"})},setTheme:function(t){this.$store.dispatch("setTheme",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"exportTask":return void(this.exportTaskShow=!0);case"workReport":return this.reportUnreadNumber>0&&(this.reportTabs="receive"),void(this.workReportShow=!0);case"version":return void B.Store.set("updateNotification",null);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"logout":return void $A.modalConfirm({title:"退出登录",content:"你确定要登出系统?",onOk:function(){e.$store.dispatch("logout",!1)}})}this.menu.findIndex((function(e){return e.path==t}))>-1&&this.toggleRoute("setting/"+t)},menuVisibleChange:function(t){this.visibleMenu=t},classNameRoute:function(t){return{active:this.curPath=="/manage/"+t}},classNameProject:function(t){var e="project/"+t.id,n=this.openMenu[t.id];return{active:this.curPath=="/manage/"+e,"open-menu":!0===n,operate:t.id==this.topOperateItem.id&&this.topOperateVisible}},onAddShow:function(){var t=this;this.$store.dispatch("getColumnTemplate").catch((function(){})),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].columns.join(","))}))},shortcutEvent:function(t){(t.metaKey||t.ctrlKey)&&(75===t.keyCode||78===t.keyCode?(t.preventDefault(),this.onAddTask(0)):83===t.keyCode&&this.taskId>0&&(t.preventDefault(),this.$refs.taskDetail.checkUpdate(!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},openTask:function(t){this.$store.dispatch("openTask",t)},addDialogMsg:function(t){var e=this;if(this.natificationReady&&(this.natificationHidden||"/manage/messenger"!=this.curPath||this.dialogOpenId!=t.dialog_id)){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.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||0})).catch((function(){}))}),"number"==typeof t?t:1e3)},handleRightClick:function(t,e){var n=this;this.handleClickTopOperateOutside(),this.topOperateItem=e,this.$nextTick((function(){var e=n.$refs.projectWrapper.getBoundingClientRect();n.topOperateStyles={left:"".concat(t.clientX-e.left,"px"),top:"".concat(t.clientY-e.top,"px")},n.topOperateVisible=!0}))},handleClickTopOperateOutside:function(){this.topOperateVisible=!1},handleTopClick:function(){var t=this;this.$store.dispatch("call",{url:"project/top",data:{project_id:this.topOperateItem.id}}).then((function(e){var n=e.data;t.$store.dispatch("saveProject",n),t.$nextTick((function(){var e=t.$refs.projectWrapper.querySelector(".active");e&&$A.scrollToView(e,{behavior:"instant",scrollMode:"if-needed"})}))})).catch((function(t){var e=t.msg;$A.modalError(e)}))},onExportTask:function(){var t=this;this.exportLoadIng>0||(this.exportLoadIng++,this.$store.dispatch("call",{url:"project/task/export",data:this.exportData}).then((function(e){var n=e.data;t.exportLoadIng--,t.exportTaskShow=!1,t.$store.dispatch("downUrl",{url:n.url})})).catch((function(e){var n=e.msg;t.exportLoadIng--,$A.modalError(n)})))},notificationInit:function(){var t=this;this.notificationClass=new R(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({name:"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 U=(0,u.Z)(F,(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:"page-manage-menu-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(" "),t.reportUnreadNumber>0?n("Badge",{staticClass:"manage-box-top-report",attrs:{count:t.reportUnreadNumber}}):t.clientNewVersion?n("Badge",{staticClass:"manage-box-top-report",attrs:{dot:""}}):t._e(),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){return["taskBrowse"===e.path?n("Dropdown",{attrs:{transfer:"","transfer-class-name":"page-manage-menu-dropdown",placement:"right-start"}},[n("DropdownItem",[n("div",{staticClass:"manage-menu-flex"},[t._v("\n "+t._s(t.$L(e.name))+"\n "),n("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),t._v(" "),t.taskBrowseLists.length>0?n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},t._l(t.taskBrowseLists,(function(e,r){return e.id>0&&r<10?n("DropdownItem",{key:r,staticClass:"task-title",attrs:{name:e.name},nativeOn:{click:function(n){return t.openTask(e)}}},[t._v(t._s(e.name))]):t._e()})),1):n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[n("DropdownItem",{staticStyle:{color:"darkgrey"}},[t._v(t._s(t.$L("暂无打开记录")))])],1)],1):"team"===e.path?n("Dropdown",{attrs:{transfer:"","transfer-class-name":"page-manage-menu-dropdown",placement:"right-start"}},[n("DropdownItem",{attrs:{divided:""}},[n("div",{staticClass:"manage-menu-flex"},[t._v("\n "+t._s(t.$L(e.name))+"\n "),t.reportUnreadNumber>0?n("Badge",{staticClass:"manage-menu-report-badge",attrs:{count:t.reportUnreadNumber}}):n("Icon",{attrs:{type:"ios-arrow-forward"}})],1)]),t._v(" "),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[n("DropdownItem",{attrs:{name:"allUser"}},[t._v(t._s(t.$L("团队管理")))]),t._v(" "),n("DropdownItem",{attrs:{name:"workReport"}},[n("div",{staticClass:"manage-menu-flex"},[t._v("\n "+t._s(t.$L("工作报告"))+"\n "),t.reportUnreadNumber>0?n("Badge",{staticClass:"manage-menu-report-badge",attrs:{count:t.reportUnreadNumber}}):t._e()],1)]),t._v(" "),n("DropdownItem",{attrs:{name:"exportTask"}},[t._v(t._s(t.$L("导出任务统计")))])],1)],1):"theme"===e.path?n("Dropdown",{attrs:{placement:"right-start",transfer:"","transfer-class-name":"page-manage-menu-dropdown"},on:{"on-click":t.setTheme}},[n("DropdownItem",{attrs:{divided:""}},[n("div",{staticClass:"manage-menu-flex"},[t._v("\n "+t._s(t.$L(e.name))+"\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("DropdownItem",{key:r,attrs:{name:e.value,selected:t.themeMode===e.value}},[t._v(t._s(t.$L(e.name)))])})),1)],1):"language"===e.path?n("Dropdown",{attrs:{placement:"right-start",transfer:"","transfer-class-name":"page-manage-menu-dropdown"},on:{"on-click":t.setLanguage}},[n("DropdownItem",{attrs:{divided:""}},[n("div",{staticClass:"manage-menu-flex"},[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("DropdownItem",{key:r,attrs:{name:r,selected:t.getLanguage()===r}},[t._v(t._s(e))])})),1)],1):!1!==e.visible?n("DropdownItem",{style:e.style||{},attrs:{divided:!!e.divided,name:e.path}},[n("div",{staticClass:"manage-menu-flex"},[t._v("\n "+t._s(t.$L(e.name))+"\n "),"version"===e.path?n("Badge",{staticClass:"manage-menu-report-badge",attrs:{text:t.clientNewVersion}}):"workReport"===e.path&&t.reportUnreadNumber>0?n("Badge",{staticClass:"manage-menu-report-badge",attrs:{count:t.reportUnreadNumber}}):t._e()],1)]):t._e()]}))],2)],1),t._v(" "),n("ul",{class:t.overlayClass,on:{scroll:t.handleClickTopOperateOutside}},[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(" "),t.dashboardTask.overdue.length>0?n("Badge",{staticClass:"menu-badge",attrs:{type:"error",count:t.dashboardTask.overdue.length}}):t.dashboardTask.today.length>0?n("Badge",{staticClass:"menu-badge",attrs:{type:"info",count:t.dashboardTask.today.length}}):t.dashboardTask.all.length>0?n("Badge",{staticClass:"menu-badge",attrs:{type:"primary",count:t.dashboardTask.all.length}}):t._e()],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",{ref:"projectWrapper",staticClass:"menu-project"},[n("ul",{class:t.overlayClass,on:{scroll:t.handleClickTopOperateOutside}},t._l(t.projectLists,(function(e,r){return n("li",{key:r,class:t.classNameProject(e),on:{click:function(n){return t.toggleRoute("project/"+e.id)},contextmenu:function(n){return n.preventDefault(),n.stopPropagation(),t.handleRightClick(n,e)}}},[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.top_at?n("div",{staticClass:"icon-top"}):t._e(),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(),t._v(" "),n("div",{staticClass:"top-operate",style:t.topOperateStyles},[n("Dropdown",{attrs:{trigger:"custom",visible:t.topOperateVisible,"transfer-class-name":"page-file-dropdown-menu",transfer:""},on:{"on-clickoutside":t.handleClickTopOperateOutside}},[n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[n("DropdownItem",{nativeOn:{click:function(e){return t.handleTopClick.apply(null,arguments)}}},[t._v("\n "+t._s(t.$L(t.topOperateItem.top_at?"取消置顶":"置顶该项目"))+"\n ")])],1)],1)],1)],1)]),t._v(" "),t.projectTotal>20?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.name))])})),1)],1),t._v(" "),n("FormItem",{attrs:{prop:"flow",label:t.$L("开启工作流")}},[n("RadioGroup",{model:{value:t.addData.flow,callback:function(e){t.$set(t.addData,"flow",e)},expression:"addData.flow"}},[n("Radio",{attrs:{label:"open"}},[t._v(t._s(t.$L("开启")))]),t._v(" "),n("Radio",{attrs:{label:"close"}},[t._v(t._s(t.$L("关闭")))])],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:{title:t.$L("导出任务统计"),"mask-closable":!1},model:{value:t.exportTaskShow,callback:function(e){t.exportTaskShow=e},expression:"exportTaskShow"}},[n("Form",{ref:"exportTask",attrs:{model:t.exportData,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{label:t.$L("导出会员")}},[n("UserInput",{attrs:{"multiple-max":20,placeholder:t.$L("请选择会员")},model:{value:t.exportData.userid,callback:function(e){t.$set(t.exportData,"userid",e)},expression:"exportData.userid"}})],1),t._v(" "),n("FormItem",{attrs:{label:t.$L("时间范围")}},[n("DatePicker",{staticStyle:{width:"100%"},attrs:{type:"daterange",format:"yyyy/MM/dd",placeholder:t.$L("请选择时间")},model:{value:t.exportData.time,callback:function(e){t.$set(t.exportData,"time",e)},expression:"exportData.time"}})],1),t._v(" "),n("FormItem",{attrs:{prop:"type",label:t.$L("导出时间类型")}},[n("RadioGroup",{model:{value:t.exportData.type,callback:function(e){t.$set(t.exportData,"type",e)},expression:"exportData.type"}},[n("Radio",{attrs:{label:"taskTime"}},[t._v(t._s(t.$L("任务时间")))]),t._v(" "),n("Radio",{attrs:{label:"createdTime"}},[t._v(t._s(t.$L("创建时间")))])],1)],1)],1),t._v(" "),n("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"default"},on:{click:function(e){t.exportTaskShow=!1}}},[t._v(t._s(t.$L("取消")))]),t._v(" "),n("Button",{attrs:{type:"primary",loading:t.exportLoadIng>0},on:{click:t.onExportTask}},[t._v(t._s(t.$L("导出")))])],1)],1),t._v(" "),n("Modal",{attrs:{value:t.taskId>0,styles:{width:"90%",maxWidth:t.taskData.dialog_id?"1200px":"700px"},"mask-closable":!1,"footer-hide":!0},on:{"on-visible-change":t.taskVisibleChange}},[n("div",{staticClass:"page-manage-task-modal",style:t.taskStyle},[n("TaskDetail",{ref:"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"}}),t._v(" "),n("Badge",{attrs:{count:t.unreadTotal}})],1)])],1)}),[],!1,null,null,null).exports},84953:(t,e,n)=>{"use strict";n.d(e,{Z:()=>k});var r=n(30264),o=n(86877),i=n(20629);const a={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)}}};var s=n(51900);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;e180||n>180)&&(e>n?(r=180,o=n*(180/e)):(r=e*(180/n),o=180)),{width:r+"px",height:o+"px"}}return{}},withdraw:function(){var t=this;$A.modalConfirm({content:"确定撤回此信息吗?",okText:"撤回",loading:!0,onOk:function(){t.$store.dispatch("call",{url:"dialog/msg/withdraw",data:{msg_id:t.msgData.id}}).then((function(){$A.messageSuccess("消息已撤回"),t.$store.dispatch("forgetDialogMsg",t.msgData.id),t.$Modal.remove()})).catch((function(e){var n=e.msg;$A.messageError(n,301),t.$Modal.remove()}))}})},viewFile:function(){var t=this.msgData,e=t.id,n=t.dialog_id,r=t.msg;if(["jpg","jpeg","gif","png"].includes(r.ext)){var o=$A.cloneJSON(this.dialogMsgs.filter((function(t){return t.dialog_id===n&&"file"===t.type&&["jpg","jpeg","gif","png"].includes(t.msg.ext)}))).sort((function(t,e){return t.id-e.id})),i=o.findIndex((function(t){return t.id===e}));i>-1?(this.$store.state.previewImageIndex=i,this.$store.state.previewImageList=o.map((function(t){return t.msg.path}))):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=[r.path])}else this.$Electron?this.$Electron.sendMessage("windowRouter",{name:"file-msg-"+this.msgData.id,path:"/single/file/msg/"+this.msgData.id,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:"".concat(this.msgData.msg.name," (").concat($A.bytesToSize(this.msgData.msg.size),")"),titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)}}):window.open($A.apiUrl("../single/file/msg/".concat(this.msgData.id)))},downFile:function(){var t=this;$A.modalConfirm({title:"下载文件",content:"".concat(this.msgData.msg.name," (").concat($A.bytesToSize(this.msgData.msg.size),")"),okText:"立即下载",onOk:function(){t.$store.dispatch("downUrl",$A.apiUrl("dialog/msg/download?msg_id=".concat(t.msgData.id)))}})}}};const f=(0,s.Z)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:"dialog-view "+t.msgData.type,attrs:{"data-id":t.msgData.id}},[n("div",{staticClass:"dialog-head"},[n("div",{staticClass:"dialog-content"},["text"===t.msgData.type?n("div",{staticClass:"content-text"},[n("pre",{staticClass:"no-dark-mode"},[t._v(t._s(t.textMsg(t.msgData.msg.text)))])]):"file"===t.msgData.type?n("div",{class:"content-file "+t.msgData.msg.type},[n("div",{staticClass:"dialog-file"},["img"===t.msgData.msg.type?n("img",{staticClass:"file-img",style:t.imageStyle(t.msgData.msg),attrs:{src:t.msgData.msg.thumb},on:{click:t.viewFile}}):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)))])])])])]):"loading"===t.msgData.type?n("div",{staticClass:"content-loading"},[n("Loading")],1):n("div",{staticClass:"content-unknown"},[t._v(t._s(t.$L("未知的消息类型")))])]),t._v(" "),t.showMenu?n("div",{staticClass:"dialog-menu"},[n("div",{staticClass:"menu-icon"},[t.msgData.userid==t.userId?n("Icon",{attrs:{type:"md-undo",title:t.$L("撤回")},on:{click:t.withdraw}}):t._e(),t._v(" "),"file"===t.msgData.type?[n("Icon",{attrs:{type:"md-eye",title:t.$L("查看")},on:{click:t.viewFile}}),t._v(" "),n("Icon",{attrs:{type:"md-arrow-round-down",title:t.$L("下载")},on:{click:t.downFile}})]:t._e()],2)]):t._e()]),t._v(" "),t.msgData.created_at?n("div",{staticClass:"dialog-foot"},[n("div",{staticClass:"time",attrs:{title:t.msgData.created_at}},[t._v(t._s(t.$A.formatTime(t.msgData.created_at)))]),t._v(" "),t.msgData.send>1||"group"==t.dialogType?n("EPopover",{ref:"percent",staticClass:"percent",attrs:{placement:"left-end",width:360,offset:-8},model:{value:t.popperShow,callback:function(e){t.popperShow=e},expression:"popperShow"}},[n("div",{staticClass:"dialog-wrapper-read-poptip-content"},[n("ul",{staticClass:"read overlay-y"},[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 overlay-y"},[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:{slot:"reference",percent:t.msgData.percentage,size:14},slot:"reference"})],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 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$A.Time()){var n=window.__sendDialogMsg,r=n.msgFile,o=n.msgText;window.__sendDialogMsg=null,this.$nextTick((function(){$A.isArray(r)&&r.length>0?e.sendFileMsg(r):o&&e.sendMsg(o)}))}if(t.query&&t.query._){var i=$A.cloneJSON(t.query);delete i._,this.goForward({query:i},!0)}},immediate:!0},dialogId:{handler:function(t){var e=this;t&&(this.msgNew=0,this.topId=-1,this.visible=!1,this.$store.dispatch("getDialogMsgs",t).then((function(t){e.onToBottom(),e.visible=!0})))},immediate:!0},wsOpenNum:function(t){t<=1||this.$store.dispatch("getDialogMsgs",this.dialogId)}},methods:{sendMsg:function(t){var e=this;if("string"==typeof t&&t&&(this.msgText=t,this.$refs.input.focus()),""!=this.msgText){var n=$A.randomString(16);this.tempMsgs.push({id:n,dialog_id:this.dialogData.id,type:"text",userid:this.userId,msg:{text:this.msgText}}),this.isDesktop||this.$refs.input.blur(),this.onToBottom(),this.onActive(),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:this.dialogId,text:this.msgText},method:"post"}).then((function(t){var r=t.data;e.tempMsgs=e.tempMsgs.filter((function(t){return t.id!=n})),e.sendSuccess(r)})).catch((function(t){var r=t.msg;$A.modalError(r),e.tempMsgs=e.tempMsgs.filter((function(t){return t.id!=n}))})),this.msgText=""}},sendFileMsg:function(t){var e=this;t.length>0&&(this.pasteFile=[],this.pasteItem=[],t.some((function(t){var n=new FileReader;n.readAsDataURL(t),n.onload=function(n){var r=n.target;e.pasteFile.push(t),e.pasteItem.push({type:$A.getMiddle(t.type,null,"/"),name:t.name,size:t.size,result:r.result}),e.pasteShow=!0}})))},chatKeydown:function(t){if(13===t.keyCode){if(t.shiftKey)return;t.preventDefault(),this.sendMsg()}},pasteDrag:function(t,e){var n="drag"===e?t.dataTransfer.files:t.clipboardData.files,r=Array.prototype.slice.call(n);r.length>0&&(t.preventDefault(),this.sendFileMsg(r))},chatPasteDrag:function(t,e){this.dialogDrag=!1,this.pasteDrag(t,e)},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)},pasteSend:function(){var t=this;this.pasteFile.some((function(e){t.$refs.chatUpload.upload(e)}))},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.isDesktop||this.$refs.input.blur(),this.onToBottom(),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){var e=this;$A.isArray(t)?t.some((function(t){e.sendSuccess(t)})):(this.$store.dispatch("saveDialogMsg",t),this.$store.dispatch("increaseTaskMsgNum",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}t.scale>=1&&(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")},onToBottom:function(){this.autoBottom=!0,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,$A.scrollToView(document.getElementById("view_"+e),{behavior:"instant",inline:"start"})}))})).catch((function(){}))},addDialogMsg:function(){var t=this;this.isAutoBottom?this.$nextTick(this.onToBottom):this.$nextTick((function(){t.$refs.scroller&&t.$refs.scroller.scrollInfo().scrollE>10&&t.msgNew++}))}}};const k=(0,s.Z)(C,(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-nav",class:{completed:t.$A.dialogCompleted(t.dialogData)}},[n("div",{staticClass:"dialog-avatar"},["group"==t.dialogData.type?["project"==t.dialogData.group_type?n("i",{staticClass:"taskfont icon-avatar project"},[t._v("")]):"task"==t.dialogData.group_type?n("i",{staticClass:"taskfont icon-avatar task"},[t._v("")]):n("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:t.dialogData.dialog_user?n("div",{staticClass:"user-avatar"},[n("UserAvatar",{attrs:{userid:t.dialogData.dialog_user.userid,size:42}})],1):n("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}})],2),t._v(" "),n("div",{staticClass:"dialog-title"},[n("div",{staticClass:"main-title"},[t._l(t.$A.dialogTags(t.dialogData),(function(e){return"success"!=e.color?[n("Tag",{attrs:{color:e.color,fade:!1}},[t._v(t._s(t.$L(e.text)))])]:t._e()})),t._v(" "),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(" "),t.dialogData.top_at?n("label",{staticClass:"top-text"},[t._v(t._s(t.$L("置顶")))]):t._e()],2),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",style:{opacity:t.visible?1:0},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.onToBottom}},[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:2e4,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(),t._v(" "),n("Modal",{attrs:{title:t.$L(t.pasteTitle),"cancel-text":t.$L("取消"),"ok-text":t.$L("发送"),"enter-ok":!0},on:{"on-ok":t.pasteSend},model:{value:t.pasteShow,callback:function(e){t.pasteShow=e},expression:"pasteShow"}},[n("div",{staticClass:"dialog-wrapper-paste"},[t._l(t.pasteItem,(function(e){return["image"==e.type?n("img",{attrs:{src:e.result}}):n("div",[t._v(t._s(t.$L("文件"))+": "+t._s(e.name)+" ("+t._s(t.$A.bytesToSize(e.size))+")")])]}))],2)])],2):t._e()}),[],!1,null,null,null).exports},85782:(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:Math.max($A.runNum(this.listPageSize),10)}}).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 ")),i.push(t("span",{class:"change-value"},"".concat(u||"-")))):i.push(t("span",{class:"change-value"},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=[];if(!$A.isJson(n))return r;if(this.taskId>0&&$A.isJson(n.flow)){var o=$A.getMiddle(n.flow.flow_item_name,"|");o&&r.push({id:e,button:"重置",content:"确定重置为【".concat(o,"】吗?")})}return 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&&t.showLoad?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},34910:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});const r={name:"ReportDetail",props:{data:{default:{}}},watch:{"data.id":{handler:function(t){t>0&&this.sendRead()},immediate:!0}},methods:{sendRead:function(){this.$store.dispatch("call",{url:"report/read",data:{ids:[this.data.id]}}).then((function(){})).catch((function(){}))}}};const o=(0,n(51900).Z)(r,(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("Form",{staticClass:"report-form",attrs:{"label-width":"auto",inline:""}},[n("FormItem",{attrs:{label:t.$L("汇报人")}},[n("UserAvatar",{attrs:{userid:t.data.userid,size:28}})],1),t._v(" "),n("FormItem",{attrs:{label:t.$L("提交时间")}},[t._v("\n "+t._s(t.data.created_at)+"\n ")]),t._v(" "),n("FormItem",{attrs:{label:t.$L("汇报对象")}},t._l(t.data.receives_user,(function(t,e){return n("UserAvatar",{key:e,attrs:{userid:t.userid,size:28}})})),1)],1),t._v(" "),n("Form",{staticClass:"report-form",attrs:{"label-width":"auto"}},[n("FormItem",{attrs:{label:t.$L("汇报内容")}},[n("div",{staticClass:"report-content",domProps:{innerHTML:t._s(t.data.content)}})])],1)],1)])}),[],!1,null,null,null).exports},44346:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(98668),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,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:"ReportEdit",components:{TEditor:function(){return n.e(500).then(n.bind(n,89500))},UserInput:r.Z},props:{id:{default:0}},data:function(){return{reportData:{title:"",content:"",type:"weekly",receive:[],id:0,offset:0},prevCycleText:this.$L("上一周"),nextCycleText:this.$L("下一周")}},watch:{id:{handler:function(t){t>0?this.getDetail(t):(this.reportData.offset=0,this.reportData.type="weekly",this.reportData.receive=[],this.getTemplate())},immediate:!0}},computed:function(t){for(var e=1;e0?$A.modalConfirm({title:"覆盖提交",content:"你已提交过此日期的报告,是否覆盖提交?",loading:!0,onOk:function(){t.doSubmit(!0)}}):this.doSubmit()},doSubmit:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$store.dispatch("call",{url:"report/store",data:this.reportData,method:"post"}).then((function(n){var r=n.data,o=n.msg;e&&t.$Modal.remove(),t.reportData.offset=0,t.reportData.type="weekly",t.reportData.receive=[],t.getTemplate(),$A.messageSuccess(o),t.$emit("saveSuccess",r)})).catch((function(n){var r=n.msg;e&&t.$Modal.remove(),$A.messageError(r)}))},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;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.$store.dispatch("call",{url:"report/detail",data:{id:t}}).then((function(n){var r=n.data;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})).catch((function(t){var e=t.msg;$A.messageError(e)}))},prevCycle:function(){this.reportData.offset-=1,this.reReportData(),this.getTemplate()},nextCycle:function(){this.reportData.offset<0&&(this.reportData.offset+=1),this.reReportData(),this.getTemplate()},getLastSubmitter:function(){var t=this;this.$store.dispatch("call",{url:"report/last_submitter"}).then((function(e){var n=e.data;t.reportData.receive=n})).catch((function(t){var e=t.msg;$A.messageError(e)}))},reReportData:function(){this.reportData.title="",this.reportData.content="",this.reportData.receive=[],this.reportData.id=0}}};const u=(0,n(51900).Z)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Form",{staticClass:"report-edit",attrs:{"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("FormItem",{attrs:{label:t.$L("汇报类型")}},[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",{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",{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),t._v(" "),n("FormItem",{attrs:{label:t.$L("汇报名称")}},[n("Input",{attrs:{disabled:""},model:{value:t.reportData.title,callback:function(e){t.$set(t.reportData,"title",e)},expression:"reportData.title"}})],1),t._v(" "),n("FormItem",{attrs:{label:t.$L("汇报对象")}},[n("div",{staticClass:"report-users"},[n("UserInput",{attrs:{disabledChoice:[t.userId],placeholder:t.$L("选择接收人"),transfer:!1},model:{value:t.reportData.receive,callback:function(e){t.$set(t.reportData,"receive",e)},expression:"reportData.receive"}}),t._v(" "),n("a",{staticClass:"report-user-link",attrs:{href:"javascript:void(0);"},on:{click:t.getLastSubmitter}},[n("Icon",{attrs:{type:"ios-share-outline"}}),t._v(t._s(t.$L("使用我上次的汇报对象"))+"\n ")],1)],1)]),t._v(" "),n("FormItem",{staticClass:"report-content-editor",attrs:{label:t.$L("汇报内容")}},[n("TEditor",{attrs:{height:"100%"},model:{value:t.reportData.content,callback:function(e){t.$set(t.reportData,"content",e)},expression:"reportData.content"}})],1),t._v(" "),n("FormItem",{staticClass:"report-foot"},[n("Button",{staticClass:"report-bottom",attrs:{type:"primary"},on:{click:t.handleSubmit}},[t._v(t._s(t.$L(t.id>0?"修改":"提交")))])],1)],1)}),[],!1,null,null,null).exports},19246:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(89500),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},showAddAssist:function(){return!this.addData.owner.includes(this.userId)}}),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){t>0&&$A.setStorage("cacheAddTaskProjectId",t)},"addData.column_id":function(t){var e=this,n=this.addData.project_id;this.$nextTick((function(){n&&t?e.$set(e.addData,"cascader",[n,t]):e.$set(e.addData,"cascader",[])})),t>0&&$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(this.addData,"times",[e[0],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(),owner:[this.userId],times:[]}),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()}))},cascaderChange:function(t){t[1]&&this.$set(this.addData,"column_id",t[1])},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:[],add_assist:1,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-change":t.cascaderChange,"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.isDesktop?"详细描述,选填...(点击右键使用工具栏)":"详细描述,选填..."),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,transfer:!1},model:{value:t.addData.owner,callback:function(e){t.$set(t.addData,"owner",e)},expression:"addData.owner"}}),t._v(" "),t.showAddAssist?n("div",{staticClass:"task-add-assist"},[n("Checkbox",{attrs:{"true-value":1,"false-value":0},model:{value:t.addData.add_assist,callback:function(e){t.$set(t.addData,"add_assist",e)},expression:"addData.add_assist"}},[t._v(t._s(t.$L("加入任务协助人员列表")))]),t._v(" "),n("ETooltip",{attrs:{content:t.$L("你不是任务负责人时建议加入任务协助人员列表")}},[n("Icon",{attrs:{type:"ios-alert-outline"}})],1)],1):t._e()],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,transfer:!1},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},66237:(t,e,n)=>{"use strict";n.d(e,{Z:()=>b});var r=n(20629),o=n(89500),i=n(25199),a=n(98668);const s={name:"TaskUpload",props:{maxSize:{type:Number,default:204800}},data:function(){return{uploadFormat:["jpg","jpeg","png","gif","doc","docx","xls","xlsx","ppt","pptx","txt","esp","pdf","rar","zip","gz","ai","avi","bmp","cdr","eps","mov","mp3","mp4","pr","psd","svg","tif"]}},methods:{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)+"。"})},handleBeforeUpload:function(t){return this.$emit("on-select-file",t),!1},handleClick:function(){this.$refs.upload.handleClick()}}};var u=n(51900);const c=(0,u.Z)(s,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("Upload",{ref:"upload",attrs:{name:"files",action:"",multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize,"before-upload":t.handleBeforeUpload}})}),[],!1,null,null,null).exports;var l=n(84953),d=n(85782),f=n(80641),m=n(21929);function p(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 h(t){for(var e=1;e0&&!this.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=$A.Date(t.start_at,!0),n=$A.Date(t.end_at,!0);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){var e=this;this.taskDetail=$A.cloneJSON(t),this.$nextTick((function(){e.$refs.name&&e.$refs.name.resizeTextarea()}))},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:{innerHeightListener:function(){this.innerHeight=Math.min(1100,window.innerHeight)},within24Hours:function(t){return $A.Date(t,!0)-this.nowTime<86400},expiresFormat:function(t){return $A.countDownFormat(t,this.nowTime)},isOverdue:function(t){return!!t.overdue||$A.Date(t.end_at,!0)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.receiveShow=!1,e.$store.dispatch("getTaskOne",e.taskDetail.id).catch((function(){}))})).catch((function(t){var n=t.msg;$A.modalError(n),e.ownerLoad--,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})))},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.$store.dispatch("getTaskOne",t.taskDetail.id).catch((function(){}))})).catch((function(e){var n=e.msg;$A.modalError(n),t.assistLoad--}))}},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||this.addsubLoad>0)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.messageError("任务描述不能为空")},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.msgText&&this.msgDialog()}},msgDialog: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.$store.dispatch("saveTask",n),t.$store.dispatch("getDialogOne",n.dialog_id).then((function(){t.sendLoad--,$A.isSubElectron?t.resizeDialog().then((function(){t.sendDialogMsg()})):t.$nextTick((function(){t.windowMax768?(window.__sendDialogMsg={time:$A.Time()+10,msgText:t.msgText,msgFile:t.msgFile},t.msgFile=[],t.msgText="",t.goForward({name:"manage-messenger",query:{_:$A.randomString(6)}}),$A.setStorage("messenger::dialogId",n.dialog_id),t.$store.state.dialogOpenId=n.dialog_id,t.$store.dispatch("openTask",0)):t.sendDialogMsg()}))})).catch((function(e){var n=e.msg;t.sendLoad--,$A.modalError(n)}))})).catch((function(e){var n=e.msg;t.sendLoad--,$A.modalError(n)})))},sendDialogMsg:function(){this.msgFile.length>0?this.$refs.dialog.sendFileMsg(this.msgFile):this.msgText&&this.$refs.dialog.sendMsg(this.msgText),this.msgFile=[],this.msgText=""},msgPasteDrag:function(t,e){var n="drag"===e?t.dataTransfer.files:t.clipboardData.files;this.msgFile=Array.prototype.slice.call(n),this.msgFile.length>0&&(t.preventDefault(),this.msgDialog())},taskPasteDrag:function(t,e){this.dialogDrag=!1,this.msgPasteDrag(t,e)},taskDragOver: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)},onSelectFile:function(t){this.msgFile=[t],this.msgDialog()},deleteFile:function(t){var e=this;this.$set(t,"_show_menu",!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={title:this.taskDetail.name,titleFixed:!0,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.sendMessage("windowRouter",{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;return new Promise((function(e){t.$Electron.sendSyncMessage("windowSize",{width:Math.max(1100,window.innerWidth),height:Math.max(720,window.innerHeight),minWidth:800,minHeight:600,autoZoom:!0});var n=0,r=setInterval((function(){n++,(t.$refs.dialog||n>20)&&(clearInterval(r),t.$refs.dialog&&e())}),100)}))},viewFile:function(t){if(["jpg","jpeg","gif","png"].includes(t.ext)){var e=this.fileList.filter((function(t){return["jpg","jpeg","gif","png"].includes(t.ext)})),n=e.findIndex((function(e){return e.id===t.id}));n>-1?(this.$store.state.previewImageIndex=n,this.$store.state.previewImageList=e.map((function(t){return t.path}))):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=[t.path])}else this.$Electron?this.$Electron.sendMessage("windowRouter",{name:"file-task-"+t.id,path:"/single/file/task/"+t.id,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:"".concat(t.name," (").concat($A.bytesToSize(t.size),")"),titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)}}):window.open($A.apiUrl("../single/file/task/".concat(t.id)))},downFile:function(t){var e=this;$A.modalConfirm({title:"下载文件",content:"".concat(t.name," (").concat($A.bytesToSize(t.size),")"),okText:"立即下载",onOk:function(){e.$store.dispatch("downUrl",$A.apiUrl("project/task/filedown?file_id=".concat(t.id)))}})}}};const b=(0,u.Z)(v,(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:{disabled:0===t.taskId,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",{ref:"name",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255},on:{"on-blur":function(e){return t.updateBlur("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.complete_at&&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:{"popper-class":"task-detail-user-popper",title:t.$L("修改负责人"),width:240,placement:"bottom",transfer:""},on:{"on-popper-show":t.openOwner,"on-ok":t.onOwner}},[n("div",{attrs:{slot:"content"},slot:"content"},[n("UserInput",{attrs:{"multiple-max":1,"project-id":t.taskDetail.project_id,placeholder:t.$L("选择任务负责人"),transfer:!1},model:{value:t.ownerData.owner_userid,callback:function(e){t.$set(t.ownerData,"owner_userid",e)},expression:"ownerData.owner_userid"}}),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:{disabled:0===t.taskId,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(" "),t.taskDetail.archived_at?n("div",{staticClass:"flow"},[n("span",{staticClass:"archived",on:{click:function(e){return e.stopPropagation(),t.openMenu(t.taskDetail)}}},[t._v(t._s(t.$L("已归档")))])]):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:{disabled:0===t.taskId,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",{ref:"name",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255},on:{"on-blur":function(e){return t.updateBlur("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.updateBlur("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,"popper-class":"task-detail-user-popper",placement:"bottom",transfer:""},on:{"on-popper-show":t.openOwner,"on-ok":t.onOwner}},[n("div",{attrs:{slot:"content"},slot:"content"},[n("UserInput",{attrs:{"multiple-max":10,"project-id":t.taskDetail.project_id,placeholder:t.$L("选择任务负责人"),transfer:!1},model:{value:t.ownerData.owner_userid,callback:function(e){t.$set(t.ownerData,"owner_userid",e)},expression:"ownerData.owner_userid"}}),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,"popper-class":"task-detail-user-popper",placement:"bottom",transfer:""},on:{"on-popper-show":t.openAssist,"on-ok":t.onAssist}},[n("div",{attrs:{slot:"content"},slot:"content"},[n("UserInput",{attrs:{"multiple-max":10,"project-id":t.taskDetail.project_id,"disabled-choice":t.assistData.disabled,placeholder:t.$L("选择任务协助人员"),transfer:!1},model:{value:t.assistData.assist_userid,callback:function(e){t.$set(t.assistData,"assist_userid",e)},expression:"assistData.assist_userid"}}),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.end_at?[t.within24Hours(t.taskDetail.end_at)?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.isOverdue(t.taskDetail)?n("Tag",{attrs:{color:"red"}},[t._v(t._s(t.$L("超期未完成")))]):t._e()]:t._e()],2)])],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.taskDetail.file_num>50?n("li",{staticClass:"tip"},[t._v(t._s(t.$L("共"+t.taskDetail.file_num+"个文件,仅显示最新50个")))]):t._e(),t._v(" "),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("div",{staticClass:"file-name"},[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("div",{staticClass:"file-menu",class:{show:e._show_menu}},[n("Icon",{attrs:{type:"md-eye"},on:{click:function(n){return t.viewFile(e)}}}),t._v(" "),n("Icon",{attrs:{type:"md-arrow-round-down"},on:{click:function(n){return t.downFile(e)}}}),t._v(" "),n("EPopover",{staticClass:"file-delete",model:{value:e._show_menu,callback:function(n){t.$set(e,"_show_menu",n)},expression:"file._show_menu"}},[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._show_menu=!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",{staticClass:"taskfont del",attrs:{slot:"reference"},slot:"reference"},[t._v("")])])],1)],1)}))],2),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,ref:"subTask_"+e.id,refInFor:!0,attrs:{"task-id":e.id,"open-task":e,"main-end-at":t.taskDetail.end_at,"can-update-blur":t.canUpdateBlur}})})),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",on:{"on-select-file":t.onSelectFile}})],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,"show-load":!1},on:{"on-load-change":t.logLoadChange}}):n("div",{staticClass:"no-dialog",on:{drop:function(e){return e.preventDefault(),t.taskPasteDrag(e,"drag")},dragover:function(e){return e.preventDefault(),t.taskDragOver(!0,e)},dragleave:function(e){return e.preventDefault(),t.taskDragOver(!1,e)}}},[n("div",{staticClass:"no-tip"},[t._v(t._s(t.$L("暂无消息")))]),t._v(" "),n("div",{staticClass:"no-input"},[n("DragInput",{staticClass:"dialog-input",attrs:{type:"textarea",disabled:t.sendLoad>0,rows:1,autosize:{minRows:1,maxRows:3},maxlength:2e4,placeholder:t.$L("输入消息...")},on:{"on-keydown":t.msgKeydown,"on-input-paste":t.msgPasteDrag},model:{value:t.msgText,callback:function(e){t.msgText=e},expression:"msgText"}}),t._v(" "),n("div",{staticClass:"no-send",on:{click:t.msgDialog}},[t.sendLoad>0?n("Loading"):[n("Badge",{attrs:{count:t.taskDetail.msg_num}}),t._v(" "),n("Icon",{attrs:{type:"md-send"}})]],2)],1),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()])],1)],2),t._v(" "),t.taskDetail.id?t._e():n("div",{staticClass:"task-load"},[n("Loading")],1)]):t._e()}),[],!1,null,null,null).exports},21929:(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,n=this.task,r=function(t){t?e.$store.dispatch("saveTaskCompleteTemp",n.id):e.$store.dispatch("forgetTaskCompleteTemp",n.id)};if($A.isJson(t))t.name&&this.updateTask({color:t.color}).catch((function(){}));else{if($A.leftExists(t,"turn::")){var o=$A.leftDelete(t,"turn::");if(o==this.task.flow_item_id)return;var i=this.taskFlowItems.find((function(t){return t.id==e.flow.flow_item_id}))||{},a=this.taskFlowItems.find((function(t){return t.id==o}))||{},s="end"!==i.status&&"end"===a.status,u="end"===i.status&&"end"!==a.status;return this.updateBefore&&(s?r(!0):u&&r(!1)),void this.updateTask({flow_item_id:o}).then((function(){s?r(!0):u&&r(!1)})).catch((function(){s?r(!1):u&&r(!0)}))}switch(t){case"complete":if(this.task.complete_at)return;this.updateBefore&&r(!0),this.updateTask({complete_at:$A.formatDate("Y-m-d H:i:s")}).then((function(){r(!0)})).catch((function(){r(!1)}));break;case"uncomplete":if(!this.task.complete_at)return;this.updateBefore&&r(!1),this.updateTask({complete_at:!1}).then((function(){r(!1)})).catch((function(){r(!0)}));break;case"archived":case"remove":this.archivedOrRemoveTask(t)}}},visibleChange:function(t){t&&this.$store.dispatch("getTaskFlow",this.task.id).then(this.$refs.dropdownMenu.updatePopper).catch(this.$refs.dropdownMenu.updatePopper)},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="removeTask",r="删除",o={task_id:this.task.id},i=this.task.parent_id>0?"子任务":"任务";"archived"==t&&(n="archivedTask",r="归档",this.task.archived_at&&(r="还原归档",o={task_id:this.task.id,type:"recovery"})),$A.modalConfirm({title:r+i,content:"你确定要"+r+i+"【"+this.task.name+"】吗?",loading:!0,onOk:function(){e.loadIng?e.$Modal.remove():e.$store.dispatch(n,o).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",disabled:t.disabled,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",{ref:"dropdownMenu",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(t.task.archived_at?"还原归档":"归档"))+"\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,".electron-task[data-v-2b8bcc0c]{display:flex;flex-direction:column;height:100%;overflow:auto}.electron-task .task-detail[data-v-2b8bcc0c]{border-radius:0;flex:1;margin:0;padding:18px 22px}",""]);const i=o},83801:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(1519),o=n.n(r)()((function(t){return t[1]}));o.push([t.id,".electron-task .task-detail .task-info .head .function{margin-right:0}.electron-task .task-detail .task-info .head .function .open{display:none}",""]);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},V=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)},Ft=function(t){return function(e){return e.replace(t,"")}},jt=Ft(/^\s+|\s+$/g),zt=Ft(/^\s+/g),Ut=Ft(/\s+$/g),Vt=function(t){return t.length>0},Ht=function(t){return!Vt(t)},qt=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Wt=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]+).*/,qt],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:[qt,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Wt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Wt("firefox")},{name:"Safari",versionRegexes:[qt,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(Bt(t,"safari")||Bt(t,"mobile/"))&&Bt(t,"applewebkit")}}],Yt=[{name:"Windows",search:Wt("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:Wt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Wt("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Wt("linux"),versionRegexes:[]},{name:"Solaris",search:Wt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Wt("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Wt("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Xt={browsers:S(Kt),oses:S(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:S(Zt),chrome:S(Gt),ie:S("IE"),opera:S(Jt),firefox:S(Qt),safari:S(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:S(re),ios:S("iOS"),android:S(oe),linux:S(ie),osx:S("OSX"),solaris:S(ae),freebsd:S(se),chromeos:S(ue)},fe=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 Pt(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 Pt(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),f=!c&&!u&&!l;return{isiPad:S(o),isiPhone:S(i),isTablet:S(u),isPhone:S(c),isTouch:S(s),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:S(l),isDesktop:S(f)}}(a,i,t,n);return{browser:i,os:a,deviceType:s}},de=function(t){return window.matchMedia(t).matches},me=Lt((function(){return fe(navigator.userAgent,B.from(navigator.userAgentData),de)})),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,Se=function(t){return null==t?"":(""+t).replace(xe,"")},De=function(t,e){return e?!("array"!==e||!_t(t))||typeof t===e:void 0!==t},Ee=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;Ee(t,e,n,r)})))},Ne={trim:Se,isArray:_t,is:De,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 Ae(n.childNodes[0])},fromTag:function(t,e){var n=(e||document).createElement(t);return Ae(n)},fromText:function(t,e){var n=(e||document).createTextNode(t);return Ae(n)},fromDom:Ae,fromPoint:function(t,e,n){return B.from(t.dom.elementFromPoint(e,n)).map(Ae)}},Oe=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},Le=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},Re=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},Pe=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},Fe=function(t){return function(e){return Me(e)===t}},je=Fe(1),ze=Fe(3),Ue=Fe(9),Ve=Fe(11),He=function(t){return Te.fromDom(t.dom.ownerDocument)},qe=function(t){return Ue(t)?t:He(t)},We=function(t){return Te.fromDom(qe(t).dom.defaultView)},Ke=function(t){return B.from(t.dom.parentNode).map(Te.fromDom)},Ye=function(t){return B.from(t.dom.previousSibling).map(Te.fromDom)},Xe=function(t){return B.from(t.dom.nextSibling).map(Te.fromDom)},Ze=function(t){return nt(Oe(t,Ye))},Ge=function(t){return Oe(t,Xe)},Je=function(t){return H(t.dom.childNodes,Te.fromDom)},Qe=function(t,e){var n=t.dom.childNodes;return B.from(n[e]).map(Te.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 Ve(t)&&y(t.dom.host)},on=C(Element.prototype.attachShadow)&&C(Node.prototype.getRootNode),an=S(on),sn=on?function(t){return Te.fromDom(t.dom.getRootNode())}:qe,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 Te.fromDom(e)}(qe(t))},cn=function(t){return Te.fromDom(t.dom.host)},ln=function(t){return y(t.dom.shadowRoot)},fn=function(t,e){Ke(t).each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},dn=function(t,e){Xe(t).fold((function(){Ke(t).each((function(t){pn(t,e)}))}),(function(t){fn(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){q(e,(function(e){pn(t,e)}))},gn=function(t){t.dom.textContent="",q(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,q(n,(function(t){fn(e,t)}))),vn(t)},yn=function(t){var e=ze(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()}(Te.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)},Sn=function(t,e,n){var r=(void 0!==n?n.dom:document).defaultView;r&&r.scrollTo(t,e)},Dn=function(t,e){pe().browser.isSafari()&&C(t.dom.scrollIntoViewIfNeeded)?t.dom.scrollIntoViewIfNeeded(!1):t.dom.scrollIntoView(e)},En=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},Nn=function(t){var e=void 0===t?window:t,n=e.document,r=xn(Te.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 En(r.left,r.top,n,o)}),(function(t){return En(Math.max(t.pageLeft,r.left),Math.max(t.pageTop,r.top),t.width,t.height)}))},An=function(t){return function(e){return!!e&&e.nodeType===t}},Tn=function(t){return!!t&&!Object.getPrototypeOf(t)},On=An(1),Ln=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(On(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:L,getOr:S(t),getOrThunk:S(t),getOrDie:S(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:L,isError:$,getOr:D,getOrThunk:function(t){return t()},getOrDie:function(){return(e=String(t),function(){throw new Error(e)})();var e},or:D,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:L,forall:$,toOptional:B.none}},xr={value:_r,error:kr,fromOption:function(t,e){return t.fold((function(){return kr(e)}),_r)}},Sr=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 q(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(Dr)):e(r.pass.map(Dr))}))},unload:c,unloadAll:function(t){q(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(On(e)&&ri(e))return e;for(var o=e.childNodes,i=o.length-1;i>=0;i--)ii(t,o[i],r);if(On(e)){var a=e.childNodes;1===a.length&&ri(a[0])&&e.parentNode.insertBefore(a[0],e)}return function(t){return Un(t)||zn(t)}(e)||Go(e,r)||function(t){return!!On(t)&&t.childNodes.length>0}(e)||oi(e,r)||t.remove(e),e},ai=Ne.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,fi={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:"Ÿ"},di={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},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)+";":di[t]||"&#"+t.charCodeAt(0)+";"}))},bi=function(t,e,n){return n=n||hi,t.replace(e?si:ui,(function(t){return di[t]||n[t]||t}))},yi={encodeRaw:gi,encodeAllRaw:function(t){return(""+t).replace(ci,(function(t){return di[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!==di[t]?di[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))):fi[e]||String.fromCharCode(e):mi[t]||hi[t]||function(t){var e=Te.fromTag("div").dom;return e.innerHTML=t,e.textContent||e.innerText||t}(t)}))}},Ci={},wi={},_i=Ne.makeMap,ki=Ne.each,xi=Ne.extend,Si=Ne.explode,Di=Ne.inArray,Ei=function(t,e){return(t=Ne.trim(t))?t.split(e||" "):[]},Ni=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,/[, ]/):Si(t,/[, ]/)}))),n},Ai=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 fn(n.element,r),Ad(r,(function(){return vn(r)}))},Od=function(t,e,n,r){Id(t,(function(o,i){return $d(t,e,n,r)}),n)},Ld=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))},$d=function(t,e,n,r){var o=Te.fromDom(t.getBody()),i=Te.fromDom(t.getDoc());o.dom.offsetWidth;var a=Td(Te.fromDom(n.startContainer),n.startOffset);Ld(t,i,e,a,r),a.cleanup()},Rd=function(t,e,n,r){var o=Te.fromDom(t.getDoc());Ld(t,o,n,function(t){return Ad(Te.fromDom(t),_)}(e),r)},Id=function(t,e,n){var r=n.startContainer,o=n.startOffset,i=n.endContainer,a=n.endOffset;e(Te.fromDom(r),Te.fromDom(i));var s=t.dom.createRng();s.setStart(r,o),s.setEnd(i,a),t.selection.setRng(n)},Pd=function(t,e,n,r){var o=t.pos;if(n)Sn(o.left,o.top,r);else{var i=o.top-e+t.height;Sn(o.left,i,r)}},Bd=function(t,e,n,r,o){var i=n+e,a=r.pos.top,s=r.bottom,u=s-a>=n;if(ai){Pd(r,n,u?!1!==o:!0===o,t)}else s>i&&!u&&Pd(r,n,!0===o,t)},Md=function(t,e,n,r){var o=t.dom.defaultView.innerHeight;Bd(t,e,o,n,r)},Fd=function(t,e,n,r){var o=t.dom.defaultView.innerHeight;Bd(t,e,o,n,r);var i=Ed(n.element),a=Nn(window);i.topa.bottom&&Dn(n.element,!0===r)},jd=function(t,e,n){return Od(t,Md,e,n)},zd=function(t,e,n){return Rd(t,e,Md,n)},Ud=function(t,e,n){return Od(t,Fd,e,n)},Vd=function(t,e,n){return Rd(t,e,Fd,n)},Hd=function(t,e,n){(t.inline?jd:Ud)(t,e,n)},qd=function(t){var e=sn(t).dom;return t.dom===e.activeElement},Wd=function(t){return void 0===t&&(t=Te.fromDom(document)),B.from(t.dom.activeElement).map(Te.fromDom)},Kd=function(t,e,n,r){return{start:t,soffset:e,finish:n,foffset:r}},Yd=Sr([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Xd=(Yd.before,Yd.on,Yd.after,function(t){return t.fold(D,D,D)}),Zd=Sr([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Gd={domRange:Zd.domRange,relative:Zd.relative,exact:Zd.exact,exactFromRange:function(t){return Zd.exact(t.start,t.soffset,t.finish,t.foffset)},getWin:function(t){var e=function(t){return t.match({domRange:function(t){return Te.fromDom(t.startContainer)},relative:function(t,e){return Xd(t)},exact:function(t,e,n,r){return t}})}(t);return We(e)},range:Kd},Jd=pe().browser,Qd=function(t,e){var n=ze(e)?Kf(e).length:Je(e).length+1;return t>n?n:t<0?0:t},tm=function(t){return Gd.range(t.start,Qd(t.soffset,t.start),t.finish,Qd(t.foffset,t.finish))},em=function(t,e){return!Tn(e.dom)&&(Pe(t,e)||Re(t,e))},nm=function(t){return function(e){return em(t,e.start)&&em(t,e.finish)}},rm=function(t){return!0===t.inline||Jd.isIE()},om=function(t){return Gd.range(Te.fromDom(t.startContainer),t.startOffset,Te.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)}(We(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(Te.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)}(Te.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)}))},fm=function(t){var e=Ns((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()}))},dm=gs.DOM,mm=function(t,e){var n=function(t){return t.getParam("custom_ui_selector","","string")}(t),r=dm.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;fm(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(Te.fromDom(t.getElement()));return Wd(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)}))})),kd||(kd=function(e){var n=t.activeEditor;n&&function(t){if(an()&&y(t.target)){var e=Te.fromDom(t.target);if(je(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))}))},dm.bind(document,"focusin",kd))},hm=function(t,e){t.focusedEditor===e.editor&&(t.focusedEditor=null),t.activeEditor||(dm.unbind(document,"focusin",kd),kd=null)},gm=function(t,e){return function(t){return t.collapsed?B.from(uu(t.startContainer,t.startOffset)).map(Te.fromDom):B.none()}(e).bind((function(e){return vo(e)?B.some(e):!1===Pe(t,e)?B.some(t):B.none()}))},vm=function(t,e){gm(Te.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 qd(t)||(e=t,Wd(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(Te.fromDom(e))}(t):function(t){return t.iframeElement&&qd(Te.fromDom(t.iframeElement))}(t)},wm=function(t){return Cm(t)||function(t){var e=sn(Te.fromDom(t.getElement()));return Wd(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(Te.fromDom).map((function(t){return r&&e.collapsed?t:Qe(t,o(t,a)).getOr(t)})).bind((function(t){return je(t)?B.some(t):Ke(t).filter(je)})).map((function(t){return t.dom})).getOr(t)},Sm=function(t,e,n){return xm(t,e,!0,n,(function(t,e){return Math.min(nn(t),e)}))},Dm=function(t,e,n){return xm(t,e,!1,n,(function(t,e){return e>0?e-1:e}))},Em=function(t,e){for(var n=t;t&&Fn(t)&&0===t.length;)t=e?t.nextSibling:t.previousSibling;return t||n},Nm=function(t,e){return H(e,(function(e){var n=t.fire("GetSelectionRange",{range:e});return n.range!==e?n.range:e}))},Am={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},Tm=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}},Om=function(t){if(!Xo(t.value))return!1;var e=t.parent;return!e||"span"===e.name&&!e.attr("style")||!/^[ ]+$/.test(t.value)},Lm=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,Am[e]||1);return n&&dt(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&&dt(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=Ne.makeMap("button,fieldset,form,iframe,img,image,input,object,output,select,textarea"),Vm=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],"--")?Hm(e,!1,u.index+"!--".length):Hm(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},Hm=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},qm=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},Wm=function(t,e){var n;void 0===e&&(e=Ai());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:_,f=t.doctype?t.doctype:_,d=function(n,d){void 0===d&&(d="html");for(var m,p,h,g,v,b,y,C,w,_,k,x,S,D,E,N,A,T,O,L=n.html,$=0,R=[],I=0,P=yi.decode,B=Ne.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),M="html"===d?0:1,F=function(t){var e,n;for(e=R.length;e--&&R[e].name!==t;);if(e>=0){for(n=R.length-1;n>=e;n--)(t=R[n]).valid&&c(t.name);R.length=e}},j=function(t,e){return s(Rm(t,n),e)},z=function(e){""!==e&&(">"===e.charAt(0)&&(e=" "+e),t.allow_conditional_comments||"[if"!==e.substr(0,3).toLowerCase()||(e=" "+e),i(Rm(e,n)))},U=function(t,e){var n=t||"",r=!Mt(n,"--"),o=Hm(L,r,e);return t=L.substr(e,o-e),z(r?n+t:t),o+1},V=function(e,i,a,s,u){if(a=function(t){return Rm(t,n)}((i=i.toLowerCase())in Y?i:P(a||s||u||"")),X&&!C&&!1===function(t){return 0===t.indexOf("data-")||0===t.indexOf("aria-")}(i)){var c=D[i];if(!c&&E){for(var l=E.length;l--&&!(c=E[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]&&!zm.isDomSafe(a,e,t)||C&&(i in B||0===i.indexOf("on"))||(g.map[i]=a,g.push({name:i,value:a}))},H=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"),q=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,W=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=L+">";m=H.exec(Q);){var tt=m[0];if($L.length){j(P(L.substr(m.index))),$=m.index+tt.length;continue}":"===(p=p.toLowerCase()).charAt(0)&&(p=p.substr(1)),w=p in W,G&&K[p]&&R.length>0&&R[R.length-1].name===p&&F(p);var et=qm(q,m[9]);if(null!==et){if("all"===et){$=Vm(e,L,H.lastIndex),H.lastIndex=$;continue}k=!1}if(!X||(_=e.getElementRule(p))){if(k=!0,X&&(D=_.attributes,E=_.attributePatterns),(S=m[9])?((C=-1!==S.indexOf("data-mce-type"))&&Z&&(k=!1),(g=[]).map={},S.replace(q,(function(t,e,n,r,o){return V(p,e,n,r,o),""}))):(g=[]).map={},X&&!C){if(N=_.attributesRequired,A=_.attributesDefault,T=_.attributesForced,_.removeEmptyAttrs&&!g.length&&(k=!1),T)for(v=T.length;v--;)y=(x=T[v]).name,"{$uid}"===(O=x.value)&&(O="mce_"+I++),g.map[y]=O,g.push({name:y,value:O});if(A)for(v=A.length;v--;)(y=(x=A[v]).name)in g.map||("{$uid}"===(O=x.value)&&(O="mce_"+I++),g.map[y]=O,g.push({name:y,value:O}));if(N){for(v=N.length;v--&&!(N[v]in g.map););-1===v&&(k=!1)}if(x=g.map["data-mce-bogus"]){if("all"===x){$=Vm(e,L,H.lastIndex),H.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(L))?(k&&(b=L.substr($,m.index-$)),$=m.index+m[0].length):(b=L.substr($),$=L.length),k&&(b.length>0&&j(b,!0),c(p)),H.lastIndex=$;continue}w||(S&&S.indexOf("/")===S.length-1?k&&c(p):R.push({name:p,valid:k}))}else if(p=m[1])z(p);else if(p=m[2]){if(!(1===M||t.preserve_cdata||R.length>0&&e.isValidChild(R[R.length-1].name,"#cdata"))){$=U("",m.index+2),H.lastIndex=$;continue}a(p)}else if(p=m[3])f(p);else{if((p=m[4])||"=0;v--)(p=R[v]).valid&&c(p.name)};return{parse:function(t,e){void 0===e&&(e="html"),d(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:Wm.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 Tt(Tt({},t),{format:e,get:!0,getInner:!0})}(e,n),a=e.no_events?i:t.fire("BeforeGetContent",i);return o="raw"===a.format?Ne.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(Te.fromDom(r))?a.content=o:a.content=Ne.trim(o),a.no_events?a.content:t.fire("GetContent",a).content},Zm=Ne.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=Ne.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,f,d;if(n&&r[t]&&e.length>0&&(d=e[e.length-1]).length>0&&"\n"!==d&&e.push("\n"),e.push("<",t),s)for(c=0,l=s.length;c":" />",u&&n&&o[t]&&e.length>0&&(d=e[e.length-1]).length>0&&"\n"!==d&&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=Ai());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 f=e.getElementRule(t.name);if(f){for(var d=0,m=f.attributesOrder.length;d'))},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 Pe(e,t)?(r=function(t,e){for(var n=C(e)?e:L,r=t.dom,o=[];null!==r.parentNode&&void 0!==r.parentNode;){var i=r.parentNode,a=Te.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(t,(function(t){return n(t)||Re(t,e)})),r.slice(0,-1)):[];var r},Sp=function(t,e){return xp(t,e,L)},Dp=function(t,e){return[t].concat(Sp(t,e))},Ep=function(t,e,n){return Ol(t,e,n,cp)},Np=function(t,e){return J(Dp(Te.fromDom(e.container()),t),lo)},Ap=function(t,e,n){return Ep(t,e.dom,n).forall((function(t){return Np(e,n).fold((function(){return!1===tl(t,n,e.dom)}),(function(r){return!1===tl(t,n,e.dom)&&Pe(r,Te.fromDom(t.container()))}))}))},Tp=function(t,e,n){return Np(e,n).fold((function(){return Ep(t,e.dom,n).forall((function(t){return!1===tl(t,n,e.dom)}))}),(function(e){return Ep(t,e.dom,n).isNone()}))},Op=N(Tp,!1),Lp=N(Tp,!0),$p=N(Ap,!1),Rp=N(Ap,!0),Ip=function(t){return ll(t).exists(mo)},Pp=function(t,e,n){var r=Y(Dp(Te.fromDom(n.container()),e),lo),o=at(r).getOr(e);return Al(t,o.dom,n).filter(Ip)},Bp=function(t,e){return ll(e).exists(mo)||Pp(!0,t,e).isSome()},Mp=function(t,e){return function(t){return B.from(t.getNode(!0)).map(Te.fromDom)}(e).exists(mo)||Pp(!1,t,e).isSome()},Fp=N(Pp,!1),jp=N(Pp,!0),zp=function(t){return Au.isTextPosition(t)&&!t.isAtStart()&&!t.isAtEnd()},Up=function(t,e){var n=Y(Dp(Te.fromDom(e.container()),t),lo);return at(n).getOr(t)},Vp=function(t,e){return zp(e)?up(e):up(e)||Rl(Up(t,e).dom,e).exists(up)},Hp=function(t,e){return zp(e)?sp(e):sp(e)||$l(Up(t,e).dom,e).exists(sp)},qp=function(t){return ll(t).bind((function(t){return Xr(t,je)})).exists((function(t){return function(t){return U(["pre","pre-wrap"],t)}(ir(t,"white-space"))}))},Wp=function(t,e){return function(t,e){return Rl(t.dom,e).isNone()}(t,e)||function(t,e){return $l(t.dom,e).isNone()}(t,e)||Op(t,e)||Lp(t,e)||Mp(t,e)||Bp(t,e)},Kp=function(t,e){return!qp(e)&&(Op(t,e)||$p(t,e)||Mp(t,e)||Vp(t,e))},Yp=function(t,e){return!qp(e)&&(Lp(t,e)||Rp(t,e)||Bp(t,e)||Hp(t,e))},Xp=function(t,e){return Kp(t,e)||Yp(t,function(t){var e=t.container(),n=t.offset();return Fn(e)&&n0&&n=t.data.length&&Yp(o,Au(t,t.data.length)),s=0===e&&Kp(o,Au(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-zt(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(Te.fromDom(a)),n&&nh(i,o),i},ih=function(t,e){return function(t,e){var n=t.container(),r=t.offset();return!1===Au.isTextPosition(t)&&n===e.parentNode&&r>Au.before(e).offset()}(e,t)?Au(e.container(),e.offset()-1):e},ah=function(t){return qo(t.previousSibling)?B.some((e=t.previousSibling,Fn(e)?Au(e,e.data.length):Au.after(e))):t.previousSibling?Pl(t.previousSibling):B.none();var e},sh=function(t){return qo(t.nextSibling)?B.some((e=t.nextSibling,Fn(e)?Au(e,0):Au.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=Au.before(e.previousSibling?e.previousSibling:e.parentNode);return Rl(t,n).fold((function(){return $l(t,Au.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,Au.after(e)).fold((function(){return Rl(t,Au.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(N(ih,n))},fh=function(t,e,n){n.fold((function(){t.focus()}),(function(n){t.selection.setRng(n.toRange(),e)}))},dh=function(t,e){return e&&Ct(t.schema.getBlockElements(),Be(e))},mh=function(t){if(ei(t)){var e=Te.fromHtml('
    ');return gn(t),pn(t,e),B.some(Au.before(e.dom))}return B.none()},ph=function(t,e,n){var r,o,i,a,s=Ye(t).filter(ze),u=Xe(t).filter(ze);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?Au(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,N(dh,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&&fh(t,e,s)}),(function(n){r&&fh(t,e,B.some(n))}))},gh=function(t){return Ms(t,"td,th")},vh=function(t,e){return{start:t,end:e}},bh=Sr([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),yh=function(t,e){return Qr(Te.fromDom(t),"td,th",e)},Ch=function(t){return!Re(t.start,t.end)},wh=function(t,e){return Mf(t.start,e).bind((function(n){return Mf(t.end,e).bind((function(t){return e=Re(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 Mf(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 Mf(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 Re(t,e)}))},Sh=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)}))},Dh=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)&&zf(t.start,e)}))},Eh=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},Nh=function(t,e){var n=function(t){return function(e){return Re(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 Mf(Te.fromDom(t),e)},r=n(t.startContainer),o=n(t.endContainer),i=r.isSome(),a=o.isSome(),s=Zn(r,o,Re).getOr(!1);return{startTable:r,endTable:o,isStartInTable:i,isEndInTable:a,isSameTable:s,isMultiTable:!s&&i&&a}}(e,n);return Dh(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(Sh).getOr([]),a=o.bind(Sh).getOr([]);if(i.length>0&&a.length>0){var s=Eh(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=Sh(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=Eh(n,e);return B.some(bh.partialTable(o,B.some(Tt(Tt({},e),{rng:i}))))}return B.none()}))}(r,o,e,n)},Ah=function(t){var e;return(8===Me(e=t)||"#comment"===Be(e)?Ye(t):en(t)).bind(Ah).orThunk((function(){return B.some(t)}))},Th=function(t){return q(t,(function(t){rr(t,"contenteditable"),_p(t)}))},Oh=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)},Lh=function(t){var e=Bf(t),n=Te.fromDom(t.selection.getNode());Kn(n.dom)&&ei(n)?t.selection.setCursorLocation(n.dom,0):t.selection.collapse(!0),e.length>1&&V(e,(function(t){return Re(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(Te.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 Oh(t,s,r,i),ei(s)?B.none():B.some(i?e.slice(1):e.slice(0,-1))})).getOr(e);return Th(o),Lh(t),!0},Rh=function(t,e,n,r){var o=t.selection.getRng(),i=e[0],a=n[n.length-1];Oh(t,i,o,!0),Oh(t,a,o,!1);var s=ei(i)?e:e.slice(1),u=ei(a)?n:n.slice(0,-1);return Th(s.concat(u)),r.deleteContents(),Lh(t),!0},Ih=function(t,e,n,r){void 0===r&&(r=!0),e.deleteContents();var o,i=Ah(n).getOr(n),a=Te.fromDom(t.dom.getParent(i.dom,t.dom.isBlock));if(ei(a)&&(_p(a),r&&t.selection.setCursorLocation(a.dom,0)),!Re(n,a)){var s=Xn(Ke(a),n)?[]:Ke(o=a).map(Je).map((function(t){return Y(t,(function(t){return!Re(o,t)}))})).getOr([]);q(s.concat(Je(n)),(function(t){Re(t,a)||Pe(t,a)||!ei(t)||vn(t)}))}return!0},Ph=function(t,e){return hh(t,!1,e),!0},Bh=function(t,e,n,r){return Fh(e,r).fold((function(){return function(t,e,n){return Nh(e,n).map((function(e){return e.fold(N(Ih,t),N(Ph,t),N($h,t),N(Rh,t))}))}(t,e,n)}),(function(e){return function(t,e){return jh(t,e)}(t,e)})).getOr(!1)},Mh=function(t,e){return J(Dp(e,t),bo)},Fh=function(t,e){return J(Dp(e,t),(n="caption",function(t){return je(t)&&Be(t)===n}));var n},jh=function(t,e){return _p(e),t.selection.setCursorLocation(e.dom,0),B.some(!0)},zh=function(t,e,n,r,o){return Tl(n,t.getBody(),o).bind((function(i){return function(t,e,n,r){return Il(t.dom).bind((function(o){return Pl(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 jh(t,e)}(t,r):function(t,e,n){return Fh(t,Te.fromDom(n.getNode())).map((function(t){return!1===Re(t,e)}))}(e,r,i)})).or(B.some(!0))},Uh=function(t,e,n,r){var o=Au.fromRangeStart(t.selection.getRng());return Mh(n,r).bind((function(r){return ei(r)?jh(t,r):function(t,e,n,r,o){return Tl(n,t.getBody(),o).bind((function(t){return Mh(e,Te.fromDom(t.getNode())).map((function(t){return!1===Re(t,r)}))}))}(t,n,e,r,o)})).getOr(!1)},Vh=function(t,e){return t?vp(e):bp(e)},Hh=function(t,e,n){var r=Te.fromDom(t.getBody());return Fh(r,n).fold((function(){return Uh(t,e,r,n)||function(t,e){var n=Au.fromRangeStart(t.selection.getRng());return Vh(e,n)||Al(e,t.getBody(),n).exists((function(t){return Vh(e,t)}))}(t,e)}),(function(n){return function(t,e,n,r){var o=Au.fromRangeStart(t.selection.getRng());return ei(r)?jh(t,r):zh(t,n,e,r,o)}(t,e,r,n).getOr(!1)}))},qh=function(t,e){var n=Te.fromDom(t.selection.getStart(!0)),r=Bf(t);return t.selection.isCollapsed()&&0===r.length?Hh(t,e,n):function(t,e,n){var r=Te.fromDom(t.getBody()),o=t.selection.getRng();return 0!==n.length?$h(t,n,B.none()):Bh(t,r,o,e)}(t,n,r)},Wh=function(t){var e=Au.fromRangeStart(t),n=Au.fromRangeEnd(t),r=t.commonAncestorContainer;return Al(!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:Wh(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||Vn(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=Au.after(t),r=xl(e).prev(n);return r?r.toRange():null},tg=function(t,e,n){var r=t.parentNode;return Ne.each(e,(function(e){r.insertBefore(e,t)})),function(t,e){var n=Au.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=Au.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),Ne.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)&&zf(Te.fromDom(n),e)}(e,n,r)?t.getDoc().execCommand("Delete",!1,null):Ih(t,n,Te.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=Te.fromDom(t.getRoot());return n=Kp(r,Au.fromRangeStart(e))?n.replace(/^ /," "):n.replace(/^ /," "),Yp(r,Au.fromRangeEnd(e))?n.replace(/( | )()?$/," "):n.replace(/ ()?$/," ")}(s,a.getRng(),e));var u=t.parser,c=n.merge,l=tp({validate:yc(t)},t.schema),f='',d=t.fire("BeforeSetContent",{content:e,format:"html",selection:!0,paste:n.paste});if(d.isDefaultPrevented())t.fire("SetContent",{content:d.content,format:"html",selection:!0,paste:n.paste});else{-1===(e=d.content).indexOf("{$caret}")&&(e+="{$caret}"),e=e.replace(/\{\$caret\}/,f);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",d);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(f),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);Ne.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=td(t.getBody(),e);if("false"===r.getContentEditable(i))return r.remove(e),void o.select(i);var a=r.createRng(),s=e.previousSibling;if(Fn(s)){if(a.setStart(s,s.nodeValue.length),!ke.ie){var u=e.nextSibling;Fn(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=Au.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(),Ne.each(h.getElementsByTagName("*"),(function(t){t.removeAttribute("data-mce-fragment")})),function(t,e){B.from(t.getParent(e,"td,th")).map(Te.fromDom).each(kp)}(s,a.getStart()),t.fire("SetContent",d),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){q(t,(function(t){t.name===n.name&&(r[t.name]?r[t.name].nodes.push(n):r[t.name]={filter:t,nodes:[n]})})),q(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);q(r,(function(t){q(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=Pn(n)?Il(n).getOr(e):e;t.selection.setRng(r.toRange())}))}(t)},cg=function(t,e,n){var r=function(t,e){return Tt(Tt({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(S(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(Te.fromDom(e))?o:Ne.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(Te.fromDom(e))?n:Ne.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(Te.fromDom(n.parentNode),(function(n){return!Re(t,n)&&e(n)})):B.none()}(t,e).isSome()},fg=function(t){return C(t)?t:L},dg=function(t,e,n){var r=e(t),o=fg(n);return r.orThunk((function(){return o(t)?B.none():function(t,e,n){for(var r=t.dom,o=fg(n);r.parentNode;){r=r.parentNode;var i=Te.fromDom(r),a=e(i);if(a.isSome())return a;if(o(i))break}return B.none()}(t,e,o)}))},mg=uf,pg=function(t,e,n){var r=t.formatter.get(n);if(r)for(var o=0;o1&&"%"===t.charAt(0)};return V(["styles","attributes"],(function(n){return yt(t,n).exists((function(t){var n=p(t)?t:bt(t);return V(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},Sg=function(t){if(t){var e=new so(t,t);for(t=e.current();t;t=e.next())if(Fn(t))return t}return null},Dg=function(t){var e=Te.fromTag("span");return tr(e,{id:kg,"data-mce-bogus":"1","data-mce-type":"format-caret"}),t&&pn(e,Te.fromText(_g)),e},Eg=function(t,e,n){void 0===n&&(n=!0);var r=t.dom,o=t.selection;if(xg(e))hh(t,!1,Te.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,f=function(t){var e=Sg(t);return e&&e.nodeValue.charAt(0)===_g&&e.deleteData(0,1),e}(e);r.remove(e,!0),s===f&&u>0&&i.setStart(f,u-1),c===f&&l>0&&i.setEnd(f,l-1),a&&r.isEmpty(a)&&_p(Te.fromDom(a)),o.setRng(i)}},Ng=function(t,e,n){void 0===n&&(n=!0);var r=t.dom,o=t.selection;if(e)Eg(t,e,n);else if(!(e=Fl(t.getBody(),o.getStart())))for(;e=r.get(kg);)Eg(t,e,!1)},Ag=function(t,e){return t.appendChild(e),e},Tg=function(t,e){var n=X(t,(function(t,e){return Ag(t,e.cloneNode(!1))}),e);return Ag(n,n.ownerDocument.createTextNode(_g))},Og=function(t,e,n,r){var o,i,a,s=t.dom,u=t.selection,c=[],l=u.getRng(),f=l.startContainer,d=l.startOffset;for(i=f,3===f.nodeType&&(d!==f.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=Lf(t,l,t.formatter.get(e),!0);p=wd(p),t.formatter.remove(e,n,p,r),u.moveToBookmark(m)}else{var h=Fl(t.getBody(),a),g=Dg(!1).dom;!function(t,e,n){var r=t.dom,o=r.getParent(n,N(rf,t));o&&r.isEmpty(o)?n.parentNode.replaceChild(e,n):(wp(Te.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!mf(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=Tg(c.concat(v.toArray()),g);Eg(t,h,!1),u.setCursorLocation(b,1),s.isEmpty(a)&&s.remove(a)}},Lg=function(t){t.on("mouseup keydown",(function(e){!function(t,e){var n=t.selection,r=t.getBody();Ng(t,null,!1),8!==e&&46!==e||!n.isCollapsed()||n.getStart().innerHTML!==_g||Ng(t,Fl(r,n.getStart())),37!==e&&39!==e||Ng(t,Fl(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)},Rg={},Ig=St,Pg=kt;!function(t,e){Rg[t]||(Rg[t]=[]),Rg[t].push(e)}("pre",(function(t){var e,n=t.selection.getRng(),r=Ln(["pre"]);n.collapsed||(e=t.selection.getSelectedBlocks(),Pg(Ig(Ig(e,r),(function(t){return r(t.previousSibling)&&-1!==Dt(e,t.previousSibling)})),(function(t){var e,n;e=t.previousSibling,cs(n=t).remove(),cs(e).append("

    ").append(n.childNodes)})))}));var Bg=Ne.each,Mg=function(t){return On(t)&&!Zl(t)&&!Ml(t)&&!In(t)},Fg=function(t,e){for(var n=t;n;n=n[e]){if(Fn(n)&&Vt(n.data))return t;if(On(n)&&!Zl(n))return n}return t},jg=function(t,e,n){var r=Gm(t);if(e&&n&&(e=Fg(e,"previousSibling"),n=Fg(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),Ne.each(Ne.grep(n.childNodes),(function(t){e.appendChild(t)})),e}return n},zg=function(t,e,n,r){if(r&&!1!==e.merge_siblings){var o=jg(t,nf(r),r);jg(t,o,nf(o,!0))}},Ug=function(t,e,n){Bg(t.childNodes,(function(t){Mg(t)&&(e(t)&&n(t),t.hasChildNodes()&&Ug(t,e,n))}))},Vg=function(t,e){return function(n){return!(!n||!lf(t,n,e))}},Hg=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)}},qg=Sr([{keep:[]},{rename:["name"]},{removed:[]}]),Wg=/^(src|href|style)$/,Kg=Ne.each,Yg=uf,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(On(r)){var i=r.childNodes.length-1;!n&&o&&o--,r=r.childNodes[o>i?i:o]}return Fn(r)&&n&&o>=r.nodeValue.length&&(r=new so(r,t.getBody()).next()||r),Fn(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=Te.fromDom(e),a=Te.fromDom(t.create(r,o)),s=n?Ge(i):Ze(i);return hn(a,s),n?(fn(i,a),mn(a,i)):(dn(i,a),pn(a,i)),a.dom},tv=function(t,e,n,r){var o=nf(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);pf(n)&&(a?o===i.getRoot()&&(n.list_block&&Yg(e,n.list_block)||q(ut(e.childNodes),(function(e){of(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 hf(t)&&gf(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!(!gf(n)||!Yg(e,n.inline))||!(!pf(n)||!Yg(e,n.block))||(hf(n)?On(e)&&t.is(e,n.selector):void 0)}(a,r,e)&&!function(t,e){return e.links&&"A"===t.nodeName}(r,e))return qg.keep();var s=r;if(gf(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),q(u,(function(t){return a.setAttrib(s,t.name,t.value)})),u.length>0)return qg.rename("span")}if("all"!==e.remove){Kg(e.styles,(function(t,r){t=cf(a,sf(t,n),r+""),w(r)&&(r=t,o=null),(e.remove_similar||!o||Yg(lf(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=sf(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="",q(t.split(/\s+/),(function(t){/mce\-\w+/.test(t)&&(i+=(i?" ":"")+t)})),i))return void a.setAttrib(s,r,i);if(Wg.test(r)&&s.removeAttribute("data-mce-"+r),"style"===r&&Ln(["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=sf(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?(gf(i)||pf(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,Vg(t,"fontSize"),Hg(t,"backgroundColor",sf(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=ff(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)&&(Ne.walk(r,o,"childNodes"),o(r))}(r,i,0,a),function(t,e,n,r){!gf(e)||"sub"!==e.inline&&"sup"!==e.inline||(Ug(r,Vg(t,"fontSize"),Hg(t,"fontSize","")),t.remove(t.select("sup"===e.inline?"sub":"sup",r),!0))}(r,i,0,a),zg(r,i,0,a)):r.remove(a,!0)}))};if("false"!==s.getContentEditable(u.getNode())){if(i){if(r)if(tf(r)){if(!l(o,r)){var p=s.createRng();p.setStartBefore(r),p.setEndAfter(r),m(s,Lf(t,p,o),!0)}}else m(s,r,!0);else if(a&&gf(i)&&!Bf(t).length)!function(t,e,n){var r,o,i=t.selection,a=i.getRng(),s=a.startOffset,u=a.startContainer.nodeValue;(r=Fl(t.getBody(),i.getStart()))&&(o=Sg(r));var c,l,f=/[^\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",N(Re,n))).bind((function(t){var n=e[0],r=e[e.length-1],o=Dv(t);return Nv(o,n,r).map((function(t){return vv([Ev(t)])}))})).getOrThunk(Ov);var n,r},Rv=function(t,e){var n=Pf(e,t);return n.length>0?$v(t,n):function(t,e){return e.length>0&&e[0].collapsed?Ov():Lv(t,e[0])}(t,e)},Iv=function(t,e){return e>=0&&ei-o?(a.push([2,n[l]]),++l):(a.push([1,r[f]]),++f);else{s(t,u.start,o,u.start-u.diag,a);for(var d=u.start;d=t&&h>=o&&n[p]===r[h];)a[m]=p--,h--;if(g%2==0&&-f<=d&&d<=f&&a[m]<=i[m+g])return u(a[m],d+t-o,e,s)}}},l=[],s(0,n.length,0,r.length,l),l),e),e},zv=Lt((function(){return document.implementation.createHTMLDocument("undo")})),Uv=function(t){var e,n=(e=t.getBody(),Y(H(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)},Vv=function(t,e,n){var r=n?e.beforeBookmark:e.bookmark;"fragmented"===e.type?jv(e.fragments,t.getBody()):t.setContent(e.content,{format:"raw",no_selection:!y(r)||!jl(r)||!r.isFakeCaret}),t.selection.moveToBookmark(r)},Hv=function(t){return"fragmented"===t.type?t.fragments.join(""):t.content},qv=function(t){var e=Te.fromTag("body",zv());return Ys(e,Hv(t)),q(Ms(e,"*[data-mce-bogus]"),bn),e.dom.innerHTML},Wv=function(t,e){return!(!t||!e)&&(!!function(t,e){return Hv(t)===Hv(e)}(t,e)||function(t,e){return qv(t)===qv(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=Ne.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&&Wv(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",f),t.fire("change",f)):t.fire("AddUndo",f),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()],Vv(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]&&!Wv(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(!hf(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(S("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)),q(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=S(null),e=S("");return{undoManager:{beforeChange:_,add:t,undo:t,redo:t,clear:_,reset:_,hasUndo:L,hasRedo:L,transact:t,ignore:_,extra:_},formatter:{match:L,matchAll:S([]),matchNode:S(void 0),canApply:L,closest:e,apply:_,remove:_,toggle:_,formatChanged:S({unbind:_})},editor:{getContent:e,setContent:e,insertContent:_,addVisual:_},selection:{getContent:e},raw:{getModel:S(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(ze).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 Qf.isBookmarkNode(t.dom)})).bind(e?Xe:Ye)}(e,r).or(e).filter(ze);return t.map((function(t){return function(t,e){Ke(t).each((function(n){var r=t.dom;e&&Kp(n,Au(r,0))?nh(r,0):!e&&Yp(n,Au(r,r.length))&&rh(r,r.length)}))}(t,r)}))}))},ob=function(t,e,n){void 0===n&&(n={});var r=function(t,e){return Tt(Tt({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,Tt(Tt({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(Te.fromDom),r=B.from(e.lastChild).map(Te.fromDom);t.deleteContents(),t.insertNode(e);var o=n.bind(Ye).filter(ze).bind(nb),i=r.bind(Xe).filter(ze).bind(nb);rb(o,n,t,!0),rb(i,r,t,!1),t.collapse(!1)}(a,a.createContextualFragment(o.content)),t.selection.setRng(a),Hd(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)&&Pe(Te.fromDom(t.ownerDocument),Te.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={};Ne.each(n,(function(t,e){o(e,a).each((function(n){r[e]||(q(t,(function(t){t(!0,{node:n,selector:e,parents:a})})),r[e]=t),s[e]=t}))})),Ne.each(r,(function(t,n){s[n]||(delete r[n],Ne.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),f(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 f=um(r);if(f.isSome())return f.map((function(t){return Nm(r,[t])[0]})).getOr(l.createRange())}try{(n=c())&&!Tn(n.anchorNode)&&(a=n.rangeCount>0?n.getRangeAt(0):n.createRange?n.createRange():l.createRange(),a=Nm(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},f=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})}}},d=function(){var e=c(),n=null==e?void 0:e.anchorNode,r=null==e?void 0:e.focusNode;if(!e||!n||!r||Tn(n)||Tn(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),f(o),u(!1)):(Uf(t,o,r.getBody(),!0),f(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&&(Uf(t,o,e,!0),Uf(t,o,e,!1)),o}))}(t,e,n).each(f),e},isCollapsed:function(){var t=l(),e=c();return!(!t||t.item)&&(t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!e||t.collapsed)},isForward:d,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?Em(r.nextSibling,!0):r.parentNode,o=0===a?Em(o.previousSibling,!1):o.parentNode,r&&r===o))?r:n&&3===n.nodeType?n.parentNode:n}(r.getBody(),l())},getSel:c,setRng:f,getRng:l,getStart:function(t){return Sm(r.getBody(),l(),t)},getEnd:function(t){return Dm(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||Sm(a,e,e.collapsed),t.isBlock),r=t.getParent(r||Dm(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(!(Rf(n).length>1)&&Vf(r)){var o=yd(t,e);return o.each((function(t){f(t,d())})),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?zd:Vd)(t,e,n)}(r,t,e):Hd(r,l(),e)},placeCaretAt:function(t,e){return f(cd(t,e,r.getDoc()))},getBoundingClientRect:function(){var t=l();return t.collapsed?Au.fromRangeStart(t).getClientRects()[0]:t.getBoundingClientRect()},destroy:function(){e=o=i=null,h.destroy()}},p=Qf(m),h=sd(m,r);return m.bookmarkManager=p,m.controlSelection=h,m},fb=function(t,e,n){t.addNodeFilter("font",(function(t){q(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){q(e,(function(e){t.attr(e,null)}))}(t,["color","face","size"])}))}))},db=function(t,e){var n=Oi();e.convert_fonts_to_spans&&fb(t,n,Ne.explode(e.font_size_legacy_values)),function(t,e){t.addNodeFilter("strike",(function(t){q(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}},O=Wm({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(A("#cdata",4)).value=t},text:function(t,e){var n;N||(t=t.replace(D," "),function(t,e){return t&&(Ct(e,t.name)||"br"===t.name)}(g.lastChild,b)&&(t=t.replace(x,""))),0!==t.length&&((n=A("#text",3)).raw=!!e,g.append(n).value=t)},comment:function(t){g.append(A("#comment",8)).value=t},pi:function(t,e){g.append(A(t,7)).value=e,T(g)},doctype:function(t){g.append(A("#doctype",10)).value=t,T(g)},start:function(t,n,o){var a=w?e.getElementRule(t):{};if(a){var s=A(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]&&T(s),o||(g=s),!N&&k[t]&&(N=!0)}},end:function(n){var r,o,i,a,s=w?e.getElementRule(n):{};if(s){if(b[n]&&!N){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||E.test(o))&&(r.remove(),r=i),r=i;if((r=g.lastChild)&&3===r.type)if((o=r.value.replace(S,"")).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||E.test(o))&&(r.remove(),r=i),r=i}if(N&&k[n]&&(N=!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),L=g=new $m(u.context||t.root_name,11);if(O.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(f.name,l.name)){h.reverse();for(var g=d=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){q(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=Tt({format:"html"},a),u=Ab(e,n,s),c=function(t,e,n){var r=ko(n.getInner?e.innerHTML:t.getOuterHTML(e));return n.selection||yo(Te.fromDom(e))?r:Ne.trim(r)}(r,u,s),l=function(t,e,n){var r=n.selection?Tt({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:Ob(e,t,o,l,s)},addRules:o.addValidElements,setRules:o.setValidElements,addTempAttr:N(Tb,i,n),getTempAttrs:S(n),getNodeFilters:i.getNodeFilters,getAttributeFilters:i.getAttributeFilters}},$b=function(t,e){var n=Lb(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}},Rb=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)},Pb=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&&Pb.remove(o.nextSibling),function(t){t.fire("remove")}(t),t.editorManager.remove(t),!t.inline&&r&&function(t){Pb.setStyle(t.id,"display",t.orgDisplay)}(t),function(t){t.fire("detach")}(t),Pb.remove(t.getContainer()),Bb(e),Bb(n),t.destroy()}},Fb=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),Pb.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())},jb=(ab=function(t,e){return m(t)&&m(e)?jb(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:S(t),settings:S(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 Tt(Tt(Tt({},Gb),n),e?{menubar:!1}:{})},ry=function(t,e){var n=e.external_plugins?e.external_plugins:{};return t&&t.external_plugins?Ne.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,N(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 Ne.extend(r,{plugins:u.join(" ")})},ay=function(t,e,n,r,o){var i=t?{mobile:ny(o.mobile||{},e)}:{},a=Qb(["mobile"],jb(i,o)),s=Ne.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 Ne.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 Tt(Tt({},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=Hb(t),r=qb(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?q(t.indexOf("=")>0?t.split(/[;,](?![^=;,]*(?:[;,]|$))/):t.split(","),(function(t){var n=t.split("=");n.length>1?e[Ne.trim(n[0])]=Ne.trim(n[1]):e[Ne.trim(n[0])]=Ne.trim(n[0])})):e=t,e}(i):"string"===r?uy(d,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=d,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)}}),fy=function(t,e){return e.dom[t]},dy=function(t,e){return parseInt(ir(e,t),10)},my=N(fy,"clientWidth"),py=N(fy,"clientHeight"),hy=N(dy,"margin-top"),gy=N(dy,"margin-left"),vy=function(t,e,n){var r,o=Te.fromDom(t.getBody()),i=t.inline?o:(r=o,Te.fromDom(qe(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(Te.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 Te.fromDom(t.getEl()).dom.focus()}))}));return function(t){e.push(t)}(s),o(),t.fire("OpenNotification",{notification:Tt({},s)}),s}))},s=S(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(){q(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=Ds.PluginManager,wy=Ds.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){Ne.each(n[t],(function(t){t(e)})),delete n[t]},s=function(r,s){return r=Ne.grep(r,(function(e){return!t.isUploaded(e.blobUri())})),to.all(Ne.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(T)})).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([])}))}}},Py=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||Ry("blobid"),r=t.name||n,o=t.blob;return{id:S(n),name:S(r),filename:S(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:S(o),base64:S(t.base64),blobUri:S(t.blobUri||URL.createObjectURL(o)),uri:S(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(d(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(){q(t,(function(t){URL.revokeObjectURL(t.blobUri())})),t=[]}}}(),o=Ly(),i=[],a=function(t){var e=ws(null);return t.on("change AddUndo",(function(t){e.set(Tt({},t.level))})),{fireIfChanged:function(){var n=t.undoManager.data;st(n).filter((function(t){return!Wv(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){q(t.undoManager.data,(function(t){"fragmented"===t.type?t.fragments=H(t.fragments,(function(t){return c(t,e,n)})):t.content=c(t.content,e,n)}))},f=function(n){return e||(e=By(t,o)),g().then(s((function(o){var i=H(o,(function(t){return t.blobInfo}));return e.upload(i,Py(t)).then(s((function(e){var i=[],s=H(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,Ss.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(){q(i,(function(e){t.dom.remove(e),r.removeByUri(e.src)}))}))),n&&n(s),s})))})))},p=function(e){if(oc(t))return f(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)||q(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){q(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:f,uploadImagesAuto:p,scanForImages:g,destroy:function(){r.destroy(),o.destroy(),n=e=null}}},Fy=function(t){var e={},n=function(t,r){t&&(d(t)?(p(r)||(r=[r]),q(r,(function(t){v(t.deep)&&(t.deep=!hf(t)),v(t.split)&&(t.split=!hf(t)||gf(t)),v(t.remove)&&hf(t)&&!gf(t)&&(t.remove="none"),hf(t)&&gf(t)&&(t.mixed=!0,t.block_expand=!0),d(t.classes)&&(t.classes=t.classes.split(/\s+/))})),e[t]=r):dt(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 On(t)&&t.hasAttribute("href")},onformat:function(e,n,r){Ne.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 Ne.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}}},jy=Ne.each,zy=gs.DOM,Uy=function(t,e){var n,r,o,i=e&&e.schema||Ai({}),a=function(t){r="string"==typeof t?{name:t,classes:[],attrs:{}}:t;var e=zy.create(r.name);return function(t,e){e.classes.length&&zy.addClass(t,e.classes.join(" ")),zy.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!==Ne.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=zy.create("div")).appendChild(t),Ne.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=zy.create("div")).appendChild(s(n,t.slice(1),r.siblings)),o):""},Vy=function(t){var e,n={classes:[],attrs:{}};return"*"!==(t=n.selector=Ne.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!==Ne.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},Hy=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 d(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"),Ne.map(c.split(/(?:>|\s+(?![^\[\]]+\]))/),(function(t){var e=Ne.map(t.split(/(?:~\+|~|\+)/),Vy),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 f=zy.select(n,r)[0]||r.firstChild;return jy(e.styles,(function(t,e){var n=s(t);n&&zy.setStyle(f,e,n)})),jy(e.attributes,(function(t,e){var n=s(t);n&&zy.setAttrib(f,e,n)})),jy(e.classes,(function(t){var e=s(t);zy.hasClass(f,e)||zy.addClass(f,e)})),t.fire("PreviewFormats"),zy.setStyles(r,{position:"absolute",left:-65535}),t.getBody().appendChild(r),o=zy.getStyle(t.getBody(),"fontSize",!0),o=/px$/.test(o)?parseInt(o,10):0,jy(a.split(" "),(function(e){var n=zy.getStyle(f,e,!0);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=zy.getStyle(t.getBody(),e,!0),"#ffffff"===zy.toHex(n).toLowerCase())||"color"===e&&"#000000"===zy.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"),zy.remove(r),i},qy=function(t){var e=Fy(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),Lg(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:N(Hy,t)}},Wy=function(t){switch(t.toLowerCase()){case"undo":case"redo":case"mcerepaint":case"mcefocus":return!0;default:return!1}},Ky=function(t){var e=Es(),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;Wy(r)||(Xv(e,n),e.beforeChange())})),t.on("ExecCommand",(function(t){var e=t.command;Wy(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===Wv(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){var e;t.inputType&&("insertReplacementText"===t.inputType||"insertText"===(e=t).inputType&&null===e.data||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,id.HOME,id.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,id.DOWN,id.UP,id.LEFT,id.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===id.BACKSPACE||e===id.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)&&(id.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(Te.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 Le(Te.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?Eo(n)?Fn(n.nextSibling)?Au(n.nextSibling,0):Au.after(n):To(e)?Au(n,r+1):e:Eo(n)?Fn(n.previousSibling)?Au(n.previousSibling,n.previousSibling.data.length):Au.before(n):Oo(e)?Au(n,r-1):e},oC=N(rC,!0),iC=N(rC,!1),aC=function(t){return po(t)||go(t)},sC=function(t,e){return Pe(t,e)?Xr(e,aC,function(t){return function(e){return Re(t,Te.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=Te.fromDom(t),r=Te.fromDom(e.container());return sC(n,r).map((function(t){return function(t,e){return{block:t,position:e}}(t,e)}))},fC=function(t,e,n){var r=lC(t,Au.fromRangeStart(n)),o=r.bind((function(n){return Al(e,t,n.position).bind((function(n){return lC(t,n).map((function(n){return function(t,e,n){return Vn(n.position.getNode())&&!1===ei(n.block)?Ll(!1,n.block.dom).bind((function(r){return r.isEqual(n.position)?Al(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===Re(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 Re(e,t)}))})).isSome()}(t)&&function(t){return!1===Wn(t.from.block.dom)&&!1===Wn(t.to.block.dom)}(t)}))},dC=function(t){var e=Je(t);return Q(e,lo).fold(S(e),(function(t){return e.slice(0,t)}))},mC=function(t){var e=dC(t);return q(e,vn),e},pC=function(t,e){var n=Dp(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)&&fn(r,Te.fromTag("br"));var o=Rl(n.dom,Au.before(r.dom));return q(mC(e),(function(t){fn(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=Pl(n.dom);return q(mC(e),(function(t){pn(n,t)})),pC(t,e),r},vC=function(t,e){return Pe(e,t)?function(t,e){var n=Dp(e,t);return B.from(n[n.length-1])}(e,t):B.none()},bC=function(t,e){Ll(t,e.dom).map((function(t){return t.getNode()})).map(Te.fromDom).filter(mo).each(vn)},yC=function(t,e,n){return bC(!0,e),bC(!1,n),vC(e,n).fold(N(gC,t,e,n),N(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=Te.fromDom(t.getBody()),r=function(t,e,n){return n.collapsed?fC(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=Te.fromDom(e),r=N(Re,t);return Yr(n,bo,r).isSome()},kC=function(t,e){var n=Rl(t.dom,Au.fromRangeStart(e)).isNone(),r=$l(t.dom,Au.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=Te.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,Te.fromDom(n.startContainer)),sC(t,Te.fromDom(n.endContainer)),(function(r,o){return!1===Re(r,o)&&(n.deleteContents(),CC(t,!0,r,o).each((function(t){e.setRng(t.toRange())})),!0)})).getOr(!1)}(e,t.selection)},SC=function(t,e){return!t.selection.isCollapsed()&&xC(t)},DC=qn,EC=Wn,NC=function(t,e,n,r,o){return B.from(e._selectionOverrides.showCaret(t,n,r,o))},AC=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))},TC=function(t,e,n){var r=sl(1,t.getBody(),e),o=Au.fromRangeStart(r),i=o.getNode();if(jc(i))return NC(1,t,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(jc(a))return NC(1,t,a,!1,!1);var s=t.dom.getParent(o.getNode(),(function(t){return EC(t)||DC(t)}));return jc(s)?NC(1,t,s,!1,n):B.none()},OC=function(t,e,n){return e.collapsed?TC(t,e,n).getOr(e):e},LC=function(t){return yp(t)||hp(t)},$C=function(t){return Cp(t)||gp(t)},RC=function(t,e,n,r,o,i){return NC(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){Fn(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(!Fn(n.commonAncestorContainer))return!1;var r=e?Tu.Forwards:Tu.Backwards,o=xl(t.getBody()),i=N(fl,e?o.next:o.prev),a=e?LC:$C,s=cl(r,t.getBody(),n),u=rC(e,i(s));if(!u||!dl(s,u))return!1;if(a(u))return RC(t,n,s.getNode(),r,e,u);var c=i(u);return!!(c&&a(c)&&dl(u,c))&&RC(t,n,s.getNode(),r,e,c)}(t,e)},PC=Sr([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),BC=function(t,e,n,r){var o=r.getNode(!1===e);return sC(Te.fromDom(t),Te.fromDom(n.getNode())).map((function(t){return ei(t)?PC.remove(t.dom):PC.moveToElement(o)})).orThunk((function(){return B.some(PC.moveToElement(o))}))},MC=function(t,e,n){return Al(e,t,n).bind((function(r){return o=r.getNode(),bo(Te.fromDom(o))||go(Te.fromDom(o))||function(t,e,n,r){var o=function(e){return fo(Te.fromDom(e))&&!tl(n,r,t)};return ul(!e,n).fold((function(){return ul(e,r).fold(L,o)}),o)}(t,e,n,r)?B.none():e&&Wn(r.getNode())||!1===e&&Wn(r.getNode(!0))?BC(t,e,n,r):e&&Cp(n)||!1===e&&yp(n)?B.some(PC.moveToPosition(r)):B.none();var o}))},FC=function(t,e,n){return function(t,e){var n=e.getNode(!1===t),r=t?"after":"before";return On(n)&&n.getAttribute("data-mce-caret")===r}(e,n)?function(t,e){return t&&Wn(e.nextSibling)?B.some(PC.moveToElement(e.nextSibling)):!1===t&&Wn(e.previousSibling)?B.some(PC.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(PC.remove(t))}),(function(t){return B.some(PC.moveToElement(t))}),(function(n){return tl(e,n,t)?B.none():B.some(PC.moveToPosition(n))}))}(t,n,e)}))},jC=function(t,e){return B.from(td(t.getBody(),e))},zC=function(t,e){var n=t.selection.getNode();return jC(t,n).filter(Wn).fold((function(){return function(t,e,n){var r=sl(e?1:-1,t,n),o=Au.fromRangeStart(r),i=Te.fromDom(t);return!1===e&&Cp(o)?B.some(PC.remove(o.getNode(!0))):e&&yp(o)?B.some(PC.remove(o.getNode())):!1===e&&yp(o)&&Mp(i,o)?Fp(i,o).map((function(t){return PC.remove(t.getNode())})):e&&Cp(o)&&Bp(i,o)?jp(i,o).map((function(t){return PC.remove(t.getNode())})):FC(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,Te.fromDom(n)),!0}}(t,e),function(t,e){return function(n){var r=e?Au.before(n):Au.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!(!Wn(n)||Kn(n))&&jC(t,n.parentNode).filter(Wn).fold((function(){var n;return n=Te.fromDom(t.getBody()),q(Ms(n,".mce-offscreen-selection"),vn),hh(t,e,Te.fromDom(t.selection.getNode())),uC(t),!0}),$)},VC=function(t){var e=t.dom,n=t.selection,r=td(t.getBody(),n.getNode());if(qn(r)&&e.isBlock(r)&&e.isEmpty(r)){var o=e.create("br",{"data-mce-bogus":"1"});e.setHTML(r,""),r.appendChild(o),n.setRng(Au.before(o).toRange())}return!0},HC=function(t,e){return t.selection.isCollapsed()?zC(t,e):UC(t,e)},qC=function(t,e){return!!t.selection.isCollapsed()&&function(t,e){var n=Au.fromRangeStart(t.selection.getRng());return Al(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)},WC=Fn,KC=function(t){return WC(t)&&t.data[0]===wo},YC=function(t){return WC(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(WC(t.previousSibling))return YC(t.previousSibling)||t.previousSibling.appendData(wo),t.previousSibling;if(WC(t))return KC(t)||t.insertData(0,wo),t;var e=XC(t);return t.parentNode.insertBefore(e,t),e}(e):function(t){if(WC(t.nextSibling))return KC(t.nextSibling)||t.nextSibling.insertData(0,wo),t.nextSibling;if(WC(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=N(ZC,!0),JC=N(ZC,!1),QC=function(t,e){return Fn(t.container())?ZC(e,t.container()):ZC(e,t.getNode())},tw=function(t,e){var n=e.get();return n&&t.container()===n&&Eo(n)},ew=function(t,e){return e.fold((function(e){Lc(t.get());var n=GC(e);return t.set(n),B.some(Au(n,n.length-1))}),(function(e){return Il(e).map((function(e){if(tw(e,t))return Au(t.get(),1);Lc(t.get());var n=QC(e,!0);return t.set(n),Au(n,1)}))}),(function(e){return Pl(e).map((function(e){if(tw(e,t))return Au(t.get(),t.get().length-1);Lc(t.get());var n=QC(e,!1);return t.set(n),Au(n,n.length-1)}))}),(function(e){Lc(t.get());var n=JC(e);return t.set(n),B.some(Au(n,1))}))},nw=function(t,e){for(var n=0;n0&&e(l,At(s))&&a++,l.line=a,o(l))return!0;s.push(l)}}},c=At(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},zw=N(jw,xw.Up,ou,iu),Uw=N(jw,xw.Down,iu,ou),Vw=function(t){return function(e){return function(t,e){return e.line>t}(t,e)}},Hw=function(t){return function(e){return function(t,e){return e.line===t}(t,e)}},qw=Wn,Ww=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=$),Et(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")&&qw(r.node)||i0&&i(m,At(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(),Vw(1),c),v=Gw(Y(g,Hw(1)),d);if(v)return e_(t,v.position.toRange(),!1);if(v=At(Y(g,Hw(0))))return e_(t,v.position.toRange(),!1)}return 0===f.length?o_(t,u).filter(u?o:r).map((function(e){return OC(t,e.toRange(),!1)})):B.none()},o_=function(t,e){var n=t.selection.getRng(),r=t.getBody();if(e){var o=Au.fromRangeEnd(n),i=$w(r,o);return st(i.positions)}o=Au.fromRangeStart(n),i=Lw(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=Au.fromRangeStart(t.selection.getRng());Au.isTextPosition(n)&&!1===function(t){return To(t)||Oo(t)}(n)&&(a_(t,Oc(e.get(),n)),e.set(null))}},l_=function(t,e,n){return!!Cc(t)&&function(t,e,n){var r=t.getBody(),o=Au.fromRangeStart(t.selection.getRng()),i=N(tC,t);return Cw(n,i,r,o).bind((function(n){return u_(t,e,n)}))}(t,e,n).isSome()},f_=function(t,e,n){return!!Cc(e)&&kw(t,e)},d_=function(t){var e=ws(null),n=N(tC,t);return t.on("NodeChange",(function(r){!Cc(t)||ke.browser.isIE()&&r.initial||(function(t,e,n){var r=H(Ms(Te.fromDom(e.getRoot()),'*[data-mce-selected="inline-boundary"]'),(function(t){return t.dom})),o=Y(r,t),i=Y(n,t);q(rt(o,i),N(s_,!1)),q(rt(i,o),N(s_,!0))}(n,t.dom,r.parents),c_(t,e),function(t,e,n,r){if(e.selection.isCollapsed()){var o=Y(r,t);q(o,(function(r){var o=Au.fromRangeStart(e.selection.getRng());dw(t,e.getBody(),o).bind((function(t){return u_(e,n,t)}))}))}}(n,t,e,r.parents))})),e},m_=N(f_,!0),p_=N(f_,!1),h_=function(t,e,n){if(Cc(t)){var r=o_(t,e).getOrThunk((function(){var n=t.selection.getRng();return e?Au.fromRangeEnd(n):Au.fromRangeStart(n)}));return dw(N(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=N(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"),dw(i,o,Au.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=N(tC,t),a=dw(i,o,r);return a.bind((function(t){return n?t.fold(S(B.some(gw(t))),B.none,S(B.some(hw(t))),B.none):t.fold(B.none,S(B.some(hw(t))),B.none,S(B.some(gw(t))))})).map(g_(t,e)).getOrThunk((function(){var s=Tl(n,o,r),u=s.bind((function(t){return dw(i,o,t)}));return Zn(a,u,(function(){return nC(i,o,r).exists((function(e){return!!function(t){return Zn(Il(t),Pl(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,Te.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=Au.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=N($g,e),i=H(Y(r,o),(function(t){return t.dom}));if(0===i.length)hh(e,t,n);else{var a=function(t,e){var n=Dg(!1),r=Tg(e,n.dom);return fn(Te.fromDom(t),n),vn(Te.fromDom(t)),Au(r,0)}(n.dom,i);e.selection.setRng(a.toRange())}},__=function(t,e){var n=Te.fromDom(t.getBody()),r=Te.fromDom(t.selection.getStart()),o=Y(function(t,e){var n=Dp(e,t);return Q(n,lo).fold(S(n),(function(t){return n.slice(0,t)}))}(n,r),C_);return st(o).exists((function(n){var r,i=Au.fromRangeStart(t.selection.getRng());return!(!function(t,e,n){return Zn(Il(n),Pl(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)})):Rl(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,Te.fromDom(n)),!0},S_=function(t,e){return t.selection.isCollapsed()?function(t,e){var n=e?hp:gp,r=e?Tu.Forwards:Tu.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)&&dl(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)},D_=function(t){var e=parseInt(t,10);return isNaN(e)?0:e},E_=function(t,e){return(t||"table"===Be(e)?"margin":"padding")+("rtl"===ir(e,"direction")?"-right":"-left")},N_=function(t){var e=T_(t);return!t.mode.isReadOnly()&&(e.length>1||function(t,e){return et(e,(function(e){var n=E_(pc(t),e),r=sr(e,n).map(D_).getOr(0);return"false"!==t.dom.getContentEditable(e.dom)&&r>0}))}(t,e))},A_=function(t){return ho(t)||go(t)},T_=function(t){return Y((e=t.selection.getSelectedBlocks(),H(e,Te.fromDom)),(function(t){return!A_(t)&&!function(t){return Ke(t).exists(A_)}(t)&&Xr(t,(function(t){return qn(t.dom)||Wn(t.dom)})).exists((function(t){return qn(t.dom)}))}));var e},O_=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"),q(T_(t),(function(t){!function(t,e,n,r,o,i){var a=E_(n,Te.fromDom(i));if("outdent"===e){var s=Math.max(0,D_(i.style[a])-r);t.setStyle(i,a,s?s+o:"")}else s=D_(i.style[a])+r+o,t.setStyle(i,a,s)}(n,e,u,s,a,t.dom)}))},L_=function(t,e){if(t.selection.isCollapsed()&&N_(t)){var n=t.dom,r=t.selection.getRng(),o=Au.fromRangeStart(r),i=n.getParent(r.startContainer,n.isBlock);if(null!==i&&Op(Te.fromDom(i),o))return O_(t,"outdent"),!0}return!1},$_=function(t,e){t.getDoc().execCommand(e,!1,null)},R_=function(t,e){t.addCommand("delete",(function(){!function(t,e){L_(t)||HC(t,!1)||IC(t,!1)||y_(t,e,!1)||wC(t,!1)||qh(t)||qC(t,!1)||S_(t,!1)||SC(t)||k_(t,!1)||($_(t,"Delete"),uC(t))}(t,e)})),t.addCommand("forwardDelete",(function(){!function(t,e){HC(t,!0)||IC(t,!0)||y_(t,e,!0)||wC(t,!0)||qh(t)||qC(t,!0)||S_(t,!0)||SC(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])},P_=function(t){var e=Es(),n=ws(!1),r=As((function(e){t.fire("longpress",Tt(Tt({},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",Tt(Tt({},o),{type:"tap"}))}))}),!0)},B_=function(t,e){return Ct(t,e.nodeName)},M_=function(t,e){return!!Fn(e)||!!On(e)&&(!B_(t,e)&&!Zl(e))},F_=function(t,e){if(Fn(e)){if(0===e.nodeValue.length)return!0;if(/^\s+$/.test(e.nodeValue)&&(!e.nextSibling||B_(t,e.nextSibling)))return!0}return!1},j_=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&&On(u)&&l){var f=c.nodeName.toLowerCase();if(a.isValidChild(f,l.toLowerCase())&&!function(t,e,n){return V(Sp(Te.fromDom(n),Te.fromDom(e)),(function(e){return B_(t,e.dom)}))}(s,c,u)){var d=i.getRng(),m=d.startContainer,p=d.startOffset,h=d.endContainer,g=d.endOffset,v=Cm(t);for(u=c.firstChild;u;)if(M_(s,u)){if(F_(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&&(d.setStart(m,p),d.setEnd(h,g),i.setRng(d),t.nodeChanged())}}},z_=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(Te.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 z_(t,n)):void(Ao(n)&&(z_(t,n),t.undoManager.add()))},V_=Wn,H_=function(t,e,n){var r=xl(t.getBody()),o=N(fl,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(Au.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()}}},q_=function(t,e){var n=e?Tu.Forwards:Tu.Backwards,r=t.selection.getRng();return function(t,e,n){return n_(e,t,n,yp,Cp,V_)}(n,t,r).orThunk((function(){return H_(t,n,r),B.none()}))},W_=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)}),V_)}(n,t,r).orThunk((function(){return H_(t,n,r),B.none()}))},K_=function(t,e){return q_(t,e).exists((function(e){return t_(t,e),!0}))},Y_=function(t,e){return W_(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=Te.fromTag("br");return J_(t,n,e),G_(n)}(t,r):function(t,e,n,r){var o=Te.fromTag(n),i=Te.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 Lw(t,e).breakAt.isNone()}(t.dom,n)},ek=function(t,e){var n=Te.fromDom(t.getBody()),r=Au.fromRangeStart(t.selection.getRng()),o=nc(t),i=rc(t);return function(t,e){var n=N(Re,e);return Xr(Te.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 H(t,(function(t){return Tt({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})),dk=function(t,e){return at(e.getClientRects()).bind((function(e){return lk(t,e.left,e.top)})).bind((function(t){return Ow(Pl(n=t).map((function(t){return Lw(n,t).positions.concat(t)})).getOr([]),e);var n}))},mk=function(t,e){return st(e.getClientRects()).bind((function(e){return fk(t,e.left,e.top)})).bind((function(t){return Ow(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)||!Vn(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=N(pk,Lw),gk=N(pk,$w),vk=function(t,e,n,r){var o=t.selection.getRng(),i=e?1:-1;return!(!Fc()||!function(t,e,n){var r=Au.fromRangeStart(e);return Ll(!t,n).exists((function(t){return t.isEqual(r)}))}(e,o,n))&&(NC(i,t,n,!e,!1).each((function(e){t_(t,e)})),!0)},bk=function(t,e){var n=e.getNode(t);return On(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 Ll(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=Te.fromTag(o);tr(r,rc(e)),pn(r,Te.fromTag("br")),t?dn(Te.fromDom(n),r):fn(Te.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=Au.fromRangeStart(o),a=t.getBody();if(!e&&hk(r,i)){var s=function(t,e,n){return dk(e,n).orThunk((function(){return at(n.getClientRects()).bind((function(n){return Tw(Rw(t,Au.before(e)),n.left)}))})).getOr(Au.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 Tw(Iw(t,Au.after(e)),n.left)}))})).getOr(Au.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:id.RIGHT,action:ok(K_,t,!0)},{keyCode:id.LEFT,action:ok(K_,t,!1)},{keyCode:id.UP,action:ok(Y_,t,!1)},{keyCode:id.DOWN,action:ok(Y_,t,!0)},{keyCode:id.RIGHT,action:ok(_k,t,!0)},{keyCode:id.LEFT,action:ok(_k,t,!1)},{keyCode:id.UP,action:ok(kk,t,!1)},{keyCode:id.DOWN,action:ok(kk,t,!0)},{keyCode:id.RIGHT,action:ok(ak,t,!0)},{keyCode:id.LEFT,action:ok(ak,t,!1)},{keyCode:id.UP,action:ok(sk,t,!1)},{keyCode:id.DOWN,action:ok(sk,t,!0)},{keyCode:id.RIGHT,action:ok(l_,t,e,!0)},{keyCode:id.LEFT,action:ok(l_,t,e,!1)},{keyCode:id.RIGHT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:ok(m_,t,e)},{keyCode:id.LEFT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:ok(p_,t,e)},{keyCode:id.UP,action:ok(nk,t,!1)},{keyCode:id.DOWN,action:ok(nk,t,!0)}],n).each((function(t){n.preventDefault()}))}(t,e,n)}))},Sk=function(t,e){t.on("keydown",(function(n){!1===n.isDefaultPrevented()&&function(t,e,n){ik([{keyCode:id.BACKSPACE,action:ok(L_,t,!1)},{keyCode:id.BACKSPACE,action:ok(HC,t,!1)},{keyCode:id.DELETE,action:ok(HC,t,!0)},{keyCode:id.BACKSPACE,action:ok(IC,t,!1)},{keyCode:id.DELETE,action:ok(IC,t,!0)},{keyCode:id.BACKSPACE,action:ok(y_,t,e,!1)},{keyCode:id.DELETE,action:ok(y_,t,e,!0)},{keyCode:id.BACKSPACE,action:ok(qh,t,!1)},{keyCode:id.DELETE,action:ok(qh,t,!0)},{keyCode:id.BACKSPACE,action:ok(qC,t,!1)},{keyCode:id.DELETE,action:ok(qC,t,!0)},{keyCode:id.BACKSPACE,action:ok(S_,t,!1)},{keyCode:id.DELETE,action:ok(S_,t,!0)},{keyCode:id.BACKSPACE,action:ok(SC,t,!1)},{keyCode:id.DELETE,action:ok(SC,t,!0)},{keyCode:id.BACKSPACE,action:ok(wC,t,!1)},{keyCode:id.DELETE,action:ok(wC,t,!0)},{keyCode:id.BACKSPACE,action:ok(k_,t,!1)},{keyCode:id.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:id.BACKSPACE,action:ok(VC,t)},{keyCode:id.DELETE,action:ok(VC,t)}],e)}(t,e)}))},Dk=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(Fn(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 Vn(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),Hd(t,s)}},Ek=function(t){return B.from(t.dom.getParent(t.selection.getStart(!0),t.dom.isBlock))},Nk=function(t,e){return t&&t.parentNode&&t.parentNode.nodeName===e},Ak=function(t){return t&&/^(OL|UL|LI)$/.test(t.nodeName)},Tk=function(t){var e=t.parentNode;return/^(LI|DT|DD)$/.test(e.nodeName)?e:t},Ok=function(t,e,n){for(var r=t[n?"firstChild":"lastChild"];r&&!On(r);)r=r[n?"nextSibling":"previousSibling"];return r===e},Lk=function(t,e,n,r,o){var i=t.dom,a=t.selection.getRng();if(n!==t.getBody()){var s;Ak(s=n)&&Ak(s.parentNode)&&(o="LI");var u=o?e(o):i.create("BR");if(Ok(n,r,!0)&&Ok(n,r,!1))if(Nk(n,"LI")){var c=Tk(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(Ok(n,r,!0))Nk(n,"LI")?(i.insertAfter(u,Tk(n)),u.appendChild(i.doc.createTextNode(" ")),u.appendChild(n)):n.parentNode.insertBefore(u,n),i.remove(r);else if(Ok(n,r,!1))i.insertAfter(u,Tk(n)),i.remove(r);else{n=Tk(n);var l=a.cloneRange();l.setStartAfter(r),l.setEndAfter(n);var f=l.extractContents();"LI"===o&&function(t,e){return t.firstChild&&t.firstChild.nodeName===e}(f,"LI")?(u=f.firstChild,i.insertAfter(f,n)):(i.insertAfter(f,n),i.insertAfter(u,n)),i.remove(r)}Dk(t,u)}},$k=function(t,e){return e&&"A"===e.nodeName&&t.isEmpty(e)},Rk=function(t){t.innerHTML='
    '},Ik=function(t,e){return t.nodeName===e||t.previousSibling&&t.previousSibling.nodeName===e},Pk=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===Fn(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},Fk=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(Te.fromDom(e)),o=Tt(Tt({},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=Ot(Ot([],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))},jk=function(t,e){var n,r,o,i,a,s,u,c,l,f,d=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?d.create(e||l):i.cloneNode(!1),!1===function(t){return t.getParam("keep_styles",!0)}(t))d.setAttrib(n,"style",null),d.setAttrib(n,"class",null);else do{if(u[s.nodeName]){if(Ml(s)||Zl(s))continue;o=s.cloneNode(!1),d.setAttrib(o,"id",""),n.hasChildNodes()?(o.appendChild(n.firstChild),n.appendChild(o)):(a=o,n.appendChild(o))}}while((s=s.parentNode)&&s!==w);return Fk(t,n),Rk(a),n},v=function(t){var e,n,a=Bk(t,r,o);if(Fn(r)&&(t?a>0:ar.childNodes.length-1,r=r.childNodes[Math.min(o,r.childNodes.length-1)]||r,o=f&&Fn(r)?r.nodeValue.length:0);var w=Mk(d,r);if(w){(l&&!y||!l&&y)&&(r=function(t,e,n,r,o){var i,a,s,u,c,l,f=e||"P",d=t.dom,m=Mk(d,r);if(!(a=d.getParent(r,d.isBlock))||!Pk(d,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=d.create(f),Fk(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&&!d.isBlock(u);)s=u,u=u.previousSibling;if(s&&t.schema.isValidChild(l,f.toLowerCase())){for(i=d.create(f),Fk(t,i),s.parentNode.insertBefore(i,s),u=s;u&&!d.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=d.getParent(r,d.isBlock),u=i?d.getParent(i.parentNode,d.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)&&d.isEmpty(i)?Lk(t,g,u,i,l):l&&i===t.getBody()||(l=l||"P",Do(i)?(a=Io(i),d.isEmpty(i)&&Rk(i),Fk(t,a),Dk(t,a)):v()?b():v(!0)?(a=i.parentNode.insertBefore(g(),i),Dk(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){q(Bs(Te.fromDom(t),ze),(function(t){var e=t.dom;e.nodeValue=ko(e.nodeValue)}))}(s=n.extractContents()),function(t){do{Fn(t)&&(t.nodeValue=t.nodeValue.replace(/^[\r\n]+/,"")),t=t.firstChild}while(t)}(s),a=s.firstChild,d.insertAfter(s,i),function(t,e,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(t.isBlock(o))return;On(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)}}(d,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")}(d,i),d.isEmpty(i)&&Rk(i),a.normalize(),d.isEmpty(a)?(d.remove(a),b()):(Fk(t,a),Dk(t,a))),d.setAttrib(a,"id",""),t.fire("NewBlock",{newBlock:a}))}},zk=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),Hd(t,r)},Uk=function(t,e){var n,r,o=t.selection,i=t.dom,a=o.getRng();yd(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),f=l?i.getParent(l.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",m=!(!e||!e.ctrlKey);"LI"!==d||m||(l=f),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"),Lu(i,a,n),zk(t,n,r),t.undoManager.add()},Vk=function(t,e){var n=Te.fromTag("br");fn(Te.fromDom(e),n),t.undoManager.add()},Hk=function(t,e){qk(t.getBody(),e)||dn(Te.fromDom(e),Te.fromTag("br"));var n=Te.fromTag("br");dn(Te.fromDom(e),n),zk(t,n.dom,!1),t.undoManager.add()},qk=function(t,e){return n=Au.after(e),!!Vn(n.getNode())||$l(t,Au.after(e)).map((function(t){return Vn(t.getNode())})).getOr(!1);var n},Wk=function(t){return t&&"A"===t.nodeName&&"href"in t},Kk=function(t){return t.fold(L,Wk,Wk,L)},Yk=function(t,e){e.fold(_,N(Vk,t),N(Hk,t),_)},Xk=function(t,e){var n=function(t){var e=N(tC,t),n=Au.fromRangeStart(t.selection.getRng());return dw(e,t.getBody(),n).filter(Kk)}(t);n.isSome()?n.each(N(Yk,t)):Uk(t,e)},Zk=function(t,e){return Ek(t).filter((function(t){return e.length>0&&Le(Te.fromDom(t),e)})).isSome()},Gk=Sr([{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 Ek(t).filter((function(t){return go(Te.fromDom(t))})).isSome()}(e)===t}},ex=function(t,e){return function(n,r){var o=function(t){return Ek(t).fold(S(""),(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(){jk(t,e)}),_)},cx=function(t){t.on("keydown",(function(e){e.keyCode===id.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:id.END,action:ok(X_,t,!0)},{keyCode:id.HOME,action:ok(X_,t,!1)},{keyCode:id.END,action:ok(uk,t,!0)},{keyCode:id.HOME,action:ok(uk,t,!1)},{keyCode:id.END,action:ok(h_,t,!0,e)},{keyCode:id.HOME,action:ok(h_,t,!1,e)}],n).each((function(t){n.preventDefault()}))}(t,e,n)}))},fx=pe().browser,dx=function(t){!function(t){var e=Ns((function(){t.composing||th(t)}),0);fx.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===id.PAGE_UP||t.keyCode===id.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:id.PAGE_UP,action:ok(h_,t,!1,e)},{keyCode:id.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 Fn(n)?(n.insertData(r,t),B.some(Au(n,r+t.length))):ll(e).map((function(n){var r=Te.fromText(t);return e.isAtEnd()?dn(n,r):fn(n,r),Au(r.dom,t.length)}))},yx=N(bx,Co),Cx=N(bx," "),wx=function(t,e){return function(n){return function(t,e){return!qp(e)&&(Wp(t,e)||Vp(t,e)||Hp(t,e))}(t,n)?yx(e):Cx(e)}},_x=function(t){var e=Au.fromRangeStart(t.selection.getRng()),n=Te.fromDom(t.getBody());if(t.selection.isCollapsed()){var r=N(tC,t),o=Au.fromRangeStart(t.selection.getRng());return dw(r,t.getBody(),o).bind(function(t){return function(e){return e.fold((function(e){return Rl(t.dom,Au.before(e))}),(function(t){return Il(t)}),(function(t){return Pl(t)}),(function(e){return $l(t.dom,Au.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:id.SPACEBAR,action:ok(_x,t)}],e).each((function(t){e.preventDefault()}))}(t,e)}))},xx=function(t){var e=d_(t);return function(t){t.on("keyup compositionstart",N(U_,t))}(t),xk(t,e),Sk(t,e),cx(t),kx(t),dx(t),lx(t,e),vx(t,e),e},Sx=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&&ld(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()||Vf(t)&&!n.isSameElementPath(e)&&t.dom.isChildOf(e,t.getBody())&&t.nodeChanged({selectionChange:!0})})),t.on("mouseup",(function(e){!e.isDefaultPrevented()&&Vf(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}(),Dx=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){q(t,(function(t){t.attr("data-mce-open",t.attr("open")),t.attr("open","open")}))})),t.serializer.addNodeFilter("details",(function(t){q(t,(function(t){var e=t.attr("data-mce-open");t.attr("open",d(e)?e:null),t.attr("data-mce-open",null)}))}))}(t)},Ex=function(t){return On(t)&&po(Te.fromDom(t))},Nx=function(t){t.on("click",(function(e){e.detail>=3&&function(t){var e=t.selection.getRng(),n=Au.fromRangeStart(e),r=Au.fromRangeEnd(e);if(Au.isElementPosition(n)){var o=n.container();Ex(o)&&Il(o).each((function(t){return e.setStart(t.container(),t.offset())}))}Au.isElementPosition(r)&&(o=n.container(),Ex(o)&&Pl(o).each((function(t){return e.setEnd(t.container(),t.offset())})));t.selection.setRng(Kh(e))}(t)}))},Ax=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}},Tx=function(t,e){return n=function(t){return t.inline?Ax(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=Ax(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},Ox=Wn,Lx=qn,$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},Rx=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,Tx(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=Px(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===id.ESC&&s()}))},Fx=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;(Ox(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"];q(s,(function(t){r.bind(i,t,n),o.bind(a,t,e)})),t.on("remove",(function(){q(s,(function(t){r.unbind(i,t,n),o.unbind(a,t,e)}))}))};t.on("init",(function(){oo.setEditorTimeout(t,r,0)}))}(t)},jx=qn,zx=Wn,Ux=function(t,e){return td(t.getBody(),e)},Vx=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&&(zx(t)||Yn(t))&&r.isChildOf(t,i)},l=function(t){return yp(t)||Cp(t)||hp(t)||gp(t)},f=function(t){t&&n.setRng(t)},d=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 No(t)||$o(t)||Ro(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(Te.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=Te.fromDom(o);return q(Ms(Te.fromDom(t.getBody()),"*[data-mce-selected]"),(function(t){Re(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(zc(a))return m(n,a,!!e&&!o.isAtEnd(),!1);var s=o.getNode(e);if(zc(s))return m(n,s,!e&&!o.isAtEnd(),!1)}return null}var u=t.startContainer,l=t.startOffset,f=t.endOffset;if(3===u.nodeType&&0===l&&zx(u.parentNode)&&(u=u.parentNode,l=r.nodeIndex(u),u=u.parentNode),1!==u.nodeType)return null;if(f===l+1&&u===t.endContainer){var d=u.childNodes[l];if(c(d))return v(d)}return null},C=function(){e&&e.removeAttribute(u),Jr(Te.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=d();n.collapsed&&vy(t,e.clientX,e.clientY)&&TC(t,n,!1).each(f)})),t.on("click",(function(e){var o=Ux(t,e.target);o&&(zx(o)&&(e.preventDefault(),t.focus()),jx(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!==zx(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=Au.before(e);if(Vn(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);zx(r)?(e.preventDefault(),AC(t,r).each(y)):c(n)&&AC(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)zx(a)?(e.preventDefault(),AC(t,a).each(y)):(C(),jx(a)&&e.shiftKey||ed(e.clientX,e.clientY,n.getRng())||(w(),n.placeCaretAt(e.clientX,e.clientY)));else if(c(o))AC(t,o).each(y);else if(!1===zc(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);f(l),t.getBody().focus()}}}})),t.on("keypress",(function(t){id.modifierPressed(t)||zx(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))}})),Fx(t),function(t){var e=Ns((function(){if(!t.removed&&t.getBody().contains(document.activeElement)){var e=t.selection.getRng();if(e.collapsed){var n=OC(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=td(t.getBody(),n),o=Wn(r)?r:n;t.selection.getNode()!==o&&AC(t,o).each((function(e){return t.selection.setRng(e)}))}}))}))}(t)}(),{showCaret:m,showBlockCaretContainer:function(t){t.hasAttribute("data-mce-caret")&&(Io(t),f(d()),n.scrollIntoView(t))},hideFakeCaret:w,destroy:function(){a.destroy(),e=null}}},Hx=function(t){var e,n,r=Ne.each,o=id.BACKSPACE,i=id.DELETE,a=t.dom,s=t.selection,u=t.parser,c=ke.gecko,l=ke.ie,f=ke.webkit,d="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(No(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})}}))}))},S=function(){t.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")},D=function(){t.inline||t.on("keydown",(function(){document.activeElement===document.body&&t.getWin().focus()}))},E=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()}})))},N=function(){ke.mac&&t.on("keydown",(function(e){!id.metaKeyPressed(e)||e.shiftKey||37!==e.keyCode&&39!==e.keyCode||(e.preventDefault(),t.selection.getSel().modify("move",37===e.keyCode?"backward":"forward","lineboundary"))}))},A=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}")},T=function(){t.on("init",(function(){t.dom.bind(t.getBody(),"submit",(function(t){t.preventDefault()}))}))},O=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=d+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(d)>=0?(e=e.substr(d.length).split(","),{id:unescape(e[0]),html:unescape(e[1])}):null}(e);if(n&&n.id!==t.id){e.preventDefault();var r=cd(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}))},L=_;return Gv(t)?(f&&(b(),C(),T(),v(),ke.iOS&&(D(),E(),A())),c&&(y(),k(),S(),N())):(t.on("keydown",(function(e){var n,r;if(!h(e)&&e.keyCode===id.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){id.modifierPressed(t)||s.normalize()}),!0),f&&(b(),C(),nc(t)&&t.on("init",(function(){p("DefaultParagraphSeparator",nc(t))})),T(),w(),u.addNodeFilter("br",(function(t){for(var e=t.length;e--;)"Apple-interchange-newline"===t[e].attr("class")&&t[e].remove()})),ke.iOS?(D(),E(),A()):v()),ke.ie>=11&&(E(),w()),ke.ie&&(v(),p("AutoUrlDetect",!1),O()),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(),S(),N(),w())),{refreshContentEditable:L,isHidden:function(){if(!c||t.removed)return!1;var e=t.selection.getSel();return!e||!e.rangeCount||0===e.rangeCount}}},qx=gs.DOM,Wx=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:Wx(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||Vf(t)&&t.selection.getStart(!0)!==e||Il(e).each((function(e){var n=e.getNode(),r=Pn(n)?Il(n).getOr(e):e;ke.browser.isIE()?function(t,e){var n=Te.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="";Ne.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=Te.fromDom(t.getBody()),r=un(sn(n)),o=Te.fromTag("style");Qn(o,"type","text/css"),pn(o,Te.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,qx.setAttrib(r,"spellcheck","false")),t.quirks=Hx(t),function(t){t.fire("PostRender")}(t);var o=function(t){return t.getParam("directionality",Ss.isRtl()?"rtl":void 0)}(t);void 0!==o&&(r.dir=o),e.protect&&t.on("BeforeSetContent",(function(t){Ne.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}))},tS=function(t){!0!==t.removed&&(!function(t){Gv(t)||t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"})}(t),Zx(t))},eS=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&&(qx.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"===qx.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=Ai(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:fc(t),referrerPolicy:dc(t),onSetAttrib:function(e){t.fire("SetAttrib",e)}}),t.parser=function(t){var e=Nb(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 Tt(Tt({},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=Jf(t),t.formatter=qy(t),t.undoManager=Ky(t),t._nodeChangeDispatcher=new Sx(t),t._selectionOverrides=Vx(t),P_(t),Dx(t),Gv(t)||Nx(t);var a=function(t){return Gv(t)?ws(null):xx(t)}(t);R_(t,a),function(t){nc(t)&&t.on("NodeChange",N(j_,t))}(t),Jy(t);var s=Jv(t);Qx(t),s.fold((function(){Jx(t).then((function(){return tS(t)}))}),(function(e){t.setProgressState(!0),Jx(t).then((function(){e().then((function(e){t.setProgressState(!1),tS(t)}),(function(e){t.notificationManager.open({type:"error",text:String(e)}),tS(t)}))}))}))},nS=gs.DOM,rS=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+='
    '},oS=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=Te.fromTag("iframe"),tr(i,o),tr(i,{id:n+"_ifr",frameBorder:"0",allowTransparency:"true",title:r}),Rs(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=Ry("mce");t[n]=function(){eS(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 nS.setAttrib(e,"src",r),!0}return!1}(t,s);return t.contentAreaContainer=e.iframeContainer,t.iframeElement=s,t.iframeHTML=rS(t),nS.add(e.iframeContainer,s),u},iS=gs.DOM,aS=function(t,e,n){var r=Cy.get(n),o=Cy.urls[n]||t.documentBaseUrl.replace(/\/$/,"");if(n=Ne.trim(n),r&&-1===Ne.inArray(e,n)){if(Ne.each(Cy.dependencies(n),(function(n){aS(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=Ss.translate(["Failed to initialize plugin: {0}",e]);nd(t,"PluginLoadError",{message:r}),Ny(r,n),xy(t,r)}(t,n,e)}}},sS=function(t){return t.replace(/^\-/,"")},uS=function(t){return{editorContainer:t,iframeContainer:t,api:{}}},cS=function(t){var e=t.getElement();return t.inline?uS(null):function(t){var e=iS.create("div");return iS.insertAfter(e,t),uS(e)}(e)},lS=function(t){var e=t.getElement();return t.orgDisplay=e.style.display,d(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):cS(t)},fS=function(t){t.fire("ScriptsLoaded"),function(t){var e=Ne.trim(ac(t)),n=t.ui.registry.getAll().icons,r=Tt(Tt({},ly.get("default").icons),ly.get(e).icons);dt(r,(function(e,r){Ct(n,r)||t.ui.registry.addIcon(r,e)}))}(t),function(t){var e=bc(t);if(d(e)){t.settings.theme=sS(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=[];Ne.each(_c(t).split(/[ ,]/),(function(n){aS(t,e,sS(n))}))}(t);var e=lS(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(L),enable:function(){t.mode.isReadOnly()||B.from(e.enable).map(O)}};t.ui=Tt(Tt({},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,Oy(t),t.inline?eS(t):function(t,e){var n=oS(t,e);e.editorContainer&&(nS.get(e.editorContainer).style.display=t.orgDisplay,t.hidden=nS.isHidden(e.editorContainer)),t.getElement().style.display="none",nS.setAttrib(t.id,"aria-hidden","true"),n||eS(t)}(t,n)},dS=gs.DOM,mS=function(t){return"-"===t.charAt(0)},pS=function(t,e){var n=mc(e),r=function(t){return t.getParam("language_url","","string")}(e);if(!1===Ss.hasCode(n)&&"en"!==n){var o=""!==r?r:e.editorManager.baseURL+"/langs/"+n+".js";t.add(o,_,void 0,(function(){!function(t,e,n){Sy(t,"LanguageLoadError",Dy("language",e,n))}(e,o,n)}))}},hS=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)}}))},gS=function(t,e,n){var r=hS(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 hS(e,ac(e),"")}));q(function(t){for(var e=[],n=function(t){e.push(t)},r=0;r=1&&n<=7){var r=function(t){return Ne.explode(t.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))}(t),o=function(t){return Ne.explode(t.getParam("font_size_classes",""))}(t);return o?o[n-1]||e:r[n-1]||e}return e}return e},AS=function(t){var e=t.split(/\s*,\s*/);return H(e,(function(t){return-1===t.indexOf(" ")||Mt(t,'"')||Mt(t,"'")?t:"'"+t+"'"})).join(",")},TS=function(t,e){var n=function(t){if("string"!=typeof t){var e=Ne.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)},OS=Ne.each,LS=Ne.map,$S=Ne.inArray,RS=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(OS(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;OS(t,(function(t,r){OS(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"),OS("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=NS(t,e);t.formatter.toggle("fontname",{value:AS(n)}),t.nodeChanged()}(t,r)},FontSize:function(e,n,r){!function(t,e){t.formatter.toggle("fontsize",{value:NS(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){TS(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){O_(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(),qn);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=LS(r,(function(n){return!!t.formatter.matchNode(n,e)}));return-1!==$S(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 N_(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 ES(t,(function(e){return xS(t.getBody(),e.dom)})).getOr("")}(t)}),this),e.addQueryValueHandler("FontSize",(function(){return function(t){return ES(t,(function(e){return kS(t.getBody(),e.dom)})).getOr("")}(t)}),this),e.addQueryValueHandler("LineHeight",(function(){return function(t){return ES(t,(function(e){var n=Te.fromDom(t.getBody()),r=dg(e,(function(t){return sr(t,"line-height")}),N(Re,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}(),IS="data-mce-contenteditable",PS=function(t,e,n){var r,o;Ps(t,e)&&!1===n?(o=e,Os(r=t)?r.dom.classList.remove(o):$s(r,o),Is(r)):n&&Rs(t,e)},BS=function(t,e,n){try{t.getDoc().execCommand(e,!1,String(n))}catch(t){}},MS=function(t,e){t.dom.contentEditable=e?"true":"false"},FS=function(t,e){var n=Te.fromDom(t.getBody());PS(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,MS(n,!1),q(Ms(n,'*[contenteditable="true"]'),(function(t){Qn(t,IS,"true"),MS(t,!1)}))):(t.readonly=!1,MS(n,!0),function(t){q(Ms(t,'*[data-mce-contenteditable="true"]'),(function(t){rr(t,IS),MS(t,!0)}))}(n),BS(t,"StyleWithCSS",!1),BS(t,"enableInlineTableEditing",!1),BS(t,"enableObjectResizing",!1),wm(t)&&t.focus(),function(t){t.selection.setRng(t.selection.getRng())}(t),t.nodeChanged())},jS=function(t){return t.readonly},zS=function(t){t.parser.addAttributeFilter("contenteditable",(function(e){jS(t)&&q(e,(function(t){t.attr(IS,t.attr("contenteditable")),t.attr("contenteditable","false")}))})),t.serializer.addAttributeFilter(IS,(function(e){jS(t)&&q(e,(function(t){t.attr("contenteditable",t.attr(IS))}))})),t.serializer.addTempAttr(IS)},US=function(t,e){if(function(t){return"click"===t.type}(e)&&!id.metaKeyPressed(e)){var n=Te.fromDom(e.target);(function(t,e){return Qr(e,"a",(function(e){return Re(e,Te.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}))}},VS=Ne.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"," "),HS=function(){function t(t){this.bindings={},this.settings=t||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||L}return t.isNative=function(t){return!!VS[t.toLowerCase()]},t.prototype.fire=function(t,e){var n=t.toLowerCase(),r=Ri(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"),iD);return o[o.length-1]=Ne.extend(o[o.length-1],{func:n,scope:r||this.editor}),Ne.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}(),sD=function(){var t=function(){var t={},e={},n={},r={},o={},i={},a={},s=function(t,e){return function(n,r){return t[n.toLowerCase()]=Tt(Tt({},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}},uD=gs.DOM,cD=Ne.extend,lD=Ne.each,fD=Ne.resolve,dD=ke.ie,mD=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,cD(this,GS),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)),Ds.languageLoad=this.settings.language_load,Ds.baseURL=n.baseURL,this.id=t,this.setDirty(!1),this.documentBaseURI=new zm(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new aD(this),this.editorCommands=new RS(this),this.settings.cache_suffix&&(ke.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:sD(),styleSheetLoader:void 0,show:_,hide:_,enable:_,disable:_,isDisabled:L};var o=tD(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(){bS(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?wD[0]:null),DD.focusedEditor===t&&(DD.focusedEditor=null),e.length!==wD.length},SD="CSS1Compat"!==document.compatMode,DD=Tt(Tt({},WS),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:cs,majorVersion:"5",minorVersion:"10.3",releaseDate:"2022-02-09",editors:CD,i18n:Ss,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var t,e,n=this,r="";e=zm.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&&gD(hD(n),(function(t){var n=pD.get(t);n?e.push(n):gD(document.forms,(function(n){gD(n.elements,(function(n){n.name===t&&(t="mce_editor_"+bD++,pD.setAttrib(n,"id",t),e.push(n))}))}))}));break;case"textareas":case"specific_textareas":gD(pD.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?gD(t.types,(function(n){Ne.each(e,(function(e){return!pD.is(e,n.selector)||(l(o(e),vD({},t,n),e),!1)}))})):(Ne.each(e,(function(t){var e;(e=n.get(t.id))&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(xD(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null)})),0===(e=Ne.grep(e,(function(t){return!n.get(t.id)}))).length?a([]):gD(e,(function(e){!function(t,e){return t.inline&&e.tagName.toLowerCase()in r}(t,e)?l(o(e),t,e):Ny("Could not initialize inline editor on invalid inline target element",e)})))};return n.settings=t,pD.bind(window,"ready",s),new to((function(t){e?t(e):a=function(e){t(e)}}))},get:function(t){return 0===arguments.length?wD.slice(0):d(t)?J(wD,(function(e){return e.id===t})).getOr(null):w(t)&&wD[t]?wD[t]:null},add:function(t){var e=this;return CD[t.id]===t||(null===e.get(t.id)&&("length"!==t.id&&(CD[t.id]=t),CD.push(t),wD.push(t)),kD(!0),e.activeEditor=t,e.fire("AddEditor",{editor:t}),Fw||(Fw=function(t){var n=e.fire("BeforeUnload");if(n.returnValue)return t.preventDefault(),t.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",Fw))),t},createEditor:function(t,e){return this.add(new mD(t,e,this))},remove:function(t){var e,n,r=this;if(t){if(!d(t))return n=t,h(r.get(n.id))?null:(xD(n)&&r.fire("RemoveEditor",{editor:n}),0===wD.length&&window.removeEventListener("beforeunload",Fw),n.remove(),kD(wD.length>0),n);gD(pD.select(t),(function(t){(n=r.get(t.id))&&r.remove(n)}))}else for(e=wD.length-1;e>=0;e--)r.remove(wD[e])},execCommand:function(t,e,n){var r=this,o=r.get(n);switch(t){case"mceAddEditor":return r.get(n)||new mD(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(){gD(wD,(function(t){t.save()}))},addI18n:function(t,e){Ss.add(t,e)},translate:function(t){return Ss.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 zm(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new zm(this.baseURL)}});DD.setup();var ED,ND,AD,TD,OD=Math.min,LD=Math.max,$D=Math.round,RD=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+=$D(u/2)),"c"===c[1]&&(r+=$D(s/2)),"b"===c[3]&&(o-=a),"r"===c[4]&&(r-=i),"c"===c[3]&&(o-=$D(a/2)),"c"===c[4]&&(r-=$D(i/2)),ID(r,o,i,a)},ID=function(t,e,n,r){return{x:t,y:e,w:n,h:r}},PD={inflate:function(t,e,n){return ID(t.x-e,t.y-n,t.w+2*e,t.h+2*n)},relativePosition:RD,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=LD(t.x,e.x),r=LD(t.y,e.y),o=OD(t.x+t.w,e.x+e.w),i=OD(t.y+t.h,e.y+e.h);return o-n<0||i-r<0?null:ID(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=LD(0,e.x-r),l=LD(0,e.y-o),f=LD(0,i-s),d=LD(0,a-u);return r+=c,o+=l,n&&(i+=c,a+=l,r-=f,o-=d),ID(r,o,(i-=f)-r,(a-=d)-o)},create:ID,fromClientRect:function(t){return ID(t.left,t.top,t.width,t.height)}},BD=(ED={},ND={},{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!==ED[t])return ED[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||"",KD.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&&Ne.each(t.requestheaders,(function(t){e.setRequestHeader(t.key,t.value)})),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),(e=KD.fire("beforeSend",{xhr:e,settings:t}).xhr).send(t.data),!t.async)return r();oo.setTimeout(r,10)}}),YD=Ne.extend,XD=function(){function t(t){this.settings=YD({},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=YD(this.settings,t);r.success=function(t,o){void 0===(t=qD.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=qD.serialize({id:t.id||"c"+this.count++,method:t.method,params:t.params}),r.content_type="application/json",KD.send(r)},t}();try{var ZD="__storage_test__";(zD=window.localStorage).setItem(ZD,ZD),zD.removeItem(ZD)}catch(t){zD=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 GD={geom:{Rect:PD},util:{Promise:to,Delay:oo,Tools:Ne,VK:id,URI:zm,Class:jD,EventDispatcher:HS,Observable:WS,I18n:Ss,XHR:KD,JSON:qD,JSONRequest:XD,JSONP:WD,LocalStorage:zD,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=VD(0,UD(e,1)),i=VD(0,UD(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=HD(255*(n+c)),r=HD(255*(r+c)),o=HD(255*(o+c))}else n=r=o=HD(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=UD(t/=255,UD(e/=255,n/=255)),a=VD(t,VD(e,n));return i===a?{h:0,s:0,v:100*(o=i)}:(r=(a-i)/a,o=a,{h:HD(60*((t===i?3:n===i?1:5)-(t===i?e-n:n===i?t-e:n-t)/(a-i))),s:HD(100*r),v:HD(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=Ly(),n=By(t,e);return{upload:function(e,r){return void 0===r&&(r=!0),n.upload(e,r?Py(t):void 0)}}}},dom:{EventUtils:ji,Sizzle:ka,DomQuery:cs,TreeWalker:so,TextSeeker:Qs,DOMUtils:gs,ScriptLoader:Cs,RangeUtils:_d,Serializer:$b,StyleSheetLoader:io,ControlSelection:sd,BookmarkManager:Qf,Selection:lb,Event:ji.Event},html:{Styles:Oi,Entities:yi,Node:$m,Schema:Ai,SaxParser:Wm,DomParser:Nb,Writer:Qm,Serializer:tp},Env:ke,AddOnManager:Ds,Annotator:Jf,Formatter:qy,UndoManager:Ky,EditorCommands:RS,WindowManager:_y,NotificationManager:yy,EditorObservable:GS,Shortcuts:aD,Editor:mD,FocusManager:cm,EditorManager:DD,DOM:gs.DOM,ScriptLoader:Cs.ScriptLoader,PluginManager:Cy,ThemeManager:wy,IconManager:ly,Resource:BD,trim:Ne.trim,isArray:Ne.isArray,is:Ne.is,toArray:Ne.toArray,makeMap:Ne.makeMap,each:Ne.each,map:Ne.map,grep:Ne.grep,inArray:Ne.inArray,extend:Ne.extend,create:Ne.create,walk:Ne.walk,createNS:Ne.createNS,resolve:Ne.resolve,explode:Ne.explode,_addCacheSuffix:Ne._addCacheSuffix,isOpera:ke.opera,isWebKit:ke.webkit,isIE:ke.ie,isGecko:ke.gecko,isMac:ke.mac},JD=Ne.extend(DD,GD);!function(t){window.tinymce=t,window.tinyMCE=t}(JD),function(e){try{t.exports=e}catch(t){}}(JD)}()},30264:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});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 f,d=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&&(d=t*e,"border-box"===c&&(d=d+o+i),p=Math.max(d,p)),null!==n&&(m=t*n,"border-box"===c&&(m=m+o+i),f=p>m?"":"hidden",p=Math.min(m,p))}return n||(f="hidden"),{height:`${p}px`,minHeight:`${d}px`,maxHeight:`${m}px`,overflowY:f}}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 f(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var d="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:d,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(d,"-wrapper"),(t={},f(t,"".concat(d,"-wrapper-").concat(this.size),!!this.size),f(t,"".concat(d,"-type-").concat(this.type),this.type),f(t,"".concat(d,"-group"),this.prepend||this.append||this.search&&this.enterButton),f(t,"".concat(d,"-group-").concat(this.size),(this.prepend||this.append||this.search&&this.enterButton)&&!!this.size),f(t,"".concat(d,"-group-with-prepend"),this.prepend),f(t,"".concat(d,"-group-with-append"),this.append||this.search&&this.enterButton),f(t,"".concat(d,"-hide-icon"),this.append),f(t,"".concat(d,"-with-search"),this.search&&this.enterButton),t)]},inputClasses:function(){var t;return["".concat(d),(t={},f(t,"".concat(d,"-").concat(this.size),!!this.size),f(t,"".concat(d,"-disabled"),this.itemDisabled),f(t,"".concat(d,"-with-prefix"),this.showPrefix),f(t,"".concat(d,"-with-suffix"),this.showSuffix||this.search&&!1===this.enterButton),t)]},textareaClasses:function(){return["".concat(d),f({},"".concat(d,"-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()}};const p=(0,n(51900).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},2749:(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(t,e){void 0===e._uploadIng&&(e._uploadIng=!0,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(){this.autoBottom&&$A.scrollToView(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},89500:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>d});var r=n(47575),o=n.n(r),i=n(2749),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()},setContent:function(t){null===this.getEditor()?this.content=t:t!=this.getEditor().getContent()&&this.getEditor().setContent(t)},focus:function(){return null===this.getEditor()?"":this.getEditor().focus()},insertImage:function(t){this.insertContent('')},editorImage:function(t){for(var e=0;e|\/>)/gi);if(n)for(var r=0;r').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 d=(0,n(51900).Z)(f,(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.spinShow?"":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},73701:(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{loadIng:0,selects:[],list:[],searchKey:null,searchHistory:[],subscribe:null}},mounted:function(){var t=this;this.subscribe=r.Store.subscribe("cacheUserActive",(function(e){var n=t.list.findIndex((function(t){return t.userid==e.userid}));n>-1&&(t.$set(t.list,n,Object.assign({},t.list[n],e)),t.handleSelectData())}))},beforeDestroy:function(){this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},computed:{maxHiddenClass:function(){var t=this.multipleMax,e=this.maxHiddenInput,n=this.selects;return t&&e&&n.length>=t?"hidden-input":""}},watch:{value:{handler:function(){this.valueChange()},immediate:!0},selects:function(t){this.$emit("input",t)}},methods:{searchUser:function(t){var e=this;"string"!=typeof t&&(t=""),this.searchKey=t;var n=this.searchHistory.find((function(e){return e.key==t}));n&&(this.list=n.data),n||this.loadIng++,setTimeout((function(){e.searchKey==t?e.$store.dispatch("call",{url:"users/search",data:{keys:{key:t,project_id:e.projectId,no_project_id:e.noProjectId},take:30}}).then((function(r){var o=r.data;n||e.loadIng--,e.list=o;var i=e.searchHistory.findIndex((function(e){return e.key==t})),a={key:t,data:o,time:$A.Time()};i>-1?e.searchHistory.splice(i,1,a):e.searchHistory.push(a)})).catch((function(t){var r=t.msg;n||e.loadIng--,e.list=[],$A.messageWarning(r)})):n||e.loadIng--}),this.searchHistory.length>0?300:0)},isDisabled:function(t){return 0!==this.disabledChoice.length&&this.disabledChoice.includes(t)},openChange:function(t){t&&this.$nextTick(this.searchUser)},remoteMethod:function(){},valueChange:function(){var t=this;this.selects!=this.value&&($A.isArray(this.value)?this.selects=$A.cloneJSON(this.value):this.value?this.selects=[this.value]:this.selects=[],this.selects.some((function(e){t.list.find((function(t){return t.userid==e}))||(t.list.push({userid:e,nickname:e}),t.$store.dispatch("getUserBasic",{userid:e}))})))},handleSelectData:function(){var t=this;this.__handleSelectTimeout&&clearTimeout(this.__handleSelectTimeout),this.__handleSelectTimeout=setTimeout((function(){if(t.$refs.select){var e=t.$refs.select.getValue();e&&e.some((function(e){var n=t.list.find((function(t){return t.userid==e.value}));n&&(t.$set(e,"label",n.nickname),t.$set(e,"avatar",n.userimg))}))}}),100)}}};const i=(0,n(51900).Z)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:["common-user",t.maxHiddenClass]},[n("Select",{ref:"select",attrs:{transfer:t.transfer,placeholder:t.placeholder,size:t.size,loading:t.loadIng>0,"loading-text":t.$L("加载中..."),"default-label":t.value,"default-event-object":!0,"multiple-max":t.multipleMax,"multiple-uncancelable":t.uncancelable,"remote-method":t.remoteMethod,multiple:"",filterable:"","transfer-class-name":"common-user-transfer"},on:{"on-query-change":t.searchUser,"on-open-change":t.openChange},model:{value:t.selects,callback:function(e){t.selects=e},expression:"selects"}},[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,"key-value":e.email,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.loadIng>0?n("div",{staticClass:"common-user-loading"},[n("Loading")],1):t._e()],1)}),[],!1,null,null,null).exports},84953:(t,e,n)=>{"use strict";n.d(e,{Z:()=>k});var r=n(30264),o=n(86877),i=n(20629);const a={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,f=[Math.max(a,u),Math.min(a,u)];if(u=f[1],(a=f[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 d=[c%360,l%360];return(c=d[0])>(l=d[1])&&(l+=360),this.part(n,o,a,u,c,l)}}};var s=n(51900);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;e180||n>180)&&(e>n?(r=180,o=n*(180/e)):(r=e*(180/n),o=180)),{width:r+"px",height:o+"px"}}return{}},withdraw:function(){var t=this;$A.modalConfirm({content:"确定撤回此信息吗?",okText:"撤回",loading:!0,onOk:function(){t.$store.dispatch("call",{url:"dialog/msg/withdraw",data:{msg_id:t.msgData.id}}).then((function(){$A.messageSuccess("消息已撤回"),t.$store.dispatch("forgetDialogMsg",t.msgData.id),t.$Modal.remove()})).catch((function(e){var n=e.msg;$A.messageError(n,301),t.$Modal.remove()}))}})},viewFile:function(){var t=this.msgData,e=t.id,n=t.dialog_id,r=t.msg;if(["jpg","jpeg","gif","png"].includes(r.ext)){var o=$A.cloneJSON(this.dialogMsgs.filter((function(t){return t.dialog_id===n&&"file"===t.type&&["jpg","jpeg","gif","png"].includes(t.msg.ext)}))).sort((function(t,e){return t.id-e.id})),i=o.findIndex((function(t){return t.id===e}));i>-1?(this.$store.state.previewImageIndex=i,this.$store.state.previewImageList=o.map((function(t){return t.msg.path}))):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=[r.path])}else this.$Electron?this.$Electron.sendMessage("windowRouter",{name:"file-msg-"+this.msgData.id,path:"/single/file/msg/"+this.msgData.id,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:"".concat(this.msgData.msg.name," (").concat($A.bytesToSize(this.msgData.msg.size),")"),titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)}}):window.open($A.apiUrl("../single/file/msg/".concat(this.msgData.id)))},downFile:function(){var t=this;$A.modalConfirm({title:"下载文件",content:"".concat(this.msgData.msg.name," (").concat($A.bytesToSize(this.msgData.msg.size),")"),okText:"立即下载",onOk:function(){t.$store.dispatch("downUrl",$A.apiUrl("dialog/msg/download?msg_id=".concat(t.msgData.id)))}})}}};const d=(0,s.Z)(f,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:"dialog-view "+t.msgData.type,attrs:{"data-id":t.msgData.id}},[n("div",{staticClass:"dialog-head"},[n("div",{staticClass:"dialog-content"},["text"===t.msgData.type?n("div",{staticClass:"content-text"},[n("pre",{staticClass:"no-dark-mode"},[t._v(t._s(t.textMsg(t.msgData.msg.text)))])]):"file"===t.msgData.type?n("div",{class:"content-file "+t.msgData.msg.type},[n("div",{staticClass:"dialog-file"},["img"===t.msgData.msg.type?n("img",{staticClass:"file-img",style:t.imageStyle(t.msgData.msg),attrs:{src:t.msgData.msg.thumb},on:{click:t.viewFile}}):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)))])])])])]):"loading"===t.msgData.type?n("div",{staticClass:"content-loading"},[n("Loading")],1):n("div",{staticClass:"content-unknown"},[t._v(t._s(t.$L("未知的消息类型")))])]),t._v(" "),t.showMenu?n("div",{staticClass:"dialog-menu"},[n("div",{staticClass:"menu-icon"},[t.msgData.userid==t.userId?n("Icon",{attrs:{type:"md-undo",title:t.$L("撤回")},on:{click:t.withdraw}}):t._e(),t._v(" "),"file"===t.msgData.type?[n("Icon",{attrs:{type:"md-eye",title:t.$L("查看")},on:{click:t.viewFile}}),t._v(" "),n("Icon",{attrs:{type:"md-arrow-round-down",title:t.$L("下载")},on:{click:t.downFile}})]:t._e()],2)]):t._e()]),t._v(" "),t.msgData.created_at?n("div",{staticClass:"dialog-foot"},[n("div",{staticClass:"time",attrs:{title:t.msgData.created_at}},[t._v(t._s(t.$A.formatTime(t.msgData.created_at)))]),t._v(" "),t.msgData.send>1||"group"==t.dialogType?n("EPopover",{ref:"percent",staticClass:"percent",attrs:{placement:"left-end",width:360,offset:-8},model:{value:t.popperShow,callback:function(e){t.popperShow=e},expression:"popperShow"}},[n("div",{staticClass:"dialog-wrapper-read-poptip-content"},[n("ul",{staticClass:"read overlay-y"},[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 overlay-y"},[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:{slot:"reference",percent:t.msgData.percentage,size:14},slot:"reference"})],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 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$A.Time()){var n=window.__sendDialogMsg,r=n.msgFile,o=n.msgText;window.__sendDialogMsg=null,this.$nextTick((function(){$A.isArray(r)&&r.length>0?e.sendFileMsg(r):o&&e.sendMsg(o)}))}if(t.query&&t.query._){var i=$A.cloneJSON(t.query);delete i._,this.goForward({query:i},!0)}},immediate:!0},dialogId:{handler:function(t){var e=this;t&&(this.msgNew=0,this.topId=-1,this.visible=!1,this.$store.dispatch("getDialogMsgs",t).then((function(t){e.onToBottom(),e.visible=!0})))},immediate:!0},wsOpenNum:function(t){t<=1||this.$store.dispatch("getDialogMsgs",this.dialogId)}},methods:{sendMsg:function(t){var e=this;if("string"==typeof t&&t&&(this.msgText=t,this.$refs.input.focus()),""!=this.msgText){var n=$A.randomString(16);this.tempMsgs.push({id:n,dialog_id:this.dialogData.id,type:"text",userid:this.userId,msg:{text:this.msgText}}),this.isDesktop||this.$refs.input.blur(),this.onToBottom(),this.onActive(),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:this.dialogId,text:this.msgText},method:"post"}).then((function(t){var r=t.data;e.tempMsgs=e.tempMsgs.filter((function(t){return t.id!=n})),e.sendSuccess(r)})).catch((function(t){var r=t.msg;$A.modalError(r),e.tempMsgs=e.tempMsgs.filter((function(t){return t.id!=n}))})),this.msgText=""}},sendFileMsg:function(t){var e=this;t.length>0&&(this.pasteFile=[],this.pasteItem=[],t.some((function(t){var n=new FileReader;n.readAsDataURL(t),n.onload=function(n){var r=n.target;e.pasteFile.push(t),e.pasteItem.push({type:$A.getMiddle(t.type,null,"/"),name:t.name,size:t.size,result:r.result}),e.pasteShow=!0}})))},chatKeydown:function(t){if(13===t.keyCode){if(t.shiftKey)return;t.preventDefault(),this.sendMsg()}},pasteDrag:function(t,e){var n="drag"===e?t.dataTransfer.files:t.clipboardData.files,r=Array.prototype.slice.call(n);r.length>0&&(t.preventDefault(),this.sendFileMsg(r))},chatPasteDrag:function(t,e){this.dialogDrag=!1,this.pasteDrag(t,e)},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)},pasteSend:function(){var t=this;this.pasteFile.some((function(e){t.$refs.chatUpload.upload(e)}))},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.isDesktop||this.$refs.input.blur(),this.onToBottom(),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){var e=this;$A.isArray(t)?t.some((function(t){e.sendSuccess(t)})):(this.$store.dispatch("saveDialogMsg",t),this.$store.dispatch("increaseTaskMsgNum",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}t.scale>=1&&(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")},onToBottom:function(){this.autoBottom=!0,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,$A.scrollToView(document.getElementById("view_"+e),{behavior:"instant",inline:"start"})}))})).catch((function(){}))},addDialogMsg:function(){var t=this;this.isAutoBottom?this.$nextTick(this.onToBottom):this.$nextTick((function(){t.$refs.scroller&&t.$refs.scroller.scrollInfo().scrollE>10&&t.msgNew++}))}}};const k=(0,s.Z)(_,(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-nav",class:{completed:t.$A.dialogCompleted(t.dialogData)}},[n("div",{staticClass:"dialog-avatar"},["group"==t.dialogData.type?["project"==t.dialogData.group_type?n("i",{staticClass:"taskfont icon-avatar project"},[t._v("")]):"task"==t.dialogData.group_type?n("i",{staticClass:"taskfont icon-avatar task"},[t._v("")]):n("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:t.dialogData.dialog_user?n("div",{staticClass:"user-avatar"},[n("UserAvatar",{attrs:{userid:t.dialogData.dialog_user.userid,size:42}})],1):n("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}})],2),t._v(" "),n("div",{staticClass:"dialog-title"},[n("div",{staticClass:"main-title"},[t._l(t.$A.dialogTags(t.dialogData),(function(e){return"success"!=e.color?[n("Tag",{attrs:{color:e.color,fade:!1}},[t._v(t._s(t.$L(e.text)))])]:t._e()})),t._v(" "),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(" "),t.dialogData.top_at?n("label",{staticClass:"top-text"},[t._v(t._s(t.$L("置顶")))]):t._e()],2),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",style:{opacity:t.visible?1:0},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.onToBottom}},[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:2e4,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(),t._v(" "),n("Modal",{attrs:{title:t.$L(t.pasteTitle),"cancel-text":t.$L("取消"),"ok-text":t.$L("发送"),"enter-ok":!0},on:{"on-ok":t.pasteSend},model:{value:t.pasteShow,callback:function(e){t.pasteShow=e},expression:"pasteShow"}},[n("div",{staticClass:"dialog-wrapper-paste"},[t._l(t.pasteItem,(function(e){return["image"==e.type?n("img",{attrs:{src:e.result}}):n("div",[t._v(t._s(t.$L("文件"))+": "+t._s(e.name)+" ("+t._s(t.$A.bytesToSize(e.size))+")")])]}))],2)])],2):t._e()}),[],!1,null,null,null).exports},85782:(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:Math.max($A.runNum(this.listPageSize),10)}}).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 ")),i.push(t("span",{class:"change-value"},"".concat(u||"-")))):i.push(t("span",{class:"change-value"},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=[];if(!$A.isJson(n))return r;if(this.taskId>0&&$A.isJson(n.flow)){var o=$A.getMiddle(n.flow.flow_item_name,"|");o&&r.push({id:e,button:"重置",content:"确定重置为【".concat(o,"】吗?")})}return 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&&t.showLoad?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},66237:(t,e,n)=>{"use strict";n.d(e,{Z:()=>b});var r=n(20629),o=n(89500),i=n(25199),a=n(73701);const s={name:"TaskUpload",props:{maxSize:{type:Number,default:204800}},data:function(){return{uploadFormat:["jpg","jpeg","png","gif","doc","docx","xls","xlsx","ppt","pptx","txt","esp","pdf","rar","zip","gz","ai","avi","bmp","cdr","eps","mov","mp3","mp4","pr","psd","svg","tif"]}},methods:{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)+"。"})},handleBeforeUpload:function(t){return this.$emit("on-select-file",t),!1},handleClick:function(){this.$refs.upload.handleClick()}}};var u=n(51900);const c=(0,u.Z)(s,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("Upload",{ref:"upload",attrs:{name:"files",action:"",multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize,"before-upload":t.handleBeforeUpload}})}),[],!1,null,null,null).exports;var l=n(84953),f=n(85782),d=n(80641),m=n(21929);function p(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 h(t){for(var e=1;e0&&!this.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=$A.Date(t.start_at,!0),n=$A.Date(t.end_at,!0);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){var e=this;this.taskDetail=$A.cloneJSON(t),this.$nextTick((function(){e.$refs.name&&e.$refs.name.resizeTextarea()}))},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:{innerHeightListener:function(){this.innerHeight=Math.min(1100,window.innerHeight)},within24Hours:function(t){return $A.Date(t,!0)-this.nowTime<86400},expiresFormat:function(t){return $A.countDownFormat(t,this.nowTime)},isOverdue:function(t){return!!t.overdue||$A.Date(t.end_at,!0)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.receiveShow=!1,e.$store.dispatch("getTaskOne",e.taskDetail.id).catch((function(){}))})).catch((function(t){var n=t.msg;$A.modalError(n),e.ownerLoad--,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})))},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.$store.dispatch("getTaskOne",t.taskDetail.id).catch((function(){}))})).catch((function(e){var n=e.msg;$A.modalError(n),t.assistLoad--}))}},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||this.addsubLoad>0)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.messageError("任务描述不能为空")},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.msgText&&this.msgDialog()}},msgDialog: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.$store.dispatch("saveTask",n),t.$store.dispatch("getDialogOne",n.dialog_id).then((function(){t.sendLoad--,$A.isSubElectron?t.resizeDialog().then((function(){t.sendDialogMsg()})):t.$nextTick((function(){t.windowMax768?(window.__sendDialogMsg={time:$A.Time()+10,msgText:t.msgText,msgFile:t.msgFile},t.msgFile=[],t.msgText="",t.goForward({name:"manage-messenger",query:{_:$A.randomString(6)}}),$A.setStorage("messenger::dialogId",n.dialog_id),t.$store.state.dialogOpenId=n.dialog_id,t.$store.dispatch("openTask",0)):t.sendDialogMsg()}))})).catch((function(e){var n=e.msg;t.sendLoad--,$A.modalError(n)}))})).catch((function(e){var n=e.msg;t.sendLoad--,$A.modalError(n)})))},sendDialogMsg:function(){this.msgFile.length>0?this.$refs.dialog.sendFileMsg(this.msgFile):this.msgText&&this.$refs.dialog.sendMsg(this.msgText),this.msgFile=[],this.msgText=""},msgPasteDrag:function(t,e){var n="drag"===e?t.dataTransfer.files:t.clipboardData.files;this.msgFile=Array.prototype.slice.call(n),this.msgFile.length>0&&(t.preventDefault(),this.msgDialog())},taskPasteDrag:function(t,e){this.dialogDrag=!1,this.msgPasteDrag(t,e)},taskDragOver: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)},onSelectFile:function(t){this.msgFile=[t],this.msgDialog()},deleteFile:function(t){var e=this;this.$set(t,"_show_menu",!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={title:this.taskDetail.name,titleFixed:!0,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.sendMessage("windowRouter",{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;return new Promise((function(e){t.$Electron.sendSyncMessage("windowSize",{width:Math.max(1100,window.innerWidth),height:Math.max(720,window.innerHeight),minWidth:800,minHeight:600,autoZoom:!0});var n=0,r=setInterval((function(){n++,(t.$refs.dialog||n>20)&&(clearInterval(r),t.$refs.dialog&&e())}),100)}))},viewFile:function(t){if(["jpg","jpeg","gif","png"].includes(t.ext)){var e=this.fileList.filter((function(t){return["jpg","jpeg","gif","png"].includes(t.ext)})),n=e.findIndex((function(e){return e.id===t.id}));n>-1?(this.$store.state.previewImageIndex=n,this.$store.state.previewImageList=e.map((function(t){return t.path}))):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=[t.path])}else this.$Electron?this.$Electron.sendMessage("windowRouter",{name:"file-task-"+t.id,path:"/single/file/task/"+t.id,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:"".concat(t.name," (").concat($A.bytesToSize(t.size),")"),titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)}}):window.open($A.apiUrl("../single/file/task/".concat(t.id)))},downFile:function(t){var e=this;$A.modalConfirm({title:"下载文件",content:"".concat(t.name," (").concat($A.bytesToSize(t.size),")"),okText:"立即下载",onOk:function(){e.$store.dispatch("downUrl",$A.apiUrl("project/task/filedown?file_id=".concat(t.id)))}})}}};const b=(0,u.Z)(v,(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:{disabled:0===t.taskId,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",{ref:"name",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255},on:{"on-blur":function(e){return t.updateBlur("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.complete_at&&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:{"popper-class":"task-detail-user-popper",title:t.$L("修改负责人"),width:240,placement:"bottom",transfer:""},on:{"on-popper-show":t.openOwner,"on-ok":t.onOwner}},[n("div",{attrs:{slot:"content"},slot:"content"},[n("UserInput",{attrs:{"multiple-max":1,"project-id":t.taskDetail.project_id,placeholder:t.$L("选择任务负责人"),transfer:!1},model:{value:t.ownerData.owner_userid,callback:function(e){t.$set(t.ownerData,"owner_userid",e)},expression:"ownerData.owner_userid"}}),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:{disabled:0===t.taskId,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(" "),t.taskDetail.archived_at?n("div",{staticClass:"flow"},[n("span",{staticClass:"archived",on:{click:function(e){return e.stopPropagation(),t.openMenu(t.taskDetail)}}},[t._v(t._s(t.$L("已归档")))])]):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:{disabled:0===t.taskId,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",{ref:"name",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255},on:{"on-blur":function(e){return t.updateBlur("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.updateBlur("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,"popper-class":"task-detail-user-popper",placement:"bottom",transfer:""},on:{"on-popper-show":t.openOwner,"on-ok":t.onOwner}},[n("div",{attrs:{slot:"content"},slot:"content"},[n("UserInput",{attrs:{"multiple-max":10,"project-id":t.taskDetail.project_id,placeholder:t.$L("选择任务负责人"),transfer:!1},model:{value:t.ownerData.owner_userid,callback:function(e){t.$set(t.ownerData,"owner_userid",e)},expression:"ownerData.owner_userid"}}),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,"popper-class":"task-detail-user-popper",placement:"bottom",transfer:""},on:{"on-popper-show":t.openAssist,"on-ok":t.onAssist}},[n("div",{attrs:{slot:"content"},slot:"content"},[n("UserInput",{attrs:{"multiple-max":10,"project-id":t.taskDetail.project_id,"disabled-choice":t.assistData.disabled,placeholder:t.$L("选择任务协助人员"),transfer:!1},model:{value:t.assistData.assist_userid,callback:function(e){t.$set(t.assistData,"assist_userid",e)},expression:"assistData.assist_userid"}}),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.end_at?[t.within24Hours(t.taskDetail.end_at)?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.isOverdue(t.taskDetail)?n("Tag",{attrs:{color:"red"}},[t._v(t._s(t.$L("超期未完成")))]):t._e()]:t._e()],2)])],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.taskDetail.file_num>50?n("li",{staticClass:"tip"},[t._v(t._s(t.$L("共"+t.taskDetail.file_num+"个文件,仅显示最新50个")))]):t._e(),t._v(" "),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("div",{staticClass:"file-name"},[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("div",{staticClass:"file-menu",class:{show:e._show_menu}},[n("Icon",{attrs:{type:"md-eye"},on:{click:function(n){return t.viewFile(e)}}}),t._v(" "),n("Icon",{attrs:{type:"md-arrow-round-down"},on:{click:function(n){return t.downFile(e)}}}),t._v(" "),n("EPopover",{staticClass:"file-delete",model:{value:e._show_menu,callback:function(n){t.$set(e,"_show_menu",n)},expression:"file._show_menu"}},[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._show_menu=!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",{staticClass:"taskfont del",attrs:{slot:"reference"},slot:"reference"},[t._v("")])])],1)],1)}))],2),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,ref:"subTask_"+e.id,refInFor:!0,attrs:{"task-id":e.id,"open-task":e,"main-end-at":t.taskDetail.end_at,"can-update-blur":t.canUpdateBlur}})})),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",on:{"on-select-file":t.onSelectFile}})],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,"show-load":!1},on:{"on-load-change":t.logLoadChange}}):n("div",{staticClass:"no-dialog",on:{drop:function(e){return e.preventDefault(),t.taskPasteDrag(e,"drag")},dragover:function(e){return e.preventDefault(),t.taskDragOver(!0,e)},dragleave:function(e){return e.preventDefault(),t.taskDragOver(!1,e)}}},[n("div",{staticClass:"no-tip"},[t._v(t._s(t.$L("暂无消息")))]),t._v(" "),n("div",{staticClass:"no-input"},[n("DragInput",{staticClass:"dialog-input",attrs:{type:"textarea",disabled:t.sendLoad>0,rows:1,autosize:{minRows:1,maxRows:3},maxlength:2e4,placeholder:t.$L("输入消息...")},on:{"on-keydown":t.msgKeydown,"on-input-paste":t.msgPasteDrag},model:{value:t.msgText,callback:function(e){t.msgText=e},expression:"msgText"}}),t._v(" "),n("div",{staticClass:"no-send",on:{click:t.msgDialog}},[t.sendLoad>0?n("Loading"):[n("Badge",{attrs:{count:t.taskDetail.msg_num}}),t._v(" "),n("Icon",{attrs:{type:"md-send"}})]],2)],1),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()])],1)],2),t._v(" "),t.taskDetail.id?t._e():n("div",{staticClass:"task-load"},[n("Loading")],1)]):t._e()}),[],!1,null,null,null).exports},21929:(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,n=this.task,r=function(t){t?e.$store.dispatch("saveTaskCompleteTemp",n.id):e.$store.dispatch("forgetTaskCompleteTemp",n.id)};if($A.isJson(t))t.name&&this.updateTask({color:t.color}).catch((function(){}));else{if($A.leftExists(t,"turn::")){var o=$A.leftDelete(t,"turn::");if(o==this.task.flow_item_id)return;var i=this.taskFlowItems.find((function(t){return t.id==e.flow.flow_item_id}))||{},a=this.taskFlowItems.find((function(t){return t.id==o}))||{},s="end"!==i.status&&"end"===a.status,u="end"===i.status&&"end"!==a.status;return this.updateBefore&&(s?r(!0):u&&r(!1)),void this.updateTask({flow_item_id:o}).then((function(){s?r(!0):u&&r(!1)})).catch((function(){s?r(!1):u&&r(!0)}))}switch(t){case"complete":if(this.task.complete_at)return;this.updateBefore&&r(!0),this.updateTask({complete_at:$A.formatDate("Y-m-d H:i:s")}).then((function(){r(!0)})).catch((function(){r(!1)}));break;case"uncomplete":if(!this.task.complete_at)return;this.updateBefore&&r(!1),this.updateTask({complete_at:!1}).then((function(){r(!1)})).catch((function(){r(!0)}));break;case"archived":case"remove":this.archivedOrRemoveTask(t)}}},visibleChange:function(t){t&&this.$store.dispatch("getTaskFlow",this.task.id).then(this.$refs.dropdownMenu.updatePopper).catch(this.$refs.dropdownMenu.updatePopper)},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="removeTask",r="删除",o={task_id:this.task.id},i=this.task.parent_id>0?"子任务":"任务";"archived"==t&&(n="archivedTask",r="归档",this.task.archived_at&&(r="还原归档",o={task_id:this.task.id,type:"recovery"})),$A.modalConfirm({title:r+i,content:"你确定要"+r+i+"【"+this.task.name+"】吗?",loading:!0,onOk:function(){e.loadIng?e.$Modal.remove():e.$store.dispatch(n,o).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",disabled:t.disabled,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",{ref:"dropdownMenu",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(t.task.archived_at?"还原归档":"归档"))+"\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.r(e),n.d(e,{default:()=>h});var r=n(66237),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?n("Loading"):n("TaskDetail",{ref:"taskDetail",attrs:{"task-id":t.taskInfo.id,"open-task":t.taskInfo,"can-update-blur":t.canUpdateBlur}})],1)}),[],!1,null,"2b8bcc0c",null).exports}}]); \ No newline at end of file +(self.webpackChunkDooTask=self.webpackChunkDooTask||[]).push([[862,500],{71832:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(1519),o=n.n(r)()((function(t){return t[1]}));o.push([t.id,".electron-task[data-v-2b8bcc0c]{display:flex;flex-direction:column;height:100%;overflow:auto}.electron-task .task-detail[data-v-2b8bcc0c]{border-radius:0;flex:1;margin:0;padding:18px 22px}",""]);const i=o},83801:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(1519),o=n.n(r)()((function(t){return t[1]}));o.push([t.id,".electron-task .task-detail .task-info .head .function{margin-right:0}.electron-task .task-detail .task-info .head .function .open{display:none}",""]);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},V=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)},Ft=function(t){return function(e){return e.replace(t,"")}},jt=Ft(/^\s+|\s+$/g),zt=Ft(/^\s+/g),Ut=Ft(/\s+$/g),Vt=function(t){return t.length>0},Ht=function(t){return!Vt(t)},qt=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Wt=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]+).*/,qt],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:[qt,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Wt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Wt("firefox")},{name:"Safari",versionRegexes:[qt,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(Bt(t,"safari")||Bt(t,"mobile/"))&&Bt(t,"applewebkit")}}],Yt=[{name:"Windows",search:Wt("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:Wt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Wt("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Wt("linux"),versionRegexes:[]},{name:"Solaris",search:Wt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Wt("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Wt("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Xt={browsers:S(Kt),oses:S(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:S(Zt),chrome:S(Gt),ie:S("IE"),opera:S(Jt),firefox:S(Qt),safari:S(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:S(re),ios:S("iOS"),android:S(oe),linux:S(ie),osx:S("OSX"),solaris:S(ae),freebsd:S(se),chromeos:S(ue)},fe=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 Pt(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 Pt(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),f=!c&&!u&&!l;return{isiPad:S(o),isiPhone:S(i),isTablet:S(u),isPhone:S(c),isTouch:S(s),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:S(l),isDesktop:S(f)}}(a,i,t,n);return{browser:i,os:a,deviceType:s}},de=function(t){return window.matchMedia(t).matches},me=Lt((function(){return fe(navigator.userAgent,B.from(navigator.userAgentData),de)})),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,Se=function(t){return null==t?"":(""+t).replace(xe,"")},De=function(t,e){return e?!("array"!==e||!_t(t))||typeof t===e:void 0!==t},Ee=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;Ee(t,e,n,r)})))},Ne={trim:Se,isArray:_t,is:De,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 Ae(n.childNodes[0])},fromTag:function(t,e){var n=(e||document).createElement(t);return Ae(n)},fromText:function(t,e){var n=(e||document).createTextNode(t);return Ae(n)},fromDom:Ae,fromPoint:function(t,e,n){return B.from(t.dom.elementFromPoint(e,n)).map(Ae)}},Oe=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},Le=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},Re=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},Pe=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},Fe=function(t){return function(e){return Me(e)===t}},je=Fe(1),ze=Fe(3),Ue=Fe(9),Ve=Fe(11),He=function(t){return Te.fromDom(t.dom.ownerDocument)},qe=function(t){return Ue(t)?t:He(t)},We=function(t){return Te.fromDom(qe(t).dom.defaultView)},Ke=function(t){return B.from(t.dom.parentNode).map(Te.fromDom)},Ye=function(t){return B.from(t.dom.previousSibling).map(Te.fromDom)},Xe=function(t){return B.from(t.dom.nextSibling).map(Te.fromDom)},Ze=function(t){return nt(Oe(t,Ye))},Ge=function(t){return Oe(t,Xe)},Je=function(t){return H(t.dom.childNodes,Te.fromDom)},Qe=function(t,e){var n=t.dom.childNodes;return B.from(n[e]).map(Te.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 Ve(t)&&y(t.dom.host)},on=C(Element.prototype.attachShadow)&&C(Node.prototype.getRootNode),an=S(on),sn=on?function(t){return Te.fromDom(t.dom.getRootNode())}:qe,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 Te.fromDom(e)}(qe(t))},cn=function(t){return Te.fromDom(t.dom.host)},ln=function(t){return y(t.dom.shadowRoot)},fn=function(t,e){Ke(t).each((function(n){n.dom.insertBefore(e.dom,t.dom)}))},dn=function(t,e){Xe(t).fold((function(){Ke(t).each((function(t){pn(t,e)}))}),(function(t){fn(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){q(e,(function(e){pn(t,e)}))},gn=function(t){t.dom.textContent="",q(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,q(n,(function(t){fn(e,t)}))),vn(t)},yn=function(t){var e=ze(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()}(Te.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)},Sn=function(t,e,n){var r=(void 0!==n?n.dom:document).defaultView;r&&r.scrollTo(t,e)},Dn=function(t,e){pe().browser.isSafari()&&C(t.dom.scrollIntoViewIfNeeded)?t.dom.scrollIntoViewIfNeeded(!1):t.dom.scrollIntoView(e)},En=function(t,e,n,r){return{x:t,y:e,width:n,height:r,right:t+n,bottom:e+r}},Nn=function(t){var e=void 0===t?window:t,n=e.document,r=xn(Te.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 En(r.left,r.top,n,o)}),(function(t){return En(Math.max(t.pageLeft,r.left),Math.max(t.pageTop,r.top),t.width,t.height)}))},An=function(t){return function(e){return!!e&&e.nodeType===t}},Tn=function(t){return!!t&&!Object.getPrototypeOf(t)},On=An(1),Ln=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(On(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:L,getOr:S(t),getOrThunk:S(t),getOrDie:S(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:L,isError:$,getOr:D,getOrThunk:function(t){return t()},getOrDie:function(){return(e=String(t),function(){throw new Error(e)})();var e},or:D,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:L,forall:$,toOptional:B.none}},xr={value:_r,error:kr,fromOption:function(t,e){return t.fold((function(){return kr(e)}),_r)}},Sr=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 q(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(Dr)):e(r.pass.map(Dr))}))},unload:c,unloadAll:function(t){q(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(On(e)&&ri(e))return e;for(var o=e.childNodes,i=o.length-1;i>=0;i--)ii(t,o[i],r);if(On(e)){var a=e.childNodes;1===a.length&&ri(a[0])&&e.parentNode.insertBefore(a[0],e)}return function(t){return Un(t)||zn(t)}(e)||Go(e,r)||function(t){return!!On(t)&&t.childNodes.length>0}(e)||oi(e,r)||t.remove(e),e},ai=Ne.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,fi={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:"Ÿ"},di={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},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)+";":di[t]||"&#"+t.charCodeAt(0)+";"}))},bi=function(t,e,n){return n=n||hi,t.replace(e?si:ui,(function(t){return di[t]||n[t]||t}))},yi={encodeRaw:gi,encodeAllRaw:function(t){return(""+t).replace(ci,(function(t){return di[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!==di[t]?di[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))):fi[e]||String.fromCharCode(e):mi[t]||hi[t]||function(t){var e=Te.fromTag("div").dom;return e.innerHTML=t,e.textContent||e.innerText||t}(t)}))}},Ci={},wi={},_i=Ne.makeMap,ki=Ne.each,xi=Ne.extend,Si=Ne.explode,Di=Ne.inArray,Ei=function(t,e){return(t=Ne.trim(t))?t.split(e||" "):[]},Ni=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,/[, ]/):Si(t,/[, ]/)}))),n},Ai=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 fn(n.element,r),Ad(r,(function(){return vn(r)}))},Od=function(t,e,n,r){Id(t,(function(o,i){return $d(t,e,n,r)}),n)},Ld=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))},$d=function(t,e,n,r){var o=Te.fromDom(t.getBody()),i=Te.fromDom(t.getDoc());o.dom.offsetWidth;var a=Td(Te.fromDom(n.startContainer),n.startOffset);Ld(t,i,e,a,r),a.cleanup()},Rd=function(t,e,n,r){var o=Te.fromDom(t.getDoc());Ld(t,o,n,function(t){return Ad(Te.fromDom(t),_)}(e),r)},Id=function(t,e,n){var r=n.startContainer,o=n.startOffset,i=n.endContainer,a=n.endOffset;e(Te.fromDom(r),Te.fromDom(i));var s=t.dom.createRng();s.setStart(r,o),s.setEnd(i,a),t.selection.setRng(n)},Pd=function(t,e,n,r){var o=t.pos;if(n)Sn(o.left,o.top,r);else{var i=o.top-e+t.height;Sn(o.left,i,r)}},Bd=function(t,e,n,r,o){var i=n+e,a=r.pos.top,s=r.bottom,u=s-a>=n;if(ai){Pd(r,n,u?!1!==o:!0===o,t)}else s>i&&!u&&Pd(r,n,!0===o,t)},Md=function(t,e,n,r){var o=t.dom.defaultView.innerHeight;Bd(t,e,o,n,r)},Fd=function(t,e,n,r){var o=t.dom.defaultView.innerHeight;Bd(t,e,o,n,r);var i=Ed(n.element),a=Nn(window);i.topa.bottom&&Dn(n.element,!0===r)},jd=function(t,e,n){return Od(t,Md,e,n)},zd=function(t,e,n){return Rd(t,e,Md,n)},Ud=function(t,e,n){return Od(t,Fd,e,n)},Vd=function(t,e,n){return Rd(t,e,Fd,n)},Hd=function(t,e,n){(t.inline?jd:Ud)(t,e,n)},qd=function(t){var e=sn(t).dom;return t.dom===e.activeElement},Wd=function(t){return void 0===t&&(t=Te.fromDom(document)),B.from(t.dom.activeElement).map(Te.fromDom)},Kd=function(t,e,n,r){return{start:t,soffset:e,finish:n,foffset:r}},Yd=Sr([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Xd=(Yd.before,Yd.on,Yd.after,function(t){return t.fold(D,D,D)}),Zd=Sr([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Gd={domRange:Zd.domRange,relative:Zd.relative,exact:Zd.exact,exactFromRange:function(t){return Zd.exact(t.start,t.soffset,t.finish,t.foffset)},getWin:function(t){var e=function(t){return t.match({domRange:function(t){return Te.fromDom(t.startContainer)},relative:function(t,e){return Xd(t)},exact:function(t,e,n,r){return t}})}(t);return We(e)},range:Kd},Jd=pe().browser,Qd=function(t,e){var n=ze(e)?Kf(e).length:Je(e).length+1;return t>n?n:t<0?0:t},tm=function(t){return Gd.range(t.start,Qd(t.soffset,t.start),t.finish,Qd(t.foffset,t.finish))},em=function(t,e){return!Tn(e.dom)&&(Pe(t,e)||Re(t,e))},nm=function(t){return function(e){return em(t,e.start)&&em(t,e.finish)}},rm=function(t){return!0===t.inline||Jd.isIE()},om=function(t){return Gd.range(Te.fromDom(t.startContainer),t.startOffset,Te.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)}(We(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(Te.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)}(Te.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)}))},fm=function(t){var e=Ns((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()}))},dm=gs.DOM,mm=function(t,e){var n=function(t){return t.getParam("custom_ui_selector","","string")}(t),r=dm.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;fm(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(Te.fromDom(t.getElement()));return Wd(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)}))})),kd||(kd=function(e){var n=t.activeEditor;n&&function(t){if(an()&&y(t.target)){var e=Te.fromDom(t.target);if(je(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))}))},dm.bind(document,"focusin",kd))},hm=function(t,e){t.focusedEditor===e.editor&&(t.focusedEditor=null),t.activeEditor||(dm.unbind(document,"focusin",kd),kd=null)},gm=function(t,e){return function(t){return t.collapsed?B.from(uu(t.startContainer,t.startOffset)).map(Te.fromDom):B.none()}(e).bind((function(e){return vo(e)?B.some(e):!1===Pe(t,e)?B.some(t):B.none()}))},vm=function(t,e){gm(Te.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 qd(t)||(e=t,Wd(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(Te.fromDom(e))}(t):function(t){return t.iframeElement&&qd(Te.fromDom(t.iframeElement))}(t)},wm=function(t){return Cm(t)||function(t){var e=sn(Te.fromDom(t.getElement()));return Wd(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(Te.fromDom).map((function(t){return r&&e.collapsed?t:Qe(t,o(t,a)).getOr(t)})).bind((function(t){return je(t)?B.some(t):Ke(t).filter(je)})).map((function(t){return t.dom})).getOr(t)},Sm=function(t,e,n){return xm(t,e,!0,n,(function(t,e){return Math.min(nn(t),e)}))},Dm=function(t,e,n){return xm(t,e,!1,n,(function(t,e){return e>0?e-1:e}))},Em=function(t,e){for(var n=t;t&&Fn(t)&&0===t.length;)t=e?t.nextSibling:t.previousSibling;return t||n},Nm=function(t,e){return H(e,(function(e){var n=t.fire("GetSelectionRange",{range:e});return n.range!==e?n.range:e}))},Am={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},Tm=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}},Om=function(t){if(!Xo(t.value))return!1;var e=t.parent;return!e||"span"===e.name&&!e.attr("style")||!/^[ ]+$/.test(t.value)},Lm=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,Am[e]||1);return n&&dt(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&&dt(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=Ne.makeMap("button,fieldset,form,iframe,img,image,input,object,output,select,textarea"),Vm=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],"--")?Hm(e,!1,u.index+"!--".length):Hm(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},Hm=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},qm=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},Wm=function(t,e){var n;void 0===e&&(e=Ai());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:_,f=t.doctype?t.doctype:_,d=function(n,d){void 0===d&&(d="html");for(var m,p,h,g,v,b,y,C,w,_,k,x,S,D,E,N,A,T,O,L=n.html,$=0,R=[],I=0,P=yi.decode,B=Ne.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),M="html"===d?0:1,F=function(t){var e,n;for(e=R.length;e--&&R[e].name!==t;);if(e>=0){for(n=R.length-1;n>=e;n--)(t=R[n]).valid&&c(t.name);R.length=e}},j=function(t,e){return s(Rm(t,n),e)},z=function(e){""!==e&&(">"===e.charAt(0)&&(e=" "+e),t.allow_conditional_comments||"[if"!==e.substr(0,3).toLowerCase()||(e=" "+e),i(Rm(e,n)))},U=function(t,e){var n=t||"",r=!Mt(n,"--"),o=Hm(L,r,e);return t=L.substr(e,o-e),z(r?n+t:t),o+1},V=function(e,i,a,s,u){if(a=function(t){return Rm(t,n)}((i=i.toLowerCase())in Y?i:P(a||s||u||"")),X&&!C&&!1===function(t){return 0===t.indexOf("data-")||0===t.indexOf("aria-")}(i)){var c=D[i];if(!c&&E){for(var l=E.length;l--&&!(c=E[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]&&!zm.isDomSafe(a,e,t)||C&&(i in B||0===i.indexOf("on"))||(g.map[i]=a,g.push({name:i,value:a}))},H=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"),q=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,W=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=L+">";m=H.exec(Q);){var tt=m[0];if($L.length){j(P(L.substr(m.index))),$=m.index+tt.length;continue}":"===(p=p.toLowerCase()).charAt(0)&&(p=p.substr(1)),w=p in W,G&&K[p]&&R.length>0&&R[R.length-1].name===p&&F(p);var et=qm(q,m[9]);if(null!==et){if("all"===et){$=Vm(e,L,H.lastIndex),H.lastIndex=$;continue}k=!1}if(!X||(_=e.getElementRule(p))){if(k=!0,X&&(D=_.attributes,E=_.attributePatterns),(S=m[9])?((C=-1!==S.indexOf("data-mce-type"))&&Z&&(k=!1),(g=[]).map={},S.replace(q,(function(t,e,n,r,o){return V(p,e,n,r,o),""}))):(g=[]).map={},X&&!C){if(N=_.attributesRequired,A=_.attributesDefault,T=_.attributesForced,_.removeEmptyAttrs&&!g.length&&(k=!1),T)for(v=T.length;v--;)y=(x=T[v]).name,"{$uid}"===(O=x.value)&&(O="mce_"+I++),g.map[y]=O,g.push({name:y,value:O});if(A)for(v=A.length;v--;)(y=(x=A[v]).name)in g.map||("{$uid}"===(O=x.value)&&(O="mce_"+I++),g.map[y]=O,g.push({name:y,value:O}));if(N){for(v=N.length;v--&&!(N[v]in g.map););-1===v&&(k=!1)}if(x=g.map["data-mce-bogus"]){if("all"===x){$=Vm(e,L,H.lastIndex),H.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(L))?(k&&(b=L.substr($,m.index-$)),$=m.index+m[0].length):(b=L.substr($),$=L.length),k&&(b.length>0&&j(b,!0),c(p)),H.lastIndex=$;continue}w||(S&&S.indexOf("/")===S.length-1?k&&c(p):R.push({name:p,valid:k}))}else if(p=m[1])z(p);else if(p=m[2]){if(!(1===M||t.preserve_cdata||R.length>0&&e.isValidChild(R[R.length-1].name,"#cdata"))){$=U("",m.index+2),H.lastIndex=$;continue}a(p)}else if(p=m[3])f(p);else{if((p=m[4])||"=0;v--)(p=R[v]).valid&&c(p.name)};return{parse:function(t,e){void 0===e&&(e="html"),d(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:Wm.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 Tt(Tt({},t),{format:e,get:!0,getInner:!0})}(e,n),a=e.no_events?i:t.fire("BeforeGetContent",i);return o="raw"===a.format?Ne.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(Te.fromDom(r))?a.content=o:a.content=Ne.trim(o),a.no_events?a.content:t.fire("GetContent",a).content},Zm=Ne.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=Ne.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,f,d;if(n&&r[t]&&e.length>0&&(d=e[e.length-1]).length>0&&"\n"!==d&&e.push("\n"),e.push("<",t),s)for(c=0,l=s.length;c":" />",u&&n&&o[t]&&e.length>0&&(d=e[e.length-1]).length>0&&"\n"!==d&&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=Ai());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 f=e.getElementRule(t.name);if(f){for(var d=0,m=f.attributesOrder.length;d'))},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 Pe(e,t)?(r=function(t,e){for(var n=C(e)?e:L,r=t.dom,o=[];null!==r.parentNode&&void 0!==r.parentNode;){var i=r.parentNode,a=Te.fromDom(i);if(o.push(a),!0===n(a))break;r=i}return o}(t,(function(t){return n(t)||Re(t,e)})),r.slice(0,-1)):[];var r},Sp=function(t,e){return xp(t,e,L)},Dp=function(t,e){return[t].concat(Sp(t,e))},Ep=function(t,e,n){return Ol(t,e,n,cp)},Np=function(t,e){return J(Dp(Te.fromDom(e.container()),t),lo)},Ap=function(t,e,n){return Ep(t,e.dom,n).forall((function(t){return Np(e,n).fold((function(){return!1===tl(t,n,e.dom)}),(function(r){return!1===tl(t,n,e.dom)&&Pe(r,Te.fromDom(t.container()))}))}))},Tp=function(t,e,n){return Np(e,n).fold((function(){return Ep(t,e.dom,n).forall((function(t){return!1===tl(t,n,e.dom)}))}),(function(e){return Ep(t,e.dom,n).isNone()}))},Op=N(Tp,!1),Lp=N(Tp,!0),$p=N(Ap,!1),Rp=N(Ap,!0),Ip=function(t){return ll(t).exists(mo)},Pp=function(t,e,n){var r=Y(Dp(Te.fromDom(n.container()),e),lo),o=at(r).getOr(e);return Al(t,o.dom,n).filter(Ip)},Bp=function(t,e){return ll(e).exists(mo)||Pp(!0,t,e).isSome()},Mp=function(t,e){return function(t){return B.from(t.getNode(!0)).map(Te.fromDom)}(e).exists(mo)||Pp(!1,t,e).isSome()},Fp=N(Pp,!1),jp=N(Pp,!0),zp=function(t){return Au.isTextPosition(t)&&!t.isAtStart()&&!t.isAtEnd()},Up=function(t,e){var n=Y(Dp(Te.fromDom(e.container()),t),lo);return at(n).getOr(t)},Vp=function(t,e){return zp(e)?up(e):up(e)||Rl(Up(t,e).dom,e).exists(up)},Hp=function(t,e){return zp(e)?sp(e):sp(e)||$l(Up(t,e).dom,e).exists(sp)},qp=function(t){return ll(t).bind((function(t){return Xr(t,je)})).exists((function(t){return function(t){return U(["pre","pre-wrap"],t)}(ir(t,"white-space"))}))},Wp=function(t,e){return function(t,e){return Rl(t.dom,e).isNone()}(t,e)||function(t,e){return $l(t.dom,e).isNone()}(t,e)||Op(t,e)||Lp(t,e)||Mp(t,e)||Bp(t,e)},Kp=function(t,e){return!qp(e)&&(Op(t,e)||$p(t,e)||Mp(t,e)||Vp(t,e))},Yp=function(t,e){return!qp(e)&&(Lp(t,e)||Rp(t,e)||Bp(t,e)||Hp(t,e))},Xp=function(t,e){return Kp(t,e)||Yp(t,function(t){var e=t.container(),n=t.offset();return Fn(e)&&n0&&n=t.data.length&&Yp(o,Au(t,t.data.length)),s=0===e&&Kp(o,Au(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-zt(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(Te.fromDom(a)),n&&nh(i,o),i},ih=function(t,e){return function(t,e){var n=t.container(),r=t.offset();return!1===Au.isTextPosition(t)&&n===e.parentNode&&r>Au.before(e).offset()}(e,t)?Au(e.container(),e.offset()-1):e},ah=function(t){return qo(t.previousSibling)?B.some((e=t.previousSibling,Fn(e)?Au(e,e.data.length):Au.after(e))):t.previousSibling?Pl(t.previousSibling):B.none();var e},sh=function(t){return qo(t.nextSibling)?B.some((e=t.nextSibling,Fn(e)?Au(e,0):Au.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=Au.before(e.previousSibling?e.previousSibling:e.parentNode);return Rl(t,n).fold((function(){return $l(t,Au.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,Au.after(e)).fold((function(){return Rl(t,Au.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(N(ih,n))},fh=function(t,e,n){n.fold((function(){t.focus()}),(function(n){t.selection.setRng(n.toRange(),e)}))},dh=function(t,e){return e&&Ct(t.schema.getBlockElements(),Be(e))},mh=function(t){if(ei(t)){var e=Te.fromHtml('
    ');return gn(t),pn(t,e),B.some(Au.before(e.dom))}return B.none()},ph=function(t,e,n){var r,o,i,a,s=Ye(t).filter(ze),u=Xe(t).filter(ze);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?Au(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,N(dh,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&&fh(t,e,s)}),(function(n){r&&fh(t,e,B.some(n))}))},gh=function(t){return Ms(t,"td,th")},vh=function(t,e){return{start:t,end:e}},bh=Sr([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),yh=function(t,e){return Qr(Te.fromDom(t),"td,th",e)},Ch=function(t){return!Re(t.start,t.end)},wh=function(t,e){return Mf(t.start,e).bind((function(n){return Mf(t.end,e).bind((function(t){return e=Re(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 Mf(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 Mf(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 Re(t,e)}))},Sh=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)}))},Dh=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)&&zf(t.start,e)}))},Eh=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},Nh=function(t,e){var n=function(t){return function(e){return Re(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 Mf(Te.fromDom(t),e)},r=n(t.startContainer),o=n(t.endContainer),i=r.isSome(),a=o.isSome(),s=Zn(r,o,Re).getOr(!1);return{startTable:r,endTable:o,isStartInTable:i,isEndInTable:a,isSameTable:s,isMultiTable:!s&&i&&a}}(e,n);return Dh(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(Sh).getOr([]),a=o.bind(Sh).getOr([]);if(i.length>0&&a.length>0){var s=Eh(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=Sh(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=Eh(n,e);return B.some(bh.partialTable(o,B.some(Tt(Tt({},e),{rng:i}))))}return B.none()}))}(r,o,e,n)},Ah=function(t){var e;return(8===Me(e=t)||"#comment"===Be(e)?Ye(t):en(t)).bind(Ah).orThunk((function(){return B.some(t)}))},Th=function(t){return q(t,(function(t){rr(t,"contenteditable"),_p(t)}))},Oh=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)},Lh=function(t){var e=Bf(t),n=Te.fromDom(t.selection.getNode());Kn(n.dom)&&ei(n)?t.selection.setCursorLocation(n.dom,0):t.selection.collapse(!0),e.length>1&&V(e,(function(t){return Re(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(Te.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 Oh(t,s,r,i),ei(s)?B.none():B.some(i?e.slice(1):e.slice(0,-1))})).getOr(e);return Th(o),Lh(t),!0},Rh=function(t,e,n,r){var o=t.selection.getRng(),i=e[0],a=n[n.length-1];Oh(t,i,o,!0),Oh(t,a,o,!1);var s=ei(i)?e:e.slice(1),u=ei(a)?n:n.slice(0,-1);return Th(s.concat(u)),r.deleteContents(),Lh(t),!0},Ih=function(t,e,n,r){void 0===r&&(r=!0),e.deleteContents();var o,i=Ah(n).getOr(n),a=Te.fromDom(t.dom.getParent(i.dom,t.dom.isBlock));if(ei(a)&&(_p(a),r&&t.selection.setCursorLocation(a.dom,0)),!Re(n,a)){var s=Xn(Ke(a),n)?[]:Ke(o=a).map(Je).map((function(t){return Y(t,(function(t){return!Re(o,t)}))})).getOr([]);q(s.concat(Je(n)),(function(t){Re(t,a)||Pe(t,a)||!ei(t)||vn(t)}))}return!0},Ph=function(t,e){return hh(t,!1,e),!0},Bh=function(t,e,n,r){return Fh(e,r).fold((function(){return function(t,e,n){return Nh(e,n).map((function(e){return e.fold(N(Ih,t),N(Ph,t),N($h,t),N(Rh,t))}))}(t,e,n)}),(function(e){return function(t,e){return jh(t,e)}(t,e)})).getOr(!1)},Mh=function(t,e){return J(Dp(e,t),bo)},Fh=function(t,e){return J(Dp(e,t),(n="caption",function(t){return je(t)&&Be(t)===n}));var n},jh=function(t,e){return _p(e),t.selection.setCursorLocation(e.dom,0),B.some(!0)},zh=function(t,e,n,r,o){return Tl(n,t.getBody(),o).bind((function(i){return function(t,e,n,r){return Il(t.dom).bind((function(o){return Pl(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 jh(t,e)}(t,r):function(t,e,n){return Fh(t,Te.fromDom(n.getNode())).map((function(t){return!1===Re(t,e)}))}(e,r,i)})).or(B.some(!0))},Uh=function(t,e,n,r){var o=Au.fromRangeStart(t.selection.getRng());return Mh(n,r).bind((function(r){return ei(r)?jh(t,r):function(t,e,n,r,o){return Tl(n,t.getBody(),o).bind((function(t){return Mh(e,Te.fromDom(t.getNode())).map((function(t){return!1===Re(t,r)}))}))}(t,n,e,r,o)})).getOr(!1)},Vh=function(t,e){return t?vp(e):bp(e)},Hh=function(t,e,n){var r=Te.fromDom(t.getBody());return Fh(r,n).fold((function(){return Uh(t,e,r,n)||function(t,e){var n=Au.fromRangeStart(t.selection.getRng());return Vh(e,n)||Al(e,t.getBody(),n).exists((function(t){return Vh(e,t)}))}(t,e)}),(function(n){return function(t,e,n,r){var o=Au.fromRangeStart(t.selection.getRng());return ei(r)?jh(t,r):zh(t,n,e,r,o)}(t,e,r,n).getOr(!1)}))},qh=function(t,e){var n=Te.fromDom(t.selection.getStart(!0)),r=Bf(t);return t.selection.isCollapsed()&&0===r.length?Hh(t,e,n):function(t,e,n){var r=Te.fromDom(t.getBody()),o=t.selection.getRng();return 0!==n.length?$h(t,n,B.none()):Bh(t,r,o,e)}(t,n,r)},Wh=function(t){var e=Au.fromRangeStart(t),n=Au.fromRangeEnd(t),r=t.commonAncestorContainer;return Al(!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:Wh(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||Vn(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=Au.after(t),r=xl(e).prev(n);return r?r.toRange():null},tg=function(t,e,n){var r=t.parentNode;return Ne.each(e,(function(e){r.insertBefore(e,t)})),function(t,e){var n=Au.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=Au.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),Ne.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)&&zf(Te.fromDom(n),e)}(e,n,r)?t.getDoc().execCommand("Delete",!1,null):Ih(t,n,Te.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=Te.fromDom(t.getRoot());return n=Kp(r,Au.fromRangeStart(e))?n.replace(/^ /," "):n.replace(/^ /," "),Yp(r,Au.fromRangeEnd(e))?n.replace(/( | )()?$/," "):n.replace(/ ()?$/," ")}(s,a.getRng(),e));var u=t.parser,c=n.merge,l=tp({validate:yc(t)},t.schema),f='',d=t.fire("BeforeSetContent",{content:e,format:"html",selection:!0,paste:n.paste});if(d.isDefaultPrevented())t.fire("SetContent",{content:d.content,format:"html",selection:!0,paste:n.paste});else{-1===(e=d.content).indexOf("{$caret}")&&(e+="{$caret}"),e=e.replace(/\{\$caret\}/,f);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",d);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(f),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);Ne.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=td(t.getBody(),e);if("false"===r.getContentEditable(i))return r.remove(e),void o.select(i);var a=r.createRng(),s=e.previousSibling;if(Fn(s)){if(a.setStart(s,s.nodeValue.length),!ke.ie){var u=e.nextSibling;Fn(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=Au.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(),Ne.each(h.getElementsByTagName("*"),(function(t){t.removeAttribute("data-mce-fragment")})),function(t,e){B.from(t.getParent(e,"td,th")).map(Te.fromDom).each(kp)}(s,a.getStart()),t.fire("SetContent",d),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){q(t,(function(t){t.name===n.name&&(r[t.name]?r[t.name].nodes.push(n):r[t.name]={filter:t,nodes:[n]})})),q(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);q(r,(function(t){q(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=Pn(n)?Il(n).getOr(e):e;t.selection.setRng(r.toRange())}))}(t)},cg=function(t,e,n){var r=function(t,e){return Tt(Tt({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(S(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(Te.fromDom(e))?o:Ne.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(Te.fromDom(e))?n:Ne.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(Te.fromDom(n.parentNode),(function(n){return!Re(t,n)&&e(n)})):B.none()}(t,e).isSome()},fg=function(t){return C(t)?t:L},dg=function(t,e,n){var r=e(t),o=fg(n);return r.orThunk((function(){return o(t)?B.none():function(t,e,n){for(var r=t.dom,o=fg(n);r.parentNode;){r=r.parentNode;var i=Te.fromDom(r),a=e(i);if(a.isSome())return a;if(o(i))break}return B.none()}(t,e,o)}))},mg=uf,pg=function(t,e,n){var r=t.formatter.get(n);if(r)for(var o=0;o1&&"%"===t.charAt(0)};return V(["styles","attributes"],(function(n){return yt(t,n).exists((function(t){var n=p(t)?t:bt(t);return V(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},Sg=function(t){if(t){var e=new so(t,t);for(t=e.current();t;t=e.next())if(Fn(t))return t}return null},Dg=function(t){var e=Te.fromTag("span");return tr(e,{id:kg,"data-mce-bogus":"1","data-mce-type":"format-caret"}),t&&pn(e,Te.fromText(_g)),e},Eg=function(t,e,n){void 0===n&&(n=!0);var r=t.dom,o=t.selection;if(xg(e))hh(t,!1,Te.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,f=function(t){var e=Sg(t);return e&&e.nodeValue.charAt(0)===_g&&e.deleteData(0,1),e}(e);r.remove(e,!0),s===f&&u>0&&i.setStart(f,u-1),c===f&&l>0&&i.setEnd(f,l-1),a&&r.isEmpty(a)&&_p(Te.fromDom(a)),o.setRng(i)}},Ng=function(t,e,n){void 0===n&&(n=!0);var r=t.dom,o=t.selection;if(e)Eg(t,e,n);else if(!(e=Fl(t.getBody(),o.getStart())))for(;e=r.get(kg);)Eg(t,e,!1)},Ag=function(t,e){return t.appendChild(e),e},Tg=function(t,e){var n=X(t,(function(t,e){return Ag(t,e.cloneNode(!1))}),e);return Ag(n,n.ownerDocument.createTextNode(_g))},Og=function(t,e,n,r){var o,i,a,s=t.dom,u=t.selection,c=[],l=u.getRng(),f=l.startContainer,d=l.startOffset;for(i=f,3===f.nodeType&&(d!==f.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=Lf(t,l,t.formatter.get(e),!0);p=wd(p),t.formatter.remove(e,n,p,r),u.moveToBookmark(m)}else{var h=Fl(t.getBody(),a),g=Dg(!1).dom;!function(t,e,n){var r=t.dom,o=r.getParent(n,N(rf,t));o&&r.isEmpty(o)?n.parentNode.replaceChild(e,n):(wp(Te.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!mf(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=Tg(c.concat(v.toArray()),g);Eg(t,h,!1),u.setCursorLocation(b,1),s.isEmpty(a)&&s.remove(a)}},Lg=function(t){t.on("mouseup keydown",(function(e){!function(t,e){var n=t.selection,r=t.getBody();Ng(t,null,!1),8!==e&&46!==e||!n.isCollapsed()||n.getStart().innerHTML!==_g||Ng(t,Fl(r,n.getStart())),37!==e&&39!==e||Ng(t,Fl(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)},Rg={},Ig=St,Pg=kt;!function(t,e){Rg[t]||(Rg[t]=[]),Rg[t].push(e)}("pre",(function(t){var e,n=t.selection.getRng(),r=Ln(["pre"]);n.collapsed||(e=t.selection.getSelectedBlocks(),Pg(Ig(Ig(e,r),(function(t){return r(t.previousSibling)&&-1!==Dt(e,t.previousSibling)})),(function(t){var e,n;e=t.previousSibling,cs(n=t).remove(),cs(e).append("

    ").append(n.childNodes)})))}));var Bg=Ne.each,Mg=function(t){return On(t)&&!Zl(t)&&!Ml(t)&&!In(t)},Fg=function(t,e){for(var n=t;n;n=n[e]){if(Fn(n)&&Vt(n.data))return t;if(On(n)&&!Zl(n))return n}return t},jg=function(t,e,n){var r=Gm(t);if(e&&n&&(e=Fg(e,"previousSibling"),n=Fg(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),Ne.each(Ne.grep(n.childNodes),(function(t){e.appendChild(t)})),e}return n},zg=function(t,e,n,r){if(r&&!1!==e.merge_siblings){var o=jg(t,nf(r),r);jg(t,o,nf(o,!0))}},Ug=function(t,e,n){Bg(t.childNodes,(function(t){Mg(t)&&(e(t)&&n(t),t.hasChildNodes()&&Ug(t,e,n))}))},Vg=function(t,e){return function(n){return!(!n||!lf(t,n,e))}},Hg=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)}},qg=Sr([{keep:[]},{rename:["name"]},{removed:[]}]),Wg=/^(src|href|style)$/,Kg=Ne.each,Yg=uf,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(On(r)){var i=r.childNodes.length-1;!n&&o&&o--,r=r.childNodes[o>i?i:o]}return Fn(r)&&n&&o>=r.nodeValue.length&&(r=new so(r,t.getBody()).next()||r),Fn(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=Te.fromDom(e),a=Te.fromDom(t.create(r,o)),s=n?Ge(i):Ze(i);return hn(a,s),n?(fn(i,a),mn(a,i)):(dn(i,a),pn(a,i)),a.dom},tv=function(t,e,n,r){var o=nf(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);pf(n)&&(a?o===i.getRoot()&&(n.list_block&&Yg(e,n.list_block)||q(ut(e.childNodes),(function(e){of(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 hf(t)&&gf(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!(!gf(n)||!Yg(e,n.inline))||!(!pf(n)||!Yg(e,n.block))||(hf(n)?On(e)&&t.is(e,n.selector):void 0)}(a,r,e)&&!function(t,e){return e.links&&"A"===t.nodeName}(r,e))return qg.keep();var s=r;if(gf(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),q(u,(function(t){return a.setAttrib(s,t.name,t.value)})),u.length>0)return qg.rename("span")}if("all"!==e.remove){Kg(e.styles,(function(t,r){t=cf(a,sf(t,n),r+""),w(r)&&(r=t,o=null),(e.remove_similar||!o||Yg(lf(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=sf(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="",q(t.split(/\s+/),(function(t){/mce\-\w+/.test(t)&&(i+=(i?" ":"")+t)})),i))return void a.setAttrib(s,r,i);if(Wg.test(r)&&s.removeAttribute("data-mce-"+r),"style"===r&&Ln(["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=sf(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?(gf(i)||pf(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,Vg(t,"fontSize"),Hg(t,"backgroundColor",sf(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=ff(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)&&(Ne.walk(r,o,"childNodes"),o(r))}(r,i,0,a),function(t,e,n,r){!gf(e)||"sub"!==e.inline&&"sup"!==e.inline||(Ug(r,Vg(t,"fontSize"),Hg(t,"fontSize","")),t.remove(t.select("sup"===e.inline?"sub":"sup",r),!0))}(r,i,0,a),zg(r,i,0,a)):r.remove(a,!0)}))};if("false"!==s.getContentEditable(u.getNode())){if(i){if(r)if(tf(r)){if(!l(o,r)){var p=s.createRng();p.setStartBefore(r),p.setEndAfter(r),m(s,Lf(t,p,o),!0)}}else m(s,r,!0);else if(a&&gf(i)&&!Bf(t).length)!function(t,e,n){var r,o,i=t.selection,a=i.getRng(),s=a.startOffset,u=a.startContainer.nodeValue;(r=Fl(t.getBody(),i.getStart()))&&(o=Sg(r));var c,l,f=/[^\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",N(Re,n))).bind((function(t){var n=e[0],r=e[e.length-1],o=Dv(t);return Nv(o,n,r).map((function(t){return vv([Ev(t)])}))})).getOrThunk(Ov);var n,r},Rv=function(t,e){var n=Pf(e,t);return n.length>0?$v(t,n):function(t,e){return e.length>0&&e[0].collapsed?Ov():Lv(t,e[0])}(t,e)},Iv=function(t,e){return e>=0&&ei-o?(a.push([2,n[l]]),++l):(a.push([1,r[f]]),++f);else{s(t,u.start,o,u.start-u.diag,a);for(var d=u.start;d=t&&h>=o&&n[p]===r[h];)a[m]=p--,h--;if(g%2==0&&-f<=d&&d<=f&&a[m]<=i[m+g])return u(a[m],d+t-o,e,s)}}},l=[],s(0,n.length,0,r.length,l),l),e),e},zv=Lt((function(){return document.implementation.createHTMLDocument("undo")})),Uv=function(t){var e,n=(e=t.getBody(),Y(H(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)},Vv=function(t,e,n){var r=n?e.beforeBookmark:e.bookmark;"fragmented"===e.type?jv(e.fragments,t.getBody()):t.setContent(e.content,{format:"raw",no_selection:!y(r)||!jl(r)||!r.isFakeCaret}),t.selection.moveToBookmark(r)},Hv=function(t){return"fragmented"===t.type?t.fragments.join(""):t.content},qv=function(t){var e=Te.fromTag("body",zv());return Ys(e,Hv(t)),q(Ms(e,"*[data-mce-bogus]"),bn),e.dom.innerHTML},Wv=function(t,e){return!(!t||!e)&&(!!function(t,e){return Hv(t)===Hv(e)}(t,e)||function(t,e){return qv(t)===qv(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=Ne.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&&Wv(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",f),t.fire("change",f)):t.fire("AddUndo",f),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()],Vv(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]&&!Wv(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(!hf(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(S("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)),q(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=S(null),e=S("");return{undoManager:{beforeChange:_,add:t,undo:t,redo:t,clear:_,reset:_,hasUndo:L,hasRedo:L,transact:t,ignore:_,extra:_},formatter:{match:L,matchAll:S([]),matchNode:S(void 0),canApply:L,closest:e,apply:_,remove:_,toggle:_,formatChanged:S({unbind:_})},editor:{getContent:e,setContent:e,insertContent:_,addVisual:_},selection:{getContent:e},raw:{getModel:S(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(ze).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 Qf.isBookmarkNode(t.dom)})).bind(e?Xe:Ye)}(e,r).or(e).filter(ze);return t.map((function(t){return function(t,e){Ke(t).each((function(n){var r=t.dom;e&&Kp(n,Au(r,0))?nh(r,0):!e&&Yp(n,Au(r,r.length))&&rh(r,r.length)}))}(t,r)}))}))},ob=function(t,e,n){void 0===n&&(n={});var r=function(t,e){return Tt(Tt({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,Tt(Tt({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(Te.fromDom),r=B.from(e.lastChild).map(Te.fromDom);t.deleteContents(),t.insertNode(e);var o=n.bind(Ye).filter(ze).bind(nb),i=r.bind(Xe).filter(ze).bind(nb);rb(o,n,t,!0),rb(i,r,t,!1),t.collapse(!1)}(a,a.createContextualFragment(o.content)),t.selection.setRng(a),Hd(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)&&Pe(Te.fromDom(t.ownerDocument),Te.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={};Ne.each(n,(function(t,e){o(e,a).each((function(n){r[e]||(q(t,(function(t){t(!0,{node:n,selector:e,parents:a})})),r[e]=t),s[e]=t}))})),Ne.each(r,(function(t,n){s[n]||(delete r[n],Ne.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),f(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 f=um(r);if(f.isSome())return f.map((function(t){return Nm(r,[t])[0]})).getOr(l.createRange())}try{(n=c())&&!Tn(n.anchorNode)&&(a=n.rangeCount>0?n.getRangeAt(0):n.createRange?n.createRange():l.createRange(),a=Nm(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},f=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})}}},d=function(){var e=c(),n=null==e?void 0:e.anchorNode,r=null==e?void 0:e.focusNode;if(!e||!n||!r||Tn(n)||Tn(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),f(o),u(!1)):(Uf(t,o,r.getBody(),!0),f(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&&(Uf(t,o,e,!0),Uf(t,o,e,!1)),o}))}(t,e,n).each(f),e},isCollapsed:function(){var t=l(),e=c();return!(!t||t.item)&&(t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!e||t.collapsed)},isForward:d,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?Em(r.nextSibling,!0):r.parentNode,o=0===a?Em(o.previousSibling,!1):o.parentNode,r&&r===o))?r:n&&3===n.nodeType?n.parentNode:n}(r.getBody(),l())},getSel:c,setRng:f,getRng:l,getStart:function(t){return Sm(r.getBody(),l(),t)},getEnd:function(t){return Dm(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||Sm(a,e,e.collapsed),t.isBlock),r=t.getParent(r||Dm(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(!(Rf(n).length>1)&&Vf(r)){var o=yd(t,e);return o.each((function(t){f(t,d())})),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?zd:Vd)(t,e,n)}(r,t,e):Hd(r,l(),e)},placeCaretAt:function(t,e){return f(cd(t,e,r.getDoc()))},getBoundingClientRect:function(){var t=l();return t.collapsed?Au.fromRangeStart(t).getClientRects()[0]:t.getBoundingClientRect()},destroy:function(){e=o=i=null,h.destroy()}},p=Qf(m),h=sd(m,r);return m.bookmarkManager=p,m.controlSelection=h,m},fb=function(t,e,n){t.addNodeFilter("font",(function(t){q(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){q(e,(function(e){t.attr(e,null)}))}(t,["color","face","size"])}))}))},db=function(t,e){var n=Oi();e.convert_fonts_to_spans&&fb(t,n,Ne.explode(e.font_size_legacy_values)),function(t,e){t.addNodeFilter("strike",(function(t){q(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}},O=Wm({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(A("#cdata",4)).value=t},text:function(t,e){var n;N||(t=t.replace(D," "),function(t,e){return t&&(Ct(e,t.name)||"br"===t.name)}(g.lastChild,b)&&(t=t.replace(x,""))),0!==t.length&&((n=A("#text",3)).raw=!!e,g.append(n).value=t)},comment:function(t){g.append(A("#comment",8)).value=t},pi:function(t,e){g.append(A(t,7)).value=e,T(g)},doctype:function(t){g.append(A("#doctype",10)).value=t,T(g)},start:function(t,n,o){var a=w?e.getElementRule(t):{};if(a){var s=A(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]&&T(s),o||(g=s),!N&&k[t]&&(N=!0)}},end:function(n){var r,o,i,a,s=w?e.getElementRule(n):{};if(s){if(b[n]&&!N){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||E.test(o))&&(r.remove(),r=i),r=i;if((r=g.lastChild)&&3===r.type)if((o=r.value.replace(S,"")).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||E.test(o))&&(r.remove(),r=i),r=i}if(N&&k[n]&&(N=!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),L=g=new $m(u.context||t.root_name,11);if(O.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(f.name,l.name)){h.reverse();for(var g=d=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){q(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=Tt({format:"html"},a),u=Ab(e,n,s),c=function(t,e,n){var r=ko(n.getInner?e.innerHTML:t.getOuterHTML(e));return n.selection||yo(Te.fromDom(e))?r:Ne.trim(r)}(r,u,s),l=function(t,e,n){var r=n.selection?Tt({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:Ob(e,t,o,l,s)},addRules:o.addValidElements,setRules:o.setValidElements,addTempAttr:N(Tb,i,n),getTempAttrs:S(n),getNodeFilters:i.getNodeFilters,getAttributeFilters:i.getAttributeFilters}},$b=function(t,e){var n=Lb(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}},Rb=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)},Pb=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&&Pb.remove(o.nextSibling),function(t){t.fire("remove")}(t),t.editorManager.remove(t),!t.inline&&r&&function(t){Pb.setStyle(t.id,"display",t.orgDisplay)}(t),function(t){t.fire("detach")}(t),Pb.remove(t.getContainer()),Bb(e),Bb(n),t.destroy()}},Fb=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),Pb.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())},jb=(ab=function(t,e){return m(t)&&m(e)?jb(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:S(t),settings:S(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 Tt(Tt(Tt({},Gb),n),e?{menubar:!1}:{})},ry=function(t,e){var n=e.external_plugins?e.external_plugins:{};return t&&t.external_plugins?Ne.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,N(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 Ne.extend(r,{plugins:u.join(" ")})},ay=function(t,e,n,r,o){var i=t?{mobile:ny(o.mobile||{},e)}:{},a=Qb(["mobile"],jb(i,o)),s=Ne.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 Ne.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 Tt(Tt({},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=Hb(t),r=qb(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?q(t.indexOf("=")>0?t.split(/[;,](?![^=;,]*(?:[;,]|$))/):t.split(","),(function(t){var n=t.split("=");n.length>1?e[Ne.trim(n[0])]=Ne.trim(n[1]):e[Ne.trim(n[0])]=Ne.trim(n[0])})):e=t,e}(i):"string"===r?uy(d,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=d,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)}}),fy=function(t,e){return e.dom[t]},dy=function(t,e){return parseInt(ir(e,t),10)},my=N(fy,"clientWidth"),py=N(fy,"clientHeight"),hy=N(dy,"margin-top"),gy=N(dy,"margin-left"),vy=function(t,e,n){var r,o=Te.fromDom(t.getBody()),i=t.inline?o:(r=o,Te.fromDom(qe(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(Te.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 Te.fromDom(t.getEl()).dom.focus()}))}));return function(t){e.push(t)}(s),o(),t.fire("OpenNotification",{notification:Tt({},s)}),s}))},s=S(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(){q(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=Ds.PluginManager,wy=Ds.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){Ne.each(n[t],(function(t){t(e)})),delete n[t]},s=function(r,s){return r=Ne.grep(r,(function(e){return!t.isUploaded(e.blobUri())})),to.all(Ne.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(T)})).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([])}))}}},Py=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||Ry("blobid"),r=t.name||n,o=t.blob;return{id:S(n),name:S(r),filename:S(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:S(o),base64:S(t.base64),blobUri:S(t.blobUri||URL.createObjectURL(o)),uri:S(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(d(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(){q(t,(function(t){URL.revokeObjectURL(t.blobUri())})),t=[]}}}(),o=Ly(),i=[],a=function(t){var e=ws(null);return t.on("change AddUndo",(function(t){e.set(Tt({},t.level))})),{fireIfChanged:function(){var n=t.undoManager.data;st(n).filter((function(t){return!Wv(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){q(t.undoManager.data,(function(t){"fragmented"===t.type?t.fragments=H(t.fragments,(function(t){return c(t,e,n)})):t.content=c(t.content,e,n)}))},f=function(n){return e||(e=By(t,o)),g().then(s((function(o){var i=H(o,(function(t){return t.blobInfo}));return e.upload(i,Py(t)).then(s((function(e){var i=[],s=H(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,Ss.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(){q(i,(function(e){t.dom.remove(e),r.removeByUri(e.src)}))}))),n&&n(s),s})))})))},p=function(e){if(oc(t))return f(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)||q(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){q(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:f,uploadImagesAuto:p,scanForImages:g,destroy:function(){r.destroy(),o.destroy(),n=e=null}}},Fy=function(t){var e={},n=function(t,r){t&&(d(t)?(p(r)||(r=[r]),q(r,(function(t){v(t.deep)&&(t.deep=!hf(t)),v(t.split)&&(t.split=!hf(t)||gf(t)),v(t.remove)&&hf(t)&&!gf(t)&&(t.remove="none"),hf(t)&&gf(t)&&(t.mixed=!0,t.block_expand=!0),d(t.classes)&&(t.classes=t.classes.split(/\s+/))})),e[t]=r):dt(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 On(t)&&t.hasAttribute("href")},onformat:function(e,n,r){Ne.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 Ne.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}}},jy=Ne.each,zy=gs.DOM,Uy=function(t,e){var n,r,o,i=e&&e.schema||Ai({}),a=function(t){r="string"==typeof t?{name:t,classes:[],attrs:{}}:t;var e=zy.create(r.name);return function(t,e){e.classes.length&&zy.addClass(t,e.classes.join(" ")),zy.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!==Ne.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=zy.create("div")).appendChild(t),Ne.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=zy.create("div")).appendChild(s(n,t.slice(1),r.siblings)),o):""},Vy=function(t){var e,n={classes:[],attrs:{}};return"*"!==(t=n.selector=Ne.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!==Ne.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},Hy=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 d(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"),Ne.map(c.split(/(?:>|\s+(?![^\[\]]+\]))/),(function(t){var e=Ne.map(t.split(/(?:~\+|~|\+)/),Vy),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 f=zy.select(n,r)[0]||r.firstChild;return jy(e.styles,(function(t,e){var n=s(t);n&&zy.setStyle(f,e,n)})),jy(e.attributes,(function(t,e){var n=s(t);n&&zy.setAttrib(f,e,n)})),jy(e.classes,(function(t){var e=s(t);zy.hasClass(f,e)||zy.addClass(f,e)})),t.fire("PreviewFormats"),zy.setStyles(r,{position:"absolute",left:-65535}),t.getBody().appendChild(r),o=zy.getStyle(t.getBody(),"fontSize",!0),o=/px$/.test(o)?parseInt(o,10):0,jy(a.split(" "),(function(e){var n=zy.getStyle(f,e,!0);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=zy.getStyle(t.getBody(),e,!0),"#ffffff"===zy.toHex(n).toLowerCase())||"color"===e&&"#000000"===zy.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"),zy.remove(r),i},qy=function(t){var e=Fy(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),Lg(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:N(Hy,t)}},Wy=function(t){switch(t.toLowerCase()){case"undo":case"redo":case"mcerepaint":case"mcefocus":return!0;default:return!1}},Ky=function(t){var e=Es(),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;Wy(r)||(Xv(e,n),e.beforeChange())})),t.on("ExecCommand",(function(t){var e=t.command;Wy(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===Wv(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){var e;t.inputType&&("insertReplacementText"===t.inputType||"insertText"===(e=t).inputType&&null===e.data||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,id.HOME,id.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,id.DOWN,id.UP,id.LEFT,id.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===id.BACKSPACE||e===id.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)&&(id.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(Te.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 Le(Te.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?Eo(n)?Fn(n.nextSibling)?Au(n.nextSibling,0):Au.after(n):To(e)?Au(n,r+1):e:Eo(n)?Fn(n.previousSibling)?Au(n.previousSibling,n.previousSibling.data.length):Au.before(n):Oo(e)?Au(n,r-1):e},oC=N(rC,!0),iC=N(rC,!1),aC=function(t){return po(t)||go(t)},sC=function(t,e){return Pe(t,e)?Xr(e,aC,function(t){return function(e){return Re(t,Te.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=Te.fromDom(t),r=Te.fromDom(e.container());return sC(n,r).map((function(t){return function(t,e){return{block:t,position:e}}(t,e)}))},fC=function(t,e,n){var r=lC(t,Au.fromRangeStart(n)),o=r.bind((function(n){return Al(e,t,n.position).bind((function(n){return lC(t,n).map((function(n){return function(t,e,n){return Vn(n.position.getNode())&&!1===ei(n.block)?Ll(!1,n.block.dom).bind((function(r){return r.isEqual(n.position)?Al(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===Re(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 Re(e,t)}))})).isSome()}(t)&&function(t){return!1===Wn(t.from.block.dom)&&!1===Wn(t.to.block.dom)}(t)}))},dC=function(t){var e=Je(t);return Q(e,lo).fold(S(e),(function(t){return e.slice(0,t)}))},mC=function(t){var e=dC(t);return q(e,vn),e},pC=function(t,e){var n=Dp(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)&&fn(r,Te.fromTag("br"));var o=Rl(n.dom,Au.before(r.dom));return q(mC(e),(function(t){fn(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=Pl(n.dom);return q(mC(e),(function(t){pn(n,t)})),pC(t,e),r},vC=function(t,e){return Pe(e,t)?function(t,e){var n=Dp(e,t);return B.from(n[n.length-1])}(e,t):B.none()},bC=function(t,e){Ll(t,e.dom).map((function(t){return t.getNode()})).map(Te.fromDom).filter(mo).each(vn)},yC=function(t,e,n){return bC(!0,e),bC(!1,n),vC(e,n).fold(N(gC,t,e,n),N(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=Te.fromDom(t.getBody()),r=function(t,e,n){return n.collapsed?fC(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=Te.fromDom(e),r=N(Re,t);return Yr(n,bo,r).isSome()},kC=function(t,e){var n=Rl(t.dom,Au.fromRangeStart(e)).isNone(),r=$l(t.dom,Au.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=Te.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,Te.fromDom(n.startContainer)),sC(t,Te.fromDom(n.endContainer)),(function(r,o){return!1===Re(r,o)&&(n.deleteContents(),CC(t,!0,r,o).each((function(t){e.setRng(t.toRange())})),!0)})).getOr(!1)}(e,t.selection)},SC=function(t,e){return!t.selection.isCollapsed()&&xC(t)},DC=qn,EC=Wn,NC=function(t,e,n,r,o){return B.from(e._selectionOverrides.showCaret(t,n,r,o))},AC=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))},TC=function(t,e,n){var r=sl(1,t.getBody(),e),o=Au.fromRangeStart(r),i=o.getNode();if(jc(i))return NC(1,t,i,!o.isAtEnd(),!1);var a=o.getNode(!0);if(jc(a))return NC(1,t,a,!1,!1);var s=t.dom.getParent(o.getNode(),(function(t){return EC(t)||DC(t)}));return jc(s)?NC(1,t,s,!1,n):B.none()},OC=function(t,e,n){return e.collapsed?TC(t,e,n).getOr(e):e},LC=function(t){return yp(t)||hp(t)},$C=function(t){return Cp(t)||gp(t)},RC=function(t,e,n,r,o,i){return NC(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){Fn(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(!Fn(n.commonAncestorContainer))return!1;var r=e?Tu.Forwards:Tu.Backwards,o=xl(t.getBody()),i=N(fl,e?o.next:o.prev),a=e?LC:$C,s=cl(r,t.getBody(),n),u=rC(e,i(s));if(!u||!dl(s,u))return!1;if(a(u))return RC(t,n,s.getNode(),r,e,u);var c=i(u);return!!(c&&a(c)&&dl(u,c))&&RC(t,n,s.getNode(),r,e,c)}(t,e)},PC=Sr([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),BC=function(t,e,n,r){var o=r.getNode(!1===e);return sC(Te.fromDom(t),Te.fromDom(n.getNode())).map((function(t){return ei(t)?PC.remove(t.dom):PC.moveToElement(o)})).orThunk((function(){return B.some(PC.moveToElement(o))}))},MC=function(t,e,n){return Al(e,t,n).bind((function(r){return o=r.getNode(),bo(Te.fromDom(o))||go(Te.fromDom(o))||function(t,e,n,r){var o=function(e){return fo(Te.fromDom(e))&&!tl(n,r,t)};return ul(!e,n).fold((function(){return ul(e,r).fold(L,o)}),o)}(t,e,n,r)?B.none():e&&Wn(r.getNode())||!1===e&&Wn(r.getNode(!0))?BC(t,e,n,r):e&&Cp(n)||!1===e&&yp(n)?B.some(PC.moveToPosition(r)):B.none();var o}))},FC=function(t,e,n){return function(t,e){var n=e.getNode(!1===t),r=t?"after":"before";return On(n)&&n.getAttribute("data-mce-caret")===r}(e,n)?function(t,e){return t&&Wn(e.nextSibling)?B.some(PC.moveToElement(e.nextSibling)):!1===t&&Wn(e.previousSibling)?B.some(PC.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(PC.remove(t))}),(function(t){return B.some(PC.moveToElement(t))}),(function(n){return tl(e,n,t)?B.none():B.some(PC.moveToPosition(n))}))}(t,n,e)}))},jC=function(t,e){return B.from(td(t.getBody(),e))},zC=function(t,e){var n=t.selection.getNode();return jC(t,n).filter(Wn).fold((function(){return function(t,e,n){var r=sl(e?1:-1,t,n),o=Au.fromRangeStart(r),i=Te.fromDom(t);return!1===e&&Cp(o)?B.some(PC.remove(o.getNode(!0))):e&&yp(o)?B.some(PC.remove(o.getNode())):!1===e&&yp(o)&&Mp(i,o)?Fp(i,o).map((function(t){return PC.remove(t.getNode())})):e&&Cp(o)&&Bp(i,o)?jp(i,o).map((function(t){return PC.remove(t.getNode())})):FC(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,Te.fromDom(n)),!0}}(t,e),function(t,e){return function(n){var r=e?Au.before(n):Au.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!(!Wn(n)||Kn(n))&&jC(t,n.parentNode).filter(Wn).fold((function(){var n;return n=Te.fromDom(t.getBody()),q(Ms(n,".mce-offscreen-selection"),vn),hh(t,e,Te.fromDom(t.selection.getNode())),uC(t),!0}),$)},VC=function(t){var e=t.dom,n=t.selection,r=td(t.getBody(),n.getNode());if(qn(r)&&e.isBlock(r)&&e.isEmpty(r)){var o=e.create("br",{"data-mce-bogus":"1"});e.setHTML(r,""),r.appendChild(o),n.setRng(Au.before(o).toRange())}return!0},HC=function(t,e){return t.selection.isCollapsed()?zC(t,e):UC(t,e)},qC=function(t,e){return!!t.selection.isCollapsed()&&function(t,e){var n=Au.fromRangeStart(t.selection.getRng());return Al(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)},WC=Fn,KC=function(t){return WC(t)&&t.data[0]===wo},YC=function(t){return WC(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(WC(t.previousSibling))return YC(t.previousSibling)||t.previousSibling.appendData(wo),t.previousSibling;if(WC(t))return KC(t)||t.insertData(0,wo),t;var e=XC(t);return t.parentNode.insertBefore(e,t),e}(e):function(t){if(WC(t.nextSibling))return KC(t.nextSibling)||t.nextSibling.insertData(0,wo),t.nextSibling;if(WC(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=N(ZC,!0),JC=N(ZC,!1),QC=function(t,e){return Fn(t.container())?ZC(e,t.container()):ZC(e,t.getNode())},tw=function(t,e){var n=e.get();return n&&t.container()===n&&Eo(n)},ew=function(t,e){return e.fold((function(e){Lc(t.get());var n=GC(e);return t.set(n),B.some(Au(n,n.length-1))}),(function(e){return Il(e).map((function(e){if(tw(e,t))return Au(t.get(),1);Lc(t.get());var n=QC(e,!0);return t.set(n),Au(n,1)}))}),(function(e){return Pl(e).map((function(e){if(tw(e,t))return Au(t.get(),t.get().length-1);Lc(t.get());var n=QC(e,!1);return t.set(n),Au(n,n.length-1)}))}),(function(e){Lc(t.get());var n=JC(e);return t.set(n),B.some(Au(n,1))}))},nw=function(t,e){for(var n=0;n0&&e(l,At(s))&&a++,l.line=a,o(l))return!0;s.push(l)}}},c=At(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},zw=N(jw,xw.Up,ou,iu),Uw=N(jw,xw.Down,iu,ou),Vw=function(t){return function(e){return function(t,e){return e.line>t}(t,e)}},Hw=function(t){return function(e){return function(t,e){return e.line===t}(t,e)}},qw=Wn,Ww=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=$),Et(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")&&qw(r.node)||i0&&i(m,At(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(),Vw(1),c),v=Gw(Y(g,Hw(1)),d);if(v)return e_(t,v.position.toRange(),!1);if(v=At(Y(g,Hw(0))))return e_(t,v.position.toRange(),!1)}return 0===f.length?o_(t,u).filter(u?o:r).map((function(e){return OC(t,e.toRange(),!1)})):B.none()},o_=function(t,e){var n=t.selection.getRng(),r=t.getBody();if(e){var o=Au.fromRangeEnd(n),i=$w(r,o);return st(i.positions)}o=Au.fromRangeStart(n),i=Lw(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=Au.fromRangeStart(t.selection.getRng());Au.isTextPosition(n)&&!1===function(t){return To(t)||Oo(t)}(n)&&(a_(t,Oc(e.get(),n)),e.set(null))}},l_=function(t,e,n){return!!Cc(t)&&function(t,e,n){var r=t.getBody(),o=Au.fromRangeStart(t.selection.getRng()),i=N(tC,t);return Cw(n,i,r,o).bind((function(n){return u_(t,e,n)}))}(t,e,n).isSome()},f_=function(t,e,n){return!!Cc(e)&&kw(t,e)},d_=function(t){var e=ws(null),n=N(tC,t);return t.on("NodeChange",(function(r){!Cc(t)||ke.browser.isIE()&&r.initial||(function(t,e,n){var r=H(Ms(Te.fromDom(e.getRoot()),'*[data-mce-selected="inline-boundary"]'),(function(t){return t.dom})),o=Y(r,t),i=Y(n,t);q(rt(o,i),N(s_,!1)),q(rt(i,o),N(s_,!0))}(n,t.dom,r.parents),c_(t,e),function(t,e,n,r){if(e.selection.isCollapsed()){var o=Y(r,t);q(o,(function(r){var o=Au.fromRangeStart(e.selection.getRng());dw(t,e.getBody(),o).bind((function(t){return u_(e,n,t)}))}))}}(n,t,e,r.parents))})),e},m_=N(f_,!0),p_=N(f_,!1),h_=function(t,e,n){if(Cc(t)){var r=o_(t,e).getOrThunk((function(){var n=t.selection.getRng();return e?Au.fromRangeEnd(n):Au.fromRangeStart(n)}));return dw(N(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=N(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"),dw(i,o,Au.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=N(tC,t),a=dw(i,o,r);return a.bind((function(t){return n?t.fold(S(B.some(gw(t))),B.none,S(B.some(hw(t))),B.none):t.fold(B.none,S(B.some(hw(t))),B.none,S(B.some(gw(t))))})).map(g_(t,e)).getOrThunk((function(){var s=Tl(n,o,r),u=s.bind((function(t){return dw(i,o,t)}));return Zn(a,u,(function(){return nC(i,o,r).exists((function(e){return!!function(t){return Zn(Il(t),Pl(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,Te.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=Au.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=N($g,e),i=H(Y(r,o),(function(t){return t.dom}));if(0===i.length)hh(e,t,n);else{var a=function(t,e){var n=Dg(!1),r=Tg(e,n.dom);return fn(Te.fromDom(t),n),vn(Te.fromDom(t)),Au(r,0)}(n.dom,i);e.selection.setRng(a.toRange())}},__=function(t,e){var n=Te.fromDom(t.getBody()),r=Te.fromDom(t.selection.getStart()),o=Y(function(t,e){var n=Dp(e,t);return Q(n,lo).fold(S(n),(function(t){return n.slice(0,t)}))}(n,r),C_);return st(o).exists((function(n){var r,i=Au.fromRangeStart(t.selection.getRng());return!(!function(t,e,n){return Zn(Il(n),Pl(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)})):Rl(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,Te.fromDom(n)),!0},S_=function(t,e){return t.selection.isCollapsed()?function(t,e){var n=e?hp:gp,r=e?Tu.Forwards:Tu.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)&&dl(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)},D_=function(t){var e=parseInt(t,10);return isNaN(e)?0:e},E_=function(t,e){return(t||"table"===Be(e)?"margin":"padding")+("rtl"===ir(e,"direction")?"-right":"-left")},N_=function(t){var e=T_(t);return!t.mode.isReadOnly()&&(e.length>1||function(t,e){return et(e,(function(e){var n=E_(pc(t),e),r=sr(e,n).map(D_).getOr(0);return"false"!==t.dom.getContentEditable(e.dom)&&r>0}))}(t,e))},A_=function(t){return ho(t)||go(t)},T_=function(t){return Y((e=t.selection.getSelectedBlocks(),H(e,Te.fromDom)),(function(t){return!A_(t)&&!function(t){return Ke(t).exists(A_)}(t)&&Xr(t,(function(t){return qn(t.dom)||Wn(t.dom)})).exists((function(t){return qn(t.dom)}))}));var e},O_=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"),q(T_(t),(function(t){!function(t,e,n,r,o,i){var a=E_(n,Te.fromDom(i));if("outdent"===e){var s=Math.max(0,D_(i.style[a])-r);t.setStyle(i,a,s?s+o:"")}else s=D_(i.style[a])+r+o,t.setStyle(i,a,s)}(n,e,u,s,a,t.dom)}))},L_=function(t,e){if(t.selection.isCollapsed()&&N_(t)){var n=t.dom,r=t.selection.getRng(),o=Au.fromRangeStart(r),i=n.getParent(r.startContainer,n.isBlock);if(null!==i&&Op(Te.fromDom(i),o))return O_(t,"outdent"),!0}return!1},$_=function(t,e){t.getDoc().execCommand(e,!1,null)},R_=function(t,e){t.addCommand("delete",(function(){!function(t,e){L_(t)||HC(t,!1)||IC(t,!1)||y_(t,e,!1)||wC(t,!1)||qh(t)||qC(t,!1)||S_(t,!1)||SC(t)||k_(t,!1)||($_(t,"Delete"),uC(t))}(t,e)})),t.addCommand("forwardDelete",(function(){!function(t,e){HC(t,!0)||IC(t,!0)||y_(t,e,!0)||wC(t,!0)||qh(t)||qC(t,!0)||S_(t,!0)||SC(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])},P_=function(t){var e=Es(),n=ws(!1),r=As((function(e){t.fire("longpress",Tt(Tt({},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",Tt(Tt({},o),{type:"tap"}))}))}),!0)},B_=function(t,e){return Ct(t,e.nodeName)},M_=function(t,e){return!!Fn(e)||!!On(e)&&(!B_(t,e)&&!Zl(e))},F_=function(t,e){if(Fn(e)){if(0===e.nodeValue.length)return!0;if(/^\s+$/.test(e.nodeValue)&&(!e.nextSibling||B_(t,e.nextSibling)))return!0}return!1},j_=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&&On(u)&&l){var f=c.nodeName.toLowerCase();if(a.isValidChild(f,l.toLowerCase())&&!function(t,e,n){return V(Sp(Te.fromDom(n),Te.fromDom(e)),(function(e){return B_(t,e.dom)}))}(s,c,u)){var d=i.getRng(),m=d.startContainer,p=d.startOffset,h=d.endContainer,g=d.endOffset,v=Cm(t);for(u=c.firstChild;u;)if(M_(s,u)){if(F_(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&&(d.setStart(m,p),d.setEnd(h,g),i.setRng(d),t.nodeChanged())}}},z_=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(Te.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 z_(t,n)):void(Ao(n)&&(z_(t,n),t.undoManager.add()))},V_=Wn,H_=function(t,e,n){var r=xl(t.getBody()),o=N(fl,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(Au.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()}}},q_=function(t,e){var n=e?Tu.Forwards:Tu.Backwards,r=t.selection.getRng();return function(t,e,n){return n_(e,t,n,yp,Cp,V_)}(n,t,r).orThunk((function(){return H_(t,n,r),B.none()}))},W_=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)}),V_)}(n,t,r).orThunk((function(){return H_(t,n,r),B.none()}))},K_=function(t,e){return q_(t,e).exists((function(e){return t_(t,e),!0}))},Y_=function(t,e){return W_(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=Te.fromTag("br");return J_(t,n,e),G_(n)}(t,r):function(t,e,n,r){var o=Te.fromTag(n),i=Te.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 Lw(t,e).breakAt.isNone()}(t.dom,n)},ek=function(t,e){var n=Te.fromDom(t.getBody()),r=Au.fromRangeStart(t.selection.getRng()),o=nc(t),i=rc(t);return function(t,e){var n=N(Re,e);return Xr(Te.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 H(t,(function(t){return Tt({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})),dk=function(t,e){return at(e.getClientRects()).bind((function(e){return lk(t,e.left,e.top)})).bind((function(t){return Ow(Pl(n=t).map((function(t){return Lw(n,t).positions.concat(t)})).getOr([]),e);var n}))},mk=function(t,e){return st(e.getClientRects()).bind((function(e){return fk(t,e.left,e.top)})).bind((function(t){return Ow(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)||!Vn(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=N(pk,Lw),gk=N(pk,$w),vk=function(t,e,n,r){var o=t.selection.getRng(),i=e?1:-1;return!(!Fc()||!function(t,e,n){var r=Au.fromRangeStart(e);return Ll(!t,n).exists((function(t){return t.isEqual(r)}))}(e,o,n))&&(NC(i,t,n,!e,!1).each((function(e){t_(t,e)})),!0)},bk=function(t,e){var n=e.getNode(t);return On(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 Ll(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=Te.fromTag(o);tr(r,rc(e)),pn(r,Te.fromTag("br")),t?dn(Te.fromDom(n),r):fn(Te.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=Au.fromRangeStart(o),a=t.getBody();if(!e&&hk(r,i)){var s=function(t,e,n){return dk(e,n).orThunk((function(){return at(n.getClientRects()).bind((function(n){return Tw(Rw(t,Au.before(e)),n.left)}))})).getOr(Au.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 Tw(Iw(t,Au.after(e)),n.left)}))})).getOr(Au.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:id.RIGHT,action:ok(K_,t,!0)},{keyCode:id.LEFT,action:ok(K_,t,!1)},{keyCode:id.UP,action:ok(Y_,t,!1)},{keyCode:id.DOWN,action:ok(Y_,t,!0)},{keyCode:id.RIGHT,action:ok(_k,t,!0)},{keyCode:id.LEFT,action:ok(_k,t,!1)},{keyCode:id.UP,action:ok(kk,t,!1)},{keyCode:id.DOWN,action:ok(kk,t,!0)},{keyCode:id.RIGHT,action:ok(ak,t,!0)},{keyCode:id.LEFT,action:ok(ak,t,!1)},{keyCode:id.UP,action:ok(sk,t,!1)},{keyCode:id.DOWN,action:ok(sk,t,!0)},{keyCode:id.RIGHT,action:ok(l_,t,e,!0)},{keyCode:id.LEFT,action:ok(l_,t,e,!1)},{keyCode:id.RIGHT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:ok(m_,t,e)},{keyCode:id.LEFT,ctrlKey:!r.isOSX(),altKey:r.isOSX(),action:ok(p_,t,e)},{keyCode:id.UP,action:ok(nk,t,!1)},{keyCode:id.DOWN,action:ok(nk,t,!0)}],n).each((function(t){n.preventDefault()}))}(t,e,n)}))},Sk=function(t,e){t.on("keydown",(function(n){!1===n.isDefaultPrevented()&&function(t,e,n){ik([{keyCode:id.BACKSPACE,action:ok(L_,t,!1)},{keyCode:id.BACKSPACE,action:ok(HC,t,!1)},{keyCode:id.DELETE,action:ok(HC,t,!0)},{keyCode:id.BACKSPACE,action:ok(IC,t,!1)},{keyCode:id.DELETE,action:ok(IC,t,!0)},{keyCode:id.BACKSPACE,action:ok(y_,t,e,!1)},{keyCode:id.DELETE,action:ok(y_,t,e,!0)},{keyCode:id.BACKSPACE,action:ok(qh,t,!1)},{keyCode:id.DELETE,action:ok(qh,t,!0)},{keyCode:id.BACKSPACE,action:ok(qC,t,!1)},{keyCode:id.DELETE,action:ok(qC,t,!0)},{keyCode:id.BACKSPACE,action:ok(S_,t,!1)},{keyCode:id.DELETE,action:ok(S_,t,!0)},{keyCode:id.BACKSPACE,action:ok(SC,t,!1)},{keyCode:id.DELETE,action:ok(SC,t,!0)},{keyCode:id.BACKSPACE,action:ok(wC,t,!1)},{keyCode:id.DELETE,action:ok(wC,t,!0)},{keyCode:id.BACKSPACE,action:ok(k_,t,!1)},{keyCode:id.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:id.BACKSPACE,action:ok(VC,t)},{keyCode:id.DELETE,action:ok(VC,t)}],e)}(t,e)}))},Dk=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(Fn(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 Vn(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),Hd(t,s)}},Ek=function(t){return B.from(t.dom.getParent(t.selection.getStart(!0),t.dom.isBlock))},Nk=function(t,e){return t&&t.parentNode&&t.parentNode.nodeName===e},Ak=function(t){return t&&/^(OL|UL|LI)$/.test(t.nodeName)},Tk=function(t){var e=t.parentNode;return/^(LI|DT|DD)$/.test(e.nodeName)?e:t},Ok=function(t,e,n){for(var r=t[n?"firstChild":"lastChild"];r&&!On(r);)r=r[n?"nextSibling":"previousSibling"];return r===e},Lk=function(t,e,n,r,o){var i=t.dom,a=t.selection.getRng();if(n!==t.getBody()){var s;Ak(s=n)&&Ak(s.parentNode)&&(o="LI");var u=o?e(o):i.create("BR");if(Ok(n,r,!0)&&Ok(n,r,!1))if(Nk(n,"LI")){var c=Tk(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(Ok(n,r,!0))Nk(n,"LI")?(i.insertAfter(u,Tk(n)),u.appendChild(i.doc.createTextNode(" ")),u.appendChild(n)):n.parentNode.insertBefore(u,n),i.remove(r);else if(Ok(n,r,!1))i.insertAfter(u,Tk(n)),i.remove(r);else{n=Tk(n);var l=a.cloneRange();l.setStartAfter(r),l.setEndAfter(n);var f=l.extractContents();"LI"===o&&function(t,e){return t.firstChild&&t.firstChild.nodeName===e}(f,"LI")?(u=f.firstChild,i.insertAfter(f,n)):(i.insertAfter(f,n),i.insertAfter(u,n)),i.remove(r)}Dk(t,u)}},$k=function(t,e){return e&&"A"===e.nodeName&&t.isEmpty(e)},Rk=function(t){t.innerHTML='
    '},Ik=function(t,e){return t.nodeName===e||t.previousSibling&&t.previousSibling.nodeName===e},Pk=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===Fn(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},Fk=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(Te.fromDom(e)),o=Tt(Tt({},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=Ot(Ot([],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))},jk=function(t,e){var n,r,o,i,a,s,u,c,l,f,d=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?d.create(e||l):i.cloneNode(!1),!1===function(t){return t.getParam("keep_styles",!0)}(t))d.setAttrib(n,"style",null),d.setAttrib(n,"class",null);else do{if(u[s.nodeName]){if(Ml(s)||Zl(s))continue;o=s.cloneNode(!1),d.setAttrib(o,"id",""),n.hasChildNodes()?(o.appendChild(n.firstChild),n.appendChild(o)):(a=o,n.appendChild(o))}}while((s=s.parentNode)&&s!==w);return Fk(t,n),Rk(a),n},v=function(t){var e,n,a=Bk(t,r,o);if(Fn(r)&&(t?a>0:ar.childNodes.length-1,r=r.childNodes[Math.min(o,r.childNodes.length-1)]||r,o=f&&Fn(r)?r.nodeValue.length:0);var w=Mk(d,r);if(w){(l&&!y||!l&&y)&&(r=function(t,e,n,r,o){var i,a,s,u,c,l,f=e||"P",d=t.dom,m=Mk(d,r);if(!(a=d.getParent(r,d.isBlock))||!Pk(d,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=d.create(f),Fk(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&&!d.isBlock(u);)s=u,u=u.previousSibling;if(s&&t.schema.isValidChild(l,f.toLowerCase())){for(i=d.create(f),Fk(t,i),s.parentNode.insertBefore(i,s),u=s;u&&!d.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=d.getParent(r,d.isBlock),u=i?d.getParent(i.parentNode,d.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)&&d.isEmpty(i)?Lk(t,g,u,i,l):l&&i===t.getBody()||(l=l||"P",Do(i)?(a=Io(i),d.isEmpty(i)&&Rk(i),Fk(t,a),Dk(t,a)):v()?b():v(!0)?(a=i.parentNode.insertBefore(g(),i),Dk(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){q(Bs(Te.fromDom(t),ze),(function(t){var e=t.dom;e.nodeValue=ko(e.nodeValue)}))}(s=n.extractContents()),function(t){do{Fn(t)&&(t.nodeValue=t.nodeValue.replace(/^[\r\n]+/,"")),t=t.firstChild}while(t)}(s),a=s.firstChild,d.insertAfter(s,i),function(t,e,n){var r,o=n,i=[];if(o){for(;o=o.firstChild;){if(t.isBlock(o))return;On(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)}}(d,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")}(d,i),d.isEmpty(i)&&Rk(i),a.normalize(),d.isEmpty(a)?(d.remove(a),b()):(Fk(t,a),Dk(t,a))),d.setAttrib(a,"id",""),t.fire("NewBlock",{newBlock:a}))}},zk=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),Hd(t,r)},Uk=function(t,e){var n,r,o=t.selection,i=t.dom,a=o.getRng();yd(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),f=l?i.getParent(l.parentNode,i.isBlock):null,d=f?f.nodeName.toUpperCase():"",m=!(!e||!e.ctrlKey);"LI"!==d||m||(l=f),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"),Lu(i,a,n),zk(t,n,r),t.undoManager.add()},Vk=function(t,e){var n=Te.fromTag("br");fn(Te.fromDom(e),n),t.undoManager.add()},Hk=function(t,e){qk(t.getBody(),e)||dn(Te.fromDom(e),Te.fromTag("br"));var n=Te.fromTag("br");dn(Te.fromDom(e),n),zk(t,n.dom,!1),t.undoManager.add()},qk=function(t,e){return n=Au.after(e),!!Vn(n.getNode())||$l(t,Au.after(e)).map((function(t){return Vn(t.getNode())})).getOr(!1);var n},Wk=function(t){return t&&"A"===t.nodeName&&"href"in t},Kk=function(t){return t.fold(L,Wk,Wk,L)},Yk=function(t,e){e.fold(_,N(Vk,t),N(Hk,t),_)},Xk=function(t,e){var n=function(t){var e=N(tC,t),n=Au.fromRangeStart(t.selection.getRng());return dw(e,t.getBody(),n).filter(Kk)}(t);n.isSome()?n.each(N(Yk,t)):Uk(t,e)},Zk=function(t,e){return Ek(t).filter((function(t){return e.length>0&&Le(Te.fromDom(t),e)})).isSome()},Gk=Sr([{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 Ek(t).filter((function(t){return go(Te.fromDom(t))})).isSome()}(e)===t}},ex=function(t,e){return function(n,r){var o=function(t){return Ek(t).fold(S(""),(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(){jk(t,e)}),_)},cx=function(t){t.on("keydown",(function(e){e.keyCode===id.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:id.END,action:ok(X_,t,!0)},{keyCode:id.HOME,action:ok(X_,t,!1)},{keyCode:id.END,action:ok(uk,t,!0)},{keyCode:id.HOME,action:ok(uk,t,!1)},{keyCode:id.END,action:ok(h_,t,!0,e)},{keyCode:id.HOME,action:ok(h_,t,!1,e)}],n).each((function(t){n.preventDefault()}))}(t,e,n)}))},fx=pe().browser,dx=function(t){!function(t){var e=Ns((function(){t.composing||th(t)}),0);fx.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===id.PAGE_UP||t.keyCode===id.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:id.PAGE_UP,action:ok(h_,t,!1,e)},{keyCode:id.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 Fn(n)?(n.insertData(r,t),B.some(Au(n,r+t.length))):ll(e).map((function(n){var r=Te.fromText(t);return e.isAtEnd()?dn(n,r):fn(n,r),Au(r.dom,t.length)}))},yx=N(bx,Co),Cx=N(bx," "),wx=function(t,e){return function(n){return function(t,e){return!qp(e)&&(Wp(t,e)||Vp(t,e)||Hp(t,e))}(t,n)?yx(e):Cx(e)}},_x=function(t){var e=Au.fromRangeStart(t.selection.getRng()),n=Te.fromDom(t.getBody());if(t.selection.isCollapsed()){var r=N(tC,t),o=Au.fromRangeStart(t.selection.getRng());return dw(r,t.getBody(),o).bind(function(t){return function(e){return e.fold((function(e){return Rl(t.dom,Au.before(e))}),(function(t){return Il(t)}),(function(t){return Pl(t)}),(function(e){return $l(t.dom,Au.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:id.SPACEBAR,action:ok(_x,t)}],e).each((function(t){e.preventDefault()}))}(t,e)}))},xx=function(t){var e=d_(t);return function(t){t.on("keyup compositionstart",N(U_,t))}(t),xk(t,e),Sk(t,e),cx(t),kx(t),dx(t),lx(t,e),vx(t,e),e},Sx=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&&ld(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()||Vf(t)&&!n.isSameElementPath(e)&&t.dom.isChildOf(e,t.getBody())&&t.nodeChanged({selectionChange:!0})})),t.on("mouseup",(function(e){!e.isDefaultPrevented()&&Vf(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}(),Dx=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){q(t,(function(t){t.attr("data-mce-open",t.attr("open")),t.attr("open","open")}))})),t.serializer.addNodeFilter("details",(function(t){q(t,(function(t){var e=t.attr("data-mce-open");t.attr("open",d(e)?e:null),t.attr("data-mce-open",null)}))}))}(t)},Ex=function(t){return On(t)&&po(Te.fromDom(t))},Nx=function(t){t.on("click",(function(e){e.detail>=3&&function(t){var e=t.selection.getRng(),n=Au.fromRangeStart(e),r=Au.fromRangeEnd(e);if(Au.isElementPosition(n)){var o=n.container();Ex(o)&&Il(o).each((function(t){return e.setStart(t.container(),t.offset())}))}Au.isElementPosition(r)&&(o=n.container(),Ex(o)&&Pl(o).each((function(t){return e.setEnd(t.container(),t.offset())})));t.selection.setRng(Kh(e))}(t)}))},Ax=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}},Tx=function(t,e){return n=function(t){return t.inline?Ax(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=Ax(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},Ox=Wn,Lx=qn,$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},Rx=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,Tx(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=Px(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===id.ESC&&s()}))},Fx=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;(Ox(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"];q(s,(function(t){r.bind(i,t,n),o.bind(a,t,e)})),t.on("remove",(function(){q(s,(function(t){r.unbind(i,t,n),o.unbind(a,t,e)}))}))};t.on("init",(function(){oo.setEditorTimeout(t,r,0)}))}(t)},jx=qn,zx=Wn,Ux=function(t,e){return td(t.getBody(),e)},Vx=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&&(zx(t)||Yn(t))&&r.isChildOf(t,i)},l=function(t){return yp(t)||Cp(t)||hp(t)||gp(t)},f=function(t){t&&n.setRng(t)},d=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 No(t)||$o(t)||Ro(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(Te.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=Te.fromDom(o);return q(Ms(Te.fromDom(t.getBody()),"*[data-mce-selected]"),(function(t){Re(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(zc(a))return m(n,a,!!e&&!o.isAtEnd(),!1);var s=o.getNode(e);if(zc(s))return m(n,s,!e&&!o.isAtEnd(),!1)}return null}var u=t.startContainer,l=t.startOffset,f=t.endOffset;if(3===u.nodeType&&0===l&&zx(u.parentNode)&&(u=u.parentNode,l=r.nodeIndex(u),u=u.parentNode),1!==u.nodeType)return null;if(f===l+1&&u===t.endContainer){var d=u.childNodes[l];if(c(d))return v(d)}return null},C=function(){e&&e.removeAttribute(u),Jr(Te.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=d();n.collapsed&&vy(t,e.clientX,e.clientY)&&TC(t,n,!1).each(f)})),t.on("click",(function(e){var o=Ux(t,e.target);o&&(zx(o)&&(e.preventDefault(),t.focus()),jx(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!==zx(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=Au.before(e);if(Vn(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);zx(r)?(e.preventDefault(),AC(t,r).each(y)):c(n)&&AC(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)zx(a)?(e.preventDefault(),AC(t,a).each(y)):(C(),jx(a)&&e.shiftKey||ed(e.clientX,e.clientY,n.getRng())||(w(),n.placeCaretAt(e.clientX,e.clientY)));else if(c(o))AC(t,o).each(y);else if(!1===zc(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);f(l),t.getBody().focus()}}}})),t.on("keypress",(function(t){id.modifierPressed(t)||zx(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))}})),Fx(t),function(t){var e=Ns((function(){if(!t.removed&&t.getBody().contains(document.activeElement)){var e=t.selection.getRng();if(e.collapsed){var n=OC(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=td(t.getBody(),n),o=Wn(r)?r:n;t.selection.getNode()!==o&&AC(t,o).each((function(e){return t.selection.setRng(e)}))}}))}))}(t)}(),{showCaret:m,showBlockCaretContainer:function(t){t.hasAttribute("data-mce-caret")&&(Io(t),f(d()),n.scrollIntoView(t))},hideFakeCaret:w,destroy:function(){a.destroy(),e=null}}},Hx=function(t){var e,n,r=Ne.each,o=id.BACKSPACE,i=id.DELETE,a=t.dom,s=t.selection,u=t.parser,c=ke.gecko,l=ke.ie,f=ke.webkit,d="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(No(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})}}))}))},S=function(){t.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")},D=function(){t.inline||t.on("keydown",(function(){document.activeElement===document.body&&t.getWin().focus()}))},E=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()}})))},N=function(){ke.mac&&t.on("keydown",(function(e){!id.metaKeyPressed(e)||e.shiftKey||37!==e.keyCode&&39!==e.keyCode||(e.preventDefault(),t.selection.getSel().modify("move",37===e.keyCode?"backward":"forward","lineboundary"))}))},A=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}")},T=function(){t.on("init",(function(){t.dom.bind(t.getBody(),"submit",(function(t){t.preventDefault()}))}))},O=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=d+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(d)>=0?(e=e.substr(d.length).split(","),{id:unescape(e[0]),html:unescape(e[1])}):null}(e);if(n&&n.id!==t.id){e.preventDefault();var r=cd(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}))},L=_;return Gv(t)?(f&&(b(),C(),T(),v(),ke.iOS&&(D(),E(),A())),c&&(y(),k(),S(),N())):(t.on("keydown",(function(e){var n,r;if(!h(e)&&e.keyCode===id.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){id.modifierPressed(t)||s.normalize()}),!0),f&&(b(),C(),nc(t)&&t.on("init",(function(){p("DefaultParagraphSeparator",nc(t))})),T(),w(),u.addNodeFilter("br",(function(t){for(var e=t.length;e--;)"Apple-interchange-newline"===t[e].attr("class")&&t[e].remove()})),ke.iOS?(D(),E(),A()):v()),ke.ie>=11&&(E(),w()),ke.ie&&(v(),p("AutoUrlDetect",!1),O()),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(),S(),N(),w())),{refreshContentEditable:L,isHidden:function(){if(!c||t.removed)return!1;var e=t.selection.getSel();return!e||!e.rangeCount||0===e.rangeCount}}},qx=gs.DOM,Wx=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:Wx(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||Vf(t)&&t.selection.getStart(!0)!==e||Il(e).each((function(e){var n=e.getNode(),r=Pn(n)?Il(n).getOr(e):e;ke.browser.isIE()?function(t,e){var n=Te.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="";Ne.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=Te.fromDom(t.getBody()),r=un(sn(n)),o=Te.fromTag("style");Qn(o,"type","text/css"),pn(o,Te.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,qx.setAttrib(r,"spellcheck","false")),t.quirks=Hx(t),function(t){t.fire("PostRender")}(t);var o=function(t){return t.getParam("directionality",Ss.isRtl()?"rtl":void 0)}(t);void 0!==o&&(r.dir=o),e.protect&&t.on("BeforeSetContent",(function(t){Ne.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}))},tS=function(t){!0!==t.removed&&(!function(t){Gv(t)||t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"})}(t),Zx(t))},eS=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&&(qx.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"===qx.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=Ai(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:fc(t),referrerPolicy:dc(t),onSetAttrib:function(e){t.fire("SetAttrib",e)}}),t.parser=function(t){var e=Nb(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 Tt(Tt({},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=Jf(t),t.formatter=qy(t),t.undoManager=Ky(t),t._nodeChangeDispatcher=new Sx(t),t._selectionOverrides=Vx(t),P_(t),Dx(t),Gv(t)||Nx(t);var a=function(t){return Gv(t)?ws(null):xx(t)}(t);R_(t,a),function(t){nc(t)&&t.on("NodeChange",N(j_,t))}(t),Jy(t);var s=Jv(t);Qx(t),s.fold((function(){Jx(t).then((function(){return tS(t)}))}),(function(e){t.setProgressState(!0),Jx(t).then((function(){e().then((function(e){t.setProgressState(!1),tS(t)}),(function(e){t.notificationManager.open({type:"error",text:String(e)}),tS(t)}))}))}))},nS=gs.DOM,rS=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+='
    '},oS=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=Te.fromTag("iframe"),tr(i,o),tr(i,{id:n+"_ifr",frameBorder:"0",allowTransparency:"true",title:r}),Rs(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=Ry("mce");t[n]=function(){eS(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 nS.setAttrib(e,"src",r),!0}return!1}(t,s);return t.contentAreaContainer=e.iframeContainer,t.iframeElement=s,t.iframeHTML=rS(t),nS.add(e.iframeContainer,s),u},iS=gs.DOM,aS=function(t,e,n){var r=Cy.get(n),o=Cy.urls[n]||t.documentBaseUrl.replace(/\/$/,"");if(n=Ne.trim(n),r&&-1===Ne.inArray(e,n)){if(Ne.each(Cy.dependencies(n),(function(n){aS(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=Ss.translate(["Failed to initialize plugin: {0}",e]);nd(t,"PluginLoadError",{message:r}),Ny(r,n),xy(t,r)}(t,n,e)}}},sS=function(t){return t.replace(/^\-/,"")},uS=function(t){return{editorContainer:t,iframeContainer:t,api:{}}},cS=function(t){var e=t.getElement();return t.inline?uS(null):function(t){var e=iS.create("div");return iS.insertAfter(e,t),uS(e)}(e)},lS=function(t){var e=t.getElement();return t.orgDisplay=e.style.display,d(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):cS(t)},fS=function(t){t.fire("ScriptsLoaded"),function(t){var e=Ne.trim(ac(t)),n=t.ui.registry.getAll().icons,r=Tt(Tt({},ly.get("default").icons),ly.get(e).icons);dt(r,(function(e,r){Ct(n,r)||t.ui.registry.addIcon(r,e)}))}(t),function(t){var e=bc(t);if(d(e)){t.settings.theme=sS(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=[];Ne.each(_c(t).split(/[ ,]/),(function(n){aS(t,e,sS(n))}))}(t);var e=lS(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(L),enable:function(){t.mode.isReadOnly()||B.from(e.enable).map(O)}};t.ui=Tt(Tt({},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,Oy(t),t.inline?eS(t):function(t,e){var n=oS(t,e);e.editorContainer&&(nS.get(e.editorContainer).style.display=t.orgDisplay,t.hidden=nS.isHidden(e.editorContainer)),t.getElement().style.display="none",nS.setAttrib(t.id,"aria-hidden","true"),n||eS(t)}(t,n)},dS=gs.DOM,mS=function(t){return"-"===t.charAt(0)},pS=function(t,e){var n=mc(e),r=function(t){return t.getParam("language_url","","string")}(e);if(!1===Ss.hasCode(n)&&"en"!==n){var o=""!==r?r:e.editorManager.baseURL+"/langs/"+n+".js";t.add(o,_,void 0,(function(){!function(t,e,n){Sy(t,"LanguageLoadError",Dy("language",e,n))}(e,o,n)}))}},hS=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)}}))},gS=function(t,e,n){var r=hS(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 hS(e,ac(e),"")}));q(function(t){for(var e=[],n=function(t){e.push(t)},r=0;r=1&&n<=7){var r=function(t){return Ne.explode(t.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large"))}(t),o=function(t){return Ne.explode(t.getParam("font_size_classes",""))}(t);return o?o[n-1]||e:r[n-1]||e}return e}return e},AS=function(t){var e=t.split(/\s*,\s*/);return H(e,(function(t){return-1===t.indexOf(" ")||Mt(t,'"')||Mt(t,"'")?t:"'"+t+"'"})).join(",")},TS=function(t,e){var n=function(t){if("string"!=typeof t){var e=Ne.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)},OS=Ne.each,LS=Ne.map,$S=Ne.inArray,RS=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(OS(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;OS(t,(function(t,r){OS(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"),OS("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=NS(t,e);t.formatter.toggle("fontname",{value:AS(n)}),t.nodeChanged()}(t,r)},FontSize:function(e,n,r){!function(t,e){t.formatter.toggle("fontsize",{value:NS(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){TS(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){O_(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(),qn);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=LS(r,(function(n){return!!t.formatter.matchNode(n,e)}));return-1!==$S(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 N_(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 ES(t,(function(e){return xS(t.getBody(),e.dom)})).getOr("")}(t)}),this),e.addQueryValueHandler("FontSize",(function(){return function(t){return ES(t,(function(e){return kS(t.getBody(),e.dom)})).getOr("")}(t)}),this),e.addQueryValueHandler("LineHeight",(function(){return function(t){return ES(t,(function(e){var n=Te.fromDom(t.getBody()),r=dg(e,(function(t){return sr(t,"line-height")}),N(Re,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}(),IS="data-mce-contenteditable",PS=function(t,e,n){var r,o;Ps(t,e)&&!1===n?(o=e,Os(r=t)?r.dom.classList.remove(o):$s(r,o),Is(r)):n&&Rs(t,e)},BS=function(t,e,n){try{t.getDoc().execCommand(e,!1,String(n))}catch(t){}},MS=function(t,e){t.dom.contentEditable=e?"true":"false"},FS=function(t,e){var n=Te.fromDom(t.getBody());PS(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,MS(n,!1),q(Ms(n,'*[contenteditable="true"]'),(function(t){Qn(t,IS,"true"),MS(t,!1)}))):(t.readonly=!1,MS(n,!0),function(t){q(Ms(t,'*[data-mce-contenteditable="true"]'),(function(t){rr(t,IS),MS(t,!0)}))}(n),BS(t,"StyleWithCSS",!1),BS(t,"enableInlineTableEditing",!1),BS(t,"enableObjectResizing",!1),wm(t)&&t.focus(),function(t){t.selection.setRng(t.selection.getRng())}(t),t.nodeChanged())},jS=function(t){return t.readonly},zS=function(t){t.parser.addAttributeFilter("contenteditable",(function(e){jS(t)&&q(e,(function(t){t.attr(IS,t.attr("contenteditable")),t.attr("contenteditable","false")}))})),t.serializer.addAttributeFilter(IS,(function(e){jS(t)&&q(e,(function(t){t.attr("contenteditable",t.attr(IS))}))})),t.serializer.addTempAttr(IS)},US=function(t,e){if(function(t){return"click"===t.type}(e)&&!id.metaKeyPressed(e)){var n=Te.fromDom(e.target);(function(t,e){return Qr(e,"a",(function(e){return Re(e,Te.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}))}},VS=Ne.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"," "),HS=function(){function t(t){this.bindings={},this.settings=t||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||L}return t.isNative=function(t){return!!VS[t.toLowerCase()]},t.prototype.fire=function(t,e){var n=t.toLowerCase(),r=Ri(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"),iD);return o[o.length-1]=Ne.extend(o[o.length-1],{func:n,scope:r||this.editor}),Ne.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}(),sD=function(){var t=function(){var t={},e={},n={},r={},o={},i={},a={},s=function(t,e){return function(n,r){return t[n.toLowerCase()]=Tt(Tt({},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}},uD=gs.DOM,cD=Ne.extend,lD=Ne.each,fD=Ne.resolve,dD=ke.ie,mD=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,cD(this,GS),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)),Ds.languageLoad=this.settings.language_load,Ds.baseURL=n.baseURL,this.id=t,this.setDirty(!1),this.documentBaseURI=new zm(this.settings.document_base_url,{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=!!this.settings.inline,this.shortcuts=new aD(this),this.editorCommands=new RS(this),this.settings.cache_suffix&&(ke.cacheSuffix=this.settings.cache_suffix.replace(/^[\?\&]+/,"")),this.ui={registry:sD(),styleSheetLoader:void 0,show:_,hide:_,enable:_,disable:_,isDisabled:L};var o=tD(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(){bS(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?wD[0]:null),DD.focusedEditor===t&&(DD.focusedEditor=null),e.length!==wD.length},SD="CSS1Compat"!==document.compatMode,DD=Tt(Tt({},WS),{baseURI:null,baseURL:null,defaultSettings:{},documentBaseURL:null,suffix:null,$:cs,majorVersion:"5",minorVersion:"10.3",releaseDate:"2022-02-09",editors:CD,i18n:Ss,activeEditor:null,focusedEditor:null,settings:{},setup:function(){var t,e,n=this,r="";e=zm.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&&gD(hD(n),(function(t){var n=pD.get(t);n?e.push(n):gD(document.forms,(function(n){gD(n.elements,(function(n){n.name===t&&(t="mce_editor_"+bD++,pD.setAttrib(n,"id",t),e.push(n))}))}))}));break;case"textareas":case"specific_textareas":gD(pD.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?gD(t.types,(function(n){Ne.each(e,(function(e){return!pD.is(e,n.selector)||(l(o(e),vD({},t,n),e),!1)}))})):(Ne.each(e,(function(t){var e;(e=n.get(t.id))&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode&&(xD(e),e.unbindAllNativeEvents(),e.destroy(!0),e.removed=!0,e=null)})),0===(e=Ne.grep(e,(function(t){return!n.get(t.id)}))).length?a([]):gD(e,(function(e){!function(t,e){return t.inline&&e.tagName.toLowerCase()in r}(t,e)?l(o(e),t,e):Ny("Could not initialize inline editor on invalid inline target element",e)})))};return n.settings=t,pD.bind(window,"ready",s),new to((function(t){e?t(e):a=function(e){t(e)}}))},get:function(t){return 0===arguments.length?wD.slice(0):d(t)?J(wD,(function(e){return e.id===t})).getOr(null):w(t)&&wD[t]?wD[t]:null},add:function(t){var e=this;return CD[t.id]===t||(null===e.get(t.id)&&("length"!==t.id&&(CD[t.id]=t),CD.push(t),wD.push(t)),kD(!0),e.activeEditor=t,e.fire("AddEditor",{editor:t}),Fw||(Fw=function(t){var n=e.fire("BeforeUnload");if(n.returnValue)return t.preventDefault(),t.returnValue=n.returnValue,n.returnValue},window.addEventListener("beforeunload",Fw))),t},createEditor:function(t,e){return this.add(new mD(t,e,this))},remove:function(t){var e,n,r=this;if(t){if(!d(t))return n=t,h(r.get(n.id))?null:(xD(n)&&r.fire("RemoveEditor",{editor:n}),0===wD.length&&window.removeEventListener("beforeunload",Fw),n.remove(),kD(wD.length>0),n);gD(pD.select(t),(function(t){(n=r.get(t.id))&&r.remove(n)}))}else for(e=wD.length-1;e>=0;e--)r.remove(wD[e])},execCommand:function(t,e,n){var r=this,o=r.get(n);switch(t){case"mceAddEditor":return r.get(n)||new mD(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(){gD(wD,(function(t){t.save()}))},addI18n:function(t,e){Ss.add(t,e)},translate:function(t){return Ss.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 zm(this.documentBaseURL).toAbsolute(t.replace(/\/+$/,"")),this.baseURI=new zm(this.baseURL)}});DD.setup();var ED,ND,AD,TD,OD=Math.min,LD=Math.max,$D=Math.round,RD=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+=$D(u/2)),"c"===c[1]&&(r+=$D(s/2)),"b"===c[3]&&(o-=a),"r"===c[4]&&(r-=i),"c"===c[3]&&(o-=$D(a/2)),"c"===c[4]&&(r-=$D(i/2)),ID(r,o,i,a)},ID=function(t,e,n,r){return{x:t,y:e,w:n,h:r}},PD={inflate:function(t,e,n){return ID(t.x-e,t.y-n,t.w+2*e,t.h+2*n)},relativePosition:RD,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=LD(t.x,e.x),r=LD(t.y,e.y),o=OD(t.x+t.w,e.x+e.w),i=OD(t.y+t.h,e.y+e.h);return o-n<0||i-r<0?null:ID(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=LD(0,e.x-r),l=LD(0,e.y-o),f=LD(0,i-s),d=LD(0,a-u);return r+=c,o+=l,n&&(i+=c,a+=l,r-=f,o-=d),ID(r,o,(i-=f)-r,(a-=d)-o)},create:ID,fromClientRect:function(t){return ID(t.left,t.top,t.width,t.height)}},BD=(ED={},ND={},{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!==ED[t])return ED[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||"",KD.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&&Ne.each(t.requestheaders,(function(t){e.setRequestHeader(t.key,t.value)})),e.setRequestHeader("X-Requested-With","XMLHttpRequest"),(e=KD.fire("beforeSend",{xhr:e,settings:t}).xhr).send(t.data),!t.async)return r();oo.setTimeout(r,10)}}),YD=Ne.extend,XD=function(){function t(t){this.settings=YD({},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=YD(this.settings,t);r.success=function(t,o){void 0===(t=qD.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=qD.serialize({id:t.id||"c"+this.count++,method:t.method,params:t.params}),r.content_type="application/json",KD.send(r)},t}();try{var ZD="__storage_test__";(zD=window.localStorage).setItem(ZD,ZD),zD.removeItem(ZD)}catch(t){zD=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 GD={geom:{Rect:PD},util:{Promise:to,Delay:oo,Tools:Ne,VK:id,URI:zm,Class:jD,EventDispatcher:HS,Observable:WS,I18n:Ss,XHR:KD,JSON:qD,JSONRequest:XD,JSONP:WD,LocalStorage:zD,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=VD(0,UD(e,1)),i=VD(0,UD(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=HD(255*(n+c)),r=HD(255*(r+c)),o=HD(255*(o+c))}else n=r=o=HD(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=UD(t/=255,UD(e/=255,n/=255)),a=VD(t,VD(e,n));return i===a?{h:0,s:0,v:100*(o=i)}:(r=(a-i)/a,o=a,{h:HD(60*((t===i?3:n===i?1:5)-(t===i?e-n:n===i?t-e:n-t)/(a-i))),s:HD(100*r),v:HD(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=Ly(),n=By(t,e);return{upload:function(e,r){return void 0===r&&(r=!0),n.upload(e,r?Py(t):void 0)}}}},dom:{EventUtils:ji,Sizzle:ka,DomQuery:cs,TreeWalker:so,TextSeeker:Qs,DOMUtils:gs,ScriptLoader:Cs,RangeUtils:_d,Serializer:$b,StyleSheetLoader:io,ControlSelection:sd,BookmarkManager:Qf,Selection:lb,Event:ji.Event},html:{Styles:Oi,Entities:yi,Node:$m,Schema:Ai,SaxParser:Wm,DomParser:Nb,Writer:Qm,Serializer:tp},Env:ke,AddOnManager:Ds,Annotator:Jf,Formatter:qy,UndoManager:Ky,EditorCommands:RS,WindowManager:_y,NotificationManager:yy,EditorObservable:GS,Shortcuts:aD,Editor:mD,FocusManager:cm,EditorManager:DD,DOM:gs.DOM,ScriptLoader:Cs.ScriptLoader,PluginManager:Cy,ThemeManager:wy,IconManager:ly,Resource:BD,trim:Ne.trim,isArray:Ne.isArray,is:Ne.is,toArray:Ne.toArray,makeMap:Ne.makeMap,each:Ne.each,map:Ne.map,grep:Ne.grep,inArray:Ne.inArray,extend:Ne.extend,create:Ne.create,walk:Ne.walk,createNS:Ne.createNS,resolve:Ne.resolve,explode:Ne.explode,_addCacheSuffix:Ne._addCacheSuffix,isOpera:ke.opera,isWebKit:ke.webkit,isIE:ke.ie,isGecko:ke.gecko,isMac:ke.mac},JD=Ne.extend(DD,GD);!function(t){window.tinymce=t,window.tinyMCE=t}(JD),function(e){try{t.exports=e}catch(t){}}(JD)}()},30264:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});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 f,d=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&&(d=t*e,"border-box"===c&&(d=d+o+i),p=Math.max(d,p)),null!==n&&(m=t*n,"border-box"===c&&(m=m+o+i),f=p>m?"":"hidden",p=Math.min(m,p))}return n||(f="hidden"),{height:`${p}px`,minHeight:`${d}px`,maxHeight:`${m}px`,overflowY:f}}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 f(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var d="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:d,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(d,"-wrapper"),(t={},f(t,"".concat(d,"-wrapper-").concat(this.size),!!this.size),f(t,"".concat(d,"-type-").concat(this.type),this.type),f(t,"".concat(d,"-group"),this.prepend||this.append||this.search&&this.enterButton),f(t,"".concat(d,"-group-").concat(this.size),(this.prepend||this.append||this.search&&this.enterButton)&&!!this.size),f(t,"".concat(d,"-group-with-prepend"),this.prepend),f(t,"".concat(d,"-group-with-append"),this.append||this.search&&this.enterButton),f(t,"".concat(d,"-hide-icon"),this.append),f(t,"".concat(d,"-with-search"),this.search&&this.enterButton),t)]},inputClasses:function(){var t;return["".concat(d),(t={},f(t,"".concat(d,"-").concat(this.size),!!this.size),f(t,"".concat(d,"-disabled"),this.itemDisabled),f(t,"".concat(d,"-with-prefix"),this.showPrefix),f(t,"".concat(d,"-with-suffix"),this.showSuffix||this.search&&!1===this.enterButton),t)]},textareaClasses:function(){return["".concat(d),f({},"".concat(d,"-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()}};const p=(0,n(51900).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},2749:(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(t,e){void 0===e._uploadIng&&(e._uploadIng=!0,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(){this.autoBottom&&$A.scrollToView(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},89500:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>d});var r=n(47575),o=n.n(r),i=n(2749),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()},setContent:function(t){null===this.getEditor()?this.content=t:t!=this.getEditor().getContent()&&this.getEditor().setContent(t)},focus:function(){return null===this.getEditor()?"":this.getEditor().focus()},insertImage:function(t){this.insertContent('')},editorImage:function(t){for(var e=0;e|\/>)/gi);if(n)for(var r=0;r').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 d=(0,n(51900).Z)(f,(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.spinShow?"":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},98668:(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{loadIng:0,selects:[],list:[],searchKey:null,searchHistory:[],subscribe:null}},mounted:function(){var t=this;this.subscribe=r.Store.subscribe("cacheUserActive",(function(e){var n=t.list.findIndex((function(t){return t.userid==e.userid}));n>-1&&(t.$set(t.list,n,Object.assign({},t.list[n],e)),t.handleSelectData())}))},beforeDestroy:function(){this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},computed:{maxHiddenClass:function(){var t=this.multipleMax,e=this.maxHiddenInput,n=this.selects;return t&&e&&n.length>=t?"hidden-input":""}},watch:{value:{handler:function(){var t=this,e=this._tmpId=$A.randomString(6);setTimeout((function(){e===t._tmpId&&t.valueChange()}),10)},immediate:!0},selects:function(t){this.$emit("input",t)}},methods:{searchUser:function(t){var e=this;"string"!=typeof t&&(t=""),this.searchKey=t;var n=this.searchHistory.find((function(e){return e.key==t}));n&&(this.list=n.data),n||this.loadIng++,setTimeout((function(){e.searchKey==t?e.$store.dispatch("call",{url:"users/search",data:{keys:{key:t,project_id:e.projectId,no_project_id:e.noProjectId},take:30}}).then((function(r){var o=r.data;n||e.loadIng--,e.list=o;var i=e.searchHistory.findIndex((function(e){return e.key==t})),a={key:t,data:o,time:$A.Time()};i>-1?e.searchHistory.splice(i,1,a):e.searchHistory.push(a)})).catch((function(t){var r=t.msg;n||e.loadIng--,e.list=[],$A.messageWarning(r)})):n||e.loadIng--}),this.searchHistory.length>0?300:0)},isDisabled:function(t){return 0!==this.disabledChoice.length&&this.disabledChoice.includes(t)},openChange:function(t){t&&this.$nextTick(this.searchUser)},remoteMethod:function(){},valueChange:function(){var t=this;this.selects!=this.value&&($A.isArray(this.value)?this.selects=$A.cloneJSON(this.value):this.value?this.selects=[this.value]:this.selects=[],this.selects.some((function(e){t.list.find((function(t){return t.userid==e}))||(t.list.push({userid:e,nickname:e}),t.$store.dispatch("getUserBasic",{userid:e}))})))},handleSelectData:function(){var t=this;this.__handleSelectTimeout&&clearTimeout(this.__handleSelectTimeout),this.__handleSelectTimeout=setTimeout((function(){if(t.$refs.select){var e=t.$refs.select.getValue();e&&e.some((function(e){var n=t.list.find((function(t){return t.userid==e.value}));n&&(t.$set(e,"label",n.nickname),t.$set(e,"avatar",n.userimg))}))}}),100)}}};const i=(0,n(51900).Z)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:["common-user",t.maxHiddenClass]},[n("Select",{ref:"select",attrs:{transfer:t.transfer,placeholder:t.placeholder,size:t.size,loading:t.loadIng>0,"loading-text":t.$L("加载中..."),"default-label":t.value,"default-event-object":!0,"multiple-max":t.multipleMax,"multiple-uncancelable":t.uncancelable,"remote-method":t.remoteMethod,multiple:"",filterable:"","transfer-class-name":"common-user-transfer"},on:{"on-query-change":t.searchUser,"on-open-change":t.openChange},model:{value:t.selects,callback:function(e){t.selects=e},expression:"selects"}},[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,"key-value":e.email,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.loadIng>0?n("div",{staticClass:"common-user-loading"},[n("Loading")],1):t._e()],1)}),[],!1,null,null,null).exports},84953:(t,e,n)=>{"use strict";n.d(e,{Z:()=>k});var r=n(30264),o=n(86877),i=n(20629);const a={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,f=[Math.max(a,u),Math.min(a,u)];if(u=f[1],(a=f[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 d=[c%360,l%360];return(c=d[0])>(l=d[1])&&(l+=360),this.part(n,o,a,u,c,l)}}};var s=n(51900);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;e180||n>180)&&(e>n?(r=180,o=n*(180/e)):(r=e*(180/n),o=180)),{width:r+"px",height:o+"px"}}return{}},withdraw:function(){var t=this;$A.modalConfirm({content:"确定撤回此信息吗?",okText:"撤回",loading:!0,onOk:function(){t.$store.dispatch("call",{url:"dialog/msg/withdraw",data:{msg_id:t.msgData.id}}).then((function(){$A.messageSuccess("消息已撤回"),t.$store.dispatch("forgetDialogMsg",t.msgData.id),t.$Modal.remove()})).catch((function(e){var n=e.msg;$A.messageError(n,301),t.$Modal.remove()}))}})},viewFile:function(){var t=this.msgData,e=t.id,n=t.dialog_id,r=t.msg;if(["jpg","jpeg","gif","png"].includes(r.ext)){var o=$A.cloneJSON(this.dialogMsgs.filter((function(t){return t.dialog_id===n&&"file"===t.type&&["jpg","jpeg","gif","png"].includes(t.msg.ext)}))).sort((function(t,e){return t.id-e.id})),i=o.findIndex((function(t){return t.id===e}));i>-1?(this.$store.state.previewImageIndex=i,this.$store.state.previewImageList=o.map((function(t){return t.msg.path}))):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=[r.path])}else this.$Electron?this.$Electron.sendMessage("windowRouter",{name:"file-msg-"+this.msgData.id,path:"/single/file/msg/"+this.msgData.id,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:"".concat(this.msgData.msg.name," (").concat($A.bytesToSize(this.msgData.msg.size),")"),titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)}}):window.open($A.apiUrl("../single/file/msg/".concat(this.msgData.id)))},downFile:function(){var t=this;$A.modalConfirm({title:"下载文件",content:"".concat(this.msgData.msg.name," (").concat($A.bytesToSize(this.msgData.msg.size),")"),okText:"立即下载",onOk:function(){t.$store.dispatch("downUrl",$A.apiUrl("dialog/msg/download?msg_id=".concat(t.msgData.id)))}})}}};const d=(0,s.Z)(f,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:"dialog-view "+t.msgData.type,attrs:{"data-id":t.msgData.id}},[n("div",{staticClass:"dialog-head"},[n("div",{staticClass:"dialog-content"},["text"===t.msgData.type?n("div",{staticClass:"content-text"},[n("pre",{staticClass:"no-dark-mode"},[t._v(t._s(t.textMsg(t.msgData.msg.text)))])]):"file"===t.msgData.type?n("div",{class:"content-file "+t.msgData.msg.type},[n("div",{staticClass:"dialog-file"},["img"===t.msgData.msg.type?n("img",{staticClass:"file-img",style:t.imageStyle(t.msgData.msg),attrs:{src:t.msgData.msg.thumb},on:{click:t.viewFile}}):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)))])])])])]):"loading"===t.msgData.type?n("div",{staticClass:"content-loading"},[n("Loading")],1):n("div",{staticClass:"content-unknown"},[t._v(t._s(t.$L("未知的消息类型")))])]),t._v(" "),t.showMenu?n("div",{staticClass:"dialog-menu"},[n("div",{staticClass:"menu-icon"},[t.msgData.userid==t.userId?n("Icon",{attrs:{type:"md-undo",title:t.$L("撤回")},on:{click:t.withdraw}}):t._e(),t._v(" "),"file"===t.msgData.type?[n("Icon",{attrs:{type:"md-eye",title:t.$L("查看")},on:{click:t.viewFile}}),t._v(" "),n("Icon",{attrs:{type:"md-arrow-round-down",title:t.$L("下载")},on:{click:t.downFile}})]:t._e()],2)]):t._e()]),t._v(" "),t.msgData.created_at?n("div",{staticClass:"dialog-foot"},[n("div",{staticClass:"time",attrs:{title:t.msgData.created_at}},[t._v(t._s(t.$A.formatTime(t.msgData.created_at)))]),t._v(" "),t.msgData.send>1||"group"==t.dialogType?n("EPopover",{ref:"percent",staticClass:"percent",attrs:{placement:"left-end",width:360,offset:-8},model:{value:t.popperShow,callback:function(e){t.popperShow=e},expression:"popperShow"}},[n("div",{staticClass:"dialog-wrapper-read-poptip-content"},[n("ul",{staticClass:"read overlay-y"},[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 overlay-y"},[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:{slot:"reference",percent:t.msgData.percentage,size:14},slot:"reference"})],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 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$A.Time()){var n=window.__sendDialogMsg,r=n.msgFile,o=n.msgText;window.__sendDialogMsg=null,this.$nextTick((function(){$A.isArray(r)&&r.length>0?e.sendFileMsg(r):o&&e.sendMsg(o)}))}if(t.query&&t.query._){var i=$A.cloneJSON(t.query);delete i._,this.goForward({query:i},!0)}},immediate:!0},dialogId:{handler:function(t){var e=this;t&&(this.msgNew=0,this.topId=-1,this.visible=!1,this.$store.dispatch("getDialogMsgs",t).then((function(t){e.onToBottom(),e.visible=!0})))},immediate:!0},wsOpenNum:function(t){t<=1||this.$store.dispatch("getDialogMsgs",this.dialogId)}},methods:{sendMsg:function(t){var e=this;if("string"==typeof t&&t&&(this.msgText=t,this.$refs.input.focus()),""!=this.msgText){var n=$A.randomString(16);this.tempMsgs.push({id:n,dialog_id:this.dialogData.id,type:"text",userid:this.userId,msg:{text:this.msgText}}),this.isDesktop||this.$refs.input.blur(),this.onToBottom(),this.onActive(),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:this.dialogId,text:this.msgText},method:"post"}).then((function(t){var r=t.data;e.tempMsgs=e.tempMsgs.filter((function(t){return t.id!=n})),e.sendSuccess(r)})).catch((function(t){var r=t.msg;$A.modalError(r),e.tempMsgs=e.tempMsgs.filter((function(t){return t.id!=n}))})),this.msgText=""}},sendFileMsg:function(t){var e=this;t.length>0&&(this.pasteFile=[],this.pasteItem=[],t.some((function(t){var n=new FileReader;n.readAsDataURL(t),n.onload=function(n){var r=n.target;e.pasteFile.push(t),e.pasteItem.push({type:$A.getMiddle(t.type,null,"/"),name:t.name,size:t.size,result:r.result}),e.pasteShow=!0}})))},chatKeydown:function(t){if(13===t.keyCode){if(t.shiftKey)return;t.preventDefault(),this.sendMsg()}},pasteDrag:function(t,e){var n="drag"===e?t.dataTransfer.files:t.clipboardData.files,r=Array.prototype.slice.call(n);r.length>0&&(t.preventDefault(),this.sendFileMsg(r))},chatPasteDrag:function(t,e){this.dialogDrag=!1,this.pasteDrag(t,e)},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)},pasteSend:function(){var t=this;this.pasteFile.some((function(e){t.$refs.chatUpload.upload(e)}))},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.isDesktop||this.$refs.input.blur(),this.onToBottom(),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){var e=this;$A.isArray(t)?t.some((function(t){e.sendSuccess(t)})):(this.$store.dispatch("saveDialogMsg",t),this.$store.dispatch("increaseTaskMsgNum",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}t.scale>=1&&(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")},onToBottom:function(){this.autoBottom=!0,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,$A.scrollToView(document.getElementById("view_"+e),{behavior:"instant",inline:"start"})}))})).catch((function(){}))},addDialogMsg:function(){var t=this;this.isAutoBottom?this.$nextTick(this.onToBottom):this.$nextTick((function(){t.$refs.scroller&&t.$refs.scroller.scrollInfo().scrollE>10&&t.msgNew++}))}}};const k=(0,s.Z)(_,(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-nav",class:{completed:t.$A.dialogCompleted(t.dialogData)}},[n("div",{staticClass:"dialog-avatar"},["group"==t.dialogData.type?["project"==t.dialogData.group_type?n("i",{staticClass:"taskfont icon-avatar project"},[t._v("")]):"task"==t.dialogData.group_type?n("i",{staticClass:"taskfont icon-avatar task"},[t._v("")]):n("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:t.dialogData.dialog_user?n("div",{staticClass:"user-avatar"},[n("UserAvatar",{attrs:{userid:t.dialogData.dialog_user.userid,size:42}})],1):n("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}})],2),t._v(" "),n("div",{staticClass:"dialog-title"},[n("div",{staticClass:"main-title"},[t._l(t.$A.dialogTags(t.dialogData),(function(e){return"success"!=e.color?[n("Tag",{attrs:{color:e.color,fade:!1}},[t._v(t._s(t.$L(e.text)))])]:t._e()})),t._v(" "),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(" "),t.dialogData.top_at?n("label",{staticClass:"top-text"},[t._v(t._s(t.$L("置顶")))]):t._e()],2),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",style:{opacity:t.visible?1:0},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.onToBottom}},[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:2e4,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(),t._v(" "),n("Modal",{attrs:{title:t.$L(t.pasteTitle),"cancel-text":t.$L("取消"),"ok-text":t.$L("发送"),"enter-ok":!0},on:{"on-ok":t.pasteSend},model:{value:t.pasteShow,callback:function(e){t.pasteShow=e},expression:"pasteShow"}},[n("div",{staticClass:"dialog-wrapper-paste"},[t._l(t.pasteItem,(function(e){return["image"==e.type?n("img",{attrs:{src:e.result}}):n("div",[t._v(t._s(t.$L("文件"))+": "+t._s(e.name)+" ("+t._s(t.$A.bytesToSize(e.size))+")")])]}))],2)])],2):t._e()}),[],!1,null,null,null).exports},85782:(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:Math.max($A.runNum(this.listPageSize),10)}}).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 ")),i.push(t("span",{class:"change-value"},"".concat(u||"-")))):i.push(t("span",{class:"change-value"},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=[];if(!$A.isJson(n))return r;if(this.taskId>0&&$A.isJson(n.flow)){var o=$A.getMiddle(n.flow.flow_item_name,"|");o&&r.push({id:e,button:"重置",content:"确定重置为【".concat(o,"】吗?")})}return 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&&t.showLoad?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},66237:(t,e,n)=>{"use strict";n.d(e,{Z:()=>b});var r=n(20629),o=n(89500),i=n(25199),a=n(98668);const s={name:"TaskUpload",props:{maxSize:{type:Number,default:204800}},data:function(){return{uploadFormat:["jpg","jpeg","png","gif","doc","docx","xls","xlsx","ppt","pptx","txt","esp","pdf","rar","zip","gz","ai","avi","bmp","cdr","eps","mov","mp3","mp4","pr","psd","svg","tif"]}},methods:{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)+"。"})},handleBeforeUpload:function(t){return this.$emit("on-select-file",t),!1},handleClick:function(){this.$refs.upload.handleClick()}}};var u=n(51900);const c=(0,u.Z)(s,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("Upload",{ref:"upload",attrs:{name:"files",action:"",multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize,"before-upload":t.handleBeforeUpload}})}),[],!1,null,null,null).exports;var l=n(84953),f=n(85782),d=n(80641),m=n(21929);function p(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 h(t){for(var e=1;e0&&!this.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=$A.Date(t.start_at,!0),n=$A.Date(t.end_at,!0);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){var e=this;this.taskDetail=$A.cloneJSON(t),this.$nextTick((function(){e.$refs.name&&e.$refs.name.resizeTextarea()}))},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:{innerHeightListener:function(){this.innerHeight=Math.min(1100,window.innerHeight)},within24Hours:function(t){return $A.Date(t,!0)-this.nowTime<86400},expiresFormat:function(t){return $A.countDownFormat(t,this.nowTime)},isOverdue:function(t){return!!t.overdue||$A.Date(t.end_at,!0)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.receiveShow=!1,e.$store.dispatch("getTaskOne",e.taskDetail.id).catch((function(){}))})).catch((function(t){var n=t.msg;$A.modalError(n),e.ownerLoad--,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})))},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.$store.dispatch("getTaskOne",t.taskDetail.id).catch((function(){}))})).catch((function(e){var n=e.msg;$A.modalError(n),t.assistLoad--}))}},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||this.addsubLoad>0)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.messageError("任务描述不能为空")},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.msgText&&this.msgDialog()}},msgDialog: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.$store.dispatch("saveTask",n),t.$store.dispatch("getDialogOne",n.dialog_id).then((function(){t.sendLoad--,$A.isSubElectron?t.resizeDialog().then((function(){t.sendDialogMsg()})):t.$nextTick((function(){t.windowMax768?(window.__sendDialogMsg={time:$A.Time()+10,msgText:t.msgText,msgFile:t.msgFile},t.msgFile=[],t.msgText="",t.goForward({name:"manage-messenger",query:{_:$A.randomString(6)}}),$A.setStorage("messenger::dialogId",n.dialog_id),t.$store.state.dialogOpenId=n.dialog_id,t.$store.dispatch("openTask",0)):t.sendDialogMsg()}))})).catch((function(e){var n=e.msg;t.sendLoad--,$A.modalError(n)}))})).catch((function(e){var n=e.msg;t.sendLoad--,$A.modalError(n)})))},sendDialogMsg:function(){this.msgFile.length>0?this.$refs.dialog.sendFileMsg(this.msgFile):this.msgText&&this.$refs.dialog.sendMsg(this.msgText),this.msgFile=[],this.msgText=""},msgPasteDrag:function(t,e){var n="drag"===e?t.dataTransfer.files:t.clipboardData.files;this.msgFile=Array.prototype.slice.call(n),this.msgFile.length>0&&(t.preventDefault(),this.msgDialog())},taskPasteDrag:function(t,e){this.dialogDrag=!1,this.msgPasteDrag(t,e)},taskDragOver: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)},onSelectFile:function(t){this.msgFile=[t],this.msgDialog()},deleteFile:function(t){var e=this;this.$set(t,"_show_menu",!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={title:this.taskDetail.name,titleFixed:!0,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.sendMessage("windowRouter",{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;return new Promise((function(e){t.$Electron.sendSyncMessage("windowSize",{width:Math.max(1100,window.innerWidth),height:Math.max(720,window.innerHeight),minWidth:800,minHeight:600,autoZoom:!0});var n=0,r=setInterval((function(){n++,(t.$refs.dialog||n>20)&&(clearInterval(r),t.$refs.dialog&&e())}),100)}))},viewFile:function(t){if(["jpg","jpeg","gif","png"].includes(t.ext)){var e=this.fileList.filter((function(t){return["jpg","jpeg","gif","png"].includes(t.ext)})),n=e.findIndex((function(e){return e.id===t.id}));n>-1?(this.$store.state.previewImageIndex=n,this.$store.state.previewImageList=e.map((function(t){return t.path}))):(this.$store.state.previewImageIndex=0,this.$store.state.previewImageList=[t.path])}else this.$Electron?this.$Electron.sendMessage("windowRouter",{name:"file-task-"+t.id,path:"/single/file/task/"+t.id,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:"".concat(t.name," (").concat($A.bytesToSize(t.size),")"),titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)}}):window.open($A.apiUrl("../single/file/task/".concat(t.id)))},downFile:function(t){var e=this;$A.modalConfirm({title:"下载文件",content:"".concat(t.name," (").concat($A.bytesToSize(t.size),")"),okText:"立即下载",onOk:function(){e.$store.dispatch("downUrl",$A.apiUrl("project/task/filedown?file_id=".concat(t.id)))}})}}};const b=(0,u.Z)(v,(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:{disabled:0===t.taskId,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",{ref:"name",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255},on:{"on-blur":function(e){return t.updateBlur("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.complete_at&&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:{"popper-class":"task-detail-user-popper",title:t.$L("修改负责人"),width:240,placement:"bottom",transfer:""},on:{"on-popper-show":t.openOwner,"on-ok":t.onOwner}},[n("div",{attrs:{slot:"content"},slot:"content"},[n("UserInput",{attrs:{"multiple-max":1,"project-id":t.taskDetail.project_id,placeholder:t.$L("选择任务负责人"),transfer:!1},model:{value:t.ownerData.owner_userid,callback:function(e){t.$set(t.ownerData,"owner_userid",e)},expression:"ownerData.owner_userid"}}),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:{disabled:0===t.taskId,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(" "),t.taskDetail.archived_at?n("div",{staticClass:"flow"},[n("span",{staticClass:"archived",on:{click:function(e){return e.stopPropagation(),t.openMenu(t.taskDetail)}}},[t._v(t._s(t.$L("已归档")))])]):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:{disabled:0===t.taskId,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",{ref:"name",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255},on:{"on-blur":function(e){return t.updateBlur("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.updateBlur("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,"popper-class":"task-detail-user-popper",placement:"bottom",transfer:""},on:{"on-popper-show":t.openOwner,"on-ok":t.onOwner}},[n("div",{attrs:{slot:"content"},slot:"content"},[n("UserInput",{attrs:{"multiple-max":10,"project-id":t.taskDetail.project_id,placeholder:t.$L("选择任务负责人"),transfer:!1},model:{value:t.ownerData.owner_userid,callback:function(e){t.$set(t.ownerData,"owner_userid",e)},expression:"ownerData.owner_userid"}}),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,"popper-class":"task-detail-user-popper",placement:"bottom",transfer:""},on:{"on-popper-show":t.openAssist,"on-ok":t.onAssist}},[n("div",{attrs:{slot:"content"},slot:"content"},[n("UserInput",{attrs:{"multiple-max":10,"project-id":t.taskDetail.project_id,"disabled-choice":t.assistData.disabled,placeholder:t.$L("选择任务协助人员"),transfer:!1},model:{value:t.assistData.assist_userid,callback:function(e){t.$set(t.assistData,"assist_userid",e)},expression:"assistData.assist_userid"}}),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.end_at?[t.within24Hours(t.taskDetail.end_at)?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.isOverdue(t.taskDetail)?n("Tag",{attrs:{color:"red"}},[t._v(t._s(t.$L("超期未完成")))]):t._e()]:t._e()],2)])],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.taskDetail.file_num>50?n("li",{staticClass:"tip"},[t._v(t._s(t.$L("共"+t.taskDetail.file_num+"个文件,仅显示最新50个")))]):t._e(),t._v(" "),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("div",{staticClass:"file-name"},[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("div",{staticClass:"file-menu",class:{show:e._show_menu}},[n("Icon",{attrs:{type:"md-eye"},on:{click:function(n){return t.viewFile(e)}}}),t._v(" "),n("Icon",{attrs:{type:"md-arrow-round-down"},on:{click:function(n){return t.downFile(e)}}}),t._v(" "),n("EPopover",{staticClass:"file-delete",model:{value:e._show_menu,callback:function(n){t.$set(e,"_show_menu",n)},expression:"file._show_menu"}},[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._show_menu=!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",{staticClass:"taskfont del",attrs:{slot:"reference"},slot:"reference"},[t._v("")])])],1)],1)}))],2),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,ref:"subTask_"+e.id,refInFor:!0,attrs:{"task-id":e.id,"open-task":e,"main-end-at":t.taskDetail.end_at,"can-update-blur":t.canUpdateBlur}})})),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",on:{"on-select-file":t.onSelectFile}})],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,"show-load":!1},on:{"on-load-change":t.logLoadChange}}):n("div",{staticClass:"no-dialog",on:{drop:function(e){return e.preventDefault(),t.taskPasteDrag(e,"drag")},dragover:function(e){return e.preventDefault(),t.taskDragOver(!0,e)},dragleave:function(e){return e.preventDefault(),t.taskDragOver(!1,e)}}},[n("div",{staticClass:"no-tip"},[t._v(t._s(t.$L("暂无消息")))]),t._v(" "),n("div",{staticClass:"no-input"},[n("DragInput",{staticClass:"dialog-input",attrs:{type:"textarea",disabled:t.sendLoad>0,rows:1,autosize:{minRows:1,maxRows:3},maxlength:2e4,placeholder:t.$L("输入消息...")},on:{"on-keydown":t.msgKeydown,"on-input-paste":t.msgPasteDrag},model:{value:t.msgText,callback:function(e){t.msgText=e},expression:"msgText"}}),t._v(" "),n("div",{staticClass:"no-send",on:{click:t.msgDialog}},[t.sendLoad>0?n("Loading"):[n("Badge",{attrs:{count:t.taskDetail.msg_num}}),t._v(" "),n("Icon",{attrs:{type:"md-send"}})]],2)],1),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()])],1)],2),t._v(" "),t.taskDetail.id?t._e():n("div",{staticClass:"task-load"},[n("Loading")],1)]):t._e()}),[],!1,null,null,null).exports},21929:(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,n=this.task,r=function(t){t?e.$store.dispatch("saveTaskCompleteTemp",n.id):e.$store.dispatch("forgetTaskCompleteTemp",n.id)};if($A.isJson(t))t.name&&this.updateTask({color:t.color}).catch((function(){}));else{if($A.leftExists(t,"turn::")){var o=$A.leftDelete(t,"turn::");if(o==this.task.flow_item_id)return;var i=this.taskFlowItems.find((function(t){return t.id==e.flow.flow_item_id}))||{},a=this.taskFlowItems.find((function(t){return t.id==o}))||{},s="end"!==i.status&&"end"===a.status,u="end"===i.status&&"end"!==a.status;return this.updateBefore&&(s?r(!0):u&&r(!1)),void this.updateTask({flow_item_id:o}).then((function(){s?r(!0):u&&r(!1)})).catch((function(){s?r(!1):u&&r(!0)}))}switch(t){case"complete":if(this.task.complete_at)return;this.updateBefore&&r(!0),this.updateTask({complete_at:$A.formatDate("Y-m-d H:i:s")}).then((function(){r(!0)})).catch((function(){r(!1)}));break;case"uncomplete":if(!this.task.complete_at)return;this.updateBefore&&r(!1),this.updateTask({complete_at:!1}).then((function(){r(!1)})).catch((function(){r(!0)}));break;case"archived":case"remove":this.archivedOrRemoveTask(t)}}},visibleChange:function(t){t&&this.$store.dispatch("getTaskFlow",this.task.id).then(this.$refs.dropdownMenu.updatePopper).catch(this.$refs.dropdownMenu.updatePopper)},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="removeTask",r="删除",o={task_id:this.task.id},i=this.task.parent_id>0?"子任务":"任务";"archived"==t&&(n="archivedTask",r="归档",this.task.archived_at&&(r="还原归档",o={task_id:this.task.id,type:"recovery"})),$A.modalConfirm({title:r+i,content:"你确定要"+r+i+"【"+this.task.name+"】吗?",loading:!0,onOk:function(){e.loadIng?e.$Modal.remove():e.$store.dispatch(n,o).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",disabled:t.disabled,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",{ref:"dropdownMenu",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(t.task.archived_at?"还原归档":"归档"))+"\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.r(e),n.d(e,{default:()=>h});var r=n(66237),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?n("Loading"):n("TaskDetail",{ref:"taskDetail",attrs:{"task-id":t.taskInfo.id,"open-task":t.taskInfo,"can-update-blur":t.canUpdateBlur}})],1)}),[],!1,null,"2b8bcc0c",null).exports}}]); \ No newline at end of file diff --git a/public/js/hash b/public/js/hash index 7f48d3fb9..15ab2f032 100644 --- a/public/js/hash +++ b/public/js/hash @@ -1 +1 @@ -815603318bcc7ada +251c1fcec9ce9d71